var hr=Object.defineProperty;var Vl=Object.getOwnPropertyDescriptor;var zl=Object.getOwnPropertyNames;var ql=Object.prototype.hasOwnProperty;var Kl=(t,e)=>{for(var r in e)hr(t,r,{get:e[r],enumerable:!0})},Ul=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of zl(e))!ql.call(t,n)&&n!==r&&hr(t,n,{get:()=>e[n],enumerable:!(s=Vl(e,n))||s.enumerable});return t};var Bl=t=>Ul(hr({},"__esModule",{value:!0}),t);var gc={};Kl(gc,{Accessor:()=>Bs,CUSTOM_TYPES:()=>js,Comment:()=>ue,Component:()=>me,CustomEvent:()=>A,Document:()=>ce,DocumentFragment:()=>Uo,Easer:()=>nr,Element:()=>N,ElementRoute:()=>lr,ElementRouteTo:()=>Us,Emitter:()=>Ze,Event:()=>et,EventHandler:()=>zs,Fragment:()=>Ft,HTMLButtonElement:()=>Cs,HTMLElement:()=>er,HTMLHtmlElement:()=>qo,HTMLInputElement:()=>Ps,HTMLOptionElement:()=>Is,HTMLScriptElement:()=>Ko,HTMLSelectElement:()=>$s,HTMLTextAreaElement:()=>Ls,ImbaElement:()=>ol,IntersectionEventDefaults:()=>ye,KeyboardEvent:()=>ks,LazyProxy:()=>ys,MouseEvent:()=>Ns,Node:()=>G,PointerEvent:()=>Os,RenderContext:()=>mt,Router:()=>or,SVGElement:()=>rr,Scheduler:()=>bs,ShadowRoot:()=>Bo,TYPES:()=>fe,Text:()=>tr,UIEvent:()=>zo,Window:()=>Ho,accessor:()=>Fl,autorun:()=>El,awaits:()=>Nl,clearInterval:()=>xs,clearTimeout:()=>ws,colors:()=>ll,commit:()=>L,createAtom:()=>Tl,createComment:()=>_t,createComponent:()=>Ms,createDynamic:()=>Qo,createElement:()=>Wo,createFragment:()=>Jo,createIndexedList:()=>sl,createKeyedList:()=>nl,createLiveFragment:()=>rl,createRenderContext:()=>Es,createSVGElement:()=>Xo,createSlot:()=>pe,createTextNode:()=>sr,customElements:()=>Go,defineTag:()=>tl,descriptor:()=>Al,emit:()=>tt,env:()=>Ro,events:()=>dl,getDeepPropertyDescriptor:()=>ae,getRenderContext:()=>Vo,getSuperTagType:()=>Zo,getTagType:()=>Fs,get_document:()=>de,hooks:()=>Ts,hotkeys:()=>qs,hydrate:()=>il,listen:()=>Z,locals:()=>_l,mount:()=>Ds,observable:()=>Ol,once:()=>q,parseTime:()=>It,proxy:()=>vs,render:()=>al,renderContext:()=>C,renderer:()=>Mt,reportChanged:()=>$l,reportObserved:()=>Pl,router:()=>wl,run:()=>kl,scheduler:()=>F,serve:()=>Do,session:()=>Ks,setInterval:()=>_s,setTimeout:()=>Ss,styles:()=>As,toCamelCase:()=>Mo,transitions:()=>ge,unlisten:()=>jt,unmount:()=>Rs,use_dom_bind:()=>ul,use_dom_teleport:()=>cl,use_dom_transitions:()=>fl,use_events:()=>pl,use_events_hotkey:()=>Sl,use_events_intersect:()=>yl,use_events_keyboard:()=>Vs,use_events_mouse:()=>ir,use_events_pointer:()=>ml,use_events_resize:()=>vl,use_events_selection:()=>bl,use_events_touch:()=>gl,use_hooks:()=>Fo,use_router:()=>xl,use_slots:()=>el,use_styles:()=>hl,use_window:()=>Yo,\u03B1action:()=>Ml,\u03B1autorun:()=>jl,\u03B1computed:()=>Ll,\u03B1lazy:()=>Ao,\u03B1observable:()=>Cl,\u03B1prop:()=>Dl,\u03B1ref:()=>Il});module.exports=Bl(gc);var Hl=Object.create,Hs=Object.defineProperty,Gl=Object.getOwnPropertyDescriptor,Yl=Object.getOwnPropertyNames,Wl=Object.getPrototypeOf,Xl=Object.prototype.hasOwnProperty,Jl=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Ql=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Yl(e))!Xl.call(t,n)&&n!==r&&Hs(t,n,{get:()=>e[n],enumerable:!(s=Gl(e,n))||s.enumerable});return t},Zl=(t,e,r)=>(r=t!=null?Hl(Wl(t)):{},Ql(e||!t||!t.__esModule?Hs(r,"default",{value:t,enumerable:!0}):r,t)),th=Jl((t,e)=>{"use strict";var r=typeof Reflect=="object"?Reflect:null,s=r&&typeof r.apply=="function"?r.apply:function(h,f,d){return Function.prototype.apply.call(h,f,d)},n;r&&typeof r.ownKeys=="function"?n=r.ownKeys:Object.getOwnPropertySymbols?n=function(h){return Object.getOwnPropertyNames(h).concat(Object.getOwnPropertySymbols(h))}:n=function(h){return Object.getOwnPropertyNames(h)};function i(h){console&&console.warn&&console.warn(h)}var o=Number.isNaN||function(h){return h!==h};function l(){l.init.call(this)}e.exports=l,e.exports.once=E,l.EventEmitter=l,l.prototype._events=void 0,l.prototype._eventsCount=0,l.prototype._maxListeners=void 0;var a=10;function p(h){if(typeof h!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof h)}Object.defineProperty(l,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(h){if(typeof h!="number"||h<0||o(h))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+h+".");a=h}}),l.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},l.prototype.setMaxListeners=function(h){if(typeof h!="number"||h<0||o(h))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+h+".");return this._maxListeners=h,this};function u(h){return h._maxListeners===void 0?l.defaultMaxListeners:h._maxListeners}l.prototype.getMaxListeners=function(){return u(this)},l.prototype.emit=function(h){for(var f=[],d=1;d0&&(T=f[0]),T instanceof Error)throw T;var O=new Error("Unhandled error."+(T?" ("+T.message+")":""));throw O.context=T,O}var D=w[h];if(D===void 0)return!1;if(typeof D=="function")s(D,this,f);else for(var ve=D.length,Rl=S(D,ve),d=0;d0&&O.length>w&&!O.warned){O.warned=!0;var D=new Error("Possible EventEmitter memory leak detected. "+O.length+" "+String(f)+" listeners added. Use emitter.setMaxListeners() to increase limit");D.name="MaxListenersExceededWarning",D.emitter=h,D.type=f,D.count=O.length,i(D)}return h}l.prototype.addListener=function(h,f){return y(this,h,f,!1)},l.prototype.on=l.prototype.addListener,l.prototype.prependListener=function(h,f){return y(this,h,f,!0)};function b(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function _(h,f,d){var v={fired:!1,wrapFn:void 0,target:h,type:f,listener:d},w=b.bind(v);return w.listener=d,v.wrapFn=w,w}l.prototype.once=function(h,f){return p(f),this.on(h,_(this,h,f)),this},l.prototype.prependOnceListener=function(h,f){return p(f),this.prependListener(h,_(this,h,f)),this},l.prototype.removeListener=function(h,f){var d,v,w,T,O;if(p(f),v=this._events,v===void 0)return this;if(d=v[h],d===void 0)return this;if(d===f||d.listener===f)--this._eventsCount===0?this._events=Object.create(null):(delete v[h],v.removeListener&&this.emit("removeListener",h,d.listener||f));else if(typeof d!="function"){for(w=-1,T=d.length-1;T>=0;T--)if(d[T]===f||d[T].listener===f){O=d[T].listener,w=T;break}if(w<0)return this;w===0?d.shift():g(d,w),d.length===1&&(v[h]=d[0]),v.removeListener!==void 0&&this.emit("removeListener",h,O||f)}return this},l.prototype.off=l.prototype.removeListener,l.prototype.removeAllListeners=function(h){var f,d,v;if(d=this._events,d===void 0)return this;if(d.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):d[h]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete d[h]),this;if(arguments.length===0){var w=Object.keys(d),T;for(v=0;v=0;v--)this.removeListener(h,f[v]);return this};function c(h,f,d){var v=h._events;if(v===void 0)return[];var w=v[f];return w===void 0?[]:typeof w=="function"?d?[w.listener||w]:[w]:d?x(w):S(w,w.length)}l.prototype.listeners=function(h){return c(this,h,!0)},l.prototype.rawListeners=function(h){return c(this,h,!1)},l.listenerCount=function(h,f){return typeof h.listenerCount=="function"?h.listenerCount(f):m.call(h,f)},l.prototype.listenerCount=m;function m(h){var f=this._events;if(f!==void 0){var d=f[h];if(typeof d=="function")return 1;if(d!==void 0)return d.length}return 0}l.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]};function S(h,f){for(var d=new Array(f),v=0;v=0?t.replace(eh,function(e){return e.charAt(1).toUpperCase()}):t}function ae(t,e,r){if(!t)return;let s=Object.getOwnPropertyDescriptor(t,e);return s||t==r?s||void 0:ae(Reflect.getPrototypeOf(t),e,r)}var Gs=function(t,e,r){let s,n,i;for(;(s=r)&&(r=r.next);)(n=r.listener)&&(r.path&&n[r.path]?i=e?n[r.path].apply(n,e):n[r.path]():i=e?n.apply(r,e):n.call(r)),r.times&&--r.times<=0&&(s.next=r.next,r.listener=null)};function Z(t,e,r,s){var n;let i,o,l;return i=t[be]||(t[be]={}),o=i[e]||(i[e]={}),l=o.tail||(o.tail=o.next={}),l.listener=r,l.path=s,o.tail=l.next={},l}function q(t,e,r){let s=Z(t,e,r);return s.times=1,s}function jt(t,e,r,s){let n,i,o=t[be];if(!!o&&(n=o[e])){for(;(i=n)&&(n=n.next);)if(n==r||n.listener==r){i.next=n.next,n.listener=null;break}}}function tt(t,e,r){let s;(s=t[be])&&(s[e]&&Gs(e,r,s[e]),s.all&&Gs(e,[e,r],s.all))}var Ze=class{emit(t,...e){return tt(this,t,e)}on(t,...e){return Z(this,t,...e)}once(t,...e){return q(this,t,...e)}un(t,...e){return jt(this,t,...e)}};function rh(t){let e;return t?(e=t.toIterable)?e.call(t):t:[]}var Ys=Symbol.for("#__init__"),Ws=Symbol.for("#schedule"),ar=Symbol.for("#frames"),Se=Symbol.for("#interval"),xt=Symbol.for("#stage"),wt=Symbol.for("#scheduled"),_e=Symbol.for("#version"),sh=Symbol.for("#fps"),Xs=Symbol.for("#ticker"),nh=globalThis.requestAnimationFrame||function(t){return globalThis.setTimeout(t,1e3/60)},vc=1/60,ih=class{constructor(t=null){this[Ys](t)}[Ys](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:!1,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[ar],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===!0?this.owner.on("commit",this):this.value===!1||typeof this.value=="number"&&(this.value/16.666666666666668<=2?this.owner.on("raf",this):this[Se]=globalThis.setInterval(this.queue.bind(this),this.value)),this.active=!0,this}deactivate(){return this.value===!0&&this.owner.un("commit",this),this.owner.un("raf",this),this[Se]&&(globalThis.clearInterval(this[Se]),this[Se]=null),this.active=!1,this}},bs=class{constructor(){var t=this;this.id=Symbol(),this.queue=[],this.stage=-1,this[xt]=-1,this[ar]=0,this[wt]=!1,this[_e]=0,this.listeners={},this.intervals={},t.commit=function(){return t.add("commit"),t},this[sh]=0,t.$promise=null,t.$resolve=null,this[Xs]=function(e){return t[wt]=!1,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[wt]||this[Ws](),this}get committing\u03A6(){return this.queue.indexOf("commit")>=0}get syncing\u03A6(){return this[xt]==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[ar]++;if(this.ts||(this.ts=t),this.dt=t-this.ts,this.ts=t,this.queue=[],this[xt]=1,this[_e]++,r.length)for(let n=0,i=rh(r),o=i.length;n0&&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[Qs],s=this[Zs],n=!0;if(!r)r=this[Qs]=[t],s=this[Zs]=[e||""],this.toString=this.valueOf=this[Js];else{let i=r.indexOf(t),o=e||"";i==-1?(r.push(t),s.push(o)):s[i]!=o?s[i]=o:n=!1}n&&(this[tn]=" "+s.join(" "),this.sync())}valueOf(){return this.string}toString(){return this.string}[Js](){return this.string+(this[tn]||"")}sync(){return this.dom.flagSync$()}get stacks(){return this[en]||(this[en]={})}},xe=Symbol.for("#__init__"),sn=Symbol.for("#__initor__"),nn=Symbol.for("#__inited__"),ur=Symbol.for("#getRenderContext"),oh=Symbol.for("#getDynamicContext"),on=Symbol(),C={context:null},lh=class{constructor(t=null){this[xe](t)}[xe](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()}},Mt=new lh,mt=class extends Map{static[xe](){return this.prototype[sn]=on,this}constructor(t,e=null){super(),this._=t,this.sym=e,this[sn]===on&&this[nn]&&this[nn]()}pop(){return C.context=null}[ur](t){let e=this.get(t);return e||this.set(t,e=new mt(this._,t)),C.context=e}[oh](t,e){return this[ur](t)[ur](e)}run(t){return this.value=t,C.context==this&&(C.context=null),this.get(t)}cache(t){return this.set(this.value,t),t}};mt[xe]();function Es(t,e=Symbol(),r=t){return C.context=t[e]||(t[e]=new mt(r,e))}function Vo(){let t=C.context,e=t||new mt(null);return globalThis.DEBUG_IMBA&&!t&&Mt.stack.length>0&&console.warn("detected unmemoized nodes in",Mt.stack.slice(0),"see https://imba.io",e),t&&(C.context=null),e}function Dt(t,e){let r=Object.getOwnPropertyDescriptors(e);return delete r.constructor,Object.defineProperties(t,r),t}function hh(t){let e;return t?(e=t.toIterable)?e.call(t):t:[]}var Rt=Symbol.for("#parent"),ln=Symbol.for("#closestNode"),ah=Symbol.for("#parentNode"),uh=Symbol.for("#context"),we=Symbol.for("#__init__"),hn=Symbol.for("##inited"),cr=Symbol.for("#getRenderContext"),ch=Symbol.for("#getDynamicContext"),an=Symbol.for("#insertChild"),Vt=Symbol.for("#appendChild"),fr=Symbol.for("#replaceChild"),un=Symbol.for("#removeChild"),rt=Symbol.for("#insertInto"),cn=Symbol.for("#insertIntoDeopt"),zt=Symbol.for("#removeFrom"),fn=Symbol.for("#removeFromDeopt"),Tt=Symbol.for("#replaceWith"),dn=Symbol.for("#replaceWithDeopt"),dr=Symbol.for("#placeholderNode"),fh=Symbol.for("#attachToParent"),dh=Symbol.for("#detachFromParent"),ph=Symbol.for("#placeChild"),mh=Symbol.for("#beforeReconcile"),gh=Symbol.for("#afterReconcile"),yh=Symbol.for("#afterVisit"),vh=Symbol.for("#visitContext"),pn=Symbol.for("#__initor__"),mn=Symbol.for("#__inited__"),gn=Symbol.for("##parent"),pr=Symbol.for("##up"),yn=Symbol.for("##context"),gt=Symbol.for("#domNode"),Te=Symbol.for("##placeholderNode"),vn=Symbol.for("#domDeopt"),Ee=Symbol.for("##visitContext"),bn=Symbol.for("#isRichElement"),Sn=Symbol.for("#src"),Et=Symbol.for("#htmlNodeName"),bh=Symbol.for("#getSlot"),_n=Symbol.for("#ImbaElement"),xn=Symbol.for("#cssns"),Sh=Symbol.for("#cssid"),wn=Symbol(),{Event:et,UIEvent:zo,MouseEvent:Ns,PointerEvent:Os,KeyboardEvent:ks,CustomEvent:A,Node:G,Comment:ue,Text:tr,Element:N,HTMLElement:er,HTMLHtmlElement:qo,HTMLSelectElement:$s,HTMLInputElement:Ps,HTMLTextAreaElement:Ls,HTMLButtonElement:Cs,HTMLOptionElement:Is,HTMLScriptElement:Ko,SVGElement:rr,DocumentFragment:Uo,ShadowRoot:Bo,Document:ce,Window:Ho,customElements:Go}=globalThis.window,Tn={};function En(t,e,r){if(!t)return r[e]=null;if(r[e]!==void 0)return r[e];let s=Object.getOwnPropertyDescriptor(t,e);return s!==void 0||t==rr?r[e]=s||null:En(Reflect.getPrototypeOf(t),e,r)}var mr={},gr={},fe={},js={};function de(){return globalThis.document}function Yo(){return!0}var _h={get(t,e){let r=t,s;for(;r&&s==null;)(r=r[Rt])&&(s=r[e]);return s},set(t,e,r){let s=t,n;for(;s&&n==null;){if(ae(s,e,N))return s[e]=r,!0;s=s[Rt]}return!0}},xh=class{get flags(){return this.documentElement.flags}};Dt(ce.prototype,xh.prototype);var wh=class{get[Rt](){return this[gn]||this.parentNode||this[pr]}get[ln](){return this}get[ah](){return this[Rt][ln]}get[uh](){return this[yn]||(this[yn]=new Proxy(this,_h))}[we](){return this}[hn](){return this}[cr](t){return Es(this,t)}[ch](t,e){return this[cr](t)[cr](e)}[an](t,e){return t[rt](this,e)}[Vt](t){return t[rt](this,null)}[fr](t,e){let r=this[an](t,e);return this[un](e),r}[un](t){return t[zt](this)}[rt](t,e=null){return e?t.insertBefore(this,e):t.appendChild(this),this}[cn](t,e){return e?t.insertBefore(this[gt]||this,e):t.appendChild(this[gt]||this),this}[zt](t){return t.removeChild(this)}[fn](t){return t.removeChild(this[gt]||this)}[Tt](t,e){return e[fr](t,this)}[dn](t,e){return e[fr](t,this[gt]||this)}get[dr](){return this[Te]||(this[Te]=globalThis.document.createComment("placeholder"))}set[dr](t){let e=this[Te];this[Te]=t,e&&e!=t&&e.parentNode&&e[Tt](t)}[fh](){let t=this[gt],e=t&&t.parentNode;return t&&e&&t!=this&&(this[gt]=null,this[rt](e,t),t[zt](e)),this}[dh](){this[vn]!=!0&&(this[vn]=!0,!0)&&(this[Tt]=this[dn],this[zt]=this[fn],this[rt]=this[cn],this[pr]||(this[pr]=this[Rt]));let t=this[dr];return this.parentNode&&t!=this&&(t[rt](this.parentNode,this),this[zt](this.parentNode)),this[gt]=t,this}[ph](t,e,r){let s=typeof t;if(s==="undefined"||t===null){if(r&&r instanceof ue)return r;let n=globalThis.document.createComment("");return r?r[Tt](n,this):n[rt](this,null)}if(t===r)return t;if(s!=="object"){let n,i=t;return e&128&&e&256,r?r instanceof tr?(r.textContent=i,r):(n=globalThis.document.createTextNode(i),r[Tt](n,this),n):(this.appendChild(n=globalThis.document.createTextNode(i)),n)}else{if(globalThis.DEBUG_IMBA&&!t[rt])throw console.warn("Tried to insert",t,"into",this),new TypeError("Only DOM Nodes can be inserted into DOM");return r?r[Tt](t,this):t[rt](this,null)}}};Dt(G.prototype,wh.prototype);var Th=class{log(...t){return console.log(...t)}emit(t,e,r={bubbles:!0,cancelable:!0}){e!=null&&(r.detail=e);let s=new A(t,r),n=this.dispatchEvent(s);return s}text$(t){return this.textContent=t,this}[mh](){return this}[gh](){return this}[yh](){this.render&&this.render(),this[Ee]&&(this[Ee]=null)}get[vh](){return this[Ee]||(this[Ee]={})}get flags(){return this.$flags||(this.$flags=new rn(this),this.flag$==N.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=ae(this,t,N);!r||!r.set?this.setAttribute(t,e):this[t]=e}get richValue(){return this.value}set richValue(t){this.value=t}};Dt(N.prototype,Th.prototype),N.prototype.setns$=N.prototype.setAttributeNS,N.prototype[bn]=!0;function Wo(t,e,r,s){let n=globalThis.document.createElement(t);return r&&(n.className=r),s!==null&&n.text$(s),e&&e[Vt]&&e[Vt](n),n}var Eh=class{set$(t,e){var r;let s=Tn[r=this.nodeName]||(Tn[r]={}),n=En(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||""))}};Dt(rr.prototype,Eh.prototype);var Nh=class{set src(t){if(this[Sn]!=t&&(this[Sn]=t,!0)){if(t&&t.adoptNode)t.adoptNode(this);else if(t&&t.type=="svg"){if(t.attributes)for(let e=t.attributes,r=0,s=Object.keys(e),n=s.length,i,o;r-1||Nn.indexOf("CriOS")>=0||Nn.indexOf("FxiOS")>=0,Oe=!kh,On=new Map,$h=class extends er{connectedCallback(){return Oe?this.parentNode.removeChild(this):this.parentNode.connectedCallback()}disconnectedCallback(){if(!Oe)return this.parentNode.disconnectedCallback()}};window.customElements.define("i-hook",$h);function Ph(t,e){let r=On.get(e);if(!r){r={};let s=e.prototype,n=[s];for(;(s=s&&Object.getPrototypeOf(s))&&s.constructor!=t.constructor;)n.unshift(s);for(let i=0,o=hh(n),l=o.length;i=0&&this.childNodes.splice(r,0,t),t}[Cn](t){this.parentNode&&this.parentNode[Cn](t);let e=this.childNodes.indexOf(t);e>=0&&this.childNodes.splice(e,1)}[In](t,e){this.parentNode&&this.parentNode[In](t,e);let r=this.childNodes.indexOf(e);return this.childNodes[r]=t,t}[st](t,e){let r=this.parentNode;if(this.parentNode!=t&&(this.parentNode=t,!0)){this[K]&&(e=this[K][st](t,e));for(let s=0,n=yr(this.childNodes),i=n.length;s=0&&this.childNodes.splice(r,0,t)}else this.childNodes.push(t);return t}[Pe](t){for(let e=0,r=yr(this.childNodes),s=r.length;et)for(;e>t;)r[Bh](s[--e]);else if(t>e)for(;t>e;)r[Hh](s[e++],n);this.length=t}[Ce](t,e){this.parentNode=t,this[ht]&&this[ht][Ce](t,e),e=this[ht];for(let r=0,s=Vh(this.childNodes),n=s.length;r0;)this.childNodes[--e][_r](t);this[ht]&&t.removeChild(this[ht]),this.parentNode=null}};Hn[Un]();function sl(t,e){return new Hn(t,e)}function Gn(t){let e;return t?(e=t.toIterable)?e.call(t):t:[]}var xr=Symbol.for("#appendChild"),Ie=Symbol.for("#insertChild"),Gh=Symbol.for("#replaceWith"),je=Symbol.for("#insertInto"),wr=Symbol.for("#removeFrom"),Yh=Symbol.for("#afterVisit"),Yn=Symbol.for("#__initor__"),Wn=Symbol.for("#__inited__"),Xn=Symbol.for("#__init__"),Me=Symbol.for("#domFlags"),Jn=Symbol.for("##parent"),at=Symbol.for("#end"),Qn=Symbol.for("#removeChild"),Zn=Symbol(),ti=class extends Ft{static[Xn](){return this.prototype[Yn]=Zn,this}constructor(t,e){super(...arguments),this[Me]=t,this[Jn]=e,this.changes=new Map,this.dirty=!1,this.array=this.childNodes,this.$=new mt(this,Symbol()),t&256||(this[at]=_t("map")),e&&e[xr](this),this[Yn]===Zn&&this[Wn]&&this[Wn]()}[xr](t){if(this.parentNode)return this.parentNode[Ie](t,this[at])}hasChildNodes(){return this.childNodes.length!=0}push(t,e){if(!(this[Me]&1)){this.array.push(t),this[xr](t);return}let r=this.array[e];if(r!==t){this.dirty=!0;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[Ie](t,n.nextSibling)}else s[Ie](t,this.childNodes[e+1]||this[at])}moveChild(t,e,r){return this.insertChild(t,e,r)}removeChild(t,e){t.parentNode&&t[wr](t.parentNode)}[Ie](t,e){}[Gh](t,e){let r=t[je](e,this[at]);return this[wr](e),r}[je](t,e){this[Jn]=t;let r=this.parentNode;if(t!=r){this.parentNode=t;for(let s=0,n=Gn(this.array),i=n.length;st)for(;e.array.length>t;){let r=e.array.pop();e.removeChild(r)}}};ti[Xn]();function nl(t,e){return new ti(t,e)}var Nt=Symbol.for("#__init__"),ei=Symbol.for("#__initor__"),ri=Symbol.for("#__inited__"),Wh=Symbol.for("##inited"),Xh=Symbol.for("#afterVisit"),Jh=Symbol.for("#beforeReconcile"),Qh=Symbol.for("#afterReconcile"),si=Symbol.for("#__hooks__"),Ot=Symbol.for("#autorender"),Fe=Symbol.for("##visitContext"),ni=Symbol(),ii=new class{constructor(t=null){this[Nt](t)}[Nt](t=null){var e;this.items=t&&(e=t.items)!==void 0?e:[],this.current=t&&(e=t.current)!==void 0?e:null,this.lastQueued=t&&(e=t.lastQueued)!==void 0?e:null,this.tests=t&&(e=t.tests)!==void 0?e:0}flush(){let t=null;for(;t=this.items.shift();){if(!t.parentNode||t.hydrated\u03A6)continue;let e=this.current;this.current=t,t.__F|=1024,t.connectedCallback(),this.current=e}}queue(t){var e=this;let r=this.items.length,s=0,n=this.lastQueued;this.lastQueued=t;let i=G.DOCUMENT_POSITION_PRECEDING,o=G.DOCUMENT_POSITION_FOLLOWING;if(r){let l=this.items.indexOf(n),a=l,p=function(y,b){return e.tests++,y.compareDocumentPosition(b)};(l==-1||n.nodeName!=t.nodeName)&&(a=l=0);let u=e.items[a];for(;u&&p(u,t)&o;)u=e.items[++a];if(a!=l)u?e.items.splice(a,0,t):e.items.push(t);else{for(;u&&p(u,t)&i;)u=e.items[--a];a!=l&&(u?e.items.splice(a+1,0,t):e.items.unshift(t))}}else e.items.push(t),e.current||globalThis.queueMicrotask(e.flush.bind(e))}};function il(){return ii.flush()}var me=class extends er{static[Nt](){return this.prototype[ei]=ni,this}constructor(){super(),this.flags$ns&&(this.flag$=this.flagExt$),this.setup$(),this.build(),this[ei]===ni&&this[ri]&&this[ri]()}setup$(){return this.__slots={},this.__F=0}[Nt](){return this.__F|=3,this}[Wh](){if(this[si])return this[si].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=!0,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)&-257&-8193):(this.__F|=8192,this)}get autoschedule(){return(this.__F&64)!=0}set autoschedule(t){t?this.__F|=64:this.__F&=-65}set autorender(t){let e=this[Ot]||(this[Ot]={});e.value=t,this.mounted\u03A6&&F.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 F.on("commit",this),this.__F|=128,this}unschedule(){return F.un("commit",this),this.__F&=-129,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&=-4097,this.commit()),this}[Xh](){if(this.visit(),this[Fe])return this[Fe]=null}[Jh](){return this.__F&1024&&(this.__F=this.__F&-1025,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&&Mt.push(this),this[Fe]&&(this[Fe]=null),this}[Qh](){return globalThis.DEBUG_IMBA&&Mt.pop(this),this}connectedCallback(){let t=this.__F,e=t&1,r=t&8;if(!e&&!(t&1024)){ii.queue(this);return}if(t&48)return;this.__F|=16,e||this[Nt](),t&2||(this.flags$ext=this.className,this.__F|=2,this.hydrate(),this.commit()),r||(this.awaken(),this.__F|=8),tt(this,"mount");let s=this.mount();return s&&s.then instanceof Function&&s.then(F.commit),t=this.__F=(this.__F|32)&-17,t&64&&this.schedule(),this[Ot]&&F.schedule(this,this[Ot]),this}disconnectedCallback(){if(this.__F=this.__F&-49,this.__F&128&&this.unschedule(),tt(this,"unmount"),this.unmount(),this[Ot])return F.unschedule(this,this[Ot])}};me[Nt]();var ol=me;function Zh(t,e){let r=Object.getOwnPropertyDescriptors(e);return delete r.constructor,Object.defineProperties(t,r),t}var oi=Symbol.for("#__init__"),ta={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},li={prefix:1,suffix:1,content:1},Tr={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]]},ea=new RegExp("^("+Object.keys(Tr).join("|")+")(\\d+(?:\\.\\d+)?)$"),ra=/^([xyz])$/,sa=/^([tlbr]|size|[whtlbr]|[mps][tlbrxy]?|[rcxy]?[gs])$/,na=`*,::before,::after { box-sizing: border-box; border-width: 0; border-style: solid; border-color: currentColor; }`,ia=class{constructor(t=null){this[oi](t)}[oi](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",na),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;li[r]&&(t=String(t));let i=typeof t;if(i=="number"){if(e||(ra.test(r)?e="px":sa.test(r)?e="u":r=="rotate"&&(e="turn",t=(t%1).toFixed(4))),e)return ta[e]?t+e:e=="u"?t*4+"px":"calc(var(--u_"+e+",1px) * "+t+")"}else if(i=="string"){if(r&&li[r]&&t[0]!='"'&&t[0]!="'"&&(t.indexOf('"')>=0?t.indexOf("'")==-1&&(t="'"+t+"'"):t='"'+t+'"'),n=t.match(ea)){let o=Tr[n[1]][parseInt(n[2])],l="100%";if(typeof s=="number"?l=s+"%":typeof s=="string"&&(l=s),o)return"hsla("+o[0]+","+o[1]+"%,"+o[2]+"%,"+l+")"}}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]}},As=new ia,ll=Object.keys(Tr);function hl(){return!0}var oa=class{css$(t,e,r){return this.style[t]=e}css$var(t,e,r,s,n=null){let i=As.toValue(e,r,s,n);this.style.setProperty(t,i)}};Zh(N.prototype,oa.prototype);var la=Symbol.for("#insertInto"),hi=Symbol.for("#removeFrom");function al(t,e={}){let r=C.context;C.context=e;let s=t(e);return C.context==e&&(C.context=r),s}function Ds(t,e){let r=e||globalThis.document.body,s=t;if(t instanceof Function){let n=new mt(r,null),i=function(){let o=C.context;C.context=n;let l=t(n);return C.context==n&&(C.context=o),l};s=i(),F.listen("commit",i)}else s.__F|=64;return s[la](r),s}function Rs(t){return t&&t[hi]&&t[hi](t.parentNode),t}var ai=globalThis.imba||(globalThis.imba={});ai.mount=Ds,ai.unmount=Rs;function kt(t,e){let r=Object.getOwnPropertyDescriptors(e);return delete r.constructor,Object.defineProperties(t,r),t}function qt(t){let e;return t?(e=t.toIterable)?e.call(t):t:[]}var Kt=Symbol.for("##onchange"),Ut=Symbol.for("#afterVisit"),Bt=Symbol.for("##oninput"),Ae=Symbol.for("##onclick"),Ht=Symbol.for("##bound"),ut=Symbol.for("##visitContext");function ul(){return!0}var ha={INPUT:!0,SELECT:!0,TEXTAREA:!0,BUTTON:!0},Er=function(t){return t instanceof Array||t&&t.has instanceof Function},Nr=function(t,e){return t==e?!0:t instanceof Array?t.indexOf(e)>=0:t&&t.has instanceof Function?t.has(e):t&&t.contains instanceof Function?t.contains(e):!1},Or=function(t,e){if(t instanceof Array)return t.push(e);if(t&&t.add instanceof Function)return t.add(e)},kr=function(t,e){if(t instanceof Array){let r=t.indexOf(e);if(r>=0)return t.splice(r,1)}else if(t&&t.delete instanceof Function)return t.delete(e)};function aa(t){function e(){return t[0]?t[0][t[1]]:void 0}function r(s){return t[0]?t[0][t[1]]=s:null}return{get:e,set:r}}var ua=class{getRichValue(){return this.value}setRichValue(t){return this.value=t}bind$(t,e){let r=e||[];return t=="data"&&!this[Ht]&&ha[this.nodeName]&&(this[Ht]=!0,this[Kt]&&this.addEventListener("change",this[Kt]=this[Kt].bind(this)),this[Bt]&&this.addEventListener("input",this[Bt]=this[Bt].bind(this),{capture:!0}),this[Ae]&&this.addEventListener("click",this[Ae]=this[Ae].bind(this),{capture:!0})),Object.defineProperty(this,t,r instanceof Array?aa(r):r),r}};kt(N.prototype,ua.prototype),Object.defineProperty(N.prototype,"richValue",{get:function(){return this.getRichValue()},set:function(t){return this.setRichValue(t)}});var ca=class{[Kt](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,i=qt(r),o=i.length;n0&&(u=u.split("~")[0]);let b=null,_=[t,i],c,m=null,S,g=!1,x=typeof u=="string";if(u[0]=="$"&&u[1]=="_"&&y[0]instanceof Function)u=y[0],u.passive||(i.commit=!0),_=[t,i].concat(y.slice(1)),m=e;else if(y instanceof Array){_=y.slice(),b=_;for(let E=0,h=_i(_),f=h.length;E2)}};function Fr(t,e){let r=e;return t instanceof Element?t:typeof t=="string"?t=="this"||t==""?r:t=="up"?r.parentNode:t=="op"?r.offsetParent:r.closest(t)||r.querySelector(t)||globalThis.document.querySelector(t):null}function $t(t){if(typeof t=="string"){let[e,r,s]=t.match(/^([-+]?[\d\.]+)(%|\w+)$/);return[parseFloat(r),s]}else if(typeof t=="number")return[t]}function Ar(t,e=1){let r=1/e;return Math.round(t*r)/r}function qa(t,e,r){return e>r?Math.max(r,Math.min(e,t)):Math.min(r,Math.max(e,t))}function Oi(t,e,r,s,n=.1){let[i,o]=$t(r),[l,a]=$t(s),[p,u]=$t(n);return o=="%"&&(i=(e-t)*(i/100)),a=="%"&&(l=(e-t)*(l/100)),u=="%"&&(p=(l-i)*(p/100)),function(y,b){let _=(y-t)/(e-t),c=i+(l-i)*_;return n&&(c=Ar(c,p)),b&&(c=qa(c,i,l)),c}}function Ka(t,e){let r=Object.getOwnPropertyDescriptors(e);return delete r.constructor,Object.defineProperties(t,r),t}ir();function ml(){return!0}var Ua=class{\u03B1primary(){return!!this.isPrimary}\u03B1mouse(){return this.pointerType=="mouse"}\u03B1pen(){return this.pointerType=="pen"}\u03B1touch(){return this.pointerType=="touch"}\u03B1pressure(t=.5){return this.pressure>=t}\u03B1lock(){return!0}};Ka(Os.prototype,Ua.prototype);function Ba(t,e){let r=Object.getOwnPropertyDescriptors(e);return delete r.constructor,Object.defineProperties(t,r),t}var ki=Symbol.for("#capture"),W=Symbol.for("#step"),Ha=Symbol.for("#cancel"),Dr=Symbol.for("#reframe"),$i=Symbol.for("#mods"),Rr=Symbol.for("#dx"),Vr=Symbol.for("#dy"),ft=Symbol.for("#context"),qe=Symbol.for("#locked"),Pi=Symbol.for("#teardown"),Li=Symbol.for("#x"),Ci=Symbol.for("#y"),Ga=Symbol.for("#pinTarget");function gl(){return!0}var Ii=null,Ya=class{constructor(t,e,r){this.phase="init",this.events=[],this.originalEvent=t,this.handler=e,this.target=this.currentTarget=r,this[$i]={}}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[Rr]==null?this.event.x-this.start.x:this[Rr]}get dy(){return this[Vr]==null?this.event.y-this.start.y:this[Vr]}stopImmediatePropagation(){return this.cancelBubble=!0,this.event.stopImmediatePropagation(),this}stopPropagation(){return this.cancelBubble=!0,this.event.stopPropagation(),this}preventDefault(){return this.defaultPrevented=!0,this.event.preventDefault()}emit(t,...e){return tt(this,t,e)}on(t,...e){return Z(this,t,...e)}once(t,...e){return q(this,t,...e)}un(t,...e){return jt(this,t,...e)}\u03B1flag(t,e){let{element:r}=this[ft],s=Date.now(),n=e instanceof N?e:e?r.closest(e):r;return this[W].setup!=!0&&(this[W].setup=!0,!0)&&(n.flags.incr(t),q(this,"end",function(){return n.flags.decr(t)})),!0}\u03B1lock(){return this[ki](),!0}[ki](){if(this[qe]!=!0&&(this[qe]=!0,!0))return this[ft].element.setPointerCapture(this.pointerId)}get[W](){var t,e;return(t=this[$i])[e=this[ft].step]||(t[e]={})}[Ha](){return this[Pi]()}\u03B1moved(t,e){let r=this[W],{element:s,state:n,event:i}=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=!0;let[y,b]=$t(u);r.threshold=y,r.sy=y,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!0;if(r.cancelled)return!1;let o=r.threshold,l=this.x-r.x0,a=this.y-r.y0;r.x=Math.max(r.x,Math.abs(l)),r.y=Math.max(r.y,Math.abs(a)),r.left=Math.max(r.left,-l),r.right=Math.max(r.right,l),r.up=Math.max(r.up,-a),r.down=Math.max(r.down,a),r.dist=Math.max(r.dist,Math.sqrt(l*l+a*a));let p=r[r.dir];if(p>o&&p>=r.x&&p>=r.y){r.active=!0;let u=n.pinTarget;return s.flags.incr("@move"),u&&u.flags.incr("@move"),this.preventDefault(),q(this,"end",function(){return u&&u.flags.decr("@move"),s.flags.decr("@move")}),!0}else if(r.x>o||r.y>o)return r.cancelled=!0,!1;return!1}\u03B1hold(t=250){var e=this;let r=this[W],s=this[ft].element;if(r.cancelled)return!1;if(r.setup&&!r.active){let n=this.clientX,i=this.clientY,o=n-r.x,l=i-r.y;Math.sqrt(o*o+l*l)>5&&!r.cancelled&&(clearTimeout(r.timeout),r.cancelled=!0)}if(r.setup!=!0&&(r.setup=!0,!0)){r.active=!1,r.x=this.clientX,r.y=this.clientY;let n;return r.timeout=setTimeout(function(){return r.active=!0,e.preventDefault(),s.flags.incr("@hold"),n&&n(!0),n=null},t),q(e,"end",function(){return r.active&&s.flags.decr("@hold"),clearTimeout(r.timeout),n&&n(!1),n=null}),new Promise(function(i){return n=i})}return r.active}\u03B1sync(t,e="x",r="y"){let s=this[W];return s.setup!=!0&&(s.setup=!0,!0)?(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=!0,!0}\u03B1apply(t,e="x",r="y"){return e&&(t[e]=this.x),r&&(t[r]=this.y),this[ft].commit=!0,!0}\u03B1css(t="x",e="y"){let r=this[W];if(r.setup!=!0&&(r.setup=!0,!0))r.el=this[ft].element,r.x=r.el[Li]||0,r.y=r.el[Ci]||0,r.tx=this.x,r.ty=this.y;else{let s=r.el[Li]=r.x+(this.x-r.tx),n=r.el[Ci]=r.y+(this.y-r.ty);t&&r.el.style.setProperty("--x",s+"px"),e&&r.el.style.setProperty("--y",n+"px")}return!0}\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=.5){return this.pressure>=t}\u03B1log(...t){return console.info(...t),!0}\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=Ar(this.x,t),this.y=Ar(this.y,e),!0}[Dr](...t){let e=this[W];if(e.setup!=!0&&(e.setup=!0,!0)){let r=this.target,s=t.length,n=t[0],i=0,o="100%",l=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?l=t[1]:s>2&&([i,o,l=0]=t.slice(1));let p=n.getBoundingClientRect();i instanceof Array||(i=[i,i]),o instanceof Array||(o=[o,o]),l instanceof Array||(l=[l,l]),e.rect=p,e.x=Oi(p.left,p.right,i[0],o[0],l[0]),e.y=Oi(p.top,p.bottom,i[1],o[1],l[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[Rr]=r-this.x0,this[Vr]=s-this.y0}return!0}\u03B1fit(...t){return this[W].clamp=!0,this[Dr](...t)}\u03B1reframe(...t){return this[Dr](...t)}\u03B1pin(...t){let e=this[W];if(e.setup!=!0&&(e.setup=!0,!0)){let r=Fr(t[0],this.target);r instanceof N||t.unshift(r=this.target);let s=t[1]||0,n=t[2]==null?t[2]=s:t[2],i=r.getBoundingClientRect();e.x=this.clientX-(i.left+i.width*s),e.y=this.clientY-(i.top+i.height*n),r&&(this[Ga]=r,r.flags.incr("_touch_"),q(this,"end",function(){return r.flags.decr("_touch_")}))}return this.x-=e.x,this.y-=e.y,!0}},Wa=class{on$touch(t,e,r,s){return r.type="touch",this.addEventListener("pointerdown",r,{passive:!1}),Mr.ios\u03A6&&globalThis.parent!=globalThis&&Ii!=!0&&(Ii=!0,!0)&&globalThis.parent.postMessage("setupTouchFix"),r}};if(Ba(N.prototype,Wa.prototype),globalThis.parent==globalThis&&Mr.ios\u03A6){let t=function(e){if(e.data=="setupTouchFix")return globalThis.addEventListener("touchmove",function(){return!1},{passive:!1}),globalThis.removeEventListener("message",t)};globalThis.addEventListener("message",t)}et.touch$handle=function(){let t=this.event,e=this.element,r=this.state.pointerId,s=this.modifiers,n=this.handler,i=Mr.ios\u03A6;if(this.current=this.state,r!=null)return r==t.pointerId;if(s.ctrl&&!t.ctrlKey||s.alt&&!t.altKey||s.meta&&!t.metaKey||s.shift&&!t.shiftKey||s.if&&!s.if[0]||s.self&&t.target!=e||s.primary&&!t.isPrimary||s.pen&&t.pointerType!="pen"||s.mouse&&t.pointerType!="mouse"||s.touch&&t.pointerType!="touch"||s.sel&&!t.target.matches(String(s.sel[0])))return;let o=this.state=n.state=this.current=new Ya(t,n,e);r=o.pointerId;let l=function(c){return c.preventDefault(),!1},a=null,p=Symbol(),u=function(c){let m=o.clientX,S=o.clientY,g=c.clientX,x=c.clientY;(o[qe]||o.defaultPrevented)&&(c.pointerId==o.pointerId||m==g&&S==x)&&(c.preventDefault(),c.stopPropagation()),u&&(globalThis.removeEventListener("click",u,{capture:!0}),u=null)},y=function(c){if(!(o.type=="touchmove"&&c.changedTouches[0].identifier!=r)&&(o.defaultPrevented||o[qe]))return c.preventDefault()},b=function(c){let m=c.type,S=o.phase;if(c.pointerId&&o.pointerId!=c.pointerId||c[p])return;c[p]=!0;let g=m=="pointerup"||m=="pointercancel";if(c.pressure==0&&c.pointerType=="mouse"&&m=="pointermove"&&o.originalEvent.pressure>0)return a(c);m=="pointercancel"?(o.x=o.clientX,o.y=o.clientY):(o.x=c.clientX,o.y=c.clientY),o.event=c,g&&(o.phase="ended");try{n.handleEvent(o)}catch{}if(S=="init"&&!g&&(o.phase="active"),g&&a)return a(c)},_=!1;return a=function(c){if(!_&&(_=!0,e.flags.decr("_touch_"),o.phase!="ended"&&(o.phase="ended",o.x=o.clientX,o.y=o.clientY,n.handleEvent(o)),o.emit("end"),s.passive||--n.prevents==0&&e.style.removeProperty("touch-action"),n.state={},globalThis.removeEventListener("pointermove",b,{passive:!!s.passive}),globalThis.removeEventListener("pointerup",b),globalThis.removeEventListener("pointercancel",b),setTimeout(function(){if(u&&(globalThis.removeEventListener("click",u,{capture:!0}),u=null),i&&y)return globalThis.removeEventListener("touchend",y),globalThis.removeEventListener("touchmove",y,{passive:!1}),y=null},100),!s.passive))return globalThis.document.removeEventListener("selectstart",l,{capture:!0})},o[Pi]=a,s.passive||(n.prevents||(n.prevents=0),n.prevents++,e.style.setProperty("touch-action","none"),e.offsetWidth),e.flags.incr("_touch_"),globalThis.addEventListener("pointermove",b,{passive:!!s.passive}),globalThis.addEventListener("pointerup",b),globalThis.addEventListener("pointercancel",b),globalThis.addEventListener("click",u,{capture:!0}),i&&!s.passive&&(globalThis.addEventListener("touchend",y),globalThis.addEventListener("touchmove",y,{passive:!1})),s.passive||globalThis.document.addEventListener("selectstart",l,{capture:!0}),b(t),!1};function ji(t){let e;return t?(e=t.toIterable)?e.call(t):t:[]}function Xa(t,e){let r=Object.getOwnPropertyDescriptors(e);return delete r.constructor,Object.defineProperties(t,r),t}var Ja=Symbol.for("#context"),Qa=Symbol.for("#extendType");function yl(){return!0}var Mi=new(globalThis.WeakMap||Map),ye={threshold:[0]},Za={};et.intersect$handle=function(){let t=this.event.detail.observer;return this.modifiers._observer==t};var tu=class extends A{\u03B1in(){return this.delta>=0&&this.entry.isIntersecting}\u03B1out(){return this.delta<0}\u03B1css(t="ratio"){return this.target.style.setProperty("--ratio",this.ratio),!0}\u03B1flag(t,e){let{state:r,step:s}=this[Ja],n=Fr(e||"",this.target);return this.isIntersecting&&!r[s]?(n.flags.incr(t),r[s]=!0):r[s]&&!this.isIntersecting&&(n.flags.decr(t),r[s]=!1),!0}};function eu(t,e){return function(r,s){let n=s.prevRatios||(s.prevRatios=new WeakMap);for(let i=0,o=ji(r),l=o.length;i1)for(i[0]=0;i.length"+i.map(function(o){return""+o+""}).join("")+""}).join(" "))}var dt={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"},zi={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},qi={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},Ki={option:"alt",command:"meta",return:"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},Yt;for(J=1;J<20;++J)dt[111+J]="f"+J;var J;for(J=0;J<=9;++J)dt[J+96]=J.toString();function Br(t,e,r){if(t.addEventListener){t.addEventListener(e,r,!1);return}t.attachEvent("on"+e,r)}function Hr(t,e,r){if(t.removeEventListener){t.removeEventListener(e,r,!1);return}t.detachEvent("on"+e,r)}function Ui(t){if(t.type=="keypress"){var e=String.fromCharCode(t.which);return t.shiftKey||(e=e.toLowerCase()),e}return dt[t.which]?dt[t.which]:zi[t.which]?zi[t.which]:String.fromCharCode(t.which).toLowerCase()}function pu(t,e){return t.sort().join(",")===e.sort().join(",")}function mu(t){var e=[];return t.shiftKey&&e.push("shift"),t.altKey&&e.push("alt"),t.ctrlKey&&e.push("ctrl"),t.metaKey&&e.push("meta"),e}function gu(t){if(t.preventDefault){t.preventDefault();return}t.returnValue=!1}function yu(t){if(t.stopPropagation){t.stopPropagation();return}t.cancelBubble=!0}function Gr(t){return t=="shift"||t=="ctrl"||t=="alt"||t=="meta"}function vu(){if(!Yt){Yt={};for(var t in dt)t>95&&t<112||dt.hasOwnProperty(t)&&(Yt[dt[t]]=t)}return Yt}function bu(t,e,r){return r||(r=vu()[t]?"keydown":"keypress"),r=="keypress"&&e.length&&(r="keydown"),r}function Su(t){return t==="+"?["+"]:(t=t.replace(/\+{2}/g,"+plus"),t.split("+"))}function Bi(t,e){var r,s,n,i=[];for(r=Su(t),n=0;n1){b(c,E,m,S);return}h=Bi(c,S),e._callbacks[h.key]=e._callbacks[h.key]||[],a(h.key,h.modifiers,{type:h.action},g,c,x),e._callbacks[h.key][g?"unshift":"push"]({callback:m,modifiers:h.modifiers,action:h.action,seq:g,level:x,combo:c})}e._bindMultiple=function(c,m,S){for(var g=0;g-1||Hi(e,r.target)?!1:e.tagName=="INPUT"||e.tagName=="SELECT"||e.tagName=="TEXTAREA"||e.isContentEditable},j.prototype.handleKey=function(){var t=this;return t._handleKey.apply(t,arguments)},j.addKeycodes=function(t){for(var e in t)t.hasOwnProperty(e)&&(dt[e]=t[e]);Yt=null},j.init=function(){var t=j(document);for(var e in t)e.charAt(0)!=="_"&&(j[e]=function(r){return function(){return t[r].apply(t,arguments)}}(e))};function Wt(t){let e;return t?(e=t.toIterable)?e.call(t):t:[]}function _u(t,e){let r=Object.getOwnPropertyDescriptors(e);return delete r.constructor,Object.defineProperties(t,r),t}var Yr=Symbol.for("#updateHotKeys"),xu=Symbol.for("#inInput"),Wr=Symbol.for("#inEditable"),wu=Symbol.for("#hotkeyTarget"),Gi=Symbol.for("#hotkeyCombos"),Tu=Symbol.for("#extendType"),Xt=Symbol.for("#combos"),Xr=Symbol.for("#target"),Jt=Symbol.for("#hotkeyHandlers"),Eu=Symbol.for("#defaultPrevented"),Nu=Symbol.for("#visit"),Yi=Symbol.for("#key"),Ou;try{Ou=(globalThis.navigator.platform||"").match(/iPhone|iPod|iPad|Mac/)}catch{}function Sl(){return!0}var Jr={esc:!0},ku=class extends A{\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(),!0}\u03B1local(){return!0}\u03B1repeat(){return!0}},$u=function(t,e,r){return e.tagName=="INPUT"&&(r=="down"||r=="up")?!1:e.tagName=="INPUT"||e.tagName=="SELECT"||e.tagName=="TEXTAREA"?Jr[r]?(t[xu]=!0,t[Wr]=!0,!1):!0:e.contentEditable&&(e.contentEditable=="true"||e.contentEditable=="plaintext-only")?Jr[r]?(t[Wr]=!0,!1):!0:!1},qs=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 j.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=j(globalThis.document),this.mousetrap.stopCallback=$u),this.combos[t]||(this.combos[t]=!0,this.mousetrap.bind(t,this.handler)),(e.capture||e.force)&&(Jr[t]=!0),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 fu(t,e)}htmlify(t,e="auto"){return du(t,e)}matchCombo(t){return!0}handle(t,e){var r;let s=t.target&&t.target[wu]||t.target||globalThis.document.body,n=Array.from(globalThis.document.querySelectorAll("[data-hotkey]")),i=s.ownerDocument,o=s;for(;o&&o!=i&&o.hotkeys!==!0;)o=o.parentNode;if(n=n.reverse().filter(function(u){let y=u[Gi];if(!(y&&(y[e]||y["*"])))return!1;let b=u;for(;b&&b!=i;){if(b.hotkeys===!1)return!1;b=b.parentNode}return!0}),!n.length)return;let l={combo:e,originalEvent:t,targets:n},a=new A("hotkey",{bubbles:!0,detail:l});a[Tu](ku),a.originalEvent=t,a.hotkey=e,s.dispatchEvent(a);let p=[];for(let u=0,y=Wt(n),b=y.length;u=this.length))return(e=this[Zt])[t]||(e[t]=ts.from(this,this.cache[t]))}buildState(t,e,r=!0){let s={data:t,index:this.index+1,path:e||this.router.path,type:r?"push":"replace"};return new ts(this,s,!0)}pushState(t,e,r,s=!0){return t instanceof ts||(t=this.buildState(t,r,s)),this.index=t.index,this.cache[this.index]=t,this[Zt][this.index]=t,this[Zt].length=this.cache.length=Math.max(t.index+1,0),globalThis.history[s?"pushState":"replaceState"](String(t),e||null,t.path),this}replaceState(t,e,r){return this.pushState(t,e,r,!1)}},Zi=class{constructor(t,e,r,s){this.params=s,this.router=t,e&&(this.location=vt.parse(e),this.original=this.location.clone()),this.referrer=r}get apply(){return this.params.apply||[]}get revert(){return this.params.revert||[]}get state(){return this.params.state}get mode(){return this.params.mode}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=!1){return this.aborted=!0,t&&(this.forceAbort=t),this}match(t){return this.location?this.router.route(t).match(this.path):null}};function to(t){let e;return t?(e=t.toIterable)?e.call(t):t:[]}var Ue=Symbol.for("#routes"),es=Symbol.for("#match"),Iu=Symbol.for("#symbol"),eo=Symbol.for("#matches"),rs=new Map,ss={},ro={},ju=/.*/;function Mu(t){if(!rs.has(t)){let e=new Map;return rs.set(t,e),e}return rs.get(t)}function Fu(t,e){let r=Mu(t);if(!r.has(e)){let s=Object.create(t);return Object.assign(s,e),r.set(e,s),s}return r.get(e)}var Au=class{};function Du(t){if(ss[t])return ss[t];let e=ss[t]={url:t},r=t.indexOf("?"),s=t.indexOf("#");if(s>=0&&(e.hash=t.slice(s+1),t=e.url=t.slice(0,s)),r>=0){let n=e.query=t.slice(r+1);t=t.slice(0,r),e.query=ro[n]||(ro[n]=new URLSearchParams(n))}return e.path=t,e}var Ru=class{constructor(t){this.router=t,this.fullPath="",this[Ue]={},this[es]=new Au,this[es].path=""}route(t){var e;return(e=this[Ue])[t]||(e[t]=new so(this.router,t,this))}match(){return this[es]}resolve(t){return"/"}},so=class{constructor(t,e,r){this.parent=r||t.rootRoute,this.router=t,this.status=200,this.path=e,this[Iu]=Symbol(),this[eo]={},this[Ue]={}}route(t){var e;return(e=this[Ue])[t]||(e[t]=new so(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=!1,t.indexOf("?")>=0){let s=t.split("?");t=s.shift(),this.query={};for(let n=0,i=to(s.join("?").split("&")),o=i.length;ne&&(s.apply=this.history.slice(e+1,r+1))}}catch{}return this.refresh(s),this}onbeforeunload(t){let e=new Zi(this,null,this.location,{mode:"unload"});if(this.emit("beforechange",e),e.aborted)return!0}onhashchange(t){return this.emit("hashchange",this[ee]=this[Pt].location.hash),L()}setup(){this.onclick=this.onclick.bind(this),this.onhashchange=this.onhashchange.bind(this);let t=globalThis.window;return this[ee]=this[Pt].location.hash,this.location=vt.parse(this.realpath,this),t.onpopstate=this.onpopstate.bind(this),t.onbeforeunload=this.onbeforeunload.bind(this),t.addEventListener("hashchange",this.onhashchange),t.addEventListener("click",this.onclick,{capture:!0}),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:!0})}return!0}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),i=this.realpath.split("#")[0],o=n.split("#")[0];return i==o?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 r=0,s=Object.keys(t),n=s.length,i,o;rthis.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 ms(t){var e,r;let s=Object.getOwnPropertyDescriptors(t.prototype);return e=s.name,delete s.name,r=s.constructor,delete s.constructor,s}function tc(){if(To!=!0&&(To=!0,!0))return Ts.on("inited",function(t){let e=t[No];if(e){let r=t instanceof G,s=t[z]||(t[z]={});for(let n=0,i=Object.keys(e),o=i.length,l,a;n=0&&e.splice(r,1)}reportChanged(){return this.changed(0)}reportObserved(){return k.add(this)}};function Tl(t){return new gs(null,null,null,t)}var nc=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 P(this,super.at(...arguments))}map(){return P(this,super.map(...arguments))}flatMap(){return P(this,super.flatMap(...arguments))}flat(){return P(this,super.flat(...arguments))}filter(){return P(this,super.filter(...arguments))}find(){return P(this,super.find(...arguments))}slice(){return P(this,super.slice(...arguments))}sort(){return P(this,super.sort(...arguments))}get len(){return P(this,this.length)}set len(t){this.length=t,B(this)}toIterable(){return I&&k.add(this[z]),this}[Symbol.iterator](){return P(this,super[Symbol.iterator](...arguments))}},Po=ms(nc),ic=class{get len(){return this.length}set len(t){this.length=t}get[ie](){return Ct(this,null,Po)}[bt](t){return Ct(this,t,Po)}[oe](t){return ps(this,t)}};hs(Array.prototype,ic.prototype);var oc=class extends Set{has(){return P(this,super.has(...arguments))}keys(){return P(this,super.keys(...arguments))}values(){return P(this,super.values(...arguments))}entries(){return P(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))}},Lo=ms(oc),lc=class{get[ie](){return Ct(this,null,Lo)}[bt](t){return Ct(this,t,Lo)}[oe](t){return ps(this,t)}};hs(Set.prototype,lc.prototype);var hc=class extends Map{get(){return P(this,super.get(...arguments))}has(){return P(this,super.has(...arguments))}keys(){return P(this,super.keys(...arguments))}values(){return P(this,super.values(...arguments))}entries(){return P(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))}},Co=ms(hc),ac=class{get[ie](){return Ct(this,null,Co)}[bt](t){return Ct(this,t,Co)}[oe](t){return ps(this,t)}};hs(Map.prototype,ac.prototype);var uc=class{constructor(t,e={}){var r=this,s;this.name=t,this.options=e;let n=this.key=Xe(t),i=ds(t),o=r.descriptor={enumerable:(s=e.enumerable)!=null?s:!0,configurable:!1,get:function(){return I?ko(this,t,n,r,i):this[n]},set:function(a){return I||!!this[i]?$o(this,t,n,a,r,i):this[n]=a}},l=r.lazyDescriptor={enumerable:!1,configurable:!0,get:function(){return I?(Object.defineProperty(this,t,o),this[t]):this[n]},set:function(a){return this[n]=a,this[i]=null,Object.defineProperty(this,t,o)}}}},cc=class{constructor(t=null){this[wo](t)}[wo](t=null){var e;this[Ye]=t&&(e=t[Ye])!==void 0?e:new Map}for(t){let e=this[Ye].get(t);return e||this[Ye].set(t,e=[]),e}get(t){let e=this.for(t);return e[z]||e[ie],I&&P(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)}},fc=class{constructor(t,e){var r=this;this.name=t,this.key=e,this.index=new cc;let s=ds(t),n=r.descriptor={enumerable:!0,configurable:!1,get:function(){return I?ko(this,t,e,r,s):this[e]},set:function(o){let l=this[e];if(I||!!this[s]?$o(this,t,e,o,r,s):this[e]=o,l!=o&&(l&&r.index.delete(l,this),o))return r.index.add(o,this)}},i=r.lazyDescriptor={set:function(o){return this[e]=o,o&&r.index.add(o,this),Object.defineProperty(this,t,n),this[s]=null}}}where(t){return this.index.get(t)}},Je=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|=$.STALE|$.POSSIBLY_STALE,this.observer&&this.observer.invalidated(t,this),!!this.observers){for(let r=0,s=H(this.observers),n=s.length;r