ui.shipaid.com 0.3.83 → 0.3.85

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.
package/dist/widget.es.js CHANGED
@@ -2375,6 +2375,7 @@ const _ShipAidWidget = class _ShipAidWidget extends s$1 {
2375
2375
  this.customerId = void 0;
2376
2376
  this.supportSubscriptions = false;
2377
2377
  this.dataSelector = "";
2378
+ this.shadowRootSelector = "";
2378
2379
  this.useShipAidCheckout = false;
2379
2380
  this._apiEndpoint = "/apps/shipaid";
2380
2381
  this._storeDomain = ((_a = window.Shopify) == null ? void 0 : _a.shop) ?? ((_c = (_b = window.Shopify) == null ? void 0 : _b.Checkout) == null ? void 0 : _c.apiHost);
@@ -3091,7 +3092,7 @@ const _ShipAidWidget = class _ShipAidWidget extends s$1 {
3091
3092
  return this.useShipAidCheckout ? this : super.createRenderRoot();
3092
3093
  }
3093
3094
  checkoutButtonTemplate() {
3094
- var _a, _b;
3095
+ var _a, _b, _c, _d;
3095
3096
  if (!document.getElementById("shipaid-styles")) {
3096
3097
  const style = document.createElement("style");
3097
3098
  style.id = "shipaid-styles";
@@ -3105,19 +3106,37 @@ const _ShipAidWidget = class _ShipAidWidget extends s$1 {
3105
3106
  `;
3106
3107
  document.head.appendChild(style);
3107
3108
  }
3108
- const originalCheckoutButton = document.querySelector(`${this.dataSelector}:not(#shipaid-checkout-button)`);
3109
- if (!originalCheckoutButton) return;
3109
+ if (!this.dataSelector) {
3110
+ console.error("[shipaid-widget] we couldn't find the 'data-selector' attribute.");
3111
+ return;
3112
+ }
3113
+ let originalCheckoutButton = null;
3114
+ if (this.shadowRootSelector) {
3115
+ const shadowHost = document.querySelector(this.shadowRootSelector);
3116
+ if (shadowHost && shadowHost.shadowRoot) {
3117
+ originalCheckoutButton = shadowHost.shadowRoot.querySelector(`${this.dataSelector}:not(#shipaid-checkout-button)`);
3118
+ } else {
3119
+ console.warn(`ShadowRoot not found in the element '${this.shadowRootSelector}'.`);
3120
+ return;
3121
+ }
3122
+ } else {
3123
+ originalCheckoutButton = document.querySelector(`${this.dataSelector}:not(#shipaid-checkout-button)`);
3124
+ }
3125
+ if (!originalCheckoutButton) {
3126
+ console.warn(`Button not found with selector '${this.dataSelector}'.`);
3127
+ return;
3128
+ }
3110
3129
  const originalClasses = originalCheckoutButton.className;
3111
3130
  const protectionPrice = Number((_a = this._protectionVariant) == null ? void 0 : _a.price) || 0;
3112
3131
  const cartPrice = (Number((_b = this._cart) == null ? void 0 : _b.total_price) || 0) / 100;
3113
3132
  const cartTotal = !this._hasProtectionInCart ? protectionPrice + cartPrice : cartPrice;
3114
3133
  const loading2 = x`
3115
- <svg width="1.5rem" height="1.5rem" viewBox="0 0 50 50" xmlns="http://www.w3.org/2000/svg" fill="none" stroke="currentColor" stroke-width="4" class="shipaid-loader">
3116
- <circle cx="25" cy="25" r="20" stroke-opacity="0.5"/>
3117
- <path d="M45 25a20 20 0 0 1-40 0" stroke="currentColor">
3118
- <animateTransform attributeName="transform" type="rotate" from="0 25 25" to="360 25 25" dur="1s" repeatCount="indefinite"/>
3119
- </path>
3120
- </svg>
3134
+ <svg width="1.5rem" height="1.5rem" viewBox="0 0 50 50" xmlns="http://www.w3.org/2000/svg" fill="none" stroke="currentColor" stroke-width="4" class="shipaid-loader">
3135
+ <circle cx="25" cy="25" r="20" stroke-opacity="0.5"/>
3136
+ <path d="M45 25a20 20 0 0 1-40 0" stroke="currentColor">
3137
+ <animateTransform attributeName="transform" type="rotate" from="0 25 25" to="360 25 25" dur="1s" repeatCount="indefinite"/>
3138
+ </path>
3139
+ </svg>
3121
3140
  `;
3122
3141
  return x`
3123
3142
  <style>
@@ -3127,6 +3146,16 @@ const _ShipAidWidget = class _ShipAidWidget extends s$1 {
3127
3146
  width: 100%;
3128
3147
  }
3129
3148
 
3149
+ .shipaid-container a#shipaid-checkout-button {
3150
+ width: 100%;
3151
+ margin: 0px;
3152
+ text-decoration: unset;
3153
+ }
3154
+ .shipaid-container a#shipaid-continue-button {
3155
+ display: block;
3156
+ margin: 1rem 0px 0px;
3157
+ }
3158
+
3130
3159
  .shipaid-container button {
3131
3160
  width: 100%;
3132
3161
  }
@@ -3222,13 +3251,12 @@ const _ShipAidWidget = class _ShipAidWidget extends s$1 {
3222
3251
  </div>
3223
3252
  </div>
3224
3253
 
3225
- <button id="shipaid-checkout-button" class="${originalClasses}" @click=${() => {
3226
- var _a2, _b2;
3254
+ <a href="/checkout${((_c = this._protectionVariant) == null ? void 0 : _c.id) ? `?attributes[_shipaid-internal]=1&updates[${(_d = this._protectionVariant) == null ? void 0 : _d.id}]=1` : ""}" id="shipaid-checkout-button" class="${originalClasses}" @click=${() => {
3255
+ var _a2;
3227
3256
  sessionStorage.setItem("shipaid_variant", JSON.stringify((_a2 = this._protectionVariant) == null ? void 0 : _a2.id));
3228
- window.location.href = `/checkout?attributes[_shipaid-internal]=1&updates[${(_b2 = this._protectionVariant) == null ? void 0 : _b2.id}]=1`;
3229
3257
  }}>
3230
3258
  <slot name="checkout-button-text">CHECKOUT+</slot> ${cartTotal ? this._currencyFormat(cartTotal) : loading2}
3231
- </button>
3259
+ </a>
3232
3260
 
3233
3261
  <a href="#" class="continue-link" @click=${async () => {
3234
3262
  await this.removeProtection();
@@ -3942,6 +3970,9 @@ __decorateClass([
3942
3970
  __decorateClass([
3943
3971
  n$7({ type: String, attribute: "data-selector" })
3944
3972
  ], ShipAidWidget.prototype, "dataSelector");
3973
+ __decorateClass([
3974
+ n$7({ type: String, attribute: "shadow-root-selector" })
3975
+ ], ShipAidWidget.prototype, "shadowRootSelector");
3945
3976
  __decorateClass([
3946
3977
  n$7({ type: Boolean, attribute: "use-shipaid-checkout" })
3947
3978
  ], ShipAidWidget.prototype, "useShipAidCheckout");
@@ -1168,7 +1168,7 @@ function qt(t,e,i){return t?e():null==i?void 0:i()}const jt=u`
1168
1168
  .shipaid-prompt .prompt-footer .prompt-footer-badge svg {
1169
1169
  height:var(--shipaid-footer-badge-logo-height, 9px);
1170
1170
  }
1171
- `;var me=(t=>(t.LOADED="shipaid-loaded",t.STATUS_UPDATE="shipaid-protection-status",t))(me||{});var ge=Object.defineProperty,fe=(t,e,i,o)=>{for(var r,n=void 0,a=t.length-1;a>=0;a--)(r=t[a])&&(n=r(e,i,n)||n);return n&&ge(e,i,n),n};const ve=t=>({items:t.lines.edges.map((({node:t})=>({id:t.id,key:t.id,variant_id:t.merchandise.id,sku:t.merchandise.sku,final_line_price:parseFloat(t.cost.totalAmount.amount),quantity:t.quantity}))),total_price:parseFloat(t.cost.totalAmount.amount),item_count:t.lines.edges.length}),be=async(t,e)=>{try{const i=await fetch(t,e);if(!i.ok)throw new Error(await i.text());return await i.json()}catch(i){throw console.error(i),new Error("Failed to complete fetch request.")}},ye=t=>console.warn(`[ShipAid] ${t}`),we=t=>console.error(`[ShipAid] ${t}`),_e="shipaid-protection",Ce="shipaid-protection-popup-show",xe="shipaid-protection",$e="query StoreByDomain ($store: String!) {\n store: storeByDomain (input: {store: $store}) {\n currency\n planActive\n store\n widgetAutoOptIn\n widgetPollProtection\n widgetShowCart\n excludedProductSkus\n excludedCustomersIdsAutoOptIn\n protectionSettings\n widgetConfigurations\n useCustomApp\n }\n}",ke=Object.assign({"./lang/de.json":()=>Promise.resolve().then((()=>qe)).then((t=>t.default)),"./lang/en.json":()=>Promise.resolve().then((()=>he)).then((t=>t.default)),"./lang/es.json":()=>Promise.resolve().then((()=>Be)).then((t=>t.default)),"./lang/fr.json":()=>Promise.resolve().then((()=>Ke)).then((t=>t.default)),"./lang/it.json":()=>Promise.resolve().then((()=>ii)).then((t=>t.default)),"./lang/nl.json":()=>Promise.resolve().then((()=>pi)).then((t=>t.default)),"./lang/pt.json":()=>Promise.resolve().then((()=>fi)).then((t=>t.default))});var Se;Se={loader:async t=>{if("en"===t)return ce;const e=Reflect.get(ke,`./lang/${t}.json`);return e?await e():ce}},bt=Object.assign(Object.assign({},bt),Se);const Ae=class extends ht{constructor(){var t,e,i;super(...arguments),this.env="prod",this.useCustomStoreFront=!1,this.storeDomain="",this.storeAccessToken="",this.cartId="",this.disablePolling=!1,this.disableActions=!1,this.pollingInterval=2500,this.disableRefresh=!1,this.refreshCart=!1,this.persistPopup=!1,this.defaultToggleButton=!1,this.lang="en",this.currency=void 0,this.customerId=void 0,this.supportSubscriptions=!1,this.dataSelector="",this.useShipAidCheckout=!1,this._apiEndpoint="/apps/shipaid",this._storeDomain=(null==(t=window.Shopify)?void 0:t.shop)??(null==(i=null==(e=window.Shopify)?void 0:e.Checkout)?void 0:i.apiHost),this._hasFinishedSetup=!1,this._shouldShowWidget=!1,this._hasProtectionInCart=!1,this.hasLoadedStrings=!1,this.fetchInterceptorCleanup=()=>{},this.intervalId=null,this._state={loading:!1,success:null,error:!1},this._popup=null,this._fetch={get:t=>be(t),post:(t,e)=>be(t,{method:"POST",headers:{"Content-Type":"application/json","X-ShipAid":"1"},body:JSON.stringify(e)})}}shouldUpdate(t){return this.hasLoadedStrings&&super.shouldUpdate(t)}shouldPersistPopup(){return"true"===localStorage.getItem(`${Ce}`)?"learn-more":null}setPopupKey(){this.persistPopup&&localStorage.setItem(`${Ce}`,"true")}get nhost(){const t=`https://${"prod"===this.env?"gjiyysyzjwuculcymsvb":"staging"===this.env?"xfnjpunvafvudwuzwjlm":"local"}.graphql.us-east-1.nhost.run/v1`;return{request:async(e,i)=>{try{const o=await fetch(t,{method:"post",body:JSON.stringify({query:e,variables:i})});return await o.json()}catch(o){console.log(`Nhost Error: ${o}`)}}}}async runStoreFrontQuery(t,e){try{const i=new Headers;i.append("Content-Type","application/json"),i.append("X-Shopify-Storefront-Access-Token",this.storeAccessToken);const o={method:"POST",headers:i,body:JSON.stringify({query:t,variables:e})},r=await fetch(`https://${this.storeDomain}/api/2021-07/graphql.json`,o);if(!r.ok)throw new Error(`GraphQL request failed: ${r.statusText}`);const n=await r.json();if(n.errors)throw new Error(n.errors[0].message);return n.data}catch(i){throw console.error("GraphQL query error:",i),new Error("Failed to execute GraphQL query")}}get shouldRefreshOnUpdate(){return!this.disablePolling&&!this.disableRefresh}get planActive(){var t,e;const{searchParams:i}=new URL(window.location.href);return(null==(t=window.Shopify)?void 0:t.designMode)||i.has("shipaid-test")?(ye("Currently in preview mode."),!0):!!(null==(e=this._store)?void 0:e.planActive)}_currencyFormat(t){var e,i,o,r,n,a;const s=this.currency||(null==(i=null==(e=window.Shopify)?void 0:e.currency)?void 0:i.active)||(null==(o=this._store)?void 0:o.currency)||"USD";if(null==(a=null==(n=null==(r=this._store)?void 0:r.widgetConfigurations)?void 0:n.widget)?void 0:a.currencyFormat){return this._store.widgetConfigurations.widget.currencyFormat.replace("_value_",Number(t)).replace("_currency_",s)}return new Intl.NumberFormat(void 0,{currency:s,style:"currency"}).format(Number(t))}_dispatchEvent(t,e={}){this.dispatchEvent(new CustomEvent(t,{bubbles:!0,composed:!0,detail:e}))}_handleRefreshCart(){if(this.refreshCart)return window.location.reload()}async _handleRefresh(t){const e=Reflect.has(t,"items");if(this.shouldRefreshOnUpdate)return window.location.reload();e||await this.updateCart(),this._dispatchEvent(me.STATUS_UPDATE,{protection:this._hasProtectionInCart,cart:e?t:this._cart,lineItem:e?this._protectionCartItem:t})}async calculateProtectionTotal(t){if(t||(t=await this._fetchCart()),!t)throw new Error("Could not fetch cart.");if(!this._store)throw new Error("Missing ShipAid store");if(!this._protectionProduct)throw new Error("Missing Shopify protection product");return i.calculateProtectionTotal(this._store,this._protectionProduct,t)}_findProtectionVariant(t){if(!this._store)throw new Error("Missing ShipAid store");if(!this._protectionProduct)throw new Error("Missing Shopify protection product");return i.findProtectionVariant(this._store,this._protectionProduct,t)}_setState(t,e){this._state={loading:"loading"===t,success:"success"===t,error:"error"===t&&(e||!0)}}_handleConfirmationPopup(){"confirmation"!==this._popup&&(this._popup="confirmation")}_updateProtection(){var t,e,i;const o=null==(i=null==(e=null==(t=this._store)?void 0:t.widgetConfigurations)?void 0:e.widget)?void 0:i.removeWithConfirmation;if(this._hasProtectionInCart)return o?this._handleConfirmationPopup():this.removeProtection();this.addProtection()}async _fetchShipAidData(){var t,e,i,o,r;let n;if(n=this.storeDomain?this.storeDomain:(null==(t=window.Shopify)?void 0:t.shop)??(null==(i=null==(e=window.Shopify)?void 0:e.Checkout)?void 0:i.apiHost),!n)throw new Error("No shop found in Shopify object.");try{let t,e;if(this.useCustomStoreFront)e=await this.nhost.request($e,{store:n});else{t=new URL(window.location.href),t.pathname=this._apiEndpoint;const i={query:$e,variables:{store:n}};e=await this._fetch.post(t.toString(),i)}if(!e)throw new Error("Missing response for store query.");if(null==(o=e.errors)?void 0:o.length)throw new Error(e.errors[0].message);if(!(null==(r=e.data)?void 0:r.store))throw new Error("Missing store from store query response.");return e.data.store}catch(a){throw console.error(a),new Error(`Could not find a store for ${this._storeDomain}`)}}_findSellingPlanByName(t,e){for(const i of t){const t=i.node;for(const i of t.sellingPlans.edges){const t=i.node;if(e===t.name)return t}}return null}async _fetchSellingPlanFromVariant(t){var e,i,o,r,n,a,s,d,p,l,c,h,u;const m=(null==(e=window.Shopify)?void 0:e.shop)??(null==(o=null==(i=window.Shopify)?void 0:i.Checkout)?void 0:o.apiHost);if(!m)throw new Error("No shop found in Shopify object.");try{const e=new URL(window.location.href);e.pathname=this._apiEndpoint;const i={query:"query SellingPlanFromVariant($store: String!, $variantId: String!){\n sellingPlanFromVariant(input: {store: $store, variantId: $variantId })\n}",variables:{store:m,variantId:`gid://shopify/ProductVariant/${null==(r=this._protectionVariant)?void 0:r.id}`}},o=await this._fetch.post(e.toString(),i);if(!o)throw new Error("Missing response for selling plan query.");if(null==(n=o.errors)?void 0:n.length)throw new Error(o.errors[0].message);if(!(null==(a=o.data)?void 0:a.sellingPlanFromVariant))throw new Error("Missing variant from selling plan query response.");const g=(null==(d=null==(s=o.data.sellingPlanFromVariant)?void 0:s.sellingPlanGroups)?void 0:d.edges)||[],f=(null==(u=null==(h=null==(c=null==(l=null==(p=g[0])?void 0:p.node)?void 0:l.sellingPlans)?void 0:c.edges)?void 0:h[0])?void 0:u.node)||null;return this._findSellingPlanByName(g,t.name)||f}catch(g){console.error("Error during the query ====>",g)}}async _fetchCart(){try{if(this.useCustomStoreFront&&this.cartId){const t=await this.runStoreFrontQuery("query getCart($cartId: ID!){ cart( id: $cartId ) { id createdAt updatedAt lines(first: 10) { edges { node { id quantity merchandise { ... on ProductVariant { id sku } } cost{ totalAmount{ amount currencyCode } } } } } cost { totalAmount { amount currencyCode } subtotalAmount { amount currencyCode } } } }",{cartId:this.cartId});return ve(t.cart)}return await this._fetch.get("/cart.js")}catch(t){throw we(t.message),new Error("Could not fetch cart for current domain.")}}async _fetchProduct(){var t,e,i,o,r,n,a,s;try{let d;if(this.useCustomStoreFront){const p=await this.runStoreFrontQuery("query product($handle: String!) { product(handle: $handle) { id title images(first: 1) {edges { node { id url altText } } } handle variants(first: 100) { edges { node { id title price { amount } } } } } }",{handle:xe});if(null==p?void 0:p.product){const l=p.product;d={id:l.id,title:l.title,image:{id:null==(o=null==(i=null==(e=null==(t=null==l?void 0:l.images)?void 0:t.edges)?void 0:e[0])?void 0:i.node)?void 0:o.id,src:null==(s=null==(a=null==(n=null==(r=null==l?void 0:l.images)?void 0:r.edges)?void 0:n[0])?void 0:a.node)?void 0:s.url},variants:l.variants.edges.map((t=>({id:t.node.id,price:t.node.price.amount})))}}}else d=(await this._fetch.get(`/products/${xe}.json`)).product;return d}catch(d){throw we(d.message),new Error("Could not fetch protection product for current domain.")}}hasProtection(){return this._hasProtectionInCart}async updateCart(t){t||(t=await this._fetchCart()),this._cart=t}async addCartProtectionVariant(){var t,i,o,r;let n,a;if(this.supportSubscriptions){const o=null==(i=null==(t=this._cart)?void 0:t.items)?void 0:i.find((t=>{var e;return t.id!==(null==(e=this._protectionVariant)?void 0:e.id)&&!!(null==t?void 0:t.selling_plan_allocation)}));if(o){const t=await this._fetchSellingPlanFromVariant(o.selling_plan_allocation.selling_plan);a=t?e(t.id):null}}if(this.useCustomStoreFront){const t=await this.runStoreFrontQuery("mutation AddItemToCart($cartId: ID!, $lines: [CartLineInput!]!) { cartLinesAdd(cartId: $cartId, lines: $lines) { cart { id lines(first: 10) { edges { node { id quantity merchandise { ... on ProductVariant { id sku } } cost{ totalAmount{ amount currencyCode } } } } } cost { totalAmount { amount currencyCode } subtotalAmount { amount currencyCode } } } } }",{cartId:this.cartId,lines:[{merchandiseId:String(null==(o=this._protectionVariant)?void 0:o.id),quantity:1,sellingPlanId:a}]});n=ve(t.cartLinesAdd.cart)}else{const t={quantity:1,id:String(null==(r=this._protectionVariant)?void 0:r.id),selling_plan:a};n=await this._fetch.post("/cart/add.js",t)}return n}async updateCartProtectionVariant(t,e=null,i=null){var o,r;let n;if(this.useCustomStoreFront){const r=await this.runStoreFrontQuery("mutation RemoveItemToCart($cartId: ID!, $lines: [CartLineUpdateInput!]!) { cartLinesUpdate(cartId: $cartId, lines: $lines) { cart { id lines(first: 10) { edges { node { id quantity merchandise { ... on ProductVariant { id sku } } cost{ totalAmount{ amount currencyCode } } } } } cost { totalAmount { amount currencyCode } subtotalAmount { amount currencyCode } } } } }",{cartId:this.cartId,lines:[{id:String(e?e.key:null==(o=this._protectionCartItem)?void 0:o.key),quantity:t,sellingPlanId:i}]});n=ve(r.cartLinesUpdate.cart)}else{const o={quantity:t,id:String(e?e.key:null==(r=this._protectionCartItem)?void 0:r.key),selling_plan:i};n=await this._fetch.post("/cart/change.js",o)}return n}async addProtection(){var t,e;try{if(!this._store)throw new Error("Store has not been loaded.");if(!(null==(t=this._cart)?void 0:t.items))throw new Error("Cart has not been loaded.");if(!(null==(e=this._protectionVariant)?void 0:e.id))throw new Error("No protection variant found.");this._setState("loading");const i=await this.addCartProtectionVariant();await this._handleRefresh(i),this._setState("success")}catch(i){we(i.message)}finally{this._cart=await this._fetchCart(),this._setState("success")}}async removeProtection(){try{if(!this._store)throw new Error("Store has not been loaded.");if(!this._protectionCartItem)throw new Error("Protection product not found.");this._setState("loading");const t=await this.updateCartProtectionVariant(0,this._protectionCartItem);await this._handleRefresh(t),this._cart=t,this._setState("success")}catch(t){we(t.message)}finally{this._cart=await this._fetchCart(),this._setState("success")}}async attemptAddProtection(){var t,e,i,o,r,n;if(!(null==(t=this._store)?void 0:t.widgetAutoOptIn))return;if(!(null==(e=this._cart)?void 0:e.items)||!(null==(i=this._cart)?void 0:i.item_count))return;const a=null==(o=this._cart.items)?void 0:o.findIndex((t=>{var e,i;return null==(i=null==(e=this._protectionProduct)?void 0:e.variants)?void 0:i.some((e=>e.id===t.variant_id))})),s=null==(r=this._cart)?void 0:r.items[a];if(this._hasProtectionInCart=!!s,1===this._cart.item_count&&s)return;!!sessionStorage.getItem(_e)||!this._hasProtectionInCart&&(null==(n=this._cart)?void 0:n.item_count)&&this._store.widgetShowCart&&(await this.addProtection(),sessionStorage.setItem(_e,JSON.stringify({loaded:!0})))}async handleMultipleProtectionVariants(){var t,e,i,o,r;if(!(null==(t=this._cart)?void 0:t.items)||!(null==(e=this._cart)?void 0:e.item_count))return;let n=0;if(null==(i=this._cart.items)||i.forEach((t=>{var e,i;(null==(i=null==(e=this._protectionProduct)?void 0:e.variants)?void 0:i.some((e=>e.id===t.variant_id)))&&n++})),n>1){const t=null==(o=this._cart.items)?void 0:o.findIndex((t=>{var e,i;return null==(i=null==(e=this._protectionProduct)?void 0:e.variants)?void 0:i.some((e=>e.id===t.variant_id))})),e=null==(r=this._cart)?void 0:r.items[t],i=await this.updateCartProtectionVariant(0,e);return await this._handleRefresh(i)}}learnMorePopupTemplate(){return H`
1171
+ `;var me=(t=>(t.LOADED="shipaid-loaded",t.STATUS_UPDATE="shipaid-protection-status",t))(me||{});var ge=Object.defineProperty,fe=(t,e,i,o)=>{for(var r,n=void 0,a=t.length-1;a>=0;a--)(r=t[a])&&(n=r(e,i,n)||n);return n&&ge(e,i,n),n};const ve=t=>({items:t.lines.edges.map((({node:t})=>({id:t.id,key:t.id,variant_id:t.merchandise.id,sku:t.merchandise.sku,final_line_price:parseFloat(t.cost.totalAmount.amount),quantity:t.quantity}))),total_price:parseFloat(t.cost.totalAmount.amount),item_count:t.lines.edges.length}),be=async(t,e)=>{try{const i=await fetch(t,e);if(!i.ok)throw new Error(await i.text());return await i.json()}catch(i){throw console.error(i),new Error("Failed to complete fetch request.")}},ye=t=>console.warn(`[ShipAid] ${t}`),we=t=>console.error(`[ShipAid] ${t}`),_e="shipaid-protection",Ce="shipaid-protection-popup-show",xe="shipaid-protection",$e="query StoreByDomain ($store: String!) {\n store: storeByDomain (input: {store: $store}) {\n currency\n planActive\n store\n widgetAutoOptIn\n widgetPollProtection\n widgetShowCart\n excludedProductSkus\n excludedCustomersIdsAutoOptIn\n protectionSettings\n widgetConfigurations\n useCustomApp\n }\n}",ke=Object.assign({"./lang/de.json":()=>Promise.resolve().then((()=>qe)).then((t=>t.default)),"./lang/en.json":()=>Promise.resolve().then((()=>he)).then((t=>t.default)),"./lang/es.json":()=>Promise.resolve().then((()=>Be)).then((t=>t.default)),"./lang/fr.json":()=>Promise.resolve().then((()=>Ke)).then((t=>t.default)),"./lang/it.json":()=>Promise.resolve().then((()=>ii)).then((t=>t.default)),"./lang/nl.json":()=>Promise.resolve().then((()=>pi)).then((t=>t.default)),"./lang/pt.json":()=>Promise.resolve().then((()=>fi)).then((t=>t.default))});var Se;Se={loader:async t=>{if("en"===t)return ce;const e=Reflect.get(ke,`./lang/${t}.json`);return e?await e():ce}},bt=Object.assign(Object.assign({},bt),Se);const Ae=class extends ht{constructor(){var t,e,i;super(...arguments),this.env="prod",this.useCustomStoreFront=!1,this.storeDomain="",this.storeAccessToken="",this.cartId="",this.disablePolling=!1,this.disableActions=!1,this.pollingInterval=2500,this.disableRefresh=!1,this.refreshCart=!1,this.persistPopup=!1,this.defaultToggleButton=!1,this.lang="en",this.currency=void 0,this.customerId=void 0,this.supportSubscriptions=!1,this.dataSelector="",this.shadowRootSelector="",this.useShipAidCheckout=!1,this._apiEndpoint="/apps/shipaid",this._storeDomain=(null==(t=window.Shopify)?void 0:t.shop)??(null==(i=null==(e=window.Shopify)?void 0:e.Checkout)?void 0:i.apiHost),this._hasFinishedSetup=!1,this._shouldShowWidget=!1,this._hasProtectionInCart=!1,this.hasLoadedStrings=!1,this.fetchInterceptorCleanup=()=>{},this.intervalId=null,this._state={loading:!1,success:null,error:!1},this._popup=null,this._fetch={get:t=>be(t),post:(t,e)=>be(t,{method:"POST",headers:{"Content-Type":"application/json","X-ShipAid":"1"},body:JSON.stringify(e)})}}shouldUpdate(t){return this.hasLoadedStrings&&super.shouldUpdate(t)}shouldPersistPopup(){return"true"===localStorage.getItem(`${Ce}`)?"learn-more":null}setPopupKey(){this.persistPopup&&localStorage.setItem(`${Ce}`,"true")}get nhost(){const t=`https://${"prod"===this.env?"gjiyysyzjwuculcymsvb":"staging"===this.env?"xfnjpunvafvudwuzwjlm":"local"}.graphql.us-east-1.nhost.run/v1`;return{request:async(e,i)=>{try{const o=await fetch(t,{method:"post",body:JSON.stringify({query:e,variables:i})});return await o.json()}catch(o){console.log(`Nhost Error: ${o}`)}}}}async runStoreFrontQuery(t,e){try{const i=new Headers;i.append("Content-Type","application/json"),i.append("X-Shopify-Storefront-Access-Token",this.storeAccessToken);const o={method:"POST",headers:i,body:JSON.stringify({query:t,variables:e})},r=await fetch(`https://${this.storeDomain}/api/2021-07/graphql.json`,o);if(!r.ok)throw new Error(`GraphQL request failed: ${r.statusText}`);const n=await r.json();if(n.errors)throw new Error(n.errors[0].message);return n.data}catch(i){throw console.error("GraphQL query error:",i),new Error("Failed to execute GraphQL query")}}get shouldRefreshOnUpdate(){return!this.disablePolling&&!this.disableRefresh}get planActive(){var t,e;const{searchParams:i}=new URL(window.location.href);return(null==(t=window.Shopify)?void 0:t.designMode)||i.has("shipaid-test")?(ye("Currently in preview mode."),!0):!!(null==(e=this._store)?void 0:e.planActive)}_currencyFormat(t){var e,i,o,r,n,a;const s=this.currency||(null==(i=null==(e=window.Shopify)?void 0:e.currency)?void 0:i.active)||(null==(o=this._store)?void 0:o.currency)||"USD";if(null==(a=null==(n=null==(r=this._store)?void 0:r.widgetConfigurations)?void 0:n.widget)?void 0:a.currencyFormat){return this._store.widgetConfigurations.widget.currencyFormat.replace("_value_",Number(t)).replace("_currency_",s)}return new Intl.NumberFormat(void 0,{currency:s,style:"currency"}).format(Number(t))}_dispatchEvent(t,e={}){this.dispatchEvent(new CustomEvent(t,{bubbles:!0,composed:!0,detail:e}))}_handleRefreshCart(){if(this.refreshCart)return window.location.reload()}async _handleRefresh(t){const e=Reflect.has(t,"items");if(this.shouldRefreshOnUpdate)return window.location.reload();e||await this.updateCart(),this._dispatchEvent(me.STATUS_UPDATE,{protection:this._hasProtectionInCart,cart:e?t:this._cart,lineItem:e?this._protectionCartItem:t})}async calculateProtectionTotal(t){if(t||(t=await this._fetchCart()),!t)throw new Error("Could not fetch cart.");if(!this._store)throw new Error("Missing ShipAid store");if(!this._protectionProduct)throw new Error("Missing Shopify protection product");return i.calculateProtectionTotal(this._store,this._protectionProduct,t)}_findProtectionVariant(t){if(!this._store)throw new Error("Missing ShipAid store");if(!this._protectionProduct)throw new Error("Missing Shopify protection product");return i.findProtectionVariant(this._store,this._protectionProduct,t)}_setState(t,e){this._state={loading:"loading"===t,success:"success"===t,error:"error"===t&&(e||!0)}}_handleConfirmationPopup(){"confirmation"!==this._popup&&(this._popup="confirmation")}_updateProtection(){var t,e,i;const o=null==(i=null==(e=null==(t=this._store)?void 0:t.widgetConfigurations)?void 0:e.widget)?void 0:i.removeWithConfirmation;if(this._hasProtectionInCart)return o?this._handleConfirmationPopup():this.removeProtection();this.addProtection()}async _fetchShipAidData(){var t,e,i,o,r;let n;if(n=this.storeDomain?this.storeDomain:(null==(t=window.Shopify)?void 0:t.shop)??(null==(i=null==(e=window.Shopify)?void 0:e.Checkout)?void 0:i.apiHost),!n)throw new Error("No shop found in Shopify object.");try{let t,e;if(this.useCustomStoreFront)e=await this.nhost.request($e,{store:n});else{t=new URL(window.location.href),t.pathname=this._apiEndpoint;const i={query:$e,variables:{store:n}};e=await this._fetch.post(t.toString(),i)}if(!e)throw new Error("Missing response for store query.");if(null==(o=e.errors)?void 0:o.length)throw new Error(e.errors[0].message);if(!(null==(r=e.data)?void 0:r.store))throw new Error("Missing store from store query response.");return e.data.store}catch(a){throw console.error(a),new Error(`Could not find a store for ${this._storeDomain}`)}}_findSellingPlanByName(t,e){for(const i of t){const t=i.node;for(const i of t.sellingPlans.edges){const t=i.node;if(e===t.name)return t}}return null}async _fetchSellingPlanFromVariant(t){var e,i,o,r,n,a,s,d,p,l,c,h,u;const m=(null==(e=window.Shopify)?void 0:e.shop)??(null==(o=null==(i=window.Shopify)?void 0:i.Checkout)?void 0:o.apiHost);if(!m)throw new Error("No shop found in Shopify object.");try{const e=new URL(window.location.href);e.pathname=this._apiEndpoint;const i={query:"query SellingPlanFromVariant($store: String!, $variantId: String!){\n sellingPlanFromVariant(input: {store: $store, variantId: $variantId })\n}",variables:{store:m,variantId:`gid://shopify/ProductVariant/${null==(r=this._protectionVariant)?void 0:r.id}`}},o=await this._fetch.post(e.toString(),i);if(!o)throw new Error("Missing response for selling plan query.");if(null==(n=o.errors)?void 0:n.length)throw new Error(o.errors[0].message);if(!(null==(a=o.data)?void 0:a.sellingPlanFromVariant))throw new Error("Missing variant from selling plan query response.");const g=(null==(d=null==(s=o.data.sellingPlanFromVariant)?void 0:s.sellingPlanGroups)?void 0:d.edges)||[],f=(null==(u=null==(h=null==(c=null==(l=null==(p=g[0])?void 0:p.node)?void 0:l.sellingPlans)?void 0:c.edges)?void 0:h[0])?void 0:u.node)||null;return this._findSellingPlanByName(g,t.name)||f}catch(g){console.error("Error during the query ====>",g)}}async _fetchCart(){try{if(this.useCustomStoreFront&&this.cartId){const t=await this.runStoreFrontQuery("query getCart($cartId: ID!){ cart( id: $cartId ) { id createdAt updatedAt lines(first: 10) { edges { node { id quantity merchandise { ... on ProductVariant { id sku } } cost{ totalAmount{ amount currencyCode } } } } } cost { totalAmount { amount currencyCode } subtotalAmount { amount currencyCode } } } }",{cartId:this.cartId});return ve(t.cart)}return await this._fetch.get("/cart.js")}catch(t){throw we(t.message),new Error("Could not fetch cart for current domain.")}}async _fetchProduct(){var t,e,i,o,r,n,a,s;try{let d;if(this.useCustomStoreFront){const p=await this.runStoreFrontQuery("query product($handle: String!) { product(handle: $handle) { id title images(first: 1) {edges { node { id url altText } } } handle variants(first: 100) { edges { node { id title price { amount } } } } } }",{handle:xe});if(null==p?void 0:p.product){const l=p.product;d={id:l.id,title:l.title,image:{id:null==(o=null==(i=null==(e=null==(t=null==l?void 0:l.images)?void 0:t.edges)?void 0:e[0])?void 0:i.node)?void 0:o.id,src:null==(s=null==(a=null==(n=null==(r=null==l?void 0:l.images)?void 0:r.edges)?void 0:n[0])?void 0:a.node)?void 0:s.url},variants:l.variants.edges.map((t=>({id:t.node.id,price:t.node.price.amount})))}}}else d=(await this._fetch.get(`/products/${xe}.json`)).product;return d}catch(d){throw we(d.message),new Error("Could not fetch protection product for current domain.")}}hasProtection(){return this._hasProtectionInCart}async updateCart(t){t||(t=await this._fetchCart()),this._cart=t}async addCartProtectionVariant(){var t,i,o,r;let n,a;if(this.supportSubscriptions){const o=null==(i=null==(t=this._cart)?void 0:t.items)?void 0:i.find((t=>{var e;return t.id!==(null==(e=this._protectionVariant)?void 0:e.id)&&!!(null==t?void 0:t.selling_plan_allocation)}));if(o){const t=await this._fetchSellingPlanFromVariant(o.selling_plan_allocation.selling_plan);a=t?e(t.id):null}}if(this.useCustomStoreFront){const t=await this.runStoreFrontQuery("mutation AddItemToCart($cartId: ID!, $lines: [CartLineInput!]!) { cartLinesAdd(cartId: $cartId, lines: $lines) { cart { id lines(first: 10) { edges { node { id quantity merchandise { ... on ProductVariant { id sku } } cost{ totalAmount{ amount currencyCode } } } } } cost { totalAmount { amount currencyCode } subtotalAmount { amount currencyCode } } } } }",{cartId:this.cartId,lines:[{merchandiseId:String(null==(o=this._protectionVariant)?void 0:o.id),quantity:1,sellingPlanId:a}]});n=ve(t.cartLinesAdd.cart)}else{const t={quantity:1,id:String(null==(r=this._protectionVariant)?void 0:r.id),selling_plan:a};n=await this._fetch.post("/cart/add.js",t)}return n}async updateCartProtectionVariant(t,e=null,i=null){var o,r;let n;if(this.useCustomStoreFront){const r=await this.runStoreFrontQuery("mutation RemoveItemToCart($cartId: ID!, $lines: [CartLineUpdateInput!]!) { cartLinesUpdate(cartId: $cartId, lines: $lines) { cart { id lines(first: 10) { edges { node { id quantity merchandise { ... on ProductVariant { id sku } } cost{ totalAmount{ amount currencyCode } } } } } cost { totalAmount { amount currencyCode } subtotalAmount { amount currencyCode } } } } }",{cartId:this.cartId,lines:[{id:String(e?e.key:null==(o=this._protectionCartItem)?void 0:o.key),quantity:t,sellingPlanId:i}]});n=ve(r.cartLinesUpdate.cart)}else{const o={quantity:t,id:String(e?e.key:null==(r=this._protectionCartItem)?void 0:r.key),selling_plan:i};n=await this._fetch.post("/cart/change.js",o)}return n}async addProtection(){var t,e;try{if(!this._store)throw new Error("Store has not been loaded.");if(!(null==(t=this._cart)?void 0:t.items))throw new Error("Cart has not been loaded.");if(!(null==(e=this._protectionVariant)?void 0:e.id))throw new Error("No protection variant found.");this._setState("loading");const i=await this.addCartProtectionVariant();await this._handleRefresh(i),this._setState("success")}catch(i){we(i.message)}finally{this._cart=await this._fetchCart(),this._setState("success")}}async removeProtection(){try{if(!this._store)throw new Error("Store has not been loaded.");if(!this._protectionCartItem)throw new Error("Protection product not found.");this._setState("loading");const t=await this.updateCartProtectionVariant(0,this._protectionCartItem);await this._handleRefresh(t),this._cart=t,this._setState("success")}catch(t){we(t.message)}finally{this._cart=await this._fetchCart(),this._setState("success")}}async attemptAddProtection(){var t,e,i,o,r,n;if(!(null==(t=this._store)?void 0:t.widgetAutoOptIn))return;if(!(null==(e=this._cart)?void 0:e.items)||!(null==(i=this._cart)?void 0:i.item_count))return;const a=null==(o=this._cart.items)?void 0:o.findIndex((t=>{var e,i;return null==(i=null==(e=this._protectionProduct)?void 0:e.variants)?void 0:i.some((e=>e.id===t.variant_id))})),s=null==(r=this._cart)?void 0:r.items[a];if(this._hasProtectionInCart=!!s,1===this._cart.item_count&&s)return;!!sessionStorage.getItem(_e)||!this._hasProtectionInCart&&(null==(n=this._cart)?void 0:n.item_count)&&this._store.widgetShowCart&&(await this.addProtection(),sessionStorage.setItem(_e,JSON.stringify({loaded:!0})))}async handleMultipleProtectionVariants(){var t,e,i,o,r;if(!(null==(t=this._cart)?void 0:t.items)||!(null==(e=this._cart)?void 0:e.item_count))return;let n=0;if(null==(i=this._cart.items)||i.forEach((t=>{var e,i;(null==(i=null==(e=this._protectionProduct)?void 0:e.variants)?void 0:i.some((e=>e.id===t.variant_id)))&&n++})),n>1){const t=null==(o=this._cart.items)?void 0:o.findIndex((t=>{var e,i;return null==(i=null==(e=this._protectionProduct)?void 0:e.variants)?void 0:i.some((e=>e.id===t.variant_id))})),e=null==(r=this._cart)?void 0:r.items[t],i=await this.updateCartProtectionVariant(0,e);return await this._handleRefresh(i)}}learnMorePopupTemplate(){return H`
1172
1172
  <shipaid-popup-learn-more
1173
1173
  ?active=${"learn-more"===this._popup}
1174
1174
  @close=${()=>{this.persistPopup&&localStorage.removeItem(`${Ce}`),this._popup=null}}
@@ -1267,13 +1267,13 @@ function qt(t,e,i){return t?e():null==i?void 0:i()}const jt=u`
1267
1267
  @shipaid-about=${()=>{this._popup="learn-more",this.persistPopup&&this.setPopupKey()}}
1268
1268
  @shipaid-remove-protection=${async()=>{await this.removeProtection(),window.location.href="/checkout"}}
1269
1269
  ></checkout-package-protection>
1270
- `,s)})),Z}createRenderRoot(){return this.useShipAidCheckout?this:super.createRenderRoot()}checkoutButtonTemplate(){var t,e;if(!document.getElementById("shipaid-styles")){const t=document.createElement("style");t.id="shipaid-styles",t.textContent="\n [shipaid-hidden] {\n display: none !important;\n }\n shipaid-widget {\n width: 100%;\n }\n ",document.head.appendChild(t)}const i=document.querySelector(`${this.dataSelector}:not(#shipaid-checkout-button)`);if(!i)return;const o=i.className,r=Number(null==(t=this._protectionVariant)?void 0:t.price)||0,n=(Number(null==(e=this._cart)?void 0:e.total_price)||0)/100,a=this._hasProtectionInCart?n:r+n,s=H`
1271
- <svg width="1.5rem" height="1.5rem" viewBox="0 0 50 50" xmlns="http://www.w3.org/2000/svg" fill="none" stroke="currentColor" stroke-width="4" class="shipaid-loader">
1272
- <circle cx="25" cy="25" r="20" stroke-opacity="0.5"/>
1273
- <path d="M45 25a20 20 0 0 1-40 0" stroke="currentColor">
1274
- <animateTransform attributeName="transform" type="rotate" from="0 25 25" to="360 25 25" dur="1s" repeatCount="indefinite"/>
1275
- </path>
1276
- </svg>
1270
+ `,s)})),Z}createRenderRoot(){return this.useShipAidCheckout?this:super.createRenderRoot()}checkoutButtonTemplate(){var t,e,i,o;if(!document.getElementById("shipaid-styles")){const t=document.createElement("style");t.id="shipaid-styles",t.textContent="\n [shipaid-hidden] {\n display: none !important;\n }\n shipaid-widget {\n width: 100%;\n }\n ",document.head.appendChild(t)}if(!this.dataSelector)return void console.error("[shipaid-widget] we couldn't find the 'data-selector' attribute.");let r=null;if(this.shadowRootSelector){const t=document.querySelector(this.shadowRootSelector);if(!t||!t.shadowRoot)return void console.warn(`ShadowRoot not found in the element '${this.shadowRootSelector}'.`);r=t.shadowRoot.querySelector(`${this.dataSelector}:not(#shipaid-checkout-button)`)}else r=document.querySelector(`${this.dataSelector}:not(#shipaid-checkout-button)`);if(!r)return void console.warn(`Button not found with selector '${this.dataSelector}'.`);const n=r.className,a=Number(null==(t=this._protectionVariant)?void 0:t.price)||0,s=(Number(null==(e=this._cart)?void 0:e.total_price)||0)/100,d=this._hasProtectionInCart?s:a+s,p=H`
1271
+ <svg width="1.5rem" height="1.5rem" viewBox="0 0 50 50" xmlns="http://www.w3.org/2000/svg" fill="none" stroke="currentColor" stroke-width="4" class="shipaid-loader">
1272
+ <circle cx="25" cy="25" r="20" stroke-opacity="0.5"/>
1273
+ <path d="M45 25a20 20 0 0 1-40 0" stroke="currentColor">
1274
+ <animateTransform attributeName="transform" type="rotate" from="0 25 25" to="360 25 25" dur="1s" repeatCount="indefinite"/>
1275
+ </path>
1276
+ </svg>
1277
1277
  `;return H`
1278
1278
  <style>
1279
1279
  :host {
@@ -1282,6 +1282,16 @@ function qt(t,e,i){return t?e():null==i?void 0:i()}const jt=u`
1282
1282
  width: 100%;
1283
1283
  }
