@zonos/elements 1.3.284 → 1.3.286

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 (146) hide show
  1. package/dist/cjs/{cart-94908542.js → cart-0cf8897b.js} +26 -3
  2. package/dist/cjs/{collect-0c05e2b4.js → collect-79131e52.js} +1 -1
  3. package/dist/cjs/{getMissingRequiredShippingFields-124b3f20.js → getMissingRequiredShippingFields-a8f04267.js} +1 -1
  4. package/dist/cjs/index.cjs.js +7 -7
  5. package/dist/cjs/{invoice-205fb5bc.js → invoice-254ae23b.js} +1 -1
  6. package/dist/cjs/{paypal-45ca5301.js → paypal-8ca67278.js} +1 -1
  7. package/dist/cjs/{placeTestOrder-302b6862.js → placeTestOrder-12b63822.js} +1 -1
  8. package/dist/cjs/{renderCheckoutCurrency-1b0cd5f2.js → renderCheckoutCurrency-a1f71587.js} +1 -1
  9. package/dist/cjs/zonos-address-completion-dialog_7.cjs.entry.js +2 -2
  10. package/dist/cjs/zonos-address_4.cjs.entry.js +1 -1
  11. package/dist/cjs/zonos-airwallex-payment.cjs.entry.js +2 -2
  12. package/dist/cjs/zonos-card_5.cjs.entry.js +2 -2
  13. package/dist/cjs/zonos-cart-items_12.cjs.entry.js +21 -9
  14. package/dist/cjs/zonos-checkout.cjs.entry.js +103 -5
  15. package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +1 -1
  16. package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +5 -5
  17. package/dist/cjs/zonos-collect.cjs.entry.js +3 -3
  18. package/dist/cjs/zonos-controller.cjs.entry.js +1 -1
  19. package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +3 -3
  20. package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +5 -5
  21. package/dist/cjs/zonos-invoice.cjs.entry.js +3 -3
  22. package/dist/cjs/zonos-policy-consent_2.cjs.entry.js +2 -2
  23. package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.js +17 -5
  24. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +104 -5
  25. package/dist/collection/components/common/zonos-stripe-phone-input/zonos-stripe-phone-input.js +1 -1
  26. package/dist/collection/components/main/zonos-controller.js +1 -1
  27. package/dist/collection/components/store/checkout/cart.js +14 -1
  28. package/dist/collection/components/utils/validateCheckoutSession.js +11 -3
  29. package/dist/collection/types/generated/graphql.frontend.types.js +2 -0
  30. package/dist/collection/types/generated/graphql.internal.types.js +128 -6
  31. package/dist/esm/{cart-2e407f7b.js → cart-d04742f5.js} +25 -4
  32. package/dist/esm/{collect-19428e18.js → collect-4c310a16.js} +1 -1
  33. package/dist/esm/{getMissingRequiredShippingFields-719b206f.js → getMissingRequiredShippingFields-f0878e32.js} +1 -1
  34. package/dist/esm/index.js +7 -7
  35. package/dist/esm/{invoice-67a47785.js → invoice-86487dac.js} +1 -1
  36. package/dist/esm/{paypal-6dca6567.js → paypal-997935ab.js} +1 -1
  37. package/dist/esm/{placeTestOrder-9563c89a.js → placeTestOrder-a53f2056.js} +1 -1
  38. package/dist/esm/{renderCheckoutCurrency-282384f0.js → renderCheckoutCurrency-e0e16eb7.js} +1 -1
  39. package/dist/esm/zonos-address-completion-dialog_7.entry.js +2 -2
  40. package/dist/esm/zonos-address_4.entry.js +1 -1
  41. package/dist/esm/zonos-airwallex-payment.entry.js +2 -2
  42. package/dist/esm/zonos-card_5.entry.js +2 -2
  43. package/dist/esm/zonos-cart-items_12.entry.js +21 -9
  44. package/dist/esm/zonos-checkout.entry.js +103 -5
  45. package/dist/esm/zonos-collect-cart-items_3.entry.js +1 -1
  46. package/dist/esm/zonos-collect-finish_6.entry.js +5 -5
  47. package/dist/esm/zonos-collect.entry.js +3 -3
  48. package/dist/esm/zonos-controller.entry.js +1 -1
  49. package/dist/esm/zonos-invoice-cart-items_2.entry.js +3 -3
  50. package/dist/esm/zonos-invoice-finish_5.entry.js +5 -5
  51. package/dist/esm/zonos-invoice.entry.js +3 -3
  52. package/dist/esm/zonos-policy-consent_2.entry.js +2 -2
  53. package/dist/esm-es5/cart-d04742f5.js +1 -0
  54. package/dist/esm-es5/{collect-19428e18.js → collect-4c310a16.js} +1 -1
  55. package/dist/esm-es5/getMissingRequiredShippingFields-f0878e32.js +1 -0
  56. package/dist/esm-es5/index.js +1 -1
  57. package/dist/esm-es5/{invoice-67a47785.js → invoice-86487dac.js} +1 -1
  58. package/dist/esm-es5/{paypal-6dca6567.js → paypal-997935ab.js} +1 -1
  59. package/dist/esm-es5/{placeTestOrder-9563c89a.js → placeTestOrder-a53f2056.js} +1 -1
  60. package/dist/esm-es5/{renderCheckoutCurrency-282384f0.js → renderCheckoutCurrency-e0e16eb7.js} +1 -1
  61. package/dist/esm-es5/zonos-address-completion-dialog_7.entry.js +1 -1
  62. package/dist/esm-es5/zonos-address_4.entry.js +1 -1
  63. package/dist/esm-es5/zonos-airwallex-payment.entry.js +1 -1
  64. package/dist/esm-es5/zonos-card_5.entry.js +1 -1
  65. package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -1
  66. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  67. package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +1 -1
  68. package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -1
  69. package/dist/esm-es5/zonos-collect.entry.js +1 -1
  70. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  71. package/dist/esm-es5/zonos-invoice-cart-items_2.entry.js +1 -1
  72. package/dist/esm-es5/zonos-invoice-finish_5.entry.js +1 -1
  73. package/dist/esm-es5/zonos-invoice.entry.js +1 -1
  74. package/dist/esm-es5/zonos-policy-consent_2.entry.js +1 -1
  75. package/dist/scripts/index.d.ts +4 -0
  76. package/dist/scripts/index.js +1 -1
  77. package/dist/scripts/loadZonos.js +1 -1
  78. package/dist/scripts/zonos.js +1 -1
  79. package/dist/types/components/checkout/zonos-checkout/zonos-checkout.d.ts +14 -0
  80. package/dist/types/components/store/checkout/cart.d.ts +10 -1
  81. package/dist/types/types/generated/graphql.frontend.types.d.ts +2 -0
  82. package/dist/types/types/generated/graphql.frontend.types.ts +2 -0
  83. package/dist/types/types/generated/graphql.internal.types.d.ts +162 -7
  84. package/dist/types/types/generated/graphql.internal.types.ts +201 -9
  85. package/dist/zonos-elements/index.esm.js +1 -1
  86. package/dist/zonos-elements/{p-dd3c00d6.system.entry.js → p-0c327a57.system.entry.js} +1 -1
  87. package/dist/zonos-elements/{p-e32ee011.system.entry.js → p-117953db.system.entry.js} +1 -1
  88. package/dist/zonos-elements/{p-260ad739.system.entry.js → p-1cfb5c2a.system.entry.js} +1 -1
  89. package/dist/zonos-elements/{p-f4acce01.js → p-277b77e3.js} +1 -1
  90. package/dist/zonos-elements/{p-ae0de3e4.entry.js → p-278abdcf.entry.js} +1 -1
  91. package/dist/zonos-elements/p-29b60bf3.system.js +1 -1
  92. package/dist/zonos-elements/{p-e5c76a9b.js → p-344a6278.js} +2 -2
  93. package/dist/zonos-elements/{p-f59a0129.system.entry.js → p-3a26e5e7.system.entry.js} +1 -1
  94. package/dist/zonos-elements/{p-94722bf6.system.entry.js → p-40af92a1.system.entry.js} +1 -1
  95. package/dist/zonos-elements/{p-e8587f9f.system.entry.js → p-41f1697a.system.entry.js} +1 -1
  96. package/dist/zonos-elements/{p-e2b4c082.system.entry.js → p-490d7fec.system.entry.js} +1 -1
  97. package/dist/zonos-elements/{p-1277abac.system.entry.js → p-4941c096.system.entry.js} +1 -1
  98. package/dist/zonos-elements/{p-d20fe2c2.system.entry.js → p-50d088f7.system.entry.js} +1 -1
  99. package/dist/zonos-elements/{p-8311edc7.entry.js → p-5227aa69.entry.js} +1 -1
  100. package/dist/zonos-elements/{p-bced320e.entry.js → p-5d110c2b.entry.js} +1 -1
  101. package/dist/zonos-elements/{p-b1e95f95.entry.js → p-6de2f9c9.entry.js} +1 -1
  102. package/dist/zonos-elements/{p-6dde1e85.system.entry.js → p-6eaf7c9e.system.entry.js} +1 -1
  103. package/dist/zonos-elements/p-7352abe9.js +1 -0
  104. package/dist/zonos-elements/{p-fe5f05fc.system.js → p-74230da8.system.js} +1 -1
  105. package/dist/zonos-elements/{p-22e10b7d.entry.js → p-77993ba1.entry.js} +1 -1
  106. package/dist/zonos-elements/p-78f8e594.entry.js +1 -0
  107. package/dist/zonos-elements/p-7b525c75.system.js +1 -0
  108. package/dist/zonos-elements/p-7f688485.system.entry.js +1 -0
  109. package/dist/zonos-elements/p-8861d47e.js +1 -0
  110. package/dist/zonos-elements/p-8d14cb66.entry.js +1 -0
  111. package/dist/zonos-elements/{p-a07e5011.entry.js → p-944c1fb3.entry.js} +1 -1
  112. package/dist/zonos-elements/{p-cb49dcfe.entry.js → p-96ab529e.entry.js} +1 -1
  113. package/dist/zonos-elements/{p-eb5f3451.system.js → p-998975a3.system.js} +1 -1
  114. package/dist/zonos-elements/p-a4c7ee17.js +1 -0
  115. package/dist/zonos-elements/{p-3a13e58c.system.js → p-c0af11fe.system.js} +1 -1
  116. package/dist/zonos-elements/p-c112fa12.system.entry.js +1 -0
  117. package/dist/zonos-elements/{p-2b8c96e3.system.js → p-c4321a1a.system.js} +1 -1
  118. package/dist/zonos-elements/{p-aecb5d61.entry.js → p-c7329333.entry.js} +1 -1
  119. package/dist/zonos-elements/{p-2989da12.system.js → p-c756a59d.system.js} +1 -1
  120. package/dist/zonos-elements/p-d1a51fac.js +1 -0
  121. package/dist/zonos-elements/{p-d42bd250.system.entry.js → p-d75726e5.system.entry.js} +1 -1
  122. package/dist/zonos-elements/p-dd866ca3.system.entry.js +1 -0
  123. package/dist/zonos-elements/{p-8bfe5b2b.entry.js → p-dd8a7bf4.entry.js} +1 -1
  124. package/dist/zonos-elements/p-e4dc24e1.system.js +1 -0
  125. package/dist/zonos-elements/{p-60a6b71d.system.js → p-e5865ad9.system.js} +1 -1
  126. package/dist/zonos-elements/{p-65c1f51e.entry.js → p-e7d7afda.entry.js} +1 -1
  127. package/dist/zonos-elements/p-f9346f1c.entry.js +1 -0
  128. package/dist/zonos-elements/{p-0c9fec73.js → p-fc5f6113.js} +1 -1
  129. package/dist/zonos-elements/p-fe28dbe6.entry.js +1 -0
  130. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  131. package/package.json +1 -1
  132. package/dist/esm-es5/cart-2e407f7b.js +0 -1
  133. package/dist/esm-es5/getMissingRequiredShippingFields-719b206f.js +0 -1
  134. package/dist/zonos-elements/p-2c2afed4.entry.js +0 -1
  135. package/dist/zonos-elements/p-2cdd1b49.system.entry.js +0 -1
  136. package/dist/zonos-elements/p-46cd14e5.js +0 -1
  137. package/dist/zonos-elements/p-4a20893e.system.js +0 -1
  138. package/dist/zonos-elements/p-5a491f28.js +0 -1
  139. package/dist/zonos-elements/p-5ebb7ae6.entry.js +0 -1
  140. package/dist/zonos-elements/p-62f6a757.entry.js +0 -1
  141. package/dist/zonos-elements/p-8b298971.system.entry.js +0 -1
  142. package/dist/zonos-elements/p-a9ad74e5.system.entry.js +0 -1
  143. package/dist/zonos-elements/p-c1631c9c.js +0 -1
  144. package/dist/zonos-elements/p-cb4cb5a3.system.js +0 -1
  145. package/dist/zonos-elements/p-dc80cb87.js +0 -1
  146. package/dist/zonos-elements/p-ff4e6811.entry.js +0 -1
