@zonos/elements 1.3.128 → 1.3.130

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 (235) hide show
  1. package/dist/cjs/{CheckoutConfig-8e3cdcb3.js → CheckoutConfig-1d38a21d.js} +3 -1
  2. package/dist/cjs/{cart-3bdaf092.js → cart-d5240ba9.js} +214 -8
  3. package/dist/cjs/{getBorderRadius-61ed5601.js → getBorderRadius-f72d8edf.js} +1 -1
  4. package/dist/cjs/{handleFetch-fa0ce321.js → handleFetch-a8dfb07c.js} +1 -1
  5. package/dist/cjs/index.cjs.js +15 -9
  6. package/dist/cjs/{isDarkColor-d206c6fa.js → isDarkColor-dd6d723b.js} +1 -1
  7. package/dist/cjs/loader.cjs.js +1 -1
  8. package/dist/cjs/{paypal-2f48ab8d.js → paypal-78db30b7.js} +4 -4
  9. package/dist/cjs/zonos-address_7.cjs.entry.js +5 -5
  10. package/dist/cjs/zonos-badge.cjs.entry.js +1 -1
  11. package/dist/cjs/zonos-banner.cjs.entry.js +1 -1
  12. package/dist/cjs/zonos-button_3.cjs.entry.js +3 -3
  13. package/dist/cjs/zonos-card.cjs.entry.js +2 -2
  14. package/dist/cjs/zonos-cart-items_13.cjs.entry.js +9 -12
  15. package/dist/cjs/zonos-checkout.cjs.entry.js +86 -12
  16. package/dist/cjs/zonos-collapse.cjs.entry.js +1 -1
  17. package/dist/cjs/zonos-controller.cjs.entry.js +5 -5
  18. package/dist/cjs/zonos-country-flag.cjs.entry.js +5 -5
  19. package/dist/cjs/zonos-country-select_4.cjs.entry.js +5 -5
  20. package/dist/cjs/zonos-elements.cjs.js +1 -1
  21. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +5 -5
  22. package/dist/cjs/zonos-hello.cjs.entry.js +5 -5
  23. package/dist/cjs/zonos-input.cjs.entry.js +2 -2
  24. package/dist/cjs/zonos-language-select_2.cjs.entry.js +5 -5
  25. package/dist/cjs/zonos-logo.cjs.entry.js +1 -1
  26. package/dist/cjs/zonos-notification_3.cjs.entry.js +6 -6
  27. package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +2 -2
  28. package/dist/cjs/zonos-text.cjs.entry.js +1 -1
  29. package/dist/cjs/zonos-toggle.cjs.entry.js +1 -1
  30. package/dist/cjs/zonos-v-stack.cjs.entry.js +1 -1
  31. package/dist/cjs/{zonosStore-e12d459c.js → zonosStore-293bb3ba.js} +1 -0
  32. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +3 -6
  33. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +80 -4
  34. package/dist/collection/components/store/checkout/stripe.js +17 -2
  35. package/dist/collection/components/store/translationStore/strings.arabic.js +9 -0
  36. package/dist/collection/components/store/translationStore/strings.base.js +9 -0
  37. package/dist/collection/components/store/translationStore/strings.chinese.js +9 -0
  38. package/dist/collection/components/store/translationStore/strings.danish.js +9 -0
  39. package/dist/collection/components/store/translationStore/strings.dutch.js +9 -0
  40. package/dist/collection/components/store/translationStore/strings.french.js +9 -0
  41. package/dist/collection/components/store/translationStore/strings.german.js +9 -0
  42. package/dist/collection/components/store/translationStore/strings.hebrew.js +9 -0
  43. package/dist/collection/components/store/translationStore/strings.indonesian.js +9 -0
  44. package/dist/collection/components/store/translationStore/strings.italian.js +9 -0
  45. package/dist/collection/components/store/translationStore/strings.japanese.js +9 -0
  46. package/dist/collection/components/store/translationStore/strings.korean.js +9 -0
  47. package/dist/collection/components/store/translationStore/strings.norwegian.js +9 -0
  48. package/dist/collection/components/store/translationStore/strings.polish.js +9 -0
  49. package/dist/collection/components/store/translationStore/strings.portuguese.js +9 -0
  50. package/dist/collection/components/store/translationStore/strings.russian.js +9 -0
  51. package/dist/collection/components/store/translationStore/strings.spanish.js +9 -0
  52. package/dist/collection/components/store/translationStore/strings.swedish.js +9 -0
  53. package/dist/collection/components/store/translationStore/strings.turkish.js +9 -0
  54. package/dist/collection/components/store/translationStore/strings.vietnamese.js +9 -0
  55. package/dist/collection/components/store/zonosStore.js +1 -0
  56. package/dist/collection/components/utils/api/prepCalculateLandedCost.js +13 -2
  57. package/dist/collection/components/utils/checkout/watchBigcommerceDomesticCheckout.js +0 -1
  58. package/dist/collection/components/utils/logging/sendErrorLog.js +1 -1
  59. package/dist/collection/scripts/_zonosBase.js +6 -0
  60. package/dist/collection/scripts/cart/_setupCartData.js +2 -0
  61. package/dist/collection/types/generated/graphql.frontend.types.js +5 -0
  62. package/dist/collection/types/generated/graphql.internal.types.js +39 -0
  63. package/dist/esm/{CheckoutConfig-101b97e6.js → CheckoutConfig-56c63bdf.js} +3 -1
  64. package/dist/esm/{cart-519f08e3.js → cart-4f1ee6dd.js} +214 -8
  65. package/dist/esm/{getBorderRadius-008516a4.js → getBorderRadius-bdd709e7.js} +1 -1
  66. package/dist/esm/{handleFetch-da1a9c5d.js → handleFetch-40fc3562.js} +1 -1
  67. package/dist/esm/index.js +16 -10
  68. package/dist/esm/{isDarkColor-dc08fa26.js → isDarkColor-c6924924.js} +1 -1
  69. package/dist/esm/loader.js +1 -1
  70. package/dist/esm/{paypal-d0a05eda.js → paypal-5b1964b6.js} +4 -4
  71. package/dist/esm/zonos-address_7.entry.js +5 -5
  72. package/dist/esm/zonos-badge.entry.js +1 -1
  73. package/dist/esm/zonos-banner.entry.js +1 -1
  74. package/dist/esm/zonos-button_3.entry.js +3 -3
  75. package/dist/esm/zonos-card.entry.js +2 -2
  76. package/dist/esm/zonos-cart-items_13.entry.js +9 -12
  77. package/dist/esm/zonos-checkout.entry.js +87 -13
  78. package/dist/esm/zonos-collapse.entry.js +1 -1
  79. package/dist/esm/zonos-controller.entry.js +5 -5
  80. package/dist/esm/zonos-country-flag.entry.js +5 -5
  81. package/dist/esm/zonos-country-select_4.entry.js +5 -5
  82. package/dist/esm/zonos-elements.js +1 -1
  83. package/dist/esm/zonos-hello-dialog.entry.js +5 -5
  84. package/dist/esm/zonos-hello.entry.js +5 -5
  85. package/dist/esm/zonos-input.entry.js +2 -2
  86. package/dist/esm/zonos-language-select_2.entry.js +5 -5
  87. package/dist/esm/zonos-logo.entry.js +1 -1
  88. package/dist/esm/zonos-notification_3.entry.js +6 -6
  89. package/dist/esm/zonos-shipping-rich-radio.entry.js +2 -2
  90. package/dist/esm/zonos-text.entry.js +1 -1
  91. package/dist/esm/zonos-toggle.entry.js +1 -1
  92. package/dist/esm/zonos-v-stack.entry.js +1 -1
  93. package/dist/esm/{zonosStore-6b5bd87c.js → zonosStore-c493c4fe.js} +1 -0
  94. package/dist/esm-es5/{CheckoutConfig-101b97e6.js → CheckoutConfig-56c63bdf.js} +1 -1
  95. package/dist/esm-es5/cart-4f1ee6dd.js +1 -0
  96. package/dist/esm-es5/{getBorderRadius-008516a4.js → getBorderRadius-bdd709e7.js} +1 -1
  97. package/dist/esm-es5/handleFetch-40fc3562.js +1 -0
  98. package/dist/esm-es5/index.js +1 -1
  99. package/dist/esm-es5/{isDarkColor-dc08fa26.js → isDarkColor-c6924924.js} +1 -1
  100. package/dist/esm-es5/loader.js +1 -1
  101. package/dist/esm-es5/{paypal-d0a05eda.js → paypal-5b1964b6.js} +1 -1
  102. package/dist/esm-es5/zonos-address_7.entry.js +1 -1
  103. package/dist/esm-es5/zonos-badge.entry.js +1 -1
  104. package/dist/esm-es5/zonos-banner.entry.js +1 -1
  105. package/dist/esm-es5/zonos-button_3.entry.js +1 -1
  106. package/dist/esm-es5/zonos-card.entry.js +1 -1
  107. package/dist/esm-es5/zonos-cart-items_13.entry.js +1 -1
  108. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  109. package/dist/esm-es5/zonos-collapse.entry.js +1 -1
  110. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  111. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  112. package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
  113. package/dist/esm-es5/zonos-elements.js +1 -1
  114. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  115. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  116. package/dist/esm-es5/zonos-input.entry.js +1 -1
  117. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  118. package/dist/esm-es5/zonos-logo.entry.js +1 -1
  119. package/dist/esm-es5/zonos-notification_3.entry.js +1 -1
  120. package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
  121. package/dist/esm-es5/zonos-text.entry.js +1 -1
  122. package/dist/esm-es5/zonos-toggle.entry.js +1 -1
  123. package/dist/esm-es5/zonos-v-stack.entry.js +1 -1
  124. package/dist/esm-es5/{zonosStore-6b5bd87c.js → zonosStore-c493c4fe.js} +1 -1
  125. package/dist/scripts/index.d.ts +13 -0
  126. package/dist/scripts/index.js +1 -1
  127. package/dist/scripts/loadZonos.js +1 -1
  128. package/dist/scripts/zonos.js +1 -1
  129. package/dist/types/components/checkout/zonos-checkout/zonos-checkout.d.ts +9 -0
  130. package/dist/types/components/store/checkout/stripe.d.ts +1 -0
  131. package/dist/types/components/store/translationStore/strings.arabic.d.ts +9 -0
  132. package/dist/types/components/store/translationStore/strings.base.d.ts +9 -0
  133. package/dist/types/components/store/translationStore/strings.chinese.d.ts +9 -0
  134. package/dist/types/components/store/translationStore/strings.danish.d.ts +9 -0
  135. package/dist/types/components/store/translationStore/strings.dutch.d.ts +9 -0
  136. package/dist/types/components/store/translationStore/strings.french.d.ts +9 -0
  137. package/dist/types/components/store/translationStore/strings.german.d.ts +9 -0
  138. package/dist/types/components/store/translationStore/strings.hebrew.d.ts +9 -0
  139. package/dist/types/components/store/translationStore/strings.indonesian.d.ts +9 -0
  140. package/dist/types/components/store/translationStore/strings.italian.d.ts +9 -0
  141. package/dist/types/components/store/translationStore/strings.japanese.d.ts +9 -0
  142. package/dist/types/components/store/translationStore/strings.korean.d.ts +9 -0
  143. package/dist/types/components/store/translationStore/strings.norwegian.d.ts +9 -0
  144. package/dist/types/components/store/translationStore/strings.polish.d.ts +9 -0
  145. package/dist/types/components/store/translationStore/strings.portuguese.d.ts +9 -0
  146. package/dist/types/components/store/translationStore/strings.russian.d.ts +9 -0
  147. package/dist/types/components/store/translationStore/strings.spanish.d.ts +9 -0
  148. package/dist/types/components/store/translationStore/strings.swedish.d.ts +9 -0
  149. package/dist/types/components/store/translationStore/strings.turkish.d.ts +9 -0
  150. package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +9 -0
  151. package/dist/types/components/store/translationStore.d.ts +1 -1
  152. package/dist/types/components/utils/api/getLocaleMessages.d.ts +1 -1
  153. package/dist/types/scripts/_zonosBase.d.ts +2 -0
  154. package/dist/types/types/checkout/CheckoutConfig.d.ts +5 -0
  155. package/dist/types/types/checkout/api/CalculateLandedCost.d.ts +9 -0
  156. package/dist/types/types/checkout/api/NormalizedTempCart.d.ts +1 -0
  157. package/dist/types/types/generated/graphql.frontend.types.d.ts +24 -1
  158. package/dist/types/types/generated/graphql.frontend.types.ts +34 -1
  159. package/dist/types/types/generated/graphql.internal.types.d.ts +45 -0
  160. package/dist/types/types/generated/graphql.internal.types.ts +58 -0
  161. package/dist/zonos-elements/assets/RemoveIcon.svg +1 -1
  162. package/dist/zonos-elements/index.esm.js +1 -1
  163. package/dist/zonos-elements/p-0531689a.system.entry.js +1 -0
  164. package/dist/zonos-elements/{p-1e4d8228.entry.js → p-0cf44851.entry.js} +1 -1
  165. package/dist/zonos-elements/{p-57d93236.entry.js → p-0cfab69e.entry.js} +1 -1
  166. package/dist/zonos-elements/p-0cfb97ae.js +1 -0
  167. package/dist/zonos-elements/{p-5ac777a7.system.entry.js → p-0fc96872.system.entry.js} +1 -1
  168. package/dist/zonos-elements/{p-3dbfe639.entry.js → p-10cebad7.entry.js} +1 -1
  169. package/dist/zonos-elements/{p-e1ce04b1.js → p-10d6fe23.js} +1 -1
  170. package/dist/zonos-elements/{p-00dc1507.system.js → p-10efff62.system.js} +1 -1
  171. package/dist/zonos-elements/{p-ea8663b7.entry.js → p-124a4a50.entry.js} +1 -1
  172. package/dist/zonos-elements/{p-abbfde44.system.js → p-14022fab.system.js} +1 -1
  173. package/dist/zonos-elements/{p-e2cda105.system.entry.js → p-19944a13.system.entry.js} +1 -1
  174. package/dist/zonos-elements/{p-f50f48da.entry.js → p-1a6e9eec.entry.js} +1 -1
  175. package/dist/zonos-elements/{p-8ca3b73a.entry.js → p-1da0c1cb.entry.js} +1 -1
  176. package/dist/zonos-elements/{p-ff0a79e6.system.entry.js → p-22458c90.system.entry.js} +1 -1
  177. package/dist/zonos-elements/p-2b29a3ac.system.js +1 -0
  178. package/dist/zonos-elements/{p-76d03238.entry.js → p-30d6e78c.entry.js} +1 -1
  179. package/dist/zonos-elements/{p-4fee6e7f.system.entry.js → p-320e7cb9.system.entry.js} +1 -1
  180. package/dist/zonos-elements/{p-0bc813a9.system.entry.js → p-3a89fb48.system.entry.js} +1 -1
  181. package/dist/zonos-elements/{p-4cd1e79c.system.entry.js → p-3cfa90d1.system.entry.js} +1 -1
  182. package/dist/zonos-elements/{p-8df3d5d0.system.entry.js → p-3e4b11ed.system.entry.js} +1 -1
  183. package/dist/zonos-elements/{p-6c047faf.system.entry.js → p-3efbcf88.system.entry.js} +1 -1
  184. package/dist/zonos-elements/p-3f40806c.entry.js +1 -0
  185. package/dist/zonos-elements/{p-d9dceba1.system.js → p-40596087.system.js} +1 -1
  186. package/dist/zonos-elements/{p-c3e98be6.system.js → p-46a5ec52.system.js} +1 -1
  187. package/dist/zonos-elements/p-49fff22c.js +1 -0
  188. package/dist/zonos-elements/{p-970527fe.entry.js → p-5b90dd6d.entry.js} +1 -1
  189. package/dist/zonos-elements/{p-0cb426b8.entry.js → p-5cd970b9.entry.js} +1 -1
  190. package/dist/zonos-elements/p-6305e92c.system.js +1 -0
  191. package/dist/zonos-elements/{p-3b5f49f6.system.entry.js → p-68cfdd01.system.entry.js} +1 -1
  192. package/dist/zonos-elements/{p-2906956b.entry.js → p-6b00344a.entry.js} +1 -1
  193. package/dist/zonos-elements/p-6b6cd6c3.system.js +1 -0
  194. package/dist/zonos-elements/{p-2db962f9.system.entry.js → p-72c682ac.system.entry.js} +1 -1
  195. package/dist/zonos-elements/{p-f962fc6a.system.entry.js → p-7af3b735.system.entry.js} +1 -1
  196. package/dist/zonos-elements/{p-00ff4f4a.js → p-7d3a63c5.js} +2 -2
  197. package/dist/zonos-elements/{p-723c9d4d.entry.js → p-7fa88e0a.entry.js} +1 -1
  198. package/dist/zonos-elements/{p-167b7fa8.system.entry.js → p-876ded0e.system.entry.js} +1 -1
  199. package/dist/zonos-elements/{p-9833f37d.system.entry.js → p-87945d75.system.entry.js} +1 -1
  200. package/dist/zonos-elements/{p-6de5611e.entry.js → p-92fbf9e6.entry.js} +1 -1
  201. package/dist/zonos-elements/p-942a0605.js +1 -0
  202. package/dist/zonos-elements/{p-eca920dc.system.entry.js → p-9cb6599d.system.entry.js} +1 -1
  203. package/dist/zonos-elements/p-a1c26abb.system.entry.js +1 -0
  204. package/dist/zonos-elements/{p-d6f1b6fa.system.entry.js → p-a277cde0.system.entry.js} +1 -1
  205. package/dist/zonos-elements/p-a49ac35e.entry.js +1 -0
  206. package/dist/zonos-elements/{p-bf2f9095.entry.js → p-a50ebda1.entry.js} +1 -1
  207. package/dist/zonos-elements/{p-c562de4a.entry.js → p-bc8b22ad.entry.js} +1 -1
  208. package/dist/zonos-elements/{p-8b3d9796.system.entry.js → p-c39dc3e9.system.entry.js} +1 -1
  209. package/dist/zonos-elements/p-c78dd680.system.js +1 -1
  210. package/dist/zonos-elements/{p-67a32cc5.js → p-d10ffd69.js} +1 -1
  211. package/dist/zonos-elements/{p-0c6a933c.entry.js → p-d963d9d4.entry.js} +1 -1
  212. package/dist/zonos-elements/{p-5610934b.entry.js → p-db5e0d2b.entry.js} +1 -1
  213. package/dist/zonos-elements/{p-7c7feadb.system.entry.js → p-dc09df19.system.entry.js} +1 -1
  214. package/dist/zonos-elements/{p-efffbaec.entry.js → p-dc823080.entry.js} +1 -1
  215. package/dist/zonos-elements/{p-e6fad32a.system.entry.js → p-e205ef1c.system.entry.js} +1 -1
  216. package/dist/zonos-elements/{p-6b0a8709.system.entry.js → p-e5f27005.system.entry.js} +1 -1
  217. package/dist/zonos-elements/{p-91cfbf46.js → p-edc16f69.js} +1 -1
  218. package/dist/zonos-elements/{p-798d715c.entry.js → p-fb6cf324.entry.js} +1 -1
  219. package/dist/zonos-elements/{p-a372a9a0.entry.js → p-fce202ab.entry.js} +1 -1
  220. package/dist/zonos-elements/p-fd05d150.system.js +1 -0
  221. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  222. package/package.json +1 -1
  223. package/dist/esm-es5/cart-519f08e3.js +0 -1
  224. package/dist/esm-es5/handleFetch-da1a9c5d.js +0 -1
  225. package/dist/zonos-elements/p-0fa85ff9.system.js +0 -1
  226. package/dist/zonos-elements/p-2402e12c.js +0 -1
  227. package/dist/zonos-elements/p-61380d53.system.entry.js +0 -1
  228. package/dist/zonos-elements/p-685e395e.entry.js +0 -1
  229. package/dist/zonos-elements/p-7769b60c.js +0 -1
  230. package/dist/zonos-elements/p-a3b195e9.js +0 -1
  231. package/dist/zonos-elements/p-a7eaa9ad.entry.js +0 -1
  232. package/dist/zonos-elements/p-bc9987f2.system.entry.js +0 -1
  233. package/dist/zonos-elements/p-c85b4e43.system.js +0 -1
  234. package/dist/zonos-elements/p-dcd4e458.system.js +0 -1
  235. package/dist/zonos-elements/p-f7d56ce5.system.js +0 -1
