(()=>{var{defineProperty:C,getOwnPropertyNames:M,getOwnPropertyDescriptor:R}=Object,j=Object.prototype.hasOwnProperty;var L=new WeakMap,W=(r)=>{var t=L.get(r),c;if(t)return t;if(t=C({},"__esModule",{value:!0}),r&&typeof r==="object"||typeof r==="function")M(r).map((o)=>!j.call(t,o)&&C(t,o,{get:()=>r[o],enumerable:!(c=R(r,o))||c.enumerable}));return L.set(r,t),t};var q=(r,t)=>{for(var c in t)C(r,c,{get:t[c],enumerable:!0,configurable:!0,set:(o)=>t[c]=()=>o})};var U={};q(U,{Fragment:()=>B,$watch:()=>_,$router:()=>v,$mount:()=>I,$if:()=>A,$html:()=>g,$for:()=>P,$:()=>x});var p=null,w=null,b=new Set,S=!1,O=new WeakMap,D=()=>{if(S)return;S=!0;while(b.size>0){let r=Array.from(b).sort((t,c)=>(t.depth||0)-(c.depth||0));b.clear();for(let t of r)if(!t._deleted)t()}S=!1},$=(r)=>{if(p&&!p._deleted)r.add(p),p._deps.add(r)},T=(r)=>{for(let t of r){if(t===p||t._deleted)continue;if(t._isComputed){if(t.markDirty(),t._subs)T(t._subs)}else b.add(t)}if(!S)queueMicrotask(D)},k=(r)=>{if(r._cleanups)r._cleanups.forEach((t)=>t()),r._cleanups.clear();r.childNodes?.forEach(k)},N=(r)=>{let t=new Set,c=w,o=document.createElement("div");o.style.display="contents",w={cleanups:t};try{let i=r({onCleanup:(e)=>t.add(e)}),s=(e)=>{if(!e)return;if(e._isRuntime)t.add(e.destroy),o.appendChild(e.container);else if(Array.isArray(e))e.forEach(s);else o.appendChild(e instanceof Node?e:document.createTextNode(String(e)))};s(i)}finally{w=c}return{_isRuntime:!0,container:o,destroy:()=>{t.forEach((i)=>i()),k(o),o.remove()}}},x=(r,t=null)=>{if(typeof r==="function"){let i=new Set,s,e=!0,a=()=>{if(a._deleted)return;a._deps.forEach((n)=>n.delete(a)),a._deps.clear();let f=p;p=a;try{let n=r();if(!Object.is(s,n)||e)s=n,e=!1,T(i)}finally{p=f}};if(a._deps=new Set,a._isComputed=!0,a._subs=i,a._deleted=!1,a.markDirty=()=>e=!0,a.stop=()=>{a._deleted=!0,a._deps.forEach((f)=>f.delete(a)),i.clear()},w)w.cleanups.add(a.stop);return()=>{if(e)a();return $(i),s}}let c=r;if(t)try{let i=localStorage.getItem(t);if(i!==null)c=JSON.parse(i)}catch(i){console.warn("SigPro: LocalStorage locked",i)}let o=new Set;return(...i)=>{if(i.length){let s=typeof i[0]==="function"?i[0](c):i[0];if(!Object.is(c,s)){if(c=s,t)localStorage.setItem(t,JSON.stringify(c));T(o)}}return $(o),c}};var _=(r,t)=>{let c=Array.isArray(r),o=c?t:r,i=c?r:null;if(typeof o!=="function")return()=>{};let s=w,e=()=>{if(e._deleted)return;e._deps.forEach((n)=>n.delete(e)),e._deps.clear(),e._cleanups.forEach((n)=>n()),e._cleanups.clear();let a=p,f=w;p=e,w={cleanups:e._cleanups},e.depth=a?a.depth+1:0;try{if(c)p=null,o(),p=e,i.forEach((n)=>typeof n==="function"&&n());else o()}finally{p=a,w=f}};if(e._deps=new Set,e._cleanups=new Set,e._deleted=!1,e.stop=()=>{if(e._deleted)return;if(e._deleted=!0,b.delete(e),e._deps.forEach((a)=>a.delete(e)),e._cleanups.forEach((a)=>a()),s)s.cleanups.delete(e.stop)},s)s.cleanups.add(e.stop);return e(),e.stop},g=(r,t={},c=[])=>{if(t instanceof Node||Array.isArray(t)||typeof t!=="object")c=t,t={};let i=["svg","path","circle","rect","line","polyline","polygon","g","defs","text","tspan","use"].includes(r),s=i?document.createElementNS("http://www.w3.org/2000/svg",r):document.createElement(r),e=(n,d)=>(n==="src"||n==="href")&&String(d).toLowerCase().includes("javascript:")?"#":d;s._cleanups=new Set;let a=["disabled","checked","required","readonly","selected","multiple","autofocus"];for(let[n,d]of Object.entries(t)){if(n==="ref"){typeof d==="function"?d(s):d.current=s;continue}let m=typeof d==="function";if(["INPUT","TEXTAREA","SELECT"].includes(s.tagName)&&(n==="value"||n==="checked")&&m){s._cleanups.add(_(()=>{let E=d();if(s[n]!==E)s[n]=E}));let l=n==="checked"?"change":"input",y=(E)=>d(E.target[n]);s.addEventListener(l,y),s._cleanups.add(()=>s.removeEventListener(l,y))}else if(n.startsWith("on")){let l=n.slice(2).toLowerCase().split(".")[0],y=(E)=>d(E);s.addEventListener(l,y),s._cleanups.add(()=>s.removeEventListener(l,y))}else if(m)s._cleanups.add(_(()=>{let l=e(n,d());if(n==="class")s.className=l||"";else if(a.includes(n))if(l)s.setAttribute(n,""),s[n]=!0;else s.removeAttribute(n),s[n]=!1;else if(l==null)s.removeAttribute(n);else if(i&&typeof l==="number")s.setAttribute(n,l);else s.setAttribute(n,l)}));else if(a.includes(n))if(d)s.setAttribute(n,""),s[n]=!0;else s.removeAttribute(n),s[n]=!1;else s.setAttribute(n,e(n,d))}let f=(n)=>{if(Array.isArray(n))return n.forEach(f);if(n instanceof Node)s.appendChild(n);else if(typeof n==="function"){let d=document.createTextNode("");s.appendChild(d);let m=[];s._cleanups.add(_(()=>{let u=n(),h=(Array.isArray(u)?u:[u]).map((l)=>l?._isRuntime?l.container:l instanceof Node?l:document.createTextNode(l??""));m.forEach((l)=>{k?.(l),l.remove()}),h.forEach((l)=>d.parentNode?.insertBefore(l,d)),m=h}))}else s.appendChild(document.createTextNode(n??""))};return f(c),s},A=(r,t,c=null,o=null)=>{let i=document.createTextNode(""),s=g("div",{style:"display:contents"},[i]),e=null,a=null;return _(()=>{let f=!!(typeof r==="function"?r():r);if(f===a)return;if(a=f,e&&!f&&o?.out)o.out(e.container,()=>{e.destroy(),e=null});else{if(e)e.destroy();e=null}if(f||!f&&c){let n=f?t:c;if(n){if(e=N(()=>typeof n==="function"?n():n),s.insertBefore(e.container,i),f&&o?.in)o.in(e.container)}}}),s};A.not=(r,t,c)=>A(()=>!(typeof r==="function"?r():r),t,c);var P=(r,t,c,o="div",i={style:"display:contents"})=>{let s=document.createTextNode(""),e=g(o,i,[s]),a=new Map;return _(()=>{let f=(typeof r==="function"?r():r)||[],n=new Map,d=[];for(let u=0;ut(h,u));else a.delete(l);n.set(l,y),d.push(l)}a.forEach((u)=>{u.destroy(),u.container.remove()});let m=s;for(let u=d.length-1;u>=0;u--){let h=n.get(d[u]);if(h.container.nextSibling!==m)e.insertBefore(h.container,m);m=h.container}a=n}),e},v=(r)=>{let t=x(window.location.hash.replace(/^#/,"")||"/");window.addEventListener("hashchange",()=>t(window.location.hash.replace(/^#/,"")||"/"));let c=g("div",{class:"router-outlet"}),o=null;return _([t],async()=>{let i=t(),s=r.find((e)=>{let a=e.path.split("/").filter(Boolean),f=i.split("/").filter(Boolean);return a.length===f.length&&a.every((n,d)=>n.startsWith(":")||n===f[d])})||r.find((e)=>e.path==="*");if(s){let e=s.component;if(typeof e==="function"&&e.toString().includes("import"))e=(await e()).default||await e();let a={};if(s.path.split("/").filter(Boolean).forEach((f,n)=>{if(f.startsWith(":"))a[f.slice(1)]=i.split("/").filter(Boolean)[n]}),o)o.destroy();if(v.params)v.params(a);o=N(()=>{try{return typeof e==="function"?e(a):e}catch(f){return g("div",{class:"p-4 text-error"},"Error loading view")}}),c.appendChild(o.container)}}),c};v.params=x({});v.to=(r)=>window.location.hash=r.replace(/^#?\/?/,"#/");v.back=()=>window.history.back();v.path=()=>window.location.hash.replace(/^#/,"")||"/";var I=(r,t)=>{let c=typeof t==="string"?document.querySelector(t):t;if(!c)return;if(O.has(c))O.get(c).destroy();let o=N(typeof r==="function"?r:()=>r);return c.replaceChildren(o.container),O.set(c,o),o},B=({children:r})=>r,z={$:x,$watch:_,$html:g,$if:A,$for:P,$router:v,$mount:I,Fragment:B};if(typeof window<"u")((t)=>{Object.keys(t).forEach((o)=>{window[o]=t[o]}),"div span p h1 h2 h3 h4 h5 h6 br hr section article aside nav main header footer address ul ol li dl dt dd a em strong small i b u mark time sub sup pre code blockquote details summary dialog form label input textarea select button option fieldset legend table thead tbody tfoot tr th td caption img video audio canvas svg iframe picture source progress meter".split(/\s+/).forEach((o)=>{let i=o.charAt(0).toUpperCase()+o.slice(1);if(!(i in window))window[i]=(s,e)=>g(o,s,e)}),window.Fragment=B,window.SigPro=Object.freeze(t)})(z);})();