var or=Object.defineProperty;var Lh=Object.getOwnPropertyDescriptor;var Ch=Object.getOwnPropertyNames;var jh=Object.prototype.hasOwnProperty;var Ih=(t,e)=>{for(var r in e)or(t,r,{get:e[r],enumerable:!0})},Mh=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Ch(e))!jh.call(t,i)&&i!==r&&or(t,i,{get:()=>e[i],enumerable:!(s=Lh(e,i))||s.enumerable});return t};var Fh=t=>Mh(or({},"__esModule",{value:!0}),t);var nc={};Ih(nc,{CUSTOM_TYPES:()=>Ls,Comment:()=>le,Component:()=>de,CustomEvent:()=>q,Document:()=>ae,DocumentFragment:()=>Ao,Easer:()=>rr,Element:()=>O,ElementRoute:()=>nr,ElementRouteTo:()=>zs,Emitter:()=>Qe,Event:()=>et,EventHandler:()=>As,Fragment:()=>Mt,HTMLButtonElement:()=>$s,HTMLElement:()=>Ze,HTMLHtmlElement:()=>Fo,HTMLInputElement:()=>Ns,HTMLOptionElement:()=>Ps,HTMLScriptElement:()=>Do,HTMLSelectElement:()=>Os,HTMLTextAreaElement:()=>ks,ImbaElement:()=>th,IntersectionEventDefaults:()=>me,KeyboardEvent:()=>Es,LazyProxy:()=>ps,MouseEvent:()=>ws,Node:()=>H,PointerEvent:()=>Ts,RenderContext:()=>pt,Router:()=>ir,SVGElement:()=>tr,Scheduler:()=>gs,ShadowRoot:()=>Ro,TYPES:()=>ue,Text:()=>Je,UIEvent:()=>Mo,Window:()=>Vo,accessor:()=>$h,autorun:()=>bh,clearInterval:()=>bs,clearTimeout:()=>Ss,colors:()=>eh,commit:()=>C,createAtom:()=>vh,createComment:()=>St,createComponent:()=>Cs,createDynamic:()=>Ho,createElement:()=>Ko,createFragment:()=>Uo,createIndexedList:()=>Qo,createKeyedList:()=>Jo,createLiveFragment:()=>Xo,createRenderContext:()=>xs,createSVGElement:()=>Bo,createSlot:()=>fe,createTextNode:()=>er,customElements:()=>zo,defineTag:()=>Wo,emit:()=>tt,events:()=>hh,getDeepPropertyDescriptor:()=>he,getRenderContext:()=>Io,getSuperTagType:()=>Yo,getTagType:()=>js,get_document:()=>ce,hooks:()=>_s,hotkeys:()=>Rs,hydrate:()=>Zo,listen:()=>Z,locals:()=>mh,mount:()=>Ms,observable:()=>Sh,once:()=>z,parseTime:()=>Ct,proxy:()=>ms,render:()=>sh,renderContext:()=>L,renderer:()=>It,reportChanged:()=>xh,reportObserved:()=>wh,router:()=>yh,run:()=>_h,scheduler:()=>F,serve:()=>jo,session:()=>Vs,setInterval:()=>vs,setTimeout:()=>ys,styles:()=>Is,toCamelCase:()=>Po,transitions:()=>pe,unlisten:()=>jt,unmount:()=>Fs,use_dom_bind:()=>ih,use_dom_teleport:()=>nh,use_dom_transitions:()=>oh,use_events:()=>lh,use_events_hotkey:()=>ph,use_events_intersect:()=>ch,use_events_keyboard:()=>Ds,use_events_mouse:()=>sr,use_events_pointer:()=>ah,use_events_resize:()=>fh,use_events_selection:()=>dh,use_events_touch:()=>uh,use_hooks:()=>Lo,use_router:()=>gh,use_slots:()=>Go,use_styles:()=>rh,use_window:()=>qo,\u03B1action:()=>kh,\u03B1autorun:()=>Nh,\u03B1computed:()=>Th,\u03B1lazy:()=>Co,\u03B1observable:()=>Eh,\u03B1ref:()=>Oh});module.exports=Fh(nc);var Dh=Object.create,qs=Object.defineProperty,Ah=Object.getOwnPropertyDescriptor,Rh=Object.getOwnPropertyNames,Vh=Object.getPrototypeOf,zh=Object.prototype.hasOwnProperty,qh=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Kh=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Rh(e))!zh.call(t,i)&&i!==r&&qs(t,i,{get:()=>e[i],enumerable:!(s=Ah(e,i))||s.enumerable});return t},Bh=(t,e,r)=>(r=t!=null?Dh(Vh(t)):{},Kh(e||!t||!t.__esModule?qs(r,"default",{value:t,enumerable:!0}):r,t)),Uh=qh((t,e)=>{"use strict";var r=typeof Reflect=="object"?Reflect:null,s=r&&typeof r.apply=="function"?r.apply:function(l,f,p){return Function.prototype.apply.call(l,f,p)},i;r&&typeof r.ownKeys=="function"?i=r.ownKeys:Object.getOwnPropertySymbols?i=function(l){return Object.getOwnPropertyNames(l).concat(Object.getOwnPropertySymbols(l))}:i=function(l){return Object.getOwnPropertyNames(l)};function n(l){console&&console.warn&&console.warn(l)}var o=Number.isNaN||function(l){return l!==l};function h(){h.init.call(this)}e.exports=h,e.exports.once=E,h.EventEmitter=h,h.prototype._events=void 0,h.prototype._eventsCount=0,h.prototype._maxListeners=void 0;var u=10;function d(l){if(typeof l!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof l)}Object.defineProperty(h,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(l){if(typeof l!="number"||l<0||o(l))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+l+".");u=l}}),h.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},h.prototype.setMaxListeners=function(l){if(typeof l!="number"||l<0||o(l))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+l+".");return this._maxListeners=l,this};function a(l){return l._maxListeners===void 0?h.defaultMaxListeners:l._maxListeners}h.prototype.getMaxListeners=function(){return a(this)},h.prototype.emit=function(l){for(var f=[],p=1;p0&&(x=f[0]),x instanceof Error)throw x;var N=new Error("Unhandled error."+(x?" ("+x.message+")":""));throw N.context=x,N}var D=_[l];if(D===void 0)return!1;if(typeof D=="function")s(D,this,f);else for(var ge=D.length,Ph=y(D,ge),p=0;p0&&N.length>_&&!N.warned){N.warned=!0;var D=new Error("Possible EventEmitter memory leak detected. "+N.length+" "+String(f)+" listeners added. Use emitter.setMaxListeners() to increase limit");D.name="MaxListenersExceededWarning",D.emitter=l,D.type=f,D.count=N.length,n(D)}return l}h.prototype.addListener=function(l,f){return S(this,l,f,!1)},h.prototype.on=h.prototype.addListener,h.prototype.prependListener=function(l,f){return S(this,l,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 w(l,f,p){var v={fired:!1,wrapFn:void 0,target:l,type:f,listener:p},_=b.bind(v);return _.listener=p,v.wrapFn=_,_}h.prototype.once=function(l,f){return d(f),this.on(l,w(this,l,f)),this},h.prototype.prependOnceListener=function(l,f){return d(f),this.prependListener(l,w(this,l,f)),this},h.prototype.removeListener=function(l,f){var p,v,_,x,N;if(d(f),v=this._events,v===void 0)return this;if(p=v[l],p===void 0)return this;if(p===f||p.listener===f)--this._eventsCount===0?this._events=Object.create(null):(delete v[l],v.removeListener&&this.emit("removeListener",l,p.listener||f));else if(typeof p!="function"){for(_=-1,x=p.length-1;x>=0;x--)if(p[x]===f||p[x].listener===f){N=p[x].listener,_=x;break}if(_<0)return this;_===0?p.shift():g(p,_),p.length===1&&(v[l]=p[0]),v.removeListener!==void 0&&this.emit("removeListener",l,N||f)}return this},h.prototype.off=h.prototype.removeListener,h.prototype.removeAllListeners=function(l){var f,p,v;if(p=this._events,p===void 0)return this;if(p.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):p[l]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete p[l]),this;if(arguments.length===0){var _=Object.keys(p),x;for(v=0;v<_.length;++v)x=_[v],x!=="removeListener"&&this.removeAllListeners(x);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(f=p[l],typeof f=="function")this.removeListener(l,f);else if(f!==void 0)for(v=f.length-1;v>=0;v--)this.removeListener(l,f[v]);return this};function c(l,f,p){var v=l._events;if(v===void 0)return[];var _=v[f];return _===void 0?[]:typeof _=="function"?p?[_.listener||_]:[_]:p?T(_):y(_,_.length)}h.prototype.listeners=function(l){return c(this,l,!0)},h.prototype.rawListeners=function(l){return c(this,l,!1)},h.listenerCount=function(l,f){return typeof l.listenerCount=="function"?l.listenerCount(f):m.call(l,f)},h.prototype.listenerCount=m;function m(l){var f=this._events;if(f!==void 0){var p=f[l];if(typeof p=="function")return 1;if(p!==void 0)return p.length}return 0}h.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]};function y(l,f){for(var p=new Array(f),v=0;v=0?t.replace(Hh,function(e){return e.charAt(1).toUpperCase()}):t}function he(t,e,r){if(!t)return;let s=Object.getOwnPropertyDescriptor(t,e);return s||t==r?s||void 0:he(Reflect.getPrototypeOf(t),e,r)}var Ks=function(t,e,r){let s,i,n;for(;(s=r)&&(r=r.next);)(i=r.listener)&&(r.path&&i[r.path]?n=e?i[r.path].apply(i,e):i[r.path]():n=e?i.apply(r,e):i.call(r)),r.times&&--r.times<=0&&(s.next=r.next,r.listener=null)};function Z(t,e,r,s){var i;let n,o,h;return n=t[ye]||(t[ye]={}),o=n[e]||(n[e]={}),h=o.tail||(o.tail=o.next={}),h.listener=r,h.path=s,o.tail=h.next={},h}function z(t,e,r){let s=Z(t,e,r);return s.times=1,s}function jt(t,e,r,s){let i,n,o=t[ye];if(!!o&&(i=o[e])){for(;(n=i)&&(i=i.next);)if(i==r||i.listener==r){n.next=i.next,i.listener=null;break}}}function tt(t,e,r){let s;(s=t[ye])&&(s[e]&&Ks(e,r,s[e]),s.all&&Ks(e,[e,r],s.all))}var Qe=class{emit(t,...e){return tt(this,t,e)}on(t,...e){return Z(this,t,...e)}once(t,...e){return z(this,t,...e)}un(t,...e){return jt(this,t,...e)}};function Yh(t){let e;return t?(e=t.toIterable)?e.call(t):t:[]}var Bs=Symbol.for("#__init__"),Us=Symbol.for("#schedule"),hr=Symbol.for("#frames"),ve=Symbol.for("#interval"),_t=Symbol.for("#stage"),xt=Symbol.for("#scheduled"),be=Symbol.for("#version"),Wh=Symbol.for("#fps"),Hs=Symbol.for("#ticker"),Gh=globalThis.requestAnimationFrame||function(t){return globalThis.setTimeout(t,1e3/60)},hc=1/60,Xh=class{constructor(t=null){this[Bs](t)}[Bs](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[hr],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[ve]=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[ve]&&(globalThis.clearInterval(this[ve]),this[ve]=null),this.active=!1,this}},gs=class{constructor(){var t=this;this.id=Symbol(),this.queue=[],this.stage=-1,this[_t]=-1,this[hr]=0,this[xt]=!1,this[be]=0,this.listeners={},this.intervals={},t.commit=function(){return t.add("commit"),t},this[Wh]=0,t.$promise=null,t.$resolve=null,this[Hs]=function(e){return t[xt]=!1,t.tick(e)}}touch(){return this[be]++}get version(){return this[be]}add(t,e){return(e||this.queue.indexOf(t)==-1)&&this.queue.push(t),this[xt]||this[Us](),this}get committing\u03A6(){return this.queue.indexOf("commit")>=0}get syncing\u03A6(){return this[_t]==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[hr]++;if(this.ts||(this.ts=t),this.dt=t-this.ts,this.ts=t,this.queue=[],this[_t]=1,this[be]++,r.length)for(let i=0,n=Yh(r),o=n.length;i0&&setTimeout(function(){return r.decr(t)},e),s[t]=Math.max(i,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[Ws],s=this[Gs],i=!0;if(!r)r=this[Ws]=[t],s=this[Gs]=[e||""],this.toString=this.valueOf=this[Ys];else{let n=r.indexOf(t),o=e||"";n==-1?(r.push(t),s.push(o)):s[n]!=o?s[n]=o:i=!1}i&&(this[Xs]=" "+s.join(" "),this.sync())}valueOf(){return this.string}toString(){return this.string}[Ys](){return this.string+(this[Xs]||"")}sync(){return this.dom.flagSync$()}get stacks(){return this[Qs]||(this[Qs]={})}},Se=Symbol.for("#__init__"),Zs=Symbol.for("#__initor__"),ti=Symbol.for("#__inited__"),lr=Symbol.for("#getRenderContext"),Qh=Symbol.for("#getDynamicContext"),ei=Symbol(),L={context:null},Jh=class{constructor(t=null){this[Se](t)}[Se](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()}},It=new Jh,pt=class extends Map{static[Se](){return this.prototype[Zs]=ei,this}constructor(t,e=null){super(),this._=t,this.sym=e,this[Zs]===ei&&this[ti]&&this[ti]()}pop(){return L.context=null}[lr](t){let e=this.get(t);return e||this.set(t,e=new pt(this._,t)),L.context=e}[Qh](t,e){return this[lr](t)[lr](e)}run(t){return this.value=t,L.context==this&&(L.context=null),this.get(t)}cache(t){return this.set(this.value,t),t}};pt[Se]();function xs(t,e=Symbol(),r=t){return L.context=t[e]||(t[e]=new pt(r,e))}function Io(){let t=L.context,e=t||new pt(null);return globalThis.DEBUG_IMBA&&!t&&It.stack.length>0&&console.warn("detected unmemoized nodes in",It.stack.slice(0),"see https://imba.io",e),t&&(L.context=null),e}function Dt(t,e){let r=Object.getOwnPropertyDescriptors(e);return delete r.constructor,Object.defineProperties(t,r),t}function Zh(t){let e;return t?(e=t.toIterable)?e.call(t):t:[]}var At=Symbol.for("#parent"),ri=Symbol.for("#closestNode"),tl=Symbol.for("#parentNode"),el=Symbol.for("#context"),_e=Symbol.for("#__init__"),si=Symbol.for("##inited"),ar=Symbol.for("#getRenderContext"),rl=Symbol.for("#getDynamicContext"),ii=Symbol.for("#insertChild"),Rt=Symbol.for("#appendChild"),ur=Symbol.for("#replaceChild"),ni=Symbol.for("#removeChild"),rt=Symbol.for("#insertInto"),oi=Symbol.for("#insertIntoDeopt"),Vt=Symbol.for("#removeFrom"),hi=Symbol.for("#removeFromDeopt"),wt=Symbol.for("#replaceWith"),li=Symbol.for("#replaceWithDeopt"),cr=Symbol.for("#placeholderNode"),sl=Symbol.for("#attachToParent"),il=Symbol.for("#detachFromParent"),nl=Symbol.for("#placeChild"),ol=Symbol.for("#beforeReconcile"),hl=Symbol.for("#afterReconcile"),ll=Symbol.for("#afterVisit"),al=Symbol.for("#visitContext"),ai=Symbol.for("#__initor__"),ui=Symbol.for("#__inited__"),ci=Symbol.for("##parent"),fr=Symbol.for("##up"),fi=Symbol.for("##context"),mt=Symbol.for("#domNode"),xe=Symbol.for("##placeholderNode"),di=Symbol.for("#domDeopt"),we=Symbol.for("##visitContext"),pi=Symbol.for("#isRichElement"),mi=Symbol.for("#src"),Tt=Symbol.for("#htmlNodeName"),ul=Symbol.for("#getSlot"),gi=Symbol.for("#ImbaElement"),yi=Symbol.for("#cssns"),cl=Symbol.for("#cssid"),vi=Symbol(),{Event:et,UIEvent:Mo,MouseEvent:ws,PointerEvent:Ts,KeyboardEvent:Es,CustomEvent:q,Node:H,Comment:le,Text:Je,Element:O,HTMLElement:Ze,HTMLHtmlElement:Fo,HTMLSelectElement:Os,HTMLInputElement:Ns,HTMLTextAreaElement:ks,HTMLButtonElement:$s,HTMLOptionElement:Ps,HTMLScriptElement:Do,SVGElement:tr,DocumentFragment:Ao,ShadowRoot:Ro,Document:ae,Window:Vo,customElements:zo}=globalThis.window,bi={};function Si(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==tr?r[e]=s||null:Si(Reflect.getPrototypeOf(t),e,r)}var dr={},pr={},ue={},Ls={};function ce(){return globalThis.document}function qo(){return!0}var fl={get(t,e){let r=t,s;for(;r&&s==null;)(r=r[At])&&(s=r[e]);return s},set(t,e,r){let s=t,i;for(;s&&i==null;){if(he(s,e,O))return s[e]=r,!0;s=s[At]}return!0}},dl=class{get flags(){return this.documentElement.flags}};Dt(ae.prototype,dl.prototype);var pl=class{get[At](){return this[ci]||this.parentNode||this[fr]}get[ri](){return this}get[tl](){return this[At][ri]}get[el](){return this[fi]||(this[fi]=new Proxy(this,fl))}[_e](){return this}[si](){return this}[ar](t){return xs(this,t)}[rl](t,e){return this[ar](t)[ar](e)}[ii](t,e){return t[rt](this,e)}[Rt](t){return t[rt](this,null)}[ur](t,e){let r=this[ii](t,e);return this[ni](e),r}[ni](t){return t[Vt](this)}[rt](t,e=null){return e?t.insertBefore(this,e):t.appendChild(this),this}[oi](t,e){return e?t.insertBefore(this[mt]||this,e):t.appendChild(this[mt]||this),this}[Vt](t){return t.removeChild(this)}[hi](t){return t.removeChild(this[mt]||this)}[wt](t,e){return e[ur](t,this)}[li](t,e){return e[ur](t,this[mt]||this)}get[cr](){return this[xe]||(this[xe]=globalThis.document.createComment("placeholder"))}set[cr](t){let e=this[xe];this[xe]=t,e&&e!=t&&e.parentNode&&e[wt](t)}[sl](){let t=this[mt],e=t&&t.parentNode;return t&&e&&t!=this&&(this[mt]=null,this[rt](e,t),t[Vt](e)),this}[il](){this[di]!=!0&&(this[di]=!0,!0)&&(this[wt]=this[li],this[Vt]=this[hi],this[rt]=this[oi],this[fr]||(this[fr]=this[At]));let t=this[cr];return this.parentNode&&t!=this&&(t[rt](this.parentNode,this),this[Vt](this.parentNode)),this[mt]=t,this}[nl](t,e,r){let s=typeof t;if(s==="undefined"||t===null){if(r&&r instanceof le)return r;let i=globalThis.document.createComment("");return r?r[wt](i,this):i[rt](this,null)}if(t===r)return t;if(s!=="object"){let i,n=t;return e&128&&e&256,r?r instanceof Je?(r.textContent=n,r):(i=globalThis.document.createTextNode(n),r[wt](i,this),i):(this.appendChild(i=globalThis.document.createTextNode(n)),i)}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[wt](t,this):t[rt](this,null)}}};Dt(H.prototype,pl.prototype);var ml=class{log(...t){return console.log(...t)}emit(t,e,r={bubbles:!0,cancelable:!0}){e!=null&&(r.detail=e);let s=new q(t,r),i=this.dispatchEvent(s);return s}text$(t){return this.textContent=t,this}[ol](){return this}[hl](){return this}[ll](){this.render&&this.render(),this[we]&&(this[we]=null)}get[al](){return this[we]||(this[we]={})}get flags(){return this.$flags||(this.$flags=new Js(this),this.flag$==O.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=he(this,t,O);!r||!r.set?this.setAttribute(t,e):this[t]=e}get richValue(){return this.value}set richValue(t){this.value=t}};Dt(O.prototype,ml.prototype),O.prototype.setns$=O.prototype.setAttributeNS,O.prototype[pi]=!0;function Ko(t,e,r,s){let i=globalThis.document.createElement(t);return r&&(i.className=r),s!==null&&i.text$(s),e&&e[Rt]&&e[Rt](i),i}var gl=class{set$(t,e){var r;let s=bi[r=this.nodeName]||(bi[r]={}),i=Si(this,t,s);!i||!i.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(tr.prototype,gl.prototype);var yl=class{set src(t){if(this[mi]!=t&&(this[mi]=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),i=s.length,n,o;r-1||_i.indexOf("CriOS")>=0||_i.indexOf("FxiOS")>=0,Ee=!bl,xi=new Map,Sl=class extends Ze{connectedCallback(){return Ee?this.parentNode.removeChild(this):this.parentNode.connectedCallback()}disconnectedCallback(){if(!Ee)return this.parentNode.disconnectedCallback()}};window.customElements.define("i-hook",Sl);function _l(t,e){let r=xi.get(e);if(!r){r={};let s=e.prototype,i=[s];for(;(s=s&&Object.getPrototypeOf(s))&&s.constructor!=t.constructor;)i.unshift(s);for(let n=0,o=Zh(i),h=o.length;n=0&&this.childNodes.splice(r,0,t),t}[Ni](t){this.parentNode&&this.parentNode[Ni](t);let e=this.childNodes.indexOf(t);e>=0&&this.childNodes.splice(e,1)}[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,i=mr(this.childNodes),n=i.length;s=0&&this.childNodes.splice(r,0,t)}else this.childNodes.push(t);return t}[ke](t){for(let e=0,r=mr(this.childNodes),s=r.length;et)for(;e>t;)r[Fl](s[--e]);else if(t>e)for(;t>e;)r[Dl](s[e++],i);this.length=t}[Le](t,e){this.parentNode=t,this[ht]&&this[ht][Le](t,e),e=this[ht];for(let r=0,s=Ll(this.childNodes),i=s.length;r0;)this.childNodes[--e][br](t);this[ht]&&t.removeChild(this[ht]),this.parentNode=null}};Vi[Ai]();function Qo(t,e){return new Vi(t,e)}function zi(t){let e;return t?(e=t.toIterable)?e.call(t):t:[]}var Sr=Symbol.for("#appendChild"),Ce=Symbol.for("#insertChild"),Al=Symbol.for("#replaceWith"),je=Symbol.for("#insertInto"),_r=Symbol.for("#removeFrom"),Rl=Symbol.for("#afterVisit"),qi=Symbol.for("#__initor__"),Ki=Symbol.for("#__inited__"),Bi=Symbol.for("#__init__"),Ie=Symbol.for("#domFlags"),Ui=Symbol.for("##parent"),lt=Symbol.for("#end"),Hi=Symbol.for("#removeChild"),Yi=Symbol(),Wi=class extends Mt{static[Bi](){return this.prototype[qi]=Yi,this}constructor(t,e){super(...arguments),this[Ie]=t,this[Ui]=e,this.changes=new Map,this.dirty=!1,this.array=this.childNodes,this.$=new pt(this,Symbol()),t&256||(this[lt]=St("map")),e&&e[Sr](this),this[qi]===Yi&&this[Ki]&&this[Ki]()}[Sr](t){if(this.parentNode)return this.parentNode[Ce](t,this[lt])}hasChildNodes(){return this.childNodes.length!=0}push(t,e){if(!(this[Ie]&1)){this.array.push(t),this[Sr](t);return}let r=this.array[e];if(r!==t){this.dirty=!0;let s=this.array.indexOf(t),i=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)),i==-1&&this.changes.delete(t)}}insertChild(t,e,r){let s=this.parentNode;if(s)if(e>0){let i=this.array[e-1];s[Ce](t,i.nextSibling)}else s[Ce](t,this.childNodes[e+1]||this[lt])}moveChild(t,e,r){return this.insertChild(t,e,r)}removeChild(t,e){t.parentNode&&t[_r](t.parentNode)}[Ce](t,e){}[Al](t,e){let r=t[je](e,this[lt]);return this[_r](e),r}[je](t,e){this[Ui]=t;let r=this.parentNode;if(t!=r){this.parentNode=t;for(let s=0,i=zi(this.array),n=i.length;st)for(;e.array.length>t;){let r=e.array.pop();e.removeChild(r)}}};Wi[Bi]();function Jo(t,e){return new Wi(t,e)}var Et=Symbol.for("#__init__"),Gi=Symbol.for("#__initor__"),Xi=Symbol.for("#__inited__"),Vl=Symbol.for("##inited"),zl=Symbol.for("#afterVisit"),ql=Symbol.for("#beforeReconcile"),Kl=Symbol.for("#afterReconcile"),Qi=Symbol.for("#__hooks__"),Ot=Symbol.for("#autorender"),Me=Symbol.for("##visitContext"),Ji=Symbol(),Zi=new class{constructor(t=null){this[Et](t)}[Et](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,i=this.lastQueued;this.lastQueued=t;let n=H.DOCUMENT_POSITION_PRECEDING,o=H.DOCUMENT_POSITION_FOLLOWING;if(r){let h=this.items.indexOf(i),u=h,d=function(S,b){return e.tests++,S.compareDocumentPosition(b)};(h==-1||i.nodeName!=t.nodeName)&&(u=h=0);let a=e.items[u];for(;a&&d(a,t)&o;)a=e.items[++u];if(u!=h)a?e.items.splice(u,0,t):e.items.push(t);else{for(;a&&d(a,t)&n;)a=e.items[--u];u!=h&&(a?e.items.splice(u+1,0,t):e.items.unshift(t))}}else e.items.push(t),e.current||globalThis.queueMicrotask(e.flush.bind(e))}};function Zo(){return Zi.flush()}var de=class extends Ze{static[Et](){return this.prototype[Gi]=Ji,this}constructor(){super(),this.flags$ns&&(this.flag$=this.flagExt$),this.setup$(),this.build(),this[Gi]===Ji&&this[Xi]&&this[Xi]()}setup$(){return this.__slots={},this.__F=0}[Et](){return this.__F|=3,this}[Vl](){if(this[Qi])return this[Qi].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}[zl](){if(this.visit(),this[Me])return this[Me]=null}[ql](){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&&It.push(this),this[Me]&&(this[Me]=null),this}[Kl](){return globalThis.DEBUG_IMBA&&It.pop(this),this}connectedCallback(){let t=this.__F,e=t&1,r=t&8;if(!e&&!(t&1024)){Zi.queue(this);return}if(t&48)return;this.__F|=16,e||this[Et](),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])}};de[Et]();var th=de;function Bl(t,e){let r=Object.getOwnPropertyDescriptors(e);return delete r.constructor,Object.defineProperties(t,r),t}var tn=Symbol.for("#__init__"),Ul={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},en={prefix:1,suffix:1,content:1},xr={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]]},Hl=new RegExp("^("+Object.keys(xr).join("|")+")(\\d+(?:\\.\\d+)?)$"),Yl=/^([xyz])$/,Wl=/^([tlbr]|size|[whtlbr]|[mps][tlbrxy]?|[rcxy]?[gs])$/,Gl=`*,::before,::after { box-sizing: border-box; border-width: 0; border-style: solid; border-color: currentColor; }`,Xl=class{constructor(t=null){this[tn](t)}[tn](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",Gl),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 i;en[r]&&(t=String(t));let n=typeof t;if(n=="number"){if(e||(Yl.test(r)?e="px":Wl.test(r)?e="u":r=="rotate"&&(e="turn",t=(t%1).toFixed(4))),e)return Ul[e]?t+e:e=="u"?t*4+"px":"calc(var(--u_"+e+",1px) * "+t+")"}else if(n=="string"){if(r&&en[r]&&t[0]!='"'&&t[0]!="'"&&(t.indexOf('"')>=0?t.indexOf("'")==-1&&(t="'"+t+"'"):t='"'+t+'"'),i=t.match(Hl)){let o=xr[i[1]][parseInt(i[2])],h="100%";if(typeof s=="number"?h=s+"%":typeof s=="string"&&(h=s),o)return"hsla("+o[0]+","+o[1]+"%,"+o[2]+"%,"+h+")"}}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]}},Is=new Xl,eh=Object.keys(xr);function rh(){return!0}var Ql=class{css$(t,e,r){return this.style[t]=e}css$var(t,e,r,s,i=null){let n=Is.toValue(e,r,s,i);this.style.setProperty(t,n)}};Bl(O.prototype,Ql.prototype);var Jl=Symbol.for("#insertInto"),rn=Symbol.for("#removeFrom");function sh(t,e={}){let r=L.context;L.context=e;let s=t(e);return L.context==e&&(L.context=r),s}function Ms(t,e){let r=e||globalThis.document.body,s=t;if(t instanceof Function){let i=new pt(r,null),n=function(){let o=L.context;L.context=i;let h=t(i);return L.context==i&&(L.context=o),h};s=n(),F.listen("commit",n)}else s.__F|=64;return s[Jl](r),s}function Fs(t){return t&&t[rn]&&t[rn](t.parentNode),t}var sn=globalThis.imba||(globalThis.imba={});sn.mount=Ms,sn.unmount=Fs;function Nt(t,e){let r=Object.getOwnPropertyDescriptors(e);return delete r.constructor,Object.defineProperties(t,r),t}function zt(t){let e;return t?(e=t.toIterable)?e.call(t):t:[]}var qt=Symbol.for("##onchange"),Kt=Symbol.for("#afterVisit"),Bt=Symbol.for("##oninput"),Fe=Symbol.for("##onclick"),Ut=Symbol.for("##bound"),at=Symbol.for("##visitContext");function ih(){return!0}var Zl={INPUT:!0,SELECT:!0,TEXTAREA:!0,BUTTON:!0},wr=function(t){return t instanceof Array||t&&t.has instanceof Function},Tr=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},Er=function(t,e){if(t instanceof Array)return t.push(e);if(t&&t.add instanceof Function)return t.add(e)},Or=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 ta(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 ea=class{getRichValue(){return this.value}setRichValue(t){return this.value=t}bind$(t,e){let r=e||[];return t=="data"&&!this[Ut]&&Zl[this.nodeName]&&(this[Ut]=!0,this[qt]&&this.addEventListener("change",this[qt]=this[qt].bind(this)),this[Bt]&&this.addEventListener("input",this[Bt]=this[Bt].bind(this),{capture:!0}),this[Fe]&&this.addEventListener("click",this[Fe]=this[Fe].bind(this),{capture:!0})),Object.defineProperty(this,t,r instanceof Array?ta(r):r),r}};Nt(O.prototype,ea.prototype),Object.defineProperty(O.prototype,"richValue",{get:function(){return this.getRichValue()},set:function(t){return this.setRichValue(t)}});var ra=class{[qt](t){let e=this.data,r=this.$$value;this.$$value=void 0;let s=this.getRichValue();if(this.multiple){if(r)for(let i=0,n=zt(r),o=n.length;i0&&(a=a.split("~")[0]);let b=null,w=[t,n],c,m=null,y,g=!1,T=typeof a=="string";if(a[0]=="$"&&a[1]=="_"&&S[0]instanceof Function)a=S[0],a.passive||(n.commit=!0),w=[t,n].concat(S.slice(1)),m=e;else if(S instanceof Array){w=S.slice(),b=w;for(let E=0,l=gn(w),f=l.length;E2)}};function Ir(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 kt(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 Mr(t,e=1){let r=1/e;return Math.round(t*r)/r}function ja(t,e,r){return e>r?Math.max(r,Math.min(e,t)):Math.min(r,Math.max(e,t))}function xn(t,e,r,s,i=.1){let[n,o]=kt(r),[h,u]=kt(s),[d,a]=kt(i);return o=="%"&&(n=(e-t)*(n/100)),u=="%"&&(h=(e-t)*(h/100)),a=="%"&&(d=(h-n)*(d/100)),function(S,b){let w=(S-t)/(e-t),c=n+(h-n)*w;return i&&(c=Mr(c,d)),b&&(c=ja(c,n,h)),c}}function Ia(t,e){let r=Object.getOwnPropertyDescriptors(e);return delete r.constructor,Object.defineProperties(t,r),t}sr();function ah(){return!0}var Ma=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}};Ia(Ts.prototype,Ma.prototype);function Fa(t,e){let r=Object.getOwnPropertyDescriptors(e);return delete r.constructor,Object.defineProperties(t,r),t}var wn=Symbol.for("#capture"),W=Symbol.for("#step"),Da=Symbol.for("#cancel"),Fr=Symbol.for("#reframe"),Tn=Symbol.for("#mods"),Dr=Symbol.for("#dx"),Ar=Symbol.for("#dy"),ct=Symbol.for("#context"),ze=Symbol.for("#locked"),En=Symbol.for("#teardown"),On=Symbol.for("#x"),Nn=Symbol.for("#y"),Aa=Symbol.for("#pinTarget");function uh(){return!0}var kn=null,Ra=class{constructor(t,e,r){this.phase="init",this.events=[],this.originalEvent=t,this.handler=e,this.target=this.currentTarget=r,this[Tn]={}}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[Dr]==null?this.event.x-this.start.x:this[Dr]}get dy(){return this[Ar]==null?this.event.y-this.start.y:this[Ar]}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 z(this,t,...e)}un(t,...e){return jt(this,t,...e)}\u03B1flag(t,e){let{element:r}=this[ct],s=Date.now(),i=e instanceof O?e:e?r.closest(e):r;return this[W].setup!=!0&&(this[W].setup=!0,!0)&&(i.flags.incr(t),z(this,"end",function(){return i.flags.decr(t)})),!0}\u03B1lock(){return this[wn](),!0}[wn](){if(this[ze]!=!0&&(this[ze]=!0,!0))return this[ct].element.setPointerCapture(this.pointerId)}get[W](){var t,e;return(t=this[Tn])[e=this[ct].step]||(t[e]={})}[Da](){return this[En]()}\u03B1moved(t,e){let r=this[W],{element:s,state:i,event:n}=this[ct];if(!r.setup){let a=t||4;typeof t=="string"&&t.match(/^(up|down|left|right|x|y)$/)&&(r.dir=t,a=e||4),typeof e=="string"&&e.match(/^(up|down|left|right|x|y)$/)&&(r.dir=e),r.setup=!0;let[S,b]=kt(a);r.threshold=S,r.sy=S,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,h=this.x-r.x0,u=this.y-r.y0;r.x=Math.max(r.x,Math.abs(h)),r.y=Math.max(r.y,Math.abs(u)),r.left=Math.max(r.left,-h),r.right=Math.max(r.right,h),r.up=Math.max(r.up,-u),r.down=Math.max(r.down,u),r.dist=Math.max(r.dist,Math.sqrt(h*h+u*u));let d=r[r.dir];if(d>o&&d>=r.x&&d>=r.y){r.active=!0;let a=i.pinTarget;return s.flags.incr("_move_"),a&&a.flags.incr("_move_"),this.preventDefault(),z(this,"end",function(){return a&&a.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[ct].element;if(r.cancelled)return!1;if(r.setup&&!r.active){let i=this.clientX,n=this.clientY,o=i-r.x,h=n-r.y;Math.sqrt(o*o+h*h)>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 i;return r.timeout=setTimeout(function(){return r.active=!0,e.preventDefault(),s.flags.incr("_hold_"),i&&i(!0),i=null},t),z(e,"end",function(){return r.active&&s.flags.decr("_hold_"),clearTimeout(r.timeout),i&&i(!1),i=null}),new Promise(function(n){return i=n})}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[ct].commit=!0,!0}\u03B1apply(t,e="x",r="y"){return e&&(t[e]=this.x),r&&(t[r]=this.y),this[ct].commit=!0,!0}\u03B1css(t="x",e="y"){let r=this[W];if(r.setup!=!0&&(r.setup=!0,!0))r.el=this[ct].element,r.x=r.el[On]||0,r.y=r.el[Nn]||0,r.tx=this.x,r.ty=this.y;else{let s=r.el[On]=r.x+(this.x-r.tx),i=r.el[Nn]=r.y+(this.y-r.ty);t&&r.el.style.setProperty("--x",s+"px"),e&&r.el.style.setProperty("--y",i+"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=Mr(this.x,t),this.y=Mr(this.y,e),!0}[Fr](...t){let e=this[W];if(e.setup!=!0&&(e.setup=!0,!0)){let r=this.target,s=t.length,i=t[0],n=0,o="100%",h=0,u=typeof i;u=="number"||u=="string"&&/^([-+]?\d[\d\.]*)(%|\w+)$/.test(i)||i instanceof Array?i=null:u=="string"&&(i=="this"||i==""?i=r:i=="up"?i=r.parentNode:i=="op"?i=r.offsetParent:i=r.closest(i)||r.querySelector(i)),i==null&&(s++,t.unshift(i=r)),s==2?h=t[1]:s>2&&([n,o,h=0]=t.slice(1));let d=i.getBoundingClientRect();n instanceof Array||(n=[n,n]),o instanceof Array||(o=[o,o]),h instanceof Array||(h=[h,h]),e.rect=d,e.x=xn(d.left,d.right,n[0],o[0],h[0]),e.y=xn(d.top,d.bottom,n[1],o[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[Dr]=r-this.x0,this[Ar]=s-this.y0}return!0}\u03B1fit(...t){return this[W].clamp=!0,this[Fr](...t)}\u03B1reframe(...t){return this[Fr](...t)}\u03B1pin(...t){let e=this[W];if(e.setup!=!0&&(e.setup=!0,!0)){let r=Ir(t[0],this.target);r instanceof O||t.unshift(r=this.target);let s=t[1]||0,i=t[2]==null?t[2]=s:t[2],n=r.getBoundingClientRect();e.x=this.clientX-(n.left+n.width*s),e.y=this.clientY-(n.top+n.height*i),r&&(this[Aa]=r,r.flags.incr("_touch_"),z(this,"end",function(){return r.flags.decr("_touch_")}))}return this.x-=e.x,this.y-=e.y,!0}},Va=class{on$touch(t,e,r,s){return r.type="touch",this.addEventListener("pointerdown",r,{passive:!1}),jr.ios\u03A6&&globalThis.parent!=globalThis&&kn!=!0&&(kn=!0,!0)&&globalThis.parent.postMessage("setupTouchFix"),r}};if(Fa(O.prototype,Va.prototype),globalThis.parent==globalThis&&jr.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,i=this.handler,n=jr.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=i.state=this.current=new Ra(t,i,e);r=o.pointerId;let h=function(c){return c.preventDefault(),!1},u=null,d=Symbol(),a=function(c){let m=o.clientX,y=o.clientY,g=c.clientX,T=c.clientY;(o[ze]||o.defaultPrevented)&&(c.pointerId==o.pointerId||m==g&&y==T)&&(c.preventDefault(),c.stopPropagation()),a&&(globalThis.removeEventListener("click",a,{capture:!0}),a=null)},S=function(c){if(!(o.type=="touchmove"&&c.changedTouches[0].identifier!=r)&&(o.defaultPrevented||o[ze]))return c.preventDefault()},b=function(c){let m=c.type,y=o.phase;if(c.pointerId&&o.pointerId!=c.pointerId||c[d])return;c[d]=!0;let g=m=="pointerup"||m=="pointercancel";if(c.pressure==0&&c.pointerType=="mouse"&&m=="pointermove"&&o.originalEvent.pressure>0)return u(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{i.handleEvent(o)}catch{}if(y=="init"&&!g&&(o.phase="active"),g&&u)return u(c)},w=!1;return u=function(c){if(!w&&(w=!0,e.flags.decr("_touch_"),o.phase!="ended"&&(o.phase="ended",o.x=o.clientX,o.y=o.clientY,i.handleEvent(o)),o.emit("end"),s.passive||--i.prevents==0&&e.style.removeProperty("touch-action"),i.state={},globalThis.removeEventListener("pointermove",b,{passive:!!s.passive}),globalThis.removeEventListener("pointerup",b),globalThis.removeEventListener("pointercancel",b),setTimeout(function(){if(a&&(globalThis.removeEventListener("click",a,{capture:!0}),a=null),n&&S)return globalThis.removeEventListener("touchend",S),globalThis.removeEventListener("touchmove",S,{passive:!1}),S=null},100),!s.passive))return globalThis.document.removeEventListener("selectstart",h,{capture:!0})},o[En]=u,s.passive||(i.prevents||(i.prevents=0),i.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",a,{capture:!0}),n&&!s.passive&&(globalThis.addEventListener("touchend",S),globalThis.addEventListener("touchmove",S,{passive:!1})),s.passive||globalThis.document.addEventListener("selectstart",h,{capture:!0}),b(t),!1};function $n(t){let e;return t?(e=t.toIterable)?e.call(t):t:[]}function za(t,e){let r=Object.getOwnPropertyDescriptors(e);return delete r.constructor,Object.defineProperties(t,r),t}var qa=Symbol.for("#context"),Ka=Symbol.for("#extendType");function ch(){return!0}var Pn=new(globalThis.WeakMap||Map),me={threshold:[0]},Ba={};et.intersect$handle=function(){let t=this.event.detail.observer;return this.modifiers._observer==t};var Ua=class extends q{\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[qa],i=Ir(e||"",this.target);return this.isIntersecting&&!r[s]?(i.flags.incr(t),r[s]=!0):r[s]&&!this.isIntersecting&&(i.flags.decr(t),r[s]=!1),!0}};function Ha(t,e){return function(r,s){let i=s.prevRatios||(s.prevRatios=new WeakMap);for(let n=0,o=$n(r),h=o.length;n1)for(n[0]=0;n.length"+n.map(function(o){return""+o+""}).join("")+""}).join(" "))}var ft={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"},Fn={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},Dn={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},An={option:"alt",command:"meta",return:"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},Yt;for(X=1;X<20;++X)ft[111+X]="f"+X;var X;for(X=0;X<=9;++X)ft[X+96]=X.toString();function Kr(t,e,r){if(t.addEventListener){t.addEventListener(e,r,!1);return}t.attachEvent("on"+e,r)}function Br(t,e,r){if(t.removeEventListener){t.removeEventListener(e,r,!1);return}t.detachEvent("on"+e,r)}function Rn(t){if(t.type=="keypress"){var e=String.fromCharCode(t.which);return t.shiftKey||(e=e.toLowerCase()),e}return ft[t.which]?ft[t.which]:Fn[t.which]?Fn[t.which]:String.fromCharCode(t.which).toLowerCase()}function nu(t,e){return t.sort().join(",")===e.sort().join(",")}function ou(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 hu(t){if(t.preventDefault){t.preventDefault();return}t.returnValue=!1}function lu(t){if(t.stopPropagation){t.stopPropagation();return}t.cancelBubble=!0}function Ur(t){return t=="shift"||t=="ctrl"||t=="alt"||t=="meta"}function au(){if(!Yt){Yt={};for(var t in ft)t>95&&t<112||ft.hasOwnProperty(t)&&(Yt[ft[t]]=t)}return Yt}function uu(t,e,r){return r||(r=au()[t]?"keydown":"keypress"),r=="keypress"&&e.length&&(r="keydown"),r}function cu(t){return t==="+"?["+"]:(t=t.replace(/\+{2}/g,"+plus"),t.split("+"))}function Vn(t,e){var r,s,i,n=[];for(r=cu(t),i=0;i1){b(c,E,m,y);return}l=Vn(c,y),e._callbacks[l.key]=e._callbacks[l.key]||[],u(l.key,l.modifiers,{type:l.action},g,c,T),e._callbacks[l.key][g?"unshift":"push"]({callback:m,modifiers:l.modifiers,action:l.action,seq:g,level:T,combo:c})}e._bindMultiple=function(c,m,y){for(var g=0;g-1||zn(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)&&(ft[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 fu(t,e){let r=Object.getOwnPropertyDescriptors(e);return delete r.constructor,Object.defineProperties(t,r),t}var Hr=Symbol.for("#updateHotKeys"),du=Symbol.for("#inInput"),Yr=Symbol.for("#inEditable"),pu=Symbol.for("#hotkeyTarget"),qn=Symbol.for("#hotkeyCombos"),mu=Symbol.for("#extendType"),Gt=Symbol.for("#combos"),Kn=Symbol.for("#target"),Xt=Symbol.for("#hotkeyHandlers"),gu=Symbol.for("#defaultPrevented"),yu=Symbol.for("#visit"),Bn=Symbol.for("#key"),vu;try{vu=(globalThis.navigator.platform||"").match(/iPhone|iPod|iPad|Mac/)}catch{}function ph(){return!0}var Wr={esc:!0},bu=class extends q{\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}\u03B1repeat(){return!0}},Su=function(t,e,r){return e.tagName=="INPUT"&&(r=="down"||r=="up")?!1:e.tagName=="INPUT"||e.tagName=="SELECT"||e.tagName=="TEXTAREA"?Wr[r]?(t[du]=!0,t[Yr]=!0,!1):!0:e.contentEditable&&(e.contentEditable=="true"||e.contentEditable=="plaintext-only")?Wr[r]?(t[Yr]=!0,!1):!0:!1},Rs=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){return this.mousetrap?.trigger?.(t)}register(t,e={}){return this.mousetrap||(this.mousetrap=j(globalThis.document),this.mousetrap.stopCallback=Su),this.combos[t]||(this.combos[t]=!0,this.mousetrap.bind(t,this.handler)),(e.capture||e.force)&&(Wr[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 su(t,e)}htmlify(t,e="auto"){return iu(t,e)}matchCombo(t){return!0}handle(t,e){let r=t.target&&t.target[pu]||t.target||globalThis.document.body,s=Array.from(globalThis.document.querySelectorAll("[data-hotkey]")),i=r.ownerDocument,n=r;for(;n&&n!=i&&n.hotkeys!==!0;)n=n.parentNode;if(s=s.reverse().filter(function(d){let a=d[qn];if(!(a&&(a[e]||a["*"])))return!1;let S=d;for(;S&&S!=i;){if(S.hotkeys===!1)return!1;S=S.parentNode}return!0}),!s.length)return;let o={combo:e,originalEvent:t,targets:s},h=new q("hotkey",{bubbles:!0,detail:o});h[mu](bu),h.originalEvent=t,h.hotkey=e,r.dispatchEvent(h);let u=[];for(let d=0,a=Wt(s),S=a.length;d=this.length))return(e=this[Jt])[t]||(e[t]=Qr.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 Qr(this,s,!0)}pushState(t,e,r,s=!0){return t instanceof Qr||(t=this.buildState(t,r,s)),this.index=t.index,this.cache[this.index]=t,this[Jt][this.index]=t,this[Jt].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)}},Gn=class{constructor(t,e,r,s){this.params=s,this.router=t,e&&(this.location=yt.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){return this.location?.update?.(t),this}get path(){return this.location?.path}get url(){return this.location?.toString?.()}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 Xn(t){let e;return t?(e=t.toIterable)?e.call(t):t:[]}var Ke=Symbol.for("#routes"),Jr=Symbol.for("#match"),Tu=Symbol.for("#symbol"),Qn=Symbol.for("#matches"),Zr=new Map,ts={},Jn={},Eu=/.*/;function Ou(t){if(!Zr.has(t)){let e=new Map;return Zr.set(t,e),e}return Zr.get(t)}function Nu(t,e){let r=Ou(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 ku=class{};function $u(t){if(ts[t])return ts[t];let e=ts[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 i=e.query=t.slice(r+1);t=t.slice(0,r),e.query=Jn[i]||(Jn[i]=new URLSearchParams(i))}return e.path=t,e}var Pu=class{constructor(t){this.router=t,this.fullPath="",this[Ke]={},this[Jr]=new ku,this[Jr].path=""}route(t){var e;return(e=this[Ke])[t]||(e[t]=new Zn(this.router,t,this))}match(){return this[Jr]}resolve(t){return"/"}},Zn=class{constructor(t,e,r){this.parent=r||t.rootRoute,this.router=t,this.status=200,this.path=e,this[Tu]=Symbol(),this[Qn]={},this[Ke]={}}route(t){var e;return(e=this[Ke])[t]||(e[t]=new Zn(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 i=0,n=Xn(s.join("?").split("&")),o=n.length;ie&&(s.apply=this.history.slice(e+1,r+1))}}catch{}return this.refresh(s),this}onbeforeunload(t){let e=new Gn(this,null,this.location,{mode:"unload"});if(this.emit("beforechange",e),e.aborted)return!0}onhashchange(t){return this.emit("hashchange",this[te]=this[$t].location.hash),C()}setup(){this.onclick=this.onclick.bind(this),this.onhashchange=this.onhashchange.bind(this);let t=globalThis.window;return this[te]=this[$t].location.hash,this.location=yt.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[B]&&(r=s),s=s.parentNode;if(e&&r!=e&&(!r||r.contains(e))){let i=e.getAttribute("href");i&&!i.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[B]&&e[B].resolve();let r=e.getAttribute("href"),s=new URL(e.href),i=s.href.slice(s.origin.length),n=this.realpath.split("#")[0],o=i.split("#")[0];return n==o?globalThis.document.location.hash=s.hash:e[B]?e[B].go():this.go(i),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),i=s.length,n,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 cs(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 Uu(){if(So!=!0&&(So=!0,!0))return _s.on("inited",function(t){let e=t[xo];if(e){let r=t instanceof H,s=t[V]||(t[V]={});for(let i=0,n=Object.keys(e),o=n.length,h,u;i=0&&e.splice(r,1)}reportChanged(){return this.changed(0)}reportObserved(){return k.add(this)}};function vh(t){return new fs(null,null,null,t)}var Gu=class extends Array{push(){return U(this,super.push(...arguments))}pop(){return U(this,super.pop(...arguments))}unshift(){return U(this,super.unshift(...arguments))}shift(){return U(this,super.shift(...arguments))}splice(){return U(this,super.splice(...arguments))}at(){return $(this,super.at(...arguments))}map(){return $(this,super.map(...arguments))}flatMap(){return $(this,super.flatMap(...arguments))}flat(){return $(this,super.flat(...arguments))}filter(){return $(this,super.filter(...arguments))}find(){return $(this,super.find(...arguments))}slice(){return $(this,super.slice(...arguments))}sort(){return $(this,super.sort(...arguments))}get len(){return $(this,this.length)}set len(t){this.length=t,U(this)}toIterable(){return M&&k.add(this[V]),this}[Symbol.iterator](){return $(this,super[Symbol.iterator](...arguments))}},Oo=cs(Gu),Xu=class{get len(){return this.length}set len(t){this.length=t}get[ie](){return Lt(this,null,Oo)}[vt](t){return Lt(this,t,Oo)}[ne](t){return us(this,t)}};ns(Array.prototype,Xu.prototype);var Qu=class extends Set{has(){return $(this,super.has(...arguments))}keys(){return $(this,super.keys(...arguments))}values(){return $(this,super.values(...arguments))}entries(){return $(this,super.entries(...arguments))}add(){return U(this,super.add(...arguments))}clear(){return U(this,super.clear(...arguments))}delete(){return U(this,super.delete(...arguments))}},No=cs(Qu),Ju=class{get[ie](){return Lt(this,null,No)}[vt](t){return Lt(this,t,No)}[ne](t){return us(this,t)}};ns(Set.prototype,Ju.prototype);var Zu=class extends Map{get(){return $(this,super.get(...arguments))}has(){return $(this,super.has(...arguments))}keys(){return $(this,super.keys(...arguments))}values(){return $(this,super.values(...arguments))}entries(){return $(this,super.entries(...arguments))}set(){return U(this,super.set(...arguments))}clear(){return U(this,super.clear(...arguments))}delete(){return U(this,super.delete(...arguments))}},ko=cs(Zu),tc=class{get[ie](){return Lt(this,null,ko)}[vt](t){return Lt(this,t,ko)}[ne](t){return us(this,t)}};ns(Map.prototype,tc.prototype);var ec=class{constructor(t,e={}){var r=this,s;this.name=t,this.options=e;let i=this.key=Ge(t),n=as(t),o=r.descriptor={enumerable:(s=e.enumerable)!=null?s:!0,configurable:!1,get:function(){return M?To(this,t,i,r,n):this[i]},set:function(u){return M||!!this[n]?Eo(this,t,i,u,r,n):this[i]=u}},h=r.lazyDescriptor={enumerable:!1,configurable:!0,get:function(){return M?(Object.defineProperty(this,t,o),this[t]):this[i]},set:function(u){return this[i]=u,this[n]=null,Object.defineProperty(this,t,o)}}}},rc=class{constructor(t=null){this[bo](t)}[bo](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[V]||e[ie],M&&$(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)}},sc=class{constructor(t,e){var r=this;this.name=t,this.key=e,this.index=new rc;let s=as(t),i=r.descriptor={enumerable:!0,configurable:!1,get:function(){return M?To(this,t,e,r,s):this[e]},set:function(o){let h=this[e];if(M||!!this[s]?Eo(this,t,e,o,r,s):this[e]=o,h!=o&&(h&&r.index.delete(h,this),o))return r.index.add(o,this)}},n=r.lazyDescriptor={set:function(o){return this[e]=o,o&&r.index.add(o,this),Object.defineProperty(this,t,i),this[s]=null}}}where(t){return this.index.get(t)}},ds=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|=P.STALE|P.POSSIBLY_STALE,this.observer&&this.observer.invalidated(t,this),!!this.observers){for(let r=0,s=J(this.observers),i=s.length;r