ui.shipaid.com 0.3.0 → 0.3.1

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/README.md CHANGED
@@ -71,6 +71,7 @@ This is a list of props that can be used to configure the widget:
71
71
  | `disablePolling` | Sets whether the cart should disable polling (enabled by default) - should be disabled if integrating manually with an ajax cart. | `boolean` |
72
72
  | `pollingInterval` | If polling is enabled, it sets the interval (in ms) between API updates. | `number` in milliseconds |
73
73
  | `disableRefresh ` | Sets whether the store cart should be updated when the protection item is added/removed. Add if you want to initially hide the protection product from the cart, even if it has just been added. | `boolean` |
74
+ | `lang ` | Sets the widget language (see the translations section below). This value can be any supported [ISO 639-1 code](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes). | `string` defaults to `en` |
74
75
 
75
76
  ### Events
76
77
 
@@ -130,6 +131,13 @@ If you need to change any of the widget colors to suit a specific theme, there a
130
131
 
131
132
  Other variables can be found [here](/widget/src/assets/styles.ts) (`/widget/src/assets/styles.ts`).
132
133
 
134
+ ### Translations
135
+
136
+ This widget also supports multiple languages, using the `lit-translate` plugin. The widget language can be configured using an attribute and would usally be static, but supports reactively swapping the language if a theme needs - i.e. if a user switches the language using a select option in the theme, then the widget language could be updated at the same time by selecting the widget element, and setting the `lang` attribute.
137
+
138
+ To create lang files, you should copy the default `/lang/en.json` file, and rename it to an [ISO 639-1 code](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) - for example `cp /src/lang/en.json /src/lang/fs.json`. You can then go through each key, and translate the existing text to the relevant language. This should be all you need to do - the widget automatically (and lazily, to save bundle size) imports the relevant lang file when it is specified. It will also fallback to the default `en.json` lang file if a certain language doesn't exist yet.
139
+
140
+
133
141
  ## Contributing
134
142
 
135
143
  ### Requirements
@@ -0,0 +1,40 @@
1
+ const loading = "Carregando o widget ShipAid...";
2
+ const title = "Garantia de entrega";
3
+ const description = "em caso de Perda, Danos ou Roubo";
4
+ const footer = {
5
+ button: "Distribuído por"
6
+ };
7
+ const actions = {
8
+ add: "Adicionar",
9
+ remove: "Remover",
10
+ loading: "Carregando..."
11
+ };
12
+ const pt = {
13
+ loading,
14
+ title,
15
+ description,
16
+ footer,
17
+ actions,
18
+ "learn-more-popup": {
19
+ close: "Fechar",
20
+ title: "Garantia de entrega",
21
+ subtitle: "Capacitamos suas marcas favoritas para oferecer uma garantia de entrega porque cada pedido é precioso!",
22
+ disclaimer: {
23
+ title: "Compre sem preocupações",
24
+ subtitle: "Marcas e transportadoras nem sempre podem garantir que seu pedido chegue à sua porta com segurança. Acidentes acontecem! Ajudamos a marca da qual você está comprando a substituir o produto que você encomendou em caso de um problema no transporte. Se você encontrar um problema, basta entrar em contato com a marca e eles o resolverão o mais rápido possível.",
25
+ 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."
26
+ },
27
+ links: {
28
+ terms: "Termos de serviço",
29
+ privacy: "Política de Privacidade"
30
+ }
31
+ }
32
+ };
33
+ export {
34
+ actions,
35
+ pt as default,
36
+ description,
37
+ footer,
38
+ loading,
39
+ title
40
+ };
package/dist/widget.es.js CHANGED
@@ -1472,7 +1472,7 @@ const StoreQuery = `query StoreByDomain ($store: String!) {
1472
1472
  protectionSettings
1473
1473
  }
1474
1474
  }`;
1475
- const langFiles = /* @__PURE__ */ Object.assign({ "./lang/en.json": () => Promise.resolve().then(() => en).then((m2) => m2["default"]), "./lang/it.json": () => import("./it-0759ce74.js").then((m2) => m2["default"]) });
1475
+ const langFiles = /* @__PURE__ */ Object.assign({ "./lang/en.json": () => Promise.resolve().then(() => en).then((m2) => m2["default"]), "./lang/it.json": () => import("./it-0759ce74.js").then((m2) => m2["default"]), "./lang/pt.json": () => import("./pt-bc086d7f.js").then((m2) => m2["default"]) });
1476
1476
  registerTranslateConfig({
1477
1477
  loader: async (lang) => {
1478
1478
  if (lang === "en")
@@ -24,50 +24,50 @@ var ShipAidWidget=function(t){"use strict";
24
24
  * Copyright 2019 Google LLC
25
25
  * SPDX-License-Identifier: BSD-3-Clause
26
26
  */
27
- const n=window,a=n.ShadowRoot&&(void 0===n.ShadyCSS||n.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,l=Symbol(),d=new WeakMap;let p=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==l)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(a&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=d.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&d.set(e,t))}return t}toString(){return this.cssText}};const h=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[o+1]),t[0]);return new p(i,t,l)},c=a?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new p("string"==typeof t?t:t+"",void 0,l))(e)})(t):t
27
+ const n=window,a=n.ShadowRoot&&(void 0===n.ShadyCSS||n.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,l=Symbol(),d=new WeakMap;let p=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==l)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(a&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=d.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&d.set(e,t))}return t}toString(){return this.cssText}};const c=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[o+1]),t[0]);return new p(i,t,l)},h=a?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new p("string"==typeof t?t:t+"",void 0,l))(e)})(t):t
28
28
  /**
29
29
  * @license
30
30
  * Copyright 2017 Google LLC
31
31
  * SPDX-License-Identifier: BSD-3-Clause
32
- */;var u;const f=window,g=f.trustedTypes,v=g?g.emptyScript:"",m=f.reactiveElementPolyfillSupport,_={toAttribute(t,e){switch(e){case Boolean:t=t?v:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(o){i=null}}return i}},y=(t,e)=>e!==t&&(e==e||t==t),C={attribute:!0,type:String,converter:_,reflect:!1,hasChanged:y};let $=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var e;this.finalize(),(null!==(e=this.h)&&void 0!==e?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,i)=>{const o=this._$Ep(i,e);void 0!==o&&(this._$Ev.set(o,i),t.push(o))})),t}static createProperty(t,e=C){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i="symbol"==typeof t?Symbol():"__"+t,o=this.getPropertyDescriptor(t,i,e);void 0!==o&&Object.defineProperty(this.prototype,t,o)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(o){const r=this[t];this[e]=o,this.requestUpdate(t,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||C}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),void 0!==t.h&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const i of e)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(c(t))}else void 0!==t&&e.push(c(t));return e}static _$Ep(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,i;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(i=t.hostConnected)||void 0===i||i.call(t))}removeController(t){var e;null===(e=this._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{a?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const i=document.createElement("style"),o=n.litNonce;void 0!==o&&i.setAttribute("nonce",o),i.textContent=e.cssText,t.appendChild(i)}))})(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e,i=C){var o;const r=this.constructor._$Ep(t,i);if(void 0!==r&&!0===i.reflect){const s=(void 0!==(null===(o=i.converter)||void 0===o?void 0:o.toAttribute)?i.converter:_).toAttribute(e,i.type);this._$El=t,null==s?this.removeAttribute(r):this.setAttribute(r,s),this._$El=null}}_$AK(t,e){var i;const o=this.constructor,r=o._$Ev.get(t);if(void 0!==r&&this._$El!==r){const t=o.getPropertyOptions(r),s="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(i=t.converter)||void 0===i?void 0:i.fromAttribute)?t.converter:_;this._$El=r,this[r]=s.fromAttribute(e,t.type),this._$El=null}}requestUpdate(t,e,i){let o=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||y)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,i))):o=!1),!this.isUpdatePending&&o&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,e)=>this[e]=t)),this._$Ei=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(i)):this._$Ek()}catch(o){throw e=!1,this._$Ek(),o}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null===(e=this._$ES)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$EO(e,this[e],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}};
32
+ */;var u;const f=window,m=f.trustedTypes,g=m?m.emptyScript:"",v=f.reactiveElementPolyfillSupport,_={toAttribute(t,e){switch(e){case Boolean:t=t?g:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(o){i=null}}return i}},y=(t,e)=>e!==t&&(e==e||t==t),C={attribute:!0,type:String,converter:_,reflect:!1,hasChanged:y};let $=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var e;this.finalize(),(null!==(e=this.h)&&void 0!==e?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,i)=>{const o=this._$Ep(i,e);void 0!==o&&(this._$Ev.set(o,i),t.push(o))})),t}static createProperty(t,e=C){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i="symbol"==typeof t?Symbol():"__"+t,o=this.getPropertyDescriptor(t,i,e);void 0!==o&&Object.defineProperty(this.prototype,t,o)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(o){const r=this[t];this[e]=o,this.requestUpdate(t,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||C}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),void 0!==t.h&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const i of e)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(h(t))}else void 0!==t&&e.push(h(t));return e}static _$Ep(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,i;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(i=t.hostConnected)||void 0===i||i.call(t))}removeController(t){var e;null===(e=this._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{a?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const i=document.createElement("style"),o=n.litNonce;void 0!==o&&i.setAttribute("nonce",o),i.textContent=e.cssText,t.appendChild(i)}))})(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e,i=C){var o;const r=this.constructor._$Ep(t,i);if(void 0!==r&&!0===i.reflect){const s=(void 0!==(null===(o=i.converter)||void 0===o?void 0:o.toAttribute)?i.converter:_).toAttribute(e,i.type);this._$El=t,null==s?this.removeAttribute(r):this.setAttribute(r,s),this._$El=null}}_$AK(t,e){var i;const o=this.constructor,r=o._$Ev.get(t);if(void 0!==r&&this._$El!==r){const t=o.getPropertyOptions(r),s="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(i=t.converter)||void 0===i?void 0:i.fromAttribute)?t.converter:_;this._$El=r,this[r]=s.fromAttribute(e,t.type),this._$El=null}}requestUpdate(t,e,i){let o=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||y)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,i))):o=!1),!this.isUpdatePending&&o&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,e)=>this[e]=t)),this._$Ei=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(i)):this._$Ek()}catch(o){throw e=!1,this._$Ek(),o}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null===(e=this._$ES)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$EO(e,this[e],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}};
33
33
  /**
34
34
  * @license
35
35
  * Copyright 2017 Google LLC
36
36
  * SPDX-License-Identifier: BSD-3-Clause
37
37
  */
38
- var b;$.finalized=!0,$.elementProperties=new Map,$.elementStyles=[],$.shadowRootOptions={mode:"open"},null==m||m({ReactiveElement:$}),(null!==(u=f.reactiveElementVersions)&&void 0!==u?u:f.reactiveElementVersions=[]).push("1.6.1");const w=window,A=w.trustedTypes,L=A?A.createPolicy("lit-html",{createHTML:t=>t}):void 0,S=`lit$${(Math.random()+"").slice(9)}$`,x="?"+S,E=`<${x}>`,P=document,z=(t="")=>P.createComment(t),k=t=>null===t||"object"!=typeof t&&"function"!=typeof t,T=Array.isArray,M=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,O=/-->/g,U=/>/g,N=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),j=/'/g,R=/"/g,I=/^(?:script|style|textarea|title)$/i,W=(V=1,(t,...e)=>({_$litType$:V,strings:t,values:e})),H=Symbol.for("lit-noChange"),D=Symbol.for("lit-nothing"),q=new WeakMap,B=P.createTreeWalker(P,129,null,!1);var V;class F{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let r=0,s=0;const n=t.length-1,a=this.parts,[l,d]=((t,e)=>{const i=t.length-1,o=[];let r,s=2===e?"<svg>":"",n=M;for(let l=0;l<i;l++){const e=t[l];let i,a,d=-1,p=0;for(;p<e.length&&(n.lastIndex=p,a=n.exec(e),null!==a);)p=n.lastIndex,n===M?"!--"===a[1]?n=O:void 0!==a[1]?n=U:void 0!==a[2]?(I.test(a[2])&&(r=RegExp("</"+a[2],"g")),n=N):void 0!==a[3]&&(n=N):n===N?">"===a[0]?(n=null!=r?r:M,d=-1):void 0===a[1]?d=-2:(d=n.lastIndex-a[2].length,i=a[1],n=void 0===a[3]?N:'"'===a[3]?R:j):n===R||n===j?n=N:n===O||n===U?n=M:(n=N,r=void 0);const h=n===N&&t[l+1].startsWith("/>")?" ":"";s+=n===M?e+E:d>=0?(o.push(i),e.slice(0,d)+"$lit$"+e.slice(d)+S+h):e+S+(-2===d?(o.push(void 0),l):h)}const a=s+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==L?L.createHTML(a):a,o]})(t,e);if(this.el=F.createElement(l,i),B.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=B.nextNode())&&a.length<n;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const e of o.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(S)){const i=d[s++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+"$lit$").split(S),e=/([.?@])?(.*)/.exec(i);a.push({type:1,index:r,name:e[2],strings:t,ctor:"."===e[1]?Q:"?"===e[1]?X:"@"===e[1]?tt:K})}else a.push({type:6,index:r})}for(const e of t)o.removeAttribute(e)}if(I.test(o.tagName)){const t=o.textContent.split(S),e=t.length-1;if(e>0){o.textContent=A?A.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],z()),B.nextNode(),a.push({type:2,index:++r});o.append(t[e],z())}}}else if(8===o.nodeType)if(o.data===x)a.push({type:2,index:r});else{let t=-1;for(;-1!==(t=o.data.indexOf(S,t+1));)a.push({type:7,index:r}),t+=S.length-1}r++}}static createElement(t,e){const i=P.createElement("template");return i.innerHTML=t,i}}function Z(t,e,i=t,o){var r,s,n,a;if(e===H)return e;let l=void 0!==o?null===(r=i._$Co)||void 0===r?void 0:r[o]:i._$Cl;const d=k(e)?void 0:e._$litDirective$;return(null==l?void 0:l.constructor)!==d&&(null===(s=null==l?void 0:l._$AO)||void 0===s||s.call(l,!1),void 0===d?l=void 0:(l=new d(t),l._$AT(t,i,o)),void 0!==o?(null!==(n=(a=i)._$Co)&&void 0!==n?n:a._$Co=[])[o]=l:i._$Cl=l),void 0!==l&&(e=Z(t,l._$AS(t,e.values),l,o)),e}class G{constructor(t,e){this.u=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(t){var e;const{el:{content:i},parts:o}=this._$AD,r=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:P).importNode(i,!0);B.currentNode=r;let s=B.nextNode(),n=0,a=0,l=o[0];for(;void 0!==l;){if(n===l.index){let e;2===l.type?e=new J(s,s.nextSibling,this,t):1===l.type?e=new l.ctor(s,l.name,l.strings,this,t):6===l.type&&(e=new et(s,this,t)),this.u.push(e),l=o[++a]}n!==(null==l?void 0:l.index)&&(s=B.nextNode(),n++)}return r}p(t){let e=0;for(const i of this.u)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class J{constructor(t,e,i,o){var r;this.type=2,this._$AH=D,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cm=null===(r=null==o?void 0:o.isConnected)||void 0===r||r}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cm}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Z(this,t,e),k(t)?t===D||null==t||""===t?(this._$AH!==D&&this._$AR(),this._$AH=D):t!==this._$AH&&t!==H&&this.g(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>T(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.k(t):this.g(t)}O(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}g(t){this._$AH!==D&&k(this._$AH)?this._$AA.nextSibling.data=t:this.T(P.createTextNode(t)),this._$AH=t}$(t){var e;const{values:i,_$litType$:o}=t,r="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=F.createElement(o.h,this.options)),o);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===r)this._$AH.p(i);else{const t=new G(r,this),e=t.v(this.options);t.p(i),this.T(e),this._$AH=t}}_$AC(t){let e=q.get(t.strings);return void 0===e&&q.set(t.strings,e=new F(t)),e}k(t){T(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const r of t)o===e.length?e.push(i=new J(this.O(z()),this.O(z()),this,this.options)):i=e[o],i._$AI(r),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cm=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class K{constructor(t,e,i,o,r){this.type=1,this._$AH=D,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=r,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=D}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){const r=this.strings;let s=!1;if(void 0===r)t=Z(this,t,e,0),s=!k(t)||t!==this._$AH&&t!==H,s&&(this._$AH=t);else{const o=t;let n,a;for(t=r[0],n=0;n<r.length-1;n++)a=Z(this,o[i+n],e,n),a===H&&(a=this._$AH[n]),s||(s=!k(a)||a!==this._$AH[n]),a===D?t=D:t!==D&&(t+=(null!=a?a:"")+r[n+1]),this._$AH[n]=a}s&&!o&&this.j(t)}j(t){t===D?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class Q extends K{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===D?void 0:t}}const Y=A?A.emptyScript:"";class X extends K{constructor(){super(...arguments),this.type=4}j(t){t&&t!==D?this.element.setAttribute(this.name,Y):this.element.removeAttribute(this.name)}}class tt extends K{constructor(t,e,i,o,r){super(t,e,i,o,r),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=Z(this,t,e,0))&&void 0!==i?i:D)===H)return;const o=this._$AH,r=t===D&&o!==D||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,s=t!==D&&(o===D||r);r&&this.element.removeEventListener(this.name,this,o),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class et{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){Z(this,t)}}const it=w.litHtmlPolyfillSupport;null==it||it(F,J),(null!==(b=w.litHtmlVersions)&&void 0!==b?b:w.litHtmlVersions=[]).push("2.6.1");const ot=(t,e,i)=>{var o,r;const s=null!==(o=null==i?void 0:i.renderBefore)&&void 0!==o?o:e;let n=s._$litPart$;if(void 0===n){const t=null!==(r=null==i?void 0:i.renderBefore)&&void 0!==r?r:null;s._$litPart$=n=new J(e.insertBefore(z(),t),t,void 0,null!=i?i:{})}return n._$AI(t),n};
38
+ var b;$.finalized=!0,$.elementProperties=new Map,$.elementStyles=[],$.shadowRootOptions={mode:"open"},null==v||v({ReactiveElement:$}),(null!==(u=f.reactiveElementVersions)&&void 0!==u?u:f.reactiveElementVersions=[]).push("1.6.1");const w=window,A=w.trustedTypes,L=A?A.createPolicy("lit-html",{createHTML:t=>t}):void 0,S=`lit$${(Math.random()+"").slice(9)}$`,x="?"+S,E=`<${x}>`,P=document,z=(t="")=>P.createComment(t),k=t=>null===t||"object"!=typeof t&&"function"!=typeof t,T=Array.isArray,M=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,O=/-->/g,U=/>/g,N=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),j=/'/g,R=/"/g,I=/^(?:script|style|textarea|title)$/i,W=(F=1,(t,...e)=>({_$litType$:F,strings:t,values:e})),H=Symbol.for("lit-noChange"),q=Symbol.for("lit-nothing"),D=new WeakMap,B=P.createTreeWalker(P,129,null,!1);var F;class V{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let r=0,s=0;const n=t.length-1,a=this.parts,[l,d]=((t,e)=>{const i=t.length-1,o=[];let r,s=2===e?"<svg>":"",n=M;for(let l=0;l<i;l++){const e=t[l];let i,a,d=-1,p=0;for(;p<e.length&&(n.lastIndex=p,a=n.exec(e),null!==a);)p=n.lastIndex,n===M?"!--"===a[1]?n=O:void 0!==a[1]?n=U:void 0!==a[2]?(I.test(a[2])&&(r=RegExp("</"+a[2],"g")),n=N):void 0!==a[3]&&(n=N):n===N?">"===a[0]?(n=null!=r?r:M,d=-1):void 0===a[1]?d=-2:(d=n.lastIndex-a[2].length,i=a[1],n=void 0===a[3]?N:'"'===a[3]?R:j):n===R||n===j?n=N:n===O||n===U?n=M:(n=N,r=void 0);const c=n===N&&t[l+1].startsWith("/>")?" ":"";s+=n===M?e+E:d>=0?(o.push(i),e.slice(0,d)+"$lit$"+e.slice(d)+S+c):e+S+(-2===d?(o.push(void 0),l):c)}const a=s+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==L?L.createHTML(a):a,o]})(t,e);if(this.el=V.createElement(l,i),B.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=B.nextNode())&&a.length<n;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const e of o.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(S)){const i=d[s++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+"$lit$").split(S),e=/([.?@])?(.*)/.exec(i);a.push({type:1,index:r,name:e[2],strings:t,ctor:"."===e[1]?Q:"?"===e[1]?X:"@"===e[1]?tt:K})}else a.push({type:6,index:r})}for(const e of t)o.removeAttribute(e)}if(I.test(o.tagName)){const t=o.textContent.split(S),e=t.length-1;if(e>0){o.textContent=A?A.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],z()),B.nextNode(),a.push({type:2,index:++r});o.append(t[e],z())}}}else if(8===o.nodeType)if(o.data===x)a.push({type:2,index:r});else{let t=-1;for(;-1!==(t=o.data.indexOf(S,t+1));)a.push({type:7,index:r}),t+=S.length-1}r++}}static createElement(t,e){const i=P.createElement("template");return i.innerHTML=t,i}}function Z(t,e,i=t,o){var r,s,n,a;if(e===H)return e;let l=void 0!==o?null===(r=i._$Co)||void 0===r?void 0:r[o]:i._$Cl;const d=k(e)?void 0:e._$litDirective$;return(null==l?void 0:l.constructor)!==d&&(null===(s=null==l?void 0:l._$AO)||void 0===s||s.call(l,!1),void 0===d?l=void 0:(l=new d(t),l._$AT(t,i,o)),void 0!==o?(null!==(n=(a=i)._$Co)&&void 0!==n?n:a._$Co=[])[o]=l:i._$Cl=l),void 0!==l&&(e=Z(t,l._$AS(t,e.values),l,o)),e}class G{constructor(t,e){this.u=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(t){var e;const{el:{content:i},parts:o}=this._$AD,r=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:P).importNode(i,!0);B.currentNode=r;let s=B.nextNode(),n=0,a=0,l=o[0];for(;void 0!==l;){if(n===l.index){let e;2===l.type?e=new J(s,s.nextSibling,this,t):1===l.type?e=new l.ctor(s,l.name,l.strings,this,t):6===l.type&&(e=new et(s,this,t)),this.u.push(e),l=o[++a]}n!==(null==l?void 0:l.index)&&(s=B.nextNode(),n++)}return r}p(t){let e=0;for(const i of this.u)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class J{constructor(t,e,i,o){var r;this.type=2,this._$AH=q,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cm=null===(r=null==o?void 0:o.isConnected)||void 0===r||r}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cm}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Z(this,t,e),k(t)?t===q||null==t||""===t?(this._$AH!==q&&this._$AR(),this._$AH=q):t!==this._$AH&&t!==H&&this.g(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>T(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.k(t):this.g(t)}O(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}g(t){this._$AH!==q&&k(this._$AH)?this._$AA.nextSibling.data=t:this.T(P.createTextNode(t)),this._$AH=t}$(t){var e;const{values:i,_$litType$:o}=t,r="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=V.createElement(o.h,this.options)),o);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===r)this._$AH.p(i);else{const t=new G(r,this),e=t.v(this.options);t.p(i),this.T(e),this._$AH=t}}_$AC(t){let e=D.get(t.strings);return void 0===e&&D.set(t.strings,e=new V(t)),e}k(t){T(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const r of t)o===e.length?e.push(i=new J(this.O(z()),this.O(z()),this,this.options)):i=e[o],i._$AI(r),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cm=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class K{constructor(t,e,i,o,r){this.type=1,this._$AH=q,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=r,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=q}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){const r=this.strings;let s=!1;if(void 0===r)t=Z(this,t,e,0),s=!k(t)||t!==this._$AH&&t!==H,s&&(this._$AH=t);else{const o=t;let n,a;for(t=r[0],n=0;n<r.length-1;n++)a=Z(this,o[i+n],e,n),a===H&&(a=this._$AH[n]),s||(s=!k(a)||a!==this._$AH[n]),a===q?t=q:t!==q&&(t+=(null!=a?a:"")+r[n+1]),this._$AH[n]=a}s&&!o&&this.j(t)}j(t){t===q?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class Q extends K{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===q?void 0:t}}const Y=A?A.emptyScript:"";class X extends K{constructor(){super(...arguments),this.type=4}j(t){t&&t!==q?this.element.setAttribute(this.name,Y):this.element.removeAttribute(this.name)}}class tt extends K{constructor(t,e,i,o,r){super(t,e,i,o,r),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=Z(this,t,e,0))&&void 0!==i?i:q)===H)return;const o=this._$AH,r=t===q&&o!==q||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,s=t!==q&&(o===q||r);r&&this.element.removeEventListener(this.name,this,o),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class et{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){Z(this,t)}}const it=w.litHtmlPolyfillSupport;null==it||it(V,J),(null!==(b=w.litHtmlVersions)&&void 0!==b?b:w.litHtmlVersions=[]).push("2.6.1");const ot=(t,e,i)=>{var o,r;const s=null!==(o=null==i?void 0:i.renderBefore)&&void 0!==o?o:e;let n=s._$litPart$;if(void 0===n){const t=null!==(r=null==i?void 0:i.renderBefore)&&void 0!==r?r:null;s._$litPart$=n=new J(e.insertBefore(z(),t),t,void 0,null!=i?i:{})}return n._$AI(t),n};
39
39
  /**
40
40
  * @license
41
41
  * Copyright 2017 Google LLC
42
42
  * SPDX-License-Identifier: BSD-3-Clause
43
- */var rt,st;let nt=class extends ${constructor(){super(...arguments),this.renderOptions={host:this},this._$Dt=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Dt=ot(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!1)}render(){return H}};nt.finalized=!0,nt._$litElement$=!0,null===(rt=globalThis.litElementHydrateSupport)||void 0===rt||rt.call(globalThis,{LitElement:nt});const at=globalThis.litElementPolyfillSupport;null==at||at({LitElement:nt}),(null!==(st=globalThis.litElementVersions)&&void 0!==st?st:globalThis.litElementVersions=[]).push("3.2.0");const lt="langChanged";function dt(t,e,i){return Object.entries(ht(e||{})).reduce(((t,[e,i])=>t.replace(new RegExp(`{{[  ]*${e}[  ]*}}`,"gm"),String(ht(i)))),t)}function pt(t,e){const i=t.split(".");let o=e.strings;for(;null!=o&&i.length>0;)o=o[i.shift()];return null!=o?o.toString():null}function ht(t){return"function"==typeof t?t():t}let ct={loader:()=>Promise.resolve({}),empty:t=>`[${t}]`,lookup:pt,interpolate:dt,translationCache:{}};function ut(t,e,i=ct){var o;o={previousStrings:i.strings,previousLang:i.lang,lang:i.lang=t,strings:i.strings=e},window.dispatchEvent(new CustomEvent(lt,{detail:o}))}
43
+ */var rt,st;let nt=class extends ${constructor(){super(...arguments),this.renderOptions={host:this},this._$Dt=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Dt=ot(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!1)}render(){return H}};nt.finalized=!0,nt._$litElement$=!0,null===(rt=globalThis.litElementHydrateSupport)||void 0===rt||rt.call(globalThis,{LitElement:nt});const at=globalThis.litElementPolyfillSupport;null==at||at({LitElement:nt}),(null!==(st=globalThis.litElementVersions)&&void 0!==st?st:globalThis.litElementVersions=[]).push("3.2.0");const lt="langChanged";function dt(t,e,i){return Object.entries(ct(e||{})).reduce(((t,[e,i])=>t.replace(new RegExp(`{{[  ]*${e}[  ]*}}`,"gm"),String(ct(i)))),t)}function pt(t,e){const i=t.split(".");let o=e.strings;for(;null!=o&&i.length>0;)o=o[i.shift()];return null!=o?o.toString():null}function ct(t){return"function"==typeof t?t():t}let ht={loader:()=>Promise.resolve({}),empty:t=>`[${t}]`,lookup:pt,interpolate:dt,translationCache:{}};function ut(t,e,i=ht){var o;o={previousStrings:i.strings,previousLang:i.lang,lang:i.lang=t,strings:i.strings=e},window.dispatchEvent(new CustomEvent(lt,{detail:o}))}
44
44
  /**
45
45
  * @license
46
46
  * Copyright 2017 Google LLC
47
47
  * SPDX-License-Identifier: BSD-3-Clause
48
48
  */
