performance.mark("js-parse-end:3126-a7413860eabb11d9.js"); "use strict";(globalThis.webpackChunk_github_ui_github_ui=globalThis.webpackChunk_github_ui_github_ui||[]).push([["3126"],{87253(e,r,t){t.d(r,{_S:()=>n,cB:()=>a,cW:()=>i});var s=t(56341),l=t(26316);let n=()=>{let e=(0,s.JV)().appId;return e&&"rails"!==e?e:crypto.randomUUID()},i=e=>{(0,s.C3)({appId:e})},a=()=>{let e=document.querySelector("react-app")||document.querySelector("projects-v2");return e?.uuid||"rails"};l.cg?.addEventListener("hashchange",()=>{(0,s.C3)({appId:a()})},!0)},19519(e,r,t){t.d(r,{V:()=>c});var s=t(96540);let l={type:"browser",isBrowser:!0,isServer:!1},n={type:"server",isBrowser:!1,isServer:!0};function i(){return()=>{}}function a(){return l}function o(){return n}function c(){return(0,s.useSyncExternalStore)(i,a,o)}},16743(e,r,t){t.d(r,{T:()=>S});var s=t(74848),l=t(16522),n=t(206),i=t(38621),a=t(67323),o=t(38750),c=t(46251),u=t(7478),d=t(59134),h=t(18990),m=t(96540),g=t(1238);let p=m.memo(function(e){let r,t,i,a,o,c=(0,l.c)(19),{user:u,isCurrent:d,onSelect:m,shouldSetAsDiv:g,count:p,position:x}=e,j=g?"div":"li";c[0]!==m||c[1]!==u?(r=()=>{m&&m(u)},c[0]=m,c[1]=u,c[2]=r):r=c[2];let _=x+1,f=u.primaryAvatarUrl;return c[3]!==u.path?(t=u.path.startsWith("/apps/"),c[3]=u.path,c[4]=t):t=c[4],c[5]!==t||c[6]!==u.primaryAvatarUrl?(i=(0,s.jsx)(h.l.LeadingVisual,{children:(0,s.jsx)(n.r,{src:f,square:t})}),c[5]=t,c[6]=u.primaryAvatarUrl,c[7]=i):i=c[7],c[8]!==u.name?(a=(0,s.jsx)(h.l.Description,{truncate:!0,children:u.name}),c[8]=u.name,c[9]=a):a=c[9],c[10]!==p||c[11]!==d||c[12]!==j||c[13]!==r||c[14]!==_||c[15]!==i||c[16]!==a||c[17]!==u.login?(o=(0,s.jsxs)(h.l.Item,{as:j,selected:d,onSelect:r,"aria-setsize":p,"aria-posinset":_,children:[i,u.login,a]}),c[10]=p,c[11]=d,c[12]=j,c[13]=r,c[14]=_,c[15]=i,c[16]=a,c[17]=u.login,c[18]=o):o=c[18],o});p.displayName="UserItem";let x="UsersList-module__scrollableUserList__MXL4H";function j(e){let r,t=(0,l.c)(2);return t[0]!==e?(r=e.users.length>20?(0,s.jsx)(f,{...e}):(0,s.jsx)(_,{...e}),t[0]=e,t[1]=r):r=t[1],r}function _(e){let r,t,n=(0,l.c)(12),{users:i,currentUser:a,onSelect:o,style:c,className:u}=e,d=u?`${x} ${u}`:x;if(n[0]!==a?.login||n[1]!==o||n[2]!==i){let e;n[4]!==a?.login||n[5]!==o||n[6]!==i.length?(e=(e,r)=>(0,s.jsx)(p,{user:e,isCurrent:e.login===a?.login,onSelect:o,count:i.length,position:r},e.login),n[4]=a?.login,n[5]=o,n[6]=i.length,n[7]=e):e=n[7],r=i.map(e),n[0]=a?.login,n[1]=o,n[2]=i,n[3]=r}else r=n[3];return n[8]!==d||n[9]!==c||n[10]!==r?(t=(0,s.jsx)(h.l,{role:"menu",style:c,className:d,selectionVariant:"single",children:r}),n[8]=d,n[9]=c,n[10]=r,n[11]=t):t=n[11],t}function f(e){let r,t,n=(0,l.c)(9),{users:i,currentUser:a,onSelect:o,style:c,className:u}=e,d=u?`${x} ${u}`:x;return n[0]!==a?.login||n[1]!==o||n[2]!==i.length?(r=(e,r)=>(0,s.jsx)(p,{user:e,isCurrent:e.login===a?.login,onSelect:o,shouldSetAsDiv:!0,count:i.length,position:r},e.login),n[0]=a?.login,n[1]=o,n[2]=i.length,n[3]=r):r=n[3],n[4]!==d||n[5]!==c||n[6]!==r||n[7]!==i?(t=(0,s.jsx)(g.F,{items:i,itemHeight:33,style:c,makeKey:y,shouldUseActionList:!0,renderItem:r,className:d}),n[4]=d,n[5]=c,n[6]=r,n[7]=i,n[8]=t):t=n[8],t}function y(e){return e.login}j.displayName="UsersList",_.displayName="FullUsersList",f.displayName="VirtualUsersList";var v=t(49481);function S(e){var r,t;let o,c,u,d,h,g,p,x,_,f,y,S,C,I,A,F=(0,l.c)(52),{defaultText:T,usersState:W,currentUser:k,onSelect:z,hotKey:B,onOpenChange:V,renderCustomFooter:q,size:D,showTypedInUser:E,width:$,label:O}=e,H=void 0!==E&&E,R=void 0===$?"large":$,G=void 0===O?"":O,[J,K]=(0,m.useState)("");F[0]!==J||F[1]!==H||F[2]!==W.users?(o=function(e,r){if(!e)return[];let t=r.trim().toLowerCase();return t?e.filter(e=>e.login.toLowerCase().includes(t)||e.name?.toLowerCase().includes(t)):e}(W.users,J),c=H&&(r=J,t=o,!!r&&(0===t.length||t.length>1||1===t.length&&!!t[0]&&t[0].login.toLowerCase()!==r.toLowerCase())),F[0]=J,F[1]=H,F[2]=W.users,F[3]=o,F[4]=c):(o=F[3],c=F[4]);let M=c,P=0===o.length&&!M,X=!W.loading&&!W.error&&P;return F[5]!==X?(u=()=>{X&&(0,v.i)("Nothing to show")},F[5]=X,F[6]=u):u=F[6],F[7]!==X||F[8]!==J?(d=[X,J],F[7]=X,F[8]=J,F[9]=d):d=F[9],(0,m.useEffect)(u,d),F[10]!==X||F[11]!==V?(h=e=>{V&&V(e),X&&(0,v.i)("Nothing to show")},F[10]=X,F[11]=V,F[12]=h):h=F[12],F[13]!==k?(g=(0,s.jsx)("div",{className:"mr-2",children:k?(0,s.jsx)(n.r,{size:16,src:k.primaryAvatarUrl,square:k.path.startsWith("/apps/")}):(0,s.jsx)(i.PeopleIcon,{size:"small",className:"fgColor-muted"})}),F[13]=k,F[14]=g):g=F[14],F[15]!==k||F[16]!==T||F[17]!==G?(p=(0,s.jsx)("div",{className:"UserSelector-module__truncatedUserText__EmYes",children:k?(0,s.jsxs)("span",{children:[G,k.login]}):(0,s.jsx)("span",{children:T})}),F[15]=k,F[16]=T,F[17]=G,F[18]=p):p=F[18],F[19]!==g||F[20]!==p?(x=(0,s.jsxs)("div",{className:"d-flex",children:[g,p]}),F[19]=g,F[20]=p,F[21]=x):x=F[21],F[22]!==B||F[23]!==D||F[24]!==x?(_=(0,s.jsx)(a.W.Button,{"data-hotkey":B,size:D,"data-testid":"user-selector-button",children:x}),F[22]=B,F[23]=D,F[24]=x,F[25]=_):_=F[25],F[26]!==J?(f=(0,s.jsx)(U,{defaultText:J,onFilterChange:K}),F[26]=J,F[27]=f):f=F[27],F[28]!==J||F[29]!==z||F[30]!==M||F[31]!==P||F[32]!==W.error||F[33]!==W.loading?(y=W.loading?(0,s.jsx)(N,{}):W.error?(0,s.jsx)(b,{}):(0,s.jsxs)(s.Fragment,{children:[P&&(0,s.jsx)(L,{}),M&&(0,s.jsx)(w,{filterText:J,onSelect:z})]}),F[28]=J,F[29]=z,F[30]=M,F[31]=P,F[32]=W.error,F[33]=W.loading,F[34]=y):y=F[34],F[35]!==k||F[36]!==o||F[37]!==z||F[38]!==q?(S=o.length>0&&(0,s.jsx)(j,{users:o,currentUser:k,onSelect:z,className:q?"UserSelector-module__userListWithFooter__Gmfdb":"UserSelector-module__userListDefault__DjjOT"}),F[35]=k,F[36]=o,F[37]=z,F[38]=q,F[39]=S):S=F[39],F[40]!==q?(C=q?.(),F[40]=q,F[41]=C):C=F[41],F[42]!==f||F[43]!==y||F[44]!==S||F[45]!==C||F[46]!==R?(I=(0,s.jsxs)(a.W.Overlay,{width:R,children:[f,y,S,C]}),F[42]=f,F[43]=y,F[44]=S,F[45]=C,F[46]=R,F[47]=I):I=F[47],F[48]!==_||F[49]!==I||F[50]!==h?(A=(0,s.jsx)("div",{children:(0,s.jsxs)(a.W,{onOpenChange:h,children:[_,I]})}),F[48]=_,F[49]=I,F[50]=h,F[51]=A):A=F[51],A}function U(e){let r,t,n=(0,l.c)(5),{onFilterChange:a,defaultText:c}=e;return n[0]!==a?(r=e=>a(e.target.value),n[0]=a,n[1]=r):r=n[1],n[2]!==c||n[3]!==r?(t=(0,s.jsx)("div",{className:"p-2 border-bottom border-color-border-default",children:(0,s.jsx)(o.A,{leadingVisual:i.SearchIcon,value:c,placeholder:"Find a user...",onChange:r,className:"UserSelector-module__userSearchInput__pqcv4"})}),n[2]=c,n[3]=r,n[4]=t):t=n[4],t}function N(){let e,r=(0,l.c)(1);return r[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,s.jsx)(c.B,{justify:"center",className:"p-2",children:(0,s.jsx)(u.A,{size:"medium",srText:"Loading users..."})}),r[0]=e):e=r[0],e}function b(){let e,r=(0,l.c)(1);return r[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,s.jsx)(d.A,{variant:"danger",children:"Could not load users"}),r[0]=e):e=r[0],e}function L(){let e,r=(0,l.c)(1);return r[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,s.jsx)(c.B,{justify:"center",className:"tmp-p-3",children:"Nothing to show"}),r[0]=e):e=r[0],e}function w(e){let r,t,n,i=(0,l.c)(8),{filterText:a,onSelect:o}=e;return i[0]!==a||i[1]!==o?(r=()=>{o&&o({login:a,name:a,path:"",primaryAvatarUrl:""})},i[0]=a,i[1]=o,i[2]=r):r=i[2],i[3]!==a?(t=(0,s.jsxs)(s.Fragment,{children:["Filter on author\xa0",(0,s.jsx)("span",{className:"text-bold",children:a})]}),i[3]=a,i[4]=t):t=i[4],i[5]!==r||i[6]!==t?(n=(0,s.jsx)(h.l.Item,{role:"none",onSelect:r,className:"UserSelector-module__filterResultItem__m3uRz",children:t}),i[5]=r,i[6]=t,i[7]=n):n=i[7],n}S.displayName="UserSelector",U.displayName="UserFilter",N.displayName="Loading",b.displayName="LoadingFailed",L.displayName="UsersZeroState",w.displayName="UsersTypedInUser"}}]); //# sourceMappingURL=3126-a7413860eabb11d9-d34526ab325b36e1.js.map