@zonos/elements 1.3.50 → 1.3.52

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 (208) hide show
  1. package/dist/cjs/CheckoutConfig-65376e00.js +40 -0
  2. package/dist/cjs/{cart-688d674d.js → cart-61a8983d.js} +238 -370
  3. package/dist/cjs/{createCustomEvent-01bacaea.js → createCustomEvent-228027b5.js} +3 -2
  4. package/dist/cjs/handleFetch-842c95b0.js +322 -0
  5. package/dist/cjs/index.cjs.js +75 -35
  6. package/dist/cjs/loader.cjs.js +1 -1
  7. package/dist/cjs/{paypal-ce1516ba.js → paypal-f1eb6621.js} +16 -16
  8. package/dist/cjs/zonos-address_8.cjs.entry.js +4 -4
  9. package/dist/cjs/{zonos-cart-items_12.cjs.entry.js → zonos-badge_13.cjs.entry.js} +41 -9
  10. package/dist/cjs/zonos-checkout.cjs.entry.js +75 -174
  11. package/dist/cjs/zonos-controller.cjs.entry.js +27 -25
  12. package/dist/cjs/zonos-country-flag.cjs.entry.js +2 -2
  13. package/dist/cjs/zonos-country-select_4.cjs.entry.js +2 -2
  14. package/dist/cjs/zonos-elements.cjs.js +1 -1
  15. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +2 -2
  16. package/dist/cjs/zonos-hello.cjs.entry.js +11 -11
  17. package/dist/cjs/zonos-language-select_2.cjs.entry.js +2 -2
  18. package/dist/cjs/zonos-notification_3.cjs.entry.js +9 -9
  19. package/dist/cjs/zonos-tooltip.cjs.entry.js +27 -0
  20. package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.js +5 -2
  21. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +44 -20
  22. package/dist/collection/components/store/checkout/cart.js +14 -2
  23. package/dist/collection/components/store/checkout/stripe.js +9 -4
  24. package/dist/collection/components/store/translationStore/strings.arabic.js +3 -3
  25. package/dist/collection/components/store/translationStore/strings.base.js +3 -3
  26. package/dist/collection/components/store/translationStore/strings.chinese.js +3 -3
  27. package/dist/collection/components/store/translationStore/strings.danish.js +3 -3
  28. package/dist/collection/components/store/translationStore/strings.dutch.js +3 -3
  29. package/dist/collection/components/store/translationStore/strings.french.js +3 -3
  30. package/dist/collection/components/store/translationStore/strings.german.js +3 -3
  31. package/dist/collection/components/store/translationStore/strings.hebrew.js +3 -3
  32. package/dist/collection/components/store/translationStore/strings.indonesian.js +3 -3
  33. package/dist/collection/components/store/translationStore/strings.italian.js +3 -3
  34. package/dist/collection/components/store/translationStore/strings.japanese.js +3 -3
  35. package/dist/collection/components/store/translationStore/strings.korean.js +3 -3
  36. package/dist/collection/components/store/translationStore/strings.norwegian.js +3 -3
  37. package/dist/collection/components/store/translationStore/strings.polish.js +3 -3
  38. package/dist/collection/components/store/translationStore/strings.portuguese.js +3 -3
  39. package/dist/collection/components/store/translationStore/strings.russian.js +3 -3
  40. package/dist/collection/components/store/translationStore/strings.spanish.js +3 -3
  41. package/dist/collection/components/store/translationStore/strings.swedish.js +3 -3
  42. package/dist/collection/components/store/translationStore/strings.turkish.js +3 -3
  43. package/dist/collection/components/store/translationStore/strings.vietnamese.js +3 -3
  44. package/dist/collection/components/utils/api/buildCartItemsByTempCart.js +14 -14
  45. package/dist/collection/components/utils/api/calculateLandedCostNormalized.js +28 -0
  46. package/dist/collection/components/utils/api/cartCalculateLandedCost.js +19 -0
  47. package/dist/collection/components/utils/api/prepCalculateLandedCost.js +65 -0
  48. package/dist/collection/components/utils/api/triggerBuildLandedCost.js +2 -2
  49. package/dist/collection/components/utils/checkout/initCheckout.js +4 -2
  50. package/dist/collection/components/utils/handleFetch.js +6 -1
  51. package/dist/collection/environment.js +1 -1
  52. package/dist/collection/scripts/_getNextFallbackUrl.js +1 -0
  53. package/dist/collection/scripts/_getTempCartById.js +14 -0
  54. package/dist/collection/scripts/_zonosBase.js +39 -10
  55. package/dist/collection/scripts/cart/_getCartIdFromParam.js +9 -0
  56. package/dist/collection/scripts/cart/_setupCartData.js +18 -0
  57. package/dist/collection/types/checkout/CheckoutConfig.js +2 -1
  58. package/dist/collection/types/generated/graphql.customer.types.js +12 -0
  59. package/dist/collection/utils/formattedCloudflareApiUrl.js +8 -2
  60. package/dist/collection/utils/generateCloudflareDeployUrl.js +3 -0
  61. package/dist/esm/CheckoutConfig-57350b28.js +36 -0
  62. package/dist/esm/{cart-4f300fcb.js → cart-45d2861f.js} +194 -323
  63. package/dist/esm/{createCustomEvent-c5ed9070.js → createCustomEvent-3fcc948a.js} +2 -1
  64. package/dist/esm/handleFetch-37cea185.js +315 -0
  65. package/dist/esm/index.js +56 -17
  66. package/dist/esm/loader.js +1 -1
  67. package/dist/esm/{paypal-70caf283.js → paypal-ee310945.js} +2 -2
  68. package/dist/esm/zonos-address_8.entry.js +2 -2
  69. package/dist/esm/{zonos-cart-items_12.entry.js → zonos-badge_13.entry.js} +40 -9
  70. package/dist/esm/zonos-checkout.entry.js +61 -160
  71. package/dist/esm/zonos-controller.entry.js +6 -4
  72. package/dist/esm/zonos-country-flag.entry.js +2 -2
  73. package/dist/esm/zonos-country-select_4.entry.js +2 -2
  74. package/dist/esm/zonos-elements.js +1 -1
  75. package/dist/esm/zonos-hello-dialog.entry.js +2 -2
  76. package/dist/esm/zonos-hello.entry.js +2 -2
  77. package/dist/esm/zonos-language-select_2.entry.js +2 -2
  78. package/dist/esm/zonos-notification_3.entry.js +3 -3
  79. package/dist/esm/zonos-tooltip.entry.js +23 -0
  80. package/dist/esm-es5/CheckoutConfig-57350b28.js +1 -0
  81. package/dist/esm-es5/cart-45d2861f.js +1 -0
  82. package/dist/esm-es5/{createCustomEvent-c5ed9070.js → createCustomEvent-3fcc948a.js} +1 -1
  83. package/dist/esm-es5/handleFetch-37cea185.js +1 -0
  84. package/dist/esm-es5/index.js +1 -1
  85. package/dist/esm-es5/loader.js +1 -1
  86. package/dist/esm-es5/{paypal-70caf283.js → paypal-ee310945.js} +1 -1
  87. package/dist/esm-es5/zonos-address_8.entry.js +1 -1
  88. package/dist/esm-es5/zonos-badge_13.entry.js +1 -0
  89. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  90. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  91. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  92. package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
  93. package/dist/esm-es5/zonos-elements.js +1 -1
  94. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  95. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  96. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  97. package/dist/esm-es5/zonos-notification_3.entry.js +1 -1
  98. package/dist/esm-es5/zonos-tooltip.entry.js +1 -0
  99. package/dist/scripts/index.d.ts +74 -87
  100. package/dist/scripts/index.js +1 -1
  101. package/dist/scripts/loadZonos.js +1 -1
  102. package/dist/scripts/zonos.js +1 -1
  103. package/dist/types/components/checkout/zonos-checkout/zonos-checkout.d.ts +0 -2
  104. package/dist/types/components/store/checkout/cart.d.ts +13 -3
  105. package/dist/types/components/store/checkout/stripe.d.ts +3 -1
  106. package/dist/types/components/store/translationStore/strings.arabic.d.ts +3 -3
  107. package/dist/types/components/store/translationStore/strings.base.d.ts +3 -3
  108. package/dist/types/components/store/translationStore/strings.chinese.d.ts +3 -3
  109. package/dist/types/components/store/translationStore/strings.danish.d.ts +3 -3
  110. package/dist/types/components/store/translationStore/strings.dutch.d.ts +3 -3
  111. package/dist/types/components/store/translationStore/strings.french.d.ts +3 -3
  112. package/dist/types/components/store/translationStore/strings.german.d.ts +3 -3
  113. package/dist/types/components/store/translationStore/strings.hebrew.d.ts +3 -3
  114. package/dist/types/components/store/translationStore/strings.indonesian.d.ts +3 -3
  115. package/dist/types/components/store/translationStore/strings.italian.d.ts +3 -3
  116. package/dist/types/components/store/translationStore/strings.japanese.d.ts +3 -3
  117. package/dist/types/components/store/translationStore/strings.korean.d.ts +3 -3
  118. package/dist/types/components/store/translationStore/strings.norwegian.d.ts +3 -3
  119. package/dist/types/components/store/translationStore/strings.polish.d.ts +3 -3
  120. package/dist/types/components/store/translationStore/strings.portuguese.d.ts +3 -3
  121. package/dist/types/components/store/translationStore/strings.russian.d.ts +3 -3
  122. package/dist/types/components/store/translationStore/strings.spanish.d.ts +3 -3
  123. package/dist/types/components/store/translationStore/strings.swedish.d.ts +3 -3
  124. package/dist/types/components/store/translationStore/strings.turkish.d.ts +3 -3
  125. package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +3 -3
  126. package/dist/types/components/store/translationStore.d.ts +1 -1
  127. package/dist/types/components/utils/api/buildCartItemsByTempCart.d.ts +8 -3
  128. package/dist/types/components/utils/api/calculateLandedCostNormalized.d.ts +2 -0
  129. package/dist/types/components/utils/api/cartCalculateLandedCost.d.ts +5 -0
  130. package/dist/types/components/utils/api/prepCalculateLandedCost.d.ts +5 -1
  131. package/dist/types/components/utils/checkout/getIsTestMode.d.ts +1 -1
  132. package/dist/types/scripts/_getNextFallbackUrl.d.ts +1 -0
  133. package/dist/types/scripts/_getTempCartById.d.ts +8 -0
  134. package/dist/types/scripts/_zonosBase.d.ts +15 -12
  135. package/dist/types/scripts/cart/_getCartIdFromParam.d.ts +4 -0
  136. package/dist/types/scripts/cart/_setupCartData.d.ts +7 -0
  137. package/dist/types/types/checkout/CheckoutConfig.d.ts +18 -3
  138. package/dist/types/types/checkout/api/CalculateLandedCostRequest.d.ts +42 -1
  139. package/dist/types/types/checkout/api/NormalizedTempCart.d.ts +37 -0
  140. package/dist/types/types/generated/graphql.customer.types.d.ts +249 -2
  141. package/dist/types/types/generated/graphql.customer.types.ts +251 -3
  142. package/dist/types/utils/formattedCloudflareApiUrl.d.ts +2 -2
  143. package/dist/zonos-elements/index.esm.js +1 -1
  144. package/dist/zonos-elements/p-042c466d.system.entry.js +1 -0
  145. package/dist/zonos-elements/p-10cb0064.entry.js +1 -0
  146. package/dist/zonos-elements/{p-fe198a6c.entry.js → p-259ccf8d.entry.js} +1 -1
  147. package/dist/zonos-elements/p-2a47d2cc.system.entry.js +1 -0
  148. package/dist/zonos-elements/{p-89b1f4a5.entry.js → p-31eb835c.entry.js} +1 -1
  149. package/dist/zonos-elements/{p-4849604d.entry.js → p-36360905.entry.js} +1 -1
  150. package/dist/zonos-elements/{p-322600aa.system.entry.js → p-3703b814.system.entry.js} +1 -1
  151. package/dist/zonos-elements/p-4146feec.js +1 -0
  152. package/dist/zonos-elements/p-446c8f02.system.entry.js +1 -0
  153. package/dist/zonos-elements/{p-31905b60.system.js → p-5590f90c.system.js} +1 -1
  154. package/dist/zonos-elements/p-588396df.js +1 -0
  155. package/dist/zonos-elements/{p-124e3426.js → p-6e59c6e4.js} +2 -2
  156. package/dist/zonos-elements/p-6eedc3f8.entry.js +1 -0
  157. package/dist/zonos-elements/p-747eed39.entry.js +1 -0
  158. package/dist/zonos-elements/{p-d1cd0a5f.system.entry.js → p-8228e87c.system.entry.js} +1 -1
  159. package/dist/zonos-elements/p-827868e6.entry.js +1 -0
  160. package/dist/zonos-elements/{p-a67578ae.entry.js → p-88005b94.entry.js} +1 -1
  161. package/dist/zonos-elements/p-895fdefb.js +1 -0
  162. package/dist/zonos-elements/p-8f7773b0.system.js +1 -0
  163. package/dist/zonos-elements/{p-480a6094.entry.js → p-8fa49d94.entry.js} +1 -1
  164. package/dist/zonos-elements/p-a74a7afa.system.js +1 -0
  165. package/dist/zonos-elements/p-b1861e64.system.js +1 -0
  166. package/dist/zonos-elements/{p-ec31cd17.system.entry.js → p-b842b96a.system.entry.js} +1 -1
  167. package/dist/zonos-elements/{p-1719bedd.entry.js → p-bb186075.entry.js} +1 -1
  168. package/dist/zonos-elements/{p-8af4a9e7.system.entry.js → p-c008648a.system.entry.js} +1 -1
  169. package/dist/zonos-elements/p-c78dd680.system.js +1 -1
  170. package/dist/zonos-elements/{p-22e8d4ad.system.entry.js → p-cd4ad1be.system.entry.js} +1 -1
  171. package/dist/zonos-elements/{p-e7e73693.system.entry.js → p-d62e6bb0.system.entry.js} +1 -1
  172. package/dist/zonos-elements/{p-40d52dd6.system.entry.js → p-dc12f30a.system.entry.js} +1 -1
  173. package/dist/zonos-elements/p-eb2aedd0.js +1 -0
  174. package/dist/zonos-elements/{p-ceb8b836.system.js → p-f124e459.system.js} +2 -2
  175. package/dist/zonos-elements/p-f527cd5b.entry.js +1 -0
  176. package/dist/zonos-elements/p-f826b979.system.entry.js +1 -0
  177. package/dist/zonos-elements/p-f87a635b.system.js +1 -0
  178. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  179. package/package.json +2 -1
  180. package/dist/cjs/logError-4e2f2020.js +0 -58
  181. package/dist/cjs/zonos-badge_2.cjs.entry.js +0 -57
  182. package/dist/collection/components/utils/api/tempCartItem/getAttributes.js +0 -66
  183. package/dist/collection/components/utils/api/tempCartItem/getMeasurements.js +0 -58
  184. package/dist/esm/logError-c456c092.js +0 -55
  185. package/dist/esm/zonos-badge_2.entry.js +0 -52
  186. package/dist/esm-es5/cart-4f300fcb.js +0 -1
  187. package/dist/esm-es5/logError-c456c092.js +0 -1
  188. package/dist/esm-es5/zonos-badge_2.entry.js +0 -1
  189. package/dist/esm-es5/zonos-cart-items_12.entry.js +0 -1
  190. package/dist/types/components/utils/api/tempCartItem/getAttributes.d.ts +0 -11
  191. package/dist/types/components/utils/api/tempCartItem/getMeasurements.d.ts +0 -7
  192. package/dist/types/types/checkout/api/TempCart.d.ts +0 -80
  193. package/dist/zonos-elements/p-00f219bd.entry.js +0 -1
  194. package/dist/zonos-elements/p-05dff37f.js +0 -1
  195. package/dist/zonos-elements/p-1f2db2ff.entry.js +0 -1
  196. package/dist/zonos-elements/p-2018969a.js +0 -1
  197. package/dist/zonos-elements/p-27f2e8af.system.entry.js +0 -1
  198. package/dist/zonos-elements/p-4452dddc.entry.js +0 -1
  199. package/dist/zonos-elements/p-47c72c50.system.entry.js +0 -1
  200. package/dist/zonos-elements/p-595d406e.entry.js +0 -1
  201. package/dist/zonos-elements/p-5beccdce.system.entry.js +0 -1
  202. package/dist/zonos-elements/p-6013e370.entry.js +0 -1
  203. package/dist/zonos-elements/p-63db40b9.system.js +0 -1
  204. package/dist/zonos-elements/p-6ab615e6.system.js +0 -1
  205. package/dist/zonos-elements/p-81540fd6.system.js +0 -1
  206. package/dist/zonos-elements/p-d709ad28.system.entry.js +0 -1
  207. package/dist/zonos-elements/p-eaa335e1.js +0 -1
  208. /package/dist/collection/types/checkout/api/{TempCart.js → NormalizedTempCart.js} +0 -0