@@ -661,6 +661,15 @@ export const analyticsProviderType = {
661
661
 
662
662
  export type AnalyticsProviderType =
663
663
  (typeof analyticsProviderType)[keyof typeof analyticsProviderType];
664
+ export const animalDrugApplicationType = {
665
+ AbbreviatedNada: 'ABBREVIATED_NADA',
666
+ ConditionallyApprovedNada: 'CONDITIONALLY_APPROVED_NADA',
667
+ Nada: 'NADA',
668
+ Unspecified: 'UNSPECIFIED',
669
+ } as const;
670
+
671
+ export type AnimalDrugApplicationType =
672
+ (typeof animalDrugApplicationType)[keyof typeof animalDrugApplicationType];
664
673
 
665
674
  export const answerProvenance = {
666
675
  Inferred: 'INFERRED',
@@ -672,6 +681,7 @@ export type AnswerProvenance =
672
681
  (typeof answerProvenance)[keyof typeof answerProvenance];
673
682
  export const answerType = {
674
683
  Boolean: 'BOOLEAN',
684
+ Checkbox: 'CHECKBOX',
675
685
  Date: 'DATE',
676
686
  Document: 'DOCUMENT',
677
687
  MultiSelect: 'MULTI_SELECT',
@@ -1104,6 +1114,7 @@ export const brokerageEntryType = {
1104
1114
 
1105
1115
  export type BrokerageEntryType =
1106
1116
  (typeof brokerageEntryType)[keyof typeof brokerageEntryType];
1117
+
1107
1118
  export const brokerageNatureOfTransaction = {
1108
1119
  Documents: 'DOCUMENTS',
1109
1120
  ForResale: 'FOR_RESALE',
@@ -1114,12 +1125,6 @@ export const brokerageNatureOfTransaction = {
1114
1125
 
1115
1126
  export type BrokerageNatureOfTransaction =
1116
1127
  (typeof brokerageNatureOfTransaction)[keyof typeof brokerageNatureOfTransaction];
1117
- export const brokerageNotificationType = {
1118
- ComplianceQuestionnaire: 'COMPLIANCE_QUESTIONNAIRE',
1119
- } as const;
1120
-
1121
- export type BrokerageNotificationType =
1122
- (typeof brokerageNotificationType)[keyof typeof brokerageNotificationType];
1123
1128
  export const brokeragePgaAgency = {
1124
1129
  Other: 'OTHER',
1125
1130
  UsAtf: 'US_ATF',
@@ -1365,11 +1370,13 @@ export type CarrierBillingInvoiceStatus =
1365
1370
  (typeof carrierBillingInvoiceStatus)[keyof typeof carrierBillingInvoiceStatus];
1366
1371
  export const carrierCode = {
1367
1372
  Apc: 'APC',
1373
+ Asendia: 'ASENDIA',
1368
1374
  AustraliaPost: 'AUSTRALIA_POST',
1369
1375
  BermudaPost: 'BERMUDA_POST',
1370
1376
  CanadaPost: 'CANADA_POST',
1371
1377
  CyprusPost: 'CYPRUS_POST',
1372
1378
  Dhl: 'DHL',
1379
+ DhlEcommerce: 'DHL_ECOMMERCE',
1373
1380
  DirectLink: 'DIRECT_LINK',
1374
1381
  Ehub: 'EHUB',
1375
1382
  Envia: 'ENVIA',
@@ -1650,9 +1657,14 @@ export type ChannelConnectionStatus =
1650
1657
  export const channelType = {
1651
1658
  Amazon: 'AMAZON',
1652
1659
  Bigcommerce: 'BIGCOMMERCE',
1660
+ CustomApi: 'CUSTOM_API',
1653
1661
  Ebay: 'EBAY',
1654
1662
  Etsy: 'ETSY',
1663
+ Magento: 'MAGENTO',
1664
+ Mirakl: 'MIRAKL',
1655
1665
  Shopify: 'SHOPIFY',
1666
+ Walmart: 'WALMART',
1667
+ Walmartca: 'WALMARTCA',
1656
1668
  Wix: 'WIX',
1657
1669
  Woocommerce: 'WOOCOMMERCE',
1658
1670
  } as const;
@@ -1979,6 +1991,25 @@ export const commercialInvoiceItemUnitOfMeasure = {
1979
1991
  export type CommercialInvoiceItemUnitOfMeasure =
1980
1992
  (typeof commercialInvoiceItemUnitOfMeasure)[keyof typeof commercialInvoiceItemUnitOfMeasure];
1981
1993
 
1994
+ export const complianceObligationReason = {
1995
+ ContentChanged: 'CONTENT_CHANGED',
1996
+ Expired: 'EXPIRED',
1997
+ NewlyApplicable: 'NEWLY_APPLICABLE',
1998
+ VersionRelease: 'VERSION_RELEASE',
1999
+ } as const;
2000
+
2001
+ export type ComplianceObligationReason =
2002
+ (typeof complianceObligationReason)[keyof typeof complianceObligationReason];
2003
+ export const complianceObligationStatus = {
2004
+ Current: 'CURRENT',
2005
+ InProgress: 'IN_PROGRESS',
2006
+ NeedsReview: 'NEEDS_REVIEW',
2007
+ Unanswered: 'UNANSWERED',
2008
+ } as const;
2009
+
2010
+ export type ComplianceObligationStatus =
2011
+ (typeof complianceObligationStatus)[keyof typeof complianceObligationStatus];
2012
+
1982
2013
  export const complianceProgramType = {
1983
2014
  Fta: 'FTA',
1984
2015
  Other: 'OTHER',
@@ -2611,6 +2642,7 @@ export const countryCode = {
2611
2642
  Vu: 'VU',
2612
2643
  Wf: 'WF',
2613
2644
  Ws: 'WS',
2645
+ Xk: 'XK',
2614
2646
  Ye: 'YE',
2615
2647
  Yt: 'YT',
2616
2648
  Za: 'ZA',
@@ -3012,10 +3044,18 @@ export const customsStage = {
3012
3044
  } as const;
3013
3045
 
3014
3046
  export type CustomsStage = (typeof customsStage)[keyof typeof customsStage];
3047
+ export const dangerousGoodsAccessibility = {
3048
+ Accessible: 'ACCESSIBLE',
3049
+ Inaccessible: 'INACCESSIBLE',
3050
+ } as const;
3051
+
3052
+ export type DangerousGoodsAccessibility =
3053
+ (typeof dangerousGoodsAccessibility)[keyof typeof dangerousGoodsAccessibility];
3015
3054
  export const dangerousGoodsCategory = {
3016
3055
  BiologicalSubstance: 'BIOLOGICAL_SUBSTANCE',
3017
3056
  ConsumerCommodity: 'CONSUMER_COMMODITY',
3018
3057
  ExceptedQuantity: 'EXCEPTED_QUANTITY',
3058
+ FullyRegulated: 'FULLY_REGULATED',
3019
3059
  LimitedQuantity: 'LIMITED_QUANTITY',
3020
3060
  MagnetizedMaterial: 'MAGNETIZED_MATERIAL',
3021
3061
  NotRestrictedA02: 'NOT_RESTRICTED_A02',
@@ -3026,6 +3066,16 @@ export const dangerousGoodsCategory = {
3026
3066
  export type DangerousGoodsCategory =
3027
3067
  (typeof dangerousGoodsCategory)[keyof typeof dangerousGoodsCategory];
3028
3068
 
3069
+ export const dangerousGoodsOption = {
3070
+ HazardousMaterials: 'HAZARDOUS_MATERIALS',
3071
+ LimitedQuantitiesCommodities: 'LIMITED_QUANTITIES_COMMODITIES',
3072
+ OrmD: 'ORM_D',
3073
+ ReportableQuantities: 'REPORTABLE_QUANTITIES',
3074
+ SmallQuantityException: 'SMALL_QUANTITY_EXCEPTION',
3075
+ } as const;
3076
+
3077
+ export type DangerousGoodsOption =
3078
+ (typeof dangerousGoodsOption)[keyof typeof dangerousGoodsOption];
3029
3079
  export const dashboardUnit = {
3030
3080
  Imperial: 'IMPERIAL',
3031
3081
  Metric: 'METRIC',
@@ -3163,6 +3213,35 @@ export const detailGroupInputType = {
3163
3213
 
3164
3214
  export type DetailGroupInputType =
3165
3215
  (typeof detailGroupInputType)[keyof typeof detailGroupInputType];
3216
+ export const deviceClass = {
3217
+ ClassI: 'CLASS_I',
3218
+ ClassIi: 'CLASS_II',
3219
+ ClassIii: 'CLASS_III',
3220
+ NotClassified: 'NOT_CLASSIFIED',
3221
+ Unclassified: 'UNCLASSIFIED',
3222
+ Unspecified: 'UNSPECIFIED',
3223
+ } as const;
3224
+
3225
+ export type DeviceClass = (typeof deviceClass)[keyof typeof deviceClass];
3226
+ export const deviceEstablishmentRole = {
3227
+ ForeignExporter: 'FOREIGN_EXPORTER',
3228
+ ForeignManufacturer: 'FOREIGN_MANUFACTURER',
3229
+ UnitedStatesManufacturer: 'UNITED_STATES_MANUFACTURER',
3230
+ } as const;
3231
+
3232
+ export type DeviceEstablishmentRole =
3233
+ (typeof deviceEstablishmentRole)[keyof typeof deviceEstablishmentRole];
3234
+
3235
+ export const devicePremarketStatus = {
3236
+ Exempt: 'EXEMPT',
3237
+ RequiredPma: 'REQUIRED_PMA',
3238
+ Required_510K: 'REQUIRED_510K',
3239
+ Unspecified: 'UNSPECIFIED',
3240
+ } as const;
3241
+
3242
+ export type DevicePremarketStatus =
3243
+ (typeof devicePremarketStatus)[keyof typeof devicePremarketStatus];
3244
+
3166
3245
  export const dimensionalUnitCode = {
3167
3246
  Centimeter: 'CENTIMETER',
3168
3247
  Decimeter: 'DECIMETER',
@@ -3230,6 +3309,7 @@ export const documentReferenceType = {
3230
3309
  Product: 'PRODUCT',
3231
3310
  Shipment: 'SHIPMENT',
3232
3311
  Sku: 'SKU',
3312
+ TrackingNumber: 'TRACKING_NUMBER',
3233
3313
  } as const;
3234
3314
 
3235
3315
  export type DocumentReferenceType =
@@ -3277,6 +3357,14 @@ export const draftDetailEventTrigger = {
3277
3357
  export type DraftDetailEventTrigger =
3278
3358
  (typeof draftDetailEventTrigger)[keyof typeof draftDetailEventTrigger];
3279
3359
 
3360
+ export const drugListingType = {
3361
+ Finished: 'FINISHED',
3362
+ Unfinished: 'UNFINISHED',
3363
+ } as const;
3364
+
3365
+ export type DrugListingType =
3366
+ (typeof drugListingType)[keyof typeof drugListingType];
3367
+
3280
3368
  export const dutyTaxFeeConfiguration = {
3281
3369
  ExcludeAll: 'EXCLUDE_ALL',
3282
3370
  ExcludeDuty: 'EXCLUDE_DUTY',
@@ -4852,9 +4940,11 @@ export type LabelBrokerType =
4852
4940
  (typeof labelBrokerType)[keyof typeof labelBrokerType];
4853
4941
  export const labelCarrierCode = {
4854
4942
  Apc: 'APC',
4943
+ Asendia: 'ASENDIA',
4855
4944
  AustraliaPost: 'AUSTRALIA_POST',
4856
4945
  CanadaPost: 'CANADA_POST',
4857
4946
  Dhl: 'DHL',
4947
+ DhlEcommerce: 'DHL_ECOMMERCE',
4858
4948
  DirectLink: 'DIRECT_LINK',
4859
4949
  Ehub: 'EHUB',
4860
4950
  Envia: 'ENVIA',
@@ -4923,6 +5013,7 @@ export const labelDangerousGoodsCategory = {
4923
5013
  BiologicalSubstance: 'BIOLOGICAL_SUBSTANCE',
4924
5014
  ConsumerCommodity: 'CONSUMER_COMMODITY',
4925
5015
  ExceptedQuantity: 'EXCEPTED_QUANTITY',
5016
+ FullyRegulated: 'FULLY_REGULATED',
4926
5017
  LimitedQuantity: 'LIMITED_QUANTITY',
4927
5018
  MagnetizedMaterial: 'MAGNETIZED_MATERIAL',
4928
5019
  NotRestrictedA02: 'NOT_RESTRICTED_A02',
@@ -5541,6 +5632,43 @@ export const landedCostWeightUnit = {
5541
5632
  export type LandedCostWeightUnit =
5542
5633
  (typeof landedCostWeightUnit)[keyof typeof landedCostWeightUnit];
5543
5634
 
5635
+ export const laneRuleAccess = {
5636
+ Ddp: 'DDP',
5637
+ LcGuarantee: 'LC_GUARANTEE',
5638
+ PostalOperator: 'POSTAL_OPERATOR',
5639
+ PostalOperatorMerchant: 'POSTAL_OPERATOR_MERCHANT',
5640
+ } as const;
5641
+
5642
+ export type LaneRuleAccess =
5643
+ (typeof laneRuleAccess)[keyof typeof laneRuleAccess];
5644
+ export const laneRuleOperator = {
5645
+ Eq: 'EQ',
5646
+ Gt: 'GT',
5647
+ Gte: 'GTE',
5648
+ Lt: 'LT',
5649
+ Lte: 'LTE',
5650
+ Neq: 'NEQ',
5651
+ } as const;
5652
+
5653
+ export type LaneRuleOperator =
5654
+ (typeof laneRuleOperator)[keyof typeof laneRuleOperator];
5655
+ export const laneRuleSubject = {
5656
+ Cif: 'CIF',
5657
+ Cost: 'COST',
5658
+ Duty: 'DUTY',
5659
+ ItemsTotal: 'ITEMS_TOTAL',
5660
+ Tax: 'TAX',
5661
+ } as const;
5662
+
5663
+ export type LaneRuleSubject =
5664
+ (typeof laneRuleSubject)[keyof typeof laneRuleSubject];
5665
+ export const laneThresholdType = {
5666
+ Duty: 'DUTY',
5667
+ Tax: 'TAX',
5668
+ } as const;
5669
+
5670
+ export type LaneThresholdType =
5671
+ (typeof laneThresholdType)[keyof typeof laneThresholdType];
5544
5672
  export const languageCode = {
5545
5673
  Af: 'AF',
5546
5674
  Am: 'AM',
@@ -5753,6 +5881,7 @@ export const manifestSource = {
5753
5881
  Api: 'API',
5754
5882
  Ipc: 'IPC',
5755
5883
  Other: 'OTHER',
5884
+ PddpReconciliation: 'PDDP_RECONCILIATION',
5756
5885
  Post: 'POST',
5757
5886
  Upu: 'UPU',
5758
5887
  Usps: 'USPS',
@@ -5824,6 +5953,20 @@ export const manualClassificationStatus = {
5824
5953
  export type ManualClassificationStatus =
5825
5954
  (typeof manualClassificationStatus)[keyof typeof manualClassificationStatus];
5826
5955
 
5956
+ export const manualCredentialFieldRequirement = {
5957
+ Optional: 'OPTIONAL',
5958
+ Required: 'REQUIRED',
5959
+ } as const;
5960
+
5961
+ export type ManualCredentialFieldRequirement =
5962
+ (typeof manualCredentialFieldRequirement)[keyof typeof manualCredentialFieldRequirement];
5963
+ export const manualCredentialFieldType = {
5964
+ Password: 'PASSWORD',
5965
+ Text: 'TEXT',
5966
+ } as const;
5967
+
5968
+ export type ManualCredentialFieldType =
5969
+ (typeof manualCredentialFieldType)[keyof typeof manualCredentialFieldType];
5827
5970
  export const markDraftPendingAtMonthStartStatus = {
5828
5971
  Disabled: 'DISABLED',
5829
5972
  Enabled: 'ENABLED',
@@ -5991,9 +6134,9 @@ export type OrderMerchantOfRecordType =
5991
6134
  (typeof orderMerchantOfRecordType)[keyof typeof orderMerchantOfRecordType];
5992
6135
 
5993
6136
  export const orderModificationStatus = {
5994
- NoPaymentRequired: 'NO_PAYMENT_REQUIRED',
5995
- Paid: 'PAID',
5996
- PendingPayment: 'PENDING_PAYMENT',
6137
+ Committed: 'COMMITTED',
6138
+ Pending: 'PENDING',
6139
+ Voided: 'VOIDED',
5997
6140
  } as const;
5998
6141
 
5999
6142
  export type OrderModificationStatus =
@@ -6284,6 +6427,13 @@ export const packagingType = {
6284
6427
 
6285
6428
  export type PackagingType = (typeof packagingType)[keyof typeof packagingType];
6286
6429
 
6430
+ export const packingGroup = {
6431
+ I: 'I',
6432
+ Ii: 'II',
6433
+ Iii: 'III',
6434
+ } as const;
6435
+
6436
+ export type PackingGroup = (typeof packingGroup)[keyof typeof packingGroup];
6287
6437
  export const packingPreference = {
6288
6438
  AssignedBox: 'ASSIGNED_BOX',
6289
6439
  Consolidated: 'CONSOLIDATED',
@@ -6333,6 +6483,15 @@ export const partyType = {
6333
6483
 
6334
6484
  export type PartyType = (typeof partyType)[keyof typeof partyType];
6335
6485
 
6486
+ export const paymentAttributionSource = {
6487
+ InvoiceDetailReference: 'INVOICE_DETAIL_REFERENCE',
6488
+ InvoicePaymentMethod: 'INVOICE_PAYMENT_METHOD',
6489
+ OrderDetailReference: 'ORDER_DETAIL_REFERENCE',
6490
+ } as const;
6491
+
6492
+ export type PaymentAttributionSource =
6493
+ (typeof paymentAttributionSource)[keyof typeof paymentAttributionSource];
6494
+
6336
6495
  export const paymentInstrumentAccountHolderType = {
6337
6496
  Company: 'COMPANY',
6338
6497
  Individual: 'INDIVIDUAL',
@@ -6372,6 +6531,15 @@ export const paymentInstrumentVaultProvider = {
6372
6531
  export type PaymentInstrumentVaultProvider =
6373
6532
  (typeof paymentInstrumentVaultProvider)[keyof typeof paymentInstrumentVaultProvider];
6374
6533
 
6534
+ export const paymentMethodRemoveType = {
6535
+ Airwallex: 'AIRWALLEX',
6536
+ Stripe_1: 'STRIPE_1',
6537
+ Stripe_2: 'STRIPE_2',
6538
+ } as const;
6539
+
6540
+ export type PaymentMethodRemoveType =
6541
+ (typeof paymentMethodRemoveType)[keyof typeof paymentMethodRemoveType];
6542
+
6375
6543
  export const paymentNetworkTokenStatus = {
6376
6544
  Active: 'ACTIVE',
6377
6545
  Inactive: 'INACTIVE',
@@ -7115,6 +7283,14 @@ export const questionnaireInferState = {
7115
7283
 
7116
7284
  export type QuestionnaireInferState =
7117
7285
  (typeof questionnaireInferState)[keyof typeof questionnaireInferState];
7286
+ export const questionnaireReleaseImpact = {
7287
+ Compatible: 'COMPATIBLE',
7288
+ Reanswer: 'REANSWER',
7289
+ Reattest: 'REATTEST',
7290
+ } as const;
7291
+
7292
+ export type QuestionnaireReleaseImpact =
7293
+ (typeof questionnaireReleaseImpact)[keyof typeof questionnaireReleaseImpact];
7118
7294
 
7119
7295
  export const questionnaireStatus = {
7120
7296
  Active: 'ACTIVE',
@@ -7993,6 +8169,16 @@ export const stripeTrialEndBehavior = {
7993
8169
 
7994
8170
  export type StripeTrialEndBehavior =
7995
8171
  (typeof stripeTrialEndBehavior)[keyof typeof stripeTrialEndBehavior];
8172
+
8173
+ export const taxCalculationType = {
8174
+ Cif: 'CIF',
8175
+ Custom: 'CUSTOM',
8176
+ Fob: 'FOB',
8177
+ } as const;
8178
+
8179
+ export type TaxCalculationType =
8180
+ (typeof taxCalculationType)[keyof typeof taxCalculationType];
8181
+
7996
8182
  export const taxIdType = {
7997
8183
  Cnp: 'CNP',
7998
8184
  Cuil: 'CUIL',
@@ -9298,6 +9484,7 @@ export type CheckoutSessionCreateMutation = {
9298
9484
  taxes: Array<{ amount: number; currencyCode: CurrencyCode }>;
9299
9485
  } | null;
9300
9486
  metadata: Array<{ key: string; value: string } | null> | null;
9487
+ order: { id: string } | null;
9301
9488
  organizationId: string;
9302
9489
  paymentProcessor: CheckoutPaymentProcessorType | null;
9303
9490
  references: { inclusivePriceConfigurationId: string | null } | null;
@@ -9402,6 +9589,7 @@ export type CheckoutSessionPaymentIntentCreateMutation = {
9402
9589
  taxes: Array<{ amount: number; currencyCode: CurrencyCode }>;
9403
9590
  } | null;
9404
9591
  metadata: Array<{ key: string; value: string } | null> | null;
9592
+ order: { id: string } | null;
9405
9593
  organizationId: string;
9406
9594
  paymentProcessor: CheckoutPaymentProcessorType | null;
9407
9595
  references: { inclusivePriceConfigurationId: string | null } | null;
@@ -9668,6 +9856,8 @@ export type RenewCartExpirationTokenMutation = {
9668
9856
 
9669
9857
  export type GetCheckoutSessionQuery = {
9670
9858
  checkoutSession: {
9859
+ clientSecret: string;
9860
+ completedAt: string | null;
9671
9861
  customerProfile: { storeCreditBalance: number | null } | null;
9672
9862
  landedCost: {
9673
9863
  id: string;
@@ -10007,6 +10197,7 @@ export type CheckoutSessionDetailsFragment = {
10007
10197
  taxes: Array<{ amount: number; currencyCode: CurrencyCode }>;
10008
10198
  } | null;
10009
10199
  metadata: Array<{ key: string; value: string } | null> | null;
10200
+ order: { id: string } | null;
10010
10201
  organizationId: string;
10011
10202
  paymentProcessor: CheckoutPaymentProcessorType | null;
10012
10203
  references: { inclusivePriceConfigurationId: string | null } | null;
@@ -10110,6 +10301,7 @@ export type CheckoutSessionUpdateMutation = {
10110
10301
  taxes: Array<{ amount: number; currencyCode: CurrencyCode }>;
10111
10302
  } | null;
10112
10303
  metadata: Array<{ key: string; value: string } | null> | null;
10304
+ order: { id: string } | null;
10113
10305
  organizationId: string;
10114
10306
  paymentProcessor: CheckoutPaymentProcessorType | null;
10115
10307
  references: { inclusivePriceConfigurationId: string | null } | null;
@@ -1 +1 @@
1
- import{c as n}from"./p-595f5dd2.js";import{g as o,I as t}from"./p-e7b0c156.js";import{l as r}from"./p-0a377722.js";export{a as availableTestKeys}from"./p-0a377722.js";import{g as i,a as l,h as u,l as m}from"./p-41dd1cb8.js";import{g as p,_ as w,c as f,a as v}from"./p-b2d81c98.js";export{c as checkoutHiddenBtnSelector,a as checkoutHiddenInternationalBtnSelector,d as domesticRedirectedBtnSelector}from"./p-b2d81c98.js";export{c as countryRequireShortAddressCode}from"./p-1d42cd20.js";export{c as countryRequireTaxId,e as euCountryCodes,s as shipToTaxIdLabels}from"./p-bcf5cffb.js";const y=["jsdelivr","cdnjs","unpkg","vercel"],h="jsdelivr",O=e=>{const n=y.indexOf(e);return y[n+1]||null},S=()=>{const e=window&&window.location.href.includes("forceLoadCdn");if("undefined"==typeof window||e)return null;const n=(e=>{if(!e)return null;const n=new URL(e).searchParams.get("zonosQaUrl");return n?/[^a-zA-Z0-9-_]+/.test(n)?null:n:null})(window.location.href),o="https://v1.3.284.js.zonos.com";if(!n&&(o.includes("test.")||o.includes("test-")))return o;if(!n&&["dev.demo.elements.zonos.com","dev.checkout.elements.zonos.com","dev.storybook.elements.zonos.com"].includes(window.location.hostname))return"https://dev.elements.zonos.com";if(!n)return null;if("dev-elements"===n)return"https://dev.elements.zonos.com";const t=`https://${n}.preview.js.zonos.com`;return r(`[ZONOS-WARNING] using '${t}' for loading elements script`,"warn"),fetch(t).then((()=>{window.sessionStorage.removeItem("zonos--checkout-session-id"),window.sessionStorage.removeItem("zonos--client-secret")})).catch((()=>{alert(`[ZONOS-WARNING] '${t}' IS NO LONGER AVAILABLE. REMOVING zonosQaUrl PARAM AND RELOADING THE PAGE`);const e=new URLSearchParams(window.location.search);e.delete("zonosQaUrl");const{pathname:n}=window.location,o=`${n}?${e.toString()}`;return window.history.replaceState(window.history.state,"",o),window.location.reload(),null})),t},g="https://js.stripe.com/v3",j=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,z="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used";let b=null;const N=e=>(null!==b||(b=new Promise(((n,o)=>{if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe&&e&&console.warn(z),window.Stripe)n(window.Stripe);else try{let t=(()=>{const e=document.querySelectorAll(`script[src^="${g}"]`);for(let n=0;n<e.length;n++){const o=e[n];if(o&&j.test(o.src))return o}return null})();t&&e?console.warn(z):t||(t=(e=>{const n=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",o=document.createElement("script");o.src=`${g}${n}`;const t=document.head||document.body;return t?(t.appendChild(o),o):(m("Expected document.body not to be null. Stripe.js requires a <body> element."),null)})(e)),null==t||t.addEventListener("load",(()=>{window.Stripe?n(window.Stripe):o(new Error("Stripe.js not available"))})),null==t||t.addEventListener("error",(()=>{o(new Error("Failed to load Stripe.js"))}))}catch(e){return void o(e)}else n(null)}))),b),I=Promise.resolve().then((()=>(()=>{var e,n;return"undefined"!=typeof window&&("function"==typeof(null===(e=window.Zonos)||void 0===e?void 0:e.createCartId)||"function"==typeof(null===(n=window.Zonos)||void 0===n?void 0:n.buildCartDetail))})()?N(null):null));let k=!1;I.catch((e=>{k||console.warn(e)}));const R=async({cartId:e,retries:n})=>{const t=i(),s=o(),c=p()||void 0,d=new URLSearchParams;s.overrideShouldEnabledCustomAddress&&d.set("overrideShouldEnabledCustomAddress",s.overrideShouldEnabledCustomAddress);const{errors:l,json:a,zonosMode:m}=await u(`/api/zonos-elements/get-cart?${d.toString()}`,{body:{isTestMode:t,renewCartExpirationToken:c,tempCartUUID:e},headers:{"Content-Type":"application/json"},method:"POST"}),w=!a||l.length;return w&&n?(r("[ZONOS - loadZonos] temp cart not ready, retrying in 1 second","info",{retries:n}),await new Promise((e=>setTimeout(e,500))),R({cartId:e,retries:n-1})):w?null:Object.assign(Object.assign({},a),{zonosMode:m})};var T;const $=(()=>{if("undefined"==typeof document)return null;const e=document.querySelector('script[src*="/zonos.js"]'),{currentLoadScriptUrl:n,isWhiteListed:o}=(({loadScriptSrc:e})=>{if(!e)return{currentLoadScriptUrl:"",isForceLoadVersionDomain:!1,isWhiteListed:!1};const n=new URL(e).origin,o=["dev.elements.zonos.com","dev.assets-checkout.zonos.com",".js.zonos.com","zonos-elements-test-git","zonos-elements-git"].some((e=>n.includes(e))),t=["qa.js.zonos.com"].some((e=>n.includes(e)));return{currentLoadScriptUrl:n,isForceLoadVersionDomain:t,isWhiteListed:o}})({loadScriptSrc:null==e?void 0:e.src});return o?n:null})(),Z=Date.now(),A="https://v1.3.284.js.zonos.com",L=$||"https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.284",U="https://fonts.googleapis.com",C=/^https:\/\/fonts\.googleapis\.com/;class E{}T=E,E.doneInit=!1,E.cartSettings=null,E.debug="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosDebug=1/),E.zonosConversionTest="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosConversionTest/),E._paypalMockResponse=null,E.iframeLogType="undefined"!=typeof window?new URLSearchParams(window.location.search).get("iframeLogType"):null,E.isBigCommerce=!1,E.releaseDate="1787002350863",E.isLegacyCheckout=!1,E.googleAnalyticId=null,E.googleAnalyticReady=!1,E.facebookPixelId=null,E.facebookPixelReady=!1,E.startLoadTime=Z,E.domain="undefined"!=typeof window?window.location!=window.parent.location&&document.referrer||document.location.hostname:"",E.showBaseForeign="undefined"!=typeof window&&window.location.search.includes("zonosShowBaseForeign"),E.overrideUseCustomAddressForm=!1,E.isCollect=!1,E.isInvoice=!1,E.isNpm=!0,E.zonosQaUrl=null,E.zonosQaUrlApi=null,E.trackEventLogs=[],E.version="v1.3.284",E.modeAlerted=!1,E.cartData=null,E.paypal=null,E.zonosMode=null,E.IframeService=t,E.getCurrentTimestamp=()=>(new Date).getTime(),E.zonosController=null,E.loadTimeApiInfoList=[],E.logIntervalId=null,E.init=async e=>{const{appearance:n,checkoutSettings:o,currencyConverter:t,helloSettings:s,onCountryChange:c,overrideCurrencyFormat:d,storeId:a,zonosApiKey:p}=e;if(T.cartId=new URLSearchParams(window.location.search).get("tempCartUUID"),T.createCartId=null==o?void 0:o.createCartId,T.buildCartDetail=null==o?void 0:o.buildCartDetail,T.doneInit)return;if(r(`====== ZONOS DEBUG MODE: on (${T.version}) ======`),T.zonosApiKey=p,T.storeId=a,"undefined"!=typeof window&&window.parent===window&&(T.googleAnalyticReady=!0,T.facebookPixelReady=!0),T.isNpm){r("====== ZONOS LOADING FROM NPM ======");const n=S();if(n&&!window.isZonosPreview){r(`====== RE-INJECT "zonos.js" FROM PRVIEW: ${n} ======`,"info");const o=document.createElement("script");return o.src=`${n}/dist/scripts/zonos.js`,document.head.appendChild(o),o.addEventListener("load",(()=>{window.Zonos.isNpm=T.isNpm,window.Zonos.isBigCommerce=T.isBigCommerce,window.Zonos.isLegacyCheckout=T.isLegacyCheckout,window.Zonos.zonosMode=T.zonosMode,window.Zonos.init(e)})),o.addEventListener("error",(()=>{alert(`[ZONOS - loadZonos] Failed to load "loadZonos.js" from zonosQaUrl: ${n}`)})),void(window.isZonosPreview=!0)}if(!p&&!T.cartId)return void m("Zonos API key is required unless `tempCartUUID` is provided in url query params.");if(!T.cartData&&T.cartId){r("Initialize cart data");const e=await(async e=>{const{isDgsCartId:n,isLegacyCartId:o}=w(e);if(!o&&!n)return m("[ZONOS - loadZonos] invalid cart id"),null;const t=await R({cartId:e,retries:5});return r("[ZONOS - loadZonos] getting temp cart data","info",t),t?(window.Zonos.storeId=t.cartData.storeId,window.Zonos.zonosApiKey=t.cartData.credentialToken,window.Zonos.zonosMode=t.zonosMode,{cartData:t.cartData,settings:t.settings,storeFavicon:t.storeFaviconUrl,storeId:t.cartData.storeId,storeLogo:t.storeLogoUrl,zonosApiKey:t.cartData.credentialToken}):(m("[ZONOS - loadZonos] Error getting temp cart data, stop checkout process."),null)})(T.cartId);if(!e)return void m("Failed to get cart data");T.cartData=e.cartData,T.zonosApiKey=e.zonosApiKey,T.cartSettings=e.settings}const o=await(async()=>{const e=i(),n=l();if(!e&&!n||!window.Zonos.zonosApiKey)return null;if(r("[ZONOS - loadZonos] Attempt test public credential","info"),window.Zonos.zonosApiKey.includes("credential_test"))return r("[ZONOS - loadZonos] Test mode is enabled but the API key is already a test key","info"),null;const{errors:o,json:t}=await u("/api/get-test-public-credential");if(o.length||!t)return m("[ZONOS - loadZonos] Failed to get test public credential. Keep using production key",o),null;const s=t.publicCredential;return s?(r(`[ZONOS - loadZonos] Retrieve new test public token ${s}`,"info"),s):(m("[ZONOS - loadZonos] No test public key credential. Keep using production key"),null)})();o&&(T.zonosApiKey=o)}const v=new URL(window.location.href).searchParams.get("payment_intent_client_secret")||sessionStorage.getItem("zonos--client-secret");if(T.cartId&&T.cartData||v){r("Cart data or stripe client secret is available, inject hidden button and trigger checkout");const e=document.createElement("button");e.style.display="none",e.id=`${f}`,document.body.appendChild(e)}r("init zonos"),T.restoreNativeBrowserFunctions(),T.injectCustomScriptForHostedCheckout(),T.injectZonosCdn(),T.injectZonosCss(),T.injectFonts(),T.injectCheckoutInternationalButton(),T.injectController({config:{appearance:n,checkoutSettings:o,currencyConverter:t,helloSettings:s,onCountryChange:c,overrideCurrencyFormat:d}}),T.doneInit=!0},E.injectCheckoutInternationalButton=()=>{if(!document.querySelector(`#${v}`)){const e=document.createElement("button");e.id=v,e.style.display="none",document.body.appendChild(e)}},E.injectCustomScriptForHostedCheckout=()=>{const e=T.cartData,n=(null==e?void 0:e.metadata)||[],o=n.find((e=>"customHeaderScript"===e.key)),t=n.find((e=>"customFooterScript"===e.key));if(window.Zonos.isLegacyCheckout&&(o||t)){if(o){r("Injecting custom header script");const e=document.createElement("script");e.textContent=o.value,document.head.appendChild(e)}if(t){r("Injecting custom footer script");const e=document.createElement("script");e.textContent=t.value,document.body.appendChild(e)}}else r("Skip injecting custom script for hosted checkout","info",{footerScript:t,headerScript:o,isLegacyCheckout:window.Zonos.isLegacyCheckout})},E.displayCurrency=()=>{const e=document.querySelector("zonos-hello");e&&e.displayCurrency()},E.triggerCheckoutInternational=async()=>{const e=document.querySelector(`#${v}`);setTimeout((()=>{e&&e.dispatchEvent(n("click"))}),10)},E.openHelloDialog=e=>{const n=document.querySelector("zonos-hello");n&&n.openHelloDialog(null==e||e)},E.showNotification=e=>{var n;null===(n=T.zonosController)||void 0===n||n.showNotification(e)},E.updateOrganizationName=e=>{var n;null===(n=T.zonosController)||void 0===n||n.updateOrganizationName(e)},E.disablePlaceOrderButtons=({autoEnable:e=!0,config:n,disable:o,placeOrderButtonSelector:t})=>{var s;if(!(null===(s=n.checkoutSettings)||void 0===s?void 0:s.disablePlaceOrderButtonActivation)&&t){const n=document.querySelectorAll(t),s=e=>{e.target.getAttribute("disabled")&&(e.preventDefault(),e.stopPropagation())};n.forEach((e=>{e.getAttribute("data-zonos-checkout-attached")||(o?(e.setAttribute("disabled","true"),e.addEventListener("click",s)):(e.removeAttribute("disabled"),e.removeEventListener("click",s)))})),e&&o&&setTimeout((()=>{n.forEach((e=>{e.removeAttribute("disabled"),e.removeEventListener("click",s)}))}),5e3)}},E.restoreNativeBrowserFunctions=()=>{var e;if("1"===new URL(window.location.href).searchParams.get("useMerchantPolyfill"))return;const n="zonos---native-browser";let o=document.querySelector(`iframe#${n}`);o||(o=document.createElement("iframe"),o.id=n,o.style.display="none",o.style.opacity="0",o.style.position="absolute",o.style.top="-9999px",o.style.left="-9999px",o.style.width="1px",o.style.height="1px",o.style.border="none",o.style.overflow="hidden",o.style.visibility="hidden",document.body.appendChild(o));const t=(null===(e=o.contentWindow)||void 0===e?void 0:e.window.Array.from)||Array.from;Array.from=t,document.body.removeChild(o)},E.injectController=({config:e})=>{var n,o;if(document.querySelector("zonos-controller"))return;if(null===(n=e.checkoutSettings)||void 0===n?void 0:n.placeOrderButtonSelector){const n=e.checkoutSettings.placeOrderButtonSelector;T.disablePlaceOrderButtons({config:e,disable:!0,placeOrderButtonSelector:n}),new MutationObserver((()=>{T.disablePlaceOrderButtons({config:e,disable:!0,placeOrderButtonSelector:n})})).observe(document.body,{childList:!0,subtree:!0})}if(null===(o=e.checkoutSettings)||void 0===o?void 0:o.alwaysTriggerInternationalCheckoutSelector){const n=e.checkoutSettings.alwaysTriggerInternationalCheckoutSelector;T.disablePlaceOrderButtons({config:e,disable:!0,placeOrderButtonSelector:n}),new MutationObserver((()=>{T.disablePlaceOrderButtons({config:e,disable:!0,placeOrderButtonSelector:n})})).observe(document.body,{childList:!0,subtree:!0})}const t=document.createElement("zonos-controller");t.config=e,t.zonosApiKey=T.zonosApiKey||"",t.addEventListener("stripeInitEvent",(async e=>{const{detail:n}=e;r("loading Stripe");const o=await(async(...e)=>{var n;k=!0;const o=Date.now();return((e,n,o)=>{if(null===e)return null;const t=e.apply(void 0,n);return((e,n)=>{e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",startTime:n})})(t,o),t})(null!==(n=await I)&&void 0!==n?n:await N(null),e,o)})(n.publishableKey);o?(window.Zonos.stripe=o,window.Zonos.isCollect?t.initCollectElement(o):window.Zonos.isInvoice?t.initInvoiceElement(o):t.initCheckoutElement(o)):m("API seems to be invalid or missing. Failed to load Stripe")})),document.body.appendChild(t),T.zonosController=t,r("Zonos controller injected!")},E.injectScript=({cdnType:e,isModule:n,theRestUrl:o})=>{const t=`${T.getZonosUrl(e)}/${o}`;if(document.querySelector(`script[src="${t}"]`))return void r(`Zonos script "${t}" already exists in the document`,"warn");const s=document.head||document.body,i=document.createElement("script");n?i.type="module":i.noModule=!0,i.src=t,i.crossOrigin="anonymous",i.onerror=()=>{m(`Failed to load ${i.src}`);const t=O(e);t&&T.injectScript({cdnType:t,isModule:n,theRestUrl:o})},s.appendChild(i)},E.getZonosUrl=e=>{const n=()=>{switch(e){case"jsdelivr":return L;case"unpkg":return"https://unpkg.com/@zonos/elements@1.3.284";case"cdnjs":return"https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.284";case"vercel":return A}};return T.isNpm&&S()||n()},E.injectZonosCdn=()=>{T.injectScript({cdnType:h,isModule:!0,theRestUrl:"dist/zonos-elements/zonos-elements.esm.js"}),T.injectScript({cdnType:h,isModule:!1,theRestUrl:"dist/zonos-elements/zonos-elements.js"}),r("Zonos cdn script injected!")},E.injectStylesheet=({cdnType:e,theRestUrl:n})=>{const o=T.getZonosUrl(e),t=document.head||document.body,s=document.createElement("link");s.rel="preconnect",s.href=`${A}/`,t.appendChild(s);const r=document.createElement("link");r.rel="stylesheet",r.href=`${o}/${n}`,r.onerror=()=>{m(`Failed to load ${r.href}`);const o=O(e);o&&T.injectStylesheet({cdnType:o,theRestUrl:n})},t.appendChild(r)},E.injectZonosCss=()=>{document.querySelector('link[rel="stylesheet"][href*="/dist/zonos-elements/zonos-elements.css"]')?r("Zonos style links already injected","warn"):(T.injectStylesheet({cdnType:h,theRestUrl:"dist/zonos-elements/zonos-elements.css"}),r("Zonos style css injected!"))},E.injectFonts=()=>{if((()=>{if(document.fonts.check("1em Inter"))return void r("Inter font already loaded","warn");const e=document.querySelectorAll(`link[rel="stylesheet"][href^="${U}"]`);for(let n=0;n<e.length;n++){const o=e[n];if(o&&!C.test(o.href))return o}return null})())return void r("Inter font already injected","warn");const e=document.head||document.body,n=document.createElement("link");n.rel="preconnect",n.href=U,e.appendChild(n);const o=document.createElement("link");o.rel="stylesheet",o.href=`${U}/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap`,e.appendChild(o),r("Zonos font injected!")},E.setupGoogleFont=e=>{var n;null===(n=T.zonosController)||void 0===n||n.setupGoogleFont(e)},E.injectSupportGoogleFont=e=>{var n;r(`[FONT] injecting ${e}`);const o=null===(n=e.match(/family=(.*?):/))||void 0===n?void 0:n[1],t=document.head||document.body;if(!document.querySelector(`link[rel="preconnect"][href^="${U}"]`)){const e=document.createElement("link");e.rel="preconnect",e.href=U,t.appendChild(e)}if(document.querySelector(`link[rel="stylesheet"][href="${e}"]`))return void r(`[FONT] ${o} font already injected`,"warn");const s=document.createElement("link");s.rel="stylesheet",s.href=e,t.appendChild(s),r(`[FONT] ${o} font injected!`)};const P=["ZONOS_FORM_TYPE_USING","APP_VERSION","APP_VERSION_NPM_INTEGRATION","LEGACY_CHECKOUT_FACADE"],F=["ORDER_DUPLICATION_CONSENT","WITH_ABANDONED_CART_TOKEN"],D=[...P,...F];export{E as Zonos,D as checkoutSessionAttributeKeys,F as checkoutSessionImmutableAttributeKeys,P as checkoutSessionMutableAttributeKeys}
1
+ import{c as n}from"./p-595f5dd2.js";import{g as o,I as t}from"./p-e7b0c156.js";import{l as r}from"./p-0a377722.js";export{a as availableTestKeys}from"./p-0a377722.js";import{g as i,a as l,h as u,l as m}from"./p-41dd1cb8.js";import{g as p,_ as w,c as f,a as v}from"./p-b2d81c98.js";export{c as checkoutHiddenBtnSelector,a as checkoutHiddenInternationalBtnSelector,d as domesticRedirectedBtnSelector}from"./p-b2d81c98.js";export{c as countryRequireShortAddressCode}from"./p-1d42cd20.js";export{c as countryRequireTaxId,e as euCountryCodes,s as shipToTaxIdLabels}from"./p-bcf5cffb.js";const y=["jsdelivr","cdnjs","unpkg","vercel"],h="jsdelivr",O=e=>{const n=y.indexOf(e);return y[n+1]||null},S=()=>{const e=window&&window.location.href.includes("forceLoadCdn");if("undefined"==typeof window||e)return null;const n=(e=>{if(!e)return null;const n=new URL(e).searchParams.get("zonosQaUrl");return n?/[^a-zA-Z0-9-_]+/.test(n)?null:n:null})(window.location.href),o="https://v1.3.286.js.zonos.com";if(!n&&(o.includes("test.")||o.includes("test-")))return o;if(!n&&["dev.demo.elements.zonos.com","dev.checkout.elements.zonos.com","dev.storybook.elements.zonos.com"].includes(window.location.hostname))return"https://dev.elements.zonos.com";if(!n)return null;if("dev-elements"===n)return"https://dev.elements.zonos.com";const t=`https://${n}.preview.js.zonos.com`;return r(`[ZONOS-WARNING] using '${t}' for loading elements script`,"warn"),fetch(t).then((()=>{window.sessionStorage.removeItem("zonos--checkout-session-id"),window.sessionStorage.removeItem("zonos--client-secret")})).catch((()=>{alert(`[ZONOS-WARNING] '${t}' IS NO LONGER AVAILABLE. REMOVING zonosQaUrl PARAM AND RELOADING THE PAGE`);const e=new URLSearchParams(window.location.search);e.delete("zonosQaUrl");const{pathname:n}=window.location,o=`${n}?${e.toString()}`;return window.history.replaceState(window.history.state,"",o),window.location.reload(),null})),t},g="https://js.stripe.com/v3",j=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,z="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used";let b=null;const N=e=>(null!==b||(b=new Promise(((n,o)=>{if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe&&e&&console.warn(z),window.Stripe)n(window.Stripe);else try{let t=(()=>{const e=document.querySelectorAll(`script[src^="${g}"]`);for(let n=0;n<e.length;n++){const o=e[n];if(o&&j.test(o.src))return o}return null})();t&&e?console.warn(z):t||(t=(e=>{const n=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",o=document.createElement("script");o.src=`${g}${n}`;const t=document.head||document.body;return t?(t.appendChild(o),o):(m("Expected document.body not to be null. Stripe.js requires a <body> element."),null)})(e)),null==t||t.addEventListener("load",(()=>{window.Stripe?n(window.Stripe):o(new Error("Stripe.js not available"))})),null==t||t.addEventListener("error",(()=>{o(new Error("Failed to load Stripe.js"))}))}catch(e){return void o(e)}else n(null)}))),b),I=Promise.resolve().then((()=>(()=>{var e,n;return"undefined"!=typeof window&&("function"==typeof(null===(e=window.Zonos)||void 0===e?void 0:e.createCartId)||"function"==typeof(null===(n=window.Zonos)||void 0===n?void 0:n.buildCartDetail))})()?N(null):null));let k=!1;I.catch((e=>{k||console.warn(e)}));const R=async({cartId:e,retries:n})=>{const t=i(),s=o(),c=p()||void 0,d=new URLSearchParams;s.overrideShouldEnabledCustomAddress&&d.set("overrideShouldEnabledCustomAddress",s.overrideShouldEnabledCustomAddress);const{errors:l,json:a,zonosMode:m}=await u(`/api/zonos-elements/get-cart?${d.toString()}`,{body:{isTestMode:t,renewCartExpirationToken:c,tempCartUUID:e},headers:{"Content-Type":"application/json"},method:"POST"}),w=!a||l.length;return w&&n?(r("[ZONOS - loadZonos] temp cart not ready, retrying in 1 second","info",{retries:n}),await new Promise((e=>setTimeout(e,500))),R({cartId:e,retries:n-1})):w?null:Object.assign(Object.assign({},a),{zonosMode:m})};var T;const $=(()=>{if("undefined"==typeof document)return null;const e=document.querySelector('script[src*="/zonos.js"]'),{currentLoadScriptUrl:n,isWhiteListed:o}=(({loadScriptSrc:e})=>{if(!e)return{currentLoadScriptUrl:"",isForceLoadVersionDomain:!1,isWhiteListed:!1};const n=new URL(e).origin,o=["dev.elements.zonos.com","dev.assets-checkout.zonos.com",".js.zonos.com","zonos-elements-test-git","zonos-elements-git"].some((e=>n.includes(e))),t=["qa.js.zonos.com"].some((e=>n.includes(e)));return{currentLoadScriptUrl:n,isForceLoadVersionDomain:t,isWhiteListed:o}})({loadScriptSrc:null==e?void 0:e.src});return o?n:null})(),Z=Date.now(),A="https://v1.3.286.js.zonos.com",L=$||"https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.286",U="https://fonts.googleapis.com",C=/^https:\/\/fonts\.googleapis\.com/;class E{}T=E,E.doneInit=!1,E.cartSettings=null,E.debug="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosDebug=1/),E.zonosConversionTest="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosConversionTest/),E._paypalMockResponse=null,E.iframeLogType="undefined"!=typeof window?new URLSearchParams(window.location.search).get("iframeLogType"):null,E.isBigCommerce=!1,E.releaseDate="1788207564864",E.isLegacyCheckout=!1,E.googleAnalyticId=null,E.googleAnalyticReady=!1,E.facebookPixelId=null,E.facebookPixelReady=!1,E.startLoadTime=Z,E.domain="undefined"!=typeof window?window.location!=window.parent.location&&document.referrer||document.location.hostname:"",E.showBaseForeign="undefined"!=typeof window&&window.location.search.includes("zonosShowBaseForeign"),E.overrideUseCustomAddressForm=!1,E.isCollect=!1,E.isInvoice=!1,E.isNpm=!0,E.zonosQaUrl=null,E.zonosQaUrlApi=null,E.trackEventLogs=[],E.version="v1.3.286",E.modeAlerted=!1,E.cartData=null,E.paypal=null,E.zonosMode=null,E.IframeService=t,E.getCurrentTimestamp=()=>(new Date).getTime(),E.zonosController=null,E.loadTimeApiInfoList=[],E.logIntervalId=null,E.init=async e=>{const{appearance:n,checkoutSettings:o,currencyConverter:t,helloSettings:s,onCountryChange:c,overrideCurrencyFormat:d,storeId:a,zonosApiKey:p}=e;if(T.cartId=new URLSearchParams(window.location.search).get("tempCartUUID"),T.createCartId=null==o?void 0:o.createCartId,T.buildCartDetail=null==o?void 0:o.buildCartDetail,T.doneInit)return;if(r(`====== ZONOS DEBUG MODE: on (${T.version}) ======`),T.zonosApiKey=p,T.storeId=a,"undefined"!=typeof window&&window.parent===window&&(T.googleAnalyticReady=!0,T.facebookPixelReady=!0),T.isNpm){r("====== ZONOS LOADING FROM NPM ======");const n=S();if(n&&!window.isZonosPreview){r(`====== RE-INJECT "zonos.js" FROM PRVIEW: ${n} ======`,"info");const o=document.createElement("script");return o.src=`${n}/dist/scripts/zonos.js`,document.head.appendChild(o),o.addEventListener("load",(()=>{window.Zonos.isNpm=T.isNpm,window.Zonos.isBigCommerce=T.isBigCommerce,window.Zonos.isLegacyCheckout=T.isLegacyCheckout,window.Zonos.zonosMode=T.zonosMode,window.Zonos.init(e)})),o.addEventListener("error",(()=>{alert(`[ZONOS - loadZonos] Failed to load "loadZonos.js" from zonosQaUrl: ${n}`)})),void(window.isZonosPreview=!0)}if(!p&&!T.cartId)return void m("Zonos API key is required unless `tempCartUUID` is provided in url query params.");if(!T.cartData&&T.cartId){r("Initialize cart data");const e=await(async e=>{const{isDgsCartId:n,isLegacyCartId:o}=w(e);if(!o&&!n)return m("[ZONOS - loadZonos] invalid cart id"),null;const t=await R({cartId:e,retries:5});return r("[ZONOS - loadZonos] getting temp cart data","info",t),t?(window.Zonos.storeId=t.cartData.storeId,window.Zonos.zonosApiKey=t.cartData.credentialToken,window.Zonos.zonosMode=t.zonosMode,{cartData:t.cartData,settings:t.settings,storeFavicon:t.storeFaviconUrl,storeId:t.cartData.storeId,storeLogo:t.storeLogoUrl,zonosApiKey:t.cartData.credentialToken}):(m("[ZONOS - loadZonos] Error getting temp cart data, stop checkout process."),null)})(T.cartId);if(!e)return void m("Failed to get cart data");T.cartData=e.cartData,T.zonosApiKey=e.zonosApiKey,T.cartSettings=e.settings}const o=await(async()=>{const e=i(),n=l();if(!e&&!n||!window.Zonos.zonosApiKey)return null;if(r("[ZONOS - loadZonos] Attempt test public credential","info"),window.Zonos.zonosApiKey.includes("credential_test"))return r("[ZONOS - loadZonos] Test mode is enabled but the API key is already a test key","info"),null;const{errors:o,json:t}=await u("/api/get-test-public-credential");if(o.length||!t)return m("[ZONOS - loadZonos] Failed to get test public credential. Keep using production key",o),null;const s=t.publicCredential;return s?(r(`[ZONOS - loadZonos] Retrieve new test public token ${s}`,"info"),s):(m("[ZONOS - loadZonos] No test public key credential. Keep using production key"),null)})();o&&(T.zonosApiKey=o)}const v=new URL(window.location.href).searchParams.get("payment_intent_client_secret")||sessionStorage.getItem("zonos--client-secret");if(T.cartId&&T.cartData||v){r("Cart data or stripe client secret is available, inject hidden button and trigger checkout");const e=document.createElement("button");e.style.display="none",e.id=`${f}`,document.body.appendChild(e)}r("init zonos"),T.restoreNativeBrowserFunctions(),T.injectCustomScriptForHostedCheckout(),T.injectZonosCdn(),T.injectZonosCss(),T.injectFonts(),T.injectCheckoutInternationalButton(),T.injectController({config:{appearance:n,checkoutSettings:o,currencyConverter:t,helloSettings:s,onCountryChange:c,overrideCurrencyFormat:d}}),T.doneInit=!0},E.injectCheckoutInternationalButton=()=>{if(!document.querySelector(`#${v}`)){const e=document.createElement("button");e.id=v,e.style.display="none",document.body.appendChild(e)}},E.injectCustomScriptForHostedCheckout=()=>{const e=T.cartData,n=(null==e?void 0:e.metadata)||[],o=n.find((e=>"customHeaderScript"===e.key)),t=n.find((e=>"customFooterScript"===e.key));if(window.Zonos.isLegacyCheckout&&(o||t)){if(o){r("Injecting custom header script");const e=document.createElement("script");e.textContent=o.value,document.head.appendChild(e)}if(t){r("Injecting custom footer script");const e=document.createElement("script");e.textContent=t.value,document.body.appendChild(e)}}else r("Skip injecting custom script for hosted checkout","info",{footerScript:t,headerScript:o,isLegacyCheckout:window.Zonos.isLegacyCheckout})},E.displayCurrency=()=>{const e=document.querySelector("zonos-hello");e&&e.displayCurrency()},E.triggerCheckoutInternational=async()=>{const e=document.querySelector(`#${v}`);setTimeout((()=>{e&&e.dispatchEvent(n("click"))}),10)},E.openHelloDialog=e=>{const n=document.querySelector("zonos-hello");n&&n.openHelloDialog(null==e||e)},E.showNotification=e=>{var n;null===(n=T.zonosController)||void 0===n||n.showNotification(e)},E.updateOrganizationName=e=>{var n;null===(n=T.zonosController)||void 0===n||n.updateOrganizationName(e)},E.disablePlaceOrderButtons=({autoEnable:e=!0,config:n,disable:o,placeOrderButtonSelector:t})=>{var s;if(!(null===(s=n.checkoutSettings)||void 0===s?void 0:s.disablePlaceOrderButtonActivation)&&t){const n=document.querySelectorAll(t),s=e=>{e.target.getAttribute("disabled")&&(e.preventDefault(),e.stopPropagation())};n.forEach((e=>{e.getAttribute("data-zonos-checkout-attached")||(o?(e.setAttribute("disabled","true"),e.addEventListener("click",s)):(e.removeAttribute("disabled"),e.removeEventListener("click",s)))})),e&&o&&setTimeout((()=>{n.forEach((e=>{e.removeAttribute("disabled"),e.removeEventListener("click",s)}))}),5e3)}},E.restoreNativeBrowserFunctions=()=>{var e;if("1"===new URL(window.location.href).searchParams.get("useMerchantPolyfill"))return;const n="zonos---native-browser";let o=document.querySelector(`iframe#${n}`);o||(o=document.createElement("iframe"),o.id=n,o.style.display="none",o.style.opacity="0",o.style.position="absolute",o.style.top="-9999px",o.style.left="-9999px",o.style.width="1px",o.style.height="1px",o.style.border="none",o.style.overflow="hidden",o.style.visibility="hidden",document.body.appendChild(o));const t=(null===(e=o.contentWindow)||void 0===e?void 0:e.window.Array.from)||Array.from;Array.from=t,document.body.removeChild(o)},E.injectController=({config:e})=>{var n,o;if(document.querySelector("zonos-controller"))return;if(null===(n=e.checkoutSettings)||void 0===n?void 0:n.placeOrderButtonSelector){const n=e.checkoutSettings.placeOrderButtonSelector;T.disablePlaceOrderButtons({config:e,disable:!0,placeOrderButtonSelector:n}),new MutationObserver((()=>{T.disablePlaceOrderButtons({config:e,disable:!0,placeOrderButtonSelector:n})})).observe(document.body,{childList:!0,subtree:!0})}if(null===(o=e.checkoutSettings)||void 0===o?void 0:o.alwaysTriggerInternationalCheckoutSelector){const n=e.checkoutSettings.alwaysTriggerInternationalCheckoutSelector;T.disablePlaceOrderButtons({config:e,disable:!0,placeOrderButtonSelector:n}),new MutationObserver((()=>{T.disablePlaceOrderButtons({config:e,disable:!0,placeOrderButtonSelector:n})})).observe(document.body,{childList:!0,subtree:!0})}const t=document.createElement("zonos-controller");t.config=e,t.zonosApiKey=T.zonosApiKey||"",t.addEventListener("stripeInitEvent",(async e=>{const{detail:n}=e;r("loading Stripe");const o=await(async(...e)=>{var n;k=!0;const o=Date.now();return((e,n,o)=>{if(null===e)return null;const t=e.apply(void 0,n);return((e,n)=>{e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",startTime:n})})(t,o),t})(null!==(n=await I)&&void 0!==n?n:await N(null),e,o)})(n.publishableKey);o?(window.Zonos.stripe=o,window.Zonos.isCollect?t.initCollectElement(o):window.Zonos.isInvoice?t.initInvoiceElement(o):t.initCheckoutElement(o)):m("API seems to be invalid or missing. Failed to load Stripe")})),document.body.appendChild(t),T.zonosController=t,r("Zonos controller injected!")},E.injectScript=({cdnType:e,isModule:n,theRestUrl:o})=>{const t=`${T.getZonosUrl(e)}/${o}`;if(document.querySelector(`script[src="${t}"]`))return void r(`Zonos script "${t}" already exists in the document`,"warn");const s=document.head||document.body,i=document.createElement("script");n?i.type="module":i.noModule=!0,i.src=t,i.crossOrigin="anonymous",i.onerror=()=>{m(`Failed to load ${i.src}`);const t=O(e);t&&T.injectScript({cdnType:t,isModule:n,theRestUrl:o})},s.appendChild(i)},E.getZonosUrl=e=>{const n=()=>{switch(e){case"jsdelivr":return L;case"unpkg":return"https://unpkg.com/@zonos/elements@1.3.286";case"cdnjs":return"https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.286";case"vercel":return A}};return T.isNpm&&S()||n()},E.injectZonosCdn=()=>{T.injectScript({cdnType:h,isModule:!0,theRestUrl:"dist/zonos-elements/zonos-elements.esm.js"}),T.injectScript({cdnType:h,isModule:!1,theRestUrl:"dist/zonos-elements/zonos-elements.js"}),r("Zonos cdn script injected!")},E.injectStylesheet=({cdnType:e,theRestUrl:n})=>{const o=T.getZonosUrl(e),t=document.head||document.body,s=document.createElement("link");s.rel="preconnect",s.href=`${A}/`,t.appendChild(s);const r=document.createElement("link");r.rel="stylesheet",r.href=`${o}/${n}`,r.onerror=()=>{m(`Failed to load ${r.href}`);const o=O(e);o&&T.injectStylesheet({cdnType:o,theRestUrl:n})},t.appendChild(r)},E.injectZonosCss=()=>{document.querySelector('link[rel="stylesheet"][href*="/dist/zonos-elements/zonos-elements.css"]')?r("Zonos style links already injected","warn"):(T.injectStylesheet({cdnType:h,theRestUrl:"dist/zonos-elements/zonos-elements.css"}),r("Zonos style css injected!"))},E.injectFonts=()=>{if((()=>{if(document.fonts.check("1em Inter"))return void r("Inter font already loaded","warn");const e=document.querySelectorAll(`link[rel="stylesheet"][href^="${U}"]`);for(let n=0;n<e.length;n++){const o=e[n];if(o&&!C.test(o.href))return o}return null})())return void r("Inter font already injected","warn");const e=document.head||document.body,n=document.createElement("link");n.rel="preconnect",n.href=U,e.appendChild(n);const o=document.createElement("link");o.rel="stylesheet",o.href=`${U}/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap`,e.appendChild(o),r("Zonos font injected!")},E.setupGoogleFont=e=>{var n;null===(n=T.zonosController)||void 0===n||n.setupGoogleFont(e)},E.injectSupportGoogleFont=e=>{var n;r(`[FONT] injecting ${e}`);const o=null===(n=e.match(/family=(.*?):/))||void 0===n?void 0:n[1],t=document.head||document.body;if(!document.querySelector(`link[rel="preconnect"][href^="${U}"]`)){const e=document.createElement("link");e.rel="preconnect",e.href=U,t.appendChild(e)}if(document.querySelector(`link[rel="stylesheet"][href="${e}"]`))return void r(`[FONT] ${o} font already injected`,"warn");const s=document.createElement("link");s.rel="stylesheet",s.href=e,t.appendChild(s),r(`[FONT] ${o} font injected!`)};const P=["ZONOS_FORM_TYPE_USING","APP_VERSION","APP_VERSION_NPM_INTEGRATION","LEGACY_CHECKOUT_FACADE"],F=["ORDER_DUPLICATION_CONSENT","WITH_ABANDONED_CART_TOKEN"],D=[...P,...F];export{E as Zonos,D as checkoutSessionAttributeKeys,F as checkoutSessionImmutableAttributeKeys,P as checkoutSessionMutableAttributeKeys}