@deepseekcode/cli 1.0.12 → 1.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/README.md +10 -0
  2. package/dist/cli.js +1062 -939
  3. package/package.json +2 -1
  4. package/web/dist/assets/AgentFlowView-D_eqHssN.js +1 -0
  5. package/web/dist/assets/AgentsView-DxXbT1TA.js +1 -0
  6. package/web/dist/assets/{AskQuestionModal-ydX_B4wI.js → AskQuestionModal-OOxUqiN1.js} +1 -1
  7. package/web/dist/assets/{AuditView-BzMImL6n.js → AuditView-DLmHV1Xa.js} +1 -1
  8. package/web/dist/assets/AutomationView-Dnkht7AC.js +1 -0
  9. package/web/dist/assets/ChannelConfigView-gal4YqIE.js +8 -0
  10. package/web/dist/assets/{FileTreeView-PejM6X2U.js → FileTreeView-xuW_AJmw.js} +3 -3
  11. package/web/dist/assets/{HookApprovalModal-BZrqAd9G.js → HookApprovalModal-Dnrkw1Mh.js} +1 -1
  12. package/web/dist/assets/HookConfigView-BddeGF3E.js +3 -0
  13. package/web/dist/assets/{InboxView-72c5rEjQ.js → InboxView-DOIcm5GF.js} +1 -1
  14. package/web/dist/assets/ModelsView-YK7jq8J0.js +1 -0
  15. package/web/dist/assets/SessionGrid-OuKqyYjF.js +22 -0
  16. package/web/dist/assets/{SettingsPanel-qg3WBeuf.js → SettingsPanel-BK2mvSsv.js} +3 -3
  17. package/web/dist/assets/{SkillsView-C13I-2on.js → SkillsView-CjR2b3-r.js} +1 -1
  18. package/web/dist/assets/TerminalView-Okh3EsS2.js +3 -0
  19. package/web/dist/assets/Toast-Bmm1ZZzF.js +1 -0
  20. package/web/dist/assets/ToolsView-BcTnj3DK.js +1 -0
  21. package/web/dist/assets/hookRisk-BXEfLOCo.js +1 -0
  22. package/web/dist/assets/{icons-uody4X-4.js → icons-CjRO1znb.js} +54 -49
  23. package/web/dist/assets/index-CektHuu_.js +20 -0
  24. package/web/dist/assets/index-Czlzypr3.css +1 -0
  25. package/web/dist/assets/{markdown-BUScHEtT.js → markdown-hmVtvQNZ.js} +1 -1
  26. package/web/dist/assets/panels-C0Mxu2Md.js +1 -0
  27. package/web/dist/assets/{react-vendor-C5NlWs7r.js → react-vendor-Dp4P972X.js} +6 -6
  28. package/web/dist/assets/{state-DKyBAq9j.js → state-C_jK7HTi.js} +3 -3
  29. package/web/dist/index.html +6 -6
  30. package/web/dist/assets/AgentFlowView-BevVKfXk.js +0 -1
  31. package/web/dist/assets/AgentsView-C6uUk-Ot.js +0 -1
  32. package/web/dist/assets/AutomationView-CUDpr7WY.js +0 -1
  33. package/web/dist/assets/ChannelConfigView-DlRO4DS2.js +0 -8
  34. package/web/dist/assets/HookConfigView-5pYKJRQk.js +0 -3
  35. package/web/dist/assets/ModelsView-CVg05tUX.js +0 -1
  36. package/web/dist/assets/SessionGrid-CHFCkdr0.js +0 -20
  37. package/web/dist/assets/TerminalView-BVRuIrII.js +0 -3
  38. package/web/dist/assets/Toast-CcbSW0V2.js +0 -1
  39. package/web/dist/assets/ToolsView-_k5gi04A.js +0 -1
  40. package/web/dist/assets/hookRisk-DHeJr1SL.js +0 -1
  41. package/web/dist/assets/index-DuBeChMI.css +0 -1
  42. package/web/dist/assets/index-futMRNcm.js +0 -21
  43. package/web/dist/assets/panels-C_0RapVg.js +0 -1
