var __defProp = Object.defineProperty; var __markAsModule = (target) => __defProp(target, "__esModule", {value: true}); var __export = (target, all) => { for (var name in all) __defProp(target, name, {get: all[name], enumerable: true}); }; __markAsModule(exports); __export(exports, { CUSTOM_TYPES: () => Es, Comment: () => Ht, Component: () => Pt, CustomEvent: () => k, Document: () => Ot, DocumentFragment: () => Ch, Easer: () => ei, Element: () => v, ElementRoute: () => or, ElementRouteTo: () => Ci, Event: () => K, EventHandler: () => si, Fragment: () => ot, HTMLButtonElement: () => Mr, HTMLElement: () => Te, HTMLHtmlElement: () => Th, HTMLInputElement: () => Lr, HTMLOptionElement: () => Fr, HTMLScriptElement: () => Oh, HTMLSelectElement: () => kr, HTMLTextAreaElement: () => $r, ImbaElement: () => pu, IntersectionEventDefaults: () => We, KeyboardEvent: () => Pr, LazyProxy: () => mr, MouseEvent: () => Cr, Node: () => I, PointerEvent: () => Nr, RenderContext: () => Y, Router: () => nr, SVGElement: () => Ir, Scheduler: () => _r, ShadowRoot: () => Nh, TYPES: () => Oe, Text: () => Ee, UIEvent: () => Eh, Window: () => Ph, asset: () => oh, autorun: () => of, clearInterval: () => Hi, clearTimeout: () => Ui, colors: () => xu, commit: () => L, createAtom: () => nf, createComment: () => et, createComponent: () => Ms, createDynamic: () => jh, createElement: () => Mh, createFragment: () => Ih, createIndexedList: () => nu, createKeyedList: () => hu, createLiveFragment: () => Qh, createRenderContext: () => Sr, createSVGElement: () => Fh, createSlot: () => Bt, createTextNode: () => Ce, customElements: () => kh, defineTag: () => Vh, deserializeData: () => Zl, emit: () => j, events: () => Wu, getDeepPropertyDescriptor: () => Dt, getRenderContext: () => ah, getSuperTagType: () => qh, getTagType: () => Fs, get_document: () => Ut, hooks: () => vr, hotkeys: () => Lo, hydrate: () => du, listen: () => A, manifest: () => br, mount: () => bn, observable: () => lf, once: () => F, parseTime: () => bt, patchManifest: () => th, process: () => nh, proxy: () => gr, render: () => Eu, renderContext: () => P, renderer: () => wt, reportChanged: () => uf, reportObserved: () => af, router: () => Za, run: () => hf, scheduler: () => N, serializeData: () => Jl, setInterval: () => Ki, setTimeout: () => zi, styles: () => gn, toCamelCase: () => eh, transitions: () => Ke, unlisten: () => pt, unmount: () => vn, use_dom_bind: () => Tu, use_dom_teleport: () => Ru, use_dom_transitions: () => Vu, use_events: () => Gu, use_events_hotkey: () => La, use_events_intersect: () => oa, use_events_keyboard: () => ri, use_events_mouse: () => Zt, use_events_pointer: () => Ju, use_events_resize: () => ca, use_events_selection: () => ma, use_events_touch: () => ra, use_hooks: () => lh, use_router: () => Ja, use_slots: () => Gh, use_styles: () => Su, use_window: () => Lh, \u03B1action: () => mf, \u03B1autorun: () => pf, \u03B1computed: () => ff, \u03B1lazy: () => hh, \u03B1observable: () => cf, \u03B1ref: () => df }); var Vl = Object.create, pr = Object.defineProperty, zl = Object.getPrototypeOf, Kl = Object.prototype.hasOwnProperty, Hl = Object.getOwnPropertyNames, Ul = Object.getOwnPropertyDescriptor; var Bl = (i) => pr(i, "__esModule", {value: true}); var Yl = (i, t) => () => (t || (t = {exports: {}}, i(t.exports, t)), t.exports); var Wl = (i, t, e) => { if (t && typeof t == "object" || typeof t == "function") for (let r of Hl(t)) !Kl.call(i, r) && r !== "default" && pr(i, r, {get: () => t[r], enumerable: !(e = Ul(t, r)) || e.enumerable}); return i; }, Gl = (i) => Wl(Bl(pr(i != null ? Vl(zl(i)) : {}, "default", i && i.__esModule && "default" in i ? {get: () => i.default, enumerable: true} : {value: i, enumerable: true})), i); var Ko = Yl((bd, yi) => { "use strict"; var $t = typeof Reflect == "object" ? Reflect : null, Fo = $t && typeof $t.apply == "function" ? $t.apply : function(t, e, r) { return Function.prototype.apply.call(t, e, r); }, Xe; $t && typeof $t.ownKeys == "function" ? Xe = $t.ownKeys : Object.getOwnPropertySymbols ? Xe = function(t) { return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t)); } : Xe = function(t) { return Object.getOwnPropertyNames(t); }; function Ma(i) { console && console.warn && console.warn(i); } var Io = Number.isNaN || function(t) { return t !== t; }; function S() { S.init.call(this); } yi.exports = S; yi.exports.once = Fa; S.EventEmitter = S; S.prototype._events = void 0; S.prototype._eventsCount = 0; S.prototype._maxListeners = void 0; var Ro = 10; function Qe(i) { if (typeof i != "function") throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof i); } Object.defineProperty(S, "defaultMaxListeners", {enumerable: true, get: function() { return Ro; }, set: function(i) { if (typeof i != "number" || i < 0 || Io(i)) throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + i + "."); Ro = i; }}); S.init = function() { (this._events === void 0 || this._events === Object.getPrototypeOf(this)._events) && (this._events = Object.create(null), this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0; }; S.prototype.setMaxListeners = function(t) { if (typeof t != "number" || t < 0 || Io(t)) throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + t + "."); return this._maxListeners = t, this; }; function Do(i) { return i._maxListeners === void 0 ? S.defaultMaxListeners : i._maxListeners; } S.prototype.getMaxListeners = function() { return Do(this); }; S.prototype.emit = function(t) { for (var e = [], r = 1; r < arguments.length; r++) e.push(arguments[r]); var s = t === "error", n = this._events; if (n !== void 0) s = s && n.error === void 0; else if (!s) return false; if (s) { var o; if (e.length > 0 && (o = e[0]), o instanceof Error) throw o; var l = new Error("Unhandled error." + (o ? " (" + o.message + ")" : "")); throw l.context = o, l; } var h = n[t]; if (h === void 0) return false; if (typeof h == "function") Fo(h, this, e); else for (var a = h.length, c = Ao(h, a), r = 0; r < a; ++r) Fo(c[r], this, e); return true; }; function jo(i, t, e, r) { var s, n, o; if (Qe(e), n = i._events, n === void 0 ? (n = i._events = Object.create(null), i._eventsCount = 0) : (n.newListener !== void 0 && (i.emit("newListener", t, e.listener ? e.listener : e), n = i._events), o = n[t]), o === void 0) o = n[t] = e, ++i._eventsCount; else if (typeof o == "function" ? o = n[t] = r ? [e, o] : [o, e] : r ? o.unshift(e) : o.push(e), s = Do(i), s > 0 && o.length > s && !o.warned) { o.warned = true; var l = new Error("Possible EventEmitter memory leak detected. " + o.length + " " + String(t) + " listeners added. Use emitter.setMaxListeners() to increase limit"); l.name = "MaxListenersExceededWarning", l.emitter = i, l.type = t, l.count = o.length, Ma(l); } return i; } S.prototype.addListener = function(t, e) { return jo(this, t, e, false); }; S.prototype.on = S.prototype.addListener; S.prototype.prependListener = function(t, e) { return jo(this, t, e, true); }; function Ia() { if (!this.fired) return this.target.removeListener(this.type, this.wrapFn), this.fired = true, arguments.length === 0 ? this.listener.call(this.target) : this.listener.apply(this.target, arguments); } function qo(i, t, e) { var r = {fired: false, wrapFn: void 0, target: i, type: t, listener: e}, s = Ia.bind(r); return s.listener = e, r.wrapFn = s, s; } S.prototype.once = function(t, e) { return Qe(e), this.on(t, qo(this, t, e)), this; }; S.prototype.prependOnceListener = function(t, e) { return Qe(e), this.prependListener(t, qo(this, t, e)), this; }; S.prototype.removeListener = function(t, e) { var r, s, n, o, l; if (Qe(e), s = this._events, s === void 0) return this; if (r = s[t], r === void 0) return this; if (r === e || r.listener === e) --this._eventsCount == 0 ? this._events = Object.create(null) : (delete s[t], s.removeListener && this.emit("removeListener", t, r.listener || e)); else if (typeof r != "function") { for (n = -1, o = r.length - 1; o >= 0; o--) if (r[o] === e || r[o].listener === e) { l = r[o].listener, n = o; break; } if (n < 0) return this; n === 0 ? r.shift() : Ra(r, n), r.length === 1 && (s[t] = r[0]), s.removeListener !== void 0 && this.emit("removeListener", t, l || e); } return this; }; S.prototype.off = S.prototype.removeListener; S.prototype.removeAllListeners = function(t) { var e, r, s; if (r = this._events, r === void 0) return this; if (r.removeListener === void 0) return arguments.length === 0 ? (this._events = Object.create(null), this._eventsCount = 0) : r[t] !== void 0 && (--this._eventsCount == 0 ? this._events = Object.create(null) : delete r[t]), this; if (arguments.length === 0) { var n = Object.keys(r), o; for (s = 0; s < n.length; ++s) o = n[s], o !== "removeListener" && this.removeAllListeners(o); return this.removeAllListeners("removeListener"), this._events = Object.create(null), this._eventsCount = 0, this; } if (e = r[t], typeof e == "function") this.removeListener(t, e); else if (e !== void 0) for (s = e.length - 1; s >= 0; s--) this.removeListener(t, e[s]); return this; }; function Vo(i, t, e) { var r = i._events; if (r === void 0) return []; var s = r[t]; return s === void 0 ? [] : typeof s == "function" ? e ? [s.listener || s] : [s] : e ? Da(s) : Ao(s, s.length); } S.prototype.listeners = function(t) { return Vo(this, t, true); }; S.prototype.rawListeners = function(t) { return Vo(this, t, false); }; S.listenerCount = function(i, t) { return typeof i.listenerCount == "function" ? i.listenerCount(t) : zo.call(i, t); }; S.prototype.listenerCount = zo; function zo(i) { var t = this._events; if (t !== void 0) { var e = t[i]; if (typeof e == "function") return 1; if (e !== void 0) return e.length; } return 0; } S.prototype.eventNames = function() { return this._eventsCount > 0 ? Xe(this._events) : []; }; function Ao(i, t) { for (var e = new Array(t), r = 0; r < t; ++r) e[r] = i[r]; return e; } function Ra(i, t) { for (; t + 1 < i.length; t++) i[t] = i[t + 1]; i.pop(); } function Da(i) { for (var t = new Array(i.length), e = 0; e < t.length; ++e) t[e] = i[e].listener || i[e]; return t; } function Fa(i, t) { return new Promise(function(e, r) { function s() { n !== void 0 && i.removeListener("error", n), e([].slice.call(arguments)); } var n; t !== "error" && (n = function(l) { i.removeListener(t, s), r(l); }, i.once("error", n)), i.once(t, s); }); } }); function me(i) { let t; return i ? (t = i.toIterable) ? t.call(i) : i : []; } var _f = Symbol.for("#__initor__"), bf = Symbol.for("#__inited__"), Xl = Symbol.for("#type"), ge = Symbol.for("#__listeners__"), Ql = /-./g, mr = class { static for(t) { return new Proxy({}, new this(t)); } constructor(t) { this.getter = t; } get target() { return this.getter(); } get(t, e) { return this.target[e]; } set(t, e, r) { return this.target[e] = r, true; } }; function gr(i, t = {}) { return new Proxy(t, new mr(i)); } function bt(i) { let t = typeof i; if (t == "number") return i; if (t == "string") { if (/^\d+fps$/.test(i)) return 1e3 / parseFloat(i); if (/^([-+]?[\d\.]+)s$/.test(i)) return parseFloat(i) * 1e3; if (/^([-+]?[\d\.]+)ms$/.test(i)) return parseFloat(i); } return null; } function Jl(i) { let t = new Map(), e = [], r = false, s = function(h, a) { if (a && a[Xl] && h !== "") { let c = t.get(a); return t.has(a) || (t.set(a, c = "$$" + e.length + "$$"), e.push(a)), h == null ? a : c; } return a; }, n = JSON.stringify(i, s, 2), o = 0; for (r = true; o < e.length; ) e[o] = JSON.stringify(e[o], s, 2), o++; let l = ""; for (let h = 0, a = me(e), c = a.length; h < c; h++) { let u = a[h]; l += '"$$' + h + '$$":' + u + `, `; } return n = "{" + l + n.slice(1), n; } function Zl(i, t = null) { let e = {}, r = /\$\$\d+\$\$/, s = function(l) { return e[l] || (e[l] = t ? t(l) : {}); }, n = function(l, h) { if (typeof h == "string") { if (h[0] == "$" && r.test(h)) return s(h); } else if (typeof l == "string" && l[0] == "$" && r.test(l)) { let a = s(l); return Object.assign(a, h), a; } return h; }; return JSON.parse(i, n); } function th(i, t) { var e, r, s, n; let o = {}, l = {added: [], changed: [], removed: [], all: [], urls: {}}; if (i.assets) for (let h = 0, a = me(i.assets), c = a.length; h < c; h++) { let u = a[h], d = u.originalPath || u.path; o[d] = u, u.url && ((e = t.urls)[r = u.url] || (e[r] = u)); } for (let h = 0, a = me(t.assets || []), c = a.length; h < c; h++) { let u = a[h], d = u.originalPath || u.path, b = o[d]; u.url && i.urls && (i.urls[u.url] = u), b ? (b.hash != u.hash && (b.invalidated = Date.now(), b.replacedBy = u, u.replaces = b, l.changed.push(u), l.all.push(u), b == i.main && (l.main = u)), s = o[d], delete o[d]) : (l.added.push(u), l.all.push(u)); } for (let h = 0, a = Object.keys(o), c = a.length, u, d; h < c; h++) u = a[h], d = o[u], d.removed = Date.now(), l.all.push(d); for (let h = 0, a = me(l.all), c = a.length; h < c; h++) { let u = a[h]; (l[n = u.type] || (l[n] = [])).push(u); } return l.removed = Object.values(o), t.changes = l, t; } function eh(i) { return i.indexOf("-") >= 0 ? i.replace(Ql, function(t) { return t.charAt(1).toUpperCase(); }) : i; } function Dt(i, t, e) { if (!i) return; let r = Object.getOwnPropertyDescriptor(i, t); return r || i == e ? r || void 0 : Dt(Reflect.getPrototypeOf(i), t, e); } var Di = function(i, t, e) { let r, s, n; for (; (r = e) && (e = e.next); ) (s = e.listener) && (e.path && s[e.path] ? n = t ? s[e.path].apply(s, t) : s[e.path]() : n = t ? s.apply(e, t) : s.call(e)), e.times && --e.times <= 0 && (r.next = e.next, e.listener = null); }; function A(i, t, e, r) { var s; let n, o, l; return n = i[ge] || (i[ge] = {}), o = n[t] || (n[t] = {}), l = o.tail || (o.tail = o.next = {}), l.listener = e, l.path = r, o.tail = l.next = {}, l; } function F(i, t, e) { let r = A(i, t, e); return r.times = 1, r; } function pt(i, t, e, r) { let s, n, o = i[ge]; if (!!o && (s = o[t])) { for (; (n = s) && (s = s.next); ) if (s == e || s.listener == e) { n.next = s.next, s.listener = null; break; } } } function j(i, t, e) { let r; (r = i[ge]) && (r[t] && Di(t, e, r[t]), r.all && Di(t, [t, e], r.all)); } function rh(i) { let t; return i ? (t = i.toIterable) ? t.call(i) : i : []; } var Ai = Symbol.for("#__init__"), xf = Symbol.for("#__initor__"), Sf = Symbol.for("#__inited__"), ji = Symbol.for("#schedule"), yr = Symbol.for("#frames"), ye = Symbol.for("#interval"), vt = Symbol.for("#stage"), xt = Symbol.for("#scheduled"), _e = Symbol.for("#version"), ih = Symbol.for("#fps"), qi = Symbol.for("#ticker"), sh = globalThis.requestAnimationFrame || function(i) { return globalThis.setTimeout(i, 1e3 / 60); }; var wf = 1 / 60, Vi = class { constructor(t = null) { this[Ai](t); } [Ai](t = null) { var e; this.owner = t && (e = t.owner) !== void 0 ? e : null, this.target = t && (e = t.target) !== void 0 ? e : null, this.active = t && (e = t.active) !== void 0 ? e : false, this.value = t && (e = t.value) !== void 0 ? e : void 0, this.skip = t && (e = t.skip) !== void 0 ? e : 0, this.last = t && (e = t.last) !== void 0 ? e : 0; } tick(t, e) { return this.last = this.owner[yr], this.target.tick(this, e), 1; } update(t, e) { let r = this.active, s = t.value; return this.value != s && (this.deactivate(), this.value = s), (this.value || r || e) && this.activate(), this; } queue() { this.owner.add(this); } activate() { return this.value === true ? this.owner.on("commit", this) : this.value === false || typeof this.value == "number" && (this.value / (1e3 / 60) <= 2 ? this.owner.on("raf", this) : this[ye] = globalThis.setInterval(this.queue.bind(this), this.value)), this.active = true, this; } deactivate() { return this.value === true && this.owner.un("commit", this), this.owner.un("raf", this), this[ye] && (globalThis.clearInterval(this[ye]), this[ye] = null), this.active = false, this; } }, _r = class { constructor() { var t = this; this.id = Symbol(), this.queue = [], this.stage = -1, this[vt] = -1, this[yr] = 0, this[xt] = false, this[_e] = 0, this.listeners = {}, this.intervals = {}, t.commit = function() { return t.add("commit"), t; }, this[ih] = 0, t.$promise = null, t.$resolve = null, this[qi] = function(e) { return t[xt] = false, t.tick(e); }; } touch() { return this[_e]++; } get version() { return this[_e]; } add(t, e) { return (e || this.queue.indexOf(t) == -1) && this.queue.push(t), this[xt] || this[ji](), this; } get committing\u03A6() { return this.queue.indexOf("commit") >= 0; } get syncing\u03A6() { return this[vt] == 1; } listen(t, e) { let r = this.listeners[t], s = !r; return r || (r = this.listeners[t] = new Set()), r.add(e), t == "raf" && s && this.add("raf"), this; } unlisten(t, e) { var r; let s = this.listeners[t]; return s && s.delete(e), t == "raf" && s && s.size == 0 && (r = this.listeners.raf, delete this.listeners.raf), this; } on(t, e) { return this.listen(t, e); } un(t, e) { return this.unlisten(t, e); } get promise() { var t = this; return t.$promise || (t.$promise = new Promise(function(e) { return t.$resolve = e; })); } tick(t) { var e = this; let r = this.queue, s = this[yr]++; if (this.ts || (this.ts = t), this.dt = t - this.ts, this.ts = t, this.queue = [], this[vt] = 1, this[_e]++, r.length) for (let n = 0, o = rh(r), l = o.length; n < l; n++) { let h = o[n]; typeof h == "string" && this.listeners[h] ? e.listeners[h].forEach(function(a) { if (a.tick instanceof Function) return a.tick(e, h); if (a instanceof Function) return a(e, h); }) : h instanceof Function ? h(e.dt, e) : h.tick && h.tick(e.dt, e); } return this[vt] = this[xt] ? 0 : -1, e.$promise && (e.$resolve(e), e.$promise = e.$resolve = null), e.listeners.raf && e.add("raf"), e; } [ji]() { return this[xt] || (this[xt] = true, this[vt] == -1 && (this[vt] = 0), sh(this[qi])), this; } schedule(t, e) { var r, s; return e || (e = t[r = this.id] || (t[r] = {value: true})), (e[s = this.id] || (e[s] = new Vi({owner: this, target: t}))).update(e, true); } unschedule(t, e = {}) { e || (e = t[this.id]); let r = e && e[this.id]; return r && r.active && r.deactivate(), this; } }, N = new _r(); function L() { return N.add("commit").promise; } function zi(i, t) { return globalThis.setTimeout(function() { i(), L(); }, t); } function Ki(i, t) { return globalThis.setInterval(function() { i(), L(); }, t); } var Hi = globalThis.clearInterval, Ui = globalThis.clearTimeout, At = globalThis.imba || (globalThis.imba = {}); At.commit = L; At.setTimeout = zi; At.setInterval = Ki; At.clearInterval = Hi; At.clearTimeout = Ui; var Tf = Symbol.for("#__initor__"), Of = Symbol.for("#__inited__"), Bi = class { constructor() { this.data = {}; } }, br = new Bi(); var nh = {}; var kf = Symbol.for("#__initor__"), Lf = Symbol.for("#__inited__"), Yi = Symbol.for("#__init__"), Wi = Symbol.for("#warned"), St = Symbol.for("#asset"), be = class { static wrap(t) { let e = new be(t); return new Proxy(e, e); } constructor(t) { this.meta = t; } get input() { return br.inputs[this.meta.input]; } get asset() { return globalThis._MF_ ? this.meta : this.input ? this.input.asset : null; } set(t, e, r) { return true; } get(t, e) { return this.meta.meta && this.meta.meta[e] != null ? this.meta.meta[e] : this.asset ? e == "absPath" && !this.asset.absPath ? this.asset.url : this.asset[e] : ((this.meta[Wi] != true ? (this.meta[Wi] = true, true) : false) && console.warn("Asset for '" + this.meta.input + "' not found"), e == "valueOf" ? function() { return ""; } : null); } }, Gi = class { constructor(t = null) { this[Yi](t); } [Yi](t = null) { this.url = t ? t.url : void 0, this.meta = t ? t.meta : void 0; } adoptNode(t) { var e; if ((e = this.meta) == null ? void 0 : e.content) { for (let r = this.meta.attributes, s = 0, n = Object.keys(r), o = n.length, l, h; s < o; s++) l = n[s], h = r[l], t.setAttribute(l, h); t.innerHTML = this.meta.content; } return this; } toString() { return this.url; } toStyleString() { return "url(" + this.url + ")"; } }; function oh(i) { var t, e; if (i[St]) return i[St]; if (i.type == "svg") return i[St] || (i[St] = new Gi(i)); if (i.input) { let r = globalThis._MF_ && globalThis._MF_[i.input]; return r && (Object.assign(i, r), i.toString = function() { return this.absPath; }), i[St] || (i[St] = be.wrap(i)); } return i; } var vr = {on: function(i, t) { return A(this, i, t); }, inited: function(i) { return j(this, "inited", [i]); }}; function lh() { return true; } function hh(i, t, e) { if (e.get) { let r = e.get; e.get = function() { let s = r.call(this); return Object.defineProperty(this, t, {enumerable: false, value: s}), s; }; } return e; } var Xi = Symbol.for("#toStringDeopt"), Rf = Symbol.for("#__initor__"), Df = Symbol.for("#__inited__"), Qi = Symbol.for("#symbols"), Ji = Symbol.for("#batches"), Zi = Symbol.for("#extras"), ts = Symbol.for("#stacks"), jt = class { constructor(t) { this.dom = t, this.string = ""; } contains(t) { return this.dom.classList.contains(t); } add(t) { return this.contains(t) ? this : (this.string += (this.string ? " " : "") + t, this.dom.classList.add(t), this); } remove(t) { if (!this.contains(t)) return this; let e = new RegExp("(^|\\s)" + t + "(?=\\s|$)", "g"); return this.string = this.string.replace(e, ""), this.dom.classList.remove(t), this; } toggle(t, e) { return e === void 0 && (e = !this.contains(t)), e ? this.add(t) : this.remove(t); } incr(t, e = 0) { var r = this; let s = this.stacks, n = s[t] || 0; return n < 1 && this.add(t), e > 0 && setTimeout(function() { return r.decr(t); }, e), s[t] = Math.max(n, 0) + 1; } decr(t) { let e = this.stacks, r = e[t] || 0; return r == 1 && this.remove(t), e[t] = Math.max(r, 1) - 1; } reconcile(t, e) { let r = this[Qi], s = this[Ji], n = true; if (!r) r = this[Qi] = [t], s = this[Ji] = [e || ""], this.toString = this.valueOf = this[Xi]; else { let o = r.indexOf(t), l = e || ""; o == -1 ? (r.push(t), s.push(l)) : s[o] != l ? s[o] = l : n = false; } n && (this[Zi] = " " + s.join(" "), this.sync()); } valueOf() { return this.string; } toString() { return this.string; } [Xi]() { return this.string + (this[Zi] || ""); } sync() { return this.dom.flagSync$(); } get stacks() { return this[ts] || (this[ts] = {}); } }; var ve = Symbol.for("#__init__"), es = Symbol.for("#__initor__"), rs = Symbol.for("#__inited__"), xr = Symbol.for("#getRenderContext"), uh = Symbol.for("#getDynamicContext"), is = Symbol(), P = {context: null}, ss = class { constructor(t = null) { this[ve](t); } [ve](t = null) { var e; this.stack = t && (e = t.stack) !== void 0 ? e : []; } push(t) { return this.stack.push(t); } pop(t) { return this.stack.pop(); } }, wt = new ss(), Y = class extends Map { static [ve]() { return this.prototype[es] = is, this; } constructor(t, e = null) { super(); this._ = t, this.sym = e, this[es] === is && this[rs] && this[rs](); } pop() { return P.context = null; } [xr](t) { let e = this.get(t); return e || this.set(t, e = new Y(this._, t)), P.context = e; } [uh](t, e) { return this[xr](t)[xr](e); } run(t) { return this.value = t, P.context == this && (P.context = null), this.get(t); } cache(t) { return this.set(this.value, t), t; } }; Y[ve](); function Sr(i, t = Symbol(), e = i) { return P.context = i[t] || (i[t] = new Y(e, t)); } function ah() { let i = P.context, t = i || new Y(null); return globalThis.DEBUG_IMBA && !i && wt.stack.length > 0 && console.warn("detected unmemoized nodes in", wt.stack, "see https://imba.io", t), i && (P.context = null), t; } function qt(i, t) { let e = Object.getOwnPropertyDescriptors(t); return delete e.constructor, Object.defineProperties(i, e), i; } function fh(i) { let t; return i ? (t = i.toIterable) ? t.call(i) : i : []; } var Vt = Symbol.for("#parent"), ns = Symbol.for("#closestNode"), ch = Symbol.for("#parentNode"), dh = Symbol.for("#context"), xe = Symbol.for("#__init__"), os = Symbol.for("##inited"), wr = Symbol.for("#getRenderContext"), ph = Symbol.for("#getDynamicContext"), ls = Symbol.for("#insertChild"), zt = Symbol.for("#appendChild"), Er = Symbol.for("#replaceChild"), hs = Symbol.for("#removeChild"), tt = Symbol.for("#insertInto"), us = Symbol.for("#insertIntoDeopt"), Kt = Symbol.for("#removeFrom"), as = Symbol.for("#removeFromDeopt"), Et = Symbol.for("#replaceWith"), fs = Symbol.for("#replaceWithDeopt"), Tr = Symbol.for("#placeholderNode"), mh = Symbol.for("#attachToParent"), gh = Symbol.for("#detachFromParent"), yh = Symbol.for("#placeChild"), _h = Symbol.for("#beforeReconcile"), bh = Symbol.for("#afterReconcile"), vh = Symbol.for("#afterVisit"), xh = Symbol.for("#visitContext"), cs = Symbol.for("#__initor__"), ds = Symbol.for("#__inited__"), ps = Symbol.for("##parent"), Or = Symbol.for("##up"), ms = Symbol.for("##context"), mt = Symbol.for("#domNode"), Se = Symbol.for("##placeholderNode"), gs = Symbol.for("#domDeopt"), we = Symbol.for("##visitContext"), ys = Symbol.for("#isRichElement"), _s = Symbol.for("#src"), Tt = Symbol.for("#htmlNodeName"), Sh = Symbol.for("#getSlot"), bs = Symbol.for("#ImbaElement"), vs = Symbol.for("#cssns"), wh = Symbol.for("#cssid"), xs = Symbol(), {Event: K, UIEvent: Eh, MouseEvent: Cr, PointerEvent: Nr, KeyboardEvent: Pr, CustomEvent: k, Node: I, Comment: Ht, Text: Ee, Element: v, HTMLElement: Te, HTMLHtmlElement: Th, HTMLSelectElement: kr, HTMLInputElement: Lr, HTMLTextAreaElement: $r, HTMLButtonElement: Mr, HTMLOptionElement: Fr, HTMLScriptElement: Oh, SVGElement: Ir, DocumentFragment: Ch, ShadowRoot: Nh, Document: Ot, Window: Ph, customElements: kh} = globalThis.window, Ss = {}; function ws(i, t, e) { if (!i) return e[t] = null; if (e[t] !== void 0) return e[t]; let r = Object.getOwnPropertyDescriptor(i, t); return r !== void 0 || i == Ir ? e[t] = r || null : ws(Reflect.getPrototypeOf(i), t, e); } var Rr = {}, Dr = {}, Oe = {}, Es = {}; function Ut() { return globalThis.document; } function Lh() { return true; } var $h = {get(i, t) { let e = i, r; for (; e && r == null; ) (e = e[Vt]) && (r = e[t]); return r; }, set(i, t, e) { let r = i, s; for (; r && s == null; ) { if (Dt(r, t, v)) return r[t] = e, true; r = r[Vt]; } return true; }}, Ts = class { get flags() { return this.documentElement.flags; } }; qt(Ot.prototype, Ts.prototype); var Os = class { get [Vt]() { return this[ps] || this.parentNode || this[Or]; } get [ns]() { return this; } get [ch]() { return this[Vt][ns]; } get [dh]() { return this[ms] || (this[ms] = new Proxy(this, $h)); } [xe]() { return this; } [os]() { return this; } [wr](t) { return Sr(this, t); } [ph](t, e) { return this[wr](t)[wr](e); } [ls](t, e) { return t[tt](this, e); } [zt](t) { return t[tt](this, null); } [Er](t, e) { let r = this[ls](t, e); return this[hs](e), r; } [hs](t) { return t[Kt](this); } [tt](t, e = null) { return e ? t.insertBefore(this, e) : t.appendChild(this), this; } [us](t, e) { return e ? t.insertBefore(this[mt] || this, e) : t.appendChild(this[mt] || this), this; } [Kt](t) { return t.removeChild(this); } [as](t) { return t.removeChild(this[mt] || this); } [Et](t, e) { return e[Er](t, this); } [fs](t, e) { return e[Er](t, this[mt] || this); } get [Tr]() { return this[Se] || (this[Se] = globalThis.document.createComment("placeholder")); } set [Tr](t) { let e = this[Se]; this[Se] = t, e && e != t && e.parentNode && e[Et](t); } [mh]() { let t = this[mt], e = t && t.parentNode; return t && e && t != this && (this[mt] = null, this[tt](e, t), t[Kt](e)), this; } [gh]() { (this[gs] != true ? (this[gs] = true, true) : false) && (this[Et] = this[fs], this[Kt] = this[as], this[tt] = this[us], this[Or] || (this[Or] = this[Vt])); let t = this[Tr]; return this.parentNode && t != this && (t[tt](this.parentNode, this), this[Kt](this.parentNode)), this[mt] = t, this; } [yh](t, e, r) { let s = typeof t; if (s === "undefined" || t === null) { if (r && r instanceof Ht) return r; let n = globalThis.document.createComment(""); return r ? r[Et](n, this) : n[tt](this, null); } if (t === r) return t; if (s !== "object") { let n, o = t; return e & 128 && e & 256, r ? r instanceof Ee ? (r.textContent = o, r) : (n = globalThis.document.createTextNode(o), r[Et](n, this), n) : (this.appendChild(n = globalThis.document.createTextNode(o)), n); } else { if (globalThis.DEBUG_IMBA && !t[tt]) throw console.warn("Tried to insert", t, "into", this), new TypeError("Only DOM Nodes can be inserted into DOM"); return r ? r[Et](t, this) : t[tt](this, null); } } }; qt(I.prototype, Os.prototype); var Cs = class { log(...t) { return console.log(...t), this; } emit(t, e, r = {bubbles: true, cancelable: true}) { e != null && (r.detail = e); let s = new k(t, r), n = this.dispatchEvent(s); return s; } text$(t) { return this.textContent = t, this; } [_h]() { return this; } [bh]() { return this; } [vh]() { this.render && this.render(), this[we] && (this[we] = null); } get [xh]() { return this[we] || (this[we] = {}); } get flags() { return this.$flags || (this.$flags = new jt(this), this.flag$ == v.prototype.flag$ && (this.flags$ext = this.className), this.flagDeopt$()), this.$flags; } flag$(t) { let e = this.flags$ns; this.className = e ? e + (this.flags$ext = t) : this.flags$ext = t; } flagDeopt$() { var t = this; this.flag$ = this.flagExt$, t.flagSelf$ = function(e) { return t.flagSync$(t.flags$own = e); }; } flagExt$(t) { return this.flagSync$(this.flags$ext = t); } flagSelf$(t) { return this.flagDeopt$(), this.flagSelf$(t); } flagSync$() { return this.className = (this.flags$ns || "") + (this.flags$ext || "") + " " + (this.flags$own || "") + " " + (this.$flags || ""); } set$(t, e) { let r = Dt(this, t, v); !r || !r.set ? this.setAttribute(t, e) : this[t] = e; } get richValue() { return this.value; } set richValue(t) { this.value = t; } }; qt(v.prototype, Cs.prototype); v.prototype.setns$ = v.prototype.setAttributeNS; v.prototype[ys] = true; function Mh(i, t, e, r) { let s = globalThis.document.createElement(i); return e && (s.className = e), r !== null && s.text$(r), t && t[zt] && t[zt](s), s; } var Ns = class { set$(t, e) { var r; let s = Ss[r = this.nodeName] || (Ss[r] = {}), n = ws(this, t, s); !n || !n.set ? this.setAttribute(t, e) : this[t] = e; } flag$(t) { let e = this.flags$ns; this.setAttribute("class", e ? e + (this.flags$ext = t) : this.flags$ext = t); } flagSelf$(t) { var e = this; return e.flag$ = function(r) { return e.flagSync$(e.flags$ext = r); }, e.flagSelf$ = function(r) { return e.flagSync$(e.flags$own = r); }, e.flagSelf$(t); } flagSync$() { return this.setAttribute("class", (this.flags$ns || "") + (this.flags$ext || "") + " " + (this.flags$own || "") + " " + (this.$flags || "")); } }; qt(Ir.prototype, Ns.prototype); var Ps = class { set src(t) { if ((this[_s] != t ? (this[_s] = t, true) : false) && t) { if (t.adoptNode) t.adoptNode(this); else if (t.content) { for (let e = t.attributes, r = 0, s = Object.keys(e), n = s.length, o, l; r < n; r++) o = s[r], l = e[o], this.setAttribute(o, l); this.innerHTML = t.content; } } } }; qt(SVGSVGElement.prototype, Ps.prototype); function Fh(i, t, e, r, s) { let n = globalThis.document.createElementNS("http://www.w3.org/2000/svg", i); return e && (n.className.baseVal = e), t && t[zt] && t[zt](n), r && (n.textContent = r), n; } function et(i) { return globalThis.document.createComment(i); } function Ce(i) { return globalThis.document.createTextNode(i); } function Ih() { return globalThis.document.createDocumentFragment(); } var Ne = globalThis.navigator, Rh = Ne && Ne.vendor || "", ks = Ne && Ne.userAgent || "", Dh = Rh.indexOf("Apple") > -1 || ks.indexOf("CriOS") >= 0 || ks.indexOf("FxiOS") >= 0, Pe = !Dh, Ls = new Map(), $s = class extends Te { connectedCallback() { return Pe ? this.parentNode.removeChild(this) : this.parentNode.connectedCallback(); } disconnectedCallback() { if (!Pe) return this.parentNode.disconnectedCallback(); } }; window.customElements.define("i-hook", $s); function Ah(i, t) { let e = Ls.get(t); if (!e) { e = {}; let r = t.prototype, s = [r]; for (; (r = r && Object.getPrototypeOf(r)) && r.constructor != i.constructor; ) s.unshift(r); for (let n = 0, o = fh(s), l = o.length; n < l; n++) { let h = o[n], a = Object.getOwnPropertyDescriptors(h); Object.assign(e, a); } Ls.set(t, e); } return e; } function Ms(i, t, e, r, s) { let n; typeof i != "string" && i && i.nodeName && (i = i.nodeName); let o = Dr[i] || i; if (Rr[i]) { let l = Rr[i], h = l.prototype[Tt]; if (h && Pe) n = globalThis.document.createElement(h, {is: i}); else if (l.create$ && h) { n = globalThis.document.createElement(h), n.setAttribute("is", o); let a = Ah(n, l); Object.defineProperties(n, a), n.__slots = {}, n.appendChild(globalThis.document.createElement("i-hook")); } else l.create$ ? (n = l.create$(n), n.__slots = {}) : console.warn("could not create tag " + i); } else n = globalThis.document.createElement(Dr[i] || i); return n[ps] = t, n[xe](), n[os](), r !== null && n[Sh]("__").text$(r), (e || n.flags$ns) && n.flag$(e || ""), n; } function jh(i, t, e, r) { if (i == null || i == null) return et(""); if (i instanceof I) return i; if (i[ys]) return i; if (typeof i == "string" || i && i.prototype instanceof I) return Ms(i, t, e, r); } function Fs(i, t) { if (Oe[i]) return Oe[i]; if (window[t]) return window[t]; if (window[i]) return window[i]; } function qh(i, t, e) { let r = Fs(i, t); if (!(r == e || r.prototype instanceof e || r.prototype[Tt])) { let n = r.prototype[bs]; if (!n) { n = class extends r { static [xe]() { return this.prototype[cs] = xs, this; } constructor() { super(...arguments); this.__slots = {}, this.__F = 0, this[cs] === xs && this[ds] && this[ds](); } }[xe](), r.prototype[bs] = n; let o = Object.getOwnPropertyDescriptors(e.prototype); Object.defineProperties(n.prototype, o), n.prototype[Tt] = i; } return n; } return r; } function Vh(i, t, e = {}) { Oe[i] = Es[i] = t, t.nodeName = i; let r = i, s = t.prototype; if (i.indexOf("-") == -1 && (r = "" + i + "-tag", Dr[i] = r), e.cssns) { let n = (s._ns_ || s[vs] || "") + " " + (e.cssns || ""); s._ns_ = n.trim() + " ", s[vs] = e.cssns; } if (e.cssid) { let n = (s.flags$ns || "") + " " + e.cssid; s[wh] = e.cssid, s.flags$ns = n.trim() + " "; } return s[Tt] && !e.extends && (e.extends = s[Tt]), e.extends ? (s[Tt] = e.extends, Rr[i] = t, Pe && window.customElements.define(r, t, {extends: e.extends})) : window.customElements.define(r, t), t; } var zh = globalThis.imba || (globalThis.imba = {}); zh.document = globalThis.document; function Ar(i) { let t; return i ? (t = i.toIterable) ? t.call(i) : i : []; } function Kh(i, t) { let e = Object.getOwnPropertyDescriptors(t); return delete e.constructor, Object.defineProperties(i, e), i; } var ke = Symbol.for("#parent"), Is = Symbol.for("#closestNode"), Hh = Symbol.for("#isRichElement"), Uh = Symbol.for("#afterVisit"), Rs = Symbol.for("#__initor__"), Ds = Symbol.for("#__inited__"), As = Symbol.for("#appendChild"), js = Symbol.for("#removeChild"), rt = Symbol.for("#insertInto"), Le = Symbol.for("#replaceWith"), qs = Symbol.for("#insertChild"), $e = Symbol.for("#removeFrom"), Vs = Symbol.for("#placeChild"), zs = Symbol.for("#__init__"), Bh = Symbol.for("#registerFunctionalSlot"), Yh = Symbol.for("#getFunctionalSlot"), Ks = Symbol.for("#getSlot"), jr = Symbol.for("##parent"), Me = Symbol.for("##up"), Hs = Symbol.for("##flags"), Wh = Symbol.for("#domFlags"), H = Symbol.for("#end"), Us = Symbol.for("#textContent"), Fe = Symbol.for("#textNode"), qr = Symbol.for("#functionalSlots"), Bs = Symbol(); function Gh() { return true; } var ot = class { constructor() { this.childNodes = []; } log(...t) { } hasChildNodes() { return false; } set [ke](t) { this[jr] = t; } get [ke]() { return this[jr] || this[Me]; } get [Is]() { return this[ke][Is]; } get [Hh]() { return true; } get flags() { return this[Hs] || (this[Hs] = new jt(this)); } flagSync$() { return this; } [Uh]() { return this; } }, Xh = 0, Ie = class extends ot { static [zs]() { return this.prototype[Rs] = Bs, this; } constructor(t, e) { super(...arguments); this[Me] = e, this.parentNode = null, this[Wh] = t, this.childNodes = [], this[H] = et("slot" + Xh++), e && e[As](this), this[Rs] === Bs && this[Ds] && this[Ds](); } get [ke]() { return this[jr] || this.parentNode || this[Me]; } set textContent(t) { this[Us] = t; } get textContent() { return this[Us]; } hasChildNodes() { for (let t = 0, e = Ar(this.childNodes), r = e.length; t < r; t++) { let s = e[t]; if (s instanceof ot && s.hasChildNodes()) return true; if (!(s instanceof Ht)) { if (s instanceof I) return true; } } return false; } text$(t) { return this[Fe] ? this[Fe].textContent = t : this[Fe] = this[Vs](t), this[Fe]; } appendChild(t) { return this.parentNode && t[rt](this.parentNode, this[H]), this.childNodes.push(t); } [As](t) { return this.parentNode && t[rt](this.parentNode, this[H]), this.childNodes.push(t); } insertBefore(t, e) { this.parentNode && this.parentNode[qs](t, e); let r = this.childNodes.indexOf(e); return r >= 0 && this.childNodes.splice(r, 0, t), t; } [js](t) { this.parentNode && this.parentNode[js](t); let e = this.childNodes.indexOf(t); e >= 0 && this.childNodes.splice(e, 1); } [rt](t, e) { let r = this.parentNode; if (this.parentNode != t ? (this.parentNode = t, true) : false) { this[H] && (e = this[H][rt](t, e)); for (let s = 0, n = Ar(this.childNodes), o = n.length; s < o; s++) n[s][rt](t, e); } return this; } [Le](t, e) { let r = t[rt](e, this[H]); return this[$e](e), r; } [qs](t, e) { if (this.parentNode && this.insertBefore(t, e || this[H]), e) { let r = this.childNodes.indexOf(e); r >= 0 && this.childNodes.splice(r, 0, t); } else this.childNodes.push(t); return t; } [$e](t) { for (let e = 0, r = Ar(this.childNodes), s = r.length; e < s; e++) r[e][$e](t); return this[H] && this[H][$e](t), this.parentNode = null, this; } [Vs](t, e, r) { let s = this.parentNode, n = typeof t; if (n === "undefined" || t === null) { if (r && r instanceof Ht) return r; let o = et(""); if (r) { let l = this.childNodes.indexOf(r); return this.childNodes.splice(l, 1, o), s && r[Le](o, s), o; } return this.childNodes.push(o), s && o[rt](s, this[H]), o; } if (t === r) return t; if (n !== "object") { let o, l = t; if (r) { if (r instanceof Ee) return r.textContent = l, r; { o = Ce(l); let h = this.childNodes.indexOf(r); return this.childNodes.splice(h, 1, o), s && r[Le](o, s), o; } } else return this.childNodes.push(o = Ce(l)), s && o[rt](s, this[H]), o; } else if (r) { let o = this.childNodes.indexOf(r); return this.childNodes.splice(o, 1, t), s && r[Le](t, s), t; } else return this.childNodes.push(t), s && t[rt](s, this[H]), t; } }; Ie[zs](); function Qh(i, t) { return new Ie(i, t); } function Bt(i, t) { let e = new Ie(i, null); return e[Me] = t, e; } var Ys = class { [Bh](t) { let e = this[qr] || (this[qr] = {}); return e[t] || (e[t] = Bt(0, this)); } [Yh](t, e) { let r = this[qr]; return r && r[t] || this[Ks](t, e); } [Ks](t, e) { var r; return t == "__" && !this.render ? this : (r = this.__slots)[t] || (r[t] = Bt(0, this)); } }; Kh(I.prototype, Ys.prototype); function Jh(i) { let t; return i ? (t = i.toIterable) ? t.call(i) : i : []; } var Zh = Symbol.for("#afterVisit"), Re = Symbol.for("#insertInto"), Ws = Symbol.for("#appendChild"), tu = Symbol.for("#replaceWith"), Vr = Symbol.for("#removeFrom"), Gs = Symbol.for("#__initor__"), Xs = Symbol.for("#__inited__"), Qs = Symbol.for("#__init__"), eu = Symbol.for("#domFlags"), ru = Symbol.for("##parent"), lt = Symbol.for("#end"), iu = Symbol.for("#removeChild"), su = Symbol.for("#insertChild"), Js = Symbol(), zr = class extends ot { static [Qs]() { return this.prototype[Gs] = Js, this; } constructor(t, e) { super(...arguments); this[eu] = t, this[ru] = e, t & 256 || (this[lt] = et("list")), this.$ = this.childNodes, this.length = 0, e && e[Ws](this), this[Gs] === Js && this[Xs] && this[Xs](); } hasChildNodes() { return this.length != 0; } [Zh](t) { let e = this.length; if (this.length = t, e == t) return; let r = this.parentNode; if (!r) return; let s = this.childNodes, n = this[lt]; if (e > t) for (; e > t; ) r[iu](s[--e]); else if (t > e) for (; t > e; ) r[su](s[e++], n); this.length = t; } [Re](t, e) { this.parentNode = t, this[lt] && this[lt][Re](t, e), e = this[lt]; for (let r = 0, s = Jh(this.childNodes), n = s.length; r < n; r++) { let o = s[r]; if (r == this.length) break; o[Re](t, e); } return this; } [Ws](t) { } [tu](t, e) { let r = t[Re](e, this[lt]); return this[Vr](e), r; } [Vr](t) { let e = this.length; for (; e > 0; ) this.childNodes[--e][Vr](t); this[lt] && t.removeChild(this[lt]), this.parentNode = null; } }; zr[Qs](); function nu(i, t) { return new zr(i, t); } function Zs(i) { let t; return i ? (t = i.toIterable) ? t.call(i) : i : []; } var Kr = Symbol.for("#appendChild"), De = Symbol.for("#insertChild"), ou = Symbol.for("#replaceWith"), Ae = Symbol.for("#insertInto"), Hr = Symbol.for("#removeFrom"), lu = Symbol.for("#afterVisit"), tn = Symbol.for("#__initor__"), en = Symbol.for("#__inited__"), rn = Symbol.for("#__init__"), je = Symbol.for("#domFlags"), sn = Symbol.for("##parent"), ht = Symbol.for("#end"), nn = Symbol.for("#removeChild"), on = Symbol(), Ur = class extends ot { static [rn]() { return this.prototype[tn] = on, this; } constructor(t, e) { super(...arguments); this[je] = t, this[sn] = e, this.changes = new Map(), this.dirty = false, this.array = this.childNodes, this.$ = new Y(this, Symbol()), t & 256 || (this[ht] = et("map")), e && e[Kr](this), this[tn] === on && this[en] && this[en](); } [Kr](t) { if (this.parentNode) return this.parentNode[De](t, this[ht]); } hasChildNodes() { return this.childNodes.length != 0; } push(t, e) { if (!(this[je] & 1)) { this.array.push(t), this[Kr](t); return; } let r = this.array[e]; if (r !== t) { this.dirty = true; let s = this.array.indexOf(t), n = this.changes.get(t); s === -1 ? (this.array.splice(e, 0, t), this.insertChild(t, e, s)) : s === e + 1 ? (r && this.changes.set(r, -1), this.array.splice(e, 1)) : (s >= 0 && this.array.splice(s, 1), this.array.splice(e, 0, t), this.moveChild(t, e, s)), n == -1 && this.changes.delete(t); } } insertChild(t, e, r) { let s = this.parentNode; if (!!s) if (e > 0) { let n = this.array[e - 1]; s[De](t, n.nextSibling); } else s[De](t, this.childNodes[e + 1] || this[ht]); } moveChild(t, e, r) { return this.insertChild(t, e, r); } removeChild(t, e) { t.parentNode && t[Hr](t.parentNode); } [De](t, e) { } [ou](t, e) { let r = t[Ae](e, this[ht]); return this[Hr](e), r; } [Ae](t, e) { this[sn] = t; let r = this.parentNode; if (t != r) { this.parentNode = t; for (let s = 0, n = Zs(this.array), o = n.length; s < o; s++) n[s][Ae](t, e); this[ht] && this[ht][Ae](t, e); } return this; } [Hr](t) { for (let e = 0, r = Zs(this.array), s = r.length; e < s; e++) { let n = r[e]; t[nn](n); } return this[ht] && t[nn](this[ht]), this.parentNode = null; } [lu](t) { var e = this; if (!(this[je] & 1)) { this[je] |= 1; return; } if (this.dirty && (e.changes.forEach(function(r, s) { if (r == -1) return e.removeChild(s); }), e.changes.clear(), e.dirty = false), e.array.length > t) for (; e.array.length > t; ) { let r = e.array.pop(); e.removeChild(r); } } }; Ur[rn](); function hu(i, t) { return new Ur(i, t); } var Ct = Symbol.for("#__init__"), ln = Symbol.for("#__initor__"), hn = Symbol.for("#__inited__"), uu = Symbol.for("##inited"), au = Symbol.for("#afterVisit"), fu = Symbol.for("#beforeReconcile"), cu = Symbol.for("#afterReconcile"), un = Symbol.for("#__hooks__"), Nt = Symbol.for("#autorender"), an = Symbol.for("##visitContext"), fn = Symbol(), cn = new class { constructor(i = null) { this[Ct](i); } [Ct](i = null) { var t; this.items = i && (t = i.items) !== void 0 ? t : [], this.current = i && (t = i.current) !== void 0 ? t : null, this.lastQueued = i && (t = i.lastQueued) !== void 0 ? t : null, this.tests = i && (t = i.tests) !== void 0 ? t : 0; } flush() { let i = null; for (; i = this.items.shift(); ) { if (!i.parentNode || i.hydrated\u03A6) continue; let t = this.current; this.current = i, i.__F |= 1024, i.connectedCallback(), this.current = t; } } queue(i) { var t = this; let e = this.items.length, r = 0, s = this.lastQueued; this.lastQueued = i; let n = I.DOCUMENT_POSITION_PRECEDING, o = I.DOCUMENT_POSITION_FOLLOWING; if (e) { let l = this.items.indexOf(s), h = l, a = function(u, d) { return t.tests++, u.compareDocumentPosition(d); }; (l == -1 || s.nodeName != i.nodeName) && (h = l = 0); let c = t.items[h]; for (; c && a(c, i) & o; ) c = t.items[++h]; if (h != l) c ? t.items.splice(h, 0, i) : t.items.push(i); else { for (; c && a(c, i) & n; ) c = t.items[--h]; h != l && (c ? t.items.splice(h + 1, 0, i) : t.items.unshift(i)); } } else t.items.push(i), t.current || globalThis.queueMicrotask(t.flush.bind(t)); } }(); function du() { return cn.flush(); } var Pt = class extends Te { static [Ct]() { return this.prototype[ln] = fn, this; } constructor() { super(); this.flags$ns && (this.flag$ = this.flagExt$), this.setup$(), this.build(), this[ln] === fn && this[hn] && this[hn](); } setup$() { return this.__slots = {}, this.__F = 0; } [Ct]() { return this.__F |= 1 | 2, this; } [uu]() { if (this[un]) return this[un].inited(this); } flag$(t) { this.className = this.flags$ext = t; } build() { return this; } awaken() { return this; } mount() { return this; } unmount() { return this; } rendered() { return this; } dehydrate() { return this; } hydrate() { return this.autoschedule = true, this; } tick() { return this.commit(); } visit() { return this.commit(); } commit() { return this.render\u03A6 ? (this.__F |= 256, this.render && this.render(), this.rendered(), this.__F = (this.__F | 512) & ~256 & ~8192) : (this.__F |= 8192, this); } get autoschedule() { return (this.__F & 64) != 0; } set autoschedule(t) { t ? this.__F |= 64 : this.__F &= ~64; } set autorender(t) { let e = this[Nt] || (this[Nt] = {}); e.value = t, this.mounted\u03A6 && N.schedule(this, e); } get render\u03A6() { return !this.suspended\u03A6; } get mounting\u03A6() { return (this.__F & 16) != 0; } get mounted\u03A6() { return (this.__F & 32) != 0; } get awakened\u03A6() { return (this.__F & 8) != 0; } get rendered\u03A6() { return (this.__F & 512) != 0; } get suspended\u03A6() { return (this.__F & 4096) != 0; } get rendering\u03A6() { return (this.__F & 256) != 0; } get scheduled\u03A6() { return (this.__F & 128) != 0; } get hydrated\u03A6() { return (this.__F & 2) != 0; } get ssr\u03A6() { return (this.__F & 1024) != 0; } schedule() { return N.on("commit", this), this.__F |= 128, this; } unschedule() { return N.un("commit", this), this.__F &= ~128, this; } async suspend(t = null) { let e = this.flags.incr("_suspended_"); return this.__F |= 4096, t instanceof Function && (await t(), this.unsuspend()), this; } unsuspend() { return this.flags.decr("_suspended_") == 0 && (this.__F &= ~4096, this.commit()), this; } [au]() { if (this.visit(), this[an]) return this[an] = null; } [fu]() { return this.__F & 1024 && (this.__F = this.__F & ~1024, this.classList.remove("_ssr_"), this.flags$ext && this.flags$ext.indexOf("_ssr_") == 0 && (this.flags$ext = this.flags$ext.slice(5)), this.__F & 512 || (this.innerHTML = "")), globalThis.DEBUG_IMBA && wt.push(this), this; } [cu]() { return globalThis.DEBUG_IMBA && wt.pop(this), this; } connectedCallback() { let t = this.__F, e = t & 1, r = t & 8; if (!e && !(t & 1024)) { cn.queue(this); return; } if (t & (16 | 32)) return; this.__F |= 16, e || this[Ct](), t & 2 || (this.flags$ext = this.className, this.__F |= 2, this.hydrate(), this.commit()), r || (this.awaken(), this.__F |= 8), j(this, "mount"); let s = this.mount(); return s && s.then instanceof Function && s.then(N.commit), t = this.__F = (this.__F | 32) & ~16, t & 64 && this.schedule(), this[Nt] && N.schedule(this, this[Nt]), this; } disconnectedCallback() { if (this.__F = this.__F & (~32 & ~16), this.__F & 128 && this.unschedule(), j(this, "unmount"), this.unmount(), this[Nt]) return N.unschedule(this, this[Nt]); } }; Pt[Ct](); var pu = Pt; function mu(i, t) { let e = Object.getOwnPropertyDescriptors(t); return delete e.constructor, Object.defineProperties(i, e), i; } var dn = Symbol.for("#__init__"), ac = Symbol.for("#__initor__"), fc = Symbol.for("#__inited__"), gu = {cm: 1, mm: 1, Q: 1, pc: 1, pt: 1, px: 1, em: 1, ex: 1, ch: 1, rem: 1, vw: 1, vh: 1, vmin: 1, vmax: 1, s: 1, ms: 1, fr: 1, "%": 1, in: 1, turn: 1, grad: 1, rad: 1, deg: 1, Hz: 1, kHz: 1}; var pn = {prefix: 1, suffix: 1, content: 1}, Br = {rose: [[356, 100, 97], [356, 100, 95], [353, 96, 90], [353, 96, 82], [351, 95, 71], [350, 89, 60], [347, 77, 50], [345, 83, 41], [343, 80, 35], [342, 75, 30]], pink: [[327, 73, 97], [326, 78, 95], [326, 85, 90], [327, 87, 82], [329, 86, 70], [330, 81, 60], [333, 71, 51], [335, 78, 42], [336, 74, 35], [336, 69, 30]], fuchsia: [[289, 100, 98], [287, 100, 95], [288, 96, 91], [291, 93, 83], [292, 91, 73], [292, 84, 61], [293, 69, 49], [295, 72, 40], [295, 70, 33], [297, 64, 28]], purple: [[270, 100, 98], [269, 100, 95], [269, 100, 92], [269, 97, 85], [270, 95, 75], [271, 91, 65], [271, 81, 56], [272, 72, 47], [273, 67, 39], [274, 66, 32]], violet: [[250, 100, 98], [251, 91, 95], [251, 95, 92], [252, 95, 85], [255, 92, 76], [258, 90, 66], [262, 83, 58], [263, 70, 50], [263, 69, 42], [264, 67, 35]], indigo: [[226, 100, 97], [226, 100, 94], [228, 96, 89], [230, 94, 82], [234, 89, 74], [239, 84, 67], [243, 75, 59], [245, 58, 51], [244, 55, 41], [242, 47, 34]], blue: [[214, 100, 97], [214, 95, 93], [213, 97, 87], [212, 96, 78], [213, 94, 68], [217, 91, 60], [221, 83, 53], [224, 76, 48], [226, 71, 40], [224, 64, 33]], sky: [[204, 100, 97], [204, 94, 94], [201, 94, 86], [199, 95, 74], [198, 93, 60], [199, 89, 48], [200, 98, 39], [201, 96, 32], [201, 90, 27], [202, 80, 24]], cyan: [[183, 100, 96], [185, 96, 90], [186, 94, 82], [187, 92, 69], [188, 86, 53], [189, 94, 43], [192, 91, 36], [193, 82, 31], [194, 70, 27], [196, 64, 24]], teal: [[166, 76, 97], [167, 85, 89], [168, 84, 78], [171, 77, 64], [172, 66, 50], [173, 80, 40], [175, 84, 32], [175, 77, 26], [176, 69, 22], [176, 61, 19]], emerald: [[152, 81, 96], [149, 80, 90], [152, 76, 80], [156, 72, 67], [158, 64, 52], [160, 84, 39], [161, 94, 30], [163, 94, 24], [163, 88, 20], [164, 86, 16]], green: [[138, 76, 97], [141, 84, 93], [141, 79, 85], [142, 77, 73], [142, 69, 58], [142, 71, 45], [142, 76, 36], [142, 72, 29], [143, 64, 24], [144, 61, 20]], lime: [[78, 92, 95], [80, 89, 89], [81, 88, 80], [82, 85, 67], [83, 78, 55], [84, 81, 44], [85, 85, 35], [86, 78, 27], [86, 69, 23], [88, 61, 20]], yellow: [[55, 92, 95], [55, 97, 88], [53, 98, 77], [50, 98, 64], [48, 96, 53], [45, 93, 47], [41, 96, 40], [35, 92, 33], [32, 81, 29], [28, 73, 26]], amber: [[48, 100, 96], [48, 96, 89], [48, 97, 77], [46, 97, 65], [43, 96, 56], [38, 92, 50], [32, 95, 44], [26, 90, 37], [23, 83, 31], [22, 78, 26]], orange: [[33, 100, 96], [34, 100, 92], [32, 98, 83], [31, 97, 72], [27, 96, 61], [25, 95, 53], [21, 90, 48], [17, 88, 40], [15, 79, 34], [15, 75, 28]], red: [[0, 86, 97], [0, 93, 94], [0, 96, 89], [0, 94, 82], [0, 91, 71], [0, 84, 60], [0, 72, 51], [0, 74, 42], [0, 70, 35], [0, 63, 31]], warmer: [[60, 9, 98], [60, 5, 96], [20, 6, 90], [24, 6, 83], [24, 5, 64], [25, 5, 45], [33, 5, 32], [30, 6, 25], [12, 6, 15], [24, 10, 10]], warm: [[0, 0, 98], [0, 0, 96], [0, 0, 90], [0, 0, 83], [0, 0, 64], [0, 0, 45], [0, 0, 32], [0, 0, 25], [0, 0, 15], [0, 0, 9]], gray: [[0, 0, 98], [240, 5, 96], [240, 6, 90], [240, 5, 84], [240, 5, 65], [240, 4, 46], [240, 5, 34], [240, 5, 26], [240, 4, 16], [240, 6, 10]], cool: [[210, 20, 98], [220, 14, 96], [220, 13, 91], [216, 12, 84], [218, 11, 65], [220, 9, 46], [215, 14, 34], [217, 19, 27], [215, 28, 17], [221, 39, 11]], cooler: [[210, 40, 98], [210, 40, 96], [214, 32, 91], [213, 27, 84], [215, 20, 65], [215, 16, 47], [215, 19, 35], [215, 25, 27], [217, 33, 17], [222, 47, 11]]}, yu = new RegExp("^(" + Object.keys(Br).join("|") + ")(\\d+(?:\\.\\d+)?)$"), _u = /^([xyz])$/, bu = /^([tlbr]|size|[whtlbr]|[mps][tlbrxy]?|[rcxy]?[gs])$/, vu = `*,::before,::after { box-sizing: border-box; border-width: 0; border-style: solid; border-color: currentColor; }`, mn = class { constructor(t = null) { this[dn](t); } [dn](t = null) { var e; this.entries = t && (e = t.entries) !== void 0 ? e : {}; } register(t, e) { let r = this.entries[t]; r ? r && (r.css = e, r.node && (r.node.textContent = e)) : (r = this.entries[t] = {sourceId: t, css: e}, this.entries.resets || this.register("resets", vu), r.node = globalThis.document.createElement("style"), r.node.setAttribute("data-id", t), r.node.textContent = r.css, globalThis.document.head.appendChild(r.node)); } toString() { return Object.values(this.entries).map(function(t) { return t.css; }).join(` `); } toValue(t, e, r, s = null) { let n; pn[r] && (t = String(t)); let o = typeof t; if (o == "number") { if (e || (_u.test(r) ? e = "px" : bu.test(r) ? e = "u" : r == "rotate" && (e = "turn", t = (t % 1).toFixed(4))), e) return gu[e] ? t + e : e == "u" ? t * 4 + "px" : "calc(var(--u_" + e + ",1px) * " + t + ")"; } else if (o == "string") { if (r && pn[r] && t[0] != '"' && t[0] != "'" && (t.indexOf('"') >= 0 ? t.indexOf("'") == -1 && (t = "'" + t + "'") : t = '"' + t + '"'), n = t.match(yu)) { let h = Br[n[1]][parseInt(n[2])], a = "100%"; if (typeof s == "number" ? a = s + "%" : typeof s == "string" && (a = s), h) return "hsla(" + h[0] + "," + h[1] + "%," + h[2] + "%," + a + ")"; } } else if (t && t.toStyleString instanceof Function) return t.toStyleString(); return t; } parseDimension(t) { if (typeof t == "string") { let [e, r, s] = t.match(/^([-+]?[\d\.]+)(%|\w+)$/); return [parseFloat(r), s]; } else if (typeof t == "number") return [t]; } }, gn = new mn(), xu = Object.keys(Br); function Su() { return true; } var yn = class { css$(t, e, r) { return this.style[t] = e; } css$var(t, e, r, s, n = null) { let o = gn.toValue(e, r, s, n); this.style.setProperty(t, o); } }; mu(v.prototype, yn.prototype); var wu = Symbol.for("#insertInto"), _n = Symbol.for("#removeFrom"); function Eu(i, t = {}) { let e = P.context; P.context = t; let r = i(t); return P.context == t && (P.context = e), r; } function bn(i, t) { let e = t || globalThis.document.body, r = i; if (i instanceof Function) { let s = new Y(e, null), n = function() { let o = P.context; P.context = s; let l = i(s); return P.context == s && (P.context = o), l; }; r = n(), N.listen("commit", n); } else r.__F |= 64; return r[wu](e), r; } function vn(i) { return i && i[_n] && i[_n](i.parentNode), i; } var xn = globalThis.imba || (globalThis.imba = {}); xn.mount = bn; xn.unmount = vn; function kt(i, t) { let e = Object.getOwnPropertyDescriptors(t); return delete e.constructor, Object.defineProperties(i, e), i; } function Yt(i) { let t; return i ? (t = i.toIterable) ? t.call(i) : i : []; } var Wt = Symbol.for("##onchange"), Gt = Symbol.for("#afterVisit"), Xt = Symbol.for("##oninput"), qe = Symbol.for("##onclick"), Qt = Symbol.for("##bound"), ut = Symbol.for("##visitContext"); function Tu() { return true; } var Ou = {INPUT: true, SELECT: true, TEXTAREA: true, BUTTON: true}, Yr = function(i) { return i instanceof Array || i && i.has instanceof Function; }, Wr = function(i, t) { return i == t ? true : i instanceof Array ? i.indexOf(t) >= 0 : i && i.has instanceof Function ? i.has(t) : i && i.contains instanceof Function ? i.contains(t) : false; }, Gr = function(i, t) { if (i instanceof Array) return i.push(t); if (i && i.add instanceof Function) return i.add(t); }, Xr = function(i, t) { if (i instanceof Array) { let e = i.indexOf(t); if (e >= 0) return i.splice(e, 1); } else if (i && i.delete instanceof Function) return i.delete(t); }; function Cu(i) { function t() { return i[0] ? i[0][i[1]] : void 0; } function e(r) { return i[0] ? i[0][i[1]] = r : null; } return {get: t, set: e}; } var Sn = class { getRichValue() { return this.value; } setRichValue(t) { return this.value = t; } bind$(t, e) { let r = e || []; return t == "data" && !this[Qt] && Ou[this.nodeName] && (this[Qt] = true, this[Wt] && this.addEventListener("change", this[Wt] = this[Wt].bind(this)), this[Xt] && this.addEventListener("input", this[Xt] = this[Xt].bind(this), {capture: true}), this[qe] && this.addEventListener("click", this[qe] = this[qe].bind(this), {capture: true})), Object.defineProperty(this, t, r instanceof Array ? Cu(r) : r), r; } }; kt(v.prototype, Sn.prototype); Object.defineProperty(v.prototype, "richValue", {get: function() { return this.getRichValue(); }, set: function(i) { return this.setRichValue(i); }}); var wn = class { [Wt](t) { let e = this.data, r = this.$$value; this.$$value = void 0; let s = this.getRichValue(); if (this.multiple) { if (r) for (let n = 0, o = Yt(r), l = o.length; n < l; n++) { let h = o[n]; s.indexOf(h) == -1 && Xr(e, h); } for (let n = 0, o = Yt(s), l = o.length; n < l; n++) { let h = o[n]; (!r || r.indexOf(h) == -1) && Gr(e, h); } } else this.data = s[0]; return L(), this; } getRichValue() { var t; if (this.$$value) return this.$$value; t = []; for (let e = 0, r = Yt(this.selectedOptions), s = r.length; e < s; e++) { let n = r[e]; t.push(n.richValue); } return this.$$value = t; } syncValue() { let t = this.data; if (this.multiple) { let e = []; for (let r = 0, s = Yt(this.options), n = s.length; r < n; r++) { let o = s[r], l = o.richValue, h = Wr(t, l); o.selected = h, h && e.push(l); } this.$$value = e; } else for (let e = 0, r = Yt(this.options), s = r.length; e < s; e++) { let o = r[e].richValue; if (o == t) { this.$$value = [o], this.selectedIndex = e; break; } } } [Gt]() { if (this.syncValue(), this[ut]) return this[ut] = null; } }; kt(kr.prototype, wn.prototype); var En = class { setRichValue(t) { return this.$$value = t, this.value = t; } getRichValue() { return this.$$value !== void 0 ? this.$$value : this.value; } }; kt(Fr.prototype, En.prototype); var Tn = class { setRichValue(t) { return this.$$value = t, this.value = t; } getRichValue() { return this.$$value !== void 0 ? this.$$value : this.value; } [Xt](t) { return this.data = this.value, L(); } [Gt]() { let t = this.data; if (t == null && (t = ""), this[Qt] && this.value != t && (this.value = t), this[ut]) return this[ut] = null; } }; kt($r.prototype, Tn.prototype); var On = class { [Xt](t) { let e = this.type; if (!(e == "checkbox" || e == "radio")) return this.$$value = void 0, this.data = this.richValue, L(); } [Wt](t) { let e = this.data, r = this.richValue; if (this.type == "checkbox" || this.type == "radio") { let s = this.checked; Yr(e) ? s ? Gr(e, r) : Xr(e, r) : this.data = s ? r : false; } return L(); } setRichValue(t) { this.$$value !== t && (this.$$value = t, this.value !== t && (this.value = t)); } getRichValue() { if (this.$$value !== void 0) return this.$$value; let t = this.value, e = this.type; return e == "range" || e == "number" ? (t = this.valueAsNumber, Number.isNaN(t) && (t = null)) : e == "checkbox" && (t == null || t === "on") && (t = true), t; } [Gt]() { if (this[Qt]) { let t = this.type; if (t == "checkbox" || t == "radio") { let e = this.data; e === true || e === false || e == null ? this.checked = !!e : this.checked = Wr(e, this.richValue); } else this.richValue = this.data; } this[ut] && (this[ut] = null); } }; kt(Lr.prototype, On.prototype); var Cn = class { get checked() { return this.$checked; } set checked(t) { t != this.$checked && (this.$checked = t, this.flags.toggle("checked", !!t)); } setRichValue(t) { return this.$$value = t, this.value = t; } getRichValue() { return this.$$value !== void 0 ? this.$$value : this.value; } [qe](t) { let e = this.data, r = this.checked, s = this.richValue; return Yr(e) ? r ? Xr(e, s) : Gr(e, s) : this.$$value == null ? this.data = !r : this.data = r ? null : s, this[Gt](), L(); } [Gt]() { if (this[Qt]) { let t = this.data, e = this.$$value == null ? true : this.$$value; Yr(t) ? this.checked = Wr(t, e) : this.checked = t == e; } this[ut] && (this[ut] = null); } }; kt(Mr.prototype, Cn.prototype); function Nn(i) { let t; return i ? (t = i.toIterable) ? t.call(i) : i : []; } var Nu = Symbol.for("#getSlot"), Pu = Symbol.for("#container"), ku = Symbol.for("#afterVisit"), gt = Symbol.for("#__init__"), Pn = Symbol.for("#__initor__"), kn = Symbol.for("#__inited__"), Ve = Symbol.for("#listeners"), G = Symbol.for("#slot"), Lu = Symbol.for("#parent"), q = Symbol.for("##container"), Qr = Symbol.for("#domTarget"), Ln = Symbol.for("#insertInto"), $u = Symbol.for("#removeFrom"), Mu = Symbol.for("#teleport"), Fu = Symbol.for("#self"), Iu = Symbol.for("#target"), $n = Symbol(), ze = class extends Pt { static [gt]() { return this.prototype[Pn] = $n, this; } constructor() { super(...arguments); super[gt] || this[gt](), this[Pn] === $n && this[kn] && this[kn](); } [gt](t = null) { super[gt] && super[gt](...arguments), this.to = t ? t.to : void 0; } build() { return this[Ve] = [], this.win = globalThis, this.doc = globalThis.document; } setup() { return this.setAttribute("style", "display:none !important;"); } [Nu](t, e) { return this[G] || (this[G] = Bt(0, this[Lu])), this[G]; } get [Pu]() { if (!this[q]) { let t = this.className; this[q] = this.doc.createElement("div"), this[q].className = t, this[q].style.cssText = "display:contents !important;"; } return this[q]; } get domTarget() { return this[Qr] || (this[Qr] = this.to instanceof v ? this.to : this.closest(this.to) || this.doc.querySelector(this.to)); } get eventTarget() { return this.domTarget; } get style() { return this[q] ? this[q].style : super.style; } get classList() { return this[q] ? this[q].classList : super.classList; } get className() { return this[q] ? this[q].className : super.className; } set className(t) { this[q] ? this[q].className = t : super.className = t; } [ku]() { if (this.mounted\u03A6 && this[G] && !this[G].parentNode) return this[G][Ln](this.target); } mount() { for (let e = 0, r = Nn(this[Ve]), s = r.length; e < s; e++) { let [n, o, l] = r[e]; this.eventTarget.addEventListener(n, o, l); } let t = this.domTarget; return this[G] && this[G][Ln](t), this; } unmount() { for (let t = 0, e = Nn(this[Ve]), r = e.length; t < r; t++) { let [s, n, o] = e[t]; this.eventTarget.removeEventListener(s, n, o); } return this[G] && this[G][$u](this.domTarget), this[Qr] = null, this; } addEventListener(t, e, r = {}) { var s; if (e[Mu] = this, e[Fu] = this, this[Ve].push([t, e, r]), this.mounted\u03A6 && ((s = this.eventTarget) == null ? void 0 : s.addEventListener)) return this.eventTarget.addEventListener(t, e, r); } }; ze[gt](); var Mn = class extends ze { get domTarget() { return this.doc.body; } get eventTarget() { return this.win; } addEventListener(t, e, r = {}) { return e[Iu] = this.domTarget.parentNode, super.addEventListener(...arguments); } on$resize(t, e, r, s) { return this.addEventListener("resize", r, s), r; } }; globalThis.customElements && (globalThis.customElements.define("i-teleport", ze), globalThis.customElements.define("i-global", Mn)); function Ru() { return true; } function yt(i) { let t; return i ? (t = i.toIterable) ? t.call(i) : i : []; } function Du(i, t) { let e = Object.getOwnPropertyDescriptors(t); return delete e.constructor, Object.defineProperties(i, e), i; } var Fn = Symbol.for("#__init__"), Ec = Symbol.for("#__initor__"), Tc = Symbol.for("#__inited__"), Jr = Symbol.for("#insertInto"), Zr = Symbol.for("#removeFrom"), Au = Symbol.for("#all"), Jt = Symbol.for("#phase"), it = Symbol.for("#nodes"), ju = Symbol.for("#sizes"), In = Symbol.for("#mode"), Rn = Symbol.for("#enabled"), Dn = Symbol.for("#anims"), ti = Symbol.for("#_easer_"), An = class { constructor(t = null) { this[Fn](t); } [Fn](t = null) { var e; this.selectors = t && (e = t.selectors) !== void 0 ? e : {}; } addSelectors(t, e) { var r; return ((r = this.selectors)[e] || (r[e] = [])).push(...t), true; } getSelectors(...t) { let e = []; for (let r = 0, s = yt(t), n = s.length; r < n; r++) { let o = s[r]; this.selectors[o] && e.push(...this.selectors[o]); } return e && e.length ? e.join(",") : null; } nodesForBase(t, e = "transition") { let r = [t], s = (this.selectors[e] || []).join(","); if (s == "") return r; let n = t.querySelectorAll(s); for (let o = 0, l = yt(n), h = l.length; o < h; o++) { let a = l[o]; a.closest("._ease_") == t && r.push(a); } return r[Au] = n, r; } nodesWithSize(t, e = "in") { let r = this.getSelectors("_off_sized", "_" + e + "_sized"); return r ? t.filter(function(s) { return s.matches(r); }) : []; } }, Ke = new An(), qu = globalThis.imba || (globalThis.imba = {}); qu.transitions = Ke; var ei = class { constructor(t) { this.dom = t, this[Jt] = null, this[it] = [], this[ju] = new Map(); } log(...t) { } get flags() { return this.dom.flags; } flag(t) { for (let e = 0, r = yt(this[it]), s = r.length; e < s; e++) r[e].flags.add(t); return this; } unflag(t) { for (let e = 0, r = yt(this[it]), s = r.length; e < s; e++) r[e].flags.remove(t); return this; } commit() { return this.dom.offsetWidth; } enable(t) { return t && (this[In] = t), (this[Rn] != true ? (this[Rn] = true, true) : false) ? (this.dom[Jr] = this[Jr].bind(this), this.dom[Zr] = this[Zr].bind(this), this.flags.add("_ease_")) : this; } disable() { return this.flags.unflag("_ease_"), true; } set phase(t) { var r, s, n, o, l, h, a, c, u, d, b, f; let e = this[Jt]; (this[Jt] != t ? (this[Jt] = t, true) : false) && (e && this.flags.remove("_" + e + "_"), t && this.flags.add("_" + t + "_"), this.flags.toggle("_easing_", !!t), t || (this.unflag("_out_"), this.unflag("_in_"), this.unflag("_off_"), this[it] = null), t == "enter" && e == "leave" && ((s = (r = this.dom) == null ? void 0 : r.transition\u039Eout\u039Ecancel) == null || s.call(r, this)), t == "leave" && e == "enter" && ((o = (n = this.dom) == null ? void 0 : n.transition\u039Ein\u039Ecancel) == null || o.call(n, this)), t == "enter" && ((h = (l = this.dom) == null ? void 0 : l.transition\u039Ein) == null || h.call(l, this)), t == "leave" && ((c = (a = this.dom) == null ? void 0 : a.transition\u039Eout) == null || c.call(a, this)), e == "leave" && !t && ((d = (u = this.dom) == null ? void 0 : u.transition\u039Eout\u039Eend) == null || d.call(u, this)), e == "enter" && !t && ((f = (b = this.dom) == null ? void 0 : b.transition\u039Ein\u039Eend) == null || f.call(b, this))); } get phase() { return this[Jt]; } get leaving\u03A6() { return this.phase == "leave"; } get entering\u03A6() { return this.phase == "enter"; } get idle\u03A6() { return this.phase == null; } track(t) { var e = this; let r = {before: Ut().getAnimations()}; return this.commit(), t(), this.commit(), r.after = Ut().getAnimations(), r.fresh = r.after.filter(function(s) { return r.before.indexOf(s) == -1; }), r.deep = r.fresh.filter(function(s) { let n; return !!((n = s.effect.target) && n.closest("._ease_") != e.dom); }), r.own = r.fresh.filter(function(s) { return r.deep.indexOf(s) == -1; }), r.finished = Promise.all(r.own.map(function(s) { return s.finished; })), r; } getAnimatedNodes() { return Ke.nodesForBase(this.dom); } getNodeSizes(t = "in", e = this[it]) { let r = Ke.nodesWithSize(e, t), s = new Map(); for (let n = 0, o = yt(r), l = o.length; n < l; n++) { let h = o[n], a = window.getComputedStyle(h); s.set(h, {width: a.width, height: a.height}); } return s; } applyNodeSizes(t) { for (let [e, r] of yt(t)) e.style.width = r.width, e.style.height = r.height; return t; } clearNodeSizes(t) { if (!!t) { for (let [e, r] of yt(t)) e.style.removeProperty("width"), e.style.removeProperty("height"); return t; } } [Jr](t, e) { var h, a; var r = this; let s; if (this.entering\u03A6) return this.dom; let n = function() { if (s && r.clearNodeSizes(s), r.entering\u03A6) return r.phase = null; }; if (r.leaving\u03A6) return r.track(function() { return r.phase = "enter", r.unflag("_off_"), r.unflag("_out_"); }).finished.then(n, function(u) { return r.log("error cancel leave", u); }), r.dom; let o = Ut().contains(t); return e ? t.insertBefore(r.dom, e) : t.appendChild(r.dom), this[it] = r.getAnimatedNodes(), r.flag("_instant_"), r.unflag("_out_"), r.commit(), s = this[it].sized = r.getNodeSizes("in"), (a = (h = r.dom) == null ? void 0 : h.transition\u039Ein\u039Einit) == null || a.call(h, r), r.flag("_off_"), r.flag("_in_"), r.commit(), r.unflag("_instant_"), (this[Dn] = r.track(function() { return r.phase = "enter", r.applyNodeSizes(s), r.unflag("_off_"), r.unflag("_in_"); })).finished.then(n, function(c) { return r.clearNodeSizes(s), r.log("cancelled insert into", c); }), r.dom; } [Zr](t) { var e = this; if (this.leaving\u03A6) return; let r, s = function() { if (e.phase == "leave") return t.removeChild(e.dom), e.phase = null; }; if (e.entering\u03A6 && this[In] != "forward") { let o = e.track(function() { return e.flag("_off_"), e.flag("_in_"), e.unflag("_out_"), e.phase = "leave", e.clearNodeSizes(e[it].sized); }); e.log("cancel enter anims own", o.own, o), o.finished.then(s, function(l) { return e.log("error cancel entering", l); }); return; } this[it] = e.getAnimatedNodes(), r = e.getNodeSizes("out"), e.applyNodeSizes(r); let n = this[Dn] = e.track(function() { return e.phase = "leave", e.flag("_off_"), e.flag("_out_"), e.clearNodeSizes(r); }); if (!n.own.length) { s(); return; } n.finished.then(s, function() { return true; }); } }, jn = class { transition\u039Ein\u039Einit(t) { return true; } transition\u039Ein(t) { return true; } transition\u039Ein\u039Eend(t) { return true; } transition\u039Ein\u039Ecancel(t) { return true; } transition\u039Eout(t) { return true; } transition\u039Eout\u039Eend(t) { return true; } transition\u039Eout\u039Ecancel(t) { return true; } get ease() { return this[ti] || (this[ti] = new ei(this)); } set ease(t) { var e, r; if (t == false) { (r = (e = this[ti]) == null ? void 0 : e.disable) == null || r.call(e); return; } this.ease.enable(t); } }; Du(v.prototype, jn.prototype); function Vu() { return true; } function zu(i, t) { let e = Object.getOwnPropertyDescriptors(t); return delete e.constructor, Object.defineProperties(i, e), i; } function ri() { return true; } var qn = class { \u03B1esc() { return this.keyCode == 27; } \u03B1tab() { return this.keyCode == 9; } \u03B1enter() { return this.keyCode == 13; } \u03B1space() { return this.keyCode == 32; } \u03B1up() { return this.keyCode == 38; } \u03B1down() { return this.keyCode == 40; } \u03B1left() { return this.keyCode == 37; } \u03B1right() { return this.keyCode == 39; } \u03B1del() { return this.keyCode == 8 || this.keyCode == 46; } \u03B1key(t) { if (typeof t == "string") return this.key == t; if (typeof t == "number") return this.keyCode == t; } }; zu(Pr.prototype, qn.prototype); function Ku(i, t) { let e = Object.getOwnPropertyDescriptors(t); return delete e.constructor, Object.defineProperties(i, e), i; } function Zt() { return true; } var Vn = class { \u03B1left() { return this.button == 0; } \u03B1middle() { return this.button == 1; } \u03B1right() { return this.button == 2; } \u03B1shift() { return !!this.shiftKey; } \u03B1alt() { return !!this.altKey; } \u03B1ctrl() { return !!this.ctrlKey; } \u03B1meta() { return !!this.metaKey; } \u03B1mod() { let t = globalThis.navigator.platform; return /^(Mac|iPhone|iPad|iPod)/.test(t || "") ? !!this.metaKey : !!this.ctrlKey; } }; Ku(Cr.prototype, Vn.prototype); function ii(i, t) { let e = Object.getOwnPropertyDescriptors(t); return delete e.constructor, Object.defineProperties(i, e), i; } function zn(i) { let t; return i ? (t = i.toIterable) ? t.call(i) : i : []; } var Hu = Symbol.for("#extendType"), Uu = Symbol.for("#modifierState"), He = Symbol.for("#sharedModifierState"), Kn = Symbol.for("#onceHandlerEnd"), Ac = Symbol.for("#__initor__"), jc = Symbol.for("#__inited__"), Hn = Symbol.for("#extendDescriptors"), V = Symbol.for("#context"), Un = Symbol.for("#self"), Bu = Symbol.for("#target"), Bn = Symbol.for("#stopPropagation"), Yn = Symbol.for("#defaultPrevented"), Yu = Symbol.for("#teleport"); ri(); Zt(); var Wn = class { [Hu](t) { var e, r, s; let n = t[Hn] || (t[Hn] = (r = Object.getOwnPropertyDescriptors(t.prototype), s = r.constructor, delete r.constructor, r)); return Object.defineProperties(this, n); } }; ii(k.prototype, Wn.prototype); var Gn = class { get [Uu]() { var t, e; return (t = this[V])[e = this[V].step] || (t[e] = {}); } get [He]() { var t, e; return (t = this[V].handler)[e = this[V].step] || (t[e] = {}); } [Kn](t) { return F(this[V], "end", t); } \u03B1sel(t) { return !!this.target.matches(String(t)); } \u03B1closest(t) { return !!this.target.closest(String(t)); } \u03B1log(...t) { return console.info(...t), true; } \u03B1trusted() { return !!this.isTrusted; } \u03B1if(t) { return !!t; } \u03B1wait(t = 250) { return new Promise(function(e) { return setTimeout(e, bt(t)); }); } \u03B1self() { return this.target == this[V].element; } \u03B1cooldown(t = 250) { let e = this[He]; return e.active ? false : (e.active = true, e.target = this[V].element, e.target.flags.incr("cooldown"), this[Kn](function() { return setTimeout(function() { return e.target.flags.decr("cooldown"), e.active = false; }, bt(t)); }), true); } \u03B1throttle(t = 250) { let e = this[He]; return e.active ? (e.next && e.next(false), new Promise(function(r) { return e.next = function(s) { return e.next = null, r(s); }; })) : (e.active = true, e.el || (e.el = this[V].element), e.el.flags.incr("throttled"), F(this[V], "end", function() { let r = bt(t); return e.interval = setInterval(function() { e.next ? e.next(true) : (clearInterval(e.interval), e.el.flags.decr("throttled"), e.active = false); }, r); }), true); } \u03B1debounce(t = 250) { let e = this[He], r = this; return e.queue || (e.queue = []), e.queue.push(e.last = r), new Promise(function(s) { return setTimeout(function() { return e.last == r ? (r.debounced = e.queue, e.last = null, e.queue = [], s(true)) : s(false); }, bt(t)); }); } \u03B1flag(t, e) { let {element: r, step: s, state: n, id: o, current: l} = this[V], h = e instanceof v ? e : e ? r.closest(e) : r; if (!h) return true; this[V].commit = true, n[s] = o, h.flags.incr(t); let a = Date.now(); return F(l, "end", function() { let c = Date.now() - a, u = Math.max(250 - c, 0); return setTimeout(function() { return h.flags.decr(t); }, u); }), true; } \u03B1busy(t) { return this.\u03B1flag("busy", t); } \u03B1mod(t) { return this.\u03B1flag("mod-" + t, globalThis.document.documentElement); } \u03B1outside() { let {handler: t} = this[V]; if (t && t[Un]) return !t[Un].parentNode.contains(this.target); } }; ii(K.prototype, Gn.prototype); var Wu = {}; function Gu() { return true; } var si = class { constructor(t, e) { this.params = t, this.closure = e; } getHandlerForMethod(t, e) { return t ? t[e] ? t : this.getHandlerForMethod(t.parentNode, e) : null; } emit(t, ...e) { return j(this, t, e); } on(t, ...e) { return A(this, t, ...e); } once(t, ...e) { return F(this, t, ...e); } un(t, ...e) { return pt(this, t, ...e); } get passive\u03A6() { return this.params.passive; } get capture\u03A6() { return this.params.capture; } get silent\u03A6() { return this.params.silent; } get global\u03A6() { return this.params.global; } async handleEvent(t) { let e = this[Bu] || t.currentTarget, r = this.params, s = null, n = r.silence || r.silent; this.count || (this.count = 0), this.state || (this.state = {}); let o = {element: e, event: t, modifiers: r, handler: this, id: ++this.count, step: -1, state: this.state, commit: null, current: null}; if (o.current = o, t.handle$mod && t.handle$mod.apply(o, r.options || []) == false) return; let l = K[this.type + "$handle"] || K[t.type + "$handle"] || t.handle$mod; if (!(l && l.apply(o, r.options || []) == false)) { this.currentEvents || (this.currentEvents = new Set()), this.currentEvents.add(t); for (let h = 0, a = Object.keys(r), c = a.length, u, d; h < c; h++) { if (u = a[h], d = r[u], o.step++, u[0] == "_") continue; u.indexOf("~") > 0 && (u = u.split("~")[0]); let b = null, f = [t, o], p, m = null, g, _ = false, E = typeof u == "string"; if (u[0] == "$" && u[1] == "_" && d[0] instanceof Function) u = d[0], u.passive || (o.commit = true), f = [t, o].concat(d.slice(1)), m = e; else if (d instanceof Array) { f = d.slice(), b = f; for (let y = 0, x = zn(f), C = x.length; y < C; y++) { let M = x[y]; if (typeof M == "string" && M[0] == "~" && M[1] == "$") { let de = M.slice(2).split("."), pe = o[de.shift()] || t; for (let dr = 0, Ri = zn(de), jl = Ri.length; dr < jl; dr++) { let ql = Ri[dr]; pe = pe ? pe[ql] : void 0; } f[y] = pe; } } } if (typeof u == "string" && (g = u.match(/^(emit|flag|mod|moved|pin|fit|refit|map|remap|css)-(.+)$/)) && (b || (b = f = []), f.unshift(g[2]), u = g[1]), u == "trap") t[Bn] = true, t.stopImmediatePropagation(), t[Yn] = true, t.preventDefault(); else if (u == "stop") t[Bn] = true, t.stopImmediatePropagation(); else if (u == "prevent") t[Yn] = true, t.preventDefault(); else if (u == "commit") o.commit = true; else if (u == "once") e.removeEventListener(t.type, this); else { if (u == "options" || u == "silence" || u == "silent") continue; if (u == "emit") { let y = f[0], x = f[1], C = new k(y, {bubbles: true, detail: x}); C.originalEvent = t; let cr = (this[Yu] || e).dispatchEvent(C); } else if (typeof u == "string") { u[0] == "!" && (_ = true, u = u.slice(1)); let y = "\u03B1" + u, x = t[y]; x || (x = this.type && K[this.type + "$" + u + "$mod"]), x || (x = t[u + "$mod"] || K[t.type + "$" + u] || K[u + "$mod"]), x instanceof Function ? (u = x, m = o, f = b || [], t[y] && (m = t, t[V] = o)) : u[0] == "_" ? (u = u.slice(1), m = this.closure) : m = this.getHandlerForMethod(e, u); } } try { u instanceof Function ? p = u.apply(m || e, f) : m && (p = m[u].apply(m, f)), p && p.then instanceof Function && p != N.$promise && (o.commit && !n && N.commit(), p = await p); } catch (y) { s = y; break; } if (_ && p === true || !_ && p === false) break; o.value = p; } if (j(o, "end", o), o.commit && !n && N.commit(), this.currentEvents.delete(t), this.currentEvents.size == 0 && this.emit("idle"), s) throw s; } } }, Xn = class { on$(t, e, r) { let s = "on$" + t, n; n = new si(e, r); let o = e.capture || false, l = e.passive, h = o; return l && (h = {passive: l, capture: o}), this[s] instanceof Function ? n = this[s](e, r, n, h) : this.addEventListener(t, n, h), n; } }; ii(v.prototype, Xn.prototype); var Ue = new class { get ios\u03A6() { let i = globalThis.navigator.platform || ""; return !!(i.match(/iPhone|iPod|iPad/) || i == "MacIntel" && globalThis.navigator.maxTouchPoints > 2); } }(); function Lt(i, t) { let e = t; return i instanceof Element ? i : typeof i == "string" ? i == "this" || i == "" ? e : i == "up" ? e.parentNode : i == "op" ? e.offsetParent : e.closest(i) || e.querySelector(i) || globalThis.document.querySelector(i) : null; } function at(i) { if (typeof i == "string") { let [t, e, r] = i.match(/^([-+]?[\d\.]+)(%|\w+)$/); return [parseFloat(e), r]; } else if (typeof i == "number") return [i]; } function Be(i, t = 1) { let e = 1 / t; return Math.round(i * e) / e; } function Xu(i, t, e) { return t > e ? Math.max(e, Math.min(t, i)) : Math.min(e, Math.max(t, i)); } function ni(i, t, e, r, s = 0.1) { let [n, o] = at(e), [l, h] = at(r), [a, c] = at(s); return o == "%" && (n = (t - i) * (n / 100)), h == "%" && (l = (t - i) * (l / 100)), c == "%" && (a = (l - n) * (a / 100)), function(u, d) { let b = (u - i) / (t - i), f = n + (l - n) * b; return s && (f = Be(f, a)), d && (f = Xu(f, n, l)), f; }; } function Qu(i, t) { let e = Object.getOwnPropertyDescriptors(t); return delete e.constructor, Object.defineProperties(i, e), i; } Zt(); function Ju() { return true; } var Qn = class { \u03B1primary() { return !!this.isPrimary; } \u03B1mouse() { return this.pointerType == "mouse"; } \u03B1pen() { return this.pointerType == "pen"; } \u03B1touch() { return this.pointerType == "touch"; } \u03B1pressure(t = 0.5) { return this.pressure >= t; } \u03B1lock() { return true; } }; Qu(Nr.prototype, Qn.prototype); function Zu(i, t) { let e = Object.getOwnPropertyDescriptors(t); return delete e.constructor, Object.defineProperties(i, e), i; } var Jn = Symbol.for("#capture"), X = Symbol.for("#step"), ta = Symbol.for("#cancel"), oi = Symbol.for("#reframe"), Qc = Symbol.for("#__initor__"), Jc = Symbol.for("#__inited__"), Zn = Symbol.for("#mods"), li = Symbol.for("#dx"), hi = Symbol.for("#dy"), ft = Symbol.for("#context"), Ye = Symbol.for("#locked"), to = Symbol.for("#teardown"), eo = Symbol.for("#x"), ro = Symbol.for("#y"), ea = Symbol.for("#pinTarget"); function ra() { return true; } var io = null, so = class { constructor(t, e, r) { this.phase = "init", this.events = [], this.originalEvent = t, this.handler = e, this.target = this.currentTarget = r, this[Zn] = {}; } set event(t) { this.events.push(t); } get ctrlKey() { return this.originalEvent.ctrlKey; } get altKey() { return this.originalEvent.altKey; } get shiftKey() { return this.originalEvent.shiftKey; } get metaKey() { return this.originalEvent.metaKey; } get isPrimary() { return this.originalEvent.isPrimary; } get pointerType() { return this.originalEvent.pointerType; } get start() { return this.originalEvent; } get originalTarget() { return this.originalEvent.target; } get event() { return this.events[this.events.length - 1]; } get elapsed() { return this.event.timeStamp - this.events[0].timeStamp; } get type() { return this.event.type; } get pointerId() { return this.originalEvent.pointerId; } get pressure() { return this.event.pressure; } get clientX() { return this.event.clientX; } get clientY() { return this.event.clientY; } get offsetX() { return this.event.offsetX; } get offsetY() { return this.event.offsetY; } get active\u03A6() { return this.phase != "ended"; } get ended\u03A6() { return this.phase == "ended"; } get dx() { return this[li] == null ? this.event.x - this.start.x : this[li]; } get dy() { return this[hi] == null ? this.event.y - this.start.y : this[hi]; } stopImmediatePropagation() { return this.cancelBubble = true, this.event.stopImmediatePropagation(), this; } stopPropagation() { return this.cancelBubble = true, this.event.stopPropagation(), this; } preventDefault() { return this.defaultPrevented = true, this.event.preventDefault(); } emit(t, ...e) { return j(this, t, e); } on(t, ...e) { return A(this, t, ...e); } once(t, ...e) { return F(this, t, ...e); } un(t, ...e) { return pt(this, t, ...e); } \u03B1flag(t, e) { let {element: r} = this[ft], s = Date.now(), n = e instanceof v ? e : e ? r.closest(e) : r; return (this[X].setup != true ? (this[X].setup = true, true) : false) && (n.flags.incr(t), F(this, "end", function() { return n.flags.decr(t); })), true; } \u03B1lock() { return this[Jn](), true; } [Jn]() { if (this[Ye] != true ? (this[Ye] = true, true) : false) return this[ft].element.setPointerCapture(this.pointerId); } get [X]() { var t, e; return (t = this[Zn])[e = this[ft].step] || (t[e] = {}); } [ta]() { return this[to](); } \u03B1moved(t, e) { let r = this[X], {element: s, state: n, event: o} = this[ft]; if (!r.setup) { let u = t || 4; typeof t == "string" && t.match(/^(up|down|left|right|x|y)$/) && (r.dir = t, u = e || 4), typeof e == "string" && e.match(/^(up|down|left|right|x|y)$/) && (r.dir = e), r.setup = true; let [d, b] = at(u); r.threshold = d, r.sy = d, r.x0 = this.x, r.y0 = this.y, r.dir || (r.dir = "dist"), r.x = r.left = r.right = r.y = r.up = r.down = r.dist = 0, b && b != "px" && console.warn("only px threshold allowed in @touch.moved"); } if (r.active) return true; if (r.cancelled) return false; let l = r.threshold, h = this.x - r.x0, a = this.y - r.y0; r.x = Math.max(r.x, Math.abs(h)), r.y = Math.max(r.y, Math.abs(a)), r.left = Math.max(r.left, -h), r.right = Math.max(r.right, h), r.up = Math.max(r.up, -a), r.down = Math.max(r.down, a), r.dist = Math.max(r.dist, Math.sqrt(h * h + a * a)); let c = r[r.dir]; if (c > l && c >= r.x && c >= r.y) { r.active = true; let u = n.pinTarget; return s.flags.incr("_move_"), u && u.flags.incr("_move_"), this.preventDefault(), F(this, "end", function() { return u && u.flags.decr("_move_"), s.flags.decr("_move_"); }), true; } else if (r.x > l || r.y > l) return r.cancelled = true, false; return false; } \u03B1hold(t = 250) { var e = this; let r = this[X], s = this[ft].element; if (r.cancelled) return false; if (r.setup && !r.active) { let n = this.clientX, o = this.clientY, l = n - r.x, h = o - r.y; Math.sqrt(l * l + h * h) > 5 && !r.cancelled && (clearTimeout(r.timeout), r.cancelled = true); } if (r.setup != true ? (r.setup = true, true) : false) { r.active = false, r.x = this.clientX, r.y = this.clientY; let n; return r.timeout = setTimeout(function() { return r.active = true, e.preventDefault(), s.flags.incr("_hold_"), n && n(true), n = null; }, t), F(e, "end", function() { return r.active && s.flags.decr("_hold_"), clearTimeout(r.timeout), n && n(false), n = null; }), new Promise(function(o) { return n = o; }); } return r.active; } \u03B1sync(t, e = "x", r = "y") { let s = this[X]; return (s.setup != true ? (s.setup = true, true) : false) ? (s.x = t[e] || 0, s.y = t[r] || 0, s.tx = this.x, s.ty = this.y) : (e && (t[e] = s.x + (this.x - s.tx)), r && (t[r] = s.y + (this.y - s.ty))), this[ft].commit = true, true; } \u03B1apply(t, e = "x", r = "y") { return e && (t[e] = this.x), r && (t[r] = this.y), this[ft].commit = true, true; } \u03B1css(t = "x", e = "y") { let r = this[X]; if (r.setup != true ? (r.setup = true, true) : false) r.el = this[ft].element, r.x = r.el[eo] || 0, r.y = r.el[ro] || 0, r.tx = this.x, r.ty = this.y; else { let s = r.el[eo] = r.x + (this.x - r.tx), n = r.el[ro] = r.y + (this.y - r.ty); t && r.el.style.setProperty("--x", s + "px"), e && r.el.style.setProperty("--y", n + "px"); } return true; } \u03B1end() { return this.phase == "ended"; } \u03B1shift() { return !!this.shiftKey; } \u03B1alt() { return !!this.altKey; } \u03B1ctrl() { return !!this.ctrlKey; } \u03B1meta() { return !!this.metaKey; } \u03B1primary() { return !!this.isPrimary; } \u03B1mouse() { return this.pointerType == "mouse"; } \u03B1pen() { return this.pointerType == "pen"; } \u03B1touch() { return this.pointerType == "touch"; } \u03B1pressure(t = 0.5) { return this.pressure >= t; } \u03B1log(...t) { return console.info(...t), true; } \u03B1left() { return this.originalEvent.button == 0; } \u03B1middle() { return this.originalEvent.button == 1; } \u03B1right() { return this.originalEvent.button == 2; } \u03B1round(t = 1, e = t) { return this.x = Be(this.x, t), this.y = Be(this.y, e), true; } [oi](...t) { let e = this[X]; if (e.setup != true ? (e.setup = true, true) : false) { let r = this.target, s = t.length, n = t[0], o = 0, l = "100%", h = 0, a = typeof n; a == "number" || a == "string" && /^([-+]?\d[\d\.]*)(%|\w+)$/.test(n) || n instanceof Array ? n = null : a == "string" && (n == "this" || n == "" ? n = r : n == "up" ? n = r.parentNode : n == "op" ? n = r.offsetParent : n = r.closest(n) || r.querySelector(n)), n == null && (s++, t.unshift(n = r)), s == 2 ? h = t[1] : s > 2 && ([o, l, h = 0] = t.slice(1)); let c = n.getBoundingClientRect(); o instanceof Array || (o = [o, o]), l instanceof Array || (l = [l, l]), h instanceof Array || (h = [h, h]), e.rect = c, e.x = ni(c.left, c.right, o[0], l[0], h[0]), e.y = ni(c.top, c.bottom, o[1], l[1], h[1]), this.x0 = this.x = e.x(this.x, e.clamp), this.y0 = this.y = e.y(this.y, e.clamp); } else { let r = this.x = e.x(this.x, e.clamp), s = this.y = e.y(this.y, e.clamp); this[li] = r - this.x0, this[hi] = s - this.y0; } return true; } \u03B1fit(...t) { return this[X].clamp = true, this[oi](...t); } \u03B1reframe(...t) { return this[oi](...t); } \u03B1pin(...t) { let e = this[X]; if (e.setup != true ? (e.setup = true, true) : false) { let r = Lt(t[0], this.target); r instanceof v || t.unshift(r = this.target); let s = t[1] || 0, n = t[2] == null ? t[2] = s : t[2], o = r.getBoundingClientRect(); e.x = this.clientX - (o.left + o.width * s), e.y = this.clientY - (o.top + o.height * n), r && (this[ea] = r, r.flags.incr("_touch_"), F(this, "end", function() { return r.flags.decr("_touch_"); })); } return this.x -= e.x, this.y -= e.y, true; } }, no = class { on$touch(t, e, r, s) { return r.type = "touch", this.addEventListener("pointerdown", r, {passive: false}), Ue.ios\u03A6 && globalThis.parent != globalThis && (io != true ? (io = true, true) : false) && globalThis.parent.postMessage("setupTouchFix"), r; } }; Zu(v.prototype, no.prototype); if (globalThis.parent == globalThis && Ue.ios\u03A6) { let i = function(t) { if (t.data == "setupTouchFix") return globalThis.addEventListener("touchmove", function() { return false; }, {passive: false}), globalThis.removeEventListener("message", i); }; globalThis.addEventListener("message", i); } K.touch$handle = function() { let i = this.event, t = this.element, e = this.state.pointerId, r = this.modifiers, s = this.handler, n = Ue.ios\u03A6; if (this.current = this.state, e != null) return e == i.pointerId; if (r.ctrl && !i.ctrlKey || r.alt && !i.altKey || r.meta && !i.metaKey || r.shift && !i.shiftKey || r.if && !r.if[0] || r.self && i.target != t || r.primary && !i.isPrimary || r.pen && i.pointerType != "pen" || r.mouse && i.pointerType != "mouse" || r.touch && i.pointerType != "touch" || r.sel && !i.target.matches(String(r.sel[0]))) return; let o = this.state = s.state = this.current = new so(i, s, t); e = o.pointerId; let l = function(f) { return f.preventDefault(), false; }, h = null, a = Symbol(), c = function(f) { let p = o.clientX, m = o.clientY, g = f.clientX, _ = f.clientY; (o[Ye] || o.defaultPrevented) && (f.pointerId == o.pointerId || p == g && m == _) && (f.preventDefault(), f.stopPropagation()), c && (globalThis.removeEventListener("click", c, {capture: true}), c = null); }, u = function(f) { if (!(o.type == "touchmove" && f.changedTouches[0].identifier != e) && (o.defaultPrevented || o[Ye])) return f.preventDefault(); }, d = function(f) { let p = f.type, m = o.phase; if (f.pointerId && o.pointerId != f.pointerId || f[a]) return; f[a] = true; let g = p == "pointerup" || p == "pointercancel"; if (f.pressure == 0 && f.pointerType == "mouse" && p == "pointermove" && o.originalEvent.pressure > 0) return h(f); p == "pointercancel" ? (o.x = o.clientX, o.y = o.clientY) : (o.x = f.clientX, o.y = f.clientY), o.event = f, g && (o.phase = "ended"); try { s.handleEvent(o); } catch (_) { } if (m == "init" && !g && (o.phase = "active"), g && h) return h(f); }, b = false; return h = function(f) { if (!b && (b = true, t.flags.decr("_touch_"), o.phase != "ended" && (o.phase = "ended", o.x = o.clientX, o.y = o.clientY, s.handleEvent(o)), o.emit("end"), r.passive || --s.prevents == 0 && t.style.removeProperty("touch-action"), s.state = {}, globalThis.removeEventListener("pointermove", d, {passive: !!r.passive}), globalThis.removeEventListener("pointerup", d), globalThis.removeEventListener("pointercancel", d), setTimeout(function() { if (c && (globalThis.removeEventListener("click", c, {capture: true}), c = null), n && u) return globalThis.removeEventListener("touchend", u), globalThis.removeEventListener("touchmove", u, {passive: false}), u = null; }, 100), !r.passive)) return globalThis.document.removeEventListener("selectstart", l, {capture: true}); }, o[to] = h, r.passive || (s.prevents || (s.prevents = 0), s.prevents++, t.style.setProperty("touch-action", "none"), t.offsetWidth), t.flags.incr("_touch_"), globalThis.addEventListener("pointermove", d, {passive: !!r.passive}), globalThis.addEventListener("pointerup", d), globalThis.addEventListener("pointercancel", d), globalThis.addEventListener("click", c, {capture: true}), n && !r.passive && (globalThis.addEventListener("touchend", u), globalThis.addEventListener("touchmove", u, {passive: false})), r.passive || globalThis.document.addEventListener("selectstart", l, {capture: true}), d(i), false; }; function oo(i) { let t; return i ? (t = i.toIterable) ? t.call(i) : i : []; } function ia(i, t) { let e = Object.getOwnPropertyDescriptors(t); return delete e.constructor, Object.defineProperties(i, e), i; } var sa = Symbol.for("#context"), na = Symbol.for("#extendType"); function oa() { return true; } var lo = new (globalThis.WeakMap || Map)(), We = {threshold: [0]}, la = {}; K.intersect$handle = function() { let i = this.event.detail.observer; return this.modifiers._observer == i; }; var ho = class extends k { \u03B1in() { return this.delta >= 0 && this.entry.isIntersecting; } \u03B1out() { return this.delta < 0; } \u03B1css(t = "ratio") { return this.target.style.setProperty("--ratio", this.ratio), true; } \u03B1flag(t, e) { let {state: r, step: s} = this[sa], n = Lt(e || "", this.target); return this.isIntersecting && !r[s] ? (n.flags.incr(t), r[s] = true) : r[s] && !this.isIntersecting && (n.flags.decr(t), r[s] = false), true; } }; function ha(i, t) { return function(e, r) { let s = r.prevRatios || (r.prevRatios = new WeakMap()); for (let n = 0, o = oo(e), l = o.length; n < l; n++) { let h = o[n], a = s.get(h.target) || 0, c = h.intersectionRatio, u = {entry: h, ratio: c, from: a, delta: c - a, observer: r}, d = new k(i, {bubbles: false, detail: u}); d[na](ho), d.entry = h, d.isIntersecting = h.isIntersecting, d.delta = u.delta, d.ratio = u.ratio, s.set(h.target, c), h.target.dispatchEvent(d); } }; } function uo(i = We) { let t = i.threshold.join("-") + i.rootMargin; !i.root && We.root && (i.root || (i.root = We.root)); let e = i.root || la, r = lo.get(e); return r || lo.set(e, r = {}), r[t] || (r[t] = new IntersectionObserver(ha("intersect", t), i)); } var ao = class { on$intersect(t, e, r, s) { let n; if (t.options) { let o = [], l = {threshold: o}; for (let h = 0, a = oo(t.options), c = a.length; h < c; h++) { let u = a[h]; u instanceof v || u instanceof Ot ? l.root = u : typeof u == "number" ? o.push(u) : typeof u == "string" ? l.rootMargin = u : typeof u == "object" && Object.assign(l, u); } if (o.length == 1) { let h = o[0]; if (h > 1) for (o[0] = 0; o.length < h; ) o.push(o.length / (h - 1)); } o.length == 0 && o.push(0), n = uo(l); } else n = uo(); return t._observer = n, n.observe(this), this.addEventListener("intersect", r, s), r; } }; ia(v.prototype, ao.prototype); function ua(i) { let t; return i ? (t = i.toIterable) ? t.call(i) : i : []; } function aa(i, t) { let e = Object.getOwnPropertyDescriptors(t); return delete e.constructor, Object.defineProperties(i, e), i; } var fa = Symbol.for("#extendType"); function ca() { return true; } var Ge = null, fo = class extends k { \u03B1css(t = "1elw", e = "1elh", r = "") { let s = this.target; if (s.offsetParent) { let n = at(t), o = at(e), l = Lt(r, s), h = n ? "--u_" + n[1] : "--" + t, a = o ? "--u_" + o[1] : "--" + e, c = n ? this.width / n[0] : this.width, u = o ? this.height / o[0] : this.height; l.style.setProperty(h, c), l.style.setProperty(a, u); } return true; } }; function da() { return globalThis.ResizeObserver || Ge || (console.warn(":resize not supported in this browser"), Ge = {observe: function() { return true; }}), Ge || (Ge = new ResizeObserver(function(i) { for (let t = 0, e = ua(i), r = e.length; t < r; t++) { let s = e[t], n = new k("resize", {bubbles: false, detail: s}); n.entry = s, n.rect = s.contentRect, n.width = s.target.offsetWidth, n.height = s.target.offsetHeight, n[fa](fo), s.target.dispatchEvent(n); let o = new k("resized", {bubbles: true, detail: s}); s.target.dispatchEvent(o); } })); } var co = class { on$resize(t, e, r, s) { return da().observe(this), this.addEventListener("resize", r, s), r; } }; aa(v.prototype, co.prototype); function pa(i, t) { let e = Object.getOwnPropertyDescriptors(t); return delete e.constructor, Object.defineProperties(i, e), i; } function ma() { return true; } var ui, po = Symbol(); function ga() { if (!ui) return ui = function(i) { if (i[po]) return; i[po] = true; let t = globalThis.document.activeElement; if (t && t.matches("input,textarea")) { let e = new k("selection", {detail: {start: t.selectionStart, end: t.selectionEnd}}); return t.dispatchEvent(e); } }, globalThis.document.addEventListener("selectionchange", ui); } var mo = class { on$selection(t, e, r, s) { return ga(), this.addEventListener("selection", r, s), r; } }; pa(v.prototype, mo.prototype); var go = Symbol.for("#string"), yo = Symbol.for("#html"), Q = {win: {sep: "+", name: "win", order: ["meta", "ctrl", "mod", "alt", "option", "shift"].reverse(), labels: {option: "alt", mod: "ctrl", meta: "win"}}, mac: {sep: "", name: "mac", order: ["ctrl", "alt", "option", "shift", "mod", "command"].reverse(), labels: {left: "\u2192", up: "\u2191", down: "\u2193", right: "\u2190", plus: "+", tab: "\u21E5", meta: "\u2318", mod: "\u2318", ctrl: "\u2303", option: "\u2325", alt: "\u2325", del: "\u2326", shift: "\u21E7", enter: "\u21A9", esc: "\u238B", backspace: "\u232B"}}}; Q.auto = Q.win; (globalThis.navigator.platform || "").match(/iPhone|iPod|iPad|Mac/) && (Q.auto = Q.mac); var ai = {}; function _o(i, t = "auto") { let e = "" + i + ":" + t; if (ai[e]) return ai[e]; let r = Q[t] || Q.win, s = i.split(" ").map(function(n) { return n.split("+").sort(function(a, c) { return r.order.indexOf(c) - r.order.indexOf(a); }).map(function(a) { let c = r.labels[a] || a; return c = c[0].toUpperCase() + (c.slice(1) || ""); }); }); return ai[e] = s; } function bo(i, t) { var e; let r = _o(i, t), s = Q[t] || Q.win; return r[go] || (r[go] = r.map(function(n) { return n.join(s.sep); }).join(" ")); } function vo(i, t) { var e; let r = _o(i, t), s = Q[t] || Q.win; return r[yo] || (r[yo] = r.map(function(n) { return "" + n.map(function(o) { return "" + o + ""; }).join("") + ""; }).join(" ")); } var ct = {8: "backspace", 9: "tab", 13: "enter", 16: "shift", 17: "ctrl", 18: "alt", 20: "capslock", 27: "esc", 32: "space", 33: "pageup", 34: "pagedown", 35: "end", 36: "home", 37: "left", 38: "up", 39: "right", 40: "down", 45: "ins", 46: "del", 91: "meta", 93: "meta", 224: "meta"}, xo = {106: "*", 107: "+", 109: "-", 110: ".", 111: "/", 186: ";", 187: "=", 188: ",", 189: "-", 190: ".", 191: "/", 192: "`", 219: "[", 220: "\\", 221: "]", 222: "'"}, So = {"~": "`", "!": "1", "@": "2", "#": "3", $: "4", "%": "5", "^": "6", "&": "7", "*": "8", "(": "9", ")": "0", _: "-", "+": "=", ":": ";", '"': "'", "<": ",", ">": ".", "?": "/", "|": "\\"}, wo = {option: "alt", command: "meta", return: "enter", escape: "esc", plus: "+", mod: /Mac|iPod|iPhone|iPad/.test(navigator.platform) ? "meta" : "ctrl"}, te; for (var st = 1; st < 20; ++st) ct[111 + st] = "f" + st; for (st = 0; st <= 9; ++st) ct[st + 96] = st.toString(); function fi(i, t, e) { if (i.addEventListener) { i.addEventListener(t, e, false); return; } i.attachEvent("on" + t, e); } function ci(i, t, e) { if (i.removeEventListener) { i.removeEventListener(t, e, false); return; } i.detachEvent("on" + t, e); } function Eo(i) { if (i.type == "keypress") { var t = String.fromCharCode(i.which); return i.shiftKey || (t = t.toLowerCase()), t; } return ct[i.which] ? ct[i.which] : xo[i.which] ? xo[i.which] : String.fromCharCode(i.which).toLowerCase(); } function ya(i, t) { return i.sort().join(",") === t.sort().join(","); } function _a(i) { var t = []; return i.shiftKey && t.push("shift"), i.altKey && t.push("alt"), i.ctrlKey && t.push("ctrl"), i.metaKey && t.push("meta"), t; } function ba(i) { if (i.preventDefault) { i.preventDefault(); return; } i.returnValue = false; } function va(i) { if (i.stopPropagation) { i.stopPropagation(); return; } i.cancelBubble = true; } function di(i) { return i == "shift" || i == "ctrl" || i == "alt" || i == "meta"; } function xa() { if (!te) { te = {}; for (var i in ct) i > 95 && i < 112 || ct.hasOwnProperty(i) && (te[ct[i]] = i); } return te; } function Sa(i, t, e) { return e || (e = xa()[i] ? "keydown" : "keypress"), e == "keypress" && t.length && (e = "keydown"), e; } function wa(i) { return i === "+" ? ["+"] : (i = i.replace(/\+{2}/g, "+plus"), i.split("+")); } function To(i, t) { var e, r, s, n = []; for (e = wa(i), s = 0; s < e.length; ++s) r = e[s], wo[r] && (r = wo[r]), t && t != "keypress" && So[r] && (r = So[r], n.push("shift")), di(r) && n.push(r); return t = Sa(r, n, t), {key: r, modifiers: n, action: t}; } function Oo(i, t) { return i === null || i === document ? false : i === t ? true : Oo(i.parentNode, t); } function $(i) { var t = this; if (i = i || document, !(t instanceof $)) return new $(i); t.target = i, t._callbacks = {}, t._directMap = {}; var e = {}, r, s = false, n = false, o = false; function l(f) { f = f || {}; var p = false, m; for (m in e) { if (f[m]) { p = true; continue; } e[m] = 0; } p || (o = false); } function h(f, p, m, g, _, E) { var y, x, C = [], M = m.type; if (!t._callbacks[f]) return []; for (M == "keyup" && di(f) && (p = [f]), y = 0; y < t._callbacks[f].length; ++y) if (x = t._callbacks[f][y], !(!g && x.seq && e[x.seq] != x.level) && M == x.action && (M == "keypress" && !m.metaKey && !m.ctrlKey || ya(p, x.modifiers))) { var cr = !g && x.combo == _, de = g && x.seq == g && x.level == E; (cr || de) && t._callbacks[f].splice(y, 1), C.push(x); } return C; } function a(f, p, m, g) { t.stopCallback(p, p.target || p.srcElement, m, g) || f(p, m) === false && (ba(p), va(p)); } t._handleKey = function(f, p, m) { var g = h(f, p, m), _, E = {}, y = 0, x = false; for (_ = 0; _ < g.length; ++_) g[_].seq && (y = Math.max(y, g[_].level)); for (_ = 0; _ < g.length; ++_) { if (g[_].seq) { if (g[_].level != y) continue; x = true, E[g[_].seq] = 1, a(g[_].callback, m, g[_].combo, g[_].seq); continue; } x || a(g[_].callback, m, g[_].combo); } var C = m.type == "keypress" && n; m.type == o && !di(f) && !C && l(E), n = x && m.type == "keydown"; }; function c(f) { typeof f.which != "number" && (f.which = f.keyCode); var p = Eo(f); if (!!p) { if (f.type == "keyup" && s === p) { s = false; return; } t.handleKey(p, _a(f), f); } } function u() { clearTimeout(r), r = setTimeout(l, 1e3); } function d(f, p, m, g) { e[f] = 0; function _(M) { return function() { o = M, ++e[f], u(); }; } function E(M) { a(m, M, f), g !== "keyup" && (s = Eo(M)), setTimeout(l, 10); } for (var y = 0; y < p.length; ++y) { var x = y + 1 === p.length, C = x ? E : _(g || To(p[y + 1]).action); b(p[y], C, g, f, y); } } function b(f, p, m, g, _) { t._directMap[f + ":" + m] = p, f = f.replace(/\s+/g, " "); var E = f.split(" "), y; if (E.length > 1) { d(f, E, p, m); return; } y = To(f, m), t._callbacks[y.key] = t._callbacks[y.key] || [], h(y.key, y.modifiers, {type: y.action}, g, f, _), t._callbacks[y.key][g ? "unshift" : "push"]({callback: p, modifiers: y.modifiers, action: y.action, seq: g, level: _, combo: f}); } t._bindMultiple = function(f, p, m) { for (var g = 0; g < f.length; ++g) b(f[g], p, m); }, t.enable = function() { fi(i, "keypress", c), fi(i, "keydown", c), fi(i, "keyup", c); }, t.disable = function() { ci(i, "keypress", c), ci(i, "keydown", c), ci(i, "keyup", c); }, t.enable(); } $.prototype.bind = function(i, t, e) { var r = this; return i = i instanceof Array ? i : [i], r._bindMultiple.call(r, i, t, e), r; }; $.prototype.unbind = function(i, t) { var e = this; return e.bind.call(e, i, function() { }, t); }; $.prototype.trigger = function(i, t) { var e = this; return e._directMap[i + ":" + t] && e._directMap[i + ":" + t]({}, i), e; }; $.prototype.reset = function() { var i = this; return i._callbacks = {}, i._directMap = {}, i; }; $.prototype.stopCallback = function(i, t) { var e = this; return (" " + t.className + " ").indexOf(" mousetrap ") > -1 || Oo(t, e.target) ? false : t.tagName == "INPUT" || t.tagName == "SELECT" || t.tagName == "TEXTAREA" || t.isContentEditable; }; $.prototype.handleKey = function() { var i = this; return i._handleKey.apply(i, arguments); }; $.addKeycodes = function(i) { for (var t in i) i.hasOwnProperty(t) && (ct[t] = i[t]); te = null; }; $.init = function() { var i = $(document); for (var t in i) t.charAt(0) !== "_" && ($[t] = function(e) { return function() { return i[e].apply(i, arguments); }; }(t)); }; function ee(i) { let t; return i ? (t = i.toIterable) ? t.call(i) : i : []; } function Ea(i, t) { let e = Object.getOwnPropertyDescriptors(t); return delete e.constructor, Object.defineProperties(i, e), i; } var gd = Symbol.for("#__initor__"), yd = Symbol.for("#__inited__"), pi = Symbol.for("#updateHotKeys"), Ta = Symbol.for("#inInput"), mi = Symbol.for("#inEditable"), Oa = Symbol.for("#hotkeyTarget"), Co = Symbol.for("#hotkeyCombos"), Ca = Symbol.for("#extendType"), re = Symbol.for("#combos"), No = Symbol.for("#target"), ie = Symbol.for("#hotkeyHandlers"), Na = Symbol.for("#defaultPrevented"), Pa = Symbol.for("#visit"), Po = Symbol.for("#key"), ka; try { ka = (globalThis.navigator.platform || "").match(/iPhone|iPod|iPad|Mac/); } catch (i) { } function La() { return true; } var gi = {esc: true}, ko = class extends k { \u03B1focus(t) { let e = this.target, r = e.ownerDocument; return t && (e = e.querySelector(t) || e.closest(t) || r.querySelector(t)), e == r.body ? r.activeElement != r.body && r.activeElement.blur() : e.focus(), true; } \u03B1repeat() { return true; } }, $a = function(i, t, e) { return t.tagName == "INPUT" && (e == "down" || e == "up") ? false : t.tagName == "INPUT" || t.tagName == "SELECT" || t.tagName == "TEXTAREA" ? gi[e] ? (i[Ta] = true, i[mi] = true, false) : true : t.contentEditable && (t.contentEditable == "true" || t.contentEditable == "plaintext-only") ? gi[e] ? (i[mi] = true, false) : true : false; }, Lo = new class { constructor() { this.combos = {"*": {}}, this.identifiers = {}, this.labels = {}, this.handler = this.handle.bind(this), this.mousetrap = null, this.hothandler = this.handle.bind(this); } addKeycodes(t) { return $.addKeycodes(t); } trigger(t) { var e, r; return (r = (e = this.mousetrap) == null ? void 0 : e.trigger) == null ? void 0 : r.call(e, t); } register(t, e = {}) { return this.mousetrap || (this.mousetrap = $(globalThis.document), this.mousetrap.stopCallback = $a), this.combos[t] || (this.combos[t] = true, this.mousetrap.bind(t, this.handler)), (e.capture || e.force) && (gi[t] = true), this; } comboIdentifier(t) { var e; return (e = this.identifiers)[t] || (e[t] = t.replace(/\+/g, "_").replace(/\ /g, "-").replace(/\*/g, "all").replace(/\|/g, " ")); } humanize(t, e = "auto") { return bo(t, e); } htmlify(t, e = "auto") { return vo(t, e); } matchCombo(t) { return true; } handle(t, e) { var c; let r = t.target && t.target[Oa] || t.target || globalThis.document.body, s = Array.from(globalThis.document.querySelectorAll("[data-hotkey]")), n = r.ownerDocument, o = r; for (; o && o != n && o.hotkeys !== true; ) o = o.parentNode; if (s = s.reverse().filter(function(u) { let d = u[Co]; if (!(d && (d[e] || d["*"]))) return false; let b = u; for (; b && b != n; ) { if (b.hotkeys === false) return false; b = b.parentNode; } return true; }), !s.length) return; let l = {combo: e, originalEvent: t, targets: s}, h = new k("hotkey", {bubbles: true, detail: l}); h[Ca](ko), h.originalEvent = t, h.hotkey = e, r.dispatchEvent(h); let a = []; for (let u = 0, d = ee(s), b = d.length; u < b; u++) { let f = d[u]; for (let p = 0, m = ee(f[ie]), g = m.length; p < g; p++) { let _ = m[p]; if ((_[re][e] || _[re]["*"]) && (!t[mi] || _.capture\u03A6 || _.params.force)) { let E = _[No]; (o.contains(E) || E.contains(o) || _.global\u03A6) && a.push(_); } } } for (let u = 0, d = ee(a), b = d.length; u < b; u++) { let f = d[u]; if ((!t.repeat || f.params.repeat) && f.handleEvent(h), (!f.passive\u03A6 || h[Na]) && ((c = t == null ? void 0 : t.preventDefault) == null || c.call(t)), !f.passive\u03A6) break; } return this; } }(), $o = function(i, t) { let e = t.element; e instanceof v && (e.matches("input,textarea,select,option") ? e.focus() : e.click()); }; $o.passive = true; var Mo = class { on$hotkey(t, e, r, s) { var n = this; return this[ie] || (this[ie] = []), this[ie].push(r), r[No] = this, t.$_ || (t.$_ = [$o]), t[Pa] = function() { return n[pi](); }, this[pi](), r; } [pi]() { let t = {}; for (let e = 0, r = ee(this[ie]), s = r.length; e < s; e++) { let n = r[e], o = n.params, l = o.options[0]; if (n[Po] != l ? (n[Po] = l, true) : false) { n[re] = {}; for (let h = 0, a = ee(l.split("|")), c = a.length; h < c; h++) { let u = a[h]; Lo.register(u, o), n[re][u] = true; } } Object.assign(t, n[re]); } return this[Co] = t, this.dataset.hotkey = Object.keys(t).join(" "), this; } }; Ea(v.prototype, Mo.prototype); var tl = Gl(Ko()); var _i = Symbol.for("#getQueryParam"), Ho = Symbol.for("#setQueryParam"), xd = Symbol.for("#__initor__"), Sd = Symbol.for("#__inited__"), Uo = Symbol.for("#query"); var W = class { static parse(t, e) { return t instanceof W ? t : new W(t, e); } constructor(t, e) { this.router = e, this.parse(t); } parse(t) { var r; let e; return t instanceof URL || (t = new URL(t, this.router.origin)), (e = (r = this.router) == null ? void 0 : r.aliases[t.pathname]) && (t.pathname = e), this.url = t, this; } get active\u03A6() { return this.router.location == this; } reparse() { return this.parse(this.url); } get searchParams() { return this.url.searchParams; } search() { let t = this.searchParams ? this.searchParams.toString() : ""; return t ? "?" + t : ""; } update(t) { if (t instanceof Object) for (let e = 0, r = Object.keys(t), s = r.length, n, o; e < s; e++) n = r[e], o = t[n], this.searchParams.set(n, o); else typeof t == "string" && this.parse(t); return this; } clone() { return new W(this.url.href, this.router); } equals(t) { return this.toString() == String(t); } get href() { return this.url.href; } get path() { return this.url.href.slice(this.url.origin.length); } get pathname() { return this.url.pathname; } get query() { return this[Uo] || (this[Uo] = new Proxy({}, {get: this[_i].bind(this), set: this[Ho].bind(this)})); } toString() { return this.href; } [_i](t, e) { return this.searchParams.get(e); } [Ho](t, e, r) { return this[_i](t, e) != r && (r == null || r == "" ? this.searchParams.delete(e) : this.searchParams.set(e, r), this.active\u03A6 && (this.router.history.replaceState({}, null, this.url.toString()), this.router.touch())), true; } }; var Td = Symbol.for("#__initor__"), Od = Symbol.for("#__inited__"), Je = class { constructor(t, e, r) { this.router = t, e && (this.location = W.parse(e), this.original = this.location.clone()), this.referrer = r; } redirect(t) { var e, r; return (r = (e = this.location) == null ? void 0 : e.update) == null || r.call(e, t), this; } get path() { var t; return (t = this.location) == null ? void 0 : t.path; } get url() { var t, e; return (e = (t = this.location) == null ? void 0 : t.toString) == null ? void 0 : e.call(t); } set path(t) { this.location.path = t; } abort(t = false) { return this.aborted = true, t && (this.forceAbort = t), this; } match(t) { return this.location ? this.router.route(t).match(this.path) : null; } }; function Bo(i) { let t; return i ? (t = i.toIterable) ? t.call(i) : i : []; } var Nd = Symbol.for("#__initor__"), Pd = Symbol.for("#__inited__"), Ze = Symbol.for("#routes"), bi = Symbol.for("#match"), Aa = Symbol.for("#symbol"), Yo = Symbol.for("#matches"), vi = new Map(), xi = {}, Wo = {}, ja = /.*/; function qa(i) { if (!vi.has(i)) { let t = new Map(); return vi.set(i, t), t; } return vi.get(i); } function Va(i, t) { let e = qa(i); if (!e.has(t)) { let r = Object.create(i); return Object.assign(r, t), e.set(t, r), r; } return e.get(t); } var Go = class { }; function za(i) { if (xi[i]) return xi[i]; let t = xi[i] = {url: i}, e = i.indexOf("?"), r = i.indexOf("#"); if (r >= 0 && (t.hash = i.slice(r + 1), i = t.url = i.slice(0, r)), e >= 0) { let s = t.query = i.slice(e + 1); i = i.slice(0, e), t.query = Wo[s] || (Wo[s] = new URLSearchParams(s)); } return t.path = i, t; } var Si = class { constructor(t) { this.router = t, this.fullPath = "", this[Ze] = {}, this[bi] = new Go(), this[bi].path = ""; } route(t) { var e; return (e = this[Ze])[t] || (e[t] = new tr(this.router, t, this)); } match() { return this[bi]; } resolve(t) { return "/"; } }, tr = class { constructor(t, e, r) { this.parent = r || t.rootRoute, this.router = t, this.status = 200, this.path = e, this[Aa] = Symbol(), this[Yo] = {}, this[Ze] = {}; } route(t) { var e; return (e = this[Ze])[t] || (e[t] = new tr(this.router, t, this)); } get fullPath() { return "" + this.parent.fullPath + "/" + this.$path; } load(t) { return this.router.queue.add(t); } set path(t) { var e = this; if (this.$path == t) return; if (this.raw = t, this.$path = t, this.groups = [], this.cache = {}, this.dynamic = false, t.indexOf("?") >= 0) { let s = t.split("?"); t = s.shift(), this.query = {}; for (let n = 0, o = Bo(s.join("?").split("&")), l = o.length; n < l; n++) { let h = o[n]; if (!h) continue; let [a, c] = h.split("="); a[0] == "!" && (this.dynamic = true, a = a.slice(1), c = false), c === "" && (c = false), c && c[0] == ":" && (this.dynamic = true), this.query[a] = c || c !== false; } } if (t = t.replace(/\:(\w+|\*)(\.)?/g, function(s, n, o) { return e.dynamic = true, n != "*" && e.groups.push(n), o ? "([^/#.?]+)." : "([^/#?]+)"; }), t == "" && e.query) return; if (t == "*") return e.regex = ja, e; t = "^" + t; let r = t[t.length - 1]; (r == "$" || r == "/") && (t = t.slice(0, -1) + "(?=/?[#?]|/?$)"), r != "/" && r != "$" && t != "^/" && (t = t + "(?=[/#?]|$)"), e.regex = new RegExp(t); } match(t = this.router.path) { var h, a; var e, r; let s = this.parent.match(t); if (!s) return null; let n = za(t), o = n.url, l = ""; if (s.path && n.path.indexOf(s.path) == 0 && (l = s.path + "/", o = o.slice(l.length)), e = this.regex ? o.match(this.regex) : [""]) { let c = l + e[0], u = [this.$path], d = {}; if (this.groups.length) for (let p = 0, m = Bo(e), g = m.length, _; p < g; p++) { let E = m[p]; (_ = this.groups[p - 1]) && (d[_] = E, u.push(E)); } if (this.query) for (let p = this.query, m = 0, g = Object.keys(p), _ = g.length, E, y; m < _; m++) { E = g[m], y = p[E]; let x = E, C = (a = (h = n.query) == null ? void 0 : h.get) == null ? void 0 : a.call(h, E); if (y === false) { if (C) return null; u.push("1"); continue; } if (y[0] == ":" && (x = y.slice(1), y = true), y == true && C || y == C) d[x] = C, u.push(C); else return null; } let b = u.join("*"); d = (r = this[Yo])[b] || (r[b] = d); let f = Va(s, d); return f.path = c, f; } return null; } resolve(t = this.router.path) { if (this.raw[0] == "/" && !this.dynamic) return this.raw.replace(/\$/g, ""); let e = this.parent.match(t), r = this.parent.resolve(t), s; if (this.dynamic) { let n = this.match(t); return n ? n.path : null; } return this.raw[0] == "?" ? s = (r || "/") + this.raw : s = r + "/" + this.raw, s.replace(/\$/g, "").replace(/\/\/+/g, "/"); } }; var Xo = Symbol.for("#__initor__"), Qo = Symbol.for("#__inited__"), Jo = Symbol.for("#__init__"), er = Symbol.for("#idler"), se = Symbol.for("#resolve"), Zo = Symbol(), rr = class extends Set { static [Jo]() { return this.prototype[Xo] = Zo, this; } constructor() { super(); this[er] = Promise.resolve(this), this[Xo] === Zo && this[Qo] && this[Qo](); } emit(t, ...e) { return j(this, t, e); } on(t, ...e) { return A(this, t, ...e); } once(t, ...e) { return F(this, t, ...e); } un(t, ...e) { return pt(this, t, ...e); } add(t) { var e = this; if (t instanceof Function && (t = t()), !this.has(t)) { t.then(function() { return e.delete(t); }); let r = e.size == 0; super.add(t), r && (this[er] = this[se] = null, e.emit("busy", e)); } return t; } delete(t) { return super.delete(t) ? (this.size == 0 && (this[se] && (this[se](this), this[se] = null), this.emit("idle", this)), true) : false; } get idle() { var t = this; return this[er] || (this[er] = new Promise(function(e) { return t[se] = e; })); } }; rr[Jo](); function wi(i, t) { let e = Object.getOwnPropertyDescriptors(t); return delete e.constructor, Object.defineProperties(i, e), i; } var el = Symbol.for("#__initor__"), rl = Symbol.for("#__inited__"), il = Symbol.for("#__init__"), Ei = Symbol.for("#enter"), Ti = Symbol.for("#resolved"), ir = Symbol.for("#leave"), sl = Symbol.for("#afterVisitRouted"), nl = Symbol.for("#afterVisitRouteTo"), ol = Symbol.for("#router"), Ka = Symbol.for("#routes"), nt = Symbol.for("#version"), Mt = Symbol.for("#doc"), ll = Symbol.for("#origin"), Oi = Symbol.for("#request"), ne = Symbol.for("#hash"), U = Symbol.for("#routeTo"), oe = Symbol.for("#path"), J = Symbol.for("#match"), le = Symbol.for("#options"), Ha = Symbol.for("#cache"), hl = Symbol.for("#unmatched"), dt = Symbol.for("#active"), Ua = Symbol.for("#resolvedPath"), Ba = Symbol.for("#dataKey"), Ya = Symbol.for("#activeKey"), he = Symbol.for("#urlKey"), Ft = Symbol.for("#dataMap"), sr = Symbol.for("#href"), R = Symbol.for("#route"), ul = Symbol.for("#context"), al = Symbol.for("#afterVisit"), fl = Symbol.for("#routeHandler"), Wa = Symbol.for("#parentNode"), Ga = Symbol.for("#visitContext"), cl = Symbol.for("##visitContext"), Xa = Symbol.for("#attachToParent"), Qa = Symbol.for("#detachFromParent"), dl = Symbol(); var pl = class { get router() { return this[ol] || (this[ol] = new nr(this)); } }; wi(Ot.prototype, pl.prototype); function Ja() { return true; } var Za = gr(function() { return globalThis.document.router; }), nr = class extends tl.EventEmitter { static [il]() { return this.prototype[el] = dl, this; } constructor(t, e = {}) { super(); this[Ka] = {}, this.aliases = {}, this.redirects = {}, this.rules = {}, this.options = e, this.busy = [], this[nt] = 0, this[Mt] = t, this.queue = new rr(), this.web\u03A6 = !!t.defaultView, this.root = new Si(this), this.history = globalThis.window.history, this.location = new W(e.url || t.location.href, this), this.mode = e.mode || "history", this.queue.on("busy", function() { return globalThis.document.flags.incr("_routing_"); }), this.queue.on("idle", function() { return globalThis.document.flags.decr("_routing_"), L(); }), this.setup(), this[el] === dl && this[rl] && this[rl](); } get origin() { return this[ll] || (this[ll] = this[Mt].location.origin); } get query() { return this.location.query; } init() { return this.refresh({mode: "replace"}), this; } alias(t, e) { return this.aliases[t] = e, this.location.reparse(), this; } touch() { return this[nt]++; } option(t, e) { return e == null ? this.options[t] : (this.options[t] = e, this); } get realpath() { let t = this[Mt].location; return t.href.slice(t.origin.length); } get state() { return {}; } get ctx() { return this[Oi]; } pushState(t, e, r) { return this.history.pushState(t, e || null, String(r)); } replaceState(t, e, r) { return this.history.replaceState(t, e || null, String(r)); } refresh(t = {}) { var e = this; if (this.refreshing) return; this.refreshing = true; let r = this.location, s = W.parse(t.location || this.realpath, this), n = t.mode, o = this[Oi]; if (!s.equals(r) || !o) { let l = new Je(this, s, r); l.mode = n, this[Oi] = l, this.emit("beforechange", l), l.aborted && (!l.forceAbort && globalThis.window.confirm("Are you sure you want to leave? You might have unsaved changes") ? l.aborted = false : n == "pop" ? this.pushState(this.state, null, String(r)) : n == "replace" && this.replaceState(this.state, null, String(r))), l.aborted || (this.location = l.location, n == "push" ? this.pushState(t.state || this.state, null, String(this.location)) : n == "replace" && this.replaceState(t.state || this.state, null, String(this.location)), this.location.state = globalThis.window.history.state, this.emit("change", l), this.touch(), L()); } return N.add(function() { let l = e[Mt].location.hash; if (l != e[ne]) return e.emit("hashchange", e[ne] = l); }), e.refreshing = false, e; } onpopstate(t) { return this.refresh({pop: true, mode: "pop"}), this; } onbeforeunload(t) { let e = new Je(this, null, this.location); if (this.emit("beforechange", e), e.aborted) return true; } onhashchange(t) { return this.emit("hashchange", this[ne] = this[Mt].location.hash), L(); } setup() { this.onclick = this.onclick.bind(this), this.onhashchange = this.onhashchange.bind(this); let t = globalThis.window; return this[ne] = this[Mt].location.hash, this.location = W.parse(this.realpath, this), this.history.replaceState(this.state, null, String(this.location)), t.onpopstate = this.onpopstate.bind(this), t.onbeforeunload = this.onbeforeunload.bind(this), t.addEventListener("hashchange", this.onhashchange), t.addEventListener("click", this.onclick, {capture: true}), t.document.documentElement.emit("routerinit", this), this.refresh, this; } onclick(t) { if (t.metaKey || t.altKey) return; let e = null, r = null, s = t.target; for (; s && (!e || !r); ) !e && s.nodeName == "A" && (e = s), !r && s[U] && (r = s), s = s.parentNode; if (e && r != e && (!r || r.contains(e))) { let n = e.getAttribute("href"); n && !n.match(/\:\/\//) && (!e.getAttribute("target") || e.getAttribute("target") == "_self") && !e.classList.contains("external") && e.addEventListener("click", this.onclicklink.bind(this), {once: true}); } return true; } onclicklink(t) { let e = t.currentTarget || t.target; e[U] && e[U].resolve(); let r = e.getAttribute("href"), s = new URL(e.href), n = s.href.slice(s.origin.length), o = this.realpath.split("#")[0], l = n.split("#")[0]; return o == l ? globalThis.document.location.hash = s.hash : e[U] ? e[U].go() : this.go(n), t.stopPropagation(), t.preventDefault(); } get url() { return this.location.url; } get path() { let t = this.location.path; return this.aliases[t] || t; } get pathname() { return this.location.pathname; } serializeParams(t) { var e; if (t instanceof Object) { e = []; for (let s = 0, n = Object.keys(t), o = n.length, l, h; s < o; s++) l = n[s], h = t[l], e.push([l, globalThis.encodeURI(h)].join("=")); return e.join("&"); } return t || ""; } get hash() { return this[ne]; } set hash(t) { this.history.replaceState({}, null, "#" + this.serializeParams(t)); } match(t) { return this.route(t).match(this.path); } route(t) { return this.root.route(t); } go(t, e = {}) { let r = this.location.clone().update(t, e); return this.refresh({push: true, mode: "push", location: r, state: e}), this; } replace(t, e = {}) { let r = this.location.clone().update(t, e); return this.refresh({replace: true, mode: "replace", location: r, state: e}); } }; nr[il](); var or = class { constructor(t, e, r, s = {}) { this.parent = r, this.node = t, this[oe] = e, this[J] = null, this[le] = s, this[Ha] = {}, this[hl] = {}, this[dt] = null, this[Ua] = null, this[Ba] = Symbol(), this[Ya] = Symbol(), this[he] = Symbol(); } get router() { return this.node.ownerDocument.router; } get route() { return (this.parent ? this.parent.route : this.router).route(this[oe]); } get match() { return this[J]; } get params() { return this[J] || this[hl]; } get state() { let t = this[Ft] || (this[Ft] = new Map()), e = this.params, r = this[Ft].get(e); return r || this[Ft].set(e, r = {}), r; } set state(t) { (this[Ft] || (this[Ft] = new Map())).set(this.params, t); } set path(t) { (this[oe] != t ? (this[oe] = t, true) : false) && this.router.touch(); } get path() { return this[oe]; } get isActive() { return !!this[dt]; } get active\u03A6() { return !!this[dt]; } resolve() { let t = this.router[nt]; if (!(this[nt] != t ? (this[nt] = t, true) : false)) return; let e = this.route, r = this[le], s = this.router.path, n = e.match(s), o = this[dt], l = this[J], h = n != l, a = n && n[this[he]]; return n && (this[dt] = true, this[J] = n, n[this[he]] = s), n && (h || a != s) && this[Ti](n, l, a), !o && n && this[Ei](), !n && (o || o === null) && (this[dt] = false, this[ir]()), this[J]; } [Ei]() { var t, e; return this.node.flags.remove("not-routed"), this.node.flags.add("routed"), (e = (t = this.node) == null ? void 0 : t.routeDidEnter) == null ? void 0 : e.call(t, this); } [Ti](t, e, r = "") { var s, n; return (n = (s = this.node) == null ? void 0 : s.routeDidResolve) == null ? void 0 : n.call(s, this, t, e, r); } [ir]() { var t, e; return this.node.flags.add("not-routed"), this.node.flags.remove("routed"), (e = (t = this.node) == null ? void 0 : t.routeDidLeave) == null ? void 0 : e.call(t, this); } }, Ci = class extends or { [Ei]() { return this; } [Ti]() { return this; } [ir]() { return this; } resolve() { let t = this.router[nt]; if (!(this[nt] != t ? (this[nt] = t, true) : false)) return; let e = this[le], r = this.route, s = this.router.path, n = this.route.resolve(s), o = this.route.match(s); o && (this[J] = o, this[J][this[he]] = s), e.sticky && this[J] && (n = this[J][this[he]]), (this[sr] != n ? (this[sr] = n, true) : false) && this.node.nodeName == "A" && this.node.setAttribute("href", n), this.node.flags.toggle("active", !!o); } go() { return this.resolve(), this[le] && this[le].replace ? this.router.replace(this[sr]) : this.router.go(this[sr]); } }, ml = class { get router() { return this.ownerDocument.router; } }; wi(I.prototype, ml.prototype); var gl = class { set route(t) { if (this[R]) { this[R].path = t; return; } let e = t[0] != "/" ? this[ul].route : null; this[R] = new or(this, t, e, this.route__), this[al] = this[sl]; } get route() { return this[R]; } set route\u039Eto(t) { var e = this; if (this[U]) { this[U].path = t; return; } let r = t[0] != "/" ? this[ul].route : null; this[R] = this[U] = new Ci(this, t, r, this.routeTo__), this[al] = this[nl], e.onclick = function(s) { if (!s.altKey && !s.metaKey && !s[fl]) return s.preventDefault(), s[fl] = e[U], e[U].go(); }; } [sl]() { if (this[R]) { let t = this[Wa], e = t && t[Ga]; if (e && e.matchedRoute && e.matchedRoute != this[R]) { (this[R][dt] != false ? (this[R][dt] = false, true) : false) && (this[R][ir](), this[R][nt] = -1); return; } if (this[R].resolve(), this[R].active\u03A6) e.matchedRoute = this[R]; else return; } if (this.visit && this.visit(), this[cl]) return this[cl] = null; } [nl]() { if (this[U] && this[U].resolve(), this.visit) return this.visit(); } routeDidEnter(t) { return this[Xa](); } routeDidLeave(t) { return this[Qa](); } routeDidResolve(t, e, r) { var s = this; this.routed instanceof Function && e != r && s.router.queue.add(async function() { s.suspend(); let n = await s.routed(e, t.state, r); return s.unsuspend(); }); } }; wi(v.prototype, gl.prototype); function Z(i) { let t; return i ? (t = i.toIterable) ? t.call(i) : i : []; } function Ni(i, t) { let e = Object.getOwnPropertyDescriptors(t); return delete e.constructor, Object.defineProperties(i, e), i; } var Xd = Symbol.for("#__initor__"), Qd = Symbol.for("#__inited__"), ue = Symbol.for("##reactive"), _t = Symbol.for("##referenced"), ae = Symbol.for("##dereferenced"), lr = Symbol.for("#map"), yl = Symbol.for("#__init__"), _l = Symbol.for("#child"), fe = Symbol.for("#reactions"), O = {TOUCHING: 1 << 1, STALE: 1 << 2, OBJECT: 1 << 3, RUNNING: 1 << 4, INVALIDATING: 1 << 5, POSSIBLY_STALE: 1 << 6, AUTORUN: 1 << 7}, D = 0, bl = false; var tf = 0, vl = 1, Pi = {META: new Map(), VALUE: new Map(), REF: new Map()}, z = Symbol.for("~"), xl = Symbol.for("~~"), ki = function(i, t) { return t.has(i) || t.set(i, Symbol()), t.get(i); }, hr = function(i) { return typeof i == "symbol" ? ki(i, Pi.VALUE) : Symbol.for(i); }, Li = function(i) { return typeof i == "symbol" ? ki(i, Pi.META) : Symbol.for("#" + i + "__"); }, $i = function(i) { return typeof i == "symbol" ? ki(i, Pi.REF) : Symbol.for("~" + i); }, T = function(i, t) { return D && w.add(i[z]), t; }, B = function(i, t) { return i[z].invalidated(0), t; }, It = function(i, t, e) { let r = i[z]; return r || (r = i[z] = new ur(O.OBJECT), Object.defineProperties(i, e)), t && r.addSubscriber(t), i; }, Mi = function(i, t) { let e = i[z]; return e && e.removeSubscriber(t), i; }, Sl = class { constructor(t) { this.changes = new Map(), this.cleanup(), t && this.reset(t); } reset(t = []) { return this.array = t, this.initialLength = t.length; } cleanup() { return this.idx = 0, this.array = null, this.changes.clear(), this.dirty = false; } push(t) { if (this.initialLength == 0) { this.array.indexOf(t) < 0 && (this.changes.set(t, 1), this.array.push(t), this.idx++); return; } let e = this.array[this.idx]; if (e === t) return ++this.idx; { let r = this.array.indexOf(t), s = this.changes.get(t); if (r === -1) this.array.splice(this.idx, 0, t), this.changes.set(t, 1), this.idx++; else if (r === this.idx + 1) e && this.changes.set(e, -1), this.array.splice(this.idx, 1), ++this.idx; else { if (r < this.idx) return; r > this.idx && this.array.splice(r, 1), this.array.splice(this.idx, 0, t); } if (s == -1) return this.changes.delete(t); } } end() { if (this.array.length >= this.idx) for (; this.array.length > this.idx; ) this.changes.set(this.array.pop(), -1); return this.array; } patch() { return this.end(); } }; function Fi(i) { var t, e; let r = Object.getOwnPropertyDescriptors(i.prototype); return t = r.name, delete r.name, e = r.constructor, delete r.constructor, r; } function ef() { if (!!(bl != true ? (bl = true, true) : false)) return vr.on("inited", function(i) { let t = i[xl]; if (t) { let e = i instanceof I, r = i[z] || (i[z] = {}); for (let s = 0, n = Object.keys(t), o = n.length, l, h; s < o; s++) { l = n[s], h = t[l]; let a = r[l] = new ce(i[l], i, h); e || a.call(); } e && (A(i, "mount", function() { var s; s = []; for (let n = 0, o = Z(Object.values(r)), l = o.length; n < l; n++) { let h = o[n]; s.push(h instanceof ce && h.activate()); } return s; }), A(i, "unmount", function() { var s; s = []; for (let n = 0, o = Z(Object.values(r)), l = o.length; n < l; n++) { let h = o[n]; s.push(h instanceof ce && h.deactivate()); } return s; })); } }); } function rf(i, t = xl) { return i.hasOwnProperty(t) || (i[t] = Object.assign({}, i[t] || {})), i[t]; } var ar = class { constructor(t, e = 0) { this.depth = e, this.parent = t, this.target = null, this.patcher = new Sl(); } get active\u03A6() { return w == this; } get root\u03A6() { return this == Rt; } reset(t) { return this.tracking = true, this.target = t, this.beacon = t.beacon, this.patcher.reset(t.observing || (t.observing = [])), this; } add(t) { if (this.tracking && t) return this.patcher.push(t); } react(t) { return Rt.reactions.add(t); } push(t) { return w = this.child.reset(t); } pop() { let t = null; if (this.beacon) { t = this.patcher.end(); let e = this.patcher.changes; if (e.size) for (let [s, n] of Z(e)) n === 1 ? s.addSubscriber(this.beacon) : s.removeSubscriber(this.beacon); } return this.patcher.cleanup(), this.target = this.beacon = null, w = this.parent, w == Rt && Rt.flush(), t; } get child() { return this[_l] || (this[_l] = new ar(this, this.depth + 1)); } get reactions() { return this[fe] || (this[fe] = new Set()); } flush() { if (!this[fe]) return; let t = this[fe]; this[fe] = null; for (let e of Z(t)) e.call(); } }, wl = class extends ar { add() { return true; } }, w = new wl(null, 0), Rt = w, sf = function() { return w.tracking = false; }, El = function(i, t, e, r, s) { let n = i[e], o = i[s]; return o || (o = i[s] = new ur(0, r, n, t)), w.add(o, i), n; }, Tl = function(i, t, e, r, s, n) { let o = i[e]; if (r != o) { i[e] = r; let l = i[n]; l && l.changed(0, r, o); } }, ur = class { constructor(t, e, r, s) { return this.id = vl++, this.observer = null, this.observers = null, r && r[_t] && r[_t](this), this; } changed(t, e, r) { if (tf++, r && r[ae] && r[ae](this, e), e && e[_t] && e[_t](this, r), this.observer && this.observer.invalidated(t + 1, this, e, r), this.observers) for (let s = 0, n = Z(this.observers), o = n.length; s < o; s++) n[s].invalidated(t + 1, this, e, r); w == Rt && w.flush(); } invalidated(t, e) { if (this.observer && this.observer.invalidated(t + 1, this), this.observers) for (let r = 0, s = Z(this.observers), n = s.length; r < n; r++) s[r].invalidated(t + 1, this); return t == 0 && w == Rt && w.flush(), true; } addSubscriber(t) { this.observer ? (this.observers || (this.observers = []), this.observers.push(t)) : this.observer = t; } removeSubscriber(t) { if (this.observer == t) return this.observer = null; let e = this.observers, r = e.indexOf(t); r >= 0 && e.splice(r, 1); } reportChanged() { return this.changed(0); } reportObserved() { return w.add(this); } }; function nf(i) { return new ur(null, null, null, i); } var Ol = class extends Array { push() { return B(this, super.push(...arguments)); } pop() { return B(this, super.pop(...arguments)); } unshift() { return B(this, super.unshift(...arguments)); } shift() { return B(this, super.shift(...arguments)); } splice() { return B(this, super.splice(...arguments)); } at() { return T(this, super.at(...arguments)); } map() { return T(this, super.map(...arguments)); } flatMap() { return T(this, super.flatMap(...arguments)); } flat() { return T(this, super.flat(...arguments)); } filter() { return T(this, super.filter(...arguments)); } find() { return T(this, super.find(...arguments)); } slice() { return T(this, super.slice(...arguments)); } sort() { return T(this, super.sort(...arguments)); } get len() { return T(this, this.length); } set len(t) { this.length = t, B(this); } toIterable() { return D && w.add(this[z]), this; } [Symbol.iterator]() { return T(this, super[Symbol.iterator](...arguments)); } }, Cl = Fi(Ol), Nl = class { get len() { return this.length; } set len(t) { this.length = t; } get [ue]() { return It(this, null, Cl); } [_t](t) { return It(this, t, Cl); } [ae](t) { return Mi(this, t); } }; Ni(Array.prototype, Nl.prototype); var Pl = class extends Set { has() { return T(this, super.has(...arguments)); } keys() { return T(this, super.keys(...arguments)); } values() { return T(this, super.values(...arguments)); } entries() { return T(this, super.entries(...arguments)); } add() { return B(this, super.add(...arguments)); } clear() { return B(this, super.clear(...arguments)); } delete() { return B(this, super.delete(...arguments)); } }, kl = Fi(Pl), Ll = class { get [ue]() { return It(this, null, kl); } [_t](t) { return It(this, t, kl); } [ae](t) { return Mi(this, t); } }; Ni(Set.prototype, Ll.prototype); var $l = class extends Map { get() { return T(this, super.get(...arguments)); } has() { return T(this, super.has(...arguments)); } keys() { return T(this, super.keys(...arguments)); } values() { return T(this, super.values(...arguments)); } entries() { return T(this, super.entries(...arguments)); } set() { return B(this, super.set(...arguments)); } clear() { return B(this, super.clear(...arguments)); } delete() { return B(this, super.delete(...arguments)); } }, Ml = Fi($l), Fl = class { get [ue]() { return It(this, null, Ml); } [_t](t) { return It(this, t, Ml); } [ae](t) { return Mi(this, t); } }; Ni(Map.prototype, Fl.prototype); var Il = class { constructor(t, e = {}) { var r = this, s; this.name = t, this.options = e; let n = this.key = hr(t), o = $i(t), l = r.descriptor = {enumerable: (s = e.enumerable) != null ? s : true, configurable: false, get: function() { return D ? El(this, t, n, r, o) : this[n]; }, set: function(a) { return D || !!this[o] ? Tl(this, t, n, a, r, o) : this[n] = a; }}, h = r.lazyDescriptor = {enumerable: false, configurable: true, get: function() { return D ? (Object.defineProperty(this, t, l), this[t]) : this[n]; }, set: function(a) { return this[n] = a, this[o] = null, Object.defineProperty(this, t, l); }}; } }, Rl = class { constructor(t = null) { this[yl](t); } [yl](t = null) { var e; this[lr] = t && (e = t[lr]) !== void 0 ? e : new Map(); } for(t) { let e = this[lr].get(t); return e || this[lr].set(t, e = []), e; } get(t) { let e = this.for(t); return e[z] || e[ue], D && T(e), e; } add(t, e) { return this.for(t).push(e); } delete(t, e) { let r = this.for(t), s = r.indexOf(e); r.splice(s, 1); } }, Dl = class { constructor(t, e) { var r = this; this.name = t, this.key = e, this.index = new Rl(); let s = $i(t), n = r.descriptor = {enumerable: true, configurable: false, get: function() { return D ? El(this, t, e, r, s) : this[e]; }, set: function(l) { let h = this[e]; if (D || !!this[s] ? Tl(this, t, e, l, r, s) : this[e] = l, h != l && (h && r.index.delete(h, this), l)) return r.index.add(l, this); }}, o = r.lazyDescriptor = {set: function(l) { return this[e] = l, l && r.index.add(l, this), Object.defineProperty(this, t, n), this[s] = null; }}; } where(t) { return this.index.get(t); } }, fr = class { constructor(t, e, r) { this.observing = null, this.observers = null, this.flags = 68, this.target = t, this.func = e, this.vkey = r, this.version = 0; } get beacon() { return this; } addSubscriber(t) { this.observer ? (this.observers || (this.observers = []), this.observers.push(t)) : this.observer = t; } removeSubscriber(t) { if (this.observer == t) return this.observer = null; let e = this.observers, r = e.indexOf(this); r >= 0 && e.splice(r, 1); } invalidated(t, e) { if (this.flags |= O.STALE | O.POSSIBLY_STALE, this.observer && this.observer.invalidated(t, this), !!this.observers) { for (let r = 0, s = Z(this.observers), n = s.length; r < n; r++) s[r].invalidated(t, this); return this; } } value() { if (D && w.add(this), (this.flags & O.POSSIBLY_STALE) == 0) return this.target[this.vkey]; D++, this.flags |= O.RUNNING, w.push(this); let t = this.func.call(this.target); w.pop(this); let e = this.target[this.vkey]; return this.target[this.vkey] = t, this.flags &= ~(O.STALE | O.POSSIBLY_STALE | O.RUNNING), t !== e && this.version++, D--, t; } }, Al = class { constructor(t, e) { this.name = t; let r = $i(t), s = hr(t), n = this.descriptor = {enumerable: false, configurable: false, get: function() { return this[r].value(); }}, o = this.lazyDescriptor = {enumerable: false, get: function() { let l = this[r] = new fr(this, e, s); return Object.defineProperty(this, t, n), l.value(); }}; } }, ce = class { get beacon() { return this; } constructor(t, e, r = {}) { this.cb = t, this.context = e, this.options = r, this.flags = 0, this.id = vl++, this.cachedComputedVersions = new WeakMap(), this.checkComputedValues = new Set(), this.observing = [], this.timeout = null; } get running\u03A6() { return this.flags & O.RUNNING; } invalidated(t, e) { return e instanceof fr ? (this.flags |= O.POSSIBLY_STALE, this.checkComputedValues.add(e)) : this.flags |= O.STALE, w.react(this); } activate() { return this.observing = [], this.cachedComputedVersions = new WeakMap(), this.checkComputedValues = new Set(), this.call(), this; } deactivate() { if (this.timeout && clearTimeout(this.timeout), this.observing) for (let t = 0, e = Z(this.observing), r = e.length; t < r; t++) e[t].removeSubscriber(this); return this.observing = this.checkComputedValues = this.cachedComputedVersions = null, this; } call() { var t = this; if (D && console.warn("should not call reaction inside an autorunning context?"), this.flags & O.POSSIBLY_STALE && (this.flags & O.STALE) == 0) { let e = false; for (let r of Z(this.checkComputedValues)) { let s = this.cachedComputedVersions.get(r); r.value(); let n = r.version; if (s != n) { e = true; break; } } if (!e) { this.flags &= ~O.POSSIBLY_STALE, this.checkComputedValues.clear(); return; } } if (this.options.delay) { clearTimeout(this.timeout); let e = this.options.delay; typeof e != "number" && (e = 1e3), t.timeout = setTimeout(function() { return t.run(); }, e); return; } return t.run(); } run() { D++, this.flags |= O.RUNNING; let t = w.push(this), e = this.cb.call(this.context, sf), r = w.pop(this); this.observing = r, this.checkComputedValues.clear(); for (let s = 0, n = Z(r), o = n.length; s < o; s++) { let l = n[s]; l instanceof fr && this.cachedComputedVersions.set(l, l.version); } return this.flags &= ~(O.RUNNING | O.STALE | O.POSSIBLY_STALE), D--, this.options.silent || L(), e; } dispose() { return this.deactivate(), this.cb = this.context = this.options = null, this; } }, Ii = class { constructor(t, e) { this.context = e, this.cb = t; } run(t = this.context, e = []) { w.push(this); let r = this.cb.apply(t, e); return w.pop(this), r; } }; function of(i, t = {}) { let e = new ce(i, globalThis, t); return e.call(), e; } function lf(i) { return i[ue]; } function hf(i) { return new Ii(i, globalThis).run(); } function uf(i) { return i && i[z] && i[z].invalidated(0), i; } function af(i) { return i && i[z] && i[z].reportObserved(), i; } function ff(i, t, e) { let r = Li(t); return (i[r] = new Al(t, e.get)).lazyDescriptor; } function cf(i, t, e) { let r = Li(t), s = hr(t), n = this[0] || {}, o = i[r] = new Il(t, n); return e ? (Object.defineProperty(i, s, Object.assign({}, e)), o.lazyDescriptor) : (Object.defineProperty(i, t, o.lazyDescriptor), null); } function df(i, t, e) { let r = Li(t); return i.constructor[t], (i[r] = new Dl(t, hr(t))).lazyDescriptor; } function pf(i, t, e) { let r = rf(i), s = this[0] || {}; return s.flags = O.AUTORUN, ef(), r[t] = s, e; } function mf(i, t, e) { if (e.value) { let r = new Ii(e.value, null); e.value = function() { return r.run(this, arguments); }; } return e; }