1284
1284
 
1285
+ .shipaid-container a#shipaid-checkout-button {
1286
+ width: 100%;
1287
+ margin: 0px;
1288
+ text-decoration: unset;
1289
+ }
1290
+ .shipaid-container a#shipaid-continue-button {
1291
+ display: block;
1292
+ margin: 1rem 0px 0px;
1293
+ }
1294
+
1285
1295
  .shipaid-container button {
1286
1296
  width: 100%;
1287
1297
  }
@@ -1361,7 +1371,7 @@ function qt(t,e,i){return t?e():null==i?void 0:i()}const jt=u`
1361
1371
  <strong>Checkout+</strong>
1362
1372
  <div class="protection-value">
1363
1373
  <slot name="title">ShipAid Delivery Guarantee</slot>
1364
- - ${r?this._currencyFormat(r):s}
1374
+ - ${a?this._currencyFormat(a):p}
1365
1375
  </div>
1366
1376
  </div>
1367
1377
  <div class="help-icon" @click=${()=>{this._popup="learn-more",this.persistPopup&&this.setPopupKey()}}>
@@ -1372,9 +1382,9 @@ function qt(t,e,i){return t?e():null==i?void 0:i()}const jt=u`
1372
1382
  </div>
1373
1383
  </div>
1374
1384
 
