diff --git a/backend/internal/web/public/assets/HostPage-BkN2pMDv.js b/backend/internal/web/public/assets/HostPage-BkN2pMDv.js new file mode 100644 index 0000000..041c8e6 --- /dev/null +++ b/backend/internal/web/public/assets/HostPage-BkN2pMDv.js @@ -0,0 +1 @@ +import{t as o,i as l,c as t,a as K,b as x,s as O,d as A,e as et,f as B,g as v,h as I,F as lt,j as it,o as nt,u as rt,k as at,l as st}from"./index.js";var dt=o('
Host
ID
Name
DNS name
Iface
IP
MAC
Hardware
Date
Known
Online
'),_t=o('
Scanning port: '),ut=o("");function ft(){let e=!1;const[s,$]=v(""),[C,b]=v(""),[_,y]=v(""),[u,w]=v([]),f=async()=>{e=!1;let n=Number(s());(Number.isNaN(n)||n<1||n>65535)&&(n=1);let r=Number(C());(Number.isNaN(r)||r<1||r>65535)&&(r=65535);let c;for(let a=n;a<=r&&!e;a++)y(a.toString()),c=await it(t().IP,a),c&&w([...u(),a])},P=()=>{e?($(_()),f()):e=!0};return(()=>{var n=bt(),r=n.firstChild,c=r.nextSibling,a=c.firstChild,g=a.firstChild,h=g.nextSibling,k=h.nextSibling,S=a.nextSibling;return g.$$input=i=>$(i.target.value),h.$$input=i=>b(i.target.value),k.$$click=f,l(c,(()=>{var i=K(()=>_()!="");return()=>i()?(()=>{var d=_t(),m=d.firstChild,p=m.nextSibling;return p.firstChild,m.$$click=P,l(p,_,null),d})():[]})(),S),l(S,I(lt,{get each(){return u()},children:i=>(()=>{var d=ut();return l(d,i),x(()=>O(d,"href","http://"+t().IP+":"+i)),d})()})),n})()}B(["input","click"]);var gt=o("
");function pt(){return nt(async()=>{const e=rt(),s=await at(e.id);st(s)}),(()=>{var e=gt(),s=e.firstChild,$=s.nextSibling;return l(s,I($t,{})),l($,I(ft,{})),e})()}export{pt as default}; diff --git a/backend/internal/web/public/assets/index.js b/backend/internal/web/public/assets/index.js index f2a40a3..a117471 100644 --- a/backend/internal/web/public/assets/index.js +++ b/backend/internal/web/public/assets/index.js @@ -1 +1 @@ -(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))l(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&l(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function l(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();const Se=!1,_e=(e,t)=>e===t,xe=Symbol("solid-track"),U={equals:_e};let ce=de;const I=1,F=2,fe={owned:null,cleanups:null,context:null,owner:null};var h=null;let W=null,ve=null,d=null,g=null,k=null,G=0;function H(e,t){const n=d,l=h,i=e.length===0,s=t===void 0?l:t,o=i?fe:{owned:null,cleanups:null,context:s?s.context:null,owner:s},r=i?e:()=>e(()=>T(()=>O(o)));h=o,d=null;try{return M(r,!0)}finally{d=n,h=l}}function L(e,t){t=t?Object.assign({},U,t):U;const n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},l=i=>(typeof i=="function"&&(i=i(n.value)),ue(n,i));return[ae.bind(n),l]}function K(e,t,n){const l=Z(e,t,!1,I);B(l)}function Ce(e,t,n){ce=Ie;const l=Z(e,t,!1,I);l.user=!0,k?k.push(l):B(l)}function j(e,t,n){n=n?Object.assign({},U,n):U;const l=Z(e,t,!0,0);return l.observers=null,l.observerSlots=null,l.comparator=n.equals||void 0,B(l),ae.bind(l)}function T(e){if(d===null)return e();const t=d;d=null;try{return e()}finally{d=t}}function Ae(e){Ce(()=>T(e))}function ke(e){return h===null||(h.cleanups===null?h.cleanups=[e]:h.cleanups.push(e)),e}function ae(){if(this.sources&&this.state)if(this.state===I)B(this);else{const e=g;g=null,M(()=>V(this),!1),g=e}if(d){const e=this.observers?this.observers.length:0;d.sources?(d.sources.push(this),d.sourceSlots.push(e)):(d.sources=[this],d.sourceSlots=[e]),this.observers?(this.observers.push(d),this.observerSlots.push(d.sources.length-1)):(this.observers=[d],this.observerSlots=[d.sources.length-1])}return this.value}function ue(e,t,n){let l=e.value;return(!e.comparator||!e.comparator(l,t))&&(e.value=t,e.observers&&e.observers.length&&M(()=>{for(let i=0;i1e6)throw g=[],new Error},!1)),t}function B(e){if(!e.fn)return;O(e);const t=G;Ee(e,e.value,t)}function Ee(e,t,n){let l;const i=h,s=d;d=h=e;try{l=e.fn(t)}catch(o){return e.pure&&(e.state=I,e.owned&&e.owned.forEach(O),e.owned=null),e.updatedAt=n+1,be(o)}finally{d=s,h=i}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?ue(e,l):e.value=l,e.updatedAt=n)}function Z(e,t,n,l=I,i){const s={fn:e,state:l,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:h,context:h?h.context:null,pure:n};return h===null||h!==fe&&(h.owned?h.owned.push(s):h.owned=[s]),s}function R(e){if(e.state===0)return;if(e.state===F)return V(e);if(e.suspense&&T(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===I)B(e);else if(e.state===F){const l=g;g=null,M(()=>V(e,t[0]),!1),g=l}}function M(e,t){if(g)return e();let n=!1;t||(g=[]),k?n=!0:k=[],G++;try{const l=e();return Ne(n),l}catch(l){n||(k=null),g=null,be(l)}}function Ne(e){if(g&&(de(g),g=null),e)return;const t=k;k=null,t.length&&M(()=>ce(t),!1)}function de(e){for(let t=0;t=0;t--)O(e.tOwned[t]);delete e.tOwned}if(e.owned){for(t=e.owned.length-1;t>=0;t--)O(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 Te(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function be(e,t=h){throw Te(e)}const De=Symbol("fallback");function ne(e){for(let t=0;t1?[]:null;return ke(()=>ne(s)),()=>{let f=e()||[],a=f.length,u,c;return f[xe],T(()=>{let b,_,m,v,A,$,p,w,x;if(a===0)o!==0&&(ne(s),s=[],l=[],i=[],o=0,r&&(r=[])),n.fallback&&(l=[De],i[0]=H(E=>(s[0]=E,n.fallback())),o=1);else if(o===0){for(i=new Array(a),c=0;c=$&&w>=$&&l[p]===f[w];p--,w--)m[w]=i[p],v[w]=s[p],r&&(A[w]=r[p]);for(b=new Map,_=new Array(w+1),c=w;c>=$;c--)x=f[c],u=b.get(x),_[c]=u===void 0?-1:u,b.set(x,c);for(u=$;u<=p;u++)x=l[u],c=b.get(x),c!==void 0&&c!==-1?(m[c]=i[u],v[c]=s[u],r&&(A[c]=r[u]),c=_[c],b.set(x,c)):s[u]();for(c=$;ce(t||{}))}const Oe=e=>`Stale read from <${e}>.`;function Le(e){const t="fallback"in e&&{fallback:()=>e.fallback};return j(Pe(()=>e.each,e.children,t||void 0))}function $e(e){const t=e.keyed,n=j(()=>e.when,void 0,void 0),l=t?n:j(n,void 0,{equals:(i,s)=>!i==!s});return j(()=>{const i=l();if(i){const s=e.children;return typeof s=="function"&&s.length>0?T(()=>s(t?i:()=>{if(!T(l))throw Oe("Show");return n()})):s}return e.fallback},void 0,void 0)}function Be(e,t,n){let l=n.length,i=t.length,s=l,o=0,r=0,f=t[i-1].nextSibling,a=null;for(;ou-r){const _=t[o];for(;r{i=s,t===document?e():y(t,e(),t.firstChild?null:void 0,n)},l.owner),()=>{i(),t.textContent=""}}function C(e,t,n,l){let i;const s=()=>{const r=document.createElement("template");return r.innerHTML=e,r.content.firstChild},o=()=>(i||(i=s())).cloneNode(!0);return o.cloneNode=o,o}function z(e,t=window.document){const n=t[le]||(t[le]=new Set);for(let l=0,i=e.length;lq(e,t(),i,n),l)}function je(e){let t=e.target;const n=`$$${e.type}`,l=e.target,i=e.currentTarget,s=f=>Object.defineProperty(e,"target",{configurable:!0,value:f}),o=()=>{const f=t[n];if(f&&!t.disabled){const a=t[`${n}Data`];if(a!==void 0?f.call(t,a,e):f.call(t,e),e.cancelBubble)return}return t.host&&typeof t.host!="string"&&!t.host._$host&&t.contains(e.target)&&s(t.host),!0},r=()=>{for(;o()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return t||document}}),e.composedPath){const f=e.composedPath();s(f[0]);for(let a=0;a{let r=t();for(;typeof r=="function";)r=r();n=q(e,r,n,l)}),()=>n;if(Array.isArray(t)){const r=[],f=n&&Array.isArray(n);if(J(r,t,n,i))return K(()=>n=q(e,r,n,l,!0)),()=>n;if(r.length===0){if(n=D(e,n,l),o)return n}else f?n.length===0?ie(e,r,l):Be(e,n,r):(n&&D(e),ie(e,r));n=r}else if(t.nodeType){if(Array.isArray(n)){if(o)return n=D(e,n,l,t);D(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function J(e,t,n,l){let i=!1;for(let s=0,o=t.length;s=0;o--){const r=t[o];if(i!==r){const f=r.parentNode===e;!s&&!o?f?e.replaceChild(i,r):e.insertBefore(i,n):f&&r.remove()}else s=!0}}else e.insertBefore(i,n);return[i]}const ge="",Ue=async()=>{const e=ge+"/api/all";return await(await fetch(e)).json()},se=async(e,t,n)=>{const l=ge+"/api/edit/"+e+"/"+t+"/"+n;return await(await fetch(l)).json()},[pe,Y]=L([]);L();const[we,re]=L(!1);var Fe=C(''),Ke=C(''),Re=C(""),Ve=C('.
');function qe(e){const[t,n]=L(e.host.Name),l="http://"+e.host.IP;let i=Fe();e.host.Now==1&&(i=Ke());let s=!1;e.host.Known==1&&(s=!0);const o=async f=>{n(f),await se(e.host.ID,t(),"")},r=async()=>{await se(e.host.ID,t(),"toggle")};return(()=>{var f=Ve(),a=f.firstChild,u=a.firstChild,c=a.nextSibling,S=c.nextSibling,b=S.nextSibling,_=b.firstChild,m=b.nextSibling,v=m.nextSibling,A=v.nextSibling,$=A.nextSibling,p=$.firstChild,w=p.firstChild,x=$.nextSibling;return y(a,()=>e.index,u),y(c,N($e,{get when(){return we()},get fallback(){return t()},get children(){var E=Re();return E.$$input=Q=>o(Q.target.value),K(()=>E.value=t()),E}})),y(S,()=>e.host.Iface),He(_,"href",l),y(_,()=>e.host.IP),y(m,()=>e.host.Mac),y(v,()=>e.host.Hw),y(A,()=>e.host.Date),w.$$click=r,w.checked=s,y(x,i),f})()}z(["input","click"]);var Ge=C('