studiograph 1.3.44-next.2 → 1.3.44-next.3

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.
Files changed (40) hide show
  1. package/dist/server/routes/insights-api.js +7 -1
  2. package/dist/server/routes/insights-api.js.map +1 -1
  3. package/dist/services/auth-service.d.ts +2 -0
  4. package/dist/services/auth-service.js +15 -1
  5. package/dist/services/auth-service.js.map +1 -1
  6. package/dist/web/_app/immutable/assets/{7.5LBMlZdT.css → 7.D55lTQ_F.css} +1 -1
  7. package/dist/web/_app/immutable/chunks/{DodWDTE5.js → B-PHzYeY.js} +1 -1
  8. package/dist/web/_app/immutable/chunks/{DQJwHeKh.js → BDTSG9D-.js} +1 -1
  9. package/dist/web/_app/immutable/chunks/{Diui_MO0.js → BEbZenUn.js} +1 -1
  10. package/dist/web/_app/immutable/chunks/{By_Wtb5J.js → BR3Oh1Lv.js} +1 -1
  11. package/dist/web/_app/immutable/chunks/{BUcIsKRk.js → BYKARDRw.js} +1 -1
  12. package/dist/web/_app/immutable/chunks/{Bs4ovbtO.js → BfEy5AjR.js} +2 -2
  13. package/dist/web/_app/immutable/chunks/{0rsp5-Up.js → Bolw6cIp.js} +1 -1
  14. package/dist/web/_app/immutable/chunks/{BAAbylyg.js → C0v9FrTH.js} +1 -1
  15. package/dist/web/_app/immutable/chunks/CB2-7g10.js +1 -0
  16. package/dist/web/_app/immutable/chunks/Cc0c675R.js +1 -0
  17. package/dist/web/_app/immutable/chunks/{0wBGAod7.js → D2C1YupD.js} +1 -1
  18. package/dist/web/_app/immutable/chunks/{BU2bHQbQ.js → DNldxAbC.js} +1 -1
  19. package/dist/web/_app/immutable/chunks/{DC9z5DEo.js → HVmKTSmh.js} +1 -1
  20. package/dist/web/_app/immutable/entry/{app.DA5OyPOi.js → app.BuNYNoxY.js} +2 -2
  21. package/dist/web/_app/immutable/entry/start.6840wwQK.js +1 -0
  22. package/dist/web/_app/immutable/nodes/0.Dowq8M1Z.js +2 -0
  23. package/dist/web/_app/immutable/nodes/{1.y3j9wcQE.js → 1.UNZ7IKS_.js} +1 -1
  24. package/dist/web/_app/immutable/nodes/{10.D03BZcr1.js → 10.7pt8gUOi.js} +1 -1
  25. package/dist/web/_app/immutable/nodes/{2.Du0xZVQg.js → 2.B5L8POz_.js} +2 -2
  26. package/dist/web/_app/immutable/nodes/{3.weQEi2lI.js → 3.B1Y1g0du.js} +1 -1
  27. package/dist/web/_app/immutable/nodes/{4.DJyhWznw.js → 4.BerDMn5m.js} +3 -3
  28. package/dist/web/_app/immutable/nodes/{5.CipwuwB3.js → 5.IM34i9-W.js} +1 -1
  29. package/dist/web/_app/immutable/nodes/{6.Daxwm3Lw.js → 6.DPwydXYm.js} +1 -1
  30. package/dist/web/_app/immutable/nodes/7.DpSO-I2k.js +2 -0
  31. package/dist/web/_app/immutable/nodes/{8.DWNdmB4l.js → 8.BVUyEEut.js} +1 -1
  32. package/dist/web/_app/immutable/nodes/{9.BuTZk7Le.js → 9.8nTMvuWx.js} +1 -1
  33. package/dist/web/_app/version.json +1 -1
  34. package/dist/web/index.html +6 -6
  35. package/package.json +1 -1
  36. package/dist/web/_app/immutable/chunks/DSkxw4Ss.js +0 -1
  37. package/dist/web/_app/immutable/chunks/DVx_0hnZ.js +0 -1
  38. package/dist/web/_app/immutable/entry/start.DTjSVtws.js +0 -1
  39. package/dist/web/_app/immutable/nodes/0.BIvpQ3Qk.js +0 -2
  40. package/dist/web/_app/immutable/nodes/7.TxeJDMtw.js +0 -2