49
- const ft=2;class gt{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}
49
+ const ft=2;class mt{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}
50
50
  /**
51
51
  * @license
52
52
  * Copyright 2020 Google LLC
53
53
  * SPDX-License-Identifier: BSD-3-Clause
54
- */const vt=(t,e)=>{var i,o;const r=t._$AN;if(void 0===r)return!1;for(const s of r)null===(o=(i=s)._$AO)||void 0===o||o.call(i,e,!1),vt(s,e);return!0},mt=t=>{let e,i;do{if(void 0===(e=t._$AM))break;i=e._$AN,i.delete(t),t=e}while(0===(null==i?void 0:i.size))},_t=t=>{for(let e;e=t._$AM;t=e){let i=e._$AN;if(void 0===i)e._$AN=i=new Set;else if(i.has(t))break;i.add(t),$t(e)}};
54
+ */const gt=(t,e)=>{var i,o;const r=t._$AN;if(void 0===r)return!1;for(const s of r)null===(o=(i=s)._$AO)||void 0===o||o.call(i,e,!1),gt(s,e);return!0},vt=t=>{let e,i;do{if(void 0===(e=t._$AM))break;i=e._$AN,i.delete(t),t=e}while(0===(null==i?void 0:i.size))},_t=t=>{for(let e;e=t._$AM;t=e){let i=e._$AN;if(void 0===i)e._$AN=i=new Set;else if(i.has(t))break;i.add(t),$t(e)}};
55
55
  /**
56
56
  * @license
57
57
  * Copyright 2017 Google LLC
58
58
  * SPDX-License-Identifier: BSD-3-Clause
59
- */function yt(t){void 0!==this._$AN?(mt(this),this._$AM=t,_t(this)):this._$AM=t}function Ct(t,e=!1,i=0){const o=this._$AH,r=this._$AN;if(void 0!==r&&0!==r.size)if(e)if(Array.isArray(o))for(let s=i;s<o.length;s++)vt(o[s],!1),mt(o[s]);else null!=o&&(vt(o,!1),mt(o));else vt(this,t)}const $t=t=>{var e,i,o,r;t.type==ft&&(null!==(e=(o=t)._$AP)&&void 0!==e||(o._$AP=Ct),null!==(i=(r=t)._$AQ)&&void 0!==i||(r._$AQ=yt))};class bt extends gt{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,i){super._$AT(t,e,i),_t(this),this.isConnected=t._$AU}_$AO(t,e=!0){var i,o;t!==this.isConnected&&(this.isConnected=t,t?null===(i=this.reconnected)||void 0===i||i.call(this):null===(o=this.disconnected)||void 0===o||o.call(this)),e&&(vt(this,t),mt(this))}setValue(t){if(void 0===this._$Ct.strings)this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}}class wt extends bt{constructor(){super(...arguments),this.langChangedSubscription=null,this.getValue=()=>""}renderValue(t){return this.getValue=t,this.subscribe(),this.getValue()}langChanged(t){this.setValue(this.getValue(t))}subscribe(){null==this.langChangedSubscription&&(this.langChangedSubscription=function(t,e){const i=e=>t(e.detail);return window.addEventListener(lt,i,e),()=>window.removeEventListener(lt,i)}(this.langChanged.bind(this)))}unsubscribe(){null!=this.langChangedSubscription&&this.langChangedSubscription()}disconnected(){this.unsubscribe()}reconnected(){this.subscribe()}}const At=(t=>(...e)=>({_$litDirective$:t,values:e}))(class extends wt{render(t,e,i){return this.renderValue((()=>function(t,e,i=ct){let o=i.translationCache[t]||(i.translationCache[t]=i.lookup(t,i)||i.empty(t,i));return null!=(e=null!=e?ht(e):null)?i.interpolate(o,e,i):o}(t,e,i)))}});
59
+ */function yt(t){void 0!==this._$AN?(vt(this),this._$AM=t,_t(this)):this._$AM=t}function Ct(t,e=!1,i=0){const o=this._$AH,r=this._$AN;if(void 0!==r&&0!==r.size)if(e)if(Array.isArray(o))for(let s=i;s<o.length;s++)gt(o[s],!1),vt(o[s]);else null!=o&&(gt(o,!1),vt(o));else gt(this,t)}const $t=t=>{var e,i,o,r;t.type==ft&&(null!==(e=(o=t)._$AP)&&void 0!==e||(o._$AP=Ct),null!==(i=(r=t)._$AQ)&&void 0!==i||(r._$AQ=yt))};class bt extends mt{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,i){super._$AT(t,e,i),_t(this),this.isConnected=t._$AU}_$AO(t,e=!0){var i,o;t!==this.isConnected&&(this.isConnected=t,t?null===(i=this.reconnected)||void 0===i||i.call(this):null===(o=this.disconnected)||void 0===o||o.call(this)),e&&(gt(this,t),vt(this))}setValue(t){if(void 0===this._$Ct.strings)this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}}class wt extends bt{constructor(){super(...arguments),this.langChangedSubscription=null,this.getValue=()=>""}renderValue(t){return this.getValue=t,this.subscribe(),this.getValue()}langChanged(t){this.setValue(this.getValue(t))}subscribe(){null==this.langChangedSubscription&&(this.langChangedSubscription=function(t,e){const i=e=>t(e.detail);return window.addEventListener(lt,i,e),()=>window.removeEventListener(lt,i)}(this.langChanged.bind(this)))}unsubscribe(){null!=this.langChangedSubscription&&this.langChangedSubscription()}disconnected(){this.unsubscribe()}reconnected(){this.subscribe()}}const At=(t=>(...e)=>({_$litDirective$:t,values:e}))(class extends wt{render(t,e,i){return this.renderValue((()=>function(t,e,i=ht){let o=i.translationCache[t]||(i.translationCache[t]=i.lookup(t,i)||i.empty(t,i));return null!=(e=null!=e?ct(e):null)?i.interpolate(o,e,i):o}(t,e,i)))}});
60
60
  /**
61
61
  * @license
62
62
  * Copyright 2017 Google LLC
63
63
  * SPDX-License-Identifier: BSD-3-Clause
64
- */class Lt extends gt{constructor(t){if(super(t),this.it=D,t.type!==ft)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===D||null==t)return this._t=void 0,this.it=t;if(t===H)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}}Lt.directiveName="unsafeHTML",Lt.resultType=1;const St="__registered_effects";function xt(t){const e=t;if(e[St])return e;const i=function(t){if(!t.dispatchEvent||!t.requestUpdate)throw new Error("Element missing required functions (dispatchEvent/requestUpdate)");return t}(t),o=i.updated;return e[St]={index:0,count:0,effects:[]},i.updated=t=>(e[St].index=0,o(t)),e}function Et(t,e,i){const o=function(t,e){const i=xt(t),{index:o,count:r}=i[St];return o===r?(i[St].index++,i[St].count++,i[St].effects.push(e),e):(i[St].index++,i[St].effects[o])}(t,{on:e,observe:["__initial__dirty"]});o.observe.some(((t,e)=>i[e]!==t))&&o.on(),o.observe=i}
64
+ */class Lt extends mt{constructor(t){if(super(t),this.it=q,t.type!==ft)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===q||null==t)return this._t=void 0,this.it=t;if(t===H)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}}Lt.directiveName="unsafeHTML",Lt.resultType=1;const St="__registered_effects";function xt(t){const e=t;if(e[St])return e;const i=function(t){if(!t.dispatchEvent||!t.requestUpdate)throw new Error("Element missing required functions (dispatchEvent/requestUpdate)");return t}(t),o=i.updated;return e[St]={index:0,count:0,effects:[]},i.updated=t=>(e[St].index=0,o(t)),e}function Et(t,e,i){const o=function(t,e){const i=xt(t),{index:o,count:r}=i[St];return o===r?(i[St].index++,i[St].count++,i[St].effects.push(e),e):(i[St].index++,i[St].effects[o])}(t,{on:e,observe:["__initial__dirty"]});o.observe.some(((t,e)=>i[e]!==t))&&o.on(),o.observe=i}
65
65
  /**
66
66
  * @license
67
67
  * Copyright 2021 Google LLC
68
68
  * SPDX-License-Identifier: BSD-3-Clause
69
69
  */