1375
- <button id="shipaid-checkout-button" class="${o}" @click=${()=>{var t,e;sessionStorage.setItem("shipaid_variant",JSON.stringify(null==(t=this._protectionVariant)?void 0:t.id)),window.location.href=`/checkout?attributes[_shipaid-internal]=1&updates[${null==(e=this._protectionVariant)?void 0:e.id}]=1`}}>
1376
- <slot name="checkout-button-text">CHECKOUT+</slot> ${a?this._currencyFormat(a):s}
1377
- </button>
1385
+ <a href="/checkout${(null==(i=this._protectionVariant)?void 0:i.id)?`?attributes[_shipaid-internal]=1&updates[${null==(o=this._protectionVariant)?void 0:o.id}]=1`:""}" id="shipaid-checkout-button" class="${n}" @click=${()=>{var t;sessionStorage.setItem("shipaid_variant",JSON.stringify(null==(t=this._protectionVariant)?void 0:t.id))}}>
1386
+ <slot name="checkout-button-text">CHECKOUT+</slot> ${d?this._currencyFormat(d):p}
1387
+ </a>
1378
1388
 
1379
1389
  <a href="#" class="continue-link" @click=${async()=>{await this.removeProtection(),window.location.href="/checkout"}}>
1380
1390
  <slot name="link-continue">Continue without delivery guarantee</slot>
