@shahmilsaari/memory-core 1.0.26 → 1.0.27
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 +12 -5
- package/dist/dashboard/assets/index-Cd_SCzKw.js +2 -0
- package/dist/dashboard/assets/index-DAEzcad9.css +1 -0
- package/dist/dashboard/index.html +2 -2
- package/dist/{dashboard-server-EEFNE6NX.js → dashboard-server-TWLZQE2J.js} +34 -6
- package/package.json +1 -1
- package/dist/dashboard/assets/index-CE3AMEOD.js +0 -2
- package/dist/dashboard/assets/index-CNc2vvZF.css +0 -1
package/dist/cli.js
CHANGED
|
@@ -130,8 +130,15 @@ function printBanner(projectName, agentCount, status) {
|
|
|
130
130
|
}
|
|
131
131
|
var { version } = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf-8"));
|
|
132
132
|
var CONFIG_FILE = ".memory-core.json";
|
|
133
|
-
var LOCAL_GENERATED_FILES = [".memory-core-stats.json"];
|
|
133
|
+
var LOCAL_GENERATED_FILES = [".memory-core-stats.json", ".memory-core-db-version"];
|
|
134
134
|
var LOCAL_STATE_FILES = [CONFIG_FILE, ".memory-core.env", ...LOCAL_GENERATED_FILES];
|
|
135
|
+
var ARCHMIND_RUNTIME_FILES = [
|
|
136
|
+
".archmind/approval-queue.json",
|
|
137
|
+
".archmind/watch-errors.json",
|
|
138
|
+
".archmind/check.log",
|
|
139
|
+
".archmind/cache/",
|
|
140
|
+
".archmind/violation-history.json"
|
|
141
|
+
];
|
|
135
142
|
var CI_WORKFLOW_FILE = ".github/workflows/memory-core.yml";
|
|
136
143
|
var GITIGNORE_HEADING = "# memory-core generated files";
|
|
137
144
|
var DEFAULT_OLLAMA_URL = "http://localhost:11434";
|
|
@@ -720,7 +727,7 @@ program.command("init").description("Initialize memory-core in the current proje
|
|
|
720
727
|
};
|
|
721
728
|
writeRuntimeEnv(envValues, envPath);
|
|
722
729
|
applyRuntimeEnv(envValues);
|
|
723
|
-
appendMissingGitignoreEntries(LOCAL_STATE_FILES, GITIGNORE_HEADING);
|
|
730
|
+
appendMissingGitignoreEntries([...LOCAL_STATE_FILES, ...ARCHMIND_RUNTIME_FILES], GITIGNORE_HEADING);
|
|
724
731
|
console.log(chalk.green(" \u2713 .memory-core.env created with local defaults"));
|
|
725
732
|
} else if (!hasEnv) {
|
|
726
733
|
console.log(chalk.dim(" No .memory-core.env found \u2014 let's set up your connection.\n"));
|
|
@@ -868,7 +875,7 @@ program.command("init").description("Initialize memory-core in the current proje
|
|
|
868
875
|
if (chatApiKey) envValues.CHAT_API_KEY = chatApiKey;
|
|
869
876
|
writeRuntimeEnv(envValues, envPath);
|
|
870
877
|
applyRuntimeEnv(envValues);
|
|
871
|
-
appendMissingGitignoreEntries(LOCAL_STATE_FILES, GITIGNORE_HEADING);
|
|
878
|
+
appendMissingGitignoreEntries([...LOCAL_STATE_FILES, ...ARCHMIND_RUNTIME_FILES], GITIGNORE_HEADING);
|
|
872
879
|
console.log(chalk.green("\n \u2713 .memory-core.env created"));
|
|
873
880
|
console.log(chalk.gray(" Added to .gitignore \u2014 your DB credentials stay local.\n"));
|
|
874
881
|
} else {
|
|
@@ -1082,7 +1089,7 @@ program.command("init").description("Initialize memory-core in the current proje
|
|
|
1082
1089
|
} catch {
|
|
1083
1090
|
console.log(chalk.dim(" (graph build skipped \u2014 run `memory-core graph build` once manually)"));
|
|
1084
1091
|
}
|
|
1085
|
-
const gitignoreEntries = [...written.written, ...LOCAL_GENERATED_FILES];
|
|
1092
|
+
const gitignoreEntries = [...written.written, ...LOCAL_GENERATED_FILES, ...ARCHMIND_RUNTIME_FILES];
|
|
1086
1093
|
if (gitignoreEntries.length > 0) {
|
|
1087
1094
|
const added = appendMissingGitignoreEntries(gitignoreEntries, GITIGNORE_HEADING);
|
|
1088
1095
|
if (added > 0) {
|
|
@@ -1745,7 +1752,7 @@ program.command("dashboard").description("Start the live Svelte dashboard with W
|
|
|
1745
1752
|
}
|
|
1746
1753
|
return void 0;
|
|
1747
1754
|
};
|
|
1748
|
-
const { startDashboard } = await import("./dashboard-server-
|
|
1755
|
+
const { startDashboard } = await import("./dashboard-server-TWLZQE2J.js");
|
|
1749
1756
|
await startDashboard({
|
|
1750
1757
|
port: parseInt(opts.port, 10),
|
|
1751
1758
|
path: resolveDashboardPath(),
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var To=Object.defineProperty;var Un=e=>{throw TypeError(e)};var Ao=(e,t,r)=>t in e?To(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var kt=(e,t,r)=>Ao(e,typeof t!="symbol"?t+"":t,r),na=(e,t,r)=>t.has(e)||Un("Cannot "+r);var v=(e,t,r)=>(na(e,t,"read from private field"),r?r.call(e):t.get(e)),W=(e,t,r)=>t.has(e)?Un("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),z=(e,t,r,a)=>(na(e,t,"write to private field"),a?a.call(e,r):t.set(e,r),r),fe=(e,t,r)=>(na(e,t,"access private method"),r);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))a(n);new MutationObserver(n=>{for(const i of n)if(i.type==="childList")for(const d of i.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&a(d)}).observe(document,{childList:!0,subtree:!0});function r(n){const i={};return n.integrity&&(i.integrity=n.integrity),n.referrerPolicy&&(i.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?i.credentials="include":n.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function a(n){if(n.ep)return;n.ep=!0;const i=r(n);fetch(n.href,i)}})();const Co=!1;var Ea=Array.isArray,Oo=Array.prototype.indexOf,Vs=Array.prototype.includes,Vr=Array.from,Lo=Object.defineProperty,nr=Object.getOwnPropertyDescriptor,cl=Object.getOwnPropertyDescriptors,Ro=Object.prototype,No=Array.prototype,Sa=Object.getPrototypeOf,Kn=Object.isExtensible;const Io=()=>{};function Do(e){return e()}function va(e){for(var t=0;t<e.length;t++)e[t]()}function vl(){var e,t,r=new Promise((a,n)=>{e=a,t=n});return{promise:r,resolve:e,reject:t}}const Ke=2,Us=4,mr=8,dl=1<<24,jt=16,Mt=32,ds=64,da=128,bt=512,Te=1024,He=2048,Tt=4096,Ge=8192,mt=16384,Ls=32768,qn=1<<25,Ks=65536,fa=1<<17,Fo=1<<18,Gs=1<<19,fl=1<<20,Pt=1<<25,Ts=65536,Pr=1<<21,cr=1<<22,cs=1<<23,xs=Symbol("$state"),$o=Symbol(""),qt=new class extends Error{constructor(){super(...arguments);kt(this,"name","StaleReactionError");kt(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};function Po(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function jo(e,t,r){throw new Error("https://svelte.dev/e/each_key_duplicate")}function Ho(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Bo(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Wo(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Vo(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Uo(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Ko(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function qo(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function zo(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const Yo=1,Go=2,ul=4,Xo=8,Jo=16,Qo=1,Zo=2,Ie=Symbol(),pl="http://www.w3.org/1999/xhtml";function ec(){console.warn("https://svelte.dev/e/derived_inert")}function tc(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function sc(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function hl(e){return e===this.v}function rc(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function _l(e){return!rc(e,this.v)}let Ur=!1,ac=!1;function nc(){Ur=!0}let Ae=null;function qs(e){Ae=e}function bl(e,t=!1,r){Ae={p:Ae,i:!1,c:null,e:null,s:e,x:null,r:G,l:Ur&&!t?{s:null,u:null,$:[]}:null}}function ml(e){var t=Ae,r=t.e;if(r!==null){t.e=null;for(var a of r)Pl(a)}return t.i=!0,Ae=t.p,{}}function gr(){return!Ur||Ae!==null&&Ae.l===null}let _s=[];function gl(){var e=_s;_s=[],va(e)}function vs(e){if(_s.length===0&&!lr){var t=_s;queueMicrotask(()=>{t===_s&&gl()})}_s.push(e)}function lc(){for(;_s.length>0;)gl()}function yl(e){var t=G;if(t===null)return X.f|=cs,e;if(!(t.f&Ls)&&!(t.f&Us))throw e;os(e,t)}function os(e,t){for(;t!==null;){if(t.f&da){if(!(t.f&Ls))throw e;try{t.b.error(e);return}catch(r){e=r}}t=t.parent}throw e}const ic=-7169;function ye(e,t){e.f=e.f&ic|t}function Ma(e){e.f&bt||e.deps===null?ye(e,Te):ye(e,Tt)}function wl(e){if(e!==null)for(const t of e)!(t.f&Ke)||!(t.f&Ts)||(t.f^=Ts,wl(t.deps))}function kl(e,t,r){e.f&He?t.add(e):e.f&Tt&&r.add(e),wl(e.deps),ye(e,Te)}const hs=new Set;let R=null,je=null,ua=null,lr=!1,la=!1,Fs=null,Or=null;var zn=0;let oc=1;var Ps,js,ms,zt,Dt,fr,nt,ur,ls,Yt,Ft,Hs,Bs,gs,Ce,Lr,xl,Rr,pa,Nr,cc;const Hr=class Hr{constructor(){W(this,Ce);kt(this,"id",oc++);kt(this,"current",new Map);kt(this,"previous",new Map);W(this,Ps,new Set);W(this,js,new Set);W(this,ms,new Set);W(this,zt,new Map);W(this,Dt,new Map);W(this,fr,null);W(this,nt,[]);W(this,ur,[]);W(this,ls,new Set);W(this,Yt,new Set);W(this,Ft,new Map);W(this,Hs,new Set);kt(this,"is_fork",!1);W(this,Bs,!1);W(this,gs,new Set)}skip_effect(t){v(this,Ft).has(t)||v(this,Ft).set(t,{d:[],m:[]}),v(this,Hs).delete(t)}unskip_effect(t,r=a=>this.schedule(a)){var a=v(this,Ft).get(t);if(a){v(this,Ft).delete(t);for(var n of a.d)ye(n,He),r(n);for(n of a.m)ye(n,Tt),r(n)}v(this,Hs).add(t)}capture(t,r,a=!1){t.v!==Ie&&!this.previous.has(t)&&this.previous.set(t,t.v),t.f&cs||(this.current.set(t,[r,a]),je==null||je.set(t,r)),this.is_fork||(t.v=r)}activate(){R=this}deactivate(){R=null,je=null}flush(){try{la=!0,R=this,fe(this,Ce,Rr).call(this)}finally{zn=0,ua=null,Fs=null,Or=null,la=!1,R=null,je=null,Es.clear()}}discard(){for(const t of v(this,js))t(this);v(this,js).clear(),v(this,ms).clear(),hs.delete(this)}register_created_effect(t){v(this,ur).push(t)}increment(t,r){let a=v(this,zt).get(r)??0;if(v(this,zt).set(r,a+1),t){let n=v(this,Dt).get(r)??0;v(this,Dt).set(r,n+1)}}decrement(t,r,a){let n=v(this,zt).get(r)??0;if(n===1?v(this,zt).delete(r):v(this,zt).set(r,n-1),t){let i=v(this,Dt).get(r)??0;i===1?v(this,Dt).delete(r):v(this,Dt).set(r,i-1)}v(this,Bs)||a||(z(this,Bs,!0),vs(()=>{z(this,Bs,!1),this.flush()}))}transfer_effects(t,r){for(const a of t)v(this,ls).add(a);for(const a of r)v(this,Yt).add(a);t.clear(),r.clear()}oncommit(t){v(this,Ps).add(t)}ondiscard(t){v(this,js).add(t)}on_fork_commit(t){v(this,ms).add(t)}run_fork_commit_callbacks(){for(const t of v(this,ms))t(this);v(this,ms).clear()}settled(){return(v(this,fr)??z(this,fr,vl())).promise}static ensure(){if(R===null){const t=R=new Hr;la||(hs.add(R),lr||vs(()=>{R===t&&t.flush()}))}return R}apply(){{je=null;return}}schedule(t){var n;if(ua=t,(n=t.b)!=null&&n.is_pending&&t.f&(Us|mr|dl)&&!(t.f&Ls)){t.b.defer_effect(t);return}for(var r=t;r.parent!==null;){r=r.parent;var a=r.f;if(Fs!==null&&r===G&&(X===null||!(X.f&Ke)))return;if(a&(ds|Mt)){if(!(a&Te))return;r.f^=Te}}v(this,nt).push(r)}};Ps=new WeakMap,js=new WeakMap,ms=new WeakMap,zt=new WeakMap,Dt=new WeakMap,fr=new WeakMap,nt=new WeakMap,ur=new WeakMap,ls=new WeakMap,Yt=new WeakMap,Ft=new WeakMap,Hs=new WeakMap,Bs=new WeakMap,gs=new WeakMap,Ce=new WeakSet,Lr=function(){return this.is_fork||v(this,Dt).size>0},xl=function(){for(const a of v(this,gs))for(const n of v(a,Dt).keys()){for(var t=!1,r=n;r.parent!==null;){if(v(this,Ft).has(r)){t=!0;break}r=r.parent}if(!t)return!0}return!1},Rr=function(){var u,f;if(zn++>1e3&&(hs.delete(this),dc()),!fe(this,Ce,Lr).call(this)){for(const p of v(this,ls))v(this,Yt).delete(p),ye(p,He),this.schedule(p);for(const p of v(this,Yt))ye(p,Tt),this.schedule(p)}const t=v(this,nt);z(this,nt,[]),this.apply();var r=Fs=[],a=[],n=Or=[];for(const p of t)try{fe(this,Ce,pa).call(this,p,r,a)}catch(m){throw Ml(p),m}if(R=null,n.length>0){var i=Hr.ensure();for(const p of n)i.schedule(p)}if(Fs=null,Or=null,fe(this,Ce,Lr).call(this)||fe(this,Ce,xl).call(this)){fe(this,Ce,Nr).call(this,a),fe(this,Ce,Nr).call(this,r);for(const[p,m]of v(this,Ft))Sl(p,m)}else{v(this,zt).size===0&&hs.delete(this),v(this,ls).clear(),v(this,Yt).clear();for(const p of v(this,Ps))p(this);v(this,Ps).clear(),Yn(a),Yn(r),(u=v(this,fr))==null||u.resolve()}var d=R;if(v(this,nt).length>0){const p=d??(d=this);v(p,nt).push(...v(this,nt).filter(m=>!v(p,nt).includes(m)))}d!==null&&(hs.add(d),fe(f=d,Ce,Rr).call(f))},pa=function(t,r,a){t.f^=Te;for(var n=t.first;n!==null;){var i=n.f,d=(i&(Mt|ds))!==0,u=d&&(i&Te)!==0,f=u||(i&Ge)!==0||v(this,Ft).has(n);if(!f&&n.fn!==null){d?n.f^=Te:i&Us?r.push(n):Xs(n)&&(i&jt&&v(this,Yt).add(n),Os(n));var p=n.first;if(p!==null){n=p;continue}}for(;n!==null;){var m=n.next;if(m!==null){n=m;break}n=n.parent}}},Nr=function(t){for(var r=0;r<t.length;r+=1)kl(t[r],v(this,ls),v(this,Yt))},cc=function(){var m,A,k;for(const E of hs){var t=E.id<this.id,r=[];for(const[y,[D,S]]of this.current){if(E.current.has(y)){var a=E.current.get(y)[0];if(t&&D!==a)E.current.set(y,[D,S]);else continue}r.push(y)}var n=[...E.current.keys()].filter(y=>!this.current.has(y));if(n.length===0)t&&E.discard();else if(r.length>0){if(t)for(const y of v(this,Hs))E.unskip_effect(y,D=>{var S;D.f&(jt|cr)?E.schedule(D):fe(S=E,Ce,Nr).call(S,[D])});E.activate();var i=new Set,d=new Map;for(var u of r)El(u,n,i,d);d=new Map;var f=[...E.current.keys()].filter(y=>this.current.has(y)?this.current.get(y)[0]!==y:!0);for(const y of v(this,ur))!(y.f&(mt|Ge|fa))&&Ta(y,f,d)&&(y.f&(cr|jt)?(ye(y,He),E.schedule(y)):v(E,ls).add(y));if(v(E,nt).length>0){E.apply();for(var p of v(E,nt))fe(m=E,Ce,pa).call(m,p,[],[]);z(E,nt,[])}E.deactivate()}}for(const E of hs)v(E,gs).has(this)&&(v(E,gs).delete(this),v(E,gs).size===0&&!fe(A=E,Ce,Lr).call(A)&&(E.activate(),fe(k=E,Ce,Rr).call(k)))};let As=Hr;function vc(e){var t=lr;lr=!0;try{for(var r;;){if(lc(),R===null)return r;R.flush()}}finally{lr=t}}function dc(){try{Vo()}catch(e){os(e,ua)}}let xt=null;function Yn(e){var t=e.length;if(t!==0){for(var r=0;r<t;){var a=e[r++];if(!(a.f&(mt|Ge))&&Xs(a)&&(xt=new Set,Os(a),a.deps===null&&a.first===null&&a.nodes===null&&a.teardown===null&&a.ac===null&&Hl(a),(xt==null?void 0:xt.size)>0)){Es.clear();for(const n of xt){if(n.f&(mt|Ge))continue;const i=[n];let d=n.parent;for(;d!==null;)xt.has(d)&&(xt.delete(d),i.push(d)),d=d.parent;for(let u=i.length-1;u>=0;u--){const f=i[u];f.f&(mt|Ge)||Os(f)}}xt.clear()}}xt=null}}function El(e,t,r,a){if(!r.has(e)&&(r.add(e),e.reactions!==null))for(const n of e.reactions){const i=n.f;i&Ke?El(n,t,r,a):i&(cr|jt)&&!(i&He)&&Ta(n,t,a)&&(ye(n,He),Aa(n))}}function Ta(e,t,r){const a=r.get(e);if(a!==void 0)return a;if(e.deps!==null)for(const n of e.deps){if(Vs.call(t,n))return!0;if(n.f&Ke&&Ta(n,t,r))return r.set(n,!0),!0}return r.set(e,!1),!1}function Aa(e){R.schedule(e)}function Sl(e,t){if(!(e.f&Mt&&e.f&Te)){e.f&He?t.d.push(e):e.f&Tt&&t.m.push(e),ye(e,Te);for(var r=e.first;r!==null;)Sl(r,t),r=r.next}}function Ml(e){ye(e,Te);for(var t=e.first;t!==null;)Ml(t),t=t.next}function fc(e){let t=0,r=Cs(0),a;return()=>{La()&&(s(r),qr(()=>(t===0&&(a=h(()=>e(()=>ir(r)))),t+=1,()=>{vs(()=>{t-=1,t===0&&(a==null||a(),a=void 0,ir(r))})})))}}var uc=Ks|Gs;function pc(e,t,r,a){new hc(e,t,r,a)}var ut,xa,pt,ys,Ze,ht,Ye,lt,Gt,ws,is,Ws,pr,hr,Xt,Br,we,_c,bc,mc,ha,Ir,Dr,_a,ba;class hc{constructor(t,r,a,n){W(this,we);kt(this,"parent");kt(this,"is_pending",!1);kt(this,"transform_error");W(this,ut);W(this,xa,null);W(this,pt);W(this,ys);W(this,Ze);W(this,ht,null);W(this,Ye,null);W(this,lt,null);W(this,Gt,null);W(this,ws,0);W(this,is,0);W(this,Ws,!1);W(this,pr,new Set);W(this,hr,new Set);W(this,Xt,null);W(this,Br,fc(()=>(z(this,Xt,Cs(v(this,ws))),()=>{z(this,Xt,null)})));var i;z(this,ut,t),z(this,pt,r),z(this,ys,d=>{var u=G;u.b=this,u.f|=da,a(d)}),this.parent=G.b,this.transform_error=n??((i=this.parent)==null?void 0:i.transform_error)??(d=>d),z(this,Ze,Na(()=>{fe(this,we,ha).call(this)},uc))}defer_effect(t){kl(t,v(this,pr),v(this,hr))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!v(this,pt).pending}update_pending_count(t,r){fe(this,we,_a).call(this,t,r),z(this,ws,v(this,ws)+t),!(!v(this,Xt)||v(this,Ws))&&(z(this,Ws,!0),vs(()=>{z(this,Ws,!1),v(this,Xt)&&zs(v(this,Xt),v(this,ws))}))}get_effect_pending(){return v(this,Br).call(this),s(v(this,Xt))}error(t){if(!v(this,pt).onerror&&!v(this,pt).failed)throw t;R!=null&&R.is_fork?(v(this,ht)&&R.skip_effect(v(this,ht)),v(this,Ye)&&R.skip_effect(v(this,Ye)),v(this,lt)&&R.skip_effect(v(this,lt)),R.on_fork_commit(()=>{fe(this,we,ba).call(this,t)})):fe(this,we,ba).call(this,t)}}ut=new WeakMap,xa=new WeakMap,pt=new WeakMap,ys=new WeakMap,Ze=new WeakMap,ht=new WeakMap,Ye=new WeakMap,lt=new WeakMap,Gt=new WeakMap,ws=new WeakMap,is=new WeakMap,Ws=new WeakMap,pr=new WeakMap,hr=new WeakMap,Xt=new WeakMap,Br=new WeakMap,we=new WeakSet,_c=function(){try{z(this,ht,_t(()=>v(this,ys).call(this,v(this,ut))))}catch(t){this.error(t)}},bc=function(t){const r=v(this,pt).failed;r&&z(this,lt,_t(()=>{r(v(this,ut),()=>t,()=>()=>{})}))},mc=function(){const t=v(this,pt).pending;t&&(this.is_pending=!0,z(this,Ye,_t(()=>t(v(this,ut)))),vs(()=>{var r=z(this,Gt,document.createDocumentFragment()),a=Jt();r.append(a),z(this,ht,fe(this,we,Dr).call(this,()=>_t(()=>v(this,ys).call(this,a)))),v(this,is)===0&&(v(this,ut).before(r),z(this,Gt,null),Ss(v(this,Ye),()=>{z(this,Ye,null)}),fe(this,we,Ir).call(this,R))}))},ha=function(){try{if(this.is_pending=this.has_pending_snippet(),z(this,is,0),z(this,ws,0),z(this,ht,_t(()=>{v(this,ys).call(this,v(this,ut))})),v(this,is)>0){var t=z(this,Gt,document.createDocumentFragment());Fa(v(this,ht),t);const r=v(this,pt).pending;z(this,Ye,_t(()=>r(v(this,ut))))}else fe(this,we,Ir).call(this,R)}catch(r){this.error(r)}},Ir=function(t){this.is_pending=!1,t.transfer_effects(v(this,pr),v(this,hr))},Dr=function(t){var r=G,a=X,n=Ae;wt(v(this,Ze)),yt(v(this,Ze)),qs(v(this,Ze).ctx);try{return As.ensure(),t()}catch(i){return yl(i),null}finally{wt(r),yt(a),qs(n)}},_a=function(t,r){var a;if(!this.has_pending_snippet()){this.parent&&fe(a=this.parent,we,_a).call(a,t,r);return}z(this,is,v(this,is)+t),v(this,is)===0&&(fe(this,we,Ir).call(this,r),v(this,Ye)&&Ss(v(this,Ye),()=>{z(this,Ye,null)}),v(this,Gt)&&(v(this,ut).before(v(this,Gt)),z(this,Gt,null)))},ba=function(t){v(this,ht)&&(tt(v(this,ht)),z(this,ht,null)),v(this,Ye)&&(tt(v(this,Ye)),z(this,Ye,null)),v(this,lt)&&(tt(v(this,lt)),z(this,lt,null));var r=v(this,pt).onerror;let a=v(this,pt).failed;var n=!1,i=!1;const d=()=>{if(n){sc();return}n=!0,i&&zo(),v(this,lt)!==null&&Ss(v(this,lt),()=>{z(this,lt,null)}),fe(this,we,Dr).call(this,()=>{fe(this,we,ha).call(this)})},u=f=>{try{i=!0,r==null||r(f,d),i=!1}catch(p){os(p,v(this,Ze)&&v(this,Ze).parent)}a&&z(this,lt,fe(this,we,Dr).call(this,()=>{try{return _t(()=>{var p=G;p.b=this,p.f|=da,a(v(this,ut),()=>f,()=>d)})}catch(p){return os(p,v(this,Ze).parent),null}}))};vs(()=>{var f;try{f=this.transform_error(t)}catch(p){os(p,v(this,Ze)&&v(this,Ze).parent);return}f!==null&&typeof f=="object"&&typeof f.then=="function"?f.then(u,p=>os(p,v(this,Ze)&&v(this,Ze).parent)):u(f)})};function gc(e,t,r,a){const n=gr()?Ca:$s;var i=e.filter(k=>!k.settled);if(r.length===0&&i.length===0){a(t.map(n));return}var d=G,u=yc(),f=i.length===1?i[0].promise:i.length>1?Promise.all(i.map(k=>k.promise)):null;function p(k){u();try{a(k)}catch(E){d.f&mt||os(E,d)}jr()}if(r.length===0){f.then(()=>p(t.map(n)));return}var m=Tl();function A(){Promise.all(r.map(k=>wc(k))).then(k=>p([...t.map(n),...k])).catch(k=>os(k,d)).finally(()=>m())}f?f.then(()=>{u(),A(),jr()}):A()}function yc(){var e=G,t=X,r=Ae,a=R;return function(i=!0){wt(e),yt(t),qs(r),i&&!(e.f&mt)&&(a==null||a.activate(),a==null||a.apply())}}function jr(e=!0){wt(null),yt(null),qs(null),e&&(R==null||R.deactivate())}function Tl(){var e=G,t=e.b,r=R,a=t.is_rendered();return t.update_pending_count(1,r),r.increment(a,e),(n=!1)=>{t.update_pending_count(-1,r),r.decrement(a,e,n)}}function Ca(e){var t=Ke|He;return G!==null&&(G.f|=Gs),{ctx:Ae,deps:null,effects:null,equals:hl,f:t,fn:e,reactions:null,rv:0,v:Ie,wv:0,parent:G,ac:null}}function wc(e,t,r){let a=G;a===null&&Po();var n=void 0,i=Cs(Ie),d=!X,u=new Map;return Dc(()=>{var E;var f=G,p=vl();n=p.promise;try{Promise.resolve(e()).then(p.resolve,p.reject).finally(jr)}catch(y){p.reject(y),jr()}var m=R;if(d){if(f.f&Ls)var A=Tl();if(a.b.is_rendered())(E=u.get(m))==null||E.reject(qt),u.delete(m);else{for(const y of u.values())y.reject(qt);u.clear()}u.set(m,p)}const k=(y,D=void 0)=>{if(A){var S=D===qt;A(S)}if(!(D===qt||f.f&mt)){if(m.activate(),D)i.f|=cs,zs(i,D);else{i.f&cs&&(i.f^=cs),zs(i,y);for(const[I,ae]of u){if(u.delete(I),I===m)break;ae.reject(qt)}}m.deactivate()}};p.promise.then(k,y=>k(null,y||"unknown"))}),Ra(()=>{for(const f of u.values())f.reject(qt)}),new Promise(f=>{function p(m){function A(){m===n?f(i):p(n)}m.then(A,A)}p(n)})}function $s(e){const t=Ca(e);return t.equals=_l,t}function kc(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)tt(t[r])}}function Oa(e){var t,r=G,a=e.parent;if(!fs&&a!==null&&a.f&(mt|Ge))return ec(),e.v;wt(a);try{e.f&=~Ts,kc(e),t=ql(e)}finally{wt(r)}return t}function Al(e){var t=Oa(e);if(!e.equals(t)&&(e.wv=Ul(),(!(R!=null&&R.is_fork)||e.deps===null)&&(R!==null?R.capture(e,t,!0):e.v=t,e.deps===null))){ye(e,Te);return}fs||(je!==null?(La()||R!=null&&R.is_fork)&&je.set(e,t):Ma(e))}function xc(e){var t,r;if(e.effects!==null)for(const a of e.effects)(a.teardown||a.ac)&&((t=a.teardown)==null||t.call(a),(r=a.ac)==null||r.abort(qt),a.teardown=Io,a.ac=null,vr(a,0),Ia(a))}function Cl(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&Os(t)}let ma=new Set;const Es=new Map;let Ol=!1;function Cs(e,t){var r={f:0,v:e,reactions:null,equals:hl,rv:0,wv:0};return r}function rs(e,t){const r=Cs(e);return Pc(r),r}function P(e,t=!1,r=!0){var n;const a=Cs(e);return t||(a.equals=_l),Ur&&r&&Ae!==null&&Ae.l!==null&&((n=Ae.l).s??(n.s=[])).push(a),a}function Nt(e,t){return w(e,h(()=>s(e))),t}function w(e,t,r=!1){X!==null&&(!St||X.f&fa)&&gr()&&X.f&(Ke|jt|cr|fa)&&(gt===null||!Vs.call(gt,e))&&qo();let a=r?rr(t):t;return zs(e,a,Or)}function zs(e,t,r=null){if(!e.equals(t)){Es.set(e,fs?t:e.v);var a=As.ensure();if(a.capture(e,t),e.f&Ke){const n=e;e.f&He&&Oa(n),je===null&&Ma(n)}e.wv=Ul(),Ll(e,He,r),gr()&&G!==null&&G.f&Te&&!(G.f&(Mt|ds))&&(ft===null?jc([e]):ft.push(e)),!a.is_fork&&ma.size>0&&!Ol&&Ec()}return t}function Ec(){Ol=!1;for(const e of ma)e.f&Te&&ye(e,Tt),Xs(e)&&Os(e);ma.clear()}function ir(e){w(e,e.v+1)}function Ll(e,t,r){var a=e.reactions;if(a!==null)for(var n=gr(),i=a.length,d=0;d<i;d++){var u=a[d],f=u.f;if(!(!n&&u===G)){var p=(f&He)===0;if(p&&ye(u,t),f&Ke){var m=u;je==null||je.delete(m),f&Ts||(f&bt&&(G===null||!(G.f&Pr))&&(u.f|=Ts),Ll(m,Tt,r))}else if(p){var A=u;f&jt&&xt!==null&&xt.add(A),r!==null?r.push(A):Aa(A)}}}}function rr(e){if(typeof e!="object"||e===null||xs in e)return e;const t=Sa(e);if(t!==Ro&&t!==No)return e;var r=new Map,a=Ea(e),n=rs(0),i=Ms,d=u=>{if(Ms===i)return u();var f=X,p=Ms;yt(null),Zn(i);var m=u();return yt(f),Zn(p),m};return a&&r.set("length",rs(e.length)),new Proxy(e,{defineProperty(u,f,p){(!("value"in p)||p.configurable===!1||p.enumerable===!1||p.writable===!1)&&Uo();var m=r.get(f);return m===void 0?d(()=>{var A=rs(p.value);return r.set(f,A),A}):w(m,p.value,!0),!0},deleteProperty(u,f){var p=r.get(f);if(p===void 0){if(f in u){const m=d(()=>rs(Ie));r.set(f,m),ir(n)}}else w(p,Ie),ir(n);return!0},get(u,f,p){var E;if(f===xs)return e;var m=r.get(f),A=f in u;if(m===void 0&&(!A||(E=nr(u,f))!=null&&E.writable)&&(m=d(()=>{var y=rr(A?u[f]:Ie),D=rs(y);return D}),r.set(f,m)),m!==void 0){var k=s(m);return k===Ie?void 0:k}return Reflect.get(u,f,p)},getOwnPropertyDescriptor(u,f){var p=Reflect.getOwnPropertyDescriptor(u,f);if(p&&"value"in p){var m=r.get(f);m&&(p.value=s(m))}else if(p===void 0){var A=r.get(f),k=A==null?void 0:A.v;if(A!==void 0&&k!==Ie)return{enumerable:!0,configurable:!0,value:k,writable:!0}}return p},has(u,f){var k;if(f===xs)return!0;var p=r.get(f),m=p!==void 0&&p.v!==Ie||Reflect.has(u,f);if(p!==void 0||G!==null&&(!m||(k=nr(u,f))!=null&&k.writable)){p===void 0&&(p=d(()=>{var E=m?rr(u[f]):Ie,y=rs(E);return y}),r.set(f,p));var A=s(p);if(A===Ie)return!1}return m},set(u,f,p,m){var ie;var A=r.get(f),k=f in u;if(a&&f==="length")for(var E=p;E<A.v;E+=1){var y=r.get(E+"");y!==void 0?w(y,Ie):E in u&&(y=d(()=>rs(Ie)),r.set(E+"",y))}if(A===void 0)(!k||(ie=nr(u,f))!=null&&ie.writable)&&(A=d(()=>rs(void 0)),w(A,rr(p)),r.set(f,A));else{k=A.v!==Ie;var D=d(()=>rr(p));w(A,D)}var S=Reflect.getOwnPropertyDescriptor(u,f);if(S!=null&&S.set&&S.set.call(m,p),!k){if(a&&typeof f=="string"){var I=r.get("length"),ae=Number(f);Number.isInteger(ae)&&ae>=I.v&&w(I,ae+1)}ir(n)}return!0},ownKeys(u){s(n);var f=Reflect.ownKeys(u).filter(A=>{var k=r.get(A);return k===void 0||k.v!==Ie});for(var[p,m]of r)m.v!==Ie&&!(p in u)&&f.push(p);return f},setPrototypeOf(){Ko()}})}function Gn(e){try{if(e!==null&&typeof e=="object"&&xs in e)return e[xs]}catch{}return e}function Sc(e,t){return Object.is(Gn(e),Gn(t))}var ga,Rl,Nl,Il;function Mc(){if(ga===void 0){ga=window,Rl=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;Nl=nr(t,"firstChild").get,Il=nr(t,"nextSibling").get,Kn(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),Kn(r)&&(r.__t=void 0)}}function Jt(e=""){return document.createTextNode(e)}function Ys(e){return Nl.call(e)}function yr(e){return Il.call(e)}function o(e,t){return Ys(e)}function Ue(e,t=!1){{var r=Ys(e);return r instanceof Comment&&r.data===""?yr(r):r}}function c(e,t=1,r=!1){let a=e;for(;t--;)a=yr(a);return a}function Tc(e){e.textContent=""}function Dl(){return!1}function Ac(e,t,r){return document.createElementNS(pl,e,void 0)}let Xn=!1;function Cc(){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 Kr(e){var t=X,r=G;yt(null),wt(null);try{return e()}finally{yt(t),wt(r)}}function Fl(e,t,r,a=r){e.addEventListener(t,()=>Kr(r));const n=e.__on_r;n?e.__on_r=()=>{n(),a(!0)}:e.__on_r=()=>a(!0),Cc()}function $l(e){G===null&&(X===null&&Wo(),Bo()),fs&&Ho()}function Oc(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function Ht(e,t){var r=G;r!==null&&r.f&Ge&&(e|=Ge);var a={ctx:Ae,deps:null,nodes:null,f:e|He|bt,first:null,fn:t,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};R==null||R.register_created_effect(a);var n=a;if(e&Us)Fs!==null?Fs.push(a):As.ensure().schedule(a);else if(t!==null){try{Os(a)}catch(d){throw tt(a),d}n.deps===null&&n.teardown===null&&n.nodes===null&&n.first===n.last&&!(n.f&Gs)&&(n=n.first,e&jt&&e&Ks&&n!==null&&(n.f|=Ks))}if(n!==null&&(n.parent=r,r!==null&&Oc(n,r),X!==null&&X.f&Ke&&!(e&ds))){var i=X;(i.effects??(i.effects=[])).push(n)}return a}function La(){return X!==null&&!St}function Ra(e){const t=Ht(mr,null);return ye(t,Te),t.teardown=e,t}function Jn(e){$l();var t=G.f,r=!X&&(t&Mt)!==0&&(t&Ls)===0;if(r){var a=Ae;(a.e??(a.e=[])).push(e)}else return Pl(e)}function Pl(e){return Ht(Us|fl,e)}function Lc(e){return $l(),Ht(mr|fl,e)}function Rc(e){As.ensure();const t=Ht(ds|Gs,e);return(r={})=>new Promise(a=>{r.outro?Ss(t,()=>{tt(t),a(void 0)}):(tt(t),a(void 0))})}function Nc(e){return Ht(Us,e)}function xe(e,t){var r=Ae,a={effect:null,ran:!1,deps:e};r.l.$.push(a),a.effect=qr(()=>{if(e(),!a.ran){a.ran=!0;var n=G;try{wt(n.parent),h(t)}finally{wt(n)}}})}function Ic(){var e=Ae;qr(()=>{for(var t of e.l.$){t.deps();var r=t.effect;r.f&Te&&r.deps!==null&&ye(r,Tt),Xs(r)&&Os(r),t.ran=!1}})}function Dc(e){return Ht(cr|Gs,e)}function qr(e,t=0){return Ht(mr|t,e)}function H(e,t=[],r=[],a=[]){gc(a,t,r,n=>{Ht(mr,()=>e(...n.map(s)))})}function Na(e,t=0){var r=Ht(jt|t,e);return r}function _t(e){return Ht(Mt|Gs,e)}function jl(e){var t=e.teardown;if(t!==null){const r=fs,a=X;Qn(!0),yt(null);try{t.call(null)}finally{Qn(r),yt(a)}}}function Ia(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){const n=r.ac;n!==null&&Kr(()=>{n.abort(qt)});var a=r.next;r.f&ds?r.parent=null:tt(r,t),r=a}}function Fc(e){for(var t=e.first;t!==null;){var r=t.next;t.f&Mt||tt(t),t=r}}function tt(e,t=!0){var r=!1;(t||e.f&Fo)&&e.nodes!==null&&e.nodes.end!==null&&($c(e.nodes.start,e.nodes.end),r=!0),ye(e,qn),Ia(e,t&&!r),vr(e,0);var a=e.nodes&&e.nodes.t;if(a!==null)for(const i of a)i.stop();jl(e),e.f^=qn,e.f|=mt;var n=e.parent;n!==null&&n.first!==null&&Hl(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function $c(e,t){for(;e!==null;){var r=e===t?null:yr(e);e.remove(),e=r}}function Hl(e){var t=e.parent,r=e.prev,a=e.next;r!==null&&(r.next=a),a!==null&&(a.prev=r),t!==null&&(t.first===e&&(t.first=a),t.last===e&&(t.last=r))}function Ss(e,t,r=!0){var a=[];Bl(e,a,!0);var n=()=>{r&&tt(e),t&&t()},i=a.length;if(i>0){var d=()=>--i||n();for(var u of a)u.out(d)}else n()}function Bl(e,t,r){if(!(e.f&Ge)){e.f^=Ge;var a=e.nodes&&e.nodes.t;if(a!==null)for(const u of a)(u.is_global||r)&&t.push(u);for(var n=e.first;n!==null;){var i=n.next;if(!(n.f&ds)){var d=(n.f&Ks)!==0||(n.f&Mt)!==0&&(e.f&jt)!==0;Bl(n,t,d?r:!1)}n=i}}}function Da(e){Wl(e,!0)}function Wl(e,t){if(e.f&Ge){e.f^=Ge,e.f&Te||(ye(e,He),As.ensure().schedule(e));for(var r=e.first;r!==null;){var a=r.next,n=(r.f&Ks)!==0||(r.f&Mt)!==0;Wl(r,n?t:!1),r=a}var i=e.nodes&&e.nodes.t;if(i!==null)for(const d of i)(d.is_global||t)&&d.in()}}function Fa(e,t){if(e.nodes)for(var r=e.nodes.start,a=e.nodes.end;r!==null;){var n=r===a?null:yr(r);t.append(r),r=n}}let Fr=!1,fs=!1;function Qn(e){fs=e}let X=null,St=!1;function yt(e){X=e}let G=null;function wt(e){G=e}let gt=null;function Pc(e){X!==null&&(gt===null?gt=[e]:gt.push(e))}let et=null,at=0,ft=null;function jc(e){ft=e}let Vl=1,bs=0,Ms=bs;function Zn(e){Ms=e}function Ul(){return++Vl}function Xs(e){var t=e.f;if(t&He)return!0;if(t&Ke&&(e.f&=~Ts),t&Tt){for(var r=e.deps,a=r.length,n=0;n<a;n++){var i=r[n];if(Xs(i)&&Al(i),i.wv>e.wv)return!0}t&bt&&je===null&&ye(e,Te)}return!1}function Kl(e,t,r=!0){var a=e.reactions;if(a!==null&&!(gt!==null&&Vs.call(gt,e)))for(var n=0;n<a.length;n++){var i=a[n];i.f&Ke?Kl(i,t,!1):t===i&&(r?ye(i,He):i.f&Te&&ye(i,Tt),Aa(i))}}function ql(e){var D;var t=et,r=at,a=ft,n=X,i=gt,d=Ae,u=St,f=Ms,p=e.f;et=null,at=0,ft=null,X=p&(Mt|ds)?null:e,gt=null,qs(e.ctx),St=!1,Ms=++bs,e.ac!==null&&(Kr(()=>{e.ac.abort(qt)}),e.ac=null);try{e.f|=Pr;var m=e.fn,A=m();e.f|=Ls;var k=e.deps,E=R==null?void 0:R.is_fork;if(et!==null){var y;if(E||vr(e,at),k!==null&&at>0)for(k.length=at+et.length,y=0;y<et.length;y++)k[at+y]=et[y];else e.deps=k=et;if(La()&&e.f&bt)for(y=at;y<k.length;y++)((D=k[y]).reactions??(D.reactions=[])).push(e)}else!E&&k!==null&&at<k.length&&(vr(e,at),k.length=at);if(gr()&&ft!==null&&!St&&k!==null&&!(e.f&(Ke|Tt|He)))for(y=0;y<ft.length;y++)Kl(ft[y],e);if(n!==null&&n!==e){if(bs++,n.deps!==null)for(let S=0;S<r;S+=1)n.deps[S].rv=bs;if(t!==null)for(const S of t)S.rv=bs;ft!==null&&(a===null?a=ft:a.push(...ft))}return e.f&cs&&(e.f^=cs),A}catch(S){return yl(S)}finally{e.f^=Pr,et=t,at=r,ft=a,X=n,gt=i,qs(d),St=u,Ms=f}}function Hc(e,t){let r=t.reactions;if(r!==null){var a=Oo.call(r,e);if(a!==-1){var n=r.length-1;n===0?r=t.reactions=null:(r[a]=r[n],r.pop())}}if(r===null&&t.f&Ke&&(et===null||!Vs.call(et,t))){var i=t;i.f&bt&&(i.f^=bt,i.f&=~Ts),i.v!==Ie&&Ma(i),xc(i),vr(i,0)}}function vr(e,t){var r=e.deps;if(r!==null)for(var a=t;a<r.length;a++)Hc(e,r[a])}function Os(e){var t=e.f;if(!(t&mt)){ye(e,Te);var r=G,a=Fr;G=e,Fr=!0;try{t&(jt|dl)?Fc(e):Ia(e),jl(e);var n=ql(e);e.teardown=typeof n=="function"?n:null,e.wv=Vl;var i;Co&&ac&&e.f&He&&e.deps}finally{Fr=a,G=r}}}async function Bc(){await Promise.resolve(),vc()}function s(e){var t=e.f,r=(t&Ke)!==0;if(X!==null&&!St){var a=G!==null&&(G.f&mt)!==0;if(!a&&(gt===null||!Vs.call(gt,e))){var n=X.deps;if(X.f&Pr)e.rv<bs&&(e.rv=bs,et===null&&n!==null&&n[at]===e?at++:et===null?et=[e]:et.push(e));else{(X.deps??(X.deps=[])).push(e);var i=e.reactions;i===null?e.reactions=[X]:Vs.call(i,X)||i.push(X)}}}if(fs&&Es.has(e))return Es.get(e);if(r){var d=e;if(fs){var u=d.v;return(!(d.f&Te)&&d.reactions!==null||Yl(d))&&(u=Oa(d)),Es.set(d,u),u}var f=(d.f&bt)===0&&!St&&X!==null&&(Fr||(X.f&bt)!==0),p=(d.f&Ls)===0;Xs(d)&&(f&&(d.f|=bt),Al(d)),f&&!p&&(Cl(d),zl(d))}if(je!=null&&je.has(e))return je.get(e);if(e.f&cs)throw e.v;return e.v}function zl(e){if(e.f|=bt,e.deps!==null)for(const t of e.deps)(t.reactions??(t.reactions=[])).push(e),t.f&Ke&&!(t.f&bt)&&(Cl(t),zl(t))}function Yl(e){if(e.v===Ie)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(Es.has(t)||t.f&Ke&&Yl(t))return!0;return!1}function h(e){var t=St;try{return St=!0,e()}finally{St=t}}function $r(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(xs in e)ya(e);else if(!Array.isArray(e))for(let t in e){const r=e[t];typeof r=="object"&&r&&xs in r&&ya(r)}}}function ya(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 a in e)try{ya(e[a],t)}catch{}const r=Sa(e);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){const a=cl(r);for(let n in a){const i=a[n].get;if(i)try{i.call(e)}catch{}}}}}const Wc=["touchstart","touchmove"];function Vc(e){return Wc.includes(e)}const Tr=Symbol("events"),Uc=new Set,el=new Set;function Kc(e,t,r,a={}){function n(i){if(a.capture||wa.call(t,i),!i.cancelBubble)return Kr(()=>r==null?void 0:r.call(this,i))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?vs(()=>{t.addEventListener(e,n,a)}):t.addEventListener(e,n,a),n}function re(e,t,r,a,n){var i={capture:a,passive:n},d=Kc(e,t,r,i);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Ra(()=>{t.removeEventListener(e,d,i)})}let tl=null;function wa(e){var S,I;var t=this,r=t.ownerDocument,a=e.type,n=((S=e.composedPath)==null?void 0:S.call(e))||[],i=n[0]||e.target;tl=e;var d=0,u=tl===e&&e[Tr];if(u){var f=n.indexOf(u);if(f!==-1&&(t===document||t===window)){e[Tr]=t;return}var p=n.indexOf(t);if(p===-1)return;f<=p&&(d=f)}if(i=n[d]||e.target,i!==t){Lo(e,"currentTarget",{configurable:!0,get(){return i||r}});var m=X,A=G;yt(null),wt(null);try{for(var k,E=[];i!==null;){var y=i.assignedSlot||i.parentNode||i.host||null;try{var D=(I=i[Tr])==null?void 0:I[a];D!=null&&(!i.disabled||e.target===i)&&D.call(i,e)}catch(ae){k?E.push(ae):k=ae}if(e.cancelBubble||y===t||y===null)break;i=y}if(k){for(let ae of E)queueMicrotask(()=>{throw ae});throw k}}finally{e[Tr]=t,delete e.currentTarget,yt(m),wt(A)}}}var il;const ia=((il=globalThis==null?void 0:globalThis.window)==null?void 0:il.trustedTypes)&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function qc(e){return(ia==null?void 0:ia.createHTML(e))??e}function Gl(e){var t=Ac("template");return t.innerHTML=qc(e.replaceAll("<!>","<!---->")),t.content}function dr(e,t){var r=G;r.nodes===null&&(r.nodes={start:e,end:t,a:null,t:null})}function F(e,t){var r=(t&Qo)!==0,a=(t&Zo)!==0,n,i=!e.startsWith("<!>");return()=>{n===void 0&&(n=Gl(i?e:"<!>"+e),r||(n=Ys(n)));var d=a||Rl?document.importNode(n,!0):n.cloneNode(!0);if(r){var u=Ys(d),f=d.lastChild;dr(u,f)}else dr(d,d);return d}}function zc(e,t,r="svg"){var a=!e.startsWith("<!>"),n=`<${r}>${a?e:"<!>"+e}</${r}>`,i;return()=>{if(!i){var d=Gl(n),u=Ys(d);i=Ys(u)}var f=i.cloneNode(!0);return dr(f,f),f}}function Js(e,t){return zc(e,t,"svg")}function It(e=""){{var t=Jt(e+"");return dr(t,t),t}}function Ds(){var e=document.createDocumentFragment(),t=document.createComment(""),r=Jt();return e.append(t,r),dr(t,r),e}function T(e,t){e!==null&&e.before(t)}function M(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 Yc(e,t){return Gc(e,t)}const Ar=new Map;function Gc(e,{target:t,anchor:r,props:a={},events:n,context:i,intro:d=!0,transformError:u}){Mc();var f=void 0,p=Rc(()=>{var m=r??t.appendChild(Jt());pc(m,{pending:()=>{}},E=>{bl({});var y=Ae;i&&(y.c=i),n&&(a.$$events=n),f=e(E,a)||{},ml()},u);var A=new Set,k=E=>{for(var y=0;y<E.length;y++){var D=E[y];if(!A.has(D)){A.add(D);var S=Vc(D);for(const ie of[t,document]){var I=Ar.get(ie);I===void 0&&(I=new Map,Ar.set(ie,I));var ae=I.get(D);ae===void 0?(ie.addEventListener(D,wa,{passive:S}),I.set(D,1)):I.set(D,ae+1)}}}};return k(Vr(Uc)),el.add(k),()=>{var S;for(var E of A)for(const I of[t,document]){var y=Ar.get(I),D=y.get(E);--D==0?(I.removeEventListener(E,wa),y.delete(E),y.size===0&&Ar.delete(I)):y.set(E,D)}el.delete(k),m!==r&&((S=m.parentNode)==null||S.removeChild(m))}});return Xc.set(f,p),f}let Xc=new WeakMap;var Et,$t,it,ks,_r,br,Wr;class Jc{constructor(t,r=!0){kt(this,"anchor");W(this,Et,new Map);W(this,$t,new Map);W(this,it,new Map);W(this,ks,new Set);W(this,_r,!0);W(this,br,t=>{if(v(this,Et).has(t)){var r=v(this,Et).get(t),a=v(this,$t).get(r);if(a)Da(a),v(this,ks).delete(r);else{var n=v(this,it).get(r);n&&(v(this,$t).set(r,n.effect),v(this,it).delete(r),n.fragment.lastChild.remove(),this.anchor.before(n.fragment),a=n.effect)}for(const[i,d]of v(this,Et)){if(v(this,Et).delete(i),i===t)break;const u=v(this,it).get(d);u&&(tt(u.effect),v(this,it).delete(d))}for(const[i,d]of v(this,$t)){if(i===r||v(this,ks).has(i))continue;const u=()=>{if(Array.from(v(this,Et).values()).includes(i)){var p=document.createDocumentFragment();Fa(d,p),p.append(Jt()),v(this,it).set(i,{effect:d,fragment:p})}else tt(d);v(this,ks).delete(i),v(this,$t).delete(i)};v(this,_r)||!a?(v(this,ks).add(i),Ss(d,u,!1)):u()}}});W(this,Wr,t=>{v(this,Et).delete(t);const r=Array.from(v(this,Et).values());for(const[a,n]of v(this,it))r.includes(a)||(tt(n.effect),v(this,it).delete(a))});this.anchor=t,z(this,_r,r)}ensure(t,r){var a=R,n=Dl();if(r&&!v(this,$t).has(t)&&!v(this,it).has(t))if(n){var i=document.createDocumentFragment(),d=Jt();i.append(d),v(this,it).set(t,{effect:_t(()=>r(d)),fragment:i})}else v(this,$t).set(t,_t(()=>r(this.anchor)));if(v(this,Et).set(a,t),n){for(const[u,f]of v(this,$t))u===t?a.unskip_effect(f):a.skip_effect(f);for(const[u,f]of v(this,it))u===t?a.unskip_effect(f.effect):a.skip_effect(f.effect);a.oncommit(v(this,br)),a.ondiscard(v(this,Wr))}else v(this,br).call(this,a)}}Et=new WeakMap,$t=new WeakMap,it=new WeakMap,ks=new WeakMap,_r=new WeakMap,br=new WeakMap,Wr=new WeakMap;function Y(e,t,r=!1){var a=new Jc(e),n=r?Ks:0;function i(d,u){a.ensure(d,u)}Na(()=>{var d=!1;t((u,f=0)=>{d=!0,i(f,u)}),d||i(-1,null)},n)}function as(e,t){return t}function Qc(e,t,r){for(var a=[],n=t.length,i,d=t.length,u=0;u<n;u++){let A=t[u];Ss(A,()=>{if(i){if(i.pending.delete(A),i.done.add(A),i.pending.size===0){var k=e.outrogroups;ka(e,Vr(i.done)),k.delete(i),k.size===0&&(e.outrogroups=null)}}else d-=1},!1)}if(d===0){var f=a.length===0&&r!==null;if(f){var p=r,m=p.parentNode;Tc(m),m.append(p),e.items.clear()}ka(e,t,!f)}else i={pending:new Set(t),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(i)}function ka(e,t,r=!0){var a;if(e.pending.size>0){a=new Set;for(const d of e.pending.values())for(const u of d)a.add(e.items.get(u).e)}for(var n=0;n<t.length;n++){var i=t[n];if(a!=null&&a.has(i)){i.f|=Pt;const d=document.createDocumentFragment();Fa(i,d)}else tt(t[n],r)}}var sl;function dt(e,t,r,a,n,i=null){var d=e,u=new Map,f=(t&ul)!==0;if(f){var p=e;d=p.appendChild(Jt())}var m=null,A=$s(()=>{var ie=r();return Ea(ie)?ie:ie==null?[]:Vr(ie)}),k,E=new Map,y=!0;function D(ie){ae.effect.f&mt||(ae.pending.delete(ie),ae.fallback=m,Zc(ae,k,d,t,a),m!==null&&(k.length===0?m.f&Pt?(m.f^=Pt,ar(m,null,d)):Da(m):Ss(m,()=>{m=null})))}function S(ie){ae.pending.delete(ie)}var I=Na(()=>{k=s(A);for(var ie=k.length,be=new Set,Xe=R,b=Dl(),me=0;me<ie;me+=1){var ot=k[me],ct=a(ot,me),De=y?null:u.get(ct);De?(De.v&&zs(De.v,ot),De.i&&zs(De.i,me),b&&Xe.unskip_effect(De.e)):(De=ev(u,y?d:sl??(sl=Jt()),ot,ct,me,n,t,r),y||(De.e.f|=Pt),u.set(ct,De)),be.add(ct)}if(ie===0&&i&&!m&&(y?m=_t(()=>i(d)):(m=_t(()=>i(sl??(sl=Jt()))),m.f|=Pt)),ie>be.size&&jo(),!y)if(E.set(Xe,be),b){for(const[At,Je]of u)be.has(At)||Xe.skip_effect(Je.e);Xe.oncommit(D),Xe.ondiscard(S)}else D(Xe);s(A)}),ae={effect:I,items:u,pending:E,outrogroups:null,fallback:m};y=!1}function sr(e){for(;e!==null&&!(e.f&Mt);)e=e.next;return e}function Zc(e,t,r,a,n){var De,At,Je,he,Fe,qe,Re,Ct,Qt;var i=(a&Xo)!==0,d=t.length,u=e.items,f=sr(e.effect.first),p,m=null,A,k=[],E=[],y,D,S,I;if(i)for(I=0;I<d;I+=1)y=t[I],D=n(y,I),S=u.get(D).e,S.f&Pt||((At=(De=S.nodes)==null?void 0:De.a)==null||At.measure(),(A??(A=new Set)).add(S));for(I=0;I<d;I+=1){if(y=t[I],D=n(y,I),S=u.get(D).e,e.outrogroups!==null)for(const Be of e.outrogroups)Be.pending.delete(S),Be.done.delete(S);if(S.f&Ge&&(Da(S),i&&((he=(Je=S.nodes)==null?void 0:Je.a)==null||he.unfix(),(A??(A=new Set)).delete(S))),S.f&Pt)if(S.f^=Pt,S===f)ar(S,null,r);else{var ae=m?m.next:f;S===e.effect.last&&(e.effect.last=S.prev),S.prev&&(S.prev.next=S.next),S.next&&(S.next.prev=S.prev),ns(e,m,S),ns(e,S,ae),ar(S,ae,r),m=S,k=[],E=[],f=sr(m.next);continue}if(S!==f){if(p!==void 0&&p.has(S)){if(k.length<E.length){var ie=E[0],be;m=ie.prev;var Xe=k[0],b=k[k.length-1];for(be=0;be<k.length;be+=1)ar(k[be],ie,r);for(be=0;be<E.length;be+=1)p.delete(E[be]);ns(e,Xe.prev,b.next),ns(e,m,Xe),ns(e,b,ie),f=ie,m=b,I-=1,k=[],E=[]}else p.delete(S),ar(S,f,r),ns(e,S.prev,S.next),ns(e,S,m===null?e.effect.first:m.next),ns(e,m,S),m=S;continue}for(k=[],E=[];f!==null&&f!==S;)(p??(p=new Set)).add(f),E.push(f),f=sr(f.next);if(f===null)continue}S.f&Pt||k.push(S),m=S,f=sr(S.next)}if(e.outrogroups!==null){for(const Be of e.outrogroups)Be.pending.size===0&&(ka(e,Vr(Be.done)),(Fe=e.outrogroups)==null||Fe.delete(Be));e.outrogroups.size===0&&(e.outrogroups=null)}if(f!==null||p!==void 0){var me=[];if(p!==void 0)for(S of p)S.f&Ge||me.push(S);for(;f!==null;)!(f.f&Ge)&&f!==e.fallback&&me.push(f),f=sr(f.next);var ot=me.length;if(ot>0){var ct=a&ul&&d===0?r:null;if(i){for(I=0;I<ot;I+=1)(Re=(qe=me[I].nodes)==null?void 0:qe.a)==null||Re.measure();for(I=0;I<ot;I+=1)(Qt=(Ct=me[I].nodes)==null?void 0:Ct.a)==null||Qt.fix()}Qc(e,me,ct)}}i&&vs(()=>{var Be,Qs;if(A!==void 0)for(S of A)(Qs=(Be=S.nodes)==null?void 0:Be.a)==null||Qs.apply()})}function ev(e,t,r,a,n,i,d,u){var f=d&Yo?d&Jo?Cs(r):P(r,!1,!1):null,p=d&Go?Cs(n):null;return{v:f,i:p,e:_t(()=>(i(t,f??r,p??n,u),()=>{e.delete(a)}))}}function ar(e,t,r){if(e.nodes)for(var a=e.nodes.start,n=e.nodes.end,i=t&&!(t.f&Pt)?t.nodes.start:r;a!==null;){var d=yr(a);if(i.before(a),a===n)return;a=d}}function ns(e,t,r){t===null?e.effect.first=r:t.next=r,r===null?e.effect.last=t:r.prev=t}const rl=[...`
|
|
2
|
+
\r\f \v\uFEFF`];function tv(e,t,r){var a=e==null?"":""+e;if(t&&(a=a?a+" "+t:t),r){for(var n of Object.keys(r))if(r[n])a=a?a+" "+n:n;else if(a.length)for(var i=n.length,d=0;(d=a.indexOf(n,d))>=0;){var u=d+i;(d===0||rl.includes(a[d-1]))&&(u===a.length||rl.includes(a[u]))?a=(d===0?"":a.substring(0,d))+a.substring(u+1):d=u}}return a===""?null:a}function sv(e,t){return e==null?null:String(e)}function ce(e,t,r,a,n,i){var d=e.__className;if(d!==r||d===void 0){var u=tv(r,a,i);u==null?e.removeAttribute("class"):t?e.className=u:e.setAttribute("class",u),e.__className=r}else if(i&&n!==i)for(var f in i){var p=!!i[f];(n==null||p!==!!n[f])&&e.classList.toggle(f,p)}return i}function rv(e,t,r,a){var n=e.__style;if(n!==t){var i=sv(t);i==null?e.removeAttribute("style"):e.style.cssText=i,e.__style=t}return a}function Xl(e,t,r=!1){if(e.multiple){if(t==null)return;if(!Ea(t))return tc();for(var a of e.options)a.selected=t.includes(or(a));return}for(a of e.options){var n=or(a);if(Sc(n,t)){a.selected=!0;return}}(!r||t!==void 0)&&(e.selectedIndex=-1)}function av(e){var t=new MutationObserver(()=>{Xl(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Ra(()=>{t.disconnect()})}function Cr(e,t,r=t){var a=new WeakSet,n=!0;Fl(e,"change",i=>{var d=i?"[selected]":":checked",u;if(e.multiple)u=[].map.call(e.querySelectorAll(d),or);else{var f=e.querySelector(d)??e.querySelector("option:not([disabled])");u=f&&or(f)}r(u),e.__value=u,R!==null&&a.add(R)}),Nc(()=>{var i=t();if(e===document.activeElement){var d=R;if(a.has(d))return}if(Xl(e,i,n),n&&i===void 0){var u=e.querySelector(":checked");u!==null&&(i=or(u),r(i))}e.__value=i,n=!1}),av(e)}function or(e){return"__value"in e?e.__value:e.value}const nv=Symbol("is custom element"),lv=Symbol("is html");function pe(e,t,r,a){var n=iv(e);n[t]!==(n[t]=r)&&(t==="loading"&&(e[$o]=r),r==null?e.removeAttribute(t):typeof r!="string"&&ov(e).includes(t)?e[t]=r:e.setAttribute(t,r))}function iv(e){return e.__attributes??(e.__attributes={[nv]:e.nodeName.includes("-"),[lv]:e.namespaceURI===pl})}var al=new Map;function ov(e){var t=e.getAttribute("is")||e.nodeName,r=al.get(t);if(r)return r;al.set(t,r=[]);for(var a,n=e,i=Element.prototype;i!==n;){a=cl(n);for(var d in a)a[d].set&&r.push(d);n=Sa(n)}return r}function Kt(e,t,r=t){var a=new WeakSet;Fl(e,"input",async n=>{var i=n?e.defaultValue:e.value;if(i=oa(e)?ca(i):i,r(i),R!==null&&a.add(R),await Bc(),i!==(i=t())){var d=e.selectionStart,u=e.selectionEnd,f=e.value.length;if(e.value=i??"",u!==null){var p=e.value.length;d===u&&u===f&&p>f?(e.selectionStart=p,e.selectionEnd=p):(e.selectionStart=d,e.selectionEnd=Math.min(u,p))}}}),h(t)==null&&e.value&&(r(oa(e)?ca(e.value):e.value),R!==null&&a.add(R)),qr(()=>{var n=t();if(e===document.activeElement){var i=R;if(a.has(i))return}oa(e)&&n===ca(e.value)||e.type==="date"&&!n&&!e.value||n!==e.value&&(e.value=n??"")})}function oa(e){var t=e.type;return t==="number"||t==="range"}function ca(e){return e===""?null:+e}function nl(e){return function(...t){var r=t[0];r.target===this&&(e==null||e.apply(this,t))}}function cv(e){return function(...t){var r=t[0];return r.stopPropagation(),e==null?void 0:e.apply(this,t)}}function vv(e){return function(...t){var r=t[0];return r.preventDefault(),e==null?void 0:e.apply(this,t)}}function dv(e=!1){const t=Ae,r=t.l.u;if(!r)return;let a=()=>$r(t.s);if(e){let n=0,i={};const d=Ca(()=>{let u=!1;const f=t.s;for(const p in f)f[p]!==i[p]&&(i[p]=f[p],u=!0);return u&&n++,n});a=()=>s(d)}r.b.length&&Lc(()=>{ll(t,a),va(r.b)}),Jn(()=>{const n=h(()=>r.m.map(Do));return()=>{for(const i of n)typeof i=="function"&&i()}}),r.a.length&&Jn(()=>{ll(t,a),va(r.a)})}function ll(e,t){if(e.l.s)for(const r of e.l.s)s(r);t()}const fv="5";var ol;typeof window<"u"&&((ol=window.__svelte??(window.__svelte={})).v??(ol.v=new Set)).add(fv);nc();var uv=F('<span class="tab-badge svelte-d3ct2b"> </span>'),pv=Js('<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" class="svelte-d3ct2b"><circle cx="12" cy="12" r="5" class="svelte-d3ct2b"></circle><line x1="12" y1="1" x2="12" y2="3" class="svelte-d3ct2b"></line><line x1="12" y1="21" x2="12" y2="23" class="svelte-d3ct2b"></line><line x1="4.22" y1="4.22" x2="5.64" y2="5.64" class="svelte-d3ct2b"></line><line x1="18.36" y1="18.36" x2="19.78" y2="19.78" class="svelte-d3ct2b"></line><line x1="1" y1="12" x2="3" y2="12" class="svelte-d3ct2b"></line><line x1="21" y1="12" x2="23" y2="12" class="svelte-d3ct2b"></line><line x1="4.22" y1="19.78" x2="5.64" y2="18.36" class="svelte-d3ct2b"></line><line x1="18.36" y1="5.64" x2="19.78" y2="4.22" class="svelte-d3ct2b"></line></svg>'),hv=Js('<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" class="svelte-d3ct2b"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" class="svelte-d3ct2b"></path></svg>'),_v=F('<div class="health-badge health-warn svelte-d3ct2b"><i class="dot dot-warn svelte-d3ct2b"></i> <span class="svelte-d3ct2b"> </span></div>'),bv=F('<div><i></i> <span class="svelte-d3ct2b"> </span></div>'),mv=F('<span class="health-error svelte-d3ct2b"> </span>'),gv=F('<span class="health-error svelte-d3ct2b"> </span>'),yv=F('<span class="dropdown-badge svelte-d3ct2b"> </span>'),wv=F('<div class="dropdown svelte-d3ct2b"><button><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" class="svelte-d3ct2b"><circle cx="12" cy="12" r="3" class="svelte-d3ct2b"></circle><path d="M12 1v4M12 19v4M4.22 4.22l2.83 2.83M16.95 16.95l2.83 2.83M1 12h4M19 12h4" class="svelte-d3ct2b"></path></svg> Core Engine</button> <button><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" class="svelte-d3ct2b"><circle cx="12" cy="12" r="4" class="svelte-d3ct2b"></circle><path d="M4 12H2M22 12h-2M12 4V2M12 22v-2" class="svelte-d3ct2b"></path><path d="m6.34 6.34-1.41-1.42M19.07 19.07l-1.41-1.41" class="svelte-d3ct2b"></path></svg> Commit Hook <!></button></div>'),kv=Js('<svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor" class="svelte-d3ct2b"><polygon points="5 3 19 12 5 21 5 3" class="svelte-d3ct2b"></polygon></svg>'),xv=Js('<svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor" class="svelte-d3ct2b"><rect x="6" y="4" width="4" height="16" class="svelte-d3ct2b"></rect><rect x="14" y="4" width="4" height="16" class="svelte-d3ct2b"></rect></svg>'),Ev=F('<div class="log-row log-row-warn svelte-d3ct2b"><span class="log-time svelte-d3ct2b">--:--:--</span> <span class="log-label label-warn svelte-d3ct2b">ARCH</span> <span class="log-msg svelte-d3ct2b">Custom architecture — no profile rules loaded. Add rules: memory-core remember "..." --type rule</span></div> <div class="log-row svelte-d3ct2b"><span class="log-time svelte-d3ct2b">--:--:--</span> <span class="log-label label-sys svelte-d3ct2b">SYS</span> <span class="log-msg svelte-d3ct2b">Or load a profile when ready: memory-core seed --arch clean-architecture</span></div>',1),Sv=F('<div class="log-row log-row-warn svelte-d3ct2b"><span class="log-time svelte-d3ct2b">--:--:--</span> <span class="log-label label-warn svelte-d3ct2b">WARN</span> <span class="log-msg svelte-d3ct2b">No architecture rules configured in .memory-core.json — nothing to watch.</span></div> <div class="log-row svelte-d3ct2b"><span class="log-time svelte-d3ct2b">--:--:--</span> <span class="log-label label-sys svelte-d3ct2b">SYS</span> <span class="log-msg svelte-d3ct2b">Awaiting manual rule configuration...</span></div>',1),Mv=F('<div class="log-row svelte-d3ct2b"><span class="log-time svelte-d3ct2b">--:--:--</span> <span class="log-label label-sys svelte-d3ct2b">SYS</span> <span class="log-msg svelte-d3ct2b">Initialization sequence started for memory-core...</span></div> <div class="log-row svelte-d3ct2b"><span class="log-time svelte-d3ct2b">--:--:--</span> <span class="log-label label-ok svelte-d3ct2b">DB</span> <span class="log-msg svelte-d3ct2b">Waiting for PostgreSQL connection...</span></div> <!> <div class="log-row svelte-d3ct2b"><span class="log-time svelte-d3ct2b"></span> <span class="log-label svelte-d3ct2b"></span> <span class="log-msg cursor-blink svelte-d3ct2b">_</span></div>',1),Tv=F('· <em class="svelte-d3ct2b"> </em>',1),Av=F('<br class="svelte-d3ct2b"/><span class="detail-fix svelte-d3ct2b"> </span>',1),Cv=F('<div class="log-detail svelte-d3ct2b"><span class="detail-index svelte-d3ct2b"> </span> <span class="detail-body svelte-d3ct2b"><strong class="svelte-d3ct2b"> </strong> <!> <!> <!></span></div>'),Ov=F('<div><span class="log-time svelte-d3ct2b"> </span> <span> </span> <span class="log-msg svelte-d3ct2b"><!></span> <button class="copy-btn svelte-d3ct2b" title="Copy">⎘</button></div> <!>',1),Lv=F('<div class="log-row svelte-d3ct2b"><span class="log-time svelte-d3ct2b">--:--:--</span> <span class="log-label label-ok svelte-d3ct2b">[OK]</span> <span class="log-msg svelte-d3ct2b">No commit hook violations in the last 24 hours.</span></div> <div class="log-row svelte-d3ct2b"><span class="log-time svelte-d3ct2b"></span> <span class="log-label svelte-d3ct2b"></span> <span class="log-msg cursor-blink svelte-d3ct2b">_</span></div>',1),Rv=F('<br class="svelte-d3ct2b"/><span class="detail-fix svelte-d3ct2b"> </span>',1),Nv=F('<div class="log-detail svelte-d3ct2b"><span class="detail-index svelte-d3ct2b"></span> <span class="detail-body svelte-d3ct2b"><!> <!></span></div>'),Iv=F('<div class="log-row log-row-fail svelte-d3ct2b"><span class="log-time svelte-d3ct2b"> </span> <span class="log-label label-hook svelte-d3ct2b"> </span> <span class="log-msg svelte-d3ct2b"><strong class="svelte-d3ct2b"> </strong> <!></span></div> <!>',1),Dv=F('<div class="section-header svelte-d3ct2b"><span class="section-title svelte-d3ct2b">Commit Hook</span> <span class="section-meta svelte-d3ct2b"> </span></div> <!>',1),Fv=F('<span class="rule-reason svelte-d3ct2b"> </span>'),$v=F('<div class="rule-row svelte-d3ct2b"><span class="rule-badge svelte-d3ct2b"> </span> <span class="rule-scope svelte-d3ct2b"> </span> <span class="rule-content svelte-d3ct2b"> </span> <!> <button class="del-btn svelte-d3ct2b">✕</button></div>'),Pv=F('Custom architecture — no profile rules loaded. Add rules from the terminal: <code class="svelte-d3ct2b">memory-core remember "..." --type rule</code>',1),jv=F('<div class="log-row svelte-d3ct2b"><span class="log-msg svelte-d3ct2b" style="color: var(--outline)"><!></span></div>'),Hv=F('<div class="section-header svelte-d3ct2b"><span class="section-title svelte-d3ct2b">Rule Engine</span> <span class="section-meta svelte-d3ct2b"> </span></div> <div class="rules-toolbar svelte-d3ct2b"><select class="rules-select svelte-d3ct2b"><option class="svelte-d3ct2b">All types</option><option class="svelte-d3ct2b">Rules</option><option class="svelte-d3ct2b">Decisions</option><option class="svelte-d3ct2b">Patterns</option><option class="svelte-d3ct2b">Ignores</option></select> <input class="rules-search svelte-d3ct2b" placeholder="Search rules..."/></div> <div class="rule-form-wrap svelte-d3ct2b"><form class="rule-form svelte-d3ct2b"><div class="rule-form-row svelte-d3ct2b"><select class="rules-select svelte-d3ct2b"><option class="svelte-d3ct2b">Rule</option><option class="svelte-d3ct2b">Decision</option><option class="svelte-d3ct2b">Pattern</option><option class="svelte-d3ct2b">Ignore</option></select> <select class="rules-select svelte-d3ct2b"><option class="svelte-d3ct2b">Project</option><option class="svelte-d3ct2b">Global</option></select> <input class="rules-input svelte-d3ct2b" placeholder="Reason"/> <input class="rules-input svelte-d3ct2b" placeholder="Tags"/></div> <div class="rule-form-row svelte-d3ct2b"><textarea rows="2" class="rules-textarea svelte-d3ct2b" placeholder="Rule or decision content..."></textarea> <button class="add-btn svelte-d3ct2b"> </button></div></form></div> <div class="rule-list svelte-d3ct2b"></div>',1),Bv=F('<div class="log-row svelte-d3ct2b"><span class="log-label label-warn svelte-d3ct2b">[WARN]</span> <span class="log-msg svelte-d3ct2b">No .archmind/layers.json found. Run <code class="svelte-d3ct2b">memory-core init</code> or create the file manually.</span></div>'),Wv=Js('<line stroke-width="1.5" opacity="0.75" class="svelte-d3ct2b"></line>'),Vv=Js('<g role="button" tabindex="0"><rect rx="6"></rect><text text-anchor="middle" class="arch-node-label svelte-d3ct2b"> </text><text text-anchor="middle" class="arch-node-desc svelte-d3ct2b"> </text></g>'),Uv=F('<div class="arch-node-panel-path svelte-d3ct2b"> </div>'),Kv=F('<div class="arch-node-panel-paths svelte-d3ct2b"><div class="arch-node-panel-section svelte-d3ct2b">Glob patterns</div> <!></div>'),qv=F('<div class="arch-node-panel-rule svelte-d3ct2b"><span> </span> <span style="font-size:12px" class="svelte-d3ct2b"> </span></div>'),zv=F('<div class="arch-node-panel-paths svelte-d3ct2b"><div class="arch-node-panel-section svelte-d3ct2b">Rules involving this layer</div> <!></div>'),Yv=F('<div class="arch-node-panel svelte-d3ct2b"><div class="arch-node-panel-header svelte-d3ct2b"><span class="arch-node-panel-name svelte-d3ct2b"> </span> <span class="arch-node-panel-meta svelte-d3ct2b"> </span> <button class="arch-node-panel-close svelte-d3ct2b" aria-label="Close">✕</button></div> <!> <!></div>'),Gv=F('<div class="arch-rule-row svelte-d3ct2b"><span> </span> <span class="arch-rule-layers svelte-d3ct2b"> </span> <span class="arch-rule-name svelte-d3ct2b"> </span></div>'),Xv=F('<div class="arch-graph-wrap svelte-d3ct2b"><svg class="arch-svg svelte-d3ct2b"><defs class="svelte-d3ct2b"><marker id="arrow-block" markerWidth="8" markerHeight="8" refX="6" refY="3" orient="auto" class="svelte-d3ct2b"><path d="M0,0 L0,6 L8,3 z" fill="var(--error)" class="svelte-d3ct2b"></path></marker><marker id="arrow-warn" markerWidth="8" markerHeight="8" refX="6" refY="3" orient="auto" class="svelte-d3ct2b"><path d="M0,0 L0,6 L8,3 z" fill="#f59e0b" class="svelte-d3ct2b"></path></marker><marker id="arrow-allow" markerWidth="8" markerHeight="8" refX="6" refY="3" orient="auto" class="svelte-d3ct2b"><path d="M0,0 L0,6 L8,3 z" fill="var(--green)" class="svelte-d3ct2b"></path></marker></defs><!><!></svg> <div class="arch-legend svelte-d3ct2b"><div class="legend-item svelte-d3ct2b"><svg width="24" height="8" class="svelte-d3ct2b"><line x1="0" y1="4" x2="20" y2="4" stroke="var(--error)" stroke-width="1.5" marker-end="url(#arrow-block)" class="svelte-d3ct2b"></line></svg> Block</div> <div class="legend-item svelte-d3ct2b"><svg width="24" height="8" class="svelte-d3ct2b"><line x1="0" y1="4" x2="20" y2="4" stroke="#f59e0b" stroke-width="1.5" stroke-dasharray="4,3" class="svelte-d3ct2b"></line></svg> Warn</div> <div class="legend-item svelte-d3ct2b"><svg width="24" height="8" class="svelte-d3ct2b"><line x1="0" y1="4" x2="20" y2="4" stroke="var(--green)" stroke-width="1.5" stroke-dasharray="6,3" class="svelte-d3ct2b"></line></svg> Allow</div></div> <!> <div class="arch-rule-list svelte-d3ct2b"></div></div>'),Jv=F('<div class="section-header svelte-d3ct2b"><span class="section-title svelte-d3ct2b">Layer Graph</span> <span class="section-meta svelte-d3ct2b"> </span></div> <!>',1),Qv=F('<div class="log-row svelte-d3ct2b"><span class="log-label label-ok svelte-d3ct2b">[OK]</span> <span class="log-msg svelte-d3ct2b">No violations recorded yet. Violations from watch mode are logged here.</span></div>'),Zv=F('<span class="history-issue svelte-d3ct2b"> </span>'),ed=F('<div class="history-violation svelte-d3ct2b"><span class="log-label label-error svelte-d3ct2b">[VIOLATION]</span> <span class="history-rule svelte-d3ct2b"> </span> <!></div>'),td=F('<div class="history-entry svelte-d3ct2b"><div class="history-header svelte-d3ct2b"><span class="history-file svelte-d3ct2b"> </span> <span class="history-time svelte-d3ct2b"> </span></div> <!></div>'),sd=F('<div class="history-list svelte-d3ct2b"></div>'),rd=F('<div class="section-header svelte-d3ct2b"><span class="section-title svelte-d3ct2b">Violation History</span> <span class="section-meta svelte-d3ct2b"> </span></div> <!>',1),ad=F('<div class="modal-row svelte-d3ct2b"><label class="modal-label svelte-d3ct2b" for="model-apikey">API Key</label> <input id="model-apikey" class="modal-input svelte-d3ct2b" type="password"/></div>'),nd=F("<div> </div>"),ld=F('<div class="modal-backdrop svelte-d3ct2b" role="presentation"><div class="modal svelte-d3ct2b"><div class="modal-header svelte-d3ct2b"><span class="modal-title svelte-d3ct2b">Settings</span> <button class="modal-close svelte-d3ct2b">✕</button></div> <section class="modal-section svelte-d3ct2b"><div class="modal-section-title svelte-d3ct2b">AI Model</div> <div class="modal-row svelte-d3ct2b"><label class="modal-label svelte-d3ct2b" for="model-provider">Provider</label> <select id="model-provider" class="modal-input svelte-d3ct2b"><option class="svelte-d3ct2b">Ollama (local)</option><option class="svelte-d3ct2b">OpenAI</option><option class="svelte-d3ct2b">Anthropic</option><option class="svelte-d3ct2b">MiniMax</option><option class="svelte-d3ct2b">OpenAI-compatible</option></select></div> <div class="modal-row svelte-d3ct2b"><label class="modal-label svelte-d3ct2b" for="model-name">Model</label> <input id="model-name" class="modal-input svelte-d3ct2b" placeholder="e.g. llama3.2, gpt-4o, claude-sonnet-4-6"/></div> <!> <div class="modal-row svelte-d3ct2b"><div class="svelte-d3ct2b"></div> <div class="modal-row-actions svelte-d3ct2b"><button class="modal-btn modal-btn-primary svelte-d3ct2b"> </button> <button class="modal-btn svelte-d3ct2b">Refresh Config</button></div></div> <!></section> <section class="modal-section svelte-d3ct2b"><div class="modal-section-title svelte-d3ct2b">Timeouts</div> <div class="modal-row svelte-d3ct2b"><label class="modal-label svelte-d3ct2b" for="chat-timeout">CHAT_TIMEOUT_MS</label> <input id="chat-timeout" class="modal-input svelte-d3ct2b" placeholder="60000" type="text" inputmode="numeric"/></div> <div class="modal-row svelte-d3ct2b"><label class="modal-label svelte-d3ct2b" for="check-timeout">CHECK_TIMEOUT_MS</label> <input id="check-timeout" class="modal-input svelte-d3ct2b" placeholder="20000" type="text" inputmode="numeric"/></div></section> <section class="modal-section svelte-d3ct2b"><div class="modal-section-title svelte-d3ct2b">Current Status</div> <div class="modal-status-row svelte-d3ct2b"><span class="modal-status-label svelte-d3ct2b">Provider</span><span class="modal-status-val svelte-d3ct2b"> </span></div> <div class="modal-status-row svelte-d3ct2b"><span class="modal-status-label svelte-d3ct2b">Model</span><span class="modal-status-val svelte-d3ct2b"> </span></div> <div class="modal-status-row svelte-d3ct2b"><span class="modal-status-label svelte-d3ct2b">API Key</span><span class="modal-status-val svelte-d3ct2b"> </span></div> <div class="modal-status-row svelte-d3ct2b"><span class="modal-status-label svelte-d3ct2b">Embedding</span><span class="modal-status-val svelte-d3ct2b"> </span></div> <div class="modal-status-row svelte-d3ct2b"><span class="modal-status-label svelte-d3ct2b">Chat timeout</span><span class="modal-status-val svelte-d3ct2b"> </span></div> <div class="modal-status-row svelte-d3ct2b"><span class="modal-status-label svelte-d3ct2b">Check timeout</span><span class="modal-status-val svelte-d3ct2b"> </span></div> <div class="modal-status-row svelte-d3ct2b"><span class="modal-status-label svelte-d3ct2b">AI calls this session</span><span class="modal-status-val svelte-d3ct2b"> </span></div> <div class="modal-status-row svelte-d3ct2b"><span class="modal-status-label svelte-d3ct2b">Total tokens</span><span class="modal-status-val svelte-d3ct2b"> </span></div> <div class="modal-status-row svelte-d3ct2b"><span class="modal-status-label svelte-d3ct2b">Input / Output</span><span class="modal-status-val svelte-d3ct2b"> </span></div></section></div></div>'),id=F('<div class="shell svelte-d3ct2b"><header class="topbar svelte-d3ct2b"><div class="topbar-brand svelte-d3ct2b"><span class="brand-name svelte-d3ct2b">memory-core</span> <nav class="topbar-nav svelte-d3ct2b"><button>Dashboard</button> <button>Live Feed</button> <button>Metrics</button> <button>Arch Graph</button> <button>History <!></button></nav></div> <div class="topbar-search svelte-d3ct2b"><span class="search-icon svelte-d3ct2b">⌕</span> <input class="search-input svelte-d3ct2b" placeholder="Search system logs, traces, and metrics..." type="text"/></div> <div class="topbar-actions svelte-d3ct2b"><button class="icon-btn svelte-d3ct2b" title="Notifications"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" class="svelte-d3ct2b"><path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9" class="svelte-d3ct2b"></path><path d="M13.73 21a2 2 0 0 1-3.46 0" class="svelte-d3ct2b"></path></svg></button> <button><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" class="svelte-d3ct2b"><rect x="2" y="3" width="20" height="14" rx="2" class="svelte-d3ct2b"></rect><path d="m7 21 5-5 5 5" class="svelte-d3ct2b"></path><path d="m7 8 3 3-3 3" class="svelte-d3ct2b"></path><path d="M13 14h4" class="svelte-d3ct2b"></path></svg></button> <button class="icon-btn svelte-d3ct2b" title="Settings"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" class="svelte-d3ct2b"><circle cx="12" cy="12" r="3" class="svelte-d3ct2b"></circle><path d="M19.07 4.93a10 10 0 0 1 0 14.14M4.93 4.93a10 10 0 0 0 0 14.14" class="svelte-d3ct2b"></path><path d="M12 2v2M12 20v2M2 12h2M20 12h2" class="svelte-d3ct2b"></path></svg></button> <button class="icon-btn svelte-d3ct2b"><!></button> <div class="avatar svelte-d3ct2b" title="System Administrator">S</div></div></header> <div class="body svelte-d3ct2b"><aside class="sidebar svelte-d3ct2b"><div class="sidebar-logo svelte-d3ct2b"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" class="svelte-d3ct2b"><circle cx="12" cy="12" r="3" class="svelte-d3ct2b"></circle><path d="M12 1v4M12 19v4M4.22 4.22l2.83 2.83M16.95 16.95l2.83 2.83M1 12h4M19 12h4M4.22 19.78l2.83-2.83M16.95 7.05l2.83-2.83" class="svelte-d3ct2b"></path></svg></div> <nav class="sidebar-nav svelte-d3ct2b"><button class="side-btn side-btn-active svelte-d3ct2b" title="Live Feed"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" class="svelte-d3ct2b"><rect x="2" y="3" width="20" height="14" rx="2" class="svelte-d3ct2b"></rect><path d="m7 21 5-5 5 5" class="svelte-d3ct2b"></path><path d="m7 8 3 3-3 3" class="svelte-d3ct2b"></path><path d="M13 14h4" class="svelte-d3ct2b"></path></svg></button></nav> <div></div></aside> <main class="content svelte-d3ct2b"><div class="health-bar svelte-d3ct2b"><span class="health-label svelte-d3ct2b">System Health:</span> <div class="health-badge health-green svelte-d3ct2b"><i class="dot dot-green svelte-d3ct2b"></i> <span class="svelte-d3ct2b"> </span></div> <div><i></i> <span class="svelte-d3ct2b"> </span></div> <div><i></i> <span class="svelte-d3ct2b"> </span></div> <!> <!> <!> <!></div> <div class="filter-bar svelte-d3ct2b"><div class="filter-left svelte-d3ct2b"><div class="chip chip-primary svelte-d3ct2b"><span class="svelte-d3ct2b">LEVEL: ALL</span> <button class="chip-close svelte-d3ct2b" title="Clear cache">✕</button></div> <div class="service-dropdown-wrap svelte-d3ct2b"><button class="chip chip-outline svelte-d3ct2b"><span class="svelte-d3ct2b"> </span> <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><polyline points="6 9 12 15 18 9" class="svelte-d3ct2b"></polyline></svg></button> <!></div> <div class="divider-v svelte-d3ct2b"></div> <div class="metrics-strip svelte-d3ct2b"><div class="metric-item svelte-d3ct2b"><span class="metric-label svelte-d3ct2b">VIOLATIONS</span> <span> </span></div> <div class="metric-item svelte-d3ct2b"><span class="metric-label svelte-d3ct2b">FILES</span> <span class="metric-value svelte-d3ct2b"> </span></div> <div class="metric-item svelte-d3ct2b"><span class="metric-label svelte-d3ct2b">RULES</span> <span class="metric-value svelte-d3ct2b"> </span></div></div></div> <div class="filter-right svelte-d3ct2b"><div class="live-badge svelte-d3ct2b"><i></i> <span class="svelte-d3ct2b"> </span></div> <button><!></button> <button class="icon-btn svelte-d3ct2b" title="Download snapshot"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" class="svelte-d3ct2b"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" class="svelte-d3ct2b"></path><polyline points="7 10 12 15 17 10" class="svelte-d3ct2b"></polyline><line x1="12" y1="15" x2="12" y2="3" class="svelte-d3ct2b"></line></svg></button></div></div> <div class="feed-area svelte-d3ct2b"><!> <!> <!></div> <footer class="metrics-footer svelte-d3ct2b"><div class="footer-left svelte-d3ct2b"><div class="footer-metric svelte-d3ct2b"><span class="footer-label svelte-d3ct2b">Checks</span> <span class="footer-val svelte-d3ct2b"> </span> <span class="footer-unit svelte-d3ct2b">AI CALLS</span></div> <div class="footer-metric svelte-d3ct2b"><span class="footer-label svelte-d3ct2b">Tokens</span> <span class="footer-val svelte-d3ct2b"> </span> <span class="footer-unit svelte-d3ct2b"> </span></div> <div class="footer-metric svelte-d3ct2b"><span class="footer-label svelte-d3ct2b">Error Rate</span> <span class="footer-val footer-val-error svelte-d3ct2b"> </span></div> <div class="footer-metric svelte-d3ct2b"><span class="footer-label svelte-d3ct2b">Bypasses</span> <span> </span></div></div> <div class="footer-right svelte-d3ct2b"><div class="footer-actions svelte-d3ct2b"><button class="action-btn svelte-d3ct2b" title="Sync rules to all AI agent files"> </button> <button class="action-btn svelte-d3ct2b" title="Run full scan on all tracked files"> </button> <button class="action-btn action-btn-warn svelte-d3ct2b" title="Tune noisy rules"> </button></div> <div class="storage-bar-wrap svelte-d3ct2b"><div class="storage-bar svelte-d3ct2b"><div class="storage-fill svelte-d3ct2b"></div></div> <span class="footer-label svelte-d3ct2b"> </span></div></div></footer></main></div> <!></div>');function od(e,t){bl(t,!1);const r=P(),a=P(),n=P(),i=P(),d=P(),u=P(),f=P(),p=P(),m=P(),A=P(),k=P(),E=P(),y=P(),D=P(),S=P(),I=P(),ae=P(),ie=P(),be=P(),Xe=P();let b=P({config:null,stats:{rules:{},files:{},topRules:[],topFiles:[]},files:[],memories:[]}),me=P([]),ot=P(!1),ct=P("all"),De=P(""),At=P(!1),Je=P(""),he=P({type:"rule",scope:"project",content:"",reason:"",tags:"dashboard"}),Fe=P("live-feed"),qe=P("live-feed"),Re=P(null),Ct=P(!1),Qt=P("core-engine"),Be=P(!1),Qs=P(""),Rs=P(!1),Ee=P({provider:"",model:"",apiKey:"",chatTimeoutMs:"",checkTimeoutMs:""}),wr=P(!1),Zt=P(""),es=P("");const Jl=24*60*60*1e3,$a=640,Pa=380,Bt=110,Wt=38;function kr(l){s(Be)||w(me,[{...l,id:crypto.randomUUID()},...s(me)].slice(0,80))}function ja(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==="log"?{type:"log",timestamp:l.timestamp,file:l.file,message:l.message}: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 xr(l){const _=s(b).files??[],C=_.findIndex(j=>j.file===l.file),O=_.slice();return C===-1?O.push(l):O[C]=l,O.sort((j,q)=>q.lastSeen.localeCompare(j.lastSeen))}function Ql(l){const _=s(b).watcher??{enabled:!0,running:!1,path:void 0,model:void 0,rules:void 0,lastEventAt:void 0,error:void 0};let C=s(b).files,O={..._,lastEventAt:l.timestamp,enabled:!0};l.type==="ready"&&(O={...O,running:!0,error:void 0,path:l.path,model:l.model,rules:l.rules}),l.type==="saved"&&(C=xr({file:l.file,status:"checking",lastSeen:l.timestamp,violations:[]})),l.type==="clean"&&(C=xr({file:l.file,status:"clean",lastSeen:l.timestamp,violations:[]})),l.type==="skipped"&&(C=xr({file:l.file,status:"skipped",lastSeen:l.timestamp,violations:[],message:l.reason})),l.type==="violations"&&(C=xr({file:l.file,status:"violations",lastSeen:l.timestamp,violations:l.violations})),l.type==="error"&&(O={...O,running:!1,error:l.message}),l.type==="stopped"&&(O={...O,running:!1});const j=[l,...s(b).events??[]].slice(0,100);w(b,{...s(b),files:C,events:j,watcher:O})}function zr(l=[]){w(me,l.map(ja).map(_=>({..._,id:crypto.randomUUID()})).reverse().slice(0,80))}function Ha(l){return new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date(l))}function Ba(l,_){const C=l.file||_;return l.line?`${C}:${l.line}`:C}function Zl(l){return l.type==="saved"?"SAVE":l.type==="clean"?"OK":l.type==="skipped"?"SKIP":l.type==="violations"?"FAIL":l.type==="log"?"CHCK":l.type==="error"?"WARN":"SYS"}function ei(l){return l.type==="clean"?"label-ok":l.type==="violations"||l.type==="error"?"label-warn":l.type==="log"?"label-chck":l.type==="system"?"label-sys":"label-info"}async function Zs(){const l=await fetch(`/api/snapshot?t=${Date.now()}`,{cache:"no-store"});w(b,await l.json()),zr(s(b).events)}async function ti(){w(Je,"");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 _=await l.json();_.snapshot?(w(b,_.snapshot),zr(s(b).events)):await Zs()}catch(l){w(Je,l.message)}}function si(){try{localStorage.clear(),sessionStorage.clear()}finally{location.reload()}}async function ri(){w(wr,!0),w(Zt,"");try{const l=await fetch("/api/config/model",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(s(Ee))}),_=await l.json().catch(()=>({}));if(!l.ok)throw new Error(_.error??"Save failed");const C=Array.isArray(_.warnings)&&_.warnings.length>0?" — "+_.warnings.join("; "):"";w(Zt,`✓ ${_.message??"Settings updated"}${C}`),await Zs()}catch(l){w(Zt,`✗ ${l.message}`)}finally{w(wr,!1)}}async function Yr(l){w(es,l);try{await fetch(`/api/actions/${l}`,{method:"POST"}),kr({type:"system",timestamp:new Date().toISOString(),message:`Action started: memory-core ${l==="check-all"?"check --all":l}`})}catch{}finally{w(es,"")}}function Wa(){const l=location.protocol==="https:"?"wss:":"ws:",_=new WebSocket(`${l}//${location.host}/ws`);_.addEventListener("open",()=>{w(ot,!0),kr({type:"system",timestamp:new Date().toISOString(),message:"Dashboard connected"})}),_.addEventListener("close",()=>{w(ot,!1),kr({type:"error",timestamp:new Date().toISOString(),message:"Dashboard disconnected"}),setTimeout(Wa,1500)}),_.addEventListener("message",C=>{const O=JSON.parse(C.data);if(O.type==="snapshot"){w(b,O.snapshot),s(me).length===0&&zr(s(b).events);return}if(O.type==="stats"){w(b,{...s(b),stats:O.stats});return}O.type==="watch"&&(Ql(O.event),kr(ja(O.event)))})}async function ai(){if(s(he).content.trim()){w(At,!0),w(Je,"");try{const l=await fetch("/api/memories",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(s(he))});if(!l.ok)throw new Error((await l.json()).error??"Save failed");w(he,{type:"rule",scope:"project",content:"",reason:"",tags:"dashboard"}),await Zs()}catch(l){w(Je,l.message)}finally{w(At,!1)}}}async function ni(l){w(Je,"");const _=await fetch(`/api/memories/${l}`,{method:"DELETE"});if(!_.ok){w(Je,(await _.json()).error??"Delete failed");return}await Zs()}function Va(l){w(Qt,l),w(Ct,!1),l==="commit-hook"?w(Fe,"commit-hook"):w(Fe,"live-feed")}function li(){w(Fe,s(Fe)==="commit-hook"?"live-feed":"commit-hook"),w(Qt,s(Fe)==="commit-hook"?"commit-hook":"core-engine")}function ii(l){s(Ct)&&(l.target.closest(".service-dropdown-wrap")||w(Ct,!1))}let ts=P(localStorage.getItem("mc-theme")==="dark"||!localStorage.getItem("mc-theme")&&window.matchMedia("(prefers-color-scheme: dark)").matches);function oi(){w(ts,!s(ts)),localStorage.setItem("mc-theme",s(ts)?"dark":"light")}document.documentElement.setAttribute("data-theme",s(ts)?"dark":"light"),Zs().catch(l=>{w(Je,l.message)}),Wa(),xe(()=>(s(b),s(ct),s(De)),()=>{w(r,s(b).memories.filter(l=>{const _=s(ct)==="all"||l.type===s(ct),C=`${l.type} ${l.scope} ${l.content} ${l.reason??""} ${l.tags.join(" ")}`.toLowerCase();return _&&C.includes(s(De).toLowerCase())}))}),xe(()=>s(b),()=>{w(a,s(b).files.reduce((l,_)=>l+_.violations.length,0))}),xe(()=>s(b),()=>{w(n,s(b).files.filter(l=>l.status==="clean").length)}),xe(()=>s(b),()=>{w(i,Object.values(s(b).stats.rules).reduce((l,_)=>l+_,0))}),xe(()=>s(b),()=>{w(d,s(b).stats.recentViolations??[])}),xe(()=>s(d),()=>{w(u,s(d).filter(l=>{if(!(l.source==="hook"||l.source==="ci"))return!1;const _=Date.parse(l.timestamp);return Number.isNaN(_)?!1:Date.now()-_<=Jl}))}),xe(()=>s(a),()=>{w(f,s(a))}),xe(()=>s(b),()=>{w(p,s(b).files.filter(l=>l.status!=="checking").length)}),xe(()=>s(b),()=>{w(m,s(b).memories.filter(l=>["rule","pattern","decision"].includes(l.type)).length)}),xe(()=>s(b),()=>{var l;w(A,((l=s(b).memoryCount)==null?void 0:l.total)??s(b).memories.length)}),xe(()=>(s(ot),s(b)),()=>{var l,_;w(k,s(ot)?((l=s(b).watcher)==null?void 0:l.enabled)===!1?{live:!1,label:"Watch off"}:(_=s(b).watcher)!=null&&_.running?{live:!0,label:"Watcher live"}:{live:!1,label:"Watcher idle"}:{live:!1,label:"Disconnected"})}),xe(()=>s(b),()=>{var l;w(E,((l=s(b).arch)==null?void 0:l.layers)??[])}),xe(()=>s(b),()=>{var l;w(y,((l=s(b).arch)==null?void 0:l.rules)??[])}),xe(()=>s(E),()=>{w(D,(()=>{const l=s(E);if(l.length===0)return[];const _=["api","application","domain","infrastructure","shared"],C=[...l].sort((J,L)=>{const g=_.indexOf(J.name)===-1?99:_.indexOf(J.name),B=_.indexOf(L.name)===-1?99:_.indexOf(L.name);return g-B}),O=Math.min(C.length,3),j=Math.ceil(C.length/O),q=($a-O*Bt)/(O+1),ee=(Pa-j*Wt)/(j+1);return C.map((J,L)=>{const g=L%O,B=Math.floor(L/O);return{name:J.name,description:J.description,x:q+g*(Bt+q),y:ee+B*(Wt+ee)}})})())}),xe(()=>(s(D),s(y)),()=>{w(S,(()=>{const l=new Map(s(D).map(_=>[_.name,_]));return s(y).filter(_=>_.fromLayer!=="*"&&_.toLayer!=="*").map(_=>{const C=l.get(_.fromLayer),O=l.get(_.toLayer);if(!C||!O)return null;const j=C.x+Bt/2,q=C.y+Wt/2,ee=O.x+Bt/2,J=O.y+Wt/2,L=ee-j,g=J-q,B=Math.sqrt(L*L+g*g)||1,V=j+L/B*(Bt/2+4),U=q+g/B*(Wt/2+4),Oe=ee-L/B*(Bt/2+4),We=J-g/B*(Wt/2+4);return{r:_,sx:V,sy:U,ex:Oe,ey:We}}).filter(Boolean)})())}),xe(()=>s(b),()=>{var l;w(I,((l=s(b).runtime)==null?void 0:l.postgres.connected)??!1)}),xe(()=>s(b),()=>{var l;w(ae,((l=s(b).runtime)==null?void 0:l.model.ollamaReachable)??!1)}),xe(()=>s(b),()=>{var l,_;w(ie,(((l=s(b).runtime)==null?void 0:l.model.checkModelResolved)??((_=s(b).runtime)==null?void 0:_.model.chatModel)??"unknown").toUpperCase())}),xe(()=>s(b),()=>{var l,_;w(be,((l=s(b).runtime)==null?void 0:l.project.backendArchitecture)==="custom"||((_=s(b).runtime)==null?void 0:_.project.frontendFramework)==="custom")}),xe(()=>s(b),()=>{w(Xe,(()=>{var O,j;const l=(O=s(b).runtime)==null?void 0:O.project.backendArchitecture,_=(j=s(b).runtime)==null?void 0:j.project.frontendFramework,C=[l?l==="custom"?"Custom":l:null,_?_==="custom"?"Custom":_:null].filter(Boolean);return C.length>0?C.join(" / "):null})())}),xe(()=>s(ts),()=>{document.documentElement.setAttribute("data-theme",s(ts)?"dark":"light")}),Ic(),dv();var Ua=id();re("click",ga,ii);var Ka=o(Ua),qa=o(Ka),ci=c(o(qa),2),Gr=o(ci);let za;var Xr=c(Gr,2);let Ya;var Jr=c(Xr,2);let Ga;var Qr=c(Jr,2);let Xa;var Zr=c(Qr,2);let Ja;var vi=c(o(Zr));{var di=l=>{var _=uv(),C=o(_);H(()=>M(C,(s(b),h(()=>{var O;return(O=s(b).violationHistory)==null?void 0:O.length})))),T(l,_)};Y(vi,l=>{s(b),h(()=>{var _;return(((_=s(b).violationHistory)==null?void 0:_.length)??0)>0})&&l(di)})}var Qa=c(qa,2),fi=c(o(Qa),2),ui=c(Qa,2),Er=c(o(ui),2);let Za;var en=c(Er,2),ea=c(en,2),pi=o(ea);{var hi=l=>{var _=pv();T(l,_)},_i=l=>{var _=hv();T(l,_)};Y(pi,l=>{s(ts)?l(hi):l(_i,-1)})}var tn=c(Ka,2),sn=o(tn),rn=c(o(sn),4);let an;var bi=c(sn,2),nn=o(bi),ln=c(o(nn),2),mi=c(o(ln),2),gi=o(mi),ta=c(ln,2);let on;var cn=o(ta);let vn;var yi=c(cn,2),wi=o(yi),sa=c(ta,2);let dn;var fn=o(sa);let un;var ki=c(fn,2),xi=o(ki),pn=c(sa,2);{var Ei=l=>{var _=_v(),C=c(o(_),2),O=o(C);H(()=>M(O,`${s(b),h(()=>{var j;return(j=s(b).arch)==null?void 0:j.pendingRules})??""} PENDING RULES`)),T(l,_)};Y(pn,l=>{s(b),h(()=>{var _;return(((_=s(b).arch)==null?void 0:_.pendingRules)??0)>0})&&l(Ei)})}var hn=c(pn,2);{var Si=l=>{var _=bv();let C;var O=o(_);let j;var q=c(O,2),ee=o(q);H(J=>{C=ce(_,1,"health-badge svelte-d3ct2b",null,C,{"health-warn":s(be),"health-green":!s(be)}),j=ce(O,1,"dot svelte-d3ct2b",null,j,{"dot-warn":s(be),"dot-green":!s(be)}),M(ee,`ARCH: ${J??""}${s(be)?" — ADD RULES":""}`)},[()=>(s(Xe),h(()=>s(Xe).toUpperCase()))]),T(l,_)};Y(hn,l=>{s(Xe)&&l(Si)})}var _n=c(hn,2);{var Mi=l=>{var _=mv(),C=o(_);H(()=>M(C,(s(b),h(()=>s(b).dbError)))),T(l,_)};Y(_n,l=>{s(b),h(()=>s(b).dbError)&&l(Mi)})}var Ti=c(_n,2);{var Ai=l=>{var _=gv(),C=o(_);H(()=>M(C,s(Je))),T(l,_)};Y(Ti,l=>{s(Je)&&l(Ai)})}var bn=c(nn,2),mn=o(bn),gn=o(mn),Ci=c(o(gn),2),yn=c(gn,2),ra=o(yn),wn=o(ra),Oi=o(wn),Li=c(wn,2);let kn;var Ri=c(ra,2);{var Ni=l=>{var _=wv(),C=o(_);let O;var j=c(C,2);let q;var ee=c(o(j),2);{var J=L=>{var g=yv(),B=o(g);H(()=>M(B,(s(u),h(()=>s(u).length)))),T(L,g)};Y(ee,L=>{s(u),h(()=>s(u).length>0)&&L(J)})}H(()=>{O=ce(C,1,"dropdown-item svelte-d3ct2b",null,O,{"dropdown-item-active":s(Qt)==="core-engine"}),q=ce(j,1,"dropdown-item svelte-d3ct2b",null,q,{"dropdown-item-active":s(Qt)==="commit-hook"})}),re("click",C,()=>Va("core-engine")),re("click",j,()=>Va("commit-hook")),T(l,_)};Y(Ri,l=>{s(Ct)&&l(Ni)})}var Ii=c(yn,4),xn=o(Ii),En=c(o(xn),2);let Sn;var Di=o(En),Mn=c(xn,2),Fi=c(o(Mn),2),$i=o(Fi),Pi=c(Mn,2),ji=c(o(Pi),2),Hi=o(ji),Bi=c(mn,2),Tn=o(Bi),An=o(Tn);let Cn;var Wi=c(An,2),Vi=o(Wi),er=c(Tn,2);let On;var Ui=o(er);{var Ki=l=>{var _=kv();T(l,_)},qi=l=>{var _=xv();T(l,_)};Y(Ui,l=>{s(Be)?l(Ki):l(qi,-1)})}var zi=c(er,2),Ln=c(bn,2),Rn=o(Ln);{var Yi=l=>{var _=Ds(),C=Ue(_);{var O=q=>{var ee=Mv(),J=c(Ue(ee),4);{var L=B=>{var V=Ev();T(B,V)},g=B=>{var V=Sv();T(B,V)};Y(J,B=>{s(be)?B(L):B(g,-1)})}T(q,ee)},j=q=>{var ee=Ds(),J=Ue(ee);dt(J,1,()=>(s(me),h(()=>[...s(me)].reverse())),L=>L.id,(L,g)=>{var B=Ov(),V=Ue(B);let U;var Oe=o(V),We=o(Oe),Ve=c(Oe,2),ke=o(Ve),x=c(Ve,2),oe=o(x);{var ne=N=>{var $=It();H(()=>M($,(s(g),h(()=>s(g).message)))),T(N,$)},Q=N=>{var $=It();H(()=>M($,`saved: ${s(g),h(()=>s(g).file)??""}`)),T(N,$)},de=N=>{var $=It();H(()=>M($,`${s(g),h(()=>s(g).file)??""} — no violations`)),T(N,$)},ge=N=>{var $=It();H(()=>M($,`${s(g),h(()=>s(g).file)??""} — skipped: ${s(g),h(()=>s(g).reason)??""}`)),T(N,$)},Se=N=>{var $=It();H(()=>M($,`${s(g),h(()=>s(g).file)??""} — ${s(g),h(()=>s(g).message)??""}`)),T(N,$)},Le=N=>{var $=It();H(()=>M($,`${s(g),h(()=>s(g).violations.length)??""} violation${s(g),h(()=>s(g).violations.length===1?"":"s")??""} in ${s(g),h(()=>s(g).file)??""}`)),T(N,$)};Y(oe,N=>{s(g),h(()=>s(g).type==="system"||s(g).type==="error")?N(ne):(s(g),h(()=>s(g).type==="saved")?N(Q,1):(s(g),h(()=>s(g).type==="clean")?N(de,2):(s(g),h(()=>s(g).type==="skipped")?N(ge,3):(s(g),h(()=>s(g).type==="log")?N(Se,4):N(Le,-1)))))})}var se=c(x,2),_e=c(V,2);{var $e=N=>{var $=Ds(),Ne=Ue($);dt(Ne,3,()=>(s(g),h(()=>s(g).violations)),(Z,K)=>`${s(g).id}-${K}`,(Z,K,ue)=>{var Me=Cv(),vt=o(Me),st=o(vt),ve=c(vt,2),Qe=o(ve),Ot=o(Qe),Lt=c(Qe,2);{var us=ze=>{var Rt=Tv(),Is=c(Ue(Rt)),tr=o(Is);H(()=>M(tr,(s(K),h(()=>s(K).rule)))),T(ze,Rt)};Y(Lt,ze=>{s(K),h(()=>s(K).rule)&&ze(us)})}var Vt=c(Lt,2);{var Ut=ze=>{var Rt=It();H(()=>M(Rt,`— ${s(K),h(()=>s(K).issue)??""}`)),T(ze,Rt)};Y(Vt,ze=>{s(K),h(()=>s(K).issue)&&ze(Ut)})}var ss=c(Vt,2);{var Ns=ze=>{var Rt=Av(),Is=c(Ue(Rt)),tr=o(Is);H(()=>M(tr,`→ ${s(K),h(()=>s(K).suggestion)??""}`)),T(ze,Rt)};Y(ss,ze=>{s(K),h(()=>s(K).suggestion)&&ze(Ns)})}H(ze=>{M(st,`[${s(ue)+1}]`),M(Ot,ze)},[()=>(s(K),s(g),h(()=>Ba(s(K),s(g).file)))]),T(Z,Me)}),T(N,$)};Y(_e,N=>{s(g),h(()=>s(g).type==="violations")&&N($e)})}H((N,$,Ne)=>{U=ce(V,1,"log-row svelte-d3ct2b",null,U,{"log-row-warn":s(g).type==="error","log-row-ok":s(g).type==="clean","log-row-fail":s(g).type==="violations"}),M(We,N),ce(Ve,1,`log-label ${$??""}`,"svelte-d3ct2b"),M(ke,`[${Ne??""}]`)},[()=>(s(g),h(()=>Ha(s(g).timestamp))),()=>(s(g),h(()=>ei(s(g)))),()=>(s(g),h(()=>Zl(s(g))))]),re("click",se,()=>{var $;const N=s(g).type==="system"||s(g).type==="error"?s(g).message:s(g).type==="saved"?`saved: ${s(g).file}`:s(g).file;($=navigator.clipboard)==null||$.writeText(N)}),T(L,B)}),T(q,ee)};Y(C,q=>{s(me),h(()=>s(me).length===0)?q(O):q(j,-1)})}T(l,_)},Gi=l=>{var _=Dv(),C=Ue(_),O=c(o(C),2),j=o(O),q=c(C,2);{var ee=L=>{var g=Lv();T(L,g)},J=L=>{var g=Ds(),B=Ue(g);dt(B,3,()=>(s(u),h(()=>s(u).slice(0,20))),(V,U)=>`${V.timestamp}-${U}`,(V,U)=>{var Oe=Iv(),We=Ue(Oe),Ve=o(We),ke=o(Ve),x=c(Ve,2),oe=o(x),ne=c(x,2),Q=o(ne),de=o(Q),ge=c(Q,2);{var Se=_e=>{var $e=It();H(N=>M($e,`— ${N??""}`),[()=>(s(U),h(()=>Ba(s(U),s(U).file)))]),T(_e,$e)};Y(ge,_e=>{s(U),h(()=>s(U).file)&&_e(Se)})}var Le=c(We,2);{var se=_e=>{var $e=Nv(),N=c(o($e),2),$=o(N);{var Ne=ue=>{var Me=It();H(()=>M(Me,(s(U),h(()=>s(U).issue)))),T(ue,Me)};Y($,ue=>{s(U),h(()=>s(U).issue)&&ue(Ne)})}var Z=c($,2);{var K=ue=>{var Me=Rv(),vt=c(Ue(Me)),st=o(vt);H(()=>M(st,`→ ${s(U),h(()=>s(U).suggestion)??""}`)),T(ue,Me)};Y(Z,ue=>{s(U),h(()=>s(U).suggestion)&&ue(K)})}T(_e,$e)};Y(Le,_e=>{s(U),h(()=>s(U).issue||s(U).suggestion)&&_e(se)})}H(_e=>{M(ke,_e),M(oe,`[${s(U),h(()=>s(U).source==="ci"?"CI":"HOOK")??""}]`),M(de,(s(U),h(()=>s(U).rule)))},[()=>(s(U),h(()=>Ha(s(U).timestamp)))]),T(V,Oe)}),T(L,g)};Y(q,L=>{s(u),h(()=>s(u).length===0)?L(ee):L(J,-1)})}H(()=>M(j,`${s(u),h(()=>s(u).length)??""} violation${s(u),h(()=>s(u).length===1?"":"s")??""} in last 24h`)),T(l,_)},Xi=l=>{var _=Hv(),C=Ue(_),O=c(o(C),2),j=o(O),q=c(C,2),ee=o(q),J=o(ee);J.value=J.__value="all";var L=c(J);L.value=L.__value="rule";var g=c(L);g.value=g.__value="decision";var B=c(g);B.value=B.__value="pattern";var V=c(B);V.value=V.__value="ignore";var U=c(ee,2),Oe=c(q,2),We=o(Oe),Ve=o(We),ke=o(Ve),x=o(ke);x.value=x.__value="rule";var oe=c(x);oe.value=oe.__value="decision";var ne=c(oe);ne.value=ne.__value="pattern";var Q=c(ne);Q.value=Q.__value="ignore";var de=c(ke,2),ge=o(de);ge.value=ge.__value="project";var Se=c(ge);Se.value=Se.__value="global";var Le=c(de,2),se=c(Le,2),_e=c(Ve,2),$e=o(_e),N=c($e,2),$=o(N),Ne=c(Oe,2);dt(Ne,5,()=>s(r),Z=>Z.id,(Z,K)=>{var ue=$v(),Me=o(ue),vt=o(Me),st=c(Me,2),ve=o(st),Qe=c(st,2),Ot=o(Qe),Lt=c(Qe,2);{var us=Ut=>{var ss=Fv(),Ns=o(ss);H(()=>M(Ns,(s(K),h(()=>s(K).reason)))),T(Ut,ss)};Y(Lt,Ut=>{s(K),h(()=>s(K).reason)&&Ut(us)})}var Vt=c(Lt,2);H(()=>{M(vt,(s(K),h(()=>s(K).type))),M(ve,(s(K),h(()=>s(K).scope))),M(Ot,(s(K),h(()=>s(K).content)))}),re("click",Vt,()=>ni(s(K).id)),T(Z,ue)},Z=>{var K=jv(),ue=o(K),Me=o(ue);{var vt=ve=>{var Qe=Pv();T(ve,Qe)},st=ve=>{var Qe=It("No rules match the current filters.");T(ve,Qe)};Y(Me,ve=>{s(be)&&s(m)===0?ve(vt):ve(st,-1)})}T(Z,K)}),H(Z=>{M(j,`${s(m)??""} rules active`),N.disabled=Z,M($,s(At)?"Saving…":"+ Add Rule")},[()=>(s(At),s(he),h(()=>s(At)||!s(he).content.trim()))]),Cr(ee,()=>s(ct),Z=>w(ct,Z)),Kt(U,()=>s(De),Z=>w(De,Z)),Cr(ke,()=>s(he).type,Z=>Nt(he,s(he).type=Z)),Cr(de,()=>s(he).scope,Z=>Nt(he,s(he).scope=Z)),Kt(Le,()=>s(he).reason,Z=>Nt(he,s(he).reason=Z)),Kt(se,()=>s(he).tags,Z=>Nt(he,s(he).tags=Z)),Kt($e,()=>s(he).content,Z=>Nt(he,s(he).content=Z)),re("submit",We,vv(ai)),T(l,_)};Y(Rn,l=>{s(Fe)==="live-feed"?l(Yi):s(Fe)==="commit-hook"?l(Gi,1):s(Fe)==="rules"&&l(Xi,2)})}var Nn=c(Rn,2);{var Ji=l=>{var _=Jv(),C=Ue(_),O=c(o(C),2),j=o(O),q=c(C,2);{var ee=L=>{var g=Bv();T(L,g)},J=L=>{var g=Xv(),B=o(g);pe(B,"width",$a),pe(B,"height",Pa);var V=c(o(B));dt(V,1,()=>s(S),as,(ke,x)=>{var oe=Ds(),ne=Ue(oe);{var Q=de=>{const ge=$s(()=>(s(x),h(()=>s(x).r.allowed?"var(--green)":s(x).r.enforcement==="warn"?"#f59e0b":"var(--error)"))),Se=$s(()=>(s(x),h(()=>s(x).r.allowed?"arrow-allow":s(x).r.enforcement==="warn"?"arrow-warn":"arrow-block"))),Le=$s(()=>(s(x),h(()=>s(x).r.allowed?"6,3":s(x).r.enforcement==="warn"?"4,3":"none")));var se=Wv();H(()=>{pe(se,"x1",(s(x),h(()=>s(x).sx))),pe(se,"y1",(s(x),h(()=>s(x).sy))),pe(se,"x2",(s(x),h(()=>s(x).ex))),pe(se,"y2",(s(x),h(()=>s(x).ey))),pe(se,"stroke",s(ge)),pe(se,"stroke-dasharray",s(Le)),pe(se,"marker-end",`url(#${s(Se)??""})`)}),T(de,se)};Y(ne,de=>{s(x)&&de(Q)})}T(ke,oe)});var U=c(V);dt(U,1,()=>s(D),as,(ke,x)=>{var oe=Vv();let ne;var Q=o(oe);pe(Q,"width",Bt),pe(Q,"height",Wt);var de=c(Q),ge=o(de),Se=c(de),Le=o(Se);H(se=>{ne=ce(oe,0,"arch-node arch-node-clickable svelte-d3ct2b",null,ne,{"arch-node-selected":s(Re)===s(x).name}),pe(oe,"aria-label",`Show files in ${s(x),h(()=>s(x).name)??""} layer`),pe(Q,"x",(s(x),h(()=>s(x).x))),pe(Q,"y",(s(x),h(()=>s(x).y))),ce(Q,0,`arch-node-rect arch-node-${s(x),h(()=>s(x).name)??""}`,"svelte-d3ct2b"),pe(Q,"stroke-width",(s(Re),s(x),h(()=>s(Re)===s(x).name?2.5:1.5))),pe(de,"x",(s(x),h(()=>s(x).x+Bt/2))),pe(de,"y",(s(x),h(()=>s(x).y+Wt/2-5))),M(ge,(s(x),h(()=>s(x).name))),pe(Se,"x",(s(x),h(()=>s(x).x+Bt/2))),pe(Se,"y",(s(x),h(()=>s(x).y+Wt/2+9))),M(Le,se)},[()=>(s(x),h(()=>s(x).description.length>18?s(x).description.slice(0,16)+"…":s(x).description))]),re("click",oe,()=>{w(Re,s(Re)===s(x).name?null:s(x).name)}),re("keydown",oe,se=>{(se.key==="Enter"||se.key===" ")&&w(Re,s(Re)===s(x).name?null:s(x).name)}),T(ke,oe)});var Oe=c(B,4);{var We=ke=>{const x=$s(()=>(s(E),s(Re),h(()=>s(E).find(N=>N.name===s(Re)))));var oe=Yv(),ne=o(oe),Q=o(ne),de=o(Q),ge=c(Q,2),Se=o(ge),Le=c(ge,2),se=c(ne,2);{var _e=N=>{var $=Kv(),Ne=c(o($),2);dt(Ne,1,()=>($r(s(x)),h(()=>s(x).paths)),as,(Z,K)=>{var ue=Uv(),Me=o(ue);H(()=>M(Me,s(K))),T(Z,ue)}),T(N,$)};Y(se,N=>{$r(s(x)),h(()=>{var $,Ne;return(Ne=($=s(x))==null?void 0:$.paths)==null?void 0:Ne.length})&&N(_e)})}var $e=c(se,2);dt($e,1,()=>(s(y),s(Re),h(()=>[s(y).filter(N=>N.fromLayer===s(Re)||N.toLayer===s(Re))])),as,(N,$)=>{var Ne=Ds(),Z=Ue(Ne);{var K=ue=>{var Me=zv(),vt=c(o(Me),2);dt(vt,1,()=>s($),as,(st,ve)=>{var Qe=qv(),Ot=o(Qe);let Lt;var us=o(Ot),Vt=c(Ot,2),Ut=o(Vt);H(ss=>{Lt=ce(Ot,1,"arch-rule-badge svelte-d3ct2b",null,Lt,{"badge-block":!s(ve).allowed&&s(ve).enforcement==="block","badge-warn":!s(ve).allowed&&s(ve).enforcement==="warn","badge-allow":s(ve).allowed}),M(us,ss),M(Ut,`${s(ve),h(()=>s(ve).fromLayer)??""} → ${s(ve),h(()=>s(ve).toLayer)??""} — ${s(ve),h(()=>s(ve).name)??""}`)},[()=>(s(ve),h(()=>s(ve).enforcement.toUpperCase()))]),T(st,Qe)}),T(ue,Me)};Y(Z,ue=>{s($),h(()=>s($).length)&&ue(K)})}T(N,Ne)}),H(()=>{M(de,s(Re)),M(Se,($r(s(x)),h(()=>{var N;return((N=s(x))==null?void 0:N.description)??""})))}),re("click",Le,()=>w(Re,null)),T(ke,oe)};Y(Oe,ke=>{s(Re)&&ke(We)})}var Ve=c(Oe,2);dt(Ve,5,()=>s(y),as,(ke,x)=>{var oe=Gv(),ne=o(oe);let Q;var de=o(ne),ge=c(ne,2),Se=o(ge),Le=c(ge,2),se=o(Le);H(_e=>{Q=ce(ne,1,"arch-rule-badge svelte-d3ct2b",null,Q,{"badge-block":!s(x).allowed&&s(x).enforcement==="block","badge-warn":!s(x).allowed&&s(x).enforcement==="warn","badge-allow":s(x).allowed}),M(de,_e),M(Se,`${s(x),h(()=>s(x).fromLayer)??""} → ${s(x),h(()=>s(x).toLayer)??""}`),M(se,(s(x),h(()=>s(x).name)))},[()=>(s(x),h(()=>s(x).enforcement.toUpperCase()))]),T(ke,oe)}),T(L,g)};Y(q,L=>{s(E),h(()=>s(E).length===0)?L(ee):L(J,-1)})}H(()=>M(j,`${s(E),h(()=>s(E).length)??""} layers · ${s(y),h(()=>s(y).length)??""} rules`)),T(l,_)};Y(Nn,l=>{s(qe)==="arch-graph"&&l(Ji)})}var Qi=c(Nn,2);{var Zi=l=>{var _=rd(),C=Ue(_),O=c(o(C),2),j=o(O),q=c(C,2);{var ee=L=>{var g=Qv();T(L,g)},J=L=>{var g=sd();dt(g,5,()=>(s(b),h(()=>s(b).violationHistory??[])),as,(B,V)=>{var U=td(),Oe=o(U),We=o(Oe),Ve=o(We),ke=c(We,2),x=o(ke),oe=c(Oe,2);dt(oe,1,()=>(s(V),h(()=>s(V).violations)),as,(ne,Q)=>{var de=ed(),ge=c(o(de),2),Se=o(ge),Le=c(ge,2);{var se=_e=>{var $e=Zv(),N=o($e);H(()=>M(N,`— ${s(Q),h(()=>s(Q).issue)??""}`)),T(_e,$e)};Y(Le,_e=>{s(Q),h(()=>s(Q).issue)&&_e(se)})}H(()=>M(Se,(s(Q),h(()=>s(Q).rule)))),T(ne,de)}),H(ne=>{M(Ve,(s(V),h(()=>s(V).file))),M(x,ne)},[()=>(s(V),h(()=>new Date(s(V).timestamp).toLocaleString()))]),T(B,U)}),T(L,g)};Y(q,L=>{s(b),h(()=>{var g;return!((g=s(b).violationHistory)!=null&&g.length)})?L(ee):L(J,-1)})}H(()=>M(j,`${s(b),h(()=>{var L;return((L=s(b).violationHistory)==null?void 0:L.length)??0})??""} entries (last 200)`)),T(l,_)};Y(Qi,l=>{s(qe)==="history"&&l(Zi)})}var eo=c(Ln,2),In=o(eo),Dn=o(In),to=c(o(Dn),2),so=o(to),Fn=c(Dn,2),$n=c(o(Fn),2),ro=o($n),ao=c($n,2),no=o(ao),Pn=c(Fn,2),lo=c(o(Pn),2),io=o(lo),oo=c(Pn,2),jn=c(o(oo),2);let Hn;var co=o(jn),vo=c(In,2),Bn=o(vo),Sr=o(Bn),fo=o(Sr),Mr=c(Sr,2),uo=o(Mr),aa=c(Mr,2),po=o(aa),ho=c(Bn,2),Wn=o(ho),_o=o(Wn),bo=c(Wn,2),mo=o(bo),go=c(tn,2);{var yo=l=>{var _=ld(),C=o(_),O=o(C),j=c(o(O),2),q=c(O,2),ee=c(o(q),2),J=c(o(ee),2),L=o(J);L.value=L.__value="ollama";var g=c(L);g.value=g.__value="openai";var B=c(g);B.value=B.__value="anthropic";var V=c(B);V.value=V.__value="minimax";var U=c(V);U.value=U.__value="openai-compatible";var Oe=c(ee,2),We=c(o(Oe),2),Ve=c(Oe,2);{var ke=le=>{var Pe=ad(),ps=c(o(Pe),2);H(()=>pe(ps,"placeholder",(s(b),h(()=>{var te;return(te=s(b).runtime)!=null&&te.model.apiKeyConfigured?"(already set — leave blank to keep)":"sk-..."})))),Kt(ps,()=>s(Ee).apiKey,te=>Nt(Ee,s(Ee).apiKey=te)),T(le,Pe)};Y(Ve,le=>{s(Ee),h(()=>s(Ee).provider&&s(Ee).provider!=="ollama")&&le(ke)})}var x=c(Ve,2),oe=c(o(x),2),ne=o(oe),Q=o(ne),de=c(ne,2),ge=c(x,2);{var Se=le=>{var Pe=nd();let ps;var te=o(Pe);H(rt=>{ps=ce(Pe,1,"modal-msg svelte-d3ct2b",null,ps,rt),M(te,s(Zt))},[()=>({"modal-msg-ok":s(Zt).startsWith("✓"),"modal-msg-err":s(Zt).startsWith("✗")})]),T(le,Pe)};Y(ge,le=>{s(Zt)&&le(Se)})}var Le=c(q,2),se=c(o(Le),2),_e=c(o(se),2),$e=c(se,2),N=c(o($e),2),$=c(Le,2),Ne=c(o($),2),Z=c(o(Ne)),K=o(Z),ue=c(Ne,2),Me=c(o(ue)),vt=o(Me),st=c(ue,2),ve=c(o(st)),Qe=o(ve),Ot=c(st,2),Lt=c(o(Ot)),us=o(Lt),Vt=c(Ot,2),Ut=c(o(Vt)),ss=o(Ut),Ns=c(Vt,2),ze=c(o(Ns)),Rt=o(ze),Is=c(Ns,2),tr=c(o(Is)),wo=o(tr),Vn=c(Is,2),ko=c(o(Vn)),xo=o(ko),Eo=c(Vn,2),So=c(o(Eo)),Mo=o(So);H((le,Pe,ps)=>{ne.disabled=s(wr),M(Q,s(wr)?"Saving…":"Apply"),M(K,(s(b),h(()=>{var te;return((te=s(b).runtime)==null?void 0:te.model.provider)??"—"}))),M(vt,(s(b),h(()=>{var te,rt;return((te=s(b).runtime)==null?void 0:te.model.checkModelResolved)??((rt=s(b).runtime)==null?void 0:rt.model.chatModel)??"—"}))),M(Qe,(s(b),h(()=>{var te;return(te=s(b).runtime)!=null&&te.model.apiKeyConfigured?"Configured":"Not set"}))),M(us,(s(b),h(()=>{var te,rt;return((te=s(b).runtime)==null?void 0:te.model.embeddingModelResolved)??((rt=s(b).runtime)==null?void 0:rt.model.embeddingModel)??"—"}))),M(ss,`${s(b),h(()=>{var te,rt;return((rt=(te=s(b).runtime)==null?void 0:te.timeouts)==null?void 0:rt.chatTimeoutMs)??"60000"})??""} ms`),M(Rt,`${s(b),h(()=>{var te,rt;return((rt=(te=s(b).runtime)==null?void 0:te.timeouts)==null?void 0:rt.checkTimeoutMs)??"20000"})??""} ms`),M(wo,(s(b),h(()=>{var te;return((te=s(b).stats.tokens)==null?void 0:te.calls)??0}))),M(xo,`${le??""} ${s(b),h(()=>{var te;return((te=s(b).runtime)==null?void 0:te.model.provider)==="ollama"?"(local — free)":""})??""}`),M(Mo,`${Pe??""} in / ${ps??""} out`)},[()=>(s(b),h(()=>{var le,Pe;return((Pe=(le=s(b).stats.tokens)==null?void 0:le.totalTokens)==null?void 0:Pe.toLocaleString())??"0"})),()=>(s(b),h(()=>{var le,Pe;return((Pe=(le=s(b).stats.tokens)==null?void 0:le.inputTokens)==null?void 0:Pe.toLocaleString())??"0"})),()=>(s(b),h(()=>{var le,Pe;return((Pe=(le=s(b).stats.tokens)==null?void 0:le.outputTokens)==null?void 0:Pe.toLocaleString())??"0"}))]),re("click",j,()=>w(Rs,!1)),Cr(J,()=>s(Ee).provider,le=>Nt(Ee,s(Ee).provider=le)),Kt(We,()=>s(Ee).model,le=>Nt(Ee,s(Ee).model=le)),re("click",ne,ri),re("click",de,ti),Kt(_e,()=>s(Ee).chatTimeoutMs,le=>Nt(Ee,s(Ee).chatTimeoutMs=le)),Kt(N,()=>s(Ee).checkTimeoutMs,le=>Nt(Ee,s(Ee).checkTimeoutMs=le)),re("click",_,nl(()=>w(Rs,!1))),re("keydown",_,nl(le=>{le.key==="Escape"&&w(Rs,!1)})),T(l,_)};Y(go,l=>{s(Rs)&&l(yo)})}H((l,_,C,O,j,q)=>{var ee,J,L,g,B;za=ce(Gr,1,"tab-btn svelte-d3ct2b",null,za,{"tab-active":s(qe)==="dashboard"}),Ya=ce(Xr,1,"tab-btn svelte-d3ct2b",null,Ya,{"tab-active":s(qe)==="live-feed"}),Ga=ce(Jr,1,"tab-btn svelte-d3ct2b",null,Ga,{"tab-active":s(qe)==="metrics"}),Xa=ce(Qr,1,"tab-btn svelte-d3ct2b",null,Xa,{"tab-active":s(qe)==="arch-graph"}),Ja=ce(Zr,1,"tab-btn svelte-d3ct2b",null,Ja,{"tab-active":s(qe)==="history"}),Za=ce(Er,1,"icon-btn svelte-d3ct2b",null,Za,{"icon-btn-active":s(Fe)==="commit-hook"}),pe(Er,"title",s(Fe)==="commit-hook"?"Switch to Live Feed":"Switch to Commit Hook"),pe(ea,"title",s(ts)?"Switch to light mode":"Switch to dark mode"),an=ce(rn,1,"sidebar-footer-dot svelte-d3ct2b",null,an,{"dot-live":s(k).live}),pe(rn,"title",(s(k),h(()=>s(k).label))),M(gi,`CORE ${s(k),h(()=>s(k).live?"LIVE":"IDLE")??""}`),on=ce(ta,1,"health-badge svelte-d3ct2b",null,on,{"health-green":s(I),"health-warn":!s(I)}),vn=ce(cn,1,"dot svelte-d3ct2b",null,vn,{"dot-green":s(I),"dot-warn":!s(I)}),M(wi,`DB ${s(I)?"CONNECTED":"DISCONNECTED"}`),dn=ce(sa,1,"health-badge svelte-d3ct2b",null,dn,{"health-blue":s(ae)||((ee=s(b).runtime)==null?void 0:ee.model.provider)!=="ollama","health-warn":!s(ae)&&((J=s(b).runtime)==null?void 0:J.model.provider)==="ollama"}),un=ce(fn,1,"dot svelte-d3ct2b",null,un,{"dot-blue":s(ae)||((L=s(b).runtime)==null?void 0:L.model.provider)!=="ollama","dot-warn":!s(ae)&&((g=s(b).runtime)==null?void 0:g.model.provider)==="ollama"}),M(xi,`MODEL: ${s(ie)??""}`),M(Oi,`SERVICE: ${s(Qt)==="commit-hook"?"COMMIT HOOK":"CORE-ENGINE"}`),kn=ce(Li,0,"chevron svelte-d3ct2b",null,kn,{"chevron-open":s(Ct)}),Sn=ce(En,1,"metric-value svelte-d3ct2b",null,Sn,{"metric-value-warn":s(f)>0}),M(Di,s(f)),M($i,l),M(Hi,_),Cn=ce(An,1,"dot dot-green svelte-d3ct2b",null,Cn,{"dot-pulse":s(k).live}),M(Vi,C),On=ce(er,1,"icon-btn svelte-d3ct2b",null,On,{"icon-btn-active":s(Be)}),pe(er,"title",s(Be)?"Resume":"Pause"),M(so,(s(b),h(()=>{var V;return((V=s(b).stats.tokens)==null?void 0:V.calls)??0}))),M(ro,O),M(no,(s(b),h(()=>{var V;return((V=s(b).runtime)==null?void 0:V.model.provider)==="ollama"?"LOCAL (FREE)":"USED"}))),M(io,j),Hn=ce(jn,1,"footer-val svelte-d3ct2b",null,Hn,{"footer-val-error":(((B=s(b).stats.bypasses)==null?void 0:B.withoutReason)??0)>0}),M(co,`${s(b),h(()=>{var V;return((V=s(b).stats.bypasses)==null?void 0:V.withoutReason)??0})??""} unrecorded`),Sr.disabled=s(es)==="sync",M(fo,`${s(es)==="sync"?"…":"⟳"} Sync Agents`),Mr.disabled=s(es)==="check-all",M(uo,`${s(es)==="check-all"?"…":"⊛"} Check All`),aa.disabled=s(es)==="tune",M(po,`${s(es)==="tune"?"…":"⚙"} Tune Rules`),rv(_o,`width: ${q??""}%`),M(mo,`Storage: ${s(A)??""} memories`)},[()=>(s(p),h(()=>s(p).toLocaleString())),()=>(s(m),h(()=>s(m).toLocaleString())),()=>(s(k),h(()=>s(k).live?"LIVE STREAMING":s(k).label.toUpperCase())),()=>(s(b),h(()=>{var l;return(l=s(b).stats.tokens)!=null&&l.totalTokens?(s(b).stats.tokens.totalTokens/1e3).toFixed(1)+"K":"—"})),()=>(s(f),s(p),h(()=>s(f)===0?"0.00%":(s(f)/Math.max(1,s(p))*100).toFixed(2)+"%")),()=>(s(A),h(()=>Math.min(100,s(A)/Math.max(1,s(A)+100)*100+20)))]),re("click",Gr,()=>{w(qe,"dashboard"),w(Fe,"live-feed")}),re("click",Xr,()=>{w(qe,"live-feed"),w(Fe,"live-feed")}),re("click",Jr,()=>{w(qe,"metrics"),w(Fe,"rules")}),re("click",Qr,()=>{w(qe,"arch-graph"),w(Fe,"live-feed")}),re("click",Zr,()=>{w(qe,"history")}),Kt(fi,()=>s(Qs),l=>w(Qs,l)),re("click",Er,li),re("click",en,()=>{var l,_,C,O,j,q;w(Rs,!s(Rs)),w(Ee,{provider:((l=s(b).runtime)==null?void 0:l.model.provider)??"",model:((_=s(b).runtime)==null?void 0:_.model.chatModel)??"",apiKey:"",chatTimeoutMs:((O=(C=s(b).runtime)==null?void 0:C.timeouts)==null?void 0:O.chatTimeoutMs)??"",checkTimeoutMs:((q=(j=s(b).runtime)==null?void 0:j.timeouts)==null?void 0:q.checkTimeoutMs)??""}),w(Zt,"")}),re("click",ea,oi),re("click",Ci,si),re("click",ra,cv(()=>w(Ct,!s(Ct)))),re("click",er,()=>w(Be,!s(Be))),re("click",zi,()=>{const l=new Blob([JSON.stringify(s(b),null,2)],{type:"application/json"}),_=document.createElement("a");_.href=URL.createObjectURL(l),_.download="memory-core-snapshot.json",_.click()}),re("click",Sr,()=>Yr("sync")),re("click",Mr,()=>Yr("check-all")),re("click",aa,()=>Yr("tune")),T(e,Ua),ml()}Yc(od,{target:document.getElementById("app")});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root{color-scheme:light dark;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased}body{margin:0;min-width:320px;min-height:100vh}button,input,select,textarea{font:inherit}button{border:0}:root{--primary: #0040e0;--primary-dim: #2e5bff;--primary-container: #efefff;--on-primary: #ffffff;--surface: #f8f9fb;--surface-low: #f3f4f6;--surface-mid: #edeef0;--surface-high: #e7e8ea;--surface-highest: #e1e2e4;--on-surface: #191c1e;--on-surface-var: #434656;--outline: #747688;--outline-var: #c4c5d9;--error: #ba1a1a;--error-bg: #ffdad6;--tertiary: #993100;--green: #10b981;--green-bg: rgba(16,185,129,.1);--green-border: rgba(16,185,129,.3);--mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;--sans: "Hanken Grotesk", Inter, ui-sans-serif, system-ui, sans-serif}body{margin:0;background:var(--surface);color:var(--on-surface);font-family:var(--sans);font-size:14px;overflow:hidden;height:100vh}*{box-sizing:border-box}::-webkit-scrollbar{width:5px;height:5px}::-webkit-scrollbar-track{background:var(--surface-low)}::-webkit-scrollbar-thumb{background:var(--outline-var);border-radius:4px}.shell.svelte-d3ct2b{display:flex;flex-direction:column;height:100vh;overflow:hidden}.topbar.svelte-d3ct2b{display:flex;align-items:center;gap:16px;height:64px;padding:0 24px;background:var(--surface);border-bottom:1px solid var(--outline-var);flex-shrink:0;z-index:30}.topbar-brand.svelte-d3ct2b{display:flex;align-items:center;gap:24px;flex-shrink:0}.brand-name.svelte-d3ct2b{font-size:18px;font-weight:700;color:var(--on-surface);font-family:var(--sans);letter-spacing:-.02em}.topbar-nav.svelte-d3ct2b{display:flex;gap:2px}.tab-btn.svelte-d3ct2b{padding:6px 12px;background:transparent;border:none;border-bottom:2px solid transparent;color:var(--on-surface-var);font-family:var(--mono);font-size:11px;font-weight:600;letter-spacing:.04em;cursor:pointer;text-transform:uppercase;transition:color .15s,border-color .15s}.tab-btn.svelte-d3ct2b:hover{color:var(--primary)}.tab-active.svelte-d3ct2b{color:var(--primary)!important;border-bottom-color:var(--primary);font-weight:700}.topbar-search.svelte-d3ct2b{flex:1;max-width:480px;margin:0 auto;position:relative}.search-icon.svelte-d3ct2b{position:absolute;left:12px;top:50%;transform:translateY(-50%);color:var(--on-surface-var);font-size:18px;pointer-events:none;line-height:1}.search-input.svelte-d3ct2b{width:100%;height:36px;padding:0 12px 0 36px;background:var(--surface-mid);border:1px solid var(--outline-var);border-radius:8px;color:var(--on-surface);font-family:var(--sans);font-size:13px;outline:none;transition:border-color .15s}.search-input.svelte-d3ct2b:focus{border-color:var(--primary-dim)}.topbar-actions.svelte-d3ct2b{display:flex;align-items:center;gap:4px;flex-shrink:0}.icon-btn.svelte-d3ct2b{width:34px;height:34px;display:flex;align-items:center;justify-content:center;background:transparent;border:none;border-radius:8px;color:var(--on-surface-var);cursor:pointer;transition:background .15s,color .15s}.icon-btn.svelte-d3ct2b:hover{background:var(--surface-low);color:var(--primary)}.icon-btn-active.svelte-d3ct2b{color:var(--primary)!important;background:var(--primary-container)!important}.avatar.svelte-d3ct2b{width:32px;height:32px;border-radius:50%;background:var(--primary-dim);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:13px;margin-left:8px;border:1px solid var(--outline-var);flex-shrink:0;cursor:default}.body.svelte-d3ct2b{display:flex;flex:1;min-height:0;overflow:hidden}.sidebar.svelte-d3ct2b{width:64px;flex-shrink:0;display:flex;flex-direction:column;align-items:center;padding:16px 0;background:#fff;border-right:1px solid var(--outline-var);z-index:20}.sidebar-logo.svelte-d3ct2b{width:40px;height:40px;background:var(--primary-dim);border-radius:4px;display:flex;align-items:center;justify-content:center;color:#fff;margin-bottom:24px}.sidebar-nav.svelte-d3ct2b{display:flex;flex-direction:column;gap:8px}.side-btn.svelte-d3ct2b{width:36px;height:36px;display:flex;align-items:center;justify-content:center;background:transparent;border:none;border-right:2px solid transparent;color:var(--on-surface-var);cursor:pointer;transition:color .15s;margin-right:-1px}.side-btn.svelte-d3ct2b:hover{color:var(--primary)}.side-btn-active.svelte-d3ct2b{color:var(--primary)!important;background:#0040e014;border-right-color:var(--primary)}.sidebar-footer-dot.svelte-d3ct2b{margin-top:auto;width:8px;height:8px;border-radius:50%;background:var(--outline)}.dot-live.svelte-d3ct2b{background:var(--green)!important;box-shadow:0 0 6px var(--green)}.content.svelte-d3ct2b{flex:1;min-width:0;display:flex;flex-direction:column;overflow:hidden;background:var(--surface)}.health-bar.svelte-d3ct2b{display:flex;align-items:center;gap:8px;padding:6px 24px;border-bottom:1px solid var(--outline-var);background:#fff;flex-shrink:0;flex-wrap:wrap}.health-label.svelte-d3ct2b{font-family:var(--mono);font-size:10px;font-weight:700;color:var(--outline);text-transform:uppercase;letter-spacing:.06em;margin-right:4px}.health-badge.svelte-d3ct2b{display:flex;align-items:center;gap:4px;padding:2px 8px;border-radius:4px;font-family:var(--mono);font-size:10px;font-weight:700}.health-green.svelte-d3ct2b{background:var(--green-bg);color:var(--green);border:1px solid var(--green-border)}.health-blue.svelte-d3ct2b{background:#0040e014;color:var(--primary);border:1px solid rgba(0,64,224,.2)}.health-warn.svelte-d3ct2b{background:#ba1a1a14;color:var(--error);border:1px solid rgba(186,26,26,.25)}.health-error.svelte-d3ct2b{font-family:var(--mono);font-size:10px;color:var(--error);font-weight:700}.dot.svelte-d3ct2b{width:6px;height:6px;border-radius:50%;flex-shrink:0}.dot-green.svelte-d3ct2b{background:var(--green)}.dot-blue.svelte-d3ct2b{background:var(--primary)}.dot-warn.svelte-d3ct2b{background:var(--error)}.dot-pulse.svelte-d3ct2b{animation:svelte-d3ct2b-pulse 1.4s ease-in-out infinite}@keyframes svelte-d3ct2b-pulse{0%,to{opacity:1}50%{opacity:.35}}.filter-bar.svelte-d3ct2b{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 24px;background:var(--surface-low);border-bottom:1px solid var(--outline-var);flex-shrink:0}.filter-left.svelte-d3ct2b,.filter-right.svelte-d3ct2b{display:flex;align-items:center;gap:8px}.chip.svelte-d3ct2b{display:flex;align-items:center;gap:4px;padding:4px 10px;border-radius:8px;font-family:var(--mono);font-size:11px;font-weight:600;cursor:pointer;white-space:nowrap;border:none}.chip-primary.svelte-d3ct2b{background:var(--primary-dim);color:#fff}.chip-close.svelte-d3ct2b{background:transparent;border:none;color:#fffc;cursor:pointer;padding:0;font-size:10px;line-height:1}.chip-outline.svelte-d3ct2b{background:var(--surface);color:var(--on-surface-var);border:1px solid var(--outline-var);transition:border-color .15s}.chip-outline.svelte-d3ct2b:hover{border-color:var(--primary-dim)}.chevron.svelte-d3ct2b{transition:transform .2s}.chevron-open.svelte-d3ct2b{transform:rotate(180deg)}.service-dropdown-wrap.svelte-d3ct2b{position:relative}.dropdown.svelte-d3ct2b{position:absolute;top:calc(100% + 4px);left:0;min-width:180px;background:#fff;border:1px solid var(--outline-var);border-radius:8px;box-shadow:0 8px 24px #0000001f;z-index:100;overflow:hidden;animation:svelte-d3ct2b-dropIn .12s ease}@keyframes svelte-d3ct2b-dropIn{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}.dropdown-item.svelte-d3ct2b{display:flex;align-items:center;gap:8px;width:100%;padding:10px 14px;background:transparent;border:none;color:var(--on-surface-var);font-family:var(--sans);font-size:13px;font-weight:500;cursor:pointer;transition:background .12s;text-align:left}.dropdown-item.svelte-d3ct2b:hover{background:var(--surface-low)}.dropdown-item-active.svelte-d3ct2b{color:var(--primary);background:var(--primary-container)}.dropdown-item-active.svelte-d3ct2b:hover{background:var(--primary-container)}.dropdown-badge.svelte-d3ct2b{margin-left:auto;background:var(--error);color:#fff;border-radius:999px;padding:1px 6px;font-size:10px;font-weight:700}.divider-v.svelte-d3ct2b{width:1px;height:28px;background:var(--outline-var);margin:0 4px}.metrics-strip.svelte-d3ct2b{display:flex;align-items:center;gap:24px}.metric-item.svelte-d3ct2b{display:flex;flex-direction:column;align-items:center}.metric-label.svelte-d3ct2b{font-family:var(--mono);font-size:9px;font-weight:700;color:var(--outline);text-transform:uppercase;letter-spacing:.05em;line-height:1}.metric-value.svelte-d3ct2b{font-family:var(--mono);font-size:14px;font-weight:700;color:var(--on-surface);line-height:1.4}.metric-value-warn.svelte-d3ct2b{color:var(--error)}.live-badge.svelte-d3ct2b{display:flex;align-items:center;gap:6px;padding:4px 10px;border:1px solid var(--outline-var);border-radius:8px;background:#fff;font-family:var(--mono);font-size:11px;font-weight:600;color:var(--on-surface);white-space:nowrap}.feed-area.svelte-d3ct2b{flex:1;min-height:0;overflow-y:auto;padding:12px 24px;background:#fff;font-family:var(--mono);font-size:12px}.log-row.svelte-d3ct2b{display:flex;align-items:baseline;gap:12px;padding:3px 8px;border-radius:4px;transition:background .1s;min-height:22px}.log-row.svelte-d3ct2b:hover{background:var(--surface-low)}.log-row-warn.svelte-d3ct2b{background:#ba1a1a0a}.log-row-fail.svelte-d3ct2b{background:#9931000a}.log-time.svelte-d3ct2b{width:80px;flex-shrink:0;color:var(--outline)}.log-label.svelte-d3ct2b{width:56px;flex-shrink:0;font-weight:700}.label-sys.svelte-d3ct2b{color:var(--primary)}.label-ok.svelte-d3ct2b{color:var(--green)}.label-warn.svelte-d3ct2b{color:var(--tertiary)}.label-info.svelte-d3ct2b{color:var(--on-surface-var)}.label-hook.svelte-d3ct2b{color:var(--error)}.label-chck.svelte-d3ct2b{color:var(--outline)}.log-msg.svelte-d3ct2b{flex:1;min-width:0;color:var(--on-surface-var);word-break:break-all;line-height:1.5}.log-msg.svelte-d3ct2b strong:where(.svelte-d3ct2b){color:var(--on-surface);font-weight:600}.copy-btn.svelte-d3ct2b{opacity:0;background:transparent;border:none;color:var(--outline);cursor:pointer;font-size:14px;padding:0 4px;transition:opacity .15s,color .15s;flex-shrink:0}.log-row.svelte-d3ct2b:hover .copy-btn:where(.svelte-d3ct2b){opacity:1}.copy-btn.svelte-d3ct2b:hover{color:var(--primary)}.log-detail.svelte-d3ct2b{display:flex;gap:8px;padding:3px 8px 3px 148px;font-size:11px;border-left:2px solid rgba(153,49,0,.3);margin-left:8px;margin-bottom:2px}.detail-index.svelte-d3ct2b{color:var(--outline);flex-shrink:0;width:24px}.detail-body.svelte-d3ct2b{color:var(--on-surface-var);flex:1;min-width:0;line-height:1.5}.detail-fix.svelte-d3ct2b{color:var(--primary)}.cursor-blink.svelte-d3ct2b{animation:svelte-d3ct2b-blink 1s step-start infinite}@keyframes svelte-d3ct2b-blink{0%,to{opacity:1}50%{opacity:0}}.section-header.svelte-d3ct2b{display:flex;align-items:baseline;gap:12px;padding:8px 8px 10px;border-bottom:1px solid var(--outline-var);margin-bottom:8px}.section-title.svelte-d3ct2b{font-family:var(--sans);font-size:14px;font-weight:700;color:var(--on-surface)}.section-meta.svelte-d3ct2b{font-size:11px;color:var(--outline);font-family:var(--mono)}.rules-toolbar.svelte-d3ct2b{display:flex;gap:8px;padding:8px;margin-bottom:4px}.rules-select.svelte-d3ct2b,.rules-input.svelte-d3ct2b,.rules-textarea.svelte-d3ct2b{padding:6px 10px;background:var(--surface-low);border:1px solid var(--outline-var);border-radius:6px;color:var(--on-surface);font-family:var(--sans);font-size:13px;outline:none;transition:border-color .15s}.rules-select.svelte-d3ct2b:focus,.rules-input.svelte-d3ct2b:focus,.rules-textarea.svelte-d3ct2b:focus{border-color:var(--primary-dim)}.rules-textarea.svelte-d3ct2b{resize:vertical;flex:1;min-width:0}.rule-form-wrap.svelte-d3ct2b{padding:0 8px 8px;border-bottom:1px solid var(--outline-var);margin-bottom:8px}.rule-form.svelte-d3ct2b{display:flex;flex-direction:column;gap:8px}.rule-form-row.svelte-d3ct2b{display:flex;gap:8px;align-items:flex-start}.add-btn.svelte-d3ct2b{padding:8px 16px;background:var(--primary);color:var(--on-primary);border:none;border-radius:6px;font-family:var(--mono);font-size:12px;font-weight:700;cursor:pointer;white-space:nowrap;transition:background .15s;align-self:flex-end}.add-btn.svelte-d3ct2b:hover:not(:disabled){background:var(--primary-dim)}.add-btn.svelte-d3ct2b:disabled{opacity:.5;cursor:not-allowed}.rule-list.svelte-d3ct2b{display:flex;flex-direction:column;gap:4px;overflow-y:auto;max-height:400px;padding:0 8px}.rule-row.svelte-d3ct2b{display:flex;align-items:center;gap:10px;padding:8px 10px;border:1px solid var(--outline-var);border-radius:6px;background:var(--surface-low);font-size:12px;min-width:0;transition:background .1s}.rule-row.svelte-d3ct2b:hover{background:var(--surface-mid)}.rule-badge.svelte-d3ct2b{padding:2px 7px;background:var(--primary-container);color:var(--primary);border-radius:4px;font-family:var(--mono);font-size:10px;font-weight:700;text-transform:uppercase;flex-shrink:0}.rule-scope.svelte-d3ct2b{color:var(--outline);font-family:var(--mono);font-size:10px;font-weight:600;flex-shrink:0}.rule-content.svelte-d3ct2b{flex:1;min-width:0;color:var(--on-surface);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rule-reason.svelte-d3ct2b{color:var(--on-surface-var);font-size:11px;flex-shrink:0;max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.del-btn.svelte-d3ct2b{background:transparent;border:none;color:var(--outline);cursor:pointer;font-size:12px;padding:2px 6px;border-radius:4px;flex-shrink:0;transition:background .1s,color .1s}.del-btn.svelte-d3ct2b:hover{background:var(--error-bg);color:var(--error)}.metrics-footer.svelte-d3ct2b{display:flex;align-items:center;justify-content:space-between;height:48px;padding:0 24px;border-top:1px solid var(--outline-var);background:var(--surface);flex-shrink:0}.footer-left.svelte-d3ct2b,.footer-right.svelte-d3ct2b{display:flex;align-items:center;gap:24px}.footer-metric.svelte-d3ct2b{display:flex;align-items:center;gap:6px}.footer-label.svelte-d3ct2b{font-family:var(--mono);font-size:10px;font-weight:700;color:var(--outline);text-transform:uppercase;letter-spacing:.04em}.footer-val.svelte-d3ct2b{font-family:var(--mono);font-size:14px;font-weight:700;color:var(--on-surface)}.footer-val-error.svelte-d3ct2b{color:var(--error)}.footer-unit.svelte-d3ct2b{font-family:var(--mono);font-size:9px;color:var(--outline);text-transform:uppercase}.storage-bar-wrap.svelte-d3ct2b{display:flex;align-items:center;gap:8px}.storage-bar.svelte-d3ct2b{width:96px;height:6px;background:var(--surface-mid);border-radius:999px;overflow:hidden}.storage-fill.svelte-d3ct2b{height:100%;background:var(--primary-dim);border-radius:999px;transition:width .6s ease}.cli-btn.svelte-d3ct2b{display:flex;align-items:center;gap:6px;padding:5px 12px;background:var(--surface-high);border:none;border-radius:4px;color:var(--on-surface);font-family:var(--mono);font-size:11px;font-weight:700;cursor:pointer;transition:background .15s}.cli-btn.svelte-d3ct2b:hover{background:var(--outline-var)}:root[data-theme=dark]{--primary: #b8c3ff;--primary-dim: #4d6dff;--primary-container: #1a2340;--on-primary: #001b3e;--surface: #111318;--surface-low: #0c0e12;--surface-mid: #1e2024;--surface-high: #282a2e;--surface-highest: #37393e;--on-surface: #e2e2e8;--on-surface-var: #c4c5d9;--outline: #747688;--outline-var: #3a3c4a;--error: #ffb4ab;--error-bg: rgba(147,0,10,.22);--tertiary: #ffb59b;--green: #03f59b;--green-bg: rgba(3,245,155,.1);--green-border: rgba(3,245,155,.28)}html[data-theme=dark] .topbar.svelte-d3ct2b{background:#1a1c20;border-bottom-color:var(--outline-var)}html[data-theme=dark] .sidebar.svelte-d3ct2b{background:#0c0e12;border-right-color:var(--outline-var)}html[data-theme=dark] .health-bar.svelte-d3ct2b{background:#1a1c20;border-bottom-color:var(--outline-var)}html[data-theme=dark] .filter-bar.svelte-d3ct2b{background:#111318;border-bottom-color:var(--outline-var)}html[data-theme=dark] .feed-area.svelte-d3ct2b{background:#0c0e12}html[data-theme=dark] .metrics-footer.svelte-d3ct2b{background:#111318;border-top-color:var(--outline-var)}html[data-theme=dark] .search-input.svelte-d3ct2b{background:#1e2024;border-color:var(--outline-var);color:var(--on-surface)}html[data-theme=dark] .dropdown.svelte-d3ct2b{background:#1e2024;border-color:var(--outline-var);box-shadow:0 8px 24px #00000073}html[data-theme=dark] .dropdown-item.svelte-d3ct2b:hover{background:#282a2e}html[data-theme=dark] .dropdown-item-active.svelte-d3ct2b{background:var(--primary-container);color:var(--primary)}html[data-theme=dark] .chip-outline.svelte-d3ct2b,html[data-theme=dark] .live-badge.svelte-d3ct2b{background:#1e2024}html[data-theme=dark] .rule-row.svelte-d3ct2b{background:#1e2024;border-color:var(--outline-var)}html[data-theme=dark] .rule-row.svelte-d3ct2b:hover{background:#282a2e}html[data-theme=dark] .rules-select.svelte-d3ct2b,html[data-theme=dark] .rules-input.svelte-d3ct2b,html[data-theme=dark] .rules-textarea.svelte-d3ct2b{background:#1e2024;border-color:var(--outline-var);color:var(--on-surface)}html[data-theme=dark] .log-row.svelte-d3ct2b:hover{background:#1e2024}html[data-theme=dark] .log-row-warn.svelte-d3ct2b{background:#ffb4ab0d}html[data-theme=dark] .log-row-fail.svelte-d3ct2b{background:#ffba200a}html[data-theme=dark] .section-header.svelte-d3ct2b{border-bottom-color:var(--outline-var)}html[data-theme=dark] .storage-bar.svelte-d3ct2b{background:#282a2e}html[data-theme=dark] .badge-warn.svelte-d3ct2b{background:#422006;color:#fbbf24}html[data-theme=dark] .log-detail.svelte-d3ct2b{border-left-color:#ffba204d}html[data-theme=dark] .history-entry.svelte-d3ct2b{border-color:var(--outline-var);background:#1a1c20}html[data-theme=dark] .history-header.svelte-d3ct2b{background:#1e2024;border-bottom-color:var(--outline-var)}html[data-theme=dark] .history-violation.svelte-d3ct2b{border-bottom-color:var(--outline-var)}html[data-theme=dark] .arch-node-panel.svelte-d3ct2b{background:#1a1c20;border-color:var(--outline-var)}html[data-theme=dark] .arch-node-panel-path.svelte-d3ct2b{background:#1e2024}html[data-theme=dark] .arch-rule-row.svelte-d3ct2b{background:#1a1c20;border-color:var(--outline-var)}html[data-theme=dark] .arch-svg.svelte-d3ct2b{background:#0c0e12;border-color:var(--outline-var)}html[data-theme=dark] .footer-actions.svelte-d3ct2b .action-btn:where(.svelte-d3ct2b){background:#1e2024}html[data-theme=dark] .cli-btn.svelte-d3ct2b{background:#1e2024}html[data-theme=dark] .modal-status-row.svelte-d3ct2b{border-bottom-color:var(--outline-var)}html[data-theme=dark] .modal-input.svelte-d3ct2b{background:#1e2024;border-color:var(--outline-var);color:var(--on-surface)}html[data-theme=dark] .modal-btn.svelte-d3ct2b{background:#1e2024;border-color:var(--outline-var);color:var(--on-surface-var)}html[data-theme=dark] .modal-btn.svelte-d3ct2b:hover:not(:disabled){background:#282a2e}html[data-theme=dark] .rule-form-wrap.svelte-d3ct2b{border-bottom-color:var(--outline-var)}@media (max-width: 768px){.sidebar.svelte-d3ct2b,.topbar-nav.svelte-d3ct2b,.metrics-strip.svelte-d3ct2b{display:none}.filter-bar.svelte-d3ct2b,.feed-area.svelte-d3ct2b{padding:8px 12px}.metrics-footer.svelte-d3ct2b{padding:0 12px;gap:12px}.footer-metric.svelte-d3ct2b:nth-child(n+2){display:none}}.footer-actions.svelte-d3ct2b{display:flex;gap:6px;align-items:center;margin-right:12px}.action-btn.svelte-d3ct2b{font-size:11px;font-family:var(--mono);padding:4px 10px;border-radius:6px;border:1px solid var(--outline-var);background:var(--surface-low);color:var(--on-surface-var);cursor:pointer;transition:background .15s,border-color .15s}.action-btn.svelte-d3ct2b:hover:not(:disabled){background:var(--primary-container);border-color:var(--primary);color:var(--primary)}.action-btn.svelte-d3ct2b:disabled{opacity:.5;cursor:not-allowed}.action-btn-warn.svelte-d3ct2b:hover:not(:disabled){background:#fff3e0;border-color:#f59e0b;color:#b45309}.modal-backdrop.svelte-d3ct2b{position:fixed;top:0;right:0;bottom:0;left:0;background:#00000073;display:flex;align-items:center;justify-content:center;z-index:200}.modal.svelte-d3ct2b{background:var(--surface);border:1px solid var(--outline-var);border-radius:12px;width:480px;max-width:calc(100vw - 32px);box-shadow:0 8px 32px #0000002e;overflow:hidden}.modal-header.svelte-d3ct2b{display:flex;align-items:center;justify-content:space-between;padding:16px 20px 12px;border-bottom:1px solid var(--outline-var)}.modal-title.svelte-d3ct2b{font-size:14px;font-weight:600;color:var(--on-surface)}.modal-close.svelte-d3ct2b{background:none;border:none;cursor:pointer;color:var(--outline);font-size:16px;line-height:1}.modal-section.svelte-d3ct2b{padding:16px 20px;border-bottom:1px solid var(--outline-var)}.modal-section.svelte-d3ct2b:last-child{border-bottom:none}.modal-section-title.svelte-d3ct2b{font-size:11px;font-weight:600;letter-spacing:.06em;color:var(--outline);text-transform:uppercase;margin-bottom:12px}.modal-row.svelte-d3ct2b{display:grid;grid-template-columns:100px 1fr;gap:8px;align-items:center;margin-bottom:10px}.modal-label.svelte-d3ct2b{font-size:12px;color:var(--on-surface-var)}.modal-input.svelte-d3ct2b{font-size:12px;font-family:var(--mono);padding:6px 10px;border:1px solid var(--outline-var);border-radius:6px;background:var(--surface-low);color:var(--on-surface);outline:none;width:100%}.modal-input.svelte-d3ct2b:focus{border-color:var(--primary)}.modal-row-actions.svelte-d3ct2b{display:flex;gap:8px}.modal-btn.svelte-d3ct2b{font-size:12px;padding:6px 14px;border:1px solid var(--outline-var);border-radius:6px;background:var(--surface-low);color:var(--on-surface-var);cursor:pointer}.modal-btn.svelte-d3ct2b:hover:not(:disabled){background:var(--surface-mid)}.modal-btn.svelte-d3ct2b:disabled{opacity:.5;cursor:not-allowed}.modal-btn-primary.svelte-d3ct2b{background:var(--primary);color:var(--on-primary);border-color:var(--primary)}.modal-btn-primary.svelte-d3ct2b:hover:not(:disabled){background:var(--primary-dim)}.modal-msg.svelte-d3ct2b{font-size:12px;margin-top:8px;padding:6px 10px;border-radius:6px}.modal-msg-ok.svelte-d3ct2b{background:var(--green-bg);color:var(--green);border:1px solid var(--green-border)}.modal-msg-err.svelte-d3ct2b{background:var(--error-bg);color:var(--error);border:1px solid var(--error)}.modal-status-row.svelte-d3ct2b{display:flex;justify-content:space-between;padding:4px 0;border-bottom:1px solid var(--surface-mid)}.modal-status-row.svelte-d3ct2b:last-child{border-bottom:none}.modal-status-label.svelte-d3ct2b{font-size:11px;color:var(--outline)}.modal-status-val.svelte-d3ct2b{font-size:11px;font-family:var(--mono);color:var(--on-surface)}html[data-theme=dark] .modal.svelte-d3ct2b{background:var(--surface);border-color:var(--outline-var)}.arch-graph-wrap.svelte-d3ct2b{display:flex;flex-direction:column;gap:16px;padding:16px}.arch-svg.svelte-d3ct2b{display:block;border:1px solid var(--outline-var);border-radius:8px;background:var(--surface-low);width:100%;max-width:640px}.arch-node-rect.svelte-d3ct2b{fill:var(--surface-mid);stroke:var(--outline-var);stroke-width:1.5}.arch-node-domain.arch-node-rect.svelte-d3ct2b{fill:#eff6ff;stroke:#3b82f6}.arch-node-application.arch-node-rect.svelte-d3ct2b{fill:#f0fdf4;stroke:#22c55e}.arch-node-infrastructure.arch-node-rect.svelte-d3ct2b{fill:#fff7ed;stroke:#f97316}.arch-node-api.arch-node-rect.svelte-d3ct2b{fill:#faf5ff;stroke:#a855f7}.arch-node-shared.arch-node-rect.svelte-d3ct2b{fill:#f8fafc;stroke:#94a3b8}html[data-theme=dark] .arch-node-domain.arch-node-rect.svelte-d3ct2b{fill:#1e3a5f;stroke:#3b82f6}html[data-theme=dark] .arch-node-application.arch-node-rect.svelte-d3ct2b{fill:#14352a;stroke:#22c55e}html[data-theme=dark] .arch-node-infrastructure.arch-node-rect.svelte-d3ct2b{fill:#3d2006;stroke:#f97316}html[data-theme=dark] .arch-node-api.arch-node-rect.svelte-d3ct2b{fill:#2e1a47;stroke:#a855f7}html[data-theme=dark] .arch-node-shared.arch-node-rect.svelte-d3ct2b{fill:#1e2535;stroke:#94a3b8}.arch-node-label.svelte-d3ct2b{font-family:var(--mono);font-size:11px;font-weight:600;fill:var(--on-surface)}.arch-node-desc.svelte-d3ct2b{font-family:var(--sans);font-size:9px;fill:var(--outline)}.arch-node-clickable.svelte-d3ct2b{cursor:pointer}.arch-node-clickable.svelte-d3ct2b:hover .arch-node-rect:where(.svelte-d3ct2b){filter:brightness(.95)}html[data-theme=dark] .arch-node-clickable.svelte-d3ct2b:hover .arch-node-rect:where(.svelte-d3ct2b){filter:brightness(1.15)}.arch-node-panel.svelte-d3ct2b{border:1px solid var(--outline-var);border-radius:8px;background:var(--surface-low);padding:12px 16px;max-width:640px;display:flex;flex-direction:column;gap:10px}.arch-node-panel-header.svelte-d3ct2b{display:flex;align-items:center;gap:10px}.arch-node-panel-name.svelte-d3ct2b{font-family:var(--mono);font-weight:700;font-size:13px;color:var(--on-surface)}.arch-node-panel-meta.svelte-d3ct2b{font-size:12px;color:var(--outline);flex:1}.arch-node-panel-close.svelte-d3ct2b{background:none;border:none;cursor:pointer;color:var(--outline);font-size:14px;padding:0;line-height:1}.arch-node-panel-close.svelte-d3ct2b:hover{color:var(--on-surface)}.arch-node-panel-paths.svelte-d3ct2b{display:flex;flex-direction:column;gap:4px}.arch-node-panel-section.svelte-d3ct2b{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.08em;color:var(--outline);margin-bottom:2px}.arch-node-panel-path.svelte-d3ct2b{font-family:var(--mono);font-size:11px;color:var(--cyan, #22d3ee);background:var(--surface-mid);padding:3px 8px;border-radius:4px}.arch-node-panel-rule.svelte-d3ct2b{display:flex;align-items:center;gap:8px;font-size:12px}.arch-legend.svelte-d3ct2b{display:flex;gap:16px;align-items:center;font-size:11px;color:var(--outline)}.legend-item.svelte-d3ct2b{display:flex;align-items:center;gap:6px}.arch-rule-list.svelte-d3ct2b{display:flex;flex-direction:column;gap:4px;max-width:640px}.arch-rule-row.svelte-d3ct2b{display:flex;align-items:center;gap:8px;padding:6px 10px;background:var(--surface-low);border-radius:4px;border:1px solid var(--outline-var)}.tab-badge.svelte-d3ct2b{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:16px;padding:0 5px;border-radius:8px;background:var(--error);color:#fff;font-size:10px;font-weight:700;margin-left:4px;vertical-align:middle}.history-list.svelte-d3ct2b{display:flex;flex-direction:column;gap:8px;max-width:760px}.history-entry.svelte-d3ct2b{border:1px solid var(--outline-var);border-radius:6px;background:var(--surface-low);overflow:hidden}.history-header.svelte-d3ct2b{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;border-bottom:1px solid var(--outline-var);background:var(--surface-mid)}.history-file.svelte-d3ct2b{font-family:var(--mono);font-size:12px;font-weight:600;color:var(--cyan, #22d3ee)}.history-time.svelte-d3ct2b{font-size:11px;color:var(--outline)}.history-violation.svelte-d3ct2b{display:flex;align-items:center;gap:8px;padding:6px 12px;border-bottom:1px solid var(--outline-var)}.history-violation.svelte-d3ct2b:last-child{border-bottom:none}.history-rule.svelte-d3ct2b{font-size:12px;font-weight:600;color:var(--on-surface)}.history-issue.svelte-d3ct2b{font-size:12px;color:var(--outline)}.arch-rule-badge.svelte-d3ct2b{font-size:10px;font-family:var(--mono);font-weight:700;padding:2px 6px;border-radius:3px}.badge-block.svelte-d3ct2b{background:var(--error-bg);color:var(--error)}.badge-warn.svelte-d3ct2b{background:#fef3c7;color:#92400e}.badge-allow.svelte-d3ct2b{background:var(--green-bg);color:var(--green)}.arch-rule-layers.svelte-d3ct2b{font-family:var(--mono);font-size:11px;color:var(--on-surface);white-space:nowrap}.arch-rule-name.svelte-d3ct2b{font-size:11px;color:var(--outline);flex:1}
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
8
8
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
9
9
|
<link href="https://fonts.googleapis.com/css2?family=Hanken+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap" rel="stylesheet">
|
|
10
|
-
<script type="module" crossorigin src="/assets/index-
|
|
11
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
10
|
+
<script type="module" crossorigin src="/assets/index-Cd_SCzKw.js"></script>
|
|
11
|
+
<link rel="stylesheet" crossorigin href="/assets/index-DAEzcad9.css">
|
|
12
12
|
</head>
|
|
13
13
|
<body>
|
|
14
14
|
<div id="app"></div>
|
|
@@ -409,7 +409,11 @@ async function getRuntimeStatus(config) {
|
|
|
409
409
|
detected
|
|
410
410
|
},
|
|
411
411
|
postgres,
|
|
412
|
-
model
|
|
412
|
+
model,
|
|
413
|
+
timeouts: {
|
|
414
|
+
chatTimeoutMs: process.env.CHAT_TIMEOUT_MS ?? "60000",
|
|
415
|
+
checkTimeoutMs: process.env.MEMORY_CORE_CHECK_TIMEOUT_MS ?? "20000"
|
|
416
|
+
}
|
|
413
417
|
};
|
|
414
418
|
}
|
|
415
419
|
function isRelevantMemory(memory, config, activeArchitectures) {
|
|
@@ -607,10 +611,9 @@ async function handleApi(req, res, url) {
|
|
|
607
611
|
const body = await readBody(req);
|
|
608
612
|
const provider = typeof body.provider === "string" && body.provider.trim() ? body.provider.trim() : null;
|
|
609
613
|
const model = typeof body.model === "string" && body.model.trim() ? body.model.trim() : null;
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
}
|
|
614
|
+
const apiKey = typeof body.apiKey === "string" && body.apiKey.trim() ? body.apiKey.trim() : null;
|
|
615
|
+
const chatTimeoutMs = typeof body.chatTimeoutMs === "string" && body.chatTimeoutMs.trim() ? body.chatTimeoutMs.trim() : null;
|
|
616
|
+
const checkTimeoutMs = typeof body.checkTimeoutMs === "string" && body.checkTimeoutMs.trim() ? body.checkTimeoutMs.trim() : null;
|
|
614
617
|
const envPath = join(projectRoot, ".memory-core.env");
|
|
615
618
|
const existing = existsSync(envPath) ? readFileSync(envPath, "utf-8") : "";
|
|
616
619
|
let lines = existing.split("\n").filter((l) => l.trim());
|
|
@@ -622,11 +625,36 @@ async function handleApi(req, res, url) {
|
|
|
622
625
|
lines = lines.filter((l) => !l.startsWith("CHAT_MODEL=") && !l.startsWith("OLLAMA_CHAT_MODEL="));
|
|
623
626
|
lines.push(`CHAT_MODEL=${model}`);
|
|
624
627
|
}
|
|
628
|
+
if (apiKey) {
|
|
629
|
+
lines = lines.filter((l) => !l.startsWith("CHAT_API_KEY="));
|
|
630
|
+
lines.push(`CHAT_API_KEY=${apiKey}`);
|
|
631
|
+
}
|
|
632
|
+
if (chatTimeoutMs !== null) {
|
|
633
|
+
lines = lines.filter((l) => !l.startsWith("CHAT_TIMEOUT_MS="));
|
|
634
|
+
lines.push(`CHAT_TIMEOUT_MS=${chatTimeoutMs}`);
|
|
635
|
+
}
|
|
636
|
+
if (checkTimeoutMs !== null) {
|
|
637
|
+
lines = lines.filter((l) => !l.startsWith("MEMORY_CORE_CHECK_TIMEOUT_MS="));
|
|
638
|
+
lines.push(`MEMORY_CORE_CHECK_TIMEOUT_MS=${checkTimeoutMs}`);
|
|
639
|
+
}
|
|
625
640
|
writeFileSync(envPath, lines.join("\n") + "\n", "utf-8");
|
|
626
641
|
reloadRuntimeEnv();
|
|
642
|
+
const effectiveProvider = provider ?? Config.chatProvider;
|
|
643
|
+
const warnings = [];
|
|
644
|
+
if (effectiveProvider === "ollama") {
|
|
645
|
+
try {
|
|
646
|
+
const ollamaUrl = process.env.OLLAMA_URL ?? "http://localhost:11434";
|
|
647
|
+
const r = await fetch(`${ollamaUrl}/api/tags`, { signal: AbortSignal.timeout(5e3) });
|
|
648
|
+
if (!r.ok) warnings.push(`Ollama returned HTTP ${r.status}`);
|
|
649
|
+
} catch (err) {
|
|
650
|
+
warnings.push(`Ollama unreachable: ${err.message}`);
|
|
651
|
+
}
|
|
652
|
+
} else if (apiKey || Config.chatApiKey) {
|
|
653
|
+
warnings.push("API key saved \u2014 verify by running a check manually");
|
|
654
|
+
}
|
|
627
655
|
invalidateSnapshotBase();
|
|
628
656
|
scheduleSnapshotBroadcast({ delayMs: 0, forceBaseRefresh: true });
|
|
629
|
-
sendJson(res, 200, { ok: true });
|
|
657
|
+
sendJson(res, 200, { ok: true, message: "Settings updated", warnings: warnings.length > 0 ? warnings : void 0 });
|
|
630
658
|
return;
|
|
631
659
|
}
|
|
632
660
|
if (req.method === "POST" && url.pathname === "/api/actions/sync") {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shahmilsaari/memory-core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.27",
|
|
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 _o=Object.defineProperty;var jn=e=>{throw TypeError(e)};var bo=(e,t,r)=>t in e?_o(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var kt=(e,t,r)=>bo(e,typeof t!="symbol"?t+"":t,r),ta=(e,t,r)=>t.has(e)||jn("Cannot "+r);var o=(e,t,r)=>(ta(e,t,"read from private field"),r?r.call(e):t.get(e)),B=(e,t,r)=>t.has(e)?jn("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),z=(e,t,r,a)=>(ta(e,t,"write to private field"),a?a.call(e,r):t.set(e,r),r),de=(e,t,r)=>(ta(e,t,"access private method"),r);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))a(n);new MutationObserver(n=>{for(const i of n)if(i.type==="childList")for(const v of i.addedNodes)v.tagName==="LINK"&&v.rel==="modulepreload"&&a(v)}).observe(document,{childList:!0,subtree:!0});function r(n){const i={};return n.integrity&&(i.integrity=n.integrity),n.referrerPolicy&&(i.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?i.credentials="include":n.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function a(n){if(n.ep)return;n.ep=!0;const i=r(n);fetch(n.href,i)}})();const mo=!1;var wa=Array.isArray,go=Array.prototype.indexOf,Ps=Array.prototype.includes,Fr=Array.from,wo=Object.defineProperty,Qs=Object.getOwnPropertyDescriptor,al=Object.getOwnPropertyDescriptors,yo=Object.prototype,ko=Array.prototype,ya=Object.getPrototypeOf,Hn=Object.isExtensible;const xo=()=>{};function Eo(e){return e()}function la(e){for(var t=0;t<e.length;t++)e[t]()}function nl(){var e,t,r=new Promise((a,n)=>{e=a,t=n});return{promise:r,resolve:e,reject:t}}const Ue=2,$s=4,dr=8,ll=1<<24,Pt=16,Mt=32,ls=64,ia=128,_t=512,Ae=1024,je=2048,At=4096,Ye=8192,bt=16384,Ss=32768,Bn=1<<25,js=65536,oa=1<<17,So=1<<18,Vs=1<<19,il=1<<20,Ft=1<<25,ys=65536,Or=1<<21,sr=1<<22,as=1<<23,bs=Symbol("$state"),Mo=Symbol(""),Wt=new class extends Error{constructor(){super(...arguments);kt(this,"name","StaleReactionError");kt(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};function Ao(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Co(e,t,r){throw new Error("https://svelte.dev/e/each_key_duplicate")}function To(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Lo(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Oo(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Ro(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function No(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Do(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Io(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Fo(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const Po=1,$o=2,ol=4,jo=8,Ho=16,Bo=1,Wo=2,Ne=Symbol(),cl="http://www.w3.org/1999/xhtml";function Vo(){console.warn("https://svelte.dev/e/derived_inert")}function Uo(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function qo(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function vl(e){return e===this.v}function zo(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function dl(e){return!zo(e,this.v)}let Pr=!1,Yo=!1;function Go(){Pr=!0}let Ce=null;function Hs(e){Ce=e}function fl(e,t=!1,r){Ce={p:Ce,i:!1,c:null,e:null,s:e,x:null,r:Y,l:Pr&&!t?{s:null,u:null,$:[]}:null}}function ul(e){var t=Ce,r=t.e;if(r!==null){t.e=null;for(var a of r)Nl(a)}return t.i=!0,Ce=t.p,{}}function fr(){return!Pr||Ce!==null&&Ce.l===null}let vs=[];function pl(){var e=vs;vs=[],la(e)}function ns(e){if(vs.length===0&&!Zs){var t=vs;queueMicrotask(()=>{t===vs&&pl()})}vs.push(e)}function Ko(){for(;vs.length>0;)pl()}function hl(e){var t=Y;if(t===null)return K.f|=as,e;if(!(t.f&Ss)&&!(t.f&$s))throw e;rs(e,t)}function rs(e,t){for(;t!==null;){if(t.f&ia){if(!(t.f&Ss))throw e;try{t.b.error(e);return}catch(r){e=r}}t=t.parent}throw e}const Xo=-7169;function we(e,t){e.f=e.f&Xo|t}function ka(e){e.f&_t||e.deps===null?we(e,Ae):we(e,At)}function _l(e){if(e!==null)for(const t of e)!(t.f&Ue)||!(t.f&ys)||(t.f^=ys,_l(t.deps))}function bl(e,t,r){e.f&je?t.add(e):e.f&At&&r.add(e),_l(e.deps),we(e,Ae)}const os=new Set;let R=null,$e=null,ca=null,Zs=!1,sa=!1,Ls=null,xr=null;var Wn=0;let Jo=1;var Rs,Ns,fs,Vt,Nt,nr,rt,lr,ts,Ut,Dt,Ds,Is,us,Te,Er,ml,Sr,va,Mr,Qo;const Nr=class Nr{constructor(){B(this,Te);kt(this,"id",Jo++);kt(this,"current",new Map);kt(this,"previous",new Map);B(this,Rs,new Set);B(this,Ns,new Set);B(this,fs,new Set);B(this,Vt,new Map);B(this,Nt,new Map);B(this,nr,null);B(this,rt,[]);B(this,lr,[]);B(this,ts,new Set);B(this,Ut,new Set);B(this,Dt,new Map);B(this,Ds,new Set);kt(this,"is_fork",!1);B(this,Is,!1);B(this,us,new Set)}skip_effect(t){o(this,Dt).has(t)||o(this,Dt).set(t,{d:[],m:[]}),o(this,Ds).delete(t)}unskip_effect(t,r=a=>this.schedule(a)){var a=o(this,Dt).get(t);if(a){o(this,Dt).delete(t);for(var n of a.d)we(n,je),r(n);for(n of a.m)we(n,At),r(n)}o(this,Ds).add(t)}capture(t,r,a=!1){t.v!==Ne&&!this.previous.has(t)&&this.previous.set(t,t.v),t.f&as||(this.current.set(t,[r,a]),$e==null||$e.set(t,r)),this.is_fork||(t.v=r)}activate(){R=this}deactivate(){R=null,$e=null}flush(){try{sa=!0,R=this,de(this,Te,Sr).call(this)}finally{Wn=0,ca=null,Ls=null,xr=null,sa=!1,R=null,$e=null,ms.clear()}}discard(){for(const t of o(this,Ns))t(this);o(this,Ns).clear(),o(this,fs).clear(),os.delete(this)}register_created_effect(t){o(this,lr).push(t)}increment(t,r){let a=o(this,Vt).get(r)??0;if(o(this,Vt).set(r,a+1),t){let n=o(this,Nt).get(r)??0;o(this,Nt).set(r,n+1)}}decrement(t,r,a){let n=o(this,Vt).get(r)??0;if(n===1?o(this,Vt).delete(r):o(this,Vt).set(r,n-1),t){let i=o(this,Nt).get(r)??0;i===1?o(this,Nt).delete(r):o(this,Nt).set(r,i-1)}o(this,Is)||a||(z(this,Is,!0),ns(()=>{z(this,Is,!1),this.flush()}))}transfer_effects(t,r){for(const a of t)o(this,ts).add(a);for(const a of r)o(this,Ut).add(a);t.clear(),r.clear()}oncommit(t){o(this,Rs).add(t)}ondiscard(t){o(this,Ns).add(t)}on_fork_commit(t){o(this,fs).add(t)}run_fork_commit_callbacks(){for(const t of o(this,fs))t(this);o(this,fs).clear()}settled(){return(o(this,nr)??z(this,nr,nl())).promise}static ensure(){if(R===null){const t=R=new Nr;sa||(os.add(R),Zs||ns(()=>{R===t&&t.flush()}))}return R}apply(){{$e=null;return}}schedule(t){var n;if(ca=t,(n=t.b)!=null&&n.is_pending&&t.f&($s|dr|ll)&&!(t.f&Ss)){t.b.defer_effect(t);return}for(var r=t;r.parent!==null;){r=r.parent;var a=r.f;if(Ls!==null&&r===Y&&(K===null||!(K.f&Ue)))return;if(a&(ls|Mt)){if(!(a&Ae))return;r.f^=Ae}}o(this,rt).push(r)}};Rs=new WeakMap,Ns=new WeakMap,fs=new WeakMap,Vt=new WeakMap,Nt=new WeakMap,nr=new WeakMap,rt=new WeakMap,lr=new WeakMap,ts=new WeakMap,Ut=new WeakMap,Dt=new WeakMap,Ds=new WeakMap,Is=new WeakMap,us=new WeakMap,Te=new WeakSet,Er=function(){return this.is_fork||o(this,Nt).size>0},ml=function(){for(const a of o(this,us))for(const n of o(a,Nt).keys()){for(var t=!1,r=n;r.parent!==null;){if(o(this,Dt).has(r)){t=!0;break}r=r.parent}if(!t)return!0}return!1},Sr=function(){var u,d;if(Wn++>1e3&&(os.delete(this),ec()),!de(this,Te,Er).call(this)){for(const p of o(this,ts))o(this,Ut).delete(p),we(p,je),this.schedule(p);for(const p of o(this,Ut))we(p,At),this.schedule(p)}const t=o(this,rt);z(this,rt,[]),this.apply();var r=Ls=[],a=[],n=xr=[];for(const p of t)try{de(this,Te,va).call(this,p,r,a)}catch(m){throw yl(p),m}if(R=null,n.length>0){var i=Nr.ensure();for(const p of n)i.schedule(p)}if(Ls=null,xr=null,de(this,Te,Er).call(this)||de(this,Te,ml).call(this)){de(this,Te,Mr).call(this,a),de(this,Te,Mr).call(this,r);for(const[p,m]of o(this,Dt))wl(p,m)}else{o(this,Vt).size===0&&os.delete(this),o(this,ts).clear(),o(this,Ut).clear();for(const p of o(this,Rs))p(this);o(this,Rs).clear(),Vn(a),Vn(r),(u=o(this,nr))==null||u.resolve()}var v=R;if(o(this,rt).length>0){const p=v??(v=this);o(p,rt).push(...o(this,rt).filter(m=>!o(p,rt).includes(m)))}v!==null&&(os.add(v),de(d=v,Te,Sr).call(d))},va=function(t,r,a){t.f^=Ae;for(var n=t.first;n!==null;){var i=n.f,v=(i&(Mt|ls))!==0,u=v&&(i&Ae)!==0,d=u||(i&Ye)!==0||o(this,Dt).has(n);if(!d&&n.fn!==null){v?n.f^=Ae:i&$s?r.push(n):Us(n)&&(i&Pt&&o(this,Ut).add(n),Es(n));var p=n.first;if(p!==null){n=p;continue}}for(;n!==null;){var m=n.next;if(m!==null){n=m;break}n=n.parent}}},Mr=function(t){for(var r=0;r<t.length;r+=1)bl(t[r],o(this,ts),o(this,Ut))},Qo=function(){var m,A,x;for(const E of os){var t=E.id<this.id,r=[];for(const[w,[I,S]]of this.current){if(E.current.has(w)){var a=E.current.get(w)[0];if(t&&I!==a)E.current.set(w,[I,S]);else continue}r.push(w)}var n=[...E.current.keys()].filter(w=>!this.current.has(w));if(n.length===0)t&&E.discard();else if(r.length>0){if(t)for(const w of o(this,Ds))E.unskip_effect(w,I=>{var S;I.f&(Pt|sr)?E.schedule(I):de(S=E,Te,Mr).call(S,[I])});E.activate();var i=new Set,v=new Map;for(var u of r)gl(u,n,i,v);v=new Map;var d=[...E.current.keys()].filter(w=>this.current.has(w)?this.current.get(w)[0]!==w:!0);for(const w of o(this,lr))!(w.f&(bt|Ye|oa))&&xa(w,d,v)&&(w.f&(sr|Pt)?(we(w,je),E.schedule(w)):o(E,ts).add(w));if(o(E,rt).length>0){E.apply();for(var p of o(E,rt))de(m=E,Te,va).call(m,p,[],[]);z(E,rt,[])}E.deactivate()}}for(const E of os)o(E,us).has(this)&&(o(E,us).delete(this),o(E,us).size===0&&!de(A=E,Te,Er).call(A)&&(E.activate(),de(x=E,Te,Sr).call(x)))};let ks=Nr;function Zo(e){var t=Zs;Zs=!0;try{for(var r;;){if(Ko(),R===null)return r;R.flush()}}finally{Zs=t}}function ec(){try{Ro()}catch(e){rs(e,ca)}}let xt=null;function Vn(e){var t=e.length;if(t!==0){for(var r=0;r<t;){var a=e[r++];if(!(a.f&(bt|Ye))&&Us(a)&&(xt=new Set,Es(a),a.deps===null&&a.first===null&&a.nodes===null&&a.teardown===null&&a.ac===null&&Il(a),(xt==null?void 0:xt.size)>0)){ms.clear();for(const n of xt){if(n.f&(bt|Ye))continue;const i=[n];let v=n.parent;for(;v!==null;)xt.has(v)&&(xt.delete(v),i.push(v)),v=v.parent;for(let u=i.length-1;u>=0;u--){const d=i[u];d.f&(bt|Ye)||Es(d)}}xt.clear()}}xt=null}}function gl(e,t,r,a){if(!r.has(e)&&(r.add(e),e.reactions!==null))for(const n of e.reactions){const i=n.f;i&Ue?gl(n,t,r,a):i&(sr|Pt)&&!(i&je)&&xa(n,t,a)&&(we(n,je),Ea(n))}}function xa(e,t,r){const a=r.get(e);if(a!==void 0)return a;if(e.deps!==null)for(const n of e.deps){if(Ps.call(t,n))return!0;if(n.f&Ue&&xa(n,t,r))return r.set(n,!0),!0}return r.set(e,!1),!1}function Ea(e){R.schedule(e)}function wl(e,t){if(!(e.f&Mt&&e.f&Ae)){e.f&je?t.d.push(e):e.f&At&&t.m.push(e),we(e,Ae);for(var r=e.first;r!==null;)wl(r,t),r=r.next}}function yl(e){we(e,Ae);for(var t=e.first;t!==null;)yl(t),t=t.next}function tc(e){let t=0,r=xs(0),a;return()=>{Aa()&&(s(r),jr(()=>(t===0&&(a=h(()=>e(()=>er(r)))),t+=1,()=>{ns(()=>{t-=1,t===0&&(a==null||a(),a=void 0,er(r))})})))}}var sc=js|Vs;function rc(e,t,r,a){new ac(e,t,r,a)}var ft,ga,ut,ps,Je,pt,ze,at,qt,hs,ss,Fs,ir,or,zt,Dr,ye,nc,lc,ic,da,Ar,Cr,fa,ua;class ac{constructor(t,r,a,n){B(this,ye);kt(this,"parent");kt(this,"is_pending",!1);kt(this,"transform_error");B(this,ft);B(this,ga,null);B(this,ut);B(this,ps);B(this,Je);B(this,pt,null);B(this,ze,null);B(this,at,null);B(this,qt,null);B(this,hs,0);B(this,ss,0);B(this,Fs,!1);B(this,ir,new Set);B(this,or,new Set);B(this,zt,null);B(this,Dr,tc(()=>(z(this,zt,xs(o(this,hs))),()=>{z(this,zt,null)})));var i;z(this,ft,t),z(this,ut,r),z(this,ps,v=>{var u=Y;u.b=this,u.f|=ia,a(v)}),this.parent=Y.b,this.transform_error=n??((i=this.parent)==null?void 0:i.transform_error)??(v=>v),z(this,Je,Ta(()=>{de(this,ye,da).call(this)},sc))}defer_effect(t){bl(t,o(this,ir),o(this,or))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!o(this,ut).pending}update_pending_count(t,r){de(this,ye,fa).call(this,t,r),z(this,hs,o(this,hs)+t),!(!o(this,zt)||o(this,Fs))&&(z(this,Fs,!0),ns(()=>{z(this,Fs,!1),o(this,zt)&&Bs(o(this,zt),o(this,hs))}))}get_effect_pending(){return o(this,Dr).call(this),s(o(this,zt))}error(t){if(!o(this,ut).onerror&&!o(this,ut).failed)throw t;R!=null&&R.is_fork?(o(this,pt)&&R.skip_effect(o(this,pt)),o(this,ze)&&R.skip_effect(o(this,ze)),o(this,at)&&R.skip_effect(o(this,at)),R.on_fork_commit(()=>{de(this,ye,ua).call(this,t)})):de(this,ye,ua).call(this,t)}}ft=new WeakMap,ga=new WeakMap,ut=new WeakMap,ps=new WeakMap,Je=new WeakMap,pt=new WeakMap,ze=new WeakMap,at=new WeakMap,qt=new WeakMap,hs=new WeakMap,ss=new WeakMap,Fs=new WeakMap,ir=new WeakMap,or=new WeakMap,zt=new WeakMap,Dr=new WeakMap,ye=new WeakSet,nc=function(){try{z(this,pt,ht(()=>o(this,ps).call(this,o(this,ft))))}catch(t){this.error(t)}},lc=function(t){const r=o(this,ut).failed;r&&z(this,at,ht(()=>{r(o(this,ft),()=>t,()=>()=>{})}))},ic=function(){const t=o(this,ut).pending;t&&(this.is_pending=!0,z(this,ze,ht(()=>t(o(this,ft)))),ns(()=>{var r=z(this,qt,document.createDocumentFragment()),a=Yt();r.append(a),z(this,pt,de(this,ye,Cr).call(this,()=>ht(()=>o(this,ps).call(this,a)))),o(this,ss)===0&&(o(this,ft).before(r),z(this,qt,null),gs(o(this,ze),()=>{z(this,ze,null)}),de(this,ye,Ar).call(this,R))}))},da=function(){try{if(this.is_pending=this.has_pending_snippet(),z(this,ss,0),z(this,hs,0),z(this,pt,ht(()=>{o(this,ps).call(this,o(this,ft))})),o(this,ss)>0){var t=z(this,qt,document.createDocumentFragment());Ra(o(this,pt),t);const r=o(this,ut).pending;z(this,ze,ht(()=>r(o(this,ft))))}else de(this,ye,Ar).call(this,R)}catch(r){this.error(r)}},Ar=function(t){this.is_pending=!1,t.transfer_effects(o(this,ir),o(this,or))},Cr=function(t){var r=Y,a=K,n=Ce;wt(o(this,Je)),gt(o(this,Je)),Hs(o(this,Je).ctx);try{return ks.ensure(),t()}catch(i){return hl(i),null}finally{wt(r),gt(a),Hs(n)}},fa=function(t,r){var a;if(!this.has_pending_snippet()){this.parent&&de(a=this.parent,ye,fa).call(a,t,r);return}z(this,ss,o(this,ss)+t),o(this,ss)===0&&(de(this,ye,Ar).call(this,r),o(this,ze)&&gs(o(this,ze),()=>{z(this,ze,null)}),o(this,qt)&&(o(this,ft).before(o(this,qt)),z(this,qt,null)))},ua=function(t){o(this,pt)&&(Ze(o(this,pt)),z(this,pt,null)),o(this,ze)&&(Ze(o(this,ze)),z(this,ze,null)),o(this,at)&&(Ze(o(this,at)),z(this,at,null));var r=o(this,ut).onerror;let a=o(this,ut).failed;var n=!1,i=!1;const v=()=>{if(n){qo();return}n=!0,i&&Fo(),o(this,at)!==null&&gs(o(this,at),()=>{z(this,at,null)}),de(this,ye,Cr).call(this,()=>{de(this,ye,da).call(this)})},u=d=>{try{i=!0,r==null||r(d,v),i=!1}catch(p){rs(p,o(this,Je)&&o(this,Je).parent)}a&&z(this,at,de(this,ye,Cr).call(this,()=>{try{return ht(()=>{var p=Y;p.b=this,p.f|=ia,a(o(this,ft),()=>d,()=>v)})}catch(p){return rs(p,o(this,Je).parent),null}}))};ns(()=>{var d;try{d=this.transform_error(t)}catch(p){rs(p,o(this,Je)&&o(this,Je).parent);return}d!==null&&typeof d=="object"&&typeof d.then=="function"?d.then(u,p=>rs(p,o(this,Je)&&o(this,Je).parent)):u(d)})};function oc(e,t,r,a){const n=fr()?Sa:Os;var i=e.filter(x=>!x.settled);if(r.length===0&&i.length===0){a(t.map(n));return}var v=Y,u=cc(),d=i.length===1?i[0].promise:i.length>1?Promise.all(i.map(x=>x.promise)):null;function p(x){u();try{a(x)}catch(E){v.f&bt||rs(E,v)}Rr()}if(r.length===0){d.then(()=>p(t.map(n)));return}var m=kl();function A(){Promise.all(r.map(x=>vc(x))).then(x=>p([...t.map(n),...x])).catch(x=>rs(x,v)).finally(()=>m())}d?d.then(()=>{u(),A(),Rr()}):A()}function cc(){var e=Y,t=K,r=Ce,a=R;return function(i=!0){wt(e),gt(t),Hs(r),i&&!(e.f&bt)&&(a==null||a.activate(),a==null||a.apply())}}function Rr(e=!0){wt(null),gt(null),Hs(null),e&&(R==null||R.deactivate())}function kl(){var e=Y,t=e.b,r=R,a=t.is_rendered();return t.update_pending_count(1,r),r.increment(a,e),(n=!1)=>{t.update_pending_count(-1,r),r.decrement(a,e,n)}}function Sa(e){var t=Ue|je;return Y!==null&&(Y.f|=Vs),{ctx:Ce,deps:null,effects:null,equals:vl,f:t,fn:e,reactions:null,rv:0,v:Ne,wv:0,parent:Y,ac:null}}function vc(e,t,r){let a=Y;a===null&&Ao();var n=void 0,i=xs(Ne),v=!K,u=new Map;return Ec(()=>{var E;var d=Y,p=nl();n=p.promise;try{Promise.resolve(e()).then(p.resolve,p.reject).finally(Rr)}catch(w){p.reject(w),Rr()}var m=R;if(v){if(d.f&Ss)var A=kl();if(a.b.is_rendered())(E=u.get(m))==null||E.reject(Wt),u.delete(m);else{for(const w of u.values())w.reject(Wt);u.clear()}u.set(m,p)}const x=(w,I=void 0)=>{if(A){var S=I===Wt;A(S)}if(!(I===Wt||d.f&bt)){if(m.activate(),I)i.f|=as,Bs(i,I);else{i.f&as&&(i.f^=as),Bs(i,w);for(const[D,se]of u){if(u.delete(D),D===m)break;se.reject(Wt)}}m.deactivate()}};p.promise.then(x,w=>x(null,w||"unknown"))}),Ca(()=>{for(const d of u.values())d.reject(Wt)}),new Promise(d=>{function p(m){function A(){m===n?d(i):p(n)}m.then(A,A)}p(n)})}function Os(e){const t=Sa(e);return t.equals=dl,t}function dc(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)Ze(t[r])}}function Ma(e){var t,r=Y,a=e.parent;if(!is&&a!==null&&a.f&(bt|Ye))return Vo(),e.v;wt(a);try{e.f&=~ys,dc(e),t=Bl(e)}finally{wt(r)}return t}function xl(e){var t=Ma(e);if(!e.equals(t)&&(e.wv=jl(),(!(R!=null&&R.is_fork)||e.deps===null)&&(R!==null?R.capture(e,t,!0):e.v=t,e.deps===null))){we(e,Ae);return}is||($e!==null?(Aa()||R!=null&&R.is_fork)&&$e.set(e,t):ka(e))}function fc(e){var t,r;if(e.effects!==null)for(const a of e.effects)(a.teardown||a.ac)&&((t=a.teardown)==null||t.call(a),(r=a.ac)==null||r.abort(Wt),a.teardown=xo,a.ac=null,rr(a,0),La(a))}function El(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&Es(t)}let pa=new Set;const ms=new Map;let Sl=!1;function xs(e,t){var r={f:0,v:e,reactions:null,equals:vl,rv:0,wv:0};return r}function Qt(e,t){const r=xs(e);return Ac(r),r}function P(e,t=!1,r=!0){var n;const a=xs(e);return t||(a.equals=dl),Pr&&r&&Ce!==null&&Ce.l!==null&&((n=Ce.l).s??(n.s=[])).push(a),a}function cs(e,t){return k(e,h(()=>s(e))),t}function k(e,t,r=!1){K!==null&&(!St||K.f&oa)&&fr()&&K.f&(Ue|Pt|sr|oa)&&(mt===null||!Ps.call(mt,e))&&Io();let a=r?Xs(t):t;return Bs(e,a,xr)}function Bs(e,t,r=null){if(!e.equals(t)){ms.set(e,is?t:e.v);var a=ks.ensure();if(a.capture(e,t),e.f&Ue){const n=e;e.f&je&&Ma(n),$e===null&&ka(n)}e.wv=jl(),Ml(e,je,r),fr()&&Y!==null&&Y.f&Ae&&!(Y.f&(Mt|ls))&&(dt===null?Cc([e]):dt.push(e)),!a.is_fork&&pa.size>0&&!Sl&&uc()}return t}function uc(){Sl=!1;for(const e of pa)e.f&Ae&&we(e,At),Us(e)&&Es(e);pa.clear()}function er(e){k(e,e.v+1)}function Ml(e,t,r){var a=e.reactions;if(a!==null)for(var n=fr(),i=a.length,v=0;v<i;v++){var u=a[v],d=u.f;if(!(!n&&u===Y)){var p=(d&je)===0;if(p&&we(u,t),d&Ue){var m=u;$e==null||$e.delete(m),d&ys||(d&_t&&(Y===null||!(Y.f&Or))&&(u.f|=ys),Ml(m,At,r))}else if(p){var A=u;d&Pt&&xt!==null&&xt.add(A),r!==null?r.push(A):Ea(A)}}}}function Xs(e){if(typeof e!="object"||e===null||bs in e)return e;const t=ya(e);if(t!==yo&&t!==ko)return e;var r=new Map,a=wa(e),n=Qt(0),i=ws,v=u=>{if(ws===i)return u();var d=K,p=ws;gt(null),Gn(i);var m=u();return gt(d),Gn(p),m};return a&&r.set("length",Qt(e.length)),new Proxy(e,{defineProperty(u,d,p){(!("value"in p)||p.configurable===!1||p.enumerable===!1||p.writable===!1)&&No();var m=r.get(d);return m===void 0?v(()=>{var A=Qt(p.value);return r.set(d,A),A}):k(m,p.value,!0),!0},deleteProperty(u,d){var p=r.get(d);if(p===void 0){if(d in u){const m=v(()=>Qt(Ne));r.set(d,m),er(n)}}else k(p,Ne),er(n);return!0},get(u,d,p){var E;if(d===bs)return e;var m=r.get(d),A=d in u;if(m===void 0&&(!A||(E=Qs(u,d))!=null&&E.writable)&&(m=v(()=>{var w=Xs(A?u[d]:Ne),I=Qt(w);return I}),r.set(d,m)),m!==void 0){var x=s(m);return x===Ne?void 0:x}return Reflect.get(u,d,p)},getOwnPropertyDescriptor(u,d){var p=Reflect.getOwnPropertyDescriptor(u,d);if(p&&"value"in p){var m=r.get(d);m&&(p.value=s(m))}else if(p===void 0){var A=r.get(d),x=A==null?void 0:A.v;if(A!==void 0&&x!==Ne)return{enumerable:!0,configurable:!0,value:x,writable:!0}}return p},has(u,d){var x;if(d===bs)return!0;var p=r.get(d),m=p!==void 0&&p.v!==Ne||Reflect.has(u,d);if(p!==void 0||Y!==null&&(!m||(x=Qs(u,d))!=null&&x.writable)){p===void 0&&(p=v(()=>{var E=m?Xs(u[d]):Ne,w=Qt(E);return w}),r.set(d,p));var A=s(p);if(A===Ne)return!1}return m},set(u,d,p,m){var ne;var A=r.get(d),x=d in u;if(a&&d==="length")for(var E=p;E<A.v;E+=1){var w=r.get(E+"");w!==void 0?k(w,Ne):E in u&&(w=v(()=>Qt(Ne)),r.set(E+"",w))}if(A===void 0)(!x||(ne=Qs(u,d))!=null&&ne.writable)&&(A=v(()=>Qt(void 0)),k(A,Xs(p)),r.set(d,A));else{x=A.v!==Ne;var I=v(()=>Xs(p));k(A,I)}var S=Reflect.getOwnPropertyDescriptor(u,d);if(S!=null&&S.set&&S.set.call(m,p),!x){if(a&&typeof d=="string"){var D=r.get("length"),se=Number(d);Number.isInteger(se)&&se>=D.v&&k(D,se+1)}er(n)}return!0},ownKeys(u){s(n);var d=Reflect.ownKeys(u).filter(A=>{var x=r.get(A);return x===void 0||x.v!==Ne});for(var[p,m]of r)m.v!==Ne&&!(p in u)&&d.push(p);return d},setPrototypeOf(){Do()}})}function Un(e){try{if(e!==null&&typeof e=="object"&&bs in e)return e[bs]}catch{}return e}function pc(e,t){return Object.is(Un(e),Un(t))}var ha,Al,Cl,Tl;function hc(){if(ha===void 0){ha=window,Al=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;Cl=Qs(t,"firstChild").get,Tl=Qs(t,"nextSibling").get,Hn(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),Hn(r)&&(r.__t=void 0)}}function Yt(e=""){return document.createTextNode(e)}function Ws(e){return Cl.call(e)}function ur(e){return Tl.call(e)}function c(e,t){return Ws(e)}function Ve(e,t=!1){{var r=Ws(e);return r instanceof Comment&&r.data===""?ur(r):r}}function f(e,t=1,r=!1){let a=e;for(;t--;)a=ur(a);return a}function _c(e){e.textContent=""}function Ll(){return!1}function bc(e,t,r){return document.createElementNS(cl,e,void 0)}let qn=!1;function mc(){qn||(qn=!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 $r(e){var t=K,r=Y;gt(null),wt(null);try{return e()}finally{gt(t),wt(r)}}function Ol(e,t,r,a=r){e.addEventListener(t,()=>$r(r));const n=e.__on_r;n?e.__on_r=()=>{n(),a(!0)}:e.__on_r=()=>a(!0),mc()}function Rl(e){Y===null&&(K===null&&Oo(),Lo()),is&&To()}function gc(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function $t(e,t){var r=Y;r!==null&&r.f&Ye&&(e|=Ye);var a={ctx:Ce,deps:null,nodes:null,f:e|je|_t,first:null,fn:t,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};R==null||R.register_created_effect(a);var n=a;if(e&$s)Ls!==null?Ls.push(a):ks.ensure().schedule(a);else if(t!==null){try{Es(a)}catch(v){throw Ze(a),v}n.deps===null&&n.teardown===null&&n.nodes===null&&n.first===n.last&&!(n.f&Vs)&&(n=n.first,e&Pt&&e&js&&n!==null&&(n.f|=js))}if(n!==null&&(n.parent=r,r!==null&&gc(n,r),K!==null&&K.f&Ue&&!(e&ls))){var i=K;(i.effects??(i.effects=[])).push(n)}return a}function Aa(){return K!==null&&!St}function Ca(e){const t=$t(dr,null);return we(t,Ae),t.teardown=e,t}function zn(e){Rl();var t=Y.f,r=!K&&(t&Mt)!==0&&(t&Ss)===0;if(r){var a=Ce;(a.e??(a.e=[])).push(e)}else return Nl(e)}function Nl(e){return $t($s|il,e)}function wc(e){return Rl(),$t(dr|il,e)}function yc(e){ks.ensure();const t=$t(ls|Vs,e);return(r={})=>new Promise(a=>{r.outro?gs(t,()=>{Ze(t),a(void 0)}):(Ze(t),a(void 0))})}function kc(e){return $t($s,e)}function Me(e,t){var r=Ce,a={effect:null,ran:!1,deps:e};r.l.$.push(a),a.effect=jr(()=>{if(e(),!a.ran){a.ran=!0;var n=Y;try{wt(n.parent),h(t)}finally{wt(n)}}})}function xc(){var e=Ce;jr(()=>{for(var t of e.l.$){t.deps();var r=t.effect;r.f&Ae&&r.deps!==null&&we(r,At),Us(r)&&Es(r),t.ran=!1}})}function Ec(e){return $t(sr|Vs,e)}function jr(e,t=0){return $t(dr|t,e)}function W(e,t=[],r=[],a=[]){oc(a,t,r,n=>{$t(dr,()=>e(...n.map(s)))})}function Ta(e,t=0){var r=$t(Pt|t,e);return r}function ht(e){return $t(Mt|Vs,e)}function Dl(e){var t=e.teardown;if(t!==null){const r=is,a=K;Yn(!0),gt(null);try{t.call(null)}finally{Yn(r),gt(a)}}}function La(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){const n=r.ac;n!==null&&$r(()=>{n.abort(Wt)});var a=r.next;r.f&ls?r.parent=null:Ze(r,t),r=a}}function Sc(e){for(var t=e.first;t!==null;){var r=t.next;t.f&Mt||Ze(t),t=r}}function Ze(e,t=!0){var r=!1;(t||e.f&So)&&e.nodes!==null&&e.nodes.end!==null&&(Mc(e.nodes.start,e.nodes.end),r=!0),we(e,Bn),La(e,t&&!r),rr(e,0);var a=e.nodes&&e.nodes.t;if(a!==null)for(const i of a)i.stop();Dl(e),e.f^=Bn,e.f|=bt;var n=e.parent;n!==null&&n.first!==null&&Il(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Mc(e,t){for(;e!==null;){var r=e===t?null:ur(e);e.remove(),e=r}}function Il(e){var t=e.parent,r=e.prev,a=e.next;r!==null&&(r.next=a),a!==null&&(a.prev=r),t!==null&&(t.first===e&&(t.first=a),t.last===e&&(t.last=r))}function gs(e,t,r=!0){var a=[];Fl(e,a,!0);var n=()=>{r&&Ze(e),t&&t()},i=a.length;if(i>0){var v=()=>--i||n();for(var u of a)u.out(v)}else n()}function Fl(e,t,r){if(!(e.f&Ye)){e.f^=Ye;var a=e.nodes&&e.nodes.t;if(a!==null)for(const u of a)(u.is_global||r)&&t.push(u);for(var n=e.first;n!==null;){var i=n.next;if(!(n.f&ls)){var v=(n.f&js)!==0||(n.f&Mt)!==0&&(e.f&Pt)!==0;Fl(n,t,v?r:!1)}n=i}}}function Oa(e){Pl(e,!0)}function Pl(e,t){if(e.f&Ye){e.f^=Ye,e.f&Ae||(we(e,je),ks.ensure().schedule(e));for(var r=e.first;r!==null;){var a=r.next,n=(r.f&js)!==0||(r.f&Mt)!==0;Pl(r,n?t:!1),r=a}var i=e.nodes&&e.nodes.t;if(i!==null)for(const v of i)(v.is_global||t)&&v.in()}}function Ra(e,t){if(e.nodes)for(var r=e.nodes.start,a=e.nodes.end;r!==null;){var n=r===a?null:ur(r);t.append(r),r=n}}let Tr=!1,is=!1;function Yn(e){is=e}let K=null,St=!1;function gt(e){K=e}let Y=null;function wt(e){Y=e}let mt=null;function Ac(e){K!==null&&(mt===null?mt=[e]:mt.push(e))}let Qe=null,st=0,dt=null;function Cc(e){dt=e}let $l=1,ds=0,ws=ds;function Gn(e){ws=e}function jl(){return++$l}function Us(e){var t=e.f;if(t&je)return!0;if(t&Ue&&(e.f&=~ys),t&At){for(var r=e.deps,a=r.length,n=0;n<a;n++){var i=r[n];if(Us(i)&&xl(i),i.wv>e.wv)return!0}t&_t&&$e===null&&we(e,Ae)}return!1}function Hl(e,t,r=!0){var a=e.reactions;if(a!==null&&!(mt!==null&&Ps.call(mt,e)))for(var n=0;n<a.length;n++){var i=a[n];i.f&Ue?Hl(i,t,!1):t===i&&(r?we(i,je):i.f&Ae&&we(i,At),Ea(i))}}function Bl(e){var I;var t=Qe,r=st,a=dt,n=K,i=mt,v=Ce,u=St,d=ws,p=e.f;Qe=null,st=0,dt=null,K=p&(Mt|ls)?null:e,mt=null,Hs(e.ctx),St=!1,ws=++ds,e.ac!==null&&($r(()=>{e.ac.abort(Wt)}),e.ac=null);try{e.f|=Or;var m=e.fn,A=m();e.f|=Ss;var x=e.deps,E=R==null?void 0:R.is_fork;if(Qe!==null){var w;if(E||rr(e,st),x!==null&&st>0)for(x.length=st+Qe.length,w=0;w<Qe.length;w++)x[st+w]=Qe[w];else e.deps=x=Qe;if(Aa()&&e.f&_t)for(w=st;w<x.length;w++)((I=x[w]).reactions??(I.reactions=[])).push(e)}else!E&&x!==null&&st<x.length&&(rr(e,st),x.length=st);if(fr()&&dt!==null&&!St&&x!==null&&!(e.f&(Ue|At|je)))for(w=0;w<dt.length;w++)Hl(dt[w],e);if(n!==null&&n!==e){if(ds++,n.deps!==null)for(let S=0;S<r;S+=1)n.deps[S].rv=ds;if(t!==null)for(const S of t)S.rv=ds;dt!==null&&(a===null?a=dt:a.push(...dt))}return e.f&as&&(e.f^=as),A}catch(S){return hl(S)}finally{e.f^=Or,Qe=t,st=r,dt=a,K=n,mt=i,Hs(v),St=u,ws=d}}function Tc(e,t){let r=t.reactions;if(r!==null){var a=go.call(r,e);if(a!==-1){var n=r.length-1;n===0?r=t.reactions=null:(r[a]=r[n],r.pop())}}if(r===null&&t.f&Ue&&(Qe===null||!Ps.call(Qe,t))){var i=t;i.f&_t&&(i.f^=_t,i.f&=~ys),i.v!==Ne&&ka(i),fc(i),rr(i,0)}}function rr(e,t){var r=e.deps;if(r!==null)for(var a=t;a<r.length;a++)Tc(e,r[a])}function Es(e){var t=e.f;if(!(t&bt)){we(e,Ae);var r=Y,a=Tr;Y=e,Tr=!0;try{t&(Pt|ll)?Sc(e):La(e),Dl(e);var n=Bl(e);e.teardown=typeof n=="function"?n:null,e.wv=$l;var i;mo&&Yo&&e.f&je&&e.deps}finally{Tr=a,Y=r}}}async function Lc(){await Promise.resolve(),Zo()}function s(e){var t=e.f,r=(t&Ue)!==0;if(K!==null&&!St){var a=Y!==null&&(Y.f&bt)!==0;if(!a&&(mt===null||!Ps.call(mt,e))){var n=K.deps;if(K.f&Or)e.rv<ds&&(e.rv=ds,Qe===null&&n!==null&&n[st]===e?st++:Qe===null?Qe=[e]:Qe.push(e));else{(K.deps??(K.deps=[])).push(e);var i=e.reactions;i===null?e.reactions=[K]:Ps.call(i,K)||i.push(K)}}}if(is&&ms.has(e))return ms.get(e);if(r){var v=e;if(is){var u=v.v;return(!(v.f&Ae)&&v.reactions!==null||Vl(v))&&(u=Ma(v)),ms.set(v,u),u}var d=(v.f&_t)===0&&!St&&K!==null&&(Tr||(K.f&_t)!==0),p=(v.f&Ss)===0;Us(v)&&(d&&(v.f|=_t),xl(v)),d&&!p&&(El(v),Wl(v))}if($e!=null&&$e.has(e))return $e.get(e);if(e.f&as)throw e.v;return e.v}function Wl(e){if(e.f|=_t,e.deps!==null)for(const t of e.deps)(t.reactions??(t.reactions=[])).push(e),t.f&Ue&&!(t.f&_t)&&(El(t),Wl(t))}function Vl(e){if(e.v===Ne)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(ms.has(t)||t.f&Ue&&Vl(t))return!0;return!1}function h(e){var t=St;try{return St=!0,e()}finally{St=t}}function Lr(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(bs in e)_a(e);else if(!Array.isArray(e))for(let t in e){const r=e[t];typeof r=="object"&&r&&bs in r&&_a(r)}}}function _a(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 a in e)try{_a(e[a],t)}catch{}const r=ya(e);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){const a=al(r);for(let n in a){const i=a[n].get;if(i)try{i.call(e)}catch{}}}}}const Oc=["touchstart","touchmove"];function Rc(e){return Oc.includes(e)}const wr=Symbol("events"),Nc=new Set,Kn=new Set;function Dc(e,t,r,a={}){function n(i){if(a.capture||ba.call(t,i),!i.cancelBubble)return $r(()=>r==null?void 0:r.call(this,i))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?ns(()=>{t.addEventListener(e,n,a)}):t.addEventListener(e,n,a),n}function te(e,t,r,a,n){var i={capture:a,passive:n},v=Dc(e,t,r,i);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Ca(()=>{t.removeEventListener(e,v,i)})}let Xn=null;function ba(e){var S,D;var t=this,r=t.ownerDocument,a=e.type,n=((S=e.composedPath)==null?void 0:S.call(e))||[],i=n[0]||e.target;Xn=e;var v=0,u=Xn===e&&e[wr];if(u){var d=n.indexOf(u);if(d!==-1&&(t===document||t===window)){e[wr]=t;return}var p=n.indexOf(t);if(p===-1)return;d<=p&&(v=d)}if(i=n[v]||e.target,i!==t){wo(e,"currentTarget",{configurable:!0,get(){return i||r}});var m=K,A=Y;gt(null),wt(null);try{for(var x,E=[];i!==null;){var w=i.assignedSlot||i.parentNode||i.host||null;try{var I=(D=i[wr])==null?void 0:D[a];I!=null&&(!i.disabled||e.target===i)&&I.call(i,e)}catch(se){x?E.push(se):x=se}if(e.cancelBubble||w===t||w===null)break;i=w}if(x){for(let se of E)queueMicrotask(()=>{throw se});throw x}}finally{e[wr]=t,delete e.currentTarget,gt(m),wt(A)}}}var sl;const ra=((sl=globalThis==null?void 0:globalThis.window)==null?void 0:sl.trustedTypes)&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function Ic(e){return(ra==null?void 0:ra.createHTML(e))??e}function Ul(e){var t=bc("template");return t.innerHTML=Ic(e.replaceAll("<!>","<!---->")),t.content}function ar(e,t){var r=Y;r.nodes===null&&(r.nodes={start:e,end:t,a:null,t:null})}function $(e,t){var r=(t&Bo)!==0,a=(t&Wo)!==0,n,i=!e.startsWith("<!>");return()=>{n===void 0&&(n=Ul(i?e:"<!>"+e),r||(n=Ws(n)));var v=a||Al?document.importNode(n,!0):n.cloneNode(!0);if(r){var u=Ws(v),d=v.lastChild;ar(u,d)}else ar(v,v);return v}}function Fc(e,t,r="svg"){var a=!e.startsWith("<!>"),n=`<${r}>${a?e:"<!>"+e}</${r}>`,i;return()=>{if(!i){var v=Ul(n),u=Ws(v);i=Ws(u)}var d=i.cloneNode(!0);return ar(d,d),d}}function qs(e,t){return Fc(e,t,"svg")}function Rt(e=""){{var t=Yt(e+"");return ar(t,t),t}}function Cs(){var e=document.createDocumentFragment(),t=document.createComment(""),r=Yt();return e.append(t,r),ar(t,r),e}function C(e,t){e!==null&&e.before(t)}function M(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 Pc(e,t){return $c(e,t)}const yr=new Map;function $c(e,{target:t,anchor:r,props:a={},events:n,context:i,intro:v=!0,transformError:u}){hc();var d=void 0,p=yc(()=>{var m=r??t.appendChild(Yt());rc(m,{pending:()=>{}},E=>{fl({});var w=Ce;i&&(w.c=i),n&&(a.$$events=n),d=e(E,a)||{},ul()},u);var A=new Set,x=E=>{for(var w=0;w<E.length;w++){var I=E[w];if(!A.has(I)){A.add(I);var S=Rc(I);for(const ne of[t,document]){var D=yr.get(ne);D===void 0&&(D=new Map,yr.set(ne,D));var se=D.get(I);se===void 0?(ne.addEventListener(I,ba,{passive:S}),D.set(I,1)):D.set(I,se+1)}}}};return x(Fr(Nc)),Kn.add(x),()=>{var S;for(var E of A)for(const D of[t,document]){var w=yr.get(D),I=w.get(E);--I==0?(D.removeEventListener(E,ba),w.delete(E),w.size===0&&yr.delete(D)):w.set(E,I)}Kn.delete(x),m!==r&&((S=m.parentNode)==null||S.removeChild(m))}});return jc.set(d,p),d}let jc=new WeakMap;var Et,It,nt,_s,cr,vr,Ir;class Hc{constructor(t,r=!0){kt(this,"anchor");B(this,Et,new Map);B(this,It,new Map);B(this,nt,new Map);B(this,_s,new Set);B(this,cr,!0);B(this,vr,t=>{if(o(this,Et).has(t)){var r=o(this,Et).get(t),a=o(this,It).get(r);if(a)Oa(a),o(this,_s).delete(r);else{var n=o(this,nt).get(r);n&&(o(this,It).set(r,n.effect),o(this,nt).delete(r),n.fragment.lastChild.remove(),this.anchor.before(n.fragment),a=n.effect)}for(const[i,v]of o(this,Et)){if(o(this,Et).delete(i),i===t)break;const u=o(this,nt).get(v);u&&(Ze(u.effect),o(this,nt).delete(v))}for(const[i,v]of o(this,It)){if(i===r||o(this,_s).has(i))continue;const u=()=>{if(Array.from(o(this,Et).values()).includes(i)){var p=document.createDocumentFragment();Ra(v,p),p.append(Yt()),o(this,nt).set(i,{effect:v,fragment:p})}else Ze(v);o(this,_s).delete(i),o(this,It).delete(i)};o(this,cr)||!a?(o(this,_s).add(i),gs(v,u,!1)):u()}}});B(this,Ir,t=>{o(this,Et).delete(t);const r=Array.from(o(this,Et).values());for(const[a,n]of o(this,nt))r.includes(a)||(Ze(n.effect),o(this,nt).delete(a))});this.anchor=t,z(this,cr,r)}ensure(t,r){var a=R,n=Ll();if(r&&!o(this,It).has(t)&&!o(this,nt).has(t))if(n){var i=document.createDocumentFragment(),v=Yt();i.append(v),o(this,nt).set(t,{effect:ht(()=>r(v)),fragment:i})}else o(this,It).set(t,ht(()=>r(this.anchor)));if(o(this,Et).set(a,t),n){for(const[u,d]of o(this,It))u===t?a.unskip_effect(d):a.skip_effect(d);for(const[u,d]of o(this,nt))u===t?a.unskip_effect(d.effect):a.skip_effect(d.effect);a.oncommit(o(this,vr)),a.ondiscard(o(this,Ir))}else o(this,vr).call(this,a)}}Et=new WeakMap,It=new WeakMap,nt=new WeakMap,_s=new WeakMap,cr=new WeakMap,vr=new WeakMap,Ir=new WeakMap;function G(e,t,r=!1){var a=new Hc(e),n=r?js:0;function i(v,u){a.ensure(v,u)}Ta(()=>{var v=!1;t((u,d=0)=>{v=!0,i(d,u)}),v||i(-1,null)},n)}function Zt(e,t){return t}function Bc(e,t,r){for(var a=[],n=t.length,i,v=t.length,u=0;u<n;u++){let A=t[u];gs(A,()=>{if(i){if(i.pending.delete(A),i.done.add(A),i.pending.size===0){var x=e.outrogroups;ma(e,Fr(i.done)),x.delete(i),x.size===0&&(e.outrogroups=null)}}else v-=1},!1)}if(v===0){var d=a.length===0&&r!==null;if(d){var p=r,m=p.parentNode;_c(m),m.append(p),e.items.clear()}ma(e,t,!d)}else i={pending:new Set(t),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(i)}function ma(e,t,r=!0){var a;if(e.pending.size>0){a=new Set;for(const v of e.pending.values())for(const u of v)a.add(e.items.get(u).e)}for(var n=0;n<t.length;n++){var i=t[n];if(a!=null&&a.has(i)){i.f|=Ft;const v=document.createDocumentFragment();Ra(i,v)}else Ze(t[n],r)}}var Jn;function vt(e,t,r,a,n,i=null){var v=e,u=new Map,d=(t&ol)!==0;if(d){var p=e;v=p.appendChild(Yt())}var m=null,A=Os(()=>{var ne=r();return wa(ne)?ne:ne==null?[]:Fr(ne)}),x,E=new Map,w=!0;function I(ne){se.effect.f&bt||(se.pending.delete(ne),se.fallback=m,Wc(se,x,v,t,a),m!==null&&(x.length===0?m.f&Ft?(m.f^=Ft,Js(m,null,v)):Oa(m):gs(m,()=>{m=null})))}function S(ne){se.pending.delete(ne)}var D=Ta(()=>{x=s(A);for(var ne=x.length,be=new Set,Ge=R,b=Ll(),me=0;me<ne;me+=1){var lt=x[me],it=a(lt,me),De=w?null:u.get(it);De?(De.v&&Bs(De.v,lt),De.i&&Bs(De.i,me),b&&Ge.unskip_effect(De.e)):(De=Vc(u,w?v:Jn??(Jn=Yt()),lt,it,me,n,t,r),w||(De.e.f|=Ft),u.set(it,De)),be.add(it)}if(ne===0&&i&&!m&&(w?m=ht(()=>i(v)):(m=ht(()=>i(Jn??(Jn=Yt()))),m.f|=Ft)),ne>be.size&&Co(),!w)if(E.set(Ge,be),b){for(const[Ct,Ke]of u)be.has(Ct)||Ge.skip_effect(Ke.e);Ge.oncommit(I),Ge.ondiscard(S)}else I(Ge);s(A)}),se={effect:D,items:u,pending:E,outrogroups:null,fallback:m};w=!1}function Ks(e){for(;e!==null&&!(e.f&Mt);)e=e.next;return e}function Wc(e,t,r,a,n){var De,Ct,Ke,ue,Ie,qe,Oe,Tt,Gt;var i=(a&jo)!==0,v=t.length,u=e.items,d=Ks(e.effect.first),p,m=null,A,x=[],E=[],w,I,S,D;if(i)for(D=0;D<v;D+=1)w=t[D],I=n(w,D),S=u.get(I).e,S.f&Ft||((Ct=(De=S.nodes)==null?void 0:De.a)==null||Ct.measure(),(A??(A=new Set)).add(S));for(D=0;D<v;D+=1){if(w=t[D],I=n(w,D),S=u.get(I).e,e.outrogroups!==null)for(const He of e.outrogroups)He.pending.delete(S),He.done.delete(S);if(S.f&Ye&&(Oa(S),i&&((ue=(Ke=S.nodes)==null?void 0:Ke.a)==null||ue.unfix(),(A??(A=new Set)).delete(S))),S.f&Ft)if(S.f^=Ft,S===d)Js(S,null,r);else{var se=m?m.next:d;S===e.effect.last&&(e.effect.last=S.prev),S.prev&&(S.prev.next=S.next),S.next&&(S.next.prev=S.prev),es(e,m,S),es(e,S,se),Js(S,se,r),m=S,x=[],E=[],d=Ks(m.next);continue}if(S!==d){if(p!==void 0&&p.has(S)){if(x.length<E.length){var ne=E[0],be;m=ne.prev;var Ge=x[0],b=x[x.length-1];for(be=0;be<x.length;be+=1)Js(x[be],ne,r);for(be=0;be<E.length;be+=1)p.delete(E[be]);es(e,Ge.prev,b.next),es(e,m,Ge),es(e,b,ne),d=ne,m=b,D-=1,x=[],E=[]}else p.delete(S),Js(S,d,r),es(e,S.prev,S.next),es(e,S,m===null?e.effect.first:m.next),es(e,m,S),m=S;continue}for(x=[],E=[];d!==null&&d!==S;)(p??(p=new Set)).add(d),E.push(d),d=Ks(d.next);if(d===null)continue}S.f&Ft||x.push(S),m=S,d=Ks(S.next)}if(e.outrogroups!==null){for(const He of e.outrogroups)He.pending.size===0&&(ma(e,Fr(He.done)),(Ie=e.outrogroups)==null||Ie.delete(He));e.outrogroups.size===0&&(e.outrogroups=null)}if(d!==null||p!==void 0){var me=[];if(p!==void 0)for(S of p)S.f&Ye||me.push(S);for(;d!==null;)!(d.f&Ye)&&d!==e.fallback&&me.push(d),d=Ks(d.next);var lt=me.length;if(lt>0){var it=a&ol&&v===0?r:null;if(i){for(D=0;D<lt;D+=1)(Oe=(qe=me[D].nodes)==null?void 0:qe.a)==null||Oe.measure();for(D=0;D<lt;D+=1)(Gt=(Tt=me[D].nodes)==null?void 0:Tt.a)==null||Gt.fix()}Bc(e,me,it)}}i&&ns(()=>{var He,zs;if(A!==void 0)for(S of A)(zs=(He=S.nodes)==null?void 0:He.a)==null||zs.apply()})}function Vc(e,t,r,a,n,i,v,u){var d=v&Po?v&Ho?xs(r):P(r,!1,!1):null,p=v&$o?xs(n):null;return{v:d,i:p,e:ht(()=>(i(t,d??r,p??n,u),()=>{e.delete(a)}))}}function Js(e,t,r){if(e.nodes)for(var a=e.nodes.start,n=e.nodes.end,i=t&&!(t.f&Ft)?t.nodes.start:r;a!==null;){var v=ur(a);if(i.before(a),a===n)return;a=v}}function es(e,t,r){t===null?e.effect.first=r:t.next=r,r===null?e.effect.last=t:r.prev=t}const Qn=[...`
|
|
2
|
-
\r\f \v\uFEFF`];function Uc(e,t,r){var a=e==null?"":""+e;if(t&&(a=a?a+" "+t:t),r){for(var n of Object.keys(r))if(r[n])a=a?a+" "+n:n;else if(a.length)for(var i=n.length,v=0;(v=a.indexOf(n,v))>=0;){var u=v+i;(v===0||Qn.includes(a[v-1]))&&(u===a.length||Qn.includes(a[u]))?a=(v===0?"":a.substring(0,v))+a.substring(u+1):v=u}}return a===""?null:a}function qc(e,t){return e==null?null:String(e)}function ae(e,t,r,a,n,i){var v=e.__className;if(v!==r||v===void 0){var u=Uc(r,a,i);u==null?e.removeAttribute("class"):t?e.className=u:e.setAttribute("class",u),e.__className=r}else if(i&&n!==i)for(var d in i){var p=!!i[d];(n==null||p!==!!n[d])&&e.classList.toggle(d,p)}return i}function zc(e,t,r,a){var n=e.__style;if(n!==t){var i=qc(t);i==null?e.removeAttribute("style"):e.style.cssText=i,e.__style=t}return a}function ql(e,t,r=!1){if(e.multiple){if(t==null)return;if(!wa(t))return Uo();for(var a of e.options)a.selected=t.includes(tr(a));return}for(a of e.options){var n=tr(a);if(pc(n,t)){a.selected=!0;return}}(!r||t!==void 0)&&(e.selectedIndex=-1)}function Yc(e){var t=new MutationObserver(()=>{ql(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Ca(()=>{t.disconnect()})}function kr(e,t,r=t){var a=new WeakSet,n=!0;Ol(e,"change",i=>{var v=i?"[selected]":":checked",u;if(e.multiple)u=[].map.call(e.querySelectorAll(v),tr);else{var d=e.querySelector(v)??e.querySelector("option:not([disabled])");u=d&&tr(d)}r(u),e.__value=u,R!==null&&a.add(R)}),kc(()=>{var i=t();if(e===document.activeElement){var v=R;if(a.has(v))return}if(ql(e,i,n),n&&i===void 0){var u=e.querySelector(":checked");u!==null&&(i=tr(u),r(i))}e.__value=i,n=!1}),Yc(e)}function tr(e){return"__value"in e?e.__value:e.value}const Gc=Symbol("is custom element"),Kc=Symbol("is html");function _e(e,t,r,a){var n=Xc(e);n[t]!==(n[t]=r)&&(t==="loading"&&(e[Mo]=r),r==null?e.removeAttribute(t):typeof r!="string"&&Jc(e).includes(t)?e[t]=r:e.setAttribute(t,r))}function Xc(e){return e.__attributes??(e.__attributes={[Gc]:e.nodeName.includes("-"),[Kc]:e.namespaceURI===cl})}var Zn=new Map;function Jc(e){var t=e.getAttribute("is")||e.nodeName,r=Zn.get(t);if(r)return r;Zn.set(t,r=[]);for(var a,n=e,i=Element.prototype;i!==n;){a=al(n);for(var v in a)a[v].set&&r.push(v);n=ya(n)}return r}function Ts(e,t,r=t){var a=new WeakSet;Ol(e,"input",async n=>{var i=n?e.defaultValue:e.value;if(i=aa(e)?na(i):i,r(i),R!==null&&a.add(R),await Lc(),i!==(i=t())){var v=e.selectionStart,u=e.selectionEnd,d=e.value.length;if(e.value=i??"",u!==null){var p=e.value.length;v===u&&u===d&&p>d?(e.selectionStart=p,e.selectionEnd=p):(e.selectionStart=v,e.selectionEnd=Math.min(u,p))}}}),h(t)==null&&e.value&&(r(aa(e)?na(e.value):e.value),R!==null&&a.add(R)),jr(()=>{var n=t();if(e===document.activeElement){var i=R;if(a.has(i))return}aa(e)&&n===na(e.value)||e.type==="date"&&!n&&!e.value||n!==e.value&&(e.value=n??"")})}function aa(e){var t=e.type;return t==="number"||t==="range"}function na(e){return e===""?null:+e}function el(e){return function(...t){var r=t[0];r.target===this&&(e==null||e.apply(this,t))}}function Qc(e){return function(...t){var r=t[0];return r.stopPropagation(),e==null?void 0:e.apply(this,t)}}function Zc(e){return function(...t){var r=t[0];return r.preventDefault(),e==null?void 0:e.apply(this,t)}}function ev(e=!1){const t=Ce,r=t.l.u;if(!r)return;let a=()=>Lr(t.s);if(e){let n=0,i={};const v=Sa(()=>{let u=!1;const d=t.s;for(const p in d)d[p]!==i[p]&&(i[p]=d[p],u=!0);return u&&n++,n});a=()=>s(v)}r.b.length&&wc(()=>{tl(t,a),la(r.b)}),zn(()=>{const n=h(()=>r.m.map(Eo));return()=>{for(const i of n)typeof i=="function"&&i()}}),r.a.length&&zn(()=>{tl(t,a),la(r.a)})}function tl(e,t){if(e.l.s)for(const r of e.l.s)s(r);t()}const tv="5";var rl;typeof window<"u"&&((rl=window.__svelte??(window.__svelte={})).v??(rl.v=new Set)).add(tv);Go();var sv=$('<span class="tab-badge svelte-d3ct2b"> </span>'),rv=qs('<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" class="svelte-d3ct2b"><circle cx="12" cy="12" r="5" class="svelte-d3ct2b"></circle><line x1="12" y1="1" x2="12" y2="3" class="svelte-d3ct2b"></line><line x1="12" y1="21" x2="12" y2="23" class="svelte-d3ct2b"></line><line x1="4.22" y1="4.22" x2="5.64" y2="5.64" class="svelte-d3ct2b"></line><line x1="18.36" y1="18.36" x2="19.78" y2="19.78" class="svelte-d3ct2b"></line><line x1="1" y1="12" x2="3" y2="12" class="svelte-d3ct2b"></line><line x1="21" y1="12" x2="23" y2="12" class="svelte-d3ct2b"></line><line x1="4.22" y1="19.78" x2="5.64" y2="18.36" class="svelte-d3ct2b"></line><line x1="18.36" y1="5.64" x2="19.78" y2="4.22" class="svelte-d3ct2b"></line></svg>'),av=qs('<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" class="svelte-d3ct2b"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" class="svelte-d3ct2b"></path></svg>'),nv=$('<div class="health-badge health-warn svelte-d3ct2b"><i class="dot dot-warn svelte-d3ct2b"></i> <span class="svelte-d3ct2b"> </span></div>'),lv=$('<div><i></i> <span class="svelte-d3ct2b"> </span></div>'),iv=$('<span class="health-error svelte-d3ct2b"> </span>'),ov=$('<span class="health-error svelte-d3ct2b"> </span>'),cv=$('<span class="dropdown-badge svelte-d3ct2b"> </span>'),vv=$('<div class="dropdown svelte-d3ct2b"><button><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" class="svelte-d3ct2b"><circle cx="12" cy="12" r="3" class="svelte-d3ct2b"></circle><path d="M12 1v4M12 19v4M4.22 4.22l2.83 2.83M16.95 16.95l2.83 2.83M1 12h4M19 12h4" class="svelte-d3ct2b"></path></svg> Core Engine</button> <button><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" class="svelte-d3ct2b"><circle cx="12" cy="12" r="4" class="svelte-d3ct2b"></circle><path d="M4 12H2M22 12h-2M12 4V2M12 22v-2" class="svelte-d3ct2b"></path><path d="m6.34 6.34-1.41-1.42M19.07 19.07l-1.41-1.41" class="svelte-d3ct2b"></path></svg> Commit Hook <!></button></div>'),dv=qs('<svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor" class="svelte-d3ct2b"><polygon points="5 3 19 12 5 21 5 3" class="svelte-d3ct2b"></polygon></svg>'),fv=qs('<svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor" class="svelte-d3ct2b"><rect x="6" y="4" width="4" height="16" class="svelte-d3ct2b"></rect><rect x="14" y="4" width="4" height="16" class="svelte-d3ct2b"></rect></svg>'),uv=$('<div class="log-row log-row-warn svelte-d3ct2b"><span class="log-time svelte-d3ct2b">--:--:--</span> <span class="log-label label-warn svelte-d3ct2b">ARCH</span> <span class="log-msg svelte-d3ct2b">Custom architecture — no profile rules loaded. Add rules: memory-core remember "..." --type rule</span></div> <div class="log-row svelte-d3ct2b"><span class="log-time svelte-d3ct2b">--:--:--</span> <span class="log-label label-sys svelte-d3ct2b">SYS</span> <span class="log-msg svelte-d3ct2b">Or load a profile when ready: memory-core seed --arch clean-architecture</span></div>',1),pv=$('<div class="log-row log-row-warn svelte-d3ct2b"><span class="log-time svelte-d3ct2b">--:--:--</span> <span class="log-label label-warn svelte-d3ct2b">WARN</span> <span class="log-msg svelte-d3ct2b">No architecture rules configured in .memory-core.json — nothing to watch.</span></div> <div class="log-row svelte-d3ct2b"><span class="log-time svelte-d3ct2b">--:--:--</span> <span class="log-label label-sys svelte-d3ct2b">SYS</span> <span class="log-msg svelte-d3ct2b">Awaiting manual rule configuration...</span></div>',1),hv=$('<div class="log-row svelte-d3ct2b"><span class="log-time svelte-d3ct2b">--:--:--</span> <span class="log-label label-sys svelte-d3ct2b">SYS</span> <span class="log-msg svelte-d3ct2b">Initialization sequence started for memory-core...</span></div> <div class="log-row svelte-d3ct2b"><span class="log-time svelte-d3ct2b">--:--:--</span> <span class="log-label label-ok svelte-d3ct2b">DB</span> <span class="log-msg svelte-d3ct2b">Waiting for PostgreSQL connection...</span></div> <!> <div class="log-row svelte-d3ct2b"><span class="log-time svelte-d3ct2b"></span> <span class="log-label svelte-d3ct2b"></span> <span class="log-msg cursor-blink svelte-d3ct2b">_</span></div>',1),_v=$('· <em class="svelte-d3ct2b"> </em>',1),bv=$('<br class="svelte-d3ct2b"/><span class="detail-fix svelte-d3ct2b"> </span>',1),mv=$('<div class="log-detail svelte-d3ct2b"><span class="detail-index svelte-d3ct2b"> </span> <span class="detail-body svelte-d3ct2b"><strong class="svelte-d3ct2b"> </strong> <!> <!> <!></span></div>'),gv=$('<div><span class="log-time svelte-d3ct2b"> </span> <span> </span> <span class="log-msg svelte-d3ct2b"><!></span> <button class="copy-btn svelte-d3ct2b" title="Copy">⎘</button></div> <!>',1),wv=$('<div class="log-row svelte-d3ct2b"><span class="log-time svelte-d3ct2b">--:--:--</span> <span class="log-label label-ok svelte-d3ct2b">[OK]</span> <span class="log-msg svelte-d3ct2b">No commit hook violations in the last 24 hours.</span></div> <div class="log-row svelte-d3ct2b"><span class="log-time svelte-d3ct2b"></span> <span class="log-label svelte-d3ct2b"></span> <span class="log-msg cursor-blink svelte-d3ct2b">_</span></div>',1),yv=$('<br class="svelte-d3ct2b"/><span class="detail-fix svelte-d3ct2b"> </span>',1),kv=$('<div class="log-detail svelte-d3ct2b"><span class="detail-index svelte-d3ct2b"></span> <span class="detail-body svelte-d3ct2b"><!> <!></span></div>'),xv=$('<div class="log-row log-row-fail svelte-d3ct2b"><span class="log-time svelte-d3ct2b"> </span> <span class="log-label label-hook svelte-d3ct2b"> </span> <span class="log-msg svelte-d3ct2b"><strong class="svelte-d3ct2b"> </strong> <!></span></div> <!>',1),Ev=$('<div class="section-header svelte-d3ct2b"><span class="section-title svelte-d3ct2b">Commit Hook</span> <span class="section-meta svelte-d3ct2b"> </span></div> <!>',1),Sv=$('<span class="rule-reason svelte-d3ct2b"> </span>'),Mv=$('<div class="rule-row svelte-d3ct2b"><span class="rule-badge svelte-d3ct2b"> </span> <span class="rule-scope svelte-d3ct2b"> </span> <span class="rule-content svelte-d3ct2b"> </span> <!> <button class="del-btn svelte-d3ct2b">✕</button></div>'),Av=$('Custom architecture — no profile rules loaded. Add rules from the terminal: <code class="svelte-d3ct2b">memory-core remember "..." --type rule</code>',1),Cv=$('<div class="log-row svelte-d3ct2b"><span class="log-msg svelte-d3ct2b" style="color: var(--outline)"><!></span></div>'),Tv=$('<div class="section-header svelte-d3ct2b"><span class="section-title svelte-d3ct2b">Rule Engine</span> <span class="section-meta svelte-d3ct2b"> </span></div> <div class="rules-toolbar svelte-d3ct2b"><select class="rules-select svelte-d3ct2b"><option class="svelte-d3ct2b">All types</option><option class="svelte-d3ct2b">Rules</option><option class="svelte-d3ct2b">Decisions</option><option class="svelte-d3ct2b">Patterns</option><option class="svelte-d3ct2b">Ignores</option></select> <input class="rules-search svelte-d3ct2b" placeholder="Search rules..."/></div> <div class="rule-form-wrap svelte-d3ct2b"><form class="rule-form svelte-d3ct2b"><div class="rule-form-row svelte-d3ct2b"><select class="rules-select svelte-d3ct2b"><option class="svelte-d3ct2b">Rule</option><option class="svelte-d3ct2b">Decision</option><option class="svelte-d3ct2b">Pattern</option><option class="svelte-d3ct2b">Ignore</option></select> <select class="rules-select svelte-d3ct2b"><option class="svelte-d3ct2b">Project</option><option class="svelte-d3ct2b">Global</option></select> <input class="rules-input svelte-d3ct2b" placeholder="Reason"/> <input class="rules-input svelte-d3ct2b" placeholder="Tags"/></div> <div class="rule-form-row svelte-d3ct2b"><textarea rows="2" class="rules-textarea svelte-d3ct2b" placeholder="Rule or decision content..."></textarea> <button class="add-btn svelte-d3ct2b"> </button></div></form></div> <div class="rule-list svelte-d3ct2b"></div>',1),Lv=$('<div class="log-row svelte-d3ct2b"><span class="log-label label-warn svelte-d3ct2b">[WARN]</span> <span class="log-msg svelte-d3ct2b">No .archmind/layers.json found. Run <code class="svelte-d3ct2b">memory-core init</code> or create the file manually.</span></div>'),Ov=qs('<line stroke-width="1.5" opacity="0.75" class="svelte-d3ct2b"></line>'),Rv=qs('<g role="button" tabindex="0"><rect rx="6"></rect><text text-anchor="middle" class="arch-node-label svelte-d3ct2b"> </text><text text-anchor="middle" class="arch-node-desc svelte-d3ct2b"> </text></g>'),Nv=$('<div class="arch-node-panel-path svelte-d3ct2b"> </div>'),Dv=$('<div class="arch-node-panel-paths svelte-d3ct2b"><div class="arch-node-panel-section svelte-d3ct2b">Glob patterns</div> <!></div>'),Iv=$('<div class="arch-node-panel-rule svelte-d3ct2b"><span> </span> <span style="font-size:12px" class="svelte-d3ct2b"> </span></div>'),Fv=$('<div class="arch-node-panel-paths svelte-d3ct2b"><div class="arch-node-panel-section svelte-d3ct2b">Rules involving this layer</div> <!></div>'),Pv=$('<div class="arch-node-panel svelte-d3ct2b"><div class="arch-node-panel-header svelte-d3ct2b"><span class="arch-node-panel-name svelte-d3ct2b"> </span> <span class="arch-node-panel-meta svelte-d3ct2b"> </span> <button class="arch-node-panel-close svelte-d3ct2b" aria-label="Close">✕</button></div> <!> <!></div>'),$v=$('<div class="arch-rule-row svelte-d3ct2b"><span> </span> <span class="arch-rule-layers svelte-d3ct2b"> </span> <span class="arch-rule-name svelte-d3ct2b"> </span></div>'),jv=$('<div class="arch-graph-wrap svelte-d3ct2b"><svg class="arch-svg svelte-d3ct2b"><defs class="svelte-d3ct2b"><marker id="arrow-block" markerWidth="8" markerHeight="8" refX="6" refY="3" orient="auto" class="svelte-d3ct2b"><path d="M0,0 L0,6 L8,3 z" fill="var(--error)" class="svelte-d3ct2b"></path></marker><marker id="arrow-warn" markerWidth="8" markerHeight="8" refX="6" refY="3" orient="auto" class="svelte-d3ct2b"><path d="M0,0 L0,6 L8,3 z" fill="#f59e0b" class="svelte-d3ct2b"></path></marker><marker id="arrow-allow" markerWidth="8" markerHeight="8" refX="6" refY="3" orient="auto" class="svelte-d3ct2b"><path d="M0,0 L0,6 L8,3 z" fill="var(--green)" class="svelte-d3ct2b"></path></marker></defs><!><!></svg> <div class="arch-legend svelte-d3ct2b"><div class="legend-item svelte-d3ct2b"><svg width="24" height="8" class="svelte-d3ct2b"><line x1="0" y1="4" x2="20" y2="4" stroke="var(--error)" stroke-width="1.5" marker-end="url(#arrow-block)" class="svelte-d3ct2b"></line></svg> Block</div> <div class="legend-item svelte-d3ct2b"><svg width="24" height="8" class="svelte-d3ct2b"><line x1="0" y1="4" x2="20" y2="4" stroke="#f59e0b" stroke-width="1.5" stroke-dasharray="4,3" class="svelte-d3ct2b"></line></svg> Warn</div> <div class="legend-item svelte-d3ct2b"><svg width="24" height="8" class="svelte-d3ct2b"><line x1="0" y1="4" x2="20" y2="4" stroke="var(--green)" stroke-width="1.5" stroke-dasharray="6,3" class="svelte-d3ct2b"></line></svg> Allow</div></div> <!> <div class="arch-rule-list svelte-d3ct2b"></div></div>'),Hv=$('<div class="section-header svelte-d3ct2b"><span class="section-title svelte-d3ct2b">Layer Graph</span> <span class="section-meta svelte-d3ct2b"> </span></div> <!>',1),Bv=$('<div class="log-row svelte-d3ct2b"><span class="log-label label-ok svelte-d3ct2b">[OK]</span> <span class="log-msg svelte-d3ct2b">No violations recorded yet. Violations from watch mode are logged here.</span></div>'),Wv=$('<span class="history-issue svelte-d3ct2b"> </span>'),Vv=$('<div class="history-violation svelte-d3ct2b"><span class="log-label label-error svelte-d3ct2b">[VIOLATION]</span> <span class="history-rule svelte-d3ct2b"> </span> <!></div>'),Uv=$('<div class="history-entry svelte-d3ct2b"><div class="history-header svelte-d3ct2b"><span class="history-file svelte-d3ct2b"> </span> <span class="history-time svelte-d3ct2b"> </span></div> <!></div>'),qv=$('<div class="history-list svelte-d3ct2b"></div>'),zv=$('<div class="section-header svelte-d3ct2b"><span class="section-title svelte-d3ct2b">Violation History</span> <span class="section-meta svelte-d3ct2b"> </span></div> <!>',1),Yv=$("<div> </div>"),Gv=$('<div class="modal-backdrop svelte-d3ct2b" role="presentation"><div class="modal svelte-d3ct2b"><div class="modal-header svelte-d3ct2b"><span class="modal-title svelte-d3ct2b">Settings</span> <button class="modal-close svelte-d3ct2b">✕</button></div> <section class="modal-section svelte-d3ct2b"><div class="modal-section-title svelte-d3ct2b">AI Model</div> <div class="modal-row svelte-d3ct2b"><label class="modal-label svelte-d3ct2b" for="model-provider">Provider</label> <select id="model-provider" class="modal-input svelte-d3ct2b"><option class="svelte-d3ct2b">Ollama (local)</option><option class="svelte-d3ct2b">OpenAI</option><option class="svelte-d3ct2b">Anthropic</option><option class="svelte-d3ct2b">MiniMax</option><option class="svelte-d3ct2b">OpenAI-compatible</option></select></div> <div class="modal-row svelte-d3ct2b"><label class="modal-label svelte-d3ct2b" for="model-name">Model</label> <input id="model-name" class="modal-input svelte-d3ct2b" placeholder="e.g. llama3.2, gpt-4o, claude-sonnet-4-6"/></div> <div class="modal-row svelte-d3ct2b"><div class="svelte-d3ct2b"></div> <div class="modal-row-actions svelte-d3ct2b"><button class="modal-btn modal-btn-primary svelte-d3ct2b"> </button> <button class="modal-btn svelte-d3ct2b">Refresh Config</button></div></div> <!></section> <section class="modal-section svelte-d3ct2b"><div class="modal-section-title svelte-d3ct2b">Current Status</div> <div class="modal-status-row svelte-d3ct2b"><span class="modal-status-label svelte-d3ct2b">Provider</span><span class="modal-status-val svelte-d3ct2b"> </span></div> <div class="modal-status-row svelte-d3ct2b"><span class="modal-status-label svelte-d3ct2b">Model</span><span class="modal-status-val svelte-d3ct2b"> </span></div> <div class="modal-status-row svelte-d3ct2b"><span class="modal-status-label svelte-d3ct2b">Embedding</span><span class="modal-status-val svelte-d3ct2b"> </span></div> <div class="modal-status-row svelte-d3ct2b"><span class="modal-status-label svelte-d3ct2b">AI calls this session</span><span class="modal-status-val svelte-d3ct2b"> </span></div> <div class="modal-status-row svelte-d3ct2b"><span class="modal-status-label svelte-d3ct2b">Total tokens</span><span class="modal-status-val svelte-d3ct2b"> </span></div> <div class="modal-status-row svelte-d3ct2b"><span class="modal-status-label svelte-d3ct2b">Input / Output</span><span class="modal-status-val svelte-d3ct2b"> </span></div></section></div></div>'),Kv=$('<div><header class="topbar svelte-d3ct2b"><div class="topbar-brand svelte-d3ct2b"><span class="brand-name svelte-d3ct2b">memory-core</span> <nav class="topbar-nav svelte-d3ct2b"><button>Dashboard</button> <button>Live Feed</button> <button>Metrics</button> <button>Arch Graph</button> <button>History <!></button></nav></div> <div class="topbar-search svelte-d3ct2b"><span class="search-icon svelte-d3ct2b">⌕</span> <input class="search-input svelte-d3ct2b" placeholder="Search system logs, traces, and metrics..." type="text"/></div> <div class="topbar-actions svelte-d3ct2b"><button class="icon-btn svelte-d3ct2b" title="Notifications"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" class="svelte-d3ct2b"><path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9" class="svelte-d3ct2b"></path><path d="M13.73 21a2 2 0 0 1-3.46 0" class="svelte-d3ct2b"></path></svg></button> <button><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" class="svelte-d3ct2b"><rect x="2" y="3" width="20" height="14" rx="2" class="svelte-d3ct2b"></rect><path d="m7 21 5-5 5 5" class="svelte-d3ct2b"></path><path d="m7 8 3 3-3 3" class="svelte-d3ct2b"></path><path d="M13 14h4" class="svelte-d3ct2b"></path></svg></button> <button class="icon-btn svelte-d3ct2b" title="Settings"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" class="svelte-d3ct2b"><circle cx="12" cy="12" r="3" class="svelte-d3ct2b"></circle><path d="M19.07 4.93a10 10 0 0 1 0 14.14M4.93 4.93a10 10 0 0 0 0 14.14" class="svelte-d3ct2b"></path><path d="M12 2v2M12 20v2M2 12h2M20 12h2" class="svelte-d3ct2b"></path></svg></button> <button class="icon-btn svelte-d3ct2b"><!></button> <div class="avatar svelte-d3ct2b" title="System Administrator">S</div></div></header> <div class="body svelte-d3ct2b"><aside class="sidebar svelte-d3ct2b"><div class="sidebar-logo svelte-d3ct2b"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" class="svelte-d3ct2b"><circle cx="12" cy="12" r="3" class="svelte-d3ct2b"></circle><path d="M12 1v4M12 19v4M4.22 4.22l2.83 2.83M16.95 16.95l2.83 2.83M1 12h4M19 12h4M4.22 19.78l2.83-2.83M16.95 7.05l2.83-2.83" class="svelte-d3ct2b"></path></svg></div> <nav class="sidebar-nav svelte-d3ct2b"><button class="side-btn side-btn-active svelte-d3ct2b" title="Live Feed"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" class="svelte-d3ct2b"><rect x="2" y="3" width="20" height="14" rx="2" class="svelte-d3ct2b"></rect><path d="m7 21 5-5 5 5" class="svelte-d3ct2b"></path><path d="m7 8 3 3-3 3" class="svelte-d3ct2b"></path><path d="M13 14h4" class="svelte-d3ct2b"></path></svg></button></nav> <div></div></aside> <main class="content svelte-d3ct2b"><div class="health-bar svelte-d3ct2b"><span class="health-label svelte-d3ct2b">System Health:</span> <div class="health-badge health-green svelte-d3ct2b"><i class="dot dot-green svelte-d3ct2b"></i> <span class="svelte-d3ct2b"> </span></div> <div><i></i> <span class="svelte-d3ct2b"> </span></div> <div><i></i> <span class="svelte-d3ct2b"> </span></div> <!> <!> <!> <!></div> <div class="filter-bar svelte-d3ct2b"><div class="filter-left svelte-d3ct2b"><div class="chip chip-primary svelte-d3ct2b"><span class="svelte-d3ct2b">LEVEL: ALL</span> <button class="chip-close svelte-d3ct2b" title="Clear cache">✕</button></div> <div class="service-dropdown-wrap svelte-d3ct2b"><button class="chip chip-outline svelte-d3ct2b"><span class="svelte-d3ct2b"> </span> <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><polyline points="6 9 12 15 18 9" class="svelte-d3ct2b"></polyline></svg></button> <!></div> <div class="divider-v svelte-d3ct2b"></div> <div class="metrics-strip svelte-d3ct2b"><div class="metric-item svelte-d3ct2b"><span class="metric-label svelte-d3ct2b">VIOLATIONS</span> <span> </span></div> <div class="metric-item svelte-d3ct2b"><span class="metric-label svelte-d3ct2b">FILES</span> <span class="metric-value svelte-d3ct2b"> </span></div> <div class="metric-item svelte-d3ct2b"><span class="metric-label svelte-d3ct2b">RULES</span> <span class="metric-value svelte-d3ct2b"> </span></div></div></div> <div class="filter-right svelte-d3ct2b"><div class="live-badge svelte-d3ct2b"><i></i> <span class="svelte-d3ct2b"> </span></div> <button><!></button> <button class="icon-btn svelte-d3ct2b" title="Download snapshot"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" class="svelte-d3ct2b"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" class="svelte-d3ct2b"></path><polyline points="7 10 12 15 17 10" class="svelte-d3ct2b"></polyline><line x1="12" y1="15" x2="12" y2="3" class="svelte-d3ct2b"></line></svg></button></div></div> <div class="feed-area svelte-d3ct2b"><!> <!> <!></div> <footer class="metrics-footer svelte-d3ct2b"><div class="footer-left svelte-d3ct2b"><div class="footer-metric svelte-d3ct2b"><span class="footer-label svelte-d3ct2b">Checks</span> <span class="footer-val svelte-d3ct2b"> </span> <span class="footer-unit svelte-d3ct2b">AI CALLS</span></div> <div class="footer-metric svelte-d3ct2b"><span class="footer-label svelte-d3ct2b">Tokens</span> <span class="footer-val svelte-d3ct2b"> </span> <span class="footer-unit svelte-d3ct2b"> </span></div> <div class="footer-metric svelte-d3ct2b"><span class="footer-label svelte-d3ct2b">Error Rate</span> <span class="footer-val footer-val-error svelte-d3ct2b"> </span></div> <div class="footer-metric svelte-d3ct2b"><span class="footer-label svelte-d3ct2b">Bypasses</span> <span> </span></div></div> <div class="footer-right svelte-d3ct2b"><div class="footer-actions svelte-d3ct2b"><button class="action-btn svelte-d3ct2b" title="Sync rules to all AI agent files"> </button> <button class="action-btn svelte-d3ct2b" title="Run full scan on all tracked files"> </button> <button class="action-btn action-btn-warn svelte-d3ct2b" title="Tune noisy rules"> </button></div> <div class="storage-bar-wrap svelte-d3ct2b"><div class="storage-bar svelte-d3ct2b"><div class="storage-fill svelte-d3ct2b"></div></div> <span class="footer-label svelte-d3ct2b"> </span></div></div></footer></main></div> <!></div>');function Xv(e,t){fl(t,!1);const r=P(),a=P(),n=P(),i=P(),v=P(),u=P(),d=P(),p=P(),m=P(),A=P(),x=P(),E=P(),w=P(),I=P(),S=P(),D=P(),se=P(),ne=P(),be=P(),Ge=P();let b=P({config:null,stats:{rules:{},files:{},topRules:[],topFiles:[]},files:[],memories:[]}),me=P([]),lt=P(!1),it=P("all"),De=P(""),Ct=P(!1),Ke=P(""),ue=P({type:"rule",scope:"project",content:"",reason:"",tags:"dashboard"}),Ie=P("live-feed"),qe=P("live-feed"),Oe=P(null),Tt=P(!1),Gt=P("core-engine"),He=P(!1),zs=P(""),Ms=P(!1),Lt=P({provider:"",model:""}),pr=P(!1),Kt=P(""),Xt=P("");const zl=24*60*60*1e3,Na=640,Da=380,jt=110,Ht=38;function hr(l){s(He)||k(me,[{...l,id:crypto.randomUUID()},...s(me)].slice(0,80))}function Ia(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==="log"?{type:"log",timestamp:l.timestamp,file:l.file,message:l.message}: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 _r(l){const _=s(b).files??[],T=_.findIndex(q=>q.file===l.file),L=_.slice();return T===-1?L.push(l):L[T]=l,L.sort((q,X)=>X.lastSeen.localeCompare(q.lastSeen))}function Yl(l){const _=s(b).watcher??{enabled:!0,running:!1,path:void 0,model:void 0,rules:void 0,lastEventAt:void 0,error:void 0};let T=s(b).files,L={..._,lastEventAt:l.timestamp,enabled:!0};l.type==="ready"&&(L={...L,running:!0,error:void 0,path:l.path,model:l.model,rules:l.rules}),l.type==="saved"&&(T=_r({file:l.file,status:"checking",lastSeen:l.timestamp,violations:[]})),l.type==="clean"&&(T=_r({file:l.file,status:"clean",lastSeen:l.timestamp,violations:[]})),l.type==="skipped"&&(T=_r({file:l.file,status:"skipped",lastSeen:l.timestamp,violations:[],message:l.reason})),l.type==="violations"&&(T=_r({file:l.file,status:"violations",lastSeen:l.timestamp,violations:l.violations})),l.type==="error"&&(L={...L,running:!1,error:l.message}),l.type==="stopped"&&(L={...L,running:!1});const q=[l,...s(b).events??[]].slice(0,100);k(b,{...s(b),files:T,events:q,watcher:L})}function Hr(l=[]){k(me,l.map(Ia).map(_=>({..._,id:crypto.randomUUID()})).reverse().slice(0,80))}function Fa(l){return new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date(l))}function Pa(l,_){const T=l.file||_;return l.line?`${T}:${l.line}`:T}function Gl(l){return l.type==="saved"?"SAVE":l.type==="clean"?"OK":l.type==="skipped"?"SKIP":l.type==="violations"?"FAIL":l.type==="log"?"CHCK":l.type==="error"?"WARN":"SYS"}function Kl(l){return l.type==="clean"?"label-ok":l.type==="violations"||l.type==="error"?"label-warn":l.type==="log"?"label-chck":l.type==="system"?"label-sys":"label-info"}async function Ys(){const l=await fetch(`/api/snapshot?t=${Date.now()}`,{cache:"no-store"});k(b,await l.json()),Hr(s(b).events)}async function Xl(){k(Ke,"");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 _=await l.json();_.snapshot?(k(b,_.snapshot),Hr(s(b).events)):await Ys()}catch(l){k(Ke,l.message)}}function Jl(){try{localStorage.clear(),sessionStorage.clear()}finally{location.reload()}}async function Ql(){if(!(!s(Lt).provider&&!s(Lt).model)){k(pr,!0),k(Kt,"");try{const l=await fetch("/api/config/model",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(s(Lt))});if(!l.ok)throw new Error((await l.json()).error??"Save failed");k(Kt,"✓ Model updated — takes effect immediately"),await Ys()}catch(l){k(Kt,`✗ ${l.message}`)}finally{k(pr,!1)}}}async function Br(l){k(Xt,l);try{await fetch(`/api/actions/${l}`,{method:"POST"}),hr({type:"system",timestamp:new Date().toISOString(),message:`Action started: memory-core ${l==="check-all"?"check --all":l}`})}catch{}finally{k(Xt,"")}}function $a(){const l=location.protocol==="https:"?"wss:":"ws:",_=new WebSocket(`${l}//${location.host}/ws`);_.addEventListener("open",()=>{k(lt,!0),hr({type:"system",timestamp:new Date().toISOString(),message:"Dashboard connected"})}),_.addEventListener("close",()=>{k(lt,!1),hr({type:"error",timestamp:new Date().toISOString(),message:"Dashboard disconnected"}),setTimeout($a,1500)}),_.addEventListener("message",T=>{const L=JSON.parse(T.data);if(L.type==="snapshot"){k(b,L.snapshot),s(me).length===0&&Hr(s(b).events);return}if(L.type==="stats"){k(b,{...s(b),stats:L.stats});return}L.type==="watch"&&(Yl(L.event),hr(Ia(L.event)))})}async function Zl(){if(s(ue).content.trim()){k(Ct,!0),k(Ke,"");try{const l=await fetch("/api/memories",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(s(ue))});if(!l.ok)throw new Error((await l.json()).error??"Save failed");k(ue,{type:"rule",scope:"project",content:"",reason:"",tags:"dashboard"}),await Ys()}catch(l){k(Ke,l.message)}finally{k(Ct,!1)}}}async function ei(l){k(Ke,"");const _=await fetch(`/api/memories/${l}`,{method:"DELETE"});if(!_.ok){k(Ke,(await _.json()).error??"Delete failed");return}await Ys()}function ja(l){k(Gt,l),k(Tt,!1),l==="commit-hook"?k(Ie,"commit-hook"):k(Ie,"live-feed")}function ti(){k(Ie,s(Ie)==="commit-hook"?"live-feed":"commit-hook"),k(Gt,s(Ie)==="commit-hook"?"commit-hook":"core-engine")}function si(l){s(Tt)&&(l.target.closest(".service-dropdown-wrap")||k(Tt,!1))}let As=P(localStorage.getItem("mc-theme")==="dark"||!localStorage.getItem("mc-theme")&&window.matchMedia("(prefers-color-scheme: dark)").matches);function ri(){k(As,!s(As)),localStorage.setItem("mc-theme",s(As)?"dark":"light")}Ys().catch(l=>{k(Ke,l.message)}),$a(),Me(()=>(s(b),s(it),s(De)),()=>{k(r,s(b).memories.filter(l=>{const _=s(it)==="all"||l.type===s(it),T=`${l.type} ${l.scope} ${l.content} ${l.reason??""} ${l.tags.join(" ")}`.toLowerCase();return _&&T.includes(s(De).toLowerCase())}))}),Me(()=>s(b),()=>{k(a,s(b).files.reduce((l,_)=>l+_.violations.length,0))}),Me(()=>s(b),()=>{k(n,s(b).files.filter(l=>l.status==="clean").length)}),Me(()=>s(b),()=>{k(i,Object.values(s(b).stats.rules).reduce((l,_)=>l+_,0))}),Me(()=>s(b),()=>{k(v,s(b).stats.recentViolations??[])}),Me(()=>s(v),()=>{k(u,s(v).filter(l=>{if(!(l.source==="hook"||l.source==="ci"))return!1;const _=Date.parse(l.timestamp);return Number.isNaN(_)?!1:Date.now()-_<=zl}))}),Me(()=>s(a),()=>{k(d,s(a))}),Me(()=>s(b),()=>{k(p,s(b).files.filter(l=>l.status!=="checking").length)}),Me(()=>s(b),()=>{k(m,s(b).memories.filter(l=>["rule","pattern","decision"].includes(l.type)).length)}),Me(()=>s(b),()=>{var l;k(A,((l=s(b).memoryCount)==null?void 0:l.total)??s(b).memories.length)}),Me(()=>(s(lt),s(b)),()=>{var l,_;k(x,s(lt)?((l=s(b).watcher)==null?void 0:l.enabled)===!1?{live:!1,label:"Watch off"}:(_=s(b).watcher)!=null&&_.running?{live:!0,label:"Watcher live"}:{live:!1,label:"Watcher idle"}:{live:!1,label:"Disconnected"})}),Me(()=>s(b),()=>{var l;k(E,((l=s(b).arch)==null?void 0:l.layers)??[])}),Me(()=>s(b),()=>{var l;k(w,((l=s(b).arch)==null?void 0:l.rules)??[])}),Me(()=>s(E),()=>{k(I,(()=>{const l=s(E);if(l.length===0)return[];const _=["api","application","domain","infrastructure","shared"],T=[...l].sort((J,O)=>{const g=_.indexOf(J.name)===-1?99:_.indexOf(J.name),j=_.indexOf(O.name)===-1?99:_.indexOf(O.name);return g-j}),L=Math.min(T.length,3),q=Math.ceil(T.length/L),X=(Na-L*jt)/(L+1),ee=(Da-q*Ht)/(q+1);return T.map((J,O)=>{const g=O%L,j=Math.floor(O/L);return{name:J.name,description:J.description,x:X+g*(jt+X),y:ee+j*(Ht+ee)}})})())}),Me(()=>(s(I),s(w)),()=>{k(S,(()=>{const l=new Map(s(I).map(_=>[_.name,_]));return s(w).filter(_=>_.fromLayer!=="*"&&_.toLayer!=="*").map(_=>{const T=l.get(_.fromLayer),L=l.get(_.toLayer);if(!T||!L)return null;const q=T.x+jt/2,X=T.y+Ht/2,ee=L.x+jt/2,J=L.y+Ht/2,O=ee-q,g=J-X,j=Math.sqrt(O*O+g*g)||1,V=q+O/j*(jt/2+4),U=X+g/j*(Ht/2+4),Le=ee-O/j*(jt/2+4),Be=J-g/j*(Ht/2+4);return{r:_,sx:V,sy:U,ex:Le,ey:Be}}).filter(Boolean)})())}),Me(()=>s(b),()=>{var l;k(D,((l=s(b).runtime)==null?void 0:l.postgres.connected)??!1)}),Me(()=>s(b),()=>{var l;k(se,((l=s(b).runtime)==null?void 0:l.model.ollamaReachable)??!1)}),Me(()=>s(b),()=>{var l,_;k(ne,(((l=s(b).runtime)==null?void 0:l.model.checkModelResolved)??((_=s(b).runtime)==null?void 0:_.model.chatModel)??"unknown").toUpperCase())}),Me(()=>s(b),()=>{var l,_;k(be,((l=s(b).runtime)==null?void 0:l.project.backendArchitecture)==="custom"||((_=s(b).runtime)==null?void 0:_.project.frontendFramework)==="custom")}),Me(()=>s(b),()=>{k(Ge,(()=>{var L,q;const l=(L=s(b).runtime)==null?void 0:L.project.backendArchitecture,_=(q=s(b).runtime)==null?void 0:q.project.frontendFramework,T=[l?l==="custom"?"Custom":l:null,_?_==="custom"?"Custom":_:null].filter(Boolean);return T.length>0?T.join(" / "):null})())}),xc(),ev();var Wr=Kv();te("click",ha,si);let Ha;var Ba=c(Wr),Wa=c(Ba),ai=f(c(Wa),2),Vr=c(ai);let Va;var Ur=f(Vr,2);let Ua;var qr=f(Ur,2);let qa;var zr=f(qr,2);let za;var Yr=f(zr,2);let Ya;var ni=f(c(Yr));{var li=l=>{var _=sv(),T=c(_);W(()=>M(T,(s(b),h(()=>{var L;return(L=s(b).violationHistory)==null?void 0:L.length})))),C(l,_)};G(ni,l=>{s(b),h(()=>{var _;return(((_=s(b).violationHistory)==null?void 0:_.length)??0)>0})&&l(li)})}var Ga=f(Wa,2),ii=f(c(Ga),2),oi=f(Ga,2),br=f(c(oi),2);let Ka;var Xa=f(br,2),Gr=f(Xa,2),ci=c(Gr);{var vi=l=>{var _=rv();C(l,_)},di=l=>{var _=av();C(l,_)};G(ci,l=>{s(As)?l(vi):l(di,-1)})}var Ja=f(Ba,2),Qa=c(Ja),Za=f(c(Qa),4);let en;var fi=f(Qa,2),tn=c(fi),sn=f(c(tn),2),ui=f(c(sn),2),pi=c(ui),Kr=f(sn,2);let rn;var an=c(Kr);let nn;var hi=f(an,2),_i=c(hi),Xr=f(Kr,2);let ln;var on=c(Xr);let cn;var bi=f(on,2),mi=c(bi),vn=f(Xr,2);{var gi=l=>{var _=nv(),T=f(c(_),2),L=c(T);W(()=>M(L,`${s(b),h(()=>{var q;return(q=s(b).arch)==null?void 0:q.pendingRules})??""} PENDING RULES`)),C(l,_)};G(vn,l=>{s(b),h(()=>{var _;return(((_=s(b).arch)==null?void 0:_.pendingRules)??0)>0})&&l(gi)})}var dn=f(vn,2);{var wi=l=>{var _=lv();let T;var L=c(_);let q;var X=f(L,2),ee=c(X);W(J=>{T=ae(_,1,"health-badge svelte-d3ct2b",null,T,{"health-warn":s(be),"health-green":!s(be)}),q=ae(L,1,"dot svelte-d3ct2b",null,q,{"dot-warn":s(be),"dot-green":!s(be)}),M(ee,`ARCH: ${J??""}${s(be)?" — ADD RULES":""}`)},[()=>(s(Ge),h(()=>s(Ge).toUpperCase()))]),C(l,_)};G(dn,l=>{s(Ge)&&l(wi)})}var fn=f(dn,2);{var yi=l=>{var _=iv(),T=c(_);W(()=>M(T,(s(b),h(()=>s(b).dbError)))),C(l,_)};G(fn,l=>{s(b),h(()=>s(b).dbError)&&l(yi)})}var ki=f(fn,2);{var xi=l=>{var _=ov(),T=c(_);W(()=>M(T,s(Ke))),C(l,_)};G(ki,l=>{s(Ke)&&l(xi)})}var un=f(tn,2),pn=c(un),hn=c(pn),Ei=f(c(hn),2),_n=f(hn,2),Jr=c(_n),bn=c(Jr),Si=c(bn),Mi=f(bn,2);let mn;var Ai=f(Jr,2);{var Ci=l=>{var _=vv(),T=c(_);let L;var q=f(T,2);let X;var ee=f(c(q),2);{var J=O=>{var g=cv(),j=c(g);W(()=>M(j,(s(u),h(()=>s(u).length)))),C(O,g)};G(ee,O=>{s(u),h(()=>s(u).length>0)&&O(J)})}W(()=>{L=ae(T,1,"dropdown-item svelte-d3ct2b",null,L,{"dropdown-item-active":s(Gt)==="core-engine"}),X=ae(q,1,"dropdown-item svelte-d3ct2b",null,X,{"dropdown-item-active":s(Gt)==="commit-hook"})}),te("click",T,()=>ja("core-engine")),te("click",q,()=>ja("commit-hook")),C(l,_)};G(Ai,l=>{s(Tt)&&l(Ci)})}var Ti=f(_n,4),gn=c(Ti),wn=f(c(gn),2);let yn;var Li=c(wn),kn=f(gn,2),Oi=f(c(kn),2),Ri=c(Oi),Ni=f(kn,2),Di=f(c(Ni),2),Ii=c(Di),Fi=f(pn,2),xn=c(Fi),En=c(xn);let Sn;var Pi=f(En,2),$i=c(Pi),Gs=f(xn,2);let Mn;var ji=c(Gs);{var Hi=l=>{var _=dv();C(l,_)},Bi=l=>{var _=fv();C(l,_)};G(ji,l=>{s(He)?l(Hi):l(Bi,-1)})}var Wi=f(Gs,2),An=f(un,2),Cn=c(An);{var Vi=l=>{var _=Cs(),T=Ve(_);{var L=X=>{var ee=hv(),J=f(Ve(ee),4);{var O=j=>{var V=uv();C(j,V)},g=j=>{var V=pv();C(j,V)};G(J,j=>{s(be)?j(O):j(g,-1)})}C(X,ee)},q=X=>{var ee=Cs(),J=Ve(ee);vt(J,1,()=>(s(me),h(()=>[...s(me)].reverse())),O=>O.id,(O,g)=>{var j=gv(),V=Ve(j);let U;var Le=c(V),Be=c(Le),We=f(Le,2),ke=c(We),y=f(We,2),le=c(y);{var ce=N=>{var F=Rt();W(()=>M(F,(s(g),h(()=>s(g).message)))),C(N,F)},Q=N=>{var F=Rt();W(()=>M(F,`saved: ${s(g),h(()=>s(g).file)??""}`)),C(N,F)},ve=N=>{var F=Rt();W(()=>M(F,`${s(g),h(()=>s(g).file)??""} — no violations`)),C(N,F)},ge=N=>{var F=Rt();W(()=>M(F,`${s(g),h(()=>s(g).file)??""} — skipped: ${s(g),h(()=>s(g).reason)??""}`)),C(N,F)},xe=N=>{var F=Rt();W(()=>M(F,`${s(g),h(()=>s(g).file)??""} — ${s(g),h(()=>s(g).message)??""}`)),C(N,F)},Re=N=>{var F=Rt();W(()=>M(F,`${s(g),h(()=>s(g).violations.length)??""} violation${s(g),h(()=>s(g).violations.length===1?"":"s")??""} in ${s(g),h(()=>s(g).file)??""}`)),C(N,F)};G(le,N=>{s(g),h(()=>s(g).type==="system"||s(g).type==="error")?N(ce):(s(g),h(()=>s(g).type==="saved")?N(Q,1):(s(g),h(()=>s(g).type==="clean")?N(ve,2):(s(g),h(()=>s(g).type==="skipped")?N(ge,3):(s(g),h(()=>s(g).type==="log")?N(xe,4):N(Re,-1)))))})}var re=f(y,2),fe=f(V,2);{var Fe=N=>{var F=Cs(),Pe=Ve(F);vt(Pe,3,()=>(s(g),h(()=>s(g).violations)),(Z,H)=>`${s(g).id}-${H}`,(Z,H,pe)=>{var Se=mv(),et=c(Se),ot=c(et),ie=f(et,2),Xe=c(ie),Bt=c(Xe),Ot=f(Xe,2);{var oe=tt=>{var Jt=_v(),Zr=f(Ve(Jt)),ea=c(Zr);W(()=>M(ea,(s(H),h(()=>s(H).rule)))),C(tt,Jt)};G(Ot,tt=>{s(H),h(()=>s(H).rule)&&tt(oe)})}var Ee=f(Ot,2);{var ct=tt=>{var Jt=Rt();W(()=>M(Jt,`— ${s(H),h(()=>s(H).issue)??""}`)),C(tt,Jt)};G(Ee,tt=>{s(H),h(()=>s(H).issue)&&tt(ct)})}var he=f(Ee,2);{var yt=tt=>{var Jt=bv(),Zr=f(Ve(Jt)),ea=c(Zr);W(()=>M(ea,`→ ${s(H),h(()=>s(H).suggestion)??""}`)),C(tt,Jt)};G(he,tt=>{s(H),h(()=>s(H).suggestion)&&tt(yt)})}W(tt=>{M(ot,`[${s(pe)+1}]`),M(Bt,tt)},[()=>(s(H),s(g),h(()=>Pa(s(H),s(g).file)))]),C(Z,Se)}),C(N,F)};G(fe,N=>{s(g),h(()=>s(g).type==="violations")&&N(Fe)})}W((N,F,Pe)=>{U=ae(V,1,"log-row svelte-d3ct2b",null,U,{"log-row-warn":s(g).type==="error","log-row-ok":s(g).type==="clean","log-row-fail":s(g).type==="violations"}),M(Be,N),ae(We,1,`log-label ${F??""}`,"svelte-d3ct2b"),M(ke,`[${Pe??""}]`)},[()=>(s(g),h(()=>Fa(s(g).timestamp))),()=>(s(g),h(()=>Kl(s(g)))),()=>(s(g),h(()=>Gl(s(g))))]),te("click",re,()=>{var F;const N=s(g).type==="system"||s(g).type==="error"?s(g).message:s(g).type==="saved"?`saved: ${s(g).file}`:s(g).file;(F=navigator.clipboard)==null||F.writeText(N)}),C(O,j)}),C(X,ee)};G(T,X=>{s(me),h(()=>s(me).length===0)?X(L):X(q,-1)})}C(l,_)},Ui=l=>{var _=Ev(),T=Ve(_),L=f(c(T),2),q=c(L),X=f(T,2);{var ee=O=>{var g=wv();C(O,g)},J=O=>{var g=Cs(),j=Ve(g);vt(j,3,()=>(s(u),h(()=>s(u).slice(0,20))),(V,U)=>`${V.timestamp}-${U}`,(V,U)=>{var Le=xv(),Be=Ve(Le),We=c(Be),ke=c(We),y=f(We,2),le=c(y),ce=f(y,2),Q=c(ce),ve=c(Q),ge=f(Q,2);{var xe=fe=>{var Fe=Rt();W(N=>M(Fe,`— ${N??""}`),[()=>(s(U),h(()=>Pa(s(U),s(U).file)))]),C(fe,Fe)};G(ge,fe=>{s(U),h(()=>s(U).file)&&fe(xe)})}var Re=f(Be,2);{var re=fe=>{var Fe=kv(),N=f(c(Fe),2),F=c(N);{var Pe=pe=>{var Se=Rt();W(()=>M(Se,(s(U),h(()=>s(U).issue)))),C(pe,Se)};G(F,pe=>{s(U),h(()=>s(U).issue)&&pe(Pe)})}var Z=f(F,2);{var H=pe=>{var Se=yv(),et=f(Ve(Se)),ot=c(et);W(()=>M(ot,`→ ${s(U),h(()=>s(U).suggestion)??""}`)),C(pe,Se)};G(Z,pe=>{s(U),h(()=>s(U).suggestion)&&pe(H)})}C(fe,Fe)};G(Re,fe=>{s(U),h(()=>s(U).issue||s(U).suggestion)&&fe(re)})}W(fe=>{M(ke,fe),M(le,`[${s(U),h(()=>s(U).source==="ci"?"CI":"HOOK")??""}]`),M(ve,(s(U),h(()=>s(U).rule)))},[()=>(s(U),h(()=>Fa(s(U).timestamp)))]),C(V,Le)}),C(O,g)};G(X,O=>{s(u),h(()=>s(u).length===0)?O(ee):O(J,-1)})}W(()=>M(q,`${s(u),h(()=>s(u).length)??""} violation${s(u),h(()=>s(u).length===1?"":"s")??""} in last 24h`)),C(l,_)},qi=l=>{var _=Tv(),T=Ve(_),L=f(c(T),2),q=c(L),X=f(T,2),ee=c(X),J=c(ee);J.value=J.__value="all";var O=f(J);O.value=O.__value="rule";var g=f(O);g.value=g.__value="decision";var j=f(g);j.value=j.__value="pattern";var V=f(j);V.value=V.__value="ignore";var U=f(ee,2),Le=f(X,2),Be=c(Le),We=c(Be),ke=c(We),y=c(ke);y.value=y.__value="rule";var le=f(y);le.value=le.__value="decision";var ce=f(le);ce.value=ce.__value="pattern";var Q=f(ce);Q.value=Q.__value="ignore";var ve=f(ke,2),ge=c(ve);ge.value=ge.__value="project";var xe=f(ge);xe.value=xe.__value="global";var Re=f(ve,2),re=f(Re,2),fe=f(We,2),Fe=c(fe),N=f(Fe,2),F=c(N),Pe=f(Le,2);vt(Pe,5,()=>s(r),Z=>Z.id,(Z,H)=>{var pe=Mv(),Se=c(pe),et=c(Se),ot=f(Se,2),ie=c(ot),Xe=f(ot,2),Bt=c(Xe),Ot=f(Xe,2);{var oe=ct=>{var he=Sv(),yt=c(he);W(()=>M(yt,(s(H),h(()=>s(H).reason)))),C(ct,he)};G(Ot,ct=>{s(H),h(()=>s(H).reason)&&ct(oe)})}var Ee=f(Ot,2);W(()=>{M(et,(s(H),h(()=>s(H).type))),M(ie,(s(H),h(()=>s(H).scope))),M(Bt,(s(H),h(()=>s(H).content)))}),te("click",Ee,()=>ei(s(H).id)),C(Z,pe)},Z=>{var H=Cv(),pe=c(H),Se=c(pe);{var et=ie=>{var Xe=Av();C(ie,Xe)},ot=ie=>{var Xe=Rt("No rules match the current filters.");C(ie,Xe)};G(Se,ie=>{s(be)&&s(m)===0?ie(et):ie(ot,-1)})}C(Z,H)}),W(Z=>{M(q,`${s(m)??""} rules active`),N.disabled=Z,M(F,s(Ct)?"Saving…":"+ Add Rule")},[()=>(s(Ct),s(ue),h(()=>s(Ct)||!s(ue).content.trim()))]),kr(ee,()=>s(it),Z=>k(it,Z)),Ts(U,()=>s(De),Z=>k(De,Z)),kr(ke,()=>s(ue).type,Z=>cs(ue,s(ue).type=Z)),kr(ve,()=>s(ue).scope,Z=>cs(ue,s(ue).scope=Z)),Ts(Re,()=>s(ue).reason,Z=>cs(ue,s(ue).reason=Z)),Ts(re,()=>s(ue).tags,Z=>cs(ue,s(ue).tags=Z)),Ts(Fe,()=>s(ue).content,Z=>cs(ue,s(ue).content=Z)),te("submit",Be,Zc(Zl)),C(l,_)};G(Cn,l=>{s(Ie)==="live-feed"?l(Vi):s(Ie)==="commit-hook"?l(Ui,1):s(Ie)==="rules"&&l(qi,2)})}var Tn=f(Cn,2);{var zi=l=>{var _=Hv(),T=Ve(_),L=f(c(T),2),q=c(L),X=f(T,2);{var ee=O=>{var g=Lv();C(O,g)},J=O=>{var g=jv(),j=c(g);_e(j,"width",Na),_e(j,"height",Da);var V=f(c(j));vt(V,1,()=>s(S),Zt,(ke,y)=>{var le=Cs(),ce=Ve(le);{var Q=ve=>{const ge=Os(()=>(s(y),h(()=>s(y).r.allowed?"var(--green)":s(y).r.enforcement==="warn"?"#f59e0b":"var(--error)"))),xe=Os(()=>(s(y),h(()=>s(y).r.allowed?"arrow-allow":s(y).r.enforcement==="warn"?"arrow-warn":"arrow-block"))),Re=Os(()=>(s(y),h(()=>s(y).r.allowed?"6,3":s(y).r.enforcement==="warn"?"4,3":"none")));var re=Ov();W(()=>{_e(re,"x1",(s(y),h(()=>s(y).sx))),_e(re,"y1",(s(y),h(()=>s(y).sy))),_e(re,"x2",(s(y),h(()=>s(y).ex))),_e(re,"y2",(s(y),h(()=>s(y).ey))),_e(re,"stroke",s(ge)),_e(re,"stroke-dasharray",s(Re)),_e(re,"marker-end",`url(#${s(xe)??""})`)}),C(ve,re)};G(ce,ve=>{s(y)&&ve(Q)})}C(ke,le)});var U=f(V);vt(U,1,()=>s(I),Zt,(ke,y)=>{var le=Rv();let ce;var Q=c(le);_e(Q,"width",jt),_e(Q,"height",Ht);var ve=f(Q),ge=c(ve),xe=f(ve),Re=c(xe);W(re=>{ce=ae(le,0,"arch-node arch-node-clickable svelte-d3ct2b",null,ce,{"arch-node-selected":s(Oe)===s(y).name}),_e(le,"aria-label",`Show files in ${s(y),h(()=>s(y).name)??""} layer`),_e(Q,"x",(s(y),h(()=>s(y).x))),_e(Q,"y",(s(y),h(()=>s(y).y))),ae(Q,0,`arch-node-rect arch-node-${s(y),h(()=>s(y).name)??""}`,"svelte-d3ct2b"),_e(Q,"stroke-width",(s(Oe),s(y),h(()=>s(Oe)===s(y).name?2.5:1.5))),_e(ve,"x",(s(y),h(()=>s(y).x+jt/2))),_e(ve,"y",(s(y),h(()=>s(y).y+Ht/2-5))),M(ge,(s(y),h(()=>s(y).name))),_e(xe,"x",(s(y),h(()=>s(y).x+jt/2))),_e(xe,"y",(s(y),h(()=>s(y).y+Ht/2+9))),M(Re,re)},[()=>(s(y),h(()=>s(y).description.length>18?s(y).description.slice(0,16)+"…":s(y).description))]),te("click",le,()=>{k(Oe,s(Oe)===s(y).name?null:s(y).name)}),te("keydown",le,re=>{(re.key==="Enter"||re.key===" ")&&k(Oe,s(Oe)===s(y).name?null:s(y).name)}),C(ke,le)});var Le=f(j,4);{var Be=ke=>{const y=Os(()=>(s(E),s(Oe),h(()=>s(E).find(N=>N.name===s(Oe)))));var le=Pv(),ce=c(le),Q=c(ce),ve=c(Q),ge=f(Q,2),xe=c(ge),Re=f(ge,2),re=f(ce,2);{var fe=N=>{var F=Dv(),Pe=f(c(F),2);vt(Pe,1,()=>(Lr(s(y)),h(()=>s(y).paths)),Zt,(Z,H)=>{var pe=Nv(),Se=c(pe);W(()=>M(Se,s(H))),C(Z,pe)}),C(N,F)};G(re,N=>{Lr(s(y)),h(()=>{var F,Pe;return(Pe=(F=s(y))==null?void 0:F.paths)==null?void 0:Pe.length})&&N(fe)})}var Fe=f(re,2);vt(Fe,1,()=>(s(w),s(Oe),h(()=>[s(w).filter(N=>N.fromLayer===s(Oe)||N.toLayer===s(Oe))])),Zt,(N,F)=>{var Pe=Cs(),Z=Ve(Pe);{var H=pe=>{var Se=Fv(),et=f(c(Se),2);vt(et,1,()=>s(F),Zt,(ot,ie)=>{var Xe=Iv(),Bt=c(Xe);let Ot;var oe=c(Bt),Ee=f(Bt,2),ct=c(Ee);W(he=>{Ot=ae(Bt,1,"arch-rule-badge svelte-d3ct2b",null,Ot,{"badge-block":!s(ie).allowed&&s(ie).enforcement==="block","badge-warn":!s(ie).allowed&&s(ie).enforcement==="warn","badge-allow":s(ie).allowed}),M(oe,he),M(ct,`${s(ie),h(()=>s(ie).fromLayer)??""} → ${s(ie),h(()=>s(ie).toLayer)??""} — ${s(ie),h(()=>s(ie).name)??""}`)},[()=>(s(ie),h(()=>s(ie).enforcement.toUpperCase()))]),C(ot,Xe)}),C(pe,Se)};G(Z,pe=>{s(F),h(()=>s(F).length)&&pe(H)})}C(N,Pe)}),W(()=>{M(ve,s(Oe)),M(xe,(Lr(s(y)),h(()=>{var N;return((N=s(y))==null?void 0:N.description)??""})))}),te("click",Re,()=>k(Oe,null)),C(ke,le)};G(Le,ke=>{s(Oe)&&ke(Be)})}var We=f(Le,2);vt(We,5,()=>s(w),Zt,(ke,y)=>{var le=$v(),ce=c(le);let Q;var ve=c(ce),ge=f(ce,2),xe=c(ge),Re=f(ge,2),re=c(Re);W(fe=>{Q=ae(ce,1,"arch-rule-badge svelte-d3ct2b",null,Q,{"badge-block":!s(y).allowed&&s(y).enforcement==="block","badge-warn":!s(y).allowed&&s(y).enforcement==="warn","badge-allow":s(y).allowed}),M(ve,fe),M(xe,`${s(y),h(()=>s(y).fromLayer)??""} → ${s(y),h(()=>s(y).toLayer)??""}`),M(re,(s(y),h(()=>s(y).name)))},[()=>(s(y),h(()=>s(y).enforcement.toUpperCase()))]),C(ke,le)}),C(O,g)};G(X,O=>{s(E),h(()=>s(E).length===0)?O(ee):O(J,-1)})}W(()=>M(q,`${s(E),h(()=>s(E).length)??""} layers · ${s(w),h(()=>s(w).length)??""} rules`)),C(l,_)};G(Tn,l=>{s(qe)==="arch-graph"&&l(zi)})}var Yi=f(Tn,2);{var Gi=l=>{var _=zv(),T=Ve(_),L=f(c(T),2),q=c(L),X=f(T,2);{var ee=O=>{var g=Bv();C(O,g)},J=O=>{var g=qv();vt(g,5,()=>(s(b),h(()=>s(b).violationHistory??[])),Zt,(j,V)=>{var U=Uv(),Le=c(U),Be=c(Le),We=c(Be),ke=f(Be,2),y=c(ke),le=f(Le,2);vt(le,1,()=>(s(V),h(()=>s(V).violations)),Zt,(ce,Q)=>{var ve=Vv(),ge=f(c(ve),2),xe=c(ge),Re=f(ge,2);{var re=fe=>{var Fe=Wv(),N=c(Fe);W(()=>M(N,`— ${s(Q),h(()=>s(Q).issue)??""}`)),C(fe,Fe)};G(Re,fe=>{s(Q),h(()=>s(Q).issue)&&fe(re)})}W(()=>M(xe,(s(Q),h(()=>s(Q).rule)))),C(ce,ve)}),W(ce=>{M(We,(s(V),h(()=>s(V).file))),M(y,ce)},[()=>(s(V),h(()=>new Date(s(V).timestamp).toLocaleString()))]),C(j,U)}),C(O,g)};G(X,O=>{s(b),h(()=>{var g;return!((g=s(b).violationHistory)!=null&&g.length)})?O(ee):O(J,-1)})}W(()=>M(q,`${s(b),h(()=>{var O;return((O=s(b).violationHistory)==null?void 0:O.length)??0})??""} entries (last 200)`)),C(l,_)};G(Yi,l=>{s(qe)==="history"&&l(Gi)})}var Ki=f(An,2),Ln=c(Ki),On=c(Ln),Xi=f(c(On),2),Ji=c(Xi),Rn=f(On,2),Nn=f(c(Rn),2),Qi=c(Nn),Zi=f(Nn,2),eo=c(Zi),Dn=f(Rn,2),to=f(c(Dn),2),so=c(to),ro=f(Dn,2),In=f(c(ro),2);let Fn;var ao=c(In),no=f(Ln,2),Pn=c(no),mr=c(Pn),lo=c(mr),gr=f(mr,2),io=c(gr),Qr=f(gr,2),oo=c(Qr),co=f(Pn,2),$n=c(co),vo=c($n),fo=f($n,2),uo=c(fo),po=f(Ja,2);{var ho=l=>{var _=Gv(),T=c(_),L=c(T),q=f(c(L),2),X=f(L,2),ee=f(c(X),2),J=f(c(ee),2),O=c(J);O.value=O.__value="ollama";var g=f(O);g.value=g.__value="openai";var j=f(g);j.value=j.__value="anthropic";var V=f(j);V.value=V.__value="minimax";var U=f(V);U.value=U.__value="openai-compatible";var Le=f(ee,2),Be=f(c(Le),2),We=f(Le,2),ke=f(c(We),2),y=c(ke),le=c(y),ce=f(y,2),Q=f(We,2);{var ve=oe=>{var Ee=Yv();let ct;var he=c(Ee);W(yt=>{ct=ae(Ee,1,"modal-msg svelte-d3ct2b",null,ct,yt),M(he,s(Kt))},[()=>({"modal-msg-ok":s(Kt).startsWith("✓"),"modal-msg-err":s(Kt).startsWith("✗")})]),C(oe,Ee)};G(Q,oe=>{s(Kt)&&oe(ve)})}var ge=f(X,2),xe=f(c(ge),2),Re=f(c(xe)),re=c(Re),fe=f(xe,2),Fe=f(c(fe)),N=c(Fe),F=f(fe,2),Pe=f(c(F)),Z=c(Pe),H=f(F,2),pe=f(c(H)),Se=c(pe),et=f(H,2),ot=f(c(et)),ie=c(ot),Xe=f(et,2),Bt=f(c(Xe)),Ot=c(Bt);W((oe,Ee,ct)=>{y.disabled=s(pr),M(le,s(pr)?"Saving…":"Apply"),M(re,(s(b),h(()=>{var he;return((he=s(b).runtime)==null?void 0:he.model.provider)??"—"}))),M(N,(s(b),h(()=>{var he,yt;return((he=s(b).runtime)==null?void 0:he.model.checkModelResolved)??((yt=s(b).runtime)==null?void 0:yt.model.chatModel)??"—"}))),M(Z,(s(b),h(()=>{var he,yt;return((he=s(b).runtime)==null?void 0:he.model.embeddingModelResolved)??((yt=s(b).runtime)==null?void 0:yt.model.embeddingModel)??"—"}))),M(Se,(s(b),h(()=>{var he;return((he=s(b).stats.tokens)==null?void 0:he.calls)??0}))),M(ie,`${oe??""} ${s(b),h(()=>{var he;return((he=s(b).runtime)==null?void 0:he.model.provider)==="ollama"?"(local — free)":""})??""}`),M(Ot,`${Ee??""} in / ${ct??""} out`)},[()=>(s(b),h(()=>{var oe,Ee;return((Ee=(oe=s(b).stats.tokens)==null?void 0:oe.totalTokens)==null?void 0:Ee.toLocaleString())??"0"})),()=>(s(b),h(()=>{var oe,Ee;return((Ee=(oe=s(b).stats.tokens)==null?void 0:oe.inputTokens)==null?void 0:Ee.toLocaleString())??"0"})),()=>(s(b),h(()=>{var oe,Ee;return((Ee=(oe=s(b).stats.tokens)==null?void 0:oe.outputTokens)==null?void 0:Ee.toLocaleString())??"0"}))]),te("click",q,()=>k(Ms,!1)),kr(J,()=>s(Lt).provider,oe=>cs(Lt,s(Lt).provider=oe)),Ts(Be,()=>s(Lt).model,oe=>cs(Lt,s(Lt).model=oe)),te("click",y,Ql),te("click",ce,Xl),te("click",_,el(()=>k(Ms,!1))),te("keydown",_,el(oe=>{oe.key==="Escape"&&k(Ms,!1)})),C(l,_)};G(po,l=>{s(Ms)&&l(ho)})}W((l,_,T,L,q,X)=>{var ee,J,O,g,j;Ha=ae(Wr,1,"shell svelte-d3ct2b",null,Ha,{dark:s(As)}),Va=ae(Vr,1,"tab-btn svelte-d3ct2b",null,Va,{"tab-active":s(qe)==="dashboard"}),Ua=ae(Ur,1,"tab-btn svelte-d3ct2b",null,Ua,{"tab-active":s(qe)==="live-feed"}),qa=ae(qr,1,"tab-btn svelte-d3ct2b",null,qa,{"tab-active":s(qe)==="metrics"}),za=ae(zr,1,"tab-btn svelte-d3ct2b",null,za,{"tab-active":s(qe)==="arch-graph"}),Ya=ae(Yr,1,"tab-btn svelte-d3ct2b",null,Ya,{"tab-active":s(qe)==="history"}),Ka=ae(br,1,"icon-btn svelte-d3ct2b",null,Ka,{"icon-btn-active":s(Ie)==="commit-hook"}),_e(br,"title",s(Ie)==="commit-hook"?"Switch to Live Feed":"Switch to Commit Hook"),_e(Gr,"title",s(As)?"Switch to light mode":"Switch to dark mode"),en=ae(Za,1,"sidebar-footer-dot svelte-d3ct2b",null,en,{"dot-live":s(x).live}),_e(Za,"title",(s(x),h(()=>s(x).label))),M(pi,`CORE ${s(x),h(()=>s(x).live?"LIVE":"IDLE")??""}`),rn=ae(Kr,1,"health-badge svelte-d3ct2b",null,rn,{"health-green":s(D),"health-warn":!s(D)}),nn=ae(an,1,"dot svelte-d3ct2b",null,nn,{"dot-green":s(D),"dot-warn":!s(D)}),M(_i,`DB ${s(D)?"CONNECTED":"DISCONNECTED"}`),ln=ae(Xr,1,"health-badge svelte-d3ct2b",null,ln,{"health-blue":s(se)||((ee=s(b).runtime)==null?void 0:ee.model.provider)!=="ollama","health-warn":!s(se)&&((J=s(b).runtime)==null?void 0:J.model.provider)==="ollama"}),cn=ae(on,1,"dot svelte-d3ct2b",null,cn,{"dot-blue":s(se)||((O=s(b).runtime)==null?void 0:O.model.provider)!=="ollama","dot-warn":!s(se)&&((g=s(b).runtime)==null?void 0:g.model.provider)==="ollama"}),M(mi,`MODEL: ${s(ne)??""}`),M(Si,`SERVICE: ${s(Gt)==="commit-hook"?"COMMIT HOOK":"CORE-ENGINE"}`),mn=ae(Mi,0,"chevron svelte-d3ct2b",null,mn,{"chevron-open":s(Tt)}),yn=ae(wn,1,"metric-value svelte-d3ct2b",null,yn,{"metric-value-warn":s(d)>0}),M(Li,s(d)),M(Ri,l),M(Ii,_),Sn=ae(En,1,"dot dot-green svelte-d3ct2b",null,Sn,{"dot-pulse":s(x).live}),M($i,T),Mn=ae(Gs,1,"icon-btn svelte-d3ct2b",null,Mn,{"icon-btn-active":s(He)}),_e(Gs,"title",s(He)?"Resume":"Pause"),M(Ji,(s(b),h(()=>{var V;return((V=s(b).stats.tokens)==null?void 0:V.calls)??0}))),M(Qi,L),M(eo,(s(b),h(()=>{var V;return((V=s(b).runtime)==null?void 0:V.model.provider)==="ollama"?"LOCAL (FREE)":"USED"}))),M(so,q),Fn=ae(In,1,"footer-val svelte-d3ct2b",null,Fn,{"footer-val-error":(((j=s(b).stats.bypasses)==null?void 0:j.withoutReason)??0)>0}),M(ao,`${s(b),h(()=>{var V;return((V=s(b).stats.bypasses)==null?void 0:V.withoutReason)??0})??""} unrecorded`),mr.disabled=s(Xt)==="sync",M(lo,`${s(Xt)==="sync"?"…":"⟳"} Sync Agents`),gr.disabled=s(Xt)==="check-all",M(io,`${s(Xt)==="check-all"?"…":"⊛"} Check All`),Qr.disabled=s(Xt)==="tune",M(oo,`${s(Xt)==="tune"?"…":"⚙"} Tune Rules`),zc(vo,`width: ${X??""}%`),M(uo,`Storage: ${s(A)??""} memories`)},[()=>(s(p),h(()=>s(p).toLocaleString())),()=>(s(m),h(()=>s(m).toLocaleString())),()=>(s(x),h(()=>s(x).live?"LIVE STREAMING":s(x).label.toUpperCase())),()=>(s(b),h(()=>{var l;return(l=s(b).stats.tokens)!=null&&l.totalTokens?(s(b).stats.tokens.totalTokens/1e3).toFixed(1)+"K":"—"})),()=>(s(d),s(p),h(()=>s(d)===0?"0.00%":(s(d)/Math.max(1,s(p))*100).toFixed(2)+"%")),()=>(s(A),h(()=>Math.min(100,s(A)/Math.max(1,s(A)+100)*100+20)))]),te("click",Vr,()=>{k(qe,"dashboard"),k(Ie,"live-feed")}),te("click",Ur,()=>{k(qe,"live-feed"),k(Ie,"live-feed")}),te("click",qr,()=>{k(qe,"metrics"),k(Ie,"rules")}),te("click",zr,()=>{k(qe,"arch-graph"),k(Ie,"live-feed")}),te("click",Yr,()=>{k(qe,"history")}),Ts(ii,()=>s(zs),l=>k(zs,l)),te("click",br,ti),te("click",Xa,()=>{var l,_;k(Ms,!s(Ms)),k(Lt,{provider:((l=s(b).runtime)==null?void 0:l.model.provider)??"",model:((_=s(b).runtime)==null?void 0:_.model.chatModel)??""}),k(Kt,"")}),te("click",Gr,ri),te("click",Ei,Jl),te("click",Jr,Qc(()=>k(Tt,!s(Tt)))),te("click",Gs,()=>k(He,!s(He))),te("click",Wi,()=>{const l=new Blob([JSON.stringify(s(b),null,2)],{type:"application/json"}),_=document.createElement("a");_.href=URL.createObjectURL(l),_.download="memory-core-snapshot.json",_.click()}),te("click",mr,()=>Br("sync")),te("click",gr,()=>Br("check-all")),te("click",Qr,()=>Br("tune")),C(e,Wr),ul()}Pc(Xv,{target:document.getElementById("app")});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
:root{color-scheme:light;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;background:#f5f7f8;color:#172026;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased}body{margin:0;min-width:320px;min-height:100vh}button,input,select,textarea{font:inherit}button{border:0}:root{--primary: #0040e0;--primary-dim: #2e5bff;--primary-container: #efefff;--on-primary: #ffffff;--surface: #f8f9fb;--surface-low: #f3f4f6;--surface-mid: #edeef0;--surface-high: #e7e8ea;--surface-highest: #e1e2e4;--on-surface: #191c1e;--on-surface-var: #434656;--outline: #747688;--outline-var: #c4c5d9;--error: #ba1a1a;--error-bg: #ffdad6;--tertiary: #993100;--green: #10b981;--green-bg: rgba(16,185,129,.1);--green-border: rgba(16,185,129,.3);--mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;--sans: "Hanken Grotesk", Inter, ui-sans-serif, system-ui, sans-serif}body{margin:0;background:var(--surface);color:var(--on-surface);font-family:var(--sans);font-size:14px;overflow:hidden;height:100vh}*{box-sizing:border-box}::-webkit-scrollbar{width:5px;height:5px}::-webkit-scrollbar-track{background:var(--surface-low)}::-webkit-scrollbar-thumb{background:var(--outline-var);border-radius:4px}.shell.svelte-d3ct2b{display:flex;flex-direction:column;height:100vh;overflow:hidden}.topbar.svelte-d3ct2b{display:flex;align-items:center;gap:16px;height:64px;padding:0 24px;background:var(--surface);border-bottom:1px solid var(--outline-var);flex-shrink:0;z-index:30}.topbar-brand.svelte-d3ct2b{display:flex;align-items:center;gap:24px;flex-shrink:0}.brand-name.svelte-d3ct2b{font-size:18px;font-weight:700;color:var(--on-surface);font-family:var(--sans);letter-spacing:-.02em}.topbar-nav.svelte-d3ct2b{display:flex;gap:2px}.tab-btn.svelte-d3ct2b{padding:6px 12px;background:transparent;border:none;border-bottom:2px solid transparent;color:var(--on-surface-var);font-family:var(--mono);font-size:11px;font-weight:600;letter-spacing:.04em;cursor:pointer;text-transform:uppercase;transition:color .15s,border-color .15s}.tab-btn.svelte-d3ct2b:hover{color:var(--primary)}.tab-active.svelte-d3ct2b{color:var(--primary)!important;border-bottom-color:var(--primary);font-weight:700}.topbar-search.svelte-d3ct2b{flex:1;max-width:480px;margin:0 auto;position:relative}.search-icon.svelte-d3ct2b{position:absolute;left:12px;top:50%;transform:translateY(-50%);color:var(--on-surface-var);font-size:18px;pointer-events:none;line-height:1}.search-input.svelte-d3ct2b{width:100%;height:36px;padding:0 12px 0 36px;background:var(--surface-mid);border:1px solid var(--outline-var);border-radius:8px;color:var(--on-surface);font-family:var(--sans);font-size:13px;outline:none;transition:border-color .15s}.search-input.svelte-d3ct2b:focus{border-color:var(--primary-dim)}.topbar-actions.svelte-d3ct2b{display:flex;align-items:center;gap:4px;flex-shrink:0}.icon-btn.svelte-d3ct2b{width:34px;height:34px;display:flex;align-items:center;justify-content:center;background:transparent;border:none;border-radius:8px;color:var(--on-surface-var);cursor:pointer;transition:background .15s,color .15s}.icon-btn.svelte-d3ct2b:hover{background:var(--surface-low);color:var(--primary)}.icon-btn-active.svelte-d3ct2b{color:var(--primary)!important;background:var(--primary-container)!important}.avatar.svelte-d3ct2b{width:32px;height:32px;border-radius:50%;background:var(--primary-dim);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:13px;margin-left:8px;border:1px solid var(--outline-var);flex-shrink:0;cursor:default}.body.svelte-d3ct2b{display:flex;flex:1;min-height:0;overflow:hidden}.sidebar.svelte-d3ct2b{width:64px;flex-shrink:0;display:flex;flex-direction:column;align-items:center;padding:16px 0;background:#fff;border-right:1px solid var(--outline-var);z-index:20}.sidebar-logo.svelte-d3ct2b{width:40px;height:40px;background:var(--primary-dim);border-radius:4px;display:flex;align-items:center;justify-content:center;color:#fff;margin-bottom:24px}.sidebar-nav.svelte-d3ct2b{display:flex;flex-direction:column;gap:8px}.side-btn.svelte-d3ct2b{width:36px;height:36px;display:flex;align-items:center;justify-content:center;background:transparent;border:none;border-right:2px solid transparent;color:var(--on-surface-var);cursor:pointer;transition:color .15s;margin-right:-1px}.side-btn.svelte-d3ct2b:hover{color:var(--primary)}.side-btn-active.svelte-d3ct2b{color:var(--primary)!important;background:#0040e014;border-right-color:var(--primary)}.sidebar-footer-dot.svelte-d3ct2b{margin-top:auto;width:8px;height:8px;border-radius:50%;background:var(--outline)}.dot-live.svelte-d3ct2b{background:var(--green)!important;box-shadow:0 0 6px var(--green)}.content.svelte-d3ct2b{flex:1;min-width:0;display:flex;flex-direction:column;overflow:hidden;background:var(--surface)}.health-bar.svelte-d3ct2b{display:flex;align-items:center;gap:8px;padding:6px 24px;border-bottom:1px solid var(--outline-var);background:#fff;flex-shrink:0;flex-wrap:wrap}.health-label.svelte-d3ct2b{font-family:var(--mono);font-size:10px;font-weight:700;color:var(--outline);text-transform:uppercase;letter-spacing:.06em;margin-right:4px}.health-badge.svelte-d3ct2b{display:flex;align-items:center;gap:4px;padding:2px 8px;border-radius:4px;font-family:var(--mono);font-size:10px;font-weight:700}.health-green.svelte-d3ct2b{background:var(--green-bg);color:var(--green);border:1px solid var(--green-border)}.health-blue.svelte-d3ct2b{background:#0040e014;color:var(--primary);border:1px solid rgba(0,64,224,.2)}.health-warn.svelte-d3ct2b{background:#ba1a1a14;color:var(--error);border:1px solid rgba(186,26,26,.25)}.health-error.svelte-d3ct2b{font-family:var(--mono);font-size:10px;color:var(--error);font-weight:700}.dot.svelte-d3ct2b{width:6px;height:6px;border-radius:50%;flex-shrink:0}.dot-green.svelte-d3ct2b{background:var(--green)}.dot-blue.svelte-d3ct2b{background:var(--primary)}.dot-warn.svelte-d3ct2b{background:var(--error)}.dot-pulse.svelte-d3ct2b{animation:svelte-d3ct2b-pulse 1.4s ease-in-out infinite}@keyframes svelte-d3ct2b-pulse{0%,to{opacity:1}50%{opacity:.35}}.filter-bar.svelte-d3ct2b{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 24px;background:var(--surface-low);border-bottom:1px solid var(--outline-var);flex-shrink:0}.filter-left.svelte-d3ct2b,.filter-right.svelte-d3ct2b{display:flex;align-items:center;gap:8px}.chip.svelte-d3ct2b{display:flex;align-items:center;gap:4px;padding:4px 10px;border-radius:8px;font-family:var(--mono);font-size:11px;font-weight:600;cursor:pointer;white-space:nowrap;border:none}.chip-primary.svelte-d3ct2b{background:var(--primary-dim);color:#fff}.chip-close.svelte-d3ct2b{background:transparent;border:none;color:#fffc;cursor:pointer;padding:0;font-size:10px;line-height:1}.chip-outline.svelte-d3ct2b{background:var(--surface);color:var(--on-surface-var);border:1px solid var(--outline-var);transition:border-color .15s}.chip-outline.svelte-d3ct2b:hover{border-color:var(--primary-dim)}.chevron.svelte-d3ct2b{transition:transform .2s}.chevron-open.svelte-d3ct2b{transform:rotate(180deg)}.service-dropdown-wrap.svelte-d3ct2b{position:relative}.dropdown.svelte-d3ct2b{position:absolute;top:calc(100% + 4px);left:0;min-width:180px;background:#fff;border:1px solid var(--outline-var);border-radius:8px;box-shadow:0 8px 24px #0000001f;z-index:100;overflow:hidden;animation:svelte-d3ct2b-dropIn .12s ease}@keyframes svelte-d3ct2b-dropIn{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}.dropdown-item.svelte-d3ct2b{display:flex;align-items:center;gap:8px;width:100%;padding:10px 14px;background:transparent;border:none;color:var(--on-surface-var);font-family:var(--sans);font-size:13px;font-weight:500;cursor:pointer;transition:background .12s;text-align:left}.dropdown-item.svelte-d3ct2b:hover{background:var(--surface-low)}.dropdown-item-active.svelte-d3ct2b{color:var(--primary);background:var(--primary-container)}.dropdown-item-active.svelte-d3ct2b:hover{background:var(--primary-container)}.dropdown-badge.svelte-d3ct2b{margin-left:auto;background:var(--error);color:#fff;border-radius:999px;padding:1px 6px;font-size:10px;font-weight:700}.divider-v.svelte-d3ct2b{width:1px;height:28px;background:var(--outline-var);margin:0 4px}.metrics-strip.svelte-d3ct2b{display:flex;align-items:center;gap:24px}.metric-item.svelte-d3ct2b{display:flex;flex-direction:column;align-items:center}.metric-label.svelte-d3ct2b{font-family:var(--mono);font-size:9px;font-weight:700;color:var(--outline);text-transform:uppercase;letter-spacing:.05em;line-height:1}.metric-value.svelte-d3ct2b{font-family:var(--mono);font-size:14px;font-weight:700;color:var(--on-surface);line-height:1.4}.metric-value-warn.svelte-d3ct2b{color:var(--error)}.live-badge.svelte-d3ct2b{display:flex;align-items:center;gap:6px;padding:4px 10px;border:1px solid var(--outline-var);border-radius:8px;background:#fff;font-family:var(--mono);font-size:11px;font-weight:600;color:var(--on-surface);white-space:nowrap}.feed-area.svelte-d3ct2b{flex:1;min-height:0;overflow-y:auto;padding:12px 24px;background:#fff;font-family:var(--mono);font-size:12px}.log-row.svelte-d3ct2b{display:flex;align-items:baseline;gap:12px;padding:3px 8px;border-radius:4px;transition:background .1s;min-height:22px}.log-row.svelte-d3ct2b:hover{background:var(--surface-low)}.log-row-warn.svelte-d3ct2b{background:#ba1a1a0a}.log-row-fail.svelte-d3ct2b{background:#9931000a}.log-time.svelte-d3ct2b{width:80px;flex-shrink:0;color:var(--outline)}.log-label.svelte-d3ct2b{width:56px;flex-shrink:0;font-weight:700}.label-sys.svelte-d3ct2b{color:var(--primary)}.label-ok.svelte-d3ct2b{color:var(--green)}.label-warn.svelte-d3ct2b{color:var(--tertiary)}.label-info.svelte-d3ct2b{color:var(--on-surface-var)}.label-hook.svelte-d3ct2b{color:var(--error)}.label-chck.svelte-d3ct2b{color:var(--outline)}.log-msg.svelte-d3ct2b{flex:1;min-width:0;color:var(--on-surface-var);word-break:break-all;line-height:1.5}.log-msg.svelte-d3ct2b strong:where(.svelte-d3ct2b){color:var(--on-surface);font-weight:600}.copy-btn.svelte-d3ct2b{opacity:0;background:transparent;border:none;color:var(--outline);cursor:pointer;font-size:14px;padding:0 4px;transition:opacity .15s,color .15s;flex-shrink:0}.log-row.svelte-d3ct2b:hover .copy-btn:where(.svelte-d3ct2b){opacity:1}.copy-btn.svelte-d3ct2b:hover{color:var(--primary)}.log-detail.svelte-d3ct2b{display:flex;gap:8px;padding:3px 8px 3px 148px;font-size:11px;border-left:2px solid rgba(153,49,0,.3);margin-left:8px;margin-bottom:2px}.detail-index.svelte-d3ct2b{color:var(--outline);flex-shrink:0;width:24px}.detail-body.svelte-d3ct2b{color:var(--on-surface-var);flex:1;min-width:0;line-height:1.5}.detail-fix.svelte-d3ct2b{color:var(--primary)}.cursor-blink.svelte-d3ct2b{animation:svelte-d3ct2b-blink 1s step-start infinite}@keyframes svelte-d3ct2b-blink{0%,to{opacity:1}50%{opacity:0}}.section-header.svelte-d3ct2b{display:flex;align-items:baseline;gap:12px;padding:8px 8px 10px;border-bottom:1px solid var(--outline-var);margin-bottom:8px}.section-title.svelte-d3ct2b{font-family:var(--sans);font-size:14px;font-weight:700;color:var(--on-surface)}.section-meta.svelte-d3ct2b{font-size:11px;color:var(--outline);font-family:var(--mono)}.rules-toolbar.svelte-d3ct2b{display:flex;gap:8px;padding:8px;margin-bottom:4px}.rules-select.svelte-d3ct2b,.rules-input.svelte-d3ct2b,.rules-textarea.svelte-d3ct2b{padding:6px 10px;background:var(--surface-low);border:1px solid var(--outline-var);border-radius:6px;color:var(--on-surface);font-family:var(--sans);font-size:13px;outline:none;transition:border-color .15s}.rules-select.svelte-d3ct2b:focus,.rules-input.svelte-d3ct2b:focus,.rules-textarea.svelte-d3ct2b:focus{border-color:var(--primary-dim)}.rules-textarea.svelte-d3ct2b{resize:vertical;flex:1;min-width:0}.rule-form-wrap.svelte-d3ct2b{padding:0 8px 8px;border-bottom:1px solid var(--outline-var);margin-bottom:8px}.rule-form.svelte-d3ct2b{display:flex;flex-direction:column;gap:8px}.rule-form-row.svelte-d3ct2b{display:flex;gap:8px;align-items:flex-start}.add-btn.svelte-d3ct2b{padding:8px 16px;background:var(--primary);color:#fff;border:none;border-radius:6px;font-family:var(--mono);font-size:12px;font-weight:700;cursor:pointer;white-space:nowrap;transition:background .15s;align-self:flex-end}.add-btn.svelte-d3ct2b:hover:not(:disabled){background:var(--primary-dim)}.add-btn.svelte-d3ct2b:disabled{opacity:.5;cursor:not-allowed}.rule-list.svelte-d3ct2b{display:flex;flex-direction:column;gap:4px;overflow-y:auto;max-height:400px;padding:0 8px}.rule-row.svelte-d3ct2b{display:flex;align-items:center;gap:10px;padding:8px 10px;border:1px solid var(--outline-var);border-radius:6px;background:var(--surface-low);font-size:12px;min-width:0;transition:background .1s}.rule-row.svelte-d3ct2b:hover{background:var(--surface-mid)}.rule-badge.svelte-d3ct2b{padding:2px 7px;background:var(--primary-container);color:var(--primary);border-radius:4px;font-family:var(--mono);font-size:10px;font-weight:700;text-transform:uppercase;flex-shrink:0}.rule-scope.svelte-d3ct2b{color:var(--outline);font-family:var(--mono);font-size:10px;font-weight:600;flex-shrink:0}.rule-content.svelte-d3ct2b{flex:1;min-width:0;color:var(--on-surface);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rule-reason.svelte-d3ct2b{color:var(--on-surface-var);font-size:11px;flex-shrink:0;max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.del-btn.svelte-d3ct2b{background:transparent;border:none;color:var(--outline);cursor:pointer;font-size:12px;padding:2px 6px;border-radius:4px;flex-shrink:0;transition:background .1s,color .1s}.del-btn.svelte-d3ct2b:hover{background:var(--error-bg);color:var(--error)}.metrics-footer.svelte-d3ct2b{display:flex;align-items:center;justify-content:space-between;height:48px;padding:0 24px;border-top:1px solid var(--outline-var);background:var(--surface);flex-shrink:0}.footer-left.svelte-d3ct2b,.footer-right.svelte-d3ct2b{display:flex;align-items:center;gap:24px}.footer-metric.svelte-d3ct2b{display:flex;align-items:center;gap:6px}.footer-label.svelte-d3ct2b{font-family:var(--mono);font-size:10px;font-weight:700;color:var(--outline);text-transform:uppercase;letter-spacing:.04em}.footer-val.svelte-d3ct2b{font-family:var(--mono);font-size:14px;font-weight:700;color:var(--on-surface)}.footer-val-error.svelte-d3ct2b{color:var(--error)}.footer-unit.svelte-d3ct2b{font-family:var(--mono);font-size:9px;color:var(--outline);text-transform:uppercase}.storage-bar-wrap.svelte-d3ct2b{display:flex;align-items:center;gap:8px}.storage-bar.svelte-d3ct2b{width:96px;height:6px;background:var(--surface-mid);border-radius:999px;overflow:hidden}.storage-fill.svelte-d3ct2b{height:100%;background:var(--primary-dim);border-radius:999px;transition:width .6s ease}.cli-btn.svelte-d3ct2b{display:flex;align-items:center;gap:6px;padding:5px 12px;background:var(--surface-high);border:none;border-radius:4px;color:var(--on-surface);font-family:var(--mono);font-size:11px;font-weight:700;cursor:pointer;transition:background .15s}.cli-btn.svelte-d3ct2b:hover{background:var(--outline-var)}.dark.svelte-d3ct2b{--primary: #b8c3ff;--primary-dim: #4d6dff;--primary-container: #1a2340;--on-primary: #ffffff;--surface: #111318;--surface-low: #0c0e12;--surface-mid: #1e2024;--surface-high: #282a2e;--surface-highest: #37393e;--on-surface: #e2e2e8;--on-surface-var: #c4c5d9;--outline: #747688;--outline-var: #3a3c4a;--error: #ffb4ab;--error-bg: rgba(147,0,10,.22);--tertiary: #ffb59b;--green: #03f59b;--green-bg: rgba(3,245,155,.1);--green-border: rgba(3,245,155,.28)}.dark.svelte-d3ct2b body{background:var(--surface)}.dark.svelte-d3ct2b .topbar:where(.svelte-d3ct2b){background:#1a1c20;border-bottom-color:var(--outline-var)}.dark.svelte-d3ct2b .sidebar:where(.svelte-d3ct2b){background:#0c0e12;border-right-color:var(--outline-var)}.dark.svelte-d3ct2b .health-bar:where(.svelte-d3ct2b){background:#1a1c20;border-bottom-color:var(--outline-var)}.dark.svelte-d3ct2b .filter-bar:where(.svelte-d3ct2b){background:#111318;border-bottom-color:var(--outline-var)}.dark.svelte-d3ct2b .feed-area:where(.svelte-d3ct2b){background:#0c0e12}.dark.svelte-d3ct2b .metrics-footer:where(.svelte-d3ct2b){background:#111318;border-top-color:var(--outline-var)}.dark.svelte-d3ct2b .search-input:where(.svelte-d3ct2b){background:#1e2024;border-color:var(--outline-var);color:var(--on-surface)}.dark.svelte-d3ct2b .dropdown:where(.svelte-d3ct2b){background:#1e2024;border-color:var(--outline-var);box-shadow:0 8px 24px #00000073}.dark.svelte-d3ct2b .dropdown-item:where(.svelte-d3ct2b):hover{background:#282a2e}.dark.svelte-d3ct2b .dropdown-item-active:where(.svelte-d3ct2b){background:var(--primary-container);color:var(--primary)}.dark.svelte-d3ct2b .chip-outline:where(.svelte-d3ct2b){background:#1e2024}.dark.svelte-d3ct2b .live-badge:where(.svelte-d3ct2b){background:#1e2024}.dark.svelte-d3ct2b .rule-row:where(.svelte-d3ct2b){background:#1e2024;border-color:var(--outline-var)}.dark.svelte-d3ct2b .rule-row:where(.svelte-d3ct2b):hover{background:#282a2e}.dark.svelte-d3ct2b .rules-select:where(.svelte-d3ct2b),.dark.svelte-d3ct2b .rules-input:where(.svelte-d3ct2b),.dark.svelte-d3ct2b .rules-textarea:where(.svelte-d3ct2b){background:#1e2024;border-color:var(--outline-var);color:var(--on-surface)}.dark.svelte-d3ct2b .log-row:where(.svelte-d3ct2b):hover{background:#1e2024}.dark.svelte-d3ct2b .log-row-warn:where(.svelte-d3ct2b){background:#ffb4ab0d}.dark.svelte-d3ct2b .log-row-fail:where(.svelte-d3ct2b){background:#ffba200a}.dark.svelte-d3ct2b .section-header:where(.svelte-d3ct2b){border-bottom-color:var(--outline-var)}.dark.svelte-d3ct2b .storage-bar:where(.svelte-d3ct2b){background:#282a2e}@media (max-width: 768px){.sidebar.svelte-d3ct2b,.topbar-nav.svelte-d3ct2b,.metrics-strip.svelte-d3ct2b{display:none}.filter-bar.svelte-d3ct2b,.feed-area.svelte-d3ct2b{padding:8px 12px}.metrics-footer.svelte-d3ct2b{padding:0 12px;gap:12px}.footer-metric.svelte-d3ct2b:nth-child(n+2){display:none}}.footer-actions.svelte-d3ct2b{display:flex;gap:6px;align-items:center;margin-right:12px}.action-btn.svelte-d3ct2b{font-size:11px;font-family:var(--mono);padding:4px 10px;border-radius:6px;border:1px solid var(--outline-var);background:var(--surface-low);color:var(--on-surface-var);cursor:pointer;transition:background .15s,border-color .15s}.action-btn.svelte-d3ct2b:hover:not(:disabled){background:var(--primary-container);border-color:var(--primary);color:var(--primary)}.action-btn.svelte-d3ct2b:disabled{opacity:.5;cursor:not-allowed}.action-btn-warn.svelte-d3ct2b:hover:not(:disabled){background:#fff3e0;border-color:#f59e0b;color:#b45309}.modal-backdrop.svelte-d3ct2b{position:fixed;top:0;right:0;bottom:0;left:0;background:#00000073;display:flex;align-items:center;justify-content:center;z-index:200}.modal.svelte-d3ct2b{background:var(--surface);border:1px solid var(--outline-var);border-radius:12px;width:480px;max-width:calc(100vw - 32px);box-shadow:0 8px 32px #0000002e;overflow:hidden}.modal-header.svelte-d3ct2b{display:flex;align-items:center;justify-content:space-between;padding:16px 20px 12px;border-bottom:1px solid var(--outline-var)}.modal-title.svelte-d3ct2b{font-size:14px;font-weight:600;color:var(--on-surface)}.modal-close.svelte-d3ct2b{background:none;border:none;cursor:pointer;color:var(--outline);font-size:16px;line-height:1}.modal-section.svelte-d3ct2b{padding:16px 20px;border-bottom:1px solid var(--outline-var)}.modal-section.svelte-d3ct2b:last-child{border-bottom:none}.modal-section-title.svelte-d3ct2b{font-size:11px;font-weight:600;letter-spacing:.06em;color:var(--outline);text-transform:uppercase;margin-bottom:12px}.modal-row.svelte-d3ct2b{display:grid;grid-template-columns:100px 1fr;gap:8px;align-items:center;margin-bottom:10px}.modal-label.svelte-d3ct2b{font-size:12px;color:var(--on-surface-var)}.modal-input.svelte-d3ct2b{font-size:12px;font-family:var(--mono);padding:6px 10px;border:1px solid var(--outline-var);border-radius:6px;background:var(--surface-low);color:var(--on-surface);outline:none;width:100%}.modal-input.svelte-d3ct2b:focus{border-color:var(--primary)}.modal-row-actions.svelte-d3ct2b{display:flex;gap:8px}.modal-btn.svelte-d3ct2b{font-size:12px;padding:6px 14px;border:1px solid var(--outline-var);border-radius:6px;background:var(--surface-low);color:var(--on-surface-var);cursor:pointer}.modal-btn.svelte-d3ct2b:hover:not(:disabled){background:var(--surface-mid)}.modal-btn.svelte-d3ct2b:disabled{opacity:.5;cursor:not-allowed}.modal-btn-primary.svelte-d3ct2b{background:var(--primary);color:#fff;border-color:var(--primary)}.modal-btn-primary.svelte-d3ct2b:hover:not(:disabled){background:var(--primary-dim)}.modal-msg.svelte-d3ct2b{font-size:12px;margin-top:8px;padding:6px 10px;border-radius:6px}.modal-msg-ok.svelte-d3ct2b{background:var(--green-bg);color:var(--green);border:1px solid var(--green-border)}.modal-msg-err.svelte-d3ct2b{background:var(--error-bg);color:var(--error);border:1px solid var(--error)}.modal-status-row.svelte-d3ct2b{display:flex;justify-content:space-between;padding:4px 0;border-bottom:1px solid var(--surface-mid)}.modal-status-row.svelte-d3ct2b:last-child{border-bottom:none}.modal-status-label.svelte-d3ct2b{font-size:11px;color:var(--outline)}.modal-status-val.svelte-d3ct2b{font-size:11px;font-family:var(--mono);color:var(--on-surface)}.dark .modal.svelte-d3ct2b{background:var(--surface);border-color:var(--outline-var)}.arch-graph-wrap.svelte-d3ct2b{display:flex;flex-direction:column;gap:16px;padding:16px}.arch-svg.svelte-d3ct2b{display:block;border:1px solid var(--outline-var);border-radius:8px;background:var(--surface-low);width:100%;max-width:640px}.arch-node-rect.svelte-d3ct2b{fill:var(--surface-mid);stroke:var(--outline-var);stroke-width:1.5}.arch-node-domain.arch-node-rect.svelte-d3ct2b{fill:#eff6ff;stroke:#3b82f6}.arch-node-application.arch-node-rect.svelte-d3ct2b{fill:#f0fdf4;stroke:#22c55e}.arch-node-infrastructure.arch-node-rect.svelte-d3ct2b{fill:#fff7ed;stroke:#f97316}.arch-node-api.arch-node-rect.svelte-d3ct2b{fill:#faf5ff;stroke:#a855f7}.arch-node-shared.arch-node-rect.svelte-d3ct2b{fill:#f8fafc;stroke:#94a3b8}.dark .arch-node-domain.arch-node-rect.svelte-d3ct2b{fill:#1e3a5f;stroke:#3b82f6}.dark .arch-node-application.arch-node-rect.svelte-d3ct2b{fill:#14352a;stroke:#22c55e}.dark .arch-node-infrastructure.arch-node-rect.svelte-d3ct2b{fill:#3d2006;stroke:#f97316}.dark .arch-node-api.arch-node-rect.svelte-d3ct2b{fill:#2e1a47;stroke:#a855f7}.dark .arch-node-shared.arch-node-rect.svelte-d3ct2b{fill:#1e2535;stroke:#94a3b8}.arch-node-label.svelte-d3ct2b{font-family:var(--mono);font-size:11px;font-weight:600;fill:var(--on-surface)}.arch-node-desc.svelte-d3ct2b{font-family:var(--sans);font-size:9px;fill:var(--outline)}.arch-node-clickable.svelte-d3ct2b{cursor:pointer}.arch-node-clickable.svelte-d3ct2b:hover .arch-node-rect:where(.svelte-d3ct2b){filter:brightness(.95)}.dark .arch-node-clickable.svelte-d3ct2b:hover .arch-node-rect:where(.svelte-d3ct2b){filter:brightness(1.15)}.arch-node-panel.svelte-d3ct2b{border:1px solid var(--outline-var);border-radius:8px;background:var(--surface-low);padding:12px 16px;max-width:640px;display:flex;flex-direction:column;gap:10px}.arch-node-panel-header.svelte-d3ct2b{display:flex;align-items:center;gap:10px}.arch-node-panel-name.svelte-d3ct2b{font-family:var(--mono);font-weight:700;font-size:13px;color:var(--on-surface)}.arch-node-panel-meta.svelte-d3ct2b{font-size:12px;color:var(--outline);flex:1}.arch-node-panel-close.svelte-d3ct2b{background:none;border:none;cursor:pointer;color:var(--outline);font-size:14px;padding:0;line-height:1}.arch-node-panel-close.svelte-d3ct2b:hover{color:var(--on-surface)}.arch-node-panel-paths.svelte-d3ct2b{display:flex;flex-direction:column;gap:4px}.arch-node-panel-section.svelte-d3ct2b{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.08em;color:var(--outline);margin-bottom:2px}.arch-node-panel-path.svelte-d3ct2b{font-family:var(--mono);font-size:11px;color:var(--cyan, #22d3ee);background:var(--surface-mid);padding:3px 8px;border-radius:4px}.arch-node-panel-rule.svelte-d3ct2b{display:flex;align-items:center;gap:8px;font-size:12px}.arch-legend.svelte-d3ct2b{display:flex;gap:16px;align-items:center;font-size:11px;color:var(--outline)}.legend-item.svelte-d3ct2b{display:flex;align-items:center;gap:6px}.arch-rule-list.svelte-d3ct2b{display:flex;flex-direction:column;gap:4px;max-width:640px}.arch-rule-row.svelte-d3ct2b{display:flex;align-items:center;gap:8px;padding:6px 10px;background:var(--surface-low);border-radius:4px;border:1px solid var(--outline-var)}.tab-badge.svelte-d3ct2b{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:16px;padding:0 5px;border-radius:8px;background:var(--error);color:#fff;font-size:10px;font-weight:700;margin-left:4px;vertical-align:middle}.history-list.svelte-d3ct2b{display:flex;flex-direction:column;gap:8px;max-width:760px}.history-entry.svelte-d3ct2b{border:1px solid var(--outline-var);border-radius:6px;background:var(--surface-low);overflow:hidden}.history-header.svelte-d3ct2b{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;border-bottom:1px solid var(--outline-var);background:var(--surface-mid)}.history-file.svelte-d3ct2b{font-family:var(--mono);font-size:12px;font-weight:600;color:var(--cyan, #22d3ee)}.history-time.svelte-d3ct2b{font-size:11px;color:var(--outline)}.history-violation.svelte-d3ct2b{display:flex;align-items:center;gap:8px;padding:6px 12px;border-bottom:1px solid var(--outline-var)}.history-violation.svelte-d3ct2b:last-child{border-bottom:none}.history-rule.svelte-d3ct2b{font-size:12px;font-weight:600;color:var(--on-surface)}.history-issue.svelte-d3ct2b{font-size:12px;color:var(--outline)}.arch-rule-badge.svelte-d3ct2b{font-size:10px;font-family:var(--mono);font-weight:700;padding:2px 6px;border-radius:3px}.badge-block.svelte-d3ct2b{background:var(--error-bg);color:var(--error)}.badge-warn.svelte-d3ct2b{background:#fef3c7;color:#92400e}.badge-allow.svelte-d3ct2b{background:var(--green-bg);color:var(--green)}.arch-rule-layers.svelte-d3ct2b{font-family:var(--mono);font-size:11px;color:var(--on-surface);white-space:nowrap}.arch-rule-name.svelte-d3ct2b{font-size:11px;color:var(--outline);flex:1}
|