diff --git a/src/frontend/dist/assets/Qwen3-CHUafU1E.png b/src/frontend/dist/assets/Qwen3-CHUafU1E.png new file mode 100644 index 00000000..53d01bfa Binary files /dev/null and b/src/frontend/dist/assets/Qwen3-CHUafU1E.png differ diff --git a/src/frontend/dist/assets/chat-DTYOBy9Z.js b/src/frontend/dist/assets/chat-QK3nMaK5.js similarity index 99% rename from src/frontend/dist/assets/chat-DTYOBy9Z.js rename to src/frontend/dist/assets/chat-QK3nMaK5.js index 1021d97b..9118f7aa 100644 --- a/src/frontend/dist/assets/chat-DTYOBy9Z.js +++ b/src/frontend/dist/assets/chat-QK3nMaK5.js @@ -1,4 +1,4 @@ -import{a as A,g as N,r as x,u as H,j as a,s as T,c as W,b as z,d as U,m as V,h as Te,q as ze,v as Le,w as I,i as ee,n as Me,x as Re,l as je,S as ne,p as le}from"./index-CKPnC4Q3.js";import{i as Z,b as qe,c as ie,F as $e,u as re,f as te,O as Ae,d as Ne,e as He,S as We,D as Ue,g as Ee,C as De}from"./main-layout-_30RNP4s.js";function Oe(e){return A("MuiFormControl",e)}N("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const Be=e=>{const{classes:r,margin:t,fullWidth:o}=e,s={root:["root",t!=="none"&&`margin${z(t)}`,o&&"fullWidth"]};return U(s,Oe,r)},_e=T("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(e,r)=>{const{ownerState:t}=e;return[r.root,r[`margin${z(t.margin)}`],t.fullWidth&&r.fullWidth]}})({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top",variants:[{props:{margin:"normal"},style:{marginTop:16,marginBottom:8}},{props:{margin:"dense"},style:{marginTop:8,marginBottom:4}},{props:{fullWidth:!0},style:{width:"100%"}}]}),Ke=x.forwardRef(function(r,t){const o=H({props:r,name:"MuiFormControl"}),{children:s,className:l,color:i="primary",component:p="div",disabled:n=!1,error:d=!1,focused:m,fullWidth:b=!1,hiddenLabel:h=!1,margin:g="none",required:f=!1,size:u="medium",variant:c="outlined",...y}=o,P={...o,color:i,component:p,disabled:n,error:d,fullWidth:b,hiddenLabel:h,margin:g,required:f,size:u,variant:c},G=Be(P),[F,J]=x.useState(()=>{let C=!1;return s&&x.Children.forEach(s,v=>{if(!Z(v,["Input","Select"]))return;const j=Z(v,["Select"])?v.props.input:v;j&&qe(j.props)&&(C=!0)}),C}),[E,L]=x.useState(()=>{let C=!1;return s&&x.Children.forEach(s,v=>{Z(v,["Input","Select"])&&(ie(v.props,!0)||ie(v.props.inputProps,!0))&&(C=!0)}),C}),[D,M]=x.useState(!1);n&&D&&M(!1);const O=m!==void 0&&!n?m:D;let B;x.useRef(!1);const _=x.useCallback(()=>{L(!0)},[]),R=x.useCallback(()=>{L(!1)},[]),Q=x.useMemo(()=>({adornedStart:F,setAdornedStart:J,color:i,disabled:n,error:d,filled:E,focused:O,fullWidth:b,hiddenLabel:h,size:u,onBlur:()=>{M(!1)},onFocus:()=>{M(!0)},onEmpty:R,onFilled:_,registerEffect:B,required:f,variant:c}),[F,i,n,d,E,O,b,h,B,R,_,f,u,c]);return a.jsx($e.Provider,{value:Q,children:a.jsx(_e,{as:p,ownerState:P,className:W(G.root,l),ref:t,...y,children:s})})});function Ve(e){return A("MuiFormHelperText",e)}const de=N("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var ce;const Ge=e=>{const{classes:r,contained:t,size:o,disabled:s,error:l,filled:i,focused:p,required:n}=e,d={root:["root",s&&"disabled",l&&"error",o&&`size${z(o)}`,t&&"contained",p&&"focused",i&&"filled",n&&"required"]};return U(d,Ve,r)},Je=T("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,r)=>{const{ownerState:t}=e;return[r.root,t.size&&r[`size${z(t.size)}`],t.contained&&r.contained,t.filled&&r.filled]}})(V(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.caption,textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${de.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${de.error}`]:{color:(e.vars||e).palette.error.main},variants:[{props:{size:"small"},style:{marginTop:4}},{props:({ownerState:r})=>r.contained,style:{marginLeft:14,marginRight:14}}]}))),Qe=x.forwardRef(function(r,t){const o=H({props:r,name:"MuiFormHelperText"}),{children:s,className:l,component:i="p",disabled:p,error:n,filled:d,focused:m,margin:b,required:h,variant:g,...f}=o,u=re(),c=te({props:o,muiFormControl:u,states:["variant","size","disabled","error","filled","focused","required"]}),y={...o,component:i,contained:c.variant==="filled"||c.variant==="outlined",variant:c.variant,size:c.size,disabled:c.disabled,error:c.error,filled:c.filled,focused:c.focused,required:c.required};delete y.ownerState;const P=Ge(y);return a.jsx(Je,{as:i,className:W(P.root,l),ref:t,...f,ownerState:y,children:s===" "?ce||(ce=a.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"})):s})});function Xe(e){return A("MuiFormLabel",e)}const $=N("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),Ye=e=>{const{classes:r,color:t,focused:o,disabled:s,error:l,filled:i,required:p}=e,n={root:["root",`color${z(t)}`,s&&"disabled",l&&"error",i&&"filled",o&&"focused",p&&"required"],asterisk:["asterisk",l&&"error"]};return U(n,Xe,r)},Ze=T("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:(e,r)=>{const{ownerState:t}=e;return[r.root,t.color==="secondary"&&r.colorSecondary,t.filled&&r.filled]}})(V(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.body1,lineHeight:"1.4375em",padding:0,position:"relative",variants:[...Object.entries(e.palette).filter(Te()).map(([r])=>({props:{color:r},style:{[`&.${$.focused}`]:{color:(e.vars||e).palette[r].main}}})),{props:{},style:{[`&.${$.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${$.error}`]:{color:(e.vars||e).palette.error.main}}}]}))),er=T("span",{name:"MuiFormLabel",slot:"Asterisk"})(V(({theme:e})=>({[`&.${$.error}`]:{color:(e.vars||e).palette.error.main}}))),rr=x.forwardRef(function(r,t){const o=H({props:r,name:"MuiFormLabel"}),{children:s,className:l,color:i,component:p="label",disabled:n,error:d,filled:m,focused:b,required:h,...g}=o,f=re(),u=te({props:o,muiFormControl:f,states:["color","required","focused","disabled","error","filled"]}),c={...o,color:u.color||"primary",component:p,disabled:u.disabled,error:u.error,filled:u.filled,focused:u.focused,required:u.required},y=Ye(c);return a.jsxs(Ze,{as:p,ownerState:c,className:W(y.root,l),ref:t,...g,children:[s,u.required&&a.jsxs(er,{ownerState:c,"aria-hidden":!0,className:y.asterisk,children:[" ","*"]})]})});function tr(e){return A("MuiInputLabel",e)}N("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const or=e=>{const{classes:r,formControl:t,size:o,shrink:s,disableAnimation:l,variant:i,required:p}=e,n={root:["root",t&&"formControl",!l&&"animated",s&&"shrink",o&&o!=="medium"&&`size${z(o)}`,i],asterisk:[p&&"asterisk"]},d=U(n,tr,r);return{...r,...d}},sr=T(rr,{shouldForwardProp:e=>ze(e)||e==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(e,r)=>{const{ownerState:t}=e;return[{[`& .${$.asterisk}`]:r.asterisk},r.root,t.formControl&&r.formControl,t.size==="small"&&r.sizeSmall,t.shrink&&r.shrink,!t.disableAnimation&&r.animated,t.focused&&r.focused,r[t.variant]]}})(V(({theme:e})=>({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%",variants:[{props:({ownerState:r})=>r.formControl,style:{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"}},{props:{size:"small"},style:{transform:"translate(0, 17px) scale(1)"}},{props:({ownerState:r})=>r.shrink,style:{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"}},{props:({ownerState:r})=>!r.disableAnimation,style:{transition:e.transitions.create(["color","transform","max-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})}},{props:{variant:"filled"},style:{zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"filled",size:"small"},style:{transform:"translate(12px, 13px) scale(1)"}},{props:({variant:r,ownerState:t})=>r==="filled"&&t.shrink,style:{userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"}},{props:({variant:r,ownerState:t,size:o})=>r==="filled"&&t.shrink&&o==="small",style:{transform:"translate(12px, 4px) scale(0.75)"}},{props:{variant:"outlined"},style:{zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"outlined",size:"small"},style:{transform:"translate(14px, 9px) scale(1)"}},{props:({variant:r,ownerState:t})=>r==="outlined"&&t.shrink,style:{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}}]}))),ar=x.forwardRef(function(r,t){const o=H({name:"MuiInputLabel",props:r}),{disableAnimation:s=!1,margin:l,shrink:i,variant:p,className:n,...d}=o,m=re();let b=i;typeof b>"u"&&m&&(b=m.filled||m.focused||m.adornedStart);const h=te({props:o,muiFormControl:m,states:["size","variant","required","focused"]}),g={...o,disableAnimation:s,formControl:m,shrink:b,size:h.size,variant:h.variant,required:h.required,focused:h.focused},f=or(g);return a.jsx(sr,{"data-shrink":b,ref:t,className:W(f.root,n),...d,ownerState:g,classes:f})});function nr(e){return A("MuiTextField",e)}N("MuiTextField",["root"]);const lr={standard:He,filled:Ne,outlined:Ae},ir=e=>{const{classes:r}=e;return U({root:["root"]},nr,r)},dr=T(Ke,{name:"MuiTextField",slot:"Root"})({}),cr=x.forwardRef(function(r,t){const o=H({props:r,name:"MuiTextField"}),{autoComplete:s,autoFocus:l=!1,children:i,className:p,color:n="primary",defaultValue:d,disabled:m=!1,error:b=!1,FormHelperTextProps:h,fullWidth:g=!1,helperText:f,id:u,InputLabelProps:c,inputProps:y,InputProps:P,inputRef:G,label:F,maxRows:J,minRows:E,multiline:L=!1,name:D,onBlur:M,onChange:O,onFocus:B,placeholder:_,required:R=!1,rows:Q,select:C=!1,SelectProps:v,slots:j={},slotProps:pe={},type:ue,value:oe,variant:K="outlined",...me}=o,S={...o,autoFocus:l,color:n,disabled:m,error:b,fullWidth:g,multiline:L,required:R,select:C,variant:K},fe=ir(S),k=Le(u),X=f&&k?`${k}-helper-text`:void 0,se=F&&k?`${k}-label`:void 0,xe=lr[K],w={slots:j,slotProps:{input:P,inputLabel:c,htmlInput:y,formHelperText:h,select:v,...pe}},q={},Y=w.slotProps.inputLabel;K==="outlined"&&(Y&&typeof Y.shrink<"u"&&(q.notched=Y.shrink),q.label=F),C&&((!v||!v.native)&&(q.id=void 0),q["aria-describedby"]=void 0);const[be,he]=I("root",{elementType:dr,shouldForwardComponentProp:!0,externalForwardedProps:{...w,...me},ownerState:S,className:W(fe.root,p),ref:t,additionalProps:{disabled:m,error:b,fullWidth:g,required:R,color:n,variant:K}}),[ve,ge]=I("input",{elementType:xe,externalForwardedProps:w,additionalProps:q,ownerState:S}),[ye,Ce]=I("inputLabel",{elementType:ar,externalForwardedProps:w,ownerState:S}),[Fe,Se]=I("htmlInput",{elementType:"input",externalForwardedProps:w,ownerState:S}),[ke,we]=I("formHelperText",{elementType:Qe,externalForwardedProps:w,ownerState:S}),[Pe,Ie]=I("select",{elementType:We,externalForwardedProps:w,ownerState:S}),ae=a.jsx(ve,{"aria-describedby":X,autoComplete:s,autoFocus:l,defaultValue:d,fullWidth:g,multiline:L,name:D,rows:Q,maxRows:J,minRows:E,type:ue,value:oe,id:k,inputRef:G,onBlur:M,onChange:O,onFocus:B,placeholder:_,inputProps:Se,slots:{input:j.htmlInput?Fe:void 0},...ge});return a.jsxs(be,{...he,children:[F!=null&&F!==""&&a.jsx(ye,{htmlFor:k,id:se,...Ce,children:F}),C?a.jsx(Pe,{"aria-describedby":X,id:k,labelId:se,value:oe,input:ae,...Ie,children:i}):ae,f&&a.jsx(ke,{id:X,...we,children:f})]})});/** +import{a as A,g as N,r as x,u as H,j as a,s as T,c as W,b as z,d as U,m as V,h as Te,q as ze,v as Le,w as I,i as ee,n as Me,x as Re,l as je,S as ne,p as le}from"./index-2agzu340.js";import{i as Z,b as qe,c as ie,F as $e,u as re,f as te,O as Ae,d as Ne,e as He,S as We,D as Ue,g as Ee,C as De}from"./main-layout-BwvpTOaC.js";function Oe(e){return A("MuiFormControl",e)}N("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const Be=e=>{const{classes:r,margin:t,fullWidth:o}=e,s={root:["root",t!=="none"&&`margin${z(t)}`,o&&"fullWidth"]};return U(s,Oe,r)},_e=T("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(e,r)=>{const{ownerState:t}=e;return[r.root,r[`margin${z(t.margin)}`],t.fullWidth&&r.fullWidth]}})({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top",variants:[{props:{margin:"normal"},style:{marginTop:16,marginBottom:8}},{props:{margin:"dense"},style:{marginTop:8,marginBottom:4}},{props:{fullWidth:!0},style:{width:"100%"}}]}),Ke=x.forwardRef(function(r,t){const o=H({props:r,name:"MuiFormControl"}),{children:s,className:l,color:i="primary",component:p="div",disabled:n=!1,error:d=!1,focused:m,fullWidth:b=!1,hiddenLabel:h=!1,margin:g="none",required:f=!1,size:u="medium",variant:c="outlined",...y}=o,P={...o,color:i,component:p,disabled:n,error:d,fullWidth:b,hiddenLabel:h,margin:g,required:f,size:u,variant:c},G=Be(P),[F,J]=x.useState(()=>{let C=!1;return s&&x.Children.forEach(s,v=>{if(!Z(v,["Input","Select"]))return;const j=Z(v,["Select"])?v.props.input:v;j&&qe(j.props)&&(C=!0)}),C}),[E,L]=x.useState(()=>{let C=!1;return s&&x.Children.forEach(s,v=>{Z(v,["Input","Select"])&&(ie(v.props,!0)||ie(v.props.inputProps,!0))&&(C=!0)}),C}),[D,M]=x.useState(!1);n&&D&&M(!1);const O=m!==void 0&&!n?m:D;let B;x.useRef(!1);const _=x.useCallback(()=>{L(!0)},[]),R=x.useCallback(()=>{L(!1)},[]),Q=x.useMemo(()=>({adornedStart:F,setAdornedStart:J,color:i,disabled:n,error:d,filled:E,focused:O,fullWidth:b,hiddenLabel:h,size:u,onBlur:()=>{M(!1)},onFocus:()=>{M(!0)},onEmpty:R,onFilled:_,registerEffect:B,required:f,variant:c}),[F,i,n,d,E,O,b,h,B,R,_,f,u,c]);return a.jsx($e.Provider,{value:Q,children:a.jsx(_e,{as:p,ownerState:P,className:W(G.root,l),ref:t,...y,children:s})})});function Ve(e){return A("MuiFormHelperText",e)}const de=N("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var ce;const Ge=e=>{const{classes:r,contained:t,size:o,disabled:s,error:l,filled:i,focused:p,required:n}=e,d={root:["root",s&&"disabled",l&&"error",o&&`size${z(o)}`,t&&"contained",p&&"focused",i&&"filled",n&&"required"]};return U(d,Ve,r)},Je=T("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,r)=>{const{ownerState:t}=e;return[r.root,t.size&&r[`size${z(t.size)}`],t.contained&&r.contained,t.filled&&r.filled]}})(V(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.caption,textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${de.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${de.error}`]:{color:(e.vars||e).palette.error.main},variants:[{props:{size:"small"},style:{marginTop:4}},{props:({ownerState:r})=>r.contained,style:{marginLeft:14,marginRight:14}}]}))),Qe=x.forwardRef(function(r,t){const o=H({props:r,name:"MuiFormHelperText"}),{children:s,className:l,component:i="p",disabled:p,error:n,filled:d,focused:m,margin:b,required:h,variant:g,...f}=o,u=re(),c=te({props:o,muiFormControl:u,states:["variant","size","disabled","error","filled","focused","required"]}),y={...o,component:i,contained:c.variant==="filled"||c.variant==="outlined",variant:c.variant,size:c.size,disabled:c.disabled,error:c.error,filled:c.filled,focused:c.focused,required:c.required};delete y.ownerState;const P=Ge(y);return a.jsx(Je,{as:i,className:W(P.root,l),ref:t,...f,ownerState:y,children:s===" "?ce||(ce=a.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"})):s})});function Xe(e){return A("MuiFormLabel",e)}const $=N("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),Ye=e=>{const{classes:r,color:t,focused:o,disabled:s,error:l,filled:i,required:p}=e,n={root:["root",`color${z(t)}`,s&&"disabled",l&&"error",i&&"filled",o&&"focused",p&&"required"],asterisk:["asterisk",l&&"error"]};return U(n,Xe,r)},Ze=T("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:(e,r)=>{const{ownerState:t}=e;return[r.root,t.color==="secondary"&&r.colorSecondary,t.filled&&r.filled]}})(V(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.body1,lineHeight:"1.4375em",padding:0,position:"relative",variants:[...Object.entries(e.palette).filter(Te()).map(([r])=>({props:{color:r},style:{[`&.${$.focused}`]:{color:(e.vars||e).palette[r].main}}})),{props:{},style:{[`&.${$.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${$.error}`]:{color:(e.vars||e).palette.error.main}}}]}))),er=T("span",{name:"MuiFormLabel",slot:"Asterisk"})(V(({theme:e})=>({[`&.${$.error}`]:{color:(e.vars||e).palette.error.main}}))),rr=x.forwardRef(function(r,t){const o=H({props:r,name:"MuiFormLabel"}),{children:s,className:l,color:i,component:p="label",disabled:n,error:d,filled:m,focused:b,required:h,...g}=o,f=re(),u=te({props:o,muiFormControl:f,states:["color","required","focused","disabled","error","filled"]}),c={...o,color:u.color||"primary",component:p,disabled:u.disabled,error:u.error,filled:u.filled,focused:u.focused,required:u.required},y=Ye(c);return a.jsxs(Ze,{as:p,ownerState:c,className:W(y.root,l),ref:t,...g,children:[s,u.required&&a.jsxs(er,{ownerState:c,"aria-hidden":!0,className:y.asterisk,children:[" ","*"]})]})});function tr(e){return A("MuiInputLabel",e)}N("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const or=e=>{const{classes:r,formControl:t,size:o,shrink:s,disableAnimation:l,variant:i,required:p}=e,n={root:["root",t&&"formControl",!l&&"animated",s&&"shrink",o&&o!=="medium"&&`size${z(o)}`,i],asterisk:[p&&"asterisk"]},d=U(n,tr,r);return{...r,...d}},sr=T(rr,{shouldForwardProp:e=>ze(e)||e==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(e,r)=>{const{ownerState:t}=e;return[{[`& .${$.asterisk}`]:r.asterisk},r.root,t.formControl&&r.formControl,t.size==="small"&&r.sizeSmall,t.shrink&&r.shrink,!t.disableAnimation&&r.animated,t.focused&&r.focused,r[t.variant]]}})(V(({theme:e})=>({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%",variants:[{props:({ownerState:r})=>r.formControl,style:{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"}},{props:{size:"small"},style:{transform:"translate(0, 17px) scale(1)"}},{props:({ownerState:r})=>r.shrink,style:{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"}},{props:({ownerState:r})=>!r.disableAnimation,style:{transition:e.transitions.create(["color","transform","max-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})}},{props:{variant:"filled"},style:{zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"filled",size:"small"},style:{transform:"translate(12px, 13px) scale(1)"}},{props:({variant:r,ownerState:t})=>r==="filled"&&t.shrink,style:{userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"}},{props:({variant:r,ownerState:t,size:o})=>r==="filled"&&t.shrink&&o==="small",style:{transform:"translate(12px, 4px) scale(0.75)"}},{props:{variant:"outlined"},style:{zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"outlined",size:"small"},style:{transform:"translate(14px, 9px) scale(1)"}},{props:({variant:r,ownerState:t})=>r==="outlined"&&t.shrink,style:{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}}]}))),ar=x.forwardRef(function(r,t){const o=H({name:"MuiInputLabel",props:r}),{disableAnimation:s=!1,margin:l,shrink:i,variant:p,className:n,...d}=o,m=re();let b=i;typeof b>"u"&&m&&(b=m.filled||m.focused||m.adornedStart);const h=te({props:o,muiFormControl:m,states:["size","variant","required","focused"]}),g={...o,disableAnimation:s,formControl:m,shrink:b,size:h.size,variant:h.variant,required:h.required,focused:h.focused},f=or(g);return a.jsx(sr,{"data-shrink":b,ref:t,className:W(f.root,n),...d,ownerState:g,classes:f})});function nr(e){return A("MuiTextField",e)}N("MuiTextField",["root"]);const lr={standard:He,filled:Ne,outlined:Ae},ir=e=>{const{classes:r}=e;return U({root:["root"]},nr,r)},dr=T(Ke,{name:"MuiTextField",slot:"Root"})({}),cr=x.forwardRef(function(r,t){const o=H({props:r,name:"MuiTextField"}),{autoComplete:s,autoFocus:l=!1,children:i,className:p,color:n="primary",defaultValue:d,disabled:m=!1,error:b=!1,FormHelperTextProps:h,fullWidth:g=!1,helperText:f,id:u,InputLabelProps:c,inputProps:y,InputProps:P,inputRef:G,label:F,maxRows:J,minRows:E,multiline:L=!1,name:D,onBlur:M,onChange:O,onFocus:B,placeholder:_,required:R=!1,rows:Q,select:C=!1,SelectProps:v,slots:j={},slotProps:pe={},type:ue,value:oe,variant:K="outlined",...me}=o,S={...o,autoFocus:l,color:n,disabled:m,error:b,fullWidth:g,multiline:L,required:R,select:C,variant:K},fe=ir(S),k=Le(u),X=f&&k?`${k}-helper-text`:void 0,se=F&&k?`${k}-label`:void 0,xe=lr[K],w={slots:j,slotProps:{input:P,inputLabel:c,htmlInput:y,formHelperText:h,select:v,...pe}},q={},Y=w.slotProps.inputLabel;K==="outlined"&&(Y&&typeof Y.shrink<"u"&&(q.notched=Y.shrink),q.label=F),C&&((!v||!v.native)&&(q.id=void 0),q["aria-describedby"]=void 0);const[be,he]=I("root",{elementType:dr,shouldForwardComponentProp:!0,externalForwardedProps:{...w,...me},ownerState:S,className:W(fe.root,p),ref:t,additionalProps:{disabled:m,error:b,fullWidth:g,required:R,color:n,variant:K}}),[ve,ge]=I("input",{elementType:xe,externalForwardedProps:w,additionalProps:q,ownerState:S}),[ye,Ce]=I("inputLabel",{elementType:ar,externalForwardedProps:w,ownerState:S}),[Fe,Se]=I("htmlInput",{elementType:"input",externalForwardedProps:w,ownerState:S}),[ke,we]=I("formHelperText",{elementType:Qe,externalForwardedProps:w,ownerState:S}),[Pe,Ie]=I("select",{elementType:We,externalForwardedProps:w,ownerState:S}),ae=a.jsx(ve,{"aria-describedby":X,autoComplete:s,autoFocus:l,defaultValue:d,fullWidth:g,multiline:L,name:D,rows:Q,maxRows:J,minRows:E,type:ue,value:oe,id:k,inputRef:G,onBlur:M,onChange:O,onFocus:B,placeholder:_,inputProps:Se,slots:{input:j.htmlInput?Fe:void 0},...ge});return a.jsxs(be,{...he,children:[F!=null&&F!==""&&a.jsx(ye,{htmlFor:k,id:se,...Ce,children:F}),C?a.jsx(Pe,{"aria-describedby":X,id:k,labelId:se,value:oe,input:ae,...Ie,children:i}):ae,f&&a.jsx(ke,{id:X,...we,children:f})]})});/** * @license @tabler/icons-react v3.35.0 - MIT * * This source code is licensed under the MIT license. diff --git a/src/frontend/dist/assets/index-2agzu340.js b/src/frontend/dist/assets/index-2agzu340.js new file mode 100644 index 00000000..791efad1 --- /dev/null +++ b/src/frontend/dist/assets/index-2agzu340.js @@ -0,0 +1,320 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/setup-Ner6L8JU.js","assets/main-layout-BwvpTOaC.js","assets/main-layout-DVneG3Rq.css","assets/join-COUGJOTN.js","assets/chat-QK3nMaK5.js"])))=>i.map(i=>d[i]); +function _2(n,r){for(var l=0;lo[s]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))o(s);new MutationObserver(s=>{for(const c of s)if(c.type==="childList")for(const d of c.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&o(d)}).observe(document,{childList:!0,subtree:!0});function l(s){const c={};return s.integrity&&(c.integrity=s.integrity),s.referrerPolicy&&(c.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?c.credentials="include":s.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function o(s){if(s.ep)return;s.ep=!0;const c=l(s);fetch(s.href,c)}})();function La(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Mf={exports:{}},yl={};/** + * @license React + * react-jsx-runtime.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var eg;function k2(){if(eg)return yl;eg=1;var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function l(o,s,c){var d=null;if(c!==void 0&&(d=""+c),s.key!==void 0&&(d=""+s.key),"key"in s){c={};for(var h in s)h!=="key"&&(c[h]=s[h])}else c=s;return s=c.ref,{$$typeof:n,type:o,key:d,ref:s!==void 0?s:null,props:c}}return yl.Fragment=r,yl.jsx=l,yl.jsxs=l,yl}var tg;function z2(){return tg||(tg=1,Mf.exports=k2()),Mf.exports}var ee=z2(),wf={exports:{}},ye={};/** + * @license React + * react.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var ng;function $2(){if(ng)return ye;ng=1;var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),d=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),b=Symbol.iterator;function E(w){return w===null||typeof w!="object"?null:(w=b&&w[b]||w["@@iterator"],typeof w=="function"?w:null)}var A={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},T=Object.assign,C={};function M(w,V,re){this.props=w,this.context=V,this.refs=C,this.updater=re||A}M.prototype.isReactComponent={},M.prototype.setState=function(w,V){if(typeof w!="object"&&typeof w!="function"&&w!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,w,V,"setState")},M.prototype.forceUpdate=function(w){this.updater.enqueueForceUpdate(this,w,"forceUpdate")};function D(){}D.prototype=M.prototype;function _(w,V,re){this.props=w,this.context=V,this.refs=C,this.updater=re||A}var $=_.prototype=new D;$.constructor=_,T($,M.prototype),$.isPureReactComponent=!0;var B=Array.isArray,k={H:null,A:null,T:null,S:null,V:null},L=Object.prototype.hasOwnProperty;function q(w,V,re,ie,oe,fe){return re=fe.ref,{$$typeof:n,type:w,key:V,ref:re!==void 0?re:null,props:fe}}function F(w,V){return q(w.type,V,void 0,void 0,void 0,w.props)}function K(w){return typeof w=="object"&&w!==null&&w.$$typeof===n}function G(w){var V={"=":"=0",":":"=2"};return"$"+w.replace(/[=:]/g,function(re){return V[re]})}var I=/\/+/g;function S(w,V){return typeof w=="object"&&w!==null&&w.key!=null?G(""+w.key):V.toString(36)}function ne(){}function H(w){switch(w.status){case"fulfilled":return w.value;case"rejected":throw w.reason;default:switch(typeof w.status=="string"?w.then(ne,ne):(w.status="pending",w.then(function(V){w.status==="pending"&&(w.status="fulfilled",w.value=V)},function(V){w.status==="pending"&&(w.status="rejected",w.reason=V)})),w.status){case"fulfilled":return w.value;case"rejected":throw w.reason}}throw w}function X(w,V,re,ie,oe){var fe=typeof w;(fe==="undefined"||fe==="boolean")&&(w=null);var se=!1;if(w===null)se=!0;else switch(fe){case"bigint":case"string":case"number":se=!0;break;case"object":switch(w.$$typeof){case n:case r:se=!0;break;case y:return se=w._init,X(se(w._payload),V,re,ie,oe)}}if(se)return oe=oe(w),se=ie===""?"."+S(w,0):ie,B(oe)?(re="",se!=null&&(re=se.replace(I,"$&/")+"/"),X(oe,V,re,"",function(Qe){return Qe})):oe!=null&&(K(oe)&&(oe=F(oe,re+(oe.key==null||w&&w.key===oe.key?"":(""+oe.key).replace(I,"$&/")+"/")+se)),V.push(oe)),1;se=0;var Oe=ie===""?".":ie+":";if(B(w))for(var Se=0;Se>>1,w=O[le];if(0>>1;les(ie,Q))oes(fe,ie)?(O[le]=fe,O[oe]=Q,le=oe):(O[le]=ie,O[re]=Q,le=re);else if(oes(fe,Q))O[le]=fe,O[oe]=Q,le=oe;else break e}}return Y}function s(O,Y){var Q=O.sortIndex-Y.sortIndex;return Q!==0?Q:O.id-Y.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;n.unstable_now=function(){return c.now()}}else{var d=Date,h=d.now();n.unstable_now=function(){return d.now()-h}}var p=[],m=[],y=1,b=null,E=3,A=!1,T=!1,C=!1,M=!1,D=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,$=typeof setImmediate<"u"?setImmediate:null;function B(O){for(var Y=l(m);Y!==null;){if(Y.callback===null)o(m);else if(Y.startTime<=O)o(m),Y.sortIndex=Y.expirationTime,r(p,Y);else break;Y=l(m)}}function k(O){if(C=!1,B(O),!T)if(l(p)!==null)T=!0,L||(L=!0,S());else{var Y=l(m);Y!==null&&X(k,Y.startTime-O)}}var L=!1,q=-1,F=5,K=-1;function G(){return M?!0:!(n.unstable_now()-KO&&G());){var le=b.callback;if(typeof le=="function"){b.callback=null,E=b.priorityLevel;var w=le(b.expirationTime<=O);if(O=n.unstable_now(),typeof w=="function"){b.callback=w,B(O),Y=!0;break t}b===l(p)&&o(p),B(O)}else o(p);b=l(p)}if(b!==null)Y=!0;else{var V=l(m);V!==null&&X(k,V.startTime-O),Y=!1}}break e}finally{b=null,E=Q,A=!1}Y=void 0}}finally{Y?S():L=!1}}}var S;if(typeof $=="function")S=function(){$(I)};else if(typeof MessageChannel<"u"){var ne=new MessageChannel,H=ne.port2;ne.port1.onmessage=I,S=function(){H.postMessage(null)}}else S=function(){D(I,0)};function X(O,Y){q=D(function(){O(n.unstable_now())},Y)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(O){O.callback=null},n.unstable_forceFrameRate=function(O){0>O||125le?(O.sortIndex=Q,r(m,O),l(p)===null&&O===l(m)&&(C?(_(q),q=-1):C=!0,X(k,Q-le))):(O.sortIndex=w,r(p,O),T||A||(T=!0,L||(L=!0,S()))),O},n.unstable_shouldYield=G,n.unstable_wrapCallback=function(O){var Y=E;return function(){var Q=E;E=Y;try{return O.apply(this,arguments)}finally{E=Q}}}})(Rf)),Rf}var ig;function L2(){return ig||(ig=1,Of.exports=N2()),Of.exports}var Df={exports:{}},kt={};/** + * @license React + * react-dom.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var lg;function B2(){if(lg)return kt;lg=1;var n=Rd();function r(p){var m="https://react.dev/errors/"+p;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(r){console.error(r)}}return n(),Df.exports=B2(),Df.exports}/** + * @license React + * react-dom-client.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var ug;function j2(){if(ug)return vl;ug=1;var n=L2(),r=Rd(),l=jy();function o(e){var t="https://react.dev/errors/"+e;if(1w||(e.current=le[w],le[w]=null,w--)}function ie(e,t){w++,le[w]=e.current,e.current=t}var oe=V(null),fe=V(null),se=V(null),Oe=V(null);function Se(e,t){switch(ie(se,t),ie(fe,e),ie(oe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?O0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=O0(t),e=R0(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}re(oe),ie(oe,e)}function Qe(){re(oe),re(fe),re(se)}function Xe(e){e.memoizedState!==null&&ie(Oe,e);var t=oe.current,a=R0(t,e.type);t!==a&&(ie(fe,e),ie(oe,a))}function lt(e){fe.current===e&&(re(oe),re(fe)),Oe.current===e&&(re(Oe),dl._currentValue=Q)}var vt=Object.prototype.hasOwnProperty,Mt=n.unstable_scheduleCallback,$t=n.unstable_cancelCallback,yn=n.unstable_shouldYield,Un=n.unstable_requestPaint,Je=n.unstable_now,Nt=n.unstable_getCurrentPriorityLevel,ft=n.unstable_ImmediatePriority,vn=n.unstable_UserBlockingPriority,wn=n.unstable_NormalPriority,pe=n.unstable_LowPriority,Kl=n.unstable_IdlePriority,Wl=n.log,Fl=n.unstable_setDisableYieldValue,bt=null,Ee=null;function ot(e){if(typeof Wl=="function"&&Fl(e),Ee&&typeof Ee.setStrictMode=="function")try{Ee.setStrictMode(bt,e)}catch{}}var Ie=Math.clz32?Math.clz32:y1,Si=Math.log,ds=Math.LN2;function y1(e){return e>>>=0,e===0?32:31-(Si(e)/ds|0)|0}var Jl=256,eo=4194304;function Ua(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function to(e,t,a){var i=e.pendingLanes;if(i===0)return 0;var u=0,f=e.suspendedLanes,g=e.pingedLanes;e=e.warmLanes;var v=i&134217727;return v!==0?(i=v&~f,i!==0?u=Ua(i):(g&=v,g!==0?u=Ua(g):a||(a=v&~e,a!==0&&(u=Ua(a))))):(v=i&~f,v!==0?u=Ua(v):g!==0?u=Ua(g):a||(a=i&~e,a!==0&&(u=Ua(a)))),u===0?0:t!==0&&t!==u&&(t&f)===0&&(f=u&-u,a=t&-t,f>=a||f===32&&(a&4194048)!==0)?t:u}function xi(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function v1(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function fh(){var e=Jl;return Jl<<=1,(Jl&4194048)===0&&(Jl=256),e}function dh(){var e=eo;return eo<<=1,(eo&62914560)===0&&(eo=4194304),e}function hs(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function Ci(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function b1(e,t,a,i,u,f){var g=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var v=e.entanglements,R=e.expirationTimes,U=e.hiddenUpdates;for(a=g&~a;0)":-1u||R[i]!==U[u]){var J=` +`+R[i].replace(" at new "," at ");return e.displayName&&J.includes("")&&(J=J.replace("",e.displayName)),J}while(1<=i&&0<=u);break}}}finally{bs=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?xr(a):""}function M1(e){switch(e.tag){case 26:case 27:case 5:return xr(e.type);case 16:return xr("Lazy");case 13:return xr("Suspense");case 19:return xr("SuspenseList");case 0:case 15:return Ss(e.type,!1);case 11:return Ss(e.type.render,!1);case 1:return Ss(e.type,!0);case 31:return xr("Activity");default:return""}}function Ch(e){try{var t="";do t+=M1(e),e=e.return;while(e);return t}catch(a){return` +Error generating stack: `+a.message+` +`+a.stack}}function an(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Eh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function w1(e){var t=Eh(e)?"checked":"value",a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),i=""+e[t];if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var u=a.get,f=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return u.call(this)},set:function(g){i=""+g,f.call(this,g)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return i},setValue:function(g){i=""+g},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ro(e){e._valueTracker||(e._valueTracker=w1(e))}function Th(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),i="";return e&&(i=Eh(e)?e.checked?"true":"false":e.value),e=i,e!==a?(t.setValue(e),!0):!1}function io(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var A1=/[\n"\\]/g;function rn(e){return e.replace(A1,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function xs(e,t,a,i,u,f,g,v){e.name="",g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"?e.type=g:e.removeAttribute("type"),t!=null?g==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+an(t)):e.value!==""+an(t)&&(e.value=""+an(t)):g!=="submit"&&g!=="reset"||e.removeAttribute("value"),t!=null?Cs(e,g,an(t)):a!=null?Cs(e,g,an(a)):i!=null&&e.removeAttribute("value"),u==null&&f!=null&&(e.defaultChecked=!!f),u!=null&&(e.checked=u&&typeof u!="function"&&typeof u!="symbol"),v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?e.name=""+an(v):e.removeAttribute("name")}function Mh(e,t,a,i,u,f,g,v){if(f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.type=f),t!=null||a!=null){if(!(f!=="submit"&&f!=="reset"||t!=null))return;a=a!=null?""+an(a):"",t=t!=null?""+an(t):a,v||t===e.value||(e.value=t),e.defaultValue=t}i=i??u,i=typeof i!="function"&&typeof i!="symbol"&&!!i,e.checked=v?e.checked:!!i,e.defaultChecked=!!i,g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(e.name=g)}function Cs(e,t,a){t==="number"&&io(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function Cr(e,t,a,i){if(e=e.options,t){t={};for(var u=0;u"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),As=!1;if(Yn)try{var wi={};Object.defineProperty(wi,"passive",{get:function(){As=!0}}),window.addEventListener("test",wi,wi),window.removeEventListener("test",wi,wi)}catch{As=!1}var ca=null,Os=null,oo=null;function kh(){if(oo)return oo;var e,t=Os,a=t.length,i,u="value"in ca?ca.value:ca.textContent,f=u.length;for(e=0;e=Ri),jh=" ",Uh=!1;function Hh(e,t){switch(e){case"keyup":return tb.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Yh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var wr=!1;function ab(e,t){switch(e){case"compositionend":return Yh(t);case"keypress":return t.which!==32?null:(Uh=!0,jh);case"textInput":return e=t.data,e===jh&&Uh?null:e;default:return null}}function rb(e,t){if(wr)return e==="compositionend"||!zs&&Hh(e,t)?(e=kh(),oo=Os=ca=null,wr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:a,offset:t-e};e=i}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Ih(a)}}function Wh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Wh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Fh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=io(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=io(e.document)}return t}function Ls(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var db=Yn&&"documentMode"in document&&11>=document.documentMode,Ar=null,Bs=null,zi=null,js=!1;function Jh(e,t,a){var i=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;js||Ar==null||Ar!==io(i)||(i=Ar,"selectionStart"in i&&Ls(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),zi&&ki(zi,i)||(zi=i,i=Fo(Bs,"onSelect"),0>=g,u-=g,Gn=1<<32-Ie(t)+u|a<f?f:8;var g=O.T,v={};O.T=v,Ec(e,!1,t,a);try{var R=u(),U=O.S;if(U!==null&&U(v,R),R!==null&&typeof R=="object"&&typeof R.then=="function"){var J=xb(R,i);Qi(e,t,J,Wt(e))}else Qi(e,t,i,Wt(e))}catch(ae){Qi(e,t,{then:function(){},status:"rejected",reason:ae},Wt())}finally{Y.p=f,O.T=g}}function wb(){}function xc(e,t,a,i){if(e.tag!==5)throw Error(o(476));var u=ep(e).queue;Jm(e,u,t,Q,a===null?wb:function(){return tp(e),a(i)})}function ep(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Q,baseState:Q,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zn,lastRenderedState:Q},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zn,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function tp(e){var t=ep(e).next.queue;Qi(e,t,{},Wt())}function Cc(){return _t(dl)}function np(){return ht().memoizedState}function ap(){return ht().memoizedState}function Ab(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=Wt();e=ha(a);var i=ma(t,e,a);i!==null&&(Ft(i,t,a),qi(i,t,a)),t={cache:Fs()},e.payload=t;return}t=t.return}}function Ob(e,t,a){var i=Wt();a={lane:i,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null},ko(e)?ip(t,a):(a=qs(e,t,a,i),a!==null&&(Ft(a,e,i),lp(a,t,i)))}function rp(e,t,a){var i=Wt();Qi(e,t,a,i)}function Qi(e,t,a,i){var u={lane:i,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null};if(ko(e))ip(t,u);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=t.lastRenderedReducer,f!==null))try{var g=t.lastRenderedState,v=f(g,a);if(u.hasEagerState=!0,u.eagerState=v,Xt(v,g))return po(e,t,u,0),Pe===null&&mo(),!1}catch{}finally{}if(a=qs(e,t,u,i),a!==null)return Ft(a,e,i),lp(a,t,i),!0}return!1}function Ec(e,t,a,i){if(i={lane:2,revertLane:tf(),action:i,hasEagerState:!1,eagerState:null,next:null},ko(e)){if(t)throw Error(o(479))}else t=qs(e,a,i,2),t!==null&&Ft(t,e,2)}function ko(e){var t=e.alternate;return e===ve||t!==null&&t===ve}function ip(e,t){Br=wo=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function lp(e,t,a){if((a&4194048)!==0){var i=t.lanes;i&=e.pendingLanes,a|=i,t.lanes=a,mh(e,a)}}var zo={readContext:_t,use:Oo,useCallback:ut,useContext:ut,useEffect:ut,useImperativeHandle:ut,useLayoutEffect:ut,useInsertionEffect:ut,useMemo:ut,useReducer:ut,useRef:ut,useState:ut,useDebugValue:ut,useDeferredValue:ut,useTransition:ut,useSyncExternalStore:ut,useId:ut,useHostTransitionStatus:ut,useFormState:ut,useActionState:ut,useOptimistic:ut,useMemoCache:ut,useCacheRefresh:ut},op={readContext:_t,use:Oo,useCallback:function(e,t){return Yt().memoizedState=[e,t===void 0?null:t],e},useContext:_t,useEffect:Vm,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,_o(4194308,4,Qm.bind(null,t,e),a)},useLayoutEffect:function(e,t){return _o(4194308,4,e,t)},useInsertionEffect:function(e,t){_o(4,2,e,t)},useMemo:function(e,t){var a=Yt();t=t===void 0?null:t;var i=e();if(Fa){ot(!0);try{e()}finally{ot(!1)}}return a.memoizedState=[i,t],i},useReducer:function(e,t,a){var i=Yt();if(a!==void 0){var u=a(t);if(Fa){ot(!0);try{a(t)}finally{ot(!1)}}}else u=t;return i.memoizedState=i.baseState=u,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:u},i.queue=e,e=e.dispatch=Ob.bind(null,ve,e),[i.memoizedState,e]},useRef:function(e){var t=Yt();return e={current:e},t.memoizedState=e},useState:function(e){e=yc(e);var t=e.queue,a=rp.bind(null,ve,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:bc,useDeferredValue:function(e,t){var a=Yt();return Sc(a,e,t)},useTransition:function(){var e=yc(!1);return e=Jm.bind(null,ve,e.queue,!0,!1),Yt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var i=ve,u=Yt();if(De){if(a===void 0)throw Error(o(407));a=a()}else{if(a=t(),Pe===null)throw Error(o(349));(Te&124)!==0||Om(i,t,a)}u.memoizedState=a;var f={value:a,getSnapshot:t};return u.queue=f,Vm(Dm.bind(null,i,f,e),[e]),i.flags|=2048,Ur(9,Do(),Rm.bind(null,i,f,a,t),null),a},useId:function(){var e=Yt(),t=Pe.identifierPrefix;if(De){var a=Vn,i=Gn;a=(i&~(1<<32-Ie(i)-1)).toString(32)+a,t="«"+t+"R"+a,a=Ao++,0he?(Et=ce,ce=null):Et=ce.sibling;var Re=P(N,ce,j[he],te);if(Re===null){ce===null&&(ce=Et);break}e&&ce&&Re.alternate===null&&t(N,ce),z=f(Re,z,he),be===null?ue=Re:be.sibling=Re,be=Re,ce=Et}if(he===j.length)return a(N,ce),De&&Xa(N,he),ue;if(ce===null){for(;hehe?(Et=ce,ce=null):Et=ce.sibling;var _a=P(N,ce,Re.value,te);if(_a===null){ce===null&&(ce=Et);break}e&&ce&&_a.alternate===null&&t(N,ce),z=f(_a,z,he),be===null?ue=_a:be.sibling=_a,be=_a,ce=Et}if(Re.done)return a(N,ce),De&&Xa(N,he),ue;if(ce===null){for(;!Re.done;he++,Re=j.next())Re=ae(N,Re.value,te),Re!==null&&(z=f(Re,z,he),be===null?ue=Re:be.sibling=Re,be=Re);return De&&Xa(N,he),ue}for(ce=i(ce);!Re.done;he++,Re=j.next())Re=Z(ce,N,he,Re.value,te),Re!==null&&(e&&Re.alternate!==null&&ce.delete(Re.key===null?he:Re.key),z=f(Re,z,he),be===null?ue=Re:be.sibling=Re,be=Re);return e&&ce.forEach(function(D2){return t(N,D2)}),De&&Xa(N,he),ue}function Ye(N,z,j,te){if(typeof j=="object"&&j!==null&&j.type===T&&j.key===null&&(j=j.props.children),typeof j=="object"&&j!==null){switch(j.$$typeof){case E:e:{for(var ue=j.key;z!==null;){if(z.key===ue){if(ue=j.type,ue===T){if(z.tag===7){a(N,z.sibling),te=u(z,j.props.children),te.return=N,N=te;break e}}else if(z.elementType===ue||typeof ue=="object"&&ue!==null&&ue.$$typeof===F&&sp(ue)===z.type){a(N,z.sibling),te=u(z,j.props),Ki(te,j),te.return=N,N=te;break e}a(N,z);break}else t(N,z);z=z.sibling}j.type===T?(te=Va(j.props.children,N.mode,te,j.key),te.return=N,N=te):(te=yo(j.type,j.key,j.props,null,N.mode,te),Ki(te,j),te.return=N,N=te)}return g(N);case A:e:{for(ue=j.key;z!==null;){if(z.key===ue)if(z.tag===4&&z.stateNode.containerInfo===j.containerInfo&&z.stateNode.implementation===j.implementation){a(N,z.sibling),te=u(z,j.children||[]),te.return=N,N=te;break e}else{a(N,z);break}else t(N,z);z=z.sibling}te=Ps(j,N.mode,te),te.return=N,N=te}return g(N);case F:return ue=j._init,j=ue(j._payload),Ye(N,z,j,te)}if(X(j))return me(N,z,j,te);if(S(j)){if(ue=S(j),typeof ue!="function")throw Error(o(150));return j=ue.call(j),de(N,z,j,te)}if(typeof j.then=="function")return Ye(N,z,$o(j),te);if(j.$$typeof===$)return Ye(N,z,xo(N,j),te);No(N,j)}return typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint"?(j=""+j,z!==null&&z.tag===6?(a(N,z.sibling),te=u(z,j),te.return=N,N=te):(a(N,z),te=Vs(j,N.mode,te),te.return=N,N=te),g(N)):a(N,z)}return function(N,z,j,te){try{Ii=0;var ue=Ye(N,z,j,te);return Hr=null,ue}catch(ce){if(ce===Hi||ce===Eo)throw ce;var be=Zt(29,ce,null,N.mode);return be.lanes=te,be.return=N,be}finally{}}}var Yr=cp(!0),fp=cp(!1),cn=V(null),On=null;function ga(e){var t=e.alternate;ie(gt,gt.current&1),ie(cn,e),On===null&&(t===null||Lr.current!==null||t.memoizedState!==null)&&(On=e)}function dp(e){if(e.tag===22){if(ie(gt,gt.current),ie(cn,e),On===null){var t=e.alternate;t!==null&&t.memoizedState!==null&&(On=e)}}else ya()}function ya(){ie(gt,gt.current),ie(cn,cn.current)}function Qn(e){re(cn),On===e&&(On=null),re(gt)}var gt=V(0);function Lo(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||a.data==="$?"||mf(a)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function Tc(e,t,a,i){t=e.memoizedState,a=a(i,t),a=a==null?t:y({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Mc={enqueueSetState:function(e,t,a){e=e._reactInternals;var i=Wt(),u=ha(i);u.payload=t,a!=null&&(u.callback=a),t=ma(e,u,i),t!==null&&(Ft(t,e,i),qi(t,e,i))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var i=Wt(),u=ha(i);u.tag=1,u.payload=t,a!=null&&(u.callback=a),t=ma(e,u,i),t!==null&&(Ft(t,e,i),qi(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=Wt(),i=ha(a);i.tag=2,t!=null&&(i.callback=t),t=ma(e,i,a),t!==null&&(Ft(t,e,a),qi(t,e,a))}};function hp(e,t,a,i,u,f,g){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,f,g):t.prototype&&t.prototype.isPureReactComponent?!ki(a,i)||!ki(u,f):!0}function mp(e,t,a,i){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,i),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,i),t.state!==e&&Mc.enqueueReplaceState(t,t.state,null)}function Ja(e,t){var a=t;if("ref"in t){a={};for(var i in t)i!=="ref"&&(a[i]=t[i])}if(e=e.defaultProps){a===t&&(a=y({},a));for(var u in e)a[u]===void 0&&(a[u]=e[u])}return a}var Bo=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function pp(e){Bo(e)}function gp(e){console.error(e)}function yp(e){Bo(e)}function jo(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(i){setTimeout(function(){throw i})}}function vp(e,t,a){try{var i=e.onCaughtError;i(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(u){setTimeout(function(){throw u})}}function wc(e,t,a){return a=ha(a),a.tag=3,a.payload={element:null},a.callback=function(){jo(e,t)},a}function bp(e){return e=ha(e),e.tag=3,e}function Sp(e,t,a,i){var u=a.type.getDerivedStateFromError;if(typeof u=="function"){var f=i.value;e.payload=function(){return u(f)},e.callback=function(){vp(t,a,i)}}var g=a.stateNode;g!==null&&typeof g.componentDidCatch=="function"&&(e.callback=function(){vp(t,a,i),typeof u!="function"&&(Ea===null?Ea=new Set([this]):Ea.add(this));var v=i.stack;this.componentDidCatch(i.value,{componentStack:v!==null?v:""})})}function Db(e,t,a,i,u){if(a.flags|=32768,i!==null&&typeof i=="object"&&typeof i.then=="function"){if(t=a.alternate,t!==null&&Bi(t,a,u,!0),a=cn.current,a!==null){switch(a.tag){case 13:return On===null?Kc():a.alternate===null&&tt===0&&(tt=3),a.flags&=-257,a.flags|=65536,a.lanes=u,i===tc?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([i]):t.add(i),Fc(e,i,u)),!1;case 22:return a.flags|=65536,i===tc?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([i])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([i]):a.add(i)),Fc(e,i,u)),!1}throw Error(o(435,a.tag))}return Fc(e,i,u),Kc(),!1}if(De)return t=cn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=u,i!==Qs&&(e=Error(o(422),{cause:i}),Li(ln(e,a)))):(i!==Qs&&(t=Error(o(423),{cause:i}),Li(ln(t,a))),e=e.current.alternate,e.flags|=65536,u&=-u,e.lanes|=u,i=ln(i,a),u=wc(e.stateNode,i,u),rc(e,u),tt!==4&&(tt=2)),!1;var f=Error(o(520),{cause:i});if(f=ln(f,a),al===null?al=[f]:al.push(f),tt!==4&&(tt=2),t===null)return!0;i=ln(i,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=u&-u,a.lanes|=e,e=wc(a.stateNode,i,e),rc(a,e),!1;case 1:if(t=a.type,f=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(Ea===null||!Ea.has(f))))return a.flags|=65536,u&=-u,a.lanes|=u,u=bp(u),Sp(u,e,a,i),rc(a,u),!1}a=a.return}while(a!==null);return!1}var xp=Error(o(461)),xt=!1;function wt(e,t,a,i){t.child=e===null?fp(t,null,a,i):Yr(t,e.child,a,i)}function Cp(e,t,a,i,u){a=a.render;var f=t.ref;if("ref"in i){var g={};for(var v in i)v!=="ref"&&(g[v]=i[v])}else g=i;return Ka(t),i=sc(e,t,a,g,f,u),v=cc(),e!==null&&!xt?(fc(e,t,u),In(e,t,u)):(De&&v&&Xs(t),t.flags|=1,wt(e,t,i,u),t.child)}function Ep(e,t,a,i,u){if(e===null){var f=a.type;return typeof f=="function"&&!Gs(f)&&f.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=f,Tp(e,t,f,i,u)):(e=yo(a.type,null,i,t,t.mode,u),e.ref=t.ref,e.return=t,t.child=e)}if(f=e.child,!$c(e,u)){var g=f.memoizedProps;if(a=a.compare,a=a!==null?a:ki,a(g,i)&&e.ref===t.ref)return In(e,t,u)}return t.flags|=1,e=qn(f,i),e.ref=t.ref,e.return=t,t.child=e}function Tp(e,t,a,i,u){if(e!==null){var f=e.memoizedProps;if(ki(f,i)&&e.ref===t.ref)if(xt=!1,t.pendingProps=i=f,$c(e,u))(e.flags&131072)!==0&&(xt=!0);else return t.lanes=e.lanes,In(e,t,u)}return Ac(e,t,a,i,u)}function Mp(e,t,a){var i=t.pendingProps,u=i.children,f=e!==null?e.memoizedState:null;if(i.mode==="hidden"){if((t.flags&128)!==0){if(i=f!==null?f.baseLanes|a:a,e!==null){for(u=t.child=e.child,f=0;u!==null;)f=f|u.lanes|u.childLanes,u=u.sibling;t.childLanes=f&~i}else t.childLanes=0,t.child=null;return wp(e,t,i,a)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Co(t,f!==null?f.cachePool:null),f!==null?Tm(t,f):lc(),dp(t);else return t.lanes=t.childLanes=536870912,wp(e,t,f!==null?f.baseLanes|a:a,a)}else f!==null?(Co(t,f.cachePool),Tm(t,f),ya(),t.memoizedState=null):(e!==null&&Co(t,null),lc(),ya());return wt(e,t,u,a),t.child}function wp(e,t,a,i){var u=ec();return u=u===null?null:{parent:pt._currentValue,pool:u},t.memoizedState={baseLanes:a,cachePool:u},e!==null&&Co(t,null),lc(),dp(t),e!==null&&Bi(e,t,i,!0),null}function Uo(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(o(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function Ac(e,t,a,i,u){return Ka(t),a=sc(e,t,a,i,void 0,u),i=cc(),e!==null&&!xt?(fc(e,t,u),In(e,t,u)):(De&&i&&Xs(t),t.flags|=1,wt(e,t,a,u),t.child)}function Ap(e,t,a,i,u,f){return Ka(t),t.updateQueue=null,a=wm(t,i,a,u),Mm(e),i=cc(),e!==null&&!xt?(fc(e,t,f),In(e,t,f)):(De&&i&&Xs(t),t.flags|=1,wt(e,t,a,f),t.child)}function Op(e,t,a,i,u){if(Ka(t),t.stateNode===null){var f=_r,g=a.contextType;typeof g=="object"&&g!==null&&(f=_t(g)),f=new a(i,f),t.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=Mc,t.stateNode=f,f._reactInternals=t,f=t.stateNode,f.props=i,f.state=t.memoizedState,f.refs={},nc(t),g=a.contextType,f.context=typeof g=="object"&&g!==null?_t(g):_r,f.state=t.memoizedState,g=a.getDerivedStateFromProps,typeof g=="function"&&(Tc(t,a,g,i),f.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(g=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),g!==f.state&&Mc.enqueueReplaceState(f,f.state,null),Vi(t,i,f,u),Gi(),f.state=t.memoizedState),typeof f.componentDidMount=="function"&&(t.flags|=4194308),i=!0}else if(e===null){f=t.stateNode;var v=t.memoizedProps,R=Ja(a,v);f.props=R;var U=f.context,J=a.contextType;g=_r,typeof J=="object"&&J!==null&&(g=_t(J));var ae=a.getDerivedStateFromProps;J=typeof ae=="function"||typeof f.getSnapshotBeforeUpdate=="function",v=t.pendingProps!==v,J||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(v||U!==g)&&mp(t,f,i,g),da=!1;var P=t.memoizedState;f.state=P,Vi(t,i,f,u),Gi(),U=t.memoizedState,v||P!==U||da?(typeof ae=="function"&&(Tc(t,a,ae,i),U=t.memoizedState),(R=da||hp(t,a,R,i,P,U,g))?(J||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount()),typeof f.componentDidMount=="function"&&(t.flags|=4194308)):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=U),f.props=i,f.state=U,f.context=g,i=R):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{f=t.stateNode,ac(e,t),g=t.memoizedProps,J=Ja(a,g),f.props=J,ae=t.pendingProps,P=f.context,U=a.contextType,R=_r,typeof U=="object"&&U!==null&&(R=_t(U)),v=a.getDerivedStateFromProps,(U=typeof v=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(g!==ae||P!==R)&&mp(t,f,i,R),da=!1,P=t.memoizedState,f.state=P,Vi(t,i,f,u),Gi();var Z=t.memoizedState;g!==ae||P!==Z||da||e!==null&&e.dependencies!==null&&So(e.dependencies)?(typeof v=="function"&&(Tc(t,a,v,i),Z=t.memoizedState),(J=da||hp(t,a,J,i,P,Z,R)||e!==null&&e.dependencies!==null&&So(e.dependencies))?(U||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(i,Z,R),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(i,Z,R)),typeof f.componentDidUpdate=="function"&&(t.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof f.componentDidUpdate!="function"||g===e.memoizedProps&&P===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&P===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=Z),f.props=i,f.state=Z,f.context=R,i=J):(typeof f.componentDidUpdate!="function"||g===e.memoizedProps&&P===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&P===e.memoizedState||(t.flags|=1024),i=!1)}return f=i,Uo(e,t),i=(t.flags&128)!==0,f||i?(f=t.stateNode,a=i&&typeof a.getDerivedStateFromError!="function"?null:f.render(),t.flags|=1,e!==null&&i?(t.child=Yr(t,e.child,null,u),t.child=Yr(t,null,a,u)):wt(e,t,a,u),t.memoizedState=f.state,e=t.child):e=In(e,t,u),e}function Rp(e,t,a,i){return Ni(),t.flags|=256,wt(e,t,a,i),t.child}var Oc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Rc(e){return{baseLanes:e,cachePool:gm()}}function Dc(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=fn),e}function Dp(e,t,a){var i=t.pendingProps,u=!1,f=(t.flags&128)!==0,g;if((g=f)||(g=e!==null&&e.memoizedState===null?!1:(gt.current&2)!==0),g&&(u=!0,t.flags&=-129),g=(t.flags&32)!==0,t.flags&=-33,e===null){if(De){if(u?ga(t):ya(),De){var v=et,R;if(R=v){e:{for(R=v,v=An;R.nodeType!==8;){if(!v){v=null;break e}if(R=xn(R.nextSibling),R===null){v=null;break e}}v=R}v!==null?(t.memoizedState={dehydrated:v,treeContext:Pa!==null?{id:Gn,overflow:Vn}:null,retryLane:536870912,hydrationErrors:null},R=Zt(18,null,null,0),R.stateNode=v,R.return=t,t.child=R,Lt=t,et=null,R=!0):R=!1}R||Qa(t)}if(v=t.memoizedState,v!==null&&(v=v.dehydrated,v!==null))return mf(v)?t.lanes=32:t.lanes=536870912,null;Qn(t)}return v=i.children,i=i.fallback,u?(ya(),u=t.mode,v=Ho({mode:"hidden",children:v},u),i=Va(i,u,a,null),v.return=t,i.return=t,v.sibling=i,t.child=v,u=t.child,u.memoizedState=Rc(a),u.childLanes=Dc(e,g,a),t.memoizedState=Oc,i):(ga(t),_c(t,v))}if(R=e.memoizedState,R!==null&&(v=R.dehydrated,v!==null)){if(f)t.flags&256?(ga(t),t.flags&=-257,t=kc(e,t,a)):t.memoizedState!==null?(ya(),t.child=e.child,t.flags|=128,t=null):(ya(),u=i.fallback,v=t.mode,i=Ho({mode:"visible",children:i.children},v),u=Va(u,v,a,null),u.flags|=2,i.return=t,u.return=t,i.sibling=u,t.child=i,Yr(t,e.child,null,a),i=t.child,i.memoizedState=Rc(a),i.childLanes=Dc(e,g,a),t.memoizedState=Oc,t=u);else if(ga(t),mf(v)){if(g=v.nextSibling&&v.nextSibling.dataset,g)var U=g.dgst;g=U,i=Error(o(419)),i.stack="",i.digest=g,Li({value:i,source:null,stack:null}),t=kc(e,t,a)}else if(xt||Bi(e,t,a,!1),g=(a&e.childLanes)!==0,xt||g){if(g=Pe,g!==null&&(i=a&-a,i=(i&42)!==0?1:ms(i),i=(i&(g.suspendedLanes|a))!==0?0:i,i!==0&&i!==R.retryLane))throw R.retryLane=i,Dr(e,i),Ft(g,e,i),xp;v.data==="$?"||Kc(),t=kc(e,t,a)}else v.data==="$?"?(t.flags|=192,t.child=e.child,t=null):(e=R.treeContext,et=xn(v.nextSibling),Lt=t,De=!0,Za=null,An=!1,e!==null&&(un[sn++]=Gn,un[sn++]=Vn,un[sn++]=Pa,Gn=e.id,Vn=e.overflow,Pa=t),t=_c(t,i.children),t.flags|=4096);return t}return u?(ya(),u=i.fallback,v=t.mode,R=e.child,U=R.sibling,i=qn(R,{mode:"hidden",children:i.children}),i.subtreeFlags=R.subtreeFlags&65011712,U!==null?u=qn(U,u):(u=Va(u,v,a,null),u.flags|=2),u.return=t,i.return=t,i.sibling=u,t.child=i,i=u,u=t.child,v=e.child.memoizedState,v===null?v=Rc(a):(R=v.cachePool,R!==null?(U=pt._currentValue,R=R.parent!==U?{parent:U,pool:U}:R):R=gm(),v={baseLanes:v.baseLanes|a,cachePool:R}),u.memoizedState=v,u.childLanes=Dc(e,g,a),t.memoizedState=Oc,i):(ga(t),a=e.child,e=a.sibling,a=qn(a,{mode:"visible",children:i.children}),a.return=t,a.sibling=null,e!==null&&(g=t.deletions,g===null?(t.deletions=[e],t.flags|=16):g.push(e)),t.child=a,t.memoizedState=null,a)}function _c(e,t){return t=Ho({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Ho(e,t){return e=Zt(22,e,null,t),e.lanes=0,e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function kc(e,t,a){return Yr(t,e.child,null,a),e=_c(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function _p(e,t,a){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),Ks(e.return,t,a)}function zc(e,t,a,i,u){var f=e.memoizedState;f===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:a,tailMode:u}:(f.isBackwards=t,f.rendering=null,f.renderingStartTime=0,f.last=i,f.tail=a,f.tailMode=u)}function kp(e,t,a){var i=t.pendingProps,u=i.revealOrder,f=i.tail;if(wt(e,t,i.children,a),i=gt.current,(i&2)!==0)i=i&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&_p(e,a,t);else if(e.tag===19)_p(e,a,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}i&=1}switch(ie(gt,i),u){case"forwards":for(a=t.child,u=null;a!==null;)e=a.alternate,e!==null&&Lo(e)===null&&(u=a),a=a.sibling;a=u,a===null?(u=t.child,t.child=null):(u=a.sibling,a.sibling=null),zc(t,!1,u,a,f);break;case"backwards":for(a=null,u=t.child,t.child=null;u!==null;){if(e=u.alternate,e!==null&&Lo(e)===null){t.child=u;break}e=u.sibling,u.sibling=a,a=u,u=e}zc(t,!0,a,null,f);break;case"together":zc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function In(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Ca|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Bi(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,a=qn(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=qn(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function $c(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&So(e)))}function _b(e,t,a){switch(t.tag){case 3:Se(t,t.stateNode.containerInfo),fa(t,pt,e.memoizedState.cache),Ni();break;case 27:case 5:Xe(t);break;case 4:Se(t,t.stateNode.containerInfo);break;case 10:fa(t,t.type,t.memoizedProps.value);break;case 13:var i=t.memoizedState;if(i!==null)return i.dehydrated!==null?(ga(t),t.flags|=128,null):(a&t.child.childLanes)!==0?Dp(e,t,a):(ga(t),e=In(e,t,a),e!==null?e.sibling:null);ga(t);break;case 19:var u=(e.flags&128)!==0;if(i=(a&t.childLanes)!==0,i||(Bi(e,t,a,!1),i=(a&t.childLanes)!==0),u){if(i)return kp(e,t,a);t.flags|=128}if(u=t.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),ie(gt,gt.current),i)break;return null;case 22:case 23:return t.lanes=0,Mp(e,t,a);case 24:fa(t,pt,e.memoizedState.cache)}return In(e,t,a)}function zp(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)xt=!0;else{if(!$c(e,a)&&(t.flags&128)===0)return xt=!1,_b(e,t,a);xt=(e.flags&131072)!==0}else xt=!1,De&&(t.flags&1048576)!==0&&sm(t,bo,t.index);switch(t.lanes=0,t.tag){case 16:e:{e=t.pendingProps;var i=t.elementType,u=i._init;if(i=u(i._payload),t.type=i,typeof i=="function")Gs(i)?(e=Ja(i,e),t.tag=1,t=Op(null,t,i,e,a)):(t.tag=0,t=Ac(null,t,i,e,a));else{if(i!=null){if(u=i.$$typeof,u===B){t.tag=11,t=Cp(null,t,i,e,a);break e}else if(u===q){t.tag=14,t=Ep(null,t,i,e,a);break e}}throw t=H(i)||i,Error(o(306,t,""))}}return t;case 0:return Ac(e,t,t.type,t.pendingProps,a);case 1:return i=t.type,u=Ja(i,t.pendingProps),Op(e,t,i,u,a);case 3:e:{if(Se(t,t.stateNode.containerInfo),e===null)throw Error(o(387));i=t.pendingProps;var f=t.memoizedState;u=f.element,ac(e,t),Vi(t,i,null,a);var g=t.memoizedState;if(i=g.cache,fa(t,pt,i),i!==f.cache&&Ws(t,[pt],a,!0),Gi(),i=g.element,f.isDehydrated)if(f={element:i,isDehydrated:!1,cache:g.cache},t.updateQueue.baseState=f,t.memoizedState=f,t.flags&256){t=Rp(e,t,i,a);break e}else if(i!==u){u=ln(Error(o(424)),t),Li(u),t=Rp(e,t,i,a);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(et=xn(e.firstChild),Lt=t,De=!0,Za=null,An=!0,a=fp(t,null,i,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Ni(),i===u){t=In(e,t,a);break e}wt(e,t,i,a)}t=t.child}return t;case 26:return Uo(e,t),e===null?(a=B0(t.type,null,t.pendingProps,null))?t.memoizedState=a:De||(a=t.type,e=t.pendingProps,i=eu(se.current).createElement(a),i[Dt]=t,i[Ut]=e,Ot(i,a,e),St(i),t.stateNode=i):t.memoizedState=B0(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Xe(t),e===null&&De&&(i=t.stateNode=$0(t.type,t.pendingProps,se.current),Lt=t,An=!0,u=et,wa(t.type)?(pf=u,et=xn(i.firstChild)):et=u),wt(e,t,t.pendingProps.children,a),Uo(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&De&&((u=i=et)&&(i=i2(i,t.type,t.pendingProps,An),i!==null?(t.stateNode=i,Lt=t,et=xn(i.firstChild),An=!1,u=!0):u=!1),u||Qa(t)),Xe(t),u=t.type,f=t.pendingProps,g=e!==null?e.memoizedProps:null,i=f.children,ff(u,f)?i=null:g!==null&&ff(u,g)&&(t.flags|=32),t.memoizedState!==null&&(u=sc(e,t,Eb,null,null,a),dl._currentValue=u),Uo(e,t),wt(e,t,i,a),t.child;case 6:return e===null&&De&&((e=a=et)&&(a=l2(a,t.pendingProps,An),a!==null?(t.stateNode=a,Lt=t,et=null,e=!0):e=!1),e||Qa(t)),null;case 13:return Dp(e,t,a);case 4:return Se(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Yr(t,null,i,a):wt(e,t,i,a),t.child;case 11:return Cp(e,t,t.type,t.pendingProps,a);case 7:return wt(e,t,t.pendingProps,a),t.child;case 8:return wt(e,t,t.pendingProps.children,a),t.child;case 12:return wt(e,t,t.pendingProps.children,a),t.child;case 10:return i=t.pendingProps,fa(t,t.type,i.value),wt(e,t,i.children,a),t.child;case 9:return u=t.type._context,i=t.pendingProps.children,Ka(t),u=_t(u),i=i(u),t.flags|=1,wt(e,t,i,a),t.child;case 14:return Ep(e,t,t.type,t.pendingProps,a);case 15:return Tp(e,t,t.type,t.pendingProps,a);case 19:return kp(e,t,a);case 31:return i=t.pendingProps,a=t.mode,i={mode:i.mode,children:i.children},e===null?(a=Ho(i,a),a.ref=t.ref,t.child=a,a.return=t,t=a):(a=qn(e.child,i),a.ref=t.ref,t.child=a,a.return=t,t=a),t;case 22:return Mp(e,t,a);case 24:return Ka(t),i=_t(pt),e===null?(u=ec(),u===null&&(u=Pe,f=Fs(),u.pooledCache=f,f.refCount++,f!==null&&(u.pooledCacheLanes|=a),u=f),t.memoizedState={parent:i,cache:u},nc(t),fa(t,pt,u)):((e.lanes&a)!==0&&(ac(e,t),Vi(t,null,null,a),Gi()),u=e.memoizedState,f=t.memoizedState,u.parent!==i?(u={parent:i,cache:i},t.memoizedState=u,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=u),fa(t,pt,i)):(i=f.cache,fa(t,pt,i),i!==u.cache&&Ws(t,[pt],a,!0))),wt(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function Kn(e){e.flags|=4}function $p(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!q0(t)){if(t=cn.current,t!==null&&((Te&4194048)===Te?On!==null:(Te&62914560)!==Te&&(Te&536870912)===0||t!==On))throw Yi=tc,ym;e.flags|=8192}}function Yo(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?dh():536870912,e.lanes|=t,Pr|=t)}function Wi(e,t){if(!De)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var i=null;a!==null;)a.alternate!==null&&(i=a),a=a.sibling;i===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function Fe(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,i=0;if(t)for(var u=e.child;u!==null;)a|=u.lanes|u.childLanes,i|=u.subtreeFlags&65011712,i|=u.flags&65011712,u.return=e,u=u.sibling;else for(u=e.child;u!==null;)a|=u.lanes|u.childLanes,i|=u.subtreeFlags,i|=u.flags,u.return=e,u=u.sibling;return e.subtreeFlags|=i,e.childLanes=a,t}function kb(e,t,a){var i=t.pendingProps;switch(Zs(t),t.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Fe(t),null;case 1:return Fe(t),null;case 3:return a=t.stateNode,i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),Xn(pt),Qe(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&($i(t)?Kn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,dm())),Fe(t),null;case 26:return a=t.memoizedState,e===null?(Kn(t),a!==null?(Fe(t),$p(t,a)):(Fe(t),t.flags&=-16777217)):a?a!==e.memoizedState?(Kn(t),Fe(t),$p(t,a)):(Fe(t),t.flags&=-16777217):(e.memoizedProps!==i&&Kn(t),Fe(t),t.flags&=-16777217),null;case 27:lt(t),a=se.current;var u=t.type;if(e!==null&&t.stateNode!=null)e.memoizedProps!==i&&Kn(t);else{if(!i){if(t.stateNode===null)throw Error(o(166));return Fe(t),null}e=oe.current,$i(t)?cm(t):(e=$0(u,i,a),t.stateNode=e,Kn(t))}return Fe(t),null;case 5:if(lt(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==i&&Kn(t);else{if(!i){if(t.stateNode===null)throw Error(o(166));return Fe(t),null}if(e=oe.current,$i(t))cm(t);else{switch(u=eu(se.current),e){case 1:e=u.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:e=u.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":e=u.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":e=u.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":e=u.createElement("div"),e.innerHTML=" + diff --git a/src/frontend/src/assets/models/OpenAI-black-monoblossom.svg b/src/frontend/src/assets/models/OpenAI-black-monoblossom.svg new file mode 100644 index 00000000..832fa6a5 --- /dev/null +++ b/src/frontend/src/assets/models/OpenAI-black-monoblossom.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/frontend/src/assets/models/Qwen3.png b/src/frontend/src/assets/models/Qwen3.png new file mode 100644 index 00000000..53d01bfa Binary files /dev/null and b/src/frontend/src/assets/models/Qwen3.png differ diff --git a/src/frontend/src/assets/models/qwen.png b/src/frontend/src/assets/models/qwen.png deleted file mode 100644 index fef2ab77..00000000 Binary files a/src/frontend/src/assets/models/qwen.png and /dev/null differ diff --git a/src/frontend/src/components/common/main-layout.tsx b/src/frontend/src/components/common/main-layout.tsx index 89ddd03f..08e3a301 100644 --- a/src/frontend/src/components/common/main-layout.tsx +++ b/src/frontend/src/components/common/main-layout.tsx @@ -51,10 +51,11 @@ const MainLayoutContainer = styled(Box)(({ theme }) => { const MainLayoutContent = styled(Stack)(({ theme }) => { const { spacing } = theme; return { - width: '30rem', + width: '31rem', height: '100%', gap: spacing(7), - overflow: 'hidden', + paddingInline: spacing(1), + overflowY: 'auto', }; }); @@ -97,7 +98,7 @@ export const MainLayout: FC> = ({ - {children} + {children} {(contentStart && {contentStart}) || undefined} {(contentEnd && {contentEnd}) || undefined} diff --git a/src/frontend/src/components/inputs/chat-markdown.tsx b/src/frontend/src/components/inputs/chat-markdown.tsx index 96f964d0..51ca9666 100644 --- a/src/frontend/src/components/inputs/chat-markdown.tsx +++ b/src/frontend/src/components/inputs/chat-markdown.tsx @@ -1,5 +1,5 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -import {} from 'react'; +import { memo } from 'react'; import { styled } from '@mui/material/styles'; import ReactMarkdown, { type Components } from 'react-markdown'; import remarkGfm from 'remark-gfm'; @@ -9,6 +9,7 @@ import rehypeRaw from 'rehype-raw'; import rehypeSanitize, { defaultSchema } from 'rehype-sanitize'; import 'katex/dist/katex.min.css'; import { + Divider, Table, TableBody, TableCell, @@ -21,7 +22,7 @@ import { const ChatMarkdownRoot = styled('article', { name: 'MuiMarkdownRenderer', slot: 'Root', -})(({ theme }) => { +})<{ isThinking?: boolean }>(({ theme, isThinking }) => { const { palette, spacing, typography } = theme; const preStyles = { '& pre': { @@ -41,6 +42,8 @@ const ChatMarkdownRoot = styled('article', { alignItems: 'stretch', gap: spacing(1), + color: (isThinking && palette.text.disabled) || palette.text.primary, + ...preStyles, '& think': { @@ -53,6 +56,7 @@ const ChatMarkdownRoot = styled('article', { }); interface Props { + isThinking?: boolean; content: string; } @@ -80,6 +84,7 @@ const components: Components = { h6: (props) => , p: (props) => , caption: (props) => , + hr: (props) => , table: (props) => ( @@ -98,12 +103,12 @@ const schema = { tagNames: (defaultSchema.tagNames || []).filter((tag) => !blockList.includes(tag)), }; -const ChatMarkdown = ({ content }: Props) => { +const ChatMarkdown = memo(({ isThinking, content }) => { content = preprocessThink(content); content = preprocessMath(content); return ( - + { ); -}; +}); export default ChatMarkdown; diff --git a/src/frontend/src/components/inputs/chat-messages.tsx b/src/frontend/src/components/inputs/chat-messages.tsx index a6c99b36..db7f4c8f 100644 --- a/src/frontend/src/components/inputs/chat-messages.tsx +++ b/src/frontend/src/components/inputs/chat-messages.tsx @@ -1,12 +1,7 @@ import { memo, useEffect, useRef, useState, type FC, type UIEventHandler } from 'react'; import { useChat, type ChatMessage } from '../../services'; import { Box, Button, IconButton, Paper, Stack, Tooltip, Typography } from '@mui/material'; -import { - IconArrowDown, - IconCopy, - IconCopyCheck, - IconRefresh, -} from '@tabler/icons-react'; +import { IconArrowDown, IconCopy, IconCopyCheck, IconRefresh } from '@tabler/icons-react'; import { useRefCallback } from '../../hooks'; import ChatMarkdown from './chat-markdown'; import { DotPulse } from './dot-pulse'; @@ -26,7 +21,9 @@ export const ChatMessages: FC = () => { if (userScrolledUpRef.current) return; autoScrollingRef.current = true; refBottom.current?.scrollIntoView({ behavior: 'smooth' }); - const t = setTimeout(() => { autoScrollingRef.current = false; }, 200); + const t = setTimeout(() => { + autoScrollingRef.current = false; + }, 200); return () => clearTimeout(t); }, [messages]); @@ -55,7 +52,9 @@ export const ChatMessages: FC = () => { userScrolledUpRef.current = false; autoScrollingRef.current = true; refBottom.current?.scrollIntoView({ behavior: 'smooth' }); - setTimeout(() => { autoScrollingRef.current = false; }, 200); + setTimeout(() => { + autoScrollingRef.current = false; + }, 200); }; return ( @@ -74,20 +73,22 @@ export const ChatMessages: FC = () => { onWheel={(e) => { if (e.deltaY < 0) userScrolledUpRef.current = true; }} - onTouchMove={() => { userScrolledUpRef.current = true; }} + onTouchMove={() => { + userScrolledUpRef.current = true; + }} > {messages.map((message, idx) => ( ))} - {status === 'opened' && } + {status === 'opened' && } {!isBottom && ( { borderColor: 'grey.300', '&:hover': { bgcolor: 'grey.100' }, }} - aria-label="Scroll to bottom" + aria-label='Scroll to bottom' > @@ -110,9 +111,9 @@ export const ChatMessages: FC = () => { }; const ChatMessage: FC<{ message: ChatMessage; isLast?: boolean }> = memo(({ message, isLast }) => { - const { role, content } = message; + const { role, status: messageStatus, thinking, content } = message; - const [{ status }, { generate }] = useChat(); + const [, { generate }] = useChat(); const [copied, setCopied] = useState(false); useEffect(() => { @@ -134,19 +135,27 @@ const ChatMessage: FC<{ message: ChatMessage; isLast?: boolean }> = memo(({ mess const nodeContent = role === 'user' ? {content} - : ; - - - const assistantDone = !isLast || status === 'closed'; + : <> + {thinking && } + {content && } + ; + const assistantDone = messageStatus === 'done'; const showCopy = role === 'user' || (role === 'assistant' && assistantDone); - const showRegen = role === 'assistant' && assistantDone; + const showRegenerate = role === 'assistant' && assistantDone; const userHoverRevealSx = role === 'user' ? @@ -163,7 +172,7 @@ const ChatMessage: FC<{ message: ChatMessage; isLast?: boolean }> = memo(({ mess {nodeContent} - {(showCopy || showRegen) && ( + {(showCopy || showRegenerate) && ( = memo(({ mess > {showCopy && ( = memo(({ mess )} - {showRegen && ( + {showRegenerate && ( { - const { spacing } = theme; - return { - overflowY: 'auto', - }; -}); - export default function PageSetup() { const [ { networkType, initNodesNumber, modelName, modelInfoList }, diff --git a/src/frontend/src/router/index.tsx b/src/frontend/src/router/index.tsx index 1d0efc9a..f8d03ce0 100644 --- a/src/frontend/src/router/index.tsx +++ b/src/frontend/src/router/index.tsx @@ -1,8 +1,12 @@ // src/router/index.tsx import { lazy, Suspense, useEffect } from 'react'; -import { useRoutes, Navigate, useNavigate } from 'react-router-dom'; +import { useLocation, useRoutes, Navigate, useNavigate } from 'react-router-dom'; import { useCluster } from '../services'; +const PATH_SETUP = '/setup'; +const PATH_JOIN = '/join'; +const PATH_CHAT = '/chat'; + const PageSetup = lazy(() => import('../pages/setup')); const PageJoin = lazy(() => import('../pages/join')); const PageChat = lazy(() => import('../pages/chat')); @@ -13,6 +17,7 @@ const debugLog = (...args: any[]) => { export const Router = () => { const navigate = useNavigate(); + const { pathname } = useLocation(); const [ { @@ -21,26 +26,22 @@ export const Router = () => { ] = useCluster(); useEffect(() => { - debugLog('cluster status', status); - switch (status) { - case 'idle': - case 'waiting': - debugLog('no need to navigate'); - break; - default: - debugLog('navigate to /chat'); - navigate('/chat'); - break; + debugLog('pathname', pathname, 'cluster status', status); + if (status === 'idle' && !pathname.startsWith(PATH_SETUP)) { + debugLog('navigate to /setup'); + navigate(PATH_SETUP); + return; + } + if (status === 'available' && !pathname.startsWith(PATH_CHAT)) { + debugLog('navigate to /chat'); + navigate(PATH_CHAT); + return; } - }, [navigate, status]); + }, [navigate, pathname, status]); const routes = useRoutes([ { - path: '/', - element: , // redirect to the page setup - }, - { - path: '/setup', + path: PATH_SETUP, element: ( Loading...}> @@ -48,7 +49,7 @@ export const Router = () => { ), }, { - path: '/join', + path: PATH_JOIN, element: ( Loading...}> @@ -56,7 +57,7 @@ export const Router = () => { ), }, { - path: '/chat', + path: PATH_CHAT, element: ( Loading...}> diff --git a/src/frontend/src/services/api.ts b/src/frontend/src/services/api.ts index a9638ba6..c9ce7dfe 100644 --- a/src/frontend/src/services/api.ts +++ b/src/frontend/src/services/api.ts @@ -1,14 +1,21 @@ import { createHttpStreamFactory } from './http-stream'; -export const API_BASE_URL = import.meta.env.DEV ? 'http://0.0.0.0:3001' : ''; +export const API_BASE_URL = import.meta.env.DEV ? '/proxy-api' : ''; export const getModelList = async (): Promise => { - const response = await fetch(`${API_BASE_URL}/model/list`, { method: 'GET' }); - const message = await response.json(); - if (message.type !== 'model_list') { - throw new Error(`Invalid message type: ${message.type}.`); + while (true) { + try { + const response = await fetch(`${API_BASE_URL}/model/list`, { method: 'GET' }); + const message = await response.json(); + if (message.type !== 'model_list') { + throw new Error(`Invalid message type: ${message.type}.`); + } + return message.data; + } catch (error) { + console.error('getModelList error', error); + await new Promise((resolve) => setTimeout(resolve, 2000)); + } } - return message.data; }; export const initScheduler = async (params: { diff --git a/src/frontend/src/services/chat-helper.tsx b/src/frontend/src/services/chat-helper.tsx new file mode 100644 index 00000000..16e364d4 --- /dev/null +++ b/src/frontend/src/services/chat-helper.tsx @@ -0,0 +1,55 @@ +/** + * Mapping GPT generation massages. + * The key is the channel name, the value is the message. + */ +export interface GptGenerationMap { + analysis: string; + final: string; + [key: string]: string; +} + +export function parseGenerationGpt(buffer: string): GptGenerationMap { + buffer = buffer.trim(); + + const map: GptGenerationMap = { analysis: '', final: '' }; + + const regex = /<\|channel\|>([^<]+)<\|message\|>(.*?)(<\|end\|>|$)/gs; + let match: RegExpExecArray | null; + while ((match = regex.exec(buffer)) !== null) { + map[match[1]] = match[2]?.trim() || ''; + } + + return map; +} + +export interface QwenGenerationMap { + think: string; + content: string; +} + +const THINK_TAG_OPEN = ''; +const THINK_TAG_CLOSE = ''; + +export function parseGenerationQwen(buffer: string): QwenGenerationMap { + buffer = buffer.trim(); + + const map: QwenGenerationMap = { think: '', content: '' }; + + while (buffer.includes(THINK_TAG_OPEN)) { + const thinkStart = buffer.indexOf(THINK_TAG_OPEN); + const thinkEnd = buffer.indexOf(THINK_TAG_CLOSE); + const think = buffer.substring( + thinkStart + THINK_TAG_OPEN.length, + thinkEnd > thinkStart ? thinkEnd : buffer.length, + ); + buffer = buffer.replace( + THINK_TAG_OPEN + think + (thinkEnd > thinkStart ? THINK_TAG_CLOSE : ''), + '', + ); + map.think += '\n\n' + think; + } + map.think = map.think.trim(); + map.content = buffer.trim(); + + return map; +} diff --git a/src/frontend/src/services/chat.tsx b/src/frontend/src/services/chat.tsx index 0d2f630e..3daffa52 100644 --- a/src/frontend/src/services/chat.tsx +++ b/src/frontend/src/services/chat.tsx @@ -12,8 +12,9 @@ import { import { API_BASE_URL } from './api'; import { useConst, useRefCallback } from '../hooks'; import { useCluster } from './cluster'; +import { parseGenerationGpt, parseGenerationQwen } from './chat-helper'; -const debugLog = (...args: any[]) => { +const debugLog = async (...args: any[]) => { if (import.meta.env.DEV) { console.log('%c chat.tsx ', 'color: white; background: orange;', ...args); } @@ -21,10 +22,27 @@ const debugLog = (...args: any[]) => { export type ChatMessageRole = 'user' | 'assistant'; +export type ChatMessageStatus = 'waiting' | 'thinking' | 'generating' | 'done' | 'error'; + export interface ChatMessage { readonly id: string; readonly role: ChatMessageRole; + readonly status: ChatMessageStatus; + + /** + * The content from user input or assistant generating. + */ readonly content: string; + + /** + * The raw content from model response. + */ + readonly raw?: string; + + /** + * The thinking content in assistant generating. + */ + readonly thinking?: string; readonly createdAt: number; } @@ -46,8 +64,7 @@ export interface ChatActions { export const ChatProvider: FC = ({ children }) => { const [ { - modelName, - clusterInfo: { status: clusterStatus }, + clusterInfo: { status: clusterStatus, modelName }, }, ] = useCluster(); @@ -58,11 +75,51 @@ export const ChatProvider: FC = ({ children }) => { const sse = useConst(() => createSSE({ - onOpen: () => setStatus('opened'), - onClose: () => setStatus('closed'), - onError: (error) => setStatus('error'), + onOpen: () => { + setStatus('opened'); + }, + onClose: () => { + setMessages((prev) => { + const lastMessage = prev[prev.length - 1]; + const { id, raw, thinking, content } = lastMessage; + debugLog('GENERATING DONE', 'lastMessage:', lastMessage); + debugLog('GENERATING DONE', 'id:', id); + debugLog('GENERATING DONE', 'raw:', raw); + debugLog('GENERATING DONE', 'thinking:', thinking); + debugLog('GENERATING DONE', 'content:', content); + return [ + ...prev.slice(0, -1), + { + ...lastMessage, + status: 'done', + }, + ]; + }); + setStatus('closed'); + }, + onError: (error) => { + // Set last message to done + setMessages((prev) => { + const lastMessage = prev[prev.length - 1]; + const { id, raw, thinking, content } = lastMessage; + debugLog('GENERATING ERROR', 'lastMessage:', lastMessage); + debugLog('GENERATING ERROR', 'id:', id); + debugLog('GENERATING ERROR', 'raw:', raw); + debugLog('GENERATING ERROR', 'thinking:', thinking); + debugLog('GENERATING ERROR', 'content:', content); + return [ + ...prev.slice(0, -1), + { + ...lastMessage, + status: 'done', + }, + ]; + }); + debugLog('SSE ERROR', error); + setStatus('error'); + }, onMessage: (message) => { - debugLog('onMessage', message); + // debugLog('onMessage', message); // const example = { // id: 'd410014e-3308-450d-bbd2-0ec4e0c0a345', // object: 'chat.completion.chunk', @@ -89,28 +146,58 @@ export const ChatProvider: FC = ({ children }) => { setMessages((prev) => { let next = prev; // eslint-disable-next-line @typescript-eslint/no-explicit-any - choices.forEach(({ delta: { role, content } = {} }: any) => { - if (typeof content !== 'string') { + choices.forEach(({ delta: { role, content: rawDelta } = {} }: any) => { + if (typeof rawDelta !== 'string' || !rawDelta) { return; } role = role || 'assistant'; let lastMessage = next[next.length - 1]; if (lastMessage && lastMessage.role === role) { - const nextContent = lastMessage.content + content; - if (nextContent === lastMessage.content) { - return; - } + const raw = lastMessage.raw + rawDelta; lastMessage = { ...lastMessage, - content: lastMessage.content + content, + raw: raw, + content: raw, }; next = [...next.slice(0, -1), lastMessage]; } else { - lastMessage = { id, role, content, createdAt: created }; + lastMessage = { + id, + role, + status: 'thinking', + raw: rawDelta, + content: rawDelta, + createdAt: created, + }; next = [...next, lastMessage]; } - debugLog('onMessage', 'update last message', lastMessage.content); + // debugLog('onMessage', 'update last message', lastMessage.content); }); + + // Parse generation and extract thinking and content + if (next !== prev && typeof model === 'string') { + let lastMessage = next[next.length - 1]; + let thinking = ''; + let content = ''; + const modelLowerCase = model.toLowerCase(); + if (modelLowerCase.includes('gpt')) { + ({ analysis: thinking, final: content } = parseGenerationGpt( + lastMessage.raw || '', + )); + } else if (modelLowerCase.includes('qwen')) { + ({ think: thinking, content } = parseGenerationQwen(lastMessage.raw || '')); + } else { + content = lastMessage.raw || ''; + } + lastMessage = { + ...lastMessage, + status: (content && 'generating') || 'thinking', + thinking, + content, + }; + next = [...next.slice(0, -1), lastMessage]; + } + return next; }); } @@ -150,13 +237,16 @@ export const ChatProvider: FC = ({ children }) => { const now = performance.now(); nextMessages = [ ...nextMessages, - { id: now.toString(), role: 'user', content: finalInput, createdAt: now }, + { id: now.toString(), role: 'user', status: 'done', content: finalInput, createdAt: now }, ]; debugLog('generate', 'new', nextMessages); } setMessages(nextMessages); - sse.connect(modelName, nextMessages); + sse.connect( + modelName, + nextMessages.map(({ id, role, content }) => ({ id, role, content })), + ); }); const stop = useRefCallback(() => { @@ -219,6 +309,12 @@ interface SSEOptions { onMessage?: (message: { event: string; id?: string; data: any }) => void; } +interface RequestMessage { + readonly id: string; + readonly role: ChatMessageRole; + readonly content: string; +} + const createSSE = (options: SSEOptions) => { const { onOpen, onClose, onError, onMessage } = options; @@ -226,9 +322,10 @@ const createSSE = (options: SSEOptions) => { let reader: ReadableStreamDefaultReader | undefined; let abortController: AbortController | undefined; - const connect = (model: string, messages: readonly ChatMessage[]) => { + const connect = (model: string, messages: readonly RequestMessage[]) => { abortController = new AbortController(); - fetch(`${API_BASE_URL}/v1/chat/completions`, { + const url = `${API_BASE_URL}/v1/chat/completions`; + fetch(url, { method: 'POST', body: JSON.stringify({ stream: true, diff --git a/src/frontend/src/services/cluster.tsx b/src/frontend/src/services/cluster.tsx index 662fd902..695a0050 100644 --- a/src/frontend/src/services/cluster.tsx +++ b/src/frontend/src/services/cluster.tsx @@ -4,7 +4,20 @@ import { createContext, useContext, useEffect, useMemo, useState } from 'react'; import { useRefCallback } from '../hooks'; import { createStreamClusterStatus, getModelList, initScheduler } from './api'; -import logoUrlQwen from '../assets/models/qwen.png'; +import logoUrlQwen from '../assets/models/Qwen3.png'; +import logoUrlGpt from '../assets/models/OpenAI-black-monoblossom.svg'; + +const getLogoUrl = (name: string) => { + name = name.toLowerCase(); + const parts = name.split(/[-/]/); + if (parts[0] === 'qwen') { + return logoUrlQwen; + } + if (parts[0] === 'openai') { + return logoUrlGpt; + } + return ''; +}; const debugLog = (...args: any[]) => { console.log('%c cluster.tsx ', 'color: white; background: darkcyan;', ...args); @@ -21,10 +34,19 @@ export type ClusterStatus = 'idle' | 'waiting' | 'available' | 'rebalancing'; export interface ClusterInfo { readonly id: string; readonly status: ClusterStatus; + readonly modelName: string; readonly nodeJoinCommand: Readonly>; readonly initNodesNumber: number; } +const INITIAL_CLUSTER_INFO: ClusterInfo = { + id: '', + status: 'idle', + modelName: '', + nodeJoinCommand: {}, + initNodesNumber: 4, +}; + export type NodeStatus = 'waiting' | 'available' | 'failed'; export interface NodeInfo { @@ -76,7 +98,7 @@ export const ClusterProvider: FC = ({ children }) => { modelList.map((name) => ({ name, displayName: name, - logoUrl: logoUrlQwen, + logoUrl: getLogoUrl(name), })), ); }); @@ -88,33 +110,14 @@ export const ClusterProvider: FC = ({ children }) => { }, [modelInfoList]); // Cluster and Nodes - const [clusterInfo, setClusterInfo] = useState(() => ({ - id: '', - status: 'idle', - nodeJoinCommand: {}, - initNodesNumber: 4, - })); - const [nodeInfoList, setNodeInfoList] = useState(() => [ - // MOCK - // { - // id: 'sfasge235rytdfgq35q346234wedfss', - // status: 'available', - // gpuName: 'NVIDIA A100', - // gpuMemory: 24, - // }, - // { - // id: 'dfgshjldkrewi25246esfdgsh345sdf', - // status: 'waiting', - // gpuName: 'NVIDIA A100', - // gpuMemory: 24, - // }, - // { - // id: 'dfgberiuiwuyhy25346tea2342sdf12', - // status: 'failed', - // gpuName: 'NVIDIA A100', - // gpuMemory: 24, - // }, - ]); + const [clusterInfo, setClusterInfo] = useState(INITIAL_CLUSTER_INFO); + const [nodeInfoList, setNodeInfoList] = useState([]); + + const reset = useRefCallback(() => { + debugLog('reset'); + setClusterInfo(INITIAL_CLUSTER_INFO); + setNodeInfoList([]); + }); const streamClusterStatus = useMemo(() => { const onMessage = (message: any) => { @@ -122,10 +125,11 @@ export const ClusterProvider: FC = ({ children }) => { const { data: { status, init_nodes_num, model_name, node_join_command, node_list }, } = message; + setModelName((prev) => model_name || prev); setClusterInfo((prev) => { const next = { ...prev, - status, + status: (model_name && status) || 'idle', initNodesNumber: init_nodes_num || 0, modelName: model_name || '', nodeJoinCommand: node_join_command || {}, @@ -170,12 +174,18 @@ export const ClusterProvider: FC = ({ children }) => { } }; const stream = createStreamClusterStatus({ + debugName: 'ClusterStatus', + autoReconnect: true, onMessage, + onError: reset, }); - stream.send(); return stream; }, []); + useEffect(() => { + streamClusterStatus.send(); + }, []); + const init = useRefCallback(async () => { if (initNodesNumber < 1) { throw new Error('initNodesNumber must be greater than 0'); diff --git a/src/frontend/src/services/http-stream.ts b/src/frontend/src/services/http-stream.ts index 3099eeb7..c2db81bb 100644 --- a/src/frontend/src/services/http-stream.ts +++ b/src/frontend/src/services/http-stream.ts @@ -5,6 +5,18 @@ export type HttpStreamClientStatus = 'connecting' | 'connected' | 'disconnected' export interface HttpStreamClientOptions { debugName?: string; + /** + * Whether the client can re-connect automatically when close or error. + * @default false + */ + autoReconnect?: boolean; + + /** + * The interval time (ms) of auto-reconnect. + * @default 2000 + */ + autoReconnectInterval?: number; + /** * The callback function to handle the connection status change. * @param status The status of the client. @@ -48,6 +60,8 @@ export const createHttpStreamFactory = const { url: _url, method = 'GET', afterFetch = (data) => data } = commonOptions; const { debugName, + autoReconnect = false, + autoReconnectInterval = 2000, onStatusChange: onStatusChangeCallback, onMessage: onMessageCallback, onError: onErrorCallback, @@ -67,6 +81,12 @@ export const createHttpStreamFactory = const onStatusChange = (status: HttpStreamClientStatus): void => { debugLog('onStatusChange', status); + if (autoReconnect && (status === 'disconnected' || status === 'error')) { + setTimeout(() => { + debugLog('auto-reconnect'); + send(previousSendOptions); + }, autoReconnectInterval); + } try { onStatusChangeCallback?.(status); } catch (error) { @@ -97,8 +117,10 @@ export const createHttpStreamFactory = } }; - const send = (options: HttpStreamClientSendOptions = {}) => { - const { headers, body, data } = options; + let previousSendOptions: HttpStreamClientSendOptions | undefined; + const send = (options?: HttpStreamClientSendOptions) => { + previousSendOptions = options; + const { headers, body, data } = options || {}; onStatusChange('connecting'); debugLog('send', data); diff --git a/src/frontend/src/themes/components/form/outline-input.ts b/src/frontend/src/themes/components/form/outline-input.ts index a1f4acbf..351a2500 100644 --- a/src/frontend/src/themes/components/form/outline-input.ts +++ b/src/frontend/src/themes/components/form/outline-input.ts @@ -34,7 +34,7 @@ export const MuiOutlinedInput = (theme: Theme): Components['MuiOutlinedIn '&, &:hover': { [`.${outlinedInputClasses.notchedOutline}`]: { borderWidth: 1, - borderColor: 'transparent', + borderColor: divider, }, }, }, diff --git a/src/frontend/src/themes/components/form/toggle-button.ts b/src/frontend/src/themes/components/form/toggle-button.ts index f4adb57c..d0d39371 100644 --- a/src/frontend/src/themes/components/form/toggle-button.ts +++ b/src/frontend/src/themes/components/form/toggle-button.ts @@ -13,7 +13,7 @@ export const MuiToggleButton = (theme: Theme): Components['MuiToggleButto flex: 1, height: `${INPUT_SIZE_REM_MAP.small}rem`, - borderColor: 'transparent', + borderColor: palette.divider, color: palette.grey[400], backgroundColor: palette.grey[200], diff --git a/src/frontend/src/themes/shadows.ts b/src/frontend/src/themes/shadows.ts index 28039332..c730cfae 100644 --- a/src/frontend/src/themes/shadows.ts +++ b/src/frontend/src/themes/shadows.ts @@ -34,8 +34,10 @@ export const overlays: Overlays = { // shadowInput: '0px 1px 2px 0px rgba(49, 49, 48, 0.05)', shadowInput: 'none', - shadowInputActive: 'none', - shadowInputError: 'none', + shadowInputActive: + '0px 0px 0px 4px rgba(49, 49, 48, 0.05), 0px 1px 2px 0px rgba(49, 49, 48, 0.05)', + shadowInputError: + '0px 0px 0px 4px rgba(221, 82, 76, 0.12), 0px 1px 2px 0px rgba(221, 82, 76, 0.05)', buttonShadeDefault: '0px 1px 2px 0px rgba(49, 49, 48, 0.05)', buttonShadeActiveLight: diff --git a/src/frontend/vite.config.ts b/src/frontend/vite.config.ts index 6da11b5b..587adb6d 100644 --- a/src/frontend/vite.config.ts +++ b/src/frontend/vite.config.ts @@ -4,4 +4,17 @@ import react from '@vitejs/plugin-react-swc'; // https://vite.dev/config/ export default defineConfig({ plugins: [react()], + server: { + proxy: { + '/proxy-api/v1/chat/completions': { + target: 'http://localhost:3001', + // target: 'https://ztrxxhzxdt3bn6-3000.proxy.runpod.net', + rewrite: (path) => path.replace(/^\/proxy-api/, ''), + }, + '/proxy-api': { + target: 'http://localhost:3001', + rewrite: (path) => path.replace(/^\/proxy-api/, ''), + }, + }, + }, });