signetai 0.5.3 → 0.6.1
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.
- package/dashboard/_app/immutable/chunks/CKcDTcDD.js +1 -0
- package/dashboard/_app/immutable/entry/{app.CgEaZT39.js → app.BooXWfY6.js} +2 -2
- package/dashboard/_app/immutable/entry/start.Ci3JKtkH.js +1 -0
- package/dashboard/_app/immutable/nodes/{1.DYb1vcB7.js → 1.CsnV91KD.js} +1 -1
- package/dashboard/_app/version.json +1 -1
- package/dashboard/index.html +6 -6
- package/dist/cli.js +344 -123
- package/dist/daemon.js +1 -1
- package/package.json +1 -1
- package/templates/skills/onboarding/SKILL.md +18 -0
- package/templates/skills/signet/SKILL.md +22 -0
- package/dashboard/_app/immutable/chunks/CzI--bKA.js +0 -1
- package/dashboard/_app/immutable/entry/start.BWgoogyV.js +0 -1
|
@@ -0,0 +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"./Bj_0MYHE.js";import{o as qe}from"./ahVI_oGv.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_akyyyi?.base??"",Ot=globalThis.__sveltekit_akyyyi?.assets??x??"",$t="1772192131335",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_akyyyi?.data&&globalThis.__sveltekit_akyyyi.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"&<(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,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.Bz7wvOtF.js","../chunks/BPEbbLGN.js","../chunks/Bj_0MYHE.js","../chunks/DHGWeelF.js","../chunks/DMR7qryH.js","../assets/0.CyfhAI3F.css","../nodes/1.
|
|
2
|
-
import{p as b,i as P,c as x,b as E,_ as O}from"../chunks/CD1-Hpzd.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/Bj_0MYHE.js";import{h as tt,m as et,u as rt,s as st}from"../chunks/DBPO4lOV.js";import{a as _,c as k,f as D,t as at}from"../chunks/BPEbbLGN.js";import{o as nt}from"../chunks/ahVI_oGv.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.Bz7wvOtF.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),()=>O(()=>import("../nodes/1.
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.Bz7wvOtF.js","../chunks/BPEbbLGN.js","../chunks/Bj_0MYHE.js","../chunks/DHGWeelF.js","../chunks/DMR7qryH.js","../assets/0.CyfhAI3F.css","../nodes/1.CsnV91KD.js","../chunks/CzeVSkV9.js","../chunks/DBPO4lOV.js","../chunks/CKcDTcDD.js","../chunks/ahVI_oGv.js","../nodes/2.BI_3DxNb.js","../chunks/DRVGglsb.js","../chunks/CD1-Hpzd.js","../assets/2.BqoCYZ3X.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{p as b,i as P,c as x,b as E,_ as O}from"../chunks/CD1-Hpzd.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/Bj_0MYHE.js";import{h as tt,m as et,u as rt,s as st}from"../chunks/DBPO4lOV.js";import{a as _,c as k,f as D,t as at}from"../chunks/BPEbbLGN.js";import{o as nt}from"../chunks/ahVI_oGv.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.Bz7wvOtF.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),()=>O(()=>import("../nodes/1.CsnV91KD.js"),__vite__mapDeps([6,1,2,7,8,9,10]),import.meta.url),()=>O(()=>import("../nodes/2.BI_3DxNb.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/CKcDTcDD.js";export{o as load_css,r as start};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as u,f as h}from"../chunks/BPEbbLGN.js";import{i as g}from"../chunks/CzeVSkV9.js";import{y as l,k as v,z as d,A as _,B as a,C as e,D as x}from"../chunks/Bj_0MYHE.js";import{s as o}from"../chunks/DBPO4lOV.js";import{s as k,p}from"../chunks/
|
|
1
|
+
import{a as u,f as h}from"../chunks/BPEbbLGN.js";import{i as g}from"../chunks/CzeVSkV9.js";import{y as l,k as v,z as d,A as _,B as a,C as e,D as x}from"../chunks/Bj_0MYHE.js";import{s as o}from"../chunks/DBPO4lOV.js";import{s as k,p}from"../chunks/CKcDTcDD.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":"
|
|
1
|
+
{"version":"1772192131335"}
|
package/dashboard/index.html
CHANGED
|
@@ -17,11 +17,11 @@
|
|
|
17
17
|
document.documentElement.dataset.theme = t;
|
|
18
18
|
})();
|
|
19
19
|
</script>
|
|
20
|
-
<link href="/_app/immutable/entry/start.
|
|
21
|
-
<link href="/_app/immutable/chunks/
|
|
20
|
+
<link href="/_app/immutable/entry/start.Ci3JKtkH.js" rel="modulepreload">
|
|
21
|
+
<link href="/_app/immutable/chunks/CKcDTcDD.js" rel="modulepreload">
|
|
22
22
|
<link href="/_app/immutable/chunks/Bj_0MYHE.js" rel="modulepreload">
|
|
23
23
|
<link href="/_app/immutable/chunks/ahVI_oGv.js" rel="modulepreload">
|
|
24
|
-
<link href="/_app/immutable/entry/app.
|
|
24
|
+
<link href="/_app/immutable/entry/app.BooXWfY6.js" rel="modulepreload">
|
|
25
25
|
<link href="/_app/immutable/chunks/CD1-Hpzd.js" rel="modulepreload">
|
|
26
26
|
<link href="/_app/immutable/chunks/DMR7qryH.js" rel="modulepreload">
|
|
27
27
|
<link href="/_app/immutable/chunks/DBPO4lOV.js" rel="modulepreload">
|
|
@@ -32,15 +32,15 @@
|
|
|
32
32
|
<div style="display: contents">
|
|
33
33
|
<script>
|
|
34
34
|
{
|
|
35
|
-
|
|
35
|
+
__sveltekit_akyyyi = {
|
|
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.
|
|
43
|
-
import("/_app/immutable/entry/app.
|
|
42
|
+
import("/_app/immutable/entry/start.Ci3JKtkH.js"),
|
|
43
|
+
import("/_app/immutable/entry/app.BooXWfY6.js")
|
|
44
44
|
]).then(([kit, app]) => {
|
|
45
45
|
kit.start(app, element);
|
|
46
46
|
});
|
package/dist/cli.js
CHANGED
|
@@ -66255,6 +66255,93 @@ function formatDetectionSummary(detection) {
|
|
|
66255
66255
|
return lines.join(`
|
|
66256
66256
|
`);
|
|
66257
66257
|
}
|
|
66258
|
+
var SETUP_HARNESS_CHOICES = [
|
|
66259
|
+
"claude-code",
|
|
66260
|
+
"opencode",
|
|
66261
|
+
"openclaw"
|
|
66262
|
+
];
|
|
66263
|
+
var EMBEDDING_PROVIDER_CHOICES = [
|
|
66264
|
+
"ollama",
|
|
66265
|
+
"openai",
|
|
66266
|
+
"none"
|
|
66267
|
+
];
|
|
66268
|
+
var EXTRACTION_PROVIDER_CHOICES = [
|
|
66269
|
+
"claude-code",
|
|
66270
|
+
"ollama",
|
|
66271
|
+
"none"
|
|
66272
|
+
];
|
|
66273
|
+
var OPENCLAW_RUNTIME_CHOICES = [
|
|
66274
|
+
"plugin",
|
|
66275
|
+
"legacy"
|
|
66276
|
+
];
|
|
66277
|
+
function collectListOption(value, previous) {
|
|
66278
|
+
const parts = value.split(",").map((part) => part.trim()).filter((part) => part.length > 0);
|
|
66279
|
+
return [...previous, ...parts];
|
|
66280
|
+
}
|
|
66281
|
+
function normalizeStringValue(value) {
|
|
66282
|
+
if (typeof value !== "string") {
|
|
66283
|
+
return null;
|
|
66284
|
+
}
|
|
66285
|
+
const trimmed = value.trim();
|
|
66286
|
+
return trimmed.length > 0 ? trimmed : null;
|
|
66287
|
+
}
|
|
66288
|
+
function normalizeChoice(value, allowed) {
|
|
66289
|
+
const normalized = normalizeStringValue(value);
|
|
66290
|
+
if (!normalized) {
|
|
66291
|
+
return null;
|
|
66292
|
+
}
|
|
66293
|
+
for (const candidate of allowed) {
|
|
66294
|
+
if (candidate === normalized) {
|
|
66295
|
+
return candidate;
|
|
66296
|
+
}
|
|
66297
|
+
}
|
|
66298
|
+
return null;
|
|
66299
|
+
}
|
|
66300
|
+
function parseNumericValue(value) {
|
|
66301
|
+
if (typeof value === "number" && Number.isFinite(value)) {
|
|
66302
|
+
return value;
|
|
66303
|
+
}
|
|
66304
|
+
if (typeof value === "string") {
|
|
66305
|
+
const parsed = Number.parseFloat(value);
|
|
66306
|
+
return Number.isFinite(parsed) ? parsed : null;
|
|
66307
|
+
}
|
|
66308
|
+
return null;
|
|
66309
|
+
}
|
|
66310
|
+
function parseIntegerValue(value) {
|
|
66311
|
+
const parsed = parseNumericValue(value);
|
|
66312
|
+
if (parsed === null) {
|
|
66313
|
+
return null;
|
|
66314
|
+
}
|
|
66315
|
+
return Number.isInteger(parsed) ? parsed : Math.trunc(parsed);
|
|
66316
|
+
}
|
|
66317
|
+
function parseSearchBalanceValue(value) {
|
|
66318
|
+
const parsed = parseNumericValue(value);
|
|
66319
|
+
if (parsed === null || parsed < 0 || parsed > 1) {
|
|
66320
|
+
return null;
|
|
66321
|
+
}
|
|
66322
|
+
return parsed;
|
|
66323
|
+
}
|
|
66324
|
+
function normalizeHarnessList(rawValues) {
|
|
66325
|
+
if (!rawValues || rawValues.length === 0) {
|
|
66326
|
+
return [];
|
|
66327
|
+
}
|
|
66328
|
+
const harnesses = [];
|
|
66329
|
+
for (const rawValue of rawValues) {
|
|
66330
|
+
const parts = rawValue.split(",").map((part) => part.trim()).filter((part) => part.length > 0);
|
|
66331
|
+
for (const part of parts) {
|
|
66332
|
+
const harness = normalizeChoice(part, SETUP_HARNESS_CHOICES);
|
|
66333
|
+
if (harness && !harnesses.includes(harness)) {
|
|
66334
|
+
harnesses.push(harness);
|
|
66335
|
+
}
|
|
66336
|
+
}
|
|
66337
|
+
}
|
|
66338
|
+
return harnesses;
|
|
66339
|
+
}
|
|
66340
|
+
function failNonInteractiveSetup(message) {
|
|
66341
|
+
console.error(source_default.red(` ${message}`));
|
|
66342
|
+
console.error(source_default.dim(" Ask the user for explicit provider choices and pass them as CLI flags."));
|
|
66343
|
+
process.exit(1);
|
|
66344
|
+
}
|
|
66258
66345
|
function getEmbeddingDimensions(model) {
|
|
66259
66346
|
switch (model) {
|
|
66260
66347
|
case "all-minilm":
|
|
@@ -66714,7 +66801,7 @@ async function manageHarnesses() {
|
|
|
66714
66801
|
}
|
|
66715
66802
|
spinner.succeed("Harnesses configured");
|
|
66716
66803
|
}
|
|
66717
|
-
async function existingSetupWizard(basePath, detection, existingConfig) {
|
|
66804
|
+
async function existingSetupWizard(basePath, detection, existingConfig, options) {
|
|
66718
66805
|
const spinner = ora("Setting up Signet for existing identity...").start();
|
|
66719
66806
|
try {
|
|
66720
66807
|
const templatesDir = getTemplatesDir();
|
|
@@ -66796,6 +66883,21 @@ async function existingSetupWizard(basePath, detection, existingConfig) {
|
|
|
66796
66883
|
tools: "TOOLS.md"
|
|
66797
66884
|
}
|
|
66798
66885
|
};
|
|
66886
|
+
if (options?.embeddingProvider && options.embeddingProvider !== "none") {
|
|
66887
|
+
const embeddingModel = options.embeddingModel || (options.embeddingProvider === "openai" ? "text-embedding-3-small" : "nomic-embed-text");
|
|
66888
|
+
config.embedding = {
|
|
66889
|
+
provider: options.embeddingProvider,
|
|
66890
|
+
model: embeddingModel,
|
|
66891
|
+
dimensions: getEmbeddingDimensions(embeddingModel)
|
|
66892
|
+
};
|
|
66893
|
+
}
|
|
66894
|
+
if (options?.extractionProvider && options.extractionProvider !== "none") {
|
|
66895
|
+
config.memory.pipelineV2 = {
|
|
66896
|
+
enabled: true,
|
|
66897
|
+
extractionProvider: options.extractionProvider,
|
|
66898
|
+
extractionModel: options.extractionModel || (options.extractionProvider === "claude-code" ? "haiku" : "glm-4.7-flash")
|
|
66899
|
+
};
|
|
66900
|
+
}
|
|
66799
66901
|
if (!existsSync18(join19(basePath, "agent.yaml"))) {
|
|
66800
66902
|
writeFileSync7(join19(basePath, "agent.yaml"), formatYaml(config));
|
|
66801
66903
|
}
|
|
@@ -66902,12 +67004,18 @@ async function existingSetupWizard(basePath, detection, existingConfig) {
|
|
|
66902
67004
|
}
|
|
66903
67005
|
}
|
|
66904
67006
|
console.log();
|
|
66905
|
-
|
|
66906
|
-
|
|
66907
|
-
|
|
66908
|
-
|
|
66909
|
-
|
|
66910
|
-
await
|
|
67007
|
+
if (options?.nonInteractive === true) {
|
|
67008
|
+
if (options.openDashboard === true) {
|
|
67009
|
+
await open_default(`http://localhost:${DEFAULT_PORT}`);
|
|
67010
|
+
}
|
|
67011
|
+
} else {
|
|
67012
|
+
const launchNow = await esm_default3({
|
|
67013
|
+
message: "Open the dashboard?",
|
|
67014
|
+
default: true
|
|
67015
|
+
});
|
|
67016
|
+
if (launchNow) {
|
|
67017
|
+
await open_default(`http://localhost:${DEFAULT_PORT}`);
|
|
67018
|
+
}
|
|
66911
67019
|
}
|
|
66912
67020
|
console.log();
|
|
66913
67021
|
console.log(source_default.cyan(" → Next step: Say '/onboarding' to personalize your agent"));
|
|
@@ -66922,8 +67030,13 @@ async function existingSetupWizard(basePath, detection, existingConfig) {
|
|
|
66922
67030
|
async function setupWizard(options) {
|
|
66923
67031
|
console.log(signetLogo());
|
|
66924
67032
|
console.log();
|
|
67033
|
+
const nonInteractive = options.nonInteractive === true;
|
|
66925
67034
|
const basePath = options.path || AGENTS_DIR;
|
|
66926
67035
|
const existing = detectExistingSetup2(basePath);
|
|
67036
|
+
if (nonInteractive) {
|
|
67037
|
+
console.log(source_default.dim(" Running in non-interactive mode"));
|
|
67038
|
+
console.log();
|
|
67039
|
+
}
|
|
66927
67040
|
let existingConfig = {};
|
|
66928
67041
|
if (existing.agentYaml) {
|
|
66929
67042
|
try {
|
|
@@ -66933,13 +67046,30 @@ async function setupWizard(options) {
|
|
|
66933
67046
|
}
|
|
66934
67047
|
const existingName = existingConfig.name || existingConfig.agent?.name || "My Agent";
|
|
66935
67048
|
const existingDesc = existingConfig.description || existingConfig.agent?.description || "Personal AI assistant";
|
|
66936
|
-
const existingHarnesses = existingConfig.harnesses ? typeof existingConfig.harnesses === "string" ? existingConfig.harnesses.split(",").map((
|
|
67049
|
+
const existingHarnesses = Array.isArray(existingConfig.harnesses) ? existingConfig.harnesses.filter((value) => typeof value === "string").map((value) => value.trim()).filter((value) => value.length > 0) : typeof existingConfig.harnesses === "string" ? existingConfig.harnesses.split(",").map((value) => value.trim()).filter((value) => value.length > 0) : [];
|
|
66937
67050
|
const existingEmbedding = existingConfig.embedding || {};
|
|
66938
67051
|
const existingSearch = existingConfig.search || {};
|
|
67052
|
+
const existingMemory = existingConfig.memory || {};
|
|
66939
67053
|
if (existing.agentsDir && existing.memoryDb) {
|
|
66940
67054
|
console.log(source_default.green(" ✓ Existing Signet installation detected"));
|
|
66941
67055
|
console.log(source_default.dim(` ${basePath}`));
|
|
66942
67056
|
console.log();
|
|
67057
|
+
if (nonInteractive) {
|
|
67058
|
+
const running = await isDaemonRunning();
|
|
67059
|
+
if (!running) {
|
|
67060
|
+
const spinner2 = ora("Starting daemon...").start();
|
|
67061
|
+
const started = await startDaemon();
|
|
67062
|
+
if (started) {
|
|
67063
|
+
spinner2.succeed("Daemon started");
|
|
67064
|
+
} else {
|
|
67065
|
+
spinner2.fail("Failed to start daemon");
|
|
67066
|
+
}
|
|
67067
|
+
}
|
|
67068
|
+
if (options.openDashboard === true) {
|
|
67069
|
+
await open_default(`http://localhost:${DEFAULT_PORT}`);
|
|
67070
|
+
}
|
|
67071
|
+
return;
|
|
67072
|
+
}
|
|
66943
67073
|
const action = await esm_default6({
|
|
66944
67074
|
message: "What would you like to do?",
|
|
66945
67075
|
choices: [
|
|
@@ -66953,13 +67083,16 @@ async function setupWizard(options) {
|
|
|
66953
67083
|
if (action === "dashboard") {
|
|
66954
67084
|
await launchDashboard({});
|
|
66955
67085
|
return;
|
|
66956
|
-
}
|
|
67086
|
+
}
|
|
67087
|
+
if (action === "github-import") {
|
|
66957
67088
|
await importFromGitHub(basePath);
|
|
66958
67089
|
return;
|
|
66959
|
-
}
|
|
67090
|
+
}
|
|
67091
|
+
if (action === "status") {
|
|
66960
67092
|
await showStatus({ path: basePath });
|
|
66961
67093
|
return;
|
|
66962
|
-
}
|
|
67094
|
+
}
|
|
67095
|
+
if (action === "exit") {
|
|
66963
67096
|
return;
|
|
66964
67097
|
}
|
|
66965
67098
|
const templatesDir = getTemplatesDir();
|
|
@@ -66987,6 +67120,25 @@ async function setupWizard(options) {
|
|
|
66987
67120
|
console.log(source_default.dim(" 4. Install connectors for detected harnesses"));
|
|
66988
67121
|
console.log(source_default.dim(" 5. Keep all existing files unchanged"));
|
|
66989
67122
|
console.log();
|
|
67123
|
+
if (nonInteractive) {
|
|
67124
|
+
const migrationEmbeddingProvider = normalizeChoice(options.embeddingProvider, EMBEDDING_PROVIDER_CHOICES);
|
|
67125
|
+
const migrationExtractionProvider = normalizeChoice(options.extractionProvider, EXTRACTION_PROVIDER_CHOICES);
|
|
67126
|
+
if (!migrationEmbeddingProvider) {
|
|
67127
|
+
failNonInteractiveSetup("Non-interactive setup requires --embedding-provider (ollama, openai, or none).");
|
|
67128
|
+
}
|
|
67129
|
+
if (!migrationExtractionProvider) {
|
|
67130
|
+
failNonInteractiveSetup("Non-interactive setup requires --extraction-provider (claude-code, ollama, or none).");
|
|
67131
|
+
}
|
|
67132
|
+
await existingSetupWizard(basePath, existing, existingConfig, {
|
|
67133
|
+
nonInteractive: true,
|
|
67134
|
+
openDashboard: options.openDashboard === true,
|
|
67135
|
+
embeddingProvider: migrationEmbeddingProvider,
|
|
67136
|
+
embeddingModel: normalizeStringValue(options.embeddingModel) || undefined,
|
|
67137
|
+
extractionProvider: migrationExtractionProvider,
|
|
67138
|
+
extractionModel: normalizeStringValue(options.extractionModel) || undefined
|
|
67139
|
+
});
|
|
67140
|
+
return;
|
|
67141
|
+
}
|
|
66990
67142
|
const proceed = await esm_default3({
|
|
66991
67143
|
message: "Proceed with Signet setup?",
|
|
66992
67144
|
default: true
|
|
@@ -67016,7 +67168,7 @@ async function setupWizard(options) {
|
|
|
67016
67168
|
} else {
|
|
67017
67169
|
console.log(source_default.bold(` Let's set up your agent identity.
|
|
67018
67170
|
`));
|
|
67019
|
-
const setupMethod = await esm_default6({
|
|
67171
|
+
const setupMethod = nonInteractive ? "new" : await esm_default6({
|
|
67020
67172
|
message: "How would you like to set up?",
|
|
67021
67173
|
choices: [
|
|
67022
67174
|
{ value: "new", name: "Create new agent identity" },
|
|
@@ -67031,7 +67183,8 @@ async function setupWizard(options) {
|
|
|
67031
67183
|
}
|
|
67032
67184
|
console.log();
|
|
67033
67185
|
}
|
|
67034
|
-
const
|
|
67186
|
+
const configuredName = normalizeStringValue(options.name);
|
|
67187
|
+
const agentName = nonInteractive ? configuredName || existingName : await esm_default4({
|
|
67035
67188
|
message: "What should your agent be called?",
|
|
67036
67189
|
default: existingName
|
|
67037
67190
|
});
|
|
@@ -67052,84 +67205,133 @@ async function setupWizard(options) {
|
|
|
67052
67205
|
checked: existingHarnesses.includes("openclaw")
|
|
67053
67206
|
}
|
|
67054
67207
|
];
|
|
67055
|
-
|
|
67056
|
-
|
|
67057
|
-
|
|
67058
|
-
|
|
67059
|
-
|
|
67208
|
+
let harnesses = [];
|
|
67209
|
+
if (nonInteractive) {
|
|
67210
|
+
const requestedHarnesses = normalizeHarnessList(options.harness);
|
|
67211
|
+
if (requestedHarnesses.length > 0) {
|
|
67212
|
+
harnesses = requestedHarnesses;
|
|
67213
|
+
} else {
|
|
67214
|
+
harnesses = normalizeHarnessList(existingHarnesses);
|
|
67215
|
+
}
|
|
67216
|
+
} else {
|
|
67217
|
+
console.log();
|
|
67218
|
+
harnesses = await esm_default2({
|
|
67219
|
+
message: "Which AI platforms do you use?",
|
|
67220
|
+
choices: harnessChoices
|
|
67221
|
+
});
|
|
67222
|
+
}
|
|
67060
67223
|
let configureOpenClawWs = false;
|
|
67061
67224
|
let openclawRuntimePath = "plugin";
|
|
67062
67225
|
if (harnesses.includes("openclaw")) {
|
|
67063
67226
|
const connector = new OpenClawConnector;
|
|
67064
67227
|
const existingConfigs = connector.getDiscoveredConfigPaths();
|
|
67065
|
-
if (
|
|
67228
|
+
if (nonInteractive) {
|
|
67229
|
+
configureOpenClawWs = options.configureOpenclawWorkspace === true && existingConfigs.length > 0;
|
|
67230
|
+
const requestedRuntimePath = normalizeChoice(options.openclawRuntimePath, OPENCLAW_RUNTIME_CHOICES);
|
|
67231
|
+
openclawRuntimePath = requestedRuntimePath ?? "plugin";
|
|
67232
|
+
} else {
|
|
67233
|
+
if (existingConfigs.length > 0) {
|
|
67234
|
+
console.log();
|
|
67235
|
+
configureOpenClawWs = await esm_default3({
|
|
67236
|
+
message: `Set OpenClaw workspace to ~/.agents in ${existingConfigs.length} config file(s)?`,
|
|
67237
|
+
default: true
|
|
67238
|
+
});
|
|
67239
|
+
}
|
|
67066
67240
|
console.log();
|
|
67067
|
-
|
|
67068
|
-
message:
|
|
67069
|
-
|
|
67241
|
+
openclawRuntimePath = await esm_default6({
|
|
67242
|
+
message: "OpenClaw integration mode:",
|
|
67243
|
+
choices: [
|
|
67244
|
+
{
|
|
67245
|
+
value: "plugin",
|
|
67246
|
+
name: "Plugin adapter (recommended)",
|
|
67247
|
+
description: "@signetai/signet-memory-openclaw — full lifecycle + memory tools"
|
|
67248
|
+
},
|
|
67249
|
+
{
|
|
67250
|
+
value: "legacy",
|
|
67251
|
+
name: "Legacy hooks",
|
|
67252
|
+
description: "handler.js for /remember, /recall, /context commands"
|
|
67253
|
+
}
|
|
67254
|
+
],
|
|
67255
|
+
default: "plugin"
|
|
67070
67256
|
});
|
|
67071
67257
|
}
|
|
67072
|
-
console.log();
|
|
67073
|
-
openclawRuntimePath = await esm_default6({
|
|
67074
|
-
message: "OpenClaw integration mode:",
|
|
67075
|
-
choices: [
|
|
67076
|
-
{
|
|
67077
|
-
value: "plugin",
|
|
67078
|
-
name: "Plugin adapter (recommended)",
|
|
67079
|
-
description: "@signetai/signet-memory-openclaw — full lifecycle + memory tools"
|
|
67080
|
-
},
|
|
67081
|
-
{
|
|
67082
|
-
value: "legacy",
|
|
67083
|
-
name: "Legacy hooks",
|
|
67084
|
-
description: "handler.js for /remember, /recall, /context commands"
|
|
67085
|
-
}
|
|
67086
|
-
],
|
|
67087
|
-
default: "plugin"
|
|
67088
|
-
});
|
|
67089
67258
|
}
|
|
67090
|
-
|
|
67091
|
-
const agentDescription = await esm_default4({
|
|
67259
|
+
const configuredDescription = normalizeStringValue(options.description);
|
|
67260
|
+
const agentDescription = nonInteractive ? configuredDescription || existingDesc : await esm_default4({
|
|
67092
67261
|
message: "Short description of your agent:",
|
|
67093
67262
|
default: existingDesc
|
|
67094
67263
|
});
|
|
67095
|
-
|
|
67096
|
-
|
|
67097
|
-
|
|
67098
|
-
|
|
67099
|
-
|
|
67100
|
-
|
|
67101
|
-
|
|
67102
|
-
|
|
67103
|
-
|
|
67104
|
-
|
|
67105
|
-
|
|
67106
|
-
|
|
67264
|
+
const requestedEmbeddingProvider = normalizeChoice(options.embeddingProvider, EMBEDDING_PROVIDER_CHOICES);
|
|
67265
|
+
const requestedExtractionProvider = normalizeChoice(options.extractionProvider, EXTRACTION_PROVIDER_CHOICES);
|
|
67266
|
+
if (nonInteractive && !requestedEmbeddingProvider) {
|
|
67267
|
+
failNonInteractiveSetup("Non-interactive setup requires --embedding-provider (ollama, openai, or none).");
|
|
67268
|
+
}
|
|
67269
|
+
if (nonInteractive && !requestedExtractionProvider) {
|
|
67270
|
+
failNonInteractiveSetup("Non-interactive setup requires --extraction-provider (claude-code, ollama, or none).");
|
|
67271
|
+
}
|
|
67272
|
+
let embeddingProvider;
|
|
67273
|
+
if (nonInteractive) {
|
|
67274
|
+
const providerFromConfig = normalizeChoice(existingEmbedding.provider, EMBEDDING_PROVIDER_CHOICES);
|
|
67275
|
+
embeddingProvider = requestedEmbeddingProvider ?? providerFromConfig ?? "none";
|
|
67276
|
+
} else {
|
|
67107
67277
|
console.log();
|
|
67108
|
-
|
|
67109
|
-
message: "
|
|
67278
|
+
embeddingProvider = await esm_default6({
|
|
67279
|
+
message: "How should memories be embedded for search?",
|
|
67110
67280
|
choices: [
|
|
67111
|
-
{
|
|
67112
|
-
|
|
67113
|
-
|
|
67114
|
-
},
|
|
67115
|
-
{ value: "all-minilm", name: "all-minilm (384d, faster)" },
|
|
67116
|
-
{
|
|
67117
|
-
value: "mxbai-embed-large",
|
|
67118
|
-
name: "mxbai-embed-large (1024d, better quality)"
|
|
67119
|
-
}
|
|
67281
|
+
{ value: "ollama", name: "Ollama (local, recommended)" },
|
|
67282
|
+
{ value: "openai", name: "OpenAI API" },
|
|
67283
|
+
{ value: "none", name: "Skip embeddings for now" }
|
|
67120
67284
|
]
|
|
67121
67285
|
});
|
|
67122
|
-
|
|
67123
|
-
|
|
67124
|
-
|
|
67125
|
-
|
|
67286
|
+
}
|
|
67287
|
+
let embeddingModel = "nomic-embed-text";
|
|
67288
|
+
let embeddingDimensions = 768;
|
|
67289
|
+
if (embeddingProvider === "ollama") {
|
|
67290
|
+
if (nonInteractive) {
|
|
67291
|
+
const configuredModel = normalizeStringValue(options.embeddingModel) || normalizeStringValue(existingEmbedding.model) || "nomic-embed-text";
|
|
67292
|
+
embeddingModel = configuredModel;
|
|
67293
|
+
embeddingDimensions = getEmbeddingDimensions(configuredModel);
|
|
67294
|
+
} else {
|
|
67295
|
+
console.log();
|
|
67296
|
+
const model = await esm_default6({
|
|
67297
|
+
message: "Which embedding model?",
|
|
67298
|
+
choices: [
|
|
67299
|
+
{
|
|
67300
|
+
value: "nomic-embed-text",
|
|
67301
|
+
name: "nomic-embed-text (768d, recommended)"
|
|
67302
|
+
},
|
|
67303
|
+
{ value: "all-minilm", name: "all-minilm (384d, faster)" },
|
|
67304
|
+
{
|
|
67305
|
+
value: "mxbai-embed-large",
|
|
67306
|
+
name: "mxbai-embed-large (1024d, better quality)"
|
|
67307
|
+
}
|
|
67308
|
+
]
|
|
67309
|
+
});
|
|
67310
|
+
const preflight = await preflightOllamaEmbedding(model);
|
|
67311
|
+
embeddingProvider = preflight.provider;
|
|
67312
|
+
embeddingModel = preflight.model ?? embeddingModel;
|
|
67313
|
+
embeddingDimensions = preflight.dimensions ?? embeddingDimensions;
|
|
67314
|
+
}
|
|
67126
67315
|
} else if (embeddingProvider === "openai") {
|
|
67127
|
-
|
|
67128
|
-
|
|
67129
|
-
|
|
67316
|
+
if (nonInteractive) {
|
|
67317
|
+
const configuredModel = normalizeChoice(options.embeddingModel, [
|
|
67318
|
+
"text-embedding-3-small",
|
|
67319
|
+
"text-embedding-3-large"
|
|
67320
|
+
]) || normalizeChoice(existingEmbedding.model, [
|
|
67321
|
+
"text-embedding-3-small",
|
|
67322
|
+
"text-embedding-3-large"
|
|
67323
|
+
]) || "text-embedding-3-small";
|
|
67324
|
+
embeddingModel = configuredModel;
|
|
67325
|
+
embeddingDimensions = getEmbeddingDimensions(configuredModel);
|
|
67326
|
+
} else {
|
|
67327
|
+
const openai = await promptOpenAIEmbeddingModel();
|
|
67328
|
+
embeddingModel = openai.model;
|
|
67329
|
+
embeddingDimensions = openai.dimensions;
|
|
67330
|
+
}
|
|
67130
67331
|
}
|
|
67131
|
-
|
|
67132
|
-
const
|
|
67332
|
+
const existingSearchBalance = parseSearchBalanceValue(existingSearch.alpha);
|
|
67333
|
+
const requestedSearchBalance = parseSearchBalanceValue(options.searchBalance);
|
|
67334
|
+
const searchBalance = nonInteractive ? requestedSearchBalance ?? existingSearchBalance ?? 0.7 : await esm_default6({
|
|
67133
67335
|
message: "Search style (semantic vs keyword matching):",
|
|
67134
67336
|
choices: [
|
|
67135
67337
|
{
|
|
@@ -67141,54 +67343,67 @@ async function setupWizard(options) {
|
|
|
67141
67343
|
{ value: 0.3, name: "Keyword-heavy (30% semantic, 70% keyword)" }
|
|
67142
67344
|
]
|
|
67143
67345
|
});
|
|
67144
|
-
|
|
67145
|
-
|
|
67146
|
-
|
|
67147
|
-
|
|
67148
|
-
|
|
67149
|
-
value: "claude-code",
|
|
67150
|
-
name: "Claude Code (uses your Claude subscription via CLI)"
|
|
67151
|
-
},
|
|
67152
|
-
{
|
|
67153
|
-
value: "ollama",
|
|
67154
|
-
name: "Ollama (local, requires running Ollama server)"
|
|
67155
|
-
},
|
|
67156
|
-
{ value: "none", name: "Skip extraction pipeline" }
|
|
67157
|
-
]
|
|
67158
|
-
});
|
|
67159
|
-
let extractionModel = "haiku";
|
|
67160
|
-
if (extractionProvider === "claude-code") {
|
|
67161
|
-
console.log();
|
|
67162
|
-
extractionModel = await esm_default6({
|
|
67163
|
-
message: "Which Claude model for extraction?",
|
|
67164
|
-
choices: [
|
|
67165
|
-
{ value: "haiku", name: "Haiku (fast, cheap, recommended)" },
|
|
67166
|
-
{ value: "sonnet", name: "Sonnet (better quality, slower)" }
|
|
67167
|
-
]
|
|
67168
|
-
});
|
|
67169
|
-
} else if (extractionProvider === "ollama") {
|
|
67346
|
+
let extractionProvider;
|
|
67347
|
+
if (nonInteractive) {
|
|
67348
|
+
const providerFromConfig = normalizeChoice(existingMemory.pipelineV2?.extractionProvider, EXTRACTION_PROVIDER_CHOICES);
|
|
67349
|
+
extractionProvider = requestedExtractionProvider ?? providerFromConfig ?? "none";
|
|
67350
|
+
} else {
|
|
67170
67351
|
console.log();
|
|
67171
|
-
|
|
67172
|
-
message: "
|
|
67352
|
+
extractionProvider = await esm_default6({
|
|
67353
|
+
message: "Memory extraction provider (analyzes conversations):",
|
|
67173
67354
|
choices: [
|
|
67174
67355
|
{
|
|
67175
|
-
value: "
|
|
67176
|
-
name: "
|
|
67356
|
+
value: "claude-code",
|
|
67357
|
+
name: "Claude Code (uses your Claude subscription via CLI)"
|
|
67358
|
+
},
|
|
67359
|
+
{
|
|
67360
|
+
value: "ollama",
|
|
67361
|
+
name: "Ollama (local, requires running Ollama server)"
|
|
67177
67362
|
},
|
|
67178
|
-
{ value: "
|
|
67179
|
-
{ value: "llama3", name: "llama3 (general purpose)" }
|
|
67363
|
+
{ value: "none", name: "Skip extraction pipeline" }
|
|
67180
67364
|
]
|
|
67181
67365
|
});
|
|
67182
67366
|
}
|
|
67183
|
-
|
|
67184
|
-
|
|
67367
|
+
let extractionModel = "haiku";
|
|
67368
|
+
if (extractionProvider === "claude-code") {
|
|
67369
|
+
if (nonInteractive) {
|
|
67370
|
+
extractionModel = normalizeStringValue(options.extractionModel) || normalizeStringValue(existingMemory.pipelineV2?.extractionModel) || "haiku";
|
|
67371
|
+
} else {
|
|
67372
|
+
console.log();
|
|
67373
|
+
extractionModel = await esm_default6({
|
|
67374
|
+
message: "Which Claude model for extraction?",
|
|
67375
|
+
choices: [
|
|
67376
|
+
{ value: "haiku", name: "Haiku (fast, cheap, recommended)" },
|
|
67377
|
+
{ value: "sonnet", name: "Sonnet (better quality, slower)" }
|
|
67378
|
+
]
|
|
67379
|
+
});
|
|
67380
|
+
}
|
|
67381
|
+
} else if (extractionProvider === "ollama") {
|
|
67382
|
+
if (nonInteractive) {
|
|
67383
|
+
extractionModel = normalizeStringValue(options.extractionModel) || normalizeStringValue(existingMemory.pipelineV2?.extractionModel) || "glm-4.7-flash";
|
|
67384
|
+
} else {
|
|
67385
|
+
console.log();
|
|
67386
|
+
extractionModel = await esm_default6({
|
|
67387
|
+
message: "Which Ollama model for extraction?",
|
|
67388
|
+
choices: [
|
|
67389
|
+
{
|
|
67390
|
+
value: "glm-4.7-flash",
|
|
67391
|
+
name: "glm-4.7-flash (good quality, recommended)"
|
|
67392
|
+
},
|
|
67393
|
+
{ value: "qwen3:4b", name: "qwen3:4b (lighter, faster)" },
|
|
67394
|
+
{ value: "llama3", name: "llama3 (general purpose)" }
|
|
67395
|
+
]
|
|
67396
|
+
});
|
|
67397
|
+
}
|
|
67398
|
+
}
|
|
67399
|
+
const wantAdvanced = nonInteractive ? false : await esm_default3({
|
|
67185
67400
|
message: "Configure advanced settings?",
|
|
67186
67401
|
default: false
|
|
67187
67402
|
});
|
|
67188
|
-
let searchTopK = 20;
|
|
67189
|
-
let searchMinScore = 0.3;
|
|
67190
|
-
let memorySessionBudget = 2000;
|
|
67191
|
-
let memoryDecayRate = 0.95;
|
|
67403
|
+
let searchTopK = parseIntegerValue(existingSearch.top_k) ?? 20;
|
|
67404
|
+
let searchMinScore = parseSearchBalanceValue(existingSearch.min_score) ?? 0.3;
|
|
67405
|
+
let memorySessionBudget = parseIntegerValue(existingMemory.session_budget) ?? 2000;
|
|
67406
|
+
let memoryDecayRate = parseSearchBalanceValue(existingMemory.decay_rate) ?? 0.95;
|
|
67192
67407
|
if (wantAdvanced) {
|
|
67193
67408
|
console.log();
|
|
67194
67409
|
console.log(source_default.dim(` Advanced settings:
|
|
@@ -67214,14 +67429,14 @@ async function setupWizard(options) {
|
|
|
67214
67429
|
});
|
|
67215
67430
|
memoryDecayRate = parseFloat(decayInput) || 0.95;
|
|
67216
67431
|
}
|
|
67217
|
-
console.log();
|
|
67218
67432
|
let gitEnabled = false;
|
|
67433
|
+
const shouldSkipGit = nonInteractive && options.skipGit === true;
|
|
67219
67434
|
if (existing.agentsDir) {
|
|
67220
67435
|
if (isGitRepo2(basePath)) {
|
|
67221
67436
|
gitEnabled = true;
|
|
67222
67437
|
console.log(source_default.dim(" Git repo detected. Will create backup commit before changes."));
|
|
67223
|
-
} else {
|
|
67224
|
-
const initGit = await esm_default3({
|
|
67438
|
+
} else if (!shouldSkipGit) {
|
|
67439
|
+
const initGit = nonInteractive ? true : await esm_default3({
|
|
67225
67440
|
message: "Initialize git for version history?",
|
|
67226
67441
|
default: true
|
|
67227
67442
|
});
|
|
@@ -67235,8 +67450,8 @@ async function setupWizard(options) {
|
|
|
67235
67450
|
}
|
|
67236
67451
|
}
|
|
67237
67452
|
}
|
|
67238
|
-
} else {
|
|
67239
|
-
const initGit = await esm_default3({
|
|
67453
|
+
} else if (!shouldSkipGit) {
|
|
67454
|
+
const initGit = nonInteractive ? true : await esm_default3({
|
|
67240
67455
|
message: "Initialize git for version history?",
|
|
67241
67456
|
default: true
|
|
67242
67457
|
});
|
|
@@ -67422,12 +67637,18 @@ ${agentName} is a helpful assistant.
|
|
|
67422
67637
|
console.log(source_default.dim(" ✓ Changes committed to git"));
|
|
67423
67638
|
}
|
|
67424
67639
|
}
|
|
67425
|
-
|
|
67426
|
-
|
|
67427
|
-
|
|
67428
|
-
|
|
67429
|
-
|
|
67430
|
-
await
|
|
67640
|
+
if (nonInteractive) {
|
|
67641
|
+
if (options.openDashboard === true) {
|
|
67642
|
+
await open_default(`http://localhost:${DEFAULT_PORT}`);
|
|
67643
|
+
}
|
|
67644
|
+
} else {
|
|
67645
|
+
const launchNow = await esm_default3({
|
|
67646
|
+
message: "Open the dashboard?",
|
|
67647
|
+
default: true
|
|
67648
|
+
});
|
|
67649
|
+
if (launchNow) {
|
|
67650
|
+
await open_default(`http://localhost:${DEFAULT_PORT}`);
|
|
67651
|
+
}
|
|
67431
67652
|
}
|
|
67432
67653
|
console.log();
|
|
67433
67654
|
console.log(source_default.cyan(" → Next step: Say '/onboarding' to personalize your agent"));
|
|
@@ -67808,7 +68029,7 @@ async function showLogs(options) {
|
|
|
67808
68029
|
}
|
|
67809
68030
|
}
|
|
67810
68031
|
program2.name("signet").description("Own your agent. Bring it anywhere.").version(VERSION);
|
|
67811
|
-
program2.command("setup").description("
|
|
68032
|
+
program2.command("setup").description("Setup wizard (interactive by default)").option("-p, --path <path>", "Base path for agent files").option("--non-interactive", "Run setup without prompts").option("--name <name>", "Agent name (non-interactive mode)").option("--description <description>", "Agent description (non-interactive mode)").option("--harness <harness>", "Harness to configure (repeatable or comma-separated: claude-code, opencode, openclaw)", collectListOption, []).option("--embedding-provider <provider>", "Embedding provider in non-interactive mode (ollama, openai, none)").option("--embedding-model <model>", "Embedding model in non-interactive mode").option("--extraction-provider <provider>", "Extraction provider in non-interactive mode (claude-code, ollama, none)").option("--extraction-model <model>", "Extraction model in non-interactive mode").option("--search-balance <alpha>", "Search balance alpha in non-interactive mode (0-1)").option("--openclaw-runtime-path <mode>", "OpenClaw runtime path in non-interactive mode (plugin, legacy)").option("--configure-openclaw-workspace", "Patch discovered OpenClaw configs to use ~/.agents in non-interactive mode").option("--open-dashboard", "Open dashboard after setup in non-interactive mode").option("--skip-git", "Skip git initialization and setup commits in non-interactive mode").action(setupWizard);
|
|
67812
68033
|
program2.command("dashboard").alias("ui").description("Open the web dashboard").option("-p, --path <path>", "Base path for agent files").action(launchDashboard);
|
|
67813
68034
|
program2.command("status").description("Show agent and daemon status").option("-p, --path <path>", "Base path for agent files").action(showStatus);
|
|
67814
68035
|
program2.command("migrate-schema").description("Migrate database to unified schema").option("-p, --path <path>", "Base path for agent files").action(migrateSchema);
|
package/dist/daemon.js
CHANGED
|
@@ -6824,7 +6824,7 @@ async function spawnTask(harness, prompt, workingDirectory, timeoutMs = DEFAULT_
|
|
|
6824
6824
|
bin: resolvedBin,
|
|
6825
6825
|
cwd: workingDirectory
|
|
6826
6826
|
});
|
|
6827
|
-
const { SIGNET_NO_HOOKS: _2, ...baseEnv } = process.env;
|
|
6827
|
+
const { CLAUDECODE: _cc, SIGNET_NO_HOOKS: _2, ...baseEnv } = process.env;
|
|
6828
6828
|
const proc = Bun.spawn([resolvedBin, ...args], {
|
|
6829
6829
|
cwd: workingDirectory ?? undefined,
|
|
6830
6830
|
stdout: "pipe",
|
package/package.json
CHANGED
|
@@ -19,6 +19,24 @@ Walk the user through an interactive interview to personalize their Signet works
|
|
|
19
19
|
- User says "I want to redo my agent setup"
|
|
20
20
|
- User says "clean up my memory" or "optimize my workspace"
|
|
21
21
|
|
|
22
|
+
## Setup Preflight (Agent-Driven)
|
|
23
|
+
|
|
24
|
+
If Signet is not initialized yet (`~/.agents/agent.yaml` missing),
|
|
25
|
+
bootstrap setup first and then continue onboarding:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
signet setup --non-interactive \
|
|
29
|
+
--name "My Agent" \
|
|
30
|
+
--description "Personal AI assistant" \
|
|
31
|
+
--harness claude-code \
|
|
32
|
+
--embedding-provider <ollama|openai|none> \
|
|
33
|
+
--extraction-provider <claude-code|ollama|none>
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Use interactive `signet` when the user wants to answer prompts manually.
|
|
37
|
+
Use `--non-interactive` when the agent should complete setup directly.
|
|
38
|
+
Before running it, explicitly ask the user for both provider choices.
|
|
39
|
+
|
|
22
40
|
## Interview Philosophy
|
|
23
41
|
|
|
24
42
|
Don't interrogate. Make it conversational. One or two questions at a time, then respond naturally before continuing. Sprinkle in personality. Adapt based on their energy level.
|
|
@@ -217,10 +217,32 @@ Install skills:
|
|
|
217
217
|
npx skills install <skill-name>
|
|
218
218
|
```
|
|
219
219
|
|
|
220
|
+
## Setup Modes
|
|
221
|
+
|
|
222
|
+
When helping a user bootstrap Signet, both setup modes are valid:
|
|
223
|
+
|
|
224
|
+
```bash
|
|
225
|
+
# Interactive setup
|
|
226
|
+
signet
|
|
227
|
+
|
|
228
|
+
# Non-interactive setup (agent-driven)
|
|
229
|
+
signet setup --non-interactive \
|
|
230
|
+
--name "My Agent" \
|
|
231
|
+
--harness claude-code \
|
|
232
|
+
--embedding-provider <ollama|openai|none> \
|
|
233
|
+
--extraction-provider <claude-code|ollama|none>
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
Use `--non-interactive` when the agent needs to complete setup without
|
|
237
|
+
waiting for terminal prompts. Ask the user for provider choices first,
|
|
238
|
+
then pass both provider flags explicitly.
|
|
239
|
+
|
|
220
240
|
## Commands Reference
|
|
221
241
|
|
|
222
242
|
```bash
|
|
223
243
|
signet # Interactive menu
|
|
244
|
+
signet setup # Setup wizard
|
|
245
|
+
signet setup --non-interactive --name "Agent" --harness claude-code --embedding-provider ollama --extraction-provider claude-code
|
|
224
246
|
signet status # Show status
|
|
225
247
|
signet dashboard # Open web UI
|
|
226
248
|
signet secret put NAME # Store a secret
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{bm as he,bt as mt,X as A,q as U,P as T,W as te,bu as _t}from"./Bj_0MYHE.js";import{o as qe}from"./ahVI_oGv.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 vt(e,t){return e==="/"||t==="ignore"?e:t==="never"?e.endsWith("/")?e.slice(0,-1):e:t==="always"&&!e.endsWith("/")?e+"/":e}function wt(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(v=>parseInt(v,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 v=p.exec(h);if(v)return Pt(v,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_1gvie4d?.base??"",Ot=globalThis.__sveltekit_1gvie4d?.assets??x??"",$t="1772189835713",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 ve(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,we,re,P,ye,w;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_1gvie4d?.data&&globalThis.__sveltekit_1gvie4d.data,document.URL!==location.href&&(location.href=location.href),w=e,await e.hooks.init?.(),Pe=It(e),P=document.documentElement,ye=t,we=e.nodes[0],re=e.nodes[1],we(),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(w.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 w.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=vt(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],v=_.branch[u];h?.data!==v?.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)},w.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:v}=ut(f,u,n);return o&&d(h.href),v},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 v=[];for(let m=0;m<c.length;m+=1)if(c[m])try{v.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,v,s);return I?le({url:n,params:r,branch:v.slice(0,I.idx).concat(I.node),status:S,error:E,route:a}):await ht(n,{id:a.id},E,S)}else v.push(void 0);return le({url:n,params:r,branch:v,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:we,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 w.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);w.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,w.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 wt(w.hash?e.hash.replace(/^#/,"").replace(/[?#].+/,""):e.pathname.slice(x.length))||"/"}function ce(e){return(w.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 v=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,w.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(v),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"&<(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}=ve(c,x,w.hash);if(f||u)return;const h=ne(c),v=p&&ce(_.url)===ce(p);if(!(h.reload||v))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}=ve(o,x,w.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 w.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}=ve(n,x,w.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]=(w.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),w.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(v,m)=>{const g=o[m];return g?.uses&&(g.uses=on(g.uses)),Oe({loader:w.nodes[v],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 v=d.layouts;for(let m=0;m<v.length;m++)v[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(w.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 +0,0 @@
|
|
|
1
|
-
import{l as o,a as r}from"../chunks/CzI--bKA.js";export{o as load_css,r as start};
|