import*as e from"react";import*as t from"@preact/signals-react/runtime";var r={875:function(e,t,r){r.d(t,{gz:()=>a});let n=(e,t)=>{if(null==t)return!1;let r=e.split("/"),n=t.split("/");if(r.length!==n.length)return!1;let a=e.replace(/:\w+/g,"([^/]+)");return RegExp(`^${a}$`).test(t)},a=(e,t)=>{let r;return Object.keys(e).reduce((r,a)=>(n(a,t)&&(r=e[a]),r),r)}}},n={};function a(e){var t=n[e];if(void 0!==t)return t.exports;var o=n[e]={exports:{}};return r[e](o,o.exports,a),o.exports}a.d=(e,t)=>{for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var o={};a.d(o,{j:()=>s});var l=a(875);let s=(0,e.memo)(({className:r,router:n,routes:a,homeUrl:o,notFoundComponent:s})=>{(0,t.useSignals)();let[u,c]=(0,e.useState)(void 0);(0,e.useEffect)(()=>{let e=n.create({config:{homeUrl:o,routeNames:Object.keys(a)},onChange:e=>{c(e.hash)}});return()=>{e(),n.destroy()}},[s,o,n,a]);let i=(u?(0,l.gz)(a,u):null)??s;return e.default.createElement("div",{className:r,key:u},e.default.createElement(i,n.currentEntry.value.getParams()))});var u=o.j;export{u as ClientRouter};
//# sourceMappingURL=ClientRouter.js.map