@vxnus/siduri 2.0.0 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/README.md +7 -7
  2. package/dist/builtin-manifests.js +38 -32
  3. package/dist/clean-machine-e2e.test.js +16 -16
  4. package/dist/clean-machine-smoke.test.d.ts +1 -0
  5. package/dist/clean-machine-smoke.test.js +166 -0
  6. package/dist/configurators/knowledge.js +134 -46
  7. package/dist/configurators/memory.js +7 -25
  8. package/dist/configurators.test.js +11 -12
  9. package/dist/doctor.js +58 -14
  10. package/dist/generator.js +95 -19
  11. package/dist/generator.test.js +9 -7
  12. package/dist/index.d.ts +1 -1
  13. package/dist/index.js +37 -32
  14. package/dist/manifest.d.ts +1 -1
  15. package/dist/providers/openrouter.js +1 -1
  16. package/dist/release-check.js +1 -1
  17. package/dist/web-dist/404/index.html +1 -1
  18. package/dist/web-dist/404.html +1 -1
  19. package/dist/web-dist/__next.__PAGE__.txt +12 -12
  20. package/dist/web-dist/__next._full.txt +12 -12
  21. package/dist/web-dist/__next._tree.txt +1 -1
  22. package/dist/web-dist/_next/static/chunks/0jgw-jf26m0ui.js +22 -0
  23. package/dist/web-dist/_next/static/chunks/0tdcnq1-n6kof.js +31 -0
  24. package/dist/web-dist/_next/static/chunks/12vwhiuvdy_i7.js +1 -0
  25. package/dist/web-dist/_next/static/chunks/{2_duynll0m51m.js → 15zsrb5462n_-.js} +2 -2
  26. package/dist/web-dist/_next/static/chunks/2dsfgoa225hpl.js +1 -0
  27. package/dist/web-dist/_next/static/chunks/2mno6yfdoee0x.js +1 -0
  28. package/dist/web-dist/_next/static/chunks/30a48dk5bjyhj.js +1 -0
  29. package/dist/web-dist/_next/static/chunks/360luxuz2x8y_.js +1 -0
  30. package/dist/web-dist/_next/static/chunks/turbopack-2hpygfb68u21h.js +1 -0
  31. package/dist/web-dist/_not-found/__next._full.txt +8 -8
  32. package/dist/web-dist/_not-found/__next._not-found.__PAGE__.txt +7 -7
  33. package/dist/web-dist/_not-found/__next._tree.txt +1 -1
  34. package/dist/web-dist/_not-found/index.html +1 -1
  35. package/dist/web-dist/_not-found/index.txt +8 -8
  36. package/dist/web-dist/chat/__next._full.txt +9 -9
  37. package/dist/web-dist/chat/__next._tree.txt +1 -1
  38. package/dist/web-dist/chat/__next.chat.__PAGE__.txt +8 -8
  39. package/dist/web-dist/chat/index.html +1 -1
  40. package/dist/web-dist/chat/index.txt +9 -9
  41. package/dist/web-dist/index.html +1 -1
  42. package/dist/web-dist/index.txt +12 -12
  43. package/dist/web-dist/operator/__next._full.txt +9 -9
  44. package/dist/web-dist/operator/__next._tree.txt +1 -1
  45. package/dist/web-dist/operator/__next.operator.__PAGE__.txt +8 -8
  46. package/dist/web-dist/operator/index.html +1 -1
  47. package/dist/web-dist/operator/index.txt +9 -9
  48. package/dist/web-template.js +1 -1
  49. package/package.json +10 -10
  50. package/dist/web-dist/_next/static/chunks/09y7khbmco_v4.js +0 -1
  51. package/dist/web-dist/_next/static/chunks/0uwih7sydv413.js +0 -1
  52. package/dist/web-dist/_next/static/chunks/1_yae15ffa5f6.js +0 -1
  53. package/dist/web-dist/_next/static/chunks/2kcqevsmv6kh2.js +0 -31
  54. package/dist/web-dist/_next/static/chunks/2s3d1bfr0l4b0.js +0 -1
  55. package/dist/web-dist/_next/static/chunks/32z87id9k6i2z.js +0 -22
  56. package/dist/web-dist/_next/static/chunks/3bx2gs3idjmo1.js +0 -1
  57. package/dist/web-dist/_next/static/chunks/turbopack-3eipe4c-imn5l.js +0 -1
  58. /package/dist/web-dist/_next/static/{pWHUixFDDvANZeAf-shqT → gZ_ly5hNtyqFVZ9AuHs_A}/_buildManifest.js +0 -0
  59. /package/dist/web-dist/_next/static/{pWHUixFDDvANZeAf-shqT → gZ_ly5hNtyqFVZ9AuHs_A}/_clientMiddlewareManifest.js +0 -0
  60. /package/dist/web-dist/_next/static/{pWHUixFDDvANZeAf-shqT → gZ_ly5hNtyqFVZ9AuHs_A}/_ssgManifest.js +0 -0
@@ -1,4 +1,4 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,12650,e=>{"use strict";var t=e.i(7863),r=e.i(61507),a=e.i(51523);function i({onSelectPrompt:e,className:r=""}){return(0,t.jsxs)("div",{className:`chat-empty-state ${r}`,"data-testid":"preferences-starter",children:[(0,t.jsx)("div",{className:"siduri-orb",children:"✦"}),(0,t.jsx)("h2",{children:"Teach Siduri your preferences."}),(0,t.jsx)("p",{children:"Choose a starting point, replace the blanks, and send it. Nothing becomes memory until you approve the receipt."}),(0,t.jsxs)("div",{className:"starter-prompts onboarding-prompts",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>e("Call me [preferred name]."),children:[(0,t.jsx)("span",{children:"Identity"}),"Preferred name or title"]}),(0,t.jsxs)("button",{type:"button",onClick:()=>e("My timezone is [timezone] and my preferred language is [language]."),children:[(0,t.jsx)("span",{children:"Localization"}),"Timezone and language"]}),(0,t.jsxs)("button",{type:"button",onClick:()=>e("My preferred response style is [concise / detailed / technical]."),children:[(0,t.jsx)("span",{children:"Response style"}),"Tone and verbosity"]}),(0,t.jsxs)("button",{type:"button",onClick:()=>e("I am interested in [topics or domains of interest]."),children:[(0,t.jsx)("span",{children:"Knowledge"}),"Topics of interest"]})]}),(0,t.jsx)("p",{className:"onboarding-privacy",children:"Teach Siduri preferences explicitly. Information is stored in private memory only after you approve the receipt."})]})}function s(e){return"number"!=typeof e||isNaN(e)||e<0?0:e>1?1:e}class n{expression="neutral";action="idle";state="idle";speechId;lipSyncValue=0;reducedMotion=!1;actionStartTime=0;stateStartTime=0;lastUpdateTime=Date.now();constructor(e){e&&this.updateConfig(e)}updateConfig(e){e.expression&&e.expression!==this.expression&&(this.expression=e.expression),e.action&&e.action!==this.action&&(this.action=e.action,this.actionStartTime=Date.now()),e.state&&e.state!==this.state&&(this.state=e.state,this.stateStartTime=Date.now()),void 0!==e.speechId&&(this.speechId=e.speechId),void 0!==e.lipSyncValue&&(this.lipSyncValue=s(e.lipSyncValue)),void 0!==e.reducedMotion&&(this.reducedMotion=e.reducedMotion)}setReducedMotion(e){this.reducedMotion=e}setExpression(e){this.expression=e}setAction(e){this.action=e,this.actionStartTime=Date.now()}setState(e){this.state=e,this.stateStartTime=Date.now()}setLipSync(e){this.lipSyncValue=s(e)}calculateFrameParameters(e=Date.now()){this.lastUpdateTime,this.lastUpdateTime=e;let t=this.reducedMotion?.2:(Math.sin(e/1800)+1)*.5,r=this.reducedMotion?0:2.5*Math.sin(e/2400),a=this.reducedMotion?0:1.8*Math.cos(e/3200),i=this.reducedMotion?0:1.2*Math.sin(e/4e3),n=function(e){if(!e)return{angleX:0,angleY:0,angleZ:0,bodyAngleX:0,eyeBallX:0,eyeBallY:0,speed:1};switch(e.toLowerCase().trim()){case"nod":return{angleX:0,angleY:-12,angleZ:2,bodyAngleX:0,eyeBallX:0,eyeBallY:-.2,speed:2.5};case"wave":return{angleX:8,angleY:4,angleZ:-5,bodyAngleX:5,eyeBallX:.2,eyeBallY:.1,speed:1.8};case"listen":return{angleX:-5,angleY:2,angleZ:4,bodyAngleX:-2,eyeBallX:.1,eyeBallY:.1,speed:1};case"talk":return{angleX:2,angleY:-2,angleZ:0,bodyAngleX:0,eyeBallX:0,eyeBallY:0,speed:1.5};default:return{angleX:0,angleY:0,angleZ:0,bodyAngleX:0,eyeBallX:0,eyeBallY:0,speed:1}}}(this.action),o=(e-this.actionStartTime)/1e3,l=0,c=0,d=0,u=0;this.reducedMotion?"nod"===this.action?c=.5*n.angleY:"wave"===this.action?(l=.5*n.angleX,u=.5*n.bodyAngleX):"listen"===this.action&&(d=.5*n.angleZ,l=.5*n.angleX):"nod"===this.action?c=Math.sin(o*Math.PI*3)*n.angleY:"wave"===this.action?(d=Math.sin(o*Math.PI*2.4)*n.angleZ,l=n.angleX,u=n.bodyAngleX):"listen"===this.action?(d=n.angleZ,l=n.angleX):"talk"===this.action&&(c=2*Math.sin(4*o));let m=0;if("speaking"===this.state){let t=function(e,t){if("number"==typeof t&&!isNaN(t)&&t>0)return s(t);let r=e/1e3;return s(Math.max(0,.45*Math.sin(14*r)+.25*Math.sin(22*r)+.2*Math.sin(8*r)+.1))}(e,this.lipSyncValue);m=this.reducedMotion?.6*t:t}let h=e%4e3/4e3,p=1;return h>.95&&(p=Math.abs(Math.sin((h-.95)/.05*Math.PI-Math.PI/2))),{mouthOpenY:m,angleX:r+l,angleY:a+c,angleZ:i+d,bodyAngleX:u,breath:t,eyeOpenL:p,eyeOpenR:p}}reset(){this.expression="neutral",this.action="idle",this.state="idle",this.lipSyncValue=0,this.speechId=void 0}}async function o(e="/live2d/live2dcubismcore.min.js"){return window.Live2DCubismCore?window.Live2DCubismCore:new Promise((t,r)=>{let a=document.querySelector(`script[src="${e}"]`);if(a)return window.Live2DCubismCore?t(window.Live2DCubismCore):(a.addEventListener("load",()=>t(window.Live2DCubismCore)),void a.addEventListener("error",t=>r(Error(`Failed to load Cubism Core from ${e}: ${t}`))));let i=document.createElement("script");i.src=e,i.async=!0,i.onload=()=>{window.Live2DCubismCore?t(window.Live2DCubismCore):r(Error("Live2DCubismCore global not found after script load"))},i.onerror=()=>{let e="https://cubism.live2d.com/sdk-web/cubismcore/live2dcubismcore.min.js";console.warn(`[Live2D] Failed to load local Cubism Core, attempting fallback: ${e}`);let a=document.createElement("script");a.src=e,a.async=!0,a.onload=()=>{window.Live2DCubismCore?t(window.Live2DCubismCore):r(Error("Live2DCubismCore global not found after fallback load"))},a.onerror=e=>r(Error(`Failed to load Cubism Core from both local and remote sources: ${e}`)),document.head.appendChild(a)},document.head.appendChild(i)})}async function l(e){let t=e.lastIndexOf("/"),r=-1!==t?e.slice(0,t+1):"",a=await fetch(e);if(!a.ok)throw Error(`Failed to fetch model manifest from ${e} (${a.status})`);let i=await a.json();if(!i.FileReferences||!i.FileReferences.Moc)throw Error(`Invalid model3.json: missing Moc file reference in ${e}`);let s=r+i.FileReferences.Moc,n=await fetch(s);if(!n.ok)throw Error(`Failed to fetch .moc3 file from ${s} (${n.status})`);let o=await n.arrayBuffer(),l=(i.FileReferences.Textures||[]).map(e=>r+e),c=await Promise.all(l.map(e=>new Promise((t,r)=>{let a=new Image;a.crossOrigin="anonymous",a.onload=()=>t(a),a.onerror=t=>r(Error(`Failed to load texture from ${e}`)),a.src=e}))),d=new Map;return i.FileReferences.Expressions&&i.FileReferences.Expressions.length>0&&await Promise.all(i.FileReferences.Expressions.map(async e=>{try{let t=r+e.File,a=await fetch(t);if(a.ok){let t=await a.json();d.set(e.File,t),e.Name&&d.set(e.Name,t)}}catch{}})),{model3:i,mocBuffer:o,textures:c,expressions:d,basePath:r}}let c=`
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,12650,e=>{"use strict";var t=e.i(30696),r=e.i(64249),a=e.i(51523);function i({onSelectPrompt:e,className:r=""}){return(0,t.jsxs)("div",{className:`chat-empty-state ${r}`,"data-testid":"preferences-starter",children:[(0,t.jsx)("div",{className:"siduri-orb",children:"✦"}),(0,t.jsx)("h2",{children:"Teach Siduri your preferences."}),(0,t.jsx)("p",{children:"Choose a starting point, replace the blanks, and send it. Nothing becomes memory until you approve the receipt."}),(0,t.jsxs)("div",{className:"starter-prompts onboarding-prompts",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>e("Call me [preferred name]."),children:[(0,t.jsx)("span",{children:"Identity"}),"Preferred name or title"]}),(0,t.jsxs)("button",{type:"button",onClick:()=>e("My timezone is [timezone] and my preferred language is [language]."),children:[(0,t.jsx)("span",{children:"Localization"}),"Timezone and language"]}),(0,t.jsxs)("button",{type:"button",onClick:()=>e("My preferred response style is [concise / detailed / technical]."),children:[(0,t.jsx)("span",{children:"Response style"}),"Tone and verbosity"]}),(0,t.jsxs)("button",{type:"button",onClick:()=>e("I am interested in [topics or domains of interest]."),children:[(0,t.jsx)("span",{children:"Knowledge"}),"Topics of interest"]})]}),(0,t.jsx)("p",{className:"onboarding-privacy",children:"Teach Siduri preferences explicitly. Information is stored in private memory only after you approve the receipt."})]})}function s(e){return"number"!=typeof e||isNaN(e)||e<0?0:e>1?1:e}class n{expression="neutral";action="idle";state="idle";speechId;lipSyncValue=0;reducedMotion=!1;actionStartTime=0;stateStartTime=0;lastUpdateTime=Date.now();constructor(e){e&&this.updateConfig(e)}updateConfig(e){e.expression&&e.expression!==this.expression&&(this.expression=e.expression),e.action&&e.action!==this.action&&(this.action=e.action,this.actionStartTime=Date.now()),e.state&&e.state!==this.state&&(this.state=e.state,this.stateStartTime=Date.now()),void 0!==e.speechId&&(this.speechId=e.speechId),void 0!==e.lipSyncValue&&(this.lipSyncValue=s(e.lipSyncValue)),void 0!==e.reducedMotion&&(this.reducedMotion=e.reducedMotion)}setReducedMotion(e){this.reducedMotion=e}setExpression(e){this.expression=e}setAction(e){this.action=e,this.actionStartTime=Date.now()}setState(e){this.state=e,this.stateStartTime=Date.now()}setLipSync(e){this.lipSyncValue=s(e)}calculateFrameParameters(e=Date.now()){this.lastUpdateTime,this.lastUpdateTime=e;let t=this.reducedMotion?.2:(Math.sin(e/1800)+1)*.5,r=this.reducedMotion?0:2.5*Math.sin(e/2400),a=this.reducedMotion?0:1.8*Math.cos(e/3200),i=this.reducedMotion?0:1.2*Math.sin(e/4e3),n=function(e){if(!e)return{angleX:0,angleY:0,angleZ:0,bodyAngleX:0,eyeBallX:0,eyeBallY:0,speed:1};switch(e.toLowerCase().trim()){case"nod":return{angleX:0,angleY:-12,angleZ:2,bodyAngleX:0,eyeBallX:0,eyeBallY:-.2,speed:2.5};case"wave":return{angleX:8,angleY:4,angleZ:-5,bodyAngleX:5,eyeBallX:.2,eyeBallY:.1,speed:1.8};case"listen":return{angleX:-5,angleY:2,angleZ:4,bodyAngleX:-2,eyeBallX:.1,eyeBallY:.1,speed:1};case"talk":return{angleX:2,angleY:-2,angleZ:0,bodyAngleX:0,eyeBallX:0,eyeBallY:0,speed:1.5};default:return{angleX:0,angleY:0,angleZ:0,bodyAngleX:0,eyeBallX:0,eyeBallY:0,speed:1}}}(this.action),o=(e-this.actionStartTime)/1e3,l=0,c=0,d=0,u=0;this.reducedMotion?"nod"===this.action?c=.5*n.angleY:"wave"===this.action?(l=.5*n.angleX,u=.5*n.bodyAngleX):"listen"===this.action&&(d=.5*n.angleZ,l=.5*n.angleX):"nod"===this.action?c=Math.sin(o*Math.PI*3)*n.angleY:"wave"===this.action?(d=Math.sin(o*Math.PI*2.4)*n.angleZ,l=n.angleX,u=n.bodyAngleX):"listen"===this.action?(d=n.angleZ,l=n.angleX):"talk"===this.action&&(c=2*Math.sin(4*o));let m=0;if("speaking"===this.state){let t=function(e,t){if("number"==typeof t&&!isNaN(t)&&t>0)return s(t);let r=e/1e3;return s(Math.max(0,.45*Math.sin(14*r)+.25*Math.sin(22*r)+.2*Math.sin(8*r)+.1))}(e,this.lipSyncValue);m=this.reducedMotion?.6*t:t}let h=e%4e3/4e3,p=1;return h>.95&&(p=Math.abs(Math.sin((h-.95)/.05*Math.PI-Math.PI/2))),{mouthOpenY:m,angleX:r+l,angleY:a+c,angleZ:i+d,bodyAngleX:u,breath:t,eyeOpenL:p,eyeOpenR:p}}reset(){this.expression="neutral",this.action="idle",this.state="idle",this.lipSyncValue=0,this.speechId=void 0}}async function o(e="/live2d/live2dcubismcore.min.js"){return window.Live2DCubismCore?window.Live2DCubismCore:new Promise((t,r)=>{let a=document.querySelector(`script[src="${e}"]`);if(a)return window.Live2DCubismCore?t(window.Live2DCubismCore):(a.addEventListener("load",()=>t(window.Live2DCubismCore)),void a.addEventListener("error",t=>r(Error(`Failed to load Cubism Core from ${e}: ${t}`))));let i=document.createElement("script");i.src=e,i.async=!0,i.onload=()=>{window.Live2DCubismCore?t(window.Live2DCubismCore):r(Error("Live2DCubismCore global not found after script load"))},i.onerror=()=>{let e="https://cubism.live2d.com/sdk-web/cubismcore/live2dcubismcore.min.js";console.warn(`[Live2D] Failed to load local Cubism Core, attempting fallback: ${e}`);let a=document.createElement("script");a.src=e,a.async=!0,a.onload=()=>{window.Live2DCubismCore?t(window.Live2DCubismCore):r(Error("Live2DCubismCore global not found after fallback load"))},a.onerror=e=>r(Error(`Failed to load Cubism Core from both local and remote sources: ${e}`)),document.head.appendChild(a)},document.head.appendChild(i)})}async function l(e){let t=e.lastIndexOf("/"),r=-1!==t?e.slice(0,t+1):"",a=await fetch(e);if(!a.ok)throw Error(`Failed to fetch model manifest from ${e} (${a.status})`);let i=await a.json();if(!i.FileReferences||!i.FileReferences.Moc)throw Error(`Invalid model3.json: missing Moc file reference in ${e}`);let s=r+i.FileReferences.Moc,n=await fetch(s);if(!n.ok)throw Error(`Failed to fetch .moc3 file from ${s} (${n.status})`);let o=await n.arrayBuffer(),l=(i.FileReferences.Textures||[]).map(e=>r+e),c=await Promise.all(l.map(e=>new Promise((t,r)=>{let a=new Image;a.crossOrigin="anonymous",a.onload=()=>t(a),a.onerror=t=>r(Error(`Failed to load texture from ${e}`)),a.src=e}))),d=new Map;return i.FileReferences.Expressions&&i.FileReferences.Expressions.length>0&&await Promise.all(i.FileReferences.Expressions.map(async e=>{try{let t=r+e.File,a=await fetch(t);if(a.ok){let t=await a.json();d.set(e.File,t),e.Name&&d.set(e.Name,t)}}catch{}})),{model3:i,mocBuffer:o,textures:c,expressions:d,basePath:r}}let c=`
2
2
  attribute vec2 a_position;
3
3
  attribute vec2 a_texCoord;
4
4
  uniform mat4 u_matrix;
@@ -27,4 +27,4 @@ void main() {
27
27
  }
28
28
  gl_FragColor = vec4(1.0);
29
29
  }
