signetai 0.1.93 → 0.1.95

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- import{bm as he,bt as mt,X as A,q as U,P as T,W as te,bu as _t}from"./pKcKaM5A.js";import{o as qe}from"./DXDZTf9R.js";const V=[];function Se(e,t=he){let n=null;const r=new Set;function a(o){if(mt(e,o)&&(e=o,n)){const l=!V.length;for(const c of r)c[1](),V.push(c,e);if(l){for(let c=0;c<V.length;c+=2)V[c][0](V[c+1]);V.length=0}}}function i(o){a(o(e))}function s(o,l=he){const c=[o,l];return r.add(c),r.size===1&&(n=t(a,i)||he),o(e),()=>{r.delete(c),r.size===0&&n&&(n(),n=null)}}return{set:a,update:i,subscribe:s}}class Ee{constructor(t,n){this.status=t,typeof n=="string"?this.body={message:n}:n?this.body=n:this.body={message:`Error: ${t}`}}toString(){return JSON.stringify(this.body)}}class Re{constructor(t,n){this.status=t,this.location=n}}class xe extends Error{constructor(t,n,r){super(r),this.status=t,this.text=n}}new URL("sveltekit-internal://");function wt(e,t){return e==="/"||t==="ignore"?e:t==="never"?e.endsWith("/")?e.slice(0,-1):e:t==="always"&&!e.endsWith("/")?e+"/":e}function vt(e){return e.split("%25").map(decodeURI).join("%25")}function yt(e){for(const t in e)e[t]=decodeURIComponent(e[t]);return e}function pe({href:e}){return e.split("#")[0]}function bt(e,t,n,r=!1){const a=new URL(e);Object.defineProperty(a,"searchParams",{value:new Proxy(a.searchParams,{get(s,o){if(o==="get"||o==="getAll"||o==="has")return(c,...d)=>(n(c),s[o](c,...d));t();const l=Reflect.get(s,o);return typeof l=="function"?l.bind(s):l}}),enumerable:!0,configurable:!0});const i=["href","pathname","search","toString","toJSON"];r&&i.push("hash");for(const s of i)Object.defineProperty(a,s,{get(){return t(),e[s]},enumerable:!0,configurable:!0});return a}function kt(...e){let t=5381;for(const n of e)if(typeof n=="string"){let r=n.length;for(;r;)t=t*33^n.charCodeAt(--r)}else if(ArrayBuffer.isView(n)){const r=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);let a=r.length;for(;a;)t=t*33^r[--a]}else throw new TypeError("value must be a string or TypedArray");return(t>>>0).toString(36)}new TextEncoder;new TextDecoder;function St(e){const t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n}const Et=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:t?.method||"GET")!=="GET"&&M.delete(Le(e)),Et(e,t));const M=new Map;function Rt(e,t){const n=Le(e,t),r=document.querySelector(n);if(r?.textContent){r.remove();let{body:a,...i}=JSON.parse(r.textContent);const s=r.getAttribute("data-ttl");return s&&M.set(n,{body:a,init:i,ttl:1e3*Number(s)}),r.getAttribute("data-b64")!==null&&(a=St(a)),Promise.resolve(new Response(a,i))}return window.fetch(e,t)}function xt(e,t,n){if(M.size>0){const r=Le(e,n),a=M.get(r);if(a){if(performance.now()<a.ttl&&["default","force-cache","only-if-cached",void 0].includes(n?.cache))return new Response(a.body,a.init);M.delete(r)}}return window.fetch(t,n)}function Le(e,t){let r=`script[data-sveltekit-fetched][data-url=${JSON.stringify(e instanceof Request?e.url:e)}]`;if(t?.headers||t?.body){const a=[];t.headers&&a.push([...new Headers(t.headers)].join(",")),t.body&&(typeof t.body=="string"||ArrayBuffer.isView(t.body))&&a.push(t.body),r+=`[data-hash="${kt(...a)}"]`}return r}const Lt=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function At(e){const t=[];return{pattern:e==="/"?/^\/$/:new RegExp(`^${Tt(e).map(r=>{const a=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(r);if(a)return t.push({name:a[1],matcher:a[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const i=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(r);if(i)return t.push({name:i[1],matcher:i[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!r)return;const s=r.split(/\[(.+?)\](?!\])/);return"/"+s.map((l,c)=>{if(c%2){if(l.startsWith("x+"))return ge(String.fromCharCode(parseInt(l.slice(2),16)));if(l.startsWith("u+"))return ge(String.fromCharCode(...l.slice(2).split("-").map(w=>parseInt(w,16))));const d=Lt.exec(l),[,p,f,u,h]=d;return t.push({name:u,matcher:h,optional:!!p,rest:!!f,chained:f?c===1&&s[0]==="":!1}),f?"([^]*?)":p?"([^/]*)?":"([^/]+?)"}return ge(l)}).join("")}).join("")}/?$`),params:t}}function Ut(e){return e!==""&&!/^\([^)]+\)$/.test(e)}function Tt(e){return e.slice(1).split("/").filter(Ut)}function Pt(e,t,n){const r={},a=e.slice(1),i=a.filter(o=>o!==void 0);let s=0;for(let o=0;o<t.length;o+=1){const l=t[o];let c=a[o-s];if(l.chained&&l.rest&&s&&(c=a.slice(o-s,o+1).filter(d=>d).join("/"),s=0),c===void 0)if(l.rest)c="";else continue;if(!l.matcher||n[l.matcher](c)){r[l.name]=c;const d=t[o+1],p=a[o+1];d&&!d.rest&&d.optional&&p&&l.chained&&(s=0),!d&&!p&&Object.keys(r).length===i.length&&(s=0);continue}if(l.optional&&l.chained){s++;continue}return}if(!s)return r}function ge(e){return e.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function It({nodes:e,server_loads:t,dictionary:n,matchers:r}){const a=new Set(t);return Object.entries(n).map(([o,[l,c,d]])=>{const{pattern:p,params:f}=At(o),u={id:o,exec:h=>{const w=p.exec(h);if(w)return Pt(w,f,r)},errors:[1,...d||[]].map(h=>e[h]),layouts:[0,...c||[]].map(s),leaf:i(l)};return u.errors.length=u.layouts.length=Math.max(u.errors.length,u.layouts.length),u});function i(o){const l=o<0;return l&&(o=~o),[l,e[o]]}function s(o){return o===void 0?o:[a.has(o),e[o]]}}function ze(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function De(e,t,n=JSON.stringify){const r=n(t);try{sessionStorage[e]=r}catch{}}const x=globalThis.__sveltekit_hmbdei?.base??"",Ot=globalThis.__sveltekit_hmbdei?.assets??x??"",$t="1771852873387",He="sveltekit:snapshot",Je="sveltekit:scroll",Ye="sveltekit:states",Ct="sveltekit:pageurl",B="sveltekit:history",z="sveltekit:navigation",N={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},Ae=location.origin;function Xe(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){const n=document.getElementsByTagName("base");t=n.length?n[0].href:document.URL}return new URL(e,t)}function q(){return{x:pageXOffset,y:pageYOffset}}function K(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const Ve={...N,"":N.hover};function Qe(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function Ze(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=Qe(e)}}function we(e,t,n){let r;try{if(r=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){const o=location.hash.split("#")[1]||"/";r.hash=`#${o}${r.hash}`}}catch{}const a=e instanceof SVGAElement?e.target.baseVal:e.target,i=!r||!!a||ue(r,t,n)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),s=r?.origin===Ae&&e.hasAttribute("download");return{url:r,external:i,target:a,download:s}}function ne(e){let t=null,n=null,r=null,a=null,i=null,s=null,o=e;for(;o&&o!==document.documentElement;)r===null&&(r=K(o,"preload-code")),a===null&&(a=K(o,"preload-data")),t===null&&(t=K(o,"keepfocus")),n===null&&(n=K(o,"noscroll")),i===null&&(i=K(o,"reload")),s===null&&(s=K(o,"replacestate")),o=Qe(o);function l(c){switch(c){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:Ve[r??"off"],preload_data:Ve[a??"off"],keepfocus:l(t),noscroll:l(n),reload:l(i),replace_state:l(s)}}function Ke(e){const t=Se(e);let n=!0;function r(){n=!0,t.update(s=>s)}function a(s){n=!1,t.set(s)}function i(s){let o;return t.subscribe(l=>{(o===void 0||n&&l!==o)&&s(o=l)})}return{notify:r,set:a,subscribe:i}}const et={v:()=>{}};function Nt(){const{set:e,subscribe:t}=Se(!1);let n;async function r(){clearTimeout(n);try{const a=await fetch(`${Ot}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!a.ok)return!1;const s=(await a.json()).version!==$t;return s&&(e(!0),et.v(),clearTimeout(n)),s}catch{return!1}}return{subscribe:t,check:r}}function ue(e,t,n){return e.origin!==Ae||!e.pathname.startsWith(t)?!0:n?e.pathname!==location.pathname:!1}function fn(e){}const tt=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...tt];const jt=new Set([...tt]);[...jt];function qt(e){return e.filter(t=>t!=null)}function Ue(e){return e instanceof Ee||e instanceof xe?e.status:500}function Dt(e){return e instanceof xe?e.text:"Internal Error"}let k,H,me;const Vt=qe.toString().includes("$$")||/function \w+\(\) \{\}/.test(qe.toString());Vt?(k={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL("https://example.com")},H={current:null},me={current:!1}):(k=new class{#e=A({});get data(){return U(this.#e)}set data(t){T(this.#e,t)}#t=A(null);get form(){return U(this.#t)}set form(t){T(this.#t,t)}#n=A(null);get error(){return U(this.#n)}set error(t){T(this.#n,t)}#r=A({});get params(){return U(this.#r)}set params(t){T(this.#r,t)}#a=A({id:null});get route(){return U(this.#a)}set route(t){T(this.#a,t)}#o=A({});get state(){return U(this.#o)}set state(t){T(this.#o,t)}#s=A(-1);get status(){return U(this.#s)}set status(t){T(this.#s,t)}#i=A(new URL("https://example.com"));get url(){return U(this.#i)}set url(t){T(this.#i,t)}},H=new class{#e=A(null);get current(){return U(this.#e)}set current(t){T(this.#e,t)}},me=new class{#e=A(!1);get current(){return U(this.#e)}set current(t){T(this.#e,t)}},et.v=()=>me.current=!0);function Kt(e){Object.assign(k,e)}const Be={spanContext(){return Bt},setAttribute(){return this},setAttributes(){return this},addEvent(){return this},setStatus(){return this},updateName(){return this},end(){return this},isRecording(){return!1},recordException(){return this},addLink(){return this},addLinks(){return this}},Bt={traceId:"",spanId:"",traceFlags:0},Ft=new Set(["icon","shortcut icon","apple-touch-icon"]),C=ze(Je)??{},J=ze(He)??{},$={url:Ke({}),page:Ke({}),navigating:Se(null),updated:Nt()};function Te(e){C[e]=q()}function Gt(e,t){let n=e+1;for(;C[n];)delete C[n],n+=1;for(n=t+1;J[n];)delete J[n],n+=1}function Y(e,t=!1){return t?location.replace(e.href):location.href=e.href,new Promise(()=>{})}async function nt(){if("serviceWorker"in navigator){const e=await navigator.serviceWorker.getRegistration(x||"/");e&&await e.update()}}function Fe(){}let Pe,ve,re,P,ye,v;const ae=[],oe=[];let L=null;function be(){L?.fork?.then(e=>e?.discard()),L=null}const ee=new Map,rt=new Set,Mt=new Set,W=new Set;let _={branch:[],error:null,url:null},at=!1,se=!1,Ge=!0,X=!1,G=!1,ot=!1,Ie=!1,st,y,R,j;const ie=new Set,Me=new Map;async function gn(e,t,n){globalThis.__sveltekit_hmbdei?.data&&globalThis.__sveltekit_hmbdei.data,document.URL!==location.href&&(location.href=location.href),v=e,await e.hooks.init?.(),Pe=It(e),P=document.documentElement,ye=t,ve=e.nodes[0],re=e.nodes[1],ve(),re(),y=history.state?.[B],R=history.state?.[z],y||(y=R=Date.now(),history.replaceState({...history.state,[B]:y,[z]:R},""));const r=C[y];function a(){r&&(history.scrollRestoration="manual",scrollTo(r.x,r.y))}n?(a(),await an(ye,n)):(await F({type:"enter",url:Xe(v.hash?ln(new URL(location.href)):location.href),replace_state:!0}),a()),rn()}function Wt(){ae.length=0,Ie=!1}function it(e){oe.some(t=>t?.snapshot)&&(J[e]=oe.map(t=>t?.snapshot?.capture()))}function lt(e){J[e]?.forEach((t,n)=>{oe[n]?.snapshot?.restore(t)})}function We(){Te(y),De(Je,C),it(R),De(He,J)}async function zt(e,t,n,r){let a;t.invalidateAll&&be(),await F({type:"goto",url:Xe(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:n,nav_token:r,accept:()=>{t.invalidateAll&&(Ie=!0,a=[...Me.keys()]),t.invalidate&&t.invalidate.forEach(nn)}}),t.invalidateAll&&te().then(te).then(()=>{Me.forEach(({resource:i},s)=>{a?.includes(s)&&i.refresh?.()})})}async function Ht(e){if(e.id!==L?.id){be();const t={};ie.add(t),L={id:e.id,token:t,promise:ft({...e,preload:t}).then(n=>(ie.delete(t),n.type==="loaded"&&n.state.error&&be(),n)),fork:null}}return L.promise}async function _e(e){const t=(await fe(e,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].map(n=>n?.[1]()))}async function ct(e,t,n){_=e.state;const r=document.querySelector("style[data-sveltekit]");if(r&&r.remove(),Object.assign(k,e.props.page),st=new v.root({target:t,props:{...e.props,stores:$,components:oe},hydrate:n,sync:!1}),await Promise.resolve(),lt(R),n){const a={from:null,to:{params:_.params,route:{id:_.route?.id??null},url:new URL(location.href),scroll:C[y]??q()},willUnload:!1,type:"enter",complete:Promise.resolve()};W.forEach(i=>i(a))}se=!0}function le({url:e,params:t,branch:n,status:r,error:a,route:i,form:s}){let o="never";if(x&&(e.pathname===x||e.pathname===x+"/"))o="always";else for(const u of n)u?.slash!==void 0&&(o=u.slash);e.pathname=wt(e.pathname,o),e.search=e.search;const l={type:"loaded",state:{url:e,params:t,branch:n,error:a,route:i},props:{constructors:qt(n).map(u=>u.node.component),page:je(k)}};s!==void 0&&(l.props.form=s);let c={},d=!k,p=0;for(let u=0;u<Math.max(n.length,_.branch.length);u+=1){const h=n[u],w=_.branch[u];h?.data!==w?.data&&(d=!0),h&&(c={...c,...h.data},d&&(l.props[`data_${p}`]=c),p+=1)}return(!_.url||e.href!==_.url.href||_.error!==a||s!==void 0&&s!==k.form||d)&&(l.props.page={error:a,params:t,route:{id:i?.id??null},state:{},status:r,url:new URL(e),form:s??null,data:d?c:k.data}),l}async function Oe({loader:e,parent:t,url:n,params:r,route:a,server_data_node:i}){let s=null,o=!0;const l={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},c=await e();if(c.universal?.load){let d=function(...f){for(const u of f){const{href:h}=new URL(u,n);l.dependencies.add(h)}};const p={tracing:{enabled:!1,root:Be,current:Be},route:new Proxy(a,{get:(f,u)=>(o&&(l.route=!0),f[u])}),params:new Proxy(r,{get:(f,u)=>(o&&l.params.add(u),f[u])}),data:i?.data??null,url:bt(n,()=>{o&&(l.url=!0)},f=>{o&&l.search_params.add(f)},v.hash),async fetch(f,u){f instanceof Request&&(u={body:f.method==="GET"||f.method==="HEAD"?void 0:await f.blob(),cache:f.cache,credentials:f.credentials,headers:[...f.headers].length>0?f?.headers:void 0,integrity:f.integrity,keepalive:f.keepalive,method:f.method,mode:f.mode,redirect:f.redirect,referrer:f.referrer,referrerPolicy:f.referrerPolicy,signal:f.signal,...u});const{resolved:h,promise:w}=ut(f,u,n);return o&&d(h.href),w},setHeaders:()=>{},depends:d,parent(){return o&&(l.parent=!0),t()},untrack(f){o=!1;try{return f()}finally{o=!0}}};s=await c.universal.load.call(null,p)??null}return{node:c,loader:e,server:i,universal:c.universal?.load?{type:"data",data:s,uses:l}:null,data:s??i?.data??null,slash:c.universal?.trailingSlash??i?.slash}}function ut(e,t,n){let r=e instanceof Request?e.url:e;const a=new URL(r,n);a.origin===n.origin&&(r=a.href.slice(n.origin.length));const i=se?xt(r,a.href,t):Rt(r,t);return{resolved:a,promise:i}}function Jt(e,t,n,r,a,i){if(Ie)return!0;if(!a)return!1;if(a.parent&&e||a.route&&t||a.url&&n)return!0;for(const s of a.search_params)if(r.has(s))return!0;for(const s of a.params)if(i[s]!==_.params[s])return!0;for(const s of a.dependencies)if(ae.some(o=>o(new URL(s))))return!0;return!1}function $e(e,t){return e?.type==="data"?e:e?.type==="skip"?t??null:null}function Yt(e,t){if(!e)return new Set(t.searchParams.keys());const n=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(const r of n){const a=e.searchParams.getAll(r),i=t.searchParams.getAll(r);a.every(s=>i.includes(s))&&i.every(s=>a.includes(s))&&n.delete(r)}return n}function Xt({error:e,url:t,route:n,params:r}){return{type:"loaded",state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:je(k),constructors:[]}}}async function ft({id:e,invalidating:t,url:n,params:r,route:a,preload:i}){if(L?.id===e)return ie.delete(L.token),L.promise;const{errors:s,layouts:o,leaf:l}=a,c=[...o,l];s.forEach(m=>m?.().catch(()=>{})),c.forEach(m=>m?.[1]().catch(()=>{}));const d=_.url?e!==ce(_.url):!1,p=_.route?a.id!==_.route.id:!1,f=Yt(_.url,n);let u=!1;const h=c.map(async(m,g)=>{if(!m)return;const S=_.branch[g];return m[1]===S?.loader&&!Jt(u,p,d,f,S.universal?.uses,r)?S:(u=!0,Oe({loader:m[1],url:n,params:r,route:a,parent:async()=>{const I={};for(let O=0;O<g;O+=1)Object.assign(I,(await h[O])?.data);return I},server_data_node:$e(m[0]?{type:"skip"}:null,m[0]?S?.server:void 0)}))});for(const m of h)m.catch(()=>{});const w=[];for(let m=0;m<c.length;m+=1)if(c[m])try{w.push(await h[m])}catch(g){if(g instanceof Re)return{type:"redirect",location:g.location};if(ie.has(i))return Xt({error:await Q(g,{params:r,url:n,route:{id:a.id}}),url:n,params:r,route:a});let S=Ue(g),E;if(g instanceof Ee)E=g.body;else{if(await $.updated.check())return await nt(),await Y(n);E=await Q(g,{params:r,url:n,route:{id:a.id}})}const I=await Qt(m,w,s);return I?le({url:n,params:r,branch:w.slice(0,I.idx).concat(I.node),status:S,error:E,route:a}):await ht(n,{id:a.id},E,S)}else w.push(void 0);return le({url:n,params:r,branch:w,status:200,error:null,route:a,form:t?void 0:null})}async function Qt(e,t,n){for(;e--;)if(n[e]){let r=e;for(;!t[r];)r-=1;try{return{idx:r+1,node:{node:await n[e](),loader:n[e],data:{},server:null,universal:null}}}catch{continue}}}async function Ce({status:e,error:t,url:n,route:r}){const a={};let i=null;try{const s=await Oe({loader:ve,url:n,params:a,route:r,parent:()=>Promise.resolve({}),server_data_node:$e(i)}),o={node:await re(),loader:re,universal:null,server:null,data:null};return le({url:n,params:a,branch:[s,o],status:e,error:t,route:null})}catch(s){if(s instanceof Re)return zt(new URL(s.location,location.href),{},0);throw s}}async function Zt(e){const t=e.href;if(ee.has(t))return ee.get(t);let n;try{const r=(async()=>{let a=await v.hooks.reroute({url:new URL(e),fetch:async(i,s)=>ut(i,s,e).promise})??e;if(typeof a=="string"){const i=new URL(e);v.hash?i.hash=a:i.pathname=a,a=i}return a})();ee.set(t,r),n=await r}catch{ee.delete(t);return}return n}async function fe(e,t){if(e&&!ue(e,x,v.hash)){const n=await Zt(e);if(!n)return;const r=en(n);for(const a of Pe){const i=a.exec(r);if(i)return{id:ce(e),invalidating:t,route:a,params:yt(i),url:e}}}}function en(e){return vt(v.hash?e.hash.replace(/^#/,"").replace(/[?#].+/,""):e.pathname.slice(x.length))||"/"}function ce(e){return(v.hash?e.hash.replace(/^#/,""):e.pathname)+e.search}function dt({url:e,type:t,intent:n,delta:r,event:a,scroll:i}){let s=!1;const o=Ne(_,n,e,t,i??null);r!==void 0&&(o.navigation.delta=r),a!==void 0&&(o.navigation.event=a);const l={...o.navigation,cancel:()=>{s=!0,o.reject(new Error("navigation cancelled"))}};return X||rt.forEach(c=>c(l)),s?null:o}async function F({type:e,url:t,popped:n,keepfocus:r,noscroll:a,replace_state:i,state:s={},redirect_count:o=0,nav_token:l={},accept:c=Fe,block:d=Fe,event:p}){const f=j;j=l;const u=await fe(t,!1),h=e==="enter"?Ne(_,u,t,e):dt({url:t,type:e,delta:n?.delta,intent:u,scroll:n?.scroll,event:p});if(!h){d(),j===l&&(j=f);return}const w=y,m=R;c(),X=!0,se&&h.navigation.type!=="enter"&&$.navigating.set(H.current=h.navigation);let g=u&&await ft(u);if(!g){if(ue(t,x,v.hash))return await Y(t,i);g=await ht(t,{id:null},await Q(new xe(404,"Not Found",`Not found: ${t.pathname}`),{url:t,params:{},route:{id:null}}),404,i)}if(t=u?.url||t,j!==l)return h.reject(new Error("navigation aborted")),!1;if(g.type==="redirect"){if(o<20){await F({type:e,url:new URL(g.location,t),popped:n,keepfocus:r,noscroll:a,replace_state:i,state:s,redirect_count:o+1,nav_token:l}),h.fulfil(void 0);return}g=await Ce({status:500,error:await Q(new Error("Redirect loop"),{url:t,params:{},route:{id:null}}),url:t,route:{id:null}})}else g.props.page.status>=400&&await $.updated.check()&&(await nt(),await Y(t,i));if(Wt(),Te(w),it(m),g.props.page.url.pathname!==t.pathname&&(t.pathname=g.props.page.url.pathname),s=n?n.state:s,!n){const b=i?0:1,Z={[B]:y+=b,[z]:R+=b,[Ye]:s};(i?history.replaceState:history.pushState).call(history,Z,"",t),i||Gt(y,R)}const S=u&&L?.id===u.id?L.fork:null;L=null,g.props.page.state=s;let E;if(se){const b=(await Promise.all(Array.from(Mt,D=>D(h.navigation)))).filter(D=>typeof D=="function");if(b.length>0){let D=function(){b.forEach(de=>{W.delete(de)})};b.push(D),b.forEach(de=>{W.add(de)})}_=g.state,g.props.page&&(g.props.page.url=t);const Z=S&&await S;Z?E=Z.commit():(st.$set(g.props),Kt(g.props.page),E=_t?.()),ot=!0}else await ct(g,ye,!1);const{activeElement:I}=document;await E,await te(),await te();let O=null;if(Ge){const b=n?n.scroll:a?q():null;b?scrollTo(b.x,b.y):(O=t.hash&&document.getElementById(pt(t)))?O.scrollIntoView():scrollTo(0,0)}const gt=document.activeElement!==I&&document.activeElement!==document.body;!r&&!gt&&sn(t,!O),Ge=!0,g.props.page&&Object.assign(k,g.props.page),X=!1,e==="popstate"&&lt(R),h.fulfil(void 0),h.navigation.to&&(h.navigation.to.scroll=q()),W.forEach(b=>b(h.navigation)),$.navigating.set(H.current=null)}async function ht(e,t,n,r,a){return e.origin===Ae&&e.pathname===location.pathname&&!at?await Ce({status:r,error:n,url:e,route:t}):await Y(e,a)}function tn(){let e,t={element:void 0,href:void 0},n;P.addEventListener("mousemove",o=>{const l=o.target;clearTimeout(e),e=setTimeout(()=>{i(l,N.hover)},20)});function r(o){o.defaultPrevented||i(o.composedPath()[0],N.tap)}P.addEventListener("mousedown",r),P.addEventListener("touchstart",r,{passive:!0});const a=new IntersectionObserver(o=>{for(const l of o)l.isIntersecting&&(_e(new URL(l.target.href)),a.unobserve(l.target))},{threshold:0});async function i(o,l){const c=Ze(o,P),d=c===t.element&&c?.href===t.href&&l>=n;if(!c||d)return;const{url:p,external:f,download:u}=we(c,x,v.hash);if(f||u)return;const h=ne(c),w=p&&ce(_.url)===ce(p);if(!(h.reload||w))if(l<=h.preload_data){t={element:c,href:c.href},n=N.tap;const m=await fe(p,!1);if(!m)return;Ht(m)}else l<=h.preload_code&&(t={element:c,href:c.href},n=l,_e(p))}function s(){a.disconnect();for(const o of P.querySelectorAll("a")){const{url:l,external:c,download:d}=we(o,x,v.hash);if(c||d)continue;const p=ne(o);p.reload||(p.preload_code===N.viewport&&a.observe(o),p.preload_code===N.eager&&_e(l))}}W.add(s),s()}function Q(e,t){if(e instanceof Ee)return e.body;const n=Ue(e),r=Dt(e);return v.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function nn(e){if(typeof e=="function")ae.push(e);else{const{href:t}=new URL(e,location.href);ae.push(n=>n.href===t)}}function rn(){history.scrollRestoration="manual",addEventListener("beforeunload",t=>{let n=!1;if(We(),!X){const r=Ne(_,void 0,null,"leave"),a={...r.navigation,cancel:()=>{n=!0,r.reject(new Error("navigation cancelled"))}};rt.forEach(i=>i(a))}n?(t.preventDefault(),t.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&We()}),navigator.connection?.saveData||tn(),P.addEventListener("click",async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;const n=Ze(t.composedPath()[0],P);if(!n)return;const{url:r,external:a,target:i,download:s}=we(n,x,v.hash);if(!r)return;if(i==="_parent"||i==="_top"){if(window.parent!==window)return}else if(i&&i!=="_self")return;const o=ne(n);if(!(n instanceof SVGAElement)&&r.protocol!==location.protocol&&!(r.protocol==="https:"||r.protocol==="http:")||s)return;const[c,d]=(v.hash?r.hash.replace(/^#/,""):r.href).split("#"),p=c===pe(location);if(a||o.reload&&(!p||!d)){dt({url:r,type:"link",event:t})?X=!0:t.preventDefault();return}if(d!==void 0&&p){const[,f]=_.url.href.split("#");if(f===d){if(t.preventDefault(),d===""||d==="top"&&n.ownerDocument.getElementById("top")===null)scrollTo({top:0});else{const u=n.ownerDocument.getElementById(decodeURIComponent(d));u&&(u.scrollIntoView(),u.focus())}return}if(G=!0,Te(y),e(r),!o.replace_state)return;G=!1}t.preventDefault(),await new Promise(f=>{requestAnimationFrame(()=>{setTimeout(f,0)}),setTimeout(f,100)}),await F({type:"link",url:r,keepfocus:o.keepfocus,noscroll:o.noscroll,replace_state:o.replace_state??r.href===location.href,event:t})}),P.addEventListener("submit",t=>{if(t.defaultPrevented)return;const n=HTMLFormElement.prototype.cloneNode.call(t.target),r=t.submitter;if((r?.formTarget||n.target)==="_blank"||(r?.formMethod||n.method)!=="get")return;const s=new URL(r?.hasAttribute("formaction")&&r?.formAction||n.action);if(ue(s,x,!1))return;const o=t.target,l=ne(o);if(l.reload)return;t.preventDefault(),t.stopPropagation();const c=new FormData(o,r);s.search=new URLSearchParams(c).toString(),F({type:"form",url:s,keepfocus:l.keepfocus,noscroll:l.noscroll,replace_state:l.replace_state??s.href===location.href,event:t})}),addEventListener("popstate",async t=>{if(!ke){if(t.state?.[B]){const n=t.state[B];if(j={},n===y)return;const r=C[n],a=t.state[Ye]??{},i=new URL(t.state[Ct]??location.href),s=t.state[z],o=_.url?pe(location)===pe(_.url):!1;if(s===R&&(ot||o)){a!==k.state&&(k.state=a),e(i),C[y]=q(),r&&scrollTo(r.x,r.y),y=n;return}const c=n-y;await F({type:"popstate",url:i,popped:{state:a,scroll:r,delta:c},accept:()=>{y=n,R=s},block:()=>{history.go(-c)},nav_token:j,event:t})}else if(!G){const n=new URL(location.href);e(n),v.hash&&location.reload()}}}),addEventListener("hashchange",()=>{G&&(G=!1,history.replaceState({...history.state,[B]:++y,[z]:R},"",location.href))});for(const t of document.querySelectorAll("link"))Ft.has(t.rel)&&(t.href=t.href);addEventListener("pageshow",t=>{t.persisted&&$.navigating.set(H.current=null)});function e(t){_.url=k.url=t,$.page.set(je(k)),$.page.notify()}}async function an(e,{status:t=200,error:n,node_ids:r,params:a,route:i,server_route:s,data:o,form:l}){at=!0;const c=new URL(location.href);let d;({params:a={},route:i={id:null}}=await fe(c,!1)||{}),d=Pe.find(({id:u})=>u===i.id);let p,f=!0;try{const u=r.map(async(w,m)=>{const g=o[m];return g?.uses&&(g.uses=on(g.uses)),Oe({loader:v.nodes[w],url:c,params:a,route:i,parent:async()=>{const S={};for(let E=0;E<m;E+=1)Object.assign(S,(await u[E]).data);return S},server_data_node:$e(g)})}),h=await Promise.all(u);if(d){const w=d.layouts;for(let m=0;m<w.length;m++)w[m]||h.splice(m,0,void 0)}p=le({url:c,params:a,branch:h,status:t,error:n,form:l,route:d??null})}catch(u){if(u instanceof Re){await Y(new URL(u.location,location.href));return}p=await Ce({status:Ue(u),error:await Q(u,{url:c,params:a,route:i}),url:c,route:i}),e.textContent="",f=!1}p.props.page&&(p.props.page.state={}),await ct(p,e,f)}function on(e){return{dependencies:new Set(e?.dependencies??[]),params:new Set(e?.params??[]),parent:!!e?.parent,route:!!e?.route,url:!!e?.url,search_params:new Set(e?.search_params??[])}}let ke=!1;function sn(e,t=!0){const n=document.querySelector("[autofocus]");if(n)n.focus();else{const r=pt(e);if(r&&document.getElementById(r)){const{x:i,y:s}=q();setTimeout(()=>{const o=history.state;ke=!0,location.replace(new URL(`#${r}`,location.href)),history.replaceState(o,"",e),t&&scrollTo(i,s),ke=!1})}else{const i=document.body,s=i.getAttribute("tabindex");i.tabIndex=-1,i.focus({preventScroll:!0,focusVisible:!1}),s!==null?i.setAttribute("tabindex",s):i.removeAttribute("tabindex")}const a=getSelection();if(a&&a.type!=="None"){const i=[];for(let s=0;s<a.rangeCount;s+=1)i.push(a.getRangeAt(s));setTimeout(()=>{if(a.rangeCount===i.length){for(let s=0;s<a.rangeCount;s+=1){const o=i[s],l=a.getRangeAt(s);if(o.commonAncestorContainer!==l.commonAncestorContainer||o.startContainer!==l.startContainer||o.endContainer!==l.endContainer||o.startOffset!==l.startOffset||o.endOffset!==l.endOffset)return}a.removeAllRanges()}})}}}function Ne(e,t,n,r,a=null){let i,s;const o=new Promise((c,d)=>{i=c,s=d});return o.catch(()=>{}),{navigation:{from:{params:e.params,route:{id:e.route?.id??null},url:e.url,scroll:q()},to:n&&{params:t?.params??null,route:{id:t?.route?.id??null},url:n,scroll:a},willUnload:!t,type:r,complete:o},fulfil:i,reject:s}}function je(e){return{data:e.data,error:e.error,form:e.form,params:e.params,route:e.route,state:e.state,status:e.status,url:e.url}}function ln(e){const t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function pt(e){let t;if(v.hash){const[,,n]=e.hash.split("#",3);t=n??""}else t=e.hash.slice(1);return decodeURIComponent(t)}export{gn as a,fn as l,k as p,$ as s};
1
+ import{bm as he,bt as mt,X as A,q as U,P as T,W as te,bu as _t}from"./pKcKaM5A.js";import{o as je}from"./DXDZTf9R.js";const V=[];function Se(e,t=he){let n=null;const r=new Set;function a(o){if(mt(e,o)&&(e=o,n)){const c=!V.length;for(const l of r)l[1](),V.push(l,e);if(c){for(let l=0;l<V.length;l+=2)V[l][0](V[l+1]);V.length=0}}}function i(o){a(o(e))}function s(o,c=he){const l=[o,c];return r.add(l),r.size===1&&(n=t(a,i)||he),o(e),()=>{r.delete(l),r.size===0&&n&&(n(),n=null)}}return{set:a,update:i,subscribe:s}}class Ee{constructor(t,n){this.status=t,typeof n=="string"?this.body={message:n}:n?this.body=n:this.body={message:`Error: ${t}`}}toString(){return JSON.stringify(this.body)}}class Re{constructor(t,n){this.status=t,this.location=n}}class xe extends Error{constructor(t,n,r){super(r),this.status=t,this.text=n}}new URL("sveltekit-internal://");function wt(e,t){return e==="/"||t==="ignore"?e:t==="never"?e.endsWith("/")?e.slice(0,-1):e:t==="always"&&!e.endsWith("/")?e+"/":e}function vt(e){return e.split("%25").map(decodeURI).join("%25")}function yt(e){for(const t in e)e[t]=decodeURIComponent(e[t]);return e}function pe({href:e}){return e.split("#")[0]}function bt(e,t,n,r=!1){const a=new URL(e);Object.defineProperty(a,"searchParams",{value:new Proxy(a.searchParams,{get(s,o){if(o==="get"||o==="getAll"||o==="has")return(l,...d)=>(n(l),s[o](l,...d));t();const c=Reflect.get(s,o);return typeof c=="function"?c.bind(s):c}}),enumerable:!0,configurable:!0});const i=["href","pathname","search","toString","toJSON"];r&&i.push("hash");for(const s of i)Object.defineProperty(a,s,{get(){return t(),e[s]},enumerable:!0,configurable:!0});return a}function kt(...e){let t=5381;for(const n of e)if(typeof n=="string"){let r=n.length;for(;r;)t=t*33^n.charCodeAt(--r)}else if(ArrayBuffer.isView(n)){const r=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);let a=r.length;for(;a;)t=t*33^r[--a]}else throw new TypeError("value must be a string or TypedArray");return(t>>>0).toString(36)}new TextEncoder;new TextDecoder;function St(e){const t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n}const Et=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:t?.method||"GET")!=="GET"&&M.delete(Le(e)),Et(e,t));const M=new Map;function Rt(e,t){const n=Le(e,t),r=document.querySelector(n);if(r?.textContent){r.remove();let{body:a,...i}=JSON.parse(r.textContent);const s=r.getAttribute("data-ttl");return s&&M.set(n,{body:a,init:i,ttl:1e3*Number(s)}),r.getAttribute("data-b64")!==null&&(a=St(a)),Promise.resolve(new Response(a,i))}return window.fetch(e,t)}function xt(e,t,n){if(M.size>0){const r=Le(e,n),a=M.get(r);if(a){if(performance.now()<a.ttl&&["default","force-cache","only-if-cached",void 0].includes(n?.cache))return new Response(a.body,a.init);M.delete(r)}}return window.fetch(t,n)}function Le(e,t){let r=`script[data-sveltekit-fetched][data-url=${JSON.stringify(e instanceof Request?e.url:e)}]`;if(t?.headers||t?.body){const a=[];t.headers&&a.push([...new Headers(t.headers)].join(",")),t.body&&(typeof t.body=="string"||ArrayBuffer.isView(t.body))&&a.push(t.body),r+=`[data-hash="${kt(...a)}"]`}return r}const Lt=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function At(e){const t=[];return{pattern:e==="/"?/^\/$/:new RegExp(`^${Tt(e).map(r=>{const a=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(r);if(a)return t.push({name:a[1],matcher:a[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const i=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(r);if(i)return t.push({name:i[1],matcher:i[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!r)return;const s=r.split(/\[(.+?)\](?!\])/);return"/"+s.map((c,l)=>{if(l%2){if(c.startsWith("x+"))return ge(String.fromCharCode(parseInt(c.slice(2),16)));if(c.startsWith("u+"))return ge(String.fromCharCode(...c.slice(2).split("-").map(w=>parseInt(w,16))));const d=Lt.exec(c),[,p,f,u,h]=d;return t.push({name:u,matcher:h,optional:!!p,rest:!!f,chained:f?l===1&&s[0]==="":!1}),f?"([^]*?)":p?"([^/]*)?":"([^/]+?)"}return ge(c)}).join("")}).join("")}/?$`),params:t}}function Ut(e){return e!==""&&!/^\([^)]+\)$/.test(e)}function Tt(e){return e.slice(1).split("/").filter(Ut)}function Pt(e,t,n){const r={},a=e.slice(1),i=a.filter(o=>o!==void 0);let s=0;for(let o=0;o<t.length;o+=1){const c=t[o];let l=a[o-s];if(c.chained&&c.rest&&s&&(l=a.slice(o-s,o+1).filter(d=>d).join("/"),s=0),l===void 0)if(c.rest)l="";else continue;if(!c.matcher||n[c.matcher](l)){r[c.name]=l;const d=t[o+1],p=a[o+1];d&&!d.rest&&d.optional&&p&&c.chained&&(s=0),!d&&!p&&Object.keys(r).length===i.length&&(s=0);continue}if(c.optional&&c.chained){s++;continue}return}if(!s)return r}function ge(e){return e.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function It({nodes:e,server_loads:t,dictionary:n,matchers:r}){const a=new Set(t);return Object.entries(n).map(([o,[c,l,d]])=>{const{pattern:p,params:f}=At(o),u={id:o,exec:h=>{const w=p.exec(h);if(w)return Pt(w,f,r)},errors:[1,...d||[]].map(h=>e[h]),layouts:[0,...l||[]].map(s),leaf:i(c)};return u.errors.length=u.layouts.length=Math.max(u.errors.length,u.layouts.length),u});function i(o){const c=o<0;return c&&(o=~o),[c,e[o]]}function s(o){return o===void 0?o:[a.has(o),e[o]]}}function ze(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function De(e,t,n=JSON.stringify){const r=n(t);try{sessionStorage[e]=r}catch{}}const x=globalThis.__sveltekit_rfqwbc?.base??"",Ot=globalThis.__sveltekit_rfqwbc?.assets??x??"",$t="1771853081864",He="sveltekit:snapshot",Je="sveltekit:scroll",Ye="sveltekit:states",Ct="sveltekit:pageurl",B="sveltekit:history",z="sveltekit:navigation",q={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},Ae=location.origin;function Xe(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){const n=document.getElementsByTagName("base");t=n.length?n[0].href:document.URL}return new URL(e,t)}function j(){return{x:pageXOffset,y:pageYOffset}}function K(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const Ve={...q,"":q.hover};function Qe(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function Ze(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=Qe(e)}}function we(e,t,n){let r;try{if(r=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){const o=location.hash.split("#")[1]||"/";r.hash=`#${o}${r.hash}`}}catch{}const a=e instanceof SVGAElement?e.target.baseVal:e.target,i=!r||!!a||ue(r,t,n)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),s=r?.origin===Ae&&e.hasAttribute("download");return{url:r,external:i,target:a,download:s}}function ne(e){let t=null,n=null,r=null,a=null,i=null,s=null,o=e;for(;o&&o!==document.documentElement;)r===null&&(r=K(o,"preload-code")),a===null&&(a=K(o,"preload-data")),t===null&&(t=K(o,"keepfocus")),n===null&&(n=K(o,"noscroll")),i===null&&(i=K(o,"reload")),s===null&&(s=K(o,"replacestate")),o=Qe(o);function c(l){switch(l){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:Ve[r??"off"],preload_data:Ve[a??"off"],keepfocus:c(t),noscroll:c(n),reload:c(i),replace_state:c(s)}}function Ke(e){const t=Se(e);let n=!0;function r(){n=!0,t.update(s=>s)}function a(s){n=!1,t.set(s)}function i(s){let o;return t.subscribe(c=>{(o===void 0||n&&c!==o)&&s(o=c)})}return{notify:r,set:a,subscribe:i}}const et={v:()=>{}};function qt(){const{set:e,subscribe:t}=Se(!1);let n;async function r(){clearTimeout(n);try{const a=await fetch(`${Ot}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!a.ok)return!1;const s=(await a.json()).version!==$t;return s&&(e(!0),et.v(),clearTimeout(n)),s}catch{return!1}}return{subscribe:t,check:r}}function ue(e,t,n){return e.origin!==Ae||!e.pathname.startsWith(t)?!0:n?e.pathname!==location.pathname:!1}function fn(e){}const tt=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...tt];const Nt=new Set([...tt]);[...Nt];function jt(e){return e.filter(t=>t!=null)}function Ue(e){return e instanceof Ee||e instanceof xe?e.status:500}function Dt(e){return e instanceof xe?e.text:"Internal Error"}let k,H,me;const Vt=je.toString().includes("$$")||/function \w+\(\) \{\}/.test(je.toString());Vt?(k={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL("https://example.com")},H={current:null},me={current:!1}):(k=new class{#e=A({});get data(){return U(this.#e)}set data(t){T(this.#e,t)}#t=A(null);get form(){return U(this.#t)}set form(t){T(this.#t,t)}#n=A(null);get error(){return U(this.#n)}set error(t){T(this.#n,t)}#r=A({});get params(){return U(this.#r)}set params(t){T(this.#r,t)}#a=A({id:null});get route(){return U(this.#a)}set route(t){T(this.#a,t)}#o=A({});get state(){return U(this.#o)}set state(t){T(this.#o,t)}#s=A(-1);get status(){return U(this.#s)}set status(t){T(this.#s,t)}#i=A(new URL("https://example.com"));get url(){return U(this.#i)}set url(t){T(this.#i,t)}},H=new class{#e=A(null);get current(){return U(this.#e)}set current(t){T(this.#e,t)}},me=new class{#e=A(!1);get current(){return U(this.#e)}set current(t){T(this.#e,t)}},et.v=()=>me.current=!0);function Kt(e){Object.assign(k,e)}const Be={spanContext(){return Bt},setAttribute(){return this},setAttributes(){return this},addEvent(){return this},setStatus(){return this},updateName(){return this},end(){return this},isRecording(){return!1},recordException(){return this},addLink(){return this},addLinks(){return this}},Bt={traceId:"",spanId:"",traceFlags:0},Ft=new Set(["icon","shortcut icon","apple-touch-icon"]),C=ze(Je)??{},J=ze(He)??{},$={url:Ke({}),page:Ke({}),navigating:Se(null),updated:qt()};function Te(e){C[e]=j()}function Gt(e,t){let n=e+1;for(;C[n];)delete C[n],n+=1;for(n=t+1;J[n];)delete J[n],n+=1}function Y(e,t=!1){return t?location.replace(e.href):location.href=e.href,new Promise(()=>{})}async function nt(){if("serviceWorker"in navigator){const e=await navigator.serviceWorker.getRegistration(x||"/");e&&await e.update()}}function Fe(){}let Pe,ve,re,P,ye,v;const ae=[],oe=[];let L=null;function be(){L?.fork?.then(e=>e?.discard()),L=null}const ee=new Map,rt=new Set,Mt=new Set,W=new Set;let _={branch:[],error:null,url:null},at=!1,se=!1,Ge=!0,X=!1,G=!1,ot=!1,Ie=!1,st,y,R,N;const ie=new Set,Me=new Map;async function gn(e,t,n){globalThis.__sveltekit_rfqwbc?.data&&globalThis.__sveltekit_rfqwbc.data,document.URL!==location.href&&(location.href=location.href),v=e,await e.hooks.init?.(),Pe=It(e),P=document.documentElement,ye=t,ve=e.nodes[0],re=e.nodes[1],ve(),re(),y=history.state?.[B],R=history.state?.[z],y||(y=R=Date.now(),history.replaceState({...history.state,[B]:y,[z]:R},""));const r=C[y];function a(){r&&(history.scrollRestoration="manual",scrollTo(r.x,r.y))}n?(a(),await an(ye,n)):(await F({type:"enter",url:Xe(v.hash?cn(new URL(location.href)):location.href),replace_state:!0}),a()),rn()}function Wt(){ae.length=0,Ie=!1}function it(e){oe.some(t=>t?.snapshot)&&(J[e]=oe.map(t=>t?.snapshot?.capture()))}function ct(e){J[e]?.forEach((t,n)=>{oe[n]?.snapshot?.restore(t)})}function We(){Te(y),De(Je,C),it(R),De(He,J)}async function zt(e,t,n,r){let a;t.invalidateAll&&be(),await F({type:"goto",url:Xe(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:n,nav_token:r,accept:()=>{t.invalidateAll&&(Ie=!0,a=[...Me.keys()]),t.invalidate&&t.invalidate.forEach(nn)}}),t.invalidateAll&&te().then(te).then(()=>{Me.forEach(({resource:i},s)=>{a?.includes(s)&&i.refresh?.()})})}async function Ht(e){if(e.id!==L?.id){be();const t={};ie.add(t),L={id:e.id,token:t,promise:ft({...e,preload:t}).then(n=>(ie.delete(t),n.type==="loaded"&&n.state.error&&be(),n)),fork:null}}return L.promise}async function _e(e){const t=(await fe(e,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].map(n=>n?.[1]()))}async function lt(e,t,n){_=e.state;const r=document.querySelector("style[data-sveltekit]");if(r&&r.remove(),Object.assign(k,e.props.page),st=new v.root({target:t,props:{...e.props,stores:$,components:oe},hydrate:n,sync:!1}),await Promise.resolve(),ct(R),n){const a={from:null,to:{params:_.params,route:{id:_.route?.id??null},url:new URL(location.href),scroll:C[y]??j()},willUnload:!1,type:"enter",complete:Promise.resolve()};W.forEach(i=>i(a))}se=!0}function ce({url:e,params:t,branch:n,status:r,error:a,route:i,form:s}){let o="never";if(x&&(e.pathname===x||e.pathname===x+"/"))o="always";else for(const u of n)u?.slash!==void 0&&(o=u.slash);e.pathname=wt(e.pathname,o),e.search=e.search;const c={type:"loaded",state:{url:e,params:t,branch:n,error:a,route:i},props:{constructors:jt(n).map(u=>u.node.component),page:Ne(k)}};s!==void 0&&(c.props.form=s);let l={},d=!k,p=0;for(let u=0;u<Math.max(n.length,_.branch.length);u+=1){const h=n[u],w=_.branch[u];h?.data!==w?.data&&(d=!0),h&&(l={...l,...h.data},d&&(c.props[`data_${p}`]=l),p+=1)}return(!_.url||e.href!==_.url.href||_.error!==a||s!==void 0&&s!==k.form||d)&&(c.props.page={error:a,params:t,route:{id:i?.id??null},state:{},status:r,url:new URL(e),form:s??null,data:d?l:k.data}),c}async function Oe({loader:e,parent:t,url:n,params:r,route:a,server_data_node:i}){let s=null,o=!0;const c={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},l=await e();if(l.universal?.load){let d=function(...f){for(const u of f){const{href:h}=new URL(u,n);c.dependencies.add(h)}};const p={tracing:{enabled:!1,root:Be,current:Be},route:new Proxy(a,{get:(f,u)=>(o&&(c.route=!0),f[u])}),params:new Proxy(r,{get:(f,u)=>(o&&c.params.add(u),f[u])}),data:i?.data??null,url:bt(n,()=>{o&&(c.url=!0)},f=>{o&&c.search_params.add(f)},v.hash),async fetch(f,u){f instanceof Request&&(u={body:f.method==="GET"||f.method==="HEAD"?void 0:await f.blob(),cache:f.cache,credentials:f.credentials,headers:[...f.headers].length>0?f?.headers:void 0,integrity:f.integrity,keepalive:f.keepalive,method:f.method,mode:f.mode,redirect:f.redirect,referrer:f.referrer,referrerPolicy:f.referrerPolicy,signal:f.signal,...u});const{resolved:h,promise:w}=ut(f,u,n);return o&&d(h.href),w},setHeaders:()=>{},depends:d,parent(){return o&&(c.parent=!0),t()},untrack(f){o=!1;try{return f()}finally{o=!0}}};s=await l.universal.load.call(null,p)??null}return{node:l,loader:e,server:i,universal:l.universal?.load?{type:"data",data:s,uses:c}:null,data:s??i?.data??null,slash:l.universal?.trailingSlash??i?.slash}}function ut(e,t,n){let r=e instanceof Request?e.url:e;const a=new URL(r,n);a.origin===n.origin&&(r=a.href.slice(n.origin.length));const i=se?xt(r,a.href,t):Rt(r,t);return{resolved:a,promise:i}}function Jt(e,t,n,r,a,i){if(Ie)return!0;if(!a)return!1;if(a.parent&&e||a.route&&t||a.url&&n)return!0;for(const s of a.search_params)if(r.has(s))return!0;for(const s of a.params)if(i[s]!==_.params[s])return!0;for(const s of a.dependencies)if(ae.some(o=>o(new URL(s))))return!0;return!1}function $e(e,t){return e?.type==="data"?e:e?.type==="skip"?t??null:null}function Yt(e,t){if(!e)return new Set(t.searchParams.keys());const n=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(const r of n){const a=e.searchParams.getAll(r),i=t.searchParams.getAll(r);a.every(s=>i.includes(s))&&i.every(s=>a.includes(s))&&n.delete(r)}return n}function Xt({error:e,url:t,route:n,params:r}){return{type:"loaded",state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:Ne(k),constructors:[]}}}async function ft({id:e,invalidating:t,url:n,params:r,route:a,preload:i}){if(L?.id===e)return ie.delete(L.token),L.promise;const{errors:s,layouts:o,leaf:c}=a,l=[...o,c];s.forEach(m=>m?.().catch(()=>{})),l.forEach(m=>m?.[1]().catch(()=>{}));const d=_.url?e!==le(_.url):!1,p=_.route?a.id!==_.route.id:!1,f=Yt(_.url,n);let u=!1;const h=l.map(async(m,g)=>{if(!m)return;const S=_.branch[g];return m[1]===S?.loader&&!Jt(u,p,d,f,S.universal?.uses,r)?S:(u=!0,Oe({loader:m[1],url:n,params:r,route:a,parent:async()=>{const I={};for(let O=0;O<g;O+=1)Object.assign(I,(await h[O])?.data);return I},server_data_node:$e(m[0]?{type:"skip"}:null,m[0]?S?.server:void 0)}))});for(const m of h)m.catch(()=>{});const w=[];for(let m=0;m<l.length;m+=1)if(l[m])try{w.push(await h[m])}catch(g){if(g instanceof Re)return{type:"redirect",location:g.location};if(ie.has(i))return Xt({error:await Q(g,{params:r,url:n,route:{id:a.id}}),url:n,params:r,route:a});let S=Ue(g),E;if(g instanceof Ee)E=g.body;else{if(await $.updated.check())return await nt(),await Y(n);E=await Q(g,{params:r,url:n,route:{id:a.id}})}const I=await Qt(m,w,s);return I?ce({url:n,params:r,branch:w.slice(0,I.idx).concat(I.node),status:S,error:E,route:a}):await ht(n,{id:a.id},E,S)}else w.push(void 0);return ce({url:n,params:r,branch:w,status:200,error:null,route:a,form:t?void 0:null})}async function Qt(e,t,n){for(;e--;)if(n[e]){let r=e;for(;!t[r];)r-=1;try{return{idx:r+1,node:{node:await n[e](),loader:n[e],data:{},server:null,universal:null}}}catch{continue}}}async function Ce({status:e,error:t,url:n,route:r}){const a={};let i=null;try{const s=await Oe({loader:ve,url:n,params:a,route:r,parent:()=>Promise.resolve({}),server_data_node:$e(i)}),o={node:await re(),loader:re,universal:null,server:null,data:null};return ce({url:n,params:a,branch:[s,o],status:e,error:t,route:null})}catch(s){if(s instanceof Re)return zt(new URL(s.location,location.href),{},0);throw s}}async function Zt(e){const t=e.href;if(ee.has(t))return ee.get(t);let n;try{const r=(async()=>{let a=await v.hooks.reroute({url:new URL(e),fetch:async(i,s)=>ut(i,s,e).promise})??e;if(typeof a=="string"){const i=new URL(e);v.hash?i.hash=a:i.pathname=a,a=i}return a})();ee.set(t,r),n=await r}catch{ee.delete(t);return}return n}async function fe(e,t){if(e&&!ue(e,x,v.hash)){const n=await Zt(e);if(!n)return;const r=en(n);for(const a of Pe){const i=a.exec(r);if(i)return{id:le(e),invalidating:t,route:a,params:yt(i),url:e}}}}function en(e){return vt(v.hash?e.hash.replace(/^#/,"").replace(/[?#].+/,""):e.pathname.slice(x.length))||"/"}function le(e){return(v.hash?e.hash.replace(/^#/,""):e.pathname)+e.search}function dt({url:e,type:t,intent:n,delta:r,event:a,scroll:i}){let s=!1;const o=qe(_,n,e,t,i??null);r!==void 0&&(o.navigation.delta=r),a!==void 0&&(o.navigation.event=a);const c={...o.navigation,cancel:()=>{s=!0,o.reject(new Error("navigation cancelled"))}};return X||rt.forEach(l=>l(c)),s?null:o}async function F({type:e,url:t,popped:n,keepfocus:r,noscroll:a,replace_state:i,state:s={},redirect_count:o=0,nav_token:c={},accept:l=Fe,block:d=Fe,event:p}){const f=N;N=c;const u=await fe(t,!1),h=e==="enter"?qe(_,u,t,e):dt({url:t,type:e,delta:n?.delta,intent:u,scroll:n?.scroll,event:p});if(!h){d(),N===c&&(N=f);return}const w=y,m=R;l(),X=!0,se&&h.navigation.type!=="enter"&&$.navigating.set(H.current=h.navigation);let g=u&&await ft(u);if(!g){if(ue(t,x,v.hash))return await Y(t,i);g=await ht(t,{id:null},await Q(new xe(404,"Not Found",`Not found: ${t.pathname}`),{url:t,params:{},route:{id:null}}),404,i)}if(t=u?.url||t,N!==c)return h.reject(new Error("navigation aborted")),!1;if(g.type==="redirect"){if(o<20){await F({type:e,url:new URL(g.location,t),popped:n,keepfocus:r,noscroll:a,replace_state:i,state:s,redirect_count:o+1,nav_token:c}),h.fulfil(void 0);return}g=await Ce({status:500,error:await Q(new Error("Redirect loop"),{url:t,params:{},route:{id:null}}),url:t,route:{id:null}})}else g.props.page.status>=400&&await $.updated.check()&&(await nt(),await Y(t,i));if(Wt(),Te(w),it(m),g.props.page.url.pathname!==t.pathname&&(t.pathname=g.props.page.url.pathname),s=n?n.state:s,!n){const b=i?0:1,Z={[B]:y+=b,[z]:R+=b,[Ye]:s};(i?history.replaceState:history.pushState).call(history,Z,"",t),i||Gt(y,R)}const S=u&&L?.id===u.id?L.fork:null;L=null,g.props.page.state=s;let E;if(se){const b=(await Promise.all(Array.from(Mt,D=>D(h.navigation)))).filter(D=>typeof D=="function");if(b.length>0){let D=function(){b.forEach(de=>{W.delete(de)})};b.push(D),b.forEach(de=>{W.add(de)})}_=g.state,g.props.page&&(g.props.page.url=t);const Z=S&&await S;Z?E=Z.commit():(st.$set(g.props),Kt(g.props.page),E=_t?.()),ot=!0}else await lt(g,ye,!1);const{activeElement:I}=document;await E,await te(),await te();let O=null;if(Ge){const b=n?n.scroll:a?j():null;b?scrollTo(b.x,b.y):(O=t.hash&&document.getElementById(pt(t)))?O.scrollIntoView():scrollTo(0,0)}const gt=document.activeElement!==I&&document.activeElement!==document.body;!r&&!gt&&sn(t,!O),Ge=!0,g.props.page&&Object.assign(k,g.props.page),X=!1,e==="popstate"&&ct(R),h.fulfil(void 0),h.navigation.to&&(h.navigation.to.scroll=j()),W.forEach(b=>b(h.navigation)),$.navigating.set(H.current=null)}async function ht(e,t,n,r,a){return e.origin===Ae&&e.pathname===location.pathname&&!at?await Ce({status:r,error:n,url:e,route:t}):await Y(e,a)}function tn(){let e,t={element:void 0,href:void 0},n;P.addEventListener("mousemove",o=>{const c=o.target;clearTimeout(e),e=setTimeout(()=>{i(c,q.hover)},20)});function r(o){o.defaultPrevented||i(o.composedPath()[0],q.tap)}P.addEventListener("mousedown",r),P.addEventListener("touchstart",r,{passive:!0});const a=new IntersectionObserver(o=>{for(const c of o)c.isIntersecting&&(_e(new URL(c.target.href)),a.unobserve(c.target))},{threshold:0});async function i(o,c){const l=Ze(o,P),d=l===t.element&&l?.href===t.href&&c>=n;if(!l||d)return;const{url:p,external:f,download:u}=we(l,x,v.hash);if(f||u)return;const h=ne(l),w=p&&le(_.url)===le(p);if(!(h.reload||w))if(c<=h.preload_data){t={element:l,href:l.href},n=q.tap;const m=await fe(p,!1);if(!m)return;Ht(m)}else c<=h.preload_code&&(t={element:l,href:l.href},n=c,_e(p))}function s(){a.disconnect();for(const o of P.querySelectorAll("a")){const{url:c,external:l,download:d}=we(o,x,v.hash);if(l||d)continue;const p=ne(o);p.reload||(p.preload_code===q.viewport&&a.observe(o),p.preload_code===q.eager&&_e(c))}}W.add(s),s()}function Q(e,t){if(e instanceof Ee)return e.body;const n=Ue(e),r=Dt(e);return v.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function nn(e){if(typeof e=="function")ae.push(e);else{const{href:t}=new URL(e,location.href);ae.push(n=>n.href===t)}}function rn(){history.scrollRestoration="manual",addEventListener("beforeunload",t=>{let n=!1;if(We(),!X){const r=qe(_,void 0,null,"leave"),a={...r.navigation,cancel:()=>{n=!0,r.reject(new Error("navigation cancelled"))}};rt.forEach(i=>i(a))}n?(t.preventDefault(),t.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&We()}),navigator.connection?.saveData||tn(),P.addEventListener("click",async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;const n=Ze(t.composedPath()[0],P);if(!n)return;const{url:r,external:a,target:i,download:s}=we(n,x,v.hash);if(!r)return;if(i==="_parent"||i==="_top"){if(window.parent!==window)return}else if(i&&i!=="_self")return;const o=ne(n);if(!(n instanceof SVGAElement)&&r.protocol!==location.protocol&&!(r.protocol==="https:"||r.protocol==="http:")||s)return;const[l,d]=(v.hash?r.hash.replace(/^#/,""):r.href).split("#"),p=l===pe(location);if(a||o.reload&&(!p||!d)){dt({url:r,type:"link",event:t})?X=!0:t.preventDefault();return}if(d!==void 0&&p){const[,f]=_.url.href.split("#");if(f===d){if(t.preventDefault(),d===""||d==="top"&&n.ownerDocument.getElementById("top")===null)scrollTo({top:0});else{const u=n.ownerDocument.getElementById(decodeURIComponent(d));u&&(u.scrollIntoView(),u.focus())}return}if(G=!0,Te(y),e(r),!o.replace_state)return;G=!1}t.preventDefault(),await new Promise(f=>{requestAnimationFrame(()=>{setTimeout(f,0)}),setTimeout(f,100)}),await F({type:"link",url:r,keepfocus:o.keepfocus,noscroll:o.noscroll,replace_state:o.replace_state??r.href===location.href,event:t})}),P.addEventListener("submit",t=>{if(t.defaultPrevented)return;const n=HTMLFormElement.prototype.cloneNode.call(t.target),r=t.submitter;if((r?.formTarget||n.target)==="_blank"||(r?.formMethod||n.method)!=="get")return;const s=new URL(r?.hasAttribute("formaction")&&r?.formAction||n.action);if(ue(s,x,!1))return;const o=t.target,c=ne(o);if(c.reload)return;t.preventDefault(),t.stopPropagation();const l=new FormData(o,r);s.search=new URLSearchParams(l).toString(),F({type:"form",url:s,keepfocus:c.keepfocus,noscroll:c.noscroll,replace_state:c.replace_state??s.href===location.href,event:t})}),addEventListener("popstate",async t=>{if(!ke){if(t.state?.[B]){const n=t.state[B];if(N={},n===y)return;const r=C[n],a=t.state[Ye]??{},i=new URL(t.state[Ct]??location.href),s=t.state[z],o=_.url?pe(location)===pe(_.url):!1;if(s===R&&(ot||o)){a!==k.state&&(k.state=a),e(i),C[y]=j(),r&&scrollTo(r.x,r.y),y=n;return}const l=n-y;await F({type:"popstate",url:i,popped:{state:a,scroll:r,delta:l},accept:()=>{y=n,R=s},block:()=>{history.go(-l)},nav_token:N,event:t})}else if(!G){const n=new URL(location.href);e(n),v.hash&&location.reload()}}}),addEventListener("hashchange",()=>{G&&(G=!1,history.replaceState({...history.state,[B]:++y,[z]:R},"",location.href))});for(const t of document.querySelectorAll("link"))Ft.has(t.rel)&&(t.href=t.href);addEventListener("pageshow",t=>{t.persisted&&$.navigating.set(H.current=null)});function e(t){_.url=k.url=t,$.page.set(Ne(k)),$.page.notify()}}async function an(e,{status:t=200,error:n,node_ids:r,params:a,route:i,server_route:s,data:o,form:c}){at=!0;const l=new URL(location.href);let d;({params:a={},route:i={id:null}}=await fe(l,!1)||{}),d=Pe.find(({id:u})=>u===i.id);let p,f=!0;try{const u=r.map(async(w,m)=>{const g=o[m];return g?.uses&&(g.uses=on(g.uses)),Oe({loader:v.nodes[w],url:l,params:a,route:i,parent:async()=>{const S={};for(let E=0;E<m;E+=1)Object.assign(S,(await u[E]).data);return S},server_data_node:$e(g)})}),h=await Promise.all(u);if(d){const w=d.layouts;for(let m=0;m<w.length;m++)w[m]||h.splice(m,0,void 0)}p=ce({url:l,params:a,branch:h,status:t,error:n,form:c,route:d??null})}catch(u){if(u instanceof Re){await Y(new URL(u.location,location.href));return}p=await Ce({status:Ue(u),error:await Q(u,{url:l,params:a,route:i}),url:l,route:i}),e.textContent="",f=!1}p.props.page&&(p.props.page.state={}),await lt(p,e,f)}function on(e){return{dependencies:new Set(e?.dependencies??[]),params:new Set(e?.params??[]),parent:!!e?.parent,route:!!e?.route,url:!!e?.url,search_params:new Set(e?.search_params??[])}}let ke=!1;function sn(e,t=!0){const n=document.querySelector("[autofocus]");if(n)n.focus();else{const r=pt(e);if(r&&document.getElementById(r)){const{x:i,y:s}=j();setTimeout(()=>{const o=history.state;ke=!0,location.replace(new URL(`#${r}`,location.href)),history.replaceState(o,"",e),t&&scrollTo(i,s),ke=!1})}else{const i=document.body,s=i.getAttribute("tabindex");i.tabIndex=-1,i.focus({preventScroll:!0,focusVisible:!1}),s!==null?i.setAttribute("tabindex",s):i.removeAttribute("tabindex")}const a=getSelection();if(a&&a.type!=="None"){const i=[];for(let s=0;s<a.rangeCount;s+=1)i.push(a.getRangeAt(s));setTimeout(()=>{if(a.rangeCount===i.length){for(let s=0;s<a.rangeCount;s+=1){const o=i[s],c=a.getRangeAt(s);if(o.commonAncestorContainer!==c.commonAncestorContainer||o.startContainer!==c.startContainer||o.endContainer!==c.endContainer||o.startOffset!==c.startOffset||o.endOffset!==c.endOffset)return}a.removeAllRanges()}})}}}function qe(e,t,n,r,a=null){let i,s;const o=new Promise((l,d)=>{i=l,s=d});return o.catch(()=>{}),{navigation:{from:{params:e.params,route:{id:e.route?.id??null},url:e.url,scroll:j()},to:n&&{params:t?.params??null,route:{id:t?.route?.id??null},url:n,scroll:a},willUnload:!t,type:r,complete:o},fulfil:i,reject:s}}function Ne(e){return{data:e.data,error:e.error,form:e.form,params:e.params,route:e.route,state:e.state,status:e.status,url:e.url}}function cn(e){const t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function pt(e){let t;if(v.hash){const[,,n]=e.hash.split("#",3);t=n??""}else t=e.hash.slice(1);return decodeURIComponent(t)}export{gn as a,fn as l,k as p,$ as s};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.BHKfpJtW.js","../chunks/C6Mp7esv.js","../chunks/pKcKaM5A.js","../chunks/CyFK1ul6.js","../chunks/DbwmJ-jL.js","../assets/0.CbeMxaEY.css","../nodes/1.BdD1A1o5.js","../chunks/Caoo5mVF.js","../chunks/CVSH1X_J.js","../chunks/D_34Vvm-.js","../chunks/DXDZTf9R.js","../nodes/2.zOwUPUUu.js","../chunks/BzVZYeEA.js","../chunks/DSyuFPPB.js","../assets/2.BAvQw7w8.css"])))=>i.map(i=>d[i]);
2
- import{p as b,i as P,c as x,b as E,_ as O}from"../chunks/DSyuFPPB.js";import{P as y,Q as B,q as u,S as G,U as Q,V as U,y as W,n as X,u as F,W as H,k as v,D as J,A as K,X as R,B as N,C as Z,Y as j,z as $}from"../chunks/pKcKaM5A.js";import{h as tt,m as et,u as rt,s as st}from"../chunks/CVSH1X_J.js";import{a as _,c as k,f as D,t as at}from"../chunks/C6Mp7esv.js";import{o as nt}from"../chunks/DXDZTf9R.js";function ot(a){return class extends ct{constructor(t){super({component:a,...t})}}}class ct{#e;#t;constructor(t){var s=new Map,o=(e,r)=>{var i=U(r,!1,!1);return s.set(e,i),i};const c=new Proxy({...t.props||{},$$events:{}},{get(e,r){return u(s.get(r)??o(r,Reflect.get(e,r)))},has(e,r){return r===B?!0:(u(s.get(r)??o(r,Reflect.get(e,r))),Reflect.has(e,r))},set(e,r,i){return y(s.get(r)??o(r,i),i),Reflect.set(e,r,i)}});this.#t=(t.hydrate?tt:et)(t.component,{target:t.target,anchor:t.anchor,props:c,context:t.context,intro:t.intro??!1,recover:t.recover}),(!t?.props?.$$host||t.sync===!1)&&G(),this.#e=c.$$events;for(const e of Object.keys(this.#t))e==="$set"||e==="$destroy"||e==="$on"||Q(this,e,{get(){return this.#t[e]},set(r){this.#t[e]=r},enumerable:!0});this.#t.$set=e=>{Object.assign(c,e)},this.#t.$destroy=()=>{rt(this.#t)}}$set(t){this.#t.$set(t)}$on(t,s){this.#e[t]=this.#e[t]||[];const o=(...c)=>s.call(this,...c);return this.#e[t].push(o),()=>{this.#e[t]=this.#e[t].filter(c=>c!==o)}}$destroy(){this.#t.$destroy()}}const yt={};var it=D('<div id="svelte-announcer" aria-live="assertive" aria-atomic="true" style="position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"><!></div>'),ut=D("<!> <!>",1);function mt(a,t){W(t,!0);let s=b(t,"components",23,()=>[]),o=b(t,"data_0",3,null),c=b(t,"data_1",3,null);X(()=>t.stores.page.set(t.page)),F(()=>{t.stores,t.page,t.constructors,s(),t.form,o(),c(),t.stores.page.notify()});let e=R(!1),r=R(!1),i=R(null);nt(()=>{const n=t.stores.page.subscribe(()=>{u(e)&&(y(r,!0),H().then(()=>{y(i,document.title||"untitled page",!0)}))});return y(e,!0),n});const S=j(()=>t.constructors[1]);var w=ut(),A=v(w);{var V=n=>{const m=j(()=>t.constructors[0]);var d=k(),h=v(d);x(h,()=>u(m),(l,f)=>{E(f(l,{get data(){return o()},get form(){return t.form},get params(){return t.page.params},children:(g,lt)=>{var C=k(),M=v(C);x(M,()=>u(S),(Y,q)=>{E(q(Y,{get data(){return c()},get form(){return t.form},get params(){return t.page.params}}),z=>s()[1]=z,()=>s()?.[1])}),_(g,C)},$$slots:{default:!0}}),g=>s()[0]=g,()=>s()?.[0])}),_(n,d)},I=n=>{const m=j(()=>t.constructors[0]);var d=k(),h=v(d);x(h,()=>u(m),(l,f)=>{E(f(l,{get data(){return o()},get form(){return t.form},get params(){return t.page.params}}),g=>s()[0]=g,()=>s()?.[0])}),_(n,d)};P(A,n=>{t.constructors[1]?n(V):n(I,!1)})}var T=J(A,2);{var p=n=>{var m=it(),d=N(m);{var h=l=>{var f=at();$(()=>st(f,u(i))),_(l,f)};P(d,l=>{u(r)&&l(h)})}Z(m),_(n,m)};P(T,n=>{u(e)&&n(p)})}_(a,w),K()}const bt=ot(mt),Pt=[()=>O(()=>import("../nodes/0.BHKfpJtW.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),()=>O(()=>import("../nodes/1.BdD1A1o5.js"),__vite__mapDeps([6,1,2,7,8,9,10]),import.meta.url),()=>O(()=>import("../nodes/2.zOwUPUUu.js"),__vite__mapDeps([11,12,1,2,10,8,13,4,3,7,14]),import.meta.url)],xt=[],Et={"/":[2]},L={handleError:(({error:a})=>{console.error(a)}),reroute:(()=>{}),transport:{}},dt=Object.fromEntries(Object.entries(L.transport).map(([a,t])=>[a,t.decode])),Ot=Object.fromEntries(Object.entries(L.transport).map(([a,t])=>[a,t.encode])),Rt=!1,jt=(a,t)=>dt[a](t);export{jt as decode,dt as decoders,Et as dictionary,Ot as encoders,Rt as hash,L as hooks,yt as matchers,Pt as nodes,bt as root,xt as server_loads};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.BHKfpJtW.js","../chunks/C6Mp7esv.js","../chunks/pKcKaM5A.js","../chunks/CyFK1ul6.js","../chunks/DbwmJ-jL.js","../assets/0.CbeMxaEY.css","../nodes/1.BrXyVi8m.js","../chunks/Caoo5mVF.js","../chunks/CVSH1X_J.js","../chunks/BImQW9YW.js","../chunks/DXDZTf9R.js","../nodes/2.zOwUPUUu.js","../chunks/BzVZYeEA.js","../chunks/DSyuFPPB.js","../assets/2.BAvQw7w8.css"])))=>i.map(i=>d[i]);
2
+ import{p as b,i as P,c as x,b as E,_ as O}from"../chunks/DSyuFPPB.js";import{P as y,Q as B,q as u,S as G,U as Q,V as U,y as W,n as X,u as F,W as H,k as v,D as J,A as K,X as R,B as N,C as Z,Y as j,z as $}from"../chunks/pKcKaM5A.js";import{h as tt,m as et,u as rt,s as st}from"../chunks/CVSH1X_J.js";import{a as _,c as k,f as D,t as at}from"../chunks/C6Mp7esv.js";import{o as nt}from"../chunks/DXDZTf9R.js";function ot(a){return class extends ct{constructor(t){super({component:a,...t})}}}class ct{#e;#t;constructor(t){var s=new Map,o=(e,r)=>{var i=U(r,!1,!1);return s.set(e,i),i};const c=new Proxy({...t.props||{},$$events:{}},{get(e,r){return u(s.get(r)??o(r,Reflect.get(e,r)))},has(e,r){return r===B?!0:(u(s.get(r)??o(r,Reflect.get(e,r))),Reflect.has(e,r))},set(e,r,i){return y(s.get(r)??o(r,i),i),Reflect.set(e,r,i)}});this.#t=(t.hydrate?tt:et)(t.component,{target:t.target,anchor:t.anchor,props:c,context:t.context,intro:t.intro??!1,recover:t.recover}),(!t?.props?.$$host||t.sync===!1)&&G(),this.#e=c.$$events;for(const e of Object.keys(this.#t))e==="$set"||e==="$destroy"||e==="$on"||Q(this,e,{get(){return this.#t[e]},set(r){this.#t[e]=r},enumerable:!0});this.#t.$set=e=>{Object.assign(c,e)},this.#t.$destroy=()=>{rt(this.#t)}}$set(t){this.#t.$set(t)}$on(t,s){this.#e[t]=this.#e[t]||[];const o=(...c)=>s.call(this,...c);return this.#e[t].push(o),()=>{this.#e[t]=this.#e[t].filter(c=>c!==o)}}$destroy(){this.#t.$destroy()}}const yt={};var it=D('<div id="svelte-announcer" aria-live="assertive" aria-atomic="true" style="position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"><!></div>'),ut=D("<!> <!>",1);function mt(a,t){W(t,!0);let s=b(t,"components",23,()=>[]),o=b(t,"data_0",3,null),c=b(t,"data_1",3,null);X(()=>t.stores.page.set(t.page)),F(()=>{t.stores,t.page,t.constructors,s(),t.form,o(),c(),t.stores.page.notify()});let e=R(!1),r=R(!1),i=R(null);nt(()=>{const n=t.stores.page.subscribe(()=>{u(e)&&(y(r,!0),H().then(()=>{y(i,document.title||"untitled page",!0)}))});return y(e,!0),n});const S=j(()=>t.constructors[1]);var w=ut(),A=v(w);{var V=n=>{const m=j(()=>t.constructors[0]);var d=k(),h=v(d);x(h,()=>u(m),(l,f)=>{E(f(l,{get data(){return o()},get form(){return t.form},get params(){return t.page.params},children:(g,lt)=>{var C=k(),M=v(C);x(M,()=>u(S),(Y,q)=>{E(q(Y,{get data(){return c()},get form(){return t.form},get params(){return t.page.params}}),z=>s()[1]=z,()=>s()?.[1])}),_(g,C)},$$slots:{default:!0}}),g=>s()[0]=g,()=>s()?.[0])}),_(n,d)},I=n=>{const m=j(()=>t.constructors[0]);var d=k(),h=v(d);x(h,()=>u(m),(l,f)=>{E(f(l,{get data(){return o()},get form(){return t.form},get params(){return t.page.params}}),g=>s()[0]=g,()=>s()?.[0])}),_(n,d)};P(A,n=>{t.constructors[1]?n(V):n(I,!1)})}var T=J(A,2);{var p=n=>{var m=it(),d=N(m);{var h=l=>{var f=at();$(()=>st(f,u(i))),_(l,f)};P(d,l=>{u(r)&&l(h)})}Z(m),_(n,m)};P(T,n=>{u(e)&&n(p)})}_(a,w),K()}const bt=ot(mt),Pt=[()=>O(()=>import("../nodes/0.BHKfpJtW.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),()=>O(()=>import("../nodes/1.BrXyVi8m.js"),__vite__mapDeps([6,1,2,7,8,9,10]),import.meta.url),()=>O(()=>import("../nodes/2.zOwUPUUu.js"),__vite__mapDeps([11,12,1,2,10,8,13,4,3,7,14]),import.meta.url)],xt=[],Et={"/":[2]},L={handleError:(({error:a})=>{console.error(a)}),reroute:(()=>{}),transport:{}},dt=Object.fromEntries(Object.entries(L.transport).map(([a,t])=>[a,t.decode])),Ot=Object.fromEntries(Object.entries(L.transport).map(([a,t])=>[a,t.encode])),Rt=!1,jt=(a,t)=>dt[a](t);export{jt as decode,dt as decoders,Et as dictionary,Ot as encoders,Rt as hash,L as hooks,yt as matchers,Pt as nodes,bt as root,xt as server_loads};
@@ -0,0 +1 @@
1
+ import{l as o,a as r}from"../chunks/BImQW9YW.js";export{o as load_css,r as start};
@@ -1 +1 @@
1
- import{a as u,f as h}from"../chunks/C6Mp7esv.js";import{i as g}from"../chunks/Caoo5mVF.js";import{y as l,k as v,z as d,A as _,B as a,C as e,D as x}from"../chunks/pKcKaM5A.js";import{s as o}from"../chunks/CVSH1X_J.js";import{s as k,p}from"../chunks/D_34Vvm-.js";const $={get error(){return p.error},get status(){return p.status}};k.updated.check;const m=$;var b=h("<h1> </h1> <p> </p>",1);function D(i,f){l(f,!1),g();var t=b(),r=v(t),n=a(r,!0);e(r);var s=x(r,2),c=a(s,!0);e(s),d(()=>{o(n,m.status),o(c,m.error?.message)}),u(i,t),_()}export{D as component};
1
+ import{a as u,f as h}from"../chunks/C6Mp7esv.js";import{i as g}from"../chunks/Caoo5mVF.js";import{y as l,k as v,z as d,A as _,B as a,C as e,D as x}from"../chunks/pKcKaM5A.js";import{s as o}from"../chunks/CVSH1X_J.js";import{s as k,p}from"../chunks/BImQW9YW.js";const $={get error(){return p.error},get status(){return p.status}};k.updated.check;const m=$;var b=h("<h1> </h1> <p> </p>",1);function D(i,f){l(f,!1),g();var t=b(),r=v(t),n=a(r,!0);e(r);var s=x(r,2),c=a(s,!0);e(s),d(()=>{o(n,m.status),o(c,m.error?.message)}),u(i,t),_()}export{D as component};
@@ -1 +1 @@
1
- {"version":"1771852873387"}
1
+ {"version":"1771853081864"}
@@ -17,11 +17,11 @@
17
17
  document.documentElement.dataset.theme = t;
18
18
  })();
19
19
  </script>
20
- <link href="/_app/immutable/entry/start.COvYh0H-.js" rel="modulepreload">
21
- <link href="/_app/immutable/chunks/D_34Vvm-.js" rel="modulepreload">
20
+ <link href="/_app/immutable/entry/start.BBo0q6zd.js" rel="modulepreload">
21
+ <link href="/_app/immutable/chunks/BImQW9YW.js" rel="modulepreload">
22
22
  <link href="/_app/immutable/chunks/pKcKaM5A.js" rel="modulepreload">
23
23
  <link href="/_app/immutable/chunks/DXDZTf9R.js" rel="modulepreload">
24
- <link href="/_app/immutable/entry/app.DNt_xNvN.js" rel="modulepreload">
24
+ <link href="/_app/immutable/entry/app.Dv_frd8y.js" rel="modulepreload">
25
25
  <link href="/_app/immutable/chunks/DSyuFPPB.js" rel="modulepreload">
26
26
  <link href="/_app/immutable/chunks/DbwmJ-jL.js" rel="modulepreload">
27
27
  <link href="/_app/immutable/chunks/CVSH1X_J.js" rel="modulepreload">
@@ -32,15 +32,15 @@
32
32
  <div style="display: contents">
33
33
  <script>
34
34
  {
35
- __sveltekit_hmbdei = {
35
+ __sveltekit_rfqwbc = {
36
36
  base: ""
37
37
  };
38
38
 
39
39
  const element = document.currentScript.parentElement;
40
40
 
41
41
  Promise.all([
42
- import("/_app/immutable/entry/start.COvYh0H-.js"),
43
- import("/_app/immutable/entry/app.DNt_xNvN.js")
42
+ import("/_app/immutable/entry/start.BBo0q6zd.js"),
43
+ import("/_app/immutable/entry/app.Dv_frd8y.js")
44
44
  ]).then(([kit, app]) => {
45
45
  kit.start(app, element);
46
46
  });
package/dist/cli.js CHANGED
@@ -7735,15 +7735,15 @@ var esm_default6 = createPrompt((config, done) => {
7735
7735
  });
7736
7736
  // ../cli/src/cli.ts
7737
7737
  import { spawn, spawnSync as spawnSync2 } from "child_process";
7738
- import { homedir as homedir6, platform as platform2 } from "os";
7738
+ import { homedir as homedir7, platform as platform3 } from "os";
7739
7739
  import { join as join12, dirname as dirname5 } from "path";
7740
7740
  import {
7741
- existsSync as existsSync10,
7741
+ existsSync as existsSync11,
7742
7742
  mkdirSync as mkdirSync7,
7743
7743
  writeFileSync as writeFileSync6,
7744
7744
  readFileSync as readFileSync9,
7745
7745
  copyFileSync,
7746
- readdirSync,
7746
+ readdirSync as readdirSync5,
7747
7747
  rmSync as rmSync3,
7748
7748
  statSync as statSync7,
7749
7749
  lstatSync as lstatSync3
@@ -8266,8 +8266,11 @@ var open_default = open;
8266
8266
 
8267
8267
  // ../core/dist/index.js
8268
8268
  import { createRequire as createRequire2 } from "node:module";
8269
+ import { existsSync, readdirSync } from "fs";
8269
8270
  import { join, dirname } from "path";
8270
8271
  import { fileURLToPath as fileURLToPath2 } from "url";
8272
+ import { homedir } from "os";
8273
+ import { arch as arch2, platform as platform2 } from "process";
8271
8274
  import { homedir as homedir2 } from "os";
8272
8275
  import { join as join2 } from "path";
8273
8276
  import { existsSync as existsSync3, readFileSync as readFileSync2, statSync } from "node:fs";
@@ -16340,6 +16343,64 @@ function runMigrations(db) {
16340
16343
  }
16341
16344
  var __filename2 = fileURLToPath2(import.meta.url);
16342
16345
  var __dirname22 = dirname(__filename2);
16346
+ function getExtensionSuffix() {
16347
+ if (platform2 === "win32")
16348
+ return "dll";
16349
+ if (platform2 === "darwin")
16350
+ return "dylib";
16351
+ return "so";
16352
+ }
16353
+ function getPlatformPackageName() {
16354
+ const os3 = platform2 === "win32" ? "windows" : platform2;
16355
+ return `sqlite-vec-${os3}-${arch2 === "x64" ? "x64" : arch2}`;
16356
+ }
16357
+ function findSqliteVecExtension() {
16358
+ const platformPkg = getPlatformPackageName();
16359
+ const extFile = `vec0.${getExtensionSuffix()}`;
16360
+ const searchPaths = [
16361
+ join(__dirname22, "..", "..", platformPkg, extFile),
16362
+ join(__dirname22, "..", "node_modules", platformPkg, extFile),
16363
+ join(__dirname22, "..", "..", "..", ".bun", `${platformPkg}@*`, "node_modules", platformPkg, extFile),
16364
+ join(__dirname22, "node_modules", platformPkg, extFile),
16365
+ join(__dirname22, "..", "..", "..", "node_modules", platformPkg, extFile),
16366
+ join(__dirname22, "..", "..", "..", "node_modules", ".bun", `${platformPkg}@*`, "node_modules", platformPkg, extFile),
16367
+ join(homedir(), ".bun", "install", "cache", `${platformPkg}@*`, extFile),
16368
+ join(dirname(dirname(process.execPath)), "lib", "node_modules", platformPkg, extFile),
16369
+ join(dirname(dirname(process.execPath)), "lib", "node_modules", "signetai", "node_modules", platformPkg, extFile)
16370
+ ];
16371
+ for (const searchPath of searchPaths) {
16372
+ if (searchPath.includes("*")) {
16373
+ const baseDir = dirname(searchPath.replace(/\*.*$/, ""));
16374
+ const pattern = searchPath.split("*")[1];
16375
+ try {
16376
+ const entries = existsSync(baseDir) ? readdirSync(baseDir) : [];
16377
+ for (const entry of entries) {
16378
+ const candidate = join(baseDir, entry, pattern?.replace(/^\//, "") || "");
16379
+ if (existsSync(candidate)) {
16380
+ return candidate;
16381
+ }
16382
+ }
16383
+ } catch {}
16384
+ } else if (existsSync(searchPath)) {
16385
+ return searchPath;
16386
+ }
16387
+ }
16388
+ return null;
16389
+ }
16390
+ function loadSqliteVec(db) {
16391
+ const extPath = findSqliteVecExtension();
16392
+ if (!extPath) {
16393
+ console.warn("sqlite-vec extension not found - vector search will be disabled");
16394
+ return false;
16395
+ }
16396
+ try {
16397
+ db.loadExtension(extPath);
16398
+ return true;
16399
+ } catch (e) {
16400
+ console.warn("Failed to load sqlite-vec extension:", e);
16401
+ return false;
16402
+ }
16403
+ }
16343
16404
  var composer = require_composer();
16344
16405
  var Document = require_Document();
16345
16406
  var Schema = require_Schema();
@@ -17458,13 +17519,13 @@ import {
17458
17519
  } from "node:fs";
17459
17520
  import { join as join7 } from "node:path";
17460
17521
  import {
17461
- existsSync,
17522
+ existsSync as existsSync2,
17462
17523
  mkdirSync,
17463
17524
  readFileSync,
17464
17525
  rmSync,
17465
17526
  writeFileSync
17466
17527
  } from "node:fs";
17467
- import { homedir } from "node:os";
17528
+ import { homedir as homedir3 } from "node:os";
17468
17529
  import { delimiter, join as join32 } from "node:path";
17469
17530
  import { runInNewContext } from "node:vm";
17470
17531
  var __commonJS3 = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
@@ -25402,7 +25463,7 @@ class OpenClawConnector extends BaseConnector {
25402
25463
  return result.patched;
25403
25464
  }
25404
25465
  getDiscoveredConfigPaths() {
25405
- return this.getConfigCandidates().filter((p) => existsSync(p));
25466
+ return this.getConfigCandidates().filter((p) => existsSync2(p));
25406
25467
  }
25407
25468
  async uninstall() {
25408
25469
  const filesRemoved = [];
@@ -25416,11 +25477,11 @@ class OpenClawConnector extends BaseConnector {
25416
25477
  }
25417
25478
  });
25418
25479
  const configsPatched = patchResult.patched;
25419
- const basePath = join32(homedir(), ".agents");
25480
+ const basePath = join32(homedir3(), ".agents");
25420
25481
  const hookDir = join32(basePath, "hooks", "agent-memory");
25421
25482
  for (const file of ["HOOK.md", "handler.js", "package.json"]) {
25422
25483
  const filePath = join32(hookDir, file);
25423
- if (existsSync(filePath)) {
25484
+ if (existsSync2(filePath)) {
25424
25485
  rmSync(filePath);
25425
25486
  filesRemoved.push(filePath);
25426
25487
  }
@@ -25441,7 +25502,7 @@ class OpenClawConnector extends BaseConnector {
25441
25502
  getConfigPath() {
25442
25503
  const candidates = this.getConfigCandidates();
25443
25504
  for (const configPath of candidates) {
25444
- if (existsSync(configPath)) {
25505
+ if (existsSync2(configPath)) {
25445
25506
  return configPath;
25446
25507
  }
25447
25508
  }
@@ -25465,7 +25526,7 @@ class OpenClawConnector extends BaseConnector {
25465
25526
  push(pathEntry);
25466
25527
  }
25467
25528
  }
25468
- const home22 = homedir();
25529
+ const home22 = homedir3();
25469
25530
  const xdgConfigHome = process.env.XDG_CONFIG_HOME ? this.expandPath(process.env.XDG_CONFIG_HOME) : join32(home22, ".config");
25470
25531
  const xdgStateHome = process.env.XDG_STATE_HOME ? this.expandPath(process.env.XDG_STATE_HOME) : join32(home22, ".local", "state");
25471
25532
  push(process.env.OPENCLAW_HOME ? join32(this.expandPath(process.env.OPENCLAW_HOME), "openclaw.json") : undefined);
@@ -25662,7 +25723,7 @@ configured by rejecting session claims from the second path (HTTP 409).
25662
25723
  }
25663
25724
  expandPath(path2) {
25664
25725
  if (path2.startsWith("~")) {
25665
- return join32(homedir(), path2.slice(1));
25726
+ return join32(homedir3(), path2.slice(1));
25666
25727
  }
25667
25728
  return path2;
25668
25729
  }
@@ -25684,8 +25745,8 @@ import {
25684
25745
  unlinkSync as unlinkSync22
25685
25746
  } from "node:fs";
25686
25747
  import { join as join72 } from "node:path";
25687
- import { existsSync as existsSync2, mkdirSync as mkdirSync4, readFileSync as readFileSync6, writeFileSync as writeFileSync3 } from "node:fs";
25688
- import { homedir as homedir3 } from "node:os";
25748
+ import { existsSync as existsSync8, mkdirSync as mkdirSync4, readFileSync as readFileSync6, writeFileSync as writeFileSync3 } from "node:fs";
25749
+ import { homedir as homedir5 } from "node:os";
25689
25750
  import { join as join52 } from "node:path";
25690
25751
  import { createRequire as createRequire22 } from "node:module";
25691
25752
  import { join as join33, dirname as dirname22 } from "path";
@@ -41067,7 +41128,7 @@ class ClaudeCodeConnector extends BaseConnector2 {
41067
41128
  filesWritten.push(claudeMdPath);
41068
41129
  }
41069
41130
  const sourceSkillsDir = join52(expandedBasePath, "skills");
41070
- const targetSkillsDir = join52(homedir3(), ".claude", "skills");
41131
+ const targetSkillsDir = join52(homedir5(), ".claude", "skills");
41071
41132
  this.symlinkSkills(sourceSkillsDir, targetSkillsDir);
41072
41133
  return {
41073
41134
  success: true,
@@ -41078,7 +41139,7 @@ class ClaudeCodeConnector extends BaseConnector2 {
41078
41139
  async uninstall() {
41079
41140
  const settingsPath = this.getConfigPath();
41080
41141
  const filesRemoved = [];
41081
- if (!existsSync2(settingsPath)) {
41142
+ if (!existsSync8(settingsPath)) {
41082
41143
  return { filesRemoved };
41083
41144
  }
41084
41145
  try {
@@ -41099,7 +41160,7 @@ class ClaudeCodeConnector extends BaseConnector2 {
41099
41160
  }
41100
41161
  isInstalled() {
41101
41162
  const settingsPath = this.getConfigPath();
41102
- if (!existsSync2(settingsPath))
41163
+ if (!existsSync8(settingsPath))
41103
41164
  return false;
41104
41165
  try {
41105
41166
  const content = readFileSync6(settingsPath, "utf-8");
@@ -41110,7 +41171,7 @@ class ClaudeCodeConnector extends BaseConnector2 {
41110
41171
  }
41111
41172
  }
41112
41173
  getConfigPath() {
41113
- return join52(homedir3(), ".claude", "settings.json");
41174
+ return join52(homedir5(), ".claude", "settings.json");
41114
41175
  }
41115
41176
  async onSessionStart(ctx) {
41116
41177
  try {
@@ -41161,10 +41222,10 @@ class ClaudeCodeConnector extends BaseConnector2 {
41161
41222
  }
41162
41223
  async configureHooks(_basePath) {
41163
41224
  const settingsPath = this.getConfigPath();
41164
- const claudeDir = join52(homedir3(), ".claude");
41225
+ const claudeDir = join52(homedir5(), ".claude");
41165
41226
  mkdirSync4(claudeDir, { recursive: true });
41166
41227
  let settings = {};
41167
- if (existsSync2(settingsPath)) {
41228
+ if (existsSync8(settingsPath)) {
41168
41229
  try {
41169
41230
  settings = JSON.parse(readFileSync6(settingsPath, "utf-8"));
41170
41231
  } catch {
@@ -41223,10 +41284,10 @@ class ClaudeCodeConnector extends BaseConnector2 {
41223
41284
  writeFileSync3(settingsPath, JSON.stringify(settings, null, 2));
41224
41285
  }
41225
41286
  async generateClaudeMd(basePath) {
41226
- const claudeMdPath = join52(homedir3(), ".claude", "CLAUDE.md");
41287
+ const claudeMdPath = join52(homedir5(), ".claude", "CLAUDE.md");
41227
41288
  const agentsMdPath = join52(basePath, "AGENTS.md");
41228
- mkdirSync4(join52(homedir3(), ".claude"), { recursive: true });
41229
- if (existsSync2(agentsMdPath)) {
41289
+ mkdirSync4(join52(homedir5(), ".claude"), { recursive: true });
41290
+ if (existsSync8(agentsMdPath)) {
41230
41291
  const raw = readFileSync6(agentsMdPath, "utf-8");
41231
41292
  const userContent = this.stripSignetBlock(raw);
41232
41293
  const header = this.generateHeader(agentsMdPath);
@@ -41265,7 +41326,7 @@ class ClaudeCodeConnector extends BaseConnector2 {
41265
41326
  }
41266
41327
  expandPath(path2) {
41267
41328
  if (path2.startsWith("~")) {
41268
- return join52(homedir3(), path2.slice(1));
41329
+ return join52(homedir5(), path2.slice(1));
41269
41330
  }
41270
41331
  return path2;
41271
41332
  }
@@ -41273,13 +41334,13 @@ class ClaudeCodeConnector extends BaseConnector2 {
41273
41334
 
41274
41335
  // ../connector-opencode/dist/index.js
41275
41336
  import {
41276
- existsSync as existsSync8,
41337
+ existsSync as existsSync10,
41277
41338
  mkdirSync as mkdirSync6,
41278
41339
  readFileSync as readFileSync8,
41279
41340
  rmSync as rmSync2,
41280
41341
  writeFileSync as writeFileSync5
41281
41342
  } from "node:fs";
41282
- import { homedir as homedir5 } from "node:os";
41343
+ import { homedir as homedir6 } from "node:os";
41283
41344
  import { join as join53 } from "node:path";
41284
41345
  import { createRequire as createRequire5 } from "node:module";
41285
41346
  import { join as join11, dirname as dirname4 } from "path";
@@ -56793,12 +56854,12 @@ class OpenCodeConnector extends BaseConnector3 {
56793
56854
  name = "OpenCode";
56794
56855
  harnessId = "opencode";
56795
56856
  getOpenCodePath() {
56796
- return join53(homedir5(), ".config", "opencode");
56857
+ return join53(homedir6(), ".config", "opencode");
56797
56858
  }
56798
56859
  getConfigPath() {
56799
56860
  const opencodePath = this.getOpenCodePath();
56800
56861
  for (const candidate of this.getConfigCandidates(opencodePath)) {
56801
- if (existsSync8(candidate)) {
56862
+ if (existsSync10(candidate)) {
56802
56863
  return candidate;
56803
56864
  }
56804
56865
  }
@@ -56821,10 +56882,10 @@ class OpenCodeConnector extends BaseConnector3 {
56821
56882
  }
56822
56883
  const opencodePath = this.getOpenCodePath();
56823
56884
  const pluginsPath = this.getPluginsPath(opencodePath);
56824
- if (!existsSync8(opencodePath)) {
56885
+ if (!existsSync10(opencodePath)) {
56825
56886
  mkdirSync6(opencodePath, { recursive: true });
56826
56887
  }
56827
- if (!existsSync8(pluginsPath)) {
56888
+ if (!existsSync10(pluginsPath)) {
56828
56889
  mkdirSync6(pluginsPath, { recursive: true });
56829
56890
  }
56830
56891
  this.migrateFromLegacy(opencodePath);
@@ -56837,7 +56898,7 @@ class OpenCodeConnector extends BaseConnector3 {
56837
56898
  }
56838
56899
  const skillsSource = join53(basePath, "skills");
56839
56900
  const skillsDest = join53(opencodePath, "skills");
56840
- if (existsSync8(skillsSource)) {
56901
+ if (existsSync10(skillsSource)) {
56841
56902
  this.symlinkSkills(skillsSource, skillsDest);
56842
56903
  }
56843
56904
  return {
@@ -56850,12 +56911,12 @@ class OpenCodeConnector extends BaseConnector3 {
56850
56911
  const opencodePath = this.getOpenCodePath();
56851
56912
  const filesRemoved = [];
56852
56913
  const pluginFilePath = this.getPluginFilePath(opencodePath);
56853
- if (existsSync8(pluginFilePath)) {
56914
+ if (existsSync10(pluginFilePath)) {
56854
56915
  rmSync2(pluginFilePath);
56855
56916
  filesRemoved.push(pluginFilePath);
56856
56917
  }
56857
56918
  const agentsMdPath = join53(opencodePath, "AGENTS.md");
56858
- if (existsSync8(agentsMdPath)) {
56919
+ if (existsSync10(agentsMdPath)) {
56859
56920
  rmSync2(agentsMdPath);
56860
56921
  filesRemoved.push(agentsMdPath);
56861
56922
  }
@@ -56863,17 +56924,17 @@ class OpenCodeConnector extends BaseConnector3 {
56863
56924
  return { filesRemoved };
56864
56925
  }
56865
56926
  isInstalled() {
56866
- return existsSync8(this.getPluginFilePath(this.getOpenCodePath()));
56927
+ return existsSync10(this.getPluginFilePath(this.getOpenCodePath()));
56867
56928
  }
56868
56929
  static isHarnessInstalled() {
56869
- const opencodePath = join53(homedir5(), ".config", "opencode");
56930
+ const opencodePath = join53(homedir6(), ".config", "opencode");
56870
56931
  const candidates = [
56871
56932
  join53(opencodePath, "opencode.json"),
56872
56933
  join53(opencodePath, "opencode.jsonc"),
56873
56934
  join53(opencodePath, "config.json")
56874
56935
  ];
56875
56936
  for (const candidate of candidates) {
56876
- if (existsSync8(candidate)) {
56937
+ if (existsSync10(candidate)) {
56877
56938
  return true;
56878
56939
  }
56879
56940
  }
@@ -56881,11 +56942,11 @@ class OpenCodeConnector extends BaseConnector3 {
56881
56942
  }
56882
56943
  migrateFromLegacy(opencodePath) {
56883
56944
  const legacyPluginPath = join53(opencodePath, "memory.mjs");
56884
- if (existsSync8(legacyPluginPath)) {
56945
+ if (existsSync10(legacyPluginPath)) {
56885
56946
  rmSync2(legacyPluginPath);
56886
56947
  }
56887
56948
  for (const configPath of this.getConfigCandidates(opencodePath)) {
56888
- if (!existsSync8(configPath))
56949
+ if (!existsSync10(configPath))
56889
56950
  continue;
56890
56951
  let config;
56891
56952
  try {
@@ -56931,7 +56992,7 @@ class OpenCodeConnector extends BaseConnector3 {
56931
56992
  }
56932
56993
  async generateAgentsMd(basePath) {
56933
56994
  const sourcePath = join53(basePath, "AGENTS.md");
56934
- if (!existsSync8(sourcePath)) {
56995
+ if (!existsSync10(sourcePath)) {
56935
56996
  return null;
56936
56997
  }
56937
56998
  const raw = readFileSync8(sourcePath, "utf-8");
@@ -56948,15 +57009,15 @@ var opencodeConnector = new OpenCodeConnector;
56948
57009
  function getTemplatesDir() {
56949
57010
  const devPath = join12(__dirname3, "..", "templates");
56950
57011
  const distPath = join12(__dirname3, "..", "..", "templates");
56951
- if (existsSync10(devPath))
57012
+ if (existsSync11(devPath))
56952
57013
  return devPath;
56953
- if (existsSync10(distPath))
57014
+ if (existsSync11(distPath))
56954
57015
  return distPath;
56955
57016
  return join12(__dirname3, "templates");
56956
57017
  }
56957
57018
  function copyDirRecursive(src, dest) {
56958
57019
  mkdirSync7(dest, { recursive: true });
56959
- const entries = readdirSync(src, { withFileTypes: true });
57020
+ const entries = readdirSync5(src, { withFileTypes: true });
56960
57021
  for (const entry of entries) {
56961
57022
  const srcPath = join12(src, entry.name);
56962
57023
  const destPath = join12(dest, entry.name);
@@ -56969,7 +57030,7 @@ function copyDirRecursive(src, dest) {
56969
57030
  }
56970
57031
  function isBuiltinSkillDir(skillDir) {
56971
57032
  const skillMdPath = join12(skillDir, "SKILL.md");
56972
- if (!existsSync10(skillMdPath)) {
57033
+ if (!existsSync11(skillMdPath)) {
56973
57034
  return false;
56974
57035
  }
56975
57036
  try {
@@ -56991,15 +57052,15 @@ function syncBuiltinSkills(templatesDir, basePath) {
56991
57052
  updated: [],
56992
57053
  skipped: []
56993
57054
  };
56994
- if (!existsSync10(skillsSource)) {
57055
+ if (!existsSync11(skillsSource)) {
56995
57056
  return result;
56996
57057
  }
56997
57058
  mkdirSync7(skillsDest, { recursive: true });
56998
- const entries = readdirSync(skillsSource, { withFileTypes: true }).filter((d) => d.isDirectory());
57059
+ const entries = readdirSync5(skillsSource, { withFileTypes: true }).filter((d) => d.isDirectory());
56999
57060
  for (const entry of entries) {
57000
57061
  const src = join12(skillsSource, entry.name);
57001
57062
  const dest = join12(skillsDest, entry.name);
57002
- if (!existsSync10(dest)) {
57063
+ if (!existsSync11(dest)) {
57003
57064
  copyDirRecursive(src, dest);
57004
57065
  result.installed.push(entry.name);
57005
57066
  continue;
@@ -57024,7 +57085,7 @@ function syncBuiltinSkills(templatesDir, basePath) {
57024
57085
  return result;
57025
57086
  }
57026
57087
  function isGitRepo(dir) {
57027
- return existsSync10(join12(dir, ".git"));
57088
+ return existsSync11(join12(dir, ".git"));
57028
57089
  }
57029
57090
  async function gitInit(dir) {
57030
57091
  return new Promise((resolve) => {
@@ -57066,7 +57127,7 @@ async function gitAddAndCommit(dir, message) {
57066
57127
  add.on("error", () => resolve(false));
57067
57128
  });
57068
57129
  }
57069
- var AGENTS_DIR = join12(homedir6(), ".agents");
57130
+ var AGENTS_DIR = join12(homedir7(), ".agents");
57070
57131
  var DAEMON_DIR = join12(AGENTS_DIR, ".daemon");
57071
57132
  var PID_FILE = join12(DAEMON_DIR, "pid");
57072
57133
  var LOG_DIR = join12(DAEMON_DIR, "logs");
@@ -57108,7 +57169,7 @@ async function startDaemon() {
57108
57169
  ];
57109
57170
  let daemonPath = null;
57110
57171
  for (const loc of daemonLocations) {
57111
- if (existsSync10(loc)) {
57172
+ if (existsSync11(loc)) {
57112
57173
  daemonPath = loc;
57113
57174
  break;
57114
57175
  }
@@ -57144,7 +57205,7 @@ async function startDaemon() {
57144
57205
  return false;
57145
57206
  }
57146
57207
  async function stopDaemon() {
57147
- if (existsSync10(PID_FILE)) {
57208
+ if (existsSync11(PID_FILE)) {
57148
57209
  try {
57149
57210
  const pid = parseInt(readFileSync9(PID_FILE, "utf-8").trim(), 10);
57150
57211
  process.kill(pid, "SIGTERM");
@@ -57196,7 +57257,7 @@ async function configureHarnessHooks(harness, basePath, options) {
57196
57257
  var __filename3 = fileURLToPath6(import.meta.url);
57197
57258
  var __dirname3 = dirname5(__filename3);
57198
57259
  function getVersionFromPackageJson(packageJsonPath) {
57199
- if (!existsSync10(packageJsonPath)) {
57260
+ if (!existsSync11(packageJsonPath)) {
57200
57261
  return null;
57201
57262
  }
57202
57263
  try {
@@ -57335,12 +57396,12 @@ function hasCommand(command) {
57335
57396
  }
57336
57397
  function printOllamaInstallInstructions() {
57337
57398
  console.log(source_default.dim(" Install Ollama:"));
57338
- if (platform2() === "darwin") {
57399
+ if (platform3() === "darwin") {
57339
57400
  console.log(source_default.dim(" brew install ollama"));
57340
57401
  console.log(source_default.dim(" open -a Ollama"));
57341
57402
  return;
57342
57403
  }
57343
- if (platform2() === "linux") {
57404
+ if (platform3() === "linux") {
57344
57405
  console.log(source_default.dim(" curl -fsSL https://ollama.com/install.sh | sh"));
57345
57406
  console.log(source_default.dim(" ollama serve"));
57346
57407
  return;
@@ -57356,7 +57417,7 @@ async function offerOllamaInstallFlow() {
57356
57417
  printOllamaInstallInstructions();
57357
57418
  return false;
57358
57419
  }
57359
- if (platform2() === "darwin") {
57420
+ if (platform3() === "darwin") {
57360
57421
  if (!hasCommand("brew")) {
57361
57422
  console.log(source_default.yellow(" Homebrew not found, cannot auto-install."));
57362
57423
  printOllamaInstallInstructions();
@@ -57378,7 +57439,7 @@ async function offerOllamaInstallFlow() {
57378
57439
  spinner.succeed("Ollama installed");
57379
57440
  return hasCommand("ollama");
57380
57441
  }
57381
- if (platform2() === "linux") {
57442
+ if (platform3() === "linux") {
57382
57443
  const spinner = ora("Installing Ollama...").start();
57383
57444
  const result = await runCommandWithOutput("sh", ["-c", "curl -fsSL https://ollama.com/install.sh | sh"], {
57384
57445
  env: { ...process.env },
@@ -57730,22 +57791,22 @@ async function existingSetupWizard(basePath, detection, existingConfig) {
57730
57791
  const spinner = ora("Setting up Signet for existing identity...").start();
57731
57792
  try {
57732
57793
  const templatesDir = getTemplatesDir();
57733
- if (!existsSync10(basePath)) {
57794
+ if (!existsSync11(basePath)) {
57734
57795
  mkdirSync7(basePath, { recursive: true });
57735
57796
  }
57736
- if (!existsSync10(join12(basePath, "memory"))) {
57797
+ if (!existsSync11(join12(basePath, "memory"))) {
57737
57798
  mkdirSync7(join12(basePath, "memory"), { recursive: true });
57738
57799
  }
57739
- if (!existsSync10(join12(basePath, "memory", "scripts"))) {
57800
+ if (!existsSync11(join12(basePath, "memory", "scripts"))) {
57740
57801
  mkdirSync7(join12(basePath, "memory", "scripts"), { recursive: true });
57741
57802
  }
57742
57803
  spinner.text = "Installing memory system...";
57743
57804
  const scriptsSource = join12(templatesDir, "memory", "scripts");
57744
- if (existsSync10(scriptsSource)) {
57805
+ if (existsSync11(scriptsSource)) {
57745
57806
  copyDirRecursive(scriptsSource, join12(basePath, "memory", "scripts"));
57746
57807
  }
57747
57808
  const requirementsSource = join12(templatesDir, "memory", "requirements.txt");
57748
- if (existsSync10(requirementsSource)) {
57809
+ if (existsSync11(requirementsSource)) {
57749
57810
  copyFileSync(requirementsSource, join12(basePath, "memory", "requirements.txt"));
57750
57811
  }
57751
57812
  spinner.text = "Syncing built-in skills...";
@@ -57754,7 +57815,7 @@ async function existingSetupWizard(basePath, detection, existingConfig) {
57754
57815
  const now = new Date().toISOString();
57755
57816
  let agentName = "My Agent";
57756
57817
  const identityPath = join12(basePath, "IDENTITY.md");
57757
- if (existsSync10(identityPath)) {
57818
+ if (existsSync11(identityPath)) {
57758
57819
  try {
57759
57820
  const content = readFileSync9(identityPath, "utf-8");
57760
57821
  const nameMatch = content.match(/^#\s*(.+)$/m);
@@ -57808,7 +57869,7 @@ async function existingSetupWizard(basePath, detection, existingConfig) {
57808
57869
  tools: "TOOLS.md"
57809
57870
  }
57810
57871
  };
57811
- if (!existsSync10(join12(basePath, "agent.yaml"))) {
57872
+ if (!existsSync11(join12(basePath, "agent.yaml"))) {
57812
57873
  writeFileSync6(join12(basePath, "agent.yaml"), formatYaml(config));
57813
57874
  }
57814
57875
  spinner.text = "Initializing database...";
@@ -57846,7 +57907,7 @@ async function existingSetupWizard(basePath, detection, existingConfig) {
57846
57907
  skillsResult = await unifySkills(basePath, {
57847
57908
  registries: [
57848
57909
  detection.harnesses.opencode ? {
57849
- path: join12(homedir6(), ".config", "opencode", "skills"),
57910
+ path: join12(homedir7(), ".config", "opencode", "skills"),
57850
57911
  harness: "opencode",
57851
57912
  symlink: true
57852
57913
  } : null
@@ -57869,7 +57930,7 @@ async function existingSetupWizard(basePath, detection, existingConfig) {
57869
57930
  }
57870
57931
  const gitignoreSrc = join12(templatesDir, "gitignore.template");
57871
57932
  const gitignoreDest = join12(basePath, ".gitignore");
57872
- if (existsSync10(gitignoreSrc) && !existsSync10(gitignoreDest)) {
57933
+ if (existsSync11(gitignoreSrc) && !existsSync11(gitignoreDest)) {
57873
57934
  copyFileSync(gitignoreSrc, gitignoreDest);
57874
57935
  }
57875
57936
  let gitEnabled = false;
@@ -57977,7 +58038,7 @@ async function setupWizard(options) {
57977
58038
  const templatesDir = getTemplatesDir();
57978
58039
  const gitignoreSrc = join12(templatesDir, "gitignore.template");
57979
58040
  const gitignoreDest = join12(basePath, ".gitignore");
57980
- if (existsSync10(gitignoreSrc) && !existsSync10(gitignoreDest)) {
58041
+ if (existsSync11(gitignoreSrc) && !existsSync11(gitignoreDest)) {
57981
58042
  copyFileSync(gitignoreSrc, gitignoreDest);
57982
58043
  console.log(source_default.dim(` Synced missing: .gitignore`));
57983
58044
  }
@@ -58285,7 +58346,7 @@ async function setupWizard(options) {
58285
58346
  const templatesDir = getTemplatesDir();
58286
58347
  mkdirSync7(basePath, { recursive: true });
58287
58348
  const gitignoreSource = join12(templatesDir, "gitignore.template");
58288
- if (existsSync10(gitignoreSource)) {
58349
+ if (existsSync11(gitignoreSource)) {
58289
58350
  copyFileSync(gitignoreSource, join12(basePath, ".gitignore"));
58290
58351
  }
58291
58352
  if (gitEnabled && !isGitRepo(basePath)) {
@@ -58301,15 +58362,15 @@ async function setupWizard(options) {
58301
58362
  mkdirSync7(join12(basePath, "harnesses"), { recursive: true });
58302
58363
  spinner.text = "Installing memory system...";
58303
58364
  const scriptsSource = join12(templatesDir, "memory", "scripts");
58304
- if (existsSync10(scriptsSource)) {
58365
+ if (existsSync11(scriptsSource)) {
58305
58366
  copyDirRecursive(scriptsSource, join12(basePath, "memory", "scripts"));
58306
58367
  }
58307
58368
  const requirementsSource = join12(templatesDir, "memory", "requirements.txt");
58308
- if (existsSync10(requirementsSource)) {
58369
+ if (existsSync11(requirementsSource)) {
58309
58370
  copyFileSync(requirementsSource, join12(basePath, "memory", "requirements.txt"));
58310
58371
  }
58311
58372
  const utilScriptsSource = join12(templatesDir, "scripts");
58312
- if (existsSync10(utilScriptsSource)) {
58373
+ if (existsSync11(utilScriptsSource)) {
58313
58374
  mkdirSync7(join12(basePath, "scripts"), { recursive: true });
58314
58375
  copyDirRecursive(utilScriptsSource, join12(basePath, "scripts"));
58315
58376
  }
@@ -58318,7 +58379,7 @@ async function setupWizard(options) {
58318
58379
  spinner.text = "Creating agent identity...";
58319
58380
  const agentsTemplate = join12(templatesDir, "AGENTS.md.template");
58320
58381
  let agentsMd;
58321
- if (existsSync10(agentsTemplate)) {
58382
+ if (existsSync11(agentsTemplate)) {
58322
58383
  agentsMd = readFileSync9(agentsTemplate, "utf-8").replace(/\{\{AGENT_NAME\}\}/g, agentName);
58323
58384
  } else {
58324
58385
  agentsMd = `# ${agentName}
@@ -58393,9 +58454,9 @@ ${agentName} is a helpful assistant.
58393
58454
  for (const doc of docFiles) {
58394
58455
  const templatePath = join12(templatesDir, doc.template);
58395
58456
  const destPath = join12(basePath, doc.name);
58396
- if (existsSync10(destPath))
58457
+ if (existsSync11(destPath))
58397
58458
  continue;
58398
- if (existsSync10(templatePath)) {
58459
+ if (existsSync11(templatePath)) {
58399
58460
  const content = readFileSync9(templatePath, "utf-8").replace(/\{\{AGENT_NAME\}\}/g, agentName);
58400
58461
  writeFileSync6(destPath, content);
58401
58462
  }
@@ -58513,7 +58574,7 @@ async function importFromGitHub(basePath) {
58513
58574
  }
58514
58575
  }
58515
58576
  const tmpDir = join12(basePath, ".import-tmp");
58516
- if (existsSync10(tmpDir)) {
58577
+ if (existsSync11(tmpDir)) {
58517
58578
  rmSync3(tmpDir, { recursive: true });
58518
58579
  }
58519
58580
  const spinner = ora("Cloning repository...").start();
@@ -58525,7 +58586,7 @@ async function importFromGitHub(basePath) {
58525
58586
  if (cloneResult.status !== 0) {
58526
58587
  spinner.fail("Clone failed");
58527
58588
  console.log(source_default.red(` ${cloneResult.stderr || "Unknown error"}`));
58528
- if (existsSync10(tmpDir))
58589
+ if (existsSync11(tmpDir))
58529
58590
  rmSync3(tmpDir, { recursive: true });
58530
58591
  return;
58531
58592
  }
@@ -58540,7 +58601,7 @@ async function importFromGitHub(basePath) {
58540
58601
  ];
58541
58602
  const foundFiles = [];
58542
58603
  for (const file of configFiles) {
58543
- if (existsSync10(join12(tmpDir, file))) {
58604
+ if (existsSync11(join12(tmpDir, file))) {
58544
58605
  foundFiles.push(file);
58545
58606
  }
58546
58607
  }
@@ -58568,8 +58629,8 @@ async function importFromGitHub(basePath) {
58568
58629
  console.log(source_default.green(` ✓ ${file}`));
58569
58630
  }
58570
58631
  const skillsDir = join12(tmpDir, "skills");
58571
- if (existsSync10(skillsDir)) {
58572
- const skills = readdirSync(skillsDir);
58632
+ if (existsSync11(skillsDir)) {
58633
+ const skills = readdirSync5(skillsDir);
58573
58634
  if (skills.length > 0) {
58574
58635
  mkdirSync7(join12(basePath, "skills"), { recursive: true });
58575
58636
  for (const skill of skills) {
@@ -58583,7 +58644,7 @@ async function importFromGitHub(basePath) {
58583
58644
  }
58584
58645
  }
58585
58646
  const scriptsDir = join12(tmpDir, "memory", "scripts");
58586
- if (existsSync10(scriptsDir)) {
58647
+ if (existsSync11(scriptsDir)) {
58587
58648
  mkdirSync7(join12(basePath, "memory", "scripts"), { recursive: true });
58588
58649
  copyDirRecursive(scriptsDir, join12(basePath, "memory", "scripts"));
58589
58650
  console.log(source_default.green(" ✓ memory/scripts/"));
@@ -58611,7 +58672,7 @@ async function importFromGitHub(basePath) {
58611
58672
  } catch (err) {
58612
58673
  spinner.fail("Import failed");
58613
58674
  console.log(source_default.red(` ${err.message}`));
58614
- if (existsSync10(tmpDir))
58675
+ if (existsSync11(tmpDir))
58615
58676
  rmSync3(tmpDir, { recursive: true });
58616
58677
  }
58617
58678
  }
@@ -58630,7 +58691,7 @@ async function migrateWizard(basePath) {
58630
58691
  });
58631
58692
  const inputPath = await esm_default4({
58632
58693
  message: "Path to export file:",
58633
- validate: (v) => existsSync10(v) || "File not found"
58694
+ validate: (v) => existsSync11(v) || "File not found"
58634
58695
  });
58635
58696
  const spinner = ora(`Importing from ${source}...`).start();
58636
58697
  try {
@@ -58663,7 +58724,7 @@ async function migrateSchema(options) {
58663
58724
  const basePath = options.path || AGENTS_DIR;
58664
58725
  const dbPath = join12(basePath, "memory", "memories.db");
58665
58726
  console.log(signetLogo());
58666
- if (!existsSync10(dbPath)) {
58727
+ if (!existsSync11(dbPath)) {
58667
58728
  console.log(source_default.yellow(" No database found."));
58668
58729
  console.log(` Run ${source_default.bold("signet setup")} to create one.`);
58669
58730
  return;
@@ -58849,7 +58910,7 @@ async function showLogs(options) {
58849
58910
  }
58850
58911
  function fallbackToFile() {
58851
58912
  const logFile = join12(LOG_DIR, `signet-${new Date().toISOString().split("T")[0]}.log`);
58852
- if (!existsSync10(logFile)) {
58913
+ if (!existsSync11(logFile)) {
58853
58914
  console.log(source_default.dim(" No log files found"));
58854
58915
  return;
58855
58916
  }
@@ -58937,7 +58998,7 @@ program2.command("sync").description("Sync built-in templates and skills").actio
58937
58998
  console.log(signetLogo());
58938
58999
  const basePath = AGENTS_DIR;
58939
59000
  const templatesDir = getTemplatesDir();
58940
- if (!existsSync10(basePath)) {
59001
+ if (!existsSync11(basePath)) {
58941
59002
  console.log(source_default.red(" No Signet installation found. Run: signet setup"));
58942
59003
  return;
58943
59004
  }
@@ -58946,7 +59007,7 @@ program2.command("sync").description("Sync built-in templates and skills").actio
58946
59007
  let synced = 0;
58947
59008
  const gitignoreSrc = join12(templatesDir, "gitignore.template");
58948
59009
  const gitignoreDest = join12(basePath, ".gitignore");
58949
- if (existsSync10(gitignoreSrc) && !existsSync10(gitignoreDest)) {
59010
+ if (existsSync11(gitignoreSrc) && !existsSync11(gitignoreDest)) {
58950
59011
  copyFileSync(gitignoreSrc, gitignoreDest);
58951
59012
  console.log(source_default.green(` ✓ .gitignore`));
58952
59013
  synced++;
@@ -58960,10 +59021,10 @@ program2.command("sync").description("Sync built-in templates and skills").actio
58960
59021
  }
58961
59022
  synced += skillSyncResult.installed.length + skillSyncResult.updated.length;
58962
59023
  const detectedHarnesses = [];
58963
- if (existsSync10(join12(homedir6(), ".claude", "settings.json"))) {
59024
+ if (existsSync11(join12(homedir7(), ".claude", "settings.json"))) {
58964
59025
  detectedHarnesses.push("claude-code");
58965
59026
  }
58966
- if (existsSync10(join12(homedir6(), ".config", "opencode"))) {
59027
+ if (existsSync11(join12(homedir7(), ".config", "opencode"))) {
58967
59028
  detectedHarnesses.push("opencode");
58968
59029
  }
58969
59030
  const ocConnector = new OpenClawConnector;
@@ -58988,7 +59049,7 @@ program2.command("sync").description("Sync built-in templates and skills").actio
58988
59049
  program2.command("config").description("Configure agent settings").action(async () => {
58989
59050
  console.log(signetLogo());
58990
59051
  const agentYamlPath = join12(AGENTS_DIR, "agent.yaml");
58991
- if (!existsSync10(agentYamlPath)) {
59052
+ if (!existsSync11(agentYamlPath)) {
58992
59053
  console.log(source_default.yellow(" No agent.yaml found. Run `signet setup` first."));
58993
59054
  return;
58994
59055
  }
@@ -59306,11 +59367,11 @@ function parseSkillFrontmatter(content) {
59306
59367
  };
59307
59368
  }
59308
59369
  function listLocalSkills() {
59309
- if (!existsSync10(SKILLS_DIR))
59370
+ if (!existsSync11(SKILLS_DIR))
59310
59371
  return [];
59311
- return readdirSync(SKILLS_DIR, { withFileTypes: true }).filter((d) => d.isDirectory()).flatMap((d) => {
59372
+ return readdirSync5(SKILLS_DIR, { withFileTypes: true }).filter((d) => d.isDirectory()).flatMap((d) => {
59312
59373
  const skillMdPath = join12(SKILLS_DIR, d.name, "SKILL.md");
59313
- if (!existsSync10(skillMdPath))
59374
+ if (!existsSync11(skillMdPath))
59314
59375
  return [];
59315
59376
  try {
59316
59377
  const content = readFileSync9(skillMdPath, "utf-8");
@@ -59445,7 +59506,7 @@ skillCmd.command("install <name>").description("Install a skill from skills.sh r
59445
59506
  });
59446
59507
  skillCmd.command("uninstall <name>").alias("remove").description("Remove an installed skill").action(async (name) => {
59447
59508
  const skillDir = join12(SKILLS_DIR, name);
59448
- if (!existsSync10(skillDir)) {
59509
+ if (!existsSync11(skillDir)) {
59449
59510
  console.log(source_default.yellow(` Skill '${name}' is not installed`));
59450
59511
  return;
59451
59512
  }
@@ -59513,7 +59574,7 @@ skillCmd.command("show <name>").description("Display SKILL.md content for an ins
59513
59574
  const data = await fetchFromDaemon(`/api/skills/${encodeURIComponent(name)}`);
59514
59575
  if (data?.error || !data?.content) {
59515
59576
  const skillMdPath = join12(SKILLS_DIR, name, "SKILL.md");
59516
- if (!existsSync10(skillMdPath)) {
59577
+ if (!existsSync11(skillMdPath)) {
59517
59578
  console.log(source_default.red(` Skill '${name}' is not installed`));
59518
59579
  console.log(source_default.dim(` Run: signet skill install ${name}`));
59519
59580
  return;
@@ -59832,10 +59893,10 @@ updateCmd.command("install").description("Install the latest update").action(asy
59832
59893
  console.log(source_default.green(` ✓ ${totalSynced} skills synced`));
59833
59894
  }
59834
59895
  const harnesses = [];
59835
- if (existsSync10(join12(homedir6(), ".claude", "settings.json"))) {
59896
+ if (existsSync11(join12(homedir7(), ".claude", "settings.json"))) {
59836
59897
  harnesses.push("claude-code");
59837
59898
  }
59838
- if (existsSync10(join12(homedir6(), ".config", "opencode"))) {
59899
+ if (existsSync11(join12(homedir7(), ".config", "opencode"))) {
59839
59900
  harnesses.push("opencode");
59840
59901
  }
59841
59902
  const oc = new OpenClawConnector;
@@ -60038,7 +60099,7 @@ async function detectVectorSources(basePath) {
60038
60099
  const sources = [];
60039
60100
  const memoryDir = join12(basePath, "memory");
60040
60101
  const zvecPath = join12(memoryDir, "vectors.zvec");
60041
- if (existsSync10(zvecPath)) {
60102
+ if (existsSync11(zvecPath)) {
60042
60103
  try {
60043
60104
  statSync7(zvecPath);
60044
60105
  sources.push({
@@ -60049,7 +60110,7 @@ async function detectVectorSources(basePath) {
60049
60110
  } catch {}
60050
60111
  }
60051
60112
  const dbPath = join12(memoryDir, "memories.db");
60052
- if (existsSync10(dbPath)) {
60113
+ if (existsSync11(dbPath)) {
60053
60114
  try {
60054
60115
  const db = sqlite_default(dbPath, { readonly: true });
60055
60116
  const tableCheck = db.prepare(`
@@ -60102,7 +60163,7 @@ program2.command("migrate-vectors").description("Migrate existing BLOB vectors t
60102
60163
  console.log(source_default.dim(" restore by dropping vec_embeddings table and using the BLOB column."));
60103
60164
  return;
60104
60165
  }
60105
- if (!existsSync10(dbPath)) {
60166
+ if (!existsSync11(dbPath)) {
60106
60167
  console.log(source_default.yellow(" No memories database found."));
60107
60168
  console.log(source_default.dim(` Expected: ${dbPath}`));
60108
60169
  return;
@@ -60162,6 +60223,10 @@ program2.command("migrate-vectors").description("Migrate existing BLOB vectors t
60162
60223
  const spinner = ora("Migrating vectors...").start();
60163
60224
  try {
60164
60225
  const db = sqlite_default(dbPath);
60226
+ if (!loadSqliteVec(db)) {
60227
+ spinner.fail("sqlite-vec extension not found — cannot migrate vectors.");
60228
+ return;
60229
+ }
60165
60230
  spinner.text = "Creating vec_embeddings table...";
60166
60231
  db.exec(`
60167
60232
  CREATE VIRTUAL TABLE IF NOT EXISTS vec_embeddings USING vec0(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "signetai",
3
- "version": "0.1.93",
3
+ "version": "0.1.95",
4
4
  "description": "Portable AI agent identity - own your agent, bring it anywhere",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1 +0,0 @@
1
- import{l as o,a as r}from"../chunks/D_34Vvm-.js";export{o as load_css,r as start};