70
- function Pt(t,e,i){return t?e():null==i?void 0:i()}const zt=h`
70
+ function Pt(t,e,i){return t?e():null==i?void 0:i()}const zt=c`
71
71
  :host {
72
72
  --shipaid-primary: #002bd6;
73
73
  --shipaid-secondary: #0076ff;
@@ -246,7 +246,7 @@ function Pt(t,e,i){return t?e():null==i?void 0:i()}const zt=h`
246
246
  </div>
247
247
  </div>
248
248
  </div>
249
- `}};Ot.styles=zt,Mt([o({type:Boolean,attribute:!0})],Ot.prototype,"active",2),Ot=Mt([e("shipaid-popup-learn-more")],Ot);const Ut="Loading ShipAid Widget...",Nt="Delivery Guarantee",jt="in case of Loss, Damage or Theft",Rt={button:"Powered by"},It={add:"Add",remove:"Remove",loading:"Loading..."},Wt={loading:Ut,title:Nt,description:jt,footer:Rt,actions:It,"learn-more-popup":{close:"Close",title:"Delivery Guarantee",subtitle:"We empower your favorite brands to offer a delivery guarantee because every order is precious!",disclaimer:{title:"Shop Worry-Free",subtitle:"Brands and shipment carriers cannot always guarantee your order will arrive at your doorstep safely. Things happen! We help the brand you are purchasing from replace the product you ordered in the chance of an issue in transit. If you encounter an issue, simply reach out to the brand and they will get it resolved as soon as possible.",text:"By purchasing this delivery guarantee, you agree to our Terms Of Service and Privacy Policy. You are not obligated to purchase this guarantee. This guarantee is NOT insurance and does not provide indemnification against loss, damage, or liability arising from a contingent or unknown event, but rather, through ShipAid brands provide a delivery guarantee whereby if the product you ordered is not delivered in satisfactory condition, the brand from which you ordered the product may replace the product free of charge. ShipAid does not provide any products or services directly to consumers, but instead provides a service that allow brands to facilitate product replacement to their customers. Purchasing this guarantee does not mean that you will automatically be reimbursed for any product or shipping costs because the resolution process and decision for compensation is strictly decided by the brand you a purchasing from. The brand will require proof of damage or undelivered product."},links:{terms:"Terms of Service",privacy:"Privacy Policy"}}},Ht=Object.freeze(Object.defineProperty({__proto__:null,actions:It,default:Wt,description:jt,footer:Rt,loading:Ut,title:Nt},Symbol.toStringTag,{value:"Module"})),Dt=h`
249
+ `}};Ot.styles=zt,Mt([o({type:Boolean,attribute:!0})],Ot.prototype,"active",2),Ot=Mt([e("shipaid-popup-learn-more")],Ot);const Ut="Loading ShipAid Widget...",Nt="Delivery Guarantee",jt="in case of Loss, Damage or Theft",Rt={button:"Powered by"},It={add:"Add",remove:"Remove",loading:"Loading..."},Wt={loading:Ut,title:Nt,description:jt,footer:Rt,actions:It,"learn-more-popup":{close:"Close",title:"Delivery Guarantee",subtitle:"We empower your favorite brands to offer a delivery guarantee because every order is precious!",disclaimer:{title:"Shop Worry-Free",subtitle:"Brands and shipment carriers cannot always guarantee your order will arrive at your doorstep safely. Things happen! We help the brand you are purchasing from replace the product you ordered in the chance of an issue in transit. If you encounter an issue, simply reach out to the brand and they will get it resolved as soon as possible.",text:"By purchasing this delivery guarantee, you agree to our Terms Of Service and Privacy Policy. You are not obligated to purchase this guarantee. This guarantee is NOT insurance and does not provide indemnification against loss, damage, or liability arising from a contingent or unknown event, but rather, through ShipAid brands provide a delivery guarantee whereby if the product you ordered is not delivered in satisfactory condition, the brand from which you ordered the product may replace the product free of charge. ShipAid does not provide any products or services directly to consumers, but instead provides a service that allow brands to facilitate product replacement to their customers. Purchasing this guarantee does not mean that you will automatically be reimbursed for any product or shipping costs because the resolution process and decision for compensation is strictly decided by the brand you a purchasing from. The brand will require proof of damage or undelivered product."},links:{terms:"Terms of Service",privacy:"Privacy Policy"}}},Ht=Object.freeze(Object.defineProperty({__proto__:null,actions:It,default:Wt,description:jt,footer:Rt,loading:Ut,title:Nt},Symbol.toStringTag,{value:"Module"})),qt=c`
250
250
  :host {
251
251
  --shipaid-primary: #002bd6;
252
252
  --shipaid-secondary: #0076ff;
@@ -392,7 +392,7 @@ function Pt(t,e,i){return t?e():null==i?void 0:i()}const zt=h`
392
392
  .shipaid-prompt .prompt-footer .prompt-footer-badge svg {
393
393
  height: 9px;
394
394
  }
395
- `,qt=W`
395
+ `,Dt=W`
396
396
  <svg viewBox="0 0 453 511" version="1.1" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
397
397
  <g transform="matrix(1,0,0,1,-29.4375,-0.984384)">
398
398
  <path d="M468.297,67.385L262.417,2C258.177,0.646 253.63,0.646 249.391,2L43.51,67.385C35.188,69.708 29.438,77.318 29.438,85.979C32.302,157.156 52.266,370.036 52.266,370.036C52.906,378.188 57.297,385.568 64.167,390.01L248.807,509.156C253.12,511.943 258.688,511.943 263.005,509.156L447.641,390.01C454.51,385.568 458.901,378.188 459.542,370.036C459.542,370.036 479.51,157.156 482.37,85.979C482.37,77.318 476.625,69.708 468.297,67.385" style="fill:rgb(47,52,61);fill-rule:nonzero;"/>
@@ -441,7 +441,7 @@ function Pt(t,e,i){return t?e():null==i?void 0:i()}const zt=h`
441
441
  />
442
442
  </g>
443
443
  </svg>
444
- `,Vt=W`
444
+ `,Ft=W`
445
445
  <svg
446
446
  viewBox="0 0 423 62"
447
447
  version="1.1"
@@ -523,13 +523,13 @@ function Pt(t,e,i){return t?e():null==i?void 0:i()}const zt=h`
523
523
  />
524
524
  </g>
525
525
  </svg>
526
- `;var Ft=(t=>(t.LOADED="shipaid-loaded",t.STATUS_UPDATE="shipaid-protection-status",t))(Ft||{}),Zt=Object.defineProperty,Gt=Object.getOwnPropertyDescriptor,Jt=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?Gt(e,i):e,n=t.length-1;n>=0;n--)(r=t[n])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&Zt(e,i,s),s};const Kt=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.")}},Qt=t=>console.warn(`[ShipAid] ${t}`),Yt=t=>console.error(`[ShipAid] ${t}`),Xt="shipaid-protection",te=Object.assign({"./lang/en.json":()=>Promise.resolve().then((()=>Ht)).then((t=>t.default)),"./lang/it.json":()=>Promise.resolve().then((()=>le)).then((t=>t.default))});var ee;ee={loader:async t=>{if("en"===t)return Wt;const e=Reflect.get(te,`./lang/${t}.json`);return e?await e():Wt}},ct=Object.assign(Object.assign({},ct),ee),t.ShipAidWidget=class extends nt{constructor(){var t,e,i;super(...arguments),this.disablePolling=!1,this.disableActions=!1,this.pollingInterval=2500,this.disableRefresh=!1,this.lang="en",this.currency=void 0,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=!0,this._hasProtectionInCart=!1,this.hasLoadedStrings=!1,this._state={loading:!1,success:null,error:!1},this._popup=null,this._fetch={get:t=>Kt(t),post:(t,e)=>Kt(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}}shouldUpdate(t){return this.hasLoadedStrings&&super.shouldUpdate(t)}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")?(Qt("Currently in preview mode."),!0):!!(null==(e=this._store)?void 0:e.planActive)}_currencyFormat(t){var e,i,o;return new Intl.NumberFormat(void 0,{currency:this.currency||(null==(e=this._store)?void 0:e.currency)||(null==(o=null==(i=window.Shopify)?void 0:i.currency)?void 0:o.active)||"USD",style:"currency"}).format(Number(t))}_dispatchEvent(t,e={}){this.dispatchEvent(new CustomEvent(t,{bubbles:!0,composed:!0,detail:e}))}async _handleRefresh(t){const e=Reflect.has(t,"items");if(this.shouldRefreshOnUpdate)return window.location.reload();e||await this.updateCart(),this._dispatchEvent(Ft.STATUS_UPDATE,{protection:this._hasProtectionInCart,cart:e?t:this._cart,lineItem:e?this._protectionCartItem:t})}async calculateProtectionTotal(t){var e,i,o,r,s,n;if(t||(t=await this._fetchCart()),!t)throw new Error("Could not fetch cart.");if(!this._store)throw new Error("Missing store settings.");const a=null==(e=this._store)?void 0:e.protectionSettings;if(!a||!this._protectionProduct)throw new Error("Tried to find protection variant, but protection settings for this store are missing.");const l=Array.isArray(null==(i=this._store)?void 0:i.excludedProductSkus)?null==(o=this._store)?void 0:o.excludedProductSkus.map((t=>t.trim())):[],d=((null==(r=t.items)?void 0:r.reduce(((t,e)=>{if(!e.sku)return t;return l.some((t=>t===e.sku.trim()))?t-e.final_line_price:t}),t.total_price))??t.total_price)-((null==(s=t.items)?void 0:s.filter((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))})))??[]).reduce(((t,e)=>t+e.final_line_price),0);if("FIXED"===a.protectionType){if("number"!=typeof a.defaultFee)throw new Error("Missing default fee amount.");if(!(null==(n=a.rules)?void 0:n.length))return a.defaultFee;const t=d/100,e=a.rules.sort(((t,e)=>t.rangeLower&&e.rangeLower?t.rangeLower-e.rangeLower:0)).find((e=>{const i=Boolean(e.rangeLower&&e.rangeLower<t);return e.rangeUpper?i&&e.rangeUpper>=t:i}));return"number"==typeof(null==e?void 0:e.fee)?e.fee:a.defaultFee}if("PERCENTAGE"===a.protectionType){const t=d*a.percentage/100;return t>=a.minimumFee?t:a.minimumFee}throw new Error("No protection type handler found for this store.")}_findProtectionVariant(t){var e,i,o,r;if(!(null==(e=this._store)?void 0:e.protectionSettings)||!(null==(o=null==(i=this._protectionProduct)?void 0:i.variants)?void 0:o.length))throw new Error("Missing product and variants from protection settings.");const s=null==(r=this._protectionProduct)?void 0:r.variants.flatMap((t=>{if(!t||!t.price)return[];const e=Number(t.price);return[{...t,formattedPrice:e}]})).sort(((t,e)=>t.formattedPrice-e.formattedPrice)),n=s.find((e=>e.formattedPrice>=t));return n||s[s.length-1]}_setState(t,e){this._state={loading:"loading"===t,success:"success"===t,error:"error"===t&&(e||!0)}}async _updateProtection(){return this._hasProtectionInCart?this.removeProtection():this.addProtection()}async _fetchShipAidData(){var t,e,i,o,r;const s=(null==(t=window.Shopify)?void 0:t.shop)??(null==(i=null==(e=window.Shopify)?void 0:e.Checkout)?void 0:i.apiHost);if(!s)throw new Error("No shop found in Shopify object.");try{const t=new URL(window.location.href);t.pathname=this._apiEndpoint;const e={query:"query StoreByDomain ($store: String!) {\n store: storeByDomain (input: {store: $store}) {\n currency\n planActive\n store\n widgetAutoOptIn\n widgetShowCart\n excludedProductSkus\n protectionSettings\n }\n}",variables:{store:s}},i=await this._fetch.post(t.toString(),e);if(!i)throw new Error("Missing response for store query.");if(null==(o=i.errors)?void 0:o.length)throw new Error(i.errors[0].message);if(!(null==(r=i.data)?void 0:r.store))throw new Error("Missing store from store query response.");return i.data.store}catch(n){throw console.error(n),new Error(`Could not find a store for ${this._storeDomain}`)}}async _fetchCart(){try{return await this._fetch.get("/cart.js")}catch(t){throw Yt(t.message),new Error("Could not fetch cart for current domain.")}}async _fetchProduct(){try{const{product:t}=await this._fetch.get("/products/shipaid-protection.json");return t}catch(t){throw Yt(t.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 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={quantity:1,id:this._protectionVariant.id},o=await this._fetch.post("/cart/add.js",i);await this._handleRefresh(o),this._setState("success")}catch(i){Yt(i.message),this._setState("error","Failed to add protection to cart - please try again, or contact us for help.")}}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={quantity:0,id:this._protectionCartItem.key},e=await this._fetch.post("/cart/change.js",t);await this._handleRefresh(e),this._cart=e,this._setState("success")}catch(t){Yt(t.message),this._setState("error","Failed to add protection to cart - please try again, or contact us for help.")}}learnMorePopupTemplate(){return W`
526
+ `;var Vt=(t=>(t.LOADED="shipaid-loaded",t.STATUS_UPDATE="shipaid-protection-status",t))(Vt||{}),Zt=Object.defineProperty,Gt=Object.getOwnPropertyDescriptor,Jt=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?Gt(e,i):e,n=t.length-1;n>=0;n--)(r=t[n])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&Zt(e,i,s),s};const Kt=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.")}},Qt=t=>console.warn(`[ShipAid] ${t}`),Yt=t=>console.error(`[ShipAid] ${t}`),Xt="shipaid-protection",te=Object.assign({"./lang/en.json":()=>Promise.resolve().then((()=>Ht)).then((t=>t.default)),"./lang/it.json":()=>Promise.resolve().then((()=>le)).then((t=>t.default)),"./lang/pt.json":()=>Promise.resolve().then((()=>me)).then((t=>t.default))});var ee;ee={loader:async t=>{if("en"===t)return Wt;const e=Reflect.get(te,`./lang/${t}.json`);return e?await e():Wt}},ht=Object.assign(Object.assign({},ht),ee),t.ShipAidWidget=class extends nt{constructor(){var t,e,i;super(...arguments),this.disablePolling=!1,this.disableActions=!1,this.pollingInterval=2500,this.disableRefresh=!1,this.lang="en",this.currency=void 0,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=!0,this._hasProtectionInCart=!1,this.hasLoadedStrings=!1,this._state={loading:!1,success:null,error:!1},this._popup=null,this._fetch={get:t=>Kt(t),post:(t,e)=>Kt(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}}shouldUpdate(t){return this.hasLoadedStrings&&super.shouldUpdate(t)}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")?(Qt("Currently in preview mode."),!0):!!(null==(e=this._store)?void 0:e.planActive)}_currencyFormat(t){var e,i,o;return new Intl.NumberFormat(void 0,{currency:this.currency||(null==(e=this._store)?void 0:e.currency)||(null==(o=null==(i=window.Shopify)?void 0:i.currency)?void 0:o.active)||"USD",style:"currency"}).format(Number(t))}_dispatchEvent(t,e={}){this.dispatchEvent(new CustomEvent(t,{bubbles:!0,composed:!0,detail:e}))}async _handleRefresh(t){const e=Reflect.has(t,"items");if(this.shouldRefreshOnUpdate)return window.location.reload();e||await this.updateCart(),this._dispatchEvent(Vt.STATUS_UPDATE,{protection:this._hasProtectionInCart,cart:e?t:this._cart,lineItem:e?this._protectionCartItem:t})}async calculateProtectionTotal(t){var e,i,o,r,s,n;if(t||(t=await this._fetchCart()),!t)throw new Error("Could not fetch cart.");if(!this._store)throw new Error("Missing store settings.");const a=null==(e=this._store)?void 0:e.protectionSettings;if(!a||!this._protectionProduct)throw new Error("Tried to find protection variant, but protection settings for this store are missing.");const l=Array.isArray(null==(i=this._store)?void 0:i.excludedProductSkus)?null==(o=this._store)?void 0:o.excludedProductSkus.map((t=>t.trim())):[],d=((null==(r=t.items)?void 0:r.reduce(((t,e)=>{if(!e.sku)return t;return l.some((t=>t===e.sku.trim()))?t-e.final_line_price:t}),t.total_price))??t.total_price)-((null==(s=t.items)?void 0:s.filter((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))})))??[]).reduce(((t,e)=>t+e.final_line_price),0);if("FIXED"===a.protectionType){if("number"!=typeof a.defaultFee)throw new Error("Missing default fee amount.");if(!(null==(n=a.rules)?void 0:n.length))return a.defaultFee;const t=d/100,e=a.rules.sort(((t,e)=>t.rangeLower&&e.rangeLower?t.rangeLower-e.rangeLower:0)).find((e=>{const i=Boolean(e.rangeLower&&e.rangeLower<t);return e.rangeUpper?i&&e.rangeUpper>=t:i}));return"number"==typeof(null==e?void 0:e.fee)?e.fee:a.defaultFee}if("PERCENTAGE"===a.protectionType){const t=d*a.percentage/100;return t>=a.minimumFee?t:a.minimumFee}throw new Error("No protection type handler found for this store.")}_findProtectionVariant(t){var e,i,o,r;if(!(null==(e=this._store)?void 0:e.protectionSettings)||!(null==(o=null==(i=this._protectionProduct)?void 0:i.variants)?void 0:o.length))throw new Error("Missing product and variants from protection settings.");const s=null==(r=this._protectionProduct)?void 0:r.variants.flatMap((t=>{if(!t||!t.price)return[];const e=Number(t.price);return[{...t,formattedPrice:e}]})).sort(((t,e)=>t.formattedPrice-e.formattedPrice)),n=s.find((e=>e.formattedPrice>=t));return n||s[s.length-1]}_setState(t,e){this._state={loading:"loading"===t,success:"success"===t,error:"error"===t&&(e||!0)}}async _updateProtection(){return this._hasProtectionInCart?this.removeProtection():this.addProtection()}async _fetchShipAidData(){var t,e,i,o,r;const s=(null==(t=window.Shopify)?void 0:t.shop)??(null==(i=null==(e=window.Shopify)?void 0:e.Checkout)?void 0:i.apiHost);if(!s)throw new Error("No shop found in Shopify object.");try{const t=new URL(window.location.href);t.pathname=this._apiEndpoint;const e={query:"query StoreByDomain ($store: String!) {\n store: storeByDomain (input: {store: $store}) {\n currency\n planActive\n store\n widgetAutoOptIn\n widgetShowCart\n excludedProductSkus\n protectionSettings\n }\n}",variables:{store:s}},i=await this._fetch.post(t.toString(),e);if(!i)throw new Error("Missing response for store query.");if(null==(o=i.errors)?void 0:o.length)throw new Error(i.errors[0].message);if(!(null==(r=i.data)?void 0:r.store))throw new Error("Missing store from store query response.");return i.data.store}catch(n){throw console.error(n),new Error(`Could not find a store for ${this._storeDomain}`)}}async _fetchCart(){try{return await this._fetch.get("/cart.js")}catch(t){throw Yt(t.message),new Error("Could not fetch cart for current domain.")}}async _fetchProduct(){try{const{product:t}=await this._fetch.get("/products/shipaid-protection.json");return t}catch(t){throw Yt(t.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 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={quantity:1,id:this._protectionVariant.id},o=await this._fetch.post("/cart/add.js",i);await this._handleRefresh(o),this._setState("success")}catch(i){Yt(i.message),this._setState("error","Failed to add protection to cart - please try again, or contact us for help.")}}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={quantity:0,id:this._protectionCartItem.key},e=await this._fetch.post("/cart/change.js",t);await this._handleRefresh(e),this._cart=e,this._setState("success")}catch(t){Yt(t.message),this._setState("error","Failed to add protection to cart - please try again, or contact us for help.")}}learnMorePopupTemplate(){return W`
527
527
  <shipaid-popup-learn-more ?active=${"learn-more"===this._popup} @close=${()=>{this._popup=null}}></shipaid-popup-learn-more>