@@ -1712,4 +1722,4 @@ function qt(t,e,i){return t?e():null==i?void 0:i()}const jt=u`
1712
1722
  ${qt(this._hasFinishedSetup,(()=>{var t,e,i,o,r;const n=null==(o=null==(i=null==(e=null==(t=this._store)?void 0:t.widgetConfigurations)?void 0:e.widget)?void 0:i.theme_checkout)?void 0:o.checkoutButtonSelector,a=sessionStorage.getItem("shipaidWidgetTheme");!a&&n&&sessionStorage.setItem("shipaidWidgetTheme",n),!this.useShipAidCheckout&&n||sessionStorage.removeItem("shipaidWidgetTheme");return this._shouldShowWidget&&this.planActive&&(null==(r=this._store)?void 0:r.widgetShowCart)?a?this.contactlessCheckoutButtonTemplate():this.promptTemplate():Z}),(()=>sessionStorage.getItem("shipaidWidgetTheme")?this.contactlessCheckoutButtonTemplate():this.promptTemplate()))}
1713
1723
  </div>
1714
1724
 
1715
- `}};Ae.styles=ue;let Pe=Ae;fe([n({type:String,attribute:!0})],Pe.prototype,"env"),fe([n({type:Boolean,attribute:!0})],Pe.prototype,"useCustomStoreFront"),fe([n({type:String,attribute:!0})],Pe.prototype,"storeDomain"),fe([n({type:String,attribute:!0})],Pe.prototype,"storeAccessToken"),fe([n({type:String,attribute:!0})],Pe.prototype,"cartId"),fe([n({type:Boolean,attribute:!0})],Pe.prototype,"disablePolling"),fe([n({type:Boolean,attribute:!0})],Pe.prototype,"disableActions"),fe([n({type:Number,attribute:!0})],Pe.prototype,"pollingInterval"),fe([n({type:Boolean,attribute:!0})],Pe.prototype,"disableRefresh"),fe([n({type:Boolean,attribute:!0})],Pe.prototype,"refreshCart"),fe([n({type:Boolean,attribute:!0})],Pe.prototype,"persistPopup"),fe([n({type:Boolean,attribute:!0})],Pe.prototype,"defaultToggleButton"),fe([n({type:String,attribute:!0})],Pe.prototype,"lang"),fe([n({type:String,attribute:!0})],Pe.prototype,"currency"),fe([n({type:String,attribute:!0})],Pe.prototype,"customerId"),fe([n({type:Boolean,attribute:!0})],Pe.prototype,"supportSubscriptions"),fe([n({type:String,attribute:"data-selector"})],Pe.prototype,"dataSelector"),fe([n({type:Boolean,attribute:"use-shipaid-checkout"})],Pe.prototype,"useShipAidCheckout"),fe([a()],Pe.prototype,"_storeDomain"),fe([a()],Pe.prototype,"_store"),fe([a()],Pe.prototype,"_cart"),fe([a()],Pe.prototype,"_protectionProduct"),fe([a()],Pe.prototype,"_cartLastUpdated"),fe([a()],Pe.prototype,"_hasFinishedSetup"),fe([a()],Pe.prototype,"_shouldShowWidget"),fe([a()],Pe.prototype,"_hasProtectionInCart"),fe([a()],Pe.prototype,"_protectionCartItem"),fe([a()],Pe.prototype,"_protectionVariant"),fe([a()],Pe.prototype,"hasLoadedStrings"),fe([a()],Pe.prototype,"fetchInterceptorCleanup"),fe([a()],Pe.prototype,"intervalId"),fe([a()],Pe.prototype,"_state"),fe([a()],Pe.prototype,"_popup"),customElements.get("shipaid-widget")||customElements.define("shipaid-widget",Pe);const Le="Laden des ShipAid-Widgets...",ze="Liefergarantie",Ee="im Falle von Verlust, Beschädigung oder Diebstahl",Me={button:"Bereitgestellt von"},Ie={add:"Hinzufügen",remove:"Entfernen",loading:"Lädt..."},Te={loading:Le,title:ze,description:Ee,footer:Me,actions:Ie,"learn-more-popup":{close:"Schließen",title:"Liefergarantie",subtitle:"Wir ermöglichen es Ihren Lieblingsmarken, eine Liefergarantie anzubieten, weil jede Bestellung wertvoll ist!",disclaimer:{"subtitle-enable":"Wir ermöglichen es Ihren Lieblingsmarken, eine Liefergarantie zu bieten, denn wir wissen, dass jede Bestellung wertvoll ist und Dinge passieren können!","subtitle-monitor":"Wir überwachen Ihr Paket kontinuierlich und bieten ein praktisches Portal, damit Sie den Fortschritt Ihrer Bestellung jederzeit verfolgen können!","subtitle-notify":"Sie werden während des gesamten Versandprozesses benachrichtigt, um sicherzustellen, dass Sie auf dem Laufenden bleiben.","subtitle-resolution":"Sie werden während des gesamten Versandprozesses benachrichtigt, um sicherzustellen, dass Sie auf dem Laufenden bleiben.",text:"Durch den Erwerb dieser Liefergarantie stimmen Sie unseren Servicebedingungen und Datenschutzrichtlinien zu. Diese Garantie ist nicht verpflichtend, IST KEINE Versicherung und bietet keine Entschädigung für Verluste, Schäden oder Haftungen, die aus einem zufälligen oder unbekannten Ereignis resultieren. Sollte das Produkt nicht in zufriedenstellendem Zustand geliefert werden, kann die Marke, bei der Sie gekauft haben, dieses kostenlos ersetzen. ShipAid liefert keine Produkte oder Dienstleistungen direkt an Verbraucher, sondern bietet einen Dienst an, der Marken ermöglicht, den Produktersatz für ihre Kunden zu erleichtern. Der Erwerb dieser Garantie bedeutet nicht, dass Sie automatisch eine Rückerstattung für irgendwelche Produkte oder Versandkosten erhalten, da der Lösungsprozess und die Entscheidung über eine Kompensation strikt von der Marke, bei der Sie kaufen, entschieden werden. Die Marke wird einen Nachweis für Beschädigungen oder die Nichtlieferung des Produkts verlangen."},links:{terms:"Servicebedingungen",privacy:"Datenschutzrichtlinie"}}},qe=Object.freeze(Object.defineProperty({__proto__:null,actions:Ie,default:Te,description:Ee,footer:Me,loading:Le,title:ze},Symbol.toStringTag,{value:"Module"})),je="Cargando el widget ShipAid...",Ne="Garantía de entrega",Oe="en caso de Pérdida, Daño o Robo",Ve={button:"Energizado por"},Re={add:"Agregar",remove:"Eliminar",loading:"Cargando..."},Ue={loading:je,title:Ne,description:Oe,footer:Ve,actions:Re,"learn-more-popup":{close:"Cerca",title:"Garantía de entrega",disclaimer:{"subtitle-enable":"Permitimos que sus marcas favoritas brinden una garantía de entrega porque sabemos que cada pedido es valioso y las cosas suceden!","subtitle-monitor":"Supervisamos continuamente su paquete y le ofrecemos un portal conveniente para que pueda realizar un seguimiento del progreso de su pedido en cualquier momento.","subtitle-notify":"Se le notificará durante todo el proceso de envío, asegurándose de que esté actualizado en cada paso del camino.","subtitle-resolution":"En caso de cualquier problema durante el tránsito, ofrecemos un método rápido y fácil para informar el problema directamente a la marca, para una resolución rápida.",text:"Al comprar esta garantía de entrega, acepta nuestros Términos de servicio y Política de privacidad. Usted no está obligado a comprar esta garantía. Esta garantía NO es un seguro y no brinda indemnización por pérdida, daño o responsabilidad que surja de un evento contingente o desconocido, sino que, a través de las marcas de ShipAid, brinda una garantía de entrega mediante la cual, si el producto que ordenó no se entrega en condiciones satisfactorias, la marca desde el que ordenó el producto puede reemplazar el producto sin cargo. ShipAid no proporciona ningún producto o servicio directamente a los consumidores, sino que proporciona un servicio que permite a las marcas facilitar el reemplazo de productos a sus clientes. La compra de esta garantía no significa que se le reembolsará automáticamente cualquier producto o costo de envío porque el proceso de resolución y la decisión de compensación lo decide estrictamente la marca a la que le compra. La marca requerirá prueba de daño o producto no entregado."},links:{terms:"Términos de servicio",privacy:"Política de Privacidad"}}},Be=Object.freeze(Object.defineProperty({__proto__:null,actions:Re,default:Ue,description:Oe,footer:Ve,loading:je,title:Ne},Symbol.toStringTag,{value:"Module"})),De="Chargement du widget ShipAid...",Fe="Garantie de livraison",He="en cas de Perte, Dommages ou Vol",We={button:"Propulsé par"},Ze={add:"Ajouter",remove:"Retirer",loading:"Chargement..."},Ge={loading:De,title:Fe,description:He,footer:We,actions:Ze,"learn-more-popup":{close:"Fermer",title:"Garantie de livraison",subtitle:"Nous permettons à vos marques préférées d'offrir une garantie de livraison car chaque commande est précieuse !",disclaimer:{"subtitle-enable":"Nous permettons à vos marques préférées de fournir une garantie de livraison car nous savons que chaque commande est précieuse et que des incidents peuvent survenir !","subtitle-monitor":"Nous surveillons continuellement votre colis et offrons un portail pratique pour vous permettre de suivre l'avancement de votre commande à tout moment !","subtitle-notify":"Vous serez notifié tout au long du processus d'expédition, vous assurant que vous restez informé à chaque étape du parcours.","subtitle-resolution":"Vous serez notifié tout au long du processus d'expédition, vous assurant que vous restez informé à chaque étape du parcours.",text:"En acquérant cette garantie de livraison, vous acceptez nos Conditions de Service et notre Politique de Confidentialité. Cette garantie n'est pas obligatoire, N'EST PAS une assurance et ne fournit pas d'indemnisation pour les pertes, dommages ou responsabilités résultant d'un événement contingent ou inconnu. Si le produit n'est pas livré dans des conditions satisfaisantes, la marque auprès de laquelle vous avez acheté peut le remplacer gratuitement. ShipAid ne fournit aucun produit ou service directement aux consommateurs, mais offre un service permettant aux marques de faciliter le remplacement du produit pour leurs clients. L'achat de cette garantie ne signifie pas que vous serez automatiquement remboursé pour tout produit ou frais de port, car le processus de résolution et la décision de compensation sont strictement décidés par la marque que vous achetez. La marque exigera une preuve de dommage ou de produit non livré."},links:{terms:"Conditions de service",privacy:"Politique de Confidentialité"}}},Ke=Object.freeze(Object.defineProperty({__proto__:null,actions:Ze,default:Ge,description:He,footer:We,loading:De,title:Fe},Symbol.toStringTag,{value:"Module"})),Qe="Caricamento del widget ShipAid...",Ye="Garanzia di consegna",Je="in caso di Perdita, Danno o Furto",Xe={button:"Offerto da"},ti={add:"Aggiungere",remove:"Rimuovere",loading:"Caricamento ..."},ei={loading:Qe,title:Ye,description:Je,footer:Xe,actions:ti,"learn-more-popup":{close:"Vicina",title:"Garanzia di consegna",subtitle:"Consentiamo ai tuoi marchi preferiti di offrire una garanzia di consegna perché ogni ordine è prezioso!",disclaimer:{"subtitle-enable":"Consentiamo ai tuoi marchi preferiti di fornire una garanzia di consegna perché sappiamo che ogni ordine è prezioso e le cose accadono!","subtitle-monitor":"Monitoriamo continuamente il tuo pacco e ti offriamo un comodo portale per monitorare lo stato di avanzamento del tuo ordine in qualsiasi momento!","subtitle-notify":"Riceverai una notifica durante l'intero processo di spedizione, assicurandoti di rimanere aggiornato in ogni fase del processo.","subtitle-resolution":"Você será notificado durante todo o processo de envio, garantindo que você fique atualizado a cada passo do caminho.",text:"Acquistando questa garanzia di consegna, accetti i nostri Termini di servizio e l'Informativa sulla privacy. Non sei obbligato ad acquistare questa garanzia. Questa garanzia NON è un'assicurazione e non fornisce un indennizzo contro perdite, danni o responsabilità derivanti da un evento contingente o sconosciuto, ma piuttosto, attraverso ShipAid i marchi forniscono una garanzia di consegna in base alla quale se il prodotto ordinato non viene consegnato in condizioni soddisfacenti, il marchio da cui hai ordinato il prodotto può sostituire il prodotto gratuitamente. ShipAid non fornisce alcun prodotto o servizio direttamente ai consumatori, ma fornisce invece un servizio che consente ai marchi di facilitare la sostituzione del prodotto ai propri clienti. L'acquisto di questa garanzia non significa che verrai automaticamente rimborsato per qualsiasi prodotto o costo di spedizione perché il processo di risoluzione e la decisione per il risarcimento sono rigorosamente decisi dal marchio da cui stai acquistando. Il marchio richiederà la prova del danno o del prodotto non consegnato."},links:{terms:"Termini di servizio",privacy:"Politica sulla riservatezza"}}},ii=Object.freeze(Object.defineProperty({__proto__:null,actions:ti,default:ei,description:Je,footer:Xe,loading:Qe,title:Ye},Symbol.toStringTag,{value:"Module"})),oi="Laad ShipAid Widget...",ri="Bezorggarantie",ni="in geval van verlies, schade of diefstal",ai={button:"Aangedreven door"},si={add:"Toevoegen",remove:"Verwijderen",loading:"Bezig met laden..."},di={loading:oi,title:ri,description:ni,footer:ai,actions:si,"learn-more-popup":{close:"Sluiten",title:"Bezorggarantie",disclaimer:{"subtitle-enable":"We stellen je favoriete merken in staat om een bezorggarantie te bieden omdat we weten dat elke bestelling belangrijk is en dingen kunnen gebeuren!","subtitle-monitor":"We monitoren je pakket continu en bieden een handig portaal om de voortgang van je bestelling op elk moment te volgen!","subtitle-notify":"Je wordt gedurende het gehele verzendproces op de hoogte gehouden, zodat je altijd op de hoogte bent van elke stap.","subtitle-resolution":"In geval van problemen tijdens het transport bieden we een snelle en gemakkelijke manier om het probleem direct bij het merk te melden, voor een snelle oplossing.",text:"Door deze bezorggarantie aan te schaffen, ga je akkoord met onze Servicevoorwaarden en Privacybeleid. Je bent niet verplicht om deze garantie aan te schaffen. Deze garantie is GEEN verzekering en biedt geen schadevergoeding voor verlies, schade of aansprakelijkheid als gevolg van een onvoorziene of onbekende gebeurtenis, maar biedt via ShipAid een bezorggarantie waarbij, als het product dat je hebt besteld niet in bevredigende staat wordt geleverd, het merk van wie je het product hebt besteld, het product gratis kan vervangen. ShipAid levert geen producten of diensten direct aan consumenten, maar biedt een dienst die merken in staat stelt om productvervanging aan hun klanten te faciliteren. Het kopen van deze garantie betekent niet automatisch dat je wordt vergoed voor product- of verzendkosten, aangezien het oplossingproces en de beslissing voor compensatie strikt wordt bepaald door het merk van wie je koopt. Het merk zal bewijs van schade of niet-geleverde producten vereisen."},links:{terms:"Servicevoorwaarden",privacy:"Privacybeleid"}}},pi=Object.freeze(Object.defineProperty({__proto__:null,actions:si,default:di,description:ni,footer:ai,loading:oi,title:ri},Symbol.toStringTag,{value:"Module"})),li="Carregando o widget ShipAid...",ci="Garantia de entrega",hi="em caso de Perda, Danos ou Roubo",ui={button:"Distribuído por"},mi={add:"Adicionar",remove:"Remover",loading:"Carregando..."},gi={loading:li,title:ci,description:hi,footer:ui,actions:mi,"learn-more-popup":{close:"Fechar",title:"Garantia de entrega",subtitle:"Capacitamos suas marcas favoritas para oferecer uma garantia de entrega porque cada pedido é precioso!",disclaimer:{"subtitle-enable":"Permitimos que suas marcas favoritas forneçam uma garantia de entrega porque sabemos que cada pedido é precioso e as coisas acontecem!","subtitle-monitor":"Monitoramos continuamente o seu pacote e oferecemos um portal conveniente para você acompanhar o andamento do seu pedido a qualquer momento!","subtitle-notify":"Você será notificado durante todo o processo de envio, garantindo que você fique atualizado a cada passo do caminho.","subtitle-resolution":"Você será notificado durante todo o processo de envio, garantindo que você fique atualizado a cada passo do caminho.",text:"Ao adquirir esta garantia de entrega, você concorda com nossos Termos de Serviço e Política de Privacidade. Esta garantia não é obrigatória, NÃO é um seguro e não fornece indenização contra perdas, danos ou responsabilidade decorrentes de um contingente ou desconhecido. Caso o produto não seja entregue em condições satisfatórias, a marca da qual você comprou pode substituí-lo gratuitamente. A ShipAid não fornece nenhum produto ou serviço diretamente aos consumidores, mas sim presta um serviço que permite às marcas facilitar a substituição do produto aos seus clientes. Adquirir esta garantia não significa que você será automaticamente reembolsado por qualquer produto ou custos de envio porque o processo de resolução e decisão de compensação é estritamente decidido pela marca que você está comprando. A marca exigirá prova de danos ou produto não entregue."},links:{terms:"Termos de serviço",privacy:"Política de Privacidade"}}},fi=Object.freeze(Object.defineProperty({__proto__:null,actions:mi,default:gi,description:hi,footer:ui,loading:li,title:ci},Symbol.toStringTag,{value:"Module"}));return t.ShipAidWidget=Pe,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t}({});
1725
+ `}};Ae.styles=ue;let Pe=Ae;fe([n({type:String,attribute:!0})],Pe.prototype,"env"),fe([n({type:Boolean,attribute:!0})],Pe.prototype,"useCustomStoreFront"),fe([n({type:String,attribute:!0})],Pe.prototype,"storeDomain"),fe([n({type:String,attribute:!0})],Pe.prototype,"storeAccessToken"),fe([n({type:String,attribute:!0})],Pe.prototype,"cartId"),fe([n({type:Boolean,attribute:!0})],Pe.prototype,"disablePolling"),fe([n({type:Boolean,attribute:!0})],Pe.prototype,"disableActions"),fe([n({type:Number,attribute:!0})],Pe.prototype,"pollingInterval"),fe([n({type:Boolean,attribute:!0})],Pe.prototype,"disableRefresh"),fe([n({type:Boolean,attribute:!0})],Pe.prototype,"refreshCart"),fe([n({type:Boolean,attribute:!0})],Pe.prototype,"persistPopup"),fe([n({type:Boolean,attribute:!0})],Pe.prototype,"defaultToggleButton"),fe([n({type:String,attribute:!0})],Pe.prototype,"lang"),fe([n({type:String,attribute:!0})],Pe.prototype,"currency"),fe([n({type:String,attribute:!0})],Pe.prototype,"customerId"),fe([n({type:Boolean,attribute:!0})],Pe.prototype,"supportSubscriptions"),fe([n({type:String,attribute:"data-selector"})],Pe.prototype,"dataSelector"),fe([n({type:String,attribute:"shadow-root-selector"})],Pe.prototype,"shadowRootSelector"),fe([n({type:Boolean,attribute:"use-shipaid-checkout"})],Pe.prototype,"useShipAidCheckout"),fe([a()],Pe.prototype,"_storeDomain"),fe([a()],Pe.prototype,"_store"),fe([a()],Pe.prototype,"_cart"),fe([a()],Pe.prototype,"_protectionProduct"),fe([a()],Pe.prototype,"_cartLastUpdated"),fe([a()],Pe.prototype,"_hasFinishedSetup"),fe([a()],Pe.prototype,"_shouldShowWidget"),fe([a()],Pe.prototype,"_hasProtectionInCart"),fe([a()],Pe.prototype,"_protectionCartItem"),fe([a()],Pe.prototype,"_protectionVariant"),fe([a()],Pe.prototype,"hasLoadedStrings"),fe([a()],Pe.prototype,"fetchInterceptorCleanup"),fe([a()],Pe.prototype,"intervalId"),fe([a()],Pe.prototype,"_state"),fe([a()],Pe.prototype,"_popup"),customElements.get("shipaid-widget")||customElements.define("shipaid-widget",Pe);const Le="Laden des ShipAid-Widgets...",ze="Liefergarantie",Ee="im Falle von Verlust, Beschädigung oder Diebstahl",Me={button:"Bereitgestellt von"},Ie={add:"Hinzufügen",remove:"Entfernen",loading:"Lädt..."},Te={loading:Le,title:ze,description:Ee,footer:Me,actions:Ie,"learn-more-popup":{close:"Schließen",title:"Liefergarantie",subtitle:"Wir ermöglichen es Ihren Lieblingsmarken, eine Liefergarantie anzubieten, weil jede Bestellung wertvoll ist!",disclaimer:{"subtitle-enable":"Wir ermöglichen es Ihren Lieblingsmarken, eine Liefergarantie zu bieten, denn wir wissen, dass jede Bestellung wertvoll ist und Dinge passieren können!","subtitle-monitor":"Wir überwachen Ihr Paket kontinuierlich und bieten ein praktisches Portal, damit Sie den Fortschritt Ihrer Bestellung jederzeit verfolgen können!","subtitle-notify":"Sie werden während des gesamten Versandprozesses benachrichtigt, um sicherzustellen, dass Sie auf dem Laufenden bleiben.","subtitle-resolution":"Sie werden während des gesamten Versandprozesses benachrichtigt, um sicherzustellen, dass Sie auf dem Laufenden bleiben.",text:"Durch den Erwerb dieser Liefergarantie stimmen Sie unseren Servicebedingungen und Datenschutzrichtlinien zu. Diese Garantie ist nicht verpflichtend, IST KEINE Versicherung und bietet keine Entschädigung für Verluste, Schäden oder Haftungen, die aus einem zufälligen oder unbekannten Ereignis resultieren. Sollte das Produkt nicht in zufriedenstellendem Zustand geliefert werden, kann die Marke, bei der Sie gekauft haben, dieses kostenlos ersetzen. ShipAid liefert keine Produkte oder Dienstleistungen direkt an Verbraucher, sondern bietet einen Dienst an, der Marken ermöglicht, den Produktersatz für ihre Kunden zu erleichtern. Der Erwerb dieser Garantie bedeutet nicht, dass Sie automatisch eine Rückerstattung für irgendwelche Produkte oder Versandkosten erhalten, da der Lösungsprozess und die Entscheidung über eine Kompensation strikt von der Marke, bei der Sie kaufen, entschieden werden. Die Marke wird einen Nachweis für Beschädigungen oder die Nichtlieferung des Produkts verlangen."},links:{terms:"Servicebedingungen",privacy:"Datenschutzrichtlinie"}}},qe=Object.freeze(Object.defineProperty({__proto__:null,actions:Ie,default:Te,description:Ee,footer:Me,loading:Le,title:ze},Symbol.toStringTag,{value:"Module"})),je="Cargando el widget ShipAid...",Ne="Garantía de entrega",Oe="en caso de Pérdida, Daño o Robo",Ve={button:"Energizado por"},Re={add:"Agregar",remove:"Eliminar",loading:"Cargando..."},Ue={loading:je,title:Ne,description:Oe,footer:Ve,actions:Re,"learn-more-popup":{close:"Cerca",title:"Garantía de entrega",disclaimer:{"subtitle-enable":"Permitimos que sus marcas favoritas brinden una garantía de entrega porque sabemos que cada pedido es valioso y las cosas suceden!","subtitle-monitor":"Supervisamos continuamente su paquete y le ofrecemos un portal conveniente para que pueda realizar un seguimiento del progreso de su pedido en cualquier momento.","subtitle-notify":"Se le notificará durante todo el proceso de envío, asegurándose de que esté actualizado en cada paso del camino.","subtitle-resolution":"En caso de cualquier problema durante el tránsito, ofrecemos un método rápido y fácil para informar el problema directamente a la marca, para una resolución rápida.",text:"Al comprar esta garantía de entrega, acepta nuestros Términos de servicio y Política de privacidad. Usted no está obligado a comprar esta garantía. Esta garantía NO es un seguro y no brinda indemnización por pérdida, daño o responsabilidad que surja de un evento contingente o desconocido, sino que, a través de las marcas de ShipAid, brinda una garantía de entrega mediante la cual, si el producto que ordenó no se entrega en condiciones satisfactorias, la marca desde el que ordenó el producto puede reemplazar el producto sin cargo. ShipAid no proporciona ningún producto o servicio directamente a los consumidores, sino que proporciona un servicio que permite a las marcas facilitar el reemplazo de productos a sus clientes. La compra de esta garantía no significa que se le reembolsará automáticamente cualquier producto o costo de envío porque el proceso de resolución y la decisión de compensación lo decide estrictamente la marca a la que le compra. La marca requerirá prueba de daño o producto no entregado."},links:{terms:"Términos de servicio",privacy:"Política de Privacidad"}}},Be=Object.freeze(Object.defineProperty({__proto__:null,actions:Re,default:Ue,description:Oe,footer:Ve,loading:je,title:Ne},Symbol.toStringTag,{value:"Module"})),De="Chargement du widget ShipAid...",Fe="Garantie de livraison",He="en cas de Perte, Dommages ou Vol",We={button:"Propulsé par"},Ze={add:"Ajouter",remove:"Retirer",loading:"Chargement..."},Ge={loading:De,title:Fe,description:He,footer:We,actions:Ze,"learn-more-popup":{close:"Fermer",title:"Garantie de livraison",subtitle:"Nous permettons à vos marques préférées d'offrir une garantie de livraison car chaque commande est précieuse !",disclaimer:{"subtitle-enable":"Nous permettons à vos marques préférées de fournir une garantie de livraison car nous savons que chaque commande est précieuse et que des incidents peuvent survenir !","subtitle-monitor":"Nous surveillons continuellement votre colis et offrons un portail pratique pour vous permettre de suivre l'avancement de votre commande à tout moment !","subtitle-notify":"Vous serez notifié tout au long du processus d'expédition, vous assurant que vous restez informé à chaque étape du parcours.","subtitle-resolution":"Vous serez notifié tout au long du processus d'expédition, vous assurant que vous restez informé à chaque étape du parcours.",text:"En acquérant cette garantie de livraison, vous acceptez nos Conditions de Service et notre Politique de Confidentialité. Cette garantie n'est pas obligatoire, N'EST PAS une assurance et ne fournit pas d'indemnisation pour les pertes, dommages ou responsabilités résultant d'un événement contingent ou inconnu. Si le produit n'est pas livré dans des conditions satisfaisantes, la marque auprès de laquelle vous avez acheté peut le remplacer gratuitement. ShipAid ne fournit aucun produit ou service directement aux consommateurs, mais offre un service permettant aux marques de faciliter le remplacement du produit pour leurs clients. L'achat de cette garantie ne signifie pas que vous serez automatiquement remboursé pour tout produit ou frais de port, car le processus de résolution et la décision de compensation sont strictement décidés par la marque que vous achetez. La marque exigera une preuve de dommage ou de produit non livré."},links:{terms:"Conditions de service",privacy:"Politique de Confidentialité"}}},Ke=Object.freeze(Object.defineProperty({__proto__:null,actions:Ze,default:Ge,description:He,footer:We,loading:De,title:Fe},Symbol.toStringTag,{value:"Module"})),Qe="Caricamento del widget ShipAid...",Ye="Garanzia di consegna",Je="in caso di Perdita, Danno o Furto",Xe={button:"Offerto da"},ti={add:"Aggiungere",remove:"Rimuovere",loading:"Caricamento ..."},ei={loading:Qe,title:Ye,description:Je,footer:Xe,actions:ti,"learn-more-popup":{close:"Vicina",title:"Garanzia di consegna",subtitle:"Consentiamo ai tuoi marchi preferiti di offrire una garanzia di consegna perché ogni ordine è prezioso!",disclaimer:{"subtitle-enable":"Consentiamo ai tuoi marchi preferiti di fornire una garanzia di consegna perché sappiamo che ogni ordine è prezioso e le cose accadono!","subtitle-monitor":"Monitoriamo continuamente il tuo pacco e ti offriamo un comodo portale per monitorare lo stato di avanzamento del tuo ordine in qualsiasi momento!","subtitle-notify":"Riceverai una notifica durante l'intero processo di spedizione, assicurandoti di rimanere aggiornato in ogni fase del processo.","subtitle-resolution":"Você será notificado durante todo o processo de envio, garantindo que você fique atualizado a cada passo do caminho.",text:"Acquistando questa garanzia di consegna, accetti i nostri Termini di servizio e l'Informativa sulla privacy. Non sei obbligato ad acquistare questa garanzia. Questa garanzia NON è un'assicurazione e non fornisce un indennizzo contro perdite, danni o responsabilità derivanti da un evento contingente o sconosciuto, ma piuttosto, attraverso ShipAid i marchi forniscono una garanzia di consegna in base alla quale se il prodotto ordinato non viene consegnato in condizioni soddisfacenti, il marchio da cui hai ordinato il prodotto può sostituire il prodotto gratuitamente. ShipAid non fornisce alcun prodotto o servizio direttamente ai consumatori, ma fornisce invece un servizio che consente ai marchi di facilitare la sostituzione del prodotto ai propri clienti. L'acquisto di questa garanzia non significa che verrai automaticamente rimborsato per qualsiasi prodotto o costo di spedizione perché il processo di risoluzione e la decisione per il risarcimento sono rigorosamente decisi dal marchio da cui stai acquistando. Il marchio richiederà la prova del danno o del prodotto non consegnato."},links:{terms:"Termini di servizio",privacy:"Politica sulla riservatezza"}}},ii=Object.freeze(Object.defineProperty({__proto__:null,actions:ti,default:ei,description:Je,footer:Xe,loading:Qe,title:Ye},Symbol.toStringTag,{value:"Module"})),oi="Laad ShipAid Widget...",ri="Bezorggarantie",ni="in geval van verlies, schade of diefstal",ai={button:"Aangedreven door"},si={add:"Toevoegen",remove:"Verwijderen",loading:"Bezig met laden..."},di={loading:oi,title:ri,description:ni,footer:ai,actions:si,"learn-more-popup":{close:"Sluiten",title:"Bezorggarantie",disclaimer:{"subtitle-enable":"We stellen je favoriete merken in staat om een bezorggarantie te bieden omdat we weten dat elke bestelling belangrijk is en dingen kunnen gebeuren!","subtitle-monitor":"We monitoren je pakket continu en bieden een handig portaal om de voortgang van je bestelling op elk moment te volgen!","subtitle-notify":"Je wordt gedurende het gehele verzendproces op de hoogte gehouden, zodat je altijd op de hoogte bent van elke stap.","subtitle-resolution":"In geval van problemen tijdens het transport bieden we een snelle en gemakkelijke manier om het probleem direct bij het merk te melden, voor een snelle oplossing.",text:"Door deze bezorggarantie aan te schaffen, ga je akkoord met onze Servicevoorwaarden en Privacybeleid. Je bent niet verplicht om deze garantie aan te schaffen. Deze garantie is GEEN verzekering en biedt geen schadevergoeding voor verlies, schade of aansprakelijkheid als gevolg van een onvoorziene of onbekende gebeurtenis, maar biedt via ShipAid een bezorggarantie waarbij, als het product dat je hebt besteld niet in bevredigende staat wordt geleverd, het merk van wie je het product hebt besteld, het product gratis kan vervangen. ShipAid levert geen producten of diensten direct aan consumenten, maar biedt een dienst die merken in staat stelt om productvervanging aan hun klanten te faciliteren. Het kopen van deze garantie betekent niet automatisch dat je wordt vergoed voor product- of verzendkosten, aangezien het oplossingproces en de beslissing voor compensatie strikt wordt bepaald door het merk van wie je koopt. Het merk zal bewijs van schade of niet-geleverde producten vereisen."},links:{terms:"Servicevoorwaarden",privacy:"Privacybeleid"}}},pi=Object.freeze(Object.defineProperty({__proto__:null,actions:si,default:di,description:ni,footer:ai,loading:oi,title:ri},Symbol.toStringTag,{value:"Module"})),li="Carregando o widget ShipAid...",ci="Garantia de entrega",hi="em caso de Perda, Danos ou Roubo",ui={button:"Distribuído por"},mi={add:"Adicionar",remove:"Remover",loading:"Carregando..."},gi={loading:li,title:ci,description:hi,footer:ui,actions:mi,"learn-more-popup":{close:"Fechar",title:"Garantia de entrega",subtitle:"Capacitamos suas marcas favoritas para oferecer uma garantia de entrega porque cada pedido é precioso!",disclaimer:{"subtitle-enable":"Permitimos que suas marcas favoritas forneçam uma garantia de entrega porque sabemos que cada pedido é precioso e as coisas acontecem!","subtitle-monitor":"Monitoramos continuamente o seu pacote e oferecemos um portal conveniente para você acompanhar o andamento do seu pedido a qualquer momento!","subtitle-notify":"Você será notificado durante todo o processo de envio, garantindo que você fique atualizado a cada passo do caminho.","subtitle-resolution":"Você será notificado durante todo o processo de envio, garantindo que você fique atualizado a cada passo do caminho.",text:"Ao adquirir esta garantia de entrega, você concorda com nossos Termos de Serviço e Política de Privacidade. Esta garantia não é obrigatória, NÃO é um seguro e não fornece indenização contra perdas, danos ou responsabilidade decorrentes de um contingente ou desconhecido. Caso o produto não seja entregue em condições satisfatórias, a marca da qual você comprou pode substituí-lo gratuitamente. A ShipAid não fornece nenhum produto ou serviço diretamente aos consumidores, mas sim presta um serviço que permite às marcas facilitar a substituição do produto aos seus clientes. Adquirir esta garantia não significa que você será automaticamente reembolsado por qualquer produto ou custos de envio porque o processo de resolução e decisão de compensação é estritamente decidido pela marca que você está comprando. A marca exigirá prova de danos ou produto não entregue."},links:{terms:"Termos de serviço",privacy:"Política de Privacidade"}}},fi=Object.freeze(Object.defineProperty({__proto__:null,actions:mi,default:gi,description:hi,footer:ui,loading:li,title:ci},Symbol.toStringTag,{value:"Module"}));return t.ShipAidWidget=Pe,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t}({});
@@ -1168,7 +1168,7 @@ function qt(t,e,i){return t?e():null==i?void 0:i()}const jt=u`
1168
1168
  .shipaid-prompt .prompt-footer .prompt-footer-badge svg {
1169
1169
  height:var(--shipaid-footer-badge-logo-height, 9px);
1170
1170
  }