@@ -0,0 +1 @@
1
+ var __awaiter=this&&this.__awaiter||function(t,n,e,i){function o(t){return t instanceof e?t:new e((function(n){n(t)}))}return new(e||(e=Promise))((function(e,r){function u(t){try{a(i.next(t))}catch(t){r(t)}}function s(t){try{a(i["throw"](t))}catch(t){r(t)}}function a(t){t.done?e(t.value):o(t.value).then(u,s)}a((i=i.apply(t,n||[])).next())}))};var __generator=this&&this.__generator||function(t,n){var e={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},i,o,r,u;return u={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(u[Symbol.iterator]=function(){return this}),u;function s(t){return function(n){return a([t,n])}}function a(s){if(i)throw new TypeError("Generator is already executing.");while(u&&(u=0,s[0]&&(e=0)),e)try{if(i=1,o&&(r=s[0]&2?o["return"]:s[0]?o["throw"]||((r=o["return"])&&r.call(o),0):o.next)&&!(r=r.call(o,s[1])).done)return r;if(o=0,r)s=[s[0]&2,r.value];switch(s[0]){case 0:case 1:r=s;break;case 4:e.label++;return{value:s[1],done:false};case 5:e.label++;o=s[1];s=[0];continue;case 7:s=e.ops.pop();e.trys.pop();continue;default:if(!(r=e.trys,r=r.length>0&&r[r.length-1])&&(s[0]===6||s[0]===2)){e=0;continue}if(s[0]===3&&(!r||s[1]>r[0]&&s[1]<r[3])){e.label=s[1];break}if(s[0]===6&&e.label<r[1]){e.label=r[1];r=s;break}if(r&&e.label<r[2]){e.label=r[2];e.ops.push(s);break}if(r[2])e.ops.pop();e.trys.pop();continue}s=n.call(t,e)}catch(t){s=[6,t];o=0}finally{i=r=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-fd061229.system.js","./p-8f7773b0.system.js","./p-8e8defdc.system.js","./p-a74a7afa.system.js","./p-29814fd7.system.js","./p-e97793ce.system.js"],(function(t){"use strict";var n,e,i,o,r,u,s,a,c,f,d,h,l,v,w;return{setters:[function(t){n=t.r;e=t.c;i=t.h;o=t.H},function(t){r=t.w;u=t.j;s=t.x;a=t.d;c=t.a},function(t){f=t.z;d=t.b;h=t.d},function(t){l=t.h;v=t.a;w=t.l},function(){},function(){}],execute:function(){var m=this;var _=function(){return __awaiter(m,void 0,void 0,(function(){var t,n,e,i;return __generator(this,(function(o){switch(o.label){case 0:return[4,l("/api/zonos-elements/zonos-settings")];case 1:t=o.sent(),n=t.errors,e=t.json,i=t.zonosMode;if(n.length){v("Error occurred when getting zonos settings. If this is not an unauthorized error, it will use user settings or default settings");return[2,{errors:n,json:null,zonosMode:i}]}return[2,{errors:[],json:e,zonosMode:i}]}}))}))};var p=function(){var t=document.querySelector("zonos-checkout");if(!t){var n=document.createElement("zonos-checkout");document.body.appendChild(n)}};var b=function(t){if(!t.placeOrderButtonSelector&&!window.Zonos.cartData){return}if(t.placeOrderButtonSelector&&!r(t.placeOrderButtonSelector)){v('Selector checkoutButtonAnchor "'.concat(t.placeOrderButtonSelector,'" is not a valid selector'));return}p()};var g=function(t){var n=document.querySelector(t);var e=document.querySelector("zonos-hello");if(!e&&n){var i=document.createElement("zonos-hello");n.appendChild(i);return true}return false};var y=function(t){var n=t.position,e=n===void 0?"bottom-right":n;var i=".zonos--hello-mobile-wrapper";var o=document.querySelector(i);if(o){return i}var r=document.createElement("div");r.className="zonos--hello-mobile-wrapper";r.style.position="fixed";if(e==="top-right"){r.style.top="72px";r.style.right="24px"}if(e==="top-left"){r.style.top="72px";r.style.left="24px"}if(e==="bottom-right"){r.style.bottom="72px";r.style.right="24px"}if(e==="bottom-left"){r.style.bottom="72px";r.style.left="24px"}r.style.zIndex="2147483007";document.body.appendChild(r);return i};var z=function(t){return __awaiter(m,void 0,void 0,(function(){var n,e,i,o,u;return __generator(this,(function(s){n=t.anchorElementSelector;e=n;if(!t.anchorElementSelector&&t.desktopLocation){i=y({position:"bottom-right"});e=i}if(!e||!r(e)){v('Selector anchorElementSelector "'.concat(t.anchorElementSelector,'" is not a valid selector.'));return[2]}w("Hello init complete");o=g(e);if(!o){u=new MutationObserver((function(){var t=g(e);if(t){u.disconnect()}}));u.observe(document.body,{childList:true,subtree:true});setTimeout((function(){g(e)}),1e3)}return[2]}))}))};var j=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{visibility:hidden;opacity:0;height:0}";var I=j;var k=t("zonos_controller",function(){function t(t){n(this,t);this.paypalInitEvent=e(this,"paypalInitEvent",7);this.stripeInitEvent=e(this,"stripeInitEvent",7);this.config=undefined;this.zonosApiKey=undefined}t.prototype.initCheckoutElement=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){if(!t){w("Stripe is not loaded yet - cannot init checkout element","warn");return[2]}u.stripe=t;void b(f.checkoutSettings);w("init checkout element");return[2]}))}))};t.prototype.initZonosNotification=function(){var t=document.querySelector("zonos-notification");if(t){return}var n=document.createElement("zonos-notification");document.body.appendChild(n)};t.prototype.setupGoogleFont=function(t){return __awaiter(this,void 0,void 0,(function(){var n,e,i,o,r,u,s,a;return __generator(this,(function(c){switch(c.label){case 0:i=t||h();if(i==="Inter"){if(!t){return[2]}w("[FONT] Just applied Inter , but no need to inject since we already inject Inter on start","warn");f.appearance=Object.assign(Object.assign({},f.appearance),{fontFamily:t})}o=new URLSearchParams;o.set("family",i);return[4,l("/api/zonos-elements/get-font-detail?".concat(o.toString()))];case 1:r=c.sent(),u=r.errors,s=r.json;if(u.length>0||!s){w("Failed to load font ".concat(i),"warn");f.appearance=Object.assign(Object.assign({},f.appearance),{fontFamily:"Inter"});return[2]}a=s.fontUrl;(e=(n=window.Zonos).injectSupportGoogleFont)===null||e===void 0?void 0:e.call(n,a);if(!t){return[2]}w("[FONT] ".concat(t," font override applied"));f.appearance=Object.assign(Object.assign({},f.appearance),{fontFamily:t});return[2]}}))}))};t.prototype.handleLocationChange=function(){void z(f.helloSettings)};t.prototype.initHistoryListener=function(){var t=history.pushState;history.pushState=function n(){window.dispatchEvent(new window.Event("pushstate"));window.dispatchEvent(new window.Event("locationchange"));return t.apply(this,arguments)};var n=history.replaceState;history.replaceState=function t(){window.dispatchEvent(new window.Event("replacestate"));window.dispatchEvent(new window.Event("locationchange"));return n.apply(this,arguments)}};t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(n){this.initHistoryListener();f.zonosApiKey=this.zonosApiKey;(function(){return __awaiter(t,void 0,void 0,(function(){var t,n,e,i,o,r,u,a;return __generator(this,(function(c){switch(c.label){case 0:return[4,_()];case 1:e=c.sent(),i=e.errors,o=e.json,r=e.zonosMode;if(((t=i[0])===null||t===void 0?void 0:t.type.toString())==="403"){w("Failed to load zonos settings. This domain may not have access","warn");return[2]}this.initZonosNotification();u=Object.assign(Object.assign({},this.config),{checkoutSettings:this.config.checkoutSettings?Object.assign(Object.assign({},this.config.checkoutSettings),{subscriptionStatus:undefined}):undefined});d({overrideSettings:u,zonosSettings:o});f.zonosMode=r;void this.setupGoogleFont();if(f.helloSettings.visibilityStatus==="DISABLED"){w("=== Hello is disabled by store owner ===","warn")}if(f.helloSettings&&f.helloSettings.visibilityStatus==="ENABLED"){w("Initializing hello");void z(f.helloSettings)}return[4,s()];case 2:c.sent();a=((n=o===null||o===void 0?void 0:o.checkoutSettings)===null||n===void 0?void 0:n.externalServiceTokens.find((function(t){return t.type==="STRIPE_PUBLISHABLE_TOKEN"})))||null;if(!a||!this.stripeInitEvent){w("Checkout failed to load -- missing publishable key","warn");return[2]}if(f.checkoutSettings.subscriptionStatus==="INACTIVE"){w('=== Checkout subscription is "INACTIVE" - Cancel initializing for Checkout ===',"warn");w("zonos controller loaded");return[2]}if(f.checkoutSettings.visibilityStatus==="DISABLED"){w("=== Checkout is disabled by store owner ===","warn");w("zonos controller loaded");return[2]}this.stripeInitEvent.emit({publishableKey:a.token});return[2]}}))}))})();return[2]}))}))};t.prototype.showNotification=function(t){return __awaiter(this,void 0,void 0,(function(){var n;return __generator(this,(function(e){n=document.querySelector("zonos-notification");if(!n){w("Failed to show notification - zonos-notification not found","warn");return[2]}void n.showNotification(t);return[2]}))}))};t.prototype.reset=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){a.checkoutSessionId=null;u.clientSecret=null;return[2]}))}))};t.prototype.overrideConfig=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){d({overrideSettings:t,zonosSettings:null});return[2]}))}))};t.prototype.overrideCountry=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){w("Override country code to ".concat(t));void c(t);return[2]}))}))};t.prototype.getAppearanceSetting=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,f.appearance]}))}))};t.prototype.updateOrganizationName=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){f.organizationName=t;return[2]}))}))};t.prototype.render=function(){return i(o,{key:"10fe4b2e7b375fa25484bb55077b73d2421735ae",class:"zonos--elements"})};return t}());k.style=I}}}));
@@ -0,0 +1 @@
1
+ var __awaiter=this&&this.__awaiter||function(t,n,e,r){function o(t){return t instanceof e?t:new e((function(n){n(t)}))}return new(e||(e=Promise))((function(e,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function c(t){try{u(r["throw"](t))}catch(t){i(t)}}function u(t){t.done?e(t.value):o(t.value).then(a,c)}u((r=r.apply(t,n||[])).next())}))};var __generator=this&&this.__generator||function(t,n){var e={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,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(t){return function(n){return u([t,n])}}function u(c){if(r)throw new TypeError("Generator is already executing.");while(a&&(a=0,c[0]&&(e=0)),e)try{if(r=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=n.call(t,e)}catch(t){c=[6,t];o=0}finally{r=i=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}};System.register(["./p-a74a7afa.system.js"],(function(t){"use strict";var n,e,r;return{setters:[function(t){n=t.h;e=t.l;r=t.a}],execute:function(){var o=this;var i=function(t){return __awaiter(o,void 0,void 0,(function(){var e,r,o;return __generator(this,(function(i){switch(i.label){case 0:return[4,n("/api/zonos-elements/get-temp-cart",{body:{tempCartUUID:t},headers:{"Content-Type":"application/json"},method:"POST"})];case 1:e=i.sent(),r=e.errors,o=e.json;if(!o||r.length){return[2,null]}return[2,o]}}))}))};var a=t("s",(function(t){return __awaiter(o,void 0,void 0,(function(){var n;return __generator(this,(function(o){switch(o.label){case 0:return[4,i(t)];case 1:n=o.sent();e("[ZONOS - loadZonos] getting temp cart data","info",n);if(!n){r("[ZONOS - loadZonos] Error getting temp cart data, stop checkout process.");return[2,null]}return[2,{cartData:n.cartData,storeFavicon:n.storeFaviconUrl,storeId:n.cartData.storeId,storeLogo:n.storeLogoUrl,zonosApiKey:n.cartData.credentialToken}]}}))}))}));var c=t("c","zonos--checkout-hidden-button");var u=t("d","zonos--domestic-redirected-checkout-button")}}}));
@@ -1 +1 @@
1
- import{p as e,b as o}from"./p-5b7da777.js";export{s as setNonce}from"./p-5b7da777.js";import{g as t}from"./p-e1255160.js";(()=>{const o=import.meta.url,t={};return""!==o&&(t.resourcesUrl=new URL(".",o).href),e(t)})().then((async e=>(await t(),o([["p-4452dddc",[[2,"zonos-checkout",{appearanceSettingsOverride:[16],preview:[4],mobile:[4],defaultAddress:[16],forceDialogOpen:[4,"force-dialog-open"],open:[32],stripe:[32],submitLoading:[32],collapseReviewMobile:[32],isAttachError:[32],isMobile:[32],zonosReviewRef:[32],storybookPaymentStatusOverride:[32],domesticRedirectedBtnSelector:[32],legacyCheckoutHiddenBtnSelector:[32],isLegacyCheckout:[32],confirmDialogOpen:[32],inventoryCheckErrorMessage:[32],closeDialogHandler:[64],init:[64],setToFinishStep:[64]},[[16,"zonos--init-cart-info","initCartInfoHandler"],[4,"keydown","handleKeyPress"],[9,"resize","handleWindowResize"]],{appearanceSettingsOverride:["appearanceSettingsOverrideChanged","handleAppearanceSettingsOverrideChange"],mobile:["handleMobileChange"],defaultAddress:["handleAddressChange"]}]]],["p-1719bedd",[[1,"zonos-hello",{mobileLocationOverride:[1,"mobile-location-override"],animateFromLeftOverride:[4,"animate-from-left-override"],appearanceSettingsOverride:[16],showPeekMessage:[32],zonosStoreHelloSettings:[32],showDialog:[32],peekMessage:[32],initialUrl:[32],allRestrictedItems:[32],allFoundProducts:[32],productsOnPage:[32],isHelloWidgetRendered:[32],isMobile:[32],getCountryList:[64],displayCurrency:[64],convertAndFormat:[64],convert:[64],format:[64],openHelloDialog:[64]},[[9,"resize","handleResize"]],{appearanceSettingsOverride:["handleAppearanceSettingsOverrideChange"]}]]],["p-1f2db2ff",[[1,"zonos-controller",{config:[16],zonosApiKey:[1,"zonos-api-key"],initCheckoutElement:[64],setupGoogleFont:[64],showNotification:[64],reset:[64],overrideConfig:[64],overrideCountry:[64],getAppearanceSetting:[64],updateOrganizationName:[64]},[[8,"locationchange","handleLocationChange"]]]]],["p-6de38759",[[1,"zonos-component",{first:[1],middle:[1],last:[1]}]]],["p-25633055",[[1,"zonos-link",{href:[1],rel:[1],target:[1],linkTitle:[1,"link-title"]}]]],["p-70bb4a25",[[1,"zonos-logo",{theme:[1],width:[1]}]]],["p-5f7f51bd",[[1,"zonos-text",{textColor:[1,"text-color"],size:[1],type:[1],weight:[2],ready:[32]}]]],["p-595d406e",[[1,"zonos-hello-dialog",{isOpen:[4,"is-open"],setIsOpen:[16],mobileLocationOverride:[1,"mobile-location-override"],animateFromLeftOverride:[4,"animate-from-left-override"],appearanceSettings:[16],restrictedItems:[16],welcomeMessage:[32],showCountrySelect:[32],showLanguageSelect:[32]},[[4,"click","globalClickHandler"]],{isOpen:["isOpenHandler"]}]]],["p-cf9a46e8",[[1,"zonos-shipping-rich-radio",{items:[16],borderColor:[1,"border-color"],borderStyle:[1,"border-style"],theme:[1],initialSelectedValue:[8,"initial-selected-value"],selectedItem:[32]}]]],["p-6013e370",[[1,"zonos-badge",{bold:[4],badgeColor:[1,"badge-color"],icon:[16],iconRight:[4,"icon-right"],size:[1],rounded:[4]}],[1,"zonos-tooltip",{label:[1],subtitle:[1],showTooltip:[32]}]]],["p-a4309beb",[[1,"zonos-input",{inputValue:[1,"input-value"],inputLabel:[1,"input-label"],inputSize:[1,"input-size"],isDisabled:[4,"is-disabled"],isError:[4,"is-error"],inputPlaceholder:[1,"input-placeholder"],value:[32]},null,{inputValue:["onInputValueChange"]}]]],["p-8e9dcaa3",[[1,"zonos-card",{actions:[16],backgroundColor:[1,"background-color"],borderRadius:[2,"border-radius"],footerActions:[16],footerContent:[16],footerHeight:[2,"footer-height"],label:[16],spacing:[1]}]]],["p-89b1f4a5",[[2,"zonos-payment",{titleText:[1,"title-text"],stripe:[32],stripeElements:[32]},null,{stripeElements:["watchInitStripe"],stripe:["watchInitStripe"]}],[2,"zonos-paypal-payment"],[1,"zonos-notification",{notificationArray:[32],showNotification:[64]}]]],["p-6dcef5ce",[[1,"zonos-banner",{bannerTitle:[1,"banner-title"],intent:[1],hasContent:[32]}]]],["p-a67578ae",[[1,"zonos-country-flag",{countryCode:[1,"country-code"],size:[2]}]]],["p-eb3520e7",[[1,"zonos-v-stack",{spacing:[2]}]]],["p-54f66cd1",[[17,"zonos-button",{buttonColor:[1,"button-color"],backgroundColor:[1,"background-color"],borderStyle:[1,"border-style"],isDisabled:[4,"is-disabled"],icon:[16],iconRight:[4,"icon-right"],size:[1],variant:[1],noBackground:[4,"no-background"],withBoxShadow:[4,"with-box-shadow"],noPaddingLeft:[4,"no-padding-left"],noPaddingRight:[4,"no-padding-right"],loading:[4],justifyContent:[1,"justify-content"],theme:[1],hasIcon:[32],hasContent:[32]},[[2,"click","clickHandler"]],{icon:["iconChangeHandler"]}],[1,"zonos-spinner",{size:[2],spinnerColor:[1,"spinner-color"]}],[1,"zonos-icon",{autoHeight:[4,"auto-height"],iconColor:[1,"icon-color"],content:[1],size:[2]}]]],["p-fe198a6c",[[1,"zonos-language-select",{handleOnClose:[16]}],[1,"zonos-select-dialog-header",{handleOnClose:[16],label:[1]}]]],["p-4849604d",[[1,"zonos-country-select",{handleOnClose:[16],inputValue:[32]}],[1,"zonos-hello-dialog-footer",{appearanceSettings:[16],setShowCountrySelect:[16],setShowLanguageSelect:[16]}],[1,"zonos-custom-message",{icon:[1],message:[1]}],[2,"zonos-virtual-scroll",{renderItem:[16],itemWidth:[2,"item-width"],fallbackItemHeight:[2,"fallback-item-height"],itemHeights:[16],container:[32],scrollTop:[32],totalHeight:[32]},null,{itemHeights:["updateTotalHeight"],fallbackItemHeight:["updateTotalHeight"]}]]],["p-480a6094",[[1,"zonos-address-update-dialog",{continueLoading:[4,"continue-loading"],dialogLoading:[4,"dialog-loading"],dialogOpen:[4,"dialog-open"],submitBtnType:[1,"submit-btn-type"],submitBtnColor:[1,"submit-btn-color"],isMobile:[4,"is-mobile"],shippingAddress:[16],billingAddress:[16],translatedShippingAddress:[16],translatedBillingAddress:[16],showErrorBanner:[32],translatedShippingAddressState:[32],translatedBillingAddressState:[32]},null,{translatedShippingAddress:["watchTranslatedShippingAddress"],translatedBillingAddress:["watchTranslatedBillingAddress"]}],[2,"zonos-address",{type:[1],titleText:[1,"title-text"],defaultAddress:[16],stripe:[32],isDirtyAddress:[32]},null,{stripe:["watchInitStripe"]}],[1,"zonos-checkbox",{backgroundColor:[1,"background-color"],label:[1],isChecked:[4,"is-checked"],isDisabled:[4,"is-disabled"],size:[2],fontSize:[1,"font-size"],borderStyle:[1,"border-style"]},[[1,"click","onClick"]]],[2,"zonos-link-authentication",{titleText:[1,"title-text"],defaultEmail:[1,"default-email"],stripe:[32]},null,{stripe:["watchInitStripe"]}],[1,"zonos-dialog",{open:[4],headerText:[1,"header-text"],width:[1],height:[1],minHeight:[1,"min-height"],noHeader:[4,"no-header"],noBodyPadding:[4,"no-body-padding"],noBorder:[4,"no-border"],borderStyle:[1,"border-style"],noCloseButton:[4,"no-close-button"],noClickOutside:[4,"no-click-outside"],mobile:[4],isLoading:[4,"is-loading"],isMobile:[32]},[[9,"resize","handleWindowResize"],[4,"keydown","handleKeyDown"]]],[1,"zonos-address-display",{currentAddress:[16],addressType:[1,"address-type"]}],[1,"zonos-address-form",{currentAddress:[16],translatedAddress:[16],addressType:[1,"address-type"],localAddress:[32]},null,{translatedAddress:["watchCurrentAddress"]}],[1,"zonos-collapse",{collapsed:[4],collapseSize:[2,"collapse-size"],height:[32],iframe:[32]}]]],["p-00f219bd",[[2,"zonos-customer-info",{continueLoading:[4,"continue-loading"],submitBtnType:[1,"submit-btn-type"],submitBtnColor:[1,"submit-btn-color"],isMobile:[4,"is-mobile"],defaultAddress:[16],showErrorBanner:[32],shippingCountry:[32],isCheckingForRestrictedItems:[32],isValidatingAddress:[32],invalidShippingCharacterList:[32],invalidBillingCharacterList:[32],openAddressValidationDialog:[32]}],[2,"zonos-checkout-payment",{submitBtnType:[1,"submit-btn-type"],continueLoading:[4,"continue-loading"],submitBtnColor:[1,"submit-btn-color"],showErrorBanner:[32]}],[1,"zonos-checkout-footer",{mobile:[4],dataTheme:[1,"data-theme"],showLanguageDialog:[32],isMobile:[32]},[[4,"click","handleGlobalClick"]],{mobile:["handleMobileChange"]}],[2,"zonos-shipping",{continueLoading:[4,"continue-loading"],submitBtnColor:[1,"submit-btn-color"],submitBtnType:[1,"submit-btn-type"],selectedShippingMethod:[32],isSelecting:[32],showErrorBanner:[32],serviceLevels:[32]}],[1,"zonos-cart-restricted-items",{hide:[4],errorImages:[32],internalCollapsed:[32],firstRender:[32]}],[1,"zonos-cart-subtotal"],[1,"zonos-checkout-finish",{borderRadius:[1,"border-radius"],storybookForceStatus:[1,"storybook-force-status"],overrideNotification:[16],isLoading:[32],notificationType:[32],notificationTitle:[32],notificationMessages:[32],notificationActionText:[32],order:[32]}],[1,"zonos-confirm-dialog",{dialogTitle:[1,"dialog-title"],dialogIntent:[1,"dialog-intent"],dialogSubtitle:[1,"dialog-subtitle"],submitBtnColor:[1,"submit-btn-color"],dialogConfirmBtnText:[1,"dialog-confirm-btn-text"],dialogCancelBtnText:[1,"dialog-cancel-btn-text"],dialogType:[1,"dialog-type"],isMobile:[4,"is-mobile"],dialogOpen:[4,"dialog-open"],noClickOutside:[4,"no-click-outside"]},[[4,"keydown","handleKeyDown"]]],[1,"zonos-checkout-progress-tabs",{tabColor:[1,"tab-color"],backgroundColor:[1,"background-color"],setTabItems:[64],setTabSelected:[64]}],[1,"zonos-review",{mobile:[4],collapsed:[4],isMobile:[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-cart-items",{errorImages:[32]}],[1,"zonos-rest-state",{restStateSubtitle:[1,"rest-state-subtitle"],restStateTitle:[1,"rest-state-title"],restStateType:[1,"rest-state-type"],isErrorImageLoad:[32]}]]]],e))));
1
+ import{p as e,b as o}from"./p-5b7da777.js";export{s as setNonce}from"./p-5b7da777.js";import{g as t}from"./p-e1255160.js";(()=>{const o=import.meta.url,t={};return""!==o&&(t.resourcesUrl=new URL(".",o).href),e(t)})().then((async e=>(await t(),o([["p-6eedc3f8",[[2,"zonos-checkout",{appearanceSettingsOverride:[16],preview:[4],mobile:[4],defaultAddress:[16],forceDialogOpen:[4,"force-dialog-open"],open:[32],stripe:[32],submitLoading:[32],collapseReviewMobile:[32],isAttachError:[32],isMobile:[32],zonosReviewRef:[32],storybookPaymentStatusOverride:[32],isLegacyCheckout:[32],confirmDialogOpen:[32],inventoryCheckErrorMessage:[32],closeDialogHandler:[64],init:[64],setToFinishStep:[64]},[[16,"zonos--init-cart-info","initCartInfoHandler"],[4,"keydown","handleKeyPress"],[9,"resize","handleWindowResize"]],{appearanceSettingsOverride:["appearanceSettingsOverrideChanged","handleAppearanceSettingsOverrideChange"],mobile:["handleMobileChange"],defaultAddress:["handleAddressChange"]}]]],["p-bb186075",[[1,"zonos-hello",{mobileLocationOverride:[1,"mobile-location-override"],animateFromLeftOverride:[4,"animate-from-left-override"],appearanceSettingsOverride:[16],showPeekMessage:[32],zonosStoreHelloSettings:[32],showDialog:[32],peekMessage:[32],initialUrl:[32],allRestrictedItems:[32],allFoundProducts:[32],productsOnPage:[32],isHelloWidgetRendered:[32],isMobile:[32],getCountryList:[64],displayCurrency:[64],convertAndFormat:[64],convert:[64],format:[64],openHelloDialog:[64]},[[9,"resize","handleResize"]],{appearanceSettingsOverride:["handleAppearanceSettingsOverrideChange"]}]]],["p-f527cd5b",[[1,"zonos-controller",{config:[16],zonosApiKey:[1,"zonos-api-key"],initCheckoutElement:[64],setupGoogleFont:[64],showNotification:[64],reset:[64],overrideConfig:[64],overrideCountry:[64],getAppearanceSetting:[64],updateOrganizationName:[64]},[[8,"locationchange","handleLocationChange"]]]]],["p-6de38759",[[1,"zonos-component",{first:[1],middle:[1],last:[1]}]]],["p-25633055",[[1,"zonos-link",{href:[1],rel:[1],target:[1],linkTitle:[1,"link-title"]}]]],["p-70bb4a25",[[1,"zonos-logo",{theme:[1],width:[1]}]]],["p-5f7f51bd",[[1,"zonos-text",{textColor:[1,"text-color"],size:[1],type:[1],weight:[2],ready:[32]}]]],["p-747eed39",[[1,"zonos-tooltip",{label:[1],subtitle:[1],showTooltip:[32]}]]],["p-8e9dcaa3",[[1,"zonos-card",{actions:[16],backgroundColor:[1,"background-color"],borderRadius:[2,"border-radius"],footerActions:[16],footerContent:[16],footerHeight:[2,"footer-height"],label:[16],spacing:[1]}]]],["p-6dcef5ce",[[1,"zonos-banner",{bannerTitle:[1,"banner-title"],intent:[1],hasContent:[32]}]]],["p-eb3520e7",[[1,"zonos-v-stack",{spacing:[2]}]]],["p-259ccf8d",[[1,"zonos-language-select",{handleOnClose:[16]}],[1,"zonos-select-dialog-header",{handleOnClose:[16],label:[1]}]]],["p-36360905",[[1,"zonos-country-select",{handleOnClose:[16],inputValue:[32]}],[1,"zonos-hello-dialog-footer",{appearanceSettings:[16],setShowCountrySelect:[16],setShowLanguageSelect:[16]}],[1,"zonos-custom-message",{icon:[1],message:[1]}],[2,"zonos-virtual-scroll",{renderItem:[16],itemWidth:[2,"item-width"],fallbackItemHeight:[2,"fallback-item-height"],itemHeights:[16],container:[32],scrollTop:[32],totalHeight:[32]},null,{itemHeights:["updateTotalHeight"],fallbackItemHeight:["updateTotalHeight"]}]]],["p-10cb0064",[[1,"zonos-hello-dialog",{isOpen:[4,"is-open"],setIsOpen:[16],mobileLocationOverride:[1,"mobile-location-override"],animateFromLeftOverride:[4,"animate-from-left-override"],appearanceSettings:[16],restrictedItems:[16],welcomeMessage:[32],showCountrySelect:[32],showLanguageSelect:[32]},[[4,"click","globalClickHandler"]],{isOpen:["isOpenHandler"]}]]],["p-cf9a46e8",[[1,"zonos-shipping-rich-radio",{items:[16],borderColor:[1,"border-color"],borderStyle:[1,"border-style"],theme:[1],initialSelectedValue:[8,"initial-selected-value"],selectedItem:[32]}]]],["p-a4309beb",[[1,"zonos-input",{inputValue:[1,"input-value"],inputLabel:[1,"input-label"],inputSize:[1,"input-size"],isDisabled:[4,"is-disabled"],isError:[4,"is-error"],inputPlaceholder:[1,"input-placeholder"],value:[32]},null,{inputValue:["onInputValueChange"]}]]],["p-31eb835c",[[2,"zonos-payment",{titleText:[1,"title-text"],stripe:[32],stripeElements:[32]},null,{stripeElements:["watchInitStripe"],stripe:["watchInitStripe"]}],[2,"zonos-paypal-payment"],[1,"zonos-notification",{notificationArray:[32],showNotification:[64]}]]],["p-88005b94",[[1,"zonos-country-flag",{countryCode:[1,"country-code"],size:[2]}]]],["p-54f66cd1",[[17,"zonos-button",{buttonColor:[1,"button-color"],backgroundColor:[1,"background-color"],borderStyle:[1,"border-style"],isDisabled:[4,"is-disabled"],icon:[16],iconRight:[4,"icon-right"],size:[1],variant:[1],noBackground:[4,"no-background"],withBoxShadow:[4,"with-box-shadow"],noPaddingLeft:[4,"no-padding-left"],noPaddingRight:[4,"no-padding-right"],loading:[4],justifyContent:[1,"justify-content"],theme:[1],hasIcon:[32],hasContent:[32]},[[2,"click","clickHandler"]],{icon:["iconChangeHandler"]}],[1,"zonos-spinner",{size:[2],spinnerColor:[1,"spinner-color"]}],[1,"zonos-icon",{autoHeight:[4,"auto-height"],iconColor:[1,"icon-color"],content:[1],size:[2]}]]],["p-8fa49d94",[[1,"zonos-address-update-dialog",{continueLoading:[4,"continue-loading"],dialogLoading:[4,"dialog-loading"],dialogOpen:[4,"dialog-open"],submitBtnType:[1,"submit-btn-type"],submitBtnColor:[1,"submit-btn-color"],isMobile:[4,"is-mobile"],shippingAddress:[16],billingAddress:[16],translatedShippingAddress:[16],translatedBillingAddress:[16],showErrorBanner:[32],translatedShippingAddressState:[32],translatedBillingAddressState:[32]},null,{translatedShippingAddress:["watchTranslatedShippingAddress"],translatedBillingAddress:["watchTranslatedBillingAddress"]}],[2,"zonos-address",{type:[1],titleText:[1,"title-text"],defaultAddress:[16],stripe:[32],isDirtyAddress:[32]},null,{stripe:["watchInitStripe"]}],[1,"zonos-checkbox",{backgroundColor:[1,"background-color"],label:[1],isChecked:[4,"is-checked"],isDisabled:[4,"is-disabled"],size:[2],fontSize:[1,"font-size"],borderStyle:[1,"border-style"]},[[1,"click","onClick"]]],[2,"zonos-link-authentication",{titleText:[1,"title-text"],defaultEmail:[1,"default-email"],stripe:[32]},null,{stripe:["watchInitStripe"]}],[1,"zonos-dialog",{open:[4],headerText:[1,"header-text"],width:[1],height:[1],minHeight:[1,"min-height"],noHeader:[4,"no-header"],noBodyPadding:[4,"no-body-padding"],noBorder:[4,"no-border"],borderStyle:[1,"border-style"],noCloseButton:[4,"no-close-button"],noClickOutside:[4,"no-click-outside"],mobile:[4],isLoading:[4,"is-loading"],isMobile:[32]},[[9,"resize","handleWindowResize"],[4,"keydown","handleKeyDown"]]],[1,"zonos-address-display",{currentAddress:[16],addressType:[1,"address-type"]}],[1,"zonos-address-form",{currentAddress:[16],translatedAddress:[16],addressType:[1,"address-type"],localAddress:[32]},null,{translatedAddress:["watchCurrentAddress"]}],[1,"zonos-collapse",{collapsed:[4],collapseSize:[2,"collapse-size"],height:[32],iframe:[32]}]]],["p-827868e6",[[2,"zonos-customer-info",{continueLoading:[4,"continue-loading"],submitBtnType:[1,"submit-btn-type"],submitBtnColor:[1,"submit-btn-color"],isMobile:[4,"is-mobile"],defaultAddress:[16],showErrorBanner:[32],shippingCountry:[32],isCheckingForRestrictedItems:[32],isValidatingAddress:[32],invalidShippingCharacterList:[32],invalidBillingCharacterList:[32],openAddressValidationDialog:[32]}],[2,"zonos-checkout-payment",{submitBtnType:[1,"submit-btn-type"],continueLoading:[4,"continue-loading"],submitBtnColor:[1,"submit-btn-color"],showErrorBanner:[32]}],[1,"zonos-checkout-footer",{mobile:[4],dataTheme:[1,"data-theme"],showLanguageDialog:[32],isMobile:[32]},[[4,"click","handleGlobalClick"]],{mobile:["handleMobileChange"]}],[2,"zonos-shipping",{continueLoading:[4,"continue-loading"],submitBtnColor:[1,"submit-btn-color"],submitBtnType:[1,"submit-btn-type"],selectedShippingMethod:[32],isSelecting:[32],showErrorBanner:[32],serviceLevels:[32]}],[1,"zonos-cart-restricted-items",{hide:[4],errorImages:[32],internalCollapsed:[32],firstRender:[32]}],[1,"zonos-checkout-finish",{borderRadius:[1,"border-radius"],storybookForceStatus:[1,"storybook-force-status"],overrideNotification:[16],isLoading:[32],notificationType:[32],notificationTitle:[32],notificationMessages:[32],notificationActionText:[32],order:[32]}],[1,"zonos-confirm-dialog",{dialogTitle:[1,"dialog-title"],dialogIntent:[1,"dialog-intent"],dialogSubtitle:[1,"dialog-subtitle"],submitBtnColor:[1,"submit-btn-color"],dialogConfirmBtnText:[1,"dialog-confirm-btn-text"],dialogCancelBtnText:[1,"dialog-cancel-btn-text"],dialogType:[1,"dialog-type"],isMobile:[4,"is-mobile"],dialogOpen:[4,"dialog-open"],noClickOutside:[4,"no-click-outside"]},[[4,"keydown","handleKeyDown"]]],[1,"zonos-cart-subtotal"],[1,"zonos-checkout-progress-tabs",{tabColor:[1,"tab-color"],backgroundColor:[1,"background-color"],setTabItems:[64],setTabSelected:[64]}],[1,"zonos-review",{mobile:[4],collapsed:[4],isMobile:[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-badge",{bold:[4],badgeColor:[1,"badge-color"],icon:[16],iconRight:[4,"icon-right"],size:[1],rounded:[4]}],[1,"zonos-cart-items",{errorImages:[32]}],[1,"zonos-rest-state",{restStateSubtitle:[1,"rest-state-subtitle"],restStateTitle:[1,"rest-state-title"],restStateType:[1,"rest-state-type"],isErrorImageLoad:[32]}]]]],e))));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zonos/elements",
3
- "version": "1.3.50",
3
+ "version": "1.3.52",
4
4
  "description": "Zonos component UI for Stripe elements",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.cjs.js",
@@ -20,6 +20,7 @@
20
20
  "dist/",
21
21
  "loader/"
22
22
  ],
23
+ "packageManager": "pnpm@8.15.8",
23
24
  "scripts": {
24
25
  "build": "pnpm build:css && mkdir -p dist && pnpm build:components && pnpm build:scripts && pnpm css:copy",
25
26
  "build:components": "stencil build --docs",
@@ -1,58 +0,0 @@
1
- 'use strict';
2
-
3
- const log = (message, type, ...additionalInfo) => {
4
- var _a, _b;
5
- const isDebug = !!((_a = window.Zonos) === null || _a === void 0 ? void 0 : _a.debug) ||
6
- !!window.location.search.match(/\?.*(&*)zonosDebug=1/);
7
- // if debug is false, do not log
8
- if (!isDebug) {
9
- // log errors to the console if the type is error
10
- if (type === 'error') {
11
- // eslint-disable-next-line no-console
12
- console.error(message, ...additionalInfo);
13
- }
14
- return;
15
- }
16
- let loggingIframe = document.querySelector('iframe#zonos---debug-logging-iframe');
17
- if (!loggingIframe) {
18
- // add a hidden iframe
19
- loggingIframe = document.createElement('iframe');
20
- loggingIframe.id = 'zonos---debug-logging-iframe';
21
- loggingIframe.style.display = 'none';
22
- loggingIframe.style.opacity = '0';
23
- loggingIframe.style.position = 'absolute';
24
- loggingIframe.style.top = '-9999px';
25
- loggingIframe.style.left = '-9999px';
26
- loggingIframe.style.width = '1px';
27
- loggingIframe.style.height = '1px';
28
- loggingIframe.style.border = 'none';
29
- loggingIframe.style.overflow = 'hidden';
30
- loggingIframe.style.visibility = 'hidden';
31
- document.body.appendChild(loggingIframe);
32
- }
33
- // use the logging iframe's console to log just in case the console is disabled (overriden) by the site owner
34
- const zConsole = ((_b = loggingIframe.contentWindow) === null || _b === void 0 ? void 0 : _b.window.console) || window.console;
35
- switch (type) {
36
- case 'warn':
37
- zConsole.warn(message, ...additionalInfo);
38
- break;
39
- case 'info':
40
- zConsole.info(message, ...additionalInfo);
41
- break;
42
- case 'error':
43
- zConsole.error(message, ...additionalInfo);
44
- break;
45
- default:
46
- zConsole.groupCollapsed(message, ...additionalInfo);
47
- zConsole.trace();
48
- zConsole.groupEnd();
49
- break;
50
- }
51
- };
52
-
53
- const logError = (message, ...rest) => {
54
- log(message, 'error', ...rest);
55
- };
56
-
57
- exports.log = log;
58
- exports.logError = logError;
@@ -1,57 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-d56e0a8b.js');
6
- const zonosStore = require('./zonosStore-67139f0e.js');
7
- const classes = require('./classes-b7918f56.js');
8
-
9
- const zonosBadgeCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host .zonos--badge-content{display:-ms-flexbox;display:flex;gap:8px;font-size:var(--zonos-elements-font-size-s);padding:4px 8px;text-align:center;border-radius:var(--zonos-elements-radius-6);background-color:var(--zonos-elements-gray-100);color:var(--zonos-elements-gray-800);-ms-flex-align:center;align-items:center}:host p{font-weight:600;line-height:16px}:host .icon-right svg{-ms-flex-order:2;order:2}:host .small{padding:2px 8px}:host .rounded{border-radius:20px}:host .bold{background-color:var(--zonos-elements-gray-600);color:var(--zonos-elements-gray-100)}:host .blue{background-color:var(--zonos-elements-blue-100);color:var(--zonos-elements-blue-800)}:host .blue.bold{background-color:var(--zonos-elements-blue-600);color:var(--zonos-elements-blue-100)}:host .green{background-color:var(--zonos-elements-green-100);color:var(--zonos-elements-green-800)}:host .green.bold{background-color:var(--zonos-elements-green-600);color:var(--zonos-elements-green-100)}:host .red{background-color:var(--zonos-elements-red-100);color:var(--zonos-elements-red-800)}:host .red.bold{background-color:var(--zonos-elements-red-600);color:var(--zonos-elements-red-100)}:host .orange{background-color:var(--zonos-elements-orange-100);color:var(--zonos-elements-orange-800);border:1px solid var(--zonos-elements-orange-200)}:host .orange.bold{background-color:var(--zonos-elements-orange-600);color:var(--zonos-elements-orange-100)}:host .purple{background-color:var(--zonos-elements-purple-100);color:var(--zonos-elements-purple-800)}:host .purple.bold{background-color:var(--zonos-elements-purple-600);color:var(--zonos-elements-purple-100)}:host .cyan{background-color:var(--zonos-elements-cyan-100);color:var(--zonos-elements-cyan-800)}:host .cyan.bold{background-color:var(--zonos-elements-cyan-600);color:var(--zonos-elements-cyan-100)}:host .transparent{background-color:transparent;border:1px solid var(--zonos-elements-gray-200);color:var(--zonos-elements-gray-800)}:host .transparent.bold{background-color:var(--zonos-elements-glass-600);color:var(--zonos-elements-gray-100)}";
10
- const ZonosBadgeStyle0 = zonosBadgeCss;
11
-
12
- const ZonosBadge = class {
13
- constructor(hostRef) {
14
- index.registerInstance(this, hostRef);
15
- this.bold = false;
16
- this.badgeColor = 'gray';
17
- this.icon = undefined;
18
- this.iconRight = false;
19
- this.size = 'default';
20
- this.rounded = false;
21
- }
22
- render() {
23
- return (index.h(index.Host, { key: '4e022b4090de017818c5ba8f86e2d7684a1b8f05', class: classes.classes(['zonos--elements zonos--badge']), style: {
24
- '--font-family': zonosStore.zonosStoreFontFamily(),
25
- } }, index.h("div", { key: '8e6a4c0fcf81939d69fd3aec91463ed6c7a2d67d', class: classes.classes([
26
- 'zonos--badge-content',
27
- this.badgeColor,
28
- this.rounded && 'rounded',
29
- this.iconRight && 'icon-right',
30
- this.size,
31
- this.bold && 'bold',
32
- ]) }, this.icon, index.h("zonos-text", { key: '5824866453d31abef18443179e6bc1692e9e98a3', textColor: `${this.badgeColor}-800` }, index.h("slot", { key: '9bc411177ae04e8fa1061098023860204fa1a5d7' })))));
33
- }
34
- };
35
- ZonosBadge.style = ZonosBadgeStyle0;
36
-
37
- const zonosTooltipCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--tooltip{position:relative}:host .zonos--tooltip .zonos--tooltip-content{position:absolute;bottom:100%;left:0;width:-webkit-max-content;width:-moz-max-content;width:max-content;padding:12px;background-color:var(--zonos-elements-gray-1200);opacity:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out;-webkit-transform-origin:bottom left;transform-origin:bottom left;border-radius:var(--zonos-elements-radius-4);z-index:100;-webkit-box-shadow:var(--zonos-elements-v3-shadow-large);box-shadow:var(--zonos-elements-v3-shadow-large)}:host .zonos--tooltip .zonos--tooltip-content.zonos--show-tooltip{opacity:1;-webkit-transform:scale(1);transform:scale(1)}";
38
- const ZonosTooltipStyle0 = zonosTooltipCss;
39
-
40
- const ZonosTooltip = class {
41
- constructor(hostRef) {
42
- index.registerInstance(this, hostRef);
43
- this.label = '';
44
- this.subtitle = '';
45
- this.showTooltip = false;
46
- }
47
- render() {
48
- return (index.h(index.Host, { key: '24f3b1f73cc320540ab3700213004c267ea04658', class: "zonos--elements" }, index.h("div", { key: '7f52acf90cb5b9f1fd5efdc4fedc4d61a893a646', class: "zonos--tooltip", onMouseEnter: () => (this.showTooltip = true), onMouseLeave: () => (this.showTooltip = false) }, index.h("slot", { key: '1871529e8b75c44a71bf1f5bc9e60b81bbc598d2' }), index.h("div", { key: 'c0b9c9c1b3fef5f766d2bad4c5bea48f3d6bbb6f', class: classes.classes([
49
- this.showTooltip && 'zonos--show-tooltip',
50
- 'zonos--tooltip-content',
51
- ]) }, index.h("zonos-text", { key: '3b106cb439877dffa101f15fb01aff980a64c7cb', size: "s", textColor: "gray-0", type: "boldLabel" }, this.label), index.h("zonos-text", { key: 'c0005051e6e1b614b7739718e1a262f6043d56f5', size: "xs", textColor: "gray-0" }, this.subtitle)))));
52
- }
53
- };
54
- ZonosTooltip.style = ZonosTooltipStyle0;
55
-
56
- exports.zonos_badge = ZonosBadge;
57
- exports.zonos_tooltip = ZonosTooltip;
@@ -1,66 +0,0 @@
1
- /**
2
- * This is just function to make the key typesafe to enter
3
- * @returns
4
- */
5
- const objAttribute = ({ key, value, }) => value
6
- ? {
7
- key,
8
- value,
9
- }
10
- : null;
11
- /**
12
- * Map legacy item attribute to dgs item attributes
13
- * @ref https://github.com/Zonos/ShippingQuoteService/blob/f8bd4f1ff41cb34b49b9f3f435576ec28dedf906/src/main/java/com/iglobal/services/shippingquote/dto/ShippingQuoteRequestDto.java#L412
14
- */
15
- export const getAttributes = (item) => {
16
- return [
17
- objAttribute({
18
- key: 'brand',
19
- value: item.itemBrand,
20
- }),
21
- objAttribute({
22
- key: 'material',
23
- value: item.itemMaterial,
24
- }),
25
- objAttribute({
26
- key: 'category',
27
- value: item.itemCategory,
28
- }),
29
- objAttribute({
30
- key: 'color',
31
- value: item.itemColor,
32
- }),
33
- objAttribute({
34
- key: 'customization',
35
- value: item.itemCustomization,
36
- }),
37
- objAttribute({
38
- key: 'descriptionDetailed',
39
- value: item.itemDescriptionDetailed,
40
- }),
41
- objAttribute({
42
- key: 'fabricContent',
43
- value: item.itemFabricContent,
44
- }),
45
- objAttribute({
46
- key: 'ltlClass',
47
- value: item.itemLtlClass,
48
- }),
49
- objAttribute({
50
- key: 'pickingLocation',
51
- value: item.itemPickingLocation,
52
- }),
53
- objAttribute({
54
- key: 'shipFromLocation',
55
- value: item.itemShipFromLocation,
56
- }),
57
- objAttribute({
58
- key: 'size',
59
- value: item.itemSize,
60
- }),
61
- objAttribute({
62
- key: 'status',
63
- value: item.status,
64
- }),
65
- ].filter(Boolean);
66
- };
@@ -1,58 +0,0 @@
1
- /**
2
- * Map legacy weight units with dgs
3
- * @ref https://github.com/Zonos/ShippingQuoteService/blob/f8bd4f1ff41cb34b49b9f3f435576ec28dedf906/src/main/java/com/iglobal/services/shippingquote/dto/ShippingQuoteRequestDto.java#L483
4
- */
5
- const getItemWeightUnit = (weightUnit) => {
6
- if (!weightUnit) {
7
- return 'POUND';
8
- }
9
- switch (weightUnit.toUpperCase()) {
10
- case 'KG':
11
- return 'KILOGRAM';
12
- case 'OZ':
13
- return 'OUNCE';
14
- case 'G':
15
- return 'GRAM';
16
- default:
17
- return 'POUND';
18
- }
19
- };
20
- /**
21
- * Mapping legacy measurement with dgs
22
- * @ref https://github.com/Zonos/ShippingQuoteService/blob/f8bd4f1ff41cb34b49b9f3f435576ec28dedf906/src/main/java/com/iglobal/services/shippingquote/dto/ShippingQuoteRequestDto.java#L441
23
- */
24
- export const getMeasurements = (item) => {
25
- if (!item) {
26
- return [];
27
- }
28
- const measurements = [];
29
- if (item.length) {
30
- measurements.push({
31
- type: 'LENGTH',
32
- unitOfMeasure: 'INCH',
33
- value: item.length,
34
- });
35
- }
36
- if (item.width) {
37
- measurements.push({
38
- type: 'WIDTH',
39
- unitOfMeasure: 'INCH',
40
- value: item.width,
41
- });
42
- }
43
- if (item.weight) {
44
- measurements.push({
45
- type: 'WEIGHT',
46
- unitOfMeasure: getItemWeightUnit(item.weightUnits),
47
- value: item.weight,
48
- });
49
- }
50
- if (item.height) {
51
- measurements.push({
52
- type: 'HEIGHT',
53
- unitOfMeasure: 'INCH',
54
- value: item.height,
55
- });
56
- }
57
- return measurements;
58
- };
@@ -1,55 +0,0 @@
1
- const log = (message, type, ...additionalInfo) => {
2
- var _a, _b;
3
- const isDebug = !!((_a = window.Zonos) === null || _a === void 0 ? void 0 : _a.debug) ||
4
- !!window.location.search.match(/\?.*(&*)zonosDebug=1/);
5
- // if debug is false, do not log
6
- if (!isDebug) {
7
- // log errors to the console if the type is error
8
- if (type === 'error') {
9
- // eslint-disable-next-line no-console
10
- console.error(message, ...additionalInfo);
11
- }
12
- return;
13
- }
14
- let loggingIframe = document.querySelector('iframe#zonos---debug-logging-iframe');
15
- if (!loggingIframe) {
16
- // add a hidden iframe
17
- loggingIframe = document.createElement('iframe');
18
- loggingIframe.id = 'zonos---debug-logging-iframe';
19
- loggingIframe.style.display = 'none';
20
- loggingIframe.style.opacity = '0';
21
- loggingIframe.style.position = 'absolute';
22
- loggingIframe.style.top = '-9999px';
23
- loggingIframe.style.left = '-9999px';
24
- loggingIframe.style.width = '1px';
25
- loggingIframe.style.height = '1px';
26
- loggingIframe.style.border = 'none';
27
- loggingIframe.style.overflow = 'hidden';
28
- loggingIframe.style.visibility = 'hidden';
29
- document.body.appendChild(loggingIframe);
30
- }
31
- // use the logging iframe's console to log just in case the console is disabled (overriden) by the site owner
32
- const zConsole = ((_b = loggingIframe.contentWindow) === null || _b === void 0 ? void 0 : _b.window.console) || window.console;
33
- switch (type) {
34
- case 'warn':
35
- zConsole.warn(message, ...additionalInfo);
36
- break;
37
- case 'info':
38
- zConsole.info(message, ...additionalInfo);
39
- break;
40
- case 'error':
41
- zConsole.error(message, ...additionalInfo);
42
- break;
43
- default:
44
- zConsole.groupCollapsed(message, ...additionalInfo);
45
- zConsole.trace();
46
- zConsole.groupEnd();
47
- break;
48
- }
49
- };
50
-
51
- const logError = (message, ...rest) => {
52
- log(message, 'error', ...rest);
53
- };
54
-
55
- export { logError as a, log as l };
@@ -1,52 +0,0 @@
1
- import { r as registerInstance, h, H as Host } from './index-86b8247e.js';
2
- import { d as zonosStoreFontFamily } from './zonosStore-473f4654.js';
3
- import { c as classes } from './classes-0d95c529.js';
4
-
5
- const zonosBadgeCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host .zonos--badge-content{display:-ms-flexbox;display:flex;gap:8px;font-size:var(--zonos-elements-font-size-s);padding:4px 8px;text-align:center;border-radius:var(--zonos-elements-radius-6);background-color:var(--zonos-elements-gray-100);color:var(--zonos-elements-gray-800);-ms-flex-align:center;align-items:center}:host p{font-weight:600;line-height:16px}:host .icon-right svg{-ms-flex-order:2;order:2}:host .small{padding:2px 8px}:host .rounded{border-radius:20px}:host .bold{background-color:var(--zonos-elements-gray-600);color:var(--zonos-elements-gray-100)}:host .blue{background-color:var(--zonos-elements-blue-100);color:var(--zonos-elements-blue-800)}:host .blue.bold{background-color:var(--zonos-elements-blue-600);color:var(--zonos-elements-blue-100)}:host .green{background-color:var(--zonos-elements-green-100);color:var(--zonos-elements-green-800)}:host .green.bold{background-color:var(--zonos-elements-green-600);color:var(--zonos-elements-green-100)}:host .red{background-color:var(--zonos-elements-red-100);color:var(--zonos-elements-red-800)}:host .red.bold{background-color:var(--zonos-elements-red-600);color:var(--zonos-elements-red-100)}:host .orange{background-color:var(--zonos-elements-orange-100);color:var(--zonos-elements-orange-800);border:1px solid var(--zonos-elements-orange-200)}:host .orange.bold{background-color:var(--zonos-elements-orange-600);color:var(--zonos-elements-orange-100)}:host .purple{background-color:var(--zonos-elements-purple-100);color:var(--zonos-elements-purple-800)}:host .purple.bold{background-color:var(--zonos-elements-purple-600);color:var(--zonos-elements-purple-100)}:host .cyan{background-color:var(--zonos-elements-cyan-100);color:var(--zonos-elements-cyan-800)}:host .cyan.bold{background-color:var(--zonos-elements-cyan-600);color:var(--zonos-elements-cyan-100)}:host .transparent{background-color:transparent;border:1px solid var(--zonos-elements-gray-200);color:var(--zonos-elements-gray-800)}:host .transparent.bold{background-color:var(--zonos-elements-glass-600);color:var(--zonos-elements-gray-100)}";
6
- const ZonosBadgeStyle0 = zonosBadgeCss;
7
-
8
- const ZonosBadge = class {
9
- constructor(hostRef) {
10
- registerInstance(this, hostRef);
11
- this.bold = false;
12
- this.badgeColor = 'gray';
13
- this.icon = undefined;
14
- this.iconRight = false;
15
- this.size = 'default';
16
- this.rounded = false;
17
- }
18
- render() {
19
- return (h(Host, { key: '4e022b4090de017818c5ba8f86e2d7684a1b8f05', class: classes(['zonos--elements zonos--badge']), style: {
20
- '--font-family': zonosStoreFontFamily(),
21
- } }, h("div", { key: '8e6a4c0fcf81939d69fd3aec91463ed6c7a2d67d', class: classes([
22
- 'zonos--badge-content',
23
- this.badgeColor,
24
- this.rounded && 'rounded',
25
- this.iconRight && 'icon-right',
26
- this.size,
27
- this.bold && 'bold',
28
- ]) }, this.icon, h("zonos-text", { key: '5824866453d31abef18443179e6bc1692e9e98a3', textColor: `${this.badgeColor}-800` }, h("slot", { key: '9bc411177ae04e8fa1061098023860204fa1a5d7' })))));
29
- }
30
- };
31
- ZonosBadge.style = ZonosBadgeStyle0;
32
-
33
- const zonosTooltipCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--tooltip{position:relative}:host .zonos--tooltip .zonos--tooltip-content{position:absolute;bottom:100%;left:0;width:-webkit-max-content;width:-moz-max-content;width:max-content;padding:12px;background-color:var(--zonos-elements-gray-1200);opacity:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out;-webkit-transform-origin:bottom left;transform-origin:bottom left;border-radius:var(--zonos-elements-radius-4);z-index:100;-webkit-box-shadow:var(--zonos-elements-v3-shadow-large);box-shadow:var(--zonos-elements-v3-shadow-large)}:host .zonos--tooltip .zonos--tooltip-content.zonos--show-tooltip{opacity:1;-webkit-transform:scale(1);transform:scale(1)}";
34
- const ZonosTooltipStyle0 = zonosTooltipCss;
35
-
36
- const ZonosTooltip = class {
37
- constructor(hostRef) {
38
- registerInstance(this, hostRef);
39
- this.label = '';
40
- this.subtitle = '';
41
- this.showTooltip = false;
42
- }
43
- render() {
44
- return (h(Host, { key: '24f3b1f73cc320540ab3700213004c267ea04658', class: "zonos--elements" }, h("div", { key: '7f52acf90cb5b9f1fd5efdc4fedc4d61a893a646', class: "zonos--tooltip", onMouseEnter: () => (this.showTooltip = true), onMouseLeave: () => (this.showTooltip = false) }, h("slot", { key: '1871529e8b75c44a71bf1f5bc9e60b81bbc598d2' }), h("div", { key: 'c0b9c9c1b3fef5f766d2bad4c5bea48f3d6bbb6f', class: classes([
45
- this.showTooltip && 'zonos--show-tooltip',
46
- 'zonos--tooltip-content',
47
- ]) }, h("zonos-text", { key: '3b106cb439877dffa101f15fb01aff980a64c7cb', size: "s", textColor: "gray-0", type: "boldLabel" }, this.label), h("zonos-text", { key: 'c0005051e6e1b614b7739718e1a262f6043d56f5', size: "xs", textColor: "gray-0" }, this.subtitle)))));
48
- }
49
- };
50
- ZonosTooltip.style = ZonosTooltipStyle0;
51
-
52
- export { ZonosBadge as zonos_badge, ZonosTooltip as zonos_tooltip };