');function sr(){Rt(()=>{Dn()});const e=qt(()=>Zt(()=>import("./HostPage-BkN2pMDv.js"),[]));return(()=>{var t=rr(),n=t.firstChild,r=n.firstChild;return O(r,I(An,{get children(){return[I(We,{path:"/",component:nr}),I(We,{path:"/host/:id",component:e})]}})),t})()}const or=document.getElementById("root");Gt(()=>I(sr,{}),or);export{ct as F,L as a,Q as b,gr as c,Ge as d,ur as e,z as f,R as g,I as h,O as i,fr as j,cr as k,pr as l,Rt as o,Ke as s,j as t,ar as u};
+(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();const b={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return Ue(this.context.count)},getNextContextId(){return Ue(this.context.count++)}};function Ue(e){const t=String(e),n=t.length-1;return b.context.id+(n?String.fromCharCode(96+n):"")+t}function te(e){b.context=e}const ze=!1,_t=(e,t)=>e===t,Pe=Symbol("solid-proxy"),Ct=typeof Proxy=="function",At=Symbol("solid-track"),ue={equals:_t};let et=at;const V=1,fe=2,tt={owned:null,cleanups:null,context:null,owner:null},$e={};var v=null;let Se=null,Pt=null,$=null,N=null,q=null,me=0;function ne(e,t){const n=$,r=v,s=e.length===0,i=t===void 0?r:t,o=s?tt:{owned:null,cleanups:null,context:i?i.context:null,owner:i},l=s?e:()=>e(()=>F(()=>se(o)));v=o,$=null;try{return K(l,!0)}finally{$=n,v=r}}function L(e,t){t=t?Object.assign({},ue,t):ue;const n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=s=>(typeof s=="function"&&(s=s(n.value)),lt(n,s));return[ot.bind(n),r]}function kt(e,t,n){const r=be(e,t,!0,V);Z(r)}function G(e,t,n){const r=be(e,t,!1,V);Z(r)}function Et(e,t,n){et=jt;const r=be(e,t,!1,V);r.user=!0,q?q.push(r):Z(r)}function R(e,t,n){n=n?Object.assign({},ue,n):ue;const r=be(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,Z(r),ot.bind(r)}function It(e){return e&&typeof e=="object"&&"then"in e}function Lt(e,t,n){let r,s,i;r=!0,s=e,i={};let o=null,l=$e,a=null,c=!1,f="initialValue"in i,u=typeof r=="function"&&R(r);const g=new Set,[h,w]=(i.storage||L)(i.initialValue),[d,p]=L(void 0),[y,m]=L(void 0,{equals:!1}),[S,x]=L(f?"ready":"unresolved");b.context&&(a=b.getNextContextId(),i.ssrLoadFrom==="initial"?l=i.initialValue:b.load&&b.has(a)&&(l=b.load(a)));function _(k,A,E,W){return o===k&&(o=null,W!==void 0&&(f=!0),(k===l||A===l)&&i.onHydrated&&queueMicrotask(()=>i.onHydrated(W,{value:A})),l=$e,D(A,E)),A}function D(k,A){K(()=>{A===void 0&&w(()=>k),x(A!==void 0?"errored":f?"ready":"unresolved"),p(A);for(const E of g.keys())E.decrement();g.clear()},!1)}function H(){const k=Dt,A=h(),E=d();if(E!==void 0&&!o)throw E;return $&&$.user,A}function U(k=!0){if(k!==!1&&c)return;c=!1;const A=u?u():r;if(A==null||A===!1){_(o,F(h));return}const E=l!==$e?l:F(()=>s(A,{value:h(),refetching:k}));return It(E)?(o=E,"value"in E?(E.status==="success"?_(o,E.value,void 0,A):_(o,void 0,ke(E.value),A),E):(c=!0,queueMicrotask(()=>c=!1),K(()=>{x(f?"refreshing":"pending"),m()},!1),E.then(W=>_(E,W,void 0,A),W=>_(E,void 0,ke(W),A)))):(_(o,E,void 0,A),E)}return Object.defineProperties(H,{state:{get:()=>S()},error:{get:()=>d()},loading:{get(){const k=S();return k==="pending"||k==="refreshing"}},latest:{get(){if(!f)return H();const k=d();if(k&&!o)throw k;return h()}}}),u?kt(()=>U(!1)):U(!1),[H,{refetch:U,mutate:w}]}function Rt(e){return K(e,!1)}function F(e){if($===null)return e();const t=$;$=null;try{return e()}finally{$=t}}function Oe(e,t,n){const r=Array.isArray(e);let s,i=n&&n.defer;return o=>{let l;if(r){l=Array(e.length);for(let c=0;c
t(l,s,o));return s=l,a}}function Ot(e){Et(()=>F(e))}function Ne(e){return v===null||(v.cleanups===null?v.cleanups=[e]:v.cleanups.push(e)),e}function nt(){return v}function rt(e,t){const n=v,r=$;v=e,$=null;try{return K(t,!0)}catch(s){Te(s)}finally{v=n,$=r}}function Nt(e){const t=$,n=v;return Promise.resolve().then(()=>{$=t,v=n;let r;return K(e,!1),$=v=null,r?r.done:void 0})}const[cr,ur]=L(!1);function st(e,t){const n=Symbol("context");return{id:n,Provider:Ht(n),defaultValue:e}}function it(e){let t;return v&&v.context&&(t=v.context[e.id])!==void 0?t:e.defaultValue}function De(e){const t=R(e),n=R(()=>Ee(t()));return n.toArray=()=>{const r=n();return Array.isArray(r)?r:r!=null?[r]:[]},n}let Dt;function ot(){if(this.sources&&this.state)if(this.state===V)Z(this);else{const e=N;N=null,K(()=>he(this),!1),N=e}if($){const e=this.observers?this.observers.length:0;$.sources?($.sources.push(this),$.sourceSlots.push(e)):($.sources=[this],$.sourceSlots=[e]),this.observers?(this.observers.push($),this.observerSlots.push($.sources.length-1)):(this.observers=[$],this.observerSlots=[$.sources.length-1])}return this.value}function lt(e,t,n){let r=e.value;return(!e.comparator||!e.comparator(r,t))&&(e.value=t,e.observers&&e.observers.length&&K(()=>{for(let s=0;s1e6)throw N=[],new Error},!1)),t}function Z(e){if(!e.fn)return;se(e);const t=me;Tt(e,e.value,t)}function Tt(e,t,n){let r;const s=v,i=$;$=v=e;try{r=e.fn(t)}catch(o){return e.pure&&(e.state=V,e.owned&&e.owned.forEach(se),e.owned=null),e.updatedAt=n+1,Te(o)}finally{$=i,v=s}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?lt(e,r):e.value=r,e.updatedAt=n)}function be(e,t,n,r=V,s){const i={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:v,context:v?v.context:null,pure:n};return v===null||v!==tt&&(v.owned?v.owned.push(i):v.owned=[i]),i}function de(e){if(e.state===0)return;if(e.state===fe)return he(e);if(e.suspense&&F(e.suspense.inFallback))return e.suspense.effects.push(e);const t=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt=0;n--)if(e=t[n],e.state===V)Z(e);else if(e.state===fe){const r=N;N=null,K(()=>he(e,t[0]),!1),N=r}}function K(e,t){if(N)return e();let n=!1;t||(N=[]),q?n=!0:q=[],me++;try{const r=e();return Ft(n),r}catch(r){n||(q=null),N=null,Te(r)}}function Ft(e){if(N&&(at(N),N=null),e)return;const t=q;q=null,t.length&&K(()=>et(t),!1)}function at(e){for(let t=0;t=0;t--)se(e.tOwned[t]);delete e.tOwned}if(e.owned){for(t=e.owned.length-1;t>=0;t--)se(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}e.state=0}function ke(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function Te(e,t=v){throw ke(e)}function Ee(e){if(typeof e=="function"&&!e.length)return Ee(e());if(Array.isArray(e)){const t=[];for(let n=0;ns=F(()=>(v.context={...v.context,[e]:r.value},De(()=>r.children))),void 0),s}}const Ut=Symbol("fallback");function Be(e){for(let t=0;t1?[]:null;return Ne(()=>Be(i)),()=>{let a=e()||[],c=a.length,f,u;return a[At],F(()=>{let h,w,d,p,y,m,S,x,_;if(c===0)o!==0&&(Be(i),i=[],r=[],s=[],o=0,l&&(l=[])),n.fallback&&(r=[Ut],s[0]=ne(D=>(i[0]=D,n.fallback())),o=1);else if(o===0){for(s=new Array(c),u=0;u=m&&x>=m&&r[S]===a[x];S--,x--)d[x]=s[S],p[x]=i[S],l&&(y[x]=l[S]);for(h=new Map,w=new Array(x+1),u=x;u>=m;u--)_=a[u],f=h.get(_),w[u]=f===void 0?-1:f,h.set(_,u);for(f=m;f<=S;f++)_=r[f],u=h.get(_),u!==void 0&&u!==-1?(d[u]=s[f],p[u]=i[f],l&&(y[u]=l[f]),u=w[u],h.set(_,u)):i[f]();for(u=m;ue(t||{}))}function ae(){return!0}const Kt={get(e,t,n){return t===Pe?n:e.get(t)},has(e,t){return t===Pe?!0:e.has(t)},set:ae,deleteProperty:ae,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:ae,deleteProperty:ae}},ownKeys(e){return e.keys()}};function xe(e){return(e=typeof e=="function"?e():e)?e:{}}function Mt(){for(let e=0,t=this.length;e=0;l--){const a=xe(e[l])[o];if(a!==void 0)return a}},has(o){for(let l=e.length-1;l>=0;l--)if(o in xe(e[l]))return!0;return!1},keys(){const o=[];for(let l=0;l=0;o--){const l=e[o];if(!l)continue;const a=Object.getOwnPropertyNames(l);for(let c=a.length-1;c>=0;c--){const f=a[c];if(f==="__proto__"||f==="constructor")continue;const u=Object.getOwnPropertyDescriptor(l,f);if(!r[f])r[f]=u.get?{enumerable:!0,configurable:!0,get:Mt.bind(n[f]=[u.get.bind(l)])}:u.value!==void 0?u:void 0;else{const g=n[f];g&&(u.get?g.push(u.get.bind(l)):u.value!==void 0&&g.push(()=>u.value))}}}const s={},i=Object.keys(r);for(let o=i.length-1;o>=0;o--){const l=i[o],a=r[l];a&&a.get?Object.defineProperty(s,l,a):s[l]=a?a.value:void 0}return s}function Vt(e){let t,n;const r=s=>{const i=b.context;if(i){const[l,a]=L();b.count||(b.count=0),b.count++,(n||(n=e())).then(c=>{!b.done&&te(i),b.count--,a(()=>c.default),te()}),t=l}else if(!t){const[l]=Lt(()=>(n||(n=e())).then(a=>a.default));t=l}let o;return R(()=>(o=t())?F(()=>{if(!i||b.done)return o(s);const l=b.context;te(i);const a=o(s);return te(l),a}):"")};return r.preload=()=>n||((n=e()).then(s=>t=()=>s.default),n),r}const Wt=e=>`Stale read from <${e}>.`;function ut(e){const t="fallback"in e&&{fallback:()=>e.fallback};return R(Bt(()=>e.each,e.children,t||void 0))}function we(e){const t=e.keyed,n=R(()=>e.when,void 0,void 0),r=t?n:R(n,void 0,{equals:(s,i)=>!s==!i});return R(()=>{const s=r();if(s){const i=e.children;return typeof i=="function"&&i.length>0?F(()=>i(t?s:()=>{if(!F(r))throw Wt("Show");return n()})):i}return e.fallback},void 0,void 0)}function Gt(e,t,n){let r=n.length,s=t.length,i=r,o=0,l=0,a=t[s-1].nextSibling,c=null;for(;of-l){const w=t[o];for(;l{s=i,t===document?e():O(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{s(),t.textContent=""}}function T(e,t,n,r){let s;const i=()=>{const l=document.createElement("template");return l.innerHTML=e,l.content.firstChild},o=()=>(s||(s=i())).cloneNode(!0);return o.cloneNode=o,o}function z(e,t=window.document){const n=t[Ke]||(t[Ke]=new Set);for(let r=0,s=e.length;rpe(e,t(),s,n),r)}function ft(e){return!!b.context&&!b.done&&(!e||e.isConnected)}function Yt(e){if(b.registry&&b.events&&b.events.find(([a,c])=>c===e))return;let t=e.target;const n=`$$${e.type}`,r=e.target,s=e.currentTarget,i=a=>Object.defineProperty(e,"target",{configurable:!0,value:a}),o=()=>{const a=t[n];if(a&&!t.disabled){const c=t[`${n}Data`];if(c!==void 0?a.call(t,c,e):a.call(t,e),e.cancelBubble)return}return t.host&&typeof t.host!="string"&&!t.host._$host&&t.contains(e.target)&&i(t.host),!0},l=()=>{for(;o()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return t||document}}),b.registry&&!b.done&&(b.done=_$HY.done=!0),e.composedPath){const a=e.composedPath();i(a[0]);for(let c=0;c{let a=t();for(;typeof a=="function";)a=a();n=pe(e,a,n,r)}),()=>n;if(Array.isArray(t)){const a=[],c=n&&Array.isArray(n);if(Ie(a,t,n,s))return G(()=>n=pe(e,a,n,r,!0)),()=>n;if(i){if(!a.length)return n;if(r===void 0)return n=[...e.childNodes];let f=a[0];if(f.parentNode!==e)return n;const u=[f];for(;(f=f.nextSibling)!==r;)u.push(f);return n=u}if(a.length===0){if(n=Q(e,n,r),l)return n}else c?n.length===0?Me(e,a,r):Gt(e,n,a):(n&&Q(e),Me(e,a));n=a}else if(t.nodeType){if(i&&t.parentNode)return n=l?[t]:t;if(Array.isArray(n)){if(l)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 Ie(e,t,n,r){let s=!1;for(let i=0,o=t.length;i=0;o--){const l=t[o];if(s!==l){const a=l.parentNode===e;!i&&!o?a?e.replaceChild(s,l):e.insertBefore(s,n):a&&l.remove()}else i=!0}}else e.insertBefore(s,n);return[s]}const Jt=!1,Qt="modulepreload",Zt=function(e){return"/"+e},qe={},zt=function(t,n,r){let s=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),l=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));s=Promise.allSettled(n.map(a=>{if(a=Zt(a),a in qe)return;qe[a]=!0;const c=a.endsWith(".css"),f=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${a}"]${f}`))return;const u=document.createElement("link");if(u.rel=c?"stylesheet":Qt,c||(u.as="script"),u.crossOrigin="",u.href=a,l&&u.setAttribute("nonce",l),document.head.appendChild(u),c)return new Promise((g,h)=>{u.addEventListener("load",g),u.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${a}`)))})}))}function i(o){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=o,window.dispatchEvent(l),!l.defaultPrevented)throw o}return s.then(o=>{for(const l of o||[])l.status==="rejected"&&i(l.reason);return t().catch(i)})};function dt(){let e=new Set;function t(s){return e.add(s),()=>e.delete(s)}let n=!1;function r(s,i){if(n)return!(n=!1);const o={to:s,options:i,defaultPrevented:!1,preventDefault:()=>o.defaultPrevented=!0};for(const l of e)l.listener({...o,from:l.location,retry:a=>{a&&(n=!0),l.navigate(s,{...i,resolve:!1})}});return!o.defaultPrevented}return{subscribe:t,confirm:r}}let Le;function Fe(){(!window.history.state||window.history.state._depth==null)&&window.history.replaceState({...window.history.state,_depth:window.history.length-1},""),Le=window.history.state._depth}Fe();function en(e){return{...e,_depth:window.history.state&&window.history.state._depth}}function tn(e,t){let n=!1;return()=>{const r=Le;Fe();const s=r==null?null:Le-r;if(n){n=!1;return}s&&t(s)?(n=!0,window.history.go(-s)):e()}}const nn=/^(?:[a-z0-9]+:)?\/\//i,rn=/^\/+|(\/)\/+$/g,ht="http://sr";function re(e,t=!1){const n=e.replace(rn,"$1");return n?t||/^[?#]/.test(n)?n:"/"+n:""}function ce(e,t,n){if(nn.test(t))return;const r=re(e),s=n&&re(n);let i="";return!s||t.startsWith("/")?i=r:s.toLowerCase().indexOf(r.toLowerCase())!==0?i=r+s:i=s,(i||"/")+re(t,!i)}function sn(e,t){if(e==null)throw new Error(t);return e}function on(e,t){return re(e).replace(/\/*(\*.*)?$/g,"")+re(t)}function gt(e){const t={};return e.searchParams.forEach((n,r)=>{r in t?Array.isArray(t[r])?t[r].push(n):t[r]=[t[r],n]:t[r]=n}),t}function ln(e,t,n){const[r,s]=e.split("/*",2),i=r.split("/").filter(Boolean),o=i.length;return l=>{const a=l.split("/").filter(Boolean),c=a.length-o;if(c<0||c>0&&s===void 0&&!t)return null;const f={path:o?"":"/",params:{}},u=g=>n===void 0?void 0:n[g];for(let g=0;gr===e;return t===void 0?!0:typeof t=="string"?n(t):typeof t=="function"?t(e):Array.isArray(t)?t.some(n):t instanceof RegExp?t.test(e):!1}function an(e){const[t,n]=e.pattern.split("/*",2),r=t.split("/").filter(Boolean);return r.reduce((s,i)=>s+(i.startsWith(":")?2:3),r.length-(n===void 0?0:1))}function pt(e){const t=new Map,n=nt();return new Proxy({},{get(r,s){return t.has(s)||rt(n,()=>t.set(s,R(()=>e()[s]))),t.get(s)()},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}},ownKeys(){return Reflect.ownKeys(e())}})}function mt(e){let t=/(\/?\:[^\/]+)\?/.exec(e);if(!t)return[e];let n=e.slice(0,t.index),r=e.slice(t.index+t[0].length);const s=[n,n+=t[1]];for(;t=/^(\/\:[^\/]+)\?/.exec(r);)s.push(n+=t[1]),r=r.slice(t[0].length);return mt(r).reduce((i,o)=>[...i,...s.map(l=>l+o)],[])}const cn=100,bt=st(),wt=st(),un=()=>sn(it(bt)," and 'use' router primitives can be only used inside a Route."),fr=()=>un().params;function fn(e,t=""){const{component:n,preload:r,load:s,children:i,info:o}=e,l=!i||Array.isArray(i)&&!i.length,a={key:e,component:n,preload:r||s,info:o};return yt(e.path).reduce((c,f)=>{for(const u of mt(f)){const g=on(t,u);let h=l?g:g.split("/*",1)[0];h=h.split("/").map(w=>w.startsWith(":")||w.startsWith("*")?w:encodeURIComponent(w)).join("/"),c.push({...a,originalPath:f,pattern:h,matcher:ln(h,!l,e.matchFilters)})}return c},[])}function dn(e,t=0){return{routes:e,score:an(e[e.length-1])*1e4-t,matcher(n){const r=[];for(let s=e.length-1;s>=0;s--){const i=e[s],o=i.matcher(n);if(!o)return null;r.unshift({...o,route:i})}return r}}}function yt(e){return Array.isArray(e)?e:[e]}function vt(e,t="",n=[],r=[]){const s=yt(e);for(let i=0,o=s.length;io.score-i.score)}function Ce(e,t){for(let n=0,r=e.length;n{const u=e();try{return new URL(u,r)}catch{return console.error(`Invalid path ${u}`),f}},r,{equals:(f,u)=>f.href===u.href}),i=R(()=>s().pathname),o=R(()=>s().search,!0),l=R(()=>s().hash),a=()=>"",c=Oe(o,()=>gt(s()));return{get pathname(){return i()},get search(){return o()},get hash(){return l()},get state(){return t()},get key(){return a()},query:n?n(c):pt(c)}}let X;function gn(){return X}function pn(e,t,n,r={}){const{signal:[s,i],utils:o={}}=e,l=o.parsePath||(C=>C),a=o.renderPath||(C=>C),c=o.beforeLeave||dt(),f=ce("",r.base||"");if(f===void 0)throw new Error(`${f} is not a valid base path`);f&&!s().value&&i({value:f,replace:!0,scroll:!1});const[u,g]=L(!1);let h;const w=(C,P)=>{P.value===d()&&P.state===y()||(h===void 0&&g(!0),X=C,h=P,Nt(()=>{h===P&&(p(h.value),m(h.state),_[1](j=>j.filter(Y=>Y.pending)))}).finally(()=>{h===P&&Rt(()=>{X=void 0,C==="navigate"&&W(h),g(!1),h=void 0})}))},[d,p]=L(s().value),[y,m]=L(s().state),S=hn(d,y,o.queryWrapper),x=[],_=L([]),D=R(()=>typeof r.transformUrl=="function"?Ce(t(),r.transformUrl(S.pathname)):Ce(t(),S.pathname)),H=()=>{const C=D(),P={};for(let j=0;jf,outlet:()=>null,resolvePath(C){return ce(f,C)}};return G(Oe(s,C=>w("native",C),{defer:!0})),{base:k,location:S,params:U,isRouting:u,renderPath:a,parsePath:l,navigatorFactory:E,matches:D,beforeLeave:c,preloadRoute:xt,singleFlight:r.singleFlight===void 0?!0:r.singleFlight,submissions:_};function A(C,P,j){F(()=>{if(typeof P=="number"){P&&(o.go?o.go(P):console.warn("Router integration does not support relative routing"));return}const Y=!P||P[0]==="?",{replace:ye,resolve:J,scroll:ve,state:ee}={replace:!1,resolve:!Y,scroll:!0,...j},le=J?C.resolvePath(P):ce(Y&&S.pathname||"",P);if(le===void 0)throw new Error(`Path '${P}' is not a routable path`);if(x.length>=cn)throw new Error("Too many redirects");const He=d();(le!==He||ee!==y())&&(Jt||c.confirm(le,j)&&(x.push({value:He,replace:ye,scroll:ve,state:y()}),w("navigate",{value:le,state:ee})))})}function E(C){return C=C||it(wt)||k,(P,j)=>A(C,P,j)}function W(C){const P=x[0];P&&(i({...C,replace:P.replace,scroll:P.scroll}),x.length=0)}function xt(C,P){const j=Ce(t(),C.pathname),Y=X;X="preload";for(let ye in j){const{route:J,params:ve}=j[ye];J.component&&J.component.preload&&J.component.preload();const{preload:ee}=J;P&&ee&&rt(n(),()=>ee({params:ve,location:{pathname:C.pathname,search:C.search,hash:C.hash,query:gt(C),state:null,key:""},intent:"preload"}))}X=Y}}function mn(e,t,n,r){const{base:s,location:i,params:o}=e,{pattern:l,component:a,preload:c}=r().route,f=R(()=>r().path);a&&a.preload&&a.preload();const u=c?c({params:o,location:i,intent:X||"initial"}):void 0;return{parent:t,pattern:l,path:f,outlet:()=>a?I(a,{params:o,location:i,data:u,get children(){return n()}}):n(),resolvePath(h){return ce(s.path(),h,f())}}}const bn=e=>t=>{const{base:n}=t,r=De(()=>t.children),s=R(()=>vt(r(),t.base||""));let i;const o=pn(e,s,()=>i,{base:n,singleFlight:t.singleFlight,transformUrl:t.transformUrl});return e.create&&e.create(o),I(bt.Provider,{value:o,get children(){return I(wn,{routerState:o,get root(){return t.root},get preload(){return t.rootPreload||t.rootLoad},get children(){return[R(()=>(i=nt())&&null),I(yn,{routerState:o,get branches(){return s()}})]}})}})};function wn(e){const t=e.routerState.location,n=e.routerState.params,r=R(()=>e.preload&&F(()=>{e.preload({params:n,location:t,intent:gn()||"initial"})}));return I(we,{get when(){return e.root},keyed:!0,get fallback(){return e.children},children:s=>I(s,{params:n,location:t,get data(){return r()},get children(){return e.children}})})}function yn(e){const t=[];let n;const r=R(Oe(e.routerState.matches,(s,i,o)=>{let l=i&&s.length===i.length;const a=[];for(let c=0,f=s.length;c{t[c]=h,a[c]=mn(e.routerState,a[c-1]||e.routerState.base,Ve(()=>r()[c+1]),()=>e.routerState.matches()[c])}))}return t.splice(s.length).forEach(c=>c()),o&&l?o:(n=a[0],a)}));return Ve(()=>r()&&n)()}const Ve=e=>()=>I(we,{get when(){return e()},keyed:!0,children:t=>I(wt.Provider,{value:t,get children(){return t.outlet()}})}),We=e=>{const t=De(()=>e.children);return qt(e,{get children(){return t()}})};function vn([e,t],n,r){return[e,r?s=>t(r(s)):t]}function $n(e){let t=!1;const n=s=>typeof s=="string"?{value:s}:s,r=vn(L(n(e.get()),{equals:(s,i)=>s.value===i.value&&s.state===i.state}),void 0,s=>(!t&&e.set(s),b.registry&&!b.done&&(b.done=!0),s));return e.init&&Ne(e.init((s=e.get())=>{t=!0,r[1](n(s)),t=!1})),bn({signal:r,create:e.create,utils:e.utils})}function Sn(e,t,n){return e.addEventListener(t,n),()=>e.removeEventListener(t,n)}function xn(e,t){const n=e&&document.getElementById(e);n?n.scrollIntoView():t&&window.scrollTo(0,0)}const _n=new Map;function Cn(e=!0,t=!1,n="/_server",r){return s=>{const i=s.base.path(),o=s.navigatorFactory(s.base);let l,a;function c(d){return d.namespaceURI==="http://www.w3.org/2000/svg"}function f(d){if(d.defaultPrevented||d.button!==0||d.metaKey||d.altKey||d.ctrlKey||d.shiftKey)return;const p=d.composedPath().find(D=>D instanceof Node&&D.nodeName.toUpperCase()==="A");if(!p||t&&!p.hasAttribute("link"))return;const y=c(p),m=y?p.href.baseVal:p.href;if((y?p.target.baseVal:p.target)||!m&&!p.hasAttribute("state"))return;const x=(p.getAttribute("rel")||"").split(/\s+/);if(p.hasAttribute("download")||x&&x.includes("external"))return;const _=y?new URL(m,document.baseURI):new URL(m);if(!(_.origin!==window.location.origin||i&&_.pathname&&!_.pathname.toLowerCase().startsWith(i.toLowerCase())))return[p,_]}function u(d){const p=f(d);if(!p)return;const[y,m]=p,S=s.parsePath(m.pathname+m.search+m.hash),x=y.getAttribute("state");d.preventDefault(),o(S,{resolve:!1,replace:y.hasAttribute("replace"),scroll:!y.hasAttribute("noscroll"),state:x?JSON.parse(x):void 0})}function g(d){const p=f(d);if(!p)return;const[y,m]=p;r&&(m.pathname=r(m.pathname)),s.preloadRoute(m,y.getAttribute("preload")!=="false")}function h(d){clearTimeout(l);const p=f(d);if(!p)return a=null;const[y,m]=p;a!==y&&(r&&(m.pathname=r(m.pathname)),l=setTimeout(()=>{s.preloadRoute(m,y.getAttribute("preload")!=="false"),a=y},20))}function w(d){if(d.defaultPrevented)return;let p=d.submitter&&d.submitter.hasAttribute("formaction")?d.submitter.getAttribute("formaction"):d.target.getAttribute("action");if(!p)return;if(!p.startsWith("https://action/")){const m=new URL(p,ht);if(p=s.parsePath(m.pathname+m.search),!p.startsWith(n))return}if(d.target.method.toUpperCase()!=="POST")throw new Error("Only POST forms are supported for Actions");const y=_n.get(p);if(y){d.preventDefault();const m=new FormData(d.target,d.submitter);y.call({r:s,f:d.target},d.target.enctype==="multipart/form-data"?m:new URLSearchParams(m))}}z(["click","submit"]),document.addEventListener("click",u),e&&(document.addEventListener("mousemove",h,{passive:!0}),document.addEventListener("focusin",g,{passive:!0}),document.addEventListener("touchstart",g,{passive:!0})),document.addEventListener("submit",w),Ne(()=>{document.removeEventListener("click",u),e&&(document.removeEventListener("mousemove",h),document.removeEventListener("focusin",g),document.removeEventListener("touchstart",g)),document.removeEventListener("submit",w)})}}function An(e){const t=()=>{const r=window.location.pathname.replace(/^\/+/,"/")+window.location.search,s=window.history.state&&window.history.state._depth&&Object.keys(window.history.state).length===1?void 0:window.history.state;return{value:r+window.location.hash,state:s}},n=dt();return $n({get:t,set({value:r,replace:s,scroll:i,state:o}){s?window.history.replaceState(en(o),"",r):window.history.pushState(o,"",r),xn(decodeURIComponent(window.location.hash.slice(1)),i),Fe()},init:r=>Sn(window,"popstate",tn(r,s=>{if(s&&s<0)return!n.confirm(s);{const i=t();return!n.confirm(i.value,{state:i.state})}})),create:Cn(e.preload,e.explicitLinks,e.actionBase,e.transformUrl),utils:{go:r=>window.history.go(r),beforeLeave:n}})(e)}const ie="",Pn=async()=>{const e=ie+"/api/all";return await(await fetch(e)).json()},Ge=async(e,t,n)=>{const r=ie+"/api/edit/"+e+"/"+t+"/"+n;return await(await fetch(r)).json()},dr=async e=>{const t=ie+"/api/host/"+e;return await(await fetch(t)).json()},hr=async e=>{const t=ie+"/api/host/del/"+e;return await(await fetch(t)).json()},gr=async(e,t)=>{const n=ie+"/api/port/"+e+"/"+t;return await(await fetch(n)).json()},kn={ID:0,Name:"",DNS:"",Iface:"",IP:"",Mac:"",Hw:"",Date:"",Known:0,Now:0},[oe,M]=L([]),[Re,En]=L([]),[In,Ln]=L([]),[pr,mr]=L(),[$t,Xe]=L(!1),[br,wr]=L(kn);let Ye="ID";function Rn(){const e=localStorage.getItem("filterField"),t=localStorage.getItem("filterValue");je(e,t)}function je(e,t){let n=oe();switch(Ye==e&&(n=Re()),Ye=e,localStorage.setItem("filterField",e),localStorage.setItem("filterValue",t),e){case"Iface":n=n.filter(r=>r.Iface==t);break;case"Known":n=n.filter(r=>r.Known==t);break;case"Now":n=n.filter(r=>r.Now==t);break;default:n=Re()}M([]),M(n)}let B=!1,Ae="";function On(){const e=localStorage.getItem("sortField");B=JSON.parse(localStorage.getItem("sortDown")),B=!B,St(e)}function St(e){e!=Ae?(Ae=e,B=!B):(Ae="",B=!B),localStorage.setItem("sortDown",B.toString()),localStorage.setItem("sortField",e);let t=oe();e=="IP"?t.sort((n,r)=>Dn(n,r,B)):t.sort((n,r)=>Nn(n,r,e,B)),M([]),M(t)}function Nn(e,t,n,r){return e[n]>t[n]?r?1:-1:r?-1:1}function Dn(e,t,n){const r=Je(e),s=Je(t);return n?r-s:s-r}function Je(e){return Number(e.IP.split(".").map(t=>`000${t}`.slice(-3)).join(""))}function Tn(){Qe(),je("ID",0),setInterval(()=>{Qe()},6e4)}async function Qe(){const e=await Pn();M(e),En(e),On(),Rn(),Fn()}function Fn(){let e=[];for(let t of oe())e.includes(t.Iface)||e.push(t.Iface);Ln(e)}var jn=T(''),Hn=T(''),Un=T(""),Bn=T('| . | | | | | | | | | ');function Kn(e){const[t,n]=L(e.host.Name),r="http://"+e.host.IP,s="/host/"+e.host.ID;let i=jn();e.host.Now==1&&(i=Hn());let o=!1;e.host.Known==1&&(o=!0);const l=async c=>{n(c),await Ge(e.host.ID,t(),"")},a=async()=>{await Ge(e.host.ID,t(),"toggle")};return(()=>{var c=Bn(),f=c.firstChild,u=f.firstChild,g=f.nextSibling,h=g.nextSibling,w=h.nextSibling,d=w.firstChild,p=w.nextSibling,y=p.nextSibling,m=y.nextSibling,S=m.nextSibling,x=S.firstChild,_=x.firstChild,D=S.nextSibling,H=D.nextSibling,U=H.firstChild;return O(f,()=>e.index,u),O(g,I(we,{get when(){return $t()},get fallback(){return t()},get children(){var k=Un();return k.$$input=A=>l(A.target.value),G(()=>k.value=t()),k}})),O(h,()=>e.host.Iface),ge(d,"href",r),O(d,()=>e.host.IP),O(p,()=>e.host.Mac),O(y,()=>e.host.Hw),O(m,()=>e.host.Date),_.$$click=a,_.checked=o,O(D,i),ge(U,"href",s),c})()}z(["input","click"]);var Mn=T(' | Name | Iface | IP | MAC | Hardware | Date | Known | Online | ');function qn(){const e=t=>{St(t)};return(()=>{var t=Mn(),n=t.firstChild,r=n.firstChild,s=r.nextSibling,i=s.firstChild,o=i.nextSibling,l=s.nextSibling,a=l.firstChild,c=a.nextSibling,f=l.nextSibling,u=f.firstChild,g=u.nextSibling,h=f.nextSibling,w=h.firstChild,d=w.nextSibling,p=h.nextSibling,y=p.firstChild,m=y.nextSibling,S=p.nextSibling,x=S.firstChild,_=x.nextSibling,D=S.nextSibling,H=D.firstChild,U=H.nextSibling,k=D.nextSibling,A=k.firstChild,E=A.nextSibling;return o.$$click=e,o.$$clickData="Name",c.$$click=e,c.$$clickData="Iface",g.$$click=e,g.$$clickData="IP",d.$$click=e,d.$$clickData="Mac",m.$$click=e,m.$$clickData="Hw",_.$$click=e,_.$$clickData="Date",U.$$click=e,U.$$clickData="Known",E.$$click=e,E.$$clickData="Now",t})()}z(["click"]);var Vn=T(' |
|---|
|