performance.mark("js-parse-end:11044-f32091b47d28d6de.js"); "use strict";(globalThis.webpackChunk_github_ui_github_ui=globalThis.webpackChunk_github_ui_github_ui||[]).push([["11044"],{72105(e,t,n){n.d(t,{A:()=>i});let i={diff:"Diff-module__diff__rx9XH",diffTargetable:"Diff-module__diffTargetable__pirZi",diffHeaderWrapper:"Diff-module__diffHeaderWrapper__UgUyv",diffAddFileThread:"Diff-module__diffAddFileThread__DCIBJ",diffFooter:"Diff-module__diffFooter__nVNpq",hideOnNarrowContainer:"Diff-module__hideOnNarrowContainer__U08OL"}},85285(e,t,n){n.d(t,{Qs:()=>s,fv:()=>a,uN:()=>r,wJ:()=>o,wX:()=>l,wg:()=>i});let i="copilot-chat-textarea",r="copilot-chat-topic-search",a="copilot-chat-header-button",l="copilot-diff-header-button",o="copilot-chat-panel",s="copilot-chat-panel"},2827(e,t,n){n.d(t,{YH:()=>y,Vv:()=>w,Gt:()=>C});var i=n(74848),r=n(16522),a=n(206),l=n(16497),o=n(38621),s=n(26108),d=n(36007),c=n(39775),u=n(21373),m=n(34164),f=n(80655);let h="Annotation-module__inlineReviewThreadHeading__Ic9N2";var g=n(64714),p=n(96540),b=n(35205),v=n(26316);let C={[f.UZ.Failure]:(0,i.jsx)(o.StopIcon,{className:"fgColor-danger mr-2"}),[f.UZ.Warning]:(0,i.jsx)(o.AlertIcon,{className:"fgColor-attention mr-2"}),[f.UZ.Notice]:(0,i.jsx)(o.InfoIcon,{className:"fgColor-muted mr-2"})};function y(e){let t,n,f,h,p,b,v,C=(0,r.c)(31),{annotation:y,inSidePanel:L}=e,N=L?"h3":"h2",{isCollapsed:_,handleToggleCollapsed:D}=w(y),I=g.GF[y.annotationLevel];return C[0]!==I.borderColor?(t=(0,m.$)("p-1 bgColor-default",I.borderColor,"Annotation-module__annotation__SSvB_"),C[0]=I.borderColor,C[1]=t):t=C[1],C[2]!==D||C[3]!==L||C[4]!==_?(n=!L&&(0,i.jsx)(s.K,{"aria-label":_?"Expand annotation":"Collapse annotation",icon:_?o.ChevronRightIcon:o.ChevronDownIcon,size:"small",variant:"invisible",onClick:D}),C[2]=D,C[3]=L,C[4]=_,C[5]=n):n=C[5],C[6]!==y||C[7]!==L?(f=!L&&(0,i.jsx)(x,{annotation:y}),C[6]=y,C[7]=L,C[8]=f):f=C[8],C[9]!==y||C[10]!==L?(h=L&&(0,i.jsx)(S,{annotation:y}),C[9]=y,C[10]=L,C[11]=h):h=C[11],C[12]!==n||C[13]!==f||C[14]!==h?(p=(0,i.jsxs)("div",{className:"d-flex flex-items-center",children:[n,f,h]}),C[12]=n,C[13]=f,C[14]=h,C[15]=p):p=C[15],C[16]!==N||C[17]!==y.annotationLevel||C[18]!==y.appAvatarAltText||C[19]!==y.appAvatarUrl||C[20]!==y.checkRun||C[21]!==y.checkSuiteName||C[22]!==y.message||C[23]!==y.title||C[24]!==L||C[25]!==_?(b=(!_||L)&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:"tmp-ml-4 mt-2",children:y.title&&(0,i.jsx)(d.A,{weight:"semibold",size:"medium",className:g.GF[y.annotationLevel].primaryColorClass,children:y.title})}),(0,i.jsxs)(N,{className:"sr-only",children:[g.GF[y.annotationLevel].ariaLabel,": ",y.title]}),(0,i.jsx)("div",{className:"tmp-mb-3 mt-1 tmp-ml-4",children:y.message&&(0,i.jsx)(l.$6,{html:y.message,className:"Annotation-module__annotationMessage__lcAsr"})}),(0,i.jsxs)("div",{className:"d-flex flex-items-center flex-justify-between tmp-ml-4 pr-2 pb-2",children:[(0,i.jsxs)("div",{className:"Annotation-module__annotationSource__GJ9Jm",children:[(0,i.jsx)(a.r,{src:y.appAvatarUrl,alt:y.appAvatarAltText}),(0,i.jsxs)(c.A,{className:"ml-2",maxWidth:"300px",inline:!0,title:`${y.checkSuiteName} / ${y.checkRun.name}`,children:[(0,i.jsx)(d.A,{weight:"semibold",size:"small",children:y.checkSuiteName})," ","/ ",(0,i.jsx)(d.A,{size:"small",children:y.checkRun.name})]})]}),y.checkRun.detailsUrl&&(0,i.jsx)(u.Q,{as:"a",href:y.checkRun.detailsUrl,size:"small",children:"View details"})]})]}),C[16]=N,C[17]=y.annotationLevel,C[18]=y.appAvatarAltText,C[19]=y.appAvatarUrl,C[20]=y.checkRun,C[21]=y.checkSuiteName,C[22]=y.message,C[23]=y.title,C[24]=L,C[25]=_,C[26]=b):b=C[26],C[27]!==t||C[28]!==p||C[29]!==b?(v=(0,i.jsxs)("div",{className:t,children:[p,b]}),C[27]=t,C[28]=p,C[29]=b,C[30]=v):v=C[30],v}function L(e){let t,n=(0,r.c)(2),{children:a}=e;return n[0]!==a?(t=(0,i.jsx)("span",{className:"text-semibold fgColor-default",children:a}),n[0]=a,n[1]=t):t=n[1],t}function x(e){let t,n,a=(0,r.c)(6),{annotation:l}=e,o=C[l.annotationLevel],s=g.GF[l.annotationLevel];return a[0]!==l.endLine?(t=(0,i.jsxs)(L,{children:["R",l.endLine]}),a[0]=l.endLine,a[1]=t):t=a[1],a[2]!==o||a[3]!==s.ariaLabel||a[4]!==t?(n=(0,i.jsxs)("h2",{className:h,children:[o,s.ariaLabel," on line"," ",t]}),a[2]=o,a[3]=s.ariaLabel,a[4]=t,a[5]=n):n=a[5],n}function S(e){let t,n,a=(0,r.c)(3),{annotation:l}=e;a[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,m.$)(h,"tmp-ml-4","pt-1","pl-0"),a[0]=t):t=a[0];let o=g.GF[l.annotationLevel];return a[1]!==o.ariaLabel?(n=(0,i.jsx)("div",{className:t,children:(0,i.jsx)(L,{children:o.ariaLabel})}),a[1]=o.ariaLabel,a[2]=n):n=a[2],n}function N(e){return`AnnotationIsCollapsed_${e.path}_${e.endLine}_${e.annotationLevel}_${e.title}`}function w(e){let t,n,i,a,l,o=(0,r.c)(10);o[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,b.A)("localStorage"),o[0]=t):t=o[0];let s=t,[d,c]=(0,p.useState)(!1);o[1]!==e?(n=()=>{let t=localStorage.getItem(N(e));null!==t&&c(JSON.parse(t))},i=[e],o[1]=e,o[2]=n,o[3]=i):(n=o[2],i=o[3]),(0,p.useEffect)(n,i),o[4]!==e||o[5]!==d?(a=()=>{v.cg?.requestAnimationFrame(()=>{s.setItem(N(e),JSON.stringify(!d))}),c(_)},o[4]=e,o[5]=d,o[6]=a):a=o[6];let u=a;return o[7]!==u||o[8]!==d?(l={isCollapsed:d,handleToggleCollapsed:u},o[7]=u,o[8]=d,o[9]=l):l=o[9],l}function _(e){return!e}y.displayName="Annotation",L.displayName="Emphasis",x.displayName="AnnotationBanner",S.displayName="SidePanelAnnotationBanner"},64714(e,t,n){n.d(t,{Xh:()=>o,GF:()=>d,S:()=>s});var i=n(74848),r=n(16522),a=n(34164),l=n(80655);function o({annotationLevel:e,...t}){let{icon:n,...r}=d[e];return function({fill:e,stroke:t,ariaLabel:n,svgHtml:r,className:a}){return(0,i.jsx)("svg",{"aria-label":n,className:a,fill:e,height:"24",stroke:t,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",style:{boxShadow:"none"},viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg",children:r})}({...n,...r,...t})}function s(e){let t,n,l,s,d=(0,r.c)(8);return d[0]!==e?({className:t,...n}=e,d[0]=e,d[1]=t,d[2]=n):(t=d[1],n=d[2]),d[3]!==t?(l=(0,a.$)("AnnotationIcon-module__AnimatedAnnotationIcon__GP9yX",t),d[3]=t,d[4]=l):l=d[4],d[5]!==n||d[6]!==l?(s=(0,i.jsx)(o,{...n,className:l}),d[5]=n,d[6]=l,d[7]=s):s=d[7],s}o.displayName="AnnotationIcon",s.displayName="AnimatedAnnotationIcon";let d={[l.UZ.Failure]:{priority:1,ariaLabel:"Check failure",primaryColor:"danger.fg",primaryColorClass:"fgColor-danger",borderColor:"borderColor-danger-emphasis",icon:{fill:"var(--bgColor-danger-emphasis, var(--color-danger-emphasis))",stroke:"var(--fgColor-onEmphasis, var(--color-fg-on-emphasis))",svgHtml:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,i.jsx)("line",{x1:"15",x2:"9",y1:"9",y2:"15"}),(0,i.jsx)("line",{x1:"9",x2:"15",y1:"9",y2:"15"})]})}},[l.UZ.Warning]:{priority:2,ariaLabel:"Check warning",primaryColor:"attention.fg",primaryColorClass:"fgColor-attention",borderColor:"borderColor-attention-emphasis",icon:{fill:"var(--bgColor-attention-emphasis, var(--color-attention-emphasis))",stroke:"var(--fgColor-onEmphasis, var(--color-fg-on-emphasis))",svgHtml:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,i.jsx)("line",{x1:"12",x2:"12",y1:"8",y2:"12"}),(0,i.jsx)("line",{x1:"12",x2:"12",y1:"16",y2:"16"})]})}},[l.UZ.Notice]:{priority:3,ariaLabel:"Check notice",primaryColor:"fg.muted",primaryColorClass:"fgColor-muted",borderColor:"fgColor-muted",icon:{fill:"var(--bgColor-neutral-emphasis, var(--color-neutral-emphasis))",stroke:"var(--fgColor-onEmphasis, var(--color-fg-on-emphasis))",svgHtml:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,i.jsx)("line",{x1:"12",x2:"12",y1:"16",y2:"12"}),(0,i.jsx)("line",{x1:"12",x2:"12",y1:"8",y2:"8"})]})}}}},30572(e,t,n){n.d(t,{G:()=>s});var i=n(74848),r=n(16522),a=n(86276),l=n(5024);let o="CommentContentSkeleton-module__commentLine__zeT7c";function s(){let e,t,n,s=(0,r.c)(3);return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,i.jsxs)("div",{className:"CommentContentSkeleton-module__commentHeader__h3YJm",children:[(0,i.jsx)(a.r,{size:"bodySmall",className:"CommentContentSkeleton-module__authorName__VFo2d"}),(0,i.jsx)(a.r,{size:"bodySmall",className:"CommentContentSkeleton-module__timestamp__eeloQ"})]}),s[0]=e):e=s[0],s[1]===Symbol.for("react.memo_cache_sentinel")?(t=(0,i.jsxs)("div",{className:"CommentContentSkeleton-module__comment__n3x7a",children:[e,(0,i.jsxs)("div",{className:"CommentContentSkeleton-module__commentBody__oTMOH",children:[(0,i.jsx)(a.r,{size:"bodySmall",className:o}),(0,i.jsx)(a.r,{size:"bodySmall",className:o})]})]}),s[1]=t):t=s[1],s[2]===Symbol.for("react.memo_cache_sentinel")?(n=(0,i.jsxs)("div",{"data-testid":"comment-content-skeleton",children:[t,(0,i.jsx)("div",{className:"CommentContentSkeleton-module__footer__TeDrw",children:(0,i.jsx)(l.f,{className:"CommentContentSkeleton-module__repliesButton__BBbGU"})})]}),s[2]=n):n=s[2],n}s.displayName="CommentContentSkeleton"},6021(e,t,n){n.d(t,{S:()=>o});var i=n(74848),r=n(16522),a=n(11675),l=n(70503);let o=e=>{let t,n,o,s,d,c,u,m,f=(0,r.c)(22);f[0]!==e?({ref:n,children:t,...o}=e,f[0]=e,f[1]=t,f[2]=n,f[3]=o):(t=f[1],n=f[2],o=f[3]);let h=(0,l.Yp)(),{baseRepository:g}=(0,l.GK)(),p=(0,l.L3)();f[4]!==h.id?(s={id:h.id},f[4]=h.id,f[5]=s):s=f[5];let b=`${g.ownerLogin}/${g.name}`;f[6]!==g.id||f[7]!==b?(d={databaseId:g.id,nwo:b,slashCommandsEnabled:!1},f[6]=g.id,f[7]=b,f[8]=d):d=f[8],f[9]!==p.effectiveRange.baseOid||f[10]!==p.effectiveRange.headOid?(c={startCommitOid:p.effectiveRange.baseOid,endCommitOid:p.effectiveRange.headOid},f[9]=p.effectiveRange.baseOid,f[10]=p.effectiveRange.headOid,f[11]=c):c=f[11],f[12]!==h.number||f[13]!==s||f[14]!==d||f[15]!==c?(u={type:"pull_request",id:s,pullRequestNumber:h.number,repository:d,comparison:c},f[12]=h.number,f[13]=s,f[14]=d,f[15]=c,f[16]=u):u=f[16];let v=u;return f[17]!==t||f[18]!==n||f[19]!==o||f[20]!==v?(m=(0,i.jsx)(a.hF,{...o,ref:n,placeholder:"Leave a comment",actions:t,subject:v,showLabel:!1}),f[17]=t,f[18]=n,f[19]=o,f[20]=v,f[21]=m):m=f[21],m};o.displayName="ConversationCommentBox",o.displayName="ConversationCommentBox"},33874(e,t,n){n.d(t,{U:()=>eo});var i=n(74848),r=n(16522),a=n(11675),l=n(22182),o=n(57053),s=n(93238),d=n(66798),c=n(73537),u=n(52111),m=n(53178),f=n(16497),h=n(26316),g=n(40914),p=n(38621),b=n(77052),v=n(56133),C=n(59134),y=n(72685),L=n(34164),x=n(96540),S=n(23666),N=n(94747),w=n(70503),_=n(1932),D=n(78597);async function I(e){let{duration:t,hiddenReason:n,note:i,organizationLogin:r,notifyBlockedUser:a,shouldHideComment:l,userLogin:o}=e,s=new FormData;s.append("duration",t),s.append("hide_comment",l.toString()),n&&s.append("hidden_reason",n),i&&s.append("note",i),s.append("login",o),s.append("send_notification",a.toString()),await (0,D.DI)((0,S.ggd)({owner:r}),{method:"POST",body:s,redirect:"manual"})}var j=n(78431),k=n(83726),A=n(62764),E=n(38125),R=n(95424);async function T(e){let{organizationLogin:t,userLogin:n}=e;await (0,j.q$)(`${(0,S.ggd)({owner:t})}/${(0,R.QU)(n)}`,{method:"DELETE",redirect:"manual"})}function O(e){if(e)return{...e,isHidden:!1,minimizedReason:null}}var $=n(34784),M=n(25546),F=n(32371),B=n(56392),H=n(6021);let P="ReviewThreadComment-module__ReviewThreadWrapper__maToZ";var K=n(40961),U=n(52392),V=n(68938);function z(){h.cg?.location.reload()}var q=n(6877),G=n(79134),W=n(51581),X=n(4925),J=n(21373),Q=n(65222);function Y(e){let t,n,a,l,o,s=(0,r.c)(32),{onOpenDialog:d,suggestedChange:c,canAddToBatch:u}=e,m=void 0===u||u,{sendAnalyticsEvent:f}=(0,W.s)(),h=(0,x.useRef)(null),g=c.commentDatabaseId||0;s[0]!==c.suggestionIndex||s[1]!==g?(t={commentDatabaseId:g,suggestionIndex:c.suggestionIndex},s[0]=c.suggestionIndex,s[1]=g,s[2]=t):t=s[2];let p=(0,w.Nk)(t),b=(0,w.RH)(),v=(0,q.u)("batch_suggested_changes"),{addSuggestionToBatch:C,removeSuggestionFromBatch:y}=(0,w.xJ)(),L=(0,w.WK)(),S=(0,w.Kp)(),N=(0,w.L3)();s[3]!==C||s[4]!==N||s[5]!==S||s[6]!==f||s[7]!==c.commentDatabaseId||s[8]!==c.lineRange||s[9]!==c.path||s[10]!==c.suggestionIndex||s[11]!==c.threadId||s[12]!==L?(n=()=>{if(!c.commentDatabaseId)return;let e={commentDatabaseId:c.commentDatabaseId,suggestionIndex:c.suggestionIndex,threadId:c.threadId,pathLineRanges:[{path:c.path,lineRange:c.lineRange}]};C(e),(0,Q.CE)(S,N.fullDiff.headOid,[...L.activeBatch,e]),f("comments.add_suggested_change_to_batch","ADD_SUGGESTED_CHANGE_TO_BATCH_BUTTON")},s[3]=C,s[4]=N,s[5]=S,s[6]=f,s[7]=c.commentDatabaseId,s[8]=c.lineRange,s[9]=c.path,s[10]=c.suggestionIndex,s[11]=c.threadId,s[12]=L,s[13]=n):n=s[13];let _=n;s[14]!==N||s[15]!==S||s[16]!==y||s[17]!==f||s[18]!==c.commentDatabaseId||s[19]!==c.suggestionIndex||s[20]!==L?(a=()=>{if(!c.commentDatabaseId)return;let e={commentDatabaseId:c.commentDatabaseId,suggestionIndex:c.suggestionIndex};y(e),(0,Q.CE)(S,N.fullDiff.headOid,L.activeBatch.filter(t=>t.commentDatabaseId!==e.commentDatabaseId||t.suggestionIndex!==e.suggestionIndex)),f("comments.remove_suggested_change_from_batch","REMOVE_SUGGESTED_CHANGE_FROM_BATCH_BUTTON")},s[14]=N,s[15]=S,s[16]=y,s[17]=f,s[18]=c.commentDatabaseId,s[19]=c.suggestionIndex,s[20]=L,s[21]=a):a=s[21];let D=a;s[22]!==d?(l=()=>{d(h)},s[22]=d,s[23]=l):l=s[23];let I=l;return s[24]!==v||s[25]!==m||s[26]!==_||s[27]!==I||s[28]!==D||s[29]!==p||s[30]!==b?(o=(0,i.jsx)("div",{className:"d-flex flex-row flex-items-center",children:v&&p?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(X.A,{variant:"attention",children:"Pending in batch"}),(0,i.jsx)("div",{className:"ml-auto",children:(0,i.jsx)(J.Q,{variant:"danger",onClick:D,children:"Remove from batch"})})]}):(0,i.jsxs)("div",{className:"d-flex gap-2 ml-auto flex-wrap-reverse",children:[!b&&(0,i.jsx)(J.Q,{variant:"default",onClick:I,ref:h,children:"Apply suggestion"}),v&&m&&(0,i.jsx)(J.Q,{variant:"primary",onClick:_,children:"Add suggestion to batch"})]})}),s[24]=v,s[25]=m,s[26]=_,s[27]=I,s[28]=D,s[29]=p,s[30]=b,s[31]=o):o=s[31],o}Y.displayName="ApplyOrAddToBatch";var Z=n(70985),ee=n(33906);function et(e){let t,n,a,l,o,s,d,c,u,m,f,h,g,p,b,v,C=(0,r.c)(43),{suggestedChange:y}=e,{setIsDialogOpen:L}=(0,G.W)(),[S,_]=(0,x.useState)(!1),D=(0,x.useRef)(void 0),I=(0,q.u)("batch_suggested_changes"),k=(0,w.WK)();C[0]!==I||C[1]!==y.commentDatabaseId||C[2]!==y.suggestionIndex||C[3]!==k.activeBatch?(t=I&&void 0!==y.commentDatabaseId&&null!==y.commentDatabaseId&&k.activeBatch.some(e=>e.commentDatabaseId===y.commentDatabaseId&&e.suggestionIndex===y.suggestionIndex),C[0]=I,C[1]=y.commentDatabaseId,C[2]=y.suggestionIndex,C[3]=k.activeBatch,C[4]=t):t=C[4];let E=t;C[5]!==y.lineRange||C[6]!==y.path||C[7]!==y.threadId||C[8]!==k.activeBatch?(n=(0,U.EJ)({threadId:y.threadId,pathLineRanges:[{path:y.path,lineRange:y.lineRange}]},k.activeBatch),C[5]=y.lineRange,C[6]=y.path,C[7]=y.threadId,C[8]=k.activeBatch,C[9]=n):n=C[9];let{isValid:R,reason:T}=n;C[10]!==y?(a=[y],C[10]=y,C[11]=a):a=C[11];let O=a;C[12]!==O?(l=O.map(en),C[12]=O,C[13]=l):l=C[13];let $=l;C[14]!==L?(o=e=>{_(e),L?.(e)},C[14]=L,C[15]=o):o=C[15];let M=o;C[16]!==M?(s=()=>{if(M(!1),D.current){let e=D.current.current;setTimeout(()=>e?.focus())}},C[16]=M,C[17]=s):s=C[17];let F=s;C[18]!==M?(d=e=>{M(!0),D.current=e},C[18]=M,C[19]=d):d=C[19];let B=d,{mutate:H}=(p=(0,r.c)(2),b=(0,w.Kp)(),v=`${b}/page_data/${A.uT.submitSuggestedChanges}`,p[0]!==v?(g={mutationFn:async e=>{let{changes:t,currentOid:n,message:i}=e,r=await (0,j.q$)(v,{method:"POST",body:{changes:t,currentOid:n,message:i}}),a=await (0,j.hp)(r);return(0,j.R)(r,a),a},onSuccess:z},p[0]=v,p[1]=g):g=p[1],(0,N.n)(g)),{fullDiff:P}=(0,w.L3)(),{headOid:K}=P;C[20]!==O||C[21]!==F||C[22]!==K||C[23]!==H?(c=(e,t,n)=>{H({changes:O,message:e,currentOid:K},{onSuccess:()=>{F(),n()},onError:e=>{t(e,"submitSuggestedChanges","Failed to submit suggested changes")}})},C[20]=O,C[21]=F,C[22]=K,C[23]=H,C[24]=c):c=C[24];let V=c;return C[25]!==R||C[26]!==B||C[27]!==y?(u=(0,i.jsx)(Y,{suggestedChange:y,onOpenDialog:B,canAddToBatch:R}),C[25]=R,C[26]=B,C[27]=y,C[28]=u):u=C[28],C[29]!==E||C[30]!==R||C[31]!==T?(m=!E&&!R&&T&&(0,i.jsx)(ee.s,{reason:T,className:"m-0"}),C[29]=E,C[30]=R,C[31]=T,C[32]=m):m=C[32],C[33]!==$||C[34]!==O.length||C[35]!==F||C[36]!==V||C[37]!==S?(f=S&&(0,i.jsx)(Z.$,{authorLogins:$,batchSize:O.length,onClose:F,onCommit:V}),C[33]=$,C[34]=O.length,C[35]=F,C[36]=V,C[37]=S,C[38]=f):f=C[38],C[39]!==u||C[40]!==m||C[41]!==f?(h=(0,i.jsxs)("div",{className:"border-top p-2",children:[u,m,f]}),C[39]=u,C[40]=m,C[41]=f,C[42]=h):h=C[42],h}function en(e){return e.authorLogin}function ei(e){let t,n,a=(0,r.c)(12),{applySuggestedChangesValidationData:l,comment:o,commentBodyRef:s,filePath:d,isOutdated:c,isThreadResolved:u,suggestedChangesConfig:m,databaseId:f,viewerCanApplySuggestion:h}=e,{state:g}=(0,w.Yp)(),p=(0,w.ww)(),b=function(e,t,n,i,a){let l,o,s=(0,r.c)(19),[d,c]=(0,x.useState)();s[0]!==a.lineRange||s[1]!==t.author?.login||s[2]!==t.databaseId||s[3]!==t.id||s[4]!==t.subjectType||s[5]!==e||s[6]!==n||s[7]!==i?(l=()=>{if(!e.current||t.subjectType?.toUpperCase()!=="LINE")return;let r=[...e.current.getElementsByClassName("js-apply-changes")];if(r.length>0){let e=[];for(let l=0;l{let{isValid:t,reason:n}=(0,U.o_)({suggestedChange:e,hasCommitRange:p,isOutdated:c,isPending:"PENDING"===o.state.toUpperCase(),isResolved:u,pullRequestIsClosed:void 0===g||"CLOSED"===g||"MERGED"===g,pullRequestIsInMergeQueue:"QUEUED"===g,userCanApplySuggestion:!!h,applySuggestedChangesValidationData:l,suggestedChangesConfig:m});return!t&&n?(0,K.createPortal)((0,i.jsx)(ee.s,{reason:n}),e.ref):(0,K.createPortal)((0,i.jsx)(et,{suggestedChange:e}),e.ref)}):null,a[0]=l,a[1]=o,a[2]=p,a[3]=c,a[4]=u,a[5]=g,a[6]=b,a[7]=m,a[8]=h,a[9]=t):t=a[9],a[10]!==t?(n=(0,i.jsx)(i.Fragment,{children:t}),a[10]=t,a[11]=n):n=a[11],n}et.displayName="CodeSuggestionActions",ei.displayName="SuggestedChangeView";var er=n(29501),ea=n(70887),el=n(35665);function eo(e){let t,n,S,D,R,K,U,V,z,q,G,W,X,J,Q,Y,Z,ee,et,en,eo,ed,ec,eu,em,ef,eh,eg,ep,eb,ev,eC,ey,eL,ex,eS,eN,ew,e_,eD,eI,ej,ek,eA,eE=(0,r.c)(181),{isAnchorable:eR,index:eT,isInlineComment:eO,isLastChild:e$,isOutdated:eM,isThreadResolved:eF,lineMarkersKey:eB,anchorPrefix:eH,comment:eP,disableDialogMode:eK,enableDialogMode:eU,filePath:eV,gridCellId:ez,hideActions:eq,isFirstComment:eG,isInDialogMode:eW,onDeleteLineComment:eX,onQuoteReply:eJ,threadCommentCount:eQ,threadId:eY,threadPositionNumber:eZ,suggestedChangesConfig:e1,applySuggestedChangesValidationData:e0,viewerData:e2,ghostUser:e3,originalDiffPathUri:e4,headingLevel:e5,tooltipDirection:e6}=e,e7=void 0!==eR&&eR,e8=void 0===eT?0:eT,e9=void 0!==eG&&eG,te=void 0===eJ?u.l:eJ,tt=void 0===e3?s.t.ghostUser:e3,tn=void 0===e5?"h3":e5,{addToast:ti}=(0,g.Y6)(),[tr,ta]=(0,x.useState)(!1),[tl,to]=(0,x.useState)(eP.isHidden),[ts,td]=(0,x.useState)(!1),[tc,tu]=(0,x.useState)(eP.body),[tm,tf]=(0,x.useState)(!1),[th,tg]=(0,x.useState)(!1),[tp,tb]=(0,x.useState)(""),tv=(0,w.Kp)(),tC="FILE"===eP.subjectType;eE[0]===Symbol.for("react.memo_cache_sentinel")?(t=e=>{let{text:t}=e;t&&tu(t)},eE[0]=t):t=eE[0],eE[1]!==tv||eE[2]!==eP.id||eE[3]!==eV||eE[4]!==tC?(n={subjectId:tv,filePath:eV,fileLevelComment:tC,threadId:eP.id,handlePersistedCommentExists:t},eE[1]=tv,eE[2]=eP.id,eE[3]=eV,eE[4]=tC,eE[5]=n):n=eE[5];let{persistCommentToStorage:ty,removePersistedCommentFromStorage:tL}=(0,F.L4)(n),tx=(0,x.useRef)(null),tS=(0,x.useRef)(null),tN=(0,x.useRef)(null),[tw,t_]=(0,x.useState)("");eE[6]===Symbol.for("react.memo_cache_sentinel")?(S=()=>{tx.current?.focus()},eE[6]=S):S=eE[6];let tD=S;eE[7]!==tr?(D=()=>{if(tr){let e=window.setTimeout(tD);return()=>{window.clearTimeout(e)}}},R=[tr],eE[7]=tr,eE[8]=D,eE[9]=R):(D=eE[8],R=eE[9]),(0,x.useEffect)(D,R),eE[10]!==eX?(K=()=>{td(!1),tg(!1),eX?.()},eE[10]=eX,eE[11]=K):K=eE[11],eE[12]!==eV||eE[13]!==eB||eE[14]!==K?(U={filePath:eV,lineMarkersKey:eB,onSuccess:K},eE[12]=eV,eE[13]=eB,eE[14]=K,eE[15]=U):U=eE[15];let{mutate:tI}=function(e){let t,n,i,a=(0,r.c)(15),{filePath:l,lineMarkersKey:o,onSuccess:s}=e,d=(0,k.Kp)(),{deleteThreadComment:c}=(0,k.an)(),u=(0,k.R5)(),m=(0,k.SM)(),{removePendingComment:f}=(0,k._N)();return a[0]!==d||a[1]!==l||a[2]!==m||a[3]!==o?(t=async e=>{let{commentId:t,threadId:n}=e,i=m(Number(n),l,o)?.commentsData?.comments?.find(e=>e.id===t);if(!i)return;let r=`${d}/page_data/review_comments/${i.databaseId}`,a=await (0,j.q$)(`${r}`,{method:"DELETE"});if(204===a.status||200===a.status)return;let s=await (0,j.hp)(a);(0,j.R)(a,s)},a[0]=d,a[1]=l,a[2]=m,a[3]=o,a[4]=t):t=a[4],a[5]!==c||a[6]!==l||a[7]!==o||a[8]!==u||a[9]!==s||a[10]!==f?(n=(e,t)=>{let{commentId:n,threadId:i}=t,r=c(Number(i),n,l,o);f(Number(i)),"thread_deleted"===r&&("thread_deleted"===r&&u?.({path:l,threadID:i}),s?.())},a[5]=c,a[6]=l,a[7]=o,a[8]=u,a[9]=s,a[10]=f,a[11]=n):n=a[11],a[12]!==t||a[13]!==n?(i={mutationFn:t,onSuccess:n},a[12]=t,a[13]=n,a[14]=i):i=a[14],(0,N.n)(i)}(U);eE[16]!==eK?(V=async()=>{eK?.(),td(!0)},eE[16]=eK,eE[17]=V):V=eE[17];let tj=V;eE[18]!==ti||eE[19]!==eP.id||eE[20]!==tI||eE[21]!==eU||eE[22]!==eV||eE[23]!==ez||eE[24]!==eY?(z=e=>{"confirm"===e?(tg(!0),tI({commentId:eP.id,threadId:eY,filePath:eV},{onError:()=>{td(!1),ti({type:"error",message:"Failed to delete comment"}),tg(!1)}})):(ez&&eU?.(ez),td(!1),tg(!1))},eE[18]=ti,eE[19]=eP.id,eE[20]=tI,eE[21]=eU,eE[22]=eV,eE[23]=ez,eE[24]=eY,eE[25]=z):z=eE[25];let tk=z,{mutate:tA}=function(e,t){let n,i,a,l=(0,r.c)(9),o=(0,w.Kp)(),s=`${o}/page_data/${A.uT.hideComment}`,{updateThreadComment:d}=(0,w.an)();return l[0]!==s?(n=async e=>{let{commentDatabaseId:t,reason:n}=e,i=await (0,j.q$)(s,{method:"POST",body:{classifier:n,commentId:t}}),r=await (0,j.hp)(i);return(0,j.R)(i,r),r},l[0]=s,l[1]=n):n=l[1],l[2]!==e||l[3]!==t||l[4]!==d?(i=n=>{d({threadID:n.threadId,filePath:e,lineMarkersKey:t,match:e=>e.databaseId===n.commentDatabaseId,transform:e=>{if(e)return{...e,isHidden:!0,minimizedReason:n.reason}}})},l[2]=e,l[3]=t,l[4]=d,l[5]=i):i=l[5],l[6]!==n||l[7]!==i?(a={mutationFn:n,onSuccess:i},l[6]=n,l[7]=i,l[8]=a):a=l[8],(0,N.n)(a)}(eV,eB);eE[26]!==eP.databaseId||eE[27]!==tA?(q=e=>{if(!eP.databaseId)throw Error("Comment not found");tA({commentDatabaseId:eP.databaseId,reason:e},{onError:()=>{tf(!1),t_("Failed to hide comment")},onSuccess:()=>to(!0)})},eE[26]=eP.databaseId,eE[27]=tA,eE[28]=q):q=eE[28];let tE=q,{mutate:tR}=function(e,t){let n,i,a,l=(0,r.c)(9),o=(0,w.Kp)(),s=`${o}/page_data/${A.uT.unhideComment}`,{updateThreadComment:d}=(0,w.an)();return l[0]!==s?(n=async e=>{let{commentDatabaseId:t}=e,n=await (0,j.q$)(s,{method:"POST",body:{commentId:t}}),i=await (0,j.hp)(n);return(0,j.R)(n,i),i},l[0]=s,l[1]=n):n=l[1],l[2]!==e||l[3]!==t||l[4]!==d?(i=n=>{d({threadID:n.threadId,filePath:e,lineMarkersKey:t,match:e=>e.databaseId===n.commentDatabaseId,transform:O})},l[2]=e,l[3]=t,l[4]=d,l[5]=i):i=l[5],l[6]!==n||l[7]!==i?(a={mutationFn:n,onSuccess:i},l[6]=n,l[7]=i,l[8]=a):a=l[8],(0,N.n)(a)}(eV,eB);eE[29]!==eP.databaseId||eE[30]!==tR?(G=()=>{if(!eP.databaseId)throw Error("Comment not found");tR({commentDatabaseId:eP.databaseId},{onError:()=>{tf(!1),t_("Failed to unhide comment")},onSuccess:()=>to(!1)})},eE[29]=eP.databaseId,eE[30]=tR,eE[31]=G):G=eE[31];let tT=G,{mutate:tO}=function(){let e,t=(0,r.c)(2),{updateThreads:n}=(0,w.an)();return t[0]!==n?(e={mutationFn:I,onSuccess:(e,t)=>{n((0,_.jM)(e=>{let n=e.flatMap(e=>e.commentsData?.comments.filter(e=>e.author?.login===t.userLogin));if(0!==n.length)for(let e of n)e&&(e.viewerCanBlockFromOrg=!1,e.viewerCanUnblockFromOrg=!0,e.isHidden=t.shouldHideComment||e.isHidden,e.minimizedReason=t.hiddenReason||null)}))}},t[0]=n,t[1]=e):e=t[1],(0,N.n)(e)}();eE[32]!==tO?(W=(e,t,n,i,r,a,l)=>tO({duration:e,shouldHideComment:t,hiddenReason:n,note:l,organizationLogin:i,notifyBlockedUser:r,userLogin:a},{onError:()=>t_("Failed to block user"),onSuccess:()=>{t&&to(!0)}}),eE[32]=tO,eE[33]=W):W=eE[33];let t$=W,{mutate:tM}=function(){let e,t=(0,r.c)(2),{updateThreads:n}=(0,w.an)();return t[0]!==n?(e={mutationFn:T,onSuccess:(e,t)=>{n((0,_.jM)(e=>{let n=e.flatMap(e=>e.commentsData?.comments.filter(e=>e.author?.login===t.userLogin));if(0!==n.length)for(let e of n)e&&(e.viewerCanBlockFromOrg=!0,e.viewerCanUnblockFromOrg=!1)}))}},t[0]=n,t[1]=e):e=t[1],(0,N.n)(e)}();eE[34]!==tM?(X=(e,t)=>tM({organizationLogin:e,userLogin:t},{onError:()=>t_("Failed to unblock user")}),eE[34]=tM,eE[35]=X):X=eE[35];let tF=X,{mutate:tB}=(0,E.u)(eV,eB);eE[36]!==ti||eE[37]!==eP.databaseId||eE[38]!==tB||eE[39]!==eY?(J=(e,t)=>{if(!eP.databaseId)throw Error("Comment not found");setTimeout(()=>tN.current?.focus(),0),tB({commentDatabaseId:eP.databaseId,threadId:eY,reaction:e,viewerHasReacted:t},{onError:()=>{tf(!1),ti({type:"error",message:"Failed to react to comment"})}})},eE[36]=ti,eE[37]=eP.databaseId,eE[38]=tB,eE[39]=eY,eE[40]=J):J=eE[40];let tH=J;eE[41]===Symbol.for("react.memo_cache_sentinel")?(Q=()=>{ta(!0)},eE[41]=Q):Q=eE[41];let tP=Q;eE[42]!==eP.body||eE[43]!==tL?(Y=()=>{ta(!1),tL(),tu(eP.body)},eE[42]=eP.body,eE[43]=tL,eE[44]=Y):Y=eE[44];let tK=Y;eE[45]!==ty?(Z=e=>{ty({text:e}),tu(e),tb(void 0)},eE[45]=ty,eE[46]=Z):Z=eE[46];let tU=Z;eE[47]!==tL?(ee=()=>{ta(!1),tf(!1),tL()},eE[47]=tL,eE[48]=ee):ee=eE[48],eE[49]!==eV||eE[50]!==eB||eE[51]!==ee?(et={filePath:eV,lineMarkersKey:eB,onSuccess:ee},eE[49]=eV,eE[50]=eB,eE[51]=ee,eE[52]=et):et=eE[52];let{mutate:tV}=function(e){let t,n,i,a=(0,r.c)(10),{filePath:l,lineMarkersKey:o,onSuccess:s}=e,d=(0,w.Kp)(),c=`${d}/page_data/${A.uT.updateReviewComment}`,{updateThreadComment:u}=(0,w.an)();return a[0]!==c?(t=async e=>{let{commentId:t,bodyVersion:n,body:i}=e,r=await (0,j.q$)(`${c}${n?`?body_version=${n}`:""}`,{method:"PUT",body:{body:i,commentId:t}}),a=await (0,j.hp)(r);return(0,j.R)(r,a),a},a[0]=c,a[1]=t):t=a[1],a[2]!==l||a[3]!==o||a[4]!==s||a[5]!==u?(n=e=>{u({threadID:e.threadId,filePath:l,lineMarkersKey:o,match:t=>t.databaseId===e.commentDatabaseId,transform:t=>{if(t)return{...t,body:e.body,bodyHTML:e.bodyHTML,bodyVersion:e.bodyVersion}}}),s?.()},a[2]=l,a[3]=o,a[4]=s,a[5]=u,a[6]=n):n=a[6],a[7]!==t||a[8]!==n?(i={mutationFn:t,onSuccess:n},a[7]=t,a[8]=n,a[9]=i):i=a[9],(0,N.n)(i)}(et);eE[53]!==ti||eE[54]!==tc||eE[55]!==eP.bodyVersion||eE[56]!==eP.databaseId||eE[57]!==e1?.sourceContentFromDiffLines||eE[58]!==tV?(en=()=>{tf(!0);let e=(0,B.u)(tc,e1?.sourceContentFromDiffLines??"");if(!e.isValid){tb(e.errorMessage),tf(!1);return}tV({commentId:String(eP.databaseId),body:tc,bodyVersion:eP.bodyVersion},{onError:()=>{tf(!1),ti({type:"error",message:"Failed to update comment"})}})},eE[53]=ti,eE[54]=tc,eE[55]=eP.bodyVersion,eE[56]=eP.databaseId,eE[57]=e1?.sourceContentFromDiffLines,eE[58]=tV,eE[59]=en):en=eE[59],e1?.sourceContentFromDiffLines;let tz=en;eE[60]!==eP.databaseId?(eo=eP.databaseId?.toString(),eE[60]=eP.databaseId,eE[61]=eo):eo=eE[61];let tq=eo,tG=tq?`${void 0===eH?"r":eH}${tq}`:void 0;eE[62]!==tG?(ed=tG&&h.fV?new URL(`${h.fV.pathname}#${tG}`,h.fV.origin).toString():"",eE[62]=tG,eE[63]=ed):ed=eE[63];let tW=ed,tX=(0,x.useRef)(null);eE[64]!==tG||eE[65]!==tq||eE[66]!==e7?(ec={isAnchorable:e7,commentId:tq,commentAnchor:tG,containerRef:tX},eE[64]=tG,eE[65]=tq,eE[66]=e7,eE[67]=ec):ec=eE[67],(0,M.u)(ec);let tJ=e8>0,tQ=e8>1,tY=tr?"editing":tl?"hidden":"visible";eE[68]!==tn?(eu={as:tn},eE[68]=tn,eE[69]=eu):eu=eE[69];let tZ=eu,t1=eP.author?.avatarUrl??tt.avatarUrl,t0=eP.reference.text??`#${eP.reference.number}`;eE[70]!==eP||eE[71]!==tW||eE[72]!==t0?(em={...eP,url:tW,referenceText:t0},eE[70]=eP,eE[71]=tW,eE[72]=t0,eE[73]=em):em=eE[73];let t2=eP.author?.login??tt.login,t3=eP.reference?.author?.login??"",t4="copilot"===eP.reviewVariantType?"copilot-pull-request-reviewer":void 0,t5="copilot"===eP.reviewVariantType?l.S.Bot:void 0;eE[74]!==eq||eE[75]!==tl||eE[76]!==eM||eE[77]!==tJ||eE[78]!==t$||eE[79]!==tj||eE[80]!==tE||eE[81]!==te||eE[82]!==tF||eE[83]!==tT||eE[84]!==e4||eE[85]!==tZ||eE[86]!==t1||eE[87]!==em||eE[88]!==t2||eE[89]!==t3||eE[90]!==t4||eE[91]!==t5?(ef={headingProps:tZ,avatarUrl:t1,comment:em,commentRef:tX,deleteComment:tj,editComment:tP,editHistoryComponent:void 0,hideComment:tE,onBlock:t$,onUnblock:tF,onMinimize:to,onSuccessfulBlock:es,isMinimized:tl,commentAuthorLogin:t2,navigate:u.l,commentSubjectAuthorLogin:t3,commentSubjectType:"pull request",onReplySelect:te,unhideComment:tT,hideActions:eq,isReply:tJ,forceInlineAvatar:!0,noContainerStyles:!0,originalDiffPathUri:e4,isOutdated:eM,commentAuthorSlug:t4,commentAuthorType:t5},eE[74]=eq,eE[75]=tl,eE[76]=eM,eE[77]=tJ,eE[78]=t$,eE[79]=tj,eE[80]=tE,eE[81]=te,eE[82]=tF,eE[83]=tT,eE[84]=e4,eE[85]=tZ,eE[86]=t1,eE[87]=em,eE[88]=t2,eE[89]=t3,eE[90]=t4,eE[91]=t5,eE[92]=ef):ef=eE[92];let t6=ef;eE[93]!==e8||eE[94]!==tJ||eE[95]!==eZ?(eh=()=>tJ?void 0!==eZ?`Reply ${e8} to Comment ${eZ}`:`Reply ${e8}`:void 0!==eZ?`Comment ${eZ}`:"Comment",eE[93]=e8,eE[94]=tJ,eE[95]=eZ,eE[96]=eh):eh=eE[96];let t7=eh;eE[97]!==eP.body||eE[98]!==tr||eE[99]!==te?(eg=()=>{if(tr)return;let e=h.cg?.getSelection(),t=e?.anchorNode?{anchorNode:e.anchorNode,range:e.getRangeAt(0)}:null;te((0,el.E)(tX?.current,t,eP.body))},eE[97]=eP.body,eE[98]=tr,eE[99]=te,eE[100]=eg):eg=eE[100];let t8=eg;eE[101]===Symbol.for("react.memo_cache_sentinel")?(ep=(0,er.E7)(),eE[101]=ep):ep=eE[101];let t9=ep;eE[102]!==t8?(eb={"pull-requests-diff-view:quote-reply":t8},eE[102]=t8,eE[103]=eb):eb=eE[103];let ne=e7?tG:void 0,nt=eO?eW?0:-1:0,nn=eP.id;eE[104]!==t7||eE[105]!==eW?(ev=eW?{role:"document","aria-roledescription":"comment","aria-label":t7()}:{},eE[104]=t7,eE[105]=eW,eE[106]=ev):ev=eE[106];let ni=e7&&"ReviewThreadComment-module__anchorable__kHiVn",nr="hidden"===tY&&"pb-2",na=tJ&&"ReviewThreadComment-module__isReply__tjdPF";return eE[107]!==ni||eE[108]!==nr||eE[109]!==na?(eC=(0,L.$)("ReviewThreadComment-module__ReviewThreadContainer__m2xlo",ni,nr,na),eE[107]=ni,eE[108]=nr,eE[109]=na,eE[110]=eC):eC=eE[110],eE[111]!==tQ||eE[112]!==tJ?(ey=tQ&&(0,i.jsx)("div",{className:P,"data-is-reply":tJ,children:(0,i.jsx)("div",{className:"ReviewThreadComment-module__ReviewThreadBox__sr89I"})}),eE[111]=tQ,eE[112]=tJ,eE[113]=ey):ey=eE[113],eE[114]!==tv||eE[115]!==eP.reviewVariantType?(eL="code_scanning"===eP.reviewVariantType&&(0,c.G7)("code_scanning_dfa_degraded_experience_notice")&&(0,i.jsx)(b.l,{variant:"info",hideTitle:!0,title:"Code scanning notice",className:"mt-2 tmp-mb-3",children:(0,i.jsxs)(b.l.Description,{children:[(0,i.jsx)(v.A,{inline:!0,href:tv,children:"View in Conversation tab"})," ","for the full code scanning experience."]})}),eE[114]=tv,eE[115]=eP.reviewVariantType,eE[116]=eL):eL=eE[116],eE[117]!==t6||eE[118]!==eq?(ex=eq?void 0:(0,i.jsx)($.RelayEnvironmentProvider,{environment:t9,children:(0,i.jsx)(o.p,{...t6})}),eE[117]=t6,eE[118]=eq,eE[119]=ex):ex=eE[119],eE[120]!==eP.body||eE[121]!==t6||eE[122]!==eW||eE[123]!==eM||eE[124]!==ex||eE[125]!==eQ||eE[126]!==e6?(eS=(0,i.jsx)(l.v,{...t6,commentBody:eP.body,threadCommentCount:eQ,isInDialogMode:eW,actions:ex,isOutdated:eM,tooltipDirection:e6}),eE[120]=eP.body,eE[121]=t6,eE[122]=eW,eE[123]=eM,eE[124]=ex,eE[125]=eQ,eE[126]=e6,eE[127]=eS):eS=eE[127],eE[128]!==tQ||eE[129]!==eL||eE[130]!==eS?(eN=(0,i.jsxs)("div",{className:"ReviewThreadComment-module__ReviewThreadInnerContainer__ONuV_","data-is-nested-reply":tQ,children:[eL,eS]}),eE[128]=tQ,eE[129]=eL,eE[130]=eS,eE[131]=eN):eN=eE[131],eE[132]!==tw?(ew=tw&&(0,i.jsxs)(C.A,{variant:"danger",className:"tmp-m-3",children:[(0,i.jsx)(p.StopIcon,{className:"mr-2"}),tw]}),eE[132]=tw,eE[133]=ew):ew=eE[133],eE[134]!==e$||eE[135]!==tJ?(e_=tJ&&(0,i.jsx)("div",{className:"ReviewThreadComment-module__ReplyWrapper__HaO4j","data-is-last-child":e$}),eE[134]=e$,eE[135]=tJ,eE[136]=e_):e_=eE[136],eE[137]!==tc||eE[138]!==tY||eE[139]!==tp||eE[140]!==tJ||eE[141]!==tm||eE[142]!==tK||eE[143]!==tU||eE[144]!==tz||eE[145]!==e1?(eD="editing"===tY&&(0,i.jsx)("div",{className:(0,L.$)("flex-1 min-width-0 pr-2 pt-1 pb-2",tJ?"pl-0":"pl-2"),children:(0,i.jsxs)(H.S,{ref:tx,label:"Update comment",value:tc,onChange:tU,onPrimaryAction:tz,suggestedChangesConfig:e1,markdownErrorMessage:tp,children:[(0,i.jsx)(a.xR,{variant:"default",onClick:tK,children:"Cancel"}),(0,i.jsx)(a.xR,{disabled:tm||!tc.length,loading:tm,variant:"primary",onClick:tz,children:"Update"})]})}),eE[137]=tc,eE[138]=tY,eE[139]=tp,eE[140]=tJ,eE[141]=tm,eE[142]=tK,eE[143]=tU,eE[144]=tz,eE[145]=e1,eE[146]=eD):eD=eE[146],eE[147]!==e0||eE[148]!==eP||eE[149]!==tY||eE[150]!==ts||eE[151]!==eV||eE[152]!==tk||eE[153]!==th||eE[154]!==eM||eE[155]!==tJ||eE[156]!==eF||eE[157]!==tH||eE[158]!==e1||eE[159]!==e2?.viewerCanApplySuggestion?(eI="visible"===tY&&(0,i.jsxs)("div",{className:"ReviewThreadComment-module__BodyHTMLContainer__HYeiL","data-is-reply":tJ,children:[eP.bodyHTML&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(f.$6,{ref:tS,className:(0,L.$)("markdown-body","ReviewThreadComment-module__SafeHTMLBox__yw3LK","ReviewThreadComment-module__SafeHTMLBoxWrapped__mvCwc"),"comment-testid":`Comment body html for comment ${eP.id}`,html:eP.bodyHTML}),"copilot"===eP.reviewVariantType&&(0,i.jsxs)("p",{className:"text-small color-fg-muted mt-2 mb-1",children:[(0,i.jsx)("a",{target:"_blank",rel:"noopener noreferrer",className:"Link--inTextBlock",href:"https://docs.github.com/en/copilot/responsible-use-of-github-copilot-features/responsible-use-of-github-copilot-code-review",children:"Copilot"})," ","uses AI. Check for mistakes."]}),(0,i.jsxs)("div",{className:"d-flex flex-direction-column gap-2",children:["copilot"===eP.reviewVariantType&&(0,i.jsx)("div",{className:"mt-2",children:(0,i.jsx)(d.Z,{commentUrl:eP.url,commentId:eP.databaseId?.toString()??"",showNegativeFeedbackModal:!1})}),eP.reactionGroups&&(0,i.jsx)("div",{className:"d-flex flex-direction-column mt-2",children:(0,i.jsx)(m.P,{ref:tN,reactionGroups:eP.reactionGroups,onReact:tH,canReact:eP.viewerCanReact})})]}),e0&&(0,i.jsx)(ei,{comment:eP,commentBodyRef:tS,filePath:eV,isOutdated:eM,isThreadResolved:eF,databaseId:eP.databaseId,suggestedChangesConfig:e1,applySuggestedChangesValidationData:e0,viewerCanApplySuggestion:e2?.viewerCanApplySuggestion})]}),ts&&(0,i.jsx)(y.K,{title:"Delete comment?",confirmButtonContent:"Delete",confirmButtonType:"danger",confirmButtonLoading:th,onClose:tk,children:"Are you sure you want to delete this comment?"})]}),eE[147]=e0,eE[148]=eP,eE[149]=tY,eE[150]=ts,eE[151]=eV,eE[152]=tk,eE[153]=th,eE[154]=eM,eE[155]=tJ,eE[156]=eF,eE[157]=tH,eE[158]=e1,eE[159]=e2?.viewerCanApplySuggestion,eE[160]=eI):eI=eE[160],eE[161]!==tJ||eE[162]!==e_||eE[163]!==eD||eE[164]!==eI?(ej=(0,i.jsxs)("div",{className:P,"data-is-reply":tJ,children:[e_,eD,eI]}),eE[161]=tJ,eE[162]=e_,eE[163]=eD,eE[164]=eI,eE[165]=ej):ej=eE[165],eE[166]!==eP.id||eE[167]!==e9||eE[168]!==ne||eE[169]!==nt||eE[170]!==ev||eE[171]!==eC||eE[172]!==ey||eE[173]!==eN||eE[174]!==ew||eE[175]!==ej||eE[176]!==eY?(ek=(0,i.jsxs)("div",{ref:tX,id:ne,tabIndex:nt,"data-first-thread-comment":e9,"data-marker-navigation-comment-thread-id":eY,"data-marker-navigation-comment-id":nn,...ev,className:eC,children:[ey,eN,ew,ej]}),eE[166]=eP.id,eE[167]=e9,eE[168]=ne,eE[169]=nt,eE[170]=ev,eE[171]=eC,eE[172]=ey,eE[173]=eN,eE[174]=ew,eE[175]=ej,eE[176]=eY,eE[177]=ek):ek=eE[177],eE[178]!==eb||eE[179]!==ek?(eA=(0,i.jsx)(ea.tL,{commands:eb,children:ek}),eE[178]=eb,eE[179]=ek,eE[180]=eA):eA=eE[180],eA}function es(){setTimeout(ed,800)}function ed(){return h.cg?.location.reload()}eo.displayName="ReviewThreadComment"},79134(e,t,n){n.d(t,{W:()=>s,j:()=>o});var i=n(74848),r=n(16522),a=n(96540);let l=(0,a.createContext)({});function o(e){let t,n,o=(0,r.c)(5),{children:s}=e,[d,c]=(0,a.useState)(!1);o[0]!==d?(t={isDialogOpen:d,setIsDialogOpen:c},o[0]=d,o[1]=t):t=o[1];let u=t;return o[2]!==s||o[3]!==u?(n=(0,i.jsx)(l,{value:u,children:s}),o[2]=s,o[3]=u,o[4]=n):n=o[4],n}l.displayName="DialogStateContext",o.displayName="DialogStateProvider";let s=()=>(0,a.use)(l)},31907(e,t,n){n.d(t,{Yf:()=>_.Yf,oO:()=>iZ,Ao:()=>iY});var i=n(74848),r=n(16522),a=n(18813),l=n(96540),o=n(15019),s=n(206),d=n(38621),c=n(46249),u=n(26108),m=n(56341);function f(e,t="r"){(0,m.Zu)(`#${t}${e}`)}var h=n(94781),g=n(26316),p=n(70887),b=n(34164),v=n(32371),C=n(56392),y=n(6021),L=n(70503),x=n(71323),S=n(97283),N=n(87134),w=n(58989),_=n(31256);function D({selectedLineRange:e,leftLines:t,rightLines:n}){let i=!!n,{startOrientation:r,endOrientation:a}=e,l=c(r).findIndex(t=>(0,_.a2)(t,e.startLineNumber,e.startOrientation)),o=c(a).findIndex(t=>(0,_.a2)(t,e.endLineNumber,e.endOrientation)),s=l>=0&&o>=0;function d(e){if(!s||(0,_.Po)(e))return!1;let t=c((0,w.XU)(e.type)).indexOf(e);return t>=l&&t<=o}function c(e){var r;return i&&"left"!==("string"==typeof(r=e)?r:(0,w.XU)(r.type))?n:t}let u=c("left").filter(e=>d(e));return{selectedRightLines:c("right").filter(e=>d(e)),selectedLeftLines:u}}var I=n(27426),j=n(35205);let k=/^b:\d+-l:(?:\d+|null)-r:(?:\d+|null)$/;function A(e){return null!=e&&k.test(e)}function E({diffAnchor:e,diffLines:t,isSplitView:n,lineRange:i}){let r,a=new Set([]);if(0===t.length)return{selectedLineKeys:a};if(!i)return{selectedLineKeys:new Set([])};let{startLineNumber:l,startOrientation:o,endLineNumber:s,endOrientation:d}=i,c=t;if(n){let e=(0,_.Mk)(t);c=e.leftLines,r=e.rightLines}let u={diffAnchor:e,endLineNumber:s??l,endOrientation:d??o,startLineNumber:l,startOrientation:o},m=D({selectedLineRange:u,leftLines:c,rightLines:r});for(let e=0;e{let n=(0,l.useRef)(null),r=(0,l.useRef)(t.diffLines),a=(0,l.useRef)(t.isSplitView),o=(0,l.useRef)(t.hiddenFeatures);return n.current||(n.current=H({...t})),(0,l.useEffect)(()=>{n.current&&r.current.length!==t.diffLines.length&&(n.current.getState().diffLinesSliceUpdates.updateDiffLinesHash(t.diffLines),n.current.setState({storedCommentsMap:t.storedCommentsMap}),r.current=t.diffLines)},[t,t.diffLines]),(0,l.useEffect)(()=>{n.current&&a.current!==t.isSplitView&&(n.current.getState().diffLinesSliceUpdates.updateDiffView(t.isSplitView),a.current=t.isSplitView)},[t,t.isSplitView]),(0,l.useEffect)(()=>{n.current&&!function(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}(o.current,t.hiddenFeatures)&&(n.current.setState({hiddenFeatures:t.hiddenFeatures}),o.current=t.hiddenFeatures)},[t,t.hiddenFeatures]),(0,i.jsx)(M,{value:n.current,children:e})};B.displayName="DiffStoreProvider";let H=e=>(0,S.y)()((0,N.lt)((...t)=>({...(e=>({dialogMode:{activeGridCellId:null},dialogModeActions:{enableDialogMode:t=>e(()=>({dialogMode:{activeGridCellId:t}}),void 0,"dialogMode#enabled"),disableDialogMode:()=>e(()=>({dialogMode:{activeGridCellId:null}}),void 0,"dialogMode#disabled")}}))(...t),...(({diffAnchor:e,path:t,diffLines:n,fileLineCount:i,isSplitView:r})=>(a,l)=>{let o=n.reduce((e,t)=>(t.key&&(e[t.key]=t),e),{}),{selectedLineKeys:s,selectedLineRange:d,startOrientation:c}=E({diffAnchor:e,diffLines:n,isSplitView:r,lineRange:function(e){let t=(0,I.EW)(g.fV.hash);if(!t||t[1]!==e)return;let n=t[2]?"L"===t[2]?"left":"right":void 0,i=t[3]?parseInt(t[3]):void 0,r=t[4]?"L"===t[4]?"left":"right":void 0,a=t[5]?parseInt(t[5]):void 0;if(n&&i)return{diffAnchor:e,endOrientation:r??n,endLineNumber:a??i,startOrientation:n,startLineNumber:i}}(e)}),u=T(s),m=R(s),f=n.reduce((e,t)=>{let n=t.key;return n&&s.has(n)&&(e[n]={isSelected:!0,isFirstSelected:u===n,isLastSelected:m===n}),e},{}),h=null;if(u){let e=o[u];if(e&&e.key&&c){let t="left"===c?e.left:e.right;t&&(h={lineNumber:t,orientation:c,shouldStartConversation:!1,lineKey:e.key})}}return{diffLines:{diffAnchor:e,_diffLines:n,_diffLinesHash:o,selectedLinesInfo:f,fileLineCount:i,firstLineSelectionOnDrag:h,_firstSelectedLineInfo:h?{lineKey:h.lineKey,lineNumber:h.lineNumber,orientation:h.orientation}:null,allSelectedLinesAreRetargetable:()=>{let e=!1;for(let t of l().diffLines.selectedLineKeys){let n=l().diffLines._diffLinesHash[t];if(n&&!(0,_.xB)(n)){e=!0;break}}return!e},getDiffLinesInfo:()=>l().diffLines._diffLines,getSplitDiffLinesFromLineRange:e=>{let t=(0,_.Mk)(l().diffLines._diffLines);return D({selectedLineRange:e,leftLines:t.leftLines,rightLines:t.rightLines})},getSelectedDiffLines:()=>{let e=[];for(let t of l().diffLines.selectedLineKeys){let n=l().diffLines._diffLinesHash[t];n&&e.push(n)}return e},getfirstLineSelectionOnDrag:()=>l().diffLines.firstLineSelectionOnDrag,getIsDraggingFromAddCommentButton:()=>l().diffLines.isDraggingFromAddCommentButton,getSelectedLineRange:()=>l().diffLines.selectedLineRange,hasSelectedLines:()=>l().diffLines.selectedLineKeys.size>0,isDraggingFromAddCommentButton:!1,isSplitView:r,selectedLineKeys:s,selectedLineRange:d},diffLinesSliceUpdates:{updateDiffLinesHash:e=>{let t=e.reduce((e,t)=>(t.key&&(e[t.key]=t),e),{});a(n=>({diffLines:{...n.diffLines,_diffLines:e,_diffLinesHash:t}}),void 0,"updateDiffLines")},updateDiffView:e=>a(t=>({diffLines:{...t.diffLines,isSplitView:e}}),void 0,"update diff view settings")},diffLinesActions:{clearFirstLineSelectionOnDrag:()=>a(e=>({diffLines:{...e.diffLines,firstLineSelectionOnDrag:null,isDraggingFromAddCommentButton:!1}}),void 0,"clearFirstLineSelectionOnDrag"),setIsDraggingFromAddCommentButton:e=>a(t=>({diffLines:{...t.diffLines,isDraggingFromAddCommentButton:e}}),void 0,`setIsDraggingFromAddCommentButton:${e}`),addLineToSelection:({lineKey:n,orientation:i},r)=>{let o;if(!n)return;let s=l().diffLines._diffLinesHash[n];if(!s)return;let d=l().diffLines.firstLineSelectionOnDrag,c=l().diffLines._firstSelectedLineInfo,u=l().diffLines.selectedLineRange;if(d&&n===d.lineKey||!u){let e="right"===i?s.right:s.left;if(!e)return;l().diffLinesActions.selectLine({lineKey:n,firstLineSelectionOnDrag:{lineNumber:e,orientation:i,lineKey:n,shouldStartConversation:!1}},r);return}if(!c)return;o=!function({current:e,currentOrientation:t,previous:n,previousOrientation:i}){return!!n&&("left"===i&&"left"===t&&!!e.left&&!!n.left&&n.left>e.left||"right"===i&&"right"===t&&!!e.right&&!!n.right&&n.right>e.right||"right"===i&&"left"===t&&!!e.right&&!!n.right&&n.right>e.right||"left"===i&&"right"===t&&!!e.left&&!!n.left&&n.left>e.left||!1)}({current:s,currentOrientation:i,previous:l().diffLines._diffLinesHash[c.lineKey],previousOrientation:c.orientation})?{...u,startLineNumber:c.lineNumber,startOrientation:c.orientation,endLineNumber:("left"===i?s?.left:s?.right)??-1,endOrientation:i}:{...u,startLineNumber:("left"===i?s?.left:s?.right)??-1,startOrientation:i,endLineNumber:c.lineNumber,endOrientation:c.orientation};let{selectedLineKeys:m,selectedLineRange:f}=E({diffAnchor:e,diffLines:l().diffLines._diffLines,isSplitView:l().diffLines.isSplitView,lineRange:o}),h=T(m),p=R(m),b=Array.from(m).reduce((e,t)=>(e[t]={isFirstSelected:t===h,isLastSelected:t===p,isSelected:!0},e),{});if(!f?.endLineNumber||!f?.startLineNumber)return;let v=new $.J(f,t);g.cg?.dispatchEvent(v),a(e=>({diffLines:{...e.diffLines,selectedLineKeys:m,selectedLinesInfo:b,selectedLineRange:f}}),void 0,"addLineToSelection"),r(f)},clearSelectedLines:()=>{a(e=>({diffLines:{...e.diffLines,firstLineSelectionOnDrag:null,selectedLineKeys:new Set([]),selectedLinesInfo:{},selectedLineRange:void 0,_firstSelectedLineInfo:null}}),void 0,"clearSelectedLines")},selectLine:({lineKey:e,firstLineSelectionOnDrag:n},i)=>{if(!e)return;let r=l().diffLines._diffLinesHash[e];if(!r)return;let o={[e]:{isFirstSelected:!0,isLastSelected:!0,isSelected:!0}},s="left"===n.orientation?r.left:r.right;if(!s)return;let d={diffAnchor:l().diffLines.diffAnchor,endLineNumber:s,endOrientation:n.orientation,startLineNumber:s,startOrientation:n.orientation},c=new $.J(d,t);g.cg?.dispatchEvent(c),a(t=>({diffLines:{...t.diffLines,firstLineSelectionOnDrag:{...n,lineKey:e},selectedLineKeys:new Set([e]),selectedLinesInfo:o,selectedLineRange:d,_firstSelectedLineInfo:{lineKey:e,lineNumber:n.lineNumber,orientation:n.orientation}}}),void 0,"selectLine"),i(d)},selectMultipleLines:({startLineKey:n,endLineKey:i,startOrientation:r,endOrientation:o,firstLineSelectionOnDrag:s},d)=>{if(!n||!i||!s)return;let c=l().diffLines._diffLinesHash[n],u=l().diffLines._diffLinesHash[i];if(!c||!u||!c.left&&!c.right||!u.left&&!u.right)return;let m={diffAnchor:e,endLineNumber:("right"===o?u.right:u.left)??-1,endOrientation:o,startLineNumber:("right"===r?c.right:c.left)??-1,startOrientation:r},{selectedLineKeys:f,selectedLineRange:h}=E({diffAnchor:e,diffLines:l().diffLines._diffLines,isSplitView:l().diffLines.isSplitView,lineRange:m}),p=T(f),b=R(f),v=Array.from(f).reduce((e,t)=>(e[t]={isFirstSelected:t===p,isLastSelected:t===b,isSelected:!0},e),{});if(!h?.endLineNumber||!h?.startLineNumber)return;let C=new $.J(h,t);g.cg?.dispatchEvent(C),a(e=>({diffLines:{...e.diffLines,selectedLinesInfo:v,selectedLineKeys:f,firstLineSelectionOnDrag:s,selectedLineRange:h,_firstSelectedLineInfo:{lineNumber:s.lineNumber,orientation:s.orientation,lineKey:s.lineKey}}}),void 0,"selectMultipleLines"),d(h)}}}})(e)(...t),...(({hiddenFeatures:e})=>()=>({hiddenFeatures:e}))(e)(...t),...(({addInjectedContextLines:e})=>()=>({injectedContextLinesActions:{addInjectedContextLines:e}}))(e)(...t),...(({startNewConversationForLineOrFileMap:e})=>(t,n)=>({startNewConversationForLineOrFileMap:e,getMoveNewCommentDataForLine:e=>n().startNewConversationForLineOrFileMap[e],addStartNewCommentOnLine:(t,n,i)=>{e[t]={diffLineKey:i,startNewComment:n}}}))(e)(...t),...(({newTreeEntry:e,oldTreeEntry:t})=>()=>({treeEntries:{newTreeEntry:e,oldTreeEntry:t}}))(e)(...t),...(({storedCommentsMap:e})=>(t,n)=>({storedCommentsMap:e,getStoredCommentDataForLine:e=>n().storedCommentsMap[e],updateStoredCommentOnLine:(e,i)=>{!i&&n().storedCommentsMap[e]?t(t=>({storedCommentsMap:{...t.storedCommentsMap,[e]:!1}}),void 0,"updateDiffLines"):i&&!n().storedCommentsMap[e]&&(n().storedCommentsMap[e]=!0)}}))(e)(...t),...(e=>({actionBarVisibility:{activeActionBarCellId:null,focusedActionBarCellId:null},showActionBar:t=>e(e=>({actionBarVisibility:{activeActionBarCellId:t,focusedActionBarCellId:e.actionBarVisibility.focusedActionBarCellId}}),void 0,`actionBarVisibility#show:${t}`),hideActionBar:t=>e(e=>e.actionBarVisibility.activeActionBarCellId===t?{actionBarVisibility:{activeActionBarCellId:null,focusedActionBarCellId:e.actionBarVisibility.focusedActionBarCellId}}:e,void 0,`actionBarVisibility#hide:${t}`),hideAllActionBars:()=>e(()=>({actionBarVisibility:{activeActionBarCellId:null,focusedActionBarCellId:null}}),void 0,"actionBarVisibility#hideAll"),setFocusedActionBar:t=>e(e=>({actionBarVisibility:{activeActionBarCellId:e.actionBarVisibility.activeActionBarCellId,focusedActionBarCellId:t}}),void 0,`actionBarVisibility#setFocused:${t}`),clearFocusedActionBar:()=>e(e=>({actionBarVisibility:{activeActionBarCellId:e.actionBarVisibility.activeActionBarCellId,focusedActionBarCellId:null}}),void 0,"actionBarVisibility#clearFocused")}))(...t)}),{name:`diff-store-${e.diffAnchor}`})),P=e=>{let t,n=(0,r.c)(2);return n[0]!==e?(t=t=>!!e&&t.dialogMode.activeGridCellId===e,n[0]=e,n[1]=t):t=n[1],F(t)},K={isSelected:!1,isFirstSelected:!1,isLastSelected:!1},U=e=>{let t,n=(0,r.c)(2);return n[0]!==e?(t=t=>e&&t.diffLines.selectedLinesInfo[e]||K,n[0]=e,n[1]=t):t=n[1],F(t)},V=e=>{let t,n=(0,r.c)(2);return n[0]!==e?(t=t=>t.storedCommentsMap[e],n[0]=e,n[1]=t):t=n[1],F(t)},z=e=>{let t,n=(0,r.c)(2);return n[0]!==e?(t=t=>!!e&&(t.actionBarVisibility.focusedActionBarCellId===e||t.actionBarVisibility.activeActionBarCellId===e),n[0]=e,n[1]=t):t=n[1],F(t)};function q(e){return e.diffLines.getSplitDiffLinesFromLineRange}function G(e){return e.diffLines.getSelectedDiffLines}function W(e){return e.diffLines.getDiffLinesInfo}function X(e){return e.diffLines.getfirstLineSelectionOnDrag}function J(e){return e.diffLines.getSelectedLineRange}function Q(e){return e.diffLines.getIsDraggingFromAddCommentButton}function Y(e){return e.diffLines.hasSelectedLines}function Z(e){return e.hiddenFeatures}function ee(e){return e.dialogModeActions}function et(e){return e.diffLines.diffAnchor}function en(e){return e.diffLines.fileLineCount}function ei(e){return e.diffLinesActions}function er(e){return e.injectedContextLinesActions}function ea(e){return e.treeEntries}function el(e){return e.getMoveNewCommentDataForLine}function eo(e){return e.updateStoredCommentOnLine}function es(e){return e.diffLines.allSelectedLinesAreRetargetable}function ed(e){return e.hideActionBar}function ec(e){return e.showActionBar}function eu(e){return e.setFocusedActionBar}function em(e){return e.clearFocusedActionBar}var ef=n(49481);function eh({diffAnchor:e,endLineNumber:t,endOrientation:n,startLineNumber:i,startOrientation:r}){if(i&&t){var a;(0,I.i8)({diffAnchor:e,endLineNumber:t,endOrientation:n,startLineNumber:i,startOrientation:r}),(a={diffAnchor:e,endLineNumber:t,endOrientation:n,startLineNumber:i,startOrientation:r}).startLineNumber===a.endLineNumber&&a.startOrientation===a.endOrientation?(0,ef.i)(`${"left"===a.startOrientation?"L":"R"}${a.startLineNumber} selected.`):(0,ef.i)(`${"left"===a.startOrientation?"L":"R"}${a.startLineNumber} to ${"left"===a.endOrientation?"L":"R"}${a.endLineNumber} selected.`)}}var eg=n(68938),ep=n(56703);let eb="comment",ev="review";function eC(e){let t,n,a,o,s,d,c,u,m,f,x,S,N,w,D,I,j,k,A,E,R=(0,r.c)(93),{batchingEnabled:T,condensed:O,fileLevelComment:$,filePath:M,focusOnMount:B,isReplying:H,lineNumber:P,onAddComment:K,onCancelComment:U,onPersistedCommentExists:V,quotedText:z,side:q,startLineNumber:G,threadId:W,suggestedChangesConfig:X,commentLineChangeConfig:J}=e,Q=void 0===z?"":z,[Y,Z]=(0,l.useState)(Q),[ee,et]=(0,l.useState)(null),en=(0,l.useRef)(Q),[er,ea]=(0,l.useState)(),el=(0,l.useRef)(null),es=(0,l.useRef)(null),ed=(0,L.it)(),ec=F(eo),eu=(0,l.useRef)(void 0),{selectMultipleLines:em,clearSelectedLines:ef}=F(ei);R[0]===Symbol.for("react.memo_cache_sentinel")?(t=e=>{(0,ep.k)(e??"",100),ea(e)},R[0]=t):t=R[0];let eC=t,ey=null!==ee,eL=(0,L.Kp)(),{persistCommentToStorage:ex,removePersistedCommentFromStorage:eS,persistCommentOnGivenLineToStorage:eN}=(0,v.L4)({diffSide:q,filePath:M,line:P,subjectId:eL,threadId:W,handlePersistedCommentExists:e=>{let{text:t,shouldFocus:n,startLine:i,startSide:r,startLineKey:a,endLineKey:l}=e;if(t){if(Z(t),n&&el.current&&(el.current.focus(),el.current.moveCursorToEnd(),ew({text:t,startLine:i,startSide:r,startLineKey:a,endLineKey:l}),i)){let e="LEFT"===q?"left":"right";em({endLineKey:l,endOrientation:e,startLineKey:a,startOrientation:e,firstLineSelectionOnDrag:{lineKey:a??"b:0-l:0-r:0",lineNumber:P??0,orientation:e,shouldStartConversation:!1}},eh)}V?.()}},fileLevelComment:!!$}),ew=ex;if(R[1]!==Q?(n=()=>{Q!==en.current&&(en.current=Q,Z(Q))},a=[Q],R[1]=Q,R[2]=n,R[3]=a):(n=R[2],a=R[3]),(0,l.useEffect)(n,a),R[4]!==ef||R[5]!==J||R[6]!==Y||R[7]!==M||R[8]!==P||R[9]!==U||R[10]!==eN||R[11]!==eS||R[12]!==em||R[13]!==q?(o=()=>{if(J){if(null!==(0,eg.T)(Y))return void J.setErrorMessage("Changing the line number of a comment with a suggested change is not supported.");if(J.closeLineMovingDialog(),eN({text:Y,givenLineDiffSide:J.diffSide,givenFilePath:M,givenLine:J.endLineNumber,shouldBeFileLevelComment:J.isFileLevelComment,startLine:J.startLineNumber,startLineKey:J.startDiffLineKey,endLineKey:J.endDiffLineKey}),eS(),P!==J.endLineNumber||J.isFileLevelComment)J.startConversationOnNewLine(),U?.(!1);else if(J.endDiffLineKey&&J.startDiffLineKey&&eu.current!==J){eu.current=J;let e="LEFT"===q?"left":"right";em({endLineKey:J.endDiffLineKey,endOrientation:e,startLineKey:J.startDiffLineKey,startOrientation:e,firstLineSelectionOnDrag:{lineKey:J.startDiffLineKey??"b:0-l:0-r:0",lineNumber:P??0,orientation:e,shouldStartConversation:!1}},eh)}else J.startDiffLineKey||ef()}},s=[ef,J,Y,M,P,U,eN,eS,em,q],R[4]=ef,R[5]=J,R[6]=Y,R[7]=M,R[8]=P,R[9]=U,R[10]=eN,R[11]=eS,R[12]=em,R[13]=q,R[14]=o,R[15]=s):(o=R[14],s=R[15]),(0,l.useEffect)(o,s),R[16]!==B?(c=()=>{if(B){let e=setTimeout(()=>{if(g.XC&&g.cg){if(es.current){let e=es.current,t=e.getBoundingClientRect(),n=g.XC?.documentElement.clientHeight||0;if(!(t.top>=0&&t.bottom<=(g.cg?.innerHeight||n))){let i=t.top,r=g.XC?.documentElement.getBoundingClientRect().top||0,a=.6666666666666666*e.clientHeight;g.cg?.scrollTo({top:i-r-.6666666666666666*n+a,behavior:"smooth"})}}el.current&&(el.current.focus(),el.current.moveCursorToEnd())}},100);return()=>{window.clearTimeout(e)}}},d=[B],R[16]=B,R[17]=d,R[18]=c):(d=R[17],c=R[18]),(0,l.useEffect)(c,d),R[19]!==Y||R[20]!==H||R[21]!==ey||R[22]!==P||R[23]!==K||R[24]!==U||R[25]!==eS||R[26]!==q||R[27]!==X?.sourceContentFromDiffLines||R[28]!==ec){let e,t=e=>{let{submitBatch:t,action:n}=e,i="Failed to save comment";if(ey)return;if(!Y.trim())return void eC(`${i}: Body can't be blank`);et(n),ea(void 0),eC(void 0);let r=(0,C.u)(Y,X?.sourceContentFromDiffLines??"");if(!r.isValid){eC(r.errorMessage),ea(r.errorMessage),et(null);return}void 0===P||H||ec((0,_.oH)(P,q??"RIGHT"),!1),K?.({commentText:Y,onCompleted(){et(null),u()},onError(e){et(null),void 0===P||H||ec((0,_.oH)(P,q??"RIGHT"),!0),e.message&&(i=`${i}: ${e.message}`),eC(i)},submitBatch:t})};m=()=>{t({submitBatch:!1,action:ev})},f=()=>{t({submitBatch:!0,action:eb})},R[32]!==H||R[33]!==P||R[34]!==U||R[35]!==eS||R[36]!==q||R[37]!==ec?(e=()=>{void 0===P||H||ec((0,_.oH)(P,q??"RIGHT"),!1),eS(),Z(""),U?.()},R[32]=H,R[33]=P,R[34]=U,R[35]=eS,R[36]=q,R[37]=ec,R[38]=e):e=R[38],u=e,R[19]=Y,R[20]=H,R[21]=ey,R[22]=P,R[23]=K,R[24]=U,R[25]=eS,R[26]=q,R[27]=X?.sourceContentFromDiffLines,R[28]=ec,R[29]=u,R[30]=m,R[31]=f}else u=R[29],m=R[30],f=R[31];R[39]!==H||R[40]!==P||R[41]!==ew||R[42]!==q||R[43]!==G||R[44]!==ec?(x=e=>{eC(void 0),void 0===P||H||ec((0,_.oH)(P,q??"RIGHT"),e.trim().length>0),ew({text:e,startLine:G,startSide:G?q:void 0}),Z(e)},R[39]=H,R[40]=P,R[41]=ew,R[42]=q,R[43]=G,R[44]=ec,R[45]=x):x=R[45];let e_=x;R[46]!==f?(S={"pull-requests-conversations:submit-comment-and-review":f},R[46]=f,R[47]=S):S=R[47],R[48]!==u||R[49]!==Y?(N=e=>{"Escape"!==e.key||Y.trim()?e.stopPropagation():(e.preventDefault(),u())},R[48]=u,R[49]=Y,R[50]=N):N=R[50];let eD=T?m:f,eI=O||H?"AddCommentEditor-module__hideMarkdownFooter__XhAMG":"AddCommentEditor-module__showMarkdownFooter__YwCfZ",ej=H&&"AddCommentEditor-module__isReplying__jv7w0",ek=O&&"AddCommentEditor-module__condensed__LwVFY";return R[51]!==eI||R[52]!==ej||R[53]!==ek?(w=(0,b.$)("AddCommentEditor-module__ConversationCommentBox__qxXdE",eI,ej,ek),R[51]=eI,R[52]=ej,R[53]=ek,R[54]=w):w=R[54],R[55]!==u||R[56]!==U?(D=U&&(0,i.jsx)(h.x,{className:"py-1 px-2",variant:"default",onClick:u,children:"Cancel"}),R[55]=u,R[56]=U,R[57]=D):D=R[57],R[58]!==T||R[59]!==ed||R[60]!==Y||R[61]!==f||R[62]!==H||R[63]!==ey||R[64]!==ee?(I=!ed&&(0,i.jsx)(h.x,{className:"py-1 px-2",variant:T?"default":"primary",onClick:f,ref:es,loading:ee===eb,inactive:ey||0===Y.trim().length,children:H?"Reply":"Comment"}),R[58]=T,R[59]=ed,R[60]=Y,R[61]=f,R[62]=H,R[63]=ey,R[64]=ee,R[65]=I):I=R[65],R[66]!==T||R[67]!==ed||R[68]!==Y||R[69]!==m||R[70]!==ey||R[71]!==ee?(j=T&&(0,i.jsx)(h.x,{className:"py-1 px-2",variant:"primary",onClick:m,loading:ee===ev,inactive:ey||0===Y.trim().length,children:ed?"Add review comment":"Start a review"}),R[66]=T,R[67]=ed,R[68]=Y,R[69]=m,R[70]=ey,R[71]=ee,R[72]=j):j=R[72],R[73]!==Y||R[74]!==er||R[75]!==M||R[76]!==e_||R[77]!==ey||R[78]!==P||R[79]!==G||R[80]!==X||R[81]!==eD||R[82]!==w||R[83]!==D||R[84]!==I||R[85]!==j?(k=(0,i.jsxs)(y.S,{ref:el,label:"Add diff comment",value:Y,onChange:e_,onPrimaryAction:eD,suggestedChangesConfig:X,markdownErrorMessage:er,lineNumber:P,filePath:M,startLineNumber:G,disabled:ey,className:w,children:[D,I,j]}),R[73]=Y,R[74]=er,R[75]=M,R[76]=e_,R[77]=ey,R[78]=P,R[79]=G,R[80]=X,R[81]=eD,R[82]=w,R[83]=D,R[84]=I,R[85]=j,R[86]=k):k=R[86],R[87]!==N||R[88]!==k?(A=(0,i.jsx)("div",{className:"AddCommentEditor-module__AddCommentEditor__SOA0y",onKeyDown:N,children:k}),R[87]=N,R[88]=k,R[89]=A):A=R[89],R[90]!==S||R[91]!==A?(E=(0,i.jsx)(p.tL,{commands:S,children:A}),R[90]=S,R[91]=A,R[92]=E):E=R[92],E}eC.displayName="AddCommentEditor";var ey=n(21373),eL=n(26707),ex=n(15837),eS=n(7624),eN=n(45438),ew=n(38750),e_=n(39816),eD=n(18990);function eI(e){let t,n,a,o,s,c,u=(0,r.c)(25),{ariaLabelId:m,currentLineNumberText:f,setCommentLineChangeConfig:h,baseEndLineNumber:g,diffSide:p,baseStartLineNumber:b}=e,[v,C]=(0,l.useState)(!1);u[0]!==g||u[1]!==b?(t=()=>b&&g?"lineRange":g?"line":"file",u[0]=g,u[1]=b,u[2]=t):t=u[2];let[y,L]=(0,l.useState)(t),[x,S]=(0,l.useState)("LEFT"===p),[N,w]=(0,l.useState)(b?String(b):""),[_,D]=(0,l.useState)(g?String(g):""),[I,j]=(0,l.useState)(""),k=F(el),A=(0,l.useRef)(null);u[3]!==_||u[4]!==k||u[5]!==x||u[6]!==y||u[7]!==h||u[8]!==N?(n=()=>{var e,t,n;let i,r,a=k(eE(x,Number(_),"file"===y)),l=k(eE(x,Number(N),"file"===y)),o=a?.startNewComment,s=a?.diffLineKey,d=l?.diffLineKey;(e="lineRange"===y?N:void 0,t=_,i=Number(e),(Number.isInteger(r=Number(t))&&r>0&&(void 0===e||Number.isInteger(i)&&i>0&&i<=r)||"file"===y)&&o&&s)?h({diffSide:(n={isLeftSide:x,startLineNumber:"lineRange"===y?Number(N):void 0,endDiffLineKey:s,endLineNumber:Number(_),isFileLevelComment:"file"===y,startDiffLineKey:"lineRange"===y?d:void 0,startConversationOnNewLine:o,closeLineMovingDialog:()=>C(!1),setErrorMessage:e=>j(e)}).isLeftSide?"LEFT":"RIGHT",startLineNumber:n.startLineNumber,endLineNumber:n.endLineNumber,isFileLevelComment:n.isFileLevelComment,startDiffLineKey:n.startDiffLineKey,endDiffLineKey:n.endDiffLineKey,setErrorMessage:n.setErrorMessage,startConversationOnNewLine:n.startConversationOnNewLine,closeLineMovingDialog:n.closeLineMovingDialog}):j("Please enter a valid line number or range.")},u[3]=_,u[4]=k,u[5]=x,u[6]=y,u[7]=h,u[8]=N,u[9]=n):n=u[9];let E=n;return u[10]===Symbol.for("react.memo_cache_sentinel")?(a=()=>C(!0),u[10]=a):a=u[10],u[11]!==m||u[12]!==f?(o=(0,i.jsx)(ey.Q,{"aria-labelledby":m,"aria-description":"Select to change location",ref:A,type:"button",size:"small",onClick:a,trailingAction:d.TriangleDownIcon,children:f}),u[11]=m,u[12]=f,u[13]=o):o=u[13],u[14]!==_||u[15]!==I||u[16]!==v||u[17]!==x||u[18]!==y||u[19]!==N||u[20]!==E?(s=v&&(0,i.jsx)(eL.l,{onClose:()=>C(!1),returnFocusRef:A,title:"Add comment on",width:"medium",footerButtons:[{buttonType:"default",content:"Cancel",onClick:()=>{C(!1)}},{buttonType:"primary",content:"Save",onClick:E}],children:(0,i.jsxs)(ex.A,{name:"line-number-selection",onChange:e=>{L(e)},children:[(0,i.jsx)(ex.A.Label,{}),(0,i.jsxs)(eS.A,{children:[(0,i.jsx)(eN.A,{value:"line",defaultChecked:"line"===y}),(0,i.jsx)(eS.A.Label,{children:"Line number"}),"line"===y&&(0,i.jsxs)(eS.A.Caption,{className:"d-flex align-items-center",children:[(0,i.jsx)(eA,{isLeftSelected:x,setIsLeftSelected:S}),(0,i.jsx)(ew.A,{autoComplete:"off",className:"ml-1","aria-label":"Line number",name:"lineNumber",value:_,onChange:e=>D(e.target.value),onKeyDown:e=>{"Enter"===e.key&&E()}})]})]}),(0,i.jsxs)(eS.A,{children:[(0,i.jsx)(eN.A,{value:"lineRange",defaultChecked:"lineRange"===y}),(0,i.jsx)(eS.A.Label,{children:"Line range"}),"lineRange"===y&&(0,i.jsxs)(eS.A.Caption,{className:"d-flex align-items-center",children:[(0,i.jsx)(eA,{isLeftSelected:x,setIsLeftSelected:S}),(0,i.jsx)(ew.A,{autoComplete:"off",className:"ml-1","aria-label":"Line number",name:"lineNumber",value:N,onChange:e=>w(e.target.value),onKeyDown:e=>{"Enter"===e.key&&E()}}),(0,i.jsx)(d.ArrowRightIcon,{className:"mt-2 mx-2"}),(0,i.jsx)(ew.A,{autoComplete:"off",className:"ml-1","aria-label":"Line number",name:"lineNumber",value:_,onChange:e=>D(e.target.value),onKeyDown:e=>{"Enter"===e.key&&E()}})]})]}),(0,i.jsxs)(eS.A,{children:[(0,i.jsx)(eN.A,{value:"file",defaultChecked:"file"===y}),(0,i.jsx)(eS.A.Label,{children:"File"})]}),I&&(0,i.jsx)(ex.A.Validation,{variant:"error",children:I})]})}),u[14]=_,u[15]=I,u[16]=v,u[17]=x,u[18]=y,u[19]=N,u[20]=E,u[21]=s):s=u[21],u[22]!==o||u[23]!==s?(c=(0,i.jsxs)("div",{className:"ml-1",children:[o,s]}),u[22]=o,u[23]=s,u[24]=c):c=u[24],c}eI.displayName="ChangeCommentLineNumberButton";let ej="Left (L)",ek="Right (R)";function eA(e){let t,n,a,l,o,s=(0,r.c)(12),{isLeftSelected:d,setIsLeftSelected:c}=e,u=d?ej:ek;return s[0]!==u?(t=(0,i.jsx)(e_.W.Button,{children:u}),s[0]=u,s[1]=t):t=s[1],s[2]!==c?(n=(0,i.jsx)(eD.l.Item,{onSelect:()=>{c(!0)},children:ej}),s[2]=c,s[3]=n):n=s[3],s[4]!==c?(a=(0,i.jsx)(eD.l.Item,{onSelect:()=>{c(!1)},children:ek}),s[4]=c,s[5]=a):a=s[5],s[6]!==n||s[7]!==a?(l=(0,i.jsx)(e_.W.Overlay,{children:(0,i.jsxs)(eD.l,{children:[n,a]})}),s[6]=n,s[7]=a,s[8]=l):l=s[8],s[9]!==t||s[10]!==l?(o=(0,i.jsxs)(e_.W,{children:[t,l]}),s[9]=t,s[10]=l,s[11]=o):o=s[11],o}function eE(e,t,n){return n?"F0":`${e?"L":"R"}${t}`}eA.displayName="MoveCommentLineNumberDropdown";var eR=n(6877);function eT(e){let t,n,a,o,m,h,g,p,b,v,C,y,L,x,S,N,w,_,D,I,j,k=(0,r.c)(56);if(k[0]!==e){let{addCommentDialogTitle:i,isLeftSide:r,fileLevelComment:l,filePath:s,focusOnMount:d,lineNumber:c,onAddComment:u,onClose:f,viewerData:y,threadsConnectionId:L,showOnCloseIcon:x,...S}=e;t=i,o=r,n=l,a=s,b=d,m=c,h=u,g=f,C=y,v=x,p=S,k[0]=e,k[1]=t,k[2]=n,k[3]=a,k[4]=o,k[5]=m,k[6]=h,k[7]=g,k[8]=p,k[9]=b,k[10]=v,k[11]=C}else t=k[1],n=k[2],a=k[3],o=k[4],m=k[5],h=k[6],g=k[7],p=k[8],b=k[9],v=k[10],C=k[11];let A=void 0===b||b,E=void 0===v||v,[R,T]=(0,l.useState)(void 0),O=(0,eR.u)("move_new_comments_ui")&&!1,{disableDialogMode:$}=F(ee);k[12]!==h?(y=e=>{let{commentText:t,onCompleted:n,onError:i,submitBatch:r}=e;h({text:t,onError:i,onCompleted:(e,t)=>{t&&f(t.toString()),n?.(e,t)},submitBatch:r})},k[12]=h,k[13]=y):y=k[13];let M=y;k[14]!==$||k[15]!==g?(L=()=>{g?.(),$()},k[14]=$,k[15]=g,k[16]=L):L=k[16];let B=L,H=`diff-comment-positioning-${(0,l.useId)()}`,P=C.avatarUrl||"";k[17]!==P||k[18]!==C.login?(x=(0,i.jsx)(s.r,{alt:C.login,size:24,src:P,className:"mr-2"}),k[17]=P,k[18]=C.login,k[19]=x):x=k[19],k[20]!==t||k[21]!==n||k[22]!==O?(S=!O&&(n?(0,i.jsx)(i.Fragment,{children:"Add comment on file"}):(0,i.jsx)("span",{children:t?`Add a comment on ${t}`:"Add a comment"})),k[20]=t,k[21]=n,k[22]=O,k[23]=S):S=k[23],k[24]!==t||k[25]!==H||k[26]!==n||k[27]!==o||k[28]!==m||k[29]!==O||k[30]!==p?(N=O&&(0,i.jsxs)("div",{className:"d-flex flex-items-center",id:H,children:[(0,i.jsxs)("div",{className:"pt-1",children:["Add ",n?"":"a"," comment on "]}),(0,i.jsx)(eI,{ariaLabelId:H,currentLineNumberText:n?"file":t??"",baseEndLineNumber:m,baseStartLineNumber:p.startLineNumber,diffSide:o?"LEFT":"RIGHT",setCommentLineChangeConfig:T})]}),k[24]=t,k[25]=H,k[26]=n,k[27]=o,k[28]=m,k[29]=O,k[30]=p,k[31]=N):N=k[31],k[32]!==x||k[33]!==S||k[34]!==N?(w=(0,i.jsxs)(c.A,{as:"h4",className:"f5 ml-1 pt-1 pb-2 d-flex",children:[x,S,N]}),k[32]=x,k[33]=S,k[34]=N,k[35]=w):w=k[35],k[36]!==g||k[37]!==B||k[38]!==E?(_=g&&E&&(0,i.jsx)(u.K,{variant:"invisible",icon:d.XIcon,onClick:B,"aria-label":"Cancel"}),k[36]=g,k[37]=B,k[38]=E,k[39]=_):_=k[39],k[40]!==_||k[41]!==w?(D=(0,i.jsxs)("div",{className:"d-flex flex-justify-between flex-items-center",children:[w,_]}),k[40]=_,k[41]=w,k[42]=D):D=k[42];let K=n??!1,U=o?"LEFT":"RIGHT";return k[43]!==R||k[44]!==a||k[45]!==A||k[46]!==M||k[47]!==m||k[48]!==B||k[49]!==p||k[50]!==K||k[51]!==U?(I=(0,i.jsx)(eC,{focusOnMount:A,condensed:!1,fileLevelComment:K,filePath:a,lineNumber:m,onAddComment:M,onCancelComment:B,commentLineChangeConfig:R,side:U,...p}),k[43]=R,k[44]=a,k[45]=A,k[46]=M,k[47]=m,k[48]=B,k[49]=p,k[50]=K,k[51]=U,k[52]=I):I=k[52],k[53]!==D||k[54]!==I?(j=(0,i.jsxs)("div",{className:"px-2 pb-2 pt-1",children:[D,I]}),k[53]=D,k[54]=I,k[55]=j):j=k[55],j}eT.displayName="StartThreadComment";var eO=n(49242),e$=n(40846),eM=n(97286),eF=n(16497),eB=n(7478);function eH(e){let t,n,a,l,o,s,d=(0,r.c)(29),{queryConfig:c,initialData:u}=e;if(u&&(u.proseDiffHtml||u.renderInfo||u.dependencyDiffPath)){let e;d[0]!==u.dependencyDiffPath||d[1]!==u.proseDiffHtml||d[2]!==u.renderInfo?(e={proseDiffHtml:u.proseDiffHtml,renderInfo:u.renderInfo,dependencyDiffPath:u.dependencyDiffPath},d[0]=u.dependencyDiffPath,d[1]=u.proseDiffHtml,d[2]=u.renderInfo,d[3]=e):e=d[3],s=e}let m=c?.key,f=c?.args;d[4]!==m||d[5]!==f?(t=[m,f],d[4]=m,d[5]=f,d[6]=t):t=d[6],d[7]!==c?(n=async()=>await c?.fetcher(c.args)||{},d[7]=c,d[8]=n):n=d[8];let h=!!c;d[9]!==s||d[10]!==t||d[11]!==n||d[12]!==h?(a={queryKey:t,queryFn:n,initialData:s,staleTime:1/0,enabled:h},d[9]=s,d[10]=t,d[11]=n,d[12]=h,d[13]=a):a=d[13];let g=(0,eM.I)(a);d[14]!==s||d[15]!==c||d[16]!==g?(l=c?g:{data:s,isLoading:!1},d[14]=s,d[15]=c,d[16]=g,d[17]=l):l=d[17];let{data:p,isLoading:b}=l;d[18]!==p?(o=p||{},d[18]=p,d[19]=o):o=d[19];let{proseDiffHtml:v,renderInfo:C,dependencyDiffPath:y}=o;if(b){let e;return d[20]===Symbol.for("react.memo_cache_sentinel")?(e=(0,i.jsx)("div",{className:"d-flex flex-justify-center tmp-p-4",children:(0,i.jsx)(eB.A,{size:"large"})}),d[20]=e):e=d[20],e}if(v){let e;return d[21]!==v?(e=(0,i.jsx)("div",{className:"prose-diff position-relative",children:(0,i.jsx)(eF.$6,{html:v})}),d[21]=v,d[22]=e):e=d[22],e}if(C){let e;return d[23]!==C?(e=(0,i.jsx)(eO.default,{...C,viewportClassName:"RichDiff-module__fileRendererViewport__wcmGL",iframeClassName:"RichDiff-module__fileRendererIframe__w06bk"}),d[23]=C,d[24]=e):e=d[24],e}if(y){let e,t;return d[25]===Symbol.for("react.memo_cache_sentinel")?(e=(0,i.jsxs)("div",{className:"text-center tmp-py-3",children:[(0,i.jsx)(eB.A,{size:"medium"}),(0,i.jsx)("p",{className:"color-fg-muted my-2",children:"Loading Dependency Review..."})]}),d[25]=e):e=d[25],d[26]!==y?(t=(0,i.jsx)("div",{children:(0,i.jsx)(e$.x,{src:y,children:e})}),d[26]=y,d[27]=t):t=d[27],t}{let e;return d[28]===Symbol.for("react.memo_cache_sentinel")?(e=(0,i.jsx)("div",{className:"d-flex flex-justify-center tmp-p-4",children:"This rich diff is not supported at the moment."}),d[28]=e):e=d[28],e}}eH.displayName="RichDiff";var eP=n(82845),eK=n(24016),eU=n(56133);function eV(e){let t,n,a,o,s,c,u,m,f,h,g=(0,r.c)(27),{children:p,helpText:v,helpUrl:C,onLoadDiff:y,diffAnchor:L}=e,x=C&&v,[S,N]=(0,l.useState)("initial");g[0]!==y?(t=async()=>{try{N("loading"),await y()}catch{N("error")}},g[0]=y,g[1]=t):t=g[1];let w=t;return g[2]===Symbol.for("react.memo_cache_sentinel")?(n=(0,b.$)("HiddenDiffPatch-module__gridColumnTemplate__o4otv"),g[2]=n):n=g[2],g[3]===Symbol.for("react.memo_cache_sentinel")?(a={maxWidth:"340px"},g[3]=a):a=g[3],g[4]===Symbol.for("react.memo_cache_sentinel")?(o=(0,i.jsx)("svg",{"aria-hidden":!0,height:"84",style:a,viewBox:"0 0 340 84",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)("path",{clipPath:"url(#diff-placeholder)",d:"M0 0h340v84H0z",fillRule:"evenodd",style:{fill:"var(--bgColor-muted, var(--color-canvas-subtle))"}})}),g[4]=o):o=g[4],g[5]!==S?(s="loading"===S&&(0,i.jsx)(eB.A,{size:"medium"}),g[5]=S,g[6]=s):s=g[6],g[7]!==S?(c="error"===S&&(0,i.jsx)(d.AlertIcon,{size:24}),g[7]=S,g[8]=c):c=g[8],g[9]!==S||g[10]!==w?(u="initial"===S&&(0,i.jsx)(ey.Q,{className:"h4 mx-auto fgColor-accent",variant:"invisible",onClick:()=>{w(),N("loading")},children:"Load Diff"}),g[9]=S,g[10]=w,g[11]=u):u=g[11],g[12]!==p||g[13]!==v||g[14]!==C||g[15]!==S||g[16]!==w||g[17]!==x?(m="error"===S?(0,i.jsxs)("span",{className:"fgColor-muted mt-1",children:["The contents of the file couldn't be loaded."," ",(0,i.jsx)(eU.A,{inline:!0,as:"button",onClick:()=>{w(),N("loading")},children:"Retry"})]}):(0,i.jsxs)("span",{className:"fgColor-muted mt-1",children:[p,x&&(0,i.jsx)(eU.A,{inline:!0,href:C,children:v})]}),g[12]=p,g[13]=v,g[14]=C,g[15]=S,g[16]=w,g[17]=x,g[18]=m):m=g[18],g[19]!==s||g[20]!==c||g[21]!==u||g[22]!==m?(f=(0,i.jsxs)("div",{className:n,children:[o," ",(0,i.jsxs)("div",{className:"d-flex flex-justify-center flex-column flex-column text-center flex-items-center",children:[s,c,u,m]})]}),g[19]=s,g[20]=c,g[21]=u,g[22]=m,g[23]=f):f=g[23],g[24]!==L||g[25]!==f?(h=(0,i.jsx)("div",{className:"tmp-px-3 tmp-py-4 fgColor-muted","data-diff-anchor":L,children:f}),g[24]=L,g[25]=f,g[26]=h):h=g[26],h}eV.displayName="HiddenDiffPatch";var ez=n(72609),eq=n(39879);let eG="final-hunk-header-line";function eW(e,t){return e.startBlobLineNumber-t.startBlobLineNumber}function eX(e,t){if("HUNK"===e.type&&e.__id===eG)return{currentHunk:t[t.length-1],previousHunk:t[t.length-2]};let n=t.sort(eW).findIndex(t=>t.startBlobLineNumber<=e.blobLineNumber&&t.endBlobLineNumber>=e.blobLineNumber);return{currentHunk:t[n],nextHunk:t[n+1],previousHunk:t[n-1]}}function eJ(e){let t,n=[],i=0;for(let r=1;r{let t=e.id;return{...e,id:t}}),this.markerComments=e.reduce((e,t)=>{let n=document.querySelectorAll(`[data-marker-navigation-comment-thread-id="${t.id}"]`);if(n){let i=Array.from(n).map(e=>({id:e.getAttribute("data-marker-navigation-comment-id")}));return{...e,[t.id.toString()]:i}}return e},{}),t&&!n){const e=this.markers.findIndex(e=>e.id.toString()===t.toString());-1!==e&&(this.currentMarkerPosition={markerId:t,index:e})}}focusMarker(e){let t=this.markers.findIndex(t=>t.id.toString()===e.toString());-1!==t&&(this.currentMarkerPosition={markerId:e,index:t})}get focusedMarker(){if(this.currentMarkerPosition)return this.markers[this.currentMarkerPosition.index]}moveToFirstComment(e){if(0!==this.markers.length&&!e)return}moveToNextMarker(e,t){let n;if(0===this.markers.length)return;if(t){let e=t.closest("[data-marker-id]"),n=e?.getAttribute("data-marker-id");n&&(this.currentMarkerPosition={markerId:n,index:this.markers.findIndex(e=>e.id.toString()===n.toString())})}if(!this.currentMarkerPosition){let t="ArrowUp"===e?this.markers.length-1:0,n=this.markers[t];if(!n)return;return this.currentMarkerPosition={markerId:n.id,index:t},this.markers[t]}let i=0===this.currentMarkerPosition.index,r=this.currentMarkerPosition.index===this.markers.length-1;switch(e){case"ArrowDown":if(r)return;n=(this.currentMarkerPosition.index+1)%this.markers.length;break;case"ArrowUp":if(i)return;n=(this.currentMarkerPosition.index-1+this.markers.length)%this.markers.length;break;default:return}let a=this.markers[n];if(a)return this.currentMarkerPosition={markerId:a.id,index:n},a}moveToNextMarkerItem(e,t){let n;if(!t||!this.markerComments)return;let i=t.closest("[data-marker-id]"),r=i?.getAttribute("data-marker-id");if(!i||!r)return;let a=this.markerComments[r]||[];if(0===a.length)return;let l=t.getAttribute("data-marker-navigation-comment-id"),o=a.findIndex(e=>e.id===l);if(-1===o)return;let s=o===a.length-1;switch(e){case"ArrowDown":if(s)return;n=o+1;break;case"ArrowUp":if(0===o)return;n=o-1;break;default:return}let d=a[n];if(d)return this.currentMarkerCommentPosition={markerId:d.id,index:n},d}}function e3({containerRef:e,markers:t,disabled:n=!1,focusInStrategy:i="previous"}){let r=(0,l.useRef)(void 0),a=(0,l.useRef)(void 0);(0,l.useEffect)(()=>{a.current=new e2(t,r.current?.focusedMarker?.id||void 0),r.current=a.current},[t]);let o=(0,l.useCallback)((e,t,n)=>{let i=n.key,r=!e4(t)&&!e5(t)&&!e9(t)&&!e6(t);switch(!0){case r&&("ArrowUp"===i||"ArrowDown"===i||"ArrowRight"===i||"ArrowLeft"===i):return e8(t)||e7(t)||void 0;case"ArrowUp"===i||"ArrowDown"===i:if(a.current&&e4(t)){let e=a.current.moveToNextMarker(i,e7(t));if(e)return document.querySelector(`[data-marker-id="${e.id}"]`)||void 0;return t}if(a.current&&e6(t)){let e=a.current.moveToNextMarker(i,e6(t));if(e)return document.querySelector(`[data-marker-id="${e.id}"]`)||void 0;return t}if(a.current&&e9(t)){let e=a.current.moveToNextMarkerItem(i,e9(t));if(e)return document.querySelector(`[data-marker-navigation-comment-id="${e.id}"]`)||void 0;return t}if(a.current&&e5(t)){let e=a.current.moveToNextMarkerItem(i,t);if(e)return document.querySelector(`[data-marker-navigation-comment-id="${e.id}"]`)||void 0}return t;case"ArrowRight"===i:if(e5(t))return e8(t);if(e4(t))return t?.querySelector('[data-first-thread-comment="true"]')||void 0;return t;case"ArrowLeft"===i:if(e4(t))return e7(t);if(e6(t))return e6(t);if(e9(t))return e9(t);if(e5(t))return t?.closest("[data-marker-id]")||void 0;return t;default:return t??void 0}},[a]);return(0,eZ.G)({containerRef:e,bindKeys:e0,getNextFocusable:o,focusableElementFilter:e=>!n&&!!(e.hasAttribute("data-marker-id")&&e.hasAttribute("data-marker-navigation-comment-id")),focusInStrategy:i,disabled:n},[o,n]),{markerNavigator:a}}function e4(e){return!!e?.hasAttribute("data-marker-id")}function e5(e){return!!e?.hasAttribute("data-marker-navigation-comment-id")}function e6(e){return e?.closest("[data-marker-navigation-new-thread]")??void 0}function e7(e){return e?.closest("[data-marker-id]")??void 0}function e8(e){return e?.closest("[data-marker-navigation-comment-id]")??void 0}function e9(e){return e?.closest("[data-marker-navigation-thread-reply]")??void 0}var te=n(80655);let tt="a, audio, button, details, embed, iframe, img, input, keygen, label, object, select, textarea, video";function tn(e){for(let t of(e?.setAttribute("aria-hidden","false"),Array.from(e?.querySelectorAll("*")??[])))t?.setAttribute("aria-hidden","false");for(let t of Array.from(e?.querySelectorAll(tt)??[]))t.setAttribute("tabindex","0")}function ti(e){let t,n,i=(0,r.c)(7),{commentSubjectType:a,gridCellId:o,markerRef:s,isThread:d,thread:c}=e,u=void 0!==d&&d,m=P(o);i[0]!==a||i[1]!==m||i[2]!==u||i[3]!==s||i[4]!==c?(t=()=>{let e=null;if(!u||c){if(m)"commit"===a?e=setTimeout(()=>{tn(s.current)},100):tn(s.current);else{var t;t=s.current,t?.setAttribute("aria-hidden","true"),function e(n=0){setTimeout(()=>{let n=Array.from(t?.querySelectorAll("*")??[]),i=Array.from(t?.querySelectorAll(tt)??[]);if(0===i.length)return e(200);for(let e of n)e?.setAttribute("aria-hidden","true");for(let e of i)e.setAttribute("tabindex","-1")},n)}()}return()=>{e&&clearTimeout(e)}}},n=[m,a,s,u,c],i[0]=a,i[1]=m,i[2]=u,i[3]=s,i[4]=c,i[5]=t,i[6]=n):(t=i[5],n=i[6]),(0,l.useEffect)(t,n)}var tr=n(2827);function ta(e){let t,n,a,o,s=(0,r.c)(14),{annotation:d,gridCellId:c,isFirstMarker:u}=e,m=(0,l.useRef)(null),f=P(c);s[0]!==c?(t={commentSubjectType:"pull request",gridCellId:c,markerRef:m},s[0]=c,s[1]=t):t=s[1],ti(t);let h=`annotation_${d.databaseId}`,g=u?"mb-1":"mb-2";s[2]!==g?(n=(0,b.$)("border rounded-2 color-border-default color-shadow-small overflow-hidden",g,"InlineAnnotation-module__inlineAnnotation__ww6B1"),s[2]=g,s[3]=n):n=s[3];let p=`annotation-${d.id}`,v=`${d.id}`,C=f?0:-1;return s[4]!==d?(a=(0,i.jsx)(tr.YH,{annotation:d}),s[4]=d,s[5]=a):a=s[5],s[6]!==d.annotationLevel||s[7]!==h||s[8]!==n||s[9]!==p||s[10]!==v||s[11]!==C||s[12]!==a?(o=(0,i.jsx)("div",{id:h,ref:m,className:n,"data-level":d.annotationLevel,"data-testid":p,"data-marker-id":v,tabIndex:C,children:a}),s[6]=d.annotationLevel,s[7]=h,s[8]=n,s[9]=p,s[10]=v,s[11]=C,s[12]=a,s[13]=o):o=s[13],o}ta.displayName="InlineAnnotation";var tl=n(49861),to=n(36010),ts=n(51581),td=n(59134),tc=n(70944);function tu(){let e,t,n,a=(0,r.c)(3);return a[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,i.jsx)(tc.E.Visual,{children:(0,i.jsx)(d.AlertIcon,{size:24,className:"fgColor-muted tmp-mt-3 tmp-mb-3"})}),a[0]=e):e=a[0],a[1]===Symbol.for("react.memo_cache_sentinel")?(t=(0,i.jsx)(tc.E.Heading,{children:(0,i.jsx)("strong",{children:"Comments cannot be loaded right now"})}),a[1]=t):t=a[1],a[2]===Symbol.for("react.memo_cache_sentinel")?(n=(0,i.jsx)("div",{className:"position-relative",children:(0,i.jsxs)(tc.E,{border:!0,children:[e,t,(0,i.jsx)("div",{className:"mb-n2",children:(0,i.jsx)(tc.E.Description,{children:"Refresh the page or try again later"})}),(0,i.jsx)(tc.E.SecondaryAction,{href:"https://www.githubstatus.com/",children:"GitHub status"})]})}),a[2]=n):n=a[2],n}tu.displayName="CommentErrorFallback";let tm="InlineReviewThread-module__inlineReviewThreadHeading__o7jqD";var tf=n(34810),th=n(22766),tg=n(77052),tp=n(62764),tb=n(78431),tv=n(97665),tC=n(94747),ty=n(78597),tL=n(3079),tx=n(52392),tS=n(38468),tN=n(33874);function tw(e){let t,n,a,o,s,d,c,u,m,h,p=(0,r.c)(82),{batchingEnabled:b,commentAnchorPrefix:v,lineMarkersKey:C,disableDialogMode:y,enableDialogMode:x,filePath:S,gridCellId:N,isInlineComment:w,isInDialogMode:_,onDeleteLineComment:D,thread:I,threadPositionNumber:j,shouldLimitHeight:k,suggestedChangesConfig:A,viewerData:E,ghostUser:R}=e,T=void 0===k||k,[O,$]=(0,l.useState)(!1),[M,F]=(0,l.useState)(void 0),{sendAnalyticsEvent:B}=(0,ts.s)(),H=(0,L.Kp)(),P=(0,l.useRef)(null),K=(0,l.useRef)(null),{mutate:U}=function(e,t){let n,i,a,l=(0,r.c)(13),o=(0,L.Kp)(),s=(0,tv.jE)(),d=`${o}/page_data/${tp.uT.createReviewComment}`,{updateThread:c}=(0,L.an)(),{addPendingComment:u,clearPendingReview:m}=(0,L._N)();return l[0]!==d?(n=async e=>{let t=await (0,ty.Sr)(`${d}`,{method:"POST",headers:{Accept:"application/json"},body:e}),n=await (0,tb.hp)(t);return(0,tb.R)(t,n),n},l[0]=d,l[1]=n):n=l[1],l[2]!==u||l[3]!==o||l[4]!==m||l[5]!==e||l[6]!==t||l[7]!==s||l[8]!==c?(i=(n,i)=>(void 0!==i.submitBatch&&!i.submitBatch&&n.thread&&u(Number(n.thread.id)),i.submitBatch&&m(),c(Number(n.thread.id),e,t,e=>n.thread),s.invalidateQueries({queryKey:(0,tL.XG)(o)})),l[2]=u,l[3]=o,l[4]=m,l[5]=e,l[6]=t,l[7]=s,l[8]=c,l[9]=i):i=l[9],l[10]!==n||l[11]!==i?(a={mutationFn:n,onSuccess:i},l[10]=n,l[11]=i,l[12]=a):a=l[12],(0,tC.n)(a)}(S,C),{baseOid:V,headOid:z}=(0,L.E4)();p[0]!==U||p[1]!==z||p[2]!==S||p[3]!==B||p[4]!==V||p[5]!==I.commentsData?.comments?(t=e=>{let{commentText:t,onCompleted:n,onError:i,submitBatch:r}=e,a=I.commentsData?.comments[I.commentsData?.comments.length-1];U({text:t,submitBatch:r,inReplyTo:a?.databaseId,path:S,comparisonEndOid:z,comparisonStartOid:V},{onError:i,onSuccess:e=>{var t;(t=e.comment.databaseId)&&f(t.toString()),n?.()}}),B("comments.add","ADD_COMMENT_BUTTON")},p[0]=U,p[1]=z,p[2]=S,p[3]=B,p[4]=V,p[5]=I.commentsData?.comments,p[6]=t):t=p[6];let q=t;p[7]!==B?(n=()=>{$(!1),F(void 0),B("comments.cancel_thread_reply","CANCEL_REVIEW_THREAD_BUTTON"),g.cg?.requestAnimationFrame(()=>P.current?.focus())},p[7]=B,p[8]=n):n=p[8];let G=n;p[9]===Symbol.for("react.memo_cache_sentinel")?(a=e=>{F(e),$(!0)},p[9]=a):a=p[9];let W=a;if(!I.commentsData||null===I.commentsData.comments||I.commentsData.comments.length<1)return null;p[10]!==I?(o=(0,tx.Lm)(I),p[10]=I,p[11]=o):o=p[11];let X=o;p[12]!==X||p[13]!==I.subjectType?(s=I.subjectType?.toLowerCase()==="line"?{lineRange:X}:void 0,p[12]=X,p[13]=I.subjectType,p[14]=s):s=p[14];let J=s;p[15]!==O?(d=e=>{K.current===e.target&&(O?K.current?.querySelector("textarea")?.focus():P.current?.focus())},p[15]=O,p[16]=d):d=p[16];let Q=d;if(p[17]!==J||p[18]!==H||p[19]!==v||p[20]!==y||p[21]!==x||p[22]!==S||p[23]!==R||p[24]!==N||p[25]!==_||p[26]!==w||p[27]!==C||p[28]!==D||p[29]!==A||p[30]!==I.commentsData.__id||p[31]!==I.commentsData.comments||p[32]!==I.id||p[33]!==I.isResolved||p[34]!==I.positioning?.isOutdated||p[35]!==j||p[36]!==E){let e;p[38]!==J||p[39]!==H||p[40]!==v||p[41]!==y||p[42]!==x||p[43]!==S||p[44]!==R||p[45]!==N||p[46]!==_||p[47]!==w||p[48]!==C||p[49]!==D||p[50]!==A||p[51]!==I.commentsData.__id||p[52]!==I.commentsData.comments.length||p[53]!==I.id||p[54]!==I.isResolved||p[55]!==I.positioning?.isOutdated||p[56]!==j||p[57]!==E?(e=(e,t)=>(function(e,t){return e.reviewVariantType===te.hH.Automated&&0===t})(e,t)?(0,i.jsx)(to.t,{fallback:(0,i.jsx)(tS.k,{}),boundaryName:"AutomatedReviewThreadComment",children:(0,i.jsx)(tS.y,{anchorPrefix:v,basePath:H,comment:e,isAnchorable:!0,isInDialogMode:_,isOutdated:I.positioning?.isOutdated,onQuoteReply:W,threadId:I.id,threadPositionNumber:j},e.id)},e.id):(0,i.jsx)(tN.U,{lineMarkersKey:C,isAnchorable:!0,index:t,threadPositionNumber:j,isFirstComment:0===t,isInlineComment:w,isLastChild:t===(I.commentsData?.comments.length??0)-1,anchorPrefix:v,comment:e,commentConnectionId:I.commentsData?.__id,disableDialogMode:y,enableDialogMode:x,filePath:S,gridCellId:N,isInDialogMode:_,isOutdated:I.positioning?.isOutdated,threadId:I.id,onDeleteLineComment:D,onQuoteReply:W,threadCommentCount:I.commentsData?.comments.length,isThreadResolved:!!I.isResolved,suggestedChangesConfig:A,applySuggestedChangesValidationData:J,viewerData:E,ghostUser:R},e.id),p[38]=J,p[39]=H,p[40]=v,p[41]=y,p[42]=x,p[43]=S,p[44]=R,p[45]=N,p[46]=_,p[47]=w,p[48]=C,p[49]=D,p[50]=A,p[51]=I.commentsData.__id,p[52]=I.commentsData.comments.length,p[53]=I.id,p[54]=I.isResolved,p[55]=I.positioning?.isOutdated,p[56]=j,p[57]=E,p[58]=e):e=p[58],c=I.commentsData.comments.map(e),p[17]=J,p[18]=H,p[19]=v,p[20]=y,p[21]=x,p[22]=S,p[23]=R,p[24]=N,p[25]=_,p[26]=w,p[27]=C,p[28]=D,p[29]=A,p[30]=I.commentsData.__id,p[31]=I.commentsData.comments,p[32]=I.id,p[33]=I.isResolved,p[34]=I.positioning?.isOutdated,p[35]=j,p[36]=E,p[37]=c}else c=p[37];return p[59]!==I.reviewCommentsLimit||p[60]!==I.reviewCommentsLimitExceeded?(u=I.reviewCommentsLimitExceeded&&(0,i.jsx)(tg.l,{"aria-label":"Warning",title:"Warning",variant:"warning",hideTitle:!0,description:`Only the first ${(I.reviewCommentsLimit||0)-1} replies are currently being shown.`,className:"tmp-m-3"}),p[59]=I.reviewCommentsLimit,p[60]=I.reviewCommentsLimitExceeded,p[61]=u):u=p[61],p[62]!==q||p[63]!==b||p[64]!==G||p[65]!==S||p[66]!==Q||p[67]!==_||p[68]!==O||p[69]!==X?.endLineNumber||p[70]!==X?.startLineNumber||p[71]!==M||p[72]!==B||p[73]!==A||p[74]!==I.id||p[75]!==I.viewerCanReply?(m=I.viewerCanReply&&(0,i.jsxs)("div",{id:th.Bq.issueCommentComposer,className:"rounded-bottom-2 p-2 bgColor-inset","data-marker-navigation-comment-thread-id":I.id,"data-marker-navigation-comment-id":`${I.id}-reply-comment`,"data-marker-navigation-thread-reply":!0,tabIndex:_?0:-1,onFocus:Q,ref:K,children:[O&&(0,i.jsx)(eC,{startLineNumber:X?.startLineNumber,lineNumber:X?.endLineNumber,batchingEnabled:b,condensed:!1,fileLevelComment:!0,filePath:S,focusOnMount:!0,isReplying:!0,onCancelComment:G,quotedText:M,threadId:I.id,onAddComment:q,suggestedChangesConfig:A}),!O&&(0,i.jsx)(tf.z,{ref:P,onClick:()=>{B("comments.start_thread_reply","REPLY_TO_THREAD_INPUT_BUTTON"),$(!0)},children:"Write a reply"})]}),p[62]=q,p[63]=b,p[64]=G,p[65]=S,p[66]=Q,p[67]=_,p[68]=O,p[69]=X?.endLineNumber,p[70]=X?.startLineNumber,p[71]=M,p[72]=B,p[73]=A,p[74]=I.id,p[75]=I.viewerCanReply,p[76]=m):m=p[76],p[77]!==T||p[78]!==m||p[79]!==c||p[80]!==u?(h=(0,i.jsx)("div",{"data-testid":"review-thread",children:(0,i.jsxs)("div",{className:"ReviewThread-module__ReviewThreadContainer__TvwhT","data-limit-height":T,children:[c,u,m]})}),p[77]=T,p[78]=m,p[79]=c,p[80]=u,p[81]=h):h=p[81],h}tw.displayName="ReviewThread";var t_=n(4925);function tD(e){let t=(0,r.c)(13),{thread:n}=e,a=n.positioning??("subject"in n?n.subject:void 0);if(void 0===a)return null;if(!a.endDiffSide||!a.endLine){let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,i.jsx)("h2",{className:tm,children:"Comment on file"}),t[0]=e):e=t[0],e}let l="LEFT"===a.endDiffSide?"L":"R";if(a.startLine&&a.startDiffSide&&a.startLine!==a.endLine){let e,n,r,l="LEFT"===a.startDiffSide?"L":"R",o="LEFT"===a.endDiffSide?"L":"R",s=a.startLine??"";t[4]!==l||t[5]!==s?(e=(0,i.jsxs)("span",{className:"text-semibold fgColor-default",children:[l,s]}),t[4]=l,t[5]=s,t[6]=e):e=t[6];let d=a.endLine??"";return t[7]!==o||t[8]!==d?(n=(0,i.jsxs)("span",{className:"text-semibold fgColor-default",children:[o,d]}),t[7]=o,t[8]=d,t[9]=n):n=t[9],t[10]!==e||t[11]!==n?(r=(0,i.jsxs)("h2",{className:tm,children:["Comment on lines"," ",e," ","to"," ",n]}),t[10]=e,t[11]=n,t[12]=r):r=t[12],r}{let e,n=a.endLine??"";return t[1]!==l||t[2]!==n?(e=(0,i.jsxs)("h2",{className:tm,children:["Comment on line"," ",(0,i.jsxs)("span",{className:"text-semibold fgColor-default",children:[l,n]})]}),t[1]=l,t[2]=n,t[3]=e):e=t[3],e}}function tI(e){let t,n,a,l,o,s=(0,r.c)(19),{thread:c,isCollapsed:m,isFirstThread:f,onToggleCollapsed:h,showLabels:g}=e,p=void 0===g||g,v="commentsData"in c,C=v&&c.commentsData?.comments[0]?.reviewVariantType===te.hH.Automated?c.commentsData?.comments[0]?.automatedComment:null,y=v&&!!c.isResolved,L=!!(C&&C.dismissable);s[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,b.$)("px-1","InlineReviewThread-module__ReviewThreadContainer__iFcNZ"),s[0]=t):t=s[0];let x=m?"Expand comment":"Collapse comment",S=m?d.ChevronRightIcon:d.ChevronDownIcon;return s[1]!==f||s[2]!==h||s[3]!==x||s[4]!==S?(n=(0,i.jsx)(u.K,{"aria-label":x,icon:S,size:"small",variant:"invisible",onClick:h,"data-is-first-collapse-button":f}),s[1]=f,s[2]=h,s[3]=x,s[4]=S,s[5]=n):n=s[5],s[6]!==c?(a=(0,i.jsx)(tD,{thread:c}),s[6]=c,s[7]=a):a=s[7],s[8]!==C?.isDismissed||s[9]!==C?.isFixed||s[10]!==L||s[11]!==y||s[12]!==p||s[13]!==c?(l=p&&(0,i.jsxs)("div",{className:"InlineReviewThread-module__ResolvableContainer__hBgdw",children:[c.positioning?.isOutdated&&(0,i.jsx)(t_.A,{variant:"secondary",children:"Outdated"}),y&&!L&&(0,i.jsx)(t_.A,{variant:"secondary",children:"Resolved"}),C?.isDismissed&&(0,i.jsx)(t_.A,{variant:"secondary",children:"Dismissed"}),C?.isFixed&&(0,i.jsx)(t_.A,{variant:"secondary",children:"Fixed"})]}),s[8]=C?.isDismissed,s[9]=C?.isFixed,s[10]=L,s[11]=y,s[12]=p,s[13]=c,s[14]=l):l=s[14],s[15]!==n||s[16]!==a||s[17]!==l?(o=(0,i.jsxs)("div",{className:t,children:[n,a,l]}),s[15]=n,s[16]=a,s[17]=l,s[18]=o):o=s[18],o}tD.displayName="ThreadBanner",tI.displayName="ReviewThreadHeader";var tj=n(43029),tk=n(53572),tA=n(23666),tE=n(7909);function tR(e){if(e?.commentsData?.comments[0]?.automatedComment){let t=e.commentsData?.comments[0]?.automatedComment;return{...e,isResolved:!1,resolvedBy:void 0,commentsData:{...e.commentsData,comments:[{...e.commentsData.comments[0],automatedComment:{...t,isDismissed:!1,viewerCanDismiss:!0,viewerCanReopen:!1}},...e.commentsData.comments.slice(1)]}}}}var tT=n(56373);function tO(e){let t,n,a,l=(0,r.c)(20),{automatedComment:o,thread:s,filePath:d,lineMarkersKey:c,setErrorMessage:u,setIsCollapsed:m,safeLocalStorage:f}=e,{mutate:h,isPending:g,error:p}=function(e,t){let n,i,a,l,o=(0,r.c)(12),s=(0,L.Kp)();o[0]===Symbol.for("react.memo_cache_sentinel")?(n=(0,tE.cj)(),o[0]=n):n=o[0];let d=n,c=(0,tv.jE)(),{updateThread:u}=(0,L.an)();return o[1]!==s?(i=async e=>{let{automatedReviewCommentId:t,reason:n,resolutionNote:i}=e,r=(0,tA.L7I)({basePath:s,automatedReviewCommentId:t}),a=await (0,tb.q$)(r,{method:"PUT",body:{reason:n,resolution_note:i}});(0,tb.R)(a)},o[1]=s,o[2]=i):i=o[2],o[3]!==s||o[4]!==e||o[5]!==t||o[6]!==c||o[7]!==u?(a=(n,i)=>{u(Number(i.threadId),e,t,e=>{if(e?.commentsData?.comments[0]?.automatedComment){let t=e.commentsData?.comments[0]?.automatedComment;return{...e,isResolved:!0,resolvedBy:d,commentsData:{...e.commentsData,comments:[{...e.commentsData.comments[0],automatedComment:{...t,isDismissed:!0,viewerCanDismiss:!1,viewerCanReopen:!0}},...e.commentsData.comments.slice(1)]}}}}),c.invalidateQueries({queryKey:(0,tL.XG)(s)})},o[3]=s,o[4]=e,o[5]=t,o[6]=c,o[7]=u,o[8]=a):a=o[8],o[9]!==i||o[10]!==a?(l={mutationFn:i,onSuccess:a},o[9]=i,o[10]=a,o[11]=l):l=o[11],(0,tC.n)(l)}(d,c);l[0]!==o.id||l[1]!==h||l[2]!==f||l[3]!==u||l[4]!==m||l[5]!==s.id?(t=(e,t)=>{let{reason:n,resolutionNote:i}=e,{onSuccess:r}=t;h({automatedReviewCommentId:o.id,threadId:s.id,reason:n,resolutionNote:i},{onError:()=>u("Failed to dismiss"),onSuccess:()=>{r(),m(!0),f.removeItem(`reviewThreadIsCollapsed_${s.id}`)}})},l[0]=o.id,l[1]=h,l[2]=f,l[3]=u,l[4]=m,l[5]=s.id,l[6]=t):t=l[6];let b=t,{mutate:v,isPending:C}=function(e,t){let n,i,a,l=(0,r.c)(11),o=(0,L.Kp)(),s=(0,tv.jE)(),{updateThread:d}=(0,L.an)();return l[0]!==o?(n=async e=>{let{automatedReviewCommentId:t}=e,n=(0,tA.Aav)({basePath:o,automatedReviewCommentId:t}),i=await (0,tb.q$)(n,{method:"PUT"});(0,tb.R)(i)},l[0]=o,l[1]=n):n=l[1],l[2]!==o||l[3]!==e||l[4]!==t||l[5]!==s||l[6]!==d?(i=(n,i)=>{d(Number(i.threadId),e,t,tR),s.invalidateQueries({queryKey:(0,tL.XG)(o)})},l[2]=o,l[3]=e,l[4]=t,l[5]=s,l[6]=d,l[7]=i):i=l[7],l[8]!==n||l[9]!==i?(a={mutationFn:n,onSuccess:i},l[8]=n,l[9]=i,l[10]=a):a=l[10],(0,tC.n)(a)}(d,c);l[7]!==o.id||l[8]!==v||l[9]!==f||l[10]!==u||l[11]!==m||l[12]!==s.id?(n=()=>{v({automatedReviewCommentId:o.id,threadId:s.id},{onError:()=>u("Failed to reopen"),onSuccess:()=>{m(!1),f.removeItem(`reviewThreadIsCollapsed_${s.id}`)}})},l[7]=o.id,l[8]=v,l[9]=f,l[10]=u,l[11]=m,l[12]=s.id,l[13]=n):n=l[13];let y=n,x=g||C;return l[14]!==o||l[15]!==p||l[16]!==b||l[17]!==y||l[18]!==x?(a=(0,i.jsx)(tT.K,{automatedComment:o,dismissError:p,isButtonDisabled:x,onDismiss:b,onReopen:y,className:"p-2 border-top"}),l[14]=o,l[15]=p,l[16]=b,l[17]=y,l[18]=x,l[19]=a):a=l[19],a}function t$(e){let t,n,a,o,s,c,u,m,f,h,g,p,b,v,C,y,x,S,N,w,_,D,I,k,A,E,R=(0,r.c)(84);R[0]!==e?({fileAnchor:t,filePath:n,gridCellId:o,onDeleteLineComment:u,threadId:h,threadPositionNumber:g,lineMarkersKey:c,threadsConnectionId:p,isFirstThread:s,ghostUser:a,suggestedChangesConfig:f,...m}=e,R[0]=e,R[1]=t,R[2]=n,R[3]=a,R[4]=o,R[5]=s,R[6]=c,R[7]=u,R[8]=m,R[9]=f,R[10]=h,R[11]=g,R[12]=p):(t=R[1],n=R[2],a=R[3],o=R[4],s=R[5],c=R[6],u=R[7],m=R[8],f=R[9],h=R[10],g=R[11],p=R[12]);let T=(0,L._W)(h,n,c),{mutate:O}=(0,tj.H)(n,c),$=()=>{T&&(O({threadId:T.id},{onError:()=>V("Failed to resolve thread"),onSuccess:()=>{G(!0),B.removeItem(`reviewThreadIsCollapsed_${h}`)}}),en("comments.resolve_thread","RESOLVE_CONVERSATION_BUTTON"))},M=(0,l.useRef)(null),B=(0,j.A)("localStorage"),H=T?.isResolved,[K,U]=(0,l.useState)(""),V=U,[z,q]=(0,l.useState)(H??!1),G=q,W=P(o),{disableDialogMode:X,enableDialogMode:J}=F(ee);R[13]!==H||R[14]!==h?(b=[H,h],R[13]=H,R[14]=h,R[15]=b):b=R[15],(0,l.useEffect)(()=>{let e=localStorage.getItem(`reviewThreadIsCollapsed_${h}`);null!==e?G(JSON.parse(e)):H&&G(!0)},b);let Q=(0,L.zK)();R[16]!==Q||R[17]!==T?(v=[Q,T],R[16]=Q,R[17]=T,R[18]=v):v=R[18],(0,l.useEffect)(()=>{null==Q||T?.commentsData?.comments.some(e=>e.databaseId===Q)&&G(!1)},v);let Y=()=>{window.requestAnimationFrame(()=>{B.setItem(`reviewThreadIsCollapsed_${h}`,JSON.stringify(!z))}),G(tF)};R[19]!==o||R[20]!==T?(C={commentSubjectType:"pull request",gridCellId:o,markerRef:M,isThread:!0,thread:T},R[19]=o,R[20]=T,R[21]=C):C=R[21],ti(C);e:{let e=T?.positioning??T?.subject;if(!e){y=void 0;break e}if(t&&T&&e.startDiffSide&&e.endDiffSide&&e.startLine&&e.endLine&&f?.configureSuggestedChangesFromLineRange){let n,i=e.startLine??e.endLine,r=e.startDiffSide??e.endDiffSide,a="LEFT"===e.endDiffSide?"left":"right",l="LEFT"===r?"left":"right",o="LEFT"===r?"left":"right";if(R[22]!==t||R[23]!==e.endLine||R[24]!==i||R[25]!==f||R[26]!==a||R[27]!==l||R[28]!==o){let r={diffAnchor:t,endLineNumber:e.endLine,endOrientation:a,startLineNumber:i,startOrientation:l,firstSelectedLineNumber:i,firstSelectedOrientation:o};n=f?.configureSuggestedChangesFromLineRange(r),R[22]=t,R[23]=e.endLine,R[24]=i,R[25]=f,R[26]=a,R[27]=l,R[28]=o,R[29]=n}else n=R[29];y=n;break e}y=void 0}let Z=y,{sendAnalyticsEvent:et}=(0,ts.s)(),en=et,{mutate:ei}=(0,tk.i)(n,c);R[30]!==B||R[31]!==en||R[32]!==V||R[33]!==G||R[34]!==T||R[35]!==ei?(x=()=>{T&&(ei({threadId:T.id},{onError:()=>V("Failed to unresolve thread"),onSuccess:()=>{G(!1),B.removeItem(`reviewThreadIsCollapsed_${T.id}`)}}),en("comments.unresolve_thread","RESOLVE_CONVERSATION_BUTTON"))},R[30]=B,R[31]=en,R[32]=V,R[33]=G,R[34]=T,R[35]=ei,R[36]=x):x=R[36];let er=x,ea=T?.commentsData?.comments[0]?.reviewVariantType===te.hH.Automated?T.commentsData?.comments[0]?.automatedComment:null,el=!!(ea&&ea.dismissable),eo=ea&&ea.source===te.vk.LicenseCompliance;if(!T||!((T.commentsData?.comments?.length??0)>0))return null;let es=!!T.isResolved;R[37]===Symbol.for("react.memo_cache_sentinel")?(S=(0,tE.M3)(),R[37]=S):S=R[37];let ed=S;R[38]!==T.commentsData?.comments?(N=ed&&T.commentsData?.comments?.some(tM),R[38]=T.commentsData?.comments,R[39]=N):N=R[39];let ec=N,eu=T.commentsData?.comments?.[0]?.createdAt,em=T.commentsData?.comments?.[0]?.author?.login??"Unknown Author",ef=`${H?"Unresolve":"Resolve"} comment`;if(eu){let e;R[40]!==eu?(e=(0,tl.C)(new Date(eu)),R[40]=eu,R[41]=e):e=R[41];let t=e;ef=`${H?"Unresolve":"Resolve"} ${em}'s comment, ${t}`}return R[42]===Symbol.for("react.memo_cache_sentinel")?(w=(0,i.jsx)(tu,{}),R[42]=w):w=R[42],R[43]!==Y||R[44]!==z||R[45]!==s||R[46]!==T?(_=(0,i.jsx)(tI,{thread:T,isCollapsed:z,isFirstThread:s,onToggleCollapsed:Y}),R[43]=Y,R[44]=z,R[45]=s,R[46]=T,R[47]=_):_=R[47],R[48]===Symbol.for("react.memo_cache_sentinel")?(D=(0,i.jsxs)("div",{className:"InlineReviewThread-module__ThreadLoading__JOBQj",children:[(0,i.jsx)(eB.A,{}),(0,i.jsx)("p",{children:"Loading comments"})]}),R[48]=D):D=R[48],R[49]!==K?(I=K&&(0,i.jsxs)(td.A,{variant:"danger",className:"m-2",children:[(0,i.jsx)(d.StopIcon,{className:"mr-2"}),K]}),R[49]=K,R[50]=I):I=R[50],R[51]!==ea||R[52]!==Z||R[53]!==X||R[54]!==J||R[55]!==n||R[56]!==a||R[57]!==o||R[58]!==$||R[59]!==er||R[60]!==z||R[61]!==el||R[62]!==W||R[63]!==ec||R[64]!==H||R[65]!==es||R[66]!==eo||R[67]!==c||R[68]!==u||R[69]!==ef||R[70]!==m||R[71]!==B||R[72]!==V||R[73]!==G||R[74]!==T||R[75]!==g||R[76]!==p?(k=!z&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(tw,{lineMarkersKey:c,disableDialogMode:X,enableDialogMode:J,filePath:n,gridCellId:o,onDeleteLineComment:u,isInlineComment:!0,isInDialogMode:W,thread:T,threadPositionNumber:g,threadsConnectionId:p,suggestedChangesConfig:Z,shouldLimitHeight:!1,...m,ghostUser:a}),ec&&!el&&!eo&&(0,i.jsxs)("div",{className:"d-flex flex-items-center p-2 border-top flex-wrap",children:[(0,i.jsx)(ey.Q,{"aria-label":ef,onClick:es?er:$,className:"mr-2",children:H?"Unresolve comment":"Resolve comment"}),es&&T.resolvedBy&&(0,i.jsxs)("span",{className:"fgColor-muted f6",children:[(0,i.jsx)("b",{children:T.resolvedBy})," marked this comment as resolved"]})]}),el&&ea&&(0,i.jsx)(tO,{automatedComment:ea,thread:T,filePath:n,lineMarkersKey:c,setErrorMessage:V,setIsCollapsed:G,safeLocalStorage:B})]}),R[51]=ea,R[52]=Z,R[53]=X,R[54]=J,R[55]=n,R[56]=a,R[57]=o,R[58]=$,R[59]=er,R[60]=z,R[61]=el,R[62]=W,R[63]=ec,R[64]=H,R[65]=es,R[66]=eo,R[67]=c,R[68]=u,R[69]=ef,R[70]=m,R[71]=B,R[72]=V,R[73]=G,R[74]=T,R[75]=g,R[76]=p,R[77]=k):k=R[77],R[78]!==I||R[79]!==k?(A=(0,i.jsxs)(l.Suspense,{fallback:D,children:[I,k]}),R[78]=I,R[79]=k,R[80]=A):A=R[80],R[81]!==_||R[82]!==A?(E=(0,i.jsx)(to.t,{boundaryName:"InlineReviewThread",fallback:w,children:(0,i.jsxs)("div",{className:"rounded-2 bgColor-default",ref:M,children:[_,A]})}),R[81]=_,R[82]=A,R[83]=E):E=R[83],E}function tM(e){return e.state?.toUpperCase()!=="PENDING"}function tF(e){return!e}tO.displayName="InlineAutomatedReviewThreadActions",t$.displayName="InlineReviewThread";var tB=n(30572);function tH(e){let t,n,a,o,s,d,c,u,m,f,h,g,p=(0,r.c)(34),{thread:v,isFirstMarker:C,isLastThread:y,isInDialogMode:x}=e;p[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,j.A)("localStorage"),p[0]=t):t=p[0];let S=t,N=(0,l.useRef)(null),[w,_]=(0,l.useState)(!1),{updateThread:D}=(0,L.an)(),[I,k]=(0,l.useState)(!1);p[1]===Symbol.for("react.memo_cache_sentinel")?(n=()=>{let e=N.current;if(!e)return;let t=new IntersectionObserver(e=>{e[0]&&_(e[0].isIntersecting)},{threshold:.75});return t.observe(e),()=>t.disconnect()},p[1]=n):n=p[1],p[2]!==v.id?(a=[v.id],p[2]=v.id,p[3]=a):a=p[3],(0,l.useEffect)(n,a),p[4]!==v.id?(o=()=>{let e=localStorage.getItem(`reviewThreadIsCollapsed_${v.id}`);null!==e&&k(JSON.parse(e))},s=[v.id],p[4]=v.id,p[5]=o,p[6]=s):(o=p[5],s=p[6]),(0,l.useEffect)(o,s),p[7]!==w||p[8]!==v||p[9]!==D?(d=()=>{if(w&&v.positioning&&v?.commentsData&&v.hideUntilLoadedAndInView){let e=Number(v.id),t=v.positioning.path,n="RIGHT"===v.positioning.endDiffSide?"R":"L";D(e,t,null!==v.positioning.endLine&&void 0!==v.positioning.endLine?`${n}${v.positioning.endLine}`:"FILE",e=>e?{...e,hideUntilLoadedAndInView:!1,shouldNotRenderInDiffLines:!1}:v)}},c=[w,D,v],p[7]=w,p[8]=v,p[9]=D,p[10]=d,p[11]=c):(d=p[10],c=p[11]),(0,l.useEffect)(d,c),p[12]!==I||p[13]!==v.id?(u=()=>{window.requestAnimationFrame(()=>{S.setItem(`reviewThreadIsCollapsed_${v.id}`,JSON.stringify(!I))}),k(tP)},p[12]=I,p[13]=v.id,p[14]=u):u=p[14];let A=u,E=`review-thread-without-data-${v.id}`,R=y?"mb-1":"mb-2";p[15]!==R?(m=(0,b.$)("mt-1 border rounded-2 color-border-default color-shadow-small bgColor-default",R),p[15]=R,p[16]=m):m=p[16];let T=`review-thread-without-data-${v.id}`,O=`${v.id}`,$=void 0!==x&&x?0:-1;return p[17]!==A||p[18]!==I||p[19]!==C||p[20]!==v?(f=(0,i.jsx)(tI,{thread:v,isCollapsed:I,isFirstThread:C,onToggleCollapsed:A,showLabels:!1}),p[17]=A,p[18]=I,p[19]=C,p[20]=v,p[21]=f):f=p[21],p[22]!==I?(h=!I&&(0,i.jsx)(tB.G,{}),p[22]=I,p[23]=h):h=p[23],p[24]!==C||p[25]!==w||p[26]!==E||p[27]!==m||p[28]!==T||p[29]!==O||p[30]!==$||p[31]!==f||p[32]!==h?(g=(0,i.jsxs)("div",{ref:N,className:m,"data-testid":T,"data-first-marker":C,"data-marker-id":O,"data-is-in-view":w,tabIndex:$,children:[f,h]},E),p[24]=C,p[25]=w,p[26]=E,p[27]=m,p[28]=T,p[29]=O,p[30]=$,p[31]=f,p[32]=h,p[33]=g):g=p[33],g}function tP(e){return!e}tH.displayName="ReviewThreadWithoutData";var tK=n(1325),tU=n(19519);function tV(e,t){let n,i,a,l,o=(0,r.c)(16),{sendAnalyticsEvent:s}=(0,ts.s)(),d=F(q),c=(0,L.ww)(),u=F(J),{isServer:m}=(0,tU.V)();o[0]!==d||o[1]!==e?(n=function(t){var n;let i;if(!t||t.startLineNumber===t.endLineNumber&&t.startOrientation===t.endOrientation)return"DELETION"!==e.type;let r="right"===t.startOrientation&&"right"===t.endOrientation,a=d(t)?.selectedRightLines[0],l=a&&(0,_.qK)(a)&&(0,_.Ji)(a);return!!r&&!l||(n=t,!(i=d(n)?.selectedLeftLines)||!(i.length>0)||i.every(tz))},o[0]=d,o[1]=e,o[2]=n):n=o[2],o[3]!==d||o[4]!==m||o[5]!==e?(i=function(t){let n=t?d(t)?.selectedRightLines:[];if(t&&n&&n.length>1)return m?"":(0,_.Ls)(n);if(!e)return"";let[i]=(0,_.dv)(e.text,e.type);return i},o[3]=d,o[4]=m,o[5]=e,o[6]=i):i=o[6];let f=i;o[7]!==f||o[8]!==c||o[9]!==n||o[10]!==s?(a=function(e,t){let i=!!(n(e)&&!c);return{isValidSuggestionRange:i,showSuggestChangesButton:i,sourceContentFromDiffLines:i?f(e):void 0,onInsertSuggestedChange:()=>{s("diff.add_suggested_change","ADD_SUGGESTED_CHANGE_BUTTON")},shouldInsertSuggestedChange:t}},o[7]=f,o[8]=c,o[9]=n,o[10]=s,o[11]=a):a=o[11];let h=(0,tK.K)(a);return o[12]!==h||o[13]!==u||o[14]!==t?(l={getSelectedLineRange:u,configureSuggestedChangesFromLineRange:h,shouldStartNewConversationWithSuggestedChange:t},o[12]=h,o[13]=u,o[14]=t,o[15]=l):l=o[15],l}function tz(e){return"empty-diff-line"!==e&&"DELETION"!==e.type}let tq={[te.UZ.Failure]:0,[te.UZ.Warning]:1,[te.UZ.Notice]:2};function tG(e){let t,n=(0,r.c)(2);return n[0]!==e?(t=(0,i.jsx)(eY.j,{children:(0,i.jsx)(tW,{...e})}),n[0]=e,n[1]=t):t=n[1],t}function tW(e){let t,n,a,o,s,c,m,f,h,p,v,C,y,x,S,N,w,_,D,I,j,k,A,E,R,T,O,$,M,B,H,K,U,V,z,q,G,W,X,J,Q=(0,r.c)(125);if(Q[0]!==e){let{annotations:i,cellRef:r,diffLine:l,dispatchMarkersStatus:d,children:u,conversationListThreads:g,inlineMarkersRef:b,isRowSelected:L,lineMarkersKey:I,fileAnchor:j,filePath:k,gridCellId:A,gutterSizeOffset:E,lineType:R,onCloseConversationList:T,onCloseFocusMode:O,onDeleteLineComment:$,threadsConnectionId:M,shouldStartNewConversationWithSuggestedChange:F,ghostUser:B,shouldListenForEscapeKey:H,...P}=e;t=i,n=r,s=l,c=d,a=u,o=g,C=b,y=I,m=j,f=k,p=A,v=E,x=O,S=$,D=M,_=F,h=B,w=H,N=P,Q[0]=e,Q[1]=t,Q[2]=n,Q[3]=a,Q[4]=o,Q[5]=s,Q[6]=c,Q[7]=m,Q[8]=f,Q[9]=h,Q[10]=p,Q[11]=v,Q[12]=C,Q[13]=y,Q[14]=x,Q[15]=S,Q[16]=N,Q[17]=w,Q[18]=_,Q[19]=D}else t=Q[1],n=Q[2],a=Q[3],o=Q[4],s=Q[5],c=Q[6],m=Q[7],f=Q[8],h=Q[9],p=Q[10],v=Q[11],C=Q[12],y=Q[13],x=Q[14],S=Q[15],N=Q[16],w=Q[17],_=Q[18],D=Q[19];let Y=P(p),{disableDialogMode:Z,enableDialogMode:et}=F(ee),en=function(e,t,n){let i,a=(0,r.c)(5),{enableDialogMode:l}=F(ee);return a[0]!==t||a[1]!==n||a[2]!==l||a[3]!==e?(i=(i,r)=>{t.current?.classList.contains("diff-text-cell")&&(l(e),n("USER_EXPANDED_MARKERS"),(void 0===i?{shouldFocusFirstMarker:!0}:i).shouldFocusFirstMarker?setTimeout(()=>{t.current?.querySelector('[data-first-marker="true"]')?.focus()},0):r&&setTimeout(()=>{t.current?.querySelector(`[data-marker-id="${r}"]`)?.focus()},0))},a[0]=t,a[1]=n,a[2]=l,a[3]=e,a[4]=i):i=a[4],i}(p,n,c),ei=tV(s,_);Q[20]!==o?(I=o.filter(t0),Q[20]=o,Q[21]=I):I=Q[21];let er=I;Q[22]!==o?(j=o.filter(t1),Q[22]=o,Q[23]=j):j=Q[23];let ea=j,el=(0,l.useRef)(null);Q[24]!==t?(k=t.filter(tZ),Q[24]=t,Q[25]=k):k=Q[25];let eo=k;Q[26]!==eo?(A=[...eo].sort(tY),Q[26]=eo,Q[27]=A):A=Q[27];let es=A;e:{let e;if(a){let e,t;Q[28]===Symbol.for("react.memo_cache_sentinel")?(e={id:"new-comment"},Q[28]=e):e=Q[28],Q[29]!==es||Q[30]!==er||Q[31]!==ea?(t=[...er,e,...ea,...es],Q[29]=es,Q[30]=er,Q[31]=ea,Q[32]=t):t=Q[32],E=t;break e}Q[33]!==es||Q[34]!==er||Q[35]!==ea?(e=[...er,...ea,...es],Q[33]=es,Q[34]=er,Q[35]=ea,Q[36]=e):e=Q[36],E=e}let ed=E,ec=tQ;Q[37]!==Z||Q[38]!==p||Q[39]!==x||Q[40]!==w?(R=e=>{let t=e.target,n=e.target,i=n.closest(`[data-grid-cell-id=${p}]`);if(w&&i?.contains(t)&&e?.key==="Escape"){x(),Z(),i?.focus();return}if(i?.contains(t)&&"true"===n.getAttribute("data-exit-dialog-mode-button")&&!e?.shiftKey&&e?.key==="Tab"){e.preventDefault(),i?.querySelector('[data-is-first-collapse-button="true"]')?.focus();return}if(i?.contains(t)&&"true"===n.getAttribute("data-is-first-collapse-button")&&e?.shiftKey&&e?.key==="Tab"){e.preventDefault(),i?.querySelector('[data-exit-dialog-mode-button="true"]')?.focus();return}},Q[37]=Z,Q[38]=p,Q[39]=x,Q[40]=w,Q[41]=R):R=Q[41];let eu=R;Q[42]!==et||Q[43]!==p||Q[44]!==Y?(T=e=>{ec(e),Y||et(p)},Q[42]=et,Q[43]=p,Q[44]=Y,Q[45]=T):T=Q[45];let em=T;Q[46]!==Z||Q[47]!==Y?(O=e=>{e.target&&Y&&(e.target.closest("[data-inline-markers]")||Z())},Q[46]=Z,Q[47]=Y,Q[48]=O):O=Q[48];let ef=O;Q[49]!==ef?(M=()=>(g.XC?.addEventListener("mousedown",ef),()=>g.XC?.removeEventListener("mousedown",ef)),$=[ef],Q[49]=ef,Q[50]=$,Q[51]=M):($=Q[50],M=Q[51]),(0,l.useEffect)(M,$);let eh=(0,L.mF)(),eg=(0,l.useRef)(null);Q[52]!==t||Q[53]!==o||Q[54]!==en||Q[55]!==eh?(B=()=>{if(eh&&eg.current!==eh){let e=o.map(tJ),n=t.map(tX);(e.includes(eh)||n.includes(eh))&&(eg.current=eh,en({shouldFocusFirstMarker:!1},eh))}},H=[eh,en,o,t],Q[52]=t,Q[53]=o,Q[54]=en,Q[55]=eh,Q[56]=B,Q[57]=H):(B=Q[56],H=Q[57]),(0,l.useEffect)(B,H);let ep=!Y;Q[58]!==ed||Q[59]!==ep?(K={containerRef:el,markers:ed,disabled:ep},Q[58]=ed,Q[59]=ep,Q[60]=K):K=Q[60],e3(K);let eb=Y?"InlineMarkers-module__markersDialogActive__gXOXF":"";Q[61]!==eb?(U=(0,b.$)("d-flex pt-1",eb),Q[61]=eb,Q[62]=U):U=Q[62];let ev=`-${v}`;Q[63]!==ev?(V={marginRight:ev},Q[63]=ev,Q[64]=V):V=Q[64];let eC=Y?"false":"true";if(Q[65]!==m||Q[66]!==f||Q[67]!==h||Q[68]!==p||Q[69]!==Y||Q[70]!==y||Q[71]!==ed||Q[72]!==S||Q[73]!==N||Q[74]!==ei||Q[75]!==D||Q[76]!==er){let e;Q[78]!==m||Q[79]!==f||Q[80]!==h||Q[81]!==p||Q[82]!==Y||Q[83]!==y||Q[84]!==ed||Q[85]!==S||Q[86]!==N||Q[87]!==ei||Q[88]!==D?(e=(e,t)=>(0,i.jsx)("div",{className:(0,b.$)("mt-1 border rounded-2 color-border-default color-shadow-small",t===ed.length-1?"mb-1":"mb-2"),"data-first-marker":0===t,"data-marker-id":`${e.id}`,tabIndex:Y?0:-1,children:(0,i.jsx)(t$,{threadPositionNumber:t+1,isFirstThread:0===t,filePath:f,lineMarkersKey:y,fileAnchor:m,gridCellId:p,onDeleteLineComment:S,threadId:e.id,threadsConnectionId:D,suggestedChangesConfig:ei,ghostUser:h,...N})},`review-thread-${e.id}`),Q[78]=m,Q[79]=f,Q[80]=h,Q[81]=p,Q[82]=Y,Q[83]=y,Q[84]=ed,Q[85]=S,Q[86]=N,Q[87]=ei,Q[88]=D,Q[89]=e):e=Q[89],z=er.map(e),Q[65]=m,Q[66]=f,Q[67]=h,Q[68]=p,Q[69]=Y,Q[70]=y,Q[71]=ed,Q[72]=S,Q[73]=N,Q[74]=ei,Q[75]=D,Q[76]=er,Q[77]=z}else z=Q[77];if(Q[90]!==Y||Q[91]!==er.length||Q[92]!==ea){let e;Q[94]!==Y||Q[95]!==er.length||Q[96]!==ea.length?(e=(e,t)=>{let n=0===er.length&&0===t,r=ea.length;return(0,i.jsx)(tH,{thread:e,isFirstMarker:n,isLastThread:t===r-1,isInDialogMode:Y},`review-thread-without-data-${e.id}`)},Q[94]=Y,Q[95]=er.length,Q[96]=ea.length,Q[97]=e):e=Q[97],q=ea.map(e),Q[90]=Y,Q[91]=er.length,Q[92]=ea,Q[93]=q}else q=Q[93];if(Q[98]!==p||Q[99]!==ed||Q[100]!==es){let e;Q[102]!==p||Q[103]!==ed?(e=(e,t)=>{let n=0===t&&e===ed[0];return(0,i.jsx)(ta,{annotation:e,gridCellId:p,isFirstMarker:n},`annotation-${e.id}`)},Q[102]=p,Q[103]=ed,Q[104]=e):e=Q[104],G=es.map(e),Q[98]=p,Q[99]=ed,Q[100]=es,Q[101]=G}else G=Q[101];return Q[105]!==a||Q[106]!==z||Q[107]!==q||Q[108]!==G?(W=(0,i.jsxs)("div",{className:"InlineMarkers-module__markersWrapper__g3Aig",ref:el,children:[z,q,a,G]}),Q[105]=a,Q[106]=z,Q[107]=q,Q[108]=G,Q[109]=W):W=Q[109],Q[110]!==n||Q[111]!==o.length||Q[112]!==Z||Q[113]!==Y||Q[114]!==x?(X=Y&&(0,i.jsx)(u.K,{icon:d.UndoIcon,className:(0,b.$)("InlineMarkers-module__closeMarkersDialogButton__Re5bj","ml-2 position-relative",0===o.length?"mt-2":"mt-1"),"aria-label":"Return to code","data-exit-dialog-mode-button":"true",variant:"default",size:"small",onMouseUp:()=>{x(),Z(),n.current?.focus()},onKeyDown:e=>{("Enter"===e.key||"Space"===e.code)&&(x(),Z(),n.current?.focus())}}),Q[110]=n,Q[111]=o.length,Q[112]=Z,Q[113]=Y,Q[114]=x,Q[115]=X):X=Q[115],Q[116]!==em||Q[117]!==eu||Q[118]!==C||Q[119]!==U||Q[120]!==V||Q[121]!==eC||Q[122]!==W||Q[123]!==X?(J=(0,i.jsxs)("div",{className:U,style:V,"aria-hidden":eC,onFocus:em,onClick:ec,onKeyDown:eu,onKeyUp:ec,onMouseDown:ec,onMouseUp:ec,"data-inline-markers":!0,ref:C,children:[W,X]}),Q[116]=em,Q[117]=eu,Q[118]=C,Q[119]=U,Q[120]=V,Q[121]=eC,Q[122]=W,Q[123]=X,Q[124]=J):J=Q[124],J}function tX(e){return e.id}function tJ(e){return e.id}function tQ(e){return e.stopPropagation()}function tY(e,t){return tq[e.annotationLevel]-tq[t.annotationLevel]}function tZ(e){return!e.hideUntilLoadedAndInView}function t1(e){return e.hideUntilLoadedAndInView}function t0(e){return!e.hideUntilLoadedAndInView}function t2(e){let t,n=(0,r.c)(4),{line:i,isRowSelected:a}=e,l=F(es);e:{let e;if(!a){let e;n[0]!==i?(e=!!i&&(0,_.xB)(i),n[0]=i,n[1]=e):e=n[1],t=e;break e}n[2]!==l?(e=l(),n[2]=l,n[3]=e):e=n[3],t=e}return t}tG.displayName="InlineMarkers",tW.displayName="InlineMarkersInternal";var t3=n(18176);function t4(){let e,t,n,i=(0,r.c)(12),a=(0,L.Kp)(),l=(0,tv.jE)(),s=`${a}/page_data/${tp.uT.createReviewComment}`,{updateThread:d}=(0,L.an)(),{onCommentThreadAdded:c}=(0,L.Ud)(),{addPendingComment:u,clearPendingReview:m}=(0,L._N)();return i[0]!==s?(e=async e=>{let t=await (0,ty.Sr)(`${s}`,{method:"POST",headers:{Accept:"application/json"},body:e}),n=await (0,tb.hp)(t);return(0,tb.R)(t,n),n},i[0]=s,i[1]=e):e=i[1],i[2]!==u||i[3]!==a||i[4]!==m||i[5]!==c||i[6]!==l||i[7]!==d?(t=(e,t)=>{let n=t.subjectType===o.Wr.File?"FILE":"right"===t.side?`R${t.line}`:`L${t.line}`,i=t.startSide&&t.startLine?"right"===t.startSide?`R${t.startLine}`:`L${t.startLine}`:void 0;void 0!==t.submitBatch&&!t.submitBatch&&e.thread&&u(Number(e.thread.id)),t.submitBatch&&m(),d(Number(e.thread.id),t.path,n,()=>{let n=(0,t3.YY)(t);return e.thread.subject=n,e.thread.positioning=n,e.thread}),c({path:t.path,diffLineKey:n,startPosition:i,threadID:e.thread.id}),l.invalidateQueries({queryKey:(0,tL.XG)(a)})},i[2]=u,i[3]=a,i[4]=m,i[5]=c,i[6]=l,i[7]=d,i[8]=t):t=i[8],i[9]!==e||i[10]!==t?(n={mutationFn:e,onSuccess:t},i[9]=e,i[10]=t,i[11]=n):n=i[11],(0,tC.n)(n)}class t5{#e;#t;#n;#i;#r;#a;#l;constructor({filePath:e,newTreeEntry:t,oldTreeEntry:n,effectiveDiffRange:i,submitBatch:r,text:a}){this.#e=i.baseOid,this.#t=e,this.#n=i.headOid,this.#i=t,this.#r=n,this.#a=r,this.#l=a}fileRequestData(){return{...this.#o(),path:this.#t,subjectType:o.Wr.File}}lineRequestData(e){let{lineNumber:t,side:n}=e;return{...this.#o(),line:t,path:this.#s(n),positioning:{type:o.Wr.Line,baseCommitOid:this.#e,headCommitOid:this.#n,path:this.#s(n),line:t,commitOid:this.#d(n)},side:n,subjectType:o.Wr.Line}}multilineRequestData(e){let{endLineNumber:t,endSide:n,startLineNumber:i,startSide:r}=e;return{...this.#o(),line:t,path:this.#s(n),positioning:{baseCommitOid:this.#e,headCommitOid:this.#n,type:o.Wr.Multiline,startPath:this.#s(r),startLine:i,startCommitOid:this.#d(r),endPath:this.#s(n),endLine:t,endCommitOid:this.#d(n)},side:n,startLine:i,startSide:r,subjectType:o.Wr.Multiline}}#s(e){return"left"===e&&this.#r?.path&&this.#i?.path&&this.#r.path!==this.#i.path?this.#r.path:this.#t}#d(e){return"left"===e?this.#e:this.#n}#o(){return{comparisonEndOid:this.#n,comparisonStartOid:this.#e,text:this.#l,submitBatch:this.#a}}}function t6(e){let t,n,a,o,s,d,c,u,m,f,h,g,p,b,v,C,y=(0,r.c)(45);if(y[0]!==e){let{diffAnchor:i,isInDialogMode:r,isLeftSide:l,isOpen:f,isRowSelected:h,onCloseCommentDialog:g,onCommentCreated:p,diffLine:b,shouldStartNewConversationWithSuggestedChange:v,...C}=e;n=r,a=l,o=f,s=h,d=g,c=p,t=b,m=v,u=C,y[0]=e,y[1]=t,y[2]=n,y[3]=a,y[4]=o,y[5]=s,y[6]=d,y[7]=c,y[8]=u,y[9]=m}else t=y[1],n=y[2],a=y[3],o=y[4],s=y[5],d=y[6],c=y[7],u=y[8],m=y[9];let{sendAnalyticsEvent:x}=(0,ts.s)(),S=(0,l.useRef)(null),N=F(J);y[10]!==t||y[11]!==a||y[12]!==s?(f={line:t,isLeftSide:a,isRowSelected:s},y[10]=t,y[11]=a,y[12]=s,y[13]=f):f=y[13];let w=function(e){let t,n,i,a,l,o,s=(0,r.c)(18),{line:d,isLeftSide:c,isRowSelected:u}=e,m=F(G),f=F(J);s[0]!==u||s[1]!==d?(t={line:d,isRowSelected:u},s[0]=u,s[1]=d,s[2]=t):t=s[2];let h=t2(t);e:{let e,t;if(!u){n=d.blobLineNumber;break e}s[3]!==f?(e=f(),s[3]=f,s[4]=e):e=s[4];let i=e;if(!i){n=d.blobLineNumber;break e}if(!c){n=i.endLineNumber;break e}if(!h){n=i.endLineNumber??d.blobLineNumber;break e}if(s[5]!==m){let e=m();t=(0,_.Lp)(e),s[5]=m,s[6]=t}else t=s[6];let r=t.leftLines,a=r[r.length-1];n=a?.blobLineNumber??d.blobLineNumber}let g=n;t:{let e,t;if(!u){i=void 0;break t}s[7]!==f?(e=f(),s[7]=f,s[8]=e):e=s[8];let n=e;if(!n){i=void 0;break t}if(!c){i=n.startLineNumber;break t}if(!h){i=n?.startLineNumber;break t}if(s[9]!==m){let e=m();t=(0,_.Lp)(e),s[9]=m,s[10]=t}else t=s[10];let r=t.leftLines[0];i=r?.blobLineNumber}let p=i;n:{if(!d||!(0,_.xB)(d)){a=c;break n}if(!u||h){a=!1;break n}let e=f();a=e?"left"===e.endOrientation:c}let b=a;i:{if(!u){l=c;break i}if(h){l=!1;break i}let e=f();l=e?"left"===e.startOrientation:c}let v=l,C=!!p&&p!==g,y=p??void 0,L=b?"left":"right",x=C?v?"left":"right":void 0;return s[11]!==h||s[12]!==C||s[13]!==g||s[14]!==y||s[15]!==L||s[16]!==x?(o={lineNumber:g,startLineNumber:y,side:L,startSide:x,isMultiline:C,allLinesAreRetargetable:h},s[11]=h,s[12]=C,s[13]=g,s[14]=y,s[15]=L,s[16]=x,s[17]=o):o=s[17],o}(f),D=tV(t,m),{newTreeEntry:I,oldTreeEntry:j}=F(ea),{effectiveRange:k}=(0,L.L3)(),{baseOid:A,headOid:E}=(0,L.E4)(),R=(0,eR.u)("cotd_ui"),T=function(e){let t;if(e.isMultiline){let n="left"===e.startSide?"L":"R",i="left"===e.side?"L":"R";t=` lines ${n}${e.startLineNumber} to ${i}${e.lineNumber}`}else{let n="left"===e.side?"L":"R";t=` line ${n}${e.lineNumber}`}return t}(w),{mutate:O}=t4();y[14]!==R||y[15]!==O||y[16]!==t||y[17]!==k||y[18]!==E||y[19]!==I||y[20]!==j||y[21]!==c||y[22]!==u||y[23]!==w||y[24]!==A?(h=e=>{let{onCompleted:n,onError:i,submitBatch:r,text:a}=e;if(t)if(R){let e=new t5({filePath:u.filePath,newTreeEntry:I,oldTreeEntry:j,effectiveDiffRange:k,submitBatch:r,text:a});O(w.isMultiline?e.multilineRequestData({startLineNumber:w.startLineNumber,startSide:w.startSide,endLineNumber:w.lineNumber,endSide:w.side}):e.lineRequestData({lineNumber:w.lineNumber,side:w.side}),{onError:i,onSuccess:e=>{n?.(e.thread.id,e.comment?.databaseId),c?.()}})}else O({text:a,line:w.lineNumber,path:u.filePath,side:w.side,startSide:w.startSide,submitBatch:r,startLine:w.startLineNumber,comparisonEndOid:E,comparisonStartOid:A},{onError:i,onSuccess:e=>{n?.(e.thread.id,e.comment?.databaseId),c?.()}})},y[14]=R,y[15]=O,y[16]=t,y[17]=k,y[18]=E,y[19]=I,y[20]=j,y[21]=c,y[22]=u,y[23]=w,y[24]=A,y[25]=h):h=y[25];let $=h;e:{if(o&&D?.configureSuggestedChangesFromLineRange){let e;if(y[26]!==N||y[27]!==D){let t=N();e=D.configureSuggestedChangesFromLineRange(t,D?.shouldStartNewConversationWithSuggestedChange),y[26]=N,y[27]=D,y[28]=e}else e=y[28];g=e;break e}g=void 0}let M=g;if(!o)return null;y[29]===Symbol.for("react.memo_cache_sentinel")?(p=e=>{e.target===S.current&&S.current.querySelector("textarea")?.focus()},y[29]=p):p=y[29];let B=p,H=n?0:-1;y[30]!==d||y[31]!==x?(b=e=>{d(e),x("comments.cancel_thread_reply","CANCEL_REVIEW_THREAD_BUTTON")},y[30]=d,y[31]=x,y[32]=b):b=y[32];let P="left"===w.side;return y[33]!==T||y[34]!==M||y[35]!==$||y[36]!==u||y[37]!==w.lineNumber||y[38]!==w.startLineNumber||y[39]!==b||y[40]!==P?(v=(0,i.jsx)(eT,{onClose:b,showOnCloseIcon:!1,suggestedChangesConfig:M,onAddComment:$,addCommentDialogTitle:T,lineNumber:w.lineNumber,startLineNumber:w.startLineNumber,isLeftSide:P,...u}),y[33]=T,y[34]=M,y[35]=$,y[36]=u,y[37]=w.lineNumber,y[38]=w.startLineNumber,y[39]=b,y[40]=P,y[41]=v):v=y[41],y[42]!==H||y[43]!==v?(C=(0,i.jsx)("div",{className:"rounded-2 bgColor-default","data-marker-navigation-new-thread":!0,"data-marker-id":"new-comment",ref:S,tabIndex:H,onFocus:B,children:v}),y[42]=H,y[43]=v,y[44]=C):C=y[44],C}t6.displayName="StartConversation";let t7="ActionBar-module__actionBarHeight__dwJkU";var t8=n(64878);function t9(e){let t,n=(0,r.c)(4),{authorAvatarUrl:a,authorLogin:l,lineSpacingPreference:o}=e,s="compact"===o?18:20,c=`${l}'s avatar image with pending indicator`;return n[0]!==a||n[1]!==s||n[2]!==c?(t=(0,i.jsx)(t8.k,{altText:c,icon:d.DotFillIcon,iconColor:"var(--fgColor-attention, var(--color-attention-fg))",square:!1,size:s,src:a,backgroundClassName:"InProgressCommentIndicator-module__statusAvatarBackground__yiUfi",className:"InProgressCommentIndicator-module__statusAvatar__eRTUu"}),n[0]=a,n[1]=s,n[2]=c,n[3]=t):t=n[3],t}t9.displayName="InProgressCommentIndicator";var ne=n(13183),nt=n(51189),nn=n(22187);function ni(e){let t,n,a,l=(0,r.c)(13),{hasDraftComment:o,handleMouseLeaveAddCommentButton:s,handleMouseDownAddCommentButton:c,lineSpacingPreference:u,openStartConversationDialog:m,authorLogin:f,authorAvatarUrl:h}=e,{sendAnalyticsEvent:g}=(0,ts.s)(),p=(0,nn.J)();l[0]!==p||l[1]!==m||l[2]!==g?(t=e=>{let t=p();(0,ne.X)()?.registerCallback({event:e.nativeEvent,cb:e=>{g("diff-lines.inp_interaction","PRS_ADD_COMMENT_BUTTON_CLICK",{latency:e.latency}),(0,nt.au)({name:"PRS_ADD_COMMENT_BUTTON_CLICK",tags:t,value:e.latency})}}),m()},l[0]=p,l[1]=m,l[2]=g,l[3]=t):t=l[3];let v=t;return l[4]===Symbol.for("react.memo_cache_sentinel")?(n=(0,b.$)("d-flex","flex-row","ActionBar-module__addCommentButton__Z5ZZ6"),l[4]=n):n=l[4],l[5]!==h||l[6]!==f||l[7]!==c||l[8]!==s||l[9]!==v||l[10]!==o||l[11]!==u?(a=(0,i.jsx)("div",{"aria-hidden":!1,className:n,children:o?(0,i.jsx)(ey.Q,{"aria-label":"Continue comment in progress",size:"small",className:(0,b.$)("py-0","compact"===u?"ActionBar-module__addCommentButtonDraftCompact__m_rxJ":"ActionBar-module__addCommentButtonDraftRelaxed__tVF5m",t7),onClick:v,onKeyDown:nr,children:(0,i.jsx)(t9,{lineSpacingPreference:u,authorAvatarUrl:h,authorLogin:f})}):(0,i.jsx)(ey.Q,{icon:d.PlusIcon,"aria-label":"Add comment",size:"small","data-add-comment-button":!0,className:(0,b.$)("fgColor-muted","bgColor-accent-emphasis","borderColor-accent-emphasis","fgColor-onEmphasis","px-0","ActionBar-module__addCommentButtonNew__mlYWD",t7,"ActionBar-module__actionBarStartCommentWidth__pPdJV"),onKeyDown:nr,onClick:v,onMouseDown:c,onMouseLeave:s,onMouseUp:v})}),l[5]=h,l[6]=f,l[7]=c,l[8]=s,l[9]=v,l[10]=o,l[11]=u,l[12]=a):a=l[12],a}function nr(e){"Tab"===e.key&&e.shiftKey&&(e.preventDefault(),e.currentTarget.closest("td")?.focus())}ni.displayName="SimpleAddCommentButton";var na=n(47819),nl=n(99889),no=n(51705),ns=n(64714);let nd={ArrowLeft:e1.z0.ArrowHorizontal,ArrowDown:e1.z0.ArrowVertical,ArrowUp:e1.z0.ArrowVertical,ArrowRight:e1.z0.ArrowHorizontal,h:e1.z0.HL,j:e1.z0.JK,k:e1.z0.JK,l:e1.z0.HL,a:e1.z0.AD,s:e1.z0.WS,w:e1.z0.WS,d:e1.z0.AD,Tab:e1.z0.Tab,Home:e1.z0.HomeAndEnd,End:e1.z0.HomeAndEnd,Backspace:e1.z0.Backspace},nc=e1.z0.ArrowAll|e1.z0.HomeAndEnd|e1.z0.AD,nu={compact:{avatarSize:18},relaxed:{avatarSize:20}},nm={avatarUrl:"https://avatars.githubusercontent.com/ghost",id:"ghost",login:"ghost",url:"/ghost",__typename:"Author"};function nf({shouldAnimateRef:e,lineSpacingPreference:t="relaxed",threads:n,annotations:r}){(0,l.useEffect)(()=>{e?.current&&(e.current=!1)},[e]);let{avatarSize:a}=nu[t],o=n.length+r.length;if(0===o)return null;let d={},c=[];r.map(e=>{e?.annotationLevel&&c.push({id:e.id,level:e.annotationLevel})}),n.map(e=>e?.commentsData?.comments?.map(e=>{e?.author?d[e?.author.login]=e.author:nm?.login&&(d[nm.login]=nm)}));let u=[...c.sort((e,t)=>(ns.GF[e.level]?.priority||0)<(ns.GF[t.level]?.priority||0)?-1:1).map(t=>e?.current?(0,i.jsx)(ns.S,{annotationLevel:t.level},t.id):(0,i.jsx)(ns.Xh,{annotationLevel:t.level},t.id)),...Object.keys(d).map(e=>{let t=d[e]?.login,n=d[e]?.avatarUrl??(nm?.avatarUrl||" ");return(0,i.jsx)(s.r,{alt:t,size:20,src:n},t)})].slice(0,3),m=o>9?"9+":`${o}`;return(0,i.jsxs)("div",{className:(0,b.$)("d-flex","flex-justify-between","flex-items-center","CommentIndicator-module__commentIndicatorContainer__rTx6B"),children:[(0,i.jsx)(no.A,{disableExpand:!0,size:a,className:(0,b.$)("CommentIndicator-module__AvatarStack__c4pM9","relaxed"===t?"CommentIndicator-module__Relaxed__yk0Ok":"CommentIndicator-module__Compact__irtUV"),children:u}),(0,i.jsx)("span",{className:(0,b.$)("fgColor-default","ml-1","pointer","commentIndicatorText","CommentIndicator-module__textStyles__tVmbv"),children:m})]})}nf.displayName="CommentIndicator";var nh=n(89437),ng=n(49685);function np(e){let t,n,i,a,l=(0,r.c)(18),{currentHunk:o,nextHunk:s,previousHunk:d}=e,{addInjectedContextLines:c}=F(er),u=!!o&&0!==o.startBlobLineNumber,m=!!o&&!!s;l[0]!==c||l[1]!==u||l[2]!==o||l[3]!==d?(t=()=>{if(!u||!o)return;let e=d&&o&&d.endBlobLineNumber+20>o.startBlobLineNumber,t={start:Math.max(0,o.startBlobLineNumber-20),end:o.startBlobLineNumber};e&&(t.start=d.endBlobLineNumber+1),c(t)},l[0]=c,l[1]=u,l[2]=o,l[3]=d,l[4]=t):t=l[4];let f=t;l[5]!==c||l[6]!==m||l[7]!==o?(n=()=>{m&&o&&c({start:o.endBlobLineNumber+1,end:o.endBlobLineNumber+1+20})},l[5]=c,l[6]=m,l[7]=o,l[8]=n):n=l[8];let h=n;l[9]!==c||l[10]!==d?(i=()=>{d&&c({start:d.endBlobLineNumber+1,end:d.endBlobLineNumber+1+20})},l[9]=c,l[10]=d,l[11]=i):i=l[11];let g=i;return l[12]!==m||l[13]!==u||l[14]!==h||l[15]!==g||l[16]!==f?(a={expandStartOfHunk:f,expandEndOfHunk:h,expandEndOfPreviousHunk:g,canExpandEndOfHunk:m,canExpandStartOfHunk:u},l[12]=m,l[13]=u,l[14]=h,l[15]=g,l[16]=f,l[17]=a):a=l[17],a}var nb=n(79076);let nv={left:"L",right:"R"},nC="Add comment",ny="Suggest change";function nL(e,t,n){let i=n&&!(0,_.xB)(t)?nv.left:nv.right;return`${e} on line ${i}${t.blobLineNumber}`}function nx(e){let t,n,a,l,o,s,c,u,m,f,h,g,p,b,v,C=(0,r.c)(63),{diffLine:y,handleStartConversationWithSuggestedChange:L,handleStartConversation:x,isLeftSide:S,isSplit:N}=e,{selectMultipleLines:w}=F(ei),D=F(G),I=F(J);C[0]!==I?(t=I(),C[0]=I,C[1]=t):t=C[1];let j=t;C[2]!==D?(n=(0,_.Lp)(D()),C[2]=D,C[3]=n):n=C[3];let k=n,A=!!j;C[4]!==y||C[5]!==A?(a={line:y,isRowSelected:A},C[4]=y,C[5]=A,C[6]=a):a=C[6];let E=t2(a),R=k.leftLines[0],T=k.leftLines[k.leftLines.length-1];C[7]!==k.leftLines?(l=k.leftLines.every(nS),C[7]=k.leftLines,C[8]=l):l=C[8];let O=l,$=k.rightLines[0],M=k.rightLines[k.rightLines.length-1],B=0===k.rightLines.length,H=0===k.leftLines.length;C[9]!==R||C[10]!==x||C[11]!==L||C[12]!==T||C[13]!==w||C[14]!==j?(o=(e,t)=>{j&&T&&R&&R.left&&T.left&&R.key&&(w({endLineKey:T.key,endOrientation:"left",startLineKey:R.key,startOrientation:"left",firstLineSelectionOnDrag:{lineKey:R.key,lineNumber:R.left,orientation:"left",shouldStartConversation:!1}},eh),t?.withSuggestedChange?L():x())},C[9]=R,C[10]=x,C[11]=L,C[12]=T,C[13]=w,C[14]=j,C[15]=o):o=C[15];let P=o;C[16]!==$||C[17]!==x||C[18]!==L||C[19]!==M||C[20]!==w||C[21]!==j?(s=(e,t)=>{j&&M&&$&&$.right&&M.right&&$.key&&(w({endLineKey:M.key,endOrientation:"right",startLineKey:$.key,startOrientation:"right",firstLineSelectionOnDrag:{lineKey:$.key,lineNumber:$.right,orientation:"right",shouldStartConversation:!1}},eh),t?.withSuggestedChange?L():x())},C[16]=$,C[17]=x,C[18]=L,C[19]=M,C[20]=w,C[21]=j,C[22]=s):s=C[22];let K=s,U="DELETION"!==y.type;e:{if(!j){c=!1;break e}if(j.startOrientation!==j.endOrientation||j.startLineNumber!==j.endLineNumber){c=!0;break e}c=!1}let V=c,z=!1,q=!1;if(j&&V){let e,t=nv[j.startOrientation],n=nv[j.endOrientation];if(f=` on lines ${t}${j.startLineNumber}-${n}${j.endLineNumber}`,R&&T){let e;(z=!0,C[23]!==R||C[24]!==T||C[25]!==B)?(e=R.left===T.left?B?` on line L${R.left}`:`, original line L${R.left}`:B?` on lines L${R.left}-L${T.right}`:`, original lines L${R.left}-L${T.left}`,C[23]=R,C[24]=T,C[25]=B,C[26]=e):e=C[26],u=e}if($&&M){let e;(q=!0,C[27]!==E||C[28]!==$||C[29]!==N||C[30]!==M||C[31]!==H)?(e=$.right===M.right?H||N&&E?` on line R${$.right}`:`, modified line R${M.right}`:H||N&&E?` on lines R${$.right}-R${M.right}`:`, modified lines R${$.right}-R${M.right}`,C[27]=E,C[28]=$,C[29]=N,C[30]=M,C[31]=H,C[32]=e):e=C[32],m=e}return C[33]!==E||C[34]!==O||C[35]!==U||C[36]!==x||C[37]!==L||C[38]!==K||C[39]!==P||C[40]!==N||C[41]!==B||C[42]!==m||C[43]!==u||C[44]!==q||C[45]!==z||C[46]!==f?(e=(0,i.jsx)(i.Fragment,{children:N?(0,i.jsx)(i.Fragment,{children:E?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(eD.l.Item,{onSelect:K,children:[(0,i.jsx)(eD.l.LeadingVisual,{children:(0,i.jsx)(d.PlusIcon,{})}),nC+m,(0,i.jsx)(eD.l.TrailingVisual,{children:(0,i.jsx)(nb.U,{keys:"Alt+n"})})]}),(0,i.jsxs)(eD.l.Item,{onSelect:e=>K(e,{withSuggestedChange:!0}),children:[(0,i.jsx)(eD.l.LeadingVisual,{children:(0,i.jsx)(d.PlusCircleIcon,{})}),ny+m]})]}):(0,i.jsxs)(i.Fragment,{children:[z?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(eD.l.Item,{onSelect:P,children:[(0,i.jsx)(eD.l.LeadingVisual,{children:(0,i.jsx)(d.PlusIcon,{})}),nC+u,(0,i.jsx)(eD.l.TrailingVisual,{children:(0,i.jsx)(nb.U,{keys:B?"Alt+n":"Alt+Shift+N"})})]}),O&&(0,i.jsxs)(eD.l.Item,{onSelect:e=>P(e,{withSuggestedChange:!0}),children:[(0,i.jsx)(eD.l.LeadingVisual,{children:(0,i.jsx)(d.PlusCircleIcon,{})}),ny+u]})]}):null,q?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(eD.l.Item,{onSelect:K,children:[(0,i.jsx)(eD.l.LeadingVisual,{children:(0,i.jsx)(d.PlusIcon,{})}),nC+m,(0,i.jsx)(eD.l.TrailingVisual,{children:(0,i.jsx)(nb.U,{keys:"Alt+n"})})]}),(0,i.jsxs)(eD.l.Item,{onSelect:e=>K(e,{withSuggestedChange:!0}),children:[(0,i.jsx)(eD.l.LeadingVisual,{children:(0,i.jsx)(d.PlusCircleIcon,{})}),ny+m]})]}):null]})}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(eD.l.Item,{onSelect:x,children:[(0,i.jsx)(eD.l.LeadingVisual,{children:(0,i.jsx)(d.PlusIcon,{})}),nC+f]}),U&&O&&(0,i.jsxs)(eD.l.Item,{onSelect:L,children:[(0,i.jsx)(eD.l.LeadingVisual,{children:(0,i.jsx)(d.PlusCircleIcon,{})}),ny+f]})]})}),C[33]=E,C[34]=O,C[35]=U,C[36]=x,C[37]=L,C[38]=K,C[39]=P,C[40]=N,C[41]=B,C[42]=m,C[43]=u,C[44]=q,C[45]=z,C[46]=f,C[47]=e):e=C[47],e}return C[48]===Symbol.for("react.memo_cache_sentinel")?(h=(0,i.jsx)(eD.l.LeadingVisual,{children:(0,i.jsx)(d.PlusIcon,{})}),C[48]=h):h=C[48],C[49]!==S||C[50]!==y?(g=nL(nC,y,S),C[49]=S,C[50]=y,C[51]=g):g=C[51],C[52]!==x||C[53]!==g?(p=(0,i.jsxs)(eD.l.Item,{onSelect:x,children:[h,g]}),C[52]=x,C[53]=g,C[54]=p):p=C[54],C[55]!==U||C[56]!==L||C[57]!==S||C[58]!==y?(b=U&&(0,i.jsxs)(eD.l.Item,{onSelect:L,children:[(0,i.jsx)(eD.l.LeadingVisual,{children:(0,i.jsx)(d.PlusCircleIcon,{})}),nL(ny,y,S)]}),C[55]=U,C[56]=L,C[57]=S,C[58]=y,C[59]=b):b=C[59],C[60]!==p||C[61]!==b?(v=(0,i.jsxs)(i.Fragment,{children:[p,b]}),C[60]=p,C[61]=b,C[62]=v):v=C[62],v}function nS(e){return"DELETION"!==e.type}nx.displayName="StartConversationContextMenuItems";var nN=n(15582),nw=n(14864);function n_(e){let t,n,a,l,o,s,d,c=(0,r.c)(27);return c[0]!==e?(t=(0,i.jsx)(nA,{...e}),c[0]=e,c[1]=t):t=c[1],c[2]!==e.copilotChatReference||c[3]!==e.diffAnchor||c[4]!==e.diffLine||c[5]!==e.isLeftSide||c[6]!==e.viewerData.shouldDisplayComments?(n=e.viewerData.shouldDisplayComments&&!ng.W.prChatEnhancements&&(0,i.jsx)(nj,{diffAnchor:e.diffAnchor,diffLine:e.diffLine,fileDiffReference:e.copilotChatReference,isLeftSide:e.isLeftSide}),c[2]=e.copilotChatReference,c[3]=e.diffAnchor,c[4]=e.diffLine,c[5]=e.isLeftSide,c[6]=e.viewerData.shouldDisplayComments,c[7]=n):n=c[7],c[8]!==e.handleCopyCode?(a=(0,i.jsx)(n$,{handleCopyCode:e.handleCopyCode}),c[8]=e.handleCopyCode,c[9]=a):a=c[9],c[10]!==e.diffAnchor?(l=(0,i.jsx)(nk,{diffAnchor:e.diffAnchor}),c[10]=e.diffAnchor,c[11]=l):l=c[11],c[12]!==e.diffAnchor||c[13]!==e.diffLine||c[14]!==e.viewerData.shouldDisplayComments?(o=e.viewerData.shouldDisplayComments&&(0,i.jsx)(nD,{diffAnchor:e.diffAnchor,diffLine:e.diffLine}),c[12]=e.diffAnchor,c[13]=e.diffLine,c[14]=e.viewerData.shouldDisplayComments,c[15]=o):o=c[15],c[16]!==e.currentHunk||c[17]!==e.nextHunk||c[18]!==e.previousHunk?(s=(0,i.jsx)(nF,{currentHunk:e.currentHunk,nextHunk:e.nextHunk,previousHunk:e.previousHunk}),c[16]=e.currentHunk,c[17]=e.nextHunk,c[18]=e.previousHunk,c[19]=s):s=c[19],c[20]!==t||c[21]!==n||c[22]!==a||c[23]!==l||c[24]!==o||c[25]!==s?(d=(0,i.jsxs)(i.Fragment,{children:[t,n,a,l,o,s]}),c[20]=t,c[21]=n,c[22]=a,c[23]=l,c[24]=o,c[25]=s,c[26]=d):d=c[26],d}function nD(e){let t,n,a,l,o=(0,r.c)(8),{diffLine:s,diffAnchor:c}=e,u=F(J);o[0]!==c||o[1]!==u||o[2]!==s?(t=()=>{let e=u(),t=(0,_.j2)({line:s,range:e,fileAnchor:c});t&&(0,nN.D)(t)},o[0]=c,o[1]=u,o[2]=s,o[3]=t):t=o[3];let m=t;return o[4]===Symbol.for("react.memo_cache_sentinel")?(n=(0,i.jsx)(eD.l.LeadingVisual,{children:(0,i.jsx)(d.LinkIcon,{})}),o[4]=n):n=o[4],o[5]===Symbol.for("react.memo_cache_sentinel")?(a=(0,i.jsx)(eD.l.TrailingVisual,{children:(0,i.jsx)(nb.U,{keys:"Mod+Alt+y"})}),o[5]=a):a=o[5],o[6]!==m?(l=(0,i.jsxs)(eD.l.Item,{onSelect:m,onMouseDown:nI,children:[n,"Copy link",a]}),o[6]=m,o[7]=l):l=o[7],l}function nI(e){window.getSelection()?.toString()!==""&&e.preventDefault()}n_.displayName="CellContextMenu",nD.displayName="CopyAnchorLink";let nj=e=>{let t,n,a=(0,r.c)(8),l=F(J);if(a[0]!==l||a[1]!==e.diffAnchor||a[2]!==e.diffLine||a[3]!==e.isLeftSide){let n=l();t=(0,_.Av)(n,e.diffLine,e.isLeftSide,e.diffAnchor),a[0]=l,a[1]=e.diffAnchor,a[2]=e.diffLine,a[3]=e.isLeftSide,a[4]=t}else t=a[4];let o=t;return e.fileDiffReference?(a[5]!==o||a[6]!==e.fileDiffReference?(n=(0,i.jsx)(nh.w,{showDivider:!0,selectedRange:o,fileDiffReference:e.fileDiffReference}),a[5]=o,a[6]=e.fileDiffReference,a[7]=n):n=a[7],n):null};function nk(e){let t,n,a,l,o=(0,r.c)(6),{diffAnchor:s}=e;o[0]!==s?(t=()=>{setTimeout(()=>{document.querySelector(`table[data-diff-anchor="${s}"]`)?.dispatchEvent(new KeyboardEvent("keydown",{key:"a",code:"KeyA",ctrlKey:!0}))})},o[0]=s,o[1]=t):t=o[1];let c=t;return o[2]===Symbol.for("react.memo_cache_sentinel")?(n=(0,i.jsx)(eD.l.LeadingVisual,{children:(0,i.jsx)(d.MultiSelectIcon,{})}),o[2]=n):n=o[2],o[3]===Symbol.for("react.memo_cache_sentinel")?(a=(0,i.jsx)(eD.l.TrailingVisual,{children:(0,i.jsx)(nb.U,{keys:"Mod+a"})}),o[3]=a):a=o[3],o[4]!==c?(l=(0,i.jsxs)(eD.l.Item,{onSelect:c,children:[n,"Select all",a]}),o[4]=c,o[5]=l):l=o[5],l}function nA(e){let t,n,a,l,o=(0,r.c)(21),{diffLine:s,handleViewMarkersSelection:d,isLeftSide:c,isSplit:u,shouldDisplayCollapseComments:m,showStartConversation:f,startConversationCurrentLine:h,startConversationWithSuggestedChange:g,threads:p,annotations:b,viewerData:v}=e,C=b.length>0;return f||p||C?(o[0]!==s||o[1]!==c||o[2]!==u||o[3]!==f||o[4]!==h||o[5]!==g||o[6]!==v.shouldDisplayComments?(t=v.shouldDisplayComments&&f&&(0,i.jsx)(nx,{diffLine:s,handleStartConversation:h,handleStartConversationWithSuggestedChange:g,isLeftSide:c,isSplit:u}),o[0]=s,o[1]=c,o[2]=u,o[3]=f,o[4]=h,o[5]=g,o[6]=v.shouldDisplayComments,o[7]=t):t=o[7],o[8]!==b||o[9]!==s||o[10]!==d||o[11]!==c||o[12]!==u||o[13]!==m||o[14]!==p||o[15]!==v?(n=(0,i.jsx)(nE,{threads:p,annotations:b,diffLine:s,handleViewMarkersSelection:d,isLeftSide:c,isSplit:u,shouldDisplayCollapseComments:m,viewerData:v}),o[8]=b,o[9]=s,o[10]=d,o[11]=c,o[12]=u,o[13]=m,o[14]=p,o[15]=v,o[16]=n):n=o[16],o[17]===Symbol.for("react.memo_cache_sentinel")?(a=(0,i.jsx)(eD.l.Divider,{}),o[17]=a):a=o[17],o[18]!==t||o[19]!==n?(l=(0,i.jsxs)(i.Fragment,{children:[t,n,a]}),o[18]=t,o[19]=n,o[20]=l):l=o[20],l):null}function nE(e){let t,n=(0,r.c)(14),{diffLine:a,handleViewMarkersSelection:l,isLeftSide:o,isSplit:s,threads:d,annotations:c,shouldDisplayCollapseComments:u,viewerData:m}=e;if(m.commentsPreference===nl.sI.Visible)return null;if(!s){let e,t;return n[0]!==l?(e=()=>l(),n[0]=l,n[1]=e):e=n[1],n[2]!==c||n[3]!==a||n[4]!==u||n[5]!==e||n[6]!==d?(t=(0,i.jsx)(nT,{threads:d,annotations:c,diffLine:a,onSelect:e,shouldDisplayCollapseComments:u}),n[2]=c,n[3]=a,n[4]=u,n[5]=e,n[6]=d,n[7]=t):t=n[7],t}return n[8]!==c||n[9]!==l||n[10]!==o||n[11]!==u||n[12]!==d?(t=(0,i.jsx)(nR,{threads:d,annotations:c,handleViewMarkersSelection:l,isLeftSide:o,shouldDisplayCollapseComments:u}),n[8]=c,n[9]=l,n[10]=o,n[11]=u,n[12]=d,n[13]=t):t=n[13],t}function nR(e){let t,n,a=(0,r.c)(13),{handleViewMarkersSelection:l,isLeftSide:o,shouldDisplayCollapseComments:s,threads:d,annotations:c}=e,u=d.length>0,m=c.length>0;if(o){let e,t;return a[0]!==l||a[1]!==u||a[2]!==s?(e=u&&(0,i.jsx)(nO,{text:s?"Collapse comments":"Expand comments",onSelect:()=>l("LEFT")}),a[0]=l,a[1]=u,a[2]=s,a[3]=e):e=a[3],a[4]!==e?(t=(0,i.jsx)(i.Fragment,{children:e}),a[4]=e,a[5]=t):t=a[5],t}return a[6]!==l||a[7]!==m||a[8]!==u||a[9]!==s?(t=(u||m)&&(0,i.jsx)(nO,{text:s?"Collapse comments":"Expand comments",onSelect:()=>l("RIGHT")}),a[6]=l,a[7]=m,a[8]=u,a[9]=s,a[10]=t):t=a[10],a[11]!==t?(n=(0,i.jsx)(i.Fragment,{children:t}),a[11]=t,a[12]=n):n=a[12],n}function nT(e){let t,n,a=(0,r.c)(5),{diffLine:l,onSelect:o,threads:s,annotations:d,shouldDisplayCollapseComments:c}=e;if(!(l&&(s.length>0||d.length>0)))return null;let u=c?"Collapse comments":"Expand comments";return a[0]!==o?(t=()=>o(),a[0]=o,a[1]=t):t=a[1],a[2]!==u||a[3]!==t?(n=(0,i.jsx)(nO,{text:u,onSelect:t}),a[2]=u,a[3]=t,a[4]=n):n=a[4],n}function nO(e){let t,n,a=(0,r.c)(4),{onSelect:l,text:o}=e;return a[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,i.jsx)(eD.l.LeadingVisual,{children:(0,i.jsx)(d.CommentDiscussionIcon,{})}),a[0]=t):t=a[0],a[1]!==l||a[2]!==o?(n=(0,i.jsxs)(eD.l.Item,{onSelect:l,children:[t,o]}),a[1]=l,a[2]=o,a[3]=n):n=a[3],n}function n$(e){let t,n,a,l=(0,r.c)(4),{handleCopyCode:o}=e;return l[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,i.jsx)(eD.l.LeadingVisual,{children:(0,i.jsx)(d.CopyIcon,{})}),l[0]=t):t=l[0],l[1]===Symbol.for("react.memo_cache_sentinel")?(n=(0,i.jsx)(eD.l.TrailingVisual,{children:(0,i.jsx)(nb.U,{keys:"Mod+c"})}),l[1]=n):n=l[1],l[2]!==o?(a=(0,i.jsxs)(eD.l.Item,{onSelect:o,onMouseDown:nM,children:[t,"Copy",n]}),l[2]=o,l[3]=a):a=l[3],a}function nM(e){window.getSelection()?.toString()!==""&&e.preventDefault()}function nF(e){let t,n,a,l,o=(0,r.c)(12),{currentHunk:s,nextHunk:d,previousHunk:c}=e,u=F(Z);o[0]!==s||o[1]!==d||o[2]!==c?(t={currentHunk:s,nextHunk:d,previousHunk:c},o[0]=s,o[1]=d,o[2]=c,o[3]=t):t=o[3];let{canExpandStartOfHunk:m,canExpandEndOfHunk:f}=np(t);return m||f||c||d?(o[4]===Symbol.for("react.memo_cache_sentinel")?(n=(0,i.jsx)(eD.l.Divider,{}),o[4]=n):n=o[4],o[5]!==s||o[6]!==u||o[7]!==d||o[8]!==c?(a=u.has(nw.YR.expandLines)?null:(0,i.jsx)(nB,{currentHunk:s,nextHunk:d,previousHunk:c}),o[5]=s,o[6]=u,o[7]=d,o[8]=c,o[9]=a):a=o[9],o[10]!==a?(l=(0,i.jsxs)(i.Fragment,{children:[n,a]}),o[10]=a,o[11]=l):l=o[11],l):null}function nB(e){let t,n,a,l,o=(0,r.c)(13),{currentHunk:s,nextHunk:c,previousHunk:u}=e;o[0]!==s||o[1]!==c||o[2]!==u?(t={currentHunk:s,nextHunk:c,previousHunk:u},o[0]=s,o[1]=c,o[2]=u,o[3]=t):t=o[3];let{canExpandStartOfHunk:m,expandEndOfHunk:f,expandStartOfHunk:h,canExpandEndOfHunk:g}=np(t);return o[4]!==m||o[5]!==h?(n=m&&(0,i.jsxs)(eD.l.Item,{onSelect:h,children:[(0,i.jsx)(eD.l.LeadingVisual,{children:(0,i.jsx)(d.FoldUpIcon,{})}),"Expand above"]}),o[4]=m,o[5]=h,o[6]=n):n=o[6],o[7]!==g||o[8]!==f?(a=g&&(0,i.jsxs)(eD.l.Item,{onSelect:f,children:[(0,i.jsx)(eD.l.LeadingVisual,{children:(0,i.jsx)(d.FoldDownIcon,{})}),"Expand below"]}),o[7]=g,o[8]=f,o[9]=a):a=o[9],o[10]!==n||o[11]!==a?(l=(0,i.jsxs)(i.Fragment,{children:[n,a]}),o[10]=n,o[11]=a,o[12]=l):l=o[12],l}async function nH({diffLine:e,diffLines:t,getSelectedDiffLines:n,getSelectedLineRange:i,isSplit:r,isLeftSide:a}){let l,o=window.getSelection();if(o&&""!==o.toString())return void document.execCommand("copy");let s=n().length<=1;switch(!0){case s:l=nK(e);break;case r:l=nU({diffLines:t,diffOrientation:a?"left":"right",getSelectedLineRange:i});break;default:l=nP({diffLines:t,getSelectedLineRange:i})}await (0,nN.D)(l)}nj.displayName="CopilotListItems",nk.displayName="SelectAllListItem",nA.displayName="MarkerListItems",nE.displayName="ViewMarkerListItems",nR.displayName="SplitDiffMarkersListItems",nT.displayName="UnifiedDiffMarkerListItem",nO.displayName="MarkerListItem",n$.displayName="CopyContentListItems",nF.displayName="HunkListItems",nB.displayName="ExpandHunksListItems";let nP=({diffLines:e,getSelectedLineRange:t})=>{let n=t();if(!n)return"";let{startOrientation:i,endOrientation:r,startLineNumber:a,endLineNumber:l}=n,o=0,s=0;return e.length>1&&(o=e.findIndex(e=>"left"===i?e.left===a:e.right===a),s=e.findIndex(e=>"left"===r?e.left===l:e.right===l)),(0,_.Ls)(e.slice(o,s+1))},nK=e=>(0,_.Po)(e)||!e?"":(0,_.Ls)([e]),nU=({diffLines:e,diffOrientation:t,getSelectedLineRange:n})=>{if(void 0===t)return"";let i=n();if(!i)return"";let r=(0,_.Mk)(e),{selectedRightLines:a,selectedLeftLines:l}=D({selectedLineRange:i,leftLines:r.leftLines,rightLines:r.rightLines});return"left"===t?(0,_.Ls)(l):(0,_.Ls)(a)};function nV(e){let t,n,a,o,s,c,u,m,f,h,g=(0,r.c)(53),{showStartConversation:p,viewerData:v,openStartConversationDialog:C,threads:y,annotations:L,shouldDisplayMinimizedComments:x,diffAnchor:S,diffLine:N,isLeftSide:w,isSplit:_,nextHunk:D,previousHunk:I,currentHunk:j,copilotChatReference:k,shouldDisplayCollapseComments:A,toggleViewingMarkers:E,setShouldStartNewConversationWithSuggestedChange:R,setIsContextMenuOpen:T,contextMenuOpen:O}=e,$=(0,l.useRef)(null),M=y.reduce(nz,0),B=L.length,{commentsPreference:H,lineSpacingPreference:P}=v,K=F(W),U=F(G),V=F(J);g[0]!==N||g[1]!==K||g[2]!==U||g[3]!==V||g[4]!==w||g[5]!==_?(t=async()=>{let e=K();await nH({diffLine:N,diffLines:e,getSelectedDiffLines:U,getSelectedLineRange:V,isSplit:_,isLeftSide:w})},g[0]=N,g[1]=K,g[2]=U,g[3]=V,g[4]=w,g[5]=_,g[6]=t):t=g[6];let z=t,q=M+B>0&&H===nl.sI.Collapsed;g[7]!==L.length||g[8]!==y.length||g[9]!==E?(n=e=>{(1===y.length||1===L.length)&&e.preventDefault(),E?.()},g[7]=L.length,g[8]=y.length,g[9]=E,g[10]=n):n=g[10];let X=n;return g[11]===Symbol.for("react.memo_cache_sentinel")?(a=(0,b.$)("d-flex","flex-row","ActionBar-module__action-bar-position__QToB4"),g[11]=a):a=g[11],g[12]!==L||g[13]!==O||g[14]!==X||g[15]!==P||g[16]!==x||g[17]!==y||g[18]!==q?(o=q&&x&&(0,i.jsx)(ey.Q,{"aria-expanded":O,"aria-label":"View comments",size:"small",className:(0,b.$)("py-0","px-1",t7),onClick:X,children:(0,i.jsx)(nf,{threads:y,annotations:L,lineSpacingPreference:P})}),g[12]=L,g[13]=O,g[14]=X,g[15]=P,g[16]=x,g[17]=y,g[18]=q,g[19]=o):o=g[19],g[20]!==O||g[21]!==T?(s=()=>T(!O),g[20]=O,g[21]=T,g[22]=s):s=g[22],g[23]===Symbol.for("react.memo_cache_sentinel")?(c=(0,b.$)("fgColor-muted","ActionBar-module__actionBarArrowSizing__T5m0o"),g[23]=c):c=g[23],g[24]!==O||g[25]!==T?(u=(0,i.jsx)(e_.W.Anchor,{children:(0,i.jsx)(ey.Q,{ref:$,"aria-haspopup":"true","aria-label":"More actions",icon:d.TriangleDownIcon,size:"small",className:c,onClick:()=>T(!O)})}),g[24]=O,g[25]=T,g[26]=u):u=g[26],g[27]!==L||g[28]!==k||g[29]!==j||g[30]!==S||g[31]!==N||g[32]!==z||g[33]!==w||g[34]!==_||g[35]!==D||g[36]!==C||g[37]!==I||g[38]!==R||g[39]!==A||g[40]!==p||g[41]!==y||g[42]!==E||g[43]!==v?(m=(0,i.jsx)(e_.W.Overlay,{width:"medium",children:(0,i.jsx)(eD.l,{children:(0,i.jsx)(n_,{threads:y,annotations:L,currentHunk:j,diffAnchor:S,diffLine:N,shouldDisplayCollapseComments:A,copilotChatReference:k,showStartConversation:p,handleCopyCode:z,handleViewMarkersSelection:E,isLeftSide:w,isSplit:_,nextHunk:D,previousHunk:I,startConversationCurrentLine:C,startConversationWithSuggestedChange:R,viewerData:v})})}),g[27]=L,g[28]=k,g[29]=j,g[30]=S,g[31]=N,g[32]=z,g[33]=w,g[34]=_,g[35]=D,g[36]=C,g[37]=I,g[38]=R,g[39]=A,g[40]=p,g[41]=y,g[42]=E,g[43]=v,g[44]=m):m=g[44],g[45]!==O||g[46]!==s||g[47]!==u||g[48]!==m?(f=(0,i.jsxs)(e_.W,{anchorRef:$,open:O,onOpenChange:s,children:[u,m]}),g[45]=O,g[46]=s,g[47]=u,g[48]=m,g[49]=f):f=g[49],g[50]!==o||g[51]!==f?(h=(0,i.jsx)(i.Fragment,{children:(0,i.jsx)("div",{"aria-hidden":!1,className:a,children:(0,i.jsxs)(na.A,{className:"ActionBar-module__action-bar-button-group___4uda",children:[o,f]})})}),g[50]=o,g[51]=f,g[52]=h):h=g[52],h}function nz(e,t){return e+(t.commentsData?.comments.length??0)}nV.displayName="SimpleContextMenu";let nq=new Set,nG=!1,nW=e=>{let t=e.target instanceof Node?e.target:null;for(let e of nq){let{element:n,shouldIgnore:i,onPointerExit:r}=e;if(!n.isConnected){nq.delete(e);continue}if(t&&n.contains(t)){e.pendingExit=!1;continue}e.pendingExit=!0,i?.()||(e.pendingExit=!1,r())}0===nq.size&&nX()},nX=()=>{nG&&g.XC&&!(nq.size>0)&&(g.XC.removeEventListener("pointermove",nW),nG=!1)};function nJ(e){let t,n,a,o,s,d,c,u,m,f,h=(0,r.c)(54),{ref:p,annotations:b,authorAvatarUrl:v,authorLogin:C,copilotChatReference:y,currentHunk:L,diffAnchor:x,diffLine:S,hasDraftComment:N,handleMouseLeaveAddCommentButton:w,handleMouseDownAddCommentButton:_,isLeftSide:D,isSplit:I,nextHunk:j,previousHunk:k,shouldDisplayCollapseComments:A,shouldDisplayMinimizedComments:E,shouldDisplayComments:R,threads:T,toggleViewingMarkers:O,viewerData:M,openStartConversationDialog:B,setIsContextMenuOpen:H,cellId:P,isAddCommentBoxOpen:K,filePath:U,contextMenuOpen:V}=e,z=F(J);e:{if(!R){t=!0;break e}if(K||!M.viewerCanComment){t=!1;break e}t=!0}let q=t,G=F(ed);h[0]!==P||h[1]!==G?(n=()=>{G(P)},h[0]=P,h[1]=G,h[2]=n):n=h[2];let W=(0,l.useEffectEvent)(n);h[3]!==p||h[4]!==V||h[5]!==W?(a=()=>{if(p?.current)return function(e){let{element:t}=e;if(!t)return()=>{};let n={...e,pendingExit:!1};return nq.add(n),!nG&&g.XC&&(g.XC.addEventListener("pointermove",nW),nG=!0),()=>{nq.delete(n),nX()}}({element:p?.current,shouldIgnore:()=>V,onPointerExit:W})},h[3]=p,h[4]=V,h[5]=W,h[6]=a):a=h[6],h[7]!==p||h[8]!==P||h[9]!==V?(o=[p,V,P],h[7]=p,h[8]=P,h[9]=V,h[10]=o):o=h[10],(0,l.useEffect)(a,o),h[11]!==x||h[12]!==S||h[13]!==U||h[14]!==z||h[15]!==D?(s=()=>{let e=z();e||(e={startLineNumber:S.blobLineNumber,endLineNumber:S.blobLineNumber,startOrientation:D?"left":"right",endOrientation:D?"left":"right",diffAnchor:x});let t=new $.L(e,U);g.cg?.dispatchEvent(t)},h[11]=x,h[12]=S,h[13]=U,h[14]=z,h[15]=D,h[16]=s):s=h[16];let X=s;h[17]!==v||h[18]!==C||h[19]!==_||h[20]!==w||h[21]!==N||h[22]!==X||h[23]!==B||h[24]!==q||h[25]!==M.lineSpacingPreference?(d=q&&(0,i.jsx)(ni,{hasDraftComment:N,handleMouseLeaveAddCommentButton:w,handleMouseDownAddCommentButton:_,lineSpacingPreference:M.lineSpacingPreference,openStartConversationDialog:()=>{B(!1),X()},authorLogin:C,authorAvatarUrl:v}),h[17]=v,h[18]=C,h[19]=_,h[20]=w,h[21]=N,h[22]=X,h[23]=B,h[24]=q,h[25]=M.lineSpacingPreference,h[26]=d):d=h[26],h[27]!==X||h[28]!==B?(c=()=>{B(!1),X()},u=()=>{B(!0),X()},h[27]=X,h[28]=B,h[29]=c,h[30]=u):(c=h[29],u=h[30]);let Q=E??!1;return h[31]!==b||h[32]!==V||h[33]!==y||h[34]!==L||h[35]!==x||h[36]!==S||h[37]!==D||h[38]!==I||h[39]!==j||h[40]!==k||h[41]!==H||h[42]!==A||h[43]!==q||h[44]!==c||h[45]!==u||h[46]!==Q||h[47]!==T||h[48]!==O||h[49]!==M?(m=(0,i.jsx)(nV,{showStartConversation:q,viewerData:M,openStartConversationDialog:c,setShouldStartNewConversationWithSuggestedChange:u,setIsContextMenuOpen:H,contextMenuOpen:V,threads:T,annotations:b,shouldDisplayMinimizedComments:Q,diffAnchor:x,diffLine:S,isLeftSide:D,isSplit:I,nextHunk:j,previousHunk:k,currentHunk:L,copilotChatReference:y,shouldDisplayCollapseComments:A,toggleViewingMarkers:O}),h[31]=b,h[32]=V,h[33]=y,h[34]=L,h[35]=x,h[36]=S,h[37]=D,h[38]=I,h[39]=j,h[40]=k,h[41]=H,h[42]=A,h[43]=q,h[44]=c,h[45]=u,h[46]=Q,h[47]=T,h[48]=O,h[49]=M,h[50]=m):m=h[50],h[51]!==m||h[52]!==d?(f=(0,i.jsxs)(i.Fragment,{children:[d,m]}),h[51]=m,h[52]=d,h[53]=f):f=h[53],f}function nQ(e){let t,n,a,l=(0,r.c)(5),{isSplit:o}=e,s=!o&&"hunk-kebab-icon-unified";return l[0]!==s?(t=(0,b.$)("hunk-kebab-icon pr-2 pb-1",s),l[0]=s,l[1]=t):t=l[1],l[2]===Symbol.for("react.memo_cache_sentinel")?(n=(0,i.jsx)(d.KebabHorizontalIcon,{}),l[2]=n):n=l[2],l[3]!==t?(a=(0,i.jsx)("div",{className:t,children:n}),l[3]=t,l[4]=a):a=l[4],a}nJ.displayName="SimpleActionBar",nJ.displayName="ActionBar",nQ.displayName="HunkKebabIcon";class nY{#c=[];#u=new Map;#m=new Set;focusedGridCell;lastSelectedGridCell;#f;#h;#g;constructor(e,t,n,i,r){this.#h=e,this.#g=t,this.#p(n,i),this.focusFirstGridCell(r)}moveToNextItem(e,t){let n,i=this.#u.get(this.focusedGridCell?.cellId??"");if(!i)return;let[r]=i,[,a]=i,l=!1;switch(("ArrowDown"===e||"ArrowUp"===e)&&this.#b(r)&&void 0!==this.#f&&(a=this.#f,l=!0),!0){case t&&"Home"===e:this.focusFirstGridCell();break;case t&&"End"===e:{let e=this.#c.length-1,t=this.#c[e]?.length;t&&(n=this.#c[e]?.[t-1]);break}case"ArrowUp"===e:this.#b(r-1)?(this.#v(r,a),n=this.#c[r-1]?.[0]):n=this.#c[r-1]?.[a];break;case"ArrowDown"===e:this.#b(r+1)?(this.#v(r,a),n=this.#c[r+1]?.[0]):n=this.#c[r+1]?.[a];break;case"ArrowLeft"===e:n=this.#c[r]?.[a-1];break;case"ArrowRight"===e:n=this.#c[r]?.[a+1]}return n&&(this.focusedGridCell=n),l&&n&&!n.isHunk&&(this.#f=void 0),this.focusedGridCell}reinitializeGrid(e,t){this.#p(e,t)}focusFirstGridCell(e){e&&this.#u.get(e)?this.focusGridCell(e):this.focusedGridCell=this.#c[0]?.[0]}focusGridCell(e){if(this.focusedGridCell?.cellId===e)return;let t=this.#u.get(e);if(!t)return;let[n,i]=t;this.focusedGridCell=this.#c[n]?.[i]}getNextSelectableCell(e){let t,n=this.getValidSelectableRowCell()||this.focusedGridCell,i=this.lastSelectedGridCell||n,r=this.#u.get(i?.cellId??"");if(!r)return;let[a,l]=r;if("ArrowUp"===e){let e=a-1;for(;!t&&e>=0;)t=this.#C({rowIndex:e,columnIndex:l}),e--}if("ArrowDown"===e){let e=a+1;for(;!t&&ee[0]&&!e[0].isHunk);return e?.find(e=>!e.isEmpty)}getLastCodeCell(){let e=this.#c.slice().reverse().find(e=>e[0]&&!e[0].isHunk);return e?.slice().reverse().find(e=>!e.isEmpty)}hasLine(e,t,n){let i=(0,_.qX)(this.#h,e,t),r=(0,_.u6)(i,0),a=this.#u.get(r);if(!a)return!1;let[l]=a;return!!n===this.#b(l)}#C({rowIndex:e,columnIndex:t}){let n=this.#c[e],i=n?.[t];switch(!0){case i?.isHunk:return;case i?.orientation==="left"&&i.isEmpty:return n?.[t+2];case i?.orientation==="right"&&i.isEmpty&&this.#g:return n?.[t-2];case i?.orientation==="right"&&i.isEmpty&&!this.#g:return n?.[t+1];default:return n?.[t]}}#p(e,t){this.#c=[],this.#u=new Map,this.#m=new Set;for(let n=0;n{0!==e.tabIndex&&(e.tabIndex=0)})}function n1({addLineToSelection:e,clearSelectedLines:t,containerRef:n,fileAnchor:i,getfirstLineSelectionOnDrag:a,isSplitDiff:o,leftLines:s,rightLines:d,selectMultipleLines:c,disabled:u}){var f;let h,g,p,b,v,C,y,L,x=(0,l.useRef)(void 0),S=(0,l.useMemo)(()=>new nY(i,o,s,d,x.current?.focusedGridCell?.cellId),[i,o,s,d]);(0,l.useEffect)(()=>{x.current=S},[S]),(0,l.useEffect)(()=>{let e=n.current,t=()=>{S.clearLastSelectedCell()};return e?.addEventListener("mousedown",t),()=>e?.removeEventListener("mousedown",t)},[n,S]),f=x.current,(p=(0,r.c)(8))[0]!==n||p[1]!==i||p[2]!==S||p[3]!==s||p[4]!==f||p[5]!==d?(h=()=>{if(f&&document.activeElement){let e=function(e,t,n){let i=[];for(let r=0;r{let t=e.target.getAttribute("data-grid-cell-id");t&&S.focusGridCell(t)},y[0]=S,y[1]=b):b=y[1],L=b,y[2]!==n||y[3]!==L?(v=()=>{let e=n.current;return e?.addEventListener("focusin",L),()=>e?.removeEventListener("focusin",L)},C=[n,L],y[2]=n,y[3]=L,y[4]=v,y[5]=C):(v=y[4],C=y[5]),(0,l.useEffect)(v,C);let N=(0,l.useCallback)((n,i,r)=>{let l=S.getValidSelectableRowCell();switch(!0){case(r.metaKey||r.ctrlKey)&&"KeyA"===r.code:{let e=S.getFirstCodeCell(),t=S.getLastCodeCell();if(!e||!t)return i;return e.lineKey&&e.lineNumber&&e.orientation&&c({endLineKey:t.lineKey,endOrientation:t.orientation,startLineKey:e.lineKey,startOrientation:e.orientation,firstLineSelectionOnDrag:{lineKey:e.lineKey,lineNumber:e.lineNumber,orientation:e.orientation,shouldStartConversation:!1}},eh),i}case r.shiftKey&&"ArrowDown"===r.key:{let t=S.getNextSelectableCell("ArrowDown");if(!t||!l)return i;return a()?e({lineKey:t.lineKey,orientation:t.orientation},eh):l.lineKey&&l.lineNumber&&l.orientation&&c({endLineKey:t.lineKey,endOrientation:t.orientation,startLineKey:l.lineKey,startOrientation:l.orientation,firstLineSelectionOnDrag:{lineKey:l.lineKey,lineNumber:l.lineNumber,orientation:l.orientation,shouldStartConversation:!1}},eh),n0(t.cellId),i}case r.shiftKey&&"ArrowUp"===r.key:{let t=S.getNextSelectableCell("ArrowUp");if(!t||!l)return i;return a()?e({lineKey:t.lineKey,orientation:t.orientation},eh):l.lineKey&&l.lineNumber&&l.orientation&&c({endLineKey:l.lineKey,endOrientation:l.orientation,startLineKey:t.lineKey,startOrientation:t.orientation,firstLineSelectionOnDrag:{lineKey:l.lineKey,lineNumber:l.lineNumber,orientation:l.orientation,shouldStartConversation:!1}},eh),n0(t.cellId),i}case"ArrowLeft"===r.key&&r.metaKey&&r.shiftKey:return i;case(r.metaKey||r.altKey)&&"ArrowLeft"===r.key:return void(0,m.OE)();case(r.metaKey||r.altKey)&&"ArrowRight"===r.key:return void(0,m.Qb)();default:{let e=S.moveToNextItem(r.key,r.ctrlKey),n=e&&document.querySelector(`[data-grid-cell-id=${e.cellId}]`);return t(),S.clearLastSelectedCell(),n??void 0}}},[e,a,S,c,t]);return(0,eZ.G)({containerRef:n,bindKeys:nc,getNextFocusable:N,focusableElementFilter:e=>"TD"===e.tagName&&"gridcell"===e.getAttribute("role"),focusInStrategy:"previous",disabled:u},[N]),{gridNavigator:S}}function n0(e){let t=g.XC?.querySelector(`[data-grid-cell-id=${e}]`);!function(e){if(!g.XC||!g.cg||!e)return!1;let t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(g.cg.innerHeight||g.XC.documentElement.clientHeight)&&t.right<=(g.cg.innerWidth||g.XC.documentElement.clientWidth)}(t)&&t?.scrollIntoView({block:"nearest",inline:"nearest"})}function n2(e){var t;(t=e.key)in nd&&(nd[t]&nc)>0&&e.stopPropagation()}function n3(e){let t,n,a,o,s,d,c,u=(0,r.c)(22),{diffAnchor:m,diffLine:f,isSplit:h,renderHunkButton:g}=e,p=(0,l.useRef)(null),[b,v]=function(e){let t,n,i,a,o,s,d,c=(0,r.c)(17),[u,m]=(0,l.useState)(!1),[f,h]=(0,l.useState)(!1),g=u?0:-1;c[0]!==e?(t=t=>{e.current&&e.current.contains(t.relatedTarget)||m(!1)},c[0]=e,c[1]=t):t=c[1];let p=t;c[2]!==e?(n=()=>{e.current===document.activeElement&&m(!0)},c[2]=e,c[3]=n):n=c[3];let b=n;c[4]!==e?(i=t=>{e.current&&!e.current.contains(t.relatedTarget)&&m(!1),h(!1)},c[4]=e,c[5]=i):i=c[5];let v=i;c[6]===Symbol.for("react.memo_cache_sentinel")?(a=e=>{e.stopPropagation(),h(!0)},c[6]=a):a=c[6];let C=a;c[7]!==p||c[8]!==b?(o={onFocus:b,onBlur:p},c[7]=p,c[8]=b,c[9]=o):o=c[9];let y=o,L=!f;c[10]!==g||c[11]!==v||c[12]!==L?(s={"aria-hidden":L,tabIndex:g,onBlur:v,onFocusCapture:C,onKeyDownCapture:n2},c[10]=g,c[11]=v,c[12]=L,c[13]=s):s=c[13];let x=s;return c[14]!==x||c[15]!==y?(d=[y,x],c[14]=x,c[15]=y,c[16]=d):d=c[16],d}(p);if(u[0]!==m||u[1]!==f){let e=(0,_.qX)(m,f,f);t=(0,_.u6)(e,0),u[0]=m,u[1]=f,u[2]=t}else t=u[2];let C=t;u[3]!==m||u[4]!==f.blobLineNumber||u[5]!==f.type?(n=(0,w.IQ)(m,(0,w.XU)(f.type),f.blobLineNumber),u[3]=m,u[4]=f.blobLineNumber,u[5]=f.type,u[6]=n):n=u[6];let y=n;u[7]===Symbol.for("react.memo_cache_sentinel")?(a={userSelect:"none",position:"relative",backgroundColor:"var(--bgColor-accent-muted, var(--color-accent-subtle))",flexGrow:1},u[7]=a):a=u[7],u[8]!==v||u[9]!==h||u[10]!==g?(o=g?.(v)??(0,i.jsx)(nQ,{isSplit:h}),u[8]=v,u[9]=h,u[10]=g,u[11]=o):o=u[11];let L=f.html;return u[12]!==L?(s=(0,i.jsx)("code",{className:"diff-text-cell hunk",children:(0,i.jsx)(eF.$6,{className:"diff-text-inner color-fg-muted",html:L})}),u[12]=L,u[13]=s):s=u[13],u[14]!==o||u[15]!==s?(d=(0,i.jsxs)("div",{className:"d-flex flex-row",children:[o,s]}),u[14]=o,u[15]=s,u[16]=d):d=u[16],u[17]!==C||u[18]!==b||u[19]!==y||u[20]!==d?(c=(0,i.jsx)("td",{ref:p,colSpan:4,"data-grid-cell-id":C,"data-line-anchor":y,role:"gridcell",style:a,tabIndex:-1,valign:"top",className:"diff-hunk-cell focusable-grid-cell left-side",...b,children:d}),u[17]=C,u[18]=b,u[19]=y,u[20]=d,u[21]=c):c=u[21],c}n3.displayName="HunkCell";let n4="ExpandableHunkHeaderDiffLine-module__expand-up-and-down__LHSa8";function n5(e){let t,n,a,l,o,s,d,c,u,m,f,h,g=(0,r.c)(24);g[0]!==e?({direction:o,icon:t,isSplit:s,label:d,onClick:c,ariaLabel:a,className:l,...n}=e,g[0]=e,g[1]=t,g[2]=n,g[3]=a,g[4]=l,g[5]=o,g[6]=s,g[7]=d,g[8]=c):(t=g[1],n=g[2],a=g[3],l=g[4],o=g[5],s=g[6],d=g[7],c=g[8]);let{sendAnalyticsEvent:p}=(0,ts.s)();g[9]!==c||g[10]!==p?(u=()=>{c(),p("file_entry.expand_hunk","FILE_EXPANDER_BUTTON")},g[9]=c,g[10]=p,g[11]=u):u=g[11];let v=!s&&"ExpandableHunkHeaderDiffLine-module__expand-button-unified__H6Vo1";g[12]!==l||g[13]!==v?(m=(0,b.$)("Button Button--iconOnly Button--invisible","ExpandableHunkHeaderDiffLine-module__expand-button-line__Nw5Pq",v,l),g[12]=l,g[13]=v,g[14]=m):m=g[14];let C=a??d;return g[15]!==t?(f=(0,i.jsx)(t,{}),g[15]=t,g[16]=f):f=g[16],g[17]!==n||g[18]!==o||g[19]!==u||g[20]!==m||g[21]!==C||g[22]!==f?(h=(0,i.jsx)("button",{onClick:u,className:m,"aria-label":C,"data-direction":o,...n,children:f}),g[17]=n,g[18]=o,g[19]=u,g[20]=m,g[21]=C,g[22]=f,g[23]=h):h=g[23],h}function n6(e){let t,n,a,l,o,s,c,u,m,f,h,g=(0,r.c)(24),{currentHunk:p,diffAnchor:b,diffLine:v,isSplit:C,nextHunk:y,nextLine:L,previousHunk:x,prevLine:S}=e;g[0]!==p||g[1]!==y||g[2]!==x?(t={currentHunk:p,nextHunk:y,previousHunk:x},g[0]=p,g[1]=y,g[2]=x,g[3]=t):t=g[3];let{expandStartOfHunk:N,expandEndOfPreviousHunk:w}=np(t),_=0===v.position&&0!==v.blobLineNumber||!S,D=!L,I=0===v.blobLineNumber,j=F(en),k=_||D,A=D&&S?.blobLineNumber===j;e:{if(k||v.blobLineNumber<=0){n=!1;break e}if(v.blobLineNumber-S.blobLineNumber<=20||L.blobLineNumber-v.blobLineNumber>=20){n=!0;break e}n=!1}let E=n;t:{if(k||A){a=!1;break t}if(v.blobLineNumber-S.blobLineNumber>20){a=!0;break t}a=!1}let R=a;n:{if(v.blobLineNumber<=0||I){l=!1;break n}if(_){l=!0;break n}l=!1}let T=l;i:{if(_||A){o=!1;break i}if(D){o=!0;break i}o=!1}let O=o;r:{switch(!0){case E:s="expand-all";break r;case R:s="expand-up-and-down";break r;case T:s="expand-up";break r;case O:s="expand-down";break r}s=void 0}let $=s;g[4]!==N?(c=()=>N(),g[4]=N,g[5]=c):c=g[5];let M=c;g[6]!==w?(u=()=>w(),g[6]=w,g[7]=u):u=g[7];let B=u;g[8]!==N?(m=()=>N(),g[8]=N,g[9]=m):m=g[9];let H=m,P=F(Z);g[10]!==$||g[11]!==M||g[12]!==H||g[13]!==B||g[14]!==P||g[15]!==C||g[16]!==L?.blobLineNumber||g[17]!==S?.blobLineNumber?(f=e=>{if(P.has(nw.YR.expandLines))return null;switch($){case"expand-all":return(0,i.jsx)(n5,{...e,direction:"all",icon:d.UnfoldIcon,isSplit:C,label:`Expand file from line ${S?.blobLineNumber||""} to line ${L?.blobLineNumber||""}`,onClick:H});case"expand-up-and-down":return(0,i.jsxs)("div",{className:"d-flex flex-column",children:[(0,i.jsx)(n5,{...e,direction:"down",icon:d.FoldDownIcon,isSplit:C,label:`Expand file down from line ${S?.blobLineNumber||""}`,className:n4,onClick:B}),(0,i.jsx)(n5,{...e,direction:"up",icon:d.FoldUpIcon,isSplit:C,label:`Expand file up from line ${L?.blobLineNumber||""}`,className:n4,onClick:M})]});case"expand-up":return(0,i.jsx)(n5,{...e,direction:"up",icon:d.FoldUpIcon,isSplit:C,label:`Expand file up from line ${L?.blobLineNumber||""}`,onClick:M});case"expand-down":return(0,i.jsx)(n5,{...e,direction:"down",icon:d.FoldDownIcon,isSplit:C,label:`Expand file down from line ${S?.blobLineNumber||""}`,onClick:B});default:return null}},g[10]=$,g[11]=M,g[12]=H,g[13]=B,g[14]=P,g[15]=C,g[16]=L?.blobLineNumber,g[17]=S?.blobLineNumber,g[18]=f):f=g[18];let K=f;return g[19]!==b||g[20]!==v||g[21]!==C||g[22]!==K?(h=(0,i.jsx)(n3,{renderHunkButton:K,diffAnchor:b,diffLine:v,isSplit:C}),g[19]=b,g[20]=v,g[21]=C,g[22]=K,g[23]=h):h=g[23],h}n5.displayName="ExpandButtonLine",n6.displayName="ExpandableHunkHeaderDiffLine";let n7=(0,l.memo)(function(e){let t,n,a,l,o=(0,r.c)(11),{lineHtml:s,lineType:d,lineTypeCharacter:c}=e,u="ADDITION"===d,m="DELETION"===d;return o[0]!==u||o[1]!==m?(t=(0,b.$)("diff-text syntax-highlighted-line",{addition:u,deletion:m}),o[0]=u,o[1]=m,o[2]=t):t=o[2],o[3]!==c?(n=c&&(0,i.jsx)("span",{className:"diff-text-marker",children:c}),o[3]=c,o[4]=n):n=o[4],o[5]!==s?(a=(0,i.jsx)(eF.$6,{html:s,className:"diff-text-inner"}),o[5]=s,o[6]=a):a=o[6],o[7]!==t||o[8]!==n||o[9]!==a?(l=(0,i.jsxs)("code",{className:t,children:[n,a]}),o[7]=t,o[8]=n,o[9]=a,o[10]=l):l=o[10],l});n7.displayName="LineTextWrapper";let n8="SimpleDiff-module__comment-indicator__iwZDp";function n9(e){let t,n,a=(0,r.c)(3),{children:l}=e;return a[0]===Symbol.for("react.memo_cache_sentinel")?(t={left:"-1px",zIndex:"1"},a[0]=t):t=a[0],a[1]!==l?(n=(0,i.jsx)("span",{className:"position-absolute",style:t,children:l}),a[1]=l,a[2]=n):n=a[2],n}n9.displayName="DiffCodeAlert";var ie=n(73673);let it=e=>(e.target??void 0)?.nodeName==="TD",ii=e=>{let t=ia(e),n=t?.querySelector('[data-first-marker="true"]')??t?.querySelector("[data-marker-id]");n?.focus()},ir=e=>{let t=ia(e);t?.querySelector('[data-marker-id="new-comment"]')?.querySelector("textarea")?.focus()},ia=e=>{let t=e.currentTarget.classList.contains("new-diff-line-number")?e.currentTarget.nextElementSibling:e.currentTarget;return t?.classList.contains("new-diff-line-number")&&(t=t?.nextElementSibling),t},il=["CONTEXT","INJECTED_CONTEXT"],io="focusable-grid-cell new-diff-line-number empty-diff-line left-side",is="focusable-grid-cell new-diff-line-number left-side",id=(0,l.memo)(function(e){let t,n,a,o,s,c,u,m,f,h,g,p,v,C,y,x=(0,r.c)(109),{diffLine:S,nextDiffLine:N,prevDiffLine:D,filePath:I,avatarURL:j,userLogin:k,viewerCanApplySuggestion:A,handleMouseDownOnNumberCell:E,handleMouseEnterCell:R,handleMouseUpRow:T,handleMouseLeaveAddCommentButton:O,handleMouseDownAddCommentButton:$,copilotChatReference:M,hunksData:B,viewerCanComment:H,shouldDisplayComments:K}=e,q="HUNK"===S.type,G="ADDITION"!==S.type,W="DELETION"!==S.type,X=U(S.key),J=F(et),{enableDialogMode:Q}=F(ee),Y=(0,_.qX)(J,S,S),Z=j??"",en=k??"",ei=A??!1,er=H??!1;x[0]!==Z||x[1]!==en||x[2]!==ei||x[3]!==er?(t={avatarUrl:Z,login:en,viewerCanApplySuggestion:ei,viewerCanComment:er},x[0]=Z,x[1]=en,x[2]=ei,x[3]=er,x[4]=t):t=x[4];let ea=t;x[5]!==S.type||x[6]!==X.isSelected?(n=(0,_.Yf)(S.type,!0,X.isSelected),x[5]=S.type,x[6]=X.isSelected,x[7]=n):n=x[7];let el=n;x[8]!==S.type||x[9]!==X.isSelected?(a=(0,_.Yf)(S.type,!1,X.isSelected),x[8]=S.type,x[9]=X.isSelected,x[10]=a):a=x[10];let eo=a;x[11]!==S.html||x[12]!==S.type?(o=(0,_.x_)(S.html,S.type),x[11]=S.html,x[12]=S.type,x[13]=o):o=x[13];let[es,ef]=o;x[14]!==ef?(s=ef&&["+","-"].includes(ef),x[14]=ef,x[15]=s):s=x[15];let eh=s,[eg,ep]=(0,l.useState)(!1),[eb,ev]=(0,l.useState)(!1);x[16]!==S||x[17]!==B?(c=eX(S,B),x[16]=S,x[17]=B,x[18]=c):c=x[18];let{currentHunk:eC,nextHunk:ey,previousHunk:eL}=c,ex=`inline-dialog-heading-${(0,l.useId)()}`,eS="DELETION"!==S.type?"RIGHT":"LEFT",eN="RIGHT"===eS?S.right:S.left;x[19]!==eN||x[20]!==eS?(u=(0,_.oH)(eN,eS),x[19]=eN,x[20]=eS,x[21]=u):u=x[21];let ew=u,e_=V(ew??""),{threads:eD,annotations:eI,commentsPreference:ej}=(0,L.rP)(I,ew??"");x[22]!==eD?(m=eD.filter(ic),x[22]=eD,x[23]=m):m=x[23];let ek=m,eA=ek.length+eI.length!==0,eE=X.isSelected??!1,eR=ej===nl.sI.Collapsed,[eT,eO]=(0,l.useState)(!1),e$=eA&&eR;x[24]!==e$?(f=(0,_.S4)({hasThreads:e$}),x[24]=e$,x[25]=f):f=x[25];let eM=f,eF=(0,L.zK)();e:{let e;if(null==eF||!eR){h=!1;break e}if(x[26]!==eF||x[27]!==ek){let t;x[29]!==eF?(t=e=>e.commentsData?.comments.some(e=>e.databaseId===eF),x[29]=eF,x[30]=t):t=x[30],e=ek.some(t),x[26]=eF,x[27]=ek,x[28]=e}else e=x[28];h=e}let eB=h||eT,eH=(0,l.useRef)(null),eP=(0,l.useRef)(null),eK="DELETION"===S.type,[eU,eV]=(0,l.useState)(ek.length>0||eI.length>0||e_),[ez,eq]=(0,l.useState)(e_??!1),eG=K&&(!eR||eB||ez)&&(eU||eA||e_||ez),eW=(0,_.u6)(Y,0),eJ=(0,_.u6)(Y,1),eY=(0,_.u6)(Y,2),eZ=P(eY);x[31]!==J||x[32]!==S.blobLineNumber||x[33]!==S.type?(g=(0,w.IQ)(J,(0,w.XU)(S.type),S.blobLineNumber),x[31]=J,x[32]=S.blobLineNumber,x[33]=S.type,x[34]=g):g=x[34];let e1=g;x[35]!==eY||x[36]!==Q||x[37]!==e_||x[38]!==eA||x[39]!==eq?(p=e=>{!function(e,{hasThreads:t,hasStoredComment:n,enableDialogMode:i,codeCellId:r,setIsNewConversationDialogOpen:a}){if("Enter"===e.key&&it(e)){if(e.preventDefault(),n){i(r),ir(e);return}if(t){i(r),ii(e);return}a(!0)}}(e,{hasThreads:eA,hasStoredComment:e_,codeCellId:eY,enableDialogMode:Q,setIsNewConversationDialogOpen:eq})},x[35]=eY,x[36]=Q,x[37]=e_,x[38]=eA,x[39]=eq,x[40]=p):p=x[40];let e0=p,e2=F(ec),e3=F(ed),e4=F(eu),e5=F(em),e6=z(eY);x[41]!==T||x[42]!==eq||x[43]!==eV?(v=()=>{let{shouldStartConversation:e}=T();e&&(eq(!0),eV(!0))},x[41]=T,x[42]=eq,x[43]=eV,x[44]=v):v=x[44];let e7=v;return x[45]!==eI||x[46]!==j||x[47]!==e5||x[48]!==eo||x[49]!==eY||x[50]!==eM||x[51]!==eB||x[52]!==eR||x[53]!==ej||x[54]!==M||x[55]!==eC||x[56]!==J||x[57]!==S||x[58]!==I||x[59]!==$||x[60]!==E||x[61]!==R||x[62]!==O||x[63]!==e0||x[64]!==e_||x[65]!==e3||x[66]!==ex||x[67]!==e6||x[68]!==eg||x[69]!==q||x[70]!==eZ||x[71]!==eK||x[72]!==ez||x[73]!==eE||x[74]!==eW||x[75]!==e1||x[76]!==es||x[77]!==ew||x[78]!==el||x[79]!==eS||x[80]!==ef||x[81]!==N||x[82]!==ey||x[83]!==D||x[84]!==eL||x[85]!==eJ||x[86]!==e4||x[87]!==ep||x[88]!==eq||x[89]!==ev||x[90]!==eV||x[91]!==eO||x[92]!==K||x[93]!==eG||x[94]!==eb||x[95]!==e2||x[96]!==G||x[97]!==eh||x[98]!==W||x[99]!==ek||x[100]!==k||x[101]!==eT||x[102]!==A||x[103]!==H||x[104]!==ea?(C=q?(0,i.jsx)(n6,{currentHunk:eC,diffAnchor:J,diffLine:S,isSplit:!1,nextHunk:ey,nextLine:N,previousHunk:eL,prevLine:D}):(0,i.jsxs)(i.Fragment,{children:[G?(0,i.jsxs)("td",{className:(0,b.$)(is,il.includes(S.type)&&"diff-line-number-neutral"),"data-diff-side":"left","data-diff-line-key":S.key,"data-first-unified-line-number-cell":"true","data-grid-cell-id":eW,"data-line-number":S.left,"data-selected":eE,role:"gridcell",style:{backgroundColor:el},tabIndex:-1,onKeyDown:e0,onMouseDown:E,onMouseEnter:R,children:[eK&&S.hasHiddenUnicode&&(0,i.jsx)(n9,{children:(0,i.jsx)(ie.o,{})}),S.left]}):(0,i.jsx)("td",{style:{backgroundColor:el},"data-grid-cell-id":eW,"data-selected":eE,className:io,role:"gridcell",onKeyDown:e0,tabIndex:-1}),W?(0,i.jsxs)("td",{className:(0,b.$)(is,il.includes(S.type)&&"diff-line-number-neutral"),"data-diff-side":"right","data-diff-line-key":S.key,"data-first-unified-line-number-cell":"false","data-grid-cell-id":eJ,"data-line-number":S.right,"data-selected":eE,role:"gridcell",style:{backgroundColor:el},tabIndex:-1,onKeyDown:e0,onMouseDown:E,onMouseEnter:R,children:[!eK&&S.hasHiddenUnicode&&(0,i.jsx)(n9,{children:(0,i.jsx)(ie.o,{})}),S.right]}):(0,i.jsx)("td",{style:{backgroundColor:el},"data-grid-cell-id":eJ,"data-selected":eE,className:io,role:"gridcell",onKeyDown:e0,tabIndex:-1}),(0,i.jsxs)("td",{"data-grid-cell-id":eY,className:"diff-text-cell focusable-grid-cell left-side",style:{backgroundColor:eo,paddingRight:eM},"data-diff-line-key":S.key,"data-line-anchor":e1,"data-diff-side":eS.toLowerCase(),"data-line-number":eK?S.left:S.right,"data-selected":eE,onKeyDown:e0,onMouseEnter:e=>{e2(eY),R(e)},onMouseLeave:()=>e3(eY),onFocus:()=>e4(eY),onBlur:e=>{let t=e.relatedTarget;t instanceof Node&&e.currentTarget.contains(t)||e5()},"aria-labelledby":eZ?ex:void 0,role:eZ?"dialog":"gridcell",ref:e=>{e6?eH.current=e:eH.current=null},tabIndex:-1,children:[eZ&&(0,i.jsx)("h1",{id:ex,className:"sr-only",children:"Comment view"}),(0,i.jsx)(n7,{lineHtml:es,lineType:S.type,lineTypeCharacter:eh?ef:void 0}),S.displayNoNewLineWarning&&(0,i.jsx)(d.NoEntryIcon,{size:16,className:"fgColor-danger"}),eG?(0,i.jsx)(tG,{diffLine:S,gridCellId:eY,gutterSizeOffset:eM,inlineMarkersRef:eP,cellRef:eH,fileAnchor:J,dispatchMarkersStatus:eQ.l,shouldListenForEscapeKey:!0,batchingEnabled:!0,lineMarkersKey:ew,annotations:eI,conversationListThreads:ek,filePath:I,onCloseFocusMode:eQ.l,isRowSelected:eE,lineType:S.type,shouldStartNewConversationWithSuggestedChange:eb,viewerData:ea,onCloseConversationList:()=>{eq(!1),eV(!1),ev(!1)},onDeleteLineComment:()=>{eq(!1),eV(!1),ev(!1)},children:(ez||e_)&&(0,i.jsx)("div",{className:(0,b.$)(" border rounded-2 color-border-default",(ek.length,"mt-2 mb-1")),children:(0,i.jsx)(t6,{diffLine:S,diffAnchor:J,batchingEnabled:!0,filePath:I,focusOnMount:!e_,isLeftSide:eK,isInDialogMode:!1,isOpen:!0,isRowSelected:eE,shouldStartNewConversationWithSuggestedChange:eb,viewerData:ea,onCloseCommentDialog:()=>{eH.current?.focus(),eq(!1),eV(!1),ev(!1)}})})}):null,(e6||eg)&&(0,i.jsx)(nJ,{openStartConversationDialog:e=>{ev(e),eq(!0),eV(!0)},authorAvatarUrl:j??"",authorLogin:k??"",ref:eH,copilotChatReference:M,currentHunk:eC,diffAnchor:J,diffLine:S,threads:ek,annotations:eI,hasDraftComment:e_,handleMouseLeaveAddCommentButton:O,handleMouseDownAddCommentButton:$,isLeftSide:eK,isSplit:!1,filePath:I,nextHunk:ey,previousHunk:eL,shouldDisplayComments:K,shouldDisplayMinimizedComments:K,shouldDisplayCollapseComments:eB,setIsContextMenuOpen:ep,cellId:eY,contextMenuOpen:eg,isAddCommentBoxOpen:ez,toggleViewingMarkers:()=>eO(!eT),viewerData:{avatarUrl:j??"",diffViewPreference:"unified",lineSpacingPreference:"compact",login:k??"",commentsPreference:ej,shouldDisplayComments:K??!0,shouldDisplayEditOptions:!0,tabSizePreference:8,viewerCanComment:H??!1,viewerCanApplySuggestion:A??!1}}),(ek.length>0||eI.length>0)&&eR&&(0,i.jsx)("div",{"aria-hidden":"true",className:(0,b.$)("position-absolute top-0 d-flex user-select-none",n8),children:(0,i.jsx)(nf,{threads:ek,annotations:eI,lineSpacingPreference:"compact"})})]})]}),x[45]=eI,x[46]=j,x[47]=e5,x[48]=eo,x[49]=eY,x[50]=eM,x[51]=eB,x[52]=eR,x[53]=ej,x[54]=M,x[55]=eC,x[56]=J,x[57]=S,x[58]=I,x[59]=$,x[60]=E,x[61]=R,x[62]=O,x[63]=e0,x[64]=e_,x[65]=e3,x[66]=ex,x[67]=e6,x[68]=eg,x[69]=q,x[70]=eZ,x[71]=eK,x[72]=ez,x[73]=eE,x[74]=eW,x[75]=e1,x[76]=es,x[77]=ew,x[78]=el,x[79]=eS,x[80]=ef,x[81]=N,x[82]=ey,x[83]=D,x[84]=eL,x[85]=eJ,x[86]=e4,x[87]=ep,x[88]=eq,x[89]=ev,x[90]=eV,x[91]=eO,x[92]=K,x[93]=eG,x[94]=eb,x[95]=e2,x[96]=G,x[97]=eh,x[98]=W,x[99]=ek,x[100]=k,x[101]=eT,x[102]=A,x[103]=H,x[104]=ea,x[105]=C):C=x[105],x[106]!==e7||x[107]!==C?(y=(0,i.jsx)("tr",{className:"diff-line-row",onMouseUp:e7,children:C}),x[106]=e7,x[107]=C,x[108]=y):y=x[108],y});function ic(e){return!e.shouldNotRenderInDiffLines}id.displayName="SimpleUnifiedDiffRow";let iu=(0,l.memo)(function(e){let t,n,a,l=(0,r.c)(25),{diffAnchor:o,diffLines:s,filePath:d,tableRef:c,avatarURL:u,userLogin:m,viewerCanApplySuggestion:f,handleMouseDownOnNumberCell:h,handleMouseEnterCell:g,handleMouseUpRow:p,handleMouseLeaveAddCommentButton:b,handleMouseDownAddCommentButton:v,copilotChatReference:C,viewerCanComment:y,shouldDisplayComments:L}=e;l[0]!==s?(t=eJ(s),l[0]=s,l[1]=t):t=l[1];let x=t,{addLineToSelection:S,clearSelectedLines:N,selectMultipleLines:w}=F(ei),_=F(X);return l[2]!==S||l[3]!==N||l[4]!==o||l[5]!==_||l[6]!==w||l[7]!==s||l[8]!==c?(n={addLineToSelection:S,clearSelectedLines:N,containerRef:c,fileAnchor:o,getfirstLineSelectionOnDrag:_,isSplitDiff:!1,leftLines:s,selectMultipleLines:w,disabled:!1},l[2]=S,l[3]=N,l[4]=o,l[5]=_,l[6]=w,l[7]=s,l[8]=c,l[9]=n):n=l[9],n1(n),l[10]!==u||l[11]!==C||l[12]!==s||l[13]!==d||l[14]!==v||l[15]!==h||l[16]!==g||l[17]!==b||l[18]!==p||l[19]!==x||l[20]!==L||l[21]!==m||l[22]!==f||l[23]!==y?(a=s.map((e,t)=>{let n=`unified-diff-row-l:${e.left}-r:${e.right}-b:${e.blobLineNumber}`,r=s[t+1],a=s[t-1];return(0,i.jsx)(id,{hunksData:x,diffLine:e,nextDiffLine:r,prevDiffLine:a,filePath:d,handleMouseDownOnNumberCell:h,handleMouseEnterCell:g,handleMouseUpRow:p,handleMouseLeaveAddCommentButton:b,handleMouseDownAddCommentButton:v,copilotChatReference:C,avatarURL:u,userLogin:m,viewerCanApplySuggestion:f,viewerCanComment:y,shouldDisplayComments:L},n)}),l[10]=u,l[11]=C,l[12]=s,l[13]=d,l[14]=v,l[15]=h,l[16]=g,l[17]=b,l[18]=p,l[19]=x,l[20]=L,l[21]=m,l[22]=f,l[23]=y,l[24]=a):a=l[24],a});iu.displayName="SimpleUnifiedDiffLines";let im=["CONTEXT","INJECTED_CONTEXT"],ih="focusable-grid-cell empty-diff-line left-side",ig="focusable-grid-cell new-diff-line-number left-side",ip="diff-text-cell v-align-top focusable-grid-cell",ib=(0,l.memo)(function(e){let t,n,a,o,s,c,u,m,f,h,g,p,v,C,y,x,S,N,D,I,j,k,A,E,R,T,O,$,M=(0,r.c)(154),{leftDiffLine:B,rightDiffLine:H,nextDiffLine:K,prevDiffLine:q,filePath:G,handleMouseDownOnNumberCell:W,handleMouseEnterCell:X,handleMouseUpRow:J,handleDiffSideCellSelectionBlocking:Q,handleMouseLeaveAddCommentButton:Y,handleMouseDownAddCommentButton:Z,copilotChatReference:en,avatarURL:ei,userLogin:er,viewerCanApplySuggestion:ea,hunksData:el,viewerCanComment:eo,shouldDisplayComments:es}=e,ef=B?.type==="HUNK",eh=F(et),eg=U(B?.key),ep=U(H?.key);if(M[0]!==eh||M[1]!==B||M[2]!==H){let e=(0,_.qX)(eh,B??"empty-diff-line",H);n=(0,_.u6)(e,0),t=(0,_.u6)(e,1),a=(0,_.u6)(e,2),o=(0,_.u6)(e,3),M[0]=eh,M[1]=B,M[2]=H,M[3]=t,M[4]=n,M[5]=a,M[6]=o}else t=M[3],n=M[4],a=M[5],o=M[6];let eb=o,{enableDialogMode:ev}=F(ee),eC=(eg.isSelected||ep.isSelected)??!1;M[7]!==eC||M[8]!==B?(s=B?(0,_.Yf)(B.type,!0,eC):"",M[7]=eC,M[8]=B,M[9]=s):s=M[9];let ey=s;M[10]!==eC||M[11]!==H?(c=H?(0,_.Yf)(H.type,!0,eC):"",M[10]=eC,M[11]=H,M[12]=c):c=M[12];let eL=c;M[13]!==eC||M[14]!==B?(u=B?(0,_.Yf)(B.type,!1,eC):"",M[13]=eC,M[14]=B,M[15]=u):u=M[15];let ex=u;M[16]!==eC||M[17]!==H?(m=H?(0,_.Yf)(H.type,!1,eC):"",M[16]=eC,M[17]=H,M[18]=m):m=M[18];let eS=m,eN=`inline-dialog-heading-${(0,l.useId)()}`,ew=P(t),e_=P(eb);M[19]!==B?(f=B?(0,_.x_)(B.html,B.type):[void 0,void 0],M[19]=B,M[20]=f):f=M[20];let[eD,eI]=f;M[21]!==eI?(h=eI&&["+","-"].includes(eI),M[21]=eI,M[22]=h):h=M[22];let ej=h;M[23]!==H?(g=H?(0,_.x_)(H.html,H.type):[void 0,void 0],M[23]=H,M[24]=g):g=M[24];let[ek,eA]=g;M[25]!==eA?(p=eA&&["+","-"].includes(eA),M[25]=eA,M[26]=p):p=M[26];let eE=p;M[27]!==B?(v=B?(0,_.oH)(B.left,"LEFT"):void 0,M[27]=B,M[28]=v):v=M[28];let eR=v,{threads:eT,annotations:eO}=(0,L.rP)(G,eR??"");M[29]!==eT?(C=eT.filter(iv),M[29]=eT,M[30]=C):C=M[30];let e$=C,eM=V(eR??""),eF=ei??"",eB=er??"",eH=ea??!1,eP=eo??!1;M[31]!==eF||M[32]!==eB||M[33]!==eH||M[34]!==eP?(y={avatarUrl:eF,login:eB,viewerCanApplySuggestion:eH,viewerCanComment:eP},M[31]=eF,M[32]=eB,M[33]=eH,M[34]=eP,M[35]=y):y=M[35];let eK=y;M[36]!==H?(x=H?(0,_.oH)(H.right,"RIGHT"):void 0,M[36]=H,M[37]=x):x=M[37];let eU=x,eV=V(eU??""),{threads:ez,annotations:eq,commentsPreference:eG}=(0,L.rP)(G,eU??"");M[38]!==ez?(S=ez.filter(iC),M[38]=ez,M[39]=S):S=M[39];let eW=S,eJ=eG===nl.sI.Collapsed,[eY,eZ]=(0,l.useState)(!1),[e1,e0]=(0,l.useState)(!1),e2=(0,L.zK)();e:{let e;if(null==e2||!eJ){N=!1;break e}if(M[40]!==e$||M[41]!==e2){let t;M[43]!==e2?(t=e=>e.commentsData?.comments.some(e=>e.databaseId===e2),M[43]=e2,M[44]=t):t=M[44],e=e$.some(t),M[40]=e$,M[41]=e2,M[42]=e}else e=M[42];N=e}let e3=N;t:{let e;if(null==e2||!eJ){D=!1;break t}if(M[45]!==eW||M[46]!==e2){let t;M[48]!==e2?(t=e=>e.commentsData?.comments.some(e=>e.databaseId===e2),M[48]=e2,M[49]=t):t=M[49],e=eW.some(t),M[45]=eW,M[46]=e2,M[47]=e}else e=M[47];D=e}let e4=e3||eY,e5=D||e1,[e6,e7]=(0,l.useState)(eM??!1),[e8,e9]=(0,l.useState)(!1),[te,tt]=(0,l.useState)(!1),[tn,ti]=(0,l.useState)(eV??!1),[tr,ta]=(0,l.useState)(!1),[tl,to]=(0,l.useState)(!1),[ts,td]=(0,l.useState)(e$.length>0||eO.length>0||e6),[tc,tu]=(0,l.useState)(eW.length>0||eq.length>0||tn),tm=e$.length+eO.length!==0,tf=eW.length+eq.length!==0,th=tm&&eJ;M[50]!==th?(I=(0,_.S4)({hasThreads:th}),M[50]=th,M[51]=I):I=M[51];let tg=I,tp=tf&&eJ;M[52]!==tp?(j=(0,_.S4)({hasThreads:tp}),M[52]=tp,M[53]=j):j=M[53];let tb=j,tv=(0,_.Po)(B)?(0,_.Po)(H)?void 0:H:B,tC=es&&(!eJ||e4||e6)&&(ts||tm||eM||e6),ty=es&&(!eJ||e5||tn)&&(tc||tf||eV||tn),tL=(0,l.useRef)(null),tx=(0,l.useRef)(null),tS=(0,l.useRef)(null);M[54]!==ev||M[55]!==eM||M[56]!==tm||M[57]!==eV||M[58]!==tf||M[59]!==t||M[60]!==eb?(k=e=>{!function(e,{hasLeftThreads:t,hasRightThreads:n,hasRightStoredComment:i,hasLeftStoredComment:r,enableDialogMode:a,leftCodeCellId:l,rightCodeCellId:o,setIsLeftNewConversationDialogOpen:s,setIsRightNewConversationDialogOpen:d}){if("Enter"!==e.key||!it(e))return;e.preventDefault();let c=e.currentTarget.getAttribute("data-diff-side");if("left"===c){if(r){a(l),ir(e);return}if(t){a(l),ii(e);return}s(!0)}else if("right"===c){if(i){a(o),ir(e);return}if(n){a(o),ii(e);return}d(!0)}}(e,{hasLeftThreads:tm,hasRightThreads:tf,hasRightStoredComment:eV,hasLeftStoredComment:eM,enableDialogMode:ev,leftCodeCellId:t,rightCodeCellId:eb,setIsLeftNewConversationDialogOpen:e7,setIsRightNewConversationDialogOpen:ti})},M[54]=ev,M[55]=eM,M[56]=tm,M[57]=eV,M[58]=tf,M[59]=t,M[60]=eb,M[61]=k):k=M[61];let tN=k,tw=F(ec),t_=F(ed),tD=F(eu),tI=F(em),tj=z(t),tk=z(eb);M[62]!==J||M[63]!==B||M[64]!==H?(A=e=>{let{shouldStartConversation:t}=J();if(t){let t=e.target,n=t.closest("[data-diff-side]")?.getAttribute("data-diff-side");"left"===n&&B?(e7(!0),td(!0)):"right"===n&&H?(ti(!0),tu(!0)):B?(e7(!0),td(!0)):H&&(ti(!0),tu(!0))}},M[62]=J,M[63]=B,M[64]=H,M[65]=A):A=M[65];let tA=A;if(!tv)return null;M[66]!==tv||M[67]!==el?(E=eX(tv,el),M[66]=tv,M[67]=el,M[68]=E):E=M[68];let{currentHunk:tE,nextHunk:tR,previousHunk:tT}=E;M[69]!==eh||M[70]!==B?.blobLineNumber||M[71]!==B?.type?(R=(0,w.IQ)(eh,(0,w.XU)(B?.type??"EMPTY"),B?.blobLineNumber??0),M[69]=eh,M[70]=B?.blobLineNumber,M[71]=B?.type,M[72]=R):R=M[72];let tO=R;M[73]!==eh||M[74]!==H?.blobLineNumber||M[75]!==H?.type?(T=(0,w.IQ)(eh,(0,w.XU)(H?.type??"EMPTY"),H?.blobLineNumber??0),M[73]=eh,M[74]=H?.blobLineNumber,M[75]=H?.type,M[76]=T):T=M[76];let t$=T;return M[77]!==ei||M[78]!==tI||M[79]!==eJ||M[80]!==eG||M[81]!==en||M[82]!==tE||M[83]!==eh||M[84]!==G||M[85]!==Q||M[86]!==Z||M[87]!==W||M[88]!==X||M[89]!==Y||M[90]!==tN||M[91]!==eM||M[92]!==eV||M[93]!==t_||M[94]!==eN||M[95]!==ef||M[96]!==tj||M[97]!==e8||M[98]!==ew||M[99]!==e6||M[100]!==tk||M[101]!==tr||M[102]!==e_||M[103]!==tn||M[104]!==eC||M[105]!==eO||M[106]!==ex||M[107]!==t||M[108]!==tg||M[109]!==e4||M[110]!==B||M[111]!==tO||M[112]!==eD||M[113]!==eR||M[114]!==ey||M[115]!==n||M[116]!==eI||M[117]!==e$||M[118]!==eY||M[119]!==K||M[120]!==tR||M[121]!==q||M[122]!==tT||M[123]!==eq||M[124]!==eS||M[125]!==eb||M[126]!==tb||M[127]!==e5||M[128]!==H||M[129]!==t$||M[130]!==ek||M[131]!==eU||M[132]!==eL||M[133]!==a||M[134]!==eA||M[135]!==eW||M[136]!==e1||M[137]!==tD||M[138]!==es||M[139]!==tC||M[140]!==ty||M[141]!==te||M[142]!==tl||M[143]!==tw||M[144]!==ej||M[145]!==eE||M[146]!==er||M[147]!==ea||M[148]!==eo||M[149]!==eK?(O=ef?(0,i.jsx)(n6,{currentHunk:tE,diffAnchor:eh,diffLine:B,isSplit:!0,nextHunk:tR,nextLine:K,previousHunk:tT,prevLine:q}):(0,i.jsxs)(i.Fragment,{children:[B?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("td",{className:(0,b.$)(ig,im.includes(B.type)&&"diff-line-number-neutral"),"data-diff-side":"left","data-diff-line-key":B.key,"data-grid-cell-id":n,"data-line-number":B.left,"data-selected":eC,onMouseDown:W,onMouseEnter:X,onKeyDown:tN,role:"gridcell",style:{backgroundColor:ey},tabIndex:-1,children:[B.hasHiddenUnicode&&(0,i.jsx)(n9,{children:(0,i.jsx)(ie.o,{})}),B.left]}),(0,i.jsxs)("td",{className:(0,b.$)(ip,"left-side-diff-cell"),"data-grid-cell-id":t,"data-diff-line-key":B.key,"data-diff-side":"left","data-line-number":B.left,"data-line-anchor":tO,"data-selected":eC,onKeyDown:tN,onMouseDown:Q,onMouseEnter:e=>{tw(t),X(e)},onMouseLeave:()=>t_(t),onFocus:()=>tD(t),onBlur:e=>{let t=e.relatedTarget;t instanceof Node&&e.currentTarget.contains(t)||tI()},"aria-labelledby":ew?eN:void 0,role:ew?"dialog":"gridcell",ref:e=>{tj?tx.current=e:tx.current=null},style:{backgroundColor:ex,paddingRight:tg},tabIndex:-1,children:[ew&&(0,i.jsx)("h1",{id:eN,className:"sr-only",children:"Comment view"}),(0,i.jsx)(n7,{lineHtml:eD??"",lineType:B.type,lineTypeCharacter:ej?eI:void 0}),B.displayNoNewLineWarning&&(0,i.jsx)(d.NoEntryIcon,{size:16,className:"fgColor-danger"}),tC&&(0,i.jsx)(tG,{diffLine:B,gridCellId:t,shouldListenForEscapeKey:!0,gutterSizeOffset:tg,inlineMarkersRef:tL,cellRef:tx,fileAnchor:eh,batchingEnabled:!0,dispatchMarkersStatus:eQ.l,lineMarkersKey:eR,annotations:eO,conversationListThreads:e$,filePath:G,onCloseFocusMode:eQ.l,isRowSelected:eC,lineType:B.type,onCloseConversationList:()=>{e7(!1),td(!1),tt(!1)},onDeleteLineComment:()=>{e7(!1),td(!1),tt(!1)},viewerData:eK,children:(e6||eM)&&(0,i.jsx)("div",{className:(0,b.$)(" border rounded-2 color-border-default","mt-2 mb-1"),children:(0,i.jsx)(t6,{diffLine:B,diffAnchor:eh,batchingEnabled:!0,filePath:G,focusOnMount:!eM,isLeftSide:!0,isInDialogMode:!1,isOpen:!0,isRowSelected:eC,viewerData:eK,shouldStartNewConversationWithSuggestedChange:te,onCloseCommentDialog:()=>{tx.current?.focus(),e7(!1),td(!1),tt(!1)}})})}),(tj||e8)&&(0,i.jsx)(nJ,{openStartConversationDialog:e=>{tt(e),e7(!0),td(!0)},isAddCommentBoxOpen:e6,authorAvatarUrl:ei??"",authorLogin:er??"",ref:tx,copilotChatReference:en,currentHunk:tE,diffAnchor:eh,diffLine:B,threads:e$,annotations:eO,hasDraftComment:eM,handleMouseLeaveAddCommentButton:Y,handleMouseDownAddCommentButton:Z,isLeftSide:!0,isSplit:!0,contextMenuOpen:e8,setIsContextMenuOpen:e9,cellId:t,nextHunk:tR,previousHunk:tT,shouldDisplayComments:es,shouldDisplayMinimizedComments:es,shouldDisplayCollapseComments:e4,filePath:G,toggleViewingMarkers:()=>eZ(!eY),viewerData:{avatarUrl:ei??"",diffViewPreference:"split",lineSpacingPreference:"compact",login:er??"",commentsPreference:eG,shouldDisplayComments:es??!0,shouldDisplayEditOptions:!0,tabSizePreference:8,viewerCanComment:eo??!1,viewerCanApplySuggestion:ea??!1}}),(e$.length>0||eO.length>0)&&eJ&&(0,i.jsx)("div",{"aria-hidden":"true",className:(0,b.$)("position-absolute top-0 d-flex user-select-none",n8),children:(0,i.jsx)(nf,{threads:e$,annotations:eO,lineSpacingPreference:"compact"})})]})]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("td",{role:"gridcell",className:ih,tabIndex:-1}),(0,i.jsx)("td",{role:"gridcell",className:ih,tabIndex:-1})]}),H?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("td",{className:(0,b.$)(ig,im.includes(H.type)&&"diff-line-number-neutral"),"data-diff-side":"right","data-diff-line-key":H.key,"data-grid-cell-id":a,"data-line-number":H.right,"data-selected":eC,onKeyDown:tN,onMouseDown:W,onMouseEnter:X,role:"gridcell",style:{backgroundColor:eL},tabIndex:-1,children:[H.hasHiddenUnicode&&(0,i.jsx)(n9,{children:(0,i.jsx)(ie.o,{})}),H.right]}),(0,i.jsxs)("td",{className:(0,b.$)(ip,"right-side-diff-cell"),"data-grid-cell-id":eb,"data-diff-line-key":H.key,"data-diff-side":"right","data-line-anchor":t$,"data-line-number":H.right,"data-selected":eC,onKeyDown:tN,onMouseDown:Q,onMouseEnter:e=>{tw(eb),X(e)},onMouseLeave:()=>t_(eb),onFocus:()=>tD(eb),onBlur:e=>{let t=e.relatedTarget;t instanceof Node&&e.currentTarget.contains(t)||tI()},"aria-labelledby":e_?eN:void 0,role:e_?"dialog":"gridcell",ref:e=>{tk?tS.current=e:tS.current=null},style:{backgroundColor:eS,paddingRight:tb},tabIndex:-1,children:[e_&&(0,i.jsx)("h1",{id:eN,className:"sr-only",children:"Comment view"}),(0,i.jsx)(n7,{lineHtml:ek??"",lineType:H.type,lineTypeCharacter:eE?eA:void 0}),H.displayNoNewLineWarning&&(0,i.jsx)(d.NoEntryIcon,{size:16,className:"fgColor-danger"}),ty&&(0,i.jsx)(tG,{diffLine:H,gridCellId:eb,shouldListenForEscapeKey:!0,gutterSizeOffset:tb,inlineMarkersRef:tL,cellRef:tS,fileAnchor:eh,batchingEnabled:!0,dispatchMarkersStatus:eQ.l,lineMarkersKey:eU,annotations:eq,conversationListThreads:eW,filePath:G,viewerData:eK,onCloseFocusMode:eQ.l,isRowSelected:eC,lineType:H.type,onCloseConversationList:()=>{ti(!1),tu(!1),to(!1)},onDeleteLineComment:()=>{ti(!1),tu(!1),to(!1)},children:(tn||eV)&&(0,i.jsx)("div",{className:(0,b.$)(" border rounded-2 color-border-default","mt-2 mb-1"),children:(0,i.jsx)(t6,{diffLine:H,diffAnchor:eh,batchingEnabled:!0,filePath:G,focusOnMount:!eV,isLeftSide:!1,isInDialogMode:!1,isOpen:!0,isRowSelected:eC,shouldStartNewConversationWithSuggestedChange:tl,viewerData:eK,onCloseCommentDialog:()=>{tS.current?.focus(),ti(!1),tu(!1),to(!1)}})})}),(tk||tr)&&(0,i.jsx)(nJ,{openStartConversationDialog:e=>{to(e),ti(!0),tu(!0)},authorAvatarUrl:ei??"",authorLogin:er??"",ref:tS,isAddCommentBoxOpen:tn,copilotChatReference:en,currentHunk:tE,diffAnchor:eh,diffLine:H,threads:eW,contextMenuOpen:tr,setIsContextMenuOpen:ta,cellId:eb,annotations:eq,hasDraftComment:eV,handleMouseLeaveAddCommentButton:Y,handleMouseDownAddCommentButton:Z,isLeftSide:!1,isSplit:!0,nextHunk:tR,previousHunk:tT,filePath:G,shouldDisplayComments:es,shouldDisplayMinimizedComments:es,shouldDisplayCollapseComments:e5,toggleViewingMarkers:()=>e0(!e1),viewerData:{avatarUrl:ei??"",diffViewPreference:"split",lineSpacingPreference:"compact",login:er??"",commentsPreference:eG,shouldDisplayComments:es??!0,shouldDisplayEditOptions:!0,tabSizePreference:8,viewerCanComment:eo??!1,viewerCanApplySuggestion:ea??!1}}),(eW.length>0||eq.length>0)&&eJ&&(0,i.jsx)("div",{"aria-hidden":"true",className:(0,b.$)("position-absolute top-0 d-flex user-select-none",n8),children:(0,i.jsx)(nf,{threads:eW,annotations:eq,lineSpacingPreference:"compact"})})]})]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("td",{role:"gridcell",className:ih,tabIndex:-1}),(0,i.jsx)("td",{role:"gridcell",className:ih,tabIndex:-1})]})]}),M[77]=ei,M[78]=tI,M[79]=eJ,M[80]=eG,M[81]=en,M[82]=tE,M[83]=eh,M[84]=G,M[85]=Q,M[86]=Z,M[87]=W,M[88]=X,M[89]=Y,M[90]=tN,M[91]=eM,M[92]=eV,M[93]=t_,M[94]=eN,M[95]=ef,M[96]=tj,M[97]=e8,M[98]=ew,M[99]=e6,M[100]=tk,M[101]=tr,M[102]=e_,M[103]=tn,M[104]=eC,M[105]=eO,M[106]=ex,M[107]=t,M[108]=tg,M[109]=e4,M[110]=B,M[111]=tO,M[112]=eD,M[113]=eR,M[114]=ey,M[115]=n,M[116]=eI,M[117]=e$,M[118]=eY,M[119]=K,M[120]=tR,M[121]=q,M[122]=tT,M[123]=eq,M[124]=eS,M[125]=eb,M[126]=tb,M[127]=e5,M[128]=H,M[129]=t$,M[130]=ek,M[131]=eU,M[132]=eL,M[133]=a,M[134]=eA,M[135]=eW,M[136]=e1,M[137]=tD,M[138]=es,M[139]=tC,M[140]=ty,M[141]=te,M[142]=tl,M[143]=tw,M[144]=ej,M[145]=eE,M[146]=er,M[147]=ea,M[148]=eo,M[149]=eK,M[150]=O):O=M[150],M[151]!==tA||M[152]!==O?($=(0,i.jsx)("tr",{className:"diff-line-row",onMouseUp:tA,children:O}),M[151]=tA,M[152]=O,M[153]=$):$=M[153],$});function iv(e){return!e.shouldNotRenderInDiffLines}function iC(e){return!e.shouldNotRenderInDiffLines}ib.displayName="SimpleSplitDiffRow";let iy=(0,l.memo)(function(e){let t,n,a,l=(0,r.c)(28),{diffAnchor:o,diffLines:s,filePath:d,avatarURL:c,userLogin:u,viewerCanApplySuggestion:m,handleMouseDownOnNumberCell:f,handleMouseEnterCell:h,handleMouseUpRow:g,handleDiffSideCellSelectionBlocking:p,handleMouseLeaveAddCommentButton:b,handleMouseDownAddCommentButton:v,copilotChatReference:C,viewerCanComment:y,shouldDisplayComments:L,tableRef:x}=e,{leftLines:S,rightLines:N}=function(e){let t,n,i=(0,r.c)(5);i[0]!==e?(t=function(e){let t=[],n=[],i=()=>{for(;t.length{let n=S[t],r=N[t],a=S[t-1],l=(0,_.Po)(S[t+1])?N[t+1]:S[t+1],o=`${(0,_.Po)(n)||!n?`empty-left-diff-${t}`:n.blobLineNumber}-${(0,_.Po)(r)||!r?`empty-right-diff-${t}`:r.blobLineNumber}`;return(0,i.jsx)(ib,{hunksData:w,leftDiffLine:n,rightDiffLine:r,prevDiffLine:a,nextDiffLine:l,filePath:d,handleMouseDownOnNumberCell:f,handleMouseEnterCell:h,handleMouseUpRow:g,handleDiffSideCellSelectionBlocking:p,handleMouseLeaveAddCommentButton:b,handleMouseDownAddCommentButton:v,copilotChatReference:C,avatarURL:c,userLogin:u,viewerCanApplySuggestion:m,viewerCanComment:y,shouldDisplayComments:L},o)}),l[11]=c,l[12]=C,l[13]=d,l[14]=p,l[15]=v,l[16]=f,l[17]=h,l[18]=b,l[19]=g,l[20]=w,l[21]=S,l[22]=N,l[23]=L,l[24]=u,l[25]=m,l[26]=y,l[27]=a):a=l[27],a});function iL(e){let t,n=(0,r.c)(3),{diffAnchor:a,children:l}=e;return n[0]!==l||n[1]!==a?(t=(0,i.jsx)("div",{className:"fgColor-muted p-2","data-diff-anchor":a,children:l}),n[0]=l,n[1]=a,n[2]=t):t=n[2],t}iy.displayName="SimpleSplitDiffLines",iL.displayName="PlainTextStatus";let ix=(0,l.memo)(function(e){let t,n=(0,r.c)(42),{diffEntryData:a,diffLinesManuallyUnhidden:l,baseHelpUrl:o,handleSetShowHiddenUnicodeCharacters:s,onHandleLoadDiff:d,copilotChatReference:c,hasExpandedAllRanges:u,isSplitView:m,showHiddenUnicodeCharacters:f,subjectId:h,tableAriaLabel:g,viewerData:p}=e,b=`diff-${a.pathDigest}`;if(a.isBinary){let e;return n[0]!==b?(e=(0,i.jsx)(iL,{diffAnchor:b,children:"Binary file not shown."}),n[0]=b,n[1]=e):e=n[1],e}if((0,eP.dK)(a)){let e;return n[2]!==b?(e=(0,i.jsx)(iL,{diffAnchor:b,children:"File renamed without changes."}),n[2]=b,n[3]=e):e=n[3],e}if((0,eP.Jc)(a)){let e;return n[4]!==b?(e=(0,i.jsx)(iL,{diffAnchor:b,children:"File copied without changes."}),n[4]=b,n[5]=e):e=n[5],e}if((0,eP.Sn)(a,a.status,a.oldTreeEntry?.mode,a.newTreeEntry?.mode)){let e;return n[6]!==b?(e=(0,i.jsx)(iL,{diffAnchor:b,children:"File mode changed."}),n[6]=b,n[7]=e):e=n[7],e}if(!l&&(0,eP.HI)(a)){let e,t,r=a.truncatedReason;return n[8]!==r?(e=(0,eP.l_)(r),n[8]=r,n[9]=e):e=n[9],n[10]!==b||n[11]!==d||n[12]!==e?(t=(0,i.jsx)(eV,{diffAnchor:b,onLoadDiff:d,children:e}),n[10]=b,n[11]=d,n[12]=e,n[13]=t):t=n[13],t}if((0,eP.s8)(a)){let e;return n[14]!==b?(e=(0,i.jsx)(iL,{diffAnchor:b,children:"Whitespace-only changes."}),n[14]=b,n[15]=e):e=n[15],e}if(!l&&(0,eP.lO)(a)){let e;return n[16]!==b||n[17]!==d?(e=(0,i.jsx)(eV,{diffAnchor:b,onLoadDiff:d,children:"This file was deleted."}),n[16]=b,n[17]=d,n[18]=e):e=n[18],e}if(!l&&(0,eP.xW)(a)){let e,t=`${o}/github/administering-a-repository/customizing-how-changed-files-appear-on-github`;return n[19]!==b||n[20]!==d||n[21]!==t?(e=(0,i.jsxs)(eV,{diffAnchor:b,helpText:"customizing how changed files appear on GitHub.",helpUrl:t,onLoadDiff:d,children:["Some generated files are not rendered by default. Learn more about"," "]}),n[19]=b,n[20]=d,n[21]=t,n[22]=e):e=n[22],e}if(a.isTooBig&&0===a.diffLines.length)if(l){let e,t,r=`${o}/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally`;return n[23]!==r?(e=(0,i.jsx)(eU.A,{inline:!0,href:r,children:"check out this pull request locally."}),n[23]=r,n[24]=e):e=n[24],n[25]!==b||n[26]!==e?(t=(0,i.jsxs)(iL,{diffAnchor:b,children:["Diff is too big to render. To view,"," ",e]}),n[25]=b,n[26]=e,n[27]=t):t=n[27],t}else{let e;return n[28]!==b||n[29]!==d?(e=(0,i.jsx)(eV,{diffAnchor:b,onLoadDiff:d,children:"Large diffs are not rendered by default."}),n[28]=b,n[29]=d,n[30]=e):e=n[30],e}return a.diffLines?(n[31]!==c||n[32]!==b||n[33]!==a||n[34]!==s||n[35]!==u||n[36]!==m||n[37]!==f||n[38]!==h||n[39]!==g||n[40]!==p?(t=(0,i.jsx)(iS,{diffAnchor:b,diffEntryData:a,viewerData:p,copilotChatReference:c,handleSetShowHiddenUnicodeCharacters:s,hasExpandedAllRanges:u,isSplitView:m,showHiddenUnicodeCharacters:f,subjectId:h,tableAriaLabel:g}),n[31]=c,n[32]=b,n[33]=a,n[34]=s,n[35]=u,n[36]=m,n[37]=f,n[38]=h,n[39]=g,n[40]=p,n[41]=t):t=n[41],t):null});function iS(e){let t,n,a,s,d,c,u,f,h,g,p,v,C,y,x,S,N,_,D,I,j=(0,r.c)(93),{diffAnchor:k,viewerData:E,diffEntryData:R,copilotChatReference:T,handleSetShowHiddenUnicodeCharacters:O,hasExpandedAllRanges:$,isSplitView:M,showHiddenUnicodeCharacters:B,tableAriaLabel:H}=e,P=(0,l.useRef)(null),{clearSelectedLines:K,clearFirstLineSelectionOnDrag:U,setIsDraggingFromAddCommentButton:V}=F(ei),z=F(X),q=F(Q),[W,Z]=(0,l.useState)(null),ee=R.newTreeEntry?.lineCount??R.oldTreeEntry?.lineCount??0;e:{let e=R.diffLines[R.diffLines.length-1];if(e?.blobLineNumber&&e.blobLineNumber{!el&&ea()&&(K(),(0,ef.i)("Selection Cleared"))},a=[K,ea,el],j[3]=K,j[4]=ea,j[5]=el,j[6]=n,j[7]=a):(n=j[6],a=j[7]),(0,l.useEffect)(n,a),j[8]!==et?(s=(0,w.c7)(et),j[8]=et,j[9]=s):s=j[9];let eo=s;j[10]===Symbol.for("react.memo_cache_sentinel")?(d=e=>{Z(e.currentTarget.classList.contains("left-side-diff-cell")?"right":"left")},j[10]=d):d=j[10];let es=d;j[11]!==R.path||j[12]!==$?(c=e=>{if(e.shiftKey&&e.metaKey&&"ArrowLeft"===e.key&&!$&&e.target?.getAttribute("role")==="gridcell"){let e=document.querySelector(`.js-expand-all-difflines-button[data-file-path="${R.path}"]`);e?.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0}))}},j[11]=R.path,j[12]=$,j[13]=c):c=j[13];let ed=c,ec=F(J),eu=F(G);j[14]!==et||j[15]!==W||j[16]!==eu||j[17]!==ec||j[18]!==M?(u=async e=>{let t=document.getSelection();if(t&&t.rangeCount>=1){let n=[];for(let e=0;e{let t=e.target,n=t.getAttribute("data-diff-line-key"),i=t.getAttribute("data-diff-side");if(!A(n)||!(0,o.e)(i))return;let r=document.getSelection();r?.empty();let a=ey();(0,ne.X)()?.registerCallback({event:e.nativeEvent,cb:e=>{eC("diff-lines.inp_interaction","PULL_REQUESTS_DIFF_LINE_NUMBER_CLICK",{latency:e.latency}),(0,nt.au)({name:"PULL_REQUESTS_DIFF_LINE_NUMBER_CLICK",tags:a,value:e.latency})}});let l=eu();if(n&&1===l.length&&l[0]?.key===n&&null===z()){K(),(0,m.K3)();return}if(ec()&&e.shiftKey)return void ep({lineKey:n,orientation:i},eh);let s=t.getAttribute("data-line-number");s&&(eb({lineKey:n,firstLineSelectionOnDrag:{orientation:i,lineNumber:parseInt(s),shouldStartConversation:!1,lineKey:n}},eh),ev(R.pathDigest))},j[22]=ep,j[23]=K,j[24]=R.pathDigest,j[25]=z,j[26]=ey,j[27]=eu,j[28]=ec,j[29]=eb,j[30]=eC,j[31]=ev,j[32]=h):h=j[32];let eL=h;j[33]!==U||j[34]!==z||j[35]!==q||j[36]!==V?(g=()=>{let e=z(),t=q();return null!==e?U():t&&V(!1),{shouldStartConversation:t&&null!==e}},j[33]=U,j[34]=z,j[35]=q,j[36]=V,j[37]=g):g=j[37];let ex=g;j[38]!==ep||j[39]!==z?(p=e=>{if(1!==e.buttons)return;let t=e.target,n=t.closest("[data-diff-line-key]")?.getAttribute("data-diff-line-key"),i=t.closest("[data-diff-side]")?.getAttribute("data-diff-side");A(n)&&(0,o.e)(i)&&z()&&ep({lineKey:n,orientation:i},eh)},j[38]=ep,j[39]=z,j[40]=p):p=j[40];let eS=p;j[41]!==ec?(v=(e,t)=>{let n=ec();if(!n)return!1;let i="left"===e;return"right"===n.endOrientation&&!i&&n.endLineNumber===t||!!n&&"left"===n.endOrientation&&!!i&&n.endLineNumber===t},j[41]=ec,j[42]=v):v=j[42];let eN=v;j[43]!==ep||j[44]!==R.pathDigest||j[45]!==eN||j[46]!==el||j[47]!==eb||j[48]!==ev?(C=e=>{if(1!==e.buttons)return;let t=e.target,n=t.closest("[data-diff-line-key]")?.getAttribute("data-diff-line-key"),i=t.closest("[data-diff-side]")?.getAttribute("data-diff-side");if(!A(n)||!(0,o.e)(i)||!n)return;let r=t.closest("[data-selected]")?.getAttribute("data-selected"),a=t.closest("[data-line-number]")?.getAttribute("data-line-number"),l=a?parseInt(a,10):void 0;r||!l||eN(i,l)?ep({lineKey:n,orientation:i},eh):eb({lineKey:n,firstLineSelectionOnDrag:{lineNumber:l,orientation:i,lineKey:n,shouldStartConversation:!0}},eh),el||ev(R.pathDigest)},j[43]=ep,j[44]=R.pathDigest,j[45]=eN,j[46]=el,j[47]=eb,j[48]=ev,j[49]=C):C=j[49];let ew=C;j[50]!==K||j[51]!==eN||j[52]!==V?(y=e=>{V(!0);let t=e.target,n=t.closest("[data-diff-side]")?.getAttribute("data-diff-side"),i=t.closest("[data-line-number]")?.getAttribute("data-line-number"),r=i?parseInt(i,10):void 0;(0,o.e)(n)&&r&&!eN(n,r)&&K()},j[50]=K,j[51]=eN,j[52]=V,j[53]=y):y=j[53];let e_=y;j[54]!==eg||j[55]!==O||j[56]!==B?(x=eg&&(0,i.jsx)(ez.a,{isShown:B,toggleShowHiddenCharacters:()=>O(!B)}),j[54]=eg,j[55]=O,j[56]=B,j[57]=x):x=j[57];let eD="compact"===en;j[58]!==eD?(S=(0,b.$)("tab-size","width-full","DiffLines-module__tableLayoutFixed__Ui4OU",{"DiffLines-module__compact__Rvh2a":eD}),j[58]=eD,j[59]=S):S=j[59];let eI=`${eo}px`,ej=`${2*parseFloat(eo)}px`;return j[60]!==eI||j[61]!==ej?(N={"--line-number-cell-width":eI,"--line-number-cell-width-unified":ej},j[60]=eI,j[61]=ej,j[62]=N):N=j[62],j[63]!==T||j[64]!==k||j[65]!==R.path||j[66]!==et||j[67]!==e_||j[68]!==eL||j[69]!==eS||j[70]!==ew||j[71]!==ex||j[72]!==M||j[73]!==eo||j[74]!==E.avatarUrl||j[75]!==E.login||j[76]!==E.shouldDisplayComments||j[77]!==E.viewerCanApplySuggestion||j[78]!==E.viewerCanComment?(_=M?(0,i.jsx)(eK.wj,{lineWidth:eo,children:(0,i.jsx)(iy,{diffAnchor:k,diffLines:et,filePath:R.path,handleDiffSideCellSelectionBlocking:es,handleMouseDownOnNumberCell:eL,handleMouseEnterCell:eS,handleMouseUpRow:ex,handleMouseLeaveAddCommentButton:ew,handleMouseDownAddCommentButton:e_,copilotChatReference:T,avatarURL:E.avatarUrl,userLogin:E.login,viewerCanApplySuggestion:E.viewerCanApplySuggestion,viewerCanComment:E.viewerCanComment,shouldDisplayComments:E.shouldDisplayComments,tableRef:P})}):(0,i.jsx)(eK.Qe,{lineWidth:eo,children:(0,i.jsx)(iu,{diffAnchor:k,diffLines:et,filePath:R.path,handleMouseDownOnNumberCell:eL,handleMouseEnterCell:eS,handleMouseUpRow:ex,handleMouseLeaveAddCommentButton:ew,handleMouseDownAddCommentButton:e_,copilotChatReference:T,avatarURL:E.avatarUrl,userLogin:E.login,viewerCanApplySuggestion:E.viewerCanApplySuggestion,viewerCanComment:E.viewerCanComment,shouldDisplayComments:E.shouldDisplayComments,tableRef:P})}),j[63]=T,j[64]=k,j[65]=R.path,j[66]=et,j[67]=e_,j[68]=eL,j[69]=eS,j[70]=ew,j[71]=ex,j[72]=M,j[73]=eo,j[74]=E.avatarUrl,j[75]=E.login,j[76]=E.shouldDisplayComments,j[77]=E.viewerCanApplySuggestion,j[78]=E.viewerCanComment,j[79]=_):_=j[79],j[80]!==k||j[81]!==W||j[82]!==ed||j[83]!==em||j[84]!==S||j[85]!==N||j[86]!==_||j[87]!==er||j[88]!==H?(D=(0,i.jsx)("table",{"aria-label":H,onKeyDown:ed,ref:P,className:S,"data-block-diff-cell-selection":W,"data-diff-anchor":k,"data-tab-size":er,"data-paste-markdown-skip":!0,onCopy:em,role:"grid",style:N,children:_}),j[80]=k,j[81]=W,j[82]=ed,j[83]=em,j[84]=S,j[85]=N,j[86]=_,j[87]=er,j[88]=H,j[89]=D):D=j[89],j[90]!==x||j[91]!==D?(I=(0,i.jsxs)(i.Fragment,{children:[x,D]}),j[90]=x,j[91]=D,j[92]=I):I=j[92],I}function iN(e){return(0,eq.Y)(e.text)}ix.displayName="DiffLines",iS.displayName="CodeDiffLines";var iw=n(72105),i_=n(46251),iD=n(16025);function iI(e){let t,n,a,l,o,s,c=(0,r.c)(28),{submodule:u}=e,{basePath:m,changedFiles:f,contentsUrl:h,newCommitOid:g,oldCommitOid:p,status:b,submoduleUrl:v}=u,C=u.summary.length>0&&u.contentsUrl&&"MODIFIED"===b;switch(b){case"ADDED":{let e;c[0]!==h||c[1]!==g?(e=(0,i.jsx)(iA,{commitOid:g,contentsUrl:h,type:"added"}),c[0]=h,c[1]=g,c[2]=e):e=c[2],t=e;break}case"DELETED":case"REMOVED":{let e;c[3]!==h||c[4]!==p?(e=(0,i.jsx)(iA,{commitOid:p,contentsUrl:h,type:"deleted"}),c[3]=h,c[4]=p,c[5]=e):e=c[5],t=e;break}default:{let e;c[6]!==f||c[7]!==h||c[8]!==g||c[9]!==p?(e=(0,i.jsx)(iE,{newCommitOid:g,oldCommitOid:p,changedFiles:f,contentsUrl:h}),c[6]=f,c[7]=h,c[8]=g,c[9]=p,c[10]=e):e=c[10],t=e}}let y=t,L=`tmp-px-3 py-2 ${C?"border-bottom bgColor-muted":""}`;return c[11]===Symbol.for("react.memo_cache_sentinel")?(n=(0,i.jsx)(d.FileSubmoduleIcon,{className:"fgColor-muted mr-2",size:16}),c[11]=n):n=c[11],c[12]!==m||c[13]!==v?(a=(0,i.jsx)(ij,{basePath:m,submoduleUrl:v}),c[12]=m,c[13]=v,c[14]=a):a=c[14],c[15]!==y||c[16]!==L||c[17]!==a?(l=(0,i.jsxs)("div",{className:L,children:[n,a,y]}),c[15]=y,c[16]=L,c[17]=a,c[18]=l):l=c[18],c[19]!==h||c[20]!==g||c[21]!==p||c[22]!==C||c[23]!==u.summary?(o=C&&(0,i.jsx)(eD.l,{className:"SubmoduleDiff-module__filesActionList__KgCK2",showDividers:!0,variant:"full",children:u.summary.map(e=>(0,i.jsx)(iR,{compareUrl:`${h}/compare/${p}...${g}`,linesAdded:e.linesAdded,linesDeleted:e.linesDeleted,path:e.path,pathDigest:e.pathDigest,status:e.status},e.pathDigest))}),c[19]=h,c[20]=g,c[21]=p,c[22]=C,c[23]=u.summary,c[24]=o):o=c[24],c[25]!==l||c[26]!==o?(s=(0,i.jsxs)("div",{children:[l,o]}),c[25]=l,c[26]=o,c[27]=s):s=c[27],s}function ij(e){let t,n,a=(0,r.c)(5),{basePath:l,submoduleUrl:o}=e;return a[0]!==l||a[1]!==o?(t=o?(0,i.jsx)(eU.A,{inline:!0,href:o,children:l}):l,a[0]=l,a[1]=o,a[2]=t):t=a[2],a[3]!==t?(n=(0,i.jsxs)(i.Fragment,{children:["Submodule"," ",t," "]}),a[3]=t,a[4]=n):n=a[4],n}function ik(e){return e.slice(0,7)}function iA(e){let t=(0,r.c)(13),{commitOid:n,contentsUrl:a,type:l}=e,o=void 0===n?"":n,s="added"===l?"added at":"deleted from";if(a){let e,n,r,l=`${a}/tree/${o}`;return t[0]!==o?(e=ik(o),t[0]=o,t[1]=e):e=t[1],t[2]!==l||t[3]!==e?(n=(0,i.jsx)(eU.A,{inline:!0,href:l,children:e}),t[2]=l,t[3]=e,t[4]=n):n=t[4],t[5]!==n||t[6]!==s?(r=(0,i.jsxs)(i.Fragment,{children:[s," ",n]}),t[5]=n,t[6]=s,t[7]=r):r=t[7],r}{let e,n;return t[8]!==o?(e=ik(o),t[8]=o,t[9]=e):e=t[9],t[10]!==e||t[11]!==s?(n=(0,i.jsxs)(i.Fragment,{children:[s," ",e]}),t[10]=e,t[11]=s,t[12]=n):n=t[12],n}}function iE(e){let t,n,a,l=(0,r.c)(12),{newCommitOid:o,oldCommitOid:s,changedFiles:d,contentsUrl:c}=e,u=void 0===o?"":o,m=void 0===s?"":s,f=void 0===d?0:d;l[0]!==f||l[1]!==c||l[2]!==u||l[3]!==m?(t=f>0&&c?`${f} ${1===f?"file":"files"}`:`from ${ik(m)} to ${ik(u)}`,l[0]=f,l[1]=c,l[2]=u,l[3]=m,l[4]=t):t=l[4];let h=t;return l[5]!==h||l[6]!==c||l[7]!==u||l[8]!==m?(n=c?(0,i.jsx)(eU.A,{inline:!0,href:`${c}/compare/${m}...${u}`,children:h}):h,l[5]=h,l[6]=c,l[7]=u,l[8]=m,l[9]=n):n=l[9],l[10]!==n?(a=(0,i.jsxs)(i.Fragment,{children:["updated"," ",n]}),l[10]=n,l[11]=a):a=l[11],a}function iR(e){let t,n,l,o,s,d,c=(0,r.c)(16),{compareUrl:u,linesAdded:m,linesDeleted:f,path:h,pathDigest:g,status:p}=e,b=`${u}#diff-${g}`;return c[0]!==p?(t=(0,i.jsx)(iD.E,{status:p}),c[0]=p,c[1]=t):t=c[1],c[2]!==h?(n=(0,i.jsx)("span",{className:"SubmoduleDiff-module__path__Ra2pU",children:h}),c[2]=h,c[3]=n):n=c[3],c[4]!==m||c[5]!==f?(l=(m>0||f>0)&&(0,i.jsxs)("div",{className:"d-flex flex-shrink-0 gap-1 flex-nowrap",children:[(0,i.jsx)("div",{className:"SubmoduleDiff-module__linesAdded__uCgg2",children:m>0&&(0,i.jsxs)(a.C,{isAddition:!0,children:["+",iT(m)]})}),(0,i.jsx)("div",{className:"SubmoduleDiff-module__linesDeleted__Qb7bx",children:f>0&&(0,i.jsxs)(a.C,{isAddition:!1,children:["-",iT(f)]})})]}),c[4]=m,c[5]=f,c[6]=l):l=c[6],c[7]!==n||c[8]!==l?(o=(0,i.jsxs)("div",{className:"d-flex gap-1 flex-justify-between width-full",children:[n,l]}),c[7]=n,c[8]=l,c[9]=o):o=c[9],c[10]!==t||c[11]!==o?(s=(0,i.jsxs)(i_.B,{gap:"condensed",direction:"horizontal",align:"center",className:"SubmoduleDiff-module__fileRow__oBxlW",children:[t,o]}),c[10]=t,c[11]=o,c[12]=s):s=c[12],c[13]!==b||c[14]!==s?(d=(0,i.jsx)(eD.l.LinkItem,{href:b,className:"SubmoduleDiff-module__fileRowLinkItem__SlLM_",children:s}),c[13]=b,c[14]=s,c[15]=d):d=c[15],d}function iT(e){return e>999?`${(e/1e3).toFixed(1)}k`:e.toLocaleString()}iI.displayName="SubmoduleDiff",ij.displayName="SubmodulePath",iA.displayName="SubmoduleCommitChange",iE.displayName="SubmoduleModified",iR.displayName="SubmoduleFileRow";var iO=n(48631);function i$(e){let t,n,a,o,s,c,m,f,h,g,p,v,C,y,x,S,N,w,_,D,I,k,A,E,R,T,O,$=(0,r.c)(72);if($[0]!==e){let{fileAnchor:i,filePath:r,thread:l,isFirstThread:d,ghostUser:c,manuallyUpdateCommentsWithThisThreadId:u,...m}=e;t=r,s=l,a=d,n=c,o=m,$[0]=e,$[1]=t,$[2]=n,$[3]=a,$[4]=o,$[5]=s}else t=$[1],n=$[2],a=$[3],o=$[4],s=$[5];let M=(0,l.useRef)(null);$[6]===Symbol.for("react.memo_cache_sentinel")?(c=(0,j.A)("localStorage"),$[6]=c):c=$[6];let F=c,B=s?.isResolved,[H,P]=(0,l.useState)(""),[K,U]=(0,l.useState)(B??!1);$[7]!==B||$[8]!==s.id?(m=()=>{let e=localStorage.getItem(`reviewThreadIsCollapsed_${s.id}`);null!==e?U(JSON.parse(e)):B&&U(!0)},f=[B,s.id],$[7]=B,$[8]=s.id,$[9]=m,$[10]=f):(m=$[9],f=$[10]),(0,l.useEffect)(m,f);let V=(0,L.zK)();e:{let e;if(null==V){h=!1;break e}$[11]!==V||$[12]!==s.commentsData?.comments?(e=s?.commentsData?.comments.some(e=>e.databaseId===V)??!1,$[11]=V,$[12]=s.commentsData?.comments,$[13]=e):e=$[13],h=e}let z=h,q=K&&!z;$[14]!==q||$[15]!==s.id?(g=()=>{window.requestAnimationFrame(()=>{F.setItem(`reviewThreadIsCollapsed_${s.id}`,JSON.stringify(!q))}),U(iF)},$[14]=q,$[15]=s.id,$[16]=g):g=$[16];let G=g,{sendAnalyticsEvent:W}=(0,ts.s)(),{mutate:X}=(0,tj.H)(t,"FILE");$[17]!==X||$[18]!==W||$[19]!==s?(p=()=>{s&&!s.isResolved&&(X({threadId:s.id},{onError:()=>P("Failed to resolve thread"),onSuccess:()=>{U(!0),F.removeItem(`reviewThreadIsCollapsed_${s.id}`)}}),W("comments.resolve_thread","RESOLVE_CONVERSATION_BUTTON"))},$[17]=X,$[18]=W,$[19]=s,$[20]=p):p=$[20];let J=p,{mutate:Q}=(0,tk.i)(t,"FILE");$[21]!==W||$[22]!==s||$[23]!==Q?(v=()=>{s&&(Q({threadId:s.id},{onError:()=>P("Failed to unresolve thread"),onSuccess:()=>{U(!1),F.removeItem(`reviewThreadIsCollapsed_${s.id}`)}}),W("comments.unresolve_thread","RESOLVE_CONVERSATION_BUTTON"))},$[21]=W,$[22]=s,$[23]=Q,$[24]=v):v=$[24];let Y=v;if(!s||!(s.commentsData?.comments&&s.commentsData.comments.length>0))return null;let Z=s?.commentsData?.comments[0]?.reviewVariantType===te.hH.Automated?s.commentsData?.comments[0]?.automatedComment:null,ee=Z&&Z.dismissable,et=Z&&Z.source===te.vk.LicenseCompliance,en=!!s.isResolved;$[25]===Symbol.for("react.memo_cache_sentinel")?(C=(0,tE.M3)(),$[25]=C):C=$[25];let ei=C;$[26]!==s.commentsData?.comments?(y=ei&&s.commentsData?.comments?.some(iM),$[26]=s.commentsData?.comments,$[27]=y):y=$[27];let er=y,ea=s.commentsData?.comments[0]?.createdAt,el=s.commentsData?.comments[0]?.author?.login??"Unknown Author",eo=`${B?"Unresolve":"Resolve"} comment`;if(ea){let e;$[28]!==ea?(e=(0,tl.C)(new Date(ea)),$[28]=ea,$[29]=e):e=$[29];let t=e;eo=`${B?"Unresolve":"Resolve"} ${el}'s comment, ${t}`}$[30]===Symbol.for("react.memo_cache_sentinel")?(x=(0,i.jsx)(tu,{}),$[30]=x):x=$[30],$[31]===Symbol.for("react.memo_cache_sentinel")?(S=(0,b.$)("px-1","FileReviewThread-module__ReviewThreadContainer__NSCqn"),$[31]=S):S=$[31];let es=q?"Expand comment":"Collapse comment",ed=q?d.ChevronRightIcon:d.ChevronDownIcon;return $[32]!==G||$[33]!==a||$[34]!==es||$[35]!==ed?(N=(0,i.jsx)(u.K,{"aria-label":es,icon:ed,size:"small",variant:"invisible",onClick:G,"data-is-first-collapse-button":a}),$[32]=G,$[33]=a,$[34]=es,$[35]=ed,$[36]=N):N=$[36],$[37]===Symbol.for("react.memo_cache_sentinel")?(w=(0,i.jsx)("h2",{className:"FileReviewThread-module__ReviewThreadHeading__Uv4bD",children:"Comment on file"}),$[37]=w):w=$[37],$[38]!==s.positioning?.isOutdated?(_=s.positioning?.isOutdated&&(0,i.jsx)(t_.A,{variant:"secondary",children:"Outdated"}),$[38]=s.positioning?.isOutdated,$[39]=_):_=$[39],$[40]!==en?(D=en&&(0,i.jsx)(t_.A,{variant:"secondary",children:"Resolved"}),$[40]=en,$[41]=D):D=$[41],$[42]!==_||$[43]!==D?(I=(0,i.jsxs)("div",{className:"FileReviewThread-module__ReviewThreadInnerContainer__oGZcv",children:[_,D]}),$[42]=_,$[43]=D,$[44]=I):I=$[44],$[45]!==N||$[46]!==I?(k=(0,i.jsxs)("div",{className:S,children:[N,w,I]}),$[45]=N,$[46]=I,$[47]=k):k=$[47],$[48]===Symbol.for("react.memo_cache_sentinel")?(A=(0,i.jsxs)("div",{className:"FileReviewThread-module__SpinnerWrapper__Ed5Um",children:[(0,i.jsx)(eB.A,{}),(0,i.jsx)("p",{children:"Loading comments"})]}),$[48]=A):A=$[48],$[49]!==H?(E=H&&(0,i.jsxs)(td.A,{variant:"danger",className:"m-2",children:[(0,i.jsx)(d.StopIcon,{className:"mr-2"}),H]}),$[49]=H,$[50]=E):E=$[50],$[51]!==Z||$[52]!==ee||$[53]!==q||$[54]!==t||$[55]!==n||$[56]!==J||$[57]!==Y||$[58]!==er||$[59]!==B||$[60]!==en||$[61]!==et||$[62]!==eo||$[63]!==o||$[64]!==s?(R=!q&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(tw,{lineMarkersKey:"FILE",batchingEnabled:!0,filePath:t,gridCellId:`${t}-file-level-markers`,isInlineComment:!1,thread:s,shouldLimitHeight:!1,...o,ghostUser:n}),er&&!ee&&!et&&(0,i.jsxs)("div",{className:"d-flex flex-items-center p-2 border-top flex-wrap",children:[(0,i.jsx)(ey.Q,{"aria-label":eo,onClick:en?Y:J,className:"mr-2",children:B?"Unresolve comment":"Resolve comment"}),en&&s.resolvedBy&&(0,i.jsxs)("span",{className:"fgColor-muted f6",children:[(0,i.jsx)("b",{children:s.resolvedBy})," marked this comment as resolved"]})]}),ee&&(0,i.jsx)(tO,{automatedComment:Z,thread:s,filePath:t,lineMarkersKey:"FILE",setErrorMessage:P,setIsCollapsed:U,safeLocalStorage:F})]}),$[51]=Z,$[52]=ee,$[53]=q,$[54]=t,$[55]=n,$[56]=J,$[57]=Y,$[58]=er,$[59]=B,$[60]=en,$[61]=et,$[62]=eo,$[63]=o,$[64]=s,$[65]=R):R=$[65],$[66]!==E||$[67]!==R?(T=(0,i.jsxs)(l.Suspense,{fallback:A,children:[E,R]}),$[66]=E,$[67]=R,$[68]=T):T=$[68],$[69]!==k||$[70]!==T?(O=(0,i.jsx)(to.t,{boundaryName:"FileReviewThread",fallback:x,children:(0,i.jsxs)("div",{className:"rounded-2 bgColor-default",ref:M,children:[k,T]})}),$[69]=k,$[70]=T,$[71]=O):O=$[71],O}function iM(e){return e.state?.toUpperCase()!=="PENDING"}function iF(e){return!e}function iB(e){let t,n,a,o,s,d,c,u,m,f,h=(0,r.c)(33);if(h[0]!==e){let{conversationListThreads:i,filePath:r,manuallyUpdateCommentsWithThisThreadId:l,ghostUser:s,...d}=e;t=i,n=r,a=s,o=d,h[0]=e,h[1]=t,h[2]=n,h[3]=a,h[4]=o}else t=h[1],n=h[2],a=h[3],o=h[4];h[5]!==t?(s=t.filter(iP),h[5]=t,h[6]=s):s=h[6];let g=s;h[7]!==t?(d=t.filter(iH),h[7]=t,h[8]=d):d=h[8];let p=d,v=(0,l.useRef)(null);if(h[9]!==g||h[10]!==p?(c={containerRef:v,markers:[...g,...p],disabled:!1,focusInStrategy:"closest"},h[9]=g,h[10]=p,h[11]=c):c=h[11],e3(c),h[12]!==n||h[13]!==a||h[14]!==o||h[15]!==g||h[16]!==p.length){let e;h[18]!==n||h[19]!==a||h[20]!==o||h[21]!==g.length||h[22]!==p.length?(e=(e,t)=>(0,i.jsx)("div",{className:(0,b.$)("mt-1 border rounded-2 color-border-default color-shadow-small",t===g.length-1&&0===p.length?"mb-1":"mb-2"),"data-first-marker":0===t,"data-marker-id":`${e.id}`,tabIndex:0,children:(0,i.jsx)(i$,{viewerData:o.viewerData,filePath:n,thread:e,ghostUser:a},e.id)},`review-thread-${e.id}`),h[18]=n,h[19]=a,h[20]=o,h[21]=g.length,h[22]=p.length,h[23]=e):e=h[23],u=g.map(e),h[12]=n,h[13]=a,h[14]=o,h[15]=g,h[16]=p.length,h[17]=u}else u=h[17];if(h[24]!==g.length||h[25]!==p){let e;h[27]!==g.length||h[28]!==p.length?(e=(e,t)=>{let n=0===g.length&&0===t,r=p.length;return(0,i.jsx)(tH,{thread:e,isFirstMarker:n,isLastThread:t===r-1,isInDialogMode:!1},`file-review-thread-without-data-${e.id}`)},h[27]=g.length,h[28]=p.length,h[29]=e):e=h[29],m=p.map(e),h[24]=g.length,h[25]=p,h[26]=m}else m=h[26];return h[30]!==u||h[31]!==m?(f=(0,i.jsx)("div",{className:"d-flex pt-1 px-1",children:(0,i.jsxs)("div",{className:"InlineMarkers-module__fileMarkersWrapper__nDvmf",ref:v,children:[u,m]})}),h[30]=u,h[31]=m,h[32]=f):f=h[32],f}function iH(e){return e.hideUntilLoadedAndInView}function iP(e){return!e.hideUntilLoadedAndInView}i$.displayName="FileReviewThread",iB.displayName="FileMarkers";var iK=n(41230),iU=n(83914),iV=n(34349),iz=n(20331),iq=n(85285),iG=n(66743);function iW(e){let t,n,a=(0,r.c)(4),{fileDiffReference:l}=e;a[0]!==l?(t=()=>{document.getElementById(iq.wJ)?((0,iG.BI)("copilot.file-diff.attach",{target:"file-diff-header",mode:"assistive",action:"add_reference"}),(0,iV.Oc)(l)):((0,iG.BI)("copilot.file-diff.attach",{target:"file-diff-header",mode:"assistive",action:"new_thread"}),(0,iV.qR)({intent:iz.wh.conversation,references:[l],newThread:!0,skipImplicitReferences:!0,id:"file-diff-header"}))},a[0]=l,a[1]=t):t=a[1];let o=t;return a[2]!==o?(n=(0,i.jsx)(u.K,{icon:d.CopilotIcon,size:"small","aria-label":"Ask about this diff",onClick:o,onMouseEnter:iX,onFocus:iX,"data-testid":"copilot-diff-explain-button"}),a[2]=o,a[3]=n):n=a[3],n}function iX(){(0,iV.D7)()}iW.displayName="CopilotDiffExplainButton";let iJ=new Set;function iQ(e){let t,n,s,c,u,m,f,h,p,C,y,x,S,N,w,D,I,j,k,A,E,R,T,$,M,F=(0,r.c)(160),{ref:H,addFileCommentButtonRef:P,collapsed:K,copilotDiffContext:U,currentUser:V,diffLines:z,diffManuallyExpanded:q,diffSize:G,helpUrl:W,estimatedDiffHeight:X,fileComments:J,headerStickyOffset:Q,hiddenFeatures:Y,isAddingFileComment:Z,isBinary:ee,isSelected:et,isSubmodule:en,isTooBig:ei,leftSideContent:er,linesAdded:ea,linesChanged:el,linesDeleted:eo,newTreeEntry:es,newCommitOid:ed,objectId:ec,oldTreeEntry:eu,oldCommitOid:em,onToggleCollapse:ef,path:eh,pathDigest:eg,pullRequestGlobalRelayId:ep,repository:eb,richDiffState:ev,rightSideContent:eC,setIsAddingFileComment:ey,hasExpandedAllRanges:eL,expandAllContextLines:ex,canExpandOrCollapseLines:eS,status:eN,submodule:ew,truncatedReason:e_,addInjectedContextLines:eD,loadDiff:eI}=e,ej=void 0===X?0:X,ek=void 0===Y?iJ:Y,eA=void 0!==et&&et,eE=en&&!!ew,eO=!eE&&!ev?.showRichDiff,[e$,eM]=(0,l.useState)(q),eF=(0,L.j5)();F[0]!==q?(t=()=>{q&&eM(!0)},n=[q],F[0]=q,F[1]=t,F[2]=n):(t=F[1],n=F[2]),(0,l.useEffect)(t,n);let{comparisonView:eB}=(0,L.L3)(),eP=(0,L.Kp)(),[eK,eU]=(0,l.useState)(!1);if(F[3]!==z||F[4]!==eK){let e;F[6]!==eK?(e=e=>{let t,n;return{...(t=!1,n=e,t=(0,eq.Y)(e.text),n={...n,hasHiddenUnicode:t},eK&&t&&(n=e.html?{...n,html:(0,iK.Gx)(e.html)??e.html}:{...n,text:(0,eq.TA)(e.text)}),n),key:`b:${e.blobLineNumber}-l:${e.left}-r:${e.right}`}},F[6]=eK,F[7]=e):e=F[7],s=z.map(e),F[3]=z,F[4]=eK,F[5]=s}else s=F[5];let eV=s;F[8]!==eP||F[9]!==z||F[10]!==eh?(c=function(e,t,n){let i={};for(let r of e){let e="DELETION"===r.type?"LEFT":"RIGHT",a=O((0,v.sI)({diffSide:e,filePath:t,line:("LEFT"===e?r.left:r.right)??r.blobLineNumber,subjectId:n},!1)),l="DELETION"!==r.type?"RIGHT":"LEFT",o="RIGHT"===l?r.right:r.left,s=(0,_.oH)(o,l),d=!!a?.text?.trim();s&&d&&(i[s]=!0)}return i}(z,eh,eP),F[8]=eP,F[9]=z,F[10]=eh,F[11]=c):c=F[11];let ez=c,eG=U?.commitMessage,eW=U?.pullRequestUrl;F[12]!==V.hasCopilotAccess||F[13]!==ee||F[14]!==en||F[15]!==ea||F[16]!==eo||F[17]!==ed||F[18]!==es||F[19]!==em||F[20]!==eu||F[21]!==eh||F[22]!==eg||F[23]!==eb||F[24]!==eN||F[25]!==eW||F[26]!==eG?(u={isBinary:ee,isSubmodule:en,path:eh,status:eN,repository:eb,newCommitOid:ed,newTreeEntry:es,oldCommitOid:em,oldTreeEntry:eu,pathDigest:eg,hasCopilotAccess:V.hasCopilotAccess,linesAdded:ea,linesDeleted:eo,commitMessage:eG,pullRequestUrl:eW},F[12]=V.hasCopilotAccess,F[13]=ee,F[14]=en,F[15]=ea,F[16]=eo,F[17]=ed,F[18]=es,F[19]=em,F[20]=eu,F[21]=eh,F[22]=eg,F[23]=eb,F[24]=eN,F[25]=eW,F[26]=eG,F[27]=u):u=F[27];let eX=(0,iO.V)(u);F[28]!==eI?(m=async()=>{await eI(),eM(!0)},F[28]=eI,F[29]=m):m=F[29];let eJ=m,{baseOid:eQ,headOid:eY}=(0,L.E4)(),eZ=(0,eR.u)("cotd_ui"),{effectiveRange:e1}=(0,L.L3)(),{mutate:e0}=t4();F[30]!==ey?(f=()=>{ey(!0)},F[30]=ey,F[31]=f):f=F[31];let e2=f;F[32]!==e2?(h={F0:{startNewComment:e2,diffLineKey:"b:0-l:null-r:null"}},F[32]=e2,F[33]=h):h=F[33];let e3=h;F[34]!==eZ||F[35]!==e0||F[36]!==e1||F[37]!==eY||F[38]!==eh||F[39]!==ey||F[40]!==eQ?(p=e=>{let{onCompleted:t,onError:n,submitBatch:i,text:r}=e;eZ?e0(new t5({filePath:eh,effectiveDiffRange:e1,submitBatch:i,text:r}).fileRequestData(),{onError:n,onSuccess:e=>{t?.(e.thread.id,e.comment.databaseId),ey(!1)}}):e0({text:r,path:eh,submitBatch:i,subjectType:o.Wr.File,comparisonEndOid:eY,comparisonStartOid:eQ},{onError:n,onSuccess:e=>{t?.(e.thread.id,e.comment.databaseId),ey(!1)}})},F[34]=eZ,F[35]=e0,F[36]=e1,F[37]=eY,F[38]=eh,F[39]=ey,F[40]=eQ,F[41]=p):p=F[41];let e4=p;F[42]!==P||F[43]!==ey?(C=()=>{ey(!1),P?.current?.focus()},F[42]=P,F[43]=ey,F[44]=C):C=F[44];let e5=C,e6=V?.avatarURL??"",e7=V?.splitPreference,e8=V?.login??"",e9=V?.lineSpacing,te=V?.shouldDisplayComments,tt=V?.shouldDisplayEditOptions,tn=V?.tabSize??4,ti=V?.canComment,tr=V?.canApplySuggestion;F[45]!==e6||F[46]!==e7||F[47]!==e8||F[48]!==e9||F[49]!==te||F[50]!==tt||F[51]!==tn||F[52]!==ti||F[53]!==tr?(y={avatarUrl:e6,diffViewPreference:e7,login:e8,lineSpacingPreference:e9,shouldDisplayComments:te,shouldDisplayEditOptions:tt,tabSizePreference:tn,viewerCanComment:ti,viewerCanApplySuggestion:tr},F[45]=e6,F[46]=e7,F[47]=e8,F[48]=e9,F[49]=te,F[50]=tt,F[51]=tn,F[52]=ti,F[53]=tr,F[54]=y):y=F[54];let ta=y,tl=(0,l.useId)(),to=`heading-${tl}`;e:{if("split"===new URLSearchParams(g.cg?.location.search).get("diff")){x=!0;break e}x="split"===V.splitPreference}let ts=x,td=es?.lineCount??eu?.lineCount??0;eu?.path,es?.path;t:{let e,t=eu?.path,n=es?.path;if(!t&&!n){S=void 0;break t}e="RENAMED"===eN?`${t} renamed to ${n}`:"DELETED"===eN||"REMOVED"===eN?t:n,S=`Diff for: ${e}`}let tc=S;F[55]!==eV||F[56]!==ee||F[57]!==ei||F[58]!==el||F[59]!==ed||F[60]!==es||F[61]!==ec||F[62]!==em||F[63]!==eu||F[64]!==eh||F[65]!==eg||F[66]!==eN||F[67]!==e_?(N={diffLines:eV,isBinary:ee,isTooBig:ei,linesChanged:el,newTreeEntry:es,newCommitOid:ed,objectId:ec,oldTreeEntry:eu,oldCommitOid:em,path:eh,pathDigest:eg,status:eN,truncatedReason:e_},F[55]=eV,F[56]=ee,F[57]=ei,F[58]=el,F[59]=ed,F[60]=es,F[61]=ec,F[62]=em,F[63]=eu,F[64]=eh,F[65]=eg,F[66]=eN,F[67]=e_,F[68]=N):N=F[68];let tu=N,tm=`diff-${eg}`,tf=`diff-${eg}`;F[69]===Symbol.for("react.memo_cache_sentinel")?(w=(0,b.$)(iw.A.diffTargetable,iw.A.diff),F[69]=w):w=F[69];let th=`${eg}_${eV.length}`,tg=eA?"visible":"auto",tp=`auto ${ej}px`;F[70]!==tg||F[71]!==tp?(D={contentVisibility:tg,containIntrinsicSize:tp},F[70]=tg,F[71]=tp,F[72]=D):D=F[72];let tb=`${void 0===Q?0:Q}px`;F[73]!==tb?(I={"--header-sticky-offset":tb},F[73]=tb,F[74]=I):I=F[74];let tv=`#diff-${eg}`,tC=ev?.richDiff?.canToggleRichDiff,ty=es?.mode,tL=es?.path,tx=eu?.mode,tS=eu?.path;F[75]!==K||F[76]!==ef?(j=e=>ef(e,!K),F[75]=K,F[76]=ef,F[77]=j):j=F[77];let tN=ev?.onToggleRichDiff;F[78]!==eX||F[79]!==eC?(k=ng.W.prChatEnhancements&&eX?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:iw.A.hideOnNarrowContainer,children:(0,i.jsx)(iW,{fileDiffReference:eX})}),eC]}):eC,F[78]=eX,F[79]=eC,F[80]=k):k=F[80];let tw=ev?.showRichDiff;return F[81]!==eS||F[82]!==K||F[83]!==G||F[84]!==ex||F[85]!==eL||F[86]!==to||F[87]!==ek||F[88]!==ee||F[89]!==eF||F[90]!==er||F[91]!==ea||F[92]!==el||F[93]!==eo||F[94]!==eh||F[95]!==eN||F[96]!==tv||F[97]!==tC||F[98]!==ty||F[99]!==tL||F[100]!==tx||F[101]!==tS||F[102]!==j||F[103]!==tN||F[104]!==k||F[105]!==tw?(A=(0,i.jsx)(a.B,{headingId:to,hiddenFeatures:ek,areLinesExpanded:eL,canExpandOrCollapseLines:eS,fileLinkHref:tv,isCollapsed:K,isBinary:ee,size:G,canToggleRichDiff:tC,linesAdded:ea,linesChanged:el,linesDeleted:eo,newMode:ty,newPath:tL,oldMode:tx,oldPath:tS,patchStatus:eN,path:eh,onToggleExpandAllLines:ex,onToggleFileCollapsed:j,onToggleDiffDisplay:tN,additionalLeftSideContent:er,rightSideContent:k,showRichDiff:tw,isInSingleFileMode:eF}),F[81]=eS,F[82]=K,F[83]=G,F[84]=ex,F[85]=eL,F[86]=to,F[87]=ek,F[88]=ee,F[89]=eF,F[90]=er,F[91]=ea,F[92]=el,F[93]=eo,F[94]=eh,F[95]=eN,F[96]=tv,F[97]=tC,F[98]=ty,F[99]=tL,F[100]=tx,F[101]=tS,F[102]=j,F[103]=tN,F[104]=k,F[105]=tw,F[106]=A):A=F[106],F[107]!==I||F[108]!==A?(E=(0,i.jsx)("div",{className:iw.A.diffHeaderWrapper,style:I,children:A}),F[107]=I,F[108]=A,F[109]=E):E=F[109],F[110]!==K||F[111]!==eX||F[112]!==tu||F[113]!==J||F[114]!==e4||F[115]!==eL||F[116]!==W||F[117]!==Z||F[118]!==ts||F[119]!==e$||F[120]!==e5||F[121]!==eJ||F[122]!==eh||F[123]!==ep||F[124]!==eb||F[125]!==ev||F[126]!==eO||F[127]!==eK||F[128]!==eE||F[129]!==ew||F[130]!==tc||F[131]!==ta?(R=K?null:(0,i.jsxs)("div",{className:"border position-relative rounded-bottom-2",children:[(0,i.jsx)(iU.nB,{full:!0,repo:eb,refName:tu.newCommitOid||"",filePath:tu.path}),(0,i.jsxs)(i.Fragment,{children:[J.length>0&&(0,i.jsx)(iB,{conversationListThreads:J,filePath:eh}),Z&&(0,i.jsx)("div",{className:(0,b.$)("border rounded-2 color-border-default m-1 rounded-2 bgColor-default",iw.A.diffAddFileThread),children:(0,i.jsx)(eT,{batchingEnabled:!0,filePath:eh,fileLevelComment:!0,isLeftSide:void 0,viewerData:ta,onAddComment:e4,onClose:e5})})]}),eE&&(0,i.jsx)(iI,{submodule:ew}),ev?.showRichDiff&&(0,i.jsx)(eH,{queryConfig:ev.queryConfig,initialData:ev.richDiff}),eO&&(0,i.jsx)(ix,{hasExpandedAllRanges:eL,copilotChatReference:eX,diffEntryData:tu,baseHelpUrl:W,subjectId:ep||"",viewerData:ta,isSplitView:ts,diffLinesManuallyUnhidden:e$,handleSetShowHiddenUnicodeCharacters:eU,onHandleLoadDiff:eJ,showHiddenUnicodeCharacters:eK,tableAriaLabel:tc})]}),F[110]=K,F[111]=eX,F[112]=tu,F[113]=J,F[114]=e4,F[115]=eL,F[116]=W,F[117]=Z,F[118]=ts,F[119]=e$,F[120]=e5,F[121]=eJ,F[122]=eh,F[123]=ep,F[124]=eb,F[125]=ev,F[126]=eO,F[127]=eK,F[128]=eE,F[129]=ew,F[130]=tc,F[131]=ta,F[132]=R):R=F[132],F[133]!==ej||F[134]!==to||F[135]!==eA||F[136]!==H||F[137]!==tf||F[138]!==th||F[139]!==D||F[140]!==E||F[141]!==R?(T=(0,i.jsxs)("div",{"data-estimated-height":ej,role:"region",ref:H,"aria-labelledby":to,id:tf,className:w,"data-targeted":eA,style:D,children:[E,R]},th),F[133]=ej,F[134]=to,F[135]=eA,F[136]=H,F[137]=tf,F[138]=th,F[139]=D,F[140]=E,F[141]=R,F[142]=T):T=F[142],F[143]!==eB||F[144]!==eF?($=eF&&(0,i.jsxs)("div",{className:iw.A.diffFooter,children:[(0,i.jsx)(d.InfoIcon,{size:16,"aria-hidden":"true"}),(0,i.jsx)("span",{className:"text-center",children:function(e){switch(e){case"COMMIT":return"Due to the large number of changes in the selected commit, only one file is being shown at a time.";case"RANGE":return"Due to the large number of changes in the selected commit range, only one file is being shown at a time.";default:return"Due to the large number of changes in this pull request, only one file is being shown at a time."}}(eB)})]}),F[143]=eB,F[144]=eF,F[145]=$):$=F[145],F[146]!==eD||F[147]!==eV||F[148]!==td||F[149]!==ek||F[150]!==ts||F[151]!==es||F[152]!==eu||F[153]!==eh||F[154]!==e3||F[155]!==ez||F[156]!==tm||F[157]!==T||F[158]!==$?(M=(0,i.jsxs)(B,{addInjectedContextLines:eD,diffAnchor:tm,diffLines:eV,fileLineCount:td,path:eh,startNewConversationForLineOrFileMap:e3,hiddenFeatures:ek,isSplitView:ts,oldTreeEntry:eu,newTreeEntry:es,storedCommentsMap:ez,children:[T,$]}),F[146]=eD,F[147]=eV,F[148]=td,F[149]=ek,F[150]=ts,F[151]=es,F[152]=eu,F[153]=eh,F[154]=e3,F[155]=ez,F[156]=tm,F[157]=T,F[158]=$,F[159]=M):M=F[159],M}function iY(e){let t,n,o,s,c,u=(0,r.c)(24),{path:m,pathDigest:f,linesAdded:h,linesChanged:g,linesDeleted:p,oldTreeEntry:v,newTreeEntry:C,status:y}=e,L=(0,l.useId)(),x=`heading-${L}`,[S,N]=(0,l.useState)(!1),w=`diff-${f}`;u[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,b.$)(iw.A.diffTargetable,iw.A.diff),u[0]=t):t=u[0];let _=`${f}_error`,D=C?.mode,I=C?.path,j=v?.mode,k=v?.path;return u[1]!==S?(n=()=>N(!S),u[1]=S,u[2]=n):n=u[2],u[3]!==x||u[4]!==S||u[5]!==h||u[6]!==g||u[7]!==p||u[8]!==m||u[9]!==y||u[10]!==D||u[11]!==I||u[12]!==j||u[13]!==k||u[14]!==n?(o=(0,i.jsx)("div",{className:iw.A.diffHeaderWrapper,children:(0,i.jsx)(a.B,{headingId:x,isCollapsed:S,isBinary:!1,linesAdded:h,linesChanged:g,linesDeleted:p,newMode:D,newPath:I,oldMode:j,oldPath:k,patchStatus:y,path:m,onToggleFileCollapsed:n})}),u[3]=x,u[4]=S,u[5]=h,u[6]=g,u[7]=p,u[8]=m,u[9]=y,u[10]=D,u[11]=I,u[12]=j,u[13]=k,u[14]=n,u[15]=o):o=u[15],u[16]!==S?(s=!S&&(0,i.jsx)("div",{className:"border position-relative rounded-bottom-2",children:(0,i.jsxs)(tc.E,{children:[(0,i.jsx)(tc.E.Visual,{children:(0,i.jsx)(d.AlertIcon,{size:"medium",className:"fgColor-muted"})}),(0,i.jsx)(tc.E.Heading,{as:"h4",children:"There was an issue loading this file"}),(0,i.jsxs)(tc.E.Description,{children:[" ","Try refreshing the page or if the problem persists"," ",(0,i.jsx)("a",{className:"fgColor-muted",href:"https://support.github.com/",children:(0,i.jsx)("u",{children:"contact support"})}),"."]})]})}),u[16]=S,u[17]=s):s=u[17],u[18]!==x||u[19]!==w||u[20]!==s||u[21]!==_||u[22]!==o?(c=(0,i.jsxs)("div",{role:"region","aria-labelledby":x,id:w,className:t,children:[o,s]},_),u[18]=x,u[19]=w,u[20]=s,u[21]=_,u[22]=o,u[23]=c):c=u[23],c}iQ.displayName="DiffUnmemoized",iY.displayName="DiffErrorFallback";let iZ=(0,l.memo)(iQ);iZ.displayName="Diff"},68938(e,t,n){function i(e){return[...e.querySelectorAll(".js-blob-code-addition")].map(e=>e.textContent).filter(e=>null!==e)}function r(e){if(!e||e.length>1e5)return null;let t=e.split(/\r?\n/),n=!1,i="",r=[];for(let e=0;e0){let t=RegExp(`^ {0,${i.length}}`);e=a.replace(t,"")}r.push(e)}else{let e=a.match(/^( {0,3})(`{3,}|~{3,})suggestion[ \t]*$/);if(e){n=!0,i=e[1]||"";continue}}}return null}n.d(t,{T:()=>r,y:()=>i})},31256(e,t,n){n.d(t,{Av:()=>w,Ji:()=>f,Lp:()=>C,Ls:()=>S,Mk:()=>v,Po:()=>u,S4:()=>x,Yf:()=>_,a2:()=>o,dT:()=>N,dv:()=>g,j2:()=>L,oH:()=>s,qK:()=>m,qX:()=>d,u6:()=>c,xB:()=>h,x_:()=>p});var i=n(58989),r=n(27426),a=n(14864),l=n(15019);function o(e,t,n){return"left"===n?!u(e)&&e.left===t:!u(e)&&(0,i.XU)(e.type)===n&&e.right===t}function s(e,t){return"LEFT"===t?`L${e}`:`R${e}`}function d(e,t,n){let i=`-${u(t)||"number"!=typeof t?.left?"empty":t?.left}`,r=n?`-${u(n)||"number"!=typeof n.right?"empty":n.right}`:"";return`${e}${i}${r}`}function c(e,t){return`${e}-${t}`}function u(e){return void 0===e||!!e&&e===l.Vv}function m(e){return!!e&&e!==l.Vv}function f(e){return"CONTEXT"===e.type}function h(e){return u(e)||f(e)||"INJECTED_CONTEXT"===e.type}function g(e,t){return t===a.w$.Empty||t===a.w$.Hunk?[e,void 0]:b(e,a.JF[t])}function p(e,t){let n;switch(t){case a.w$.Addition:n=a.JF[a.w$.Addition];break;case a.w$.Deletion:n=a.JF[a.w$.Deletion];break;case a.w$.Context:case a.w$.InjectedContext:n=a.JF[a.w$.Context]}return b(e,n)}function b(e,t){if(!t||!e.startsWith(t))return[e,void 0];let n=e[0];return[e.substring(1),n]}function v(e){let t=[],n=[],i=()=>{for(;t.length=a?(0,r.j$)(t):function(e,t){let n=y(e),i=n?e.left:e.right,a=n?"left":"right";if(null!==i)return(0,r.j$)({diffAnchor:t,endLineNumber:i,endOrientation:a,startLineNumber:i,startOrientation:a})}(e,n)}else t&&(i=(0,r.j$)(t));if(i)return`${a}${l}#${i}`}function x({hasThreads:e}){return e?"80px":"24px"}let S=e=>e?e.filter(e=>!u(e)).map(e=>{var t;let[n]=p((t=e.html,new DOMParser().parseFromString(t,"text/html").documentElement.textContent||""),e.type);return n}).join("\n"):"";function N(e){return!!(e.text.length<1&&("CONTEXT"===e.type||"INJECTED_CONTEXT"===e.type)||("DELETION"===e.type||"ADDITION"===e.type)&&1===e.text.length&&["+","-"].includes(e.text.charAt(0)))}let w=(e,t,n,i)=>{let r;if(e)return e;if(!u(t)){let e=(n?t.left:t.right)??0,a=n?"left":"right";r={startOrientation:a,endOrientation:a,startLineNumber:e,endLineNumber:e,diffAnchor:i}}return r};function _(e,t=!1,n=!1){let i;if(n)return"";switch(e){case"ADDITION":i=t?"var(--diffBlob-additionNum-bgColor, var(--diffBlob-addition-bgColor-num))":"var(--diffBlob-additionLine-bgColor, var(--diffBlob-addition-bgColor-line))";break;case"DELETION":i=t?"var(--diffBlob-deletionNum-bgColor, var(--diffBlob-deletion-bgColor-num))":"var(--diffBlob-deletionLine-bgColor, var(--diffBlob-deletion-bgColor-line))";break;case"HUNK":i=t?"var(--diffBlob-hunkNum-bgColor-rest, var(--diffBlob-hunk-bgColor-num))":"var(--diffBlob-hunkLine-bgColor, var(--bgColor-accent-muted))";break;case"EMPTY":i=t?"var(--diffBlob-emptyNum-bgColor, var(--diffBlob-hunk-bgColor-num))":"var(--diffBlob-emptyLine-bgColor, var(--bgColor-accent-muted))";break;default:i="var(--bgColor-default)"}return i}},48631(e,t,n){n.d(t,{V:()=>o});var i=n(16522),r=n(49685),a=n(23666);let l=({path:e,oid:t,repository:n})=>e&&t?{type:"file",url:(0,a.IO9)({repo:n,commitish:t,action:"raw",path:e}),path:e,repoID:n.id,repoName:n.name,repoOwner:n.ownerLogin,ref:t,commitOID:t}:null;function o(e){let t,n=(0,i.c)(12),{isBinary:o,isSubmodule:s,path:d,status:c,repository:u,newCommitOid:m,newTreeEntry:f,oldCommitOid:h,oldTreeEntry:g,pathDigest:p,hasCopilotAccess:b,linesAdded:v,linesDeleted:C,commitMessage:y,pullRequestUrl:L}=e;e:{let e;if(!(({hasCopilotAccess:e,isBinary:t,isSubmodule:n,path:i,repository:a,status:l})=>!!e&&!t&&!n&&!!i&&("DELETED"!==l&&"REMOVED"!==l||!!r.W.prChatEnhancements)&&!!a.id&&!!a.name&&!!a.ownerLogin&&!0)({isBinary:o,isSubmodule:s,path:d,status:c,repository:u,hasCopilotAccess:b})){t=void 0;break e}n[0]!==y||n[1]!==v||n[2]!==C||n[3]!==m||n[4]!==f||n[5]!==h||n[6]!==g||n[7]!==d||n[8]!==p||n[9]!==L||n[10]!==u?(e=(({newCommitOid:e,newTreeEntry:t,oldCommitOid:n,oldTreeEntry:i,path:o,pathDigest:s,repository:d,commitMessage:c,linesAdded:u,linesDeleted:m,pullRequestUrl:f})=>{let h=n&&e?(0,a.IO9)({repo:d,commitish:n,action:"raw",path:o}):"",g={baseFile:l({path:i?.path,oid:n,repository:d}),headFile:l({path:t?.path,oid:e,repository:d}),baseBranchRef:n,id:`#diff-${s}`,type:"file-diff",url:h};return r.W.diffReferenceContext&&(void 0!==c&&(g.commitMessage=c),void 0!==u&&(g.linesAdded=u),void 0!==m&&(g.linesDeleted=m),void 0!==f&&(g.pullRequestUrl=f)),g})({newCommitOid:m,newTreeEntry:f,oldCommitOid:h,oldTreeEntry:g,path:d,pathDigest:p,repository:u,linesAdded:v,linesDeleted:C,commitMessage:y,pullRequestUrl:L}),n[0]=y,n[1]=v,n[2]=C,n[3]=m,n[4]=f,n[5]=h,n[6]=g,n[7]=d,n[8]=p,n[9]=L,n[10]=u,n[11]=e):e=n[11],t=e}return t}},32371(e,t,n){n.d(t,{L4:()=>c,sI:()=>d});var i=n(16522),r=n(35205),a=n(96540);let{getItem:l,removeItem:o,setItem:s}=(0,r.D)("localStorage"),d=(e,t)=>{let{diffSide:n,filePath:i,line:r,subjectId:a}=e;if(t)return`PullRequest:${a}-File:${i}`;if(void 0!==r&&void 0!==n)return`PullRequest:${a}-File:${i}-Line:${r}-DiffSide:${n}`;throw Error("Cannot build diff line comment cache key for a comment without a line number or diff side")};function c(e){let t,n,r,c,u,m,f=(0,i.c)(16),{diffSide:h,filePath:g,handlePersistedCommentExists:p,line:b,subjectId:v,threadId:C,fileLevelComment:y}=e;e:{let e;if(C){t=C;break e}f[0]!==h||f[1]!==y||f[2]!==g||f[3]!==b||f[4]!==v||f[5]!==C?(e=C??d({diffSide:h,filePath:g,line:b,subjectId:v},y),f[0]=h,f[1]=y,f[2]=g,f[3]=b,f[4]=v,f[5]=C,f[6]=e):e=f[6],t=e}let L=t,{hasPersistedComment:x,removePersistedCommentFromStorage:S}=(u=l(L),m=!!u?.text?.trim(),(0,a.useEffect)(()=>{m&&p?.(u)},[m]),{hasPersistedComment:m,removePersistedCommentFromStorage:()=>{o(L),m=!1,u=null}});f[7]!==L?(n=e=>{let t={text:e.text};e.startLine&&e.startSide&&(t={...t,startLine:e.startLine,startSide:e.startSide}),s(L,t)},f[7]=L,f[8]=n):n=f[8];let N=n;f[9]!==v?(r=e=>{let t={shouldFocus:!0};e.text&&(t={...t,text:e.text}),e.startLine&&(t={...t,startLine:e.startLine,startSide:e.givenLineDiffSide,startLineKey:e.startLineKey,endLineKey:e.endLineKey}),s(d({diffSide:e.givenLineDiffSide,filePath:e.givenFilePath,line:e.givenLine,subjectId:v},e.shouldBeFileLevelComment),t)},f[9]=v,f[10]=r):r=f[10];let w=r;return f[11]!==x||f[12]!==w||f[13]!==N||f[14]!==S?(c={hasPersistedComment:x,persistCommentToStorage:N,persistCommentOnGivenLineToStorage:w,removePersistedCommentFromStorage:S},f[11]=x,f[12]=w,f[13]=N,f[14]=S,f[15]=c):c=f[15],c}},15019(e,t,n){function i(e){return"left"===e||"right"===e}n.d(t,{Vv:()=>r,Wr:()=>a,e:()=>i});let r="empty-diff-line",a={Line:"line",Multiline:"multiline",File:"file"}},14628(e,t,n){n.d(t,{J:()=>r,L:()=>i});class i extends Event{endLineNumber;endOrientation;filePath;startOrientation;startLineNumber;constructor(e,t){super("DiffAddCommentButtonClickedEvent",{bubbles:!0,cancelable:!0,composed:!0}),this.startLineNumber=e.startLineNumber,this.endLineNumber=e.endLineNumber,this.startOrientation=e.startOrientation,this.endOrientation=e.endOrientation,this.filePath=t}}class r extends Event{endLineNumber;endOrientation;filePath;startOrientation;startLineNumber;constructor(e,t){super("DiffSelectedLineEvent",{bubbles:!0,cancelable:!0,composed:!0}),this.startLineNumber=e.startLineNumber,this.endLineNumber=e.endLineNumber,this.startOrientation=e.startOrientation,this.endOrientation=e.endOrientation,this.filePath=t}}},56392(e,t,n){function i(e,t){for(let n of function e(t,n=[]){var i,a;let l;if(""===t)return n;let o=t.match(r());if(!o)return n;let s=o.groups.fence;if(!s)return n;let d=s.includes("~")?"~":"`",c=t.match((l=r([i=d],a=s.length),RegExp(`${l.source}(?:\r? )(?.*?)(?:\r? )^ {0,3}${i}{${a},}[ ]*$`,"ms")));if(!c)return n;let u=0,m=o.groups.indent;""!==m&&(u=m.length);let f=c.groups.suggestion;if(u>0){let e=RegExp(`^ {0,${u}}`,"m");f=f.replace(e,"")}return n.push(f),e(t.slice(c.index+c[0].length),n)}(e))if(n===t)return{isValid:!1,errorMessage:"Suggested change cannot be the same as the original line"};return{isValid:!0,errorMessage:""}}function r(e=["`","~"],t){let n=t?`{${t}}`:"{3,}",i=e.map(e=>`${e}${n}`);return RegExp(`^(? {0,3})(?${i.join("|")})suggestion[ ]*$`,"m")}n.d(t,{u:()=>i})},14193(e,t,n){n.d(t,{G:()=>i});let i=n(2501).$h.create("pull-requests")},43029(e,t,n){n.d(t,{H:()=>u});var i=n(16522),r=n(78431),a=n(62764),l=n(97665),o=n(94747),s=n(3079),d=n(70503),c=n(7909);function u(e,t){let n,u,m,f,h=(0,i.c)(12),g=(0,d.Kp)();h[0]===Symbol.for("react.memo_cache_sentinel")?(n=(0,c.cj)(),h[0]=n):n=h[0];let p=n,b=`${g}/page_data/${a.uT.resolveThread}`,v=(0,l.jE)(),{updateThread:C}=(0,d.an)();return h[1]!==b?(u=async e=>{let{threadId:t}=e,n=await (0,r.q$)(b,{method:"POST",body:{threadId:t}});(0,r.R)(n)},h[1]=b,h[2]=u):u=h[2],h[3]!==g||h[4]!==e||h[5]!==t||h[6]!==v||h[7]!==C?(m=(n,i)=>(C(Number(i.threadId),e,t,e=>{if(e)return{...e,isResolved:!0,resolvedBy:p}}),v.invalidateQueries({queryKey:(0,s.XG)(g)})),h[3]=g,h[4]=e,h[5]=t,h[6]=v,h[7]=C,h[8]=m):m=h[8],h[9]!==u||h[10]!==m?(f={mutationFn:u,onSuccess:m},h[9]=u,h[10]=m,h[11]=f):f=h[11],(0,o.n)(f)}},53572(e,t,n){n.d(t,{i:()=>c});var i=n(16522),r=n(78431),a=n(62764),l=n(97665),o=n(94747),s=n(3079),d=n(70503);function c(e,t){let n,c,m,f=(0,i.c)(11),h=(0,d.Kp)(),g=`${h}/page_data/${a.uT.unresolveThread}`,p=(0,l.jE)(),{updateThread:b}=(0,d.an)();return f[0]!==g?(n=async e=>{let{threadId:t}=e,n=await (0,r.q$)(g,{method:"POST",body:{threadId:t}});(0,r.R)(n)},f[0]=g,f[1]=n):n=f[1],f[2]!==h||f[3]!==e||f[4]!==t||f[5]!==p||f[6]!==b?(c=(n,i)=>(b(Number(i.threadId),e,t,u),p.invalidateQueries({queryKey:(0,s.XG)(h)})),f[2]=h,f[3]=e,f[4]=t,f[5]=p,f[6]=b,f[7]=c):c=f[7],f[8]!==n||f[9]!==c?(m={mutationFn:n,onSuccess:c},f[8]=n,f[9]=c,f[10]=m):m=f[10],(0,o.n)(m)}function u(e){if(e)return{...e,isResolved:!1,resolvedBy:void 0}}},3079(e,t,n){n.d(t,{XG:()=>a,jM:()=>l}),n(16522);var i=n(62764);n(78597),n(70503);var r=n(18176);function a(e){return[i.uT.threadPreviews,e]}function l(e){let t=e.subject?.endDiffSide==="RIGHT"?"R":"L",n=e.subjectType?.toUpperCase()==="FILE",i=e.positioning?.path??e.path??"",a=n||e.subject?.endLine&&""!==i?i:r.Ao,l=n?"FILE":r.Ao;return{filePath:a,lineKey:e.subject?.endLine?`${t}${e.subject.endLine}`:l}}},28832(e,t,n){n.d(t,{j:()=>l});var i=n(40604),r=n(14193),a=n(24222);let l=r.G.createQueryRouteConfig("pullRequestsLayoutRoute",{path:"/:owner/:repo/pull/:pr_number",queries:[(0,a.Y)({queryDeps:({pathname:e})=>({pathname:`${e}/_layout`})}),{queryName:"tabCounts",queryDeps:({params:e})=>({pathname:`/${e.owner}/${e.repo}/pull/${e.pr_number}/page_data/tab_counts`}),queryFn:async e=>(0,i.X)(e)},{queryName:"diffstat",queryDeps:({params:e})=>({pathname:`/${e.owner}/${e.repo}/pull/${e.pr_number}/page_data/diffstat`}),queryFn:async e=>(0,i.X)(e)}]})},45088(e,t,n){n.d(t,{n:()=>g,Z:()=>h});var i=n(74848),r=n(96540),a=n(71323),l=n(97283),o=n(87134);n(16522),n(78597),n(49671);var s=n(62764),d=n(28832),c=n(49322),u=n(53035),m=n(37337);let f=(0,r.createContext)(null);function h(e){let t=(0,r.use)(f);if(!t)throw Error("Missing PullRequestAnalyticsStoreProvider in the tree");return(0,a.P)(t,e)}f.displayName="PullRequestAnalyticsStoreContext";let g=({initData:e,children:t})=>{let n=(0,r.useRef)(null),a=function(){if(m.X3||!(0,u.E)())return;let{data:e}=(0,c.xX)(d.j,s.uT.diffstat);return e?.diffstat}();return n.current||(n.current=p(e)),(0,r.useEffect)(()=>{var e;n.current&&a&&n.current.setState({diffSizeCategory:void 0===(e=a.linesChanged)?"unknown":e<100?"xs":e<500?"s":e<1e3?"m":e<5e3?"l":e<1e4?"xl":"xxl"})},[a]),(0,i.jsx)(f,{value:n.current,children:t})};g.displayName="PullRequestAnalyticsStoreProvider";let p=e=>(0,l.y)()((0,o.lt)((t,n)=>({...e,virtualizationEnabled:!0===e.virtualizationEnabled?"true":"false",diffSizeCategory:"unknown",getINPDiffTags:()=>({diffVersion:n().diffVersion,diffSizeCategory:n().diffSizeCategory,virtualizationEnabled:n().virtualizationEnabled})}),{name:"analytics-store"}))},22187(e,t,n){n.d(t,{J:()=>r});var i=n(45088);let r=()=>(0,i.Z)(a);function a(e){return e.getINPDiffTags}},89413(e,t,n){n.d(t,{Dg:()=>l,L_:()=>a,M0:()=>o});var i=n(51189),r=n(96540);function a(){let e=performance.memory;return e?.usedJSHeapSize&&e?.jsHeapSizeLimit?Math.round(e.usedJSHeapSize/e.jsHeapSizeLimit*1e4)/100:null}function l(){let e=performance.memory;return e?.usedJSHeapSize??null}function o({intervalMs:e=5e3,maxDatapoints:t=20,statName:n,tags:a}){(0,r.useEffect)(()=>{let r;if(!performance||!("memory"in performance)||t<=0)return;let l=0,o=()=>{document.hidden&&s()},s=()=>{void 0!==r&&(clearInterval(r),r=void 0),document.removeEventListener("visibilitychange",o)},d=()=>{!function({statName:e,tags:t}){requestIdleCallback(()=>{let n,r=(n=performance.memory,n?.usedJSHeapSize?Math.round(n.usedJSHeapSize/1024/1024*10)/10:null);r&&(0,i.au)({name:e,value:r,tags:t})})}({statName:n,tags:a}),++l>=t&&s()};return d(),l{s()}},[e,t,n,a])}},59518(e,t,n){n.d(t,{n:()=>l});var i=n(51189),r=n(26316),a=n(89413);function l(e=.1){if(Math.random()>e)return()=>{};let t=(0,a.Dg)();if(null===t)return()=>{};let n=t,o=0,s=0,d=(e,t)=>{(0,i.au)({requestUrl:window.location.href,name:e,value:t})},c=(e,t)=>{"u">typeof requestIdleCallback?requestIdleCallback(()=>d(e,t)):setTimeout(()=>d(e,t),0)},u=()=>{if(o>=20)return void clearInterval(m);let e=(0,a.Dg)();if(null===e)return;n=Math.max(n,e);let t=Math.round(e/1024/1024*100)/100;if(2>Math.abs(t-s))return;o++,s=t,c("BROWSER_MEMORY_DIST_HEAP_USED",t);let i=(0,a.L_)();null!==i&&c("BROWSER_MEMORY_DIST_HEAP_UTILIZATION",i)},m=setInterval(u,3e4),f=()=>{if(r.XC?.visibilityState==="hidden"){let e=(0,a.Dg)();null!==e&&(c("BROWSER_MEMORY_DIST_SESSION_GROWTH",Math.round((e-t)/1024/1024*100)/100),c("BROWSER_MEMORY_DIST_SESSION_MAX",Math.round(n/1024/1024*100)/100))}};r.XC?.addEventListener("visibilitychange",f);let h=setTimeout(u,5e3);return()=>{clearInterval(m),clearTimeout(h),r.XC?.removeEventListener("visibilitychange",f)}}},13183(e,t,n){function i(){return!!document.querySelector('react-app[data-lazy="true"]')}function r(){return!!document.querySelector('react-app[data-alternate="true"]')}function a(){return!!document.querySelector("header.AppHeader")}function l(){return performance.getEntriesByType("resource").some(e=>"fetch"===e.initiatorType&&e.name.includes("_graphql?"))}function o(){return performance.getEntriesByType("resource").some(e=>"script"===e.initiatorType)}n.d(t,{Dk:()=>a,NT:()=>c,X:()=>d,_:()=>i,aE:()=>l,u$:()=>r,xF:()=>o}),n(73537),n(59518);let s=null;function d(){return s}function c(e){s=e}}}]); //# sourceMappingURL=11044-f32091b47d28d6de-b20602a98f15e9e2.js.map