@@ -100,6 +100,7 @@ export declare const featureAspectKeyEnum: {
100
100
  readonly NewPayoutReport: "new_payout_report";
101
101
  readonly PageAuditor: "page_auditor";
102
102
  readonly PromptExplorer: "prompt_explorer";
103
+ readonly SupportTicketSystem: "support_ticket_system";
103
104
  readonly TeamAuditor: "team_auditor";
104
105
  };
105
106
  export type Feature_AspectKey_Enum = (typeof featureAspectKeyEnum)[keyof typeof featureAspectKeyEnum];
@@ -126,6 +127,7 @@ export declare const featureAudienceNameEnum: {
126
127
  readonly PrincipalEngineer: "principal_engineer";
127
128
  readonly ProServeHead: "pro_serve_head";
128
129
  readonly ProductManager: "product_manager";
130
+ readonly SupportTicketMerchants: "support_ticket_merchants";
129
131
  readonly TechLead: "tech_lead";
130
132
  };
131
133
  export type Feature_AudienceName_Enum = (typeof featureAudienceNameEnum)[keyof typeof featureAudienceNameEnum];
@@ -529,9 +531,27 @@ export declare const promptBulkJobStatusEnum: {
529
531
  readonly Queued: "queued";
530
532
  };
531
533
  export type Prompt_BulkJobStatus_Enum = (typeof promptBulkJobStatusEnum)[keyof typeof promptBulkJobStatusEnum];