528
528
  `}promptTemplate(){var t;return W`
529
529
  <div class="shipaid-prompt">
530
530
  <div class="prompt-product">
531
531
  <div class="prompt-product-image">
532
- ${Pt(this._hasProtectionInCart,(()=>qt),(()=>Bt))}
532
+ ${Pt(this._hasProtectionInCart,(()=>Dt),(()=>Bt))}
533
533
  </div>
534
534
  <div class="prompt-product-details">
535
535
  <p class="prompt-product-details-title">
@@ -561,7 +561,7 @@ function Pt(t,e,i){return t?e():null==i?void 0:i()}const zt=h`
561
561
  @click=${()=>{this._popup="learn-more"}}
562
562
  >
563
563
  <span>${At("footer.button")}</span>
564
- ${Vt}
564
+ ${Ft}
565
565
  </a>
566
566
  <button
567
567
  class="prompt-footer-about"
@@ -571,8 +571,8 @@ function Pt(t,e,i){return t?e():null==i?void 0:i()}const zt=h`
571
571
  </button>
572
572
  </div>
573
573
  </div>
574
- `}async connectedCallback(){super.connectedCallback(),await async function(t,e=ct){const i=await e.loader(t,e);e.translationCache={},ut(t,i,e)}(this.lang),this.hasLoadedStrings=!0}render(){return Et(this,(async()=>{var t,e;const i=document.createElement("link");i.setAttribute("href","https://fonts.googleapis.com/css2?family=Lato&display=swap"),i.setAttribute("rel","stylesheet"),document.head.appendChild(i);try{const[t,e,i]=await Promise.all([this._fetchShipAidData(),this._fetchCart(),this._fetchProduct()]);this._store=t,this._cart=e,this._protectionProduct=i}catch(o){return Yt(o.message),this._hasFinishedSetup=!0,void(this._shouldShowWidget=!1)}return this.planActive?(null==(e=null==(t=this._store)?void 0:t.protectionSettings)?void 0:e.protectionType)?this._protectionProduct?(this._hasFinishedSetup=!0,this._shouldShowWidget=!0,this._dispatchEvent(Ft.LOADED,this._store),setTimeout((async()=>{var t,e,i;(null==(t=this._store)?void 0:t.widgetAutoOptIn)&&(null==(e=this._cart)?void 0:e.item_count)&&(sessionStorage.getItem(Xt)||(sessionStorage.setItem(Xt,JSON.stringify({loaded:!0})),!this._hasProtectionInCart&&(null==(i=this._cart)?void 0:i.item_count)&&this._store.widgetShowCart&&await this.addProtection()))}),500),void(this.disablePolling||setInterval((async()=>{const t=this._cartLastUpdated;t&&(new Date).getTime()-t.getTime()<this.pollingInterval||await this.updateCart()}),this.pollingInterval))):(Qt("No protection settings product for this store - skipping setup."),this._hasFinishedSetup=!0,void(this._shouldShowWidget=!1)):(Qt("No protection settings for this store - skipping setup."),this._hasFinishedSetup=!0,void(this._shouldShowWidget=!1)):(Qt("No plan is active for this store - skipping setup."),this._hasFinishedSetup=!0,void(this._shouldShowWidget=!1))}),[]),Et(this,(async()=>{var t,e,i;if(this._cartLastUpdated=new Date,!(null==(t=this._cart)?void 0:t.items))return;const o=null==(e=this._cart.items)?void 0:e.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))})),r=null==(i=this._cart)?void 0:i.items[o];if(this._hasProtectionInCart=!!r,1===this._cart.item_count&&r){const t={id:r.key,quantity:0},e=await this._fetch.post("/cart/change.js",t);return await this._handleRefresh(e)}const s=await this.calculateProtectionTotal(this._cart),n=this._findProtectionVariant(s);if(this._protectionVariant=n,!(null==n?void 0:n.id))return this._shouldShowWidget=!1,void Yt("No matching protection variant found.");if(!r)return;if(n.id===r.id){if(this._protectionCartItem={...r,index:o,position:o+1},1===r.quantity)return;const t={id:r.key,quantity:1},e=await this._fetch.post("/cart/change.js",t);return await this._handleRefresh(e)}const a={updates:{[r.variant_id]:0,[n.id]:1}},l=await this._fetch.post("/cart/update.js",a);await this._handleRefresh(l)}),[this._store,this._cart]),ot(this.learnMorePopupTemplate(),document.body),W`
574
+ `}async connectedCallback(){super.connectedCallback(),await async function(t,e=ht){const i=await e.loader(t,e);e.translationCache={},ut(t,i,e)}(this.lang),this.hasLoadedStrings=!0}render(){return Et(this,(async()=>{var t,e;const i=document.createElement("link");i.setAttribute("href","https://fonts.googleapis.com/css2?family=Lato&display=swap"),i.setAttribute("rel","stylesheet"),document.head.appendChild(i);try{const[t,e,i]=await Promise.all([this._fetchShipAidData(),this._fetchCart(),this._fetchProduct()]);this._store=t,this._cart=e,this._protectionProduct=i}catch(o){return Yt(o.message),this._hasFinishedSetup=!0,void(this._shouldShowWidget=!1)}return this.planActive?(null==(e=null==(t=this._store)?void 0:t.protectionSettings)?void 0:e.protectionType)?this._protectionProduct?(this._hasFinishedSetup=!0,this._shouldShowWidget=!0,this._dispatchEvent(Vt.LOADED,this._store),setTimeout((async()=>{var t,e,i;(null==(t=this._store)?void 0:t.widgetAutoOptIn)&&(null==(e=this._cart)?void 0:e.item_count)&&(sessionStorage.getItem(Xt)||(sessionStorage.setItem(Xt,JSON.stringify({loaded:!0})),!this._hasProtectionInCart&&(null==(i=this._cart)?void 0:i.item_count)&&this._store.widgetShowCart&&await this.addProtection()))}),500),void(this.disablePolling||setInterval((async()=>{const t=this._cartLastUpdated;t&&(new Date).getTime()-t.getTime()<this.pollingInterval||await this.updateCart()}),this.pollingInterval))):(Qt("No protection settings product for this store - skipping setup."),this._hasFinishedSetup=!0,void(this._shouldShowWidget=!1)):(Qt("No protection settings for this store - skipping setup."),this._hasFinishedSetup=!0,void(this._shouldShowWidget=!1)):(Qt("No plan is active for this store - skipping setup."),this._hasFinishedSetup=!0,void(this._shouldShowWidget=!1))}),[]),Et(this,(async()=>{var t,e,i;if(this._cartLastUpdated=new Date,!(null==(t=this._cart)?void 0:t.items))return;const o=null==(e=this._cart.items)?void 0:e.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))})),r=null==(i=this._cart)?void 0:i.items[o];if(this._hasProtectionInCart=!!r,1===this._cart.item_count&&r){const t={id:r.key,quantity:0},e=await this._fetch.post("/cart/change.js",t);return await this._handleRefresh(e)}const s=await this.calculateProtectionTotal(this._cart),n=this._findProtectionVariant(s);if(this._protectionVariant=n,!(null==n?void 0:n.id))return this._shouldShowWidget=!1,void Yt("No matching protection variant found.");if(!r)return;if(n.id===r.id){if(this._protectionCartItem={...r,index:o,position:o+1},1===r.quantity)return;const t={id:r.key,quantity:1},e=await this._fetch.post("/cart/change.js",t);return await this._handleRefresh(e)}const a={updates:{[r.variant_id]:0,[n.id]:1}},l=await this._fetch.post("/cart/update.js",a);await this._handleRefresh(l)}),[this._store,this._cart]),ot(this.learnMorePopupTemplate(),document.body),W`
575
575
  <div class="shipaid">
576
- ${Pt(this._hasFinishedSetup,(()=>{var t;return Pt(this._shouldShowWidget&&this.planActive&&(null==(t=this._store)?void 0:t.widgetShowCart),(()=>this.promptTemplate()),(()=>D))}),(()=>W`<p><slot name="loading" default>${At("loading")}</slot></p>`))}
576
+ ${Pt(this._hasFinishedSetup,(()=>{var t;return Pt(this._shouldShowWidget&&this.planActive&&(null==(t=this._store)?void 0:t.widgetShowCart),(()=>this.promptTemplate()),(()=>q))}),(()=>W`<p><slot name="loading" default>${At("loading")}</slot></p>`))}
577
577
  </div>
578
- `}},t.ShipAidWidget.styles=Dt,Jt([o({type:Boolean,attribute:!0})],t.ShipAidWidget.prototype,"disablePolling",2),Jt([o({type:Boolean,attribute:!0})],t.ShipAidWidget.prototype,"disableActions",2),Jt([o({type:Number,attribute:!0})],t.ShipAidWidget.prototype,"pollingInterval",2),Jt([o({type:Boolean,attribute:!0})],t.ShipAidWidget.prototype,"disableRefresh",2),Jt([o({type:String,attribute:!0})],t.ShipAidWidget.prototype,"lang",2),Jt([o({type:String,attribute:!0})],t.ShipAidWidget.prototype,"currency",2),Jt([r()],t.ShipAidWidget.prototype,"_storeDomain",2),Jt([r()],t.ShipAidWidget.prototype,"_store",2),Jt([r()],t.ShipAidWidget.prototype,"_cart",2),Jt([r()],t.ShipAidWidget.prototype,"_protectionProduct",2),Jt([r()],t.ShipAidWidget.prototype,"_cartLastUpdated",2),Jt([r()],t.ShipAidWidget.prototype,"_hasFinishedSetup",2),Jt([r()],t.ShipAidWidget.prototype,"_shouldShowWidget",2),Jt([r()],t.ShipAidWidget.prototype,"_hasProtectionInCart",2),Jt([r()],t.ShipAidWidget.prototype,"_protectionCartItem",2),Jt([r()],t.ShipAidWidget.prototype,"_protectionVariant",2),Jt([r()],t.ShipAidWidget.prototype,"hasLoadedStrings",2),Jt([r()],t.ShipAidWidget.prototype,"_state",2),Jt([r()],t.ShipAidWidget.prototype,"_popup",2),t.ShipAidWidget=Jt([e("shipaid-widget")],t.ShipAidWidget);const ie="Caricamento del widget ShipAid...",oe="Garanzia di consegna",re="in caso di Perdita, Danno o Furto",se={button:"Offerto da"},ne={add:"Aggiungere",remove:"Rimuovere",loading:"Caricamento ..."},ae={loading:ie,title:oe,description:re,footer:se,actions:ne,"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:{title:"Acquista senza preoccupazioni",subtitle:"I marchi e i corrieri non possono sempre garantire che il tuo ordine arrivi a casa tua in sicurezza. Le cose accadono! Aiutiamo il marchio da cui stai acquistando a sostituire il prodotto che hai ordinato in caso di problemi durante il trasporto. Se riscontri un problema, contatta semplicemente il marchio e lo risolveranno il prima possibile.",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"}}},le=Object.freeze(Object.defineProperty({__proto__:null,actions:ne,default:ae,description:re,footer:se,loading:ie,title:oe},Symbol.toStringTag,{value:"Module"}));return Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t}({});
578
+ `}},t.ShipAidWidget.styles=qt,Jt([o({type:Boolean,attribute:!0})],t.ShipAidWidget.prototype,"disablePolling",2),Jt([o({type:Boolean,attribute:!0})],t.ShipAidWidget.prototype,"disableActions",2),Jt([o({type:Number,attribute:!0})],t.ShipAidWidget.prototype,"pollingInterval",2),Jt([o({type:Boolean,attribute:!0})],t.ShipAidWidget.prototype,"disableRefresh",2),Jt([o({type:String,attribute:!0})],t.ShipAidWidget.prototype,"lang",2),Jt([o({type:String,attribute:!0})],t.ShipAidWidget.prototype,"currency",2),Jt([r()],t.ShipAidWidget.prototype,"_storeDomain",2),Jt([r()],t.ShipAidWidget.prototype,"_store",2),Jt([r()],t.ShipAidWidget.prototype,"_cart",2),Jt([r()],t.ShipAidWidget.prototype,"_protectionProduct",2),Jt([r()],t.ShipAidWidget.prototype,"_cartLastUpdated",2),Jt([r()],t.ShipAidWidget.prototype,"_hasFinishedSetup",2),Jt([r()],t.ShipAidWidget.prototype,"_shouldShowWidget",2),Jt([r()],t.ShipAidWidget.prototype,"_hasProtectionInCart",2),Jt([r()],t.ShipAidWidget.prototype,"_protectionCartItem",2),Jt([r()],t.ShipAidWidget.prototype,"_protectionVariant",2),Jt([r()],t.ShipAidWidget.prototype,"hasLoadedStrings",2),Jt([r()],t.ShipAidWidget.prototype,"_state",2),Jt([r()],t.ShipAidWidget.prototype,"_popup",2),t.ShipAidWidget=Jt([e("shipaid-widget")],t.ShipAidWidget);const ie="Caricamento del widget ShipAid...",oe="Garanzia di consegna",re="in caso di Perdita, Danno o Furto",se={button:"Offerto da"},ne={add:"Aggiungere",remove:"Rimuovere",loading:"Caricamento ..."},ae={loading:ie,title:oe,description:re,footer:se,actions:ne,"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:{title:"Acquista senza preoccupazioni",subtitle:"I marchi e i corrieri non possono sempre garantire che il tuo ordine arrivi a casa tua in sicurezza. Le cose accadono! Aiutiamo il marchio da cui stai acquistando a sostituire il prodotto che hai ordinato in caso di problemi durante il trasporto. Se riscontri un problema, contatta semplicemente il marchio e lo risolveranno il prima possibile.",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"}}},le=Object.freeze(Object.defineProperty({__proto__:null,actions:ne,default:ae,description:re,footer:se,loading:ie,title:oe},Symbol.toStringTag,{value:"Module"})),de="Carregando o widget ShipAid...",pe="Garantia de entrega",ce="em caso de Perda, Danos ou Roubo",he={button:"Distribuído por"},ue={add:"Adicionar",remove:"Remover",loading:"Carregando..."},fe={loading:de,title:pe,description:ce,footer:he,actions:ue,"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:{title:"Compre sem preocupações",subtitle:"Marcas e transportadoras nem sempre podem garantir que seu pedido chegue à sua porta com segurança. Acidentes acontecem! Ajudamos a marca da qual você está comprando a substituir o produto que você encomendou em caso de um problema no transporte. Se você encontrar um problema, basta entrar em contato com a marca e eles o resolverão o mais rápido possível.",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"}}},me=Object.freeze(Object.defineProperty({__proto__:null,actions:ue,default:fe,description:ce,footer:he,loading:de,title:pe},Symbol.toStringTag,{value:"Module"}));return Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t}({});
@@ -24,50 +24,50 @@
24
24
  * Copyright 2019 Google LLC
