@zonos/elements 1.3.235 → 1.3.237

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 (142) hide show
  1. package/dist/cjs/{cart-22ced7cc.js → cart-e435a549.js} +1 -1
  2. package/dist/cjs/{hasInclusivePrice-ca85cabd.js → hasInclusivePrice-06d35d3c.js} +1 -1
  3. package/dist/cjs/index.cjs.js +7 -7
  4. package/dist/cjs/{invoice-8fd4242c.js → invoice-fc7bef1e.js} +2 -2
  5. package/dist/cjs/{isCollectMobileTablet-7962c57f.js → isCollectMobileTablet-aeeb0401.js} +2 -2
  6. package/dist/cjs/{localization-8ef6250a.js → localization-98db6c18.js} +7 -6
  7. package/dist/cjs/{paypal-4a086f84.js → paypal-a7bb03b5.js} +2 -2
  8. package/dist/cjs/{placeTestOrder-f25d08ee.js → placeTestOrder-6d99608b.js} +2 -2
  9. package/dist/cjs/{renderCheckoutCurrency-5494e45b.js → renderCheckoutCurrency-530fb636.js} +2 -2
  10. package/dist/cjs/zonos-address-display_9.cjs.entry.js +2 -2
  11. package/dist/cjs/zonos-address_4.cjs.entry.js +2 -2
  12. package/dist/cjs/zonos-card_5.cjs.entry.js +3 -3
  13. package/dist/cjs/zonos-cart-items_12.cjs.entry.js +6 -6
  14. package/dist/cjs/zonos-checkout.cjs.entry.js +3 -3
  15. package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +2 -2
  16. package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +6 -6
  17. package/dist/cjs/zonos-collect.cjs.entry.js +4 -4
  18. package/dist/cjs/zonos-controller.cjs.entry.js +2 -2
  19. package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
  20. package/dist/cjs/zonos-country-select_4.cjs.entry.js +1 -1
  21. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +2 -2
  22. package/dist/cjs/zonos-hello.cjs.entry.js +1 -1
  23. package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +4 -4
  24. package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +6 -6
  25. package/dist/cjs/zonos-invoice.cjs.entry.js +5 -5
  26. package/dist/cjs/zonos-language-select_2.cjs.entry.js +1 -1
  27. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice.css +1 -1
  28. package/dist/collection/components/utils/hello/currencyConversion/currencyFormat.js +7 -6
  29. package/dist/esm/{cart-66aecbb3.js → cart-d802d953.js} +1 -1
  30. package/dist/esm/{hasInclusivePrice-2a1bf474.js → hasInclusivePrice-0285118a.js} +1 -1
  31. package/dist/esm/index.js +7 -7
  32. package/dist/esm/{invoice-c7452847.js → invoice-888ae8c9.js} +2 -2
  33. package/dist/esm/{isCollectMobileTablet-921002b0.js → isCollectMobileTablet-028f8611.js} +2 -2
  34. package/dist/esm/{localization-04b05867.js → localization-8f12d460.js} +7 -6
  35. package/dist/esm/{paypal-56564874.js → paypal-9b9e6231.js} +2 -2
  36. package/dist/esm/{placeTestOrder-6b9eda9e.js → placeTestOrder-42778584.js} +2 -2
  37. package/dist/esm/{renderCheckoutCurrency-cb808110.js → renderCheckoutCurrency-db3ce341.js} +2 -2
  38. package/dist/esm/zonos-address-display_9.entry.js +2 -2
  39. package/dist/esm/zonos-address_4.entry.js +2 -2
  40. package/dist/esm/zonos-card_5.entry.js +3 -3
  41. package/dist/esm/zonos-cart-items_12.entry.js +6 -6
  42. package/dist/esm/zonos-checkout.entry.js +3 -3
  43. package/dist/esm/zonos-collect-cart-items_3.entry.js +2 -2
  44. package/dist/esm/zonos-collect-finish_6.entry.js +6 -6
  45. package/dist/esm/zonos-collect.entry.js +4 -4
  46. package/dist/esm/zonos-controller.entry.js +2 -2
  47. package/dist/esm/zonos-country-flag.entry.js +1 -1
  48. package/dist/esm/zonos-country-select_4.entry.js +1 -1
  49. package/dist/esm/zonos-hello-dialog.entry.js +2 -2
  50. package/dist/esm/zonos-hello.entry.js +1 -1
  51. package/dist/esm/zonos-invoice-cart-items_2.entry.js +4 -4
  52. package/dist/esm/zonos-invoice-finish_5.entry.js +6 -6
  53. package/dist/esm/zonos-invoice.entry.js +5 -5
  54. package/dist/esm/zonos-language-select_2.entry.js +1 -1
  55. package/dist/esm-es5/{cart-66aecbb3.js → cart-d802d953.js} +1 -1
  56. package/dist/esm-es5/{hasInclusivePrice-2a1bf474.js → hasInclusivePrice-0285118a.js} +1 -1
  57. package/dist/esm-es5/index.js +1 -1
  58. package/dist/esm-es5/{invoice-c7452847.js → invoice-888ae8c9.js} +1 -1
  59. package/dist/esm-es5/{isCollectMobileTablet-921002b0.js → isCollectMobileTablet-028f8611.js} +1 -1
  60. package/dist/esm-es5/{localization-04b05867.js → localization-8f12d460.js} +1 -1
  61. package/dist/esm-es5/{paypal-56564874.js → paypal-9b9e6231.js} +1 -1
  62. package/dist/esm-es5/{placeTestOrder-6b9eda9e.js → placeTestOrder-42778584.js} +1 -1
  63. package/dist/esm-es5/{renderCheckoutCurrency-cb808110.js → renderCheckoutCurrency-db3ce341.js} +1 -1
  64. package/dist/esm-es5/zonos-address-display_9.entry.js +1 -1
  65. package/dist/esm-es5/zonos-address_4.entry.js +1 -1
  66. package/dist/esm-es5/zonos-card_5.entry.js +1 -1
  67. package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -1
  68. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  69. package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +1 -1
  70. package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -1
  71. package/dist/esm-es5/zonos-collect.entry.js +1 -1
  72. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  73. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  74. package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
  75. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  76. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  77. package/dist/esm-es5/zonos-invoice-cart-items_2.entry.js +1 -1
  78. package/dist/esm-es5/zonos-invoice-finish_5.entry.js +1 -1
  79. package/dist/esm-es5/zonos-invoice.entry.js +1 -1
  80. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  81. package/dist/scripts/index.js +1 -1
  82. package/dist/scripts/loadZonos.js +1 -1
  83. package/dist/scripts/zonos.js +1 -1
  84. package/dist/zonos-elements/index.esm.js +1 -1
  85. package/dist/zonos-elements/{p-f513b231.entry.js → p-09e3ed0d.entry.js} +1 -1
  86. package/dist/zonos-elements/{p-82febf70.system.js → p-09f2cbc9.system.js} +1 -1
  87. package/dist/zonos-elements/p-0abc8161.entry.js +1 -0
  88. package/dist/zonos-elements/{p-00719e49.entry.js → p-0ce28a83.entry.js} +1 -1
  89. package/dist/zonos-elements/{p-1a30fe18.system.entry.js → p-0e80d189.system.entry.js} +1 -1
  90. package/dist/zonos-elements/{p-38913b2f.entry.js → p-1f1bf0c6.entry.js} +1 -1
  91. package/dist/zonos-elements/{p-10316d4d.system.entry.js → p-20dac9d4.system.entry.js} +1 -1
  92. package/dist/zonos-elements/{p-836db369.system.entry.js → p-26ce341c.system.entry.js} +1 -1
  93. package/dist/zonos-elements/{p-7e469c5c.entry.js → p-293d7a79.entry.js} +1 -1
  94. package/dist/zonos-elements/{p-18bc6c7a.entry.js → p-2e74e090.entry.js} +1 -1
  95. package/dist/zonos-elements/{p-f64207fa.system.entry.js → p-35a1979e.system.entry.js} +1 -1
  96. package/dist/zonos-elements/{p-dc94d7eb.js → p-37f46852.js} +1 -1
  97. package/dist/zonos-elements/{p-a610c24e.system.entry.js → p-387304a0.system.entry.js} +1 -1
  98. package/dist/zonos-elements/{p-48dc96f9.system.entry.js → p-3913b1e4.system.entry.js} +1 -1
  99. package/dist/zonos-elements/{p-9479f155.system.js → p-3b598f1d.system.js} +1 -1
  100. package/dist/zonos-elements/{p-f4e976ae.entry.js → p-3fce3aef.entry.js} +1 -1
  101. package/dist/zonos-elements/{p-7e17667d.js → p-442f1023.js} +1 -1
  102. package/dist/zonos-elements/{p-95dc475b.system.js → p-48637bf6.system.js} +1 -1
  103. package/dist/zonos-elements/{p-9fa32fdf.js → p-48f48767.js} +1 -1
  104. package/dist/zonos-elements/{p-7f91617c.system.entry.js → p-4f030caf.system.entry.js} +1 -1
  105. package/dist/zonos-elements/{p-170314a3.js → p-59bc0ca9.js} +1 -1
  106. package/dist/zonos-elements/{p-f3962950.system.entry.js → p-5fc40d18.system.entry.js} +1 -1
  107. package/dist/zonos-elements/{p-f1d4d6da.entry.js → p-632eb7c9.entry.js} +1 -1
  108. package/dist/zonos-elements/{p-8d3a62fb.entry.js → p-63a1b931.entry.js} +1 -1
  109. package/dist/zonos-elements/{p-30c661b3.system.entry.js → p-68991148.system.entry.js} +1 -1
  110. package/dist/zonos-elements/p-802a28f5.js +1 -0
  111. package/dist/zonos-elements/p-85fff8a2.system.entry.js +1 -0
  112. package/dist/zonos-elements/{p-757d4c62.system.entry.js → p-8916f54e.system.entry.js} +1 -1
  113. package/dist/zonos-elements/{p-c8cc20d9.system.js → p-8a8a8696.system.js} +1 -1
  114. package/dist/zonos-elements/{p-44b50260.entry.js → p-8e250c09.entry.js} +1 -1
  115. package/dist/zonos-elements/{p-f1d9dd4e.entry.js → p-a006320c.entry.js} +1 -1
  116. package/dist/zonos-elements/{p-83b3f824.system.entry.js → p-a12605f5.system.entry.js} +1 -1
  117. package/dist/zonos-elements/{p-17a09191.entry.js → p-a5538e61.entry.js} +1 -1
  118. package/dist/zonos-elements/{p-6688473e.entry.js → p-a5ac9c92.entry.js} +1 -1
  119. package/dist/zonos-elements/{p-8af188f8.system.js → p-a87b5eaa.system.js} +1 -1
  120. package/dist/zonos-elements/{p-34bf7bbe.system.js → p-a8b1c81e.system.js} +1 -1
  121. package/dist/zonos-elements/{p-9b9bfb6d.entry.js → p-b29c5296.entry.js} +1 -1
  122. package/dist/zonos-elements/{p-4aa86184.system.entry.js → p-b80d40e5.system.entry.js} +1 -1
  123. package/dist/zonos-elements/{p-18d20206.system.js → p-b9b42171.system.js} +1 -1
  124. package/dist/zonos-elements/p-bb73eb0f.js +1 -0
  125. package/dist/zonos-elements/{p-0e82fcea.entry.js → p-bf37c05f.entry.js} +1 -1
  126. package/dist/zonos-elements/p-c2442878.system.js +1 -1
  127. package/dist/zonos-elements/{p-976afc17.system.js → p-cca277fb.system.js} +1 -1
  128. package/dist/zonos-elements/{p-2250e585.entry.js → p-cd8ffc39.entry.js} +1 -1
  129. package/dist/zonos-elements/{p-4d594c8e.system.js → p-d24dde2c.system.js} +1 -1
  130. package/dist/zonos-elements/{p-a2a0bf4e.js → p-dadd3f97.js} +1 -1
  131. package/dist/zonos-elements/{p-0cd5bcb3.entry.js → p-dc08012c.entry.js} +1 -1
  132. package/dist/zonos-elements/{p-73c737aa.js → p-e2e1145c.js} +1 -1
  133. package/dist/zonos-elements/{p-890bfc42.system.entry.js → p-e8c344c9.system.entry.js} +1 -1
  134. package/dist/zonos-elements/{p-ed8ae947.system.entry.js → p-ef1edb24.system.entry.js} +1 -1
  135. package/dist/zonos-elements/{p-248dd596.system.entry.js → p-f0cbecc3.system.entry.js} +1 -1
  136. package/dist/zonos-elements/{p-851011aa.system.entry.js → p-f7290144.system.entry.js} +1 -1
  137. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  138. package/package.json +1 -1
  139. package/dist/zonos-elements/p-50f31c12.system.entry.js +0 -1
  140. package/dist/zonos-elements/p-6626d240.entry.js +0 -1
  141. package/dist/zonos-elements/p-81e3eb5b.js +0 -1
  142. package/dist/zonos-elements/p-dc5fb21c.js +0 -1
