@shahmilsaari/memory-core 1.0.8 → 1.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js
CHANGED
|
@@ -2362,7 +2362,7 @@ program.command("stats").description("Show violation counters recorded by check
|
|
|
2362
2362
|
}
|
|
2363
2363
|
});
|
|
2364
2364
|
program.command("dashboard").description("Start the live Svelte dashboard with WebSocket watch events").option("-p, --port <port>", "Dashboard port", "5178").option("--path <dir>", "Directory to watch (default: current directory)").option("--no-watch", "Serve the dashboard without starting file watch").action(async (opts) => {
|
|
2365
|
-
const { startDashboard } = await import("./dashboard-server-
|
|
2365
|
+
const { startDashboard } = await import("./dashboard-server-46IGUJ4H.js");
|
|
2366
2366
|
await startDashboard({
|
|
2367
2367
|
port: parseInt(opts.port, 10),
|
|
2368
2368
|
path: opts.path,
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var Bl=Object.defineProperty;var Yn=e=>{throw TypeError(e)};var Kl=(e,t,r)=>t in e?Bl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var je=(e,t,r)=>Kl(e,typeof t!="symbol"?t+"":t,r),ls=(e,t,r)=>t.has(e)||Yn("Cannot "+r);var c=(e,t,r)=>(ls(e,t,"read from private field"),r?r.call(e):t.get(e)),M=(e,t,r)=>t.has(e)?Yn("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),D=(e,t,r,s)=>(ls(e,t,"write to private field"),s?s.call(e,r):t.set(e,r),r),q=(e,t,r)=>(ls(e,t,"access private method"),r);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))s(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const u of i.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&s(u)}).observe(document,{childList:!0,subtree:!0});function r(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function s(a){if(a.ep)return;a.ep=!0;const i=r(a);fetch(a.href,i)}})();const Yl=!1;var As=Array.isArray,Gl=Array.prototype.indexOf,Jt=Array.prototype.includes,Br=Array.from,Jl=Object.defineProperty,ur=Object.getOwnPropertyDescriptor,pa=Object.getOwnPropertyDescriptors,Ql=Object.prototype,Xl=Array.prototype,Cs=Object.getPrototypeOf,Gn=Object.isExtensible;const Zl=()=>{};function eo(e){return e()}function vs(e){for(var t=0;t<e.length;t++)e[t]()}function _a(){var e,t,r=new Promise((s,a)=>{e=s,t=a});return{promise:r,resolve:e,reject:t}}const oe=2,Qt=4,xr=8,ha=1<<24,Je=16,We=32,ht=64,ps=128,Re=512,Z=1024,ae=2048,Ve=4096,ue=8192,Ne=16384,jt=32768,Jn=1<<25,Xt=65536,_s=1<<17,to=1<<18,tr=1<<19,ga=1<<20,Ge=1<<25,Dt=65536,Vr=1<<21,_r=1<<22,pt=1<<23,Ct=Symbol("$state"),et=new class extends Error{constructor(){super(...arguments);je(this,"name","StaleReactionError");je(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};function ba(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function ro(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function so(e,t,r){throw new Error("https://svelte.dev/e/each_key_duplicate")}function no(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function ao(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function io(e){throw new Error("https://svelte.dev/e/effect_orphan")}function lo(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function oo(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function co(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function fo(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function uo(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const vo=1,po=2,ma=4,_o=8,ho=16,go=2,re=Symbol(),ya="http://www.w3.org/1999/xhtml";function bo(){console.warn("https://svelte.dev/e/derived_inert")}function mo(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function yo(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function wa(e){return e===this.v}function wo(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Ea(e){return!wo(e,this.v)}let kr=!1,Eo=!1;function xo(){kr=!0}let B=null;function Zt(e){B=e}function xa(e,t=!1,r){B={p:B,i:!1,c:null,e:null,s:e,x:null,r:F,l:kr&&!t?{s:null,u:null,$:[]}:null}}function ka(e){var t=B,r=t.e;if(r!==null){t.e=null;for(var s of r)Ha(s)}return t.i=!0,B=t.p,{}}function Sr(){return!kr||B!==null&&B.l===null}let wt=[];function Sa(){var e=wt;wt=[],vs(e)}function _t(e){if(wt.length===0&&!dr){var t=wt;queueMicrotask(()=>{t===wt&&Sa()})}wt.push(e)}function ko(){for(;wt.length>0;)Sa()}function Ta(e){var t=F;if(t===null)return O.f|=pt,e;if(!(t.f&jt)&&!(t.f&Qt))throw e;vt(e,t)}function vt(e,t){for(;t!==null;){if(t.f&ps){if(!(t.f&jt))throw e;try{t.b.error(e);return}catch(r){e=r}}t=t.parent}throw e}const So=-7169;function J(e,t){e.f=e.f&So|t}function Rs(e){e.f&Re||e.deps===null?J(e,Z):J(e,Ve)}function Aa(e){if(e!==null)for(const t of e)!(t.f&oe)||!(t.f&Dt)||(t.f^=Dt,Aa(t.deps))}function Ca(e,t,r){e.f&ae?t.add(e):e.f&Ve&&r.add(e),Aa(e.deps),J(e,Z)}const yt=new Set;let T=null,ne=null,hs=null,dr=!1,os=!1,zt=null,Or=null;var Qn=0;let To=1;var Ht,Bt,xt,tt,Be,gr,be,br,ut,rt,Ke,Kt,Yt,kt,ee,Ir,Ra,jr,gs,Lr,Ao;const Ur=class Ur{constructor(){M(this,ee);je(this,"id",To++);je(this,"current",new Map);je(this,"previous",new Map);M(this,Ht,new Set);M(this,Bt,new Set);M(this,xt,new Set);M(this,tt,new Map);M(this,Be,new Map);M(this,gr,null);M(this,be,[]);M(this,br,[]);M(this,ut,new Set);M(this,rt,new Set);M(this,Ke,new Map);M(this,Kt,new Set);je(this,"is_fork",!1);M(this,Yt,!1);M(this,kt,new Set)}skip_effect(t){c(this,Ke).has(t)||c(this,Ke).set(t,{d:[],m:[]}),c(this,Kt).delete(t)}unskip_effect(t,r=s=>this.schedule(s)){var s=c(this,Ke).get(t);if(s){c(this,Ke).delete(t);for(var a of s.d)J(a,ae),r(a);for(a of s.m)J(a,Ve),r(a)}c(this,Kt).add(t)}capture(t,r,s=!1){t.v!==re&&!this.previous.has(t)&&this.previous.set(t,t.v),t.f&pt||(this.current.set(t,[r,s]),ne==null||ne.set(t,r)),this.is_fork||(t.v=r)}activate(){T=this}deactivate(){T=null,ne=null}flush(){try{os=!0,T=this,q(this,ee,jr).call(this)}finally{Qn=0,hs=null,zt=null,Or=null,os=!1,T=null,ne=null,Rt.clear()}}discard(){for(const t of c(this,Bt))t(this);c(this,Bt).clear(),c(this,xt).clear(),yt.delete(this)}register_created_effect(t){c(this,br).push(t)}increment(t,r){let s=c(this,tt).get(r)??0;if(c(this,tt).set(r,s+1),t){let a=c(this,Be).get(r)??0;c(this,Be).set(r,a+1)}}decrement(t,r,s){let a=c(this,tt).get(r)??0;if(a===1?c(this,tt).delete(r):c(this,tt).set(r,a-1),t){let i=c(this,Be).get(r)??0;i===1?c(this,Be).delete(r):c(this,Be).set(r,i-1)}c(this,Yt)||s||(D(this,Yt,!0),_t(()=>{D(this,Yt,!1),this.flush()}))}transfer_effects(t,r){for(const s of t)c(this,ut).add(s);for(const s of r)c(this,rt).add(s);t.clear(),r.clear()}oncommit(t){c(this,Ht).add(t)}ondiscard(t){c(this,Bt).add(t)}on_fork_commit(t){c(this,xt).add(t)}run_fork_commit_callbacks(){for(const t of c(this,xt))t(this);c(this,xt).clear()}settled(){return(c(this,gr)??D(this,gr,_a())).promise}static ensure(){if(T===null){const t=T=new Ur;os||(yt.add(T),dr||_t(()=>{T===t&&t.flush()}))}return T}apply(){{ne=null;return}}schedule(t){var a;if(hs=t,(a=t.b)!=null&&a.is_pending&&t.f&(Qt|xr|ha)&&!(t.f&jt)){t.b.defer_effect(t);return}for(var r=t;r.parent!==null;){r=r.parent;var s=r.f;if(zt!==null&&r===F&&(O===null||!(O.f&oe)))return;if(s&(ht|We)){if(!(s&Z))return;r.f^=Z}}c(this,be).push(r)}};Ht=new WeakMap,Bt=new WeakMap,xt=new WeakMap,tt=new WeakMap,Be=new WeakMap,gr=new WeakMap,be=new WeakMap,br=new WeakMap,ut=new WeakMap,rt=new WeakMap,Ke=new WeakMap,Kt=new WeakMap,Yt=new WeakMap,kt=new WeakMap,ee=new WeakSet,Ir=function(){return this.is_fork||c(this,Be).size>0},Ra=function(){for(const s of c(this,kt))for(const a of c(s,Be).keys()){for(var t=!1,r=a;r.parent!==null;){if(c(this,Ke).has(r)){t=!0;break}r=r.parent}if(!t)return!0}return!1},jr=function(){var v,d;if(Qn++>1e3&&(yt.delete(this),Ro()),!q(this,ee,Ir).call(this)){for(const p of c(this,ut))c(this,rt).delete(p),J(p,ae),this.schedule(p);for(const p of c(this,rt))J(p,Ve),this.schedule(p)}const t=c(this,be);D(this,be,[]),this.apply();var r=zt=[],s=[],a=Or=[];for(const p of t)try{q(this,ee,gs).call(this,p,r,s)}catch(g){throw Da(p),g}if(T=null,a.length>0){var i=Ur.ensure();for(const p of a)i.schedule(p)}if(zt=null,Or=null,q(this,ee,Ir).call(this)||q(this,ee,Ra).call(this)){q(this,ee,Lr).call(this,s),q(this,ee,Lr).call(this,r);for(const[p,g]of c(this,Ke))Ma(p,g)}else{c(this,tt).size===0&&yt.delete(this),c(this,ut).clear(),c(this,rt).clear();for(const p of c(this,Ht))p(this);c(this,Ht).clear(),Xn(s),Xn(r),(v=c(this,gr))==null||v.resolve()}var u=T;if(c(this,be).length>0){const p=u??(u=this);c(p,be).push(...c(this,be).filter(g=>!c(p,be).includes(g)))}u!==null&&(yt.add(u),q(d=u,ee,jr).call(d))},gs=function(t,r,s){t.f^=Z;for(var a=t.first;a!==null;){var i=a.f,u=(i&(We|ht))!==0,v=u&&(i&Z)!==0,d=v||(i&ue)!==0||c(this,Ke).has(a);if(!d&&a.fn!==null){u?a.f^=Z:i&Qt?r.push(a):rr(a)&&(i&Je&&c(this,rt).add(a),It(a));var p=a.first;if(p!==null){a=p;continue}}for(;a!==null;){var g=a.next;if(g!==null){a=g;break}a=a.parent}}},Lr=function(t){for(var r=0;r<t.length;r+=1)Ca(t[r],c(this,ut),c(this,rt))},Ao=function(){var g,x,w;for(const y of yt){var t=y.id<this.id,r=[];for(const[o,[A,m]]of this.current){if(y.current.has(o)){var s=y.current.get(o)[0];if(t&&A!==s)y.current.set(o,[A,m]);else continue}r.push(o)}var a=[...y.current.keys()].filter(o=>!this.current.has(o));if(a.length===0)t&&y.discard();else if(r.length>0){if(t)for(const o of c(this,Kt))y.unskip_effect(o,A=>{var m;A.f&(Je|_r)?y.schedule(A):q(m=y,ee,Lr).call(m,[A])});y.activate();var i=new Set,u=new Map;for(var v of r)Na(v,a,i,u);u=new Map;var d=[...y.current.keys()].filter(o=>this.current.has(o)?this.current.get(o)[0]!==o:!0);for(const o of c(this,br))!(o.f&(Ne|ue|_s))&&Ns(o,d,u)&&(o.f&(_r|Je)?(J(o,ae),y.schedule(o)):c(y,ut).add(o));if(c(y,be).length>0){y.apply();for(var p of c(y,be))q(g=y,ee,gs).call(g,p,[],[]);D(y,be,[])}y.deactivate()}}for(const y of yt)c(y,kt).has(this)&&(c(y,kt).delete(this),c(y,kt).size===0&&!q(x=y,ee,Ir).call(x)&&(y.activate(),q(w=y,ee,jr).call(w)))};let Ft=Ur;function Co(e){var t=dr;dr=!0;try{for(var r;;){if(ko(),T===null)return r;T.flush()}}finally{dr=t}}function Ro(){try{lo()}catch(e){vt(e,hs)}}let Le=null;function Xn(e){var t=e.length;if(t!==0){for(var r=0;r<t;){var s=e[r++];if(!(s.f&(Ne|ue))&&rr(s)&&(Le=new Set,It(s),s.deps===null&&s.first===null&&s.nodes===null&&s.teardown===null&&s.ac===null&&Ka(s),(Le==null?void 0:Le.size)>0)){Rt.clear();for(const a of Le){if(a.f&(Ne|ue))continue;const i=[a];let u=a.parent;for(;u!==null;)Le.has(u)&&(Le.delete(u),i.push(u)),u=u.parent;for(let v=i.length-1;v>=0;v--){const d=i[v];d.f&(Ne|ue)||It(d)}}Le.clear()}}Le=null}}function Na(e,t,r,s){if(!r.has(e)&&(r.add(e),e.reactions!==null))for(const a of e.reactions){const i=a.f;i&oe?Na(a,t,r,s):i&(_r|Je)&&!(i&ae)&&Ns(a,t,s)&&(J(a,ae),Ms(a))}}function Ns(e,t,r){const s=r.get(e);if(s!==void 0)return s;if(e.deps!==null)for(const a of e.deps){if(Jt.call(t,a))return!0;if(a.f&oe&&Ns(a,t,r))return r.set(a,!0),!0}return r.set(e,!1),!1}function Ms(e){T.schedule(e)}function Ma(e,t){if(!(e.f&We&&e.f&Z)){e.f&ae?t.d.push(e):e.f&Ve&&t.m.push(e),J(e,Z);for(var r=e.first;r!==null;)Ma(r,t),r=r.next}}function Da(e){J(e,Z);for(var t=e.first;t!==null;)Da(t),t=t.next}function No(e){let t=0,r=Ot(0),s;return()=>{Is()&&(n(r),Yr(()=>(t===0&&(s=b(()=>e(()=>vr(r)))),t+=1,()=>{_t(()=>{t-=1,t===0&&(s==null||s(),s=void 0,vr(r))})})))}}var Mo=Xt|tr;function Do(e,t,r,s){new Fo(e,t,r,s)}var Se,Ts,Te,St,ve,Ae,fe,me,st,Tt,dt,Gt,mr,yr,nt,zr,Q,Oo,Io,jo,bs,Pr,$r,ms,ys;class Fo{constructor(t,r,s,a){M(this,Q);je(this,"parent");je(this,"is_pending",!1);je(this,"transform_error");M(this,Se);M(this,Ts,null);M(this,Te);M(this,St);M(this,ve);M(this,Ae,null);M(this,fe,null);M(this,me,null);M(this,st,null);M(this,Tt,0);M(this,dt,0);M(this,Gt,!1);M(this,mr,new Set);M(this,yr,new Set);M(this,nt,null);M(this,zr,No(()=>(D(this,nt,Ot(c(this,Tt))),()=>{D(this,nt,null)})));var i;D(this,Se,t),D(this,Te,r),D(this,St,u=>{var v=F;v.b=this,v.f|=ps,s(u)}),this.parent=F.b,this.transform_error=a??((i=this.parent)==null?void 0:i.transform_error)??(u=>u),D(this,ve,Ls(()=>{q(this,Q,bs).call(this)},Mo))}defer_effect(t){Ca(t,c(this,mr),c(this,yr))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!c(this,Te).pending}update_pending_count(t,r){q(this,Q,ms).call(this,t,r),D(this,Tt,c(this,Tt)+t),!(!c(this,nt)||c(this,Gt))&&(D(this,Gt,!0),_t(()=>{D(this,Gt,!1),c(this,nt)&&er(c(this,nt),c(this,Tt))}))}get_effect_pending(){return c(this,zr).call(this),n(c(this,nt))}error(t){if(!c(this,Te).onerror&&!c(this,Te).failed)throw t;T!=null&&T.is_fork?(c(this,Ae)&&T.skip_effect(c(this,Ae)),c(this,fe)&&T.skip_effect(c(this,fe)),c(this,me)&&T.skip_effect(c(this,me)),T.on_fork_commit(()=>{q(this,Q,ys).call(this,t)})):q(this,Q,ys).call(this,t)}}Se=new WeakMap,Ts=new WeakMap,Te=new WeakMap,St=new WeakMap,ve=new WeakMap,Ae=new WeakMap,fe=new WeakMap,me=new WeakMap,st=new WeakMap,Tt=new WeakMap,dt=new WeakMap,Gt=new WeakMap,mr=new WeakMap,yr=new WeakMap,nt=new WeakMap,zr=new WeakMap,Q=new WeakSet,Oo=function(){try{D(this,Ae,Ce(()=>c(this,St).call(this,c(this,Se))))}catch(t){this.error(t)}},Io=function(t){const r=c(this,Te).failed;r&&D(this,me,Ce(()=>{r(c(this,Se),()=>t,()=>()=>{})}))},jo=function(){const t=c(this,Te).pending;t&&(this.is_pending=!0,D(this,fe,Ce(()=>t(c(this,Se)))),_t(()=>{var r=D(this,st,document.createDocumentFragment()),s=at();r.append(s),D(this,Ae,q(this,Q,$r).call(this,()=>Ce(()=>c(this,St).call(this,s)))),c(this,dt)===0&&(c(this,Se).before(r),D(this,st,null),Nt(c(this,fe),()=>{D(this,fe,null)}),q(this,Q,Pr).call(this,T))}))},bs=function(){try{if(this.is_pending=this.has_pending_snippet(),D(this,dt,0),D(this,Tt,0),D(this,Ae,Ce(()=>{c(this,St).call(this,c(this,Se))})),c(this,dt)>0){var t=D(this,st,document.createDocumentFragment());Ws(c(this,Ae),t);const r=c(this,Te).pending;D(this,fe,Ce(()=>r(c(this,Se))))}else q(this,Q,Pr).call(this,T)}catch(r){this.error(r)}},Pr=function(t){this.is_pending=!1,t.transfer_effects(c(this,mr),c(this,yr))},$r=function(t){var r=F,s=O,a=B;Fe(c(this,ve)),De(c(this,ve)),Zt(c(this,ve).ctx);try{return Ft.ensure(),t()}catch(i){return Ta(i),null}finally{Fe(r),De(s),Zt(a)}},ms=function(t,r){var s;if(!this.has_pending_snippet()){this.parent&&q(s=this.parent,Q,ms).call(s,t,r);return}D(this,dt,c(this,dt)+t),c(this,dt)===0&&(q(this,Q,Pr).call(this,r),c(this,fe)&&Nt(c(this,fe),()=>{D(this,fe,null)}),c(this,st)&&(c(this,Se).before(c(this,st)),D(this,st,null)))},ys=function(t){c(this,Ae)&&(_e(c(this,Ae)),D(this,Ae,null)),c(this,fe)&&(_e(c(this,fe)),D(this,fe,null)),c(this,me)&&(_e(c(this,me)),D(this,me,null));var r=c(this,Te).onerror;let s=c(this,Te).failed;var a=!1,i=!1;const u=()=>{if(a){yo();return}a=!0,i&&uo(),c(this,me)!==null&&Nt(c(this,me),()=>{D(this,me,null)}),q(this,Q,$r).call(this,()=>{q(this,Q,bs).call(this)})},v=d=>{try{i=!0,r==null||r(d,u),i=!1}catch(p){vt(p,c(this,ve)&&c(this,ve).parent)}s&&D(this,me,q(this,Q,$r).call(this,()=>{try{return Ce(()=>{var p=F;p.b=this,p.f|=ps,s(c(this,Se),()=>d,()=>u)})}catch(p){return vt(p,c(this,ve).parent),null}}))};_t(()=>{var d;try{d=this.transform_error(t)}catch(p){vt(p,c(this,ve)&&c(this,ve).parent);return}d!==null&&typeof d=="object"&&typeof d.then=="function"?d.then(v,p=>vt(p,c(this,ve)&&c(this,ve).parent)):v(d)})};function Lo(e,t,r,s){const a=Sr()?Ds:Oa;var i=e.filter(w=>!w.settled);if(r.length===0&&i.length===0){s(t.map(a));return}var u=F,v=Po(),d=i.length===1?i[0].promise:i.length>1?Promise.all(i.map(w=>w.promise)):null;function p(w){v();try{s(w)}catch(y){u.f&Ne||vt(y,u)}qr()}if(r.length===0){d.then(()=>p(t.map(a)));return}var g=Fa();function x(){Promise.all(r.map(w=>$o(w))).then(w=>p([...t.map(a),...w])).catch(w=>vt(w,u)).finally(()=>g())}d?d.then(()=>{v(),x(),qr()}):x()}function Po(){var e=F,t=O,r=B,s=T;return function(i=!0){Fe(e),De(t),Zt(r),i&&!(e.f&Ne)&&(s==null||s.activate(),s==null||s.apply())}}function qr(e=!0){Fe(null),De(null),Zt(null),e&&(T==null||T.deactivate())}function Fa(){var e=F,t=e.b,r=T,s=t.is_rendered();return t.update_pending_count(1,r),r.increment(s,e),(a=!1)=>{t.update_pending_count(-1,r),r.decrement(s,e,a)}}function Ds(e){var t=oe|ae;return F!==null&&(F.f|=tr),{ctx:B,deps:null,effects:null,equals:wa,f:t,fn:e,reactions:null,rv:0,v:re,wv:0,parent:F,ac:null}}function $o(e,t,r){let s=F;s===null&&ro();var a=void 0,i=Ot(re),u=!O,v=new Map;return ec(()=>{var y;var d=F,p=_a();a=p.promise;try{Promise.resolve(e()).then(p.resolve,p.reject).finally(qr)}catch(o){p.reject(o),qr()}var g=T;if(u){if(d.f&jt)var x=Fa();if(s.b.is_rendered())(y=v.get(g))==null||y.reject(et),v.delete(g);else{for(const o of v.values())o.reject(et);v.clear()}v.set(g,p)}const w=(o,A=void 0)=>{if(x){var m=A===et;x(m)}if(!(A===et||d.f&Ne)){if(g.activate(),A)i.f|=pt,er(i,A);else{i.f&pt&&(i.f^=pt),er(i,o);for(const[C,W]of v){if(v.delete(C),C===g)break;W.reject(et)}}g.deactivate()}};p.promise.then(w,o=>w(null,o||"unknown"))}),js(()=>{for(const d of v.values())d.reject(et)}),new Promise(d=>{function p(g){function x(){g===a?d(i):p(a)}g.then(x,x)}p(a)})}function Oa(e){const t=Ds(e);return t.equals=Ea,t}function Wo(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)_e(t[r])}}function Fs(e){var t,r=F,s=e.parent;if(!gt&&s!==null&&s.f&(Ne|ue))return bo(),e.v;Fe(s);try{e.f&=~Dt,Wo(e),t=Za(e)}finally{Fe(r)}return t}function Ia(e){var t=Fs(e);if(!e.equals(t)&&(e.wv=Qa(),(!(T!=null&&T.is_fork)||e.deps===null)&&(T!==null?T.capture(e,t,!0):e.v=t,e.deps===null))){J(e,Z);return}gt||(ne!==null?(Is()||T!=null&&T.is_fork)&&ne.set(e,t):Rs(e))}function Vo(e){var t,r;if(e.effects!==null)for(const s of e.effects)(s.teardown||s.ac)&&((t=s.teardown)==null||t.call(s),(r=s.ac)==null||r.abort(et),s.teardown=Zl,s.ac=null,hr(s,0),Ps(s))}function ja(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&It(t)}let ws=new Set;const Rt=new Map;let La=!1;function Ot(e,t){var r={f:0,v:e,reactions:null,equals:wa,rv:0,wv:0};return r}function ct(e,t){const r=Ot(e);return sc(r),r}function X(e,t=!1,r=!0){var a;const s=Ot(e);return t||(s.equals=Ea),kr&&r&&B!==null&&B.l!==null&&((a=B.l).s??(a.s=[])).push(s),s}function ir(e,t){return N(e,b(()=>n(e))),t}function N(e,t,r=!1){O!==null&&(!$e||O.f&_s)&&Sr()&&O.f&(oe|Je|_r|_s)&&(Me===null||!Jt.call(Me,e))&&fo();let s=r?cr(t):t;return er(e,s,Or)}function er(e,t,r=null){if(!e.equals(t)){Rt.set(e,gt?t:e.v);var s=Ft.ensure();if(s.capture(e,t),e.f&oe){const a=e;e.f&ae&&Fs(a),ne===null&&Rs(a)}e.wv=Qa(),Pa(e,ae,r),Sr()&&F!==null&&F.f&Z&&!(F.f&(We|ht))&&(ke===null?nc([e]):ke.push(e)),!s.is_fork&&ws.size>0&&!La&&qo()}return t}function qo(){La=!1;for(const e of ws)e.f&Z&&J(e,Ve),rr(e)&&It(e);ws.clear()}function vr(e){N(e,e.v+1)}function Pa(e,t,r){var s=e.reactions;if(s!==null)for(var a=Sr(),i=s.length,u=0;u<i;u++){var v=s[u],d=v.f;if(!(!a&&v===F)){var p=(d&ae)===0;if(p&&J(v,t),d&oe){var g=v;ne==null||ne.delete(g),d&Dt||(d&Re&&(F===null||!(F.f&Vr))&&(v.f|=Dt),Pa(g,Ve,r))}else if(p){var x=v;d&Je&&Le!==null&&Le.add(x),r!==null?r.push(x):Ms(x)}}}}function cr(e){if(typeof e!="object"||e===null||Ct in e)return e;const t=Cs(e);if(t!==Ql&&t!==Xl)return e;var r=new Map,s=As(e),a=ct(0),i=Mt,u=v=>{if(Mt===i)return v();var d=O,p=Mt;De(null),sa(i);var g=v();return De(d),sa(p),g};return s&&r.set("length",ct(e.length)),new Proxy(e,{defineProperty(v,d,p){(!("value"in p)||p.configurable===!1||p.enumerable===!1||p.writable===!1)&&oo();var g=r.get(d);return g===void 0?u(()=>{var x=ct(p.value);return r.set(d,x),x}):N(g,p.value,!0),!0},deleteProperty(v,d){var p=r.get(d);if(p===void 0){if(d in v){const g=u(()=>ct(re));r.set(d,g),vr(a)}}else N(p,re),vr(a);return!0},get(v,d,p){var y;if(d===Ct)return e;var g=r.get(d),x=d in v;if(g===void 0&&(!x||(y=ur(v,d))!=null&&y.writable)&&(g=u(()=>{var o=cr(x?v[d]:re),A=ct(o);return A}),r.set(d,g)),g!==void 0){var w=n(g);return w===re?void 0:w}return Reflect.get(v,d,p)},getOwnPropertyDescriptor(v,d){var p=Reflect.getOwnPropertyDescriptor(v,d);if(p&&"value"in p){var g=r.get(d);g&&(p.value=n(g))}else if(p===void 0){var x=r.get(d),w=x==null?void 0:x.v;if(x!==void 0&&w!==re)return{enumerable:!0,configurable:!0,value:w,writable:!0}}return p},has(v,d){var w;if(d===Ct)return!0;var p=r.get(d),g=p!==void 0&&p.v!==re||Reflect.has(v,d);if(p!==void 0||F!==null&&(!g||(w=ur(v,d))!=null&&w.writable)){p===void 0&&(p=u(()=>{var y=g?cr(v[d]):re,o=ct(y);return o}),r.set(d,p));var x=n(p);if(x===re)return!1}return g},set(v,d,p,g){var L;var x=r.get(d),w=d in v;if(s&&d==="length")for(var y=p;y<x.v;y+=1){var o=r.get(y+"");o!==void 0?N(o,re):y in v&&(o=u(()=>ct(re)),r.set(y+"",o))}if(x===void 0)(!w||(L=ur(v,d))!=null&&L.writable)&&(x=u(()=>ct(void 0)),N(x,cr(p)),r.set(d,x));else{w=x.v!==re;var A=u(()=>cr(p));N(x,A)}var m=Reflect.getOwnPropertyDescriptor(v,d);if(m!=null&&m.set&&m.set.call(g,p),!w){if(s&&typeof d=="string"){var C=r.get("length"),W=Number(d);Number.isInteger(W)&&W>=C.v&&N(C,W+1)}vr(a)}return!0},ownKeys(v){n(a);var d=Reflect.ownKeys(v).filter(x=>{var w=r.get(x);return w===void 0||w.v!==re});for(var[p,g]of r)g.v!==re&&!(p in v)&&d.push(p);return d},setPrototypeOf(){co()}})}function Zn(e){try{if(e!==null&&typeof e=="object"&&Ct in e)return e[Ct]}catch{}return e}function Uo(e,t){return Object.is(Zn(e),Zn(t))}var ea,$a,Wa,Va;function zo(){if(ea===void 0){ea=window,$a=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;Wa=ur(t,"firstChild").get,Va=ur(t,"nextSibling").get,Gn(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),Gn(r)&&(r.__t=void 0)}}function at(e=""){return document.createTextNode(e)}function Os(e){return Wa.call(e)}function Tr(e){return Va.call(e)}function _(e,t){return Os(e)}function Ho(e,t=!1){{var r=Os(e);return r instanceof Comment&&r.data===""?Tr(r):r}}function h(e,t=1,r=!1){let s=e;for(;t--;)s=Tr(s);return s}function Bo(e){e.textContent=""}function qa(){return!1}function Ko(e,t,r){return document.createElementNS(ya,e,void 0)}let ta=!1;function Yo(){ta||(ta=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{var t;if(!e.defaultPrevented)for(const r of e.target.elements)(t=r.__on_r)==null||t.call(r)})},{capture:!0}))}function Kr(e){var t=O,r=F;De(null),Fe(null);try{return e()}finally{De(t),Fe(r)}}function Ua(e,t,r,s=r){e.addEventListener(t,()=>Kr(r));const a=e.__on_r;a?e.__on_r=()=>{a(),s(!0)}:e.__on_r=()=>s(!0),Yo()}function za(e){F===null&&(O===null&&io(),ao()),gt&&no()}function Go(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function Qe(e,t){var r=F;r!==null&&r.f&ue&&(e|=ue);var s={ctx:B,deps:null,nodes:null,f:e|ae|Re,first:null,fn:t,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};T==null||T.register_created_effect(s);var a=s;if(e&Qt)zt!==null?zt.push(s):Ft.ensure().schedule(s);else if(t!==null){try{It(s)}catch(u){throw _e(s),u}a.deps===null&&a.teardown===null&&a.nodes===null&&a.first===a.last&&!(a.f&tr)&&(a=a.first,e&Je&&e&Xt&&a!==null&&(a.f|=Xt))}if(a!==null&&(a.parent=r,r!==null&&Go(a,r),O!==null&&O.f&oe&&!(e&ht))){var i=O;(i.effects??(i.effects=[])).push(a)}return s}function Is(){return O!==null&&!$e}function js(e){const t=Qe(xr,null);return J(t,Z),t.teardown=e,t}function Es(e){za();var t=F.f,r=!O&&(t&We)!==0&&(t&jt)===0;if(r){var s=B;(s.e??(s.e=[])).push(e)}else return Ha(e)}function Ha(e){return Qe(Qt|ga,e)}function Jo(e){return za(),Qe(xr|ga,e)}function Qo(e){Ft.ensure();const t=Qe(ht|tr,e);return(r={})=>new Promise(s=>{r.outro?Nt(t,()=>{_e(t),s(void 0)}):(_e(t),s(void 0))})}function Xo(e){return Qe(Qt,e)}function xe(e,t){var r=B,s={effect:null,ran:!1,deps:e};r.l.$.push(s),s.effect=Yr(()=>{if(e(),!s.ran){s.ran=!0;var a=F;try{Fe(a.parent),b(t)}finally{Fe(a)}}})}function Zo(){var e=B;Yr(()=>{for(var t of e.l.$){t.deps();var r=t.effect;r.f&Z&&r.deps!==null&&J(r,Ve),rr(r)&&It(r),t.ran=!1}})}function ec(e){return Qe(_r|tr,e)}function Yr(e,t=0){return Qe(xr|t,e)}function U(e,t=[],r=[],s=[]){Lo(s,t,r,a=>{Qe(xr,()=>e(...a.map(n)))})}function Ls(e,t=0){var r=Qe(Je|t,e);return r}function Ce(e){return Qe(We|tr,e)}function Ba(e){var t=e.teardown;if(t!==null){const r=gt,s=O;ra(!0),De(null);try{t.call(null)}finally{ra(r),De(s)}}}function Ps(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){const a=r.ac;a!==null&&Kr(()=>{a.abort(et)});var s=r.next;r.f&ht?r.parent=null:_e(r,t),r=s}}function tc(e){for(var t=e.first;t!==null;){var r=t.next;t.f&We||_e(t),t=r}}function _e(e,t=!0){var r=!1;(t||e.f&to)&&e.nodes!==null&&e.nodes.end!==null&&(rc(e.nodes.start,e.nodes.end),r=!0),J(e,Jn),Ps(e,t&&!r),hr(e,0);var s=e.nodes&&e.nodes.t;if(s!==null)for(const i of s)i.stop();Ba(e),e.f^=Jn,e.f|=Ne;var a=e.parent;a!==null&&a.first!==null&&Ka(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function rc(e,t){for(;e!==null;){var r=e===t?null:Tr(e);e.remove(),e=r}}function Ka(e){var t=e.parent,r=e.prev,s=e.next;r!==null&&(r.next=s),s!==null&&(s.prev=r),t!==null&&(t.first===e&&(t.first=s),t.last===e&&(t.last=r))}function Nt(e,t,r=!0){var s=[];Ya(e,s,!0);var a=()=>{r&&_e(e),t&&t()},i=s.length;if(i>0){var u=()=>--i||a();for(var v of s)v.out(u)}else a()}function Ya(e,t,r){if(!(e.f&ue)){e.f^=ue;var s=e.nodes&&e.nodes.t;if(s!==null)for(const v of s)(v.is_global||r)&&t.push(v);for(var a=e.first;a!==null;){var i=a.next;if(!(a.f&ht)){var u=(a.f&Xt)!==0||(a.f&We)!==0&&(e.f&Je)!==0;Ya(a,t,u?r:!1)}a=i}}}function $s(e){Ga(e,!0)}function Ga(e,t){if(e.f&ue){e.f^=ue,e.f&Z||(J(e,ae),Ft.ensure().schedule(e));for(var r=e.first;r!==null;){var s=r.next,a=(r.f&Xt)!==0||(r.f&We)!==0;Ga(r,a?t:!1),r=s}var i=e.nodes&&e.nodes.t;if(i!==null)for(const u of i)(u.is_global||t)&&u.in()}}function Ws(e,t){if(e.nodes)for(var r=e.nodes.start,s=e.nodes.end;r!==null;){var a=r===s?null:Tr(r);t.append(r),r=a}}let Wr=!1,gt=!1;function ra(e){gt=e}let O=null,$e=!1;function De(e){O=e}let F=null;function Fe(e){F=e}let Me=null;function sc(e){O!==null&&(Me===null?Me=[e]:Me.push(e))}let pe=null,ge=0,ke=null;function nc(e){ke=e}let Ja=1,Et=0,Mt=Et;function sa(e){Mt=e}function Qa(){return++Ja}function rr(e){var t=e.f;if(t&ae)return!0;if(t&oe&&(e.f&=~Dt),t&Ve){for(var r=e.deps,s=r.length,a=0;a<s;a++){var i=r[a];if(rr(i)&&Ia(i),i.wv>e.wv)return!0}t&Re&&ne===null&&J(e,Z)}return!1}function Xa(e,t,r=!0){var s=e.reactions;if(s!==null&&!(Me!==null&&Jt.call(Me,e)))for(var a=0;a<s.length;a++){var i=s[a];i.f&oe?Xa(i,t,!1):t===i&&(r?J(i,ae):i.f&Z&&J(i,Ve),Ms(i))}}function Za(e){var A;var t=pe,r=ge,s=ke,a=O,i=Me,u=B,v=$e,d=Mt,p=e.f;pe=null,ge=0,ke=null,O=p&(We|ht)?null:e,Me=null,Zt(e.ctx),$e=!1,Mt=++Et,e.ac!==null&&(Kr(()=>{e.ac.abort(et)}),e.ac=null);try{e.f|=Vr;var g=e.fn,x=g();e.f|=jt;var w=e.deps,y=T==null?void 0:T.is_fork;if(pe!==null){var o;if(y||hr(e,ge),w!==null&&ge>0)for(w.length=ge+pe.length,o=0;o<pe.length;o++)w[ge+o]=pe[o];else e.deps=w=pe;if(Is()&&e.f&Re)for(o=ge;o<w.length;o++)((A=w[o]).reactions??(A.reactions=[])).push(e)}else!y&&w!==null&&ge<w.length&&(hr(e,ge),w.length=ge);if(Sr()&&ke!==null&&!$e&&w!==null&&!(e.f&(oe|Ve|ae)))for(o=0;o<ke.length;o++)Xa(ke[o],e);if(a!==null&&a!==e){if(Et++,a.deps!==null)for(let m=0;m<r;m+=1)a.deps[m].rv=Et;if(t!==null)for(const m of t)m.rv=Et;ke!==null&&(s===null?s=ke:s.push(...ke))}return e.f&pt&&(e.f^=pt),x}catch(m){return Ta(m)}finally{e.f^=Vr,pe=t,ge=r,ke=s,O=a,Me=i,Zt(u),$e=v,Mt=d}}function ac(e,t){let r=t.reactions;if(r!==null){var s=Gl.call(r,e);if(s!==-1){var a=r.length-1;a===0?r=t.reactions=null:(r[s]=r[a],r.pop())}}if(r===null&&t.f&oe&&(pe===null||!Jt.call(pe,t))){var i=t;i.f&Re&&(i.f^=Re,i.f&=~Dt),i.v!==re&&Rs(i),Vo(i),hr(i,0)}}function hr(e,t){var r=e.deps;if(r!==null)for(var s=t;s<r.length;s++)ac(e,r[s])}function It(e){var t=e.f;if(!(t&Ne)){J(e,Z);var r=F,s=Wr;F=e,Wr=!0;try{t&(Je|ha)?tc(e):Ps(e),Ba(e);var a=Za(e);e.teardown=typeof a=="function"?a:null,e.wv=Ja;var i;Yl&&Eo&&e.f&ae&&e.deps}finally{Wr=s,F=r}}}async function ic(){await Promise.resolve(),Co()}function n(e){var t=e.f,r=(t&oe)!==0;if(O!==null&&!$e){var s=F!==null&&(F.f&Ne)!==0;if(!s&&(Me===null||!Jt.call(Me,e))){var a=O.deps;if(O.f&Vr)e.rv<Et&&(e.rv=Et,pe===null&&a!==null&&a[ge]===e?ge++:pe===null?pe=[e]:pe.push(e));else{(O.deps??(O.deps=[])).push(e);var i=e.reactions;i===null?e.reactions=[O]:Jt.call(i,O)||i.push(O)}}}if(gt&&Rt.has(e))return Rt.get(e);if(r){var u=e;if(gt){var v=u.v;return(!(u.f&Z)&&u.reactions!==null||ti(u))&&(v=Fs(u)),Rt.set(u,v),v}var d=(u.f&Re)===0&&!$e&&O!==null&&(Wr||(O.f&Re)!==0),p=(u.f&jt)===0;rr(u)&&(d&&(u.f|=Re),Ia(u)),d&&!p&&(ja(u),ei(u))}if(ne!=null&&ne.has(e))return ne.get(e);if(e.f&pt)throw e.v;return e.v}function ei(e){if(e.f|=Re,e.deps!==null)for(const t of e.deps)(t.reactions??(t.reactions=[])).push(e),t.f&oe&&!(t.f&Re)&&(ja(t),ei(t))}function ti(e){if(e.v===re)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(Rt.has(t)||t.f&oe&&ti(t))return!0;return!1}function b(e){var t=$e;try{return $e=!0,e()}finally{$e=t}}function lc(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(Ct in e)xs(e);else if(!Array.isArray(e))for(let t in e){const r=e[t];typeof r=="object"&&r&&Ct in r&&xs(r)}}}function xs(e,t=new Set){if(typeof e=="object"&&e!==null&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let s in e)try{xs(e[s],t)}catch{}const r=Cs(e);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){const s=pa(r);for(let a in s){const i=s[a].get;if(i)try{i.call(e)}catch{}}}}}const oc=["touchstart","touchmove"];function cc(e){return oc.includes(e)}const Nr=Symbol("events"),fc=new Set,na=new Set;function uc(e,t,r,s={}){function a(i){if(s.capture||ks.call(t,i),!i.cancelBubble)return Kr(()=>r==null?void 0:r.call(this,i))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?_t(()=>{t.addEventListener(e,a,s)}):t.addEventListener(e,a,s),a}function Mr(e,t,r,s,a){var i={capture:s,passive:a},u=uc(e,t,r,i);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&js(()=>{t.removeEventListener(e,u,i)})}let aa=null;function ks(e){var m,C;var t=this,r=t.ownerDocument,s=e.type,a=((m=e.composedPath)==null?void 0:m.call(e))||[],i=a[0]||e.target;aa=e;var u=0,v=aa===e&&e[Nr];if(v){var d=a.indexOf(v);if(d!==-1&&(t===document||t===window)){e[Nr]=t;return}var p=a.indexOf(t);if(p===-1)return;d<=p&&(u=d)}if(i=a[u]||e.target,i!==t){Jl(e,"currentTarget",{configurable:!0,get(){return i||r}});var g=O,x=F;De(null),Fe(null);try{for(var w,y=[];i!==null;){var o=i.assignedSlot||i.parentNode||i.host||null;try{var A=(C=i[Nr])==null?void 0:C[s];A!=null&&(!i.disabled||e.target===i)&&A.call(i,e)}catch(W){w?y.push(W):w=W}if(e.cancelBubble||o===t||o===null)break;i=o}if(w){for(let W of y)queueMicrotask(()=>{throw W});throw w}}finally{e[Nr]=t,delete e.currentTarget,De(g),Fe(x)}}}var da;const cs=((da=globalThis==null?void 0:globalThis.window)==null?void 0:da.trustedTypes)&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function dc(e){return(cs==null?void 0:cs.createHTML(e))??e}function vc(e){var t=Ko("template");return t.innerHTML=dc(e.replaceAll("<!>","<!---->")),t.content}function Vs(e,t){var r=F;r.nodes===null&&(r.nodes={start:e,end:t,a:null,t:null})}function V(e,t){var r=(t&go)!==0,s,a=!e.startsWith("<!>");return()=>{s===void 0&&(s=vc(a?e:"<!>"+e),s=Os(s));var i=r||$a?document.importNode(s,!0):s.cloneNode(!0);return Vs(i,i),i}}function ia(e=""){{var t=at(e+"");return Vs(t,t),t}}function pc(){var e=document.createDocumentFragment(),t=document.createComment(""),r=at();return e.append(t,r),Vs(t,r),e}function P(e,t){e!==null&&e.before(t)}function k(e,t){var r=t==null?"":typeof t=="object"?`${t}`:t;r!==(e.__t??(e.__t=e.nodeValue))&&(e.__t=r,e.nodeValue=`${r}`)}function _c(e,t){return hc(e,t)}const Dr=new Map;function hc(e,{target:t,anchor:r,props:s={},events:a,context:i,intro:u=!0,transformError:v}){zo();var d=void 0,p=Qo(()=>{var g=r??t.appendChild(at());Do(g,{pending:()=>{}},y=>{xa({});var o=B;i&&(o.c=i),a&&(s.$$events=a),d=e(y,s)||{},ka()},v);var x=new Set,w=y=>{for(var o=0;o<y.length;o++){var A=y[o];if(!x.has(A)){x.add(A);var m=cc(A);for(const L of[t,document]){var C=Dr.get(L);C===void 0&&(C=new Map,Dr.set(L,C));var W=C.get(A);W===void 0?(L.addEventListener(A,ks,{passive:m}),C.set(A,1)):C.set(A,W+1)}}}};return w(Br(fc)),na.add(w),()=>{var m;for(var y of x)for(const C of[t,document]){var o=Dr.get(C),A=o.get(y);--A==0?(C.removeEventListener(y,ks),o.delete(y),o.size===0&&Dr.delete(C)):o.set(y,A)}na.delete(w),g!==r&&((m=g.parentNode)==null||m.removeChild(g))}});return gc.set(d,p),d}let gc=new WeakMap;var Pe,Ye,ye,At,wr,Er,Hr;class bc{constructor(t,r=!0){je(this,"anchor");M(this,Pe,new Map);M(this,Ye,new Map);M(this,ye,new Map);M(this,At,new Set);M(this,wr,!0);M(this,Er,t=>{if(c(this,Pe).has(t)){var r=c(this,Pe).get(t),s=c(this,Ye).get(r);if(s)$s(s),c(this,At).delete(r);else{var a=c(this,ye).get(r);a&&(c(this,Ye).set(r,a.effect),c(this,ye).delete(r),a.fragment.lastChild.remove(),this.anchor.before(a.fragment),s=a.effect)}for(const[i,u]of c(this,Pe)){if(c(this,Pe).delete(i),i===t)break;const v=c(this,ye).get(u);v&&(_e(v.effect),c(this,ye).delete(u))}for(const[i,u]of c(this,Ye)){if(i===r||c(this,At).has(i))continue;const v=()=>{if(Array.from(c(this,Pe).values()).includes(i)){var p=document.createDocumentFragment();Ws(u,p),p.append(at()),c(this,ye).set(i,{effect:u,fragment:p})}else _e(u);c(this,At).delete(i),c(this,Ye).delete(i)};c(this,wr)||!s?(c(this,At).add(i),Nt(u,v,!1)):v()}}});M(this,Hr,t=>{c(this,Pe).delete(t);const r=Array.from(c(this,Pe).values());for(const[s,a]of c(this,ye))r.includes(s)||(_e(a.effect),c(this,ye).delete(s))});this.anchor=t,D(this,wr,r)}ensure(t,r){var s=T,a=qa();if(r&&!c(this,Ye).has(t)&&!c(this,ye).has(t))if(a){var i=document.createDocumentFragment(),u=at();i.append(u),c(this,ye).set(t,{effect:Ce(()=>r(u)),fragment:i})}else c(this,Ye).set(t,Ce(()=>r(this.anchor)));if(c(this,Pe).set(s,t),a){for(const[v,d]of c(this,Ye))v===t?s.unskip_effect(d):s.skip_effect(d);for(const[v,d]of c(this,ye))v===t?s.unskip_effect(d.effect):s.skip_effect(d.effect);s.oncommit(c(this,Er)),s.ondiscard(c(this,Hr))}else c(this,Er).call(this,s)}}Pe=new WeakMap,Ye=new WeakMap,ye=new WeakMap,At=new WeakMap,wr=new WeakMap,Er=new WeakMap,Hr=new WeakMap;function ce(e,t,r=!1){var s=new bc(e),a=r?Xt:0;function i(u,v){s.ensure(u,v)}Ls(()=>{var u=!1;t((v,d=0)=>{u=!0,i(d,v)}),u||i(-1,null)},a)}function mc(e,t,r){for(var s=[],a=t.length,i,u=t.length,v=0;v<a;v++){let x=t[v];Nt(x,()=>{if(i){if(i.pending.delete(x),i.done.add(x),i.pending.size===0){var w=e.outrogroups;Ss(e,Br(i.done)),w.delete(i),w.size===0&&(e.outrogroups=null)}}else u-=1},!1)}if(u===0){var d=s.length===0&&r!==null;if(d){var p=r,g=p.parentNode;Bo(g),g.append(p),e.items.clear()}Ss(e,t,!d)}else i={pending:new Set(t),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(i)}function Ss(e,t,r=!0){var s;if(e.pending.size>0){s=new Set;for(const u of e.pending.values())for(const v of u)s.add(e.items.get(v).e)}for(var a=0;a<t.length;a++){var i=t[a];if(s!=null&&s.has(i)){i.f|=Ge;const u=document.createDocumentFragment();Ws(i,u)}else _e(t[a],r)}}var la;function Ut(e,t,r,s,a,i=null){var u=e,v=new Map,d=(t&ma)!==0;if(d){var p=e;u=p.appendChild(at())}var g=null,x=Oa(()=>{var L=r();return As(L)?L:L==null?[]:Br(L)}),w,y=new Map,o=!0;function A(L){W.effect.f&Ne||(W.pending.delete(L),W.fallback=g,yc(W,w,u,t,s),g!==null&&(w.length===0?g.f&Ge?(g.f^=Ge,fr(g,null,u)):$s(g):Nt(g,()=>{g=null})))}function m(L){W.pending.delete(L)}var C=Ls(()=>{w=n(x);for(var L=w.length,K=new Set,ie=T,qe=qa(),I=0;I<L;I+=1){var Xe=w[I],it=s(Xe,I),de=o?null:v.get(it);de?(de.v&&er(de.v,Xe),de.i&&er(de.i,I),qe&&ie.unskip_effect(de.e)):(de=wc(v,o?u:la??(la=at()),Xe,it,I,a,t,r),o||(de.e.f|=Ge),v.set(it,de)),K.add(it)}if(L===0&&i&&!g&&(o?g=Ce(()=>i(u)):(g=Ce(()=>i(la??(la=at()))),g.f|=Ge)),L>K.size&&so(),!o)if(y.set(ie,K),qe){for(const[Ue,Lt]of v)K.has(Ue)||ie.skip_effect(Lt.e);ie.oncommit(A),ie.ondiscard(m)}else A(ie);n(x)}),W={effect:C,items:v,pending:y,outrogroups:null,fallback:g};o=!1}function lr(e){for(;e!==null&&!(e.f&We);)e=e.next;return e}function yc(e,t,r,s,a){var de,Ue,Lt,Pt,sr,bt,Ar,$t,nr;var i=(s&_o)!==0,u=t.length,v=e.items,d=lr(e.effect.first),p,g=null,x,w=[],y=[],o,A,m,C;if(i)for(C=0;C<u;C+=1)o=t[C],A=a(o,C),m=v.get(A).e,m.f&Ge||((Ue=(de=m.nodes)==null?void 0:de.a)==null||Ue.measure(),(x??(x=new Set)).add(m));for(C=0;C<u;C+=1){if(o=t[C],A=a(o,C),m=v.get(A).e,e.outrogroups!==null)for(const we of e.outrogroups)we.pending.delete(m),we.done.delete(m);if(m.f&ue&&($s(m),i&&((Pt=(Lt=m.nodes)==null?void 0:Lt.a)==null||Pt.unfix(),(x??(x=new Set)).delete(m))),m.f&Ge)if(m.f^=Ge,m===d)fr(m,null,r);else{var W=g?g.next:d;m===e.effect.last&&(e.effect.last=m.prev),m.prev&&(m.prev.next=m.next),m.next&&(m.next.prev=m.prev),ft(e,g,m),ft(e,m,W),fr(m,W,r),g=m,w=[],y=[],d=lr(g.next);continue}if(m!==d){if(p!==void 0&&p.has(m)){if(w.length<y.length){var L=y[0],K;g=L.prev;var ie=w[0],qe=w[w.length-1];for(K=0;K<w.length;K+=1)fr(w[K],L,r);for(K=0;K<y.length;K+=1)p.delete(y[K]);ft(e,ie.prev,qe.next),ft(e,g,ie),ft(e,qe,L),d=L,g=qe,C-=1,w=[],y=[]}else p.delete(m),fr(m,d,r),ft(e,m.prev,m.next),ft(e,m,g===null?e.effect.first:g.next),ft(e,g,m),g=m;continue}for(w=[],y=[];d!==null&&d!==m;)(p??(p=new Set)).add(d),y.push(d),d=lr(d.next);if(d===null)continue}m.f&Ge||w.push(m),g=m,d=lr(m.next)}if(e.outrogroups!==null){for(const we of e.outrogroups)we.pending.size===0&&(Ss(e,Br(we.done)),(sr=e.outrogroups)==null||sr.delete(we));e.outrogroups.size===0&&(e.outrogroups=null)}if(d!==null||p!==void 0){var I=[];if(p!==void 0)for(m of p)m.f&ue||I.push(m);for(;d!==null;)!(d.f&ue)&&d!==e.fallback&&I.push(d),d=lr(d.next);var Xe=I.length;if(Xe>0){var it=s&ma&&u===0?r:null;if(i){for(C=0;C<Xe;C+=1)(Ar=(bt=I[C].nodes)==null?void 0:bt.a)==null||Ar.measure();for(C=0;C<Xe;C+=1)(nr=($t=I[C].nodes)==null?void 0:$t.a)==null||nr.fix()}mc(e,I,it)}}i&&_t(()=>{var we,ar;if(x!==void 0)for(m of x)(ar=(we=m.nodes)==null?void 0:we.a)==null||ar.apply()})}function wc(e,t,r,s,a,i,u,v){var d=u&vo?u&ho?Ot(r):X(r,!1,!1):null,p=u&po?Ot(a):null;return{v:d,i:p,e:Ce(()=>(i(t,d??r,p??a,v),()=>{e.delete(s)}))}}function fr(e,t,r){if(e.nodes)for(var s=e.nodes.start,a=e.nodes.end,i=t&&!(t.f&Ge)?t.nodes.start:r;s!==null;){var u=Tr(s);if(i.before(s),s===a)return;s=u}}function ft(e,t,r){t===null?e.effect.first=r:t.next=r,r===null?e.effect.last=t:r.prev=t}const oa=[...`
|
|
2
|
+
\r\f \v\uFEFF`];function Ec(e,t,r){var s=e==null?"":""+e;if(r){for(var a of Object.keys(r))if(r[a])s=s?s+" "+a:a;else if(s.length)for(var i=a.length,u=0;(u=s.indexOf(a,u))>=0;){var v=u+i;(u===0||oa.includes(s[u-1]))&&(v===s.length||oa.includes(s[v]))?s=(u===0?"":s.substring(0,u))+s.substring(v+1):u=v}}return s===""?null:s}function xc(e,t){return e==null?null:String(e)}function or(e,t,r,s,a,i){var u=e.__className;if(u!==r||u===void 0){var v=Ec(r,s,i);v==null?e.removeAttribute("class"):e.className=v,e.__className=r}else if(i&&a!==i)for(var d in i){var p=!!i[d];(a==null||p!==!!a[d])&&e.classList.toggle(d,p)}return i}function ca(e,t,r,s){var a=e.__style;if(a!==t){var i=xc(t);i==null?e.removeAttribute("style"):e.style.cssText=i,e.__style=t}return s}function ri(e,t,r=!1){if(e.multiple){if(t==null)return;if(!As(t))return mo();for(var s of e.options)s.selected=t.includes(pr(s));return}for(s of e.options){var a=pr(s);if(Uo(a,t)){s.selected=!0;return}}(!r||t!==void 0)&&(e.selectedIndex=-1)}function kc(e){var t=new MutationObserver(()=>{ri(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),js(()=>{t.disconnect()})}function fs(e,t,r=t){var s=new WeakSet,a=!0;Ua(e,"change",i=>{var u=i?"[selected]":":checked",v;if(e.multiple)v=[].map.call(e.querySelectorAll(u),pr);else{var d=e.querySelector(u)??e.querySelector("option:not([disabled])");v=d&&pr(d)}r(v),e.__value=v,T!==null&&s.add(T)}),Xo(()=>{var i=t();if(e===document.activeElement){var u=T;if(s.has(u))return}if(ri(e,i,a),a&&i===void 0){var v=e.querySelector(":checked");v!==null&&(i=pr(v),r(i))}e.__value=i,a=!1}),kc(e)}function pr(e){return"__value"in e?e.__value:e.value}const Sc=Symbol("is custom element"),Tc=Symbol("is html");function Ac(e,t,r,s){var a=Cc(e);a[t]!==(a[t]=r)&&(r==null?e.removeAttribute(t):typeof r!="string"&&Rc(e).includes(t)?e[t]=r:e.setAttribute(t,r))}function Cc(e){return e.__attributes??(e.__attributes={[Sc]:e.nodeName.includes("-"),[Tc]:e.namespaceURI===ya})}var fa=new Map;function Rc(e){var t=e.getAttribute("is")||e.nodeName,r=fa.get(t);if(r)return r;fa.set(t,r=[]);for(var s,a=e,i=Element.prototype;i!==a;){s=pa(a);for(var u in s)s[u].set&&r.push(u);a=Cs(a)}return r}function Fr(e,t,r=t){var s=new WeakSet;Ua(e,"input",async a=>{var i=a?e.defaultValue:e.value;if(i=us(e)?ds(i):i,r(i),T!==null&&s.add(T),await ic(),i!==(i=t())){var u=e.selectionStart,v=e.selectionEnd,d=e.value.length;if(e.value=i??"",v!==null){var p=e.value.length;u===v&&v===d&&p>d?(e.selectionStart=p,e.selectionEnd=p):(e.selectionStart=u,e.selectionEnd=Math.min(v,p))}}}),b(t)==null&&e.value&&(r(us(e)?ds(e.value):e.value),T!==null&&s.add(T)),Yr(()=>{var a=t();if(e===document.activeElement){var i=T;if(s.has(i))return}us(e)&&a===ds(e.value)||e.type==="date"&&!a&&!e.value||a!==e.value&&(e.value=a??"")})}function us(e){var t=e.type;return t==="number"||t==="range"}function ds(e){return e===""?null:+e}function Nc(e){return function(...t){var r=t[0];return r.preventDefault(),e==null?void 0:e.apply(this,t)}}function Mc(e=!1){const t=B,r=t.l.u;if(!r)return;let s=()=>lc(t.s);if(e){let a=0,i={};const u=Ds(()=>{let v=!1;const d=t.s;for(const p in d)d[p]!==i[p]&&(i[p]=d[p],v=!0);return v&&a++,a});s=()=>n(u)}r.b.length&&Jo(()=>{ua(t,s),vs(r.b)}),Es(()=>{const a=b(()=>r.m.map(eo));return()=>{for(const i of a)typeof i=="function"&&i()}}),r.a.length&&Es(()=>{ua(t,s),vs(r.a)})}function ua(e,t){if(e.l.s)for(const r of e.l.s)n(r);t()}function Dc(e){B===null&&ba(),kr&&B.l!==null?Oc(B).m.push(e):Es(()=>{const t=b(e);if(typeof t=="function")return t})}function Fc(e){B===null&&ba(),Dc(()=>()=>b(e))}function Oc(e){var t=e.l;return t.u??(t.u={a:[],b:[],m:[]})}const Ic="5";var va;typeof window<"u"&&((va=window.__svelte??(window.__svelte={})).v??(va.v=new Set)).add(Ic);xo();var jc=V('<div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Watch issue</span><strong class="status-warn svelte-d3ct2b"> </strong></div>'),Lc=V('<section class="notice svelte-d3ct2b"> </section>'),Pc=V('<section class="notice danger svelte-d3ct2b"> </section>'),$c=V('<p class="terminal-line svelte-d3ct2b"><time class="svelte-d3ct2b">--:--:--</time><span class="sys svelte-d3ct2b">SYS</span><strong class="svelte-d3ct2b">Waiting for memory-core watch output...</strong></p>'),Wc=V('<strong class="svelte-d3ct2b"> </strong>'),Vc=V('<strong class="svelte-d3ct2b"> </strong>'),qc=V('<strong class="svelte-d3ct2b"> </strong>'),Uc=V('<strong class="svelte-d3ct2b"> </strong>'),zc=V('<strong class="svelte-d3ct2b"> </strong>'),Hc=V('<p class="svelte-d3ct2b"><b class="svelte-d3ct2b">Why:</b> </p>'),Bc=V('<p class="svelte-d3ct2b"><b class="svelte-d3ct2b">Issue:</b> </p>'),Kc=V('<p class="svelte-d3ct2b"><b class="svelte-d3ct2b">Fix:</b> </p>'),Yc=V('<pre class="svelte-d3ct2b"> </pre>'),Gc=V('<div class="terminal-detail svelte-d3ct2b"><p class="svelte-d3ct2b"> </p> <p class="svelte-d3ct2b"><b class="svelte-d3ct2b">Rule:</b> </p> <!> <!> <!> <!></div>'),Jc=V('<section><p class="terminal-line svelte-d3ct2b"><time class="svelte-d3ct2b"> </time> <span class="svelte-d3ct2b"> </span> <!></p> <!></section>'),Qc=V('<div class="metric-row svelte-d3ct2b"><div class="svelte-d3ct2b"><span class="svelte-d3ct2b"> </span> <strong class="svelte-d3ct2b"> </strong></div> <i class="svelte-d3ct2b"></i></div>'),Xc=V('<p class="empty svelte-d3ct2b">No rule counters yet.</p>'),Zc=V('<div class="metric-row warning svelte-d3ct2b"><div class="svelte-d3ct2b"><span class="svelte-d3ct2b"> </span> <strong class="svelte-d3ct2b"> </strong></div> <i class="svelte-d3ct2b"></i></div>'),ef=V('<p class="empty svelte-d3ct2b">No file counters yet.</p>'),tf=V('<small class="svelte-d3ct2b"> </small>'),rf=V('<small class="svelte-d3ct2b"> </small>'),sf=V('<section class="commit-item svelte-d3ct2b"><div class="commit-meta svelte-d3ct2b"><span> </span> <time> </time></div> <strong class="svelte-d3ct2b"> </strong> <p class="svelte-d3ct2b"> </p> <!> <!></section>'),nf=V('<article class="glass-panel commit-watch svelte-d3ct2b"><div class="card-head svelte-d3ct2b"><h2 class="svelte-d3ct2b">Commit Watch</h2> <span class="svelte-d3ct2b"> </span></div> <div class="commit-list svelte-d3ct2b"></div></article>'),af=V('<small class="svelte-d3ct2b"> </small>'),lf=V('<div class="rule-item svelte-d3ct2b"><div><div class="rule-meta svelte-d3ct2b"><span class="svelte-d3ct2b"> </span> <code class="svelte-d3ct2b"> </code></div> <p class="svelte-d3ct2b"> </p> <!></div> <button class="svelte-d3ct2b">Delete</button></div>'),of=V('<p class="empty svelte-d3ct2b">No rules match the current filters.</p>'),cf=V('<div class="command-center svelte-d3ct2b"><aside class="sidebar svelte-d3ct2b"><div class="brand svelte-d3ct2b"><h1 class="svelte-d3ct2b">memory-core</h1> <span class="svelte-d3ct2b">command center</span></div> <nav aria-label="Dashboard navigation" class="svelte-d3ct2b"><a class="nav-item active svelte-d3ct2b" href="/"><span class="nav-icon svelte-d3ct2b">[]</span> <span>Command Center</span></a></nav> <div class="sidebar-footer svelte-d3ct2b"><div><i class="svelte-d3ct2b"></i> </div> <small class="svelte-d3ct2b"> </small></div></aside> <div class="workspace svelte-d3ct2b"><header class="topbar svelte-d3ct2b"><div class="topbar-left svelte-d3ct2b"><button class="icon-button mobile-menu svelte-d3ct2b" aria-label="Menu">=</button> <div><i class="svelte-d3ct2b"></i> <span> </span></div></div> <div class="header-metrics svelte-d3ct2b" aria-label="Global metrics"><div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Violations</span> <strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Files</span> <strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Rules</span> <strong class="svelte-d3ct2b"> </strong></div></div> <div class="top-actions svelte-d3ct2b" aria-label="Status shortcuts"><button class="icon-button svelte-d3ct2b" title="Refresh from current path" aria-label="Refresh from current path">REF</button> <button class="icon-button svelte-d3ct2b" title="Clear dashboard cache" aria-label="Clear dashboard cache">CLR</button></div></header> <main class="canvas svelte-d3ct2b"><section class="status-grid svelte-d3ct2b"><article class="glass-panel status-card svelte-d3ct2b"><div class="card-head svelte-d3ct2b"><h2 class="svelte-d3ct2b">Project</h2> <span class="svelte-d3ct2b"> </span></div> <div class="data-list svelte-d3ct2b"><div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Name</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Type</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Language</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Architecture</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Watcher</span><strong class="svelte-d3ct2b"> </strong></div> <!></div></article> <article class="glass-panel status-card svelte-d3ct2b"><div class="card-head svelte-d3ct2b"><h2 class="svelte-d3ct2b">Runtime</h2> <span class="svelte-d3ct2b"> </span></div> <div class="data-list svelte-d3ct2b"><div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Provider</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Check model</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Check status</span> <strong><!></strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Embedding</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Ollama URL</span><strong class="svelte-d3ct2b"> </strong></div></div></article> <article class="glass-panel status-card svelte-d3ct2b"><div class="card-head svelte-d3ct2b"><h2 class="svelte-d3ct2b">PostgreSQL</h2> <span> </span></div> <div class="data-list svelte-d3ct2b"><div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Database</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">User</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Host</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">URL</span><strong class="svelte-d3ct2b"> </strong></div></div></article></section> <!> <!> <section class="terminal-panel glass-panel svelte-d3ct2b"><div class="terminal-head svelte-d3ct2b"><div class="svelte-d3ct2b"><span class="terminal-icon svelte-d3ct2b">>_</span> <h2 class="svelte-d3ct2b">Live Feed</h2></div> <div class="window-dots svelte-d3ct2b" aria-hidden="true"><i class="svelte-d3ct2b"></i><i class="svelte-d3ct2b"></i><i class="svelte-d3ct2b"></i></div></div> <div class="terminal-body svelte-d3ct2b"><!> <!></div></section> <section class="content-grid svelte-d3ct2b"><article class="glass-panel stats-panel svelte-d3ct2b"><div class="card-head svelte-d3ct2b"><h2 class="svelte-d3ct2b">Stats</h2> <span class="svelte-d3ct2b">Recorded</span></div> <div class="stat-block svelte-d3ct2b"><h3 class="svelte-d3ct2b">Most Violated Rules</h3> <!></div> <div class="stat-block svelte-d3ct2b"><h3 class="svelte-d3ct2b">Problem Files</h3> <!></div> <div class="summary-strip svelte-d3ct2b"><div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Clean</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Issues</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Events</span><strong class="svelte-d3ct2b"> </strong></div></div></article> <!> <article class="glass-panel rule-engine svelte-d3ct2b"><div class="card-head svelte-d3ct2b"><h2 class="svelte-d3ct2b">Rule Engine</h2> <span class="svelte-d3ct2b"> </span></div> <form class="rule-form svelte-d3ct2b"><div class="control-grid svelte-d3ct2b"><select class="svelte-d3ct2b"><option>Rule</option><option>Decision</option><option>Pattern</option><option>Ignore</option></select> <select class="svelte-d3ct2b"><option>Project</option><option>Global</option></select></div> <textarea rows="3" placeholder="Rule or decision" class="svelte-d3ct2b"></textarea> <div class="control-grid svelte-d3ct2b"><input placeholder="Reason" class="svelte-d3ct2b"/> <input placeholder="Tags" class="svelte-d3ct2b"/></div> <button class="svelte-d3ct2b"> </button></form> <div class="control-grid filters svelte-d3ct2b"><select class="svelte-d3ct2b"><option>All types</option><option>Rules</option><option>Decisions</option><option>Patterns</option><option>Ignores</option></select> <input placeholder="Search rules..." class="svelte-d3ct2b"/></div> <div class="rule-list svelte-d3ct2b"></div></article></section></main></div></div>');function ff(e,t){xa(t,!1);const r=X(),s=X(),a=X(),i=X(),u=X(),v=X(),d=X(),p=X(),g=X(),x=X(),w=X(),y=X();let o=X({config:null,stats:{rules:{},files:{},topRules:[],topFiles:[]},files:[],memories:[]}),A=X([]),m=X(!1),C=X("all"),W=X(""),L=X(!1),K=X(""),ie,qe=!1,I=X({type:"rule",scope:"project",content:"",reason:"",tags:"dashboard"});const Xe=24*60*60*1e3,it=()=>{var S,R;const l=(R=(S=n(o).runtime)==null?void 0:S.project.name)==null?void 0:R.trim();if(l)return l;const f=Ue("projectName");return f||"memory-core"},de=l=>{if(!l)return null;const f=l.trim().toLowerCase();return{angular:"angular",express:"express",fastify:"fastify",go:"go-api",laravel:"laravel-service-repository",nestjs:"nestjs","next.js":"nextjs","nuxt.js":"nuxt",react:"react","react native":"react-native",svelte:"svelte","vue.js":"vue"}[f]??null},Ue=l=>{var S;const f=(S=n(o).config)==null?void 0:S[l];return typeof f=="string"&&f.trim().length>0?f.trim():void 0},Lt=()=>{var E,$,Ee,lt,ot;const l=((E=n(o).runtime)==null?void 0:E.project.declaredArchitectures)??[],f=(($=n(o).runtime)==null?void 0:$.project.activeArchitectures)??[],S=(Ee=n(o).runtime)==null?void 0:Ee.project.backendArchitecture,R=(lt=n(o).runtime)==null?void 0:lt.project.frontendFramework,z=Ue("backendArchitecture")??Ue("backendArch"),te=Ue("frontendFramework")??Ue("frontendFw"),le=de((ot=n(o).runtime)==null?void 0:ot.project.detected.framework),j=[...new Set([...l,...f,S,R,z,te,le??void 0].filter(Ze=>typeof Ze=="string"&&Ze.length>0))];return j.length>0?j.join(", "):"none"};function Pt(l){N(A,[{...l,id:crypto.randomUUID()},...n(A)].slice(0,80))}function sr(l){return l.type==="saved"?{type:"saved",timestamp:l.timestamp,file:l.file}:l.type==="clean"?{type:"clean",timestamp:l.timestamp,file:l.file}:l.type==="skipped"?{type:"skipped",timestamp:l.timestamp,file:l.file,reason:l.reason}:l.type==="violations"?{type:"violations",timestamp:l.timestamp,file:l.file,violations:l.violations}:l.type==="error"?{type:"error",timestamp:l.timestamp,message:l.message}:l.type==="ready"?{type:"system",timestamp:l.timestamp,message:`Watching ${l.path} | ${l.rules} rules | ${l.model}`}:{type:"system",timestamp:l.timestamp,message:"Watch stopped"}}function bt(l){const f=n(o).files??[],S=f.findIndex(z=>z.file===l.file),R=f.slice();return S===-1?R.push(l):R[S]=l,R.sort((z,te)=>te.lastSeen.localeCompare(z.lastSeen))}function Ar(l){const f=n(o).watcher??{enabled:!0,running:!1,path:void 0,model:void 0,rules:void 0,lastEventAt:void 0,error:void 0};let S=n(o).files,R={...f,lastEventAt:l.timestamp,enabled:!0};l.type==="ready"&&(R={...R,running:!0,error:void 0,path:l.path,model:l.model,rules:l.rules}),l.type==="saved"&&(S=bt({file:l.file,status:"checking",lastSeen:l.timestamp,violations:[]})),l.type==="clean"&&(S=bt({file:l.file,status:"clean",lastSeen:l.timestamp,violations:[]})),l.type==="skipped"&&(S=bt({file:l.file,status:"skipped",lastSeen:l.timestamp,violations:[],message:l.reason})),l.type==="violations"&&(S=bt({file:l.file,status:"violations",lastSeen:l.timestamp,violations:l.violations})),l.type==="error"&&(R={...R,running:!1,error:l.message}),l.type==="stopped"&&(R={...R,running:!1});const z=[l,...n(o).events??[]].slice(0,100);N(o,{...n(o),files:S,events:z,watcher:R})}function $t(l=[]){N(A,l.map(sr).map(f=>({...f,id:crypto.randomUUID()})).reverse().slice(0,80))}function nr(l){return new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date(l))}function we(l){return Math.max(1,...l.map(f=>f.count))}function ar(l,f){const S=l.file||f;return l.line?`${S}:${l.line}`:S}function si(l){return l.type==="saved"?"SAVE":l.type==="clean"?"OK":l.type==="skipped"?"SKIP":l.type==="violations"?"FAIL":l.type==="error"?"WARN":"SYS"}async function Cr(){const l=await fetch(`/api/snapshot?t=${Date.now()}`,{cache:"no-store"});N(o,await l.json()),$t(n(o).events)}async function ni(){N(K,"");try{const l=await fetch("/api/refresh",{method:"POST",headers:{"content-type":"application/json"},cache:"no-store"});if(!l.ok)throw new Error((await l.json()).error??"Refresh failed");const f=await l.json();f.snapshot?(N(o,f.snapshot),$t(n(o).events)):await Cr()}catch(l){N(K,l.message)}}function ai(){try{localStorage.clear(),sessionStorage.clear()}finally{location.reload()}}async function ii(){if(!qe&&document.visibilityState!=="hidden"){qe=!0;try{const l=await fetch("/api/stats",{cache:"no-store"});if(!l.ok)return;const f=await l.json();if(!f.stats)return;N(o,{...n(o),stats:f.stats})}catch{}finally{qe=!1}}}function li(){ie&&clearInterval(ie),ie=setInterval(()=>{ii()},2e3)}function qs(){const l=location.protocol==="https:"?"wss:":"ws:",f=new WebSocket(`${l}//${location.host}/ws`);f.addEventListener("open",()=>{N(m,!0),Pt({type:"system",timestamp:new Date().toISOString(),message:"Dashboard connected"})}),f.addEventListener("close",()=>{N(m,!1),Pt({type:"error",timestamp:new Date().toISOString(),message:"Dashboard disconnected"}),setTimeout(qs,1500)}),f.addEventListener("message",S=>{const R=JSON.parse(S.data);if(R.type==="snapshot"){N(o,R.snapshot),n(A).length===0&&$t(n(o).events);return}R.type==="watch"&&(Ar(R.event),Pt(sr(R.event)))})}async function oi(){if(n(I).content.trim()){N(L,!0),N(K,"");try{const l=await fetch("/api/memories",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n(I))});if(!l.ok)throw new Error((await l.json()).error??"Save failed");N(I,{type:"rule",scope:"project",content:"",reason:"",tags:"dashboard"}),await Cr()}catch(l){N(K,l.message)}finally{N(L,!1)}}}async function ci(l){N(K,"");const f=await fetch(`/api/memories/${l}`,{method:"DELETE"});if(!f.ok){N(K,(await f.json()).error??"Delete failed");return}await Cr()}Cr().catch(l=>{N(K,l.message)}),qs(),li(),Fc(()=>{ie&&(clearInterval(ie),ie=void 0)}),xe(()=>(n(o),n(C),n(W)),()=>{N(r,n(o).memories.filter(l=>{const f=n(C)==="all"||l.type===n(C),S=`${l.type} ${l.scope} ${l.content} ${l.reason??""} ${l.tags.join(" ")}`.toLowerCase();return f&&S.includes(n(W).toLowerCase())}))}),xe(()=>n(o),()=>{N(s,Object.values(n(o).stats.files??{}).reduce((l,f)=>l+f,0))}),xe(()=>n(o),()=>{N(a,n(o).files.filter(l=>l.status==="clean").length)}),xe(()=>n(o),()=>{N(i,Object.values(n(o).stats.rules).reduce((l,f)=>l+f,0))}),xe(()=>n(o),()=>{N(u,n(o).stats.recentViolations??[])}),xe(()=>n(u),()=>{N(v,n(u).filter(l=>{if(!(l.source==="hook"||l.source==="ci"))return!1;const f=Date.parse(l.timestamp);return Number.isNaN(f)?!1:Date.now()-f<=Xe}))}),xe(()=>n(s),()=>{N(d,n(s))}),xe(()=>n(o),()=>{N(p,Object.keys(n(o).stats.files??{}).length)}),xe(()=>n(o),()=>{N(g,n(o).memories.filter(l=>["rule","pattern","decision"].includes(l.type)).length)}),xe(()=>n(o),()=>{var l;N(x,((l=n(o).memoryCount)==null?void 0:l.total)??n(o).memories.length)}),xe(()=>n(o),()=>{var l;N(w,((l=n(o).memoryCount)==null?void 0:l.relevant)??n(o).memories.length)}),xe(()=>(n(m),n(o)),()=>{var l,f;N(y,n(m)?((l=n(o).watcher)==null?void 0:l.enabled)===!1?{live:!1,label:"Watch off"}:(f=n(o).watcher)!=null&&f.running?{live:!0,label:"Watcher live"}:{live:!1,label:"Watcher idle"}:{live:!1,label:"Disconnected"})}),Zo(),Mc();var Us=cf(),zs=_(Us),fi=h(_(zs),4),Gr=_(fi);let Hs;var ui=h(_(Gr)),di=h(Gr,2),vi=_(di),pi=h(zs,2),Bs=_(pi),Ks=_(Bs),Ys=h(_(Ks),2);let Gs;var _i=h(_(Ys),2),hi=_(_i),Js=h(Ks,2),Qs=_(Js),gi=h(_(Qs),2),bi=_(gi),Xs=h(Qs,2),mi=h(_(Xs),2),yi=_(mi),wi=h(Xs,2),Ei=h(_(wi),2),xi=_(Ei),ki=h(Js,2),Zs=_(ki),Si=h(Zs,2),Ti=h(Bs,2),en=_(Ti),tn=_(en),rn=_(tn),Ai=h(_(rn),2),Ci=_(Ai),Ri=h(rn,2),sn=_(Ri),Ni=h(_(sn)),Mi=_(Ni),nn=h(sn,2),Di=h(_(nn)),Fi=_(Di),an=h(nn,2),Oi=h(_(an)),Ii=_(Oi),ln=h(an,2),ji=h(_(ln)),Li=_(ji),on=h(ln,2),Pi=h(_(on)),$i=_(Pi),Wi=h(on,2);{var Vi=l=>{var f=jc(),S=h(_(f)),R=_(S);U(()=>k(R,(n(o),b(()=>n(o).watcher.error)))),P(l,f)};ce(Wi,l=>{n(o),b(()=>{var f;return(f=n(o).watcher)==null?void 0:f.error})&&l(Vi)})}var cn=h(tn,2),fn=_(cn),qi=h(_(fn),2),Ui=_(qi),zi=h(fn,2),un=_(zi),Hi=h(_(un)),Bi=_(Hi),dn=h(un,2),Ki=h(_(dn)),Yi=_(Ki),vn=h(dn,2),pn=h(_(vn),2);let _n;var Gi=_(pn);{var Ji=l=>{var f=ia();U(()=>k(f,(n(o),b(()=>{var S;return(S=n(o).runtime)!=null&&S.model.checkModelInstalled?"installed":"missing"})))),P(l,f)},Qi=l=>{var f=ia();U(()=>k(f,(n(o),b(()=>{var S;return(S=n(o).runtime)!=null&&S.model.apiKeyConfigured?"api key set":"api key missing"})))),P(l,f)};ce(Gi,l=>{n(o),b(()=>{var f;return((f=n(o).runtime)==null?void 0:f.model.provider)==="ollama"})?l(Ji):l(Qi,-1)})}var hn=h(vn,2),Xi=h(_(hn)),Zi=_(Xi),el=h(hn,2),tl=h(_(el)),rl=_(tl),sl=h(cn,2),gn=_(sl),bn=h(_(gn),2);let mn;var nl=_(bn),al=h(gn,2),yn=_(al),il=h(_(yn)),ll=_(il),wn=h(yn,2),ol=h(_(wn)),cl=_(ol),En=h(wn,2),fl=h(_(En)),ul=_(fl),dl=h(En,2),vl=h(_(dl)),pl=_(vl),xn=h(en,2);{var _l=l=>{var f=Lc(),S=_(f);U(()=>k(S,(n(o),b(()=>n(o).dbError)))),P(l,f)};ce(xn,l=>{n(o),b(()=>n(o).dbError)&&l(_l)})}var kn=h(xn,2);{var hl=l=>{var f=Pc(),S=_(f);U(()=>k(S,n(K))),P(l,f)};ce(kn,l=>{n(K)&&l(hl)})}var Sn=h(kn,2),gl=h(_(Sn),2),Tn=_(gl);{var bl=l=>{var f=$c();P(l,f)};ce(Tn,l=>{n(A),b(()=>n(A).length===0)&&l(bl)})}var ml=h(Tn,2);Ut(ml,1,()=>(n(A),b(()=>[...n(A)].reverse())),l=>l.id,(l,f)=>{var S=Jc();let R;var z=_(S),te=_(z),le=_(te),j=h(te,2),E=_(j),$=h(j,2);{var Ee=Y=>{var G=Wc(),he=_(G);U(()=>k(he,(n(f),b(()=>n(f).message)))),P(Y,G)},lt=Y=>{var G=Vc(),he=_(G);U(()=>k(he,`saved: ${n(f),b(()=>n(f).file)??""}`)),P(Y,G)},ot=Y=>{var G=qc(),he=_(G);U(()=>k(he,`${n(f),b(()=>n(f).file)??""} - no violations`)),P(Y,G)},Ze=Y=>{var G=Uc(),he=_(G);U(()=>k(he,`${n(f),b(()=>n(f).file)??""} - skipped: ${n(f),b(()=>n(f).reason)??""}`)),P(Y,G)},ze=Y=>{var G=zc(),he=_(G);U(()=>k(he,`${n(f),b(()=>n(f).violations.length)??""} violation${n(f),b(()=>n(f).violations.length===1?"":"s")??""} in ${n(f),b(()=>n(f).file)??""}`)),P(Y,G)};ce($,Y=>{n(f),b(()=>n(f).type==="system"||n(f).type==="error")?Y(Ee):(n(f),b(()=>n(f).type==="saved")?Y(lt,1):(n(f),b(()=>n(f).type==="clean")?Y(ot,2):(n(f),b(()=>n(f).type==="skipped")?Y(Ze,3):Y(ze,-1))))})}var Wt=h(z,2);{var Vt=Y=>{var G=pc(),he=Ho(G);Ut(he,3,()=>(n(f),b(()=>n(f).violations)),(Rr,H)=>`${n(f).id}-${H}`,(Rr,H,Oe)=>{var He=Gc(),qt=_(He),$l=_(qt),zn=h(qt,2),Wl=h(_(zn)),Hn=h(zn,2);{var Vl=se=>{var Ie=Hc(),mt=h(_(Ie));U(()=>k(mt,` ${n(H),b(()=>n(H).reason)??""}`)),P(se,Ie)};ce(Hn,se=>{n(H),b(()=>n(H).reason)&&se(Vl)})}var Bn=h(Hn,2);{var ql=se=>{var Ie=Bc(),mt=h(_(Ie));U(()=>k(mt,` ${n(H),b(()=>n(H).issue)??""}`)),P(se,Ie)};ce(Bn,se=>{n(H),b(()=>n(H).issue)&&se(ql)})}var Kn=h(Bn,2);{var Ul=se=>{var Ie=Kc(),mt=h(_(Ie));U(()=>k(mt,` ${n(H),b(()=>n(H).suggestion)??""}`)),P(se,Ie)};ce(Kn,se=>{n(H),b(()=>n(H).suggestion)&&se(Ul)})}var zl=h(Kn,2);{var Hl=se=>{var Ie=Yc(),mt=_(Ie);U(()=>k(mt,(n(H),b(()=>n(H).code)))),P(se,Ie)};ce(zl,se=>{n(H),b(()=>n(H).code)&&se(Hl)})}U(se=>{k($l,`[${n(Oe)+1}] ${se??""}`),k(Wl,` ${n(H),b(()=>n(H).rule)??""}`)},[()=>(n(H),n(f),b(()=>ar(n(H),n(f).file)))]),P(Rr,He)}),P(Y,G)};ce(Wt,Y=>{n(f),b(()=>n(f).type==="violations")&&Y(Vt)})}U((Y,G)=>{R=or(S,1,"svelte-d3ct2b",null,R,{"error-line":n(f).type==="error","ok-line":n(f).type==="clean","violation-line":n(f).type==="violations"}),k(le,Y),k(E,G)},[()=>(n(f),b(()=>nr(n(f).timestamp))),()=>(n(f),b(()=>si(n(f))))]),P(l,S)});var yl=h(Sn,2),An=_(yl),Cn=h(_(An),2),wl=h(_(Cn),2);Ut(wl,1,()=>(n(o),b(()=>n(o).stats.topRules.slice(0,5))),l=>l.name,(l,f)=>{var S=Qc(),R=_(S),z=_(R),te=_(z),le=h(z,2),j=_(le),E=h(R,2);U($=>{k(te,(n(f),b(()=>n(f).name))),k(j,(n(f),b(()=>n(f).count))),ca(E,$)},[()=>(n(f),n(o),b(()=>`width: ${n(f).count/we(n(o).stats.topRules)*100}%`))]),P(l,S)},l=>{var f=Xc();P(l,f)});var Rn=h(Cn,2),El=h(_(Rn),2);Ut(El,1,()=>(n(o),b(()=>n(o).stats.topFiles.slice(0,5))),l=>l.name,(l,f)=>{var S=Zc(),R=_(S),z=_(R),te=_(z),le=h(z,2),j=_(le),E=h(R,2);U($=>{k(te,(n(f),b(()=>n(f).name))),k(j,(n(f),b(()=>n(f).count))),ca(E,$)},[()=>(n(f),n(o),b(()=>`width: ${n(f).count/we(n(o).stats.topFiles)*100}%`))]),P(l,S)},l=>{var f=ef();P(l,f)});var xl=h(Rn,2),Nn=_(xl),kl=h(_(Nn)),Sl=_(kl),Mn=h(Nn,2),Tl=h(_(Mn)),Al=_(Tl),Cl=h(Mn,2),Rl=h(_(Cl)),Nl=_(Rl),Dn=h(An,2);{var Ml=l=>{var f=nf(),S=_(f),R=h(_(S),2),z=_(R),te=h(S,2);Ut(te,7,()=>(n(v),b(()=>n(v).slice(0,8))),(le,j)=>`${le.timestamp}-${j}`,(le,j)=>{var E=sf(),$=_(E),Ee=_($),lt=_(Ee),ot=h(Ee,2),Ze=_(ot),ze=h($,2),Wt=_(ze),Vt=h(ze,2),Y=_(Vt),G=h(Vt,2);{var he=Oe=>{var He=tf(),qt=_(He);U(()=>k(qt,(n(j),b(()=>n(j).issue)))),P(Oe,He)};ce(G,Oe=>{n(j),b(()=>n(j).issue)&&Oe(he)})}var Rr=h(G,2);{var H=Oe=>{var He=rf(),qt=_(He);U(()=>k(qt,(n(j),b(()=>n(j).suggestion)))),P(Oe,He)};ce(Rr,Oe=>{n(j),b(()=>n(j).suggestion)&&Oe(H)})}U((Oe,He)=>{k(lt,(n(j),b(()=>n(j).source==="ci"?"CI":"Hook"))),k(Ze,Oe),k(Wt,(n(j),b(()=>n(j).rule))),k(Y,He)},[()=>(n(j),b(()=>nr(n(j).timestamp))),()=>(n(j),b(()=>ar(n(j),n(j).file||"staged diff")))]),P(le,E)}),U(()=>k(z,`${n(v),b(()=>n(v).length)??""} in 24h`)),P(l,f)};ce(Dn,l=>{n(v),b(()=>n(v).length>0)&&l(Ml)})}var Dl=h(Dn,2),Fn=_(Dl),Fl=h(_(Fn),2),Ol=_(Fl),Jr=h(Fn,2),On=_(Jr),Qr=_(On),Xr=_(Qr);Xr.value=Xr.__value="rule";var Zr=h(Xr);Zr.value=Zr.__value="decision";var es=h(Zr);es.value=es.__value="pattern";var In=h(es);In.value=In.__value="ignore";var jn=h(Qr,2),ts=_(jn);ts.value=ts.__value="project";var Ln=h(ts);Ln.value=Ln.__value="global";var Pn=h(On,2),$n=h(Pn,2),Wn=_($n),Il=h(Wn,2),Vn=h($n,2),jl=_(Vn),qn=h(Jr,2),rs=_(qn),ss=_(rs);ss.value=ss.__value="all";var ns=h(ss);ns.value=ns.__value="rule";var as=h(ns);as.value=as.__value="decision";var is=h(as);is.value=is.__value="pattern";var Un=h(is);Un.value=Un.__value="ignore";var Ll=h(rs,2),Pl=h(qn,2);Ut(Pl,5,()=>n(r),l=>l.id,(l,f)=>{var S=lf(),R=_(S),z=_(R),te=_(z),le=_(te),j=h(te,2),E=_(j),$=h(z,2),Ee=_($),lt=h($,2);{var ot=ze=>{var Wt=af(),Vt=_(Wt);U(()=>k(Vt,(n(f),b(()=>n(f).reason)))),P(ze,Wt)};ce(lt,ze=>{n(f),b(()=>n(f).reason)&&ze(ot)})}var Ze=h(R,2);U(ze=>{k(le,(n(f),b(()=>n(f).scope))),k(E,`Rule-${ze??""}`),k(Ee,(n(f),b(()=>n(f).content))),Ac(Ze,"aria-label",(n(f),b(()=>`Delete ${n(f).id}`)))},[()=>(n(f),b(()=>String(n(f).id).padStart(3,"0")))]),Mr("click",Ze,()=>ci(n(f).id)),P(l,S)},l=>{var f=of();P(l,f)}),U((l,f,S)=>{var R,z,te,le,j;Hs=or(Gr,1,"status-chip svelte-d3ct2b",null,Hs,{live:n(y).live}),k(ui,` ${n(y),b(()=>n(y).label)??""}`),k(vi,(n(o),b(()=>{var E;return((E=n(o).runtime)==null?void 0:E.model.label)??"runtime pending"}))),Gs=or(Ys,1,"live-label svelte-d3ct2b",null,Gs,{live:n(y).live}),k(hi,(n(y),b(()=>n(y).label))),k(bi,n(d)),k(yi,n(p)),k(xi,n(g)),k(Ci,(n(o),b(()=>{var E;return(E=n(o).runtime)!=null&&E.project.initialized?"Initialized":"Not initialized"}))),k(Mi,l),k(Fi,(n(o),b(()=>{var E;return((E=n(o).runtime)==null?void 0:E.project.type)??"unknown"}))),k(Ii,(n(o),b(()=>{var E;return((E=n(o).runtime)==null?void 0:E.project.language)??"unknown"}))),k(Li,f),k($i,(n(o),b(()=>{var E,$;return((E=n(o).watcher)==null?void 0:E.enabled)===!1?"disabled":($=n(o).watcher)!=null&&$.running?"running":"idle"}))),k(Ui,(n(o),b(()=>{var E;return((E=n(o).runtime)==null?void 0:E.model.label)??"pending"}))),k(Bi,(n(o),b(()=>{var E;return((E=n(o).runtime)==null?void 0:E.model.provider)??"unknown"}))),k(Yi,(n(o),b(()=>{var E,$,Ee;return((E=n(o).runtime)==null?void 0:E.model.checkModelResolved)??(($=n(o).runtime)==null?void 0:$.model.checkModel)??((Ee=n(o).runtime)==null?void 0:Ee.model.chatModel)??"unknown"}))),_n=or(pn,1,"svelte-d3ct2b",null,_n,{"status-ok":((R=n(o).runtime)==null?void 0:R.model.checkModelInstalled)||((z=n(o).runtime)==null?void 0:z.model.apiKeyConfigured),"status-warn":((te=n(o).runtime)==null?void 0:te.model.checkModelInstalled)===!1||((le=n(o).runtime)==null?void 0:le.model.error)}),k(Zi,(n(o),b(()=>{var E,$;return((E=n(o).runtime)==null?void 0:E.model.embeddingModelResolved)??(($=n(o).runtime)==null?void 0:$.model.embeddingModel)??"unknown"}))),k(rl,(n(o),b(()=>{var E;return((E=n(o).runtime)==null?void 0:E.model.ollamaUrl)??"unknown"}))),mn=or(bn,1,"svelte-d3ct2b",null,mn,{success:(j=n(o).runtime)==null?void 0:j.postgres.connected}),k(nl,(n(o),b(()=>{var E;return(E=n(o).runtime)!=null&&E.postgres.connected?"Connected":"Not connected"}))),k(ll,(n(o),b(()=>{var E,$;return((E=n(o).runtime)==null?void 0:E.postgres.serverDatabase)??(($=n(o).runtime)==null?void 0:$.postgres.database)??"unknown"}))),k(cl,(n(o),b(()=>{var E,$;return((E=n(o).runtime)==null?void 0:E.postgres.serverUser)??(($=n(o).runtime)==null?void 0:$.postgres.user)??"unknown"}))),k(ul,`${n(o),b(()=>{var E;return((E=n(o).runtime)==null?void 0:E.postgres.host)??"unknown"})??""}${n(o),b(()=>{var E;return(E=n(o).runtime)!=null&&E.postgres.port?`:${n(o).runtime.postgres.port}`:""})??""}`),k(pl,(n(o),b(()=>{var E;return((E=n(o).runtime)==null?void 0:E.postgres.url)??"(not set)"}))),k(Sl,n(a)),k(Al,n(d)),k(Nl,n(i)),k(Ol,`${n(g)??""} rules active`),Vn.disabled=S,k(jl,n(L)?"Saving...":"Add New Architecture Rule")},[()=>b(it),()=>b(Lt),()=>(n(L),n(I),b(()=>n(L)||!n(I).content.trim()))]),Mr("click",Zs,ni),Mr("click",Si,ai),fs(Qr,()=>n(I).type,l=>ir(I,n(I).type=l)),fs(jn,()=>n(I).scope,l=>ir(I,n(I).scope=l)),Fr(Pn,()=>n(I).content,l=>ir(I,n(I).content=l)),Fr(Wn,()=>n(I).reason,l=>ir(I,n(I).reason=l)),Fr(Il,()=>n(I).tags,l=>ir(I,n(I).tags=l)),Mr("submit",Jr,Nc(oi)),fs(rs,()=>n(C),l=>N(C,l)),Fr(Ll,()=>n(W),l=>N(W,l)),P(e,Us),ka()}_c(ff,{target:document.getElementById("app")});
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>Memory Core Dashboard</title>
|
|
7
|
-
<script type="module" crossorigin src="/assets/index-
|
|
7
|
+
<script type="module" crossorigin src="/assets/index-CtOmKAsL.js"></script>
|
|
8
8
|
<link rel="stylesheet" crossorigin href="/assets/index-CJyZEmIe.css">
|
|
9
9
|
</head>
|
|
10
10
|
<body>
|
|
@@ -388,6 +388,9 @@ function sendJson(res, status, payload) {
|
|
|
388
388
|
const body = JSON.stringify(payload);
|
|
389
389
|
res.writeHead(status, {
|
|
390
390
|
"content-type": "application/json; charset=utf-8",
|
|
391
|
+
"cache-control": "no-store, no-cache, must-revalidate",
|
|
392
|
+
pragma: "no-cache",
|
|
393
|
+
expires: "0",
|
|
391
394
|
"content-length": Buffer.byteLength(body)
|
|
392
395
|
});
|
|
393
396
|
res.end(body);
|
|
@@ -415,6 +418,14 @@ async function handleApi(req, res, url) {
|
|
|
415
418
|
sendJson(res, 200, await getSnapshot());
|
|
416
419
|
return;
|
|
417
420
|
}
|
|
421
|
+
if (req.method === "POST" && url.pathname === "/api/refresh") {
|
|
422
|
+
invalidateSnapshotBase();
|
|
423
|
+
reloadRuntimeEnv();
|
|
424
|
+
const snapshot = await getSnapshot({ forceBaseRefresh: true });
|
|
425
|
+
scheduleSnapshotBroadcast({ delayMs: 0, forceBaseRefresh: true });
|
|
426
|
+
sendJson(res, 200, { ok: true, snapshot, timestamp: (/* @__PURE__ */ new Date()).toISOString() });
|
|
427
|
+
return;
|
|
428
|
+
}
|
|
418
429
|
if (req.method === "GET" && url.pathname === "/api/stats") {
|
|
419
430
|
sendJson(res, 200, { stats: buildStatsPayload(), timestamp: (/* @__PURE__ */ new Date()).toISOString() });
|
|
420
431
|
return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shahmilsaari/memory-core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.11",
|
|
4
4
|
"description": "Universal AI memory core — generate AI context files from architecture profiles with RAG support",
|
|
5
5
|
"homepage": "https://memory-core.shahmilsaari.my/",
|
|
6
6
|
"type": "module",
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var Vl=Object.defineProperty;var Hn=e=>{throw TypeError(e)};var ql=(e,t,r)=>t in e?Vl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var je=(e,t,r)=>ql(e,typeof t!="symbol"?t+"":t,r),is=(e,t,r)=>t.has(e)||Hn("Cannot "+r);var c=(e,t,r)=>(is(e,t,"read from private field"),r?r.call(e):t.get(e)),R=(e,t,r)=>t.has(e)?Hn("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),D=(e,t,r,s)=>(is(e,t,"write to private field"),s?s.call(e,r):t.set(e,r),r),q=(e,t,r)=>(is(e,t,"access private method"),r);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))s(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const f of i.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&s(f)}).observe(document,{childList:!0,subtree:!0});function r(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function s(a){if(a.ep)return;a.ep=!0;const i=r(a);fetch(a.href,i)}})();const Ul=!1;var As=Array.isArray,zl=Array.prototype.indexOf,Gt=Array.prototype.includes,zr=Array.from,Hl=Object.defineProperty,ur=Object.getOwnPropertyDescriptor,va=Object.getOwnPropertyDescriptors,Bl=Object.prototype,Kl=Array.prototype,Ts=Object.getPrototypeOf,Bn=Object.isExtensible;const Yl=()=>{};function Gl(e){return e()}function vs(e){for(var t=0;t<e.length;t++)e[t]()}function da(){var e,t,r=new Promise((s,a)=>{e=s,t=a});return{promise:r,resolve:e,reject:t}}const oe=2,Jt=4,xr=8,pa=1<<24,Ge=16,We=32,ht=64,ds=128,Re=512,Z=1024,ae=2048,Ve=4096,ue=8192,Ne=16384,jt=32768,Kn=1<<25,Qt=65536,ps=1<<17,Jl=1<<18,er=1<<19,_a=1<<20,Ye=1<<25,Dt=65536,$r=1<<21,_r=1<<22,pt=1<<23,Ct=Symbol("$state"),et=new class extends Error{constructor(){super(...arguments);je(this,"name","StaleReactionError");je(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};function ha(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Ql(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Xl(e,t,r){throw new Error("https://svelte.dev/e/each_key_duplicate")}function Zl(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function eo(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function to(e){throw new Error("https://svelte.dev/e/effect_orphan")}function ro(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function so(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function no(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function ao(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function io(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const lo=1,oo=2,ga=4,co=8,fo=16,uo=2,re=Symbol(),ba="http://www.w3.org/1999/xhtml";function vo(){console.warn("https://svelte.dev/e/derived_inert")}function po(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function _o(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function ma(e){return e===this.v}function ho(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function ya(e){return!ho(e,this.v)}let kr=!1,go=!1;function bo(){kr=!0}let B=null;function Xt(e){B=e}function wa(e,t=!1,r){B={p:B,i:!1,c:null,e:null,s:e,x:null,r:O,l:kr&&!t?{s:null,u:null,$:[]}:null}}function Ea(e){var t=B,r=t.e;if(r!==null){t.e=null;for(var s of r)Ua(s)}return t.i=!0,B=t.p,{}}function Sr(){return!kr||B!==null&&B.l===null}let wt=[];function xa(){var e=wt;wt=[],vs(e)}function _t(e){if(wt.length===0&&!vr){var t=wt;queueMicrotask(()=>{t===wt&&xa()})}wt.push(e)}function mo(){for(;wt.length>0;)xa()}function ka(e){var t=O;if(t===null)return F.f|=pt,e;if(!(t.f&jt)&&!(t.f&Jt))throw e;dt(e,t)}function dt(e,t){for(;t!==null;){if(t.f&ds){if(!(t.f&jt))throw e;try{t.b.error(e);return}catch(r){e=r}}t=t.parent}throw e}const yo=-7169;function G(e,t){e.f=e.f&yo|t}function Cs(e){e.f&Re||e.deps===null?G(e,Z):G(e,Ve)}function Sa(e){if(e!==null)for(const t of e)!(t.f&oe)||!(t.f&Dt)||(t.f^=Dt,Sa(t.deps))}function Aa(e,t,r){e.f&ae?t.add(e):e.f&Ve&&r.add(e),Sa(e.deps),G(e,Z)}const yt=new Set;let S=null,ne=null,_s=null,vr=!1,ls=!1,Ut=null,Dr=null;var Yn=0;let wo=1;var zt,Ht,xt,tt,He,gr,be,br,ut,rt,Be,Bt,Kt,kt,ee,Or,Ta,Fr,hs,Ir,Eo;const Vr=class Vr{constructor(){R(this,ee);je(this,"id",wo++);je(this,"current",new Map);je(this,"previous",new Map);R(this,zt,new Set);R(this,Ht,new Set);R(this,xt,new Set);R(this,tt,new Map);R(this,He,new Map);R(this,gr,null);R(this,be,[]);R(this,br,[]);R(this,ut,new Set);R(this,rt,new Set);R(this,Be,new Map);R(this,Bt,new Set);je(this,"is_fork",!1);R(this,Kt,!1);R(this,kt,new Set)}skip_effect(t){c(this,Be).has(t)||c(this,Be).set(t,{d:[],m:[]}),c(this,Bt).delete(t)}unskip_effect(t,r=s=>this.schedule(s)){var s=c(this,Be).get(t);if(s){c(this,Be).delete(t);for(var a of s.d)G(a,ae),r(a);for(a of s.m)G(a,Ve),r(a)}c(this,Bt).add(t)}capture(t,r,s=!1){t.v!==re&&!this.previous.has(t)&&this.previous.set(t,t.v),t.f&pt||(this.current.set(t,[r,s]),ne==null||ne.set(t,r)),this.is_fork||(t.v=r)}activate(){S=this}deactivate(){S=null,ne=null}flush(){try{ls=!0,S=this,q(this,ee,Fr).call(this)}finally{Yn=0,_s=null,Ut=null,Dr=null,ls=!1,S=null,ne=null,Rt.clear()}}discard(){for(const t of c(this,Ht))t(this);c(this,Ht).clear(),c(this,xt).clear(),yt.delete(this)}register_created_effect(t){c(this,br).push(t)}increment(t,r){let s=c(this,tt).get(r)??0;if(c(this,tt).set(r,s+1),t){let a=c(this,He).get(r)??0;c(this,He).set(r,a+1)}}decrement(t,r,s){let a=c(this,tt).get(r)??0;if(a===1?c(this,tt).delete(r):c(this,tt).set(r,a-1),t){let i=c(this,He).get(r)??0;i===1?c(this,He).delete(r):c(this,He).set(r,i-1)}c(this,Kt)||s||(D(this,Kt,!0),_t(()=>{D(this,Kt,!1),this.flush()}))}transfer_effects(t,r){for(const s of t)c(this,ut).add(s);for(const s of r)c(this,rt).add(s);t.clear(),r.clear()}oncommit(t){c(this,zt).add(t)}ondiscard(t){c(this,Ht).add(t)}on_fork_commit(t){c(this,xt).add(t)}run_fork_commit_callbacks(){for(const t of c(this,xt))t(this);c(this,xt).clear()}settled(){return(c(this,gr)??D(this,gr,da())).promise}static ensure(){if(S===null){const t=S=new Vr;ls||(yt.add(S),vr||_t(()=>{S===t&&t.flush()}))}return S}apply(){{ne=null;return}}schedule(t){var a;if(_s=t,(a=t.b)!=null&&a.is_pending&&t.f&(Jt|xr|pa)&&!(t.f&jt)){t.b.defer_effect(t);return}for(var r=t;r.parent!==null;){r=r.parent;var s=r.f;if(Ut!==null&&r===O&&(F===null||!(F.f&oe)))return;if(s&(ht|We)){if(!(s&Z))return;r.f^=Z}}c(this,be).push(r)}};zt=new WeakMap,Ht=new WeakMap,xt=new WeakMap,tt=new WeakMap,He=new WeakMap,gr=new WeakMap,be=new WeakMap,br=new WeakMap,ut=new WeakMap,rt=new WeakMap,Be=new WeakMap,Bt=new WeakMap,Kt=new WeakMap,kt=new WeakMap,ee=new WeakSet,Or=function(){return this.is_fork||c(this,He).size>0},Ta=function(){for(const s of c(this,kt))for(const a of c(s,He).keys()){for(var t=!1,r=a;r.parent!==null;){if(c(this,Be).has(r)){t=!0;break}r=r.parent}if(!t)return!0}return!1},Fr=function(){var d,u;if(Yn++>1e3&&(yt.delete(this),ko()),!q(this,ee,Or).call(this)){for(const p of c(this,ut))c(this,rt).delete(p),G(p,ae),this.schedule(p);for(const p of c(this,rt))G(p,Ve),this.schedule(p)}const t=c(this,be);D(this,be,[]),this.apply();var r=Ut=[],s=[],a=Dr=[];for(const p of t)try{q(this,ee,hs).call(this,p,r,s)}catch(g){throw Na(p),g}if(S=null,a.length>0){var i=Vr.ensure();for(const p of a)i.schedule(p)}if(Ut=null,Dr=null,q(this,ee,Or).call(this)||q(this,ee,Ta).call(this)){q(this,ee,Ir).call(this,s),q(this,ee,Ir).call(this,r);for(const[p,g]of c(this,Be))Ra(p,g)}else{c(this,tt).size===0&&yt.delete(this),c(this,ut).clear(),c(this,rt).clear();for(const p of c(this,zt))p(this);c(this,zt).clear(),Gn(s),Gn(r),(d=c(this,gr))==null||d.resolve()}var f=S;if(c(this,be).length>0){const p=f??(f=this);c(p,be).push(...c(this,be).filter(g=>!c(p,be).includes(g)))}f!==null&&(yt.add(f),q(u=f,ee,Fr).call(u))},hs=function(t,r,s){t.f^=Z;for(var a=t.first;a!==null;){var i=a.f,f=(i&(We|ht))!==0,d=f&&(i&Z)!==0,u=d||(i&ue)!==0||c(this,Be).has(a);if(!u&&a.fn!==null){f?a.f^=Z:i&Jt?r.push(a):tr(a)&&(i&Ge&&c(this,rt).add(a),It(a));var p=a.first;if(p!==null){a=p;continue}}for(;a!==null;){var g=a.next;if(g!==null){a=g;break}a=a.parent}}},Ir=function(t){for(var r=0;r<t.length;r+=1)Aa(t[r],c(this,ut),c(this,rt))},Eo=function(){var g,x,w;for(const y of yt){var t=y.id<this.id,r=[];for(const[o,[T,m]]of this.current){if(y.current.has(o)){var s=y.current.get(o)[0];if(t&&T!==s)y.current.set(o,[T,m]);else continue}r.push(o)}var a=[...y.current.keys()].filter(o=>!this.current.has(o));if(a.length===0)t&&y.discard();else if(r.length>0){if(t)for(const o of c(this,Bt))y.unskip_effect(o,T=>{var m;T.f&(Ge|_r)?y.schedule(T):q(m=y,ee,Ir).call(m,[T])});y.activate();var i=new Set,f=new Map;for(var d of r)Ca(d,a,i,f);f=new Map;var u=[...y.current.keys()].filter(o=>this.current.has(o)?this.current.get(o)[0]!==o:!0);for(const o of c(this,br))!(o.f&(Ne|ue|ps))&&Rs(o,u,f)&&(o.f&(_r|Ge)?(G(o,ae),y.schedule(o)):c(y,ut).add(o));if(c(y,be).length>0){y.apply();for(var p of c(y,be))q(g=y,ee,hs).call(g,p,[],[]);D(y,be,[])}y.deactivate()}}for(const y of yt)c(y,kt).has(this)&&(c(y,kt).delete(this),c(y,kt).size===0&&!q(x=y,ee,Or).call(x)&&(y.activate(),q(w=y,ee,Fr).call(w)))};let Ot=Vr;function xo(e){var t=vr;vr=!0;try{for(var r;;){if(mo(),S===null)return r;S.flush()}}finally{vr=t}}function ko(){try{ro()}catch(e){dt(e,_s)}}let Le=null;function Gn(e){var t=e.length;if(t!==0){for(var r=0;r<t;){var s=e[r++];if(!(s.f&(Ne|ue))&&tr(s)&&(Le=new Set,It(s),s.deps===null&&s.first===null&&s.nodes===null&&s.teardown===null&&s.ac===null&&Ha(s),(Le==null?void 0:Le.size)>0)){Rt.clear();for(const a of Le){if(a.f&(Ne|ue))continue;const i=[a];let f=a.parent;for(;f!==null;)Le.has(f)&&(Le.delete(f),i.push(f)),f=f.parent;for(let d=i.length-1;d>=0;d--){const u=i[d];u.f&(Ne|ue)||It(u)}}Le.clear()}}Le=null}}function Ca(e,t,r,s){if(!r.has(e)&&(r.add(e),e.reactions!==null))for(const a of e.reactions){const i=a.f;i&oe?Ca(a,t,r,s):i&(_r|Ge)&&!(i&ae)&&Rs(a,t,s)&&(G(a,ae),Ns(a))}}function Rs(e,t,r){const s=r.get(e);if(s!==void 0)return s;if(e.deps!==null)for(const a of e.deps){if(Gt.call(t,a))return!0;if(a.f&oe&&Rs(a,t,r))return r.set(a,!0),!0}return r.set(e,!1),!1}function Ns(e){S.schedule(e)}function Ra(e,t){if(!(e.f&We&&e.f&Z)){e.f&ae?t.d.push(e):e.f&Ve&&t.m.push(e),G(e,Z);for(var r=e.first;r!==null;)Ra(r,t),r=r.next}}function Na(e){G(e,Z);for(var t=e.first;t!==null;)Na(t),t=t.next}function So(e){let t=0,r=Ft(0),s;return()=>{Fs()&&(n(r),Br(()=>(t===0&&(s=b(()=>e(()=>dr(r)))),t+=1,()=>{_t(()=>{t-=1,t===0&&(s==null||s(),s=void 0,dr(r))})})))}}var Ao=Qt|er;function To(e,t,r,s){new Co(e,t,r,s)}var Se,Ss,Ae,St,de,Te,fe,me,st,At,vt,Yt,mr,yr,nt,qr,J,Ro,No,Mo,gs,jr,Lr,bs,ms;class Co{constructor(t,r,s,a){R(this,J);je(this,"parent");je(this,"is_pending",!1);je(this,"transform_error");R(this,Se);R(this,Ss,null);R(this,Ae);R(this,St);R(this,de);R(this,Te,null);R(this,fe,null);R(this,me,null);R(this,st,null);R(this,At,0);R(this,vt,0);R(this,Yt,!1);R(this,mr,new Set);R(this,yr,new Set);R(this,nt,null);R(this,qr,So(()=>(D(this,nt,Ft(c(this,At))),()=>{D(this,nt,null)})));var i;D(this,Se,t),D(this,Ae,r),D(this,St,f=>{var d=O;d.b=this,d.f|=ds,s(f)}),this.parent=O.b,this.transform_error=a??((i=this.parent)==null?void 0:i.transform_error)??(f=>f),D(this,de,js(()=>{q(this,J,gs).call(this)},Ao))}defer_effect(t){Aa(t,c(this,mr),c(this,yr))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!c(this,Ae).pending}update_pending_count(t,r){q(this,J,bs).call(this,t,r),D(this,At,c(this,At)+t),!(!c(this,nt)||c(this,Yt))&&(D(this,Yt,!0),_t(()=>{D(this,Yt,!1),c(this,nt)&&Zt(c(this,nt),c(this,At))}))}get_effect_pending(){return c(this,qr).call(this),n(c(this,nt))}error(t){if(!c(this,Ae).onerror&&!c(this,Ae).failed)throw t;S!=null&&S.is_fork?(c(this,Te)&&S.skip_effect(c(this,Te)),c(this,fe)&&S.skip_effect(c(this,fe)),c(this,me)&&S.skip_effect(c(this,me)),S.on_fork_commit(()=>{q(this,J,ms).call(this,t)})):q(this,J,ms).call(this,t)}}Se=new WeakMap,Ss=new WeakMap,Ae=new WeakMap,St=new WeakMap,de=new WeakMap,Te=new WeakMap,fe=new WeakMap,me=new WeakMap,st=new WeakMap,At=new WeakMap,vt=new WeakMap,Yt=new WeakMap,mr=new WeakMap,yr=new WeakMap,nt=new WeakMap,qr=new WeakMap,J=new WeakSet,Ro=function(){try{D(this,Te,Ce(()=>c(this,St).call(this,c(this,Se))))}catch(t){this.error(t)}},No=function(t){const r=c(this,Ae).failed;r&&D(this,me,Ce(()=>{r(c(this,Se),()=>t,()=>()=>{})}))},Mo=function(){const t=c(this,Ae).pending;t&&(this.is_pending=!0,D(this,fe,Ce(()=>t(c(this,Se)))),_t(()=>{var r=D(this,st,document.createDocumentFragment()),s=at();r.append(s),D(this,Te,q(this,J,Lr).call(this,()=>Ce(()=>c(this,St).call(this,s)))),c(this,vt)===0&&(c(this,Se).before(r),D(this,st,null),Nt(c(this,fe),()=>{D(this,fe,null)}),q(this,J,jr).call(this,S))}))},gs=function(){try{if(this.is_pending=this.has_pending_snippet(),D(this,vt,0),D(this,At,0),D(this,Te,Ce(()=>{c(this,St).call(this,c(this,Se))})),c(this,vt)>0){var t=D(this,st,document.createDocumentFragment());$s(c(this,Te),t);const r=c(this,Ae).pending;D(this,fe,Ce(()=>r(c(this,Se))))}else q(this,J,jr).call(this,S)}catch(r){this.error(r)}},jr=function(t){this.is_pending=!1,t.transfer_effects(c(this,mr),c(this,yr))},Lr=function(t){var r=O,s=F,a=B;Oe(c(this,de)),De(c(this,de)),Xt(c(this,de).ctx);try{return Ot.ensure(),t()}catch(i){return ka(i),null}finally{Oe(r),De(s),Xt(a)}},bs=function(t,r){var s;if(!this.has_pending_snippet()){this.parent&&q(s=this.parent,J,bs).call(s,t,r);return}D(this,vt,c(this,vt)+t),c(this,vt)===0&&(q(this,J,jr).call(this,r),c(this,fe)&&Nt(c(this,fe),()=>{D(this,fe,null)}),c(this,st)&&(c(this,Se).before(c(this,st)),D(this,st,null)))},ms=function(t){c(this,Te)&&(_e(c(this,Te)),D(this,Te,null)),c(this,fe)&&(_e(c(this,fe)),D(this,fe,null)),c(this,me)&&(_e(c(this,me)),D(this,me,null));var r=c(this,Ae).onerror;let s=c(this,Ae).failed;var a=!1,i=!1;const f=()=>{if(a){_o();return}a=!0,i&&io(),c(this,me)!==null&&Nt(c(this,me),()=>{D(this,me,null)}),q(this,J,Lr).call(this,()=>{q(this,J,gs).call(this)})},d=u=>{try{i=!0,r==null||r(u,f),i=!1}catch(p){dt(p,c(this,de)&&c(this,de).parent)}s&&D(this,me,q(this,J,Lr).call(this,()=>{try{return Ce(()=>{var p=O;p.b=this,p.f|=ds,s(c(this,Se),()=>u,()=>f)})}catch(p){return dt(p,c(this,de).parent),null}}))};_t(()=>{var u;try{u=this.transform_error(t)}catch(p){dt(p,c(this,de)&&c(this,de).parent);return}u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(d,p=>dt(p,c(this,de)&&c(this,de).parent)):d(u)})};function Do(e,t,r,s){const a=Sr()?Ms:Da;var i=e.filter(w=>!w.settled);if(r.length===0&&i.length===0){s(t.map(a));return}var f=O,d=Oo(),u=i.length===1?i[0].promise:i.length>1?Promise.all(i.map(w=>w.promise)):null;function p(w){d();try{s(w)}catch(y){f.f&Ne||dt(y,f)}Wr()}if(r.length===0){u.then(()=>p(t.map(a)));return}var g=Ma();function x(){Promise.all(r.map(w=>Fo(w))).then(w=>p([...t.map(a),...w])).catch(w=>dt(w,f)).finally(()=>g())}u?u.then(()=>{d(),x(),Wr()}):x()}function Oo(){var e=O,t=F,r=B,s=S;return function(i=!0){Oe(e),De(t),Xt(r),i&&!(e.f&Ne)&&(s==null||s.activate(),s==null||s.apply())}}function Wr(e=!0){Oe(null),De(null),Xt(null),e&&(S==null||S.deactivate())}function Ma(){var e=O,t=e.b,r=S,s=t.is_rendered();return t.update_pending_count(1,r),r.increment(s,e),(a=!1)=>{t.update_pending_count(-1,r),r.decrement(s,e,a)}}function Ms(e){var t=oe|ae;return O!==null&&(O.f|=er),{ctx:B,deps:null,effects:null,equals:ma,f:t,fn:e,reactions:null,rv:0,v:re,wv:0,parent:O,ac:null}}function Fo(e,t,r){let s=O;s===null&&Ql();var a=void 0,i=Ft(re),f=!F,d=new Map;return Go(()=>{var y;var u=O,p=da();a=p.promise;try{Promise.resolve(e()).then(p.resolve,p.reject).finally(Wr)}catch(o){p.reject(o),Wr()}var g=S;if(f){if(u.f&jt)var x=Ma();if(s.b.is_rendered())(y=d.get(g))==null||y.reject(et),d.delete(g);else{for(const o of d.values())o.reject(et);d.clear()}d.set(g,p)}const w=(o,T=void 0)=>{if(x){var m=T===et;x(m)}if(!(T===et||u.f&Ne)){if(g.activate(),T)i.f|=pt,Zt(i,T);else{i.f&pt&&(i.f^=pt),Zt(i,o);for(const[C,W]of d){if(d.delete(C),C===g)break;W.reject(et)}}g.deactivate()}};p.promise.then(w,o=>w(null,o||"unknown"))}),Is(()=>{for(const u of d.values())u.reject(et)}),new Promise(u=>{function p(g){function x(){g===a?u(i):p(a)}g.then(x,x)}p(a)})}function Da(e){const t=Ms(e);return t.equals=ya,t}function Io(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)_e(t[r])}}function Ds(e){var t,r=O,s=e.parent;if(!gt&&s!==null&&s.f&(Ne|ue))return vo(),e.v;Oe(s);try{e.f&=~Dt,Io(e),t=Qa(e)}finally{Oe(r)}return t}function Oa(e){var t=Ds(e);if(!e.equals(t)&&(e.wv=Ga(),(!(S!=null&&S.is_fork)||e.deps===null)&&(S!==null?S.capture(e,t,!0):e.v=t,e.deps===null))){G(e,Z);return}gt||(ne!==null?(Fs()||S!=null&&S.is_fork)&&ne.set(e,t):Cs(e))}function jo(e){var t,r;if(e.effects!==null)for(const s of e.effects)(s.teardown||s.ac)&&((t=s.teardown)==null||t.call(s),(r=s.ac)==null||r.abort(et),s.teardown=Yl,s.ac=null,hr(s,0),Ls(s))}function Fa(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&It(t)}let ys=new Set;const Rt=new Map;let Ia=!1;function Ft(e,t){var r={f:0,v:e,reactions:null,equals:ma,rv:0,wv:0};return r}function ct(e,t){const r=Ft(e);return Xo(r),r}function X(e,t=!1,r=!0){var a;const s=Ft(e);return t||(s.equals=ya),kr&&r&&B!==null&&B.l!==null&&((a=B.l).s??(a.s=[])).push(s),s}function ir(e,t){return M(e,b(()=>n(e))),t}function M(e,t,r=!1){F!==null&&(!$e||F.f&ps)&&Sr()&&F.f&(oe|Ge|_r|ps)&&(Me===null||!Gt.call(Me,e))&&ao();let s=r?cr(t):t;return Zt(e,s,Dr)}function Zt(e,t,r=null){if(!e.equals(t)){Rt.set(e,gt?t:e.v);var s=Ot.ensure();if(s.capture(e,t),e.f&oe){const a=e;e.f&ae&&Ds(a),ne===null&&Cs(a)}e.wv=Ga(),ja(e,ae,r),Sr()&&O!==null&&O.f&Z&&!(O.f&(We|ht))&&(ke===null?Zo([e]):ke.push(e)),!s.is_fork&&ys.size>0&&!Ia&&Lo()}return t}function Lo(){Ia=!1;for(const e of ys)e.f&Z&&G(e,Ve),tr(e)&&It(e);ys.clear()}function dr(e){M(e,e.v+1)}function ja(e,t,r){var s=e.reactions;if(s!==null)for(var a=Sr(),i=s.length,f=0;f<i;f++){var d=s[f],u=d.f;if(!(!a&&d===O)){var p=(u&ae)===0;if(p&&G(d,t),u&oe){var g=d;ne==null||ne.delete(g),u&Dt||(u&Re&&(O===null||!(O.f&$r))&&(d.f|=Dt),ja(g,Ve,r))}else if(p){var x=d;u&Ge&&Le!==null&&Le.add(x),r!==null?r.push(x):Ns(x)}}}}function cr(e){if(typeof e!="object"||e===null||Ct in e)return e;const t=Ts(e);if(t!==Bl&&t!==Kl)return e;var r=new Map,s=As(e),a=ct(0),i=Mt,f=d=>{if(Mt===i)return d();var u=F,p=Mt;De(null),ea(i);var g=d();return De(u),ea(p),g};return s&&r.set("length",ct(e.length)),new Proxy(e,{defineProperty(d,u,p){(!("value"in p)||p.configurable===!1||p.enumerable===!1||p.writable===!1)&&so();var g=r.get(u);return g===void 0?f(()=>{var x=ct(p.value);return r.set(u,x),x}):M(g,p.value,!0),!0},deleteProperty(d,u){var p=r.get(u);if(p===void 0){if(u in d){const g=f(()=>ct(re));r.set(u,g),dr(a)}}else M(p,re),dr(a);return!0},get(d,u,p){var y;if(u===Ct)return e;var g=r.get(u),x=u in d;if(g===void 0&&(!x||(y=ur(d,u))!=null&&y.writable)&&(g=f(()=>{var o=cr(x?d[u]:re),T=ct(o);return T}),r.set(u,g)),g!==void 0){var w=n(g);return w===re?void 0:w}return Reflect.get(d,u,p)},getOwnPropertyDescriptor(d,u){var p=Reflect.getOwnPropertyDescriptor(d,u);if(p&&"value"in p){var g=r.get(u);g&&(p.value=n(g))}else if(p===void 0){var x=r.get(u),w=x==null?void 0:x.v;if(x!==void 0&&w!==re)return{enumerable:!0,configurable:!0,value:w,writable:!0}}return p},has(d,u){var w;if(u===Ct)return!0;var p=r.get(u),g=p!==void 0&&p.v!==re||Reflect.has(d,u);if(p!==void 0||O!==null&&(!g||(w=ur(d,u))!=null&&w.writable)){p===void 0&&(p=f(()=>{var y=g?cr(d[u]):re,o=ct(y);return o}),r.set(u,p));var x=n(p);if(x===re)return!1}return g},set(d,u,p,g){var L;var x=r.get(u),w=u in d;if(s&&u==="length")for(var y=p;y<x.v;y+=1){var o=r.get(y+"");o!==void 0?M(o,re):y in d&&(o=f(()=>ct(re)),r.set(y+"",o))}if(x===void 0)(!w||(L=ur(d,u))!=null&&L.writable)&&(x=f(()=>ct(void 0)),M(x,cr(p)),r.set(u,x));else{w=x.v!==re;var T=f(()=>cr(p));M(x,T)}var m=Reflect.getOwnPropertyDescriptor(d,u);if(m!=null&&m.set&&m.set.call(g,p),!w){if(s&&typeof u=="string"){var C=r.get("length"),W=Number(u);Number.isInteger(W)&&W>=C.v&&M(C,W+1)}dr(a)}return!0},ownKeys(d){n(a);var u=Reflect.ownKeys(d).filter(x=>{var w=r.get(x);return w===void 0||w.v!==re});for(var[p,g]of r)g.v!==re&&!(p in d)&&u.push(p);return u},setPrototypeOf(){no()}})}function Jn(e){try{if(e!==null&&typeof e=="object"&&Ct in e)return e[Ct]}catch{}return e}function Po(e,t){return Object.is(Jn(e),Jn(t))}var Qn,La,Pa,$a;function $o(){if(Qn===void 0){Qn=window,La=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;Pa=ur(t,"firstChild").get,$a=ur(t,"nextSibling").get,Bn(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),Bn(r)&&(r.__t=void 0)}}function at(e=""){return document.createTextNode(e)}function Os(e){return Pa.call(e)}function Ar(e){return $a.call(e)}function _(e,t){return Os(e)}function Wo(e,t=!1){{var r=Os(e);return r instanceof Comment&&r.data===""?Ar(r):r}}function h(e,t=1,r=!1){let s=e;for(;t--;)s=Ar(s);return s}function Vo(e){e.textContent=""}function Wa(){return!1}function qo(e,t,r){return document.createElementNS(ba,e,void 0)}let Xn=!1;function Uo(){Xn||(Xn=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{var t;if(!e.defaultPrevented)for(const r of e.target.elements)(t=r.__on_r)==null||t.call(r)})},{capture:!0}))}function Hr(e){var t=F,r=O;De(null),Oe(null);try{return e()}finally{De(t),Oe(r)}}function Va(e,t,r,s=r){e.addEventListener(t,()=>Hr(r));const a=e.__on_r;a?e.__on_r=()=>{a(),s(!0)}:e.__on_r=()=>s(!0),Uo()}function qa(e){O===null&&(F===null&&to(),eo()),gt&&Zl()}function zo(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function Je(e,t){var r=O;r!==null&&r.f&ue&&(e|=ue);var s={ctx:B,deps:null,nodes:null,f:e|ae|Re,first:null,fn:t,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};S==null||S.register_created_effect(s);var a=s;if(e&Jt)Ut!==null?Ut.push(s):Ot.ensure().schedule(s);else if(t!==null){try{It(s)}catch(f){throw _e(s),f}a.deps===null&&a.teardown===null&&a.nodes===null&&a.first===a.last&&!(a.f&er)&&(a=a.first,e&Ge&&e&Qt&&a!==null&&(a.f|=Qt))}if(a!==null&&(a.parent=r,r!==null&&zo(a,r),F!==null&&F.f&oe&&!(e&ht))){var i=F;(i.effects??(i.effects=[])).push(a)}return s}function Fs(){return F!==null&&!$e}function Is(e){const t=Je(xr,null);return G(t,Z),t.teardown=e,t}function ws(e){qa();var t=O.f,r=!F&&(t&We)!==0&&(t&jt)===0;if(r){var s=B;(s.e??(s.e=[])).push(e)}else return Ua(e)}function Ua(e){return Je(Jt|_a,e)}function Ho(e){return qa(),Je(xr|_a,e)}function Bo(e){Ot.ensure();const t=Je(ht|er,e);return(r={})=>new Promise(s=>{r.outro?Nt(t,()=>{_e(t),s(void 0)}):(_e(t),s(void 0))})}function Ko(e){return Je(Jt,e)}function xe(e,t){var r=B,s={effect:null,ran:!1,deps:e};r.l.$.push(s),s.effect=Br(()=>{if(e(),!s.ran){s.ran=!0;var a=O;try{Oe(a.parent),b(t)}finally{Oe(a)}}})}function Yo(){var e=B;Br(()=>{for(var t of e.l.$){t.deps();var r=t.effect;r.f&Z&&r.deps!==null&&G(r,Ve),tr(r)&&It(r),t.ran=!1}})}function Go(e){return Je(_r|er,e)}function Br(e,t=0){return Je(xr|t,e)}function U(e,t=[],r=[],s=[]){Do(s,t,r,a=>{Je(xr,()=>e(...a.map(n)))})}function js(e,t=0){var r=Je(Ge|t,e);return r}function Ce(e){return Je(We|er,e)}function za(e){var t=e.teardown;if(t!==null){const r=gt,s=F;Zn(!0),De(null);try{t.call(null)}finally{Zn(r),De(s)}}}function Ls(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){const a=r.ac;a!==null&&Hr(()=>{a.abort(et)});var s=r.next;r.f&ht?r.parent=null:_e(r,t),r=s}}function Jo(e){for(var t=e.first;t!==null;){var r=t.next;t.f&We||_e(t),t=r}}function _e(e,t=!0){var r=!1;(t||e.f&Jl)&&e.nodes!==null&&e.nodes.end!==null&&(Qo(e.nodes.start,e.nodes.end),r=!0),G(e,Kn),Ls(e,t&&!r),hr(e,0);var s=e.nodes&&e.nodes.t;if(s!==null)for(const i of s)i.stop();za(e),e.f^=Kn,e.f|=Ne;var a=e.parent;a!==null&&a.first!==null&&Ha(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Qo(e,t){for(;e!==null;){var r=e===t?null:Ar(e);e.remove(),e=r}}function Ha(e){var t=e.parent,r=e.prev,s=e.next;r!==null&&(r.next=s),s!==null&&(s.prev=r),t!==null&&(t.first===e&&(t.first=s),t.last===e&&(t.last=r))}function Nt(e,t,r=!0){var s=[];Ba(e,s,!0);var a=()=>{r&&_e(e),t&&t()},i=s.length;if(i>0){var f=()=>--i||a();for(var d of s)d.out(f)}else a()}function Ba(e,t,r){if(!(e.f&ue)){e.f^=ue;var s=e.nodes&&e.nodes.t;if(s!==null)for(const d of s)(d.is_global||r)&&t.push(d);for(var a=e.first;a!==null;){var i=a.next;if(!(a.f&ht)){var f=(a.f&Qt)!==0||(a.f&We)!==0&&(e.f&Ge)!==0;Ba(a,t,f?r:!1)}a=i}}}function Ps(e){Ka(e,!0)}function Ka(e,t){if(e.f&ue){e.f^=ue,e.f&Z||(G(e,ae),Ot.ensure().schedule(e));for(var r=e.first;r!==null;){var s=r.next,a=(r.f&Qt)!==0||(r.f&We)!==0;Ka(r,a?t:!1),r=s}var i=e.nodes&&e.nodes.t;if(i!==null)for(const f of i)(f.is_global||t)&&f.in()}}function $s(e,t){if(e.nodes)for(var r=e.nodes.start,s=e.nodes.end;r!==null;){var a=r===s?null:Ar(r);t.append(r),r=a}}let Pr=!1,gt=!1;function Zn(e){gt=e}let F=null,$e=!1;function De(e){F=e}let O=null;function Oe(e){O=e}let Me=null;function Xo(e){F!==null&&(Me===null?Me=[e]:Me.push(e))}let pe=null,ge=0,ke=null;function Zo(e){ke=e}let Ya=1,Et=0,Mt=Et;function ea(e){Mt=e}function Ga(){return++Ya}function tr(e){var t=e.f;if(t&ae)return!0;if(t&oe&&(e.f&=~Dt),t&Ve){for(var r=e.deps,s=r.length,a=0;a<s;a++){var i=r[a];if(tr(i)&&Oa(i),i.wv>e.wv)return!0}t&Re&&ne===null&&G(e,Z)}return!1}function Ja(e,t,r=!0){var s=e.reactions;if(s!==null&&!(Me!==null&&Gt.call(Me,e)))for(var a=0;a<s.length;a++){var i=s[a];i.f&oe?Ja(i,t,!1):t===i&&(r?G(i,ae):i.f&Z&&G(i,Ve),Ns(i))}}function Qa(e){var T;var t=pe,r=ge,s=ke,a=F,i=Me,f=B,d=$e,u=Mt,p=e.f;pe=null,ge=0,ke=null,F=p&(We|ht)?null:e,Me=null,Xt(e.ctx),$e=!1,Mt=++Et,e.ac!==null&&(Hr(()=>{e.ac.abort(et)}),e.ac=null);try{e.f|=$r;var g=e.fn,x=g();e.f|=jt;var w=e.deps,y=S==null?void 0:S.is_fork;if(pe!==null){var o;if(y||hr(e,ge),w!==null&&ge>0)for(w.length=ge+pe.length,o=0;o<pe.length;o++)w[ge+o]=pe[o];else e.deps=w=pe;if(Fs()&&e.f&Re)for(o=ge;o<w.length;o++)((T=w[o]).reactions??(T.reactions=[])).push(e)}else!y&&w!==null&&ge<w.length&&(hr(e,ge),w.length=ge);if(Sr()&&ke!==null&&!$e&&w!==null&&!(e.f&(oe|Ve|ae)))for(o=0;o<ke.length;o++)Ja(ke[o],e);if(a!==null&&a!==e){if(Et++,a.deps!==null)for(let m=0;m<r;m+=1)a.deps[m].rv=Et;if(t!==null)for(const m of t)m.rv=Et;ke!==null&&(s===null?s=ke:s.push(...ke))}return e.f&pt&&(e.f^=pt),x}catch(m){return ka(m)}finally{e.f^=$r,pe=t,ge=r,ke=s,F=a,Me=i,Xt(f),$e=d,Mt=u}}function ec(e,t){let r=t.reactions;if(r!==null){var s=zl.call(r,e);if(s!==-1){var a=r.length-1;a===0?r=t.reactions=null:(r[s]=r[a],r.pop())}}if(r===null&&t.f&oe&&(pe===null||!Gt.call(pe,t))){var i=t;i.f&Re&&(i.f^=Re,i.f&=~Dt),i.v!==re&&Cs(i),jo(i),hr(i,0)}}function hr(e,t){var r=e.deps;if(r!==null)for(var s=t;s<r.length;s++)ec(e,r[s])}function It(e){var t=e.f;if(!(t&Ne)){G(e,Z);var r=O,s=Pr;O=e,Pr=!0;try{t&(Ge|pa)?Jo(e):Ls(e),za(e);var a=Qa(e);e.teardown=typeof a=="function"?a:null,e.wv=Ya;var i;Ul&&go&&e.f&ae&&e.deps}finally{Pr=s,O=r}}}async function tc(){await Promise.resolve(),xo()}function n(e){var t=e.f,r=(t&oe)!==0;if(F!==null&&!$e){var s=O!==null&&(O.f&Ne)!==0;if(!s&&(Me===null||!Gt.call(Me,e))){var a=F.deps;if(F.f&$r)e.rv<Et&&(e.rv=Et,pe===null&&a!==null&&a[ge]===e?ge++:pe===null?pe=[e]:pe.push(e));else{(F.deps??(F.deps=[])).push(e);var i=e.reactions;i===null?e.reactions=[F]:Gt.call(i,F)||i.push(F)}}}if(gt&&Rt.has(e))return Rt.get(e);if(r){var f=e;if(gt){var d=f.v;return(!(f.f&Z)&&f.reactions!==null||Za(f))&&(d=Ds(f)),Rt.set(f,d),d}var u=(f.f&Re)===0&&!$e&&F!==null&&(Pr||(F.f&Re)!==0),p=(f.f&jt)===0;tr(f)&&(u&&(f.f|=Re),Oa(f)),u&&!p&&(Fa(f),Xa(f))}if(ne!=null&&ne.has(e))return ne.get(e);if(e.f&pt)throw e.v;return e.v}function Xa(e){if(e.f|=Re,e.deps!==null)for(const t of e.deps)(t.reactions??(t.reactions=[])).push(e),t.f&oe&&!(t.f&Re)&&(Fa(t),Xa(t))}function Za(e){if(e.v===re)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(Rt.has(t)||t.f&oe&&Za(t))return!0;return!1}function b(e){var t=$e;try{return $e=!0,e()}finally{$e=t}}function rc(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(Ct in e)Es(e);else if(!Array.isArray(e))for(let t in e){const r=e[t];typeof r=="object"&&r&&Ct in r&&Es(r)}}}function Es(e,t=new Set){if(typeof e=="object"&&e!==null&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let s in e)try{Es(e[s],t)}catch{}const r=Ts(e);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){const s=va(r);for(let a in s){const i=s[a].get;if(i)try{i.call(e)}catch{}}}}}const sc=["touchstart","touchmove"];function nc(e){return sc.includes(e)}const Rr=Symbol("events"),ac=new Set,ta=new Set;function ic(e,t,r,s={}){function a(i){if(s.capture||xs.call(t,i),!i.cancelBubble)return Hr(()=>r==null?void 0:r.call(this,i))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?_t(()=>{t.addEventListener(e,a,s)}):t.addEventListener(e,a,s),a}function ra(e,t,r,s,a){var i={capture:s,passive:a},f=ic(e,t,r,i);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Is(()=>{t.removeEventListener(e,f,i)})}let sa=null;function xs(e){var m,C;var t=this,r=t.ownerDocument,s=e.type,a=((m=e.composedPath)==null?void 0:m.call(e))||[],i=a[0]||e.target;sa=e;var f=0,d=sa===e&&e[Rr];if(d){var u=a.indexOf(d);if(u!==-1&&(t===document||t===window)){e[Rr]=t;return}var p=a.indexOf(t);if(p===-1)return;u<=p&&(f=u)}if(i=a[f]||e.target,i!==t){Hl(e,"currentTarget",{configurable:!0,get(){return i||r}});var g=F,x=O;De(null),Oe(null);try{for(var w,y=[];i!==null;){var o=i.assignedSlot||i.parentNode||i.host||null;try{var T=(C=i[Rr])==null?void 0:C[s];T!=null&&(!i.disabled||e.target===i)&&T.call(i,e)}catch(W){w?y.push(W):w=W}if(e.cancelBubble||o===t||o===null)break;i=o}if(w){for(let W of y)queueMicrotask(()=>{throw W});throw w}}finally{e[Rr]=t,delete e.currentTarget,De(g),Oe(x)}}}var fa;const os=((fa=globalThis==null?void 0:globalThis.window)==null?void 0:fa.trustedTypes)&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function lc(e){return(os==null?void 0:os.createHTML(e))??e}function oc(e){var t=qo("template");return t.innerHTML=lc(e.replaceAll("<!>","<!---->")),t.content}function Ws(e,t){var r=O;r.nodes===null&&(r.nodes={start:e,end:t,a:null,t:null})}function V(e,t){var r=(t&uo)!==0,s,a=!e.startsWith("<!>");return()=>{s===void 0&&(s=oc(a?e:"<!>"+e),s=Os(s));var i=r||La?document.importNode(s,!0):s.cloneNode(!0);return Ws(i,i),i}}function na(e=""){{var t=at(e+"");return Ws(t,t),t}}function cc(){var e=document.createDocumentFragment(),t=document.createComment(""),r=at();return e.append(t,r),Ws(t,r),e}function P(e,t){e!==null&&e.before(t)}function k(e,t){var r=t==null?"":typeof t=="object"?`${t}`:t;r!==(e.__t??(e.__t=e.nodeValue))&&(e.__t=r,e.nodeValue=`${r}`)}function fc(e,t){return uc(e,t)}const Nr=new Map;function uc(e,{target:t,anchor:r,props:s={},events:a,context:i,intro:f=!0,transformError:d}){$o();var u=void 0,p=Bo(()=>{var g=r??t.appendChild(at());To(g,{pending:()=>{}},y=>{wa({});var o=B;i&&(o.c=i),a&&(s.$$events=a),u=e(y,s)||{},Ea()},d);var x=new Set,w=y=>{for(var o=0;o<y.length;o++){var T=y[o];if(!x.has(T)){x.add(T);var m=nc(T);for(const L of[t,document]){var C=Nr.get(L);C===void 0&&(C=new Map,Nr.set(L,C));var W=C.get(T);W===void 0?(L.addEventListener(T,xs,{passive:m}),C.set(T,1)):C.set(T,W+1)}}}};return w(zr(ac)),ta.add(w),()=>{var m;for(var y of x)for(const C of[t,document]){var o=Nr.get(C),T=o.get(y);--T==0?(C.removeEventListener(y,xs),o.delete(y),o.size===0&&Nr.delete(C)):o.set(y,T)}ta.delete(w),g!==r&&((m=g.parentNode)==null||m.removeChild(g))}});return vc.set(u,p),u}let vc=new WeakMap;var Pe,Ke,ye,Tt,wr,Er,Ur;class dc{constructor(t,r=!0){je(this,"anchor");R(this,Pe,new Map);R(this,Ke,new Map);R(this,ye,new Map);R(this,Tt,new Set);R(this,wr,!0);R(this,Er,t=>{if(c(this,Pe).has(t)){var r=c(this,Pe).get(t),s=c(this,Ke).get(r);if(s)Ps(s),c(this,Tt).delete(r);else{var a=c(this,ye).get(r);a&&(c(this,Ke).set(r,a.effect),c(this,ye).delete(r),a.fragment.lastChild.remove(),this.anchor.before(a.fragment),s=a.effect)}for(const[i,f]of c(this,Pe)){if(c(this,Pe).delete(i),i===t)break;const d=c(this,ye).get(f);d&&(_e(d.effect),c(this,ye).delete(f))}for(const[i,f]of c(this,Ke)){if(i===r||c(this,Tt).has(i))continue;const d=()=>{if(Array.from(c(this,Pe).values()).includes(i)){var p=document.createDocumentFragment();$s(f,p),p.append(at()),c(this,ye).set(i,{effect:f,fragment:p})}else _e(f);c(this,Tt).delete(i),c(this,Ke).delete(i)};c(this,wr)||!s?(c(this,Tt).add(i),Nt(f,d,!1)):d()}}});R(this,Ur,t=>{c(this,Pe).delete(t);const r=Array.from(c(this,Pe).values());for(const[s,a]of c(this,ye))r.includes(s)||(_e(a.effect),c(this,ye).delete(s))});this.anchor=t,D(this,wr,r)}ensure(t,r){var s=S,a=Wa();if(r&&!c(this,Ke).has(t)&&!c(this,ye).has(t))if(a){var i=document.createDocumentFragment(),f=at();i.append(f),c(this,ye).set(t,{effect:Ce(()=>r(f)),fragment:i})}else c(this,Ke).set(t,Ce(()=>r(this.anchor)));if(c(this,Pe).set(s,t),a){for(const[d,u]of c(this,Ke))d===t?s.unskip_effect(u):s.skip_effect(u);for(const[d,u]of c(this,ye))d===t?s.unskip_effect(u.effect):s.skip_effect(u.effect);s.oncommit(c(this,Er)),s.ondiscard(c(this,Ur))}else c(this,Er).call(this,s)}}Pe=new WeakMap,Ke=new WeakMap,ye=new WeakMap,Tt=new WeakMap,wr=new WeakMap,Er=new WeakMap,Ur=new WeakMap;function ce(e,t,r=!1){var s=new dc(e),a=r?Qt:0;function i(f,d){s.ensure(f,d)}js(()=>{var f=!1;t((d,u=0)=>{f=!0,i(u,d)}),f||i(-1,null)},a)}function pc(e,t,r){for(var s=[],a=t.length,i,f=t.length,d=0;d<a;d++){let x=t[d];Nt(x,()=>{if(i){if(i.pending.delete(x),i.done.add(x),i.pending.size===0){var w=e.outrogroups;ks(e,zr(i.done)),w.delete(i),w.size===0&&(e.outrogroups=null)}}else f-=1},!1)}if(f===0){var u=s.length===0&&r!==null;if(u){var p=r,g=p.parentNode;Vo(g),g.append(p),e.items.clear()}ks(e,t,!u)}else i={pending:new Set(t),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(i)}function ks(e,t,r=!0){var s;if(e.pending.size>0){s=new Set;for(const f of e.pending.values())for(const d of f)s.add(e.items.get(d).e)}for(var a=0;a<t.length;a++){var i=t[a];if(s!=null&&s.has(i)){i.f|=Ye;const f=document.createDocumentFragment();$s(i,f)}else _e(t[a],r)}}var aa;function qt(e,t,r,s,a,i=null){var f=e,d=new Map,u=(t&ga)!==0;if(u){var p=e;f=p.appendChild(at())}var g=null,x=Da(()=>{var L=r();return As(L)?L:L==null?[]:zr(L)}),w,y=new Map,o=!0;function T(L){W.effect.f&Ne||(W.pending.delete(L),W.fallback=g,_c(W,w,f,t,s),g!==null&&(w.length===0?g.f&Ye?(g.f^=Ye,fr(g,null,f)):Ps(g):Nt(g,()=>{g=null})))}function m(L){W.pending.delete(L)}var C=js(()=>{w=n(x);for(var L=w.length,Q=new Set,ie=S,qe=Wa(),I=0;I<L;I+=1){var Qe=w[I],it=s(Qe,I),ve=o?null:d.get(it);ve?(ve.v&&Zt(ve.v,Qe),ve.i&&Zt(ve.i,I),qe&&ie.unskip_effect(ve.e)):(ve=hc(d,o?f:aa??(aa=at()),Qe,it,I,a,t,r),o||(ve.e.f|=Ye),d.set(it,ve)),Q.add(it)}if(L===0&&i&&!g&&(o?g=Ce(()=>i(f)):(g=Ce(()=>i(aa??(aa=at()))),g.f|=Ye)),L>Q.size&&Xl(),!o)if(y.set(ie,Q),qe){for(const[Xe,Lt]of d)Q.has(Xe)||ie.skip_effect(Lt.e);ie.oncommit(T),ie.ondiscard(m)}else T(ie);n(x)}),W={effect:C,items:d,pending:y,outrogroups:null,fallback:g};o=!1}function lr(e){for(;e!==null&&!(e.f&We);)e=e.next;return e}function _c(e,t,r,s,a){var ve,Xe,Lt,Pt,rr,bt,Tr,sr,nr;var i=(s&co)!==0,f=t.length,d=e.items,u=lr(e.effect.first),p,g=null,x,w=[],y=[],o,T,m,C;if(i)for(C=0;C<f;C+=1)o=t[C],T=a(o,C),m=d.get(T).e,m.f&Ye||((Xe=(ve=m.nodes)==null?void 0:ve.a)==null||Xe.measure(),(x??(x=new Set)).add(m));for(C=0;C<f;C+=1){if(o=t[C],T=a(o,C),m=d.get(T).e,e.outrogroups!==null)for(const we of e.outrogroups)we.pending.delete(m),we.done.delete(m);if(m.f&ue&&(Ps(m),i&&((Pt=(Lt=m.nodes)==null?void 0:Lt.a)==null||Pt.unfix(),(x??(x=new Set)).delete(m))),m.f&Ye)if(m.f^=Ye,m===u)fr(m,null,r);else{var W=g?g.next:u;m===e.effect.last&&(e.effect.last=m.prev),m.prev&&(m.prev.next=m.next),m.next&&(m.next.prev=m.prev),ft(e,g,m),ft(e,m,W),fr(m,W,r),g=m,w=[],y=[],u=lr(g.next);continue}if(m!==u){if(p!==void 0&&p.has(m)){if(w.length<y.length){var L=y[0],Q;g=L.prev;var ie=w[0],qe=w[w.length-1];for(Q=0;Q<w.length;Q+=1)fr(w[Q],L,r);for(Q=0;Q<y.length;Q+=1)p.delete(y[Q]);ft(e,ie.prev,qe.next),ft(e,g,ie),ft(e,qe,L),u=L,g=qe,C-=1,w=[],y=[]}else p.delete(m),fr(m,u,r),ft(e,m.prev,m.next),ft(e,m,g===null?e.effect.first:g.next),ft(e,g,m),g=m;continue}for(w=[],y=[];u!==null&&u!==m;)(p??(p=new Set)).add(u),y.push(u),u=lr(u.next);if(u===null)continue}m.f&Ye||w.push(m),g=m,u=lr(m.next)}if(e.outrogroups!==null){for(const we of e.outrogroups)we.pending.size===0&&(ks(e,zr(we.done)),(rr=e.outrogroups)==null||rr.delete(we));e.outrogroups.size===0&&(e.outrogroups=null)}if(u!==null||p!==void 0){var I=[];if(p!==void 0)for(m of p)m.f&ue||I.push(m);for(;u!==null;)!(u.f&ue)&&u!==e.fallback&&I.push(u),u=lr(u.next);var Qe=I.length;if(Qe>0){var it=s&ga&&f===0?r:null;if(i){for(C=0;C<Qe;C+=1)(Tr=(bt=I[C].nodes)==null?void 0:bt.a)==null||Tr.measure();for(C=0;C<Qe;C+=1)(nr=(sr=I[C].nodes)==null?void 0:sr.a)==null||nr.fix()}pc(e,I,it)}}i&&_t(()=>{var we,ar;if(x!==void 0)for(m of x)(ar=(we=m.nodes)==null?void 0:we.a)==null||ar.apply()})}function hc(e,t,r,s,a,i,f,d){var u=f&lo?f&fo?Ft(r):X(r,!1,!1):null,p=f&oo?Ft(a):null;return{v:u,i:p,e:Ce(()=>(i(t,u??r,p??a,d),()=>{e.delete(s)}))}}function fr(e,t,r){if(e.nodes)for(var s=e.nodes.start,a=e.nodes.end,i=t&&!(t.f&Ye)?t.nodes.start:r;s!==null;){var f=Ar(s);if(i.before(s),s===a)return;s=f}}function ft(e,t,r){t===null?e.effect.first=r:t.next=r,r===null?e.effect.last=t:r.prev=t}const ia=[...`
|
|
2
|
-
\r\f \v\uFEFF`];function gc(e,t,r){var s=e==null?"":""+e;if(r){for(var a of Object.keys(r))if(r[a])s=s?s+" "+a:a;else if(s.length)for(var i=a.length,f=0;(f=s.indexOf(a,f))>=0;){var d=f+i;(f===0||ia.includes(s[f-1]))&&(d===s.length||ia.includes(s[d]))?s=(f===0?"":s.substring(0,f))+s.substring(d+1):f=d}}return s===""?null:s}function bc(e,t){return e==null?null:String(e)}function or(e,t,r,s,a,i){var f=e.__className;if(f!==r||f===void 0){var d=gc(r,s,i);d==null?e.removeAttribute("class"):e.className=d,e.__className=r}else if(i&&a!==i)for(var u in i){var p=!!i[u];(a==null||p!==!!a[u])&&e.classList.toggle(u,p)}return i}function la(e,t,r,s){var a=e.__style;if(a!==t){var i=bc(t);i==null?e.removeAttribute("style"):e.style.cssText=i,e.__style=t}return s}function ei(e,t,r=!1){if(e.multiple){if(t==null)return;if(!As(t))return po();for(var s of e.options)s.selected=t.includes(pr(s));return}for(s of e.options){var a=pr(s);if(Po(a,t)){s.selected=!0;return}}(!r||t!==void 0)&&(e.selectedIndex=-1)}function mc(e){var t=new MutationObserver(()=>{ei(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Is(()=>{t.disconnect()})}function cs(e,t,r=t){var s=new WeakSet,a=!0;Va(e,"change",i=>{var f=i?"[selected]":":checked",d;if(e.multiple)d=[].map.call(e.querySelectorAll(f),pr);else{var u=e.querySelector(f)??e.querySelector("option:not([disabled])");d=u&&pr(u)}r(d),e.__value=d,S!==null&&s.add(S)}),Ko(()=>{var i=t();if(e===document.activeElement){var f=S;if(s.has(f))return}if(ei(e,i,a),a&&i===void 0){var d=e.querySelector(":checked");d!==null&&(i=pr(d),r(i))}e.__value=i,a=!1}),mc(e)}function pr(e){return"__value"in e?e.__value:e.value}const yc=Symbol("is custom element"),wc=Symbol("is html");function Ec(e,t,r,s){var a=xc(e);a[t]!==(a[t]=r)&&(r==null?e.removeAttribute(t):typeof r!="string"&&kc(e).includes(t)?e[t]=r:e.setAttribute(t,r))}function xc(e){return e.__attributes??(e.__attributes={[yc]:e.nodeName.includes("-"),[wc]:e.namespaceURI===ba})}var oa=new Map;function kc(e){var t=e.getAttribute("is")||e.nodeName,r=oa.get(t);if(r)return r;oa.set(t,r=[]);for(var s,a=e,i=Element.prototype;i!==a;){s=va(a);for(var f in s)s[f].set&&r.push(f);a=Ts(a)}return r}function Mr(e,t,r=t){var s=new WeakSet;Va(e,"input",async a=>{var i=a?e.defaultValue:e.value;if(i=fs(e)?us(i):i,r(i),S!==null&&s.add(S),await tc(),i!==(i=t())){var f=e.selectionStart,d=e.selectionEnd,u=e.value.length;if(e.value=i??"",d!==null){var p=e.value.length;f===d&&d===u&&p>u?(e.selectionStart=p,e.selectionEnd=p):(e.selectionStart=f,e.selectionEnd=Math.min(d,p))}}}),b(t)==null&&e.value&&(r(fs(e)?us(e.value):e.value),S!==null&&s.add(S)),Br(()=>{var a=t();if(e===document.activeElement){var i=S;if(s.has(i))return}fs(e)&&a===us(e.value)||e.type==="date"&&!a&&!e.value||a!==e.value&&(e.value=a??"")})}function fs(e){var t=e.type;return t==="number"||t==="range"}function us(e){return e===""?null:+e}function Sc(e){return function(...t){var r=t[0];return r.preventDefault(),e==null?void 0:e.apply(this,t)}}function Ac(e=!1){const t=B,r=t.l.u;if(!r)return;let s=()=>rc(t.s);if(e){let a=0,i={};const f=Ms(()=>{let d=!1;const u=t.s;for(const p in u)u[p]!==i[p]&&(i[p]=u[p],d=!0);return d&&a++,a});s=()=>n(f)}r.b.length&&Ho(()=>{ca(t,s),vs(r.b)}),ws(()=>{const a=b(()=>r.m.map(Gl));return()=>{for(const i of a)typeof i=="function"&&i()}}),r.a.length&&ws(()=>{ca(t,s),vs(r.a)})}function ca(e,t){if(e.l.s)for(const r of e.l.s)n(r);t()}function Tc(e){B===null&&ha(),kr&&B.l!==null?Rc(B).m.push(e):ws(()=>{const t=b(e);if(typeof t=="function")return t})}function Cc(e){B===null&&ha(),Tc(()=>()=>b(e))}function Rc(e){var t=e.l;return t.u??(t.u={a:[],b:[],m:[]})}const Nc="5";var ua;typeof window<"u"&&((ua=window.__svelte??(window.__svelte={})).v??(ua.v=new Set)).add(Nc);bo();var Mc=V('<div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Watch issue</span><strong class="status-warn svelte-d3ct2b"> </strong></div>'),Dc=V('<section class="notice svelte-d3ct2b"> </section>'),Oc=V('<section class="notice danger svelte-d3ct2b"> </section>'),Fc=V('<p class="terminal-line svelte-d3ct2b"><time class="svelte-d3ct2b">--:--:--</time><span class="sys svelte-d3ct2b">SYS</span><strong class="svelte-d3ct2b">Waiting for memory-core watch output...</strong></p>'),Ic=V('<strong class="svelte-d3ct2b"> </strong>'),jc=V('<strong class="svelte-d3ct2b"> </strong>'),Lc=V('<strong class="svelte-d3ct2b"> </strong>'),Pc=V('<strong class="svelte-d3ct2b"> </strong>'),$c=V('<strong class="svelte-d3ct2b"> </strong>'),Wc=V('<p class="svelte-d3ct2b"><b class="svelte-d3ct2b">Why:</b> </p>'),Vc=V('<p class="svelte-d3ct2b"><b class="svelte-d3ct2b">Issue:</b> </p>'),qc=V('<p class="svelte-d3ct2b"><b class="svelte-d3ct2b">Fix:</b> </p>'),Uc=V('<pre class="svelte-d3ct2b"> </pre>'),zc=V('<div class="terminal-detail svelte-d3ct2b"><p class="svelte-d3ct2b"> </p> <p class="svelte-d3ct2b"><b class="svelte-d3ct2b">Rule:</b> </p> <!> <!> <!> <!></div>'),Hc=V('<section><p class="terminal-line svelte-d3ct2b"><time class="svelte-d3ct2b"> </time> <span class="svelte-d3ct2b"> </span> <!></p> <!></section>'),Bc=V('<div class="metric-row svelte-d3ct2b"><div class="svelte-d3ct2b"><span class="svelte-d3ct2b"> </span> <strong class="svelte-d3ct2b"> </strong></div> <i class="svelte-d3ct2b"></i></div>'),Kc=V('<p class="empty svelte-d3ct2b">No rule counters yet.</p>'),Yc=V('<div class="metric-row warning svelte-d3ct2b"><div class="svelte-d3ct2b"><span class="svelte-d3ct2b"> </span> <strong class="svelte-d3ct2b"> </strong></div> <i class="svelte-d3ct2b"></i></div>'),Gc=V('<p class="empty svelte-d3ct2b">No file counters yet.</p>'),Jc=V('<small class="svelte-d3ct2b"> </small>'),Qc=V('<small class="svelte-d3ct2b"> </small>'),Xc=V('<section class="commit-item svelte-d3ct2b"><div class="commit-meta svelte-d3ct2b"><span> </span> <time> </time></div> <strong class="svelte-d3ct2b"> </strong> <p class="svelte-d3ct2b"> </p> <!> <!></section>'),Zc=V('<article class="glass-panel commit-watch svelte-d3ct2b"><div class="card-head svelte-d3ct2b"><h2 class="svelte-d3ct2b">Commit Watch</h2> <span class="svelte-d3ct2b"> </span></div> <div class="commit-list svelte-d3ct2b"></div></article>'),ef=V('<small class="svelte-d3ct2b"> </small>'),tf=V('<div class="rule-item svelte-d3ct2b"><div><div class="rule-meta svelte-d3ct2b"><span class="svelte-d3ct2b"> </span> <code class="svelte-d3ct2b"> </code></div> <p class="svelte-d3ct2b"> </p> <!></div> <button class="svelte-d3ct2b">Delete</button></div>'),rf=V('<p class="empty svelte-d3ct2b">No rules match the current filters.</p>'),sf=V('<div class="command-center svelte-d3ct2b"><aside class="sidebar svelte-d3ct2b"><div class="brand svelte-d3ct2b"><h1 class="svelte-d3ct2b">memory-core</h1> <span class="svelte-d3ct2b">command center</span></div> <nav aria-label="Dashboard navigation" class="svelte-d3ct2b"><a class="nav-item active svelte-d3ct2b" href="/"><span class="nav-icon svelte-d3ct2b">[]</span> <span>Command Center</span></a></nav> <div class="sidebar-footer svelte-d3ct2b"><div><i class="svelte-d3ct2b"></i> </div> <small class="svelte-d3ct2b"> </small></div></aside> <div class="workspace svelte-d3ct2b"><header class="topbar svelte-d3ct2b"><div class="topbar-left svelte-d3ct2b"><button class="icon-button mobile-menu svelte-d3ct2b" aria-label="Menu">=</button> <div><i class="svelte-d3ct2b"></i> <span> </span></div></div> <div class="header-metrics svelte-d3ct2b" aria-label="Global metrics"><div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Violations</span> <strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Files</span> <strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Rules</span> <strong class="svelte-d3ct2b"> </strong></div></div> <div class="top-actions svelte-d3ct2b" aria-label="Status shortcuts"><button class="icon-button svelte-d3ct2b" title="Warnings" aria-label="Warnings">!</button> <button class="icon-button svelte-d3ct2b" title="Rules" aria-label="Rules">R</button> <button class="icon-button svelte-d3ct2b" title="Database" aria-label="Database">DB</button> <button class="icon-button svelte-d3ct2b" title="Network" aria-label="Network">LAN</button></div></header> <main class="canvas svelte-d3ct2b"><section class="status-grid svelte-d3ct2b"><article class="glass-panel status-card svelte-d3ct2b"><div class="card-head svelte-d3ct2b"><h2 class="svelte-d3ct2b">Project</h2> <span class="svelte-d3ct2b"> </span></div> <div class="data-list svelte-d3ct2b"><div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Name</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Type</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Language</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Architecture</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Watcher</span><strong class="svelte-d3ct2b"> </strong></div> <!></div></article> <article class="glass-panel status-card svelte-d3ct2b"><div class="card-head svelte-d3ct2b"><h2 class="svelte-d3ct2b">Runtime</h2> <span class="svelte-d3ct2b"> </span></div> <div class="data-list svelte-d3ct2b"><div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Provider</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Check model</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Check status</span> <strong><!></strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Embedding</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Ollama URL</span><strong class="svelte-d3ct2b"> </strong></div></div></article> <article class="glass-panel status-card svelte-d3ct2b"><div class="card-head svelte-d3ct2b"><h2 class="svelte-d3ct2b">PostgreSQL</h2> <span> </span></div> <div class="data-list svelte-d3ct2b"><div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Database</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">User</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Host</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">URL</span><strong class="svelte-d3ct2b"> </strong></div></div></article></section> <!> <!> <section class="terminal-panel glass-panel svelte-d3ct2b"><div class="terminal-head svelte-d3ct2b"><div class="svelte-d3ct2b"><span class="terminal-icon svelte-d3ct2b">>_</span> <h2 class="svelte-d3ct2b">Live Feed</h2></div> <div class="window-dots svelte-d3ct2b" aria-hidden="true"><i class="svelte-d3ct2b"></i><i class="svelte-d3ct2b"></i><i class="svelte-d3ct2b"></i></div></div> <div class="terminal-body svelte-d3ct2b"><!> <!></div></section> <section class="content-grid svelte-d3ct2b"><article class="glass-panel stats-panel svelte-d3ct2b"><div class="card-head svelte-d3ct2b"><h2 class="svelte-d3ct2b">Stats</h2> <span class="svelte-d3ct2b">Recorded</span></div> <div class="stat-block svelte-d3ct2b"><h3 class="svelte-d3ct2b">Most Violated Rules</h3> <!></div> <div class="stat-block svelte-d3ct2b"><h3 class="svelte-d3ct2b">Problem Files</h3> <!></div> <div class="summary-strip svelte-d3ct2b"><div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Clean</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Issues</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Events</span><strong class="svelte-d3ct2b"> </strong></div></div></article> <!> <article class="glass-panel rule-engine svelte-d3ct2b"><div class="card-head svelte-d3ct2b"><h2 class="svelte-d3ct2b">Rule Engine</h2> <span class="svelte-d3ct2b"> </span></div> <form class="rule-form svelte-d3ct2b"><div class="control-grid svelte-d3ct2b"><select class="svelte-d3ct2b"><option>Rule</option><option>Decision</option><option>Pattern</option><option>Ignore</option></select> <select class="svelte-d3ct2b"><option>Project</option><option>Global</option></select></div> <textarea rows="3" placeholder="Rule or decision" class="svelte-d3ct2b"></textarea> <div class="control-grid svelte-d3ct2b"><input placeholder="Reason" class="svelte-d3ct2b"/> <input placeholder="Tags" class="svelte-d3ct2b"/></div> <button class="svelte-d3ct2b"> </button></form> <div class="control-grid filters svelte-d3ct2b"><select class="svelte-d3ct2b"><option>All types</option><option>Rules</option><option>Decisions</option><option>Patterns</option><option>Ignores</option></select> <input placeholder="Search rules..." class="svelte-d3ct2b"/></div> <div class="rule-list svelte-d3ct2b"></div></article></section></main></div></div>');function nf(e,t){wa(t,!1);const r=X(),s=X(),a=X(),i=X(),f=X(),d=X(),u=X(),p=X(),g=X(),x=X(),w=X(),y=X();let o=X({config:null,stats:{rules:{},files:{},topRules:[],topFiles:[]},files:[],memories:[]}),T=X([]),m=X(!1),C=X("all"),W=X(""),L=X(!1),Q=X(""),ie,qe=!1,I=X({type:"rule",scope:"project",content:"",reason:"",tags:"dashboard"});const Qe=24*60*60*1e3,it=()=>{var l;return((l=n(o).runtime)==null?void 0:l.project.name)??"memory-core"},ve=l=>{if(!l)return null;const v=l.trim().toLowerCase();return{angular:"angular",express:"express",fastify:"fastify",go:"go-api",laravel:"laravel-service-repository",nestjs:"nestjs","next.js":"nextjs","nuxt.js":"nuxt",react:"react","react native":"react-native",svelte:"svelte","vue.js":"vue"}[v]??null},Xe=l=>{var A;const v=(A=n(o).config)==null?void 0:A[l];return typeof v=="string"&&v.trim().length>0?v.trim():void 0},Lt=()=>{var E,$,Ee,lt,ot;const l=((E=n(o).runtime)==null?void 0:E.project.declaredArchitectures)??[],v=(($=n(o).runtime)==null?void 0:$.project.activeArchitectures)??[],A=(Ee=n(o).runtime)==null?void 0:Ee.project.backendArchitecture,N=(lt=n(o).runtime)==null?void 0:lt.project.frontendFramework,z=Xe("backendArchitecture")??Xe("backendArch"),te=Xe("frontendFramework")??Xe("frontendFw"),le=ve((ot=n(o).runtime)==null?void 0:ot.project.detected.framework),j=[...new Set([...l,...v,A,N,z,te,le??void 0].filter(Ze=>typeof Ze=="string"&&Ze.length>0))];return j.length>0?j.join(", "):"none"};function Pt(l){M(T,[{...l,id:crypto.randomUUID()},...n(T)].slice(0,80))}function rr(l){return l.type==="saved"?{type:"saved",timestamp:l.timestamp,file:l.file}:l.type==="clean"?{type:"clean",timestamp:l.timestamp,file:l.file}:l.type==="skipped"?{type:"skipped",timestamp:l.timestamp,file:l.file,reason:l.reason}:l.type==="violations"?{type:"violations",timestamp:l.timestamp,file:l.file,violations:l.violations}:l.type==="error"?{type:"error",timestamp:l.timestamp,message:l.message}:l.type==="ready"?{type:"system",timestamp:l.timestamp,message:`Watching ${l.path} | ${l.rules} rules | ${l.model}`}:{type:"system",timestamp:l.timestamp,message:"Watch stopped"}}function bt(l){const v=n(o).files??[],A=v.findIndex(z=>z.file===l.file),N=v.slice();return A===-1?N.push(l):N[A]=l,N.sort((z,te)=>te.lastSeen.localeCompare(z.lastSeen))}function Tr(l){const v=n(o).watcher??{enabled:!0,running:!1,path:void 0,model:void 0,rules:void 0,lastEventAt:void 0,error:void 0};let A=n(o).files,N={...v,lastEventAt:l.timestamp,enabled:!0};l.type==="ready"&&(N={...N,running:!0,error:void 0,path:l.path,model:l.model,rules:l.rules}),l.type==="saved"&&(A=bt({file:l.file,status:"checking",lastSeen:l.timestamp,violations:[]})),l.type==="clean"&&(A=bt({file:l.file,status:"clean",lastSeen:l.timestamp,violations:[]})),l.type==="skipped"&&(A=bt({file:l.file,status:"skipped",lastSeen:l.timestamp,violations:[],message:l.reason})),l.type==="violations"&&(A=bt({file:l.file,status:"violations",lastSeen:l.timestamp,violations:l.violations})),l.type==="error"&&(N={...N,running:!1,error:l.message}),l.type==="stopped"&&(N={...N,running:!1});const z=[l,...n(o).events??[]].slice(0,100);M(o,{...n(o),files:A,events:z,watcher:N})}function sr(l=[]){M(T,l.map(rr).map(v=>({...v,id:crypto.randomUUID()})).reverse().slice(0,80))}function nr(l){return new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date(l))}function we(l){return Math.max(1,...l.map(v=>v.count))}function ar(l,v){const A=l.file||v;return l.line?`${A}:${l.line}`:A}function ti(l){return l.type==="saved"?"SAVE":l.type==="clean"?"OK":l.type==="skipped"?"SKIP":l.type==="violations"?"FAIL":l.type==="error"?"WARN":"SYS"}async function Kr(){const l=await fetch("/api/snapshot");M(o,await l.json()),sr(n(o).events)}async function ri(){if(!qe&&document.visibilityState!=="hidden"){qe=!0;try{const l=await fetch("/api/stats",{cache:"no-store"});if(!l.ok)return;const v=await l.json();if(!v.stats)return;M(o,{...n(o),stats:v.stats})}catch{}finally{qe=!1}}}function si(){ie&&clearInterval(ie),ie=setInterval(()=>{ri()},2e3)}function Vs(){const l=location.protocol==="https:"?"wss:":"ws:",v=new WebSocket(`${l}//${location.host}/ws`);v.addEventListener("open",()=>{M(m,!0),Pt({type:"system",timestamp:new Date().toISOString(),message:"Dashboard connected"})}),v.addEventListener("close",()=>{M(m,!1),Pt({type:"error",timestamp:new Date().toISOString(),message:"Dashboard disconnected"}),setTimeout(Vs,1500)}),v.addEventListener("message",A=>{const N=JSON.parse(A.data);if(N.type==="snapshot"){M(o,N.snapshot),n(T).length===0&&sr(n(o).events);return}N.type==="watch"&&(Tr(N.event),Pt(rr(N.event)))})}async function ni(){if(n(I).content.trim()){M(L,!0),M(Q,"");try{const l=await fetch("/api/memories",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n(I))});if(!l.ok)throw new Error((await l.json()).error??"Save failed");M(I,{type:"rule",scope:"project",content:"",reason:"",tags:"dashboard"}),await Kr()}catch(l){M(Q,l.message)}finally{M(L,!1)}}}async function ai(l){M(Q,"");const v=await fetch(`/api/memories/${l}`,{method:"DELETE"});if(!v.ok){M(Q,(await v.json()).error??"Delete failed");return}await Kr()}Kr().catch(l=>{M(Q,l.message)}),Vs(),si(),Cc(()=>{ie&&(clearInterval(ie),ie=void 0)}),xe(()=>(n(o),n(C),n(W)),()=>{M(r,n(o).memories.filter(l=>{const v=n(C)==="all"||l.type===n(C),A=`${l.type} ${l.scope} ${l.content} ${l.reason??""} ${l.tags.join(" ")}`.toLowerCase();return v&&A.includes(n(W).toLowerCase())}))}),xe(()=>n(o),()=>{M(s,Object.values(n(o).stats.files??{}).reduce((l,v)=>l+v,0))}),xe(()=>n(o),()=>{M(a,n(o).files.filter(l=>l.status==="clean").length)}),xe(()=>n(o),()=>{M(i,Object.values(n(o).stats.rules).reduce((l,v)=>l+v,0))}),xe(()=>n(o),()=>{M(f,n(o).stats.recentViolations??[])}),xe(()=>n(f),()=>{M(d,n(f).filter(l=>{if(!(l.source==="hook"||l.source==="ci"))return!1;const v=Date.parse(l.timestamp);return Number.isNaN(v)?!1:Date.now()-v<=Qe}))}),xe(()=>n(s),()=>{M(u,n(s))}),xe(()=>n(o),()=>{M(p,Object.keys(n(o).stats.files??{}).length)}),xe(()=>n(o),()=>{M(g,n(o).memories.filter(l=>["rule","pattern","decision"].includes(l.type)).length)}),xe(()=>n(o),()=>{var l;M(x,((l=n(o).memoryCount)==null?void 0:l.total)??n(o).memories.length)}),xe(()=>n(o),()=>{var l;M(w,((l=n(o).memoryCount)==null?void 0:l.relevant)??n(o).memories.length)}),xe(()=>(n(m),n(o)),()=>{var l,v;M(y,n(m)?((l=n(o).watcher)==null?void 0:l.enabled)===!1?{live:!1,label:"Watch off"}:(v=n(o).watcher)!=null&&v.running?{live:!0,label:"Watcher live"}:{live:!1,label:"Watcher idle"}:{live:!1,label:"Disconnected"})}),Yo(),Ac();var qs=sf(),Us=_(qs),ii=h(_(Us),4),Yr=_(ii);let zs;var li=h(_(Yr)),oi=h(Yr,2),ci=_(oi),fi=h(Us,2),Hs=_(fi),Bs=_(Hs),Ks=h(_(Bs),2);let Ys;var ui=h(_(Ks),2),vi=_(ui),di=h(Bs,2),Gs=_(di),pi=h(_(Gs),2),_i=_(pi),Js=h(Gs,2),hi=h(_(Js),2),gi=_(hi),bi=h(Js,2),mi=h(_(bi),2),yi=_(mi),wi=h(Hs,2),Qs=_(wi),Xs=_(Qs),Zs=_(Xs),Ei=h(_(Zs),2),xi=_(Ei),ki=h(Zs,2),en=_(ki),Si=h(_(en)),Ai=_(Si),tn=h(en,2),Ti=h(_(tn)),Ci=_(Ti),rn=h(tn,2),Ri=h(_(rn)),Ni=_(Ri),sn=h(rn,2),Mi=h(_(sn)),Di=_(Mi),nn=h(sn,2),Oi=h(_(nn)),Fi=_(Oi),Ii=h(nn,2);{var ji=l=>{var v=Mc(),A=h(_(v)),N=_(A);U(()=>k(N,(n(o),b(()=>n(o).watcher.error)))),P(l,v)};ce(Ii,l=>{n(o),b(()=>{var v;return(v=n(o).watcher)==null?void 0:v.error})&&l(ji)})}var an=h(Xs,2),ln=_(an),Li=h(_(ln),2),Pi=_(Li),$i=h(ln,2),on=_($i),Wi=h(_(on)),Vi=_(Wi),cn=h(on,2),qi=h(_(cn)),Ui=_(qi),fn=h(cn,2),un=h(_(fn),2);let vn;var zi=_(un);{var Hi=l=>{var v=na();U(()=>k(v,(n(o),b(()=>{var A;return(A=n(o).runtime)!=null&&A.model.checkModelInstalled?"installed":"missing"})))),P(l,v)},Bi=l=>{var v=na();U(()=>k(v,(n(o),b(()=>{var A;return(A=n(o).runtime)!=null&&A.model.apiKeyConfigured?"api key set":"api key missing"})))),P(l,v)};ce(zi,l=>{n(o),b(()=>{var v;return((v=n(o).runtime)==null?void 0:v.model.provider)==="ollama"})?l(Hi):l(Bi,-1)})}var dn=h(fn,2),Ki=h(_(dn)),Yi=_(Ki),Gi=h(dn,2),Ji=h(_(Gi)),Qi=_(Ji),Xi=h(an,2),pn=_(Xi),_n=h(_(pn),2);let hn;var Zi=_(_n),el=h(pn,2),gn=_(el),tl=h(_(gn)),rl=_(tl),bn=h(gn,2),sl=h(_(bn)),nl=_(sl),mn=h(bn,2),al=h(_(mn)),il=_(al),ll=h(mn,2),ol=h(_(ll)),cl=_(ol),yn=h(Qs,2);{var fl=l=>{var v=Dc(),A=_(v);U(()=>k(A,(n(o),b(()=>n(o).dbError)))),P(l,v)};ce(yn,l=>{n(o),b(()=>n(o).dbError)&&l(fl)})}var wn=h(yn,2);{var ul=l=>{var v=Oc(),A=_(v);U(()=>k(A,n(Q))),P(l,v)};ce(wn,l=>{n(Q)&&l(ul)})}var En=h(wn,2),vl=h(_(En),2),xn=_(vl);{var dl=l=>{var v=Fc();P(l,v)};ce(xn,l=>{n(T),b(()=>n(T).length===0)&&l(dl)})}var pl=h(xn,2);qt(pl,1,()=>(n(T),b(()=>[...n(T)].reverse())),l=>l.id,(l,v)=>{var A=Hc();let N;var z=_(A),te=_(z),le=_(te),j=h(te,2),E=_(j),$=h(j,2);{var Ee=K=>{var Y=Ic(),he=_(Y);U(()=>k(he,(n(v),b(()=>n(v).message)))),P(K,Y)},lt=K=>{var Y=jc(),he=_(Y);U(()=>k(he,`saved: ${n(v),b(()=>n(v).file)??""}`)),P(K,Y)},ot=K=>{var Y=Lc(),he=_(Y);U(()=>k(he,`${n(v),b(()=>n(v).file)??""} - no violations`)),P(K,Y)},Ze=K=>{var Y=Pc(),he=_(Y);U(()=>k(he,`${n(v),b(()=>n(v).file)??""} - skipped: ${n(v),b(()=>n(v).reason)??""}`)),P(K,Y)},Ue=K=>{var Y=$c(),he=_(Y);U(()=>k(he,`${n(v),b(()=>n(v).violations.length)??""} violation${n(v),b(()=>n(v).violations.length===1?"":"s")??""} in ${n(v),b(()=>n(v).file)??""}`)),P(K,Y)};ce($,K=>{n(v),b(()=>n(v).type==="system"||n(v).type==="error")?K(Ee):(n(v),b(()=>n(v).type==="saved")?K(lt,1):(n(v),b(()=>n(v).type==="clean")?K(ot,2):(n(v),b(()=>n(v).type==="skipped")?K(Ze,3):K(Ue,-1))))})}var $t=h(z,2);{var Wt=K=>{var Y=cc(),he=Wo(Y);qt(he,3,()=>(n(v),b(()=>n(v).violations)),(Cr,H)=>`${n(v).id}-${H}`,(Cr,H,Fe)=>{var ze=zc(),Vt=_(ze),Fl=_(Vt),Vn=h(Vt,2),Il=h(_(Vn)),qn=h(Vn,2);{var jl=se=>{var Ie=Wc(),mt=h(_(Ie));U(()=>k(mt,` ${n(H),b(()=>n(H).reason)??""}`)),P(se,Ie)};ce(qn,se=>{n(H),b(()=>n(H).reason)&&se(jl)})}var Un=h(qn,2);{var Ll=se=>{var Ie=Vc(),mt=h(_(Ie));U(()=>k(mt,` ${n(H),b(()=>n(H).issue)??""}`)),P(se,Ie)};ce(Un,se=>{n(H),b(()=>n(H).issue)&&se(Ll)})}var zn=h(Un,2);{var Pl=se=>{var Ie=qc(),mt=h(_(Ie));U(()=>k(mt,` ${n(H),b(()=>n(H).suggestion)??""}`)),P(se,Ie)};ce(zn,se=>{n(H),b(()=>n(H).suggestion)&&se(Pl)})}var $l=h(zn,2);{var Wl=se=>{var Ie=Uc(),mt=_(Ie);U(()=>k(mt,(n(H),b(()=>n(H).code)))),P(se,Ie)};ce($l,se=>{n(H),b(()=>n(H).code)&&se(Wl)})}U(se=>{k(Fl,`[${n(Fe)+1}] ${se??""}`),k(Il,` ${n(H),b(()=>n(H).rule)??""}`)},[()=>(n(H),n(v),b(()=>ar(n(H),n(v).file)))]),P(Cr,ze)}),P(K,Y)};ce($t,K=>{n(v),b(()=>n(v).type==="violations")&&K(Wt)})}U((K,Y)=>{N=or(A,1,"svelte-d3ct2b",null,N,{"error-line":n(v).type==="error","ok-line":n(v).type==="clean","violation-line":n(v).type==="violations"}),k(le,K),k(E,Y)},[()=>(n(v),b(()=>nr(n(v).timestamp))),()=>(n(v),b(()=>ti(n(v))))]),P(l,A)});var _l=h(En,2),kn=_(_l),Sn=h(_(kn),2),hl=h(_(Sn),2);qt(hl,1,()=>(n(o),b(()=>n(o).stats.topRules.slice(0,5))),l=>l.name,(l,v)=>{var A=Bc(),N=_(A),z=_(N),te=_(z),le=h(z,2),j=_(le),E=h(N,2);U($=>{k(te,(n(v),b(()=>n(v).name))),k(j,(n(v),b(()=>n(v).count))),la(E,$)},[()=>(n(v),n(o),b(()=>`width: ${n(v).count/we(n(o).stats.topRules)*100}%`))]),P(l,A)},l=>{var v=Kc();P(l,v)});var An=h(Sn,2),gl=h(_(An),2);qt(gl,1,()=>(n(o),b(()=>n(o).stats.topFiles.slice(0,5))),l=>l.name,(l,v)=>{var A=Yc(),N=_(A),z=_(N),te=_(z),le=h(z,2),j=_(le),E=h(N,2);U($=>{k(te,(n(v),b(()=>n(v).name))),k(j,(n(v),b(()=>n(v).count))),la(E,$)},[()=>(n(v),n(o),b(()=>`width: ${n(v).count/we(n(o).stats.topFiles)*100}%`))]),P(l,A)},l=>{var v=Gc();P(l,v)});var bl=h(An,2),Tn=_(bl),ml=h(_(Tn)),yl=_(ml),Cn=h(Tn,2),wl=h(_(Cn)),El=_(wl),xl=h(Cn,2),kl=h(_(xl)),Sl=_(kl),Rn=h(kn,2);{var Al=l=>{var v=Zc(),A=_(v),N=h(_(A),2),z=_(N),te=h(A,2);qt(te,7,()=>(n(d),b(()=>n(d).slice(0,8))),(le,j)=>`${le.timestamp}-${j}`,(le,j)=>{var E=Xc(),$=_(E),Ee=_($),lt=_(Ee),ot=h(Ee,2),Ze=_(ot),Ue=h($,2),$t=_(Ue),Wt=h(Ue,2),K=_(Wt),Y=h(Wt,2);{var he=Fe=>{var ze=Jc(),Vt=_(ze);U(()=>k(Vt,(n(j),b(()=>n(j).issue)))),P(Fe,ze)};ce(Y,Fe=>{n(j),b(()=>n(j).issue)&&Fe(he)})}var Cr=h(Y,2);{var H=Fe=>{var ze=Qc(),Vt=_(ze);U(()=>k(Vt,(n(j),b(()=>n(j).suggestion)))),P(Fe,ze)};ce(Cr,Fe=>{n(j),b(()=>n(j).suggestion)&&Fe(H)})}U((Fe,ze)=>{k(lt,(n(j),b(()=>n(j).source==="ci"?"CI":"Hook"))),k(Ze,Fe),k($t,(n(j),b(()=>n(j).rule))),k(K,ze)},[()=>(n(j),b(()=>nr(n(j).timestamp))),()=>(n(j),b(()=>ar(n(j),n(j).file||"staged diff")))]),P(le,E)}),U(()=>k(z,`${n(d),b(()=>n(d).length)??""} in 24h`)),P(l,v)};ce(Rn,l=>{n(d),b(()=>n(d).length>0)&&l(Al)})}var Tl=h(Rn,2),Nn=_(Tl),Cl=h(_(Nn),2),Rl=_(Cl),Gr=h(Nn,2),Mn=_(Gr),Jr=_(Mn),Qr=_(Jr);Qr.value=Qr.__value="rule";var Xr=h(Qr);Xr.value=Xr.__value="decision";var Zr=h(Xr);Zr.value=Zr.__value="pattern";var Dn=h(Zr);Dn.value=Dn.__value="ignore";var On=h(Jr,2),es=_(On);es.value=es.__value="project";var Fn=h(es);Fn.value=Fn.__value="global";var In=h(Mn,2),jn=h(In,2),Ln=_(jn),Nl=h(Ln,2),Pn=h(jn,2),Ml=_(Pn),$n=h(Gr,2),ts=_($n),rs=_(ts);rs.value=rs.__value="all";var ss=h(rs);ss.value=ss.__value="rule";var ns=h(ss);ns.value=ns.__value="decision";var as=h(ns);as.value=as.__value="pattern";var Wn=h(as);Wn.value=Wn.__value="ignore";var Dl=h(ts,2),Ol=h($n,2);qt(Ol,5,()=>n(r),l=>l.id,(l,v)=>{var A=tf(),N=_(A),z=_(N),te=_(z),le=_(te),j=h(te,2),E=_(j),$=h(z,2),Ee=_($),lt=h($,2);{var ot=Ue=>{var $t=ef(),Wt=_($t);U(()=>k(Wt,(n(v),b(()=>n(v).reason)))),P(Ue,$t)};ce(lt,Ue=>{n(v),b(()=>n(v).reason)&&Ue(ot)})}var Ze=h(N,2);U(Ue=>{k(le,(n(v),b(()=>n(v).scope))),k(E,`Rule-${Ue??""}`),k(Ee,(n(v),b(()=>n(v).content))),Ec(Ze,"aria-label",(n(v),b(()=>`Delete ${n(v).id}`)))},[()=>(n(v),b(()=>String(n(v).id).padStart(3,"0")))]),ra("click",Ze,()=>ai(n(v).id)),P(l,A)},l=>{var v=rf();P(l,v)}),U((l,v,A)=>{var N,z,te,le,j;zs=or(Yr,1,"status-chip svelte-d3ct2b",null,zs,{live:n(y).live}),k(li,` ${n(y),b(()=>n(y).label)??""}`),k(ci,(n(o),b(()=>{var E;return((E=n(o).runtime)==null?void 0:E.model.label)??"runtime pending"}))),Ys=or(Ks,1,"live-label svelte-d3ct2b",null,Ys,{live:n(y).live}),k(vi,(n(y),b(()=>n(y).label))),k(_i,n(u)),k(gi,n(p)),k(yi,n(g)),k(xi,(n(o),b(()=>{var E;return(E=n(o).runtime)!=null&&E.project.initialized?"Initialized":"Not initialized"}))),k(Ai,l),k(Ci,(n(o),b(()=>{var E;return((E=n(o).runtime)==null?void 0:E.project.type)??"unknown"}))),k(Ni,(n(o),b(()=>{var E;return((E=n(o).runtime)==null?void 0:E.project.language)??"unknown"}))),k(Di,v),k(Fi,(n(o),b(()=>{var E,$;return((E=n(o).watcher)==null?void 0:E.enabled)===!1?"disabled":($=n(o).watcher)!=null&&$.running?"running":"idle"}))),k(Pi,(n(o),b(()=>{var E;return((E=n(o).runtime)==null?void 0:E.model.label)??"pending"}))),k(Vi,(n(o),b(()=>{var E;return((E=n(o).runtime)==null?void 0:E.model.provider)??"unknown"}))),k(Ui,(n(o),b(()=>{var E,$,Ee;return((E=n(o).runtime)==null?void 0:E.model.checkModelResolved)??(($=n(o).runtime)==null?void 0:$.model.checkModel)??((Ee=n(o).runtime)==null?void 0:Ee.model.chatModel)??"unknown"}))),vn=or(un,1,"svelte-d3ct2b",null,vn,{"status-ok":((N=n(o).runtime)==null?void 0:N.model.checkModelInstalled)||((z=n(o).runtime)==null?void 0:z.model.apiKeyConfigured),"status-warn":((te=n(o).runtime)==null?void 0:te.model.checkModelInstalled)===!1||((le=n(o).runtime)==null?void 0:le.model.error)}),k(Yi,(n(o),b(()=>{var E,$;return((E=n(o).runtime)==null?void 0:E.model.embeddingModelResolved)??(($=n(o).runtime)==null?void 0:$.model.embeddingModel)??"unknown"}))),k(Qi,(n(o),b(()=>{var E;return((E=n(o).runtime)==null?void 0:E.model.ollamaUrl)??"unknown"}))),hn=or(_n,1,"svelte-d3ct2b",null,hn,{success:(j=n(o).runtime)==null?void 0:j.postgres.connected}),k(Zi,(n(o),b(()=>{var E;return(E=n(o).runtime)!=null&&E.postgres.connected?"Connected":"Not connected"}))),k(rl,(n(o),b(()=>{var E,$;return((E=n(o).runtime)==null?void 0:E.postgres.serverDatabase)??(($=n(o).runtime)==null?void 0:$.postgres.database)??"unknown"}))),k(nl,(n(o),b(()=>{var E,$;return((E=n(o).runtime)==null?void 0:E.postgres.serverUser)??(($=n(o).runtime)==null?void 0:$.postgres.user)??"unknown"}))),k(il,`${n(o),b(()=>{var E;return((E=n(o).runtime)==null?void 0:E.postgres.host)??"unknown"})??""}${n(o),b(()=>{var E;return(E=n(o).runtime)!=null&&E.postgres.port?`:${n(o).runtime.postgres.port}`:""})??""}`),k(cl,(n(o),b(()=>{var E;return((E=n(o).runtime)==null?void 0:E.postgres.url)??"(not set)"}))),k(yl,n(a)),k(El,n(u)),k(Sl,n(i)),k(Rl,`${n(g)??""} rules active`),Pn.disabled=A,k(Ml,n(L)?"Saving...":"Add New Architecture Rule")},[()=>b(it),()=>b(Lt),()=>(n(L),n(I),b(()=>n(L)||!n(I).content.trim()))]),cs(Jr,()=>n(I).type,l=>ir(I,n(I).type=l)),cs(On,()=>n(I).scope,l=>ir(I,n(I).scope=l)),Mr(In,()=>n(I).content,l=>ir(I,n(I).content=l)),Mr(Ln,()=>n(I).reason,l=>ir(I,n(I).reason=l)),Mr(Nl,()=>n(I).tags,l=>ir(I,n(I).tags=l)),ra("submit",Gr,Sc(ni)),cs(ts,()=>n(C),l=>M(C,l)),Mr(Dl,()=>n(W),l=>M(W,l)),P(e,qs),Ea()}fc(nf,{target:document.getElementById("app")});
|