@@ -1 +1 @@
1
- import{bB as Le,aD as Ge,e as A,g as U,s as P,aE as ne,bC as vt}from"./DSh-OF2y.js";class Ae{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 Ue{constructor(t,n){this.status=t,this.location=n}}class Pe 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 yt(e){return e.split("%25").map(decodeURI).join("%25")}function bt(e){for(const t in e)e[t]=decodeURIComponent(e[t]);return e}function me({href:e}){return e.split("#")[0]}function kt(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 Et(...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 Rt=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:t?.method||"GET")!=="GET"&&G.delete(Te(e)),Rt(e,t));const G=new Map;function xt(e,t){const n=Te(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&&G.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 Lt(e,t,n){if(G.size>0){const r=Te(e,n),a=G.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);G.delete(r)}}return window.fetch(t,n)}function Te(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="${Et(...a)}"]`}return r}const At=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function Ut(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 _e(String.fromCharCode(parseInt(l.slice(2),16)));if(l.startsWith("u+"))return _e(String.fromCharCode(...l.slice(2).split("-").map(v=>parseInt(v,16))));const d=At.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 _e(l)}).join("")}).join("")}/?$`),params:t}}function Pt(e){return e!==""&&!/^\([^)]+\)$/.test(e)}function Tt(e){return e.slice(1).split("/").filter(Pt)}function It(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 _e(e){return e.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function Ot({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}=Ut(o),u={id:o,exec:h=>{const v=p.exec(h);if(v)return It(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 Xe(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function Me(e,t,n=JSON.stringify){const r=n(t);try{sessionStorage[e]=r}catch{}}const x=globalThis.__sveltekit_uvehpy?.base??"",Ct=globalThis.__sveltekit_uvehpy?.assets??x??"",$t="1774804755940",Qe="sveltekit:snapshot",Ze="sveltekit:scroll",et="sveltekit:states",jt="sveltekit:pageurl",B="sveltekit:history",H="sveltekit:navigation",N={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},he=location.origin;function Ie(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 D(){return{x:pageXOffset,y:pageYOffset}}function V(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const He={...N,"":N.hover};function tt(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function nt(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=tt(e)}}function be(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||pe(r,t,n)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),s=r?.origin===he&&e.hasAttribute("download");return{url:r,external:i,target:a,download:s}}function re(e){let t=null,n=null,r=null,a=null,i=null,s=null,o=e;for(;o&&o!==document.documentElement;)r===null&&(r=V(o,"preload-code")),a===null&&(a=V(o,"preload-data")),t===null&&(t=V(o,"keepfocus")),n===null&&(n=V(o,"noscroll")),i===null&&(i=V(o,"reload")),s===null&&(s=V(o,"replacestate")),o=tt(o);function l(c){switch(c){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:He[r??"off"],preload_data:He[a??"off"],keepfocus:l(t),noscroll:l(n),reload:l(i),replace_state:l(s)}}function We(e){const t=Le(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 rt={v:()=>{}};function Nt(){const{set:e,subscribe:t}=Le(!1);let n;async function r(){clearTimeout(n);try{const a=await fetch(`${Ct}/_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),rt.v(),clearTimeout(n)),s}catch{return!1}}return{subscribe:t,check:r}}function pe(e,t,n){return e.origin!==he||!e.pathname.startsWith(t)?!0:n?e.pathname!==location.pathname:!1}function cn(e){}const at=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...at];const Dt=new Set([...at]);[...Dt];function qt(e){return e.filter(t=>t!=null)}function Oe(e){return e instanceof Ae||e instanceof Pe?e.status:500}function Vt(e){return e instanceof Pe?e.text:"Internal Error"}let b,W,ve;const Bt=Ge.toString().includes("$$")||/function \w+\(\) \{\}/.test(Ge.toString());Bt?(b={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL("https://example.com")},W={current:null},ve={current:!1}):(b=new class{#e=A({});get data(){return U(this.#e)}set data(t){P(this.#e,t)}#t=A(null);get form(){return U(this.#t)}set form(t){P(this.#t,t)}#n=A(null);get error(){return U(this.#n)}set error(t){P(this.#n,t)}#r=A({});get params(){return U(this.#r)}set params(t){P(this.#r,t)}#a=A({id:null});get route(){return U(this.#a)}set route(t){P(this.#a,t)}#o=A({});get state(){return U(this.#o)}set state(t){P(this.#o,t)}#s=A(-1);get status(){return U(this.#s)}set status(t){P(this.#s,t)}#i=A(new URL("https://example.com"));get url(){return U(this.#i)}set url(t){P(this.#i,t)}},W=new class{#e=A(null);get current(){return U(this.#e)}set current(t){P(this.#e,t)}},ve=new class{#e=A(!1);get current(){return U(this.#e)}set current(t){P(this.#e,t)}},rt.v=()=>ve.current=!0);function ot(e){Object.assign(b,e)}const Je={spanContext(){return Kt},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}},Kt={traceId:"",spanId:"",traceFlags:0},Ft=new Set(["icon","shortcut icon","apple-touch-icon"]),j=Xe(Ze)??{},J=Xe(Qe)??{},$={url:We({}),page:We({}),navigating:Le(null),updated:Nt()};function Ce(e){j[e]=D()}function Gt(e,t){let n=e+1;for(;j[n];)delete j[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 st(){if("serviceWorker"in navigator){const e=await navigator.serviceWorker.getRegistration(x||"/");e&&await e.update()}}function ke(){}let $e,Ee,ae,T,Se,w;const oe=[],se=[];let L=null;function ie(){L?.fork?.then(e=>e?.discard()),L=null}const te=new Map,it=new Set,Mt=new Set,M=new Set;let _={branch:[],error:null,url:null},lt=!1,le=!1,Ye=!0,z=!1,F=!1,ct=!1,Q=!1,je,y,R,I;const ce=new Set;let we;const ue=new Map;async function hn(e,t,n){globalThis.__sveltekit_uvehpy?.data&&globalThis.__sveltekit_uvehpy.data,document.URL!==location.href&&(location.href=location.href),w=e,await e.hooks.init?.(),$e=Ot(e),T=document.documentElement,Se=t,Ee=e.nodes[0],ae=e.nodes[1],Ee(),ae(),y=history.state?.[B],R=history.state?.[H],y||(y=R=Date.now(),history.replaceState({...history.state,[B]:y,[H]:R},""));const r=j[y];function a(){r&&(history.scrollRestoration="manual",scrollTo(r.x,r.y))}n?(a(),await rn(Se,n)):(await K({type:"enter",url:Ie(w.hash?sn(new URL(location.href)):location.href),replace_state:!0}),a()),nn()}async function Ht(e=!0,t=!0){if(await(we||=Promise.resolve()),!we)return;we=null;const n=I={},r=await Z(_.url,!0);if(ie(),Q&&ue.forEach(({resource:a})=>{a.refresh?.()}),e){const a=b.state,i=r&&await Ve(r);if(!i||n!==I)return;if(i.type==="redirect")return Ne(new URL(i.location,_.url).href,{replaceState:!0},1,n);t||(i.props.page.state=a),ot(i.props.page),_=i.state,Re(),je.$set(i.props)}else Re();await Promise.all([...ue.values()].map(({resource:a})=>a)).catch(ke)}function Re(){oe.length=0,Q=!1}function ut(e){se.some(t=>t?.snapshot)&&(J[e]=se.map(t=>t?.snapshot?.capture()))}function ft(e){J[e]?.forEach((t,n)=>{se[n]?.snapshot?.restore(t)})}function ze(){Ce(y),Me(Ze,j),ut(R),Me(Qe,J)}async function Ne(e,t,n,r){let a;t.invalidateAll&&ie(),await K({type:"goto",url:Ie(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:n,nav_token:r,accept:()=>{t.invalidateAll&&(Q=!0,a=[...ue.keys()]),t.invalidate&&t.invalidate.forEach(tn)}}),t.invalidateAll&&ne().then(ne).then(()=>{ue.forEach(({resource:i},s)=>{a?.includes(s)&&i.refresh?.()})})}async function Wt(e){if(e.id!==L?.id){ie();const t={};ce.add(t),L={id:e.id,token:t,promise:Ve({...e,preload:t}).then(n=>(ce.delete(t),n.type==="loaded"&&n.state.error&&ie(),n)),fork:null}}return L.promise}async function ye(e){const t=(await Z(e,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].filter(Boolean).map(n=>n[1]()))}async function dt(e,t,n){_=e.state;const r=document.querySelector("style[data-sveltekit]");if(r&&r.remove(),Object.assign(b,e.props.page),je=new w.root({target:t,props:{...e.props,stores:$,components:se},hydrate:n,sync:!1}),await Promise.resolve(),ft(R),n){const a={from:null,to:{params:_.params,route:{id:_.route?.id??null},url:new URL(location.href),scroll:j[y]??D()},willUnload:!1,type:"enter",complete:Promise.resolve()};M.forEach(i=>i(a))}le=!0}function fe({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:Fe(b)}};s!==void 0&&(l.props.form=s);let c={},d=!b,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!==b.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:b.data}),l}async function De({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:Je,current:Je},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:kt(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}=ht(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 ht(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=le?Lt(r,a.href,t):xt(r,t);return{resolved:a,promise:i}}function Jt(e,t,n,r,a,i){if(Q)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(oe.some(o=>o(new URL(s))))return!0;return!1}function qe(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 zt({error:e,url:t,route:n,params:r}){return{type:"loaded",state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:Fe(b),constructors:[]}}}async function Ve({id:e,invalidating:t,url:n,params:r,route:a,preload:i}){if(L?.id===e)return ce.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!==de(_.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 E=_.branch[g];return m[1]===E?.loader&&!Jt(u,p,d,f,E.universal?.uses,r)?E:(u=!0,De({loader:m[1],url:n,params:r,route:a,parent:async()=>{const O={};for(let C=0;C<g;C+=1)Object.assign(O,(await h[C])?.data);return O},server_data_node:qe(m[0]?{type:"skip"}:null,m[0]?E?.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 Ue)return{type:"redirect",location:g.location};if(ce.has(i))return zt({error:await X(g,{params:r,url:n,route:{id:a.id}}),url:n,params:r,route:a});let E=Oe(g),S;if(g instanceof Ae)S=g.body;else{if(await $.updated.check())return await st(),await Y(n);S=await X(g,{params:r,url:n,route:{id:a.id}})}const O=await Xt(m,v,s);return O?fe({url:n,params:r,branch:v.slice(0,O.idx).concat(O.node),status:E,error:S,route:a}):await gt(n,{id:a.id},S,E)}else v.push(void 0);return fe({url:n,params:r,branch:v,status:200,error:null,route:a,form:t?void 0:null})}async function Xt(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 Be({status:e,error:t,url:n,route:r}){const a={};let i=null;try{const s=await De({loader:Ee,url:n,params:a,route:r,parent:()=>Promise.resolve({}),server_data_node:qe(i)}),o={node:await ae(),loader:ae,universal:null,server:null,data:null};return fe({url:n,params:a,branch:[s,o],status:e,error:t,route:null})}catch(s){if(s instanceof Ue)return Ne(new URL(s.location,location.href),{},0);throw s}}async function Qt(e){const t=e.href;if(te.has(t))return te.get(t);let n;try{const r=(async()=>{let a=await w.hooks.reroute({url:new URL(e),fetch:async(i,s)=>ht(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})();te.set(t,r),n=await r}catch{te.delete(t);return}return n}async function Z(e,t){if(e&&!pe(e,x,w.hash)){const n=await Qt(e);if(!n)return;const r=Zt(n);for(const a of $e){const i=a.exec(r);if(i)return{id:de(e),invalidating:t,route:a,params:bt(i),url:e}}}}function Zt(e){return yt(w.hash?e.hash.replace(/^#/,"").replace(/[?#].+/,""):e.pathname.slice(x.length))||"/"}function de(e){return(w.hash?e.hash.replace(/^#/,""):e.pathname)+e.search}function pt({url:e,type:t,intent:n,delta:r,event:a,scroll:i}){let s=!1;const o=Ke(_,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 z||it.forEach(c=>c(l)),s?null:o}async function K({type:e,url:t,popped:n,keepfocus:r,noscroll:a,replace_state:i,state:s={},redirect_count:o=0,nav_token:l={},accept:c=ke,block:d=ke,event:p}){const f=I;I=l;const u=await Z(t,!1),h=e==="enter"?Ke(_,u,t,e):pt({url:t,type:e,delta:n?.delta,intent:u,scroll:n?.scroll,event:p});if(!h){d(),I===l&&(I=f);return}const v=y,m=R;c(),z=!0,le&&h.navigation.type!=="enter"&&$.navigating.set(W.current=h.navigation);let g=u&&await Ve(u);if(!g){if(pe(t,x,w.hash))return await Y(t,i);g=await gt(t,{id:null},await X(new Pe(404,"Not Found",`Not found: ${t.pathname}`),{url:t,params:{},route:{id:null}}),404,i)}if(t=u?.url||t,I!==l)return h.reject(new Error("navigation aborted")),!1;if(g.type==="redirect"){if(o<20){await K({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 Be({status:500,error:await X(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 st(),await Y(t,i));if(Re(),Ce(v),ut(m),g.props.page.url.pathname!==t.pathname&&(t.pathname=g.props.page.url.pathname),s=n?n.state:s,!n){const k=i?0:1,ee={[B]:y+=k,[H]:R+=k,[et]:s};(i?history.replaceState:history.pushState).call(history,ee,"",t),i||Gt(y,R)}const E=u&&L?.id===u.id?L.fork:null;L=null,g.props.page.state=s;let S;if(le){const k=(await Promise.all(Array.from(Mt,q=>q(h.navigation)))).filter(q=>typeof q=="function");if(k.length>0){let q=function(){k.forEach(ge=>{M.delete(ge)})};k.push(q),k.forEach(ge=>{M.add(ge)})}_=g.state,g.props.page&&(g.props.page.url=t);const ee=E&&await E;ee?S=ee.commit():(je.$set(g.props),ot(g.props.page),S=vt?.()),ct=!0}else await dt(g,Se,!1);const{activeElement:O}=document;await S,await ne(),await ne();let C=null;if(Ye){const k=n?n.scroll:a?D():null;k?scrollTo(k.x,k.y):(C=t.hash&&document.getElementById(mt(t)))?C.scrollIntoView():scrollTo(0,0)}const _t=document.activeElement!==O&&document.activeElement!==document.body;!r&&!_t&&on(t,!C),Ye=!0,g.props.page&&Object.assign(b,g.props.page),z=!1,e==="popstate"&&ft(R),h.fulfil(void 0),h.navigation.to&&(h.navigation.to.scroll=D()),M.forEach(k=>k(h.navigation)),$.navigating.set(W.current=null)}async function gt(e,t,n,r,a){return e.origin===he&&e.pathname===location.pathname&&!lt?await Be({status:r,error:n,url:e,route:t}):await Y(e,a)}function en(){let e,t={element:void 0,href:void 0},n;T.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)}T.addEventListener("mousedown",r),T.addEventListener("touchstart",r,{passive:!0});const a=new IntersectionObserver(o=>{for(const l of o)l.isIntersecting&&(ye(new URL(l.target.href)),a.unobserve(l.target))},{threshold:0});async function i(o,l){const c=nt(o,T),d=c===t.element&&c?.href===t.href&&l>=n;if(!c||d)return;const{url:p,external:f,download:u}=be(c,x,w.hash);if(f||u)return;const h=re(c),v=p&&de(_.url)===de(p);if(!(h.reload||v))if(l<=h.preload_data){t={element:c,href:c.href},n=N.tap;const m=await Z(p,!1);if(!m)return;Wt(m)}else l<=h.preload_code&&(t={element:c,href:c.href},n=l,ye(p))}function s(){a.disconnect();for(const o of T.querySelectorAll("a")){const{url:l,external:c,download:d}=be(o,x,w.hash);if(c||d)continue;const p=re(o);p.reload||(p.preload_code===N.viewport&&a.observe(o),p.preload_code===N.eager&&ye(l))}}M.add(s),s()}function X(e,t){if(e instanceof Ae)return e.body;const n=Oe(e),r=Vt(e);return w.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function pn(e,t={}){return e=new URL(Ie(e)),e.origin!==he?Promise.reject(new Error("goto: invalid URL")):Ne(e,t,0)}function tn(e){if(typeof e=="function")oe.push(e);else{const{href:t}=new URL(e,location.href);oe.push(n=>n.href===t)}}function gn(){return Q=!0,Ht()}function nn(){history.scrollRestoration="manual",addEventListener("beforeunload",t=>{let n=!1;if(ze(),!z){const r=Ke(_,void 0,null,"leave"),a={...r.navigation,cancel:()=>{n=!0,r.reject(new Error("navigation cancelled"))}};it.forEach(i=>i(a))}n?(t.preventDefault(),t.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&ze()}),navigator.connection?.saveData||en(),T.addEventListener("click",async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;const n=nt(t.composedPath()[0],T);if(!n)return;const{url:r,external:a,target:i,download:s}=be(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=re(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===me(location);if(a||o.reload&&(!p||!d)){pt({url:r,type:"link",event:t})?z=!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(F=!0,Ce(y),e(r),!o.replace_state)return;F=!1}t.preventDefault(),await new Promise(f=>{requestAnimationFrame(()=>{setTimeout(f,0)}),setTimeout(f,100)}),await K({type:"link",url:r,keepfocus:o.keepfocus,noscroll:o.noscroll,replace_state:o.replace_state??r.href===location.href,event:t})}),T.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(pe(s,x,!1))return;const o=t.target,l=re(o);if(l.reload)return;t.preventDefault(),t.stopPropagation();const c=new FormData(o,r);s.search=new URLSearchParams(c).toString(),K({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(!xe){if(t.state?.[B]){const n=t.state[B];if(I={},n===y)return;const r=j[n],a=t.state[et]??{},i=new URL(t.state[jt]??location.href),s=t.state[H],o=_.url?me(location)===me(_.url):!1;if(s===R&&(ct||o)){a!==b.state&&(b.state=a),e(i),j[y]=D(),r&&scrollTo(r.x,r.y),y=n;return}const c=n-y;await K({type:"popstate",url:i,popped:{state:a,scroll:r,delta:c},accept:()=>{y=n,R=s},block:()=>{history.go(-c)},nav_token:I,event:t})}else if(!F){const n=new URL(location.href);e(n),w.hash&&location.reload()}}}),addEventListener("hashchange",()=>{F&&(F=!1,history.replaceState({...history.state,[B]:++y,[H]: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(W.current=null)});function e(t){_.url=b.url=t,$.page.set(Fe(b)),$.page.notify()}}async function rn(e,{status:t=200,error:n,node_ids:r,params:a,route:i,server_route:s,data:o,form:l}){lt=!0;const c=new URL(location.href);let d;({params:a={},route:i={id:null}}=await Z(c,!1)||{}),d=$e.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=an(g.uses)),De({loader:w.nodes[v],url:c,params:a,route:i,parent:async()=>{const E={};for(let S=0;S<m;S+=1)Object.assign(E,(await u[S]).data);return E},server_data_node:qe(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=fe({url:c,params:a,branch:h,status:t,error:n,form:l,route:d??null})}catch(u){if(u instanceof Ue){await Y(new URL(u.location,location.href));return}p=await Be({status:Oe(u),error:await X(u,{url:c,params:a,route:i}),url:c,route:i}),e.textContent="",f=!1}p.props.page&&(p.props.page.state={}),await dt(p,e,f)}function an(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 xe=!1;function on(e,t=!0){const n=document.querySelector("[autofocus]");if(n)n.focus();else{const r=mt(e);if(r&&document.getElementById(r)){const{x:i,y:s}=D();setTimeout(()=>{const o=history.state;xe=!0,location.replace(new URL(`#${r}`,location.href)),history.replaceState(o,"",e),t&&scrollTo(i,s),xe=!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 Ke(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:D()},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 Fe(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 sn(e){const t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function mt(e){let t;if(w.hash){const[,,n]=e.hash.split("#",3);t=n??""}else t=e.hash.slice(1);return decodeURIComponent(t)}export{hn as a,pn as g,gn as i,cn as l,b as p,$ as s};
1
+ import{bB as Le,aD as Ge,e as A,g as U,s as P,aE as ne,bC as vt}from"./DSh-OF2y.js";class Ae{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 Ue{constructor(t,n){this.status=t,this.location=n}}class Pe 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 yt(e){return e.split("%25").map(decodeURI).join("%25")}function bt(e){for(const t in e)e[t]=decodeURIComponent(e[t]);return e}function me({href:e}){return e.split("#")[0]}function kt(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 Et(...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 Rt=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:t?.method||"GET")!=="GET"&&G.delete(Te(e)),Rt(e,t));const G=new Map;function xt(e,t){const n=Te(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&&G.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 Lt(e,t,n){if(G.size>0){const r=Te(e,n),a=G.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);G.delete(r)}}return window.fetch(t,n)}function Te(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="${Et(...a)}"]`}return r}const At=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function Ut(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 _e(String.fromCharCode(parseInt(l.slice(2),16)));if(l.startsWith("u+"))return _e(String.fromCharCode(...l.slice(2).split("-").map(v=>parseInt(v,16))));const d=At.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 _e(l)}).join("")}).join("")}/?$`),params:t}}function Pt(e){return e!==""&&!/^\([^)]+\)$/.test(e)}function Tt(e){return e.slice(1).split("/").filter(Pt)}function It(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 _e(e){return e.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function Ot({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}=Ut(o),u={id:o,exec:h=>{const v=p.exec(h);if(v)return It(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 Xe(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function Me(e,t,n=JSON.stringify){const r=n(t);try{sessionStorage[e]=r}catch{}}const x=globalThis.__sveltekit_s4af76?.base??"",Ct=globalThis.__sveltekit_s4af76?.assets??x??"",$t="1774805906132",Qe="sveltekit:snapshot",Ze="sveltekit:scroll",et="sveltekit:states",jt="sveltekit:pageurl",B="sveltekit:history",H="sveltekit:navigation",N={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},he=location.origin;function Ie(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 D(){return{x:pageXOffset,y:pageYOffset}}function V(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const He={...N,"":N.hover};function tt(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function nt(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=tt(e)}}function be(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||pe(r,t,n)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),s=r?.origin===he&&e.hasAttribute("download");return{url:r,external:i,target:a,download:s}}function re(e){let t=null,n=null,r=null,a=null,i=null,s=null,o=e;for(;o&&o!==document.documentElement;)r===null&&(r=V(o,"preload-code")),a===null&&(a=V(o,"preload-data")),t===null&&(t=V(o,"keepfocus")),n===null&&(n=V(o,"noscroll")),i===null&&(i=V(o,"reload")),s===null&&(s=V(o,"replacestate")),o=tt(o);function l(c){switch(c){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:He[r??"off"],preload_data:He[a??"off"],keepfocus:l(t),noscroll:l(n),reload:l(i),replace_state:l(s)}}function We(e){const t=Le(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 rt={v:()=>{}};function Nt(){const{set:e,subscribe:t}=Le(!1);let n;async function r(){clearTimeout(n);try{const a=await fetch(`${Ct}/_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),rt.v(),clearTimeout(n)),s}catch{return!1}}return{subscribe:t,check:r}}function pe(e,t,n){return e.origin!==he||!e.pathname.startsWith(t)?!0:n?e.pathname!==location.pathname:!1}function cn(e){}const at=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...at];const Dt=new Set([...at]);[...Dt];function qt(e){return e.filter(t=>t!=null)}function Oe(e){return e instanceof Ae||e instanceof Pe?e.status:500}function Vt(e){return e instanceof Pe?e.text:"Internal Error"}let b,W,ve;const Bt=Ge.toString().includes("$$")||/function \w+\(\) \{\}/.test(Ge.toString());Bt?(b={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL("https://example.com")},W={current:null},ve={current:!1}):(b=new class{#e=A({});get data(){return U(this.#e)}set data(t){P(this.#e,t)}#t=A(null);get form(){return U(this.#t)}set form(t){P(this.#t,t)}#n=A(null);get error(){return U(this.#n)}set error(t){P(this.#n,t)}#r=A({});get params(){return U(this.#r)}set params(t){P(this.#r,t)}#a=A({id:null});get route(){return U(this.#a)}set route(t){P(this.#a,t)}#o=A({});get state(){return U(this.#o)}set state(t){P(this.#o,t)}#s=A(-1);get status(){return U(this.#s)}set status(t){P(this.#s,t)}#i=A(new URL("https://example.com"));get url(){return U(this.#i)}set url(t){P(this.#i,t)}},W=new class{#e=A(null);get current(){return U(this.#e)}set current(t){P(this.#e,t)}},ve=new class{#e=A(!1);get current(){return U(this.#e)}set current(t){P(this.#e,t)}},rt.v=()=>ve.current=!0);function ot(e){Object.assign(b,e)}const Je={spanContext(){return Kt},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}},Kt={traceId:"",spanId:"",traceFlags:0},Ft=new Set(["icon","shortcut icon","apple-touch-icon"]),j=Xe(Ze)??{},J=Xe(Qe)??{},$={url:We({}),page:We({}),navigating:Le(null),updated:Nt()};function Ce(e){j[e]=D()}function Gt(e,t){let n=e+1;for(;j[n];)delete j[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 st(){if("serviceWorker"in navigator){const e=await navigator.serviceWorker.getRegistration(x||"/");e&&await e.update()}}function ke(){}let $e,Ee,ae,T,Se,w;const oe=[],se=[];let L=null;function ie(){L?.fork?.then(e=>e?.discard()),L=null}const te=new Map,it=new Set,Mt=new Set,M=new Set;let _={branch:[],error:null,url:null},lt=!1,le=!1,Ye=!0,z=!1,F=!1,ct=!1,Q=!1,je,y,R,I;const ce=new Set;let we;const ue=new Map;async function hn(e,t,n){globalThis.__sveltekit_s4af76?.data&&globalThis.__sveltekit_s4af76.data,document.URL!==location.href&&(location.href=location.href),w=e,await e.hooks.init?.(),$e=Ot(e),T=document.documentElement,Se=t,Ee=e.nodes[0],ae=e.nodes[1],Ee(),ae(),y=history.state?.[B],R=history.state?.[H],y||(y=R=Date.now(),history.replaceState({...history.state,[B]:y,[H]:R},""));const r=j[y];function a(){r&&(history.scrollRestoration="manual",scrollTo(r.x,r.y))}n?(a(),await rn(Se,n)):(await K({type:"enter",url:Ie(w.hash?sn(new URL(location.href)):location.href),replace_state:!0}),a()),nn()}async function Ht(e=!0,t=!0){if(await(we||=Promise.resolve()),!we)return;we=null;const n=I={},r=await Z(_.url,!0);if(ie(),Q&&ue.forEach(({resource:a})=>{a.refresh?.()}),e){const a=b.state,i=r&&await Ve(r);if(!i||n!==I)return;if(i.type==="redirect")return Ne(new URL(i.location,_.url).href,{replaceState:!0},1,n);t||(i.props.page.state=a),ot(i.props.page),_=i.state,Re(),je.$set(i.props)}else Re();await Promise.all([...ue.values()].map(({resource:a})=>a)).catch(ke)}function Re(){oe.length=0,Q=!1}function ut(e){se.some(t=>t?.snapshot)&&(J[e]=se.map(t=>t?.snapshot?.capture()))}function ft(e){J[e]?.forEach((t,n)=>{se[n]?.snapshot?.restore(t)})}function ze(){Ce(y),Me(Ze,j),ut(R),Me(Qe,J)}async function Ne(e,t,n,r){let a;t.invalidateAll&&ie(),await K({type:"goto",url:Ie(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:n,nav_token:r,accept:()=>{t.invalidateAll&&(Q=!0,a=[...ue.keys()]),t.invalidate&&t.invalidate.forEach(tn)}}),t.invalidateAll&&ne().then(ne).then(()=>{ue.forEach(({resource:i},s)=>{a?.includes(s)&&i.refresh?.()})})}async function Wt(e){if(e.id!==L?.id){ie();const t={};ce.add(t),L={id:e.id,token:t,promise:Ve({...e,preload:t}).then(n=>(ce.delete(t),n.type==="loaded"&&n.state.error&&ie(),n)),fork:null}}return L.promise}async function ye(e){const t=(await Z(e,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].filter(Boolean).map(n=>n[1]()))}async function dt(e,t,n){_=e.state;const r=document.querySelector("style[data-sveltekit]");if(r&&r.remove(),Object.assign(b,e.props.page),je=new w.root({target:t,props:{...e.props,stores:$,components:se},hydrate:n,sync:!1}),await Promise.resolve(),ft(R),n){const a={from:null,to:{params:_.params,route:{id:_.route?.id??null},url:new URL(location.href),scroll:j[y]??D()},willUnload:!1,type:"enter",complete:Promise.resolve()};M.forEach(i=>i(a))}le=!0}function fe({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:Fe(b)}};s!==void 0&&(l.props.form=s);let c={},d=!b,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!==b.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:b.data}),l}async function De({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:Je,current:Je},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:kt(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}=ht(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 ht(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=le?Lt(r,a.href,t):xt(r,t);return{resolved:a,promise:i}}function Jt(e,t,n,r,a,i){if(Q)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(oe.some(o=>o(new URL(s))))return!0;return!1}function qe(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 zt({error:e,url:t,route:n,params:r}){return{type:"loaded",state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:Fe(b),constructors:[]}}}async function Ve({id:e,invalidating:t,url:n,params:r,route:a,preload:i}){if(L?.id===e)return ce.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!==de(_.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 E=_.branch[g];return m[1]===E?.loader&&!Jt(u,p,d,f,E.universal?.uses,r)?E:(u=!0,De({loader:m[1],url:n,params:r,route:a,parent:async()=>{const O={};for(let C=0;C<g;C+=1)Object.assign(O,(await h[C])?.data);return O},server_data_node:qe(m[0]?{type:"skip"}:null,m[0]?E?.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 Ue)return{type:"redirect",location:g.location};if(ce.has(i))return zt({error:await X(g,{params:r,url:n,route:{id:a.id}}),url:n,params:r,route:a});let E=Oe(g),S;if(g instanceof Ae)S=g.body;else{if(await $.updated.check())return await st(),await Y(n);S=await X(g,{params:r,url:n,route:{id:a.id}})}const O=await Xt(m,v,s);return O?fe({url:n,params:r,branch:v.slice(0,O.idx).concat(O.node),status:E,error:S,route:a}):await gt(n,{id:a.id},S,E)}else v.push(void 0);return fe({url:n,params:r,branch:v,status:200,error:null,route:a,form:t?void 0:null})}async function Xt(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 Be({status:e,error:t,url:n,route:r}){const a={};let i=null;try{const s=await De({loader:Ee,url:n,params:a,route:r,parent:()=>Promise.resolve({}),server_data_node:qe(i)}),o={node:await ae(),loader:ae,universal:null,server:null,data:null};return fe({url:n,params:a,branch:[s,o],status:e,error:t,route:null})}catch(s){if(s instanceof Ue)return Ne(new URL(s.location,location.href),{},0);throw s}}async function Qt(e){const t=e.href;if(te.has(t))return te.get(t);let n;try{const r=(async()=>{let a=await w.hooks.reroute({url:new URL(e),fetch:async(i,s)=>ht(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})();te.set(t,r),n=await r}catch{te.delete(t);return}return n}async function Z(e,t){if(e&&!pe(e,x,w.hash)){const n=await Qt(e);if(!n)return;const r=Zt(n);for(const a of $e){const i=a.exec(r);if(i)return{id:de(e),invalidating:t,route:a,params:bt(i),url:e}}}}function Zt(e){return yt(w.hash?e.hash.replace(/^#/,"").replace(/[?#].+/,""):e.pathname.slice(x.length))||"/"}function de(e){return(w.hash?e.hash.replace(/^#/,""):e.pathname)+e.search}function pt({url:e,type:t,intent:n,delta:r,event:a,scroll:i}){let s=!1;const o=Ke(_,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 z||it.forEach(c=>c(l)),s?null:o}async function K({type:e,url:t,popped:n,keepfocus:r,noscroll:a,replace_state:i,state:s={},redirect_count:o=0,nav_token:l={},accept:c=ke,block:d=ke,event:p}){const f=I;I=l;const u=await Z(t,!1),h=e==="enter"?Ke(_,u,t,e):pt({url:t,type:e,delta:n?.delta,intent:u,scroll:n?.scroll,event:p});if(!h){d(),I===l&&(I=f);return}const v=y,m=R;c(),z=!0,le&&h.navigation.type!=="enter"&&$.navigating.set(W.current=h.navigation);let g=u&&await Ve(u);if(!g){if(pe(t,x,w.hash))return await Y(t,i);g=await gt(t,{id:null},await X(new Pe(404,"Not Found",`Not found: ${t.pathname}`),{url:t,params:{},route:{id:null}}),404,i)}if(t=u?.url||t,I!==l)return h.reject(new Error("navigation aborted")),!1;if(g.type==="redirect"){if(o<20){await K({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 Be({status:500,error:await X(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 st(),await Y(t,i));if(Re(),Ce(v),ut(m),g.props.page.url.pathname!==t.pathname&&(t.pathname=g.props.page.url.pathname),s=n?n.state:s,!n){const k=i?0:1,ee={[B]:y+=k,[H]:R+=k,[et]:s};(i?history.replaceState:history.pushState).call(history,ee,"",t),i||Gt(y,R)}const E=u&&L?.id===u.id?L.fork:null;L=null,g.props.page.state=s;let S;if(le){const k=(await Promise.all(Array.from(Mt,q=>q(h.navigation)))).filter(q=>typeof q=="function");if(k.length>0){let q=function(){k.forEach(ge=>{M.delete(ge)})};k.push(q),k.forEach(ge=>{M.add(ge)})}_=g.state,g.props.page&&(g.props.page.url=t);const ee=E&&await E;ee?S=ee.commit():(je.$set(g.props),ot(g.props.page),S=vt?.()),ct=!0}else await dt(g,Se,!1);const{activeElement:O}=document;await S,await ne(),await ne();let C=null;if(Ye){const k=n?n.scroll:a?D():null;k?scrollTo(k.x,k.y):(C=t.hash&&document.getElementById(mt(t)))?C.scrollIntoView():scrollTo(0,0)}const _t=document.activeElement!==O&&document.activeElement!==document.body;!r&&!_t&&on(t,!C),Ye=!0,g.props.page&&Object.assign(b,g.props.page),z=!1,e==="popstate"&&ft(R),h.fulfil(void 0),h.navigation.to&&(h.navigation.to.scroll=D()),M.forEach(k=>k(h.navigation)),$.navigating.set(W.current=null)}async function gt(e,t,n,r,a){return e.origin===he&&e.pathname===location.pathname&&!lt?await Be({status:r,error:n,url:e,route:t}):await Y(e,a)}function en(){let e,t={element:void 0,href:void 0},n;T.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)}T.addEventListener("mousedown",r),T.addEventListener("touchstart",r,{passive:!0});const a=new IntersectionObserver(o=>{for(const l of o)l.isIntersecting&&(ye(new URL(l.target.href)),a.unobserve(l.target))},{threshold:0});async function i(o,l){const c=nt(o,T),d=c===t.element&&c?.href===t.href&&l>=n;if(!c||d)return;const{url:p,external:f,download:u}=be(c,x,w.hash);if(f||u)return;const h=re(c),v=p&&de(_.url)===de(p);if(!(h.reload||v))if(l<=h.preload_data){t={element:c,href:c.href},n=N.tap;const m=await Z(p,!1);if(!m)return;Wt(m)}else l<=h.preload_code&&(t={element:c,href:c.href},n=l,ye(p))}function s(){a.disconnect();for(const o of T.querySelectorAll("a")){const{url:l,external:c,download:d}=be(o,x,w.hash);if(c||d)continue;const p=re(o);p.reload||(p.preload_code===N.viewport&&a.observe(o),p.preload_code===N.eager&&ye(l))}}M.add(s),s()}function X(e,t){if(e instanceof Ae)return e.body;const n=Oe(e),r=Vt(e);return w.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function pn(e,t={}){return e=new URL(Ie(e)),e.origin!==he?Promise.reject(new Error("goto: invalid URL")):Ne(e,t,0)}function tn(e){if(typeof e=="function")oe.push(e);else{const{href:t}=new URL(e,location.href);oe.push(n=>n.href===t)}}function gn(){return Q=!0,Ht()}function nn(){history.scrollRestoration="manual",addEventListener("beforeunload",t=>{let n=!1;if(ze(),!z){const r=Ke(_,void 0,null,"leave"),a={...r.navigation,cancel:()=>{n=!0,r.reject(new Error("navigation cancelled"))}};it.forEach(i=>i(a))}n?(t.preventDefault(),t.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&ze()}),navigator.connection?.saveData||en(),T.addEventListener("click",async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;const n=nt(t.composedPath()[0],T);if(!n)return;const{url:r,external:a,target:i,download:s}=be(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=re(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===me(location);if(a||o.reload&&(!p||!d)){pt({url:r,type:"link",event:t})?z=!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(F=!0,Ce(y),e(r),!o.replace_state)return;F=!1}t.preventDefault(),await new Promise(f=>{requestAnimationFrame(()=>{setTimeout(f,0)}),setTimeout(f,100)}),await K({type:"link",url:r,keepfocus:o.keepfocus,noscroll:o.noscroll,replace_state:o.replace_state??r.href===location.href,event:t})}),T.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(pe(s,x,!1))return;const o=t.target,l=re(o);if(l.reload)return;t.preventDefault(),t.stopPropagation();const c=new FormData(o,r);s.search=new URLSearchParams(c).toString(),K({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(!xe){if(t.state?.[B]){const n=t.state[B];if(I={},n===y)return;const r=j[n],a=t.state[et]??{},i=new URL(t.state[jt]??location.href),s=t.state[H],o=_.url?me(location)===me(_.url):!1;if(s===R&&(ct||o)){a!==b.state&&(b.state=a),e(i),j[y]=D(),r&&scrollTo(r.x,r.y),y=n;return}const c=n-y;await K({type:"popstate",url:i,popped:{state:a,scroll:r,delta:c},accept:()=>{y=n,R=s},block:()=>{history.go(-c)},nav_token:I,event:t})}else if(!F){const n=new URL(location.href);e(n),w.hash&&location.reload()}}}),addEventListener("hashchange",()=>{F&&(F=!1,history.replaceState({...history.state,[B]:++y,[H]: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(W.current=null)});function e(t){_.url=b.url=t,$.page.set(Fe(b)),$.page.notify()}}async function rn(e,{status:t=200,error:n,node_ids:r,params:a,route:i,server_route:s,data:o,form:l}){lt=!0;const c=new URL(location.href);let d;({params:a={},route:i={id:null}}=await Z(c,!1)||{}),d=$e.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=an(g.uses)),De({loader:w.nodes[v],url:c,params:a,route:i,parent:async()=>{const E={};for(let S=0;S<m;S+=1)Object.assign(E,(await u[S]).data);return E},server_data_node:qe(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=fe({url:c,params:a,branch:h,status:t,error:n,form:l,route:d??null})}catch(u){if(u instanceof Ue){await Y(new URL(u.location,location.href));return}p=await Be({status:Oe(u),error:await X(u,{url:c,params:a,route:i}),url:c,route:i}),e.textContent="",f=!1}p.props.page&&(p.props.page.state={}),await dt(p,e,f)}function an(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 xe=!1;function on(e,t=!0){const n=document.querySelector("[autofocus]");if(n)n.focus();else{const r=mt(e);if(r&&document.getElementById(r)){const{x:i,y:s}=D();setTimeout(()=>{const o=history.state;xe=!0,location.replace(new URL(`#${r}`,location.href)),history.replaceState(o,"",e),t&&scrollTo(i,s),xe=!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 Ke(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:D()},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 Fe(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 sn(e){const t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function mt(e){let t;if(w.hash){const[,,n]=e.hash.split("#",3);t=n??""}else t=e.hash.slice(1);return decodeURIComponent(t)}export{hn as a,pn as g,gn as i,cn as l,b as p,$ as s};
@@ -0,0 +1 @@
1
+ import{e as r,f as p,g as n,s as e}from"./DSh-OF2y.js";import{s as u,g as w,b as A,e as _}from"./Cc0c675R.js";function v(){let a=r(p([])),s=r(null),i=r(!1),l=r(!1),o=r(""),c=r(null),g=r(!1);async function h(){try{const[t,f]=await Promise.all([A(),_()]);e(a,t.insights??[],!0),e(s,t.generatedAt??null,!0),e(o,f.home_brief??"",!0),e(c,f.accent_color??null,!0),e(l,!0),e(g,!0)}catch(t){console.error("Failed to load insights:",t)}}async function d(){e(i,!0);try{const t=await w();e(a,t.insights??[],!0),e(s,t.generatedAt??null,!0),e(l,!0)}catch(t){console.error("Failed to generate insights:",t)}finally{e(i,!1)}}async function m(t){e(o,t,!0),await u({home_brief:t})}async function y(t){e(c,t,!0),await u({accent_color:t})}async function b(){await u({home_brief:""}),e(o,""),e(a,[],!0),e(s,null)}return{get insights(){return n(a)},get generatedAt(){return n(s)},get loading(){return n(i)},get loaded(){return n(l)},get homeBrief(){return n(o)},get accentColor(){return n(c)},get briefLoaded(){return n(g)},load:h,generate:d,saveBrief:m,saveAccentColor:y,reset:b}}const I=v();export{I as insightsStore};
@@ -0,0 +1 @@
1
+ import{e as m,f as w,s as u,g as o,a4 as it}from"./DSh-OF2y.js";import{a as d}from"./CFtRXHDP.js";function at(){return d("/api/workspace")}function st(e){return d("/api/workspace",{method:"PUT",body:JSON.stringify(e)})}function wt(){return d("/api/workspace/mcp-config")}function D(){return d("/api/repos")}function ct(e,i,s,f){return d("/api/repos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e,display_name:i||void 0,description:s,...f?{private:!0}:{}})})}function lt(e,i,s){return d(`/api/repos/${encodeURIComponent(e)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:i,display_name:s||void 0})})}function ut(e){return d(`/api/repos/${encodeURIComponent(e)}`,{method:"DELETE"})}function dt(){return d("/api/apps")}function pt(e){return d(`/api/repos/${encodeURIComponent(e)}/entities?summary=true`)}function Et(e,i,s){return d(`/api/repos/${encodeURIComponent(e)}/entities/${encodeURIComponent(i)}/${encodeURIComponent(s)}`)}function St(e,i,s,f,c){return d(`/api/repos/${encodeURIComponent(e)}/entities`,{method:"POST",body:JSON.stringify({entityType:i,entityId:s,data:f,content:c})})}function bt(e,i,s){return d(`/api/repos/${encodeURIComponent(e)}/entities/${encodeURIComponent(i)}/${encodeURIComponent(s)}`,{method:"DELETE"})}function It(e,i,s,f){return d(`/api/repos/${encodeURIComponent(e)}/entities/${encodeURIComponent(i)}/${encodeURIComponent(s)}`,{method:"PUT",body:JSON.stringify(f)})}function $t(e,i,s,f){return d(`/api/repos/${encodeURIComponent(e)}/change-type`,{method:"POST",body:JSON.stringify({entityType:i,entityId:s,newType:f})})}function Tt(e,i,s,f,c){return d(`/api/repos/${encodeURIComponent(e)}/transfer`,{method:"POST",body:JSON.stringify({entityType:i,entityId:s,targetRepo:f,mode:c})})}function kt(){return d("/api/insights")}function Ut(){return d("/api/insights/generate",{method:"POST"})}function vt(){return d("/api/preferences")}function Pt(e){return d("/api/preferences",{method:"PUT",body:JSON.stringify(e)})}function Rt(){return d("/api/views")}function At(e,i){return d("/api/views",{method:"POST",body:JSON.stringify({name:e,config:i})})}function Lt(e,i){return d(`/api/views/${e}`,{method:"PUT",body:JSON.stringify(i)})}function Ot(e){return d(`/api/views/${e}`,{method:"DELETE"})}function Mt(e){return d(`/api/repos/${encodeURIComponent(e)}/commit`,{method:"POST"})}function ft(e){return e.replace(/-/g," ").replace(/\b\w/g,i=>i.toUpperCase())}function _(e,i){return i||e.split("-").map(s=>s.charAt(0).toUpperCase()+s.slice(1)).join(" ")}const mt="#e05050";function U(e){if(typeof document>"u")return;const i=e||mt,s=parseInt(i.slice(1,3),16),f=parseInt(i.slice(3,5),16),c=parseInt(i.slice(5,7),16),E=[document.documentElement,document.querySelector("[data-theme]")].filter(Boolean);for(const h of E)h.style.setProperty("--color-accent",i),h.style.setProperty("--color-accent-hover",yt(i,15)),h.style.setProperty("--color-accent-muted",`rgba(${s}, ${f}, ${c}, 0.08)`),h.style.setProperty("--color-link",j(i,15)),h.style.setProperty("--color-badge-bg",`rgba(${s}, ${f}, ${c}, 0.1)`),h.style.setProperty("--color-badge-text",j(i,20))}function yt(e,i){const s=Math.max(0,Math.round(parseInt(e.slice(1,3),16)*(1-i/100))),f=Math.max(0,Math.round(parseInt(e.slice(3,5),16)*(1-i/100))),c=Math.max(0,Math.round(parseInt(e.slice(5,7),16)*(1-i/100)));return`#${s.toString(16).padStart(2,"0")}${f.toString(16).padStart(2,"0")}${c.toString(16).padStart(2,"0")}`}function j(e,i){const s=Math.min(255,Math.round(parseInt(e.slice(1,3),16)+(255-parseInt(e.slice(1,3),16))*i/100)),f=Math.min(255,Math.round(parseInt(e.slice(3,5),16)+(255-parseInt(e.slice(3,5),16))*i/100)),c=Math.min(255,Math.round(parseInt(e.slice(5,7),16)+(255-parseInt(e.slice(5,7),16))*i/100));return`#${s.toString(16).padStart(2,"0")}${f.toString(16).padStart(2,"0")}${c.toString(16).padStart(2,"0")}`}function gt(){let e=m(""),i=m(null),s=m(null),f=m(!1),c=m(w([]));const E={};let h=m(w([])),v=m(!1),P=m(null),g=m(w({})),R=w({}),A=w({}),$=w({}),F=m(0),x=m(null),C=m(""),T=null,S=m(0),b=m(0),J=m("alpha");async function W(){u(v,!0),u(P,null),u(S,0),u(b,0);try{const[t,n,r]=await Promise.all([D(),dt().catch(()=>[]),at().catch(()=>({name:""}))]);u(h,n,!0),u(e,r.name,!0),u(i,r.about??null,!0),u(s,r.accent_color??null,!0),u(f,!0),U(o(s)),u(c,t.map(a=>({name:a.name,displayName:_(a.name,a.display_name),type:a.type,private:a.private,sync:a.sync,count:null,entities:[],loading:!1,loaded:!1})),!0),await Promise.all(o(c).map(a=>I(a.name)))}catch(t){u(P,t.message,!0)}finally{u(v,!1)}}function V(t,n,r){const a=o(c).find(l=>l.name===t);a&&(a.entities=a.entities.filter(l=>!(l.id===r&&l.entityType===n)),a.count=a.entities.length)}async function Q(t){o(c).find(r=>r.name===t)&&await I(t,!0)}async function B(){u(S,0),u(b,0),await Promise.all(o(c).map(t=>I(t.name,!0)))}async function I(t,n=!1){const r=o(c).find(l=>l.name===t);if(!r||r.loading||!n&&r.loaded)return;const a=(E[t]??0)+1;E[t]=a,n||(r.loading=!0);try{const l=await pt(t);if(E[t]!==a)return;let y=0,L=0;for(const p of l)y+=p.document?.wikilinks?.length??0,L+=p.subContentCount??0;u(S,o(S)+y),u(b,o(b)+L);const O=new Set(["name","created_at","updated_at"]);r.entities=l.filter(p=>!p.id.toLowerCase().startsWith("readme")).map(p=>({id:p.id,title:p.data?.name??ft(p.id),entityType:p.entityType,repo:t,hasSubContent:!!p.hasSubContent,wikilinks:p.document?.wikilinks??[],createdAt:p.data?.created_at??null,updatedAt:p.data?.updated_at??null,fields:Object.fromEntries(Object.entries(p.data??{}).filter(([M])=>!O.has(M))),status:p.data?.status??void 0,priority:p.data?.priority??void 0,assignee:p.data?.assignee??void 0,dueDate:p.data?.due_date??void 0})).sort((p,M)=>p.title.localeCompare(M.title)),r.count=r.entities.length,r.loaded=!0}catch(l){console.error(`Failed to load entities for ${t}:`,l)}finally{r.loading=!1}}function K(t){o(g)[t]=!o(g)[t]}function q(t){return o(g)[t]??!1}function k(t,n,r){return`${t}/${n}/${r}`}function H(t,n,r){const a=k(t,n,r),l=R[a]??!1;R[a]=!l,!l&&!A[a]?.loaded&&z(t,n,r)}function N(t,n,r){return R[k(t,n,r)]??!1}function Y(t,n,r){return A[k(t,n,r)]??{entries:[],loading:!1,loaded:!1}}async function z(t,n,r){const a=k(t,n,r);A[a]={entries:[],loading:!1,loaded:!0}}function G(t){const n=o(C).trim().toLowerCase();if(!n)return t;const r=[];for(const a of t){const l=a.entities.filter(y=>y.title.toLowerCase().includes(n)||y.id.toLowerCase().includes(n));l.length>0&&r.push({...a,entities:l,count:l.length})}return r}function X(t){if(t&&!o(C)?T={...o(g)}:!t&&o(C)&&T&&(u(g,T,!0),T=null),u(C,t,!0),t){const n=t.trim().toLowerCase();for(const r of o(c)){const a=r.entities.some(l=>l.title.toLowerCase().includes(n)||l.id.toLowerCase().includes(n));o(g)[r.name]=a}}}function Z(t){const n=t.startsWith("type:");$[t]=!($[t]??n)}function tt(t){return $[t]??!1}function et(t){return $[t]===!1}const nt=it(()=>o(c).reduce((t,n)=>t+(n.count??0),0));function ot(t){return o(h).find(n=>n.entityTypes.includes(t))}function rt(t){U(t||o(s))}return{get name(){return o(e)},get about(){return o(i)},get accentColor(){return o(s)},get nameLoaded(){return o(f)},async updateWorkspace(t){t.accent_color!==void 0&&(u(s,t.accent_color,!0),U(t.accent_color)),await st(t),t.name?.trim()&&u(e,t.name.trim(),!0),typeof t.about=="string"&&u(i,t.about,!0)},get repos(){return o(c)},get apps(){return o(h)},get loading(){return o(v)},get error(){return o(P)},get totalEntities(){return o(nt)},get totalLinks(){return o(S)},get totalFiles(){return o(b)},get hasTasks(){return o(c).some(t=>t.entities.some(n=>n.entityType==="task"))},get sortedRepos(){const t=[...o(c)].sort((n,r)=>n.name.localeCompare(r.name));return G(t)},get filteredIds(){const t=o(C).trim().toLowerCase();if(!t)return null;const n=new Set;for(const r of o(c))for(const a of r.entities)(a.title.toLowerCase().includes(t)||a.id.toLowerCase().includes(t))&&n.add(a.id);return n},get filterQuery(){return o(C)},setFilterQuery:X,get sortMode(){return o(J)},set sortMode(t){u(J,t,!0)},get recentEntities(){const t=o(C).trim().toLowerCase();let n=[];for(const r of o(c))for(const a of r.entities)t&&!a.title.toLowerCase().includes(t)&&!a.id.toLowerCase().includes(t)||n.push(a);return n.sort((r,a)=>{const l=r.updatedAt??"";return(a.updatedAt??"").localeCompare(l)})},get sidebarScrollTop(){return o(F)},set sidebarScrollTop(t){u(F,t,!0)},get lastAutoExpandedFor(){return o(x)},set lastAutoExpandedFor(t){u(x,t,!0)},load:W,loadEntities:I,removeEntity:V,refreshEntities:Q,refreshAll:B,toggleRepo:K,isExpanded:q,toggleEntity:H,isEntityExpanded:N,getEntityContents:Y,toggleFolder:Z,isFolderExpanded:tt,isFolderCollapsed:et,applyUserAccentColor:rt,applyAccentColor:U,getAppForEntityType:ot,async renameCollectionTo(t,n,r){await lt(t,n,r);const a=o(c).find(l=>l.name===t);a&&(a.name=n,a.displayName=r||_(n),o(g)[t]&&(o(g)[n]=!0,delete o(g)[t]))},async removeCollection(t){await ut(t),u(c,o(c).filter(n=>n.name!==t),!0),delete o(g)[t]},async addCollection(t,n,r,a){await ct(t,n,r,a);const l=await D();u(c,l.map(y=>o(c).find(O=>O.name===y.name)??{name:y.name,displayName:_(y.name,y.display_name),type:y.type,private:y.private,count:null,entities:[],loading:!1,loaded:!1}),!0),o(g)[t]=!0,await I(t)}}}const _t=gt();export{Mt as a,kt as b,At as c,Ot as d,vt as e,Rt as f,Ut as g,Et as h,It as i,wt as j,$t as k,bt as l,St as m,Pt as s,Tt as t,Lt as u,_t as w};
@@ -1 +1 @@
1
- import{e as n,f as m,g as a,s}from"./DSh-OF2y.js";import{g as c}from"./BAAbylyg.js";import{d as v,u as y,c as g,f as V}from"./DSkxw4Ss.js";const x={selectedType:null,groupBy:null,sortKey:"name",sortAsc:!0,filters:{text:{},enum:{},date:{}}};function I(){let r=n(m([])),i=n(null),u=n(!1);async function l(){try{s(r,await V(),!0),s(u,!0)}catch(e){console.error("Failed to load views:",e)}}async function w(e){const t=await g(e,x);return s(r,[...a(r),t],!0),t}async function f(e,t){await y(e,t),s(r,a(r).map(o=>o.id===e?{...o,...t}:o),!0)}async function d(e){if(await v(e),s(r,a(r).filter(t=>t.id!==e),!0),a(i)===e){const t=a(r)[0];t?(s(i,t.id,!0),c(`/views/${t.id}`,{replaceState:!0})):(s(i,null),c("/",{replaceState:!0}))}}function p(e){s(i,e,!0)}return{get views(){return a(r)},get activeViewId(){return a(i)},get loaded(){return a(u)},load:l,create:w,update:f,remove:d,setActive:p}}const h=I();export{h as v};
1
+ import{e as n,f as m,g as a,s}from"./DSh-OF2y.js";import{g as c}from"./C0v9FrTH.js";import{d as v,u as y,c as g,f as V}from"./Cc0c675R.js";const x={selectedType:null,groupBy:null,sortKey:"name",sortAsc:!0,filters:{text:{},enum:{},date:{}}};function I(){let r=n(m([])),i=n(null),u=n(!1);async function l(){try{s(r,await V(),!0),s(u,!0)}catch(e){console.error("Failed to load views:",e)}}async function w(e){const t=await g(e,x);return s(r,[...a(r),t],!0),t}async function f(e,t){await y(e,t),s(r,a(r).map(o=>o.id===e?{...o,...t}:o),!0)}async function d(e){if(await v(e),s(r,a(r).filter(t=>t.id!==e),!0),a(i)===e){const t=a(r)[0];t?(s(i,t.id,!0),c(`/views/${t.id}`,{replaceState:!0})):(s(i,null),c("/",{replaceState:!0}))}}function p(e){s(i,e,!0)}return{get views(){return a(r)},get activeViewId(){return a(i)},get loaded(){return a(u)},load:l,create:w,update:f,remove:d,setActive:p}}const h=I();export{h as v};
@@ -1,4 +1,4 @@
1
- import{e as h,f as U,s as a,g as t,aw as x}from"./DSh-OF2y.js";import{i as L,g as V}from"./BAAbylyg.js";import{n as y}from"./DC9z5DEo.js";import{w as W}from"./DSkxw4Ss.js";function X(g,c,o){fetch("/api/chat/stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(g),signal:o}).then(async n=>{if(!n.ok){c({type:"error",message:`HTTP ${n.status}`});return}const r=n.body?.getReader();if(!r){c({type:"error",message:"No response body"});return}const p=new TextDecoder;let m="";for(;;){const{done:k,value:O}=await r.read();if(k)break;m+=p.decode(O,{stream:!0});const A=m.split(`
1
+ import{e as h,f as U,s as a,g as t,aw as x}from"./DSh-OF2y.js";import{i as L,g as V}from"./C0v9FrTH.js";import{n as y}from"./HVmKTSmh.js";import{w as W}from"./Cc0c675R.js";function X(g,c,o){fetch("/api/chat/stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(g),signal:o}).then(async n=>{if(!n.ok){c({type:"error",message:`HTTP ${n.status}`});return}const r=n.body?.getReader();if(!r){c({type:"error",message:"No response body"});return}const p=new TextDecoder;let m="";for(;;){const{done:k,value:O}=await r.read();if(k)break;m+=p.decode(O,{stream:!0});const A=m.split(`
2
2
  `);m=A.pop()??"";for(const C of A)if(C.startsWith("data: "))try{const f=JSON.parse(C.slice(6));c(f)}catch{}}}).catch(n=>{n.name!=="AbortError"&&c({type:"error",message:n.message})})}const D="sg-chat-sessions",J="sg-chat-version",z=14;function b(){try{const g=localStorage.getItem(D);if(!g)return[];if(localStorage.getItem(J)==="2")return JSON.parse(g);const n=JSON.parse(g).map(r=>({id:crypto.randomUUID(),createdAt:r.date+"T00:00:00.000Z",updatedAt:r.date+"T00:00:00.000Z",title:r.messages.find(p=>p.role==="user")?.content.slice(0,50)||"New chat",messages:r.messages}));return localStorage.setItem(D,JSON.stringify(n)),localStorage.setItem(J,"2"),n}catch{return[]}}function _(g){const o=[...g].sort((n,r)=>r.updatedAt.localeCompare(n.updatedAt)).slice(0,z);try{localStorage.setItem(D,JSON.stringify(o)),localStorage.setItem(J,"2")}catch{}}function N(g,c){const o=b(),n=c.map(({streaming:p,...m})=>m),r=o.findIndex(p=>p.id===g);r>=0&&(o[r].messages=n,o[r].updatedAt=new Date().toISOString()),_(o)}function B(){const c=b().sort((e,i)=>i.updatedAt.localeCompare(e.updatedAt))[0];let o=h(U(c?c.messages.map(e=>({...e,streaming:!1})):[])),n=h(U(c?.id??null)),r=h(!1),p=h(0),m=h(0),k=h(0),O=h(null),A=null,C=h(""),f=h(U(!!c));const R=new Set(["create_entity","update_entity","delete_entity","move_entity"]);function M(){$();const e=crypto.randomUUID();a(n,e,!0),a(o,[],!0),a(f,!1)}function E(){if(t(n)&&t(f))return t(n);const e=t(n)||crypto.randomUUID();a(n,e,!0);const i=new Date().toISOString(),d=b();return d.push({id:e,createdAt:i,updatedAt:i,title:"New chat",messages:[]}),_(d),a(f,!0),e}function K(e){if(!e.trim()||t(r))return;a(O,null);const i=E();t(o).push({role:"user",content:e}),t(o).push({role:"agent",content:"",segments:[],streaming:!0}),a(r,!0);const d=b(),l=d.find(s=>s.id===i);l&&l.title==="New chat"&&(l.title=e.slice(0,50),_(d)),N(i,t(o));let T=!1,w=null;A=new AbortController;const G=y.selectedSubPath?`${y.selectedRepo}/${y.selectedType}/${y.selectedId}/${y.selectedSubPath}`:y.selectedId?`${y.selectedRepo}/${y.selectedType}/${y.selectedId}`:null,P=t(o).slice(0,-2).map(s=>({role:s.role==="agent"?"assistant":s.role,content:s.content})),H={message:e,context:G??void 0,sessionId:i,history:P.length>0?P:void 0};X(H,s=>{if(!t(r))return;const u=t(o)[t(o).length-1];if(!u||u.role!=="agent")return;const S=u.segments;switch(s.type){case"token":{u.content+=s.text??"";const I=S[S.length-1];I&&I.type==="text"?I.content+=s.text??"":S.push({type:"text",content:s.text??""}),u.segments=S,x(m);break}case"tool_start":if(s.name){R.has(s.name)&&(T=!0);const I=S[S.length-1];I&&I.type==="tools"?I.names=[...I.names,s.name]:S.push({type:"tools",names:[s.name]}),u.segments=S,x(m)}break;case"mutation":T=!0,s.action==="created"&&s.repo&&s.entityType&&s.entityId&&(w={repo:s.repo,entityType:s.entityType,entityId:s.entityId}),window.StudioChrome?.emitMutation?.({action:s.action,repo:s.repo,entityType:s.entityType,entityId:s.entityId});break;case"highlight":a(O,s.entityIds&&s.entityIds.length>0?new Set(s.entityIds):null,!0);break;case"done":s.message&&!u.content&&(u.content=s.message,u.segments=[{type:"text",content:s.message}]),u.streaming=!1,a(r,!1),N(i,t(o)),T&&(L().then(()=>{x(p)}),W.refreshAll().then(()=>{w&&V(`/${w.repo}/${w.entityType}/${w.entityId}`)}));break;case"error":u.content+=`
3
3
 
4
4
  Error: ${s.message}`,u.streaming=!1,a(r,!1),N(i,t(o));break}},A.signal)}function $(){if(!t(r))return;fetch("/api/chat/abort",{method:"POST",credentials:"include"}).catch(()=>{}),A?.abort(),A=null,a(r,!1);const e=t(o)[t(o).length-1];e?.streaming&&(e.streaming=!1,t(n)&&N(t(n),t(o)))}function Y(){$(),a(o,[],!0),t(n)&&t(f)&&N(t(n),t(o))}function Z(e){const d=b().filter(l=>l.id!==e);if(_(d),t(n)===e){const l=d.sort((T,w)=>w.updatedAt.localeCompare(T.updatedAt));l.length>0?(a(n,l[0].id,!0),a(o,l[0].messages.map(T=>({...T,streaming:!1})),!0),a(f,!0)):(a(n,null),a(o,[],!0),a(f,!1))}}function j(e){const d=b().find(l=>l.id===e);d&&($(),a(n,d.id,!0),a(o,d.messages.map(l=>({...l,streaming:!1})),!0),a(f,!0))}function q(){return b().sort((e,i)=>i.updatedAt.localeCompare(e.updatedAt)).map(e=>({id:e.id,title:e.title,createdAt:e.createdAt,updatedAt:e.updatedAt,preview:e.messages.find(i=>i.role==="user")?.content.slice(0,80)||"",count:e.messages.length,active:e.id===t(n)}))}return{get messages(){return t(o)},get streaming(){return t(r)},get mutationCount(){return t(p)},get scrollTick(){return t(m)},get forceScroll(){return t(k)},triggerScroll(){x(k)},get highlightedIds(){return t(O)},get activeSessionId(){return t(n)},get draftInput(){return t(C)},set draftInput(e){a(C,e,!0)},send:K,stop:$,clear:Y,newSession:M,deleteSession:Z,getSessions:q,loadSession:j}}const te=B();export{te as chatStore};
@@ -1 +1 @@
1
- import{g as t,s as e,e as u}from"./DSh-OF2y.js";import{a as p}from"./DSkxw4Ss.js";function E(){let l=u(null),i=u(null),r=u(null),o=u(null),s=u("entity"),f=u(null),g=u(null),d=u("preferences"),h=u(!1);function v(n,c){t(l)&&(t(l)!==n||t(r)!==c)&&p(t(l)).catch(()=>{})}function w(n,c,a,V){v(n,a),e(l,n,!0),e(i,c,!0),e(r,a,!0),e(o,V??null,!0)}function y(){e(s,"entity")}function b(){e(s,"graph")}function I(n){e(s,"view"),e(f,n,!0)}function S(){e(s,"settings"),e(d,"preferences")}function m(n,c,a){t(r)===a&&t(l)===n?(e(l,null),e(i,null),e(r,null)):(e(l,n,!0),e(i,c,!0),e(r,a,!0)),e(o,null)}function T(){t(l)&&p(t(l)).catch(()=>{}),e(l,null),e(i,null),e(r,null),e(o,null)}return{get selectedRepo(){return t(l)},get selectedType(){return t(i)},get selectedId(){return t(r)},get selectedSubPath(){return t(o)},get activeView(){return t(s)},get entityPath(){return t(l)&&t(i)&&t(r)?`/${t(l)}/${t(i)}/${t(r)}`:null},get hoveredEntityId(){return t(g)},set hoveredEntityId(n){e(g,n,!0)},get settingsTab(){return t(d)},set settingsTab(n){e(d,n,!0)},get hideSidebar(){return t(h)},set hideSidebar(n){e(h,n,!0)},select:w,deselect:T,selectOnGraph:m,showEntity:y,showGraph:b,get activeViewId(){return t(f)},showView:I,showSettings:S}}const $=E();export{$ as n};
1
+ import{g as t,s as e,e as u}from"./DSh-OF2y.js";import{a as p}from"./Cc0c675R.js";function E(){let l=u(null),i=u(null),r=u(null),o=u(null),s=u("entity"),f=u(null),g=u(null),d=u("preferences"),h=u(!1);function v(n,c){t(l)&&(t(l)!==n||t(r)!==c)&&p(t(l)).catch(()=>{})}function w(n,c,a,V){v(n,a),e(l,n,!0),e(i,c,!0),e(r,a,!0),e(o,V??null,!0)}function y(){e(s,"entity")}function b(){e(s,"graph")}function I(n){e(s,"view"),e(f,n,!0)}function S(){e(s,"settings"),e(d,"preferences")}function m(n,c,a){t(r)===a&&t(l)===n?(e(l,null),e(i,null),e(r,null)):(e(l,n,!0),e(i,c,!0),e(r,a,!0)),e(o,null)}function T(){t(l)&&p(t(l)).catch(()=>{}),e(l,null),e(i,null),e(r,null),e(o,null)}return{get selectedRepo(){return t(l)},get selectedType(){return t(i)},get selectedId(){return t(r)},get selectedSubPath(){return t(o)},get activeView(){return t(s)},get entityPath(){return t(l)&&t(i)&&t(r)?`/${t(l)}/${t(i)}/${t(r)}`:null},get hoveredEntityId(){return t(g)},set hoveredEntityId(n){e(g,n,!0)},get settingsTab(){return t(d)},set settingsTab(n){e(d,n,!0)},get hideSidebar(){return t(h)},set hideSidebar(n){e(h,n,!0)},select:w,deselect:T,selectOnGraph:m,showEntity:y,showGraph:b,get activeViewId(){return t(f)},showView:I,showSettings:S}}const $=E();export{$ as n};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.BIvpQ3Qk.js","../chunks/PPVm8Dsz.js","../chunks/b0XUoOIH.js","../chunks/DSh-OF2y.js","../chunks/DT3KtxWU.js","../chunks/CRnhIQbv.js","../chunks/CFtRXHDP.js","../chunks/B3NI-DOv.js","../chunks/BAAbylyg.js","../chunks/DSkxw4Ss.js","../chunks/DC9z5DEo.js","../chunks/Sk0ODu4Y.js","../chunks/Bs4ovbtO.js","../chunks/0wBGAod7.js","../chunks/DVx_0hnZ.js","../chunks/D-yNNNdf.js","../chunks/BUcIsKRk.js","../chunks/DHtLlmE0.js","../chunks/DCVmM0L5.js","../chunks/vZ2iBqLE.js","../assets/Toaster.rN8r_Hzv.css","../chunks/lsAKkphT.js","../assets/0.n3qM-DRk.css","../nodes/1.y3j9wcQE.js","../nodes/2.Du0xZVQg.js","../chunks/BPXdu_FX.js","../chunks/DQYNi3YK.js","../chunks/Bnl5ADsW.js","../chunks/CdeYcEuU.js","../chunks/CSzKZPD4.js","../chunks/BgBJ0u3M.js","../chunks/azUmHUDT.js","../chunks/0rsp5-Up.js","../chunks/BHue2Ock.js","../chunks/DQ5NTKSo.js","../chunks/APIqItee.js","../chunks/KHKAD2Ng.js","../assets/Copy.FS8bdfxr.css","../chunks/DiWKchgv.js","../chunks/BU2bHQbQ.js","../assets/2.DNpjFx0k.css","../nodes/3.weQEi2lI.js","../chunks/By_Wtb5J.js","../assets/ViewToolbar.BX74Ki7U.css","../assets/3.zsEg_MDN.css","../nodes/4.DJyhWznw.js","../chunks/DodWDTE5.js","../chunks/CqkleIqs.js","../assets/4.CjSyz-ka.css","../nodes/5.CipwuwB3.js","../assets/5.DFeGxLYf.css","../nodes/6.Daxwm3Lw.js","../assets/6.CquhUpOu.css","../nodes/7.TxeJDMtw.js","../chunks/Bt5_mycY.js","../assets/checkbox.D6tMDJWk.css","../assets/7.5LBMlZdT.css","../nodes/8.DWNdmB4l.js","../assets/8.DfcI2i9H.css","../nodes/9.BuTZk7Le.js","../assets/9.CT4xL4K3.css","../nodes/10.D03BZcr1.js","../assets/10.BUrHkYry.css"])))=>i.map(i=>d[i]);
2
- import{_ as i}from"../chunks/PPVm8Dsz.js";import{s as I,av as $,g as m,aC as tt,ai as et,m as rt,p as at,a6 as st,a2 as ot,aD as nt,aE as it,a0 as v,a3 as mt,b as ct,e as j,a4 as O,c as ut,r as _t,t as dt}from"../chunks/DSh-OF2y.js";import{h as lt,m as ft,u as vt,a as _,c as E,b as Y,t as gt,s as ht}from"../chunks/b0XUoOIH.js";import{i as D,b as R}from"../chunks/DT3KtxWU.js";import{c as A}from"../chunks/DCVmM0L5.js";import{p as L}from"../chunks/D-yNNNdf.js";function Et(s){return class extends pt{constructor(t){super({component:s,...t})}}}class pt{#e;#t;constructor(t){var a=new Map,c=(r,e)=>{var u=rt(e,!1,!1);return a.set(r,u),u};const n=new Proxy({...t.props||{},$$events:{}},{get(r,e){return m(a.get(e)??c(e,Reflect.get(r,e)))},has(r,e){return e===$?!0:(m(a.get(e)??c(e,Reflect.get(r,e))),Reflect.has(r,e))},set(r,e,u){return I(a.get(e)??c(e,u),u),Reflect.set(r,e,u)}});this.#t=(t.hydrate?lt:ft)(t.component,{target:t.target,anchor:t.anchor,props:n,context:t.context,intro:t.intro??!1,recover:t.recover,transformError:t.transformError}),(!t?.props?.$$host||t.sync===!1)&&tt(),this.#e=n.$$events;for(const r of Object.keys(this.#t))r==="$set"||r==="$destroy"||r==="$on"||et(this,r,{get(){return this.#t[r]},set(e){this.#t[r]=e},enumerable:!0});this.#t.$set=r=>{Object.assign(n,r)},this.#t.$destroy=()=>{vt(this.#t)}}$set(t){this.#t.$set(t)}$on(t,a){this.#e[t]=this.#e[t]||[];const c=(...n)=>a.call(this,...n);return this.#e[t].push(c),()=>{this.#e[t]=this.#e[t].filter(n=>n!==c)}}$destroy(){this.#t.$destroy()}}const wt={};var yt=Y('<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>'),Pt=Y("<!> <!>",1);function bt(s,t){at(t,!0);let a=L(t,"components",23,()=>[]),c=L(t,"data_0",3,null),n=L(t,"data_1",3,null),r=L(t,"data_2",3,null);st(()=>t.stores.page.set(t.page)),ot(()=>{t.stores,t.page,t.constructors,a(),t.form,c(),n(),r(),t.stores.page.notify()});let e=j(!1),u=j(!1),k=j(null);nt(()=>{const o=t.stores.page.subscribe(()=>{m(e)&&(I(u,!0),it().then(()=>{I(k,document.title||"untitled page",!0)}))});return I(e,!0),o});const z=O(()=>t.constructors[2]);var C=Pt(),S=v(C);{var B=o=>{const d=O(()=>t.constructors[0]);var l=E(),p=v(l);A(p,()=>m(d),(f,g)=>{R(g(f,{get data(){return c()},get form(){return t.form},get params(){return t.page.params},children:(y,Rt)=>{var M=E(),K=v(M);{var N=h=>{const T=O(()=>t.constructors[1]);var P=E(),V=v(P);A(V,()=>m(T),(x,w)=>{R(w(x,{get data(){return n()},get form(){return t.form},get params(){return t.page.params},children:(b,At)=>{var G=E(),U=v(G);A(U,()=>m(z),(W,X)=>{R(X(W,{get data(){return r()},get form(){return t.form},get params(){return t.page.params}}),Z=>a()[2]=Z,()=>a()?.[2])}),_(b,G)},$$slots:{default:!0}}),b=>a()[1]=b,()=>a()?.[1])}),_(h,P)},Q=h=>{const T=O(()=>t.constructors[1]);var P=E(),V=v(P);A(V,()=>m(T),(x,w)=>{R(w(x,{get data(){return n()},get form(){return t.form},get params(){return t.page.params}}),b=>a()[1]=b,()=>a()?.[1])}),_(h,P)};D(K,h=>{t.constructors[2]?h(N):h(Q,!1)})}_(y,M)},$$slots:{default:!0}}),y=>a()[0]=y,()=>a()?.[0])}),_(o,l)},F=o=>{const d=O(()=>t.constructors[0]);var l=E(),p=v(l);A(p,()=>m(d),(f,g)=>{R(g(f,{get data(){return c()},get form(){return t.form},get params(){return t.page.params}}),y=>a()[0]=y,()=>a()?.[0])}),_(o,l)};D(S,o=>{t.constructors[1]?o(B):o(F,!1)})}var H=mt(S,2);{var J=o=>{var d=yt(),l=ut(d);{var p=f=>{var g=gt();dt(()=>ht(g,m(k))),_(f,g)};D(l,f=>{m(u)&&f(p)})}_t(d),_(o,d)};D(H,o=>{m(e)&&o(J)})}_(s,C),ct()}const jt=Et(bt),kt=[()=>i(()=>import("../nodes/0.BIvpQ3Qk.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22]),import.meta.url),()=>i(()=>import("../nodes/1.y3j9wcQE.js"),__vite__mapDeps([23,2,3,19,8]),import.meta.url),()=>i(()=>import("../nodes/2.Du0xZVQg.js"),__vite__mapDeps([24,2,3,5,4,6,1,17,18,8,19,15,25,26,27,9,10,11,28,29,30,31,21,32,12,33,34,35,36,37,38,39,40]),import.meta.url),()=>i(()=>import("../nodes/3.weQEi2lI.js"),__vite__mapDeps([41,2,3,4,17,5,6,34,15,8,42,19,30,31,10,9,13,43,14,21,29,44]),import.meta.url),()=>i(()=>import("../nodes/4.DJyhWznw.js"),__vite__mapDeps([45,9,3,6,1,2,4,17,18,15,8,46,19,5,42,34,30,31,10,13,43,28,32,26,12,11,33,47,25,39,48]),import.meta.url),()=>i(()=>import("../nodes/5.CipwuwB3.js"),__vite__mapDeps([49,9,3,6,2,4,8,10,50]),import.meta.url),()=>i(()=>import("../nodes/6.Daxwm3Lw.js"),__vite__mapDeps([51,2,3,42,5,4,6,17,34,15,8,19,30,31,10,9,13,43,1,28,39,52]),import.meta.url),()=>i(()=>import("../nodes/7.TxeJDMtw.js"),__vite__mapDeps([53,2,3,15,46,8,19,4,5,6,26,17,18,54,34,27,55,33,36,37,35,14,9,31,1,11,21,10,56]),import.meta.url),()=>i(()=>import("../nodes/8.DWNdmB4l.js"),__vite__mapDeps([57,2,3,4,17,18,5,6,8,42,34,15,19,30,31,10,9,13,43,28,38,26,25,54,27,55,35,58]),import.meta.url),()=>i(()=>import("../nodes/9.BuTZk7Le.js"),__vite__mapDeps([59,2,3,4,7,8,11,6,34,5,15,35,60]),import.meta.url),()=>i(()=>import("../nodes/10.D03BZcr1.js"),__vite__mapDeps([61,2,3,4,7,8,11,6,9,34,5,15,35,62]),import.meta.url)],Ct=[],St={"/(app)":[3,[2]],"/(app)/graph":[6,[2]],"/login":[9],"/(app)/settings":[7,[2]],"/setup":[10],"/(app)/views/[id]":[8,[2]],"/(app)/[repo]/[type]/[id]":[4,[2]],"/(app)/[repo]/[type]/[id]/edit":[5,[2]]},q={handleError:(({error:s})=>{console.error(s)}),reroute:(()=>{}),transport:{}},Ot=Object.fromEntries(Object.entries(q.transport).map(([s,t])=>[s,t.decode])),Mt=Object.fromEntries(Object.entries(q.transport).map(([s,t])=>[s,t.encode])),Gt=!1,Yt=(s,t)=>Ot[s](t);export{Yt as decode,Ot as decoders,St as dictionary,Mt as encoders,Gt as hash,q as hooks,wt as matchers,kt as nodes,jt as root,Ct as server_loads};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.Dowq8M1Z.js","../chunks/PPVm8Dsz.js","../chunks/b0XUoOIH.js","../chunks/DSh-OF2y.js","../chunks/DT3KtxWU.js","../chunks/CRnhIQbv.js","../chunks/CFtRXHDP.js","../chunks/B3NI-DOv.js","../chunks/C0v9FrTH.js","../chunks/Cc0c675R.js","../chunks/HVmKTSmh.js","../chunks/Sk0ODu4Y.js","../chunks/BfEy5AjR.js","../chunks/D2C1YupD.js","../chunks/CB2-7g10.js","../chunks/D-yNNNdf.js","../chunks/BYKARDRw.js","../chunks/DHtLlmE0.js","../chunks/DCVmM0L5.js","../chunks/vZ2iBqLE.js","../assets/Toaster.rN8r_Hzv.css","../chunks/lsAKkphT.js","../assets/0.n3qM-DRk.css","../nodes/1.UNZ7IKS_.js","../nodes/2.B5L8POz_.js","../chunks/BPXdu_FX.js","../chunks/DQYNi3YK.js","../chunks/Bnl5ADsW.js","../chunks/CdeYcEuU.js","../chunks/CSzKZPD4.js","../chunks/BgBJ0u3M.js","../chunks/azUmHUDT.js","../chunks/Bolw6cIp.js","../chunks/BHue2Ock.js","../chunks/DQ5NTKSo.js","../chunks/APIqItee.js","../chunks/KHKAD2Ng.js","../assets/Copy.FS8bdfxr.css","../chunks/DiWKchgv.js","../chunks/DNldxAbC.js","../assets/2.DNpjFx0k.css","../nodes/3.B1Y1g0du.js","../chunks/BR3Oh1Lv.js","../assets/ViewToolbar.BX74Ki7U.css","../assets/3.zsEg_MDN.css","../nodes/4.BerDMn5m.js","../chunks/B-PHzYeY.js","../chunks/CqkleIqs.js","../assets/4.CjSyz-ka.css","../nodes/5.IM34i9-W.js","../assets/5.DFeGxLYf.css","../nodes/6.DPwydXYm.js","../assets/6.CquhUpOu.css","../nodes/7.DpSO-I2k.js","../chunks/Bt5_mycY.js","../assets/checkbox.D6tMDJWk.css","../assets/7.D55lTQ_F.css","../nodes/8.BVUyEEut.js","../assets/8.DfcI2i9H.css","../nodes/9.8nTMvuWx.js","../assets/9.CT4xL4K3.css","../nodes/10.7pt8gUOi.js","../assets/10.BUrHkYry.css"])))=>i.map(i=>d[i]);
2
+ import{_ as i}from"../chunks/PPVm8Dsz.js";import{s as I,av as $,g as m,aC as tt,ai as et,m as rt,p as at,a6 as st,a2 as ot,aD as nt,aE as it,a0 as v,a3 as mt,b as ct,e as j,a4 as O,c as ut,r as _t,t as dt}from"../chunks/DSh-OF2y.js";import{h as lt,m as ft,u as vt,a as _,c as E,b as Y,t as gt,s as ht}from"../chunks/b0XUoOIH.js";import{i as D,b as R}from"../chunks/DT3KtxWU.js";import{c as A}from"../chunks/DCVmM0L5.js";import{p as L}from"../chunks/D-yNNNdf.js";function Et(s){return class extends pt{constructor(t){super({component:s,...t})}}}class pt{#e;#t;constructor(t){var a=new Map,c=(r,e)=>{var u=rt(e,!1,!1);return a.set(r,u),u};const n=new Proxy({...t.props||{},$$events:{}},{get(r,e){return m(a.get(e)??c(e,Reflect.get(r,e)))},has(r,e){return e===$?!0:(m(a.get(e)??c(e,Reflect.get(r,e))),Reflect.has(r,e))},set(r,e,u){return I(a.get(e)??c(e,u),u),Reflect.set(r,e,u)}});this.#t=(t.hydrate?lt:ft)(t.component,{target:t.target,anchor:t.anchor,props:n,context:t.context,intro:t.intro??!1,recover:t.recover,transformError:t.transformError}),(!t?.props?.$$host||t.sync===!1)&&tt(),this.#e=n.$$events;for(const r of Object.keys(this.#t))r==="$set"||r==="$destroy"||r==="$on"||et(this,r,{get(){return this.#t[r]},set(e){this.#t[r]=e},enumerable:!0});this.#t.$set=r=>{Object.assign(n,r)},this.#t.$destroy=()=>{vt(this.#t)}}$set(t){this.#t.$set(t)}$on(t,a){this.#e[t]=this.#e[t]||[];const c=(...n)=>a.call(this,...n);return this.#e[t].push(c),()=>{this.#e[t]=this.#e[t].filter(n=>n!==c)}}$destroy(){this.#t.$destroy()}}const wt={};var yt=Y('<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>'),Pt=Y("<!> <!>",1);function bt(s,t){at(t,!0);let a=L(t,"components",23,()=>[]),c=L(t,"data_0",3,null),n=L(t,"data_1",3,null),r=L(t,"data_2",3,null);st(()=>t.stores.page.set(t.page)),ot(()=>{t.stores,t.page,t.constructors,a(),t.form,c(),n(),r(),t.stores.page.notify()});let e=j(!1),u=j(!1),k=j(null);nt(()=>{const o=t.stores.page.subscribe(()=>{m(e)&&(I(u,!0),it().then(()=>{I(k,document.title||"untitled page",!0)}))});return I(e,!0),o});const z=O(()=>t.constructors[2]);var C=Pt(),S=v(C);{var B=o=>{const d=O(()=>t.constructors[0]);var l=E(),p=v(l);A(p,()=>m(d),(f,g)=>{R(g(f,{get data(){return c()},get form(){return t.form},get params(){return t.page.params},children:(y,Rt)=>{var M=E(),K=v(M);{var N=h=>{const T=O(()=>t.constructors[1]);var P=E(),V=v(P);A(V,()=>m(T),(x,w)=>{R(w(x,{get data(){return n()},get form(){return t.form},get params(){return t.page.params},children:(b,At)=>{var G=E(),U=v(G);A(U,()=>m(z),(W,X)=>{R(X(W,{get data(){return r()},get form(){return t.form},get params(){return t.page.params}}),Z=>a()[2]=Z,()=>a()?.[2])}),_(b,G)},$$slots:{default:!0}}),b=>a()[1]=b,()=>a()?.[1])}),_(h,P)},Q=h=>{const T=O(()=>t.constructors[1]);var P=E(),V=v(P);A(V,()=>m(T),(x,w)=>{R(w(x,{get data(){return n()},get form(){return t.form},get params(){return t.page.params}}),b=>a()[1]=b,()=>a()?.[1])}),_(h,P)};D(K,h=>{t.constructors[2]?h(N):h(Q,!1)})}_(y,M)},$$slots:{default:!0}}),y=>a()[0]=y,()=>a()?.[0])}),_(o,l)},F=o=>{const d=O(()=>t.constructors[0]);var l=E(),p=v(l);A(p,()=>m(d),(f,g)=>{R(g(f,{get data(){return c()},get form(){return t.form},get params(){return t.page.params}}),y=>a()[0]=y,()=>a()?.[0])}),_(o,l)};D(S,o=>{t.constructors[1]?o(B):o(F,!1)})}var H=mt(S,2);{var J=o=>{var d=yt(),l=ut(d);{var p=f=>{var g=gt();dt(()=>ht(g,m(k))),_(f,g)};D(l,f=>{m(u)&&f(p)})}_t(d),_(o,d)};D(H,o=>{m(e)&&o(J)})}_(s,C),ct()}const jt=Et(bt),kt=[()=>i(()=>import("../nodes/0.Dowq8M1Z.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22]),import.meta.url),()=>i(()=>import("../nodes/1.UNZ7IKS_.js"),__vite__mapDeps([23,2,3,19,8]),import.meta.url),()=>i(()=>import("../nodes/2.B5L8POz_.js"),__vite__mapDeps([24,2,3,5,4,6,1,17,18,8,19,15,25,26,27,9,10,11,28,29,30,31,21,32,12,33,34,35,36,37,38,39,40]),import.meta.url),()=>i(()=>import("../nodes/3.B1Y1g0du.js"),__vite__mapDeps([41,2,3,4,17,5,6,34,15,8,42,19,30,31,10,9,13,43,14,21,29,44]),import.meta.url),()=>i(()=>import("../nodes/4.BerDMn5m.js"),__vite__mapDeps([45,9,3,6,1,2,4,17,18,15,8,46,19,5,42,34,30,31,10,13,43,28,32,26,12,11,33,47,25,39,48]),import.meta.url),()=>i(()=>import("../nodes/5.IM34i9-W.js"),__vite__mapDeps([49,9,3,6,2,4,8,10,50]),import.meta.url),()=>i(()=>import("../nodes/6.DPwydXYm.js"),__vite__mapDeps([51,2,3,42,5,4,6,17,34,15,8,19,30,31,10,9,13,43,1,28,39,52]),import.meta.url),()=>i(()=>import("../nodes/7.DpSO-I2k.js"),__vite__mapDeps([53,2,3,15,46,8,19,4,5,6,26,17,18,54,34,27,55,33,36,37,35,14,9,31,1,11,21,10,56]),import.meta.url),()=>i(()=>import("../nodes/8.BVUyEEut.js"),__vite__mapDeps([57,2,3,4,17,18,5,6,8,42,34,15,19,30,31,10,9,13,43,28,38,26,25,54,27,55,35,58]),import.meta.url),()=>i(()=>import("../nodes/9.8nTMvuWx.js"),__vite__mapDeps([59,2,3,4,7,8,11,6,34,5,15,35,60]),import.meta.url),()=>i(()=>import("../nodes/10.7pt8gUOi.js"),__vite__mapDeps([61,2,3,4,7,8,11,6,9,34,5,15,35,62]),import.meta.url)],Ct=[],St={"/(app)":[3,[2]],"/(app)/graph":[6,[2]],"/login":[9],"/(app)/settings":[7,[2]],"/setup":[10],"/(app)/views/[id]":[8,[2]],"/(app)/[repo]/[type]/[id]":[4,[2]],"/(app)/[repo]/[type]/[id]/edit":[5,[2]]},q={handleError:(({error:s})=>{console.error(s)}),reroute:(()=>{}),transport:{}},Ot=Object.fromEntries(Object.entries(q.transport).map(([s,t])=>[s,t.decode])),Mt=Object.fromEntries(Object.entries(q.transport).map(([s,t])=>[s,t.encode])),Gt=!1,Yt=(s,t)=>Ot[s](t);export{Yt as decode,Ot as decoders,St as dictionary,Mt as encoders,Gt as hash,q as hooks,wt as matchers,kt as nodes,jt as root,Ct as server_loads};
@@ -0,0 +1 @@
1
+ import{l as o,a as r}from"../chunks/C0v9FrTH.js";export{o as load_css,r as start};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../chunks/DNldxAbC.js","../chunks/DSh-OF2y.js","../chunks/C0v9FrTH.js","../chunks/HVmKTSmh.js","../chunks/Cc0c675R.js","../chunks/CFtRXHDP.js","../chunks/BB_5th5W.js","../chunks/PPVm8Dsz.js","../chunks/CqkleIqs.js","../chunks/DnL9f0lc.js","../chunks/CX_61fY8.js","../chunks/CscoF-YL.js","../chunks/D7ZqAKi9.js","../chunks/C7VoTosa.js","../chunks/CrdV0ttd.js"])))=>i.map(i=>d[i]);
2
+ import{_ as A}from"../chunks/PPVm8Dsz.js";import{a as _,s as O,f as z,b as te,c as ae}from"../chunks/b0XUoOIH.js";import{p as E,l as $,s,d as f,g as t,a as T,c as w,n as k,r as M,b as P,m as x,t as C,a1 as re,e as V,f as B,aV as G,a2 as N,aD as oe,a3 as ie,ac as ne,ad as le,a0 as se}from"../chunks/DSh-OF2y.js";import{i as R}from"../chunks/DT3KtxWU.js";import{a as D,c as de,s as ce}from"../chunks/CRnhIQbv.js";import{h as ue}from"../chunks/B3NI-DOv.js";import{g as Y}from"../chunks/C0v9FrTH.js";import{w as U}from"../chunks/Cc0c675R.js";import{n as me}from"../chunks/HVmKTSmh.js";import{a as L}from"../chunks/Sk0ODu4Y.js";import{r as J}from"../chunks/BfEy5AjR.js";import{v as he}from"../chunks/D2C1YupD.js";import{insightsStore as q}from"../chunks/CB2-7g10.js";import{l as I,p as y,s as pe,r as fe}from"../chunks/D-yNNNdf.js";import{T as ve}from"../chunks/BYKARDRw.js";import{R as ge}from"../chunks/lsAKkphT.js";import{i as F}from"../chunks/vZ2iBqLE.js";var _e=z("<title> </title>"),be=z('<svg><!><path d="M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2ZM14,21.5908l-5-5L10.5906,15,14,18.4092,21.41,11l1.5957,1.5859Z"></path><path fill="none" d="M14 21.591 9 16.591 10.591 15 14 18.409 21.41 11 23.005 12.585 14 21.591z" data-icon-path="inner-path"></path></svg>');function we(v,o){const e=I(o,["children","$$slots","$$events","$$legacy"]),g=I(e,["size","title"]);E(o,!1);const a=x(),m=x();let d=y(o,"size",8,16),n=y(o,"title",8,void 0);$(()=>(f(e),f(n())),()=>{s(a,e["aria-label"]||e["aria-labelledby"]||n())}),$(()=>(t(a),f(e)),()=>{s(m,{"aria-hidden":t(a)?void 0:!0,role:t(a)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),T(),F();var i=be();D(i,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:d(),height:d(),...t(m),...g}));var r=w(i);{var p=l=>{var c=_e(),h=w(c,!0);M(c),C(()=>O(h,n())),_(l,c)};R(r,l=>{n()&&l(p)})}k(2),M(i),_(v,i),P()}var Me=z("<title> </title>"),$e=z('<svg><!><path fill="none" d="M14.9 7.2H17.1V24.799H14.9z" data-icon-path="inner-path" transform="rotate(-45 16 16)"></path><path d="M16,2A13.914,13.914,0,0,0,2,16,13.914,13.914,0,0,0,16,30,13.914,13.914,0,0,0,30,16,13.914,13.914,0,0,0,16,2Zm5.4449,21L9,10.5557,10.5557,9,23,21.4448Z"></path></svg>');function xe(v,o){const e=I(o,["children","$$slots","$$events","$$legacy"]),g=I(e,["size","title"]);E(o,!1);const a=x(),m=x();let d=y(o,"size",8,16),n=y(o,"title",8,void 0);$(()=>(f(e),f(n())),()=>{s(a,e["aria-label"]||e["aria-labelledby"]||n())}),$(()=>(t(a),f(e)),()=>{s(m,{"aria-hidden":t(a)?void 0:!0,role:t(a)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),T(),F();var i=$e();D(i,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:d(),height:d(),...t(m),...g}));var r=w(i);{var p=l=>{var c=Me(),h=w(c,!0);M(c),C(()=>O(h,n())),_(l,c)};R(r,l=>{n()&&l(p)})}k(2),M(i),_(v,i),P()}var Ie=z("<title> </title>"),ye=z('<svg><!><path fill="none" d="M16,8a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,16,8Zm4,13.875H17.125v-8H13v2.25h1.875v5.75H12v2.25h8Z" data-icon-path="inner-path"></path><path d="M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2Zm0,6a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,16,8Zm4,16.125H12v-2.25h2.875v-5.75H13v-2.25h4.125v8H20Z"></path></svg>');function ze(v,o){const e=I(o,["children","$$slots","$$events","$$legacy"]),g=I(e,["size","title"]);E(o,!1);const a=x(),m=x();let d=y(o,"size",8,16),n=y(o,"title",8,void 0);$(()=>(f(e),f(n())),()=>{s(a,e["aria-label"]||e["aria-labelledby"]||n())}),$(()=>(t(a),f(e)),()=>{s(m,{"aria-hidden":t(a)?void 0:!0,role:t(a)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),T(),F();var i=ye();D(i,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:d(),height:d(),...t(m),...g}));var r=w(i);{var p=l=>{var c=Ie(),h=w(c,!0);M(c),C(()=>O(h,n())),_(l,c)};R(r,l=>{n()&&l(p)})}k(2),M(i),_(v,i),P()}var Ae=z("<title> </title>"),Ee=z('<svg><!><path fill="none" d="M16,26a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,16,26Zm-1.125-5h2.25V12h-2.25Z" data-icon-path="inner-path"></path><path d="M16.002,6.1714h-.004L4.6487,27.9966,4.6506,28H27.3494l.0019-.0034ZM14.875,12h2.25v9h-2.25ZM16,26a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,16,26Z"></path><path d="M29,30H3a1,1,0,0,1-.8872-1.4614l13-25a1,1,0,0,1,1.7744,0l13,25A1,1,0,0,1,29,30ZM4.6507,28H27.3493l.002-.0033L16.002,6.1714h-.004L4.6487,27.9967Z"></path></svg>');function Pe(v,o){const e=I(o,["children","$$slots","$$events","$$legacy"]),g=I(e,["size","title"]);E(o,!1);const a=x(),m=x();let d=y(o,"size",8,16),n=y(o,"title",8,void 0);$(()=>(f(e),f(n())),()=>{s(a,e["aria-label"]||e["aria-labelledby"]||n())}),$(()=>(t(a),f(e)),()=>{s(m,{"aria-hidden":t(a)?void 0:!0,role:t(a)?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})}),T(),F();var i=Ee();D(i,()=>({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",preserveAspectRatio:"xMidYMid meet",width:d(),height:d(),...t(m),...g}));var r=w(i);{var p=l=>{var c=Ae(),h=w(c,!0);M(c),C(()=>O(h,n())),_(l,c)};R(r,l=>{n()&&l(p)})}k(3),M(i),_(v,i),P()}function Se(v,o){E(o,!0);const e=re("theme");let g=fe(o,["$$slots","$$events","$$legacy"]);ve(v,pe({get theme(){return e.current},class:"toaster group",style:"--normal-bg: var(--color-bg-elevated); --normal-text: var(--color-text-primary); --normal-border: var(--color-border-strong);"},()=>g,{loadingIcon:r=>{ge(r,{class:"size-4 animate-spin"})},successIcon:r=>{we(r,{class:"size-4"})},errorIcon:r=>{xe(r,{class:"size-4"})},infoIcon:r=>{ze(r,{class:"size-4"})},warningIcon:r=>{Pe(r,{class:"size-4"})},$$slots:{loadingIcon:!0,successIcon:!0,errorIcon:!0,infoIcon:!0,warningIcon:!0}})),P()}var Ze=te('<div style="display: contents;"><!> <!></div>');function Ge(v,o){E(o,!0);const e=typeof localStorage<"u"?localStorage.getItem("theme"):null,g=typeof window<"u"&&window.matchMedia?.("(prefers-color-scheme: light)").matches?"light":"dark";let a=V(B(e||g));G("theme",{get current(){return t(a)},toggle(){s(a,t(a)==="dark"?"light":"dark",!0),localStorage.setItem("theme",t(a))}});const d=typeof localStorage<"u"?localStorage.getItem("chatMode"):null,n=typeof localStorage<"u"?localStorage.getItem("chatOpen"):null,i=d==="panel"||d==="full"?d:d==="closed"?"closed":n==="true"?"panel":"closed";let r=V(B(i)),p=V(B(i==="closed"?"panel":i));function l(){localStorage.setItem("chatMode",t(r))}G("chat",{get open(){return t(r)!=="closed"},get mode(){return t(r)},toggle(){s(r,t(r)==="closed"?t(p):"closed",!0),l()},close(){s(r,"closed"),l()},expand(){s(r,"full"),s(p,"full"),l()},collapse(){s(r,"panel"),s(p,"panel"),l()},sendPrompt(u){t(r)==="closed"&&(s(r,t(p),!0),l()),A(()=>import("../chunks/DNldxAbC.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url).then(b=>{b.chatStore.send(u),setTimeout(()=>b.chatStore.triggerScroll(),100)})}}),N(()=>{document.documentElement.setAttribute("data-theme",t(a))}),N(()=>{q.briefLoaded&&U.applyUserAccentColor(q.accentColor)});let h=V(null);N(()=>{if(L.loading)return;const u=L.user?.email??(L.authEnabled?null:"__open__");u&&u!==t(h)&&(t(h)!==null&&me.deselect(),s(h,u,!0),U.load(),he.load(),q.load(),J.connect()),!u&&t(h)&&(s(h,null),J.disconnect())}),oe(async()=>{const u=window.location.pathname,b=u==="/login",S=u==="/setup",{authenticated:j,authEnabled:X,needsSetup:ee}=await L.checkAuth();if(ee&&!S){Y("/setup");return}if(X&&!j&&!b){Y("/login");return}if(j&&(b||S)){Y("/");return}b||S||(A(()=>import("../chunks/BB_5th5W.js"),__vite__mapDeps([6,7,8]),import.meta.url).catch(()=>{}),Promise.all([A(()=>import("../chunks/CX_61fY8.js"),[],import.meta.url),A(()=>import("../chunks/DnL9f0lc.js").then(Z=>Z.i),__vite__mapDeps([9,10]),import.meta.url),A(()=>import("../chunks/CscoF-YL.js"),__vite__mapDeps([11,10,9,12,13,14]),import.meta.url),A(()=>import("../chunks/D7ZqAKi9.js"),__vite__mapDeps([12,13,10,9]),import.meta.url),A(()=>import("../chunks/C7VoTosa.js").then(Z=>Z.i),[],import.meta.url)]).catch(()=>{}),window.addEventListener("sg-theme-change",Z=>{s(a,Z.detail,!0)}))});var H=Ze();ue("12qhfyh",u=>{ne(()=>{le.title=(U.name||"Studiograph")??""})});var W=w(H);{var K=u=>{var b=ae(),S=se(b);ce(S,()=>o.children),_(u,b)};R(W,u=>{L.loading||u(K)})}var Q=ie(W,2);Se(Q,{}),M(H),C(()=>de(H,"data-theme",t(a))),_(v,H),P()}export{Ge as component};
@@ -1 +1 @@
1
- import{a as u,b as h,s}from"../chunks/b0XUoOIH.js";import{i as g}from"../chunks/vZ2iBqLE.js";import{p as l,a0 as v,t as d,b as _,c as e,r as o,a3 as x}from"../chunks/DSh-OF2y.js";import{s as b,p}from"../chunks/BAAbylyg.js";const $={get error(){return p.error},get status(){return p.status}};b.updated.check;const m=$;var k=h("<h1> </h1> <p> </p>",1);function y(i,c){l(c,!1),g();var t=k(),r=v(t),n=e(r,!0);o(r);var a=x(r,2),f=e(a,!0);o(a),d(()=>{s(n,m.status),s(f,m.error?.message)}),u(i,t),_()}export{y as component};
1
+ import{a as u,b as h,s}from"../chunks/b0XUoOIH.js";import{i as g}from"../chunks/vZ2iBqLE.js";import{p as l,a0 as v,t as d,b as _,c as e,r as o,a3 as x}from"../chunks/DSh-OF2y.js";import{s as b,p}from"../chunks/C0v9FrTH.js";const $={get error(){return p.error},get status(){return p.status}};b.updated.check;const m=$;var k=h("<h1> </h1> <p> </p>",1);function y(i,c){l(c,!1),g();var t=k(),r=v(t),n=e(r,!0);o(r);var a=x(r,2),f=e(a,!0);o(a),d(()=>{s(n,m.status),s(f,m.error?.message)}),u(i,t),_()}export{y as component};
@@ -1 +1 @@
1
- import{g as H,a as w,t as J,s as $,b as I}from"../chunks/b0XUoOIH.js";import{p as K,t as q,b as M,ac as O,s as r,g as a,e as o,a3 as l,c as t,a4 as Q,ad as R,r as s,n as A}from"../chunks/DSh-OF2y.js";import{i as T}from"../chunks/DT3KtxWU.js";import{h as V}from"../chunks/B3NI-DOv.js";import{g as W}from"../chunks/BAAbylyg.js";import{a as B}from"../chunks/Sk0ODu4Y.js";import{w as X}from"../chunks/DSkxw4Ss.js";import{B as Z}from"../chunks/DQ5NTKSo.js";import{I as S}from"../chunks/APIqItee.js";var ee=I('<p class="error-msg svelte-g40i6i"> </p>'),ae=I('<div class="setup-page svelte-g40i6i"><div class="setup-card svelte-g40i6i"><div class="logo svelte-g40i6i"><div class="logo-icon svelte-g40i6i"> </div> <span class="logo-text svelte-g40i6i"> </span></div> <p class="subtitle svelte-g40i6i">Create your admin account to get started.</p> <form class="svelte-g40i6i"><label class="field svelte-g40i6i"><span class="field-label svelte-g40i6i">Name</span> <!></label> <label class="field svelte-g40i6i"><span class="field-label svelte-g40i6i">Email</span> <!></label> <label class="field svelte-g40i6i"><span class="field-label svelte-g40i6i">Password</span> <!> <span class="field-hint svelte-g40i6i">At least 8 characters</span></label> <!> <!></form></div></div>');function ve(P,D){K(D,!0);const n=Q(()=>B.workspaceName||"Studiograph");let u=o(""),v=o(""),d=o(""),p=o(""),c=o(!1);async function E(e){e.preventDefault(),r(p,""),r(c,!0);try{await B.setup(a(u),a(v),a(d)||void 0),X.load(),W("/")}catch(i){r(p,i.message||"Setup failed",!0)}finally{r(c,!1)}}var m=ae();V("g40i6i",e=>{O(()=>{R.title=`Setup — ${a(n)??""}`})});var k=t(m),f=t(k),g=t(f),L=t(g,!0);s(g);var C=l(g,2),U=t(C,!0);s(C),s(f);var b=l(f,4),_=t(b),Y=l(t(_),2);S(Y,{type:"text",placeholder:"Your name",autocomplete:"name",autofocus:!0,class:"field-input",get value(){return a(d)},set value(e){r(d,e,!0)}}),s(_);var h=l(_,2),j=l(t(h),2);S(j,{type:"email",required:!0,autocomplete:"email",class:"field-input",get value(){return a(u)},set value(e){r(u,e,!0)}}),s(h);var x=l(h,2),z=l(t(x),2);S(z,{type:"password",required:!0,minlength:8,autocomplete:"new-password",class:"field-input",get value(){return a(v)},set value(e){r(v,e,!0)}}),A(2),s(x);var N=l(x,2);{var F=e=>{var i=ee(),y=t(i,!0);s(i),q(()=>$(y,a(p))),w(e,i)};T(N,e=>{a(p)&&e(F)})}var G=l(N,2);Z(G,{variant:"accent",type:"submit",class:"submit-btn",get disabled(){return a(c)},children:(e,i)=>{A();var y=J("Create account");w(e,y)},$$slots:{default:!0}}),s(b),s(k),s(m),q(e=>{$(L,e),$(U,a(n))},[()=>a(n).charAt(0).toUpperCase()]),H("submit",b,E),w(P,m),M()}export{ve as component};
1
+ import{g as H,a as w,t as J,s as $,b as I}from"../chunks/b0XUoOIH.js";import{p as K,t as q,b as M,ac as O,s as r,g as a,e as o,a3 as l,c as t,a4 as Q,ad as R,r as s,n as A}from"../chunks/DSh-OF2y.js";import{i as T}from"../chunks/DT3KtxWU.js";import{h as V}from"../chunks/B3NI-DOv.js";import{g as W}from"../chunks/C0v9FrTH.js";import{a as B}from"../chunks/Sk0ODu4Y.js";import{w as X}from"../chunks/Cc0c675R.js";import{B as Z}from"../chunks/DQ5NTKSo.js";import{I as S}from"../chunks/APIqItee.js";var ee=I('<p class="error-msg svelte-g40i6i"> </p>'),ae=I('<div class="setup-page svelte-g40i6i"><div class="setup-card svelte-g40i6i"><div class="logo svelte-g40i6i"><div class="logo-icon svelte-g40i6i"> </div> <span class="logo-text svelte-g40i6i"> </span></div> <p class="subtitle svelte-g40i6i">Create your admin account to get started.</p> <form class="svelte-g40i6i"><label class="field svelte-g40i6i"><span class="field-label svelte-g40i6i">Name</span> <!></label> <label class="field svelte-g40i6i"><span class="field-label svelte-g40i6i">Email</span> <!></label> <label class="field svelte-g40i6i"><span class="field-label svelte-g40i6i">Password</span> <!> <span class="field-hint svelte-g40i6i">At least 8 characters</span></label> <!> <!></form></div></div>');function ve(P,D){K(D,!0);const n=Q(()=>B.workspaceName||"Studiograph");let u=o(""),v=o(""),d=o(""),p=o(""),c=o(!1);async function E(e){e.preventDefault(),r(p,""),r(c,!0);try{await B.setup(a(u),a(v),a(d)||void 0),X.load(),W("/")}catch(i){r(p,i.message||"Setup failed",!0)}finally{r(c,!1)}}var m=ae();V("g40i6i",e=>{O(()=>{R.title=`Setup — ${a(n)??""}`})});var k=t(m),f=t(k),g=t(f),L=t(g,!0);s(g);var C=l(g,2),U=t(C,!0);s(C),s(f);var b=l(f,4),_=t(b),Y=l(t(_),2);S(Y,{type:"text",placeholder:"Your name",autocomplete:"name",autofocus:!0,class:"field-input",get value(){return a(d)},set value(e){r(d,e,!0)}}),s(_);var h=l(_,2),j=l(t(h),2);S(j,{type:"email",required:!0,autocomplete:"email",class:"field-input",get value(){return a(u)},set value(e){r(u,e,!0)}}),s(h);var x=l(h,2),z=l(t(x),2);S(z,{type:"password",required:!0,minlength:8,autocomplete:"new-password",class:"field-input",get value(){return a(v)},set value(e){r(v,e,!0)}}),A(2),s(x);var N=l(x,2);{var F=e=>{var i=ee(),y=t(i,!0);s(i),q(()=>$(y,a(p))),w(e,i)};T(N,e=>{a(p)&&e(F)})}var G=l(N,2);Z(G,{variant:"accent",type:"submit",class:"submit-btn",get disabled(){return a(c)},children:(e,i)=>{A();var y=J("Create account");w(e,y)},$$slots:{default:!0}}),s(b),s(k),s(m),q(e=>{$(L,e),$(U,a(n))},[()=>a(n).charAt(0).toUpperCase()]),H("submit",b,E),w(P,m),M()}export{ve as component};