repr-cli 0.2.16__py3-none-any.whl → 0.2.18__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. repr/__init__.py +1 -1
  2. repr/api.py +363 -62
  3. repr/auth.py +47 -38
  4. repr/change_synthesis.py +478 -0
  5. repr/cli.py +4306 -364
  6. repr/config.py +119 -11
  7. repr/configure.py +889 -0
  8. repr/cron.py +419 -0
  9. repr/dashboard/__init__.py +9 -0
  10. repr/dashboard/build.py +126 -0
  11. repr/dashboard/dist/assets/index-B-aCjaCw.js +384 -0
  12. repr/dashboard/dist/assets/index-BYFVbEev.css +1 -0
  13. repr/dashboard/dist/assets/index-BrrhyJFO.css +1 -0
  14. repr/dashboard/dist/assets/index-C7Gzxc4f.js +384 -0
  15. repr/dashboard/dist/assets/index-CQdMXo6g.js +391 -0
  16. repr/dashboard/dist/assets/index-CcEg74ts.js +270 -0
  17. repr/dashboard/dist/assets/index-Cerc-iA_.js +377 -0
  18. repr/dashboard/dist/assets/index-CjVcBW2L.css +1 -0
  19. repr/dashboard/dist/assets/index-Cs8ofFGd.js +384 -0
  20. repr/dashboard/dist/assets/index-Dfl3mR5E.js +377 -0
  21. repr/dashboard/dist/assets/index-DwN0SeMc.css +1 -0
  22. repr/dashboard/dist/assets/index-YFch_e0S.js +384 -0
  23. repr/dashboard/dist/favicon.svg +4 -0
  24. repr/dashboard/dist/index.html +14 -0
  25. repr/dashboard/manager.py +234 -0
  26. repr/dashboard/server.py +1489 -0
  27. repr/db.py +980 -0
  28. repr/hooks.py +3 -2
  29. repr/loaders/__init__.py +22 -0
  30. repr/loaders/base.py +156 -0
  31. repr/loaders/claude_code.py +287 -0
  32. repr/loaders/clawdbot.py +313 -0
  33. repr/loaders/gemini_antigravity.py +381 -0
  34. repr/mcp_server.py +1196 -0
  35. repr/models.py +503 -0
  36. repr/openai_analysis.py +25 -0
  37. repr/session_extractor.py +481 -0
  38. repr/storage.py +328 -0
  39. repr/story_synthesis.py +1296 -0
  40. repr/templates.py +68 -4
  41. repr/timeline.py +710 -0
  42. repr/tools.py +17 -8
  43. {repr_cli-0.2.16.dist-info → repr_cli-0.2.18.dist-info}/METADATA +48 -10
  44. repr_cli-0.2.18.dist-info/RECORD +58 -0
  45. {repr_cli-0.2.16.dist-info → repr_cli-0.2.18.dist-info}/WHEEL +1 -1
  46. {repr_cli-0.2.16.dist-info → repr_cli-0.2.18.dist-info}/entry_points.txt +1 -0
  47. repr_cli-0.2.16.dist-info/RECORD +0 -26
  48. {repr_cli-0.2.16.dist-info → repr_cli-0.2.18.dist-info}/licenses/LICENSE +0 -0
  49. {repr_cli-0.2.16.dist-info → repr_cli-0.2.18.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,377 @@
1
+ (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))n(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&n(l)}).observe(document,{childList:!0,subtree:!0});function s(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(o){if(o.ep)return;o.ep=!0;const i=s(o);fetch(o.href,i)}})();/**
2
+ * @vue/shared v3.5.27
3
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
+ * @license MIT
5
+ **/function Ks(e){const t=Object.create(null);for(const s of e.split(","))t[s]=1;return s=>s in t}const G={},rt=[],$e=()=>{},oo=()=>!1,ss=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Ws=e=>e.startsWith("onUpdate:"),oe=Object.assign,Js=(e,t)=>{const s=e.indexOf(t);s>-1&&e.splice(s,1)},ki=Object.prototype.hasOwnProperty,U=(e,t)=>ki.call(e,t),L=Array.isArray,wt=e=>ns(e)==="[object Map]",Ci=e=>ns(e)==="[object Set]",j=e=>typeof e=="function",Z=e=>typeof e=="string",ft=e=>typeof e=="symbol",X=e=>e!==null&&typeof e=="object",io=e=>(X(e)||j(e))&&j(e.then)&&j(e.catch),Ei=Object.prototype.toString,ns=e=>Ei.call(e),Ti=e=>ns(e).slice(8,-1),Ii=e=>ns(e)==="[object Object]",zs=e=>Z(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,xt=Ks(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),os=e=>{const t=Object.create(null);return s=>t[s]||(t[s]=e(s))},$i=/-\w/g,We=os(e=>e.replace($i,t=>t.slice(1).toUpperCase())),Bi=/\B([A-Z])/g,et=os(e=>e.replace(Bi,"-$1").toLowerCase()),ro=os(e=>e.charAt(0).toUpperCase()+e.slice(1)),bs=os(e=>e?`on${ro(e)}`:""),Ke=(e,t)=>!Object.is(e,t),ws=(e,...t)=>{for(let s=0;s<e.length;s++)e[s](...t)},lo=(e,t,s,n=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:s})},Ai=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let Sn;const is=()=>Sn||(Sn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Gs(e){if(L(e)){const t={};for(let s=0;s<e.length;s++){const n=e[s],o=Z(n)?Pi(n):Gs(n);if(o)for(const i in o)t[i]=o[i]}return t}else if(Z(e)||X(e))return e}const Fi=/;(?![^(]*\))/g,Mi=/:([^]+)/,Ri=/\/\*[^]*?\*\//g;function Pi(e){const t={};return e.replace(Ri,"").split(Fi).forEach(s=>{if(s){const n=s.split(Mi);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function qs(e){let t="";if(Z(e))t=e;else if(L(e))for(let s=0;s<e.length;s++){const n=qs(e[s]);n&&(t+=n+" ")}else if(X(e))for(const s in e)e[s]&&(t+=s+" ");return t.trim()}const Oi="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Di=Ks(Oi);function ao(e){return!!e||e===""}/**
6
+ * @vue/reactivity v3.5.27
7
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
8
+ * @license MIT
9
+ **/let fe;class co{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=fe,!t&&fe&&(this.index=(fe.scopes||(fe.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,s;if(this.scopes)for(t=0,s=this.scopes.length;t<s;t++)this.scopes[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)for(t=0,s=this.scopes.length;t<s;t++)this.scopes[t].resume();for(t=0,s=this.effects.length;t<s;t++)this.effects[t].resume()}}run(t){if(this._active){const s=fe;try{return fe=this,t()}finally{fe=s}}}on(){++this._on===1&&(this.prevScope=fe,fe=this)}off(){this._on>0&&--this._on===0&&(fe=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let s,n;for(s=0,n=this.effects.length;s<n;s++)this.effects[s].stop();for(this.effects.length=0,s=0,n=this.cleanups.length;s<n;s++)this.cleanups[s]();if(this.cleanups.length=0,this.scopes){for(s=0,n=this.scopes.length;s<n;s++)this.scopes[s].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const o=this.parent.scopes.pop();o&&o!==this&&(this.parent.scopes[this.index]=o,o.index=this.index)}this.parent=void 0}}}function ji(e){return new co(e)}function Li(){return fe}let z;const xs=new WeakSet;class uo{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,fe&&fe.active&&fe.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,xs.has(this)&&(xs.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||po(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,kn(this),ho(this);const t=z,s=ye;z=this,ye=!0;try{return this.fn()}finally{go(this),z=t,ye=s,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Xs(t);this.deps=this.depsTail=void 0,kn(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?xs.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){As(this)&&this.run()}get dirty(){return As(this)}}let fo=0,_t,St;function po(e,t=!1){if(e.flags|=8,t){e.next=St,St=e;return}e.next=_t,_t=e}function Ys(){fo++}function Qs(){if(--fo>0)return;if(St){let t=St;for(St=void 0;t;){const s=t.next;t.next=void 0,t.flags&=-9,t=s}}let e;for(;_t;){let t=_t;for(_t=void 0;t;){const s=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(n){e||(e=n)}t=s}}if(e)throw e}function ho(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function go(e){let t,s=e.depsTail,n=s;for(;n;){const o=n.prevDep;n.version===-1?(n===s&&(s=o),Xs(n),Hi(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=o}e.deps=t,e.depsTail=s}function As(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(mo(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function mo(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Bt)||(e.globalVersion=Bt,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!As(e))))return;e.flags|=2;const t=e.dep,s=z,n=ye;z=e,ye=!0;try{ho(e);const o=e.fn(e._value);(t.version===0||Ke(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{z=s,ye=n,go(e),e.flags&=-3}}function Xs(e,t=!1){const{dep:s,prevSub:n,nextSub:o}=e;if(n&&(n.nextSub=o,e.prevSub=void 0),o&&(o.prevSub=n,e.nextSub=void 0),s.subs===e&&(s.subs=n,!n&&s.computed)){s.computed.flags&=-5;for(let i=s.computed.deps;i;i=i.nextDep)Xs(i,!0)}!t&&!--s.sc&&s.map&&s.map.delete(s.key)}function Hi(e){const{prevDep:t,nextDep:s}=e;t&&(t.nextDep=s,e.prevDep=void 0),s&&(s.prevDep=t,e.nextDep=void 0)}let ye=!0;const vo=[];function Pe(){vo.push(ye),ye=!1}function Oe(){const e=vo.pop();ye=e===void 0?!0:e}function kn(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const s=z;z=void 0;try{t()}finally{z=s}}}let Bt=0;class Ni{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 Zs{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(!z||!ye||z===this.computed)return;let s=this.activeLink;if(s===void 0||s.sub!==z)s=this.activeLink=new Ni(z,this),z.deps?(s.prevDep=z.depsTail,z.depsTail.nextDep=s,z.depsTail=s):z.deps=z.depsTail=s,yo(s);else if(s.version===-1&&(s.version=this.version,s.nextDep)){const n=s.nextDep;n.prevDep=s.prevDep,s.prevDep&&(s.prevDep.nextDep=n),s.prevDep=z.depsTail,s.nextDep=void 0,z.depsTail.nextDep=s,z.depsTail=s,z.deps===s&&(z.deps=n)}return s}trigger(t){this.version++,Bt++,this.notify(t)}notify(t){Ys();try{for(let s=this.subs;s;s=s.prevSub)s.sub.notify()&&s.sub.dep.notify()}finally{Qs()}}}function yo(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let n=t.deps;n;n=n.nextDep)yo(n)}const s=e.dep.subs;s!==e&&(e.prevSub=s,s&&(s.nextSub=e)),e.dep.subs=e}}const Fs=new WeakMap,Xe=Symbol(""),Ms=Symbol(""),At=Symbol("");function se(e,t,s){if(ye&&z){let n=Fs.get(e);n||Fs.set(e,n=new Map);let o=n.get(s);o||(n.set(s,o=new Zs),o.map=n,o.key=s),o.track()}}function Re(e,t,s,n,o,i){const l=Fs.get(e);if(!l){Bt++;return}const a=d=>{d&&d.trigger()};if(Ys(),t==="clear")l.forEach(a);else{const d=L(e),p=d&&zs(s);if(d&&s==="length"){const f=Number(n);l.forEach((w,T)=>{(T==="length"||T===At||!ft(T)&&T>=f)&&a(w)})}else switch((s!==void 0||l.has(void 0))&&a(l.get(s)),p&&a(l.get(At)),t){case"add":d?p&&a(l.get("length")):(a(l.get(Xe)),wt(e)&&a(l.get(Ms)));break;case"delete":d||(a(l.get(Xe)),wt(e)&&a(l.get(Ms)));break;case"set":wt(e)&&a(l.get(Xe));break}}Qs()}function nt(e){const t=V(e);return t===e?t:(se(t,"iterate",At),be(e)?t:t.map(De))}function en(e){return se(e=V(e),"iterate",At),e}function He(e,t){return Je(e)?Ft(lt(e)?De(t):t):De(t)}const Vi={__proto__:null,[Symbol.iterator](){return _s(this,Symbol.iterator,e=>He(this,e))},concat(...e){return nt(this).concat(...e.map(t=>L(t)?nt(t):t))},entries(){return _s(this,"entries",e=>(e[1]=He(this,e[1]),e))},every(e,t){return Fe(this,"every",e,t,void 0,arguments)},filter(e,t){return Fe(this,"filter",e,t,s=>s.map(n=>He(this,n)),arguments)},find(e,t){return Fe(this,"find",e,t,s=>He(this,s),arguments)},findIndex(e,t){return Fe(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Fe(this,"findLast",e,t,s=>He(this,s),arguments)},findLastIndex(e,t){return Fe(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Fe(this,"forEach",e,t,void 0,arguments)},includes(...e){return Ss(this,"includes",e)},indexOf(...e){return Ss(this,"indexOf",e)},join(e){return nt(this).join(e)},lastIndexOf(...e){return Ss(this,"lastIndexOf",e)},map(e,t){return Fe(this,"map",e,t,void 0,arguments)},pop(){return vt(this,"pop")},push(...e){return vt(this,"push",e)},reduce(e,...t){return Cn(this,"reduce",e,t)},reduceRight(e,...t){return Cn(this,"reduceRight",e,t)},shift(){return vt(this,"shift")},some(e,t){return Fe(this,"some",e,t,void 0,arguments)},splice(...e){return vt(this,"splice",e)},toReversed(){return nt(this).toReversed()},toSorted(e){return nt(this).toSorted(e)},toSpliced(...e){return nt(this).toSpliced(...e)},unshift(...e){return vt(this,"unshift",e)},values(){return _s(this,"values",e=>He(this,e))}};function _s(e,t,s){const n=en(e),o=n[t]();return n!==e&&!be(e)&&(o._next=o.next,o.next=()=>{const i=o._next();return i.done||(i.value=s(i.value)),i}),o}const Ui=Array.prototype;function Fe(e,t,s,n,o,i){const l=en(e),a=l!==e&&!be(e),d=l[t];if(d!==Ui[t]){const w=d.apply(e,i);return a?De(w):w}let p=s;l!==e&&(a?p=function(w,T){return s.call(this,He(e,w),T,e)}:s.length>2&&(p=function(w,T){return s.call(this,w,T,e)}));const f=d.call(l,p,n);return a&&o?o(f):f}function Cn(e,t,s,n){const o=en(e);let i=s;return o!==e&&(be(e)?s.length>3&&(i=function(l,a,d){return s.call(this,l,a,d,e)}):i=function(l,a,d){return s.call(this,l,He(e,a),d,e)}),o[t](i,...n)}function Ss(e,t,s){const n=V(e);se(n,"iterate",At);const o=n[t](...s);return(o===-1||o===!1)&&on(s[0])?(s[0]=V(s[0]),n[t](...s)):o}function vt(e,t,s=[]){Pe(),Ys();const n=V(e)[t].apply(e,s);return Qs(),Oe(),n}const Ki=Ks("__proto__,__v_isRef,__isVue"),bo=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(ft));function Wi(e){ft(e)||(e=String(e));const t=V(this);return se(t,"has",e),t.hasOwnProperty(e)}class wo{constructor(t=!1,s=!1){this._isReadonly=t,this._isShallow=s}get(t,s,n){if(s==="__v_skip")return t.__v_skip;const o=this._isReadonly,i=this._isShallow;if(s==="__v_isReactive")return!o;if(s==="__v_isReadonly")return o;if(s==="__v_isShallow")return i;if(s==="__v_raw")return n===(o?i?tr:ko:i?So:_o).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(n)?t:void 0;const l=L(t);if(!o){let d;if(l&&(d=Vi[s]))return d;if(s==="hasOwnProperty")return Wi}const a=Reflect.get(t,s,ne(t)?t:n);if((ft(s)?bo.has(s):Ki(s))||(o||se(t,"get",s),i))return a;if(ne(a)){const d=l&&zs(s)?a:a.value;return o&&X(d)?Ps(d):d}return X(a)?o?Ps(a):sn(a):a}}class xo extends wo{constructor(t=!1){super(!1,t)}set(t,s,n,o){let i=t[s];const l=L(t)&&zs(s);if(!this._isShallow){const p=Je(i);if(!be(n)&&!Je(n)&&(i=V(i),n=V(n)),!l&&ne(i)&&!ne(n))return p||(i.value=n),!0}const a=l?Number(s)<t.length:U(t,s),d=Reflect.set(t,s,n,ne(t)?t:o);return t===V(o)&&(a?Ke(n,i)&&Re(t,"set",s,n):Re(t,"add",s,n)),d}deleteProperty(t,s){const n=U(t,s);t[s];const o=Reflect.deleteProperty(t,s);return o&&n&&Re(t,"delete",s,void 0),o}has(t,s){const n=Reflect.has(t,s);return(!ft(s)||!bo.has(s))&&se(t,"has",s),n}ownKeys(t){return se(t,"iterate",L(t)?"length":Xe),Reflect.ownKeys(t)}}class Ji extends wo{constructor(t=!1){super(!0,t)}set(t,s){return!0}deleteProperty(t,s){return!0}}const zi=new xo,Gi=new Ji,qi=new xo(!0);const Rs=e=>e,Nt=e=>Reflect.getPrototypeOf(e);function Yi(e,t,s){return function(...n){const o=this.__v_raw,i=V(o),l=wt(i),a=e==="entries"||e===Symbol.iterator&&l,d=e==="keys"&&l,p=o[e](...n),f=s?Rs:t?Ft:De;return!t&&se(i,"iterate",d?Ms:Xe),oe(Object.create(p),{next(){const{value:w,done:T}=p.next();return T?{value:w,done:T}:{value:a?[f(w[0]),f(w[1])]:f(w),done:T}}})}}function Vt(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Qi(e,t){const s={get(o){const i=this.__v_raw,l=V(i),a=V(o);e||(Ke(o,a)&&se(l,"get",o),se(l,"get",a));const{has:d}=Nt(l),p=t?Rs:e?Ft:De;if(d.call(l,o))return p(i.get(o));if(d.call(l,a))return p(i.get(a));i!==l&&i.get(o)},get size(){const o=this.__v_raw;return!e&&se(V(o),"iterate",Xe),o.size},has(o){const i=this.__v_raw,l=V(i),a=V(o);return e||(Ke(o,a)&&se(l,"has",o),se(l,"has",a)),o===a?i.has(o):i.has(o)||i.has(a)},forEach(o,i){const l=this,a=l.__v_raw,d=V(a),p=t?Rs:e?Ft:De;return!e&&se(d,"iterate",Xe),a.forEach((f,w)=>o.call(i,p(f),p(w),l))}};return oe(s,e?{add:Vt("add"),set:Vt("set"),delete:Vt("delete"),clear:Vt("clear")}:{add(o){!t&&!be(o)&&!Je(o)&&(o=V(o));const i=V(this);return Nt(i).has.call(i,o)||(i.add(o),Re(i,"add",o,o)),this},set(o,i){!t&&!be(i)&&!Je(i)&&(i=V(i));const l=V(this),{has:a,get:d}=Nt(l);let p=a.call(l,o);p||(o=V(o),p=a.call(l,o));const f=d.call(l,o);return l.set(o,i),p?Ke(i,f)&&Re(l,"set",o,i):Re(l,"add",o,i),this},delete(o){const i=V(this),{has:l,get:a}=Nt(i);let d=l.call(i,o);d||(o=V(o),d=l.call(i,o)),a&&a.call(i,o);const p=i.delete(o);return d&&Re(i,"delete",o,void 0),p},clear(){const o=V(this),i=o.size!==0,l=o.clear();return i&&Re(o,"clear",void 0,void 0),l}}),["keys","values","entries",Symbol.iterator].forEach(o=>{s[o]=Yi(o,e,t)}),s}function tn(e,t){const s=Qi(e,t);return(n,o,i)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?n:Reflect.get(U(s,o)&&o in n?s:n,o,i)}const Xi={get:tn(!1,!1)},Zi={get:tn(!1,!0)},er={get:tn(!0,!1)};const _o=new WeakMap,So=new WeakMap,ko=new WeakMap,tr=new WeakMap;function sr(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function nr(e){return e.__v_skip||!Object.isExtensible(e)?0:sr(Ti(e))}function sn(e){return Je(e)?e:nn(e,!1,zi,Xi,_o)}function or(e){return nn(e,!1,qi,Zi,So)}function Ps(e){return nn(e,!0,Gi,er,ko)}function nn(e,t,s,n,o){if(!X(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=nr(e);if(i===0)return e;const l=o.get(e);if(l)return l;const a=new Proxy(e,i===2?n:s);return o.set(e,a),a}function lt(e){return Je(e)?lt(e.__v_raw):!!(e&&e.__v_isReactive)}function Je(e){return!!(e&&e.__v_isReadonly)}function be(e){return!!(e&&e.__v_isShallow)}function on(e){return e?!!e.__v_raw:!1}function V(e){const t=e&&e.__v_raw;return t?V(t):e}function Co(e){return!U(e,"__v_skip")&&Object.isExtensible(e)&&lo(e,"__v_skip",!0),e}const De=e=>X(e)?sn(e):e,Ft=e=>X(e)?Ps(e):e;function ne(e){return e?e.__v_isRef===!0:!1}function ir(e){return rr(e,!1)}function rr(e,t){return ne(e)?e:new lr(e,t)}class lr{constructor(t,s){this.dep=new Zs,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=s?t:V(t),this._value=s?t:De(t),this.__v_isShallow=s}get value(){return this.dep.track(),this._value}set value(t){const s=this._rawValue,n=this.__v_isShallow||be(t)||Je(t);t=n?t:V(t),Ke(t,s)&&(this._rawValue=t,this._value=n?t:De(t),this.dep.trigger())}}function ar(e){return ne(e)?e.value:e}const cr={get:(e,t,s)=>t==="__v_raw"?e:ar(Reflect.get(e,t,s)),set:(e,t,s,n)=>{const o=e[t];return ne(o)&&!ne(s)?(o.value=s,!0):Reflect.set(e,t,s,n)}};function Eo(e){return lt(e)?e:new Proxy(e,cr)}class dr{constructor(t,s,n){this.fn=t,this.setter=s,this._value=void 0,this.dep=new Zs(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Bt-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!s,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&z!==this)return po(this,!0),!0}get value(){const t=this.dep.track();return mo(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function ur(e,t,s=!1){let n,o;return j(e)?n=e:(n=e.get,o=e.set),new dr(n,o,s)}const Ut={},qt=new WeakMap;let Qe;function fr(e,t=!1,s=Qe){if(s){let n=qt.get(s);n||qt.set(s,n=[]),n.push(e)}}function pr(e,t,s=G){const{immediate:n,deep:o,once:i,scheduler:l,augmentJob:a,call:d}=s,p=E=>o?E:be(E)||o===!1||o===0?Ue(E,1):Ue(E);let f,w,T,m,h=!1,g=!1;if(ne(e)?(w=()=>e.value,h=be(e)):lt(e)?(w=()=>p(e),h=!0):L(e)?(g=!0,h=e.some(E=>lt(E)||be(E)),w=()=>e.map(E=>{if(ne(E))return E.value;if(lt(E))return p(E);if(j(E))return d?d(E,2):E()})):j(e)?t?w=d?()=>d(e,2):e:w=()=>{if(T){Pe();try{T()}finally{Oe()}}const E=Qe;Qe=f;try{return d?d(e,3,[m]):e(m)}finally{Qe=E}}:w=$e,t&&o){const E=w,O=o===!0?1/0:o;w=()=>Ue(E(),O)}const x=Li(),y=()=>{f.stop(),x&&x.active&&Js(x.effects,f)};if(i&&t){const E=t;t=(...O)=>{E(...O),y()}}let v=g?new Array(e.length).fill(Ut):Ut;const F=E=>{if(!(!(f.flags&1)||!f.dirty&&!E))if(t){const O=f.run();if(o||h||(g?O.some((q,D)=>Ke(q,v[D])):Ke(O,v))){T&&T();const q=Qe;Qe=f;try{const D=[O,v===Ut?void 0:g&&v[0]===Ut?[]:v,m];v=O,d?d(t,3,D):t(...D)}finally{Qe=q}}}else f.run()};return a&&a(F),f=new uo(w),f.scheduler=l?()=>l(F,!1):F,m=E=>fr(E,!1,f),T=f.onStop=()=>{const E=qt.get(f);if(E){if(d)d(E,4);else for(const O of E)O();qt.delete(f)}},t?n?F(!0):v=f.run():l?l(F.bind(null,!0),!0):f.run(),y.pause=f.pause.bind(f),y.resume=f.resume.bind(f),y.stop=y,y}function Ue(e,t=1/0,s){if(t<=0||!X(e)||e.__v_skip||(s=s||new Map,(s.get(e)||0)>=t))return e;if(s.set(e,t),t--,ne(e))Ue(e.value,t,s);else if(L(e))for(let n=0;n<e.length;n++)Ue(e[n],t,s);else if(Ci(e)||wt(e))e.forEach(n=>{Ue(n,t,s)});else if(Ii(e)){for(const n in e)Ue(e[n],t,s);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&Ue(e[n],t,s)}return e}/**
10
+ * @vue/runtime-core v3.5.27
11
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
12
+ * @license MIT
13
+ **/function Ot(e,t,s,n){try{return n?e(...n):e()}catch(o){rs(o,t,s)}}function Be(e,t,s,n){if(j(e)){const o=Ot(e,t,s,n);return o&&io(o)&&o.catch(i=>{rs(i,t,s)}),o}if(L(e)){const o=[];for(let i=0;i<e.length;i++)o.push(Be(e[i],t,s,n));return o}}function rs(e,t,s,n=!0){const o=t?t.vnode:null,{errorHandler:i,throwUnhandledErrorInProduction:l}=t&&t.appContext.config||G;if(t){let a=t.parent;const d=t.proxy,p=`https://vuejs.org/error-reference/#runtime-${s}`;for(;a;){const f=a.ec;if(f){for(let w=0;w<f.length;w++)if(f[w](e,d,p)===!1)return}a=a.parent}if(i){Pe(),Ot(i,null,10,[e,d,p]),Oe();return}}hr(e,s,o,n,l)}function hr(e,t,s,n=!0,o=!1){if(o)throw e;console.error(e)}const ae=[];let Ee=-1;const at=[];let Ne=null,ot=0;const To=Promise.resolve();let Yt=null;function gr(e){const t=Yt||To;return e?t.then(this?e.bind(this):e):t}function mr(e){let t=Ee+1,s=ae.length;for(;t<s;){const n=t+s>>>1,o=ae[n],i=Mt(o);i<e||i===e&&o.flags&2?t=n+1:s=n}return t}function rn(e){if(!(e.flags&1)){const t=Mt(e),s=ae[ae.length-1];!s||!(e.flags&2)&&t>=Mt(s)?ae.push(e):ae.splice(mr(t),0,e),e.flags|=1,Io()}}function Io(){Yt||(Yt=To.then(Bo))}function vr(e){L(e)?at.push(...e):Ne&&e.id===-1?Ne.splice(ot+1,0,e):e.flags&1||(at.push(e),e.flags|=1),Io()}function En(e,t,s=Ee+1){for(;s<ae.length;s++){const n=ae[s];if(n&&n.flags&2){if(e&&n.id!==e.uid)continue;ae.splice(s,1),s--,n.flags&4&&(n.flags&=-2),n(),n.flags&4||(n.flags&=-2)}}}function $o(e){if(at.length){const t=[...new Set(at)].sort((s,n)=>Mt(s)-Mt(n));if(at.length=0,Ne){Ne.push(...t);return}for(Ne=t,ot=0;ot<Ne.length;ot++){const s=Ne[ot];s.flags&4&&(s.flags&=-2),s.flags&8||s(),s.flags&=-2}Ne=null,ot=0}}const Mt=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Bo(e){try{for(Ee=0;Ee<ae.length;Ee++){const t=ae[Ee];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),Ot(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Ee<ae.length;Ee++){const t=ae[Ee];t&&(t.flags&=-2)}Ee=-1,ae.length=0,$o(),Yt=null,(ae.length||at.length)&&Bo()}}let Ie=null,Ao=null;function Qt(e){const t=Ie;return Ie=e,Ao=e&&e.type.__scopeId||null,t}function yr(e,t=Ie,s){if(!t||e._n)return e;const n=(...o)=>{n._d&&On(-1);const i=Qt(t);let l;try{l=e(...o)}finally{Qt(i),n._d&&On(1)}return l};return n._n=!0,n._c=!0,n._d=!0,n}function qe(e,t,s,n){const o=e.dirs,i=t&&t.dirs;for(let l=0;l<o.length;l++){const a=o[l];i&&(a.oldValue=i[l].value);let d=a.dir[n];d&&(Pe(),Be(d,s,8,[e.el,a,e,t]),Oe())}}function br(e,t){if(ce){let s=ce.provides;const n=ce.parent&&ce.parent.provides;n===s&&(s=ce.provides=Object.create(n)),s[e]=t}}function Kt(e,t,s=!1){const n=wl();if(n||ct){let o=ct?ct._context.provides:n?n.parent==null||n.ce?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides:void 0;if(o&&e in o)return o[e];if(arguments.length>1)return s&&j(t)?t.call(n&&n.proxy):t}}const wr=Symbol.for("v-scx"),xr=()=>Kt(wr);function ks(e,t,s){return Fo(e,t,s)}function Fo(e,t,s=G){const{immediate:n,deep:o,flush:i,once:l}=s,a=oe({},s),d=t&&n||!t&&i!=="post";let p;if(Pt){if(i==="sync"){const m=xr();p=m.__watcherHandles||(m.__watcherHandles=[])}else if(!d){const m=()=>{};return m.stop=$e,m.resume=$e,m.pause=$e,m}}const f=ce;a.call=(m,h,g)=>Be(m,f,h,g);let w=!1;i==="post"?a.scheduler=m=>{he(m,f&&f.suspense)}:i!=="sync"&&(w=!0,a.scheduler=(m,h)=>{h?m():rn(m)}),a.augmentJob=m=>{t&&(m.flags|=4),w&&(m.flags|=2,f&&(m.id=f.uid,m.i=f))};const T=pr(e,t,a);return Pt&&(p?p.push(T):d&&T()),T}function _r(e,t,s){const n=this.proxy,o=Z(e)?e.includes(".")?Mo(n,e):()=>n[e]:e.bind(n,n);let i;j(t)?i=t:(i=t.handler,s=t);const l=Dt(this),a=Fo(o,i.bind(n),s);return l(),a}function Mo(e,t){const s=t.split(".");return()=>{let n=e;for(let o=0;o<s.length&&n;o++)n=n[s[o]];return n}}const Sr=Symbol("_vte"),kr=e=>e.__isTeleport,Cr=Symbol("_leaveCb");function ln(e,t){e.shapeFlag&6&&e.component?(e.transition=t,ln(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Ro(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}const Xt=new WeakMap;function kt(e,t,s,n,o=!1){if(L(e)){e.forEach((h,g)=>kt(h,t&&(L(t)?t[g]:t),s,n,o));return}if(Ct(n)&&!o){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&kt(e,t,s,n.component.subTree);return}const i=n.shapeFlag&4?un(n.component):n.el,l=o?null:i,{i:a,r:d}=e,p=t&&t.r,f=a.refs===G?a.refs={}:a.refs,w=a.setupState,T=V(w),m=w===G?oo:h=>U(T,h);if(p!=null&&p!==d){if(Tn(t),Z(p))f[p]=null,m(p)&&(w[p]=null);else if(ne(p)){p.value=null;const h=t;h.k&&(f[h.k]=null)}}if(j(d))Ot(d,a,12,[l,f]);else{const h=Z(d),g=ne(d);if(h||g){const x=()=>{if(e.f){const y=h?m(d)?w[d]:f[d]:d.value;if(o)L(y)&&Js(y,i);else if(L(y))y.includes(i)||y.push(i);else if(h)f[d]=[i],m(d)&&(w[d]=f[d]);else{const v=[i];d.value=v,e.k&&(f[e.k]=v)}}else h?(f[d]=l,m(d)&&(w[d]=l)):g&&(d.value=l,e.k&&(f[e.k]=l))};if(l){const y=()=>{x(),Xt.delete(e)};y.id=-1,Xt.set(e,y),he(y,s)}else Tn(e),x()}}}function Tn(e){const t=Xt.get(e);t&&(t.flags|=8,Xt.delete(e))}is().requestIdleCallback;is().cancelIdleCallback;const Ct=e=>!!e.type.__asyncLoader,Po=e=>e.type.__isKeepAlive;function Er(e,t){Oo(e,"a",t)}function Tr(e,t){Oo(e,"da",t)}function Oo(e,t,s=ce){const n=e.__wdc||(e.__wdc=()=>{let o=s;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(ls(t,n,s),s){let o=s.parent;for(;o&&o.parent;)Po(o.parent.vnode)&&Ir(n,t,s,o),o=o.parent}}function Ir(e,t,s,n){const o=ls(t,e,n,!0);jo(()=>{Js(n[t],o)},s)}function ls(e,t,s=ce,n=!1){if(s){const o=s[e]||(s[e]=[]),i=t.__weh||(t.__weh=(...l)=>{Pe();const a=Dt(s),d=Be(t,s,e,l);return a(),Oe(),d});return n?o.unshift(i):o.push(i),i}}const je=e=>(t,s=ce)=>{(!Pt||e==="sp")&&ls(e,(...n)=>t(...n),s)},$r=je("bm"),Do=je("m"),Br=je("bu"),Ar=je("u"),Fr=je("bum"),jo=je("um"),Mr=je("sp"),Rr=je("rtg"),Pr=je("rtc");function Or(e,t=ce){ls("ec",e,t)}const Dr=Symbol.for("v-ndc"),Os=e=>e?ni(e)?un(e):Os(e.parent):null,Et=oe(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=>Os(e.parent),$root:e=>Os(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Ho(e),$forceUpdate:e=>e.f||(e.f=()=>{rn(e.update)}),$nextTick:e=>e.n||(e.n=gr.bind(e.proxy)),$watch:e=>_r.bind(e)}),Cs=(e,t)=>e!==G&&!e.__isScriptSetup&&U(e,t),jr={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:s,setupState:n,data:o,props:i,accessCache:l,type:a,appContext:d}=e;if(t[0]!=="$"){const T=l[t];if(T!==void 0)switch(T){case 1:return n[t];case 2:return o[t];case 4:return s[t];case 3:return i[t]}else{if(Cs(n,t))return l[t]=1,n[t];if(o!==G&&U(o,t))return l[t]=2,o[t];if(U(i,t))return l[t]=3,i[t];if(s!==G&&U(s,t))return l[t]=4,s[t];Ds&&(l[t]=0)}}const p=Et[t];let f,w;if(p)return t==="$attrs"&&se(e.attrs,"get",""),p(e);if((f=a.__cssModules)&&(f=f[t]))return f;if(s!==G&&U(s,t))return l[t]=4,s[t];if(w=d.config.globalProperties,U(w,t))return w[t]},set({_:e},t,s){const{data:n,setupState:o,ctx:i}=e;return Cs(o,t)?(o[t]=s,!0):n!==G&&U(n,t)?(n[t]=s,!0):U(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=s,!0)},has({_:{data:e,setupState:t,accessCache:s,ctx:n,appContext:o,props:i,type:l}},a){let d;return!!(s[a]||e!==G&&a[0]!=="$"&&U(e,a)||Cs(t,a)||U(i,a)||U(n,a)||U(Et,a)||U(o.config.globalProperties,a)||(d=l.__cssModules)&&d[a])},defineProperty(e,t,s){return s.get!=null?e._.accessCache[t]=0:U(s,"value")&&this.set(e,t,s.value,null),Reflect.defineProperty(e,t,s)}};function In(e){return L(e)?e.reduce((t,s)=>(t[s]=null,t),{}):e}let Ds=!0;function Lr(e){const t=Ho(e),s=e.proxy,n=e.ctx;Ds=!1,t.beforeCreate&&$n(t.beforeCreate,e,"bc");const{data:o,computed:i,methods:l,watch:a,provide:d,inject:p,created:f,beforeMount:w,mounted:T,beforeUpdate:m,updated:h,activated:g,deactivated:x,beforeDestroy:y,beforeUnmount:v,destroyed:F,unmounted:E,render:O,renderTracked:q,renderTriggered:D,errorCaptured:Q,serverPrefetch:tt,expose:we,inheritAttrs:Le,components:Ae,directives:st,filters:vs}=t;if(p&&Hr(p,n,null),l)for(const Y in l){const W=l[Y];j(W)&&(n[Y]=W.bind(s))}if(o){const Y=o.call(s,s);X(Y)&&(e.data=sn(Y))}if(Ds=!0,i)for(const Y in i){const W=i[Y],ze=j(W)?W.bind(s,s):j(W.get)?W.get.bind(s,s):$e,Lt=!j(W)&&j(W.set)?W.set.bind(s):$e,Ge=El({get:ze,set:Lt});Object.defineProperty(n,Y,{enumerable:!0,configurable:!0,get:()=>Ge.value,set:xe=>Ge.value=xe})}if(a)for(const Y in a)Lo(a[Y],n,s,Y);if(d){const Y=j(d)?d.call(s):d;Reflect.ownKeys(Y).forEach(W=>{br(W,Y[W])})}f&&$n(f,e,"c");function ie(Y,W){L(W)?W.forEach(ze=>Y(ze.bind(s))):W&&Y(W.bind(s))}if(ie($r,w),ie(Do,T),ie(Br,m),ie(Ar,h),ie(Er,g),ie(Tr,x),ie(Or,Q),ie(Pr,q),ie(Rr,D),ie(Fr,v),ie(jo,E),ie(Mr,tt),L(we))if(we.length){const Y=e.exposed||(e.exposed={});we.forEach(W=>{Object.defineProperty(Y,W,{get:()=>s[W],set:ze=>s[W]=ze,enumerable:!0})})}else e.exposed||(e.exposed={});O&&e.render===$e&&(e.render=O),Le!=null&&(e.inheritAttrs=Le),Ae&&(e.components=Ae),st&&(e.directives=st),tt&&Ro(e)}function Hr(e,t,s=$e){L(e)&&(e=js(e));for(const n in e){const o=e[n];let i;X(o)?"default"in o?i=Kt(o.from||n,o.default,!0):i=Kt(o.from||n):i=Kt(o),ne(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:l=>i.value=l}):t[n]=i}}function $n(e,t,s){Be(L(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,s)}function Lo(e,t,s,n){let o=n.includes(".")?Mo(s,n):()=>s[n];if(Z(e)){const i=t[e];j(i)&&ks(o,i)}else if(j(e))ks(o,e.bind(s));else if(X(e))if(L(e))e.forEach(i=>Lo(i,t,s,n));else{const i=j(e.handler)?e.handler.bind(s):t[e.handler];j(i)&&ks(o,i,e)}}function Ho(e){const t=e.type,{mixins:s,extends:n}=t,{mixins:o,optionsCache:i,config:{optionMergeStrategies:l}}=e.appContext,a=i.get(t);let d;return a?d=a:!o.length&&!s&&!n?d=t:(d={},o.length&&o.forEach(p=>Zt(d,p,l,!0)),Zt(d,t,l)),X(t)&&i.set(t,d),d}function Zt(e,t,s,n=!1){const{mixins:o,extends:i}=t;i&&Zt(e,i,s,!0),o&&o.forEach(l=>Zt(e,l,s,!0));for(const l in t)if(!(n&&l==="expose")){const a=Nr[l]||s&&s[l];e[l]=a?a(e[l],t[l]):t[l]}return e}const Nr={data:Bn,props:An,emits:An,methods:bt,computed:bt,beforeCreate:re,created:re,beforeMount:re,mounted:re,beforeUpdate:re,updated:re,beforeDestroy:re,beforeUnmount:re,destroyed:re,unmounted:re,activated:re,deactivated:re,errorCaptured:re,serverPrefetch:re,components:bt,directives:bt,watch:Ur,provide:Bn,inject:Vr};function Bn(e,t){return t?e?function(){return oe(j(e)?e.call(this,this):e,j(t)?t.call(this,this):t)}:t:e}function Vr(e,t){return bt(js(e),js(t))}function js(e){if(L(e)){const t={};for(let s=0;s<e.length;s++)t[e[s]]=e[s];return t}return e}function re(e,t){return e?[...new Set([].concat(e,t))]:t}function bt(e,t){return e?oe(Object.create(null),e,t):t}function An(e,t){return e?L(e)&&L(t)?[...new Set([...e,...t])]:oe(Object.create(null),In(e),In(t??{})):t}function Ur(e,t){if(!e)return t;if(!t)return e;const s=oe(Object.create(null),e);for(const n in t)s[n]=re(e[n],t[n]);return s}function No(){return{app:null,config:{isNativeTag:oo,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 Kr=0;function Wr(e,t){return function(n,o=null){j(n)||(n=oe({},n)),o!=null&&!X(o)&&(o=null);const i=No(),l=new WeakSet,a=[];let d=!1;const p=i.app={_uid:Kr++,_component:n,_props:o,_container:null,_context:i,_instance:null,version:Tl,get config(){return i.config},set config(f){},use(f,...w){return l.has(f)||(f&&j(f.install)?(l.add(f),f.install(p,...w)):j(f)&&(l.add(f),f(p,...w))),p},mixin(f){return i.mixins.includes(f)||i.mixins.push(f),p},component(f,w){return w?(i.components[f]=w,p):i.components[f]},directive(f,w){return w?(i.directives[f]=w,p):i.directives[f]},mount(f,w,T){if(!d){const m=p._ceVNode||Ze(n,o);return m.appContext=i,T===!0?T="svg":T===!1&&(T=void 0),e(m,f,T),d=!0,p._container=f,f.__vue_app__=p,un(m.component)}},onUnmount(f){a.push(f)},unmount(){d&&(Be(a,p._instance,16),e(null,p._container),delete p._container.__vue_app__)},provide(f,w){return i.provides[f]=w,p},runWithContext(f){const w=ct;ct=p;try{return f()}finally{ct=w}}};return p}}let ct=null;const Jr=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${We(t)}Modifiers`]||e[`${et(t)}Modifiers`];function zr(e,t,...s){if(e.isUnmounted)return;const n=e.vnode.props||G;let o=s;const i=t.startsWith("update:"),l=i&&Jr(n,t.slice(7));l&&(l.trim&&(o=s.map(f=>Z(f)?f.trim():f)),l.number&&(o=s.map(Ai)));let a,d=n[a=bs(t)]||n[a=bs(We(t))];!d&&i&&(d=n[a=bs(et(t))]),d&&Be(d,e,6,o);const p=n[a+"Once"];if(p){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,Be(p,e,6,o)}}const Gr=new WeakMap;function Vo(e,t,s=!1){const n=s?Gr:t.emitsCache,o=n.get(e);if(o!==void 0)return o;const i=e.emits;let l={},a=!1;if(!j(e)){const d=p=>{const f=Vo(p,t,!0);f&&(a=!0,oe(l,f))};!s&&t.mixins.length&&t.mixins.forEach(d),e.extends&&d(e.extends),e.mixins&&e.mixins.forEach(d)}return!i&&!a?(X(e)&&n.set(e,null),null):(L(i)?i.forEach(d=>l[d]=null):oe(l,i),X(e)&&n.set(e,l),l)}function as(e,t){return!e||!ss(t)?!1:(t=t.slice(2).replace(/Once$/,""),U(e,t[0].toLowerCase()+t.slice(1))||U(e,et(t))||U(e,t))}function Fn(e){const{type:t,vnode:s,proxy:n,withProxy:o,propsOptions:[i],slots:l,attrs:a,emit:d,render:p,renderCache:f,props:w,data:T,setupState:m,ctx:h,inheritAttrs:g}=e,x=Qt(e);let y,v;try{if(s.shapeFlag&4){const E=o||n,O=E;y=Te(p.call(O,E,f,w,m,T,h)),v=a}else{const E=t;y=Te(E.length>1?E(w,{attrs:a,slots:l,emit:d}):E(w,null)),v=t.props?a:qr(a)}}catch(E){Tt.length=0,rs(E,e,1),y=Ze(dt)}let F=y;if(v&&g!==!1){const E=Object.keys(v),{shapeFlag:O}=F;E.length&&O&7&&(i&&E.some(Ws)&&(v=Yr(v,i)),F=ut(F,v,!1,!0))}return s.dirs&&(F=ut(F,null,!1,!0),F.dirs=F.dirs?F.dirs.concat(s.dirs):s.dirs),s.transition&&ln(F,s.transition),y=F,Qt(x),y}const qr=e=>{let t;for(const s in e)(s==="class"||s==="style"||ss(s))&&((t||(t={}))[s]=e[s]);return t},Yr=(e,t)=>{const s={};for(const n in e)(!Ws(n)||!(n.slice(9)in t))&&(s[n]=e[n]);return s};function Qr(e,t,s){const{props:n,children:o,component:i}=e,{props:l,children:a,patchFlag:d}=t,p=i.emitsOptions;if(t.dirs||t.transition)return!0;if(s&&d>=0){if(d&1024)return!0;if(d&16)return n?Mn(n,l,p):!!l;if(d&8){const f=t.dynamicProps;for(let w=0;w<f.length;w++){const T=f[w];if(l[T]!==n[T]&&!as(p,T))return!0}}}else return(o||a)&&(!a||!a.$stable)?!0:n===l?!1:n?l?Mn(n,l,p):!0:!!l;return!1}function Mn(e,t,s){const n=Object.keys(t);if(n.length!==Object.keys(e).length)return!0;for(let o=0;o<n.length;o++){const i=n[o];if(t[i]!==e[i]&&!as(s,i))return!0}return!1}function Xr({vnode:e,parent:t},s){for(;t;){const n=t.subTree;if(n.suspense&&n.suspense.activeBranch===e&&(n.el=e.el),n===e)(e=t.vnode).el=s,t=t.parent;else break}}const Uo={},Ko=()=>Object.create(Uo),Wo=e=>Object.getPrototypeOf(e)===Uo;function Zr(e,t,s,n=!1){const o={},i=Ko();e.propsDefaults=Object.create(null),Jo(e,t,o,i);for(const l in e.propsOptions[0])l in o||(o[l]=void 0);s?e.props=n?o:or(o):e.type.props?e.props=o:e.props=i,e.attrs=i}function el(e,t,s,n){const{props:o,attrs:i,vnode:{patchFlag:l}}=e,a=V(o),[d]=e.propsOptions;let p=!1;if((n||l>0)&&!(l&16)){if(l&8){const f=e.vnode.dynamicProps;for(let w=0;w<f.length;w++){let T=f[w];if(as(e.emitsOptions,T))continue;const m=t[T];if(d)if(U(i,T))m!==i[T]&&(i[T]=m,p=!0);else{const h=We(T);o[h]=Ls(d,a,h,m,e,!1)}else m!==i[T]&&(i[T]=m,p=!0)}}}else{Jo(e,t,o,i)&&(p=!0);let f;for(const w in a)(!t||!U(t,w)&&((f=et(w))===w||!U(t,f)))&&(d?s&&(s[w]!==void 0||s[f]!==void 0)&&(o[w]=Ls(d,a,w,void 0,e,!0)):delete o[w]);if(i!==a)for(const w in i)(!t||!U(t,w))&&(delete i[w],p=!0)}p&&Re(e.attrs,"set","")}function Jo(e,t,s,n){const[o,i]=e.propsOptions;let l=!1,a;if(t)for(let d in t){if(xt(d))continue;const p=t[d];let f;o&&U(o,f=We(d))?!i||!i.includes(f)?s[f]=p:(a||(a={}))[f]=p:as(e.emitsOptions,d)||(!(d in n)||p!==n[d])&&(n[d]=p,l=!0)}if(i){const d=V(s),p=a||G;for(let f=0;f<i.length;f++){const w=i[f];s[w]=Ls(o,d,w,p[w],e,!U(p,w))}}return l}function Ls(e,t,s,n,o,i){const l=e[s];if(l!=null){const a=U(l,"default");if(a&&n===void 0){const d=l.default;if(l.type!==Function&&!l.skipFactory&&j(d)){const{propsDefaults:p}=o;if(s in p)n=p[s];else{const f=Dt(o);n=p[s]=d.call(null,t),f()}}else n=d;o.ce&&o.ce._setProp(s,n)}l[0]&&(i&&!a?n=!1:l[1]&&(n===""||n===et(s))&&(n=!0))}return n}const tl=new WeakMap;function zo(e,t,s=!1){const n=s?tl:t.propsCache,o=n.get(e);if(o)return o;const i=e.props,l={},a=[];let d=!1;if(!j(e)){const f=w=>{d=!0;const[T,m]=zo(w,t,!0);oe(l,T),m&&a.push(...m)};!s&&t.mixins.length&&t.mixins.forEach(f),e.extends&&f(e.extends),e.mixins&&e.mixins.forEach(f)}if(!i&&!d)return X(e)&&n.set(e,rt),rt;if(L(i))for(let f=0;f<i.length;f++){const w=We(i[f]);Rn(w)&&(l[w]=G)}else if(i)for(const f in i){const w=We(f);if(Rn(w)){const T=i[f],m=l[w]=L(T)||j(T)?{type:T}:oe({},T),h=m.type;let g=!1,x=!0;if(L(h))for(let y=0;y<h.length;++y){const v=h[y],F=j(v)&&v.name;if(F==="Boolean"){g=!0;break}else F==="String"&&(x=!1)}else g=j(h)&&h.name==="Boolean";m[0]=g,m[1]=x,(g||U(m,"default"))&&a.push(w)}}const p=[l,a];return X(e)&&n.set(e,p),p}function Rn(e){return e[0]!=="$"&&!xt(e)}const an=e=>e==="_"||e==="_ctx"||e==="$stable",cn=e=>L(e)?e.map(Te):[Te(e)],sl=(e,t,s)=>{if(t._n)return t;const n=yr((...o)=>cn(t(...o)),s);return n._c=!1,n},Go=(e,t,s)=>{const n=e._ctx;for(const o in e){if(an(o))continue;const i=e[o];if(j(i))t[o]=sl(o,i,n);else if(i!=null){const l=cn(i);t[o]=()=>l}}},qo=(e,t)=>{const s=cn(t);e.slots.default=()=>s},Yo=(e,t,s)=>{for(const n in t)(s||!an(n))&&(e[n]=t[n])},nl=(e,t,s)=>{const n=e.slots=Ko();if(e.vnode.shapeFlag&32){const o=t._;o?(Yo(n,t,s),s&&lo(n,"_",o,!0)):Go(t,n)}else t&&qo(e,t)},ol=(e,t,s)=>{const{vnode:n,slots:o}=e;let i=!0,l=G;if(n.shapeFlag&32){const a=t._;a?s&&a===1?i=!1:Yo(o,t,s):(i=!t.$stable,Go(t,o)),l=t}else t&&(qo(e,t),l={default:1});if(i)for(const a in o)!an(a)&&l[a]==null&&delete o[a]},he=cl;function il(e){return rl(e)}function rl(e,t){const s=is();s.__VUE__=!0;const{insert:n,remove:o,patchProp:i,createElement:l,createText:a,createComment:d,setText:p,setElementText:f,parentNode:w,nextSibling:T,setScopeId:m=$e,insertStaticContent:h}=e,g=(c,u,b,C=null,_=null,S=null,B=void 0,$=null,I=!!u.dynamicChildren)=>{if(c===u)return;c&&!yt(c,u)&&(C=Ht(c),xe(c,_,S,!0),c=null),u.patchFlag===-2&&(I=!1,u.dynamicChildren=null);const{type:k,ref:R,shapeFlag:A}=u;switch(k){case cs:x(c,u,b,C);break;case dt:y(c,u,b,C);break;case Ts:c==null&&v(u,b,C,B);break;case ve:Ae(c,u,b,C,_,S,B,$,I);break;default:A&1?O(c,u,b,C,_,S,B,$,I):A&6?st(c,u,b,C,_,S,B,$,I):(A&64||A&128)&&k.process(c,u,b,C,_,S,B,$,I,gt)}R!=null&&_?kt(R,c&&c.ref,S,u||c,!u):R==null&&c&&c.ref!=null&&kt(c.ref,null,S,c,!0)},x=(c,u,b,C)=>{if(c==null)n(u.el=a(u.children),b,C);else{const _=u.el=c.el;u.children!==c.children&&p(_,u.children)}},y=(c,u,b,C)=>{c==null?n(u.el=d(u.children||""),b,C):u.el=c.el},v=(c,u,b,C)=>{[c.el,c.anchor]=h(c.children,u,b,C,c.el,c.anchor)},F=({el:c,anchor:u},b,C)=>{let _;for(;c&&c!==u;)_=T(c),n(c,b,C),c=_;n(u,b,C)},E=({el:c,anchor:u})=>{let b;for(;c&&c!==u;)b=T(c),o(c),c=b;o(u)},O=(c,u,b,C,_,S,B,$,I)=>{if(u.type==="svg"?B="svg":u.type==="math"&&(B="mathml"),c==null)q(u,b,C,_,S,B,$,I);else{const k=c.el&&c.el._isVueCE?c.el:null;try{k&&k._beginPatch(),tt(c,u,_,S,B,$,I)}finally{k&&k._endPatch()}}},q=(c,u,b,C,_,S,B,$)=>{let I,k;const{props:R,shapeFlag:A,transition:M,dirs:P}=c;if(I=c.el=l(c.type,S,R&&R.is,R),A&8?f(I,c.children):A&16&&Q(c.children,I,null,C,_,Es(c,S),B,$),P&&qe(c,null,C,"created"),D(I,c,c.scopeId,B,C),R){for(const J in R)J!=="value"&&!xt(J)&&i(I,J,null,R[J],S,C);"value"in R&&i(I,"value",null,R.value,S),(k=R.onVnodeBeforeMount)&&Ce(k,C,c)}P&&qe(c,null,C,"beforeMount");const H=ll(_,M);H&&M.beforeEnter(I),n(I,u,b),((k=R&&R.onVnodeMounted)||H||P)&&he(()=>{k&&Ce(k,C,c),H&&M.enter(I),P&&qe(c,null,C,"mounted")},_)},D=(c,u,b,C,_)=>{if(b&&m(c,b),C)for(let S=0;S<C.length;S++)m(c,C[S]);if(_){let S=_.subTree;if(u===S||ei(S.type)&&(S.ssContent===u||S.ssFallback===u)){const B=_.vnode;D(c,B,B.scopeId,B.slotScopeIds,_.parent)}}},Q=(c,u,b,C,_,S,B,$,I=0)=>{for(let k=I;k<c.length;k++){const R=c[k]=$?Ve(c[k]):Te(c[k]);g(null,R,u,b,C,_,S,B,$)}},tt=(c,u,b,C,_,S,B)=>{const $=u.el=c.el;let{patchFlag:I,dynamicChildren:k,dirs:R}=u;I|=c.patchFlag&16;const A=c.props||G,M=u.props||G;let P;if(b&&Ye(b,!1),(P=M.onVnodeBeforeUpdate)&&Ce(P,b,u,c),R&&qe(u,c,b,"beforeUpdate"),b&&Ye(b,!0),(A.innerHTML&&M.innerHTML==null||A.textContent&&M.textContent==null)&&f($,""),k?we(c.dynamicChildren,k,$,b,C,Es(u,_),S):B||W(c,u,$,null,b,C,Es(u,_),S,!1),I>0){if(I&16)Le($,A,M,b,_);else if(I&2&&A.class!==M.class&&i($,"class",null,M.class,_),I&4&&i($,"style",A.style,M.style,_),I&8){const H=u.dynamicProps;for(let J=0;J<H.length;J++){const K=H[J],de=A[K],ue=M[K];(ue!==de||K==="value")&&i($,K,de,ue,_,b)}}I&1&&c.children!==u.children&&f($,u.children)}else!B&&k==null&&Le($,A,M,b,_);((P=M.onVnodeUpdated)||R)&&he(()=>{P&&Ce(P,b,u,c),R&&qe(u,c,b,"updated")},C)},we=(c,u,b,C,_,S,B)=>{for(let $=0;$<u.length;$++){const I=c[$],k=u[$],R=I.el&&(I.type===ve||!yt(I,k)||I.shapeFlag&198)?w(I.el):b;g(I,k,R,null,C,_,S,B,!0)}},Le=(c,u,b,C,_)=>{if(u!==b){if(u!==G)for(const S in u)!xt(S)&&!(S in b)&&i(c,S,u[S],null,_,C);for(const S in b){if(xt(S))continue;const B=b[S],$=u[S];B!==$&&S!=="value"&&i(c,S,$,B,_,C)}"value"in b&&i(c,"value",u.value,b.value,_)}},Ae=(c,u,b,C,_,S,B,$,I)=>{const k=u.el=c?c.el:a(""),R=u.anchor=c?c.anchor:a("");let{patchFlag:A,dynamicChildren:M,slotScopeIds:P}=u;P&&($=$?$.concat(P):P),c==null?(n(k,b,C),n(R,b,C),Q(u.children||[],b,R,_,S,B,$,I)):A>0&&A&64&&M&&c.dynamicChildren&&c.dynamicChildren.length===M.length?(we(c.dynamicChildren,M,b,_,S,B,$),(u.key!=null||_&&u===_.subTree)&&Qo(c,u,!0)):W(c,u,b,R,_,S,B,$,I)},st=(c,u,b,C,_,S,B,$,I)=>{u.slotScopeIds=$,c==null?u.shapeFlag&512?_.ctx.activate(u,b,C,B,I):vs(u,b,C,_,S,B,I):vn(c,u,I)},vs=(c,u,b,C,_,S,B)=>{const $=c.component=bl(c,C,_);if(Po(c)&&($.ctx.renderer=gt),xl($,!1,B),$.asyncDep){if(_&&_.registerDep($,ie,B),!c.el){const I=$.subTree=Ze(dt);y(null,I,u,b),c.placeholder=I.el}}else ie($,c,u,b,_,S,B)},vn=(c,u,b)=>{const C=u.component=c.component;if(Qr(c,u,b))if(C.asyncDep&&!C.asyncResolved){Y(C,u,b);return}else C.next=u,C.update();else u.el=c.el,C.vnode=u},ie=(c,u,b,C,_,S,B)=>{const $=()=>{if(c.isMounted){let{next:A,bu:M,u:P,parent:H,vnode:J}=c;{const Se=Xo(c);if(Se){A&&(A.el=J.el,Y(c,A,B)),Se.asyncDep.then(()=>{c.isUnmounted||$()});return}}let K=A,de;Ye(c,!1),A?(A.el=J.el,Y(c,A,B)):A=J,M&&ws(M),(de=A.props&&A.props.onVnodeBeforeUpdate)&&Ce(de,H,A,J),Ye(c,!0);const ue=Fn(c),_e=c.subTree;c.subTree=ue,g(_e,ue,w(_e.el),Ht(_e),c,_,S),A.el=ue.el,K===null&&Xr(c,ue.el),P&&he(P,_),(de=A.props&&A.props.onVnodeUpdated)&&he(()=>Ce(de,H,A,J),_)}else{let A;const{el:M,props:P}=u,{bm:H,m:J,parent:K,root:de,type:ue}=c,_e=Ct(u);Ye(c,!1),H&&ws(H),!_e&&(A=P&&P.onVnodeBeforeMount)&&Ce(A,K,u),Ye(c,!0);{de.ce&&de.ce._def.shadowRoot!==!1&&de.ce._injectChildStyle(ue);const Se=c.subTree=Fn(c);g(null,Se,b,C,c,_,S),u.el=Se.el}if(J&&he(J,_),!_e&&(A=P&&P.onVnodeMounted)){const Se=u;he(()=>Ce(A,K,Se),_)}(u.shapeFlag&256||K&&Ct(K.vnode)&&K.vnode.shapeFlag&256)&&c.a&&he(c.a,_),c.isMounted=!0,u=b=C=null}};c.scope.on();const I=c.effect=new uo($);c.scope.off();const k=c.update=I.run.bind(I),R=c.job=I.runIfDirty.bind(I);R.i=c,R.id=c.uid,I.scheduler=()=>rn(R),Ye(c,!0),k()},Y=(c,u,b)=>{u.component=c;const C=c.vnode.props;c.vnode=u,c.next=null,el(c,u.props,C,b),ol(c,u.children,b),Pe(),En(c),Oe()},W=(c,u,b,C,_,S,B,$,I=!1)=>{const k=c&&c.children,R=c?c.shapeFlag:0,A=u.children,{patchFlag:M,shapeFlag:P}=u;if(M>0){if(M&128){Lt(k,A,b,C,_,S,B,$,I);return}else if(M&256){ze(k,A,b,C,_,S,B,$,I);return}}P&8?(R&16&&ht(k,_,S),A!==k&&f(b,A)):R&16?P&16?Lt(k,A,b,C,_,S,B,$,I):ht(k,_,S,!0):(R&8&&f(b,""),P&16&&Q(A,b,C,_,S,B,$,I))},ze=(c,u,b,C,_,S,B,$,I)=>{c=c||rt,u=u||rt;const k=c.length,R=u.length,A=Math.min(k,R);let M;for(M=0;M<A;M++){const P=u[M]=I?Ve(u[M]):Te(u[M]);g(c[M],P,b,null,_,S,B,$,I)}k>R?ht(c,_,S,!0,!1,A):Q(u,b,C,_,S,B,$,I,A)},Lt=(c,u,b,C,_,S,B,$,I)=>{let k=0;const R=u.length;let A=c.length-1,M=R-1;for(;k<=A&&k<=M;){const P=c[k],H=u[k]=I?Ve(u[k]):Te(u[k]);if(yt(P,H))g(P,H,b,null,_,S,B,$,I);else break;k++}for(;k<=A&&k<=M;){const P=c[A],H=u[M]=I?Ve(u[M]):Te(u[M]);if(yt(P,H))g(P,H,b,null,_,S,B,$,I);else break;A--,M--}if(k>A){if(k<=M){const P=M+1,H=P<R?u[P].el:C;for(;k<=M;)g(null,u[k]=I?Ve(u[k]):Te(u[k]),b,H,_,S,B,$,I),k++}}else if(k>M)for(;k<=A;)xe(c[k],_,S,!0),k++;else{const P=k,H=k,J=new Map;for(k=H;k<=M;k++){const pe=u[k]=I?Ve(u[k]):Te(u[k]);pe.key!=null&&J.set(pe.key,k)}let K,de=0;const ue=M-H+1;let _e=!1,Se=0;const mt=new Array(ue);for(k=0;k<ue;k++)mt[k]=0;for(k=P;k<=A;k++){const pe=c[k];if(de>=ue){xe(pe,_,S,!0);continue}let ke;if(pe.key!=null)ke=J.get(pe.key);else for(K=H;K<=M;K++)if(mt[K-H]===0&&yt(pe,u[K])){ke=K;break}ke===void 0?xe(pe,_,S,!0):(mt[ke-H]=k+1,ke>=Se?Se=ke:_e=!0,g(pe,u[ke],b,null,_,S,B,$,I),de++)}const wn=_e?al(mt):rt;for(K=wn.length-1,k=ue-1;k>=0;k--){const pe=H+k,ke=u[pe],xn=u[pe+1],_n=pe+1<R?xn.el||Zo(xn):C;mt[k]===0?g(null,ke,b,_n,_,S,B,$,I):_e&&(K<0||k!==wn[K]?Ge(ke,b,_n,2):K--)}}},Ge=(c,u,b,C,_=null)=>{const{el:S,type:B,transition:$,children:I,shapeFlag:k}=c;if(k&6){Ge(c.component.subTree,u,b,C);return}if(k&128){c.suspense.move(u,b,C);return}if(k&64){B.move(c,u,b,gt);return}if(B===ve){n(S,u,b);for(let A=0;A<I.length;A++)Ge(I[A],u,b,C);n(c.anchor,u,b);return}if(B===Ts){F(c,u,b);return}if(C!==2&&k&1&&$)if(C===0)$.beforeEnter(S),n(S,u,b),he(()=>$.enter(S),_);else{const{leave:A,delayLeave:M,afterLeave:P}=$,H=()=>{c.ctx.isUnmounted?o(S):n(S,u,b)},J=()=>{S._isLeaving&&S[Cr](!0),A(S,()=>{H(),P&&P()})};M?M(S,H,J):J()}else n(S,u,b)},xe=(c,u,b,C=!1,_=!1)=>{const{type:S,props:B,ref:$,children:I,dynamicChildren:k,shapeFlag:R,patchFlag:A,dirs:M,cacheIndex:P}=c;if(A===-2&&(_=!1),$!=null&&(Pe(),kt($,null,b,c,!0),Oe()),P!=null&&(u.renderCache[P]=void 0),R&256){u.ctx.deactivate(c);return}const H=R&1&&M,J=!Ct(c);let K;if(J&&(K=B&&B.onVnodeBeforeUnmount)&&Ce(K,u,c),R&6)Si(c.component,b,C);else{if(R&128){c.suspense.unmount(b,C);return}H&&qe(c,null,u,"beforeUnmount"),R&64?c.type.remove(c,u,b,gt,C):k&&!k.hasOnce&&(S!==ve||A>0&&A&64)?ht(k,u,b,!1,!0):(S===ve&&A&384||!_&&R&16)&&ht(I,u,b),C&&yn(c)}(J&&(K=B&&B.onVnodeUnmounted)||H)&&he(()=>{K&&Ce(K,u,c),H&&qe(c,null,u,"unmounted")},b)},yn=c=>{const{type:u,el:b,anchor:C,transition:_}=c;if(u===ve){_i(b,C);return}if(u===Ts){E(c);return}const S=()=>{o(b),_&&!_.persisted&&_.afterLeave&&_.afterLeave()};if(c.shapeFlag&1&&_&&!_.persisted){const{leave:B,delayLeave:$}=_,I=()=>B(b,S);$?$(c.el,S,I):I()}else S()},_i=(c,u)=>{let b;for(;c!==u;)b=T(c),o(c),c=b;o(u)},Si=(c,u,b)=>{const{bum:C,scope:_,job:S,subTree:B,um:$,m:I,a:k}=c;Pn(I),Pn(k),C&&ws(C),_.stop(),S&&(S.flags|=8,xe(B,c,u,b)),$&&he($,u),he(()=>{c.isUnmounted=!0},u)},ht=(c,u,b,C=!1,_=!1,S=0)=>{for(let B=S;B<c.length;B++)xe(c[B],u,b,C,_)},Ht=c=>{if(c.shapeFlag&6)return Ht(c.component.subTree);if(c.shapeFlag&128)return c.suspense.next();const u=T(c.anchor||c.el),b=u&&u[Sr];return b?T(b):u};let ys=!1;const bn=(c,u,b)=>{let C;c==null?u._vnode&&(xe(u._vnode,null,null,!0),C=u._vnode.component):g(u._vnode||null,c,u,null,null,null,b),u._vnode=c,ys||(ys=!0,En(C),$o(),ys=!1)},gt={p:g,um:xe,m:Ge,r:yn,mt:vs,mc:Q,pc:W,pbc:we,n:Ht,o:e};return{render:bn,hydrate:void 0,createApp:Wr(bn)}}function Es({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 Ye({effect:e,job:t},s){s?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function ll(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Qo(e,t,s=!1){const n=e.children,o=t.children;if(L(n)&&L(o))for(let i=0;i<n.length;i++){const l=n[i];let a=o[i];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=o[i]=Ve(o[i]),a.el=l.el),!s&&a.patchFlag!==-2&&Qo(l,a)),a.type===cs&&(a.patchFlag!==-1?a.el=l.el:a.__elIndex=i+(e.type===ve?1:0)),a.type===dt&&!a.el&&(a.el=l.el)}}function al(e){const t=e.slice(),s=[0];let n,o,i,l,a;const d=e.length;for(n=0;n<d;n++){const p=e[n];if(p!==0){if(o=s[s.length-1],e[o]<p){t[n]=o,s.push(n);continue}for(i=0,l=s.length-1;i<l;)a=i+l>>1,e[s[a]]<p?i=a+1:l=a;p<e[s[i]]&&(i>0&&(t[n]=s[i-1]),s[i]=n)}}for(i=s.length,l=s[i-1];i-- >0;)s[i]=l,l=t[l];return s}function Xo(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Xo(t)}function Pn(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function Zo(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?Zo(t.subTree):null}const ei=e=>e.__isSuspense;function cl(e,t){t&&t.pendingBranch?L(e)?t.effects.push(...e):t.effects.push(e):vr(e)}const ve=Symbol.for("v-fgt"),cs=Symbol.for("v-txt"),dt=Symbol.for("v-cmt"),Ts=Symbol.for("v-stc"),Tt=[];let ge=null;function dl(e=!1){Tt.push(ge=e?null:[])}function ul(){Tt.pop(),ge=Tt[Tt.length-1]||null}let Rt=1;function On(e,t=!1){Rt+=e,e<0&&ge&&t&&(ge.hasOnce=!0)}function fl(e){return e.dynamicChildren=Rt>0?ge||rt:null,ul(),Rt>0&&ge&&ge.push(e),e}function pl(e,t,s,n,o,i){return fl(r(e,t,s,n,o,i,!0))}function ti(e){return e?e.__v_isVNode===!0:!1}function yt(e,t){return e.type===t.type&&e.key===t.key}const si=({key:e})=>e??null,Wt=({ref:e,ref_key:t,ref_for:s})=>(typeof e=="number"&&(e=""+e),e!=null?Z(e)||ne(e)||j(e)?{i:Ie,r:e,k:t,f:!!s}:e:null);function r(e,t=null,s=null,n=0,o=null,i=e===ve?0:1,l=!1,a=!1){const d={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&si(t),ref:t&&Wt(t),scopeId:Ao,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:i,patchFlag:n,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:Ie};return a?(dn(d,s),i&128&&e.normalize(d)):s&&(d.shapeFlag|=Z(s)?8:16),Rt>0&&!l&&ge&&(d.patchFlag>0||i&6)&&d.patchFlag!==32&&ge.push(d),d}const Ze=hl;function hl(e,t=null,s=null,n=0,o=null,i=!1){if((!e||e===Dr)&&(e=dt),ti(e)){const a=ut(e,t,!0);return s&&dn(a,s),Rt>0&&!i&&ge&&(a.shapeFlag&6?ge[ge.indexOf(e)]=a:ge.push(a)),a.patchFlag=-2,a}if(Cl(e)&&(e=e.__vccOpts),t){t=gl(t);let{class:a,style:d}=t;a&&!Z(a)&&(t.class=qs(a)),X(d)&&(on(d)&&!L(d)&&(d=oe({},d)),t.style=Gs(d))}const l=Z(e)?1:ei(e)?128:kr(e)?64:X(e)?4:j(e)?2:0;return r(e,t,s,n,o,l,i,!0)}function gl(e){return e?on(e)||Wo(e)?oe({},e):e:null}function ut(e,t,s=!1,n=!1){const{props:o,ref:i,patchFlag:l,children:a,transition:d}=e,p=t?ml(o||{},t):o,f={__v_isVNode:!0,__v_skip:!0,type:e.type,props:p,key:p&&si(p),ref:t&&t.ref?s&&i?L(i)?i.concat(Wt(t)):[i,Wt(t)]:Wt(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==ve?l===-1?16:l|16:l,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:d,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&ut(e.ssContent),ssFallback:e.ssFallback&&ut(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return d&&n&&ln(f,d.clone(f)),f}function le(e=" ",t=0){return Ze(cs,null,e,t)}function Te(e){return e==null||typeof e=="boolean"?Ze(dt):L(e)?Ze(ve,null,e.slice()):ti(e)?Ve(e):Ze(cs,null,String(e))}function Ve(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:ut(e)}function dn(e,t){let s=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(L(t))s=16;else if(typeof t=="object")if(n&65){const o=t.default;o&&(o._c&&(o._d=!1),dn(e,o()),o._c&&(o._d=!0));return}else{s=32;const o=t._;!o&&!Wo(t)?t._ctx=Ie:o===3&&Ie&&(Ie.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else j(t)?(t={default:t,_ctx:Ie},s=32):(t=String(t),n&64?(s=16,t=[le(t)]):s=8);e.children=t,e.shapeFlag|=s}function ml(...e){const t={};for(let s=0;s<e.length;s++){const n=e[s];for(const o in n)if(o==="class")t.class!==n.class&&(t.class=qs([t.class,n.class]));else if(o==="style")t.style=Gs([t.style,n.style]);else if(ss(o)){const i=t[o],l=n[o];l&&i!==l&&!(L(i)&&i.includes(l))&&(t[o]=i?[].concat(i,l):l)}else o!==""&&(t[o]=n[o])}return t}function Ce(e,t,s,n=null){Be(e,t,7,[s,n])}const vl=No();let yl=0;function bl(e,t,s){const n=e.type,o=(t?t.appContext:e.appContext)||vl,i={uid:yl++,vnode:e,type:n,parent:t,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new co(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(o.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:zo(n,o),emitsOptions:Vo(n,o),emit:null,emitted:null,propsDefaults:G,inheritAttrs:n.inheritAttrs,ctx:G,data:G,props:G,attrs:G,slots:G,refs:G,setupState:G,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 i.ctx={_:i},i.root=t?t.root:i,i.emit=zr.bind(null,i),e.ce&&e.ce(i),i}let ce=null;const wl=()=>ce||Ie;let es,Hs;{const e=is(),t=(s,n)=>{let o;return(o=e[s])||(o=e[s]=[]),o.push(n),i=>{o.length>1?o.forEach(l=>l(i)):o[0](i)}};es=t("__VUE_INSTANCE_SETTERS__",s=>ce=s),Hs=t("__VUE_SSR_SETTERS__",s=>Pt=s)}const Dt=e=>{const t=ce;return es(e),e.scope.on(),()=>{e.scope.off(),es(t)}},Dn=()=>{ce&&ce.scope.off(),es(null)};function ni(e){return e.vnode.shapeFlag&4}let Pt=!1;function xl(e,t=!1,s=!1){t&&Hs(t);const{props:n,children:o}=e.vnode,i=ni(e);Zr(e,n,i,t),nl(e,o,s||t);const l=i?_l(e,t):void 0;return t&&Hs(!1),l}function _l(e,t){const s=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,jr);const{setup:n}=s;if(n){Pe();const o=e.setupContext=n.length>1?kl(e):null,i=Dt(e),l=Ot(n,e,0,[e.props,o]),a=io(l);if(Oe(),i(),(a||e.sp)&&!Ct(e)&&Ro(e),a){if(l.then(Dn,Dn),t)return l.then(d=>{jn(e,d)}).catch(d=>{rs(d,e,0)});e.asyncDep=l}else jn(e,l)}else oi(e)}function jn(e,t,s){j(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:X(t)&&(e.setupState=Eo(t)),oi(e)}function oi(e,t,s){const n=e.type;e.render||(e.render=n.render||$e);{const o=Dt(e);Pe();try{Lr(e)}finally{Oe(),o()}}}const Sl={get(e,t){return se(e,"get",""),e[t]}};function kl(e){const t=s=>{e.exposed=s||{}};return{attrs:new Proxy(e.attrs,Sl),slots:e.slots,emit:e.emit,expose:t}}function un(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Eo(Co(e.exposed)),{get(t,s){if(s in t)return t[s];if(s in Et)return Et[s](e)},has(t,s){return s in t||s in Et}})):e.proxy}function Cl(e){return j(e)&&"__vccOpts"in e}const El=(e,t)=>ur(e,t,Pt),Tl="3.5.27";/**
14
+ * @vue/runtime-dom v3.5.27
15
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
16
+ * @license MIT
17
+ **/let Ns;const Ln=typeof window<"u"&&window.trustedTypes;if(Ln)try{Ns=Ln.createPolicy("vue",{createHTML:e=>e})}catch{}const ii=Ns?e=>Ns.createHTML(e):e=>e,Il="http://www.w3.org/2000/svg",$l="http://www.w3.org/1998/Math/MathML",Me=typeof document<"u"?document:null,Hn=Me&&Me.createElement("template"),Bl={insert:(e,t,s)=>{t.insertBefore(e,s||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,s,n)=>{const o=t==="svg"?Me.createElementNS(Il,e):t==="mathml"?Me.createElementNS($l,e):s?Me.createElement(e,{is:s}):Me.createElement(e);return e==="select"&&n&&n.multiple!=null&&o.setAttribute("multiple",n.multiple),o},createText:e=>Me.createTextNode(e),createComment:e=>Me.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Me.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,s,n,o,i){const l=s?s.previousSibling:t.lastChild;if(o&&(o===i||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),s),!(o===i||!(o=o.nextSibling)););else{Hn.innerHTML=ii(n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e);const a=Hn.content;if(n==="svg"||n==="mathml"){const d=a.firstChild;for(;d.firstChild;)a.appendChild(d.firstChild);a.removeChild(d)}t.insertBefore(a,s)}return[l?l.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}},Al=Symbol("_vtc");function Fl(e,t,s){const n=e[Al];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}const Nn=Symbol("_vod"),Ml=Symbol("_vsh"),Rl=Symbol(""),Pl=/(?:^|;)\s*display\s*:/;function Ol(e,t,s){const n=e.style,o=Z(s);let i=!1;if(s&&!o){if(t)if(Z(t))for(const l of t.split(";")){const a=l.slice(0,l.indexOf(":")).trim();s[a]==null&&Jt(n,a,"")}else for(const l in t)s[l]==null&&Jt(n,l,"");for(const l in s)l==="display"&&(i=!0),Jt(n,l,s[l])}else if(o){if(t!==s){const l=n[Rl];l&&(s+=";"+l),n.cssText=s,i=Pl.test(s)}}else t&&e.removeAttribute("style");Nn in e&&(e[Nn]=i?n.display:"",e[Ml]&&(n.display="none"))}const Vn=/\s*!important$/;function Jt(e,t,s){if(L(s))s.forEach(n=>Jt(e,t,n));else if(s==null&&(s=""),t.startsWith("--"))e.setProperty(t,s);else{const n=Dl(e,t);Vn.test(s)?e.setProperty(et(n),s.replace(Vn,""),"important"):e[n]=s}}const Un=["Webkit","Moz","ms"],Is={};function Dl(e,t){const s=Is[t];if(s)return s;let n=We(t);if(n!=="filter"&&n in e)return Is[t]=n;n=ro(n);for(let o=0;o<Un.length;o++){const i=Un[o]+n;if(i in e)return Is[t]=i}return t}const Kn="http://www.w3.org/1999/xlink";function Wn(e,t,s,n,o,i=Di(t)){n&&t.startsWith("xlink:")?s==null?e.removeAttributeNS(Kn,t.slice(6,t.length)):e.setAttributeNS(Kn,t,s):s==null||i&&!ao(s)?e.removeAttribute(t):e.setAttribute(t,i?"":ft(s)?String(s):s)}function Jn(e,t,s,n,o){if(t==="innerHTML"||t==="textContent"){s!=null&&(e[t]=t==="innerHTML"?ii(s):s);return}const i=e.tagName;if(t==="value"&&i!=="PROGRESS"&&!i.includes("-")){const a=i==="OPTION"?e.getAttribute("value")||"":e.value,d=s==null?e.type==="checkbox"?"on":"":String(s);(a!==d||!("_value"in e))&&(e.value=d),s==null&&e.removeAttribute(t),e._value=s;return}let l=!1;if(s===""||s==null){const a=typeof e[t];a==="boolean"?s=ao(s):s==null&&a==="string"?(s="",l=!0):a==="number"&&(s=0,l=!0)}try{e[t]=s}catch{}l&&e.removeAttribute(o||t)}function jl(e,t,s,n){e.addEventListener(t,s,n)}function Ll(e,t,s,n){e.removeEventListener(t,s,n)}const zn=Symbol("_vei");function Hl(e,t,s,n,o=null){const i=e[zn]||(e[zn]={}),l=i[t];if(n&&l)l.value=n;else{const[a,d]=Nl(t);if(n){const p=i[t]=Kl(n,o);jl(e,a,p,d)}else l&&(Ll(e,a,l,d),i[t]=void 0)}}const Gn=/(?:Once|Passive|Capture)$/;function Nl(e){let t;if(Gn.test(e)){t={};let n;for(;n=e.match(Gn);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):et(e.slice(2)),t]}let $s=0;const Vl=Promise.resolve(),Ul=()=>$s||(Vl.then(()=>$s=0),$s=Date.now());function Kl(e,t){const s=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=s.attached)return;Be(Wl(n,s.value),t,5,[n])};return s.value=e,s.attached=Ul(),s}function Wl(e,t){if(L(t)){const s=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{s.call(e),e._stopped=!0},t.map(n=>o=>!o._stopped&&n&&n(o))}else return t}const qn=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Jl=(e,t,s,n,o,i)=>{const l=o==="svg";t==="class"?Fl(e,n,l):t==="style"?Ol(e,s,n):ss(t)?Ws(t)||Hl(e,t,s,n,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):zl(e,t,n,l))?(Jn(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Wn(e,t,n,l,i,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!Z(n))?Jn(e,We(t),n,i,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),Wn(e,t,n,l))};function zl(e,t,s,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&qn(t)&&j(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 o=e.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="SOURCE")return!1}return qn(t)&&Z(s)?!1:t in e}const Gl=oe({patchProp:Jl},Bl);let Yn;function ql(){return Yn||(Yn=il(Gl))}const Yl=(...e)=>{const t=ql().createApp(...e),{mount:s}=t;return t.mount=n=>{const o=Xl(n);if(!o)return;const i=t._component;!j(i)&&!i.render&&!i.template&&(i.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const l=s(o,!1,Ql(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),l},t};function Ql(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Xl(e){return Z(e)?document.querySelector(e):e}/*!
18
+ * pinia v2.3.1
19
+ * (c) 2025 Eduardo San Martin Morote
20
+ * @license MIT
21
+ */const Zl=Symbol();var Qn;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(Qn||(Qn={}));function ea(){const e=ji(!0),t=e.run(()=>ir({}));let s=[],n=[];const o=Co({install(i){o._a=i,i.provide(Zl,o),i.config.globalProperties.$pinia=o,n.forEach(l=>s.push(l)),n=[]},use(i){return this._a?s.push(i):n.push(i),this},_p:s,_a:null,_e:e,_s:new Map,state:t});return o}function ta(e){let t=0;for(let n=0;n<e.length;n++)t=e.charCodeAt(n)+((t<<5)-t);return`hsl(${Math.abs(t)%360}, 70%, 45%)`}function sa(e){if(!e)return"";let t=e.replace(/^(feat|chore|docs|fix|refactor|style|test|perf|ci|build)(\(.*\))?!?:?\s*/i,"");return t.charAt(0).toUpperCase()+t.slice(1)}function Vs(e){if(!e)return"";const t=document.createElement("div");return t.textContent=e,t.innerHTML}function na(e,t){if(!t||!e)return Vs(e);const s=Vs(e);try{const n=new RegExp(`(${t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})`,"gi");return s.replace(n,'<span class="highlight">$1</span>')}catch{return s}}function oa(e){const t=Math.floor((new Date-e)/1e3);if(t<60)return"Just now";const s=Math.floor(t/60);if(s<60)return s+"m";const n=Math.floor(s/60);return n<24?n+"h":Math.floor(n/24)+"d"}function ia(e,t="success"){const s=document.querySelector(".toast");s&&s.remove();const n=document.createElement("div");n.className=`toast ${t}`,n.textContent=e,document.body.appendChild(n),setTimeout(()=>n.remove(),3e3)}function ra(){const e=document.querySelector(".sidebar"),t=document.querySelector(".sidebar-overlay");e.classList.toggle("open"),t.classList.toggle("open")}function la(){"Notification"in window&&Notification.permission==="default"&&Notification.requestPermission()}function aa(e,t={}){"Notification"in window&&Notification.permission==="granted"&&new Notification(e,t)}window.toggleSidebar=ra;function ca(e){const t=document.getElementById(e);t&&(t.classList.add("open"),document.body.style.overflow="hidden")}function da(e){const t=document.getElementById(e);t&&(t.classList.remove("open"),document.body.style.overflow="")}window.openModal=ca;window.closeModal=da;Object.assign(window,{stringToColor:ta,cleanTitle:sa,escapeHtml:Vs,highlightText:na,timeSince:oa,showToast:ia,requestNotificationPermission:la,notify:aa});const ee="";function fn(){const e=window.location.hostname;return e==="localhost"||e==="127.0.0.1"?"http://localhost:8003/api/cli":"https://api.repr.dev/api/cli"}async function te(e,t={},s=2){for(let n=0;n<=s;n++)try{const o=await fetch(e,t);if(!o.ok&&n<s){await new Promise(i=>setTimeout(i,1e3*(n+1)));continue}return o}catch(o){if(n===s)throw o;await new Promise(i=>setTimeout(i,1e3*(n+1)))}}async function ua(){try{return await(await te(`${ee}/api/status`)).json()}catch(e){throw console.error("Failed to fetch status:",e),e}}async function fa(){try{return await(await te(`${ee}/api/stories`)).json()}catch(e){throw console.error("Failed to fetch stories:",e),e}}async function pa(){try{return await(await te(`${ee}/api/config`)).json()}catch(e){throw console.error("Failed to fetch config:",e),e}}async function ha(e){try{const t=await te(`${ee}/api/config`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw new Error("Failed to save config");return await t.json()}catch(t){throw console.error("Failed to update config:",t),t}}async function ga(){try{return await(await te(`${ee}/api/repos`)).json()}catch(e){throw console.error("Failed to fetch repos:",e),e}}async function ma(e){try{return await(await te(`${ee}/api/repos/add`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e})})).json()}catch(t){throw console.error("Failed to add repo:",t),t}}async function va(e){try{return await(await te(`${ee}/api/repos/remove`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e})})).json()}catch(t){throw console.error("Failed to remove repo:",t),t}}async function ya(e){try{return await(await te(`${ee}/api/repos/pause`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e})})).json()}catch(t){throw console.error("Failed to pause repo:",t),t}}async function ba(e){try{return await(await te(`${ee}/api/repos/resume`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e})})).json()}catch(t){throw console.error("Failed to resume repo:",t),t}}async function wa(e,t){try{return await(await te(`${ee}/api/repos/rename`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e,name:t})})).json()}catch(s){throw console.error("Failed to rename repo:",s),s}}async function xa(){try{return await(await te(`${ee}/api/cron`)).json()}catch(e){throw console.error("Failed to fetch cron status:",e),e}}async function _a(){try{return await(await te(`${ee}/api/generate`,{method:"POST"})).json()}catch(e){throw console.error("Failed to trigger generation:",e),e}}async function Sa(){try{return await(await te(`${ee}/api/auth`)).json()}catch(e){throw console.error("Failed to fetch auth status:",e),e}}async function ka(){try{const e=await fetch(`${fn()}/device-code`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({client_id:"repr-cli"})});if(!e.ok)throw new Error(`HTTP ${e.status}: ${e.statusText}`);const t=await e.json();return{status:"pending",device_code:t.device_code,user_code:t.user_code,verification_url:t.verification_url,expires_in:t.expires_in,interval:t.interval||5}}catch(e){throw console.error("Failed to start login:",e),e}}async function Ca(e){var t;try{const s=await fetch(`${fn()}/token`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({device_code:e,client_id:"repr-cli",device_id:ri(),device_name:li()})});if(s.status===200){const n=await s.json();return{status:"completed",access_token:n.access_token,user:n.user,litellm_api_key:n.litellm_api_key}}if(s.status===400){const n=await s.json(),o=n.error||((t=n.detail)==null?void 0:t.error)||"unknown";return o==="authorization_pending"?{status:"pending",message:"Waiting for authorization"}:o==="slow_down"?{status:"pending",message:"Slow down"}:o==="expired_token"?{status:"expired",message:"Device code expired"}:o==="access_denied"?{status:"denied",message:"Authorization denied"}:{status:"error",message:`Authorization failed: ${o}`}}return{status:"error",message:`Unexpected status: ${s.status}`}}catch(s){return console.error("Failed to poll login status:",s),{status:"error",message:s.message}}}async function Ea(e){try{return await(await te(`${ee}/api/auth/save`,{method:"POST",body:JSON.stringify(e)})).json()}catch(t){throw console.error("Failed to save auth token:",t),t}}async function Ta(){return{success:!0}}async function Ia(){try{return await(await te(`${ee}/api/auth/logout`,{method:"POST"})).json()}catch(e){throw console.error("Failed to logout:",e),e}}function ri(){let e=localStorage.getItem("repr_device_id");return e||(e="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){const s=Math.random()*16|0;return(t==="x"?s:s&3|8).toString(16)}),localStorage.setItem("repr_device_id",e)),e}function li(){return`Dashboard (${navigator.platform||"Web"})`}async function $a(){try{return await(await te(`${ee}/api/username`)).json()}catch(e){throw console.error("Failed to fetch username info:",e),e}}async function Ba(e){try{return await(await te(`${ee}/api/username/claim`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:e})})).json()}catch(t){throw console.error("Failed to claim username:",t),t}}Object.assign(window,{API_BASE:ee,getReprApiBase:fn,fetchWithRetry:te,getStatus:ua,getStories:fa,getConfig:pa,updateConfig:ha,getRepos:ga,addRepo:ma,removeRepo:va,pauseRepo:ya,resumeRepo:ba,renameRepo:wa,getCronStatus:xa,triggerGeneration:_a,getAuthStatus:Sa,startLogin:ka,pollLoginStatus:Ca,saveAuthToken:Ea,cancelLogin:Ta,logout:Ia,getUsernameInfo:$a,claimUsername:Ba,getDeviceId:ri,getDeviceName:li});class ai{constructor(){this.state={stories:[],repos:[],config:null,cronStatus:null,currentRepo:"all",searchQuery:"",currentMainView:"stories",currentSettingsTab:"form",configDirty:!1,previousView:"view-main"},this.subscribers=[]}get(t){return t?this.state[t]:this.state}update(t,s){const n=this.state[t];this.state[t]=s,this.subscribers.forEach(o=>o(t,s,n))}batchUpdate(t){Object.entries(t).forEach(([s,n])=>{this.state[s]=n}),this.subscribers.forEach(s=>s("batch",t,null))}subscribe(t){return this.subscribers.push(t),()=>{const s=this.subscribers.indexOf(t);s>-1&&this.subscribers.splice(s,1)}}reset(){this.state={stories:[],repos:[],config:null,cronStatus:null,currentRepo:"all",searchQuery:"",currentMainView:"stories",currentSettingsTab:"form",configDirty:!1,previousView:"view-main"},this.subscribers.forEach(t=>t("reset",this.state,null))}}const It=new ai;It.initRouter=function(){window.addEventListener("popstate",e=>{const t=e.state;if(!t){It.update("currentMainView","stories"),switchMainView("stories",!1),Xn();return}t.view==="detail"&&t.storyId?It.get("stories").find(o=>o.id===t.storyId)&&openStory(null,t.storyId,!1):t.view==="profile"&&t.repoName?openProfile(null,t.repoName,!1):t.view==="user"&&t.authorName?openUser(null,t.authorName,t.authorEmail||"",!1):t.view==="main"&&(Xn(),t.mainView&&switchMainView(t.mainView,!1))})};It.pushHistory=function(e,t,s){history.pushState(e,t,s)};function Xn(){document.getElementById("view-main").style.display=""}window.store=It;window.State=ai;const Us="repr-dashboard-theme";function Aa(){const e=localStorage.getItem(Us);if(e)$t(e);else{const t=window.matchMedia("(prefers-color-scheme: dark)").matches;$t(t?"dark":"light")}window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",t=>{localStorage.getItem(Us)||$t(t.matches?"dark":"light")})}function $t(e){document.documentElement.setAttribute("data-theme",e),ci(e)}function Fa(){const t=document.documentElement.getAttribute("data-theme")==="dark"?"light":"dark";$t(t),localStorage.setItem(Us,t),showToast(`${t==="dark"?"Dark":"Light"} mode enabled`,"success")}function Ma(){return document.documentElement.getAttribute("data-theme")||"light"}function ci(e){const t=document.getElementById("theme-toggle");if(t){const s=t.querySelector(".theme-toggle-icon");s&&(s.textContent=e==="dark"?"☀":"☾")}}window.toggleTheme=Fa;Object.assign(window,{initTheme:Aa,setTheme:$t,getTheme:Ma,updateThemeToggleIcon:ci});let me=-1,ts=!1;function Ra(){document.addEventListener("keydown",Pa)}function Pa(e){if((e.metaKey||e.ctrlKey)&&e.key==="k"){e.preventDefault(),Zn();return}if(e.target.tagName==="INPUT"||e.target.tagName==="TEXTAREA"){if(e.key==="Escape"){e.target.blur();return}return}if(ts){(e.key==="Escape"||e.key==="?")&&(ui(),e.preventDefault());return}switch(e.key){case"/":e.preventDefault(),Zn();break;case"j":e.preventDefault(),Oa();break;case"k":e.preventDefault(),Da();break;case"Enter":me>=0&&(e.preventDefault(),ja());break;case"Escape":e.preventDefault(),La();break;case"r":case"R":e.preventDefault(),refreshStories();break;case"?":e.preventDefault(),Ha();break}}function Zn(){const e=document.getElementById("search-input");e&&(e.focus(),showToast("Search focused (type to filter, Esc to clear)","success"))}function Oa(){const e=ds();e.length&&(me=Math.min(me+1,e.length-1),di(e))}function Da(){const e=ds();e.length&&(me=Math.max(me-1,0),di(e))}function ds(){return Array.from(document.querySelectorAll(".post-card"))}function di(e){e.forEach((t,s)=>{t.classList.toggle("selected",s===me),s===me&&t.scrollIntoView({behavior:"smooth",block:"center"})})}function ja(){const e=ds();if(me>=0&&me<e.length){const s=e[me].id.replace("post-","");s&&openStory({stopPropagation:()=>{}},s)}}function La(){const e=document.getElementById("view-detail"),t=document.getElementById("view-profile");if((e==null?void 0:e.style.display)!=="none"||(t==null?void 0:t.style.display)!=="none"){goBack();return}const s=document.getElementById("search-input");if(s&&s.value){s.value="",store.update("searchQuery",""),filterAndRenderStories();return}me>=0&&(me=-1,ds().forEach(o=>o.classList.remove("selected")))}function Ha(){if(ts)return;ts=!0;const e=document.createElement("div");e.id="keyboard-shortcuts-modal",e.className="keyboard-modal",e.innerHTML=`
22
+ <div class="keyboard-modal-backdrop" onclick="hideKeyboardShortcuts()"></div>
23
+ <div class="keyboard-modal-content">
24
+ <div class="keyboard-modal-header">
25
+ <h3>Keyboard Shortcuts</h3>
26
+ <button class="keyboard-modal-close" onclick="hideKeyboardShortcuts()">×</button>
27
+ </div>
28
+ <div class="keyboard-shortcuts-list">
29
+ <div class="shortcut-row">
30
+ <kbd>/</kbd>
31
+ <span>Focus search</span>
32
+ </div>
33
+ <div class="shortcut-row">
34
+ <kbd>j</kbd>
35
+ <span>Next story</span>
36
+ </div>
37
+ <div class="shortcut-row">
38
+ <kbd>k</kbd>
39
+ <span>Previous story</span>
40
+ </div>
41
+ <div class="shortcut-row">
42
+ <kbd>Enter</kbd>
43
+ <span>Open selected story</span>
44
+ </div>
45
+ <div class="shortcut-row">
46
+ <kbd>Esc</kbd>
47
+ <span>Close / Clear search / Reset</span>
48
+ </div>
49
+ <div class="shortcut-row">
50
+ <kbd>r</kbd>
51
+ <span>Refresh stories</span>
52
+ </div>
53
+ <div class="shortcut-row">
54
+ <kbd>?</kbd>
55
+ <span>Show this help</span>
56
+ </div>
57
+ </div>
58
+ </div>
59
+ `,document.body.appendChild(e)}function ui(){const e=document.getElementById("keyboard-shortcuts-modal");e&&(e.remove(),ts=!1)}Object.assign(window,{initKeyboard:Ra,hideKeyboardShortcuts:ui});const Bs=[{id:"mock-new-1",repo_name:"repr",author_name:"Mendrika Ramarlina",handle:"pumpfun-trader",verified:!0,signature_status:"all_verified",signed_count:5,total_commits:5,category:"feature",title:"Integrate real-time monitoring system with 6-stage pipeline",problem:"The system lacked real-time market tracking and structured lifecycle management for tokens beyond the initial screening phase.",approach:`Before:
60
+ [Screening]
61
+
62
+ After:
63
+ [Helius WS] --> [Bonding Stream]
64
+ |
65
+ v
66
+ [SQLite DB] <--- [Monitor Service]
67
+ |
68
+ v
69
+ [Dashboard] <--- [Socket.io]`,created_at:new Date(Date.now()-1e3*60*60*24).toISOString(),technologies:["websockets","socket.io","sqlite"],diagram:"const STAGES = ['screening', 'monitoring', 'post-graduation', 'entry-watch', 'holding', 'dropped'];",files:["src/monitor.ts","src/pipeline.ts"]},{id:"mock-new-2",repo_name:"repr-dashboard",author_name:"Mendrika Ramarlina",handle:"pumpfun-trader",verified:!0,category:"feature",title:"SSE-powered screening dashboard",problem:"The long-running screening process was opaque, and there was no interface to view enriched data.",created_at:new Date(Date.now()-1e3*60*60*25).toISOString(),technologies:["server-sent-events(sse)","express.js","rest-api"],files:["dashboard/server.js"]},{id:"mock-1",repo_name:"cli",author_name:"mendrika",verified:!0,signature_status:"all_verified",signed_count:3,total_commits:3,category:"feature",title:"Restore dashboard diff functionality and improve branch suggestions",problem:"The dashboard lacked diff visualization, and internal models required refactoring to support better branch suggestions.",approach:"Executed a refactor of core data models and synthesis logic to improve code representation, then restored the diff view in the dashboard.",created_at:new Date(Date.now()-1e3*60*60*2).toISOString(),technologies:["Python","SQLite","Jinja2"],lessons:["Separating the 'Synthesis' logic from the 'Presentation' logic made the diff rendering 3x faster."],files:["src/dashboard.py","templates/index.html"],implementation_details:["Refactored `DiffGenerator` class to handle binary files gracefully.","Updated Jinja2 templates to loop through file deltas.","Added caching layer for diffs larger than 1MB."],key_snippets:[{file_path:"src/dashboard.py",line_count:15,content:`def get_diff(self, file_path):
70
+ # Check cache first
71
+ if file_path in self.cache:
72
+ return self.cache[file_path]
73
+
74
+ # Generate diff
75
+ diff = git.diff(file_path)
76
+ return diff`}]},{id:"mock-2",repo_name:"repr",author_name:"johndoe",verified:!1,signature_status:"unsigned",signed_count:0,total_commits:2,category:"chore",title:"docs: update CLI usage messages for clarity",problem:"The previous usage messages were too generic and lacked context for specific arguments.",approach:"Updated help strings in Typer/Click definitions to include examples.",created_at:new Date(Date.now()-1e3*60*60*5).toISOString(),technologies:["Python","Typer"],files:["cli/main.py"]},{id:"mock-3",repo_name:"agent-core",author_name:"alice",verified:!1,signature_status:"partially_signed",signed_count:2,total_commits:4,category:"bugfix",title:"Fix memory leak in background worker",problem:"The worker process was consuming increasing RAM over long execution periods.",approach:"Identified a circular reference in the Task object. Implemented weak references for parent links.",created_at:new Date(Date.now()-1e3*60*60*24).toISOString(),technologies:["Rust","Tokio"],diagram:`Task -> (strong) -> Context -> (strong) -> Task [LEAK]
77
+
78
+ Fix:
79
+ Task -> (strong) -> Context -> (weak) -> Task`}];async function fi(){Ya();try{const[i,l]=await Promise.all([getStatus(),getStories(),window.loadRepos?window.loadRepos():Promise.resolve()]);document.getElementById("status-text").innerText=`${i.count} stories · ${i.repos} repos`,store.update("stories",l.stories),eo(l.stories,i.repos)}catch(i){console.warn("Using mock data:",i),store.update("stories",Bs),document.getElementById("status-text").innerText=`${Bs.length} stories · Demo Mode`,eo(Bs,3)}Ua(),Na(),us(),store.initRouter&&store.initRouter();const e=new URLSearchParams(window.location.search),t=e.get("view"),s=e.get("profile"),n=e.get("user"),o=e.get("story");o?pi(null,o,!1):s?hi(null,s,!1):n?gi(null,decodeURIComponent(n),"",!1):t&&["stories","settings","llm","privacy","repos","cron"].includes(t)&&switchMainView(t,!1)}function eo(e,t){const s=document.getElementById("stat-total-stories"),n=document.getElementById("stat-total-repos");s&&(s.textContent=e.length),n&&(n.textContent=t)}function Na(){const e=document.getElementById("recommended-repos");if(!e)return;const t=store.get("repos")||[],s=document.getElementById("show-more-repos-btn");if(t.length===0){e.innerHTML='<div class="loading-text">No repositories tracked</div>',s&&(s.style.display="none");return}const n=[...t].sort((o,i)=>{var d,p;const l=((d=o.project)==null?void 0:d.name)||o.path.split("/").pop(),a=((p=i.project)==null?void 0:p.name)||i.path.split("/").pop();return l.localeCompare(a)});s&&(s.style.display=n.length>3?"block":"none",e.classList.remove("expanded"),s.textContent="Show more"),e.innerHTML=n.map(o=>{var f;const i=((f=o.project)==null?void 0:f.name)||o.origin_name||o.path.split("/").pop(),l=stringToColor(i),a=i.substring(0,1).toUpperCase(),p=(store.get("stories")||[]).filter(w=>w.repo_name===i).length;return`
80
+ <div class="widget-item" onclick="openProfile(event, '${escapeHtml(i)}')">
81
+ <div class="widget-item-avatar" style="background: ${l}">${a}</div>
82
+ <div class="widget-item-info">
83
+ <div class="widget-item-name">${escapeHtml(i)}</div>
84
+ <div class="widget-item-subtitle">${p} stories</div>
85
+ </div>
86
+ </div>
87
+ `}).join("")}function Va(){const e=document.getElementById("recommended-repos"),t=document.getElementById("show-more-repos-btn");!e||!t||(e.classList.toggle("expanded"),e.classList.contains("expanded")?t.textContent="Show less":t.textContent="Show more")}function Ua(){const e=document.getElementById("repo-tabs");if(!e)return;store.get("stories");const t={};let s='<div class="repo-tab active" data-repo="all">All</div>';Object.entries(t).sort((n,o)=>o[1]-n[1]).forEach(([n,o])=>{s+=`<div class="repo-tab" data-repo="${n}">${n}</div>`}),e.innerHTML=s,e.querySelectorAll(".repo-tab").forEach(n=>{n.onclick=()=>{e.querySelectorAll(".repo-tab").forEach(o=>o.classList.remove("active")),n.classList.add("active"),store.update("currentRepo",n.dataset.repo),us()}})}function us(){const e=store.get("stories"),t=store.get("currentRepo"),s=store.get("searchQuery");let n=e;t!=="all"&&(n=n.filter(o=>o.repo_name===t)),s&&(n=n.filter(o=>[o.title,o.repo_name,o.category,o.post_body,o.problem,o.approach,...o.technologies||[],...o.files||[]].join(" ").toLowerCase().includes(s))),fs(n)}function Ka(e){const t=new Date,s=new Date(e),n=new Date(t.getFullYear(),t.getMonth(),t.getDate()),o=new Date(s.getFullYear(),s.getMonth(),s.getDate()),i=Math.floor((n-o)/(1e3*60*60*24));if(i===0)return"Today";if(i===1)return"Yesterday";if(i<7)return"This Week";const l={month:"short",day:"numeric"};return s.getFullYear()!==t.getFullYear()&&(l.year="numeric"),s.toLocaleDateString("en-US",l)}function Wa(e){const t={};e.forEach(o=>{const i=o.started_at||o.created_at,l=Ka(i);t[l]||(t[l]=[]),t[l].push(o)});const s=["Today","Yesterday","This Week"],n=Object.keys(t).sort((o,i)=>{const l=s.indexOf(o),a=s.indexOf(i);return l!==-1&&a!==-1?l-a:l!==-1?-1:a!==-1?1:new Date(t[i][0].started_at||t[i][0].created_at)-new Date(t[o][0].started_at||t[o][0].created_at)});return{groups:t,labels:n}}function fs(e,t="feed",s={}){const n=document.getElementById(t),o=store.get("searchQuery");if(!e||!e.length){o?n.innerHTML=`
88
+ <div class="empty-state">
89
+ <div class="empty-state-title">No matches found</div>
90
+ <div style="font-size: 14px;">Try adjusting your search query or filters</div>
91
+ <button class="btn btn-secondary" onclick="document.getElementById('search-input').value=''; store.update('searchQuery', ''); filterAndRenderStories();" style="margin-top: 16px;">Clear Search</button>
92
+ </div>`:n.innerHTML=`
93
+ <div class="empty-state">
94
+ <div class="empty-state-title">Your timeline is empty</div>
95
+ <div style="font-size: 14px;">Run your first generation to see your development story</div>
96
+ <button class="btn btn-primary" onclick="triggerGenerationClick()" style="margin-top: 16px;">Generate Now</button>
97
+ </div>`;return}if(o){n.innerHTML=e.map(d=>to(d,o,s)).join("");return}const{groups:i,labels:l}=Wa(e);let a="";l.forEach(d=>{const p=i[d];a+=`
98
+ <div class="date-header">
99
+ <span class="date-header-label">${d}</span>
100
+ </div>
101
+ ${p.map(f=>to(f,o,s)).join("")}
102
+ `}),n.innerHTML=a}function to(e,t,s={}){const n=timeSince(new Date(e.started_at||e.created_at)),o=e.category||"chore",i=e.repo_name||"cli";let l=e.author_name||e.username||"unknown";const a=e.verified||!1;highlightText(cleanTitle(e.title),t),e.post_body&&highlightText(e.post_body,t);const d=e.problem?highlightText(e.problem,t):"",p=e.approach?highlightText(e.approach,t):"";let f=stringToColor(l),w=l.substring(0,1).toUpperCase(),T=highlightText(l,t),m=e.handle?`/r/${e.handle}`:`/r/${i}`;const h=a?'<span class="verified-badge" title="GPG signed commits">✓</span>':"",g=e.author_email||"",x=g?pn(g,80):null,y=x?`<img src="${x}" alt="${escapeHtml(l)}" style="width:100%;height:100%;border-radius:50%;object-fit:cover;">`:w,v=[];e.technologies&&e.technologies.length&&e.technologies.slice(0,3).forEach(q=>v.push(q.toLowerCase().replace(/\s+/g,"")));const F=v.length?v.map(q=>`<span class="hashtag" onclick="filterByTag(event, '${q}')">#${highlightText(q,t)}</span>`).join(" "):"",E=p||d;let O="";return e.diagram&&(O+=`<div class="post-media"><pre class="post-diagram">${escapeHtml(e.diagram)}</pre></div>`),e.show&&(O+=`<div class="post-media"><pre class="post-output">${escapeHtml(e.show)}</pre></div>`),`
103
+ <article class="post-card" id="post-${e.id}" onclick="openStory(event, '${e.id}')">
104
+ <div class="post-card-header">
105
+ <div class="post-avatar" style="background:${x?"transparent":f}; cursor: pointer;" onclick="openUser(event, '${escapeHtml(e.author_name||l)}', '${escapeHtml(g)}')">${y}</div>
106
+ <div class="post-header-info">
107
+ <div class="post-header-author">
108
+ <span class="post-author" onclick="openUser(event, '${escapeHtml(e.author_name||l)}', '${escapeHtml(e.author_email||"")}')">${T}${h}</span>
109
+ <span class="post-meta-sep">·</span>
110
+ <span class="post-handle" onclick="openProfile(event, '${i}')">${m}</span>
111
+ <span class="post-meta-sep">·</span>
112
+ <span class="category-meta ${o}">${o}</span>
113
+ <span class="post-meta-sep">·</span>
114
+ <span class="post-time">${n}</span>
115
+ </div>
116
+ </div>
117
+ </div>
118
+
119
+ <div class="post-content-full">
120
+ <div class="post-text">${E?`${E}`:""}</div>
121
+ ${O}
122
+ ${F?`<div class="post-tags">${F}</div>`:""}
123
+ <div class="post-actions">
124
+ <div class="post-action" title="Comment">
125
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
126
+ <path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path>
127
+ </svg>
128
+ <span></span>
129
+ </div>
130
+ <div class="post-action" title="Repost">
131
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
132
+ <polyline points="17 1 21 5 17 9"></polyline>
133
+ <path d="M3 11V9a4 4 0 0 1 4-4h14"></path>
134
+ <polyline points="7 23 3 19 7 15"></polyline>
135
+ <path d="M21 13v2a4 4 0 0 1-4 4H3"></path>
136
+ </svg>
137
+ </div>
138
+ <div class="post-action" title="Like">
139
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
140
+ <path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"></path>
141
+ </svg>
142
+ </div>
143
+ <div class="post-action" title="Share">
144
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
145
+ <path d="M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8"></path>
146
+ <polyline points="16 6 12 2 8 6"></polyline>
147
+ <line x1="12" y1="2" x2="12" y2="15"></line>
148
+ </svg>
149
+ </div>
150
+ </div>
151
+ </div>
152
+ </article >
153
+ `}function pi(e,t,s=!0){const o=store.get("stories").find(D=>D.id===t);if(!o)return;s&&(window.lastScrollY=window.scrollY,document.getElementById("view-profile").style.display==="block"?store.update("previousView","view-profile"):document.getElementById("view-user").style.display==="block"?store.update("previousView","view-user"):store.update("previousView","view-main"),store.pushHistory({view:"detail",storyId:t},`Repr - ${cleanTitle(o.title)} `,` ? story = ${t} `)),["stories","settings","llm","privacy","repos","cron","profile","user"].forEach(D=>{const Q=document.getElementById("view-"+D);Q&&(Q.style.display="none")}),document.getElementById("view-detail").style.display="block",window.scrollTo(0,0);const i=document.getElementById("detail-content"),l=timeSince(new Date(o.started_at||o.created_at)),a=o.category||"update",d=o.repo_name||"cli",p=o.author_name||o.username||"unknown",f=o.verified||!1,w=cleanTitle(o.title),T=f?'<span class="verified-badge" title="GPG signed commits">✓</span>':"";o.signature_status&&(f||o.signature_status,o.signed_count!==void 0&&`${o.signed_count}${o.total_commits}`),o.technologies&&o.technologies.length&&`${o.technologies.map(D=>`<span class="skill-tag">${escapeHtml(D)}</span>`).join("")}`;const m=o.show?`<div class="snippet-block" style="margin-top:16px"><div class="snippet-header">Output</div><div class="snippet-code"><pre>${escapeHtml(o.show)}</pre></div></div>`:"",h=o.diagram?`<div class="diagram-block"><pre>${escapeHtml(o.diagram)}</pre></div>`:"",g=o.files&&o.files.length?`<div class="section-subtitle">Files Touched</div>
154
+ <div class="files-row">
155
+ ${o.files.map(D=>`<span class="file-tag">${escapeHtml(D.split("/").pop())}</span>`).join("")}
156
+ </div>`:"",x=o.key_snippets&&o.key_snippets.length?`<div class="section-subtitle">Key Snippets</div>
157
+ ${o.key_snippets.map(D=>`
158
+ <div class="snippet-block">
159
+ <div class="snippet-header">${escapeHtml(D.file_path)}</div>
160
+ <div class="snippet-code"><pre>${escapeHtml(D.content)}</pre></div>
161
+ </div>
162
+ `).join("")} `:"",y=o.file_changes&&o.file_changes.length?`<div class="section-subtitle">File Changes</div>
163
+ <ul style="padding-left:16px; color:var(--text-secondary); font-size:15px; margin-bottom: 24px; list-style: none;">
164
+ ${o.file_changes.map(D=>{const Q=D.file_path||D.path||"unknown",tt=D.change_type||"modified",we=D.insertions||0,Le=D.deletions||0,Ae=[];we>0&&Ae.push(`<span style="color: var(--green);">+${we}</span>`),Le>0&&Ae.push(`<span style="color: var(--red);">-${Le}</span>`);const st=Ae.length>0?Ae.join("/"):"0 changes";return`<li style="margin-bottom: 4px; font-family: var(--font-mono); font-size: 13px;">
165
+ <span style="color: var(--text-muted);">[${tt}]</span> ${escapeHtml(Q.split("/").pop())}
166
+ <span style="margin-left: 8px; font-size: 12px;">${st}</span>
167
+ </li>`}).join("")}
168
+ </ul>`:"",v=stringToColor(p),F=p.substring(0,2).toUpperCase(),E=o.author_email||"",O=pn(E,96),q=O?`<img src="${O}" alt="${escapeHtml(p)}" style="width:100%;height:100%;border-radius:50%;object-fit:cover;">`:F;i.innerHTML=`
169
+ <div class="post-detail" >
170
+ <div class="post-detail-header">
171
+ <div class="post-avatar" style="background:${O?"transparent":v}; width: 48px; height: 48px; font-size: 18px;" onclick="openUser(event, '${escapeHtml(p)}', '${escapeHtml(E)}')">${q}</div>
172
+ <div class="post-detail-author-info">
173
+ <div class="post-author" onclick="openUser(event, '${escapeHtml(p)}', '${escapeHtml(E)}')" style="font-size: 16px;">${escapeHtml(p)}${T}</div>
174
+ <div class="post-handle" onclick="openProfile(event, '${d}')" style="font-size: 15px;">@${d} · ${l}</div>
175
+ </div>
176
+ <div class="post-detail-category">
177
+ <span class="category ${a}">${a}</span>
178
+ </div>
179
+ </div>
180
+
181
+ <div class="post-detail-body">
182
+ <h1 class="post-detail-title">${escapeHtml(w)}</h1>
183
+ ${o.what?`<div class="section-subtitle">What</div><div class="post-detail-text" style="font-size: 16px; margin-bottom: 24px;">${escapeHtml(o.what)}</div>`:""}
184
+ ${o.value?`<div class="section-subtitle">Value</div><div class="post-detail-text" style="font-size: 16px; margin-bottom: 24px;">${escapeHtml(o.value)}</div>`:""}
185
+
186
+ ${o.decisions&&o.decisions.length?`
187
+ <div class="section-subtitle">Decisions</div>
188
+ <ul class="detail-list" style="margin-bottom: 24px;">
189
+ ${o.decisions.map(D=>`<li>${escapeHtml(D)}</li>`).join("")}
190
+ </ul>
191
+ `:""}
192
+
193
+ ${o.problem?`<div class="post-detail-text" style="font-size: 16px; color: var(--text-primary); margin-bottom: 24px;">${escapeHtml(o.problem)}</div>`:""}
194
+ ${o.post_body?`<div class="post-detail-text" style="font-size: 16px; color: var(--text-primary); margin-bottom: 24px; line-height: 1.6;">${escapeHtml(o.post_body)}</div>`:""}
195
+
196
+ ${o.insight?`
197
+ <div class="insight-box" style="margin-top: 24px;">
198
+ <div class="insight-label">Insight</div>
199
+ <div class="insight-text">${escapeHtml(o.insight)}</div>
200
+ </div>
201
+ `:""}
202
+
203
+ ${m}
204
+ ${h}
205
+
206
+ ${o.lessons&&o.lessons.length?`
207
+ <div class="insight-box" style="margin-top: 32px;">
208
+ <div class="insight-label">Key Insight</div>
209
+ ${o.lessons.map(D=>`<div class="insight-text">${escapeHtml(D)}</div>`).join("")}
210
+ </div>
211
+ `:""}
212
+
213
+ ${o.implementation_details&&o.implementation_details.length?`
214
+ <div class="section-subtitle">Implementation</div>
215
+ <ul class="detail-list">
216
+ ${o.implementation_details.map(D=>`<li>${escapeHtml(D)}</li>`).join("")}
217
+ </ul>
218
+ `:""}
219
+
220
+ ${g}
221
+ ${x}
222
+ ${y}
223
+ </div>
224
+
225
+ <div class="post-detail-footer">
226
+ <div class="post-actions" style="max-width: none; border-top: 1px solid var(--border); padding-top: 12px; margin-top: 32px;">
227
+ <!-- Same actions as card -->
228
+ <div class="post-action">
229
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z"/></svg>
230
+ <span>${o.total_commits||""}</span>
231
+ </div>
232
+ <div class="post-action"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="17 1 21 5 17 9"></polyline><path d="M3 11V9a4 4 0 0 1 4-4h14"></path><polyline points="7 23 3 19 7 15"></polyline><path d="M21 13v2a4 4 0 0 1-4 4H3"></path></svg></div>
233
+ <div class="post-action"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"></path></svg></div>
234
+ <div class="post-action"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8"></path><polyline points="16 6 12 2 8 6"></polyline><line x1="12" y1="2" x2="12" y2="15"></line></svg></div>
235
+ </div>
236
+ </div>
237
+ </div>
238
+ `}function hi(e,t,s=!0){e&&e.stopPropagation(),s&&(window.lastScrollY=window.scrollY,store.update("previousView","view-profile"),store.pushHistory({view:"profile",repoName:t},`Repr - @${t} `,` ? profile = ${t} `)),["stories","settings","llm","privacy","repos","cron","detail","user"].forEach(h=>{const g=document.getElementById("view-"+h);g&&(g.style.display="none")}),document.getElementById("view-profile").style.display="block",window.scrollTo(0,0);const n=stringToColor(t),o=t.substring(0,1).toUpperCase(),i=document.getElementById("profile-view-avatar");i.style.background=n,i.textContent=o,document.getElementById("profile-view-name").textContent=t,document.getElementById("profile-nav-name").textContent=t,document.getElementById("profile-view-handle").textContent="@"+t;const l=Math.abs(stringToColor(t+"1").hashCode()||0)%360,a=Math.abs(stringToColor(t+"2").hashCode()||0)%360;document.getElementById("profile-cover").style.background=`linear - gradient(135deg, hsl(${l}, 70 %, 80 %) 0 %, hsl(${a}, 70 %, 85 %) 100 %)`;const p=store.get("stories").filter(h=>h.repo_name===t),f=p.reduce((h,g)=>h+(g.total_commits||0),0),w=new Set(p.map(h=>h.author_name)).size;document.getElementById("profile-stories-count").textContent=p.length,document.getElementById("profile-commits-count").textContent=f,document.getElementById("profile-contributors-count").textContent=w,document.getElementById("profile-stats-count").textContent=`+ ${w} contributors`;const T=p[0],m=T?timeSince(new Date(T.started_at||T.created_at)):"a while ago";document.getElementById("profile-view-bio").textContent=`Repository tracked by Repr.Active ${m}. Contains ${p.length} stories.`,fs(p,"profile-feed",{})}function Ja(e){function t(v,F){return v<<F|v>>>32-F}function s(v,F){const E=(v&65535)+(F&65535);return(v>>16)+(F>>16)+(E>>16)<<16|E&65535}function n(v,F,E){return v&F|~v&E}function o(v,F,E){return v&E|F&~E}function i(v,F,E){return v^F^E}function l(v,F,E){return F^(v|~E)}function a(v,F,E,O,q,D,Q){return s(t(s(s(v,n(F,E,O)),s(q,Q)),D),F)}function d(v,F,E,O,q,D,Q){return s(t(s(s(v,o(F,E,O)),s(q,Q)),D),F)}function p(v,F,E,O,q,D,Q){return s(t(s(s(v,i(F,E,O)),s(q,Q)),D),F)}function f(v,F,E,O,q,D,Q){return s(t(s(s(v,l(F,E,O)),s(q,Q)),D),F)}function w(v){const F=(v.length+8>>6)+1,E=Array(F*16).fill(0);for(let O=0;O<v.length;O++)E[O>>2]|=v.charCodeAt(O)<<O%4*8;return E[v.length>>2]|=128<<v.length%4*8,E[F*16-2]=v.length*8,E}function T(v){let F="";for(let E=0;E<4;E++)F+=(v>>E*8&255).toString(16).padStart(2,"0");return F}const m=w(e);let h=1732584193,g=4023233417,x=2562383102,y=271733878;for(let v=0;v<m.length;v+=16){const F=h,E=g,O=x,q=y;h=a(h,g,x,y,m[v],7,3614090360),y=a(y,h,g,x,m[v+1],12,3905402710),x=a(x,y,h,g,m[v+2],17,606105819),g=a(g,x,y,h,m[v+3],22,3250441966),h=a(h,g,x,y,m[v+4],7,4118548399),y=a(y,h,g,x,m[v+5],12,1200080426),x=a(x,y,h,g,m[v+6],17,2821735955),g=a(g,x,y,h,m[v+7],22,4249261313),h=a(h,g,x,y,m[v+8],7,1770035416),y=a(y,h,g,x,m[v+9],12,2336552879),x=a(x,y,h,g,m[v+10],17,4294925233),g=a(g,x,y,h,m[v+11],22,2304563134),h=a(h,g,x,y,m[v+12],7,1804603682),y=a(y,h,g,x,m[v+13],12,4254626195),x=a(x,y,h,g,m[v+14],17,2792965006),g=a(g,x,y,h,m[v+15],22,1236535329),h=d(h,g,x,y,m[v+1],5,4129170786),y=d(y,h,g,x,m[v+6],9,3225465664),x=d(x,y,h,g,m[v+11],14,643717713),g=d(g,x,y,h,m[v],20,3921069994),h=d(h,g,x,y,m[v+5],5,3593408605),y=d(y,h,g,x,m[v+10],9,38016083),x=d(x,y,h,g,m[v+15],14,3634488961),g=d(g,x,y,h,m[v+4],20,3889429448),h=d(h,g,x,y,m[v+9],5,568446438),y=d(y,h,g,x,m[v+14],9,3275163606),x=d(x,y,h,g,m[v+3],14,4107603335),g=d(g,x,y,h,m[v+8],20,1163531501),h=d(h,g,x,y,m[v+13],5,2850285829),y=d(y,h,g,x,m[v+2],9,4243563512),x=d(x,y,h,g,m[v+7],14,1735328473),g=d(g,x,y,h,m[v+12],20,2368359562),h=p(h,g,x,y,m[v+5],4,4294588738),y=p(y,h,g,x,m[v+8],11,2272392833),x=p(x,y,h,g,m[v+11],16,1839030562),g=p(g,x,y,h,m[v+14],23,4259657740),h=p(h,g,x,y,m[v+1],4,2763975236),y=p(y,h,g,x,m[v+4],11,1272893353),x=p(x,y,h,g,m[v+7],16,4139469664),g=p(g,x,y,h,m[v+10],23,3200236656),h=p(h,g,x,y,m[v+13],4,681279174),y=p(y,h,g,x,m[v],11,3936430074),x=p(x,y,h,g,m[v+3],16,3572445317),g=p(g,x,y,h,m[v+6],23,76029189),h=p(h,g,x,y,m[v+9],4,3654602809),y=p(y,h,g,x,m[v+12],11,3873151461),x=p(x,y,h,g,m[v+15],16,530742520),g=p(g,x,y,h,m[v+2],23,3299628645),h=f(h,g,x,y,m[v],6,4096336452),y=f(y,h,g,x,m[v+7],10,1126891415),x=f(x,y,h,g,m[v+14],15,2878612391),g=f(g,x,y,h,m[v+5],21,4237533241),h=f(h,g,x,y,m[v+12],6,1700485571),y=f(y,h,g,x,m[v+3],10,2399980690),x=f(x,y,h,g,m[v+10],15,4293915773),g=f(g,x,y,h,m[v+1],21,2240044497),h=f(h,g,x,y,m[v+8],6,1873313359),y=f(y,h,g,x,m[v+15],10,4264355552),x=f(x,y,h,g,m[v+6],15,2734768916),g=f(g,x,y,h,m[v+13],21,1309151649),h=f(h,g,x,y,m[v+4],6,4149444226),y=f(y,h,g,x,m[v+11],10,3174756917),x=f(x,y,h,g,m[v+2],15,718787259),g=f(g,x,y,h,m[v+9],21,3951481745),h=s(h,F),g=s(g,E),x=s(x,O),y=s(y,q)}return T(h)+T(g)+T(x)+T(y)}function pn(e,t=134){return e?`https://www.gravatar.com/avatar/${Ja(e.trim().toLowerCase())}?s=${t}&d=identicon`:null}function gi(e,t,s,n=!0){e&&e.stopPropagation(),n&&(window.lastScrollY=window.scrollY,store.update("previousView","view-user"),store.pushHistory({view:"user",authorName:t},`Repr - ${t}`,`?user=${encodeURIComponent(t)}`)),["stories","settings","llm","privacy","repos","cron","detail","profile"].forEach(x=>{const y=document.getElementById("view-"+x);y&&(y.style.display="none")}),document.getElementById("view-user").style.display="block",window.scrollTo(0,0);const o=stringToColor(t),i=t.substring(0,1).toUpperCase(),l=document.getElementById("user-view-avatar"),a=pn(s);a?(l.innerHTML=`<img src="${a}" alt="${escapeHtml(t)}" style="width:100%;height:100%;border-radius:50%;object-fit:cover;">`,l.style.background="transparent"):(l.innerHTML=i,l.style.background=o),document.getElementById("user-view-name").textContent=t,document.getElementById("user-nav-name").textContent=t,document.getElementById("user-view-handle").textContent="@"+t.toLowerCase().replace(/\s+/g,"");const d=Math.abs((t+"1").hashCode()||0)%360,p=Math.abs((t+"2").hashCode()||0)%360;document.getElementById("user-cover").style.background=`linear-gradient(135deg, hsl(${d}, 60%, 75%) 0%, hsl(${p}, 60%, 80%) 100%)`;const w=store.get("stories").filter(x=>x.author_name===t),T=w.reduce((x,y)=>x+(y.total_commits||0),0),m=new Set(w.map(x=>x.repo_name)).size;document.getElementById("user-stories-count").textContent=w.length,document.getElementById("user-commits-count").textContent=T,document.getElementById("user-contributors-count").textContent=m,document.getElementById("user-stats-count").textContent=`+${m} repos`;const h=w[0],g=h?timeSince(new Date(h.started_at||h.created_at)):"a while ago";document.getElementById("user-view-bio").textContent=`Developer tracked by Repr. Active ${g}. ${w.length} stories across ${m} repositories.`,fs(w,"user-feed",{})}String.prototype.hashCode=function(){let e=0,t,s;if(this.length===0)return e;for(t=0;t<this.length;t++)s=this.charCodeAt(t),e=(e<<5)-e+s,e|=0;return e};function za(){const e=document.getElementById("view-profile"),t=document.getElementById("view-user"),s=document.getElementById("view-detail");e&&(e.style.display="none"),t&&(t.style.display="none"),s&&(s.style.display="none"),document.getElementById("view-stories").style.display="block",history.replaceState({view:"main",mainView:"stories"},"Repr",window.location.pathname),window.lastScrollY&&window.scrollTo(0,window.lastScrollY)}async function Ga(){showToast("Refreshing...","success"),await fi()}async function qa(){if(confirm("Start generating stories now? This will run in the background."))try{(await triggerGeneration()).success?showToast("Generation started","success"):showToast("Failed to start generation","error")}catch{showToast("Error triggering generation","error")}}function Ya(e="feed",t=3){const s=document.getElementById(e);if(!s)return;let n="";for(let o=0;o<t;o++)n+=`
239
+ <div class="skeleton-card">
240
+ <div class="skeleton-avatar skeleton"></div>
241
+ <div class="skeleton-body">
242
+ <div class="skeleton-header skeleton"></div>
243
+ <div class="skeleton-title skeleton"></div>
244
+ <div class="skeleton-text skeleton"></div>
245
+ <div class="skeleton-text skeleton" style="width: 60%"></div>
246
+ </div>
247
+ </div>
248
+ `;s.innerHTML=n}function Qa(e,t){e&&e.stopPropagation();const s=document.getElementById("search-input");s.value=t,store.update("searchQuery",t.toLowerCase()),us(),switchMainView("stories",!1)}window.openStory=pi;window.openProfile=hi;window.openUser=gi;window.filterByTag=Qa;window.triggerGenerationClick=qa;window.goBack=za;window.refreshStories=Ga;window.toggleSubscribedRepos=Va;Object.assign(window,{initStories:fi,renderStories:fs,filterAndRenderStories:us});function Xa(e,t=!0){store.update("currentMainView",e),t&&store.pushHistory({view:"main",mainView:e},`Repr - ${e.charAt(0).toUpperCase()+e.slice(1)}`,`?view=${e}`),document.querySelectorAll(".sidebar-item").forEach(o=>{o.classList.toggle("active",o.dataset.view===e)}),document.querySelectorAll(".mobile-nav-item").forEach(o=>{const i=o.querySelector("span:last-child").textContent.toLowerCase();o.classList.toggle("active",e.startsWith(i))}),document.querySelector(".sidebar").classList.contains("open")&&toggleSidebar(),["stories","settings","llm","privacy","repos","cron","detail","profile"].forEach(o=>{const i=document.getElementById("view-"+o);i&&(i.style.display="none")});const n=document.getElementById("view-"+e);n&&(n.style.display="block"),["settings","llm","privacy","cron"].includes(e)&&!store.get("config")&&mi(),e==="privacy"&&yi(),e==="repos"&&loadRepos(),e==="cron"&&oc()}function Za(e){if(store.update("currentSettingsTab",e),document.querySelectorAll(".settings-nav-item").forEach(t=>{t.classList.toggle("active",t.dataset.tab===e)}),document.getElementById("settings-form").style.display=e==="form"?"block":"none",document.getElementById("settings-json").style.display=e==="json"?"block":"none",e==="json"){const t=store.get("config");t&&(document.getElementById("json-editor").value=JSON.stringify(t,null,2))}}async function mi(){try{const e=await getConfig();store.batchUpdate({config:e,configDirty:!1}),vi(e),document.getElementById("json-editor").value=JSON.stringify(e,null,2),hs()}catch{showToast("Failed to load config","error")}}function vi(e){var t,s,n,o,i,l,a,d,p,f,w,T,m,h,g,x,y,v;document.getElementById("llm-default").value=((t=e.llm)==null?void 0:t.default)||"local",document.getElementById("llm-local-provider").value=((s=e.llm)==null?void 0:s.local_provider)||"",document.getElementById("llm-local-model").value=((n=e.llm)==null?void 0:n.local_model)||"",document.getElementById("llm-local-url").value=((o=e.llm)==null?void 0:o.local_api_url)||"",document.getElementById("gen-batch-size").value=((i=e.generation)==null?void 0:i.batch_size)||5,document.getElementById("gen-max-commits").value=((l=e.generation)==null?void 0:l.max_commits_per_batch)||50,document.getElementById("gen-template").value=((a=e.generation)==null?void 0:a.default_template)||"resume",document.getElementById("gen-auto-hook").checked=((d=e.generation)==null?void 0:d.auto_generate_on_hook)||!1,document.getElementById("privacy-local-only").checked=((p=e.privacy)==null?void 0:p.lock_local_only)||!1,document.getElementById("privacy-redact-paths").checked=((f=e.llm)==null?void 0:f.cloud_redact_paths)!==!1,document.getElementById("privacy-redact-emails").checked=((w=e.llm)==null?void 0:w.cloud_redact_emails)||!1,document.getElementById("privacy-send-diffs").checked=((T=e.llm)==null?void 0:T.cloud_send_diffs)||!1,document.getElementById("cron-interval").value=((m=e.cron)==null?void 0:m.interval_hours)||4,document.getElementById("cron-min-commits").value=((h=e.cron)==null?void 0:h.min_commits)||3,document.getElementById("cron-installed").checked=((g=e.cron)==null?void 0:g.installed)||!1,document.getElementById("cron-paused").checked=((x=e.cron)==null?void 0:x.paused)||!1,so("default-paths-container",((y=e.settings)==null?void 0:y.default_paths)||["~/code"],"path"),so("skip-patterns-container",((v=e.settings)==null?void 0:v.skip_patterns)||[],"pattern")}function ec(){const e=JSON.parse(JSON.stringify(store.get("config")));return e.llm=e.llm||{},e.llm.default=document.getElementById("llm-default").value,e.llm.local_provider=document.getElementById("llm-local-provider").value||null,e.llm.local_model=document.getElementById("llm-local-model").value||null,e.llm.local_api_url=document.getElementById("llm-local-url").value||null,e.generation=e.generation||{},e.generation.batch_size=parseInt(document.getElementById("gen-batch-size").value)||5,e.generation.max_commits_per_batch=parseInt(document.getElementById("gen-max-commits").value)||50,e.generation.default_template=document.getElementById("gen-template").value,e.generation.auto_generate_on_hook=document.getElementById("gen-auto-hook").checked,e.privacy=e.privacy||{},e.privacy.lock_local_only=document.getElementById("privacy-local-only").checked,e.llm.cloud_redact_paths=document.getElementById("privacy-redact-paths").checked,e.llm.cloud_redact_emails=document.getElementById("privacy-redact-emails").checked,e.llm.cloud_send_diffs=document.getElementById("privacy-send-diffs").checked,e.cron=e.cron||{},e.cron.interval_hours=parseInt(document.getElementById("cron-interval").value)||4,e.cron.min_commits=parseInt(document.getElementById("cron-min-commits").value)||3,e.cron.installed=document.getElementById("cron-installed").checked,e.cron.paused=document.getElementById("cron-paused").checked,e.settings=e.settings||{},e.settings.default_paths=no("default-paths-container"),e.settings.skip_patterns=no("skip-patterns-container"),e}async function tc(){try{const e=ec();await updateConfig(e),store.batchUpdate({config:e,configDirty:!1}),hs(),showToast("Configuration saved","success")}catch{showToast("Failed to save config","error")}}async function sc(){try{const e=document.getElementById("json-editor").value,t=JSON.parse(e);await updateConfig(t),store.batchUpdate({config:t,configDirty:!1}),vi(t),hs(),showToast("Configuration saved","success")}catch(e){e instanceof SyntaxError?showToast("Invalid JSON syntax","error"):showToast("Failed to save config","error")}}function nc(){try{const e=document.getElementById("json-editor"),t=JSON.parse(e.value);e.value=JSON.stringify(t,null,2)}catch{showToast("Invalid JSON - cannot format","error")}}function ps(){store.update("configDirty",!0),hs()}function hs(){const e=store.get("configDirty");["save-btn","save-json-btn","save-llm-btn","save-privacy-btn","save-cron-btn"].forEach(s=>{const n=document.getElementById(s);n&&(n.disabled=!e)})}async function oc(){try{const e=await getCronStatus();store.update("cronStatus",e),ic(e)}catch{document.getElementById("cron-status").innerHTML='<div class="loading-text">Failed to load cron status</div>'}}function ic(e){const t=document.getElementById("cron-status");let s="Not installed",n="inactive";e.installed&&(e.paused?(s="Paused",n="paused"):(s="Active",n="active")),t.innerHTML=`
249
+ <div class="cron-status-row">
250
+ <span class="cron-status-label">Status</span>
251
+ <span class="cron-status-value ${n}">${s}</span>
252
+ </div>
253
+ <div class="cron-status-row">
254
+ <span class="cron-status-label">Interval</span>
255
+ <span class="cron-status-value">${e.interval_hours?e.interval_hours+" hours":"Not set"}</span>
256
+ </div>
257
+ <div class="cron-status-row">
258
+ <span class="cron-status-label">Min Commits</span>
259
+ <span class="cron-status-value">${e.min_commits||"Not set"}</span>
260
+ </div>
261
+ `}function so(e,t,s){const n=document.getElementById(e),o=n.querySelector("input");n.querySelectorAll(".tag-item").forEach(i=>i.remove()),t.forEach(i=>{const l=document.createElement("span");l.className="tag-item",l.innerHTML=`${escapeHtml(i)}<span class="tag-remove" onclick="removeTag(this, '${s}')">&times;</span>`,n.insertBefore(l,o)})}function no(e){const t=document.getElementById(e);return Array.from(t.querySelectorAll(".tag-item")).map(s=>s.textContent.slice(0,-1))}function rc(e,t){e.parentElement.remove(),ps()}function lc(e){if(e.key==="Enter"){e.preventDefault();const t=e.target,s=t.value.trim();if(s){const n=t.parentElement,o=document.createElement("span");o.className="tag-item",o.innerHTML=`${escapeHtml(s)}<span class="tag-remove" onclick="removeTag(this, 'path')">&times;</span>`,n.insertBefore(o,t),t.value="",ps()}}}function ac(e){if(e.key==="Enter"){e.preventDefault();const t=e.target,s=t.value.trim();if(s){const n=t.parentElement,o=document.createElement("span");o.className="tag-item",o.innerHTML=`${escapeHtml(s)}<span class="tag-remove" onclick="removeTag(this, 'pattern')">&times;</span>`,n.insertBefore(o,t),t.value="",ps()}}}window.switchMainView=Xa;window.loadConfig=mi;window.saveConfig=tc;window.saveJsonConfig=sc;window.formatJson=nc;window.switchSettingsTab=Za;let gs=!1;async function yi(){try{const e=await fetch(`${window.API_BASE}/api/visibility`);if(e.ok){const t=await e.json();document.getElementById("visibility-profile").value=t.profile||"private",document.getElementById("visibility-repos").value=t.repos_default||"private",document.getElementById("visibility-stories").value=t.stories_default||"private",gs=!1,hn()}}catch(e){console.error("Failed to load visibility settings:",e),document.getElementById("visibility-profile").value="private",document.getElementById("visibility-repos").value="private",document.getElementById("visibility-stories").value="private"}}async function cc(){const e={profile:document.getElementById("visibility-profile").value,repos_default:document.getElementById("visibility-repos").value,stories_default:document.getElementById("visibility-stories").value};try{const t=await fetch(`${window.API_BASE}/api/visibility`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});gs=!1,hn(),t.ok?(await t.json()).backend_synced?showToast("Visibility saved (local + cloud)","success"):showToast("Visibility saved locally","success"):showToast("Failed to save visibility settings","error")}catch(t){console.error("Failed to save visibility settings:",t),showToast("Failed to save visibility settings","error")}}function dc(){gs=!0,hn()}function hn(){const e=document.getElementById("save-visibility-btn");e&&(e.disabled=!gs)}Object.assign(window,{handlePathInput:lc,handlePatternInput:ac,removeTag:rc,markConfigDirty:ps,loadVisibilitySettings:yi,saveVisibilitySettings:cc,markVisibilityDirty:dc});async function pt(){try{const e=await getRepos();store.update("repos",e.repos||[]),uc()}catch{document.getElementById("repos-list").innerHTML='<div class="loading-text">Failed to load repositories</div>'}}function uc(){const e=store.get("repos"),t=document.getElementById("repos-list");if(!e.length){t.innerHTML=`
262
+ <div class="empty-state">
263
+ <div class="empty-state-title">No repositories tracked</div>
264
+ <div>Add a repository path above to start tracking</div>
265
+ </div>`;return}t.innerHTML=e.map(s=>{var w;const o=((w=s.project)==null?void 0:w.name)||""||s.origin_name||s.path.split("/").pop(),i=s.paused,l=!s.exists,a=s.hook_installed;let d="active";l?d="missing":i&&(d="paused");const p=s.origin?mc(s.origin):null,f=escapeHtml(s.path).replace(/'/g,"\\'");return`
266
+ <div class="repo-item ${i?"paused":""} ${l?"missing":""}">
267
+ <div class="repo-info">
268
+ <div class="repo-name-row">
269
+ <span class="repo-name" id="repo-name-${f}" onclick="editRepoName('${f}')">${escapeHtml(o)}</span>
270
+ <button class="repo-edit-btn" onclick="editRepoName('${f}')" title="Edit name">✎</button>
271
+ ${p?`<a href="${escapeHtml(p)}" target="_blank" rel="noopener noreferrer" class="repo-link" title="Open repository"><span class="repo-link-icon">&#8599;</span></a>`:""}
272
+ </div>
273
+ <div class="repo-path">${escapeHtml(s.path)}</div>
274
+ <div class="repo-status">
275
+ <span class="repo-badge ${d}">${l?"Missing":i?"Paused":"Active"}</span>
276
+ ${a?'<span class="repo-badge hook">Hook</span>':""}
277
+ ${s.last_sync?`<span style="font-size: 11px; color: var(--text-muted);">Last sync: ${new Date(s.last_sync).toLocaleDateString()}</span>`:""}
278
+ </div>
279
+ </div>
280
+ <div class="repo-actions">
281
+ ${i?`<button class="repo-action-btn" onclick="resumeRepoClick('${f}')">Resume</button>`:`<button class="repo-action-btn" onclick="pauseRepoClick('${f}')">Pause</button>`}
282
+ <button class="repo-action-btn danger" onclick="removeRepoClick('${f}')">Remove</button>
283
+ </div>
284
+ </div>
285
+ `}).join("")}async function fc(){const e=document.getElementById("add-repo-path"),t=e.value.trim();if(!t){showToast("Please enter a repository path","error");return}try{const s=await addRepo(t);s.success?(e.value="",showToast("Repository added","success"),pt()):showToast(s.error||"Failed to add repository","error")}catch{showToast("Failed to add repository","error")}}async function pc(e){if(confirm("Remove this repository from tracking?"))try{(await removeRepo(e)).success?(showToast("Repository removed","success"),pt()):showToast("Failed to remove repository","error")}catch{showToast("Failed to remove repository","error")}}async function hc(e){try{(await pauseRepo(e)).success?(showToast("Repository paused","success"),pt()):showToast("Failed to pause repository","error")}catch{showToast("Failed to pause repository","error")}}async function gc(e){try{(await resumeRepo(e)).success?(showToast("Repository resumed","success"),pt()):showToast("Failed to resume repository","error")}catch{showToast("Failed to resume repository","error")}}function mc(e){if(!e)return null;if(e.startsWith("http://")||e.startsWith("https://"))return e;const t=e.match(/^git@([^:]+):(.+?)(\.git)?$/);if(t){const n=t[1],o=t[2];return`https://${n}/${o}`}const s=e.match(/^git:\/\/(.+?)(\.git)?$/);return s?`https://${s[1]}`:e}function vc(e){var l;const s=store.get("repos").find(a=>a.path===e);if(!s)return;const n=((l=s.project)==null?void 0:l.name)||s.origin_name||s.path.split("/").pop();document.getElementById("edit-repo-modal");const o=document.getElementById("edit-repo-name-input"),i=document.getElementById("edit-repo-path-input");o.value=n,i.value=e,openModal("edit-repo-modal"),setTimeout(()=>{o.focus(),o.select()},100)}async function yc(){const e=document.getElementById("edit-repo-name-input"),t=document.getElementById("edit-repo-path-input"),s=e.value.trim(),n=t.value;if(s===""){showToast("Name cannot be empty","error");return}const o=document.getElementById("save-repo-btn"),i=o.textContent;o.disabled=!0,o.textContent="Saving...";try{const l=await renameRepo(n,s);l.success?(showToast("Project renamed","success"),closeModal("edit-repo-modal"),pt()):showToast(l.error||"Failed to rename project","error")}catch{showToast("Failed to rename project","error")}finally{o.disabled=!1,o.textContent=i}}window.addRepoClick=fc;window.editRepoName=vc;window.saveRepoEdit=yc;Object.assign(window,{loadRepos:pt,removeRepoClick:pc,pauseRepoClick:hc,resumeRepoClick:gc});let N={authenticated:!1,user:null,loginFlow:null,usernameInfo:null,polling:!1,modalOpen:!1},zt=null;async function bc(){if(!document.getElementById("auth-modal")){const e=document.createElement("div");e.id="auth-modal",e.className="auth-modal",e.addEventListener("click",t=>{t.stopPropagation()}),document.body.appendChild(e)}await gn(),jt()}async function gn(){try{const e=await window.getAuthStatus();if(N.authenticated=e.authenticated,N.user=e.user,e.authenticated){const t=await window.getUsernameInfo();N.usernameInfo=t}}catch(e){console.error("Failed to fetch auth status:",e)}}function jt(){var t;const e=document.getElementById("auth-section");if(e)if(N.authenticated&&N.user){const s=(t=N.usernameInfo)!=null&&t.claimed?`@${N.usernameInfo.remote_username}`:N.user.email;e.innerHTML=`
286
+ <div class="auth-connected">
287
+ <div class="auth-user">
288
+ <span class="auth-icon">
289
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
290
+ <path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path>
291
+ <circle cx="12" cy="7" r="4"></circle>
292
+ </svg>
293
+ </span>
294
+ <span class="auth-name" title="${N.user.email}">${s}</span>
295
+ </div>
296
+ <button class="auth-logout-btn" onclick="handleLogout()" title="Disconnect">
297
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
298
+ <path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"></path>
299
+ <polyline points="16 17 21 12 16 7"></polyline>
300
+ <line x1="21" y1="12" x2="9" y2="12"></line>
301
+ </svg>
302
+ </button>
303
+ </div>
304
+ `}else e.innerHTML=`
305
+ <button class="auth-connect-btn" onclick="handleStartLogin()">
306
+ <span class="auth-icon">
307
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
308
+ <path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"></path>
309
+ <polyline points="10 17 15 12 10 7"></polyline>
310
+ <line x1="15" y1="12" x2="3" y2="12"></line>
311
+ </svg>
312
+ </span>
313
+ Connect to repr.dev
314
+ </button>
315
+ `}function bi(){const e=document.getElementById("auth-modal");e&&(N.modalOpen=!0,e.classList.add("open"),document.body.style.overflow="hidden",mn())}function ms(){console.log("closeAuthModal called",new Error().stack);const e=document.getElementById("auth-modal");e&&(N.modalOpen=!1,it=!1,e.classList.remove("open"),document.body.style.overflow="")}function mn(){const e=document.getElementById("auth-modal");if(e)if(N.loginFlow&&N.loginFlow.showError){const t=N.loginFlow.message||"An error occurred";e.innerHTML=`
316
+ <div class="auth-modal-content" onclick="event.stopPropagation()">
317
+ <button class="auth-modal-close" onclick="handleCancelLogin()">
318
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
319
+ <line x1="18" y1="6" x2="6" y2="18"></line>
320
+ <line x1="6" y1="6" x2="18" y2="18"></line>
321
+ </svg>
322
+ </button>
323
+ <div class="auth-modal-header">
324
+ <div class="auth-modal-icon auth-modal-icon-error">
325
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
326
+ <circle cx="12" cy="12" r="10"></circle>
327
+ <line x1="15" y1="9" x2="9" y2="15"></line>
328
+ <line x1="9" y1="9" x2="15" y2="15"></line>
329
+ </svg>
330
+ </div>
331
+ <h2>Connection Failed</h2>
332
+ <p>${t}</p>
333
+ </div>
334
+ <div class="auth-modal-footer">
335
+ <button class="auth-cancel-btn" onclick="handleCancelLogin()">Close</button>
336
+ <button class="auth-retry-btn" onclick="handleRetryLogin()">Try Again</button>
337
+ </div>
338
+ </div>
339
+ `}else N.loginFlow&&N.loginFlow.status==="pending"&&(e.innerHTML=`
340
+ <div class="auth-modal-content" onclick="event.stopPropagation()">
341
+ <button class="auth-modal-close" onclick="handleCancelLogin()">
342
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
343
+ <line x1="18" y1="6" x2="6" y2="18"></line>
344
+ <line x1="6" y1="6" x2="18" y2="18"></line>
345
+ </svg>
346
+ </button>
347
+ <div class="auth-modal-header">
348
+ <div class="auth-modal-icon">
349
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
350
+ <path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"></path>
351
+ <polyline points="10 17 15 12 10 7"></polyline>
352
+ <line x1="15" y1="12" x2="3" y2="12"></line>
353
+ </svg>
354
+ </div>
355
+ <h2>Connect to repr.dev</h2>
356
+ <p>Enter the code below at the verification page</p>
357
+ </div>
358
+ <div class="auth-modal-body">
359
+ <div class="auth-code">${N.loginFlow.user_code}</div>
360
+ <a href="${N.loginFlow.verification_url}" target="_blank" class="auth-verify-btn">
361
+ Open Verification Page
362
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
363
+ <path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path>
364
+ <polyline points="15 3 21 3 21 9"></polyline>
365
+ <line x1="10" y1="14" x2="21" y2="3"></line>
366
+ </svg>
367
+ </a>
368
+ <div class="auth-modal-status">
369
+ <span class="auth-spinner"></span>
370
+ Waiting for authorization...
371
+ </div>
372
+ </div>
373
+ <div class="auth-modal-footer">
374
+ <button class="auth-cancel-btn" onclick="handleCancelLogin()">Cancel</button>
375
+ </div>
376
+ </div>
377
+ `)}let it=!1;async function wi(){if(it||N.modalOpen){console.log("Login already in progress, ignoring");return}it=!0;try{console.log("Starting login flow...");const e=await window.startLogin();console.log("Login flow response:",e),N.loginFlow=e,e.status==="pending"?(bi(),wc()):(console.warn("Unexpected flow status:",e.status),it=!1)}catch(e){console.error("Failed to start login:",e),alert("Failed to start login: "+e.message),it=!1}}function wc(){var t;if(N.polling)return;N.polling=!0;const e=(t=N.loginFlow)==null?void 0:t.device_code;if(!e){console.error("No device code available for polling");return}zt=setInterval(async()=>{try{console.log("Polling login status...");const s=await window.pollLoginStatus(e);if(console.log("Poll response:",s),s.status==="completed"){Gt();try{await window.saveAuthToken({access_token:s.access_token,user:s.user,litellm_api_key:s.litellm_api_key})}catch(n){console.error("Failed to save token:",n)}ms(),await gn(),jt()}else(s.status==="error"||s.status==="expired"||s.status==="denied")&&(console.log("Error status:",s.status,s.message),Gt(),N.loginFlow={...N.loginFlow,...s,showError:!0},mn())}catch(s){console.error("Polling error:",s),Gt()}},5e3)}function Gt(){N.polling=!1,zt&&(clearInterval(zt),zt=null)}async function xc(){Gt(),ms();try{await window.cancelLogin()}catch{}N.loginFlow=null,jt()}async function _c(){try{await window.cancelLogin()}catch{}N.loginFlow=null,it=!1,ms(),await wi()}async function Sc(){try{await window.logout(),N.authenticated=!1,N.user=null,N.usernameInfo=null,jt()}catch(e){console.error("Failed to logout:",e)}}Object.assign(window,{initAuth:bc,refreshAuthStatus:gn,renderAuthSection:jt,openAuthModal:bi,closeAuthModal:ms,renderAuthModal:mn,handleStartLogin:wi,handleCancelLogin:xc,handleRetryLogin:_c,handleLogout:Sc});const kc={__name:"App",setup(e){return Do(()=>{/(Mac|iPhone|iPad|iPod)/i.test(navigator.platform)||document.body.classList.add("is-windows"),window.initTheme&&window.initTheme(),window.initKeyboard&&window.initKeyboard();const t=document.getElementById("search-input");t&&t.addEventListener("input",s=>{window.store&&(window.store.update("searchQuery",s.target.value.trim().toLowerCase()),window.filterAndRenderStories&&window.filterAndRenderStories())}),window.initStories&&window.initStories(),window.initAuth&&window.initAuth()}),(t,s)=>(dl(),pl(ve,null,[s[0]||(s[0]=r("div",{class:"dashboard",id:"view-main"},[r("div",{class:"sidebar-overlay",onclick:"toggleSidebar()"}),r("aside",{class:"sidebar"},[r("div",{class:"sidebar-header"},[r("div",{class:"sidebar-logo"},[r("div",{class:"sidebar-avatar"},"R"),r("div",null,[r("div",{class:"sidebar-title"},"Repr"),r("div",{class:"sidebar-subtitle"},"Dashboard")])])]),r("nav",{class:"sidebar-nav"},[r("div",{class:"sidebar-section"},[r("div",{class:"sidebar-section-title"},"Overview"),r("div",{class:"sidebar-item active","data-view":"stories",onclick:"switchMainView('stories')",role:"button","aria-label":"View Stories"},[r("span",{class:"sidebar-icon","aria-hidden":"true"},[r("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"},[r("path",{d:"M4 19.5A2.5 2.5 0 0 1 6.5 17H20"}),r("path",{d:"M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"})])]),le(" Stories ")]),r("div",{class:"sidebar-item","data-view":"repos",onclick:"switchMainView('repos')",role:"button","aria-label":"View Repositories"},[r("span",{class:"sidebar-icon","aria-hidden":"true"},[r("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"},[r("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"})])]),le(" Repositories ")])]),r("div",{class:"sidebar-section"},[r("div",{class:"sidebar-section-title"},"Configuration"),r("div",{class:"sidebar-item","data-view":"settings",onclick:"switchMainView('settings')",role:"button","aria-label":"Settings"},[r("span",{class:"sidebar-icon","aria-hidden":"true"},[r("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"},[r("circle",{cx:"12",cy:"12",r:"3"}),r("path",{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"})])]),le(" Settings ")]),r("div",{class:"sidebar-item","data-view":"llm",onclick:"switchMainView('llm')",role:"button","aria-label":"LLM Configuration"},[r("span",{class:"sidebar-icon","aria-hidden":"true"},[r("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"},[r("path",{d:"M12 2a10 10 0 0 1 10 10 10 10 0 0 1-10 10 10 10 0 0 1-10-10 10 10 0 0 1 10-10z"}),r("path",{d:"M8 14s1.5 2 4 2 4-2 4-2"}),r("line",{x1:"9",y1:"9",x2:"9.01",y2:"9"}),r("line",{x1:"15",y1:"9",x2:"15.01",y2:"9"})])]),le(" LLM ")]),r("div",{class:"sidebar-item","data-view":"privacy",onclick:"switchMainView('privacy')",role:"button","aria-label":"Privacy Settings"},[r("span",{class:"sidebar-icon","aria-hidden":"true"},[r("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"},[r("rect",{x:"3",y:"11",width:"18",height:"11",rx:"2",ry:"2"}),r("path",{d:"M7 11V7a5 5 0 0 1 10 0v4"})])]),le(" Privacy ")]),r("div",{class:"sidebar-item","data-view":"cron",onclick:"switchMainView('cron')",role:"button","aria-label":"Cron Settings"},[r("span",{class:"sidebar-icon","aria-hidden":"true"},[r("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"},[r("circle",{cx:"12",cy:"12",r:"10"}),r("polyline",{points:"12 6 12 12 16 14"})])]),le(" Cron ")])])]),r("div",{id:"auth-section",class:"auth-section"}),r("div",{class:"sidebar-footer"},[r("div",{class:"sidebar-status"},[r("span",{class:"status-dot"}),r("span",{id:"status-text"},"Loading...")]),r("div",{class:"sidebar-item theme-toggle-compact",id:"theme-toggle",onclick:"toggleTheme()"},[r("span",{class:"sidebar-icon theme-toggle-icon"},[r("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"},[r("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})])]),le(" Toggle Theme ")])])]),r("main",{class:"main-content"},[r("div",{class:"main-layout"},[r("div",{class:"feed-column"},[r("div",{id:"view-stories"},[r("div",{class:"tabs-bar"},[r("div",{class:"mobile-menu-toggle",onclick:"toggleSidebar()"},[r("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"},[r("line",{x1:"3",y1:"12",x2:"21",y2:"12"}),r("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),r("line",{x1:"3",y1:"18",x2:"21",y2:"18"})])]),r("div",{class:"search-container"},[r("div",{class:"search-icon"},[r("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[r("circle",{cx:"11",cy:"11",r:"8"}),r("path",{d:"m21 21-4.35-4.35"})])]),r("input",{type:"text",id:"search-input",class:"search-input",placeholder:"Search stories..."}),r("kbd",{class:"search-shortcut"},[r("span",{class:"search-shortcut-mod"}),le("K")])])]),r("div",{class:"feed-wrapper"},[r("div",{class:"feed",id:"feed"})])]),r("div",{id:"view-detail",style:{display:"none"}},[r("div",{class:"tabs-bar"},[r("div",{class:"back-button",onclick:"goBack()"},[r("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[r("line",{x1:"19",y1:"12",x2:"5",y2:"12"}),r("polyline",{points:"12 19 5 12 12 5"})])]),r("div",{class:"view-title"},"Post")]),r("div",{id:"detail-content"})]),r("div",{id:"view-profile",style:{display:"none"}},[r("div",{class:"profile-container"},[r("div",{class:"profile-header-nav"},[r("div",{class:"back-button",onclick:"goBack()"},[r("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[r("line",{x1:"19",y1:"12",x2:"5",y2:"12"}),r("polyline",{points:"12 19 5 12 12 5"})])]),r("div",{class:"profile-nav-title",id:"profile-nav-name"},"Profile")]),r("div",{class:"profile-cover",id:"profile-cover"}),r("div",{class:"profile-content"},[r("div",{class:"profile-top-section"},[r("div",{class:"profile-avatar-wrapper"},[r("div",{class:"profile-avatar-large",id:"profile-view-avatar"},"R")]),r("div",{class:"profile-actions"})]),r("div",{class:"profile-details"},[r("div",{class:"profile-name-row"},[r("h1",{id:"profile-view-name"},"Repo Name"),r("span",{class:"verified-badge-large",id:"profile-verified-badge",style:{display:"none"}},[r("svg",{viewBox:"0 0 24 24",fill:"currentColor"},[r("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})])])]),r("div",{class:"profile-handle",id:"profile-view-handle"},"@repo"),r("div",{class:"profile-bio",id:"profile-view-bio"}," Repository timeline and activity. "),r("div",{class:"profile-metadata-row"},[r("div",{class:"profile-pill"},[r("span",{class:"pill-icon"},"📦"),r("span",{id:"profile-repo-link"},"Repository")]),r("div",{class:"profile-pill"},[r("span",{class:"pill-icon"},"🔗"),r("span",{id:"profile-web-link"},"Website")]),r("div",{class:"profile-pill-count",id:"profile-stats-count"},"+2")]),r("div",{class:"profile-stats-row"},[r("span",{class:"stat-item"},[r("strong",{id:"profile-stories-count"},"0"),le(),r("span",{class:"stat-label"},"Stories")]),r("span",{class:"stat-item"},[r("strong",{id:"profile-commits-count"},"0"),le(),r("span",{class:"stat-label"},"Commits")]),r("span",{class:"stat-item"},[r("strong",{id:"profile-contributors-count"},"0"),le(),r("span",{class:"stat-label"},"Contributors")])])]),r("div",{class:"feed-container",style:{"padding-top":"0"}},[r("div",{class:"feed",id:"profile-feed"})])])])]),r("div",{id:"view-user",style:{display:"none"}},[r("div",{class:"profile-container"},[r("div",{class:"profile-header-nav"},[r("div",{class:"back-button",onclick:"goBack()"},[r("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[r("line",{x1:"19",y1:"12",x2:"5",y2:"12"}),r("polyline",{points:"12 19 5 12 12 5"})])]),r("div",{class:"profile-nav-title",id:"user-nav-name"},"User Profile")]),r("div",{class:"profile-cover",id:"user-cover"}),r("div",{class:"profile-content"},[r("div",{class:"profile-top-section"},[r("div",{class:"profile-avatar-wrapper"},[r("div",{class:"profile-avatar-large",id:"user-view-avatar"},"U")]),r("div",{class:"profile-actions"})]),r("div",{class:"profile-details"},[r("div",{class:"profile-name-row"},[r("h1",{id:"user-view-name"},"User Name"),r("span",{class:"verified-badge-large",id:"user-verified-badge",style:{display:"none"}},[r("svg",{viewBox:"0 0 24 24",fill:"currentColor"},[r("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})])])]),r("div",{class:"profile-handle",id:"user-view-handle"},"@user"),r("div",{class:"profile-bio",id:"user-view-bio"}," User activity. "),r("div",{class:"profile-metadata-row"},[r("div",{class:"profile-pill"},[r("span",{class:"pill-icon"},"📦"),r("span",{id:"user-repo-link"},"Github")]),r("div",{class:"profile-pill"},[r("span",{class:"pill-icon"},"🔗"),r("span",{id:"user-web-link"},"Website")]),r("div",{class:"profile-pill-count",id:"user-stats-count"},"+2")]),r("div",{class:"profile-stats-row"},[r("span",{class:"stat-item"},[r("strong",{id:"user-stories-count"},"0"),le(),r("span",{class:"stat-label"},"Stories")]),r("span",{class:"stat-item"},[r("strong",{id:"user-commits-count"},"0"),le(),r("span",{class:"stat-label"},"Commits")]),r("span",{class:"stat-item"},[r("strong",{id:"user-contributors-count"},"0"),le(),r("span",{class:"stat-label"},"Repos")])])]),r("div",{class:"feed-container",style:{"padding-top":"0"}},[r("div",{class:"feed",id:"user-feed"})])])])]),r("div",{id:"view-settings",style:{display:"none"}},[r("div",{class:"tabs-bar"},[r("div",{class:"view-title"},"Settings")]),r("div",{class:"content-body"},[r("div",{class:"settings-container"},[r("nav",{class:"settings-nav"},[r("div",{class:"settings-nav-item active","data-tab":"form",onclick:"switchSettingsTab('form')"},"Form"),r("div",{class:"settings-nav-item","data-tab":"json",onclick:"switchSettingsTab('json')"},"JSON")]),r("div",{id:"settings-form",class:"settings-content"},[r("div",{class:"settings-section"},[r("h3",{class:"settings-section-title"},"Generation"),r("div",{class:"settings-row"},[r("div",{class:"settings-group"},[r("label",{class:"settings-label"},"Commits per Story"),r("input",{type:"number",class:"settings-input",id:"gen-batch-size",min:"1",max:"50",oninput:"markConfigDirty()"}),r("div",{class:"settings-hint"},"How many commits to group into a single story")]),r("div",{class:"settings-group"},[r("label",{class:"settings-label"},"Max Commits per Batch"),r("input",{type:"number",class:"settings-input",id:"gen-max-commits",min:"1",max:"200",oninput:"markConfigDirty()"})])]),r("div",{class:"settings-group"},[r("label",{class:"settings-label"},"Default Template"),r("select",{class:"settings-select",id:"gen-template",onchange:"markConfigDirty()"},[r("option",{value:"resume"},"Resume"),r("option",{value:"technical"},"Technical"),r("option",{value:"narrative"},"Narrative")])]),r("div",{class:"settings-checkbox-row"},[r("input",{type:"checkbox",class:"settings-checkbox",id:"gen-auto-hook",onchange:"markConfigDirty()"}),r("label",{class:"settings-checkbox-label",for:"gen-auto-hook"},"Auto-generate on git hook")])]),r("div",{class:"settings-section"},[r("h3",{class:"settings-section-title"},"Paths"),r("div",{class:"settings-group"},[r("label",{class:"settings-label"},"Default Scan Paths"),r("div",{class:"tags-input",id:"default-paths-container"},[r("input",{type:"text",placeholder:"Add path and press Enter",onkeydown:"handlePathInput(event)"})]),r("div",{class:"settings-hint"},"Directories to scan for git repositories")]),r("div",{class:"settings-group"},[r("label",{class:"settings-label"},"Skip Patterns"),r("div",{class:"tags-input",id:"skip-patterns-container"},[r("input",{type:"text",placeholder:"Add pattern and press Enter",onkeydown:"handlePatternInput(event)"})]),r("div",{class:"settings-hint"},"Directory names to skip when scanning")])]),r("div",{class:"btn-row"},[r("button",{class:"btn btn-primary",onclick:"saveConfig()",id:"save-btn",disabled:""},"Save Changes"),r("button",{class:"btn btn-secondary",onclick:"loadConfig()"},"Reset")])]),r("div",{id:"settings-json",class:"settings-content",style:{display:"none"}},[r("div",{class:"settings-group"},[r("label",{class:"settings-label"},"Raw Configuration (JSON)"),r("textarea",{class:"json-editor",id:"json-editor",oninput:"markConfigDirty()"}),r("div",{class:"settings-hint"},"Edit the raw JSON configuration. Be careful with syntax.")]),r("div",{class:"btn-row"},[r("button",{class:"btn btn-primary",onclick:"saveJsonConfig()",id:"save-json-btn",disabled:""},"Save JSON"),r("button",{class:"btn btn-secondary",onclick:"loadConfig()"},"Reset"),r("button",{class:"btn btn-secondary",onclick:"formatJson()"},"Format")])])])])]),r("div",{id:"view-llm",style:{display:"none"}},[r("div",{class:"tabs-bar"},[r("div",{class:"view-title"},"LLM Configuration")]),r("div",{class:"content-body"},[r("div",{class:"settings-container"},[r("div",{class:"settings-content"},[r("div",{class:"settings-section"},[r("h3",{class:"settings-section-title"},"Mode"),r("div",{class:"settings-group"},[r("label",{class:"settings-label"},"Default Mode"),r("select",{class:"settings-select",id:"llm-default",onchange:"markConfigDirty()"},[r("option",{value:"local"},"Local (Ollama/LM Studio)"),r("option",{value:"cloud"},"Cloud (repr.dev)"),r("option",{value:"byok:openai"},"BYOK: OpenAI"),r("option",{value:"byok:anthropic"},"BYOK: Anthropic"),r("option",{value:"byok:groq"},"BYOK: Groq"),r("option",{value:"byok:together"},"BYOK: Together AI")])])]),r("div",{class:"settings-section"},[r("h3",{class:"settings-section-title"},"Local Provider"),r("div",{class:"settings-row"},[r("div",{class:"settings-group"},[r("label",{class:"settings-label"},"Provider"),r("select",{class:"settings-select",id:"llm-local-provider",onchange:"markConfigDirty()"},[r("option",{value:""},"Not configured"),r("option",{value:"ollama"},"Ollama"),r("option",{value:"lmstudio"},"LM Studio"),r("option",{value:"custom"},"Custom")])]),r("div",{class:"settings-group"},[r("label",{class:"settings-label"},"Model"),r("input",{type:"text",class:"settings-input",id:"llm-local-model",placeholder:"e.g., llama3.2",oninput:"markConfigDirty()"})])]),r("div",{class:"settings-group"},[r("label",{class:"settings-label"},"API URL"),r("input",{type:"text",class:"settings-input",id:"llm-local-url",placeholder:"http://localhost:11434/v1",oninput:"markConfigDirty()"})])]),r("div",{class:"btn-row"},[r("button",{class:"btn btn-primary",onclick:"saveConfig()",id:"save-llm-btn",disabled:""},"Save Changes"),r("button",{class:"btn btn-secondary",onclick:"loadConfig()"},"Reset")])])])])]),r("div",{id:"view-privacy",style:{display:"none"}},[r("div",{class:"tabs-bar"},[r("div",{class:"view-title"},"Privacy")]),r("div",{class:"content-body"},[r("div",{class:"settings-container"},[r("div",{class:"settings-content"},[r("div",{class:"settings-section"},[r("h3",{class:"settings-section-title"},"Data Sharing"),r("div",{class:"settings-checkbox-row"},[r("input",{type:"checkbox",class:"settings-checkbox",id:"privacy-local-only",onchange:"markConfigDirty()"}),r("label",{class:"settings-checkbox-label",for:"privacy-local-only"},"Lock to local-only mode")]),r("div",{class:"settings-checkbox-row"},[r("input",{type:"checkbox",class:"settings-checkbox",id:"privacy-send-diffs",onchange:"markConfigDirty()"}),r("label",{class:"settings-checkbox-label",for:"privacy-send-diffs"},"Send diffs to cloud")])]),r("div",{class:"btn-row"},[r("button",{class:"btn btn-primary",onclick:"saveConfig()",id:"save-privacy-btn",disabled:""},"Save Changes"),r("button",{class:"btn btn-secondary",onclick:"loadConfig()"},"Reset")])]),r("div",{class:"settings-content",style:{"margin-top":"24px"}},[r("div",{class:"settings-section"},[r("h3",{class:"settings-section-title"},"Visibility Settings"),r("p",{class:"settings-hint"},"Control who can see your profile, repos, and stories"),r("div",{class:"settings-group"},[r("label",{class:"settings-label"},"Profile Visibility"),r("select",{class:"settings-select",id:"visibility-profile",onchange:"markVisibilityDirty()"},[r("option",{value:"private",selected:""},"Private - Only you"),r("option",{value:"connections"},"Connections - Only friends"),r("option",{value:"public"},"Public - Anyone can see")])]),r("div",{class:"settings-group"},[r("label",{class:"settings-label"},"Default Repo Visibility"),r("select",{class:"settings-select",id:"visibility-repos",onchange:"markVisibilityDirty()"},[r("option",{value:"private",selected:""},"Private - Only you"),r("option",{value:"connections"},"Connections - Only friends"),r("option",{value:"public"},"Public - Anyone can see")])]),r("div",{class:"settings-group"},[r("label",{class:"settings-label"},"Default Story Visibility"),r("select",{class:"settings-select",id:"visibility-stories",onchange:"markVisibilityDirty()"},[r("option",{value:"private",selected:""},"Private - Only you"),r("option",{value:"connections"},"Connections - Only friends"),r("option",{value:"public"},"Public - Anyone can see")])]),r("div",{class:"btn-row"},[r("button",{class:"btn btn-primary",onclick:"saveVisibilitySettings()",id:"save-visibility-btn",disabled:""},"Save Visibility")])])])])])]),r("div",{id:"view-repos",style:{display:"none"}},[r("div",{class:"tabs-bar"},[r("div",{class:"view-title"},"Explore")]),r("div",{class:"content-body"},[r("div",{class:"settings-container"},[r("div",{class:"settings-content"},[r("div",{class:"settings-section"},[r("h3",{class:"settings-section-title"},"Add Repository"),r("div",{class:"settings-group"},[r("label",{class:"settings-label"},"Repository Path"),r("div",{style:{display:"flex",gap:"12px"}},[r("input",{type:"text",class:"settings-input",id:"add-repo-path",placeholder:"~/code/my-project",style:{flex:"1"}}),r("button",{class:"btn btn-primary",onclick:"addRepoClick()"},"Add")])])]),r("div",{class:"settings-section"},[r("h3",{class:"settings-section-title"},"Tracked Repositories"),r("div",{id:"repos-list",class:"repos-list"},[r("div",{class:"loading-text"},"Loading repositories...")])])])])])]),r("div",{id:"view-cron",style:{display:"none"}},[r("div",{class:"tabs-bar"},[r("div",{class:"view-title"},"Activity")]),r("div",{class:"content-body"},[r("div",{class:"settings-container"},[r("div",{class:"settings-content"},[r("div",{class:"settings-section"},[r("h3",{class:"settings-section-title"},"Status"),r("div",{id:"cron-status",class:"cron-status-box"},[r("div",{class:"loading-text"},"Loading cron status...")])])])])])])]),r("aside",{class:"right-sidebar"},[r("div",{class:"widget"},[r("h3",{class:"widget-title"},"Subscribed Repositories"),r("div",{id:"recommended-repos",class:"widget-list"},[r("div",{class:"loading-text"},"Loading repos...")]),r("button",{class:"btn-text",id:"show-more-repos-btn",onclick:"toggleSubscribedRepos()"},"Show more")]),r("div",{class:"widget"},[r("h3",{class:"widget-title"},"Statistics"),r("div",{class:"stats-grid"},[r("div",{class:"stat-box"},[r("div",{class:"stat-label"},"Total Stories"),r("div",{class:"stat-value",id:"stat-total-stories"},"0")]),r("div",{class:"stat-box"},[r("div",{class:"stat-label"},"Active Repos"),r("div",{class:"stat-value",id:"stat-total-repos"},"0")])])]),r("footer",{class:"right-sidebar-footer"},[r("nav",null,[r("a",{href:"#"},"Terms"),r("a",{href:"#"},"Privacy"),r("a",{href:"#"},"Cookies"),r("span",null,"© 2026 Repr")])])])])])],-1)),s[1]||(s[1]=r("div",{class:"modal-overlay",id:"edit-repo-modal",onclick:"if(event.target === this) closeModal('edit-repo-modal')"},[r("div",{class:"modal-container"},[r("div",{class:"modal-header"},[r("h3",{class:"modal-title"},"Edit Repository"),r("button",{class:"modal-close",onclick:"closeModal('edit-repo-modal')"},"×")]),r("div",{class:"modal-body"},[r("div",{class:"settings-group"},[r("label",{class:"settings-label"},"Project Name"),r("div",{class:"editable-field-container"},[r("input",{type:"text",class:"settings-input",id:"edit-repo-name-input",placeholder:"Project Name",onkeydown:"if(event.key === 'Enter') saveRepoEdit()"}),r("span",{class:"editable-field-icon"},"✎")]),r("div",{class:"settings-hint"},"This name will be used in the timeline and stories")]),r("div",{class:"settings-group"},[r("label",{class:"settings-label"},"Path"),r("input",{type:"text",class:"settings-input",id:"edit-repo-path-input",readonly:"",style:{background:"var(--surface-hover)",color:"var(--text-muted)",cursor:"not-allowed"}})])]),r("div",{class:"modal-footer"},[r("button",{class:"btn btn-secondary",onclick:"closeModal('edit-repo-modal')"},"Cancel"),r("button",{class:"btn btn-primary",id:"save-repo-btn",onclick:"saveRepoEdit()"},"Save Changes")])])],-1))],64))}},xi=Yl(kc);xi.use(ea());xi.mount("#app");