var yh=Object.create;var Ye=Object.defineProperty;var bh=Object.getOwnPropertyDescriptor;var _h=Object.getOwnPropertyNames;var vh=Object.getPrototypeOf,xh=Object.prototype.hasOwnProperty;var Sh=(i,t)=>()=>(t||i((t={exports:{}}).exports,t),t.exports),wh=(i,t)=>{for(var e in t)Ye(i,e,{get:t[e],enumerable:!0})},an=(i,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of _h(t))!xh.call(i,s)&&s!==e&&Ye(i,s,{get:()=>t[s],enumerable:!(r=bh(t,s))||r.enumerable});return i};var Rt=(i,t,e)=>(e=i!=null?yh(vh(i)):{},an(t||!i||!i.__esModule?Ye(e,"default",{value:i,enumerable:!0}):e,i)),Th=i=>an(Ye({},"__esModule",{value:!0}),i);var Fl=Sh((pd,Ts)=>{"use strict";var se=typeof Reflect=="object"?Reflect:null,Tl=se&&typeof se.apply=="function"?se.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)},Vr;se&&typeof se.ownKeys=="function"?Vr=se.ownKeys:Object.getOwnPropertySymbols?Vr=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Vr=function(t){return Object.getOwnPropertyNames(t)};function zu(i){console&&console.warn&&console.warn(i)}var Nl=Number.isNaN||function(t){return t!==t};function g(){g.init.call(this)}Ts.exports=g;Ts.exports.once=Yu;g.EventEmitter=g;g.prototype._events=void 0;g.prototype._eventsCount=0;g.prototype._maxListeners=void 0;var Ll=10;function Dr(i){if(typeof i!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof i)}Object.defineProperty(g,"defaultMaxListeners",{enumerable:!0,get:function(){return Ll},set:function(i){if(typeof i!="number"||i<0||Nl(i))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+i+".");Ll=i}});g.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};g.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||Nl(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this};function Cl(i){return i._maxListeners===void 0?g.defaultMaxListeners:i._maxListeners}g.prototype.getMaxListeners=function(){return Cl(this)};g.prototype.emit=function(t){for(var e=[],r=1;r0&&(o=e[0]),o instanceof Error)throw o;var l=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw l.context=o,l}var h=n[t];if(h===void 0)return!1;if(typeof h=="function")Tl(h,this,e);else for(var a=h.length,c=El(h,a),r=0;r0&&o.length>s&&!o.warned){o.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=i,l.type=t,l.count=o.length,zu(l)}return i}g.prototype.addListener=function(t,e){return Ol(this,t,e,!1)};g.prototype.on=g.prototype.addListener;g.prototype.prependListener=function(t,e){return Ol(this,t,e,!0)};function Uu(){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 Ml(i,t,e){var r={fired:!1,wrapFn:void 0,target:i,type:t,listener:e},s=Uu.bind(r);return s.listener=e,r.wrapFn=s,s}g.prototype.once=function(t,e){return Dr(e),this.on(t,Ml(this,t,e)),this};g.prototype.prependOnceListener=function(t,e){return Dr(e),this.prependListener(t,Ml(this,t,e)),this};g.prototype.removeListener=function(t,e){var r,s,n,o,l;if(Dr(e),s=this._events,s===void 0)return this;if(r=s[t],r===void 0)return this;if(r===e||r.listener===e)--this._eventsCount===0?this._events=Object.create(null):(delete s[t],s.removeListener&&this.emit("removeListener",t,r.listener||e));else if(typeof r!="function"){for(n=-1,o=r.length-1;o>=0;o--)if(r[o]===e||r[o].listener===e){l=r[o].listener,n=o;break}if(n<0)return this;n===0?r.shift():qu(r,n),r.length===1&&(s[t]=r[0]),s.removeListener!==void 0&&this.emit("removeListener",t,l||e)}return this};g.prototype.off=g.prototype.removeListener;g.prototype.removeAllListeners=function(t){var e,r,s;if(r=this._events,r===void 0)return this;if(r.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):r[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete r[t]),this;if(arguments.length===0){var n=Object.keys(r),o;for(s=0;s=0;s--)this.removeListener(t,e[s]);return this};function Pl(i,t,e){var r=i._events;if(r===void 0)return[];var s=r[t];return s===void 0?[]:typeof s=="function"?e?[s.listener||s]:[s]:e?Ku(s):El(s,s.length)}g.prototype.listeners=function(t){return Pl(this,t,!0)};g.prototype.rawListeners=function(t){return Pl(this,t,!1)};g.listenerCount=function(i,t){return typeof i.listenerCount=="function"?i.listenerCount(t):kl.call(i,t)};g.prototype.listenerCount=kl;function kl(i){var t=this._events;if(t!==void 0){var e=t[i];if(typeof e=="function")return 1;if(e!==void 0)return e.length}return 0}g.prototype.eventNames=function(){return this._eventsCount>0?Vr(this._events):[]};function El(i,t){for(var e=new Array(t),r=0;rQr,CUSTOM_TYPES:()=>no,Comment:()=>rt,Component:()=>kt,CustomEvent:()=>k,Document:()=>J,DocumentFragment:()=>Ut,Easer:()=>Pe,Element:()=>d,ElementRoute:()=>je,ElementRouteTo:()=>Ur,Emitter:()=>Vt,Event:()=>P,EventHandler:()=>Er,Fragment:()=>ft,HTMLButtonElement:()=>Wt,HTMLElement:()=>M,HTMLHtmlElement:()=>ye,HTMLInputElement:()=>Kt,HTMLLinkElement:()=>ur,HTMLOptionElement:()=>Xt,HTMLScriptElement:()=>ar,HTMLSelectElement:()=>qt,HTMLStyleElement:()=>cr,HTMLTextAreaElement:()=>Yt,ImbaElement:()=>Da,IntersectionEventDefaults:()=>Ar,KeyboardEvent:()=>ve,LazyProxy:()=>Xe,Location:()=>Bt,MouseEvent:()=>Qt,Node:()=>T,PointerEvent:()=>_e,RenderContext:()=>B,Router:()=>He,SVGElement:()=>Jt,SVGSVGElement:()=>fr,Scheduler:()=>tr,ShadowRoot:()=>Ni,StyleDeclaration:()=>hr,Text:()=>_t,UIEvent:()=>be,Window:()=>Si,accessor:()=>Oc,autorun:()=>gc,awaits:()=>yc,clearInterval:()=>gn,clearTimeout:()=>yn,colors:()=>Ua,commit:()=>O,createAtom:()=>mc,createComment:()=>ut,createComponent:()=>lo,createDynamic:()=>ca,createElement:()=>ha,createFragment:()=>ua,createIndexedList:()=>Ma,createKeyedList:()=>Ea,createLiveFragment:()=>xa,createRenderContext:()=>pi,createSVGElement:()=>aa,createSlot:()=>Se,createTextNode:()=>dr,customElements:()=>na,defineTag:()=>fa,descriptor:()=>Mc,document:()=>Li,emit:()=>V,env:()=>Ah,events:()=>_u,getDeepPropertyDescriptor:()=>Qe,getRenderContext:()=>Dh,getSuperTagType:()=>oa,getTagType:()=>ht,get_document:()=>Zt,hooks:()=>ii,hotkeys:()=>Bu,hydrate:()=>Va,listen:()=>R,locals:()=>kc,mount:()=>Bo,observable:()=>bc,once:()=>F,parseTime:()=>Dt,proxy:()=>ti,render:()=>Ya,renderContext:()=>C,renderer:()=>Gt,reportChanged:()=>vc,reportObserved:()=>xc,router:()=>uc,run:()=>_c,scheduler:()=>I,serve:()=>Ih,session:()=>Ec,setInterval:()=>mn,setTimeout:()=>pn,styles:()=>Go,toCamelCase:()=>Nh,transitions:()=>Pr,unlisten:()=>gt,unmount:()=>zo,use_dom_bind:()=>Wa,use_dom_teleport:()=>ou,use_dom_transitions:()=>fu,use_events:()=>vu,use_events_hotkey:()=>$u,use_events_intersect:()=>ku,use_events_keyboard:()=>ts,use_events_mouse:()=>ke,use_events_pointer:()=>wu,use_events_resize:()=>Vu,use_events_selection:()=>ju,use_events_touch:()=>Cu,use_hooks:()=>Ph,use_router:()=>ac,use_slots:()=>_a,use_styles:()=>qa,use_window:()=>ia,αaction:()=>Nc,αautorun:()=>Lc,αcomputed:()=>Sc,αlazy:()=>kh,αobservable:()=>wc,αprop:()=>Pc,αref:()=>Tc});module.exports=Th(Fc);var We=Symbol.for("#__listeners__"),Lh=/-./g,Xe=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 ti(i,t={}){return new Proxy(t,new Xe(i))}function Dt(i){let t=typeof i;if(t=="number")return i;if(t=="string"){if(/^\d+fps$/.test(i))return 1e3/parseFloat(i);if(/^([-+]?[\d\.]+)s$/.test(i))return parseFloat(i)*1e3;if(/^([-+]?[\d\.]+)ms$/.test(i))return parseFloat(i)}return null}function Nh(i){return i.indexOf("-")>=0?i.replace(Lh,function(t){return t.charAt(1).toUpperCase()}):i}function Qe(i,t,e){if(!i)return;let r=Object.getOwnPropertyDescriptor(i,t);return r||i==e?r||void 0:Qe(Reflect.getPrototypeOf(i),t,e)}var un=function(i,t,e){let r,s,n;for(;(r=e)&&(e=e.next);)(s=e.listener)&&(e.path&&s[e.path]?n=t?s[e.path].apply(s,t):s[e.path]():n=t?s.apply(e,t):s.call(e)),e.times&&--e.times<=0&&(r.next=e.next,e.listener=null)};function R(i,t,e,r){var s;let n,o,l;return n=i[We]||(i[We]={}),o=n[t]||(n[t]={}),l=o.tail||(o.tail=o.next={}),l.listener=e,l.path=r,o.tail=l.next={},l}function F(i,t,e){let r=R(i,t,e);return r.times=1,r}function gt(i,t,e,r){let s,n,o=i[We];if(!!o&&(s=o[t])){for(;(n=s)&&(s=s.next);)if(s==e||s.listener==e){n.next=s.next,s.listener=null;break}}}function V(i,t,e){let r;(r=i[We])&&(r[t]&&un(t,e,r[t]),r.all&&un(t,[t,e],r.all))}var Vt=class{emit(t,...e){return V(this,t,e)}on(t,...e){return R(this,t,...e)}once(t,...e){return F(this,t,...e)}un(t,...e){return gt(this,t,...e)}};function Ch(i){let t;return i?(t=i.toIterable)?t.call(i):i:[]}var cn=Symbol.for("#__init__");var fn=Symbol.for("#schedule"),ei=Symbol.for("#frames"),Je=Symbol.for("#interval"),Ht=Symbol.for("#stage"),jt=Symbol.for("#scheduled"),Ze=Symbol.for("#version"),Oh=Symbol.for("#fps"),dn=Symbol.for("#ticker"),Mh=globalThis.requestAnimationFrame||function(i){return globalThis.setTimeout(i,1e3/60)};var Rc=1/60,ri=class{constructor(t=null){this[cn](t)}[cn](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[ei],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[Je]=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[Je]&&(globalThis.clearInterval(this[Je]),this[Je]=null),this.active=!1,this}},tr=class{constructor(){var t=this;this.id=Symbol(),this.queue=[],this.stage=-1,this[Ht]=-1,this[ei]=0,this[jt]=!1,this[Ze]=0,this.listeners={},this.intervals={},t.commit=function(){return t.add("commit"),t},this[Oh]=0,t.$promise=null,t.$resolve=null,this[dn]=function(e){return t[jt]=!1,t.tick(e)}}touch(){return this[Ze]++}get version(){return this[Ze]}add(t,e){return(e||this.queue.indexOf(t)==-1)&&this.queue.push(t),this[jt]||this[fn](),this}get committingΦ(){return this.queue.indexOf("commit")>=0}get syncingΦ(){return this[Ht]==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[ei]++;if(this.ts||(this.ts=t),this.dt=t-this.ts,this.ts=t,this.queue=[],this[Ht]=1,this[Ze]++,r.length)for(let n=0,o=Ch(r),l=o.length;n=0)return t;if(r?.imports)for(let s=0,n=et(r?.imports),o=n.length;s; rel=modulepreload; as=script"}).join(", ")),this.path=t.localPathForUrl(e)}respond(t,e){var r=this;return X.default.access(this.path,X.default.constants.R_OK,function(s){if(s)return e.writeHead(404,{}),e.end();try{if(r.server.options.setHeaders&&r.server.options.setHeaders(e,r.path),globalThis.BUN)return X.default.readFile(r.path,function(n,o){return e.writeHead(200,r.headers),e.end(o)});{let n=X.default.createReadStream(r.path);return e.writeHead(200,r.headers),n.pipe(e)}}catch{return e.writeHead(503,{}),e.end()}})}createReadStream(){return X.default.createReadStream(this.path)}pipe(t){return this.createReadStream().pipe(t)}},li=class{static wrap(t,e={}){return new this(t,e)}localPathForUrl(t){var e,r,s;let n=t.replace(/\?.*$/,"");return(e=this.urlToLocalPathMap)[n]==null?e[n]=(r=yt.default.resolve(this.publicPath,"."+n),s=X.default.existsSync(r)&&r,!s&&this.staticDir&&(r=yt.default.resolve(this.staticDir,"."+n),s=X.default.existsSync(r)&&r),s):e[n]}headersForAsset(t){let e,r=yt.default.extname(t);return e=Object.assign({"Content-Type":"text/plain","Access-Control-Allow-Origin":"*","cache-control":"public"},si[r.slice(1)]||{})}get manifest(){return globalThis.IMBA_MANIFEST||{}}constructor(t,e={}){var r=this;ue.add(this),this.id=Math.random(),this.options=e,this.closed=!1,this.paused=!1,this.server=t,this.clients=new Set,this.stalledResponses=[],this.assetResponders={},this.urlToLocalPathMap={},this.publicExistsMap={};try{this.rootDir=H.env.IMBA_OUTDIR||yt.default.dirname(H.env.pm_exec_path||H.argv[1])}catch{}try{this.publicPath=yt.default.resolve(this.rootDir,H.env.IMBA_PUBDIR||globalThis.IMBA_PUBDIR||"public")}catch{}this.staticDir=globalThis.IMBA_STATICDIR||"",H.env.IMBA_PATH&&(this.devtoolsPath=yt.default.resolve(H.env.IMBA_PATH,"dist","hmr.js")),this.scheme=t instanceof Nn.default.Server?"http":"https";let s=this.server._events.request,n=globalThis[Eh];t.off("request",s),s[Fh]=this,t.on("listening",function(){let o=r.server.address(),l=o.address;(l=="::"||l=="0.0.0.0")&&(l="localhost");let h=""+r.scheme+"://"+l+":"+o.port+"/";if(!H.env.IMBA_CLUSTER)return console.log("listening on "+h)}),globalThis.IMBA_HMR&&(globalThis.IMBA_HMR_PATH="/__hmr__.js"),r.handler=function(o,l){var h,a;let c=o.constructor.name=="Http2ServerRequest",u=o.url;if(r.paused||r.closed)return l.statusCode=302,l.setHeader("Location",o.url),c||l.setHeader("Connection","close"),r.closed?(c&&o.stream.session.close(),l.end()):r.stalledResponses.push(l);if(globalThis.IMBA_HMR){if(u=="/__hmr__.js"&&r.devtoolsPath){let m=X.default.createReadStream(r.devtoolsPath);return l.writeHead(200,si.js),m.pipe(l)}if(u=="/__hmr__"){let m={"Content-Type":"text/event-stream","Cache-Control":"no-cache"};return c||(m.Connection="keep-alive"),l.writeHead(200,m),r.clients.add(l),r.broadcast("init",globalThis.IMBA_MANIFEST,[l]),o.on("close",function(){return r.clients.delete(l)}),!0}}let p=o.headers,b;c?b=p[":scheme"]+"://"+p[":authority"]:b=(o.connection.encrypted?"https":"http")+"://"+p.host;let f=r.manifest[u];if(f&&r.localPathForUrl(u))return((a=r.assetResponders)[u]||(a[u]=new oi(r,u,f))).respond(o,l);if((u.match(/\.[A-Z\d]{8}\./)||u.match(/\.\w{1,4}($|\?)/))&&(h=r.localPathForUrl(u)))try{let m=r.headersForAsset(h);if(e.setHeaders&&e.setHeaders(l,h),globalThis.BUN)return X.default.readFile(h,function(_,S){return _?(l.writeHead(500,{}),l.write("Error getting the file: "+_)):(l.writeHead(200,m),l.end(S))});{let _=X.default.createReadStream(h);return l.writeHead(200,m),_.pipe(l)}}catch{return l.writeHead(503,{}),l.end()}if(n){let m=new n.Location(o.url,b);return n.Document.create({location:m},function(){return s(o,l)})}else return s(o,l)},t.on("request",r.handler),t.on("close",function(){return console.log("server is closing!!!")}),globalThis.IMBA_RUN&&hi.default.isWorker&&(wn[Tn](),wn.send("serve"))}broadcast(t,e={},r=this.clients){e=JSON.stringify(e);let s="data: "+e+` `;for(let n of et(r))n.write("event: "+t+` `),n.write(`id: imba `),n.write(s);return this}pause(){return this.paused!=!0&&(this.paused=!0,!0)&&this.broadcast("paused"),this}resume(){if(this.paused!=!1&&(this.paused=!1,!0))return this.broadcast("resumed"),this.flushStalledResponses()}flushStalledResponses(){for(let t=0,e=et(this.stalledResponses),r=e.length;t0&&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[Mn],s=this[Pn],n=!0;if(!r)r=this[Mn]=[t],s=this[Pn]=[e||""],this.toString=this.valueOf=this[On];else{let o=r.indexOf(t),l=e||"";o==-1?(r.push(t),s.push(l)):s[o]!=l?s[o]=l:n=!1}n&&(this[kn]=" "+s.join(" "),this.sync())}valueOf(){return this.string}toString(){return this.string}[On](){return this.string+(this[kn]||"")}sync(){return this.dom.flagSync$()}get stacks(){return this[En]||(this[En]={})}};var er=Symbol.for("#__init__"),Fn=Symbol.for("#__initor__"),In=Symbol.for("#__inited__"),fi=Symbol.for("#getRenderContext"),Vh=Symbol.for("#getDynamicContext"),An=Symbol(),C={context:null},di=class{constructor(t=null){this[er](t)}[er](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()}},Gt=new di,B=class extends Map{static[er](){return this.prototype[Fn]=An,this}constructor(t,e=null){super(),this._=t,this.sym=e,this[Fn]===An&&this[In]&&this[In]()}pop(){return C.context=null}[fi](t){let e=this.get(t);return e||this.set(t,e=new B(this._,t)),C.context=e}[Vh](t,e){return this[fi](t)[fi](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}};B[er]();function pi(i,t=Symbol(),e=i){return C.context=i[t]||(i[t]=new B(e,t))}function Dh(){let i=C.context,t=i||new B(null);return globalThis.DEBUG_IMBA&&!i&&Gt.stack.length>0&&console.warn("detected unmemoized nodes in",Gt.stack.slice(0),"see https://imba.io",t),i&&(C.context=null),t}function vi(i){let t;return i?(t=i.toIterable)?t.call(i):i:[]}var z=Symbol.for("#__initor__"),U=Symbol.for("#__inited__"),w=Symbol.for("#__init__"),xi=Symbol.for("#parent"),ro=Symbol.for("#context"),Rn=Symbol.for("#closestNode"),Hh=Symbol.for("#parentNode"),jh=Symbol.for("##inited"),mi=Symbol.for("#getRenderContext"),Gh=Symbol.for("#getDynamicContext"),gi=Symbol.for("#replaceChild"),me=Symbol.for("#appendChild"),Vn=Symbol.for("#removeChild"),bt=Symbol.for("#insertInto"),Dn=Symbol.for("#insertChild"),ce=Symbol.for("#removeFrom"),Hn=Symbol.for("#removeFromDeopt"),$t=Symbol.for("#replaceWith"),jn=Symbol.for("#replaceWithDeopt"),yi=Symbol.for("#placeholderNode"),$h=Symbol.for("#attachToParent"),Bh=Symbol.for("#detachFromParent"),zh=Symbol.for("#placeChild"),Uh=Symbol.for("#beforeReconcile"),qh=Symbol.for("#afterReconcile"),Kh=Symbol.for("#afterVisit"),Yh=Symbol.for("#visitContext"),Gn=Symbol.for("#document"),or=Symbol.for("#htmlNodeName"),$n=Symbol.for("#ImbaElement"),Bn=Symbol.for("#flags"),lr=Symbol.for("#scripts"),bi=Symbol.for("#location"),zn=Symbol.for("##document"),io=Symbol.for("##parent"),Wh=Symbol.for("##up"),Un=Symbol.for("##context"),fe=Symbol.for("#domNode"),rr=Symbol.for("##placeholderNode"),qn=Symbol.for("#domDeopt"),Xh=Symbol.for("#insertIntoDeopt"),Kn=Symbol.for("##classList"),ir=Symbol.for("##style"),Yn=Symbol.for("##dataset"),ot=Symbol.for("#asset"),_i=Symbol.for("#innerHTML"),sr=Symbol.for("##visitContext"),Qh=Symbol.for("#isRichElement"),de=Symbol.for("#src"),Jh=Symbol.for("#getSlot"),Zh=Symbol.for("#cssns"),ta=Symbol.for("#cssid"),ea=Symbol.for("#dom"),Wn=Symbol(),Xn=Symbol(),Qn=Symbol(),Jn=Symbol(),Zn=Symbol(),to=Symbol(),ra={},pe=null,Bt=class extends URL{},Si=class{get document(){return this[Gn]||(this[Gn]=new this.Document(this))}get location(){return this.document.location}};function ia(){return!0}var sa={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},lt=null,so={},wi=class{define(){return this}get(){return this}upgrade(){}whenDefined(){}},na=new wi,no={};function ht(i,t){let e=i;if(typeof i=="string"&&(i=Q[i]||L[i]||Q[i+"Element"]||L["svg_"+i]),i instanceof T)return i;if(!i)return ht("HTML");if(i&&!i.klass){class r extends ht(i.up){}i.klass=r}if(i&&!i.idl){i.idl=!0;let r=Object.getOwnPropertyDescriptors(i.klass.prototype);for(let s=i[1],n=0,o=Object.keys(s),l=o.length,h,a;n=0&&(t=t.replace(/\"/g,""")),t},Ti=function(i,t){let e=typeof i=="string"?i:String(i);return t=="script"||(e.indexOf('"')>=0&&(e=e.replace(/\"/g,""")),e.indexOf("<")>=0&&(e=e.replace(/\")>=0&&(e=e.replace(/\>/g,">"))),e},J=class{static create(t,e){let r=new J;return r[ro]=t,r.location=t.location,pe||(pe=new ci.AsyncLocalStorage),pe.run(r,e),r}constructor(){}get flags(){return this[Bn]||(this[Bn]=new Pt({classList:new zt(this)}))}get scripts(){return this[lr]||(this[lr]=[])}set location(t){typeof t=="string"&&(t=new Bt(t)),this[bi]=t}get location(){return this[bi]||(this[bi]=new Bt("http://localhost/"))}createElement(t){let e=ht(t),r=new e(t);return r.nodeName=t,r}createElementNS(t,e){if(t=="http://www.w3.org/2000/svg"){let r=ht("svg_"+e),s=new r;return s.nodeName=e,s}return this.createElement(e)}createTextNode(t){return new _t(t)}createComment(t){return new rt(t)}createDocumentFragment(){return new Ut}getElementById(t){return null}},at=new J,Li=at;function Zt(){return pe&&pe?.getStore?.()||at}var zt=class{constructor(t,e){this.classes=e||[],this.dom=t}add(t){return this.classes.indexOf(t)<0&&this.classes.push(t),this}remove(t){let e=this.classes.indexOf(t);return e>=0&&(this.classes[e]=""),this}toggle(t){return this.contains(t)?this.remove(t):this.add(t),this}contains(t){return this.classes.indexOf(t)>=0}clone(t){return new zt(t,this.classes.slice(0))}toString(){return this.classes.join(" ").trim()}},hr=class{constructor(){}removeProperty(t){var e;return e=this[t],delete this[t],e}setProperty(t,e){return this[t]=e}toString(){let t=[];for(let e=this,r=0,s=Object.keys(e),n=s.length,o,l;r"}toString(){return this.tag&&this.tag.toNodeString?this.tag.toNodeString():this.outerHTML}};rt[w]();var d=class extends T{static[w](){return this.prototype[z]=Jn,this}constructor(t){super(),this.nodeName=t,this.childNodes=[],this.attributes={},this[z]===Jn&&this[U]&&this[U]()}emit(t,e,r={bubbles:!0}){console.warn("Element#emit not supported on node")}get classList(){return this[Kn]||(this[Kn]=new zt(this))}get style(){return this[ir]||(this[ir]=new hr)}get dataset(){return this[Yn]||(this[Yn]=ge.wrap(this))}get richValue(){return this.value}set richValue(t){this.value=t}set asset(t){this[ot]=t}get asset(){return this[ot]}flag$(){return this}flagIf$(){return this}appendChild(t){return this.childNodes.push(t),t.parentNode=this,t}removeChild(t){let e=this.childNodes.indexOf(t);return e>=0&&this.childNodes.splice(e,1),this}replaceChild(t,e){let r=this.childNodes.indexOf(e);return r>=0&&(this.childNodes.splice(r,1,t),t.parentNode=this),e}insertBefore(t,e){let r=this.childNodes.indexOf(e);return this.childNodes.splice(r,0,t),this}setAttribute(t,e){return this.attributes[t]=e,this}setAttributeNS(t,e,r){return this.setAttribute(t+":"+e,r)}getAttribute(t){return this.attributes?this.attributes[t]:void 0}getAttributeNS(t,e){return this.getAttribute(t+":"+e)}removeAttribute(t){var e;return e=this.attributes[t],delete this.attributes[t],!0}addEventListener(){return this}removeEventListener(){return this}resolve(){return this}set innerHTML(t){this[_i]=t}get innerHTML(){let t="";if(this[_i])return this[_i];if(this.textContent!=null)return Ti(this.textContent);for(let e=0,r=vi(this.childNodes),s=r.length;e":"<"+r+">"+this.innerHTML+""}get firstChild(){return this.childNodes[0]}get lastChild(){return this.childNodes[this.childNodes.length-1]}get firstElementChild(){let t=this.childNodes.length,e=0;for(;e0;){let e=this.childNodes[--t];if(e instanceof d)return e}return null}get className(){return this.classList.toString()}set className(t){this.classList.classes=(t||"").split(" "),this.classList.toString()}log(...t){return console.log(...t)}text$(t){return this.textContent=t,this}[Uh](){return this}[qh](){return this}[Kh](){this.render&&this.render(),this[sr]&&(this[sr]=null)}get[Yh](){return this[sr]||(this[sr]={})}get flags(){return this.$flags||(this.$flags=new Pt(this),this.flag$==d.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=Qe(this,t,d);!r||!r.set?this.setAttribute(t,e):this[t]=e}};d[w]();d.prototype.setns$=d.prototype.setAttributeNS;d.prototype[Qh]=!0;var Ut=class extends d{static[w](){return this.prototype[z]=Zn,this}constructor(){super(null),this[z]===Zn&&this[U]&&this[U]()}get outerHTML(){return this.innerHTML}};Ut[w]();var Ni=class extends Ut{get outerHTML(){return this.innerHTML}},M=class extends d{},ye=class extends M{static[w](){return this.prototype[z]=to,this}constructor(){super(...arguments),super[w]||this[w](),this[z]===to&&this[U]&&this[U]()}[w](t=null){super[w]&&super[w](...arguments),this.hmr=t?t.hmr:void 0}get scripts(){return this[lr]||(this[lr]=[])}get outerHTML(){let t=lt;lt=this;let e=super.outerHTML,r=new Set,s=[],n=[];if(globalThis.IMBA_HMR_PATH&&this.hmr!==!1&&n.push("