performance.mark("js-parse-end:59153-2ae96d5021fa40a0.js"); "use strict";(globalThis.webpackChunk_github_ui_github_ui=globalThis.webpackChunk_github_ui_github_ui||[]).push([["59153"],{25445(e,t,r){r.d(t,{Z:()=>o});function o({appendQuery:e,retainScrollPosition:t,returnTarget:r}){window.dispatchEvent(new CustomEvent("blackbird_monolith_append_and_focus_input",{detail:{appendQuery:e,retainScrollPosition:t,returnTarget:r}}))}},18660(e,t,r){r.d(t,{_:()=>n});var o=r(74848),i=r(16522);function n(e){let t,r,n,a=(0,i.c)(12),{buttonFocusId:l,buttonHotkey:s,onButtonClick:c,buttonTestLabel:u,onlyAddHotkeyScopeButton:d}=e,f=u||"";return a[0]!==l||a[1]!==s||a[2]!==c||a[3]!==f?(t=(0,o.jsx)("button",{hidden:!0,"data-testid":f,"data-hotkey":s,onClick:c,"data-hotkey-scope":l}),a[0]=l,a[1]=s,a[2]=c,a[3]=f,a[4]=t):t=a[4],a[5]!==s||a[6]!==c||a[7]!==d?(r=!d&&(0,o.jsx)("button",{hidden:!0,"data-hotkey":s,onClick:c}),a[5]=s,a[6]=c,a[7]=d,a[8]=r):r=a[8],a[9]!==t||a[10]!==r?(n=(0,o.jsxs)(o.Fragment,{children:[t,r]}),a[9]=t,a[10]=r,a[11]=n):n=a[11],n}n.displayName="DuplicateOnKeydownButton"},98779(e,t,r){r.d(t,{R:()=>m});var o=r(74848),i=r(16522),n=r(54242),a=r(23666),l=r(32363),s=r(40914),c=r(27678),u=r(31595),d=r(68541),f=r(7231);function m(e){let t,r,m,h,p=(0,i.c)(24),{size:g,buttonClassName:y,allowResizing:_,idEnding:x}=e,w=(0,n.t)(),v=(0,u.l)(),R=(0,c.y)(),F=(0,d.z)(),b=function(){let e,t=(0,i.c)(2),{addToast:r}=(0,s.Y6)();return t[0]!==r?(e=e=>r({type:"error",message:e}),t[0]=r,t[1]=e):e=t[1],e}(),{sendRepoClickEvent:k}=(0,f.T)();p[0]!==R||p[1]!==v||p[2]!==w?(t=e=>`${(0,a.IO9)({repo:w,commitish:e,action:R,path:v})}${window.location.search}`,p[0]=R,p[1]=v,p[2]=w,p[3]=t):t=p[3],p[4]!==k?(r=e=>k("REF_SELECTOR_MENU.CREATE_BRANCH",{ref_name:e}),p[4]=k,p[5]=r):r=p[5],p[6]!==k?(m=e=>e&&k("REF_SELECTOR_MENU"),p[6]=k,p[7]=m):m=p[7];let S=x||"repos-header-ref-selector";return p[8]!==_||p[9]!==y||p[10]!==b||p[11]!==F.listCacheKey||p[12]!==F.name||p[13]!==F.refType||p[14]!==w.currentUserCanPush||p[15]!==w.defaultBranch||p[16]!==w.name||p[17]!==w.ownerLogin||p[18]!==g||p[19]!==t||p[20]!==r||p[21]!==m||p[22]!==S?(h=(0,o.jsx)(l.PI,{currentCommitish:F.name,defaultBranch:w.defaultBranch,owner:w.ownerLogin,repo:w.name,canCreate:w.currentUserCanPush,cacheKey:F.listCacheKey,selectedRefType:F.refType,getHref:t,uiCommandId:"code-view:open-ref-selector",onBeforeCreate:r,onCreateError:b,onOpenChange:m,size:g,buttonClassName:y,allowResizing:_,idEnding:S,useFocusZone:!0}),p[8]=_,p[9]=y,p[10]=b,p[11]=F.listCacheKey,p[12]=F.name,p[13]=F.refType,p[14]=w.currentUserCanPush,p[15]=w.defaultBranch,p[16]=w.name,p[17]=w.ownerLogin,p[18]=g,p[19]=t,p[20]=r,p[21]=m,p[22]=S,p[23]=h):h=p[23],h}m.displayName="ReposHeaderRefSelector"},82175(e,t,r){r.r(t),r.d(t,{FileResultRow:()=>M,default:()=>A});var o=r(74848),i=r(16522),n=r(48337),a=r(31595),l=r(7231),s=r(12191),c=r(54242),u=r(16197),d=r(23666),f=r(77236),m=r(31854),h=r(79040),p=r(29941),g=r(38621),y=r(45800),_=r(59134),x=r(18990),w=r(56133),v=r(94300),R=r(7478),F=r(10095),b=r(91385),k=r(96540),S=r(6406),C=r(45620),N=r(58164),T=r(92100),j=r(34164);let E={excludeDirectories:!1,excludeSeeAllResults:!1};function A(e){var t;let r,f,g,R,F,b,A,M,P,L,H,W,D,$,q,V,U,G,K,z,Z,J,X,Y,Q,ee=(0,i.c)(102),{actionListClassName:et,additionalResults:er,commitOid:eo,config:ei,findFileWorkerPath:en,getItemUrl:ea,onRenderRow:el,onItemSelected:es,searchBoxRef:ec,className:eu}=e,ed=void 0===ei?E:ei,{excludeDirectories:ef,excludeSeeAllResults:em}=ed,{query:eh,setQuery:ep}=(0,n.JS)(),eg=(0,c.t)(),ey=k.useRef(null),e_=ec??ey,[ex,ew]=k.useState(eh.length>0),[ev,eR]=k.useState(!!eh),{list:eF,directories:eb,loading:ek,error:eS}=(0,T.o)(eo,ex,!!ef);ee[0]!==eb?(f=new Set(eb),ee[0]=eb,ee[1]=f):f=ee[1];let eC=f,eN=(0,a.l)(),{getUrl:eT}=(0,s.Z)();ee[2]!==eh?(g=(r=(t=(t=eh).replaceAll(" ","")).indexOf(":"))>=0?{queryText:t.substring(0,r),queryLine:parseInt(t.substring(r+1),10)}:{queryText:t,queryLine:void 0},ee[2]=eh,ee[3]=g):g=ee[3];let{queryText:ej,queryLine:eE}=g,eA=(0,k.useDeferredValue)(ej);e:{let e;if(ek){R=void 0;break e}ee[4]!==er||ee[5]!==eF?(e=[...eF,...er??[]].sort(),ee[4]=er,ee[5]=eF,ee[6]=e):e=ee[6],R=e}let{matches:eI,clearMatches:eB}=function(e,t,r,o){let n,a,s,c,u,d,f,m,h=(0,i.c)(21),[p,g]=k.useState(),y=k.useRef(""),_=k.useRef(null),{sendStats:x}=(0,l.T)(),w=k.useRef(!1),v=k.useRef("");h[0]!==x||h[1]!==r?(n=()=>{let e=new S.z(r,C.j);e.onmessage=e=>{let{data:t}=e;w.current=!1,(0,k.startTransition)(()=>{g(t.list)}),y.current=t.query,t.startTime&&t.query===v.current&&x("repository.find-file",{"find-file-base-count":t.baseCount,"find-file-results-count":t.list.length,"find-file-duration-ms":performance.now()-t.startTime})},_.current=e},h[0]=x,h[1]=r,h[2]=n):n=h[2];let R=(0,k.useEffectEvent)(n);h[3]!==p?(a=(e,t)=>{let r=y.current&&t.startsWith(y.current);w.current=!0,v.current=t,_.current?.postMessage({baseList:r&&p||e,query:t,startTime:performance.now()})},h[3]=p,h[4]=a):a=h[4];let F=(0,k.useEffectEvent)(a);return h[5]!==R||h[6]!==o?(s=()=>{if(o)return R(),function(){_.current?.terminate()}},h[5]=R,h[6]=o,h[7]=s):s=h[7],h[8]!==o?(c=[o],h[8]=o,h[9]=c):c=h[9],k.useEffect(s,c),h[10]!==R||h[11]!==e||h[12]!==F||h[13]!==t?(u=()=>{void 0===e&&v.current?(w.current=!1,_.current?.terminate(),_.current=null,g(void 0)):e?.length&&t&&((w.current||!_.current)&&(_.current?.terminate(),R()),F(e,t))},h[10]=R,h[11]=e,h[12]=F,h[13]=t,h[14]=u):u=h[14],h[15]!==e||h[16]!==t?(d=[e,t],h[15]=e,h[16]=t,h[17]=d):d=h[17],k.useEffect(u,d),h[18]===Symbol.for("react.memo_cache_sentinel")?(f=()=>g(void 0),h[18]=f):f=h[18],h[19]!==p?(m={matches:p,clearMatches:f},h[19]=p,h[20]=m):m=h[20],m}(R,eA,en,ex),{sendRepoClickEvent:eM}=(0,l.T)(),eP=(0,h.Zp)(),[eL,eO]=k.useState(0),[eH,eW]=k.useState(I),eD=k.useRef(null),e$=k.useRef(null),{sendRepoKeyDownEvent:eq}=(0,l.T)(),{screenSize:eV}=(0,m.lm)(),eU=ed.enableOverlay??eV>=m.Gy.large;ee[7]!==es||ee[8]!==eM?(F=e=>{eM("FILE_TREE.SEARCH_RESULT_CLICK"),es?.(e),eR(!1)},ee[7]=es,ee[8]=eM,ee[9]=F):F=ee[9];let eG=F;ee[10]!==ea||ee[11]!==eT?(b=(e,t,r)=>{let o=t.has(e);return ea?ea(e,o,r):eT({path:e,action:o?"tree":"blob",hash:r})},ee[10]=ea,ee[11]=eT,ee[12]=b):b=ee[12];let eK=b;ee[13]===Symbol.for("react.memo_cache_sentinel")?(A={bindKeys:p.z0.ArrowVertical|p.z0.HomeAndEnd,focusInStrategy:"previous"},ee[13]=A):A=ee[13],ee[14]!==eS||ee[15]!==ek?(M=[ek,eS],ee[14]=eS,ee[15]=ek,ee[16]=M):M=ee[16];let{containerRef:ez}=(0,y.G)(A,M);ee[17]!==eh?(L=()=>{eh||eR(!1)},P=[eh],ee[17]=eh,ee[18]=P,ee[19]=L):(P=ee[18],L=ee[19]),k.useEffect(L,P),ee[20]!==eU||ee[21]!==e_?(H=()=>{document.activeElement!==e_.current&&eU&&eR(!1)},ee[20]=eU,ee[21]=e_,ee[22]=H):H=ee[22],ee[23]!==eU||ee[24]!==e_||ee[25]!==eN?(W=[eN,e_,eU],ee[23]=eU,ee[24]=e_,ee[25]=eN,ee[26]=W):W=ee[26],k.useEffect(H,W),ee[27]!==eI?(D=eI?.slice(0,40)??[],ee[27]=eI,ee[28]=D):D=ee[28];let eZ=D,eJ=eI&&eI.length>eZ.length;ee[29]!==eK||ee[30]!==eB||ee[31]!==eC||ee[32]!==eZ||ee[33]!==em||ee[34]!==eL||ee[35]!==ez||ee[36]!==eJ||ee[37]!==eP||ee[38]!==es||ee[39]!==eh||ee[40]!==eE||ee[41]!==ej||ee[42]!==eg||ee[43]!==eq||ee[44]!==ep?($=e=>{let{key:t,shiftKey:r,metaKey:o,altKey:i,ctrlKey:n}=e;if(!r&&!o&&!i){if("Escape"===t)eh?(eq("FILE_TREE.CANCEL_SEARCH"),ep(""),eB()):document.activeElement&&document.activeElement.blur();else if(!eh)return;else if("Enter"===t){if(!em&&eJ&&eL===eZ.length)eP((0,d.Y8Y)({owner:eg.ownerLogin,repo:eg.name,searchTerm:`path:${ej}`})),es?.();else if(eZ[eL]){let e=eZ[eL];eP(eK(e,eC,eE?`L${eE}`:"")),eR(!1),es?.(e)}}else if("ArrowDown"===t||n&&"n"===t){if(!em&&eJ&&eL>=eZ.length-1){if(eO(eZ.length),eD.current&&ez.current){let e=(0,u.U)(ez.current);(0,p.Rt)(eD.current,e,{behavior:"instant"})}}else eO(Math.min(eL+1,eZ.length-1));e.preventDefault();return}else if("ArrowUp"===t||n&&"p"===t){eO(Math.max(eL-1,0)),e.preventDefault();return}}},ee[29]=eK,ee[30]=eB,ee[31]=eC,ee[32]=eZ,ee[33]=em,ee[34]=eL,ee[35]=ez,ee[36]=eJ,ee[37]=eP,ee[38]=es,ee[39]=eh,ee[40]=eE,ee[41]=ej,ee[42]=eg,ee[43]=eq,ee[44]=ep,ee[45]=$):$=ee[45];let eX=$;ee[46]!==eU?(q=(0,j.$)("FileResultsList-module__Box__vqkwS",{"FileResultsList-module__OverlayEnabled__eP6z3":eU}),ee[46]=eU,ee[47]=q):q=ee[47],ee[48]!==et||ee[49]!==eK||ee[50]!==eA||ee[51]!==eC||ee[52]!==eZ||ee[53]!==eU||ee[54]!==eS||ee[55]!==em||ee[56]!==eL||ee[57]!==eH||ee[58]!==ez||ee[59]!==ek||ee[60]!==eI||ee[61]!==eJ||ee[62]!==el||ee[63]!==eG||ee[64]!==eN||ee[65]!==eE||ee[66]!==ej||ee[67]!==eg?(V=eS?(0,o.jsx)(_.A,{variant:"danger",className:"tmp-m-3",children:"Failed to search"}):(0,o.jsxs)(x.l,{ref:ez,className:(0,j.$)(et,"FileResultsList-module__ActionList__KvCZP",{"FileResultsList-module__ActionList_Overlay__l70lt":eU}),role:"listbox",children:[!ek&&eZ.map((e,t)=>{let r=eC.has(e),i=eK(e,eC,eE?`L${eE}`:"");return(0,o.jsx)(O,{active:e===eN,index:t,focused:eH&&eL===t,match:e,onRender:el,query:eA,onClick:eG,isDirectory:r,to:i,useOverlay:eU,listRef:ez},e)}),(0,o.jsxs)("div",{className:"tmp-m-3 text-center",children:[(0,o.jsx)(B,{loading:ek||!eI,visibleResultCount:eZ.length,truncated:!!eJ}),eJ&&!em&&(0,o.jsxs)(o.Fragment,{children:["\xa0",(0,o.jsx)(w.A,{id:"see-all-results-link",className:(0,j.$)("focus-visible",{"FileResultsList-module__PrimerLink__Mmo7i":eH&&eL===eZ.length}),ref:eD,href:(0,d.Y8Y)({owner:eg.ownerLogin,repo:eg.name,searchTerm:`path:${ej}`}),children:"See all results"})]})]})]}),ee[48]=et,ee[49]=eK,ee[50]=eA,ee[51]=eC,ee[52]=eZ,ee[53]=eU,ee[54]=eS,ee[55]=em,ee[56]=eL,ee[57]=eH,ee[58]=ez,ee[59]=ek,ee[60]=eI,ee[61]=eJ,ee[62]=el,ee[63]=eG,ee[64]=eN,ee[65]=eE,ee[66]=ej,ee[67]=eg,ee[68]=V):V=ee[68],ee[69]!==q||ee[70]!==V?(U=(0,o.jsx)("div",{className:q,children:V}),ee[69]=q,ee[70]=V,ee[71]=U):U=ee[71];let eY=U,eQ=(!eU&&eh||eU&&ev)&&eH&&eL>-1?eJ&&eL===eZ.length?"see-all-results-link":`file-result-${eL}`:void 0,e0=eU?ev:void 0,e1=eU?"file-results-list":void 0;ee[72]===Symbol.for("react.memo_cache_sentinel")?(G=()=>ew(!0),ee[72]=G):G=ee[72],ee[73]!==eB||ee[74]!==ep?(K=e=>{ep(e),e?eR(!0):(eB(),eR(!1)),eO(0)},ee[73]=eB,ee[74]=ep,ee[75]=K):K=ee[75],ee[76]!==ez?(z=e=>{ez.current?.contains(e.relatedTarget)||(eR(!1),eW(!1))},ee[76]=ez,ee[77]=z):z=ee[77],ee[78]!==eh?(Z=()=>{eh&&eR(!0),eW(!0)},ee[78]=eh,ee[79]=Z):Z=ee[79],ee[80]!==eU||ee[81]!==eX||ee[82]!==e_||ee[83]!==eh||ee[84]!==eQ||ee[85]!==e0||ee[86]!==e1||ee[87]!==K||ee[88]!==z||ee[89]!==Z?(J=(0,o.jsx)(N.Z,{ariaActiveDescendant:eQ,ariaExpanded:e0,ariaHasPopup:eU,ariaControls:e1,ref:e_,query:eh,onKeyDown:eX,onPreload:G,onSearch:K,onBlur:z,onFocus:Z,className:"FileResultsList-module__FilesSearchBox__ivVkc"}),ee[80]=eU,ee[81]=eX,ee[82]=e_,ee[83]=eh,ee[84]=eQ,ee[85]=e0,ee[86]=e1,ee[87]=K,ee[88]=z,ee[89]=Z,ee[90]=J):J=ee[90],ee[91]!==eu||ee[92]!==J?(X=(0,o.jsx)("div",{ref:e$,className:eu,children:J}),ee[91]=eu,ee[92]=J,ee[93]=X):X=ee[93],ee[94]!==eU||ee[95]!==eY||ee[96]!==ev?(Y=eU&&(0,o.jsx)(v.T,{anchorRef:e$,open:eU&&ev,renderAnchor:null,onClose:()=>{eR(!1)},focusZoneSettings:{disabled:!0},focusTrapSettings:{disabled:!0},width:"xlarge",align:"end",overlayProps:{id:"file-results-list",role:"dialog"},children:eY}),ee[94]=eU,ee[95]=eY,ee[96]=ev,ee[97]=Y):Y=ee[97];let e2=!eU&&eh&&eY;return ee[98]!==X||ee[99]!==Y||ee[100]!==e2?(Q=(0,o.jsxs)(o.Fragment,{children:[X,Y,e2]}),ee[98]=X,ee[99]=Y,ee[100]=e2,ee[101]=Q):Q=ee[101],Q}function I(){return(0,N.q)()}function B(e){let t,r,n=(0,i.c)(8),{visibleResultCount:a,truncated:l,loading:s}=e,c=s||l||0===a?void 0:"sr-only",u=s?"Loading":void 0;return n[0]!==s||n[1]!==l||n[2]!==a?(t=s?(0,o.jsx)(R.A,{size:"large"}):0===a?"No matches found":l?`First ${a} files shown.`:`Showing ${a} files.`,n[0]=s,n[1]=l,n[2]=a,n[3]=t):t=n[3],n[4]!==c||n[5]!==u||n[6]!==t?(r=(0,o.jsx)("span",{role:"status",className:c,"aria-label":u,children:t},"results-count-status"),n[4]=c,n[5]=u,n[6]=t,n[7]=r):r=n[7],r}A.displayName="FileResultsList",B.displayName="FileResultsStatus";let M=e=>{let t,r,n,a,l,s,c,d,m,h,g=(0,i.c)(33),{active:y,focused:_,index:w,match:v,query:R,to:F,isDirectory:S,onClick:C,onRender:N,useOverlay:T,listRef:E}=e;g[0]!==v||g[1]!==R?(t=(0,b.Xq)(R,v),g[0]=v,g[1]=R,g[2]=t):t=g[2];let A=t;N?.();let I=k.useRef(null),B=S?P:L;g[3]!==_||g[4]!==E?(r=()=>{if(_&&I.current&&E?.current){let e=(0,u.U)(E.current);(0,p.Rt)(I.current,e,{behavior:"instant"})}},n=[_,E],g[3]=_,g[4]=E,g[5]=r,g[6]=n):(r=g[5],n=g[6]),k.useEffect(r,n),g[7]!==v||g[8]!==C?(a=()=>{C?.(v)},g[7]=v,g[8]=C,g[9]=a):a=g[9];let M=a,O=_?"FileResultsList-module__ActionList_ItemFocused__Yu7wK":void 0;g[10]!==O?(l=(0,j.$)(O),g[10]=O,g[11]=l):l=g[11];let W=`file-result-${w}`,D=T?-1:0,$=_||void 0;return g[12]===Symbol.for("react.memo_cache_sentinel")?(s=(0,j.$)("d-flex","FileResultsList-module__ActionList_Item__X18Zr"),g[12]=s):s=g[12],g[13]!==B||g[14]!==v||g[15]!==A?(c=(0,o.jsx)("div",{className:"d-flex flex-1 flex-column overflow-hidden",children:(0,o.jsx)(H,{text:v,positionsList:A,LeadingIcon:B,className:"FileResultsList-module__HighlightMatch__wwEZz"})}),g[13]=B,g[14]=v,g[15]=A,g[16]=c):c=g[16],g[17]!==_||g[18]!==S?(d=_&&(0,o.jsx)("div",{className:"sr-only",children:`Go to ${S?"folder":"file"}`}),g[17]=_,g[18]=S,g[19]=d):d=g[19],g[20]!==M||g[21]!==c||g[22]!==d||g[23]!==W||g[24]!==D||g[25]!==$||g[26]!==F?(m=(0,o.jsxs)(f.N,{to:F,ref:I,role:"option",onClick:M,id:W,tabIndex:D,"data-focus-visible-added":$,className:s,children:[c,d]}),g[20]=M,g[21]=c,g[22]=d,g[23]=W,g[24]=D,g[25]=$,g[26]=F,g[27]=m):m=g[27],g[28]!==y||g[29]!==v||g[30]!==m||g[31]!==l?(h=(0,o.jsx)(x.l.Item,{role:"group",active:y,className:l,children:m},v),g[28]=y,g[29]=v,g[30]=m,g[31]=l,g[32]=h):h=g[32],h};M.displayName="FileResultRow";let P=()=>{let e,t=(0,i.c)(1);return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,o.jsx)(F.A,{"aria-label":"Directory",icon:g.FileDirectoryFillIcon,size:"small",className:"FileResultsList-module__Octicon__T1mIF"}),t[0]=e):e=t[0],e};P.displayName="DirectoryIcon";let L=()=>{let e,t=(0,i.c)(1);return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,o.jsx)(F.A,{"aria-label":"File",icon:g.FileIcon,className:"fgColor-muted mr-2",size:"small"}),t[0]=e):e=t[0],e};L.displayName="FileResultIcon";let O=k.memo(M);function H(e){let t,r,n,a,l=(0,i.c)(14),{text:s,positionsList:c,className:u,LeadingIcon:d}=e;if(l[0]!==c||l[1]!==s){let e;t=[];let r=0;for(let e of c){if(Number(e)!==e||es.length)continue;let i=s.slice(r,e);i&&t.push(W(i)),r=e+1,t.push((0,o.jsx)("mark",{className:"text-bold bgColor-transparent fgColor-default",children:s[e]},e))}l[3]!==r||l[4]!==s?(e=W(s.slice(r)),l[3]=r,l[4]=s,l[5]=e):e=l[5],t.push(e),l[0]=c,l[1]=s,l[2]=t}else t=l[2];return l[6]!==d?(r=d&&(0,o.jsx)(d,{}),l[6]=d,l[7]=r):r=l[7],l[8]!==t||l[9]!==r?(n=(0,o.jsxs)(o.Fragment,{children:[r,t]}),l[8]=t,l[9]=r,l[10]=n):n=l[10],l[11]!==u||l[12]!==n?(a=(0,o.jsx)("div",{className:u,children:n}),l[11]=u,l[12]=n,l[13]=a):a=l[13],a}function W(e){return e.replaceAll("/","/\u200B")}O.displayName="MemoizedFileResultRow",H.displayName="HighlightMatch"},58164(e,t,r){r.d(t,{Z:()=>f,q:()=>m});var o=r(74848),i=r(16522),n=r(69184),a=r(7231),l=r(26316),s=r(38621),c=r(38750),u=r(96540),d=r(34164);let f=e=>{let t,r,n,l,f,p,g,y,_,x=(0,i.c)(34),{ref:w,ariaActiveDescendant:v,ariaControls:R,ariaExpanded:F,ariaHasPopup:b,onBlur:k,onFocus:S,onKeyDown:C,onPreload:N,onSearch:T,query:j,className:E}=e,{sendRepoClickEvent:A}=(0,a.T)(),[I,B]=u.useState(j);x[0]!==j?(t=()=>{B(j)},r=[j],x[0]=j,x[1]=t,x[2]=r):(t=x[1],r=x[2]),u.useEffect(t,r),x[3]!==T||x[4]!==j||x[5]!==A?(n=j?(0,o.jsx)(c.A.Action,{onClick:()=>{A("FILE_TREE.CANCEL_SEARCH"),T("")},icon:s.XCircleFillIcon,"aria-label":"Clear",className:"fgColor-muted"}):void 0,x[3]=T,x[4]=j,x[5]=A,x[6]=n):n=x[6];let M=n;x[7]===Symbol.for("react.memo_cache_sentinel")?(l=m(),x[7]=l):l=x[7],x[8]!==N||x[9]!==T?(f=e=>{B(e.target.value),N(),T(e.target.value)},x[8]=N,x[9]=T,x[10]=f):f=x[10],x[11]!==E?(p=(0,d.$)("d-flex",E),x[11]=E,x[12]=p):p=x[12];let P=b?"combobox":void 0,L=b?"dialog":void 0,O=M?void 0:h;return x[13]!==S||x[14]!==N?(g=e=>{N(),e.target.select(),S?.(e)},x[13]=S,x[14]=N,x[15]=g):g=x[15],x[16]!==A?(y=()=>A("FILE_TREE.SEARCH_BOX"),x[16]=A,x[17]=y):y=x[17],x[18]!==v||x[19]!==R||x[20]!==F||x[21]!==M||x[22]!==k||x[23]!==C||x[24]!==w||x[25]!==g||x[26]!==y||x[27]!==f||x[28]!==p||x[29]!==P||x[30]!==L||x[31]!==O||x[32]!==I?(_=(0,o.jsx)(c.A,{autoFocus:l,ref:w,value:I,onKeyDown:C,onChange:f,className:p,"aria-label":"Go to file","aria-activedescendant":v,role:P,"aria-controls":R,"aria-expanded":F,"aria-haspopup":L,autoCorrect:"off",spellCheck:"false",placeholder:"Go to file",leadingVisual:s.SearchIcon,trailingAction:M,trailingVisual:O,onFocus:g,onBlur:k,onClick:y}),x[18]=v,x[19]=R,x[20]=F,x[21]=M,x[22]=k,x[23]=C,x[24]=w,x[25]=g,x[26]=y,x[27]=f,x[28]=p,x[29]=P,x[30]=L,x[31]=O,x[32]=I,x[33]=_):_=x[33],_};function m(){return"1"===new URLSearchParams(l.fV.search).get("search")}function h(){return(0,o.jsx)(n.E,{children:(0,o.jsx)("kbd",{children:"t"})})}f.displayName="FilesSearchBox",f.displayName="FilesSearchBox"},20790(e,t,r){r.d(t,{Ak:()=>m,RF:()=>h,Wl:()=>d,aT:()=>p,cD:()=>f,fN:()=>u});var o=r(74848),i=r(16522),n=r(36594),a=r(35205),l=r(31854),s=r(96540);let c=(0,a.A)("localStorage"),u=(0,s.createContext)(void 0);u.displayName="OpenPanelStateContext";let d=(0,s.createContext)(()=>void 0);function f(e){let t,r,a,f,m,h,p,g=(0,i.c)(16),{children:y,payload:_,openPanelRef:x,action:w}=e,v="blame"===w,R="tree"===w,F=(0,s.useRef)(v),b=(0,s.useRef)(R);g[0]!==v||g[1]!==R?(t=()=>{F.current=v,b.current=R},g[0]=v,g[1]=R,g[2]=t):t=g[2],(0,s.useLayoutEffect)(t);let k=(0,n.i)(),S=(0,s.useRef)(void 0);g[3]!==k||g[4]!==_?(r=()=>{let e=c.getItem("codeNavOpen");if(!k&&""!==e&&null!==e||k&&_.symbolsExpanded)return"codeNav"},g[3]=k,g[4]=_,g[5]=r):r=g[5];let[C,N]=(0,s.useState)(r),T=(v||R)&&"codeNav"===C?void 0:C;g[6]!==T||g[7]!==x?(a=()=>{x.current=T},f=[T,x],g[6]=T,g[7]=x,g[8]=a,g[9]=f):(a=g[8],f=g[9]),s.useEffect(a,f),g[10]===Symbol.for("react.memo_cache_sentinel")?(m=(e,t)=>{N(r=>(r&&S.current&&S.current.focus(),S.current=t,F.current||b.current&&"codeNav"===e?void 0:e))},g[10]=m):m=g[10];let j=m;return function(e){let t,r,o=(0,i.c)(4),{screenSize:n}=(0,l.lm)(),a=(0,s.useRef)(n);o[0]!==n||o[1]!==e?(t=()=>{let t=a.current>=l.Gy.large,r=a.current===n;nvoid 0}).displayName="OpenPanelContext",f.displayName="OpenPanelProvider"},23082(e,t,r){r.d(t,{V3:()=>u,_y:()=>c,wk:()=>s});var o=r(16522),i=r(19519),n=r(15393);let a={cursorNavigationHopWordLeft:{hotkey:"Alt+ArrowLeft,Ctrl+ArrowLeft",useWhileBlobFocused:!0,noModifierHotkey:["ArrowLeft"],modifierRequired:!0},cursorNavigationHopWordRight:{hotkey:"Alt+ArrowRight,Ctrl+ArrowRight",useWhileBlobFocused:!0,noModifierHotkey:["ArrowRight"],modifierRequired:!0},cursorNavigationTopOfPage:{hotkey:"Meta+ArrowUp",useWhileBlobFocused:!0,noModifierHotkey:["ArrowUp"],modifierRequired:!0},cursorNavigationBottomOfPage:{hotkey:"Meta+ArrowDown",useWhileBlobFocused:!0,noModifierHotkey:["ArrowDown"],modifierRequired:!0},cursorNavigationEnd:{hotkey:"End,Meta+ArrowRight",useWhileBlobFocused:!0,noModifierHotkey:["End"]},cursorNavigationHome:{hotkey:"Home,Meta+ArrowLeft",useWhileBlobFocused:!0,noModifierHotkey:["Home"]},cursorNavigationPageUp:{hotkey:"PageUp",useWhileBlobFocused:!0,noModifierHotkey:["PageUp"]},cursorNavigationPageDown:{hotkey:"PageDown",useWhileBlobFocused:!0,noModifierHotkey:["PageDown"]},cursorNavigationArrowDown:{hotkey:"ArrowDown",useWhileBlobFocused:!0,noModifierHotkey:["ArrowDown"]},cursorNavigationArrowUp:{hotkey:"ArrowUp",useWhileBlobFocused:!0,noModifierHotkey:["ArrowUp"]},cursorNavigationArrowLeft:{hotkey:"ArrowLeft",useWhileBlobFocused:!0,noModifierHotkey:["ArrowLeft"]},cursorNavigationArrowRight:{hotkey:"ArrowRight",useWhileBlobFocused:!0,noModifierHotkey:["ArrowRight"]},cursorNavigationShiftHopWordLeft:{hotkey:"Alt+Shift+ArrowLeft,Ctrl+Shift+ArrowLeft",useWhileBlobFocused:!0,noModifierHotkey:["ArrowLeft"],modifierRequired:!0},cursorNavigationShiftHopWordRight:{hotkey:"Alt+Shift+ArrowRight,Ctrl+Shift+ArrowRight",useWhileBlobFocused:!0,noModifierHotkey:["ArrowRight"],modifierRequired:!0},cursorNavigationShiftTopOfPage:{hotkey:"Meta+Shift+ArrowUp",useWhileBlobFocused:!0,noModifierHotkey:["ArrowUp"],modifierRequired:!0},cursorNavigationShiftBottomOfPage:{hotkey:"Meta+Shift+ArrowDown",useWhileBlobFocused:!0,noModifierHotkey:["ArrowDown"],modifierRequired:!0},cursorNavigationShiftEnd:{hotkey:"Shift+End,Meta+Shift+ArrowRight",useWhileBlobFocused:!0,noModifierHotkey:["End"],modifierRequired:!0},cursorNavigationShiftHome:{hotkey:"Shift+Home,Meta+Shift+ArrowLeft",useWhileBlobFocused:!0,noModifierHotkey:["Home"],modifierRequired:!0},cursorNavigationShiftPageUp:{hotkey:"Shift+PageUp",useWhileBlobFocused:!0,noModifierHotkey:["PageUp"],modifierRequired:!0},cursorNavigationShiftPageDown:{hotkey:"Shift+PageDown",useWhileBlobFocused:!0,noModifierHotkey:["PageDown"],modifierRequired:!0},cursorNavigationShiftArrowDown:{hotkey:"Shift+ArrowDown",useWhileBlobFocused:!0,noModifierHotkey:["ArrowDown"],modifierRequired:!0},cursorNavigationShiftArrowUp:{hotkey:"Shift+ArrowUp",useWhileBlobFocused:!0,noModifierHotkey:["ArrowUp"],modifierRequired:!0},cursorNavigationShiftArrowLeft:{hotkey:"Shift+ArrowLeft",useWhileBlobFocused:!0,noModifierHotkey:["ArrowLeft"],modifierRequired:!0},cursorNavigationShiftArrowRight:{hotkey:"Shift+ArrowRight",useWhileBlobFocused:!0,noModifierHotkey:["ArrowRight"],modifierRequired:!0},cursorNavigationHighlightLine:{text:"J",hotkey:"Shift+J",useWhileBlobFocused:!0,noModifierHotkey:["J"],modifierRequired:!0},cursorNavigationGoLineUp:{hotkey:"Ctrl+p",useWhileBlobFocused:!0,noModifierHotkey:["p"],modifierRequired:!0},cursorNavigationOpenHelpDialog:{hotkey:"Alt+F1,Control+Alt+\u02D9,Control+Alt+h",useWhileBlobFocused:!0,noModifierHotkey:["F1","h","\u02D9"],modifierRequired:!0},cursorNavigationGoLineDown:{hotkey:"Ctrl+n",useWhileBlobFocused:!0,noModifierHotkey:["n"],modifierRequired:!0},cursorNavigationEnter:{text:"\u2318 Enter",hotkey:"Meta+Enter",useWhileBlobFocused:!0,noModifierHotkey:["Enter"],modifierRequired:!0},cursorNavigationSpace:{hotkey:" ",useWhileBlobFocused:!0,noModifierHotkey:[" "],modifierRequired:!1},cursorNavigationShiftSpace:{hotkey:"Shift+ ",useWhileBlobFocused:!0,noModifierHotkey:[" "],modifierRequired:!0},expandAndFocusLineContextMenu:{text:"Shift Alt C",hotkey:"Alt+Shift+C,Alt+Shift+\xc7",useWhileBlobFocused:!0,noModifierHotkey:["C"],modifierRequired:!0},searchShortcut:{hotkey:"/",useWhileBlobFocused:!0,noModifierHotkey:["/"]},selectAllShortcut:{hotkey:"Meta+a",useWhileBlobFocused:!0,noModifierHotkey:["a"],modifierRequired:!0}},l=new Map;function s(){let e,t,r=(0,o.c)(3);r[0]===Symbol.for("react.memo_cache_sentinel")?(e=["mac"],r[0]=e):e=r[0];let s=(0,n.X)(e),{isServer:c}=(0,i.V)(),u=0;if(s?u=1:c||(u=2),!l.has(u)){var d;let e=a;s||c||(e=Object.keys(a).reduce((e,t)=>{let r=a[t];return e[t]={hotkey:r.hotkey?.replace(/Meta/g,"Control"),text:r.text?.replace(/\u2318/g,"Ctrl").replace(/\u21e7/g,"Shift"),ariaKeyShortcuts:r.ariaKeyShortcuts?.replace(/Meta/g,"Control"),useWhileBlobFocused:r.useWhileBlobFocused,modifierRequired:r.modifierRequired,noModifierHotkey:r.noModifierHotkey},e},{})),c&&(e=Object.keys(d=e).reduce((e,t)=>{let r=d[t];return e[t]={hotkey:void 0,text:r.text?.replace(/\u2318/g,"Ctrl").replace(/\u21e7/g,"Shift"),ariaKeyShortcuts:r.ariaKeyShortcuts?.replace(/Meta/g,"Control"),useWhileBlobFocused:r.useWhileBlobFocused,modifierRequired:r.modifierRequired,noModifierHotkey:r.noModifierHotkey},e},{})),l.set(u,e)}return r[1]!==u?(t=l.get(u),r[1]=u,r[2]=t):t=r[2],t}function c(){let e,t=(0,o.c)(2),r=s();return t[0]!==r?(e=Object.keys(r).reduce((e,t)=>{let o=r[t];if(o.useWhileBlobFocused&&o.noModifierHotkey&&o.modifierRequired)for(let t of o.noModifierHotkey)e.includes(t)||e.push(t);return e},[]),t[0]=r,t[1]=e):e=t[1],e}function u(){let e,t=(0,o.c)(2),r=s();return t[0]!==r?(e=Object.keys(r).reduce((e,t)=>{let o=r[t];if(o.useWhileBlobFocused&&o.noModifierHotkey&&!o.modifierRequired)for(let t of o.noModifierHotkey)e.includes(t)||e.push(t);return e},[]),t[0]=r,t[1]=e):e=t[1],e}},60854(e,t,r){r.d(t,{f:()=>i});var o=r(78597);async function i(e){let t=await (0,o.lS)(`${e}?noancestors=1`);if(!t.ok)throw Error(`Failed to fetch tree data: ${t.status} ${t.statusText}`);let r=await t.json();return"codeViewTreeRoute"in r.payload?{tree:{items:r.payload.codeViewTreeRoute.tree.items,totalCount:r.payload.codeViewTreeRoute.tree.totalCount}}:{tree:{items:r.payload.tree.items,totalCount:r.payload.tree.totalCount}}}},70760(e,t,r){r.d(t,{Uy:()=>K,H:()=>h,qn:()=>ev,c2:()=>em,Nq:()=>G});var o=r(74848),i=r(16522),n=r(26440),a=r(19519),l=r(70887),s=r(38621),c=r(21373),u=r(34164),d=r(96540);let f=e=>{let t,r,d,f,m,h,p=(0,i.c)(28),{ref:g,expanded:y,onToggleExpanded:_,className:x,ariaControls:w,useFilesButtonBreakpoint:v,variant:R,getTooltipDirection:F}=e,b=void 0===v||v,{isServer:k}=(0,a.V)();p[0]!==y||p[1]!==F?(t=F?.(y)??"se",p[0]=y,p[1]=F,p[2]=t):t=p[2];let S=t;p[3]!==y||p[4]!==k||p[5]!==_||p[6]!==g||p[7]!==b||p[8]!==R?(r=b&&(!y||k)&&(0,o.jsx)(c.Q,{"aria-label":"Expand file tree",leadingVisual:s.ArrowLeftIcon,"data-testid":"expand-file-tree-button-mobile",ref:g,onClick:_,variant:R??"invisible",className:"ExpandFileTreeButton-module__Button_1__Svs95",children:"Files"}),p[3]=y,p[4]=k,p[5]=_,p[6]=g,p[7]=b,p[8]=R,p[9]=r):r=p[9];let C=b&&(!y||k);p[10]!==x||p[11]!==C?(d=(0,u.$)(x,"position-relative","ExpandFileTreeButton-module__expandButton__hDOcv",{"ExpandFileTreeButton-module__filesButtonBreakpoint__zEvz3":C}),p[10]=x,p[11]=C,p[12]=d):d=p[12];let N=y?"Collapse file tree":"Expand file tree";return p[13]!==w||p[14]!==y||p[15]!==_||p[16]!==g||p[17]!==d||p[18]!==N||p[19]!==S||p[20]!==R?(f=(0,o.jsx)(n.L,{className:d,expanded:y,alignment:"left",ariaLabel:N,tooltipDirection:S,testid:"file-tree-button",ariaControls:w,ref:g,variant:R,onToggleExpanded:_}),p[13]=w,p[14]=y,p[15]=_,p[16]=g,p[17]=d,p[18]=N,p[19]=S,p[20]=R,p[21]=f):f=p[21],p[22]!==_?(m=(0,o.jsx)(l.ak,{commands:{"code-view:toggle-tree":()=>_()}}),p[22]=_,p[23]=m):m=p[23],p[24]!==r||p[25]!==f||p[26]!==m?(h=(0,o.jsxs)(o.Fragment,{children:[r,f,m]}),p[24]=r,p[25]=f,p[26]=m,p[27]=h):h=p[27],h};f.displayName="ExpandFileTreeButton",f.displayName="ExpandFileTreeButton";var m=r(7231);function h(e){let t,r=(0,i.c)(4),{inputRef:n,onFindFilesShortcut:a}=e,{sendRepoKeyDownEvent:s}=(0,m.T)();return r[0]!==n||r[1]!==a||r[2]!==s?(t=(0,o.jsx)(l.ak,{commands:{"code-view:find-files":()=>{a?.(),n?.current?.focus(),s("GO_TO_FILE")}}}),r[0]=n,r[1]=a,r[2]=s,r[3]=t):t=r[3],t}h.displayName="FindFilesShortcut";var p=r(82175),g=r(98779),y=r(56792),_=r(48337),x=r(20790),w=r(12191),v=r(54242),R=r(66743),F=r(23666),b=r(77236),k=r(31854),S=r(88134),C=r(29941),N=r(47819),T=r(26108),j=r(87555),E=r(209),A=r(10095),I=r(27104);let B=(0,d.createContext)({knownFolders:new Map,dispatchKnownFolders:()=>{}});B.displayName="FileTreeContext";var M=r(60854);let P="ReposFileTreePane-module__HideTree__AYZnm",L="ReposFileTreePane-module__PaneContentsHiddenOnNarrow__KY_EL";var O=r(31595),H=r(76331),W=r(53035),D=r(60057),$=r(79040),q=r(4625),V=r(7478);let U=(0,d.createContext)({});function G(e){let t,r,n,a,l,s=(0,i.c)(6),{children:c}=e,u=(0,d.useRef)(!1),f=(0,d.useRef)(!1),m=(0,d.useRef)(!0);s[0]===Symbol.for("react.memo_cache_sentinel")?(t=e=>{u.current=e},s[0]=t):t=s[0];let h=t;s[1]===Symbol.for("react.memo_cache_sentinel")?(r=e=>{f.current=e},s[1]=r):r=s[1];let p=r;s[2]===Symbol.for("react.memo_cache_sentinel")?(n=e=>{m.current=e},s[2]=n):n=s[2];let g=n;s[3]===Symbol.for("react.memo_cache_sentinel")?(a={expandAllFolders:u,refreshTree:f,shouldFetchFolders:m,setExpandAllFolders:h,setRefreshTree:p,setShouldFetchFolders:g},s[3]=a):a=s[3];let y=a;return s[4]!==c?(l=(0,o.jsx)(U,{value:y,children:c}),s[4]=c,s[5]=l):l=s[5],l}function K(){return(0,d.use)(U)}U.displayName="FileTreeControlContext",G.displayName="FileTreeControlProvider";var z=r(52870);function Z(e,t,r){let o=[];for(let i of t)if(i.startsWith(e)){let t=i.slice(e.length+1),n=t.indexOf("/"),a=n>0?t.slice(0,n):t,l=`${e}/${a}`;if(r&&r.some(e=>e.path===l))continue;let s={items:[],data:{contentType:l===i?"file":"directory",name:a,path:l,isClientOnly:!0}};o.push(s)}return o}function J(e,t,r){e.data.name=e.data.name.slice(e.data.name.lastIndexOf("/")+1,e.data.name.length);let o=t.name.slice(0,t.name.lastIndexOf("/")),i=o.indexOf("/")>-1,n={path:t.path.slice(0,t.path.lastIndexOf("/")),contentType:t.contentType,name:o,hasSimplifiedPath:i},a={items:[e],data:n};return(r.set(n.path,a),i)?J(a,{...n},r):a}function X(e,t,r,o,i=!1){if(!e)return{newRootItems:r,rootItemsUpdated:!1,itemsAdded:!1};let n=!!e[""]&&Y("",t,r,e[""].items);o?.(r);let a=n;for(let n of Object.keys(e).sort())if(n){let l=t.get(n);if(l){let s=l.items.length;if(Y(n,t,l.items,e[n].items,o),l.data.totalCount=e[n].totalCount,l.items.length>s&&(a=!0),i&&l.items.length>s){let e={...l,items:[...l.items]};t.set(n,e),function(e,t,r,o){let i=r.lastIndexOf("/");if(-1===i){let e=t.findIndex(e=>e.data.path===r);-1!==e&&(t[e]=o)}else{let t=r.substring(0,i),n=e.get(t);if(n){let e=n.items.findIndex(e=>e.data.path===r);-1!==e&&(n.items[e]=o)}}}(t,r,n,e)}}}return{newRootItems:r,rootItemsUpdated:n,itemsAdded:a}}function Y(e,t,r,o,i){let n=!1;for(let a of o){let o=e?`${e}/${a.name}`:a.name;if(!t.get(o)){let e={items:[],data:{...a}};if(t.set(o,e),a.hasSimplifiedPath){let o=J(e,a,t),l=r.findIndex(e=>e.data.path===o.data.path);-1!==l?o.items.length>r[l].items.length&&(r[l]=o,n=!0):(r.push(o),i?.(r))}else r.push(e),i?.(r)}}return n}function Q(e){let t,r,n,a,l,c,u,f,h,p,g,y,_=(0,i.c)(43),{isActive:x,file:w,onItemSelected:v,getItemUrl:R,selectedItemRef:F,navigate:b,onRenderRow:k,getFileTrailingVisual:S,getFileIcon:C}=e,{sendRepoClickEvent:N}=(0,m.T)(),T=d.useRef(null);_[0]===Symbol.for("react.memo_cache_sentinel")?(t={focusRowRef:T,mouseRowRef:T},_[0]=t):t=_[0];let j=(0,D.Z)(t),E="submodule"===w.data.contentType;_[1]!==w.data||_[2]!==S?(r=S?.(w.data),_[1]=w.data,_[2]=S,_[3]=r):r=_[3];let A=r;_[4]!==w.data||_[5]!==R||_[6]!==x||_[7]!==E||_[8]!==b||_[9]!==v||_[10]!==N?(n=e=>{E?(e.preventDefault(),w.data.submoduleUrl&&(window.location.href=w.data.submoduleUrl)):e.metaKey||e.ctrlKey||1===e.button?(window.open(R(w.data),"_blank"),e.preventDefault()):x?e.preventDefault():(v?.(),N("FILES_TREE.ITEM",{item_path:w.data.path}),b(R(w.data)),e.stopPropagation())},_[4]=w.data,_[5]=R,_[6]=x,_[7]=E,_[8]=b,_[9]=v,_[10]=N,_[11]=n):n=_[11];let I=n;k?.();let B=`${w.data.path}-item`,M=x?void 0:"auto 2rem";_[12]!==w.data||_[13]!==C||_[14]!==E?(a=C?C(w.data):E?(0,o.jsx)(s.FileSubmoduleIcon,{}):(0,o.jsx)(s.FileIcon,{}),_[12]=w.data,_[13]=C,_[14]=E,_[15]=a):a=_[15],_[16]!==a?(l=(0,o.jsx)(q.G.LeadingVisual,{children:a}),_[16]=a,_[17]=l):l=_[17];let P=E?"var(--fgColor-accent, var(--color-accent-fg))":void 0;return _[18]!==P?(c={color:P},_[18]=P,_[19]=c):c=_[19],_[20]!==w.data.name||_[21]!==F||_[22]!==c?(u=(0,o.jsx)("span",{ref:F,style:c,children:w.data.name}),_[20]=w.data.name,_[21]=F,_[22]=c,_[23]=u):u=_[23],_[24]!==w.data.name||_[25]!==j?(f=j&&(0,o.jsx)(H.m,{"data-testid":`${w.data.name}-item-tooltip`,id:`${w.data.name}-item-tooltip`,contentRef:T,"aria-label":w.data.name,open:!0,direction:"ne"}),_[24]=w.data.name,_[25]=j,_[26]=f):f=_[26],_[27]!==u||_[28]!==f?(h=(0,o.jsxs)(o.Fragment,{children:[u,f]}),_[27]=u,_[28]=f,_[29]=h):h=_[29],_[30]!==A?(p=!!A?.screenReaderText&&(0,o.jsx)("span",{className:"sr-only",children:A.screenReaderText}),_[30]=A,_[31]=p):p=_[31],_[32]!==A?(g=!!A?.trailingVisual&&(0,o.jsx)(q.G.TrailingVisual,{children:A.trailingVisual}),_[32]=A,_[33]=g):g=_[33],_[34]!==x||_[35]!==I||_[36]!==h||_[37]!==p||_[38]!==g||_[39]!==B||_[40]!==M||_[41]!==l?(y=(0,o.jsxs)(q.G.Item,{ref:T,onSelect:I,current:x,id:B,containIntrinsicSize:M,children:[l,h,p,g]}),_[34]=x,_[35]=I,_[36]=h,_[37]=p,_[38]=g,_[39]=B,_[40]=M,_[41]=l,_[42]=y):y=_[42],y}Q.displayName="WrappedFileTreeRow";let ee=d.memo(Q);function et({clientOnlyFilePaths:e,directory:t,isActive:r,isAncestorOfActive:i,leadingPath:n="",onItemSelected:a,dispatchKnownFolders:l,getItemUrl:s,getFetchUrl:c,selectedItemRef:u,navigate:f,onRenderRow:h,getFileTrailingVisual:p,getFileIcon:g,navigateOnClick:y=!0,treeName:_}){let{expandAllFolders:x,shouldFetchFolders:w}=K(),[v,R]=(0,d.useState)(x?.current||i),{sendRepoClickEvent:F}=(0,m.T)(),b=d.useRef(null),k=d.useRef(null),S=(0,D.Z)({focusRowRef:k,mouseRowRef:b}),[C,N,T,j,E,A,I]=function(e,t,r){let[o,i]=d.useState(e.items),[n,a]=d.useState(e.data.totalCount||0),[l,s]=d.useState(!1),[c,u]=d.useState(!1),{safeSetTimeout:f}=(0,z.A)();d.useEffect(()=>{i(e.items)},[e.items]),d.useEffect(()=>{void 0!==e.data.totalCount&&a(e.data.totalCount)},[e.data.totalCount]);let m=d.useCallback(()=>{u(!1)},[]),h=d.useCallback((e,t)=>{let r=e||[...o];i(r.slice(0,100)),f(()=>{i(r),void 0!==t&&a(t)},1)},[o,f]);return[d.useCallback(async o=>{let n=new Map;if(e.data.isClientOnly){if(o){let r=Z(e.data.path,o);for(let e of r)n.set(e.data.path,e);t({type:"add",folders:n,processingTime:0}),r.length>100?h(r,r.length):(i(r),a(r.length))}}else{let l=r(e.data);u(!1),s(!0);let c=Date.now();try{let r=await (0,M.f)(l),s=r.tree.items.map(e=>{let t={items:[],data:{...e},autoExpand:"directory"===e.contentType&&1===r.tree.items.length};return(n.set(e.path,t),e.hasSimplifiedPath)?J(t,e,n):t});if(o){let t=e.data.path,i=Z(t,o,r.tree.items);for(let e of(s.push(...i),i))n.set(e.data.path,e)}t({type:"add",folders:n,processingTime:Date.now()-c}),e.items=s,e.data.totalCount=r.tree.totalCount,s.length>100?h(s,r.tree.totalCount):(i(s),a(r.tree.totalCount))}catch{u(!0)}}s(!1)},[r,e,t,h]),h,o,l,c,m,n]}(t,l,c),B=I-T.length,P=n?`${n}/`:"";(0,d.useEffect)(()=>{x?.current&&!v&&R(!0)},[t,x,v]);let L=d.useCallback(o=>{x?.current&&(x.current=!1),o&&!v&&!j&&!E&&(t.items.length>100?N():0!==t.items.length||r||i||w?.current===!1||C(e)),o!==v&&R(o)},[x,v,j,E,t.items.length,r,i,w,N,C,e]),O=d.useCallback(e=>{e.metaKey||e.ctrlKey||1===e.button&&y?(window.open(s(t.data),"_blank"),e.preventDefault()):r?e.preventDefault():(a?.(),F("FILES_TREE.ITEM",{item_path:t.data.path}),y?f(s(t.data)):L?.(!v),e.stopPropagation())},[t.data,s,r,v,f,y,a,L,F]);d.useEffect(()=>{i&&!v&&L?.(!0)},[i]),d.useEffect(()=>{0===t.items.length&&v?L?.(!1):!v&&t.autoExpand&&L?.(!0)},[t.items.length]);let W=d.useCallback(e=>{u&&r&&u(e),b.current=e},[u,r]);return 1===t.items.length&&"directory"===t.items[0].data.contentType?(0,o.jsx)(ei,{clientOnlyFilePaths:e,directoryItems:t.items,leadingPath:P+t.data.name,inheritsActive:r,dispatchKnownFolders:l,onItemSelected:a,selectedItemRef:u,getItemUrl:s,directoryNavigateOnClick:y,getFileTrailingVisual:p,getFileIcon:g,treeName:_}):(h?.(),(0,o.jsxs)(q.G.Item,{ref:k,expanded:v,onExpandedChange:L,current:r,onSelect:O,id:`${t.data.path}-item`,containIntrinsicSize:r?void 0:"auto 2rem",children:[(0,o.jsx)(q.G.LeadingVisual,{children:(0,o.jsx)(q.G.DirectoryIcon,{})}),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("span",{ref:W,children:[P,t.data.name]}),S&&(0,o.jsx)(H.m,{"data-testid":`${t.data.name}-directory-item-tooltip`,id:`${t.data.name}-directory-item-tooltip`,contentRef:k,"aria-label":`${P}${t.data.name}`,open:!0,direction:"ne"})]}),(0,o.jsx)(q.G.SubTree,{state:j?"loading":E?"error":"done",children:E?(0,o.jsx)(q.G.ErrorDialog,{onRetry:C,onDismiss:A,children:"There was an error loading the folder contents."}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(ei,{clientOnlyFilePaths:e,directoryItems:T,dispatchKnownFolders:l,onItemSelected:a,selectedItemRef:u,getItemUrl:s,directoryNavigateOnClick:y,getFileTrailingVisual:p,getFileIcon:g,treeName:_}),B>0&&(0,o.jsx)(ea,{message:`${B} entries not shown`})]})})]}))}ee.displayName="FileTreeRow",et.displayName="WrappedDirectoryTreeRow";let er=d.memo(et);function eo({clientOnlyFilePaths:e,directoryItems:t,leadingPath:r,inheritsActive:i,onItemSelected:n,dispatchKnownFolders:a,selectedItemRef:l,onRenderRow:s,getItemUrl:c,getFileTrailingVisual:u,getFileIcon:f,directoryNavigateOnClick:m=!0,treeName:h}){let p=(0,O.l)(),g=(0,w.Z)(),y=(0,$.Zp)(),_=d.useRef(y);return(0,o.jsx)(o.Fragment,{children:t.map(t=>{let d=p===t.data.path,y=d||p.startsWith(`${t.data.path}/`);return"directory"===t.data.contentType?(0,o.jsx)(er,{clientOnlyFilePaths:e,isActive:i||d,isAncestorOfActive:y,onItemSelected:n,leadingPath:r,directory:t,dispatchKnownFolders:a,getItemUrl:c,getFetchUrl:g.getItemUrl,selectedItemRef:y?l:void 0,navigate:_.current,onRenderRow:s,navigateOnClick:m,getFileTrailingVisual:u,getFileIcon:f,itemCount:t.items.length,treeName:h},t.data.name):(0,o.jsx)(ee,{onItemSelected:n,file:t,isActive:d,getItemUrl:c,selectedItemRef:d?l:void 0,navigate:_.current,onRenderRow:s,getFileTrailingVisual:u,getFileIcon:f,treeName:h},t.data.name)})})}er.displayName="DirectoryTreeRow",eo.displayName="WrappedDirectoryContents";let ei=d.memo(eo);function en(e){let{clientOnlyFilePaths:t,data:r,rootItems:i,setRootItems:n,fetchError:a,incompleteFileTree:l,processingTime:s,loading:c,onRenderRow:f,getItemUrl:m,getFileTrailingVisual:h,getFileIcon:p,sortDirectoryItems:g,treeName:y}=e,{knownFolders:_,dispatchKnownFolders:x}=(0,d.use)(B),{refreshTree:w}=K(),v=(0,W.E)();d.useEffect(()=>{if(c)return;let e=new Map,t=[];w?.current||(e=new Map(_),t=i.slice());let{newRootItems:o,rootItemsUpdated:a,itemsAdded:l}=X(r,e,t,g,v),u=v&&l;(o.length>i.length||a||u||w?.current)&&n(o),(e.size>_.size||u||w?.current)&&x({type:"set",folders:e,processingTime:s}),w?.current&&(w.current=!1)},[r,c]);let R=d.useCallback(e=>{1===e.button&&e.preventDefault()},[]);return(0,o.jsx)(o.Fragment,{children:(0,o.jsx)("div",{onMouseDown:R,className:(0,u.$)(e.className,"ReposFileTreeView-module__Box__vkb5W"),"data-testid":"repos-file-tree-container",children:c?(0,o.jsx)("div",{className:"ReposFileTreeView-module__Box_1__97JKJ",children:(0,o.jsx)(V.A,{"aria-label":"Loading file tree"})}):(0,o.jsx)("nav",{"aria-label":"File Tree Navigation",children:(0,o.jsxs)(q.G,{"aria-label":"Files",children:[a&&(0,o.jsx)(ea,{message:"Some files could not be loaded."}),l&&(0,o.jsx)(ea,{message:"Sign in to see the full file tree."}),(0,o.jsx)(ei,{clientOnlyFilePaths:t,directoryItems:i,onItemSelected:e.onItemSelected,dispatchKnownFolders:x,selectedItemRef:e.selectedItemRef,onRenderRow:f,directoryNavigateOnClick:e.directoryNavigateOnClick,getItemUrl:m,getFileTrailingVisual:h,getFileIcon:p,treeName:y})]})})})})}function ea(e){let t,r,n=(0,i.c)(3),{message:a}=e,l=a||"Couldn't load.";return n[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,o.jsx)(q.G.LeadingVisual,{children:(0,o.jsx)(A.A,{icon:s.AlertFillIcon,className:"ReposFileTreeView-module__Octicon__GMgHV"})}),n[0]=t):t=n[0],n[1]!==l?(r=(0,o.jsxs)(q.G.Item,{id:"error-tree-row",children:[t,(0,o.jsx)("div",{className:"ReposFileTreeView-module__Box_2__y5uWW",children:l})]}),n[1]=l,n[2]=r):r=n[2],r}ei.displayName="DirectoryContents",en.displayName="ReposFileTreeView",ea.displayName="ErrorTreeRow";var el=r(25445),es=r(18660),ec=r(23082),eu=r(86733);function ed(e){let t,r,n,a,l,c=(0,i.c)(15),{className:d,onClick:f,textAreaId:m}=e,{searchShortcut:h}=(0,ec.wk)();return c[0]!==d?(t=(0,u.$)("SearchButton-module__IconButton__SBlqu",d),c[0]=d,c[1]=t):t=c[1],c[2]!==f||c[3]!==t?(r=(0,o.jsx)(eu.N,{"aria-label":"Search this repository",tooltipDirection:"nw",icon:s.SearchIcon,commandId:"global-navigation:search",size:"medium",className:t,onClick:f}),c[2]=f,c[3]=t,c[4]=r):r=c[4],c[5]!==f||c[6]!==m?(n=()=>{let e=document.getElementById(m);f?.(),(0,el.Z)({retainScrollPosition:!0,returnTarget:e??void 0})},c[5]=f,c[6]=m,c[7]=n):n=c[7],c[8]!==h.hotkey||c[9]!==n||c[10]!==m?(a=(0,o.jsx)(es._,{buttonFocusId:m,buttonHotkey:h.hotkey,onButtonClick:n,onlyAddHotkeyScopeButton:!0}),c[8]=h.hotkey,c[9]=n,c[10]=m,c[11]=a):a=c[11],c[12]!==r||c[13]!==a?(l=(0,o.jsxs)(o.Fragment,{children:[r,a]}),c[12]=r,c[13]=a,c[14]=l):l=c[14],l}ed.displayName="SearchButton";let ef=k.Gy.xxxlarge;function em({clientOnlyFilePaths:e,collapseTree:t,showTree:r,fileTree:i,treeToggleElement:n,treeToggleRef:l,onItemSelected:c,processingTime:f,searchBoxRef:m,repo:R,path:O,refInfo:H,isFilePath:W,foldersToFetch:D,incompleteFileTree:$,id:q,onFindFilesShortcut:V,textAreaId:U,getItemUrlOverride:G,headerClassName:K,paneClassName:z,paneContentsClassName:Z,treeContainerClassName:J,findFileWorkerPath:Y,headerContent:Q,getFileTrailingVisual:ee,getFileIcon:et,sortDirectoryItems:er,showFindFile:eo=!0,directoryNavigateOnClick:ei=!0,showRefSelectorRow:ea=!0,paneResizable:el=!0}){if(eo&&void 0===Y)throw Error("findFileWorkerPath must be provided when showFindFile is true");let es=(0,x.RF)(),{canEdit:ec,fileExistsOnDefault:eu}=(0,y.M)(),[eg,ey]=d.useState(D.length>0),[e_,ex]=d.useState(!1),ew=d.useRef([]),ev=d.useRef(0),eR=d.useRef(null),eF=d.useRef(null),eb=d.useRef(!1),ek=d.useRef(null),{query:eS}=(0,_.JS)(),eC=d.useRef(eS);eC.current=eS;let{codeCenterOption:eN}=(0,S.ud)(),eT=d.useRef(es),{isServer:ej}=(0,a.V)(),{defaultBranch:eE}=(0,v.t)(),{getItemUrl:eA}=(0,w.Z)(),eI=G||eA,eB=[],eM=new Map,eP=d.useRef(eg);!eP.current&&i&&(eB=X(i,eM,[],er).newRootItems),eP.current=!0;let[eL,eO]=d.useReducer(eh,eM),[eH,eW]=d.useState(eB);d.useEffect(()=>{r&&(!eS||window.matchMedia(`(min-width: ${k.Gy.large}px)`).matches)||(ek.current=null)},[r,eS]),d.useEffect(()=>{es&&eT.current!==es&&window.matchMedia(`(max-width: ${ef-1}px)`).matches&&t({setPreference:!1}),eT.current=es},[t,es]);let eD=d.useCallback(async e=>{let t=eA({contentType:"directory",path:e,name:e});try{let r=await (0,M.f)(t),o={items:r.tree.items,totalCount:r.tree.totalCount};i[e]=o}catch{ex(!0)}ew.current.push(e),ev.current-=1,0===ev.current&&ey(!1)},[i,eA]);d.useEffect(()=>{if($)return void ey(!1);if(!D||0===D.length)return;let e=D.filter(e=>!ew.current.includes(e));if(e.length>0)for(let t of(ev.current+=e.length,ey(!0),e))eD(t)},[eD,D,$]);let e$=d.useCallback(e=>{if(r&&(!eC.current||window.matchMedia(`(min-width: ${k.Gy.large}px)`).matches)&&eR.current&&e){let t=eR.current.clientHeight;(0,C.Rt)(e,eR.current,{endMargin:t/2,startMargin:t/2,behavior:"auto"})}},[r]),eq=d.useCallback(e=>{e&&eb.current?eb.current=!1:ek.current!==e&&e$(e),ek.current=e},[e$]),eV=d.useCallback(e=>{eR.current=e,window.matchMedia(`(min-width: ${ef}px)`).matches&&e$(ek.current)},[e$]),eU=d.useCallback(e=>{e&&e$(ek.current)},[e$]),{screenSize:eG}=(0,k.lm)(),eK=!ej&&(es&&eG=k.Gy.large,ez=d.useCallback(()=>{eK||c(),eb.current=!0},[c,eK]),eZ=W?O.substring(0,O.lastIndexOf("/")):O,eJ=(0,d.useMemo)(()=>({knownFolders:eL,dispatchKnownFolders:eO}),[eL]),eX=d.useMemo(()=>ej?null:(0,I.KF)(),[ej]),eY=d.useCallback(()=>{window.matchMedia(`(min-width: ${k.Gy.large+1}px) and (max-width: ${k.Gy.xxxxlarge-1}px)`).matches&&t({setPreference:!1})},[t]),eQ=H.name===eE,e0=(0,o.jsxs)("div",{id:q,className:(0,u.$)("ReposFileTreePane-module__PaneContents__SJjfF",ej&&L,Z),children:[(0,o.jsxs)("div",{className:(0,u.$)(K,"ReposFileTreePane-module__Box_1__PpIop"),children:[Q,ea&&(0,o.jsxs)("div",{className:"ReposFileTreePane-module__Box_2__g74WI",children:[(0,o.jsx)("div",{className:"ReposFileTreePane-module__Box_3__D6cTp",children:eQ||void 0===eu?(0,o.jsx)(g.R,{buttonClassName:"react-repos-tree-pane-ref-selector width-full ref-selector-class",allowResizing:!0}):(0,o.jsxs)(N.A,{className:"ReposFileTreePane-module__FullWidthButtonGroup__tyEfq",children:[eu?(0,o.jsx)(T.K,{icon:s.ChevronLeftIcon,"aria-label":"View file on default branch",as:b.N,to:(0,F.IO9)({repo:R,commitish:eE,action:"blob",path:O})}):(0,o.jsx)(T.K,{icon:s.ChevronLeftIcon,"aria-label":"View file on default branch",description:"File does not exist on default branch","aria-disabled":!0,inactive:!0}),(0,o.jsx)(g.R,{buttonClassName:"react-repos-tree-pane-ref-selector width-full ref-selector-class",allowResizing:!0})]})}),(0,o.jsxs)("div",{className:"ReposFileTreePane-module__Box_4__DG4pa",children:[ec&&(0,o.jsx)(T.K,{"aria-label":"Add file",tooltipDirection:"n",as:b.N,icon:s.PlusIcon,to:(0,F.IO9)({repo:R,path:eZ,commitish:H.name,action:"new"}),onClick:ez,className:"ReposFileTreePane-module__IconButton__rGggU"}),(0,o.jsx)(ed,{className:ec?"ReposFileTreePane-module__SearchButtonWithLeftBorder__TBrDc":void 0,onClick:eY,textAreaId:U})]})]})]}),H.currentOid&&eo&&Y&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(p.default,{commitOid:H.currentOid,findFileWorkerPath:Y,onItemSelected:c,searchBoxRef:m,className:(0,u.$)("ReposFileTreePane-module__FileResultsList__zmSnM",ej&&L)}),(0,o.jsx)(h,{inputRef:m,onFindFilesShortcut:V,textAreaId:U})]}),(0,o.jsx)(ep,{scrollingRef:eR,sentinelRef:eF}),(0,o.jsxs)("div",{ref:eV,className:(0,u.$)("ReposFileTreePane-module__Box_5__Zy_o6",ej&&L),children:[(0,o.jsx)("div",{ref:eF,style:{height:1,marginTop:-1,width:"100%",flexShrink:0}}),ej?H.currentOid&&(0,o.jsx)("div",{className:eS?"react-tree-show-tree-items-on-large-screen":"react-tree-show-tree-items",children:(0,o.jsx)(en,{clientOnlyFilePaths:e,data:i,rootItems:eH,selectedItemRef:eq,setRootItems:eW,onItemSelected:ez,processingTime:f,loading:eg,fetchError:e_,incompleteFileTree:$,directoryNavigateOnClick:ei,getItemUrl:eI,className:J,getFileTrailingVisual:ee,getFileIcon:et,sortDirectoryItems:er,treeName:H.name})}):eX&&(0,o.jsx)(I.bL,{node:eX}),!H.currentOid&&!R.isEmpty&&(0,o.jsxs)("div",{className:"ReposFileTreePane-module__Box_6__KnilA",children:[(0,o.jsx)(A.A,{icon:s.AlertFillIcon}),"\xa0Ref is invalid"]})]})]});return(0,o.jsxs)(B,{value:eJ,children:[eX&&(0,o.jsx)(I.oj,{node:eX,children:H.currentOid&&(0,o.jsx)("div",{className:eS?"react-tree-show-tree-items-on-large-screen":"react-tree-show-tree-items",children:(0,o.jsx)(en,{clientOnlyFilePaths:e,data:i,directoryNavigateOnClick:ei,rootItems:eH,selectedItemRef:eq,setRootItems:eW,onItemSelected:ez,processingTime:f,loading:eg,fetchError:e_,incompleteFileTree:$,getItemUrl:eI,className:J,getFileTrailingVisual:ee,getFileIcon:et,sortDirectoryItems:er,treeName:H.name})})}),!r&&eN.enabled&&n&&(0,o.jsx)("div",{className:"ReposFileTreePane-module__Box_7__T2yBS",children:n}),(0,o.jsx)(j.O7.Pane,{position:"start",sticky:!0,padding:"none",width:"large",resizable:!!el,widthStorageKey:"codeView.tree-pane-width",divider:{regular:"none",narrow:"none"},className:(0,u.$)("ReposFileTreePane-module__Pane__rBZpI",!r&&P,eK||es?"ReposFileTreePane-module__HidePaneWithTreeOverlay__mFFGX":"ReposFileTreePane-module__HidePane__VHAVt",z),children:r&&!eK&&(0,o.jsx)("div",{className:ej?es?"react-tree-pane-contents-3-panel":"react-tree-pane-contents":void 0,children:e0})}),r&&eK&&eT.current===es&&(0,o.jsx)(E.Ay,{className:(0,u.$)(ej?es?"react-tree-pane-overlay-3-panel":"react-tree-pane-overlay":void 0,"ReposFileTreePane-module__Overlay__Lgnte",!r&&P),ref:eU,returnFocusRef:l,onClickOutside:eY,onEscape:eY,top:0,position:"fixed",children:(0,o.jsx)(o.Fragment,{children:e0})})]})}function eh(e,t){switch(t.type){case"set":{let r=e?.size>0;return(0,R.BI)("file-tree",{"fetch-count":r?t.folders.size-e.size:t.folders.size,"file-count":t.folders.size,"nav-type":r?"soft":"hard","processing-time":t.processingTime}),t.folders}case"add":{let r=new Map([...e,...t.folders]);return(0,R.BI)("file-tree",{"fetch-count":t.folders.size,"file-count":r.size,"nav-type":"fetch","processing-time":t.processingTime}),r}default:throw Error(`Unknown action type: ${t.type}`)}}function ep(e){let t,r,n,a=(0,i.c)(6),{scrollingRef:l,sentinelRef:s}=e,[c,u]=d.useState(!1);return a[0]!==l||a[1]!==s?(t=()=>{let e=s.current;if(!e||!l.current)return;let t=new IntersectionObserver(e=>{let[t]=e;u(!t.isIntersecting)},{root:l.current,threshold:0});return t.observe(e),()=>t.disconnect()},r=[l,s],a[0]=l,a[1]=s,a[2]=t,a[3]=r):(t=a[2],r=a[3]),d.useEffect(t,r),a[4]!==c?(n=c?(0,o.jsx)("div",{className:"ReposFileTreePane-module__Box_8__TLAjy"}):null,a[4]=c,a[5]=n):n=a[5],n}em.displayName="ReposFileTreePane",ep.displayName="TreeBorder";var eg=r(58164),ey=r(17005),e_=r(36594),ex=r(26316),ew=r(46249);function ev(e,t,r,i,n,a="fileTreeExpanded",l){let{sendRepoClickEvent:s}=(0,m.T)(),c=(0,e_.i)(),u=a?(0,ey.Ri)(a):void 0,h=void 0===ex.XC,p=!c&&u&&"false"!==u.value||c&&r;void 0===p&&(p=!1);let g=(0,d.useRef)(null),y=(0,d.useRef)(null),{screenSize:_}=(0,k.lm)(),[x,w]=(0,d.useState)(p),v=(0,d.useRef)(p),R=(0,d.useRef)(!1),F=(0,d.useRef)(!1),b=(0,d.useCallback)(()=>!(t.current&&window.matchMedia(`(min-width: ${ef}px)`).matches||!t.current&&window.matchMedia(`(min-width: ${k.Gy.xlarge}px)`).matches),[t]);(0,d.useLayoutEffect)(()=>{let e=b();e||(R.current=!1),w((0,eg.q)()&&_{S.current=x}),(0,d.useLayoutEffect)(()=>{let e=t.current?ef:k.Gy.xlarge,r=_=e;r&&v.current&&!(0,eg.q)()&&S.current&&w(!1),o&&v.current&&!S.current&&w(!0)},[t,_]);let C=(0,d.useCallback)(e=>{if(w(!0),b()&&(R.current=!0),e?.setPreference&&(n?.(!0),v.current=!0,a)){let e=new Date(Date.now()+2592e6).toUTCString();(0,ey.TV)(a,"true",e)}e?.focus==="toggleButton"?requestAnimationFrame(()=>g.current?.focus()):e?.focus==="search"&&requestAnimationFrame(()=>y.current?.focus())},[a,2592e6,b,n]),N=(0,d.useCallback)(e=>{if(w(!1),R.current=!1,F.current=!0,e?.setPreference&&(n?.(!1),v.current=!1,a)){let e=new Date(Date.now()+2592e6).toUTCString();(0,ey.TV)(a,"false",e)}e?.focus==="toggleButton"&&requestAnimationFrame(()=>g.current?.focus())},[a,2592e6,n]),T=(0,d.useCallback)(e=>e&&window.matchMedia(`(min-width: ${ef}px)`).matches||!t.current&&window.matchMedia(`(min-width: ${k.Gy.xlarge}px)`).matches,[t]),j=(0,d.useCallback)(()=>{s(S.current?"FILES_TREE.HIDE":"FILES_TREE.SHOW"),S.current?N({focus:"toggleButton",setPreference:T(t.current)}):C({focus:"toggleButton",setPreference:T(t.current)})},[s,N,T,t,C]),E=void 0!==u||x||h?void 0:"react-tree-toggle-button-with-indicator",A=(0,d.useMemo)(()=>(0,o.jsx)(ew.A,{as:"h2",className:"use-tree-pane-module__Heading__s4QbZ",children:(0,o.jsx)(f,{expanded:x,ariaControls:e,onToggleExpanded:j,className:E,ref:g,textAreaId:i,...l})}),[x,e,j,E,i,l]);return{isTreeExpanded:x,expandTree:C,collapseTree:N,treeToggleElement:A,treeToggleRef:g,searchBoxRef:y}}},88134(e,t,r){r.d(t,{T2:()=>c,cp:()=>h,ud:()=>g});var o=r(74848),i=r(16522),n=r(35205),a=r(96540);let l=(0,n.A)("localStorage"),s="codeView.codeFolding",c="codeView.codeWrapping",u="codeView.centerView",d="codeView.openSymbolsOnClick",f=new Map([[s,"Show code folding buttons"],[c,"Wrap lines"],[u,"Center content"],[d,"Open symbols on click"]]),m=(0,a.createContext)({codeFoldingOption:{},codeWrappingOption:{},codeCenterOption:{},openSymbolsOption:{}});m.displayName="CodeViewOptionsContext";let h=e=>{let t,r,n=(0,i.c)(8),{children:a}=e,l=p(s,!0),f=p(c,!1),h=p(u,!1),g=p(d,!0);n[0]!==h||n[1]!==l||n[2]!==f||n[3]!==g?(t={codeFoldingOption:l,codeWrappingOption:f,codeCenterOption:h,openSymbolsOption:g},n[0]=h,n[1]=l,n[2]=f,n[3]=g,n[4]=t):t=n[4];let y=t;return n[5]!==a||n[6]!==y?(r=(0,o.jsx)(m,{value:y,children:a}),n[5]=a,n[6]=y,n[7]=r):r=n[7],r};function p(e,t){let r,o,n,s,c=(0,i.c)(11);c[0]!==e?(r=l.getItem(e),c[0]=e,c[1]=r):r=c[1];let u=r;c[2]!==t||c[3]!==u?(o=()=>u?"true"===u:t,c[2]=t,c[3]=u,c[4]=o):o=c[4];let[d,m]=(0,a.useState)(o);c[5]!==e?(n=f.get(e)||"",c[5]=e,c[6]=n):n=c[6];let h=n;return c[7]!==d||c[8]!==h||c[9]!==e?(s={name:e,enabled:d,setEnabled:m,label:h},c[7]=d,c[8]=h,c[9]=e,c[10]=s):s=c[10],s}function g(){return(0,a.use)(m)}h.displayName="CodeViewOptionsProvider"},15393(e,t,r){r.d(t,{X:()=>l});var o=r(16522),i=r(96540);function n(){return()=>{}}function a(){return!1}function l(e){let t,r=(0,o.c)(2);return r[0]!==e?(t=()=>{let t=function(){if("u"