1171
- `;var me=(t=>(t.LOADED="shipaid-loaded",t.STATUS_UPDATE="shipaid-protection-status",t))(me||{});var ge=Object.defineProperty,fe=(t,e,i,o)=>{for(var r,n=void 0,a=t.length-1;a>=0;a--)(r=t[a])&&(n=r(e,i,n)||n);return n&&ge(e,i,n),n};const ve=t=>({items:t.lines.edges.map((({node:t})=>({id:t.id,key:t.id,variant_id:t.merchandise.id,sku:t.merchandise.sku,final_line_price:parseFloat(t.cost.totalAmount.amount),quantity:t.quantity}))),total_price:parseFloat(t.cost.totalAmount.amount),item_count:t.lines.edges.length}),be=async(t,e)=>{try{const i=await fetch(t,e);if(!i.ok)throw new Error(await i.text());return await i.json()}catch(i){throw console.error(i),new Error("Failed to complete fetch request.")}},ye=t=>console.warn(`[ShipAid] ${t}`),we=t=>console.error(`[ShipAid] ${t}`),_e="shipaid-protection",Ce="shipaid-protection-popup-show",xe="shipaid-protection",$e="query StoreByDomain ($store: String!) {\n store: storeByDomain (input: {store: $store}) {\n currency\n planActive\n store\n widgetAutoOptIn\n widgetPollProtection\n widgetShowCart\n excludedProductSkus\n excludedCustomersIdsAutoOptIn\n protectionSettings\n widgetConfigurations\n useCustomApp\n }\n}",ke=Object.assign({"./lang/de.json":()=>Promise.resolve().then((()=>qe)).then((t=>t.default)),"./lang/en.json":()=>Promise.resolve().then((()=>he)).then((t=>t.default)),"./lang/es.json":()=>Promise.resolve().then((()=>Be)).then((t=>t.default)),"./lang/fr.json":()=>Promise.resolve().then((()=>Ke)).then((t=>t.default)),"./lang/it.json":()=>Promise.resolve().then((()=>ii)).then((t=>t.default)),"./lang/nl.json":()=>Promise.resolve().then((()=>pi)).then((t=>t.default)),"./lang/pt.json":()=>Promise.resolve().then((()=>fi)).then((t=>t.default))});var Se;Se={loader:async t=>{if("en"===t)return ce;const e=Reflect.get(ke,`./lang/${t}.json`);return e?await e():ce}},bt=Object.assign(Object.assign({},bt),Se);const Ae=class extends ht{constructor(){var t,e,i;super(...arguments),this.env="prod",this.useCustomStoreFront=!1,this.storeDomain="",this.storeAccessToken="",this.cartId="",this.disablePolling=!1,this.disableActions=!1,this.pollingInterval=2500,this.disableRefresh=!1,this.refreshCart=!1,this.persistPopup=!1,this.defaultToggleButton=!1,this.lang="en",this.currency=void 0,this.customerId=void 0,this.supportSubscriptions=!1,this.dataSelector="",this.useShipAidCheckout=!1,this._apiEndpoint="/apps/shipaid",this._storeDomain=(null==(t=window.Shopify)?void 0:t.shop)??(null==(i=null==(e=window.Shopify)?void 0:e.Checkout)?void 0:i.apiHost),this._hasFinishedSetup=!1,this._shouldShowWidget=!1,this._hasProtectionInCart=!1,this.hasLoadedStrings=!1,this.fetchInterceptorCleanup=()=>{},this.intervalId=null,this._state={loading:!1,success:null,error:!1},this._popup=null,this._fetch={get:t=>be(t),post:(t,e)=>be(t,{method:"POST",headers:{"Content-Type":"application/json","X-ShipAid":"1"},body:JSON.stringify(e)})}}shouldUpdate(t){return this.hasLoadedStrings&&super.shouldUpdate(t)}shouldPersistPopup(){return"true"===localStorage.getItem(`${Ce}`)?"learn-more":null}setPopupKey(){this.persistPopup&&localStorage.setItem(`${Ce}`,"true")}get nhost(){const t=`https://${"prod"===this.env?"gjiyysyzjwuculcymsvb":"staging"===this.env?"xfnjpunvafvudwuzwjlm":"local"}.graphql.us-east-1.nhost.run/v1`;return{request:async(e,i)=>{try{const o=await fetch(t,{method:"post",body:JSON.stringify({query:e,variables:i})});return await o.json()}catch(o){console.log(`Nhost Error: ${o}`)}}}}async runStoreFrontQuery(t,e){try{const i=new Headers;i.append("Content-Type","application/json"),i.append("X-Shopify-Storefront-Access-Token",this.storeAccessToken);const o={method:"POST",headers:i,body:JSON.stringify({query:t,variables:e})},r=await fetch(`https://${this.storeDomain}/api/2021-07/graphql.json`,o);if(!r.ok)throw new Error(`GraphQL request failed: ${r.statusText}`);const n=await r.json();if(n.errors)throw new Error(n.errors[0].message);return n.data}catch(i){throw console.error("GraphQL query error:",i),new Error("Failed to execute GraphQL query")}}get shouldRefreshOnUpdate(){return!this.disablePolling&&!this.disableRefresh}get planActive(){var t,e;const{searchParams:i}=new URL(window.location.href);return(null==(t=window.Shopify)?void 0:t.designMode)||i.has("shipaid-test")?(ye("Currently in preview mode."),!0):!!(null==(e=this._store)?void 0:e.planActive)}_currencyFormat(t){var e,i,o,r,n,a;const s=this.currency||(null==(i=null==(e=window.Shopify)?void 0:e.currency)?void 0:i.active)||(null==(o=this._store)?void 0:o.currency)||"USD";if(null==(a=null==(n=null==(r=this._store)?void 0:r.widgetConfigurations)?void 0:n.widget)?void 0:a.currencyFormat){return this._store.widgetConfigurations.widget.currencyFormat.replace("_value_",Number(t)).replace("_currency_",s)}return new Intl.NumberFormat(void 0,{currency:s,style:"currency"}).format(Number(t))}_dispatchEvent(t,e={}){this.dispatchEvent(new CustomEvent(t,{bubbles:!0,composed:!0,detail:e}))}_handleRefreshCart(){if(this.refreshCart)return window.location.reload()}async _handleRefresh(t){const e=Reflect.has(t,"items");if(this.shouldRefreshOnUpdate)return window.location.reload();e||await this.updateCart(),this._dispatchEvent(me.STATUS_UPDATE,{protection:this._hasProtectionInCart,cart:e?t:this._cart,lineItem:e?this._protectionCartItem:t})}async calculateProtectionTotal(t){if(t||(t=await this._fetchCart()),!t)throw new Error("Could not fetch cart.");if(!this._store)throw new Error("Missing ShipAid store");if(!this._protectionProduct)throw new Error("Missing Shopify protection product");return i.calculateProtectionTotal(this._store,this._protectionProduct,t)}_findProtectionVariant(t){if(!this._store)throw new Error("Missing ShipAid store");if(!this._protectionProduct)throw new Error("Missing Shopify protection product");return i.findProtectionVariant(this._store,this._protectionProduct,t)}_setState(t,e){this._state={loading:"loading"===t,success:"success"===t,error:"error"===t&&(e||!0)}}_handleConfirmationPopup(){"confirmation"!==this._popup&&(this._popup="confirmation")}_updateProtection(){var t,e,i;const o=null==(i=null==(e=null==(t=this._store)?void 0:t.widgetConfigurations)?void 0:e.widget)?void 0:i.removeWithConfirmation;if(this._hasProtectionInCart)return o?this._handleConfirmationPopup():this.removeProtection();this.addProtection()}async _fetchShipAidData(){var t,e,i,o,r;let n;if(n=this.storeDomain?this.storeDomain:(null==(t=window.Shopify)?void 0:t.shop)??(null==(i=null==(e=window.Shopify)?void 0:e.Checkout)?void 0:i.apiHost),!n)throw new Error("No shop found in Shopify object.");try{let t,e;if(this.useCustomStoreFront)e=await this.nhost.request($e,{store:n});else{t=new URL(window.location.href),t.pathname=this._apiEndpoint;const i={query:$e,variables:{store:n}};e=await this._fetch.post(t.toString(),i)}if(!e)throw new Error("Missing response for store query.");if(null==(o=e.errors)?void 0:o.length)throw new Error(e.errors[0].message);if(!(null==(r=e.data)?void 0:r.store))throw new Error("Missing store from store query response.");return e.data.store}catch(a){throw console.error(a),new Error(`Could not find a store for ${this._storeDomain}`)}}_findSellingPlanByName(t,e){for(const i of t){const t=i.node;for(const i of t.sellingPlans.edges){const t=i.node;if(e===t.name)return t}}return null}async _fetchSellingPlanFromVariant(t){var e,i,o,r,n,a,s,d,p,l,c,h,u;const m=(null==(e=window.Shopify)?void 0:e.shop)??(null==(o=null==(i=window.Shopify)?void 0:i.Checkout)?void 0:o.apiHost);if(!m)throw new Error("No shop found in Shopify object.");try{const e=new URL(window.location.href);e.pathname=this._apiEndpoint;const i={query:"query SellingPlanFromVariant($store: String!, $variantId: String!){\n sellingPlanFromVariant(input: {store: $store, variantId: $variantId })\n}",variables:{store:m,variantId:`gid://shopify/ProductVariant/${null==(r=this._protectionVariant)?void 0:r.id}`}},o=await this._fetch.post(e.toString(),i);if(!o)throw new Error("Missing response for selling plan query.");if(null==(n=o.errors)?void 0:n.length)throw new Error(o.errors[0].message);if(!(null==(a=o.data)?void 0:a.sellingPlanFromVariant))throw new Error("Missing variant from selling plan query response.");const g=(null==(d=null==(s=o.data.sellingPlanFromVariant)?void 0:s.sellingPlanGroups)?void 0:d.edges)||[],f=(null==(u=null==(h=null==(c=null==(l=null==(p=g[0])?void 0:p.node)?void 0:l.sellingPlans)?void 0:c.edges)?void 0:h[0])?void 0:u.node)||null;return this._findSellingPlanByName(g,t.name)||f}catch(g){console.error("Error during the query ====>",g)}}async _fetchCart(){try{if(this.useCustomStoreFront&&this.cartId){const t=await this.runStoreFrontQuery("query getCart($cartId: ID!){ cart( id: $cartId ) { id createdAt updatedAt lines(first: 10) { edges { node { id quantity merchandise { ... on ProductVariant { id sku } } cost{ totalAmount{ amount currencyCode } } } } } cost { totalAmount { amount currencyCode } subtotalAmount { amount currencyCode } } } }",{cartId:this.cartId});return ve(t.cart)}return await this._fetch.get("/cart.js")}catch(t){throw we(t.message),new Error("Could not fetch cart for current domain.")}}async _fetchProduct(){var t,e,i,o,r,n,a,s;try{let d;if(this.useCustomStoreFront){const p=await this.runStoreFrontQuery("query product($handle: String!) { product(handle: $handle) { id title images(first: 1) {edges { node { id url altText } } } handle variants(first: 100) { edges { node { id title price { amount } } } } } }",{handle:xe});if(null==p?void 0:p.product){const l=p.product;d={id:l.id,title:l.title,image:{id:null==(o=null==(i=null==(e=null==(t=null==l?void 0:l.images)?void 0:t.edges)?void 0:e[0])?void 0:i.node)?void 0:o.id,src:null==(s=null==(a=null==(n=null==(r=null==l?void 0:l.images)?void 0:r.edges)?void 0:n[0])?void 0:a.node)?void 0:s.url},variants:l.variants.edges.map((t=>({id:t.node.id,price:t.node.price.amount})))}}}else d=(await this._fetch.get(`/products/${xe}.json`)).product;return d}catch(d){throw we(d.message),new Error("Could not fetch protection product for current domain.")}}hasProtection(){return this._hasProtectionInCart}async updateCart(t){t||(t=await this._fetchCart()),this._cart=t}async addCartProtectionVariant(){var t,i,o,r;let n,a;if(this.supportSubscriptions){const o=null==(i=null==(t=this._cart)?void 0:t.items)?void 0:i.find((t=>{var e;return t.id!==(null==(e=this._protectionVariant)?void 0:e.id)&&!!(null==t?void 0:t.selling_plan_allocation)}));if(o){const t=await this._fetchSellingPlanFromVariant(o.selling_plan_allocation.selling_plan);a=t?e(t.id):null}}if(this.useCustomStoreFront){const t=await this.runStoreFrontQuery("mutation AddItemToCart($cartId: ID!, $lines: [CartLineInput!]!) { cartLinesAdd(cartId: $cartId, lines: $lines) { cart { id lines(first: 10) { edges { node { id quantity merchandise { ... on ProductVariant { id sku } } cost{ totalAmount{ amount currencyCode } } } } } cost { totalAmount { amount currencyCode } subtotalAmount { amount currencyCode } } } } }",{cartId:this.cartId,lines:[{merchandiseId:String(null==(o=this._protectionVariant)?void 0:o.id),quantity:1,sellingPlanId:a}]});n=ve(t.cartLinesAdd.cart)}else{const t={quantity:1,id:String(null==(r=this._protectionVariant)?void 0:r.id),selling_plan:a};n=await this._fetch.post("/cart/add.js",t)}return n}async updateCartProtectionVariant(t,e=null,i=null){var o,r;let n;if(this.useCustomStoreFront){const r=await this.runStoreFrontQuery("mutation RemoveItemToCart($cartId: ID!, $lines: [CartLineUpdateInput!]!) { cartLinesUpdate(cartId: $cartId, lines: $lines) { cart { id lines(first: 10) { edges { node { id quantity merchandise { ... on ProductVariant { id sku } } cost{ totalAmount{ amount currencyCode } } } } } cost { totalAmount { amount currencyCode } subtotalAmount { amount currencyCode } } } } }",{cartId:this.cartId,lines:[{id:String(e?e.key:null==(o=this._protectionCartItem)?void 0:o.key),quantity:t,sellingPlanId:i}]});n=ve(r.cartLinesUpdate.cart)}else{const o={quantity:t,id:String(e?e.key:null==(r=this._protectionCartItem)?void 0:r.key),selling_plan:i};n=await this._fetch.post("/cart/change.js",o)}return n}async addProtection(){var t,e;try{if(!this._store)throw new Error("Store has not been loaded.");if(!(null==(t=this._cart)?void 0:t.items))throw new Error("Cart has not been loaded.");if(!(null==(e=this._protectionVariant)?void 0:e.id))throw new Error("No protection variant found.");this._setState("loading");const i=await this.addCartProtectionVariant();await this._handleRefresh(i),this._setState("success")}catch(i){we(i.message)}finally{this._cart=await this._fetchCart(),this._setState("success")}}async removeProtection(){try{if(!this._store)throw new Error("Store has not been loaded.");if(!this._protectionCartItem)throw new Error("Protection product not found.");this._setState("loading");const t=await this.updateCartProtectionVariant(0,this._protectionCartItem);await this._handleRefresh(t),this._cart=t,this._setState("success")}catch(t){we(t.message)}finally{this._cart=await this._fetchCart(),this._setState("success")}}async attemptAddProtection(){var t,e,i,o,r,n;if(!(null==(t=this._store)?void 0:t.widgetAutoOptIn))return;if(!(null==(e=this._cart)?void 0:e.items)||!(null==(i=this._cart)?void 0:i.item_count))return;const a=null==(o=this._cart.items)?void 0:o.findIndex((t=>{var e,i;return null==(i=null==(e=this._protectionProduct)?void 0:e.variants)?void 0:i.some((e=>e.id===t.variant_id))})),s=null==(r=this._cart)?void 0:r.items[a];if(this._hasProtectionInCart=!!s,1===this._cart.item_count&&s)return;!!sessionStorage.getItem(_e)||!this._hasProtectionInCart&&(null==(n=this._cart)?void 0:n.item_count)&&this._store.widgetShowCart&&(await this.addProtection(),sessionStorage.setItem(_e,JSON.stringify({loaded:!0})))}async handleMultipleProtectionVariants(){var t,e,i,o,r;if(!(null==(t=this._cart)?void 0:t.items)||!(null==(e=this._cart)?void 0:e.item_count))return;let n=0;if(null==(i=this._cart.items)||i.forEach((t=>{var e,i;(null==(i=null==(e=this._protectionProduct)?void 0:e.variants)?void 0:i.some((e=>e.id===t.variant_id)))&&n++})),n>1){const t=null==(o=this._cart.items)?void 0:o.findIndex((t=>{var e,i;return null==(i=null==(e=this._protectionProduct)?void 0:e.variants)?void 0:i.some((e=>e.id===t.variant_id))})),e=null==(r=this._cart)?void 0:r.items[t],i=await this.updateCartProtectionVariant(0,e);return await this._handleRefresh(i)}}learnMorePopupTemplate(){return H`
1171
+ `;var me=(t=>(t.LOADED="shipaid-loaded",t.STATUS_UPDATE="shipaid-protection-status",t))(me||{});var ge=Object.defineProperty,fe=(t,e,i,o)=>{for(var r,n=void 0,a=t.length-1;a>=0;a--)(r=t[a])&&(n=r(e,i,n)||n);return n&&ge(e,i,n),n};const ve=t=>({items:t.lines.edges.map((({node:t})=>({id:t.id,key:t.id,variant_id:t.merchandise.id,sku:t.merchandise.sku,final_line_price:parseFloat(t.cost.totalAmount.amount),quantity:t.quantity}))),total_price:parseFloat(t.cost.totalAmount.amount),item_count:t.lines.edges.length}),be=async(t,e)=>{try{const i=await fetch(t,e);if(!i.ok)throw new Error(await i.text());return await i.json()}catch(i){throw console.error(i),new Error("Failed to complete fetch request.")}},ye=t=>console.warn(`[ShipAid] ${t}`),we=t=>console.error(`[ShipAid] ${t}`),_e="shipaid-protection",Ce="shipaid-protection-popup-show",xe="shipaid-protection",$e="query StoreByDomain ($store: String!) {\n store: storeByDomain (input: {store: $store}) {\n currency\n planActive\n store\n widgetAutoOptIn\n widgetPollProtection\n widgetShowCart\n excludedProductSkus\n excludedCustomersIdsAutoOptIn\n protectionSettings\n widgetConfigurations\n useCustomApp\n }\n}",ke=Object.assign({"./lang/de.json":()=>Promise.resolve().then((()=>qe)).then((t=>t.default)),"./lang/en.json":()=>Promise.resolve().then((()=>he)).then((t=>t.default)),"./lang/es.json":()=>Promise.resolve().then((()=>Be)).then((t=>t.default)),"./lang/fr.json":()=>Promise.resolve().then((()=>Ke)).then((t=>t.default)),"./lang/it.json":()=>Promise.resolve().then((()=>ii)).then((t=>t.default)),"./lang/nl.json":()=>Promise.resolve().then((()=>pi)).then((t=>t.default)),"./lang/pt.json":()=>Promise.resolve().then((()=>fi)).then((t=>t.default))});var Se;Se={loader:async t=>{if("en"===t)return ce;const e=Reflect.get(ke,`./lang/${t}.json`);return e?await e():ce}},bt=Object.assign(Object.assign({},bt),Se);const Ae=class extends ht{constructor(){var t,e,i;super(...arguments),this.env="prod",this.useCustomStoreFront=!1,this.storeDomain="",this.storeAccessToken="",this.cartId="",this.disablePolling=!1,this.disableActions=!1,this.pollingInterval=2500,this.disableRefresh=!1,this.refreshCart=!1,this.persistPopup=!1,this.defaultToggleButton=!1,this.lang="en",this.currency=void 0,this.customerId=void 0,this.supportSubscriptions=!1,this.dataSelector="",this.shadowRootSelector="",this.useShipAidCheckout=!1,this._apiEndpoint="/apps/shipaid",this._storeDomain=(null==(t=window.Shopify)?void 0:t.shop)??(null==(i=null==(e=window.Shopify)?void 0:e.Checkout)?void 0:i.apiHost),this._hasFinishedSetup=!1,this._shouldShowWidget=!1,this._hasProtectionInCart=!1,this.hasLoadedStrings=!1,this.fetchInterceptorCleanup=()=>{},this.intervalId=null,this._state={loading:!1,success:null,error:!1},this._popup=null,this._fetch={get:t=>be(t),post:(t,e)=>be(t,{method:"POST",headers:{"Content-Type":"application/json","X-ShipAid":"1"},body:JSON.stringify(e)})}}shouldUpdate(t){return this.hasLoadedStrings&&super.shouldUpdate(t)}shouldPersistPopup(){return"true"===localStorage.getItem(`${Ce}`)?"learn-more":null}setPopupKey(){this.persistPopup&&localStorage.setItem(`${Ce}`,"true")}get nhost(){const t=`https://${"prod"===this.env?"gjiyysyzjwuculcymsvb":"staging"===this.env?"xfnjpunvafvudwuzwjlm":"local"}.graphql.us-east-1.nhost.run/v1`;return{request:async(e,i)=>{try{const o=await fetch(t,{method:"post",body:JSON.stringify({query:e,variables:i})});return await o.json()}catch(o){console.log(`Nhost Error: ${o}`)}}}}async runStoreFrontQuery(t,e){try{const i=new Headers;i.append("Content-Type","application/json"),i.append("X-Shopify-Storefront-Access-Token",this.storeAccessToken);const o={method:"POST",headers:i,body:JSON.stringify({query:t,variables:e})},r=await fetch(`https://${this.storeDomain}/api/2021-07/graphql.json`,o);if(!r.ok)throw new Error(`GraphQL request failed: ${r.statusText}`);const n=await r.json();if(n.errors)throw new Error(n.errors[0].message);return n.data}catch(i){throw console.error("GraphQL query error:",i),new Error("Failed to execute GraphQL query")}}get shouldRefreshOnUpdate(){return!this.disablePolling&&!this.disableRefresh}get planActive(){var t,e;const{searchParams:i}=new URL(window.location.href);return(null==(t=window.Shopify)?void 0:t.designMode)||i.has("shipaid-test")?(ye("Currently in preview mode."),!0):!!(null==(e=this._store)?void 0:e.planActive)}_currencyFormat(t){var e,i,o,r,n,a;const s=this.currency||(null==(i=null==(e=window.Shopify)?void 0:e.currency)?void 0:i.active)||(null==(o=this._store)?void 0:o.currency)||"USD";if(null==(a=null==(n=null==(r=this._store)?void 0:r.widgetConfigurations)?void 0:n.widget)?void 0:a.currencyFormat){return this._store.widgetConfigurations.widget.currencyFormat.replace("_value_",Number(t)).replace("_currency_",s)}return new Intl.NumberFormat(void 0,{currency:s,style:"currency"}).format(Number(t))}_dispatchEvent(t,e={}){this.dispatchEvent(new CustomEvent(t,{bubbles:!0,composed:!0,detail:e}))}_handleRefreshCart(){if(this.refreshCart)return window.location.reload()}async _handleRefresh(t){const e=Reflect.has(t,"items");if(this.shouldRefreshOnUpdate)return window.location.reload();e||await this.updateCart(),this._dispatchEvent(me.STATUS_UPDATE,{protection:this._hasProtectionInCart,cart:e?t:this._cart,lineItem:e?this._protectionCartItem:t})}async calculateProtectionTotal(t){if(t||(t=await this._fetchCart()),!t)throw new Error("Could not fetch cart.");if(!this._store)throw new Error("Missing ShipAid store");if(!this._protectionProduct)throw new Error("Missing Shopify protection product");return i.calculateProtectionTotal(this._store,this._protectionProduct,t)}_findProtectionVariant(t){if(!this._store)throw new Error("Missing ShipAid store");if(!this._protectionProduct)throw new Error("Missing Shopify protection product");return i.findProtectionVariant(this._store,this._protectionProduct,t)}_setState(t,e){this._state={loading:"loading"===t,success:"success"===t,error:"error"===t&&(e||!0)}}_handleConfirmationPopup(){"confirmation"!==this._popup&&(this._popup="confirmation")}_updateProtection(){var t,e,i;const o=null==(i=null==(e=null==(t=this._store)?void 0:t.widgetConfigurations)?void 0:e.widget)?void 0:i.removeWithConfirmation;if(this._hasProtectionInCart)return o?this._handleConfirmationPopup():this.removeProtection();this.addProtection()}async _fetchShipAidData(){var t,e,i,o,r;let n;if(n=this.storeDomain?this.storeDomain:(null==(t=window.Shopify)?void 0:t.shop)??(null==(i=null==(e=window.Shopify)?void 0:e.Checkout)?void 0:i.apiHost),!n)throw new Error("No shop found in Shopify object.");try{let t,e;if(this.useCustomStoreFront)e=await this.nhost.request($e,{store:n});else{t=new URL(window.location.href),t.pathname=this._apiEndpoint;const i={query:$e,variables:{store:n}};e=await this._fetch.post(t.toString(),i)}if(!e)throw new Error("Missing response for store query.");if(null==(o=e.errors)?void 0:o.length)throw new Error(e.errors[0].message);if(!(null==(r=e.data)?void 0:r.store))throw new Error("Missing store from store query response.");return e.data.store}catch(a){throw console.error(a),new Error(`Could not find a store for ${this._storeDomain}`)}}_findSellingPlanByName(t,e){for(const i of t){const t=i.node;for(const i of t.sellingPlans.edges){const t=i.node;if(e===t.name)return t}}return null}async _fetchSellingPlanFromVariant(t){var e,i,o,r,n,a,s,d,p,l,c,h,u;const m=(null==(e=window.Shopify)?void 0:e.shop)??(null==(o=null==(i=window.Shopify)?void 0:i.Checkout)?void 0:o.apiHost);if(!m)throw new Error("No shop found in Shopify object.");try{const e=new URL(window.location.href);e.pathname=this._apiEndpoint;const i={query:"query SellingPlanFromVariant($store: String!, $variantId: String!){\n sellingPlanFromVariant(input: {store: $store, variantId: $variantId })\n}",variables:{store:m,variantId:`gid://shopify/ProductVariant/${null==(r=this._protectionVariant)?void 0:r.id}`}},o=await this._fetch.post(e.toString(),i);if(!o)throw new Error("Missing response for selling plan query.");if(null==(n=o.errors)?void 0:n.length)throw new Error(o.errors[0].message);if(!(null==(a=o.data)?void 0:a.sellingPlanFromVariant))throw new Error("Missing variant from selling plan query response.");const g=(null==(d=null==(s=o.data.sellingPlanFromVariant)?void 0:s.sellingPlanGroups)?void 0:d.edges)||[],f=(null==(u=null==(h=null==(c=null==(l=null==(p=g[0])?void 0:p.node)?void 0:l.sellingPlans)?void 0:c.edges)?void 0:h[0])?void 0:u.node)||null;return this._findSellingPlanByName(g,t.name)||f}catch(g){console.error("Error during the query ====>",g)}}async _fetchCart(){try{if(this.useCustomStoreFront&&this.cartId){const t=await this.runStoreFrontQuery("query getCart($cartId: ID!){ cart( id: $cartId ) { id createdAt updatedAt lines(first: 10) { edges { node { id quantity merchandise { ... on ProductVariant { id sku } } cost{ totalAmount{ amount currencyCode } } } } } cost { totalAmount { amount currencyCode } subtotalAmount { amount currencyCode } } } }",{cartId:this.cartId});return ve(t.cart)}return await this._fetch.get("/cart.js")}catch(t){throw we(t.message),new Error("Could not fetch cart for current domain.")}}async _fetchProduct(){var t,e,i,o,r,n,a,s;try{let d;if(this.useCustomStoreFront){const p=await this.runStoreFrontQuery("query product($handle: String!) { product(handle: $handle) { id title images(first: 1) {edges { node { id url altText } } } handle variants(first: 100) { edges { node { id title price { amount } } } } } }",{handle:xe});if(null==p?void 0:p.product){const l=p.product;d={id:l.id,title:l.title,image:{id:null==(o=null==(i=null==(e=null==(t=null==l?void 0:l.images)?void 0:t.edges)?void 0:e[0])?void 0:i.node)?void 0:o.id,src:null==(s=null==(a=null==(n=null==(r=null==l?void 0:l.images)?void 0:r.edges)?void 0:n[0])?void 0:a.node)?void 0:s.url},variants:l.variants.edges.map((t=>({id:t.node.id,price:t.node.price.amount})))}}}else d=(await this._fetch.get(`/products/${xe}.json`)).product;return d}catch(d){throw we(d.message),new Error("Could not fetch protection product for current domain.")}}hasProtection(){return this._hasProtectionInCart}async updateCart(t){t||(t=await this._fetchCart()),this._cart=t}async addCartProtectionVariant(){var t,i,o,r;let n,a;if(this.supportSubscriptions){const o=null==(i=null==(t=this._cart)?void 0:t.items)?void 0:i.find((t=>{var e;return t.id!==(null==(e=this._protectionVariant)?void 0:e.id)&&!!(null==t?void 0:t.selling_plan_allocation)}));if(o){const t=await this._fetchSellingPlanFromVariant(o.selling_plan_allocation.selling_plan);a=t?e(t.id):null}}if(this.useCustomStoreFront){const t=await this.runStoreFrontQuery("mutation AddItemToCart($cartId: ID!, $lines: [CartLineInput!]!) { cartLinesAdd(cartId: $cartId, lines: $lines) { cart { id lines(first: 10) { edges { node { id quantity merchandise { ... on ProductVariant { id sku } } cost{ totalAmount{ amount currencyCode } } } } } cost { totalAmount { amount currencyCode } subtotalAmount { amount currencyCode } } } } }",{cartId:this.cartId,lines:[{merchandiseId:String(null==(o=this._protectionVariant)?void 0:o.id),quantity:1,sellingPlanId:a}]});n=ve(t.cartLinesAdd.cart)}else{const t={quantity:1,id:String(null==(r=this._protectionVariant)?void 0:r.id),selling_plan:a};n=await this._fetch.post("/cart/add.js",t)}return n}async updateCartProtectionVariant(t,e=null,i=null){var o,r;let n;if(this.useCustomStoreFront){const r=await this.runStoreFrontQuery("mutation RemoveItemToCart($cartId: ID!, $lines: [CartLineUpdateInput!]!) { cartLinesUpdate(cartId: $cartId, lines: $lines) { cart { id lines(first: 10) { edges { node { id quantity merchandise { ... on ProductVariant { id sku } } cost{ totalAmount{ amount currencyCode } } } } } cost { totalAmount { amount currencyCode } subtotalAmount { amount currencyCode } } } } }",{cartId:this.cartId,lines:[{id:String(e?e.key:null==(o=this._protectionCartItem)?void 0:o.key),quantity:t,sellingPlanId:i}]});n=ve(r.cartLinesUpdate.cart)}else{const o={quantity:t,id:String(e?e.key:null==(r=this._protectionCartItem)?void 0:r.key),selling_plan:i};n=await this._fetch.post("/cart/change.js",o)}return n}async addProtection(){var t,e;try{if(!this._store)throw new Error("Store has not been loaded.");if(!(null==(t=this._cart)?void 0:t.items))throw new Error("Cart has not been loaded.");if(!(null==(e=this._protectionVariant)?void 0:e.id))throw new Error("No protection variant found.");this._setState("loading");const i=await this.addCartProtectionVariant();await this._handleRefresh(i),this._setState("success")}catch(i){we(i.message)}finally{this._cart=await this._fetchCart(),this._setState("success")}}async removeProtection(){try{if(!this._store)throw new Error("Store has not been loaded.");if(!this._protectionCartItem)throw new Error("Protection product not found.");this._setState("loading");const t=await this.updateCartProtectionVariant(0,this._protectionCartItem);await this._handleRefresh(t),this._cart=t,this._setState("success")}catch(t){we(t.message)}finally{this._cart=await this._fetchCart(),this._setState("success")}}async attemptAddProtection(){var t,e,i,o,r,n;if(!(null==(t=this._store)?void 0:t.widgetAutoOptIn))return;if(!(null==(e=this._cart)?void 0:e.items)||!(null==(i=this._cart)?void 0:i.item_count))return;const a=null==(o=this._cart.items)?void 0:o.findIndex((t=>{var e,i;return null==(i=null==(e=this._protectionProduct)?void 0:e.variants)?void 0:i.some((e=>e.id===t.variant_id))})),s=null==(r=this._cart)?void 0:r.items[a];if(this._hasProtectionInCart=!!s,1===this._cart.item_count&&s)return;!!sessionStorage.getItem(_e)||!this._hasProtectionInCart&&(null==(n=this._cart)?void 0:n.item_count)&&this._store.widgetShowCart&&(await this.addProtection(),sessionStorage.setItem(_e,JSON.stringify({loaded:!0})))}async handleMultipleProtectionVariants(){var t,e,i,o,r;if(!(null==(t=this._cart)?void 0:t.items)||!(null==(e=this._cart)?void 0:e.item_count))return;let n=0;if(null==(i=this._cart.items)||i.forEach((t=>{var e,i;(null==(i=null==(e=this._protectionProduct)?void 0:e.variants)?void 0:i.some((e=>e.id===t.variant_id)))&&n++})),n>1){const t=null==(o=this._cart.items)?void 0:o.findIndex((t=>{var e,i;return null==(i=null==(e=this._protectionProduct)?void 0:e.variants)?void 0:i.some((e=>e.id===t.variant_id))})),e=null==(r=this._cart)?void 0:r.items[t],i=await this.updateCartProtectionVariant(0,e);return await this._handleRefresh(i)}}learnMorePopupTemplate(){return H`
1172
1172
  <shipaid-popup-learn-more