534
+ export type FailToGetQuoteErrorsQuery = {
535
+ error_event_aggregate: {
536
+ aggregate: {
537
+ count: number;
538
+ } | null;
539
+ nodes: Array<{
540
+ createdAt: string;
541
+ endpoint: string;
542
+ errors: Record<string, unknown> | Record<string, unknown>[];
543
+ href: string | null;
544
+ id: number;
545
+ metadata: Record<string, unknown> | Record<string, unknown>[] | null;
546
+ requestPayload: Record<string, unknown> | Record<string, unknown>[];
547
+ responseBody: Record<string, unknown> | Record<string, unknown>[] | null;
548
+ status: number;
549
+ }>;
550
+ };
551
+ };
532
552
  export type LocaleCountryMessagesQuery = {
533
553
  locale_countryCodesPage: Array<{
534
- countryCodes: Array<string>;
554
+ countryCodes: Array<string> | null;
535
555
  countryCodesPageMessageLinks: Array<{
536
556
  id: number;
537
557
  message: {
@@ -785,6 +805,9 @@ export declare function getSdk(client: GraphQLClient, withWrapper?: SdkFunctionW
785
805
  deleteReserveOrders(variables?: {
786
806
  [x: string]: never;
787
807
  }, requestHeaders?: GraphQLClientRequestHeaders): Promise<DeleteReserveOrdersMutation>;
808
+ failToGetQuoteErrors(variables?: {
809
+ [x: string]: never;
810
+ }, requestHeaders?: GraphQLClientRequestHeaders): Promise<FailToGetQuoteErrorsQuery>;
788
811
  getAudienceByAspectKey(variables?: {
789
812
  [x: string]: never;
790
813
  }, requestHeaders?: GraphQLClientRequestHeaders): Promise<GetAudienceByAspectKeyQuery>;
@@ -79,6 +79,7 @@ export const featureAspectKeyEnum = {
79
79
  NewPayoutReport: 'new_payout_report',
80
80
  PageAuditor: 'page_auditor',
81
81
  PromptExplorer: 'prompt_explorer',
82
+ SupportTicketSystem: 'support_ticket_system',
82
83
  TeamAuditor: 'team_auditor',
83
84
  } as const;
84
85
 
@@ -109,6 +110,7 @@ export const featureAudienceNameEnum = {
109
110
  PrincipalEngineer: 'principal_engineer',
110
111
  ProServeHead: 'pro_serve_head',
111
112
  ProductManager: 'product_manager',
113
+ SupportTicketMerchants: 'support_ticket_merchants',
112
114
  TechLead: 'tech_lead',
113
115
  } as const;
114
116
 
@@ -535,9 +537,26 @@ export const promptBulkJobStatusEnum = {
535
537
  export type Prompt_BulkJobStatus_Enum =
536
538
  (typeof promptBulkJobStatusEnum)[keyof typeof promptBulkJobStatusEnum];
537
539
 
540
+ export type FailToGetQuoteErrorsQuery = {
541
+ error_event_aggregate: {
542
+ aggregate: { count: number } | null;
543
+ nodes: Array<{
544
+ createdAt: string;
545
+ endpoint: string;
546
+ errors: Record<string, unknown> | Record<string, unknown>[];
547
+ href: string | null;
548
+ id: number;
549
+ metadata: Record<string, unknown> | Record<string, unknown>[] | null;
550
+ requestPayload: Record<string, unknown> | Record<string, unknown>[];
551
+ responseBody: Record<string, unknown> | Record<string, unknown>[] | null;
552
+ status: number;
553
+ }>;
554
+ };
555
+ };
556
+
538
557
  export type LocaleCountryMessagesQuery = {
539
558
  locale_countryCodesPage: Array<{
540
- countryCodes: Array<string>;
559
+ countryCodes: Array<string> | null;
541
560
  countryCodesPageMessageLinks: Array<{
542
561
  id: number;
543
562
  message: {
@@ -907,6 +926,20 @@ export function getSdk(
907
926
  'mutation',
908
927
  );
909
928
  },
929
+ failToGetQuoteErrors(
930
+ variables?: { [x: string]: never },
931
+ requestHeaders?: GraphQLClientRequestHeaders,
932
+ ): Promise<FailToGetQuoteErrorsQuery> {
933
+ return withWrapper(
934
+ wrappedRequestHeaders =>
935
+ client.request<FailToGetQuoteErrorsQuery>('', variables, {
936
+ ...requestHeaders,
937
+ ...wrappedRequestHeaders,
938
+ }),
939
+ 'failToGetQuoteErrors',
940
+ 'query',
941
+ );
942
+ },
910
943
  getAudienceByAspectKey(
911
944
  variables?: { [x: string]: never },
912
945
  requestHeaders?: GraphQLClientRequestHeaders,
@@ -1225,6 +1225,17 @@ export declare const customsDocumentType: {
1225
1225
  readonly ProFormaInvoice: "PRO_FORMA_INVOICE";
1226
1226
  };
1227
1227
  export type CustomsDocumentType = (typeof customsDocumentType)[keyof typeof customsDocumentType];
1228
+ export declare const customsItemValueSource: {
1229
+ readonly ApiRequest: "API_REQUEST";
1230
+ readonly Catalog: "CATALOG";
1231
+ readonly Classify: "CLASSIFY";
1232
+ readonly ClassifyOnTheFly: "CLASSIFY_ON_THE_FLY";
1233
+ readonly Fallback: "FALLBACK";
1234
+ readonly Hybrid: "HYBRID";
1235
+ readonly OrganizationSetting: "ORGANIZATION_SETTING";
1236
+ readonly UserProvided: "USER_PROVIDED";
1237
+ };
1238
+ export type CustomsItemValueSource = (typeof customsItemValueSource)[keyof typeof customsItemValueSource];
1228
1239
  export declare const customsSpecAttributeType: {
1229
1240
  readonly AccountNumber: "ACCOUNT_NUMBER";
1230
1241
  readonly B13A: "B13A";
@@ -1747,6 +1758,7 @@ export declare const itemValueSource: {
1747
1758
  readonly ApiRequest: "API_REQUEST";
1748
1759
  readonly Catalog: "CATALOG";
1749
1760
  readonly Classify: "CLASSIFY";
1761
+ readonly ClassifyOnTheFly: "CLASSIFY_ON_THE_FLY";
1750
1762
  readonly Fallback: "FALLBACK";
1751
1763
  readonly Hybrid: "HYBRID";
1752
1764
  readonly OrganizationSetting: "ORGANIZATION_SETTING";
@@ -2004,6 +2016,13 @@ export declare const manualClassificationBulkJobStatus: {
2004
2016
  readonly Processing: "PROCESSING";
2005
2017
  };
2006
2018
  export type ManualClassificationBulkJobStatus = (typeof manualClassificationBulkJobStatus)[keyof typeof manualClassificationBulkJobStatus];
2019
+ export declare const manualClassificationExportJobStatus: {
2020
+ readonly Completed: "COMPLETED";
2021
+ readonly Error: "ERROR";
2022
+ readonly Initialized: "INITIALIZED";
2023
+ readonly Processing: "PROCESSING";
2024
+ };
2025
+ export type ManualClassificationExportJobStatus = (typeof manualClassificationExportJobStatus)[keyof typeof manualClassificationExportJobStatus];
2007
2026
  export declare const manualClassificationRequestCreateStatus: {
2008
2027
  readonly Created: "CREATED";
2009
2028
  readonly Existing: "EXISTING";
@@ -2224,6 +2243,31 @@ export declare const paypalMockResponse: {
2224
2243
  readonly TransactionRefused: "TRANSACTION_REFUSED";
2225
2244
  };
2226
2245
  export type PaypalMockResponse = (typeof paypalMockResponse)[keyof typeof paypalMockResponse];
2246
+ export declare const paypalOrderStatus: {
2247
+ readonly Approved: "APPROVED";
2248
+ readonly Completed: "COMPLETED";
2249
+ readonly Created: "CREATED";
2250
+ readonly PayerActionRequired: "PAYER_ACTION_REQUIRED";
2251
+ readonly Saved: "SAVED";
2252
+ readonly Voided: "VOIDED";
2253
+ };
2254
+ export type PaypalOrderStatus = (typeof paypalOrderStatus)[keyof typeof paypalOrderStatus];
2255
+ export declare const paypalPaymentStatus: {
2256
+ readonly Completed: "COMPLETED";
2257
+ readonly Declined: "DECLINED";
2258
+ readonly Failed: "FAILED";
2259
+ readonly PartiallyRefunded: "PARTIALLY_REFUNDED";
2260
+ readonly Pending: "PENDING";
2261
+ readonly Refunded: "REFUNDED";
2262
+ };
2263
+ export type PaypalPaymentStatus = (typeof paypalPaymentStatus)[keyof typeof paypalPaymentStatus];
2264
+ export declare const paypalRefundStatus: {
2265
+ readonly Cancelled: "CANCELLED";
2266
+ readonly Completed: "COMPLETED";
2267
+ readonly Failed: "FAILED";
2268
+ readonly Pending: "PENDING";
2269
+ };
2270
+ export type PaypalRefundStatus = (typeof paypalRefundStatus)[keyof typeof paypalRefundStatus];
2227
2271
  export declare const pddpAmountType: {
2228
2272
  readonly FlcTotalCost: "FLC_TOTAL_COST";
2229
2273
  readonly InsuredValue: "INSURED_VALUE";
@@ -3710,6 +3754,7 @@ export type CartQuery = {
3710
3754
  sku: string | null;
3711
3755
  type: CartAdjustmentType;
3712
3756
  }>;
3757
+ createdAt: string;
3713
3758
  id: string;
3714
3759
  items: Array<{
3715
3760
  amount: number;
@@ -1402,6 +1402,20 @@ export const customsDocumentType = {
1402
1402
  export type CustomsDocumentType =
1403
1403
  (typeof customsDocumentType)[keyof typeof customsDocumentType];
1404
1404
 
1405
+ export const customsItemValueSource = {
1406
+ ApiRequest: 'API_REQUEST',
1407
+ Catalog: 'CATALOG',
1408
+ Classify: 'CLASSIFY',
1409
+ ClassifyOnTheFly: 'CLASSIFY_ON_THE_FLY',
1410
+ Fallback: 'FALLBACK',
1411
+ Hybrid: 'HYBRID',
1412
+ OrganizationSetting: 'ORGANIZATION_SETTING',
1413
+ UserProvided: 'USER_PROVIDED',
1414
+ } as const;
1415
+
1416
+ export type CustomsItemValueSource =
1417
+ (typeof customsItemValueSource)[keyof typeof customsItemValueSource];
1418
+
1405
1419
  export const customsSpecAttributeType = {
1406
1420
  AccountNumber: 'ACCOUNT_NUMBER',
1407
1421
  B13A: 'B13A',
@@ -2084,6 +2098,7 @@ export const itemValueSource = {
2084
2098
  ApiRequest: 'API_REQUEST',
2085
2099
  Catalog: 'CATALOG',
2086
2100
  Classify: 'CLASSIFY',
2101
+ ClassifyOnTheFly: 'CLASSIFY_ON_THE_FLY',
2087
2102
  Fallback: 'FALLBACK',
2088
2103
  Hybrid: 'HYBRID',
2089
2104
  OrganizationSetting: 'ORGANIZATION_SETTING',
@@ -2389,6 +2404,16 @@ export const manualClassificationBulkJobStatus = {
2389
2404
  export type ManualClassificationBulkJobStatus =
2390
2405
  (typeof manualClassificationBulkJobStatus)[keyof typeof manualClassificationBulkJobStatus];
2391
2406
 
2407
+ export const manualClassificationExportJobStatus = {
2408
+ Completed: 'COMPLETED',
2409
+ Error: 'ERROR',
2410
+ Initialized: 'INITIALIZED',
2411
+ Processing: 'PROCESSING',
2412
+ } as const;
2413
+
2414
+ export type ManualClassificationExportJobStatus =
2415
+ (typeof manualClassificationExportJobStatus)[keyof typeof manualClassificationExportJobStatus];
2416
+
2392
2417
  export const manualClassificationRequestCreateStatus = {
2393
2418
  Created: 'CREATED',
2394
2419
  Existing: 'EXISTING',
@@ -2689,6 +2714,38 @@ export const paypalMockResponse = {
2689
2714
  export type PaypalMockResponse =
2690
2715
  (typeof paypalMockResponse)[keyof typeof paypalMockResponse];
2691
2716
 
2717
+ export const paypalOrderStatus = {
2718
+ Approved: 'APPROVED',
2719
+ Completed: 'COMPLETED',
2720
+ Created: 'CREATED',
2721
+ PayerActionRequired: 'PAYER_ACTION_REQUIRED',
2722
+ Saved: 'SAVED',
2723
+ Voided: 'VOIDED',
2724
+ } as const;
2725
+
2726
+ export type PaypalOrderStatus =
2727
+ (typeof paypalOrderStatus)[keyof typeof paypalOrderStatus];
2728
+
2729
+ export const paypalPaymentStatus = {
2730
+ Completed: 'COMPLETED',
2731
+ Declined: 'DECLINED',
2732
+ Failed: 'FAILED',
2733
+ PartiallyRefunded: 'PARTIALLY_REFUNDED',
2734
+ Pending: 'PENDING',
2735
+ Refunded: 'REFUNDED',
2736
+ } as const;
2737
+
2738
+ export type PaypalPaymentStatus =
2739
+ (typeof paypalPaymentStatus)[keyof typeof paypalPaymentStatus];
2740
+ export const paypalRefundStatus = {
2741
+ Cancelled: 'CANCELLED',
2742
+ Completed: 'COMPLETED',
2743
+ Failed: 'FAILED',
2744
+ Pending: 'PENDING',
2745
+ } as const;
2746
+
2747
+ export type PaypalRefundStatus =
2748
+ (typeof paypalRefundStatus)[keyof typeof paypalRefundStatus];
2692
2749
  export const pddpAmountType = {
2693
2750
  FlcTotalCost: 'FLC_TOTAL_COST',
2694
2751
  InsuredValue: 'INSURED_VALUE',
@@ -4218,6 +4275,7 @@ export type CartQuery = {
4218
4275
  sku: string | null;
4219
4276
  type: CartAdjustmentType;
4220
4277
  }>;
4278
+ createdAt: string;
4221
4279
  id: string;
4222
4280
  items: Array<{
4223
4281
  amount: number;
@@ -1 +1 @@
1
- <svg color="var(--zonos-elements-red-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" data-is-secondary-color="true" fill="var(--zonos-elements-red-200)" fill-rule="evenodd"></path><path clip-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>
1
+ <svg color="var(--zonos-elements-red-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" data-is-secondary-color="true" fill="var(--zonos-elements-red-200)" fill-rule="evenodd"></path><path clip-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>g>
@@ -1 +1 @@
1
- import{l as e,a as n}from"./p-7769b60c.js";import{s as o,c as t}from"./p-a3b195e9.js";export{c as checkoutHiddenBtnSelector,d as domesticRedirectedBtnSelector}from"./p-a3b195e9.js";const s=["jsdelivr","cdnjs","unpkg","vercel"],r="jsdelivr",i=e=>{const n=s.indexOf(e);return s[n+1]||null},l=()=>{const n=window&&window.location.href.includes("forceLoadCdn");if("undefined"==typeof window||n)return null;const o=(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),t="https://v1.3.128.js.zonos.com";if(!o&&(t.includes("test.")||t.includes("test-")))return t;if(!o&&["dev.demo.elements.zonos.com"].includes(window.location.hostname))return"https://dev.elements.zonos.com";if(!o)return null;if("dev-elements"===o)return"https://dev.elements.zonos.com";const s=`https://${o}.preview.js.zonos.com`;return e(`[ZONOS-WARNING] using '${s}' for loading elements script`,"warn"),fetch(s).then((()=>{window.sessionStorage.removeItem("zonos--checkout-session-id"),window.sessionStorage.removeItem("zonos--client-secret")})).catch((()=>{alert(`[ZONOS-WARNING] '${s}' 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})),s},a="https://js.stripe.com/v3",u=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,m="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used";let p=null;const w=Promise.resolve().then((()=>{return e=null,null!==p||(p=new Promise(((o,t)=>{if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe&&e&&console.warn(m),window.Stripe)o(window.Stripe);else try{let s=(()=>{const e=document.querySelectorAll(`script[src^="${a}"]`);for(let n=0;n<e.length;n++){const o=e[n];if(o&&u.test(o.src))return o}return null})();s&&e?console.warn(m):s||(s=(e=>{const o=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",t=document.createElement("script");t.src=`${a}${o}`;const s=document.head||document.body;return s?(s.appendChild(t),t):(n("Expected document.body not to be null. Stripe.js requires a <body> element."),null)})(e)),null==s||s.addEventListener("load",(()=>{window.Stripe?o(window.Stripe):t(new Error("Stripe.js not available"))})),null==s||s.addEventListener("error",(()=>{t(new Error("Failed to load Stripe.js"))}))}catch(e){return void t(e)}else o(null)}))),p;var e}));let f=!1;var h;w.catch((e=>{f||console.warn(e)}));const v=(()=>{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})(),y="https://v1.3.128.js.zonos.com",z=v||"https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.128",j="https://rsms.me",S="https://fonts.googleapis.com",g=/^https:\/\/rsms\.me\/inter\/inter\.css(.*)$/;class ${}h=$,$.doneInit=!1,$.debug="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosDebug=1/),$.zonosConversionTest="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosConversionTest/),$._paypalMockResponse=null,$.isBigCommerce=!1,$.releaseDate="1731429497368",$.isLegacyCheckout=!1,$.showBaseForeign="undefined"!=typeof window&&window.location.search.includes("zonosShowBaseForeign"),$.isNpm=!0,$.zonosQaUrl=null,$.zonosQaUrlApi=null,$.version="v1.3.128",$.modeAlerted=!1,$.cartData=null,$.paypal=null,$.getCurrentTimestamp=()=>(new Date).getTime(),$.zonosController=null,$.init=async s=>{const{appearance:r,checkoutSettings:i,currencyConverter:c,helloSettings:d,onCountryChange:a,overrideCurrencyFormat:u,storeId:m,zonosApiKey:p}=s;if(h.cartId=new URLSearchParams(window.location.search).get("tempCartUUID"),!h.doneInit){if(e(`====== ZONOS DEBUG MODE: on (${h.version}) ======`),h.zonosApiKey=p,h.storeId=m,h.isNpm){e("====== ZONOS LOADING FROM NPM ======");const t=l();if(t&&!window.isZonosPreview){e(`====== RE-INJECT "zonos.js" FROM PRVIEW: ${t} ======`,"info");const n=document.createElement("script");return n.src=`${t}/dist/scripts/zonos.js`,document.head.appendChild(n),n.addEventListener("load",(()=>{window.Zonos.isNpm=h.isNpm,window.Zonos.isBigCommerce=h.isBigCommerce,window.Zonos.isLegacyCheckout=h.isLegacyCheckout,window.Zonos.init(s)})),n.addEventListener("error",(()=>{alert(`[ZONOS - loadZonos] Failed to load "loadZonos.js" from zonosQaUrl: ${t}`)})),void(window.isZonosPreview=!0)}if(!p&&!h.cartId)return void n("Zonos API key is required unless `tempCartUUID` is provided in url query params.");if(!h.cartData&&h.cartId){e("Initialize cart data");const t=await o(h.cartId);if(!t)return void n("Failed to get cart data");h.cartData=t.cartData,h.zonosApiKey=t.zonosApiKey}}if(h.cartId&&h.cartData){e("Cart data is available, inject hidden button and trigger checkout");const n=document.createElement("button");n.style.display="none",n.id=`${t}`,document.body.appendChild(n)}e("init zonos"),h.injectZonosCdn(),h.injectZonosCss(),h.injectFonts(),h.injectController({config:{appearance:r,checkoutSettings:i,currencyConverter:c,helloSettings:d,onCountryChange:a,overrideCurrencyFormat:u}}),h.doneInit=!0}},$.displayCurrency=()=>{const e=document.querySelector("zonos-hello");e&&e.displayCurrency()},$.openHelloDialog=e=>{const n=document.querySelector("zonos-hello");n&&n.openHelloDialog(null==e||e)},$.showNotification=e=>{var n;null===(n=h.zonosController)||void 0===n||n.showNotification(e)},$.updateOrganizationName=e=>{var n;null===(n=h.zonosController)||void 0===n||n.updateOrganizationName(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)}},$.injectController=({config:o})=>{var t;if(document.querySelector("zonos-controller"))return;if(null===(t=o.checkoutSettings)||void 0===t?void 0:t.placeOrderButtonSelector){const e=o.checkoutSettings.placeOrderButtonSelector;h.disablePlaceOrderButtons({config:o,disable:!0,placeOrderButtonSelector:e}),new MutationObserver((()=>{h.disablePlaceOrderButtons({config:o,disable:!0,placeOrderButtonSelector:e})})).observe(document.body,{childList:!0,subtree:!0})}const s=document.createElement("zonos-controller");s.config=o,s.zonosApiKey=h.zonosApiKey||"",s.addEventListener("stripeInitEvent",(async o=>{const{detail:t}=o;e("loading Stripe");const r=await(async(...e)=>{f=!0;const n=Date.now();return w.then((o=>((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})(o,e,n)))})(t.publishableKey);r?(window.Zonos.stripe=r,s.initCheckoutElement(r)):n("API seems to be invalid or missing. Failed to load Stripe")})),document.body.appendChild(s),h.zonosController=s,e("Zonos controller injected!")},$.injectScript=({cdnType:o,isModule:t,theRestUrl:s})=>{const r=`${h.getZonosUrl(o)}/${s}`;if(document.querySelector(`script[src="${r}"]`))return void e(`Zonos script "${r}" already exists in the document`,"warn");const c=document.head||document.body,l=document.createElement("script");t?l.type="module":l.noModule=!0,l.src=r,l.crossOrigin="anonymous",l.onerror=()=>{n(`Failed to load ${l.src}`);const e=i(o);e&&h.injectScript({cdnType:e,isModule:t,theRestUrl:s})},c.appendChild(l)},$.getZonosUrl=e=>{const n=()=>{switch(e){case"jsdelivr":return z;case"unpkg":return"https://unpkg.com/@zonos/elements@1.3.128";case"cdnjs":return"https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.128";case"vercel":return y}};return h.isNpm&&l()||n()},$.injectZonosCdn=()=>{h.injectScript({cdnType:r,isModule:!0,theRestUrl:"dist/zonos-elements/zonos-elements.esm.js"}),h.injectScript({cdnType:r,isModule:!1,theRestUrl:"dist/zonos-elements/zonos-elements.js"}),e("Zonos cdn script injected!")},$.injectStylesheet=({cdnType:e,theRestUrl:o})=>{const t=h.getZonosUrl(e),s=document.head||document.body,r=document.createElement("link");r.rel="preconnect",r.href=`${y}/`,s.appendChild(r);const c=document.createElement("link");c.rel="stylesheet",c.href=`${t}/${o}`,c.onerror=()=>{n(`Failed to load ${c.href}`);const t=i(e);t&&h.injectStylesheet({cdnType:t,theRestUrl:o})},s.appendChild(c)},$.injectZonosCss=()=>{document.querySelector('link[rel="stylesheet"][href*="/dist/zonos-elements/zonos-elements.css"]')?e("Zonos style links already injected","warn"):(h.injectStylesheet({cdnType:r,theRestUrl:"dist/zonos-elements/zonos-elements.css"}),e("Zonos style css injected!"))},$.injectFonts=()=>{if((()=>{const e=document.querySelectorAll(`link[rel="stylesheet"][href^="${j}"]`);for(let n=0;n<e.length;n++){const o=e[n];if(o&&!g.test(o.href))return o}return null})())return void e("Inter font already injected","warn");const n=document.head||document.body,o=document.createElement("link");o.rel="preconnect",o.href=j,n.appendChild(o);const t=document.createElement("link");t.rel="stylesheet",t.href=`${j}/inter/inter.css`,n.appendChild(t),e("Zonos font injected!")},$.setupGoogleFont=e=>{var n;null===(n=h.zonosController)||void 0===n||n.setupGoogleFont(e)},$.injectSupportGoogleFont=n=>{var o;e(`[FONT] injecting ${n}`);const t=null===(o=n.match(/family=(.*?):/))||void 0===o?void 0:o[1],s=document.head||document.body;if(!document.querySelector(`link[rel="preconnect"][href^="${S}"]`)){const e=document.createElement("link");e.rel="preconnect",e.href=S,s.appendChild(e)}if(document.querySelector(`link[rel="stylesheet"][href="${n}"]`))return void e(`[FONT] ${t} font already injected`,"warn");const r=document.createElement("link");r.rel="stylesheet",r.href=n,s.appendChild(r),e(`[FONT] ${t} font injected!`)};export{$ as Zonos}
1
+ import{l as e,a as n}from"./p-0cfb97ae.js";import{s as o,c as t}from"./p-942a0605.js";export{c as checkoutHiddenBtnSelector,d as domesticRedirectedBtnSelector}from"./p-942a0605.js";const s=["jsdelivr","cdnjs","unpkg","vercel"],r="jsdelivr",i=e=>{const n=s.indexOf(e);return s[n+1]||null},l=()=>{const n=window&&window.location.href.includes("forceLoadCdn");if("undefined"==typeof window||n)return null;const o=(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),t="https://v1.3.130.js.zonos.com";if(!o&&(t.includes("test.")||t.includes("test-")))return t;if(!o&&["dev.demo.elements.zonos.com"].includes(window.location.hostname))return"https://dev.elements.zonos.com";if(!o)return null;if("dev-elements"===o)return"https://dev.elements.zonos.com";const s=`https://${o}.preview.js.zonos.com`;return e(`[ZONOS-WARNING] using '${s}' for loading elements script`,"warn"),fetch(s).then((()=>{window.sessionStorage.removeItem("zonos--checkout-session-id"),window.sessionStorage.removeItem("zonos--client-secret")})).catch((()=>{alert(`[ZONOS-WARNING] '${s}' 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})),s},u="https://js.stripe.com/v3",a=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,m="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used";let w=null;const p=Promise.resolve().then((()=>{return e=null,null!==w||(w=new Promise(((o,t)=>{if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe&&e&&console.warn(m),window.Stripe)o(window.Stripe);else try{let s=(()=>{const e=document.querySelectorAll(`script[src^="${u}"]`);for(let n=0;n<e.length;n++){const o=e[n];if(o&&a.test(o.src))return o}return null})();s&&e?console.warn(m):s||(s=(e=>{const o=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",t=document.createElement("script");t.src=`${u}${o}`;const s=document.head||document.body;return s?(s.appendChild(t),t):(n("Expected document.body not to be null. Stripe.js requires a <body> element."),null)})(e)),null==s||s.addEventListener("load",(()=>{window.Stripe?o(window.Stripe):t(new Error("Stripe.js not available"))})),null==s||s.addEventListener("error",(()=>{t(new Error("Failed to load Stripe.js"))}))}catch(e){return void t(e)}else o(null)}))),w;var e}));let f=!1;var h;p.catch((e=>{f||console.warn(e)}));const v=(()=>{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})(),y="https://v1.3.130.js.zonos.com",z=v||"https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.130",j="https://rsms.me",S="https://fonts.googleapis.com",g=/^https:\/\/rsms\.me\/inter\/inter\.css(.*)$/;class ${}h=$,$.doneInit=!1,$.debug="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosDebug=1/),$.zonosConversionTest="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosConversionTest/),$._paypalMockResponse=null,$.isBigCommerce=!1,$.releaseDate="1732051074824",$.isLegacyCheckout=!1,$.domain="undefined"!=typeof window?window.location!=window.parent.location&&document.referrer||document.location.hostname:"",$.showBaseForeign="undefined"!=typeof window&&window.location.search.includes("zonosShowBaseForeign"),$.isNpm=!0,$.zonosQaUrl=null,$.zonosQaUrlApi=null,$.version="v1.3.130",$.modeAlerted=!1,$.cartData=null,$.paypal=null,$.getCurrentTimestamp=()=>(new Date).getTime(),$.zonosController=null,$.init=async s=>{const{appearance:r,checkoutSettings:i,currencyConverter:c,helloSettings:d,onCountryChange:u,overrideCurrencyFormat:a,storeId:m,zonosApiKey:w}=s;if(h.cartId=new URLSearchParams(window.location.search).get("tempCartUUID"),!h.doneInit){if(e(`====== ZONOS DEBUG MODE: on (${h.version}) ======`),h.zonosApiKey=w,h.storeId=m,h.isNpm){e("====== ZONOS LOADING FROM NPM ======");const t=l();if(t&&!window.isZonosPreview){e(`====== RE-INJECT "zonos.js" FROM PRVIEW: ${t} ======`,"info");const n=document.createElement("script");return n.src=`${t}/dist/scripts/zonos.js`,document.head.appendChild(n),n.addEventListener("load",(()=>{window.Zonos.isNpm=h.isNpm,window.Zonos.isBigCommerce=h.isBigCommerce,window.Zonos.isLegacyCheckout=h.isLegacyCheckout,window.Zonos.init(s)})),n.addEventListener("error",(()=>{alert(`[ZONOS - loadZonos] Failed to load "loadZonos.js" from zonosQaUrl: ${t}`)})),void(window.isZonosPreview=!0)}if(!w&&!h.cartId)return void n("Zonos API key is required unless `tempCartUUID` is provided in url query params.");if(!h.cartData&&h.cartId){e("Initialize cart data");const t=await o(h.cartId);if(!t)return void n("Failed to get cart data");h.cartData=t.cartData,h.zonosApiKey=t.zonosApiKey}}if(h.cartId&&h.cartData){e("Cart data is available, inject hidden button and trigger checkout");const n=document.createElement("button");n.style.display="none",n.id=`${t}`,document.body.appendChild(n)}e("init zonos"),h.injectZonosCdn(),h.injectZonosCss(),h.injectFonts(),h.injectController({config:{appearance:r,checkoutSettings:i,currencyConverter:c,helloSettings:d,onCountryChange:u,overrideCurrencyFormat:a}}),h.doneInit=!0}},$.displayCurrency=()=>{const e=document.querySelector("zonos-hello");e&&e.displayCurrency()},$.openHelloDialog=e=>{const n=document.querySelector("zonos-hello");n&&n.openHelloDialog(null==e||e)},$.showNotification=e=>{var n;null===(n=h.zonosController)||void 0===n||n.showNotification(e)},$.updateOrganizationName=e=>{var n;null===(n=h.zonosController)||void 0===n||n.updateOrganizationName(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)}},$.injectController=({config:o})=>{var t;if(document.querySelector("zonos-controller"))return;if(null===(t=o.checkoutSettings)||void 0===t?void 0:t.placeOrderButtonSelector){const e=o.checkoutSettings.placeOrderButtonSelector;h.disablePlaceOrderButtons({config:o,disable:!0,placeOrderButtonSelector:e}),new MutationObserver((()=>{h.disablePlaceOrderButtons({config:o,disable:!0,placeOrderButtonSelector:e})})).observe(document.body,{childList:!0,subtree:!0})}const s=document.createElement("zonos-controller");s.config=o,s.zonosApiKey=h.zonosApiKey||"",s.addEventListener("stripeInitEvent",(async o=>{const{detail:t}=o;e("loading Stripe");const r=await(async(...e)=>{f=!0;const n=Date.now();return p.then((o=>((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})(o,e,n)))})(t.publishableKey);r?(window.Zonos.stripe=r,s.initCheckoutElement(r)):n("API seems to be invalid or missing. Failed to load Stripe")})),document.body.appendChild(s),h.zonosController=s,e("Zonos controller injected!")},$.injectScript=({cdnType:o,isModule:t,theRestUrl:s})=>{const r=`${h.getZonosUrl(o)}/${s}`;if(document.querySelector(`script[src="${r}"]`))return void e(`Zonos script "${r}" already exists in the document`,"warn");const c=document.head||document.body,d=document.createElement("script");t?d.type="module":d.noModule=!0,d.src=r,d.crossOrigin="anonymous",d.onerror=()=>{n(`Failed to load ${d.src}`);const e=i(o);e&&h.injectScript({cdnType:e,isModule:t,theRestUrl:s})},c.appendChild(d)},$.getZonosUrl=e=>{const n=()=>{switch(e){case"jsdelivr":return z;case"unpkg":return"https://unpkg.com/@zonos/elements@1.3.130";case"cdnjs":return"https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.130";case"vercel":return y}};return h.isNpm&&l()||n()},$.injectZonosCdn=()=>{h.injectScript({cdnType:r,isModule:!0,theRestUrl:"dist/zonos-elements/zonos-elements.esm.js"}),h.injectScript({cdnType:r,isModule:!1,theRestUrl:"dist/zonos-elements/zonos-elements.js"}),e("Zonos cdn script injected!")},$.injectStylesheet=({cdnType:e,theRestUrl:o})=>{const t=h.getZonosUrl(e),s=document.head||document.body,r=document.createElement("link");r.rel="preconnect",r.href=`${y}/`,s.appendChild(r);const c=document.createElement("link");c.rel="stylesheet",c.href=`${t}/${o}`,c.onerror=()=>{n(`Failed to load ${c.href}`);const t=i(e);t&&h.injectStylesheet({cdnType:t,theRestUrl:o})},s.appendChild(c)},$.injectZonosCss=()=>{document.querySelector('link[rel="stylesheet"][href*="/dist/zonos-elements/zonos-elements.css"]')?e("Zonos style links already injected","warn"):(h.injectStylesheet({cdnType:r,theRestUrl:"dist/zonos-elements/zonos-elements.css"}),e("Zonos style css injected!"))},$.injectFonts=()=>{if((()=>{const e=document.querySelectorAll(`link[rel="stylesheet"][href^="${j}"]`);for(let n=0;n<e.length;n++){const o=e[n];if(o&&!g.test(o.href))return o}return null})())return void e("Inter font already injected","warn");const n=document.head||document.body,o=document.createElement("link");o.rel="preconnect",o.href=j,n.appendChild(o);const t=document.createElement("link");t.rel="stylesheet",t.href=`${j}/inter/inter.css`,n.appendChild(t),e("Zonos font injected!")},$.setupGoogleFont=e=>{var n;null===(n=h.zonosController)||void 0===n||n.setupGoogleFont(e)},$.injectSupportGoogleFont=n=>{var o;e(`[FONT] injecting ${n}`);const t=null===(o=n.match(/family=(.*?):/))||void 0===o?void 0:o[1],s=document.head||document.body;if(!document.querySelector(`link[rel="preconnect"][href^="${S}"]`)){const e=document.createElement("link");e.rel="preconnect",e.href=S,s.appendChild(e)}if(document.querySelector(`link[rel="stylesheet"][href="${n}"]`))return void e(`[FONT] ${t} font already injected`,"warn");const r=document.createElement("link");r.rel="stylesheet",r.href=n,s.appendChild(r),e(`[FONT] ${t} font injected!`)};export{$ as Zonos}