1/*! Copyright (c) Safe As Milk. All rights reserved. */const STATES=["IDLE","DOING","DONE"];class StagedAction extends HTMLElement{#tick;#duration=1500;constructor(){super(),this.#tick=this.querySelector("staged-action-tick")}setState(state=STATES[0]){return new Promise(((resolve,reject)=>{STATES.includes(state)||reject(new Error("Invalid state")),state===STATES[0]&&(this.classList.remove("is-done"),this.classList.remove("is-doing"),resolve("Idle")),state===STATES[1]&&(this.classList.remove("is-done"),this.classList.add("is-doing"),resolve("Doing")),state===STATES[2]&&(this.classList.remove("is-doing"),this.classList.add("is-done"),this.#tick.getAnimations().length>0?this.#tick.addEventListener("animationend",(()=>{this.classList.remove("is-done"),resolve("Done")})):setTimeout((()=>{this.classList.remove("is-done"),resolve("Done")}),this.#duration))}))}}customElements.define("staged-action",StagedAction); 2//# sourceMappingURL=/cdn/shop/t/10/assets/staged-action.js.map?v=57498715711744870231785161881
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.