var e={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return t(this.context.count)},getNextContextId(){return t(this.context.count++)}};function t(t){let n=String(t),r=n.length-1;return e.context.id+(r?String.fromCharCode(96+r):``)+n}function n(t){e.context=t}var r=(e,t)=>e===t,i=Symbol(`solid-proxy`),a=typeof Proxy==`function`,o=Symbol(`solid-track`),s={equals:r},c=null,l=be,u=1,d=2,f={owned:null,cleanups:null,context:null,owner:null},p={},m=null,h=null,g=null,_=null,v=null,y=0;function b(e,t){let n=g,r=m,i=e.length===0,a=t===void 0?r:t,o=i?f:{owned:null,cleanups:null,context:a?a.context:null,owner:a},s=i?e:()=>e(()=>w(()=>N(o)));m=o,g=null;try{return M(s,!0)}finally{g=n,m=r}}function x(e,t){t=t?Object.assign({},s,t):s;let n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0};return[he.bind(n),e=>(typeof e==`function`&&(e=h&&h.running&&h.sources.has(n)?e(n.tValue):e(n.value)),ge(n,e))]}function ee(e,t,n){A(j(e,t,!0,u))}function S(e,t,n){A(j(e,t,!1,u))}function te(e,t,n){l=xe;let r=j(e,t,!1,u),i=k&&O(k);i&&(r.suspense=i),(!n||!n.render)&&(r.user=!0),v?v.push(r):A(r)}function C(e,t,n){n=n?Object.assign({},s,n):s;let r=j(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,A(r),he.bind(r)}function ne(e){return e&&typeof e==`object`&&`then`in e}function re(t,n,r){let i,a,o;typeof n==`function`?(i=t,a=n,o=r||{}):(i=!0,a=t,o=n||{});let s=null,c=p,l=null,u=!1,d=!1,f=`initialValue`in o,_=typeof i==`function`&&C(i),v=new Set,[y,b]=(o.storage||x)(o.initialValue),[S,te]=x(void 0),[re,ie]=x(void 0,{equals:!1}),[ae,oe]=x(f?`ready`:`unresolved`);m&&T(()=>{for(let e of v.keys())e.decrement();v.clear(),h&&s&&h.promises.delete(s),s=null}),e.context&&(l=e.getNextContextId(),o.ssrLoadFrom===`initial`?c=o.initialValue:e.load&&e.has(l)&&(c=e.load(l)));function E(e,t,n,r){return s===e&&(s=null,r!==void 0&&(f=!0),(e===c||t===c)&&o.onHydrated&&queueMicrotask(()=>o.onHydrated(r,{value:t})),c=p,h&&e&&u?(h.promises.delete(e),u=!1,M(()=>{h.running=!0,se(t,n)},!1)):se(t,n)),t}function se(e,t){M(()=>{t===void 0&&b(()=>e),oe(t===void 0?f?`ready`:`unresolved`:`errored`),te(t);for(let e of v.keys())e.decrement();v.clear()},!1)}function D(){let e=k&&O(k),t=y(),n=S();if(n!==void 0&&!s)throw n;return g&&!g.user&&e&&ee(()=>{re(),s&&(e.resolved&&h&&u?h.promises.add(s):v.has(e)||(e.increment(),v.add(e)))}),t}function le(e=!0){if(e!==!1&&d)return;d=!1;let t=_?_():i;if(u=h&&h.running,t==null||t===!1){E(s,w(y));return}h&&s&&h.promises.delete(s);let n,r=c===p?w(()=>{try{return a(t,{value:y(),refetching:e})}catch(e){n=e}}):c;if(n!==void 0){E(s,void 0,P(n),t);return}return ne(r)?(s=r,`v`in r?(r.s===1?E(s,r.v,void 0,t):E(s,void 0,P(r.v),t),r):(d=!0,queueMicrotask(()=>d=!1),M(()=>{oe(f?`refreshing`:`pending`),ie()},!1),r.then(e=>E(r,e,void 0,t),e=>E(r,void 0,P(e),t)))):(E(s,r,void 0,t),r)}Object.defineProperties(D,{state:{get:()=>ae()},error:{get:()=>S()},loading:{get(){let e=ae();return e===`pending`||e===`refreshing`}},latest:{get(){if(!f)return D();let e=S();if(e&&!s)throw e;return y()}}});let ue=m;return _?ee(()=>(ue=m,le(!1))):le(!1),[D,{refetch:e=>ce(ue,()=>le(e)),mutate:b}]}function ie(e){return M(e,!1)}function w(e){if(g===null)return e();let t=g;g=null;try{return e()}finally{g=t}}function ae(e,t,n){let r=Array.isArray(e),i,a=n&&n.defer;return n=>{let o;if(r){o=Array(e.length);for(let t=0;tt(o,i,n));return i=o,s}}function oe(e){te(()=>w(e))}function T(e){return m===null||(m.cleanups===null?m.cleanups=[e]:m.cleanups.push(e)),e}function E(e,t){c||=Symbol(`error`),m=j(void 0,void 0,!0),m.context={...m.context,[c]:[t]},h&&h.running&&h.sources.add(m);try{return e()}catch(e){F(e)}finally{m=m.owner}}function se(){return m}function ce(e,t){let n=m,r=g;m=e,g=null;try{return M(t,!0)}catch(e){F(e)}finally{m=n,g=r}}function D(e){if(h&&h.running)return e(),h.done;let t=g,n=m;return Promise.resolve().then(()=>{g=t,m=n;let r;return k&&(r=h||={sources:new Set,effects:[],promises:new Set,disposed:new Set,queue:new Set,running:!0},r.done||(r.done=new Promise(e=>r.resolve=e)),r.running=!0),M(e,!1),g=m=null,r?r.done:void 0})}var[le,ue]=x(!1);function de(e){v.push.apply(v,e),e.length=0}function fe(e,t){let n=Symbol(`context`);return{id:n,Provider:De(n),defaultValue:e}}function O(e){let t;return m&&m.context&&(t=m.context[e.id])!==void 0?t:e.defaultValue}function pe(e){let t=C(e),n=C(()=>Ee(t()));return n.toArray=()=>{let e=n();return Array.isArray(e)?e:e==null?[]:[e]},n}var k;function me(){return k||=fe()}function he(){let e=h&&h.running;if(this.sources&&(e?this.tState:this.state)){if((e?this.tState:this.state)===u)A(this);else{let e=_;_=null,M(()=>Se(this),!1),_=e}}if(g){let e=this.observers;if(!e||e[e.length-1]!==g){let t=e?e.length:0;g.sources?(g.sources.push(this),g.sourceSlots.push(t)):(g.sources=[this],g.sourceSlots=[t]),e?(e.push(g),this.observerSlots.push(g.sources.length-1)):(this.observers=[g],this.observerSlots=[g.sources.length-1])}}return e&&h.sources.has(this)?this.tValue:this.value}function ge(e,t,n){let r=h&&h.running&&h.sources.has(e)?e.tValue:e.value;if(!e.comparator||!e.comparator(r,t)){if(h){let r=h.running;(r||!n&&h.sources.has(e))&&(h.sources.add(e),e.tValue=t),r||(e.value=t)}else e.value=t;e.observers&&e.observers.length&&M(()=>{for(let t=0;t1e6)throw _=[],Error()},!1)}return t}function A(e){if(!e.fn)return;N(e);let t=y;_e(e,h&&h.running&&h.sources.has(e)?e.tValue:e.value,t),h&&!h.running&&h.sources.has(e)&&queueMicrotask(()=>{M(()=>{h&&(h.running=!0),g=m=e,_e(e,e.tValue,t),g=m=null},!1)})}function _e(e,t,n){let r,i=m,a=g;g=m=e;try{r=e.fn(t)}catch(t){return e.pure&&(h&&h.running?(e.tState=u,e.tOwned&&e.tOwned.forEach(N),e.tOwned=void 0):(e.state=u,e.owned&&e.owned.forEach(N),e.owned=null)),e.updatedAt=n+1,F(t)}finally{g=a,m=i}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&`observers`in e?ge(e,r,!0):h&&h.running&&e.pure?(h.sources.has(e)||(e.value=r),h.sources.add(e),e.tValue=r):e.value=r,e.updatedAt=n)}function j(e,t,n,r=u,i){let a={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:m,context:m?m.context:null,pure:n};return h&&h.running&&(a.state=0,a.tState=r),m===null||m!==f&&(h&&h.running&&m.pure?m.tOwned?m.tOwned.push(a):m.tOwned=[a]:m.owned?m.owned.push(a):m.owned=[a]),a}function ve(e){let t=h&&h.running;if((t?e.tState:e.state)===0)return;if((t?e.tState:e.state)===d)return Se(e);if(e.suspense&&w(e.suspense.inFallback))return e.suspense.effects.push(e);let n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt=0;r--){if(e=n[r],t){let t=e,i=n[r+1];for(;(t=t.owner)&&t!==i;)if(h.disposed.has(t))return}if((t?e.tState:e.state)===u)A(e);else if((t?e.tState:e.state)===d){let t=_;_=null,M(()=>Se(e,n[0]),!1),_=t}}}function M(e,t){if(_)return e();let n=!1;t||(_=[]),v?n=!0:v=[],y++;try{let t=e();return ye(n),t}catch(e){n||(v=null),_=null,F(e)}}function ye(e){if(_&&=(be(_),null),e)return;let t;if(h){if(!h.promises.size&&!h.queue.size){let e=h.sources,n=h.disposed;v.push.apply(v,h.effects),t=h.resolve;for(let e of v)`tState`in e&&(e.state=e.tState),delete e.tState;h=null,M(()=>{for(let e of n)N(e);for(let t of e){if(t.value=t.tValue,t.owned)for(let e=0,n=t.owned.length;el(n),!1),t&&t()}function be(e){for(let t=0;t=0;t--)N(e.tOwned[t]);delete e.tOwned}if(h&&h.running&&e.pure)we(e,!0);else if(e.owned){for(t=e.owned.length-1;t>=0;t--)N(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}h&&h.running?e.tState=0:e.state=0}function we(e,t){if(t||(e.tState=0,h.disposed.add(e)),e.owned)for(let t=0;tn=w(()=>(m.context={...m.context,[e]:t.value},pe(()=>t.children))),void 0),n}}var Oe=Symbol(`fallback`);function ke(e){for(let t=0;t1?[]:null;return T(()=>ke(a)),()=>{let l=e()||[],u=l.length,d,f;return l[o],w(()=>{let e,t,o,m,h,g,_,v,y;if(u===0)s!==0&&(ke(a),a=[],r=[],i=[],s=0,c&&=[]),n.fallback&&(r=[Oe],i[0]=b(e=>(a[0]=e,n.fallback())),s=1);else if(s===0){for(i=Array(u),f=0;f=g&&v>=g&&r[_]===l[v];_--,v--)o[v]=i[_],m[v]=a[_],c&&(h[v]=c[_]);for(e=new Map,t=Array(v+1),f=v;f>=g;f--)y=l[f],d=e.get(y),t[f]=d===void 0?-1:d,e.set(y,f);for(d=g;d<=_;d++)y=r[d],f=e.get(y),f!==void 0&&f!==-1?(o[f]=i[d],m[f]=a[d],c&&(h[f]=c[d]),f=t[f],e.set(y,f)):a[d]();for(f=g;fe(t||{}))}function L(){return!0}var je={get(e,t,n){return t===i?n:e.get(t)},has(e,t){return t===i||e.has(t)},set:L,deleteProperty:L,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:L,deleteProperty:L}},ownKeys(e){return e.keys()}};function Me(e){return(e=typeof e==`function`?e():e)?e:{}}function Ne(){for(let e=0,t=this.length;e=0;n--){let r=Me(e[n])[t];if(r!==void 0)return r}},has(t){for(let n=e.length-1;n>=0;n--)if(t in Me(e[n]))return!0;return!1},keys(){let t=[];for(let n=0;n=0;t--){let i=e[t];if(!i)continue;let a=Object.getOwnPropertyNames(i);for(let e=a.length-1;e>=0;e--){let t=a[e];if(t===`__proto__`||t===`constructor`)continue;let o=Object.getOwnPropertyDescriptor(i,t);if(!r[t])r[t]=o.get?{enumerable:!0,configurable:!0,get:Ne.bind(n[t]=[o.get.bind(i)])}:o.value===void 0?void 0:o;else{let e=n[t];e&&(o.get?e.push(o.get.bind(i)):o.value!==void 0&&e.push(()=>o.value))}}}let o={},s=Object.keys(r);for(let e=s.length-1;e>=0;e--){let t=s[e],n=r[t];n&&n.get?Object.defineProperty(o,t,n):o[t]=n?n.value:void 0}return o}function Pe(e,...t){let n=t.length;if(a&&i in e){let r=n>1?t.flat():t[0],i=new Set,a=t.map(t=>{let n=t.filter(e=>!i.has(e)&&(i.add(e),!0));return new Proxy({get(t){return n.includes(t)?e[t]:void 0},has(t){return n.includes(t)&&t in e},keys(){return n.filter(t=>t in e)}},je)});return a.push(new Proxy({get(t){return r.includes(t)?void 0:e[t]},has(t){return!r.includes(t)&&t in e},keys(){return Object.keys(e).filter(e=>!r.includes(e))}},je)),a}let r=[];for(let e=0;e<=n;e++)r[e]={};for(let i of Object.getOwnPropertyNames(e)){let a=n;for(let e=0;e{if(!i){let e=i=t();e.then(e=>{r=()=>e.default},()=>{i===e&&(i=void 0)})}return i},o=t=>{let i=e.context;if(i){let[t,o]=x();e.count||=0,e.count++,a().then(t=>{!e.done&&n(i),e.count--,o(()=>t.default),n()},t=>{!e.done&&n(i),e.count--,o(()=>()=>{throw t}),n()}),r=t}else if(!r){let[e]=re(()=>a().then(e=>e.default));r=e,T(()=>r=void 0)}let o;return C(()=>(o=r?.())?w(()=>{if(!i||e.done)return o(t);let r=e.context;n(i);let a=o(t);return n(r),a}):``)};return o.preload=()=>a(),o}var Ie=e=>`Stale read from <${e}>.`;function z(e){let t=`fallback`in e&&{fallback:()=>e.fallback};return C(Ae(()=>e.each,e.children,t||void 0))}function B(e){let t=e.keyed,n=C(()=>e.when,void 0,void 0),r=t?n:C(n,void 0,{equals:(e,t)=>!e==!t});return C(()=>{let i=r();if(i){let a=e.children;return typeof a==`function`&&a.length>0?w(()=>a(t?i:()=>{if(!w(r))throw Ie(`Show`);return n()})):a}return e.fallback},void 0,void 0)}function Le(e){let t=pe(()=>e.children),n=C(()=>{let e=t(),n=Array.isArray(e)?e:[e],r=()=>void 0;for(let e=0;ea()?void 0:i.when,void 0,void 0),s=i.keyed?o:C(o,void 0,{equals:(e,t)=>!e==!t});r=()=>a()||(s()?[t,o,i]:void 0)}return r});return C(()=>{let t=n()();if(!t)return e.fallback;let[r,i,a]=t,o=a.children;return typeof o==`function`&&o.length>0?w(()=>o(a.keyed?i():()=>{if(w(n)()?.[0]!==r)throw Ie(`Match`);return i()})):o},void 0,void 0)}function Re(e){return e}var ze;function Be(t){let n;e.context&&e.load&&(n=e.load(e.getContextId()));let[r,i]=x(n,void 0);return ze||=new Set,ze.add(i),T(()=>ze.delete(i)),C(()=>{let e;if(e=r()){let n=t.fallback;return typeof n==`function`&&n.length?w(()=>n(e,()=>i())):n}return E(()=>t.children,i)},void 0,void 0)}var Ve=fe();function He(t){let r=0,i,a,o,s,c,[l,u]=x(!1),d=me(),f={increment:()=>{++r===1&&u(!0)},decrement:()=>{--r===0&&u(!1)},inFallback:l,effects:[],resolved:!1},p=se();if(e.context&&e.load){let t=e.getContextId(),r=e.load(t);if(r&&(typeof r!=`object`||r.s!==1?o=r:e.gather(t)),o&&o!==`$$f`){let[r,i]=x(void 0,{equals:!1});s=r,o.then(()=>{if(e.done)return i();e.gather(t),n(a),i(),n()},e=>{c=e,i()})}}let m=O(Ve);m&&(i=m.register(f.inFallback));let h;return T(()=>h&&h()),I(d.Provider,{value:f,get children(){return C(()=>{if(c)throw c;if(a=e.context,s){s(),s=void 0;return}a&&o===`$$f`&&n();let r=C(()=>t.children);return C(e=>{let s=f.inFallback(),{showContent:c=!0,showFallback:l=!0}=i?i():{};if((!s||o&&o!==`$$f`)&&c)return f.resolved=!0,h&&h(),h=a=o=void 0,de(f.effects),r();if(l)return h?e:b(e=>(h=e,a&&=(n({id:a.id+`F`,count:0}),void 0),t.fallback),p)})})}})}var Ue=new Set([`className`,`value`,`readOnly`,`noValidate`,`formNoValidate`,`isMap`,`noModule`,`playsInline`,`adAuctionHeaders`,`allowFullscreen`,`browsingTopics`,`defaultChecked`,`defaultMuted`,`defaultSelected`,`disablePictureInPicture`,`disableRemotePlayback`,`preservesPitch`,`shadowRootClonable`,`shadowRootCustomElementRegistry`,`shadowRootDelegatesFocus`,`shadowRootSerializable`,`sharedStorageWritable`,...`allowfullscreen.async.alpha.autofocus.autoplay.checked.controls.default.disabled.formnovalidate.hidden.indeterminate.inert.ismap.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.seamless.selected.adauctionheaders.browsingtopics.credentialless.defaultchecked.defaultmuted.defaultselected.defer.disablepictureinpicture.disableremoteplayback.preservespitch.shadowrootclonable.shadowrootcustomelementregistry.shadowrootdelegatesfocus.shadowrootserializable.sharedstoragewritable`.split(`.`)]),We=new Set([`innerHTML`,`textContent`,`innerText`,`children`]),Ge=Object.assign(Object.create(null),{className:`class`,htmlFor:`for`}),Ke=Object.assign(Object.create(null),{class:`className`,novalidate:{$:`noValidate`,FORM:1},formnovalidate:{$:`formNoValidate`,BUTTON:1,INPUT:1},ismap:{$:`isMap`,IMG:1},nomodule:{$:`noModule`,SCRIPT:1},playsinline:{$:`playsInline`,VIDEO:1},readonly:{$:`readOnly`,INPUT:1,TEXTAREA:1},adauctionheaders:{$:`adAuctionHeaders`,IFRAME:1},allowfullscreen:{$:`allowFullscreen`,IFRAME:1},browsingtopics:{$:`browsingTopics`,IMG:1},defaultchecked:{$:`defaultChecked`,INPUT:1},defaultmuted:{$:`defaultMuted`,AUDIO:1,VIDEO:1},defaultselected:{$:`defaultSelected`,OPTION:1},disablepictureinpicture:{$:`disablePictureInPicture`,VIDEO:1},disableremoteplayback:{$:`disableRemotePlayback`,AUDIO:1,VIDEO:1},preservespitch:{$:`preservesPitch`,AUDIO:1,VIDEO:1},shadowrootclonable:{$:`shadowRootClonable`,TEMPLATE:1},shadowrootdelegatesfocus:{$:`shadowRootDelegatesFocus`,TEMPLATE:1},shadowrootserializable:{$:`shadowRootSerializable`,TEMPLATE:1},sharedstoragewritable:{$:`sharedStorageWritable`,IFRAME:1,IMG:1}});function qe(e,t){let n=Ke[e];return typeof n==`object`?n[t]?n.$:void 0:n}var Je=new Set([`beforeinput`,`click`,`dblclick`,`contextmenu`,`focusin`,`focusout`,`input`,`keydown`,`keyup`,`mousedown`,`mousemove`,`mouseout`,`mouseover`,`mouseup`,`pointerdown`,`pointermove`,`pointerout`,`pointerover`,`pointerup`,`touchend`,`touchmove`,`touchstart`]),Ye=new Set(`altGlyph.altGlyphDef.altGlyphItem.animate.animateColor.animateMotion.animateTransform.circle.clipPath.color-profile.cursor.defs.desc.ellipse.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.filter.font.font-face.font-face-format.font-face-name.font-face-src.font-face-uri.foreignObject.g.glyph.glyphRef.hkern.image.line.linearGradient.marker.mask.metadata.missing-glyph.mpath.path.pattern.polygon.polyline.radialGradient.rect.set.stop.svg.switch.symbol.text.textPath.tref.tspan.use.view.vkern`.split(`.`)),Xe={xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`},Ze=e=>C(()=>e());function Qe(e,t,n){let r=n.length,i=t.length,a=r,o=0,s=0,c=t[i-1].nextSibling,l=null;for(;or-s){let i=t[o];for(;s{i=r,t===document?e():W(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{i(),t.textContent=``}}function V(e,t,n,r){let i,a=()=>{let t=r?document.createElementNS(`http://www.w3.org/1998/Math/MathML`,`template`):document.createElement(`template`);return t.innerHTML=e,n?t.content.firstChild.firstChild:r?t.firstChild:t.content.firstChild},o=t?()=>w(()=>document.importNode(i||=a(),!0)):()=>(i||=a()).cloneNode(!0);return o.cloneNode=o,o}function tt(e,t=window.document){let n=t[$e]||(t[$e]=new Set);for(let r=0,i=e.length;rr.call(e,n[1],t))}else e.addEventListener(t,n,typeof n!=`function`&&n)}function at(e,t,n={}){let r=Object.keys(t||{}),i=Object.keys(n),a,o;for(a=0,o=i.length;ai.children=K(e,t.children,i.children)),S(()=>typeof t.ref==`function`&<(t.ref,e)),S(()=>ut(e,t,n,!0,i,!0)),i}function lt(e,t,n){return w(()=>e(t,n))}function W(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!=`function`)return K(e,t,r,n);S(r=>K(e,t(),r,n),r)}function ut(e,t,n,r,i={},a=!1){t||={};for(let r in i)if(!(r in t)){if(r===`children`)continue;i[r]=mt(e,r,null,i[r],n,a,t)}for(let o in t){if(o===`children`){r||K(e,t.children);continue}let s=t[o];i[o]=mt(e,o,s,i[o],n,a,t)}}function dt(t){let n,r;return!G()||!(n=e.registry.get(r=vt()))?t():(e.completed&&e.completed.add(n),e.registry.delete(r),n)}function G(t){return!!e.context&&!e.done&&(!t||t.isConnected)}function ft(e){return e.toLowerCase().replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}function pt(e,t,n){let r=t.trim().split(/\s+/);for(let t=0,i=r.length;t-1&&Xe[t.split(`:`)[0]];r?nt(e,r,t,n):H(e,Ge[t]||t,n)}return n}function ht(t){if(e.registry&&e.events&&e.events.find(([e,n])=>n===t))return;let n=t.target,r=`$$${t.type}`,i=t.target,a=t.currentTarget,o=e=>Object.defineProperty(t,"target",{configurable:!0,value:e}),s=()=>{let e=n[r];if(e&&!n.disabled){let i=n[`${r}Data`];if(i===void 0?e.call(n,t):e.call(n,i,t),t.cancelBubble)return}return n.host&&typeof n.host!=`string`&&!n.host._$host&&n.contains(t.target)&&o(n.host),!0},c=()=>{for(;s()&&(n=n._$host||n.parentNode||n.host););};if(Object.defineProperty(t,"currentTarget",{configurable:!0,get(){return n||document}}),e.registry&&!e.done&&(e.done=_$HY.done=!0),t.composedPath){let e=t.composedPath();o(e[0]);for(let t=0;t{let i=t();for(;typeof i==`function`;)i=i();n=K(e,i,n,r)}),()=>n;else if(Array.isArray(t)){let o=[],c=n&&Array.isArray(n);if(gt(o,t,n,i))return S(()=>n=K(e,o,n,r,!0)),()=>n;if(a){if(!o.length)return n;if(r===void 0)return n=[...e.childNodes];let t=o[0];if(t.parentNode!==e)return n;let i=[t];for(;(t=t.nextSibling)!==r;)i.push(t);return n=i}if(o.length===0){if(n=q(e,n,r),s)return n}else c?n.length===0?_t(e,o,r):Qe(e,n,o):(n&&q(e),_t(e,o));n=o}else if(t.nodeType){if(a&&t.parentNode)return n=s?[t]:t;if(Array.isArray(n)){if(s)return n=q(e,n,r,t);q(e,n,null,t)}else n==null||n===``||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}return n}function gt(e,t,n,r){let i=!1;for(let a=0,o=t.length;a=0;a--){let o=t[a];if(i!==o){let t=o.parentNode===e;!r&&!a?t?e.replaceChild(i,o):e.insertBefore(i,n):t&&o.remove()}else r=!0}}else e.insertBefore(i,n);return[i]}function vt(){return e.getNextContextId()}var yt=`http://www.w3.org/2000/svg`;function bt(e,t=!1,n=void 0){return t?document.createElementNS(yt,e):document.createElement(e,{is:n})}function xt(t,n){let r=C(t);return C(()=>{let t=r();switch(typeof t){case`function`:return w(()=>t(n));case`string`:let r=Ye.has(t),i=e.context?dt():bt(t,r,w(()=>n.is));return ct(i,n,r),i}})}function St(e){let[,t]=Pe(e,[`component`]);return xt(()=>e.component,t)}var Ct=`sync-live-theme`,[wt,Tt]=x(`light`);function Et(){return window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`}function Dt(e){let t=document.documentElement;t.classList.toggle(`dark`,e===`dark`),t.style.colorScheme=e;try{localStorage.setItem(Ct,e)}catch{}Tt(e)}function Ot(){let e=`light`;try{let t=localStorage.getItem(Ct);e=t===`light`||t===`dark`?t:Et()}catch{e=Et()}Dt(e)}function kt(){Dt(wt()===`dark`?`light`:`dark`)}var J={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`},At=fe({size:24,color:`currentColor`,strokeWidth:2,absoluteStrokeWidth:!1,class:``}),jt=V(``),Mt=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Nt=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Pt=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),Ft=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),It=e=>{let t=Pt(e);return t.charAt(0).toUpperCase()+t.slice(1)},Y=e=>{let[t,n]=Pe(e,[`color`,`size`,`strokeWidth`,`children`,`class`,`name`,`iconNode`,`absoluteStrokeWidth`]),r=O(At);return(()=>{var e=jt();return ct(e,R(J,{get width(){return t.size??r.size??J.width},get height(){return t.size??r.size??J.height},get stroke(){return t.color??r.color??J.stroke},get"stroke-width"(){return Ze(()=>(t.absoluteStrokeWidth??r.absoluteStrokeWidth)===!0)()?Number(t.strokeWidth??r.strokeWidth??J[`stroke-width`])*24/Number(t.size??r.size):Number(t.strokeWidth??r.strokeWidth??J[`stroke-width`])},get class(){return Nt(`lucide`,`lucide-icon`,r.class,...t.name==null?[]:[`lucide-${Ft(It(t.name))}`,`lucide-${Ft(t.name)}`],t.class)},get"aria-hidden"(){return!t.children&&!Mt(n)?`true`:void 0}},n),!0,!0),W(e,I(z,{get each(){return t.iconNode},children:([e,t])=>I(St,R({component:e},t))})),e})()},Lt=[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]],Rt=e=>I(Y,R(e,{iconNode:Lt,name:`chevron-down`})),zt=[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]],Bt=e=>I(Y,R(e,{iconNode:zt,name:`circle-alert`})),Vt=[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]],Ht=e=>I(Y,R(e,{iconNode:Vt,name:`circle-check`})),Ut=[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]],Wt=e=>I(Y,R(e,{iconNode:Ut,name:`info`})),Gt=[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]],Kt=e=>I(Y,R(e,{iconNode:Gt,name:`moon`})),qt=[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]],Jt=e=>I(Y,R(e,{iconNode:qt,name:`sun`})),Yt=[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],Xt=e=>I(Y,R(e,{iconNode:Yt,name:`triangle-alert`})),Zt=``,Qt=null;async function $t(e,t,n){let r=await fetch(Zt+t,{method:e,credentials:`same-origin`,headers:n?{"Content-Type":`application/json`}:void 0,body:n?JSON.stringify(n):void 0});if(!r.ok){let e=await r.text().catch(()=>``),t=e||r.statusText||String(r.status),n=Error(t);throw n.status=r.status,n.body=e,n}if(r.status!==204)return(r.headers.get(`content-type`)||``).includes(`application/json`)?await r.json():await r.json().catch(()=>void 0)}async function en(){try{return await $t(`POST`,`/api/auth/refresh`,{}),!0}catch{return!1}}async function X(e,t,n,r=!1){try{return await $t(e,t,n)}catch(i){let a=i?.status,o=t.startsWith(`/api/auth/login`)||t.startsWith(`/api/auth/refresh`)||t.startsWith(`/api/auth/register`);if(!r&&(a===401||a===403)&&!o){Qt||=en().then(()=>{}).finally(()=>{Qt=null}),await Qt;try{return await $t(e,t,n)}catch(e){throw e}}throw i}}var tn={getConfig:()=>X(`GET`,`/api/config`),listRooms:()=>X(`GET`,`/api/rooms`),publish:(e,t,n=``)=>X(`POST`,`/api/publish`,{room:e,backend:t,identity:n}),subscribe:(e,t,n=``)=>X(`POST`,`/api/subscribe`,{room:e,backend:t,identity:n}),stop:(e,t)=>X(`POST`,`/api/stop`,{room:e,backend:t}),login:(e,t)=>X(`POST`,`/api/auth/login`,{username:e,password:t}),register:(e,t,n)=>X(`POST`,`/api/auth/register`,{username:e,password:t,role:n}),logout:()=>X(`POST`,`/api/auth/logout`),me:()=>X(`GET`,`/api/auth/me`),srsStreams:()=>X(`GET`,`/api/srs/streams`),authCheck:()=>X(`GET`,`/api/auth/check`),listUsers:()=>X(`GET`,`/api/auth/users`),updateUserRole:(e,t)=>X(`POST`,`/api/auth/users/role`,{username:e,role:t}),banUser:e=>X(`POST`,`/api/auth/users/ban`,{username:e}),unbanUser:e=>X(`POST`,`/api/auth/users/unban`,{username:e}),refresh:e=>X(`POST`,`/api/auth/refresh`,e?{refresh_token:e}:{}),queryRooms:(e={})=>{let t=new URLSearchParams;for(let[n,r]of Object.entries(e))r!=null&&r!==``&&t.set(n,String(r));let n=t.toString();return X(`GET`,`/api/rooms/query${n?`?${n}`:``}`)},createRoom:e=>X(`POST`,`/api/rooms`,{name:e}),manageOverview:()=>X(`GET`,`/api/manage/overview`),manageRooms:()=>X(`GET`,`/api/manage/rooms`),manageCreateRoom:e=>X(`POST`,`/api/manage/rooms`,e),manageRoomDetail:e=>X(`GET`,`/api/manage/rooms/${encodeURIComponent(e)}`),manageUpdateRoom:(e,t)=>X(`PATCH`,`/api/manage/rooms/${encodeURIComponent(e)}`,t),manageDeleteRoom:e=>X(`DELETE`,`/api/manage/rooms/${encodeURIComponent(e)}`),manageMembers:e=>X(`GET`,`/api/manage/rooms/${encodeURIComponent(e)}/members`),manageUpdateMemberRole:(e,t,n)=>X(`PUT`,`/api/manage/rooms/${encodeURIComponent(e)}/members/${encodeURIComponent(t)}`,{role:n}),manageKickMember:(e,t)=>X(`DELETE`,`/api/manage/rooms/${encodeURIComponent(e)}/members/${encodeURIComponent(t)}`),manageUpdateMemberPerms:(e,t,n,r,i=!1)=>X(`POST`,`/api/manage/rooms/${encodeURIComponent(e)}/members/${encodeURIComponent(t)}/perms`,{added:n,removed:r,is_admin:i}),managePermMatrix:e=>e?X(`GET`,`/api/manage/permissions/${encodeURIComponent(e)}`):X(`GET`,`/api/manage/permissions`),manageRoomSettings:e=>X(`GET`,`/api/manage/rooms/${encodeURIComponent(e)}/settings`),manageUpdateRoomSettings:(e,t)=>X(`PUT`,`/api/manage/rooms/${encodeURIComponent(e)}/settings`,t),manageJoinRoom:(e,t)=>X(`POST`,`/api/manage/rooms/${encodeURIComponent(e)}/join`,{password:t}),manageLeaveRoom:e=>X(`POST`,`/api/manage/rooms/${encodeURIComponent(e)}/leave`)},[Z,nn]=x(null),rn={user:Z,setUser:nn,isAuthed:()=>Z()!=null,isRoot:()=>Z()?.role===`root`,isAdminOrAbove:()=>{let e=Z()?.role;return e===`root`||e===`admin`},status:()=>Z()?.status??`active`,isBanned:()=>Z()?.status===`banned`,isGuest:()=>!Z()||Z()?.role===`guest`};async function an(){try{nn(await tn.me())}catch{nn(null)}}var[Q,on]=x(null),$={check:Q,setCheck:on,refresh:async()=>{try{on(await tn.authCheck())}catch{on(null)}},can:e=>!!Q()?.permissions?.[e],role:()=>Q()?.role??rn.user()?.role??`guest`,status:()=>Q()?.status??rn.user()?.status??`active`,isRoot:()=>$.role()===`root`,isAdmin:()=>{let e=$.role();return e===`root`||e===`admin`},isAdminOrAbove:()=>{let e=$.role();return e===`root`||e===`admin`},isBanned:()=>$.status()===`banned`,canManage:e=>{let t=$.role();return t===`root`?!0:t===`admin`?e===`viewer`||e===`publisher`:!1},isAuthed:()=>!!rn.user()||!!Q()?.authenticated},sn=V(`
`),cn=V(`