1173
1173
  ?active=${"learn-more"===this._popup}
1174
1174
  @close=${()=>{this.persistPopup&&localStorage.removeItem(`${Ce}`),this._popup=null}}
@@ -1267,13 +1267,13 @@ function qt(t,e,i){return t?e():null==i?void 0:i()}const jt=u`
1267
1267
  @shipaid-about=${()=>{this._popup="learn-more",this.persistPopup&&this.setPopupKey()}}
1268
1268
  @shipaid-remove-protection=${async()=>{await this.removeProtection(),window.location.href="/checkout"}}
1269
1269
  ></checkout-package-protection>
1270
- `,s)})),Z}createRenderRoot(){return this.useShipAidCheckout?this:super.createRenderRoot()}checkoutButtonTemplate(){var t,e;if(!document.getElementById("shipaid-styles")){const t=document.createElement("style");t.id="shipaid-styles",t.textContent="\n [shipaid-hidden] {\n display: none !important;\n }\n shipaid-widget {\n width: 100%;\n }\n ",document.head.appendChild(t)}const i=document.querySelector(`${this.dataSelector}:not(#shipaid-checkout-button)`);if(!i)return;const o=i.className,r=Number(null==(t=this._protectionVariant)?void 0:t.price)||0,n=(Number(null==(e=this._cart)?void 0:e.total_price)||0)/100,a=this._hasProtectionInCart?n:r+n,s=H`
1271
- <svg width="1.5rem" height="1.5rem" viewBox="0 0 50 50" xmlns="http://www.w3.org/2000/svg" fill="none" stroke="currentColor" stroke-width="4" class="shipaid-loader">
1272
- <circle cx="25" cy="25" r="20" stroke-opacity="0.5"/>
1273
- <path d="M45 25a20 20 0 0 1-40 0" stroke="currentColor">
1274
- <animateTransform attributeName="transform" type="rotate" from="0 25 25" to="360 25 25" dur="1s" repeatCount="indefinite"/>
1275
- </path>
1276
- </svg>
1270
+ `,s)})),Z}createRenderRoot(){return this.useShipAidCheckout?this:super.createRenderRoot()}checkoutButtonTemplate(){var t,e,i,o;if(!document.getElementById("shipaid-styles")){const t=document.createElement("style");t.id="shipaid-styles",t.textContent="\n [shipaid-hidden] {\n display: none !important;\n }\n shipaid-widget {\n width: 100%;\n }\n ",document.head.appendChild(t)}if(!this.dataSelector)return void console.error("[shipaid-widget] we couldn't find the 'data-selector' attribute.");let r=null;if(this.shadowRootSelector){const t=document.querySelector(this.shadowRootSelector);if(!t||!t.shadowRoot)return void console.warn(`ShadowRoot not found in the element '${this.shadowRootSelector}'.`);r=t.shadowRoot.querySelector(`${this.dataSelector}:not(#shipaid-checkout-button)`)}else r=document.querySelector(`${this.dataSelector}:not(#shipaid-checkout-button)`);if(!r)return void console.warn(`Button not found with selector '${this.dataSelector}'.`);const n=r.className,a=Number(null==(t=this._protectionVariant)?void 0:t.price)||0,s=(Number(null==(e=this._cart)?void 0:e.total_price)||0)/100,d=this._hasProtectionInCart?s:a+s,p=H`
1271
+ <svg width="1.5rem" height="1.5rem" viewBox="0 0 50 50" xmlns="http://www.w3.org/2000/svg" fill="none" stroke="currentColor" stroke-width="4" class="shipaid-loader">
1272
+ <circle cx="25" cy="25" r="20" stroke-opacity="0.5"/>
1273
+ <path d="M45 25a20 20 0 0 1-40 0" stroke="currentColor">
1274
+ <animateTransform attributeName="transform" type="rotate" from="0 25 25" to="360 25 25" dur="1s" repeatCount="indefinite"/>
1275
+ </path>
1276
+ </svg>
1277
1277
  `;return H`
1278
1278
  <style>
1279
1279
  :host {
@@ -1282,6 +1282,16 @@ function qt(t,e,i){return t?e():null==i?void 0:i()}const jt=u`
1282
1282
  width: 100%;
1283
1283
  }
