performance.mark("js-parse-end:51046-db2cb3cece42d01d.js");
"use strict";(globalThis.webpackChunk_github_ui_github_ui=globalThis.webpackChunk_github_ui_github_ui||[]).push([["51046"],{34810(e,t,r){r.d(t,{z:()=>l});var n=r(74848),i=r(16522);let l=e=>{let t,r=(0,i.c)(5),{ref:l,onClick:o,id:a,children:s}=e;return r[0]!==s||r[1]!==a||r[2]!==o||r[3]!==l?(t=(0,n.jsx)("button",{type:"button",id:a,ref:l,onClick:o,className:"CompactCommentButton-module__CompactCommentInputContainer__Ab_eI",children:s}),r[0]=s,r[1]=a,r[2]=o,r[3]=l,r[4]=t):t=r[4],t};l.displayName="CompactCommentButton",l.displayName="CompactCommentButton"},89437(e,t,r){r.d(t,{w:()=>m});var n=r(74848),i=r(16522),l=r(38621),o=r(67323),a=r(18990),s=r(34467),c=r(50312),d=r(59),u=r(49685);let m=e=>{let t,r,m,f,h,p,g,_,b,x,y=(0,i.c)(27),{fileDiffReference:v,selectedRange:w,showDivider:j}=e;if(y[0]!==v||y[1]!==w){if(t={...v},w){let e,r,n;y[3]!==w?.startOrientation[0]?(e=w?.startOrientation[0]?.toUpperCase()??"",y[3]=w?.startOrientation[0],y[4]=e):e=y[4];let i=`${e}${w?.startLineNumber}`;y[5]!==w?.endOrientation[0]?(r=w?.endOrientation[0]?.toUpperCase()??"",y[5]=w?.endOrientation[0],y[6]=r):r=y[6];let l=`${r}${w?.endLineNumber}`;y[7]!==i||y[8]!==l?(n={start:i,end:l},y[7]=i,y[8]=l,y[9]=n):n=y[9],t.selectedRange=n}y[0]=v,y[1]=w,y[2]=t}else t=y[2];let C=t;return y[10]===Symbol.for("react.memo_cache_sentinel")?(r=(0,n.jsx)(o.W.Anchor,{children:(0,n.jsxs)(a.l.Item,{children:[(0,n.jsx)(a.l.LeadingVisual,{children:(0,n.jsx)(l.CopilotIcon,{})}),"Copilot"]})}),y[10]=r):r=y[10],y[11]===Symbol.for("react.memo_cache_sentinel")?(m={prx:!0},y[11]=m):m=y[11],y[12]!==C?(f=(0,n.jsx)(c.t,{fileDiffReference:C,eventContext:m}),y[12]=C,y[13]=f):f=y[13],y[14]===Symbol.for("react.memo_cache_sentinel")?(h={prx:!0},y[14]=h):h=y[14],y[15]!==C?(p=(0,n.jsx)(d.e,{fileDiffReference:C,eventContext:h}),g=!u.W.copilotRedirectDiffViewToImmersive&&(0,n.jsx)(s.i,{fileDiffReference:C,eventContext:{prx:!0}}),y[15]=C,y[16]=p,y[17]=g):(p=y[16],g=y[17]),y[18]!==f||y[19]!==p||y[20]!==g?(_=(0,n.jsxs)(o.W,{children:[r,(0,n.jsx)(o.W.Overlay,{children:(0,n.jsxs)(a.l,{children:[f,p,g]})})]}),y[18]=f,y[19]=p,y[20]=g,y[21]=_):_=y[21],y[22]!==j?(b=j&&(0,n.jsx)(a.l.Divider,{}),y[22]=j,y[23]=b):b=y[23],y[24]!==_||y[25]!==b?(x=(0,n.jsxs)(n.Fragment,{children:[_,b]}),y[24]=_,y[25]=b,y[26]=x):x=y[26],x};m.displayName="CopilotDiffChatContextMenu"},34467(e,t,r){r.d(t,{i:()=>c});var n=r(74848),i=r(16522),l=r(34349),o=r(66743),a=r(40914),s=r(18990);let c=e=>{let t,r=(0,i.c)(5),{fileDiffReference:c,eventContext:d,afterSelect:u}=e,{addToast:m}=(0,a.Y6)();return r[0]!==m||r[1]!==u||r[2]!==d||r[3]!==c?(t=(0,n.jsx)(s.l.Item,{onSelect:()=>{(0,l.Oc)(c,!0),m({message:"Reference added to thread",type:"success"}),(0,o.BI)("copilot.file-diff.add",d),u?.()},children:"Attach to current thread"}),r[0]=m,r[1]=u,r[2]=d,r[3]=c,r[4]=t):t=r[4],t};c.displayName="DiffLinesAttachMenuItem"},50312(e,t,r){r.d(t,{t:()=>u});var n=r(74848),i=r(16522),l=r(34349),o=r(20331),a=r(49685),s=r(10506),c=r(66743),d=r(18990);let u=e=>{let t,r,u,m=(0,i.c)(9),{fileDiffReference:f,leadingVisual:h,eventContext:p,afterSelect:g}=e;m[0]!==g||m[1]!==p||m[2]!==f?(t=()=>{a.W.copilotRedirectDiffViewToImmersive?((0,c.BI)("copilot.file-diff.discuss",{target:"file-diff",mode:"immersive"}),s.Jt.setCurrentReferences(null,[f]),s.Jt.setCopilotDiffReferences(f),window.location.href="proxy.php?url=/copilot"):((0,c.BI)("copilot.file-diff.discuss",{target:"file-diff",mode:"assistive",...p}),(0,l.qR)({intent:o.wh.conversation,references:[f]}),g?.())},m[0]=g,m[1]=p,m[2]=f,m[3]=t):t=m[3];let _=t;return m[4]!==h?(r=h&&(0,n.jsx)(d.l.LeadingVisual,{children:h}),m[4]=h,m[5]=r):r=m[5],m[6]!==_||m[7]!==r?(u=(0,n.jsxs)(d.l.Item,{onSelect:_,children:[r,"Ask about this diff"]}),m[6]=_,m[7]=r,m[8]=u):u=m[8],u};u.displayName="DiffLinesDiscussMenuItem"},59(e,t,r){r.d(t,{e:()=>m});var n=r(74848),i=r(16522),l=r(34349),o=r(20331),a=r(49685),s=r(10506),c=r(82615),d=r(66743),u=r(18990);let m=e=>{let t,r=(0,i.c)(4),{fileDiffReference:m,eventContext:f,afterSelect:h}=e;return r[0]!==h||r[1]!==f||r[2]!==m?(t=(0,n.jsx)(u.l.Item,{onSelect:()=>{a.W.copilotRedirectDiffViewToImmersive?((0,d.BI)("copilot.file-diff.explain",{target:"file-diff",mode:"immersive"}),s.Jt.setCopilotDiffReferences(m),s.Jt.setEntrypointMessage({message:(0,c.vo)(),references:[m]}),window.location.href="proxy.php?url=/copilot"):((0,d.BI)("copilot.file-diff.explain",{target:"file-diff",mode:"assistive",...f}),(0,l.qR)({content:(0,c.vo)(),intent:o.wh.explainFileDiff,references:[m]}),h?.())},children:"Explain"}),r[0]=h,r[1]=f,r[2]=m,r[3]=t):t=r[3],t};m.displayName="DiffLinesExplainMenuItem"},16025(e,t,r){r.d(t,{E:()=>o});var n=r(74848),i=r(16522),l=r(38621);function o(e){let t=(0,i.c)(5),{status:r,isSymlink:o}=e;if(o){let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,n.jsx)(l.FileSymlinkFileIcon,{size:16,className:"fgColor-attention"}),t[0]=e):e=t[0],e}switch(r){case"ADDED":case"COPIED":{let e;return t[1]===Symbol.for("react.memo_cache_sentinel")?(e=(0,n.jsx)(l.FileAddedIcon,{size:16,className:"fgColor-success"}),t[1]=e):e=t[1],e}case"DELETED":case"REMOVED":{let e;return t[2]===Symbol.for("react.memo_cache_sentinel")?(e=(0,n.jsx)(l.FileRemovedIcon,{size:16,className:"fgColor-danger"}),t[2]=e):e=t[2],e}case"RENAMED":{let e;return t[3]===Symbol.for("react.memo_cache_sentinel")?(e=(0,n.jsx)(l.FileMovedIcon,{size:16,className:"fgColor-attention"}),t[3]=e):e=t[3],e}default:{let e;return t[4]===Symbol.for("react.memo_cache_sentinel")?(e=(0,n.jsx)(l.FileDiffIcon,{size:16,className:"fgColor-muted"}),t[4]=e):e=t[4],e}}}o.displayName="FileStatusIcon"},49242(e,t,r){r.r(t),r.d(t,{default:()=>_});var n=r(74848),i=r(16522),l=r(26316),o=r(19519),a=r(59134),s=r(7478),c=r(34164),d=r(96540);let u="ERROR",m="LOADING",f="LOADED",h="READY";function p(e){e&&(e.load=e.hello=null,e.helloTimer&&(clearTimeout(e.helloTimer),e.helloTimer=null),e.loadTimer&&(clearTimeout(e.loadTimer),e.loadTimer=null))}function g(e,t){e&&e.postMessage&&e.postMessage(JSON.stringify(t),"*")}function _(e){let t,r,_,x,y,v=(0,i.c)(24),{identityUuid:w,size:j,type:C,url:R,iframeClassName:N,viewportClassName:E}=e,{isBrowser:D}=(0,o.V)(),S=D?l.fV?.origin??"https://www.github.com":"https://www.github.com";v[0]!==S||v[1]!==R?(t=new URL(R,S),v[0]=S,v[1]=R,v[2]=t):t=v[2];let A=t.origin,{renderState:I,errorMsg:F,iFrameRef:k,containerRef:B}=function(e,t){let[r,n]=function(e){let t,r=(0,i.c)(1),[n,l]=(0,d.useState)(e),o=(0,d.useRef)(n);return r[0]===Symbol.for("react.memo_cache_sentinel")?(t=[o,e=>{o.current=e,l(e)}],r[0]=t):t=r[0],t}(m),l=(0,d.useRef)(null),o=(0,d.useRef)(null),a=(0,d.useRef)(null),s=(0,d.useRef)({untimed:!0}),c=(0,d.useCallback)(r=>(function(e,t,r,n,i,l,o,a){if(e.origin!==t)return;let s=function(e){var t;let r=e.data;if(!r)return null;if("string"==typeof r)try{r=JSON.parse(r)}catch{return null}return"object"==typeof(t=r)&&t&&"render"===t.type&&"string"==typeof t.body&&"object"==typeof t.payload?r:null}(e);if(!s)return void o(u);if(s.identity!==r)return;let c=s.body,d=null!=s.payload?s.payload:void 0,p=n.current?.contentWindow;switch(c){case"hello":(l.current??{untimed:!0}).hello=Date.now(),g(p,{type:"render:cmd",body:{cmd:"ack",ack:!0}}),g(p,{type:"render:cmd",body:{cmd:"branding",branding:!1}});break;case"error":case"error:fatal":case"error:invalid":d&&a(d.error??null),o(u);break;case"loading":o(m);break;case"loaded":o(f);break;case"ready":d&&"number"==typeof d.height&&i.current&&(i.current.style.height=`${d.height}px`),o(h);break;case"resize":d&&"number"==typeof d.height&&i.current&&(i.current.style.height=`${d.height}px`);break;case"code_rendering_service:container:get_size":g(p,{type:"render:cmd",body:{cmd:"code_rendering_service:container:size","code_rendering_service:container:size":{width:i.current?.getBoundingClientRect().width}}});break;case"code_rendering_service:markdown:get_data":if(!n.current||!i.current)return;!function(e,t){let r=e.getAttribute("data-content");if(!r)return;let n={type:"render:cmd",body:{cmd:"code_rendering_service:data:ready","code_rendering_service:data:ready":{data:JSON.parse(r).data,width:t.getBoundingClientRect().width}}};g(e.contentWindow,n)}(n.current,i.current)}})(r,e,t,o,a,s,n,e=>l.current=e),[e,n,t]);return(0,d.useEffect)(()=>{p(s.current);let e=e=>{(r.current===m||r.current===f)&&(!e||s.current.hello)&&n(u)};return s.current={load:Date.now(),hello:null,helloTimer:window.setTimeout(e,1e4,!0),loadTimer:window.setTimeout(e,45e3)},()=>{p(s.current)}},[r,n]),(0,d.useEffect)(()=>(window.addEventListener("message",c),()=>window.removeEventListener("message",c)),[c]),{renderState:r.current,errorMsg:l.current,iFrameRef:o,containerRef:a}}(A,w);if("ipynb"===C&&j>3e7||j>2e8){let e;return v[3]===Symbol.for("react.memo_cache_sentinel")?(e=(0,n.jsx)(a.A,{variant:"danger",children:"Sorry, this is too big to display."}),v[3]=e):e=v[3],e}let T=I!==u,z=I===h;return v[4]!==T||v[5]!==z||v[6]!==E?(r=(0,c.$)("FileRendererBlob-module__FileRendererViewport__IrWV2",{"FileRendererBlob-module__FileRendererViewportNonError__DY3EP":T,"FileRendererBlob-module__FileRendererViewportReady__B_YAj":z},E),v[4]=T,v[5]=z,v[6]=E,v[7]=r):r=v[7],v[8]!==F||v[9]!==I?(_=I===u?(0,n.jsx)(b,{error:F}):I!==h?(0,n.jsx)(s.A,{size:"large",className:"FileRendererBlob-module__loadingIndicator__ZunNw"}):null,v[8]=F,v[9]=I,v[10]=_):_=v[10],v[11]!==k||v[12]!==w||v[13]!==N||v[14]!==I||v[15]!==R?(x=I!==u&&(0,n.jsx)("iframe",{ref:k,src:`${R}#${w}`,sandbox:"allow-scripts allow-same-origin allow-top-navigation",name:w,title:"File display",className:(0,c.$)("FileRendererBlob-module__fileContentFrame__NyvSj",{"FileRendererBlob-module__fileContentFrameNotReady__QQmzv":I!==h},N),children:"Viewer requires iframe."}),v[11]=k,v[12]=w,v[13]=N,v[14]=I,v[15]=R,v[16]=x):x=v[16],v[17]!==B||v[18]!==A||v[19]!==r||v[20]!==_||v[21]!==x||v[22]!==C?(y=(0,n.jsx)("div",{className:"FileRendererBlob-module__FileRendererWrapper__khDNE",children:(0,n.jsxs)("div",{"data-hpc":!0,"data-host":A,"data-type":C,ref:B,className:r,children:[_,x]})}),v[17]=B,v[18]=A,v[19]=r,v[20]=_,v[21]=x,v[22]=C,v[23]=y):y=v[23],y}function b(e){let t,r,l,o,s,c,d=(0,i.c)(14),{error:u}=e;if(!u){let e;return d[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,n.jsx)(a.A,{variant:"danger",children:"Unable to render code block"}),d[0]=e):e=d[0],e}if(d[1]!==u){let e=u.split("\n");t=a.A,l="danger",d[6]===Symbol.for("react.memo_cache_sentinel")?(o=(0,n.jsx)("p",{className:"FileRendererBlob-module__errorMessageHeading__V0EWN",children:"Error rendering embedded code"}),d[6]=o):o=d[6],r=e.map(x),d[1]=u,d[2]=t,d[3]=r,d[4]=l,d[5]=o}else t=d[2],r=d[3],l=d[4],o=d[5];return d[7]!==r?(s=(0,n.jsx)("p",{children:r}),d[7]=r,d[8]=s):s=d[8],d[9]!==t||d[10]!==l||d[11]!==o||d[12]!==s?(c=(0,n.jsxs)(t,{variant:l,children:[o,s]}),d[9]=t,d[10]=l,d[11]=o,d[12]=s,d[13]=c):c=d[13],c}function x(e,t){return(0,n.jsxs)(d.Fragment,{children:[e,(0,n.jsx)("br",{})]},`error-line-${t}`)}_.displayName="FileRendererBlob",b.displayName="FileRendererErrorMessage"},73673(e,t,r){r.d(t,{o:()=>a});var n=r(74848),i=r(16522),l=r(38621),o=r(4978);function a(){let e,t=(0,i.c)(1);return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,n.jsx)(o.A,{direction:"n",text:"This line has hidden Unicode characters",children:(0,n.jsx)(l.AlertIcon,{className:"mr-2"})}),t[0]=e):e=t[0],e}a.displayName="HiddenUnicodeAlert"},72609(e,t,r){r.d(t,{a:()=>u});var n=r(74848),i=r(16522),l=r(26316),o=r(19519),a=r(38621),s=r(83223),c=r(59134),d=r(21373);function u(e){let t,r,u,m,f=(0,i.c)(6),{isShown:h,toggleShowHiddenCharacters:p}=e,{isBrowser:g}=(0,o.V)();if(!(g?l.cg:void 0))return null;f[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,n.jsx)(a.AlertIcon,{}),f[0]=t):t=f[0],f[1]===Symbol.for("react.memo_cache_sentinel")?(r=(0,n.jsxs)("span",{children:["This file contains bidirectional or hidden Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters."," ",(0,n.jsx)(s.A,{inline:!0,href:"https://github.co/hiddenchars",target:"_blank",rel:"noreferrer",children:"Learn more about bidirectional Unicode characters"})]}),f[1]=r):r=f[1],f[2]===Symbol.for("react.memo_cache_sentinel")?(u={backgroundClip:"padding-box"},f[2]=u):u=f[2];let _=h?"Hide revealed characters":"Show hidden characters";return f[3]!==_||f[4]!==p?(m=(0,n.jsxs)(c.A,{className:"d-flex flex-items-center",full:!0,variant:"warning",children:[t,r,(0,n.jsx)(d.Q,{className:"tmp-ml-4 float-right",onClick:p,size:"small",style:u,children:_})]}),f[3]=_,f[4]=p,f[5]=m):m=f[5],m}u.displayName="HiddenUnicodeBanner"},41230(e,t,r){r.d(t,{Gx:()=>i}),r(74848),r(16522);var n=r(39879);function i(e){return(0,n.Y)(e)?(0,n.t6)(e).map(e=>{let t=n.A0.get(e);return t?`${t}`:e}).join(""):null}},39879(e,t,r){r.d(t,{A0:()=>o,TA:()=>c,Y:()=>d,_n:()=>u,rE:()=>a,t6:()=>s});let n=/[\u202A-\u202E]|[\u2066-\u2069]|\u{E0001}|\u{E007F}/u,i=/[\u202A-\u202E]|[\u2066-\u2069]|\u{E0001}|\u{E007F}/gu,l=/([\u202A-\u202E]|[\u2066-\u2069]|\u{E0001}|\u{E007F})/gu,o=new Map(Object.entries({"\u202A":"U+202A","\u202B":"U+202B","\u202C":"U+202C","\u202D":"U+202D","\u202E":"U+202E","\u2066":"U+2066","\u2067":"U+2067","\u2068":"U+2068","\u2069":"U+2069","\uDB40\uDC01":"U+E0001","\uDB40\uDC7F":"U+E007F"}));function a(e){return``}function s(e){return e.split(l)}function c(e){return d(e)?e.replaceAll(i,e=>o.get(e)??""):e}function d(e){return n.test(e)}function u(e){return o.get(e)}},64878(e,t,r){r.d(t,{k:()=>d});var n=r(74848),i=r(16522),l=r(206),o=r(95126),a=r(94709),s=r(56819);function c(e){let t,r,l,o,c,d,u,m,f=(0,i.c)(20),{iconColor:h,icon:p,size:g,backgroundColor:_,absolute:b,backgroundSx:x,backgroundClassName:y}=e,v=void 0===g?12:g,w=void 0===_?"fg.onEmphasis":_,j=void 0===b||b;return 12===v?(t="10px",r="1px"):20===v?(t="16px",r="2px"):(t="16px",r="4px"),f[0]!==j?(l=j?{position:"absolute",bottom:-1,right:-1,boxShadow:"0 0 0 2px var(--bgColor-default, var(--color-canvas-default))",backgroundColor:"var(--bgColor-default, var(--color-canvas-default))"}:{position:"relative"},f[0]=j,f[1]=l):l=f[1],f[2]!==x||f[3]!==l?(o={display:"flex",borderRadius:"100px",...l,...x},f[2]=x,f[3]=l,f[4]=o):o=f[4],f[5]!==w||f[6]!==t||f[7]!==r?(c=(0,n.jsx)(a.az,{sx:{display:"flex",position:"absolute",borderRadius:"100px",width:t,height:t,left:r,top:r,backgroundColor:w}}),f[5]=w,f[6]=t,f[7]=r,f[8]=c):c=f[8],f[9]!==h?(d={color:h,position:"relative"},f[9]=h,f[10]=d):d=f[10],f[11]!==p||f[12]!==v||f[13]!==d?(u=(0,n.jsx)(s.m4,{icon:p,size:v,sx:d}),f[11]=p,f[12]=v,f[13]=d,f[14]=u):u=f[14],f[15]!==y||f[16]!==o||f[17]!==c||f[18]!==u?(m=(0,n.jsxs)(a.az,{sx:o,className:y,children:[c,u]}),f[15]=y,f[16]=o,f[17]=c,f[18]=u,f[19]=m):m=f[19],m}function d(e){let t,r,s,d,u,m=(0,i.c)(23),{zIndex:f,altText:h,hovercardUrl:p,src:g,square:_,icon:b,iconColor:x,backgroundColor:y,backgroundSx:v,backgroundClassName:w,className:j,sx:C,size:R}=e,N=void 0===R?20:R,E=(0,o.yY)();return m[0]!==C||m[1]!==f?(t={position:"relative",display:"flex",gap:2,alignItems:"center",...f,...C},m[0]=C,m[1]=f,m[2]=t):t=m[2],m[3]!==E||m[4]!==p?(r=p?E("user",{url:p}):{},m[3]=E,m[4]=p,m[5]=r):r=m[5],m[6]!==h||m[7]!==N||m[8]!==_||m[9]!==g?(s=(0,n.jsx)(l.r,{alt:h,size:N,square:_,src:g}),m[6]=h,m[7]=N,m[8]=_,m[9]=g,m[10]=s):s=m[10],m[11]!==w||m[12]!==y||m[13]!==v||m[14]!==b||m[15]!==x?(d=(0,n.jsx)(c,{icon:b,iconColor:x,size:12,backgroundColor:y,backgroundClassName:w,backgroundSx:v}),m[11]=w,m[12]=y,m[13]=v,m[14]=b,m[15]=x,m[16]=d):d=m[16],m[17]!==j||m[18]!==t||m[19]!==r||m[20]!==s||m[21]!==d?(u=(0,n.jsxs)(a.az,{sx:t,className:j,...r,children:[s,d]}),m[17]=j,m[18]=t,m[19]=r,m[20]=s,m[21]=d,m[22]=u):u=m[22],u}c.displayName="StatusIcon",d.displayName="StatusAvatar"}}]);
//# sourceMappingURL=51046-db2cb3cece42d01d-c10572017951e976.js.map