aperta-cli 1.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +386 -0
- package/bin/aperta.js +3 -0
- package/dashboard/dist/assets/index-CWL1aA6j.js +11 -0
- package/dashboard/dist/assets/index-D0Ru46BW.css +1 -0
- package/dashboard/dist/index.html +15 -0
- package/dist-cli/src/adapters/git-only.js +7 -0
- package/dist-cli/src/adapters/git-only.js.map +1 -0
- package/dist-cli/src/adapters/opencode.js +47 -0
- package/dist-cli/src/adapters/opencode.js.map +1 -0
- package/dist-cli/src/agent-harness.js +1292 -0
- package/dist-cli/src/agent-harness.js.map +1 -0
- package/dist-cli/src/capture.js +17 -0
- package/dist-cli/src/capture.js.map +1 -0
- package/dist-cli/src/cli.js +283 -0
- package/dist-cli/src/cli.js.map +1 -0
- package/dist-cli/src/coach.js +315 -0
- package/dist-cli/src/coach.js.map +1 -0
- package/dist-cli/src/dashboard-data.js +254 -0
- package/dist-cli/src/dashboard-data.js.map +1 -0
- package/dist-cli/src/dashboard-server.js +379 -0
- package/dist-cli/src/dashboard-server.js.map +1 -0
- package/dist-cli/src/engine.js +85 -0
- package/dist-cli/src/engine.js.map +1 -0
- package/dist-cli/src/execution.js +20 -0
- package/dist-cli/src/execution.js.map +1 -0
- package/dist-cli/src/git.js +131 -0
- package/dist-cli/src/git.js.map +1 -0
- package/dist-cli/src/harness-intelligence.js +110 -0
- package/dist-cli/src/harness-intelligence.js.map +1 -0
- package/dist-cli/src/hook.js +39 -0
- package/dist-cli/src/hook.js.map +1 -0
- package/dist-cli/src/impact.js +224 -0
- package/dist-cli/src/impact.js.map +1 -0
- package/dist-cli/src/jobs.js +27 -0
- package/dist-cli/src/jobs.js.map +1 -0
- package/dist-cli/src/ledger.js +211 -0
- package/dist-cli/src/ledger.js.map +1 -0
- package/dist-cli/src/map.js +73 -0
- package/dist-cli/src/map.js.map +1 -0
- package/dist-cli/src/observer.js +127 -0
- package/dist-cli/src/observer.js.map +1 -0
- package/dist-cli/src/probes.js +195 -0
- package/dist-cli/src/probes.js.map +1 -0
- package/dist-cli/src/prompt.js +44 -0
- package/dist-cli/src/prompt.js.map +1 -0
- package/dist-cli/src/proof-graph.js +123 -0
- package/dist-cli/src/proof-graph.js.map +1 -0
- package/dist-cli/src/proof.js +99 -0
- package/dist-cli/src/proof.js.map +1 -0
- package/dist-cli/src/registry.js +60 -0
- package/dist-cli/src/registry.js.map +1 -0
- package/dist-cli/src/repository.js +39 -0
- package/dist-cli/src/repository.js.map +1 -0
- package/dist-cli/src/semantic.js +183 -0
- package/dist-cli/src/semantic.js.map +1 -0
- package/dist-cli/src/service.js +60 -0
- package/dist-cli/src/service.js.map +1 -0
- package/dist-cli/src/session.js +41 -0
- package/dist-cli/src/session.js.map +1 -0
- package/dist-cli/src/settings.js +305 -0
- package/dist-cli/src/settings.js.map +1 -0
- package/dist-cli/src/skills.js +104 -0
- package/dist-cli/src/skills.js.map +1 -0
- package/dist-cli/src/storage.js +163 -0
- package/dist-cli/src/storage.js.map +1 -0
- package/dist-cli/src/types.js +2 -0
- package/dist-cli/src/types.js.map +1 -0
- package/package.json +56 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))i(a);new MutationObserver(a=>{for(const r of a)if(r.type==="childList")for(const f of r.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&i(f)}).observe(document,{childList:!0,subtree:!0});function s(a){const r={};return a.integrity&&(r.integrity=a.integrity),a.referrerPolicy&&(r.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?r.credentials="include":a.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(a){if(a.ep)return;a.ep=!0;const r=s(a);fetch(a.href,r)}})();function Ql(e){const t=Object.create(null);for(const s of e.split(","))t[s]=1;return s=>s in t}const ge={},Mn=[],Rt=()=>{},Ti=()=>!1,nl=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),sl=e=>e.startsWith("onUpdate:"),Ne=Object.assign,eo=(e,t)=>{const s=e.indexOf(t);s>-1&&e.splice(s,1)},Nr=Object.prototype.hasOwnProperty,fe=(e,t)=>Nr.call(e,t),Y=Array.isArray,Nn=e=>bs(e)==="[object Map]",Un=e=>bs(e)==="[object Set]",Uo=e=>bs(e)==="[object Date]",Q=e=>typeof e=="function",Se=e=>typeof e=="string",It=e=>typeof e=="symbol",ve=e=>e!==null&&typeof e=="object",Pi=e=>(ve(e)||Q(e))&&Q(e.then)&&Q(e.catch),Mi=Object.prototype.toString,bs=e=>Mi.call(e),Or=e=>bs(e).slice(8,-1),Ni=e=>bs(e)==="[object Object]",to=e=>Se(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,ss=Ql(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),ll=e=>{const t=Object.create(null);return(s=>t[s]||(t[s]=e(s)))},Lr=/-\w/g,Be=ll(e=>e.replace(Lr,t=>t.slice(1).toUpperCase())),jr=/\B([A-Z])/g,rn=ll(e=>e.replace(jr,"-$1").toLowerCase()),ol=ll(e=>e.charAt(0).toUpperCase()+e.slice(1)),$l=ll(e=>e?`on${ol(e)}`:""),At=(e,t)=>!Object.is(e,t),Ws=(e,...t)=>{for(let s=0;s<e.length;s++)e[s](...t)},Oi=(e,t,s,i=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:i,value:s})},il=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let Ho;const al=()=>Ho||(Ho=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function yn(e){if(Y(e)){const t={};for(let s=0;s<e.length;s++){const i=e[s],a=Se(i)?Hr(i):yn(i);if(a)for(const r in a)t[r]=a[r]}return t}else if(Se(e)||ve(e))return e}const Fr=/;(?![^(]*\))/g,Dr=/:([^]+)/,Ur=/\/\*[^]*?\*\//g;function Hr(e){const t={};return e.replace(Ur,"").split(Fr).forEach(s=>{if(s){const i=s.split(Dr);i.length>1&&(t[i[0].trim()]=i[1].trim())}}),t}function x(e){let t="";if(Se(e))t=e;else if(Y(e))for(let s=0;s<e.length;s++){const i=x(e[s]);i&&(t+=i+" ")}else if(ve(e))for(const s in e)e[s]&&(t+=s+" ");return t.trim()}const Vr="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Wr=Ql(Vr);function Li(e){return!!e||e===""}function Br(e,t){if(e.length!==t.length)return!1;let s=!0;for(let i=0;s&&i<e.length;i++)s=Hn(e[i],t[i]);return s}function Hn(e,t){if(e===t)return!0;let s=Uo(e),i=Uo(t);if(s||i)return s&&i?e.getTime()===t.getTime():!1;if(s=It(e),i=It(t),s||i)return e===t;if(s=Y(e),i=Y(t),s||i)return s&&i?Br(e,t):!1;if(s=ve(e),i=ve(t),s||i){if(!s||!i)return!1;const a=Object.keys(e).length,r=Object.keys(t).length;if(a!==r)return!1;for(const f in e){const v=e.hasOwnProperty(f),h=t.hasOwnProperty(f);if(v&&!h||!v&&h||!Hn(e[f],t[f]))return!1}}return String(e)===String(t)}function no(e,t){return e.findIndex(s=>Hn(s,t))}const ji=e=>!!(e&&e.__v_isRef===!0),u=e=>Se(e)?e:e==null?"":Y(e)||ve(e)&&(e.toString===Mi||!Q(e.toString))?ji(e)?u(e.value):JSON.stringify(e,Fi,2):String(e),Fi=(e,t)=>ji(t)?Fi(e,t.value):Nn(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((s,[i,a],r)=>(s[Rl(i,r)+" =>"]=a,s),{})}:Un(t)?{[`Set(${t.size})`]:[...t.values()].map(s=>Rl(s))}:It(t)?Rl(t):ve(t)&&!Y(t)&&!Ni(t)?String(t):t,Rl=(e,t="")=>{var s;return It(e)?`Symbol(${(s=e.description)!=null?s:t})`:e};let Me;class Kr{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&Me&&(Me.active?(this.parent=Me,this.index=(Me.scopes||(Me.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,s;if(this.scopes){const i=this.scopes.slice();for(t=0,s=i.length;t<s;t++)i[t].pause()}for(t=0,s=this.effects.length;t<s;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,s;if(this.scopes){const a=this.scopes.slice();for(t=0,s=a.length;t<s;t++)a[t].resume()}const i=this.effects.slice();for(t=0,s=i.length;t<s;t++)i[t].resume()}}run(t){if(this._active){const s=Me;try{return Me=this,t()}finally{Me=s}}}on(){++this._on===1&&(this.prevScope=Me,Me=this)}off(){if(this._on>0&&--this._on===0){if(Me===this)Me=this.prevScope;else{let t=Me;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let s,i;for(s=0,i=this.effects.length;s<i;s++)this.effects[s].stop();for(this.effects.length=0,s=0,i=this.cleanups.length;s<i;s++)this.cleanups[s]();if(this.cleanups.length=0,this.scopes){const a=this.scopes.slice();for(s=0,i=a.length;s<i;s++)a[s].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const a=this.parent.scopes.pop();a&&a!==this&&(this.parent.scopes[this.index]=a,a.index=this.index)}this.parent=void 0}}}function qr(){return Me}let we;const Il=new WeakSet;class Di{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Me&&(Me.active?Me.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Il.has(this)&&(Il.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Hi(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Vo(this),Vi(this);const t=we,s=dt;we=this,dt=!0;try{return this.fn()}finally{Wi(this),we=t,dt=s,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)oo(t);this.deps=this.depsTail=void 0,Vo(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Il.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Vl(this)&&this.run()}get dirty(){return Vl(this)}}let Ui=0,ls,os;function Hi(e,t=!1){if(e.flags|=8,t){e.next=os,os=e;return}e.next=ls,ls=e}function so(){Ui++}function lo(){if(--Ui>0)return;if(os){let t=os;for(os=void 0;t;){const s=t.next;t.next=void 0,t.flags&=-9,t=s}}let e;for(;ls;){let t=ls;for(ls=void 0;t;){const s=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(i){e||(e=i)}t=s}}if(e)throw e}function Vi(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Wi(e){let t,s=e.depsTail,i=s;for(;i;){const a=i.prevDep;i.version===-1?(i===s&&(s=a),oo(i),Gr(i)):t=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=a}e.deps=t,e.depsTail=s}function Vl(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Bi(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Bi(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===fs)||(e.globalVersion=fs,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Vl(e))))return;e.flags|=2;const t=e.dep,s=we,i=dt;we=e,dt=!0;try{Vi(e);const a=e.fn(e._value);(t.version===0||At(a,e._value))&&(e.flags|=128,e._value=a,t.version++)}catch(a){throw t.version++,a}finally{we=s,dt=i,Wi(e),e.flags&=-3}}function oo(e,t=!1){const{dep:s,prevSub:i,nextSub:a}=e;if(i&&(i.nextSub=a,e.prevSub=void 0),a&&(a.prevSub=i,e.nextSub=void 0),s.subs===e&&(s.subs=i,!i&&s.computed)){s.computed.flags&=-5;for(let r=s.computed.deps;r;r=r.nextDep)oo(r,!0)}!t&&!--s.sc&&s.map&&s.map.delete(s.key)}function Gr(e){const{prevDep:t,nextDep:s}=e;t&&(t.nextDep=s,e.prevDep=void 0),s&&(s.prevDep=t,e.nextDep=void 0)}let dt=!0;const Ki=[];function Vt(){Ki.push(dt),dt=!1}function Wt(){const e=Ki.pop();dt=e===void 0?!0:e}function Vo(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const s=we;we=void 0;try{t()}finally{we=s}}}let fs=0;class zr{constructor(t,s){this.sub=t,this.dep=s,this.version=s.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class io{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!we||!dt||we===this.computed)return;let s=this.activeLink;if(s===void 0||s.sub!==we)s=this.activeLink=new zr(we,this),we.deps?(s.prevDep=we.depsTail,we.depsTail.nextDep=s,we.depsTail=s):we.deps=we.depsTail=s,qi(s);else if(s.version===-1&&(s.version=this.version,s.nextDep)){const i=s.nextDep;i.prevDep=s.prevDep,s.prevDep&&(s.prevDep.nextDep=i),s.prevDep=we.depsTail,s.nextDep=void 0,we.depsTail.nextDep=s,we.depsTail=s,we.deps===s&&(we.deps=i)}return s}trigger(t){this.version++,fs++,this.notify(t)}notify(t){so();try{for(let s=this.subs;s;s=s.prevSub)s.sub.notify()&&s.sub.dep.notify()}finally{lo()}}}function qi(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let i=t.deps;i;i=i.nextDep)qi(i)}const s=e.dep.subs;s!==e&&(e.prevSub=s,s&&(s.nextSub=e)),e.dep.subs=e}}const Wl=new WeakMap,bn=Symbol(""),Bl=Symbol(""),ps=Symbol("");function Le(e,t,s){if(dt&&we){let i=Wl.get(e);i||Wl.set(e,i=new Map);let a=i.get(s);a||(i.set(s,a=new io),a.map=i,a.key=s),a.track()}}function Ut(e,t,s,i,a,r){const f=Wl.get(e);if(!f){fs++;return}const v=h=>{h&&h.trigger()};if(so(),t==="clear")f.forEach(v);else{const h=Y(e),b=h&&to(s);if(h&&s==="length"){const y=Number(i);f.forEach((_,M)=>{(M==="length"||M===ps||!It(M)&&M>=y)&&v(_)})}else switch((s!==void 0||f.has(void 0))&&v(f.get(s)),b&&v(f.get(ps)),t){case"add":h?b&&v(f.get("length")):(v(f.get(bn)),Nn(e)&&v(f.get(Bl)));break;case"delete":h||(v(f.get(bn)),Nn(e)&&v(f.get(Bl)));break;case"set":Nn(e)&&v(f.get(bn));break}}lo()}function In(e){const t=de(e);return t===e?t:(Le(t,"iterate",ps),ot(e)?t:t.map(ft))}function rl(e){return Le(e=de(e),"iterate",ps),e}function xt(e,t){return Bt(e)?jn(wn(e)?ft(t):t):ft(t)}const Jr={__proto__:null,[Symbol.iterator](){return Tl(this,Symbol.iterator,e=>xt(this,e))},concat(...e){return In(this).concat(...e.map(t=>Y(t)?In(t):t))},entries(){return Tl(this,"entries",e=>(e[1]=xt(this,e[1]),e))},every(e,t){return jt(this,"every",e,t,void 0,arguments)},filter(e,t){return jt(this,"filter",e,t,s=>s.map(i=>xt(this,i)),arguments)},find(e,t){return jt(this,"find",e,t,s=>xt(this,s),arguments)},findIndex(e,t){return jt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return jt(this,"findLast",e,t,s=>xt(this,s),arguments)},findLastIndex(e,t){return jt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return jt(this,"forEach",e,t,void 0,arguments)},includes(...e){return Pl(this,"includes",e)},indexOf(...e){return Pl(this,"indexOf",e)},join(e){return In(this).join(e)},lastIndexOf(...e){return Pl(this,"lastIndexOf",e)},map(e,t){return jt(this,"map",e,t,void 0,arguments)},pop(){return Zn(this,"pop")},push(...e){return Zn(this,"push",e)},reduce(e,...t){return Wo(this,"reduce",e,t)},reduceRight(e,...t){return Wo(this,"reduceRight",e,t)},shift(){return Zn(this,"shift")},some(e,t){return jt(this,"some",e,t,void 0,arguments)},splice(...e){return Zn(this,"splice",e)},toReversed(){return In(this).toReversed()},toSorted(e){return In(this).toSorted(e)},toSpliced(...e){return In(this).toSpliced(...e)},unshift(...e){return Zn(this,"unshift",e)},values(){return Tl(this,"values",e=>xt(this,e))}};function Tl(e,t,s){const i=rl(e),a=i[t]();return i!==e&&!ot(e)&&(a._next=a.next,a.next=()=>{const r=a._next();return r.done||(r.value=s(r.value)),r}),a}const Yr=Array.prototype;function jt(e,t,s,i,a,r){const f=rl(e),v=f!==e&&!ot(e),h=f[t];if(h!==Yr[t]){const _=h.apply(e,r);return v?ft(_):_}let b=s;f!==e&&(v?b=function(_,M){return s.call(this,xt(e,_),M,e)}:s.length>2&&(b=function(_,M){return s.call(this,_,M,e)}));const y=h.call(f,b,i);return v&&a?a(y):y}function Wo(e,t,s,i){const a=rl(e),r=a!==e&&!ot(e);let f=s,v=!1;a!==e&&(r?(v=i.length===0,f=function(b,y,_){return v&&(v=!1,b=xt(e,b)),s.call(this,b,xt(e,y),_,e)}):s.length>3&&(f=function(b,y,_){return s.call(this,b,y,_,e)}));const h=a[t](f,...i);return v?xt(e,h):h}function Pl(e,t,s){const i=de(e);Le(i,"iterate",ps);const a=i[t](...s);return(a===-1||a===!1)&&co(s[0])?(s[0]=de(s[0]),i[t](...s)):a}function Zn(e,t,s=[]){Vt(),so();const i=de(e)[t].apply(e,s);return lo(),Wt(),i}const Xr=Ql("__proto__,__v_isRef,__isVue"),Gi=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(It));function Zr(e){It(e)||(e=String(e));const t=de(this);return Le(t,"has",e),t.hasOwnProperty(e)}class zi{constructor(t=!1,s=!1){this._isReadonly=t,this._isShallow=s}get(t,s,i){if(s==="__v_skip")return t.__v_skip;const a=this._isReadonly,r=this._isShallow;if(s==="__v_isReactive")return!a;if(s==="__v_isReadonly")return a;if(s==="__v_isShallow")return r;if(s==="__v_raw")return i===(a?r?ru:Zi:r?Xi:Yi).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(i)?t:void 0;const f=Y(t);if(!a){let h;if(f&&(h=Jr[s]))return h;if(s==="hasOwnProperty")return Zr}const v=Reflect.get(t,s,Fe(t)?t:i);if((It(s)?Gi.has(s):Xr(s))||(a||Le(t,"get",s),r))return v;if(Fe(v)){const h=f&&to(s)?v:v.value;return a&&ve(h)?ql(h):h}return ve(v)?a?ql(v):ro(v):v}}class Ji extends zi{constructor(t=!1){super(!1,t)}set(t,s,i,a){let r=t[s];const f=Y(t)&&to(s);if(!this._isShallow){const b=Bt(r);if(!ot(i)&&!Bt(i)&&(r=de(r),i=de(i)),!f&&Fe(r)&&!Fe(i))return b||(r.value=i),!0}const v=f?Number(s)<t.length:fe(t,s),h=Reflect.set(t,s,i,Fe(t)?t:a);return t===de(a)&&h&&(v?At(i,r)&&Ut(t,"set",s,i):Ut(t,"add",s,i)),h}deleteProperty(t,s){const i=fe(t,s);t[s];const a=Reflect.deleteProperty(t,s);return a&&i&&Ut(t,"delete",s,void 0),a}has(t,s){const i=Reflect.has(t,s);return(!It(s)||!Gi.has(s))&&Le(t,"has",s),i}ownKeys(t){return Le(t,"iterate",Y(t)?"length":bn),Reflect.ownKeys(t)}}class Qr extends zi{constructor(t=!1){super(!0,t)}set(t,s){return!0}deleteProperty(t,s){return!0}}const eu=new Ji,tu=new Qr,nu=new Ji(!0);const Kl=e=>e,Fs=e=>Reflect.getPrototypeOf(e);function su(e,t,s){return function(...i){const a=this.__v_raw,r=de(a),f=Nn(r),v=e==="entries"||e===Symbol.iterator&&f,h=e==="keys"&&f,b=a[e](...i),y=s?Kl:t?jn:ft;return!t&&Le(r,"iterate",h?Bl:bn),Ne(Object.create(b),{next(){const{value:_,done:M}=b.next();return M?{value:_,done:M}:{value:v?[y(_[0]),y(_[1])]:y(_),done:M}}})}}function Ds(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function lu(e,t){const s={get(a){const r=this.__v_raw,f=de(r),v=de(a);e||(At(a,v)&&Le(f,"get",a),Le(f,"get",v));const{has:h}=Fs(f),b=t?Kl:e?jn:ft;if(h.call(f,a))return b(r.get(a));if(h.call(f,v))return b(r.get(v));r!==f&&r.get(a)},get size(){const a=this.__v_raw;return!e&&Le(de(a),"iterate",bn),a.size},has(a){const r=this.__v_raw,f=de(r),v=de(a);return e||(At(a,v)&&Le(f,"has",a),Le(f,"has",v)),a===v?r.has(a):r.has(a)||r.has(v)},forEach(a,r){const f=this,v=f.__v_raw,h=de(v),b=t?Kl:e?jn:ft;return!e&&Le(h,"iterate",bn),v.forEach((y,_)=>a.call(r,b(y),b(_),f))}};return Ne(s,e?{add:Ds("add"),set:Ds("set"),delete:Ds("delete"),clear:Ds("clear")}:{add(a){const r=de(this),f=Fs(r),v=de(a),h=!t&&!ot(a)&&!Bt(a)?v:a;return f.has.call(r,h)||At(a,h)&&f.has.call(r,a)||At(v,h)&&f.has.call(r,v)||(r.add(h),Ut(r,"add",h,h)),this},set(a,r){!t&&!ot(r)&&!Bt(r)&&(r=de(r));const f=de(this),{has:v,get:h}=Fs(f);let b=v.call(f,a);b||(a=de(a),b=v.call(f,a));const y=h.call(f,a);return f.set(a,r),b?At(r,y)&&Ut(f,"set",a,r):Ut(f,"add",a,r),this},delete(a){const r=de(this),{has:f,get:v}=Fs(r);let h=f.call(r,a);h||(a=de(a),h=f.call(r,a)),v&&v.call(r,a);const b=r.delete(a);return h&&Ut(r,"delete",a,void 0),b},clear(){const a=de(this),r=a.size!==0,f=a.clear();return r&&Ut(a,"clear",void 0,void 0),f}}),["keys","values","entries",Symbol.iterator].forEach(a=>{s[a]=su(a,e,t)}),s}function ao(e,t){const s=lu(e,t);return(i,a,r)=>a==="__v_isReactive"?!e:a==="__v_isReadonly"?e:a==="__v_raw"?i:Reflect.get(fe(s,a)&&a in i?s:i,a,r)}const ou={get:ao(!1,!1)},iu={get:ao(!1,!0)},au={get:ao(!0,!1)};const Yi=new WeakMap,Xi=new WeakMap,Zi=new WeakMap,ru=new WeakMap;function uu(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function ro(e){return Bt(e)?e:uo(e,!1,eu,ou,Yi)}function cu(e){return uo(e,!1,nu,iu,Xi)}function ql(e){return uo(e,!0,tu,au,Zi)}function uo(e,t,s,i,a){if(!ve(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const r=a.get(e);if(r)return r;const f=uu(Or(e));if(f===0)return e;const v=new Proxy(e,f===2?i:s);return a.set(e,v),v}function wn(e){return Bt(e)?wn(e.__v_raw):!!(e&&e.__v_isReactive)}function Bt(e){return!!(e&&e.__v_isReadonly)}function ot(e){return!!(e&&e.__v_isShallow)}function co(e){return e?!!e.__v_raw:!1}function de(e){const t=e&&e.__v_raw;return t?de(t):e}function du(e){return!fe(e,"__v_skip")&&Object.isExtensible(e)&&Oi(e,"__v_skip",!0),e}const ft=e=>ve(e)?ro(e):e,jn=e=>ve(e)?ql(e):e;function Fe(e){return e?e.__v_isRef===!0:!1}function P(e){return fu(e,!1)}function fu(e,t){return Fe(e)?e:new pu(e,t)}class pu{constructor(t,s){this.dep=new io,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=s?t:de(t),this._value=s?t:ft(t),this.__v_isShallow=s}get value(){return this.dep.track(),this._value}set value(t){const s=this._rawValue,i=this.__v_isShallow||ot(t)||Bt(t);t=i?t:de(t),At(t,s)&&(this._rawValue=t,this._value=i?t:ft(t),this.dep.trigger())}}function le(e){return Fe(e)?e.value:e}const vu={get:(e,t,s)=>t==="__v_raw"?e:le(Reflect.get(e,t,s)),set:(e,t,s,i)=>{const a=e[t];return Fe(a)&&!Fe(s)?(a.value=s,!0):Reflect.set(e,t,s,i)}};function Qi(e){return wn(e)?e:new Proxy(e,vu)}class hu{constructor(t,s,i){this.fn=t,this.setter=s,this._value=void 0,this.dep=new io(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=fs-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!s,this.isSSR=i}notify(){if(this.flags|=16,!(this.flags&8)&&we!==this)return Hi(this,!0),!0}get value(){const t=this.dep.track();return Bi(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function gu(e,t,s=!1){let i,a;return Q(e)?i=e:(i=e.get,a=e.set),new hu(i,a,s)}const Us={},qs=new WeakMap;let gn;function mu(e,t=!1,s=gn){if(s){let i=qs.get(s);i||qs.set(s,i=[]),i.push(e)}}function yu(e,t,s=ge){const{immediate:i,deep:a,once:r,scheduler:f,augmentJob:v,call:h}=s,b=V=>a?V:ot(V)||a===!1||a===0?Ht(V,1):Ht(V);let y,_,M,O,ee=!1,G=!1;if(Fe(e)?(_=()=>e.value,ee=ot(e)):wn(e)?(_=()=>b(e),ee=!0):Y(e)?(G=!0,ee=e.some(V=>wn(V)||ot(V)),_=()=>e.map(V=>{if(Fe(V))return V.value;if(wn(V))return b(V);if(Q(V))return h?h(V,2):V()})):Q(e)?t?_=h?()=>h(e,2):e:_=()=>{if(M){Vt();try{M()}finally{Wt()}}const V=gn;gn=y;try{return h?h(e,3,[O]):e(O)}finally{gn=V}}:_=Rt,t&&a){const V=_,H=a===!0?1/0:a;_=()=>Ht(V(),H)}const he=qr(),re=()=>{y.stop(),he&&he.active&&eo(he.effects,y)};if(r&&t){const V=t;t=(...H)=>{const Ie=V(...H);return re(),Ie}}let ne=G?new Array(e.length).fill(Us):Us;const te=V=>{if(!(!(y.flags&1)||!y.dirty&&!V))if(t){const H=y.run();if(V||a||ee||(G?H.some((Ie,Ae)=>At(Ie,ne[Ae])):At(H,ne))){M&&M();const Ie=gn;gn=y;try{const Ae=[H,ne===Us?void 0:G&&ne[0]===Us?[]:ne,O];ne=H,h?h(t,3,Ae):t(...Ae)}finally{gn=Ie}}}else y.run()};return v&&v(te),y=new Di(_),y.scheduler=f?()=>f(te,!1):te,O=V=>mu(V,!1,y),M=y.onStop=()=>{const V=qs.get(y);if(V){if(h)h(V,4);else for(const H of V)H();qs.delete(y)}},t?i?te(!0):ne=y.run():f?f(te.bind(null,!0),!0):y.run(),re.pause=y.pause.bind(y),re.resume=y.resume.bind(y),re.stop=re,re}function Ht(e,t=1/0,s){if(t<=0||!ve(e)||e.__v_skip||(s=s||new Map,(s.get(e)||0)>=t))return e;if(s.set(e,t),t--,Fe(e))Ht(e.value,t,s);else if(Y(e))for(let i=0;i<e.length;i++)Ht(e[i],t,s);else if(Un(e)||Nn(e))e.forEach(i=>{Ht(i,t,s)});else if(Ni(e)){for(const i in e)Ht(e[i],t,s);for(const i of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,i)&&Ht(e[i],t,s)}return e}function ws(e,t,s,i){try{return i?e(...i):e()}catch(a){ul(a,t,s)}}function pt(e,t,s,i){if(Q(e)){const a=ws(e,t,s,i);return a&&Pi(a)&&a.catch(r=>{ul(r,t,s)}),a}if(Y(e)){const a=[];for(let r=0;r<e.length;r++)a.push(pt(e[r],t,s,i));return a}}function ul(e,t,s,i=!0){const a=t?t.vnode:null,{errorHandler:r,throwUnhandledErrorInProduction:f}=t&&t.appContext.config||ge;if(t){let v=t.parent;const h=t.proxy,b=`https://vuejs.org/error-reference/#runtime-${s}`;for(;v;){const y=v.ec;if(y){for(let _=0;_<y.length;_++)if(y[_](e,h,b)===!1)return}v=v.parent}if(r){Vt(),ws(r,null,10,[e,h,b]),Wt();return}}bu(e,s,a,i,f)}function bu(e,t,s,i=!0,a=!1){if(a)throw e;console.error(e)}const We=[];let Ct=-1;const On=[];let on=null,Pn=0;const ea=Promise.resolve();let Gs=null;function zs(e){const t=Gs||ea;return e?t.then(this?e.bind(this):e):t}function wu(e){let t=Ct+1,s=We.length;for(;t<s;){const i=t+s>>>1,a=We[i],r=vs(a);r<e||r===e&&a.flags&2?t=i+1:s=i}return t}function fo(e){if(!(e.flags&1)){const t=vs(e),s=We[We.length-1];!s||!(e.flags&2)&&t>=vs(s)?We.push(e):We.splice(wu(t),0,e),e.flags|=1,ta()}}function ta(){Gs||(Gs=ea.then(sa))}function ku(e){if(!Y(e))on&&e.id===-1?on.splice(Pn+1,0,e):e.flags&1||(On.push(e),e.flags|=1);else for(let t=0;t<e.length;t++)On.push(e[t]);ta()}function Bo(e,t,s=Ct+1){for(;s<We.length;s++){const i=We[s];if(i&&i.flags&2){if(e&&i.id!==e.uid)continue;We.splice(s,1),s--,i.flags&4&&(i.flags&=-2),i(),i.flags&4||(i.flags&=-2)}}}function na(e){if(On.length){const t=[...new Set(On)].sort((s,i)=>vs(s)-vs(i));if(On.length=0,on){for(let s=0;s<t.length;s++)on.push(t[s]);return}for(on=t,Pn=0;Pn<on.length;Pn++){const s=on[Pn];s.flags&4&&(s.flags&=-2),s.flags&8||s(),s.flags&=-2}on=null,Pn=0}}const vs=e=>e.id==null?e.flags&2?-1:1/0:e.id;function sa(e){try{for(Ct=0;Ct<We.length;Ct++){const t=We[Ct];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),ws(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Ct<We.length;Ct++){const t=We[Ct];t&&(t.flags&=-2)}Ct=-1,We.length=0,na(),Gs=null,(We.length||On.length)&&sa()}}let et=null,la=null;function Js(e){const t=et;return et=e,la=e&&e.type.__scopeId||null,t}function oa(e,t=et,s){if(!t||e._n)return e;const i=(...a)=>{i._d&&Zs(-1);const r=Js(t),f=kn.length;let v;try{v=e(...a)}finally{for(let h=kn.length;h>f;h--)Pa();Js(r),i._d&&Zs(1)}return v};return i._n=!0,i._c=!0,i._d=!0,i}function Xe(e,t){if(et===null)return e;const s=vl(et),i=e.dirs||(e.dirs=[]);for(let a=0;a<t.length;a++){let[r,f,v,h=ge]=t[a];r&&(Q(r)&&(r={mounted:r,updated:r}),r.deep&&Ht(f),i.push({dir:r,instance:s,value:f,oldValue:void 0,arg:v,modifiers:h}))}return e}function pn(e,t,s,i){const a=e.dirs,r=t&&t.dirs;for(let f=0;f<a.length;f++){const v=a[f];r&&(v.oldValue=r[f].value);let h=v.dir[i];h&&(Vt(),pt(h,s,8,[e.el,v,e,t]),Wt())}}function _u(e,t){if(je){let s=je.provides;const i=je.parent&&je.parent.provides;i===s&&(s=je.provides=Object.create(i)),s[e]=t}}function is(e,t,s=!1){const i=yc();if(i||Ln){let a=Ln?Ln._context.provides:i?i.parent==null||i.ce?i.vnode.appContext&&i.vnode.appContext.provides:i.parent.provides:void 0;if(a&&e in a)return a[e];if(arguments.length>1)return s&&Q(t)?t.call(i&&i.proxy):t}}const Cu=Symbol.for("v-scx"),xu=()=>is(Cu);function as(e,t,s){return ia(e,t,s)}function ia(e,t,s=ge){const{immediate:i,deep:a,flush:r,once:f}=s,v=Ne({},s),h=t&&i||!t&&r!=="post";let b;if(ms){if(r==="sync"){const O=xu();b=O.__watcherHandles||(O.__watcherHandles=[])}else if(!h){const O=()=>{};return O.stop=Rt,O.resume=Rt,O.pause=Rt,O}}const y=je;v.call=(O,ee,G)=>pt(O,y,ee,G);let _=!1;r==="post"?v.scheduler=O=>{Ze(O,y&&y.suspense)}:r!=="sync"&&(_=!0,v.scheduler=(O,ee)=>{ee?O():fo(O)}),v.augmentJob=O=>{t&&(O.flags|=4),_&&(O.flags|=2,y&&(O.id=y.uid,O.i=y))};const M=yu(e,t,v);return ms&&(b?b.push(M):h&&M()),M}function Su(e,t,s){const i=this.proxy,a=Se(e)?e.includes(".")?aa(i,e):()=>i[e]:e.bind(i,i);let r;Q(t)?r=t:(r=t.handler,s=t);const f=ks(this),v=ia(a,r.bind(i),s);return f(),v}function aa(e,t){const s=t.split(".");return()=>{let i=e;for(let a=0;a<s.length&&i;a++)i=i[s[a]];return i}}const Eu=Symbol("_vte"),cl=e=>e.__isTeleport,Ml=Symbol("_leaveCb");function Au(e){let t=e[0];if(e.length>1){for(const s of e)if(s.type!==Kt){t=s;break}}return t}function ra(e){if(!ho(e))return cl(e.type)&&e.children?Au(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:s}=e;if(s){if(t&16)return s[0];if(t&32&&Q(s.default))return s.default()}}function po(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;const s=e.component.subTree;po(cl(s.type)&&ra(s)||s,t)}else e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function vo(e,t){return Q(e)?Ne({name:e.name},t,{setup:e}):e}function ua(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Ko(e,t){let s;return!!((s=Object.getOwnPropertyDescriptor(e,t))&&!s.configurable)}const Ys=new WeakMap;function rs(e,t,s,i,a=!1){if(Y(e)){e.forEach((G,he)=>rs(G,t&&(Y(t)?t[he]:t),s,i,a));return}if(us(i)&&!a){i.shapeFlag&512&&i.type.__asyncResolved&&i.component.subTree.component&&rs(e,t,s,i.component.subTree);return}const r=i.shapeFlag&4?vl(i.component):i.el,f=a?null:r,{i:v,r:h}=e,b=t&&t.r,y=v.refs===ge?v.refs={}:v.refs,_=v.setupState,M=de(_),O=_===ge?Ti:G=>Ko(y,G)?!1:fe(M,G),ee=(G,he)=>!(he&&Ko(y,he));if(b!=null&&b!==h){if(qo(t),Se(b))y[b]=null,O(b)&&(_[b]=null);else if(Fe(b)){const G=t;ee(b,G.k)&&(b.value=null),G.k&&(y[G.k]=null)}}if(Q(h))ws(h,v,12,[f,y]);else{const G=Se(h),he=Fe(h);if(G||he){const re=()=>{if(e.f){const ne=G?O(h)?_[h]:y[h]:ee()||!e.k?h.value:y[e.k];if(a)Y(ne)&&eo(ne,r);else if(Y(ne))ne.includes(r)||ne.push(r);else if(G)y[h]=[r],O(h)&&(_[h]=y[h]);else{const te=[r];ee(h,e.k)&&(h.value=te),e.k&&(y[e.k]=te)}}else G?(y[h]=f,O(h)&&(_[h]=f)):he&&(ee(h,e.k)&&(h.value=f),e.k&&(y[e.k]=f))};if(f){const ne=()=>{re(),Ys.delete(e)};ne.id=-1,Ys.set(e,ne),Ze(ne,s)}else qo(e),re()}}}function qo(e){const t=Ys.get(e);t&&(t.flags|=8,Ys.delete(e))}al().requestIdleCallback;al().cancelIdleCallback;const us=e=>!!e.type.__asyncLoader,ho=e=>e.type.__isKeepAlive;function $u(e,t){ca(e,"a",t)}function Ru(e,t){ca(e,"da",t)}function ca(e,t,s=je){const i=e.__wdc||(e.__wdc=()=>{let a=s;for(;a;){if(a.isDeactivated)return;a=a.parent}return e()});if(dl(t,i,s),s){let a=s.parent;for(;a&&a.parent;)ho(a.parent.vnode)&&Iu(i,t,s,a),a=a.parent}}function Iu(e,t,s,i){const a=dl(t,e,i,!0);go(()=>{eo(i[t],a)},s)}function dl(e,t,s=je,i=!1){if(s){const a=s[e]||(s[e]=[]),r=t.__weh||(t.__weh=(...f)=>{Vt();const v=ks(s),h=pt(t,s,e,f);return v(),Wt(),h});return i?a.unshift(r):a.push(r),r}}const qt=e=>(t,s=je)=>{(!ms||e==="sp")&&dl(e,(...i)=>t(...i),s)},Tu=qt("bm"),da=qt("m"),Pu=qt("bu"),Mu=qt("u"),Nu=qt("bum"),go=qt("um"),Ou=qt("sp"),Lu=qt("rtg"),ju=qt("rtc");function Fu(e,t=je){dl("ec",e,t)}const fa="components";function Du(e,t){return va(fa,e,!0,t)||e}const pa=Symbol.for("v-ndc");function cs(e){return Se(e)?va(fa,e,!1)||e:e||pa}function va(e,t,s=!0,i=!1){const a=et||je;if(a){const r=a.type;{const v=Cc(r,!1);if(v&&(v===t||v===Be(t)||v===ol(Be(t))))return r}const f=Go(a[e]||r[e],t)||Go(a.appContext[e],t);return!f&&i?r:f}}function Go(e,t){return e&&(e[t]||e[Be(t)]||e[ol(Be(t))])}function j(e,t,s,i){let a;const r=s,f=Y(e);if(f||Se(e)){const v=f&&wn(e);let h=!1,b=!1;v&&(h=!ot(e),b=Bt(e),e=rl(e)),a=new Array(e.length);for(let y=0,_=e.length;y<_;y++)a[y]=t(h?b?jn(ft(e[y])):ft(e[y]):e[y],y,void 0,r)}else if(typeof e=="number"){a=new Array(e);for(let v=0;v<e;v++)a[v]=t(v+1,v,void 0,r)}else if(ve(e))if(e[Symbol.iterator])a=Array.from(e,(v,h)=>t(v,h,void 0,r));else{const v=Object.keys(e);a=new Array(v.length);for(let h=0,b=v.length;h<b;h++){const y=v[h];a[h]=t(e[y],y,h,r)}}else a=[];return a}const Gl=e=>e?Oa(e)?vl(e):Gl(e.parent):null,ds=Ne(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Gl(e.parent),$root:e=>Gl(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>ga(e),$forceUpdate:e=>e.f||(e.f=()=>{fo(e.update)}),$nextTick:e=>e.n||(e.n=zs.bind(e.proxy)),$watch:e=>Su.bind(e)}),Nl=(e,t)=>e!==ge&&!e.__isScriptSetup&&fe(e,t),Uu={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:s,setupState:i,data:a,props:r,accessCache:f,type:v,appContext:h}=e;if(t[0]!=="$"){const M=f[t];if(M!==void 0)switch(M){case 1:return i[t];case 2:return a[t];case 4:return s[t];case 3:return r[t]}else{if(Nl(i,t))return f[t]=1,i[t];if(a!==ge&&fe(a,t))return f[t]=2,a[t];if(fe(r,t))return f[t]=3,r[t];if(s!==ge&&fe(s,t))return f[t]=4,s[t];zl&&(f[t]=0)}}const b=ds[t];let y,_;if(b)return t==="$attrs"&&Le(e.attrs,"get",""),b(e);if((y=v.__cssModules)&&(y=y[t]))return y;if(s!==ge&&fe(s,t))return f[t]=4,s[t];if(_=h.config.globalProperties,fe(_,t))return _[t]},set({_:e},t,s){const{data:i,setupState:a,ctx:r}=e;return Nl(a,t)?(a[t]=s,!0):i!==ge&&fe(i,t)?(i[t]=s,!0):fe(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(r[t]=s,!0)},has({_:{data:e,setupState:t,accessCache:s,ctx:i,appContext:a,props:r,type:f}},v){let h;return!!(s[v]||e!==ge&&v[0]!=="$"&&fe(e,v)||Nl(t,v)||fe(r,v)||fe(i,v)||fe(ds,v)||fe(a.config.globalProperties,v)||(h=f.__cssModules)&&h[v])},defineProperty(e,t,s){return s.get!=null?e._.accessCache[t]=0:fe(s,"value")&&this.set(e,t,s.value,null),Reflect.defineProperty(e,t,s)}};function zo(e){return Y(e)?e.reduce((t,s)=>(t[s]=null,t),{}):e}let zl=!0;function Hu(e){const t=ga(e),s=e.proxy,i=e.ctx;zl=!1,t.beforeCreate&&Jo(t.beforeCreate,e,"bc");const{data:a,computed:r,methods:f,watch:v,provide:h,inject:b,created:y,beforeMount:_,mounted:M,beforeUpdate:O,updated:ee,activated:G,deactivated:he,beforeDestroy:re,beforeUnmount:ne,destroyed:te,unmounted:V,render:H,renderTracked:Ie,renderTriggered:Ae,errorCaptured:Te,serverPrefetch:Tt,expose:it,inheritAttrs:Qe,components:vt,directives:ht,filters:Ke}=t;if(b&&Vu(b,i,null),f)for(const q in f){const J=f[q];Q(J)&&(i[q]=J.bind(s))}if(a){const q=a.call(s,s);ve(q)&&(e.data=ro(q))}if(zl=!0,r)for(const q in r){const J=r[q],$e=Q(J)?J.bind(s,s):Q(J.get)?J.get.bind(s,s):Rt,Gt=!Q(J)&&Q(J.set)?J.set.bind(s):Rt,qe=ie({get:$e,set:Gt});Object.defineProperty(i,q,{enumerable:!0,configurable:!0,get:()=>qe.value,set:X=>qe.value=X})}if(v)for(const q in v)ha(v[q],i,s,q);if(h){const q=Q(h)?h.call(s):h;Reflect.ownKeys(q).forEach(J=>{_u(J,q[J])})}y&&Jo(y,e,"c");function me(q,J){Y(J)?J.forEach($e=>q($e.bind(s))):J&&q(J.bind(s))}if(me(Tu,_),me(da,M),me(Pu,O),me(Mu,ee),me($u,G),me(Ru,he),me(Fu,Te),me(ju,Ie),me(Lu,Ae),me(Nu,ne),me(go,V),me(Ou,Tt),Y(it))if(it.length){const q=e.exposed||(e.exposed={});it.forEach(J=>{Object.defineProperty(q,J,{get:()=>s[J],set:$e=>s[J]=$e,enumerable:!0})})}else e.exposed||(e.exposed={});H&&e.render===Rt&&(e.render=H),Qe!=null&&(e.inheritAttrs=Qe),vt&&(e.components=vt),ht&&(e.directives=ht),Tt&&ua(e)}function Vu(e,t,s=Rt){Y(e)&&(e=Jl(e));for(const i in e){const a=e[i];let r;ve(a)?"default"in a?r=is(a.from||i,a.default,!0):r=is(a.from||i):r=is(a),Fe(r)?Object.defineProperty(t,i,{enumerable:!0,configurable:!0,get:()=>r.value,set:f=>r.value=f}):t[i]=r}}function Jo(e,t,s){pt(Y(e)?e.map(i=>i.bind(t.proxy)):e.bind(t.proxy),t,s)}function ha(e,t,s,i){let a=i.includes(".")?aa(s,i):()=>s[i];if(Se(e)){const r=t[e];Q(r)&&as(a,r)}else if(Q(e))as(a,e.bind(s));else if(ve(e))if(Y(e))e.forEach(r=>ha(r,t,s,i));else{const r=Q(e.handler)?e.handler.bind(s):t[e.handler];Q(r)&&as(a,r,e)}}function ga(e){const t=e.type,{mixins:s,extends:i}=t,{mixins:a,optionsCache:r,config:{optionMergeStrategies:f}}=e.appContext,v=r.get(t);let h;return v?h=v:!a.length&&!s&&!i?h=t:(h={},a.length&&a.forEach(b=>Xs(h,b,f,!0)),Xs(h,t,f)),ve(t)&&r.set(t,h),h}function Xs(e,t,s,i=!1){const{mixins:a,extends:r}=t;r&&Xs(e,r,s,!0),a&&a.forEach(f=>Xs(e,f,s,!0));for(const f in t)if(!(i&&f==="expose")){const v=Wu[f]||s&&s[f];e[f]=v?v(e[f],t[f]):t[f]}return e}const Wu={data:Yo,props:Xo,emits:Xo,methods:ts,computed:ts,beforeCreate:Ve,created:Ve,beforeMount:Ve,mounted:Ve,beforeUpdate:Ve,updated:Ve,beforeDestroy:Ve,beforeUnmount:Ve,destroyed:Ve,unmounted:Ve,activated:Ve,deactivated:Ve,errorCaptured:Ve,serverPrefetch:Ve,components:ts,directives:ts,watch:Ku,provide:Yo,inject:Bu};function Yo(e,t){return t?e?function(){return Ne(Q(e)?e.call(this,this):e,Q(t)?t.call(this,this):t)}:t:e}function Bu(e,t){return ts(Jl(e),Jl(t))}function Jl(e){if(Y(e)){const t={};for(let s=0;s<e.length;s++)t[e[s]]=e[s];return t}return e}function Ve(e,t){return e?[...new Set([].concat(e,t))]:t}function ts(e,t){return e?Ne(Object.create(null),e,t):t}function Xo(e,t){return e?Y(e)&&Y(t)?[...new Set([...e,...t])]:Ne(Object.create(null),zo(e),zo(t??{})):t}function Ku(e,t){if(!e)return t;if(!t)return e;const s=Ne(Object.create(null),e);for(const i in t)s[i]=Ve(e[i],t[i]);return s}function ma(){return{app:null,config:{isNativeTag:Ti,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let qu=0;function Gu(e,t){return function(i,a=null){Q(i)||(i=Ne({},i)),a!=null&&!ve(a)&&(a=null);const r=ma(),f=new WeakSet,v=[];let h=!1;const b=r.app={_uid:qu++,_component:i,_props:a,_container:null,_context:r,_instance:null,version:Sc,get config(){return r.config},set config(y){},use(y,..._){return f.has(y)||(y&&Q(y.install)?(f.add(y),y.install(b,..._)):Q(y)&&(f.add(y),y(b,..._))),b},mixin(y){return r.mixins.includes(y)||r.mixins.push(y),b},component(y,_){return _?(r.components[y]=_,b):r.components[y]},directive(y,_){return _?(r.directives[y]=_,b):r.directives[y]},mount(y,_,M){if(!h){const O=b._ceVNode||se(i,a);return O.appContext=r,M===!0?M="svg":M===!1&&(M=void 0),e(O,y,M),h=!0,b._container=y,y.__vue_app__=b,vl(O.component)}},onUnmount(y){v.push(y)},unmount(){h&&(pt(v,b._instance,16),e(null,b._container),delete b._container.__vue_app__)},provide(y,_){return r.provides[y]=_,b},runWithContext(y){const _=Ln;Ln=b;try{return y()}finally{Ln=_}}};return b}}let Ln=null;const zu=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Be(t)}Modifiers`]||e[`${rn(t)}Modifiers`];function Ju(e,t,...s){if(e.isUnmounted)return;const i=e.vnode.props||ge;let a=s;const r=t.startsWith("update:"),f=r&&zu(i,t.slice(7));f&&(f.trim&&(a=s.map(y=>Se(y)?y.trim():y)),f.number&&(a=s.map(il)));let v,h=i[v=$l(t)]||i[v=$l(Be(t))];!h&&r&&(h=i[v=$l(rn(t))]),h&&pt(h,e,6,a);const b=i[v+"Once"];if(b){if(!e.emitted)e.emitted={};else if(e.emitted[v])return;e.emitted[v]=!0,pt(b,e,6,a)}}const Yu=new WeakMap;function ya(e,t,s=!1){const i=s?Yu:t.emitsCache,a=i.get(e);if(a!==void 0)return a;const r=e.emits;let f={},v=!1;if(!Q(e)){const h=b=>{const y=ya(b,t,!0);y&&(v=!0,Ne(f,y))};!s&&t.mixins.length&&t.mixins.forEach(h),e.extends&&h(e.extends),e.mixins&&e.mixins.forEach(h)}return!r&&!v?(ve(e)&&i.set(e,null),null):(Y(r)?r.forEach(h=>f[h]=null):Ne(f,r),ve(e)&&i.set(e,f),f)}function fl(e,t){return!e||!nl(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),fe(e,t[0].toLowerCase()+t.slice(1))||fe(e,rn(t))||fe(e,t))}function Zo(e){const{type:t,vnode:s,proxy:i,withProxy:a,propsOptions:[r],slots:f,attrs:v,emit:h,render:b,renderCache:y,props:_,data:M,setupState:O,ctx:ee,inheritAttrs:G}=e,he=Js(e);let re,ne;try{if(s.shapeFlag&4){const V=a||i,H=V;re=Et(b.call(H,V,y,_,O,M,ee)),ne=v}else{const V=t;re=Et(V.length>1?V(_,{attrs:v,slots:f,emit:h}):V(_,null)),ne=t.props?v:Xu(v)}}catch(V){kn.length=0,ul(V,e,1),re=se(Kt)}let te=re;if(ne&&G!==!1){const V=Object.keys(ne),{shapeFlag:H}=te;V.length&&H&7&&(r&&V.some(sl)&&(ne=Zu(ne,r)),te=Fn(te,ne,!1,!0))}if(s.dirs&&(te=Fn(te,null,!1,!0),te.dirs=te.dirs?te.dirs.concat(s.dirs):s.dirs),s.transition){const V=cl(te.type)&&ra(te)||te;po(V,s.transition)}return re=te,Js(he),re}const Xu=e=>{let t;for(const s in e)(s==="class"||s==="style"||nl(s))&&((t||(t={}))[s]=e[s]);return t},Zu=(e,t)=>{const s={};for(const i in e)(!sl(i)||!(i.slice(9)in t))&&(s[i]=e[i]);return s};function Qu(e,t,s){const{props:i,children:a,component:r}=e,{props:f,children:v,patchFlag:h}=t,b=r.emitsOptions;if(t.dirs||t.transition)return!0;if(s&&h>=0){if(h&1024)return!0;if(h&16)return i?Qo(i,f,b):!!f;if(h&8){const y=t.dynamicProps;for(let _=0;_<y.length;_++){const M=y[_];if(ba(f,i,M)&&!fl(b,M))return!0}}}else return(a||v)&&(!v||!v.$stable)?!0:i===f?!1:i?f?Qo(i,f,b):!0:!!f;return!1}function Qo(e,t,s){const i=Object.keys(t);if(i.length!==Object.keys(e).length)return!0;for(let a=0;a<i.length;a++){const r=i[a];if(ba(t,e,r)&&!fl(s,r))return!0}return!1}function ba(e,t,s){const i=e[s],a=t[s];return s==="style"&&ve(i)&&ve(a)?!Hn(i,a):i!==a}function ec({vnode:e,parent:t,suspense:s},i){for(;t;){const a=t.subTree;if(a.suspense&&a.suspense.activeBranch===e&&(a.suspense.vnode.el=a.el=i,e=a),a===e)(e=t.vnode).el=i,t=t.parent;else break}s&&s.activeBranch===e&&(s.vnode.el=i)}const wa={},ka=()=>Object.create(wa),_a=e=>Object.getPrototypeOf(e)===wa;function tc(e,t,s,i=!1){const a={},r=ka();e.propsDefaults=Object.create(null),Ca(e,t,a,r);for(const f in e.propsOptions[0])f in a||(a[f]=void 0);s?e.props=i?a:cu(a):e.type.props?e.props=a:e.props=r,e.attrs=r}function nc(e,t,s,i){const{props:a,attrs:r,vnode:{patchFlag:f}}=e,v=de(a),[h]=e.propsOptions;let b=!1;if((i||f>0)&&!(f&16)){if(f&8){const y=e.vnode.dynamicProps;for(let _=0;_<y.length;_++){let M=y[_];if(fl(e.emitsOptions,M))continue;const O=t[M];if(h)if(fe(r,M))O!==r[M]&&(r[M]=O,b=!0);else{const ee=Be(M);a[ee]=Yl(h,v,ee,O,e,!1)}else O!==r[M]&&(r[M]=O,b=!0)}}}else{Ca(e,t,a,r)&&(b=!0);let y;for(const _ in v)(!t||!fe(t,_)&&((y=rn(_))===_||!fe(t,y)))&&(h?s&&(s[_]!==void 0||s[y]!==void 0)&&(a[_]=Yl(h,v,_,void 0,e,!0)):delete a[_]);if(r!==v)for(const _ in r)(!t||!fe(t,_))&&(delete r[_],b=!0)}b&&Ut(e.attrs,"set","")}function Ca(e,t,s,i){const[a,r]=e.propsOptions;let f=!1,v;if(t)for(let h in t){if(ss(h))continue;const b=t[h];let y;a&&fe(a,y=Be(h))?!r||!r.includes(y)?s[y]=b:(v||(v={}))[y]=b:fl(e.emitsOptions,h)||(!(h in i)||b!==i[h])&&(i[h]=b,f=!0)}if(r){const h=de(s),b=v||ge;for(let y=0;y<r.length;y++){const _=r[y];s[_]=Yl(a,h,_,b[_],e,!fe(b,_))}}return f}function Yl(e,t,s,i,a,r){const f=e[s];if(f!=null){const v=fe(f,"default");if(v&&i===void 0){const h=f.default;if(f.type!==Function&&!f.skipFactory&&Q(h)){const{propsDefaults:b}=a;if(s in b)i=b[s];else{const y=ks(a);i=b[s]=h.call(null,t),y()}}else i=h;a.ce&&a.ce._setProp(s,i)}f[0]&&(r&&!v?i=!1:f[1]&&(i===""||i===rn(s))&&(i=!0))}return i}const sc=new WeakMap;function xa(e,t,s=!1){const i=s?sc:t.propsCache,a=i.get(e);if(a)return a;const r=e.props,f={},v=[];let h=!1;if(!Q(e)){const y=_=>{h=!0;const[M,O]=xa(_,t,!0);Ne(f,M),O&&v.push(...O)};!s&&t.mixins.length&&t.mixins.forEach(y),e.extends&&y(e.extends),e.mixins&&e.mixins.forEach(y)}if(!r&&!h)return ve(e)&&i.set(e,Mn),Mn;if(Y(r))for(let y=0;y<r.length;y++){const _=Be(r[y]);ei(_)&&(f[_]=ge)}else if(r)for(const y in r){const _=Be(y);if(ei(_)){const M=r[y],O=f[_]=Y(M)||Q(M)?{type:M}:Ne({},M),ee=O.type;let G=!1,he=!0;if(Y(ee))for(let re=0;re<ee.length;++re){const ne=ee[re],te=Q(ne)&&ne.name;if(te==="Boolean"){G=!0;break}else te==="String"&&(he=!1)}else G=Q(ee)&&ee.name==="Boolean";O[0]=G,O[1]=he,(G||fe(O,"default"))&&v.push(_)}}const b=[f,v];return ve(e)&&i.set(e,b),b}function ei(e){return e[0]!=="$"&&!ss(e)}const mo=e=>e==="_"||e==="_ctx"||e==="$stable",yo=e=>Y(e)?e.map(Et):[Et(e)],lc=(e,t,s)=>{if(t._n)return t;const i=oa((...a)=>yo(t(...a)),s);return i._c=!1,i},Sa=(e,t,s)=>{const i=e._ctx;for(const a in e){if(mo(a))continue;const r=e[a];if(Q(r))t[a]=lc(a,r,i);else if(r!=null){const f=yo(r);t[a]=()=>f}}},Ea=(e,t)=>{const s=yo(t);e.slots.default=()=>s},Aa=(e,t,s)=>{for(const i in t)(s||!mo(i))&&(e[i]=t[i])},oc=(e,t,s)=>{const i=e.slots=ka();if(e.vnode.shapeFlag&32){const a=t._;a?(Aa(i,t,s),s&&Oi(i,"_",a,!0)):Sa(t,i)}else t&&Ea(e,t)},ic=(e,t,s)=>{const{vnode:i,slots:a}=e;let r=!0,f=ge;if(i.shapeFlag&32){const v=t._;v?s&&v===1?r=!1:Aa(a,t,s):(r=!t.$stable,Sa(t,a)),f=t}else t&&(Ea(e,t),f={default:1});if(r)for(const v in a)!mo(v)&&f[v]==null&&delete a[v]},Ze=dc;function ac(e){return rc(e)}function rc(e,t){const s=al();s.__VUE__=!0;const{insert:i,remove:a,patchProp:r,createElement:f,createText:v,createComment:h,setText:b,setElementText:y,parentNode:_,nextSibling:M,setScopeId:O=Rt,insertStaticContent:ee}=e,G=(g,m,k,T=null,A=null,E=null,L=void 0,$=null,N=!!m.dynamicChildren)=>{if(g===m)return;g&&!Qn(g,m)&&(T=De(g),X(g,A,E,!0),g=null),m.patchFlag===-2&&(N=!1,m.dynamicChildren=null);const{type:R,ref:D,shapeFlag:F}=m;switch(R){case pl:he(g,m,k,T);break;case Kt:re(g,m,k,T);break;case Bs:g==null&&ne(m,k,T,L);break;case I:vt(g,m,k,T,A,E,L,$,N);break;default:F&1?H(g,m,k,T,A,E,L,$,N):F&6?ht(g,m,k,T,A,E,L,$,N):(F&64||F&128)&&R.process(g,m,k,T,A,E,L,$,N,gt)}D!=null&&A?rs(D,g&&g.ref,E,m||g,!m):D==null&&g&&g.ref!=null&&rs(g.ref,null,E,g,!0)},he=(g,m,k,T)=>{if(g==null)i(m.el=v(m.children),k,T);else{const A=m.el=g.el;m.children!==g.children&&b(A,m.children)}},re=(g,m,k,T)=>{g==null?i(m.el=h(m.children||""),k,T):m.el=g.el},ne=(g,m,k,T)=>{[g.el,g.anchor]=ee(g.children,m,k,T,g.el,g.anchor)},te=({el:g,anchor:m},k,T)=>{let A;for(;g&&g!==m;)A=M(g),i(g,k,T),g=A;i(m,k,T)},V=({el:g,anchor:m})=>{let k;for(;g&&g!==m;)k=M(g),a(g),g=k;a(m)},H=(g,m,k,T,A,E,L,$,N)=>{if(m.type==="svg"?L="svg":m.type==="math"&&(L="mathml"),g==null)Ie(m,k,T,A,E,L,$,N);else{const R=g.el&&g.el._isVueCE?g.el:null;try{R&&R._beginPatch(),Tt(g,m,A,E,L,$,N)}finally{R&&R._endPatch()}}},Ie=(g,m,k,T,A,E,L,$)=>{let N,R;const{props:D,shapeFlag:F,transition:U,dirs:K}=g;if(N=g.el=f(g.type,E,D&&D.is,D),F&8?y(N,g.children):F&16&&Te(g.children,N,null,T,A,Ol(g,E),L,$),K&&pn(g,null,T,"created"),Ae(N,g,g.scopeId,L,T),D){for(const ue in D)ue!=="value"&&!ss(ue)&&r(N,ue,null,D[ue],E,T);"value"in D&&r(N,"value",null,D.value,E),(R=D.onVnodeBeforeMount)&&kt(R,T,g)}K&&pn(g,null,T,"beforeMount");const oe=uc(A,U);oe&&U.beforeEnter(N),i(N,m,k),((R=D&&D.onVnodeMounted)||oe||K)&&Ze(()=>{R&&kt(R,T,g),oe&&U.enter(N),K&&pn(g,null,T,"mounted")},A)},Ae=(g,m,k,T,A)=>{if(k&&O(g,k),T)for(let E=0;E<T.length;E++)O(g,T[E]);if(A){let E=A.subTree;if(m===E||Ta(E.type)&&(E.ssContent===m||E.ssFallback===m)){const L=A.vnode;Ae(g,L,L.scopeId,L.slotScopeIds,A.parent)}}},Te=(g,m,k,T,A,E,L,$,N=0)=>{for(let R=N;R<g.length;R++){const D=g[R]=$?Dt(g[R]):Et(g[R]);G(null,D,m,k,T,A,E,L,$)}},Tt=(g,m,k,T,A,E,L)=>{const $=m.el=g.el;let{patchFlag:N,dynamicChildren:R,dirs:D}=m;N|=g.patchFlag&16;const F=g.props||ge,U=m.props||ge;let K;if(k&&vn(k,!1),(K=U.onVnodeBeforeUpdate)&&kt(K,k,m,g),D&&pn(m,g,k,"beforeUpdate"),k&&vn(k,!0),R&&(!g.dynamicChildren||g.dynamicChildren.length!==R.length)&&(N=0,L=!1,R=null),(F.innerHTML&&U.innerHTML==null||F.textContent&&U.textContent==null)&&y($,""),R?it(g.dynamicChildren,R,$,k,T,Ol(m,A),E):L||J(g,m,$,null,k,T,Ol(m,A),E,!1),N>0){if(N&16)Qe($,F,U,k,A);else if(N&2&&F.class!==U.class&&r($,"class",null,U.class,A),N&4&&r($,"style",F.style,U.style,A),N&8){const oe=m.dynamicProps;for(let ue=0;ue<oe.length;ue++){const Z=oe[ue],ke=F[Z],z=U[Z];(z!==ke||Z==="value")&&r($,Z,ke,z,A,k)}}N&1&&g.children!==m.children&&y($,m.children)}else!L&&R==null&&Qe($,F,U,k,A);((K=U.onVnodeUpdated)||D)&&Ze(()=>{K&&kt(K,k,m,g),D&&pn(m,g,k,"updated")},T)},it=(g,m,k,T,A,E,L)=>{for(let $=0;$<m.length;$++){const N=g[$],R=m[$],D=N.el&&(N.type===I||!Qn(N,R)||N.shapeFlag&198)?_(N.el):k;G(N,R,D,null,T,A,E,L,!0)}},Qe=(g,m,k,T,A)=>{if(m!==k){if(m!==ge)for(const E in m)!ss(E)&&!(E in k)&&r(g,E,m[E],null,A,T);for(const E in k){if(ss(E))continue;const L=k[E],$=m[E];L!==$&&E!=="value"&&r(g,E,$,L,A,T)}"value"in k&&r(g,"value",m.value,k.value,A)}},vt=(g,m,k,T,A,E,L,$,N)=>{const R=m.el=g?g.el:v(""),D=m.anchor=g?g.anchor:v("");let{patchFlag:F,dynamicChildren:U,slotScopeIds:K}=m;K&&($=$?$.concat(K):K),g==null?(i(R,k,T),i(D,k,T),Te(m.children||[],k,D,A,E,L,$,N)):F>0&&F&64&&U&&g.dynamicChildren&&g.dynamicChildren.length===U.length?(it(g.dynamicChildren,U,k,A,E,L,$),(m.key!=null||A&&m===A.subTree)&&$a(g,m,!0)):J(g,m,k,D,A,E,L,$,N)},ht=(g,m,k,T,A,E,L,$,N)=>{m.slotScopeIds=$,g==null?m.shapeFlag&512?A.ctx.activate(m,k,T,L,N):Ke(m,k,T,A,E,L,N):un(g,m,N)},Ke=(g,m,k,T,A,E,L)=>{const $=g.component=mc(g,T,A);if(ho(g)&&($.ctx.renderer=gt),bc($,!1,L),$.asyncDep){if(A&&A.registerDep($,me,L),!g.el){const N=$.subTree=se(Kt);re(null,N,m,k),g.placeholder=N.el}}else me($,g,m,k,A,E,L)},un=(g,m,k)=>{const T=m.component=g.component;if(Qu(g,m,k))if(T.asyncDep&&!T.asyncResolved){q(T,m,k);return}else T.next=m,T.update();else m.el=g.el,T.vnode=m},me=(g,m,k,T,A,E,L)=>{const $=()=>{if(g.isMounted){let{next:F,bu:U,u:K,parent:oe,vnode:ue}=g;{const Ge=Ra(g);if(Ge){F&&(F.el=ue.el,q(g,F,L)),Ge.asyncDep.then(()=>{Ze(()=>{g.isUnmounted||R()},A)});return}}let Z=F,ke;vn(g,!1),F?(F.el=ue.el,q(g,F,L)):F=ue,U&&Ws(U),(ke=F.props&&F.props.onVnodeBeforeUpdate)&&kt(ke,oe,F,ue),vn(g,!0);const z=Zo(g),ce=g.subTree;g.subTree=z,G(ce,z,_(ce.el),De(ce),g,A,E),F.el=z.el,Z===null&&ec(g,z.el),K&&Ze(K,A),(ke=F.props&&F.props.onVnodeUpdated)&&Ze(()=>kt(ke,oe,F,ue),A)}else{let F;const{el:U,props:K}=m,{bm:oe,m:ue,parent:Z,root:ke,type:z}=g,ce=us(m);vn(g,!1),oe&&Ws(oe),!ce&&(F=K&&K.onVnodeBeforeMount)&&kt(F,Z,m),vn(g,!0);{ke.ce&&ke.ce._hasShadowRoot()&&ke.ce._injectChildStyle(z,g.parent?g.parent.type:void 0);const Ge=g.subTree=Zo(g);G(null,Ge,k,T,g,A,E),m.el=Ge.el}if(ue&&Ze(ue,A),!ce&&(F=K&&K.onVnodeMounted)){const Ge=m;Ze(()=>kt(F,Z,Ge),A)}(m.shapeFlag&256||Z&&us(Z.vnode)&&Z.vnode.shapeFlag&256)&&g.a&&Ze(g.a,A),g.isMounted=!0,m=k=T=null}};g.scope.on();const N=g.effect=new Di($);g.scope.off();const R=g.update=N.run.bind(N),D=g.job=N.runIfDirty.bind(N);D.i=g,D.id=g.uid,N.scheduler=()=>fo(D),vn(g,!0),R()},q=(g,m,k)=>{m.component=g;const T=g.vnode.props;g.vnode=m,g.next=null,nc(g,m.props,T,k),ic(g,m.children,k),Vt(),Bo(g),Wt()},J=(g,m,k,T,A,E,L,$,N=!1)=>{const R=g&&g.children,D=g?g.shapeFlag:0,F=m.children,{patchFlag:U,shapeFlag:K}=m;if(U>0){if(U&128){Gt(R,F,k,T,A,E,L,$,N);return}else if(U&256){$e(R,F,k,T,A,E,L,$,N);return}}K&8?(D&16&&nt(R,A,E),F!==R&&y(k,F)):D&16?K&16?Gt(R,F,k,T,A,E,L,$,N):nt(R,A,E,!0):(D&8&&y(k,""),K&16&&Te(F,k,T,A,E,L,$,N))},$e=(g,m,k,T,A,E,L,$,N)=>{g=g||Mn,m=m||Mn;const R=g.length,D=m.length,F=Math.min(R,D);let U;for(U=0;U<F;U++){const K=m[U]=N?Dt(m[U]):Et(m[U]);G(g[U],K,k,null,A,E,L,$,N)}R>D?nt(g,A,E,!0,!1,F):Te(m,k,T,A,E,L,$,N,F)},Gt=(g,m,k,T,A,E,L,$,N)=>{let R=0;const D=m.length;let F=g.length-1,U=D-1;for(;R<=F&&R<=U;){const K=g[R],oe=m[R]=N?Dt(m[R]):Et(m[R]);if(Qn(K,oe))G(K,oe,k,null,A,E,L,$,N);else break;R++}for(;R<=F&&R<=U;){const K=g[F],oe=m[U]=N?Dt(m[U]):Et(m[U]);if(Qn(K,oe))G(K,oe,k,null,A,E,L,$,N);else break;F--,U--}if(R>F){if(R<=U){const K=U+1,oe=K<D?m[K].el:T;for(;R<=U;)G(null,m[R]=N?Dt(m[R]):Et(m[R]),k,oe,A,E,L,$,N),R++}}else if(R>U)for(;R<=F;)X(g[R],A,E,!0),R++;else{const K=R,oe=R,ue=new Map;for(R=oe;R<=U;R++){const ye=m[R]=N?Dt(m[R]):Et(m[R]);ye.key!=null&&ue.set(ye.key,R)}let Z,ke=0;const z=U-oe+1;let ce=!1,Ge=0;const mt=new Array(z);for(R=0;R<z;R++)mt[R]=0;for(R=K;R<=F;R++){const ye=g[R];if(ke>=z){X(ye,A,E,!0);continue}let ze;if(ye.key!=null)ze=ue.get(ye.key);else for(Z=oe;Z<=U;Z++)if(mt[Z-oe]===0&&Qn(ye,m[Z])){ze=Z;break}ze===void 0?X(ye,A,E,!0):(mt[ze-oe]=R+1,ze>=Ge?Ge=ze:ce=!0,G(ye,m[ze],k,null,A,E,L,$,N),ke++)}const Cn=ce?cc(mt):Mn;for(Z=Cn.length-1,R=z-1;R>=0;R--){const ye=oe+R,ze=m[ye],dn=m[ye+1],yt=ye+1<D?dn.el||Ia(dn):T;mt[R]===0?G(null,ze,k,yt,A,E,L,$,N):ce&&(Z<0||R!==Cn[Z]?qe(ze,k,yt,2):Z--)}}},qe=(g,m,k,T,A=null)=>{const{el:E,type:L,transition:$,children:N,shapeFlag:R}=g;if(R&6){qe(g.component.subTree,m,k,T);return}if(R&128){g.suspense.move(m,k,T);return}if(R&64){L.move(g,m,k,gt);return}if(L===I){i(E,m,k);for(let F=0;F<N.length;F++)qe(N[F],m,k,T);i(g.anchor,m,k);return}if(L===Bs){te(g,m,k);return}if(T!==2&&R&1&&$)if(T===0)$.persisted&&!E[Ml]?i(E,m,k):($.beforeEnter(E),i(E,m,k),Ze(()=>$.enter(E),A));else{const{leave:F,delayLeave:U,afterLeave:K}=$,oe=()=>{g.ctx.isUnmounted?a(E):i(E,m,k)},ue=()=>{const Z=E._isLeaving||!!E[Ml];E._isLeaving&&E[Ml](!0),$.persisted&&!Z?oe():F(E,()=>{oe(),K&&K()})};U?U(E,oe,ue):ue()}else i(E,m,k)},X=(g,m,k,T=!1,A=!1)=>{const{type:E,props:L,ref:$,children:N,dynamicChildren:R,shapeFlag:D,patchFlag:F,dirs:U,cacheIndex:K,memo:oe}=g;if(F===-2&&(A=!1),$!=null&&(Vt(),rs($,null,k,g,!0),Wt()),K!=null&&(m.renderCache[K]=void 0),D&256){m.ctx.deactivate(g);return}const ue=D&1&&U,Z=!us(g);let ke;if(Z&&(ke=L&&L.onVnodeBeforeUnmount)&&kt(ke,m,g),D&6)zt(g.component,k,T);else{if(D&128){g.suspense.unmount(k,T);return}ue&&pn(g,null,m,"beforeUnmount"),D&64?g.type.remove(g,m,k,gt,T):R&&!R.hasOnce&&(E!==I||F>0&&F&64)?nt(R,m,k,!1,!0):(E===I&&F&384||!A&&D&16)&&nt(N,m,k),T&&Pt(g)}const z=oe!=null&&K==null;(Z&&(ke=L&&L.onVnodeUnmounted)||ue||z)&&Ze(()=>{ke&&kt(ke,m,g),ue&&pn(g,null,m,"unmounted"),z&&(g.el=null)},k)},Pt=g=>{const{type:m,el:k,anchor:T,transition:A}=g;if(m===I){_n(k,T);return}if(m===Bs){V(g);return}const E=()=>{a(k),A&&!A.persisted&&A.afterLeave&&A.afterLeave()};if(g.shapeFlag&1&&A&&!A.persisted){const{leave:L,delayLeave:$}=A,N=()=>L(k,E);$?$(g.el,E,N):N()}else E()},_n=(g,m)=>{let k;for(;g!==m;)k=M(g),a(g),g=k;a(m)},zt=(g,m,k)=>{const{bum:T,scope:A,job:E,subTree:L,um:$,m:N,a:R}=g;ti(N),ti(R),T&&Ws(T),A.stop(),E&&(E.flags|=8,X(L,g,m,k)),$&&Ze($,m),Ze(()=>{g.isUnmounted=!0},m)},nt=(g,m,k,T=!1,A=!1,E=0)=>{for(let L=E;L<g.length;L++)X(g[L],m,k,T,A)},De=g=>{if(g.shapeFlag&6)return De(g.component.subTree);if(g.shapeFlag&128)return g.suspense.next();const m=M(g.anchor||g.el),k=m&&m[Eu];return k?M(k):m};let Jt=!1;const Mt=(g,m,k)=>{let T;g==null?m._vnode&&(X(m._vnode,null,null,!0),T=m._vnode.component):G(m._vnode||null,g,m,null,null,null,k),m._vnode=g,Jt||(Jt=!0,Bo(T),na(),Jt=!1)},gt={p:G,um:X,m:qe,r:Pt,mt:Ke,mc:Te,pc:J,pbc:it,n:De,o:e};return{render:Mt,hydrate:void 0,createApp:Gu(Mt)}}function Ol({type:e,props:t},s){return s==="svg"&&e==="foreignObject"||s==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:s}function vn({effect:e,job:t},s){s?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function uc(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function $a(e,t,s=!1){const i=e.children,a=t.children;if(Y(i)&&Y(a))for(let r=0;r<i.length;r++){const f=i[r];let v=a[r];v.shapeFlag&1&&!v.dynamicChildren&&((v.patchFlag<=0||v.patchFlag===32)&&(v=a[r]=Dt(a[r]),v.el=f.el),!s&&v.patchFlag!==-2&&$a(f,v)),v.type===pl&&(v.patchFlag===-1&&(v=a[r]=Dt(v)),v.el=f.el),v.type===Kt&&!v.el&&(v.el=f.el)}}function cc(e){const t=e.slice(),s=[0];let i,a,r,f,v;const h=e.length;for(i=0;i<h;i++){const b=e[i];if(b!==0){if(a=s[s.length-1],e[a]<b){t[i]=a,s.push(i);continue}for(r=0,f=s.length-1;r<f;)v=r+f>>1,e[s[v]]<b?r=v+1:f=v;b<e[s[r]]&&(r>0&&(t[i]=s[r-1]),s[r]=i)}}for(r=s.length,f=s[r-1];r-- >0;)s[r]=f,f=t[f];return s}function Ra(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Ra(t)}function ti(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function Ia(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?Ia(t.subTree):null}const Ta=e=>e.__isSuspense;function dc(e,t){t&&t.pendingBranch?Y(e)?t.effects.push(...e):t.effects.push(e):ku(e)}const I=Symbol.for("v-fgt"),pl=Symbol.for("v-txt"),Kt=Symbol.for("v-cmt"),Bs=Symbol.for("v-stc"),kn=[];let tt=null;function d(e=!1){kn.push(tt=e?null:[])}function Pa(){kn.pop(),tt=kn[kn.length-1]||null}let hs=1;function Zs(e,t=!1){hs+=e,e<0&&tt&&t&&(tt.hasOnce=!0)}function Ma(e){return e.dynamicChildren=hs>0?tt||Mn:null,Pa(),hs>0&&tt&&tt.push(e),e}function p(e,t,s,i,a,r){return Ma(n(e,t,s,i,a,r,!0))}function St(e,t,s,i,a){return Ma(se(e,t,s,i,a,!0))}function Qs(e){return e?e.__v_isVNode===!0:!1}function Qn(e,t){return e.type===t.type&&e.key===t.key}const Na=({key:e})=>e??null,Ks=({ref:e,ref_key:t,ref_for:s})=>(typeof e=="number"&&(e=""+e),e!=null?Se(e)||Fe(e)||Q(e)?{i:et,r:e,k:t,f:!!s}:e:null);function n(e,t=null,s=null,i=0,a=null,r=e===I?0:1,f=!1,v=!1){const h={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Na(t),ref:t&&Ks(t),scopeId:la,slotScopeIds:null,children:s,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:r,patchFlag:i,dynamicProps:a,dynamicChildren:null,appContext:null,ctx:et};return v?(el(h,s),r&128&&e.normalize(h)):s&&(h.shapeFlag|=Se(s)?8:16),hs>0&&!f&&tt&&(h.patchFlag>0||r&6)&&h.patchFlag!==32&&tt.push(h),h}const se=fc;function fc(e,t=null,s=null,i=0,a=null,r=!1){if((!e||e===pa)&&(e=Kt),Qs(e)){const v=Fn(e,t,!0);return s&&el(v,s),hs>0&&!r&&tt&&(v.shapeFlag&6?tt[tt.indexOf(e)]=v:tt.push(v)),v.patchFlag=-2,v}if(xc(e)&&(e=e.__vccOpts),t){t=pc(t);let{class:v,style:h}=t;v&&!Se(v)&&(t.class=x(v)),ve(h)&&(co(h)&&!Y(h)&&(h=Ne({},h)),t.style=yn(h))}const f=Se(e)?1:Ta(e)?128:cl(e)?64:ve(e)?4:Q(e)?2:0;return n(e,t,s,i,a,f,r,!0)}function pc(e){return e?co(e)||_a(e)?Ne({},e):e:null}function Fn(e,t,s=!1,i=!1){const{props:a,ref:r,patchFlag:f,children:v,transition:h}=e,b=t?vc(a||{},t):a,y={__v_isVNode:!0,__v_skip:!0,type:e.type,props:b,key:b&&Na(b),ref:t&&t.ref?s&&r?Y(r)?r.concat(Ks(t)):[r,Ks(t)]:Ks(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:v,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==I?f===-1?16:f|16:f,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:h,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Fn(e.ssContent),ssFallback:e.ssFallback&&Fn(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return h&&i&&po(y,h.clone(y)),y}function B(e=" ",t=0){return se(pl,null,e,t)}function Ll(e,t){const s=se(Bs,null,e);return s.staticCount=t,s}function S(e="",t=!1){return t?(d(),St(Kt,null,e)):se(Kt,null,e)}function Et(e){return e==null||typeof e=="boolean"?se(Kt):Y(e)?se(I,null,e.slice()):Qs(e)?Dt(e):se(pl,null,String(e))}function Dt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Fn(e)}function el(e,t){let s=0;const{shapeFlag:i}=e;if(t==null)t=null;else if(Y(t))s=16;else if(typeof t=="object")if(i&65){const a=t.default;a&&(a._c&&(a._d=!1),el(e,a()),a._c&&(a._d=!0));return}else{s=32;const a=t._;!a&&!_a(t)?t._ctx=et:a===3&&et&&(et.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(Q(t)){if(i&65){el(e,{default:t});return}t={default:t,_ctx:et},s=32}else t=String(t),i&64?(s=16,t=[B(t)]):s=8;e.children=t,e.shapeFlag|=s}function vc(...e){const t={};for(let s=0;s<e.length;s++){const i=e[s];for(const a in i)if(a==="class")t.class!==i.class&&(t.class=x([t.class,i.class]));else if(a==="style")t.style=yn([t.style,i.style]);else if(nl(a)){const r=t[a],f=i[a];f&&r!==f&&!(Y(r)&&r.includes(f))?t[a]=r?[].concat(r,f):f:f==null&&r==null&&!sl(a)&&(t[a]=f)}else a!==""&&(t[a]=i[a])}return t}function kt(e,t,s,i=null){pt(e,t,7,[s,i])}const hc=ma();let gc=0;function mc(e,t,s){const i=e.type,a=(t?t.appContext:e.appContext)||hc,r={uid:gc++,vnode:e,type:i,parent:t,appContext:a,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Kr(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(a.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:xa(i,a),emitsOptions:ya(i,a),emit:null,emitted:null,propsDefaults:ge,inheritAttrs:i.inheritAttrs,ctx:ge,data:ge,props:ge,attrs:ge,slots:ge,refs:ge,setupState:ge,setupContext:null,suspense:s,suspenseId:s?s.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return r.ctx={_:r},r.root=t?t.root:r,r.emit=Ju.bind(null,r),e.ce&&e.ce(r),r}let je=null;const yc=()=>je||et;let tl,gs;{const e=al(),t=(s,i)=>{let a;return(a=e[s])||(a=e[s]=[]),a.push(i),r=>{a.length>1?a.forEach(f=>f(r)):a[0](r)}};tl=t("__VUE_INSTANCE_SETTERS__",s=>je=s),gs=t("__VUE_SSR_SETTERS__",s=>ms=s)}const ks=e=>{const t=je;return tl(e),e.scope.on(),()=>{e.scope.off(),tl(t)}},ni=()=>{je&&je.scope.off(),tl(null)};function Oa(e){return e.vnode.shapeFlag&4}let ms=!1;function bc(e,t=!1,s=!1){t&&gs(t);const{props:i,children:a}=e.vnode,r=Oa(e);tc(e,i,r,t),oc(e,a,s||t);const f=r?wc(e,t):void 0;return t&&gs(!1),f}function wc(e,t){const s=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Uu);const{setup:i}=s;if(i){Vt();const a=e.setupContext=i.length>1?_c(e):null,r=ks(e),f=ws(i,e,0,[e.props,a]),v=Pi(f);if(Wt(),r(),(v||e.sp)&&!us(e)&&ua(e),v){if(f.then(ni,ni),t)return f.then(h=>{gs(!0);try{si(e,h,t)}finally{gs(!1)}}).catch(h=>{ul(h,e,0)});e.asyncDep=f}else si(e,f)}else La(e)}function si(e,t,s){Q(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:ve(t)&&(e.setupState=Qi(t)),La(e)}function La(e,t,s){const i=e.type;e.render||(e.render=i.render||Rt);{const a=ks(e);Vt();try{Hu(e)}finally{Wt(),a()}}}const kc={get(e,t){return Le(e,"get",""),e[t]}};function _c(e){const t=s=>{e.exposed=s||{}};return{attrs:new Proxy(e.attrs,kc),slots:e.slots,emit:e.emit,expose:t}}function vl(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Qi(du(e.exposed)),{get(t,s){if(s in t)return t[s];if(s in ds)return ds[s](e)},has(t,s){return s in t||s in ds}})):e.proxy}function Cc(e,t=!0){return Q(e)?e.displayName||e.name:e.name||t&&e.__name}function xc(e){return Q(e)&&"__vccOpts"in e}const ie=(e,t)=>gu(e,t,ms);function Xl(e,t,s){try{Zs(-1);const i=arguments.length;return i===2?ve(t)&&!Y(t)?Qs(t)?se(e,null,[t]):se(e,t):se(e,null,t):(i>3?s=Array.prototype.slice.call(arguments,2):i===3&&Qs(s)&&(s=[s]),se(e,t,s))}finally{Zs(1)}}const Sc="3.5.41";let Zl;const li=typeof window<"u"&&window.trustedTypes;if(li)try{Zl=li.createPolicy("vue",{createHTML:e=>e})}catch{}const ja=Zl?e=>Zl.createHTML(e):e=>e,Ec="http://www.w3.org/2000/svg",Ac="http://www.w3.org/1998/Math/MathML",Ft=typeof document<"u"?document:null,oi=Ft&&Ft.createElement("template"),$c={insert:(e,t,s)=>{t.insertBefore(e,s||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,s,i)=>{const a=t==="svg"?Ft.createElementNS(Ec,e):t==="mathml"?Ft.createElementNS(Ac,e):s?Ft.createElement(e,{is:s}):Ft.createElement(e);return e==="select"&&i&&i.multiple!=null&&a.setAttribute("multiple",i.multiple),a},createText:e=>Ft.createTextNode(e),createComment:e=>Ft.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Ft.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,s,i,a,r){const f=s?s.previousSibling:t.lastChild;if(a&&(a===r||a.nextSibling))for(;t.insertBefore(a.cloneNode(!0),s),!(a===r||!(a=a.nextSibling)););else{oi.innerHTML=ja(i==="svg"?`<svg>${e}</svg>`:i==="mathml"?`<math>${e}</math>`:e);const v=oi.content;if(i==="svg"||i==="mathml"){const h=v.firstChild;for(;h.firstChild;)v.appendChild(h.firstChild);v.removeChild(h)}t.insertBefore(v,s)}return[f?f.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}},Rc=Symbol("_vtc");function Ic(e,t,s){const i=e[Rc];i&&(t=(t?[t,...i]:[...i]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}const ii=Symbol("_vod"),Tc=Symbol("_vsh"),Pc=Symbol(""),Mc=/(?:^|;)\s*display\s*:/;function Nc(e,t,s){const i=e.style,a=Se(s);let r=!1;if(s&&!a){if(t)if(Se(t))for(const f of t.split(";")){const v=f.slice(0,f.indexOf(":")).trim();s[v]==null&&ns(i,v,"")}else for(const f in t)s[f]==null&&ns(i,f,"");for(const f in s){f==="display"&&(r=!0);const v=s[f];v!=null?Lc(e,f,!Se(t)&&t?t[f]:void 0,v)||ns(i,f,v):ns(i,f,"")}}else if(a){if(t!==s){const f=i[Pc];f&&(s+=";"+f),i.cssText=s,r=Mc.test(s)}}else t&&e.removeAttribute("style");ii in e&&(e[ii]=r?i.display:"",e[Tc]&&(i.display="none"))}const ai=/\s*!important$/;function ns(e,t,s){if(Y(s))s.forEach(i=>ns(e,t,i));else if(s==null&&(s=""),t.startsWith("--"))e.setProperty(t,s);else{const i=Oc(e,t);ai.test(s)?e.setProperty(rn(i),s.replace(ai,""),"important"):e[i]=s}}const ri=["Webkit","Moz","ms"],jl={};function Oc(e,t){const s=jl[t];if(s)return s;let i=Be(t);if(i!=="filter"&&i in e)return jl[t]=i;i=ol(i);for(let a=0;a<ri.length;a++){const r=ri[a]+i;if(r in e)return jl[t]=r}return t}function Lc(e,t,s,i){return e.tagName==="TEXTAREA"&&(t==="width"||t==="height")&&Se(i)&&s===i}const ui="http://www.w3.org/1999/xlink";function ci(e,t,s,i,a,r=Wr(t)){i&&t.startsWith("xlink:")?s==null?e.removeAttributeNS(ui,t.slice(6,t.length)):e.setAttributeNS(ui,t,s):s==null||r&&!Li(s)?e.removeAttribute(t):e.setAttribute(t,r?"":It(s)?String(s):s)}function di(e,t,s,i,a){if(t==="innerHTML"||t==="textContent"){s!=null&&(e[t]=t==="innerHTML"?ja(s):s);return}const r=e.tagName;if(t==="value"&&r!=="PROGRESS"&&!r.includes("-")){const v=r==="OPTION"?e.getAttribute("value")||"":e.value,h=s==null?e.type==="checkbox"?"on":"":String(s);(v!==h||!("_value"in e))&&(e.value=h),s==null&&e.removeAttribute(t),e._value=s;return}let f=!1;if(s===""||s==null){const v=typeof e[t];v==="boolean"?s=Li(s):s==null&&v==="string"?(s="",f=!0):v==="number"&&(s=0,f=!0)}try{e[t]=s}catch{}f&&e.removeAttribute(a||t)}function an(e,t,s,i){e.addEventListener(t,s,i)}function jc(e,t,s,i){e.removeEventListener(t,s,i)}const fi=Symbol("_vei");function Fc(e,t,s,i,a=null){const r=e[fi]||(e[fi]={}),f=r[t];if(i&&f)f.value=i;else{const[v,h]=Hc(t);if(i){const b=r[t]=Bc(i,a);an(e,v,b,h)}else f&&(jc(e,v,f,h),r[t]=void 0)}}const Dc=/(Once|Passive|Capture)$/,Uc=/^on:?(?:Once|Passive|Capture)$/;function Hc(e){let t,s;for(;(s=e.match(Dc))&&!Uc.test(e);)t||(t={}),e=e.slice(0,e.length-s[1].length),t[s[1].toLowerCase()]=!0;return[e[2]===":"?e.slice(3):rn(e.slice(2)),t]}let Fl=0;const Vc=Promise.resolve(),Wc=()=>Fl||(Vc.then(()=>Fl=0),Fl=Date.now());function Bc(e,t){const s=i=>{if(!i._vts)i._vts=Date.now();else if(i._vts<=s.attached)return;const a=s.value;if(Y(a)){const r=i.stopImmediatePropagation;i.stopImmediatePropagation=()=>{r.call(i),i._stopped=!0};const f=a.slice(),v=[i];for(let h=0;h<f.length&&!i._stopped;h++){const b=f[h];b&&pt(b,t,5,v)}}else pt(a,t,5,[i])};return s.value=e,s.attached=Wc(),s}const pi=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Kc=(e,t,s,i,a,r)=>{const f=a==="svg";t==="class"?Ic(e,i,f):t==="style"?Nc(e,s,i):nl(t)?sl(t)||Fc(e,t,s,i,r):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):qc(e,t,i,f))?(di(e,t,i),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&ci(e,t,i,f,r,t!=="value")):e._isVueCE&&(Gc(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!Se(i)))?di(e,Be(t),i,r,t):(t==="true-value"?e._trueValue=i:t==="false-value"&&(e._falseValue=i),ci(e,t,i,f))};function qc(e,t,s,i){if(i)return!!(t==="innerHTML"||t==="textContent"||t in e&&pi(t)&&Q(s));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const a=e.tagName;if(a==="IMG"||a==="VIDEO"||a==="CANVAS"||a==="SOURCE")return!1}return pi(t)&&Se(s)?!1:t in e}function Gc(e,t){const s=e._def.props;if(!s)return!1;const i=Be(t);return Array.isArray(s)?s.some(a=>Be(a)===i):Object.keys(s).some(a=>Be(a)===i)}const Dn=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Y(t)?s=>Ws(t,s):t};function zc(e){e.target.composing=!0}function vi(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const $t=Symbol("_assign"),Hs=Symbol("_initialValue");function Dl(e,t,s){return t&&(e=e.trim()),s&&(e=il(e)),e}const ct={created(e,{modifiers:{lazy:t,trim:s,number:i}},a){e.parentNode&&(e.type==="text"?e[Hs]=e.defaultValue.replace(/[\r\n]/g,""):e.type==="textarea"&&(e[Hs]=e.defaultValue.replace(/\r\n?/g,`
|
|
2
|
+
`))),e[$t]=Dn(a);const r=i||a.props&&a.props.type==="number";an(e,t?"change":"input",f=>{f.target.composing||e[$t](Dl(e.value,s,r))}),(s||r)&&an(e,"change",()=>{e.value=Dl(e.value,s,r)}),t||(an(e,"compositionstart",zc),an(e,"compositionend",vi),an(e,"change",vi))},mounted(e,{value:t,modifiers:{trim:s,number:i}}){const a=t??"",r=e[Hs];delete e[Hs],r!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==r?e[$t](Dl(e.value,s,i)):e.value=a},beforeUpdate(e,{value:t,oldValue:s,modifiers:{lazy:i,trim:a,number:r}},f){if(e[$t]=Dn(f),e.composing)return;const v=(r||e.type==="number")&&!/^0\d/.test(e.value)?il(e.value):e.value,h=t??"";if(v===h)return;const b=e.getRootNode();(b instanceof Document||b instanceof ShadowRoot)&&b.activeElement===e&&e.type!=="range"&&(i&&t===s||a&&e.value.trim()===h)||(e.value=h)}},Jc={deep:!0,created(e,t,s){e[$t]=Dn(s),an(e,"change",()=>{const i=e._modelValue,a=ys(e),r=e.checked,f=e[$t];if(Y(i)){const v=no(i,a),h=v!==-1;if(r&&!h)f(i.concat(a));else if(!r&&h){const b=[...i];b.splice(v,1),f(b)}}else if(Un(i)){const v=new Set(i);r?v.add(a):v.delete(a),f(v)}else f(Fa(e,r))})},mounted:hi,beforeUpdate(e,t,s){e[$t]=Dn(s),hi(e,t,s)}};function hi(e,{value:t,oldValue:s},i){e._modelValue=t;let a;if(Y(t))a=no(t,i.props.value)>-1;else if(Un(t))a=t.has(i.props.value);else{if(t===s)return;a=Hn(t,Fa(e,!0))}e.checked!==a&&(e.checked=a)}const gi={deep:!0,created(e,{value:t,modifiers:{number:s}},i){e._modelValue=t,an(e,"change",()=>{const a=Array.prototype.filter.call(e.options,r=>r.selected).map(r=>s?il(ys(r)):ys(r));e[$t](e.multiple?Un(e._modelValue)?new Set(a):a:a[0]),e._assigning=!0,zs(()=>{e._assigning=!1})}),e[$t]=Dn(i)},mounted(e,{value:t}){mi(e,t)},beforeUpdate(e,{value:t},s){e._modelValue=t,e[$t]=Dn(s)},updated(e,{value:t}){e._assigning||mi(e,t)}};function mi(e,t){const s=e.multiple,i=Y(t);if(!(s&&!i&&!Un(t))){for(let a=0,r=e.options.length;a<r;a++){const f=e.options[a],v=ys(f);if(s)if(i){const h=typeof v;h==="string"||h==="number"?f.selected=t.some(b=>String(b)===String(v)):f.selected=no(t,v)>-1}else f.selected=t.has(v);else if(Hn(ys(f),t)){e.selectedIndex!==a&&(e.selectedIndex=a);return}}!s&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function ys(e){return"_value"in e?e._value:e.value}function Fa(e,t){const s=t?"_trueValue":"_falseValue";return s in e?e[s]:t}const Yc=["ctrl","shift","alt","meta"],Xc={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Yc.some(s=>e[`${s}Key`]&&!t.includes(s))},_t=(e,t)=>{if(!e)return e;const s=e._withMods||(e._withMods={}),i=t.join(".");return s[i]||(s[i]=((a,...r)=>{for(let f=0;f<t.length;f++){const v=Xc[t[f]];if(v&&v(a,t))return}return e(a,...r)}))},Zc={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},hn=(e,t)=>{const s=e._withKeys||(e._withKeys={}),i=t.join(".");return s[i]||(s[i]=(a=>{if(!("key"in a))return;const r=rn(a.key);if(t.some(f=>f===r||Zc[f]===r))return e(a)}))},Qc=Ne({patchProp:Kc},$c);let yi;function ed(){return yi||(yi=ac(Qc))}const td=((...e)=>{const t=ed().createApp(...e),{mount:s}=t;return t.mount=i=>{const a=sd(i);if(!a)return;const r=t._component;!Q(r)&&!r.render&&!r.template&&(r.template=a.innerHTML),a.nodeType===1&&(a.textContent="");const f=s(a,!1,nd(a));return a instanceof Element&&(a.removeAttribute("v-cloak"),a.setAttribute("data-v-app","")),f},t});function nd(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function sd(e){return Se(e)?document.querySelector(e):e}const bi=e=>e==="";const ld=(...e)=>e.filter((t,s,i)=>!!t&&t.trim()!==""&&i.indexOf(t)===s).join(" ").trim();const wi=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const od=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,s,i)=>i?i.toUpperCase():s.toLowerCase());const id=e=>{const t=od(e);return t.charAt(0).toUpperCase()+t.slice(1)};var Tn={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};const ad=Symbol("lucide-icons");function rd(){return is(ad,{})}const ud=({name:e,iconNode:t,"icon-node":s,absoluteStrokeWidth:i,"absolute-stroke-width":a,strokeWidth:r,"stroke-width":f,size:v,color:h,...b},{slots:y})=>{const{size:_,color:M,strokeWidth:O=2,absoluteStrokeWidth:ee=!1,class:G=""}=rd(),he=ie(()=>{const re=bi(i)||bi(a)||i===!0||a===!0||ee===!0,ne=r||f||O||Tn["stroke-width"];return re?Number(ne)*24/Number(v??_??Tn.width):ne});return Xl("svg",{...Tn,...b,width:v??_??Tn.width,height:v??_??Tn.height,stroke:h??M??Tn.stroke,"stroke-width":he.value,class:ld("lucide",G,...e?[`lucide-${wi(id(e))}-icon`,`lucide-${wi(e)}`]:["lucide-icon"])},[...(t??s??[]).map(re=>Xl(...re)),...y.default?[y.default()]:[]])};const pe=(e,t)=>(s,{slots:i,attrs:a})=>Xl(ud,{...a,...s,iconNode:t,name:e},i.default?{default:i.default}:void 0);const cd=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],dd=pe("activity",cd);const fd=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],pd=pe("arrow-left",fd);const vd=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],hd=pe("arrow-right",vd);const gd=[["path",{d:"M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z",key:"3c2336"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],ki=pe("badge-check",gd);const md=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],_i=pe("check",md);const yd=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Ul=pe("circle-alert",yd);const bd=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Ci=pe("circle-check",bd);const wd=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],xi=pe("circle",wd);const kd=[["path",{d:"m15 10 5 5-5 5",key:"qqa56n"}],["path",{d:"M4 4v7a4 4 0 0 0 4 4h12",key:"z08zvw"}]],_d=pe("corner-down-right",kd);const Cd=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],xd=pe("ellipsis",Cd);const Sd=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],Ed=pe("gauge",Sd);const Ad=[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]],$d=pe("git-commit-horizontal",Ad);const Rd=[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]],Id=pe("git-branch",Rd);const Td=[["circle",{cx:"12",cy:"18",r:"3",key:"1mpf1b"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["path",{d:"M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9",key:"1uq4wg"}],["path",{d:"M12 12v3",key:"158kv8"}]],Pd=pe("git-fork",Td);const Md=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],Nd=pe("layout-grid",Md);const Od=[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]],Ld=pe("list-checks",Od);const jd=[["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"M3 10a2 2 0 0 0 2 2h3",key:"1npucw"}],["path",{d:"M3 5v12a2 2 0 0 0 2 2h3",key:"x1gjn2"}]],Fd=pe("list-tree",jd);const Dd=[["path",{d:"M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4",key:"re6nr2"}],["path",{d:"M2 6h4",key:"aawbzj"}],["path",{d:"M2 10h4",key:"l0bgd4"}],["path",{d:"M2 14h4",key:"1gsvsf"}],["path",{d:"M2 18h4",key:"1bu2t1"}],["path",{d:"M21.378 5.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"pqwjuv"}]],Ud=pe("notebook-pen",Dd);const Hd=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]],Vd=pe("panel-left-close",Hd);const Wd=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]],Bd=pe("panel-left-open",Wd);const Kd=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],qd=pe("play",Kd);const Gd=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],es=pe("refresh-cw",Gd);const zd=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Jd=pe("search",zd);const Yd=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],Si=pe("server",Yd);const Xd=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Ei=pe("settings",Xd);const Zd=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Qd=pe("shield-check",Zd);const ef=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],Ai=pe("sparkles",ef);const tf=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],nf=pe("square-pen",tf);const sf=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],$i=pe("triangle-alert",sf);const lf=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ri=pe("x",lf);function Ii(e){return e.trim()?e.split(/^diff --git /m).slice(1).map(t=>{const s=t.split(`
|
|
3
|
+
`),i=s.find(b=>b.startsWith("+++ b/"))?.slice(6),a=s[0]?.match(/ b\/(.+)$/)?.[1],r=i&&i!=="/dev/null"?i:a??"unknown file";let f=0,v=0;const h=s.slice(1).map(b=>{const y=b.match(/^@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@/);return y?(f=Number(y[1]),v=Number(y[2]),{kind:"hunk",text:b,oldLine:null,newLine:null}):b.startsWith("+")&&!b.startsWith("+++")?{kind:"add",text:b.slice(1),oldLine:null,newLine:v++}:b.startsWith("-")&&!b.startsWith("---")?{kind:"delete",text:b.slice(1),oldLine:f++,newLine:null}:b.startsWith(" ")?{kind:"context",text:b.slice(1),oldLine:f++,newLine:v++}:{kind:"meta",text:b,oldLine:null,newLine:null}});return{path:r,lines:h}}):[]}const of=new Set("abstract assert boolean break byte case catch char class const continue default do double else enum extends final finally float for goto if implements import instanceof int interface long native new package private protected public record return sealed short static strictfp super switch synchronized this throw throws transient try var void volatile while yield".split(" ")),af=new Set("as async await break case catch class const continue debugger declare default delete do else enum export extends false finally for from function get if implements import in infer instanceof interface keyof let namespace new null of package private protected public readonly return satisfies set static super switch this throw true try type typeof undefined unknown var void while with yield".split(" ")),rf=new Set(["true","false","null","undefined"]);function uf(e){const t=e.toLowerCase();return t.endsWith(".java")?"java":/\.[cm]?[jt]sx?$/.test(t)?"typescript":/\.(json|jsonl)$/.test(t)?"json":/\.(xml|html|vue|pom)$/.test(t)||t.endsWith("pom.xml")?"markup":/\.(ya?ml|properties|toml)$/.test(t)?"config":/\.(sh|bash|zsh)$/.test(t)?"shell":"plain"}function Oe(e,t,s="plain"){if(!t)return;const i=e.at(-1);i?.kind===s?i.text+=t:e.push({text:t,kind:s})}function cf(e){const t=[];let s=0;for(;s<e.length;){if(e.startsWith("<!--",s)){Oe(t,e.slice(s),"comment");break}const i=e.slice(s).match(/^<\/?[A-Za-z_:][\w:.-]*/)?.[0];if(i){Oe(t,i,"tag"),s+=i.length;continue}const a=e.slice(s).match(/^\/?>/)?.[0];if(a){Oe(t,a,"tag"),s+=a.length;continue}const r=e.slice(s).match(/^(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*')/)?.[0];if(r){Oe(t,r,"string"),s+=r.length;continue}const f=e.slice(s).match(/^[A-Za-z_:][\w:.-]*(?=\s*=)/)?.[0];if(f){Oe(t,f,"attribute"),s+=f.length;continue}const v=e.slice(s).match(/^&(?:[A-Za-z]+|#\d+);/)?.[0];if(v){Oe(t,v,"literal"),s+=v.length;continue}Oe(t,e[s]),s++}return t}function mn(e,t=""){const s=uf(t);if(!e)return[{text:" ",kind:"plain"}];if(s==="markup")return cf(e);if(s==="plain")return[{text:e,kind:"plain"}];const i=s==="java"?of:af,a=[];let r=0;for(;r<e.length;){const f=e.slice(r);if(f.startsWith("//")||(s==="config"||s==="shell")&&f.startsWith("#")){Oe(a,f,"comment");break}if(f.startsWith("/*")){const O=f.indexOf("*/",2),ee=O<0?f:f.slice(0,O+2);Oe(a,ee,"comment"),r+=ee.length;continue}const v=f.match(/^\s+/)?.[0];if(v){Oe(a,v),r+=v.length;continue}const h=f.match(/^(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|`(?:\\.|[^`\\])*`)/)?.[0];if(h){Oe(a,h,"string"),r+=h.length;continue}const b=f.match(/^@[A-Za-z_$][\w$]*/)?.[0];if(b){Oe(a,b,"annotation"),r+=b.length;continue}const y=f.match(/^(?:0x[\da-f]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)[lLdDfF]?/i)?.[0];if(y){Oe(a,y,"number"),r+=y.length;continue}const _=f.match(/^[A-Za-z_$][\w$-]*/)?.[0];if(_){const O=e.slice(r+_.length),ee=rf.has(_)?"literal":i.has(_)?"keyword":s==="json"&&/^\s*:/.test(O)||s==="config"&&/^\s*[:=]/.test(O)?"property":/^[A-Z]/.test(_)&&(s==="java"||s==="typescript")?"type":"plain";Oe(a,_,ee),r+=_.length;continue}const M=f.match(/^(?:===|!==|=>|::|->|==|!=|<=|>=|&&|\|\||\?\?|\+\+|--|[+\-*/%=<>!&|?:]+)/)?.[0];if(M){Oe(a,M,"operator"),r+=M.length;continue}Oe(a,e[r]),r++}return a}function df(e=""){const t=e.replace(/\r/g,"").trim().split(`
|
|
4
|
+
`),s=[];let i=[];const a=()=>{const r=i.join(" ").trim();r&&s.push({type:"paragraph",text:r}),i=[]};for(let r=0;r<t.length;r++){const f=t[r],v=f.match(/^\s*```([^\s`]*)\s*$/);if(v){a();const M=[];for(r++;r<t.length&&!/^\s*```\s*$/.test(t[r]);)M.push(t[r]),r++;s.push({type:"code",language:v[1].toLowerCase(),lines:M});continue}if(!f.trim()){a();continue}const h=f.match(/^\s*(#{1,6})\s+(.+)$/);if(h){a(),s.push({type:"heading",level:h[1].length,text:h[2]});continue}if(/^\s*(?:---+|___+|\*\*\*+)\s*$/.test(f)){a(),s.push({type:"rule"});continue}const b=f.match(/^\s*>\s?(.*)$/);if(b){a();const M=[b[1]];for(;r+1<t.length;){const O=t[r+1].match(/^\s*>\s?(.*)$/);if(!O)break;M.push(O[1]),r++}s.push({type:"quote",text:M.join(" ")});continue}const y=f.match(/^\s*[-*+]\s+(.+)$/),_=f.match(/^\s*\d+[.)]\s+(.+)$/);if(y||_){a();const M=!!_,O=[(_??y)[1]];for(;r+1<t.length;){const ee=t[r+1].match(M?/^\s*\d+[.)]\s+(.+)$/:/^\s*[-*+]\s+(.+)$/);if(!ee)break;O.push(ee[1]),r++}s.push({type:"list",ordered:M,items:O});continue}i.push(f.trim())}return a(),s}function ff(e){return e.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""").replaceAll("'","'")}function Vs(e){const t=[];let s=ff(e).replace(/`([^`]+)`/g,(i,a)=>{const r=`\0CODE${t.length}\0`;return t.push(`<code>${a}</code>`),r});return s=s.replace(/\*\*([^*]+)\*\*/g,"<strong>$1</strong>").replace(/__([^_]+)__/g,"<strong>$1</strong>").replace(new RegExp("(?<!\\*)\\*([^*]+)\\*(?!\\*)","g"),"<em>$1</em>").replace(/_([^_]+)_/g,"<em>$1</em>"),s.replace(/\u0000CODE(\d+)\u0000/g,(i,a)=>t[Number(a)])}function pf(e){return{bash:"snippet.sh",shell:"snippet.sh",sh:"snippet.sh",zsh:"snippet.sh",js:"snippet.js",javascript:"snippet.js",jsx:"snippet.jsx",ts:"snippet.ts",typescript:"snippet.ts",tsx:"snippet.tsx",java:"Snippet.java",json:"snippet.json",html:"snippet.html",xml:"snippet.xml",vue:"snippet.vue",yaml:"snippet.yml",yml:"snippet.yml",toml:"snippet.toml",properties:"snippet.properties"}[e]??`snippet.${e||"txt"}`}const vf={class:"agent-markdown"},hf=["innerHTML"],gf=["innerHTML"],mf={key:3},yf=["innerHTML"],bf={key:5,class:"agent-code-block"},wf={key:0},kf={tabindex:"0"},_f={class:"agent-code-line-number","aria-hidden":"true"},Hl=vo({__name:"AgentMarkdown",props:{source:{}},setup(e){const t=e,s=ie(()=>df(t.source));return(i,a)=>(d(),p("div",vf,[(d(!0),p(I,null,j(s.value,(r,f)=>(d(),p(I,{key:f},[r.type==="heading"?(d(),St(cs(`h${Math.min(r.level+2,6)}`),{key:0,innerHTML:le(Vs)(r.text)},null,8,["innerHTML"])):r.type==="paragraph"?(d(),p("p",{key:1,innerHTML:le(Vs)(r.text)},null,8,hf)):r.type==="quote"?(d(),p("blockquote",{key:2,innerHTML:le(Vs)(r.text)},null,8,gf)):r.type==="rule"?(d(),p("hr",mf)):r.type==="list"?(d(),St(cs(r.ordered?"ol":"ul"),{key:4},{default:oa(()=>[(d(!0),p(I,null,j(r.items,(v,h)=>(d(),p("li",{key:h,innerHTML:le(Vs)(v)},null,8,yf))),128))]),_:2},1024)):r.type==="code"?(d(),p("figure",bf,[r.language?(d(),p("figcaption",wf,u(r.language),1)):S("",!0),n("pre",kf,[n("code",null,[(d(!0),p(I,null,j(r.lines,(v,h)=>(d(),p("span",{key:h,class:"agent-code-line"},[n("span",_f,u(h+1),1),n("span",null,[(d(!0),p(I,null,j(le(mn)(v,le(pf)(r.language)),(b,y)=>(d(),p("span",{key:y,class:x(`syntax-${b.kind}`)},u(b.text),3))),128))])]))),128))])])])):S("",!0)],64))),128))]))}}),Cf=["aria-expanded"],xf=["aria-current","title"],Sf={key:0,class:"changed-dot",title:"Has captured changes"},Ef={key:2},Af=vo({__name:"RepoTreeNode",props:{node:{},selectedPath:{},depth:{}},emits:["select"],setup(e,{emit:t}){const s=e,i=t,a=P((s.depth??0)<2);return(r,f)=>{const v=Du("RepoTreeNode",!0);return d(),p("li",{class:x(["repo-tree-node",e.node.type])},[e.node.type==="directory"?(d(),p("button",{key:0,class:"tree-directory","aria-expanded":a.value,onClick:f[0]||(f[0]=h=>a.value=!a.value)},[n("span",null,u(a.value?"▾":"▸"),1),f[3]||(f[3]=n("i",null,"▰",-1)),n("strong",null,u(e.node.name),1),n("small",null,u(e.node.children.length),1)],8,Cf)):(d(),p("button",{key:1,class:x(["tree-file",{selected:e.selectedPath===e.node.path}]),"aria-current":e.selectedPath===e.node.path?"true":void 0,title:e.node.path,onClick:f[1]||(f[1]=h=>i("select",e.node.path))},[f[4]||(f[4]=n("span",null,"‹›",-1)),n("strong",null,u(e.node.name),1),e.node.changed?(d(),p("i",Sf)):S("",!0),n("em",{class:x(e.node.score===null?"unknown":e.node.score<1.67?"danger":e.node.score<2.5?"warning":"good")},u(e.node.score===null?"—":e.node.score.toFixed(1)),3)],10,xf)),e.node.type==="directory"&&a.value?(d(),p("ul",Ef,[(d(!0),p(I,null,j(e.node.children,h=>(d(),St(v,{key:h.path,node:h,"selected-path":e.selectedPath,depth:(e.depth??0)+1,onSelect:f[2]||(f[2]=b=>i("select",b))},null,8,["node","selected-path","depth"]))),128))])):S("",!0)],2)}}}),$f={class:"window","aria-label":"Aperta comprehension dashboard"},Rf={class:"titlebar"},If={class:"toolbar"},Tf={class:"history-controls",role:"group","aria-label":"View history"},Pf=["disabled"],Mf=["disabled"],Nf={class:"repo-pill project-picker"},Of=["value"],Lf={key:0,value:""},jf=["value","disabled"],Ff={class:"theme-switch","aria-label":"Appearance"},Df={key:0,class:"error-panel"},Uf={key:1,class:"loading-panel"},Hf={class:"sidebar","aria-label":"Primary navigation"},Vf={class:"sidebar-head"},Wf=["aria-label","title"],Bf={class:"sidebar-nav"},Kf=["aria-current"],qf={key:0},Gf=["aria-current"],zf={key:0},Jf=["aria-current"],Yf=["aria-current"],Xf={key:0,class:"alert-count"},Zf=["aria-current"],Qf={key:0,class:"attention-count"},ep=["aria-current"],tp=["aria-current"],np={key:0,class:"attention-count"},sp=["aria-current"],lp=["aria-current"],op=["aria-current"],ip={key:0,class:"attention-count"},ap={class:"sidebar-context"},rp=["title","aria-label"],up=["aria-current"],cp={class:"repository-tree","aria-label":"Repository tree"},dp={key:0,class:"tree-empty"},fp={class:"file-comprehension"},pp={key:0,class:"file-context-bar"},vp={class:"file-context-identity"},hp={class:"file-context-facts"},gp={class:"primary-fact"},mp={key:1,class:"file-actions"},yp=["onClick"],bp={key:2,class:"source-message"},wp={key:3,class:"source-message error"},kp={key:4,class:"source-message"},_p=["aria-label"],Cp={class:"source-line-number"},xp={class:"source-code"},Sp={key:0},Ep={key:6,class:"source-message"},Ap={class:"section-head"},$p={class:"count-badge"},Rp={class:"queue-list"},Ip=["datetime","title"],Tp={key:0,class:"queue-superseded"},Pp={key:1,class:"queue-skipped"},Mp={class:"queue-actions"},Np=["disabled","onClick"],Op=["disabled","onClick"],Lp={key:0,class:"empty-state"},jp={class:"section-head"},Fp={class:"count-badge"},Dp={class:"queue-list learn-list"},Up=["disabled","onClick"],Hp={key:0,class:"empty-state"},Vp={class:"section-head impact-head"},Wp=["value"],Bp={key:0,class:"impact-loading"},Kp={key:1,class:"impact-shell"},qp={class:"impact-story"},Gp={class:"eyebrow"},zp={class:"trust-kernel","aria-label":"Analysis capability and evidence coverage"},Jp={class:"capability-grid"},Yp={class:"impact-metrics"},Xp={class:"proof-orb"},Zp={class:"proof-plan"},Qp={class:"eyebrow"},ev={class:"proof-actions"},tv=["disabled"],nv={key:0,class:"proof-error"},sv={key:1,class:"proof-result"},lv={key:2,class:"proof-output"},ov={key:1,class:"probe-lab"},iv={class:"probe-grid"},av=["onClick"],rv={class:"probe-state"},uv={key:0,class:"probe-inspector"},cv={class:"probe-copy"},dv=["disabled"],fv={class:"probe-code"},pv={key:0,class:"probe-console"},vv={key:1,class:"highlighted-source"},hv={class:"source-line-number"},gv={class:"source-code"},mv={key:1,class:"proof-error"},yv={class:"impact-canvas"},bv={class:"impact-lane"},wv=["onClick"],kv={key:0,class:"lane-empty"},_v={class:"impact-lane"},Cv=["onClick"],xv={key:0,class:"lane-empty"},Sv={class:"impact-lane evidence"},Ev=["onClick"],Av={key:2,class:"impact-inspector"},$v={class:"evidence-detail"},Rv=["onClick"],Iv=["title"],Tv={key:0},Pv={key:3,class:"stale-notes"},Mv={key:2,class:"empty-state"},Nv={class:"section-head proof-graph-head"},Ov=["disabled"],Lv={key:0,class:"settings-error"},jv={key:1,class:"loading-panel"},Fv={key:2,class:"repository-proof-graph"},Dv={class:"proof-graph-summary","aria-label":"Repository proof coverage"},Uv={class:"proven"},Hv={class:"understood"},Vv={class:"stale"},Wv={class:"proof-graph-toolbar",role:"group","aria-label":"Filter proof claims"},Bv=["onClick"],Kv={key:0,class:"proof-claim-list"},qv={class:"eyebrow"},Gv={class:"proof-claim-files"},zv=["onClick"],Jv={key:0},Yv={key:0,class:"proof-invalidation"},Xv={key:1,class:"proof-evidence-list"},Zv={key:0},Qv={key:1,class:"empty-state"},eh={class:"section-head journal-head"},th={class:"journal-list"},nh=["onClick"],sh={class:"journal-meta"},lh={class:"journal-files"},oh={key:0,class:"empty-state"},ih={class:"section-head git-head"},ah=["disabled"],rh={key:0,class:"settings-error"},uh={key:1,class:"loading-panel"},ch={key:2,class:"git-board"},dh=["onClick"],fh={key:0,class:"git-group-empty"},ph={class:"section-head"},vh={class:"activity-list"},hh={class:"activity-glyph"},gh=["onClick"],mh={key:0,class:"empty-state"},yh={class:"section-head harness-head"},bh=["disabled"],wh={key:0,class:"settings-error"},kh={key:1,class:"loading-panel"},_h={key:2,class:"harness-health"},Ch={class:"harness-signals","aria-label":"Harness regression signals"},xh={class:"harness-metrics","aria-label":"Harness metrics"},Sh={class:"harness-grid"},Eh={class:"harness-panel model-performance"},Ah={class:"health-table",role:"table","aria-label":"Model harness performance"},$h={key:0,class:"harness-empty"},Rh={class:"harness-panel tool-health"},Ih={key:0,class:"harness-empty"},Th={class:"harness-panel error-taxonomy"},Ph={key:0,class:"error-chips"},Mh={key:1,class:"harness-empty"},Nh={class:"harness-panel recent-health"},Oh={class:"run-signals"},Lh={key:0},jh={key:1},Fh={key:2},Dh={class:"harness-privacy"},Uh={key:0,class:"settings-error"},Hh={class:"agent-ide-main"},Vh={class:"agent-ide-toolbar"},Wh={class:"agent-toolbar-actions"},Bh={key:1,class:"workbench-engine-chip",title:"Current runtime and model for new turns"},Kh={key:0,class:"agent-review"},qh={class:"eyebrow"},Gh={key:0},zh={class:"agent-mode-tabs",role:"tablist","aria-label":"Agent run review"},Jh=["aria-selected"],Yh=["aria-selected"],Xh=["aria-selected"],Zh={key:0},Qh=["aria-selected"],e1=["aria-selected"],t1={key:0,class:"understanding-brief"},n1={key:0,class:"understanding-grid"},s1={class:"understanding-questions"},l1=["onUpdate:modelValue","placeholder"],o1=["disabled"],i1={key:1,class:"agent-contract"},a1={class:"eyebrow"},r1={class:"skill-contract-banner","aria-label":"Selected Aperta skill"},u1={class:"skill-contract-mark"},c1={class:"eyebrow"},d1={class:"skill-contract-details"},f1={class:"contract-grid"},p1={class:"contract-plan"},v1={key:0},h1={class:"contract-evidence"},g1={key:0},m1={class:"contract-critique"},y1={key:0,class:"pending"},b1={class:"agent-review-tabs"},w1=["title","onClick"],k1={key:0,class:"agent-patch semantic-diff wrap","aria-label":"Agent patch preview"},_1={class:"gutter old"},C1={class:"gutter new"},x1={class:"marker"},S1={key:1,class:"agent-no-change"},E1={key:0,class:"proof-loop-evidence","aria-label":"Harness capability evidence"},A1={key:2,class:"source-message"},$1={key:3,class:"agent-checks"},R1={key:0,class:"verification-attempt baseline"},I1=["open"],T1={key:1,class:"checks-empty"},P1={key:0,class:"spinner"},M1={key:0,class:"agent-response-card"},N1={class:"agent-response-head"},O1={key:0},L1={key:0},j1={key:1},F1={key:2,class:"activity-command"},D1=["open"],U1={key:1,class:"activity-live","aria-live":"polite"},H1={key:2,class:"checks-empty"},V1={class:"promotion-copy"},W1={class:"promotion-actions"},B1=["disabled"],K1={key:6,class:"promotion-complete"},q1={key:7,class:"verification-blocked"},G1={key:1,class:"agent-review agent-welcome"},z1={key:1,class:"agent-sidepane","aria-label":"Agent controls"},J1={class:"agent-run-picker agent-conversation-picker"},Y1=["disabled"],X1=["value","disabled"],Z1={key:0,value:""},Q1={key:1,value:""},eg=["value"],tg={class:"agent-side-activity agent-thread"},ng={key:0},sg={key:0},lg=["onClick"],og={key:1,class:"agent-side-empty"},ig={key:2,class:"agent-side-live"},ag={class:"agent-side-composer"},rg={class:"agent-suggestions","aria-label":"Example agent tasks"},ug=["placeholder","onKeydown"],cg=["title"],dg=["disabled"],fg={class:"section-head"},pg={class:"settings-head-actions"},vg={class:"engine-badge"},hg={key:0,class:"settings-error"},gg={class:"runtime-settings","aria-labelledby":"agent-runtime-title"},mg={class:"runtime-active"},yg={class:"runtime-options"},bg=["aria-pressed","onClick"],wg={class:"runtime-mark"},kg={class:"engine-ownership-boundary"},_g={key:0},Cg={key:1},xg={key:0,class:"cursor-runtime-config"},Sg=["placeholder"],Eg={key:0,class:"runtime-install-note"},Ag=["disabled"],$g={class:"intelligence-routing","aria-labelledby":"intelligence-routing-title"},Rg={class:"settings-layout"},Ig={class:"profile-list"},Tg={class:"profile-provider"},Pg={class:"profile-capabilities"},Mg={key:0},Ng={class:"profile-actions"},Og=["onClick","disabled"],Lg=["onClick"],jg=["onClick"],Fg={key:0,class:"empty-state"},Dg={class:"provider-catalog",role:"list","aria-label":"Model providers"},Ug=["aria-pressed","onClick"],Hg={key:0,class:"selected-provider-note"},Vg={key:1},Wg=["value"],Bg={key:2},Kg=["placeholder"],qg={key:3},Gg={key:4,class:"settings-error provider-inline-error",role:"alert"},zg=["disabled"],Jg={class:"privacy-boundary"},Yg={key:6,class:"verification-required"},Xg=["disabled"],Zg={key:3,class:"review-overlay",role:"dialog","aria-modal":"true","aria-label":"Ownership session"},Qg={class:"review-window"},em={class:"review-header"},tm={class:"learning-steps","aria-label":"Learning path"},nm={class:"review-head-actions"},sm={key:0},lm={key:0,class:"review-error"},om={key:1,class:"review-loading"},im={key:2,class:"completion-panel"},am={class:"confidence-delta"},rm={key:3,class:"review-body review-body-wide"},um={class:"change-navigator"},cm={class:"change-summary"},dm={class:"story-card"},fm={key:0,class:"intent-card"},pm={class:"story-facts"},vm={class:"fact-values"},hm=["aria-label","title"],gm={key:0},mm={class:"fact-values"},ym=["aria-label","title"],bm=["title","aria-label","onClick"],wm={"aria-hidden":"true"},km={class:"signal-list compact"},_m={key:0},Cm={class:"evidence-pane diff-workspace"},xm={class:"diff-toolbar"},Sm={class:"file-stepper"},Em={key:0},Am={class:"diff-options"},$m={class:"gutter old"},Rm={class:"gutter new"},Im={class:"marker"},Tm={key:1,class:"split-row"},Pm={class:"gutter"},Mm={class:"marker"},Nm={class:"gutter"},Om={class:"marker"},Lm={key:2,class:"missing-evidence"},jm={class:"reflection-pane learning-inspector"},Fm={class:"starting-confidence"},Dm={key:0,class:"prior-notes"},Um={key:1,class:"prior-evidence"},Hm={class:"coach-card","aria-label":"Aperta Coach"},Vm={key:0},Wm={key:1},Bm={class:"coach-focus"},Km={key:0},qm=["disabled"],Gm={key:1,class:"coach-disabled"},zm={key:2,class:"coach-error"},Jm={class:"evidence-questions"},Ym=["onClick"],Xm=["for"],Zm={key:0,class:"question-rationale"},Qm=["id","onUpdate:modelValue"],ey={class:"confidence-picker"},ty=["disabled","title","onClick"],ny=["disabled"],sy={class:"statusbar"},ly=vo({__name:"App",setup(e){const t=P(null),s=P(""),i=P("map"),a=P(["map"]),r=P(0),f=P(!1),v=ie(()=>r.value>0),h=ie(()=>r.value<a.value.length-1);as(i,c=>{if(f.value){f.value=!1;return}a.value[r.value]!==c&&(a.value=[...a.value.slice(0,r.value+1),c].slice(-50),r.value=a.value.length-1)});const b=P(""),y=localStorage.getItem("aperta-theme"),_=P(y==="plain"||y==="panther"?y:"snow"),M=P(localStorage.getItem("aperta-sidebar-collapsed")==="true"),O=P(null),ee=Number(localStorage.getItem("aperta-repository-width")),G=P(Number.isFinite(ee)&&ee>=240&&ee<=480?ee:320),he=Number(localStorage.getItem("aperta-agent-panel-width")),re=P(Number.isFinite(he)&&he>=340&&he<=520?he:420),ne=P(localStorage.getItem("aperta-agent-pane-open")!=="false"),te=P(null),V=P(""),H=P(null),Ie=P(null),Ae=P(""),Te=P(""),Tt=P(!1),it=P(0),Qe=P(""),vt=P("unified"),ht=P(!1),Ke=P(null),un=P(""),me=P({}),q=P(localStorage.getItem("aperta-project")??""),J=P(null),$e=P(""),Gt=P(!1),qe=P(""),X=P(null),Pt=P(!1),_n=P(null),zt=P(""),nt=P(!1),De=P(null),Jt=P(""),Mt=P(""),gt=P(null),cn=P(""),g=P(!1),m=P(null),k=P(null),T=P(!1),A=P(null),E=P(""),L=["builder","coach"],$=P(null),N=ie(()=>$.value?.profiles.find(c=>c.id===$.value?.activeProfileIds.builder)),R=ie(()=>$.value?.profiles.find(c=>c.id===$.value?.activeProfileIds.coach)),D=P(""),F=P(!1),U=P(""),K=P(!1),oe=P(""),ue=P(!1),Z=P(null),ke=P(""),z=P({name:"",provider:"openai",model:"",baseUrl:"",apiKey:""}),ce=P({kind:"aperta",model:""}),Ge=ie(()=>$.value?.providers.find(c=>c.id===z.value.provider)),mt=ie(()=>`${t.value?.observer?.state==="grouping"?"Grouping changes":t.value?.observer?.state==="error"?"Observer needs attention":"Watching"} · ${t.value?.observer?.branch??t.value?.branch??"repository"}`),Cn=P(""),ye=P(null),ze=P(!1),dn=P(""),yt=P([]),st=P([]),Vn=P(null),xn=P(null),Da=ie(()=>xn.value?.kind==="aperta"?!!Vn.value?.enabled:!!xn.value?.available),bo=ie(()=>{const c=xn.value;return c?c.kind==="aperta"?Vn.value?.enabled?`Aperta Native · ${Vn.value.provider} / ${Vn.value.model}`:"Aperta Native · Builder model required":`${nn(c.kind)} · ${c.model||"runtime default model"}`:"Loading execution engine…"}),Je=P(""),Nt=P(!1),_s=P(null),at=P(""),wo=P(null),bt=P(null),Wn=P(!1),Cs=P(""),Yt=P(""),Ot=P(""),Lt=P(!1),Sn=P(""),Ee=P("plan"),Xt=P(!1),Bn=P(!1),Kn=P({}),qn=P(!1),be=P(null),Gn=P(!1),xs=P(""),Ye=P(null),zn=P(!1),Ss=P(""),Es=P("all"),ko=ie(()=>Ye.value?.claims.filter(c=>Es.value==="all"||c.status===Es.value)??[]),rt=ie(()=>t.value?.files.find(c=>c.path===b.value)??(b.value?{path:b.value,score:null,aiRatio:0,totalLines:0,lowConfidenceCount:0,explainedLowConfidence:0}:void 0)),Ua=ie(()=>rt.value?t.value?.diffs.filter(c=>c.files.some(o=>o.path===rt.value?.path))??[]:[]),Zt=ie(()=>Ii(H.value?.patch??"")),ut=ie(()=>Zt.value.find(c=>c.path===Qe.value)??Zt.value[0]),hl=ie(()=>H.value?.diff.files.find(c=>c.path===ut.value?.path)),_o=ie(()=>Math.max(0,Zt.value.findIndex(c=>c.path===ut.value?.path))),Co=ie(()=>{const c=un.value.trim().toLowerCase(),o=t.value?.sessions.filter(l=>l.reviewed||l.notes.length||l.evidence.length)??[];return c?o.filter(l=>`${l.notes.map(w=>w.text).join(" ")} ${l.evidence.flatMap(w=>w.answers.map(W=>`${W.question} ${W.answer}`)).join(" ")} ${l.files.map(w=>w.path).join(" ")} ${l.model??l.authorship}`.toLowerCase().includes(c)):o}),gl=ie(()=>k.value?.questions??H.value?.questions??[]),Qt=ie(()=>gl.value.filter(c=>c.requiredForOwned).filter(c=>(me.value[c.id]?.trim().length??0)>=20).length),En=ie(()=>Qt.value>=3&&Ae.value.trim().length>=40),Ha=ie(()=>Math.round((Qt.value+(Ae.value.trim().length>=40?1:0))/4*100)),ml=ie(()=>J.value?.nodes.filter(c=>c.status!=="related"&&c.kind!=="test").slice(0,18)??[]),yl=ie(()=>J.value?.nodes.filter(c=>c.status==="related"&&c.kind!=="test").slice(0,18)??[]),xo=ie(()=>J.value?.nodes.filter(c=>c.kind==="test").slice(0,12)??[]),Pe=ie(()=>J.value?.nodes.find(c=>c.id===qe.value)??ml.value[0]??yl.value[0]??xo.value[0]),So=ie(()=>J.value?.edges.filter(c=>c.from===Pe.value?.id||c.to===Pe.value?.id).flatMap(c=>{const o=J.value?.nodes.find(l=>l.id===(c.from===Pe.value?.id?c.to:c.from));return o?[{...c,node:o}]:[]})??[]),xe=ie(()=>De.value?.probes.find(c=>c.id===Jt.value)??null),Va=ie(()=>{const c=new Map(X.value?.verdicts.map(o=>[o.nodeId,o.verdict])??[]);for(const o of De.value?.probes??[]){if(o.latest?.status==="proven")for(const l of o.latest.targetNodeIds)c.set(l,"proven");if(o.latest?.status==="disproven")for(const l of o.latest.targetNodeIds)c.set(l,"regressed")}return c}),Eo=ie(()=>{const c={name:t.value?.repo??"repository",children:[]},o=new Map(t.value?.files.map(W=>[W.path,W])??[]),l=Cn.value.trim().toLowerCase();for(const W of t.value?.repositoryFiles??[]){if(l&&!W.toLowerCase().includes(l))continue;let ae=c;const Ue=W.split("/");for(let He=0;He<Ue.length;He++){const $n=Ue.slice(0,He+1).join("/");let Rn=ae.children.find(wt=>wt.name===Ue[He]);if(!Rn){const wt=o.get(W);Rn={name:Ue[He],path:$n,type:He===Ue.length-1?"file":"directory",children:[],score:He===Ue.length-1?wt?.score??null:null,changed:He===Ue.length-1&&!!wt},ae.children.push(Rn)}ae=Rn}}const w=W=>{W.sort((ae,Ue)=>ae.type===Ue.type?ae.name.localeCompare(Ue.name):ae.type==="directory"?-1:1),W.forEach(ae=>w(ae.children))};return w(c.children),c.children}),Wa=ie(()=>ye.value?.content.split(`
|
|
5
|
+
`)??[]),Re=ie(()=>Lt.value?null:st.value.find(c=>c.id===Ot.value)??st.value[0]??null),C=ie(()=>Re.value?.runs.find(c=>c.id===Yt.value)??Re.value?.runs.at(-1)??null),Ao=ie(()=>Ii(C.value?.patch??"")),As=ie(()=>Ao.value.find(c=>c.path===Sn.value)??Ao.value[0]??null),Ba=ie(()=>J.value?.capabilities.map(c=>c.id!=="runtime"?c:X.value?.latest?.status==="proven"?{...c,status:"available",detail:`Executed ${X.value.latest.runner} evidence is attached to this capture.`}:X.value?.plan.available?{...c,status:"partial",detail:`${X.value.plan.runner} evidence is available on demand but has not proven this capture.`}:c)??[]);function bl(c){return c===null?{label:"Unknown",tone:"unknown"}:c<1.67?{label:"Opaque",tone:"danger"}:c<2.5?{label:"Followable",tone:"warning"}:{label:"Owned",tone:"good"}}function Ka(c){return c===null?"—":c.toFixed(1)}function qa(c){return`${Math.round(c*100)}%`}function lt(c){return c===null?"—":`${Math.round(c*100)}%`}function $s(c){return c===null?"—":c<1e3?`${Math.round(c)}ms`:`${(c/1e3).toFixed(1)}s`}function en(c){return new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"}).format(new Date(c))}function Ga(c){return new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}).format(new Date(c))}function fn(c){return c.split("/").at(-1)??c}function wl(c){const o=c.split("/");return o.length>1?o.slice(0,-1).join("/"):"repository root"}function Rs(c){return c.replace(/([a-z0-9])([A-Z])/g,"$1$2").replaceAll("/","/").replaceAll(".",".")}function kl(c=""){return c.replace(/\r/g,"").replace(/\s*#{1,6}\s+/g,`
|
|
6
|
+
|
|
7
|
+
`).replace(/\s+-\s+(?=(?:\*\*|[A-Z0-9]))/g,`
|
|
8
|
+
• `).replace(/\*\*([^*]+)\*\*/g,"$1").replace(/`([^`]+)`/g,"$1").replace(/^\s*[-*]\s+/gm,"• ").replace(/\n{3,}/g,`
|
|
9
|
+
|
|
10
|
+
`).trim()}function _l(c=""){const o=c.replaceAll("\\","/");return/\/aperta-agent-[^/]+$/.test(o)?"":o.match(/\/aperta-agent-[^/]+\/(.+)$/)?.[1]??o}function $o(c){const o=_l(c.path??""),l=c.action.toLowerCase();return/^(?:read|view|open)$/.test(l)?`Inspecting ${o||"a repository file"}.`:/^(?:edit|write|patch|apply_patch)$/.test(l)?`Updating ${o||"repository content"}.`:/^(?:glob|grep|search|find)$/.test(l)?"Searching the repository.":"Provider activity captured."}function za(c){return c.filter(o=>!["assistant","system","result"].includes(o.action.toLowerCase()))}function Ro(c){const o=c.detail?.trim()??"";if(!o)return"";if(o.startsWith("{"))try{const l=JSON.parse(o),w=l.message&&typeof l.message=="object"?l.message:void 0,ae=(Array.isArray(w?.content)?w.content:[]).find(wt=>wt&&typeof wt=="object"&&wt.type==="tool_use"),Ue=ae?.input&&typeof ae.input=="object"?ae.input:{},He=[Ue.file_path,Ue.path,l.file_path,l.path].find(wt=>typeof wt=="string"),$n=_l(He??c.path??""),Rn=String(ae?.name??l.tool_name??c.action).toLowerCase();return $o({...c,action:Rn,path:$n})}catch{return $o(c)}return kl(o).replace(/(?:\/[^\s"']+)*\/aperta-agent-[^/\s"']+\//g,"")}function Ja(c){if(c.status==="no-changes")return"No repository changes were needed";const o=kl(c.summary||c.intent).replace(/\s+/g," ");return o.length>150?`${o.slice(0,147).trimEnd()}…`:o}function Ya(c){const o=kl(c.understanding?.changedBehavior||c.summary||c.intent).replace(/\s+/g," ");return o.length>220?`${o.slice(0,217).trimEnd()}…`:o}function Xa(c){return c.status==="error"?Ul:c.action==="read"?_d:c.action==="search"?Jd:c.action==="write"?nf:c.action==="run"?qd:c.action==="service"||c.action==="probe"?Si:c.action==="verify"||c.action==="baseline"?ki:c.action==="plan"?Fd:c.action==="finish"?Ci:xi}function Za(c){return c.type==="captured"?_i:c.type==="error"?Ul:c.type==="grouping"?xd:c.type==="branch"?Id:xi}function Qa(c){return c.level==="healthy"?_i:c.level==="critical"?Ul:$i}function er(c){if(c.notes[0]?.text)return c.notes[0].text;const o=c.evidence[0]?.answers.find(l=>l.answer.trim().length)?.answer;return o||`Ownership session completed with confidence ${c.score??"unrated"}. No written explanation was recorded.`}async function Is(c){b.value=c,ye.value=null,dn.value="",ze.value=!0;try{const o=await fetch(`/api/file?project=${encodeURIComponent(q.value)}&path=${encodeURIComponent(c)}`,{cache:"no-store"}),l=await o.json().catch(()=>({}));if(!o.ok)throw new Error(l.error??"Could not read repository file");ye.value=l}catch(o){dn.value=o instanceof Error?o.message:String(o)}finally{ze.value=!1}}function Cl(c){_.value=c,localStorage.setItem("aperta-theme",c)}function tr(){M.value=!M.value,O.value=null,localStorage.setItem("aperta-sidebar-collapsed",String(M.value))}function _e(c,o){if(!M.value)return;const l=c.currentTarget.getBoundingClientRect();O.value={label:o,top:l.top+l.height/2,left:l.right+10}}function Ce(){O.value=null}function Io(c){G.value=Math.max(240,Math.min(480,Math.round(c))),localStorage.setItem("aperta-repository-width",String(G.value))}function To(c){Io(G.value+c)}function nr(c){const o=c.clientX,l=G.value,w=ae=>Io(l+ae.clientX-o),W=()=>{window.removeEventListener("pointermove",w),window.removeEventListener("pointerup",W),document.body.classList.remove("resizing-repository")};document.body.classList.add("resizing-repository"),window.addEventListener("pointermove",w),window.addEventListener("pointerup",W,{once:!0})}function Po(c){re.value=Math.max(340,Math.min(520,Math.round(c))),localStorage.setItem("aperta-agent-panel-width",String(re.value))}function Mo(c){Po(re.value+c)}function Jn(c){ne.value=c,localStorage.setItem("aperta-agent-pane-open",String(c))}function sr(c){const o=c.clientX,l=re.value,w=ae=>Po(l-(ae.clientX-o)),W=()=>{window.removeEventListener("pointermove",w),window.removeEventListener("pointerup",W),document.body.classList.remove("resizing-agent-pane")};document.body.classList.add("resizing-agent-pane"),window.addEventListener("pointermove",w),window.addEventListener("pointerup",W,{once:!0})}function Yn(c){return Va.value.get(c)??"unproven"}function tn(c){return Yn(c.id)==="proven"?"proven":c.evidence.level}function lr(c){return Yn(c.id)==="proven"?"Executed evidence is attached to this graph surface.":c.evidence.detail}async function No(c){X.value=null,zt.value="",nt.value=!1;const o=await fetch(`/api/proof?diffId=${encodeURIComponent(c)}&project=${encodeURIComponent(q.value)}`,{cache:"no-store"});if(!o.ok)throw new Error("Could not build the proof plan");X.value=await o.json()}async function Oo(c){De.value=null,cn.value="",g.value=!1;const o=await fetch(`/api/probes?diffId=${encodeURIComponent(c)}&project=${encodeURIComponent(q.value)}`,{cache:"no-store"});if(!o.ok)throw new Error("Could not generate the probe catalog");De.value=await o.json(),Jt.value=De.value?.probes[0]?.id??""}async function or(c){if(!(c.readiness!=="ready"||Mt.value)){Mt.value=c.id,cn.value="";try{const o=await fetch("/api/probes",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({projectId:q.value,diffId:$e.value,probeId:c.id})}),l=await o.json().catch(()=>({}));if(!o.ok)throw new Error(l.error??"Probe execution failed");gt.value=l.job;const w=await Ts(l.job.id,W=>gt.value=W);if(w.state!=="completed")throw new Error(w.error??`Probe ${w.state}`);await Oo($e.value),Jt.value=c.id,g.value=!0}catch(o){cn.value=o instanceof Error?o.message:String(o)}finally{Mt.value=""}}}async function ir(){if(!(!$e.value||Pt.value)){Pt.value=!0,zt.value="";try{const c=await fetch("/api/proof",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({projectId:q.value,diffId:$e.value})}),o=await c.json().catch(()=>({}));if(!c.ok)throw new Error(o.error??"Proof execution failed");_n.value=o.job;const l=await Ts(o.job.id,w=>_n.value=w);if(l.state!=="completed")throw new Error(l.error??`Proof ${l.state}`);await No($e.value),nt.value=X.value?.latest?.status!=="proven"}catch(c){zt.value=c instanceof Error?c.message:String(c)}finally{Pt.value=!1}}}async function Ts(c,o){for(;;){await new Promise(W=>setTimeout(W,700));const l=await fetch(`/api/jobs?id=${encodeURIComponent(c)}`,{cache:"no-store"});if(!l.ok)throw new Error("Could not read execution job");const{job:w}=await l.json();if(o(w),!["queued","running"].includes(w.state))return w}}async function Ps(c){!c||!["queued","running"].includes(c.state)||await fetch(`/api/jobs?id=${encodeURIComponent(c.id)}`,{method:"DELETE"})}async function Ms(c=$e.value||t.value?.diffs.at(-1)?.id||""){if(!c){J.value=null;return}Gt.value=!0,$e.value=c,s.value="";try{const o=await fetch(`/api/impact?diffId=${encodeURIComponent(c)}&project=${encodeURIComponent(q.value)}`,{cache:"no-store"});if(!o.ok)throw new Error("Could not build the behavioral impact graph");const l=await o.json();J.value=l.graph,qe.value=l.graph.nodes[0]?.id??"",await Promise.all([No(c).catch(w=>{zt.value=w instanceof Error?w.message:String(w)}),Oo(c).catch(w=>{cn.value=w instanceof Error?w.message:String(w)})])}catch(o){s.value=o instanceof Error?o.message:String(o)}finally{Gt.value=!1}}async function ar(){i.value="impact",await Ms()}async function rr(c){c==="impact"?await Ms():c==="proofgraph"?await Ns():c==="harness"?await Os():c==="agents"?await sn():c==="git"?await Ls():c==="settings"&&await Sl()}async function Lo(c){const o=r.value+c;if(o<0||o>=a.value.length)return;r.value=o,f.value=!0;const l=a.value[o];i.value=l,await rr(l)}function ur(c){Qe.value=c}function jo(c){if(!Zt.value.length)return;const o=(_o.value+c+Zt.value.length)%Zt.value.length;Qe.value=Zt.value[o].path}function cr(c){c.path&&(Qe.value=c.path)}async function Fo(c){if(c.kind!=="pending"){te.value=c,H.value=null,Ie.value=null,Ae.value="",me.value={},Te.value="",it.value=Date.now(),Ke.value=null,Qe.value="",k.value=null,E.value="",A.value=null;try{const o=await fetch(`/api/ownership?diffId=${encodeURIComponent(c.diffId)}&project=${encodeURIComponent(q.value)}`,{cache:"no-store"});if(!o.ok)throw new Error("Could not build the ownership briefing");H.value=await o.json(),fetch("/api/coach",{cache:"no-store"}).then(w=>w.json()).then(w=>m.value=w.status).catch(()=>m.value={enabled:!1,reason:"Coach status is unavailable."});const l=localStorage.getItem(`aperta-draft:${c.diffId}`);if(l)try{const w=JSON.parse(l);Ae.value=w.explanation??"",me.value=w.answers??{}}catch{Ae.value=l}Qe.value=H.value?.focusFiles[0]?.path??H.value?.diff.files[0]?.path??"",location.hash=`project=${encodeURIComponent(q.value)}&ownership=${c.diffId}`}catch(o){Te.value=o instanceof Error?o.message:String(o)}}}async function dr(c){if(!(c.kind==="pending"||V.value)){V.value=c.diffId,s.value="";try{const o=await fetch("/api/queue",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({projectId:q.value,diffId:c.diffId,action:"skip"})}),l=await o.json().catch(()=>({}));if(!o.ok)throw new Error(l.error??"Could not skip this review");await ln()}catch(o){s.value=o instanceof Error?o.message:String(o)}finally{V.value=""}}}async function fr(){if(!(!te.value||T.value||!m.value?.enabled)){T.value=!0,E.value="";try{const c=await fetch("/api/coach",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({projectId:q.value,diffId:te.value.diffId})}),o=await c.json().catch(()=>({}));if(!c.ok)throw new Error(o.error??"Could not start Aperta Coach");A.value=o.job;const l=await Ts(o.job.id,w=>A.value=w);if(l.state!=="completed")throw new Error(l.error??`Coach ${l.state}`);k.value=l.result,me.value={},k.value.focus.path&&(Qe.value=k.value.focus.path)}catch(c){E.value=c instanceof Error?c.message:String(c)}finally{T.value=!1}}}function xl(){te.value=null,H.value=null,Ke.value=null,history.replaceState(null,"",location.pathname+location.search)}function An(c){const o=t.value?.diffs.find(w=>w.id===c),l=t.value?.sessions.find(w=>w.diffId===c);o&&Fo({kind:"history",priority:"medium",diffId:c,ts:o.ts,label:"Ownership history",score:l?.score??null,files:o.files,model:o.model})}async function pr(){if(!te.value||!Ie.value){Te.value="Choose your current confidence before finishing.";return}if(Ie.value===3&&!En.value){Te.value="Owned must be demonstrated: complete the three required evidence answers and your explanation.";return}Tt.value=!0,Te.value="";try{const c=gl.value.map(l=>({questionId:l.id,question:l.text,answer:me.value[l.id]??"",path:l.path??void 0,kind:l.kind})),o=await fetch("/api/ownership",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({projectId:q.value,diffId:te.value.diffId,score:Ie.value,explanation:Ae.value,answers:c,durationMs:Date.now()-it.value})});if(!o.ok){const l=await o.json().catch(()=>({}));throw new Error(l.error??"Could not save the ownership review")}Ke.value={before:te.value.score,after:Ie.value,durationMs:Date.now()-it.value},localStorage.removeItem(`aperta-draft:${te.value.diffId}`),await ln()}catch(c){Te.value=c instanceof Error?c.message:String(c)}finally{Tt.value=!1}}async function vr(c){q.value=c,localStorage.setItem("aperta-project",c),b.value="",ye.value=null,J.value=null,X.value=null,De.value=null,be.value=null,Ye.value=null,$e.value="",yt.value=[],st.value=[],Ot.value="",Yt.value="",Lt.value=!1,xl(),await ln(),i.value==="impact"&&await Ms(),i.value==="agents"&&await sn(),i.value==="harness"&&await Os(),i.value==="proofgraph"&&await Ns()}async function Ns(){zn.value=!0,Ss.value="";try{const c=await fetch(`/api/proof-graph?project=${encodeURIComponent(q.value)}`,{cache:"no-store"}),o=await c.json().catch(()=>({}));if(!c.ok)throw new Error(o.error??"Could not load the repository proof graph");Ye.value=o}catch(c){Ss.value=c instanceof Error?c.message:String(c)}finally{zn.value=!1}}async function hr(){i.value="proofgraph",await Ns()}async function Os(){Gn.value=!0,xs.value="";try{const c=await fetch(`/api/harness?project=${encodeURIComponent(q.value)}`,{cache:"no-store"}),o=await c.json().catch(()=>({}));if(!c.ok)throw new Error(o.error??"Could not load harness health");be.value=o}catch(c){xs.value=c instanceof Error?c.message:String(c)}finally{Gn.value=!1}}async function gr(){i.value="harness",await Os()}async function Sl(){D.value="";try{const c=await fetch("/api/settings",{cache:"no-store"}),o=await c.json().catch(()=>({}));if(!c.ok)throw new Error(o.error??"Could not load settings");$.value=o,ce.value={kind:["cursor","claude","opencode"].includes(o.agentRuntime?.kind)?o.agentRuntime.kind:"aperta",model:typeof o.agentRuntime?.model=="string"?o.agentRuntime.model:""}}catch(c){D.value=c instanceof Error?c.message:String(c)}}async function mr(){F.value=!1,i.value="settings",await Sl()}async function Do(){F.value=!0,i.value="settings",await Sl(),await zs(),document.getElementById("agent-runtime-title")?.scrollIntoView({block:"start"})}function yr(){F.value=!1,i.value="agents"}async function Xn(c){K.value=!0,D.value="";try{const o=await fetch("/api/settings",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(c)}),l=await o.json().catch(()=>({}));if(!o.ok)throw new Error(l.error??"Could not save settings");$.value=l}catch(o){D.value=o instanceof Error?o.message:String(o)}finally{K.value=!1}}async function br(){await Xn({action:"save",profile:{...z.value,activate:!0,baseUrl:Z.value?.baseUrl??z.value.baseUrl,toolTransport:Z.value?Z.value.capabilities.nativeTools?"native":"json":void 0,capabilities:Z.value?.capabilities}}),D.value||(z.value={name:"",provider:z.value.provider,model:"",baseUrl:"",apiKey:""},Z.value=null)}async function wr(){await Xn({action:"runtime",runtime:ce.value}),$.value?.agentRuntime&&(ce.value={kind:$.value.agentRuntime.kind,model:$.value.agentRuntime.model})}function nn(c){return c==="cursor"?"Cursor Agent":c==="claude"?"Claude Code":c==="opencode"?"OpenCode":"Aperta Native"}function kr(c){return c==="aperta"?"Bounded native tool loop":"External CLI runtime"}function _r(c){return c==="cursor"?"C":c==="claude"?"A":c==="opencode"?"O":"α"}async function Cr(c,o){await Xn({action:"assign",id:c,role:o})}async function xr(c){oe.value=c,await Xn({action:"retest",id:c}),oe.value=""}function Sr(c){z.value.provider=c.id,z.value.baseUrl=c.id==="openai-compatible"?"":c.baseUrl,z.value.model="",Z.value=null,U.value="",D.value=""}async function Er(){if(!ue.value){ue.value=!0,U.value="",D.value="";try{const c=await fetch("/api/settings",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({action:"inspect",profile:z.value})}),o=await c.json().catch(()=>({}));if(!c.ok)throw new Error(o.error??"Could not inspect provider");if(!Array.isArray(o.models)||!o.capabilities||typeof o.baseUrl!="string"||typeof o.testedModel!="string")throw new Error("Provider inspection returned an incomplete response. Aperta kept your settings unchanged.");Z.value=o,z.value.baseUrl=o.baseUrl,!z.value.model&&o.models?.length===1&&(z.value.model=o.models[0].id)}catch(c){U.value=c instanceof Error?c.message:String(c)}finally{ue.value=!1}}}async function Ar(c){if(ke.value!==c){ke.value=c;return}await Xn({action:"delete",id:c}),ke.value=""}async function sn(){at.value="";try{const c=await fetch(`/api/agents?project=${encodeURIComponent(q.value)}`,{cache:"no-store"}),o=await c.json().catch(()=>({}));if(!c.ok)throw new Error(o.error??"Could not load agent conversations");st.value=(o.conversations??[]).map(w=>({...w,runs:w.runs.map(W=>({...W,verification:W.verification??{status:"unavailable",plan:[],attempts:[]}}))})),yt.value=st.value.flatMap(w=>w.runs),Vn.value=o.coach,xn.value=o.runtime??null,!Lt.value&&!st.value.some(w=>w.id===Ot.value)&&(Ot.value=st.value[0]?.id??"");const l=st.value.find(w=>w.id===Ot.value);l&&!l.runs.some(w=>w.id===Yt.value)&&El(l.runs.at(-1)?.id??"")}catch(c){at.value=c instanceof Error?c.message:String(c)}}async function $r(){i.value="agents",M.value||(M.value=!0,localStorage.setItem("aperta-sidebar-collapsed","true")),await sn()}async function Ls(){Wn.value=!0,Cs.value="";try{const c=await fetch(`/api/git?project=${encodeURIComponent(q.value)}`,{cache:"no-store"}),o=await c.json().catch(()=>({}));if(!c.ok)throw new Error(o.error??"Could not read Git status");bt.value=o}catch(c){Cs.value=c instanceof Error?c.message:String(c)}finally{Wn.value=!1}}async function Rr(){i.value="git",await Ls()}async function js(){if(Nt.value||Je.value.trim().length<10)return;const c=Je.value.trim();let o=!1;Nt.value=!0,at.value="",Xt.value=!1,Ee.value="activity";try{const l=await fetch("/api/agents",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({action:"start",projectId:q.value,conversationId:Re.value?.id,intent:c})}),w=await l.json().catch(()=>({}));if(!l.ok)throw new Error(w.error??"Could not start agent run");o=!0,Je.value="",_s.value=w.job;const W=await Ts(w.job.id,Ue=>{_s.value=Ue,sn().then(()=>{const He=yt.value.find($n=>$n.status==="running"||$n.status==="verifying");He&&(Lt.value=!1,Ot.value=He.conversationId,Yt.value=He.id,Sn.value||=He.files[0]?.path??"")})});if(W.state!=="completed")throw new Error(W.error??`Agent run ${W.state}`);const ae=W.result;Lt.value=!1,Ot.value=ae.conversationId,Yt.value=ae.id,Sn.value=ae.files[0]?.path??"",await sn(),Ee.value=ae.status==="no-changes"||ae.files.length?"changes":"activity",await zs(),wo.value?.scrollTo({top:0,behavior:"smooth"})}catch(l){!o&&!Je.value&&(Je.value=c),at.value=l instanceof Error?l.message:String(l),await sn()}finally{Nt.value=!1}}function El(c){Yt.value=c;const o=yt.value.find(l=>l.id===c);Sn.value=o?.files[0]?.path??"",Kn.value={...o?.understanding?.responses??{}},Ee.value=o?.status==="no-changes"?"changes":"activity",Xt.value=!1}function Ir(c){Lt.value=!1,Ot.value=c;const o=st.value.find(l=>l.id===c);El(o?.runs.at(-1)?.id??"")}function Tr(){Lt.value=!0,Ot.value="",Yt.value="",Sn.value="",Je.value="",at.value="",Xt.value=!1}async function Pr(){if(!(!C.value||!Xt.value||Bn.value)){Bn.value=!0,at.value="";try{const c=await fetch("/api/agents",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({action:"apply",projectId:q.value,runId:C.value.id,acceptUnverified:!0})}),o=await c.json().catch(()=>({}));if(!c.ok)throw new Error(o.error??"Could not promote patch");Xt.value=!1,await sn(),await ln()}catch(c){at.value=c instanceof Error?c.message:String(c)}finally{Bn.value=!1}}}async function Mr(){if(!(!C.value||qn.value)){qn.value=!0,at.value="";try{const c=await fetch("/api/agents",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({action:"understanding",projectId:q.value,runId:C.value.id,responses:Kn.value})}),o=await c.json().catch(()=>({}));if(!c.ok)throw new Error(o.error??"Could not save understanding evidence");await sn();const l=yt.value.find(w=>w.id===Yt.value);Kn.value={...l?.understanding?.responses??{}}}catch(c){at.value=c instanceof Error?c.message:String(c)}finally{qn.value=!1}}}async function ln(c=!1){s.value="";try{const o=q.value?`?project=${encodeURIComponent(q.value)}`:"",l=await fetch(`/api/state${o}`,{cache:"no-store"});if(!l.ok&&q.value&&!c)return q.value="",localStorage.removeItem("aperta-project"),ln(!0);if(!l.ok)throw new Error("Could not read the local ledger");t.value=await l.json(),q.value=t.value?.projectId??"",q.value&&localStorage.setItem("aperta-project",q.value),!b.value&&t.value?.repositoryFiles.length&&await Is(t.value.repositoryFiles[0]),i.value==="git"&&await Ls()}catch(o){s.value=o instanceof Error?o.message:String(o)}}let Al;return as([Ae,me],()=>{te.value&&!Ke.value&&localStorage.setItem(`aperta-draft:${te.value.diffId}`,JSON.stringify({explanation:Ae.value,answers:me.value}))},{deep:!0}),da(async()=>{const c=new URLSearchParams(location.hash.slice(1));c.get("project")&&(q.value=c.get("project")??""),await ln();const o=c.get("ownership");o&&An(o),Al=setInterval(()=>{te.value||ln()},3e3)}),go(()=>{Al&&clearInterval(Al)}),(c,o)=>(d(),p("main",{class:x(["desktop",`theme-${_.value}`])},[n("section",$f,[n("header",Rf,[o[79]||(o[79]=Ll('<div class="traffic" aria-hidden="true"><i class="close"></i><i class="minimize"></i><i class="zoom"></i></div><div class="window-title"><span class="aperta-mark">a</span><strong>aperta</strong><span>Comprehension</span></div>',2)),n("button",{class:"refresh-button",type:"button",onClick:ln,"aria-label":"Refresh ledger"},[se(le(es),{class:"nav-icon","aria-hidden":"true"})])]),n("div",If,[n("div",Tf,[n("button",{type:"button",disabled:!v.value,"aria-label":"Go back",title:"Go back",onClick:o[0]||(o[0]=l=>Lo(-1))},[se(le(pd),{class:"nav-icon","aria-hidden":"true"})],8,Pf),n("button",{type:"button",disabled:!h.value,"aria-label":"Go forward",title:"Go forward",onClick:o[1]||(o[1]=l=>Lo(1))},[se(le(hd),{class:"nav-icon","aria-hidden":"true"})],8,Mf)]),n("label",Nf,[o[80]||(o[80]=n("span",{class:"branch-dot"},null,-1)),n("select",{value:q.value,"aria-label":"Tracked project",onChange:o[2]||(o[2]=l=>vr(l.target.value))},[t.value?S("",!0):(d(),p("option",Lf,"Loading")),(d(!0),p(I,null,j(t.value?.projects??[],l=>(d(),p("option",{key:l.id,value:l.id,disabled:!l.available},u(l.name)+u(l.available?"":" — unavailable"),9,jf))),128))],40,Of),o[81]||(o[81]=n("span",null,"/",-1)),n("strong",null,u(t.value?.branch??"—"),1)]),n("div",Ff,[n("button",{class:x({active:_.value==="snow"}),onClick:o[3]||(o[3]=l=>Cl("snow"))}," Aqua ",2),n("button",{class:x({active:_.value==="panther"}),onClick:o[4]||(o[4]=l=>Cl("panther"))}," Panther ",2),n("button",{class:x({active:_.value==="plain"}),onClick:o[5]||(o[5]=l=>Cl("plain"))}," Plain ",2)])]),s.value?(d(),p("div",Df,u(s.value),1)):t.value?(d(),p("div",{key:2,class:x(["workspace",{"sidebar-collapsed":M.value}])},[n("aside",Hf,[n("header",Vf,[o[83]||(o[83]=n("strong",null,[n("span",null,"α"),n("em",null,"Aperta")],-1)),n("button",{onClick:tr,"aria-label":M.value?"Expand navigation":"Collapse navigation",title:M.value?"Expand navigation":"Collapse navigation"},[M.value?(d(),St(le(Bd),{key:0,class:"nav-icon","aria-hidden":"true"})):(d(),St(le(Vd),{key:1,class:"nav-icon","aria-hidden":"true"}))],8,Wf)]),n("nav",Bf,[o[94]||(o[94]=n("p",{class:"source-label"},"BUILD",-1)),n("button",{class:x(["source-item primary-action",{selected:i.value==="agents"}]),"aria-current":i.value==="agents"?"page":void 0,title:"Agent Workbench",onMouseenter:o[6]||(o[6]=l=>_e(l,"Agent Workbench")),onFocus:o[7]||(o[7]=l=>_e(l,"Agent Workbench")),onMouseleave:Ce,onBlur:Ce,onClick:$r},[se(le(Ai),{class:"nav-icon","aria-hidden":"true"}),o[84]||(o[84]=n("span",{class:"item-label"},"Agent Workbench",-1)),yt.value.filter(l=>l.status==="ready").length?(d(),p("b",qf,u(yt.value.filter(l=>l.status==="ready").length),1)):S("",!0)],42,Kf),n("button",{class:x(["source-item",{selected:i.value==="git"}]),"aria-current":i.value==="git"?"page":void 0,title:"Git Changes",onMouseenter:o[8]||(o[8]=l=>_e(l,"Git Changes")),onFocus:o[9]||(o[9]=l=>_e(l,"Git Changes")),onMouseleave:Ce,onBlur:Ce,onClick:Rr},[se(le($d),{class:"nav-icon","aria-hidden":"true"}),o[85]||(o[85]=n("span",{class:"item-label"},"Git Changes",-1)),bt.value?(d(),p("b",zf,u(bt.value.staged.length+bt.value.unstaged.length+bt.value.untracked.length),1)):S("",!0)],42,Gf),o[95]||(o[95]=n("p",{class:"source-label secondary"},"UNDERSTAND",-1)),n("button",{class:x(["source-item",{selected:i.value==="map"}]),"aria-current":i.value==="map"?"page":void 0,title:"Repository",onMouseenter:o[10]||(o[10]=l=>_e(l,"Repository")),onFocus:o[11]||(o[11]=l=>_e(l,"Repository")),onMouseleave:Ce,onBlur:Ce,onClick:o[12]||(o[12]=l=>i.value="map")},[se(le(Nd),{class:"nav-icon","aria-hidden":"true"}),o[86]||(o[86]=n("span",{class:"item-label"},"Repository",-1)),n("b",null,u(t.value.repositoryFiles.length),1)],42,Jf),n("button",{class:x(["source-item",{selected:i.value==="queue"}]),"aria-current":i.value==="queue"?"page":void 0,title:"Review Queue",onMouseenter:o[13]||(o[13]=l=>_e(l,"Review Queue")),onFocus:o[14]||(o[14]=l=>_e(l,"Review Queue")),onMouseleave:Ce,onBlur:Ce,onClick:o[15]||(o[15]=l=>i.value="queue")},[se(le(Ld),{class:"nav-icon","aria-hidden":"true"}),o[87]||(o[87]=n("span",{class:"item-label"},"Review Queue",-1)),t.value.summary.reviewCount?(d(),p("b",Xf,u(t.value.summary.reviewCount),1)):S("",!0)],42,Yf),n("button",{class:x(["source-item",{selected:i.value==="learn"}]),"aria-current":i.value==="learn"?"page":void 0,title:"Learn Next",onMouseenter:o[16]||(o[16]=l=>_e(l,"Learn Next")),onFocus:o[17]||(o[17]=l=>_e(l,"Learn Next")),onMouseleave:Ce,onBlur:Ce,onClick:o[18]||(o[18]=l=>i.value="learn")},[se(le(es),{class:"nav-icon","aria-hidden":"true"}),o[88]||(o[88]=n("span",{class:"item-label"},"Learn Next",-1)),t.value.summary.learnCount?(d(),p("b",Qf,u(t.value.summary.learnCount),1)):S("",!0)],42,Zf),o[96]||(o[96]=n("p",{class:"source-label secondary"},"INSIGHTS",-1)),n("button",{class:x(["source-item",{selected:i.value==="impact"}]),"aria-current":i.value==="impact"?"page":void 0,title:"Impact Graph",onMouseenter:o[19]||(o[19]=l=>_e(l,"Impact Graph")),onFocus:o[20]||(o[20]=l=>_e(l,"Impact Graph")),onMouseleave:Ce,onBlur:Ce,onClick:ar},[se(le(Pd),{class:"nav-icon","aria-hidden":"true"}),o[89]||(o[89]=n("span",{class:"item-label"},"Impact Graph",-1))],42,ep),n("button",{class:x(["source-item",{selected:i.value==="proofgraph"}]),"aria-current":i.value==="proofgraph"?"page":void 0,title:"Proof Graph",onMouseenter:o[21]||(o[21]=l=>_e(l,"Proof Graph")),onFocus:o[22]||(o[22]=l=>_e(l,"Proof Graph")),onMouseleave:Ce,onBlur:Ce,onClick:hr},[se(le(ki),{class:"nav-icon","aria-hidden":"true"}),o[90]||(o[90]=n("span",{class:"item-label"},"Proof Graph",-1)),Ye.value?.summary.stale?(d(),p("b",np,u(Ye.value.summary.stale),1)):S("",!0)],42,tp),n("button",{class:x(["source-item",{selected:i.value==="journal"}]),"aria-current":i.value==="journal"?"page":void 0,title:"Learning Journal",onMouseenter:o[23]||(o[23]=l=>_e(l,"Learning Journal")),onFocus:o[24]||(o[24]=l=>_e(l,"Learning Journal")),onMouseleave:Ce,onBlur:Ce,onClick:o[25]||(o[25]=l=>i.value="journal")},[se(le(Ud),{class:"nav-icon","aria-hidden":"true"}),o[91]||(o[91]=n("span",{class:"item-label"},"Learning Journal",-1))],42,sp),n("button",{class:x(["source-item",{selected:i.value==="activity"}]),"aria-current":i.value==="activity"?"page":void 0,title:"Capture Activity",onMouseenter:o[26]||(o[26]=l=>_e(l,"Capture Activity")),onFocus:o[27]||(o[27]=l=>_e(l,"Capture Activity")),onMouseleave:Ce,onBlur:Ce,onClick:o[28]||(o[28]=l=>i.value="activity")},[se(le(dd),{class:"nav-icon","aria-hidden":"true"}),o[92]||(o[92]=n("span",{class:"item-label"},"Capture Activity",-1))],42,lp),n("button",{class:x(["source-item",{selected:i.value==="harness"}]),"aria-current":i.value==="harness"?"page":void 0,title:"Harness Health",onMouseenter:o[29]||(o[29]=l=>_e(l,"Harness Health")),onFocus:o[30]||(o[30]=l=>_e(l,"Harness Health")),onMouseleave:Ce,onBlur:Ce,onClick:gr},[se(le(Ed),{class:"nav-icon","aria-hidden":"true"}),o[93]||(o[93]=n("span",{class:"item-label"},"Harness Health",-1)),be.value?.signals.some(l=>l.level!=="healthy")?(d(),p("b",ip,u(be.value.signals.filter(l=>l.level!=="healthy").length),1)):S("",!0)],42,op)]),n("div",ap,[n("div",{class:x(["observer-card",t.value.observer?.state]),title:mt.value,"aria-label":mt.value,tabindex:"0",onMouseenter:o[31]||(o[31]=l=>_e(l,mt.value)),onFocus:o[32]||(o[32]=l=>_e(l,mt.value)),onMouseleave:Ce,onBlur:Ce},[o[97]||(o[97]=n("i",null,null,-1)),n("div",null,[n("strong",null,u(t.value.observer?.state==="grouping"?"Grouping changes":t.value.observer?.state==="error"?"Needs attention":"Watching"),1),n("span",null,u(t.value.observer?.branch??t.value.branch),1)])],42,rp),n("button",{class:x(["source-item settings-link",{selected:i.value==="settings"}]),"aria-current":i.value==="settings"?"page":void 0,title:"Settings",onMouseenter:o[33]||(o[33]=l=>_e(l,"Settings")),onFocus:o[34]||(o[34]=l=>_e(l,"Settings")),onMouseleave:Ce,onBlur:Ce,onClick:mr},[se(le(Ei),{class:"nav-icon","aria-hidden":"true"}),o[98]||(o[98]=n("span",{class:"item-label"},"Settings",-1))],42,up)])]),O.value?(d(),p("div",{key:0,class:"collapsed-nav-tooltip",role:"tooltip",style:yn({top:`${O.value.top}px`,left:`${O.value.left}px`})},u(O.value.label),5)):S("",!0),n("section",{class:x(["content",{"agent-content":i.value==="agents"}])},[i.value==="map"?(d(),p(I,{key:0},[o[109]||(o[109]=Ll('<div class="section-head"><div><h2>Repository Comprehension Explorer</h2><p> Navigate the real repository. Changed files carry ownership and provenance signals. </p></div><div class="legend"><span><i class="danger"></i>Opaque</span><span><i class="warning"></i>Followable</span><span><i class="good"></i>Owned</span><span><i class="unknown"></i>Unassessed</span></div></div>',1)),n("div",{class:"repository-explorer",style:yn({"--repository-tree-width":`${G.value}px`})},[n("aside",cp,[n("header",null,[n("label",null,[o[99]||(o[99]=n("span",null,"⌕",-1)),Xe(n("input",{"onUpdate:modelValue":o[35]||(o[35]=l=>Cn.value=l),type:"search",placeholder:"Filter files…","aria-label":"Filter repository files"},null,512),[[ct,Cn.value]])]),n("small",null,u(t.value.repositoryFiles.length)+" Git-visible files",1)]),n("ul",null,[(d(!0),p(I,null,j(Eo.value,l=>(d(),St(Af,{key:l.path,node:l,"selected-path":b.value,onSelect:Is},null,8,["node","selected-path"]))),128))]),Eo.value.length?S("",!0):(d(),p("div",dp," No files match this filter. "))]),n("button",{class:"repository-resizer","aria-label":"Resize repository tree",title:"Drag to resize repository tree",onPointerdown:_t(nr,["prevent"]),onKeydown:[o[36]||(o[36]=hn(_t(l=>To(-20),["prevent"]),["left"])),o[37]||(o[37]=hn(_t(l=>To(20),["prevent"]),["right"]))]},[...o[100]||(o[100]=[n("span",null,null,-1)])],32),n("section",fp,[rt.value?(d(),p("header",pp,[n("div",vp,[o[101]||(o[101]=n("span",{class:"large-file-icon"},"‹›",-1)),n("div",null,[n("h3",null,u(fn(rt.value.path)),1),n("p",null,u(wl(rt.value.path)),1)])]),n("dl",hp,[n("div",gp,[o[102]||(o[102]=n("dt",null,"Comprehension",-1)),n("dd",null,[n("span",{class:x(["status-lozenge",bl(rt.value.score).tone])},u(bl(rt.value.score).label),3)])]),n("div",null,[o[104]||(o[104]=n("dt",null,"Confidence",-1)),n("dd",null,[B(u(Ka(rt.value.score))+" ",1),o[103]||(o[103]=n("small",null,"of 3",-1))])]),n("div",null,[o[105]||(o[105]=n("dt",null,"AI-touched",-1)),n("dd",null,u(qa(rt.value.aiRatio)),1)]),n("div",null,[o[107]||(o[107]=n("dt",null,"Captured churn",-1)),n("dd",null,[B(u(rt.value.totalLines)+" ",1),o[106]||(o[106]=n("small",null,"lines",-1))])])])])):S("",!0),rt.value?(d(),p("div",mp,[n("span",null,u(ye.value?.language??"source")+" · "+u(ye.value?`${Math.max(1,Math.round(ye.value.size/1024))} KB`:"loading"),1),n("div",null,[(d(!0),p(I,null,j(Ua.value.slice().reverse().slice(0,2),l=>(d(),p("button",{key:l.id,onClick:w=>An(l.id)}," Review "+u(en(l.ts)),9,yp))),128))])])):S("",!0),ze.value?(d(),p("div",bp,[...o[108]||(o[108]=[n("div",{class:"spinner"},null,-1),B(" Reading file… ",-1)])])):dn.value?(d(),p("div",wp,u(dn.value),1)):ye.value?.binary?(d(),p("div",kp," Binary files are tracked but not rendered. ")):ye.value?(d(),p("div",{key:5,class:"repository-source","aria-label":`Source for ${ye.value.path}`},[(d(!0),p(I,null,j(Wa.value,(l,w)=>(d(),p("code",{key:w},[n("span",Cp,u(w+1),1),n("span",xp,[(d(!0),p(I,null,j(le(mn)(l,ye.value.path),(W,ae)=>(d(),p("span",{key:ae,class:x(`syntax-${W.kind}`)},u(W.text),3))),128))])]))),128)),ye.value.truncated?(d(),p("footer",Sp," Preview limited to the first 1 MB. ")):S("",!0)],8,_p)):(d(),p("div",Ep," Choose a file to inspect its source and comprehension history. "))])],4)],64)):i.value==="queue"?(d(),p(I,{key:1},[n("div",Ap,[o[110]||(o[110]=n("div",null,[n("h2",null,"Review Queue"),n("p",null," Latest changes first. Repeated captures of the same files are consolidated so you review the current state once. ")],-1)),n("span",$p,u(t.value.queue.length)+" waiting",1)]),n("div",Rp,[(d(!0),p(I,null,j(t.value.queue,l=>(d(),p("article",{key:l.diffId,class:x(["queue-card",{pending:l.kind==="pending"}])},[n("span",{class:x(["priority-light",l.priority])},null,2),n("div",null,[n("p",null,u(l.label),1),n("h3",null,u(l.files.map(w=>fn(w.path)).slice(0,3).join(", ")),1),n("small",null,[B(u(l.files.length)+" file"+u(l.files.length===1?"":"s")+" · "+u(l.model??"unattributed")+" · ",1),n("time",{datetime:l.ts,title:new Date(l.ts).toLocaleString()},u(Ga(l.ts)),9,Ip)]),l.supersededCount?(d(),p("small",Tp," Includes "+u(l.supersededCount)+" earlier overlapping capture"+u(l.supersededCount===1?"":"s")+". ",1)):S("",!0),l.skippedAt?(d(),p("small",Pp," Skipped for now · returns after active reviews ")):S("",!0)]),n("div",Mp,[n("button",{disabled:l.kind==="pending"||V.value===l.diffId,onClick:w=>Fo(l)},u(l.kind==="pending"?"Waiting for quiet…":"Start ownership session"),9,Np),l.kind!=="pending"?(d(),p("button",{key:0,class:"secondary",disabled:!!V.value||!!l.skippedAt,onClick:w=>dr(l)},u(l.skippedAt?"Skipped":V.value===l.diffId?"Skipping…":"Skip for now"),9,Op)):S("",!0)])],2))),128)),t.value.queue.length?S("",!0):(d(),p("div",Lp,[...o[111]||(o[111]=[n("strong",null,"Everything is owned.",-1),n("span",null,"New staged or unstaged changes from any coding tool will appear here automatically.",-1)])]))])],64)):i.value==="learn"?(d(),p(I,{key:2},[n("div",jp,[o[112]||(o[112]=n("div",null,[n("h2",null,"Learn Next"),n("p",null," Understanding is revisited after time passes—or immediately when owned code changes again. ")],-1)),n("span",Fp,u(t.value.summary.learnCount)+" due",1)]),n("div",Dp,[(d(!0),p(I,null,j(t.value.learnNext,l=>(d(),p("article",{key:l.diffId,class:x(["queue-card",{upcoming:!l.due,stale:l.stale}])},[n("span",{class:x(["priority-light",l.stale?"high":l.due?"medium":"low"])},null,2),n("div",null,[n("p",null,u(l.label),1),n("h3",null,u(l.files.map(w=>fn(w.path)).slice(0,3).join(", ")),1),n("small",null,u(l.stale?"Understanding invalidated by a later change":l.due?"Ready for retrieval practice now":`Scheduled ${new Date(l.dueAt).toLocaleDateString()}`)+" · last confidence "+u(l.score??"unrated")+"/3",1)]),n("button",{disabled:!l.due,onClick:w=>An(l.diffId)},u(l.due?"Revisit understanding":"Not due yet"),9,Up)],2))),128)),t.value.learnNext.length?S("",!0):(d(),p("div",Hp,[...o[113]||(o[113]=[n("strong",null,"Complete an ownership session first.",-1),n("span",null,"Aperta will schedule the right moment to retrieve that knowledge again.",-1)])]))])],64)):i.value==="impact"?(d(),p(I,{key:3},[n("div",Vp,[o[115]||(o[115]=n("div",null,[n("h2",null,"Behavioral Impact Graph"),n("p",null," Trace the change from code surface to dependency, test evidence, and unresolved risk. ")],-1)),n("label",null,[o[114]||(o[114]=n("span",null,"CAPTURE",-1)),Xe(n("select",{"onUpdate:modelValue":o[38]||(o[38]=l=>$e.value=l),onChange:o[39]||(o[39]=l=>Ms($e.value))},[(d(!0),p(I,null,j(t.value.diffs.slice().reverse(),l=>(d(),p("option",{key:l.id,value:l.id},u(en(l.ts))+" · "+u(l.files.map(w=>fn(w.path)).slice(0,2).join(", ")),9,Wp))),128))],544),[[gi,$e.value]])])]),Gt.value?(d(),p("div",Bp,[...o[116]||(o[116]=[n("div",{class:"spinner"},null,-1),B(" Tracing repository relationships… ",-1)])])):J.value?(d(),p("div",Kp,[n("header",qp,[n("div",null,[n("p",Gp,u(J.value.analyzer),1),n("h3",null,u(J.value.headline),1),n("p",null,u(J.value.narrative),1)]),n("span",{class:x(["risk-chip",J.value.risk])},u(J.value.risk)+" blast radius",3)]),n("section",zp,[n("header",null,[o[117]||(o[117]=n("div",null,[n("p",{class:"eyebrow"},"TRUST KERNEL"),n("h3",null,"Know what Aperta knows—and how.")],-1)),n("span",null,u(J.value.languages.join(" + ")||"Language unknown"),1)]),n("div",Jp,[(d(!0),p(I,null,j(Ba.value,l=>(d(),p("article",{key:l.id,class:x(l.status)},[n("i",null,u(l.status==="available"?"✓":l.status==="partial"?"~":"—"),1),n("div",null,[n("strong",null,u(l.label),1),n("small",null,u(l.detail),1)])],2))),128))]),o[118]||(o[118]=n("p",null,[n("b",null,"Observed"),B(" comes directly from Git. "),n("b",null,"Inferred"),B(" is a structural lead. "),n("b",null,"Proven"),B(" requires executed evidence. ")],-1))]),n("div",Yp,[(d(!0),p(I,null,j(J.value.insights,l=>(d(),p("span",{key:l},u(l),1))),128))]),X.value?(d(),p("section",{key:0,class:x(["proof-engine",X.value.latest?.status??"ready"])},[n("div",Xp,[n("span",null,u(X.value.latest?.status==="proven"?"✓":X.value.latest?.status==="regressed"?"!":"▶"),1)]),n("div",Zp,[n("p",Qp," PROOF ENGINE · "+u(X.value.latest?X.value.latest.status:"READY"),1),n("h3",null,u(X.value.latest?.status==="proven"?"Executed evidence supports this change.":X.value.latest?.status==="regressed"?"The relevant evidence is failing.":"Turn structural inference into executed evidence."),1),n("p",null,[B(u(X.value.plan.scope),1),X.value.plan.command?(d(),p(I,{key:0},[o[119]||(o[119]=B(" · ",-1)),n("code",null,u(X.value.plan.command),1)],64)):S("",!0)]),n("small",null,u(X.value.plan.coveredNodeIds.length)+" graph surface"+u(X.value.plan.coveredNodeIds.length===1?"":"s")+" can receive proof · "+u(X.value.plan.proposedProbes.length)+" missing probe"+u(X.value.plan.proposedProbes.length===1?"":"s"),1)]),n("div",ev,[n("button",{disabled:!X.value.plan.available||Pt.value,onClick:ir},u(Pt.value?`${_n.value?.state??"Starting"} evidence…`:X.value.latest?"Run proof again":"Run relevant proof"),9,tv),Pt.value?(d(),p("button",{key:0,class:"cancel-job",onClick:o[40]||(o[40]=l=>Ps(_n.value))}," Cancel job")):X.value.latest?(d(),p("button",{key:1,class:"output-toggle",onClick:o[41]||(o[41]=l=>nt.value=!nt.value)},u(nt.value?"Hide":"Inspect")+" output ",1)):S("",!0)]),zt.value?(d(),p("div",nv,u(zt.value),1)):S("",!0),X.value.latest?(d(),p("div",sv,[n("span",null,u(X.value.latest.runner),1),n("strong",null,u(X.value.latest.status),1),n("small",null,u((X.value.latest.durationMs/1e3).toFixed(1))+"s · exit "+u(X.value.latest.exitCode??"unknown")+" · "+u(new Date(X.value.latest.ts).toLocaleString()),1)])):S("",!0),nt.value&&X.value.latest?(d(),p("pre",lv,u(X.value.latest.output||"The runner completed without console output."),1)):S("",!0)],2)):S("",!0),De.value?.probes.length?(d(),p("section",ov,[n("header",null,[o[120]||(o[120]=n("div",null,[n("p",{class:"eyebrow"},"PROBE LAB"),n("h3",null,"Resolve what the existing suite cannot prove."),n("p",null," Generated tests run in a disposable copy. Your repository remains untouched. ")],-1)),n("span",null,u(De.value.probes.filter(l=>l.latest?.status==="proven").length)+"/"+u(De.value.probes.length)+" proven",1)]),n("div",iv,[(d(!0),p(I,null,j(De.value.probes,l=>(d(),p("button",{key:l.id,class:x(["probe-card",l.latest?.status??l.readiness,{active:xe.value?.id===l.id}]),onClick:w=>{Jt.value=l.id,g.value=!1}},[n("span",rv,u(l.latest?.status??(l.readiness==="ready"?"ready":"needs context")),1),n("strong",null,u(l.label),1),n("small",null,u(l.hypothesis),1),n("em",null,u(l.framework),1)],10,av))),128))]),xe.value?(d(),p("article",uv,[n("div",cv,[n("span",{class:x(["probe-state",xe.value.latest?.status??xe.value.readiness])},u(xe.value.latest?.status??xe.value.readiness),3),n("h3",null,u(xe.value.label),1),n("p",null,u(xe.value.why),1),n("dl",null,[o[123]||(o[123]=n("div",null,[n("dt",null,"Isolation"),n("dd",null," Disposable project copy · minimized environment · network not isolated ")],-1)),n("div",null,[o[121]||(o[121]=n("dt",null,"Generated file",-1)),n("dd",null,u(xe.value.generatedPath),1)]),n("div",null,[o[122]||(o[122]=n("dt",null,"Command",-1)),n("dd",null,u(xe.value.command??"Waiting for a concrete protected route"),1)])]),n("button",{disabled:xe.value.readiness!=="ready"||!!Mt.value,onClick:o[42]||(o[42]=l=>or(xe.value))},u(Mt.value===xe.value.id?`${gt.value?.state??"Starting"} probe…`:xe.value.latest?"Run probe again":"Run isolated probe"),9,dv),Mt.value?(d(),p("button",{key:0,class:"cancel-job",onClick:o[43]||(o[43]=l=>Ps(gt.value))}," Cancel job")):xe.value.latest?(d(),p("button",{key:1,class:"probe-output-toggle",onClick:o[44]||(o[44]=l=>g.value=!g.value)},u(g.value?"Show source":"Show result"),1)):S("",!0)]),n("div",fv,[n("header",null,[n("span",null,u(g.value&&xe.value.latest?"EXECUTION RESULT":"GENERATED TEST PREVIEW"),1),n("small",null,u(g.value&&xe.value.latest?`${(xe.value.latest.durationMs/1e3).toFixed(1)}s · exit ${xe.value.latest.exitCode??"unknown"}`:"Nothing written to your repository"),1)]),g.value&&xe.value.latest?(d(),p("pre",pv,u(xe.value.latest.output||"The probe passed without console output."),1)):(d(),p("div",vv,[(d(!0),p(I,null,j(xe.value.source.split(`
|
|
11
|
+
`),(l,w)=>(d(),p("code",{key:w},[n("span",hv,u(w+1),1),n("span",gv,[(d(!0),p(I,null,j(le(mn)(l,xe.value.generatedPath),(W,ae)=>(d(),p("span",{key:ae,class:x(`syntax-${W.kind}`)},u(W.text),3))),128))])]))),128))]))])])):S("",!0),cn.value?(d(),p("div",mv,u(cn.value),1)):S("",!0)])):S("",!0),n("div",yv,[n("section",bv,[o[124]||(o[124]=n("header",null,[n("span",null,"1"),n("div",null,[n("strong",null,"Changed behavior"),n("small",null,"Added, modified, or removed")])],-1)),(d(!0),p(I,null,j(ml.value,l=>(d(),p("button",{key:l.id,class:x(["impact-node",l.status,Yn(l.id),{active:Pe.value?.id===l.id}]),onClick:w=>qe.value=l.id},[n("i",null,u(l.kind),1),n("strong",null,u(l.label),1),n("em",{class:x(["evidence-badge",tn(l)])},u(tn(l)),3),n("small",null,u(l.detail),1)],10,wv))),128)),ml.value.length?S("",!0):(d(),p("div",kv," No code symbols detected "))]),o[129]||(o[129]=n("div",{class:"impact-arrow","aria-hidden":"true"},"→",-1)),n("section",_v,[o[125]||(o[125]=n("header",null,[n("span",null,"2"),n("div",null,[n("strong",null,"Dependencies & callers"),n("small",null,"Repository blast radius")])],-1)),(d(!0),p(I,null,j(yl.value,l=>(d(),p("button",{key:l.id,class:x(["impact-node",l.status,Yn(l.id),{active:Pe.value?.id===l.id}]),onClick:w=>qe.value=l.id},[n("i",null,u(l.kind),1),n("strong",null,u(l.label),1),n("em",{class:x(["evidence-badge",tn(l)])},u(tn(l)),3),n("small",null,u(l.detail),1)],10,Cv))),128)),yl.value.length?S("",!0):(d(),p("div",xv," No external caller found in tracked source "))]),o[130]||(o[130]=n("div",{class:"impact-arrow","aria-hidden":"true"},"→",-1)),n("section",Sv,[o[128]||(o[128]=n("header",null,[n("span",null,"3"),n("div",null,[n("strong",null,"Proof & unknowns"),n("small",null,"What evidence can defend")])],-1)),(d(!0),p(I,null,j(xo.value,l=>(d(),p("button",{key:l.id,class:x(["impact-node",l.status,Yn(l.id),{active:Pe.value?.id===l.id}]),onClick:w=>qe.value=l.id},[o[126]||(o[126]=n("i",null,"test",-1)),n("strong",null,u(l.label),1),n("em",{class:x(["evidence-badge",tn(l)])},u(tn(l)),3),n("small",null,u(l.detail),1)],10,Ev))),128)),(d(!0),p(I,null,j(J.value.unproven,l=>(d(),p("article",{key:l,class:"unproven-node"},[o[127]||(o[127]=n("i",null,"NEEDS PROBE",-1)),n("strong",null,u(l),1)]))),128))])]),Pe.value?(d(),p("aside",Av,[n("div",null,[n("span",{class:x(["node-status",Pe.value.status])},u(Pe.value.status),3),n("h3",null,u(Pe.value.label),1),n("p",null,u(Pe.value.path??Pe.value.kind)+" · "+u(Pe.value.detail),1),n("p",$v,[n("b",null,u(tn(Pe.value))+" via "+u(tn(Pe.value)==="proven"?"runtime":Pe.value.evidence.source),1),B(" · "+u(lr(Pe.value)),1)])]),n("section",null,[o[131]||(o[131]=n("small",null,"CONNECTED RELATIONSHIPS",-1)),(d(!0),p(I,null,j(So.value,l=>(d(),p("button",{key:`${l.from}-${l.to}-${l.kind}`,onClick:w=>qe.value=l.node.id},[n("b",null,u(l.kind),1),n("span",null,u(l.node.label),1),n("em",{title:l.evidence.detail},u(l.evidence.level),9,Iv)],8,Rv))),128)),So.value.length?S("",!0):(d(),p("p",Tv," No direct edge detected. This is still a change surface worth verifying. "))])])):S("",!0),J.value.staleNotes.length?(d(),p("div",Pv,[o[132]||(o[132]=n("strong",null,"Prior understanding may be stale",-1)),n("p",null,u(J.value.staleNotes.length)+" saved explanation"+u(J.value.staleNotes.length===1?"":"s")+" mention files changed again. Re-verify before relying on them. ",1)])):S("",!0),n("button",{class:"impact-review",onClick:o[45]||(o[45]=l=>An($e.value))}," Turn this graph into an ownership session → ")])):(d(),p("div",Mv,[...o[133]||(o[133]=[n("strong",null,"No captured change to trace.",-1),n("span",null,"Make a code change and Aperta will build its behavioral graph.",-1)])]))],64)):i.value==="proofgraph"?(d(),p(I,{key:4},[n("div",Nv,[o[134]||(o[134]=n("div",null,[n("p",{class:"eyebrow"},"REPOSITORY MEMORY"),n("h2",null,"Behavioral Proof Graph"),n("p",null,"What changed, what proves it, who understands it, and which evidence became stale.")],-1)),n("button",{disabled:zn.value,onClick:Ns},[se(le(es),{class:"button-icon","aria-hidden":"true"}),B(" "+u(zn.value?"Rebuilding…":"Refresh graph"),1)],8,Ov)]),Ss.value?(d(),p("div",Lv,u(Ss.value),1)):zn.value&&!Ye.value?(d(),p("div",jv,[...o[135]||(o[135]=[n("div",{class:"spinner"},null,-1),B(" Connecting durable repository evidence… ",-1)])])):Ye.value?(d(),p("div",Fv,[n("section",Dv,[n("article",null,[n("strong",null,u(Ye.value.summary.claims),1),o[136]||(o[136]=n("span",null,"behavior claims",-1))]),n("article",Uv,[n("strong",null,u(Ye.value.summary.proven),1),o[137]||(o[137]=n("span",null,"executable proof",-1))]),n("article",Hv,[n("strong",null,u(Ye.value.summary.understood),1),o[138]||(o[138]=n("span",null,"human understood",-1))]),n("article",Vv,[n("strong",null,u(Ye.value.summary.stale),1),o[139]||(o[139]=n("span",null,"stale evidence",-1))]),n("article",null,[n("strong",null,u(Ye.value.summary.coveredFiles),1),o[140]||(o[140]=n("span",null,"connected files",-1))])]),n("div",Wv,[(d(),p(I,null,j(["all","proven","understood","supported","stale","regressed","unproven"],l=>n("button",{key:l,class:x({active:Es.value===l}),onClick:w=>Es.value=l},[B(u(l),1),n("span",null,u(l==="all"?Ye.value.summary.claims:Ye.value.summary[l]),1)],10,Bv)),64))]),ko.value.length?(d(),p("section",Kv,[(d(!0),p(I,null,j(ko.value,l=>(d(),p("article",{key:l.id,class:x(["proof-claim",l.status])},[n("header",null,[n("span",{class:x(["proof-status-dot",l.status]),"aria-hidden":"true"},null,2),n("div",null,[n("p",qv,u(l.source==="agent-run"?"AGENT BEHAVIOR":"CAPTURED CHANGE"),1),n("h3",null,u(l.title),1)]),n("span",{class:x(["proof-status-chip",l.status])},u(l.status),3)]),se(Hl,{class:"proof-claim-detail",source:l.detail},null,8,["source"]),n("div",Gv,[(d(!0),p(I,null,j(l.files,w=>(d(),p("button",{key:w,type:"button",onClick:W=>{i.value="map",Is(w)}},u(w),9,zv))),128)),l.files.length?S("",!0):(d(),p("span",Jv,"Repository observation"))]),l.invalidatedAt?(d(),p("div",Yv,[se(le($i),{class:"button-icon","aria-hidden":"true"}),n("div",null,[o[141]||(o[141]=n("strong",null,"Evidence invalidated by a later change",-1)),n("span",null,u(l.invalidatedBy)+" changed "+u(l.invalidatedFiles.join(", "))+" on "+u(en(l.invalidatedAt))+".",1)])])):S("",!0),l.evidence.length?(d(),p("details",Xv,[n("summary",null,u(l.evidence.length)+" evidence record"+u(l.evidence.length===1?"":"s"),1),n("ul",null,[(d(!0),p(I,null,j(l.evidence,w=>(d(),p("li",{key:w.id},[n("span",{class:x(["evidence-kind",w.kind])},u(w.kind),3),n("div",null,[n("strong",null,u(w.label),1),n("p",null,u(w.detail),1)]),n("time",null,u(en(w.ts)),1)]))),128))])])):S("",!0),n("footer",null,[n("span",null,u(en(l.ts)),1),l.assuranceAt?(d(),p("span",Zv,"Last assured "+u(en(l.assuranceAt)),1)):S("",!0)])],2))),128))])):(d(),p("div",Qv,[...o[142]||(o[142]=[n("strong",null,"No claims match this filter.",-1),n("span",null,"Run an agent task, execute proof, or complete an ownership session to grow repository memory.",-1)])]))])):S("",!0)],64)):i.value==="journal"?(d(),p(I,{key:5},[n("div",eh,[o[143]||(o[143]=n("div",null,[n("h2",null,"Learning Journal"),n("p",null,"Your explanations are durable, searchable project memory.")],-1)),Xe(n("input",{"onUpdate:modelValue":o[46]||(o[46]=l=>un.value=l),type:"search",placeholder:"Search notes, files, or tools…","aria-label":"Search learning journal"},null,512),[[ct,un.value]])]),n("div",th,[(d(!0),p(I,null,j(Co.value,l=>(d(),p("button",{key:l.diffId,class:"journal-card",onClick:w=>An(l.diffId)},[n("div",sh,[n("span",null,u(en(l.completions?.[0]?.ts??l.evidence?.[0]?.ts??l.notes?.[0]?.ts??l.ts)),1),n("strong",null,u(l.model??l.authorship),1),n("em",{class:x(l.demonstrated?"verified":"claimed")},u(l.demonstrated?"Demonstrated":"Reviewed"),3),n("b",{class:x(bl(l.score).tone)},u(l.score??"—")+"/3",3)]),n("blockquote",null,u(er(l)),1),n("div",lh,u(l.files.map(w=>w.path).slice(0,4).join(" · ")),1),n("small",null,u(l.notes.length)+" note"+u(l.notes.length===1?"":"s")+" · "+u(l.evidence?.at(0)?.completedCount??0)+" required evidence answers · "+u(Math.max(1,Math.round(l.durationMs/6e4)))+" min reviewed",1)],8,nh))),128)),Co.value.length?S("",!0):(d(),p("div",oh,[n("strong",null,u(un.value?"No sessions match.":"Your journal starts after the first review."),1),o[144]||(o[144]=n("span",null,"Every completed ownership session remains available here—even without a written note.",-1))]))])],64)):i.value==="git"?(d(),p(I,{key:6},[n("div",ih,[n("div",null,[o[145]||(o[145]=n("p",{class:"eyebrow"},"WORKING TREE",-1)),o[146]||(o[146]=n("h2",null,"Git Changes",-1)),n("p",null,"Live staged, unstaged, and untracked repository state on "+u(bt.value?.branch??t.value.branch)+".",1)]),n("button",{class:"git-refresh",disabled:Wn.value,onClick:Ls},[se(le(es),{class:"action-icon","aria-hidden":"true"}),B(u(Wn.value?"Refreshing…":"Refresh"),1)],8,ah)]),Cs.value?(d(),p("div",rh,u(Cs.value),1)):Wn.value&&!bt.value?(d(),p("div",uh,[...o[147]||(o[147]=[n("div",{class:"spinner"},null,-1),B("Reading working tree…",-1)])])):(d(),p("div",ch,[(d(!0),p(I,null,j([{key:"staged",title:"Staged",copy:"Ready for the next commit",files:bt.value?.staged??[]},{key:"unstaged",title:"Unstaged",copy:"Tracked files changed in the working tree",files:bt.value?.unstaged??[]},{key:"untracked",title:"Untracked",copy:"New files not yet added to Git",files:bt.value?.untracked??[]}],l=>(d(),p("section",{key:l.key,class:x(["git-group",l.key])},[n("header",null,[n("div",null,[n("h3",null,u(l.title),1),n("p",null,u(l.copy),1)]),n("b",null,u(l.files.length),1)]),(d(!0),p(I,null,j(l.files,w=>(d(),p("button",{key:`${l.key}-${w.path}`,onClick:W=>{i.value="map",Is(w.path)}},[n("span",{class:x(["git-status-code",l.key])},u(w.code),3),n("span",null,[n("strong",null,u(fn(w.path)),1),n("small",null,u(wl(w.path)),1)]),n("em",null,u(w.status),1)],8,dh))),128)),l.files.length?S("",!0):(d(),p("div",fh,[se(le(Ci),{class:"action-icon","aria-hidden":"true"}),B("Nothing "+u(l.key),1)]))],2))),128))]))],64)):i.value==="activity"?(d(),p(I,{key:7},[n("div",ph,[o[148]||(o[148]=n("div",null,[n("h2",null,"Capture Activity"),n("p",null," Every observer decision is visible—what happened, on which branch, and why. ")],-1)),n("span",{class:x(["engine-badge",t.value.observer?.mode])},u(t.value.observer?.mode==="daemon"?"Background engine":"Dashboard fallback"),3)]),n("div",vh,[(d(!0),p(I,null,j(t.value.observerActivity,l=>(d(),p("article",{key:`${l.ts}-${l.type}`,class:x(["activity-row",l.type])},[n("span",hh,[(d(),St(cs(Za(l)),{class:"activity-glyph-icon","aria-hidden":"true"}))]),n("div",null,[n("header",null,[n("strong",null,u(l.type),1),n("span",null,u(new Date(l.ts).toLocaleString()),1)]),n("p",null,u(l.message),1),n("small",null,[B(u(l.mode)+" · "+u(l.branch??"branch pending"),1),l.files?.length?(d(),p(I,{key:0},[B(" · "+u(l.files.length)+" files · "+u(l.files.reduce((w,W)=>w+W.added+W.removed,0))+" lines",1)],64)):S("",!0)])]),l.diffId?(d(),p("button",{key:0,onClick:w=>An(l.diffId)}," Open capture ",8,gh)):S("",!0)],2))),128)),t.value.observerActivity.length?S("",!0):(d(),p("div",mh,[...o[149]||(o[149]=[n("strong",null,"No observer activity yet.",-1),n("span",null,"Activity will appear when the engine starts or the repository changes.",-1)])]))])],64)):i.value==="harness"?(d(),p(I,{key:8},[n("div",yh,[o[150]||(o[150]=n("div",null,[n("p",{class:"eyebrow"},"HARNESS INTELLIGENCE"),n("h2",null,"Reliability you can improve, not merely observe."),n("p",null," Aperta measures the model and harness together while keeping raw prompts and evidence in private user storage outside Git. ")],-1)),n("button",{disabled:Gn.value,onClick:Os},[se(le(es),{class:"button-icon","aria-hidden":"true"}),B(" "+u(Gn.value?"Refreshing…":"Refresh signals"),1)],8,bh)]),xs.value?(d(),p("div",wh,u(xs.value),1)):Gn.value&&!be.value?(d(),p("div",kh,[...o[151]||(o[151]=[n("div",{class:"spinner"},null,-1),B(" Building the local harness baseline… ",-1)])])):be.value?(d(),p("div",_h,[n("section",Ch,[(d(!0),p(I,null,j(be.value.signals,l=>(d(),p("article",{key:l.title,class:x(l.level)},[n("span",null,[(d(),St(cs(Qa(l)),{class:"harness-signal-icon","aria-hidden":"true"}))]),n("div",null,[n("strong",null,u(l.title),1),n("p",null,u(l.detail),1)])],2))),128))]),n("section",xh,[n("article",null,[o[152]||(o[152]=n("small",null,"FIRST-PASS SUCCESS",-1)),n("strong",null,u(lt(be.value.summary.firstPassRate)),1),o[153]||(o[153]=n("p",null,"Passed without repair",-1))]),n("article",null,[o[154]||(o[154]=n("small",null,"REPAIR RECOVERY",-1)),n("strong",null,u(lt(be.value.summary.repairRate)),1),o[155]||(o[155]=n("p",null,"Failed first, then recovered",-1))]),n("article",null,[o[156]||(o[156]=n("small",null,"TOOL RELIABILITY",-1)),n("strong",null,u(lt(be.value.summary.toolReliability)),1),o[157]||(o[157]=n("p",null,"Successful bounded actions",-1))]),n("article",null,[o[158]||(o[158]=n("small",null,"PROMOTION RATE",-1)),n("strong",null,u(lt(be.value.summary.promotionRate)),1),o[159]||(o[159]=n("p",null,"Reviewable patches applied",-1))]),n("article",null,[o[160]||(o[160]=n("small",null,"TRUSTED KEEP RATE",-1)),n("strong",null,u(lt(be.value.summary.keepRate)),1),n("p",null,u(be.value.summary.sampledLines?`${be.value.summary.keptLines}/${be.value.summary.sampledLines} added lines remain`:"Begins after promotion"),1)]),n("article",null,[o[161]||(o[161]=n("small",null,"MODEL LATENCY",-1)),n("strong",null,u($s(be.value.summary.averageProviderLatencyMs)),1),o[162]||(o[162]=n("p",null,"Average provider action",-1))])]),n("div",Sh,[n("section",Eh,[n("header",null,[o[163]||(o[163]=n("div",null,[n("h3",null,"Model × harness performance"),n("p",null," Local outcomes by provider and model—not a generic leaderboard. ")],-1)),n("span",null,u(be.value.summary.runs)+" runs",1)]),n("div",Ah,[o[164]||(o[164]=n("div",{class:"health-table-head",role:"row"},[n("span",null,"Model"),n("span",null,"Complete"),n("span",null,"First pass"),n("span",null,"Repair"),n("span",null,"Tools"),n("span",null,"Latency")],-1)),(d(!0),p(I,null,j(be.value.models,l=>(d(),p("div",{key:l.key,class:"health-table-row",role:"row"},[n("strong",null,[n("small",null,u(l.provider),1),B(u(l.model),1)]),n("span",null,u(lt(l.completionRate)),1),n("span",null,u(lt(l.firstPassRate)),1),n("span",null,u(lt(l.repairRate)),1),n("span",null,u(lt(l.toolReliability)),1),n("span",null,u($s(l.averageProviderLatencyMs)),1)]))),128)),be.value.models.length?S("",!0):(d(),p("div",$h," Run an agent task to establish the first model baseline. "))])]),n("section",Rh,[o[165]||(o[165]=n("header",null,[n("div",null,[n("h3",null,"Tool reliability"),n("p",null," Errors remain attributed to the tool and model that produced them. ")])],-1)),(d(!0),p(I,null,j(be.value.tools,l=>(d(),p("div",{key:l.action,class:"tool-health-row"},[n("div",null,[n("strong",null,u(l.action),1),n("span",null,u(l.calls)+" calls · "+u(l.errors)+" errors · "+u($s(l.averageLatencyMs)),1)]),n("b",null,u(lt(l.reliability)),1),n("i",null,[n("span",{style:yn({width:lt(l.reliability)})},null,4)])]))),128)),be.value.tools.length?S("",!0):(d(),p("div",Ih," No bounded tool actions recorded yet. "))]),n("section",Th,[o[166]||(o[166]=n("header",null,[n("div",null,[n("h3",null,"Error taxonomy"),n("p",null," Unknown failures are harness defects; expected failures stay measurable. ")])],-1)),be.value.errors.length?(d(),p("div",Ph,[(d(!0),p(I,null,j(be.value.errors,l=>(d(),p("article",{key:l.class,class:x({unknown:l.class==="HarnessBug"})},[n("strong",null,u(l.count),1),n("span",null,u(l.class),1),n("small",null,u(lt(l.share))+" of errors",1)],2))),128))])):(d(),p("div",Mh," No errors recorded in retained runs. "))]),n("section",Nh,[o[167]||(o[167]=n("header",null,[n("div",null,[n("h3",null,"Recent runs"),n("p",null," Fast feedback for regressions after a prompt, tool, or model change. ")])],-1)),n("ol",null,[(d(!0),p(I,null,j(be.value.recent,l=>(d(),p("li",{key:l.id},[n("span",{class:x(l.status)},null,2),n("div",null,[n("strong",null,u(l.intent),1),n("small",null,u(l.provider)+" · "+u(l.model)+" · "+u(new Date(l.ts).toLocaleString()),1)]),n("div",Oh,[l.firstPass?(d(),p("em",Lh,"first pass")):S("",!0),l.repaired?(d(),p("em",jh,"repaired")):S("",!0),l.promoted?(d(),p("em",Fh,"promoted")):S("",!0),(d(!0),p(I,null,j(l.errors,w=>(d(),p("em",{key:w,class:"error"},u(w),1))),128)),n("b",null,u(l.status),1)])]))),128))])])]),n("footer",Dh,[n("span",null,[se(le(Qd),{class:"harness-privacy-icon","aria-hidden":"true"})]),n("p",null,[o[168]||(o[168]=n("strong",null,"Local intelligence boundary",-1)),B(u(be.value.privacy),1)]),n("small",null,"Updated "+u(new Date(be.value.generatedAt).toLocaleTimeString()),1)])])):S("",!0)],64)):i.value==="agents"?(d(),p(I,{key:9},[at.value?(d(),p("div",Uh,u(at.value),1)):S("",!0),n("div",{class:x(["agent-ide",{"pane-closed":!ne.value}]),style:yn({"--agent-pane-width":`${re.value}px`})},[n("main",Hh,[n("header",Vh,[n("div",null,[o[169]||(o[169]=n("p",{class:"eyebrow"},"AGENT WORKBENCH",-1)),n("h2",null,u(Re.value?Re.value.title:"Build with an agent. Keep ownership."),1)]),n("div",Wh,[n("button",{class:"workbench-settings-link",type:"button",onClick:Do},[se(le(Ei),{"aria-hidden":"true"}),o[170]||(o[170]=B(" Model settings ",-1))]),ne.value?(d(),p("span",Bh,"Current: "+u(bo.value),1)):(d(),p("button",{key:0,onClick:o[47]||(o[47]=l=>Jn(!0))}," Show agent pane"))])]),C.value?(d(),p("section",Kh,[n("header",null,[n("div",null,[n("p",qh," RUN ENGINE · "+u(C.value.provider)+" · "+u(C.value.model),1),C.value.intent!==Re.value?.title?(d(),p("h3",Gh,u(C.value.intent),1)):S("",!0)]),n("span",{class:x(["agent-run-status",C.value.status])},u(C.value.status),3)]),n("div",zh,[C.value.status!=="no-changes"?(d(),p("button",{key:0,role:"tab","aria-selected":Ee.value==="understand",class:x({active:Ee.value==="understand",complete:C.value.understanding?.completedAt}),onClick:o[48]||(o[48]=l=>Ee.value="understand")},[o[171]||(o[171]=B(" Understand ",-1)),n("b",null,u(C.value.understanding?.completedAt?"✓":"?"),1)],10,Jh)):S("",!0),C.value.status!=="no-changes"?(d(),p("button",{key:1,role:"tab","aria-selected":Ee.value==="plan",class:x(["plan-tab",C.value.contract.status,{active:Ee.value==="plan"}]),onClick:o[49]||(o[49]=l=>Ee.value="plan")},[o[172]||(o[172]=B(" Plan ",-1)),n("b",null,u(C.value.contract.criteria.filter(l=>l.status==="proven").length)+"/"+u(C.value.contract.criteria.length),1)],10,Yh)):S("",!0),n("button",{role:"tab","aria-selected":Ee.value==="changes",class:x({active:Ee.value==="changes"}),onClick:o[50]||(o[50]=l=>Ee.value="changes")},[B(u(C.value.status==="no-changes"?"Response":"Changes")+" ",1),C.value.status!=="no-changes"?(d(),p("b",Zh,u(C.value.files.length),1)):S("",!0)],10,Xh),C.value.status!=="no-changes"||C.value.verification.baseline||C.value.verification.attempts.length?(d(),p("button",{key:2,role:"tab","aria-selected":Ee.value==="checks",class:x(["checks-tab",C.value.verification.status,{active:Ee.value==="checks"}]),onClick:o[51]||(o[51]=l=>Ee.value="checks")},[o[173]||(o[173]=B(" Checks ",-1)),n("b",null,u(C.value.verification.status==="passed"?"✓":C.value.verification.status==="failed"?"!":"—"),1)],10,Qh)):S("",!0),n("button",{role:"tab","aria-selected":Ee.value==="activity",class:x({active:Ee.value==="activity"}),onClick:o[52]||(o[52]=l=>Ee.value="activity")},[o[174]||(o[174]=B(" Activity ",-1)),n("b",null,u(C.value.actions.length),1)],10,e1)]),Ee.value==="understand"?(d(),p("section",t1,[n("header",null,[n("div",null,[o[175]||(o[175]=n("p",{class:"eyebrow"},"POST-RUN UNDERSTANDING BRIEF",-1)),n("h3",null,u(Ya(C.value)),1),o[176]||(o[176]=n("p",null," Trace the result back to repository evidence before you treat the change as understood. ",-1))]),n("span",{class:x({complete:C.value.understanding?.completedAt})},u(C.value.understanding?.completedAt?"recorded":"open"),3)]),C.value.understanding?(d(),p("div",n1,[n("article",null,[o[177]||(o[177]=n("h4",null,"What proves it",-1)),n("ul",null,[(d(!0),p(I,null,j(C.value.understanding.proof,l=>(d(),p("li",{key:l},u(Rs(l)),1))),128))])]),n("article",null,[o[178]||(o[178]=n("h4",null,"What remains uncertain",-1)),n("ul",null,[(d(!0),p(I,null,j(C.value.understanding.uncertainties,l=>(d(),p("li",{key:l},u(Rs(l)),1))),128))])]),n("article",s1,[n("div",null,[o[179]||(o[179]=n("div",null,[n("h4",null,"Demonstrate ownership"),n("p",null," These answers are retained with the run as durable learning evidence. ")],-1)),n("span",null,u(C.value.evidenceGraph?.nodes.length??0)+" nodes · "+u(C.value.evidenceGraph?.edges.length??0)+" links ",1)]),(d(!0),p(I,null,j(C.value.understanding.questions,l=>(d(),p("label",{key:l.id},[n("span",null,[n("b",null,u(l.label),1),B(" "+u(l.text),1)]),Xe(n("textarea",{"onUpdate:modelValue":w=>Kn.value[l.id]=w,rows:"3",placeholder:`Explain the ${l.label.toLowerCase()} from your own understanding…`},null,8,l1),[[ct,Kn.value[l.id]]])]))),128)),n("button",{class:"understanding-save",disabled:qn.value,onClick:Mr},u(qn.value?"Saving…":"Save understanding evidence"),9,o1)])])):S("",!0)])):Ee.value==="plan"?(d(),p("section",i1,[n("header",{class:x(C.value.promotion.status)},[n("div",null,[n("p",a1," EXECUTION CONTRACT · "+u(C.value.contract.source),1),n("h3",null,u(C.value.contract.goal),1),n("p",null,u(C.value.promotion.reason),1)]),n("span",null,u(C.value.promotion.status),1)],2),n("section",r1,[n("div",u1,[se(le(Ai),{class:"nav-icon","aria-hidden":"true"})]),n("div",null,[n("p",c1,"APERTA SKILL · V"+u(C.value.skill.version),1),n("h4",null,u(C.value.skill.label),1),n("p",null,u(C.value.skill.description),1)]),n("span",{class:x(["skill-mode",C.value.skill.mode])},u(C.value.skill.mode),3),n("details",null,[n("summary",null,u(C.value.skill.allowedTools.length)+" allowed capabilities · "+u(C.value.skill.proof.length)+" proof requirements",1),n("div",d1,[n("section",null,[o[180]||(o[180]=n("strong",null,"Allowed capabilities",-1)),n("div",null,[(d(!0),p(I,null,j(C.value.skill.allowedTools,l=>(d(),p("code",{key:l},u(l),1))),128))])]),n("section",null,[o[181]||(o[181]=n("strong",null,"Learning objectives",-1)),n("ul",null,[(d(!0),p(I,null,j(C.value.skill.learningObjectives,l=>(d(),p("li",{key:l},u(l),1))),128))])])])])]),n("div",f1,[n("article",p1,[o[183]||(o[183]=n("h4",null,"Plan",-1)),n("ol",null,[(d(!0),p(I,null,j(C.value.contract.steps,(l,w)=>(d(),p("li",{key:l.id,class:x(l.status)},[n("span",null,u(l.status==="complete"?"✓":l.status==="blocked"?"!":w+1),1),n("div",null,[n("strong",null,u(l.title),1),n("p",null,u(l.detail),1)])],2))),128))]),C.value.contract.constraints.length?(d(),p("details",v1,[o[182]||(o[182]=n("summary",null,"Constraints",-1)),n("ul",null,[(d(!0),p(I,null,j(C.value.contract.constraints,l=>(d(),p("li",{key:l},u(l),1))),128))])])):S("",!0)]),n("article",h1,[o[184]||(o[184]=n("h4",null,"Acceptance evidence",-1)),(d(!0),p(I,null,j(C.value.contract.criteria,l=>(d(),p("div",{key:l.id,class:x(["criterion-row",l.status])},[n("span",null,u(l.status==="proven"?"✓":l.status==="failed"?"!":l.status==="supported"?"≈":"—"),1),n("div",null,[n("header",null,[n("strong",null,u(l.text),1),n("em",null,u(l.status),1)]),n("small",null,u(l.method)+" evidence",1),l.evidence.length?(d(),p("ul",g1,[(d(!0),p(I,null,j(l.evidence,w=>(d(),p("li",{key:w},u(w),1))),128))])):S("",!0)])],2))),128))]),n("aside",m1,[o[186]||(o[186]=n("h4",null,"Independent harness critique",-1)),(d(!0),p(I,null,j(C.value.critique?.findings??[],l=>(d(),p("div",{key:l.title,class:x(l.severity)},[n("span",null,u(l.severity==="blocker"?"!":l.severity==="warning"?"△":"✓"),1),n("div",null,[n("strong",null,u(l.title),1),n("p",null,u(l.detail),1)])],2))),128)),C.value.critique?S("",!0):(d(),p("div",y1,[...o[185]||(o[185]=[n("span",null,"…",-1),n("div",null,[n("strong",null,"Critique pending"),n("p",null," Aperta evaluates the final patch after execution and verification complete. ")],-1)])]))])])])):Ee.value==="changes"?(d(),p(I,{key:2},[n("div",b1,[n("div",null,[(d(!0),p(I,null,j(C.value.files,l=>(d(),p("button",{key:l.path,class:x({active:As.value?.path===l.path}),title:l.path,onClick:w=>Sn.value=l.path},[n("strong",null,u(fn(l.path)),1),n("small",null,"+"+u(l.added)+" −"+u(l.removed),1)],10,w1))),128))]),n("span",null,u(C.value.files.length?`${C.value.files.length} reviewable file${C.value.files.length===1?"":"s"}`:C.value.status==="running"||C.value.status==="verifying"?"Waiting for changes":"No files changed"),1)]),As.value?(d(),p("div",k1,[(d(!0),p(I,null,j(As.value.lines,(l,w)=>(d(),p("div",{key:w,class:x(["diff-line",l.kind])},[n("span",_1,u(l.oldLine??""),1),n("span",C1,u(l.newLine??""),1),n("span",x1,u(l.kind==="add"?"+":l.kind==="delete"?"−":l.kind==="context"?" ":""),1),n("code",null,[(d(!0),p(I,null,j(le(mn)(l.text,As.value.path),(W,ae)=>(d(),p("span",{key:ae,class:x(`syntax-${W.kind}`)},u(W.text),3))),128))])],2))),128))])):C.value.status==="no-changes"?(d(),p("article",S1,[o[188]||(o[188]=n("div",{class:"agent-no-change-icon"},"✓",-1)),o[189]||(o[189]=n("div",null,[n("p",{class:"eyebrow"},"ANALYSIS COMPLETE"),n("h4",null,"No files were changed"),n("p",null," The agent inspected the repository and returned an explanation instead of manufacturing a patch. ")],-1)),n("section",null,[o[187]||(o[187]=n("strong",null,"Response",-1)),C.value.capabilities?.length?(d(),p("div",E1,[(d(!0),p(I,null,j(C.value.capabilities,l=>(d(),p("article",{key:l.id,class:x(l.status)},[n("span",null,u(l.status==="passed"||l.status==="reachable"?"✓":"!"),1),n("div",null,[n("strong",null,u(l.label),1),n("p",null,u(l.summary),1),n("small",null,u(l.command)+" · "+u((l.durationMs/1e3).toFixed(1))+"s",1)])],2))),128))])):S("",!0),se(Hl,{source:C.value.summary,"aria-label":"Agent response"},null,8,["source"])])])):(d(),p("div",A1,[n("strong",null,u(C.value.status==="failed"?"Run failed before producing a patch.":C.value.status==="running"||C.value.status==="verifying"?"The agent is still working.":"No repository changes were produced."),1),n("span",null,u(C.value.error),1),C.value.status==="failed"?(d(),p("button",{key:0,class:"agent-run-retry",onClick:o[53]||(o[53]=l=>{Je.value=C.value.intent,Jn(!0)})}," Retry in conversation ")):S("",!0)]))],64)):Ee.value==="checks"?(d(),p("section",$1,[n("header",{class:x(C.value.verification.status)},[n("span",null,u(C.value.verification.status==="passed"?"✓":C.value.verification.status==="failed"?"!":"—"),1),n("div",null,[n("strong",null,u(C.value.verification.status==="passed"?"Verification passed":C.value.verification.status==="failed"?"Verification needs attention":C.value.verification.plan.length?"Verification has not run yet":"No supported checks detected"),1),n("p",null,u(C.value.verification.plan.length?C.value.verification.plan.join(" · "):"Aperta did not find an allowlisted test, type-check, lint, or build command for this project."),1)])],2),C.value.verification.baseline?(d(),p("article",R1,[n("h4",null,[n("span",{class:x(C.value.verification.baseline.status)},u(C.value.verification.baseline.status==="passed"?"✓":"!"),3),o[190]||(o[190]=B(" Pre-change baseline ",-1)),n("small",null,u(new Date(C.value.verification.baseline.ts).toLocaleTimeString()),1)]),(d(!0),p(I,null,j(C.value.verification.baseline.checks,l=>(d(),p("details",{key:`baseline-${l.id}`,class:x(["verification-check",l.status])},[n("summary",null,[n("span",null,u(l.status==="passed"?"✓":"!"),1),n("strong",null,u(l.label),1),n("code",null,u(l.command),1),n("small",null,u((l.durationMs/1e3).toFixed(1))+"s",1)]),n("pre",null,u(l.output||"Completed without console output."),1)],2))),128))])):S("",!0),(d(!0),p(I,null,j(C.value.verification.attempts,l=>(d(),p("article",{key:l.index,class:"verification-attempt"},[n("h4",null,[n("span",{class:x(l.status)},u(l.status==="passed"?"✓":"!"),3),B(" Post-change attempt "+u(l.index)+" ",1),n("small",null,u(new Date(l.ts).toLocaleTimeString()),1)]),(d(!0),p(I,null,j(l.checks,w=>(d(),p("details",{key:`${l.index}-${w.id}`,class:x(["verification-check",w.status]),open:w.status!=="passed"},[n("summary",null,[n("span",null,u(w.status==="passed"?"✓":"!"),1),n("strong",null,u(w.label),1),n("code",null,u(w.command),1),n("small",null,u((w.durationMs/1e3).toFixed(1))+"s",1)]),n("pre",null,u(w.output||"Completed without console output."),1)],10,I1))),128))]))),128)),C.value.verification.attempts.length?S("",!0):(d(),p("div",T1,[C.value.status==="verifying"?(d(),p("div",P1)):S("",!0),n("strong",null,u(C.value.status==="verifying"?"Running project checks…":"No post-change verification attempts recorded."),1)]))])):(d(),p("section",{key:4,ref_key:"agentActivityPanel",ref:wo,class:"agent-activity-feed"},[C.value.summary&&C.value.status!=="running"&&C.value.status!=="verifying"?(d(),p("article",M1,[n("div",N1,[o[191]||(o[191]=n("span",{"aria-hidden":"true"},"✦",-1)),o[192]||(o[192]=n("strong",null,"Response",-1)),n("time",null,u(C.value.finishedAt?new Date(C.value.finishedAt).toLocaleTimeString():""),1)]),se(Hl,{source:C.value.summary},null,8,["source"])])):S("",!0),n("ol",null,[(d(!0),p(I,null,j(za(C.value.actions),l=>(d(),p("li",{key:l.index,class:x(l.status)},[n("span",{class:x(["activity-step-icon",l.action,l.status])},[(d(),St(cs(Xa(l)),{class:"action-icon","aria-hidden":"true"}))],2),n("div",null,[n("header",null,[n("b",null,u(l.action),1),n("time",null,[l.errorClass?(d(),p("em",O1,u(l.errorClass),1)):S("",!0),B(u(l.durationMs!==void 0?$s(l.durationMs):"")+" · "+u(new Date(l.ts).toLocaleTimeString()),1)])]),l.path?(d(),p("code",L1,u(_l(l.path)),1)):S("",!0),Ro(l)?(d(),p("p",j1,u(Ro(l)),1)):S("",!0),l.command?(d(),p("code",F1,u(l.command),1)):S("",!0),l.output?(d(),p("details",{key:3,class:x(["activity-evidence",l.evidenceStatus]),open:l.evidenceStatus==="failed"||l.evidenceStatus==="crashed"||l.evidenceStatus==="unhealthy"},[n("summary",null,[o[193]||(o[193]=n("strong",null,"Runtime evidence",-1)),n("span",null,u(l.evidenceStatus??"captured"),1)]),n("pre",null,u(l.output),1)],10,D1)):S("",!0)])],2))),128))]),C.value.status==="running"||C.value.status==="verifying"?(d(),p("div",U1,[o[194]||(o[194]=n("span",{class:"spinner"},null,-1)),n("span",null,[n("strong",null,u(C.value.status==="verifying"?"Running checks":"Agent working"),1),n("small",null,u(C.value.status==="verifying"?"Comparing evidence in the isolated patch":"Following the execution contract"),1)])])):C.value.actions.length?S("",!0):(d(),p("div",H1,[...o[195]||(o[195]=[n("strong",null,"No actions were recorded.",-1)])]))],512)),C.value.status==="ready"?(d(),p("footer",{key:5,class:x(["promotion-gate",C.value.promotion.status])},[n("div",V1,[o[197]||(o[197]=n("span",{class:"promotion-icon","aria-hidden":"true"},"!",-1)),n("div",null,[n("strong",null,u(C.value.promotion.status==="review-required"?"Review before promotion":"Ready to promote"),1),n("p",null,u(C.value.promotion.reason),1),o[196]||(o[196]=n("small",null,"Aperta will confirm the repository still matches this run before applying anything.",-1))])]),n("div",W1,[n("label",null,[Xe(n("input",{"onUpdate:modelValue":o[54]||(o[54]=l=>Xt.value=l),type:"checkbox"},null,512),[[Jc,Xt.value]]),o[198]||(o[198]=n("span",null,[n("strong",null,"I reviewed this change"),n("small",null,"Patch, evidence, and remaining uncertainty")],-1))]),n("button",{disabled:!Xt.value||Bn.value||!C.value.promotion.allowed,onClick:Pr},u(Bn.value?"Verifying…":"Promote patch"),9,B1)])],2)):C.value.status==="applied"?(d(),p("footer",K1,[...o[199]||(o[199]=[n("strong",null,"✓ Contract satisfied and patch promoted",-1),n("span",null,"Aperta is observing the real working tree and will capture the change for proof and ownership.",-1)])])):C.value.status==="verification-failed"?(d(),p("footer",q1,[n("div",null,[o[200]||(o[200]=n("strong",null,"Checks blocked promotion",-1)),n("span",null,u(C.value.verification.attempts.length>=3?"The bounded repair attempts completed without a passing build.":`The agent reached its bounded action limit after ${C.value.verification.attempts.length} verification attempt${C.value.verification.attempts.length===1?"":"s"}.`)+" Continue in this conversation so the existing patch and compiler evidence stay available.",1)]),n("button",{onClick:o[55]||(o[55]=l=>{Je.value="Fix the failing verification checks shown in the latest run. Use the compiler output, preserve the intended behavior, and do not weaken legitimate tests.",Jn(!0)})}," Fix failing checks ")])):S("",!0)])):(d(),p("section",G1,[...o[201]||(o[201]=[Ll('<div class="agent-welcome-mark">✦</div><h3>Your agent workspace</h3><p> Start with a task in the agent pane. Aperta will keep the work isolated and bring you back a reviewable patch. </p><ol><li><b>1</b><span><strong>Agent works</strong><small>Reads, searches, and edits in a disposable worktree.</small></span></li><li><b>2</b><span><strong>You review</strong><small>Inspect every changed file and the complete action record.</small></span></li><li><b>3</b><span><strong>You promote</strong><small>Apply only after Aperta confirms the repository is still safe.</small></span></li></ol>',4)])]))]),ne.value?(d(),p("button",{key:0,class:"agent-pane-resizer","aria-label":"Resize agent pane",title:"Drag to resize agent pane",onPointerdown:_t(sr,["prevent"]),onKeydown:[o[56]||(o[56]=hn(_t(l=>Mo(20),["prevent"]),["left"])),o[57]||(o[57]=hn(_t(l=>Mo(-20),["prevent"]),["right"]))]},[...o[202]||(o[202]=[n("span",null,null,-1)])],32)):S("",!0),ne.value?(d(),p("aside",z1,[n("header",null,[n("div",null,[o[203]||(o[203]=n("span",{class:"agent-orb"},"✦",-1)),n("div",null,[n("strong",null,u(xn.value?nn(xn.value.kind):"Execution engine"),1),n("small",null,u(bo.value),1)])]),n("button",{class:"icon-close",onClick:o[58]||(o[58]=l=>Jn(!1)),"aria-label":"Close agent pane",title:"Close agent pane"},[se(le(Ri),{class:"nav-icon","aria-hidden":"true"})])]),n("section",J1,[n("div",null,[o[204]||(o[204]=n("label",{for:"agent-conversation-select"},"Conversation",-1)),n("button",{class:"agent-new-task",disabled:Nt.value,onClick:Tr}," + New task ",8,Y1)]),n("select",{id:"agent-conversation-select",value:Re.value?.id??"",disabled:!st.value.length||Nt.value,onChange:o[59]||(o[59]=l=>Ir(l.target.value))},[Lt.value?(d(),p("option",Z1," New task ")):st.value.length?S("",!0):(d(),p("option",Q1," No conversations yet ")),(d(!0),p(I,null,j(st.value,l=>(d(),p("option",{key:l.id,value:l.id},u(l.title),9,eg))),128))],40,X1),n("small",null,u(Re.value?`${Re.value.runs.length} turn${Re.value.runs.length===1?"":"s"} in this conversation`:"Fresh context"),1)]),n("section",tg,[n("header",null,[n("strong",null,u(Nt.value?"Working now":Lt.value?"New conversation":"Conversation"),1),Re.value?(d(),p("span",ng,u(Re.value.runs.length)+" "+u(Re.value.runs.length===1?"turn":"turns"),1)):S("",!0)]),Re.value?.runs.length?(d(),p("ol",sg,[(d(!0),p(I,null,j(Re.value.runs,l=>(d(),p("li",{key:l.id,class:x({selected:C.value?.id===l.id}),onClick:w=>El(l.id)},[n("span",null,u(l.turnIndex),1),n("div",null,[o[205]||(o[205]=n("strong",null,"You",-1)),n("p",null,u(l.intent),1),n("small",{class:x(["agent-turn-result",l.status])},u(l.status)+" · "+u(Ja(l)),3)])],10,lg))),128))])):(d(),p("div",og," Describe the outcome you want. Follow-ups will stay together here. ")),Nt.value?(d(),p("div",ig,[o[206]||(o[206]=n("span",{class:"spinner"},null,-1)),B(u(_s.value?.state==="queued"?"Preparing workspace…":"Inspecting and editing…"),1),n("button",{onClick:o[60]||(o[60]=l=>Ps(_s.value))},"Stop")])):S("",!0)]),n("footer",ag,[n("div",rg,[n("button",{onClick:o[61]||(o[61]=l=>Je.value="Investigate the current failing behavior, identify the root cause, and implement the smallest safe fix.")}," Fix"),n("button",{onClick:o[62]||(o[62]=l=>Je.value="Refactor the selected area for clarity without changing its public behavior.")}," Refactor"),n("button",{onClick:o[63]||(o[63]=l=>Je.value="Add tests for the most important unproven behavior in this repository.")}," Tests ")]),Xe(n("textarea",{"onUpdate:modelValue":o[64]||(o[64]=l=>Je.value=l),rows:"5",placeholder:Re.value?"Follow up in this conversation…":"Start a task: ask Aperta to change or explain this repository…","aria-label":"Agent change intent",title:"Enter to send · Shift+Enter for a new line",onKeydown:[hn(_t(js,["exact","prevent"]),["enter"]),hn(_t(js,["meta","prevent"]),["enter"]),hn(_t(js,["ctrl","prevent"]),["enter"])]},null,40,ug),[[ct,Je.value]]),n("div",null,[n("span",{title:C.value?.context?.lastInputChars?`${C.value.context.lastInputChars.toLocaleString()} of ${C.value.context.maxInputChars.toLocaleString()} input characters in the latest action; token count is estimated.`:"Enter to send · Shift+Enter for a new line"},u(C.value?.context?.lastInputChars?`Turn ${(Re.value?.runs.length??0)+1} · ≈${Math.ceil(C.value.context.estimatedLastInputTokens/1e3)}k/${Math.ceil(C.value.context.estimatedMaxInputTokens/1e3)}k context`:Re.value?`Turn ${Re.value.runs.length+1} · context ≤24k`:"New task · Enter to send"),9,cg),Da.value?(d(),p("button",{key:1,class:"agent-send",disabled:Nt.value||Je.value.trim().length<10,onClick:js},[B(u(Nt.value?"Working…":Re.value?"Send":"Start")+" ",1),o[207]||(o[207]=n("span",null,"↗",-1))],8,dg)):(d(),p("button",{key:0,class:"configure-agent",onClick:Do}," Configure engine"))])])])):(d(),p("button",{key:2,class:"agent-pane-rail",onClick:o[65]||(o[65]=l=>Jn(!0)),"aria-label":"Open agent pane",title:"Open agent pane"},[...o[208]||(o[208]=[n("span",null,"✦",-1),n("strong",null,"Agent",-1)])]))],6)],64)):i.value==="settings"?(d(),p(I,{key:10},[n("div",fg,[o[209]||(o[209]=n("div",null,[n("h2",null,"Engines & Intelligence"),n("p",null," Choose the coding engine, then configure the models Aperta uses for its own intelligence. ")],-1)),n("div",pg,[F.value?(d(),p("button",{key:0,type:"button",class:"return-to-workbench",onClick:yr}," ← Agent Workbench ")):S("",!0),n("span",vg,u($.value?.secureStorage??"Loading secure storage…"),1)])]),D.value?(d(),p("div",hg,u(D.value),1)):S("",!0),n("section",gg,[n("header",null,[o[210]||(o[210]=n("div",null,[n("p",{class:"eyebrow"},"EXECUTION ENGINE"),n("h3",{id:"agent-runtime-title"},"Choose who plans and edits."),n("p",null,"The engine runs the coding loop. Aperta wraps every engine with the same evidence and ownership harness.")],-1)),n("span",mg,"ACTIVE · "+u($.value?.agentRuntime.kind??"aperta"),1)]),n("div",yg,[(d(!0),p(I,null,j($.value?.agentRuntimes??[],l=>(d(),p("button",{key:l.kind,type:"button",class:x({selected:ce.value.kind===l.kind,unavailable:!l.available}),"aria-pressed":ce.value.kind===l.kind,onClick:w=>ce.value.kind=l.kind},[n("span",wg,u(_r(l.kind)),1),n("span",null,[n("strong",null,u(nn(l.kind)),1),n("small",null,u(kr(l.kind)),1)]),n("em",{class:x({ready:l.available})},u(l.available?"READY":"SETUP NEEDED"),3),n("p",null,u(l.detail),1)],10,bg))),128))]),n("div",kg,[n("div",null,[n("small",null,u(ce.value.kind==="aperta"?"APERTA NATIVE OWNS":`${nn(ce.value.kind).toUpperCase()} OWNS`),1),o[211]||(o[211]=n("strong",null,"Planning · context · tool choices · edits",-1)),ce.value.kind==="aperta"?(d(),p("span",_g,"Powered by the Builder model configured below.")):(d(),p("span",Cg,"Powered by the model and credentials configured inside that runtime."))]),o[212]||(o[212]=n("i",{"aria-hidden":"true"},"→",-1)),o[213]||(o[213]=n("div",{class:"aperta-owns"},[n("small",null,"APERTA ALWAYS OWNS"),n("strong",null,"Isolation · checks · repair feedback"),n("span",null,"Evidence · review · promotion · learning")],-1))]),ce.value.kind!=="aperta"?(d(),p("div",xg,[n("label",null,[B(u(nn(ce.value.kind))+" model ",1),Xe(n("input",{"onUpdate:modelValue":o[66]||(o[66]=l=>ce.value.model=l),placeholder:ce.value.kind==="opencode"?"Optional — provider/model":"Optional — use runtime default"},null,8,Sg),[[ct,ce.value.model]])]),o[214]||(o[214]=n("p",null,"Passed directly to the selected CLI. The runtime manages authentication; Aperta never stores its credentials.",-1)),$.value?.agentRuntimes.find(l=>l.kind===ce.value.kind)?.available?S("",!0):(d(),p("p",Eg," Install and authenticate "+u(nn(ce.value.kind))+", refresh Settings, then activate it here. ",1))])):S("",!0),n("button",{class:"save-runtime",type:"button",disabled:K.value||ce.value.kind!=="aperta"&&!$.value?.agentRuntimes.find(l=>l.kind===ce.value.kind)?.available,onClick:wr},u(K.value?"Saving…":`Use ${nn(ce.value.kind)}`),9,Ag)]),n("section",$g,[o[220]||(o[220]=n("header",null,[n("p",{class:"eyebrow"},"APERTA INTELLIGENCE SERVICES"),n("h3",{id:"intelligence-routing-title"},"Where API models are actually used")],-1)),n("article",{class:x({paused:$.value?.agentRuntime.kind!=="aperta"})},[o[216]||(o[216]=n("span",null,"1",-1)),n("div",null,[o[215]||(o[215]=n("strong",null,"Builder",-1)),n("p",null,u(N.value?.name??"Not configured")+" · "+u(N.value?.model??"Choose a model below"),1),n("small",null,u($.value?.agentRuntime.kind==="aperta"?"Drives Aperta Native’s bounded coding loop.":`Standby only—${nn($.value?.agentRuntime.kind??"aperta")} manages its own model.`),1)])],2),n("article",null,[o[219]||(o[219]=n("span",null,"2",-1)),n("div",null,[o[217]||(o[217]=n("strong",null,"Coach",-1)),n("p",null,u(R.value?.name??"Not configured")+" · "+u(R.value?.model??"Choose a model below"),1),o[218]||(o[218]=n("small",null,"Creates grounded ownership questions from repository evidence.",-1))])]),o[221]||(o[221]=n("article",{class:"deterministic"},[n("span",null,"✓"),n("div",null,[n("strong",null,"Verification"),n("p",null,"Aperta repository checks"),n("small",null,"Deterministic commands and runtime probes—not a model verdict.")])],-1))]),n("div",Rg,[n("section",Ig,[o[223]||(o[223]=n("header",null,[n("p",{class:"eyebrow"},"CONNECTED MODELS"),n("h3",null,"Route models to Aperta services."),n("p",null," Builder and Coach profiles are global. Verification remains deterministic and model-independent. ")],-1)),(d(!0),p(I,null,j($.value?.profiles??[],l=>(d(),p("article",{key:l.id,class:x({active:Object.values($.value?.activeProfileIds??{}).includes(l.id)})},[n("div",Tg,u(l.provider.slice(0,2).toUpperCase()),1),n("div",null,[n("strong",null,u(l.name),1),n("span",null,u(l.model),1),n("small",null,u(l.baseUrl)+" · "+u(l.credentialConfigured?l.credentialSource==="keychain"?"credential in Keychain":"credential available":"credential required"),1)]),n("em",null,u(l.capabilities?.nativeTools?"NATIVE TOOLS":l.capabilities?.status==="connected"?"JSON FALLBACK":"UNTESTED"),1),n("div",Pg,[l.capabilities?.latencyMs?(d(),p("span",Mg,u(l.capabilities.latencyMs)+"ms handshake",1)):S("",!0),n("span",null,u(l.capabilities?.modelDiscovery?"catalog connected":"manual model"),1)]),n("div",Ng,[n("button",{onClick:w=>xr(l.id),disabled:oe.value===l.id},u(oe.value===l.id?"Testing…":"Retest"),9,Og),(d(),p(I,null,j(L,w=>n("button",{key:w,class:x({assigned:$.value?.activeProfileIds[w]===l.id}),onClick:W=>Cr(l.id,w)},u($.value?.activeProfileIds[w]===l.id?`✓ ${w}`:`Use for ${w}`),11,Lg)),64)),n("button",{class:"remove-profile",onClick:w=>Ar(l.id)},u(ke.value===l.id?"Confirm remove":"Remove"),9,jg)])],2))),128)),$.value&&!$.value.profiles.length?(d(),p("div",Fg,[...o[222]||(o[222]=[n("strong",null,"No model profiles yet.",-1),n("span",null,"Add one without changing how Aperta captures or proves code.",-1)])])):S("",!0)]),n("form",{class:"profile-form",onSubmit:_t(br,["prevent"])},[o[231]||(o[231]=n("p",{class:"eyebrow"},"ADD APERTA MODEL",-1)),o[232]||(o[232]=n("h3",null,"Connect an intelligence service",-1)),o[233]||(o[233]=n("p",{class:"provider-guidance"}," Aperta tests the real endpoint before activation and records whether the selected model can produce native tool calls. ",-1)),n("div",Dg,[(d(!0),p(I,null,j($.value?.providers??[],l=>(d(),p("button",{key:l.id,type:"button",class:x({selected:z.value.provider===l.id}),"aria-pressed":z.value.provider===l.id,onClick:w=>Sr(l)},[n("span",null,u(l.label),1),n("small",null,u(l.category),1),n("p",null,u(l.description),1)],10,Ug))),128))]),Ge.value?(d(),p("div",Hg,[n("strong",null,u(Ge.value.label),1),n("span",null,u(Ge.value.description),1)])):S("",!0),n("label",null,[o[224]||(o[224]=B("Profile name",-1)),Xe(n("input",{"onUpdate:modelValue":o[67]||(o[67]=l=>z.value.name=l),placeholder:"Work OpenAI, Local Qwen…"},null,512),[[ct,z.value.name]])]),Z.value?.models.length?(d(),p("label",Vg,[o[226]||(o[226]=B("Model",-1)),Xe(n("select",{"onUpdate:modelValue":o[68]||(o[68]=l=>z.value.model=l),required:""},[o[225]||(o[225]=n("option",{value:"",disabled:""},"Choose a discovered model",-1)),(d(!0),p(I,null,j(Z.value.models,l=>(d(),p("option",{key:l.id,value:l.id},u(l.name)+u(l.nativeTools===!0?" · tools":"")+u(l.contextWindow?` · ${Math.round(l.contextWindow/1e3)}k`:""),9,Wg))),128))],512),[[gi,z.value.model]])])):(d(),p("label",Bg,[o[227]||(o[227]=B("Model ID",-1)),Xe(n("input",{"onUpdate:modelValue":o[69]||(o[69]=l=>z.value.model=l),placeholder:"Discover models or enter an exact model ID"},null,512),[[ct,z.value.model]])])),n("label",null,[o[228]||(o[228]=B("Endpoint",-1)),Xe(n("input",{"onUpdate:modelValue":o[70]||(o[70]=l=>z.value.baseUrl=l),placeholder:z.value.provider==="ollama"?"http://127.0.0.1:11434":z.value.provider==="openai-compatible"?"https://provider.example/v1":"Leave blank for provider default"},null,8,Kg),[[ct,z.value.baseUrl]])]),z.value.provider!=="ollama"?(d(),p("label",qg,[o[229]||(o[229]=B("API key",-1)),Xe(n("input",{"onUpdate:modelValue":o[71]||(o[71]=l=>z.value.apiKey=l),type:"password",autocomplete:"new-password",placeholder:"Stored in macOS Keychain"},null,512),[[ct,z.value.apiKey]])])):S("",!0),U.value?(d(),p("div",Gg,u(U.value),1)):S("",!0),n("button",{type:"button",class:"inspect-provider",disabled:ue.value,onClick:Er},u(ue.value?"Testing provider…":z.value.model?"Verify model and native tools":"Connect and discover models"),9,zg),Z.value?(d(),p("div",{key:5,class:x(["capability-result",Z.value.capabilities.status])},[n("strong",null,u(Z.value.capabilities.nativeTools?"Native tool calling verified":"Provider connected"),1),n("span",null,u(Z.value.capabilities.detail),1),n("small",null,u(Z.value.models.length)+" models discovered · "+u(Z.value.capabilities.latencyMs)+"ms",1)],2)):S("",!0),n("div",Jg,[o[230]||(o[230]=n("strong",null,"Credential boundary",-1)),n("p",null," The browser sends the key only to this local Aperta server. It is written to "+u($.value?.secureStorage??"secure storage")+" and is never returned to the browser. ",1)]),o[234]||(o[234]=n("div",{class:"privacy-boundary"},[n("strong",null,"Project-memory boundary"),n("p",null," Raw prompts, transcripts, explanations, and execution logs stay in private per-user storage. The repository contains only a non-sensitive Aperta project identity. ")],-1)),z.value.model&&Z.value?.testedModel!==z.value.model?(d(),p("p",Yg," Verify this exact model before activation. ")):S("",!0),n("button",{type:"submit",disabled:K.value||!z.value.model||Z.value?.testedModel!==z.value.model},u(K.value?"Saving securely…":"Save and activate"),9,Xg)],32)])],64)):S("",!0)],2)],2)):(d(),p("div",Uf,[...o[82]||(o[82]=[n("div",{class:"spinner"},null,-1),B(" Reading the comprehension ledger… ",-1)])])),te.value?(d(),p("div",Zg,[n("section",Qg,[n("header",em,[n("div",null,[o[242]||(o[242]=n("p",{class:"eyebrow"},"OWNERSHIP SESSION",-1)),n("h2",null,u(H.value?.story.title??"Turn generated code into code you own."),1),n("div",tm,[o[238]||(o[238]=n("span",{class:"complete"},[n("b",null,"1"),B("Orient")],-1)),o[239]||(o[239]=n("i",null,null,-1)),n("span",{class:x({complete:Qt.value>=1,active:Qt.value<1})},[...o[235]||(o[235]=[n("b",null,"2",-1),B("Trace",-1)])],2),o[240]||(o[240]=n("i",null,null,-1)),n("span",{class:x({complete:Qt.value>=3,active:Qt.value>=1&&Qt.value<3})},[...o[236]||(o[236]=[n("b",null,"3",-1),B("Challenge",-1)])],2),o[241]||(o[241]=n("i",null,null,-1)),n("span",{class:x({complete:En.value,active:Qt.value>=3&&!En.value})},[...o[237]||(o[237]=[n("b",null,"4",-1),B("Articulate",-1)])],2)])]),n("div",nm,[H.value?(d(),p("span",sm,[n("b",null,u(Ha.value)+"%",1),o[243]||(o[243]=B(" evidence complete",-1))])):S("",!0),n("button",{class:"close-review icon-close",onClick:xl,"aria-label":"Close ownership session"},[se(le(Ri),{class:"nav-icon","aria-hidden":"true"})])])]),Te.value?(d(),p("div",lm,u(Te.value),1)):S("",!0),!H.value&&!Te.value?(d(),p("div",om,[...o[244]||(o[244]=[n("div",{class:"spinner"},null,-1),B(" Building your briefing… ",-1)])])):Ke.value?(d(),p("div",im,[o[248]||(o[248]=n("div",{class:"completion-orb"},"✓",-1)),o[249]||(o[249]=n("p",{class:"eyebrow"},"SESSION RECORDED",-1)),n("h2",null,u(Ke.value.before===null?"A baseline now exists.":"Understanding moved."),1),n("div",am,[n("span",null,[o[245]||(o[245]=n("small",null,"BEFORE",-1)),n("strong",null,u(Ke.value.before??"—"),1)]),o[247]||(o[247]=n("i",null,"→",-1)),n("span",null,[o[246]||(o[246]=n("small",null,"AFTER",-1)),n("strong",null,u(Ke.value.after),1)])]),n("p",null," You spent "+u(Math.max(1,Math.round(Ke.value.durationMs/6e4)))+" minute"+u(Math.round(Ke.value.durationMs/6e4)===1?"":"s")+" converting agent output into accountable knowledge. ",1),n("button",{class:"finish-review",onClick:xl}," Return to review queue ")])):H.value?(d(),p("div",rm,[n("aside",um,[n("div",cm,[n("span",null,[n("strong",null,u(H.value.diff.files.length),1),o[250]||(o[250]=B(" files",-1))]),n("span",null,[n("strong",null,u(H.value.changedLines),1),o[251]||(o[251]=B(" lines",-1))]),n("small",null,u(H.value.diff.model??H.value.diff.authorship),1)]),n("div",dm,[n("div",null,[o[252]||(o[252]=n("small",null,"CHANGE STORY",-1)),n("span",{class:x(["risk-chip",H.value.story.risk])},u(H.value.story.risk)+" risk",3)]),n("h3",null,u(H.value.story.title),1),n("p",null,u(H.value.story.provenance)+" · about "+u(H.value.story.expectedMinutes)+" minutes to verify ",1),n("ul",null,[(d(!0),p(I,null,j(H.value.story.behaviors,l=>(d(),p("li",{key:l},u(l),1))),128))])]),H.value.intent?(d(),p("div",fm,[o[253]||(o[253]=n("small",null,"ORIGINAL INTENT",-1)),n("p",null,u(H.value.intent),1)])):S("",!0),n("div",pm,[n("div",null,[o[254]||(o[254]=n("small",null,"SURFACES",-1)),n("ul",vm,[(d(!0),p(I,null,j(H.value.story.areas,l=>(d(),p("li",{key:l},[n("code",{"aria-label":l,title:l},u(Rs(l)),9,hm)]))),128))])]),H.value.story.symbols.length?(d(),p("div",gm,[o[255]||(o[255]=n("small",null,"NEW OR CHANGED SYMBOLS",-1)),n("ul",mm,[(d(!0),p(I,null,j(H.value.story.symbols,l=>(d(),p("li",{key:l},[n("code",{"aria-label":l,title:l},u(Rs(l)),9,ym)]))),128))])])):S("",!0),n("div",null,[o[256]||(o[256]=n("small",null,"TEST SIGNAL",-1)),n("p",null,u(H.value.story.testStatus),1)])]),o[258]||(o[258]=n("h3",null,"FILES CHANGED",-1)),(d(!0),p(I,null,j(H.value.diff.files,l=>(d(),p("button",{key:l.path,title:l.path,"aria-label":`Review ${l.path}, ${l.added} additions and ${l.removed} deletions`,class:x(["changed-file",{active:ut.value?.path===l.path}]),onClick:w=>ur(l.path)},[o[257]||(o[257]=n("span",{class:"change-file-icon","aria-hidden":"true"},"‹›",-1)),n("span",null,[n("strong",null,u(fn(l.path)),1),n("small",null,u(wl(l.path)),1)]),n("em",wm,[n("b",null,"+"+u(l.added),1),n("i",null,"−"+u(l.removed),1)])],10,bm))),128)),o[259]||(o[259]=n("h3",null,"RISK SIGNALS",-1)),n("ul",km,[(d(!0),p(I,null,j(H.value.signals,l=>(d(),p("li",{key:l},u(l),1))),128)),H.value.signals.length?S("",!0):(d(),p("li",_m," No structural warning signals. Verify behavior, not just shape. "))])]),n("section",Cm,[n("div",xm,[n("div",Sm,[n("button",{onClick:o[72]||(o[72]=l=>jo(-1)),"aria-label":"Previous file"}," ‹ "),n("div",null,[n("strong",null,u(ut.value?.path??"Diff evidence"),1),hl.value?(d(),p("small",Em,u(hl.value.added)+" additions · "+u(hl.value.removed)+" deletions · file "+u(_o.value+1)+" of "+u(Zt.value.length),1)):S("",!0)]),n("button",{onClick:o[73]||(o[73]=l=>jo(1)),"aria-label":"Next file"}," › ")]),n("div",Am,[n("button",{class:x({active:vt.value==="unified"}),onClick:o[74]||(o[74]=l=>vt.value="unified")}," Unified",2),n("button",{class:x({active:vt.value==="split"}),onClick:o[75]||(o[75]=l=>vt.value="split")}," Split",2),n("button",{class:x({active:ht.value}),onClick:o[76]||(o[76]=l=>ht.value=!ht.value)}," Wrap ",2)])]),ut.value&&vt.value==="unified"?(d(),p("div",{key:0,class:x(["semantic-diff",{wrap:ht.value}]),"aria-label":"Unified code diff"},[(d(!0),p(I,null,j(ut.value.lines,(l,w)=>(d(),p("div",{key:w,class:x(["diff-line",l.kind])},[n("span",$m,u(l.oldLine??""),1),n("span",Rm,u(l.newLine??""),1),n("span",Im,u(l.kind==="add"?"+":l.kind==="delete"?"−":l.kind==="context"?" ":""),1),n("code",null,[(d(!0),p(I,null,j(le(mn)(l.text,ut.value.path),(W,ae)=>(d(),p("span",{key:ae,class:x(`syntax-${W.kind}`)},u(W.text),3))),128))])],2))),128))],2)):ut.value?(d(),p("div",{key:1,class:x(["split-diff",{wrap:ht.value}]),"aria-label":"Side-by-side code diff"},[(d(!0),p(I,null,j(ut.value.lines,(l,w)=>(d(),p(I,{key:w},[l.kind==="hunk"||l.kind==="meta"?(d(),p("div",{key:0,class:x(["split-special",l.kind])},u(l.text),3)):(d(),p("div",Tm,[n("div",{class:x(["split-cell",l.kind==="delete"?"delete":l.kind==="context"?"context":"empty"])},[n("span",Pm,u(l.kind!=="add"?l.oldLine:""),1),n("span",Mm,u(l.kind==="delete"?"−":" "),1),n("code",null,[l.kind!=="add"?(d(!0),p(I,{key:0},j(le(mn)(l.text,ut.value.path),(W,ae)=>(d(),p("span",{key:ae,class:x(`syntax-${W.kind}`)},u(W.text),3))),128)):S("",!0)])],2),n("div",{class:x(["split-cell",l.kind==="add"?"add":l.kind==="context"?"context":"empty"])},[n("span",Nm,u(l.kind!=="delete"?l.newLine:""),1),n("span",Om,u(l.kind==="add"?"+":" "),1),n("code",null,[l.kind!=="delete"?(d(!0),p(I,{key:0},j(le(mn)(l.text,ut.value.path),(W,ae)=>(d(),p("span",{key:ae,class:x(`syntax-${W.kind}`)},u(W.text),3))),128)):S("",!0)])],2)]))],64))),128))],2)):(d(),p("div",Lm,[...o[260]||(o[260]=[n("strong",null,"Patch evidence unavailable",-1),n("span",null,"This capture predates evidence storage. Use Git history and the file list.",-1)])]))]),n("aside",jm,[n("div",Fm,[o[261]||(o[261]=n("span",null,"Starting confidence",-1)),n("strong",null,u(te.value.score??"Unrated"),1)]),H.value.priorNotes.length?(d(),p("div",Dm,[n("div",null,[o[262]||(o[262]=n("h3",null,"Prior ownership notes",-1)),n("span",null,u(H.value.priorNotes.length)+" saved",1)]),(d(!0),p(I,null,j(H.value.priorNotes,l=>(d(),p("article",{key:l.id},[n("p",null,u(l.text),1),n("small",null,u(new Date(l.ts).toLocaleString())+" · "+u(Math.max(1,Math.round(l.durationMs/6e4)))+" min",1)]))),128))])):S("",!0),H.value.priorEvidence.length?(d(),p("div",Um,[o[263]||(o[263]=n("strong",null,"Previous evidence exists",-1)),n("span",null,u(H.value.priorEvidence[0].completedCount)+"/"+u(H.value.priorEvidence[0].requiredCount)+" required answers completed "+u(en(H.value.priorEvidence[0].ts)),1)])):S("",!0),n("section",Hm,[n("header",null,[n("div",null,[o[265]||(o[265]=n("span",{class:"coach-mark"},"a✦",-1)),n("div",null,[o[264]||(o[264]=n("strong",null,"Aperta Coach",-1)),m.value?.enabled?(d(),p("small",Vm,u(k.value?.model??m.value.model)+" · "+u(k.value?.provider??m.value.provider),1)):(d(),p("small",Wm,"Optional, provider-neutral coaching"))])]),o[266]||(o[266]=n("em",null,"AI-GENERATED",-1))]),k.value?(d(),p(I,{key:0},[n("h3",null,u(k.value.focus.title),1),n("p",null,u(k.value.orientation),1),n("p",Bm,[o[267]||(o[267]=n("b",null,"Focus:",-1)),B(" "+u(k.value.focus.why),1)]),k.value.uncertainties.length?(d(),p("details",Km,[n("summary",null,u(k.value.uncertainties.length)+" explicit unknown"+u(k.value.uncertainties.length===1?"":"s"),1),n("ul",null,[(d(!0),p(I,null,j(k.value.uncertainties,l=>(d(),p("li",{key:l},u(l),1))),128))])])):S("",!0)],64)):(d(),p(I,{key:1},[o[268]||(o[268]=n("p",null," Generate questions adapted to this exact diff, impact graph, proof state, and your prior evidence. Coach can ask; it cannot certify ownership. ",-1)),n("button",{disabled:!m.value?.enabled||T.value,onClick:fr},u(T.value?`${A.value?.state??"Starting"} debrief…`:"Personalize this debrief"),9,qm),T.value?(d(),p("button",{key:0,class:"cancel-job",onClick:o[77]||(o[77]=l=>Ps(A.value))}," Cancel")):S("",!0),m.value&&!m.value.enabled?(d(),p("small",Gm,u(m.value.reason),1)):S("",!0)],64)),E.value?(d(),p("p",zm,u(E.value),1)):S("",!0),o[269]||(o[269]=n("footer",null," Grounded in local evidence · never changes Trust Kernel verdicts · never grades your prose ",-1))]),o[271]||(o[271]=n("p",{class:"step-label"},[n("b",null,"3"),B(" Challenge")],-1)),o[272]||(o[272]=n("h3",null,"Demonstrate ownership",-1)),n("div",Jm,[(d(!0),p(I,null,j(gl.value,l=>(d(),p("article",{key:l.id,class:x({answered:(me.value[l.id]?.trim().length??0)>=20,optional:!l.requiredForOwned})},[n("div",null,[n("span",null,u(l.kind),1),n("em",null,u(l.requiredForOwned?"required":"optional"),1),l.path?(d(),p("button",{key:0,onClick:w=>cr(l)}," Show code → ",8,Ym)):S("",!0)]),n("label",{for:`answer-${l.id}`},u(l.text),9,Xm),"rationale"in l?(d(),p("small",Zm,u(l.rationale),1)):S("",!0),Xe(n("textarea",{id:`answer-${l.id}`,"onUpdate:modelValue":w=>me.value[l.id]=w,rows:"2",placeholder:"Answer from your understanding, not the summary…"},null,8,Qm),[[ct,me.value[l.id]]])],2))),128))]),o[273]||(o[273]=n("p",{class:"step-label articulate"},[n("b",null,"4"),B(" Articulate")],-1)),o[274]||(o[274]=n("label",{for:"explanation"},"Explain the change in your own words",-1)),Xe(n("textarea",{id:"explanation","onUpdate:modelValue":o[78]||(o[78]=l=>Ae.value=l),rows:"5",placeholder:"What changed, why it works, and where it could fail…"},null,512),[[ct,Ae.value]]),n("fieldset",ey,[o[270]||(o[270]=n("legend",null,"Where are you now?",-1)),(d(),p(I,null,j([1,2,3],l=>n("button",{key:l,disabled:l===3&&!En.value,title:l===3&&!En.value?"Complete the required ownership evidence first":"",class:x({selected:Ie.value===l}),onClick:w=>Ie.value=l},[n("strong",null,u(l),1),n("span",null,u(l===1?"Opaque":l===2?"Followable":En.value?"Owned":"Prove first"),1)],10,ty)),64))]),n("button",{class:"finish-review",disabled:Tt.value,onClick:pr},u(Tt.value?"Saving…":"Record ownership signal"),9,ny),o[275]||(o[275]=n("small",{class:"privacy-note"},"Aperta records evidence of the work. It never grades your prose.",-1))])])):S("",!0)])])):S("",!0),n("footer",sy,[o[276]||(o[276]=n("span",null,[n("i",{class:"status-dot"}),B("Private local memory · outside Git · Coach shares evidence only on request")],-1)),o[277]||(o[277]=n("span",null,"1 opaque · 2 followable · 3 owned",-1)),n("span",null,"Updated "+u(t.value?new Date(t.value.generatedAt).toLocaleTimeString([],{hour:"numeric",minute:"2-digit"}):"—"),1)])])],2))}});td(ly).mount("#app");
|