@@ -1,20 +0,0 @@
1
- import{j as r,M as Yr,P as Jr}from"./markdown-BUScHEtT.js";import{R as H,r as w,w as Zr,aq as rr,k as it,a as lt,i as nn,at as sr,X as rn,au as Qr,o as ct,d as In,b as or,am as ar,F as Gt,av as Wt,aw as qr,D as es,v as ts,N as ns,a6 as rs,ax as En,ay as ss,p as Rt,B as os,a0 as as,az as is,y as ls,aA as cs,aB as ds,aj as us,aC as ps,ah as ms,u as hs,aD as fs,L as xs}from"./icons-uody4X-4.js";import{x as gs}from"./react-vendor-C5NlWs7r.js";import{i as Me,e as Re,w as De,j as Nn,u as st,a as Vt,t as Pe,k as Oe,W as bs,l as vs,m as Kt,b as Ss,n as yn,d as ws,S as ks}from"./index-futMRNcm.js";import{c as Ts,e as Is,R as Es}from"./hookRisk-DHeJr1SL.js";import"./state-DKyBAq9j.js";function Cn({value:t,max:e=100,size:n="md",variant:s="default",showLabel:o=!1,className:i}){const a=Math.min(Math.max(t/e*100,0),100),c={sm:"h-1",md:"h-2",lg:"h-3"},l={default:"bg-accent-blue",success:"bg-accent-green",warning:"bg-accent-yellow",error:"bg-accent-red"};return r.jsxs("div",{className:Me("w-full",i),children:[r.jsx("div",{className:Me("w-full bg-dark-border rounded-full overflow-hidden",c[n]),children:r.jsx("div",{className:Me("h-full rounded-full transition-all duration-300",l[s]),style:{width:`${a}%`}})}),o&&r.jsxs("span",{className:"text-xs text-dark-muted mt-1",children:[Math.round(a),"%"]})]})}const At=0,Ue=1,tt=2,ir=4;function jn(t){return()=>t}function Ns(t){t()}function lr(t,e){return n=>t(e(n))}function Rn(t,e){return()=>t(e)}function ys(t,e){return n=>t(e,n)}function sn(t){return t!==void 0}function Cs(...t){return()=>{t.map(Ns)}}function nt(){}function Ot(t,e){return e(t),t}function js(t,e){return e(t)}function ae(...t){return t}function te(t,e){return t(Ue,e)}function G(t,e){t(At,e)}function on(t){t(tt)}function ce(t){return t(ir)}function z(t,e){return te(t,ys(e,At))}function Le(t,e){const n=t(Ue,s=>{n(),e(s)});return n}function An(t){let e,n;return s=>o=>{e=o,n&&clearTimeout(n),n=setTimeout(()=>{s(e)},t)}}function cr(t,e){return t===e}function oe(t=cr){let e;return n=>s=>{t(e,s)||(e=s,n(s))}}function P(t){return e=>n=>{t(n)&&e(n)}}function A(t){return e=>lr(e,t)}function He(t){return e=>()=>{e(t)}}function E(t,...e){const n=Rs(...e);return(s,o)=>{switch(s){case tt:on(t);return;case Ue:return te(t,n(o))}}}function ze(t,e){return n=>s=>{n(e=t(e,s))}}function Ye(t){return e=>n=>{t>0?t--:e(n)}}function _e(t){let e=null,n;return s=>o=>{e=o,!n&&(n=setTimeout(()=>{n=void 0,s(e)},t))}}function W(...t){const e=Array.from({length:t.length});let n=0,s=null;const o=2**t.length-1;return t.forEach((i,a)=>{const c=2**a;te(i,l=>{const d=n;n|=c,e[a]=l,d!==o&&n===o&&s&&(s(),s=null)})}),i=>a=>{const c=()=>{i([a].concat(e))};n===o?c():s=c}}function Rs(...t){return e=>t.reduceRight(js,e)}function As(t){let e,n;const s=()=>e==null?void 0:e();return function(o,i){switch(o){case Ue:return i?n===i?void 0:(s(),n=i,e=te(t,i),e):(s(),nt);case tt:s(),n=null;return}}}function C(t){let e=t;const n=Y();return(s,o)=>{switch(s){case At:e=o;break;case Ue:{o(e);break}case ir:return e}return n(s,o)}}function ke(t,e){return Ot(C(e),n=>z(t,n))}function Y(){const t=[];return(e,n)=>{switch(e){case At:t.slice().forEach(s=>{s(n)});return;case tt:t.splice(0);return;case Ue:return t.push(n),()=>{const s=t.indexOf(n);s>-1&&t.splice(s,1)}}}}function ye(t){return Ot(Y(),e=>z(t,e))}const Os={singleton:!0};function q(t,e=[],n=Os){const{singleton:s}=n;return{constructor:t,dependencies:e,id:Ls(),singleton:s}}const Ls=()=>Symbol("id");function Fs(t){const e=new Map,n=({constructor:s,dependencies:o,id:i,singleton:a})=>{if(a&&e.has(i))return e.get(i);const c=s(o.map(l=>n(l)));return a&&e.set(i,c),c};return n(t)}function he(...t){const e=Y(),n=Array.from({length:t.length});let s=0;const o=2**t.length-1;return t.forEach((i,a)=>{const c=2**a;te(i,l=>{n[a]=l,s|=c,s===o&&G(e,n)})}),function(i,a){switch(i){case tt:{on(e);return}case Ue:return s===o&&a(n),te(e,a)}}}function _(t,e=cr){return E(t,oe(e))}function Xt(...t){return function(e,n){switch(e){case tt:return;case Ue:return Cs(...t.map(s=>te(s,n)))}}}const ge={DEBUG:0,INFO:1,WARN:2,ERROR:3},Ds={[ge.DEBUG]:"debug",[ge.ERROR]:"error",[ge.INFO]:"log",[ge.WARN]:"warn"},Hs=()=>typeof globalThis>"u"?window:globalThis,Ge=q(()=>{const t=C(ge.ERROR);return{log:C((e,n,s=ge.INFO)=>{const o=Hs().VIRTUOSO_LOG_LEVEL??ce(t);s>=o&&console[Ds[s]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",e,n)}),logLevel:t}},[],{singleton:!0}),Yt=new WeakMap;function dr(t){return"self"in t?t.document.documentElement:t}function zs(t){const e=dr(t),n=Yt.get(e);if(n!==void 0)return n;const s=e.ownerDocument.defaultView.getComputedStyle(e).direction==="rtl";return Yt.set(e,s),s}function On(t){Yt.delete(dr(t))}function ur(t,e){return zs(t)?-e:e}const Ke=ur;function Ln(t,e){return ur(t,e)}function Je(t,e,n){return an(t,e,n).callbackRef}function an(t,e,n){const s=H.useRef(null);let o=a=>{};const i=H.useMemo(()=>typeof ResizeObserver<"u"?new ResizeObserver(a=>{const c=()=>{const l=a[0].target;l.offsetParent!==null&&t(l)};n?c():requestAnimationFrame(c)}):null,[t,n]);return o=a=>{a&&e?(i==null||i.observe(a),s.current=a):(s.current&&(i==null||i.unobserve(s.current)),s.current=null)},{callbackRef:o,ref:s}}function Ms(t,e,n,s,o,i,a,c,l){const d=H.useCallback(u=>{var g;const f=Bs(u.children,e,c?"offsetWidth":"offsetHeight",o);let x=u.parentElement;for(;x.dataset.virtuosoScroller===void 0;)x=x.parentElement;const p=((g=x.lastElementChild)==null?void 0:g.dataset.viewportType)==="window";let v;p&&(v=x.ownerDocument.defaultView);const I=a?c?a.scrollWidth:a.scrollHeight:p?c?v.document.documentElement.scrollWidth:v.document.documentElement.scrollHeight:c?x.scrollWidth:x.scrollHeight,b=a?c?a.offsetWidth:a.offsetHeight:p?c?v.innerWidth:v.innerHeight:c?x.offsetWidth:x.offsetHeight,m=a?c?Ke(a,a.scrollLeft):a.scrollTop:p?c?Ke(v,v.scrollX||v.document.documentElement.scrollLeft):v.scrollY||v.document.documentElement.scrollTop:c?Ke(x,x.scrollLeft):x.scrollTop;s({scrollHeight:I,scrollTop:Math.max(m,0),viewportHeight:b}),i==null||i(c?Fn("column-gap",getComputedStyle(u).columnGap,o):Fn("row-gap",getComputedStyle(u).rowGap,o)),f!==null&&t(f)},[t,e,o,i,a,s,c]);return an(d,n,l)}function Bs(t,e,n,s){const o=t.length;if(o===0)return null;const i=[];for(let a=0;a<o;a++){const c=t.item(a);if(c.dataset.index===void 0)continue;const l=parseInt(c.dataset.index,10),d=parseFloat(c.dataset.knownSize),u=e(c,n);if(u===0&&s("Zero-sized element, this should not happen",{child:c},ge.ERROR),u===d)continue;const f=i[i.length-1];i.length===0||f.size!==u||f.endIndex!==l-1?i.push({endIndex:l,size:u,startIndex:l}):i[i.length-1].endIndex++}return i}function Fn(t,e,n){return e!=="normal"&&(e==null?void 0:e.endsWith("px"))!==!0&&n(`${t} was not resolved to pixel value correctly`,e,ge.WARN),e==="normal"?0:parseInt(e??"0",10)}function pr(t,e,n){const s=H.useRef(null),o=H.useCallback(l=>{if(!(l!=null&&l.offsetParent))return;const d=l.getBoundingClientRect(),u=d.width;let f,x;if(e){const p=e.getBoundingClientRect(),v=d.top-p.top;x=p.height-Math.max(0,v),f=v+e.scrollTop}else{const p=a.current.ownerDocument.defaultView;x=p.innerHeight-Math.max(0,d.top),f=d.top+p.scrollY}s.current={listHeight:d.height,offsetTop:f,visibleHeight:x,visibleWidth:u},t(s.current)},[t,e]),{callbackRef:i,ref:a}=an(o,!0,n),c=H.useCallback(()=>{o(a.current)},[o,a]);return H.useEffect(()=>{var d;if(e){e.addEventListener("scroll",c);const u=new ResizeObserver(()=>{requestAnimationFrame(c)});return u.observe(e),()=>{e.removeEventListener("scroll",c),u.unobserve(e)}}const l=(d=a.current)==null?void 0:d.ownerDocument.defaultView;return l==null||l.addEventListener("scroll",c),l==null||l.addEventListener("resize",c),()=>{l==null||l.removeEventListener("scroll",c),l==null||l.removeEventListener("resize",c)}},[c,e,a]),i}const Ie=q(()=>{const t=Y(),e=Y(),n=C(0),s=Y(),o=C(0),i=Y(),a=Y(),c=C(0),l=C(0),d=C(0),u=C(0),f=Y(),x=Y(),p=C(!1),v=C(!1),I=C(!1);return z(E(t,A(({scrollTop:b})=>b)),e),z(E(t,A(({scrollHeight:b})=>b)),a),z(e,o),{deviation:n,fixedFooterHeight:d,fixedHeaderHeight:l,footerHeight:u,headerHeight:c,horizontalDirection:v,scrollBy:x,scrollContainerState:t,scrollHeight:a,scrollingInProgress:p,scrollTo:f,scrollTop:e,skipAnimationFrameInResizeObserver:I,smoothScrollTargetReached:s,statefulScrollTop:o,viewportHeight:i}},[],{singleton:!0}),dt={lvl:0};function mr(t,e){const n=t.length;if(n===0)return[];let{index:s,value:o}=e(t[0]);const i=[];for(let a=1;a<n;a++){const{index:c,value:l}=e(t[a]);i.push({end:c-1,start:s,value:o}),s=c,o=l}return i.push({end:1/0,start:s,value:o}),i}function ne(t){return t===dt}function ut(t,e){if(!ne(t))return e===t.k?t.v:e<t.k?ut(t.l,e):ut(t.r,e)}function Fe(t,e,n="k"){if(ne(t))return[-1/0,void 0];if(Number(t[n])===e)return[t.k,t.v];if(Number(t[n])<e){const s=Fe(t.r,e,n);return s[0]===-1/0?[t.k,t.v]:s}return Fe(t.l,e,n)}function Ne(t,e,n){return ne(t)?xr(e,n,1):e===t.k?xe(t,{k:e,v:n}):e<t.k?Dn(xe(t,{l:Ne(t.l,e,n)})):Dn(xe(t,{r:Ne(t.r,e,n)}))}function qe(){return dt}function et(t,e,n){if(ne(t))return[];const s=Fe(t,e)[0];return _s(Zt(t,s,n))}function Jt(t,e){if(ne(t))return dt;const{k:n,l:s,r:o}=t;if(e===n){if(ne(s))return o;if(ne(o))return s;const[i,a]=fr(s);return Nt(xe(t,{k:i,l:hr(s),v:a}))}return e<n?Nt(xe(t,{l:Jt(s,e)})):Nt(xe(t,{r:Jt(o,e)}))}function Xe(t){return ne(t)?[]:[...Xe(t.l),{k:t.k,v:t.v},...Xe(t.r)]}function Zt(t,e,n){if(ne(t))return[];const{k:s,l:o,r:i,v:a}=t;let c=[];return s>e&&(c=c.concat(Zt(o,e,n))),s>=e&&s<=n&&c.push({k:s,v:a}),s<=n&&(c=c.concat(Zt(i,e,n))),c}function Nt(t){const{l:e,lvl:n,r:s}=t;if(s.lvl>=n-1&&e.lvl>=n-1)return t;if(n>s.lvl+1){if(Dt(e))return gr(xe(t,{lvl:n-1}));if(!ne(e)&&!ne(e.r))return xe(e.r,{l:xe(e,{r:e.r.l}),lvl:n,r:xe(t,{l:e.r.r,lvl:n-1})});throw new Error("Unexpected empty nodes")}if(Dt(t))return Qt(xe(t,{lvl:n-1}));if(!ne(s)&&!ne(s.l)){const o=s.l,i=Dt(o)?s.lvl-1:s.lvl;return xe(o,{l:xe(t,{lvl:n-1,r:o.l}),lvl:o.lvl+1,r:Qt(xe(s,{l:o.r,lvl:i}))})}throw new Error("Unexpected empty nodes")}function xe(t,e){return xr(e.k===void 0?t.k:e.k,e.v===void 0?t.v:e.v,e.lvl===void 0?t.lvl:e.lvl,e.l===void 0?t.l:e.l,e.r===void 0?t.r:e.r)}function hr(t){return ne(t.r)?t.l:Nt(xe(t,{r:hr(t.r)}))}function Dt(t){return ne(t)||t.lvl>t.r.lvl}function fr(t){return ne(t.r)?[t.k,t.v]:fr(t.r)}function xr(t,e,n,s=dt,o=dt){return{k:t,l:s,lvl:n,r:o,v:e}}function Dn(t){return Qt(gr(t))}function gr(t){const{l:e}=t;return!ne(e)&&e.lvl===t.lvl?xe(e,{r:xe(t,{l:e.r})}):t}function Qt(t){const{lvl:e,r:n}=t;return!ne(n)&&!ne(n.r)&&n.lvl===e&&n.r.lvl===e?xe(n,{l:xe(t,{r:n.l}),lvl:e+1}):t}function _s(t){return mr(t,({k:e,v:n})=>({index:e,value:n}))}function br(t,e){return!!(t&&t.startIndex===e.startIndex&&t.endIndex===e.endIndex)}function pt(t,e){return!!(t&&t[0]===e[0]&&t[1]===e[1])}const ln=q(()=>({recalcInProgress:C(!1)}),[],{singleton:!0});function vr(t,e,n){return t[Ct(t,e,n)]}function Ct(t,e,n,s=0){let o=t.length-1;for(;s<=o;){const i=Math.floor((s+o)/2),a=t[i],c=n(a,e);if(c===0)return i;if(c===-1){if(o-s<2)return i-1;o=i-1}else{if(o===s)return i;s=i+1}}throw new Error(`Failed binary finding record in array - ${t.join(",")}, searched for ${e}`)}function Ps(t,e,n,s){const o=Ct(t,e,s),i=Ct(t,n,s,o);return t.slice(o,i+1)}function $e(t,e){return Math.round(t.getBoundingClientRect()[e])}function Lt(t){return!ne(t.groupOffsetTree)}function cn({index:t},e){return e===t?0:e<t?-1:1}function $s(){return{groupIndices:[],groupOffsetTree:qe(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:qe()}}function Us(t,e){let n=ne(t)?0:1/0;for(const s of e){const{endIndex:o,size:i,startIndex:a}=s;if(n=Math.min(n,a),ne(t)){t=Ne(t,0,i);continue}const c=et(t,a-1,o+1);if(c.some(Js(s)))continue;let l=!1,d=!1;for(const{end:u,start:f,value:x}of c)l?(o>=f||i===x)&&(t=Jt(t,f)):(d=x!==i,l=!0),u>o&&o>=f&&x!==i&&(t=Ne(t,o+1,x));d&&(t=Ne(t,a,i))}return[t,n]}function Gs(t){return t.groupIndex!==void 0}function Ws({offset:t},e){return e===t?0:e<t?-1:1}function mt(t,e,n){if(e.length===0)return 0;const{index:s,offset:o,size:i}=vr(e,t,cn),a=t-s,c=i*a+(a-1)*n+o;return c>0?c+n:c}function Sr(t,e){if(!Lt(e))return t;let n=0;for(;e.groupIndices[n]<=t+n;)n++;return t+n}function wr(t,e,n){if(Gs(t))return e.groupIndices[t.groupIndex]+1;const s=t.index==="LAST"?n:t.index;let o=Sr(s,e);return o=Math.max(0,Math.min(n,o)),o}function Vs(t,e,n,s=0){return s>0&&(e=Math.max(e,vr(t,s,cn).offset)),mr(Ps(t,e,n,Ws),Ys)}function Ks(t,[e,n,s,o]){e.length>0&&s("received item sizes",e,ge.DEBUG);const i=t.sizeTree;let a=i,c=0;if(n.length>0&&ne(i)&&e.length===2){const x=e[0].size,p=e[1].size;a=n.reduce((v,I)=>Ne(Ne(v,I,x),I+1,p),a)}else[a,c]=Us(a,e);if(a===i)return t;const{lastIndex:l,lastOffset:d,lastSize:u,offsetTree:f}=qt(t.offsetTree,c,a,o);return{groupIndices:n,groupOffsetTree:n.reduce((x,p)=>Ne(x,p,mt(p,f,o)),qe()),lastIndex:l,lastOffset:d,lastSize:u,offsetTree:f,sizeTree:a}}function Xs(t){return Xe(t).map(({k:e,v:n},s,o)=>{const i=o[s+1];return{endIndex:i===void 0?1/0:i.k-1,size:n,startIndex:e}})}function Hn(t,e){let n=0,s=0;for(;n<t;)n+=e[s+1]-e[s]-1,s++;return s-(n===t?0:1)}function qt(t,e,n,s){let o=t,i=0,a=0,c=0,l=0;if(e===0)o=[];else{l=Ct(o,e-1,cn),c=o[l].offset;const d=Fe(n,e-1);i=d[0],a=d[1],o.length&&o[l].size===Fe(n,e)[1]&&(l-=1),o=o.slice(0,l+1)}for(const{start:d,value:u}of et(n,e,1/0)){const f=d-i,x=f*a+c+f*s;o.push({index:d,offset:x,size:u}),i=d,c=x,a=u}return{lastIndex:i,lastOffset:c,lastSize:a,offsetTree:o}}function Ys(t){return{index:t.index,value:t}}function Js(t){const{endIndex:e,size:n,startIndex:s}=t;return o=>o.start===s&&(o.end===e||o.end===1/0)&&o.value===n}const Zs={offsetHeight:"height",offsetWidth:"width"},Be=q(([{log:t},{recalcInProgress:e}])=>{const n=Y(),s=Y(),o=ke(s,0),i=Y(),a=Y(),c=C(0),l=C([]),d=C(void 0),u=C(void 0),f=C(void 0),x=C(void 0),p=C((h,S)=>$e(h,Zs[S])),v=C(void 0),I=C(0),b=$s(),m=ke(E(n,W(l,t,I),ze(Ks,b),oe()),b),g=ke(E(l,oe(),ze((h,S)=>({current:S,prev:h.current}),{current:[],prev:[]}),A(({prev:h})=>h)),[]);z(E(l,P(h=>h.length>0),W(m,I),A(([h,S,y])=>{const F=h.reduce((O,U,D)=>Ne(O,U,mt(U,S.offsetTree,y)||D),qe());return{...S,groupIndices:h,groupOffsetTree:F}})),m),z(E(s,W(m),P(([h,{lastIndex:S}])=>h<S),A(([h,{lastIndex:S,lastSize:y}])=>[{endIndex:S,size:y,startIndex:h}])),n),z(d,u);const k=ke(E(d,A(h=>h===void 0)),!0);z(E(u,P(h=>h!==void 0&&ne(ce(m).sizeTree)),A(h=>{const S=ce(f),y=ce(l).length>0;return S!==void 0&&S!==0?y?[{endIndex:0,size:S,startIndex:0},{endIndex:1,size:h,startIndex:1}]:[]:[{endIndex:0,size:h,startIndex:0}]})),n),z(E(x,P(h=>h!==void 0&&h.length>0&&ne(ce(m).sizeTree)),A(h=>{const S=[];let y=h[0],F=0;for(let O=1;O<h.length;O++){const U=h[O];U!==y&&(S.push({endIndex:O-1,size:y,startIndex:F}),y=U,F=O)}return S.push({endIndex:h.length-1,size:y,startIndex:F}),S})),n),z(E(l,W(f,u),P(([,h,S])=>h!==void 0&&S!==void 0),A(([h,S,y])=>{const F=[];for(let O=0;O<h.length;O++){const U=h[O],D=h[O+1];F.push({startIndex:U,endIndex:U,size:S}),D!==void 0&&F.push({startIndex:U+1,endIndex:D-1,size:y})}return F})),n);const j=ye(E(n,W(m),ze(({sizes:h},[S,y])=>({changed:y!==h,sizes:y}),{changed:!1,sizes:b}),A(h=>h.changed)));te(E(c,ze((h,S)=>({diff:h.prev-S,prev:S}),{diff:0,prev:0}),A(h=>h.diff)),h=>{const{groupIndices:S}=ce(m);if(h>0)G(e,!0),G(i,h+Hn(h,S));else if(h<0){const y=ce(g);y.length>0&&(h-=Hn(-h,y)),G(a,h)}}),te(E(c,W(t)),([h,S])=>{h<0&&S("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:c},ge.ERROR)});const T=ye(i);z(E(i,W(m),A(([h,S])=>{const y=S.groupIndices.length>0,F=[],O=S.lastSize;if(y){const U=ut(S.sizeTree,0);let D=0,M=0;for(;D<h;){const Q=S.groupIndices[M],J=S.groupIndices.length===M+1?1/0:S.groupIndices[M+1]-Q-1;F.push({endIndex:Q,size:U,startIndex:Q}),F.push({endIndex:Q+1+J-1,size:O,startIndex:Q+1}),M++,D+=J+1}const X=Xe(S.sizeTree);return D!==h&&X.shift(),X.reduce((Q,{k:J,v:ie})=>{let Ee=Q.ranges;return Q.prevSize!==0&&(Ee=[...Q.ranges,{endIndex:J+h-1,size:Q.prevSize,startIndex:Q.prevIndex}]),{prevIndex:J+h,prevSize:ie,ranges:Ee}},{prevIndex:h,prevSize:0,ranges:F}).ranges}return Xe(S.sizeTree).reduce((U,{k:D,v:M})=>({prevIndex:D+h,prevSize:M,ranges:[...U.ranges,{endIndex:D+h-1,size:U.prevSize,startIndex:U.prevIndex}]}),{prevIndex:0,prevSize:O,ranges:[]}).ranges})),n);const L=ye(E(a,W(m,I),A(([h,{offsetTree:S},y])=>{const F=-h;return mt(F,S,y)})));return z(E(a,W(m,I),A(([h,S,y])=>{if(S.groupIndices.length>0){if(ne(S.sizeTree))return S;let O=qe();const U=ce(g);let D=0,M=0,X=0;for(;D<-h;){X=U[M];const Q=U[M+1]-X-1;M++,D+=Q+1}if(O=Xe(S.sizeTree).reduce((Q,{k:J,v:ie})=>Ne(Q,Math.max(0,J+h),ie),O),D!==-h){const Q=ut(S.sizeTree,X);O=Ne(O,0,Q);const J=Fe(S.sizeTree,-h+1)[1];O=Ne(O,1,J)}return{...S,sizeTree:O,...qt(S.offsetTree,0,O,y)}}const F=Xe(S.sizeTree).reduce((O,{k:U,v:D})=>Ne(O,Math.max(0,U+h),D),qe());return{...S,sizeTree:F,...qt(S.offsetTree,0,F,y)}})),m),{beforeUnshiftWith:T,data:v,defaultItemSize:u,firstItemIndex:c,fixedItemSize:d,fixedGroupSize:f,gap:I,groupIndices:l,heightEstimates:x,itemSize:p,listRefresh:j,shiftWith:a,shiftWithOffset:L,sizeRanges:n,sizes:m,statefulTotalCount:o,totalCount:s,trackItemSizes:k,unshiftWith:i}},ae(Ge,ln),{singleton:!0});function Qs(t){return t.reduce((e,n)=>(e.groupIndices.push(e.totalCount),e.totalCount+=n+1,e),{groupIndices:[],totalCount:0})}const kr=q(([{groupIndices:t,sizes:e,totalCount:n},{headerHeight:s,scrollTop:o}])=>{const i=Y(),a=Y(),c=ye(E(i,A(Qs)));return z(E(c,A(l=>l.totalCount)),n),z(E(c,A(l=>l.groupIndices)),t),z(E(he(o,e,s),P(([l,d])=>Lt(d)),A(([l,d,u])=>Fe(d.groupOffsetTree,Math.max(l-u,0),"v")[0]),oe(),A(l=>[l])),a),{groupCounts:i,topItemsIndexes:a}},ae(Be,Ie)),We=q(([{log:t}])=>{const e=C(!1),n=ye(E(e,P(s=>s),oe()));return te(e,s=>{s&&ce(t)("props updated",{},ge.DEBUG)}),{didMount:n,propsReady:e}},ae(Ge),{singleton:!0}),qs=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function Tr(t){const e=typeof t=="number"?{index:t}:{...t};return e.align||(e.align="start"),(!e.behavior||!qs)&&(e.behavior="auto"),e.offset===void 0&&(e.offset=0),e}const gt=q(([{gap:t,listRefresh:e,sizes:n,totalCount:s},{fixedFooterHeight:o,fixedHeaderHeight:i,footerHeight:a,headerHeight:c,scrollingInProgress:l,scrollTo:d,smoothScrollTargetReached:u,viewportHeight:f},{log:x}])=>{const p=Y(),v=Y(),I=C(0);let b=null,m=null,g=null;function k(){b!==null&&(b(),b=null),g!==null&&(g(),g=null),m&&(clearTimeout(m),m=null),G(l,!1)}return z(E(p,W(n,f,s,I,c,a,x),W(t,i,o),A(([[j,T,L,h,S,y,F,O],U,D,M])=>{const X=Tr(j),{align:Q,behavior:J,offset:ie}=X,Ee=h-1,be=wr(X,T,Ee);let Se=mt(be,T.offsetTree,U)+y;Q==="end"?(Se+=D+Fe(T.sizeTree,be)[1]-L+M,be===Ee&&(Se+=F)):Q==="center"?Se+=(D+Fe(T.sizeTree,be)[1]-L+M)/2:Se-=S,ie!==void 0&&ie!==0&&(Se+=ie);const Ae=ve=>{k(),ve?(O("retrying to scroll to",{location:j},ge.DEBUG),G(p,j)):(G(v,!0),O("list did not change, scroll successful",{},ge.DEBUG))};if(k(),J==="smooth"){let ve=!1;g=te(e,R=>{ve=ve||R}),b=Le(u,()=>{Ae(ve)})}else b=Le(E(e,eo(150)),Ae);return m=setTimeout(()=>{k()},1200),G(l,!0),O("scrolling from index to",{behavior:J,index:be,top:Se},ge.DEBUG),{behavior:J,top:Se}})),d),{scrollTargetReached:v,scrollToIndex:p,topListHeight:I}},ae(Be,Ie,Ge),{singleton:!0});function eo(t){return e=>{const n=setTimeout(()=>{e(!1)},t);return s=>{s&&(e(!0),clearTimeout(n))}}}function dn(t,e){t===0?e():requestAnimationFrame(()=>{dn(t-1,e)})}function un(t,e){if(t===void 0)return 0;const n=e-1,s=typeof t=="number"?t:t.index==="LAST"?n:t.index;return Math.max(0,Math.min(s,n))}function en(t){return t===void 0?!0:typeof t=="number"?t===0:t.index===0&&(t.align===void 0||t.align==="start")&&(t.offset===void 0||t.offset===0)}const bt=q(([{defaultItemSize:t,listRefresh:e,sizes:n},{scrollTop:s},{scrollTargetReached:o,scrollToIndex:i},{didMount:a}])=>{const c=C(!0),l=C(0),d=C(!0);return z(E(a,W(l),P(([u,f])=>!en(f)),He(!1)),c),z(E(a,W(l),P(([u,f])=>!en(f)),He(!1)),d),te(E(he(e,a),W(c,n,t,d),P(([[,u],f,{sizeTree:x},p,v])=>u&&(!ne(x)||sn(p))&&!f&&!v),W(l)),([,u])=>{if(u===void 0){G(c,!0),G(d,!0);return}Le(o,()=>{G(d,!0)}),dn(4,()=>{Le(s,()=>{G(c,!0)}),G(i,u)})}),{initialItemFinalLocationReached:d,initialTopMostItemIndex:l,scrolledToInitialItem:c}},ae(Be,Ie,gt,We),{singleton:!0});function Ir(t,e){return Math.abs(t-e)<1.01}const ht="up",ot="down",to="none",no={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},ro=0,vt=q(([{footerHeight:t,headerHeight:e,scrollBy:n,scrollContainerState:s,scrollTop:o,viewportHeight:i}])=>{const a=C(!1),c=C(!0),l=Y(),d=Y(),u=C(4),f=C(ro),x=ke(E(Xt(E(_(o),Ye(1),He(!0)),E(_(o),Ye(1),He(!1),An(100))),oe()),!1),p=ke(E(Xt(E(n,He(!0)),E(n,He(!1),An(200))),oe()),!1);z(E(he(_(o),_(f)),A(([g,k])=>g<=k),oe()),c),z(E(c,_e(50)),d);const v=ye(E(he(s,_(i),_(e),_(t),_(u)),ze((g,[{scrollHeight:k,scrollTop:j},T,L,h,S])=>{const y=j+T-k>-S,F={scrollHeight:k,scrollTop:j,viewportHeight:T};if(y){let U,D;return j>g.state.scrollTop?(U="SCROLLED_DOWN",D=g.state.scrollTop-j):(U="SIZE_DECREASED",D=g.state.scrollTop-j||g.scrollTopDelta),{atBottom:!0,atBottomBecause:U,scrollTopDelta:D,state:F}}let O;return F.scrollHeight>g.state.scrollHeight?O="SIZE_INCREASED":T<g.state.viewportHeight?O="VIEWPORT_HEIGHT_DECREASING":j<g.state.scrollTop?O="SCROLLING_UPWARDS":O="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:O,state:F}},no),oe((g,k)=>g!==void 0&&g.atBottom===k.atBottom))),I=ke(E(s,ze((g,{scrollHeight:k,scrollTop:j,viewportHeight:T})=>{if(!Ir(g.scrollHeight,k)){const L=k-(j+T)<1;return g.scrollTop!==j&&L?{changed:!0,jump:g.scrollTop-j,scrollHeight:k,scrollTop:j}:{changed:!0,jump:0,scrollHeight:k,scrollTop:j}}return{changed:!1,jump:0,scrollHeight:k,scrollTop:j}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),P(g=>g.changed),A(g=>g.jump)),0);z(E(v,A(g=>g.atBottom)),a),z(E(a,_e(50)),l);const b=C(ot);z(E(s,A(({scrollTop:g})=>g),oe(),ze((g,k)=>ce(p)?{direction:g.direction,prevScrollTop:k}:{direction:k<g.prevScrollTop?ht:ot,prevScrollTop:k},{direction:ot,prevScrollTop:0}),A(g=>g.direction)),b),z(E(s,_e(50),He(to)),b);const m=C(0);return z(E(x,P(g=>!g),He(0)),m),z(E(o,_e(100),W(x),P(([g,k])=>k),ze(([g,k],[j])=>[k,j],[0,0]),A(([g,k])=>k-g)),m),{atBottomState:v,atBottomStateChange:l,atBottomThreshold:u,atTopStateChange:d,atTopThreshold:f,isAtBottom:a,isAtTop:c,isScrolling:x,lastJumpDueToItemResize:I,scrollDirection:b,scrollVelocity:m}},ae(Ie)),ft="top",xt="bottom",zn="none";function Mn(t,e,n){return typeof t=="number"?n===ht&&e===ft||n===ot&&e===xt?t:0:n===ht?e===ft?t.main:t.reverse:e===xt?t.main:t.reverse}function Bn(t,e){return typeof t=="number"?t:t[e]??0}const pn=q(([{deviation:t,fixedHeaderHeight:e,headerHeight:n,scrollTop:s,viewportHeight:o}])=>{const i=Y(),a=C(0),c=C(0),l=C(0),d=ke(E(he(_(s),_(o),_(n),_(i,pt),_(l),_(a),_(e),_(t),_(c)),A(([u,f,x,[p,v],I,b,m,g,k])=>{const j=u-g,T=b+m,L=Math.max(x-j,0);let h=zn;const S=Bn(k,ft),y=Bn(k,xt);return p-=g,p+=x+m,v+=x+m,v-=g,p>u+T-S&&(h=ht),v<u-L+f+y&&(h=ot),h!==zn?[Math.max(j-x-Mn(I,ft,h)-S,0),j-L-m+f+Mn(I,xt,h)+y]:null}),P(u=>u!==null),oe(pt)),[0,0]);return{increaseViewportBy:c,listBoundary:i,overscan:l,topListHeight:a,visibleRange:d}},ae(Ie),{singleton:!0});function so(t,e,n){if(Lt(e)){const s=Sr(t,e);return[{index:Fe(e.groupOffsetTree,s)[0],offset:0,size:0},{data:n==null?void 0:n[0],index:s,offset:0,size:0}]}return[{data:n==null?void 0:n[0],index:t,offset:0,size:0}]}const Ht={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function yt(t,e,n,s,o,i){const{lastIndex:a,lastOffset:c,lastSize:l}=o;let d=0,u=0;if(t.length>0){d=t[0].offset;const I=t[t.length-1];u=I.offset+I.size}const f=n-a,x=c+f*l+(f-1)*s,p=d,v=x-u;return{bottom:u,firstItemIndex:i,items:_n(t,o,i),offsetBottom:v,offsetTop:d,top:p,topItems:_n(e,o,i),topListHeight:e.reduce((I,b)=>b.size+I,0),totalCount:n}}function Er(t,e,n,s,o,i){let a=0;if(n.groupIndices.length>0)for(const u of n.groupIndices){if(u-a>=t)break;a++}const c=t+a,l=un(e,c),d=Array.from({length:c}).map((u,f)=>({data:i[f+l],index:f+l,offset:0,size:0}));return yt(d,[],c,o,n,s)}function _n(t,e,n){if(t.length===0)return[];if(!Lt(e))return t.map(d=>({...d,index:d.index+n,originalIndex:d.index}));const s=t[0].index,o=t[t.length-1].index,i=[],a=et(e.groupOffsetTree,s,o);let c,l=0;for(const d of t){(!c||c.end<d.index)&&(c=a.shift(),l=e.groupIndices.indexOf(c.start));let u;d.index===c.start?u={index:l,type:"group"}:u={groupIndex:l,index:d.index-(l+1)+n},i.push({...u,data:d.data,offset:d.offset,originalIndex:d.index,size:d.size})}return i}function Pn(t,e){return t===void 0?0:typeof t=="number"?t:t[e]??0}const Ze=q(([{data:t,firstItemIndex:e,gap:n,sizes:s,totalCount:o},i,{listBoundary:a,topListHeight:c,visibleRange:l},{initialTopMostItemIndex:d,scrolledToInitialItem:u},{topListHeight:f},x,{didMount:p},{recalcInProgress:v}])=>{const I=C([]),b=C(0),m=Y(),g=C(0);z(i.topItemsIndexes,I);const k=ke(E(he(p,v,_(l,pt),_(o),_(s),_(d),u,_(I),_(e),_(n),_(g),t),P(([h,S,,y,,,,,,,,F])=>{const O=F!==void 0&&F.length!==y;return h&&!S&&!O}),A(([,,[h,S],y,F,O,U,D,M,X,Q,J])=>{var B,Z;const ie=F,{offsetTree:Ee,sizeTree:be}=ie,Se=ce(b);if(y===0)return{...Ht,totalCount:y};if(h===0&&S===0)return Se===0?{...Ht,totalCount:y}:Er(Se,O,F,M,X,J||[]);if(ne(be))return Se>0?null:yt(so(un(O,y),ie,J),[],y,X,ie,M);const Ae=[];if(D.length>0){const ee=D[0],le=D[D.length-1];let fe=0;for(const pe of et(be,ee,le)){const re=pe.value,de=Math.max(pe.start,ee),Te=Math.min(pe.end,le);for(let me=de;me<=Te;me++)Ae.push({data:J==null?void 0:J[me],index:me,offset:fe,size:re}),fe+=re}}if(!U)return yt([],Ae,y,X,ie,M);const ve=D.length>0?D[D.length-1]+1:0,R=Vs(Ee,h,S,ve);if(R.length===0)return null;const V=y-1,K=Ot([],ee=>{for(const le of R){const fe=le.value;let pe=fe.offset,re=le.start;const de=fe.size;if(fe.offset<h){re+=Math.floor((h-fe.offset+X)/(de+X));const me=re-le.start;pe+=me*de+me*X}re<ve&&(pe+=(ve-re)*de,re=ve);const Te=Math.min(le.end,V);for(let me=re;me<=Te&&!(pe>=S);me++)ee.push({data:J==null?void 0:J[me],index:me,offset:pe,size:de}),pe+=de+X}}),ue=Pn(Q,ft),N=Pn(Q,xt);if(K.length>0&&(ue>0||N>0)){const ee=K[0],le=K[K.length-1];if(ue>0&&ee.index>ve){const fe=Math.min(ue,ee.index-ve),pe=[];let re=ee.offset;for(let de=ee.index-1;de>=ee.index-fe;de--){const Te=((B=et(be,de,de)[0])==null?void 0:B.value)??ee.size;re-=Te+X,pe.unshift({data:J==null?void 0:J[de],index:de,offset:re,size:Te})}K.unshift(...pe)}if(N>0&&le.index<V){const fe=Math.min(N,V-le.index);let pe=le.offset+le.size+X;for(let re=le.index+1;re<=le.index+fe;re++){const de=((Z=et(be,re,re)[0])==null?void 0:Z.value)??le.size;K.push({data:J==null?void 0:J[re],index:re,offset:pe,size:de}),pe+=de+X}}}return yt(K,Ae,y,X,ie,M)}),P(h=>h!==null),oe()),Ht);z(E(t,P(sn),A(h=>h==null?void 0:h.length)),o),z(E(k,A(h=>h.topListHeight)),f),z(f,c),z(E(k,A(h=>[h.top,h.bottom])),a),z(E(k,A(h=>h.items)),m);const j=ye(E(k,P(({items:h})=>h.length>0),W(o,t),P(([{items:h},S])=>h[h.length-1].originalIndex===S-1),A(([,h,S])=>[h-1,S]),oe(pt),A(([h])=>h))),T=ye(E(k,_e(200),P(({items:h,topItems:S})=>h.length>0&&h[0].originalIndex===S.length),A(({items:h})=>h[0].index),oe())),L=ye(E(k,P(({items:h})=>h.length>0),A(({items:h})=>{let S=0,y=h.length-1;for(;h[S].type==="group"&&S<y;)S++;for(;h[y].type==="group"&&y>S;)y--;return{endIndex:h[y].index,startIndex:h[S].index}}),oe(br)));return{endReached:j,initialItemCount:b,itemsRendered:m,listState:k,minOverscanItemCount:g,rangeChanged:L,startReached:T,topItemsIndexes:I,...x}},ae(Be,kr,pn,bt,gt,vt,We,ln),{singleton:!0}),Nr=q(([{fixedFooterHeight:t,fixedHeaderHeight:e,footerHeight:n,headerHeight:s},{listState:o}])=>{const i=Y(),a=ke(E(he(n,t,s,e,o),A(([c,l,d,u,f])=>c+l+d+u+f.offsetBottom+f.bottom)),0);return z(_(a),i),{totalListHeight:a,totalListHeightChanged:i}},ae(Ie,Ze),{singleton:!0}),oo=q(([{viewportHeight:t},{totalListHeight:e}])=>{const n=C(!1),s=ke(E(he(n,t,e),P(([o])=>o),A(([,o,i])=>Math.max(0,o-i)),_e(0),oe()),0);return{alignToBottom:n,paddingTopAddition:s}},ae(Ie,Nr),{singleton:!0}),yr=q(()=>({context:C(null)})),ao=({itemBottom:t,itemTop:e,locationParams:{align:n,behavior:s,...o},viewportBottom:i,viewportTop:a})=>e<a?{...o,align:n??"start",...s===void 0?{}:{behavior:s}}:t>i?{...o,align:n??"end",...s===void 0?{}:{behavior:s}}:null,Cr=q(([{gap:t,sizes:e,totalCount:n},{fixedFooterHeight:s,fixedHeaderHeight:o,headerHeight:i,scrollingInProgress:a,scrollTop:c,viewportHeight:l},{scrollToIndex:d}])=>{const u=Y();return z(E(u,W(e,l,n,i,o,s,c),W(t),A(([[f,x,p,v,I,b,m,g],k])=>{const{calculateViewLocation:j=ao,done:T,...L}=f,h=wr(f,x,v-1),S=mt(h,x.offsetTree,k)+I+b,y=S+Fe(x.sizeTree,h)[1],F=g+b,O=g+p-m,U=j({itemBottom:y,itemTop:S,locationParams:L,viewportBottom:O,viewportTop:F});return U===null?T==null||T():T&&Le(E(a,P(D=>!D),Ye(ce(a)?1:2)),T),U}),P(f=>f!==null)),d),{scrollIntoView:u}},ae(Be,Ie,gt,Ze,Ge),{singleton:!0});function $n(t){return t===!1?!1:t==="smooth"?"smooth":"auto"}const io=(t,e)=>typeof t=="function"?$n(t(e)):e&&$n(t),lo=q(([{listRefresh:t,totalCount:e,fixedItemSize:n,data:s},{atBottomState:o,isAtBottom:i},{scrollToIndex:a},{scrolledToInitialItem:c},{didMount:l,propsReady:d},{log:u},{scrollingInProgress:f},{context:x},{scrollIntoView:p}])=>{const v=C(!1),I=Y();let b=null;function m(T){G(a,{align:"end",behavior:T,index:"LAST"})}te(E(he(E(_(e),Ye(1)),l),W(_(v),i,c,f),A(([[T,L],h,S,y,F])=>{let O=L&&y,U="auto";return O&&(U=io(h,S||F),O=O&&U!==!1),{followOutputBehavior:U,shouldFollow:O,totalCount:T}}),P(({shouldFollow:T})=>T)),({followOutputBehavior:T,totalCount:L})=>{b!==null&&(b(),b=null),ce(n)===void 0?b=Le(t,()=>{ce(u)("following output to ",{totalCount:L},ge.DEBUG),m(T),b=null}):requestAnimationFrame(()=>{ce(u)("following output to ",{totalCount:L},ge.DEBUG),m(T)})});function g(T){const L=Le(o,h=>{T&&!h.atBottom&&h.notAtBottomBecause==="SIZE_INCREASED"&&b===null&&(ce(u)("scrolling to bottom due to increased size",{},ge.DEBUG),m("auto"))});setTimeout(L,100)}te(E(he(_(v),e,d),P(([T,,L])=>T!==!1&&L),ze(({value:T},[,L])=>({refreshed:T===L,value:L}),{refreshed:!1,value:0}),P(({refreshed:T})=>T),W(v,e)),([,T])=>{ce(c)&&g(T!==!1)}),te(I,()=>{g(ce(v)!==!1)}),te(he(_(v),o),([T,L])=>{T!==!1&&!L.atBottom&&L.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&m("auto")});const k=C(null),j=Y();return z(Xt(E(_(s),A(T=>(T==null?void 0:T.length)??0)),E(_(e))),j),te(E(he(E(j,Ye(1)),l),W(_(k),c,f,x),A(([[T,L],h,S,y,F])=>L&&S&&(h==null?void 0:h({context:F,totalCount:T,scrollingInProgress:y}))),P(T=>!!T),_e(0)),T=>{b!==null&&(b(),b=null),ce(n)===void 0?b=Le(t,()=>{ce(u)("scrolling into view",{}),G(p,T),b=null}):requestAnimationFrame(()=>{ce(u)("scrolling into view",{}),G(p,T)})}),{autoscrollToBottom:I,followOutput:v,scrollIntoViewOnChange:k}},ae(Be,vt,gt,bt,We,Ge,Ie,yr,Cr)),co=q(([{data:t,firstItemIndex:e,gap:n,sizes:s},{initialTopMostItemIndex:o},{initialItemCount:i,listState:a},{didMount:c}])=>(z(E(c,W(i),P(([,l])=>l!==0),W(o,s,e,n,t),A(([[,l],d,u,f,x,p=[]])=>Er(l,d,u,f,x,p))),a),{}),ae(Be,bt,Ze,We),{singleton:!0}),uo=q(([{didMount:t},{scrollTo:e},{listState:n}])=>{const s=C(0);return te(E(t,W(s),P(([,o])=>o!==0),A(([,o])=>({top:o}))),o=>{Le(E(n,Ye(1),P(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{G(e,o)})})}),{initialScrollTop:s}},ae(We,Ie,Ze),{singleton:!0}),jr=q(([{scrollVelocity:t}])=>{const e=C(!1),n=Y(),s=C(!1);return z(E(t,W(s,e,n),P(([o,i])=>i!==!1&&i!==void 0),A(([o,i,a,c])=>{const{enter:l,exit:d}=i;if(a){if(d(o,c))return!1}else if(l(o,c))return!0;return a}),oe()),e),te(E(he(e,t,n),W(s)),([[o,i,a],c])=>{o&&c!==!1&&c!==void 0&&c.change&&c.change(i,a)}),{isSeeking:e,scrollSeekConfiguration:s,scrollSeekRangeChanged:n,scrollVelocity:t}},ae(vt),{singleton:!0}),mn=q(([{scrollContainerState:t,scrollTo:e}])=>{const n=Y(),s=Y(),o=Y(),i=C(!1),a=C(void 0);return z(E(he(n,s),A(([{scrollTop:c,viewportHeight:l},{offsetTop:d,listHeight:u}])=>({scrollHeight:u,scrollTop:Math.max(0,c-d),viewportHeight:l}))),t),z(E(e,W(s),A(([c,{offsetTop:l}])=>({...c,top:c.top+l}))),o),{customScrollParent:a,useWindowScroll:i,windowScrollContainerState:n,windowScrollTo:o,windowViewportRect:s}},ae(Ie)),po=q(([{sizeRanges:t,sizes:e},{headerHeight:n,scrollTop:s},{initialTopMostItemIndex:o},{didMount:i},{useWindowScroll:a,windowScrollContainerState:c,windowViewportRect:l}])=>{const d=Y(),u=C(void 0),f=C(null),x=C(null);return z(c,f),z(l,x),te(E(d,W(e,s,a,f,x,n)),([p,v,I,b,m,g,k])=>{const j=Xs(v.sizeTree);b&&m!==null&&g!==null&&(I=m.scrollTop-g.offsetTop),I-=k,p({ranges:j,scrollTop:I})}),z(E(u,P(sn),A(mo)),o),z(E(i,W(u),P(([,p])=>p!==void 0),oe(),A(([,p])=>p.ranges)),t),{getState:d,restoreStateFrom:u}},ae(Be,Ie,bt,We,mn));function mo(t){return{align:"start",index:0,offset:t.scrollTop}}const ho=q(([{topItemsIndexes:t}])=>{const e=C(0);return z(E(e,P(n=>n>=0),A(n=>Array.from({length:n}).map((s,o)=>o))),t),{topItemCount:e}},ae(Ze));function Rr(t){let e=!1,n;return()=>(e||(e=!0,n=t()),n)}const fo=Rr(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),xo=q(([{deviation:t,scrollBy:e,scrollingInProgress:n,scrollTop:s},{isAtBottom:o,isScrolling:i,lastJumpDueToItemResize:a,scrollDirection:c},{listState:l},{beforeUnshiftWith:d,gap:u,shiftWithOffset:f,sizes:x},{log:p},{recalcInProgress:v}])=>{const I=ye(E(l,W(a),ze(([,m,g,k],[{bottom:j,items:T,offsetBottom:L,totalCount:h},S])=>{const y=j+L;let F=0;return g===h&&m.length>0&&T.length>0&&(T[0].originalIndex===0&&m[0].originalIndex===0||(F=y-k,F!==0&&(F+=S))),[F,T,h,y]},[0,[],0,0]),P(([m])=>m!==0),W(s,c,n,o,p,v),P(([,m,g,k,,,j])=>!j&&!k&&m!==0&&g===ht),A(([[m],,,,,g])=>(g("Upward scrolling compensation",{amount:m},ge.DEBUG),m))));function b(m){m>0?(G(e,{behavior:"auto",top:-m}),G(t,0)):(G(t,0),G(e,{behavior:"auto",top:-m}))}return te(E(I,W(t,i)),([m,g,k])=>{k&&fo()?G(t,g-m):b(-m)}),te(E(he(ke(i,!1),t,v),P(([m,g,k])=>!m&&!k&&g!==0),A(([m,g])=>g),_e(1)),b),z(E(f,A(m=>({top:-m}))),e),te(E(d,W(x,u),A(([m,{groupIndices:g,lastSize:k,sizeTree:j},T])=>{function L(O){return O*(k+T)}if(g.length===0)return L(m);let h=0;const S=ut(j,0);let y=0,F=0;for(;y<m;){y++,h+=S;let O=g.length===F+1?1/0:g[F+1]-g[F]-1;y+O>m&&(h-=S,O=m-y+1),y+=O,h+=L(O),F++}return h})),m=>{G(t,m),requestAnimationFrame(()=>{G(e,{top:m}),requestAnimationFrame(()=>{G(t,0),G(v,!1)})})}),{deviation:t}},ae(Ie,vt,Ze,Be,Ge,ln)),go=q(([t,e,n,s,o,i,a,c,l,d,u])=>({...t,...e,...n,...s,...o,...i,...a,...c,...l,...d,...u}),ae(pn,co,We,jr,Nr,uo,oo,mn,Cr,Ge,yr)),Ar=q(([{data:t,defaultItemSize:e,firstItemIndex:n,fixedItemSize:s,fixedGroupSize:o,gap:i,groupIndices:a,heightEstimates:c,itemSize:l,sizeRanges:d,sizes:u,statefulTotalCount:f,totalCount:x,trackItemSizes:p},{initialItemFinalLocationReached:v,initialTopMostItemIndex:I,scrolledToInitialItem:b},m,g,k,j,{scrollToIndex:T},L,{topItemCount:h},{groupCounts:S},y])=>{const{listState:F,minOverscanItemCount:O,topItemsIndexes:U,rangeChanged:D,...M}=j;return z(D,y.scrollSeekRangeChanged),z(E(y.windowViewportRect,A(X=>X.visibleHeight)),m.viewportHeight),{data:t,defaultItemHeight:e,firstItemIndex:n,fixedItemHeight:s,fixedGroupHeight:o,gap:i,groupCounts:S,heightEstimates:c,initialItemFinalLocationReached:v,initialTopMostItemIndex:I,scrolledToInitialItem:b,sizeRanges:d,topItemCount:h,topItemsIndexes:U,totalCount:x,...k,groupIndices:a,itemSize:l,listState:F,minOverscanItemCount:O,scrollToIndex:T,statefulTotalCount:f,trackItemSizes:p,rangeChanged:D,...M,...y,...m,sizes:u,...g}},ae(Be,bt,Ie,po,lo,Ze,gt,xo,ho,kr,go));function bo(t,e){const n={},s={};let o=0;const i=t.length;for(;o<i;)s[t[o]]=1,o+=1;for(const a in e)Object.hasOwn(s,a)||(n[a]=e[a]);return n}const kt=typeof document>"u"?H.useEffect:H.useLayoutEffect;function Or(t,e,n){const s=Object.keys(e.required||{}),o=Object.keys(e.optional||{}),i=Object.keys(e.methods||{}),a=Object.keys(e.events||{}),c=H.createContext({});function l(b,m){b.propsReady!==void 0&&G(b.propsReady,!1);for(const g of s){const k=b[e.required[g]];G(k,m[g])}for(const g of o)if(g in m){const k=b[e.optional[g]];G(k,m[g])}b.propsReady!==void 0&&G(b.propsReady,!0)}function d(b){return i.reduce((m,g)=>(m[g]=k=>{const j=b[e.methods[g]];G(j,k)},m),{})}function u(b){return a.reduce((m,g)=>(m[g]=As(b[e.events[g]]),m),{})}const f=H.forwardRef(function(b,m){const{children:g,...k}=b,[j]=H.useState(()=>Ot(Fs(t),h=>{l(h,k)})),[T]=H.useState(Rn(u,j));kt(()=>{for(const h of a)h in k&&te(T[h],k[h]);return()=>{Object.values(T).map(on)}},[k,T,j]),kt(()=>{l(j,k)}),H.useImperativeHandle(m,jn(d(j)));const L=n;return r.jsx(c.Provider,{value:j,children:n===void 0?g:r.jsx(L,{...bo([...s,...o,...a],k),children:g})})}),x=b=>{const m=H.useContext(c);return H.useCallback(g=>{G(m[b],g)},[m,b])},p=b=>{const m=H.useContext(c)[b],g=H.useCallback(k=>te(m,k),[m]);return H.useSyncExternalStore(g,()=>ce(m),()=>ce(m))},v=b=>{const m=H.useContext(c)[b],[g,k]=H.useState(Rn(ce,m));return kt(()=>te(m,j=>{j!==g&&k(jn(j))}),[m,g]),g},I=parseInt(H.version,10)>=18?p:v;return{Component:f,useEmitter:(b,m)=>{const g=H.useContext(c)[b];kt(()=>te(g,m),[m,g])},useEmitterValue:I,usePublisher:x}}const Lr=H.createContext(void 0),Fr=H.createContext(void 0),zt="-webkit-sticky",Un="sticky",hn=Rr(()=>{if(typeof document>"u")return Un;const t=document.createElement("div");return t.style.position=zt,t.style.position===zt?zt:Un}),Dr=typeof document>"u"?H.useEffect:H.useLayoutEffect;function Mt(t){return"self"in t}function vo(t){return"body"in t}function Hr(t,e,n,s=nt,o,i){const a=H.useRef(null),c=H.useRef(null),l=H.useRef(null),d=H.useCallback(x=>{let p,v,I;const b=x.target;if(vo(b)||Mt(b)){const g=Mt(b)?b:b.defaultView;I=i===!0?Ke(g,g.scrollX):g.scrollY,p=i===!0?g.document.documentElement.scrollWidth:g.document.documentElement.scrollHeight,v=i===!0?g.innerWidth:g.innerHeight}else I=i===!0?Ke(b,b.scrollLeft):b.scrollTop,p=i===!0?b.scrollWidth:b.scrollHeight,v=i===!0?b.offsetWidth:b.offsetHeight;const m=()=>{t({scrollHeight:p,scrollTop:Math.max(I,0),viewportHeight:v})};x.suppressFlushSync===!0?m():gs.flushSync(m),c.current!==null&&(I===c.current||I<=0||I===p-v)&&(c.current=null,e(!0),l.current&&(clearTimeout(l.current),l.current=null))},[t,e,i]);H.useEffect(()=>{const x=o??a.current;return On(x),s(o??a.current),d({suppressFlushSync:!0,target:x}),x.addEventListener("scroll",d,{passive:!0}),()=>{On(x),s(null),x.removeEventListener("scroll",d)}},[a,d,n,s,o]);function u(x){const p=a.current;if(!p||(i===!0?"offsetWidth"in p&&p.offsetWidth===0:"offsetHeight"in p&&p.offsetHeight===0))return;const v=x.behavior==="smooth";let I,b,m;Mt(p)?(b=Math.max($e(p.document.documentElement,i===!0?"width":"height"),i===!0?p.document.documentElement.scrollWidth:p.document.documentElement.scrollHeight),I=i===!0?p.innerWidth:p.innerHeight,m=i===!0?Ke(p,p.scrollX):p.scrollY):(b=p[i===!0?"scrollWidth":"scrollHeight"],I=$e(p,i===!0?"width":"height"),m=i===!0?Ke(p,p.scrollLeft):p.scrollTop);const g=b-I;if(x.top===void 0){p.scrollTo(x);return}const k=Math.ceil(Math.max(Math.min(g,x.top),0));if(x.top=k,Ir(I,b)||k===m){t({scrollHeight:b,scrollTop:m,viewportHeight:I}),v&&e(!0);return}v?(c.current=k,l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{l.current=null,c.current=null,e(!0)},1e3)):c.current=null,i===!0&&(x={...x.behavior===void 0?{}:{behavior:x.behavior},left:Ln(p,k)}),p.scrollTo(x)}function f(x){i===!0&&(x={...x.behavior===void 0?{}:{behavior:x.behavior},...x.top===void 0?{}:{left:Ln(a.current,x.top)}}),a.current.scrollBy(x)}return{scrollByCallback:f,scrollerRef:a,scrollToCallback:u}}function fn(t){return t}const So=q(()=>{const t=C(c=>`Item ${c}`),e=C(c=>`Group ${c}`),n=C({}),s=C(fn),o=C("div"),i=C(nt),a=(c,l=null)=>ke(E(n,A(d=>d[c]),oe()),l);return{components:n,computeItemKey:s,EmptyPlaceholder:a("EmptyPlaceholder"),FooterComponent:a("Footer"),GroupComponent:a("Group","div"),groupContent:e,HeaderComponent:a("Header"),HeaderFooterTag:o,ItemComponent:a("Item","div"),itemContent:t,ListComponent:a("List","div"),ScrollerComponent:a("Scroller","div"),scrollerRef:i,ScrollSeekPlaceholder:a("ScrollSeekPlaceholder"),TopItemListComponent:a("TopItemList")}}),wo=q(([t,e])=>({...t,...e}),ae(Ar,So)),ko=({height:t})=>r.jsx("div",{style:{height:t}}),To={overflowAnchor:"none",position:hn(),zIndex:1},zr={overflowAnchor:"none"},Io={...zr,display:"inline-block",height:"100%"},Gn=H.memo(function({showTopList:t=!1}){const e=$("listState"),n=Ce("sizeRanges"),s=$("useWindowScroll"),o=$("customScrollParent"),i=Ce("windowScrollContainerState"),a=Ce("scrollContainerState"),c=o||s?i:a,l=$("itemContent"),d=$("context"),u=$("groupContent"),f=$("trackItemSizes"),x=$("itemSize"),p=$("log"),v=Ce("gap"),I=$("horizontalDirection"),{callbackRef:b}=Ms(n,x,f,t?nt:c,p,v,o,I,$("skipAnimationFrameInResizeObserver")),[m,g]=H.useState(0);gn("deviation",M=>{m!==M&&g(M)});const k=$("EmptyPlaceholder"),j=$("ScrollSeekPlaceholder")??ko,T=$("ListComponent"),L=$("ItemComponent"),h=$("GroupComponent"),S=$("computeItemKey"),y=$("isSeeking"),F=$("groupIndices").length>0,O=$("alignToBottom"),U=$("initialItemFinalLocationReached"),D=t?{}:{boxSizing:"border-box",...I?{display:"inline-block",height:"100%",marginInlineStart:m===0?O?"auto":0:m,paddingInlineEnd:e.offsetBottom,paddingInlineStart:e.offsetTop,whiteSpace:"nowrap"}:{marginTop:m===0?O?"auto":0:m,paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},...U?{}:{visibility:"hidden"}};return!t&&e.totalCount===0&&k!==null&&k!==void 0?r.jsx(k,{...we(k,d)}):r.jsx(T,{...we(T,d),"data-testid":t?"virtuoso-top-item-list":"virtuoso-item-list",ref:b,style:D,children:(t?e.topItems:e.items).map(M=>{const X=M.originalIndex,Q=S(X+e.firstItemIndex,M.data,d);return y?w.createElement(j,{...we(j,d),height:M.size,index:M.index,key:Q,type:M.type||"item",...M.type==="group"?{}:{groupIndex:M.groupIndex}}):M.type==="group"?w.createElement(h,{...we(h,d),"data-index":X,"data-item-index":M.index,"data-known-size":M.size,key:Q,style:To},u(M.index,d)):w.createElement(L,{...we(L,d),...Co(L,M.data),"data-index":X,"data-item-group-index":M.groupIndex,"data-item-index":M.index,"data-known-size":M.size,key:Q,style:I?Io:zr},F?l(M.index,M.groupIndex,M.data,d):l(M.index,M.data,d))})})}),Eo={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},No={outline:"none",overflowX:"auto",position:"relative"},xn=t=>({height:"100%",position:"absolute",top:0,width:"100%",...t?{display:"flex",flexDirection:"column"}:void 0}),Mr=(t,e,n=0)=>({...xn(t),position:e?"relative":"absolute",top:e?-n:0}),yo={position:hn(),top:0,width:"100%",zIndex:1};function we(t,e){if(typeof t!="string")return{context:e}}function Co(t,e){return{item:typeof t=="string"?void 0:e}}const jo=H.memo(function(){const t=$("HeaderComponent"),e=Ce("headerHeight"),n=$("HeaderFooterTag"),s=Je(H.useMemo(()=>i=>{e($e(i,"height"))},[e]),!0,$("skipAnimationFrameInResizeObserver")),o=$("context");return t!=null?r.jsx(n,{ref:s,children:r.jsx(t,{...we(t,o)})}):null}),Ro=H.memo(function(){const t=$("FooterComponent"),e=Ce("footerHeight"),n=$("HeaderFooterTag"),s=Je(H.useMemo(()=>i=>{e($e(i,"height"))},[e]),!0,$("skipAnimationFrameInResizeObserver")),o=$("context");return t!=null?r.jsx(n,{ref:s,children:r.jsx(t,{...we(t,o)})}):null});function Br({useEmitter:t,useEmitterValue:e,usePublisher:n}){return H.memo(function({children:s,style:o,context:i,...a}){const c=n("scrollContainerState"),l=e("ScrollerComponent"),d=n("smoothScrollTargetReached"),u=e("scrollerRef"),f=e("horizontalDirection")||!1,{scrollByCallback:x,scrollerRef:p,scrollToCallback:v}=Hr(c,d,l,u,void 0,f);return t("scrollTo",v),t("scrollBy",x),r.jsx(l,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:p,style:{...f?No:Eo,...o},tabIndex:0,...a,...we(l,i),children:s})})}function _r({useEmitter:t,useEmitterValue:e,usePublisher:n}){return H.memo(function({children:s,style:o,context:i,...a}){const c=n("windowScrollContainerState"),l=e("ScrollerComponent"),d=n("smoothScrollTargetReached"),u=e("totalListHeight"),f=e("deviation"),x=e("customScrollParent"),p=H.useRef(null),v=e("scrollerRef"),{scrollByCallback:I,scrollerRef:b,scrollToCallback:m}=Hr(c,d,l,v,x);return Dr(()=>{var g;return b.current=x??((g=p.current)==null?void 0:g.ownerDocument.defaultView),()=>{b.current=null}},[b,x]),t("windowScrollTo",m),t("scrollBy",I),r.jsx(l,{ref:p,"data-virtuoso-scroller":!0,style:{position:"relative",...o,...u===0?void 0:{height:u+f}},...a,...we(l,i),children:s})})}const Ao=({children:t})=>{const e=H.useContext(Lr),n=Ce("viewportHeight"),s=Ce("fixedItemHeight"),o=$("alignToBottom"),i=$("horizontalDirection"),a=H.useMemo(()=>lr(n,l=>$e(l,i?"width":"height")),[n,i]),c=Je(a,!0,$("skipAnimationFrameInResizeObserver"));return H.useEffect(()=>{e&&(n(e.viewportHeight),s(e.itemHeight))},[e,n,s]),r.jsx("div",{"data-viewport-type":"element",ref:c,style:xn(o),children:t})},Oo=({children:t})=>{const e=H.useContext(Lr),n=Ce("windowViewportRect"),s=Ce("fixedItemHeight"),o=$("customScrollParent"),i=$("useWindowScroll"),a=$("topListHeight"),c=pr(n,o,$("skipAnimationFrameInResizeObserver")),l=$("alignToBottom");return H.useEffect(()=>{e&&(s(e.itemHeight),n({listHeight:0,offsetTop:0,visibleHeight:e.viewportHeight,visibleWidth:100}))},[e,n,s]),r.jsx("div",{"data-viewport-type":"window",ref:c,style:Mr(l,i,a),children:t})},Lo=({children:t})=>{const e=$("TopItemListComponent")??"div",n=$("headerHeight"),s={...yo,marginTop:`${n}px`},o=$("context");return r.jsx(e,{style:s,...we(e,o),children:t})},Fo=H.memo(function(t){const e=$("useWindowScroll"),n=$("topItemsIndexes").length>0,s=$("customScrollParent"),o=$("context");return r.jsxs(s||e?zo:Ho,{...t,context:o,children:[n&&r.jsx(Lo,{children:r.jsx(Gn,{showTopList:!0})}),r.jsxs(s||e?Oo:Ao,{children:[r.jsx(jo,{}),r.jsx(Gn,{}),r.jsx(Ro,{})]})]})}),{Component:Do,useEmitter:gn,useEmitterValue:$,usePublisher:Ce}=Or(wo,{optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",scrollIntoViewOnChange:"scrollIntoViewOnChange",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",minOverscanItemCount:"minOverscanItemCount",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedGroupHeight:"fixedGroupHeight",fixedItemHeight:"fixedItemHeight",heightEstimates:"heightEstimates",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"HeaderFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",horizontalDirection:"horizontalDirection",skipAnimationFrameInResizeObserver:"skipAnimationFrameInResizeObserver"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},Fo),Ho=Br({useEmitter:gn,useEmitterValue:$,usePublisher:Ce}),zo=_r({useEmitter:gn,useEmitterValue:$,usePublisher:Ce}),Mo=Do,Bo=q(()=>{const t=C(d=>r.jsxs("td",{children:["Item $",d]})),e=C(null),n=C(d=>r.jsxs("td",{colSpan:1e3,children:["Group ",d]})),s=C(null),o=C(null),i=C({}),a=C(fn),c=C(nt),l=(d,u=null)=>ke(E(i,A(f=>f[d]),oe()),u);return{components:i,computeItemKey:a,context:e,EmptyPlaceholder:l("EmptyPlaceholder"),FillerRow:l("FillerRow"),fixedFooterContent:o,fixedHeaderContent:s,itemContent:t,groupContent:n,ScrollerComponent:l("Scroller","div"),scrollerRef:c,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder"),TableBodyComponent:l("TableBody","tbody"),TableComponent:l("Table","table"),TableFooterComponent:l("TableFoot","tfoot"),TableHeadComponent:l("TableHead","thead"),TableRowComponent:l("TableRow","tr"),GroupComponent:l("Group","tr")}});ae(Ar,Bo);hn();const Wn={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},_o={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:Vn,floor:jt,max:at,min:Bt,round:Kn}=Math;function Xn(t,e,n){return Array.from({length:e-t+1}).map((s,o)=>({data:n===null?null:n[o+t],index:o+t}))}function Po(t){return{..._o,items:t}}function Tt(t,e){return t!==void 0&&t.width===e.width&&t.height===e.height}function $o(t,e){return t!==void 0&&t.column===e.column&&t.row===e.row}const Uo=q(([{increaseViewportBy:t,listBoundary:e,overscan:n,visibleRange:s},{footerHeight:o,headerHeight:i,scrollBy:a,scrollContainerState:c,scrollTo:l,scrollTop:d,smoothScrollTargetReached:u,viewportHeight:f},x,p,{didMount:v,propsReady:I},{customScrollParent:b,useWindowScroll:m,windowScrollContainerState:g,windowScrollTo:k,windowViewportRect:j},T])=>{const L=C(0),h=C(0),S=C(Wn),y=C({height:0,width:0}),F=C({height:0,width:0}),O=Y(),U=Y(),D=C(0),M=C(null),X=C({column:0,row:0}),Q=Y(),J=Y(),ie=C(!1),Ee=C(0),be=C(!0),Se=C(!1),Ae=C(!1);te(E(v,W(Ee),P(([N,B])=>!en(B))),()=>{G(be,!1)}),te(E(he(v,be,F,y,Ee,Se),P(([N,B,Z,ee,,le])=>N&&!B&&Z.height!==0&&ee.height!==0&&!le)),([,,,,N])=>{if(N===void 0){G(be,!0);return}G(Se,!0),dn(1,()=>{G(O,N)}),Le(E(d),()=>{G(e,[0,0]),G(be,!0)})}),z(E(J,P(N=>N!=null&&N.scrollTop>0),He(0)),h),te(E(v,W(J),P(([,N])=>N!=null)),([,N])=>{N&&(G(y,N.viewport),G(F,N.item),G(X,N.gap),N.scrollTop>0&&(G(ie,!0),Le(E(d,Ye(1)),B=>{G(ie,!1)}),G(l,{top:N.scrollTop})))}),z(E(y,A(({height:N})=>N)),f),z(E(he(_(y,Tt),_(F,Tt),_(X,(N,B)=>N!==void 0&&N.column===B.column&&N.row===B.row),_(d)),A(([N,B,Z,ee])=>({gap:Z,item:B,scrollTop:ee,viewport:N}))),Q),z(E(he(_(L),s,_(X,$o),_(F,Tt),_(y,Tt),_(M),_(h),_(ie),_(be),_(Ee)),P(([,,,,,,,N])=>!N),A(([N,[B,Z],ee,le,fe,pe,re,,de,Te])=>{const{column:me,row:rt}=ee,{height:St,width:Ft}=le,{width:bn}=fe;if(re===0&&(N===0||bn===0))return Wn;if(Ft===0){const Tn=un(Te,N),Xr=Tn+Math.max(re-1,0);return Po(Xn(Tn,Xr,pe))}const wt=Pr(bn,Ft,me);let Qe,Ve;de?B===0&&Z===0&&re>0?(Qe=0,Ve=re-1):(Qe=wt*jt((B+rt)/(St+rt)),Ve=wt*Vn((Z+rt)/(St+rt))-1,Ve=Bt(N-1,at(Ve,wt-1)),Qe=Bt(Ve,at(0,Qe))):(Qe=0,Ve=-1);const vn=Xn(Qe,Ve,pe),{bottom:Sn,top:wn}=Yn(fe,ee,le,vn),kn=Vn(N/wt),Kr=kn*St+(kn-1)*rt-Sn;return{bottom:Sn,itemHeight:St,items:vn,itemWidth:Ft,offsetBottom:Kr,offsetTop:wn,top:wn}})),S),z(E(M,P(N=>N!==null),A(N=>N.length)),L),z(E(he(y,F,S,X),P(([N,B,{items:Z}])=>Z.length>0&&B.height!==0&&N.height!==0),A(([N,B,{items:Z},ee])=>{const{bottom:le,top:fe}=Yn(N,ee,B,Z);return[fe,le]}),oe(pt)),e);const ve=C(!1);z(E(d,W(ve),A(([N,B])=>B||N!==0)),ve);const R=ye(E(he(S,L),P(([{items:N}])=>N.length>0),W(ve),P(([[N,B],Z])=>{const ee=N.items[N.items.length-1].index===B-1;return(Z||N.bottom>0&&N.itemHeight>0&&N.offsetBottom===0&&N.items.length===B)&&ee}),A(([[,N]])=>N-1),oe())),V=ye(E(_(S),P(({items:N})=>N.length>0&&N[0].index===0),He(0),oe())),K=ye(E(_(S),W(ie),P(([{items:N},B])=>N.length>0&&!B),A(([{items:N}])=>({endIndex:N[N.length-1].index,startIndex:N[0].index})),oe(br),_e(0)));z(K,p.scrollSeekRangeChanged),z(E(O,W(y,F,L,X),A(([N,B,Z,ee,le])=>{const fe=Tr(N),{align:pe,behavior:re,offset:de}=fe;let Te=fe.index;Te==="LAST"&&(Te=ee-1),Te=at(0,Te,Bt(ee-1,Te));let me=tn(B,le,Z,Te);return pe==="end"?me=Kn(me-B.height+Z.height):pe==="center"&&(me=Kn(me-B.height/2+Z.height/2)),de!==void 0&&de!==0&&(me+=de),{behavior:re,top:me}})),l);const ue=ke(E(S,A(N=>N.offsetBottom+N.bottom)),0);return z(E(j,A(N=>({height:N.visibleHeight,width:N.visibleWidth}))),y),{customScrollParent:b,data:M,deviation:D,footerHeight:o,gap:X,headerHeight:i,increaseViewportBy:t,initialItemCount:h,itemDimensions:F,overscan:n,restoreStateFrom:J,scrollBy:a,scrollContainerState:c,scrollHeight:U,scrollTo:l,scrollToIndex:O,scrollTop:d,smoothScrollTargetReached:u,totalCount:L,useWindowScroll:m,viewportDimensions:y,windowScrollContainerState:g,windowScrollTo:k,windowViewportRect:j,...p,gridState:S,horizontalDirection:Ae,initialTopMostItemIndex:Ee,totalListHeight:ue,...x,endReached:R,propsReady:I,rangeChanged:K,startReached:V,stateChanged:Q,stateRestoreInProgress:ie,...T}},ae(pn,Ie,vt,jr,We,mn,Ge));function Pr(t,e,n){return at(1,jt((t+n)/(jt(e)+n)))}function Yn(t,e,n,s){const{height:o}=n;if(o===void 0||s.length===0)return{bottom:0,top:0};const i=tn(t,e,n,s[0].index);return{bottom:tn(t,e,n,s[s.length-1].index)+o,top:i}}function tn(t,e,n,s){const o=Pr(t.width,n.width,e.column),i=jt(s/o),a=i*n.height+at(0,i-1)*e.row;return a>0?a+e.row:a}const Go=q(()=>{const t=C(f=>`Item ${f}`),e=C({}),n=C(null),s=C("virtuoso-grid-item"),o=C("virtuoso-grid-list"),i=C(fn),a=C("div"),c=C(nt),l=(f,x=null)=>ke(E(e,A(p=>p[f]),oe()),x),d=C(!1),u=C(!1);return z(_(u),d),{components:e,computeItemKey:i,context:n,FooterComponent:l("Footer"),HeaderComponent:l("Header"),headerFooterTag:a,itemClassName:s,ItemComponent:l("Item","div"),itemContent:t,listClassName:o,ListComponent:l("List","div"),readyStateChanged:d,reportReadyState:u,ScrollerComponent:l("Scroller","div"),scrollerRef:c,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}),Wo=q(([t,e])=>({...t,...e}),ae(Uo,Go)),Vo=H.memo(function(){const t=se("gridState"),e=se("listClassName"),n=se("itemClassName"),s=se("itemContent"),o=se("computeItemKey"),i=se("isSeeking"),a=je("scrollHeight"),c=se("ItemComponent"),l=se("ListComponent"),d=se("ScrollSeekPlaceholder"),u=se("context"),f=je("itemDimensions"),x=je("gap"),p=se("log"),v=se("stateRestoreInProgress"),I=je("reportReadyState"),b=Je(H.useMemo(()=>m=>{const g=m.parentElement.parentElement.scrollHeight;a(g);const k=m.firstChild;if(k!==null){const{height:j,width:T}=k.getBoundingClientRect();f({height:j,width:T})}x({column:Jn("column-gap",getComputedStyle(m).columnGap,p),row:Jn("row-gap",getComputedStyle(m).rowGap,p)})},[a,f,x,p]),!0,!1);return Dr(()=>{t.itemHeight>0&&t.itemWidth>0&&I(!0)},[t]),v?null:r.jsx(l,{className:e,ref:b,...we(l,u),"data-testid":"virtuoso-item-list",style:{paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},children:t.items.map(m=>{const g=o(m.index,m.data,u);return i?r.jsx(d,{...we(d,u),height:t.itemHeight,index:m.index,width:t.itemWidth},g):w.createElement(c,{...we(c,u),className:n,"data-index":m.index,key:g},s(m.index,m.data,u))})})}),Ko=H.memo(function(){const t=se("HeaderComponent"),e=je("headerHeight"),n=se("headerFooterTag"),s=Je(H.useMemo(()=>i=>{e($e(i,"height"))},[e]),!0,!1),o=se("context");return t!=null?r.jsx(n,{ref:s,children:r.jsx(t,{...we(t,o)})}):null}),Xo=H.memo(function(){const t=se("FooterComponent"),e=je("footerHeight"),n=se("headerFooterTag"),s=Je(H.useMemo(()=>i=>{e($e(i,"height"))},[e]),!0,!1),o=se("context");return t!=null?r.jsx(n,{ref:s,children:r.jsx(t,{...we(t,o)})}):null}),Yo=({children:t})=>{const e=H.useContext(Fr),n=je("itemDimensions"),s=je("viewportDimensions"),o=Je(H.useMemo(()=>i=>{s(i.getBoundingClientRect())},[s]),!0,!1);return H.useEffect(()=>{e&&(s({height:e.viewportHeight,width:e.viewportWidth}),n({height:e.itemHeight,width:e.itemWidth}))},[e,s,n]),r.jsx("div",{ref:o,style:xn(!1),children:t})},Jo=({children:t})=>{const e=H.useContext(Fr),n=je("windowViewportRect"),s=je("itemDimensions"),o=se("customScrollParent"),i=se("useWindowScroll"),a=pr(n,o,!1);return H.useEffect(()=>{e&&(s({height:e.itemHeight,width:e.itemWidth}),n({listHeight:0,offsetTop:0,visibleHeight:e.viewportHeight,visibleWidth:e.viewportWidth}))},[e,n,s]),r.jsx("div",{ref:a,style:Mr(!1,i),children:t})},Zo=H.memo(function({...t}){const e=se("useWindowScroll"),n=se("customScrollParent"),s=n||e?qo:Qo,o=n||e?Jo:Yo,i=se("context");return r.jsx(s,{...t,...we(s,i),children:r.jsxs(o,{children:[r.jsx(Ko,{}),r.jsx(Vo,{}),r.jsx(Xo,{})]})})}),{useEmitter:$r,useEmitterValue:se,usePublisher:je}=Or(Wo,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex",increaseViewportBy:"increaseViewportBy"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged",readyStateChanged:"readyStateChanged"}},Zo),Qo=Br({useEmitter:$r,useEmitterValue:se,usePublisher:je}),qo=_r({useEmitter:$r,useEmitterValue:se,usePublisher:je});function Jn(t,e,n){return e!=="normal"&&(e==null?void 0:e.endsWith("px"))!==!0&&n(`${t} was not resolved to pixel value correctly`,e,ge.WARN),e==="normal"?0:parseInt(e??"0",10)}Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/});Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}});Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}});Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript"));Prism.languages.js=Prism.languages.javascript;(function(t){t.languages.typescript=t.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),t.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete t.languages.typescript.parameter,delete t.languages.typescript["literal-property"];var e=t.languages.extend("typescript",{});delete e["class-name"],t.languages.typescript["class-name"].inside=e,t.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e}}}}),t.languages.ts=t.languages.typescript})(Prism);(function(t){var e=t.util.clone(t.languages.javascript),n=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,s=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,o=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function i(l,d){return l=l.replace(/<S>/g,function(){return n}).replace(/<BRACES>/g,function(){return s}).replace(/<SPREAD>/g,function(){return o}),RegExp(l,d)}o=i(o).source,t.languages.jsx=t.languages.extend("markup",e),t.languages.jsx.tag.pattern=i(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),t.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,t.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,t.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,t.languages.jsx.tag.inside.comment=e.comment,t.languages.insertBefore("inside","attr-name",{spread:{pattern:i(/<SPREAD>/.source),inside:t.languages.jsx}},t.languages.jsx.tag),t.languages.insertBefore("inside","special-attr",{script:{pattern:i(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:t.languages.jsx}}},t.languages.jsx.tag);var a=function(l){return l?typeof l=="string"?l:typeof l.content=="string"?l.content:l.content.map(a).join(""):""},c=function(l){for(var d=[],u=0;u<l.length;u++){var f=l[u],x=!1;if(typeof f!="string"&&(f.type==="tag"&&f.content[0]&&f.content[0].type==="tag"?f.content[0].content[0].content==="</"?d.length>0&&d[d.length-1].tagName===a(f.content[0].content[1])&&d.pop():f.content[f.content.length-1].content==="/>"||d.push({tagName:a(f.content[0].content[1]),openedBraces:0}):d.length>0&&f.type==="punctuation"&&f.content==="{"?d[d.length-1].openedBraces++:d.length>0&&d[d.length-1].openedBraces>0&&f.type==="punctuation"&&f.content==="}"?d[d.length-1].openedBraces--:x=!0),(x||typeof f=="string")&&d.length>0&&d[d.length-1].openedBraces===0){var p=a(f);u<l.length-1&&(typeof l[u+1]=="string"||l[u+1].type==="plain-text")&&(p+=a(l[u+1]),l.splice(u+1,1)),u>0&&(typeof l[u-1]=="string"||l[u-1].type==="plain-text")&&(p=a(l[u-1])+p,l.splice(u-1,1),u--),l[u]=new t.Token("plain-text",p,null,p)}f.content&&typeof f.content!="string"&&c(f.content)}};t.hooks.add("after-tokenize",function(l){l.language!=="jsx"&&l.language!=="tsx"||c(l.tokens)})})(Prism);(function(t){var e=t.util.clone(t.languages.typescript);t.languages.tsx=t.languages.extend("jsx",e),delete t.languages.tsx.parameter,delete t.languages.tsx["literal-property"];var n=t.languages.tsx.tag;n.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+n.pattern.source+")",n.pattern.flags),n.lookbehind=!0})(Prism);(function(t){var e=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;t.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+e.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+e.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+e.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+e.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:e,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},t.languages.css.atrule.inside.rest=t.languages.css;var n=t.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))})(Prism);Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}};Prism.languages.webmanifest=Prism.languages.json;(function(t){var e="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},s={bash:n,environment:{pattern:RegExp("\\$"+e),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+e),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};t.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+e),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:s},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:s},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:s.entity}}],environment:{pattern:RegExp("\\$?"+e),alias:"constant"},variable:s.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=t.languages.bash;for(var o=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],i=s.variable[1].inside,a=0;a<o.length;a++)i[o[a]]=t.languages.bash[o[a]];t.languages.sh=t.languages.bash,t.languages.shell=t.languages.bash})(Prism);Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/};Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python;Prism.languages.py=Prism.languages.python;(function(t){var e=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(u){return u=u.replace(/<inner>/g,function(){return e}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+u+")")}var s=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,o=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return s}),i=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;t.languages.markdown=t.languages.extend("markup",{}),t.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:t.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+o+i+"(?:"+o+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+o+i+")(?:"+o+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(s),inside:t.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+o+")"+i+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+o+"$"),inside:{"table-header":{pattern:RegExp(s),alias:"important",inside:t.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(u){["url","bold","italic","strike","code-snippet"].forEach(function(f){u!==f&&(t.languages.markdown[u].inside.content.inside[f]=t.languages.markdown[f])})}),t.hooks.add("after-tokenize",function(u){if(u.language!=="markdown"&&u.language!=="md")return;function f(x){if(!(!x||typeof x=="string"))for(var p=0,v=x.length;p<v;p++){var I=x[p];if(I.type!=="code"){f(I.content);continue}var b=I.content[1],m=I.content[3];if(b&&m&&b.type==="code-language"&&m.type==="code-block"&&typeof b.content=="string"){var g=b.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp");g=(/[a-z][\w-]*/i.exec(g)||[""])[0].toLowerCase();var k="language-"+g;m.alias?typeof m.alias=="string"?m.alias=[m.alias,k]:m.alias.push(k):m.alias=[k]}}}f(u.tokens)}),t.hooks.add("wrap",function(u){if(u.type==="code-block"){for(var f="",x=0,p=u.classes.length;x<p;x++){var v=u.classes[x],I=/language-(.+)/.exec(v);if(I){f=I[1];break}}var b=t.languages[f];if(b)u.content=t.highlight(d(u.content),b,f);else if(f&&f!=="none"&&t.plugins.autoloader){var m="md-"+new Date().valueOf()+"-"+Math.floor(Math.random()*1e16);u.attributes.id=m,t.plugins.autoloader.loadLanguages(f,function(){var g=document.getElementById(m);g&&(g.innerHTML=t.highlight(g.textContent,t.languages[f],f))})}}});var a=RegExp(t.languages.markup.tag.pattern.source,"gi"),c={amp:"&",lt:"<",gt:">",quot:'"'},l=String.fromCodePoint||String.fromCharCode;function d(u){var f=u.replace(a,"");return f=f.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(x,p){if(p=p.toLowerCase(),p[0]==="#"){var v;return p[1]==="x"?v=parseInt(p.slice(2),16):v=Number(p.slice(1)),l(v)}else{var I=c[p];return I||x}}),f}t.languages.md=t.languages.markdown})(Prism);(function(t){var e=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,s="(?:"+n.source+"(?:[ ]+"+e.source+")?|"+e.source+"(?:[ ]+"+n.source+")?)",o=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),i=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function a(c,l){l=(l||"").replace(/m/g,"")+"m";var d=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,function(){return s}).replace(/<<value>>/g,function(){return c});return RegExp(d,l)}t.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,function(){return s})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,function(){return s}).replace(/<<key>>/g,function(){return"(?:"+o+"|"+i+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:a(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:a(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:a(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:a(i),lookbehind:!0,greedy:!0},number:{pattern:a(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:e,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},t.languages.yml=t.languages.yaml})(Prism);Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/};const ea={js:"JavaScript",ts:"TypeScript",jsx:"JSX",tsx:"TSX",py:"Python",python:"Python",bash:"Bash",shell:"Shell",css:"CSS",json:"JSON",yaml:"YAML",yml:"YAML",sql:"SQL",md:"Markdown",markdown:"Markdown",xml:"XML",html:"HTML"};function ta({language:t,code:e}){const[n,s]=w.useState(!1),o=w.useRef(null);w.useEffect(()=>{o.current&&Jr.highlightElement(o.current)},[e,t]);const i=async()=>{try{await navigator.clipboard.writeText(e),s(!0),setTimeout(()=>s(!1),2e3)}catch(c){console.error("Failed to copy:",c)}},a=ea[t]||t.toUpperCase();return r.jsxs("div",{className:"relative group rounded-lg overflow-hidden border border-dark-border my-2",children:[r.jsxs("div",{className:"flex items-center justify-between px-3 py-1.5 bg-dark-surface border-b border-dark-border",children:[r.jsx("span",{className:"text-xs text-dark-muted font-mono",children:a}),r.jsx("button",{onClick:i,className:"flex items-center gap-1 text-xs px-2 py-1 rounded hover:bg-dark-hover transition-colors",children:n?r.jsxs(r.Fragment,{children:[r.jsx(Zr,{size:12,className:"text-accent-green"}),r.jsx("span",{className:"text-accent-green",children:"已复制"})]}):r.jsxs(r.Fragment,{children:[r.jsx(rr,{size:12}),r.jsx("span",{children:"复制"})]})})]}),r.jsx("pre",{className:"bg-dark-bg p-3 overflow-x-auto custom-scrollbar text-sm",children:r.jsx("code",{ref:o,className:`language-${t}`,children:e})})]})}function na({content:t,className:e=""}){const[n,s]=w.useState(t),o=w.useRef(0),i=w.useRef(null),a=w.useRef(t);a.current=t,w.useEffect(()=>{if(t===n)return;const l=Date.now(),d=l-o.current;d>=200?(s(t),o.current=l):i.current||(i.current=setTimeout(()=>{i.current=null,s(a.current),o.current=Date.now()},200-d))},[t]),w.useEffect(()=>()=>{i.current&&clearTimeout(i.current)},[]);const c=(n||"").replace(/\\n/g,`
2
- `).replace(/\n{3,}/g,`
3
-
4
- `);return r.jsx("div",{className:`markdown-content ${e}`,style:{wordBreak:"break-word"},children:r.jsx(Yr,{components:{code({className:l,children:d,...u}){const f=/language-(\w+)/.exec(l||""),x=String(d).replace(/\n$/,"");return f&&f[1]?r.jsx(ta,{language:f[1],code:x}):r.jsx("code",{className:"bg-dark-hover px-1.5 py-0.5 rounded text-sm font-mono text-accent-blue",...u,children:d})},a({href:l,children:d}){return r.jsx("a",{href:l,target:"_blank",rel:"noopener noreferrer",className:"text-accent-blue hover:underline",children:d})},table({children:l}){return r.jsx("div",{className:"overflow-x-auto custom-scrollbar my-2",children:r.jsx("table",{className:"w-full border-collapse border border-dark-border",children:l})})},th({children:l}){return r.jsx("th",{className:"border border-dark-border px-3 py-2 text-left bg-dark-hover font-medium",children:l})},td({children:l}){return r.jsx("td",{className:"border border-dark-border px-3 py-2",children:l})},p({children:l}){return r.jsx("p",{className:"mb-0.5 leading-snug last:mb-0",children:l})},blockquote({children:l}){return r.jsx("blockquote",{className:"border-l-4 border-accent-blue pl-3 my-1 text-dark-muted italic",children:l})},h1({children:l}){return r.jsx("h1",{className:"text-2xl font-bold mt-3 mb-1 text-dark-text border-b border-dark-border pb-1",children:l})},h2({children:l}){return r.jsx("h2",{className:"text-xl font-semibold mt-3 mb-1 text-dark-text border-b border-dark-border pb-1",children:l})},h3({children:l}){return r.jsx("h3",{className:"text-lg font-semibold mt-2 mb-1 text-dark-text",children:l})}},children:c})})}const ra=w.memo(function({filePath:e,content:n,language:s}){if(!n&&!e)return null;const[o,i]=w.useState("unified"),[a,c]=w.useState(!1),l=sa(e,s),d=(n==null?void 0:n.includes("@@"))||(n==null?void 0:n.includes("+++"))||(n==null?void 0:n.includes("---")),u=d?oa(n||""):null;return r.jsxs("div",{className:"mt-2 border border-dark-border rounded-lg overflow-hidden",children:[r.jsxs("div",{className:"flex items-center gap-2 px-3 py-1.5 bg-dark-surface border-b border-dark-border",children:[r.jsx("span",{className:"text-accent-purple text-xs",children:"📝"}),r.jsx("span",{className:"text-xs font-mono text-dark-fg truncate",children:e||"file"}),u&&r.jsxs("span",{className:"text-xs ml-2 flex gap-2",children:[r.jsxs("span",{className:"text-green-400",children:["+",u.additions]}),r.jsxs("span",{className:"text-red-400",children:["-",u.deletions]})]}),r.jsx("span",{className:"text-xs text-dark-muted ml-auto",children:l}),d&&r.jsxs("div",{className:"flex gap-0.5 ml-2",children:[r.jsx("button",{onClick:()=>i("unified"),className:`text-xs px-1.5 py-0.5 rounded ${o==="unified"?"bg-accent-blue/20 text-accent-blue":"text-dark-muted hover:text-dark-fg"}`,title:"Unified view",children:"Unified"}),r.jsx("button",{onClick:()=>i("side-by-side"),className:`text-xs px-1.5 py-0.5 rounded ${o==="side-by-side"?"bg-accent-blue/20 text-accent-blue":"text-dark-muted hover:text-dark-fg"}`,title:"Side-by-side view",children:"Side"})]}),r.jsx("button",{onClick:()=>c(!a),className:"text-xs text-dark-muted hover:text-dark-fg ml-1",children:a?"▶":"▼"})]}),!a&&r.jsxs("div",{className:"bg-dark-bg overflow-x-auto max-h-96 overflow-y-auto custom-scrollbar",children:[d?o==="unified"?aa(n||""):ia(n||""):r.jsx("pre",{className:"text-xs font-mono p-2 text-dark-fg whitespace-pre-wrap",children:n||"(no content)"}),u&&r.jsxs("div",{className:"sticky bottom-0 bg-dark-surface border-t border-dark-border px-3 py-1 flex gap-4 text-xs text-dark-muted",children:[r.jsxs("span",{className:"text-green-400",children:["+",u.additions," additions"]}),r.jsxs("span",{className:"text-red-400",children:["-",u.deletions," deletions"]}),r.jsxs("span",{children:[u.hunks," hunks"]})]})]})]})});function sa(t,e){var o;if(e)return e;if(!t)return"plaintext";const n=(o=t.split(".").pop())==null?void 0:o.toLowerCase();return{ts:"typescript",tsx:"typescript",js:"javascript",jsx:"javascript",py:"python",go:"go",rs:"rust",cpp:"cpp",c:"c",h:"c",css:"css",html:"html",json:"json",xml:"xml",yml:"yaml",yaml:"yaml",md:"markdown",sql:"sql",sh:"bash",ps1:"powershell",properties:"properties",toml:"toml",gradle:"groovy",kt:"kotlin",swift:"swift"}[n||""]||"plaintext"}function oa(t){const e=t.split(`
5
- `);let n=0,s=0,o=0;for(const i of e)i.startsWith("@@")?o++:i.startsWith("+")&&!i.startsWith("+++")?n++:i.startsWith("-")&&!i.startsWith("---")&&s++;return{additions:n,deletions:s,hunks:o,filesChanged:1}}function aa(t){return t.split(`
6
- `).map((n,s)=>{let o="text-dark-fg",i=" ";return(n.startsWith("+++")||n.startsWith("---"))&&s<3?o="text-dark-muted font-bold text-xs":n.startsWith("+")?(o="text-green-400 bg-green-900/20",i="+"):n.startsWith("-")?(o="text-red-400 bg-red-900/20",i="-"):n.startsWith("@@")&&(o="text-accent-blue font-bold bg-accent-blue/5"),r.jsxs("div",{className:`text-xs font-mono leading-snug px-2 ${o}`,style:{minHeight:"1.25rem"},children:[r.jsx("span",{className:"select-none inline-block w-4 text-dark-muted text-right mr-1",children:o.includes("text-accent-blue")?"@":i}),n||" "]},`${s}-${n.substring(0,20)}`)})}function ia(t){const e=t.split(`
7
- `),n=[];let s=null;for(const o of e)o.startsWith("@@")?(s&&_t(n,s),s={leftLines:[],rightLines:[]},n.push({left:o,right:o,type:"header"})):o.startsWith("---")||o.startsWith("+++")?n.push({left:"",right:o,type:"header"}):o.startsWith("-")&&s?s.leftLines.push(o.substring(1)):o.startsWith("+")&&s?s.rightLines.push(o.substring(1)):s?(_t(n,s),n.push({left:o,right:o,type:"context"})):n.push({left:o,right:o,type:"context"});return s&&_t(n,s),r.jsxs("div",{children:[r.jsxs("div",{className:"flex border-b border-dark-border text-xs font-bold text-dark-muted",children:[r.jsx("div",{className:"flex-1 px-2 py-0.5 border-r border-dark-border",children:"Old"}),r.jsx("div",{className:"flex-1 px-2 py-0.5",children:"New"})]}),n.map((o,i)=>r.jsxs("div",{className:"flex",style:{minHeight:"1.25rem"},children:[r.jsx("div",{className:`flex-1 px-2 border-r border-dark-border/30 font-mono text-xs leading-snug ${o.type==="delete"?"bg-red-900/20 text-red-400":o.type==="header"?"bg-accent-blue/5 text-accent-blue":"text-dark-fg"}`,children:o.left||" "}),r.jsx("div",{className:`flex-1 px-2 font-mono text-xs leading-snug ${o.type==="add"?"bg-green-900/20 text-green-400":o.type==="header"?"bg-accent-blue/5 text-accent-blue":"text-dark-fg"}`,children:o.right||" "})]},i))]})}function _t(t,e){const n=Math.max(e.leftLines.length,e.rightLines.length);for(let s=0;s<n;s++){const o=s<e.leftLines.length?e.leftLines[s]:"",i=s<e.rightLines.length?e.rightLines[s]:"";t.push({left:s<e.leftLines.length?"- "+o:"",right:s<e.rightLines.length?"+ "+i:"",type:s<e.leftLines.length&&s<e.rightLines.length?"context":s<e.leftLines.length?"delete":"add"})}e.leftLines=[],e.rightLines=[]}function Ur(t){const e=w.useRef(null),n=w.useRef(0);return w.useEffect(()=>{if(!t){n.current=0;return}n.current=Date.now();const s=e.current;if(!s)return;const o=()=>{const a=Math.floor((Date.now()-n.current)/1e3),c=a>=60?`${Math.floor(a/60)}m ${a%60}s`:`${a}s`;s.textContent=c};o();const i=setInterval(o,1e3);return()=>clearInterval(i)},[t]),e}const la=["FileEditTool","FileWriteTool","EditTool","NotebookEditTool","Write","Edit","WriteTool","FileCreateTool"],ca=/\b(write|edit|save|create|update|modify|patch)\b/i,da=/\b(read|open|cat|view|list|ls|dir|find|grep|glob|search)\b/i;function ua(t){return la.includes(t)?!0:ca.test(t)&&!da.test(t)}function pa(t){return typeof t=="string"?t:t&&typeof t=="object"?JSON.stringify(t,null,2):String(t??"")}function ma(t){if(typeof t!="string"&&t)return t.filePath||t.path||t.file||t.file_path}const Gr=w.memo(function({toolCall:e,defaultCollapsed:n=!0}){const[s,o]=w.useState(n),i=e.status==="running",a=Ur(i),c=e.result!==void 0&&e.result!==null,l=e.status==="error",d=ua(e.name),u=c?pa(e.result):"",f=typeof e.args=="object"&&e.args?ma(e.args):void 0,x=e.duration??0,p=x>0?x>=60?`${Math.floor(x/60)}m ${x%60}s`:`${x}s`:"",v=i?"bg-accent-blue":l?"bg-accent-red":"bg-accent-green";return r.jsxs("div",{className:"rounded-lg transition-colors hover:bg-dark-surface/40","data-testid":"toolcall-row",children:[r.jsxs("div",{className:"flex items-center gap-2 px-2 py-1 cursor-pointer select-none",onClick:()=>o(!s),children:[i?r.jsx("span",{className:"inline-block w-3 h-3 shrink-0 rounded-full border-2 border-accent-blue border-r-transparent animate-spin"}):r.jsx("span",{className:`w-2 h-2 shrink-0 rounded-full ${v}`}),r.jsx("span",{className:"text-xs text-dark-muted shrink-0",children:"🔧"}),r.jsx("span",{className:"font-medium text-[13px] text-dark-text truncate",children:e.name}),i&&r.jsxs("span",{className:"text-[11px] text-accent-blue shrink-0 flex items-center gap-1 tabular-nums",children:[r.jsx(it,{size:10}),r.jsx("span",{ref:a,children:"0s"})]}),!i&&p&&r.jsxs("span",{className:"text-[10px] text-dark-muted shrink-0 flex items-center gap-1 tabular-nums",children:[r.jsx(it,{size:10}),r.jsx("span",{children:p})]}),r.jsx("span",{className:`ml-auto shrink-0 text-dark-muted/60 transition-transform ${s?"":"rotate-180"}`,children:r.jsx(lt,{size:13})})]}),!s&&r.jsxs("div",{className:"ml-4 pb-1 pl-3 border-l-2 border-dark-border/30 space-y-1",children:[r.jsxs("div",{className:"py-0.5 px-2",children:[r.jsx("div",{className:"text-[10px] text-dark-muted mb-0.5",children:"参数"}),r.jsx("pre",{className:"text-[11px] font-mono bg-dark-bg border border-dark-border p-2 rounded overflow-x-auto max-h-24 overflow-y-auto custom-scrollbar",children:typeof e.args=="string"?e.args:JSON.stringify(e.args,null,2)})]}),c&&r.jsxs("div",{className:"py-0.5 px-2",children:[r.jsx("div",{className:`text-[10px] mb-0.5 ${l?"text-accent-red":"text-accent-green"}`,children:l?"错误":"结果"}),d&&u?r.jsx(ra,{filePath:f,content:u}):r.jsx("pre",{className:`text-[11px] font-mono bg-dark-bg border border-dark-border p-2 rounded overflow-x-auto max-h-48 overflow-y-auto custom-scrollbar whitespace-pre-wrap break-all ${l?"text-accent-red":"text-accent-green"}`,children:u})]})]})]})}),ha=w.memo(function({text:e,maxLength:n=300,preformatted:s=!1}){const[o,i]=w.useState(!1);return e.length>n?r.jsxs("div",{children:[s?r.jsx("pre",{className:"text-xs font-mono bg-dark-bg p-1.5 rounded overflow-x-auto custom-scrollbar mt-1 text-accent-green",children:o?e:e.slice(0,n)+"..."}):r.jsx("div",{className:"text-dark-text leading-snug",children:o?e:e.slice(0,n)+"..."}),r.jsx("button",{onClick:c=>{c.stopPropagation(),i(!o)},className:"mt-1 text-[10px] px-2 py-0.5 rounded bg-dark-hover text-accent-blue hover:bg-dark-border transition-colors",children:o?"收起":"展开"})]}):s?r.jsx("pre",{className:"text-xs font-mono bg-dark-bg p-1.5 rounded overflow-x-auto custom-scrollbar mt-1 text-accent-green",children:e}):r.jsx("div",{className:"text-dark-text leading-snug",children:e})}),fa=w.memo(function({step:e,defaultCollapsed:n=!0}){const[s,o]=w.useState(n),[i,a]=w.useState(!0),c=e.status==="running",l=Ur(c),d=e.description||e.thought||e.result||e.action||e.toolCalls&&e.toolCalls.length>0,u=e.duration??0,f=u>0?u>=60?`${Math.floor(u/60)}m ${u%60}s`:`${u}s`:"",x={pending:"bg-dark-muted/40",running:"bg-accent-blue",success:"bg-accent-green",error:"bg-accent-red",warning:"bg-accent-yellow"}[e.status]||"bg-dark-muted/40";return r.jsxs("div",{className:"rounded-lg transition-colors hover:bg-dark-surface/40","data-testid":"step-row",children:[r.jsxs("div",{className:"flex items-center gap-2 px-2 py-1 cursor-pointer select-none",onClick:()=>d&&o(!s),children:[c?r.jsx("span",{className:"inline-block w-3 h-3 shrink-0 rounded-full border-2 border-accent-blue border-r-transparent animate-spin"}):r.jsx("span",{className:`w-2 h-2 shrink-0 rounded-full ${x} ${e.status==="pending"?"opacity-60":""}`}),r.jsx("span",{className:"text-[13px] text-dark-text truncate",children:e.title}),c&&r.jsxs("span",{className:"text-[11px] text-accent-blue shrink-0 flex items-center gap-1 tabular-nums",children:[r.jsx(it,{size:10}),r.jsx("span",{ref:l,children:"0s"})]}),!c&&f&&r.jsxs("span",{className:"text-[10px] text-dark-muted shrink-0 flex items-center gap-1 tabular-nums",children:[r.jsx(it,{size:10}),r.jsx("span",{children:f})]}),d&&r.jsx("span",{className:`ml-auto shrink-0 text-dark-muted/60 transition-transform ${s?"":"rotate-180"}`,children:r.jsx(lt,{size:13})})]}),!s&&d&&r.jsxs("div",{className:"ml-4 pb-1 pl-3 border-l-2 border-dark-border/30 space-y-1",children:[e.description&&r.jsx("div",{className:"text-dark-muted py-0.5 px-2 text-xs",children:e.description}),e.thought&&r.jsxs("div",{className:"py-0.5 px-2 text-xs border-l-2 border-accent-blue/40 bg-accent-blue/5 rounded-r",children:[r.jsxs("div",{className:"flex items-center gap-1 text-accent-blue cursor-pointer hover:opacity-80 select-none",onClick:()=>a(!i),children:[i?r.jsx(nn,{size:12}):r.jsx(lt,{size:12}),r.jsx("span",{children:"🧠 思考"}),i&&r.jsxs("span",{className:"text-[10px] text-dark-muted truncate max-w-[200px]",children:[e.thought.slice(0,80).replace(/\n/g," "),"..."]})]}),!i&&r.jsx("div",{className:"text-dark-muted italic whitespace-pre-wrap leading-snug mt-1",children:e.thought.replace(/\n\s*\n+/g,`
8
- `)})]}),e.action&&r.jsxs("div",{className:"py-0.5 px-2 text-xs border-l-2 border-accent-yellow/40 bg-accent-yellow/5 rounded-r",children:[r.jsx("div",{className:"flex items-center gap-1 text-accent-yellow mb-0.5",children:"⚡ 执行"}),r.jsx("div",{className:"text-dark-text leading-snug font-mono text-[11px]",children:e.action})]}),e.toolCalls&&e.toolCalls.length>0&&e.toolCalls.map(p=>r.jsx("div",{className:"px-1 py-0.5",children:r.jsx(Gr,{toolCall:p})},p.id)),e.result&&r.jsxs("div",{className:"py-0.5 px-2 text-xs border-l-2 border-accent-green/40 bg-accent-green/5 rounded-r",children:[r.jsx("div",{className:"flex items-center gap-1 text-accent-green mb-0.5",children:"✓ 结果"}),r.jsx(ha,{text:e.result,maxLength:500})]})]})]})}),xa=w.memo(function({steps:e,isGenerating:n}){const{t:s}=Re(),[o,i]=w.useState(n),a=w.useRef(n);w.useEffect(()=>{a.current&&!n&&i(!1),a.current=n},[n]);const c=e.length,l=n||e.some(p=>p.status==="running"),d=[...e].reverse().find(p=>p.status==="running"),u=e[e.length-1],f=(d==null?void 0:d.title)||(u==null?void 0:u.title)||"",x=`${c} ${s(c===1?"chat.stepCount":"chat.stepCountPlural")}`;return r.jsxs("div",{className:"mb-1 rounded-lg border border-dark-border/50 transition-colors","data-testid":"turn-group",children:[r.jsxs("button",{className:"flex w-full items-center gap-2 px-2 py-1 text-left cursor-pointer select-none hover:bg-dark-surface/40",onClick:()=>i(!o),"data-testid":"turn-group-toggle",children:[r.jsx("span",{className:"shrink-0 text-dark-muted/60 transition-transform",children:o?r.jsx(lt,{size:13}):r.jsx(nn,{size:13})}),l?r.jsx("span",{className:"inline-block w-3 h-3 shrink-0 rounded-full border-2 border-accent-blue border-r-transparent animate-spin"}):r.jsx("span",{className:"w-2 h-2 shrink-0 rounded-full bg-accent-green"}),r.jsx("span",{className:"text-xs text-dark-muted",children:l?`${s("chat.runningSteps")} ${x}…`:x}),l&&f&&r.jsxs("span",{className:"min-w-0 flex-1 truncate pl-1 text-xs text-dark-muted/70",children:["· ",f]})]}),o&&r.jsx("div",{className:"ml-3 pb-1 pl-3 border-l-2 border-dark-border/30 space-y-0.5",children:e.map(p=>r.jsx(fa,{step:p},p.id))})]})}),Pt=15,ga=w.memo(function({approval:e,onResolved:n}){const{t:s}=Re("hook"),[o,i]=w.useState(!1),[a,c]=w.useState(Pt),l=w.useRef(null),d=e.status==="pending",{level:u,reasonKey:f}=Ts(e.toolName,e.askPayload),x=Es[u];w.useEffect(()=>{if(d)return c(Pt),l.current=setInterval(()=>{c(T=>T<=1?(l.current&&clearInterval(l.current),0):T-1)},1e3),()=>{l.current&&clearInterval(l.current)}},[d,e.approvalId]),w.useEffect(()=>{a===0&&d&&!o&&v()},[a]);const p=Is(e.toolName,e.askPayload),v=w.useCallback(()=>{!d||o||(i(!0),l.current&&clearInterval(l.current),De.send({type:"hook_allow",data:JSON.stringify({approvalId:e.approvalId})}),n==null||n(e.approvalId,"approved"))},[d,o,e.approvalId,n]),I=w.useCallback(()=>{!d||o||(i(!0),l.current&&clearInterval(l.current),De.send({type:"hook_deny",data:JSON.stringify({approvalId:e.approvalId})}),n==null||n(e.approvalId,"denied"))},[d,o,e.approvalId,n]),b=w.useCallback(()=>{if(!d||o)return;i(!0),l.current&&clearInterval(l.current),Nn.getState().addToSessionAllowList(e.toolName),De.send({type:"hook_allow",data:JSON.stringify({approvalId:e.approvalId})}),n==null||n(e.approvalId,"approved")},[d,o,e.approvalId,e.toolName,n]),m=w.useCallback(()=>{!d||o||(i(!0),l.current&&clearInterval(l.current),Nn.getState().setAutoMode(!0),st.getState().setAuto(!0),De.send({type:"hook_allow",data:JSON.stringify({approvalId:e.approvalId})}),n==null||n(e.approvalId,"approved"))},[d,o,e.approvalId,n]);if(!d){const T=e.status==="approved";return r.jsx("div",{className:`flex items-center gap-2 px-3 py-2 rounded-lg text-xs ${T?"bg-accent-green/10 border border-accent-green/30 text-accent-green":"bg-accent-red/10 border border-accent-red/30 text-accent-red"}`,children:T?r.jsxs(r.Fragment,{children:[r.jsx(sr,{size:14}),r.jsxs("span",{children:[s("alreadyAllowed"),e.toolName]})]}):r.jsxs(r.Fragment,{children:[r.jsx(rn,{size:14}),r.jsxs("span",{children:[s("alreadyDenied"),e.toolName]})]})})}const g=a/Pt*100,k=a<=5,j=[{id:"allow",index:1,label:s("optionAllow"),hint:s("optionAllowHint"),action:v},{id:"deny",index:2,label:s("optionDeny"),hint:s("optionDenyHint"),action:I},{id:"allow_session",index:3,label:s("optionAllowAlways"),hint:s("optionAllowAlwaysHint",{tool:e.toolName}),action:b},{id:"auto_mode",index:4,label:s("optionAutoMode"),hint:s("optionAutoModeHint"),action:m}];return r.jsxs("div",{className:`bg-dark-bg border rounded-lg overflow-hidden ${x.border}`,children:[r.jsxs("div",{className:`flex items-center gap-2 px-3 py-2 ${x.bg} border-b ${x.border}`,children:[r.jsxs("span",{className:`px-1.5 py-0.5 rounded text-[10px] font-bold border ${x.badge}`,children:[x.icon," ",u]}),r.jsx(Qr,{size:14,className:x.text}),r.jsx("span",{className:"text-xs font-medium text-dark-text",children:s("permissionRequest")}),r.jsx("span",{className:"text-[10px] text-dark-muted ml-auto",children:s(f)}),r.jsxs("div",{className:"flex items-center gap-1.5 ml-2",children:[r.jsx(it,{size:11,className:k?"text-accent-red":"text-dark-muted"}),r.jsxs("span",{className:`text-[11px] font-mono ${k?"text-accent-red animate-pulse":"text-dark-muted"}`,children:[a,"s"]}),r.jsx("div",{className:"w-10 h-1 bg-dark-border rounded-full overflow-hidden",children:r.jsx("div",{className:`h-full rounded-full transition-all duration-1000 ${k?"bg-accent-red":a<=8?"bg-accent-yellow":"bg-accent-green"}`,style:{width:`${g}%`}})})]})]}),r.jsxs("div",{className:"px-3 py-2.5 space-y-2",children:[r.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[r.jsx("span",{className:"text-dark-muted shrink-0",children:s("tool")}),r.jsx("code",{className:"text-accent-blue font-mono text-xs bg-dark-surface px-1.5 py-0.5 rounded",children:e.toolName})]}),p&&r.jsx("div",{className:"bg-dark-surface rounded border border-dark-border p-2 max-h-24 overflow-y-auto custom-scrollbar",children:r.jsx("pre",{className:"text-[11px] font-mono text-dark-text whitespace-pre-wrap break-all leading-relaxed",children:p})}),(u==="CRITICAL"||u==="HIGH")&&r.jsxs("div",{className:`flex items-center gap-1.5 text-[11px] px-2 py-1 rounded ${x.bg} ${x.text}`,children:[r.jsx(ct,{size:12}),r.jsx("span",{children:s(u==="CRITICAL"?"highRiskWarning":"mediumRiskConfirm")})]}),r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"space-y-0.5 pt-1",children:j.map(T=>r.jsxs("button",{onClick:T.action,disabled:o,className:"w-full text-left px-2 py-1.5 rounded hover:bg-dark-hover transition-colors disabled:opacity-50 group",children:[r.jsxs("div",{className:"flex items-baseline gap-1.5",children:[r.jsxs("span",{className:"text-xs text-dark-muted font-mono shrink-0",children:[T.index,"."]}),r.jsx("span",{className:"text-xs text-dark-text group-hover:text-white transition-colors",children:T.label})]}),r.jsx("div",{className:"text-[10px] text-dark-muted/60 ml-5 mt-0.5",children:T.hint})]},T.id))}),r.jsx("div",{className:"text-[10px] text-dark-muted/50 pt-0.5 border-t border-dark-border/50",children:s("clickToSelect")})]})]})]})}),It={xlsx:{icon:Wt,label:"Excel"},xls:{icon:Wt,label:"Excel"},csv:{icon:Gt,label:"CSV"},docx:{icon:Gt,label:"Word"},text:{icon:ar,label:"文本"}};function Zn(t){return!t&&t!==0?"—":t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(1)} KB`:`${(t/1024/1024).toFixed(2)} MB`}const ba=w.memo(function({job:e}){var f,x;const{t:n}=Re(),{stage:s}=e,o=w.useCallback(p=>{Vt.files.download(p).then(v=>{v.success||Pe.error(v.error||n("fileJob.downloadFailed"))})},[n]),i=w.useMemo(()=>e.attachments||[],[e.attachments]),a=w.useMemo(()=>e.parsedFiles||[],[e.parsedFiles]),c=w.useMemo(()=>e.mapping||[],[e.mapping]),l=w.useMemo(()=>e.result||[],[e.result]),d=e.renderProgress??(s==="rendering"?0:100),u=e.parseProgress??(s==="parsing"?0:100);return r.jsxs("div",{className:"mt-2 rounded-xl border border-dark-border bg-dark-surface/60 overflow-hidden max-w-2xl",children:[r.jsxs("div",{className:"flex items-center gap-2 px-3.5 py-2.5 border-b border-dark-border/60 bg-dark-surface",children:[s==="complete"?r.jsx(In,{size:15,className:"text-accent-green shrink-0"}):s==="error"?r.jsx(ct,{size:15,className:"text-accent-red shrink-0"}):r.jsx(or,{size:15,className:"text-accent-blue animate-spin shrink-0"}),r.jsx("span",{className:"text-[13px] font-medium text-dark-text",children:va(s,n)}),r.jsx("div",{className:"flex-1"}),r.jsx("span",{className:"text-[10px] font-mono text-dark-muted/60",children:e.jobId})]}),r.jsxs("div",{className:"px-3.5 py-3 space-y-3",children:[i.length>0&&r.jsx("div",{className:"flex flex-wrap gap-2",children:i.map((p,v)=>{const I=It[p.kind]||It.text,b=I.icon;return r.jsxs("div",{className:"flex items-center gap-2 rounded-lg border border-dark-border bg-dark-bg px-2.5 py-1.5",children:[r.jsx(b,{size:14,className:"text-accent-blue shrink-0"}),r.jsxs("div",{className:"min-w-0",children:[r.jsx("div",{className:"text-xs text-dark-text truncate max-w-[160px]",children:p.fileName}),r.jsxs("div",{className:"text-[10px] text-dark-muted",children:[Zn(p.size)," · ",I.label,p.role&&p.role!=="unknown"&&r.jsxs("span",{className:Me("ml-1",p.role==="data"?"text-accent-green":"text-accent-purple"),children:["· ",p.role==="data"?n("fileJob.roleData"):n("fileJob.roleTemplate")]})]})]})]},`${p.fileName}-${v}`)})}),s==="parsing"&&r.jsxs("div",{className:"space-y-2",children:[r.jsx("div",{className:"text-xs text-dark-muted",children:n("fileJob.parsing",{file:((f=i[0])==null?void 0:f.fileName)||((x=a[0])==null?void 0:x.fileName)||""})}),r.jsx(Cn,{value:u,size:"sm",showLabel:!0})]}),a.length>0&&s!=="error"&&r.jsxs("div",{className:"space-y-1.5",children:[a.map(p=>r.jsxs("div",{className:"flex items-center gap-2 text-xs text-dark-muted",children:[r.jsx(In,{size:13,className:"text-accent-green shrink-0"}),r.jsx("span",{className:"truncate",children:p.fileName}),r.jsx("span",{className:"text-[10px] text-dark-muted/70",children:n("fileJob.parsedSummary",{rows:p.rowCount,fields:p.fields.length})})]},p.fileName)),a[0]&&r.jsxs("div",{className:"flex flex-wrap gap-1 pt-1",children:[a[0].fields.slice(0,12).map(p=>r.jsx("span",{className:"rounded bg-dark-bg border border-dark-border/60 px-1.5 py-0.5 text-[10px] font-mono text-dark-muted",children:p},p)),a[0].fields.length>12&&r.jsxs("span",{className:"text-[10px] text-dark-muted/60",children:["+",a[0].fields.length-12]})]})]}),c.length>0&&r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("div",{className:"text-[11px] text-dark-muted",children:n("fileJob.mappingTitle")}),r.jsx("div",{className:"overflow-hidden rounded-lg border border-dark-border",children:r.jsxs("table",{className:"w-full text-xs",children:[r.jsx("thead",{children:r.jsxs("tr",{className:"bg-dark-bg text-dark-muted",children:[r.jsx("th",{className:"text-left px-2.5 py-1.5 font-medium",children:n("fileJob.templatePlaceholder")}),r.jsx("th",{className:"px-2 py-1.5"}),r.jsx("th",{className:"text-left px-2.5 py-1.5 font-medium",children:n("fileJob.dataField")})]})}),r.jsx("tbody",{children:c.slice(0,8).map(p=>r.jsxs("tr",{className:"border-t border-dark-border/50",children:[r.jsx("td",{className:"px-2.5 py-1.5 font-mono text-accent-purple",children:"{{"+p.placeholder+"}}"}),r.jsx("td",{className:"px-2 py-1.5 text-dark-muted",children:r.jsx(qr,{size:11})}),r.jsx("td",{className:"px-2.5 py-1.5 font-mono text-accent-blue",children:p.field})]},p.placeholder))})]})}),c.length>8&&r.jsx("div",{className:"text-[10px] text-dark-muted/60",children:n("fileJob.mappingMore",{n:c.length-8})})]}),s==="rendering"&&r.jsxs("div",{className:"space-y-2",children:[r.jsx("div",{className:"text-xs text-dark-muted",children:n("fileJob.rendering",{current:e.currentRow||0,total:e.totalRows||0})}),r.jsx(Cn,{value:d,size:"sm",variant:"warning",showLabel:!0})]}),l.length>0&&s==="complete"&&r.jsx("div",{className:"space-y-1.5",children:l.map(p=>{const I=(It[p.format]||It.text).icon,b=p.failedRows.length>0;return r.jsxs("div",{className:"rounded-lg border border-dark-border bg-dark-bg px-3 py-2",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(I,{size:15,className:"text-accent-green shrink-0"}),r.jsxs("div",{className:"min-w-0 flex-1",children:[r.jsx("div",{className:"text-xs text-dark-text truncate",children:p.fileName}),r.jsxs("div",{className:"text-[10px] text-dark-muted",children:[Zn(p.size)," · ",p.successCount,"/",p.rowCount," 行",b&&r.jsxs("span",{className:"text-accent-red",children:[" · ",p.failedRows.length," 行失败"]})]})]}),r.jsxs("button",{onClick:()=>o(p.path),className:"flex items-center gap-1 rounded-md bg-accent-blue/10 text-accent-blue px-2 py-1 text-[11px] hover:bg-accent-blue/20 transition-colors",title:n("fileJob.download"),children:[r.jsx(es,{size:12}),n("fileJob.download")]})]}),b&&r.jsxs("div",{className:"mt-1.5 space-y-0.5 border-t border-dark-border/50 pt-1.5",children:[p.failedRows.slice(0,3).map(m=>r.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] text-accent-red",children:[r.jsx(ts,{size:10,className:"shrink-0"}),r.jsxs("span",{children:["#",m.index+1]}),r.jsx("span",{className:"truncate",children:m.error})]},m.index)),p.failedRows.length>3&&r.jsxs("div",{className:"text-[10px] text-dark-muted/70",children:["+",p.failedRows.length-3," 行"]})]})]},p.path)})}),s==="error"&&r.jsxs("div",{className:"flex items-start gap-2 rounded-lg border border-accent-red/30 bg-accent-red/5 px-3 py-2.5",children:[r.jsx(ct,{size:15,className:"text-accent-red shrink-0 mt-0.5"}),r.jsxs("div",{className:"min-w-0 flex-1",children:[r.jsx("div",{className:"text-xs font-medium text-accent-red",children:e.error||n("fileJob.error")}),e.errorDetail&&r.jsx("div",{className:"mt-0.5 text-[11px] text-dark-muted break-words",children:e.errorDetail})]})]})]})]})});function va(t,e){switch(t){case"uploaded":return e("fileJob.stageUploaded");case"parsing":return e("fileJob.stageParsing");case"mapping":return e("fileJob.stageMapping");case"rendering":return e("fileJob.stageRendering");case"complete":return e("fileJob.stageComplete");case"error":return e("fileJob.stageError");default:return e("fileJob.stageUploaded")}}const Qn={auth:{icon:ss,color:"text-accent-red"},rate_limit:{icon:En,color:"text-accent-yellow"},timeout:{icon:En,color:"text-accent-yellow"},network:{icon:rs,color:"text-accent-yellow"},model:{icon:ns,color:"text-accent-red"},tool:{icon:ct,color:"text-accent-yellow"},unknown:{icon:ct,color:"text-accent-red"}},Sa=w.memo(function({error:e,onRetry:n}){const{t:s}=Re(),[o,i]=w.useState(!1),a=Qn[e.category]||Qn.unknown,c=a.icon,l=()=>{window.dispatchEvent(new CustomEvent("switch-tab",{detail:"models"}))};return r.jsxs("div",{className:"mt-2 max-w-2xl overflow-hidden rounded-xl border border-accent-red/30 bg-dark-surface",children:[r.jsxs("div",{className:"flex items-start gap-3 px-3.5 py-3",children:[r.jsx(c,{size:18,className:Me("shrink-0 mt-0.5",a.color)}),r.jsxs("div",{className:"min-w-0 flex-1",children:[r.jsx("div",{className:"text-[13px] font-medium text-dark-text",children:e.summary}),e.detail&&e.detail!==e.summary&&r.jsx("div",{className:"mt-0.5 text-[11px] text-dark-muted/80 break-words",children:e.detail.slice(0,160)}),r.jsxs("div",{className:"mt-1.5 flex items-center gap-2",children:[e.retryable&&n&&r.jsxs("button",{onClick:n,className:"flex items-center gap-1 rounded-md bg-accent-blue/10 text-accent-blue px-2 py-1 text-[11px] hover:bg-accent-blue/20 transition-colors",children:[r.jsx(Rt,{size:11}),s("errorCard.retry")]}),e.category==="auth"&&r.jsxs("button",{onClick:l,className:"flex items-center gap-1 rounded-md bg-dark-hover text-dark-text px-2 py-1 text-[11px] hover:bg-dark-border transition-colors",children:[r.jsx(os,{size:11}),s("errorCard.modelSettings")]}),e.detail&&r.jsxs("button",{onClick:()=>i(d=>!d),className:"flex items-center gap-0.5 text-[11px] text-dark-muted hover:text-dark-text transition-colors",children:[r.jsx(lt,{size:11,className:Me("transition-transform",o&&"rotate-180")}),s("errorCard.details")]})]})]})]}),o&&e.detail&&r.jsx("div",{className:"border-t border-dark-border/60 bg-dark-bg px-3.5 py-2.5 text-[11px] font-mono text-dark-muted break-words max-h-40 overflow-y-auto custom-scrollbar",children:e.detail})]})});function $t({onClick:t,title:e,children:n,danger:s=!1}){return r.jsx("button",{onClick:t,title:e,"aria-label":e,className:`inline-flex items-center justify-center rounded p-1 transition-colors ${s?"text-dark-muted hover:text-accent-red hover:bg-accent-red/10":"text-dark-muted hover:text-dark-text hover:bg-dark-hover"}`,children:n})}function qn({message:t,sessionId:e,onRegenerate:n,onDeleteMessage:s}){const{t:o}=Re(),[i,a]=w.useState(!1),c=w.useRef(null);w.useEffect(()=>()=>{c.current&&clearTimeout(c.current)},[]);const l=w.useCallback(async()=>{try{await navigator.clipboard.writeText(t.content||t.thinking||""),a(!0),c.current&&clearTimeout(c.current),c.current=setTimeout(()=>a(!1),2e3)}catch(d){console.error("Failed to copy message:",d)}},[t.content,t.thinking]);return e?r.jsxs(r.Fragment,{children:[r.jsx($t,{onClick:l,title:o("chat.copyMessage"),children:i?r.jsx(sr,{size:12,className:"text-accent-green"}):r.jsx(rr,{size:12})}),t.type==="assistant"&&n&&r.jsx($t,{onClick:()=>n(t.id),title:o("chat.regenerate"),children:r.jsx(Rt,{size:12})}),s&&r.jsx($t,{onClick:()=>s(t.id),title:o("chat.deleteMessage"),danger:!0,children:r.jsx(as,{size:12})})]}):null}function er({ts:t,align:e,children:n}){const{i18n:s}=Re(),o=s.language==="en"?"en-US":"zh-CN";return r.jsx("div",{className:"relative h-0 select-none",children:r.jsxs("div",{className:`absolute top-1 flex items-center gap-0.5 text-[10.5px] leading-none whitespace-nowrap opacity-0 group-hover:opacity-100 group-focus-within:opacity-100 transition-opacity duration-150 ${e==="right"?"right-0":"left-0"}`,children:[n,r.jsx("span",{className:"pl-1 text-[10px] text-dark-muted/50",children:new Date(t).toLocaleTimeString(o,{hour:"2-digit",minute:"2-digit"})})]})})}const wa=w.memo(function({message:e,sessionId:n,onRegenerate:s,onDeleteMessage:o}){var v,I,b;const{t:i}=Re(),a=Oe(m=>{var k;if(!n||!m.generatingSessions.includes(n))return!1;const g=m.messagesBySession[n];return g?((k=g[g.length-1])==null?void 0:k.id)===e.id:!1}),[c,l]=w.useState(!0),d=w.useRef(a);w.useEffect(()=>{d.current&&!a&&l(!0),d.current=a},[a]);const u=e.type==="user",f=e.type==="system",x=w.useCallback((m,g)=>{if(!n)return;const j=Oe.getState().getMessages(n),T=j.findIndex(y=>y.id===e.id);if(T===-1)return;const L=j[T];if(!L)return;const h={...L,hookApproval:L.hookApproval?{...L.hookApproval,status:g}:void 0},S=[...j];S[T]=h,Oe.setState({messagesBySession:{...Oe.getState().messagesBySession,[n]:S}})},[n,e.id]);if(e.deleted)return null;if(u)return r.jsx("div",{className:"group flex justify-end animate-fade-in-up px-1",children:r.jsxs("div",{className:"max-w-[92%] md:max-w-[78%]",children:[r.jsx("div",{className:"rounded-2xl rounded-br-md border border-dark-border/70 bg-dark-surface px-4 py-2.5 shadow-sm",children:r.jsx("div",{className:"text-dark-text whitespace-pre-wrap break-words leading-relaxed text-sm",children:(v=e.content)==null?void 0:v.replace(/\n{3,}/g,`
9
-
10
- `)})}),r.jsx(er,{ts:e.timestamp,align:"right",children:r.jsx(qn,{message:e,sessionId:n,onRegenerate:s,onDeleteMessage:o})})]})});if(f)return r.jsx("div",{className:"flex justify-center animate-fade-in-up px-1 py-1",children:r.jsx("div",{className:"text-[11px] text-dark-muted bg-dark-surface border border-dark-border/60 rounded-full px-3.5 py-1 max-w-[90%] text-center",children:e.content})});const p=!e.hookApproval&&!!(e.thinking&&e.thinking.trim()||e.steps&&e.steps.length>0||e.toolCalls&&e.toolCalls.length>0);return r.jsx("div",{className:"group flex animate-fade-in-up px-1",children:r.jsxs("div",{className:"w-full max-w-full",children:[r.jsx(er,{ts:e.timestamp,align:"left",children:r.jsx(qn,{message:e,sessionId:n,onRegenerate:s,onDeleteMessage:o})}),r.jsxs("div",{className:p?"pt-7":"",children:[e.steps&&e.steps.length>0&&!e.hookApproval?r.jsx(xa,{steps:e.steps,isGenerating:a}):r.jsxs(r.Fragment,{children:[e.thinking&&!e.hookApproval&&r.jsxs("div",{className:"mb-1",children:[r.jsxs("button",{className:"flex items-center gap-1.5 cursor-pointer select-none py-0.5 text-xs",onClick:()=>l(!c),"data-testid":"thinking-toggle",children:[r.jsx(nn,{size:12,className:`text-dark-muted transition-transform ${c?"":"rotate-90"}`}),r.jsx("span",{className:a?"text-accent-blue/90 animate-pulse":"text-dark-muted",children:a?`${i("chat.thinking")}…`:i("chat.thoughtProcess")})]}),!c&&r.jsx("div",{className:"mt-1 text-xs text-dark-muted whitespace-pre-wrap break-words border-l-2 border-dark-border/40 pl-3 max-h-64 overflow-y-auto custom-scrollbar",children:e.thinking.replace(/\n{3,}/g,`
11
-
12
- `)})]}),e.toolCalls&&e.toolCalls.length>0&&!e.hookApproval&&r.jsx("div",{className:"mb-1 space-y-0.5",children:e.toolCalls.map(m=>r.jsx(Gr,{toolCall:m},m.id))})]}),e.content?r.jsx("div",{className:"leading-relaxed",children:r.jsx(na,{content:e.content.replace(/\n{3,}/g,`
13
-
14
- `)})}):!e.thinking&&!e.hookApproval&&((I=e.steps)!=null&&I.length)?null:!e.thinking&&!e.hookApproval&&!((b=e.steps)!=null&&b.length)&&a?r.jsxs("div",{className:"flex items-center gap-3 py-1 text-xs text-dark-muted",children:[r.jsxs("span",{className:"flex items-center gap-1",children:[r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-accent-blue animate-blink"}),r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-accent-blue animate-blink",style:{animationDelay:"0.2s"}}),r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-accent-blue animate-blink",style:{animationDelay:"0.4s"}})]}),i("chat.thinking"),"..."]}):null,e.fileJob&&r.jsx("div",{className:"mt-3",children:r.jsx(ba,{job:e.fileJob})}),e.errorCard&&r.jsx("div",{className:"mt-3",children:r.jsx(Sa,{error:e.errorCard,onRetry:n&&s?()=>s(e.id):void 0})}),e.hookApproval&&r.jsx("div",{className:"mt-3 border-l-2 border-accent-yellow/50 pl-3",children:r.jsx(ga,{approval:e.hookApproval,onResolved:x})})]})]})})}),ka=w.memo(function({messages:e,isGenerating:n,sessionId:s,onSendSuggestion:o,onRegenerate:i,onDeleteMessage:a}){const{t:c}=Re(),l=w.useRef(null),d=w.useRef(n);d.current=n;const[u,f]=w.useState(!0),x=w.useCallback(j=>{const T=j.currentTarget,L=T.scrollHeight-T.scrollTop-T.clientHeight;f(L<50)},[]),p=w.useMemo(()=>H.forwardRef((j,T)=>r.jsx("div",{...j,ref:T,onScroll:x})),[x]);w.useEffect(()=>{n&&(f(!0),requestAnimationFrame(()=>{var j;(j=l.current)==null||j.scrollToIndex({index:"LAST",behavior:"smooth"})}))},[n]);const v=w.useMemo(()=>e.filter(j=>!j.deleted),[e]),I=w.useMemo(()=>(j,T)=>r.jsx("div",{className:"px-4 py-2",children:r.jsx(wa,{message:T,sessionId:s,onRegenerate:i,onDeleteMessage:a})}),[s,i,a]),b=w.useMemo(()=>()=>n?r.jsxs("div",{className:"flex items-center gap-2 text-xs text-dark-muted py-3 px-5",children:[r.jsxs("span",{className:"flex items-center gap-1",children:[r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-accent-blue animate-blink"}),r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-accent-blue animate-blink",style:{animationDelay:"0.2s"}}),r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-accent-blue animate-blink",style:{animationDelay:"0.4s"}})]}),r.jsx("span",{children:c("chat.thinkingEllipsis")})]}):null,[n,c]),m=w.useMemo(()=>[{icon:is,label:c("chat.suggestionCode"),prompt:c("chat.suggestionCodePrompt")},{icon:ls,label:c("chat.suggestionAnalyze"),prompt:c("chat.suggestionAnalyzePrompt")},{icon:cs,label:c("chat.suggestionAutomate"),prompt:c("chat.suggestionAutomatePrompt")}],[c]),g=w.useMemo(()=>()=>r.jsx("div",{className:"flex min-h-[55vh] items-center justify-center p-6",children:r.jsxs("div",{className:"w-full max-w-xl px-4 text-center",children:[r.jsx("img",{src:"/logo.svg",alt:"deepseekcode",className:"w-14 h-14 mx-auto mb-5 rounded-2xl shadow-md"}),r.jsx("h2",{className:"text-xl font-semibold tracking-tight mb-2",children:c("chat.welcome")}),r.jsx("p",{className:"text-dark-muted text-sm mb-8",children:c("chat.welcomeDesc")}),o&&r.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-2.5 text-left",children:m.map(j=>r.jsxs("button",{onClick:()=>o(j.prompt),className:"group w-full rounded-xl border border-dark-border bg-dark-surface px-3.5 py-3 text-left transition-all duration-150 hover:border-accent-blue/40 hover:shadow-md hover:-translate-y-px",children:[r.jsx(j.icon,{size:16,"aria-hidden":"true",className:"text-accent-blue mb-2"}),r.jsx("div",{className:"text-[13px] font-medium text-dark-text",children:j.label}),r.jsx("div",{className:"mt-0.5 text-[11px] leading-snug text-dark-muted line-clamp-2",children:j.prompt})]},j.label))})]})}),[c,m,o]),k=w.useMemo(()=>v.length===0?{Scroller:p,Footer:b,Header:g}:{Scroller:p,Footer:b},[p,b,g,v.length]);return r.jsx("div",{className:"flex-1 min-h-0 overflow-hidden",children:r.jsx(Mo,{ref:l,data:v,itemContent:I,followOutput:u?"smooth":void 0,components:k,style:{height:"100%"}})})}),Ta={plan:"border-accent-blue/30 text-accent-blue bg-accent-blue/10","auto-plan":"border-accent-cyan/30 text-accent-cyan bg-accent-cyan/10",act:"border-accent-green/30 text-accent-green bg-accent-green/10","auto-act":"border-accent-yellow/30 text-accent-yellow bg-accent-yellow/10",goal:"border-accent-purple/30 text-accent-purple bg-accent-purple/10","auto-goal":"border-accent-red/30 text-accent-red bg-accent-red/10",normal:"border-accent-green/30 text-accent-green"},Ia=w.memo(function(){const{t:e}=Re(),n=st(l=>l.mode),s=st(l=>l.setBaseMode),o=st(l=>l.toggleAuto),i=n==="normal"?"act":n,a=Ss(i),c=Kt(i);return r.jsxs("div",{className:"flex items-center gap-1",children:[bs.map(l=>{const d=a===l,u=vs[l],f=n!=="normal"&&d?Ta[n]??"border-dark-border text-dark-muted":"border-dark-border text-dark-muted hover:bg-dark-hover";return r.jsx("button",{type:"button",onClick:()=>s(l),className:Me("px-2 py-0.5 rounded-full border text-xs whitespace-nowrap transition-colors cursor-pointer",f),title:e("chat.clickToSwitchMode"),"aria-pressed":d,children:u.label},l)}),r.jsxs("button",{type:"button",role:"switch","aria-checked":c,onClick:()=>o(),className:Me("flex items-center gap-1 px-2 py-0.5 rounded-full border text-xs whitespace-nowrap transition-colors cursor-pointer",c?"border-accent-yellow/40 text-accent-yellow bg-accent-yellow/10":"border-dark-border text-dark-muted hover:bg-dark-hover"),title:e("plan.autoApprove"),children:[r.jsx(Rt,{size:11,className:Me(c?"text-accent-yellow":"text-dark-muted")}),r.jsx("span",{children:e("plan.autoApprove")})]})]})}),Ea=800,tr=/\[Pasted text #(\d+)(?:\s*\+\d+ lines?)?\]/g;let Na=0;const Wr=new Map;function ya(t){const e=++Na;return Wr.set(e,t),e}function Ca(t){return t.length>Ea||Vr(t)>0}function Vr(t){return(t.match(/\r\n|\r|\n/g)||[]).length}function ja(t){const e=ya(t),n=Vr(t);return n===0?{id:e,label:`[Pasted text #${e}]`}:{id:e,label:`[Pasted text #${e} +${n} lines]`}}function Ra(t){return tr.lastIndex=0,t.replace(tr,(e,n)=>{const s=parseInt(n,10),o=Wr.get(s);return o!==void 0?o:e})}function Aa(){return typeof window<"u"&&!!window.__TAURI__}async function Oa(){const t=window.__TAURI__;if(!t)return null;try{const e=await t.core.invoke("pick_files");return Array.isArray(e)?e.map(n=>String(n)).filter(Boolean):null}catch(e){return console.warn("[native] pick_files failed, falling back to browser picker:",e),null}}const nr=/\.(xlsx|xls|csv|docx|txt|md)$/i,La=".deepseekcode/attachments",Fa=50*1024*1024,Et=10,Da=t=>/\.xlsx?$/i.test(t)?Wt:/\.(csv|docx|txt|md)$/i.test(t)?Gt:ar,Ha=w.memo(function({sessionId:e,onSend:n,onStop:s,onPause:o,onResume:i}){const{t:a}=Re(),c=Oe(R=>{var V;return((V=R.sessionInputs)==null?void 0:V[e])??""}),l=Oe(R=>R.setSessionInput),d=Oe(R=>{var V;return((V=R.generatingSessions)==null?void 0:V.includes(e))??!1}),u=Oe(R=>{var V;return((V=R.pausedSessions)==null?void 0:V.includes(e))??!1}),f=w.useRef(null),x=w.useRef(null),p=w.useRef(!1),[v,I]=w.useState([]),[b,m]=w.useState(!1),g=w.useDeferredValue(c),k=yn(R=>R.estimateTokens),j=w.useMemo(()=>k(g),[g,k]),T=yn(R=>R.model),L=w.useCallback(R=>{l(e,R)},[e,l]),h=w.useCallback(()=>{const R=f.current;R&&(R.style.height="auto",R.style.height=Math.min(R.scrollHeight,200)+"px")},[]);w.useEffect(()=>{h()},[c,v.length,h]);const S=w.useCallback(R=>{const V=R.target.value;L(V)},[L]),y=w.useCallback(R=>{const V=Array.from(R);I(K=>{const ue=Et-K.length,N=K.slice();for(const B of V.slice(0,ue)){if(!nr.test(B.name)){Pe.warning(a("fileJob.unsupportedType",{name:B.name}));continue}if(B.size>Fa){Pe.error(a("fileJob.fileTooLarge",{name:B.name}));continue}if(N.some(Z=>Z.name===B.name)){Pe.warning(a("fileJob.duplicateFile",{name:B.name}));continue}N.push({id:`att-${Date.now()}-${Math.random().toString(36).slice(2,6)}`,file:B,name:B.name,size:B.size,uploading:!1})}return N.length>=Et&&Pe.warning(a("fileJob.maxAttachments",{n:Et})),N})},[a]),F=w.useCallback(R=>{R.target.files&&R.target.files.length>0&&(y(R.target.files),R.target.value="")},[y]),O=w.useCallback(async()=>{var R;if(Aa()){const V=await Oa();if(!V||V.length===0)return;const K=await Vt.fileJob.importPaths(V);if(K.success&&Array.isArray(K.data)){const ue=K.data.filter(N=>nr.test(N.name)).map(N=>({id:`att-${Date.now()}-${Math.random().toString(36).slice(2,6)}`,name:N.name,size:N.size,uploading:!1,path:N.path.replace(/\\/g,"/")}));I(N=>{const B=Et-N.length;return[...N,...ue.slice(0,B)]})}else Pe.error(K.error||a("fileJob.importFailed"))}else(R=x.current)==null||R.click()},[a]),U=w.useCallback(R=>{I(V=>V.filter(K=>K.id!==R))},[]),D=w.useCallback(R=>{R.preventDefault(),m(!0)},[]),M=w.useCallback(R=>{R.preventDefault(),m(!1)},[]),X=w.useCallback(R=>{R.preventDefault(),m(!1),R.dataTransfer.files&&R.dataTransfer.files.length>0&&y(R.dataTransfer.files)},[y]),Q=w.useCallback(async()=>{var V;if(v.length===0)return"";const R=[];for(const K of v){if(K.path){R.push(`<attachment path="${K.path}" />`);continue}if(!K.file)continue;I(B=>B.map(Z=>Z.id===K.id?{...Z,uploading:!0,error:void 0}:Z));const ue=`${La}/${K.name}`,N=await Vt.files.upload(K.file,ue);if(N.success&&((V=N.data)!=null&&V.path)){const B=N.data.path.replace(/\\/g,"/");I(Z=>Z.map(ee=>ee.id===K.id?{...ee,uploading:!1,path:B}:ee)),R.push(`<attachment path="${B}" />`)}else I(B=>B.map(Z=>Z.id===K.id?{...Z,uploading:!1,error:N.error||a("fileJob.uploadFailed")}:Z)),Pe.error(`${K.name}: ${N.error||a("fileJob.uploadFailed")}`)}return R.length>0?`${R.join(`
15
- `)}
16
-
17
- `:""},[v,a]),J=w.useCallback(R=>{const V=R.clipboardData.getData("text/plain");if(R.clipboardData.files&&R.clipboardData.files.length>0){R.preventDefault(),y(R.clipboardData.files);return}if(!V||!Ca(V))return;R.preventDefault();const{label:K}=ja(V),ue=f.current;if(!ue)return;const N=ue.selectionStart,B=ue.selectionEnd,Z=ue.value,ee=Z.slice(0,N)+K+Z.slice(B);L(ee),requestAnimationFrame(()=>{ue.selectionStart=ue.selectionEnd=N+K.length})},[L,y]),ie=w.useCallback(async()=>{const R=c.trim(),V=v.length>0;if(!R&&!V)return;let K="";if(V){if(v.some(N=>N.uploading)){Pe.warning(a("fileJob.stillUploading"));return}K=await Q()}const ue=(K+Ra(c)).trim();!ue&&!V||(n(ue||K.trim()),L(""),I([]))},[c,v,n,L,Q,a]),Ee=w.useCallback(R=>{if(!R.nativeEvent.isComposing){if(R.key==="Escape"&&d){R.preventDefault(),u?i():o();return}if(R.key==="Enter"&&(R.ctrlKey||R.metaKey)){R.preventDefault(),ie();return}R.key==="Enter"&&!R.shiftKey&&(R.preventDefault(),ie())}},[d,u,ie,o,i]),be=w.useCallback(()=>{p.current=!0},[]),Se=w.useCallback(()=>{p.current=!1},[]),Ae=j>8e3,ve=c.trim().length>0||v.length>0;return r.jsxs("div",{className:"shrink-0 px-3 sm:px-4 pb-3 pt-2 bg-dark-bg",onDragOver:D,onDragLeave:M,onDrop:X,children:[v.length>0&&r.jsx("div",{className:"mb-2 flex flex-wrap gap-1.5",children:v.map(R=>{const V=Da(R.name);return r.jsxs("div",{className:Me("flex items-center gap-1.5 rounded-lg border px-2 py-1 text-xs transition-colors",R.error?"border-accent-red/40 bg-accent-red/5 text-accent-red":R.uploading?"border-accent-blue/40 bg-accent-blue/5 text-accent-blue":"border-dark-border bg-dark-surface text-dark-text"),children:[R.uploading?r.jsx(or,{size:13,className:"animate-spin"}):r.jsx(V,{size:13}),r.jsx("span",{className:"max-w-[140px] truncate",children:R.name}),r.jsx("span",{className:"text-[10px] text-dark-muted",children:R.size>1024*1024?`${(R.size/1024/1024).toFixed(1)} MB`:`${Math.max(1,Math.round(R.size/1024))} KB`}),!R.uploading&&r.jsx("button",{onClick:()=>U(R.id),className:"rounded p-0.5 text-dark-muted hover:text-accent-red hover:bg-accent-red/10 transition-colors","aria-label":a("a11y.close"),children:r.jsx(rn,{size:11})})]},R.id)})}),b&&r.jsx("div",{className:"mb-2 rounded-2xl border-2 border-dashed border-accent-blue/50 bg-accent-blue/5 py-3 text-center text-xs text-accent-blue",children:a("fileJob.dropHint")}),r.jsxs("div",{className:"rounded-2xl border border-dark-border bg-dark-surface shadow-sm transition-all duration-150 focus-within:border-accent-blue/50 focus-within:ring-4 focus-within:ring-accent-blue/10",children:[r.jsx("textarea",{ref:f,value:c,onChange:S,onKeyDown:Ee,onPaste:J,onCompositionStart:be,onCompositionEnd:Se,placeholder:a(d?"chat.generatingPlaceholder":"chat.inputPlaceholder"),rows:1,disabled:d&&!u,"aria-label":"Message input",className:`w-full bg-transparent px-4 pt-3.5 pb-2 text-sm text-dark-text placeholder-dark-muted/60
18
- resize-none focus:outline-none min-h-[44px] max-h-[40vh] leading-relaxed
19
- disabled:opacity-50 disabled:cursor-not-allowed`}),r.jsxs("div",{className:"flex items-center gap-2 px-2.5 pb-2.5",children:[r.jsx(Ia,{}),r.jsx("span",{className:"text-[11px] text-dark-muted/80 font-mono truncate max-w-[10rem] hidden sm:block",children:T||""}),r.jsx("div",{className:"flex-1"}),j>0&&c.length>0&&r.jsxs("span",{className:`text-[10px] tabular-nums ${Ae?"text-accent-red font-medium":"text-dark-muted/60"}`,children:["~",j," tokens",Ae?` · ${a("chat.nearLimit")}`:""]}),!d&&r.jsx("button",{onClick:()=>void O(),className:"flex h-8 w-8 items-center justify-center rounded-full text-dark-muted transition-colors hover:bg-dark-hover hover:text-dark-text",title:a("fileJob.attach"),"aria-label":a("fileJob.attach"),children:r.jsx(ds,{size:15,"aria-hidden":"true"})}),r.jsx("input",{ref:x,type:"file",multiple:!0,accept:".xlsx,.xls,.csv,.docx,.txt,.md",className:"hidden",onChange:F}),d?r.jsxs("div",{className:"flex items-center gap-1.5",children:[u?r.jsx("button",{onClick:i,className:"flex h-8 w-8 items-center justify-center rounded-full bg-accent-green text-white transition-all hover:opacity-85 active:scale-95",title:a("chat.resumeGen"),"aria-label":a("chat.resumeGen"),children:r.jsx(us,{size:14,"aria-hidden":"true"})}):r.jsx("button",{onClick:o,className:"flex h-8 w-8 items-center justify-center rounded-full bg-accent-yellow text-white transition-all hover:opacity-85 active:scale-95",title:a("chat.pauseGen"),"aria-label":a("chat.pauseGen"),children:r.jsx(ps,{size:14,"aria-hidden":"true"})}),r.jsx("button",{onClick:s,className:"flex h-8 w-8 items-center justify-center rounded-full bg-accent-red text-white transition-all hover:opacity-85 active:scale-95",title:a("chat.stopGen"),"aria-label":a("chat.stopGen"),children:r.jsx(ms,{size:13,"aria-hidden":"true"})})]}):r.jsx("button",{onClick:()=>void ie(),disabled:!ve,className:`flex h-8 w-8 items-center justify-center rounded-full bg-dark-text text-dark-bg transition-all
20
- hover:opacity-80 active:scale-95 disabled:opacity-25 disabled:cursor-not-allowed`,title:a("chat.sendBtn"),"aria-label":a("chat.sendBtn"),children:r.jsx(hs,{size:15,"aria-hidden":"true"})})]})]}),r.jsxs("div",{className:"mt-1.5 hidden sm:flex items-center justify-center gap-3 text-[10px] text-dark-muted/50 select-none",children:[r.jsx("span",{children:a("chat.shiftEnter")}),r.jsx("span",{"aria-hidden":"true",children:"·"}),r.jsx("span",{children:a("chat.escHint")})]})]})}),za=w.memo(function(){const{t:e}=Re(),[n,s]=w.useState(0),[o,i]=w.useState(0),a=w.useCallback(()=>{const c=De.getReconnectState();s(c.reconnecting?c.attempts:0),i(c.maxAttempts)},[]);return w.useEffect(()=>{const c=De.onReconnectAttempt((x,p)=>{s(x),i(p)}),l=De.onReconnectSuccess(()=>{s(0),i(0)}),d=De.onReconnectGiveUp(()=>s(0)),u=De.onClose(a),f=De.onOpen(a);return a(),()=>{c(),l(),d(),u(),f()}},[a]),n<=0?null:r.jsxs("div",{className:"flex items-center justify-center gap-2 px-4 py-2 text-xs text-accent-yellow bg-accent-yellow/10 border-b border-accent-yellow/20 select-none",role:"status","aria-live":"polite",children:[r.jsx(Rt,{size:13,className:"animate-spin shrink-0"}),r.jsx("span",{children:e("reconnect.reconnecting",{attempt:n,max:o})}),r.jsx("span",{className:"hidden sm:inline text-[10px] text-accent-yellow/70",children:e("reconnect.hint")})]})}),Ut="dsc-auto-access-banner-dismissed",Ma=w.memo(function(){const{t:e}=Re(),n=st(c=>c.mode),[s,o]=w.useState(()=>localStorage.getItem(Ut)==="1");w.useEffect(()=>{Kt(n==="normal"?"act":n)||localStorage.getItem(Ut)==="1"&&o(!1)},[n]);const i=w.useCallback(c=>{c&&localStorage.setItem(Ut,"1"),o(!0)},[]);return!(n!=="normal"&&Kt(n))||s?null:r.jsxs("div",{className:"flex items-start gap-2 px-4 py-2 text-[11px] leading-snug text-accent-yellow bg-accent-yellow/10 border-b border-accent-yellow/20 select-none",role:"note",children:[r.jsx(fs,{size:14,className:"shrink-0 mt-0.5 text-accent-yellow"}),r.jsxs("div",{className:"min-w-0 flex-1",children:[r.jsx("span",{className:"font-medium",children:e("autoAccess.title")}),r.jsxs("span",{className:"text-accent-yellow/80",children:[" ",e("autoAccess.desc")]})]}),r.jsx("button",{onClick:()=>i(!1),className:"shrink-0 rounded p-0.5 text-accent-yellow/70 hover:text-accent-yellow hover:bg-accent-yellow/10 transition-colors",title:e("autoAccess.dismiss"),"aria-label":e("autoAccess.dismiss"),children:r.jsx(rn,{size:12})}),r.jsx("button",{onClick:()=>i(!0),className:"shrink-0 rounded px-1.5 py-0.5 text-[10px] text-accent-yellow/70 hover:text-accent-yellow hover:bg-accent-yellow/10 transition-colors whitespace-nowrap",children:e("autoAccess.neverShow")})]})}),Wa=w.memo(function({tabs:e,activeSessionId:n,onSend:s,onStop:o,onPause:i,onResume:a,activeTab:c,setActiveTab:l,createNewSession:d,clearMessages:u,setTheme:f,toggleTerminal:x,setLogs:p,setUnreadLogs:v,showTaskBoard:I=!0,onToggleTaskBoard:b,onRegenerate:m,onDeleteMessage:g}){const k=Oe(D=>n?D.messagesBySession[n]||[]:[]),j=Oe(D=>n?D.generatingSessions.includes(n):!1),T=Oe(D=>n?D.pausedSessions.includes(n):!1),L=ws(D=>n?D.getTasksForSession(n):[]),h=e.find(D=>D.id===n)||null,S=L.length>0,y=w.useCallback((D,M)=>{n&&s(n,D,M)},[s,n]),F=w.useCallback(D=>{n&&s(n,D)},[s,n]),O=w.useCallback(D=>{n&&m&&m(n,D)},[m,n]),U=w.useCallback(D=>{n&&g&&g(n,D)},[g,n]);return r.jsxs("div",{className:"flex-1 flex min-h-0",children:[r.jsxs("div",{className:"flex-1 flex flex-col min-w-0 min-h-0",children:[r.jsx(za,{}),r.jsx(Ma,{}),h&&r.jsxs(r.Fragment,{children:[r.jsx(ka,{messages:k,isGenerating:j,isPaused:T,sessionId:h.id,onSendSuggestion:F,onRegenerate:m?O:void 0,onDeleteMessage:g?U:void 0}),r.jsx(Ha,{sessionId:h.id,onSend:y,onStop:()=>o(h.id),onPause:()=>i(h.id),onResume:()=>a(h.id)})]})]}),n&&I&&S&&r.jsx("div",{className:"w-80 shrink-0 border-l border-dark-border overflow-hidden flex flex-col min-h-0 max-lg:hidden",children:r.jsx(ks,{sessionId:n,defaultExpanded:!0,onClose:b})}),n&&!I&&S&&r.jsxs("button",{onClick:b,className:"fixed bottom-6 right-6 z-40 bg-accent-blue text-white rounded-full px-3 py-2 shadow-lg hover:opacity-90 transition-opacity flex items-center gap-1.5 text-xs",children:[r.jsx(xs,{size:14}),"Task Board"]})]})});export{Wa as SessionGrid};
@@ -1,3 +0,0 @@
1
- import{j as r}from"./markdown-BUScHEtT.js";import{r as s,ao as U,ap as J,p as V,aq as _,D as K,a0 as Q,ar as X,as as Z}from"./icons-uody4X-4.js";import{x as ee,a as te}from"./terminal-Ck_l6svU.js";import{f as $,g as re,h as C,t as se}from"./index-futMRNcm.js";import"./react-vendor-C5NlWs7r.js";import"./state-DKyBAq9j.js";const ne={background:"#1e1e1e",foreground:"#d4d4d4",cursor:"#d4d4d4",cursorAccent:"#1e1e1e",black:"#1e1e1e",red:"#f44747",green:"#608b4e",yellow:"#dcdcaa",blue:"#569cd6",magenta:"#c586c0",cyan:"#4ec9b0",white:"#d4d4d4",brightBlack:"#808080",brightRed:"#f44747",brightGreen:"#608b4e",brightYellow:"#dcdcaa",brightBlue:"#569cd6",brightMagenta:"#c586c0",brightCyan:"#4ec9b0",brightWhite:"#ffffff"};function de(){const f=s.useRef(null),c=s.useRef(null),w=s.useRef(null),o=s.useRef(null),[j,M]=s.useState(!1),[g,v]=s.useState(null),[B,R]=s.useState(!0),d=s.useRef(!1),S=s.useRef({isAtBottom:!0}),I=s.useCallback(t=>{const e=c.current;if(!e)return;const n=e.buffer.active;S.current.isAtBottom=n.baseY+e.rows>=n.length,e.write(t,()=>{S.current.isAtBottom&&!d.current&&e.scrollToBottom();const l=e.buffer.active;l.baseY+e.rows>=l.length&&(d.current=!1)})},[]),[k,y]=s.useState(""),p=s.useCallback(()=>{const t=c.current,e=o.current;!t||!e||e.readyState!==WebSocket.OPEN||e.send(JSON.stringify({type:"resize",cols:t.cols,rows:t.rows}))},[]),{status:T,errorMessage:N,port:z}=$(),{setStarting:E,setRunning:A,setStopping:D,setIdle:L,setError:m}=$(),{workspaceDir:x}=re(),b=s.useCallback(()=>{o.current&&(o.current.onclose=null,o.current.onmessage=null,o.current.onerror=null,o.current.onopen=null,o.current.close(),o.current=null)},[]),h=s.useCallback(async t=>{E(),t.writeln("\x1B[90mStarting local terminal...\x1B[0m");try{const e=await C.post("/api/terminal/start",{workspaceDir:x});if(!e.success||!e.data){const a=e.error||"Failed to start terminal";m(a),t.writeln(`\x1B[31m${a}\x1B[0m`);return}const n=e.data.port??e.data.ttydPort,l=e.data.wsUrl;if(!n||!l){const a="Invalid terminal start response";m(a),t.writeln(`\x1B[31m${a}\x1B[0m`);return}A(n,l),y(e.data.workspaceDir||x);const u=new WebSocket(l);o.current=u,u.onopen=()=>{t.clear(),t.focus(),t.writeln("\x1B[32mConnected to local shell\x1B[0m"),setTimeout(()=>{var a,i;(a=w.current)==null||a.fit(),p(),d.current||(i=c.current)==null||i.scrollToBottom()},50)},u.onmessage=a=>{typeof a.data=="string"&&I(a.data)},u.onerror=()=>{m("Terminal connection error")},u.onclose=()=>{o.current===u&&(o.current=null,m("Terminal disconnected"),t.writeln("\x1B[33mTerminal disconnected\x1B[0m"))}}catch(e){const n=e instanceof Error?e.message:"Unknown error";m(n),t.writeln(`\x1B[31m${n}\x1B[0m`)}},[x,E,A,m,p]),F=s.useCallback(async()=>{b(),D();try{await C.post("/api/terminal/stop")}catch{}L()},[b,D,L]);s.useEffect(()=>{f.current&&C.get("/api/terminal/status").then(t=>{const e=t.success&&t.data?t.data:null;v((e==null?void 0:e.terminalAvailable)!==!1),e!=null&&e.workspaceDir&&y(e.workspaceDir)}).catch(()=>v(!1))},[]),s.useEffect(()=>{if(g!==!0||!f.current)return;const t=new ee.Terminal({theme:ne,fontFamily:'"Cascadia Code", "Fira Code", Consolas, "Courier New", monospace',fontSize:14,lineHeight:1.2,cursorBlink:!0,cursorStyle:"block",scrollback:1e4,convertEol:!0}),e=new te.FitAddon;t.loadAddon(e),t.open(f.current),t.focus(),e.fit(),c.current=t,w.current=e,t.writeln("\x1B[36mDeepSeekCode Local Terminal\x1B[0m"),t.writeln("\x1B[90mRun commands directly on this machine.\x1B[0m");const n=t.onData(i=>{var W;((W=o.current)==null?void 0:W.readyState)===WebSocket.OPEN&&o.current.send(i)}),l=t.onScroll(()=>{const i=t.buffer.active;i.baseY+t.rows<i.length&&(d.current=!0,R(!1))}),u=()=>{var i;(i=w.current)==null||i.fit(),p(),d.current||t.scrollToBottom()};window.addEventListener("resize",u);const a=window.setTimeout(()=>h(t),50);return()=>{clearTimeout(a),window.removeEventListener("resize",u),n.dispose(),l.dispose(),F(),t.dispose(),c.current=null}},[g,h,F,p]);const O=s.useCallback(()=>{var e;const t=(e=c.current)==null?void 0:e.getSelection();t&&(navigator.clipboard.writeText(t),se.success("Copied selection"))},[]),P=s.useCallback(()=>{var t,e;(t=c.current)==null||t.clear(),d.current||(e=c.current)==null||e.scrollToBottom()},[]),Y=s.useCallback(()=>{b(),c.current&&(c.current.clear(),h(c.current))},[b,h]),H=s.useCallback(()=>{R(t=>{var n;const e=!t;return d.current=!e,e&&((n=c.current)==null||n.scrollToBottom()),e})},[]),q=s.useCallback(()=>{const t=`Workspace: ${k||x}
2
- Terminal session: ${z??""}
3
- `,e=new Blob([t],{type:"text/plain"}),n=URL.createObjectURL(e),l=document.createElement("a");l.href=n,l.download=`terminal-${Date.now()}.log`,l.click(),URL.revokeObjectURL(n)},[x,k,z]),G=s.useMemo(()=>({idle:"Idle",starting:"Connecting",running:"Connected",stopping:"Stopping",error:"Error"})[T],[T]);return g===!1?r.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center bg-[#1e1e1e] gap-3 p-8",children:[r.jsx(U,{size:44,className:"text-dark-muted opacity-40"}),r.jsx("div",{className:"text-sm text-dark-muted",children:"Local terminal unavailable"})]}):r.jsxs("div",{className:`flex flex-col bg-[#1e1e1e] border-t border-dark-border ${j?"fixed inset-0 z-50":"flex-1 min-h-0"}`,children:[r.jsxs("div",{className:"flex items-center justify-between gap-3 px-3 py-2 bg-[#252526] border-b border-[#3c3c3c]",children:[r.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[r.jsx(U,{size:14,className:"text-dark-muted shrink-0"}),r.jsx("span",{className:"text-xs text-dark-muted shrink-0",children:"Terminal"}),r.jsx("span",{className:"text-xs text-dark-muted truncate",children:k||x}),r.jsxs("span",{className:"text-xs text-dark-muted",children:["[",G,"]"]}),N&&r.jsx("span",{className:"text-xs text-accent-red truncate max-w-[240px]",children:N})]}),r.jsxs("div",{className:"flex items-center gap-1 flex-wrap justify-end",children:[r.jsx("button",{onClick:H,className:`p-1 rounded hover:bg-[#3c3c3c] ${B?"text-accent-blue":"text-dark-muted"} hover:text-dark-text`,title:B?"璺熼殢杈撳嚭锛氬紑":"璺熼殢杈撳嚭锛氬叧",children:r.jsx(J,{size:12})}),r.jsx("button",{onClick:Y,className:"p-1 rounded hover:bg-[#3c3c3c] text-dark-muted hover:text-dark-text",title:"Restart",children:r.jsx(V,{size:12})}),r.jsx("button",{onClick:O,className:"p-1 rounded hover:bg-[#3c3c3c] text-dark-muted hover:text-dark-text",title:"Copy",children:r.jsx(_,{size:12})}),r.jsx("button",{onClick:q,className:"p-1 rounded hover:bg-[#3c3c3c] text-dark-muted hover:text-dark-text",title:"Download log",children:r.jsx(K,{size:12})}),r.jsx("button",{onClick:P,className:"p-1 rounded hover:bg-[#3c3c3c] text-dark-muted hover:text-dark-text",title:"Clear",children:r.jsx(Q,{size:12})}),r.jsx("button",{onClick:()=>M(t=>!t),className:"p-1 rounded hover:bg-[#3c3c3c] text-dark-muted hover:text-dark-text",title:"Fullscreen",children:j?r.jsx(X,{size:12}):r.jsx(Z,{size:12})})]})]}),r.jsx("div",{ref:f,className:"flex-1 overflow-hidden"})]})}export{de as TerminalView,de as default};
@@ -1 +0,0 @@
1
- import"./markdown-BUScHEtT.js";import{r}from"./icons-uody4X-4.js";r.createContext(null);
@@ -1 +0,0 @@
1
- import{j as s}from"./markdown-BUScHEtT.js";import{r as a,p as y,o as A,Q as k,y as $,a as R,i as F,a7 as v,a8 as M,a9 as Q}from"./icons-uody4X-4.js";import{u as D,a as w,b as O}from"./index-futMRNcm.js";import"./react-vendor-C5NlWs7r.js";import"./state-DKyBAq9j.js";function G(){const m=D(e=>e.mode),u=m==="normal"?"act":O(m),[d,p]=a.useState([]),[l,b]=a.useState([]),[C,g]=a.useState(!0),[h,i]=a.useState(null),[r,z]=a.useState(""),[c,f]=a.useState(null),[n,j]=a.useState(null),o=async()=>{g(!0),i(null);const e=await w.tools.list();e.success&&Array.isArray(e.data)?(p(e.data),b(e.data)):e.success&&e.data&&!Array.isArray(e.data)?i("服务端返回的工具数据格式异常"):i(e.error||"加载工具失败"),g(!1)};a.useEffect(()=>{o()},[]),a.useEffect(()=>{let e=d;r&&(e=e.filter(t=>t.name.toLowerCase().includes(r.toLowerCase())||t.description.toLowerCase().includes(r.toLowerCase()))),c&&(e=e.filter(t=>t.category===c)),b(e)},[r,c,d]);const S=async(e,t)=>{(await w.tools.toggle(e,!t)).success&&p(L=>L.map(x=>x.id===e?{...x,enabled:!t}:x))},T=[...new Set(d.map(e=>e.category))],E=e=>({file:"bg-accent-blue/20 text-accent-blue",search:"bg-accent-green/20 text-accent-green",git:"bg-accent-yellow/20 text-accent-yellow",web:"bg-accent-purple/20 text-accent-purple",system:"bg-accent-red/20 text-accent-red"})[e]||"bg-dark-hover text-dark-muted";return C?s.jsx("div",{className:"flex-1 flex items-center justify-center",children:s.jsxs("div",{className:"text-center",children:[s.jsx(y,{size:32,className:"animate-spin mx-auto mb-2 text-accent-blue"}),s.jsx("p",{className:"text-dark-muted",children:"加载中..."})]})}):h?s.jsx("div",{className:"flex-1 flex items-center justify-center",children:s.jsxs("div",{className:"text-center",children:[s.jsx(A,{size:32,className:"mx-auto mb-2 text-accent-red"}),s.jsx("p",{className:"text-accent-red mb-4",children:h}),s.jsx("button",{onClick:o,className:"px-4 py-2 bg-accent-blue text-white rounded-lg",children:"重试"})]})}):s.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden p-4",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsxs("h2",{className:"text-lg font-semibold flex items-center gap-2",children:[s.jsx(k,{size:20}),"工具列表",s.jsxs("span",{className:"text-sm font-normal text-dark-muted",children:["(",l.length,")"]})]}),s.jsxs("button",{onClick:o,className:"flex items-center gap-2 px-3 py-1.5 bg-dark-surface border border-dark-border rounded hover:bg-dark-hover transition-colors",children:[s.jsx(y,{size:14}),"刷新"]})]}),s.jsxs("div",{className:"flex gap-3 mb-4",children:[s.jsxs("div",{className:"flex-1 relative",children:[s.jsx($,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-dark-muted"}),s.jsx("input",{type:"text",value:r,onChange:e=>z(e.target.value),placeholder:"搜索工具...",className:"w-full pl-10 pr-4 py-2 bg-dark-surface border border-dark-border rounded-lg text-dark-text placeholder-dark-muted focus:border-accent-blue focus:outline-none"})]}),s.jsxs("div",{className:"flex gap-1",children:[s.jsx("button",{onClick:()=>f(null),className:`px-3 py-2 rounded-lg text-sm transition-colors ${c?"bg-dark-surface border border-dark-border hover:bg-dark-hover":"bg-accent-blue text-white"}`,children:"全部"}),T.slice(0,4).map(e=>s.jsx("button",{onClick:()=>f(e),className:`px-3 py-2 rounded-lg text-sm transition-colors ${c===e?"bg-accent-blue text-white":"bg-dark-surface border border-dark-border hover:bg-dark-hover"}`,children:e},e))]})]}),s.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto custom-scrollbar",children:s.jsxs("div",{className:"space-y-2",children:[l.map(e=>s.jsxs("div",{className:`bg-dark-surface border rounded-lg transition-colors ${e.enabled?"border-dark-border":"border-dark-border opacity-60"}`,children:[s.jsxs("div",{className:"flex items-center justify-between p-4 cursor-pointer",onClick:()=>j(n===e.id?null:e.id),children:[s.jsxs("div",{className:"flex items-center gap-3 flex-1",children:[s.jsx("button",{onClick:t=>{t.stopPropagation(),j(n===e.id?null:e.id)},className:"text-dark-muted",children:n===e.id?s.jsx(R,{size:16}):s.jsx(F,{size:16})}),s.jsx("span",{className:`px-2 py-0.5 rounded text-xs ${E(e.category)}`,children:e.category}),s.jsx("span",{className:"font-medium",children:e.name}),u==="plan"&&(e.category==="File Operation"||e.category==="Execution")&&s.jsx(v,{size:14,className:"text-accent-red ml-1.5"}),u==="plan"&&(e.category==="File Operation"||e.category==="Execution")&&s.jsx(v,{size:14,className:"text-accent-red ml-1.5"})]}),s.jsx("div",{className:"flex items-center gap-3",children:s.jsx("button",{onClick:t=>{t.stopPropagation(),S(e.id,e.enabled)},className:`p-1.5 rounded transition-colors ${e.enabled?"text-accent-green hover:bg-accent-green/10":"text-dark-muted hover:bg-dark-hover"}`,title:e.enabled?"禁用":"启用",children:e.enabled?s.jsx(M,{size:24}):s.jsx(Q,{size:24})})})]}),n===e.id&&s.jsxs("div",{className:"px-4 pb-4 border-t border-dark-border",children:[s.jsx("p",{className:"text-sm text-dark-muted mt-3 mb-3",children:e.description}),e.params&&e.params.length>0&&s.jsxs("div",{children:[s.jsx("div",{className:"text-xs text-dark-muted mb-2",children:"参数"}),s.jsx("div",{className:"space-y-1",children:e.params.map((t,N)=>s.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[s.jsxs("code",{className:"px-1.5 py-0.5 bg-dark-bg rounded text-accent-blue",children:[t.name,t.required&&s.jsx("span",{className:"text-accent-red",children:"*"})]}),s.jsxs("span",{className:"text-dark-muted text-xs",children:["(",t.type,")"]}),s.jsx("span",{className:"text-dark-muted text-xs",children:t.description})]},N))})]})]})]},e.id)),l.length===0&&s.jsxs("div",{className:"text-center text-dark-muted py-8",children:[s.jsx(k,{size:48,className:"mx-auto mb-2 opacity-50"}),s.jsx("p",{children:"暂无工具"})]})]})})]})}export{G as ToolsView,G as default};
@@ -1 +0,0 @@
1
- import{q as t,r as s}from"./index-futMRNcm.js";function o(e,r){switch(t(e,r)){case"critical":return{level:"CRITICAL",reasonKey:"risk_critical"};case"high":return{level:"HIGH",reasonKey:/rm\s+-rf|sudo|chmod\s+777|curl.*\|\s*(ba)?sh|wget.*-O|>\/dev\/|mkfs/i.test(r)?"risk_critical_cmd":/write|edit|save|upload|deploy|publish/i.test(e)?"risk_high_file":/install|uninstall|npm|pip|cargo|gem|apt|brew|choco|yum|dnf/i.test(e)?"risk_high_pkg":"risk_high_shell"};case"low":return{level:"LOW",reasonKey:"risk_low"};default:return{level:"MEDIUM",reasonKey:/git|commit|push|merge|rebase/i.test(e)?"risk_git":"risk_network"}}}const b={CRITICAL:{bg:"bg-red-900/20",border:"border-red-500/40",text:"text-red-400",badge:"bg-red-500/20 text-red-400 border-red-500/30",icon:"🚨"},HIGH:{bg:"bg-orange-900/15",border:"border-orange-500/30",text:"text-orange-400",badge:"bg-orange-500/20 text-orange-400 border-orange-500/30",icon:"⚠️"},MEDIUM:{bg:"bg-yellow-900/10",border:"border-yellow-500/25",text:"text-yellow-400",badge:"bg-yellow-500/15 text-yellow-400 border-yellow-500/25",icon:"📋"},LOW:{bg:"bg-blue-900/10",border:"border-blue-500/25",text:"text-blue-400",badge:"bg-blue-500/15 text-blue-400 border-blue-500/25",icon:"✅"}};function a(e,r){return s(e,r)}export{b as R,o as c,a as e};