1284
1284
 
1285
+ .shipaid-container a#shipaid-checkout-button {
1286
+ width: 100%;
1287
+ margin: 0px;
1288
+ text-decoration: unset;
1289
+ }
1290
+ .shipaid-container a#shipaid-continue-button {
1291
+ display: block;
1292
+ margin: 1rem 0px 0px;
1293
+ }
1294
+
1285
1295
  .shipaid-container button {
1286
1296
  width: 100%;
1287
1297
  }
@@ -1361,7 +1371,7 @@ function qt(t,e,i){return t?e():null==i?void 0:i()}const jt=u`
1361
1371
  <strong>Checkout+</strong>
1362
1372
  <div class="protection-value">
1363
1373
  <slot name="title">ShipAid Delivery Guarantee</slot>
1364
- - ${r?this._currencyFormat(r):s}
1374
+ - ${a?this._currencyFormat(a):p}
1365
1375
  </div>
1366
1376
  </div>
1367
1377
  <div class="help-icon" @click=${()=>{this._popup="learn-more",this.persistPopup&&this.setPopupKey()}}>
@@ -1372,9 +1382,9 @@ function qt(t,e,i){return t?e():null==i?void 0:i()}const jt=u`
1372
1382
  </div>
1373
1383
  </div>
1374
1384
 
1375
- <button id="shipaid-checkout-button" class="${o}" @click=${()=>{var t,e;sessionStorage.setItem("shipaid_variant",JSON.stringify(null==(t=this._protectionVariant)?void 0:t.id)),window.location.href=`/checkout?attributes[_shipaid-internal]=1&updates[${null==(e=this._protectionVariant)?void 0:e.id}]=1`}}>
1376
- <slot name="checkout-button-text">CHECKOUT+</slot> ${a?this._currencyFormat(a):s}
1377
- </button>
1385
+ <a href="/checkout${(null==(i=this._protectionVariant)?void 0:i.id)?`?attributes[_shipaid-internal]=1&updates[${null==(o=this._protectionVariant)?void 0:o.id}]=1`:""}" id="shipaid-checkout-button" class="${n}" @click=${()=>{var t;sessionStorage.setItem("shipaid_variant",JSON.stringify(null==(t=this._protectionVariant)?void 0:t.id))}}>
1386
+ <slot name="checkout-button-text">CHECKOUT+</slot> ${d?this._currencyFormat(d):p}
1387
+ </a>
1378
1388
 
1379
1389
  <a href="#" class="continue-link" @click=${async()=>{await this.removeProtection(),window.location.href="/checkout"}}>
1380
1390
  <slot name="link-continue">Continue without delivery guarantee</slot>