25
25
  * SPDX-License-Identifier: BSD-3-Clause
26
26
  */
27
- const n=window,a=n.ShadowRoot&&(void 0===n.ShadyCSS||n.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,l=Symbol(),d=new WeakMap;let p=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==l)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(a&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=d.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&d.set(e,t))}return t}toString(){return this.cssText}};const h=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[o+1]),t[0]);return new p(i,t,l)},c=a?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new p("string"==typeof t?t:t+"",void 0,l))(e)})(t):t
27
+ const n=window,a=n.ShadowRoot&&(void 0===n.ShadyCSS||n.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,l=Symbol(),d=new WeakMap;let p=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==l)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(a&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=d.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&d.set(e,t))}return t}toString(){return this.cssText}};const c=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[o+1]),t[0]);return new p(i,t,l)},h=a?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new p("string"==typeof t?t:t+"",void 0,l))(e)})(t):t
28
28
  /**
29
29
  * @license
30
30
  * Copyright 2017 Google LLC
31
31
  * SPDX-License-Identifier: BSD-3-Clause
32
- */;var u;const f=window,g=f.trustedTypes,v=g?g.emptyScript:"",m=f.reactiveElementPolyfillSupport,_={toAttribute(t,e){switch(e){case Boolean:t=t?v:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(o){i=null}}return i}},y=(t,e)=>e!==t&&(e==e||t==t),C={attribute:!0,type:String,converter:_,reflect:!1,hasChanged:y};let $=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var e;this.finalize(),(null!==(e=this.h)&&void 0!==e?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,i)=>{const o=this._$Ep(i,e);void 0!==o&&(this._$Ev.set(o,i),t.push(o))})),t}static createProperty(t,e=C){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i="symbol"==typeof t?Symbol():"__"+t,o=this.getPropertyDescriptor(t,i,e);void 0!==o&&Object.defineProperty(this.prototype,t,o)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(o){const r=this[t];this[e]=o,this.requestUpdate(t,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||C}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),void 0!==t.h&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const i of e)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(c(t))}else void 0!==t&&e.push(c(t));return e}static _$Ep(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,i;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(i=t.hostConnected)||void 0===i||i.call(t))}removeController(t){var e;null===(e=this._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{a?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const i=document.createElement("style"),o=n.litNonce;void 0!==o&&i.setAttribute("nonce",o),i.textContent=e.cssText,t.appendChild(i)}))})(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e,i=C){var o;const r=this.constructor._$Ep(t,i);if(void 0!==r&&!0===i.reflect){const s=(void 0!==(null===(o=i.converter)||void 0===o?void 0:o.toAttribute)?i.converter:_).toAttribute(e,i.type);this._$El=t,null==s?this.removeAttribute(r):this.setAttribute(r,s),this._$El=null}}_$AK(t,e){var i;const o=this.constructor,r=o._$Ev.get(t);if(void 0!==r&&this._$El!==r){const t=o.getPropertyOptions(r),s="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(i=t.converter)||void 0===i?void 0:i.fromAttribute)?t.converter:_;this._$El=r,this[r]=s.fromAttribute(e,t.type),this._$El=null}}requestUpdate(t,e,i){let o=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||y)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,i))):o=!1),!this.isUpdatePending&&o&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,e)=>this[e]=t)),this._$Ei=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(i)):this._$Ek()}catch(o){throw e=!1,this._$Ek(),o}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null===(e=this._$ES)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$EO(e,this[e],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}};
32
+ */;var u;const f=window,m=f.trustedTypes,g=m?m.emptyScript:"",v=f.reactiveElementPolyfillSupport,_={toAttribute(t,e){switch(e){case Boolean:t=t?g:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(o){i=null}}return i}},y=(t,e)=>e!==t&&(e==e||t==t),C={attribute:!0,type:String,converter:_,reflect:!1,hasChanged:y};let b=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var e;this.finalize(),(null!==(e=this.h)&&void 0!==e?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,i)=>{const o=this._$Ep(i,e);void 0!==o&&(this._$Ev.set(o,i),t.push(o))})),t}static createProperty(t,e=C){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i="symbol"==typeof t?Symbol():"__"+t,o=this.getPropertyDescriptor(t,i,e);void 0!==o&&Object.defineProperty(this.prototype,t,o)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(o){const r=this[t];this[e]=o,this.requestUpdate(t,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||C}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),void 0!==t.h&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const i of e)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(h(t))}else void 0!==t&&e.push(h(t));return e}static _$Ep(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,i;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(i=t.hostConnected)||void 0===i||i.call(t))}removeController(t){var e;null===(e=this._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{a?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const i=document.createElement("style"),o=n.litNonce;void 0!==o&&i.setAttribute("nonce",o),i.textContent=e.cssText,t.appendChild(i)}))})(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e,i=C){var o;const r=this.constructor._$Ep(t,i);if(void 0!==r&&!0===i.reflect){const s=(void 0!==(null===(o=i.converter)||void 0===o?void 0:o.toAttribute)?i.converter:_).toAttribute(e,i.type);this._$El=t,null==s?this.removeAttribute(r):this.setAttribute(r,s),this._$El=null}}_$AK(t,e){var i;const o=this.constructor,r=o._$Ev.get(t);if(void 0!==r&&this._$El!==r){const t=o.getPropertyOptions(r),s="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(i=t.converter)||void 0===i?void 0:i.fromAttribute)?t.converter:_;this._$El=r,this[r]=s.fromAttribute(e,t.type),this._$El=null}}requestUpdate(t,e,i){let o=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||y)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,i))):o=!1),!this.isUpdatePending&&o&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,e)=>this[e]=t)),this._$Ei=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(i)):this._$Ek()}catch(o){throw e=!1,this._$Ek(),o}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null===(e=this._$ES)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$EO(e,this[e],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}};
33
33
  /**
34
34
  * @license
35
35
  * Copyright 2017 Google LLC
36
36
  * SPDX-License-Identifier: BSD-3-Clause
37
37
  */
38
- var b;$.finalized=!0,$.elementProperties=new Map,$.elementStyles=[],$.shadowRootOptions={mode:"open"},null==m||m({ReactiveElement:$}),(null!==(u=f.reactiveElementVersions)&&void 0!==u?u:f.reactiveElementVersions=[]).push("1.6.1");const w=window,A=w.trustedTypes,L=A?A.createPolicy("lit-html",{createHTML:t=>t}):void 0,S=`lit$${(Math.random()+"").slice(9)}$`,x="?"+S,E=`<${x}>`,P=document,z=(t="")=>P.createComment(t),k=t=>null===t||"object"!=typeof t&&"function"!=typeof t,T=Array.isArray,M=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,O=/-->/g,U=/>/g,N=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),j=/'/g,R=/"/g,I=/^(?:script|style|textarea|title)$/i,W=(V=1,(t,...e)=>({_$litType$:V,strings:t,values:e})),H=Symbol.for("lit-noChange"),D=Symbol.for("lit-nothing"),q=new WeakMap,B=P.createTreeWalker(P,129,null,!1);var V;class F{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let r=0,s=0;const n=t.length-1,a=this.parts,[l,d]=((t,e)=>{const i=t.length-1,o=[];let r,s=2===e?"<svg>":"",n=M;for(let l=0;l<i;l++){const e=t[l];let i,a,d=-1,p=0;for(;p<e.length&&(n.lastIndex=p,a=n.exec(e),null!==a);)p=n.lastIndex,n===M?"!--"===a[1]?n=O:void 0!==a[1]?n=U:void 0!==a[2]?(I.test(a[2])&&(r=RegExp("</"+a[2],"g")),n=N):void 0!==a[3]&&(n=N):n===N?">"===a[0]?(n=null!=r?r:M,d=-1):void 0===a[1]?d=-2:(d=n.lastIndex-a[2].length,i=a[1],n=void 0===a[3]?N:'"'===a[3]?R:j):n===R||n===j?n=N:n===O||n===U?n=M:(n=N,r=void 0);const h=n===N&&t[l+1].startsWith("/>")?" ":"";s+=n===M?e+E:d>=0?(o.push(i),e.slice(0,d)+"$lit$"+e.slice(d)+S+h):e+S+(-2===d?(o.push(void 0),l):h)}const a=s+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==L?L.createHTML(a):a,o]})(t,e);if(this.el=F.createElement(l,i),B.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=B.nextNode())&&a.length<n;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const e of o.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(S)){const i=d[s++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+"$lit$").split(S),e=/([.?@])?(.*)/.exec(i);a.push({type:1,index:r,name:e[2],strings:t,ctor:"."===e[1]?Q:"?"===e[1]?X:"@"===e[1]?tt:K})}else a.push({type:6,index:r})}for(const e of t)o.removeAttribute(e)}if(I.test(o.tagName)){const t=o.textContent.split(S),e=t.length-1;if(e>0){o.textContent=A?A.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],z()),B.nextNode(),a.push({type:2,index:++r});o.append(t[e],z())}}}else if(8===o.nodeType)if(o.data===x)a.push({type:2,index:r});else{let t=-1;for(;-1!==(t=o.data.indexOf(S,t+1));)a.push({type:7,index:r}),t+=S.length-1}r++}}static createElement(t,e){const i=P.createElement("template");return i.innerHTML=t,i}}function Z(t,e,i=t,o){var r,s,n,a;if(e===H)return e;let l=void 0!==o?null===(r=i._$Co)||void 0===r?void 0:r[o]:i._$Cl;const d=k(e)?void 0:e._$litDirective$;return(null==l?void 0:l.constructor)!==d&&(null===(s=null==l?void 0:l._$AO)||void 0===s||s.call(l,!1),void 0===d?l=void 0:(l=new d(t),l._$AT(t,i,o)),void 0!==o?(null!==(n=(a=i)._$Co)&&void 0!==n?n:a._$Co=[])[o]=l:i._$Cl=l),void 0!==l&&(e=Z(t,l._$AS(t,e.values),l,o)),e}class G{constructor(t,e){this.u=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(t){var e;const{el:{content:i},parts:o}=this._$AD,r=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:P).importNode(i,!0);B.currentNode=r;let s=B.nextNode(),n=0,a=0,l=o[0];for(;void 0!==l;){if(n===l.index){let e;2===l.type?e=new J(s,s.nextSibling,this,t):1===l.type?e=new l.ctor(s,l.name,l.strings,this,t):6===l.type&&(e=new et(s,this,t)),this.u.push(e),l=o[++a]}n!==(null==l?void 0:l.index)&&(s=B.nextNode(),n++)}return r}p(t){let e=0;for(const i of this.u)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class J{constructor(t,e,i,o){var r;this.type=2,this._$AH=D,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cm=null===(r=null==o?void 0:o.isConnected)||void 0===r||r}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cm}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Z(this,t,e),k(t)?t===D||null==t||""===t?(this._$AH!==D&&this._$AR(),this._$AH=D):t!==this._$AH&&t!==H&&this.g(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>T(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.k(t):this.g(t)}O(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}g(t){this._$AH!==D&&k(this._$AH)?this._$AA.nextSibling.data=t:this.T(P.createTextNode(t)),this._$AH=t}$(t){var e;const{values:i,_$litType$:o}=t,r="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=F.createElement(o.h,this.options)),o);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===r)this._$AH.p(i);else{const t=new G(r,this),e=t.v(this.options);t.p(i),this.T(e),this._$AH=t}}_$AC(t){let e=q.get(t.strings);return void 0===e&&q.set(t.strings,e=new F(t)),e}k(t){T(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const r of t)o===e.length?e.push(i=new J(this.O(z()),this.O(z()),this,this.options)):i=e[o],i._$AI(r),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cm=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class K{constructor(t,e,i,o,r){this.type=1,this._$AH=D,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=r,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=D}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){const r=this.strings;let s=!1;if(void 0===r)t=Z(this,t,e,0),s=!k(t)||t!==this._$AH&&t!==H,s&&(this._$AH=t);else{const o=t;let n,a;for(t=r[0],n=0;n<r.length-1;n++)a=Z(this,o[i+n],e,n),a===H&&(a=this._$AH[n]),s||(s=!k(a)||a!==this._$AH[n]),a===D?t=D:t!==D&&(t+=(null!=a?a:"")+r[n+1]),this._$AH[n]=a}s&&!o&&this.j(t)}j(t){t===D?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class Q extends K{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===D?void 0:t}}const Y=A?A.emptyScript:"";class X extends K{constructor(){super(...arguments),this.type=4}j(t){t&&t!==D?this.element.setAttribute(this.name,Y):this.element.removeAttribute(this.name)}}class tt extends K{constructor(t,e,i,o,r){super(t,e,i,o,r),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=Z(this,t,e,0))&&void 0!==i?i:D)===H)return;const o=this._$AH,r=t===D&&o!==D||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,s=t!==D&&(o===D||r);r&&this.element.removeEventListener(this.name,this,o),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class et{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){Z(this,t)}}const it=w.litHtmlPolyfillSupport;null==it||it(F,J),(null!==(b=w.litHtmlVersions)&&void 0!==b?b:w.litHtmlVersions=[]).push("2.6.1");const ot=(t,e,i)=>{var o,r;const s=null!==(o=null==i?void 0:i.renderBefore)&&void 0!==o?o:e;let n=s._$litPart$;if(void 0===n){const t=null!==(r=null==i?void 0:i.renderBefore)&&void 0!==r?r:null;s._$litPart$=n=new J(e.insertBefore(z(),t),t,void 0,null!=i?i:{})}return n._$AI(t),n};
38
+ var $;b.finalized=!0,b.elementProperties=new Map,b.elementStyles=[],b.shadowRootOptions={mode:"open"},null==v||v({ReactiveElement:b}),(null!==(u=f.reactiveElementVersions)&&void 0!==u?u:f.reactiveElementVersions=[]).push("1.6.1");const w=window,A=w.trustedTypes,L=A?A.createPolicy("lit-html",{createHTML:t=>t}):void 0,S=`lit$${(Math.random()+"").slice(9)}$`,x="?"+S,E=`<${x}>`,P=document,z=(t="")=>P.createComment(t),T=t=>null===t||"object"!=typeof t&&"function"!=typeof t,k=Array.isArray,M=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,O=/-->/g,U=/>/g,N=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),j=/'/g,R=/"/g,I=/^(?:script|style|textarea|title)$/i,W=(F=1,(t,...e)=>({_$litType$:F,strings:t,values:e})),H=Symbol.for("lit-noChange"),q=Symbol.for("lit-nothing"),D=new WeakMap,B=P.createTreeWalker(P,129,null,!1);var F;class V{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let r=0,s=0;const n=t.length-1,a=this.parts,[l,d]=((t,e)=>{const i=t.length-1,o=[];let r,s=2===e?"<svg>":"",n=M;for(let l=0;l<i;l++){const e=t[l];let i,a,d=-1,p=0;for(;p<e.length&&(n.lastIndex=p,a=n.exec(e),null!==a);)p=n.lastIndex,n===M?"!--"===a[1]?n=O:void 0!==a[1]?n=U:void 0!==a[2]?(I.test(a[2])&&(r=RegExp("</"+a[2],"g")),n=N):void 0!==a[3]&&(n=N):n===N?">"===a[0]?(n=null!=r?r:M,d=-1):void 0===a[1]?d=-2:(d=n.lastIndex-a[2].length,i=a[1],n=void 0===a[3]?N:'"'===a[3]?R:j):n===R||n===j?n=N:n===O||n===U?n=M:(n=N,r=void 0);const c=n===N&&t[l+1].startsWith("/>")?" ":"";s+=n===M?e+E:d>=0?(o.push(i),e.slice(0,d)+"$lit$"+e.slice(d)+S+c):e+S+(-2===d?(o.push(void 0),l):c)}const a=s+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==L?L.createHTML(a):a,o]})(t,e);if(this.el=V.createElement(l,i),B.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=B.nextNode())&&a.length<n;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const e of o.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(S)){const i=d[s++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+"$lit$").split(S),e=/([.?@])?(.*)/.exec(i);a.push({type:1,index:r,name:e[2],strings:t,ctor:"."===e[1]?Q:"?"===e[1]?X:"@"===e[1]?tt:K})}else a.push({type:6,index:r})}for(const e of t)o.removeAttribute(e)}if(I.test(o.tagName)){const t=o.textContent.split(S),e=t.length-1;if(e>0){o.textContent=A?A.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],z()),B.nextNode(),a.push({type:2,index:++r});o.append(t[e],z())}}}else if(8===o.nodeType)if(o.data===x)a.push({type:2,index:r});else{let t=-1;for(;-1!==(t=o.data.indexOf(S,t+1));)a.push({type:7,index:r}),t+=S.length-1}r++}}static createElement(t,e){const i=P.createElement("template");return i.innerHTML=t,i}}function Z(t,e,i=t,o){var r,s,n,a;if(e===H)return e;let l=void 0!==o?null===(r=i._$Co)||void 0===r?void 0:r[o]:i._$Cl;const d=T(e)?void 0:e._$litDirective$;return(null==l?void 0:l.constructor)!==d&&(null===(s=null==l?void 0:l._$AO)||void 0===s||s.call(l,!1),void 0===d?l=void 0:(l=new d(t),l._$AT(t,i,o)),void 0!==o?(null!==(n=(a=i)._$Co)&&void 0!==n?n:a._$Co=[])[o]=l:i._$Cl=l),void 0!==l&&(e=Z(t,l._$AS(t,e.values),l,o)),e}class G{constructor(t,e){this.u=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(t){var e;const{el:{content:i},parts:o}=this._$AD,r=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:P).importNode(i,!0);B.currentNode=r;let s=B.nextNode(),n=0,a=0,l=o[0];for(;void 0!==l;){if(n===l.index){let e;2===l.type?e=new J(s,s.nextSibling,this,t):1===l.type?e=new l.ctor(s,l.name,l.strings,this,t):6===l.type&&(e=new et(s,this,t)),this.u.push(e),l=o[++a]}n!==(null==l?void 0:l.index)&&(s=B.nextNode(),n++)}return r}p(t){let e=0;for(const i of this.u)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class J{constructor(t,e,i,o){var r;this.type=2,this._$AH=q,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cm=null===(r=null==o?void 0:o.isConnected)||void 0===r||r}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cm}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Z(this,t,e),T(t)?t===q||null==t||""===t?(this._$AH!==q&&this._$AR(),this._$AH=q):t!==this._$AH&&t!==H&&this.g(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>k(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.k(t):this.g(t)}O(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}g(t){this._$AH!==q&&T(this._$AH)?this._$AA.nextSibling.data=t:this.T(P.createTextNode(t)),this._$AH=t}$(t){var e;const{values:i,_$litType$:o}=t,r="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=V.createElement(o.h,this.options)),o);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===r)this._$AH.p(i);else{const t=new G(r,this),e=t.v(this.options);t.p(i),this.T(e),this._$AH=t}}_$AC(t){let e=D.get(t.strings);return void 0===e&&D.set(t.strings,e=new V(t)),e}k(t){k(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const r of t)o===e.length?e.push(i=new J(this.O(z()),this.O(z()),this,this.options)):i=e[o],i._$AI(r),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cm=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class K{constructor(t,e,i,o,r){this.type=1,this._$AH=q,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=r,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=q}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){const r=this.strings;let s=!1;if(void 0===r)t=Z(this,t,e,0),s=!T(t)||t!==this._$AH&&t!==H,s&&(this._$AH=t);else{const o=t;let n,a;for(t=r[0],n=0;n<r.length-1;n++)a=Z(this,o[i+n],e,n),a===H&&(a=this._$AH[n]),s||(s=!T(a)||a!==this._$AH[n]),a===q?t=q:t!==q&&(t+=(null!=a?a:"")+r[n+1]),this._$AH[n]=a}s&&!o&&this.j(t)}j(t){t===q?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class Q extends K{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===q?void 0:t}}const Y=A?A.emptyScript:"";class X extends K{constructor(){super(...arguments),this.type=4}j(t){t&&t!==q?this.element.setAttribute(this.name,Y):this.element.removeAttribute(this.name)}}class tt extends K{constructor(t,e,i,o,r){super(t,e,i,o,r),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=Z(this,t,e,0))&&void 0!==i?i:q)===H)return;const o=this._$AH,r=t===q&&o!==q||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,s=t!==q&&(o===q||r);r&&this.element.removeEventListener(this.name,this,o),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class et{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){Z(this,t)}}const it=w.litHtmlPolyfillSupport;null==it||it(V,J),(null!==($=w.litHtmlVersions)&&void 0!==$?$:w.litHtmlVersions=[]).push("2.6.1");const ot=(t,e,i)=>{var o,r;const s=null!==(o=null==i?void 0:i.renderBefore)&&void 0!==o?o:e;let n=s._$litPart$;if(void 0===n){const t=null!==(r=null==i?void 0:i.renderBefore)&&void 0!==r?r:null;s._$litPart$=n=new J(e.insertBefore(z(),t),t,void 0,null!=i?i:{})}return n._$AI(t),n};
39
39
  /**
40
40
  * @license
41
41
  * Copyright 2017 Google LLC
42
42
  * SPDX-License-Identifier: BSD-3-Clause
43
- */var rt,st;let nt=class extends ${constructor(){super(...arguments),this.renderOptions={host:this},this._$Dt=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Dt=ot(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!1)}render(){return H}};nt.finalized=!0,nt._$litElement$=!0,null===(rt=globalThis.litElementHydrateSupport)||void 0===rt||rt.call(globalThis,{LitElement:nt});const at=globalThis.litElementPolyfillSupport;null==at||at({LitElement:nt}),(null!==(st=globalThis.litElementVersions)&&void 0!==st?st:globalThis.litElementVersions=[]).push("3.2.0");const lt="langChanged";function dt(t,e,i){return Object.entries(ht(e||{})).reduce(((t,[e,i])=>t.replace(new RegExp(`{{[  ]*${e}[  ]*}}`,"gm"),String(ht(i)))),t)}function pt(t,e){const i=t.split(".");let o=e.strings;for(;null!=o&&i.length>0;)o=o[i.shift()];return null!=o?o.toString():null}function ht(t){return"function"==typeof t?t():t}let ct={loader:()=>Promise.resolve({}),empty:t=>`[${t}]`,lookup:pt,interpolate:dt,translationCache:{}};function ut(t,e,i=ct){var o;o={previousStrings:i.strings,previousLang:i.lang,lang:i.lang=t,strings:i.strings=e},window.dispatchEvent(new CustomEvent(lt,{detail:o}))}
43
+ */var rt,st;let nt=class extends b{constructor(){super(...arguments),this.renderOptions={host:this},this._$Dt=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Dt=ot(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!1)}render(){return H}};nt.finalized=!0,nt._$litElement$=!0,null===(rt=globalThis.litElementHydrateSupport)||void 0===rt||rt.call(globalThis,{LitElement:nt});const at=globalThis.litElementPolyfillSupport;null==at||at({LitElement:nt}),(null!==(st=globalThis.litElementVersions)&&void 0!==st?st:globalThis.litElementVersions=[]).push("3.2.0");const lt="langChanged";function dt(t,e,i){return Object.entries(ct(e||{})).reduce(((t,[e,i])=>t.replace(new RegExp(`{{[  ]*${e}[  ]*}}`,"gm"),String(ct(i)))),t)}function pt(t,e){const i=t.split(".");let o=e.strings;for(;null!=o&&i.length>0;)o=o[i.shift()];return null!=o?o.toString():null}function ct(t){return"function"==typeof t?t():t}let ht={loader:()=>Promise.resolve({}),empty:t=>`[${t}]`,lookup:pt,interpolate:dt,translationCache:{}};function ut(t,e,i=ht){var o;o={previousStrings:i.strings,previousLang:i.lang,lang:i.lang=t,strings:i.strings=e},window.dispatchEvent(new CustomEvent(lt,{detail:o}))}
44
44
  /**
45
45
  * @license
46
46
  * Copyright 2017 Google LLC
47
47
  * SPDX-License-Identifier: BSD-3-Clause
48
48
  */
