{"version":3,"file":"loading-indicator-snippet.min.js","mappings":"wZAUA,MAAMA,yBAAyBC,YACtB,iBAAAC,GACLC,KAAKC,sBACP,CAEQ,oBAAAA,GACDD,KAAKE,aACRF,KAAKG,aAAa,CAAEC,KAAM,SAC1BJ,KAAKE,WAAWG,UAAY,2fAEhC,EASGC,eAAeC,IAAI,sBACtBD,eAAeE,OAAO,oBAAqBX","sources":["webpack://lange/./snippets/loading-indicator/index.ts"],"sourcesContent":["import type { CustomElement } from '@integrabeauty/custom-elements';\nimport html from './index.html';\nimport styles from './index.scss';\n\n/**\n * A generic animated three dot loading indicator.\n *\n * It is purely presentational with no logic of its own. Other elements drop it in and show or hide\n * it while they wait on something, such as the add to cart button during a cart request.\n */\nclass LoadingIndicator extends HTMLElement implements CustomElement {\n  public connectedCallback() {\n    this.initializeShadowRoot();\n  }\n\n  private initializeShadowRoot() {\n    if (!this.shadowRoot) {\n      this.attachShadow({ mode: 'open' });\n      this.shadowRoot.innerHTML = `<style>${styles}</style>${html}`;\n    }\n  }\n}\n\ndeclare global {\n  interface HTMLElementTagNameMap {\n    'loading-indicator': LoadingIndicator;\n  }\n}\n\nif (!customElements.get('loading-indicator')) {\n  customElements.define('loading-indicator', LoadingIndicator);\n}\n"],"names":["LoadingIndicator","HTMLElement","connectedCallback","this","initializeShadowRoot","shadowRoot","attachShadow","mode","innerHTML","customElements","get","define"],"sourceRoot":""}