performance.mark("js-parse-end:2914-5c0d648a6b6030d8.js"); "use strict";(globalThis.webpackChunk_github_ui_github_ui=globalThis.webpackChunk_github_ui_github_ui||[]).push([["2914"],{95545(e,l,i){i.d(l,{Mm:()=>w,YS:()=>j,ms:()=>f,Cf:()=>y,NE:()=>m,XF:()=>k,pu:()=>g,mN:()=>R});var d=i(74848),s=i(16522),a=i(96540),t=i(7624),o=i(65820),r=i(83223),n=i(55717),c=i(21373),C=i(61398),u=i(38621),h=i(49481);let _={verySatisfied:"UserFeedbackColors-module__verySatisfied__RsfC_",good:"UserFeedbackColors-module__good__ePf4d",satisfied:"UserFeedbackColors-module__satisfied__DQNfr",dissatisfied:"UserFeedbackColors-module__dissatisfied__byN7A",veryDissatisfied:"UserFeedbackColors-module__veryDissatisfied__AzgbS",bad:"UserFeedbackColors-module__bad__mgqXk"};var v=i(34164);function m(e){let l,i,m,g,f,j,w,k,y,R,Z,M,F,U,N,S,L=(0,s.c)(45),{title:A,requestID:I,options:T,returnFocusRef:B,placeholderText:D,onSubmit:H,onClose:X,ref:P}=e,q=void 0===A?"Give feedback":A,z=void 0===D?"Tell us what you liked or what could be better":D,[E,Q]=(0,a.useState)(null),[Y,G]=(0,a.useState)("");L[0]===Symbol.for("react.memo_cache_sentinel")?(l=[],L[0]=l):l=L[0];let[J,O]=(0,a.useState)(l),[V,$]=(0,a.useState)(0),[K,W]=(0,a.useState)(!1),[ee,el]=(0,a.useState)(!1);L[1]!==J.length?(i=()=>{J.length>0&&$(b)},L[1]=J.length,L[2]=i):i=L[2],L[3]!==J?(m=[J],L[3]=J,L[4]=m):m=L[4],(0,a.useEffect)(i,m),L[5]!==T?(g=()=>({openDialog:e=>{if(null!=e){if(!T.some(l=>l.value===e))throw Error("invalid initial option value");Q(e)}W(!0)}}),L[5]=T,L[6]=g):g=L[6],(0,a.useImperativeHandle)(P,g),L[7]===Symbol.for("react.memo_cache_sentinel")?(f=()=>{Q(null),G(""),O([])},L[7]=f):f=L[7];let ei=f;L[8]!==X?(j=e=>{ei(),W(!1),X?.(e)},L[8]=X,L[9]=j):j=L[9];let ed=j;L[10]!==ed||L[11]!==Y||L[12]!==H||L[13]!==E?(w=async e=>{let l;e.preventDefault();try{l=await H(E,Y)}catch{l=["An error occurred while submitting your feedback."]}O(l),0===l.length&&ed("submit")},L[10]=ed,L[11]=Y,L[12]=H,L[13]=E,L[14]=w):w=L[14];let es=w;L[15]!==ed?(k=()=>ed("dismiss"),L[15]=ed,L[16]=k):k=L[16];let ea=k;L[17]!==ed?(y=()=>ed("cancel"),L[17]=ed,L[18]=y):y=L[18];let et=y;L[19]===Symbol.for("react.memo_cache_sentinel")?(R=e=>{Q(e),O([])},L[19]=R):R=L[19];let eo=R;L[20]===Symbol.for("react.memo_cache_sentinel")?(Z=e=>{G(e.target.value),O([])},L[20]=Z):Z=L[20];let er=Z;L[21]!==I?(M=async()=>{if(I){try{await navigator.clipboard.writeText(`Request ID: ${I}`)}catch{O(x);return}el(!0),(0,h.i)("Copied!"),setTimeout(()=>{el(!1)},1e3)}},L[21]=I,L[22]=M):M=L[22];let en=M;L[23]!==V||L[24]!==J||L[25]!==Y||L[26]!==T||L[27]!==z||L[28]!==E?(F=()=>(0,d.jsxs)("div",{className:"UserFeedback-module__bodyContainer__INuI4",children:[(0,d.jsxs)(t.A,{required:!0,children:[(0,d.jsx)(t.A.Label,{visuallyHidden:!0,children:"Rating"}),(0,d.jsx)("div",{className:"UserFeedback-module__ratingContainer__X8Fkd",children:T.map(e=>(0,d.jsxs)("div",{className:"UserFeedback-module__ratingOption__JljEL",children:[(0,d.jsx)("button",{type:"button",role:"radio","aria-label":e.name,"aria-checked":E===e.value,onClick:()=>eo(e.value),className:(0,v.$)("UserFeedback-module__ratingButton__JLZYP",_[e.color]),children:e.icon}),(0,d.jsx)("span",{className:"UserFeedback-module__ratingCaption__V_nb7",children:e.name})]},e.name))})]}),(0,d.jsxs)("div",{className:"UserFeedback-module__messageContainer__i4AaL",children:[(0,d.jsxs)(t.A,{children:[(0,d.jsx)(t.A.Label,{children:"Message"}),(0,d.jsx)(o.Ay,{placeholder:z,value:Y,onChange:er,resize:"vertical",block:!0,rows:5}),(0,d.jsxs)(t.A.Caption,{className:"UserFeedback-module__privacyText__lX381",children:["Please don't include sensitive, confidential, or personal data. Your feedback helps us improve our services in line with our"," ",(0,d.jsx)(r.A,{href:"https://docs.github.com/en/site-policy/privacy-policies/github-general-privacy-statement",inline:!0,muted:!0,children:"Privacy Policy"}),"."]})]}),(0,d.jsx)("div",{className:"UserFeedback-module__validationError__iz5iC",role:"alert",children:J.map(p)},V)]})]}),L[23]=V,L[24]=J,L[25]=Y,L[26]=T,L[27]=z,L[28]=E,L[29]=F):F=L[29];let ec=F;L[30]!==ee||L[31]!==et||L[32]!==en||L[33]!==es||L[34]!==I?(U=()=>(0,d.jsxs)("div",{className:"UserFeedback-module__footerContainer__XqqiR",children:[(0,d.jsx)("div",{children:I&&(0,d.jsx)(n.m,{text:"Copy logs to add in feedback",direction:"n",children:(0,d.jsx)(c.Q,{leadingVisual:ee?(0,d.jsx)(u.CheckIcon,{className:"UserFeedback-module__copyLogsSuccessIcon__klZPr",size:16}):(0,d.jsx)(u.CopyIcon,{size:16}),onClick:en,variant:"default",children:ee?"Copied!":"Copy logs"})})}),(0,d.jsxs)("div",{className:"UserFeedback-module__footerActionButtonGroup__ugoOR",children:[(0,d.jsx)(c.Q,{onClick:et,children:"Cancel"}),(0,d.jsx)(c.Q,{variant:"primary",type:"submit",onClick:es,children:"Send"})]})]}),L[30]=ee,L[31]=et,L[32]=en,L[33]=es,L[34]=I,L[35]=U):U=L[35];let eC=U;return L[36]!==ea||L[37]!==K||L[38]!==ec||L[39]!==eC||L[40]!==B||L[41]!==q?(N=K&&(0,d.jsx)(C.l,{onClose:ea,title:q,renderBody:ec,renderFooter:eC,className:"UserFeedback-module__Dialog__cX5g9",returnFocusRef:B}),L[36]=ea,L[37]=K,L[38]=ec,L[39]=eC,L[40]=B,L[41]=q,L[42]=N):N=L[42],L[43]!==N?(S=(0,d.jsx)(d.Fragment,{children:N}),L[43]=N,L[44]=S):S=L[44],S}function p(e){return(0,d.jsx)("div",{children:e},e)}function x(e){return[...e,"Failed to copy logs."]}function b(e){return e+1}m.displayName="UserFeedback";let g=(0,d.jsx)(u.ThumbsdownIcon,{className:"UserFeedback-module__thumbsDownIcon__buZXs"}),f=(0,d.jsx)(u.ThumbsupIcon,{className:"UserFeedback-module__thumbsUpIcon__rXv74"}),j=(0,d.jsxs)("svg",{width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[(0,d.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 14.5C11.5899 14.5 14.5 11.5899 14.5 8C14.5 4.41015 11.5899 1.5 8 1.5C4.41015 1.5 1.5 4.41015 1.5 8C1.5 11.5899 4.41015 14.5 8 14.5ZM8 16C12.4183 16 16 12.4183 16 8C16 3.58172 12.4183 0 8 0C3.58172 0 0 3.58172 0 8C0 12.4183 3.58172 16 8 16Z"}),(0,d.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.65646 10.7C6.15313 9.85483 7.09616 9.3 8 9.3C8.47794 9.3 9.0345 9.50535 9.54632 9.9146C9.83116 10.1424 10.0753 10.4124 10.2645 10.7H5.65646ZM11.8447 11.016C11.3379 9.39273 9.66897 8 8 8C6.30092 8 4.60185 9.23723 4.12902 11.011C3.98676 11.5446 4.44771 12 5 12H11C11.5523 12 12.0093 11.5432 11.8447 11.016Z"}),(0,d.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.89649 4.7586C4.02981 4.42529 4.40809 4.26317 4.7414 4.39649L7.00928 5.30364C7.63789 5.55509 7.6379 6.44491 7.00928 6.69636L4.7414 7.60351C4.40809 7.73683 4.02981 7.57471 3.89649 7.2414C3.76317 6.90809 3.92529 6.52981 4.2586 6.39649L5.24982 6L4.2586 5.60351C3.92529 5.47019 3.76317 5.09191 3.89649 4.7586Z"}),(0,d.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.1035 4.7586C11.9702 4.42529 11.5919 4.26317 11.2586 4.39649L8.99072 5.30364C8.36211 5.55509 8.3621 6.44491 8.99072 6.69636L11.2586 7.60351C11.5919 7.73683 11.9702 7.57471 12.1035 7.2414C12.2368 6.90809 12.0747 6.52981 11.7414 6.39649L10.7502 6L11.7414 5.60351C12.0747 5.47019 12.2368 5.09191 12.1035 4.7586Z"})]}),w=(0,d.jsxs)("svg",{width:"16",height:"16","aria-hidden":"true",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[(0,d.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 14.5C11.5899 14.5 14.5 11.5899 14.5 8C14.5 4.41015 11.5899 1.5 8 1.5C4.41015 1.5 1.5 4.41015 1.5 8C1.5 11.5899 4.41015 14.5 8 14.5ZM8 16C12.4183 16 16 12.4183 16 8C16 3.58172 12.4183 0 8 0C3.58172 0 0 3.58172 0 8C0 12.4183 3.58172 16 8 16Z"}),(0,d.jsx)("path",{d:"M6.5 6.5C6.5 7.05228 6.05228 7.5 5.5 7.5C4.94772 7.5 4.5 7.05228 4.5 6.5C4.5 5.94772 4.94772 5.5 5.5 5.5C6.05228 5.5 6.5 5.94772 6.5 6.5Z"}),(0,d.jsx)("path",{d:"M11.5 6.5C11.5 7.05228 11.0523 7.5 10.5 7.5C9.94772 7.5 9.5 7.05228 9.5 6.5C9.5 5.94772 9.94772 5.5 10.5 5.5C11.0523 5.5 11.5 5.94772 11.5 6.5Z"}),(0,d.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.3416 11.8591C9.33064 10.0058 6.66936 10.0058 5.65842 11.8591C5.46007 12.2228 5.0045 12.3568 4.64086 12.1584C4.27722 11.9601 4.14323 11.5045 4.34158 11.1409C5.92104 8.24518 10.079 8.24518 11.6584 11.1409C11.8568 11.5045 11.7228 11.9601 11.3591 12.1584C10.9955 12.3568 10.5399 12.2228 10.3416 11.8591Z"})]}),k=(0,d.jsxs)("svg",{width:"16","aria-hidden":"true",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[(0,d.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 14.5C11.5899 14.5 14.5 11.5899 14.5 8C14.5 4.41015 11.5899 1.5 8 1.5C4.41015 1.5 1.5 4.41015 1.5 8C1.5 11.5899 4.41015 14.5 8 14.5ZM8 16C12.4183 16 16 12.4183 16 8C16 3.58172 12.4183 0 8 0C3.58172 0 0 3.58172 0 8C0 12.4183 3.58172 16 8 16Z"}),(0,d.jsx)("path",{d:"M6.5 6.5C6.5 7.05228 6.05228 7.5 5.5 7.5C4.94772 7.5 4.5 7.05228 4.5 6.5C4.5 5.94772 4.94772 5.5 5.5 5.5C6.05228 5.5 6.5 5.94772 6.5 6.5Z"}),(0,d.jsx)("path",{d:"M11.5 6.5C11.5 7.05228 11.0523 7.5 10.5 7.5C9.94772 7.5 9.5 7.05228 9.5 6.5C9.5 5.94772 9.94772 5.5 10.5 5.5C11.0523 5.5 11.5 5.94772 11.5 6.5Z"}),(0,d.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5 11C5 10.5858 5.33579 10.25 5.75 10.25H10.25C10.6642 10.25 11 10.5858 11 11C11 11.4142 10.6642 11.75 10.25 11.75H5.75C5.33579 11.75 5 11.4142 5 11Z"})]}),y=(0,d.jsxs)("svg",{width:"16","aria-hidden":"true",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[(0,d.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 14.5C11.5899 14.5 14.5 11.5899 14.5 8C14.5 4.41015 11.5899 1.5 8 1.5C4.41015 1.5 1.5 4.41015 1.5 8C1.5 11.5899 4.41015 14.5 8 14.5ZM8 16C12.4183 16 16 12.4183 16 8C16 3.58172 12.4183 0 8 0C3.58172 0 0 3.58172 0 8C0 12.4183 3.58172 16 8 16Z"}),(0,d.jsx)("path",{d:"M6.5 6.5C6.5 7.05228 6.05228 7.5 5.5 7.5C4.94772 7.5 4.5 7.05228 4.5 6.5C4.5 5.94772 4.94772 5.5 5.5 5.5C6.05228 5.5 6.5 5.94772 6.5 6.5Z"}),(0,d.jsx)("path",{d:"M11.5 6.5C11.5 7.05228 11.0523 7.5 10.5 7.5C9.94772 7.5 9.5 7.05228 9.5 6.5C9.5 5.94772 9.94772 5.5 10.5 5.5C11.0523 5.5 11.5 5.94772 11.5 6.5Z"}),(0,d.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.3569 9.61413C9.28933 11.3934 6.71067 11.3934 5.64312 9.61413C5.43001 9.25894 4.96931 9.14377 4.61413 9.35688C4.25894 9.56999 4.14377 10.0307 4.35688 10.3859C6.00704 13.1361 9.99296 13.1361 11.6431 10.3859C11.8562 10.0307 11.7411 9.56999 11.3859 9.35688C11.0307 9.14377 10.57 9.25894 10.3569 9.61413Z"})]}),R=(0,d.jsxs)("svg",{width:"16","aria-hidden":"true",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[(0,d.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.65646 10.3C6.15313 11.1452 7.09616 11.7 8 11.7C8.47794 11.7 9.0345 11.4947 9.54632 11.0854C9.83116 10.8576 10.0753 10.5876 10.2645 10.3H5.65646ZM11.8447 9.98403C11.3379 11.6073 9.66897 13 8 13C6.30092 13 4.60185 11.7628 4.12902 9.98904C3.98676 9.45539 4.44771 9 5 9H11C11.5523 9 12.0093 9.45684 11.8447 9.98403Z"}),(0,d.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 14.5C11.5899 14.5 14.5 11.5899 14.5 8C14.5 4.41015 11.5899 1.5 8 1.5C4.41015 1.5 1.5 4.41015 1.5 8C1.5 11.5899 4.41015 14.5 8 14.5ZM8 16C12.4183 16 16 12.4183 16 8C16 3.58172 12.4183 0 8 0C3.58172 0 0 3.58172 0 8C0 12.4183 3.58172 16 8 16Z"}),(0,d.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.3292 6.83541C10.9875 6.15213 10.0125 6.15213 9.67082 6.83541C9.48558 7.20589 9.03507 7.35606 8.66459 7.17082C8.29411 6.98558 8.14394 6.53507 8.32918 6.16459C9.22361 4.37574 11.7764 4.37574 12.6708 6.16459C12.8561 6.53507 12.7059 6.98558 12.3354 7.17082C11.9649 7.35606 11.5144 7.20589 11.3292 6.83541Z"}),(0,d.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.32918 6.83541C5.98754 6.15213 5.01246 6.15213 4.67082 6.83541C4.48558 7.20589 4.03507 7.35606 3.66459 7.17082C3.29411 6.98558 3.14394 6.53507 3.32918 6.16459C4.22361 4.37574 6.77639 4.37574 7.67082 6.16459C7.85606 6.53507 7.70589 6.98558 7.33541 7.17082C6.96493 7.35606 6.51442 7.20589 6.32918 6.83541Z"})]})}}]); //# sourceMappingURL=2914-5c0d648a6b6030d8-26d016356ce4de4c.js.map