49
- const ft=2;class gt{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}
49
+ const ft=2;class mt{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}
50
50
  /**
51
51
  * @license
52
52
  * Copyright 2020 Google LLC
53
53
  * SPDX-License-Identifier: BSD-3-Clause
54
- */const vt=(t,e)=>{var i,o;const r=t._$AN;if(void 0===r)return!1;for(const s of r)null===(o=(i=s)._$AO)||void 0===o||o.call(i,e,!1),vt(s,e);return!0},mt=t=>{let e,i;do{if(void 0===(e=t._$AM))break;i=e._$AN,i.delete(t),t=e}while(0===(null==i?void 0:i.size))},_t=t=>{for(let e;e=t._$AM;t=e){let i=e._$AN;if(void 0===i)e._$AN=i=new Set;else if(i.has(t))break;i.add(t),$t(e)}};
54
+ */const gt=(t,e)=>{var i,o;const r=t._$AN;if(void 0===r)return!1;for(const s of r)null===(o=(i=s)._$AO)||void 0===o||o.call(i,e,!1),gt(s,e);return!0},vt=t=>{let e,i;do{if(void 0===(e=t._$AM))break;i=e._$AN,i.delete(t),t=e}while(0===(null==i?void 0:i.size))},_t=t=>{for(let e;e=t._$AM;t=e){let i=e._$AN;if(void 0===i)e._$AN=i=new Set;else if(i.has(t))break;i.add(t),bt(e)}};
55
55
  /**
56
56
  * @license
57
57
  * Copyright 2017 Google LLC
58
58
  * SPDX-License-Identifier: BSD-3-Clause
59
- */function yt(t){void 0!==this._$AN?(mt(this),this._$AM=t,_t(this)):this._$AM=t}function Ct(t,e=!1,i=0){const o=this._$AH,r=this._$AN;if(void 0!==r&&0!==r.size)if(e)if(Array.isArray(o))for(let s=i;s<o.length;s++)vt(o[s],!1),mt(o[s]);else null!=o&&(vt(o,!1),mt(o));else vt(this,t)}const $t=t=>{var e,i,o,r;t.type==ft&&(null!==(e=(o=t)._$AP)&&void 0!==e||(o._$AP=Ct),null!==(i=(r=t)._$AQ)&&void 0!==i||(r._$AQ=yt))};class bt extends gt{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,i){super._$AT(t,e,i),_t(this),this.isConnected=t._$AU}_$AO(t,e=!0){var i,o;t!==this.isConnected&&(this.isConnected=t,t?null===(i=this.reconnected)||void 0===i||i.call(this):null===(o=this.disconnected)||void 0===o||o.call(this)),e&&(vt(this,t),mt(this))}setValue(t){if(void 0===this._$Ct.strings)this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}}class wt extends bt{constructor(){super(...arguments),this.langChangedSubscription=null,this.getValue=()=>""}renderValue(t){return this.getValue=t,this.subscribe(),this.getValue()}langChanged(t){this.setValue(this.getValue(t))}subscribe(){null==this.langChangedSubscription&&(this.langChangedSubscription=function(t,e){const i=e=>t(e.detail);return window.addEventListener(lt,i,e),()=>window.removeEventListener(lt,i)}(this.langChanged.bind(this)))}unsubscribe(){null!=this.langChangedSubscription&&this.langChangedSubscription()}disconnected(){this.unsubscribe()}reconnected(){this.subscribe()}}const At=(t=>(...e)=>({_$litDirective$:t,values:e}))(class extends wt{render(t,e,i){return this.renderValue((()=>function(t,e,i=ct){let o=i.translationCache[t]||(i.translationCache[t]=i.lookup(t,i)||i.empty(t,i));return null!=(e=null!=e?ht(e):null)?i.interpolate(o,e,i):o}(t,e,i)))}});
59
+ */function yt(t){void 0!==this._$AN?(vt(this),this._$AM=t,_t(this)):this._$AM=t}function Ct(t,e=!1,i=0){const o=this._$AH,r=this._$AN;if(void 0!==r&&0!==r.size)if(e)if(Array.isArray(o))for(let s=i;s<o.length;s++)gt(o[s],!1),vt(o[s]);else null!=o&&(gt(o,!1),vt(o));else gt(this,t)}const bt=t=>{var e,i,o,r;t.type==ft&&(null!==(e=(o=t)._$AP)&&void 0!==e||(o._$AP=Ct),null!==(i=(r=t)._$AQ)&&void 0!==i||(r._$AQ=yt))};class $t extends mt{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,i){super._$AT(t,e,i),_t(this),this.isConnected=t._$AU}_$AO(t,e=!0){var i,o;t!==this.isConnected&&(this.isConnected=t,t?null===(i=this.reconnected)||void 0===i||i.call(this):null===(o=this.disconnected)||void 0===o||o.call(this)),e&&(gt(this,t),vt(this))}setValue(t){if(void 0===this._$Ct.strings)this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}}class wt extends $t{constructor(){super(...arguments),this.langChangedSubscription=null,this.getValue=()=>""}renderValue(t){return this.getValue=t,this.subscribe(),this.getValue()}langChanged(t){this.setValue(this.getValue(t))}subscribe(){null==this.langChangedSubscription&&(this.langChangedSubscription=function(t,e){const i=e=>t(e.detail);return window.addEventListener(lt,i,e),()=>window.removeEventListener(lt,i)}(this.langChanged.bind(this)))}unsubscribe(){null!=this.langChangedSubscription&&this.langChangedSubscription()}disconnected(){this.unsubscribe()}reconnected(){this.subscribe()}}const At=(t=>(...e)=>({_$litDirective$:t,values:e}))(class extends wt{render(t,e,i){return this.renderValue((()=>function(t,e,i=ht){let o=i.translationCache[t]||(i.translationCache[t]=i.lookup(t,i)||i.empty(t,i));return null!=(e=null!=e?ct(e):null)?i.interpolate(o,e,i):o}(t,e,i)))}});
60
60
  /**
61
61
  * @license
62
62
  * Copyright 2017 Google LLC
63
63
  * SPDX-License-Identifier: BSD-3-Clause
64
- */class Lt extends gt{constructor(t){if(super(t),this.it=D,t.type!==ft)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===D||null==t)return this._t=void 0,this.it=t;if(t===H)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}}Lt.directiveName="unsafeHTML",Lt.resultType=1;const St="__registered_effects";function xt(t){const e=t;if(e[St])return e;const i=function(t){if(!t.dispatchEvent||!t.requestUpdate)throw new Error("Element missing required functions (dispatchEvent/requestUpdate)");return t}(t),o=i.updated;return e[St]={index:0,count:0,effects:[]},i.updated=t=>(e[St].index=0,o(t)),e}function Et(t,e,i){const o=function(t,e){const i=xt(t),{index:o,count:r}=i[St];return o===r?(i[St].index++,i[St].count++,i[St].effects.push(e),e):(i[St].index++,i[St].effects[o])}(t,{on:e,observe:["__initial__dirty"]});o.observe.some(((t,e)=>i[e]!==t))&&o.on(),o.observe=i}
64
+ */class Lt extends mt{constructor(t){if(super(t),this.it=q,t.type!==ft)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===q||null==t)return this._t=void 0,this.it=t;if(t===H)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}}Lt.directiveName="unsafeHTML",Lt.resultType=1;const St="__registered_effects";function xt(t){const e=t;if(e[St])return e;const i=function(t){if(!t.dispatchEvent||!t.requestUpdate)throw new Error("Element missing required functions (dispatchEvent/requestUpdate)");return t}(t),o=i.updated;return e[St]={index:0,count:0,effects:[]},i.updated=t=>(e[St].index=0,o(t)),e}function Et(t,e,i){const o=function(t,e){const i=xt(t),{index:o,count:r}=i[St];return o===r?(i[St].index++,i[St].count++,i[St].effects.push(e),e):(i[St].index++,i[St].effects[o])}(t,{on:e,observe:["__initial__dirty"]});o.observe.some(((t,e)=>i[e]!==t))&&o.on(),o.observe=i}
65
65
  /**
66
66
  * @license
67
67
  * Copyright 2021 Google LLC
68
68
  * SPDX-License-Identifier: BSD-3-Clause
69
69
  */
