You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
8 lines
118 KiB
8 lines
118 KiB
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;d<arguments.length;d++)f.push(arguments[d]);var v=h==="error",w=this._events;if(w!==void 0)v=v&&w.error===void 0;else if(!v)return!1;if(v){var T;if(f.length>0&&(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;d<ve;++d)s(Rl[d],this,f);return!0};function y(h,f,d,v){var w,T,O;if(p(d),T=h._events,T===void 0?(T=h._events=Object.create(null),h._eventsCount=0):(T.newListener!==void 0&&(h.emit("newListener",f,d.listener?d.listener:d),T=h._events),O=T[f]),O===void 0)O=T[f]=d,++h._eventsCount;else if(typeof O=="function"?O=T[f]=v?[d,O]:[O,d]:v?O.unshift(d):O.push(d),w=u(h),w>0&&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<w.length;++v)T=w[v],T!=="removeListener"&&this.removeAllListeners(T);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(f=d[h],typeof f=="function")this.removeListener(h,f);else if(f!==void 0)for(v=f.length-1;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<f;++v)d[v]=h[v];return d}function g(h,f){for(;f+1<h.length;f++)h[f]=h[f+1];h.pop()}function x(h){for(var f=new Array(h.length),d=0;d<f.length;++d)f[d]=h[d].listener||h[d];return f}function E(h,f){return new Promise(function(d,v){function w(){T!==void 0&&h.removeListener("error",T),d([].slice.call(arguments))}var T;f!=="error"&&(T=function(O){h.removeListener(f,w),v(O)},h.once("error",T)),h.once(f,w)})}}),be=Symbol.for("#__listeners__"),eh=/-./g,ys=class{static for(t){return new Proxy({},new this(t))}constructor(t){this.getter=t}get target(){return this.getter()}get(t,e){return this.target[e]}set(t,e,r){return this.target[e]=r,!0}};function vs(t,e={}){return new Proxy(e,new ys(t))}function It(t){let e=typeof t;if(e=="number")return t;if(e=="string"){if(/^\d+fps$/.test(t))return 1e3/parseFloat(t);if(/^([-+]?[\d\.]+)s$/.test(t))return parseFloat(t)*1e3;if(/^([-+]?[\d\.]+)ms$/.test(t))return parseFloat(t)}return null}function Mo(t){return t.indexOf("-")>=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;n<o;n++){let l=i[n];typeof l=="string"&&this.listeners[l]?e.listeners[l].forEach(function(a){if(a.tick instanceof Function)return a.tick(e,l);if(a instanceof Function)return a(e,l)}):l instanceof Function?l(e.dt,e):l.tick&&l.tick(e.dt,e)}return this[xt]=this[wt]?0:-1,e.$promise&&(e.$resolve(e),e.$promise=e.$resolve=null),e.listeners.raf&&e.add("raf"),e}[Ws](){return this[wt]||(this[wt]=!0,this[xt]==-1&&(this[xt]=0),nh(this[Xs])),this}schedule(t,e){var r,s;return e||(e=t[r=this.id]||(t[r]={value:!0})),(e[s=this.id]||(e[s]=new ih({owner:this,target:t}))).update(e,!0)}unschedule(t,e={}){e||(e=t[this.id]);let r=e&&e[this.id];return r&&r.active&&r.deactivate(),this}},F=new bs;function L(){return F.add("commit").promise}function Ss(t,e){return globalThis.setTimeout(function(){t(),L()},e)}function _s(t,e){return globalThis.setInterval(function(){t(),L()},e)}var xs=globalThis.clearInterval,ws=globalThis.clearTimeout,At=globalThis.imba||(globalThis.imba={});At.commit=L,At.setTimeout=Ss,At.setInterval=_s,At.clearInterval=xs,At.clearTimeout=ws;var Ts={on:function(t,e){return Z(this,t,e)},inited:function(t){return tt(this,"inited",[t])}};function Fo(){return!0}function Ao(t,e,r){if(r.get){let s=r.get;r.get=function(){let n=s.call(this);return Object.defineProperty(this,e,{enumerable:!1,value:n}),n}}return r}function Do(){return console.warn("imba.serve is not available on the client")}var Ro=new class{},Js=Symbol.for("#toStringDeopt"),Qs=Symbol.for("#symbols"),Zs=Symbol.for("#batches"),tn=Symbol.for("#extras"),en=Symbol.for("#stacks"),rn=class{constructor(t){this.dom=t,this.string=""}contains(t){return this.dom.classList.contains(t)}add(t){return this.contains(t)?this:(this.string+=(this.string?" ":"")+t,this.dom.classList.add(t),this)}remove(t){if(!this.contains(t))return this;let e=new RegExp("(^|\\s)"+t+"(?=\\s|$)","g");return this.string=this.string.replace(e,""),this.dom.classList.remove(t),this}toggle(t,e){return e===void 0&&(e=!this.contains(t)),e?this.add(t):this.remove(t)}incr(t,e=0){var r=this;let s=this.stacks,n=s[t]||0;return n<1&&this.add(t),e>0&&setTimeout(function(){return r.decr(t)},e),s[t]=Math.max(n,0)+1}decr(t){let e=this.stacks,r=e[t]||0;return r==1&&this.remove(t),e[t]=Math.max(r,1)-1}reconcile(t,e){let r=this[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<n;r++)i=s[r],o=e[i],this.setAttribute(i,o);this.innerHTML=t.content}}}};Dt(SVGSVGElement.prototype,Nh.prototype);function Xo(t,e,r,s,n){let i=globalThis.document.createElementNS("http://www.w3.org/2000/svg",t);return r&&(i.className.baseVal=r),e&&e[Vt]&&e[Vt](i),s&&(i.textContent=s),i}function _t(t){return globalThis.document.createComment(t)}function sr(t){return globalThis.document.createTextNode(t)}function Jo(){return globalThis.document.createDocumentFragment()}var Ne=globalThis.navigator,Oh=Ne&&Ne.vendor||"",Nn=Ne&&Ne.userAgent||"",kh=Oh.indexOf("Apple")>-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<l;i++){let a=o[i],p=Object.getOwnPropertyDescriptors(a);Object.assign(r,p)}On.set(e,r)}return r}function Ms(t,e,r,s,n){let i;typeof t!="string"&&t&&t.nodeName&&(t=t.nodeName);let o=gr[t]||t;if(mr[t]){let l=mr[t],a=l.prototype[Et];if(a&&Oe)i=globalThis.document.createElement(a,{is:t});else if(l.create$&&a){i=globalThis.document.createElement(a),i.setAttribute("is",o);let p=Ph(i,l);Object.defineProperties(i,p),i.__slots={},i.appendChild(globalThis.document.createElement("i-hook"))}else l.create$?(i=l.create$(i),i.__slots={}):console.warn("could not create tag "+t)}else i=globalThis.document.createElement(gr[t]||t);return i[gn]=e,i[we](),i[hn](),s!==null&&i[bh]("__").text$(s),(r||i.flags$ns)&&i.flag$(r||""),i}function Qo(t,e,r,s){if(t==null||t==null)return _t("");if(t instanceof G||t[bn])return t;if(typeof t=="string"||t&&t.prototype instanceof G)return Ms(t,e,r,s)}function Fs(t,e){if(fe[t])return fe[t];if(window[e])return window[e];if(window[t])return window[t]}function Zo(t,e,r){let s=Fs(t,e);if(!(s==r||s.prototype instanceof r||s.prototype[Et])){let n=s.prototype[_n];if(!n){n=class extends s{static[we](){return this.prototype[pn]=wn,this}constructor(){super(...arguments),this.__slots={},this.__F=0,this[pn]===wn&&this[mn]&&this[mn]()}}[we](),s.prototype[_n]=n;let i=Object.getOwnPropertyDescriptors(r.prototype);Object.defineProperties(n.prototype,i),n.prototype[Et]=t}return n}return s}function tl(t,e,r={}){fe[t]=js[t]=e,e.nodeName=t;let s=t,n=e.prototype;if(t.indexOf("-")==-1&&(s=""+t+"-tag",gr[t]=s),r.cssns){let i=(n._ns_||n[xn]||"")+" "+(r.cssns||"");n._ns_=i.trim()+" ",n[xn]=r.cssns}if(r.cssid){let i=(n.flags$ns||"")+" "+r.cssid;n[Sh]=r.cssid,n.flags$ns=i.trim()+" "}return n[Et]&&!r.extends&&(r.extends=n[Et]),r.extends?(n[Et]=r.extends,mr[t]=e,Oe&&window.customElements.define(s,e,{extends:r.extends})):window.customElements.define(s,e),e}var Lh=globalThis.imba||(globalThis.imba={});Lh.document=globalThis.document;function yr(t){let e;return t?(e=t.toIterable)?e.call(t):t:[]}function Ch(t,e){let r=Object.getOwnPropertyDescriptors(e);return delete r.constructor,Object.defineProperties(t,r),t}var ke=Symbol.for("#parent"),kn=Symbol.for("#closestNode"),Ih=Symbol.for("#isRichElement"),jh=Symbol.for("#afterVisit"),$n=Symbol.for("#__initor__"),Pn=Symbol.for("#__inited__"),Ln=Symbol.for("#appendChild"),Cn=Symbol.for("#removeChild"),In=Symbol.for("#replaceChild"),st=Symbol.for("#insertInto"),$e=Symbol.for("#replaceWith"),jn=Symbol.for("#insertChild"),Pe=Symbol.for("#removeFrom"),Mn=Symbol.for("#placeChild"),Fn=Symbol.for("#__init__"),Mh=Symbol.for("#registerFunctionalSlot"),Fh=Symbol.for("#getFunctionalSlot"),An=Symbol.for("#getSlot"),vr=Symbol.for("##parent"),lt=Symbol.for("##up"),Dn=Symbol.for("##flags"),Ah=Symbol.for("#domFlags"),K=Symbol.for("#end"),Rn=Symbol.for("#textContent"),Le=Symbol.for("#textNode"),br=Symbol.for("#functionalSlots"),Vn=Symbol();function el(){return!0}var Ft=class{constructor(){this.childNodes=[]}log(...t){}hasChildNodes(){return!1}set[ke](t){this[vr]=t}get[ke](){return this[vr]||this[lt]}get[kn](){return this[ke][kn]}get[Ih](){return!0}get flags(){return this[Dn]||(this[Dn]=new rn(this))}flagSync$(){return this}[jh](){return this}},Dh=0,Sr=class extends Ft{static[Fn](){return this.prototype[$n]=Vn,this}constructor(t,e){super(...arguments),this[lt]=e,this.parentNode=null,this[Ah]=t,this.childNodes=[],this[K]=_t("slot"+Dh++),e&&e[Ln](this),this[$n]===Vn&&this[Pn]&&this[Pn]()}get[ke](){return this[vr]||this.parentNode||this[lt]}set textContent(t){this[Rn]=t}get textContent(){return this[Rn]}hasChildNodes(){for(let t=0,e=yr(this.childNodes),r=e.length;t<r;t++){let s=e[t];if(s instanceof Ft&&s.hasChildNodes()||!(s instanceof ue)&&s instanceof G)return!0}return!1}text$(t){return this[Le]?this[Le].textContent=t:this[Le]=this[Mn](t),this[Le]}appendChild(t){return this.parentNode&&t[st](this.parentNode,this[K]),this.childNodes.push(t)}[Ln](t){var e;return this.parentNode?t[st](this.parentNode,this[K]):t[lt]==null?t[lt]=this[lt]||this:t[lt],this.childNodes.push(t)}insertBefore(t,e){this.parentNode&&this.parentNode[jn](t,e);let r=this.childNodes.indexOf(e);return r>=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<i;s++)n[s][st](t,e)}return this}[$e](t,e){let r=t[st](e,this[K]);return this[Pe](e),r}[jn](t,e){if(this.parentNode&&this.insertBefore(t,e||this[K]),e){let r=this.childNodes.indexOf(e);r>=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;e<s;e++)r[e][Pe](t);return this[K]&&this[K][Pe](t),this.parentNode=null,this}[Mn](t,e,r){let s=this.parentNode,n=typeof t;if(n==="undefined"||t===null){if(r&&r instanceof ue)return r;let i=_t("");if(r){let o=this.childNodes.indexOf(r);return this.childNodes.splice(o,1,i),s&&r[$e](i,s),i}return this.childNodes.push(i),s&&i[st](s,this[K]),i}if(t===r)return t;if(n!=="object"){let i,o=t;if(r){if(r instanceof tr)return r.textContent=o,r;{i=sr(o);let l=this.childNodes.indexOf(r);return this.childNodes.splice(l,1,i),s&&r[$e](i,s),i}}else return this.childNodes.push(i=sr(o)),s&&i[st](s,this[K]),i}else if(r){let i=this.childNodes.indexOf(r);return this.childNodes.splice(i,1,t),s&&r[$e](t,s),t}else return this.childNodes.push(t),s&&t[st](s,this[K]),t}};Sr[Fn]();function rl(t,e){return new Sr(t,e)}function pe(t,e){let r=new Sr(t,null);return r[lt]=e,r}var Rh=class{[Mh](t){let e=this[br]||(this[br]={});return e[t]||(e[t]=pe(0,this))}[Fh](t,e){let r=this[br];return r&&r[t]||this[An](t,e)}[An](t,e){var r;return t=="__"&&!this.render?this:(r=this.__slots)[t]||(r[t]=pe(0,this))}};Ch(G.prototype,Rh.prototype);function Vh(t){let e;return t?(e=t.toIterable)?e.call(t):t:[]}var zh=Symbol.for("#afterVisit"),Ce=Symbol.for("#insertInto"),zn=Symbol.for("#appendChild"),qh=Symbol.for("#replaceWith"),_r=Symbol.for("#removeFrom"),qn=Symbol.for("#__initor__"),Kn=Symbol.for("#__inited__"),Un=Symbol.for("#__init__"),Kh=Symbol.for("#domFlags"),Uh=Symbol.for("##parent"),ht=Symbol.for("#end"),Bh=Symbol.for("#removeChild"),Hh=Symbol.for("#insertChild"),Bn=Symbol(),Hn=class extends Ft{static[Un](){return this.prototype[qn]=Bn,this}constructor(t,e){super(...arguments),this[Kh]=t,this[Uh]=e,t&256||(this[ht]=_t("list")),this.$=this.childNodes,this.length=0,e&&e[zn](this),this[qn]===Bn&&this[Kn]&&this[Kn]()}hasChildNodes(){return this.length!=0}[zh](t){let e=this.length;if(this.length=t,e==t)return;let r=this.parentNode;if(!r)return;let s=this.childNodes,n=this[ht];if(e>t)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;r<n;r++){let i=s[r];if(r==this.length)break;i[Ce](t,e)}return this}[zn](t){}[qh](t,e){let r=t[Ce](e,this[ht]);return this[_r](e),r}[_r](t){let e=this.length;for(;e>0;)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;s<i;s++)n[s][je](t,e);this[at]&&this[at][je](t,e)}return this}[wr](t){for(let e=0,r=Gn(this.array),s=r.length;e<s;e++){let n=r[e];t[Qn](n)}return this[at]&&t[Qn](this[at]),this.parentNode=null}[Yh](t){var e=this;if(!(this[Me]&1)){this[Me]|=1;return}if(this.dirty&&(e.changes.forEach(function(r,s){if(r==-1)return e.removeChild(s)}),e.changes.clear(),e.dirty=!1),e.array.length>t)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;n<o;n++){let l=i[n];s.indexOf(l)==-1&&kr(e,l)}for(let n=0,i=qt(s),o=i.length;n<o;n++){let l=i[n];(!r||r.indexOf(l)==-1)&&Or(e,l)}}else this.data=s[0];return L(),this}getRichValue(){var t;if(this.$$value)return this.$$value;t=[];for(let e=0,r=qt(this.selectedOptions),s=r.length;e<s;e++){let n=r[e];t.push(n.richValue)}return this.$$value=t}syncValue(){let t=this.data;if(this.multiple){let e=[];for(let r=0,s=qt(this.options),n=s.length;r<n;r++){let i=s[r],o=i.richValue,l=Nr(t,o);i.selected=l,l&&e.push(o)}this.$$value=e}else for(let e=0,r=qt(this.options),s=r.length;e<s;e++){let n=r[e].richValue;if(n==t){this.$$value=[n],this.selectedIndex=e;break}}}[Ut](){if(this.syncValue(),this[ut])return this[ut]=null}};kt($s.prototype,ca.prototype);var fa=class{setRichValue(t){return this.$$value=t,this.value=t}getRichValue(){return this.$$value!==void 0?this.$$value:this.value}};kt(Is.prototype,fa.prototype);var da=class{setRichValue(t){return this.$$value=t,this.value=t}getRichValue(){return this.$$value!==void 0?this.$$value:this.value}[Bt](t){return this.data=this.value,L()}[Ut](){let t=this.data;if(t==null&&(t=""),this[Ht]&&this.value!=t&&(this.value=t),this[ut])return this[ut]=null}};kt(Ls.prototype,da.prototype);var pa=class{[Bt](t){let e=this.type;if(!(e=="checkbox"||e=="radio")&&!(e=="number"&&Number.isNaN(this.valueAsNumber)))return this.$$value=void 0,this.data=this.richValue,L()}[Kt](t){let e=this.data,r=this.richValue;if(this.type=="checkbox"||this.type=="radio"){let s=this.checked;Er(e)?s?Or(e,r):kr(e,r):this.data=s?r:!1}return L()}setRichValue(t){this.$$value!==t&&(this.$$value=t,this.value!==t&&(this.value=t))}getRichValue(){if(this.$$value!==void 0)return this.$$value;let t=this.value,e=this.type;if(e=="range"||e=="number"){let r=this.valueAsNumber;Number.isNaN(r)&&(r=Number(t.replace(/\,/,".")+0)),Number.isNaN(r)&&(r=null),t=r}else e=="checkbox"&&(t==null||t==="on")&&(t=!0);return t}[Ut](){if(this[Ht]){let t=this.type;if(t=="checkbox"||t=="radio"){let e=this.data;e===!0||e===!1||e==null?this.checked=!!e:this.checked=Nr(e,this.richValue)}else this.richValue=this.data}this[ut]&&(this[ut]=null)}};kt(Ps.prototype,pa.prototype);var ma=class{get checked(){return this.$checked}set checked(t){t!=this.$checked&&(this.$checked=t,this.flags.toggle("checked",!!t))}setRichValue(t){return this.$$value=t,this.value=t}getRichValue(){return this.$$value!==void 0?this.$$value:this.value}[Ae](t){let e=this.data,r=this.checked,s=this.richValue;return Er(e)?r?kr(e,s):Or(e,s):this.$$value==null?this.data=!r:this.data=r?null:s,this[Ut](),L()}[Ut](){if(this[Ht]){let t=this.data,e=this.$$value==null?!0:this.$$value;Er(t)?this.checked=Nr(t,e):this.checked=t==e}this[ut]&&(this[ut]=null)}};kt(Cs.prototype,ma.prototype);function ui(t){let e;return t?(e=t.toIterable)?e.call(t):t:[]}var ga=Symbol.for("#getSlot"),ya=Symbol.for("#container"),va=Symbol.for("#afterVisit"),yt=Symbol.for("#__init__"),ci=Symbol.for("#__initor__"),fi=Symbol.for("#__inited__"),De=Symbol.for("#listeners"),Y=Symbol.for("#slot"),ba=Symbol.for("#parent"),R=Symbol.for("##container"),$r=Symbol.for("#domTarget"),di=Symbol.for("#insertInto"),Sa=Symbol.for("#removeFrom"),_a=Symbol.for("#teleport"),xa=Symbol.for("#self"),wa=Symbol.for("#target"),pi=Symbol(),Pr=class extends me{static[yt](){return this.prototype[ci]=pi,this}constructor(){super(...arguments),super[yt]||this[yt](),this[ci]===pi&&this[fi]&&this[fi]()}[yt](t=null){super[yt]&&super[yt](...arguments),this.to=t?t.to:void 0}build(){return this[De]=[],this.win=globalThis,this.doc=globalThis.document}setup(){return this.setAttribute("style","display:none !important;")}[ga](t,e){return this[Y]||(this[Y]=pe(0,this[ba])),this[Y]}get[ya](){if(!this[R]){let t=this.className;this[R]=this.doc.createElement("div"),this[R].className=t,this[R].style.cssText="display:contents !important;"}return this[R]}get domTarget(){return this[$r]||(this[$r]=this.to instanceof N?this.to:this.closest(this.to)||this.doc.querySelector(this.to))}get eventTarget(){return this.domTarget}get style(){return this[R]?this[R].style:super.style}get classList(){return this[R]?this[R].classList:super.classList}get className(){return this[R]?this[R].className:super.className}set className(t){this[R]?this[R].className=t:super.className=t}[va](){if(this.mounted\u03A6&&this[Y]&&!this[Y].parentNode)return this[Y][di](this.target)}mount(){for(let e=0,r=ui(this[De]),s=r.length;e<s;e++){let[n,i,o]=r[e];this.eventTarget.addEventListener(n,i,o)}let t=this.domTarget;return this[Y]&&this[Y][di](t),this}unmount(){for(let t=0,e=ui(this[De]),r=e.length;t<r;t++){let[s,n,i]=e[t];this.eventTarget.removeEventListener(s,n,i)}return this[Y]&&this[Y][Sa](this.domTarget),this[$r]=null,this}addEventListener(t,e,r={}){var s;if(e[_a]=this,e[xa]=this,this[De].push([t,e,r]),this.mounted\u03A6&&((s=this.eventTarget)==null?void 0:s.addEventListener))return this.eventTarget.addEventListener(t,e,r)}};Pr[yt]();var Ta=class extends Pr{get domTarget(){return this.doc.body}get eventTarget(){return this.win}addEventListener(t,e,r={}){return e[wa]=this.domTarget.parentNode,super.addEventListener(...arguments)}on$resize(t,e,r,s){return this.addEventListener("resize",r,s),r}};globalThis.customElements&&(globalThis.customElements.define("i-teleport",Pr),globalThis.customElements.define("i-global",Ta));function cl(){return!0}function ct(t){let e;return t?(e=t.toIterable)?e.call(t):t:[]}function Ea(t,e){let r=Object.getOwnPropertyDescriptors(e);return delete r.constructor,Object.defineProperties(t,r),t}var nt=Symbol.for("#__init__"),Re=Symbol.for("#__initor__"),Ve=Symbol.for("#__inited__"),Lr=Symbol.for("#insertInto"),Cr=Symbol.for("#removeFrom"),Na=Symbol.for("#all"),Gt=Symbol.for("#phase"),it=Symbol.for("#nodes"),Oa=Symbol.for("#sizes"),mi=Symbol.for("#mode"),gi=Symbol.for("#enabled"),ka=Symbol.for("#easer"),yi=Symbol.for("#anims"),Ir=Symbol.for("#_easer_"),vi=Symbol(),bi=Symbol(),Si=class extends Ze{static[nt](){return this.prototype[Re]=vi,this}constructor(){super(...arguments),super[nt]||this[nt](),this[Re]===vi&&this[Ve]&&this[Ve]()}[nt](t=null){var e;super[nt]&&super[nt](...arguments),this.selectors=t&&(e=t.selectors)!==void 0?e:{}}addSelectors(t,e){var r;return((r=this.selectors)[e]||(r[e]=[])).push(...t),!0}getSelectors(...t){let e=[];for(let r=0,s=ct(t),n=s.length;r<n;r++){let i=s[r];this.selectors[i]&&e.push(...this.selectors[i])}return e&&e.length?e.join(","):null}nodesForBase(t,e="transition"){let r=[t],s=(this.selectors[e]||[]).join(",");if(s=="")return r;let n=t.querySelectorAll(s);for(let i=0,o=ct(n),l=o.length;i<l;i++){let a=o[i];a.closest("._ease_")==t&&r.push(a)}return r[Na]=n,r}nodesWithSize(t,e="in"){let r=this.getSelectors("_off_sized","_"+e+"_sized");return r?t.filter(function(s){return s.matches(r)}):[]}};Si[nt]();var ge=new Si,$a=globalThis.imba||(globalThis.imba={});$a.transitions=ge;var nr=class extends Ze{static[nt](){return this.prototype[Re]=bi,this}constructor(t){super(),this.dom=t,this[Gt]=null,this[it]=[],this[Oa]=new Map,this[Re]===bi&&this[Ve]&&this[Ve]()}log(...t){}get flags(){return this.dom.flags}flag(t){for(let e=0,r=ct(this[it]),s=r.length;e<s;e++)r[e].flags.add(t);return this}unflag(t){for(let e=0,r=ct(this[it]),s=r.length;e<s;e++)r[e].flags.remove(t);return this}commit(){return this.dom.offsetWidth}enable(t){return t&&(this[mi]=t),this[gi]!=!0&&(this[gi]=!0,!0)?(this.dom[Lr]=this[Lr].bind(this),this.dom[Cr]=this[Cr].bind(this),this.flags.add("_ease_")):this}disable(){return this.flags.remove("_ease_"),!0}set phase(t){var e,r,s,n,i,o,l,a,p,u,y,b;let _=this[Gt];this[Gt]!=t&&(this[Gt]=t,!0)&&(_&&this.unflag("@"+_),t&&this.flag("@"+t),t||(this.unflag("@out"),this.unflag("@in"),this.unflag("@off"),this[it]=null),t=="enter"&&_=="leave"&&((r=(e=this.dom)==null?void 0:e.transition\u039Eout\u039Ecancel)==null||r.call(e,this)),t=="leave"&&_=="enter"&&((n=(s=this.dom)==null?void 0:s.transition\u039Ein\u039Ecancel)==null||n.call(s,this)),t=="enter"&&((o=(i=this.dom)==null?void 0:i.transition\u039Ein)==null||o.call(i,this)),t=="leave"&&((a=(l=this.dom)==null?void 0:l.transition\u039Eout)==null||a.call(l,this)),_=="leave"&&!t&&((u=(p=this.dom)==null?void 0:p.transition\u039Eout\u039Eend)==null||u.call(p,this)),_=="enter"&&!t&&((b=(y=this.dom)==null?void 0:y.transition\u039Ein\u039Eend)==null||b.call(y,this)))}get phase(){return this[Gt]}get leaving\u03A6(){return this.phase=="leave"}get entering\u03A6(){return this.phase=="enter"}get idle\u03A6(){return this.phase==null}track(t){var e=this;let r={before:de().getAnimations()};return this.commit(),t(),this.commit(),r.after=de().getAnimations(),r.fresh=r.after.filter(function(s){return r.before.indexOf(s)==-1}),r.deep=r.fresh.filter(function(s){let n;return!!((n=s.effect.target)&&n.closest("._ease_")!=e.dom)}),r.own=r.fresh.filter(function(s){return r.deep.indexOf(s)==-1}),r.own.length?r.finished=new Promise(function(s){let n=new Set(r.own),i=function(){if(n.delete(this),n.size==0)return s()};for(let o=0,l=ct(r.own),a=l.length;o<a;o++){let p=l[o];p[ka]=e,p.addEventListener("finish",i,{once:!0}),p.addEventListener("cancel",i,{once:!0})}}):r.finished=Promise.resolve(!0),r}getAnimatedNodes(){return ge.nodesForBase(this.dom)}getNodeSizes(t="in",e=this[it]){let r=ge.nodesWithSize(e,t),s=new Map;for(let n=0,i=ct(r),o=i.length;n<o;n++){let l=i[n],a=window.getComputedStyle(l);s.set(l,{width:a.width,height:a.height})}return s}applyNodeSizes(t){for(let[e,r]of ct(t))e.style.width=r.width,e.style.height=r.height;return t}clearNodeSizes(t){if(t){for(let[e,r]of ct(t))e.style.removeProperty("width"),e.style.removeProperty("height");return t}}[Lr](t,e){var r,s,n=this;let i;if(this.entering\u03A6)return this.dom;let o=function(){if(i&&n.clearNodeSizes(i),n.entering\u03A6)return n.phase=null};if(n.leaving\u03A6)return n.track(function(){return n.phase="enter",n.unflag("@off"),n.unflag("@out")}).finished.then(o,function(a){return n.log("error cancel leave",a)}),n.dom;let l=de().contains(t);return e?t.insertBefore(n.dom,e):t.appendChild(n.dom),this[it]=n.getAnimatedNodes(),n.flag("_instant_"),n.unflag("@out"),n.commit(),i=this[it].sized=n.getNodeSizes("in"),(s=(r=n.dom)==null?void 0:r.transition\u039Ein\u039Einit)==null||s.call(r,n),n.flag("@off"),n.flag("@in"),n.flag("@enter"),n.commit(),n.unflag("_instant_"),(this[yi]=n.track(function(){return n.phase="enter",n.applyNodeSizes(i),n.unflag("@off"),n.unflag("@in")})).finished.then(o,function(a){return n.clearNodeSizes(i),n.log("cancelled insert into",a)}),n.dom}[Cr](t){var e=this;if(this.leaving\u03A6)return;let r,s=function(){if(e.phase=="leave")return e.dom.emit("easeoutend",{}),t.removeChild(e.dom),e.phase=null};if(e.entering\u03A6&&this[mi]!="forward"){let i=e.track(function(){return e.flag("@off"),e.flag("@in"),e.unflag("@out"),e.phase="leave",e.clearNodeSizes(e[it].sized)});e.log("cancel enter anims own",i.own,i),i.finished.then(s,function(o){return e.log("error cancel entering",o)});return}this[it]=e.getAnimatedNodes(),r=e.getNodeSizes("out"),e.applyNodeSizes(r),e.flag("@leave");let n=this[yi]=e.track(function(){return e.phase="leave",e.flag("@off"),e.flag("@out"),e.clearNodeSizes(r)});if(!n.own.length){s();return}n.finished.then(s,function(){return!0})}};nr[nt]();var Pa=class{transition\u039Ein\u039Einit(t){return!0}transition\u039Ein(t){return!0}transition\u039Ein\u039Eend(t){return!0}transition\u039Ein\u039Ecancel(t){return!0}transition\u039Eout(t){return!0}transition\u039Eout\u039Eend(t){return!0}transition\u039Eout\u039Ecancel(t){return!0}get ease(){return this[Ir]||(this[Ir]=new nr(this))}set ease(t){var e,r;if(t==!1){(r=(e=this[Ir])==null?void 0:e.disable)==null||r.call(e);return}this.ease.enable(t)}};Ea(N.prototype,Pa.prototype);function fl(){return!0}function La(t,e){let r=Object.getOwnPropertyDescriptors(e);return delete r.constructor,Object.defineProperties(t,r),t}function Vs(){return!0}var Ca=class{\u03B1esc(){return this.keyCode==27}\u03B1tab(){return this.keyCode==9}\u03B1enter(){return this.keyCode==13}\u03B1space(){return this.keyCode==32}\u03B1up(){return this.keyCode==38}\u03B1down(){return this.keyCode==40}\u03B1left(){return this.keyCode==37}\u03B1right(){return this.keyCode==39}\u03B1del(){return this.keyCode==8||this.keyCode==46}\u03B1key(t){if(typeof t=="string")return this.key==t;if(typeof t=="number")return this.keyCode==t}};La(ks.prototype,Ca.prototype);function Ia(t,e){let r=Object.getOwnPropertyDescriptors(e);return delete r.constructor,Object.defineProperties(t,r),t}function ir(){return!0}var ja=class{\u03B1left(){return this.button==0}\u03B1middle(){return this.button==1}\u03B1right(){return this.button==2}\u03B1shift(){return!!this.shiftKey}\u03B1alt(){return!!this.altKey}\u03B1ctrl(){return!!this.ctrlKey}\u03B1meta(){return!!this.metaKey}\u03B1mod(){let t=globalThis.navigator.platform;return/^(Mac|iPhone|iPad|iPod)/.test(t||"")?!!this.metaKey:!!this.ctrlKey}};Ia(Ns.prototype,ja.prototype);function jr(t,e){let r=Object.getOwnPropertyDescriptors(e);return delete r.constructor,Object.defineProperties(t,r),t}function _i(t){let e;return t?(e=t.toIterable)?e.call(t):t:[]}var Ma=Symbol.for("#extendType"),Fa=Symbol.for("#modifierState"),ze=Symbol.for("#sharedModifierState"),xi=Symbol.for("#onceHandlerEnd"),wi=Symbol.for("#extendDescriptors"),V=Symbol.for("#context"),Ti=Symbol.for("#self"),Aa=Symbol.for("#target"),Ei=Symbol.for("#stopPropagation"),Ni=Symbol.for("#defaultPrevented"),Da=Symbol.for("#teleport");Vs(),ir();var Ra=class{[Ma](t){var e,r,s;let n=t[wi]||(t[wi]=(r=Object.getOwnPropertyDescriptors(t.prototype),s=r.constructor,delete r.constructor,r));return Object.defineProperties(this,n)}};jr(A.prototype,Ra.prototype);var Va=class{get[Fa](){var t,e;return(t=this[V])[e=this[V].step]||(t[e]={})}get[ze](){var t,e;return(t=this[V].handler)[e=this[V].step]||(t[e]={})}[xi](t){return q(this[V],"end",t)}\u03B1sel(t){return!!this.target.matches(String(t))}\u03B1closest(t){return!!this.target.closest(String(t))}\u03B1log(...t){return console.info(...t),!0}\u03B1trusted(){return!!this.isTrusted}\u03B1if(t){return!!t}\u03B1wait(t=250){return new Promise(function(e){return setTimeout(e,It(t))})}\u03B1self(){return this.target==this[V].element}\u03B1cooldown(t=250){let e=this[ze];return e.active?!1:(e.active=!0,e.target=this[V].element,e.target.flags.incr("cooldown"),this[xi](function(){return setTimeout(function(){return e.target.flags.decr("cooldown"),e.active=!1},It(t))}),!0)}\u03B1throttle(t=250){let e=this[ze];return e.active?(e.next&&e.next(!1),new Promise(function(r){return e.next=function(s){return e.next=null,r(s)}})):(e.active=!0,e.el||(e.el=this[V].element),e.el.flags.incr("throttled"),q(this[V],"end",function(){let r=It(t);return e.interval=setInterval(function(){e.next?e.next(!0):(clearInterval(e.interval),e.el.flags.decr("throttled"),e.active=!1)},r)}),!0)}\u03B1debounce(t=250){let e=this[ze],r=this;return e.queue||(e.queue=[]),e.queue.push(e.last=r),new Promise(function(s){return setTimeout(function(){return e.last==r?(r.debounced=e.queue,e.last=null,e.queue=[],s(!0)):s(!1)},It(t))})}\u03B1flag(t,e){let{element:r,step:s,state:n,id:i,current:o}=this[V],l=e instanceof N?e:e?r.closest(e):r;if(!l)return!0;this[V].commit=!0,n[s]=i,l.flags.incr(t);let a=Date.now();return q(o,"end",function(){let p=Date.now()-a,u=Math.max(250-p,0);return setTimeout(function(){return l.flags.decr(t)},u)}),!0}\u03B1busy(t){return this.\u03B1flag("busy",t)}\u03B1outside(){let{handler:t}=this[V];if(t&&t[Ti])return!t[Ti].parentNode.contains(this.target)}};jr(et.prototype,Va.prototype);var dl={};function pl(){return!0}var zs=class{constructor(t,e){this.params=t,this.closure=e}getHandlerForMethod(t,e){return t?t[e]?t:this.getHandlerForMethod(t.parentNode,e):null}emit(t,...e){return 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)}get passive\u03A6(){return this.params.passive}get capture\u03A6(){return this.params.capture}get silent\u03A6(){return this.params.silent}get global\u03A6(){return this.params.global}async handleEvent(t){let e=this[Aa]||t.currentTarget,r=this.params,s=null,n=r.silence||r.silent;this.count||(this.count=0),this.state||(this.state={});let i={element:e,event:t,modifiers:r,handler:this,id:++this.count,step:-1,state:this.state,commit:null,current:null};if(i.current=i,t.handle$mod&&t.handle$mod.apply(i,r.options||[])==!1)return;let o=et[this.type+"$handle"]||et[t.type+"$handle"]||t.handle$mod||this.guard;if(!(o&&o.apply(i,r.options||[])==!1)){this.currentEvents||(this.currentEvents=new Set),this.currentEvents.add(t);for(let l=0,a=Object.keys(r),p=a.length,u,y;l<p;l++){if(u=a[l],y=r[u],i.step++,u[0]=="_")continue;u.indexOf("~")>0&&(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;E<f;E++){let d=h[E];if(typeof d=="string"&&d[0]=="~"&&d[1]=="$"){let v=d.slice(2).split("."),w=i[v.shift()]||t;for(let T=0,O=_i(v),D=O.length;T<D;T++){let ve=O[T];w=w?w[ve]:void 0}_[E]=w}}}if(typeof u=="string"&&(S=u.match(/^(emit|flag|mod|moved|pin|fit|refit|map|remap|css)-(.+)$/))&&(b||(b=_=[]),_.unshift(S[2]),u=S[1]),u=="trap")t[Ei]=!0,t.stopImmediatePropagation(),t[Ni]=!0,t.preventDefault();else if(u=="stop")t[Ei]=!0,t.stopImmediatePropagation();else if(u=="prevent")t[Ni]=!0,t.preventDefault();else if(u=="commit")i.commit=!0;else if(u=="once")e.removeEventListener(t.type,this);else{if(u=="options"||u=="silence"||u=="silent")continue;if(u=="emit"){let E=_[0],h=_[1],f=new A(E,{bubbles:!0,detail:h});f.originalEvent=t;let d=(this[Da]||e).dispatchEvent(f)}else if(typeof u=="string"){u[0]=="!"&&(g=!0,u=u.slice(1));let E="\u03B1"+u,h=t[E];h||(h=this.type&&et[this.type+"$"+u+"$mod"]),h||(h=t[u+"$mod"]||et[t.type+"$"+u]||et[u+"$mod"]),h instanceof Function?(u=h,m=i,_=b||[],t[E]&&(m=t,t[V]=i)):u[0]=="_"?(u=u.slice(1),m=this.closure):m=this.getHandlerForMethod(e,u)}}try{u instanceof Function?c=u.apply(m||e,_):m&&(c=m[u].apply(m,_)),c&&c.then instanceof Function&&c!=F.$promise&&(i.commit&&!n&&F.commit(),c=await c)}catch(E){s=E;break}if(g&&c===!0||!g&&c===!1)break;i.value=c}if(tt(i,"end",i),i.commit&&!n&&F.commit(),this.currentEvents.delete(t),this.currentEvents.size==0&&this.emit("idle"),s!=null){if(this.type!="error"){let l=s instanceof Error?s.message:s,a=new A("error",{detail:l,bubbles:!0,cancelable:!0});a.error=s,a.originalEvent=t;let p=e.dispatchEvent(a);if(a.defaultPrevented)return}throw s}}}},za=class{on$(t,e,r){let s="on$"+t,n;n=new zs(e,r);let i=e.capture||!1,o=e.passive,l=i;return o&&(l={passive:o,capture:i}),this[s]instanceof Function?n=this[s](e,r,n,l):this.addEventListener(t,n,l),n}on$error(t,e,r,s){var n;return(n=t.options)!=null&&n.length&&(r.guard=function(...i){let o=this.event.error;return!!i.find(function(l){return o instanceof l})}),this.addEventListener("error",r,s),r}};jr(N.prototype,za.prototype);var Mr=new class{get ios\u03A6(){let t=globalThis.navigator.platform||"";return!!(t.match(/iPhone|iPod|iPad/)||t=="MacIntel"&&globalThis.navigator.maxTouchPoints>2)}};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;i<l;i++){let a=o[i],p=n.get(a.target)||0,u=a.intersectionRatio,y={entry:a,ratio:u,from:p,delta:u-p,observer:s},b=new A(t,{bubbles:!1,detail:y});b[Qa](tu),b.entry=a,b.isIntersecting=a.isIntersecting,b.delta=y.delta,b.ratio=y.ratio,n.set(a.target,u),a.target.dispatchEvent(b)}}}function Fi(t=ye){let e=t.threshold.join("-")+t.rootMargin;!t.root&&ye.root&&(t.root||(t.root=ye.root));let r=t.root||Za,s=Mi.get(r);return s||Mi.set(r,s={}),s[e]||(s[e]=new IntersectionObserver(eu("intersect",e),t))}var ru=class{on$intersect(t,e,r,s){let n;if(t.options){let i=[],o={threshold:i};for(let l=0,a=ji(t.options),p=a.length;l<p;l++){let u=a[l];u instanceof N||u instanceof ce?o.root=u:typeof u=="number"?i.push(u):typeof u=="string"?o.rootMargin=u:typeof u=="object"&&Object.assign(o,u)}if(i.length==1){let l=i[0];if(l>1)for(i[0]=0;i.length<l;)i.push(i.length/(l-1))}i.length==0&&i.push(0),n=Fi(o)}else n=Fi();return t._observer=n,n.observe(this),this.addEventListener("intersect",r,s),r}};Xa(N.prototype,ru.prototype);function su(t){let e;return t?(e=t.toIterable)?e.call(t):t:[]}function nu(t,e){let r=Object.getOwnPropertyDescriptors(e);return delete r.constructor,Object.defineProperties(t,r),t}var zr=Symbol.for("#width"),qr=Symbol.for("#height"),iu=Symbol.for("#extendType");function vl(){return!0}var Ke=null,ou=class extends A{\u03B1css(t="1elw",e="1elh",r=""){let s=this.target;if(s.offsetParent){let n=$t(t),i=$t(e),o=Fr(r,s),l=n?"--u_"+n[1]:"--"+t,a=i?"--u_"+i[1]:"--"+e,p=n?this.width/n[0]:this.width,u=i?this.height/i[0]:this.height;o.style.setProperty(l,p),o.style.setProperty(a,u)}return!0}get width(){return this[zr]==null?this[zr]=this.entry.target.offsetWidth:this[zr]}get height(){return this[qr]==null?this[qr]=this.entry.target.offsetHeight:this[qr]}};function lu(){return globalThis.ResizeObserver||Ke||(console.warn(":resize not supported in this browser"),Ke={observe:function(){return!0}}),Ke||(Ke=new ResizeObserver(function(t){for(let e=0,r=su(t),s=r.length;e<s;e++){let n=r[e],i=new A("resize",{bubbles:!1,detail:n});i.entry=n,i.rect=n.contentRect,i[iu](ou),n.target.dispatchEvent(i);let o=new A("resized",{bubbles:!0,detail:n});n.target.dispatchEvent(o)}}))}var hu=class{on$resize(t,e,r,s){return lu().observe(this),this.addEventListener("resize",r,s),r}};nu(N.prototype,hu.prototype);function au(t,e){let r=Object.getOwnPropertyDescriptors(e);return delete r.constructor,Object.defineProperties(t,r),t}function bl(){return!0}var Kr,Ai=Symbol();function uu(){if(!Kr)return Kr=function(t){if(t[Ai])return;t[Ai]=!0;let e=globalThis.document.activeElement;if(e&&e.matches("input,textarea")){let r=new A("selection",{detail:{start:e.selectionStart,end:e.selectionEnd}});return e.dispatchEvent(r)}},globalThis.document.addEventListener("selectionchange",Kr)}var cu=class{on$selection(t,e,r,s){return uu(),this.addEventListener("selection",r,s),r}};au(N.prototype,cu.prototype);var Di=Symbol.for("#string"),Ri=Symbol.for("#html"),X={win:{sep:"+",name:"win",order:["meta","ctrl","mod","alt","option","shift"].reverse(),labels:{option:"alt",mod:"ctrl",meta:"win"}},mac:{sep:"",name:"mac",order:["ctrl","alt","option","shift","mod","command"].reverse(),labels:{left:"\u2192",up:"\u2191",down:"\u2193",right:"\u2190",plus:"+",tab:"\u21E5",meta:"\u2318",mod:"\u2318",ctrl:"\u2303",option:"\u2325",alt:"\u2325",del:"\u2326",shift:"\u21E7",enter:"\u21A9",esc:"\u238B",backspace:"\u232B"}}};X.auto=X.win,(globalThis.navigator.platform||"").match(/iPhone|iPod|iPad|Mac/)&&(X.auto=X.mac);var Ur={};function Vi(t,e="auto"){let r=""+t+":"+e;if(Ur[r])return Ur[r];let s=X[e]||X.win,n=t.split(" ").map(function(i){return i.split("+").sort(function(o,l){return s.order.indexOf(l)-s.order.indexOf(o)}).map(function(o){let l=s.labels[o]||o;return l=l[0].toUpperCase()+(l.slice(1)||"")})});return Ur[r]=n}function fu(t,e){var r;let s=Vi(t,e),n=X[e]||X.win;return s[Di]||(s[Di]=s.map(function(i){return i.join(n.sep)}).join(" "))}function du(t,e){var r;let s=Vi(t,e),n=X[e]||X.win;return s[Ri]||(s[Ri]=s.map(function(i){return"<kbd>"+i.map(function(o){return"<kbd>"+o+"</kbd>"}).join("")+"</kbd>"}).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;n<r.length;++n)s=r[n],Ki[s]&&(s=Ki[s]),e&&e!="keypress"&&qi[s]&&(s=qi[s],i.push("shift")),Gr(s)&&i.push(s);return e=bu(s,i,e),{key:s,modifiers:i,action:e}}function Hi(t,e){return t===null||t===document?!1:t===e?!0:Hi(t.parentNode,e)}function j(t){var e=this;if(t=t||document,!(e instanceof j))return new j(t);e.target=t,e._callbacks={},e._directMap={};var r={},s,n=!1,i=!1,o=!1;function l(c){c=c||{};var m=!1,S;for(S in r){if(c[S]){m=!0;continue}r[S]=0}m||(o=!1)}function a(c,m,S,g,x,E){var h,f,d=[],v=S.type;if(!e._callbacks[c])return[];for(v=="keyup"&&Gr(c)&&(m=[c]),h=0;h<e._callbacks[c].length;++h)if(f=e._callbacks[c][h],!(!g&&f.seq&&r[f.seq]!=f.level)&&v==f.action&&(v=="keypress"&&!S.metaKey&&!S.ctrlKey||pu(m,f.modifiers))){var w=!g&&f.combo==x,T=g&&f.seq==g&&f.level==E;(w||T)&&e._callbacks[c].splice(h,1),d.push(f)}return d}function p(c,m,S,g){e.stopCallback(m,m.target||m.srcElement,S,g)||c(m,S)===!1&&(gu(m),yu(m))}e._handleKey=function(c,m,S){var g=a(c,m,S),x,E={},h=0,f=!1;for(x=0;x<g.length;++x)g[x].seq&&(h=Math.max(h,g[x].level));for(x=0;x<g.length;++x){if(g[x].seq){if(g[x].level!=h)continue;f=!0,E[g[x].seq]=1,p(g[x].callback,S,g[x].combo,g[x].seq);continue}f||p(g[x].callback,S,g[x].combo)}var d=S.type=="keypress"&&i;S.type==o&&!Gr(c)&&!d&&l(E),i=f&&S.type=="keydown"};function u(c){typeof c.which!="number"&&(c.which=c.keyCode);var m=Ui(c);if(m){if(c.type=="keyup"&&n===m){n=!1;return}e.handleKey(m,mu(c),c)}}function y(){clearTimeout(s),s=setTimeout(l,1e3)}function b(c,m,S,g){r[c]=0;function x(v){return function(){o=v,++r[c],y()}}function E(v){p(S,v,c),g!=="keyup"&&(n=Ui(v)),setTimeout(l,10)}for(var h=0;h<m.length;++h){var f=h+1===m.length,d=f?E:x(g||Bi(m[h+1]).action);_(m[h],d,g,c,h)}}function _(c,m,S,g,x){e._directMap[c+":"+S]=m,c=c.replace(/\s+/g," ");var E=c.split(" "),h;if(E.length>1){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<c.length;++g)_(c[g],m,S)},e.enable=function(){Br(t,"keypress",u),Br(t,"keydown",u),Br(t,"keyup",u)},e.disable=function(){Hr(t,"keypress",u),Hr(t,"keydown",u),Hr(t,"keyup",u)},e.enable()}j.prototype.bind=function(t,e,r){var s=this;return t=t instanceof Array?t:[t],s._bindMultiple.call(s,t,e,r),s},j.prototype.unbind=function(t,e){var r=this;return r.bind.call(r,t,function(){},e)},j.prototype.trigger=function(t,e){var r=this;return r._directMap[t+":"+e]&&r._directMap[t+":"+e]({},t),r},j.prototype.reset=function(){var t=this;return t._callbacks={},t._directMap={},t},j.prototype.stopCallback=function(t,e){var r=this;return(" "+e.className+" ").indexOf(" mousetrap ")>-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<b;u++){let _=y[u];for(let c=0,m=Wt(_[Jt]),S=m.length;c<S;c++){let g=m[c];if(g[Xt][e]||g[Xt]["*"]){if(g.params.local&&!g[Xr].contains(s))continue;if(!t[Wr]||g.capture\u03A6||g.params.force){let x=g[Xr];(o.contains(x)||x.contains(o)||g.global\u03A6)&&p.push(g)}}}}for(let u=0,y=Wt(p),b=y.length;u<b;u++){let _=y[u];if((!t.repeat||_.params.repeat)&&_.handleEvent(a),(!_.passive\u03A6||a[Eu])&&((r=t?.preventDefault)==null||r.call(t)),!_.passive\u03A6)break}return this}},Wi=function(t,e){let r=e.element;r instanceof N&&(r.matches("input,textarea,select,option")?r.focus():r.click())};Wi.passive=!0;var Pu=class{on$hotkey(t,e,r,s){var n=this;return this[Jt]||(this[Jt]=[]),this[Jt].push(r),r[Xr]=this,t.$_||(t.$_=[Wi]),t[Nu]=function(){return n[Yr]()},this[Yr](),r}[Yr](){let t={};for(let e=0,r=Wt(this[Jt]),s=r.length;e<s;e++){let n=r[e],i=n.params,o=i.options[0];if(n[Yi]!=o&&(n[Yi]=o,!0)){n[Xt]={};for(let l=0,a=Wt(o.split("|")),p=a.length;l<p;l++){let u=a[l];qs.register(u,i),n[Xt][u]=!0}}Object.assign(t,n[Xt])}return this[Gi]=t,this.dataset.hotkey=Object.keys(t).join(" "),this}};_u(N.prototype,Pu.prototype);var Lu=Zl(th()),Qr=Symbol.for("#getQueryParam"),Xi=Symbol.for("#setQueryParam"),Ji=Symbol.for("#query"),vt=class{static parse(t,e){return t instanceof vt?t:new vt(t,e)}constructor(t,e){this.router=e,this.parse(t)}parse(t){var e;let r;return t instanceof URL||(t=new URL(t,this.router.origin)),(r=(e=this.router)==null?void 0:e.aliases[t.pathname])&&(t.pathname=r),this.url=t,this}get active\u03A6(){return this.router.location==this}reparse(){return this.parse(this.url)}get searchParams(){return this.url.searchParams}search(){let t=this.searchParams?this.searchParams.toString():"";return t?"?"+t:""}update(t){if(t instanceof Object)for(let e=0,r=Object.keys(t),s=r.length,n,i;e<s;e++)n=r[e],i=t[n],this.searchParams.set(n,i);else typeof t=="string"&&this.parse(t);return this}clone(){return new vt(this.url.href,this.router)}equals(t){return this.toString()==String(t)}get href(){return this.url.href}get path(){return this.url.href.slice(this.url.origin.length)}get pathname(){return this.url.pathname}get query(){return this[Ji]||(this[Ji]=new Proxy({},{get:this[Qr].bind(this),set:this[Xi].bind(this)}))}toString(){return this.href}[Qr](t,e){return this.searchParams.get(e)}[Xi](t,e,r){return this[Qr](t,e)!=r&&(r==null||r==""?this.searchParams.delete(e):this.searchParams.set(e,r),this.active\u03A6&&(this.router.history.replaceState({},null,this.url.toString()),this.router.touch())),!0}},Zr=function(){return!0},Qt=class{constructor(t,e=""){this.store=t||{},this.cache={raw:{},rich:{}},this.ns=e,this.local=t==globalThis.sessionStorage,this.children=new Map}serialize(t,e){return JSON.stringify(t)}deserialize(t,e){return JSON.parse(t)}getItem(t){let e=String(this.ns)+":"+t;if(this.store instanceof Qt)return this.store.getItem(e);if(this.local&&this.cache.rich[e]!=null)return this.cache.rich[e];let r=this.store.getItem(e);if(r!=null)return this.cache.raw[e]==r?this.cache.rich[e]:(this.cache.raw[e]=r,this.cache.rich[e]=this.deserialize(r,e))}setItem(t,e){var r,s;let n=String(this.ns)+":"+t;if(this.store instanceof Qt)return this.store.setItem(n,e);let i=this.cache.rich[n],o=typeof e;if(this.local&&(this.cache.rich[n]=e),i!==e||o=="object"){let l=this.store.getItem(n);if(e==null)return this.store.removeItem(n),r=this.cache.rich[n],delete this.cache.rich[n],s=this.cache.raw[n],delete this.cache.raw[n],L();{let a=this.serialize(e,n);if(this.cache.rich[n]=e,this.cache.raw[n]=a,l!=a)return this.store.setItem(n,a),L()}}}get(t,e,r){return this.getItem(e)}set(t,e,r,s){return this.setItem(e,r),!0}apply(t,e,[r]){let s=this.children.get(r);return s||this.children.set(r,s=new Proxy(Zr,new Qt(this,r))),s}deleteProperty(t,e){var r;let s=this.ns+e;return r=this.cache[s],delete this.cache[s],this.store.removeItem(s)}},_l=new Proxy(Zr,new Qt(globalThis.localStorage)),Ks=new Proxy(Zr,new Qt(globalThis.sessionStorage)),Zt=Symbol.for("#states"),Qi=new WeakMap,ts=class{static from(t,e){return e?new this(t,e):null}constructor(t,e,r=!1){Qi.set(this,t),this.path=e.path,this.data=e.data||{},this.index=e.index,this.type=e.type,this.local=r}get history(){return Qi.get(this)}get next(){return this.history.at(this.index+1)}get prev(){return this.history.at(this.index-1)}toJSON(){return{path:this.path,data:this.data,index:this.index,type:this.type}}save(){return this.history.cache[this.index]=this,this}toString(){return""+this.history.id+"|"+this.index}},Cu=class{constructor(t){this.router=t,this.store=Ks("router"),this[Zt]=[],this.cache={},this.index=-1;let e=globalThis.history.state,r;if(typeof e=="string"){let s=e.split("|");this.id=parseInt(s[0]),this.index=parseInt(s[1]),this.cache=this.store(this.id)}else this.id=this.store.id=(this.store.id||0)+1,this.cache=this.store(this.id);this.index==-1&&this.replaceState({initial:!0},null,t.path)}get length(){return this.cache.length}get state(){return this.at(this.index)}get states(){let t=this.length,e=0;for(;e<t;)this.at(e++);return this[Zt]}get currentStates(){return this.states.slice(0,this.length)}get next(){return this.state.next}get prev(){return this.state.prev}slice(t,e=this.length){let r=[];for(;t<e;)r.push(this.at(t++));return r}at(t){var e;if(!(t>=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;n<o;n++){let l=i[n];if(!l)continue;let[a,p]=l.split("=");a[0]=="!"&&(this.dynamic=!0,a=a.slice(1),p=!1),p===""&&(p=!1),p&&p[0]==":"&&(this.dynamic=!0),this.query[a]=p||p!==!1}}if(t=t.replace(/\:(\w+|\*)(\.)?/g,function(s,n,i){e.dynamic=!0,n!="*"&&e.groups.push(n);let o=e.router.matchers[n]||(i?"([^/#.?]+)":"([^/#?]+)");return i?""+o+".":o}),t==""&&e.query)return;if(t=="*")return e.regex=ju,e;t="^"+t;let r=t[t.length-1];(r=="$"||r=="/")&&(t=t.slice(0,-1)+"(?=/?[#?]|/?$)"),r!="/"&&r!="$"&&t!="^/"&&(t=t+"(?=[/#?]|$)"),e.regex=new RegExp(t)}match(t=this.router.path){var e,r,s,n;let i=this.parent.match(t);if(!i)return null;let o=Du(t),l=o.url,a="";if(i.path&&o.path.indexOf(i.path)==0&&(a=i.path+"/",l=l.slice(a.length)),s=this.regex?l.match(this.regex):[""]){let p=a+s[0],u=[this.$path],y={};if(this.groups.length)for(let c=0,m=to(s),S=m.length,g;c<S;c++){let x=m[c];(g=this.groups[c-1])&&(y[g]=x,u.push(x))}if(this.query)for(let c=this.query,m=0,S=Object.keys(c),g=S.length,x,E;m<g;m++){x=S[m],E=c[x];let h=x,f=(r=(e=o.query)==null?void 0:e.get)==null?void 0:r.call(e,x);if(E===!1){if(f)return null;u.push("1");continue}if(E[0]==":"&&(h=E.slice(1),E=!0),E==!0&&f||E==f)y[h]=f,u.push(f);else return null}let b=u.join("*");y=(n=this[eo])[b]||(n[b]=y);let _=Fu(i,y);return _.path=p,_}return null}resolve(t=this.router.path){if(this.raw[0]=="/"&&!this.dynamic)return this.raw.replace(/\$/g,"");let e=this.parent.match(t),r=this.parent.resolve(t),s;if(this.dynamic){let n=this.match(t);return n?n.path:null}return this.raw[0]=="?"?s=(r||"/")+this.raw:s=r+"/"+this.raw,s.replace(/\$/g,"").replace(/\/\/+/g,"/")}},no=Symbol.for("#__initor__"),io=Symbol.for("#__inited__"),oo=Symbol.for("#__init__"),Be=Symbol.for("#idler"),te=Symbol.for("#resolve"),lo=Symbol(),ho=class extends Set{static[oo](){return this.prototype[no]=lo,this}constructor(){super(),this[Be]=Promise.resolve(this),this[no]===lo&&this[io]&&this[io]()}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)}add(t){var e=this;if(t instanceof Function&&(t=t()),!this.has(t)){t.then(function(){return e.delete(t)});let r=e.size==0;super.add(t),r&&(this[Be]=this[te]=null,e.emit("busy",e))}return t}delete(t){return super.delete(t)?(this.size==0&&(this[te]&&(this[te](this),this[te]=null),this.emit("idle",this)),!0):!1}get idle(){var t=this;return this[Be]||(this[Be]=new Promise(function(e){return t[te]=e}))}};ho[oo]();function ns(t,e){let r=Object.getOwnPropertyDescriptors(e);return delete r.constructor,Object.defineProperties(t,r),t}var ao=Symbol.for("#__initor__"),uo=Symbol.for("#__inited__"),co=Symbol.for("#__init__"),is=Symbol.for("#enter"),os=Symbol.for("#resolved"),He=Symbol.for("#leave"),fo=Symbol.for("#afterVisitRouted"),po=Symbol.for("#afterVisitRouteTo"),mo=Symbol.for("#router"),Pt=Symbol.for("#doc"),ot=Symbol.for("#version"),Vu=Symbol.for("#routes"),go=Symbol.for("#origin"),ls=Symbol.for("#request"),ee=Symbol.for("#hash"),U=Symbol.for("#routeTo"),re=Symbol.for("#path"),Q=Symbol.for("#match"),se=Symbol.for("#options"),zu=Symbol.for("#cache"),yo=Symbol.for("#unmatched"),pt=Symbol.for("#active"),qu=Symbol.for("#resolvedPath"),Ku=Symbol.for("#dataKey"),Uu=Symbol.for("#activeKey"),ne=Symbol.for("#urlKey"),Lt=Symbol.for("#dataMap"),Ge=Symbol.for("#href"),M=Symbol.for("#route"),vo=Symbol.for("#context"),bo=Symbol.for("#afterVisit"),So=Symbol.for("#routeHandler"),Bu=Symbol.for("#parentNode"),Hu=Symbol.for("#visitContext"),_o=Symbol.for("##visitContext"),Gu=Symbol.for("#attachToParent"),Yu=Symbol.for("#detachFromParent"),xo=Symbol(),Wu=class{get router(){return this[mo]||(this[mo]=new or(this))}};ns(ce.prototype,Wu.prototype);function xl(){return!0}var wl=vs(function(){return globalThis.document.router}),or=class extends Lu.EventEmitter{static[co](){return this.prototype[ao]=xo,this}constructor(t,e={}){super(),this[Pt]=t,this[ot]=0,this[Vu]={},this.aliases={},this.redirects={},this.rules={},this.matchers={},this.options=e,this.busy=[],this.queue=new ho,this.root=new Ru(this),this.location=new vt(e.url||t.location.href,this),this.history=new Cu(this),this.mode=e.mode||"history",this.queue.on("busy",function(){return globalThis.document.flags.incr("_routing_")}),this.queue.on("idle",function(){return globalThis.document.flags.decr("_routing_"),L()}),this.setup(),this[ao]===xo&&this[uo]&&this[uo]()}get origin(){return this[go]||(this[go]=this[Pt].location.origin)}get query(){return this.location.query}init(){return this.refresh({mode:"replace"}),this}alias(t,e){return this.aliases[t]=e,this.location.reparse(),this}touch(){return this[ot]++}option(t,e){return e==null?this.options[t]:(this.options[t]=e,this)}get realpath(){let t=this[Pt].location;return t.href.slice(t.origin.length)}get state(){return this.history.state}get states(){return this.history.currentStates}set state(t){this.state.data=t,this.state.save()}get ctx(){return this[ls]}pushState(t,e,r){return this.history.pushState(t,e||null,String(r))}replaceState(t,e,r){return this.history.replaceState(t,e||null,String(r))}refresh(t={}){var e=this;if(this.refreshing)return;this.refreshing=!0;let r=this.location,s=vt.parse(t.location||this.realpath,this),n=t.mode,i=this[ls];if(!s.equals(r)||!i||t.state){let o=new Zi(this,s,r,t);this[ls]=o,this.emit("beforechange",o),o.aborted&&(!o.forceAbort&&globalThis.window.confirm("Are you sure you want to leave? You might have unsaved changes")?o.aborted=!1:n=="pop"?this.pushState(this.state,null,String(r)):n=="replace"&&this.replaceState(this.state,null,String(r))),o.aborted||(this.location=o.location,n=="push"?this.pushState(o.state,null,String(this.location)):n=="replace"?this.replaceState(o.state,null,String(this.location)):n=="pop"&&(this.history.index=t.index),this.emit("change",o),this.touch(),L())}return F.add(function(){let o=e[Pt].location.hash;if(o!=e[ee])return e.emit("hashchange",e[ee]=o)}),e.refreshing=!1,e}onpopstate(t){let e=this.history.index,r=e,s={pop:!0,index:0,from:e,mode:"pop"};try{if(typeof t.state=="string"){let[n,i]=t.state.split("|");r=s.index=parseInt(i),r<e?s.revert=this.history.slice(r+1,e+1).reverse():r>e&&(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;r<n;r++)i=s[r],o=t[i],e.push([i,globalThis.encodeURI(o)].join("="));return e.join("&")}return t||""}get hash(){return this[ee]}set hash(t){this.history.replaceState(this.state,null,"#"+this.serializeParams(t))}match(t){return this.route(t).match(this.path)}route(t){return this.root.route(t)}go(t,e=null){if(typeof t=="object"&&e===null&&(e=t,t=this.path),typeof t=="number")return globalThis.history.go(t),this;let r=this.location.clone().update(t),s=this.history.buildState(e,r.path,!0);return this.refresh({push:!0,mode:"push",location:r,state:s,apply:[s]}),this}replace(t,e=null){typeof t=="object"&&e===null&&(e=t,t=this.path);let r=this.location.clone().update(t),s=this.history.buildState(e,r.path,!1);return this.refresh({replace:!0,mode:"replace",location:r,state:s,apply:[s]})}};or[co]();var lr=class{constructor(t,e,r,s={}){this.parent=r,this.node=t,this[re]=e,this[Q]=null,this[se]=s,this[zu]={},this[yo]={},this[pt]=null,this[qu]=null,this[Ku]=Symbol(),this[Uu]=Symbol(),this[ne]=Symbol()}get router(){return this.node.ownerDocument.router}get route(){return(this.parent?this.parent.route:this.router).route(this[re])}get match(){return this[Q]}get params(){return this[Q]||this[yo]}get state(){let t=this[Lt]||(this[Lt]=new Map),e=this.params,r=this[Lt].get(e);return r||this[Lt].set(e,r={}),r}set state(t){(this[Lt]||(this[Lt]=new Map)).set(this.params,t)}set path(t){this[re]!=t&&(this[re]=t,!0)&&this.router.touch()}get path(){return this[re]}get isActive(){return!!this[pt]}get active\u03A6(){return!!this[pt]}resolve(){let t=this.router[ot];if(!(this[ot]!=t&&(this[ot]=t,!0)))return;let e=this.route,r=this[se],s=this.router.path,n=e.match(s),i=this[pt],o=this[Q],l=n!=o,a=n&&n[this[ne]];return n&&(this[pt]=!0,this[Q]=n,n[this[ne]]=s),n&&(l||a!=s||!i)&&this[os](n,o,a),!i&&n&&this[is](),!n&&(i||i===null)&&(this[pt]=!1,this[He]()),this[Q]}[is](){var t,e;return this.node.flags.remove("not-routed"),this.node.flags.add("routed"),(e=(t=this.node)==null?void 0:t.routeDidEnter)==null?void 0:e.call(t,this)}[os](t,e,r=""){var s,n;return(n=(s=this.node)==null?void 0:s.routeDidResolve)==null?void 0:n.call(s,this,t,e,r)}[He](){var t,e;return this.node.flags.add("not-routed"),this.node.flags.remove("routed"),(e=(t=this.node)==null?void 0:t.routeDidLeave)==null?void 0:e.call(t,this)}},Us=class extends lr{[is](){return this}[os](){return this}[He](){return this}resolve(){let t=this.router[ot];if(!(this[ot]!=t&&(this[ot]=t,!0)))return;let e=this[se],r=this.route,s=this.router.path,n=this.route.resolve(s),i=this.route.match(s);i&&(this[Q]=i,this[Q][this[ne]]=s),e.sticky&&this[Q]&&(n=this[Q][this[ne]]),this[Ge]!=n&&(this[Ge]=n,!0)&&this.node.nodeName=="A"&&this.node.setAttribute("href",n),this.node.flags.toggle("active",!!i)}go(){return this.resolve(),this[se]&&this[se].replace?this.router.replace(this[Ge]):this.router.go(this[Ge])}},Xu=class{get router(){return this.ownerDocument.router}};ns(G.prototype,Xu.prototype);var Ju=class{set route(t){if(this[M]){this[M].path=t;return}let e=t[0]!="/"?this[vo].route:null;this[M]=new lr(this,t,e,this.route__),this[bo]=this[fo]}get route(){return this[M]}set route\u039Eto(t){var e=this;if(this[U]){this[U].path=t;return}let r=t[0]!="/"?this[vo].route:null;this[M]=this[U]=new Us(this,t,r,this.routeTo__),this[bo]=this[po],e.onclick=function(s){if(!s.altKey&&!s.metaKey&&!s[So])return s.preventDefault(),s[So]=e[U],e[U].go()}}[fo](){if(this[M]){let t=this[Bu],e=t&&t[Hu];if(e&&e.matchedRoute&&e.matchedRoute!=this[M]){this[M][pt]!=!1&&(this[M][pt]=!1,!0)&&(this[M][He](),this[M][ot]=-1);return}if(this[M].resolve(),this[M].active\u03A6)e.matchedRoute=this[M];else return}if(this.visit&&this.visit(),this[_o])return this[_o]=null}[po](){if(this[U]&&this[U].resolve(),this.visit)return this.visit()}routeDidEnter(t){return this[Gu]()}routeDidLeave(t){return this[Yu]()}routeDidResolve(t,e,r){var s=this;this.routed instanceof Function&&e!=r&&s.router.queue.add(async function(){s.suspend();let n=await s.routed(e,t.state,r);return s.unsuspend()})}};ns(N.prototype,Ju.prototype);function H(t){let e;return t?(e=t.toIterable)?e.call(t):t:[]}function hs(t,e){let r=Object.getOwnPropertyDescriptors(e);return delete r.constructor,Object.defineProperties(t,r),t}var ie=Symbol.for("##reactive"),bt=Symbol.for("##referenced"),oe=Symbol.for("##dereferenced"),Ye=Symbol.for("#map"),wo=Symbol.for("#__init__"),We=Symbol.for("#child"),le=Symbol.for("#reactions"),as=Symbol.for("#promise"),$={TOUCHING:1<<1,STALE:1<<2,OBJECT:1<<3,RUNNING:1<<4,INVALIDATING:1<<5,POSSIBLY_STALE:1<<6,AUTORUN:1<<7},I=0,To=!1,Qu=0,Eo=1,us={META:new Map,VALUE:new Map,REF:new Map},z=Symbol.for("~"),No=Symbol.for("~~"),cs=function(t,e){return e.has(t)||e.set(t,Symbol()),e.get(t)},Xe=function(t){return typeof t=="symbol"?cs(t,us.VALUE):Symbol.for(t)},fs=function(t){return typeof t=="symbol"?cs(t,us.META):Symbol.for("#"+t+"__")},ds=function(t){return typeof t=="symbol"?cs(t,us.REF):Symbol.for("~"+t)},P=function(t,e){return I&&k.add(t[z]),e},B=function(t,e){return t[z].invalidated(0),e},Ct=function(t,e,r){let s=t[z];return s||(s=t[z]=new gs($.OBJECT),Object.defineProperties(t,r)),e&&s.addSubscriber(e),t},ps=function(t,e){let r=t[z];return r&&r.removeSubscriber(e),t},Zu=class{constructor(t){this.changes=new Map,this.cleanup(),t&&this.reset(t)}reset(t=[]){return this.array=t,this.initialLength=t.length}cleanup(){return this.idx=0,this.array=null,this.changes.clear(),this.dirty=!1}push(t){if(this.initialLength==0){this.array.indexOf(t)<0&&(this.changes.set(t,1),this.array.push(t),this.idx++);return}let e=this.array[this.idx];if(e===t)return++this.idx;{let r=this.array.indexOf(t),s=this.changes.get(t);if(r===-1)this.array.splice(this.idx,0,t),this.changes.set(t,1),this.idx++;else if(r===this.idx+1)e&&this.changes.set(e,-1),this.array.splice(this.idx,1),++this.idx;else{if(r<this.idx)return;r>this.idx&&this.array.splice(r,1),this.array.splice(this.idx,0,t)}if(s==-1)return this.changes.delete(t)}}end(){if(this.array.length>=this.idx)for(;this.array.length>this.idx;)this.changes.set(this.array.pop(),-1);return this.array}patch(){return this.end()}};function 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<o;n++){l=i[n],a=e[l];let p=s[l]=new he(t[l],t,a);r||p.call()}r&&(Z(t,"mount",function(){var n;n=[];for(let i=0,o=H(Object.values(s)),l=o.length;i<l;i++){let a=o[i];n.push(a instanceof he&&a.activate())}return n}),Z(t,"unmount",function(){var n;n=[];for(let i=0,o=H(Object.values(s)),l=o.length;i<l;i++){let a=o[i];n.push(a instanceof he&&a.deactivate())}return n}))}})}function ec(t,e=No){return t.hasOwnProperty(e)||(t[e]=Object.assign({},t[e]||{})),t[e]}var Oo=class{constructor(t,e=0){this.depth=e,this.parent=t,this.target=null,this.patcher=new Zu}get active\u03A6(){return k==this}get root\u03A6(){return this==St}get snapshot(){let t=[],e=this[We];for(;e&&e.target;)t.push({depth:e.depth,target:e.target,beacon:e.beacon}),e=e[We];return t}reset(t){return this.tracking=!0,this.target=t,this.beacon=t.beacon,this.patcher.reset(t.observing||(t.observing=[])),this}add(t){if(this.tracking&&t)return this.patcher.push(t)}react(t){return St.reactions.add(t)}push(t){return k=this.child.reset(t)}pop(){let t=null;if(this.beacon){t=this.patcher.end();let e=this.patcher.changes;if(e.size)for(let[r,s]of H(e))s===1?r.addSubscriber(this.beacon):r.removeSubscriber(this.beacon)}return this.patcher.cleanup(),this.target=this.beacon=null,k=this.parent,k==St&&St.flush(),t}get child(){return this[We]||(this[We]=new Oo(this,this.depth+1))}get reactions(){return this[le]||(this[le]=new Set)}flush(){if(!this[le])return;let t=this[le];this[le]=null;for(let e of H(t))e.call()}},rc=class extends Oo{add(){return!0}},k=new rc(null,0),St=k,sc=function(){return k.tracking=!1},ko=function(t,e,r,s,n){let i=t[r],o=t[n];return o||(o=t[n]=new gs(0,s,i,e)),k.add(o,t),i},$o=function(t,e,r,s,n,i){let o=t[r];if(s!=o){t[r]=s;let l=t[i];l&&l.changed(0,s,o)}},gs=class{constructor(t,e,r,s){return this.id=Eo++,this.observer=null,this.observers=null,r&&r[bt]&&r[bt](this),this}changed(t,e,r){if(Qu++,r&&r[oe]&&r[oe](this,e),e&&e[bt]&&e[bt](this,r),this.observer&&this.observer.invalidated(t+1,this,e,r),this.observers)for(let s=0,n=H(this.observers),i=n.length;s<i;s++)n[s].invalidated(t+1,this,e,r);k==St&&k.flush()}invalidated(t,e){if(this.observer&&this.observer.invalidated(t+1,this),this.observers)for(let r=0,s=H(this.observers),n=s.length;r<n;r++)s[r].invalidated(t+1,this);return t==0&&k==St&&k.flush(),!0}addSubscriber(t){this.observer?(this.observers||(this.observers=[]),this.observers.push(t)):this.observer=t}removeSubscriber(t){if(this.observer==t)return this.observer=null;let e=this.observers,r=e.indexOf(t);r>=0&&e.splice(r,1)}reportChanged(){return this.changed(0)}reportObserved(){return 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<n;r++)s[r].invalidated(t,this);return this}}value(){if(I&&k.add(this),(this.flags&$.POSSIBLY_STALE)==0)return this.target[this.vkey];I++,this.flags|=$.RUNNING,k.push(this);let t=this.func.call(this.target);k.pop(this);let e=this.target[this.vkey];return this.target[this.vkey]=t,this.flags&=~($.STALE|$.POSSIBLY_STALE|$.RUNNING),t!==e&&this.version++,I--,t}},dc=class{constructor(t,e){this.name=t;let r=ds(t),s=Xe(t),n=this.descriptor={enumerable:!1,configurable:!1,get:function(){return this[r].value()}},i=this.lazyDescriptor={enumerable:!1,get:function(){let o=this[r]=new Je(this,e,s);return Object.defineProperty(this,t,n),o.value()}}}},he=class{get beacon(){return this}constructor(t,e,r={}){this.cb=t,this.context=e,this.options=r,this.flags=0,this.id=Eo++,this.cachedComputedVersions=new WeakMap,this.checkComputedValues=new Set,this.observing=[],this.timeout=null}get running\u03A6(){return this.flags&$.RUNNING}invalidated(t,e){return e instanceof Je?(this.flags|=$.POSSIBLY_STALE,this.checkComputedValues.add(e)):this.flags|=$.STALE,k.react(this)}activate(){return this.observing=[],this.cachedComputedVersions=new WeakMap,this.checkComputedValues=new Set,this.call(),this}deactivate(){if(this.timeout&&clearTimeout(this.timeout),this.observing)for(let t=0,e=H(this.observing),r=e.length;t<r;t++)e[t].removeSubscriber(this);return this.observing=this.checkComputedValues=this.cachedComputedVersions=null,this}call(){var t=this;if(I&&console.warn("should not call reaction inside an autorunning context?",St.snapshot),this.flags&$.POSSIBLY_STALE&&(this.flags&$.STALE)==0){let e=!1;for(let r of H(this.checkComputedValues)){let s=this.cachedComputedVersions.get(r);r.value();let n=r.version;if(s!=n){e=!0;break}}if(!e){this.flags&=~$.POSSIBLY_STALE,this.checkComputedValues.clear();return}}if(this.options.delay){clearTimeout(this.timeout);let e=this.options.delay;typeof e!="number"&&(e=1e3),t.timeout=setTimeout(function(){return t.run()},e);return}return t.run()}run(){I++,this.flags|=$.RUNNING;let t=k.push(this),e=this.cb.call(this.context,sc),r=k.pop(this);this.observing=r,this.checkComputedValues.clear();for(let s=0,n=H(r),i=n.length;s<i;s++){let o=n[s];o instanceof Je&&this.cachedComputedVersions.set(o,o.version)}return this.flags&=~($.RUNNING|$.STALE|$.POSSIBLY_STALE),I--,this.options.silent||L(),e}dispose(){return this.deactivate(),this.cb=this.context=this.options=null,this}},pc=class extends he{resolve(t){return this.deactivate(),this.resolved=t}then(...t){var e=this;return this.resolved!==void 0?Promise.resolve(this.resolved).then(...t):(this[as]||(this[as]=new Promise(function(r){return e.resolve=function(s){return e.deactivate(),e.resolved=s,r(s)}})),this[as].then(...t))}run(){I++,this.flags|=$.RUNNING;let t=k.push(this),e=this.cb.call(this.context),r=k.pop(this);this.observing=r,this.checkComputedValues.clear();for(let s=0,n=H(r),i=n.length;s<i;s++){let o=n[s];o instanceof Je&&this.cachedComputedVersions.set(o,o.version)}return this.flags&=~($.RUNNING|$.STALE|$.POSSIBLY_STALE),I--,e!=!1&&e!=null&&e!=null&&(this.resolve(e),this.options.silent||L()),e}},Io=class{constructor(t,e){this.context=e,this.cb=t}run(t=this.context,e=[]){k.push(this);try{let r=this.cb.apply(t,e);return k.pop(this),r}catch(r){throw k.pop(this),r}}};function El(t,e={}){let r=new he(t,globalThis,e);return r.call(),r}function Nl(t,e={}){let r=new pc(t,globalThis,e);return r.call(),r}function Ol(t){return t[ie]}function kl(t){return new Io(t,globalThis).run()}function $l(t){return t&&t[z]&&t[z].invalidated(0),t}function Pl(t){return t&&t[z]&&t[z].reportObserved(),t}function Ll(t,e,r){let s=fs(e);return(t[s]=new dc(e,r.get)).lazyDescriptor}function Cl(t,e,r){let s=fs(e),n=Xe(e),i=this[0]||{},o=t[s]=new uc(e,i);return r?(Object.defineProperty(t,n,Object.assign({},r)),o.lazyDescriptor):(Object.defineProperty(t,e,o.lazyDescriptor),null)}function Il(t,e,r){let s=fs(e);return t.constructor[e],(t[s]=new fc(e,Xe(e))).lazyDescriptor}function jl(t,e,r){let s=ec(t),n=this[0]||{};return n.flags=$.AUTORUN,tc(),s[e]=n,r}function Ml(t,e,r){if(r.value){let s=new Io(r.value,null);r.value=function(){return s.run(this,arguments)}}return r}function mc(t){let e;return t?(e=t.toIterable)?e.call(t):t:[]}var jo=Symbol.for("#__init__"),Qe=Symbol.for("#watchers");function Fl(t,e,r,s,n,i){return t&&t.$accessor instanceof Function?t=t.$accessor(e,r,s,n,i):i[n]=t,t&&!t.$init&&(t.$init=t.$set||function(){return!0}),t}function Al(t,e,r=[]){return e.prototype?new e(...r):e.apply(t,r)}var Bs=class{constructor(t=null){this[jo](t)}[jo](t=null){var e;this.local=t&&(e=t.local)!==void 0?e:!1,this.session=t&&(e=t.session)!==void 0?e:!1,this.weak=t&&(e=t.weak)!==void 0?e:!1}watch(t){return(this[Qe]||(this[Qe]=[])).push(t)}$get(t,e){return t[e]}$set(t,e,r,s){if(this[Qe]){let n=this.$get(e,r,s);if(n!=t){e[r]=t;for(let i=0,o=mc(this[Qe]),l=o.length;i<l;i++){let a=o[i].call(e,t,n,this)}}}else e[r]=t}$accessor(t,e,r,s,n){return n[s]=this}};function Dl(){return new Bs}
|
|
|