om-memory-system 4.11.0 → 4.12.0-next.100

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.
@@ -119,7 +119,7 @@ ${e}</tr>
119
119
  `}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?`th`:`td`;return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
120
120
  `}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${hp(e,!0)}</code>`}br(e){return`<br>`}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=gp(e);if(i===null)return r;e=i;let a=`<a href="`+e+`"`;return t&&(a+=` title="`+hp(t)+`"`),a+=`>`+r+`</a>`,a}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=gp(e);if(i===null)return hp(n);e=i;let a=`<img src="${e}" alt="${hp(n)}"`;return t&&(a+=` title="${hp(t)}"`),a+=`>`,a}text(e){return`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`escaped`in e&&e.escaped?e.text:hp(e.text)}},Dp=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return``+e}image({text:e}){return``+e}br(){return``}checkbox({raw:e}){return e}},Op=class e{options;renderer;textRenderer;constructor(e){this.options=e||Yd,this.options.renderer=this.options.renderer||new Ep,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Dp}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e){this.renderer.parser=this;let t=``;for(let n=0;n<e.length;n++){let r=e[n];if(this.options.extensions?.renderers?.[r.type]){let e=r,n=this.options.extensions.renderers[e.type].call({parser:this},e);if(n!==!1||![`space`,`hr`,`heading`,`code`,`table`,`blockquote`,`list`,`checkbox`,`html`,`def`,`paragraph`,`text`].includes(e.type)){t+=n||``;continue}}let i=r;switch(i.type){case`space`:t+=this.renderer.space(i);break;case`hr`:t+=this.renderer.hr(i);break;case`heading`:t+=this.renderer.heading(i);break;case`code`:t+=this.renderer.code(i);break;case`table`:t+=this.renderer.table(i);break;case`blockquote`:t+=this.renderer.blockquote(i);break;case`list`:t+=this.renderer.list(i);break;case`checkbox`:t+=this.renderer.checkbox(i);break;case`html`:t+=this.renderer.html(i);break;case`def`:t+=this.renderer.def(i);break;case`paragraph`:t+=this.renderer.paragraph(i);break;case`text`:t+=this.renderer.text(i);break;default:{let e=`Token with "`+i.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return t}parseInline(e,t=this.renderer){this.renderer.parser=this;let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let e=this.options.extensions.renderers[i.type].call({parser:this},i);if(e!==!1||![`escape`,`html`,`link`,`image`,`checkbox`,`strong`,`em`,`codespan`,`br`,`del`,`text`].includes(i.type)){n+=e||``;continue}}let a=i;switch(a.type){case`escape`:n+=t.text(a);break;case`html`:n+=t.html(a);break;case`link`:n+=t.link(a);break;case`image`:n+=t.image(a);break;case`checkbox`:n+=t.checkbox(a);break;case`strong`:n+=t.strong(a);break;case`em`:n+=t.em(a);break;case`codespan`:n+=t.codespan(a);break;case`br`:n+=t.br(a);break;case`del`:n+=t.del(a);break;case`text`:n+=t.text(a);break;default:{let e=`Token with "`+a.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return n}},kp=class{options;block;constructor(e){this.options=e||Yd}static passThroughHooks=new Set([`preprocess`,`postprocess`,`processAllTokens`,`emStrongMask`]);static passThroughHooksRespectAsync=new Set([`preprocess`,`postprocess`,`processAllTokens`]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?Tp.lex:Tp.lexInline}provideParser(e=this.block){return e?Op.parse:Op.parseInline}},Ap=new class{defaults=Jd();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Op;Renderer=Ep;TextRenderer=Dp;Lexer=Tp;Tokenizer=wp;Hooks=kp;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let r of e)switch(n=n.concat(t.call(this,r)),r.type){case`table`:{let e=r;for(let r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(let r of e.rows)for(let e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case`list`:{let e=r;n=n.concat(this.walkTokens(e.items,t));break}default:{let e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach(r=>{let i=e[r].flat(1/0);n=n.concat(this.walkTokens(i,t))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error(`extension name required`);if(`renderer`in e){let n=t.renderers[e.name];n?t.renderers[e.name]=function(...t){let r=e.renderer.apply(this,t);return r===!1&&(r=n.apply(this,t)),r}:t.renderers[e.name]=e.renderer}if(`tokenizer`in e){if(!e.level||e.level!==`block`&&e.level!==`inline`)throw Error(`extension level must be 'block' or 'inline'`);let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&(e.level===`block`?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:e.level===`inline`&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}`childTokens`in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){let t=this.defaults.renderer||new Ep(this.defaults);for(let n in e.renderer){if(!(n in t))throw Error(`renderer '${n}' does not exist`);if([`options`,`parser`].includes(n))continue;let r=n,i=e.renderer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n||``}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new wp(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw Error(`tokenizer '${n}' does not exist`);if([`options`,`rules`,`lexer`].includes(n))continue;let r=n,i=e.tokenizer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new kp;for(let n in e.hooks){if(!(n in t))throw Error(`hook '${n}' does not exist`);if([`options`,`block`].includes(n))continue;let r=n,i=e.hooks[r],a=t[r];t[r]=kp.passThroughHooks.has(n)?e=>{if(this.defaults.async&&kp.passThroughHooksRespectAsync.has(n))return(async()=>{let n=await i.call(t,e);return a.call(t,n)})();let r=i.call(t,e);return a.call(t,r)}:(...e)=>{if(this.defaults.async)return(async()=>{let n=await i.apply(t,e);return n===!1&&(n=await a.apply(t,e)),n})();let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return Tp.lex(e,t??this.defaults)}parser(e,t){return Op.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return a(Error(`marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise.`));if(typeof t>`u`||t===null)return a(Error(`marked(): input parameter is undefined or null`));if(typeof t!=`string`)return a(Error(`marked(): input parameter is of type `+Object.prototype.toString.call(t)+`, string expected`));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let n=i.hooks?await i.hooks.preprocess(t):t,r=await(i.hooks?await i.hooks.provideLexer(e):e?Tp.lex:Tp.lexInline)(n,i),a=i.hooks?await i.hooks.processAllTokens(r):r;i.walkTokens&&await Promise.all(this.walkTokens(a,i.walkTokens));let o=await(i.hooks?await i.hooks.provideParser(e):e?Op.parse:Op.parseInline)(a,i);return i.hooks?await i.hooks.postprocess(o):o})().catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let n=(i.hooks?i.hooks.provideLexer(e):e?Tp.lex:Tp.lexInline)(t,i);i.hooks&&(n=i.hooks.processAllTokens(n)),i.walkTokens&&this.walkTokens(n,i.walkTokens);let r=(i.hooks?i.hooks.provideParser(e):e?Op.parse:Op.parseInline)(n,i);return i.hooks&&(r=i.hooks.postprocess(r)),r}catch(e){return a(e)}}}onError(e,t){return n=>{if(n.message+=`
121
121
  Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error occurred:</p><pre>`+hp(n.message+``,!0)+`</pre>`;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function jp(e,t){return Ap.parse(e,t)}jp.options=jp.setOptions=function(e){return Ap.setOptions(e),jp.defaults=Ap.defaults,Xd(jp.defaults),jp},jp.getDefaults=Jd,jp.defaults=Yd;function Mp(...e){return Ap.use(...e),jp.defaults=Ap.defaults,Xd(jp.defaults),jp}jp.use=Mp,jp.walkTokens=function(e,t){return Ap.walkTokens(e,t)},jp.parseInline=Ap.parseInline,jp.Parser=Op,jp.parser=Op.parse,jp.Renderer=Ep,jp.TextRenderer=Dp,jp.Lexer=Tp,jp.lexer=Tp.lex,jp.Tokenizer=wp,jp.Hooks=kp,jp.parse=jp,jp.options,jp.setOptions,jp.walkTokens,jp.parseInline,Op.parse,Tp.lex,jp.setOptions({gfm:!0,breaks:!0});function Np(e){let t=jp.parse(e,{async:!1});return qd.sanitize(t)}function Pp(e){if(e.projectPath){let t=e.projectPath.replace(/\\/g,`/`).split(`/`).filter(e=>e);return t[t.length-1]||e.projectPath}return e.displayName||e.id}function Fp(e){return{createdDate:xu(e.createdAt),updatedDate:e.updatedAt&&e.updatedAt!==e.createdAt?xu(e.updatedAt):null}}function Ip(e,t){return e.similarity===void 0?null:t?`${Math.round(e.similarity*100)}%`:`${e.similarity}%`}function Lp({variant:e,item:t,memory:n,prompt:r,selected:i=!1,onSelect:a,onPin:o,onUnpin:s,onEdit:c,onDeleteMemory:l,onDeletePrompt:u,activeKeyword:d,onKeywordClick:f}){let{t:p}=pr();if(e===`pair`&&n&&r){let e=n.isPinned||!1,t=Fp(n),u=Ip(n,!0);return(0,U.jsxs)(`div`,{className:`min-w-0 rounded-xl border border-border bg-card p-3 space-y-3 ${i?`ring-1 ring-input`:``} ${e?`border-primary/40`:``}`,"data-id":n.id,children:[(0,U.jsxs)(`div`,{className:`space-y-2 rounded-lg bg-muted/40 p-3`,children:[(0,U.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,U.jsx)(_u,{variant:`secondary`,children:p(`badge-prompt`)}),(0,U.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:xu(r.createdAt)})]}),(0,U.jsx)(`p`,{className:`text-sm whitespace-pre-wrap break-words`,children:r.content})]}),(0,U.jsx)(`div`,{className:`flex justify-center text-muted-foreground`,children:(0,U.jsx)(te,{className:`size-4`})}),(0,U.jsxs)(`div`,{className:`space-y-2`,children:[(0,U.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-2`,children:[(0,U.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5 min-w-0`,children:[(0,U.jsx)(Ji,{checked:i,onCheckedChange:e=>a?.(n.id,e===!0)}),(0,U.jsx)(_u,{children:p(`badge-memory`)}),n.memoryType?(0,U.jsx)(bu,{type:n.memoryType}):null,u?(0,U.jsx)(`span`,{className:`text-xs text-primary`,children:u}):null,e?(0,U.jsx)(_u,{variant:`secondary`,children:p(`badge-pinned`)}):null,(0,U.jsx)(`span`,{dir:`auto`,className:`text-xs text-muted-foreground font-mono min-w-0 break-all`,children:n.displayName||n.id})]}),(0,U.jsxs)(`div`,{className:`flex items-center gap-1 shrink-0`,children:[e?(0,U.jsx)(K,{variant:`ghost`,size:`icon-xs`,title:`Unpin`,onClick:()=>s?.(n.id),children:(0,U.jsx)(_e,{className:`size-3.5 fill-current`})}):(0,U.jsx)(K,{variant:`ghost`,size:`icon-xs`,title:`Pin`,onClick:()=>o?.(n.id),children:(0,U.jsx)(_e,{className:`size-3.5`})}),(0,U.jsx)(K,{variant:`ghost`,size:`icon-xs`,onClick:()=>c?.(n.id),children:(0,U.jsx)(he,{className:`size-3.5`})}),(0,U.jsx)(yu,{content:p(`tooltip-delete-pair`),children:(0,U.jsx)(K,{variant:`destructive`,size:`icon-xs`,"aria-label":p(`btn-delete-pair`),onClick:()=>l?.(n.id,!0),children:(0,U.jsx)(Oe,{className:`size-3.5`})})})]})]}),n.tags?.length?(0,U.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:n.tags.map(e=>(0,U.jsx)(yu,{content:p(`tooltip-tags`),className:`min-w-0 max-w-full`,children:(0,U.jsx)(hu,{keyword:e,active:d?.toLowerCase()===e.toLowerCase(),"aria-label":`${p(`tooltip-filter-keyword`)}: ${e}`,onClick:f})},e))}):null,(0,U.jsx)(`div`,{className:`markdown-content text-sm prose-invert max-w-none`,dangerouslySetInnerHTML:{__html:Np(n.content)}}),(0,U.jsxs)(`div`,{className:`flex flex-wrap gap-3 text-xs text-muted-foreground`,children:[(0,U.jsxs)(`span`,{children:[p(`date-created`),` `,t.createdDate]}),t.updatedDate?(0,U.jsxs)(`span`,{children:[p(`date-updated`),` `,t.updatedDate]}):null,(0,U.jsxs)(`span`,{dir:`ltr`,className:`font-mono break-all`,children:[`ID: `,n.id]})]})]})]})}if(e===`prompt`&&t){let e=!!t.linkedMemoryId;return(0,U.jsxs)(`div`,{className:`min-w-0 rounded-xl border border-border bg-card p-3 space-y-2 ${i?`ring-1 ring-input`:``}`,"data-id":t.id,children:[(0,U.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-2`,children:[(0,U.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:[(0,U.jsx)(Ji,{checked:i,onCheckedChange:e=>a?.(t.id,e===!0)}),(0,U.jsx)(R,{className:`size-3.5 text-muted-foreground`}),(0,U.jsx)(_u,{variant:`secondary`,children:p(`badge-prompt`)}),e?(0,U.jsxs)(_u,{variant:`outline`,className:`border-status-success text-status-success bg-transparent`,children:[(0,U.jsx)(se,{className:`size-3`}),p(`badge-linked`)]}):null,(0,U.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:xu(t.createdAt)})]}),e?(0,U.jsx)(yu,{content:p(`tooltip-delete-prompt-pair`),children:(0,U.jsx)(K,{variant:`destructive`,size:`icon-xs`,"aria-label":p(e?`btn-delete-pair`:`btn-delete`),onClick:()=>u?.(t.id,e),children:(0,U.jsx)(Oe,{className:`size-3.5`})})}):(0,U.jsx)(K,{variant:`destructive`,size:`icon-xs`,"aria-label":p(e?`btn-delete-pair`:`btn-delete`),title:p(`btn-delete`),onClick:()=>u?.(t.id,e),children:(0,U.jsx)(Oe,{className:`size-3.5`})})]}),(0,U.jsx)(`p`,{className:`text-sm whitespace-pre-wrap break-words`,children:t.content}),e?(0,U.jsxs)(`div`,{className:`flex items-center gap-1 text-xs text-muted-foreground`,children:[(0,U.jsx)(te,{className:`size-3`}),p(`text-generated-above`),(0,U.jsx)(A,{className:`size-3`})]}):null]})}if(e===`memory`&&t){let e=t.isPinned||!1,n=!!t.linkedPromptId,r=Fp(t),u=Ip(t,!1);return(0,U.jsxs)(`div`,{className:`min-w-0 rounded-xl border border-border bg-card p-3 space-y-2 ${i?`ring-1 ring-input`:``} ${e?`border-primary/40`:``}`,"data-id":t.id,children:[(0,U.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-2`,children:[(0,U.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5 min-w-0`,children:[(0,U.jsx)(Ji,{checked:i,onCheckedChange:e=>a?.(t.id,e===!0)}),t.memoryType?(0,U.jsx)(bu,{type:t.memoryType}):null,n?(0,U.jsxs)(_u,{variant:`outline`,className:`border-status-success text-status-success bg-transparent`,children:[(0,U.jsx)(se,{className:`size-3`}),p(`badge-linked`)]}):null,u?(0,U.jsx)(`span`,{className:`text-xs text-primary`,children:u}):null,e?(0,U.jsx)(_u,{variant:`secondary`,children:p(`badge-pinned`)}):null,(0,U.jsx)(`span`,{dir:`auto`,className:`text-xs text-muted-foreground font-mono min-w-0 break-all`,children:Pp(t)}),t.projectPath?(0,U.jsx)(`span`,{dir:`ltr`,className:`text-code text-muted-foreground font-mono break-all w-full`,children:t.projectPath}):null]}),(0,U.jsxs)(`div`,{className:`flex items-center gap-1 shrink-0`,children:[e?(0,U.jsx)(K,{variant:`ghost`,size:`icon-xs`,title:`Unpin`,onClick:()=>s?.(t.id),children:(0,U.jsx)(_e,{className:`size-3.5 fill-current`})}):(0,U.jsx)(K,{variant:`ghost`,size:`icon-xs`,title:`Pin`,onClick:()=>o?.(t.id),children:(0,U.jsx)(_e,{className:`size-3.5`})}),(0,U.jsx)(K,{variant:`ghost`,size:`icon-xs`,onClick:()=>c?.(t.id),children:(0,U.jsx)(he,{className:`size-3.5`})}),n?(0,U.jsx)(yu,{content:p(`tooltip-delete-pair`),children:(0,U.jsx)(K,{variant:`destructive`,size:`icon-xs`,"aria-label":p(n?`btn-delete-pair`:`btn-delete`),onClick:()=>l?.(t.id,n),children:(0,U.jsx)(Oe,{className:`size-3.5`})})}):(0,U.jsx)(K,{variant:`destructive`,size:`icon-xs`,"aria-label":p(n?`btn-delete-pair`:`btn-delete`),title:p(`btn-delete`),onClick:()=>l?.(t.id,n),children:(0,U.jsx)(Oe,{className:`size-3.5`})})]})]}),t.tags?.length?(0,U.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:t.tags.map(e=>(0,U.jsx)(yu,{content:p(`tooltip-tags`),className:`min-w-0 max-w-full`,children:(0,U.jsx)(hu,{keyword:e,active:d?.toLowerCase()===e.toLowerCase(),"aria-label":`${p(`tooltip-filter-keyword`)}: ${e}`,onClick:f})},e))}):null,(0,U.jsx)(`div`,{className:`markdown-content text-sm prose-invert max-w-none`,dangerouslySetInnerHTML:{__html:Np(t.content)}}),n?(0,U.jsxs)(`div`,{className:`flex items-center gap-1 text-xs text-muted-foreground`,children:[(0,U.jsx)(A,{className:`size-3`}),p(`text-from-below`),(0,U.jsx)(te,{className:`size-3`})]}):null,(0,U.jsxs)(`div`,{className:`flex flex-wrap gap-3 text-xs text-muted-foreground`,children:[(0,U.jsxs)(`span`,{children:[p(`date-created`),` `,r.createdDate]}),r.updatedDate?(0,U.jsxs)(`span`,{children:[p(`date-updated`),` `,r.updatedDate]}):null,(0,U.jsxs)(`span`,{dir:`ltr`,className:`font-mono break-all`,children:[`ID: `,t.id]})]})]})}return null}function Rp(e){let t=new Map(e.map(e=>[e.id,e])),n=[],r=new Set;for(let i of e)if(!r.has(i.id)){if(i.type===`memory`&&i.linkedPromptId&&t.has(i.linkedPromptId)){let e=t.get(i.linkedPromptId);n.push({isPair:!0,memory:i,prompt:e}),r.add(i.id),r.add(e.id)}else if(i.type===`prompt`&&i.linkedMemoryId&&t.has(i.linkedMemoryId)){let e=t.get(i.linkedMemoryId);n.push({isPair:!0,memory:e,prompt:i}),r.add(i.id),r.add(e.id)}else n.push({isPair:!1,type:i.type,item:i}),r.add(i.id)}return n.sort((e,t)=>{let n=e.isPair?e.memory.createdAt:e.item.createdAt,r=t.isPair?t.memory.createdAt:t.item.createdAt;return new Date(r).getTime()-new Date(n).getTime()})}function zp({memories:e,selectedIds:t,currentPage:n,totalPages:r,loading:i=!1,error:a=null,onSelect:o,onPageChange:s,onPin:c,onUnpin:l,onEdit:u,onDeleteMemory:d,onDeletePrompt:f,activeKeyword:p,onKeywordClick:m}){let{t:h}=pr(),g=(0,_.useMemo)(()=>Rp(e),[e]),v=h(`text-page`,{current:n,total:r}),y=(0,U.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,U.jsx)(K,{variant:`outline`,size:`icon-xs`,disabled:!(n>1),onClick:()=>s(-1),children:(0,U.jsx)(re,{className:`size-3.5`})}),(0,U.jsx)(`span`,{className:`text-xs text-muted-foreground tabular-nums`,children:v}),(0,U.jsx)(K,{variant:`outline`,size:`icon-xs`,disabled:!(n<r),onClick:()=>s(1),children:(0,U.jsx)(M,{className:`size-3.5`})})]});return(0,U.jsxs)(`div`,{className:`space-y-3`,children:[(0,U.jsx)(`div`,{className:`grid min-h-32 items-start gap-3 lg:grid-cols-2`,children:i&&e.length===0?(0,U.jsx)(`div`,{className:`text-sm text-muted-foreground py-8 text-center`,children:h(`loading-init`)}):a?(0,U.jsxs)(`div`,{className:`text-sm text-destructive py-8 text-center`,children:[`Error: `,a]}):g.length===0?(0,U.jsx)(`div`,{className:`text-sm text-muted-foreground py-8 text-center`,children:h(`empty-memories`)}):g.map(e=>e.isPair?(0,U.jsx)(Lp,{variant:`pair`,memory:e.memory,prompt:e.prompt,selected:t.has(e.memory.id),onSelect:o,onPin:c,onUnpin:l,onEdit:u,onDeleteMemory:d,onDeletePrompt:f,activeKeyword:p,onKeywordClick:m},e.memory.id):e.type===`prompt`?(0,U.jsx)(Lp,{variant:`prompt`,item:e.item,selected:t.has(e.item.id),onSelect:o,onPin:c,onUnpin:l,onEdit:u,onDeleteMemory:d,onDeletePrompt:f,activeKeyword:p,onKeywordClick:m},e.item.id):(0,U.jsx)(Lp,{variant:`memory`,item:e.item,selected:t.has(e.item.id),onSelect:o,onPin:c,onUnpin:l,onEdit:u,onDeleteMemory:d,onDeletePrompt:f,activeKeyword:p,onKeywordClick:m},e.item.id))}),(0,U.jsx)(`div`,{className:`flex justify-end`,children:y})]})}var Bp=Object.defineProperty,Vp=(e,t)=>Bp(e,`name`,{value:t,configurable:!0}),Hp=_.createContext(void 0);function Up(e){let t=_.useContext(Hp);return e||t||`ltr`}Vp(Up,`useDirection`);var Wp=Object.defineProperty,Gp=(e,t)=>Wp(e,`name`,{value:t,configurable:!0});function Kp(e,[t,n]){return Math.min(n,Math.max(t,e))}Gp(Kp,`clamp`);var qp=Object.defineProperty,Q=(e,t)=>qp(e,`name`,{value:t,configurable:!0});function Jp(e,t){return _.useReducer((e,n)=>t[e][n]??e,e)}Q(Jp,`useStateMachine`);var Yp=`ScrollArea`,[Xp,Zp]=Wr(Yp),[Qp,$p]=Xp(Yp),em=_.forwardRef(Q(function(e,t){let{__scopeScrollArea:n,type:r=`hover`,dir:i,scrollHideDelay:a=600,...o}=e,[s,c]=_.useState(null),[l,u]=_.useState(null),[d,f]=_.useState(null),[p,m]=_.useState(null),[h,g]=_.useState(null),[v,y]=_.useState(0),[b,x]=_.useState(0),[S,C]=_.useState(!1),[w,T]=_.useState(!1),E=br(t,c),D=Up(i);return(0,U.jsx)(Qp,{scope:n,type:r,dir:D,scrollHideDelay:a,scrollArea:s,viewport:l,onViewportChange:u,content:d,onContentChange:f,scrollbarX:p,onScrollbarXChange:m,scrollbarXEnabled:S,onScrollbarXEnabledChange:C,scrollbarY:h,onScrollbarYChange:g,scrollbarYEnabled:w,onScrollbarYEnabledChange:T,onCornerWidthChange:y,onCornerHeightChange:x,children:(0,U.jsx)(Oi.div,{dir:D,...o,ref:E,style:{position:`relative`,"--radix-scroll-area-corner-width":v+`px`,"--radix-scroll-area-corner-height":b+`px`,...e.style}})})},`ScrollArea`)),tm=`ScrollAreaViewport`,nm=_.forwardRef(Q(function(e,t){let{__scopeScrollArea:n,children:r,nonce:i,...a}=e,o=$p(tm,n),s=br(t,_.useRef(null),o.onViewportChange);return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(rm,{nonce:i}),(0,U.jsx)(Oi.div,{"data-radix-scroll-area-viewport":``,...a,ref:s,style:{overflowX:o.scrollbarXEnabled?`scroll`:`hidden`,overflowY:o.scrollbarYEnabled?`scroll`:`hidden`,...e.style},children:(0,U.jsx)(`div`,{ref:o.onContentChange,style:{minWidth:`100%`,display:`table`},children:r})})]})},`ScrollAreaViewport`)),rm=_.memo(Q(function({nonce:e}){return(0,U.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}`},nonce:e})},`ScrollAreaViewportStyle`),(e,t)=>e.nonce===t.nonce),im=`ScrollAreaScrollbar`,am=_.forwardRef(Q(function(e,t){let{forceMount:n,...r}=e,i=$p(im,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:o}=i,s=e.orientation===`horizontal`;return _.useEffect(()=>(s?a(!0):o(!0),()=>{s?a(!1):o(!1)}),[s,a,o]),i.type===`hover`?(0,U.jsx)(om,{...r,ref:t,forceMount:n}):i.type===`scroll`?(0,U.jsx)(sm,{...r,ref:t,forceMount:n}):i.type===`auto`?(0,U.jsx)(cm,{...r,ref:t,forceMount:n}):i.type===`always`?(0,U.jsx)(lm,{...r,ref:t,"data-state":`visible`}):null},`ScrollAreaScrollbar`)),om=_.forwardRef(Q(function(e,t){let{forceMount:n,...r}=e,i=$p(im,e.__scopeScrollArea),[a,o]=_.useState(!1);return _.useEffect(()=>{let e=i.scrollArea,t=0;if(e){let n=Q(()=>{window.clearTimeout(t),o(!0)},`handlePointerEnter`),r=Q(()=>{t=window.setTimeout(()=>o(!1),i.scrollHideDelay)},`handlePointerLeave`);return e.addEventListener(`pointerenter`,n),e.addEventListener(`pointerleave`,r),()=>{window.clearTimeout(t),e.removeEventListener(`pointerenter`,n),e.removeEventListener(`pointerleave`,r)}}},[i.scrollArea,i.scrollHideDelay]),(0,U.jsx)(bi,{present:n||a,children:(0,U.jsx)(cm,{"data-state":a?`visible`:`hidden`,...r,ref:t})})},`ScrollAreaScrollbarHover`)),sm=_.forwardRef(Q(function(e,t){let{forceMount:n,...r}=e,i=$p(im,e.__scopeScrollArea),a=e.orientation===`horizontal`,o=km(()=>c(`SCROLL_END`),100),[s,c]=Jp(`hidden`,{hidden:{SCROLL:`scrolling`},scrolling:{SCROLL_END:`idle`,POINTER_ENTER:`interacting`},interacting:{SCROLL:`interacting`,POINTER_LEAVE:`idle`},idle:{HIDE:`hidden`,SCROLL:`scrolling`,POINTER_ENTER:`interacting`}});return _.useEffect(()=>{if(s===`idle`){let e=window.setTimeout(()=>c(`HIDE`),i.scrollHideDelay);return()=>window.clearTimeout(e)}},[s,i.scrollHideDelay,c]),_.useEffect(()=>{let e=i.viewport,t=a?`scrollLeft`:`scrollTop`;if(e){let n=e[t],r=Q(()=>{let r=e[t];n!==r&&(c(`SCROLL`),o()),n=r},`handleScroll`);return e.addEventListener(`scroll`,r),()=>e.removeEventListener(`scroll`,r)}},[i.viewport,a,c,o]),(0,U.jsx)(bi,{present:n||s!==`hidden`,children:(0,U.jsx)(lm,{"data-state":s===`hidden`?`hidden`:`visible`,...r,ref:t,onPointerEnter:Yr(e.onPointerEnter,()=>c(`POINTER_ENTER`)),onPointerLeave:Yr(e.onPointerLeave,()=>c(`POINTER_LEAVE`))})})},`ScrollAreaScrollbarScroll`)),cm=_.forwardRef(Q(function(e,t){let n=$p(im,e.__scopeScrollArea),{forceMount:r,...i}=e,[a,o]=_.useState(!1),s=e.orientation===`horizontal`,c=km(()=>{if(n.viewport){let e=n.viewport.offsetWidth<n.viewport.scrollWidth,t=n.viewport.offsetHeight<n.viewport.scrollHeight;o(s?e:t)}},10);return Am(n.viewport,c),Am(n.content,c),(0,U.jsx)(bi,{present:r||a,children:(0,U.jsx)(lm,{"data-state":a?`visible`:`hidden`,...i,ref:t})})},`ScrollAreaScrollbarAuto`)),lm=_.forwardRef(Q(function(e,t){let{orientation:n=`vertical`,...r}=e,i=$p(im,e.__scopeScrollArea),a=_.useRef(null),o=_.useRef(0),[s,c]=_.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),l=Sm(s.viewport,s.content),u={...r,sizes:s,onSizesChange:c,hasThumb:l>0&&l<1,onThumbChange:Q(e=>a.current=e,`onThumbChange`),onThumbPointerUp:Q(()=>o.current=0,`onThumbPointerUp`),onThumbPointerDown:Q(e=>o.current=e,`onThumbPointerDown`)};function d(e,t){return wm(e,o.current,s,t)}return Q(d,`getScrollPosition`),n===`horizontal`?(0,U.jsx)(um,{...u,ref:t,onThumbPositionChange:()=>{if(i.viewport&&a.current){let e=i.viewport.scrollLeft,t=Tm(e,s,i.dir);a.current.style.transform=`translate3d(${t}px, 0, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollLeft=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollLeft=d(e,i.dir))}}):n===`vertical`?(0,U.jsx)(dm,{...u,ref:t,onThumbPositionChange:()=>{if(i.viewport&&a.current){let e=i.viewport.scrollTop,t=Tm(e,s);a.current.style.transform=`translate3d(0, ${t}px, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollTop=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollTop=d(e))}}):null},`ScrollAreaScrollbarVisible`)),um=_.forwardRef(Q(function(e,t){let{sizes:n,onSizesChange:r,...i}=e,a=$p(im,e.__scopeScrollArea),[o,s]=_.useState(),c=_.useRef(null),l=br(t,c,a.onScrollbarXChange);return _.useEffect(()=>{c.current&&s(getComputedStyle(c.current))},[c]),(0,U.jsx)(mm,{"data-orientation":`horizontal`,...i,ref:l,sizes:n,style:{bottom:0,left:a.dir===`rtl`?`var(--radix-scroll-area-corner-width)`:0,right:a.dir===`ltr`?`var(--radix-scroll-area-corner-width)`:0,"--radix-scroll-area-thumb-width":Cm(n)+`px`,...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.x),onDragScroll:t=>e.onDragScroll(t.x),onWheelScroll:(t,n)=>{if(a.viewport){let r=a.viewport.scrollLeft+t.deltaX;e.onWheelScroll(r),Dm(r,n)&&t.preventDefault()}},onResize:()=>{c.current&&a.viewport&&o&&r({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:xm(o.paddingLeft),paddingEnd:xm(o.paddingRight)}})}})},`ScrollAreaScrollbarX`)),dm=_.forwardRef(Q(function(e,t){let{sizes:n,onSizesChange:r,...i}=e,a=$p(im,e.__scopeScrollArea),[o,s]=_.useState(),c=_.useRef(null),l=br(t,c,a.onScrollbarYChange);return _.useEffect(()=>{c.current&&s(getComputedStyle(c.current))},[c]),(0,U.jsx)(mm,{"data-orientation":`vertical`,...i,ref:l,sizes:n,style:{top:0,right:a.dir===`ltr`?0:void 0,left:a.dir===`rtl`?0:void 0,bottom:`var(--radix-scroll-area-corner-height)`,"--radix-scroll-area-thumb-height":Cm(n)+`px`,...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.y),onDragScroll:t=>e.onDragScroll(t.y),onWheelScroll:(t,n)=>{if(a.viewport){let r=a.viewport.scrollTop+t.deltaY;e.onWheelScroll(r),Dm(r,n)&&t.preventDefault()}},onResize:()=>{c.current&&a.viewport&&o&&r({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:xm(o.paddingTop),paddingEnd:xm(o.paddingBottom)}})}})},`ScrollAreaScrollbarY`)),[fm,pm]=Xp(im),mm=_.forwardRef(Q(function(e,t){let{__scopeScrollArea:n,sizes:r,hasThumb:i,onThumbChange:a,onThumbPointerUp:o,onThumbPointerDown:s,onThumbPositionChange:c,onDragScroll:l,onWheelScroll:u,onResize:d,...f}=e,p=$p(im,n),[m,h]=_.useState(null),g=br(t,h),v=_.useRef(null),y=_.useRef(``),b=p.viewport,x=r.content-r.viewport,S=na(u),C=na(c),w=km(d,10);function T(e){if(v.current){let t=e.clientX-v.current.left,n=e.clientY-v.current.top;l({x:t,y:n})}}return Q(T,`handleDragScroll`),_.useEffect(()=>{let e=Q(e=>{let t=e.target;m?.contains(t)&&S(e,x)},`handleWheel`);return document.addEventListener(`wheel`,e,{passive:!1}),()=>document.removeEventListener(`wheel`,e,{passive:!1})},[b,m,x,S]),_.useEffect(C,[r,C]),Am(m,w),Am(p.content,w),(0,U.jsx)(fm,{scope:n,scrollbar:m,hasThumb:i,onThumbChange:na(a),onThumbPointerUp:na(o),onThumbPositionChange:C,onThumbPointerDown:na(s),children:(0,U.jsx)(Oi.div,{...f,ref:g,style:{position:`absolute`,...f.style},onPointerDown:Yr(e.onPointerDown,e=>{e.button===0&&(e.target.setPointerCapture(e.pointerId),v.current=m.getBoundingClientRect(),y.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect=`none`,p.viewport&&(p.viewport.style.scrollBehavior=`auto`),T(e))}),onPointerMove:Yr(e.onPointerMove,T),onPointerUp:Yr(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),document.body.style.webkitUserSelect=y.current,p.viewport&&(p.viewport.style.scrollBehavior=``),v.current=null})})})},`ScrollAreaScrollbarImpl`)),hm=`ScrollAreaThumb`,gm=_.forwardRef(Q(function(e,t){let{forceMount:n,...r}=e,i=pm(hm,e.__scopeScrollArea);return(0,U.jsx)(bi,{present:n||i.hasThumb,children:(0,U.jsx)(_m,{ref:t,...r})})},`ScrollAreaThumb`)),_m=_.forwardRef(Q(function(e,t){let{__scopeScrollArea:n,style:r,...i}=e,a=$p(hm,n),o=pm(hm,n),{onThumbPositionChange:s}=o,c=br(t,o.onThumbChange),l=_.useRef(void 0),u=km(()=>{l.current&&=(l.current(),void 0)},100);return _.useEffect(()=>{let e=a.viewport;if(e){let t=Q(()=>{if(u(),!l.current){let t=Om(e,s);l.current=t,s()}},`handleScroll`);return s(),e.addEventListener(`scroll`,t),()=>e.removeEventListener(`scroll`,t)}},[a.viewport,u,s]),(0,U.jsx)(Oi.div,{"data-state":o.hasThumb?`visible`:`hidden`,...i,ref:c,style:{width:`var(--radix-scroll-area-thumb-width)`,height:`var(--radix-scroll-area-thumb-height)`,...r},onPointerDownCapture:Yr(e.onPointerDownCapture,e=>{let t=e.target.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;o.onThumbPointerDown({x:n,y:r})}),onPointerUp:Yr(e.onPointerUp,o.onThumbPointerUp)})},`ScrollAreaThumbImpl`)),vm=`ScrollAreaCorner`,ym=_.forwardRef(Q(function(e,t){let n=$p(vm,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!==`scroll`&&r?(0,U.jsx)(bm,{...e,ref:t}):null},`ScrollAreaCorner`)),bm=_.forwardRef(Q(function(e,t){let{__scopeScrollArea:n,...r}=e,i=$p(vm,n),[a,o]=_.useState(0),[s,c]=_.useState(0),l=!!(a&&s),{onCornerWidthChange:u,onCornerHeightChange:d}=i;return Am(i.scrollbarX,()=>{let e=i.scrollbarX?.offsetHeight||0;i.onCornerHeightChange(e),c(e)}),Am(i.scrollbarY,()=>{let e=i.scrollbarY?.offsetWidth||0;i.onCornerWidthChange(e),o(e)}),_.useEffect(()=>()=>{u(0),d(0)},[u,d]),l?(0,U.jsx)(Oi.div,{...r,ref:t,style:{width:a,height:s,position:`absolute`,right:i.dir===`ltr`?0:void 0,left:i.dir===`rtl`?0:void 0,bottom:0,...e.style}}):null},`ScrollAreaCornerImpl`));function xm(e){return e?parseInt(e,10):0}Q(xm,`toInt`);function Sm(e,t){let n=e/t;return isNaN(n)?0:n}Q(Sm,`getThumbRatio`);function Cm(e){let t=Sm(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}Q(Cm,`getThumbSize`);function wm(e,t,n,r=`ltr`){let i=Cm(n),a=i/2,o=t||a,s=i-o,c=n.scrollbar.paddingStart+o,l=n.scrollbar.size-n.scrollbar.paddingEnd-s,u=n.content-n.viewport,d=r===`ltr`?[0,u]:[u*-1,0];return Em([c,l],d)(e)}Q(wm,`getScrollPositionFromPointer`);function Tm(e,t,n=`ltr`){let r=Cm(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-i,o=t.content-t.viewport,s=a-r,c=Kp(e,n===`ltr`?[0,o]:[o*-1,0]);return Em([0,o],[0,s])(c)}Q(Tm,`getThumbOffsetFromScroll`);function Em(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}Q(Em,`linearScale`);function Dm(e,t){return e>0&&e<t}Q(Dm,`isScrollingWithinScrollbarBounds`);var Om=Q((e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return Q((function i(){let a={left:e.scrollLeft,top:e.scrollTop},o=n.left!==a.left,s=n.top!==a.top;(o||s)&&t(),n=a,r=window.requestAnimationFrame(i)}),`loop`)(),()=>window.cancelAnimationFrame(r)},`addUnlinkedScrollListener`);function km(e,t){let n=na(e),r=_.useRef(0);return _.useEffect(()=>()=>window.clearTimeout(r.current),[]),_.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}Q(km,`useDebounceCallback`);function Am(e,t){let n=na(t);ei(()=>{let t=0;if(e){let r=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}},[e,n])}Q(Am,`useResizeObserver`);var jm=em,Mm=nm,Nm=ym;function Pm({className:e,children:t,...n}){return(0,U.jsxs)(jm,{"data-slot":`scroll-area`,className:H(`relative`,e),...n,children:[(0,U.jsx)(Mm,{"data-slot":`scroll-area-viewport`,className:`focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1`,children:t}),(0,U.jsx)(Fm,{}),(0,U.jsx)(Nm,{})]})}function Fm({className:e,orientation:t=`vertical`,...n}){return(0,U.jsx)(am,{"data-slot":`scroll-area-scrollbar`,orientation:t,className:H(`flex touch-none p-px transition-colors select-none`,t===`vertical`&&`h-full w-2.5 border-l border-l-transparent`,t===`horizontal`&&`h-2.5 flex-col border-t border-t-transparent`,e),...n,children:(0,U.jsx)(gm,{"data-slot":`scroll-area-thumb`,className:`bg-border relative flex-1 rounded-full`})})}function Im({open:e=!1,profileId:t=``,onOpenChange:n}){let{t:r}=pr(),[i,a]=(0,_.useState)(!1),[o,s]=(0,_.useState)([]);(0,_.useEffect)(()=>{e&&t&&c(t)},[e,t]);async function c(e){a(!0),s([]);let t=await Wn(`/api/user-profile/changelog?profileId=${encodeURIComponent(e)}&limit=10`);a(!1),t.success&&t.data?s(t.data):s([])}return(0,U.jsx)(Fs,{open:e,onOpenChange:n,children:(0,U.jsxs)(Rs,{className:`sm:max-w-lg`,children:[(0,U.jsx)(zs,{children:(0,U.jsx)(Vs,{children:r(`modal-changelog-title`)})}),(0,U.jsx)(Pm,{className:`max-h-80`,children:i?(0,U.jsx)(`div`,{className:`text-sm text-muted-foreground py-6 text-center`,children:r(`loading-changelog`)}):o.length===0?(0,U.jsx)(`div`,{className:`text-sm text-muted-foreground py-6 text-center`,children:r(`empty-changelog`)}):(0,U.jsx)(`div`,{className:`space-y-3 pr-3`,children:o.map((e,t)=>(0,U.jsxs)(`div`,{className:`rounded-lg border border-border p-3 space-y-1`,children:[(0,U.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 text-xs`,children:[(0,U.jsxs)(`span`,{className:`font-medium`,children:[`v`,e.version]}),(0,U.jsx)(`span`,{className:`text-muted-foreground`,children:e.changeType}),(0,U.jsx)(`span`,{className:`text-muted-foreground ml-auto`,children:xu(e.createdAt)})]}),(0,U.jsx)(`p`,{className:`text-sm`,children:e.changeSummary})]},`${e.version}-${t}`))})})]})})}function Lm({className:e,type:t,...n}){return(0,U.jsx)(`input`,{type:t,"data-slot":`input`,className:H(`border-input file:text-foreground placeholder:text-muted-foreground selection:bg-selection selection:text-foreground flex h-9 w-full min-w-0 rounded-[10px] border bg-card px-2.5 py-1 text-ui transition-colors duration-150 outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-ui file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50`,`focus-visible:border-ring focus-visible:ring-ring focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-offset-background`,`aria-invalid:ring-destructive aria-invalid:ring-1 aria-invalid:border-destructive`,e),...n})}function Rm({open:e=!1,type:t=null,index:n=0,action:r=`edit`,item:i=null,onOpenChange:a,onSaved:o}){let{t:s}=pr(),[c,l]=(0,_.useState)(``),[u,d]=(0,_.useState)(``),[f,p]=(0,_.useState)([``]),[m,h]=(0,_.useState)(`1`),[g,v]=(0,_.useState)(!1),y=r===`edit`,b=t===`workflows`;(0,_.useEffect)(()=>{e&&i&&(l(i.category||``),d(i.description||``),p(i.steps?.length?[...i.steps]:[``]),h(`1`))},[e,i]);let x=y?s(`btn-edit`)||`Edit Item`:m===`2`?s(`confirm-delete-title`)||`Confirm Delete`:s(`confirm-delete`)||`Delete Item?`;function S(e){a?.(e)}function C(){p(e=>[...e,``])}function w(e){p(t=>{let n=t.filter((t,n)=>n!==e);return n.length===0?[``]:n})}function T(e,t){p(n=>n.map((n,r)=>r===e?t:n))}async function E(e){if(e.preventDefault(),!t)return;if(r===`delete`){if(m===`1`){h(`2`);return}v(!0);let e=await Wn(`/api/user-profile/item`,{method:`PATCH`,headers:{"Content-Type":`application/json`},body:JSON.stringify({type:t,index:n,action:`delete`})});v(!1),e.success?(W.success(s(`toast-delete-success`)||`Item deleted`),S(!1),o?.()):W.error(e.error||s(`toast-delete-failed`)||`Delete failed`);return}v(!0);let i={type:t,index:n,action:`edit`,category:b?void 0:c,description:u};t===`workflows`&&(i.steps=f.map(e=>e.trim()).filter(Boolean));let a=await Wn(`/api/user-profile/item`,{method:`PATCH`,headers:{"Content-Type":`application/json`},body:JSON.stringify(i)});v(!1),a.success?(W.success(s(`toast-update-success`)||`Item updated`),S(!1),o?.()):W.error(a.error||s(`toast-update-failed`)||`Update failed`)}return(0,U.jsx)(Fs,{open:e,onOpenChange:S,children:(0,U.jsxs)(Rs,{className:`sm:max-w-lg`,children:[(0,U.jsx)(zs,{children:(0,U.jsx)(Vs,{children:x})}),(0,U.jsxs)(`form`,{className:`space-y-4`,onSubmit:E,children:[y||m===`1`?(0,U.jsxs)(U.Fragment,{children:[b?null:(0,U.jsxs)(`div`,{className:`space-y-2`,children:[(0,U.jsx)(du,{htmlFor:`profile-item-category`,children:s(`label-category`)}),(0,U.jsx)(Lm,{id:`profile-item-category`,value:c,onChange:e=>l(e.target.value),disabled:!y})]}),(0,U.jsxs)(`div`,{className:`space-y-2`,children:[(0,U.jsx)(du,{htmlFor:`profile-item-description`,children:s(`label-description`)}),(0,U.jsx)(fu,{id:`profile-item-description`,rows:4,value:u,onChange:e=>d(e.target.value),disabled:!y})]}),b&&y?(0,U.jsxs)(`div`,{className:`space-y-2`,children:[(0,U.jsx)(du,{children:s(`label-steps`)}),(0,U.jsx)(`div`,{className:`space-y-2`,children:f.map((e,t)=>(0,U.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,U.jsx)(`span`,{className:`text-xs text-muted-foreground w-5 tabular-nums`,children:t+1}),(0,U.jsx)(Lm,{value:e,placeholder:`Step ${t+1}...`,onChange:e=>T(t,e.target.value)}),(0,U.jsx)(K,{type:`button`,variant:`ghost`,size:`icon-xs`,onClick:()=>w(t),children:`×`})]},t))}),(0,U.jsx)(K,{type:`button`,variant:`secondary`,size:`sm`,onClick:C,children:s(`btn-add-step`)})]}):null]}):null,(0,U.jsxs)(Bs,{children:[(0,U.jsx)(K,{type:`button`,variant:`secondary`,onClick:()=>S(!1),children:s(`btn-cancel`)}),(0,U.jsx)(K,{type:`submit`,variant:y?`default`:`destructive`,disabled:g,children:y?s(`btn-save`)||`Save`:s(`btn-delete`)||`Delete`})]})]})]})})}var zm=20;function Bm(e,t){let n=e.length,r=Math.max(1,Math.ceil(n/zm)),i=Math.min(t,r),a=(i-1)*zm;return{items:e.slice(a,a+zm),total:n,totalPages:r,page:i,start:a}}function Vm(e){return Math.round((e.confidence||0)*100)}function Hm(e){return e.evidence?Array.isArray(e.evidence)?e.evidence.join(`
122
- `):e.evidence:``}function Um(e){return e.evidence?Array.isArray(e.evidence)?e.evidence.length:1:0}function Wm({profile:e,loading:t=!1,onRefresh:n,onCleanup:r}){let{t:i}=pr(),[a,o]=(0,_.useState)({pref:1,pat:1,wf:1}),[s,c]=(0,_.useState)(!1),[l,u]=(0,_.useState)(!1),[d,f]=(0,_.useState)(null),[p,m]=(0,_.useState)(0),[h,g]=(0,_.useState)(`edit`),[v,y]=(0,_.useState)(null),b=(0,_.useMemo)(()=>{if(!e?.exists||!e.profileData)return null;let t=e.profileData;if(typeof t==`string`)try{t=JSON.parse(t)}catch{return null}return t},[e]),x=(0,_.useMemo)(()=>Ic(b?.preferences),[b]),S=(0,_.useMemo)(()=>Ic(b?.patterns),[b]),C=(0,_.useMemo)(()=>Ic(b?.workflows),[b]),w=(0,_.useMemo)(()=>C.map((e,t)=>({item:e,index:t})).sort((e,t)=>(t.item.frequency||0)-(e.item.frequency||0)),[C]),T=Bm(x,a.pref),E=Bm(S,a.pat),D=Bm(w,a.wf),O=C.length;function te(e,t,n){let r=(e===`preferences`?x:e===`patterns`?S:C)[t];r&&(f(e),m(t),g(n),y(r),u(!0))}function A(e,t){return e.indexOf(t)}function ne({page:e,pageKey:t}){return e.total<=zm?null:(0,U.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5 pt-2`,children:[(0,U.jsxs)(`span`,{className:`text-xs text-muted-foreground me-2`,children:[e.start+1,`-`,Math.min(e.start+zm,e.total),` / `,e.total]}),Array.from({length:e.totalPages},(e,t)=>t+1).map(n=>(0,U.jsx)(K,{size:`xs`,variant:n===e.page?`default`:`outline`,onClick:()=>o(e=>({...e,[t]:n})),children:n},n))]})}function j({item:e,type:t,fullList:n}){let r=A(n,e),a=Vm(e);return(0,U.jsxs)(`div`,{className:`min-w-0 rounded-xl border border-border bg-card p-3 space-y-2`,children:[(0,U.jsxs)(`div`,{className:`flex flex-wrap items-start gap-2`,children:[t!==`workflows`||e.category?(0,U.jsx)(_u,{variant:`outline`,children:e.category||`General`}):null,(0,U.jsxs)(`div`,{className:`flex items-center gap-0.5 ms-auto`,children:[(0,U.jsx)(K,{variant:`ghost`,size:`icon-xs`,title:i(`btn-edit`)||`Edit`,onClick:()=>te(t,r,`edit`),children:(0,U.jsx)(ge,{className:`size-3`})}),(0,U.jsx)(K,{variant:`ghost`,size:`icon-xs`,title:i(`btn-delete`)||`Delete`,onClick:()=>te(t,r,`delete`),children:(0,U.jsx)(Oe,{className:`size-3`})})]}),(0,U.jsxs)(`div`,{className:H(`shrink-0 rounded-md border px-1.5 py-0.5 text-xs font-medium tabular-nums`,Bc[zc(a)]),title:`${i(`label-confidence`)}: ${a}%`,children:[a,`%`]})]}),(0,U.jsx)(`p`,{className:`text-sm break-words`,children:e.description||``}),e.steps?.length?(0,U.jsx)(`ol`,{className:`flex flex-wrap items-center gap-1.5`,children:e.steps.map((t,n)=>(0,U.jsxs)(`li`,{className:`contents`,children:[(0,U.jsxs)(`span`,{className:`inline-flex min-w-0 items-center gap-1.5 rounded-full border border-blue-600/40 bg-blue-500/15 px-2.5 py-0.5 text-xs text-blue-700 dark:text-blue-400`,children:[(0,U.jsx)(`span`,{className:`tabular-nums opacity-70`,children:n+1}),(0,U.jsx)(`span`,{className:`break-words`,children:t})]}),n<(e.steps?.length||0)-1?(0,U.jsx)(k,{className:`size-3 text-muted-foreground rtl:rotate-180`}):null]},n))}):null,e.evidence||e.frequency?(0,U.jsxs)(`div`,{className:`flex items-center gap-1.5 text-xs text-muted-foreground`,children:[(0,U.jsxs)(`span`,{className:`inline-flex items-center gap-1`,title:i(`label-evidence-tooltip`,{count:e.frequency||1}),children:[(0,U.jsx)(De,{className:`size-3`}),e.frequency||1]}),Um(e)>0?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`span`,{children:`·`}),(0,U.jsxs)(`span`,{className:`inline-flex items-center gap-1`,title:Hm(e),children:[(0,U.jsx)(oe,{className:`size-3`}),Um(e),` evidence`]})]}):null]}):null]})}return t&&!e?(0,U.jsx)(`div`,{className:`text-sm text-muted-foreground py-8 text-center`,children:i(`loading-profile`)}):e?.exists?b?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`div`,{className:`space-y-6`,children:[(0,U.jsxs)(`div`,{className:`space-y-2`,children:[(0,U.jsx)(`h2`,{dir:`auto`,className:`text-section-title font-semibold break-words`,children:e.displayName||e.userId}),(0,U.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,U.jsxs)(`span`,{className:`rounded-full bg-muted px-2.5 py-1 text-xs`,children:[(0,U.jsx)(`span`,{className:`text-muted-foreground`,children:i(`profile-version`)}),(0,U.jsx)(`span`,{className:`ms-1 font-mono`,children:e.version})]}),(0,U.jsxs)(`span`,{className:`rounded-full bg-muted px-2.5 py-1 text-xs`,children:[(0,U.jsx)(`span`,{className:`text-muted-foreground`,children:i(`profile-prompts`)}),(0,U.jsx)(`span`,{className:`ms-1 font-mono`,children:e.totalPromptsAnalyzed})]}),(0,U.jsxs)(`span`,{className:`rounded-full bg-muted px-2.5 py-1 text-xs`,children:[(0,U.jsx)(`span`,{className:`text-muted-foreground`,children:i(`profile-updated`)}),(0,U.jsx)(`span`,{className:`ms-1`,children:e.lastAnalyzedAt?xu(e.lastAnalyzedAt):`—`})]}),(0,U.jsxs)(`div`,{className:`ms-auto flex flex-wrap items-center gap-1.5`,children:[(0,U.jsxs)(K,{variant:`outline`,size:`sm`,onClick:()=>r?.(),children:[(0,U.jsx)(Te,{className:`size-3.5`}),i(`btn-ai-cleanup`)]}),(0,U.jsxs)(K,{variant:`secondary`,size:`sm`,onClick:()=>n?.(),children:[(0,U.jsx)(xe,{className:`size-3.5`}),i(`btn-refresh`)]}),(0,U.jsxs)(K,{variant:`secondary`,size:`sm`,onClick:()=>c(!0),children:[(0,U.jsx)(Se,{className:`size-3.5`}),`History`]})]})]})]}),(0,U.jsxs)(`div`,{className:`grid gap-6`,children:[(0,U.jsxs)(`section`,{id:`profile-preferences`,className:`scroll-mt-4 space-y-3`,children:[(0,U.jsxs)(`h2`,{className:`flex flex-wrap items-center gap-2 text-section-title font-semibold`,children:[(0,U.jsx)(L,{className:`size-4`}),i(`profile-preferences`),(0,U.jsx)(`span`,{className:`text-xs font-normal text-muted-foreground`,children:x.length})]}),x.length===0?(0,U.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:i(`empty-preferences`)}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`div`,{className:`grid gap-2 sm:grid-cols-2 lg:grid-cols-3`,children:T.items.map(e=>(0,U.jsx)(j,{item:e,type:`preferences`,fullList:x},A(x,e)))}),(0,U.jsx)(ne,{page:T,pageKey:`pref`})]})]}),(0,U.jsxs)(`section`,{id:`profile-patterns`,className:`scroll-mt-4 space-y-3`,children:[(0,U.jsxs)(`h2`,{className:`flex flex-wrap items-center gap-2 text-section-title font-semibold`,children:[(0,U.jsx)(ee,{className:`size-4`}),i(`profile-patterns`),(0,U.jsx)(`span`,{className:`text-xs font-normal text-muted-foreground`,children:S.length})]}),S.length===0?(0,U.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:i(`empty-patterns`)}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`div`,{className:`grid gap-2 sm:grid-cols-2 lg:grid-cols-3`,children:E.items.map(e=>(0,U.jsx)(j,{item:e,type:`patterns`,fullList:S},A(S,e)))}),(0,U.jsx)(ne,{page:E,pageKey:`pat`})]})]}),(0,U.jsxs)(`section`,{id:`profile-workflows`,className:`scroll-mt-4 space-y-3`,children:[(0,U.jsxs)(`h2`,{className:`flex flex-wrap items-center gap-2 text-section-title font-semibold`,children:[(0,U.jsx)(Ne,{className:`size-4`}),i(`profile-workflows`),(0,U.jsx)(`span`,{className:`text-xs font-normal text-muted-foreground`,children:O})]}),O===0?(0,U.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:i(`empty-workflows`)}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`div`,{className:`grid gap-2 sm:grid-cols-2`,children:D.items.map(e=>(0,U.jsx)(j,{item:e.item,type:`workflows`,fullList:C},e.index))}),(0,U.jsx)(ne,{page:D,pageKey:`wf`})]})]})]})]}),(0,U.jsx)(Im,{open:s,onOpenChange:c,profileId:e?.id||``}),(0,U.jsx)(Rm,{open:l,onOpenChange:u,type:d,index:p,action:h,item:v,onSaved:n})]}):null:(0,U.jsxs)(`div`,{className:`flex flex-col items-center gap-2 py-10 text-muted-foreground`,children:[(0,U.jsx)(je,{className:`size-8`}),(0,U.jsx)(`p`,{className:`text-sm`,children:e?.message||i(`empty-preferences`)})]})}function Gm({open:e=!1,count:t=0,onOpenChange:n,onComplete:r}){let{t:i}=pr(),[a,o]=(0,_.useState)(!1),[s,c]=(0,_.useState)(``),[l,u]=(0,_.useState)(0);(0,_.useEffect)(()=>{e&&!a&&(c(i(`migration-found-tags`,{count:t})),u(0))},[e,a,t,i]);function d(e){a&&!e||n?.(e)}async function f(){o(!0),c(i(`status-migration-init`)),u(0);let e=!0,t=0,n=1e3;for(;e&&t<n;){t++;let n=await Wn(`/api/migration/tags/run-batch`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({batchSize:3})});if(!n.success||!n.data){c(i(`toast-migration-failed`)+`: `+(n.error||``)),o(!1);return}let r=n.data.processed;e=n.data.hasMore;let a=n.data.total;u(a>0?Math.round(r/a*100):0),c(i(`status-migration-progress`,{current:r,total:a})),e&&await new Promise(e=>setTimeout(e,100))}if(t>=n){c(i(`migration-stopped`)),o(!1);return}u(100),c(i(`toast-migration-success`)),W.success(i(`toast-migration-success`)),setTimeout(()=>{o(!1),d(!1),r?.()},2e3)}return(0,U.jsx)(Fs,{open:e,onOpenChange:d,children:(0,U.jsxs)(Rs,{className:`sm:max-w-md`,showCloseButton:!a,children:[(0,U.jsx)(zs,{children:(0,U.jsx)(Vs,{children:i(`modal-migration-title`)})}),(0,U.jsxs)(`div`,{className:`space-y-3`,children:[(0,U.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:s}),(0,U.jsx)(`div`,{className:`h-2 rounded-full bg-muted overflow-hidden`,children:(0,U.jsx)(`div`,{className:`h-full bg-primary transition-all duration-200`,style:{width:`${l}%`}})}),(0,U.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:i(`migration-note`)})]}),a?null:(0,U.jsx)(Bs,{children:(0,U.jsxs)(K,{onClick:f,children:[(0,U.jsx)(ve,{className:`size-3.5`}),i(`btn-start-migration`)]})})]})})}var Km=[{id:`settings-section-external-api`,title:`External API`},{id:`settings-section-models`,title:`Models`},{id:`settings-section-memory`,title:`Memory`},{id:`settings-section-embedding`,title:`Embedding`},{id:`settings-section-keys`,title:`Keys and access`},{id:`settings-section-diagnostics`,title:`Capture diagnostics`},{id:`settings-section-health`,title:`Health`},{id:`settings-section-claude-folder`,title:`Claude Code folder`},{id:`settings-section-import`,title:`Import and backfill`},{id:`settings-section-auto-import`,title:`Automatic import`},{id:`settings-section-profile`,title:`Profile learning`},{id:`settings-section-directory-maps`,title:`Directory maps`},{id:`settings-section-web-app`,title:`Web app`},{id:`settings-section-log`,title:`Log`}];function qm(e,t){let n=e.startsWith(`#`)?e.slice(1):``;if(!/^settings-section-[a-z0-9-]+$/.test(n))return!1;let r=t.getElementById(n);return r?(r.scrollIntoView({behavior:`smooth`,block:`start`}),!0):!1}var Jm=class extends Error{status;constructor(e,t){super(e),this.name=`SettingsRequestError`,this.status=t}};async function $(e,t={}){let n=(t.method??`GET`).toUpperCase(),r=n!==`GET`&&n!==`HEAD`,i=await fetch(e,{...t,headers:{"x-omms-token":window.__OMMS_TOKEN__??``,...r||t.body?{"Content-Type":`application/json`}:{},...t.headers}}),a=await i.json();if(!i.ok)throw new Jm(a.error??`Request failed (${i.status})`,i.status);return a}var Ym=new Set,Xm=0;function Zm(e){Xm++;for(let t of Ym)t(e)}function Qm(){let e=Xm;return{isCurrent:()=>Xm===e}}async function $m(){try{let e=await $(`/api/settings`);return Zm(e),e}catch{return null}}function eh(e){return Ym.add(e),()=>{Ym.delete(e)}}function th(e,t){return`${e.replace(/\.+$/,``)}. ${t}`}function nh(){let e=0;return{begin(){let t=++e;return()=>t===e}}}async function rh(e,t){e(!0);try{return await t()}finally{e(!1)}}var ih={Models:[`模型`,`النماذج`],"External API fallback":[`外部 API 备用模型`,`النموذج الاحتياطي عبر واجهة API الخارجية`],none:[`无`,`لا يوجد`],ready:[`就绪`,`جاهز`],"not ready":[`未就绪`,`غير جاهز`],"Credentials (values hidden)":[`凭据(不显示内容)`,`بيانات الاعتماد (القيم مخفية)`],set:[`已设置`,`مضبوط`],"not set":[`未设置`,`غير مضبوط`],"Effective model":[`当前使用模型`,`النموذج المستخدم`],session:[`会话`,`الجلسة`],"external API":[`外部 API`,`واجهة API الخارجية`],unavailable:[`不可用`,`غير متاح`],"Project override is active. Changes to the global file may not take effect here.":[`项目设置优先。全局文件的更改可能不会在此生效。`,`إعدادات المشروع لها الأولوية. قد لا تسري تغييرات الملف العام هنا.`],"Model choice":[`模型选择`,`اختيار النموذج`],"Session model":[`会话模型`,`نموذج الجلسة`],"Manual model":[`手动选择模型`,`اختيار النموذج يدوياً`],"Manual provider/model":[`手动输入提供商/模型`,`إدخال المزوّد/النموذج يدوياً`],"Model list unavailable. Enter provider/model manually.":[`模型列表不可用。请手动输入提供商/模型。`,`قائمة النماذج غير متاحة. أدخل المزوّد/النموذج يدوياً.`],"OpenCode model list unavailable":[`OpenCode 模型列表不可用`,`قائمة نماذج OpenCode غير متاحة`],"OMMS could not find OpenCode on this computer, so it cannot list OpenCode's models here. Type the model as provider/model, for example zai-coding-plan/glm-5.3. If OpenCode is installed, open an OpenCode session and reload this page.":[`OMMS 在这台电脑上找不到 OpenCode,因此无法在此列出 OpenCode 的模型。请按 提供商/模型 格式输入模型,例如 zai-coding-plan/glm-5.3。如果已安装 OpenCode,请打开一个 OpenCode 会话,然后重新加载此页面。`,`لم يعثر OMMS على OpenCode في هذا الحاسوب، لذا لا يمكنه عرض نماذج OpenCode هنا. أدخل النموذج بصيغة المزوّد/النموذج، مثل zai-coding-plan/glm-5.3. إذا كان OpenCode مثبتاً، فافتح جلسة OpenCode ثم أعد تحميل هذه الصفحة.`],"OpenCode took too long to send its model list. Reload this page to try again, or type the model as provider/model.":[`OpenCode 发送模型列表的时间过长。请重新加载此页面重试,或按 提供商/模型 格式输入模型。`,`استغرق OpenCode وقتاً طويلاً لإرسال قائمة نماذجه. أعد تحميل هذه الصفحة للمحاولة مرة أخرى، أو أدخل النموذج بصيغة المزوّد/النموذج.`],"OpenCode has no signed-in models. Run `opencode auth login`, then reload this page.":["OpenCode 没有已登录的模型。请运行 `opencode auth login`,然后重新加载此页面。","لا توجد في OpenCode نماذج مسجَّل الدخول إليها. شغّل `opencode auth login` ثم أعد تحميل هذه الصفحة."],"This OpenCode version sent a model list OMMS cannot read. Type the model as provider/model. Update OMMS if this continues.":[`此版本的 OpenCode 发送的模型列表 OMMS 无法读取。请按 提供商/模型 格式输入模型。如果问题持续,请更新 OMMS。`,`أرسل هذا الإصدار من OpenCode قائمة نماذج لا يستطيع OMMS قراءتها. أدخل النموذج بصيغة المزوّد/النموذج. حدّث OMMS إذا استمرت المشكلة.`],"OMMS could not read Pi's model list. Type the model as provider/model.":[`OMMS 无法读取 Pi 的模型列表。请按 提供商/模型 格式输入模型。`,`تعذّر على OMMS قراءة قائمة نماذج Pi. أدخل النموذج بصيغة المزوّد/النموذج.`],"Pi has no signed-in models. Sign in to a provider in Pi, then reload this page.":[`Pi 没有已登录的模型。请在 Pi 中登录一个提供商,然后重新加载此页面。`,`لا توجد في Pi نماذج مسجَّل الدخول إليها. سجّل الدخول إلى مزوّد في Pi ثم أعد تحميل هذه الصفحة.`],"Save model":[`保存模型`,`حفظ النموذج`],"Enter a model as provider/model.":[`按 提供商/模型 格式输入。`,`أدخل النموذج بصيغة المزوّد/النموذج.`],"Saved. New capture and profile work uses these settings.":[`已保存。下一次捕获和用户画像将使用这些设置。`,`تم الحفظ. ستستخدم عمليات الالتقاط والملف الشخصي الجديدة هذه الإعدادات.`],"Saved. OMMS now reads ~/.config/omms/omms.jsonc. The legacy config was kept.":[`已保存。OMMS 现在读取 ~/.config/omms/omms.jsonc,旧配置保留。`,`تم الحفظ. يقرأ OMMS الآن الملف ~/.config/omms/omms.jsonc مع الاحتفاظ بالإعدادات القديمة.`],"Current settings were reloaded; check the values and save again.":[`已重新加载当前设置;检查数值后再次保存。`,`أُعيد تحميل الإعدادات الحالية. راجع القيم ثم احفظ مجدداً.`],"Capture diagnostics":[`捕获诊断`,`تشخيص الالتقاط`],"Time range":[`时间范围`,`الفترة الزمنية`],"24 hours":[`24 小时`,`24 ساعة`],"7 days":[`7 天`,`7 أيام`],"30 days":[`30 天`,`30 يوماً`],"90 days":[`90 天`,`90 يوماً`],"Host / model":[`主机 / 模型`,`المضيف / النموذج`],Saved:[`已保存`,`محفوظ`],Skipped:[`已跳过`,`متجاوز`],Failed:[`失败`,`فشل`],Total:[`总数`,`المجموع`],"Failure reasons":[`失败原因`,`أسباب الفشل`],"Recent attempts":[`最近尝试`,`المحاولات الأخيرة`],Time:[`时间`,`الوقت`],Host:[`主机`,`المضيف`],Source:[`来源`,`المصدر`],Session:[`会话`,`الجلسة`],Path:[`路径`,`المسار`],Model:[`模型`,`النموذج`],Stop:[`结束原因`,`سبب التوقف`],Blocks:[`区块`,`الكتل`],Prompt:[`提示词长度`,`طول الطلب`],Reply:[`回复长度`,`طول الرد`],Duration:[`耗时`,`المدة`],Outcome:[`结果`,`النتيجة`],Reason:[`原因`,`السبب`],"Save capture traces":[`保存捕获追踪`,`حفظ تتبعات الالتقاط`],"Traces can contain conversation content after redaction. Keep tracing off unless you need it for debugging.":[`追踪文件在脱敏后仍可能包含对话内容。仅在调试时开启。`,`قد تحتوي التتبعات على محتوى المحادثة بعد التنقيح. فعّلها عند التصحيح فقط.`],"This project turns tracing off. The global switch cannot turn it on here.":[`此项目已关闭追踪。全局开关无法在此开启。`,`أوقف هذا المشروع التتبع. لا يمكن للمفتاح العام تفعيله هنا.`],"Trace retention (days)":[`追踪保留天数`,`مدة حفظ التتبعات (بالأيام)`],"Attempt retention (days)":[`尝试记录保留天数`,`مدة حفظ المحاولات (بالأيام)`],"Retry retention (hours)":[`重试保留小时数`,`مدة حفظ إعادة المحاولة (بالساعات)`],"When the capture model cannot be reached, OMMS keeps the turn and tries again later. Queued turns can hold conversation content after redaction. 0 turns the queue off and deletes waiting turns.":[`捕获模型无法访问时,OMMS 会保留该轮对话并稍后重试。排队的对话在脱敏后仍可能包含对话内容。设为 0 会关闭队列并删除等待中的对话。`,`عندما يتعذر الوصول إلى نموذج الالتقاط، يحتفظ OMMS بالجولة ويعيد المحاولة لاحقاً. قد تحتوي الجولات المنتظرة على محتوى المحادثة بعد التنقيح. القيمة 0 توقف قائمة الانتظار وتحذف الجولات المنتظرة.`],"Turns waiting for retry":[`等待重试的对话`,`الجولات المنتظرة لإعادة المحاولة`],"Retry now":[`立即重试`,`أعد المحاولة الآن`],"Retrying now.":[`正在重试。`,`تجري إعادة المحاولة الآن.`],"A retry is already running.":[`重试已在运行。`,`إعادة المحاولة قيد التشغيل بالفعل.`],"These turns retry at the next Pi session start.":[`这些对话将在下次启动 Pi 会话时重试。`,`ستُعاد محاولة هذه الجولات عند بدء جلسة Pi التالية.`],"These turns retry at the next OpenCode session start.":[`这些对话将在下次启动 OpenCode 会话时重试。`,`ستُعاد محاولة هذه الجولات عند بدء جلسة OpenCode التالية.`],"These turns retry at the next Claude Code session start.":[`这些对话将在下次启动 Claude Code 会话时重试。`,`ستُعاد محاولة هذه الجولات عند بدء جلسة Claude Code التالية.`],"Claude Code capture uses the external API.":[`Claude Code 捕获使用外部 API。`,`يستخدم التقاط Claude Code واجهة API الخارجية.`],"Claude Code capture is off. Complete the external API settings.":[`Claude Code 捕获已关闭。请完成外部 API 设置。`,`التقاط Claude Code متوقف. أكمل إعدادات واجهة API الخارجية.`],"Missing settings":[`缺少的设置`,`الإعدادات الناقصة`],"memoryModel is not configured":[`未配置 memoryModel`,`لم يُضبط memoryModel`],"memoryApiUrl is not configured":[`未配置 memoryApiUrl`,`لم يُضبط memoryApiUrl`],"memoryApiKey is not configured":[`未配置 memoryApiKey`,`لم يُضبط memoryApiKey`],"memoryApiKey contains a placeholder value":[`memoryApiKey 包含占位值`,`يحتوي memoryApiKey على قيمة نائبة`],"Claude Code backfill always uses the external API. It has no backfill model setting.":[`Claude Code 回填始终使用外部 API,没有回填模型设置。`,`يستخدم استيراد Claude Code دائماً واجهة API الخارجية، ولا يوجد له إعداد لنموذج الاستيراد.`],"Claude Code transcripts folder":[`Claude Code 对话记录文件夹`,`مجلد سجلات محادثات Claude Code`],"Claude Code transcripts":[`Claude Code 对话记录`,`سجلات محادثات Claude Code`],found:[`已找到`,`موجود`],"not found":[`未找到`,`غير موجود`],"Claude Code imports always use the external API.":[`Claude Code 导入始终使用外部 API。`,`يستخدم استيراد Claude Code دائماً واجهة API الخارجية.`],"Claude Code imports use the external API. Complete the external API settings.":[`Claude Code 导入使用外部 API。请完成外部 API 设置。`,`يستخدم استيراد Claude Code واجهة API الخارجية. أكمل إعدادات واجهة API الخارجية.`],"Trace files":[`追踪文件`,`ملفات التتبع`],View:[`查看`,`عرض`],Delete:[`删除`,`حذف`],Health:[`健康检查`,`فحص الحالة`],"Config files":[`配置文件`,`ملفات الإعدادات`],"Memory store":[`记忆存储`,`مخزن الذاكرة`],Embedding:[`嵌入模型`,`نموذج التضمين`],"Web binding":[`网页服务绑定`,`ربط خادم الويب`],"OpenCode model":[`OpenCode 模型`,`نموذج OpenCode`],"Pi model":[`Pi 模型`,`نموذج Pi`],"Capture failures (24 hours)":[`捕获失败(24 小时)`,`فشل الالتقاط (24 ساعة)`],"OpenCode model test":[`OpenCode 模型测试`,`اختبار نموذج OpenCode`],"Pi model test":[`Pi 模型测试`,`اختبار نموذج Pi`],"Run checks":[`运行检查`,`تشغيل الفحوصات`],"Run checks and test models":[`运行检查并测试模型`,`تشغيل الفحوصات واختبار النماذج`],"Checking…":[`正在检查…`,`جارٍ الفحص…`],pass:[`通过`,`نجاح`],warn:[`警告`,`تحذير`],fail:[`失败`,`فشل`],"Import and backfill":[`导入和回填`,`الاستيراد والاستكمال`],"Automatic import":[`自动导入`,`الاستيراد التلقائي`],"Automatic import makes model calls. Changes apply at the next host start. Turning it off stops a running import after the current exchange.":[`自动导入会调用模型。更改在下次启动主机时生效。关闭后,正在运行的导入将在当前轮次结束后停止。`,`يستدعي الاستيراد التلقائي النموذج. تسري التغييرات عند بدء المضيف التالي. يوقف التعطيل الاستيراد بعد التبادل الحالي.`],"Import past chats automatically":[`自动导入过去的对话`,`استيراد المحادثات السابقة تلقائياً`],"Backfill model":[`历史导入模型`,`نموذج استيراد السجل`],"Same as live capture":[`与实时捕获相同`,`مثل الالتقاط المباشر`],"Saved. Changes apply at the next host start.":[`已保存。更改在下次启动主机时生效。`,`تم الحفظ. تسري التغييرات عند بدء المضيف التالي.`],State:[`状态`,`الحالة`],"not started":[`尚未开始`,`لم يبدأ`],"not-started":[`尚未开始`,`لم يبدأ`],Imported:[`已导入`,`مستورَد`],Pending:[`待处理`,`معلّق`],"Unresolved sessions":[`目录未解析的会话`,`جلسات بمجلدات غير محددة`],Cutoff:[`截止时间`,`وقت القطع`],stopped:[`已停止`,`توقف`],"Web app":[`网页应用`,`تطبيق الويب`],"Start web app at login":[`登录时启动网页应用`,`بدء تطبيق الويب عند تسجيل الدخول`],"Login item":[`登录启动项`,`عنصر بدء تسجيل الدخول`],"not installed":[`未安装`,`غير مثبّت`],"not-installed":[`未安装`,`غير مثبّت`],installed:[`已安装`,`مثبّت`],unsupported:[`不受支持`,`غير مدعوم`],"no-runtime":[`缺少运行环境`,`بيئة التشغيل غير متاحة`],"no-package":[`缺少软件包`,`الحزمة غير متاحة`],"no-launcher":[`缺少启动器`,`المشغّل غير متاح`],"Login items are unsupported on this platform.":[`此平台不支持登录启动项。`,`عناصر بدء تسجيل الدخول غير مدعومة على هذا النظام.`],"Install Node or Bun to start the web app at login.":[`安装 Node 或 Bun 后,网页应用才能在登录时启动。`,`ثبّت Node أو Bun لبدء تطبيق الويب عند تسجيل الدخول.`],"Use these commands to apply the change now:":[`使用以下命令立即应用更改:`,`استخدم هذه الأوامر لتطبيق التغيير الآن:`],"Saved. The login item changes at the next Pi or OpenCode start.":[`已保存。登录启动项将在下次启动 Pi 或 OpenCode 时更新。`,`تم الحفظ. يتغير عنصر بدء التشغيل عند بدء Pi أو OpenCode التالي.`],"History host":[`历史记录主机`,`مضيف السجل`],Scope:[`范围`,`النطاق`],"Current project":[`当前项目`,`المشروع الحالي`],"All projects":[`所有项目`,`كل المشاريع`],"Project directory":[`项目目录`,`مجلد المشروع`],"Current directory":[`当前目录`,`المجلد الحالي`],"Profile batch size":[`用户画像批量大小`,`حجم دفعة الملف الشخصي`],"Directory maps (old=new, one per line)":[`目录映射(旧=新,每行一条)`,`تعيين المجلدات (قديم=جديد، واحد في كل سطر)`],"Force reimport":[`强制重新导入`,`فرض إعادة الاستيراد`],"Skip memories":[`跳过记忆`,`تجاوز الذكريات`],"Skip profile":[`跳过用户画像`,`تجاوز الملف الشخصي`],"Import model":[`导入模型`,`نموذج الاستيراد`],"Saved external API":[`已保存的外部 API`,`واجهة API الخارجية المحفوظة`],"Preview (dry run)":[`预览(不写入)`,`معاينة (تشغيل تجريبي)`],"Start import":[`开始导入`,`بدء الاستيراد`],"Cancel after current unit":[`完成当前单元后取消`,`الإلغاء بعد الوحدة الحالية`],"Directory maps must be old=new, one per line":[`目录映射须为 旧=新,每行一条`,`يجب أن يكون تعيين المجلدات بصيغة قديم=جديد، واحد في كل سطر`],running:[`运行中`,`جارٍ التشغيل`],cancelling:[`正在取消`,`جارٍ الإلغاء`],cancelled:[`已取消`,`أُلغي`],done:[`已完成`,`اكتمل`],failed:[`失败`,`فشل`],units:[`单元`,`وحدات`],"List sessions":[`列出会话`,`عرض الجلسات`],"Refresh list":[`刷新列表`,`تحديث القائمة`],"Advanced options":[`高级选项`,`خيارات متقدمة`],"Hide advanced options":[`隐藏高级选项`,`إخفاء الخيارات المتقدمة`],"default location":[`默认位置`,`الموقع الافتراضي`],"Prompt date from":[`提示日期起`,`تاريخ الطلب من`],"Prompt date to":[`提示日期止`,`تاريخ الطلب إلى`],"Prompt dates are inclusive, use your time zone, and filter the turns inside each session, not the list. Empty dates include every turn.":[`提示日期包含首尾两天,按你所在时区计算,只筛选每个会话中的对话轮次,不筛选列表。留空则包含所有轮次。`,`تواريخ الطلب شاملة لليومين، وتُحسب بمنطقتك الزمنية، وتُصفّي الأدوار داخل كل جلسة لا القائمة. تركها فارغة يشمل كل الأدوار.`],"Sessions with directories that no longer exist":[`目录已不存在的会话`,`جلسات لم تعد مجلداتها موجودة`],"Show them and add a directory map":[`显示它们并添加目录映射`,`اعرضها وأضف تعيين مجلد`],Selected:[`已选择`,`المحدد`],"Select all matching":[`选择所有匹配项`,`تحديد كل المطابق`],"Clear selection":[`清除选择`,`مسح التحديد`],Select:[`选择`,`تحديد`],Created:[`创建时间`,`تاريخ الإنشاء`],"Resolved by":[`解析方式`,`طريقة التحديد`],recorded:[`记录的目录`,`المجلد المسجّل`],mapped:[`目录映射`,`تعيين مجلد`],"project root":[`项目根目录`,`جذر المشروع`],missing:[`缺失`,`مفقود`],"No sessions match.":[`没有匹配的会话。`,`لا توجد جلسات مطابقة.`],Previous:[`上一页`,`السابق`],Next:[`下一页`,`التالي`],None:[`无`,`لا شيء`],"Configured, not tested.":[`已配置,未测试。`,`مُعدّ، لم يُختبر.`],"An import with an OpenCode signed-in model runs from the terminal or with /import in OpenCode.":[`使用 OpenCode 已登录模型的导入需在终端运行,或在 OpenCode 中使用 /import。`,`يتم الاستيراد بنموذج OpenCode المسجَّل الدخول من الطرفية أو بالأمر /import داخل OpenCode.`],"The chosen OpenCode model is not connected here. An import with an OpenCode signed-in model runs from the terminal or with /import in OpenCode. Choose the external API for a web import.":[`所选 OpenCode 模型在此处未连接。使用 OpenCode 已登录模型的导入需在终端运行,或在 OpenCode 中使用 /import。网页导入请选择外部 API。`,`نموذج OpenCode المختار غير متصل هنا. يتم الاستيراد بنموذج OpenCode المسجَّل الدخول من الطرفية أو بالأمر /import داخل OpenCode. اختر واجهة API الخارجية للاستيراد من الصفحة.`],"Test models in Health":[`在健康检查中测试模型`,`اختبر النماذج في قسم السلامة`],Import:[`导入`,`استيراد`],sessions:[`个会话`,`جلسات`],"1 session":[`1 个会话`,`جلسة واحدة`],"List sessions first.":[`请先列出会话。`,`اعرض الجلسات أولاً.`],"Options changed. Refresh the session list first.":[`选项已更改。请先刷新会话列表。`,`تغيّرت الخيارات. حدّث قائمة الجلسات أولاً.`],"Select at least one session.":[`请至少选择一个会话。`,`حدّد جلسة واحدة على الأقل.`],"Select at most 1000 sessions one by one, or use Select all matching.":[`逐个选择最多 1000 个会话,或使用“选择所有匹配项”。`,`حدّد 1000 جلسة كحد أقصى واحدة تلو الأخرى، أو استخدم «تحديد كل المطابق».`],"Model readiness is unknown. Reload the page.":[`无法确定模型是否就绪。请重新加载页面。`,`حالة جاهزية النموذج غير معروفة. أعد تحميل الصفحة.`],"No import model is ready. Connect a model in OpenCode or complete the external API settings.":[`没有可用的导入模型。请在 OpenCode 中连接模型,或补全外部 API 设置。`,`لا يوجد نموذج استيراد جاهز. اربط نموذجاً في OpenCode أو أكمل إعدادات واجهة API الخارجية.`],"The external API is not ready":[`外部 API 未就绪`,`واجهة API الخارجية غير جاهزة`],"The external API has no memoryModel in the global config":[`全局配置中缺少外部 API 的 memoryModel`,`لا يحتوي الإعداد العام على memoryModel لواجهة API الخارجية`],"The external API has no memoryApiUrl in the global config":[`全局配置中缺少外部 API 的 memoryApiUrl`,`لا يحتوي الإعداد العام على memoryApiUrl لواجهة API الخارجية`],"The external API key is missing in the OpenCode process; check memoryApiKey and its env:// or file:// source":[`OpenCode 进程中缺少外部 API 密钥;请检查 memoryApiKey 及其 env:// 或 file:// 来源`,`مفتاح واجهة API الخارجية غير موجود في عملية OpenCode؛ تحقّق من memoryApiKey ومصدره env:// أو file://`],"The memoryProvider in the global config is not supported for imports":[`全局配置中的 memoryProvider 不支持导入`,`مزوّد memoryProvider في الإعداد العام غير مدعوم للاستيراد`],"Pi sessions folder or one .jsonl session file":[`Pi 会话文件夹或单个 .jsonl 会话文件`,`مجلد جلسات Pi أو ملف جلسة ‎.jsonl واحد`],"OpenCode database file":[`OpenCode 数据库文件`,`ملف قاعدة بيانات OpenCode`],"Absolute path, for example on a mounted volume":[`绝对路径,例如已挂载卷上的路径`,`مسار مطلق، مثلاً على وحدة تخزين مركّبة`],"Use this source":[`使用此来源`,`استخدم هذا المصدر`],Browse:[`浏览`,`استعراض`],"Use the default location":[`使用默认位置`,`استخدم الموقع الافتراضي`],"Chosen source":[`已选来源`,`المصدر المختار`],Choose:[`选择`,`اختيار`],"Only the first 500 entries are shown.":[`仅显示前 500 项。`,`تُعرض أول 500 عنصر فقط.`],"Reload the page before saving again.":[`再次保存前请重新加载页面。`,`أعد تحميل الصفحة قبل الحفظ مرة أخرى.`],"The current settings could not be reloaded. Reload the page.":[`无法重新加载当前设置。请重新加载页面。`,`تعذّر إعادة تحميل الإعدادات الحالية. أعد تحميل الصفحة.`],Log:[`日志`,`السجل`],"Capture attempts only":[`仅显示捕获尝试`,`محاولات الالتقاط فقط`],Refresh:[`刷新`,`تحديث`],"Copy log path":[`复制日志路径`,`نسخ مسار السجل`],"Log lines":[`日志行`,`أسطر السجل`],"No log has been written yet.":[`尚未写入日志。`,`لم يُكتب سجل بعد.`],"Loading log…":[`正在加载日志…`,`جارٍ تحميل السجل…`],"External API":[`外部 API`,`واجهة API الخارجية`],"An OpenAI- or Anthropic-compatible endpoint that either host can use for capture and backfill.":[`兼容 OpenAI 或 Anthropic 的端点,两个宿主都可用于捕获和回填。`,`نقطة نهاية متوافقة مع OpenAI أو Anthropic يمكن لأي مضيف استخدامها للالتقاط والاستيراد.`],Provider:[`提供商`,`المزوّد`],"API URL":[`API 地址`,`عنوان API`],"API key":[`API 密钥`,`مفتاح API`],"Save endpoint":[`保存端点`,`حفظ نقطة النهاية`],"Nothing to save.":[`没有需要保存的内容。`,`لا يوجد ما يُحفظ.`],"Key source":[`密钥来源`,`مصدر المفتاح`],"environment variable":[`环境变量`,`متغير البيئة`],"key file":[`密钥文件`,`ملف المفتاح`],"set in the config file":[`在配置文件中设置`,`مضبوط في ملف الإعدادات`],"resolves in the web app":[`可在网页应用中解析`,`يُقرأ في تطبيق الويب`],"does not resolve in the web app":[`无法在网页应用中解析`,`لا يُقرأ في تطبيق الويب`],"A login web app does not see variables set only in a shell profile; a key file works everywhere.":[`登录时启动的网页应用看不到仅在 shell 配置文件中设置的变量;密钥文件在任何地方都可用。`,`تطبيق الويب الذي يبدأ عند تسجيل الدخول لا يرى المتغيرات المضبوطة في ملف الصدفة فقط؛ ملف المفتاح يعمل في كل مكان.`],"The key does not resolve in this web app. Save it to a key file instead.":[`此网页应用无法解析该密钥。请改为保存到密钥文件。`,`لا يُقرأ المفتاح في تطبيق الويب هذا. احفظه في ملف مفتاح بدلاً من ذلك.`],"Environment variable":[`环境变量`,`متغير البيئة`],"Key file":[`密钥文件`,`ملف المفتاح`],"Save key to a private file":[`将密钥保存到私有文件`,`حفظ المفتاح في ملف خاص`],"Variable name":[`变量名`,`اسم المتغير`],"Key file path":[`密钥文件路径`,`مسار ملف المفتاح`],"Key file name":[`密钥文件名`,`اسم ملف المفتاح`],"The key is written to ~/.config/omms/secrets/ readable only by you. It is never shown again.":[`密钥写入 ~/.config/omms/secrets/,仅你可读,之后不再显示。`,`يُكتب المفتاح في ~/.config/omms/secrets/ ولا يقرؤه غيرك، ولن يُعرض مرة أخرى.`],"Save key source":[`保存密钥来源`,`حفظ مصدر المفتاح`],"Key source saved.":[`密钥来源已保存。`,`تم حفظ مصدر المفتاح.`],"A key file with this name exists. Replace it?":[`已存在同名密钥文件。要替换吗?`,`يوجد ملف مفتاح بهذا الاسم. هل تريد استبداله؟`],"Enter a variable name such as ZAI_API_KEY":[`请输入变量名,例如 ZAI_API_KEY`,`أدخل اسم متغير مثل ZAI_API_KEY`],"Enter the path of a key file":[`请输入密钥文件路径`,`أدخل مسار ملف المفتاح`],"Name the key file with letters, digits, dashes, or underscores":[`密钥文件名只能包含字母、数字、短横线或下划线`,`سمِّ ملف المفتاح بحروف أو أرقام أو شرطات أو شرطات سفلية`],"Paste the key":[`请粘贴密钥`,`الصق المفتاح`],Test:[`测试`,`اختبار`],"Test call succeeded":[`测试调用成功`,`نجح استدعاء الاختبار`],"Test call failed":[`测试调用失败`,`فشل استدعاء الاختبار`],"External API needs":[`外部 API 缺少`,`تحتاج واجهة API الخارجية إلى`],"Automatic import makes model calls. A model change applies at the next run. Turning it off stops a running import after the current exchange.":[`自动导入会调用模型。模型更改在下次运行时生效。关闭后,正在进行的导入会在当前对话完成后停止。`,`يستدعي الاستيراد التلقائي النماذج. يسري تغيير النموذج في التشغيل التالي. إيقافه يوقف الاستيراد الجاري بعد المحادثة الحالية.`],"Saved. Changes apply at the next run.":[`已保存。更改在下次运行时生效。`,`تم الحفظ. تسري التغييرات في التشغيل التالي.`],paused:[`已暂停`,`متوقف مؤقتاً`],"started from auto":[`自动启动`,`بدأ تلقائياً`],"started from web":[`从网页启动`,`بدأ من الويب`],"started from cli":[`从终端启动`,`بدأ من الطرفية`],"started from slash":[`从斜杠命令启动`,`بدأ من أمر الشرطة المائلة`],"Minutes left":[`剩余分钟`,`الدقائق المتبقية`],unknown:[`未知`,`غير معروف`],about:[`约`,`حوالي`],"Run now":[`立即运行`,`تشغيل الآن`],Pause:[`暂停`,`إيقاف مؤقت`],Resume:[`继续`,`استئناف`],"Pausing after the current exchange.":[`将在当前对话完成后暂停。`,`سيتوقف مؤقتاً بعد المحادثة الحالية.`],"Backfill started.":[`回填已开始。`,`بدأ الاستيراد.`],"Directory maps":[`目录映射`,`خرائط المجلدات`],"Map a directory that was moved or deleted to the project it belongs to. A change applies to the next import or backfill run.":[`将已移动或删除的目录映射到其所属项目。更改在下次导入或回填时生效。`,`اربط مجلداً نُقل أو حُذف بالمشروع الذي ينتمي إليه. يسري التغيير في الاستيراد التالي.`],"Saved maps":[`已保存的映射`,`الخرائط المحفوظة`],Keep:[`保留`,`إبقاء`],Remove:[`移除`,`إزالة`],"Unresolved directories":[`无法解析的目录`,`مجلدات غير محلولة`],"No unresolved directories in the latest run.":[`最近一次运行没有无法解析的目录。`,`لا توجد مجلدات غير محلولة في آخر تشغيل.`],"No suggestion found.":[`未找到建议。`,`لم يُعثر على اقتراح.`],"Target directory":[`目标目录`,`المجلد الهدف`],"Saved. Maps apply to the next import or backfill run.":[`已保存。映射在下次导入或回填时生效。`,`تم الحفظ. تسري الخرائط في الاستيراد التالي.`],"Claude Code folder":[`Claude Code 文件夹`,`مجلد Claude Code`],"Set this when Claude Code does not use ~/.claude, for example when you start it with CLAUDE_CONFIG_DIR. Leave it empty to use the default.":[`当 Claude Code 不使用 ~/.claude 时(例如用 CLAUDE_CONFIG_DIR 启动它),请设置此项。留空则使用默认文件夹。`,`اضبط هذا عندما لا يستخدم Claude Code المجلد ‎~/.claude، مثلاً عند تشغيله مع CLAUDE_CONFIG_DIR. اتركه فارغاً لاستخدام المجلد الافتراضي.`],"Save folder":[`保存文件夹`,`حفظ المجلد`],"Transcripts folder in use":[`正在使用的会话记录文件夹`,`مجلد سجلات الجلسات المستخدم`],From:[`来源`,`المصدر`],"this setting":[`此设置`,`هذا الإعداد`],"the CLAUDE_CONFIG_DIR variable of the web app":[`网页应用的 CLAUDE_CONFIG_DIR 变量`,`متغير CLAUDE_CONFIG_DIR لتطبيق الويب`],"the default folder":[`默认文件夹`,`المجلد الافتراضي`],"This folder does not exist. Claude Code capture and import will not work:":[`此文件夹不存在。Claude Code 的捕获和导入将无法工作:`,`هذا المجلد غير موجود. لن يعمل الالتقاط والاستيراد في Claude Code:`],"Enter a full path, or a path that starts with ~/.":[`请输入完整路径,或以 ~/ 开头的路径。`,`أدخل مساراً كاملاً، أو مساراً يبدأ بـ ‎~/.`],"Saved. Capture and import use this folder now.":[`已保存。捕获和导入现在使用此文件夹。`,`تم الحفظ. يستخدم الالتقاط والاستيراد هذا المجلد الآن.`],"Running version":[`运行版本`,`الإصدار الجاري`],"Global command":[`全局命令`,`الأمر العام`],"not installed globally":[`未全局安装`,`غير مثبت عمومياً`],"A newer OMMS copy runs in place of the global install. The global install is optional. To update it:":[`正在运行的是更新的 OMMS 副本,而不是全局安装。全局安装是可选的。更新方法:`,`تعمل نسخة OMMS أحدث بدلاً من التثبيت العام. التثبيت العام اختياري. لتحديثه:`],"The global install is newer than the running OMMS. The next Pi or OpenCode start replaces the web app.":[`全局安装比正在运行的 OMMS 更新。下次启动 Pi 或 OpenCode 时将替换网页应用。`,`التثبيت العام أحدث من OMMS الجاري. سيستبدل التشغيل التالي لـ Pi أو OpenCode تطبيق الويب.`],"OMMS is not installed globally. A global install is optional.":[`OMMS 未全局安装。全局安装是可选的。`,`OMMS غير مثبت عمومياً. التثبيت العام اختياري.`],"Keys and access":[`密钥与访问`,`المفاتيح والوصول`],"not needed":[`不需要`,`غير مطلوب`],"External API key":[`外部 API 密钥`,`مفتاح واجهة API الخارجية`],"Embedding server key":[`嵌入服务器密钥`,`مفتاح خادم التضمين`],"Capture and profile learning through the external API. Claude Code always uses it.":[`通过外部 API 进行捕获和用户画像学习。Claude Code 始终使用它。`,`الالتقاط وتعلّم الملف الشخصي عبر واجهة API الخارجية. يستخدمه Claude Code دائماً.`],"Sent to an embedding server on another machine.":[`发送给另一台机器上的嵌入服务器。`,`يُرسَل إلى خادم تضمين على جهاز آخر.`],"Let scripts and other computers call the web app's API.":[`允许脚本和其他电脑调用网页应用的 API。`,`تتيح للبرامج النصية والحواسيب الأخرى استدعاء واجهة API لتطبيق الويب.`],"Asks for a user name and password before the page opens.":[`打开页面前要求输入用户名和密码。`,`يطلب اسم مستخدم وكلمة مرور قبل فتح الصفحة.`],"External API card":[`外部 API 卡片`,`بطاقة واجهة API الخارجية`],"Embedding card":[`嵌入卡片`,`بطاقة التضمين`],"Table below":[`下方表格`,`الجدول أدناه`],"Form below":[`下方表单`,`النموذج أدناه`],"API tokens":[`API 令牌`,`رموز API`],"Browser password":[`浏览器密码`,`كلمة مرور المتصفح`],"The config file still sets webServerApiToken. OMMS imported it once as the token “from config file” and no longer reads the key. Use the token table instead.":[`配置文件仍设置了 webServerApiToken。OMMS 已将其导入一次,作为令牌“from config file”,之后不再读取该键。请改用令牌表。`,`لا يزال ملف الإعدادات يضبط webServerApiToken. استورده OMMS مرة واحدة كرمز باسم “from config file” ولم يعد يقرأ هذا المفتاح. استخدم جدول الرموز بدلاً منه.`],"Open this page on the computer that runs OMMS to manage tokens and the password.":[`请在运行 OMMS 的电脑上打开此页面,以管理令牌和密码。`,`افتح هذه الصفحة على الحاسوب الذي يشغّل OMMS لإدارة الرموز وكلمة المرور.`],"Revoke this token? Scripts that use it stop working.":[`撤销此令牌?使用它的脚本将停止工作。`,`إلغاء هذا الرمز؟ ستتوقف البرامج النصية التي تستخدمه عن العمل.`],"No browser password is set.":[`未设置浏览器密码。`,`لم تُضبط كلمة مرور للمتصفح.`],"A browser password is set for user":[`已为以下用户设置浏览器密码:`,`ضُبطت كلمة مرور المتصفح للمستخدم`],"A browser password is set for your computer user name.":[`已为你的电脑用户名设置浏览器密码。`,`ضُبطت كلمة مرور المتصفح لاسم مستخدم حاسوبك.`],"User name":[`用户名`,`اسم المستخدم`],Password:[`密码`,`كلمة المرور`],"Save password":[`保存密码`,`حفظ كلمة المرور`],"Clear password":[`清除密码`,`مسح كلمة المرور`],"Saved. Restart the web app to use the new browser password.":[`已保存。重启网页应用以使用新的浏览器密码。`,`تم الحفظ. أعد تشغيل تطبيق الويب لاستخدام كلمة مرور المتصفح الجديدة.`],Name:[`名称`,`الاسم`],Expires:[`过期时间`,`تاريخ الانتهاء`],"Last used":[`上次使用`,`آخر استخدام`],Never:[`永不`,`أبداً`],Revoke:[`撤销`,`إلغاء`],Copy:[`复制`,`نسخ`],"Copy this token now. It will not be shown again.":[`请立即复制此令牌。它不会再次显示。`,`انسخ هذا الرمز الآن. لن يُعرض مرة أخرى.`],"Token name":[`令牌名称`,`اسم الرمز`],"Expires after":[`有效期`,`ينتهي بعد`],"Generate token":[`生成令牌`,`إنشاء رمز`],All:[`全部`,`الكل`],Kind:[`类型`,`النوع`],"Built-in model":[`内置模型`,`النموذج المدمج`],"OpenAI-compatible server":[`OpenAI 兼容服务器`,`خادم متوافق مع OpenAI`],"Server URL":[`服务器 URL`,`عنوان URL للخادم`],"Vector size":[`向量维度`,`حجم المتجه`],"Stored memories":[`已存储的记忆`,`الذكريات المخزنة`],"Re-embedding":[`正在重新嵌入`,`جارٍ إعادة التضمين`],"Re-embed finished.":[`重新嵌入已完成。`,`اكتملت إعادة التضمين.`],"Re-embed failed":[`重新嵌入失败`,`فشلت إعادة التضمين`],Retry:[`重试`,`إعادة المحاولة`],Lock:[`锁定`,`قفل`],"Unlock to change":[`解锁以更改`,`افتح القفل للتغيير`],"The model that turns memory text into search vectors. A change re-embeds every memory.":[`将记忆文本转换为搜索向量的模型。更改后会重新嵌入所有记忆。`,`النموذج الذي يحوّل نص الذكريات إلى متجهات بحث. يؤدي تغييره إلى إعادة تضمين كل الذكريات.`],Preset:[`预设`,`إعداد مسبق`],Custom:[`自定义`,`مخصص`],"No key":[`无密钥`,`بلا مفتاح`],"Keep the saved key":[`保留已保存的密钥`,`الاحتفاظ بالمفتاح المحفوظ`],Apply:[`应用`,`تطبيق`],Cancel:[`取消`,`إلغاء الأمر`],"Test passed. Vector size":[`测试通过。向量维度`,`نجح الاختبار. حجم المتجه`],"Test failed":[`测试失败`,`فشل الاختبار`],"Every stored memory will be re-embedded":[`所有已存储的记忆都将重新嵌入`,`ستُعاد عملية تضمين كل الذكريات المخزنة`],"The hosted server is called once for each memory, which may cost money.":[`托管服务器会为每条记忆调用一次,可能产生费用。`,`يُستدعى الخادم المستضاف مرة لكل ذكرى، وقد يكلّف ذلك مالاً.`],"Search results are poor until the re-embed ends.":[`在重新嵌入结束前,搜索结果质量较差。`,`تكون نتائج البحث ضعيفة حتى تنتهي إعادة التضمين.`],"Restart open OpenCode and Pi sessions after the change.":[`更改后请重启已打开的 OpenCode 和 Pi 会话。`,`أعد تشغيل جلسات OpenCode وPi المفتوحة بعد التغيير.`],"Profile learning":[`用户画像学习`,`تعلّم الملف الشخصي`],"Catch up analyses every waiting prompt with the saved external API, 50 prompts for each model call.":[`补齐会使用已保存的外部 API 分析所有等待中的提示词,每次模型调用处理 50 条。`,`يحلّل اللحاق كل الطلبات المنتظرة عبر واجهة API الخارجية المحفوظة، 50 طلباً لكل استدعاء للنموذج.`],"Open this page on the computer that runs OMMS to start a catch-up run.":[`请在运行 OMMS 的电脑上打开此页面以开始补齐。`,`افتح هذه الصفحة على الحاسوب الذي يشغّل OMMS لبدء اللحاق.`],"Prompts waiting for profile learning":[`等待用户画像学习的提示词`,`الطلبات المنتظرة لتعلّم الملف الشخصي`],"Model calls":[`模型调用次数`,`استدعاءات النموذج`],"Batches done":[`已完成批次`,`الدفعات المكتملة`],"Prompts waiting":[`等待中的提示词`,`الطلبات المنتظرة`],Paused:[`已暂停`,`متوقف مؤقتاً`],Finished:[`已完成`,`اكتمل`],Stopped:[`已停止`,`توقّف`],"Catch up profile":[`补齐用户画像`,`اللحاق بالملف الشخصي`],"Start profile learning for the waiting prompts? Model calls":[`为等待中的提示词开始用户画像学习?模型调用次数`,`بدء تعلّم الملف الشخصي للطلبات المنتظرة؟ عدد استدعاءات النموذج`],"never used before":[`从未使用`,`لم يُستخدم من قبل`],"A newer catch-up run took over.":[`较新的补齐任务已接管。`,`تولّت عملية لحاق أحدث المهمة.`],"Browser password cleared. Restart the web app to turn it off.":[`浏览器密码已清除。重启网页应用以关闭它。`,`تم مسح كلمة مرور المتصفح. أعد تشغيل تطبيق الويب لإيقافها.`],Actions:[`操作`,`الإجراءات`],"All exchanges are done. Learning the profile from the imported prompts":[`所有对话已完成。正在从导入的提示中学习画像`,`اكتملت كل المحادثات. يجري تعلّم الملف الشخصي من المطالبات المستوردة`],batches:[`批`,`دفعات`],"Change it in":[`修改位置`,`مكان التغيير`],"Check them, then press Save maps.":[`请检查后点击保存映射。`,`راجعها ثم اضغط حفظ الخرائط.`],Credential:[`凭据`,`بيانات الاعتماد`],Email:[`邮箱`,`البريد الإلكتروني`],Filled:[`已填写`,`تم الملء`],"Finds the project each missing directory belongs to, mostly the main repository of a deleted worktree, and fills it in for you to check. Nothing is saved until you press Save maps.":[`为每个缺失的目录找到所属项目(多为已删除工作树的主仓库),并填入供你检查。点击保存映射之前不会保存任何内容。`,`يعثر على المشروع الذي ينتمي إليه كل مجلد مفقود، وغالباً المستودع الرئيسي لشجرة عمل محذوفة، ويملؤه لتراجعه. لا يُحفظ شيء حتى تضغط حفظ الخرائط.`],Hosts:[`主机`,`المضيفات`],"Import status":[`导入状态`,`حالة الاستيراد`],"in use":[`使用中`,`قيد الاستخدام`],"Last run":[`上次运行`,`آخر تشغيل`],"Last update":[`最后更新`,`آخر تحديث`],"Learning profile":[`正在学习画像`,`يجري تعلّم الملف الشخصي`],"Merge into":[`合并到`,`دمج في`],"Merge this profile into the other one? The source profile is turned off, not deleted.":[`将此画像合并到另一个画像?源画像会被停用,不会被删除。`,`دمج هذا الملف الشخصي في الآخر؟ يُوقَف الملف المصدر ولا يُحذف.`],"Merged.":[`已合并。`,`تم الدمج.`],"model not recorded":[`未记录模型`,`لم يُسجَّل نموذج`],model:[`个模型`,`نموذج`],models:[`个模型`,`نماذج`],"No directory recorded":[`未记录目录`,`لم يُسجَّل مجلد`],"No suggestion":[`无建议`,`لا اقتراح`],"Not started":[`未开始`,`لم يبدأ`],"OMMS keeps one profile for each git email. A folder whose repository has its own email starts a second profile. Choose the profile that is yours, or merge the extra one into it.":[`OMMS 为每个 git 邮箱保留一个画像。若某文件夹的仓库设置了自己的邮箱,就会产生第二个画像。请选择属于你的画像,或把多余的画像合并进去。`,`يحتفظ OMMS بملف شخصي لكل بريد git. المجلد الذي يملك مستودعه بريداً خاصاً يبدأ ملفاً شخصياً ثانياً. اختر ملفك الشخصي، أو ادمج الملف الزائد فيه.`],"Outcomes by host":[`各主机结果`,`النتائج حسب المضيف`],"Partly imported":[`部分已导入`,`مستورد جزئياً`],Patterns:[`模式`,`الأنماط`],pending:[`待处理`,`معلّق`],Preferences:[`偏好`,`التفضيلات`],Profiles:[`画像`,`الملفات الشخصية`],"Prompts analysed":[`已分析提示`,`المطالبات المحلَّلة`],Running:[`运行中`,`قيد التشغيل`],"Saved maps apply to every host.":[`已保存的映射适用于所有主机。`,`تنطبق الخرائط المحفوظة على كل المضيفات.`],"Saved: a memory was stored. Skipped: the model or a rule found nothing worth keeping, or the turn was private or trivial. Failed: the attempt hit an error. Total: the three added up. Each percentage is a share of its row's total.":[`已保存:存储了一条记忆。已跳过:模型或规则认为没有值得保留的内容,或该轮为私密或琐碎内容。失败:尝试出错。总计:三者之和。每个百分比是该行总计中的占比。`,`محفوظ: خُزّنت ذاكرة. متجاوز: لم يجد النموذج أو قاعدة ما يستحق الحفظ، أو كانت الجولة خاصة أو تافهة. فشل: واجهت المحاولة خطأ. الإجمالي: مجموع الثلاثة. كل نسبة هي حصة من إجمالي صفها.`],"Saved. OMMS now uses this profile in every folder.":[`已保存。OMMS 现在在所有文件夹中使用此画像。`,`تم الحفظ. يستخدم OMMS هذا الملف الشخصي الآن في كل المجلدات.`],Directories:[`目录数`,`عدد المجلدات`],"No target chosen":[`尚未选择目标`,`لم يُختر مجلد مستهدف`],"Smart resolve directories":[`智能解析目录`,`حلّ المجلدات تلقائياً`],Exact:[`精确`,`مطابقة تامة`],"Name match":[`名称匹配`,`مطابقة بالاسم`],Guess:[`猜测`,`تخمين`],Confidence:[`可信度`,`درجة الثقة`],"Temporary folder":[`临时文件夹`,`مجلد مؤقت`],"node_modules folder":[`node_modules 文件夹`,`مجلد node_modules`],"App data folder":[`应用数据文件夹`,`مجلد بيانات التطبيقات`],"Skills folder":[`技能文件夹`,`مجلد المهارات`],"Rows with a target":[`已有目标的行数`,`عدد الصفوف ذات المجلد المستهدف`],"Smart resolve shows each proposed map and ignore in a dialog. Tick the ones to keep, then press Confirm. Nothing is saved before that.":[`智能解析会在对话框中列出每个建议的映射和忽略项。勾选要保留的项,然后点击确认。在此之前不会保存任何内容。`,`يعرض الحلّ التلقائي كل خريطة مقترحة وكل تجاهل مقترح في مربع حوار. حدّد ما تريد الاحتفاظ به، ثم اضغط تأكيد. لا يُحفظ شيء قبل ذلك.`],"Suggested to ignore":[`建议忽略`,`مقترح للتجاهل`],Ignore:[`忽略`,`تجاهل`],Restore:[`恢复`,`استعادة`],"No target":[`无目标`,`بلا مجلد مستهدف`],"Save this map":[`保存此映射`,`حفظ هذه الخريطة`],"Tick the maps and ignores to keep, then press Confirm to save them. Saved maps apply to every host on the next import or backfill run.":[`勾选要保留的映射和忽略项,然后点击确认保存。保存的映射将在所有主机的下一次导入或回填时生效。`,`حدّد الخرائط وعناصر التجاهل التي تريد الاحتفاظ بها، ثم اضغط تأكيد لحفظها. تسري الخرائط المحفوظة على كل المضيفات في عملية الاستيراد أو الاستكمال التالية.`],"Nothing to save. Type a target in a row, or press Ignore for folders that are not projects.":[`没有可保存的内容。请在行中输入目标,或对不是项目的文件夹点击忽略。`,`لا يوجد ما يُحفظ. اكتب مجلداً مستهدفاً في صف، أو اضغط تجاهل للمجلدات التي ليست مشاريع.`],"Ignored directories":[`已忽略的目录`,`المجلدات المتجاهَلة`],"Ignored directories stay unimported and leave the unresolved counts.":[`已忽略的目录保持未导入,并且不计入未解析数量。`,`تبقى المجلدات المتجاهَلة دون استيراد، ولا تُحسب ضمن الأعداد غير المحلولة.`],"They apply to the next import or backfill run. No sessions were imported.":[`它们将在下一次导入或回填时生效。未导入任何会话。`,`تسري في عملية الاستيراد أو الاستكمال التالية. لم تُستورد أي جلسات.`],"Keep a map after its sessions import. Every import checks the map before it skips a session, so removing a map makes its sessions unresolved again on the next run.":[`会话导入后请保留映射。每次导入在跳过会话之前都会先检查映射,因此删除映射会使其会话在下次运行时重新变为未解析。`,`احتفظ بالخريطة بعد استيراد جلساتها. يفحص كل استيراد الخريطة قبل أن يتجاوز جلسة، لذا فإن حذف الخريطة يجعل جلساتها غير محلولة مجدداً في التشغيل التالي.`],"Save removals":[`保存删除`,`حفظ عمليات الحذف`],"Settings changed elsewhere. Check the list and try again.":[`设置已在其他位置更改。请检查列表后再试。`,`تغيّرت الإعدادات في مكان آخر. راجع القائمة، ثم حاول مجدداً.`],"Settings changed elsewhere and could not be refreshed. Refresh the list, then try again.":[`设置已在其他位置更改,且无法刷新。请刷新列表后再试。`,`تغيّرت الإعدادات في مكان آخر وتعذّر تحديثها. حدّث القائمة، ثم حاول مجدداً.`],"Saved. Removed maps stop applying at the next import or backfill run.":[`已保存。删除的映射将从下一次导入或回填起不再生效。`,`تم الحفظ. تتوقف الخرائط المحذوفة عن السريان في عملية الاستيراد أو الاستكمال التالية.`],"Removals could not be saved. Try again.":[`无法保存删除。请重试。`,`تعذّر حفظ عمليات الحذف. حاول مجدداً.`],"Ignored. The directory stays unimported.":[`已忽略。该目录保持未导入。`,`تم التجاهل. يبقى المجلد دون استيراد.`],"The directory could not be ignored. Try again.":[`无法忽略该目录。请重试。`,`تعذّر تجاهل المجلد. حاول مجدداً.`],"Restored. The directory shows again in each host list that reported it.":[`已恢复。该目录会重新出现在报告它的每个主机列表中。`,`تمت الاستعادة. يظهر المجلد مجدداً في قائمة كل مضيف أبلغ عنه.`],"The directory could not be restored. Try again.":[`无法恢复该目录。请重试。`,`تعذّرت استعادة المجلد. حاول مجدداً.`],"Saved, but the list could not be refreshed. Refresh the list without saving again.":[`已保存,但无法刷新列表。请刷新列表,无需再次保存。`,`تم الحفظ، لكن تعذّر تحديث القائمة. حدّث القائمة دون الحفظ مجدداً.`],"Review directory maps":[`检查目录映射`,`مراجعة خرائط المجلدات`],"Proposed maps":[`建议映射数`,`عدد الخرائط المقترحة`],Sessions:[`会话数`,`عدد الجلسات`],Confirm:[`确认`,`تأكيد`],"Saving…":[`正在保存…`,`جارٍ الحفظ…`],"Settings refreshed. No maps were saved.":[`设置已刷新。未保存任何映射。`,`حُدّثت الإعدادات. لم تُحفظ أي خرائط.`],"Settings could not be refreshed. Try Refresh list again.":[`无法刷新设置。请再次点击刷新列表。`,`تعذّر تحديث الإعدادات. حاول تحديث القائمة مجدداً.`],"Maps could not be saved. Review the targets and confirm again.":[`无法保存映射。请检查目标后再次确认。`,`تعذّر حفظ الخرائط. راجع المجلدات المستهدفة، ثم أكّد مجدداً.`],"Settings changed elsewhere. Review these maps and confirm again.":[`设置已在其他位置更改。请检查这些映射后再次确认。`,`تغيّرت الإعدادات في مكان آخر. راجع هذه الخرائط، ثم أكّد مجدداً.`],"Settings changed elsewhere and could not be refreshed. Refresh the list before confirming again.":[`设置已在其他位置更改,且无法刷新。请刷新列表后再次确认。`,`تغيّرت الإعدادات في مكان آخر وتعذّر تحديثها. حدّث القائمة قبل التأكيد مجدداً.`],"Maps were saved, but the list could not be refreshed. Refresh the list without saving again.":[`映射已保存,但无法刷新列表。请刷新列表,无需再次保存。`,`حُفظت الخرائط، لكن تعذّر تحديث القائمة. حدّث القائمة دون الحفظ مجدداً.`],"No model was recorded for these attempts. This happens with records written by older OMMS versions, and when an attempt stops before a model is chosen.":[`这些尝试没有记录模型。旧版 OMMS 写入的记录,以及在选定模型之前就停止的尝试,会出现这种情况。`,`لم يُسجَّل نموذج لهذه المحاولات. يحدث ذلك في السجلات التي كتبتها إصدارات أقدم من OMMS، وعندما تتوقف المحاولة قبل اختيار نموذج.`],"These sessions cannot be mapped.":[`这些会话无法映射。`,`لا يمكن ربط هذه الجلسات.`],unresolved:[`未解析`,`غير محلول`],"Use this profile":[`使用此画像`,`استخدام هذا الملف الشخصي`],"Use this profile for every folder?":[`在所有文件夹中使用此画像?`,`استخدام هذا الملف الشخصي في كل المجلدات؟`],"Used for":[`用途`,`الاستخدام`],Workflows:[`工作流`,`سير العمل`],Memory:[`记忆`,`الذاكرة`],Setting:[`设置`,`الإعداد`],Value:[`数值`,`القيمة`],Default:[`默认值`,`القيمة الافتراضية`],Unit:[`单位`,`الوحدة`],Affects:[`影响`,`التأثير`],Results:[`条结果`,`نتائج`],Memories:[`条记忆`,`ذكريات`],Bytes:[`字节`,`بايت`],"Approximate tokens":[`约计令牌`,`رموز تقريبية`],"Maximum memory search results. Manual searches can request fewer; prompt retrieval uses this ceiling.":[`记忆搜索结果的最大数量。手动搜索可以请求更少;提示词检索使用此上限。`,`الحد الأقصى لنتائج بحث الذاكرة. يمكن للبحث اليدوي طلب عدد أقل؛ ويستخدم استرجاع الطلب هذا السقف.`],"Recent memories added at session start in OpenCode V1 and Claude Code. Pi and OpenCode V2 use prompt-based search instead.":[`会话开始时在 OpenCode V1 和 Claude Code 中加入的近期记忆。Pi 和 OpenCode V2 改用基于提示词的搜索。`,`الذكريات الحديثة التي تُضاف عند بدء الجلسة في OpenCode V1 و Claude Code. أما Pi و OpenCode V2 فيستخدمان البحث عبر الطلب بدلاً منها.`],"Conversation input sent to the memory-summary model through the shared capture pipeline. Smaller values can omit conversation text.":[`通过共享捕获管道发送给记忆摘要模型的对话输入。数值较小时可能省略部分对话文本。`,`مدخلات المحادثة التي تُرسل إلى نموذج تلخيص الذاكرة عبر مسار الالتقاط المشترك. القيم الأصغر قد تحذف نصاً من المحادثة.`],"OpenCode profile-learning input. Smaller values can omit prompts from that input. This control does not limit the other hosts' profile input.":[`OpenCode 画像学习的输入。数值较小时可能从该输入中省略部分提示词。此设置不限制其他主机的画像输入。`,`مدخلات تعلّم الملف الشخصي في OpenCode. القيم الأصغر قد تحذف مطالبات من هذه المدخلات. لا يقيّد هذا الإعداد مدخلات الملف الشخصي في المضيفات الأخرى.`],"Automatic memory context, including profile text and formatting, added to agent requests across all hosts. Smaller values can show fewer or shorter memories.":[`自动加入各主机代理请求的记忆上下文,包括画像文本和格式化内容。数值较小时会显示更少或更短的记忆。`,`سياق الذاكرة المُضاف تلقائياً إلى طلبات الوكيل في كل المضيفات، بما في ذلك نص الملف الشخصي والتنسيق. القيم الأصغر قد تعرض ذكريات أقل أو أقصر.`],"Enter a positive whole number.":[`请输入正整数。`,`أدخل رقماً صحيحاً موجباً.`],"Enter a whole number from 16,384 to 16,777,216.":[`请输入 16,384 到 16,777,216 之间的整数。`,`أدخل رقماً صحيحاً من 16,384 إلى 16,777,216.`],"Enter a whole number from 1,024 to 16,777,216.":[`请输入 1,024 到 16,777,216 之间的整数。`,`أدخل رقماً صحيحاً من 1,024 إلى 16,777,216.`],"Enter a whole number from 256 to 65,536.":[`请输入 256 到 65,536 之间的整数。`,`أدخل رقماً صحيحاً من 256 إلى 65,536.`],"Byte limits count UTF-8 bytes.":[`字节限制按 UTF-8 字节计数。`,`تُحتسب حدود البايت بوحدات بايت UTF-8.`],"Approximate tokens are estimated as ceil(UTF-8 bytes / 4). A provider can count more or fewer tokens for the same text.":[`约计令牌按 ceil(UTF-8 字节数 / 4) 估算。同一文本,提供商统计的令牌数可能更多或更少。`,`تُقدَّر الرموز التقريبية بالصيغة ceil(بايتات UTF-8 / 4). قد يحسب المزوّد للنص نفسه رموزاً أكثر أو أقل.`],"These controls do not delete stored data, set a spending limit, limit model replies, or control Graphify output.":[`这些设置不会删除已存储的数据、设定消费限额、限制模型回复,也不会控制 Graphify 输出。`,`لا تحذف هذه الإعدادات البيانات المخزنة، ولا تضع حد إنفاق، ولا تحدّ من ردود النموذج، ولا تتحكم في خرج Graphify.`],"Edit ~/.config/omms/omms.jsonc directly to set these limits without the web UI.":[`也可以直接编辑 ~/.config/omms/omms.jsonc 来设置这些限制,无需网页界面。`,`عدّل الملف ~/.config/omms/omms.jsonc مباشرة لضبط هذه الحدود دون واجهة الويب.`],"Save memory limits":[`保存记忆限制`,`حفظ حدود الذاكرة`],"Saved. New memory operations use these limits.":[`已保存。新的记忆操作将使用这些限制。`,`تم الحفظ. ستستخدم عمليات الذاكرة الجديدة هذه الحدود.`],"Invalid setting":[`无效的设置`,`إعداد غير صالح`],"Config changed. Reload settings and save again.":[`设置文件已更改。请重新加载设置后再次保存。`,`تغيّر ملف الإعدادات. أعد تحميل الإعدادات ثم احفظ مجدداً.`],"The memory settings could not be loaded. Reload the page to try again.":[`无法加载记忆设置。请重新加载页面重试。`,`تعذّر تحميل إعدادات الذاكرة. أعد تحميل الصفحة للمحاولة مجدداً.`],"The memory settings could not be saved.":[`无法保存记忆设置。`,`تعذّر حفظ إعدادات الذاكرة.`],"Effective value":[`生效值`,`القيمة السارية`],project:[`项目`,`المشروع`],"The project value stays in force. Saving edits the global file only.":[`项目值仍然生效。保存只修改全局文件。`,`تبقى قيمة المشروع سارية، والحفظ يعدّل الملف العام فقط.`]};function ah(e,t){return t===`en`?e:ih[e]?.[t===`zh`?0:1]??e}function oh(){let{language:e}=pr();return t=>ah(t,e)}function sh(e,t){if(e===`env`){let n=(t.name??``).trim();if(!/^[A-Za-z_][A-Za-z0-9_]*$/.test(n))throw Error(`Enter a variable name such as ZAI_API_KEY`);return{source:e,name:n}}if(e===`file`){let n=(t.path??``).trim();if(!n)throw Error(`Enter the path of a key file`);return{source:e,path:n}}let n=(t.name??``).trim()||`memory-api`;if(!/^[A-Za-z0-9_-]{1,64}$/.test(n))throw Error(`Name the key file with letters, digits, dashes, or underscores`);if(!(t.value??``).trim())throw Error(`Paste the key`);return{source:e,name:n,value:t.value??``,replace:t.replace===!0}}function ch(e){let t=[],n=e.memoryProvider===`orcarouter`;return!n&&!e.memoryModel&&t.push(`memoryModel`),!n&&!e.memoryApiUrl&&t.push(`memoryApiUrl`),e.keySet||t.push(`memoryApiKey`),t}function lh(e,t){if(t===`inherit`||t===`external`)return{[`${e}Model`]:t};let n=t.indexOf(`/`);if(n<1||n===t.length-1)throw Error(`Enter a model as provider/model.`);return{[`${e}Provider`]:t.slice(0,n),[`${e}Model`]:t.slice(n+1)}}function uh(e){return{kind:e.relation,command:e.relation===`older`?`npm i -g om-memory-system@latest`:null}}function dh(e,t){return e.filter(e=>!t.has(e.from))}var fh={opencode:`OpenCode`,pi:`Pi`,"claude-code":`Claude Code`};function ph(e){return fh[e]}function mh(e){return Object.hasOwn(fh,e)?fh[e]:e}function hh({status:e}){let t=oh();return(0,U.jsxs)(`div`,{className:`space-y-1 rounded-lg border border-border p-3`,children:[(0,U.jsx)(`h3`,{className:`text-subsection-title font-semibold`,children:ph(`claude-code`)}),e?.ready===!0&&(0,U.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:t(`Claude Code capture uses the external API.`)}),e?.ready===!1&&(0,U.jsxs)(`div`,{role:`alert`,className:`space-y-1 text-xs`,children:[(0,U.jsx)(`p`,{className:`text-amber-600`,children:t(`Claude Code capture is off. Complete the external API settings.`)}),(e.issues??[]).length>0&&(0,U.jsxs)(`p`,{children:[t(`Missing settings`),`: `,(e.issues??[]).map(e=>t(e)).join(`; `)]})]})]})}function gh(){let e=oh(),[t,n]=(0,_.useState)(),[r,i]=(0,_.useState)({}),[a,o]=(0,_.useState)(``),[s,c]=(0,_.useState)(!1);(0,_.useEffect)(()=>{let e=!0,t=Qm();$(`/api/settings`).then(r=>{e&&t.isCurrent()&&n(r)}).catch(t=>{e&&o(t.message)});for(let t of[`opencode`,`pi`])$(`/api/settings/models?host=${t}`).then(n=>{e&&i(e=>({...e,[t]:n}))}).catch(()=>{e&&i(e=>({...e,[t]:{available:!1}}))});let r=eh(t=>{e&&n(t)});return()=>{e=!1,r()}},[]);async function l(n,r){if(!t)return;let i;try{i=lh(n,r)}catch(t){o(e(t.message));return}c(!0);let a,s;try{a=await $(`/api/settings`,{method:`PATCH`,body:JSON.stringify({edits:i,revision:t.revision})})}catch(e){s=e}let l=await $m()!==null;if(c(!1),a){let t=e(a.migratedLegacy?`Saved. OMMS now reads ~/.config/omms/omms.jsonc. The legacy config was kept.`:`Saved. New capture and profile work uses these settings.`);o(l?t:`${t} ${e(`Reload the page before saving again.`)}`)}else o(th(s?.message??``,e(l?`Current settings were reloaded; check the values and save again.`:`The current settings could not be reloaded. Reload the page.`)))}let u=ch({memoryProvider:t?.settings.memoryProvider?.globalValue,memoryModel:t?.settings.memoryModel?.globalValue,memoryApiUrl:t?.settings.memoryApiUrl?.globalValue,keySet:!!t?.secrets.memoryApiKey?.set});return(0,U.jsxs)(`section`,{className:`space-y-3 rounded-xl border border-border bg-card p-4`,"aria-label":e(`Models`),children:[(0,U.jsx)(`h2`,{className:`text-section-title font-semibold`,children:e(`Models`)}),(0,U.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[e(`External API fallback`),`: `,t?.fallback.model??e(`none`),` (`,e(t?.fallback.configured?`ready`:`not ready`),`).`]}),[`opencode`,`pi`].map(e=>(0,U.jsx)(_h,{host:e,model:t?.settings[`${e}Model`],provider:t?.settings[`${e}Provider`],effective:e===`pi`?t?.effective.pi.kind:t?.effective.opencode.mode??`unready`,list:r[e],externalMissing:u,busy:s||!t,onSave:t=>l(e,t)},e)),(0,U.jsx)(hh,{status:t?.effective[`claude-code`]}),a&&(0,U.jsx)(`p`,{role:`status`,className:`text-sm`,children:a})]})}function _h({host:e,model:t,provider:n,effective:r,list:i,externalMissing:a,busy:o,onSave:s}){let c=oh(),l=t?.globalValue===`inherit`||!t?.globalValue?`inherit`:t.globalValue===`external`?`external`:`${n?.globalValue??``}/${t.globalValue}`,[u,d]=(0,_.useState)(),[f,p]=(0,_.useState)(),[m,h]=(0,_.useState)(),g=u??(l===`inherit`||l===`external`?l:`manual`),v=i?.models??[],y=l===`inherit`||l===`external`?``:l,b=m||y||(v[0]?`${v[0].provider}/${v[0].model}`:`typed`),x=!v.some(e=>`${e.provider}/${e.model}`===b),S=f??y;return(0,U.jsxs)(`div`,{className:`space-y-2 rounded-lg border border-border p-3`,children:[(0,U.jsx)(`h3`,{className:`text-subsection-title font-semibold`,children:ph(e)}),(0,U.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[c(`Effective model`),`:`,` `,t?.value===`external`&&r===`manual`?c(`external API`):t?.value===`inherit`||r===`session`?c(`session`):r===`manual`?c(`external API`):r===`unready`?c(`unavailable`):`${n?.value??``}/${t?.value??``}`]}),(t?.source===`project`||n?.source===`project`)&&(0,U.jsx)(`p`,{className:`text-xs text-amber-600`,children:c(`Project override is active. Changes to the global file may not take effect here.`)}),(0,U.jsx)(`label`,{className:`block text-sm`,htmlFor:`${e}-model`,children:c(`Model choice`)}),(0,U.jsxs)(dn,{id:`${e}-model`,className:`w-full rounded-lg border border-border bg-background p-2 text-sm`,value:g,onChange:e=>d(e.target.value),children:[(0,U.jsx)(`option`,{value:`inherit`,children:c(`Session model`)}),(0,U.jsx)(`option`,{value:`manual`,children:c(`Manual model`)}),(0,U.jsx)(`option`,{value:`external`,disabled:a.length>0,children:c(`External API`)})]}),a.length>0&&(0,U.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[c(`External API needs`),`: `,a.join(`, `)]}),g===`manual`&&i?.available&&v.length>0&&(0,U.jsxs)(dn,{className:`w-full rounded-lg border border-border bg-background p-2 text-sm`,"aria-label":`${ph(e)} ${c(`Model`)}`,value:x?`typed`:b,onChange:e=>h(e.target.value),children:[v.map(e=>(0,U.jsxs)(`option`,{value:`${e.provider}/${e.model}`,children:[e.name,` (`,e.provider,`/`,e.model,`)`]},`${e.provider}/${e.model}`)),(0,U.jsx)(`option`,{value:`typed`,children:c(`Manual provider/model`)})]}),g===`manual`&&x&&(0,U.jsx)(`input`,{className:`w-full rounded-lg border border-border bg-background p-2 text-sm`,"aria-label":`${e} ${c(`Manual provider/model`)}`,placeholder:`provider/model`,value:S,onChange:e=>{p(e.target.value),h(`typed`)}}),g===`manual`&&i&&!i.available&&(0,U.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:i.reason?c(i.reason):c(`Model list unavailable. Enter provider/model manually.`)}),(0,U.jsx)(`button`,{type:`button`,className:`rounded-lg border border-border px-3 py-1.5 text-sm`,disabled:o,onClick:()=>s(g===`manual`?x?S.trim():b:g),children:c(`Save model`)})]})}var vh=`Enter a positive whole number.`,yh=[{key:`maxMemories`,id:`memory-maxMemories`,default:10,unit:`Results`,affects:`Maximum memory search results. Manual searches can request fewer; prompt retrieval uses this ceiling.`,min:1,max:2**53-1,accepted:vh},{key:`chatMessage.maxMemories`,id:`memory-chatMessage-maxMemories`,default:3,unit:`Memories`,affects:`Recent memories added at session start in OpenCode V1 and Claude Code. Pi and OpenCode V2 use prompt-based search instead.`,min:1,max:2**53-1,accepted:vh},{key:`autoCaptureMaxContextBytes`,id:`memory-autoCaptureMaxContextBytes`,default:131072,unit:`Bytes`,affects:`Conversation input sent to the memory-summary model through the shared capture pipeline. Smaller values can omit conversation text.`,min:16384,max:16777216,accepted:`Enter a whole number from 16,384 to 16,777,216.`},{key:`userProfileMaxContextBytes`,id:`memory-userProfileMaxContextBytes`,default:32768,unit:`Bytes`,affects:`OpenCode profile-learning input. Smaller values can omit prompts from that input. This control does not limit the other hosts' profile input.`,min:1024,max:16777216,accepted:`Enter a whole number from 1,024 to 16,777,216.`},{key:`retrievalMaxTokens`,id:`memory-retrievalMaxTokens`,default:2e3,unit:`Approximate tokens`,affects:`Automatic memory context, including profile text and formatting, added to agent requests across all hosts. Smaller values can show fewer or shorter memories.`,min:256,max:65536,accepted:`Enter a whole number from 256 to 65,536.`}];[...yh.flatMap(e=>[e.unit,e.affects,e.accepted])];function bh(e,t){let n=typeof t==`string`?t.trim():``;if(!n||!/^-?\d+(\.\d+)?$/.test(n))return;let r=Number(n);if(Number.isInteger(r))return r>=e.min&&r<=e.max?r:void 0}function xh(e){return e.toLocaleString(`en-US`)}function Sh(e,t,n){let r=t[e.key];return typeof r==`string`?r:String(n[e.key]??e.default)}function Ch(e,t){let n=!1;for(let r of yh){let i=e[r.key];if(typeof i!=`string`)continue;let a=bh(r,i);if(a===void 0)return!1;a!==(t[r.key]??r.default)&&(n=!0)}return n}function wh(e,t){let n={};if(!Ch(e,t))return n;for(let r of yh){let i=e[r.key];if(typeof i!=`string`)continue;let a=bh(r,i);a!==(t[r.key]??r.default)&&(n[r.key]=a)}return n}var Th=`Config changed. Reload settings and save again.`;function Eh(e){if(e===`Config changed. Reload settings and save again.`)return{kind:`stale`};let t=yh.map(e=>e.key.replace(/\./g,`\\.`)).join(`|`),n=RegExp(`^Invalid (${t}) setting\\b`).exec(e);return n?{kind:`invalid`,key:n[1]}:{kind:`unknown`}}var Dh=`relative overflow-x-auto rounded-lg border border-border`,Oh=`px-3 py-2 text-start font-medium`,kh=`bg-muted/50 text-xs text-muted-foreground`,Ah=`px-3 py-2 text-start font-medium`,jh=`border-t border-border transition-colors hover:bg-muted/30`,Mh=`px-3 py-1.5`;function Nh(){let e=oh(),[t,n]=(0,_.useState)(),[r,i]=(0,_.useState)({}),[a,o]=(0,_.useState)(!1),[s,c]=(0,_.useState)(),l=(0,_.useRef)(!1);(0,_.useEffect)(()=>{let e=!0,t=Qm();$(`/api/settings`).then(r=>{e&&t.isCurrent()&&n(r)}).catch(()=>{e&&c({kind:`load-failed`})});let r=eh(t=>{e&&n(t)});return()=>{e=!1,r()}},[]);let u={},d={};for(let e of yh){let n=t?.settings[e.key];u[e.key]=typeof n?.globalValue==`number`?n.globalValue:void 0,d[e.key]=typeof n?.default==`number`?n.default:e.default}let f=Ch(r,u);async function p(){if(!t||!f||l.current)return;let e=wh(r,u);if(!Object.keys(e).length)return;l.current=!0,o(!0);let n=!1,a;try{await $(`/api/settings`,{method:`PATCH`,body:JSON.stringify({edits:e,revision:t.revision})}),n=!0}catch(e){a=e}let s=await $m()!==null;o(!1),l.current=!1,n?(i({}),c({kind:`saved`,reloaded:s})):c({kind:`save-failed`,failure:Eh(a?.message??``),reloaded:s})}function m(t){if(t.kind===`load-failed`)return e(`The memory settings could not be loaded. Reload the page to try again.`);if(t.kind===`saved`)return t.reloaded?e(`Saved. New memory operations use these limits.`):`${e(`Saved. New memory operations use these limits.`)} ${e(`Reload the page before saving again.`)}`;let n=t.reloaded?e(`Current settings were reloaded; check the values and save again.`):e(`The current settings could not be reloaded. Reload the page.`);if(t.failure.kind===`stale`)return th(e(Th),n);if(t.failure.kind===`invalid`){let r=t.failure,i=yh.find(e=>e.key===r.key);return th(`${e(`Invalid setting`)} ${i.key}: ${e(i.accepted)}`,n)}return th(e(`The memory settings could not be saved.`),n)}return(0,U.jsxs)(`section`,{className:`space-y-3 rounded-xl border border-border bg-card p-4`,"aria-label":e(`Memory`),children:[(0,U.jsx)(`h2`,{className:`text-section-title font-semibold`,children:e(`Memory`)}),(0,U.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e(`Byte limits count UTF-8 bytes.`)}),(0,U.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e(`Approximate tokens are estimated as ceil(UTF-8 bytes / 4). A provider can count more or fewer tokens for the same text.`)}),(0,U.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e(`These controls do not delete stored data, set a spending limit, limit model replies, or control Graphify output.`)}),(0,U.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e(`Edit ~/.config/omms/omms.jsonc directly to set these limits without the web UI.`)}),(0,U.jsxs)(`form`,{className:`space-y-3`,onSubmit:e=>{e.preventDefault(),p()},children:[(0,U.jsx)(`div`,{className:Dh,children:(0,U.jsxs)(`table`,{className:`w-full min-w-[56rem] text-sm`,children:[(0,U.jsx)(`caption`,{className:`sr-only`,children:e(`Memory`)}),(0,U.jsx)(`thead`,{className:kh,children:(0,U.jsxs)(`tr`,{children:[(0,U.jsx)(`th`,{className:Ah,children:e(`Setting`)}),(0,U.jsx)(`th`,{className:Ah,children:e(`Value`)}),(0,U.jsx)(`th`,{className:Ah,children:e(`Default`)}),(0,U.jsx)(`th`,{className:Ah,children:e(`Unit`)}),(0,U.jsx)(`th`,{className:Ah,children:e(`Affects`)})]})}),(0,U.jsx)(`tbody`,{children:yh.map(n=>{let o=r[n.key],s=Sh(n,r,u),c=typeof o==`string`&&bh(n,o)===void 0,l=t?.settings[n.key],f=l?.source===`project`;return(0,U.jsxs)(`tr`,{className:jh,children:[(0,U.jsxs)(`td`,{className:Mh,children:[(0,U.jsx)(`code`,{dir:`ltr`,children:n.key}),f&&(0,U.jsxs)(`div`,{className:`mt-1 space-y-0.5 text-xs text-amber-600`,children:[(0,U.jsxs)(`p`,{children:[e(`Effective value`),`: `,String(l?.value??``),` (`,e(`project`),`)`]}),(0,U.jsx)(`p`,{children:e(`Project override is active. Changes to the global file may not take effect here.`)}),(0,U.jsx)(`p`,{children:e(`The project value stays in force. Saving edits the global file only.`)})]})]}),(0,U.jsxs)(`td`,{className:Mh,children:[(0,U.jsx)(`input`,{type:`number`,id:`${n.id}-input`,className:`w-36 tabular-nums`,inputMode:`numeric`,step:1,min:n.min,max:n.max,"aria-label":`${n.key} ${e(`Value`)}`,"aria-describedby":`${n.id}-help`,"aria-invalid":c||void 0,disabled:a,value:s,onChange:e=>i(t=>({...t,[n.key]:e.target.value}))}),(0,U.jsx)(`span`,{id:`${n.id}-help`,className:`block text-xs ${c?`text-red-600`:`text-muted-foreground`}`,children:e(n.accepted)})]}),(0,U.jsx)(`td`,{className:`${Mh} tabular-nums`,children:xh(d[n.key])}),(0,U.jsx)(`td`,{className:Mh,children:e(n.unit)}),(0,U.jsx)(`td`,{className:Mh,children:e(n.affects)})]},n.key)})})]})}),(0,U.jsxs)(`div`,{className:`flex gap-2`,children:[(0,U.jsx)(`button`,{type:`submit`,disabled:a||!t||!f,onClick:()=>void p(),children:e(`Save memory limits`)}),(0,U.jsx)(`button`,{type:`button`,disabled:a,onClick:()=>i({}),children:e(`Cancel`)})]})]}),s&&(0,U.jsx)(`p`,{role:`status`,className:`text-sm`,children:m(s)})]})}var Ph=[`openai-chat`,`openai-responses`,`anthropic`,`minimax`,`orcarouter`,`google-gemini`];function Fh(){let e=oh(),[t,n]=(0,_.useState)(),[r,i]=(0,_.useState)({}),[a,o]=(0,_.useState)(`file`),[s,c]=(0,_.useState)({name:``,path:``,value:``}),[l,u]=(0,_.useState)(``),[d,f]=(0,_.useState)(!1);(0,_.useEffect)(()=>{let e=!0,t=Qm();$(`/api/settings`).then(r=>{e&&t.isCurrent()&&n(r)}).catch(t=>{e&&u(t.message)});let r=eh(t=>{e&&n(t)});return()=>{e=!1,r()}},[]);let p=e=>String(t?.settings[e]?.globalValue??``),m=e=>r[e]??p(e);async function h(){if(!t)return;let n={};for(let e of[`memoryProvider`,`memoryApiUrl`,`memoryModel`]){let t=m(e).trim();t&&t!==p(e)&&(n[e]=t)}if(!Object.keys(n).length){u(e(`Nothing to save.`));return}f(!0);try{await $(`/api/settings`,{method:`PATCH`,body:JSON.stringify({edits:n,revision:t.revision})}),i({}),u(e(`Saved. New capture and profile work uses these settings.`))}catch(e){u(e.message)}await $m(),f(!1)}async function g(n=!1){if(!t)return;let r;try{r=sh(a,{...s,replace:n})}catch(t){u(e(t.message));return}f(!0);try{await $(`/api/settings/external-api/key`,{method:`POST`,body:JSON.stringify({...r,revision:t.revision})}),c(e=>({...e,value:``})),u(e(`Key source saved.`))}catch(t){let r=t.message;if(a===`paste`&&!n&&r.includes(`Confirm to replace`)){f(!1),window.confirm(e(`A key file with this name exists. Replace it?`))&&await g(!0);return}u(r)}await $m(),f(!1)}async function v(){f(!0);try{let t=await $(`/api/settings/external-api/test`,{method:`POST`,body:`{}`});u(t.ok?`${e(`Test call succeeded`)}: ${t.model??``}`:`${e(`Test call failed`)}: ${t.error??``}`)}catch(e){u(e.message)}f(!1)}let y=t?.externalKey;return(0,U.jsxs)(`section`,{className:`space-y-3 rounded-xl border border-border bg-card p-4`,"aria-label":e(`External API`),children:[(0,U.jsx)(`h2`,{className:`text-section-title font-semibold`,children:e(`External API`)}),(0,U.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:e(`An OpenAI- or Anthropic-compatible endpoint that either host can use for capture and backfill.`)}),(0,U.jsxs)(`label`,{className:`block text-sm`,children:[e(`Provider`),(0,U.jsx)(dn,{"aria-label":e(`Provider`),className:`mt-1 block w-full rounded border border-border bg-background p-2`,value:m(`memoryProvider`)||`openai-chat`,onChange:e=>i({...r,memoryProvider:e.target.value}),children:Ph.map(e=>(0,U.jsx)(`option`,{value:e,children:e},e))})]}),(0,U.jsxs)(`label`,{className:`block text-sm`,children:[e(`API URL`),(0,U.jsx)(`input`,{dir:`ltr`,className:`mt-1 block w-full rounded border border-border bg-background p-2 font-mono`,placeholder:`https://api.example.com/v1`,value:m(`memoryApiUrl`),onChange:e=>i({...r,memoryApiUrl:e.target.value})})]}),(0,U.jsxs)(`label`,{className:`block text-sm`,children:[e(`Model`),(0,U.jsx)(`input`,{dir:`ltr`,className:`mt-1 block w-full rounded border border-border bg-background p-2 font-mono`,placeholder:`glm-5-turbo`,value:m(`memoryModel`),onChange:e=>i({...r,memoryModel:e.target.value})})]}),(0,U.jsx)(`button`,{type:`button`,className:`rounded border border-border px-3 py-1.5 text-sm`,disabled:d||!t,onClick:()=>void h(),children:e(`Save endpoint`)}),(0,U.jsxs)(`fieldset`,{className:`space-y-2 rounded-lg border border-border p-3 text-sm`,children:[(0,U.jsx)(`legend`,{className:`px-1 font-medium`,children:e(`API key`)}),(0,U.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[e(`Key source`),`:`,` `,y?.source===`env`?`${e(`environment variable`)} ${y.reference}`:y?.source===`file`?`${e(`key file`)} ${y.reference}`:y?.source===`literal`?e(`set in the config file`):e(`not set`),y?.source&&` · ${e(y.resolvesInWebApp?`resolves in the web app`:`does not resolve in the web app`)}`]}),y?.source===`env`&&(0,U.jsx)(`p`,{className:`text-xs text-amber-600`,children:e(`A login web app does not see variables set only in a shell profile; a key file works everywhere.`)}),y?.source&&!y.resolvesInWebApp&&(0,U.jsx)(`p`,{className:`text-xs text-amber-600`,children:e(`The key does not resolve in this web app. Save it to a key file instead.`)}),[[`env`,`Environment variable`],[`file`,`Key file`],[`paste`,`Save key to a private file`]].map(([t,n])=>(0,U.jsxs)(`label`,{className:`flex items-center gap-2`,children:[(0,U.jsx)(`input`,{type:`radio`,name:`omms-key-source`,checked:a===t,onChange:()=>o(t)}),e(n)]},t)),a===`env`&&(0,U.jsx)(`input`,{"aria-label":e(`Variable name`),className:`w-full rounded border border-border bg-background p-2`,placeholder:`ZAI_API_KEY`,value:s.name,onChange:e=>c({...s,name:e.target.value})}),a===`file`&&(0,U.jsx)(`input`,{"aria-label":e(`Key file path`),className:`w-full rounded border border-border bg-background p-2`,placeholder:`~/.config/omms/secrets/zai.key`,value:s.path,onChange:e=>c({...s,path:e.target.value})}),a===`paste`&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`input`,{"aria-label":e(`Key file name`),className:`w-full rounded border border-border bg-background p-2`,placeholder:`memory-api`,value:s.name,onChange:e=>c({...s,name:e.target.value})}),(0,U.jsx)(`input`,{"aria-label":e(`API key`),type:`password`,autoComplete:`off`,className:`w-full rounded border border-border bg-background p-2`,value:s.value,onChange:e=>c({...s,value:e.target.value})}),(0,U.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e(`The key is written to ~/.config/omms/secrets/ readable only by you. It is never shown again.`)})]}),(0,U.jsx)(`button`,{type:`button`,className:`rounded border border-border px-3 py-1.5`,disabled:d||!t,onClick:()=>void g(),children:e(`Save key source`)})]}),(0,U.jsx)(`button`,{type:`button`,className:`rounded border border-border px-3 py-1.5 text-sm`,disabled:d,onClick:()=>void v(),children:e(`Test`)}),l&&(0,U.jsx)(`p`,{role:`status`,className:`text-sm`,children:l})]})}var Ih=new Set([`localhost`,`127.0.0.1`,`::1`,`[::1]`,`0:0:0:0:0:0:0:1`]);function Lh(e){let t=e.trim().toLowerCase();return Ih.has(t)||/^127(?:\.\d{1,3}){3}$/.test(t)}function Rh(e){try{return Lh(new URL(e).hostname)}catch{return!1}}function zh(e,t){return e?`set`:t?`missing`:`not-needed`}function Bh(e){let{access:t,secrets:n}=e,r=t.embeddingApiUrl;return{memoryApiKey:(e=>e===`not-needed`?`never-used`:e)(zh(!!n.memoryApiKey?.set,e.externalUsed||e.claudeCodeInUse)),embeddingApiKey:zh(!!n.embeddingApiKey?.set,!!r&&!Rh(r)),apiTokens:zh(t.tokenAvailable,!Lh(t.host)&&!t.authEnabled),webPassword:zh(!!n.webServerAuthPassword?.set,!1)}}function Vh(e){return e?`Browser password cleared. Restart the web app to turn it off.`:`Saved. Restart the web app to use the new browser password.`}var Hh=[{id:`ollama`,label:`Ollama`,url:`http://localhost:11434/v1`},{id:`llamacpp`,label:`llama.cpp`,url:`http://localhost:8080/v1`},{id:`openrouter`,label:`OpenRouter`,url:`https://openrouter.ai/api/v1`},{id:`openai`,label:`OpenAI`,url:`https://api.openai.com/v1`},{id:`custom`,label:`Custom`,url:``}];function Uh(e,t){let n=Hh.find(t=>t.id===e);return n&&n.url?n.url:t}function Wh(e){if(e.kind===`builtin`)return{kind:`builtin`,model:e.model.trim()};let t=e.key===`none`||e.key===`saved`?{source:e.key}:sh(e.key,{...e.keyInput,name:e.keyInput.name||`embedding-api`});return{kind:`server`,url:e.url.trim(),model:e.model.trim(),key:t}}function Gh(e){return JSON.stringify([e.kind,e.kind===`server`?e.url.trim():``,e.model.trim(),e.kind===`server`?e.key:`none`,e.kind===`server`?e.keyInput:null])}function Kh(e,t){return e!==void 0&&e===Gh(t)}function qh(e,t){let n=t.kind===`server`&&!Rh(t.url);return{count:e.toLocaleString(`en-US`),risks:[...n?[`The hosted server is called once for each memory, which may cost money.`]:[],`Search results are poor until the re-embed ends.`,`Restart open OpenCode and Pi sessions after the change.`]}}var Jh=`Xenova/nomic-embed-text-v1`;function Yh(e,t=Jh){return e===`builtin`?{kind:e,model:t}:{kind:e}}function Xh(e,t){return e===`server`&&t?`saved`:`none`}function Zh({current:e,keySet:t}){let n=oh();return(0,U.jsxs)(`dl`,{className:`grid grid-cols-[auto_1fr] gap-x-3 gap-y-1 text-sm`,children:[(0,U.jsx)(`dt`,{children:n(`Kind`)}),(0,U.jsx)(`dd`,{children:n(e.kind===`server`?`OpenAI-compatible server`:`Built-in model`)}),e.url&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`dt`,{children:n(`Server URL`)}),(0,U.jsx)(`dd`,{className:`break-all`,children:e.url})]}),(0,U.jsx)(`dt`,{children:n(`Model`)}),(0,U.jsx)(`dd`,{className:`break-all`,children:e.model}),(0,U.jsx)(`dt`,{children:n(`Vector size`)}),(0,U.jsx)(`dd`,{children:e.dimensions}),(0,U.jsx)(`dt`,{children:n(`API key`)}),(0,U.jsx)(`dd`,{children:n(t?`set`:`not set`)}),(0,U.jsx)(`dt`,{children:n(`Stored memories`)}),(0,U.jsx)(`dd`,{children:e.memoryCount.toLocaleString(`en-US`)})]})}function Qh({run:e,onRetry:t}){let n=oh();return e.state===`idle`?null:(0,U.jsxs)(`div`,{role:`status`,className:`space-y-1 text-sm`,children:[e.state===`running`&&(0,U.jsxs)(`p`,{children:[n(`Re-embedding`),`: `,e.progress.processed,`/`,e.progress.total]}),e.state===`done`&&(0,U.jsx)(`p`,{children:n(`Re-embed finished.`)}),e.state===`failed`&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`p`,{className:`text-red-600`,children:[n(`Re-embed failed`),`: `,e.error??``]}),(0,U.jsx)(`button`,{type:`button`,className:`rounded border border-border px-3 py-1.5`,onClick:t,children:n(`Retry`)})]})]})}function $h(e,t){return{kind:e.kind,url:e.url??``,model:e.model,key:Xh(e.kind,t),keyInput:{name:``,path:``,value:``}}}function eg(){let e=oh(),[t,n]=(0,_.useState)(),[r,i]=(0,_.useState)(),[a,o]=(0,_.useState)(!1),[s,c]=(0,_.useState)(!1),[l,u]=(0,_.useState)(),[d,f]=(0,_.useState)(),[p,m]=(0,_.useState)({state:`idle`,progress:{processed:0,total:0}}),[h,g]=(0,_.useState)(``),[v,y]=(0,_.useState)(!1);async function b(){let e=await $(`/api/settings/embedding`);return n(e),m(e.run),e}(0,_.useEffect)(()=>{let e=!0,t=Qm();b().catch(t=>e&&g(t.message)),$(`/api/settings`).then(n=>e&&t.isCurrent()&&i(n)).catch(()=>{}),$(`/api/web/status`).then(t=>e&&o(!!t.isLocal)).catch(()=>{});let n=eh(t=>e&&i(t));return()=>{e=!1,n()}},[]),(0,_.useEffect)(()=>{if(p.state!==`running`)return;let e=setInterval(()=>{$(`/api/settings/embedding/run`).then(e=>{m(e),e.state!==`running`&&b()}).catch(()=>{})},1e3);return()=>clearInterval(e)},[p.state]);function x(){if(s||!t){c(!1),u(void 0),f(void 0);return}u($h(t,!!r?.secrets.embeddingApiKey?.set)),c(!0)}let S=e=>u(t=>t&&{...t,...e});async function C(){l&&await rh(y,async()=>{try{let t=await $(`/api/settings/embedding/test`,{method:`POST`,body:JSON.stringify(Wh(l))});t.ok&&t.dimensions?(f({key:Gh(l),dimensions:t.dimensions}),g(`${e(`Test passed. Vector size`)}: ${t.dimensions}`)):(f(void 0),g(`${e(`Test failed`)}: ${t.reason??``}`))}catch(t){g(e(t.message))}})}async function w(){if(!l||!t||!r)return;let{count:n,risks:i}=qh(t.memoryCount,l),a=[`${e(`Every stored memory will be re-embedded`)}: ${n}`,...i.map(t=>e(t))].join(`
122
+ `):e.evidence:``}function Um(e){return e.evidence?Array.isArray(e.evidence)?e.evidence.length:1:0}function Wm({profile:e,loading:t=!1,onRefresh:n,onCleanup:r}){let{t:i}=pr(),[a,o]=(0,_.useState)({pref:1,pat:1,wf:1}),[s,c]=(0,_.useState)(!1),[l,u]=(0,_.useState)(!1),[d,f]=(0,_.useState)(null),[p,m]=(0,_.useState)(0),[h,g]=(0,_.useState)(`edit`),[v,y]=(0,_.useState)(null),b=(0,_.useMemo)(()=>{if(!e?.exists||!e.profileData)return null;let t=e.profileData;if(typeof t==`string`)try{t=JSON.parse(t)}catch{return null}return t},[e]),x=(0,_.useMemo)(()=>Ic(b?.preferences),[b]),S=(0,_.useMemo)(()=>Ic(b?.patterns),[b]),C=(0,_.useMemo)(()=>Ic(b?.workflows),[b]),w=(0,_.useMemo)(()=>C.map((e,t)=>({item:e,index:t})).sort((e,t)=>(t.item.frequency||0)-(e.item.frequency||0)),[C]),T=Bm(x,a.pref),E=Bm(S,a.pat),D=Bm(w,a.wf),O=C.length;function te(e,t,n){let r=(e===`preferences`?x:e===`patterns`?S:C)[t];r&&(f(e),m(t),g(n),y(r),u(!0))}function k(e,t){return e.indexOf(t)}function A({page:e,pageKey:t}){return e.total<=zm?null:(0,U.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5 pt-2`,children:[(0,U.jsxs)(`span`,{className:`text-xs text-muted-foreground me-2`,children:[e.start+1,`-`,Math.min(e.start+zm,e.total),` / `,e.total]}),Array.from({length:e.totalPages},(e,t)=>t+1).map(n=>(0,U.jsx)(K,{size:`xs`,variant:n===e.page?`default`:`outline`,onClick:()=>o(e=>({...e,[t]:n})),children:n},n))]})}function ne({item:e,type:t,fullList:n}){let r=k(n,e),a=Vm(e);return(0,U.jsxs)(`div`,{className:`min-w-0 rounded-xl border border-border bg-card p-4 space-y-3`,children:[(0,U.jsxs)(`div`,{className:`flex flex-wrap items-start gap-2`,children:[t!==`workflows`||e.category?(0,U.jsx)(_u,{variant:`outline`,className:`bg-transparent border-current [color:oklch(0.42_0.13_var(--category-hue))] dark:[color:oklch(0.8_0.13_var(--category-hue))]`,style:{"--category-hue":String(mu(e.category||`General`))},children:e.category||`General`}):null,(0,U.jsxs)(`div`,{className:`flex items-center gap-0.5 ms-auto`,children:[(0,U.jsx)(K,{variant:`ghost`,size:`icon-xs`,title:i(`btn-edit`)||`Edit`,onClick:()=>te(t,r,`edit`),children:(0,U.jsx)(ge,{className:`size-3`})}),(0,U.jsx)(K,{variant:`ghost`,size:`icon-xs`,title:i(`btn-delete`)||`Delete`,onClick:()=>te(t,r,`delete`),children:(0,U.jsx)(Oe,{className:`size-3`})})]}),(0,U.jsxs)(`div`,{className:H(`shrink-0 rounded-md border px-1.5 py-0.5 text-xs font-medium tabular-nums`,Bc[zc(a)]),title:`${i(`label-confidence`)}: ${a}%`,children:[a,`%`]})]}),(0,U.jsx)(`p`,{className:`text-sm break-words`,children:e.description||``}),e.steps?.length?(0,U.jsx)(`ol`,{className:`flex flex-col items-start gap-1.5`,children:e.steps.map((e,t)=>(0,U.jsxs)(`li`,{className:`flex min-w-0 max-w-full items-center gap-2 rounded-full border border-blue-600/40 bg-blue-500/15 py-0.5 ps-0.5 pe-2.5 text-xs text-blue-700 dark:text-blue-400`,children:[(0,U.jsx)(`span`,{className:`flex size-5 shrink-0 items-center justify-center self-start rounded-full bg-blue-500/30 text-[11px] font-medium tabular-nums dark:bg-blue-400/30`,children:t+1}),(0,U.jsx)(`span`,{className:`min-w-0 break-words`,children:e})]},t))}):null,e.evidence||e.frequency?(0,U.jsxs)(`div`,{className:`flex items-center gap-1.5 text-xs text-muted-foreground`,children:[(0,U.jsxs)(`span`,{className:`inline-flex items-center gap-1`,title:i(`label-evidence-tooltip`,{count:e.frequency||1}),children:[(0,U.jsx)(De,{className:`size-3`}),e.frequency||1]}),Um(e)>0?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`span`,{children:`·`}),(0,U.jsxs)(`span`,{className:`inline-flex items-center gap-1`,title:Hm(e),children:[(0,U.jsx)(oe,{className:`size-3`}),Um(e),` evidence`]})]}):null]}):null]})}return t&&!e?(0,U.jsx)(`div`,{className:`text-sm text-muted-foreground py-8 text-center`,children:i(`loading-profile`)}):e?.exists?b?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`div`,{className:`space-y-8`,children:[(0,U.jsxs)(`div`,{className:`space-y-3`,children:[(0,U.jsx)(`h2`,{dir:`auto`,className:`text-section-title font-semibold break-words`,children:e.displayName||e.userId}),(0,U.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,U.jsxs)(`span`,{className:`rounded-full bg-muted px-2.5 py-1 text-xs`,children:[(0,U.jsx)(`span`,{className:`text-muted-foreground`,children:i(`profile-version`)}),(0,U.jsx)(`span`,{className:`ms-1 font-mono`,children:e.version})]}),(0,U.jsxs)(`span`,{className:`rounded-full bg-muted px-2.5 py-1 text-xs`,children:[(0,U.jsx)(`span`,{className:`text-muted-foreground`,children:i(`profile-prompts`)}),(0,U.jsx)(`span`,{className:`ms-1 font-mono`,children:e.totalPromptsAnalyzed})]}),(0,U.jsxs)(`span`,{className:`rounded-full bg-muted px-2.5 py-1 text-xs`,children:[(0,U.jsx)(`span`,{className:`text-muted-foreground`,children:i(`profile-updated`)}),(0,U.jsx)(`span`,{className:`ms-1`,children:e.lastAnalyzedAt?xu(e.lastAnalyzedAt):`—`})]}),(0,U.jsxs)(`div`,{className:`ms-auto flex flex-wrap items-center gap-1.5`,children:[(0,U.jsxs)(K,{variant:`outline`,size:`sm`,onClick:()=>r?.(),children:[(0,U.jsx)(Te,{className:`size-3.5`}),i(`btn-ai-cleanup`)]}),(0,U.jsxs)(K,{variant:`secondary`,size:`sm`,onClick:()=>n?.(),children:[(0,U.jsx)(xe,{className:`size-3.5`}),i(`btn-refresh`)]}),(0,U.jsxs)(K,{variant:`secondary`,size:`sm`,onClick:()=>c(!0),children:[(0,U.jsx)(Se,{className:`size-3.5`}),`History`]})]})]})]}),(0,U.jsxs)(`div`,{className:`grid gap-8`,children:[(0,U.jsxs)(`section`,{id:`profile-preferences`,className:`scroll-mt-4 space-y-3`,children:[(0,U.jsxs)(`h2`,{className:`flex flex-wrap items-center gap-2 text-section-title font-semibold`,children:[(0,U.jsx)(L,{className:`size-4`}),i(`profile-preferences`),(0,U.jsx)(`span`,{className:`text-xs font-normal text-muted-foreground`,children:x.length})]}),x.length===0?(0,U.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:i(`empty-preferences`)}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`div`,{className:`grid gap-3 sm:grid-cols-2 lg:grid-cols-3`,children:T.items.map(e=>(0,U.jsx)(ne,{item:e,type:`preferences`,fullList:x},k(x,e)))}),(0,U.jsx)(A,{page:T,pageKey:`pref`})]})]}),(0,U.jsxs)(`section`,{id:`profile-patterns`,className:`scroll-mt-4 space-y-3`,children:[(0,U.jsxs)(`h2`,{className:`flex flex-wrap items-center gap-2 text-section-title font-semibold`,children:[(0,U.jsx)(ee,{className:`size-4`}),i(`profile-patterns`),(0,U.jsx)(`span`,{className:`text-xs font-normal text-muted-foreground`,children:S.length})]}),S.length===0?(0,U.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:i(`empty-patterns`)}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`div`,{className:`grid gap-3 sm:grid-cols-2 lg:grid-cols-3`,children:E.items.map(e=>(0,U.jsx)(ne,{item:e,type:`patterns`,fullList:S},k(S,e)))}),(0,U.jsx)(A,{page:E,pageKey:`pat`})]})]}),(0,U.jsxs)(`section`,{id:`profile-workflows`,className:`scroll-mt-4 space-y-3`,children:[(0,U.jsxs)(`h2`,{className:`flex flex-wrap items-center gap-2 text-section-title font-semibold`,children:[(0,U.jsx)(Ne,{className:`size-4`}),i(`profile-workflows`),(0,U.jsx)(`span`,{className:`text-xs font-normal text-muted-foreground`,children:O})]}),O===0?(0,U.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:i(`empty-workflows`)}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`div`,{className:`grid items-start gap-3 lg:grid-cols-2`,children:D.items.map(e=>(0,U.jsx)(ne,{item:e.item,type:`workflows`,fullList:C},e.index))}),(0,U.jsx)(A,{page:D,pageKey:`wf`})]})]})]})]}),(0,U.jsx)(Im,{open:s,onOpenChange:c,profileId:e?.id||``}),(0,U.jsx)(Rm,{open:l,onOpenChange:u,type:d,index:p,action:h,item:v,onSaved:n})]}):null:(0,U.jsxs)(`div`,{className:`flex flex-col items-center gap-2 py-10 text-muted-foreground`,children:[(0,U.jsx)(je,{className:`size-8`}),(0,U.jsx)(`p`,{className:`text-sm`,children:e?.message||i(`empty-preferences`)})]})}function Gm({open:e=!1,count:t=0,onOpenChange:n,onComplete:r}){let{t:i}=pr(),[a,o]=(0,_.useState)(!1),[s,c]=(0,_.useState)(``),[l,u]=(0,_.useState)(0);(0,_.useEffect)(()=>{e&&!a&&(c(i(`migration-found-tags`,{count:t})),u(0))},[e,a,t,i]);function d(e){a&&!e||n?.(e)}async function f(){o(!0),c(i(`status-migration-init`)),u(0);let e=!0,t=0,n=1e3;for(;e&&t<n;){t++;let n=await Wn(`/api/migration/tags/run-batch`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({batchSize:3})});if(!n.success||!n.data){c(i(`toast-migration-failed`)+`: `+(n.error||``)),o(!1);return}let r=n.data.processed;e=n.data.hasMore;let a=n.data.total;u(a>0?Math.round(r/a*100):0),c(i(`status-migration-progress`,{current:r,total:a})),e&&await new Promise(e=>setTimeout(e,100))}if(t>=n){c(i(`migration-stopped`)),o(!1);return}u(100),c(i(`toast-migration-success`)),W.success(i(`toast-migration-success`)),setTimeout(()=>{o(!1),d(!1),r?.()},2e3)}return(0,U.jsx)(Fs,{open:e,onOpenChange:d,children:(0,U.jsxs)(Rs,{className:`sm:max-w-md`,showCloseButton:!a,children:[(0,U.jsx)(zs,{children:(0,U.jsx)(Vs,{children:i(`modal-migration-title`)})}),(0,U.jsxs)(`div`,{className:`space-y-3`,children:[(0,U.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:s}),(0,U.jsx)(`div`,{className:`h-2 rounded-full bg-muted overflow-hidden`,children:(0,U.jsx)(`div`,{className:`h-full bg-primary transition-all duration-200`,style:{width:`${l}%`}})}),(0,U.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:i(`migration-note`)})]}),a?null:(0,U.jsx)(Bs,{children:(0,U.jsxs)(K,{onClick:f,children:[(0,U.jsx)(ve,{className:`size-3.5`}),i(`btn-start-migration`)]})})]})})}var Km=[{id:`settings-section-external-api`,title:`External API`},{id:`settings-section-models`,title:`Models`},{id:`settings-section-memory`,title:`Memory`},{id:`settings-section-embedding`,title:`Embedding`},{id:`settings-section-keys`,title:`Keys and access`},{id:`settings-section-diagnostics`,title:`Capture diagnostics`},{id:`settings-section-health`,title:`Health`},{id:`settings-section-claude-folder`,title:`Claude Code folder`},{id:`settings-section-import`,title:`Import and backfill`},{id:`settings-section-auto-import`,title:`Automatic import`},{id:`settings-section-profile`,title:`Profile learning`},{id:`settings-section-directory-maps`,title:`Directory maps`},{id:`settings-section-web-app`,title:`Web app`},{id:`settings-section-log`,title:`Log`}];function qm(e,t){let n=e.startsWith(`#`)?e.slice(1):``;if(!/^settings-section-[a-z0-9-]+$/.test(n))return!1;let r=t.getElementById(n);return r?(r.scrollIntoView({behavior:`smooth`,block:`start`}),!0):!1}var Jm=class extends Error{status;constructor(e,t){super(e),this.name=`SettingsRequestError`,this.status=t}};async function $(e,t={}){let n=(t.method??`GET`).toUpperCase(),r=n!==`GET`&&n!==`HEAD`,i=await fetch(e,{...t,headers:{"x-omms-token":window.__OMMS_TOKEN__??``,...r||t.body?{"Content-Type":`application/json`}:{},...t.headers}}),a=await i.json();if(!i.ok)throw new Jm(a.error??`Request failed (${i.status})`,i.status);return a}var Ym=new Set,Xm=0;function Zm(e){Xm++;for(let t of Ym)t(e)}function Qm(){let e=Xm;return{isCurrent:()=>Xm===e}}async function $m(){try{let e=await $(`/api/settings`);return Zm(e),e}catch{return null}}function eh(e){return Ym.add(e),()=>{Ym.delete(e)}}function th(e,t){return`${e.replace(/\.+$/,``)}. ${t}`}function nh(){let e=0;return{begin(){let t=++e;return()=>t===e}}}async function rh(e,t){e(!0);try{return await t()}finally{e(!1)}}var ih={Models:[`模型`,`النماذج`],"External API fallback":[`外部 API 备用模型`,`النموذج الاحتياطي عبر واجهة API الخارجية`],none:[`无`,`لا يوجد`],ready:[`就绪`,`جاهز`],"not ready":[`未就绪`,`غير جاهز`],"Credentials (values hidden)":[`凭据(不显示内容)`,`بيانات الاعتماد (القيم مخفية)`],set:[`已设置`,`مضبوط`],"not set":[`未设置`,`غير مضبوط`],"Effective model":[`当前使用模型`,`النموذج المستخدم`],session:[`会话`,`الجلسة`],"external API":[`外部 API`,`واجهة API الخارجية`],unavailable:[`不可用`,`غير متاح`],"Project override is active. Changes to the global file may not take effect here.":[`项目设置优先。全局文件的更改可能不会在此生效。`,`إعدادات المشروع لها الأولوية. قد لا تسري تغييرات الملف العام هنا.`],"Model choice":[`模型选择`,`اختيار النموذج`],"Session model":[`会话模型`,`نموذج الجلسة`],"Manual model":[`手动选择模型`,`اختيار النموذج يدوياً`],"Manual provider/model":[`手动输入提供商/模型`,`إدخال المزوّد/النموذج يدوياً`],"Model list unavailable. Enter provider/model manually.":[`模型列表不可用。请手动输入提供商/模型。`,`قائمة النماذج غير متاحة. أدخل المزوّد/النموذج يدوياً.`],"OpenCode model list unavailable":[`OpenCode 模型列表不可用`,`قائمة نماذج OpenCode غير متاحة`],"OMMS could not find OpenCode on this computer, so it cannot list OpenCode's models here. Type the model as provider/model, for example zai-coding-plan/glm-5.3. If OpenCode is installed, open an OpenCode session and reload this page.":[`OMMS 在这台电脑上找不到 OpenCode,因此无法在此列出 OpenCode 的模型。请按 提供商/模型 格式输入模型,例如 zai-coding-plan/glm-5.3。如果已安装 OpenCode,请打开一个 OpenCode 会话,然后重新加载此页面。`,`لم يعثر OMMS على OpenCode في هذا الحاسوب، لذا لا يمكنه عرض نماذج OpenCode هنا. أدخل النموذج بصيغة المزوّد/النموذج، مثل zai-coding-plan/glm-5.3. إذا كان OpenCode مثبتاً، فافتح جلسة OpenCode ثم أعد تحميل هذه الصفحة.`],"OpenCode took too long to send its model list. Reload this page to try again, or type the model as provider/model.":[`OpenCode 发送模型列表的时间过长。请重新加载此页面重试,或按 提供商/模型 格式输入模型。`,`استغرق OpenCode وقتاً طويلاً لإرسال قائمة نماذجه. أعد تحميل هذه الصفحة للمحاولة مرة أخرى، أو أدخل النموذج بصيغة المزوّد/النموذج.`],"OpenCode has no signed-in models. Run `opencode auth login`, then reload this page.":["OpenCode 没有已登录的模型。请运行 `opencode auth login`,然后重新加载此页面。","لا توجد في OpenCode نماذج مسجَّل الدخول إليها. شغّل `opencode auth login` ثم أعد تحميل هذه الصفحة."],"This OpenCode version sent a model list OMMS cannot read. Type the model as provider/model. Update OMMS if this continues.":[`此版本的 OpenCode 发送的模型列表 OMMS 无法读取。请按 提供商/模型 格式输入模型。如果问题持续,请更新 OMMS。`,`أرسل هذا الإصدار من OpenCode قائمة نماذج لا يستطيع OMMS قراءتها. أدخل النموذج بصيغة المزوّد/النموذج. حدّث OMMS إذا استمرت المشكلة.`],"OMMS could not read Pi's model list. Type the model as provider/model.":[`OMMS 无法读取 Pi 的模型列表。请按 提供商/模型 格式输入模型。`,`تعذّر على OMMS قراءة قائمة نماذج Pi. أدخل النموذج بصيغة المزوّد/النموذج.`],"Pi has no signed-in models. Sign in to a provider in Pi, then reload this page.":[`Pi 没有已登录的模型。请在 Pi 中登录一个提供商,然后重新加载此页面。`,`لا توجد في Pi نماذج مسجَّل الدخول إليها. سجّل الدخول إلى مزوّد في Pi ثم أعد تحميل هذه الصفحة.`],"Save model":[`保存模型`,`حفظ النموذج`],"Enter a model as provider/model.":[`按 提供商/模型 格式输入。`,`أدخل النموذج بصيغة المزوّد/النموذج.`],"Saved. New capture and profile work uses these settings.":[`已保存。下一次捕获和用户画像将使用这些设置。`,`تم الحفظ. ستستخدم عمليات الالتقاط والملف الشخصي الجديدة هذه الإعدادات.`],"Saved. OMMS now reads ~/.config/omms/omms.jsonc. The legacy config was kept.":[`已保存。OMMS 现在读取 ~/.config/omms/omms.jsonc,旧配置保留。`,`تم الحفظ. يقرأ OMMS الآن الملف ~/.config/omms/omms.jsonc مع الاحتفاظ بالإعدادات القديمة.`],"Current settings were reloaded; check the values and save again.":[`已重新加载当前设置;检查数值后再次保存。`,`أُعيد تحميل الإعدادات الحالية. راجع القيم ثم احفظ مجدداً.`],"Capture diagnostics":[`捕获诊断`,`تشخيص الالتقاط`],"Time range":[`时间范围`,`الفترة الزمنية`],"24 hours":[`24 小时`,`24 ساعة`],"7 days":[`7 天`,`7 أيام`],"30 days":[`30 天`,`30 يوماً`],"90 days":[`90 天`,`90 يوماً`],"Host / model":[`主机 / 模型`,`المضيف / النموذج`],Saved:[`已保存`,`محفوظ`],Skipped:[`已跳过`,`متجاوز`],Failed:[`失败`,`فشل`],Total:[`总数`,`المجموع`],"Failure reasons":[`失败原因`,`أسباب الفشل`],"Recent attempts":[`最近尝试`,`المحاولات الأخيرة`],Time:[`时间`,`الوقت`],Host:[`主机`,`المضيف`],Source:[`来源`,`المصدر`],Session:[`会话`,`الجلسة`],Path:[`路径`,`المسار`],Model:[`模型`,`النموذج`],Stop:[`结束原因`,`سبب التوقف`],Blocks:[`区块`,`الكتل`],Prompt:[`提示词长度`,`طول الطلب`],Reply:[`回复长度`,`طول الرد`],Duration:[`耗时`,`المدة`],Outcome:[`结果`,`النتيجة`],Reason:[`原因`,`السبب`],"Save capture traces":[`保存捕获追踪`,`حفظ تتبعات الالتقاط`],"Traces can contain conversation content after redaction. Keep tracing off unless you need it for debugging.":[`追踪文件在脱敏后仍可能包含对话内容。仅在调试时开启。`,`قد تحتوي التتبعات على محتوى المحادثة بعد التنقيح. فعّلها عند التصحيح فقط.`],"This project turns tracing off. The global switch cannot turn it on here.":[`此项目已关闭追踪。全局开关无法在此开启。`,`أوقف هذا المشروع التتبع. لا يمكن للمفتاح العام تفعيله هنا.`],"Trace retention (days)":[`追踪保留天数`,`مدة حفظ التتبعات (بالأيام)`],"Attempt retention (days)":[`尝试记录保留天数`,`مدة حفظ المحاولات (بالأيام)`],"Retry retention (hours)":[`重试保留小时数`,`مدة حفظ إعادة المحاولة (بالساعات)`],"When the capture model cannot be reached, OMMS keeps the turn and tries again later. Queued turns can hold conversation content after redaction. 0 turns the queue off and deletes waiting turns.":[`捕获模型无法访问时,OMMS 会保留该轮对话并稍后重试。排队的对话在脱敏后仍可能包含对话内容。设为 0 会关闭队列并删除等待中的对话。`,`عندما يتعذر الوصول إلى نموذج الالتقاط، يحتفظ OMMS بالجولة ويعيد المحاولة لاحقاً. قد تحتوي الجولات المنتظرة على محتوى المحادثة بعد التنقيح. القيمة 0 توقف قائمة الانتظار وتحذف الجولات المنتظرة.`],"Turns waiting for retry":[`等待重试的对话`,`الجولات المنتظرة لإعادة المحاولة`],"Retry now":[`立即重试`,`أعد المحاولة الآن`],"Retrying now.":[`正在重试。`,`تجري إعادة المحاولة الآن.`],"A retry is already running.":[`重试已在运行。`,`إعادة المحاولة قيد التشغيل بالفعل.`],"These turns retry at the next Pi session start.":[`这些对话将在下次启动 Pi 会话时重试。`,`ستُعاد محاولة هذه الجولات عند بدء جلسة Pi التالية.`],"These turns retry at the next OpenCode session start.":[`这些对话将在下次启动 OpenCode 会话时重试。`,`ستُعاد محاولة هذه الجولات عند بدء جلسة OpenCode التالية.`],"These turns retry at the next Claude Code session start.":[`这些对话将在下次启动 Claude Code 会话时重试。`,`ستُعاد محاولة هذه الجولات عند بدء جلسة Claude Code التالية.`],"Claude Code capture uses the external API.":[`Claude Code 捕获使用外部 API。`,`يستخدم التقاط Claude Code واجهة API الخارجية.`],"Claude Code capture is off. Complete the external API settings.":[`Claude Code 捕获已关闭。请完成外部 API 设置。`,`التقاط Claude Code متوقف. أكمل إعدادات واجهة API الخارجية.`],"Missing settings":[`缺少的设置`,`الإعدادات الناقصة`],"memoryModel is not configured":[`未配置 memoryModel`,`لم يُضبط memoryModel`],"memoryApiUrl is not configured":[`未配置 memoryApiUrl`,`لم يُضبط memoryApiUrl`],"memoryApiKey is not configured":[`未配置 memoryApiKey`,`لم يُضبط memoryApiKey`],"memoryApiKey contains a placeholder value":[`memoryApiKey 包含占位值`,`يحتوي memoryApiKey على قيمة نائبة`],"Claude Code backfill always uses the external API. It has no backfill model setting.":[`Claude Code 回填始终使用外部 API,没有回填模型设置。`,`يستخدم استيراد Claude Code دائماً واجهة API الخارجية، ولا يوجد له إعداد لنموذج الاستيراد.`],"Claude Code transcripts folder":[`Claude Code 对话记录文件夹`,`مجلد سجلات محادثات Claude Code`],"Claude Code transcripts":[`Claude Code 对话记录`,`سجلات محادثات Claude Code`],found:[`已找到`,`موجود`],"not found":[`未找到`,`غير موجود`],"Claude Code imports always use the external API.":[`Claude Code 导入始终使用外部 API。`,`يستخدم استيراد Claude Code دائماً واجهة API الخارجية.`],"Claude Code imports use the external API. Complete the external API settings.":[`Claude Code 导入使用外部 API。请完成外部 API 设置。`,`يستخدم استيراد Claude Code واجهة API الخارجية. أكمل إعدادات واجهة API الخارجية.`],"Trace files":[`追踪文件`,`ملفات التتبع`],View:[`查看`,`عرض`],Delete:[`删除`,`حذف`],Health:[`健康检查`,`فحص الحالة`],"Config files":[`配置文件`,`ملفات الإعدادات`],"Memory store":[`记忆存储`,`مخزن الذاكرة`],Embedding:[`嵌入模型`,`نموذج التضمين`],"Web binding":[`网页服务绑定`,`ربط خادم الويب`],"OpenCode model":[`OpenCode 模型`,`نموذج OpenCode`],"Pi model":[`Pi 模型`,`نموذج Pi`],"Capture failures (24 hours)":[`捕获失败(24 小时)`,`فشل الالتقاط (24 ساعة)`],"OpenCode model test":[`OpenCode 模型测试`,`اختبار نموذج OpenCode`],"Pi model test":[`Pi 模型测试`,`اختبار نموذج Pi`],"Run checks":[`运行检查`,`تشغيل الفحوصات`],"Run checks and test models":[`运行检查并测试模型`,`تشغيل الفحوصات واختبار النماذج`],"Checking…":[`正在检查…`,`جارٍ الفحص…`],pass:[`通过`,`نجاح`],warn:[`警告`,`تحذير`],fail:[`失败`,`فشل`],"Import and backfill":[`导入和回填`,`الاستيراد والاستكمال`],"Automatic import":[`自动导入`,`الاستيراد التلقائي`],"Automatic import makes model calls. Changes apply at the next host start. Turning it off stops a running import after the current exchange.":[`自动导入会调用模型。更改在下次启动主机时生效。关闭后,正在运行的导入将在当前轮次结束后停止。`,`يستدعي الاستيراد التلقائي النموذج. تسري التغييرات عند بدء المضيف التالي. يوقف التعطيل الاستيراد بعد التبادل الحالي.`],"Import past chats automatically":[`自动导入过去的对话`,`استيراد المحادثات السابقة تلقائياً`],"Backfill model":[`历史导入模型`,`نموذج استيراد السجل`],"Same as live capture":[`与实时捕获相同`,`مثل الالتقاط المباشر`],"Saved. Changes apply at the next host start.":[`已保存。更改在下次启动主机时生效。`,`تم الحفظ. تسري التغييرات عند بدء المضيف التالي.`],State:[`状态`,`الحالة`],"not started":[`尚未开始`,`لم يبدأ`],"not-started":[`尚未开始`,`لم يبدأ`],Imported:[`已导入`,`مستورَد`],Pending:[`待处理`,`معلّق`],"Unresolved sessions":[`目录未解析的会话`,`جلسات بمجلدات غير محددة`],Cutoff:[`截止时间`,`وقت القطع`],stopped:[`已停止`,`توقف`],"Web app":[`网页应用`,`تطبيق الويب`],"Start web app at login":[`登录时启动网页应用`,`بدء تطبيق الويب عند تسجيل الدخول`],"Login item":[`登录启动项`,`عنصر بدء تسجيل الدخول`],"not installed":[`未安装`,`غير مثبّت`],"not-installed":[`未安装`,`غير مثبّت`],installed:[`已安装`,`مثبّت`],unsupported:[`不受支持`,`غير مدعوم`],"no-runtime":[`缺少运行环境`,`بيئة التشغيل غير متاحة`],"no-package":[`缺少软件包`,`الحزمة غير متاحة`],"no-launcher":[`缺少启动器`,`المشغّل غير متاح`],"Login items are unsupported on this platform.":[`此平台不支持登录启动项。`,`عناصر بدء تسجيل الدخول غير مدعومة على هذا النظام.`],"Install Node or Bun to start the web app at login.":[`安装 Node 或 Bun 后,网页应用才能在登录时启动。`,`ثبّت Node أو Bun لبدء تطبيق الويب عند تسجيل الدخول.`],"Use these commands to apply the change now:":[`使用以下命令立即应用更改:`,`استخدم هذه الأوامر لتطبيق التغيير الآن:`],"Saved. The login item changes at the next Pi or OpenCode start.":[`已保存。登录启动项将在下次启动 Pi 或 OpenCode 时更新。`,`تم الحفظ. يتغير عنصر بدء التشغيل عند بدء Pi أو OpenCode التالي.`],"History host":[`历史记录主机`,`مضيف السجل`],Scope:[`范围`,`النطاق`],"Current project":[`当前项目`,`المشروع الحالي`],"All projects":[`所有项目`,`كل المشاريع`],"Project directory":[`项目目录`,`مجلد المشروع`],"Current directory":[`当前目录`,`المجلد الحالي`],"Profile batch size":[`用户画像批量大小`,`حجم دفعة الملف الشخصي`],"Directory maps (old=new, one per line)":[`目录映射(旧=新,每行一条)`,`تعيين المجلدات (قديم=جديد، واحد في كل سطر)`],"Force reimport":[`强制重新导入`,`فرض إعادة الاستيراد`],"Skip memories":[`跳过记忆`,`تجاوز الذكريات`],"Skip profile":[`跳过用户画像`,`تجاوز الملف الشخصي`],"Import model":[`导入模型`,`نموذج الاستيراد`],"Saved external API":[`已保存的外部 API`,`واجهة API الخارجية المحفوظة`],"Preview (dry run)":[`预览(不写入)`,`معاينة (تشغيل تجريبي)`],"Start import":[`开始导入`,`بدء الاستيراد`],"Cancel after current unit":[`完成当前单元后取消`,`الإلغاء بعد الوحدة الحالية`],"Directory maps must be old=new, one per line":[`目录映射须为 旧=新,每行一条`,`يجب أن يكون تعيين المجلدات بصيغة قديم=جديد، واحد في كل سطر`],running:[`运行中`,`جارٍ التشغيل`],cancelling:[`正在取消`,`جارٍ الإلغاء`],cancelled:[`已取消`,`أُلغي`],done:[`已完成`,`اكتمل`],failed:[`失败`,`فشل`],units:[`单元`,`وحدات`],"List sessions":[`列出会话`,`عرض الجلسات`],"Refresh list":[`刷新列表`,`تحديث القائمة`],"Advanced options":[`高级选项`,`خيارات متقدمة`],"Hide advanced options":[`隐藏高级选项`,`إخفاء الخيارات المتقدمة`],"default location":[`默认位置`,`الموقع الافتراضي`],"Prompt date from":[`提示日期起`,`تاريخ الطلب من`],"Prompt date to":[`提示日期止`,`تاريخ الطلب إلى`],"Prompt dates are inclusive, use your time zone, and filter the turns inside each session, not the list. Empty dates include every turn.":[`提示日期包含首尾两天,按你所在时区计算,只筛选每个会话中的对话轮次,不筛选列表。留空则包含所有轮次。`,`تواريخ الطلب شاملة لليومين، وتُحسب بمنطقتك الزمنية، وتُصفّي الأدوار داخل كل جلسة لا القائمة. تركها فارغة يشمل كل الأدوار.`],"Sessions with directories that no longer exist":[`目录已不存在的会话`,`جلسات لم تعد مجلداتها موجودة`],"Show them and add a directory map":[`显示它们并添加目录映射`,`اعرضها وأضف تعيين مجلد`],Selected:[`已选择`,`المحدد`],"Select all matching":[`选择所有匹配项`,`تحديد كل المطابق`],"Clear selection":[`清除选择`,`مسح التحديد`],Select:[`选择`,`تحديد`],Created:[`创建时间`,`تاريخ الإنشاء`],"Resolved by":[`解析方式`,`طريقة التحديد`],recorded:[`记录的目录`,`المجلد المسجّل`],mapped:[`目录映射`,`تعيين مجلد`],"project root":[`项目根目录`,`جذر المشروع`],missing:[`缺失`,`مفقود`],"No sessions match.":[`没有匹配的会话。`,`لا توجد جلسات مطابقة.`],Previous:[`上一页`,`السابق`],Next:[`下一页`,`التالي`],None:[`无`,`لا شيء`],"Configured, not tested.":[`已配置,未测试。`,`مُعدّ، لم يُختبر.`],"An import with an OpenCode signed-in model runs from the terminal or with /import in OpenCode.":[`使用 OpenCode 已登录模型的导入需在终端运行,或在 OpenCode 中使用 /import。`,`يتم الاستيراد بنموذج OpenCode المسجَّل الدخول من الطرفية أو بالأمر /import داخل OpenCode.`],"The chosen OpenCode model is not connected here. An import with an OpenCode signed-in model runs from the terminal or with /import in OpenCode. Choose the external API for a web import.":[`所选 OpenCode 模型在此处未连接。使用 OpenCode 已登录模型的导入需在终端运行,或在 OpenCode 中使用 /import。网页导入请选择外部 API。`,`نموذج OpenCode المختار غير متصل هنا. يتم الاستيراد بنموذج OpenCode المسجَّل الدخول من الطرفية أو بالأمر /import داخل OpenCode. اختر واجهة API الخارجية للاستيراد من الصفحة.`],"Test models in Health":[`在健康检查中测试模型`,`اختبر النماذج في قسم السلامة`],Import:[`导入`,`استيراد`],sessions:[`个会话`,`جلسات`],"1 session":[`1 个会话`,`جلسة واحدة`],"List sessions first.":[`请先列出会话。`,`اعرض الجلسات أولاً.`],"Options changed. Refresh the session list first.":[`选项已更改。请先刷新会话列表。`,`تغيّرت الخيارات. حدّث قائمة الجلسات أولاً.`],"Select at least one session.":[`请至少选择一个会话。`,`حدّد جلسة واحدة على الأقل.`],"Select at most 1000 sessions one by one, or use Select all matching.":[`逐个选择最多 1000 个会话,或使用“选择所有匹配项”。`,`حدّد 1000 جلسة كحد أقصى واحدة تلو الأخرى، أو استخدم «تحديد كل المطابق».`],"Model readiness is unknown. Reload the page.":[`无法确定模型是否就绪。请重新加载页面。`,`حالة جاهزية النموذج غير معروفة. أعد تحميل الصفحة.`],"No import model is ready. Connect a model in OpenCode or complete the external API settings.":[`没有可用的导入模型。请在 OpenCode 中连接模型,或补全外部 API 设置。`,`لا يوجد نموذج استيراد جاهز. اربط نموذجاً في OpenCode أو أكمل إعدادات واجهة API الخارجية.`],"The external API is not ready":[`外部 API 未就绪`,`واجهة API الخارجية غير جاهزة`],"The external API has no memoryModel in the global config":[`全局配置中缺少外部 API 的 memoryModel`,`لا يحتوي الإعداد العام على memoryModel لواجهة API الخارجية`],"The external API has no memoryApiUrl in the global config":[`全局配置中缺少外部 API 的 memoryApiUrl`,`لا يحتوي الإعداد العام على memoryApiUrl لواجهة API الخارجية`],"The external API key is missing in the OpenCode process; check memoryApiKey and its env:// or file:// source":[`OpenCode 进程中缺少外部 API 密钥;请检查 memoryApiKey 及其 env:// 或 file:// 来源`,`مفتاح واجهة API الخارجية غير موجود في عملية OpenCode؛ تحقّق من memoryApiKey ومصدره env:// أو file://`],"The memoryProvider in the global config is not supported for imports":[`全局配置中的 memoryProvider 不支持导入`,`مزوّد memoryProvider في الإعداد العام غير مدعوم للاستيراد`],"Pi sessions folder or one .jsonl session file":[`Pi 会话文件夹或单个 .jsonl 会话文件`,`مجلد جلسات Pi أو ملف جلسة ‎.jsonl واحد`],"OpenCode database file":[`OpenCode 数据库文件`,`ملف قاعدة بيانات OpenCode`],"Absolute path, for example on a mounted volume":[`绝对路径,例如已挂载卷上的路径`,`مسار مطلق، مثلاً على وحدة تخزين مركّبة`],"Use this source":[`使用此来源`,`استخدم هذا المصدر`],Browse:[`浏览`,`استعراض`],"Use the default location":[`使用默认位置`,`استخدم الموقع الافتراضي`],"Chosen source":[`已选来源`,`المصدر المختار`],Choose:[`选择`,`اختيار`],"Only the first 500 entries are shown.":[`仅显示前 500 项。`,`تُعرض أول 500 عنصر فقط.`],"Reload the page before saving again.":[`再次保存前请重新加载页面。`,`أعد تحميل الصفحة قبل الحفظ مرة أخرى.`],"The current settings could not be reloaded. Reload the page.":[`无法重新加载当前设置。请重新加载页面。`,`تعذّر إعادة تحميل الإعدادات الحالية. أعد تحميل الصفحة.`],Log:[`日志`,`السجل`],"Capture attempts only":[`仅显示捕获尝试`,`محاولات الالتقاط فقط`],Refresh:[`刷新`,`تحديث`],"Copy log path":[`复制日志路径`,`نسخ مسار السجل`],"Log lines":[`日志行`,`أسطر السجل`],"No log has been written yet.":[`尚未写入日志。`,`لم يُكتب سجل بعد.`],"Loading log…":[`正在加载日志…`,`جارٍ تحميل السجل…`],"External API":[`外部 API`,`واجهة API الخارجية`],"An OpenAI- or Anthropic-compatible endpoint that either host can use for capture and backfill.":[`兼容 OpenAI 或 Anthropic 的端点,两个宿主都可用于捕获和回填。`,`نقطة نهاية متوافقة مع OpenAI أو Anthropic يمكن لأي مضيف استخدامها للالتقاط والاستيراد.`],Provider:[`提供商`,`المزوّد`],"API URL":[`API 地址`,`عنوان API`],"API key":[`API 密钥`,`مفتاح API`],"Save endpoint":[`保存端点`,`حفظ نقطة النهاية`],"Nothing to save.":[`没有需要保存的内容。`,`لا يوجد ما يُحفظ.`],"Key source":[`密钥来源`,`مصدر المفتاح`],"environment variable":[`环境变量`,`متغير البيئة`],"key file":[`密钥文件`,`ملف المفتاح`],"set in the config file":[`在配置文件中设置`,`مضبوط في ملف الإعدادات`],"resolves in the web app":[`可在网页应用中解析`,`يُقرأ في تطبيق الويب`],"does not resolve in the web app":[`无法在网页应用中解析`,`لا يُقرأ في تطبيق الويب`],"A login web app does not see variables set only in a shell profile; a key file works everywhere.":[`登录时启动的网页应用看不到仅在 shell 配置文件中设置的变量;密钥文件在任何地方都可用。`,`تطبيق الويب الذي يبدأ عند تسجيل الدخول لا يرى المتغيرات المضبوطة في ملف الصدفة فقط؛ ملف المفتاح يعمل في كل مكان.`],"The key does not resolve in this web app. Save it to a key file instead.":[`此网页应用无法解析该密钥。请改为保存到密钥文件。`,`لا يُقرأ المفتاح في تطبيق الويب هذا. احفظه في ملف مفتاح بدلاً من ذلك.`],"Environment variable":[`环境变量`,`متغير البيئة`],"Key file":[`密钥文件`,`ملف المفتاح`],"Save key to a private file":[`将密钥保存到私有文件`,`حفظ المفتاح في ملف خاص`],"Variable name":[`变量名`,`اسم المتغير`],"Key file path":[`密钥文件路径`,`مسار ملف المفتاح`],"Key file name":[`密钥文件名`,`اسم ملف المفتاح`],"The key is written to ~/.config/omms/secrets/ readable only by you. It is never shown again.":[`密钥写入 ~/.config/omms/secrets/,仅你可读,之后不再显示。`,`يُكتب المفتاح في ~/.config/omms/secrets/ ولا يقرؤه غيرك، ولن يُعرض مرة أخرى.`],"Save key source":[`保存密钥来源`,`حفظ مصدر المفتاح`],"Key source saved.":[`密钥来源已保存。`,`تم حفظ مصدر المفتاح.`],"A key file with this name exists. Replace it?":[`已存在同名密钥文件。要替换吗?`,`يوجد ملف مفتاح بهذا الاسم. هل تريد استبداله؟`],"Enter a variable name such as ZAI_API_KEY":[`请输入变量名,例如 ZAI_API_KEY`,`أدخل اسم متغير مثل ZAI_API_KEY`],"Enter the path of a key file":[`请输入密钥文件路径`,`أدخل مسار ملف المفتاح`],"Name the key file with letters, digits, dashes, or underscores":[`密钥文件名只能包含字母、数字、短横线或下划线`,`سمِّ ملف المفتاح بحروف أو أرقام أو شرطات أو شرطات سفلية`],"Paste the key":[`请粘贴密钥`,`الصق المفتاح`],Test:[`测试`,`اختبار`],"Test call succeeded":[`测试调用成功`,`نجح استدعاء الاختبار`],"Test call failed":[`测试调用失败`,`فشل استدعاء الاختبار`],"External API needs":[`外部 API 缺少`,`تحتاج واجهة API الخارجية إلى`],"Automatic import makes model calls. A model change applies at the next run. Turning it off stops a running import after the current exchange.":[`自动导入会调用模型。模型更改在下次运行时生效。关闭后,正在进行的导入会在当前对话完成后停止。`,`يستدعي الاستيراد التلقائي النماذج. يسري تغيير النموذج في التشغيل التالي. إيقافه يوقف الاستيراد الجاري بعد المحادثة الحالية.`],"Saved. Changes apply at the next run.":[`已保存。更改在下次运行时生效。`,`تم الحفظ. تسري التغييرات في التشغيل التالي.`],paused:[`已暂停`,`متوقف مؤقتاً`],"started from auto":[`自动启动`,`بدأ تلقائياً`],"started from web":[`从网页启动`,`بدأ من الويب`],"started from cli":[`从终端启动`,`بدأ من الطرفية`],"started from slash":[`从斜杠命令启动`,`بدأ من أمر الشرطة المائلة`],"Minutes left":[`剩余分钟`,`الدقائق المتبقية`],unknown:[`未知`,`غير معروف`],about:[`约`,`حوالي`],"Run now":[`立即运行`,`تشغيل الآن`],Pause:[`暂停`,`إيقاف مؤقت`],Resume:[`继续`,`استئناف`],"Pausing after the current exchange.":[`将在当前对话完成后暂停。`,`سيتوقف مؤقتاً بعد المحادثة الحالية.`],"Backfill started.":[`回填已开始。`,`بدأ الاستيراد.`],"Directory maps":[`目录映射`,`خرائط المجلدات`],"Map a directory that was moved or deleted to the project it belongs to. A change applies to the next import or backfill run.":[`将已移动或删除的目录映射到其所属项目。更改在下次导入或回填时生效。`,`اربط مجلداً نُقل أو حُذف بالمشروع الذي ينتمي إليه. يسري التغيير في الاستيراد التالي.`],"Saved maps":[`已保存的映射`,`الخرائط المحفوظة`],Keep:[`保留`,`إبقاء`],Remove:[`移除`,`إزالة`],"Unresolved directories":[`无法解析的目录`,`مجلدات غير محلولة`],"No unresolved directories in the latest run.":[`最近一次运行没有无法解析的目录。`,`لا توجد مجلدات غير محلولة في آخر تشغيل.`],"No suggestion found.":[`未找到建议。`,`لم يُعثر على اقتراح.`],"Target directory":[`目标目录`,`المجلد الهدف`],"Saved. Maps apply to the next import or backfill run.":[`已保存。映射在下次导入或回填时生效。`,`تم الحفظ. تسري الخرائط في الاستيراد التالي.`],"Claude Code folder":[`Claude Code 文件夹`,`مجلد Claude Code`],"Set this when Claude Code does not use ~/.claude, for example when you start it with CLAUDE_CONFIG_DIR. Leave it empty to use the default.":[`当 Claude Code 不使用 ~/.claude 时(例如用 CLAUDE_CONFIG_DIR 启动它),请设置此项。留空则使用默认文件夹。`,`اضبط هذا عندما لا يستخدم Claude Code المجلد ‎~/.claude، مثلاً عند تشغيله مع CLAUDE_CONFIG_DIR. اتركه فارغاً لاستخدام المجلد الافتراضي.`],"Save folder":[`保存文件夹`,`حفظ المجلد`],"Transcripts folder in use":[`正在使用的会话记录文件夹`,`مجلد سجلات الجلسات المستخدم`],From:[`来源`,`المصدر`],"this setting":[`此设置`,`هذا الإعداد`],"the CLAUDE_CONFIG_DIR variable of the web app":[`网页应用的 CLAUDE_CONFIG_DIR 变量`,`متغير CLAUDE_CONFIG_DIR لتطبيق الويب`],"the default folder":[`默认文件夹`,`المجلد الافتراضي`],"This folder does not exist. Claude Code capture and import will not work:":[`此文件夹不存在。Claude Code 的捕获和导入将无法工作:`,`هذا المجلد غير موجود. لن يعمل الالتقاط والاستيراد في Claude Code:`],"Enter a full path, or a path that starts with ~/.":[`请输入完整路径,或以 ~/ 开头的路径。`,`أدخل مساراً كاملاً، أو مساراً يبدأ بـ ‎~/.`],"Saved. Capture and import use this folder now.":[`已保存。捕获和导入现在使用此文件夹。`,`تم الحفظ. يستخدم الالتقاط والاستيراد هذا المجلد الآن.`],"Running version":[`运行版本`,`الإصدار الجاري`],"Global command":[`全局命令`,`الأمر العام`],"not installed globally":[`未全局安装`,`غير مثبت عمومياً`],"A newer OMMS copy runs in place of the global install. The global install is optional. To update it:":[`正在运行的是更新的 OMMS 副本,而不是全局安装。全局安装是可选的。更新方法:`,`تعمل نسخة OMMS أحدث بدلاً من التثبيت العام. التثبيت العام اختياري. لتحديثه:`],"The global install is newer than the running OMMS. The next Pi or OpenCode start replaces the web app.":[`全局安装比正在运行的 OMMS 更新。下次启动 Pi 或 OpenCode 时将替换网页应用。`,`التثبيت العام أحدث من OMMS الجاري. سيستبدل التشغيل التالي لـ Pi أو OpenCode تطبيق الويب.`],"OMMS is not installed globally. A global install is optional.":[`OMMS 未全局安装。全局安装是可选的。`,`OMMS غير مثبت عمومياً. التثبيت العام اختياري.`],"Keys and access":[`密钥与访问`,`المفاتيح والوصول`],"not needed":[`不需要`,`غير مطلوب`],"External API key":[`外部 API 密钥`,`مفتاح واجهة API الخارجية`],"Embedding server key":[`嵌入服务器密钥`,`مفتاح خادم التضمين`],"Capture and profile learning through the external API. Claude Code always uses it.":[`通过外部 API 进行捕获和用户画像学习。Claude Code 始终使用它。`,`الالتقاط وتعلّم الملف الشخصي عبر واجهة API الخارجية. يستخدمه Claude Code دائماً.`],"Sent to an embedding server on another machine.":[`发送给另一台机器上的嵌入服务器。`,`يُرسَل إلى خادم تضمين على جهاز آخر.`],"Let scripts and other computers call the web app's API.":[`允许脚本和其他电脑调用网页应用的 API。`,`تتيح للبرامج النصية والحواسيب الأخرى استدعاء واجهة API لتطبيق الويب.`],"Asks for a user name and password before the page opens.":[`打开页面前要求输入用户名和密码。`,`يطلب اسم مستخدم وكلمة مرور قبل فتح الصفحة.`],"External API card":[`外部 API 卡片`,`بطاقة واجهة API الخارجية`],"Embedding card":[`嵌入卡片`,`بطاقة التضمين`],"Table below":[`下方表格`,`الجدول أدناه`],"Form below":[`下方表单`,`النموذج أدناه`],"API tokens":[`API 令牌`,`رموز API`],"Browser password":[`浏览器密码`,`كلمة مرور المتصفح`],"The config file still sets webServerApiToken. OMMS imported it once as the token “from config file” and no longer reads the key. Use the token table instead.":[`配置文件仍设置了 webServerApiToken。OMMS 已将其导入一次,作为令牌“from config file”,之后不再读取该键。请改用令牌表。`,`لا يزال ملف الإعدادات يضبط webServerApiToken. استورده OMMS مرة واحدة كرمز باسم “from config file” ولم يعد يقرأ هذا المفتاح. استخدم جدول الرموز بدلاً منه.`],"Open this page on the computer that runs OMMS to manage tokens and the password.":[`请在运行 OMMS 的电脑上打开此页面,以管理令牌和密码。`,`افتح هذه الصفحة على الحاسوب الذي يشغّل OMMS لإدارة الرموز وكلمة المرور.`],"Revoke this token? Scripts that use it stop working.":[`撤销此令牌?使用它的脚本将停止工作。`,`إلغاء هذا الرمز؟ ستتوقف البرامج النصية التي تستخدمه عن العمل.`],"No browser password is set.":[`未设置浏览器密码。`,`لم تُضبط كلمة مرور للمتصفح.`],"A browser password is set for user":[`已为以下用户设置浏览器密码:`,`ضُبطت كلمة مرور المتصفح للمستخدم`],"A browser password is set for your computer user name.":[`已为你的电脑用户名设置浏览器密码。`,`ضُبطت كلمة مرور المتصفح لاسم مستخدم حاسوبك.`],"User name":[`用户名`,`اسم المستخدم`],Password:[`密码`,`كلمة المرور`],"Save password":[`保存密码`,`حفظ كلمة المرور`],"Clear password":[`清除密码`,`مسح كلمة المرور`],"Saved. Restart the web app to use the new browser password.":[`已保存。重启网页应用以使用新的浏览器密码。`,`تم الحفظ. أعد تشغيل تطبيق الويب لاستخدام كلمة مرور المتصفح الجديدة.`],Name:[`名称`,`الاسم`],Expires:[`过期时间`,`تاريخ الانتهاء`],"Last used":[`上次使用`,`آخر استخدام`],Never:[`永不`,`أبداً`],Revoke:[`撤销`,`إلغاء`],Copy:[`复制`,`نسخ`],"Copy this token now. It will not be shown again.":[`请立即复制此令牌。它不会再次显示。`,`انسخ هذا الرمز الآن. لن يُعرض مرة أخرى.`],"Token name":[`令牌名称`,`اسم الرمز`],"Expires after":[`有效期`,`ينتهي بعد`],"Generate token":[`生成令牌`,`إنشاء رمز`],All:[`全部`,`الكل`],Kind:[`类型`,`النوع`],"Built-in model":[`内置模型`,`النموذج المدمج`],"OpenAI-compatible server":[`OpenAI 兼容服务器`,`خادم متوافق مع OpenAI`],"Server URL":[`服务器 URL`,`عنوان URL للخادم`],"Vector size":[`向量维度`,`حجم المتجه`],"Stored memories":[`已存储的记忆`,`الذكريات المخزنة`],"Re-embedding":[`正在重新嵌入`,`جارٍ إعادة التضمين`],"Re-embed finished.":[`重新嵌入已完成。`,`اكتملت إعادة التضمين.`],"Re-embed failed":[`重新嵌入失败`,`فشلت إعادة التضمين`],Retry:[`重试`,`إعادة المحاولة`],Lock:[`锁定`,`قفل`],"Unlock to change":[`解锁以更改`,`افتح القفل للتغيير`],"The model that turns memory text into search vectors. A change re-embeds every memory.":[`将记忆文本转换为搜索向量的模型。更改后会重新嵌入所有记忆。`,`النموذج الذي يحوّل نص الذكريات إلى متجهات بحث. يؤدي تغييره إلى إعادة تضمين كل الذكريات.`],Preset:[`预设`,`إعداد مسبق`],Custom:[`自定义`,`مخصص`],"No key":[`无密钥`,`بلا مفتاح`],"Keep the saved key":[`保留已保存的密钥`,`الاحتفاظ بالمفتاح المحفوظ`],Apply:[`应用`,`تطبيق`],Cancel:[`取消`,`إلغاء الأمر`],"Test passed. Vector size":[`测试通过。向量维度`,`نجح الاختبار. حجم المتجه`],"Test failed":[`测试失败`,`فشل الاختبار`],"Every stored memory will be re-embedded":[`所有已存储的记忆都将重新嵌入`,`ستُعاد عملية تضمين كل الذكريات المخزنة`],"The hosted server is called once for each memory, which may cost money.":[`托管服务器会为每条记忆调用一次,可能产生费用。`,`يُستدعى الخادم المستضاف مرة لكل ذكرى، وقد يكلّف ذلك مالاً.`],"Search results are poor until the re-embed ends.":[`在重新嵌入结束前,搜索结果质量较差。`,`تكون نتائج البحث ضعيفة حتى تنتهي إعادة التضمين.`],"Restart open OpenCode and Pi sessions after the change.":[`更改后请重启已打开的 OpenCode 和 Pi 会话。`,`أعد تشغيل جلسات OpenCode وPi المفتوحة بعد التغيير.`],"Profile learning":[`用户画像学习`,`تعلّم الملف الشخصي`],"Catch up analyses every waiting prompt with the saved external API, 50 prompts for each model call.":[`补齐会使用已保存的外部 API 分析所有等待中的提示词,每次模型调用处理 50 条。`,`يحلّل اللحاق كل الطلبات المنتظرة عبر واجهة API الخارجية المحفوظة، 50 طلباً لكل استدعاء للنموذج.`],"Open this page on the computer that runs OMMS to start a catch-up run.":[`请在运行 OMMS 的电脑上打开此页面以开始补齐。`,`افتح هذه الصفحة على الحاسوب الذي يشغّل OMMS لبدء اللحاق.`],"Prompts waiting for profile learning":[`等待用户画像学习的提示词`,`الطلبات المنتظرة لتعلّم الملف الشخصي`],"Model calls":[`模型调用次数`,`استدعاءات النموذج`],"Batches done":[`已完成批次`,`الدفعات المكتملة`],"Prompts waiting":[`等待中的提示词`,`الطلبات المنتظرة`],Paused:[`已暂停`,`متوقف مؤقتاً`],Finished:[`已完成`,`اكتمل`],Stopped:[`已停止`,`توقّف`],"Catch up profile":[`补齐用户画像`,`اللحاق بالملف الشخصي`],"Start profile learning for the waiting prompts? Model calls":[`为等待中的提示词开始用户画像学习?模型调用次数`,`بدء تعلّم الملف الشخصي للطلبات المنتظرة؟ عدد استدعاءات النموذج`],"never used before":[`从未使用`,`لم يُستخدم من قبل`],"A newer catch-up run took over.":[`较新的补齐任务已接管。`,`تولّت عملية لحاق أحدث المهمة.`],"Browser password cleared. Restart the web app to turn it off.":[`浏览器密码已清除。重启网页应用以关闭它。`,`تم مسح كلمة مرور المتصفح. أعد تشغيل تطبيق الويب لإيقافها.`],Actions:[`操作`,`الإجراءات`],"All exchanges are done. Learning the profile from the imported prompts":[`所有对话已完成。正在从导入的提示中学习画像`,`اكتملت كل المحادثات. يجري تعلّم الملف الشخصي من المطالبات المستوردة`],batches:[`批`,`دفعات`],"Change it in":[`修改位置`,`مكان التغيير`],"Check them, then press Save maps.":[`请检查后点击保存映射。`,`راجعها ثم اضغط حفظ الخرائط.`],Credential:[`凭据`,`بيانات الاعتماد`],Email:[`邮箱`,`البريد الإلكتروني`],Filled:[`已填写`,`تم الملء`],"Finds the project each missing directory belongs to, mostly the main repository of a deleted worktree, and fills it in for you to check. Nothing is saved until you press Save maps.":[`为每个缺失的目录找到所属项目(多为已删除工作树的主仓库),并填入供你检查。点击保存映射之前不会保存任何内容。`,`يعثر على المشروع الذي ينتمي إليه كل مجلد مفقود، وغالباً المستودع الرئيسي لشجرة عمل محذوفة، ويملؤه لتراجعه. لا يُحفظ شيء حتى تضغط حفظ الخرائط.`],Hosts:[`主机`,`المضيفات`],"Import status":[`导入状态`,`حالة الاستيراد`],"in use":[`使用中`,`قيد الاستخدام`],"Last run":[`上次运行`,`آخر تشغيل`],"Last update":[`最后更新`,`آخر تحديث`],"Learning profile":[`正在学习画像`,`يجري تعلّم الملف الشخصي`],"Merge into":[`合并到`,`دمج في`],"Merge this profile into the other one? The source profile is turned off, not deleted.":[`将此画像合并到另一个画像?源画像会被停用,不会被删除。`,`دمج هذا الملف الشخصي في الآخر؟ يُوقَف الملف المصدر ولا يُحذف.`],"Merged.":[`已合并。`,`تم الدمج.`],"model not recorded":[`未记录模型`,`لم يُسجَّل نموذج`],model:[`个模型`,`نموذج`],models:[`个模型`,`نماذج`],"No directory recorded":[`未记录目录`,`لم يُسجَّل مجلد`],"No suggestion":[`无建议`,`لا اقتراح`],"Not started":[`未开始`,`لم يبدأ`],"OMMS keeps one profile for each git email. A folder whose repository has its own email starts a second profile. Choose the profile that is yours, or merge the extra one into it.":[`OMMS 为每个 git 邮箱保留一个画像。若某文件夹的仓库设置了自己的邮箱,就会产生第二个画像。请选择属于你的画像,或把多余的画像合并进去。`,`يحتفظ OMMS بملف شخصي لكل بريد git. المجلد الذي يملك مستودعه بريداً خاصاً يبدأ ملفاً شخصياً ثانياً. اختر ملفك الشخصي، أو ادمج الملف الزائد فيه.`],"Outcomes by host":[`各主机结果`,`النتائج حسب المضيف`],"Partly imported":[`部分已导入`,`مستورد جزئياً`],Patterns:[`模式`,`الأنماط`],pending:[`待处理`,`معلّق`],Preferences:[`偏好`,`التفضيلات`],Profiles:[`画像`,`الملفات الشخصية`],"Prompts analysed":[`已分析提示`,`المطالبات المحلَّلة`],Running:[`运行中`,`قيد التشغيل`],"Saved maps apply to every host.":[`已保存的映射适用于所有主机。`,`تنطبق الخرائط المحفوظة على كل المضيفات.`],"Saved: a memory was stored. Skipped: the model or a rule found nothing worth keeping, or the turn was private or trivial. Failed: the attempt hit an error. Total: the three added up. Each percentage is a share of its row's total.":[`已保存:存储了一条记忆。已跳过:模型或规则认为没有值得保留的内容,或该轮为私密或琐碎内容。失败:尝试出错。总计:三者之和。每个百分比是该行总计中的占比。`,`محفوظ: خُزّنت ذاكرة. متجاوز: لم يجد النموذج أو قاعدة ما يستحق الحفظ، أو كانت الجولة خاصة أو تافهة. فشل: واجهت المحاولة خطأ. الإجمالي: مجموع الثلاثة. كل نسبة هي حصة من إجمالي صفها.`],"Saved. OMMS now uses this profile in every folder.":[`已保存。OMMS 现在在所有文件夹中使用此画像。`,`تم الحفظ. يستخدم OMMS هذا الملف الشخصي الآن في كل المجلدات.`],Directories:[`目录数`,`عدد المجلدات`],"No target chosen":[`尚未选择目标`,`لم يُختر مجلد مستهدف`],"Smart resolve directories":[`智能解析目录`,`حلّ المجلدات تلقائياً`],Exact:[`精确`,`مطابقة تامة`],"Name match":[`名称匹配`,`مطابقة بالاسم`],Guess:[`猜测`,`تخمين`],Confidence:[`可信度`,`درجة الثقة`],"Temporary folder":[`临时文件夹`,`مجلد مؤقت`],"node_modules folder":[`node_modules 文件夹`,`مجلد node_modules`],"App data folder":[`应用数据文件夹`,`مجلد بيانات التطبيقات`],"Skills folder":[`技能文件夹`,`مجلد المهارات`],"Rows with a target":[`已有目标的行数`,`عدد الصفوف ذات المجلد المستهدف`],"Smart resolve shows each proposed map and ignore in a dialog. Tick the ones to keep, then press Confirm. Nothing is saved before that.":[`智能解析会在对话框中列出每个建议的映射和忽略项。勾选要保留的项,然后点击确认。在此之前不会保存任何内容。`,`يعرض الحلّ التلقائي كل خريطة مقترحة وكل تجاهل مقترح في مربع حوار. حدّد ما تريد الاحتفاظ به، ثم اضغط تأكيد. لا يُحفظ شيء قبل ذلك.`],"Suggested to ignore":[`建议忽略`,`مقترح للتجاهل`],Ignore:[`忽略`,`تجاهل`],Restore:[`恢复`,`استعادة`],"No target":[`无目标`,`بلا مجلد مستهدف`],"Save this map":[`保存此映射`,`حفظ هذه الخريطة`],"Tick the maps and ignores to keep, then press Confirm to save them. Saved maps apply to every host on the next import or backfill run.":[`勾选要保留的映射和忽略项,然后点击确认保存。保存的映射将在所有主机的下一次导入或回填时生效。`,`حدّد الخرائط وعناصر التجاهل التي تريد الاحتفاظ بها، ثم اضغط تأكيد لحفظها. تسري الخرائط المحفوظة على كل المضيفات في عملية الاستيراد أو الاستكمال التالية.`],"Nothing to save. Type a target in a row, or press Ignore for folders that are not projects.":[`没有可保存的内容。请在行中输入目标,或对不是项目的文件夹点击忽略。`,`لا يوجد ما يُحفظ. اكتب مجلداً مستهدفاً في صف، أو اضغط تجاهل للمجلدات التي ليست مشاريع.`],"Ignored directories":[`已忽略的目录`,`المجلدات المتجاهَلة`],"Ignored directories stay unimported and leave the unresolved counts.":[`已忽略的目录保持未导入,并且不计入未解析数量。`,`تبقى المجلدات المتجاهَلة دون استيراد، ولا تُحسب ضمن الأعداد غير المحلولة.`],"They apply to the next import or backfill run. No sessions were imported.":[`它们将在下一次导入或回填时生效。未导入任何会话。`,`تسري في عملية الاستيراد أو الاستكمال التالية. لم تُستورد أي جلسات.`],"Keep a map after its sessions import. Every import checks the map before it skips a session, so removing a map makes its sessions unresolved again on the next run.":[`会话导入后请保留映射。每次导入在跳过会话之前都会先检查映射,因此删除映射会使其会话在下次运行时重新变为未解析。`,`احتفظ بالخريطة بعد استيراد جلساتها. يفحص كل استيراد الخريطة قبل أن يتجاوز جلسة، لذا فإن حذف الخريطة يجعل جلساتها غير محلولة مجدداً في التشغيل التالي.`],"Save removals":[`保存删除`,`حفظ عمليات الحذف`],"Settings changed elsewhere. Check the list and try again.":[`设置已在其他位置更改。请检查列表后再试。`,`تغيّرت الإعدادات في مكان آخر. راجع القائمة، ثم حاول مجدداً.`],"Settings changed elsewhere and could not be refreshed. Refresh the list, then try again.":[`设置已在其他位置更改,且无法刷新。请刷新列表后再试。`,`تغيّرت الإعدادات في مكان آخر وتعذّر تحديثها. حدّث القائمة، ثم حاول مجدداً.`],"Saved. Removed maps stop applying at the next import or backfill run.":[`已保存。删除的映射将从下一次导入或回填起不再生效。`,`تم الحفظ. تتوقف الخرائط المحذوفة عن السريان في عملية الاستيراد أو الاستكمال التالية.`],"Removals could not be saved. Try again.":[`无法保存删除。请重试。`,`تعذّر حفظ عمليات الحذف. حاول مجدداً.`],"Ignored. The directory stays unimported.":[`已忽略。该目录保持未导入。`,`تم التجاهل. يبقى المجلد دون استيراد.`],"The directory could not be ignored. Try again.":[`无法忽略该目录。请重试。`,`تعذّر تجاهل المجلد. حاول مجدداً.`],"Restored. The directory shows again in each host list that reported it.":[`已恢复。该目录会重新出现在报告它的每个主机列表中。`,`تمت الاستعادة. يظهر المجلد مجدداً في قائمة كل مضيف أبلغ عنه.`],"The directory could not be restored. Try again.":[`无法恢复该目录。请重试。`,`تعذّرت استعادة المجلد. حاول مجدداً.`],"Saved, but the list could not be refreshed. Refresh the list without saving again.":[`已保存,但无法刷新列表。请刷新列表,无需再次保存。`,`تم الحفظ، لكن تعذّر تحديث القائمة. حدّث القائمة دون الحفظ مجدداً.`],"Review directory maps":[`检查目录映射`,`مراجعة خرائط المجلدات`],"Proposed maps":[`建议映射数`,`عدد الخرائط المقترحة`],Sessions:[`会话数`,`عدد الجلسات`],Confirm:[`确认`,`تأكيد`],"Saving…":[`正在保存…`,`جارٍ الحفظ…`],"Settings refreshed. No maps were saved.":[`设置已刷新。未保存任何映射。`,`حُدّثت الإعدادات. لم تُحفظ أي خرائط.`],"Settings could not be refreshed. Try Refresh list again.":[`无法刷新设置。请再次点击刷新列表。`,`تعذّر تحديث الإعدادات. حاول تحديث القائمة مجدداً.`],"Maps could not be saved. Review the targets and confirm again.":[`无法保存映射。请检查目标后再次确认。`,`تعذّر حفظ الخرائط. راجع المجلدات المستهدفة، ثم أكّد مجدداً.`],"Settings changed elsewhere. Review these maps and confirm again.":[`设置已在其他位置更改。请检查这些映射后再次确认。`,`تغيّرت الإعدادات في مكان آخر. راجع هذه الخرائط، ثم أكّد مجدداً.`],"Settings changed elsewhere and could not be refreshed. Refresh the list before confirming again.":[`设置已在其他位置更改,且无法刷新。请刷新列表后再次确认。`,`تغيّرت الإعدادات في مكان آخر وتعذّر تحديثها. حدّث القائمة قبل التأكيد مجدداً.`],"Maps were saved, but the list could not be refreshed. Refresh the list without saving again.":[`映射已保存,但无法刷新列表。请刷新列表,无需再次保存。`,`حُفظت الخرائط، لكن تعذّر تحديث القائمة. حدّث القائمة دون الحفظ مجدداً.`],"No model was recorded for these attempts. This happens with records written by older OMMS versions, and when an attempt stops before a model is chosen.":[`这些尝试没有记录模型。旧版 OMMS 写入的记录,以及在选定模型之前就停止的尝试,会出现这种情况。`,`لم يُسجَّل نموذج لهذه المحاولات. يحدث ذلك في السجلات التي كتبتها إصدارات أقدم من OMMS، وعندما تتوقف المحاولة قبل اختيار نموذج.`],"These sessions cannot be mapped.":[`这些会话无法映射。`,`لا يمكن ربط هذه الجلسات.`],unresolved:[`未解析`,`غير محلول`],"Use this profile":[`使用此画像`,`استخدام هذا الملف الشخصي`],"Use this profile for every folder?":[`在所有文件夹中使用此画像?`,`استخدام هذا الملف الشخصي في كل المجلدات؟`],"Used for":[`用途`,`الاستخدام`],Workflows:[`工作流`,`سير العمل`],Memory:[`记忆`,`الذاكرة`],Setting:[`设置`,`الإعداد`],Value:[`数值`,`القيمة`],Default:[`默认值`,`القيمة الافتراضية`],Unit:[`单位`,`الوحدة`],Affects:[`影响`,`التأثير`],Results:[`条结果`,`نتائج`],Memories:[`条记忆`,`ذكريات`],Bytes:[`字节`,`بايت`],"Approximate tokens":[`约计令牌`,`رموز تقريبية`],"Maximum memory search results. Manual searches can request fewer; prompt retrieval uses this ceiling.":[`记忆搜索结果的最大数量。手动搜索可以请求更少;提示词检索使用此上限。`,`الحد الأقصى لنتائج بحث الذاكرة. يمكن للبحث اليدوي طلب عدد أقل؛ ويستخدم استرجاع الطلب هذا السقف.`],"Recent memories added at session start in OpenCode V1 and Claude Code. Pi and OpenCode V2 use prompt-based search instead.":[`会话开始时在 OpenCode V1 和 Claude Code 中加入的近期记忆。Pi 和 OpenCode V2 改用基于提示词的搜索。`,`الذكريات الحديثة التي تُضاف عند بدء الجلسة في OpenCode V1 و Claude Code. أما Pi و OpenCode V2 فيستخدمان البحث عبر الطلب بدلاً منها.`],"Conversation input sent to the memory-summary model through the shared capture pipeline. Smaller values can omit conversation text.":[`通过共享捕获管道发送给记忆摘要模型的对话输入。数值较小时可能省略部分对话文本。`,`مدخلات المحادثة التي تُرسل إلى نموذج تلخيص الذاكرة عبر مسار الالتقاط المشترك. القيم الأصغر قد تحذف نصاً من المحادثة.`],"OpenCode profile-learning input. Smaller values can omit prompts from that input. This control does not limit the other hosts' profile input.":[`OpenCode 画像学习的输入。数值较小时可能从该输入中省略部分提示词。此设置不限制其他主机的画像输入。`,`مدخلات تعلّم الملف الشخصي في OpenCode. القيم الأصغر قد تحذف مطالبات من هذه المدخلات. لا يقيّد هذا الإعداد مدخلات الملف الشخصي في المضيفات الأخرى.`],"Automatic memory context, including profile text and formatting, added to agent requests across all hosts. Smaller values can show fewer or shorter memories.":[`自动加入各主机代理请求的记忆上下文,包括画像文本和格式化内容。数值较小时会显示更少或更短的记忆。`,`سياق الذاكرة المُضاف تلقائياً إلى طلبات الوكيل في كل المضيفات، بما في ذلك نص الملف الشخصي والتنسيق. القيم الأصغر قد تعرض ذكريات أقل أو أقصر.`],"Enter a positive whole number.":[`请输入正整数。`,`أدخل رقماً صحيحاً موجباً.`],"Enter a whole number from 16,384 to 16,777,216.":[`请输入 16,384 到 16,777,216 之间的整数。`,`أدخل رقماً صحيحاً من 16,384 إلى 16,777,216.`],"Enter a whole number from 1,024 to 16,777,216.":[`请输入 1,024 到 16,777,216 之间的整数。`,`أدخل رقماً صحيحاً من 1,024 إلى 16,777,216.`],"Enter a whole number from 256 to 65,536.":[`请输入 256 到 65,536 之间的整数。`,`أدخل رقماً صحيحاً من 256 إلى 65,536.`],"Byte limits count UTF-8 bytes.":[`字节限制按 UTF-8 字节计数。`,`تُحتسب حدود البايت بوحدات بايت UTF-8.`],"Approximate tokens are estimated as ceil(UTF-8 bytes / 4). A provider can count more or fewer tokens for the same text.":[`约计令牌按 ceil(UTF-8 字节数 / 4) 估算。同一文本,提供商统计的令牌数可能更多或更少。`,`تُقدَّر الرموز التقريبية بالصيغة ceil(بايتات UTF-8 / 4). قد يحسب المزوّد للنص نفسه رموزاً أكثر أو أقل.`],"These controls do not delete stored data, set a spending limit, limit model replies, or control Graphify output.":[`这些设置不会删除已存储的数据、设定消费限额、限制模型回复,也不会控制 Graphify 输出。`,`لا تحذف هذه الإعدادات البيانات المخزنة، ولا تضع حد إنفاق، ولا تحدّ من ردود النموذج، ولا تتحكم في خرج Graphify.`],"Edit ~/.config/omms/omms.jsonc directly to set these limits without the web UI.":[`也可以直接编辑 ~/.config/omms/omms.jsonc 来设置这些限制,无需网页界面。`,`عدّل الملف ~/.config/omms/omms.jsonc مباشرة لضبط هذه الحدود دون واجهة الويب.`],"Save memory limits":[`保存记忆限制`,`حفظ حدود الذاكرة`],"Saved. New memory operations use these limits.":[`已保存。新的记忆操作将使用这些限制。`,`تم الحفظ. ستستخدم عمليات الذاكرة الجديدة هذه الحدود.`],"Invalid setting":[`无效的设置`,`إعداد غير صالح`],"Config changed. Reload settings and save again.":[`设置文件已更改。请重新加载设置后再次保存。`,`تغيّر ملف الإعدادات. أعد تحميل الإعدادات ثم احفظ مجدداً.`],"The memory settings could not be loaded. Reload the page to try again.":[`无法加载记忆设置。请重新加载页面重试。`,`تعذّر تحميل إعدادات الذاكرة. أعد تحميل الصفحة للمحاولة مجدداً.`],"The memory settings could not be saved.":[`无法保存记忆设置。`,`تعذّر حفظ إعدادات الذاكرة.`],"Effective value":[`生效值`,`القيمة السارية`],project:[`项目`,`المشروع`],"The project value stays in force. Saving edits the global file only.":[`项目值仍然生效。保存只修改全局文件。`,`تبقى قيمة المشروع سارية، والحفظ يعدّل الملف العام فقط.`]};function ah(e,t){return t===`en`?e:ih[e]?.[t===`zh`?0:1]??e}function oh(){let{language:e}=pr();return t=>ah(t,e)}function sh(e,t){if(e===`env`){let n=(t.name??``).trim();if(!/^[A-Za-z_][A-Za-z0-9_]*$/.test(n))throw Error(`Enter a variable name such as ZAI_API_KEY`);return{source:e,name:n}}if(e===`file`){let n=(t.path??``).trim();if(!n)throw Error(`Enter the path of a key file`);return{source:e,path:n}}let n=(t.name??``).trim()||`memory-api`;if(!/^[A-Za-z0-9_-]{1,64}$/.test(n))throw Error(`Name the key file with letters, digits, dashes, or underscores`);if(!(t.value??``).trim())throw Error(`Paste the key`);return{source:e,name:n,value:t.value??``,replace:t.replace===!0}}function ch(e){let t=[],n=e.memoryProvider===`orcarouter`;return!n&&!e.memoryModel&&t.push(`memoryModel`),!n&&!e.memoryApiUrl&&t.push(`memoryApiUrl`),e.keySet||t.push(`memoryApiKey`),t}function lh(e,t){if(t===`inherit`||t===`external`)return{[`${e}Model`]:t};let n=t.indexOf(`/`);if(n<1||n===t.length-1)throw Error(`Enter a model as provider/model.`);return{[`${e}Provider`]:t.slice(0,n),[`${e}Model`]:t.slice(n+1)}}function uh(e){return{kind:e.relation,command:e.relation===`older`?`npm i -g om-memory-system@latest`:null}}function dh(e,t){return e.filter(e=>!t.has(e.from))}var fh={opencode:`OpenCode`,pi:`Pi`,"claude-code":`Claude Code`};function ph(e){return fh[e]}function mh(e){return Object.hasOwn(fh,e)?fh[e]:e}function hh({status:e}){let t=oh();return(0,U.jsxs)(`div`,{className:`space-y-1 rounded-lg border border-border p-3`,children:[(0,U.jsx)(`h3`,{className:`text-subsection-title font-semibold`,children:ph(`claude-code`)}),e?.ready===!0&&(0,U.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:t(`Claude Code capture uses the external API.`)}),e?.ready===!1&&(0,U.jsxs)(`div`,{role:`alert`,className:`space-y-1 text-xs`,children:[(0,U.jsx)(`p`,{className:`text-amber-600`,children:t(`Claude Code capture is off. Complete the external API settings.`)}),(e.issues??[]).length>0&&(0,U.jsxs)(`p`,{children:[t(`Missing settings`),`: `,(e.issues??[]).map(e=>t(e)).join(`; `)]})]})]})}function gh(){let e=oh(),[t,n]=(0,_.useState)(),[r,i]=(0,_.useState)({}),[a,o]=(0,_.useState)(``),[s,c]=(0,_.useState)(!1);(0,_.useEffect)(()=>{let e=!0,t=Qm();$(`/api/settings`).then(r=>{e&&t.isCurrent()&&n(r)}).catch(t=>{e&&o(t.message)});for(let t of[`opencode`,`pi`])$(`/api/settings/models?host=${t}`).then(n=>{e&&i(e=>({...e,[t]:n}))}).catch(()=>{e&&i(e=>({...e,[t]:{available:!1}}))});let r=eh(t=>{e&&n(t)});return()=>{e=!1,r()}},[]);async function l(n,r){if(!t)return;let i;try{i=lh(n,r)}catch(t){o(e(t.message));return}c(!0);let a,s;try{a=await $(`/api/settings`,{method:`PATCH`,body:JSON.stringify({edits:i,revision:t.revision})})}catch(e){s=e}let l=await $m()!==null;if(c(!1),a){let t=e(a.migratedLegacy?`Saved. OMMS now reads ~/.config/omms/omms.jsonc. The legacy config was kept.`:`Saved. New capture and profile work uses these settings.`);o(l?t:`${t} ${e(`Reload the page before saving again.`)}`)}else o(th(s?.message??``,e(l?`Current settings were reloaded; check the values and save again.`:`The current settings could not be reloaded. Reload the page.`)))}let u=ch({memoryProvider:t?.settings.memoryProvider?.globalValue,memoryModel:t?.settings.memoryModel?.globalValue,memoryApiUrl:t?.settings.memoryApiUrl?.globalValue,keySet:!!t?.secrets.memoryApiKey?.set});return(0,U.jsxs)(`section`,{className:`space-y-3 rounded-xl border border-border bg-card p-4`,"aria-label":e(`Models`),children:[(0,U.jsx)(`h2`,{className:`text-section-title font-semibold`,children:e(`Models`)}),(0,U.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[e(`External API fallback`),`: `,t?.fallback.model??e(`none`),` (`,e(t?.fallback.configured?`ready`:`not ready`),`).`]}),[`opencode`,`pi`].map(e=>(0,U.jsx)(_h,{host:e,model:t?.settings[`${e}Model`],provider:t?.settings[`${e}Provider`],effective:e===`pi`?t?.effective.pi.kind:t?.effective.opencode.mode??`unready`,list:r[e],externalMissing:u,busy:s||!t,onSave:t=>l(e,t)},e)),(0,U.jsx)(hh,{status:t?.effective[`claude-code`]}),a&&(0,U.jsx)(`p`,{role:`status`,className:`text-sm`,children:a})]})}function _h({host:e,model:t,provider:n,effective:r,list:i,externalMissing:a,busy:o,onSave:s}){let c=oh(),l=t?.globalValue===`inherit`||!t?.globalValue?`inherit`:t.globalValue===`external`?`external`:`${n?.globalValue??``}/${t.globalValue}`,[u,d]=(0,_.useState)(),[f,p]=(0,_.useState)(),[m,h]=(0,_.useState)(),g=u??(l===`inherit`||l===`external`?l:`manual`),v=i?.models??[],y=l===`inherit`||l===`external`?``:l,b=m||y||(v[0]?`${v[0].provider}/${v[0].model}`:`typed`),x=!v.some(e=>`${e.provider}/${e.model}`===b),S=f??y;return(0,U.jsxs)(`div`,{className:`space-y-2 rounded-lg border border-border p-3`,children:[(0,U.jsx)(`h3`,{className:`text-subsection-title font-semibold`,children:ph(e)}),(0,U.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[c(`Effective model`),`:`,` `,t?.value===`external`&&r===`manual`?c(`external API`):t?.value===`inherit`||r===`session`?c(`session`):r===`manual`?c(`external API`):r===`unready`?c(`unavailable`):`${n?.value??``}/${t?.value??``}`]}),(t?.source===`project`||n?.source===`project`)&&(0,U.jsx)(`p`,{className:`text-xs text-amber-600`,children:c(`Project override is active. Changes to the global file may not take effect here.`)}),(0,U.jsx)(`label`,{className:`block text-sm`,htmlFor:`${e}-model`,children:c(`Model choice`)}),(0,U.jsxs)(dn,{id:`${e}-model`,className:`w-full rounded-lg border border-border bg-background p-2 text-sm`,value:g,onChange:e=>d(e.target.value),children:[(0,U.jsx)(`option`,{value:`inherit`,children:c(`Session model`)}),(0,U.jsx)(`option`,{value:`manual`,children:c(`Manual model`)}),(0,U.jsx)(`option`,{value:`external`,disabled:a.length>0,children:c(`External API`)})]}),a.length>0&&(0,U.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[c(`External API needs`),`: `,a.join(`, `)]}),g===`manual`&&i?.available&&v.length>0&&(0,U.jsxs)(dn,{className:`w-full rounded-lg border border-border bg-background p-2 text-sm`,"aria-label":`${ph(e)} ${c(`Model`)}`,value:x?`typed`:b,onChange:e=>h(e.target.value),children:[v.map(e=>(0,U.jsxs)(`option`,{value:`${e.provider}/${e.model}`,children:[e.name,` (`,e.provider,`/`,e.model,`)`]},`${e.provider}/${e.model}`)),(0,U.jsx)(`option`,{value:`typed`,children:c(`Manual provider/model`)})]}),g===`manual`&&x&&(0,U.jsx)(`input`,{className:`w-full rounded-lg border border-border bg-background p-2 text-sm`,"aria-label":`${e} ${c(`Manual provider/model`)}`,placeholder:`provider/model`,value:S,onChange:e=>{p(e.target.value),h(`typed`)}}),g===`manual`&&i&&!i.available&&(0,U.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:i.reason?c(i.reason):c(`Model list unavailable. Enter provider/model manually.`)}),(0,U.jsx)(`button`,{type:`button`,className:`rounded-lg border border-border px-3 py-1.5 text-sm`,disabled:o,onClick:()=>s(g===`manual`?x?S.trim():b:g),children:c(`Save model`)})]})}var vh=`Enter a positive whole number.`,yh=[{key:`maxMemories`,id:`memory-maxMemories`,default:10,unit:`Results`,affects:`Maximum memory search results. Manual searches can request fewer; prompt retrieval uses this ceiling.`,min:1,max:2**53-1,accepted:vh},{key:`chatMessage.maxMemories`,id:`memory-chatMessage-maxMemories`,default:3,unit:`Memories`,affects:`Recent memories added at session start in OpenCode V1 and Claude Code. Pi and OpenCode V2 use prompt-based search instead.`,min:1,max:2**53-1,accepted:vh},{key:`autoCaptureMaxContextBytes`,id:`memory-autoCaptureMaxContextBytes`,default:131072,unit:`Bytes`,affects:`Conversation input sent to the memory-summary model through the shared capture pipeline. Smaller values can omit conversation text.`,min:16384,max:16777216,accepted:`Enter a whole number from 16,384 to 16,777,216.`},{key:`userProfileMaxContextBytes`,id:`memory-userProfileMaxContextBytes`,default:32768,unit:`Bytes`,affects:`OpenCode profile-learning input. Smaller values can omit prompts from that input. This control does not limit the other hosts' profile input.`,min:1024,max:16777216,accepted:`Enter a whole number from 1,024 to 16,777,216.`},{key:`retrievalMaxTokens`,id:`memory-retrievalMaxTokens`,default:2e3,unit:`Approximate tokens`,affects:`Automatic memory context, including profile text and formatting, added to agent requests across all hosts. Smaller values can show fewer or shorter memories.`,min:256,max:65536,accepted:`Enter a whole number from 256 to 65,536.`}];[...yh.flatMap(e=>[e.unit,e.affects,e.accepted])];function bh(e,t){let n=typeof t==`string`?t.trim():``;if(!n||!/^-?\d+(\.\d+)?$/.test(n))return;let r=Number(n);if(Number.isInteger(r))return r>=e.min&&r<=e.max?r:void 0}function xh(e){return e.toLocaleString(`en-US`)}function Sh(e,t,n){let r=t[e.key];return typeof r==`string`?r:String(n[e.key]??e.default)}function Ch(e,t){let n=!1;for(let r of yh){let i=e[r.key];if(typeof i!=`string`)continue;let a=bh(r,i);if(a===void 0)return!1;a!==(t[r.key]??r.default)&&(n=!0)}return n}function wh(e,t){let n={};if(!Ch(e,t))return n;for(let r of yh){let i=e[r.key];if(typeof i!=`string`)continue;let a=bh(r,i);a!==(t[r.key]??r.default)&&(n[r.key]=a)}return n}var Th=`Config changed. Reload settings and save again.`;function Eh(e){if(e===`Config changed. Reload settings and save again.`)return{kind:`stale`};let t=yh.map(e=>e.key.replace(/\./g,`\\.`)).join(`|`),n=RegExp(`^Invalid (${t}) setting\\b`).exec(e);return n?{kind:`invalid`,key:n[1]}:{kind:`unknown`}}var Dh=`relative overflow-x-auto rounded-lg border border-border`,Oh=`px-3 py-2 text-start font-medium`,kh=`bg-muted/50 text-xs text-muted-foreground`,Ah=`px-3 py-2 text-start font-medium`,jh=`border-t border-border transition-colors hover:bg-muted/30`,Mh=`px-3 py-1.5`;function Nh(){let e=oh(),[t,n]=(0,_.useState)(),[r,i]=(0,_.useState)({}),[a,o]=(0,_.useState)(!1),[s,c]=(0,_.useState)(),l=(0,_.useRef)(!1);(0,_.useEffect)(()=>{let e=!0,t=Qm();$(`/api/settings`).then(r=>{e&&t.isCurrent()&&n(r)}).catch(()=>{e&&c({kind:`load-failed`})});let r=eh(t=>{e&&n(t)});return()=>{e=!1,r()}},[]);let u={},d={};for(let e of yh){let n=t?.settings[e.key];u[e.key]=typeof n?.globalValue==`number`?n.globalValue:void 0,d[e.key]=typeof n?.default==`number`?n.default:e.default}let f=Ch(r,u);async function p(){if(!t||!f||l.current)return;let e=wh(r,u);if(!Object.keys(e).length)return;l.current=!0,o(!0);let n=!1,a;try{await $(`/api/settings`,{method:`PATCH`,body:JSON.stringify({edits:e,revision:t.revision})}),n=!0}catch(e){a=e}let s=await $m()!==null;o(!1),l.current=!1,n?(i({}),c({kind:`saved`,reloaded:s})):c({kind:`save-failed`,failure:Eh(a?.message??``),reloaded:s})}function m(t){if(t.kind===`load-failed`)return e(`The memory settings could not be loaded. Reload the page to try again.`);if(t.kind===`saved`)return t.reloaded?e(`Saved. New memory operations use these limits.`):`${e(`Saved. New memory operations use these limits.`)} ${e(`Reload the page before saving again.`)}`;let n=t.reloaded?e(`Current settings were reloaded; check the values and save again.`):e(`The current settings could not be reloaded. Reload the page.`);if(t.failure.kind===`stale`)return th(e(Th),n);if(t.failure.kind===`invalid`){let r=t.failure,i=yh.find(e=>e.key===r.key);return th(`${e(`Invalid setting`)} ${i.key}: ${e(i.accepted)}`,n)}return th(e(`The memory settings could not be saved.`),n)}return(0,U.jsxs)(`section`,{className:`space-y-3 rounded-xl border border-border bg-card p-4`,"aria-label":e(`Memory`),children:[(0,U.jsx)(`h2`,{className:`text-section-title font-semibold`,children:e(`Memory`)}),(0,U.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e(`Byte limits count UTF-8 bytes.`)}),(0,U.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e(`Approximate tokens are estimated as ceil(UTF-8 bytes / 4). A provider can count more or fewer tokens for the same text.`)}),(0,U.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e(`These controls do not delete stored data, set a spending limit, limit model replies, or control Graphify output.`)}),(0,U.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e(`Edit ~/.config/omms/omms.jsonc directly to set these limits without the web UI.`)}),(0,U.jsxs)(`form`,{className:`space-y-3`,onSubmit:e=>{e.preventDefault(),p()},children:[(0,U.jsx)(`div`,{className:Dh,children:(0,U.jsxs)(`table`,{className:`w-full min-w-[56rem] text-sm`,children:[(0,U.jsx)(`caption`,{className:`sr-only`,children:e(`Memory`)}),(0,U.jsx)(`thead`,{className:kh,children:(0,U.jsxs)(`tr`,{children:[(0,U.jsx)(`th`,{className:Ah,children:e(`Setting`)}),(0,U.jsx)(`th`,{className:Ah,children:e(`Value`)}),(0,U.jsx)(`th`,{className:Ah,children:e(`Default`)}),(0,U.jsx)(`th`,{className:Ah,children:e(`Unit`)}),(0,U.jsx)(`th`,{className:Ah,children:e(`Affects`)})]})}),(0,U.jsx)(`tbody`,{children:yh.map(n=>{let o=r[n.key],s=Sh(n,r,u),c=typeof o==`string`&&bh(n,o)===void 0,l=t?.settings[n.key],f=l?.source===`project`;return(0,U.jsxs)(`tr`,{className:jh,children:[(0,U.jsxs)(`td`,{className:Mh,children:[(0,U.jsx)(`code`,{dir:`ltr`,children:n.key}),f&&(0,U.jsxs)(`div`,{className:`mt-1 space-y-0.5 text-xs text-amber-600`,children:[(0,U.jsxs)(`p`,{children:[e(`Effective value`),`: `,String(l?.value??``),` (`,e(`project`),`)`]}),(0,U.jsx)(`p`,{children:e(`Project override is active. Changes to the global file may not take effect here.`)}),(0,U.jsx)(`p`,{children:e(`The project value stays in force. Saving edits the global file only.`)})]})]}),(0,U.jsxs)(`td`,{className:Mh,children:[(0,U.jsx)(`input`,{type:`number`,id:`${n.id}-input`,className:`w-36 tabular-nums`,inputMode:`numeric`,step:1,min:n.min,max:n.max,"aria-label":`${n.key} ${e(`Value`)}`,"aria-describedby":`${n.id}-help`,"aria-invalid":c||void 0,disabled:a,value:s,onChange:e=>i(t=>({...t,[n.key]:e.target.value}))}),(0,U.jsx)(`span`,{id:`${n.id}-help`,className:`block text-xs ${c?`text-red-600`:`text-muted-foreground`}`,children:e(n.accepted)})]}),(0,U.jsx)(`td`,{className:`${Mh} tabular-nums`,children:xh(d[n.key])}),(0,U.jsx)(`td`,{className:Mh,children:e(n.unit)}),(0,U.jsx)(`td`,{className:Mh,children:e(n.affects)})]},n.key)})})]})}),(0,U.jsxs)(`div`,{className:`flex gap-2`,children:[(0,U.jsx)(`button`,{type:`submit`,disabled:a||!t||!f,onClick:()=>void p(),children:e(`Save memory limits`)}),(0,U.jsx)(`button`,{type:`button`,disabled:a,onClick:()=>i({}),children:e(`Cancel`)})]})]}),s&&(0,U.jsx)(`p`,{role:`status`,className:`text-sm`,children:m(s)})]})}var Ph=[`openai-chat`,`openai-responses`,`anthropic`,`minimax`,`orcarouter`,`google-gemini`];function Fh(){let e=oh(),[t,n]=(0,_.useState)(),[r,i]=(0,_.useState)({}),[a,o]=(0,_.useState)(`file`),[s,c]=(0,_.useState)({name:``,path:``,value:``}),[l,u]=(0,_.useState)(``),[d,f]=(0,_.useState)(!1);(0,_.useEffect)(()=>{let e=!0,t=Qm();$(`/api/settings`).then(r=>{e&&t.isCurrent()&&n(r)}).catch(t=>{e&&u(t.message)});let r=eh(t=>{e&&n(t)});return()=>{e=!1,r()}},[]);let p=e=>String(t?.settings[e]?.globalValue??``),m=e=>r[e]??p(e);async function h(){if(!t)return;let n={};for(let e of[`memoryProvider`,`memoryApiUrl`,`memoryModel`]){let t=m(e).trim();t&&t!==p(e)&&(n[e]=t)}if(!Object.keys(n).length){u(e(`Nothing to save.`));return}f(!0);try{await $(`/api/settings`,{method:`PATCH`,body:JSON.stringify({edits:n,revision:t.revision})}),i({}),u(e(`Saved. New capture and profile work uses these settings.`))}catch(e){u(e.message)}await $m(),f(!1)}async function g(n=!1){if(!t)return;let r;try{r=sh(a,{...s,replace:n})}catch(t){u(e(t.message));return}f(!0);try{await $(`/api/settings/external-api/key`,{method:`POST`,body:JSON.stringify({...r,revision:t.revision})}),c(e=>({...e,value:``})),u(e(`Key source saved.`))}catch(t){let r=t.message;if(a===`paste`&&!n&&r.includes(`Confirm to replace`)){f(!1),window.confirm(e(`A key file with this name exists. Replace it?`))&&await g(!0);return}u(r)}await $m(),f(!1)}async function v(){f(!0);try{let t=await $(`/api/settings/external-api/test`,{method:`POST`,body:`{}`});u(t.ok?`${e(`Test call succeeded`)}: ${t.model??``}`:`${e(`Test call failed`)}: ${t.error??``}`)}catch(e){u(e.message)}f(!1)}let y=t?.externalKey;return(0,U.jsxs)(`section`,{className:`space-y-3 rounded-xl border border-border bg-card p-4`,"aria-label":e(`External API`),children:[(0,U.jsx)(`h2`,{className:`text-section-title font-semibold`,children:e(`External API`)}),(0,U.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:e(`An OpenAI- or Anthropic-compatible endpoint that either host can use for capture and backfill.`)}),(0,U.jsxs)(`label`,{className:`block text-sm`,children:[e(`Provider`),(0,U.jsx)(dn,{"aria-label":e(`Provider`),className:`mt-1 block w-full rounded border border-border bg-background p-2`,value:m(`memoryProvider`)||`openai-chat`,onChange:e=>i({...r,memoryProvider:e.target.value}),children:Ph.map(e=>(0,U.jsx)(`option`,{value:e,children:e},e))})]}),(0,U.jsxs)(`label`,{className:`block text-sm`,children:[e(`API URL`),(0,U.jsx)(`input`,{dir:`ltr`,className:`mt-1 block w-full rounded border border-border bg-background p-2 font-mono`,placeholder:`https://api.example.com/v1`,value:m(`memoryApiUrl`),onChange:e=>i({...r,memoryApiUrl:e.target.value})})]}),(0,U.jsxs)(`label`,{className:`block text-sm`,children:[e(`Model`),(0,U.jsx)(`input`,{dir:`ltr`,className:`mt-1 block w-full rounded border border-border bg-background p-2 font-mono`,placeholder:`glm-5-turbo`,value:m(`memoryModel`),onChange:e=>i({...r,memoryModel:e.target.value})})]}),(0,U.jsx)(`button`,{type:`button`,className:`rounded border border-border px-3 py-1.5 text-sm`,disabled:d||!t,onClick:()=>void h(),children:e(`Save endpoint`)}),(0,U.jsxs)(`fieldset`,{className:`space-y-2 rounded-lg border border-border p-3 text-sm`,children:[(0,U.jsx)(`legend`,{className:`px-1 font-medium`,children:e(`API key`)}),(0,U.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[e(`Key source`),`:`,` `,y?.source===`env`?`${e(`environment variable`)} ${y.reference}`:y?.source===`file`?`${e(`key file`)} ${y.reference}`:y?.source===`literal`?e(`set in the config file`):e(`not set`),y?.source&&` · ${e(y.resolvesInWebApp?`resolves in the web app`:`does not resolve in the web app`)}`]}),y?.source===`env`&&(0,U.jsx)(`p`,{className:`text-xs text-amber-600`,children:e(`A login web app does not see variables set only in a shell profile; a key file works everywhere.`)}),y?.source&&!y.resolvesInWebApp&&(0,U.jsx)(`p`,{className:`text-xs text-amber-600`,children:e(`The key does not resolve in this web app. Save it to a key file instead.`)}),[[`env`,`Environment variable`],[`file`,`Key file`],[`paste`,`Save key to a private file`]].map(([t,n])=>(0,U.jsxs)(`label`,{className:`flex items-center gap-2`,children:[(0,U.jsx)(`input`,{type:`radio`,name:`omms-key-source`,checked:a===t,onChange:()=>o(t)}),e(n)]},t)),a===`env`&&(0,U.jsx)(`input`,{"aria-label":e(`Variable name`),className:`w-full rounded border border-border bg-background p-2`,placeholder:`ZAI_API_KEY`,value:s.name,onChange:e=>c({...s,name:e.target.value})}),a===`file`&&(0,U.jsx)(`input`,{"aria-label":e(`Key file path`),className:`w-full rounded border border-border bg-background p-2`,placeholder:`~/.config/omms/secrets/zai.key`,value:s.path,onChange:e=>c({...s,path:e.target.value})}),a===`paste`&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`input`,{"aria-label":e(`Key file name`),className:`w-full rounded border border-border bg-background p-2`,placeholder:`memory-api`,value:s.name,onChange:e=>c({...s,name:e.target.value})}),(0,U.jsx)(`input`,{"aria-label":e(`API key`),type:`password`,autoComplete:`off`,className:`w-full rounded border border-border bg-background p-2`,value:s.value,onChange:e=>c({...s,value:e.target.value})}),(0,U.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e(`The key is written to ~/.config/omms/secrets/ readable only by you. It is never shown again.`)})]}),(0,U.jsx)(`button`,{type:`button`,className:`rounded border border-border px-3 py-1.5`,disabled:d||!t,onClick:()=>void g(),children:e(`Save key source`)})]}),(0,U.jsx)(`button`,{type:`button`,className:`rounded border border-border px-3 py-1.5 text-sm`,disabled:d,onClick:()=>void v(),children:e(`Test`)}),l&&(0,U.jsx)(`p`,{role:`status`,className:`text-sm`,children:l})]})}var Ih=new Set([`localhost`,`127.0.0.1`,`::1`,`[::1]`,`0:0:0:0:0:0:0:1`]);function Lh(e){let t=e.trim().toLowerCase();return Ih.has(t)||/^127(?:\.\d{1,3}){3}$/.test(t)}function Rh(e){try{return Lh(new URL(e).hostname)}catch{return!1}}function zh(e,t){return e?`set`:t?`missing`:`not-needed`}function Bh(e){let{access:t,secrets:n}=e,r=t.embeddingApiUrl;return{memoryApiKey:(e=>e===`not-needed`?`never-used`:e)(zh(!!n.memoryApiKey?.set,e.externalUsed||e.claudeCodeInUse)),embeddingApiKey:zh(!!n.embeddingApiKey?.set,!!r&&!Rh(r)),apiTokens:zh(t.tokenAvailable,!Lh(t.host)&&!t.authEnabled),webPassword:zh(!!n.webServerAuthPassword?.set,!1)}}function Vh(e){return e?`Browser password cleared. Restart the web app to turn it off.`:`Saved. Restart the web app to use the new browser password.`}var Hh=[{id:`ollama`,label:`Ollama`,url:`http://localhost:11434/v1`},{id:`llamacpp`,label:`llama.cpp`,url:`http://localhost:8080/v1`},{id:`openrouter`,label:`OpenRouter`,url:`https://openrouter.ai/api/v1`},{id:`openai`,label:`OpenAI`,url:`https://api.openai.com/v1`},{id:`custom`,label:`Custom`,url:``}];function Uh(e,t){let n=Hh.find(t=>t.id===e);return n&&n.url?n.url:t}function Wh(e){if(e.kind===`builtin`)return{kind:`builtin`,model:e.model.trim()};let t=e.key===`none`||e.key===`saved`?{source:e.key}:sh(e.key,{...e.keyInput,name:e.keyInput.name||`embedding-api`});return{kind:`server`,url:e.url.trim(),model:e.model.trim(),key:t}}function Gh(e){return JSON.stringify([e.kind,e.kind===`server`?e.url.trim():``,e.model.trim(),e.kind===`server`?e.key:`none`,e.kind===`server`?e.keyInput:null])}function Kh(e,t){return e!==void 0&&e===Gh(t)}function qh(e,t){let n=t.kind===`server`&&!Rh(t.url);return{count:e.toLocaleString(`en-US`),risks:[...n?[`The hosted server is called once for each memory, which may cost money.`]:[],`Search results are poor until the re-embed ends.`,`Restart open OpenCode and Pi sessions after the change.`]}}var Jh=`Xenova/nomic-embed-text-v1`;function Yh(e,t=Jh){return e===`builtin`?{kind:e,model:t}:{kind:e}}function Xh(e,t){return e===`server`&&t?`saved`:`none`}function Zh({current:e,keySet:t}){let n=oh();return(0,U.jsxs)(`dl`,{className:`grid grid-cols-[auto_1fr] gap-x-3 gap-y-1 text-sm`,children:[(0,U.jsx)(`dt`,{children:n(`Kind`)}),(0,U.jsx)(`dd`,{children:n(e.kind===`server`?`OpenAI-compatible server`:`Built-in model`)}),e.url&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`dt`,{children:n(`Server URL`)}),(0,U.jsx)(`dd`,{className:`break-all`,children:e.url})]}),(0,U.jsx)(`dt`,{children:n(`Model`)}),(0,U.jsx)(`dd`,{className:`break-all`,children:e.model}),(0,U.jsx)(`dt`,{children:n(`Vector size`)}),(0,U.jsx)(`dd`,{children:e.dimensions}),(0,U.jsx)(`dt`,{children:n(`API key`)}),(0,U.jsx)(`dd`,{children:n(t?`set`:`not set`)}),(0,U.jsx)(`dt`,{children:n(`Stored memories`)}),(0,U.jsx)(`dd`,{children:e.memoryCount.toLocaleString(`en-US`)})]})}function Qh({run:e,onRetry:t}){let n=oh();return e.state===`idle`?null:(0,U.jsxs)(`div`,{role:`status`,className:`space-y-1 text-sm`,children:[e.state===`running`&&(0,U.jsxs)(`p`,{children:[n(`Re-embedding`),`: `,e.progress.processed,`/`,e.progress.total]}),e.state===`done`&&(0,U.jsx)(`p`,{children:n(`Re-embed finished.`)}),e.state===`failed`&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`p`,{className:`text-red-600`,children:[n(`Re-embed failed`),`: `,e.error??``]}),(0,U.jsx)(`button`,{type:`button`,className:`rounded border border-border px-3 py-1.5`,onClick:t,children:n(`Retry`)})]})]})}function $h(e,t){return{kind:e.kind,url:e.url??``,model:e.model,key:Xh(e.kind,t),keyInput:{name:``,path:``,value:``}}}function eg(){let e=oh(),[t,n]=(0,_.useState)(),[r,i]=(0,_.useState)(),[a,o]=(0,_.useState)(!1),[s,c]=(0,_.useState)(!1),[l,u]=(0,_.useState)(),[d,f]=(0,_.useState)(),[p,m]=(0,_.useState)({state:`idle`,progress:{processed:0,total:0}}),[h,g]=(0,_.useState)(``),[v,y]=(0,_.useState)(!1);async function b(){let e=await $(`/api/settings/embedding`);return n(e),m(e.run),e}(0,_.useEffect)(()=>{let e=!0,t=Qm();b().catch(t=>e&&g(t.message)),$(`/api/settings`).then(n=>e&&t.isCurrent()&&i(n)).catch(()=>{}),$(`/api/web/status`).then(t=>e&&o(!!t.isLocal)).catch(()=>{});let n=eh(t=>e&&i(t));return()=>{e=!1,n()}},[]),(0,_.useEffect)(()=>{if(p.state!==`running`)return;let e=setInterval(()=>{$(`/api/settings/embedding/run`).then(e=>{m(e),e.state!==`running`&&b()}).catch(()=>{})},1e3);return()=>clearInterval(e)},[p.state]);function x(){if(s||!t){c(!1),u(void 0),f(void 0);return}u($h(t,!!r?.secrets.embeddingApiKey?.set)),c(!0)}let S=e=>u(t=>t&&{...t,...e});async function C(){l&&await rh(y,async()=>{try{let t=await $(`/api/settings/embedding/test`,{method:`POST`,body:JSON.stringify(Wh(l))});t.ok&&t.dimensions?(f({key:Gh(l),dimensions:t.dimensions}),g(`${e(`Test passed. Vector size`)}: ${t.dimensions}`)):(f(void 0),g(`${e(`Test failed`)}: ${t.reason??``}`))}catch(t){g(e(t.message))}})}async function w(){if(!l||!t||!r)return;let{count:n,risks:i}=qh(t.memoryCount,l),a=[`${e(`Every stored memory will be re-embedded`)}: ${n}`,...i.map(t=>e(t))].join(`
123
123
  `);window.confirm(a)&&await rh(y,async()=>{try{let e=await $(`/api/settings/embedding/apply`,{method:`POST`,body:JSON.stringify({candidate:Wh(l),revision:r.revision})});m(e),c(!1),u(void 0),f(void 0),g(``)}catch(e){g(e.message)}await $m()})}async function T(){try{m(await $(`/api/settings/embedding/run`,{method:`POST`,body:`{}`}))}catch(e){g(e.message)}}let E=!!r?.secrets.embeddingApiKey?.set;return(0,U.jsxs)(`section`,{className:`space-y-3 rounded-xl border border-border bg-card p-4`,"aria-label":e(`Embedding`),children:[(0,U.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,U.jsx)(`h2`,{className:`text-section-title font-semibold`,children:e(`Embedding`)}),a&&(0,U.jsx)(`button`,{type:`button`,"aria-label":e(s?`Lock`:`Unlock to change`),title:e(s?`Lock`:`Unlock to change`),className:`rounded border border-border px-2 py-1`,disabled:!t||p.state===`running`,onClick:x,children:s?`🔓`:`🔒`})]}),(0,U.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:e(`The model that turns memory text into search vectors. A change re-embeds every memory.`)}),t&&!s&&(0,U.jsx)(Zh,{current:t,keySet:E}),s&&l&&(0,U.jsxs)(`div`,{className:`space-y-2 text-sm`,children:[[`builtin`,`server`].map(n=>(0,U.jsxs)(`label`,{className:`flex items-center gap-2`,children:[(0,U.jsx)(`input`,{type:`radio`,name:`omms-embedding-kind`,checked:l.kind===n,onChange:()=>S(Yh(n,t?.kind===`builtin`?t.model:`Xenova/nomic-embed-text-v1`))}),e(n===`server`?`OpenAI-compatible server`:`Built-in model`)]},n)),l.kind===`server`&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`label`,{className:`block`,children:[e(`Preset`),(0,U.jsx)(dn,{"aria-label":e(`Preset`),className:`mt-1 block w-full rounded border border-border bg-background p-2`,value:Hh.find(e=>e.url===l.url)?.id??`custom`,onChange:e=>S({url:Uh(e.target.value,l.url)}),children:Hh.map(t=>(0,U.jsx)(`option`,{value:t.id,children:t.id===`custom`?e(`Custom`):t.label},t.id))})]}),(0,U.jsxs)(`label`,{className:`block`,children:[e(`Server URL`),(0,U.jsx)(`input`,{className:`mt-1 block w-full rounded border border-border bg-background p-2`,value:l.url,onChange:e=>S({url:e.target.value})})]})]}),(0,U.jsxs)(`label`,{className:`block`,children:[e(`Model`),(0,U.jsx)(`input`,{className:`mt-1 block w-full rounded border border-border bg-background p-2`,placeholder:l.kind===`server`?`nomic-embed-text`:`Xenova/nomic-embed-text-v1`,value:l.model,onChange:e=>S({model:e.target.value})})]}),l.kind===`server`&&(0,U.jsxs)(`fieldset`,{className:`space-y-2 rounded-lg border border-border p-3`,children:[(0,U.jsx)(`legend`,{className:`px-1 font-medium`,children:e(`API key`)}),[[`none`,`No key`],...E?[[`saved`,`Keep the saved key`]]:[],[`env`,`Environment variable`],[`file`,`Key file`],[`paste`,`Save key to a private file`]].map(([t,n])=>(0,U.jsxs)(`label`,{className:`flex items-center gap-2`,children:[(0,U.jsx)(`input`,{type:`radio`,name:`omms-embedding-key`,checked:l.key===t,onChange:()=>S({key:t})}),e(n)]},t)),l.key===`env`&&(0,U.jsx)(`input`,{"aria-label":e(`Variable name`),className:`w-full rounded border border-border bg-background p-2`,placeholder:`OPENROUTER_API_KEY`,value:l.keyInput.name,onChange:e=>S({keyInput:{...l.keyInput,name:e.target.value}})}),l.key===`file`&&(0,U.jsx)(`input`,{"aria-label":e(`Key file path`),className:`w-full rounded border border-border bg-background p-2`,value:l.keyInput.path,onChange:e=>S({keyInput:{...l.keyInput,path:e.target.value}})}),l.key===`paste`&&(0,U.jsx)(`input`,{"aria-label":e(`API key`),type:`password`,autoComplete:`off`,className:`w-full rounded border border-border bg-background p-2`,value:l.keyInput.value,onChange:e=>S({keyInput:{...l.keyInput,value:e.target.value}})})]}),(0,U.jsxs)(`div`,{className:`flex gap-2`,children:[(0,U.jsx)(`button`,{type:`button`,className:`rounded border border-border px-3 py-1.5`,disabled:v||!l.model.trim(),onClick:()=>void C(),children:e(`Test`)}),(0,U.jsx)(`button`,{type:`button`,className:`rounded border border-border px-3 py-1.5`,disabled:v||!Kh(d?.key,l),onClick:()=>void w(),children:e(`Apply`)}),(0,U.jsx)(`button`,{type:`button`,className:`rounded border border-border px-3 py-1.5`,onClick:x,children:e(`Cancel`)})]})]}),(0,U.jsx)(Qh,{run:p,onRetry:()=>void T()}),h&&(0,U.jsx)(`p`,{className:`text-sm`,children:h})]})}async function tg(e,t){return e()?(await t(),!0):!1}var ng=[[`7`,`7 days`],[`30`,`30 days`],[`90`,`90 days`],[`never`,`Never`]];function rg({tokens:e,newValue:t,busy:n,onGenerate:r,onRevoke:i}){let a=oh(),[o,s]=(0,_.useState)(``),[c,l]=(0,_.useState)(`30`),u=e=>e===null?a(`Never`):new Date(e).toLocaleDateString();return(0,U.jsxs)(`div`,{className:`space-y-2`,children:[(0,U.jsxs)(`table`,{className:`w-full text-left text-xs`,children:[(0,U.jsx)(`thead`,{children:(0,U.jsxs)(`tr`,{children:[(0,U.jsx)(`th`,{children:a(`Name`)}),(0,U.jsx)(`th`,{children:a(`Created`)}),(0,U.jsx)(`th`,{children:a(`Expires`)}),(0,U.jsx)(`th`,{children:a(`Last used`)}),(0,U.jsx)(`th`,{})]})}),(0,U.jsx)(`tbody`,{children:e.map(e=>(0,U.jsxs)(`tr`,{children:[(0,U.jsx)(`td`,{children:e.name}),(0,U.jsx)(`td`,{children:u(e.createdAt)}),(0,U.jsx)(`td`,{children:u(e.expiresAt)}),(0,U.jsx)(`td`,{children:e.lastUsedAt===null?`-`:u(e.lastUsedAt)}),(0,U.jsx)(`td`,{children:(0,U.jsx)(`button`,{type:`button`,className:`rounded border border-border px-2 py-0.5`,disabled:n,onClick:()=>i(e),children:a(`Revoke`)})})]},e.id))})]}),t&&(0,U.jsxs)(`div`,{role:`status`,className:`space-y-1 rounded border border-border p-2 text-xs`,children:[(0,U.jsx)(`code`,{className:`block break-all`,children:t}),(0,U.jsx)(`button`,{type:`button`,className:`rounded border border-border px-2 py-0.5`,onClick:()=>void navigator.clipboard?.writeText(t),children:a(`Copy`)}),(0,U.jsx)(`p`,{className:`text-amber-600`,children:a(`Copy this token now. It will not be shown again.`)})]}),(0,U.jsxs)(`div`,{className:`flex flex-wrap items-end gap-2 text-sm`,children:[(0,U.jsxs)(`label`,{className:`block`,children:[a(`Token name`),(0,U.jsx)(`input`,{className:`mt-1 block rounded border border-border bg-background p-1.5`,placeholder:`ci`,value:o,onChange:e=>s(e.target.value)})]}),(0,U.jsxs)(`label`,{className:`block`,children:[a(`Expires after`),(0,U.jsx)(dn,{"aria-label":a(`Expires after`),className:`mt-1 block rounded border border-border bg-background p-1.5`,value:c,onChange:e=>l(e.target.value),children:ng.map(([e,t])=>(0,U.jsx)(`option`,{value:e,children:a(t)},e))})]}),(0,U.jsx)(`button`,{type:`button`,className:`rounded border border-border px-3 py-1.5`,disabled:n||!o.trim(),onClick:()=>r(o.trim(),c===`never`?null:Number(c)),children:a(`Generate token`)})]})]})}function ig(e){return{secrets:e.secrets??{},externalUsed:e.effective?.opencode?.mode===`manual`||e.effective?.pi?.kind===`manual`,claudeCodeInUse:!!(e.claudeCodeEvidence?.attempts||e.claudeCodeEvidence?.folderSet),access:e.access??{host:`127.0.0.1`,authEnabled:!1,tokenAvailable:!1,embeddingApiUrl:null}}}var ag=[{id:`memoryApiKey`,label:`External API key`,purpose:`Capture and profile learning through the external API. Claude Code always uses it.`,hosts:`OpenCode, Pi, Claude Code`,where:`External API card`},{id:`embeddingApiKey`,label:`Embedding server key`,purpose:`Sent to an embedding server on another machine.`,hosts:`OpenCode, Pi, Claude Code`,where:`Embedding card`},{id:`apiTokens`,label:`API tokens`,purpose:`Let scripts and other computers call the web app's API.`,hosts:`Web app`,where:`Table below`},{id:`webPassword`,label:`Browser password`,purpose:`Asks for a user name and password before the page opens.`,hosts:`Web app`,where:`Form below`}];function og({state:e}){let t=oh();return e===`set`?(0,U.jsxs)(`span`,{children:[`✅ `,t(`set`)]}):e===`missing`?(0,U.jsxs)(`span`,{className:`text-red-600`,children:[`⛔️ `,t(`missing`)]}):e===`never-used`?(0,U.jsx)(`span`,{className:`text-muted-foreground`,children:t(`never used before`)}):(0,U.jsx)(`span`,{className:`text-muted-foreground`,children:t(`not needed`)})}function sg({states:e}){let t=oh();return(0,U.jsx)(`div`,{className:Dh,children:(0,U.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,U.jsx)(`caption`,{className:H(Oh,`sr-only`),children:t(`Keys and access`)}),(0,U.jsx)(`thead`,{className:kh,children:(0,U.jsxs)(`tr`,{children:[(0,U.jsx)(`th`,{className:Ah,children:t(`Credential`)}),(0,U.jsx)(`th`,{className:Ah,children:t(`State`)}),(0,U.jsx)(`th`,{className:Ah,children:t(`Used for`)}),(0,U.jsx)(`th`,{className:Ah,children:t(`Hosts`)}),(0,U.jsx)(`th`,{className:Ah,children:t(`Change it in`)})]})}),(0,U.jsx)(`tbody`,{children:ag.map(n=>(0,U.jsxs)(`tr`,{className:H(jh,`align-top`),children:[(0,U.jsx)(`td`,{className:H(Mh,`font-medium`),children:t(n.label)}),(0,U.jsx)(`td`,{className:H(Mh,`whitespace-nowrap`),children:(0,U.jsx)(og,{state:e[n.id]})}),(0,U.jsx)(`td`,{className:Mh,children:t(n.purpose)}),(0,U.jsx)(`td`,{className:Mh,children:n.hosts===`Web app`?t(`Web app`):n.hosts}),(0,U.jsx)(`td`,{className:Mh,children:t(n.where)})]},n.id))})]})})}function cg({value:e,onChange:t}){let n=oh();return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`label`,{className:`block`,children:[(0,U.jsx)(`span`,{children:n(`User name`)}),(0,U.jsx)(`input`,{className:`mt-1 block w-full rounded border border-border bg-background p-2`,autoComplete:`username`,value:e.username,onChange:n=>t({...e,username:n.target.value})})]}),(0,U.jsxs)(`label`,{className:`block`,children:[(0,U.jsx)(`span`,{children:n(`Password`)}),(0,U.jsx)(`input`,{type:`password`,autoComplete:`new-password`,className:`mt-1 block w-full rounded border border-border bg-background p-2`,value:e.value,onChange:n=>t({...e,value:n.target.value})})]})]})}function lg(){let e=oh(),[t,n]=(0,_.useState)(),[r,i]=(0,_.useState)(!1),[a,o]=(0,_.useState)([]),[s,c]=(0,_.useState)(),[l,u]=(0,_.useState)({username:``,value:``}),[d,f]=(0,_.useState)(``),[p,m]=(0,_.useState)(!1);async function h(){let e=await $(`/api/settings/tokens`);o(e.tokens)}(0,_.useEffect)(()=>{let e=!0,t=Qm();$(`/api/settings`).then(r=>{e&&t.isCurrent()&&n(r)}).catch(t=>{e&&f(t.message)}),$(`/api/web/status`).then(async t=>{!e||!t.isLocal||(i(!0),await h())}).catch(()=>{});let r=eh(t=>{e&&n(t)});return()=>{e=!1,r()}},[]);async function g(e){await rh(m,async()=>{try{await e()}catch(e){f(e.message)}await $m()}).catch(()=>{})}let v=(e,t)=>g(async()=>{let n=await $(`/api/settings/tokens`,{method:`POST`,body:JSON.stringify({name:e,expiresInDays:t})});c(n.value),f(``),await h()}),y=t=>g(async()=>{c(void 0),await tg(()=>window.confirm(e(`Revoke this token? Scripts that use it stop working.`)),async()=>{await $(`/api/settings/tokens/${t.id}`,{method:`DELETE`}),await h()})}),b=n=>g(async()=>{t&&(await $(`/api/settings/web-password`,{method:`POST`,body:JSON.stringify(n?{clear:!0,revision:t.revision}:{password:l.value,username:l.username,revision:t.revision})}),u({username:``,value:``}),f(e(Vh(n))))}),x=t?.access;return(0,U.jsxs)(`section`,{className:`space-y-3 rounded-xl border border-border bg-card p-4`,"aria-label":e(`Keys and access`),children:[(0,U.jsx)(`h2`,{className:`text-section-title font-semibold`,children:e(`Keys and access`)}),t&&(0,U.jsx)(sg,{states:Bh(ig(t))}),x?.configTokenIgnored&&(0,U.jsx)(`p`,{className:`text-xs text-amber-600`,children:e(`The config file still sets webServerApiToken. OMMS imported it once as the token “from config file” and no longer reads the key. Use the token table instead.`)}),r?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`fieldset`,{className:`space-y-2 rounded-lg border border-border p-3 text-sm`,children:[(0,U.jsx)(`legend`,{className:`px-1 font-medium`,children:e(`API tokens`)}),(0,U.jsx)(rg,{tokens:a,newValue:s,busy:p,onGenerate:(e,t)=>void v(e,t),onRevoke:e=>void y(e)})]}),(0,U.jsxs)(`fieldset`,{className:`space-y-2 rounded-lg border border-border p-3 text-sm`,children:[(0,U.jsx)(`legend`,{className:`px-1 font-medium`,children:e(`Browser password`)}),(0,U.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:x?.authEnabled?x.authUsername?`${e(`A browser password is set for user`)} ${x.authUsername}.`:e(`A browser password is set for your computer user name.`):e(`No browser password is set.`)}),(0,U.jsx)(cg,{value:l,onChange:u}),(0,U.jsxs)(`div`,{className:`flex gap-2`,children:[(0,U.jsx)(`button`,{type:`button`,className:`rounded border border-border px-3 py-1.5`,disabled:p||!t||!l.value,onClick:()=>void b(!1),children:e(`Save password`)}),(0,U.jsx)(`button`,{type:`button`,className:`rounded border border-border px-3 py-1.5`,disabled:p||!t||!x?.authEnabled,onClick:()=>void b(!0),children:e(`Clear password`)})]})]})]}):(0,U.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:e(`Open this page on the computer that runs OMMS to manage tokens and the password.`)}),d&&(0,U.jsx)(`p`,{role:`status`,className:`text-sm`,children:d})]})}function ug({preview:e,job:t,busy:n,onStart:r,onPause:i}){let a=oh(),o=t.state===`running`;return(0,U.jsxs)(`div`,{className:`space-y-2 text-sm`,children:[(0,U.jsxs)(`p`,{children:[a(`Prompts waiting for profile learning`),`: `,e.waiting,` · `,a(`Model calls`),`:`,` `,e.calls]}),t.state!==`idle`&&(0,U.jsxs)(`p`,{role:`status`,children:[a(`Batches done`),`: `,t.batchesBuilt,` · `,a(`Prompts waiting`),`: `,t.remaining,t.state===`paused`&&` · ${a(`Paused`)}`,t.state===`done`&&` · ${a(`Finished`)}`]}),t.state===`superseded`&&(0,U.jsx)(`p`,{children:a(`A newer catch-up run took over.`)}),t.state===`failed`&&(0,U.jsxs)(`p`,{className:`text-red-600`,children:[a(`Stopped`),`: `,t.reason??`error`]}),o?(0,U.jsx)(`button`,{type:`button`,className:`rounded border border-border px-3 py-1.5`,onClick:i,children:a(`Pause`)}):(0,U.jsx)(`button`,{type:`button`,className:`rounded border border-border px-3 py-1.5`,disabled:n||e.waiting===0,onClick:r,children:a(t.state===`idle`||t.state===`done`?`Catch up profile`:`Resume`)})]})}function dg(){let e=oh(),[t,n]=(0,_.useState)(),[r,i]=(0,_.useState)({state:`idle`,batchesBuilt:0,remaining:0}),[a,o]=(0,_.useState)(!1),[s,c]=(0,_.useState)(!1),[l,u]=(0,_.useState)(``);async function d(){let e=await $(`/api/settings/profile/catch-up`);n(e.preview),i(e.job)}(0,_.useEffect)(()=>{d().catch(e=>u(e.message)),$(`/api/web/status`).then(e=>o(!!e.isLocal)).catch(()=>{})},[]),(0,_.useEffect)(()=>{if(r.state!==`running`)return;let e=setInterval(()=>void d().catch(()=>{}),2e3);return()=>clearInterval(e)},[r.state]);async function f(){if(!t)return;let n=r.state!==`idle`&&r.state!==`done`;if(window.confirm(`${e(`Start profile learning for the waiting prompts? Model calls`)}: ${t.calls}`)){c(!0);try{i(await $(`/api/settings/profile/catch-up/${n?`resume`:`start`}`,{method:`POST`,body:`{}`})),u(``)}catch(e){u(e.message)}c(!1)}}async function p(){try{i(await $(`/api/settings/profile/catch-up/pause`,{method:`POST`,body:`{}`}))}catch(e){u(e.message)}}return(0,U.jsxs)(`section`,{className:`space-y-3 rounded-xl border border-border bg-card p-4`,"aria-label":e(`Profile learning`),children:[(0,U.jsx)(`h2`,{className:`text-section-title font-semibold`,children:e(`Profile learning`)}),(0,U.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:e(`Catch up analyses every waiting prompt with the saved external API, 50 prompts for each model call.`)}),t&&(a?(0,U.jsx)(ug,{preview:t,job:r,busy:s,onStart:()=>void f(),onPause:()=>void p()}):(0,U.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:e(`Open this page on the computer that runs OMMS to start a catch-up run.`)})),l&&(0,U.jsx)(`p`,{role:`alert`,children:l})]})}function fg(){let e=oh(),[t,n]=(0,_.useState)([]),[r,i]=(0,_.useState)({}),[a,o]=(0,_.useState)(!1),[s,c]=(0,_.useState)(``);async function l(){let e=await $(`/api/settings/profiles`);n(e.profiles)}if((0,_.useEffect)(()=>{l().catch(e=>c(e.message))},[]),t.length<2)return null;let u=t=>rh(o,async()=>{if(window.confirm(`${e(`Use this profile for every folder?`)} ${t.userId}`))try{let n=await $m();await $(`/api/settings/profiles/use`,{method:`POST`,body:JSON.stringify({userId:t.userId,revision:n?.revision})}),await $m(),await l(),c(e(`Saved. OMMS now uses this profile in every folder.`))}catch(e){c(e.message)}}),d=n=>rh(o,async()=>{let i=t.find(e=>e.id===(r[n.id]??t.find(e=>e.id!==n.id)?.id));if(i&&window.confirm(`${e(`Merge this profile into the other one? The source profile is turned off, not deleted.`)}\n${n.userId} → ${i.userId}`))try{await $(`/api/settings/profiles/merge`,{method:`POST`,body:JSON.stringify({sourceId:n.id,targetId:i.id})}),await l(),c(e(`Merged.`))}catch(e){c(e.message)}});return(0,U.jsxs)(`section`,{className:`space-y-3 rounded-xl border border-border bg-card p-4`,"aria-label":e(`Profiles`),children:[(0,U.jsx)(`h2`,{className:`text-section-title font-semibold`,children:e(`Profiles`)}),(0,U.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:e(`OMMS keeps one profile for each git email. A folder whose repository has its own email starts a second profile. Choose the profile that is yours, or merge the extra one into it.`)}),(0,U.jsx)(`div`,{className:Dh,children:(0,U.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,U.jsx)(`caption`,{className:H(Oh,`sr-only`),children:e(`Profiles`)}),(0,U.jsx)(`thead`,{className:kh,children:(0,U.jsxs)(`tr`,{children:[(0,U.jsx)(`th`,{className:Ah,children:e(`Email`)}),(0,U.jsx)(`th`,{className:Ah,children:e(`Preferences`)}),(0,U.jsx)(`th`,{className:Ah,children:e(`Patterns`)}),(0,U.jsx)(`th`,{className:Ah,children:e(`Workflows`)}),(0,U.jsx)(`th`,{className:Ah,children:e(`Prompts analysed`)}),(0,U.jsx)(`th`,{className:Ah,children:e(`Last update`)}),(0,U.jsx)(`th`,{className:Ah,children:e(`Actions`)})]})}),(0,U.jsx)(`tbody`,{children:t.map(n=>(0,U.jsxs)(`tr`,{className:jh,children:[(0,U.jsxs)(`td`,{className:H(Mh,`font-medium`),children:[n.userId,n.inUse&&(0,U.jsxs)(`span`,{className:`ms-2 text-xs text-green-700`,children:[`✅ `,e(`in use`)]})]}),(0,U.jsx)(`td`,{className:Mh,children:n.preferences}),(0,U.jsx)(`td`,{className:Mh,children:n.patterns}),(0,U.jsx)(`td`,{className:Mh,children:n.workflows}),(0,U.jsx)(`td`,{className:Mh,children:n.totalPromptsAnalyzed}),(0,U.jsx)(`td`,{className:Mh,children:new Date(n.lastAnalyzedAt).toLocaleString()}),(0,U.jsxs)(`td`,{className:H(Mh,`space-y-1`),children:[!n.inUse&&(0,U.jsx)(`button`,{type:`button`,className:`rounded border border-border px-2 py-1`,disabled:a,onClick:()=>void u(n),children:e(`Use this profile`)}),(0,U.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,U.jsx)(`label`,{className:`sr-only`,htmlFor:`merge-${n.id}`,children:e(`Merge into`)}),(0,U.jsx)(`select`,{id:`merge-${n.id}`,className:`rounded border border-border bg-background px-1 py-1 text-xs`,value:r[n.id]??``,onChange:e=>i(t=>({...t,[n.id]:e.target.value})),children:t.filter(e=>e.id!==n.id).map(e=>(0,U.jsx)(`option`,{value:e.id,children:e.userId},e.id))}),(0,U.jsx)(`button`,{type:`button`,className:`rounded border border-border px-2 py-1`,disabled:a,onClick:()=>void d(n),children:e(`Merge into`)})]})]})]},n.id))})]})}),s&&(0,U.jsx)(`p`,{role:`status`,className:`text-sm`,children:s})]})}function pg(e,t){return t?t.target:e.suggestion?.kind===`map`?e.suggestion.target:``}function mg(e,t){let n=new Map,r=new Map,i=[];for(let a of e){let e=t[a.directory],o=pg(a,e).trim();if(a.directory!==``&&o){let t=e||a.suggestion?.kind!==`map`?`exact`:a.suggestion.confidence,r=(n.get(a.directory)?.sessions??0)+a.sessions;n.set(a.directory,{from:a.directory,to:o,sessions:r,confidence:t})}else if(a.directory!==``&&!e&&a.suggestion?.kind===`ignore`){let e=(r.get(a.directory)?.sessions??0)+a.sessions;r.set(a.directory,{directory:a.directory,sessions:e,reason:a.suggestion.reason})}else i.push({...a})}return{maps:[...n.values()],ignores:[...r.values()],unmapped:i}}function hg(e){return new Set([...e.maps.filter(e=>e.confidence!==`guess`).map(e=>e.from),...e.ignores.map(e=>e.directory)])}function gg(e,t,n,r){let i={},a=n.maps.filter(e=>r.has(e.from));if(a.length){let t=new Map(e.map(e=>[e.from,{...e}]));for(let e of a)t.set(e.from,{from:e.from,to:e.to});i.importPathMaps=[...t.values()]}let o=n.ignores.filter(e=>r.has(e.directory));return o.length&&(i.importIgnoredDirectories=[...new Set([...t,...o.map(e=>e.directory)])]),i}function _g(e){let t=new Map;for(let n of e)t.set(n.to,[...t.get(n.to)??[],n]);return[...t].map(([e,t])=>({target:e,maps:t.sort((e,t)=>e.from.localeCompare(t.from))})).sort((e,t)=>t.maps.length-e.maps.length||e.target.localeCompare(t.target))}function vg(e,t){return e(t===`exact`?`Exact`:t===`name`?`Name match`:`Guess`)}function yg(e,t){return e(t===`temporary`?`Temporary folder`:t===`node_modules`?`node_modules folder`:t===`app-data`?`App data folder`:`Skills folder`)}function bg({host:e,rows:t,decisions:n,busy:r,onDecide:i,onResolve:a,onIgnore:o}){let s=oh(),c=t.filter(e=>e.directory!==``),l=c.filter(e=>pg(e,n[e.directory]).trim()).length;return(0,U.jsxs)(`details`,{className:`min-w-0 rounded-lg border border-border p-3`,children:[(0,U.jsxs)(`summary`,{id:`directory-maps-${e}`,className:`scroll-mt-20 cursor-pointer rounded font-medium focus-visible:outline-2 focus-visible:outline-ring`,children:[(0,U.jsxs)(`h3`,{className:`inline text-subsection-title font-semibold`,children:[ph(e),`: `,s(`Unresolved directories`)]}),(0,U.jsxs)(`span`,{className:`mt-1 block text-xs font-normal text-muted-foreground`,children:[s(`Directories`),`: `,c.length,` · `,s(`Unresolved sessions`),`:`,` `,t.reduce((e,t)=>e+t.sessions,0),` · `,s(`Rows with a target`),`:`,` `,l]})]}),(0,U.jsxs)(`div`,{className:`mt-3 space-y-2`,children:[t.length===0?(0,U.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:s(`No unresolved directories in the latest run.`)}):(0,U.jsxs)(`div`,{className:`space-y-2`,children:[(0,U.jsx)(`div`,{className:`[&_button]:h-auto [&_button]:min-h-8 [&_button]:whitespace-normal [&_button]:py-1.5`,children:(0,U.jsx)(K,{type:`button`,variant:`outline`,size:`sm`,disabled:r||c.length===0,onClick:a,children:s(`Smart resolve directories`)})}),(0,U.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:s(`Smart resolve shows each proposed map and ignore in a dialog. Tick the ones to keep, then press Confirm. Nothing is saved before that.`)})]}),t.map(e=>{if(e.directory===``)return(0,U.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[s(`No directory recorded`),` ·`,` `,e.sessions===1?s(`1 session`):`${e.sessions} ${s(`sessions`)}`,` ·`,` `,s(`These sessions cannot be mapped.`)]},`no-directory`);let t=n[e.directory],a=pg(e,t),c=!t&&e.suggestion?.kind===`ignore`?e.suggestion:null;return(0,U.jsxs)(`div`,{className:`flex min-w-0 items-start gap-2 border-t border-border pt-2 text-sm`,children:[(0,U.jsxs)(`details`,{className:`min-w-0 flex-1`,children:[(0,U.jsxs)(`summary`,{className:`cursor-pointer rounded focus-visible:outline-2 focus-visible:outline-ring`,children:[(0,U.jsx)(`code`,{dir:`ltr`,className:`break-all`,children:e.directory}),` `,`· `,e.sessions===1?s(`1 session`):`${e.sessions} ${s(`sessions`)}`,(0,U.jsx)(`span`,{className:`mt-1 block text-xs text-muted-foreground`,children:c?(0,U.jsxs)(U.Fragment,{children:[s(`Suggested to ignore`),`: `,yg(s,c.reason)]}):(0,U.jsxs)(U.Fragment,{children:[s(`Target directory`),`:`,` `,a?(0,U.jsx)(`code`,{dir:`ltr`,className:`break-all`,children:a}):s(`No target chosen`)]})})]}),(0,U.jsxs)(`div`,{className:`mt-2 space-y-2`,children:[!e.suggestion&&(0,U.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:s(`No suggestion found.`)}),(0,U.jsx)(Lm,{"aria-label":`${e.directory} ${s(`Target directory`)}`,dir:`ltr`,placeholder:s(`Target directory`),value:a,disabled:r,onChange:t=>i(e,t.target.value)})]})]}),(0,U.jsx)(K,{type:`button`,variant:`outline`,size:`sm`,className:`shrink-0`,"aria-label":`${s(`Ignore`)} ${e.directory}`,disabled:r,onClick:()=>o(e),children:s(`Ignore`)})]},e.directory)})]})]})}function xg({host:e,review:t,busy:n,canConfirm:r,onRefresh:i,error:a,onClose:o,onConfirm:s}){let c=oh(),[l,u]=(0,_.useState)(()=>({review:t,ticked:hg(t)})),d=l.review===t?l.ticked:hg(t),f=(e,n)=>u(r=>{let i=new Set(r.review===t?r.ticked:hg(t));return n?i.add(e):i.delete(e),{review:t,ticked:i}}),p=[...t.maps.map(e=>e.from),...t.ignores.map(e=>e.directory)],m=p.filter(e=>d.has(e)).length,h=e=>(0,U.jsxs)(`div`,{className:`text-xs text-muted-foreground`,children:[c(`Sessions`),`: `,e]});return(0,U.jsx)(Fs,{open:!0,onOpenChange:e=>{!e&&!n&&o()},children:(0,U.jsxs)(Rs,{className:`sm:max-w-2xl flex flex-col overflow-hidden`,showCloseButton:!n,onEscapeKeyDown:e=>{n&&e.preventDefault()},onInteractOutside:e=>{n&&e.preventDefault()},children:[(0,U.jsxs)(zs,{children:[(0,U.jsxs)(Vs,{children:[c(`Review directory maps`),`: `,ph(e)]}),(0,U.jsx)(Hs,{children:c(`Tick the maps and ignores to keep, then press Confirm to save them. Saved maps apply to every host on the next import or backfill run.`)})]}),(0,U.jsxs)(`div`,{className:`min-h-0 overflow-y-auto space-y-4`,children:[(0,U.jsxs)(`p`,{className:`text-sm`,children:[c(`Proposed maps`),`: `,t.maps.length,` · `,c(`Suggested to ignore`),`:`,` `,t.ignores.length,` · `,c(`No target`),`: `,t.unmapped.length]}),!p.length&&(0,U.jsx)(`p`,{className:`text-sm`,children:c(`Nothing to save. Type a target in a row, or press Ignore for folders that are not projects.`)}),t.maps.length>0&&(0,U.jsxs)(`section`,{className:`space-y-2`,children:[(0,U.jsx)(`h3`,{className:`text-subsection-title font-semibold`,children:c(`Proposed maps`)}),(0,U.jsx)(`ul`,{className:`space-y-3`,children:t.maps.map(e=>(0,U.jsxs)(`li`,{className:`flex min-w-0 items-start gap-2 border-t border-border pt-2 text-sm`,children:[(0,U.jsx)(`input`,{type:`checkbox`,className:`mt-1 shrink-0`,"aria-label":`${c(`Save this map`)} ${e.from}`,checked:d.has(e.from),disabled:n,onChange:t=>f(e.from,t.target.checked)}),(0,U.jsxs)(`div`,{className:`min-w-0`,children:[(0,U.jsx)(`code`,{dir:`ltr`,className:`block break-all`,children:e.from}),(0,U.jsxs)(`div`,{className:`mt-1`,children:[c(`Target directory`),`:`,` `,(0,U.jsx)(`code`,{dir:`ltr`,className:`break-all`,children:e.to})]}),(0,U.jsxs)(`div`,{className:`text-xs`,children:[c(`Confidence`),`: `,vg(c,e.confidence)]}),h(e.sessions)]})]},e.from))})]}),t.ignores.length>0&&(0,U.jsxs)(`section`,{className:`space-y-2`,children:[(0,U.jsx)(`h3`,{className:`text-subsection-title font-semibold`,children:c(`Suggested to ignore`)}),(0,U.jsx)(`ul`,{className:`space-y-3`,children:t.ignores.map(e=>(0,U.jsxs)(`li`,{className:`flex min-w-0 items-start gap-2 border-t border-border pt-2 text-sm`,children:[(0,U.jsx)(`input`,{type:`checkbox`,className:`mt-1 shrink-0`,"aria-label":`${c(`Ignore`)} ${e.directory}`,checked:d.has(e.directory),disabled:n,onChange:t=>f(e.directory,t.target.checked)}),(0,U.jsxs)(`div`,{className:`min-w-0`,children:[(0,U.jsx)(`code`,{dir:`ltr`,className:`block break-all`,children:e.directory}),(0,U.jsx)(`div`,{className:`mt-1`,children:yg(c,e.reason)}),h(e.sessions)]})]},e.directory))})]}),t.unmapped.length>0&&(0,U.jsxs)(`section`,{className:`space-y-2`,children:[(0,U.jsx)(`h3`,{className:`text-subsection-title font-semibold`,children:c(`No target`)}),(0,U.jsx)(`ul`,{className:`space-y-3`,children:t.unmapped.map((e,t)=>(0,U.jsxs)(`li`,{className:`min-w-0 border-t border-border pt-2 text-sm`,children:[e.directory===``?c(`No directory recorded`):(0,U.jsx)(`code`,{dir:`ltr`,className:`block break-all`,children:e.directory}),(0,U.jsx)(`div`,{children:e.directory===``?c(`These sessions cannot be mapped.`):c(`No target chosen`)}),h(e.sessions)]},`${e.directory}-${t}`))})]})]}),a&&(0,U.jsx)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:a}),(0,U.jsxs)(Bs,{children:[(0,U.jsx)(K,{type:`button`,variant:`outline`,disabled:n,onClick:o,children:c(`Cancel`)}),!r&&(0,U.jsx)(K,{type:`button`,variant:`outline`,disabled:n,onClick:i,children:c(`Refresh list`)}),(0,U.jsx)(K,{type:`button`,disabled:n||!r||m===0,onClick:()=>s(new Set(p.filter(e=>d.has(e)))),children:c(n?`Saving…`:`Confirm`)})]})]})})}function Sg(){let e=oh(),[t,n]=(0,_.useState)(),[r,i]=(0,_.useState)(),[a,o]=(0,_.useState)(new Set),[s,c]=(0,_.useState)({}),[l,u]=(0,_.useState)(``),[d,f]=(0,_.useState)(!1),[p,m]=(0,_.useState)(),[h,g]=(0,_.useState)(``),[v,y]=(0,_.useState)(),b=(0,_.useRef)(!1),x=(0,_.useRef)(void 0),S=()=>$(`/api/settings/import-maps`).then(e=>{i(e),o(new Set),c({})}).catch(e=>u(e.message));(0,_.useEffect)(()=>{let e=!0;$(`/api/settings`).then(t=>{e&&(x.current=t.revision,n(t))}).catch(t=>{e&&u(t.message)}),S();let t=eh(t=>{if(!e)return;let r=t;n(r),r.revision!==x.current&&(x.current=r.revision,$(`/api/settings/import-maps`).then(t=>{e&&x.current===r.revision&&i(t)}).catch(()=>{}))});return()=>{e=!1,t()}},[]);function C(e,t){b.current||v||(g(``),m({host:e,review:mg(t,s)}))}function w(e,t){c(n=>({...n,[e.directory]:{directory:e.directory,target:t}}))}let T=()=>t?.settings?.importPathMaps?.globalValue??r?.saved??[],E=()=>r?.ignored??[];async function D(e,n,i){if(!t||!r||b.current||v)return!1;b.current=!0,f(!0);try{await $(`/api/settings`,{method:`PATCH`,body:JSON.stringify({edits:e,revision:t.revision})})}catch(e){let t=e instanceof Jm&&e.status===409;try{if(!t)return u(i),await $m(),!1;u(`Settings changed elsewhere. Check the list and try again.`);try{await k()}catch{y(`conflict`),u(`Settings changed elsewhere and could not be refreshed. Refresh the list, then try again.`)}return!1}finally{b.current=!1,f(!1)}}u(n);try{await k()}catch{y(`saved`),u(`Saved, but the list could not be refreshed. Refresh the list without saving again.`)}finally{b.current=!1,f(!1)}return!0}function O(){D({importPathMaps:dh(r?.saved??[],a)},`Saved. Removed maps stop applying at the next import or backfill run.`,`Removals could not be saved. Try again.`).then(e=>{e&&o(new Set)})}function ee(e){D({importIgnoredDirectories:[...new Set([...E(),e.directory])]},`Ignored. The directory stays unimported.`,`The directory could not be ignored. Try again.`)}function te(e){D({importIgnoredDirectories:E().filter(t=>t!==e)},`Restored. The directory shows again in each host list that reported it.`,`The directory could not be restored. Try again.`)}async function k(){let[e,t]=await Promise.all([$(`/api/settings`),$(`/api/settings/import-maps`)]);x.current=e.revision,Zm(e),i(t),y(void 0)}async function A(){if(b.current)return;b.current=!0,f(!0);let e=v===`saved`;try{await k(),e?u(`Saved. Maps apply to the next import or backfill run.`):p?g(`Settings changed elsewhere. Review these maps and confirm again.`):u(`Settings refreshed. No maps were saved.`)}catch{e?u(`Maps were saved, but the list could not be refreshed. Refresh the list without saving again.`):p?g(`Settings changed elsewhere and could not be refreshed. Refresh the list before confirming again.`):u(`Settings could not be refreshed. Try Refresh list again.`)}finally{b.current=!1,f(!1)}}async function ne(n){if(!t||!r||!p||b.current||v)return;let a=gg(T(),E(),p.review,n);if(!a.importPathMaps&&!a.importIgnoredDirectories)return;b.current=!0,f(!0),g(``);try{await $(`/api/settings`,{method:`PATCH`,body:JSON.stringify({edits:a,revision:t.revision})})}catch(e){let t=e instanceof Jm&&e.status===409;if(g(t?`Settings changed elsewhere. Review these maps and confirm again.`:`Maps could not be saved. Review the targets and confirm again.`),t)try{await k()}catch{y(`conflict`),g(`Settings changed elsewhere and could not be refreshed. Refresh the list before confirming again.`)}b.current=!1,f(!1);return}let s=new Set(n);c(e=>Object.fromEntries(Object.entries(e).filter(([e])=>!s.has(e)))),o(e=>new Set([...e].filter(e=>!s.has(e)))),i(e=>e&&{...e,saved:a.importPathMaps??e.saved,ignored:a.importIgnoredDirectories??e.ignored}),m(void 0);let l=p.review.maps.filter(e=>n.has(e.from)).length,d=p.review.ignores.filter(e=>n.has(e.directory)).length;u(`${e(`Saved maps`)}: ${l} · ${e(`Ignored directories`)}: ${d}. ${e(`They apply to the next import or backfill run. No sessions were imported.`)}`);try{await k()}catch{y(`saved`),u(`Maps were saved, but the list could not be refreshed. Refresh the list without saving again.`)}finally{b.current=!1,f(!1)}}return(0,U.jsxs)(`section`,{id:`directory-maps`,className:`space-y-3 rounded-xl border border-border bg-card p-4`,"aria-label":e(`Directory maps`),children:[(0,U.jsx)(`h2`,{className:`text-section-title font-semibold`,children:e(`Directory maps`)}),(0,U.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:e(`Map a directory that was moved or deleted to the project it belongs to. A change applies to the next import or backfill run.`)}),(0,U.jsxs)(`details`,{className:`min-w-0 rounded-lg border border-border p-3`,children:[(0,U.jsxs)(`summary`,{className:`cursor-pointer rounded font-medium focus-visible:outline-2 focus-visible:outline-ring`,children:[(0,U.jsx)(`h3`,{className:`inline text-subsection-title font-semibold`,children:e(`Saved maps`)}),` ·`,` `,r?.saved.length??0,(0,U.jsx)(`span`,{className:`mt-1 block text-xs font-normal text-muted-foreground`,children:e(`Saved maps apply to every host.`)})]}),(0,U.jsxs)(`div`,{className:`mt-3 space-y-2`,children:[(0,U.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e(`Keep a map after its sessions import. Every import checks the map before it skips a session, so removing a map makes its sessions unresolved again on the next run.`)}),(0,U.jsx)(K,{type:`button`,variant:`outline`,size:`sm`,disabled:d||!!v||!t||!r||a.size===0,onClick:O,children:e(`Save removals`)}),!r?.saved.length&&(0,U.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:e(`none`)}),_g(r?.saved??[]).map(t=>(0,U.jsxs)(`details`,{className:`min-w-0 border-t border-border pt-2`,children:[(0,U.jsxs)(`summary`,{className:`cursor-pointer rounded text-sm focus-visible:outline-2 focus-visible:outline-ring`,children:[(0,U.jsx)(`code`,{dir:`ltr`,className:`break-all`,children:t.target}),` `,`· `,t.maps.length]}),(0,U.jsx)(`ul`,{className:`mt-2 space-y-1 text-sm`,children:t.maps.map(t=>(0,U.jsxs)(`li`,{className:`flex min-w-0 items-start gap-2`,children:[(0,U.jsx)(`code`,{dir:`ltr`,className:`min-w-0 flex-1 break-all ${a.has(t.from)?`line-through`:``}`,children:t.from}),(0,U.jsx)(`button`,{type:`button`,className:`shrink-0 rounded border border-border px-2 py-0.5 text-xs`,"aria-label":`${a.has(t.from)?e(`Keep`):e(`Remove`)} ${t.from}`,disabled:d,onClick:()=>o(e=>{let n=new Set(e);return n.has(t.from)?n.delete(t.from):n.add(t.from),n}),children:a.has(t.from)?e(`Keep`):e(`Remove`)})]},t.from))})]},t.target))]})]}),(0,U.jsxs)(`details`,{className:`min-w-0 rounded-lg border border-border p-3`,children:[(0,U.jsxs)(`summary`,{className:`cursor-pointer rounded font-medium focus-visible:outline-2 focus-visible:outline-ring`,children:[(0,U.jsx)(`h3`,{className:`inline text-subsection-title font-semibold`,children:e(`Ignored directories`)}),` `,`· `,r?.ignored?.length??0,(0,U.jsx)(`span`,{className:`mt-1 block text-xs font-normal text-muted-foreground`,children:e(`Ignored directories stay unimported and leave the unresolved counts.`)})]}),(0,U.jsxs)(`ul`,{className:`mt-3 space-y-1 text-sm`,children:[!r?.ignored?.length&&(0,U.jsx)(`li`,{className:`text-muted-foreground`,children:e(`none`)}),r?.ignored?.map(n=>(0,U.jsxs)(`li`,{className:`flex min-w-0 items-start gap-2`,children:[(0,U.jsx)(`code`,{dir:`ltr`,className:`min-w-0 flex-1 break-all`,children:n}),(0,U.jsx)(`button`,{type:`button`,className:`shrink-0 rounded border border-border px-2 py-0.5 text-xs`,"aria-label":`${e(`Restore`)} ${n}`,disabled:d||!!v||!t,onClick:()=>te(n),children:e(`Restore`)})]},n))]})]}),[`pi`,`opencode`,`claude-code`].map(e=>{let n=r?.[e]??[];return(0,U.jsx)(bg,{host:e,rows:n,decisions:s,busy:d||!!v||!t||!r,onDecide:w,onResolve:()=>C(e,n),onIgnore:ee},e)}),p&&(0,U.jsx)(xg,{host:p.host,review:p.review,busy:d,canConfirm:!v,error:e(h),onRefresh:()=>void A(),onClose:()=>{b.current||m(void 0)},onConfirm:e=>void ne(e)}),v&&!p&&(0,U.jsx)(`button`,{type:`button`,className:`rounded border border-border px-3 py-1.5 text-sm`,disabled:d,onClick:()=>void A(),children:e(`Refresh list`)}),l&&(0,U.jsx)(`p`,{role:`status`,className:`text-sm`,children:e(l)})]})}var Cg=[`opencode`,`pi`,`claude-code`];function wg(e){return!e.provider&&!e.model?null:`${e.provider??``}/${e.model??``}`}function Tg(e){let t=new Map;for(let n of e){let e=t.get(n.host)??{host:n.host,total:0,saved:0,skipped:0,failed:0,models:[]};e.total+=n.total,e.saved+=n.saved,e.skipped+=n.skipped,e.failed+=n.failed;let r=wg(n),i=e.models.find(e=>e.label===r);i?(i.total+=n.total,i.saved+=n.saved,i.skipped+=n.skipped,i.failed+=n.failed):e.models.push({label:r,provider:n.provider,model:n.model,total:n.total,saved:n.saved,skipped:n.skipped,failed:n.failed}),t.set(n.host,e)}let n=e=>{let t=Cg.indexOf(e);return t<0?Cg.length:t};return[...t.values()].map(e=>({...e,models:e.models.sort((e,t)=>t.total-e.total)})).sort((e,t)=>n(e.host)-n(t.host))}function Eg(e,t){return t>0?Math.round(100*e/t):0}function Dg(e){let t=new Map;for(let n of e){let e=`${n.host}\u0000${n.reason}`,r=t.get(e)??{host:n.host,reason:n.reason,count:0};r.count+=n.count,t.set(e,r)}return[...t.values()].sort((e,t)=>t.count-e.count)}function Og({row:e}){return(0,U.jsxs)(U.Fragment,{children:[[e.saved,e.skipped,e.failed].map((t,n)=>(0,U.jsxs)(`td`,{className:H(Mh,`text-end tabular-nums`),children:[t,` `,(0,U.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[Eg(t,e.total),`%`]})]},n)),(0,U.jsx)(`td`,{className:H(Mh,`text-end font-medium tabular-nums`),children:e.total})]})}function kg(e,t){return`/api/settings/diagnostics?days=${e}${t===`all`?``:`&host=${t}`}`}function Ag(){let e=oh(),[t,n]=(0,_.useState)(7),[r,i]=(0,_.useState)(`all`),[a,o]=(0,_.useState)(()=>new Set),[s,c]=(0,_.useState)(),[l,u]=(0,_.useState)([]),[d,f]=(0,_.useState)(),[p,m]=(0,_.useState)(``),[h,g]=(0,_.useState)(``),[v,y]=(0,_.useState)(``),[b]=(0,_.useState)(nh),x=(0,_.useCallback)(async(e,t)=>{let n=Qm(),r=b.begin();try{let[i,a,o]=await Promise.all([$(kg(e,t)),$(`/api/settings/traces`),$(`/api/settings`)]);if(!r())return;c(i),u(a.traces),n.isCurrent()&&f(o),g(``)}catch(e){if(!r())return;g(e.message)}},[b]);(0,_.useEffect)(()=>{x(t,r)},[t,r,x]),(0,_.useEffect)(()=>eh(e=>f(e)),[]);async function S(n){if(!d)return;let i;try{await $(`/api/settings`,{method:`PATCH`,body:JSON.stringify({revision:d.revision,edits:n})})}catch(e){i=e}let a=await $m()!==null;if(!i){y(``),await x(t,r),a||g(e(`Reload the page before saving again.`));return}g(th(i.message,e(a?`Current settings were reloaded; check the values and save again.`:`The current settings could not be reloaded. Reload the page.`)))}async function C(e){try{let t=await $(`/api/settings/traces/${encodeURIComponent(e)}`);m(t.content)}catch(e){g(e.message)}}async function w(n){if(window.confirm(`${e(`Delete`)} ${n}?`))try{await $(`/api/settings/traces/${encodeURIComponent(n)}`,{method:`DELETE`}),m(``),await x(t,r)}catch(e){g(e.message)}}async function T(n){try{let{result:i}=await $(`/api/settings/capture-retry/${n}/run`,{method:`POST`,body:`{}`});y(e(i===`scheduled`?n===`pi`?`These turns retry at the next Pi session start.`:n===`claude-code`?`These turns retry at the next Claude Code session start.`:`These turns retry at the next OpenCode session start.`:i===`running`?`A retry is already running.`:`Retrying now.`)),await x(t,r)}catch(e){g(e.message)}}let E=d?.settings.captureTrace,D=Number(d?.settings.captureRetryRetentionHours?.value??72);return(0,U.jsxs)(`section`,{className:`space-y-4 rounded-xl border border-border bg-card p-4`,"aria-label":e(`Capture diagnostics`),children:[(0,U.jsx)(`h2`,{className:`text-section-title font-semibold`,children:e(`Capture diagnostics`)}),(0,U.jsxs)(`label`,{className:`flex items-center gap-2 pb-2 text-sm`,children:[e(`Time range`),(0,U.jsxs)(dn,{"aria-label":e(`Time range`),className:`rounded-lg border border-border bg-background px-2 py-1`,value:t,onChange:e=>n(Number(e.target.value)),children:[(0,U.jsx)(`option`,{value:1,children:e(`24 hours`)}),(0,U.jsx)(`option`,{value:7,children:e(`7 days`)}),(0,U.jsx)(`option`,{value:30,children:e(`30 days`)}),(0,U.jsx)(`option`,{value:90,children:e(`90 days`)})]}),e(`Host`),(0,U.jsxs)(dn,{"aria-label":e(`Host`),className:`rounded-lg border border-border bg-background px-2 py-1`,value:r,onChange:e=>i(e.target.value),children:[(0,U.jsx)(`option`,{value:`all`,children:e(`All`)}),[`opencode`,`pi`,`claude-code`].map(e=>(0,U.jsx)(`option`,{value:e,children:ph(e)},e))]})]}),h&&(0,U.jsx)(`p`,{role:`alert`,children:h}),(0,U.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e(`Saved: a memory was stored. Skipped: the model or a rule found nothing worth keeping, or the turn was private or trivial. Failed: the attempt hit an error. Total: the three added up. Each percentage is a share of its row's total.`)}),(0,U.jsx)(`div`,{className:Dh,children:(0,U.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,U.jsx)(`caption`,{className:Oh,children:e(`Outcomes by host`)}),(0,U.jsx)(`thead`,{className:kh,children:(0,U.jsx)(`tr`,{children:[`Host / model`,`Saved`,`Skipped`,`Failed`,`Total`].map((t,n)=>(0,U.jsx)(`th`,{scope:`col`,className:H(Ah,n>0&&`text-end`),children:e(t)},t))})}),(0,U.jsx)(`tbody`,{children:Tg(s?.byModel??[]).map(t=>{let n=a.has(t.host);return(0,U.jsxs)(_.Fragment,{children:[(0,U.jsxs)(`tr`,{className:H(jh,`font-medium`),children:[(0,U.jsx)(`td`,{className:Mh,children:(0,U.jsxs)(`button`,{type:`button`,className:`inline-flex items-center gap-1`,"aria-expanded":n,onClick:()=>o(e=>{let r=new Set(e);return n?r.delete(t.host):r.add(t.host),r}),children:[(0,U.jsx)(`span`,{"aria-hidden":!0,children:n?`▾`:`▸`}),mh(t.host),(0,U.jsxs)(`span`,{className:`text-xs font-normal text-muted-foreground`,children:[`(`,t.models.length,` `,e(t.models.length===1?`model`:`models`),`)`]})]})}),(0,U.jsx)(Og,{row:t})]}),n&&t.models.map(n=>(0,U.jsxs)(`tr`,{className:`border-t border-border transition-colors hover:bg-muted/30`,children:[(0,U.jsx)(`td`,{className:H(`px-3 py-1.5`,`ps-8`),children:n.label?(0,U.jsx)(`span`,{className:`font-mono text-xs`,children:n.label}):(0,U.jsx)(`span`,{className:`text-xs italic text-muted-foreground`,title:e(`No model was recorded for these attempts. This happens with records written by older OMMS versions, and when an attempt stops before a model is chosen.`),children:e(`model not recorded`)})}),(0,U.jsx)(Og,{row:n})]},`${t.host}-${n.label??`none`}`))]},t.host)})})]})}),(0,U.jsx)(`div`,{className:Dh,children:(0,U.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,U.jsx)(`caption`,{className:Oh,children:e(`Failure reasons`)}),(0,U.jsx)(`thead`,{className:kh,children:(0,U.jsxs)(`tr`,{children:[(0,U.jsx)(`th`,{scope:`col`,className:Ah,children:e(`Host`)}),(0,U.jsx)(`th`,{scope:`col`,className:Ah,children:e(`Reason`)}),(0,U.jsx)(`th`,{scope:`col`,className:H(Ah,`text-end`),children:e(`Total`)})]})}),(0,U.jsx)(`tbody`,{children:Dg(s?.byReason??[]).map((e,t)=>(0,U.jsxs)(`tr`,{className:jh,children:[(0,U.jsx)(`td`,{className:H(Mh,`text-muted-foreground`),children:mh(e.host)}),(0,U.jsx)(`td`,{className:H(Mh,`font-mono text-xs`),children:e.reason}),(0,U.jsx)(`td`,{className:H(Mh,`text-end tabular-nums`),children:e.count})]},`${e.host}-${e.reason}-${t}`))})]})}),(0,U.jsx)(`div`,{className:H(Dh,`max-h-72 overflow-y-auto`),children:(0,U.jsxs)(`table`,{className:`w-full min-w-max text-sm`,children:[(0,U.jsx)(`caption`,{className:Oh,children:e(`Recent attempts`)}),(0,U.jsx)(`thead`,{className:H(kh,`sticky top-0`),children:(0,U.jsx)(`tr`,{children:[`Time`,`Host`,`Source`,`Session`,`Path`,`Model`,`Stop`,`Blocks`,`Prompt`,`Reply`,`Duration`,`Outcome`,`Reason`].map(t=>(0,U.jsx)(`th`,{scope:`col`,className:Ah,children:e(t)},t))})}),(0,U.jsx)(`tbody`,{children:s?.recent.map((e,t)=>(0,U.jsx)(`tr`,{className:jh,children:[new Date(e.timestamp).toLocaleString(),mh(e.host),e.sourceType,e.sessionId,e.path,`${e.provider??``}/${e.model??``}`,e.stopReason,e.blockTypes?.join(`, `),e.promptChars,e.replyChars,e.durationMs,e.outcome,e.reason].map((e,t)=>(0,U.jsx)(`td`,{className:H(Mh,`whitespace-nowrap`),children:e??``},t))},`${e.timestamp}-${t}`))})]})}),(0,U.jsxs)(`div`,{className:`space-y-2 border-t border-border pt-3 text-sm`,children:[(0,U.jsxs)(`label`,{className:`flex items-center gap-2`,children:[(0,U.jsx)(`input`,{type:`checkbox`,checked:E?.value===!0,disabled:!d,onChange:t=>{t.target.checked&&!window.confirm(e(`Traces can contain conversation content after redaction. Keep tracing off unless you need it for debugging.`))||S({captureTrace:t.target.checked})}}),` `,e(`Save capture traces`)]}),(0,U.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e(`Traces can contain conversation content after redaction. Keep tracing off unless you need it for debugging.`)}),E?.source===`project`&&(0,U.jsx)(`p`,{className:`text-xs text-amber-600`,children:e(`This project turns tracing off. The global switch cannot turn it on here.`)}),[`captureTraceRetentionDays`,`captureAttemptRetentionDays`].map(t=>(0,U.jsxs)(`label`,{className:`block`,children:[e(t===`captureTraceRetentionDays`?`Trace retention (days)`:`Attempt retention (days)`),` `,(0,U.jsx)(`input`,{type:`number`,min:1,className:`ms-2 w-20 rounded border border-border bg-background p-1`,defaultValue:Number(d?.settings[t]?.value??30),onBlur:e=>{let n=Number(e.target.value);Number.isSafeInteger(n)&&n>0&&n!==d?.settings[t]?.value&&S({[t]:n})}},`${t}-${d?.settings[t]?.value}`)]},t)),(0,U.jsxs)(`label`,{className:`block`,children:[e(`Retry retention (hours)`),` `,(0,U.jsx)(`input`,{type:`number`,min:0,max:720,className:`ms-2 w-20 rounded border border-border bg-background p-1`,defaultValue:D,onBlur:e=>{let t=Number(e.target.value);Number.isSafeInteger(t)&&t>=0&&t<=720&&t!==D&&S({captureRetryRetentionHours:t})}},`captureRetryRetentionHours-${D}`)]}),(0,U.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e(`When the capture model cannot be reached, OMMS keeps the turn and tries again later. Queued turns can hold conversation content after redaction. 0 turns the queue off and deletes waiting turns.`)}),(0,U.jsx)(`h3`,{className:`text-subsection-title font-semibold`,children:e(`Turns waiting for retry`)}),[`pi`,`opencode`,`claude-code`].map(t=>{let n=s?.retryQueue?.[t]??0;return(0,U.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,U.jsx)(`span`,{className:`w-24`,children:ph(t)}),(0,U.jsx)(`span`,{className:`tabular-nums`,children:n}),(0,U.jsx)(`button`,{type:`button`,disabled:n===0||D===0,className:`disabled:opacity-50`,onClick:()=>void T(t),children:e(`Retry now`)})]},t)}),v&&(0,U.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:v}),(0,U.jsx)(`h3`,{className:`text-subsection-title font-semibold`,children:e(`Trace files`)}),l.map(t=>(0,U.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,U.jsxs)(`span`,{children:[t.file,` (`,t.size,` bytes)`]}),(0,U.jsx)(`button`,{type:`button`,onClick:()=>void C(t.file),children:e(`View`)}),(0,U.jsx)(`button`,{type:`button`,onClick:()=>void w(t.file),children:e(`Delete`)})]},t.file)),p&&(0,U.jsx)(`pre`,{className:`max-h-60 overflow-auto whitespace-pre-wrap break-words rounded bg-background p-2 text-xs`,children:p})]})]})}function jg(){let e=oh(),[t,n]=(0,_.useState)([]),[r,i]=(0,_.useState)(!1),[a,o]=(0,_.useState)(``);async function s(e){i(!0);try{let t=await $(`/api/settings/health`,{method:`POST`,body:JSON.stringify({testModels:e})});n(t.checks),o(``)}catch(e){o(e.message)}finally{i(!1)}}return(0,U.jsxs)(`section`,{id:`settings-health`,className:`space-y-3 rounded-xl border border-border bg-card p-4`,"aria-label":e(`Health`),children:[(0,U.jsx)(`h2`,{className:`text-section-title font-semibold`,children:e(`Health`)}),(0,U.jsxs)(`div`,{className:`flex gap-2`,children:[(0,U.jsx)(`button`,{className:`rounded-lg border border-border px-3 py-1.5 text-sm`,disabled:r,onClick:()=>void s(!1),children:e(`Run checks`)}),(0,U.jsx)(`button`,{className:`rounded-lg border border-border px-3 py-1.5 text-sm`,disabled:r,onClick:()=>void s(!0),children:e(`Run checks and test models`)})]}),r&&(0,U.jsx)(`p`,{role:`status`,children:e(`Checking…`)}),a&&(0,U.jsx)(`p`,{role:`alert`,children:a}),(0,U.jsx)(`ul`,{className:`space-y-2 text-sm`,children:t.map(t=>(0,U.jsxs)(`li`,{className:`rounded-lg border border-border p-2`,children:[(0,U.jsx)(`strong`,{className:t.status===`fail`?`text-red-600`:t.status===`warn`?`text-amber-600`:`text-green-600`,children:e(t.status).toUpperCase()}),` `,`· `,e(t.check),`: `,t.reason]},t.check))})]})}function Mg(e){let t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e);return t?[Number(t[1]),Number(t[2])-1,Number(t[3])]:null}function Ng(e){let t=Mg(e);return t?new Date(t[0],t[1],t[2],0,0,0,0).getTime():void 0}function Pg(e){let t=Mg(e);return t?new Date(t[0],t[1],t[2],23,59,59,999).getTime():void 0}function Fg(e,t,n){let r=!n&&e!==null&&e.revision===t.revision;return{page:r?{...t,listedAt:e.listedAt}:t,sameListing:r}}function Ig(e){let t=oh(),[n,r]=(0,_.useState)(``),[i,a]=(0,_.useState)(null),[o,s]=(0,_.useState)(null),[c,l]=(0,_.useState)(!1),[u,d]=(0,_.useState)(``),f=`rounded border border-border px-3 py-1.5 text-sm disabled:opacity-50`;async function p(t){try{let n=await $(`/api/settings/imports/sources/validate`,{method:`POST`,body:JSON.stringify({host:e.host,path:t})});a(n),r(n.displayPath),e.onChoose(n),d(``)}catch(e){d(e.message)}}async function m(t){try{let n=await $(`/api/settings/imports/sources/browse`,{method:`POST`,body:JSON.stringify({host:e.host,...t?{path:t}:{}})});s(n),d(``)}catch(e){let t=e.message;/loopback/i.test(t)&&l(!0),d(t)}}function h(){a(null),r(``),s(null),e.onChoose(null)}return(0,U.jsxs)(`div`,{className:`space-y-2 text-sm`,children:[(0,U.jsxs)(`label`,{className:`block`,children:[e.host===`pi`?t(`Pi sessions folder or one .jsonl session file`):e.host===`claude-code`?t(`Claude Code transcripts folder`):t(`OpenCode database file`),(0,U.jsx)(`input`,{className:`mt-1 block w-full rounded border border-border bg-background p-2 font-mono`,value:n,placeholder:t(`Absolute path, for example on a mounted volume`),onChange:e=>r(e.target.value)})]}),(0,U.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,U.jsx)(`button`,{type:`button`,className:f,disabled:!n.trim(),onClick:()=>void p(n.trim()),children:t(`Use this source`)}),!c&&(0,U.jsx)(`button`,{type:`button`,className:f,onClick:()=>void m(o?.path),children:t(`Browse`)}),i&&(0,U.jsx)(`button`,{type:`button`,className:f,onClick:h,children:t(`Use the default location`)})]}),i&&(0,U.jsxs)(`p`,{role:`status`,children:[t(`Chosen source`),`: `,(0,U.jsx)(`span`,{className:`font-mono`,children:i.displayPath})]}),u&&(0,U.jsx)(`p`,{role:`alert`,children:u}),o&&(0,U.jsxs)(`div`,{className:`rounded border border-border p-2`,children:[(0,U.jsx)(`p`,{className:`font-mono text-xs break-all`,children:o.path}),(0,U.jsxs)(`ul`,{className:`max-h-60 overflow-auto`,children:[o.parent&&(0,U.jsx)(`li`,{children:(0,U.jsx)(`button`,{type:`button`,className:`underline`,onClick:()=>void m(o.parent),children:`..`})}),o.entries.map(n=>(0,U.jsxs)(`li`,{className:`flex items-center gap-2`,children:[n.kind===`folder`?(0,U.jsxs)(`button`,{type:`button`,className:`underline`,onClick:()=>void m(n.path),children:[n.name,`/`]}):(0,U.jsx)(`span`,{className:`font-mono text-xs`,children:n.name}),(n.kind!==`folder`||e.host!==`opencode`)&&(0,U.jsx)(`button`,{type:`button`,className:`text-xs underline`,onClick:()=>void p(n.path),children:t(`Choose`)})]},n.path))]}),o.truncated&&(0,U.jsx)(`p`,{className:`text-xs`,children:t(`Only the first 500 entries are shown.`)})]})]})}function Lg(e){return Object.values(e).some(e=>e?.state===`running`)}function Rg(e){return!e||e.total<=0?null:{percent:e.percent,done:`${e.done.toLocaleString(`en-US`)} / ${e.total.toLocaleString(`en-US`)}`,minutesLeft:e.minutesLeft===null?`unknown`:`about ${e.minutesLeft}`}}function zg(e,t){let n=e?.state===`running`,r=e?.paused===!0;return{runNow:!n&&!r&&!t,pause:n&&!r,resume:r&&!t}}function Bg(e){let t=t=>{let n=e[t]?.run;return n?.state===`running`||n?.paused===!0};return{pi:t(`pi`),opencode:t(`opencode`),"claude-code":t(`claude-code`)}}function Vg(e,t){return e??!t}function Hg(e,t){let n=t.indexOf(`/`);if(t!==`inherit`&&t!==`external`&&(n<1||n===t.length-1))throw Error(`Enter a model as provider/model.`);return{[`${e}BackfillModel`]:t}}function Ug(e,t){if(t?.state===`running`)return t.phase===`profile`?{kind:`learning-profile`,done:t.profileDone??0,total:t.profileTotal??0}:{kind:`running`};if(t?.paused)return{kind:`paused`};if(!e||e.state===`not-started`)return t?.state===`done`?{kind:`imported`}:{kind:`not-started`};let n=t?.state===`done`&&(e.counts.failed??0)>0;return e.state===`failed`&&!n?{kind:`failed`,error:e.error}:e.state===`running`?{kind:`running`}:e.counts.pending>0?{kind:`stopped`,pending:e.counts.pending}:e.counts.unresolved>0?{kind:`partly`,unresolved:e.counts.unresolved}:{kind:`imported`}}function Wg(e){return e?.state===`running`&&e.phase!==`profile`}function Gg(e){return!e||e.state===`running`||!e.state||!e.updatedAt||!e.surface?null:{finishedAt:e.updatedAt,surface:e.surface,imported:e.imported??0,skipped:e.skipped??0,failed:e.failed??0,state:e.state}}function Kg(e,t){let n=0;return async r=>{let i=++n;try{let t=await r;i===n&&e(t)}catch(e){i===n&&t?.(e)}}}function qg(e){let t=document.getElementById(`directory-maps-${e}`),n=t?.parentElement;!t||!n||(n.open=!0,t.focus({preventScroll:!0}))}function Jg({badge:e,host:t}){let n=oh(),[r,i]=(()=>{switch(e.kind){case`imported`:return[`${n(`Imported`)} ✅`,`border-green-600/40 text-green-700`];case`partly`:return[`${n(`Partly imported`)} (${e.unresolved} ${n(`unresolved`)})`,`border-amber-500/50 text-amber-700`];case`running`:return[n(`Running`),`border-primary/50 text-primary`];case`learning-profile`:return[`${n(`Learning profile`)} ${e.done} / ${e.total}`,`border-primary/50 text-primary`];case`paused`:return[n(`Paused`),`border-border text-muted-foreground`];case`stopped`:return[`${n(`Stopped`)} (${e.pending} ${n(`pending`)})`,`border-amber-500/50 text-amber-700`];case`failed`:return[`${n(`Failed`)} ⛔️`,`border-red-600/40 text-red-700`];case`not-started`:return[n(`Not started`),`border-border text-muted-foreground`]}})(),a=H(`inline-block rounded-full border px-2 py-0.5 text-xs font-medium`,i);return e.kind===`partly`?(0,U.jsx)(`a`,{href:`#directory-maps-${t}`,onClick:()=>qg(t),"aria-label":`${ph(t)}: ${n(`Directory maps`)}. ${r}`,className:H(a,`underline focus-visible:outline-2 focus-visible:outline-ring`),children:r}):(0,U.jsx)(`span`,{className:a,title:e.kind===`failed`&&e.error?e.error:void 0,children:r})}var Yg=[`pi`,`opencode`,`claude-code`];function Xg(){let e=oh(),[t,n]=(0,_.useState)({}),[r,i]=(0,_.useState)({});return(0,_.useEffect)(()=>{let e=Kg(n),t=Kg(i),r=()=>{e($(`/api/settings/backfill`)),t($(`/api/settings/backfill/runs`))};r();let a=setInterval(r,1e4),o=eh(r);return()=>{clearInterval(a),o()}},[]),(0,U.jsx)(`div`,{className:`flex flex-wrap gap-2`,"aria-label":e(`Import status`),children:Yg.map(e=>(0,U.jsxs)(`div`,{className:`flex items-center gap-2 rounded-lg border border-border px-3 py-1.5 text-sm`,children:[(0,U.jsx)(`span`,{className:`font-medium`,children:ph(e)}),(0,U.jsx)(Jg,{host:e,badge:Ug(t[e]??null,r[e]?.run??null)})]},e))})}var Zg=50,Qg=1e3,$g={"missing-model":`The external API has no memoryModel in the global config`,"missing-url":`The external API has no memoryApiUrl in the global config`,"missing-key":`The external API key is missing in the OpenCode process; check memoryApiKey and its env:// or file:// source`,"unsupported-provider":`The memoryProvider in the global config is not supported for imports`},e_=()=>({mode:`ids`,picked:new Map});function t_(e,t){return e.split(`
124
124
  `).map(e=>e.trim()).filter(Boolean).map(e=>{let n=e.indexOf(`=`);if(n<1||n===e.length-1)throw Error(t);return{from:e.slice(0,n),to:e.slice(n+1)}})}function n_(e){return eh(()=>e())}function r_(e,t){let n=e&&e.external.state!==`ready`;return`${t(`Saved external API`)}${n?` — ${t(`not ready`)}`:``}`}function i_(){let e=oh(),[t,n]=(0,_.useState)(`pi`),[r,i]=(0,_.useState)(null),[a,o]=(0,_.useState)(`current-project`),[s,c]=(0,_.useState)(``),[l,u]=(0,_.useState)(``),[d,f]=(0,_.useState)(``),[p,m]=(0,_.useState)(``),[h,g]=(0,_.useState)(``),[v,y]=(0,_.useState)(!1),[b,x]=(0,_.useState)(!1),[S,C]=(0,_.useState)(!1),[w,T]=(0,_.useState)(!1),[E,D]=(0,_.useState)(null),[O,ee]=(0,_.useState)(``),[te,k]=(0,_.useState)(!1),[A,ne]=(0,_.useState)(!1),[j,re]=(0,_.useState)(e_),[M,N]=(0,_.useState)(null),[ie,P]=(0,_.useState)(``),ae=t===`claude-code`&&ie!==`external`?``:ie,[F,I]=(0,_.useState)(null),[L,oe]=(0,_.useState)(``);(0,_.useEffect)(()=>($(`/api/settings/imports/readiness`).then(e=>{N(e);let t=e.opencode.models[0];P(t?`${t.provider}/${t.model}`:e.external.state===`ready`?`external`:``)}).catch(()=>N(null)),$(`/api/settings/imports/current`).then(e=>I(e.job)).catch(()=>{}),n_(()=>{$(`/api/settings/imports/readiness`).then(N).catch(()=>N(null))})),[]),(0,_.useEffect)(()=>{if(F?.state!==`running`&&F?.state!==`cancelling`)return;let e=setInterval(()=>{$(`/api/settings/imports/current`).then(e=>I(e.job)).catch(e=>oe(e.message))},1e3);return()=>clearInterval(e)},[F?.state]);let se=JSON.stringify([t,r?.sourceToken,a,s,l]),ce=!!E&&(te||se!==O);function le(){let n=t_(l,e(`Directory maps must be old=new, one per line`));return{host:t,...r?{source:r.sourceToken}:{},scope:a,...a===`current-project`&&s?{project:s}:{},pathMaps:n}}async function ue(e,t){ne(!0);try{let n=await $(`/api/settings/imports/sessions`,{method:`POST`,body:JSON.stringify({...le(),offset:e,limit:Zg,refresh:t})}),r=Fg(E,n,t);r.sameListing||re(e_()),D(r.page),ee(se),k(!1),oe(``)}catch(e){oe(e.message)}finally{ne(!1)}}let R=E?E.total-(a===`all-projects`?E.unresolvedCount:0):0,de=j.mode===`all`?R-j.excluded.size:j.picked.size,fe=e=>j.mode===`all`?!j.excluded.has(e.key):j.picked.has(e.key);function pe(e){if(!(!e.selectable||!e.directory)){if(j.mode===`all`){let t=new Set(j.excluded);t.has(e.key)?t.delete(e.key):t.add(e.key),re({mode:`all`,excluded:t})}else{let t=new Map(j.picked);t.has(e.key)?t.delete(e.key):t.set(e.key,e.directory),re({mode:`ids`,picked:t})}}}let me=!b||!S,he=t===`pi`&&M?.piReader.available===!1,ge=me?M?ae?ae===`external`&&M.external.state!==`ready`?e($g[M.external.state]??`The external API is not ready`):null:e(t===`claude-code`?`Claude Code imports use the external API. Complete the external API settings.`:`No import model is ready. Connect a model in OpenCode or complete the external API settings.`):e(`Model readiness is unknown. Reload the page.`):null,_e=E?ce?e(`Options changed. Refresh the session list first.`):de===0?e(`Select at least one session.`):j.mode===`ids`&&j.picked.size>Qg?e(`Select at most 1000 sessions one by one, or use Select all matching.`):null:e(`List sessions first.`),ve=F?.state===`running`||F?.state===`cancelling`;async function ye(n){if(E)try{let r=d?Ng(d):void 0,i=p?Pg(p):void 0,o={host:t,source:E.source.sourceToken,selection:j.mode===`all`?{mode:`all`,excludedKeys:[...j.excluded],revision:E.revision,listedAt:E.listedAt}:{mode:`ids`,sessions:[...j.picked].map(([e,t])=>({key:e,directory:t})),listedAt:E.listedAt},options:{dryRun:n,force:v,skipMemories:b,skipProfile:S,scope:a,...a===`current-project`&&s?{project:s}:{},...r===void 0?{}:{since:r},...i===void 0?{}:{until:i},...h?{profileBatch:Number(h)}:{},pathMaps:t_(l,e(`Directory maps must be old=new, one per line`))},...ae?{modelChoice:ae}:{}},c=await $(`/api/settings/imports`,{method:`POST`,body:JSON.stringify(o)});I(c),oe(``)}catch(e){let t=e.message;/out of date|changed|no longer/i.test(t)&&k(!0),oe(t)}}async function be(){try{let e=await $(`/api/settings/imports/current/cancel`,{method:`POST`,body:`{}`});I(e.job)}catch(e){oe(e.message)}}function xe(){o(`all-projects`),T(!0)}let Se={recorded:e(`recorded`),mapped:e(`mapped`),worktree:e(`project root`),unresolved:e(`missing`)},Ce=`mt-1 block w-full rounded border border-border bg-background p-2`,we=`rounded border border-border px-3 py-1.5 text-sm disabled:opacity-50`;return(0,U.jsxs)(`section`,{className:`space-y-3 rounded-xl border border-border bg-card p-4`,"aria-label":e(`Import and backfill`),children:[(0,U.jsx)(`h2`,{className:`text-section-title font-semibold`,children:e(`Import and backfill`)}),(0,U.jsx)(Xg,{}),(0,U.jsxs)(`div`,{className:`flex flex-wrap items-end gap-3`,children:[(0,U.jsxs)(`label`,{className:`text-sm`,children:[e(`History host`),(0,U.jsxs)(dn,{"aria-label":e(`History host`),className:Ce,value:t,onChange:e=>{let t=e.target.value;n(t),t===`claude-code`&&M?.external.state===`ready`&&P(`external`),i(null),D(null),re(e_())},children:[(0,U.jsx)(`option`,{value:`pi`,children:`Pi`}),(0,U.jsx)(`option`,{value:`opencode`,children:`OpenCode`}),(0,U.jsx)(`option`,{value:`claude-code`,children:`Claude Code`})]})]}),(0,U.jsx)(`button`,{type:`button`,className:we,disabled:A,onClick:()=>void ue(0,!0),children:e(E?`Refresh list`:`List sessions`)}),(0,U.jsx)(`button`,{type:`button`,className:we,onClick:()=>T(!w),children:e(w?`Hide advanced options`:`Advanced options`)})]}),(0,U.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[e(`Source`),`: `,r?.displayPath??E?.source.displayPath??e(`default location`),` · `,e(a===`current-project`?`Current project`:`All projects`)]}),he&&(0,U.jsx)(`p`,{role:`alert`,children:M?.piReader.reason}),t===`claude-code`&&M?.claudeCode&&(0,U.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[e(`Claude Code transcripts`),`:`,` `,(0,U.jsx)(`span`,{className:`font-mono break-all`,children:M.claudeCode.defaultRoot}),` (`,M.claudeCode.defaultRootFound?e(`found`):e(`not found`),`).`,` `,e(`Claude Code imports always use the external API.`)]}),w&&(0,U.jsxs)(`div`,{className:`space-y-3 rounded-lg border border-border p-3`,children:[(0,U.jsx)(Ig,{host:t,onChoose:i}),(0,U.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,U.jsxs)(`label`,{className:`text-sm`,children:[e(`Scope`),(0,U.jsxs)(dn,{"aria-label":e(`Scope`),className:Ce,value:a,onChange:e=>o(e.target.value),children:[(0,U.jsx)(`option`,{value:`current-project`,children:e(`Current project`)}),(0,U.jsx)(`option`,{value:`all-projects`,children:e(`All projects`)})]})]}),a===`current-project`&&(0,U.jsxs)(`label`,{className:`text-sm`,children:[e(`Project directory`),(0,U.jsx)(`input`,{className:Ce,value:s,onChange:e=>c(e.target.value),placeholder:e(`Current directory`)})]}),(0,U.jsxs)(`label`,{className:`text-sm`,children:[e(`Prompt date from`),(0,U.jsx)(`input`,{type:`date`,className:Ce,value:d,onChange:e=>f(e.target.value)})]}),(0,U.jsxs)(`label`,{className:`text-sm`,children:[e(`Prompt date to`),(0,U.jsx)(`input`,{type:`date`,className:Ce,value:p,onChange:e=>m(e.target.value)})]}),(0,U.jsxs)(`label`,{className:`text-sm`,children:[e(`Profile batch size`),(0,U.jsx)(`input`,{inputMode:`numeric`,className:Ce,value:h,onChange:e=>g(e.target.value)})]})]}),(0,U.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e(`Prompt dates are inclusive, use your time zone, and filter the turns inside each session, not the list. Empty dates include every turn.`)}),(0,U.jsxs)(`label`,{className:`block text-sm`,children:[e(`Directory maps (old=new, one per line)`),(0,U.jsx)(`textarea`,{className:Ce,rows:2,value:l,onChange:e=>u(e.target.value)})]}),(0,U.jsx)(`div`,{className:`flex flex-wrap gap-3 text-sm`,children:[[`Force reimport`,v,y],[`Skip memories`,b,x],[`Skip profile`,S,C]].map(([t,n,r])=>(0,U.jsxs)(`label`,{children:[(0,U.jsx)(`input`,{type:`checkbox`,checked:n,onChange:e=>r(e.target.checked)}),` `,e(t)]},t))})]}),ce&&E&&(0,U.jsx)(`p`,{role:`status`,className:`text-sm text-amber-600`,children:e(`Options changed. Refresh the session list first.`)}),E&&a===`current-project`&&E.unresolvedCount>0&&(0,U.jsxs)(`p`,{className:`text-sm`,children:[e(`Sessions with directories that no longer exist`),`: `,E.unresolvedCount,`.`,` `,(0,U.jsx)(`button`,{type:`button`,className:`underline`,onClick:xe,children:e(`Show them and add a directory map`)})]}),E&&(0,U.jsxs)(`div`,{className:`space-y-2`,children:[(0,U.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 text-sm`,children:[(0,U.jsxs)(`span`,{role:`status`,children:[e(`Selected`),`: `,de,` / `,R]}),(0,U.jsxs)(`button`,{type:`button`,className:we,disabled:R===0,onClick:()=>re({mode:`all`,excluded:new Set}),children:[e(`Select all matching`),` (`,R,`)`]}),(0,U.jsx)(`button`,{type:`button`,className:we,onClick:()=>re(e_()),children:e(`Clear selection`)})]}),(0,U.jsxs)(`div`,{className:`overflow-x-auto`,children:[(0,U.jsxs)(`table`,{className:`w-full text-left text-sm`,children:[(0,U.jsx)(`thead`,{children:(0,U.jsxs)(`tr`,{className:`text-muted-foreground`,children:[(0,U.jsx)(`th`,{className:`p-1`,children:(0,U.jsx)(`span`,{className:`sr-only`,children:e(`Select`)})}),(0,U.jsx)(`th`,{className:`p-1`,children:e(`Created`)}),(0,U.jsx)(`th`,{className:`p-1`,children:e(`Session`)}),(0,U.jsx)(`th`,{className:`p-1`,children:e(`Project directory`)}),(0,U.jsx)(`th`,{className:`p-1`,children:e(`Resolved by`)})]})}),(0,U.jsx)(`tbody`,{children:E.rows.map(t=>(0,U.jsxs)(`tr`,{className:`border-t border-border`,children:[(0,U.jsx)(`td`,{className:`p-1`,children:(0,U.jsx)(`input`,{type:`checkbox`,"aria-label":`${e(`Select`)} ${t.sessionId??t.key}`,checked:t.selectable&&fe(t),disabled:!t.selectable,onChange:()=>pe(t)})}),(0,U.jsx)(`td`,{className:`p-1 whitespace-nowrap`,children:t.createdAt?new Date(t.createdAt).toLocaleString():`—`}),(0,U.jsx)(`td`,{className:`p-1 font-mono text-xs`,children:t.sessionId??t.key}),(0,U.jsx)(`td`,{className:`p-1 font-mono text-xs break-all`,children:t.directory??t.recordedDirectory??`—`}),(0,U.jsx)(`td`,{className:`p-1`,children:Se[t.via]})]},t.key))})]}),E.total===0&&(0,U.jsx)(`p`,{className:`text-sm`,children:e(`No sessions match.`)})]}),(0,U.jsxs)(`div`,{className:`flex items-center gap-2 text-sm`,children:[(0,U.jsx)(`button`,{type:`button`,className:we,disabled:A||E.offset===0,onClick:()=>void ue(Math.max(0,E.offset-Zg),!1),children:e(`Previous`)}),(0,U.jsxs)(`span`,{children:[E.total?E.offset+1:0,`–`,Math.min(E.offset+Zg,E.total),` /`,` `,E.total]}),(0,U.jsx)(`button`,{type:`button`,className:we,disabled:A||E.offset+Zg>=E.total,onClick:()=>void ue(E.offset+Zg,!1),children:e(`Next`)})]})]}),(0,U.jsxs)(`label`,{className:`block text-sm`,children:[e(`Import model`),(0,U.jsxs)(dn,{"aria-label":e(`Import model`),className:Ce,value:ae,onChange:e=>P(e.target.value),children:[(0,U.jsx)(`option`,{value:``,children:e(`None`)}),t!==`claude-code`&&M?.opencode.models.map(e=>(0,U.jsxs)(`option`,{value:`${e.provider}/${e.model}`,children:[e.name,` (`,e.provider,`/`,e.model,`)`]},`${e.provider}/${e.model}`)),(0,U.jsx)(`option`,{value:`external`,children:r_(M,e)})]})]}),t!==`claude-code`&&M&&!M.opencode.available&&(0,U.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e(`An import with an OpenCode signed-in model runs from the terminal or with /import in OpenCode.`)}),(0,U.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[e(`Configured, not tested.`),` `,(0,U.jsx)(`button`,{type:`button`,className:`underline`,onClick:()=>document.getElementById(`settings-health`)?.scrollIntoView(),children:e(`Test models in Health`)})]}),(0,U.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,U.jsx)(`button`,{type:`button`,className:we,disabled:ve||he||!!_e,onClick:()=>void ye(!0),children:e(`Preview (dry run)`)}),(0,U.jsx)(`button`,{type:`button`,className:we,disabled:ve||he||!!_e||!!ge,onClick:()=>void ye(!1),children:e(`Start import`)}),ve&&(0,U.jsx)(`button`,{type:`button`,className:we,disabled:F?.state===`cancelling`,onClick:()=>void be(),children:e(`Cancel after current unit`)})]}),(_e||ge)&&!ve&&(0,U.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:_e??ge}),L&&(0,U.jsx)(`p`,{role:`alert`,children:L}),F&&(0,U.jsxs)(`div`,{role:`status`,className:`text-sm`,children:[F.host,` · `,F.dryRun?e(`Preview (dry run)`):e(`Import`),` · `,e(F.state),` ·`,` `,F.sessions===1?e(`1 session`):`${F.sessions} ${e(`sessions`)}`,` ·`,` `,F.processed,`/`,F.total,` `,e(`units`),F.error&&(0,U.jsx)(`p`,{role:`alert`,children:F.error}),F.report&&(0,U.jsx)(`pre`,{className:`mt-2 overflow-auto whitespace-pre-wrap rounded bg-background p-3 text-xs`,children:F.report})]})]})}var a_=[`pi`,`opencode`,`claude-code`];function o_(){let e=oh(),[t,n]=(0,_.useState)(),[r,i]=(0,_.useState)({pi:null,opencode:null,"claude-code":null}),[a,o]=(0,_.useState)(),[s,c]=(0,_.useState)({}),[l,u]=(0,_.useState)({}),[d,f]=(0,_.useState)({}),[p,m]=(0,_.useState)(``),[h,g]=(0,_.useState)(!1),[v,y]=(0,_.useState)({}),b=(0,_.useRef)(!1),x=Lg(r)||a_.some(e=>a?.[e]?.run?.state===`running`),S=(0,_.useRef)(Kg(i,e=>m(e.message))),C=()=>S.current($(`/api/settings/backfill`)),w=(0,_.useRef)(Kg(o,e=>m(e.message))),T=()=>w.current($(`/api/settings/backfill/runs`));(0,_.useEffect)(()=>{let e=!0;$(`/api/settings`).then(t=>{e&&n(t)}).catch(t=>{e&&m(t.message)}),C(),T();for(let t of[`pi`,`opencode`])$(`/api/settings/models?host=${t}`).then(n=>{e&&c(e=>({...e,[t]:n}))}).catch(()=>{e&&c(e=>({...e,[t]:{available:!1}}))});let t=eh(t=>{e&&(n(t),C())});return()=>{e=!1,t()}},[]),(0,_.useEffect)(()=>{if(!x)return;let e=!0,t=setInterval(()=>{e&&(C(),T())},3e3);return()=>{e=!1,clearInterval(t)}},[x]),(0,_.useEffect)(()=>{b.current||!a||(b.current=!0,y(Bg(a)))},[a]);async function E(n){if(t){g(!0);try{await $(`/api/settings`,{method:`PATCH`,body:JSON.stringify({edits:n,revision:t.revision})}),m(e(`Saved. Changes apply at the next run.`))}catch(e){m(e.message)}await $m(),g(!1)}}async function D(t,n){g(!0);try{await $(`/api/settings/backfill/${t}/${n}`,{method:`POST`,body:`{}`}),m(e(n===`pause`?`Pausing after the current exchange.`:`Backfill started.`))}catch(e){m(e.message)}await T(),g(!1)}function O(t,n){try{E(Hg(t,n.trim()))}catch(t){m(e(t.message))}}return(0,U.jsxs)(`section`,{className:`space-y-3 rounded-xl border border-border bg-card p-4`,"aria-label":e(`Automatic import`),children:[(0,U.jsx)(`h2`,{className:`text-section-title font-semibold`,children:e(`Automatic import`)}),(0,U.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:e(`Automatic import makes model calls. A model change applies at the next run. Turning it off stops a running import after the current exchange.`)}),(0,U.jsxs)(`label`,{className:`flex items-center gap-2 text-sm`,children:[(0,U.jsx)(`input`,{type:`checkbox`,checked:!!t?.settings.autoBackfill?.globalValue,disabled:h||!t,onChange:e=>void E({autoBackfill:e.target.checked})}),e(`Import past chats automatically`)]}),a_.map(n=>{let i=String(t?.settings[`${n}BackfillModel`]?.globalValue??`inherit`),o=l[n]??i,c=s[n]?.models??[],p=o===`inherit`||o===`external`||c.some(e=>`${e.provider}/${e.model}`===o),m=ch({memoryProvider:t?.settings.memoryProvider?.globalValue,memoryModel:t?.settings.memoryModel?.globalValue,memoryApiUrl:t?.settings.memoryApiUrl?.globalValue,keySet:!!t?.secrets?.memoryApiKey?.set}),g=a?.[n]?.run??null,_=a?.[n]?.runNowUnavailable??null,b=zg(g,_),x=Wg(g)?Rg(g):null,S=Gg(g),C=Ug(r[n],g),w=Vg(d[n],p),T=g?.paused?e(`paused`):e(g?.state??r[n]?.state??`not started`);return(0,U.jsxs)(`details`,{className:`min-w-0 rounded-lg border border-border p-3 text-sm`,open:v[n]??!1,onToggle:e=>{let t=e.currentTarget.open;y(e=>({...e,[n]:t}))},children:[(0,U.jsxs)(`summary`,{className:`cursor-pointer rounded focus-visible:outline-2 focus-visible:outline-ring`,children:[(0,U.jsx)(`h3`,{className:`inline text-subsection-title font-semibold`,children:ph(n)}),(0,U.jsxs)(`span`,{className:`mt-1 block text-xs text-muted-foreground`,children:[e(`State`),`: `,T,` · `,e(`Pending`),`: `,r[n]?.counts.pending??0,` ·`,` `,e(`Unresolved sessions`),`: `,r[n]?.counts.unresolved??0]})]}),(0,U.jsxs)(`div`,{className:`mt-3 space-y-2`,children:[n===`claude-code`?(0,U.jsx)(`p`,{className:`text-muted-foreground`,children:e(`Claude Code backfill always uses the external API. It has no backfill model setting.`)}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`label`,{className:`block`,children:[e(`Backfill model`),(0,U.jsxs)(dn,{"aria-label":`${ph(n)} ${e(`Backfill model`)}`,className:`mt-1 block w-full rounded border border-border bg-background p-2`,value:w?`typed`:o,onChange:e=>{let t=e.target.value;f(e=>({...e,[n]:t===`typed`})),u(e=>({...e,[n]:t}))},children:[(0,U.jsx)(`option`,{value:`inherit`,children:e(`Same as live capture`)}),(0,U.jsx)(`option`,{value:`external`,disabled:m.length>0,children:e(`External API`)}),c.map(e=>(0,U.jsxs)(`option`,{value:`${e.provider}/${e.model}`,children:[e.name,` (`,e.provider,`/`,e.model,`)`]},`${e.provider}/${e.model}`)),(0,U.jsx)(`option`,{value:`typed`,children:e(`Manual provider/model`)})]})]}),w&&(0,U.jsx)(`input`,{"aria-label":`${n} ${e(`Manual provider/model`)}`,className:`w-full rounded border border-border bg-background p-2`,placeholder:`provider/model`,value:o===`typed`?``:o,onChange:e=>u(t=>({...t,[n]:e.target.value}))}),m.length>0&&(0,U.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[e(`External API needs`),`: `,m.join(`, `)]}),s[n]?.available===!1&&(0,U.jsx)(`p`,{children:s[n].reason?e(s[n].reason):e(`Model list unavailable. Enter provider/model manually.`)}),(0,U.jsx)(`button`,{type:`button`,className:`rounded border border-border px-3 py-1.5`,disabled:h||!t,onClick:()=>O(n,o),children:e(`Save model`)})]}),(0,U.jsxs)(`p`,{children:[e(`State`),`: `,T,g?.state===`running`&&g.surface&&` (${e(`started from ${g.surface}`)})`]}),C.kind===`learning-profile`&&(0,U.jsxs)(`p`,{className:`text-muted-foreground`,children:[e(`All exchanges are done. Learning the profile from the imported prompts`),`:`,` `,C.done,` / `,C.total,` `,e(`batches`)]}),x&&(0,U.jsxs)(`div`,{className:`space-y-1`,children:[(0,U.jsx)(`div`,{role:`progressbar`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":x.percent,className:`h-2 w-full overflow-hidden rounded bg-muted`,children:(0,U.jsx)(`div`,{className:`h-full bg-primary`,style:{width:`${x.percent}%`}})}),(0,U.jsxs)(`p`,{className:`text-muted-foreground`,children:[x.percent,`% · `,x.done,` · `,e(`Minutes left`),`:`,` `,x.minutesLeft===`unknown`?e(`unknown`):x.minutesLeft.replace(`about`,e(`about`))]})]}),(0,U.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,U.jsx)(`button`,{type:`button`,className:`rounded border border-border px-3 py-1.5`,disabled:h||!b.runNow,onClick:()=>void D(n,`run`),children:e(`Run now`)}),(0,U.jsx)(`button`,{type:`button`,className:`rounded border border-border px-3 py-1.5`,disabled:h||!b.pause,onClick:()=>void D(n,`pause`),children:e(`Pause`)}),(0,U.jsx)(`button`,{type:`button`,className:`rounded border border-border px-3 py-1.5`,disabled:h||!b.resume,onClick:()=>void D(n,`resume`),children:e(`Resume`)})]}),_&&(0,U.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:_}),S&&(0,U.jsxs)(`p`,{className:`text-muted-foreground`,children:[e(`Last run`),`: `,new Date(S.finishedAt).toLocaleString(),` ·`,` `,e(`started from ${S.surface}`),` · `,e(S.state),` · `,e(`Imported`),`:`,` `,S.imported,` · `,e(`Skipped`),`: `,S.skipped,` · `,e(`Failed`),`:`,` `,S.failed]}),r[n]&&(0,U.jsxs)(`div`,{className:`space-y-1 text-muted-foreground`,children:[!S&&(0,U.jsxs)(`p`,{children:[e(`Imported`),`: `,r[n].counts.imported,` · `,e(`Skipped`),`:`,` `,r[n].counts.skipped,` · `,e(`Failed`),`: `,r[n].counts.failed]}),(0,U.jsxs)(`p`,{children:[e(`Pending`),`: `,r[n].counts.pending,` · `,e(`Unresolved sessions`),`:`,` `,r[n].counts.unresolved,r[n].counts.unresolved>0&&(0,U.jsxs)(U.Fragment,{children:[` `,(0,U.jsx)(`a`,{className:`underline focus-visible:outline-2 focus-visible:outline-ring`,href:`#directory-maps-${n}`,"aria-label":`${ph(n)}: ${e(`Directory maps`)}`,onClick:()=>qg(n),children:e(`Directory maps`)})]})]}),(0,U.jsxs)(`p`,{children:[e(`Model`),`: `,r[n].model??e(`none`)]}),(0,U.jsxs)(`p`,{children:[e(`Cutoff`),`: `,new Date(r[n].cutoff).toLocaleString()]}),r[n].error&&(0,U.jsx)(`p`,{role:`alert`,children:r[n].error})]})]})]},n)}),p&&(0,U.jsx)(`p`,{role:`status`,className:`text-sm`,children:p})]})}function s_(){let e=oh(),[t,n]=(0,_.useState)(),[r,i]=(0,_.useState)(),[a,o]=(0,_.useState)(),[s,c]=(0,_.useState)(``),[l,u]=(0,_.useState)(!1);(0,_.useEffect)(()=>{let e=!0;$(`/api/settings`).then(t=>{e&&n(t)}).catch(t=>{e&&c(t.message)}),$(`/api/settings/web-autostart`).then(t=>{e&&i(t)}).catch(t=>{e&&c(t.message)}),$(`/api/settings/version`).then(t=>{e&&o(t)}).catch(()=>{});let t=eh(t=>{e&&n(t)});return()=>{e=!1,t()}},[]);async function d(n){if(t){u(!0);try{await $(`/api/settings`,{method:`PATCH`,body:JSON.stringify({edits:{webServerAutoStart:n},revision:t.revision})}),c(e(`Saved. The login item changes at the next Pi or OpenCode start.`))}catch(e){c(e.message)}await $m(),u(!1)}}return(0,U.jsxs)(`section`,{className:`space-y-3 rounded-xl border border-border bg-card p-4`,"aria-label":e(`Web app`),children:[(0,U.jsx)(`h2`,{className:`text-section-title font-semibold`,children:e(`Web app`)}),(0,U.jsxs)(`label`,{className:`flex items-center gap-2 text-sm`,children:[(0,U.jsx)(`input`,{type:`checkbox`,checked:!!t?.settings.webServerAutoStart?.globalValue,disabled:l||!t,onChange:e=>void d(e.target.checked)}),e(`Start web app at login`)]}),(0,U.jsxs)(`p`,{className:`text-sm`,children:[e(`Login item`),`: `,e(r?.state??`not installed`)]}),r?.state===`unsupported`&&(0,U.jsx)(`p`,{role:`status`,children:e(`Login items are unsupported on this platform.`)}),r?.state===`no-runtime`&&(0,U.jsx)(`p`,{role:`status`,children:e(`Install Node or Bun to start the web app at login.`)}),a&&(0,U.jsx)(c_,{info:a}),(0,U.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e(`Use these commands to apply the change now:`)}),(0,U.jsxs)(`div`,{className:`space-y-1 font-mono text-xs`,children:[(0,U.jsx)(`p`,{children:`om-memory-system web`}),(0,U.jsx)(`p`,{children:`om-memory-system web install`}),(0,U.jsx)(`p`,{children:`om-memory-system web uninstall`}),(0,U.jsx)(`p`,{children:`om-memory-system web status`})]}),s&&(0,U.jsx)(`p`,{role:`status`,className:`text-sm`,children:s})]})}function c_({info:e}){let t=oh(),n=uh(e);return(0,U.jsxs)(`div`,{className:`space-y-1 text-sm`,children:[(0,U.jsxs)(`p`,{children:[t(`Running version`),`: `,e.running,` · `,t(`Global command`),`:`,` `,e.global??t(`not installed globally`)]}),n.kind===`older`&&(0,U.jsx)(`p`,{role:`status`,children:t(`A newer OMMS copy runs in place of the global install. The global install is optional. To update it:`)}),n.kind===`newer`&&(0,U.jsx)(`p`,{role:`status`,className:`text-amber-600`,children:t(`The global install is newer than the running OMMS. The next Pi or OpenCode start replaces the web app.`)}),n.kind===`missing`&&(0,U.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:t(`OMMS is not installed globally. A global install is optional.`)}),n.command&&(0,U.jsx)(`p`,{className:`font-mono text-xs`,children:n.command})]})}function l_(e){let t=e.trim();return t===``||t.startsWith(`~/`)||t.startsWith(`/`)||/^[A-Za-z]:[\\/]/.test(t)||t.startsWith(`\\\\`)}function u_(e,t,n){return n?t:typeof e==`string`?e:``}function d_(){let e=oh(),[t,n]=(0,_.useState)(),[r,i]=(0,_.useState)(``),[a,o]=(0,_.useState)(``),[s,c]=(0,_.useState)(!1),l=(0,_.useRef)(!1);(0,_.useEffect)(()=>{let e=!0,t=t=>{e&&(n(t),i(e=>u_(t.settings.claudeConfigDir?.globalValue,e,l.current)))},r=Qm();$(`/api/settings`).then(e=>{r.isCurrent()&&t(e)}).catch(t=>{e&&o(t.message)});let a=eh(e=>t(e));return()=>{e=!1,a()}},[]);async function u(){if(t){if(!l_(r)){o(e(`Enter a full path, or a path that starts with ~/.`));return}c(!0);try{await $(`/api/settings`,{method:`PATCH`,body:JSON.stringify({edits:{claudeConfigDir:r.trim()},revision:t.revision})}),l.current=!1,o(e(`Saved. Capture and import use this folder now.`))}catch(e){o(e.message)}await $m(),c(!1)}}return(0,U.jsxs)(`section`,{className:`space-y-3 rounded-xl border border-border bg-card p-4`,"aria-label":e(`Claude Code folder`),children:[(0,U.jsx)(`h2`,{className:`text-section-title font-semibold`,children:e(`Claude Code folder`)}),(0,U.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:e(`Set this when Claude Code does not use ~/.claude, for example when you start it with CLAUDE_CONFIG_DIR. Leave it empty to use the default.`)}),(0,U.jsxs)(`label`,{className:`block space-y-1 text-sm`,children:[(0,U.jsx)(`span`,{children:e(`Claude Code folder`)}),(0,U.jsx)(`input`,{className:`w-full rounded border border-border bg-background p-2 font-mono`,placeholder:`~/.claude`,value:r,disabled:s||!t,onChange:e=>{l.current=!0,i(e.target.value)}})]}),(0,U.jsx)(`button`,{type:`button`,className:`rounded border border-border px-3 py-1.5 text-sm`,disabled:s||!t,onClick:()=>void u(),children:e(`Save folder`)}),(0,U.jsx)(f_,{folder:t?.claudeFolder}),a&&(0,U.jsx)(`p`,{role:`status`,className:`text-sm`,children:a})]})}function f_({folder:e}){let t=oh();if(!e)return null;let n={setting:t(`this setting`),env:t(`the CLAUDE_CONFIG_DIR variable of the web app`),default:t(`the default folder`)};return(0,U.jsxs)(`div`,{className:`space-y-1 text-sm`,children:[(0,U.jsxs)(`p`,{children:[t(`Transcripts folder in use`),`: `,(0,U.jsx)(`span`,{className:`font-mono`,children:e.root})]}),(0,U.jsxs)(`p`,{children:[t(`From`),`: `,n[e.source]]}),!e.exists&&(0,U.jsxs)(`p`,{role:`status`,className:`text-amber-600`,children:[t(`This folder does not exist. Claude Code capture and import will not work:`),` `,(0,U.jsx)(`span`,{className:`font-mono`,children:e.root})]})]})}function p_(){let e=oh(),[t,n]=(0,_.useState)(!1),[r,i]=(0,_.useState)(),[a,o]=(0,_.useState)(``);async function s(e){try{i(await $(`/api/settings/log?lines=200${e?`&filter=capture`:``}`)),o(``)}catch(e){o(e.message)}}return(0,_.useEffect)(()=>{s(t)},[t]),(0,U.jsxs)(`section`,{className:`space-y-3 rounded-xl border border-border bg-card p-4`,"aria-label":e(`Log`),children:[(0,U.jsx)(`h2`,{className:`text-section-title font-semibold`,children:e(`Log`)}),(0,U.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3 text-sm`,children:[(0,U.jsxs)(`label`,{children:[(0,U.jsx)(`input`,{type:`checkbox`,checked:t,onChange:e=>n(e.target.checked)}),` `,e(`Capture attempts only`)]}),(0,U.jsx)(`button`,{type:`button`,className:`rounded-lg border border-border px-3 py-1`,onClick:()=>void s(t),children:e(`Refresh`)}),r&&(0,U.jsx)(`button`,{type:`button`,className:`rounded-lg border border-border px-3 py-1`,onClick:()=>void navigator.clipboard.writeText(r.path),children:e(`Copy log path`)})]}),(0,U.jsx)(`p`,{className:`break-all text-xs text-muted-foreground`,children:r?.path}),a&&(0,U.jsx)(`p`,{role:`alert`,children:a}),(0,U.jsx)(`pre`,{className:`max-h-80 overflow-auto rounded-lg bg-background p-3 text-xs whitespace-pre-wrap break-words`,"aria-label":e(`Log lines`),children:r?r.lines.length?r.lines.join(`
125
125
  `):e(`No log has been written yet.`):e(`Loading log…`)})]})}var m_={"settings-section-external-api":Fh,"settings-section-models":gh,"settings-section-memory":Nh,"settings-section-embedding":eg,"settings-section-keys":lg,"settings-section-diagnostics":Ag,"settings-section-health":jg,"settings-section-claude-folder":d_,"settings-section-import":i_,"settings-section-auto-import":o_,"settings-section-profile":h_,"settings-section-directory-maps":Sg,"settings-section-web-app":s_,"settings-section-log":p_};function h_(){return(0,U.jsxs)(`div`,{className:`space-y-6`,children:[(0,U.jsx)(fg,{}),(0,U.jsx)(dg,{})]})}function g_(){return(0,_.useEffect)(()=>{qm(window.location.hash,document)},[]),(0,U.jsx)(`div`,{className:`settings-view space-y-6`,children:Km.map(({id:e})=>{let t=m_[e];return(0,U.jsx)(`div`,{id:e,className:`scroll-mt-20 md:scroll-mt-4`,children:(0,U.jsx)(t,{})},e)})})}var __=zr(`grid min-w-0 gap-0.5 rounded-xl border px-4 py-3 text-start text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pe-18 has-[>svg]:grid-cols-[auto_minmax(0,1fr)] has-[>svg]:gap-x-2.5 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4 group/alert relative w-full`,{variants:{variant:{default:`bg-card text-card-foreground`,destructive:`text-destructive-label bg-card *:data-[slot=alert-description]:text-destructive-label *:[svg]:text-current`}},defaultVariants:{variant:`default`}});function v_({className:e,variant:t,...n}){return(0,U.jsx)(`div`,{"data-slot":`alert`,role:`alert`,className:H(__({variant:t}),e),...n})}function y_({className:e,...t}){return(0,U.jsx)(`div`,{"data-slot":`alert-description`,className:H(`text-muted-foreground text-sm [&_p]:leading-relaxed col-start-2`,e),...t})}function b_({...e}){let t=tu();return(0,U.jsx)(Un,{theme:t,className:`toaster group`,style:{"--normal-bg":`var(--color-popover)`,"--normal-text":`var(--color-popover-foreground)`,"--normal-border":`var(--color-border)`},icons:{loading:(0,U.jsx)(ce,{className:`size-4 animate-spin`}),success:(0,U.jsx)(P,{className:`size-4`}),error:(0,U.jsx)(fe,{className:`size-4`}),info:(0,U.jsx)(oe,{className:`size-4`}),warning:(0,U.jsx)(Ae,{className:`size-4`})},...e})}function x_(e,t,n){return e?t:n}var S_=[``,`feature`,`bug-fix`,`refactor`,`architecture`,`rule`,`documentation`,`discussion`,`analysis`,`configuration`];function C_(){let{t:e,language:t}=pr(),n=Vl(),[r,i]=(0,_.useState)(!1),a=mr(),o=hr();(0,_.useEffect)(()=>{let e=zl();(async()=>{await a.loadTags(),await a.loadMemories(),await a.loadStats(),await a.checkMigrationStatus(),await a.checkAuthWarning()})();let t=setInterval(()=>{a.loadStats(),!a.isSearching&&n===`project`&&a.loadMemories()},3e4);return()=>{e(),clearInterval(t)}},[]);let s=o.loadUserProfile;(0,_.useEffect)(()=>{n===`profile`&&s()},[n,s]);function c(e){e!==t&&(lr(e),a.loadMemories(),a.loadStats(),n===`profile`&&o.loadUserProfile())}function l(e){e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||(e.preventDefault(),Y(kl.home))}return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(b_,{richColors:!0,position:`bottom-right`}),(0,U.jsxs)(`div`,{className:`flex min-h-svh bg-background text-foreground overflow-x-clip`,children:[(0,U.jsx)(cu,{open:r,onOpenChange:i,currentView:n,brand:e(`brand`),projectLabel:e(`tab-project`),profileLabel:e(`tab-profile`),profileSections:[{id:`profile-preferences`,label:e(`profile-preferences`)},{id:`profile-patterns`,label:e(`profile-patterns`)},{id:`profile-workflows`,label:e(`profile-workflows`)}],settingsSections:Km.map(e=>({id:e.id,label:ah(e.title,t)})),langLabel:t.toUpperCase(),languageLabel:e(`nav-language`),themeLabel:e(`nav-theme`),settingsLabel:e(`nav-settings`),closeLabel:e(`nav-close`),collapseLabel:e(`nav-collapse`),expandLabel:e(`nav-expand`),onLanguageSelect:c}),(0,U.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,U.jsxs)(`div`,{className:`sticky top-0 z-30 flex items-center gap-2 border-b border-border bg-background/95 px-3 py-2 backdrop-blur md:hidden`,children:[(0,U.jsx)(K,{variant:`ghost`,size:`icon-sm`,className:`min-h-11 min-w-11`,onClick:()=>i(!0),"aria-label":e(`nav-menu`),children:(0,U.jsx)(ue,{className:`size-4`})}),(0,U.jsx)(`a`,{href:kl.home,className:`min-w-0`,onClick:l,children:(0,U.jsx)(hl,{brand:e(`brand`)})})]}),(0,U.jsxs)(`div`,{className:`mx-auto w-full max-w-6xl flex-1 space-y-4 p-4 md:p-6`,children:[a.showAuthWarning?(0,U.jsxs)(v_,{variant:`destructive`,children:[(0,U.jsx)(Ae,{}),(0,U.jsx)(y_,{children:e(`auth-warning-text`)})]}):null,(0,U.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[(0,U.jsx)(`h1`,{className:`text-page-title font-semibold text-foreground`,children:e(n===`project`?`tab-project`:n===`profile`?`tab-profile`:`nav-settings`)}),n===`project`?(0,U.jsxs)(`div`,{className:`flex items-center gap-2 text-xs text-muted-foreground`,children:[(0,U.jsx)(`span`,{children:e(`text-total`,{count:x_(a.isSearching,a.totalItems,a.statsTotal)})}),a.refreshing?(0,U.jsx)(le,{className:`size-3.5 animate-spin`}):null]}):null]}),n===`project`?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`div`,{className:`flex flex-wrap items-end gap-3 rounded-xl border border-border bg-card p-3`,children:[(0,U.jsxs)(`div`,{className:`min-w-0 max-w-full space-y-1`,children:[(0,U.jsx)(du,{htmlFor:`tag-filter`,children:e(`label-tag`)}),(0,U.jsxs)(dn,{id:`tag-filter`,className:`w-64 max-w-full`,value:a.selectedTag,onChange:e=>a.onTagFilterChange(e.currentTarget.value),children:[(0,U.jsx)(`option`,{value:``,children:e(`opt-all-tags`)}),a.tags.map(e=>(0,U.jsx)(`option`,{value:e.tag,children:e.displayName||e.tag},e.tag))]})]}),a.selectedKeyword?(0,U.jsxs)(`div`,{className:`space-y-1`,children:[(0,U.jsx)(`span`,{className:`block text-sm font-medium`,children:e(`label-keyword`)}),(0,U.jsxs)(`div`,{className:`flex h-9 items-center gap-1`,children:[(0,U.jsx)(hu,{keyword:a.selectedKeyword,active:!0}),(0,U.jsx)(K,{variant:`ghost`,size:`icon-xs`,onClick:()=>a.onKeywordFilterChange(``),"aria-label":e(`btn-clear-keyword`),title:e(`btn-clear-keyword`),children:(0,U.jsx)(Pe,{className:`size-3.5`})})]})]}):null,(0,U.jsxs)(`div`,{className:`flex flex-1 items-end gap-1.5 min-w-0 basis-56`,children:[(0,U.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-1`,children:[(0,U.jsx)(du,{htmlFor:`search-input`,className:`sr-only`,children:e(`placeholder-search`)}),(0,U.jsx)(Lm,{id:`search-input`,placeholder:e(`placeholder-search`),value:a.searchInput,onChange:e=>a.setSearchInput(e.target.value),onKeyDown:e=>e.key===`Enter`&&a.performSearch()})]}),(0,U.jsx)(K,{variant:`outline`,size:`icon`,onClick:a.performSearch,children:(0,U.jsx)(Ce,{className:`size-4`})}),a.isSearching?(0,U.jsx)(K,{variant:`outline`,size:`icon`,onClick:a.clearSearch,children:(0,U.jsx)(Pe,{className:`size-4`})}):null]}),(0,U.jsxs)(`div`,{className:`flex flex-wrap gap-1.5`,children:[(0,U.jsx)(yu,{content:e(`tooltip-cleanup`),children:(0,U.jsxs)(K,{variant:`outline`,size:`sm`,onClick:a.runCleanup,children:[(0,U.jsx)(ke,{className:`size-3.5`}),e(`btn-cleanup`)]})}),(0,U.jsx)(yu,{content:e(`tooltip-deduplicate`),children:(0,U.jsxs)(K,{variant:`outline`,size:`sm`,onClick:a.runDeduplication,children:[(0,U.jsx)(xe,{className:`size-3.5`}),e(`btn-deduplicate`)]})})]}),a.selectedIds.size>0?(0,U.jsxs)(`div`,{className:`flex w-full flex-wrap items-center gap-2 border-t border-border pt-3`,children:[(0,U.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e(`text-selected`,{count:a.selectedIds.size})}),(0,U.jsx)(K,{variant:`secondary`,size:`xs`,onClick:a.selectAllCurrentPage,children:e(`btn-select-all`)}),(0,U.jsx)(K,{variant:`destructive`,size:`xs`,onClick:a.bulkDelete,children:e(`btn-delete-selected`)}),(0,U.jsx)(K,{variant:`ghost`,size:`xs`,onClick:a.deselectAll,children:e(`btn-deselect-all`)})]}):null]}),a.migrationNeeded?(0,U.jsxs)(v_,{variant:`destructive`,className:`space-y-3`,children:[(0,U.jsx)(Ae,{}),(0,U.jsxs)(y_,{className:`space-y-3`,children:[(0,U.jsx)(`p`,{children:a.migrationMessage||e(`migration-mismatch`)}),(0,U.jsxs)(`label`,{className:`flex items-start gap-2 text-sm`,children:[(0,U.jsx)(Ji,{checked:a.migrationConfirmed,onCheckedChange:e=>a.setMigrationConfirmed(e===!0),className:`mt-0.5`}),(0,U.jsx)(`span`,{children:e(`migration-understand`)})]}),(0,U.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,U.jsx)(K,{variant:`destructive`,size:`sm`,disabled:!a.migrationConfirmed,onClick:()=>a.runMigration(`fresh-start`),children:e(`btn-fresh-start`)}),(0,U.jsx)(K,{variant:`secondary`,size:`sm`,disabled:!a.migrationConfirmed,onClick:()=>a.runMigration(`re-embed`),children:e(`btn-reembed`)})]})]})]}):null,(0,U.jsx)(zp,{memories:a.memories,selectedIds:a.selectedIds,currentPage:a.currentPage,totalPages:a.totalPages,totalItems:a.totalItems,isSearching:a.isSearching,loading:a.loadingMemories,error:a.memoriesError,onSelect:a.onSelect,onPageChange:e=>{let t=a.currentPage+e;a.setCurrentPage(t),a.loadMemories({page:t})},onPin:a.pinMemory,onUnpin:a.unpinMemory,onEdit:a.openEdit,onDeleteMemory:a.deleteMemory,onDeletePrompt:a.deletePrompt,activeKeyword:a.selectedKeyword,onKeywordClick:e=>a.onKeywordFilterChange(a.selectedKeyword.toLowerCase()===e.toLowerCase()?``:e)}),(0,U.jsxs)(`section`,{className:`rounded-xl border border-border bg-card p-4 space-y-3`,children:[(0,U.jsx)(`h2`,{className:`text-section-title font-semibold text-muted-foreground`,children:e(`section-add`)}),(0,U.jsxs)(`form`,{className:`space-y-3`,onSubmit:a.addMemory,children:[(0,U.jsxs)(`div`,{className:`grid gap-3 md:grid-cols-3`,children:[(0,U.jsxs)(`div`,{className:`space-y-1`,children:[(0,U.jsx)(du,{htmlFor:`add-tag`,children:e(`label-tag`)}),(0,U.jsxs)(dn,{id:`add-tag`,required:!0,className:`w-full`,value:a.addTag,onChange:e=>a.setAddTag(e.target.value),children:[(0,U.jsx)(`option`,{value:``,children:e(`opt-select-tag`)}),a.tags.map(e=>(0,U.jsx)(`option`,{value:e.tag,children:e.displayName||e.tag},e.tag))]})]}),(0,U.jsxs)(`div`,{className:`space-y-1`,children:[(0,U.jsx)(du,{htmlFor:`add-type`,children:e(`label-type`)}),(0,U.jsx)(dn,{id:`add-type`,className:`w-full`,value:a.addType,onChange:e=>a.setAddType(e.target.value),children:S_.map(t=>(0,U.jsx)(`option`,{value:t,children:e(t?`opt-${t}`:`opt-other`)},t||`other`))})]}),(0,U.jsxs)(`div`,{className:`space-y-1`,children:[(0,U.jsx)(du,{htmlFor:`add-tags`,children:e(`label-tags`)}),(0,U.jsx)(Lm,{id:`add-tags`,placeholder:e(`placeholder-tags`),value:a.addTags,onChange:e=>a.setAddTags(e.target.value)})]})]}),(0,U.jsxs)(`div`,{className:`space-y-1`,children:[(0,U.jsx)(du,{htmlFor:`add-content`,children:e(`label-content`)}),(0,U.jsx)(fu,{id:`add-content`,rows:4,required:!0,placeholder:e(`placeholder-content`),value:a.addContent,onChange:e=>a.setAddContent(e.target.value)})]}),(0,U.jsxs)(K,{type:`submit`,children:[(0,U.jsx)(ye,{className:`size-3.5`}),e(`btn-add-memory`)]})]})]})]}):n===`settings`?(0,U.jsx)(g_,{}):(0,U.jsx)(Wm,{profile:o.userProfile,loading:o.loadingProfile,onRefresh:o.refreshProfile,onCleanup:()=>o.setAiCleanupOpen(!0)})]})]})]}),(0,U.jsx)(pu,{open:a.editOpen,onOpenChange:a.setEditOpen,content:a.editContent,onSave:a.saveEdit}),(0,U.jsx)(Gm,{open:a.tagMigrationOpen,onOpenChange:e=>{e||Yn(a.tagMigrationCount),a.setTagMigrationOpen(e)},count:a.tagMigrationCount,onComplete:()=>{Xn(),a.loadMemories(),a.loadStats()}}),(0,U.jsx)(Hc,{open:o.aiCleanupOpen,onOpenChange:o.setAiCleanupOpen,profile:o.userProfile,onApplied:o.loadUserProfile})]})}eu();var w_=document.getElementById(`app`);if(!w_)throw Error(`Root element #app not found`);(0,v.createRoot)(w_).render((0,U.jsx)(_.StrictMode,{children:(0,U.jsx)(fr,{children:(0,U.jsx)(C_,{})})}));
@@ -0,0 +1,2 @@
1
+ /*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
2
+ @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-blur:0;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-blur:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0}}}@layer theme{:root,:host{--font-sans:-apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;--font-mono:"JetBrains Mono Variable", "JetBrains Mono", "Fira Code", ui-monospace, monospace;--color-black:#000;--spacing:.25rem;--container-md:28rem;--container-lg:32rem;--container-2xl:42rem;--container-6xl:72rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--tracking-tight:-.025em;--tracking-wide:.025em;--leading-normal:1.5;--leading-relaxed:1.625;--ease-in:cubic-bezier(.4, 0, 1, 1);--animate-spin:spin 1s linear infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;--default-mono-font-family:"JetBrains Mono Variable", "JetBrains Mono", "Fira Code", ui-monospace, monospace;--text-ui:.875rem;--color-status-warning:var(--status-warning-label);--color-status-success:var(--status-success-label);--color-status-info:var(--status-info-label);--color-selection:var(--selection);--color-ring:var(--ring);--color-border:var(--border);--color-popover-foreground:var(--popover-foreground);--color-popover:var(--popover)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{border-color:var(--border);outline-color:var(--ring)}body{background-color:var(--background);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,system-ui,sans-serif;font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));color:var(--foreground);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0}html{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,system-ui,sans-serif}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.inset-x-0{inset-inline:0}.inset-y-0{inset-block:0}.start-0{inset-inline-start:calc(var(--spacing) * 0)}.end-3{inset-inline-end:calc(var(--spacing) * 3)}.end-4{inset-inline-end:calc(var(--spacing) * 4)}.top-0{top:0}.top-1\/2{top:50%}.top-3{top:calc(var(--spacing) * 3)}.top-4{top:calc(var(--spacing) * 4)}.top-full{top:100%}.bottom-full{bottom:100%}.left-1\/2{left:50%}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.z-\[60\]{z-index:60}.z-\[70\]{z-index:70}.col-start-2{grid-column-start:2}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.mx-auto{margin-inline:auto}.ms-1{margin-inline-start:var(--spacing)}.ms-2{margin-inline-start:calc(var(--spacing) * 2)}.ms-5{margin-inline-start:calc(var(--spacing) * 5)}.ms-auto{margin-inline-start:auto}.me-2{margin-inline-end:calc(var(--spacing) * 2)}.-mt-1{margin-top:calc(var(--spacing) * -1)}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-auto{margin-top:auto}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.ml-auto{margin-left:auto}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.grid\!{display:grid!important}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.field-sizing-content{field-sizing:content}.size-2{width:calc(var(--spacing) * 2);height:calc(var(--spacing) * 2)}.size-3{width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.size-3\.5{width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-5{width:calc(var(--spacing) * 5);height:calc(var(--spacing) * 5)}.size-6{width:calc(var(--spacing) * 6);height:calc(var(--spacing) * 6)}.size-8{width:calc(var(--spacing) * 8);height:calc(var(--spacing) * 8)}.size-9{width:calc(var(--spacing) * 9);height:calc(var(--spacing) * 9)}.size-10{width:calc(var(--spacing) * 10);height:calc(var(--spacing) * 10)}.size-full{width:100%;height:100%}.h-2{height:calc(var(--spacing) * 2)}.h-2\.5{height:calc(var(--spacing) * 2.5)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-auto{height:auto}.h-full{height:100%}.h-svh{height:100svh}.max-h-60{max-height:calc(var(--spacing) * 60)}.max-h-64{max-height:calc(var(--spacing) * 64)}.max-h-72{max-height:calc(var(--spacing) * 72)}.max-h-80{max-height:calc(var(--spacing) * 80)}.max-h-\[60vh\]{max-height:60vh}.max-h-\[90vh\]{max-height:90vh}.max-h-\[calc\(100dvh-2rem\)\]{max-height:calc(100dvh - 2rem)}.max-h-screen{max-height:100vh}.min-h-0{min-height:0}.min-h-5{min-height:calc(var(--spacing) * 5)}.min-h-6{min-height:calc(var(--spacing) * 6)}.min-h-8{min-height:calc(var(--spacing) * 8)}.min-h-11{min-height:calc(var(--spacing) * 11)}.min-h-16{min-height:calc(var(--spacing) * 16)}.min-h-32{min-height:calc(var(--spacing) * 32)}.min-h-svh{min-height:100svh}.w-2\.5{width:calc(var(--spacing) * 2.5)}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-20{width:calc(var(--spacing) * 20)}.w-24{width:calc(var(--spacing) * 24)}.w-36{width:calc(var(--spacing) * 36)}.w-44{width:calc(var(--spacing) * 44)}.w-64{width:calc(var(--spacing) * 64)}.w-fit{width:fit-content}.w-full{width:100%}.w-max{width:max-content}.max-w-6xl{max-width:var(--container-6xl)}.max-w-48{max-width:calc(var(--spacing) * 48)}.max-w-\[calc\(100\%-2rem\)\]{max-width:calc(100% - 2rem)}.max-w-\[min\(24rem\,calc\(100vw-1rem\)\)\]{max-width:min(24rem,100vw - 1rem)}.max-w-\[min\(40rem\,calc\(100vw-2rem\)\)\]{max-width:min(40rem,100vw - 2rem)}.max-w-full{max-width:100%}.max-w-md{max-width:var(--container-md)}.max-w-none{max-width:none}.min-w-0{min-width:0}.min-w-7{min-width:calc(var(--spacing) * 7)}.min-w-11{min-width:calc(var(--spacing) * 11)}.min-w-\[56rem\]{min-width:56rem}.min-w-full{min-width:100%}.min-w-max{min-width:max-content}.flex-1{flex:1}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.basis-56{flex-basis:calc(var(--spacing) * 56)}.-translate-x-1\/2{--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-0{--tw-translate-x:0px;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.rotate-45{rotate:45deg}.rotate-90{rotate:90deg}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-spin{animation:var(--animate-spin)}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.scroll-mt-4{scroll-margin-top:calc(var(--spacing) * 4)}.scroll-mt-20{scroll-margin-top:calc(var(--spacing) * 20)}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-\[auto_1fr\]{grid-template-columns:auto 1fr}.grid-rows-\[auto_minmax\(0\,1fr\)_auto\]{grid-template-rows:auto minmax(0,1fr) auto}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.place-content-center{place-content:center}.place-items-center{place-items:center}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-6{gap:calc(var(--spacing) * 6)}.gap-8{gap:calc(var(--spacing) * 8)}:where(.space-y-0\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * .5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * .5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-8>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 8) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 8) * calc(1 - var(--tw-space-y-reverse)))}.gap-x-3{column-gap:calc(var(--spacing) * 3)}.gap-y-1{row-gap:var(--spacing)}.self-center{align-self:center}.self-start{align-self:flex-start}.self-stretch{align-self:stretch}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-x-clip{overflow-x:clip}.overflow-y-auto{overflow-y:auto}.overscroll-contain{overscroll-behavior:contain}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:calc(var(--radius) * 1.8)}.rounded-\[4px\]{border-radius:4px}.rounded-\[7px\]{border-radius:7px}.rounded-\[9px\]{border-radius:9px}.rounded-\[10px\]{border-radius:10px}.rounded-\[12px\]{border-radius:12px}.rounded-\[inherit\]{border-radius:inherit}.rounded-full{border-radius:2147483647px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) * .8)}.rounded-sm{border-radius:calc(var(--radius) * .6)}.rounded-xl{border-radius:calc(var(--radius) * 1.4)}.rounded-s-lg{border-start-start-radius:var(--radius);border-end-start-radius:var(--radius)}.rounded-e-lg{border-start-end-radius:var(--radius);border-end-end-radius:var(--radius)}.border{border-style:var(--tw-border-style);border-width:1px}.border-s{border-inline-start-style:var(--tw-border-style);border-inline-start-width:1px}.border-e{border-inline-end-style:var(--tw-border-style);border-inline-end-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-amber-500\/50{border-color:var(--status-warning)}@supports (color:color-mix(in lab, red, red)){.border-amber-500\/50{border-color:color-mix(in oklab, var(--status-warning) 50%, transparent)}}.border-blue-600\/40{border-color:var(--status-info-label)}@supports (color:color-mix(in lab, red, red)){.border-blue-600\/40{border-color:color-mix(in oklab, var(--status-info-label) 40%, transparent)}}.border-border,.border-border\/60{border-color:var(--border)}@supports (color:color-mix(in lab, red, red)){.border-border\/60{border-color:color-mix(in oklab, var(--border) 60%, transparent)}}.border-current{border-color:currentColor}.border-destructive\/25{border-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.border-destructive\/25{border-color:color-mix(in oklab, var(--destructive) 25%, transparent)}}.border-green-600\/40{border-color:var(--status-success-label)}@supports (color:color-mix(in lab, red, red)){.border-green-600\/40{border-color:color-mix(in oklab, var(--status-success-label) 40%, transparent)}}.border-input{border-color:var(--input)}.border-orange-600\/40{border-color:var(--status-warning-label)}@supports (color:color-mix(in lab, red, red)){.border-orange-600\/40{border-color:color-mix(in oklab, var(--status-warning-label) 40%, transparent)}}.border-primary\/25{border-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.border-primary\/25{border-color:color-mix(in oklab, var(--primary) 25%, transparent)}}.border-primary\/40{border-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.border-primary\/40{border-color:color-mix(in oklab, var(--primary) 40%, transparent)}}.border-primary\/50{border-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.border-primary\/50{border-color:color-mix(in oklab, var(--primary) 50%, transparent)}}.border-red-600\/40{border-color:var(--destructive-label)}@supports (color:color-mix(in lab, red, red)){.border-red-600\/40{border-color:color-mix(in oklab, var(--destructive-label) 40%, transparent)}}.border-sidebar-border,.border-sidebar-border\/80{border-color:var(--sidebar-border)}@supports (color:color-mix(in lab, red, red)){.border-sidebar-border\/80{border-color:color-mix(in oklab, var(--sidebar-border) 80%, transparent)}}.border-status-success{border-color:var(--status-success-label)}.border-transparent{border-color:#0000}.border-t-transparent{border-top-color:#0000}.border-l-transparent{border-left-color:#0000}.bg-background,.bg-background\/95{background-color:var(--background)}@supports (color:color-mix(in lab, red, red)){.bg-background\/95{background-color:color-mix(in oklab, var(--background) 95%, transparent)}}.bg-black\/50{background-color:#00000080}@supports (color:color-mix(in lab, red, red)){.bg-black\/50{background-color:color-mix(in oklab, var(--color-black) 50%, transparent)}}.bg-blue-500\/15{background-color:var(--status-info)}@supports (color:color-mix(in lab, red, red)){.bg-blue-500\/15{background-color:color-mix(in oklab, var(--status-info) 15%, transparent)}}.bg-blue-500\/30{background-color:var(--status-info)}@supports (color:color-mix(in lab, red, red)){.bg-blue-500\/30{background-color:color-mix(in oklab, var(--status-info) 30%, transparent)}}.bg-border{background-color:var(--border)}.bg-card,.bg-card\/70{background-color:var(--card)}@supports (color:color-mix(in lab, red, red)){.bg-card\/70{background-color:color-mix(in oklab, var(--card) 70%, transparent)}}.bg-destructive\/10{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.bg-destructive\/10{background-color:color-mix(in oklab, var(--destructive) 10%, transparent)}}.bg-green-500\/15{background-color:var(--status-success)}@supports (color:color-mix(in lab, red, red)){.bg-green-500\/15{background-color:color-mix(in oklab, var(--status-success) 15%, transparent)}}.bg-muted,.bg-muted\/40{background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.bg-muted\/40{background-color:color-mix(in oklab, var(--muted) 40%, transparent)}}.bg-muted\/50{background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.bg-muted\/50{background-color:color-mix(in oklab, var(--muted) 50%, transparent)}}.bg-orange-500\/15{background-color:var(--status-warning)}@supports (color:color-mix(in lab, red, red)){.bg-orange-500\/15{background-color:color-mix(in oklab, var(--status-warning) 15%, transparent)}}.bg-popover{background-color:var(--popover)}.bg-primary,.bg-primary\/10{background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.bg-primary\/10{background-color:color-mix(in oklab, var(--primary) 10%, transparent)}}.bg-red-500\/15{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.bg-red-500\/15{background-color:color-mix(in oklab, var(--destructive) 15%, transparent)}}.bg-secondary{background-color:var(--secondary)}.bg-selection{background-color:var(--selection)}.bg-sidebar{background-color:var(--sidebar)}.bg-sidebar-accent{background-color:var(--sidebar-accent)}.bg-sidebar-border{background-color:var(--sidebar-border)}.bg-transparent{background-color:#0000}.bg-clip-padding{background-clip:padding-box}.fill-current{fill:currentColor}.p-0\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:var(--spacing)}.p-1\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-6{padding:calc(var(--spacing) * 6)}.p-px{padding:1px}.px-1{padding-inline:var(--spacing)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-8{padding-block:calc(var(--spacing) * 8)}.py-10{padding-block:calc(var(--spacing) * 10)}.ps-0\.5{padding-inline-start:calc(var(--spacing) * .5)}.ps-2{padding-inline-start:calc(var(--spacing) * 2)}.ps-8{padding-inline-start:calc(var(--spacing) * 8)}.pe-2\.5{padding-inline-end:calc(var(--spacing) * 2.5)}.pe-10{padding-inline-end:calc(var(--spacing) * 10)}.pt-1{padding-top:var(--spacing)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pr-1{padding-right:var(--spacing)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.text-center{text-align:center}.text-end{text-align:end}.text-left{text-align:left}.text-start{text-align:start}.align-top{vertical-align:top}.font-mono{font-family:JetBrains Mono Variable,JetBrains Mono,Fira Code,ui-monospace,monospace}.text-page-title{font-size:1.5rem;line-height:var(--tw-leading,1.25)}.text-section-title{font-size:1.125rem;line-height:var(--tw-leading,1.4)}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-subsection-title{font-size:.9375rem;line-height:var(--tw-leading,1.4)}.text-ui{font-size:.875rem;line-height:var(--tw-leading,1.45)}.text-xs{font-size:.8125rem;line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-code{font-size:.75rem}.leading-normal{--tw-leading:var(--leading-normal);line-height:var(--leading-normal)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.\[color\:oklch\(0\.42_0\.13_var\(--category-hue\)\)\]{color:oklch(.42 .13 var(--category-hue))}.\[color\:oklch\(0\.42_0\.13_var\(--keyword-hue\)\)\]{color:oklch(.42 .13 var(--keyword-hue))}.\[color\:oklch\(0\.42_0\.13_var\(--memory-type-hue\)\)\]{color:oklch(.42 .13 var(--memory-type-hue))}.text-amber-600,.text-amber-700{color:var(--status-warning-label)}.text-blue-700{color:var(--status-info-label)}.text-brand-label{color:var(--brand-label)}.text-card-foreground{color:var(--card-foreground)}.text-current{color:currentColor}.text-destructive{color:var(--destructive)}.text-destructive-label{color:var(--destructive-label)}.text-emerald-500{color:var(--status-success-label)}.text-foreground{color:var(--foreground)}.text-green-600,.text-green-700{color:var(--status-success-label)}.text-muted-foreground{color:var(--muted-foreground)}.text-orange-700{color:var(--status-warning-label)}.text-popover-foreground{color:var(--popover-foreground)}.text-primary{color:var(--primary)}.text-primary-label{color:var(--primary-label)}.text-red-600,.text-red-700{color:var(--destructive-label)}.text-secondary-foreground{color:var(--secondary-foreground)}.text-sidebar-accent-foreground{color:var(--sidebar-accent-foreground)}.text-sidebar-foreground{color:var(--sidebar-foreground)}.text-status-success{color:var(--status-success-label)}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.line-through{text-decoration-line:line-through}.underline{text-decoration-line:underline}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-50{opacity:.5}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring,.ring-1{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-input{--tw-ring-color:var(--input)}.ring-offset-1{--tw-ring-offset-width:1px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.ring-offset-background{--tw-ring-offset-color:var(--background)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[color\,box-shadow\]{transition-property:color,box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[transform\,width\]{transition-property:transform,width;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.ease-in{--tw-ease:var(--ease-in);transition-timing-function:var(--ease-in)}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.\!paused{animation-play-state:paused!important}.\!running{animation-play-state:running!important}.\[unicode-bidi\:plaintext\]{unicode-bidi:plaintext}.paused{animation-play-state:paused}.running{animation-play-state:running}.group-focus-within\/tooltip\:opacity-100:is(:where(.group\/tooltip):focus-within *){opacity:1}@media (hover:hover){.group-hover\/tooltip\:opacity-100:is(:where(.group\/tooltip):hover *){opacity:1}}.group-data-\[disabled\=true\]\:pointer-events-none:is(:where(.group)[data-disabled=true] *){pointer-events:none}.group-data-\[disabled\=true\]\:opacity-50:is(:where(.group)[data-disabled=true] *){opacity:.5}.peer-disabled\:cursor-not-allowed:is(:where(.peer):disabled~*){cursor:not-allowed}.peer-disabled\:opacity-50:is(:where(.peer):disabled~*){opacity:.5}.selection\:bg-selection ::selection{background-color:var(--selection)}.selection\:bg-selection::selection{background-color:var(--selection)}.selection\:text-foreground ::selection{color:var(--foreground)}.selection\:text-foreground::selection{color:var(--foreground)}.file\:inline-flex::file-selector-button{display:inline-flex}.file\:h-6::file-selector-button{height:calc(var(--spacing) * 6)}.file\:border-0::file-selector-button{border-style:var(--tw-border-style);border-width:0}.file\:bg-transparent::file-selector-button{background-color:#0000}.file\:text-ui::file-selector-button{font-size:.875rem;line-height:var(--tw-leading,1.45)}.file\:font-medium::file-selector-button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.file\:text-foreground::file-selector-button{color:var(--foreground)}.placeholder\:text-muted-foreground::placeholder{color:var(--muted-foreground)}@media (hover:hover){.hover\:bg-destructive\/16:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-destructive\/16:hover{background-color:color-mix(in oklab, var(--destructive) 16%, transparent)}}.hover\:bg-interactive-hover:hover{background-color:var(--interactive-hover)}.hover\:bg-muted:hover,.hover\:bg-muted\/30:hover{background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-muted\/30:hover{background-color:color-mix(in oklab, var(--muted) 30%, transparent)}}.hover\:bg-muted\/40:hover{background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-muted\/40:hover{background-color:color-mix(in oklab, var(--muted) 40%, transparent)}}.hover\:bg-primary\/16:hover{background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-primary\/16:hover{background-color:color-mix(in oklab, var(--primary) 16%, transparent)}}.hover\:text-foreground:hover{color:var(--foreground)}.hover\:text-muted-foreground:hover{color:var(--muted-foreground)}.hover\:text-primary:hover{color:var(--primary)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-90:hover{opacity:.9}}.focus-visible\:border-ring:focus-visible{border-color:var(--ring)}.focus-visible\:bg-selection:focus-visible{background-color:var(--selection)}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\:ring-\[3px\]:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\:ring-ring:focus-visible,.focus-visible\:ring-ring\/50:focus-visible{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){.focus-visible\:ring-ring\/50:focus-visible{--tw-ring-color:color-mix(in oklab, var(--ring) 50%, transparent)}}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus-visible\:ring-offset-background:focus-visible{--tw-ring-offset-color:var(--background)}.focus-visible\:outline-1:focus-visible{outline-style:var(--tw-outline-style);outline-width:1px}.focus-visible\:outline-2:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px}.focus-visible\:outline-offset-2:focus-visible{outline-offset:2px}.focus-visible\:outline-ring:focus-visible{outline-color:var(--ring)}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.active\:bg-destructive\/22:active{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.active\:bg-destructive\/22:active{background-color:color-mix(in oklab, var(--destructive) 22%, transparent)}}.active\:bg-interactive-active:active{background-color:var(--interactive-active)}.active\:bg-primary\/22:active{background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.active\:bg-primary\/22:active{background-color:color-mix(in oklab, var(--primary) 22%, transparent)}}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.has-data-\[icon\=inline-end\]\:pe-2:has([data-icon=inline-end]){padding-inline-end:calc(var(--spacing) * 2)}.has-data-\[icon\=inline-end\]\:pe-2\.5:has([data-icon=inline-end]){padding-inline-end:calc(var(--spacing) * 2.5)}.has-data-\[icon\=inline-end\]\:pe-3:has([data-icon=inline-end]){padding-inline-end:calc(var(--spacing) * 3)}.has-data-\[icon\=inline-end\]\:pr-1\.5:has([data-icon=inline-end]){padding-right:calc(var(--spacing) * 1.5)}.has-data-\[icon\=inline-start\]\:ps-2:has([data-icon=inline-start]){padding-inline-start:calc(var(--spacing) * 2)}.has-data-\[icon\=inline-start\]\:ps-2\.5:has([data-icon=inline-start]){padding-inline-start:calc(var(--spacing) * 2.5)}.has-data-\[icon\=inline-start\]\:ps-3:has([data-icon=inline-start]){padding-inline-start:calc(var(--spacing) * 3)}.has-data-\[icon\=inline-start\]\:pl-1\.5:has([data-icon=inline-start]){padding-left:calc(var(--spacing) * 1.5)}.has-data-\[slot\=alert-action\]\:relative:has([data-slot=alert-action]){position:relative}.has-data-\[slot\=alert-action\]\:pe-18:has([data-slot=alert-action]){padding-inline-end:calc(var(--spacing) * 18)}.has-\[\>svg\]\:grid-cols-\[auto_minmax\(0\,1fr\)\]:has(>svg){grid-template-columns:auto minmax(0,1fr)}.has-\[\>svg\]\:gap-x-2\.5:has(>svg){column-gap:calc(var(--spacing) * 2.5)}.aria-checked\:bg-selection[aria-checked=true],.aria-expanded\:bg-selection[aria-expanded=true]{background-color:var(--selection)}.aria-invalid\:border-destructive[aria-invalid=true]{border-color:var(--destructive)}.aria-invalid\:ring-1[aria-invalid=true]{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.aria-invalid\:ring-destructive[aria-invalid=true],.aria-invalid\:ring-destructive\/20[aria-invalid=true]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.aria-invalid\:ring-destructive\/20[aria-invalid=true]{--tw-ring-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.data-\[orientation\=horizontal\]\:h-px[data-orientation=horizontal]{height:1px}.data-\[orientation\=horizontal\]\:w-full[data-orientation=horizontal]{width:100%}.data-\[orientation\=vertical\]\:h-full[data-orientation=vertical]{height:100%}.data-\[orientation\=vertical\]\:w-px[data-orientation=vertical]{width:1px}:is(.\*\:data-\[slot\=alert-description\]\:text-destructive-label>*)[data-slot=alert-description]{color:var(--destructive-label)}.data-\[state\=checked\]\:border-primary[data-state=checked]{border-color:var(--primary)}.data-\[state\=checked\]\:bg-primary[data-state=checked]{background-color:var(--primary)}.data-\[state\=checked\]\:text-primary-foreground[data-state=checked]{color:var(--primary-foreground)}.data-\[state\=closed\]\:animate-out[data-state=closed]{animation:exit var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\[state\=open\]\:animate-in[data-state=open]{animation:enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity:0}@media not all and (width>=48rem){.max-md\:hidden{display:none}.max-md\:-translate-x-full{--tw-translate-x:-100%;translate:var(--tw-translate-x) var(--tw-translate-y)}}@media (width>=40rem){.sm\:max-w-2xl{max-width:var(--container-2xl)}.sm\:max-w-lg{max-width:var(--container-lg)}.sm\:max-w-md{max-width:var(--container-md)}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-\[1fr_auto_1fr\]{grid-template-columns:1fr auto 1fr}.sm\:flex-row{flex-direction:row}.sm\:justify-end{justify-content:flex-end}}@media (width>=48rem){.md\:sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.md\:sticky{position:sticky}.md\:top-0{top:0}.md\:mx-auto{margin-inline:auto}.md\:hidden{display:none}.md\:inline-flex{display:inline-flex}.md\:min-h-7{min-height:calc(var(--spacing) * 7)}.md\:min-h-8{min-height:calc(var(--spacing) * 8)}.md\:min-h-9{min-height:calc(var(--spacing) * 9)}.md\:w-14{width:calc(var(--spacing) * 14)}.md\:min-w-7{min-width:calc(var(--spacing) * 7)}.md\:translate-x-0\!{--tw-translate-x:0px!important;translate:var(--tw-translate-x) var(--tw-translate-y)!important}.md\:scroll-mt-4{scroll-margin-top:calc(var(--spacing) * 4)}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:flex-col{flex-direction:column}.md\:justify-center{justify-content:center}.md\:border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.md\:border-sidebar-border{border-color:var(--sidebar-border)}.md\:p-6{padding:calc(var(--spacing) * 6)}.md\:px-0{padding-inline:0}.md\:px-2{padding-inline:calc(var(--spacing) * 2)}}@media (width>=64rem){.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}.rtl\:-scale-x-100:where(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),[dir=rtl],[dir=rtl] *){--tw-scale-x:calc(100% * -1);scale:var(--tw-scale-x) var(--tw-scale-y)}.rtl\:rotate-90:where(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),[dir=rtl],[dir=rtl] *){rotate:90deg}@media not all and (width>=48rem){.max-md\:rtl\:translate-x-full:where(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),[dir=rtl],[dir=rtl] *){--tw-translate-x:100%;translate:var(--tw-translate-x) var(--tw-translate-y)}}.dark\:bg-blue-400\/30:is(.dark *){background-color:var(--status-info-label)}@supports (color:color-mix(in lab, red, red)){.dark\:bg-blue-400\/30:is(.dark *){background-color:color-mix(in oklab, var(--status-info-label) 30%, transparent)}}.dark\:bg-destructive\/16:is(.dark *){background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\:bg-destructive\/16:is(.dark *){background-color:color-mix(in oklab, var(--destructive) 16%, transparent)}}.dark\:bg-primary\/16:is(.dark *){background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.dark\:bg-primary\/16:is(.dark *){background-color:color-mix(in oklab, var(--primary) 16%, transparent)}}.dark\:\[color\:oklch\(0\.8_0\.13_var\(--category-hue\)\)\]:is(.dark *){color:oklch(.8 .13 var(--category-hue))}.dark\:\[color\:oklch\(0\.8_0\.13_var\(--keyword-hue\)\)\]:is(.dark *){color:oklch(.8 .13 var(--keyword-hue))}.dark\:\[color\:oklch\(0\.8_0\.13_var\(--memory-type-hue\)\)\]:is(.dark *){color:oklch(.8 .13 var(--memory-type-hue))}.dark\:text-blue-400:is(.dark *){color:var(--status-info-label)}.dark\:text-green-400:is(.dark *){color:var(--status-success-label)}.dark\:text-orange-400:is(.dark *){color:var(--status-warning-label)}.dark\:text-red-400:is(.dark *){color:var(--destructive-label)}@media (hover:hover){.dark\:hover\:bg-destructive\/22:is(.dark *):hover{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\:hover\:bg-destructive\/22:is(.dark *):hover{background-color:color-mix(in oklab, var(--destructive) 22%, transparent)}}.dark\:hover\:bg-muted\/50:is(.dark *):hover{background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.dark\:hover\:bg-muted\/50:is(.dark *):hover{background-color:color-mix(in oklab, var(--muted) 50%, transparent)}}.dark\:hover\:bg-primary\/22:is(.dark *):hover{background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.dark\:hover\:bg-primary\/22:is(.dark *):hover{background-color:color-mix(in oklab, var(--primary) 22%, transparent)}}}.dark\:active\:bg-destructive\/30:is(.dark *):active{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\:active\:bg-destructive\/30:is(.dark *):active{background-color:color-mix(in oklab, var(--destructive) 30%, transparent)}}.dark\:active\:bg-primary\/30:is(.dark *):active{background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.dark\:active\:bg-primary\/30:is(.dark *):active{background-color:color-mix(in oklab, var(--primary) 30%, transparent)}}.dark\:aria-invalid\:ring-destructive\/40:is(.dark *)[aria-invalid=true]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\:aria-invalid\:ring-destructive\/40:is(.dark *)[aria-invalid=true]{--tw-ring-color:color-mix(in oklab, var(--destructive) 40%, transparent)}}.\[\&_button\]\:h-auto button{height:auto}.\[\&_button\]\:min-h-8 button{min-height:calc(var(--spacing) * 8)}.\[\&_button\]\:py-1\.5 button{padding-block:calc(var(--spacing) * 1.5)}.\[\&_button\]\:whitespace-normal button{white-space:normal}.\[\&_p\]\:leading-relaxed p{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-3 svg:not([class*=size-]){width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.\[\&_svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-4 svg:not([class*=size-]){width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}@media (hover:hover){.\[a\]\:hover\:bg-destructive\/16:is(a):hover{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.\[a\]\:hover\:bg-destructive\/16:is(a):hover{background-color:color-mix(in oklab, var(--destructive) 16%, transparent)}}.\[a\]\:hover\:bg-muted:is(a):hover{background-color:var(--muted)}.\[a\]\:hover\:bg-primary\/16:is(a):hover{background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.\[a\]\:hover\:bg-primary\/16:is(a):hover{background-color:color-mix(in oklab, var(--primary) 16%, transparent)}}.\[a\]\:hover\:bg-secondary\/80:is(a):hover{background-color:var(--secondary)}@supports (color:color-mix(in lab, red, red)){.\[a\]\:hover\:bg-secondary\/80:is(a):hover{background-color:color-mix(in oklab, var(--secondary) 80%, transparent)}}.\[a\]\:hover\:text-muted-foreground:is(a):hover{color:var(--muted-foreground)}}:is(.\*\:\[svg\]\:row-span-2>*):is(svg){grid-row:span 2/span 2}:is(.\*\:\[svg\]\:translate-y-0\.5>*):is(svg){--tw-translate-y:calc(var(--spacing) * .5);translate:var(--tw-translate-x) var(--tw-translate-y)}:is(.\*\:\[svg\]\:text-current>*):is(svg){color:currentColor}:is(.\*\:\[svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-4>*):is(svg:not([class*=size-])){width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}@media (width>=48rem){.md\:\[\&\>\*\]\:justify-center>*{justify-content:center}.md\:\[\&\>\*\]\:rounded-none>*{border-radius:0}.md\:\[\&\>\*\]\:py-1\.5>*{padding-block:calc(var(--spacing) * 1.5)}.md\:\[\&\>\*\+\*\]\:border-s-0>*+*{border-inline-start-style:var(--tw-border-style);border-inline-start-width:0}.md\:\[\&\>\*\+\*\]\:border-t>*+*{border-top-style:var(--tw-border-style);border-top-width:1px}}.\[\&\>svg\]\:pointer-events-none>svg{pointer-events:none}.\[\&\>svg\]\:size-3\!>svg{width:calc(var(--spacing) * 3)!important;height:calc(var(--spacing) * 3)!important}}@property --tw-animation-delay{syntax:"*";inherits:false;initial-value:0s}@property --tw-animation-direction{syntax:"*";inherits:false;initial-value:normal}@property --tw-animation-duration{syntax:"*";inherits:false}@property --tw-animation-fill-mode{syntax:"*";inherits:false;initial-value:none}@property --tw-animation-iteration-count{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-translate-y{syntax:"*";inherits:false;initial-value:0}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(data:font/woff2;base64,d09GMgABAAAAAAfsABQAAAAAEAwAAAeCAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGhwbHhwoP0hWQVJbBmA/U1RBVIFiJyYAdC9qEQgKhGSEAAsgADCGCAE2AiQDOgQgBYlMB4EUDAcbLQ4onoexrSC/2ZyLAa8p8VHB8/x3Vue+V0hVJalMJg2nx/TCrQXxBeqLjQG7FyM1WEa/X1tEXN7cFz9EJEMmMUz3RihWSSKeQCbcIou0izz/C8v+fq3VfajEa9gDD11CImXS7qL/RJFVzC1qiB6KmKeD6TZdQ6IRGv78dL6uSVVCfgni5mzu7kcgQBgAEAQTQRCoL++STTYybkJxNfQxAAIAGu8OdEB9teW2jh4BpgDqFjAeSEByW3zFP0CBBgNMsMCGEDjgggdhiEAUAeIIED7ABTDUEnkIE9Q9ahFgKttcVhApo4ACB4qobHaccgDfEjFO6aaWUhjMLt2SyIvHKoDqoA4CSUwEIYQCEjhAO9R1G6keDeDZGjNo+AhxOjCEGTr1WeIF3kYBiLAOKvkJSMiKX0VdAyQt3SDJClCkxJCHkCzfqyVTriJZLcolS32JZHUekq2TYNkYtCtjYHMQXSxGjXDz2t/yLWXzDzxz+o3zFwDEaN23F+13pyMdQAEaSKAR9vcGq4A4MTSKCElGW+M7UcY7xqkggITb28ZJhlqc9q2twYKTt0NjixBgYvO9BIihEBLYuOFXQzfIQ7dXGUEEEgFDooBfAzqiQbpJrhiWSuKJCRFKYbHCyJKI2G5GiZbNAvgAu5pc3vwx4G+g3aDkhklABiSz0BICXrYghtYhx/cdJ+44rY2oZ0aMNRFz3VZjb6W33F3gzltqtOCV8tTHSpOeXuItfvr5lCdfzFpqtEitvqdcdGGFd28ZqqC0tPbeChGXgrIlnhSWu/eUso4uKWFLugyDzQJhflY4659+WjQ++6x72WUMv9G8mw6QJl7BVxX5fe/kpUsOvnZwee9uQ0cGXYd0o89XB2748sDSnt8d2VphdOTTgceDVvOds0v9P/s7HPq15aGun/6Vllb56f1dl0t1LejqrNkpdRZsG8TOnM5vkBG5oiVyVGnS8LHps5cfNWJs6qKPfaNSxiQNBUm3cKNWROr0GSur7Za31k1vieq7LH11VF+jXdRIasRKflc7jkobm1Z9te1IyZA0pDkhLR98+H37Zf1c/8at+dB7x+7GfVyTfJMPiYztsnl59Y5l4j+0n1RXlpHnF3Tq7HecmNF/CJodEMAikruxiyJaGLvHOdAfoA+oDvpjBm2b91cHGRZMU9n25xEU0A8fgEEAdKI3Q1iDtc034sug5YVMkE2jsE+BIkwSoQ3gxXMqz9tELp48bd0cFKOKS7xYjEuXBnZP5ia7DyiO/X/YI+PQSbt2uSdqAkWL9nQbV1XB94/+uPfdZz8dnXYFBYrcTl2SIR/ybxJNJPz/Gupb0JaZeens2ekC7EKr8t+Ls/P5VJPYJdHKyqfg2nqU6bhlidzcddQV/7MmecTzJ5VPcKXkNKSEogHjYFx6QZ7rQ+FSe8njaiNuOnXS8H2ScQ619c2mC3VTtauL0rRbXd/CkSOP37FY9Zkjz8+GibYUMOEWF+RdrFS8Ecv1SHOpPUPZGEIpjPvFyU5cXKjd6OXqorTqy9GwRd++HVufPGnVsW+aO3vggKZ18jR9sXaTC1PWTEsVUaK0FkNySbTQDqlm2PfDjZcu4aalnSLKjnOoYQ0nUlqqXcGpPu/4VgV/xU2pAqW4BW3qzhQ8/hFKhV2qE3+BKAtDqBXjfgnVdH4y0wg5tbVNRenNdTWOrenWLcupQdmsbq5b+18piTe/xRdp1xbILxNPJGInm2z6hoB21Lal0i+ePTtd7B45+3XhFJ329evskXm7qurUVREotqSluSo/L29d3qDhI4YOQqWhI4YNvBNfsMHeXKemXrxQfKeuPOGRVayA3JtkJKEgbPp+dXUDluddutRYLFoXGXWX6N3WFaGLbQtRSitVYNacTNSdy7AaG/HSaUEANcBoGXNdcZvZsOqQ1icBDv21/gzAoYPHH/WDW0qNR3QTYKEAEHig6o13NXbND06CQPlRtYjGNnSktRc09k1mAMDvAlDKfQjgy6fssInlfzmNAjKkDxoxHOBLdVRAIVt9j4qo+hA1w9T1aNBNTUOTTNUHLbqokE+UAfJXCIGw/IxCSL5GRUJeR40rL/UxTm4Q08H6MbCs70ObuNyIIXrINHQYInF06UUlevTjbQzTh5upiDMzMMogUtEnjPs/Y7jAHCJeB0GBHh04tC6FiB6ZFB1oArUSIoFoqhzCeAN6lHwm0T4C3VVPWvjpSMXReuWesMEcoqrmgtNBGd2noWeV0hNAz9rFeShNJxHGsPa3HXeKTk8b55hahySYHaYKKFFLpCfN8rsoaJn01CR04Gkc+5k7KVTCmClX8Q10HCrUEkVlSX+XO33oQR9609tJ516H497WSobWs5Up6TLaS10/dessIskgJSLiDlWvHVUywpkQ7hdPZqGyiEF0uVQerVcPamT1A3eKXdyI1vG9OoflrSXihZ1qqGE3nhmAgiIbRCQgPLEPtOM3UQwTLYaYYomNlpA44opnjV6jkD6id80OOrzf6BzmMD6eEa1zKyeYG1fzfEf16V6jw9XYOaar1/b2kP/IYX8oR2mcFvv2GtBV3JXgd437AQAA)format("woff2-variations");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-cyrillic-wght-normal-D73BlboJ.woff2)format("woff2-variations");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-greek-wght-normal-Bw9x6K1M.woff2)format("woff2-variations");unicode-range:U+370-377,U+37A-37F,U+384-38A,U+38C,U+38E-3A1,U+3A3-3FF}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-vietnamese-wght-normal-Bt-aOZkq.woff2)format("woff2-variations");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2)format("woff2-variations");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2)format("woff2-variations");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}:root{--background:#fdfcfa;--foreground:#393a34;--card:#f8f7f5;--card-foreground:#393a34;--popover:#f8f7f5;--popover-foreground:#393a34;--primary:#b35017;--primary-foreground:#fff;--primary-hover:#9a4310;--primary-active:#85390c;--primary-label:#85390c;--brand-label:#678d6c;--secondary:#f7f6f4;--secondary-foreground:#393a34;--muted:#f7f6f4;--muted-foreground:#5c5c54;--accent:#a9998f2b;--accent-foreground:#393a34;--selection:#a9998f2b;--interactive-hover:#0000000d;--interactive-active:#00000014;--destructive:#b7493f;--destructive-label:#8f3028;--border:#e5e1de;--border-hover:#cbc7c2;--input:#8b857d;--ring:#b35017;--status-warning:#8d6c15;--status-warning-label:#79590d;--status-success:#5f8d3d;--status-success-label:#426528;--status-info:#2d72c4;--status-info-label:#245faa;--chart-1:#b35017;--chart-2:#5f8d3d;--chart-3:#2d72c4;--chart-4:#8d6c15;--chart-5:#b7493f;--radius:.625rem;--sidebar:#f7f6f4;--sidebar-foreground:#393a34;--sidebar-primary:#b35017;--sidebar-primary-foreground:#fff;--sidebar-accent:#a9998f2b;--sidebar-accent-foreground:#393a34;--sidebar-border:#e5e1de;--sidebar-ring:#b35017;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light}.dark{--background:#120f0e;--foreground:#c9c5ba;--card:#181715;--card-foreground:#c9c5ba;--popover:#181715;--popover-foreground:#c9c5ba;--primary:#da7c47;--primary-foreground:#120f0e;--primary-hover:#eb8c57;--primary-active:#fd9b66;--primary-label:#fd9b66;--brand-label:#678d6c;--secondary:#171615;--secondary-foreground:#c9c5ba;--muted:#171615;--muted-foreground:#8f8b81;--accent:#c8c6c52b;--accent-foreground:#c9c5ba;--selection:#c8c6c52b;--interactive-hover:#ffffff12;--interactive-active:#ffffff1f;--destructive:#da5b4a;--destructive-label:#ff9b8e;--border:#242323;--border-hover:#504e4c;--input:#777169;--ring:#da7c47;--status-warning:#c67f13;--status-warning-label:#e7a33c;--status-success:#76ad4f;--status-success-label:#9ac974;--status-info:#479fe6;--status-info-label:#78b8ec;--chart-1:#da7c47;--chart-2:#76ad4f;--chart-3:#479fe6;--chart-4:#c67f13;--chart-5:#da5b4a;--sidebar:#171615;--sidebar-foreground:#c9c5ba;--sidebar-primary:#da7c47;--sidebar-primary-foreground:#120f0e;--sidebar-accent:#c8c6c52b;--sidebar-accent-foreground:#c9c5ba;--sidebar-border:#242323;--sidebar-ring:#da7c47;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}::selection{background:var(--selection);color:var(--foreground)}.markdown-content{word-break:break-word;line-height:1.6}.markdown-content pre{background:var(--muted);border:1px solid var(--border);border-radius:var(--radius);padding:.75rem;overflow-x:auto}.markdown-content code{font-family:var(--font-mono);font-size:.75rem}.markdown-content p{margin:.4em 0}.markdown-content :is(h1,h2,h3,h4,h5,h6){font-size:var(--text-ui);color:var(--muted-foreground);text-transform:uppercase;margin:.9em 0 .2em;font-weight:700;line-height:1.4}.markdown-content :is(h1,h2,h3,h4,h5,h6):first-child{margin-top:0}.confidence-ring{--p:0;background:conic-gradient(var(--primary) calc(var(--p) * 1%), var(--border) 0);border-radius:9999px;place-items:center;width:2.25rem;height:2.25rem;font-size:.65rem;display:grid}.confidence-ring span{background:var(--card);border-radius:9999px;place-items:center;width:1.75rem;height:1.75rem;display:grid}.settings-view button:not(:disabled){cursor:pointer}@media (prefers-reduced-motion:reduce){*,:before,:after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@keyframes spin{to{transform:rotate(360deg)}}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0)scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1))rotate(var(--tw-enter-rotate,0));filter:blur(var(--tw-enter-blur,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0)scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1))rotate(var(--tw-exit-rotate,0));filter:blur(var(--tw-exit-blur,0))}}.settings-view{overflow-wrap:anywhere;min-width:0;font-size:.875rem;line-height:1.45}.settings-view input:not([type=checkbox]):not([type=radio]):not([data-slot]),.settings-view select{border:1px solid var(--input);background:var(--card);min-width:0;max-width:100%;height:36px;color:var(--foreground);border-radius:10px;padding:4px 10px;font-size:.875rem;transition:background-color .15s}.settings-view input::placeholder{color:var(--muted-foreground)}.settings-view :is(input[type=checkbox],input[type=radio]){accent-color:var(--primary);flex-shrink:0}.settings-view button:not([data-slot]):not([role=combobox]):not(.underline){border:1px solid var(--input);background:var(--card);white-space:normal;border-radius:10px;max-width:100%;min-height:36px;padding:4px 10px;transition:background-color .15s}.settings-view button:not([data-slot]):not([role=combobox]):not(:disabled):hover{background:var(--interactive-hover)}.settings-view button:not([data-slot]):not([role=combobox]):not(:disabled):active{background:var(--interactive-active)}.settings-view :is(input,select,button):not([data-slot]):focus-visible{outline:2px solid var(--ring);outline-offset:2px}.settings-view :is(input,select,button):disabled{cursor:not-allowed;opacity:.5}.settings-view :is(input,select)[aria-invalid=true]{border-color:var(--destructive)}.settings-view :is(code,pre,.font-mono){direction:ltr;unicode-bidi:isolate;font-size:.75rem}.settings-view #settings-section-external-api input:not([type=radio]),.settings-view #directory-maps input:not([type=checkbox]){font-family:var(--font-mono);direction:ltr;unicode-bidi:isolate}.settings-view .flex>*,.settings-view .grid>*{min-width:0}.settings-view table{overflow-wrap:normal}
@@ -6,8 +6,8 @@
6
6
  <link rel="icon" type="image/svg+xml" href="/omms-icon.svg" />
7
7
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
8
8
  <title>omms Memory Explorer</title>
9
- <script type="module" crossorigin src="/assets/index-DnSx1elT.js"></script>
10
- <link rel="stylesheet" crossorigin href="/assets/index-DJrAbX8u.css">
9
+ <script type="module" crossorigin src="/assets/index-DGiJlMni.js"></script>
10
+ <link rel="stylesheet" crossorigin href="/assets/index-D_XfdWW4.css">
11
11
  </head>
12
12
  <body>
13
13
  <div id="app"></div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "om-memory-system",
3
- "version": "4.11.0",
3
+ "version": "4.12.0-next.100",
4
4
  "description": "Opinionated modular memory system for coding agents (OpenCode + Pi)",
5
5
  "type": "module",
6
6
  "main": "dist/plugin.js",
@@ -1,2 +0,0 @@
1
- /*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
2
- @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-blur:0;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-blur:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0}}}@layer theme{:root,:host{--font-sans:-apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;--font-mono:"JetBrains Mono Variable", "JetBrains Mono", "Fira Code", ui-monospace, monospace;--color-black:#000;--spacing:.25rem;--container-md:28rem;--container-lg:32rem;--container-2xl:42rem;--container-6xl:72rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--tracking-tight:-.025em;--tracking-wide:.025em;--leading-normal:1.5;--leading-relaxed:1.625;--ease-in:cubic-bezier(.4, 0, 1, 1);--animate-spin:spin 1s linear infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;--default-mono-font-family:"JetBrains Mono Variable", "JetBrains Mono", "Fira Code", ui-monospace, monospace;--text-ui:.875rem;--color-status-warning:var(--status-warning-label);--color-status-success:var(--status-success-label);--color-status-info:var(--status-info-label);--color-selection:var(--selection);--color-ring:var(--ring);--color-border:var(--border);--color-popover-foreground:var(--popover-foreground);--color-popover:var(--popover)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{border-color:var(--border);outline-color:var(--ring)}body{background-color:var(--background);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,system-ui,sans-serif;font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));color:var(--foreground);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0}html{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,system-ui,sans-serif}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.inset-x-0{inset-inline:0}.inset-y-0{inset-block:0}.start-0{inset-inline-start:calc(var(--spacing) * 0)}.end-3{inset-inline-end:calc(var(--spacing) * 3)}.end-4{inset-inline-end:calc(var(--spacing) * 4)}.top-0{top:0}.top-1\/2{top:50%}.top-3{top:calc(var(--spacing) * 3)}.top-4{top:calc(var(--spacing) * 4)}.top-full{top:100%}.bottom-full{bottom:100%}.left-1\/2{left:50%}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.z-\[60\]{z-index:60}.z-\[70\]{z-index:70}.col-start-2{grid-column-start:2}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.mx-auto{margin-inline:auto}.ms-1{margin-inline-start:var(--spacing)}.ms-2{margin-inline-start:calc(var(--spacing) * 2)}.ms-5{margin-inline-start:calc(var(--spacing) * 5)}.ms-auto{margin-inline-start:auto}.me-2{margin-inline-end:calc(var(--spacing) * 2)}.-mt-1{margin-top:calc(var(--spacing) * -1)}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-auto{margin-top:auto}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.ml-auto{margin-left:auto}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.grid\!{display:grid!important}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.field-sizing-content{field-sizing:content}.size-2{width:calc(var(--spacing) * 2);height:calc(var(--spacing) * 2)}.size-3{width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.size-3\.5{width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-5{width:calc(var(--spacing) * 5);height:calc(var(--spacing) * 5)}.size-6{width:calc(var(--spacing) * 6);height:calc(var(--spacing) * 6)}.size-8{width:calc(var(--spacing) * 8);height:calc(var(--spacing) * 8)}.size-9{width:calc(var(--spacing) * 9);height:calc(var(--spacing) * 9)}.size-10{width:calc(var(--spacing) * 10);height:calc(var(--spacing) * 10)}.size-full{width:100%;height:100%}.h-2{height:calc(var(--spacing) * 2)}.h-2\.5{height:calc(var(--spacing) * 2.5)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-auto{height:auto}.h-full{height:100%}.h-svh{height:100svh}.max-h-60{max-height:calc(var(--spacing) * 60)}.max-h-64{max-height:calc(var(--spacing) * 64)}.max-h-72{max-height:calc(var(--spacing) * 72)}.max-h-80{max-height:calc(var(--spacing) * 80)}.max-h-\[60vh\]{max-height:60vh}.max-h-\[90vh\]{max-height:90vh}.max-h-\[calc\(100dvh-2rem\)\]{max-height:calc(100dvh - 2rem)}.max-h-screen{max-height:100vh}.min-h-0{min-height:0}.min-h-5{min-height:calc(var(--spacing) * 5)}.min-h-6{min-height:calc(var(--spacing) * 6)}.min-h-8{min-height:calc(var(--spacing) * 8)}.min-h-11{min-height:calc(var(--spacing) * 11)}.min-h-16{min-height:calc(var(--spacing) * 16)}.min-h-32{min-height:calc(var(--spacing) * 32)}.min-h-svh{min-height:100svh}.w-2\.5{width:calc(var(--spacing) * 2.5)}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-20{width:calc(var(--spacing) * 20)}.w-24{width:calc(var(--spacing) * 24)}.w-36{width:calc(var(--spacing) * 36)}.w-44{width:calc(var(--spacing) * 44)}.w-64{width:calc(var(--spacing) * 64)}.w-fit{width:fit-content}.w-full{width:100%}.w-max{width:max-content}.max-w-6xl{max-width:var(--container-6xl)}.max-w-48{max-width:calc(var(--spacing) * 48)}.max-w-\[calc\(100\%-2rem\)\]{max-width:calc(100% - 2rem)}.max-w-\[min\(24rem\,calc\(100vw-1rem\)\)\]{max-width:min(24rem,100vw - 1rem)}.max-w-\[min\(40rem\,calc\(100vw-2rem\)\)\]{max-width:min(40rem,100vw - 2rem)}.max-w-full{max-width:100%}.max-w-md{max-width:var(--container-md)}.max-w-none{max-width:none}.min-w-0{min-width:0}.min-w-7{min-width:calc(var(--spacing) * 7)}.min-w-11{min-width:calc(var(--spacing) * 11)}.min-w-\[56rem\]{min-width:56rem}.min-w-full{min-width:100%}.min-w-max{min-width:max-content}.flex-1{flex:1}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.basis-56{flex-basis:calc(var(--spacing) * 56)}.-translate-x-1\/2{--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-0{--tw-translate-x:0px;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.rotate-45{rotate:45deg}.rotate-90{rotate:90deg}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-spin{animation:var(--animate-spin)}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.scroll-mt-4{scroll-margin-top:calc(var(--spacing) * 4)}.scroll-mt-20{scroll-margin-top:calc(var(--spacing) * 20)}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-\[auto_1fr\]{grid-template-columns:auto 1fr}.grid-rows-\[auto_minmax\(0\,1fr\)_auto\]{grid-template-rows:auto minmax(0,1fr) auto}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.place-content-center{place-content:center}.place-items-center{place-items:center}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-6{gap:calc(var(--spacing) * 6)}:where(.space-y-0\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * .5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * .5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}.gap-x-3{column-gap:calc(var(--spacing) * 3)}.gap-y-1{row-gap:var(--spacing)}.self-center{align-self:center}.self-stretch{align-self:stretch}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-x-clip{overflow-x:clip}.overflow-y-auto{overflow-y:auto}.overscroll-contain{overscroll-behavior:contain}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:calc(var(--radius) * 1.8)}.rounded-\[4px\]{border-radius:4px}.rounded-\[7px\]{border-radius:7px}.rounded-\[9px\]{border-radius:9px}.rounded-\[10px\]{border-radius:10px}.rounded-\[12px\]{border-radius:12px}.rounded-\[inherit\]{border-radius:inherit}.rounded-full{border-radius:2147483647px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) * .8)}.rounded-sm{border-radius:calc(var(--radius) * .6)}.rounded-xl{border-radius:calc(var(--radius) * 1.4)}.rounded-s-lg{border-start-start-radius:var(--radius);border-end-start-radius:var(--radius)}.rounded-e-lg{border-start-end-radius:var(--radius);border-end-end-radius:var(--radius)}.border{border-style:var(--tw-border-style);border-width:1px}.border-s{border-inline-start-style:var(--tw-border-style);border-inline-start-width:1px}.border-e{border-inline-end-style:var(--tw-border-style);border-inline-end-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-amber-500\/50{border-color:var(--status-warning)}@supports (color:color-mix(in lab, red, red)){.border-amber-500\/50{border-color:color-mix(in oklab, var(--status-warning) 50%, transparent)}}.border-blue-600\/40{border-color:var(--status-info-label)}@supports (color:color-mix(in lab, red, red)){.border-blue-600\/40{border-color:color-mix(in oklab, var(--status-info-label) 40%, transparent)}}.border-border,.border-border\/60{border-color:var(--border)}@supports (color:color-mix(in lab, red, red)){.border-border\/60{border-color:color-mix(in oklab, var(--border) 60%, transparent)}}.border-current{border-color:currentColor}.border-destructive\/25{border-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.border-destructive\/25{border-color:color-mix(in oklab, var(--destructive) 25%, transparent)}}.border-green-600\/40{border-color:var(--status-success-label)}@supports (color:color-mix(in lab, red, red)){.border-green-600\/40{border-color:color-mix(in oklab, var(--status-success-label) 40%, transparent)}}.border-input{border-color:var(--input)}.border-orange-600\/40{border-color:var(--status-warning-label)}@supports (color:color-mix(in lab, red, red)){.border-orange-600\/40{border-color:color-mix(in oklab, var(--status-warning-label) 40%, transparent)}}.border-primary\/25{border-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.border-primary\/25{border-color:color-mix(in oklab, var(--primary) 25%, transparent)}}.border-primary\/40{border-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.border-primary\/40{border-color:color-mix(in oklab, var(--primary) 40%, transparent)}}.border-primary\/50{border-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.border-primary\/50{border-color:color-mix(in oklab, var(--primary) 50%, transparent)}}.border-red-600\/40{border-color:var(--destructive-label)}@supports (color:color-mix(in lab, red, red)){.border-red-600\/40{border-color:color-mix(in oklab, var(--destructive-label) 40%, transparent)}}.border-sidebar-border,.border-sidebar-border\/80{border-color:var(--sidebar-border)}@supports (color:color-mix(in lab, red, red)){.border-sidebar-border\/80{border-color:color-mix(in oklab, var(--sidebar-border) 80%, transparent)}}.border-status-success{border-color:var(--status-success-label)}.border-transparent{border-color:#0000}.border-t-transparent{border-top-color:#0000}.border-l-transparent{border-left-color:#0000}.bg-background,.bg-background\/95{background-color:var(--background)}@supports (color:color-mix(in lab, red, red)){.bg-background\/95{background-color:color-mix(in oklab, var(--background) 95%, transparent)}}.bg-black\/50{background-color:#00000080}@supports (color:color-mix(in lab, red, red)){.bg-black\/50{background-color:color-mix(in oklab, var(--color-black) 50%, transparent)}}.bg-blue-500\/15{background-color:var(--status-info)}@supports (color:color-mix(in lab, red, red)){.bg-blue-500\/15{background-color:color-mix(in oklab, var(--status-info) 15%, transparent)}}.bg-border{background-color:var(--border)}.bg-card,.bg-card\/70{background-color:var(--card)}@supports (color:color-mix(in lab, red, red)){.bg-card\/70{background-color:color-mix(in oklab, var(--card) 70%, transparent)}}.bg-destructive\/10{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.bg-destructive\/10{background-color:color-mix(in oklab, var(--destructive) 10%, transparent)}}.bg-green-500\/15{background-color:var(--status-success)}@supports (color:color-mix(in lab, red, red)){.bg-green-500\/15{background-color:color-mix(in oklab, var(--status-success) 15%, transparent)}}.bg-muted,.bg-muted\/40{background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.bg-muted\/40{background-color:color-mix(in oklab, var(--muted) 40%, transparent)}}.bg-muted\/50{background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.bg-muted\/50{background-color:color-mix(in oklab, var(--muted) 50%, transparent)}}.bg-orange-500\/15{background-color:var(--status-warning)}@supports (color:color-mix(in lab, red, red)){.bg-orange-500\/15{background-color:color-mix(in oklab, var(--status-warning) 15%, transparent)}}.bg-popover{background-color:var(--popover)}.bg-primary,.bg-primary\/10{background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.bg-primary\/10{background-color:color-mix(in oklab, var(--primary) 10%, transparent)}}.bg-red-500\/15{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.bg-red-500\/15{background-color:color-mix(in oklab, var(--destructive) 15%, transparent)}}.bg-secondary{background-color:var(--secondary)}.bg-selection{background-color:var(--selection)}.bg-sidebar{background-color:var(--sidebar)}.bg-sidebar-accent{background-color:var(--sidebar-accent)}.bg-sidebar-border{background-color:var(--sidebar-border)}.bg-transparent{background-color:#0000}.bg-clip-padding{background-clip:padding-box}.fill-current{fill:currentColor}.p-0\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:var(--spacing)}.p-1\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-6{padding:calc(var(--spacing) * 6)}.p-px{padding:1px}.px-1{padding-inline:var(--spacing)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-8{padding-block:calc(var(--spacing) * 8)}.py-10{padding-block:calc(var(--spacing) * 10)}.ps-2{padding-inline-start:calc(var(--spacing) * 2)}.ps-8{padding-inline-start:calc(var(--spacing) * 8)}.pe-10{padding-inline-end:calc(var(--spacing) * 10)}.pt-1{padding-top:var(--spacing)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pr-1{padding-right:var(--spacing)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.text-center{text-align:center}.text-end{text-align:end}.text-left{text-align:left}.text-start{text-align:start}.align-top{vertical-align:top}.font-mono{font-family:JetBrains Mono Variable,JetBrains Mono,Fira Code,ui-monospace,monospace}.text-page-title{font-size:1.5rem;line-height:var(--tw-leading,1.25)}.text-section-title{font-size:1.125rem;line-height:var(--tw-leading,1.4)}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-subsection-title{font-size:.9375rem;line-height:var(--tw-leading,1.4)}.text-ui{font-size:.875rem;line-height:var(--tw-leading,1.45)}.text-xs{font-size:.8125rem;line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[10px\]{font-size:10px}.text-code{font-size:.75rem}.leading-normal{--tw-leading:var(--leading-normal);line-height:var(--leading-normal)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.\[color\:oklch\(0\.42_0\.13_var\(--keyword-hue\)\)\]{color:oklch(.42 .13 var(--keyword-hue))}.\[color\:oklch\(0\.42_0\.13_var\(--memory-type-hue\)\)\]{color:oklch(.42 .13 var(--memory-type-hue))}.text-amber-600,.text-amber-700{color:var(--status-warning-label)}.text-blue-700{color:var(--status-info-label)}.text-brand-label{color:var(--brand-label)}.text-card-foreground{color:var(--card-foreground)}.text-current{color:currentColor}.text-destructive{color:var(--destructive)}.text-destructive-label{color:var(--destructive-label)}.text-emerald-500{color:var(--status-success-label)}.text-foreground{color:var(--foreground)}.text-green-600,.text-green-700{color:var(--status-success-label)}.text-muted-foreground{color:var(--muted-foreground)}.text-orange-700{color:var(--status-warning-label)}.text-popover-foreground{color:var(--popover-foreground)}.text-primary{color:var(--primary)}.text-primary-label{color:var(--primary-label)}.text-red-600,.text-red-700{color:var(--destructive-label)}.text-secondary-foreground{color:var(--secondary-foreground)}.text-sidebar-accent-foreground{color:var(--sidebar-accent-foreground)}.text-sidebar-foreground{color:var(--sidebar-foreground)}.text-status-success{color:var(--status-success-label)}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.line-through{text-decoration-line:line-through}.underline{text-decoration-line:underline}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring,.ring-1{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-input{--tw-ring-color:var(--input)}.ring-offset-1{--tw-ring-offset-width:1px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.ring-offset-background{--tw-ring-offset-color:var(--background)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[color\,box-shadow\]{transition-property:color,box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[transform\,width\]{transition-property:transform,width;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.ease-in{--tw-ease:var(--ease-in);transition-timing-function:var(--ease-in)}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.\!paused{animation-play-state:paused!important}.\!running{animation-play-state:running!important}.\[unicode-bidi\:plaintext\]{unicode-bidi:plaintext}.paused{animation-play-state:paused}.running{animation-play-state:running}.group-focus-within\/tooltip\:opacity-100:is(:where(.group\/tooltip):focus-within *){opacity:1}@media (hover:hover){.group-hover\/tooltip\:opacity-100:is(:where(.group\/tooltip):hover *){opacity:1}}.group-data-\[disabled\=true\]\:pointer-events-none:is(:where(.group)[data-disabled=true] *){pointer-events:none}.group-data-\[disabled\=true\]\:opacity-50:is(:where(.group)[data-disabled=true] *){opacity:.5}.peer-disabled\:cursor-not-allowed:is(:where(.peer):disabled~*){cursor:not-allowed}.peer-disabled\:opacity-50:is(:where(.peer):disabled~*){opacity:.5}.selection\:bg-selection ::selection{background-color:var(--selection)}.selection\:bg-selection::selection{background-color:var(--selection)}.selection\:text-foreground ::selection{color:var(--foreground)}.selection\:text-foreground::selection{color:var(--foreground)}.file\:inline-flex::file-selector-button{display:inline-flex}.file\:h-6::file-selector-button{height:calc(var(--spacing) * 6)}.file\:border-0::file-selector-button{border-style:var(--tw-border-style);border-width:0}.file\:bg-transparent::file-selector-button{background-color:#0000}.file\:text-ui::file-selector-button{font-size:.875rem;line-height:var(--tw-leading,1.45)}.file\:font-medium::file-selector-button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.file\:text-foreground::file-selector-button{color:var(--foreground)}.placeholder\:text-muted-foreground::placeholder{color:var(--muted-foreground)}@media (hover:hover){.hover\:bg-destructive\/16:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-destructive\/16:hover{background-color:color-mix(in oklab, var(--destructive) 16%, transparent)}}.hover\:bg-interactive-hover:hover{background-color:var(--interactive-hover)}.hover\:bg-muted:hover,.hover\:bg-muted\/30:hover{background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-muted\/30:hover{background-color:color-mix(in oklab, var(--muted) 30%, transparent)}}.hover\:bg-muted\/40:hover{background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-muted\/40:hover{background-color:color-mix(in oklab, var(--muted) 40%, transparent)}}.hover\:bg-primary\/16:hover{background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-primary\/16:hover{background-color:color-mix(in oklab, var(--primary) 16%, transparent)}}.hover\:text-foreground:hover{color:var(--foreground)}.hover\:text-muted-foreground:hover{color:var(--muted-foreground)}.hover\:text-primary:hover{color:var(--primary)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-90:hover{opacity:.9}}.focus-visible\:border-ring:focus-visible{border-color:var(--ring)}.focus-visible\:bg-selection:focus-visible{background-color:var(--selection)}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\:ring-\[3px\]:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\:ring-ring:focus-visible,.focus-visible\:ring-ring\/50:focus-visible{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){.focus-visible\:ring-ring\/50:focus-visible{--tw-ring-color:color-mix(in oklab, var(--ring) 50%, transparent)}}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus-visible\:ring-offset-background:focus-visible{--tw-ring-offset-color:var(--background)}.focus-visible\:outline-1:focus-visible{outline-style:var(--tw-outline-style);outline-width:1px}.focus-visible\:outline-2:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px}.focus-visible\:outline-offset-2:focus-visible{outline-offset:2px}.focus-visible\:outline-ring:focus-visible{outline-color:var(--ring)}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.active\:bg-destructive\/22:active{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.active\:bg-destructive\/22:active{background-color:color-mix(in oklab, var(--destructive) 22%, transparent)}}.active\:bg-interactive-active:active{background-color:var(--interactive-active)}.active\:bg-primary\/22:active{background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.active\:bg-primary\/22:active{background-color:color-mix(in oklab, var(--primary) 22%, transparent)}}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.has-data-\[icon\=inline-end\]\:pe-2:has([data-icon=inline-end]){padding-inline-end:calc(var(--spacing) * 2)}.has-data-\[icon\=inline-end\]\:pe-2\.5:has([data-icon=inline-end]){padding-inline-end:calc(var(--spacing) * 2.5)}.has-data-\[icon\=inline-end\]\:pe-3:has([data-icon=inline-end]){padding-inline-end:calc(var(--spacing) * 3)}.has-data-\[icon\=inline-end\]\:pr-1\.5:has([data-icon=inline-end]){padding-right:calc(var(--spacing) * 1.5)}.has-data-\[icon\=inline-start\]\:ps-2:has([data-icon=inline-start]){padding-inline-start:calc(var(--spacing) * 2)}.has-data-\[icon\=inline-start\]\:ps-2\.5:has([data-icon=inline-start]){padding-inline-start:calc(var(--spacing) * 2.5)}.has-data-\[icon\=inline-start\]\:ps-3:has([data-icon=inline-start]){padding-inline-start:calc(var(--spacing) * 3)}.has-data-\[icon\=inline-start\]\:pl-1\.5:has([data-icon=inline-start]){padding-left:calc(var(--spacing) * 1.5)}.has-data-\[slot\=alert-action\]\:relative:has([data-slot=alert-action]){position:relative}.has-data-\[slot\=alert-action\]\:pe-18:has([data-slot=alert-action]){padding-inline-end:calc(var(--spacing) * 18)}.has-\[\>svg\]\:grid-cols-\[auto_minmax\(0\,1fr\)\]:has(>svg){grid-template-columns:auto minmax(0,1fr)}.has-\[\>svg\]\:gap-x-2\.5:has(>svg){column-gap:calc(var(--spacing) * 2.5)}.aria-checked\:bg-selection[aria-checked=true],.aria-expanded\:bg-selection[aria-expanded=true]{background-color:var(--selection)}.aria-invalid\:border-destructive[aria-invalid=true]{border-color:var(--destructive)}.aria-invalid\:ring-1[aria-invalid=true]{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.aria-invalid\:ring-destructive[aria-invalid=true],.aria-invalid\:ring-destructive\/20[aria-invalid=true]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.aria-invalid\:ring-destructive\/20[aria-invalid=true]{--tw-ring-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.data-\[orientation\=horizontal\]\:h-px[data-orientation=horizontal]{height:1px}.data-\[orientation\=horizontal\]\:w-full[data-orientation=horizontal]{width:100%}.data-\[orientation\=vertical\]\:h-full[data-orientation=vertical]{height:100%}.data-\[orientation\=vertical\]\:w-px[data-orientation=vertical]{width:1px}:is(.\*\:data-\[slot\=alert-description\]\:text-destructive-label>*)[data-slot=alert-description]{color:var(--destructive-label)}.data-\[state\=checked\]\:border-primary[data-state=checked]{border-color:var(--primary)}.data-\[state\=checked\]\:bg-primary[data-state=checked]{background-color:var(--primary)}.data-\[state\=checked\]\:text-primary-foreground[data-state=checked]{color:var(--primary-foreground)}.data-\[state\=closed\]\:animate-out[data-state=closed]{animation:exit var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\[state\=open\]\:animate-in[data-state=open]{animation:enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity:0}@media not all and (width>=48rem){.max-md\:hidden{display:none}.max-md\:-translate-x-full{--tw-translate-x:-100%;translate:var(--tw-translate-x) var(--tw-translate-y)}}@media (width>=40rem){.sm\:max-w-2xl{max-width:var(--container-2xl)}.sm\:max-w-lg{max-width:var(--container-lg)}.sm\:max-w-md{max-width:var(--container-md)}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-\[1fr_auto_1fr\]{grid-template-columns:1fr auto 1fr}.sm\:flex-row{flex-direction:row}.sm\:justify-end{justify-content:flex-end}}@media (width>=48rem){.md\:sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.md\:sticky{position:sticky}.md\:top-0{top:0}.md\:mx-auto{margin-inline:auto}.md\:hidden{display:none}.md\:inline-flex{display:inline-flex}.md\:min-h-7{min-height:calc(var(--spacing) * 7)}.md\:min-h-8{min-height:calc(var(--spacing) * 8)}.md\:min-h-9{min-height:calc(var(--spacing) * 9)}.md\:w-14{width:calc(var(--spacing) * 14)}.md\:min-w-7{min-width:calc(var(--spacing) * 7)}.md\:translate-x-0\!{--tw-translate-x:0px!important;translate:var(--tw-translate-x) var(--tw-translate-y)!important}.md\:scroll-mt-4{scroll-margin-top:calc(var(--spacing) * 4)}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:flex-col{flex-direction:column}.md\:justify-center{justify-content:center}.md\:border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.md\:border-sidebar-border{border-color:var(--sidebar-border)}.md\:p-6{padding:calc(var(--spacing) * 6)}.md\:px-0{padding-inline:0}.md\:px-2{padding-inline:calc(var(--spacing) * 2)}}@media (width>=64rem){.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}.rtl\:-scale-x-100:where(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),[dir=rtl],[dir=rtl] *){--tw-scale-x:calc(100% * -1);scale:var(--tw-scale-x) var(--tw-scale-y)}.rtl\:rotate-90:where(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),[dir=rtl],[dir=rtl] *){rotate:90deg}.rtl\:rotate-180:where(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),[dir=rtl],[dir=rtl] *){rotate:180deg}@media not all and (width>=48rem){.max-md\:rtl\:translate-x-full:where(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),[dir=rtl],[dir=rtl] *){--tw-translate-x:100%;translate:var(--tw-translate-x) var(--tw-translate-y)}}.dark\:bg-destructive\/16:is(.dark *){background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\:bg-destructive\/16:is(.dark *){background-color:color-mix(in oklab, var(--destructive) 16%, transparent)}}.dark\:bg-primary\/16:is(.dark *){background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.dark\:bg-primary\/16:is(.dark *){background-color:color-mix(in oklab, var(--primary) 16%, transparent)}}.dark\:\[color\:oklch\(0\.8_0\.13_var\(--keyword-hue\)\)\]:is(.dark *){color:oklch(.8 .13 var(--keyword-hue))}.dark\:\[color\:oklch\(0\.8_0\.13_var\(--memory-type-hue\)\)\]:is(.dark *){color:oklch(.8 .13 var(--memory-type-hue))}.dark\:text-blue-400:is(.dark *){color:var(--status-info-label)}.dark\:text-green-400:is(.dark *){color:var(--status-success-label)}.dark\:text-orange-400:is(.dark *){color:var(--status-warning-label)}.dark\:text-red-400:is(.dark *){color:var(--destructive-label)}@media (hover:hover){.dark\:hover\:bg-destructive\/22:is(.dark *):hover{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\:hover\:bg-destructive\/22:is(.dark *):hover{background-color:color-mix(in oklab, var(--destructive) 22%, transparent)}}.dark\:hover\:bg-muted\/50:is(.dark *):hover{background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.dark\:hover\:bg-muted\/50:is(.dark *):hover{background-color:color-mix(in oklab, var(--muted) 50%, transparent)}}.dark\:hover\:bg-primary\/22:is(.dark *):hover{background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.dark\:hover\:bg-primary\/22:is(.dark *):hover{background-color:color-mix(in oklab, var(--primary) 22%, transparent)}}}.dark\:active\:bg-destructive\/30:is(.dark *):active{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\:active\:bg-destructive\/30:is(.dark *):active{background-color:color-mix(in oklab, var(--destructive) 30%, transparent)}}.dark\:active\:bg-primary\/30:is(.dark *):active{background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.dark\:active\:bg-primary\/30:is(.dark *):active{background-color:color-mix(in oklab, var(--primary) 30%, transparent)}}.dark\:aria-invalid\:ring-destructive\/40:is(.dark *)[aria-invalid=true]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\:aria-invalid\:ring-destructive\/40:is(.dark *)[aria-invalid=true]{--tw-ring-color:color-mix(in oklab, var(--destructive) 40%, transparent)}}.\[\&_button\]\:h-auto button{height:auto}.\[\&_button\]\:min-h-8 button{min-height:calc(var(--spacing) * 8)}.\[\&_button\]\:py-1\.5 button{padding-block:calc(var(--spacing) * 1.5)}.\[\&_button\]\:whitespace-normal button{white-space:normal}.\[\&_p\]\:leading-relaxed p{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-3 svg:not([class*=size-]){width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.\[\&_svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-4 svg:not([class*=size-]){width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}@media (hover:hover){.\[a\]\:hover\:bg-destructive\/16:is(a):hover{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.\[a\]\:hover\:bg-destructive\/16:is(a):hover{background-color:color-mix(in oklab, var(--destructive) 16%, transparent)}}.\[a\]\:hover\:bg-muted:is(a):hover{background-color:var(--muted)}.\[a\]\:hover\:bg-primary\/16:is(a):hover{background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.\[a\]\:hover\:bg-primary\/16:is(a):hover{background-color:color-mix(in oklab, var(--primary) 16%, transparent)}}.\[a\]\:hover\:bg-secondary\/80:is(a):hover{background-color:var(--secondary)}@supports (color:color-mix(in lab, red, red)){.\[a\]\:hover\:bg-secondary\/80:is(a):hover{background-color:color-mix(in oklab, var(--secondary) 80%, transparent)}}.\[a\]\:hover\:text-muted-foreground:is(a):hover{color:var(--muted-foreground)}}:is(.\*\:\[svg\]\:row-span-2>*):is(svg){grid-row:span 2/span 2}:is(.\*\:\[svg\]\:translate-y-0\.5>*):is(svg){--tw-translate-y:calc(var(--spacing) * .5);translate:var(--tw-translate-x) var(--tw-translate-y)}:is(.\*\:\[svg\]\:text-current>*):is(svg){color:currentColor}:is(.\*\:\[svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-4>*):is(svg:not([class*=size-])){width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}@media (width>=48rem){.md\:\[\&\>\*\]\:justify-center>*{justify-content:center}.md\:\[\&\>\*\]\:rounded-none>*{border-radius:0}.md\:\[\&\>\*\]\:py-1\.5>*{padding-block:calc(var(--spacing) * 1.5)}.md\:\[\&\>\*\+\*\]\:border-s-0>*+*{border-inline-start-style:var(--tw-border-style);border-inline-start-width:0}.md\:\[\&\>\*\+\*\]\:border-t>*+*{border-top-style:var(--tw-border-style);border-top-width:1px}}.\[\&\>svg\]\:pointer-events-none>svg{pointer-events:none}.\[\&\>svg\]\:size-3\!>svg{width:calc(var(--spacing) * 3)!important;height:calc(var(--spacing) * 3)!important}}@property --tw-animation-delay{syntax:"*";inherits:false;initial-value:0s}@property --tw-animation-direction{syntax:"*";inherits:false;initial-value:normal}@property --tw-animation-duration{syntax:"*";inherits:false}@property --tw-animation-fill-mode{syntax:"*";inherits:false;initial-value:none}@property --tw-animation-iteration-count{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-translate-y{syntax:"*";inherits:false;initial-value:0}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(data:font/woff2;base64,d09GMgABAAAAAAfsABQAAAAAEAwAAAeCAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGhwbHhwoP0hWQVJbBmA/U1RBVIFiJyYAdC9qEQgKhGSEAAsgADCGCAE2AiQDOgQgBYlMB4EUDAcbLQ4onoexrSC/2ZyLAa8p8VHB8/x3Vue+V0hVJalMJg2nx/TCrQXxBeqLjQG7FyM1WEa/X1tEXN7cFz9EJEMmMUz3RihWSSKeQCbcIou0izz/C8v+fq3VfajEa9gDD11CImXS7qL/RJFVzC1qiB6KmKeD6TZdQ6IRGv78dL6uSVVCfgni5mzu7kcgQBgAEAQTQRCoL++STTYybkJxNfQxAAIAGu8OdEB9teW2jh4BpgDqFjAeSEByW3zFP0CBBgNMsMCGEDjgggdhiEAUAeIIED7ABTDUEnkIE9Q9ahFgKttcVhApo4ACB4qobHaccgDfEjFO6aaWUhjMLt2SyIvHKoDqoA4CSUwEIYQCEjhAO9R1G6keDeDZGjNo+AhxOjCEGTr1WeIF3kYBiLAOKvkJSMiKX0VdAyQt3SDJClCkxJCHkCzfqyVTriJZLcolS32JZHUekq2TYNkYtCtjYHMQXSxGjXDz2t/yLWXzDzxz+o3zFwDEaN23F+13pyMdQAEaSKAR9vcGq4A4MTSKCElGW+M7UcY7xqkggITb28ZJhlqc9q2twYKTt0NjixBgYvO9BIihEBLYuOFXQzfIQ7dXGUEEEgFDooBfAzqiQbpJrhiWSuKJCRFKYbHCyJKI2G5GiZbNAvgAu5pc3vwx4G+g3aDkhklABiSz0BICXrYghtYhx/cdJ+44rY2oZ0aMNRFz3VZjb6W33F3gzltqtOCV8tTHSpOeXuItfvr5lCdfzFpqtEitvqdcdGGFd28ZqqC0tPbeChGXgrIlnhSWu/eUso4uKWFLugyDzQJhflY4659+WjQ++6x72WUMv9G8mw6QJl7BVxX5fe/kpUsOvnZwee9uQ0cGXYd0o89XB2748sDSnt8d2VphdOTTgceDVvOds0v9P/s7HPq15aGun/6Vllb56f1dl0t1LejqrNkpdRZsG8TOnM5vkBG5oiVyVGnS8LHps5cfNWJs6qKPfaNSxiQNBUm3cKNWROr0GSur7Za31k1vieq7LH11VF+jXdRIasRKflc7jkobm1Z9te1IyZA0pDkhLR98+H37Zf1c/8at+dB7x+7GfVyTfJMPiYztsnl59Y5l4j+0n1RXlpHnF3Tq7HecmNF/CJodEMAikruxiyJaGLvHOdAfoA+oDvpjBm2b91cHGRZMU9n25xEU0A8fgEEAdKI3Q1iDtc034sug5YVMkE2jsE+BIkwSoQ3gxXMqz9tELp48bd0cFKOKS7xYjEuXBnZP5ia7DyiO/X/YI+PQSbt2uSdqAkWL9nQbV1XB94/+uPfdZz8dnXYFBYrcTl2SIR/ybxJNJPz/Gupb0JaZeens2ekC7EKr8t+Ls/P5VJPYJdHKyqfg2nqU6bhlidzcddQV/7MmecTzJ5VPcKXkNKSEogHjYFx6QZ7rQ+FSe8njaiNuOnXS8H2ScQ619c2mC3VTtauL0rRbXd/CkSOP37FY9Zkjz8+GibYUMOEWF+RdrFS8Ecv1SHOpPUPZGEIpjPvFyU5cXKjd6OXqorTqy9GwRd++HVufPGnVsW+aO3vggKZ18jR9sXaTC1PWTEsVUaK0FkNySbTQDqlm2PfDjZcu4aalnSLKjnOoYQ0nUlqqXcGpPu/4VgV/xU2pAqW4BW3qzhQ8/hFKhV2qE3+BKAtDqBXjfgnVdH4y0wg5tbVNRenNdTWOrenWLcupQdmsbq5b+18piTe/xRdp1xbILxNPJGInm2z6hoB21Lal0i+ePTtd7B45+3XhFJ329evskXm7qurUVREotqSluSo/L29d3qDhI4YOQqWhI4YNvBNfsMHeXKemXrxQfKeuPOGRVayA3JtkJKEgbPp+dXUDluddutRYLFoXGXWX6N3WFaGLbQtRSitVYNacTNSdy7AaG/HSaUEANcBoGXNdcZvZsOqQ1icBDv21/gzAoYPHH/WDW0qNR3QTYKEAEHig6o13NXbND06CQPlRtYjGNnSktRc09k1mAMDvAlDKfQjgy6fssInlfzmNAjKkDxoxHOBLdVRAIVt9j4qo+hA1w9T1aNBNTUOTTNUHLbqokE+UAfJXCIGw/IxCSL5GRUJeR40rL/UxTm4Q08H6MbCs70ObuNyIIXrINHQYInF06UUlevTjbQzTh5upiDMzMMogUtEnjPs/Y7jAHCJeB0GBHh04tC6FiB6ZFB1oArUSIoFoqhzCeAN6lHwm0T4C3VVPWvjpSMXReuWesMEcoqrmgtNBGd2noWeV0hNAz9rFeShNJxHGsPa3HXeKTk8b55hahySYHaYKKFFLpCfN8rsoaJn01CR04Gkc+5k7KVTCmClX8Q10HCrUEkVlSX+XO33oQR9609tJ516H497WSobWs5Up6TLaS10/dessIskgJSLiDlWvHVUywpkQ7hdPZqGyiEF0uVQerVcPamT1A3eKXdyI1vG9OoflrSXihZ1qqGE3nhmAgiIbRCQgPLEPtOM3UQwTLYaYYomNlpA44opnjV6jkD6id80OOrzf6BzmMD6eEa1zKyeYG1fzfEf16V6jw9XYOaar1/b2kP/IYX8oR2mcFvv2GtBV3JXgd437AQAA)format("woff2-variations");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-cyrillic-wght-normal-D73BlboJ.woff2)format("woff2-variations");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-greek-wght-normal-Bw9x6K1M.woff2)format("woff2-variations");unicode-range:U+370-377,U+37A-37F,U+384-38A,U+38C,U+38E-3A1,U+3A3-3FF}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-vietnamese-wght-normal-Bt-aOZkq.woff2)format("woff2-variations");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2)format("woff2-variations");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2)format("woff2-variations");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}:root{--background:#fdfcfa;--foreground:#393a34;--card:#f8f7f5;--card-foreground:#393a34;--popover:#f8f7f5;--popover-foreground:#393a34;--primary:#b35017;--primary-foreground:#fff;--primary-hover:#9a4310;--primary-active:#85390c;--primary-label:#85390c;--brand-label:#678d6c;--secondary:#f7f6f4;--secondary-foreground:#393a34;--muted:#f7f6f4;--muted-foreground:#5c5c54;--accent:#a9998f2b;--accent-foreground:#393a34;--selection:#a9998f2b;--interactive-hover:#0000000d;--interactive-active:#00000014;--destructive:#b7493f;--destructive-label:#8f3028;--border:#e5e1de;--border-hover:#cbc7c2;--input:#8b857d;--ring:#b35017;--status-warning:#8d6c15;--status-warning-label:#79590d;--status-success:#5f8d3d;--status-success-label:#426528;--status-info:#2d72c4;--status-info-label:#245faa;--chart-1:#b35017;--chart-2:#5f8d3d;--chart-3:#2d72c4;--chart-4:#8d6c15;--chart-5:#b7493f;--radius:.625rem;--sidebar:#f7f6f4;--sidebar-foreground:#393a34;--sidebar-primary:#b35017;--sidebar-primary-foreground:#fff;--sidebar-accent:#a9998f2b;--sidebar-accent-foreground:#393a34;--sidebar-border:#e5e1de;--sidebar-ring:#b35017;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light}.dark{--background:#120f0e;--foreground:#c9c5ba;--card:#181715;--card-foreground:#c9c5ba;--popover:#181715;--popover-foreground:#c9c5ba;--primary:#da7c47;--primary-foreground:#120f0e;--primary-hover:#eb8c57;--primary-active:#fd9b66;--primary-label:#fd9b66;--brand-label:#678d6c;--secondary:#171615;--secondary-foreground:#c9c5ba;--muted:#171615;--muted-foreground:#8f8b81;--accent:#c8c6c52b;--accent-foreground:#c9c5ba;--selection:#c8c6c52b;--interactive-hover:#ffffff12;--interactive-active:#ffffff1f;--destructive:#da5b4a;--destructive-label:#ff9b8e;--border:#242323;--border-hover:#504e4c;--input:#777169;--ring:#da7c47;--status-warning:#c67f13;--status-warning-label:#e7a33c;--status-success:#76ad4f;--status-success-label:#9ac974;--status-info:#479fe6;--status-info-label:#78b8ec;--chart-1:#da7c47;--chart-2:#76ad4f;--chart-3:#479fe6;--chart-4:#c67f13;--chart-5:#da5b4a;--sidebar:#171615;--sidebar-foreground:#c9c5ba;--sidebar-primary:#da7c47;--sidebar-primary-foreground:#120f0e;--sidebar-accent:#c8c6c52b;--sidebar-accent-foreground:#c9c5ba;--sidebar-border:#242323;--sidebar-ring:#da7c47;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}::selection{background:var(--selection);color:var(--foreground)}.markdown-content{word-break:break-word;line-height:1.6}.markdown-content pre{background:var(--muted);border:1px solid var(--border);border-radius:var(--radius);padding:.75rem;overflow-x:auto}.markdown-content code{font-family:var(--font-mono);font-size:.75rem}.markdown-content p{margin:.4em 0}.markdown-content :is(h1,h2,h3,h4,h5,h6){font-size:var(--text-ui);color:var(--muted-foreground);text-transform:uppercase;margin:.9em 0 .2em;font-weight:700;line-height:1.4}.markdown-content :is(h1,h2,h3,h4,h5,h6):first-child{margin-top:0}.confidence-ring{--p:0;background:conic-gradient(var(--primary) calc(var(--p) * 1%), var(--border) 0);border-radius:9999px;place-items:center;width:2.25rem;height:2.25rem;font-size:.65rem;display:grid}.confidence-ring span{background:var(--card);border-radius:9999px;place-items:center;width:1.75rem;height:1.75rem;display:grid}.settings-view button:not(:disabled){cursor:pointer}@media (prefers-reduced-motion:reduce){*,:before,:after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@keyframes spin{to{transform:rotate(360deg)}}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0)scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1))rotate(var(--tw-enter-rotate,0));filter:blur(var(--tw-enter-blur,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0)scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1))rotate(var(--tw-exit-rotate,0));filter:blur(var(--tw-exit-blur,0))}}.settings-view{overflow-wrap:anywhere;min-width:0;font-size:.875rem;line-height:1.45}.settings-view input:not([type=checkbox]):not([type=radio]):not([data-slot]),.settings-view select{border:1px solid var(--input);background:var(--card);min-width:0;max-width:100%;height:36px;color:var(--foreground);border-radius:10px;padding:4px 10px;font-size:.875rem;transition:background-color .15s}.settings-view input::placeholder{color:var(--muted-foreground)}.settings-view :is(input[type=checkbox],input[type=radio]){accent-color:var(--primary);flex-shrink:0}.settings-view button:not([data-slot]):not([role=combobox]):not(.underline){border:1px solid var(--input);background:var(--card);white-space:normal;border-radius:10px;max-width:100%;min-height:36px;padding:4px 10px;transition:background-color .15s}.settings-view button:not([data-slot]):not([role=combobox]):not(:disabled):hover{background:var(--interactive-hover)}.settings-view button:not([data-slot]):not([role=combobox]):not(:disabled):active{background:var(--interactive-active)}.settings-view :is(input,select,button):not([data-slot]):focus-visible{outline:2px solid var(--ring);outline-offset:2px}.settings-view :is(input,select,button):disabled{cursor:not-allowed;opacity:.5}.settings-view :is(input,select)[aria-invalid=true]{border-color:var(--destructive)}.settings-view :is(code,pre,.font-mono){direction:ltr;unicode-bidi:isolate;font-size:.75rem}.settings-view #settings-section-external-api input:not([type=radio]),.settings-view #directory-maps input:not([type=checkbox]){font-family:var(--font-mono);direction:ltr;unicode-bidi:isolate}.settings-view .flex>*,.settings-view .grid>*{min-width:0}.settings-view table{overflow-wrap:normal}