2026-02-05 17:08:59 +03:00

2 lines
2.8 KiB
JavaScript

(function(n){typeof define=="function"&&define.amd?define(n):n()})(function(){"use strict";var A=Object.defineProperty;var u=(n,i,r)=>i in n?A(n,i,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[i]=r;var a=(n,i,r)=>(u(n,typeof i!="symbol"?i+"":i,r),r);const n={};async function i(c){if(n.hasOwnProperty(c))return n[c];let t;return c.startsWith("data:")||!("caches"in self)?t=fetch(c).then(e=>e.text()):t=caches.open("gravity").then(async e=>{let s=await e.match(c);return s||(s=await fetch(c),s.ok&&await e.put(c,s.clone())),s.text()}),n[c]=t,t}class r extends HTMLElement{static get observedAttributes(){return["src"]}fetchIcon(t){!t||i(t).then(e=>this.innerHTML=e)}connectedCallback(){this.fetchIcon(this.getAttribute("src"))}attributeChangedCallback(t,e,s){t==="src"&&e!==s&&this.fetchIcon(s)}}a(r,"TAG_NAME","gv-icon");class h extends HTMLElement{static get observedAttributes(){return["src"]}fetchIllustration(t){!t||i(t).then(e=>this.innerHTML=e)}connectedCallback(){this.fetchIllustration(this.getAttribute("src"))}attributeChangedCallback(t,e,s){t==="src"&&e!==s&&this.fetchIllustration(s)}}a(h,"TAG_NAME","gv-illustration");class o extends HTMLElement{static get observedAttributes(){return["src"]}fetchIndicator(t){!t||i(t).then(e=>this.innerHTML=e)}connectedCallback(){this.fetchIndicator(this.getAttribute("src"))}attributeChangedCallback(t,e,s){t==="src"&&e!==s&&this.fetchIndicator(s)}}a(o,"TAG_NAME","gv-indicator");class f extends HTMLElement{static get observedAttributes(){return["src"]}fetchLoader(t){!t||i(t).then(e=>this.innerHTML=e)}connectedCallback(){this.fetchLoader(this.getAttribute("src"))}attributeChangedCallback(t,e,s){t==="src"&&e!==s&&this.fetchLoader(s)}}a(f,"TAG_NAME","gv-loader");class l extends HTMLElement{static get observedAttributes(){return["src"]}fetchLogo(t){!t||i(t).then(e=>this.innerHTML=e)}connectedCallback(){this.fetchLogo(this.getAttribute("src"))}attributeChangedCallback(t,e,s){t==="src"&&e!==s&&this.fetchLogo(s)}}a(l,"TAG_NAME","gv-logo");class d extends HTMLElement{static get observedAttributes(){return["src"]}fetchPayIcon(t){!t||i(t).then(e=>this.innerHTML=e)}connectedCallback(){this.fetchPayIcon(this.getAttribute("src"))}attributeChangedCallback(t,e,s){t==="src"&&e!==s&&this.fetchPayIcon(s)}}a(d,"TAG_NAME","gv-pay-icon");class b extends HTMLElement{static get observedAttributes(){return["src"]}fetchTile(t){!t||i(t).then(e=>this.innerHTML=e)}connectedCallback(){this.fetchTile(this.getAttribute("src"))}attributeChangedCallback(t,e,s){t==="src"&&e!==s&&this.fetchTile(s)}}a(b,"TAG_NAME","gv-tile"),customElements.define(r.TAG_NAME,r),customElements.define(h.TAG_NAME,h),customElements.define(o.TAG_NAME,o),customElements.define(f.TAG_NAME,f),customElements.define(l.TAG_NAME,l),customElements.define(d.TAG_NAME,d),customElements.define(b.TAG_NAME,b)});