@@ -1712,4 +1722,4 @@ function qt(t,e,i){return t?e():null==i?void 0:i()}const jt=u`
1712
1722
  ${qt(this._hasFinishedSetup,(()=>{var t,e,i,o,r;const n=null==(o=null==(i=null==(e=null==(t=this._store)?void 0:t.widgetConfigurations)?void 0:e.widget)?void 0:i.theme_checkout)?void 0:o.checkoutButtonSelector,a=sessionStorage.getItem("shipaidWidgetTheme");!a&&n&&sessionStorage.setItem("shipaidWidgetTheme",n),!this.useShipAidCheckout&&n||sessionStorage.removeItem("shipaidWidgetTheme");return this._shouldShowWidget&&this.planActive&&(null==(r=this._store)?void 0:r.widgetShowCart)?a?this.contactlessCheckoutButtonTemplate():this.promptTemplate():Z}),(()=>sessionStorage.getItem("shipaidWidgetTheme")?this.contactlessCheckoutButtonTemplate():this.promptTemplate()))}
1713
1723
  </div>
1714
1724
 
1715
- `}};Ae.styles=ue;let Pe=Ae;fe([n({type:String,attribute:!0})],Pe.prototype,"env"),fe([n({type:Boolean,attribute:!0})],Pe.prototype,"useCustomStoreFront"),fe([n({type:String,attribute:!0})],Pe.prototype,"storeDomain"),fe([n({type:String,attribute:!0})],Pe.prototype,"storeAccessToken"),fe([n({type:String,attribute:!0})],Pe.prototype,"cartId"),fe([n({type:Boolean,attribute:!0})],Pe.prototype,"disablePolling"),fe([n({type:Boolean,attribute:!0})],Pe.prototype,"disableActions"),fe([n({type:Number,attribute:!0})],Pe.prototype,"pollingInterval"),fe([n({type:Boolean,attribute:!0})],Pe.prototype,"disableRefresh"),fe([n({type:Boolean,attribute:!0})],Pe.prototype,"refreshCart"),fe([n({type:Boolean,attribute:!0})],Pe.prototype,"persistPopup"),fe([n({type:Boolean,attribute:!0})],Pe.prototype,"defaultToggleButton"),fe([n({type:String,attribute:!0})],Pe.prototype,"lang"),fe([n({type:String,attribute:!0})],Pe.prototype,"currency"),fe([n({type:String,attribute:!0})],Pe.prototype,"customerId"),fe([n({type:Boolean,attribute:!0})],Pe.prototype,"supportSubscriptions"),fe([n({type:String,attribute:"data-selector"})],Pe.prototype,"dataSelector"),fe([n({type:Boolean,attribute:"use-shipaid-checkout"})],Pe.prototype,"useShipAidCheckout"),fe([a()],Pe.prototype,"_storeDomain"),fe([a()],Pe.prototype,"_store"),fe([a()],Pe.prototype,"_cart"),fe([a()],Pe.prototype,"_protectionProduct"),fe([a()],Pe.prototype,"_cartLastUpdated"),fe([a()],Pe.prototype,"_hasFinishedSetup"),fe([a()],Pe.prototype,"_shouldShowWidget"),fe([a()],Pe.prototype,"_hasProtectionInCart"),fe([a()],Pe.prototype,"_protectionCartItem"),fe([a()],Pe.prototype,"_protectionVariant"),fe([a()],Pe.prototype,"hasLoadedStrings"),fe([a()],Pe.prototype,"fetchInterceptorCleanup"),fe([a()],Pe.prototype,"intervalId"),fe([a()],Pe.prototype,"_state"),fe([a()],Pe.prototype,"_popup"),customElements.get("shipaid-widget")||customElements.define("shipaid-widget",Pe);const Le="Laden des ShipAid-Widgets...",ze="Liefergarantie",Ee="im Falle von Verlust, Beschädigung oder Diebstahl",Me={button:"Bereitgestellt von"},Ie={add:"Hinzufügen",remove:"Entfernen",loading:"Lädt..."},Te={loading:Le,title:ze,description:Ee,footer:Me,actions:Ie,"learn-more-popup":{close:"Schließen",title:"Liefergarantie",subtitle:"Wir ermöglichen es Ihren Lieblingsmarken, eine Liefergarantie anzubieten, weil jede Bestellung wertvoll ist!",disclaimer:{"subtitle-enable":"Wir ermöglichen es Ihren Lieblingsmarken, eine Liefergarantie zu bieten, denn wir wissen, dass jede Bestellung wertvoll ist und Dinge passieren können!","subtitle-monitor":"Wir überwachen Ihr Paket kontinuierlich und bieten ein praktisches Portal, damit Sie den Fortschritt Ihrer Bestellung jederzeit verfolgen können!","subtitle-notify":"Sie werden während des gesamten Versandprozesses benachrichtigt, um sicherzustellen, dass Sie auf dem Laufenden bleiben.","subtitle-resolution":"Sie werden während des gesamten Versandprozesses benachrichtigt, um sicherzustellen, dass Sie auf dem Laufenden bleiben.",text:"Durch den Erwerb dieser Liefergarantie stimmen Sie unseren Servicebedingungen und Datenschutzrichtlinien zu. Diese Garantie ist nicht verpflichtend, IST KEINE Versicherung und bietet keine Entschädigung für Verluste, Schäden oder Haftungen, die aus einem zufälligen oder unbekannten Ereignis resultieren. Sollte das Produkt nicht in zufriedenstellendem Zustand geliefert werden, kann die Marke, bei der Sie gekauft haben, dieses kostenlos ersetzen. ShipAid liefert keine Produkte oder Dienstleistungen direkt an Verbraucher, sondern bietet einen Dienst an, der Marken ermöglicht, den Produktersatz für ihre Kunden zu erleichtern. Der Erwerb dieser Garantie bedeutet nicht, dass Sie automatisch eine Rückerstattung für irgendwelche Produkte oder Versandkosten erhalten, da der Lösungsprozess und die Entscheidung über eine Kompensation strikt von der Marke, bei der Sie kaufen, entschieden werden. Die Marke wird einen Nachweis für Beschädigungen oder die Nichtlieferung des Produkts verlangen."},links:{terms:"Servicebedingungen",privacy:"Datenschutzrichtlinie"}}},qe=Object.freeze(Object.defineProperty({__proto__:null,actions:Ie,default:Te,description:Ee,footer:Me,loading:Le,title:ze},Symbol.toStringTag,{value:"Module"})),je="Cargando el widget ShipAid...",Ne="Garantía de entrega",Oe="en caso de Pérdida, Daño o Robo",Ve={button:"Energizado por"},Re={add:"Agregar",remove:"Eliminar",loading:"Cargando..."},Ue={loading:je,title:Ne,description:Oe,footer:Ve,actions:Re,"learn-more-popup":{close:"Cerca",title:"Garantía de entrega",disclaimer:{"subtitle-enable":"Permitimos que sus marcas favoritas brinden una garantía de entrega porque sabemos que cada pedido es valioso y las cosas suceden!","subtitle-monitor":"Supervisamos continuamente su paquete y le ofrecemos un portal conveniente para que pueda realizar un seguimiento del progreso de su pedido en cualquier momento.","subtitle-notify":"Se le notificará durante todo el proceso de envío, asegurándose de que esté actualizado en cada paso del camino.","subtitle-resolution":"En caso de cualquier problema durante el tránsito, ofrecemos un método rápido y fácil para informar el problema directamente a la marca, para una resolución rápida.",text:"Al comprar esta garantía de entrega, acepta nuestros Términos de servicio y Política de privacidad. Usted no está obligado a comprar esta garantía. Esta garantía NO es un seguro y no brinda indemnización por pérdida, daño o responsabilidad que surja de un evento contingente o desconocido, sino que, a través de las marcas de ShipAid, brinda una garantía de entrega mediante la cual, si el producto que ordenó no se entrega en condiciones satisfactorias, la marca desde el que ordenó el producto puede reemplazar el producto sin cargo. ShipAid no proporciona ningún producto o servicio directamente a los consumidores, sino que proporciona un servicio que permite a las marcas facilitar el reemplazo de productos a sus clientes. La compra de esta garantía no significa que se le reembolsará automáticamente cualquier producto o costo de envío porque el proceso de resolución y la decisión de compensación lo decide estrictamente la marca a la que le compra. La marca requerirá prueba de daño o producto no entregado."},links:{terms:"Términos de servicio",privacy:"Política de Privacidad"}}},Be=Object.freeze(Object.defineProperty({__proto__:null,actions:Re,default:Ue,description:Oe,footer:Ve,loading:je,title:Ne},Symbol.toStringTag,{value:"Module"})),De="Chargement du widget ShipAid...",Fe="Garantie de livraison",He="en cas de Perte, Dommages ou Vol",We={button:"Propulsé par"},Ze={add:"Ajouter",remove:"Retirer",loading:"Chargement..."},Ge={loading:De,title:Fe,description:He,footer:We,actions:Ze,"learn-more-popup":{close:"Fermer",title:"Garantie de livraison",subtitle:"Nous permettons à vos marques préférées d'offrir une garantie de livraison car chaque commande est précieuse !",disclaimer:{"subtitle-enable":"Nous permettons à vos marques préférées de fournir une garantie de livraison car nous savons que chaque commande est précieuse et que des incidents peuvent survenir !","subtitle-monitor":"Nous surveillons continuellement votre colis et offrons un portail pratique pour vous permettre de suivre l'avancement de votre commande à tout moment !","subtitle-notify":"Vous serez notifié tout au long du processus d'expédition, vous assurant que vous restez informé à chaque étape du parcours.","subtitle-resolution":"Vous serez notifié tout au long du processus d'expédition, vous assurant que vous restez informé à chaque étape du parcours.",text:"En acquérant cette garantie de livraison, vous acceptez nos Conditions de Service et notre Politique de Confidentialité. Cette garantie n'est pas obligatoire, N'EST PAS une assurance et ne fournit pas d'indemnisation pour les pertes, dommages ou responsabilités résultant d'un événement contingent ou inconnu. Si le produit n'est pas livré dans des conditions satisfaisantes, la marque auprès de laquelle vous avez acheté peut le remplacer gratuitement. ShipAid ne fournit aucun produit ou service directement aux consommateurs, mais offre un service permettant aux marques de faciliter le remplacement du produit pour leurs clients. L'achat de cette garantie ne signifie pas que vous serez automatiquement remboursé pour tout produit ou frais de port, car le processus de résolution et la décision de compensation sont strictement décidés par la marque que vous achetez. La marque exigera une preuve de dommage ou de produit non livré."},links:{terms:"Conditions de service",privacy:"Politique de Confidentialité"}}},Ke=Object.freeze(Object.defineProperty({__proto__:null,actions:Ze,default:Ge,description:He,footer:We,loading:De,title:Fe},Symbol.toStringTag,{value:"Module"})),Qe="Caricamento del widget ShipAid...",Ye="Garanzia di consegna",Je="in caso di Perdita, Danno o Furto",Xe={button:"Offerto da"},ti={add:"Aggiungere",remove:"Rimuovere",loading:"Caricamento ..."},ei={loading:Qe,title:Ye,description:Je,footer:Xe,actions:ti,"learn-more-popup":{close:"Vicina",title:"Garanzia di consegna",subtitle:"Consentiamo ai tuoi marchi preferiti di offrire una garanzia di consegna perché ogni ordine è prezioso!",disclaimer:{"subtitle-enable":"Consentiamo ai tuoi marchi preferiti di fornire una garanzia di consegna perché sappiamo che ogni ordine è prezioso e le cose accadono!","subtitle-monitor":"Monitoriamo continuamente il tuo pacco e ti offriamo un comodo portale per monitorare lo stato di avanzamento del tuo ordine in qualsiasi momento!","subtitle-notify":"Riceverai una notifica durante l'intero processo di spedizione, assicurandoti di rimanere aggiornato in ogni fase del processo.","subtitle-resolution":"Você será notificado durante todo o processo de envio, garantindo que você fique atualizado a cada passo do caminho.",text:"Acquistando questa garanzia di consegna, accetti i nostri Termini di servizio e l'Informativa sulla privacy. Non sei obbligato ad acquistare questa garanzia. Questa garanzia NON è un'assicurazione e non fornisce un indennizzo contro perdite, danni o responsabilità derivanti da un evento contingente o sconosciuto, ma piuttosto, attraverso ShipAid i marchi forniscono una garanzia di consegna in base alla quale se il prodotto ordinato non viene consegnato in condizioni soddisfacenti, il marchio da cui hai ordinato il prodotto può sostituire il prodotto gratuitamente. ShipAid non fornisce alcun prodotto o servizio direttamente ai consumatori, ma fornisce invece un servizio che consente ai marchi di facilitare la sostituzione del prodotto ai propri clienti. L'acquisto di questa garanzia non significa che verrai automaticamente rimborsato per qualsiasi prodotto o costo di spedizione perché il processo di risoluzione e la decisione per il risarcimento sono rigorosamente decisi dal marchio da cui stai acquistando. Il marchio richiederà la prova del danno o del prodotto non consegnato."},links:{terms:"Termini di servizio",privacy:"Politica sulla riservatezza"}}},ii=Object.freeze(Object.defineProperty({__proto__:null,actions:ti,default:ei,description:Je,footer:Xe,loading:Qe,title:Ye},Symbol.toStringTag,{value:"Module"})),oi="Laad ShipAid Widget...",ri="Bezorggarantie",ni="in geval van verlies, schade of diefstal",ai={button:"Aangedreven door"},si={add:"Toevoegen",remove:"Verwijderen",loading:"Bezig met laden..."},di={loading:oi,title:ri,description:ni,footer:ai,actions:si,"learn-more-popup":{close:"Sluiten",title:"Bezorggarantie",disclaimer:{"subtitle-enable":"We stellen je favoriete merken in staat om een bezorggarantie te bieden omdat we weten dat elke bestelling belangrijk is en dingen kunnen gebeuren!","subtitle-monitor":"We monitoren je pakket continu en bieden een handig portaal om de voortgang van je bestelling op elk moment te volgen!","subtitle-notify":"Je wordt gedurende het gehele verzendproces op de hoogte gehouden, zodat je altijd op de hoogte bent van elke stap.","subtitle-resolution":"In geval van problemen tijdens het transport bieden we een snelle en gemakkelijke manier om het probleem direct bij het merk te melden, voor een snelle oplossing.",text:"Door deze bezorggarantie aan te schaffen, ga je akkoord met onze Servicevoorwaarden en Privacybeleid. Je bent niet verplicht om deze garantie aan te schaffen. Deze garantie is GEEN verzekering en biedt geen schadevergoeding voor verlies, schade of aansprakelijkheid als gevolg van een onvoorziene of onbekende gebeurtenis, maar biedt via ShipAid een bezorggarantie waarbij, als het product dat je hebt besteld niet in bevredigende staat wordt geleverd, het merk van wie je het product hebt besteld, het product gratis kan vervangen. ShipAid levert geen producten of diensten direct aan consumenten, maar biedt een dienst die merken in staat stelt om productvervanging aan hun klanten te faciliteren. Het kopen van deze garantie betekent niet automatisch dat je wordt vergoed voor product- of verzendkosten, aangezien het oplossingproces en de beslissing voor compensatie strikt wordt bepaald door het merk van wie je koopt. Het merk zal bewijs van schade of niet-geleverde producten vereisen."},links:{terms:"Servicevoorwaarden",privacy:"Privacybeleid"}}},pi=Object.freeze(Object.defineProperty({__proto__:null,actions:si,default:di,description:ni,footer:ai,loading:oi,title:ri},Symbol.toStringTag,{value:"Module"})),li="Carregando o widget ShipAid...",ci="Garantia de entrega",hi="em caso de Perda, Danos ou Roubo",ui={button:"Distribuído por"},mi={add:"Adicionar",remove:"Remover",loading:"Carregando..."},gi={loading:li,title:ci,description:hi,footer:ui,actions:mi,"learn-more-popup":{close:"Fechar",title:"Garantia de entrega",subtitle:"Capacitamos suas marcas favoritas para oferecer uma garantia de entrega porque cada pedido é precioso!",disclaimer:{"subtitle-enable":"Permitimos que suas marcas favoritas forneçam uma garantia de entrega porque sabemos que cada pedido é precioso e as coisas acontecem!","subtitle-monitor":"Monitoramos continuamente o seu pacote e oferecemos um portal conveniente para você acompanhar o andamento do seu pedido a qualquer momento!","subtitle-notify":"Você será notificado durante todo o processo de envio, garantindo que você fique atualizado a cada passo do caminho.","subtitle-resolution":"Você será notificado durante todo o processo de envio, garantindo que você fique atualizado a cada passo do caminho.",text:"Ao adquirir esta garantia de entrega, você concorda com nossos Termos de Serviço e Política de Privacidade. Esta garantia não é obrigatória, NÃO é um seguro e não fornece indenização contra perdas, danos ou responsabilidade decorrentes de um contingente ou desconhecido. Caso o produto não seja entregue em condições satisfatórias, a marca da qual você comprou pode substituí-lo gratuitamente. A ShipAid não fornece nenhum produto ou serviço diretamente aos consumidores, mas sim presta um serviço que permite às marcas facilitar a substituição do produto aos seus clientes. Adquirir esta garantia não significa que você será automaticamente reembolsado por qualquer produto ou custos de envio porque o processo de resolução e decisão de compensação é estritamente decidido pela marca que você está comprando. A marca exigirá prova de danos ou produto não entregue."},links:{terms:"Termos de serviço",privacy:"Política de Privacidade"}}},fi=Object.freeze(Object.defineProperty({__proto__:null,actions:mi,default:gi,description:hi,footer:ui,loading:li,title:ci},Symbol.toStringTag,{value:"Module"}));t.ShipAidWidget=Pe,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}));
1725
+ `}};Ae.styles=ue;let Pe=Ae;fe([n({type:String,attribute:!0})],Pe.prototype,"env"),fe([n({type:Boolean,attribute:!0})],Pe.prototype,"useCustomStoreFront"),fe([n({type:String,attribute:!0})],Pe.prototype,"storeDomain"),fe([n({type:String,attribute:!0})],Pe.prototype,"storeAccessToken"),fe([n({type:String,attribute:!0})],Pe.prototype,"cartId"),fe([n({type:Boolean,attribute:!0})],Pe.prototype,"disablePolling"),fe([n({type:Boolean,attribute:!0})],Pe.prototype,"disableActions"),fe([n({type:Number,attribute:!0})],Pe.prototype,"pollingInterval"),fe([n({type:Boolean,attribute:!0})],Pe.prototype,"disableRefresh"),fe([n({type:Boolean,attribute:!0})],Pe.prototype,"refreshCart"),fe([n({type:Boolean,attribute:!0})],Pe.prototype,"persistPopup"),fe([n({type:Boolean,attribute:!0})],Pe.prototype,"defaultToggleButton"),fe([n({type:String,attribute:!0})],Pe.prototype,"lang"),fe([n({type:String,attribute:!0})],Pe.prototype,"currency"),fe([n({type:String,attribute:!0})],Pe.prototype,"customerId"),fe([n({type:Boolean,attribute:!0})],Pe.prototype,"supportSubscriptions"),fe([n({type:String,attribute:"data-selector"})],Pe.prototype,"dataSelector"),fe([n({type:String,attribute:"shadow-root-selector"})],Pe.prototype,"shadowRootSelector"),fe([n({type:Boolean,attribute:"use-shipaid-checkout"})],Pe.prototype,"useShipAidCheckout"),fe([a()],Pe.prototype,"_storeDomain"),fe([a()],Pe.prototype,"_store"),fe([a()],Pe.prototype,"_cart"),fe([a()],Pe.prototype,"_protectionProduct"),fe([a()],Pe.prototype,"_cartLastUpdated"),fe([a()],Pe.prototype,"_hasFinishedSetup"),fe([a()],Pe.prototype,"_shouldShowWidget"),fe([a()],Pe.prototype,"_hasProtectionInCart"),fe([a()],Pe.prototype,"_protectionCartItem"),fe([a()],Pe.prototype,"_protectionVariant"),fe([a()],Pe.prototype,"hasLoadedStrings"),fe([a()],Pe.prototype,"fetchInterceptorCleanup"),fe([a()],Pe.prototype,"intervalId"),fe([a()],Pe.prototype,"_state"),fe([a()],Pe.prototype,"_popup"),customElements.get("shipaid-widget")||customElements.define("shipaid-widget",Pe);const Le="Laden des ShipAid-Widgets...",ze="Liefergarantie",Ee="im Falle von Verlust, Beschädigung oder Diebstahl",Me={button:"Bereitgestellt von"},Ie={add:"Hinzufügen",remove:"Entfernen",loading:"Lädt..."},Te={loading:Le,title:ze,description:Ee,footer:Me,actions:Ie,"learn-more-popup":{close:"Schließen",title:"Liefergarantie",subtitle:"Wir ermöglichen es Ihren Lieblingsmarken, eine Liefergarantie anzubieten, weil jede Bestellung wertvoll ist!",disclaimer:{"subtitle-enable":"Wir ermöglichen es Ihren Lieblingsmarken, eine Liefergarantie zu bieten, denn wir wissen, dass jede Bestellung wertvoll ist und Dinge passieren können!","subtitle-monitor":"Wir überwachen Ihr Paket kontinuierlich und bieten ein praktisches Portal, damit Sie den Fortschritt Ihrer Bestellung jederzeit verfolgen können!","subtitle-notify":"Sie werden während des gesamten Versandprozesses benachrichtigt, um sicherzustellen, dass Sie auf dem Laufenden bleiben.","subtitle-resolution":"Sie werden während des gesamten Versandprozesses benachrichtigt, um sicherzustellen, dass Sie auf dem Laufenden bleiben.",text:"Durch den Erwerb dieser Liefergarantie stimmen Sie unseren Servicebedingungen und Datenschutzrichtlinien zu. Diese Garantie ist nicht verpflichtend, IST KEINE Versicherung und bietet keine Entschädigung für Verluste, Schäden oder Haftungen, die aus einem zufälligen oder unbekannten Ereignis resultieren. Sollte das Produkt nicht in zufriedenstellendem Zustand geliefert werden, kann die Marke, bei der Sie gekauft haben, dieses kostenlos ersetzen. ShipAid liefert keine Produkte oder Dienstleistungen direkt an Verbraucher, sondern bietet einen Dienst an, der Marken ermöglicht, den Produktersatz für ihre Kunden zu erleichtern. Der Erwerb dieser Garantie bedeutet nicht, dass Sie automatisch eine Rückerstattung für irgendwelche Produkte oder Versandkosten erhalten, da der Lösungsprozess und die Entscheidung über eine Kompensation strikt von der Marke, bei der Sie kaufen, entschieden werden. Die Marke wird einen Nachweis für Beschädigungen oder die Nichtlieferung des Produkts verlangen."},links:{terms:"Servicebedingungen",privacy:"Datenschutzrichtlinie"}}},qe=Object.freeze(Object.defineProperty({__proto__:null,actions:Ie,default:Te,description:Ee,footer:Me,loading:Le,title:ze},Symbol.toStringTag,{value:"Module"})),je="Cargando el widget ShipAid...",Ne="Garantía de entrega",Oe="en caso de Pérdida, Daño o Robo",Ve={button:"Energizado por"},Re={add:"Agregar",remove:"Eliminar",loading:"Cargando..."},Ue={loading:je,title:Ne,description:Oe,footer:Ve,actions:Re,"learn-more-popup":{close:"Cerca",title:"Garantía de entrega",disclaimer:{"subtitle-enable":"Permitimos que sus marcas favoritas brinden una garantía de entrega porque sabemos que cada pedido es valioso y las cosas suceden!","subtitle-monitor":"Supervisamos continuamente su paquete y le ofrecemos un portal conveniente para que pueda realizar un seguimiento del progreso de su pedido en cualquier momento.","subtitle-notify":"Se le notificará durante todo el proceso de envío, asegurándose de que esté actualizado en cada paso del camino.","subtitle-resolution":"En caso de cualquier problema durante el tránsito, ofrecemos un método rápido y fácil para informar el problema directamente a la marca, para una resolución rápida.",text:"Al comprar esta garantía de entrega, acepta nuestros Términos de servicio y Política de privacidad. Usted no está obligado a comprar esta garantía. Esta garantía NO es un seguro y no brinda indemnización por pérdida, daño o responsabilidad que surja de un evento contingente o desconocido, sino que, a través de las marcas de ShipAid, brinda una garantía de entrega mediante la cual, si el producto que ordenó no se entrega en condiciones satisfactorias, la marca desde el que ordenó el producto puede reemplazar el producto sin cargo. ShipAid no proporciona ningún producto o servicio directamente a los consumidores, sino que proporciona un servicio que permite a las marcas facilitar el reemplazo de productos a sus clientes. La compra de esta garantía no significa que se le reembolsará automáticamente cualquier producto o costo de envío porque el proceso de resolución y la decisión de compensación lo decide estrictamente la marca a la que le compra. La marca requerirá prueba de daño o producto no entregado."},links:{terms:"Términos de servicio",privacy:"Política de Privacidad"}}},Be=Object.freeze(Object.defineProperty({__proto__:null,actions:Re,default:Ue,description:Oe,footer:Ve,loading:je,title:Ne},Symbol.toStringTag,{value:"Module"})),De="Chargement du widget ShipAid...",Fe="Garantie de livraison",He="en cas de Perte, Dommages ou Vol",We={button:"Propulsé par"},Ze={add:"Ajouter",remove:"Retirer",loading:"Chargement..."},Ge={loading:De,title:Fe,description:He,footer:We,actions:Ze,"learn-more-popup":{close:"Fermer",title:"Garantie de livraison",subtitle:"Nous permettons à vos marques préférées d'offrir une garantie de livraison car chaque commande est précieuse !",disclaimer:{"subtitle-enable":"Nous permettons à vos marques préférées de fournir une garantie de livraison car nous savons que chaque commande est précieuse et que des incidents peuvent survenir !","subtitle-monitor":"Nous surveillons continuellement votre colis et offrons un portail pratique pour vous permettre de suivre l'avancement de votre commande à tout moment !","subtitle-notify":"Vous serez notifié tout au long du processus d'expédition, vous assurant que vous restez informé à chaque étape du parcours.","subtitle-resolution":"Vous serez notifié tout au long du processus d'expédition, vous assurant que vous restez informé à chaque étape du parcours.",text:"En acquérant cette garantie de livraison, vous acceptez nos Conditions de Service et notre Politique de Confidentialité. Cette garantie n'est pas obligatoire, N'EST PAS une assurance et ne fournit pas d'indemnisation pour les pertes, dommages ou responsabilités résultant d'un événement contingent ou inconnu. Si le produit n'est pas livré dans des conditions satisfaisantes, la marque auprès de laquelle vous avez acheté peut le remplacer gratuitement. ShipAid ne fournit aucun produit ou service directement aux consommateurs, mais offre un service permettant aux marques de faciliter le remplacement du produit pour leurs clients. L'achat de cette garantie ne signifie pas que vous serez automatiquement remboursé pour tout produit ou frais de port, car le processus de résolution et la décision de compensation sont strictement décidés par la marque que vous achetez. La marque exigera une preuve de dommage ou de produit non livré."},links:{terms:"Conditions de service",privacy:"Politique de Confidentialité"}}},Ke=Object.freeze(Object.defineProperty({__proto__:null,actions:Ze,default:Ge,description:He,footer:We,loading:De,title:Fe},Symbol.toStringTag,{value:"Module"})),Qe="Caricamento del widget ShipAid...",Ye="Garanzia di consegna",Je="in caso di Perdita, Danno o Furto",Xe={button:"Offerto da"},ti={add:"Aggiungere",remove:"Rimuovere",loading:"Caricamento ..."},ei={loading:Qe,title:Ye,description:Je,footer:Xe,actions:ti,"learn-more-popup":{close:"Vicina",title:"Garanzia di consegna",subtitle:"Consentiamo ai tuoi marchi preferiti di offrire una garanzia di consegna perché ogni ordine è prezioso!",disclaimer:{"subtitle-enable":"Consentiamo ai tuoi marchi preferiti di fornire una garanzia di consegna perché sappiamo che ogni ordine è prezioso e le cose accadono!","subtitle-monitor":"Monitoriamo continuamente il tuo pacco e ti offriamo un comodo portale per monitorare lo stato di avanzamento del tuo ordine in qualsiasi momento!","subtitle-notify":"Riceverai una notifica durante l'intero processo di spedizione, assicurandoti di rimanere aggiornato in ogni fase del processo.","subtitle-resolution":"Você será notificado durante todo o processo de envio, garantindo que você fique atualizado a cada passo do caminho.",text:"Acquistando questa garanzia di consegna, accetti i nostri Termini di servizio e l'Informativa sulla privacy. Non sei obbligato ad acquistare questa garanzia. Questa garanzia NON è un'assicurazione e non fornisce un indennizzo contro perdite, danni o responsabilità derivanti da un evento contingente o sconosciuto, ma piuttosto, attraverso ShipAid i marchi forniscono una garanzia di consegna in base alla quale se il prodotto ordinato non viene consegnato in condizioni soddisfacenti, il marchio da cui hai ordinato il prodotto può sostituire il prodotto gratuitamente. ShipAid non fornisce alcun prodotto o servizio direttamente ai consumatori, ma fornisce invece un servizio che consente ai marchi di facilitare la sostituzione del prodotto ai propri clienti. L'acquisto di questa garanzia non significa che verrai automaticamente rimborsato per qualsiasi prodotto o costo di spedizione perché il processo di risoluzione e la decisione per il risarcimento sono rigorosamente decisi dal marchio da cui stai acquistando. Il marchio richiederà la prova del danno o del prodotto non consegnato."},links:{terms:"Termini di servizio",privacy:"Politica sulla riservatezza"}}},ii=Object.freeze(Object.defineProperty({__proto__:null,actions:ti,default:ei,description:Je,footer:Xe,loading:Qe,title:Ye},Symbol.toStringTag,{value:"Module"})),oi="Laad ShipAid Widget...",ri="Bezorggarantie",ni="in geval van verlies, schade of diefstal",ai={button:"Aangedreven door"},si={add:"Toevoegen",remove:"Verwijderen",loading:"Bezig met laden..."},di={loading:oi,title:ri,description:ni,footer:ai,actions:si,"learn-more-popup":{close:"Sluiten",title:"Bezorggarantie",disclaimer:{"subtitle-enable":"We stellen je favoriete merken in staat om een bezorggarantie te bieden omdat we weten dat elke bestelling belangrijk is en dingen kunnen gebeuren!","subtitle-monitor":"We monitoren je pakket continu en bieden een handig portaal om de voortgang van je bestelling op elk moment te volgen!","subtitle-notify":"Je wordt gedurende het gehele verzendproces op de hoogte gehouden, zodat je altijd op de hoogte bent van elke stap.","subtitle-resolution":"In geval van problemen tijdens het transport bieden we een snelle en gemakkelijke manier om het probleem direct bij het merk te melden, voor een snelle oplossing.",text:"Door deze bezorggarantie aan te schaffen, ga je akkoord met onze Servicevoorwaarden en Privacybeleid. Je bent niet verplicht om deze garantie aan te schaffen. Deze garantie is GEEN verzekering en biedt geen schadevergoeding voor verlies, schade of aansprakelijkheid als gevolg van een onvoorziene of onbekende gebeurtenis, maar biedt via ShipAid een bezorggarantie waarbij, als het product dat je hebt besteld niet in bevredigende staat wordt geleverd, het merk van wie je het product hebt besteld, het product gratis kan vervangen. ShipAid levert geen producten of diensten direct aan consumenten, maar biedt een dienst die merken in staat stelt om productvervanging aan hun klanten te faciliteren. Het kopen van deze garantie betekent niet automatisch dat je wordt vergoed voor product- of verzendkosten, aangezien het oplossingproces en de beslissing voor compensatie strikt wordt bepaald door het merk van wie je koopt. Het merk zal bewijs van schade of niet-geleverde producten vereisen."},links:{terms:"Servicevoorwaarden",privacy:"Privacybeleid"}}},pi=Object.freeze(Object.defineProperty({__proto__:null,actions:si,default:di,description:ni,footer:ai,loading:oi,title:ri},Symbol.toStringTag,{value:"Module"})),li="Carregando o widget ShipAid...",ci="Garantia de entrega",hi="em caso de Perda, Danos ou Roubo",ui={button:"Distribuído por"},mi={add:"Adicionar",remove:"Remover",loading:"Carregando..."},gi={loading:li,title:ci,description:hi,footer:ui,actions:mi,"learn-more-popup":{close:"Fechar",title:"Garantia de entrega",subtitle:"Capacitamos suas marcas favoritas para oferecer uma garantia de entrega porque cada pedido é precioso!",disclaimer:{"subtitle-enable":"Permitimos que suas marcas favoritas forneçam uma garantia de entrega porque sabemos que cada pedido é precioso e as coisas acontecem!","subtitle-monitor":"Monitoramos continuamente o seu pacote e oferecemos um portal conveniente para você acompanhar o andamento do seu pedido a qualquer momento!","subtitle-notify":"Você será notificado durante todo o processo de envio, garantindo que você fique atualizado a cada passo do caminho.","subtitle-resolution":"Você será notificado durante todo o processo de envio, garantindo que você fique atualizado a cada passo do caminho.",text:"Ao adquirir esta garantia de entrega, você concorda com nossos Termos de Serviço e Política de Privacidade. Esta garantia não é obrigatória, NÃO é um seguro e não fornece indenização contra perdas, danos ou responsabilidade decorrentes de um contingente ou desconhecido. Caso o produto não seja entregue em condições satisfatórias, a marca da qual você comprou pode substituí-lo gratuitamente. A ShipAid não fornece nenhum produto ou serviço diretamente aos consumidores, mas sim presta um serviço que permite às marcas facilitar a substituição do produto aos seus clientes. Adquirir esta garantia não significa que você será automaticamente reembolsado por qualquer produto ou custos de envio porque o processo de resolução e decisão de compensação é estritamente decidido pela marca que você está comprando. A marca exigirá prova de danos ou produto não entregue."},links:{terms:"Termos de serviço",privacy:"Política de Privacidade"}}},fi=Object.freeze(Object.defineProperty({__proto__:null,actions:mi,default:gi,description:hi,footer:ui,loading:li,title:ci},Symbol.toStringTag,{value:"Module"}));t.ShipAidWidget=Pe,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}));
@@ -31,6 +31,7 @@ export declare class ShipAidWidget extends LitElement {
31
31
  customerId: undefined;
32
32
  supportSubscriptions: boolean;
33
33
  dataSelector: string;
34
+ shadowRootSelector: string;
34
35
  useShipAidCheckout: boolean;
35
36
  /** API Proxy pathname */
36
37
  private _apiEndpoint;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ui.shipaid.com",
3
3
  "private": false,
4
- "version": "0.3.83",
4
+ "version": "0.3.85",
5
5
  "type": "module",
6
6
  "main": "dist/widget.umd.js",
7
7
  "unpkg": "dist/widget.iife.js",