70
- function Pt(t,e,i){return t?e():null==i?void 0:i()}const zt=h`
70
+ function Pt(t,e,i){return t?e():null==i?void 0:i()}const zt=c`
71
71
  :host {
72
72
  --shipaid-primary: #002bd6;
73
73
  --shipaid-secondary: #0076ff;
@@ -199,7 +199,7 @@ function Pt(t,e,i){return t?e():null==i?void 0:i()}const zt=h`
199
199
  font-size: var(--shipaid-font-sm);
200
200
  color: var(--shipaid-text);
201
201
  }
202
- `;var kt=Object.defineProperty,Tt=Object.getOwnPropertyDescriptor,Mt=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?Tt(e,i):e,n=t.length-1;n>=0;n--)(r=t[n])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&kt(e,i,s),s};let Ot=class extends nt{constructor(){super(...arguments),this.active=!1}handleClosePopup(){const t=new Event("close");this.dispatchEvent(t)}render(){return W`
202
+ `;var Tt=Object.defineProperty,kt=Object.getOwnPropertyDescriptor,Mt=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?kt(e,i):e,n=t.length-1;n>=0;n--)(r=t[n])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&Tt(e,i,s),s};let Ot=class extends nt{constructor(){super(...arguments),this.active=!1}handleClosePopup(){const t=new Event("close");this.dispatchEvent(t)}render(){return W`
203
203
  <div class=${`shipaid-popup ${this.active&&"active"}`}>
204
204
  <button
205
205
  type="button"
@@ -246,7 +246,7 @@ function Pt(t,e,i){return t?e():null==i?void 0:i()}const zt=h`
246
246
  </div>
247
247
  </div>
248
248
  </div>
249
- `}};Ot.styles=zt,Mt([o({type:Boolean,attribute:!0})],Ot.prototype,"active",2),Ot=Mt([e("shipaid-popup-learn-more")],Ot);const Ut="Loading ShipAid Widget...",Nt="Delivery Guarantee",jt="in case of Loss, Damage or Theft",Rt={button:"Powered by"},It={add:"Add",remove:"Remove",loading:"Loading..."},Wt={loading:Ut,title:Nt,description:jt,footer:Rt,actions:It,"learn-more-popup":{close:"Close",title:"Delivery Guarantee",subtitle:"We empower your favorite brands to offer a delivery guarantee because every order is precious!",disclaimer:{title:"Shop Worry-Free",subtitle:"Brands and shipment carriers cannot always guarantee your order will arrive at your doorstep safely. Things happen! We help the brand you are purchasing from replace the product you ordered in the chance of an issue in transit. If you encounter an issue, simply reach out to the brand and they will get it resolved as soon as possible.",text:"By purchasing this delivery guarantee, you agree to our Terms Of Service and Privacy Policy. You are not obligated to purchase this guarantee. This guarantee is NOT insurance and does not provide indemnification against loss, damage, or liability arising from a contingent or unknown event, but rather, through ShipAid brands provide a delivery guarantee whereby if the product you ordered is not delivered in satisfactory condition, the brand from which you ordered the product may replace the product free of charge. ShipAid does not provide any products or services directly to consumers, but instead provides a service that allow brands to facilitate product replacement to their customers. Purchasing this guarantee does not mean that you will automatically be reimbursed for any product or shipping costs because the resolution process and decision for compensation is strictly decided by the brand you a purchasing from. The brand will require proof of damage or undelivered product."},links:{terms:"Terms of Service",privacy:"Privacy Policy"}}},Ht=Object.freeze(Object.defineProperty({__proto__:null,actions:It,default:Wt,description:jt,footer:Rt,loading:Ut,title:Nt},Symbol.toStringTag,{value:"Module"})),Dt=h`
249
+ `}};Ot.styles=zt,Mt([o({type:Boolean,attribute:!0})],Ot.prototype,"active",2),Ot=Mt([e("shipaid-popup-learn-more")],Ot);const Ut="Loading ShipAid Widget...",Nt="Delivery Guarantee",jt="in case of Loss, Damage or Theft",Rt={button:"Powered by"},It={add:"Add",remove:"Remove",loading:"Loading..."},Wt={loading:Ut,title:Nt,description:jt,footer:Rt,actions:It,"learn-more-popup":{close:"Close",title:"Delivery Guarantee",subtitle:"We empower your favorite brands to offer a delivery guarantee because every order is precious!",disclaimer:{title:"Shop Worry-Free",subtitle:"Brands and shipment carriers cannot always guarantee your order will arrive at your doorstep safely. Things happen! We help the brand you are purchasing from replace the product you ordered in the chance of an issue in transit. If you encounter an issue, simply reach out to the brand and they will get it resolved as soon as possible.",text:"By purchasing this delivery guarantee, you agree to our Terms Of Service and Privacy Policy. You are not obligated to purchase this guarantee. This guarantee is NOT insurance and does not provide indemnification against loss, damage, or liability arising from a contingent or unknown event, but rather, through ShipAid brands provide a delivery guarantee whereby if the product you ordered is not delivered in satisfactory condition, the brand from which you ordered the product may replace the product free of charge. ShipAid does not provide any products or services directly to consumers, but instead provides a service that allow brands to facilitate product replacement to their customers. Purchasing this guarantee does not mean that you will automatically be reimbursed for any product or shipping costs because the resolution process and decision for compensation is strictly decided by the brand you a purchasing from. The brand will require proof of damage or undelivered product."},links:{terms:"Terms of Service",privacy:"Privacy Policy"}}},Ht=Object.freeze(Object.defineProperty({__proto__:null,actions:It,default:Wt,description:jt,footer:Rt,loading:Ut,title:Nt},Symbol.toStringTag,{value:"Module"})),qt=c`
250
250
  :host {
251
251
  --shipaid-primary: #002bd6;
252
252
  --shipaid-secondary: #0076ff;
@@ -392,7 +392,7 @@ function Pt(t,e,i){return t?e():null==i?void 0:i()}const zt=h`
392
392
  .shipaid-prompt .prompt-footer .prompt-footer-badge svg {
393
393
  height: 9px;
394
394
  }
395
- `,qt=W`
395
+ `,Dt=W`
396
396
  <svg viewBox="0 0 453 511" version="1.1" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
397
397
  <g transform="matrix(1,0,0,1,-29.4375,-0.984384)">
398
398
  <path d="M468.297,67.385L262.417,2C258.177,0.646 253.63,0.646 249.391,2L43.51,67.385C35.188,69.708 29.438,77.318 29.438,85.979C32.302,157.156 52.266,370.036 52.266,370.036C52.906,378.188 57.297,385.568 64.167,390.01L248.807,509.156C253.12,511.943 258.688,511.943 263.005,509.156L447.641,390.01C454.51,385.568 458.901,378.188 459.542,370.036C459.542,370.036 479.51,157.156 482.37,85.979C482.37,77.318 476.625,69.708 468.297,67.385" style="fill:rgb(47,52,61);fill-rule:nonzero;"/>
@@ -441,7 +441,7 @@ function Pt(t,e,i){return t?e():null==i?void 0:i()}const zt=h`
441
441
  />
442
442
  </g>
443
443
  </svg>
444
- `,Vt=W`
444
+ `,Ft=W`
445
445
  <svg
446
446
  viewBox="0 0 423 62"
447
447
  version="1.1"
@@ -523,13 +523,13 @@ function Pt(t,e,i){return t?e():null==i?void 0:i()}const zt=h`
523
523
  />
524
524
  </g>
525
525
  </svg>
526
- `;var Ft=(t=>(t.LOADED="shipaid-loaded",t.STATUS_UPDATE="shipaid-protection-status",t))(Ft||{}),Zt=Object.defineProperty,Gt=Object.getOwnPropertyDescriptor,Jt=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?Gt(e,i):e,n=t.length-1;n>=0;n--)(r=t[n])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&Zt(e,i,s),s};const Kt=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.")}},Qt=t=>console.warn(`[ShipAid] ${t}`),Yt=t=>console.error(`[ShipAid] ${t}`),Xt="shipaid-protection",te=Object.assign({"./lang/en.json":()=>Promise.resolve().then((()=>Ht)).then((t=>t.default)),"./lang/it.json":()=>Promise.resolve().then((()=>le)).then((t=>t.default))});var ee;ee={loader:async t=>{if("en"===t)return Wt;const e=Reflect.get(te,`./lang/${t}.json`);return e?await e():Wt}},ct=Object.assign(Object.assign({},ct),ee),t.ShipAidWidget=class extends nt{constructor(){var t,e,i;super(...arguments),this.disablePolling=!1,this.disableActions=!1,this.pollingInterval=2500,this.disableRefresh=!1,this.lang="en",this.currency=void 0,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=!0,this._hasProtectionInCart=!1,this.hasLoadedStrings=!1,this._state={loading:!1,success:null,error:!1},this._popup=null,this._fetch={get:t=>Kt(t),post:(t,e)=>Kt(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}}shouldUpdate(t){return this.hasLoadedStrings&&super.shouldUpdate(t)}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")?(Qt("Currently in preview mode."),!0):!!(null==(e=this._store)?void 0:e.planActive)}_currencyFormat(t){var e,i,o;return new Intl.NumberFormat(void 0,{currency:this.currency||(null==(e=this._store)?void 0:e.currency)||(null==(o=null==(i=window.Shopify)?void 0:i.currency)?void 0:o.active)||"USD",style:"currency"}).format(Number(t))}_dispatchEvent(t,e={}){this.dispatchEvent(new CustomEvent(t,{bubbles:!0,composed:!0,detail:e}))}async _handleRefresh(t){const e=Reflect.has(t,"items");if(this.shouldRefreshOnUpdate)return window.location.reload();e||await this.updateCart(),this._dispatchEvent(Ft.STATUS_UPDATE,{protection:this._hasProtectionInCart,cart:e?t:this._cart,lineItem:e?this._protectionCartItem:t})}async calculateProtectionTotal(t){var e,i,o,r,s,n;if(t||(t=await this._fetchCart()),!t)throw new Error("Could not fetch cart.");if(!this._store)throw new Error("Missing store settings.");const a=null==(e=this._store)?void 0:e.protectionSettings;if(!a||!this._protectionProduct)throw new Error("Tried to find protection variant, but protection settings for this store are missing.");const l=Array.isArray(null==(i=this._store)?void 0:i.excludedProductSkus)?null==(o=this._store)?void 0:o.excludedProductSkus.map((t=>t.trim())):[],d=((null==(r=t.items)?void 0:r.reduce(((t,e)=>{if(!e.sku)return t;return l.some((t=>t===e.sku.trim()))?t-e.final_line_price:t}),t.total_price))??t.total_price)-((null==(s=t.items)?void 0:s.filter((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))})))??[]).reduce(((t,e)=>t+e.final_line_price),0);if("FIXED"===a.protectionType){if("number"!=typeof a.defaultFee)throw new Error("Missing default fee amount.");if(!(null==(n=a.rules)?void 0:n.length))return a.defaultFee;const t=d/100,e=a.rules.sort(((t,e)=>t.rangeLower&&e.rangeLower?t.rangeLower-e.rangeLower:0)).find((e=>{const i=Boolean(e.rangeLower&&e.rangeLower<t);return e.rangeUpper?i&&e.rangeUpper>=t:i}));return"number"==typeof(null==e?void 0:e.fee)?e.fee:a.defaultFee}if("PERCENTAGE"===a.protectionType){const t=d*a.percentage/100;return t>=a.minimumFee?t:a.minimumFee}throw new Error("No protection type handler found for this store.")}_findProtectionVariant(t){var e,i,o,r;if(!(null==(e=this._store)?void 0:e.protectionSettings)||!(null==(o=null==(i=this._protectionProduct)?void 0:i.variants)?void 0:o.length))throw new Error("Missing product and variants from protection settings.");const s=null==(r=this._protectionProduct)?void 0:r.variants.flatMap((t=>{if(!t||!t.price)return[];const e=Number(t.price);return[{...t,formattedPrice:e}]})).sort(((t,e)=>t.formattedPrice-e.formattedPrice)),n=s.find((e=>e.formattedPrice>=t));return n||s[s.length-1]}_setState(t,e){this._state={loading:"loading"===t,success:"success"===t,error:"error"===t&&(e||!0)}}async _updateProtection(){return this._hasProtectionInCart?this.removeProtection():this.addProtection()}async _fetchShipAidData(){var t,e,i,o,r;const s=(null==(t=window.Shopify)?void 0:t.shop)??(null==(i=null==(e=window.Shopify)?void 0:e.Checkout)?void 0:i.apiHost);if(!s)throw new Error("No shop found in Shopify object.");try{const t=new URL(window.location.href);t.pathname=this._apiEndpoint;const e={query:"query StoreByDomain ($store: String!) {\n store: storeByDomain (input: {store: $store}) {\n currency\n planActive\n store\n widgetAutoOptIn\n widgetShowCart\n excludedProductSkus\n protectionSettings\n }\n}",variables:{store:s}},i=await this._fetch.post(t.toString(),e);if(!i)throw new Error("Missing response for store query.");if(null==(o=i.errors)?void 0:o.length)throw new Error(i.errors[0].message);if(!(null==(r=i.data)?void 0:r.store))throw new Error("Missing store from store query response.");return i.data.store}catch(n){throw console.error(n),new Error(`Could not find a store for ${this._storeDomain}`)}}async _fetchCart(){try{return await this._fetch.get("/cart.js")}catch(t){throw Yt(t.message),new Error("Could not fetch cart for current domain.")}}async _fetchProduct(){try{const{product:t}=await this._fetch.get("/products/shipaid-protection.json");return t}catch(t){throw Yt(t.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 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={quantity:1,id:this._protectionVariant.id},o=await this._fetch.post("/cart/add.js",i);await this._handleRefresh(o),this._setState("success")}catch(i){Yt(i.message),this._setState("error","Failed to add protection to cart - please try again, or contact us for help.")}}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={quantity:0,id:this._protectionCartItem.key},e=await this._fetch.post("/cart/change.js",t);await this._handleRefresh(e),this._cart=e,this._setState("success")}catch(t){Yt(t.message),this._setState("error","Failed to add protection to cart - please try again, or contact us for help.")}}learnMorePopupTemplate(){return W`
526
+ `;var Vt=(t=>(t.LOADED="shipaid-loaded",t.STATUS_UPDATE="shipaid-protection-status",t))(Vt||{}),Zt=Object.defineProperty,Gt=Object.getOwnPropertyDescriptor,Jt=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?Gt(e,i):e,n=t.length-1;n>=0;n--)(r=t[n])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&Zt(e,i,s),s};const Kt=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.")}},Qt=t=>console.warn(`[ShipAid] ${t}`),Yt=t=>console.error(`[ShipAid] ${t}`),Xt="shipaid-protection",te=Object.assign({"./lang/en.json":()=>Promise.resolve().then((()=>Ht)).then((t=>t.default)),"./lang/it.json":()=>Promise.resolve().then((()=>le)).then((t=>t.default)),"./lang/pt.json":()=>Promise.resolve().then((()=>me)).then((t=>t.default))});var ee;ee={loader:async t=>{if("en"===t)return Wt;const e=Reflect.get(te,`./lang/${t}.json`);return e?await e():Wt}},ht=Object.assign(Object.assign({},ht),ee),t.ShipAidWidget=class extends nt{constructor(){var t,e,i;super(...arguments),this.disablePolling=!1,this.disableActions=!1,this.pollingInterval=2500,this.disableRefresh=!1,this.lang="en",this.currency=void 0,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=!0,this._hasProtectionInCart=!1,this.hasLoadedStrings=!1,this._state={loading:!1,success:null,error:!1},this._popup=null,this._fetch={get:t=>Kt(t),post:(t,e)=>Kt(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}}shouldUpdate(t){return this.hasLoadedStrings&&super.shouldUpdate(t)}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")?(Qt("Currently in preview mode."),!0):!!(null==(e=this._store)?void 0:e.planActive)}_currencyFormat(t){var e,i,o;return new Intl.NumberFormat(void 0,{currency:this.currency||(null==(e=this._store)?void 0:e.currency)||(null==(o=null==(i=window.Shopify)?void 0:i.currency)?void 0:o.active)||"USD",style:"currency"}).format(Number(t))}_dispatchEvent(t,e={}){this.dispatchEvent(new CustomEvent(t,{bubbles:!0,composed:!0,detail:e}))}async _handleRefresh(t){const e=Reflect.has(t,"items");if(this.shouldRefreshOnUpdate)return window.location.reload();e||await this.updateCart(),this._dispatchEvent(Vt.STATUS_UPDATE,{protection:this._hasProtectionInCart,cart:e?t:this._cart,lineItem:e?this._protectionCartItem:t})}async calculateProtectionTotal(t){var e,i,o,r,s,n;if(t||(t=await this._fetchCart()),!t)throw new Error("Could not fetch cart.");if(!this._store)throw new Error("Missing store settings.");const a=null==(e=this._store)?void 0:e.protectionSettings;if(!a||!this._protectionProduct)throw new Error("Tried to find protection variant, but protection settings for this store are missing.");const l=Array.isArray(null==(i=this._store)?void 0:i.excludedProductSkus)?null==(o=this._store)?void 0:o.excludedProductSkus.map((t=>t.trim())):[],d=((null==(r=t.items)?void 0:r.reduce(((t,e)=>{if(!e.sku)return t;return l.some((t=>t===e.sku.trim()))?t-e.final_line_price:t}),t.total_price))??t.total_price)-((null==(s=t.items)?void 0:s.filter((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))})))??[]).reduce(((t,e)=>t+e.final_line_price),0);if("FIXED"===a.protectionType){if("number"!=typeof a.defaultFee)throw new Error("Missing default fee amount.");if(!(null==(n=a.rules)?void 0:n.length))return a.defaultFee;const t=d/100,e=a.rules.sort(((t,e)=>t.rangeLower&&e.rangeLower?t.rangeLower-e.rangeLower:0)).find((e=>{const i=Boolean(e.rangeLower&&e.rangeLower<t);return e.rangeUpper?i&&e.rangeUpper>=t:i}));return"number"==typeof(null==e?void 0:e.fee)?e.fee:a.defaultFee}if("PERCENTAGE"===a.protectionType){const t=d*a.percentage/100;return t>=a.minimumFee?t:a.minimumFee}throw new Error("No protection type handler found for this store.")}_findProtectionVariant(t){var e,i,o,r;if(!(null==(e=this._store)?void 0:e.protectionSettings)||!(null==(o=null==(i=this._protectionProduct)?void 0:i.variants)?void 0:o.length))throw new Error("Missing product and variants from protection settings.");const s=null==(r=this._protectionProduct)?void 0:r.variants.flatMap((t=>{if(!t||!t.price)return[];const e=Number(t.price);return[{...t,formattedPrice:e}]})).sort(((t,e)=>t.formattedPrice-e.formattedPrice)),n=s.find((e=>e.formattedPrice>=t));return n||s[s.length-1]}_setState(t,e){this._state={loading:"loading"===t,success:"success"===t,error:"error"===t&&(e||!0)}}async _updateProtection(){return this._hasProtectionInCart?this.removeProtection():this.addProtection()}async _fetchShipAidData(){var t,e,i,o,r;const s=(null==(t=window.Shopify)?void 0:t.shop)??(null==(i=null==(e=window.Shopify)?void 0:e.Checkout)?void 0:i.apiHost);if(!s)throw new Error("No shop found in Shopify object.");try{const t=new URL(window.location.href);t.pathname=this._apiEndpoint;const e={query:"query StoreByDomain ($store: String!) {\n store: storeByDomain (input: {store: $store}) {\n currency\n planActive\n store\n widgetAutoOptIn\n widgetShowCart\n excludedProductSkus\n protectionSettings\n }\n}",variables:{store:s}},i=await this._fetch.post(t.toString(),e);if(!i)throw new Error("Missing response for store query.");if(null==(o=i.errors)?void 0:o.length)throw new Error(i.errors[0].message);if(!(null==(r=i.data)?void 0:r.store))throw new Error("Missing store from store query response.");return i.data.store}catch(n){throw console.error(n),new Error(`Could not find a store for ${this._storeDomain}`)}}async _fetchCart(){try{return await this._fetch.get("/cart.js")}catch(t){throw Yt(t.message),new Error("Could not fetch cart for current domain.")}}async _fetchProduct(){try{const{product:t}=await this._fetch.get("/products/shipaid-protection.json");return t}catch(t){throw Yt(t.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 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={quantity:1,id:this._protectionVariant.id},o=await this._fetch.post("/cart/add.js",i);await this._handleRefresh(o),this._setState("success")}catch(i){Yt(i.message),this._setState("error","Failed to add protection to cart - please try again, or contact us for help.")}}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={quantity:0,id:this._protectionCartItem.key},e=await this._fetch.post("/cart/change.js",t);await this._handleRefresh(e),this._cart=e,this._setState("success")}catch(t){Yt(t.message),this._setState("error","Failed to add protection to cart - please try again, or contact us for help.")}}learnMorePopupTemplate(){return W`
527
527
  <shipaid-popup-learn-more ?active=${"learn-more"===this._popup} @close=${()=>{this._popup=null}}></shipaid-popup-learn-more>
528
528
  `}promptTemplate(){var t;return W`
529
529
  <div class="shipaid-prompt">
530
530
  <div class="prompt-product">
531
531
  <div class="prompt-product-image">
532
- ${Pt(this._hasProtectionInCart,(()=>qt),(()=>Bt))}
532
+ ${Pt(this._hasProtectionInCart,(()=>Dt),(()=>Bt))}
533
533
  </div>
534
534
  <div class="prompt-product-details">
535
535
  <p class="prompt-product-details-title">
@@ -561,7 +561,7 @@ function Pt(t,e,i){return t?e():null==i?void 0:i()}const zt=h`
561
561
  @click=${()=>{this._popup="learn-more"}}
562
562
  >
563
563
  <span>${At("footer.button")}</span>
564
- ${Vt}
564
+ ${Ft}
565
565
  </a>
566
566
  <button
567
567
  class="prompt-footer-about"
@@ -571,8 +571,8 @@ function Pt(t,e,i){return t?e():null==i?void 0:i()}const zt=h`
571
571
  </button>
572
572
  </div>
573
573
  </div>
574
- `}async connectedCallback(){super.connectedCallback(),await async function(t,e=ct){const i=await e.loader(t,e);e.translationCache={},ut(t,i,e)}(this.lang),this.hasLoadedStrings=!0}render(){return Et(this,(async()=>{var t,e;const i=document.createElement("link");i.setAttribute("href","https://fonts.googleapis.com/css2?family=Lato&display=swap"),i.setAttribute("rel","stylesheet"),document.head.appendChild(i);try{const[t,e,i]=await Promise.all([this._fetchShipAidData(),this._fetchCart(),this._fetchProduct()]);this._store=t,this._cart=e,this._protectionProduct=i}catch(o){return Yt(o.message),this._hasFinishedSetup=!0,void(this._shouldShowWidget=!1)}return this.planActive?(null==(e=null==(t=this._store)?void 0:t.protectionSettings)?void 0:e.protectionType)?this._protectionProduct?(this._hasFinishedSetup=!0,this._shouldShowWidget=!0,this._dispatchEvent(Ft.LOADED,this._store),setTimeout((async()=>{var t,e,i;(null==(t=this._store)?void 0:t.widgetAutoOptIn)&&(null==(e=this._cart)?void 0:e.item_count)&&(sessionStorage.getItem(Xt)||(sessionStorage.setItem(Xt,JSON.stringify({loaded:!0})),!this._hasProtectionInCart&&(null==(i=this._cart)?void 0:i.item_count)&&this._store.widgetShowCart&&await this.addProtection()))}),500),void(this.disablePolling||setInterval((async()=>{const t=this._cartLastUpdated;t&&(new Date).getTime()-t.getTime()<this.pollingInterval||await this.updateCart()}),this.pollingInterval))):(Qt("No protection settings product for this store - skipping setup."),this._hasFinishedSetup=!0,void(this._shouldShowWidget=!1)):(Qt("No protection settings for this store - skipping setup."),this._hasFinishedSetup=!0,void(this._shouldShowWidget=!1)):(Qt("No plan is active for this store - skipping setup."),this._hasFinishedSetup=!0,void(this._shouldShowWidget=!1))}),[]),Et(this,(async()=>{var t,e,i;if(this._cartLastUpdated=new Date,!(null==(t=this._cart)?void 0:t.items))return;const o=null==(e=this._cart.items)?void 0:e.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))})),r=null==(i=this._cart)?void 0:i.items[o];if(this._hasProtectionInCart=!!r,1===this._cart.item_count&&r){const t={id:r.key,quantity:0},e=await this._fetch.post("/cart/change.js",t);return await this._handleRefresh(e)}const s=await this.calculateProtectionTotal(this._cart),n=this._findProtectionVariant(s);if(this._protectionVariant=n,!(null==n?void 0:n.id))return this._shouldShowWidget=!1,void Yt("No matching protection variant found.");if(!r)return;if(n.id===r.id){if(this._protectionCartItem={...r,index:o,position:o+1},1===r.quantity)return;const t={id:r.key,quantity:1},e=await this._fetch.post("/cart/change.js",t);return await this._handleRefresh(e)}const a={updates:{[r.variant_id]:0,[n.id]:1}},l=await this._fetch.post("/cart/update.js",a);await this._handleRefresh(l)}),[this._store,this._cart]),ot(this.learnMorePopupTemplate(),document.body),W`
574
+ `}async connectedCallback(){super.connectedCallback(),await async function(t,e=ht){const i=await e.loader(t,e);e.translationCache={},ut(t,i,e)}(this.lang),this.hasLoadedStrings=!0}render(){return Et(this,(async()=>{var t,e;const i=document.createElement("link");i.setAttribute("href","https://fonts.googleapis.com/css2?family=Lato&display=swap"),i.setAttribute("rel","stylesheet"),document.head.appendChild(i);try{const[t,e,i]=await Promise.all([this._fetchShipAidData(),this._fetchCart(),this._fetchProduct()]);this._store=t,this._cart=e,this._protectionProduct=i}catch(o){return Yt(o.message),this._hasFinishedSetup=!0,void(this._shouldShowWidget=!1)}return this.planActive?(null==(e=null==(t=this._store)?void 0:t.protectionSettings)?void 0:e.protectionType)?this._protectionProduct?(this._hasFinishedSetup=!0,this._shouldShowWidget=!0,this._dispatchEvent(Vt.LOADED,this._store),setTimeout((async()=>{var t,e,i;(null==(t=this._store)?void 0:t.widgetAutoOptIn)&&(null==(e=this._cart)?void 0:e.item_count)&&(sessionStorage.getItem(Xt)||(sessionStorage.setItem(Xt,JSON.stringify({loaded:!0})),!this._hasProtectionInCart&&(null==(i=this._cart)?void 0:i.item_count)&&this._store.widgetShowCart&&await this.addProtection()))}),500),void(this.disablePolling||setInterval((async()=>{const t=this._cartLastUpdated;t&&(new Date).getTime()-t.getTime()<this.pollingInterval||await this.updateCart()}),this.pollingInterval))):(Qt("No protection settings product for this store - skipping setup."),this._hasFinishedSetup=!0,void(this._shouldShowWidget=!1)):(Qt("No protection settings for this store - skipping setup."),this._hasFinishedSetup=!0,void(this._shouldShowWidget=!1)):(Qt("No plan is active for this store - skipping setup."),this._hasFinishedSetup=!0,void(this._shouldShowWidget=!1))}),[]),Et(this,(async()=>{var t,e,i;if(this._cartLastUpdated=new Date,!(null==(t=this._cart)?void 0:t.items))return;const o=null==(e=this._cart.items)?void 0:e.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))})),r=null==(i=this._cart)?void 0:i.items[o];if(this._hasProtectionInCart=!!r,1===this._cart.item_count&&r){const t={id:r.key,quantity:0},e=await this._fetch.post("/cart/change.js",t);return await this._handleRefresh(e)}const s=await this.calculateProtectionTotal(this._cart),n=this._findProtectionVariant(s);if(this._protectionVariant=n,!(null==n?void 0:n.id))return this._shouldShowWidget=!1,void Yt("No matching protection variant found.");if(!r)return;if(n.id===r.id){if(this._protectionCartItem={...r,index:o,position:o+1},1===r.quantity)return;const t={id:r.key,quantity:1},e=await this._fetch.post("/cart/change.js",t);return await this._handleRefresh(e)}const a={updates:{[r.variant_id]:0,[n.id]:1}},l=await this._fetch.post("/cart/update.js",a);await this._handleRefresh(l)}),[this._store,this._cart]),ot(this.learnMorePopupTemplate(),document.body),W`
575
575
  <div class="shipaid">
576
- ${Pt(this._hasFinishedSetup,(()=>{var t;return Pt(this._shouldShowWidget&&this.planActive&&(null==(t=this._store)?void 0:t.widgetShowCart),(()=>this.promptTemplate()),(()=>D))}),(()=>W`<p><slot name="loading" default>${At("loading")}</slot></p>`))}
576
+ ${Pt(this._hasFinishedSetup,(()=>{var t;return Pt(this._shouldShowWidget&&this.planActive&&(null==(t=this._store)?void 0:t.widgetShowCart),(()=>this.promptTemplate()),(()=>q))}),(()=>W`<p><slot name="loading" default>${At("loading")}</slot></p>`))}
577
577
  </div>
578
- `}},t.ShipAidWidget.styles=Dt,Jt([o({type:Boolean,attribute:!0})],t.ShipAidWidget.prototype,"disablePolling",2),Jt([o({type:Boolean,attribute:!0})],t.ShipAidWidget.prototype,"disableActions",2),Jt([o({type:Number,attribute:!0})],t.ShipAidWidget.prototype,"pollingInterval",2),Jt([o({type:Boolean,attribute:!0})],t.ShipAidWidget.prototype,"disableRefresh",2),Jt([o({type:String,attribute:!0})],t.ShipAidWidget.prototype,"lang",2),Jt([o({type:String,attribute:!0})],t.ShipAidWidget.prototype,"currency",2),Jt([r()],t.ShipAidWidget.prototype,"_storeDomain",2),Jt([r()],t.ShipAidWidget.prototype,"_store",2),Jt([r()],t.ShipAidWidget.prototype,"_cart",2),Jt([r()],t.ShipAidWidget.prototype,"_protectionProduct",2),Jt([r()],t.ShipAidWidget.prototype,"_cartLastUpdated",2),Jt([r()],t.ShipAidWidget.prototype,"_hasFinishedSetup",2),Jt([r()],t.ShipAidWidget.prototype,"_shouldShowWidget",2),Jt([r()],t.ShipAidWidget.prototype,"_hasProtectionInCart",2),Jt([r()],t.ShipAidWidget.prototype,"_protectionCartItem",2),Jt([r()],t.ShipAidWidget.prototype,"_protectionVariant",2),Jt([r()],t.ShipAidWidget.prototype,"hasLoadedStrings",2),Jt([r()],t.ShipAidWidget.prototype,"_state",2),Jt([r()],t.ShipAidWidget.prototype,"_popup",2),t.ShipAidWidget=Jt([e("shipaid-widget")],t.ShipAidWidget);const ie="Caricamento del widget ShipAid...",oe="Garanzia di consegna",re="in caso di Perdita, Danno o Furto",se={button:"Offerto da"},ne={add:"Aggiungere",remove:"Rimuovere",loading:"Caricamento ..."},ae={loading:ie,title:oe,description:re,footer:se,actions:ne,"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:{title:"Acquista senza preoccupazioni",subtitle:"I marchi e i corrieri non possono sempre garantire che il tuo ordine arrivi a casa tua in sicurezza. Le cose accadono! Aiutiamo il marchio da cui stai acquistando a sostituire il prodotto che hai ordinato in caso di problemi durante il trasporto. Se riscontri un problema, contatta semplicemente il marchio e lo risolveranno il prima possibile.",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"}}},le=Object.freeze(Object.defineProperty({__proto__:null,actions:ne,default:ae,description:re,footer:se,loading:ie,title:oe},Symbol.toStringTag,{value:"Module"}));Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}));
578
+ `}},t.ShipAidWidget.styles=qt,Jt([o({type:Boolean,attribute:!0})],t.ShipAidWidget.prototype,"disablePolling",2),Jt([o({type:Boolean,attribute:!0})],t.ShipAidWidget.prototype,"disableActions",2),Jt([o({type:Number,attribute:!0})],t.ShipAidWidget.prototype,"pollingInterval",2),Jt([o({type:Boolean,attribute:!0})],t.ShipAidWidget.prototype,"disableRefresh",2),Jt([o({type:String,attribute:!0})],t.ShipAidWidget.prototype,"lang",2),Jt([o({type:String,attribute:!0})],t.ShipAidWidget.prototype,"currency",2),Jt([r()],t.ShipAidWidget.prototype,"_storeDomain",2),Jt([r()],t.ShipAidWidget.prototype,"_store",2),Jt([r()],t.ShipAidWidget.prototype,"_cart",2),Jt([r()],t.ShipAidWidget.prototype,"_protectionProduct",2),Jt([r()],t.ShipAidWidget.prototype,"_cartLastUpdated",2),Jt([r()],t.ShipAidWidget.prototype,"_hasFinishedSetup",2),Jt([r()],t.ShipAidWidget.prototype,"_shouldShowWidget",2),Jt([r()],t.ShipAidWidget.prototype,"_hasProtectionInCart",2),Jt([r()],t.ShipAidWidget.prototype,"_protectionCartItem",2),Jt([r()],t.ShipAidWidget.prototype,"_protectionVariant",2),Jt([r()],t.ShipAidWidget.prototype,"hasLoadedStrings",2),Jt([r()],t.ShipAidWidget.prototype,"_state",2),Jt([r()],t.ShipAidWidget.prototype,"_popup",2),t.ShipAidWidget=Jt([e("shipaid-widget")],t.ShipAidWidget);const ie="Caricamento del widget ShipAid...",oe="Garanzia di consegna",re="in caso di Perdita, Danno o Furto",se={button:"Offerto da"},ne={add:"Aggiungere",remove:"Rimuovere",loading:"Caricamento ..."},ae={loading:ie,title:oe,description:re,footer:se,actions:ne,"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:{title:"Acquista senza preoccupazioni",subtitle:"I marchi e i corrieri non possono sempre garantire che il tuo ordine arrivi a casa tua in sicurezza. Le cose accadono! Aiutiamo il marchio da cui stai acquistando a sostituire il prodotto che hai ordinato in caso di problemi durante il trasporto. Se riscontri un problema, contatta semplicemente il marchio e lo risolveranno il prima possibile.",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"}}},le=Object.freeze(Object.defineProperty({__proto__:null,actions:ne,default:ae,description:re,footer:se,loading:ie,title:oe},Symbol.toStringTag,{value:"Module"})),de="Carregando o widget ShipAid...",pe="Garantia de entrega",ce="em caso de Perda, Danos ou Roubo",he={button:"Distribuído por"},ue={add:"Adicionar",remove:"Remover",loading:"Carregando..."},fe={loading:de,title:pe,description:ce,footer:he,actions:ue,"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:{title:"Compre sem preocupações",subtitle:"Marcas e transportadoras nem sempre podem garantir que seu pedido chegue à sua porta com segurança. Acidentes acontecem! Ajudamos a marca da qual você está comprando a substituir o produto que você encomendou em caso de um problema no transporte. Se você encontrar um problema, basta entrar em contato com a marca e eles o resolverão o mais rápido possível.",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"}}},me=Object.freeze(Object.defineProperty({__proto__:null,actions:ue,default:fe,description:ce,footer:he,loading:de,title:pe},Symbol.toStringTag,{value:"Module"}));Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ui.shipaid.com",
3
3
  "private": false,
4
- "version": "0.3.0",
4
+ "version": "0.3.1",
5
5
  "type": "module",
6
6
  "main": "dist/widget.umd.js",
7
7
  "unpkg": "dist/widget.iife.js",
@@ -14,11 +14,6 @@
14
14
  "dist-types",
15
15
  "dist"
16
16
  ],
17
- "scripts": {
18
- "develop": "vite",
19
- "build": "tsc && node build",
20
- "lint": "eslint . --ext=ts --fix"
21
- },
22
17
  "dependencies": {
23
18
  "@lit-labs/task": "^2.0.0",
24
19
  "lit": "^2.6.1",
@@ -39,5 +34,10 @@
39
34
  "terser": "^5.16.1",
40
35
  "typescript": "^4.9.4",
41
36
  "vite": "^4.0.4"
37
+ },
38
+ "scripts": {
39
+ "develop": "vite",
40
+ "build": "tsc && node build",
41
+ "lint": "eslint . --ext=ts --fix"
42
42
  }
43
- }
43
+ }
@@ -1,2 +0,0 @@
1
- declare const styles: import('lit').CSSResult
2
- export default styles