@@ -1,4 +1,4 @@
1
- var __awaiter=this&&this.__awaiter||function(r,e,t,o){function n(r){return r instanceof t?r:new t((function(e){e(r)}))}return new(t||(t=Promise))((function(t,a){function i(r){try{c(o.next(r))}catch(r){a(r)}}function u(r){try{c(o["throw"](r))}catch(r){a(r)}}function c(r){r.done?t(r.value):n(r.value).then(i,u)}c((o=o.apply(r,e||[])).next())}))};var __generator=this&&this.__generator||function(r,e){var t={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},o,n,a,i;return i={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function u(r){return function(e){return c([r,e])}}function c(u){if(o)throw new TypeError("Generator is already executing.");while(i&&(i=0,u[0]&&(t=0)),t)try{if(o=1,n&&(a=u[0]&2?n["return"]:u[0]?n["throw"]||((a=n["return"])&&a.call(n),0):n.next)&&!(a=a.call(n,u[1])).done)return a;if(n=0,a)u=[u[0]&2,a.value];switch(u[0]){case 0:case 1:a=u;break;case 4:t.label++;return{value:u[1],done:false};case 5:t.label++;n=u[1];u=[0];continue;case 7:u=t.ops.pop();t.trys.pop();continue;default:if(!(a=t.trys,a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){t=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){t.label=u[1];break}if(u[0]===6&&t.label<a[1]){t.label=a[1];a=u;break}if(a&&t.label<a[2]){t.label=a[2];t.ops.push(u);break}if(a[2])t.ops.pop();t.trys.pop();continue}u=e.call(r,t)}catch(r){u=[6,r];n=0}finally{o=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};import{z as zonosStore,c as createStore}from"./zonosStore-b434e436.js";import{t as trackConversionEvent,A as validateCheckoutSession,c as stripeStore,e as cartStore,v as stripeStoreHandleInventoryCheck,r as cartStoreNextStep,j as cartStoreClearCheckoutInterval}from"./cart-66aecbb3.js";import{t as translate,s as storageStore}from"./localization-04b05867.js";import{h as handleFetch,l as logError,j as jsonParse}from"./handleFetch-a844cac1.js";import{t as tinycolor}from"./isDarkColor-9ddd90cc.js";import{l as log}from"./VarianceTest-572cecf5.js";
1
+ var __awaiter=this&&this.__awaiter||function(r,e,t,o){function n(r){return r instanceof t?r:new t((function(e){e(r)}))}return new(t||(t=Promise))((function(t,a){function i(r){try{c(o.next(r))}catch(r){a(r)}}function u(r){try{c(o["throw"](r))}catch(r){a(r)}}function c(r){r.done?t(r.value):n(r.value).then(i,u)}c((o=o.apply(r,e||[])).next())}))};var __generator=this&&this.__generator||function(r,e){var t={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},o,n,a,i;return i={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function u(r){return function(e){return c([r,e])}}function c(u){if(o)throw new TypeError("Generator is already executing.");while(i&&(i=0,u[0]&&(t=0)),t)try{if(o=1,n&&(a=u[0]&2?n["return"]:u[0]?n["throw"]||((a=n["return"])&&a.call(n),0):n.next)&&!(a=a.call(n,u[1])).done)return a;if(n=0,a)u=[u[0]&2,a.value];switch(u[0]){case 0:case 1:a=u;break;case 4:t.label++;return{value:u[1],done:false};case 5:t.label++;n=u[1];u=[0];continue;case 7:u=t.ops.pop();t.trys.pop();continue;default:if(!(a=t.trys,a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){t=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){t.label=u[1];break}if(u[0]===6&&t.label<a[1]){t.label=a[1];a=u;break}if(a&&t.label<a[2]){t.label=a[2];t.ops.push(u);break}if(a[2])t.ops.pop();t.trys.pop();continue}u=e.call(r,t)}catch(r){u=[6,r];n=0}finally{o=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};import{z as zonosStore,c as createStore}from"./zonosStore-b434e436.js";import{t as trackConversionEvent,A as validateCheckoutSession,c as stripeStore,e as cartStore,v as stripeStoreHandleInventoryCheck,r as cartStoreNextStep,j as cartStoreClearCheckoutInterval}from"./cart-d802d953.js";import{t as translate,s as storageStore}from"./localization-8f12d460.js";import{h as handleFetch,l as logError,j as jsonParse}from"./handleFetch-a844cac1.js";import{t as tinycolor}from"./isDarkColor-9ddd90cc.js";import{l as log}from"./VarianceTest-572cecf5.js";
2
2
  /*!
3
3
  * paypal-js v8.1.0 (2024-06-07T16:55:00.122Z)
4
4
  * Copyright 2020-present, PayPal, Inc. All rights reserved.
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(r,t,e,n){function o(r){return r instanceof e?r:new e((function(t){t(r)}))}return new(e||(e=Promise))((function(e,i){function a(r){try{u(n.next(r))}catch(r){i(r)}}function c(r){try{u(n["throw"](r))}catch(r){i(r)}}function u(r){r.done?e(r.value):o(r.value).then(a,c)}u((n=n.apply(r,t||[])).next())}))};var __generator=this&&this.__generator||function(r,t){var e={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,a;return a={next:c(0),throw:c(1),return:c(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function c(r){return function(t){return u([r,t])}}function u(c){if(n)throw new TypeError("Generator is already executing.");while(a&&(a=0,c[0]&&(e=0)),e)try{if(n=1,o&&(i=c[0]&2?o["return"]:c[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,c[1])).done)return i;if(o=0,i)c=[c[0]&2,i.value];switch(c[0]){case 0:case 1:i=c;break;case 4:e.label++;return{value:c[1],done:false};case 5:e.label++;o=c[1];c=[0];continue;case 7:c=e.ops.pop();e.trys.pop();continue;default:if(!(i=e.trys,i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){e=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){e.label=c[1];break}if(c[0]===6&&e.label<i[1]){e.label=i[1];i=c;break}if(i&&e.label<i[2]){e.label=i[2];e.ops.push(c);break}if(i[2])e.ops.pop();e.trys.pop();continue}c=t.call(r,e)}catch(r){c=[6,r];o=0}finally{n=i=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}};import{e as cartStore}from"./cart-66aecbb3.js";import{s as storageStore}from"./localization-04b05867.js";import{l as logError,h as handleFetch}from"./handleFetch-a844cac1.js";var placeTestOrder=function(){return __awaiter(void 0,void 0,void 0,(function(){var r,t,e,n,o,i,a,c,u;return __generator(this,(function(s){switch(s.label){case 0:e=(r=cartStore.partiesData.find((function(r){return r.type==="DESTINATION"})))===null||r===void 0?void 0:r.id;n=(t=cartStore.partiesData.find((function(r){return r.type==="PAYOR"})))===null||t===void 0?void 0:t.id;o=storageStore.checkoutSessionId;if(!o||!n||!e){logError("Missing required data",{billToPartyId:n,checkoutSessionId:o,shipToPartyId:e});return[2,{errors:["Missing required data"],json:null}]}i={billToPartyId:n,checkoutSessionId:o,shipToPartyId:e};return[4,handleFetch("/api/zonos-elements/place-test-order",{body:i,method:"POST"})];case 1:a=s.sent(),c=a.errors,u=a.json;if(c.length||!u){logError("Error occurs when placing test order",c);return[2,{errors:c.map((function(r){return r.message})),json:null}]}return[2,{errors:[],json:u}]}}))}))};export{placeTestOrder as p};
1
+ var __awaiter=this&&this.__awaiter||function(r,t,e,n){function o(r){return r instanceof e?r:new e((function(t){t(r)}))}return new(e||(e=Promise))((function(e,i){function a(r){try{u(n.next(r))}catch(r){i(r)}}function c(r){try{u(n["throw"](r))}catch(r){i(r)}}function u(r){r.done?e(r.value):o(r.value).then(a,c)}u((n=n.apply(r,t||[])).next())}))};var __generator=this&&this.__generator||function(r,t){var e={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,a;return a={next:c(0),throw:c(1),return:c(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function c(r){return function(t){return u([r,t])}}function u(c){if(n)throw new TypeError("Generator is already executing.");while(a&&(a=0,c[0]&&(e=0)),e)try{if(n=1,o&&(i=c[0]&2?o["return"]:c[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,c[1])).done)return i;if(o=0,i)c=[c[0]&2,i.value];switch(c[0]){case 0:case 1:i=c;break;case 4:e.label++;return{value:c[1],done:false};case 5:e.label++;o=c[1];c=[0];continue;case 7:c=e.ops.pop();e.trys.pop();continue;default:if(!(i=e.trys,i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){e=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){e.label=c[1];break}if(c[0]===6&&e.label<i[1]){e.label=i[1];i=c;break}if(i&&e.label<i[2]){e.label=i[2];e.ops.push(c);break}if(i[2])e.ops.pop();e.trys.pop();continue}c=t.call(r,e)}catch(r){c=[6,r];o=0}finally{n=i=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}};import{e as cartStore}from"./cart-d802d953.js";import{s as storageStore}from"./localization-8f12d460.js";import{l as logError,h as handleFetch}from"./handleFetch-a844cac1.js";var placeTestOrder=function(){return __awaiter(void 0,void 0,void 0,(function(){var r,t,e,n,o,i,a,c,u;return __generator(this,(function(s){switch(s.label){case 0:e=(r=cartStore.partiesData.find((function(r){return r.type==="DESTINATION"})))===null||r===void 0?void 0:r.id;n=(t=cartStore.partiesData.find((function(r){return r.type==="PAYOR"})))===null||t===void 0?void 0:t.id;o=storageStore.checkoutSessionId;if(!o||!n||!e){logError("Missing required data",{billToPartyId:n,checkoutSessionId:o,shipToPartyId:e});return[2,{errors:["Missing required data"],json:null}]}i={billToPartyId:n,checkoutSessionId:o,shipToPartyId:e};return[4,handleFetch("/api/zonos-elements/place-test-order",{body:i,method:"POST"})];case 1:a=s.sent(),c=a.errors,u=a.json;if(c.length||!u){logError("Error occurs when placing test order",c);return[2,{errors:c.map((function(r){return r.message})),json:null}]}return[2,{errors:[],json:u}]}}))}))};export{placeTestOrder as p};
@@ -1 +1 @@
1
- import{e as cartStore}from"./cart-66aecbb3.js";import{o as applyInclusiveEffectiveRate,d as currencyFormat}from"./localization-04b05867.js";var getDisplayCurrency=function(){var r,a;var t=cartStore.displayBaseCurrency;var e=t&&((r=cartStore.exchangeRate)===null||r===void 0?void 0:r.sourceCurrencyCode)?(a=cartStore.exchangeRate)===null||a===void 0?void 0:a.sourceCurrencyCode:cartStore.currency;return e};var renderCheckoutCurrency=function(r){var a=r.amount,t=r.isForeign;var e,c;var o=((e=cartStore.exchangeRate)===null||e===void 0?void 0:e.rate)||1;var n=t?a:applyInclusiveEffectiveRate(a);var u=cartStore.currency;var v=(c=cartStore.items[0])===null||c===void 0?void 0:c.currencyCode;if(v===u){return currencyFormat({amount:n,currency:u})}var i=cartStore.displayBaseCurrency;var l=getDisplayCurrency();if(t){var y=i?n/o:n;return currencyFormat({amount:y,currency:l})}var d=i?n:n*o;return currencyFormat({amount:d,currency:l})};export{renderCheckoutCurrency as r};
1
+ import{e as cartStore}from"./cart-d802d953.js";import{o as applyInclusiveEffectiveRate,d as currencyFormat}from"./localization-8f12d460.js";var getDisplayCurrency=function(){var r,a;var t=cartStore.displayBaseCurrency;var e=t&&((r=cartStore.exchangeRate)===null||r===void 0?void 0:r.sourceCurrencyCode)?(a=cartStore.exchangeRate)===null||a===void 0?void 0:a.sourceCurrencyCode:cartStore.currency;return e};var renderCheckoutCurrency=function(r){var a=r.amount,t=r.isForeign;var e,c;var o=((e=cartStore.exchangeRate)===null||e===void 0?void 0:e.rate)||1;var n=t?a:applyInclusiveEffectiveRate(a);var u=cartStore.currency;var v=(c=cartStore.items[0])===null||c===void 0?void 0:c.currencyCode;if(v===u){return currencyFormat({amount:n,currency:u})}var i=cartStore.displayBaseCurrency;var l=getDisplayCurrency();if(t){var y=i?n/o:n;return currencyFormat({amount:y,currency:l})}var d=i?n:n*o;return currencyFormat({amount:d,currency:l})};export{renderCheckoutCurrency as r};