30
- `;function m(e,t,r){let a=e.createShader(t);if(!a)throw Error("Failed to create shader");if(e.shaderSource(a,r),e.compileShader(a),!e.getShaderParameter(a,e.COMPILE_STATUS)){let t=e.getShaderInfoLog(a);throw e.deleteShader(a),Error(`Shader compilation error: ${t}`)}return a}class h{canvas;gl=null;program=null;maskProgram=null;vertexBuffer=null;uvBuffer=null;indexBuffer=null;aPositionLocation=-1;aTexCoordLocation=-1;uMatrixLocation=null;uTextureLocation=null;uOpacityLocation=null;maskAPositionLocation=-1;maskATexCoordLocation=-1;maskUMatrixLocation=null;maskUTextureLocation=null;textures=[];moc=null;model=null;core=null;paramIndices=new Map;isDisposed=!1;constructor(e){this.canvas=e}modelBounds={minX:-.39,maxX:.4,minY:-.98,maxY:.18,width:.79,height:1.16,centerX:.006,centerY:-.4};initialize(e,t){this.core=e;let r={alpha:!0,premultipliedAlpha:!0,preserveDrawingBuffer:!1,antialias:!0,stencil:!0},a=this.canvas.getContext("webgl",r)||this.canvas.getContext("experimental-webgl",r)||this.canvas.getContext("webgl2",r);if(!a)throw Error("WebGL is not supported in this browser environment");this.gl=a;let i=m(a,a.VERTEX_SHADER,c),s=m(a,a.FRAGMENT_SHADER,d),n=a.createProgram();if(!n)throw Error("Failed to create WebGL program");if(a.attachShader(n,i),a.attachShader(n,s),a.linkProgram(n),!a.getProgramParameter(n,a.LINK_STATUS))throw Error(`Program link error: ${a.getProgramInfoLog(n)}`);this.program=n,this.aPositionLocation=a.getAttribLocation(n,"a_position"),this.aTexCoordLocation=a.getAttribLocation(n,"a_texCoord"),this.uMatrixLocation=a.getUniformLocation(n,"u_matrix"),this.uTextureLocation=a.getUniformLocation(n,"u_texture"),this.uOpacityLocation=a.getUniformLocation(n,"u_opacity");let o=m(a,a.FRAGMENT_SHADER,u),l=a.createProgram();if(!l)throw Error("Failed to create Mask WebGL program");if(a.attachShader(l,i),a.attachShader(l,o),a.linkProgram(l),!a.getProgramParameter(l,a.LINK_STATUS))throw Error(`Mask Program link error: ${a.getProgramInfoLog(l)}`);if(this.maskProgram=l,this.maskAPositionLocation=a.getAttribLocation(l,"a_position"),this.maskATexCoordLocation=a.getAttribLocation(l,"a_texCoord"),this.maskUMatrixLocation=a.getUniformLocation(l,"u_matrix"),this.maskUTextureLocation=a.getUniformLocation(l,"u_texture"),this.vertexBuffer=a.createBuffer(),this.uvBuffer=a.createBuffer(),this.indexBuffer=a.createBuffer(),a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,1),this.textures=t.textures.map(e=>{let t=a.createTexture();if(!t)throw Error("Failed to create WebGL texture");return a.bindTexture(a.TEXTURE_2D,t),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.LINEAR_MIPMAP_NEAREST),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.LINEAR),a.texImage2D(a.TEXTURE_2D,0,a.RGBA,a.RGBA,a.UNSIGNED_BYTE,e),a.generateMipmap(a.TEXTURE_2D),t}),this.moc=e.Moc.fromArrayBuffer(t.mocBuffer),!this.moc)throw Error("Failed to create Live2D Moc from ArrayBuffer");if(this.model=e.Model.fromMoc(this.moc),!this.model)throw Error("Failed to create Live2D Model from Moc");let h=this.model.parameters.ids;for(let e=0;e<h.length;e++)this.paramIndices.set(h[e],e);this.initializeNeutralMouth(),this.model.update(),this.calculateModelBounds()}initializeNeutralMouth(){this.model&&(this.setParamDirect("ParamMouthOpenY",0),this.setParamDirect("ParamMouthForm",0))}setParamDirect(e,t){let r=this.paramIndices.get(e);if(void 0!==r&&this.model){let e=this.model.parameters.minimumValues[r],a=this.model.parameters.maximumValues[r];this.model.parameters.values[r]=Math.max(e,Math.min(a,t))}}calculateModelBounds(){if(!this.model)return;let e=this.model.drawables,t=e.count,r=1/0,a=-1/0,i=1/0,s=-1/0;for(let n=0;n<t;n++){let t=e.vertexPositions[n];if(t&&0!==t.length)for(let e=0;e<t.length;e+=2){let n=t[e],o=t[e+1];n<r&&(r=n),n>a&&(a=n),o<i&&(i=o),o>s&&(s=o)}}r!==1/0&&a!==-1/0&&i!==1/0&&s!==-1/0&&(this.modelBounds={minX:r,maxX:a,minY:i,maxY:s,width:a-r,height:s-i,centerX:(r+a)/2,centerY:(i+s)/2})}getModelBounds(){return{...this.modelBounds}}setParam(e,t,r=1){let a=this.paramIndices.get(e);if(void 0!==a&&this.model){let e=this.model.parameters.values[a],i=Math.max(this.model.parameters.minimumValues[a],Math.min(this.model.parameters.maximumValues[a],t));this.model.parameters.values[a]=e+(i-e)*r}}render(e,t=Date.now()){let r;if(this.isDisposed||!this.gl||!this.model||!this.program)return;let a=this.gl,i=this.canvas.width,s=this.canvas.height;if(0===i||0===s)return;let n=e.calculateFrameParameters(t);this.setParam("ParamAngleX",n.angleX,.2),this.setParam("ParamAngleY",n.angleY,.2),this.setParam("ParamAngleZ",n.angleZ,.2),this.setParam("ParamBodyAngleX",n.bodyAngleX,.15),this.setParam("ParamBreath",n.breath,.3),this.setParam("ParamEyeLOpen",n.eyeOpenL,.4),this.setParam("ParamEyeROpen",n.eyeOpenR,.4),this.setParam("ParamMouthOpenY",n.mouthOpenY,.35);let o=function(e){if(!e)return"neutral";switch(e.toLowerCase().trim()){case"surprised":return"face_aozame.exp3.json";case"concerned":case"thinking":return"eyes_zetubou.exp3.json";case"happy":return"hair_open.exp3.json";default:return"neutral"}}(e.expression);"face_aozame.exp3.json"===o?(this.setParam("Param10",1,.2),this.setParam("Param9",0,.15),this.setParam("Param11",0,.15),this.setParam("Param12",0,.15)):"eyes_zetubou.exp3.json"===o?(this.setParam("Param9",1,.2),this.setParam("Param10",0,.15),this.setParam("Param11",0,.15),this.setParam("Param12",0,.15)):"hair_open.exp3.json"===o?(this.setParam("Param11",1,.2),this.setParam("Param10",0,.15),this.setParam("Param9",0,.15),this.setParam("Param12",0,.15)):"eye_color.exp3.json"===o?(this.setParam("Param12",1,.2),this.setParam("Param10",0,.15),this.setParam("Param9",0,.15),this.setParam("Param11",0,.15)):(this.setParam("Param10",0,.15),this.setParam("Param9",0,.15),this.setParam("Param11",0,.15),this.setParam("Param12",0,.15)),this.model.update(),a.viewport(0,0,i,s),a.clearColor(0,0,0,0),a.clear(a.COLOR_BUFFER_BIT|a.STENCIL_BUFFER_BIT),a.enable(a.BLEND),a.blendFunc(a.ONE,a.ONE_MINUS_SRC_ALPHA),a.useProgram(this.program);let l=i/s,c=this.modelBounds.width,d=this.modelBounds.height,u=this.modelBounds.centerX,m=this.modelBounds.centerY,h=(r=l>=c/d?1.84/d:1.84/c*l)/l,p=new Float32Array([h,0,0,0,0,r,0,0,0,0,1,0,-u*h,-m*r,0,1]);a.uniformMatrix4fv(this.uMatrixLocation,!1,p),a.uniform1i(this.uTextureLocation,0);let f=this.model.drawables,x=f.count,g=f.renderOrders,v=[];for(let e=0;e<x;e++)v.push(e);v.sort((e,t)=>g[e]-g[t]),a.enableVertexAttribArray(this.aPositionLocation),a.enableVertexAttribArray(this.aTexCoordLocation);let b=(e,t)=>{let r=void 0!==t?t:f.opacities[e];if(r<=.001)return;let i=f.textureIndices[e],s=this.textures[i];if(!s)return;a.activeTexture(a.TEXTURE0),a.bindTexture(a.TEXTURE_2D,s),a.uniform1f(this.uOpacityLocation,r);let n=f.vertexPositions[e];a.bindBuffer(a.ARRAY_BUFFER,this.vertexBuffer),a.bufferData(a.ARRAY_BUFFER,n,a.DYNAMIC_DRAW),a.vertexAttribPointer(this.aPositionLocation,2,a.FLOAT,!1,0,0);let o=f.vertexUvs[e];a.bindBuffer(a.ARRAY_BUFFER,this.uvBuffer),a.bufferData(a.ARRAY_BUFFER,o,a.DYNAMIC_DRAW),a.vertexAttribPointer(this.aTexCoordLocation,2,a.FLOAT,!1,0,0);let l=f.indices[e];a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,this.indexBuffer),a.bufferData(a.ELEMENT_ARRAY_BUFFER,l,a.DYNAMIC_DRAW),a.drawElements(a.TRIANGLES,l.length,a.UNSIGNED_SHORT,0)},y=e=>{if(!this.maskProgram)return;a.useProgram(this.maskProgram),a.uniformMatrix4fv(this.maskUMatrixLocation,!1,p),a.uniform1i(this.maskUTextureLocation,0),a.enableVertexAttribArray(this.maskAPositionLocation),a.enableVertexAttribArray(this.maskATexCoordLocation);let t=f.textureIndices[e],r=this.textures[t];if(!r)return;a.activeTexture(a.TEXTURE0),a.bindTexture(a.TEXTURE_2D,r);let i=f.vertexPositions[e];a.bindBuffer(a.ARRAY_BUFFER,this.vertexBuffer),a.bufferData(a.ARRAY_BUFFER,i,a.DYNAMIC_DRAW),a.vertexAttribPointer(this.maskAPositionLocation,2,a.FLOAT,!1,0,0);let s=f.vertexUvs[e];a.bindBuffer(a.ARRAY_BUFFER,this.uvBuffer),a.bufferData(a.ARRAY_BUFFER,s,a.DYNAMIC_DRAW),a.vertexAttribPointer(this.maskATexCoordLocation,2,a.FLOAT,!1,0,0);let n=f.indices[e];a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,this.indexBuffer),a.bufferData(a.ELEMENT_ARRAY_BUFFER,n,a.DYNAMIC_DRAW),a.drawElements(a.TRIANGLES,n.length,a.UNSIGNED_SHORT,0),a.useProgram(this.program),a.enableVertexAttribArray(this.aPositionLocation),a.enableVertexAttribArray(this.aTexCoordLocation)},w=-1;for(let e of v)if(!(f.opacities[e]<=.001))if(f.maskCounts[e]>0){let t=f.masks[e][0];t!==w&&(w=t,a.enable(a.STENCIL_TEST),a.stencilMask(255),a.clear(a.STENCIL_BUFFER_BIT),a.stencilFunc(a.ALWAYS,1,255),a.stencilOp(a.KEEP,a.KEEP,a.REPLACE),a.colorMask(!1,!1,!1,!1),y(t),a.colorMask(!0,!0,!0,!0)),a.stencilFunc(a.EQUAL,1,255),a.stencilOp(a.KEEP,a.KEEP,a.KEEP),b(e)}else -1!==w&&(a.disable(a.STENCIL_TEST),w=-1),b(e);-1!==w&&a.disable(a.STENCIL_TEST)}dispose(){if(this.isDisposed=!0,this.gl){for(let e of this.textures)this.gl.deleteTexture(e);this.textures=[],this.vertexBuffer&&this.gl.deleteBuffer(this.vertexBuffer),this.uvBuffer&&this.gl.deleteBuffer(this.uvBuffer),this.indexBuffer&&this.gl.deleteBuffer(this.indexBuffer),this.program&&this.gl.deleteProgram(this.program)}this.model&&"function"==typeof this.model.release&&this.model.release(),this.moc&&"function"==typeof this.moc.release&&this.moc.release(),this.model=null,this.moc=null,this.gl=null}}function p({modelUrl:e,expression:a="neutral",action:i="idle",state:s="idle",speechId:c,lipSyncValue:d,durationMs:u,className:m="",onStatusChange:f}){let x=(0,r.useRef)(null),g=(0,r.useRef)(null),v=(0,r.useRef)(new n({expression:a,action:i,state:s,speechId:c,lipSyncValue:d,durationMs:u})),b=(0,r.useRef)(null),y=(0,r.useRef)(null),[w,E]=(0,r.useState)("loading"),[P,A]=(0,r.useState)(null),[_,j]=(0,r.useState)(0);return(0,r.useEffect)(()=>{if(!window.matchMedia)return;let e=window.matchMedia("(prefers-reduced-motion: reduce)"),t=()=>{v.current.setReducedMotion(e.matches)};return t(),e.addEventListener("change",t),()=>e.removeEventListener("change",t)},[]),(0,r.useEffect)(()=>{v.current.updateConfig({expression:a,action:i,state:s,speechId:c,lipSyncValue:d,durationMs:u})},[a,i,s,c,d,u]),(0,r.useEffect)(()=>{let t=!1,r=null;async function a(){if(g.current&&x.current){if(!e){E("error"),A("No Live2D model configured. Place model in assets/body/<name>/"),f?.("error","No Live2D model URL specified");return}E("loading"),f?.("loading"),A(null);try{let a=await o();if(t)return;let i=await l(e);if(t)return;let s=g.current;if(!s)return;let n=new h(s);n.initialize(a,i),b.current=n;let c=()=>{if(!x.current||!g.current)return;let e=x.current.getBoundingClientRect();if(e.width<=0||e.height<=0)return;let t=Math.min(window.devicePixelRatio||1,2),r=Math.max(1,Math.floor(e.width*t)),a=Math.max(1,Math.floor(e.height*t));(g.current.width!==r||g.current.height!==a)&&(g.current.width=r,g.current.height=a)};c(),(r=new ResizeObserver(c)).observe(x.current);let d=()=>{t||(b.current&&b.current.render(v.current,performance.now()),y.current=requestAnimationFrame(d))};y.current=requestAnimationFrame(d),E("ready"),f?.("ready")}catch(r){if(t)return;let e=r?.message||"Failed to initialize Live2D avatar";console.warn("[AvatarCanvas] Initialization error:",r),E("error"),A("Avatar model unavailable or failed to load."),f?.("error",e)}}}a();let i=g.current,s=e=>{e.preventDefault(),console.warn("[AvatarCanvas] WebGL context lost"),y.current&&cancelAnimationFrame(y.current),E("error"),A("WebGL context lost.")},n=()=>{console.log("[AvatarCanvas] WebGL context restored, re-initializing..."),a()};return i&&(i.addEventListener("webglcontextlost",s,!1),i.addEventListener("webglcontextrestored",n,!1)),()=>{t=!0,y.current&&(cancelAnimationFrame(y.current),y.current=null),r&&r.disconnect(),i&&(i.removeEventListener("webglcontextlost",s),i.removeEventListener("webglcontextrestored",n)),b.current&&(b.current.dispose(),b.current=null)}},[e,_,f]),(0,t.jsxs)("div",{ref:x,"data-testid":"avatar-canvas-container",className:`relative w-full h-full min-h-0 flex items-center justify-center overflow-hidden bg-transparent ${m}`,"aria-label":"Live2D Companion Presence",children:[(0,t.jsx)("canvas",{ref:g,role:"img","data-testid":"avatar-webgl-canvas","aria-label":"Live2D companion presence",style:{width:"100%",height:"100%",display:"block"},className:`absolute inset-0 w-full h-full block transition-opacity duration-500 ${"ready"===w?"opacity-100":"opacity-0"}`}),"loading"===w&&(0,t.jsxs)("div",{role:"status","aria-live":"polite",className:"absolute inset-0 flex flex-col items-center justify-center gap-3 bg-[#0b0b0e]/90 text-[var(--siduri-text-muted)]",children:[(0,t.jsx)("div",{className:"siduri-glyph w-10 h-10 text-base animate-pulse motion-reduce:animate-none",children:"✦"}),(0,t.jsx)("span",{className:"text-[11px] font-mono tracking-widest uppercase text-[var(--siduri-ember-light)]",children:"Initializing Presence..."})]}),"error"===w&&(0,t.jsxs)("div",{role:"alert","aria-live":"polite",className:"absolute inset-0 flex flex-col items-center justify-center p-6 text-center bg-[#0b0b0e]/95 text-[var(--siduri-text-muted)]",children:[(0,t.jsx)("div",{className:"w-8 h-8 rounded-full border border-[var(--siduri-border-subtle)] grid place-items-center text-xs text-[var(--siduri-text-dim)] mb-2 font-mono",children:"!"}),(0,t.jsx)("p",{className:"text-xs font-sans text-[var(--siduri-text-secondary)] mb-1",children:P||"Avatar unavailable in this browser."}),(0,t.jsx)("span",{className:"text-[10px] font-mono text-[var(--siduri-text-dim)] mb-3",children:"Conversational text mode remains active"}),(0,t.jsx)("button",{type:"button",onClick:()=>j(e=>e+1),className:"px-3 py-1 text-[11px] font-mono tracking-wider uppercase rounded border border-[var(--siduri-border-subtle)] hover:border-[var(--siduri-border-ember)] text-[var(--siduri-text-secondary)] hover:text-[var(--siduri-text-primary)] transition-colors focus-visible:ring-1 focus-visible:ring-[var(--siduri-border-ember)] outline-none","aria-label":"Retry avatar initialization",children:"Retry"})]})]})}var f=e.i(94108);let x="siduri.chat.conversations.v1";function g(){return"u">typeof crypto&&"randomUUID"in crypto?crypto.randomUUID():`${Date.now()}-${Math.random()}`}function v(e){return new Intl.DateTimeFormat(void 0,{hour:"numeric",minute:"2-digit"}).format(e)}e.s(["default",0,function(){let[e,s]=(0,r.useState)([]),[n,o]=(0,r.useState)(null),[l,c]=(0,r.useState)(""),[d,u]=(0,r.useState)("connecting"),[m,h]=(0,r.useState)(!1),[b,y]=(0,r.useState)(!1),[w,E]=(0,r.useState)(!1),[P,A]=(0,r.useState)(!1),[_,j]=(0,r.useState)(null),[T,L]=(0,r.useState)(void 0),C=(0,r.useRef)(null),R=(0,r.useRef)(null),N=(0,r.useRef)(null),S=(0,r.useMemo)(()=>e.find(e=>e.id===n)??null,[n,e]);function M(){return{id:g(),title:"New conversation",messages:[],updatedAt:Date.now()}}function D(e,t){s(r=>r.map(r=>r.id===e?t(r):r))}async function k(e){e.preventDefault();let t=l.trim();if(!t)return;if(/\[[^\]]+\]/.test(t))return void u("replace the blanks first");m&&N.current&&(N.current.abort("user_barge_in"),N.current=null,(0,f.interruptChat)("default","user_barge_in"));let r=S;r||(r=M(),s(e=>[r,...e]),o(r.id));let a={id:g(),role:"user",content:t,createdAt:Date.now()},i=g(),n={id:i,role:"assistant",content:"",createdAt:Date.now()},d=[...r.messages,a,n],p=0===r.messages.length?t.slice(0,42):r.title;D(r.id,e=>({...e,title:p,messages:d,updatedAt:Date.now()})),c(""),h(!0),u("streaming");let x=new AbortController;N.current=x;try{await (0,f.postStream)("/chat/stream",{id:"default",message:t,medium:"web",history:r.messages.slice(-20).map(e=>({role:e.role,content:e.content}))},{onAvatar:e=>{let t=e.speech_id;R.current&&clearTimeout(R.current),j({eventId:e.event_id,expression:e.expression||"neutral",action:e.action||"talk",state:"speaking",speechId:t,durationMs:e.durationMs});let r=e.durationMs||4500;R.current=setTimeout(()=>{j(e=>e?{...e,state:"idle",action:"idle"}:null)},r)},onChunk:e=>{e.deltaText&&D(r.id,t=>({...t,messages:t.messages.map(t=>t.id===i?{...t,content:t.content+e.deltaText}:t)})),(e.expression||e.action)&&j(t=>t?{...t,expression:e.expression||t.expression,action:e.action||t.action}:null)},onDone:e=>{let t=e.response||{},a=e.metadata?.memory_proposals,s=e.metadata?.behavioral_proposals;D(r.id,e=>({...e,messages:e.messages.map(e=>e.id===i?{...e,content:e.content||t.subtitle_en||"",spokenJa:t.spoken_ja,evidenceIds:t.evidence_ids,memoryProposals:a,behavioralProposals:s}:e),updatedAt:Date.now()})),u("online")},onInterrupted:()=>{D(r.id,e=>({...e,messages:e.messages.map(e=>e.id===i?{...e,content:e.content?`${e.content} [interrupted]`:"[interrupted]"}:e),updatedAt:Date.now()})),u("online")},onError:e=>{D(r.id,t=>({...t,messages:t.messages.map(t=>t.id===i?{...t,content:`I couldn’t reach the orchestrator. ${String(e)}`}:t),updatedAt:Date.now()})),u("offline")}},x.signal)}catch(e){x.signal.aborted||(D(r.id,t=>({...t,messages:t.messages.map(t=>t.id===i?{...t,content:`I couldn’t reach the orchestrator. ${String(e)}`}:t),updatedAt:Date.now()})),u("offline"))}finally{N.current=null,h(!1)}}(0,r.useEffect)(()=>()=>{R.current&&clearTimeout(R.current),N.current&&N.current.abort("unmounted")},[]),(0,r.useEffect)(()=>{let e=function(){try{let e=JSON.parse(window.localStorage.getItem(x)??"[]");return Array.isArray(e)?e:[]}catch{return[]}}();s(e),o(e[0]?.id??null),y(!0),(0,f.fetchApi)("/health").then(async e=>{if(e.ok){let t=await e.json().catch(()=>({}));u("online"),t.organs?.body?.modelUrl?L(t.organs.body.modelUrl):(0,f.fetchApi)("/api/models/body").then(async e=>{if(e.ok){let t=(await e.json().catch(()=>({}))).models||[],r=t.find(e=>"default"!==e);r?L(`/assets/body/${r}/model.model3.json`):t.length>0&&"default"!==t[0]&&L(`/assets/body/${t[0]}/model.model3.json`)}}).catch(()=>{})}else u("online")}).catch(()=>u("offline"))},[]),(0,r.useEffect)(()=>{b&&window.localStorage.setItem(x,JSON.stringify(e))},[e,b]),(0,r.useEffect)(()=>{C.current?.scrollTo({top:C.current.scrollHeight,behavior:"smooth"})},[n,S?.messages.length,m]);let B=S?.messages??[],I=B.at(-1)?.evidenceIds?.length??0;async function U(e,t,r){if(S)try{await (0,f.postJson)(`/memory/proposals/${r}`,{id:t,companionId:"default"});let a="approve"===r?"approved":"rejected";D(S.id,r=>({...r,messages:r.messages.map(r=>r.id===e&&r.memoryProposals?{...r,memoryProposals:r.memoryProposals.map(e=>e.proposal_id===t?{...e,status:a}:e)}:r)}))}catch(e){console.error(e)}}async function F(e,t,r){if(S)try{await (0,f.postJson)(`/memory/behavioral/${r}`,{id:t,companionId:"default"});let a="approve"===r?"confirmed":"rejected";D(S.id,r=>({...r,messages:r.messages.map(r=>r.id===e&&r.behavioralProposals?{...r,behavioralProposals:r.behavioralProposals.map(e=>e.directive_id===t?{...e,status:a}:e)}:r)}))}catch(e){console.error(e)}}return(0,t.jsxs)("div",{className:`chat-app ${w?"sidebar-collapsed":""}`,children:[(0,t.jsxs)("aside",{className:"chat-sidebar","aria-label":"Conversation history",children:[(0,t.jsxs)("div",{className:"chat-sidebar-top",children:[(0,t.jsxs)("a",{className:"chat-brand",href:"/chat",children:[(0,t.jsx)("span",{className:"chat-brand-mark",children:"S"}),(0,t.jsx)("span",{children:"SIDURI"})]}),(0,t.jsx)("button",{className:"sidebar-collapse",type:"button",onClick:()=>E(e=>!e),"aria-label":w?"Expand sidebar":"Collapse sidebar",children:w?"→":"←"})]}),(0,t.jsxs)("button",{className:"new-chat-button",type:"button",onClick:function(){let e=M();s(t=>[e,...t]),o(e.id),c(""),u("online")},children:[(0,t.jsx)("span",{children:"+"})," New conversation"]}),(0,t.jsxs)("div",{className:"history-heading",children:[(0,t.jsx)("span",{children:"Recent conversations"}),(0,t.jsx)("span",{children:e.length})]}),(0,t.jsx)("div",{className:"conversation-list",children:b?0===e.length?(0,t.jsx)("p",{className:"history-empty",children:"Your private conversations will appear here."}):e.slice().sort((e,t)=>t.updatedAt-e.updatedAt).map(r=>(0,t.jsxs)("div",{className:`conversation-row ${r.id===n?"selected":""}`,children:[(0,t.jsxs)("button",{type:"button",className:"conversation-select",onClick:()=>o(r.id),children:[(0,t.jsx)("span",{className:"conversation-title",children:r.title}),(0,t.jsx)("span",{className:"conversation-date",children:v(r.updatedAt)})]}),(0,t.jsx)("button",{type:"button",className:"conversation-delete",onClick:()=>(function(t){if(s(e=>e.filter(e=>e.id!==t)),n===t){let r=e.find(e=>e.id!==t);o(r?.id??null)}})(r.id),"aria-label":`Delete ${r.title}`,children:"×"})]},r.id)):(0,t.jsx)("p",{className:"history-empty",children:"Loading history…"})}),(0,t.jsx)("div",{className:"sidebar-footer",children:(0,t.jsxs)("a",{className:"sidebar-console",href:"/operator",children:[(0,t.jsx)("span",{children:"⌘"}),(0,t.jsx)("span",{children:"Operator console"}),(0,t.jsx)("b",{children:"↗"})]})})]}),(0,t.jsxs)("main",{className:"chat-workspace",children:[(0,t.jsxs)("div",{className:"chat-top-status flex items-center gap-2.5",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>A(e=>!e),className:`connection-pill cursor-pointer transition-all focus-visible:ring-1 focus-visible:ring-[var(--siduri-border-ember)] outline-none ${P?"border-[var(--siduri-border-ember)] bg-[var(--siduri-tint-med)] text-[var(--siduri-ember-highlight)]":"hover:border-[var(--siduri-border-ember)] text-[var(--siduri-text-secondary)]"}`,"aria-label":"Toggle avatar presence","aria-expanded":P,title:P?"Disable Avatar Presence":"Enable Avatar Presence",children:[(0,t.jsx)("span",{className:`status-light ${P?"online":""}`}),(0,t.jsx)("span",{children:"Presence"})]}),(0,t.jsxs)("span",{className:"connection-pill",children:[(0,t.jsx)("span",{className:`status-light ${"online"===d?"online":""}`}),d]})]}),(0,t.jsx)("div",{className:"flex flex-col flex-1 min-h-0 w-full overflow-hidden relative",children:(0,t.jsxs)("section",{className:"conversation-surface","aria-label":"Private chat",children:[(0,t.jsxs)("div",{ref:C,className:`conversation-scroll ${P?"presence-active":""}`,"aria-live":"polite",children:[P?(0,t.jsx)("div",{className:"avatar-presence-area","data-testid":"avatar-presence-area",children:(0,t.jsx)(p,{modelUrl:T,expression:_?.expression||"neutral",action:_?.action||"idle",state:_?.state||"idle",speechId:_?.speechId,lipSyncValue:_?.lipSyncValue,durationMs:_?.durationMs,className:"w-full h-full"})}):0===B.length?(0,t.jsx)(i,{onSelectPrompt:e=>c(e)}):B.map(e=>(0,t.jsxs)("article",{className:`platform-message ${e.role}`,children:[(0,t.jsx)("div",{className:"message-avatar",children:"user"===e.role?"U":"S"}),(0,t.jsxs)("div",{className:"message-body",children:[(0,t.jsxs)("div",{className:"message-meta",children:[(0,t.jsx)("span",{children:"user"===e.role?"You":"Siduri"}),(0,t.jsx)("time",{children:v(e.createdAt)})]}),(0,t.jsx)("p",{className:"message-primary",children:"assistant"===e.role?e.spokenJa??e.content:e.content}),"assistant"===e.role&&e.spokenJa&&(0,t.jsx)("p",{className:"message-translation",children:e.content}),e.evidenceIds&&e.evidenceIds.length>0&&(0,t.jsxs)("span",{className:"evidence-chip",children:[e.evidenceIds.length," evidence link",1===e.evidenceIds.length?"":"s"]}),e.memoryProposals&&e.memoryProposals.length>0&&(0,t.jsx)("div",{className:"memory-receipts",children:e.memoryProposals.map(r=>(0,t.jsxs)("div",{className:`memory-receipt status-${r.status}`,children:[(0,t.jsxs)("strong",{children:["Remember",r.claim_type?` (${r.claim_type})`:"",":"]})," ",(0,a.formatClaimReceipt)(r),(0,t.jsx)("div",{className:"receipt-actions",children:"pending"===r.status?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{type:"button",onClick:()=>U(e.id,r.proposal_id,"approve"),children:"Approve"}),(0,t.jsx)("button",{type:"button",onClick:()=>U(e.id,r.proposal_id,"reject"),children:"Reject"})]}):(0,t.jsx)("span",{children:r.status.toUpperCase()})})]},r.proposal_id))}),e.behavioralProposals&&e.behavioralProposals.length>0&&(0,t.jsx)("div",{className:"memory-receipts",children:e.behavioralProposals.map(r=>(0,t.jsxs)("div",{className:`memory-receipt status-${r.status}`,children:[(0,t.jsxs)("strong",{children:["Runtime effect [",r.knowledge_domain??r.domain," ","→ ",r.runtime_effect??r.memory_class,"]:"]})," ",(0,a.formatRuntimeEffect)(r),(0,t.jsx)("div",{className:"receipt-actions",children:"pending"===r.status?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{type:"button",onClick:()=>F(e.id,r.directive_id,"approve"),children:"Approve"}),(0,t.jsx)("button",{type:"button",onClick:()=>F(e.id,r.directive_id,"reject"),children:"Reject"})]}):(0,t.jsx)("span",{children:r.status.toUpperCase()})})]},r.directive_id))})]})]},e.id)),m&&!P&&(0,t.jsxs)("div",{className:"platform-message assistant thinking-message",children:[(0,t.jsx)("div",{className:"message-avatar",children:"S"}),(0,t.jsxs)("div",{className:"message-body",children:[(0,t.jsxs)("div",{className:"message-meta",children:[(0,t.jsx)("span",{children:"Siduri"}),(0,t.jsx)("span",{className:"thinking-label",children:"thinking"})]}),(0,t.jsxs)("div",{className:"thinking-dots",children:[(0,t.jsx)("i",{}),(0,t.jsx)("i",{}),(0,t.jsx)("i",{})]})]})]})]}),(0,t.jsxs)("form",{className:"platform-composer",onSubmit:k,children:[(0,t.jsx)("textarea",{value:l,onChange:e=>c(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),e.currentTarget.form?.requestSubmit())},placeholder:"Message Siduri…",rows:1,maxLength:4e3,"aria-label":"Message Siduri"}),(0,t.jsxs)("div",{className:"composer-bottom",children:[(0,t.jsxs)("span",{children:["Private local session ·"," ",I?`${I} evidence link${1===I?"":"s"}`:"No evidence attached"]}),m&&!l.trim()?(0,t.jsx)("button",{type:"button",onClick:function(){N.current&&(N.current.abort("user_stop"),N.current=null),(0,f.interruptChat)("default","user_stop"),h(!1),u("online")},"aria-label":"Stop generation",title:"Stop generation",children:"■"}):(0,t.jsx)("button",{type:"submit",disabled:!l.trim(),"aria-label":"Send message",children:"↑"})]})]})]})}),(0,t.jsx)("p",{className:"chat-disclaimer",children:"Siduri can be uncertain. Verify important details against the evidence."})]})]})}],12650)},94108,e=>{"use strict";var t=e.i(72619);let r=t.default.env.NEXT_PUBLIC_API_URL||"";async function a(e,t){return fetch(`${r}${e}`,t)}async function i(e,t){let r=await a(e,t);if(!r.ok)throw Error(`${e} returned ${r.status}`);return r.json()}async function s(e,t){let r=await a(e,{method:"POST",headers:t?{"Content-Type":"application/json"}:void 0,body:t?"string"==typeof t?t:JSON.stringify(t):void 0});if(!r.ok)throw Error(await r.text().catch(()=>r.statusText));return r.json().catch(()=>({}))}async function n(e,t){let r=await a(e,{method:"POST",headers:t?{"Content-Type":"application/json"}:void 0,body:t?"string"==typeof t?t:JSON.stringify(t):void 0});if(!r.ok)throw Error(await r.text().catch(()=>r.statusText))}async function o(e,t,r,i){let s=await a(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t),signal:i});if(!s.ok)throw Error(await s.text().catch(()=>s.statusText)||`HTTP ${s.status}`);if(!s.body)throw Error("ReadableStream not supported in response");let n=s.body.getReader(),o=new TextDecoder,l="";try{for(;;){let{done:e,value:t}=await n.read();if(e)break;let a=(l+=o.decode(t,{stream:!0})).split("\n");l=a.pop()||"";let i="message";for(let e of a){let t=e.trim();if(t){if(t.startsWith("event:"))i=t.slice(6).trim();else if(t.startsWith("data:")){let e=t.slice(5).trim();try{let t=JSON.parse(e);switch(i){case"staged":r.onStaged?.(t);break;case"chunk":r.onChunk?.(t);break;case"avatar":r.onAvatar?.(t);break;case"done":r.onDone?.(t);break;case"interrupted":r.onInterrupted?.(t);break;case"error":r.onError?.(Error(t.error||"Stream error"))}}catch{}}}}}}catch(e){if(i?.aborted)r.onInterrupted?.({reason:i.reason});else throw r.onError?.(e),e}finally{n.releaseLock()}}async function l(e="default",t="user_barge_in"){await s("/chat/interrupt",{companionId:e,reason:t}).catch(()=>{})}t.default.env.NEXT_PUBLIC_WS_URL||(window.location.protocol,window.location.host),e.s(["fetchApi",0,a,"getJson",0,i,"interruptChat",0,l,"postAction",0,n,"postJson",0,s,"postStream",0,o])},51523,e=>{"use strict";let t=new Set(["siduri","self","companion"]),r=new Set(["user","actor","owner","primary_user"]);function a(e){return e.replace(/[._]+/g," ").replace(/\s+/g," ").trim()}function i(e){let t=e.trim();return t&&!/[.!?]$/.test(t)?`${t}.`:t}function s(e){let s=e.subject?.trim()??"",n=s.toLowerCase(),o=e.predicate?.trim()??"",l=o.toLowerCase(),c=e.value?.trim()??"";if(!s||!o||!c)return i(e.content??c);if(t.has(n))return"name"===l?i(`Companion name is ${c}`):i(`Companion ${a(o)} is ${c}`);if(r.has(n))return"name"===l?i(`User name is ${c}`):"preferred_address"===l?i(`User preferred address is ${c}`):"relationship_to_siduri"===l||"relationship"===l?i(`User relationship configured as ${c}`):i(`User ${a(o)} is ${c}`);if(n.startsWith("primary_user.")||n.startsWith("user.")){let e=n.startsWith("primary_user.")?"primary_user.":"user.",t=a(s.slice(e.length)),r="uid"===l||"id"===l?"ID":a(o);return i(`User ${t} ${r} is ${c}`)}let d=a(s);return i(`${/s$/i.test(d)?`${d}'`:`${d}'s`} ${a(o)} is ${c}`)}e.s(["formatClaimReceipt",0,s,"formatRuntimeEffect",0,function(e){let n=e.subject?.trim().toLowerCase()??"",o=e.predicate?.trim().toLowerCase()??"",l=e.value?.trim()??"",c=e.behavior?.instruction?.trim()??"";return"behavioral"===e.memory_class&&c?i(c):t.has(n)&&"name"===o?i(`Set companion identity/name to ${l}`):t.has(n)?i(`Set companion ${a(o)} to ${l}`):r.has(n)&&("relationship_to_siduri"===o||"relationship"===o)?i(`Set user relationship to ${l}`):r.has(n)&&"name"===o?i(`Set user name to ${l}`):s(e)}])}]);
30
+ `;function m(e,t,r){let a=e.createShader(t);if(!a)throw Error("Failed to create shader");if(e.shaderSource(a,r),e.compileShader(a),!e.getShaderParameter(a,e.COMPILE_STATUS)){let t=e.getShaderInfoLog(a);throw e.deleteShader(a),Error(`Shader compilation error: ${t}`)}return a}class h{canvas;gl=null;program=null;maskProgram=null;vertexBuffer=null;uvBuffer=null;indexBuffer=null;aPositionLocation=-1;aTexCoordLocation=-1;uMatrixLocation=null;uTextureLocation=null;uOpacityLocation=null;maskAPositionLocation=-1;maskATexCoordLocation=-1;maskUMatrixLocation=null;maskUTextureLocation=null;textures=[];moc=null;model=null;core=null;paramIndices=new Map;isDisposed=!1;constructor(e){this.canvas=e}modelBounds={minX:-.39,maxX:.4,minY:-.98,maxY:.18,width:.79,height:1.16,centerX:.006,centerY:-.4};initialize(e,t){this.core=e;let r={alpha:!0,premultipliedAlpha:!0,preserveDrawingBuffer:!1,antialias:!0,stencil:!0},a=this.canvas.getContext("webgl",r)||this.canvas.getContext("experimental-webgl",r)||this.canvas.getContext("webgl2",r);if(!a)throw Error("WebGL is not supported in this browser environment");this.gl=a;let i=m(a,a.VERTEX_SHADER,c),s=m(a,a.FRAGMENT_SHADER,d),n=a.createProgram();if(!n)throw Error("Failed to create WebGL program");if(a.attachShader(n,i),a.attachShader(n,s),a.linkProgram(n),!a.getProgramParameter(n,a.LINK_STATUS))throw Error(`Program link error: ${a.getProgramInfoLog(n)}`);this.program=n,this.aPositionLocation=a.getAttribLocation(n,"a_position"),this.aTexCoordLocation=a.getAttribLocation(n,"a_texCoord"),this.uMatrixLocation=a.getUniformLocation(n,"u_matrix"),this.uTextureLocation=a.getUniformLocation(n,"u_texture"),this.uOpacityLocation=a.getUniformLocation(n,"u_opacity");let o=m(a,a.FRAGMENT_SHADER,u),l=a.createProgram();if(!l)throw Error("Failed to create Mask WebGL program");if(a.attachShader(l,i),a.attachShader(l,o),a.linkProgram(l),!a.getProgramParameter(l,a.LINK_STATUS))throw Error(`Mask Program link error: ${a.getProgramInfoLog(l)}`);if(this.maskProgram=l,this.maskAPositionLocation=a.getAttribLocation(l,"a_position"),this.maskATexCoordLocation=a.getAttribLocation(l,"a_texCoord"),this.maskUMatrixLocation=a.getUniformLocation(l,"u_matrix"),this.maskUTextureLocation=a.getUniformLocation(l,"u_texture"),this.vertexBuffer=a.createBuffer(),this.uvBuffer=a.createBuffer(),this.indexBuffer=a.createBuffer(),a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,1),this.textures=t.textures.map(e=>{let t=a.createTexture();if(!t)throw Error("Failed to create WebGL texture");return a.bindTexture(a.TEXTURE_2D,t),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.LINEAR_MIPMAP_NEAREST),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.LINEAR),a.texImage2D(a.TEXTURE_2D,0,a.RGBA,a.RGBA,a.UNSIGNED_BYTE,e),a.generateMipmap(a.TEXTURE_2D),t}),this.moc=e.Moc.fromArrayBuffer(t.mocBuffer),!this.moc)throw Error("Failed to create Live2D Moc from ArrayBuffer");if(this.model=e.Model.fromMoc(this.moc),!this.model)throw Error("Failed to create Live2D Model from Moc");let h=this.model.parameters.ids;for(let e=0;e<h.length;e++)this.paramIndices.set(h[e],e);this.initializeNeutralMouth(),this.model.update(),this.calculateModelBounds()}initializeNeutralMouth(){this.model&&(this.setParamDirect("ParamMouthOpenY",0),this.setParamDirect("ParamMouthForm",0))}setParamDirect(e,t){let r=this.paramIndices.get(e);if(void 0!==r&&this.model){let e=this.model.parameters.minimumValues[r],a=this.model.parameters.maximumValues[r];this.model.parameters.values[r]=Math.max(e,Math.min(a,t))}}calculateModelBounds(){if(!this.model)return;let e=this.model.drawables,t=e.count,r=1/0,a=-1/0,i=1/0,s=-1/0;for(let n=0;n<t;n++){let t=e.vertexPositions[n];if(t&&0!==t.length)for(let e=0;e<t.length;e+=2){let n=t[e],o=t[e+1];n<r&&(r=n),n>a&&(a=n),o<i&&(i=o),o>s&&(s=o)}}r!==1/0&&a!==-1/0&&i!==1/0&&s!==-1/0&&(this.modelBounds={minX:r,maxX:a,minY:i,maxY:s,width:a-r,height:s-i,centerX:(r+a)/2,centerY:(i+s)/2})}getModelBounds(){return{...this.modelBounds}}setParam(e,t,r=1){let a=this.paramIndices.get(e);if(void 0!==a&&this.model){let e=this.model.parameters.values[a],i=Math.max(this.model.parameters.minimumValues[a],Math.min(this.model.parameters.maximumValues[a],t));this.model.parameters.values[a]=e+(i-e)*r}}render(e,t=Date.now()){let r;if(this.isDisposed||!this.gl||!this.model||!this.program)return;let a=this.gl,i=this.canvas.width,s=this.canvas.height;if(0===i||0===s)return;let n=e.calculateFrameParameters(t);this.setParam("ParamAngleX",n.angleX,.2),this.setParam("ParamAngleY",n.angleY,.2),this.setParam("ParamAngleZ",n.angleZ,.2),this.setParam("ParamBodyAngleX",n.bodyAngleX,.15),this.setParam("ParamBreath",n.breath,.3),this.setParam("ParamEyeLOpen",n.eyeOpenL,.4),this.setParam("ParamEyeROpen",n.eyeOpenR,.4),this.setParam("ParamMouthOpenY",n.mouthOpenY,.35);let o=function(e){if(!e)return"neutral";switch(e.toLowerCase().trim()){case"surprised":return"face_aozame.exp3.json";case"concerned":case"thinking":return"eyes_zetubou.exp3.json";case"happy":return"hair_open.exp3.json";default:return"neutral"}}(e.expression);"face_aozame.exp3.json"===o?(this.setParam("Param10",1,.2),this.setParam("Param9",0,.15),this.setParam("Param11",0,.15),this.setParam("Param12",0,.15)):"eyes_zetubou.exp3.json"===o?(this.setParam("Param9",1,.2),this.setParam("Param10",0,.15),this.setParam("Param11",0,.15),this.setParam("Param12",0,.15)):"hair_open.exp3.json"===o?(this.setParam("Param11",1,.2),this.setParam("Param10",0,.15),this.setParam("Param9",0,.15),this.setParam("Param12",0,.15)):"eye_color.exp3.json"===o?(this.setParam("Param12",1,.2),this.setParam("Param10",0,.15),this.setParam("Param9",0,.15),this.setParam("Param11",0,.15)):(this.setParam("Param10",0,.15),this.setParam("Param9",0,.15),this.setParam("Param11",0,.15),this.setParam("Param12",0,.15)),this.model.update(),a.viewport(0,0,i,s),a.clearColor(0,0,0,0),a.clear(a.COLOR_BUFFER_BIT|a.STENCIL_BUFFER_BIT),a.enable(a.BLEND),a.blendFunc(a.ONE,a.ONE_MINUS_SRC_ALPHA),a.useProgram(this.program);let l=i/s,c=this.modelBounds.width,d=this.modelBounds.height,u=this.modelBounds.centerX,m=this.modelBounds.centerY,h=(r=l>=c/d?1.84/d:1.84/c*l)/l,p=new Float32Array([h,0,0,0,0,r,0,0,0,0,1,0,-u*h,-m*r,0,1]);a.uniformMatrix4fv(this.uMatrixLocation,!1,p),a.uniform1i(this.uTextureLocation,0);let f=this.model.drawables,x=f.count,g=f.renderOrders,v=[];for(let e=0;e<x;e++)v.push(e);v.sort((e,t)=>g[e]-g[t]),a.enableVertexAttribArray(this.aPositionLocation),a.enableVertexAttribArray(this.aTexCoordLocation);let b=(e,t)=>{let r=void 0!==t?t:f.opacities[e];if(r<=.001)return;let i=f.textureIndices[e],s=this.textures[i];if(!s)return;a.activeTexture(a.TEXTURE0),a.bindTexture(a.TEXTURE_2D,s),a.uniform1f(this.uOpacityLocation,r);let n=f.vertexPositions[e];a.bindBuffer(a.ARRAY_BUFFER,this.vertexBuffer),a.bufferData(a.ARRAY_BUFFER,n,a.DYNAMIC_DRAW),a.vertexAttribPointer(this.aPositionLocation,2,a.FLOAT,!1,0,0);let o=f.vertexUvs[e];a.bindBuffer(a.ARRAY_BUFFER,this.uvBuffer),a.bufferData(a.ARRAY_BUFFER,o,a.DYNAMIC_DRAW),a.vertexAttribPointer(this.aTexCoordLocation,2,a.FLOAT,!1,0,0);let l=f.indices[e];a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,this.indexBuffer),a.bufferData(a.ELEMENT_ARRAY_BUFFER,l,a.DYNAMIC_DRAW),a.drawElements(a.TRIANGLES,l.length,a.UNSIGNED_SHORT,0)},y=e=>{if(!this.maskProgram)return;a.useProgram(this.maskProgram),a.uniformMatrix4fv(this.maskUMatrixLocation,!1,p),a.uniform1i(this.maskUTextureLocation,0),a.enableVertexAttribArray(this.maskAPositionLocation),a.enableVertexAttribArray(this.maskATexCoordLocation);let t=f.textureIndices[e],r=this.textures[t];if(!r)return;a.activeTexture(a.TEXTURE0),a.bindTexture(a.TEXTURE_2D,r);let i=f.vertexPositions[e];a.bindBuffer(a.ARRAY_BUFFER,this.vertexBuffer),a.bufferData(a.ARRAY_BUFFER,i,a.DYNAMIC_DRAW),a.vertexAttribPointer(this.maskAPositionLocation,2,a.FLOAT,!1,0,0);let s=f.vertexUvs[e];a.bindBuffer(a.ARRAY_BUFFER,this.uvBuffer),a.bufferData(a.ARRAY_BUFFER,s,a.DYNAMIC_DRAW),a.vertexAttribPointer(this.maskATexCoordLocation,2,a.FLOAT,!1,0,0);let n=f.indices[e];a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,this.indexBuffer),a.bufferData(a.ELEMENT_ARRAY_BUFFER,n,a.DYNAMIC_DRAW),a.drawElements(a.TRIANGLES,n.length,a.UNSIGNED_SHORT,0),a.useProgram(this.program),a.enableVertexAttribArray(this.aPositionLocation),a.enableVertexAttribArray(this.aTexCoordLocation)},w=-1;for(let e of v)if(!(f.opacities[e]<=.001))if(f.maskCounts[e]>0){let t=f.masks[e][0];t!==w&&(w=t,a.enable(a.STENCIL_TEST),a.stencilMask(255),a.clear(a.STENCIL_BUFFER_BIT),a.stencilFunc(a.ALWAYS,1,255),a.stencilOp(a.KEEP,a.KEEP,a.REPLACE),a.colorMask(!1,!1,!1,!1),y(t),a.colorMask(!0,!0,!0,!0)),a.stencilFunc(a.EQUAL,1,255),a.stencilOp(a.KEEP,a.KEEP,a.KEEP),b(e)}else -1!==w&&(a.disable(a.STENCIL_TEST),w=-1),b(e);-1!==w&&a.disable(a.STENCIL_TEST)}dispose(){if(this.isDisposed=!0,this.gl){for(let e of this.textures)this.gl.deleteTexture(e);this.textures=[],this.vertexBuffer&&this.gl.deleteBuffer(this.vertexBuffer),this.uvBuffer&&this.gl.deleteBuffer(this.uvBuffer),this.indexBuffer&&this.gl.deleteBuffer(this.indexBuffer),this.program&&this.gl.deleteProgram(this.program)}this.model&&"function"==typeof this.model.release&&this.model.release(),this.moc&&"function"==typeof this.moc.release&&this.moc.release(),this.model=null,this.moc=null,this.gl=null}}function p({modelUrl:e,expression:a="neutral",action:i="idle",state:s="idle",speechId:c,lipSyncValue:d,durationMs:u,className:m="",onStatusChange:f}){let x=(0,r.useRef)(null),g=(0,r.useRef)(null),v=(0,r.useRef)(new n({expression:a,action:i,state:s,speechId:c,lipSyncValue:d,durationMs:u})),b=(0,r.useRef)(null),y=(0,r.useRef)(null),[w,E]=(0,r.useState)("loading"),[P,A]=(0,r.useState)(null),[_,j]=(0,r.useState)(0);return(0,r.useEffect)(()=>{if(!window.matchMedia)return;let e=window.matchMedia("(prefers-reduced-motion: reduce)"),t=()=>{v.current.setReducedMotion(e.matches)};return t(),e.addEventListener("change",t),()=>e.removeEventListener("change",t)},[]),(0,r.useEffect)(()=>{v.current.updateConfig({expression:a,action:i,state:s,speechId:c,lipSyncValue:d,durationMs:u})},[a,i,s,c,d,u]),(0,r.useEffect)(()=>{let t=!1,r=null;async function a(){if(g.current&&x.current){if(!e){E("error"),A("No Live2D model configured. Place model in assets/body/<name>/"),f?.("error","No Live2D model URL specified");return}E("loading"),f?.("loading"),A(null);try{let a=await o();if(t)return;let i=await l(e);if(t)return;let s=g.current;if(!s)return;let n=new h(s);n.initialize(a,i),b.current=n;let c=()=>{if(!x.current||!g.current)return;let e=x.current.getBoundingClientRect();if(e.width<=0||e.height<=0)return;let t=Math.min(window.devicePixelRatio||1,2),r=Math.max(1,Math.floor(e.width*t)),a=Math.max(1,Math.floor(e.height*t));(g.current.width!==r||g.current.height!==a)&&(g.current.width=r,g.current.height=a)};c(),(r=new ResizeObserver(c)).observe(x.current);let d=()=>{t||(b.current&&b.current.render(v.current,performance.now()),y.current=requestAnimationFrame(d))};y.current=requestAnimationFrame(d),E("ready"),f?.("ready")}catch(r){if(t)return;let e=r?.message||"Failed to initialize Live2D avatar";console.warn("[AvatarCanvas] Initialization error:",r),E("error"),A("Avatar model unavailable or failed to load."),f?.("error",e)}}}a();let i=g.current,s=e=>{e.preventDefault(),console.warn("[AvatarCanvas] WebGL context lost"),y.current&&cancelAnimationFrame(y.current),E("error"),A("WebGL context lost.")},n=()=>{console.log("[AvatarCanvas] WebGL context restored, re-initializing..."),a()};return i&&(i.addEventListener("webglcontextlost",s,!1),i.addEventListener("webglcontextrestored",n,!1)),()=>{t=!0,y.current&&(cancelAnimationFrame(y.current),y.current=null),r&&r.disconnect(),i&&(i.removeEventListener("webglcontextlost",s),i.removeEventListener("webglcontextrestored",n)),b.current&&(b.current.dispose(),b.current=null)}},[e,_,f]),(0,t.jsxs)("div",{ref:x,"data-testid":"avatar-canvas-container",className:`relative w-full h-full min-h-0 flex items-center justify-center overflow-hidden bg-transparent ${m}`,"aria-label":"Live2D Companion Presence",children:[(0,t.jsx)("canvas",{ref:g,role:"img","data-testid":"avatar-webgl-canvas","aria-label":"Live2D companion presence",style:{width:"100%",height:"100%",display:"block"},className:`absolute inset-0 w-full h-full block transition-opacity duration-500 ${"ready"===w?"opacity-100":"opacity-0"}`}),"loading"===w&&(0,t.jsxs)("div",{role:"status","aria-live":"polite",className:"absolute inset-0 flex flex-col items-center justify-center gap-3 bg-[#0b0b0e]/90 text-[var(--siduri-text-muted)]",children:[(0,t.jsx)("div",{className:"siduri-glyph w-10 h-10 text-base animate-pulse motion-reduce:animate-none",children:"✦"}),(0,t.jsx)("span",{className:"text-[11px] font-mono tracking-widest uppercase text-[var(--siduri-ember-light)]",children:"Initializing Presence..."})]}),"error"===w&&(0,t.jsxs)("div",{role:"alert","aria-live":"polite",className:"absolute inset-0 flex flex-col items-center justify-center p-6 text-center bg-[#0b0b0e]/95 text-[var(--siduri-text-muted)]",children:[(0,t.jsx)("div",{className:"w-8 h-8 rounded-full border border-[var(--siduri-border-subtle)] grid place-items-center text-xs text-[var(--siduri-text-dim)] mb-2 font-mono",children:"!"}),(0,t.jsx)("p",{className:"text-xs font-sans text-[var(--siduri-text-secondary)] mb-1",children:P||"Avatar unavailable in this browser."}),(0,t.jsx)("span",{className:"text-[10px] font-mono text-[var(--siduri-text-dim)] mb-3",children:"Conversational text mode remains active"}),(0,t.jsx)("button",{type:"button",onClick:()=>j(e=>e+1),className:"px-3 py-1 text-[11px] font-mono tracking-wider uppercase rounded border border-[var(--siduri-border-subtle)] hover:border-[var(--siduri-border-ember)] text-[var(--siduri-text-secondary)] hover:text-[var(--siduri-text-primary)] transition-colors focus-visible:ring-1 focus-visible:ring-[var(--siduri-border-ember)] outline-none","aria-label":"Retry avatar initialization",children:"Retry"})]})]})}var f=e.i(94108);let x="siduri.chat.conversations.v1";function g(){return"u">typeof crypto&&"randomUUID"in crypto?crypto.randomUUID():`${Date.now()}-${Math.random()}`}function v(e){return new Intl.DateTimeFormat(void 0,{hour:"numeric",minute:"2-digit"}).format(e)}e.s(["default",0,function(){let[e,s]=(0,r.useState)([]),[n,o]=(0,r.useState)(null),[l,c]=(0,r.useState)(""),[d,u]=(0,r.useState)("connecting"),[m,h]=(0,r.useState)(!1),[b,y]=(0,r.useState)(!1),[w,E]=(0,r.useState)(!1),[P,A]=(0,r.useState)(!1),[_,j]=(0,r.useState)(null),[T,L]=(0,r.useState)(void 0),C=(0,r.useRef)(null),R=(0,r.useRef)(null),N=(0,r.useRef)(null),S=(0,r.useMemo)(()=>e.find(e=>e.id===n)??null,[n,e]);function M(){return{id:g(),title:"New conversation",messages:[],updatedAt:Date.now()}}function D(e,t){s(r=>r.map(r=>r.id===e?t(r):r))}async function k(e){e.preventDefault();let t=l.trim();if(!t)return;if(/\[[^\]]+\]/.test(t))return void u("replace the blanks first");m&&N.current&&(N.current.abort("user_barge_in"),N.current=null,(0,f.interruptChat)("default","user_barge_in"));let r=S;r||(r=M(),s(e=>[r,...e]),o(r.id));let a={id:g(),role:"user",content:t,createdAt:Date.now()},i=g(),n={id:i,role:"assistant",content:"",createdAt:Date.now()},d=[...r.messages,a,n],p=0===r.messages.length?t.slice(0,42):r.title;D(r.id,e=>({...e,title:p,messages:d,updatedAt:Date.now()})),c(""),h(!0),u("streaming");let x=new AbortController;N.current=x;try{await (0,f.postStream)("/chat/stream",{id:"default",message:t,medium:"web",history:r.messages.slice(-20).map(e=>({role:e.role,content:e.content}))},{onAvatar:e=>{let t=e.speech_id;R.current&&clearTimeout(R.current),j({eventId:e.event_id,expression:e.expression||"neutral",action:e.action||"talk",state:"speaking",speechId:t,durationMs:e.durationMs});let r=e.durationMs||4500;R.current=setTimeout(()=>{j(e=>e?{...e,state:"idle",action:"idle"}:null)},r)},onChunk:e=>{e.deltaText&&D(r.id,t=>({...t,messages:t.messages.map(t=>t.id===i?{...t,content:t.content+e.deltaText}:t)})),(e.expression||e.action)&&j(t=>t?{...t,expression:e.expression||t.expression,action:e.action||t.action}:null)},onDone:e=>{let t=e.response||{},a=e.metadata?.memory_proposals,s=e.metadata?.behavioral_proposals;D(r.id,e=>({...e,messages:e.messages.map(e=>e.id===i?{...e,content:e.content||t.subtitle_en||"",spokenJa:t.spoken_ja,evidenceIds:t.evidence_ids,memoryProposals:a,behavioralProposals:s}:e),updatedAt:Date.now()})),u("online")},onInterrupted:()=>{D(r.id,e=>({...e,messages:e.messages.map(e=>e.id===i?{...e,content:e.content?`${e.content} [interrupted]`:"[interrupted]"}:e),updatedAt:Date.now()})),u("online")},onError:e=>{D(r.id,t=>({...t,messages:t.messages.map(t=>t.id===i?{...t,content:`I couldn’t reach the orchestrator. ${String(e)}`}:t),updatedAt:Date.now()})),u("offline")}},x.signal)}catch(e){x.signal.aborted||(D(r.id,t=>({...t,messages:t.messages.map(t=>t.id===i?{...t,content:`I couldn’t reach the orchestrator. ${String(e)}`}:t),updatedAt:Date.now()})),u("offline"))}finally{N.current=null,h(!1)}}(0,r.useEffect)(()=>()=>{R.current&&clearTimeout(R.current),N.current&&N.current.abort("unmounted")},[]),(0,r.useEffect)(()=>{let e=function(){try{let e=JSON.parse(window.localStorage.getItem(x)??"[]");return Array.isArray(e)?e:[]}catch{return[]}}();s(e),o(e[0]?.id??null),y(!0),(0,f.fetchApi)("/health").then(async e=>{if(e.ok){let t=await e.json().catch(()=>({}));u("online"),t.organs?.body?.modelUrl?L(t.organs.body.modelUrl):(0,f.fetchApi)("/api/models/body").then(async e=>{if(e.ok){let t=(await e.json().catch(()=>({}))).models||[],r=t.find(e=>"default"!==e);r?L(`/assets/body/${r}/model.model3.json`):t.length>0&&"default"!==t[0]&&L(`/assets/body/${t[0]}/model.model3.json`)}}).catch(()=>{})}else u("online")}).catch(()=>u("offline"))},[]),(0,r.useEffect)(()=>{b&&window.localStorage.setItem(x,JSON.stringify(e))},[e,b]),(0,r.useEffect)(()=>{C.current?.scrollTo({top:C.current.scrollHeight,behavior:"smooth"})},[n,S?.messages.length,m]);let B=S?.messages??[],I=B.at(-1)?.evidenceIds?.length??0;async function U(e,t,r){if(S)try{await (0,f.postJson)(`/memory/proposals/${r}`,{id:t,companionId:"default"});let a="approve"===r?"approved":"rejected";D(S.id,r=>({...r,messages:r.messages.map(r=>r.id===e&&r.memoryProposals?{...r,memoryProposals:r.memoryProposals.map(e=>e.proposal_id===t?{...e,status:a}:e)}:r)}))}catch(e){console.error(e)}}async function F(e,t,r){if(S)try{await (0,f.postJson)(`/memory/behavioral/${r}`,{id:t,companionId:"default"});let a="approve"===r?"confirmed":"rejected";D(S.id,r=>({...r,messages:r.messages.map(r=>r.id===e&&r.behavioralProposals?{...r,behavioralProposals:r.behavioralProposals.map(e=>e.directive_id===t?{...e,status:a}:e)}:r)}))}catch(e){console.error(e)}}return(0,t.jsxs)("div",{className:`chat-app ${w?"sidebar-collapsed":""}`,children:[(0,t.jsxs)("aside",{className:"chat-sidebar","aria-label":"Conversation history",children:[(0,t.jsxs)("div",{className:"chat-sidebar-top",children:[(0,t.jsxs)("a",{className:"chat-brand",href:"/chat",children:[(0,t.jsx)("span",{className:"chat-brand-mark",children:"S"}),(0,t.jsx)("span",{children:"SIDURI"})]}),(0,t.jsx)("button",{className:"sidebar-collapse",type:"button",onClick:()=>E(e=>!e),"aria-label":w?"Expand sidebar":"Collapse sidebar",children:w?"→":"←"})]}),(0,t.jsxs)("button",{className:"new-chat-button",type:"button",onClick:function(){let e=M();s(t=>[e,...t]),o(e.id),c(""),u("online")},children:[(0,t.jsx)("span",{children:"+"})," New conversation"]}),(0,t.jsxs)("div",{className:"history-heading",children:[(0,t.jsx)("span",{children:"Recent conversations"}),(0,t.jsx)("span",{children:e.length})]}),(0,t.jsx)("div",{className:"conversation-list",children:b?0===e.length?(0,t.jsx)("p",{className:"history-empty",children:"Your private conversations will appear here."}):e.slice().sort((e,t)=>t.updatedAt-e.updatedAt).map(r=>(0,t.jsxs)("div",{className:`conversation-row ${r.id===n?"selected":""}`,children:[(0,t.jsxs)("button",{type:"button",className:"conversation-select",onClick:()=>o(r.id),children:[(0,t.jsx)("span",{className:"conversation-title",children:r.title}),(0,t.jsx)("span",{className:"conversation-date",children:v(r.updatedAt)})]}),(0,t.jsx)("button",{type:"button",className:"conversation-delete",onClick:()=>(function(t){if(s(e=>e.filter(e=>e.id!==t)),n===t){let r=e.find(e=>e.id!==t);o(r?.id??null)}})(r.id),"aria-label":`Delete ${r.title}`,children:"×"})]},r.id)):(0,t.jsx)("p",{className:"history-empty",children:"Loading history…"})}),(0,t.jsx)("div",{className:"sidebar-footer",children:(0,t.jsxs)("a",{className:"sidebar-console",href:"/operator",children:[(0,t.jsx)("span",{children:"⌘"}),(0,t.jsx)("span",{children:"Operator console"}),(0,t.jsx)("b",{children:"↗"})]})})]}),(0,t.jsxs)("main",{className:"chat-workspace",children:[(0,t.jsxs)("div",{className:"chat-top-status flex items-center gap-2.5",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>A(e=>!e),className:`connection-pill cursor-pointer transition-all focus-visible:ring-1 focus-visible:ring-[var(--siduri-border-ember)] outline-none ${P?"border-[var(--siduri-border-ember)] bg-[var(--siduri-tint-med)] text-[var(--siduri-ember-highlight)]":"hover:border-[var(--siduri-border-ember)] text-[var(--siduri-text-secondary)]"}`,"aria-label":"Toggle avatar presence","aria-expanded":P,title:P?"Disable Avatar Presence":"Enable Avatar Presence",children:[(0,t.jsx)("span",{className:`status-light ${P?"online":""}`}),(0,t.jsx)("span",{children:"Presence"})]}),(0,t.jsxs)("span",{className:"connection-pill",children:[(0,t.jsx)("span",{className:`status-light ${"online"===d?"online":""}`}),d]})]}),(0,t.jsx)("div",{className:"flex flex-col flex-1 min-h-0 w-full overflow-hidden relative",children:(0,t.jsxs)("section",{className:"conversation-surface","aria-label":"Private chat",children:[(0,t.jsxs)("div",{ref:C,className:`conversation-scroll ${P?"presence-active":""}`,"aria-live":"polite",children:[P?(0,t.jsx)("div",{className:"avatar-presence-area","data-testid":"avatar-presence-area",children:(0,t.jsx)(p,{modelUrl:T,expression:_?.expression||"neutral",action:_?.action||"idle",state:_?.state||"idle",speechId:_?.speechId,lipSyncValue:_?.lipSyncValue,durationMs:_?.durationMs,className:"w-full h-full"})}):0===B.length?(0,t.jsx)(i,{onSelectPrompt:e=>c(e)}):B.map(e=>(0,t.jsxs)("article",{className:`platform-message ${e.role}`,children:[(0,t.jsx)("div",{className:"message-avatar",children:"user"===e.role?"U":"S"}),(0,t.jsxs)("div",{className:"message-body",children:[(0,t.jsxs)("div",{className:"message-meta",children:[(0,t.jsx)("span",{children:"user"===e.role?"You":"Siduri"}),(0,t.jsx)("time",{children:v(e.createdAt)})]}),(0,t.jsx)("p",{className:"message-primary",children:"assistant"===e.role?e.spokenJa??e.content:e.content}),"assistant"===e.role&&e.spokenJa&&(0,t.jsx)("p",{className:"message-translation",children:e.content}),e.evidenceIds&&e.evidenceIds.length>0&&(0,t.jsxs)("span",{className:"evidence-chip",children:[e.evidenceIds.length," evidence link",1===e.evidenceIds.length?"":"s"]}),e.memoryProposals&&e.memoryProposals.length>0&&(0,t.jsx)("div",{className:"memory-receipts",children:e.memoryProposals.map(r=>(0,t.jsxs)("div",{className:`memory-receipt status-${r.status}`,children:[(0,t.jsxs)("strong",{children:["Remember",r.claim_type?` (${r.claim_type})`:"",":"]})," ",(0,a.formatClaimReceipt)(r),(0,t.jsx)("div",{className:"receipt-actions",children:"pending"===r.status?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{type:"button",onClick:()=>U(e.id,r.proposal_id,"approve"),children:"Approve"}),(0,t.jsx)("button",{type:"button",onClick:()=>U(e.id,r.proposal_id,"reject"),children:"Reject"})]}):(0,t.jsx)("span",{children:r.status.toUpperCase()})})]},r.proposal_id))}),e.behavioralProposals&&e.behavioralProposals.length>0&&(0,t.jsx)("div",{className:"memory-receipts",children:e.behavioralProposals.map(r=>(0,t.jsxs)("div",{className:`memory-receipt status-${r.status}`,children:[(0,t.jsxs)("strong",{children:["Runtime effect [",r.knowledge_domain??r.domain," ","→ ",r.runtime_effect??r.memory_class,"]:"]})," ",(0,a.formatRuntimeEffect)(r),(0,t.jsx)("div",{className:"receipt-actions",children:"pending"===r.status?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{type:"button",onClick:()=>F(e.id,r.directive_id,"approve"),children:"Approve"}),(0,t.jsx)("button",{type:"button",onClick:()=>F(e.id,r.directive_id,"reject"),children:"Reject"})]}):(0,t.jsx)("span",{children:r.status.toUpperCase()})})]},r.directive_id))})]})]},e.id)),m&&!P&&(0,t.jsxs)("div",{className:"platform-message assistant thinking-message",children:[(0,t.jsx)("div",{className:"message-avatar",children:"S"}),(0,t.jsxs)("div",{className:"message-body",children:[(0,t.jsxs)("div",{className:"message-meta",children:[(0,t.jsx)("span",{children:"Siduri"}),(0,t.jsx)("span",{className:"thinking-label",children:"thinking"})]}),(0,t.jsxs)("div",{className:"thinking-dots",children:[(0,t.jsx)("i",{}),(0,t.jsx)("i",{}),(0,t.jsx)("i",{})]})]})]})]}),(0,t.jsxs)("form",{className:"platform-composer",onSubmit:k,children:[(0,t.jsx)("textarea",{value:l,onChange:e=>c(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),e.currentTarget.form?.requestSubmit())},placeholder:"Message Siduri…",rows:1,maxLength:4e3,"aria-label":"Message Siduri"}),(0,t.jsxs)("div",{className:"composer-bottom",children:[(0,t.jsxs)("span",{children:["Private local session ·"," ",I?`${I} evidence link${1===I?"":"s"}`:"No evidence attached"]}),m&&!l.trim()?(0,t.jsx)("button",{type:"button",onClick:function(){N.current&&(N.current.abort("user_stop"),N.current=null),(0,f.interruptChat)("default","user_stop"),h(!1),u("online")},"aria-label":"Stop generation",title:"Stop generation",children:"■"}):(0,t.jsx)("button",{type:"submit",disabled:!l.trim(),"aria-label":"Send message",children:"↑"})]})]})]})}),(0,t.jsx)("p",{className:"chat-disclaimer",children:"Siduri can be uncertain. Verify important details against the evidence."})]})]})}],12650)},94108,e=>{"use strict";var t=e.i(28152);let r=t.default.env.NEXT_PUBLIC_API_URL??"";async function a(e,t){return fetch(`${r}${e}`,t)}async function i(e,t){let r=await a(e,t);if(!r.ok)throw Error(`${e} returned ${r.status}`);return r.json()}async function s(e,t){let r=await a(e,{method:"POST",headers:t?{"Content-Type":"application/json"}:void 0,body:t?"string"==typeof t?t:JSON.stringify(t):void 0});if(!r.ok)throw Error(await r.text().catch(()=>r.statusText));return r.json().catch(()=>({}))}async function n(e,t){let r=await a(e,{method:"POST",headers:t?{"Content-Type":"application/json"}:void 0,body:t?"string"==typeof t?t:JSON.stringify(t):void 0});if(!r.ok)throw Error(await r.text().catch(()=>r.statusText))}async function o(e,t,r,i){let s=await a(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t),signal:i});if(!s.ok)throw Error(await s.text().catch(()=>s.statusText)||`HTTP ${s.status}`);if(!s.body)throw Error("ReadableStream not supported in response");let n=s.body.getReader(),o=new TextDecoder,l="";try{for(;;){let{done:e,value:t}=await n.read();if(e)break;let a=(l+=o.decode(t,{stream:!0})).split("\n");l=a.pop()||"";let i="message";for(let e of a){let t=e.trim();if(t){if(t.startsWith("event:"))i=t.slice(6).trim();else if(t.startsWith("data:")){let e=t.slice(5).trim();try{let t=JSON.parse(e);switch(i){case"staged":r.onStaged?.(t);break;case"chunk":r.onChunk?.(t);break;case"avatar":r.onAvatar?.(t);break;case"done":r.onDone?.(t);break;case"interrupted":r.onInterrupted?.(t);break;case"error":r.onError?.(Error(t.error||"Stream error"))}}catch{}}}}}}catch(e){if(i?.aborted)r.onInterrupted?.({reason:i.reason});else throw r.onError?.(e),e}finally{n.releaseLock()}}async function l(e="default",t="user_barge_in"){await s("/chat/interrupt",{companionId:e,reason:t}).catch(()=>{})}t.default.env.NEXT_PUBLIC_WS_URL||(window.location.protocol,window.location.host),e.s(["fetchApi",0,a,"getJson",0,i,"interruptChat",0,l,"postAction",0,n,"postJson",0,s,"postStream",0,o])},51523,e=>{"use strict";let t=new Set(["siduri","self","companion"]),r=new Set(["user","actor","owner","primary_user"]);function a(e){return e.replace(/[._]+/g," ").replace(/\s+/g," ").trim()}function i(e){let t=e.trim();return t&&!/[.!?]$/.test(t)?`${t}.`:t}function s(e){let s=e.subject?.trim()??"",n=s.toLowerCase(),o=e.predicate?.trim()??"",l=o.toLowerCase(),c=e.value?.trim()??"";if(!s||!o||!c)return i(e.content??c);if(t.has(n))return"name"===l?i(`Companion name is ${c}`):i(`Companion ${a(o)} is ${c}`);if(r.has(n))return"name"===l?i(`User name is ${c}`):"preferred_address"===l?i(`User preferred address is ${c}`):"relationship_to_siduri"===l||"relationship"===l?i(`User relationship configured as ${c}`):i(`User ${a(o)} is ${c}`);if(n.startsWith("primary_user.")||n.startsWith("user.")){let e=n.startsWith("primary_user.")?"primary_user.":"user.",t=a(s.slice(e.length)),r="uid"===l||"id"===l?"ID":a(o);return i(`User ${t} ${r} is ${c}`)}let d=a(s);return i(`${/s$/i.test(d)?`${d}'`:`${d}'s`} ${a(o)} is ${c}`)}e.s(["formatClaimReceipt",0,s,"formatRuntimeEffect",0,function(e){let n=e.subject?.trim().toLowerCase()??"",o=e.predicate?.trim().toLowerCase()??"",l=e.value?.trim()??"",c=e.behavior?.instruction?.trim()??"";return"behavioral"===e.memory_class&&c?i(c):t.has(n)&&"name"===o?i(`Set companion identity/name to ${l}`):t.has(n)?i(`Set companion ${a(o)} to ${l}`):r.has(n)&&("relationship_to_siduri"===o||"relationship"===o)?i(`Set user relationship to ${l}`):r.has(n)&&"name"===o?i(`Set user name to ${l}`):s(e)}])}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,61842,(e,t,r)=>{"use strict";e.i(28152),Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return m},useLinkStatus:function(){return v}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let u=e.r(56421),a=e.r(30696),i=u._(e.r(64249)),l=e.r(45183),c=e.r(84805),s=e.r(17002),f=e.r(33962),p=e.r(10497),d=e.r(59874),h=e.r(90114),y=e.r(41238),g=e.r(95810);function m(t){var r;let n,o,u,[m,v]=(0,i.useOptimistic)(h.IDLE_LINK_STATUS),P=(0,i.useRef)(null),{href:E,as:_,children:O,prefetch:S=null,passHref:j,replace:T,shallow:C,scroll:R,onClick:N,onMouseEnter:L,onTouchStart:x,legacyBehavior:A=!1,onNavigate:w,transitionTypes:U,ref:M,unstable_dynamicOnHover:$,...I}=t;n=O,A&&("string"==typeof n||"number"==typeof n)&&(n=(0,a.jsx)("a",{children:n}));let k=i.default.useContext(c.AppRouterContext),B=!1!==S,F=!1===S?"none":!0===S?"full":"auto",D="none"!==F?"auto"===F?g.FetchStrategy.PPR:g.FetchStrategy.Full:g.FetchStrategy.PPR,K="string"==typeof(r=_||E)?r:(0,l.formatUrl)(r);if(A){if(n?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});o=i.default.Children.only(n)}let z=A?o&&"object"==typeof o&&o.ref:M,Q,W=i.default.useCallback(e=>(null!==k&&(P.current=(0,h.mountLinkInstance)(e,K,k,D,B,v,Q)),()=>{P.current&&((0,h.unmountLinkForCurrentNavigation)(P.current),P.current=null),(0,h.unmountPrefetchableInstance)(e)}),[B,K,k,D,v,Q]),X={ref:(0,s.useMergedRef)(W,z),onClick(t){A||"function"!=typeof N||N(t),A&&o.props&&"function"==typeof o.props.onClick&&o.props.onClick(t),!k||t.defaultPrevented||function(t,r,n,o,u,a,l,c="none"){if("u">typeof window){let s,{nodeName:f}=t.currentTarget;if("A"===f.toUpperCase()&&((s=t.currentTarget.getAttribute("target"))&&"_self"!==s||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,y.isLocalURL)(r)){o&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),a){let e=!1;if(a({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:p}=e.r(66586);i.default.startTransition(()=>{p(r,o?"replace":"push",!1===u?d.ScrollBehavior.NoScroll:d.ScrollBehavior.Default,n.current,l,c)})}}(t,K,P,T,R,w,U,F)},onMouseEnter(e){A||"function"!=typeof L||L(e),A&&o.props&&"function"==typeof o.props.onMouseEnter&&o.props.onMouseEnter(e),k&&B&&(0,h.onNavigationIntent)(e.currentTarget,!0===$)},onTouchStart:function(e){A||"function"!=typeof x||x(e),A&&o.props&&"function"==typeof o.props.onTouchStart&&o.props.onTouchStart(e),k&&B&&(0,h.onNavigationIntent)(e.currentTarget,!0===$)}};return(0,f.isAbsoluteUrl)(K)?X.href=K:A&&!j&&("a"!==o.type||"href"in o.props)||(X.href=(0,p.addBasePath)(K)),u=A?i.default.cloneElement(o,X):(0,a.jsx)("a",{...I,...X,children:n}),(0,a.jsx)(b.Provider,{value:m,children:u})}let b=(0,i.createContext)(h.IDLE_LINK_STATUS),v=()=>(0,i.useContext)(b);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},17002,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return o}});let n=e.r(64249);function o(e,t){let r=(0,n.useRef)(null),o=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=o.current;t&&(o.current=null,t())}else e&&(r.current=u(e,n)),t&&(o.current=u(t,n))},[e,t])}function u(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},33962,(e,t,r)=>{"use strict";e.i(28152),Object.defineProperty(r,"__esModule",{value:!0});var n={DecodeError:function(){return m},MiddlewareNotFoundError:function(){return E},MissingStaticPage:function(){return P},NormalizeError:function(){return b},PageNotFoundError:function(){return v},SP:function(){return y},ST:function(){return g},WEB_VITALS:function(){return u},execOnce:function(){return a},getDisplayName:function(){return f},getLocationOrigin:function(){return c},getURL:function(){return s},isAbsoluteUrl:function(){return l},isResSent:function(){return p},loadGetInitialProps:function(){return h},normalizeRepeatedSlashes:function(){return d},stringifyError:function(){return _}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let u=["CLS","FCP","FID","INP","LCP","TTFB"];function a(e){let t,r=!1;return(...n)=>(r||(r=!0,t=e(...n)),t)}let i=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,l=e=>{let t=e.charCodeAt(0);return!!(t>=65&&t<=90||t>=97&&t<=122)&&i.test(e)};function c(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function s(){let{href:e}=window.location,t=c();return e.substring(t.length)}function f(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function p(e){return e.finished||e.headersSent}function d(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function h(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await h(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&p(r))return n;if(!n)throw Object.defineProperty(Error(`"${f(e)}.getInitialProps()" should resolve to an object. But found "${n}" instead.`),"__NEXT_ERROR_CODE",{value:"E1025",enumerable:!1,configurable:!0});return n}let y="u">typeof performance,g=y&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class m extends Error{}class b extends Error{}class v extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class P extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class E extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function _(e){return JSON.stringify({message:e.message,stack:e.stack})}},41238,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return u}});let n=e.r(33962),o=e.r(6204);function u(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,o.hasBasePath)(r.pathname)}catch(e){return!1}}},35181,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={assign:function(){return l},searchParamsToUrlQuery:function(){return u},urlQueryToSearchParams:function(){return i}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});function u(e){let t={};for(let[r,n]of e.entries()){let e=t[r];void 0===e?t[r]=n:Array.isArray(e)?e.push(n):t[r]=[e,n]}return t}function a(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function i(e){let t=new URLSearchParams;for(let[r,n]of Object.entries(e))if(Array.isArray(n))for(let e of n)t.append(r,a(e));else t.set(r,a(n));return t}function l(e,...t){for(let r of t){for(let t of r.keys())e.delete(t);for(let[t,n]of r.entries())e.append(t,n)}return e}},45183,(e,t,r)=>{"use strict";e.i(28152),Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return i},formatWithValidation:function(){return c},urlObjectKeys:function(){return l}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let u=e.r(56421)._(e.r(35181)),a=/https?|ftp|gopher|file/;function i(e){let{auth:t,hostname:r}=e,n=e.protocol||"",o=e.pathname||"",i=e.hash||"",l=e.query||"",c=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?c=t+e.host:r&&(c=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(c+=":"+e.port)),l&&"object"==typeof l&&(l=String(u.urlQueryToSearchParams(l)));let s=e.search||l&&`?${l}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||a.test(n))&&!1!==c?(c="//"+(c||""),o&&"/"!==o[0]&&(o="/"+o)):c||(c=""),i&&"#"!==i[0]&&(i="#"+i),s&&"?"!==s[0]&&(s="?"+s),o=o.replace(/[?#]/g,encodeURIComponent),s=s.replace("#","%23"),`${n}${c}${o}${s}${i}`}let l=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function c(e){return i(e)}}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,36437,(e,t,r)=>{"use strict";r._=function(e){return e&&e.__esModule?e:{default:e}}},3650,(e,t,r)=>{"use strict";e.i(28152),Object.defineProperty(r,"__esModule",{value:!0});var n={ErrorBoundary:function(){return y},ErrorBoundaryHandler:function(){return _}};for(var u in n)Object.defineProperty(r,u,{enumerable:!0,get:n[u]});let o=e.r(56421),a=e.r(30696),i=o._(e.r(64249)),l=e.r(98695),s=e.r(89400);e.r(5520);let c=e.r(5983),f=e.r(82908),d=e.r(84805),p="u">typeof window&&(0,f.isBot)(window.navigator.userAgent);class _ extends i.default.Component{static{this.contextType=d.AppRouterContext}constructor(e){super(e),this.reset=()=>{this.setState({error:null})},this.retry=()=>{(0,i.startTransition)(()=>{this.context?.refresh(),this.reset()})},this.state={error:null,previousPathname:this.props.pathname}}static getDerivedStateFromError(e){if((0,s.isNextRouterError)(e))throw e;return{error:{thrownValue:e}}}static getDerivedStateFromProps(e,t){let{error:r}=t;return e.pathname!==t.previousPathname&&t.error?{error:null,previousPathname:e.pathname}:{error:t.error,previousPathname:e.pathname}}render(){if(this.state.error&&!p){let e=this.state.error.thrownValue;return(0,c.handleISRError)({error:e}),(0,a.jsxs)(a.Fragment,{children:[this.props.errorStyles,this.props.errorScripts,(0,a.jsx)(this.props.errorComponent,{error:e,reset:this.reset,retry:this.retry})]})}return this.props.children}}function y({errorComponent:e,errorStyles:t,errorScripts:r,children:n}){let u=(0,l.useUntrackedPathname)();return e?(0,a.jsx)(_,{pathname:u,errorComponent:e,errorStyles:t,errorScripts:r,children:n}):(0,a.jsx)(a.Fragment,{children:n})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},5983,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"handleISRError",{enumerable:!0,get:function(){return u}});let n=e.r(45647);function u({error:e}){if(n.workAsyncStorage){let t=n.workAsyncStorage.getStore();if(t?.isStaticGeneration)throw e&&console.error(e),e}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},35809,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={HTTPAccessErrorStatus:function(){return o},HTTP_ERROR_FALLBACK_ERROR_CODE:function(){return i},getAccessFallbackErrorTypeByStatus:function(){return c},getAccessFallbackHTTPStatus:function(){return s},isHTTPAccessFallbackError:function(){return l}};for(var u in n)Object.defineProperty(r,u,{enumerable:!0,get:n[u]});let o={NOT_FOUND:404,FORBIDDEN:403,UNAUTHORIZED:401},a=new Set(Object.values(o)),i="NEXT_HTTP_ERROR_FALLBACK";function l(e){if("object"!=typeof e||null===e||!("digest"in e)||"string"!=typeof e.digest)return!1;let[t,r]=e.digest.split(";");return t===i&&a.has(Number(r))}function s(e){return Number(e.digest.split(";")[1])}function c(e){switch(e){case 401:return"unauthorized";case 403:return"forbidden";case 404:return"not-found";default:return}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},89400,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isNextRouterError",{enumerable:!0,get:function(){return o}});let n=e.r(35809),u=e.r(68486);function o(e){return(0,u.isRedirectError)(e)||(0,n.isHTTPAccessFallbackError)(e)}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},5520,(e,t,r)=>{"use strict";e.i(28152),Object.defineProperty(r,"__esModule",{value:!0});var n={handleHardNavError:function(){return a},useNavFailureHandler:function(){return i}};for(var u in n)Object.defineProperty(r,u,{enumerable:!0,get:n[u]});e.r(64249);let o=e.r(98331);function a(e){return"u">typeof window&&!!window.next.__pendingUrl&&(0,o.createHrefFromUrl)(new URL(window.location.href))!==(0,o.createHrefFromUrl)(window.next.__pendingUrl)&&(console.error("Error occurred during navigation, falling back to hard navigation",e),window.location.href=window.next.__pendingUrl.toString(),!0)}function i(){}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},34124,(e,t,r)=>{"use strict";let n,u;Object.defineProperty(r,"__esModule",{value:!0});var o={useDynamicRouteParams:function(){return n},useDynamicSearchParams:function(){return u}};for(var a in o)Object.defineProperty(r,a,{enumerable:!0,get:o[a]});("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},64676,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={ServerInsertedHTMLContext:function(){return a},useServerInsertedHTML:function(){return i}};for(var u in n)Object.defineProperty(r,u,{enumerable:!0,get:n[u]});let o=e.r(56421)._(e.r(64249)),a=o.default.createContext(null);function i(e){let t=(0,o.useContext)(a);t&&t(e)}},98695,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useUntrackedPathname",{enumerable:!0,get:function(){return a}});let n=e.r(64249),u=e.r(15173),o=e.r(45647);function a(){return!function(){if("u"<typeof window){let e=o.workUnitAsyncStorage.getStore();if(!e)return!1;switch(e.type){case"prerender":case"prerender-client":case"prerender-ppr":case"validation-client":let t=e.fallbackRouteParams;return!!t&&t.size>0}}return!1}()?(0,n.useContext)(u.PathnameContext):null}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},53022,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"notFound",{enumerable:!0,get:function(){return o}});let n=e.r(35809),u=`${n.HTTP_ERROR_FALLBACK_ERROR_CODE};404`;function o(){let e=Object.defineProperty(Error(u),"__NEXT_ERROR_CODE",{value:"E1041",enumerable:!1,configurable:!0});throw e.digest=u,e}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},17049,(e,t,r)=>{"use strict";function n(){throw Object.defineProperty(Error("`forbidden()` is experimental and only allowed to be enabled when `experimental.authInterrupts` is enabled."),"__NEXT_ERROR_CODE",{value:"E488",enumerable:!1,configurable:!0})}e.i(28152),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"forbidden",{enumerable:!0,get:function(){return n}}),e.r(35809).HTTP_ERROR_FALLBACK_ERROR_CODE,("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},10179,(e,t,r)=>{"use strict";function n(){throw Object.defineProperty(Error("`unauthorized()` is experimental and only allowed to be used when `experimental.authInterrupts` is enabled."),"__NEXT_ERROR_CODE",{value:"E411",enumerable:!1,configurable:!0})}e.i(28152),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"unauthorized",{enumerable:!0,get:function(){return n}}),e.r(35809).HTTP_ERROR_FALLBACK_ERROR_CODE,("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},88157,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"ReadonlyURLSearchParams",{enumerable:!0,get:function(){return u}});class n extends Error{constructor(){super("Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams"),Object.defineProperty(this,"__NEXT_ERROR_CODE",{value:"E1174",enumerable:!1,configurable:!0})}}class u extends URLSearchParams{append(){throw new n}delete(){throw new n}set(){throw new n}sort(){throw new n}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},81789,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={RedirectBoundary:function(){return p},RedirectErrorBoundary:function(){return d}};for(var u in n)Object.defineProperty(r,u,{enumerable:!0,get:n[u]});let o=e.r(56421),a=e.r(30696),i=o._(e.r(64249)),l=e.r(48186),s=e.r(9244),c=e.r(68486);function f({redirect:e,reset:t,redirectType:r}){let n=(0,l.useRouter)();return(0,i.useEffect)(()=>{i.default.startTransition(()=>{"push"===r?n.push(e,{}):n.replace(e,{}),t()})},[e,r,t,n]),null}class d extends i.default.Component{constructor(e){super(e),this.state={redirect:null,redirectType:null}}static getDerivedStateFromError(e){if((0,c.isRedirectError)(e)){let t=(0,s.getURLFromRedirectError)(e),r=(0,s.getRedirectTypeFromError)(e);return"handled"in e?{redirect:null,redirectType:null}:{redirect:t,redirectType:r}}throw e}render(){let{redirect:e,redirectType:t}=this.state;return null!==e&&null!==t?(0,a.jsx)(f,{redirect:e,redirectType:t,reset:()=>this.setState({redirect:null})}):this.props.children}}function p({children:e}){let t=(0,l.useRouter)();return(0,a.jsx)(d,{router:t,children:e})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},26689,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"createRouterCacheKey",{enumerable:!0,get:function(){return u}});let n=e.r(88527);function u(e,t=!1){return Array.isArray(e)?`${e[0]}|${e[1]}|${e[2]}`:t&&e.startsWith(n.PAGE_SEGMENT_KEY)?n.PAGE_SEGMENT_KEY:e}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},45647,(e,t,r)=>{"use strict";let n,u,o;Object.defineProperty(r,"__esModule",{value:!0});var a={actionAsyncStorage:function(){return n},workAsyncStorage:function(){return u},workUnitAsyncStorage:function(){return o}};for(var i in a)Object.defineProperty(r,i,{enumerable:!0,get:a[i]});("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},44489,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"unresolvedThenable",{enumerable:!0,get:function(){return n}});let n={then:()=>{}};("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},71167,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"unstable_rethrow",{enumerable:!0,get:function(){return function e(t){if((0,u.isNextRouterError)(t)||(0,n.isBailoutToCSRError)(t))throw t;t instanceof Error&&"cause"in t&&e(t.cause)}}});let n=e.r(34363),u=e.r(89400);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},38901,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={ReadonlyURLSearchParams:function(){return o.ReadonlyURLSearchParams},RedirectType:function(){return d},forbidden:function(){return l.forbidden},notFound:function(){return i.notFound},permanentRedirect:function(){return a.permanentRedirect},redirect:function(){return a.redirect},unauthorized:function(){return s.unauthorized},unstable_isUnrecognizedActionError:function(){return f},unstable_rethrow:function(){return c.unstable_rethrow}};for(var u in n)Object.defineProperty(r,u,{enumerable:!0,get:n[u]});let o=e.r(88157),a=e.r(9244),i=e.r(53022),l=e.r(17049),s=e.r(10179),c=e.r(71167);function f(){throw Object.defineProperty(Error("`unstable_isUnrecognizedActionError` can only be used on the client."),"__NEXT_ERROR_CODE",{value:"E776",enumerable:!1,configurable:!0})}let d={push:"push",replace:"replace"};("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},48186,(e,t,r)=>{"use strict";e.i(28152),Object.defineProperty(r,"__esModule",{value:!0});var n={ReadonlyURLSearchParams:function(){return i.ReadonlyURLSearchParams},RedirectType:function(){return d.RedirectType},ServerInsertedHTMLContext:function(){return c.ServerInsertedHTMLContext},forbidden:function(){return d.forbidden},notFound:function(){return d.notFound},permanentRedirect:function(){return d.permanentRedirect},redirect:function(){return d.redirect},unauthorized:function(){return d.unauthorized},unstable_isUnrecognizedActionError:function(){return f.unstable_isUnrecognizedActionError},unstable_rethrow:function(){return d.unstable_rethrow},useParams:function(){return v},usePathname:function(){return h},useRouter:function(){return m},useSearchParams:function(){return b},useSelectedLayoutSegment:function(){return R},useSelectedLayoutSegments:function(){return O},useServerInsertedHTML:function(){return c.useServerInsertedHTML}};for(var u in n)Object.defineProperty(r,u,{enumerable:!0,get:n[u]});let o=e.r(56421)._(e.r(64249)),a=e.r(84805),i=e.r(15173),l=e.r(88527),s=e.r(34124),c=e.r(64676),f=e.r(69520),d=e.r(38901),{instrumentParamsForClientValidation:p,instrumentSearchParamsForClientValidation:_,expectCompleteParamsInClientValidation:y}={};function b(){s.useDynamicSearchParams?.("useSearchParams()");let e=(0,o.useContext)(i.SearchParamsContext);return(0,o.useMemo)(()=>e?new i.ReadonlyURLSearchParams(e):null,[e])}function h(){return s.useDynamicRouteParams?.("usePathname()"),(0,o.useContext)(i.PathnameContext)}function m(){let e=(0,o.useContext)(a.AppRouterContext);if(null===e)throw Object.defineProperty(Error("invariant expected app router to be mounted"),"__NEXT_ERROR_CODE",{value:"E238",enumerable:!1,configurable:!0});let t=(0,o.useContext)(a.LayoutRouterContext),r=t?.parentCacheNode.bfcacheId??0;return(0,o.useMemo)(()=>({back:e.back,forward:e.forward,refresh:e.refresh,hmrRefresh:e.hmrRefresh,push:e.push,replace:e.replace,prefetch:e.prefetch,experimental_gesturePush:e.experimental_gesturePush,bfcacheId:"_b_"+r+"_"}),[e,r])}function v(){return s.useDynamicRouteParams?.("useParams()"),(0,o.useContext)(i.PathParamsContext)}function O(e="children"){s.useDynamicRouteParams?.("useSelectedLayoutSegments()");let t=(0,o.useContext)(a.LayoutRouterContext);return t?(0,l.getSelectedLayoutSegmentPath)(t.parentTree,e):null}function R(e="children"){s.useDynamicRouteParams?.("useSelectedLayoutSegment()"),(0,o.useContext)(i.NavigationPromisesContext);let t=O(e);return(0,l.computeSelectedLayoutSegment)(t,e)}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},8178,(e,t,r)=>{var n={156:function(e){var t,r,n,u=e.exports={};function o(){throw Error("setTimeout has not been defined")}function a(){throw Error("clearTimeout has not been defined")}try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}function i(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}var l=[],s=!1,c=-1;function f(){s&&n&&(s=!1,n.length?l=n.concat(l):c=-1,l.length&&d())}function d(){if(!s){var e=i(f);s=!0;for(var t=l.length;t;){for(n=l,l=[];++c<t;)n&&n[c].run();c=-1,t=l.length}n=null,s=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function _(){}u.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];l.push(new p(e,t)),1!==l.length||s||i(d)},p.prototype.run=function(){this.fun.apply(null,this.array)},u.title="browser",u.browser=!0,u.env={},u.argv=[],u.version="",u.versions={},u.on=_,u.addListener=_,u.once=_,u.off=_,u.removeListener=_,u.removeAllListeners=_,u.emit=_,u.prependListener=_,u.prependOnceListener=_,u.listeners=function(e){return[]},u.binding=function(e){throw Error("process.binding is not supported")},u.cwd=function(){return"/"},u.chdir=function(e){throw Error("process.chdir is not supported")},u.umask=function(){return 0}}},u={};function o(e){var t=u[e];if(void 0!==t)return t.exports;var r=u[e]={exports:{}},a=!0;try{n[e](r,r.exports,o),a=!1}finally{a&&delete u[e]}return r.exports}o.ab="/ROOT/node_modules/.pnpm/next@16.3.5_@babel+core@7.29.7_@types+node@22.20.2_react-dom@19.3.0_react@19.3.0__react@19.3.0/node_modules/next/dist/compiled/process/",t.exports=o(156)},28152,(e,t,r)=>{"use strict";var n,u;t.exports=(null==(n=e.g.process)?void 0:n.env)&&"object"==typeof(null==(u=e.g.process)?void 0:u.env)?e.g.process:e.r(8178)},65570,(e,t,r)=>{"use strict";var n=Symbol.for("react.transitional.element");function u(e,t,r){var u=null;if(void 0!==r&&(u=""+r),void 0!==t.key&&(u=""+t.key),"key"in t)for(var o in r={},t)"key"!==o&&(r[o]=t[o]);else r=t;return{$$typeof:n,type:e,key:u,ref:void 0!==(t=r.ref)?t:null,props:r}}r.Fragment=Symbol.for("react.fragment"),r.jsx=u,r.jsxs=u},30696,(e,t,r)=>{"use strict";e.i(28152),t.exports=e.r(65570)},51708,(e,t,r)=>{"use strict";var n=e.i(28152),u=Symbol.for("react.transitional.element"),o=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),b=Symbol.for("react.view_transition"),h=Symbol.iterator,m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v=Object.assign,O={};function R(e,t,r){this.props=e,this.context=t,this.refs=O,this.updater=r||m}function E(){}function g(e,t,r){this.props=e,this.context=t,this.refs=O,this.updater=r||m}R.prototype.isReactComponent={},R.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},R.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},E.prototype=R.prototype;var j=g.prototype=new E;j.constructor=g,v(j,R.prototype),j.isPureReactComponent=!0;var P=Array.isArray;function T(){}var S={H:null,A:null,T:null,S:null},x=Object.prototype.hasOwnProperty;function w(e,t,r){var n=r.ref;return{$$typeof:u,type:e,key:t,ref:void 0!==n?n:null,props:r}}function M(e){return"object"==typeof e&&null!==e&&e.$$typeof===u}var A=/\/+/g;function C(e,t){var r,n;return"object"==typeof e&&null!==e&&null!=e.key?(r=""+e.key,n={"=":"=0",":":"=2"},"$"+r.replace(/[=:]/g,function(e){return n[e]})):t.toString(36)}function N(e,t,r){if(null==e)return e;var n=[],a=0;return!function e(t,r,n,a,i){var l,s,c,f=typeof t;("undefined"===f||"boolean"===f)&&(t=null);var d=!1;if(null===t)d=!0;else switch(f){case"bigint":case"string":case"number":d=!0;break;case"object":switch(t.$$typeof){case u:case o:d=!0;break;case _:return e((d=t._init)(t._payload),r,n,a,i)}}if(d)return i=i(t),d=""===a?"."+C(t,0):a,P(i)?(n="",null!=d&&(n=d.replace(A,"$&/")+"/"),e(i,r,n,"",function(e){return e})):null!=i&&(M(i)&&(l=i,s=n+(null==i.key||t&&t.key===i.key?"":(""+i.key).replace(A,"$&/")+"/")+d,i=w(l.type,s,l.props)),r.push(i)),1;d=0;var p=""===a?".":a+":";if(P(t))for(var y=0;y<t.length;y++)f=p+C(a=t[y],y),d+=e(a,r,n,f,i);else if("function"==typeof(y=null===(c=t)||"object"!=typeof c?null:"function"==typeof(c=h&&c[h]||c["@@iterator"])?c:null))for(t=y.call(t),y=0;!(a=t.next()).done;)f=p+C(a=a.value,y++),d+=e(a,r,n,f,i);else if("object"===f){if("function"==typeof t.then)return e(function(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch("string"==typeof e.status?e.then(T,T):(e.status="pending",e.then(function(t){"pending"===e.status&&(e.status="fulfilled",e.value=t)},function(t){"pending"===e.status&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}(t),r,n,a,i);throw Error("Objects are not valid as a React child (found: "+("[object Object]"===(r=String(t))?"object with keys {"+Object.keys(t).join(", ")+"}":r)+"). If you meant to render a collection of children, use an array instead.")}return d}(e,n,"","",function(e){return t.call(r,e,a++)}),n}function U(e){if(-1===e._status){var t=(0,e._result)();t.then(function(r){(0===e._status||-1===e._status)&&(e._status=1,e._result=r,void 0===t.status&&(t.status="fulfilled",t.value=r))},function(r){(0===e._status||-1===e._status)&&(e._status=2,e._result=r,void 0===t.status&&(t.status="rejected",t.reason=r))}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var L="function"==typeof reportError?reportError:function(e){if("object"==typeof window&&"function"==typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"==typeof e&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"==typeof n.default&&"function"==typeof n.default.emit)return void n.default.emit("uncaughtException",e);console.error(e)};function D(e){var t=S.T,r={};r.types=null!==t?t.types:null,S.T=r;try{var n=e(),u=S.S;null!==u&&u(r,n),"object"==typeof n&&null!==n&&"function"==typeof n.then&&n.then(T,L)}catch(e){L(e)}finally{null!==t&&null!==r.types&&(t.types=r.types),S.T=t}}function H(e){var t=S.T;if(null!==t){var r=t.types;null===r?t.types=[e]:-1===r.indexOf(e)&&r.push(e)}else D(H.bind(null,e))}r.Activity=y,r.Children={map:N,forEach:function(e,t,r){N(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return N(e,function(){t++}),t},toArray:function(e){return N(e,function(e){return e})||[]},only:function(e){if(!M(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},r.Component=R,r.Fragment=a,r.Profiler=l,r.PureComponent=g,r.StrictMode=i,r.Suspense=d,r.ViewTransition=b,r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=S,r.__COMPILER_RUNTIME={__proto__:null,c:function(e){return S.H.useMemoCache(e)}},r.addTransitionType=H,r.cache=function(e){return function(){return e.apply(null,arguments)}},r.cacheSignal=function(){return null},r.cloneElement=function(e,t,r){if(null==e)throw Error("The argument must be a React element, but you passed "+e+".");var n=v({},e.props),u=e.key;if(null!=t)for(o in void 0!==t.key&&(u=""+t.key),t)x.call(t,o)&&"key"!==o&&"__self"!==o&&"__source"!==o&&("ref"!==o||void 0!==t.ref)&&(n[o]=t[o]);var o=arguments.length-2;if(1===o)n.children=r;else if(1<o){for(var a=Array(o),i=0;i<o;i++)a[i]=arguments[i+2];n.children=a}return w(e.type,u,n)},r.createContext=function(e){return(e={$$typeof:c,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider=e,e.Consumer={$$typeof:s,_context:e},e},r.createElement=function(e,t,r){var n,u={},o=null;if(null!=t)for(n in void 0!==t.key&&(o=""+t.key),t)x.call(t,n)&&"key"!==n&&"__self"!==n&&"__source"!==n&&(u[n]=t[n]);var a=arguments.length-2;if(1===a)u.children=r;else if(1<a){for(var i=Array(a),l=0;l<a;l++)i[l]=arguments[l+2];u.children=i}if(e&&e.defaultProps)for(n in a=e.defaultProps)void 0===u[n]&&(u[n]=a[n]);return w(e,o,u)},r.createRef=function(){return{current:null}},r.forwardRef=function(e){return{$$typeof:f,render:e}},r.isValidElement=M,r.lazy=function(e){return{$$typeof:_,_payload:{_status:-1,_result:e},_init:U}},r.memo=function(e,t){return{$$typeof:p,type:e,compare:void 0===t?null:t}},r.startTransition=D,r.unstable_useCacheRefresh=function(){return S.H.useCacheRefresh()},r.use=function(e){return S.H.use(e)},r.useActionState=function(e,t,r){return S.H.useActionState(e,t,r)},r.useCallback=function(e,t){return S.H.useCallback(e,t)},r.useContext=function(e){return S.H.useContext(e)},r.useDebugValue=function(){},r.useDeferredValue=function(e,t){return S.H.useDeferredValue(e,t)},r.useEffect=function(e,t){return S.H.useEffect(e,t)},r.useEffectEvent=function(e){return S.H.useEffectEvent(e)},r.useId=function(){return S.H.useId()},r.useImperativeHandle=function(e,t,r){return S.H.useImperativeHandle(e,t,r)},r.useInsertionEffect=function(e,t){return S.H.useInsertionEffect(e,t)},r.useLayoutEffect=function(e,t){return S.H.useLayoutEffect(e,t)},r.useMemo=function(e,t){return S.H.useMemo(e,t)},r.useOptimistic=function(e,t){return S.H.useOptimistic(e,t)},r.useReducer=function(e,t,r){return S.H.useReducer(e,t,r)},r.useRef=function(e){return S.H.useRef(e)},r.useState=function(e){return S.H.useState(e)},r.useSyncExternalStore=function(e,t,r){return S.H.useSyncExternalStore(e,t,r)},r.useTransition=function(){return S.H.useTransition()},r.version="19.3.0-canary-cbb046ab-20260731"},64249,(e,t,r)=>{"use strict";e.i(28152),t.exports=e.r(51708)},24368,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={METADATA_BOUNDARY_NAME:function(){return o},OUTLET_BOUNDARY_NAME:function(){return i},ROOT_LAYOUT_BOUNDARY_NAME:function(){return l},VIEWPORT_BOUNDARY_NAME:function(){return a}};for(var u in n)Object.defineProperty(r,u,{enumerable:!0,get:n[u]});let o="__next_metadata_boundary__",a="__next_viewport_boundary__",i="__next_outlet_boundary__",l="__next_root_layout_boundary__"},34860,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={MetadataBoundary:function(){return i},OutletBoundary:function(){return s},RootLayoutBoundary:function(){return c},ViewportBoundary:function(){return l}};for(var u in n)Object.defineProperty(r,u,{enumerable:!0,get:n[u]});let o=e.r(24368),a={[o.METADATA_BOUNDARY_NAME]:function({children:e}){return e},[o.VIEWPORT_BOUNDARY_NAME]:function({children:e}){return e},[o.OUTLET_BOUNDARY_NAME]:function({children:e}){return e},[o.ROOT_LAYOUT_BOUNDARY_NAME]:function({children:e}){return e}},i=a[o.METADATA_BOUNDARY_NAME.slice(0)],l=a[o.VIEWPORT_BOUNDARY_NAME.slice(0)],s=a[o.OUTLET_BOUNDARY_NAME.slice(0)],c=a[o.ROOT_LAYOUT_BOUNDARY_NAME.slice(0)]},15173,(e,t,r)=>{"use strict";e.i(28152),Object.defineProperty(r,"__esModule",{value:!0});var n={NavigationPromisesContext:function(){return c},PathParamsContext:function(){return s},PathnameContext:function(){return l},ReadonlyURLSearchParams:function(){return a.ReadonlyURLSearchParams},SearchParamsContext:function(){return i},createDevToolsInstrumentedPromise:function(){return f}};for(var u in n)Object.defineProperty(r,u,{enumerable:!0,get:n[u]});let o=e.r(64249),a=e.r(88157),i=(0,o.createContext)(null),l=(0,o.createContext)(null),s=(0,o.createContext)(null),c=(0,o.createContext)(null);function f(e,t){let r=Promise.resolve(t);return r.status="fulfilled",r.value=t,r.displayName=`${e} (SSR)`,r}},34363,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={BailoutToCSRError:function(){return a},isBailoutToCSRError:function(){return i}};for(var u in n)Object.defineProperty(r,u,{enumerable:!0,get:n[u]});let o="BAILOUT_TO_CLIENT_SIDE_RENDERING";class a extends Error{constructor(e){super(`Bail out to client-side rendering: ${e}`),this.reason=e,this.digest=o}}function i(e){return"object"==typeof e&&null!==e&&"digest"in e&&e.digest===o}}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,51051,(e,t,r)=>{"use strict";e.i(28152),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useRouterBFCache",{enumerable:!0,get:function(){return l}});let n=e.r(64249);function l(e,t,r){let[l,u]=(0,n.useState)(()=>({tree:e,cacheNode:t,stateKey:r,next:null}));if(l.tree===e)return l;let a={tree:e,cacheNode:t,stateKey:r,next:null},o=1,d=l,s=a;for(;null!==d&&o<1;){if(d.stateKey===r){s.next=d.next;break}{o++;let e={tree:d.tree,cacheNode:d.cacheNode,stateKey:d.stateKey,next:null};s.next=e,s=e}d=d.next}return u(a),a}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},54966,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"ClientPageRoot",{enumerable:!0,get:function(){return s}});let n=e.r(30696),l=e.r(84805),u=e.r(64249),a=e.r(92477),o=e.r(15173),d=e.r(21857);function s({Component:e,serverProvidedParams:t}){let r,i;if(null!==t)r=t.searchParams,i=t.params;else{let e=(0,u.use)(l.LayoutRouterContext);i=null!==e?e.parentParams:{},r=(0,a.urlSearchParamsToParsedUrlQuery)((0,u.use)(o.SearchParamsContext))}let c=(0,d.createClientSearchParams)(r),f=(0,d.createClientParams)(i);return(0,n.jsx)(e,{params:f,searchParams:c})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},45820,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"ClientSegmentRoot",{enumerable:!0,get:function(){return o}});let n=e.r(30696),l=e.r(84805),u=e.r(64249),a=e.r(21857);function o({Component:e,slots:t,serverProvidedParams:r}){let d;if(null!==r)d=r.params;else{let e=(0,u.use)(l.LayoutRouterContext);d=null!==e?e.parentParams:{}}let s=(0,a.createClientParams)(d);return(0,n.jsx)(e,{...t,params:s})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},15982,(e,t,r)=>{"use strict";e.i(28152),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"HTTPAccessFallbackBoundary",{enumerable:!0,get:function(){return i}});let n=e.r(56421),l=e.r(30696),u=n._(e.r(64249)),a=e.r(98695),o=e.r(35809),d=e.r(84805);class s extends u.default.Component{constructor(e){super(e),this.state={triggeredStatus:void 0,previousPathname:e.pathname}}componentDidCatch(){}static getDerivedStateFromError(e){if((0,o.isHTTPAccessFallbackError)(e))return{triggeredStatus:(0,o.getAccessFallbackHTTPStatus)(e)};throw e}static getDerivedStateFromProps(e,t){return e.pathname!==t.previousPathname&&t.triggeredStatus?{triggeredStatus:void 0,previousPathname:e.pathname}:{triggeredStatus:t.triggeredStatus,previousPathname:e.pathname}}render(){let{notFound:e,forbidden:t,unauthorized:r,children:n}=this.props,{triggeredStatus:u}=this.state,a={[o.HTTPAccessErrorStatus.NOT_FOUND]:e,[o.HTTPAccessErrorStatus.FORBIDDEN]:t,[o.HTTPAccessErrorStatus.UNAUTHORIZED]:r};if(u){let d=u===o.HTTPAccessErrorStatus.NOT_FOUND&&e,s=u===o.HTTPAccessErrorStatus.FORBIDDEN&&t,i=u===o.HTTPAccessErrorStatus.UNAUTHORIZED&&r;return d||s||i?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("meta",{name:"robots",content:"noindex"}),!1,a[u]]}):n}return n}}function i({notFound:e,forbidden:t,unauthorized:r,children:n}){let o=(0,a.useUntrackedPathname)(),c=(0,u.useContext)(d.MissingSlotContext);return e||t||r?(0,l.jsx)(s,{pathname:o,notFound:e,forbidden:t,unauthorized:r,missingSlots:c,children:n}):(0,l.jsx)(l.Fragment,{children:n})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},72276,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={InstantValidationBoundaryContext:function(){return u},PlaceValidationBoundaryBelowThisLevel:function(){return a},RenderValidationBoundaryAtThisLevel:function(){return o},SlotMarker:function(){return d}};for(var l in n)Object.defineProperty(r,l,{enumerable:!0,get:n[l]});let u=null,a=null,o=null,d=null;("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},96404,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={InstantValidationBoundaryContext:function(){return u.InstantValidationBoundaryContext},PlaceValidationBoundaryBelowThisLevel:function(){return u.PlaceValidationBoundaryBelowThisLevel},RenderValidationBoundaryAtThisLevel:function(){return u.RenderValidationBoundaryAtThisLevel},SlotMarker:function(){return u.SlotMarker}};for(var l in n)Object.defineProperty(r,l,{enumerable:!0,get:n[l]});let u=e.r(72276);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},31790,(e,t,r)=>{"use strict";e.i(28152),Object.defineProperty(r,"__esModule",{value:!0});var n={LoadingBoundaryProvider:function(){return C},default:function(){return T}};for(var l in n)Object.defineProperty(r,l,{enumerable:!0,get:n[l]});let u=e.r(36437),a=e.r(56421),o=e.r(30696),d=a._(e.r(64249)),s=u._(e.r(33771)),i=e.r(84805),c=e.r(44489),f=e.r(3650),p=e.r(13173),y=e.r(81789),m=e.r(15982);e.r(96404);let b=e.r(26689),_=e.r(51051);e.r(29744);let h=e.r(15173),P=e.r(92477),v=e.r(15692);s.default.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function g(e,t,r){let n=e.getClientRects();if(0===n.length)return 0;let l=1/0;for(let e=0;e<n.length;e++){let t=n[e];t.top<l&&(l=t.top)}return l>=r()&&l<=t?1:2}d.default.Component;let j=function(e){let t=d.default.useRef(null);return(0,d.useLayoutEffect)(()=>{let{focusAndScrollRef:r,cacheNode:n}=e,l=r.forceScroll?r.scrollRef:n.scrollRef;if(null===l||!l.current)return;let u=null,a=r.hashFragment;if(a){var o;if(null===(u="top"===(o=a)?document.body:document.getElementById(o)??document.getElementsByName(o)[0]??null)){l.current=!1,r.onlyHashChange=!1,r.hashFragment=null;return}}else u=t.current;if(null===u)return;let d=!1;(0,p.disableSmoothScrollDuringRouteTransition)(()=>{let e=document.documentElement,t=null,r=null,n=null,o=()=>{var r,l;let u,a;return null===n&&(r=e,l=t,n=!Number.isFinite(a=Number.parseFloat(u=getComputedStyle(r).scrollPaddingTop))||a<0?0:u.endsWith("px")?a:u.endsWith("%")?a/100*l:0),n};(a||(t=e.clientHeight,0!==(r=g(u,t,o))))&&((d=!0,l.current=!1,a)?u.scrollIntoView():1!==r&&(e.scrollTop=0,2===g(u,t,o)&&u.scrollIntoView()))},{dontForceLayout:!0,onlyHashChange:r.onlyHashChange}),d&&(r.onlyHashChange=!1,r.hashFragment=null)},void 0),(0,o.jsx)(d.Fragment,{ref:t,children:e.children})};function O({children:e,cacheNode:t}){let r=(0,d.useContext)(i.GlobalLayoutRouterContext);if(!r)throw Object.defineProperty(Error("invariant global layout router not mounted"),"__NEXT_ERROR_CODE",{value:"E473",enumerable:!1,configurable:!0});return(0,o.jsx)(j,{focusAndScrollRef:r.focusAndScrollRef,cacheNode:t,children:e})}function x({tree:e,segmentPath:t,debugNameContext:r,cacheNode:n,params:l,url:u,isActive:a}){let s,f=(0,d.useContext)(i.GlobalLayoutRouterContext);if((0,d.useContext)(h.NavigationPromisesContext),!f)throw Object.defineProperty(Error("invariant global layout router not mounted"),"__NEXT_ERROR_CODE",{value:"E473",enumerable:!1,configurable:!0});let p=null!==n?n:(0,d.use)(c.unresolvedThenable),y=null!==p.prefetchRsc?p.prefetchRsc:p.rsc,m=(0,d.useDeferredValue)(p.rsc,y);if((0,v.isDeferredRsc)(m)){let e=(0,d.use)(m);null===e&&(0,d.use)(c.unresolvedThenable),s=e}else null===m&&(0,d.use)(c.unresolvedThenable),s=m;let b=s;return(0,o.jsx)(i.LayoutRouterContext.Provider,{value:{parentTree:e,parentCacheNode:p,parentSegmentPath:t,parentParams:l,parentLoadingData:null,debugNameContext:r,url:u,isActive:a},children:b})}function C({loading:e,children:t}){let r=(0,d.use)(i.LayoutRouterContext);return null===r?t:(0,o.jsx)(i.LayoutRouterContext.Provider,{value:{parentTree:r.parentTree,parentCacheNode:r.parentCacheNode,parentSegmentPath:r.parentSegmentPath,parentParams:r.parentParams,parentLoadingData:e,debugNameContext:r.debugNameContext,url:r.url,isActive:r.isActive},children:t})}function R({name:e,loading:t,children:r}){if(null!==t){let n=t[0],l=t[1],u=t[2];return(0,o.jsx)(d.Suspense,{name:e,fallback:(0,o.jsxs)(o.Fragment,{children:[l,u,n]}),children:r})}return(0,o.jsx)(o.Fragment,{children:r})}function T({parallelRouterKey:e,error:t,errorStyles:r,errorScripts:n,templateStyles:l,templateScripts:u,template:a,notFound:s,forbidden:p,unauthorized:h,segmentViewBoundaries:v}){let g=(0,d.useContext)(i.LayoutRouterContext);if(!g)throw Object.defineProperty(Error("invariant expected layout router to be mounted"),"__NEXT_ERROR_CODE",{value:"E56",enumerable:!1,configurable:!0});let{parentTree:j,parentCacheNode:C,parentSegmentPath:S,parentParams:M,parentLoadingData:E,url:N,isActive:F,debugNameContext:A}=g,B=j[0],D=null===S?[e]:S.concat([B,e]),L=j[1][e],H=C.slots;(void 0===L||null===H)&&(0,d.use)(c.unresolvedThenable);let w=L[0],k=H[e]??null,U=(0,b.createRouterCacheKey)(w,!0),V=(0,_.useRouterBFCache)(L,k,U),I=[];do{let e=V.tree,d=V.cacheNode,c=V.stateKey,b=e[0],_=M;if(Array.isArray(b)){let e=b[0],t=b[1],r=b[2],n=(0,P.getParamValueFromCacheKey)(t,r);null!==n&&(_={...M,[e]:n})}let v=function(e){if("/"===e)return"/";if("string"==typeof e)if("(__SLOT__)"===e)return;else return e+"/";return e[1]+"/"}(b),g=v??A,j=void 0===v?void 0:A,C=(0,o.jsxs)(O,{cacheNode:d,children:[(0,o.jsx)(f.ErrorBoundary,{errorComponent:t,errorStyles:r,errorScripts:n,children:(0,o.jsx)(R,{name:j,loading:E,children:(0,o.jsx)(m.HTTPAccessFallbackBoundary,{notFound:s,forbidden:p,unauthorized:h,children:(0,o.jsxs)(y.RedirectBoundary,{children:[(0,o.jsx)(x,{url:N,tree:e,params:_,cacheNode:d,segmentPath:D,debugNameContext:g,isActive:F&&c===U}),null]})})})}),null]}),T=(0,o.jsxs)(i.TemplateContext.Provider,{value:C,children:[l,u,a]},c);I.push(T),V=V.next}while(null!==V)return I}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},65729,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return o}});let n=e.r(56421),l=e.r(30696),u=n._(e.r(64249)),a=e.r(84805);function o(){let e=(0,u.useContext)(a.TemplateContext);return(0,l.jsx)(l.Fragment,{children:e})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},66692,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"createRenderParamsFromClient",{enumerable:!0,get:function(){return l}});let n=new WeakMap;function l(e){let t=n.get(e);if(t)return t;let r=Promise.resolve(e);return n.set(e,r),r}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},68125,(e,t,r)=>{"use strict";e.i(28152),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"createRenderParamsFromClient",{enumerable:!0,get:function(){return n}});let n=e.r(66692).createRenderParamsFromClient;("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},89245,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"createRenderSearchParamsFromClient",{enumerable:!0,get:function(){return l}});let n=new WeakMap;function l(e){let t=n.get(e);if(t)return t;let r=Promise.resolve(e);return n.set(e,r),r}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},70739,(e,t,r)=>{"use strict";e.i(28152),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"createRenderSearchParamsFromClient",{enumerable:!0,get:function(){return n}});let n=e.r(89245).createRenderSearchParamsFromClient;("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},21857,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={createClientParams:function(){return u.createRenderParamsFromClient},createClientSearchParams:function(){return a.createRenderSearchParamsFromClient}};for(var l in n)Object.defineProperty(r,l,{enumerable:!0,get:n[l]});let u=e.r(68125),a=e.r(70739);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},71375,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"IconMark",{enumerable:!0,get:function(){return l}});let n=e.r(30696),l=()=>"u">typeof window?null:(0,n.jsx)("meta",{name:"«nxt-icon»"})},13173,(e,t,r)=>{"use strict";function n(e,t={}){if(t.onlyHashChange)return void e();let r=document.documentElement;if("smooth"!==r.dataset.scrollBehavior)return void e();let l=r.style.scrollBehavior;r.style.scrollBehavior="auto",t.dontForceLayout||r.getClientRects(),e(),r.style.scrollBehavior=l}e.i(28152),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"disableSmoothScrollDuringRouteTransition",{enumerable:!0,get:function(){return n}})}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,80951,e=>{"use strict";var s=e.i(30696),t=e.i(64249);function a({title:e,detail:t}){return(0,s.jsxs)("div",{className:"empty-state",children:[(0,s.jsx)("span",{children:"◌"}),(0,s.jsx)("strong",{children:e}),(0,s.jsx)("p",{children:t})]})}var n=e.i(94108),i=e.i(51523);function r(e){return e.length>19?`${e.slice(0,9)}…${e.slice(-7)}`:e}function l(e){if(!e)return"—";let s=new Date(e);return Number.isNaN(s.valueOf())?e:new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}).format(s)}function o({status:e}){return(0,s.jsxs)("article",{className:"status-card",children:[(0,s.jsxs)("div",{className:"status-card-top",children:[(0,s.jsx)("span",{children:e.label}),(0,s.jsx)("i",{className:`status-dot ${e.tone??"warn"}`})]}),(0,s.jsx)("strong",{children:e.value}),(0,s.jsx)("small",{children:e.detail??"—"})]})}function c({title:e,action:t,onClick:a}){return(0,s.jsxs)("div",{className:"panel-header",children:[(0,s.jsx)("h2",{children:e}),t&&(0,s.jsxs)("button",{onClick:a,children:[t," →"]})]})}function d({label:e,count:t,tone:a}){return(0,s.jsxs)("div",{className:"queue-row",children:[(0,s.jsx)("span",{children:e}),(0,s.jsx)("b",{className:`queue-count ${a}`,children:t})]})}function h({proposals:e,claims:t,items:o,directives:c,onAction:d,onRefresh:p}){async function u(e,s){await (0,n.postJson)(e,{id:s,companionId:"default"}),await p()}return(0,s.jsxs)("div",{className:"console-view",children:[(0,s.jsxs)("div",{className:"view-intro",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"console-eyebrow",children:"COMPANION MEMORY"}),(0,s.jsx)("h2",{children:"Review candidates before they become facts."}),(0,s.jsx)("p",{children:"Every candidate stays isolated until you explicitly approve it."})]}),(0,s.jsxs)("span",{className:"count-badge",children:[e.length," pending"]})]}),(0,s.jsxs)("section",{className:"console-panel table-panel",children:[(0,s.jsxs)("div",{className:"table-toolbar",children:[(0,s.jsx)("strong",{children:"Pending memory"}),(0,s.jsx)("span",{children:"Local approval queue"})]}),e.length?(0,s.jsx)("div",{className:"data-table-wrap",children:(0,s.jsxs)("table",{className:"data-table",children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{children:"Candidate"}),(0,s.jsx)("th",{children:"Provenance"}),(0,s.jsx)("th",{children:"Sensitivity"}),(0,s.jsx)("th",{children:"Action"})]})}),(0,s.jsx)("tbody",{children:e.map(e=>(0,s.jsx)(m,{item:e,onAction:d},e.proposal_id))})]})}):(0,s.jsx)(a,{title:"No pending candidates",detail:"Siduri memory suggestions will appear here for review."})]}),(0,s.jsxs)("section",{className:"console-panel table-panel",children:[(0,s.jsxs)("div",{className:"table-toolbar",children:[(0,s.jsx)("strong",{children:"Behavioral Directives"}),(0,s.jsx)("span",{children:"Active behaviors and learned relationships"})]}),c.length?(0,s.jsx)("div",{className:"data-table-wrap",children:(0,s.jsxs)("table",{className:"data-table",children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{children:"Directive"}),(0,s.jsx)("th",{children:"Scope & Activation"}),(0,s.jsx)("th",{children:"Class"}),(0,s.jsx)("th",{children:"Status"}),(0,s.jsx)("th",{children:"Actions"})]})}),(0,s.jsx)("tbody",{children:c.map(e=>(0,s.jsxs)("tr",{children:[(0,s.jsxs)("td",{children:[(0,s.jsx)("strong",{children:(0,i.formatRuntimeEffect)(e)}),(0,s.jsxs)("details",{className:"row-details",children:[(0,s.jsx)("summary",{children:r(e.directive_id)}),(0,s.jsx)("pre",{children:JSON.stringify(e,null,2)})]})]}),(0,s.jsx)("td",{children:(0,s.jsx)("span",{className:"tag",children:e.activation})}),(0,s.jsx)("td",{children:(0,s.jsxs)("span",{className:"tag",children:[e.domain," / ",e.memory_class]})}),(0,s.jsx)("td",{children:(0,s.jsx)("span",{className:`tag status-${e.status}`,children:e.status})}),(0,s.jsx)("td",{children:(0,s.jsxs)("div",{className:"table-actions",children:["pending"===e.status&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("button",{className:"tiny-button approve-button",onClick:()=>void u("/memory/behavioral/approve",e.directive_id),children:"Approve"}),(0,s.jsx)("button",{className:"tiny-button danger-button",onClick:()=>void u("/memory/behavioral/reject",e.directive_id),children:"Reject"})]}),"confirmed"===e.status&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("button",{className:"tiny-button danger-button",onClick:()=>void u("/memory/behavioral/revoke",e.directive_id),children:"Revoke"}),"disabled"!==e.activation&&(0,s.jsx)("button",{className:"tiny-button",onClick:()=>void u("/memory/behavioral/disable",e.directive_id),children:"Disable"})]})]})})]},e.directive_id))})]})}):(0,s.jsx)(a,{title:"No behavioral directives",detail:"Behavioral rules taught in private chat will appear here."})]}),(0,s.jsxs)("section",{className:"console-panel table-panel",children:[(0,s.jsxs)("div",{className:"table-toolbar",children:[(0,s.jsx)("strong",{children:"Structured Claims"}),(0,s.jsx)("span",{children:"Queryable personal and game knowledge"})]}),t.length?(0,s.jsx)("div",{className:"data-table-wrap",children:(0,s.jsxs)("table",{className:"data-table",children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{children:"Subject"}),(0,s.jsx)("th",{children:"Predicate"}),(0,s.jsx)("th",{children:"Value"}),(0,s.jsx)("th",{children:"Status"})]})}),(0,s.jsx)("tbody",{children:t.slice().reverse().map(e=>(0,s.jsxs)("tr",{children:[(0,s.jsxs)("td",{children:[(0,s.jsx)("strong",{children:e.subject}),(0,s.jsxs)("details",{className:"row-details",children:[(0,s.jsx)("summary",{children:r(e.claim_id)}),(0,s.jsx)("pre",{children:JSON.stringify(e,null,2)})]})]}),(0,s.jsx)("td",{children:(0,s.jsx)("span",{className:"tag",children:e.predicate})}),(0,s.jsx)("td",{children:e.value}),(0,s.jsx)("td",{children:(0,s.jsx)("span",{className:`tag status-${e.status}`,children:e.status})})]},e.claim_id))})]})}):(0,s.jsx)(a,{title:"No structured claims",detail:"Approved teachings will become queryable claims here."})]}),(0,s.jsxs)("section",{className:"console-panel table-panel",children:[(0,s.jsxs)("div",{className:"table-toolbar",children:[(0,s.jsx)("strong",{children:"Compatibility Memory Items"}),(0,s.jsx)("span",{children:"Legacy text projection"})]}),o.length?(0,s.jsx)("div",{className:"data-table-wrap",children:(0,s.jsxs)("table",{className:"data-table",children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{children:"Fact"}),(0,s.jsx)("th",{children:"Provenance"}),(0,s.jsx)("th",{children:"Sensitivity"}),(0,s.jsx)("th",{children:"Created"})]})}),(0,s.jsx)("tbody",{children:o.slice().reverse().map(e=>(0,s.jsxs)("tr",{children:[(0,s.jsxs)("td",{children:[(0,s.jsx)("strong",{children:e.content}),(0,s.jsxs)("details",{className:"row-details",children:[(0,s.jsx)("summary",{children:r(e.memory_id)}),(0,s.jsx)("pre",{children:JSON.stringify(e,null,2)})]})]}),(0,s.jsx)("td",{children:(0,s.jsx)("span",{className:"tag",children:e.provenance})}),(0,s.jsx)("td",{children:(0,s.jsx)("span",{className:"tag",children:e.sensitivity})}),(0,s.jsx)("td",{children:l(e.created_at)})]},e.memory_id))})]})}):(0,s.jsx)(a,{title:"No compatibility items",detail:"Legacy approved memory text will appear here."})]})]})}function m({item:e,onAction:a}){let[n,l]=(0,t.useState)(e.content);return(0,s.jsxs)("tr",{children:[(0,s.jsxs)("td",{children:[(0,s.jsx)("strong",{children:(0,i.formatClaimReceipt)(e)}),(0,s.jsxs)("details",{className:"row-details",children:[(0,s.jsxs)("summary",{children:["Edit raw record · ",r(e.proposal_id)]}),(0,s.jsx)("textarea",{className:"table-editor",value:n,onChange:e=>l(e.target.value),"aria-label":`Memory candidate ${e.proposal_id}`}),(0,s.jsx)("pre",{children:JSON.stringify(e,null,2)})]})]}),(0,s.jsx)("td",{children:e.provenance}),(0,s.jsx)("td",{children:(0,s.jsx)("span",{className:"tag",children:e.sensitivity})}),(0,s.jsx)("td",{children:(0,s.jsxs)("div",{className:"table-actions",children:[(0,s.jsx)("button",{className:"tiny-button",onClick:()=>void a("/memory/proposals/update",e,n),children:"Save"}),(0,s.jsx)("button",{className:"tiny-button approve-button",onClick:()=>void a("/memory/proposals/approve",e),children:"Approve"}),(0,s.jsx)("button",{className:"tiny-button danger-button",onClick:()=>void a("/memory/proposals/reject",e),children:"Reject"})]})})]})}function p({results:e,observations:t,onCreate:n,onRefresh:i}){return(0,s.jsxs)("div",{className:"console-view",children:[(0,s.jsxs)("div",{className:"view-intro",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"console-eyebrow",children:"GROUNDING"}),(0,s.jsx)("h2",{children:"Evidence, with uncertainty intact."}),(0,s.jsx)("p",{children:"Inspect bounded citations and short-lived observations without exposing raw captures."})]}),(0,s.jsxs)("div",{className:"button-row",children:[(0,s.jsx)("button",{onClick:()=>void n(),children:"Create fixture"}),(0,s.jsx)("button",{className:"soft-button",onClick:()=>void i(),children:"Refresh"})]})]}),(0,s.jsxs)("section",{className:"console-panel table-panel",children:[(0,s.jsxs)("div",{className:"table-toolbar",children:[(0,s.jsx)("strong",{children:"Knowledge Base Citations"}),(0,s.jsxs)("span",{children:[e.length," results"]})]}),e.length?(0,s.jsx)("div",{className:"data-table-wrap",children:(0,s.jsxs)("table",{className:"data-table",children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{children:"Source"}),(0,s.jsx)("th",{children:"Revision"}),(0,s.jsx)("th",{children:"Preview"}),(0,s.jsx)("th",{children:"Link"})]})}),(0,s.jsx)("tbody",{children:e.map(e=>(0,s.jsxs)("tr",{children:[(0,s.jsxs)("td",{children:[(0,s.jsx)("strong",{children:e.title}),(0,s.jsx)("small",{children:e.endpoint})]}),(0,s.jsx)("td",{children:e.revision||"—"}),(0,s.jsx)("td",{children:(0,s.jsx)("span",{className:"tag",children:e.preview?"Preview":"Published"})}),(0,s.jsx)("td",{children:(0,s.jsx)("a",{className:"table-link",href:e.url,target:"_blank",rel:"noreferrer",children:"Open ↗"})})]},e.url))})]})}):(0,s.jsx)(a,{title:"No evidence loaded",detail:"Create a fixture observation or refresh the source."})]}),(0,s.jsxs)("section",{className:"console-panel table-panel",children:[(0,s.jsxs)("div",{className:"table-toolbar",children:[(0,s.jsx)("strong",{children:"Current observations"}),(0,s.jsx)("span",{children:"Raw frames are never shown here"})]}),t.length?(0,s.jsx)("div",{className:"data-table-wrap",children:(0,s.jsxs)("table",{className:"data-table",children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{children:"Observation"}),(0,s.jsx)("th",{children:"Captured"}),(0,s.jsx)("th",{children:"Expires"}),(0,s.jsx)("th",{children:"Readings"})]})}),(0,s.jsx)("tbody",{children:t.map((e,t)=>(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{children:r(e.observation_id??"observation")}),(0,s.jsx)("td",{children:l(e.observed_at)}),(0,s.jsx)("td",{children:l(e.expires_at)}),(0,s.jsx)("td",{children:Array.isArray(e.readings)?e.readings.length:0})]},e.observation_id??t))})]})}):(0,s.jsx)(a,{title:"No active observations",detail:"Observations are bounded and expire automatically."})]})]})}function u({health:e,voice:t,obs:a,proposals:n,responseJson:i,pendingCorrelationId:r,busy:l,onTrigger:h,onObserve:m,onApprove:p,onNavigate:x}){return(0,s.jsxs)("div",{className:"console-view",children:[(0,s.jsxs)("div",{className:"status-grid",children:[(0,s.jsx)(o,{status:e}),(0,s.jsx)(o,{status:t}),(0,s.jsx)(o,{status:a})]}),(0,s.jsxs)("div",{className:"console-columns",children:[(0,s.jsxs)("section",{className:"console-panel approval-panel",children:[(0,s.jsx)(c,{title:"Response gate",action:"Review policy",onClick:()=>x("settings")}),(0,s.jsxs)("div",{className:"gate-row",children:[(0,s.jsx)("span",{className:`gate-icon ${r?"pending":"ready"}`,children:r?"!":"✓"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("strong",{children:r?"Grounded response awaiting approval":"No response awaiting approval"}),(0,s.jsx)("p",{children:r?"Public output is held until you approve it.":"Local mock responses remain private."})]})]}),(0,s.jsxs)("div",{className:"button-row",children:[(0,s.jsx)("button",{onClick:()=>void h(),disabled:l,children:"Trigger mock response"}),(0,s.jsx)("button",{className:"soft-button",onClick:()=>void m(),disabled:l,children:"Observe and respond"}),r&&(0,s.jsx)("button",{className:"approve-button",onClick:()=>void p(),children:"Approve response"})]}),null!==i&&(0,s.jsxs)("details",{className:"technical-details",children:[(0,s.jsx)("summary",{children:"Technical details"}),(0,s.jsx)("pre",{children:JSON.stringify(i,null,2)})]})]}),(0,s.jsxs)("section",{className:"console-panel queue-panel",children:[(0,s.jsx)(c,{title:"Needs attention",action:"View memory",onClick:()=>x("memory")}),(0,s.jsx)(d,{label:"Memory proposals",count:n.length,tone:n.length?"warn":"quiet"})]})]}),(0,s.jsxs)("section",{className:"console-panel quick-panel",children:[(0,s.jsx)(c,{title:"Quick actions"}),(0,s.jsxs)("div",{className:"quick-actions",children:[(0,s.jsxs)("button",{onClick:()=>x("memory"),children:["Review memory ",(0,s.jsx)("span",{children:"→"})]}),(0,s.jsxs)("button",{onClick:()=>x("evidence"),children:["Inspect evidence ",(0,s.jsx)("span",{children:"→"})]}),(0,s.jsxs)("button",{onClick:()=>x("settings"),children:["Identity & Directives ",(0,s.jsx)("span",{children:"→"})]})]})]})]})}function x({onResetMemory:e,disabled:t}){return(0,s.jsxs)("div",{className:"console-view",children:[(0,s.jsx)("div",{className:"view-intro",children:(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"console-eyebrow",children:"RUNTIME IDENTITY"}),(0,s.jsx)("h2",{children:"Companion Identity & Directives"}),(0,s.jsx)("p",{children:"Identity and behavioral preferences are governed dynamically through conversational teaching and reviewed in the Memory tab."})]})}),(0,s.jsxs)("section",{className:"console-panel profile-panel",children:[(0,s.jsxs)("div",{className:"table-toolbar",children:[(0,s.jsx)("strong",{children:"Identity Directives"}),(0,s.jsx)("span",{children:"Governed Memory Model"})]}),(0,s.jsx)(a,{title:"Dynamic identity active",detail:"Siduri establishes preferences and boundaries dynamically through conversation. Use the Private Chat to teach preferences, and the Memory tab to approve or revoke directives."})]}),(0,s.jsxs)("section",{className:"console-panel profile-panel mt-6",children:[(0,s.jsxs)("div",{className:"table-toolbar",children:[(0,s.jsx)("strong",{children:"Danger Zone"}),(0,s.jsx)("span",{children:"Irreversible actions"})]}),(0,s.jsxs)("div",{className:"p-6 bg-red-900/20 border border-red-500/20 rounded-lg",children:[(0,s.jsx)("h3",{className:"text-red-400 font-medium mb-2",children:"Reset All Memory"}),(0,s.jsx)("p",{className:"text-sm text-gray-400 mb-4",children:"This will permanently delete all memory items, proposals, revisions, and claims from the database. The companion will forget all approved claims, directives, and proposals."}),(0,s.jsx)("button",{className:"bg-red-500/10 text-red-400 border border-red-500/50 hover:bg-red-500/20 px-4 py-2 rounded-md font-medium transition-colors",onClick:()=>void e(),disabled:t,children:"Reset Memory"})]})]})]})}e.s(["default",0,function(){let[e,a]=(0,t.useState)("overview"),[i,r]=(0,t.useState)({label:"Orchestrator",value:"Checking",tone:"warn"}),[l,o]=(0,t.useState)({label:"Voice",value:"Checking",tone:"warn"}),[c,d]=(0,t.useState)({label:"OBS capture",value:"Checking",tone:"warn"}),[m,j]=(0,t.useState)(""),[v,b]=(0,t.useState)([]),[y,g]=(0,t.useState)([]),[N,f]=(0,t.useState)([]),[w,S]=(0,t.useState)([]),[C,k]=(0,t.useState)([]),[_,$]=(0,t.useState)([]),[O,R]=(0,t.useState)("{}"),[J,T]=(0,t.useState)(""),[I,A]=(0,t.useState)(null),[P,E]=(0,t.useState)(null),[U,D]=(0,t.useState)(!1);async function M(){try{let[e,s,t]=await Promise.all([(0,n.getJson)("/health"),(0,n.getJson)("/version"),(0,n.getJson)("/ready")]);r({label:"Orchestrator",value:"ok"===e.status?"Online":e.status,detail:`v${s.version}`,tone:"ok"===e.status?"good":"warn"}),j(s.version),t.dependencies?.model_provider?.ready===!1&&r(e=>({...e,detail:"Model provider degraded",tone:"warn"}))}catch{r({label:"Orchestrator",value:"Offline",detail:"Start the Python API",tone:"bad"})}try{let e=await (0,n.getJson)("/voice/health");o({label:"Voice",value:e.healthy?"Ready":"Fallback",detail:e.provider,tone:e.healthy?"good":"warn"})}catch{o({label:"Voice",value:"Unavailable",detail:"Subtitle fallback",tone:"warn"})}try{let e=await (0,n.getJson)("/obs/health");d({label:"OBS capture",value:e.connected?"Connected":e.configured?"Disconnected":"Disabled",detail:e.source_name?`Source: ${e.source_name}`:"No source configured",tone:e.connected?"good":"warn"})}catch{d({label:"OBS capture",value:"Unavailable",tone:"bad"})}}async function L(){try{let[e,s,t,a]=await Promise.all([(0,n.getJson)("/memory/proposals"),(0,n.getJson)("/memory"),(0,n.getJson)("/memory/claims"),(0,n.getJson)("/memory/behavioral")]);b((e.proposals??[]).filter(e=>"pending"===e.status)),f(s.items??[]),g(t.claims??[]),S(a.directives??[])}catch{b([]),f([]),g([]),S([])}}async function B(){try{let[e,s]=await Promise.all([(0,n.getJson)("/evidence"),(0,n.getJson)("/observations")]);k(e.results??[]),$(s.observations??[])}catch{k([]),$([])}}async function q(){try{R(JSON.stringify(await (0,n.getJson)("/me"),null,2))}catch{R("Unable to load profile.")}}async function W(){D(!0);try{A(await (0,n.postJson)("/dev/mock-response"))}finally{D(!1)}}async function F(){D(!0);try{let e=await (0,n.postJson)("/dev/observe-and-respond");A(e);let s="string"==typeof e?.metadata?.correlation_id?e.metadata.correlation_id:null;E(s)}finally{D(!1)}}async function V(){if(P){D(!0);try{A(await (0,n.postJson)("/dev/approve-response",{correlation_id:P})),E(null)}finally{D(!1)}}}async function G(e,s,t){await (0,n.postAction)(e,{id:s.proposal_id,companionId:"default",...void 0===t?{}:{content:t}}),await L()}async function K(){await (0,n.postAction)("/dev/mock-observation"),await B()}async function Q(){if(window.confirm("Are you sure you want to completely reset all memory? This action cannot be undone.")){D(!0);try{await (0,n.postJson)("/dev/memory/reset"),await L(),T("Memory has been completely reset.")}catch(e){T(String(e))}finally{D(!1)}}}return(0,t.useEffect)(()=>{M(),L(),B(),q()},[]),(0,s.jsxs)("main",{className:"console-app",children:[(0,s.jsxs)("aside",{className:"console-sidebar",children:[(0,s.jsxs)("a",{className:"console-brand",href:"/chat",children:[(0,s.jsx)("span",{className:"console-brand-mark",children:"S"}),(0,s.jsx)("span",{children:"SIDURI"})]}),(0,s.jsxs)("div",{className:"console-context",children:[(0,s.jsx)("span",{className:"console-context-dot"}),"Operator workspace"]}),(0,s.jsx)("nav",{className:"console-nav","aria-label":"Console sections",children:["overview","memory","evidence","settings"].map(t=>(0,s.jsxs)("button",{className:e===t?"active":"",onClick:()=>a(t),children:[(0,s.jsx)("span",{className:`nav-glyph nav-${t}`}),t[0].toUpperCase()+t.slice(1)]},t))}),(0,s.jsxs)("div",{className:"console-sidebar-bottom",children:[(0,s.jsx)("a",{href:"/chat",children:"← Private chat"}),(0,s.jsx)("span",{children:"Local operator surface"})]})]}),(0,s.jsxs)("section",{className:"console-main",children:[(0,s.jsxs)("header",{className:"console-topbar",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"console-eyebrow",children:"SIDURI / OPERATOR"}),(0,s.jsx)("h1",{children:"overview"===e?"Control room":e[0].toUpperCase()+e.slice(1)})]}),(0,s.jsxs)("div",{className:"console-top-actions",children:[(0,s.jsxs)("span",{className:"console-version",children:["v",m||"—"]}),(0,s.jsx)("button",{className:"console-refresh",onClick:()=>{M(),L(),B()},"aria-label":"Refresh dashboard",children:"↻"})]})]}),J&&(0,s.jsx)("div",{className:"console-notice",children:J}),"overview"===e&&(0,s.jsx)(u,{health:i,voice:l,obs:c,proposals:v,responseJson:I,pendingCorrelationId:P,busy:U,onTrigger:W,onObserve:F,onApprove:V,onNavigate:a}),"memory"===e&&(0,s.jsx)(h,{proposals:v,claims:y,items:N,directives:w,onAction:G,onRefresh:L}),"evidence"===e&&(0,s.jsx)(p,{results:C,observations:_,onCreate:K,onRefresh:B}),"settings"===e&&(0,s.jsx)(x,{onResetMemory:Q,disabled:U})]})]})}],80951)},94108,e=>{"use strict";var s=e.i(28152);let t=s.default.env.NEXT_PUBLIC_API_URL??"";async function a(e,s){return fetch(`${t}${e}`,s)}async function n(e,s){let t=await a(e,s);if(!t.ok)throw Error(`${e} returned ${t.status}`);return t.json()}async function i(e,s){let t=await a(e,{method:"POST",headers:s?{"Content-Type":"application/json"}:void 0,body:s?"string"==typeof s?s:JSON.stringify(s):void 0});if(!t.ok)throw Error(await t.text().catch(()=>t.statusText));return t.json().catch(()=>({}))}async function r(e,s){let t=await a(e,{method:"POST",headers:s?{"Content-Type":"application/json"}:void 0,body:s?"string"==typeof s?s:JSON.stringify(s):void 0});if(!t.ok)throw Error(await t.text().catch(()=>t.statusText))}async function l(e,s,t,n){let i=await a(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s),signal:n});if(!i.ok)throw Error(await i.text().catch(()=>i.statusText)||`HTTP ${i.status}`);if(!i.body)throw Error("ReadableStream not supported in response");let r=i.body.getReader(),l=new TextDecoder,o="";try{for(;;){let{done:e,value:s}=await r.read();if(e)break;let a=(o+=l.decode(s,{stream:!0})).split("\n");o=a.pop()||"";let n="message";for(let e of a){let s=e.trim();if(s){if(s.startsWith("event:"))n=s.slice(6).trim();else if(s.startsWith("data:")){let e=s.slice(5).trim();try{let s=JSON.parse(e);switch(n){case"staged":t.onStaged?.(s);break;case"chunk":t.onChunk?.(s);break;case"avatar":t.onAvatar?.(s);break;case"done":t.onDone?.(s);break;case"interrupted":t.onInterrupted?.(s);break;case"error":t.onError?.(Error(s.error||"Stream error"))}}catch{}}}}}}catch(e){if(n?.aborted)t.onInterrupted?.({reason:n.reason});else throw t.onError?.(e),e}finally{r.releaseLock()}}async function o(e="default",s="user_barge_in"){await i("/chat/interrupt",{companionId:e,reason:s}).catch(()=>{})}s.default.env.NEXT_PUBLIC_WS_URL||(window.location.protocol,window.location.host),e.s(["fetchApi",0,a,"getJson",0,n,"interruptChat",0,o,"postAction",0,r,"postJson",0,i,"postStream",0,l])},51523,e=>{"use strict";let s=new Set(["siduri","self","companion"]),t=new Set(["user","actor","owner","primary_user"]);function a(e){return e.replace(/[._]+/g," ").replace(/\s+/g," ").trim()}function n(e){let s=e.trim();return s&&!/[.!?]$/.test(s)?`${s}.`:s}function i(e){let i=e.subject?.trim()??"",r=i.toLowerCase(),l=e.predicate?.trim()??"",o=l.toLowerCase(),c=e.value?.trim()??"";if(!i||!l||!c)return n(e.content??c);if(s.has(r))return"name"===o?n(`Companion name is ${c}`):n(`Companion ${a(l)} is ${c}`);if(t.has(r))return"name"===o?n(`User name is ${c}`):"preferred_address"===o?n(`User preferred address is ${c}`):"relationship_to_siduri"===o||"relationship"===o?n(`User relationship configured as ${c}`):n(`User ${a(l)} is ${c}`);if(r.startsWith("primary_user.")||r.startsWith("user.")){let e=r.startsWith("primary_user.")?"primary_user.":"user.",s=a(i.slice(e.length)),t="uid"===o||"id"===o?"ID":a(l);return n(`User ${s} ${t} is ${c}`)}let d=a(i);return n(`${/s$/i.test(d)?`${d}'`:`${d}'s`} ${a(l)} is ${c}`)}e.s(["formatClaimReceipt",0,i,"formatRuntimeEffect",0,function(e){let r=e.subject?.trim().toLowerCase()??"",l=e.predicate?.trim().toLowerCase()??"",o=e.value?.trim()??"",c=e.behavior?.instruction?.trim()??"";return"behavioral"===e.memory_class&&c?n(c):s.has(r)&&"name"===l?n(`Set companion identity/name to ${o}`):s.has(r)?n(`Set companion ${a(l)} to ${o}`):t.has(r)&&("relationship_to_siduri"===l||"relationship"===l)?n(`Set user relationship to ${o}`):t.has(r)&&"name"===l?n(`Set user name to ${o}`):i(e)}])}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,{otherChunks:["static/chunks/0tdcnq1-n6kof.js","static/chunks/2mno6yfdoee0x.js","static/chunks/12vwhiuvdy_i7.js","static/chunks/0jgw-jf26m0ui.js"],runtimeModuleIds:[87095]}]),(()=>{let e;if(!Array.isArray(globalThis.TURBOPACK))return;var t,r=function(){if(null!=self.TURBOPACK_ASSET_SUFFIX)return self.TURBOPACK_ASSET_SUFFIX;let e=document?.currentScript?.getAttribute?.("src")??"",t=e.indexOf("?");return t>=0?e.slice(t):""}(),n=((t=n||{})[t.Runtime=0]="Runtime",t[t.Parent=1]="Parent",t[t.Update=2]="Update",t);let o=new WeakMap;function l(e,t){this.m=e,this.e=t}let i=l.prototype,u=Object.prototype.hasOwnProperty,s="u">typeof Symbol&&Symbol.toStringTag;function c(e,t,r){u.call(e,t)||Object.defineProperty(e,t,r)}function a(e,t){let r=e[t];return r||(r=f(t),e[t]=r),r}function f(e){return{exports:{},error:void 0,id:e,namespaceObject:void 0}}function p(e,t,r){c(e,"__esModule",{value:!0}),s&&c(e,s,{value:"Module"});let n=0;for(;n<t.length;){let r=t[n++],o=t[n++];if("number"==typeof o)if(0===o)c(e,r,{value:t[n++],enumerable:!0,writable:!1});else throw Error(`unexpected tag: ${o}`);else"function"==typeof t[n]?c(e,r,{get:o,set:t[n++],enumerable:!0}):c(e,r,{get:o,enumerable:!0})}r||Object.seal(e)}function d(e,t){(null!=t?a(this.c,t):this.m).exports=e}i.s=function(e,t,r){let n,o;null!=t?o=(n=a(this.c,t)).exports:(n=this.m,o=this.e),n.namespaceObject=o,p(o,e,r)},i.j=function(e,t){let r,n;null!=t?n=(r=a(this.c,t)).exports:(r=this.m,n=this.e);let l=function(e,t){let r=o.get(e);if(!r){o.set(e,r=[]);let n=e=>{if("default"!==e){for(let t of r)if(u.call(t,e))return t}};e.exports=e.namespaceObject=new Proxy(t,{get(e,t){if(u.call(e,t)||"default"===t||"__esModule"===t)return Reflect.get(e,t);let r=n(t);return r&&Reflect.get(r,t)},set:()=>!1,defineProperty:()=>!1,deleteProperty:()=>!1,has:(e,t)=>!!Reflect.has(e,t)||"default"!==t&&"__esModule"!==t&&void 0!==n(t),ownKeys(e){let t=Reflect.ownKeys(e);for(let e of r)for(let r of Reflect.ownKeys(e))"default"===r||t.includes(r)||t.push(r);return t},getOwnPropertyDescriptor(e,t){let r=Reflect.getOwnPropertyDescriptor(e,t);if(r||"default"===t||"__esModule"===t)return r;let o=n(t);if(o)return{enumerable:!0,configurable:!0,get:()=>Reflect.get(o,t)}}})}return r}(r,n);"object"==typeof e&&null!==e&&l.push(e)},i.v=d,i.n=function(e,t){let r;(r=null!=t?a(this.c,t):this.m).exports=r.namespaceObject=e};let h=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,m=[null,h({}),h([]),h(h)];function y(e,t,r){let n=[],o=-1;for(let t=e;("object"==typeof t||"function"==typeof t)&&!m.includes(t);t=h(t))for(let r of Object.getOwnPropertyNames(t))n.push(r,function(e,t){return()=>e[t]}(e,r)),-1===o&&"default"===r&&(o=n.length-1);return r&&o>=0||(o>=0?n.splice(o,1,0,e):n.push("default",0,e)),p(t,n),t}function g(e){let t=K(e,this.m);if(t.namespaceObject)return t.namespaceObject;let r=t.exports;return t.namespaceObject=y(r,"function"==typeof r?function(...e){return r.apply(this,e)}:Object.create(null),r&&r.__esModule)}function b(e){let t=e.indexOf("#");-1!==t&&(e=e.substring(0,t));let r=e.indexOf("?");return -1!==r&&(e=e.substring(0,r)),e}i.i=g,i.A=function(e){return this.r(e)(g.bind(this))},i.t="function"==typeof require?require:function(){throw Error("Unexpected use of runtime require")},i.r=function(e){return K(e,this.m).exports},i.f=function(e){function t(t){if(t=b(t),u.call(e,t))return e[t].module();let r=Error(`Cannot find module '${t}'`);throw r.code="MODULE_NOT_FOUND",r}return t.keys=()=>Object.keys(e),t.resolve=t=>{if(t=b(t),u.call(e,t))return e[t].id();let r=Error(`Cannot find module '${t}'`);throw r.code="MODULE_NOT_FOUND",r},t.import=async e=>await t(e),t};let O=function(e){let t=new URL(e,"x:/"),r={};for(let e in t)r[e]=t[e];for(let t in r.href=e,r.pathname=e.replace(/[?#].*/,""),r.origin=r.protocol="",r.toString=r.toJSON=(...t)=>e,r)Object.defineProperty(this,t,{enumerable:!0,configurable:!0,value:r[t]})};function w(e,t){throw Error(`Invariant: ${t(e)}`)}O.prototype=URL.prototype,i.U=O,i.z=function(e){throw Error("dynamic usage of require is not supported")},i.g=globalThis;let k=l.prototype,R="string"==typeof TURBOPACK_CHUNK_BASE_PATH?TURBOPACK_CHUNK_BASE_PATH:"/_next/",U=new Map;i.M=U;let v=new Map,_=new Map,P=new Map;async function j(e,t,r){let n;if("string"==typeof r)return function(e,t,r){return A(e,t,r)}(e,t,E(r));let o=r.included||[],l=o.map(e=>!!U.has(e)||v.get(e));if(l.length>0&&l.every(e=>e))return void await Promise.all(l);for(let l of(n=A(e,t,E(r.path)),o))v.has(l)||v.set(l,n);await n}k.l=function(e){return j(n.Parent,this.m.id,e)};let C=Promise.resolve(void 0),$=new WeakMap;function A(t,r,o){let l=e.loadChunkCached(t,o),i=$.get(l);if(void 0===i){let e=$.set.bind($,l,C);i=l.then(e).catch(e=>{let l;switch(t){case n.Runtime:l=`as a runtime dependency of chunk ${r}`;break;case n.Parent:l=`from module ${r}`;break;case n.Update:l="from an HMR update";break;default:w(t,e=>`Unknown source type: ${e}`)}let i=Error(`Failed to load chunk ${o} ${l}${e?`: ${e}`:""}`,e?{cause:e}:void 0);throw i.name="ChunkLoadError",i}),$.set(l,i)}return i}k.L=function(e){var t,r;return t=n.Parent,r=this.m.id,A(t,r,e)};k.R=function(e){let t=this.r(e);return t?.default??t},k.P=function(e){return`/ROOT/${e??""}`},k.F=function(e){return e?`file:///ROOT/${e.split("/").map(encodeURIComponent).join("/")}`:"file:///ROOT/"},k.q=function(e,t){d.call(this,`${e}${r}`,t)};let T=/[^A-Za-z0-9\-_.!~*'()/]/;function E(e,t=R){let n=T.test(e)?e.split("/").map(encodeURIComponent).join("/"):e;return`${t}${n}${r}`}function S(e,t){let r,n=e.indexOf("?");if(-1!==n)r=n;else{let t=e.indexOf("#");r=-1!==t?t:e.length}return r>=t.length&&e.startsWith(t,r-t.length)}k.b=R,k.X=r,k.h=E;function M(e){return S(e,".css")}let x={};i.c=x;let K=(e,t)=>{let r=x[e];if(r){if(r.error)throw r.error;return r}return N(e,n.Parent,t.id)};function N(e,t,r){let n=U.get(e);if("function"!=typeof n)throw Error(function(e,t,r){let n;switch(t){case 0:n=`as a runtime entry of chunk ${r}`;break;case 1:n=`because it was required from module ${r}`;break;case 2:n="because of an HMR update";break;default:w(t,e=>`Unknown source type: ${e}`)}return`Module ${e} was instantiated ${n}, but the module factory is not available.`}(e,t,r));let o=f(e),i=o.exports;x[e]=o;let u=new l(o,i);try{n(u,o,i)}catch(e){throw o.error=e,e}return o.namespaceObject&&o.exports!==o.namespaceObject&&y(o.exports,o.namespaceObject),o}function B(t){let r;if(!Array.isArray(t))return e.registerChunk(void 0,t);let n=function(e){if("string"==typeof e)return e;if(e)return{src:e.getAttribute("src")};if("u">typeof TURBOPACK_NEXT_CHUNK_URLS)return{src:TURBOPACK_NEXT_CHUNK_URLS.pop()};throw Error("chunk path empty but not in a worker")}(t[0]);return 2===t.length?r=t[1]:(r=void 0,!function(e,t){let r=1;for(;r<e.length;){let n,o=r+1;for(;o<e.length&&"function"!=typeof e[o];)o++;if(o===e.length)throw Error("malformed chunk format, expected a factory function");let l=e[o];for(let l=r;l<o;l++){let r=e[l],o=t.get(r);if(o){n=o;break}}let i=n??l,u=!1;for(let n=r;n<o;n++){let r=e[n];t.has(r)||(u||(i===l&&Object.defineProperty(l,"name",{value:"module evaluation"}),u=!0),t.set(r,i))}r=o+1}}(t,U)),e.registerChunk(n,r)}let L=new Map;function I(e){let t=L.get(e);if(!t){let r,n;t={resolved:!1,loadingStarted:!1,retryAttempts:0,promise:new Promise((e,t)=>{r=e,n=t}),resolve:()=>{t.resolved=!0,r()},reject:n},L.set(e,t)}return t}function q(e,t,r,n,o){!(null==n||n instanceof DOMException&&"NetworkError"===n.name)||r.retryAttempts>=1||L.get(t)!==r?(L.get(t)===r&&L.delete(t),r.reject(n)):(r.retryAttempts++,setTimeout(()=>{r.resolved||L.get(t)!==r||(o?o():(r.loadingStarted=!1,H(e,t)))},200+Math.floor(401*Math.random())))}function H(e,t){let r=I(t);if(r.loadingStarted)return r.promise;if(e===n.Runtime)return r.loadingStarted=!0,M(t)&&r.resolve(),r.promise;if("function"==typeof importScripts)if(M(t));else if(S(t,".js")){self.TURBOPACK_NEXT_CHUNK_URLS.push(t);try{importScripts(t)}catch(n){q(e,t,r,n)}}else throw Error(`can't infer type of chunk from URL ${t} in worker`);else{let n=decodeURI(t);if(M(t))if(document.querySelectorAll(`link[rel=stylesheet][href="${t}"],link[rel=stylesheet][href^="${t}?"],link[rel=stylesheet][href="${n}"],link[rel=stylesheet][href^="${n}?"]`).length>0)r.resolve();else{let n=()=>{let o=document.createElement("link");return o.rel="stylesheet",o.crossOrigin=null,o.href=t,o.onerror=()=>{let l=document.createComment("");o.replaceWith(l),q(e,t,r,void 0,()=>l.replaceWith(n()))},o.onload=()=>{r.resolve()},o};document.head.appendChild(n())}else if(S(t,".js")){let o=document.querySelectorAll(`script[src="${t}"],script[src^="${t}?"],script[src="${n}"],script[src^="${n}?"]`);if(o.length>0)for(let n of Array.from(o))n.addEventListener("error",()=>{n.remove(),q(e,t,r)},{once:!0});else{let n=document.createElement("script");n.crossOrigin=null,n.src=t,n.onerror=()=>{n.remove(),q(e,t,r)},document.head.appendChild(n)}}else throw Error(`can't infer type of chunk from URL ${t}`)}return r.loadingStarted=!0,r.promise}e={async registerChunk(e,t){let r;if(null!=e&&(r=function(e){if("string"==typeof e)return e;let t=decodeURIComponent(e.src.replace(/[?#].*$/,""));return t.startsWith(R)?t.slice(R.length):t}(e),I("string"==typeof e?E(e):e.src).resolve()),null!=t){for(let e of t.otherChunks)I(E("string"==typeof e?e:e.path));if(await Promise.all(t.otherChunks.map(e=>{var t;return t=r,j(n.Runtime,t,e)})),t.runtimeModuleIds.length>0)for(let e of t.runtimeModuleIds)!function(e,t){let r=x[t];if(r){if(r.error)throw r.error;return}N(t,n.Runtime,e)}(r,e)}},loadChunkCached:(e,t)=>H(e,t)};var F=globalThis.TURBOPACK;globalThis.TURBOPACK={push:B},F.forEach(B)})();
@@ -1,17 +1,17 @@
1
1
  1:"$Sreact.fragment"
2
- 2:I[81869,["/_next/static/chunks/0uwih7sydv413.js"],"default"]
3
- 3:I[57830,["/_next/static/chunks/0uwih7sydv413.js"],"default"]
4
- 4:I[44101,["/_next/static/chunks/0uwih7sydv413.js"],"OutletBoundary"]
2
+ 2:I[31790,["/_next/static/chunks/30a48dk5bjyhj.js"],"default"]
3
+ 3:I[65729,["/_next/static/chunks/30a48dk5bjyhj.js"],"default"]
4
+ 4:I[34860,["/_next/static/chunks/30a48dk5bjyhj.js"],"OutletBoundary"]
5
5
  5:"$Sreact.suspense"
6
- 8:I[44101,["/_next/static/chunks/0uwih7sydv413.js"],"ViewportBoundary"]
7
- a:I[44101,["/_next/static/chunks/0uwih7sydv413.js"],"MetadataBoundary"]
8
- c:I[4626,["/_next/static/chunks/0uwih7sydv413.js"],"default",1]
6
+ 8:I[34860,["/_next/static/chunks/30a48dk5bjyhj.js"],"ViewportBoundary"]
7
+ a:I[34860,["/_next/static/chunks/30a48dk5bjyhj.js"],"MetadataBoundary"]
8
+ c:I[58484,["/_next/static/chunks/30a48dk5bjyhj.js"],"default",1]
9
9
  :HL["/_next/static/chunks/0xhe1hasjan-9.css","style"]
10
10
  :HL["https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&family=Noto+Sans+JP:wght@400;500;700&family=Noto+Serif+JP:wght@400;500;700&display=swap","style"]
11
11
  7:X
12
- 0:{"P":null,"c":["","_not-found",""],"q":"","i":false,"f":[[["",{"children":["/_not-found",{"children":["__PAGE__",{},"$undefined","$undefined",4608]},"$undefined","$undefined",4608]},"$undefined","$undefined",4624],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/0xhe1hasjan-9.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/_next/static/chunks/0uwih7sydv413.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","className":"h-full antialiased dark","children":[["$","head",null,{"children":[["$","link",null,{"rel":"preconnect","href":"https://fonts.googleapis.com"}],["$","link",null,{"rel":"preconnect","href":"https://fonts.gstatic.com","crossOrigin":"anonymous"}],["$","link",null,{"href":"https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&family=Noto+Sans+JP:wght@400;500;700&family=Noto+Serif+JP:wght@400;500;700&display=swap","rel":"stylesheet"}]]}],["$","body",null,{"className":"min-h-full flex flex-col bg-[#0b0b0e] text-[#eee8df] selection:bg-[#d99a68]/30 selection:text-[#f4c28d]","children":["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]]}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:style","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:1:props:style","children":404}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:2:props:style","children":["$","h2",null,{"style":"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],null,["$","$L4",null,{"children":["$","$5",null,{"name":"Next.MetadataOutlet","children":"$@6"}]}]]}],{},null,false,null]},null,false,"$7"]},null,false,null],["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$L8",null,{"children":"$L9"}],["$","div",null,{"hidden":true,"children":["$","$La",null,{"children":["$","$5",null,{"name":"Next.Metadata","children":"$Lb"}]}]}],null]}],false]],"m":"$undefined","G":["$c",[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/0xhe1hasjan-9.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]]],"S":true,"h":null,"r":"$undefined","s":"$undefined","a":"$undefined","l":"$undefined","p":"$undefined","d":"$undefined","b":"pWHUixFDDvANZeAf-shqT"}
12
+ 0:{"P":null,"c":["","_not-found",""],"q":"","i":false,"f":[[["",{"children":["/_not-found",{"children":["__PAGE__",{},"$undefined","$undefined",4608]},"$undefined","$undefined",4608]},"$undefined","$undefined",4624],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/0xhe1hasjan-9.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/_next/static/chunks/30a48dk5bjyhj.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","className":"h-full antialiased dark","children":[["$","head",null,{"children":[["$","link",null,{"rel":"preconnect","href":"https://fonts.googleapis.com"}],["$","link",null,{"rel":"preconnect","href":"https://fonts.gstatic.com","crossOrigin":"anonymous"}],["$","link",null,{"href":"https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&family=Noto+Sans+JP:wght@400;500;700&family=Noto+Serif+JP:wght@400;500;700&display=swap","rel":"stylesheet"}]]}],["$","body",null,{"className":"min-h-full flex flex-col bg-[#0b0b0e] text-[#eee8df] selection:bg-[#d99a68]/30 selection:text-[#f4c28d]","children":["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]]}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:style","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:1:props:style","children":404}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:2:props:style","children":["$","h2",null,{"style":"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],null,["$","$L4",null,{"children":["$","$5",null,{"name":"Next.MetadataOutlet","children":"$@6"}]}]]}],{},null,false,null]},null,false,"$7"]},null,false,null],["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$L8",null,{"children":"$L9"}],["$","div",null,{"hidden":true,"children":["$","$La",null,{"children":["$","$5",null,{"name":"Next.Metadata","children":"$Lb"}]}]}],null]}],false]],"m":"$undefined","G":["$c",[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/0xhe1hasjan-9.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]]],"S":true,"h":null,"r":"$undefined","s":"$undefined","a":"$undefined","l":"$undefined","p":"$undefined","d":"$undefined","b":"gZ_ly5hNtyqFVZ9AuHs_A"}
13
13
  7:C
14
14
  9:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
15
- d:I[89236,["/_next/static/chunks/0uwih7sydv413.js"],"IconMark"]
15
+ d:I[71375,["/_next/static/chunks/30a48dk5bjyhj.js"],"IconMark"]
16
16
  6:null
17
17
  b:[["$","title","0",{"children":"Siduri — Local-First Companion"}],["$","meta","1",{"name":"description","content":"Siduri — a local-first companion with explicit memory, grounded knowledge, and optional presence."}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.3rlors1ui1gw9.ico","sizes":"256x256","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"/favicon.ico"}],["$","link","4",{"rel":"icon","href":"/favicon.svg","type":"image/svg+xml"}],["$","link","5",{"rel":"apple-touch-icon","href":"/apple-touch-icon.png"}],["$","$Ld","6",{}]]
@@ -1,17 +1,17 @@
1
1
  1:"$Sreact.fragment"
2
- 2:I[44101,["/_next/static/chunks/0uwih7sydv413.js"],"OutletBoundary"]
2
+ 2:I[34860,["/_next/static/chunks/30a48dk5bjyhj.js"],"OutletBoundary"]
3
3
  3:"$Sreact.suspense"
4
- 7:I[44101,["/_next/static/chunks/0uwih7sydv413.js"],"ViewportBoundary"]
5
- 8:I[44101,["/_next/static/chunks/0uwih7sydv413.js"],"MetadataBoundary"]
6
- 9:I[89236,["/_next/static/chunks/0uwih7sydv413.js"],"IconMark"]
7
- b:I[81869,["/_next/static/chunks/0uwih7sydv413.js"],"default"]
8
- c:I[57830,["/_next/static/chunks/0uwih7sydv413.js"],"default"]
4
+ 7:I[34860,["/_next/static/chunks/30a48dk5bjyhj.js"],"ViewportBoundary"]
5
+ 8:I[34860,["/_next/static/chunks/30a48dk5bjyhj.js"],"MetadataBoundary"]
6
+ 9:I[71375,["/_next/static/chunks/30a48dk5bjyhj.js"],"IconMark"]
7
+ b:I[31790,["/_next/static/chunks/30a48dk5bjyhj.js"],"default"]
8
+ c:I[65729,["/_next/static/chunks/30a48dk5bjyhj.js"],"default"]
9
9
  :HL["/_next/static/chunks/0xhe1hasjan-9.css","style"]
10
10
  :HL["https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&family=Noto+Sans+JP:wght@400;500;700&family=Noto+Serif+JP:wght@400;500;700&display=swap","style"]
11
11
  6:X
12
12
  e:X
13
13
  e:C
14
- 0:{"buildId":"pWHUixFDDvANZeAf-shqT","data":[{"rsc":["$","$1","c",{"children":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],null,["$","$L2",null,{"children":["$","$3",null,{"name":"Next.MetadataOutlet","children":"$@4"}]}]]}],"isPartial":"$@5","staleTime":"$6","varyParams":null},{"rsc":["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$L7",null,{"children":[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]}],["$","div",null,{"hidden":true,"children":["$","$L8",null,{"children":["$","$3",null,{"name":"Next.Metadata","children":[["$","title","0",{"children":"Siduri — Local-First Companion"}],["$","meta","1",{"name":"description","content":"Siduri — a local-first companion with explicit memory, grounded knowledge, and optional presence."}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.3rlors1ui1gw9.ico","sizes":"256x256","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"/favicon.ico"}],["$","link","4",{"rel":"icon","href":"/favicon.svg","type":"image/svg+xml"}],["$","link","5",{"rel":"apple-touch-icon","href":"/apple-touch-icon.png"}],["$","$L9","6",{}]]}]}]}],null]}],"isPartial":"$@a","staleTime":"$6","varyParams":null},{"rsc":["$","$1","c",{"children":[null,["$","$Lb",null,{"parallelRouterKey":"children","template":["$","$Lc",null,{}]}]]}],"isPartial":"$@d","staleTime":"$6","varyParams":"$e"},{"rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/0xhe1hasjan-9.css","precedence":"next"}],["$","script","script-0",{"src":"/_next/static/chunks/0uwih7sydv413.js","async":true}]],["$","html",null,{"lang":"en","className":"h-full antialiased dark","children":[["$","head",null,{"children":[["$","link",null,{"rel":"preconnect","href":"https://fonts.googleapis.com"}],["$","link",null,{"rel":"preconnect","href":"https://fonts.gstatic.com","crossOrigin":"anonymous"}],["$","link",null,{"href":"https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&family=Noto+Sans+JP:wght@400;500;700&family=Noto+Serif+JP:wght@400;500;700&display=swap","rel":"stylesheet"}]]}],["$","body",null,{"className":"min-h-full flex flex-col bg-[#0b0b0e] text-[#eee8df] selection:bg-[#d99a68]/30 selection:text-[#f4c28d]","children":["$","$Lb",null,{"parallelRouterKey":"children","template":["$","$Lc",null,{}],"notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$0:data:0:rsc:props:children:0:1:props:style","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$0:data:0:rsc:props:children:0:1:props:children:props:children:1:props:style","children":404}],["$","div",null,{"style":"$0:data:0:rsc:props:children:0:1:props:children:props:children:2:props:style","children":["$","h2",null,{"style":"$0:data:0:rsc:props:children:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]]}]}]]}]]}],"isPartial":"$@f","staleTime":"$6","varyParams":null}],"isUpgradeableISRFallback":false,"a":"$@10","rootVaryParams":null,"needsRuntimeRequest":"$@11"}
14
+ 0:{"buildId":"gZ_ly5hNtyqFVZ9AuHs_A","data":[{"rsc":["$","$1","c",{"children":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],null,["$","$L2",null,{"children":["$","$3",null,{"name":"Next.MetadataOutlet","children":"$@4"}]}]]}],"isPartial":"$@5","staleTime":"$6","varyParams":null},{"rsc":["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$L7",null,{"children":[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]}],["$","div",null,{"hidden":true,"children":["$","$L8",null,{"children":["$","$3",null,{"name":"Next.Metadata","children":[["$","title","0",{"children":"Siduri — Local-First Companion"}],["$","meta","1",{"name":"description","content":"Siduri — a local-first companion with explicit memory, grounded knowledge, and optional presence."}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.3rlors1ui1gw9.ico","sizes":"256x256","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"/favicon.ico"}],["$","link","4",{"rel":"icon","href":"/favicon.svg","type":"image/svg+xml"}],["$","link","5",{"rel":"apple-touch-icon","href":"/apple-touch-icon.png"}],["$","$L9","6",{}]]}]}]}],null]}],"isPartial":"$@a","staleTime":"$6","varyParams":null},{"rsc":["$","$1","c",{"children":[null,["$","$Lb",null,{"parallelRouterKey":"children","template":["$","$Lc",null,{}]}]]}],"isPartial":"$@d","staleTime":"$6","varyParams":"$e"},{"rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/0xhe1hasjan-9.css","precedence":"next"}],["$","script","script-0",{"src":"/_next/static/chunks/30a48dk5bjyhj.js","async":true}]],["$","html",null,{"lang":"en","className":"h-full antialiased dark","children":[["$","head",null,{"children":[["$","link",null,{"rel":"preconnect","href":"https://fonts.googleapis.com"}],["$","link",null,{"rel":"preconnect","href":"https://fonts.gstatic.com","crossOrigin":"anonymous"}],["$","link",null,{"href":"https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&family=Noto+Sans+JP:wght@400;500;700&family=Noto+Serif+JP:wght@400;500;700&display=swap","rel":"stylesheet"}]]}],["$","body",null,{"className":"min-h-full flex flex-col bg-[#0b0b0e] text-[#eee8df] selection:bg-[#d99a68]/30 selection:text-[#f4c28d]","children":["$","$Lb",null,{"parallelRouterKey":"children","template":["$","$Lc",null,{}],"notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$0:data:0:rsc:props:children:0:1:props:style","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$0:data:0:rsc:props:children:0:1:props:children:props:children:1:props:style","children":404}],["$","div",null,{"style":"$0:data:0:rsc:props:children:0:1:props:children:props:children:2:props:style","children":["$","h2",null,{"style":"$0:data:0:rsc:props:children:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]]}]}]]}]]}],"isPartial":"$@f","staleTime":"$6","varyParams":null}],"isUpgradeableISRFallback":false,"a":"$@10","rootVaryParams":null,"needsRuntimeRequest":"$@11"}
15
15
  4:null
16
16
  6:300
17
17
  11:true
@@ -1,3 +1,3 @@
1
1
  :HL["/_next/static/chunks/0xhe1hasjan-9.css","style"]
2
2
  :HL["https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&family=Noto+Sans+JP:wght@400;500;700&family=Noto+Serif+JP:wght@400;500;700&display=swap","style"]
3
- 0:{"tree":{"name":"","param":null,"prefetchHints":4176,"slots":{"children":{"name":"/_not-found","param":null,"prefetchHints":4192,"slots":{"children":{"name":"__PAGE__","param":null,"prefetchHints":4256,"slots":null}}}}},"staleTime":300,"buildId":"pWHUixFDDvANZeAf-shqT"}
3
+ 0:{"tree":{"name":"","param":null,"prefetchHints":4176,"slots":{"children":{"name":"/_not-found","param":null,"prefetchHints":4192,"slots":{"children":{"name":"__PAGE__","param":null,"prefetchHints":4256,"slots":null}}}}},"staleTime":300,"buildId":"gZ_ly5hNtyqFVZ9AuHs_A"}