PageSourceSearch

https://schoolhouse.world/_next/static/chunks/pages/admin/peer-review-e0b6a249adcd3f71.js

js schoolhouse.world collected 2026-10-01 10:42:28 UTC 19,909 bytes, 27 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1553],{45755:(e,t,r)=>{"use strict";function n(e){return e.toLowerCase().replace(/[^a-z0-9|-]/g,"")}function i(e,t){let r=t[e];return null==r||""===r?null:`${r}`}r.d(t,{T:()=>i,Z:()=>n})},57962:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(18153),i=r(46304),l=r(81727);let a={"Peer Reviewers":(0,i.hTK)("peer-review"),Inbox:(0,i.hTK)("peer-review/inbox"),"Peer Reviews":(0,i.hTK)("peer-review/reviews"),Notes:(0,i.hTK)("peer-review/notes")};function o({currentTab:e}){return(0,n.Y)(l.A,{mb:"42px",currentTab:e,tabToUrl:e=>a[e],tabs:["Peer Reviewers","Inbox","Peer Reviews","Notes"]})}},61110:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(16425);function i(e,t){return null!=t.userRoles&&t.userRoles.forEach(e=>{if(!e.startsWith("admin:"))throw Error("Cannot expose admin page to non-admins!")}),(0,n.A)(e,{authScopes:t.authScopes,userRoles:t.userRoles,onboardingUsers:"disallowed"})}},69732:(e,t,r)=>{"use strict";r.r(t),r.d(t,{__N_SSP:()=>eA,default:()=>em});var n=r(18153),i=r(42720),l=r(82736),a=r(76032),o=r(81345),s=r(73123),d=r(55720),u=r(54443),c=r(75292),h=r(78919),p=r(61110),v=r(1533),A=r(77489),m=r(57962),w=r(39955),f=r(91921),y=r(85696),b=r(82285),g=r(59803),Y=r(38890),T=r(99407),I=r(63973),k=r(2665),x=r(55791),R=r(83734),N=r(43043),L=r(64435),$=r(44517),_=r(28898),S=r(4173),F=r(89099),C=r(14232),D=r(19515),E=r(81188),U=r(80484),P=r(9496),X=r(7574),q=r(57286),j=r(46304),O=r(32587),z=r(45895),B=r(71908),J=r(92231),M=r(46860),V=r(81727),K=r(41130),W=r(46862),Z=r(67791),H=r(22239),G=r(82899),Q=r(65956),ee=r(90799),et=r(8113),er=r(75662);let en="show";function ei({name:e,coachName:t}){return[{type:"paragraph",children:[{text:`Hey there, ${e}!
2`}]},{type:"paragraph",children:[{text:`I'm ${t}, and I'm reaching out as a tutor coach here at Schoolhouse! As part of my role, I provide support to peer reviewers on how to make feedback as helpful as possible for tutors, and so I wanted to reach out as part of a routine review of your recent peer reviews. Here's some feedback I have:
3`}]}]}let el={text:`
4Based on this feedback, it looks like you're peer reviewing at the `},ea={text:"Please message me if you have any questions or want additional feedback."},eo={[v.JL.Flagged]:({aiFeedback:e,name:t,coachName:r})=>({serialization_method:"slate_json_v1",content:[...ei({name:t,coachName:r}),...e,{type:"paragraph",children:[el,{type:"link",url:(0,O.E)("what-makes-a-great-peer-review"),children:[{text:"novice level"}]},{text:". This is a great start! A coach will follow up after your next three peer reviews to evaluate your level again. "},ea]}]}),[v.JL.Novice]:({aiFeedback:e,name:t,coachName:r})=>({serialization_method:"slate_json_v1",content:[...ei({name:t,coachName:r}),...e,{type:"paragraph",children:[el,{type:"link",url:(0,O.E)("what-makes-a-great-peer-review"),children:[{text:"novice level"}]},{text:". This is a great start! A coach will follow up after your next three peer reviews to evaluate your level again. "},ea]}]}),[v.JL.Beginner]:({aiFeedback:e,name:t,coachName:r})=>({serialization_method:"slate_json_v1",content:[...ei({name:t,coachName:r}),...e,{type:"paragraph",children:[el,{type:"link",url:(0,O.E)("what-makes-a-great-peer-review"),children:[{text:"beginner level"}]},{text:". This is a great start! A coach will follow up after your next three peer reviews to evaluate your level again. "},ea]}]}),[v.JL.Intermediate]:({aiFeedback:e,name:t,coachName:r})=>({serialization_method:"slate_json_v1",content:[...ei({name:t,coachName:r}),...e,{type:"paragraph",children:[{text:`
5Based on this feedback, it looks like you're peer reviewing at the `},{type:"link",url:(0,O.E)("what-makes-a-great-peer-review"),children:[{text:"intermediate level"}]},{text:". Amazing work! As an intermediate level reviewer, you can continue peer reviewing as often as you would like without having to wait for additional coach evaluations. "},ea]}]}),[v.JL.Advanced]:({aiFeedback:e,name:t,coachName:r})=>({serialization_method:"slate_json_v1",content:[...ei({name:t,coachName:r}),...e,{type:"paragraph",children:[el,{type:"link",url:(0,O.E)("what-makes-a-great-peer-review"),children:[{text:"advanced level"}]},{text:". Please keep up the outstanding work! "},ea]}]})};function es({aiAuditorLevel:e,expandedUser:t,handleSetFeedback:r}){let i=(0,c.Jd)(),[l,a]=(0,C.useState)(""),[o,s]=(0,C.useState)(!1),d=(0,C.useCallback)(async()=>
5{if(null!=t){s(!0);try{let n=await P.Vf.admin_createPeerReviewerAiInvestigation({subjectUserId:t.id,instructions:l});if("slate_json_v1"===n.serialization_method){let l=eo[e]({aiFeedback:n.content,name:t.name,coachName:i.firstName});r(l)}}finally{s(!1)}}},[e,i.firstName,t,r,l]);return(0,n.FD)(w.a,{bg:"bg.info",borderRadius:"8px",p:"24px",children:[(0,n.FD)(f.E,{fontWeight:"bold",mb:"8px",children:["An AI can create a first draft of feedback for this reviewer"," ",(0,n.FD)(y.B.span,{color:"secondary.fg",fontWeight:"bold",children:["letting them know they are at the ",e," level"]}),". Are there any specific pieces of feedback you would you like the AI to incorporate?"]}),(0,n.Y)(b.T,{value:l,onChange:e=>a(e.target.value),mb:"8px",placeholder:"Friendly tone, but needs more specific examples"}),(0,n.Y)(g.s,{justify:"flex-end",children:(0,n.Y)(Y.$,{width:"220px",onClick:d,variant:"outline",isLoading:o,children:o?"Loading...":"Auto-Generate Feedback"})})]})}function ed({users:e}){let[t,r]=(0,C.useState)(X.Z),i=(0,C.useRef)(null),p=(0,C.useRef)(null),[m,f]=(0,C.useState)("Review"),[y,b]=(0,C.useState)(!1),O=(0,c.Jd)(),ei=(0,K._)(),el=(0,F.useRouter)(),ea=(0,u.I)(),eo=(0,B.h)(),eu=Number.parseInt(el.query[en],10)||null,ec=null==eu?null:ea.one(d.Ay.where({id:eu,include:[{association:"TutorProfile",required:!0}]})),eh=(0,C.useMemo)(()=>null==eu?null:{id:ec?.(d.Ay.id)??0,name:ec?.(d.Ay.first_name)??"",tutorAuditorLevel:ec?.(s.A.auditor_level)??v.JL.Novice},[eu,ec]),[ep,ev]=(0,C.useState)(eh?.tutorAuditorLevel??v.JL.Novice),eA=null!=eu&&(eu!==O.id||(0,A.OK)(O,"admin:super"))?ea.many(U.A.where({subjectUserId:eu,include:[{association:"User",required:!0}],order:[[U.A.created_at,"desc"]]})):null,em=o.A.where({auditorId:eu??0,includeAuditor:!0,includeSession:!0}),ew=null==eu?null:ea.many((0,h.Xs)`${em} ORDER BY ${o.A.created_at} DESC LIMIT ${z.T0} OFFSET ${eo}`),ef=null==eu?0:ea`COUNT(*) ${em}`??0,ey=(0,C.useCallback)(e=>{r(e),null!=p.current&&(p.current.values.feedback=e)},[r]),eb=C.useCallback(()=>{ey(X.Z),f("Review"),el.replace({query:(0,_.A)(el.query,en)}).catch(e=>{E.A.error("Navigation failed",{err:e})})},[el,ey]),eg=C.useCallback(({userId:e,tutorAuditorLevel:t})=>{ev(t),el.replace({query:{...el.query,[en]:e}}).catch(e=>{E.A.error("Navigation failed",{err:e})})},[el]),eY=C.useMemo(()=>[{label:"Please choose a new level.",type:"select",options:v.Fu.map(e=>({value:`${e}`,label:`${(0,S.A)(e)}`})),initialValue:eh?.tutorAuditorLevel,onChange:e=>ev(e),name:"auditorLevel",required:!0,size:6},{label:"Add Internal Notes (not shared with tutor)",sublabel:"Please use this to track any notes that you don't want to include in your feedback.",type:"textarea",name:"note",required:!1,size:6}],[eh]),eT=C.useMemo(()=>[{label:"Add Feedback",sublabel:"This note will be sent directly to the tutor (and will also be saved as an internal note).",type:"rich-text",name:"feedback",initialValue:t,size:6}],[t]),eI=(0,C.useCallback)(async()=>{if(null==i.current||null==p.current||null==eh)return;let{success:e}=await (0,H.B$)([i.current,p.current]);if(!e)return;b(!0);let t=i.current.values.note;await P.Vf.admin_addAuditorNote({subjectUserId:eh.id,note:null==t?null:`${t}`,auditorLevel:i.current.values.auditorLevel});let n=null==p.current.values.feedback?null:p.current.values.feedback;null!=n&&(0,q.A)(n).length>=100&&(await P.Vf.admin_createUserAdminMessage({recipientUserId:eh.id,acknowledgmentText:null,content:n,safetyReportId:null}),await P.Vf.admin_addAuditorNote({subjectUserId:eh.id,note:`Sent feedback:
6
7${(0,q.A)(n)}`,auditorLevel:null}),r(X.Z),p.current.values.feedback=X.Z),b(!1),eb(),ei({title:"Successfully reviewed tutor!",status:"success"})},[ei,eh,eb]),ek=(0,C.useCallback)(async e=>{if(null==eh)return;let t=e.feedback;await P.Vf.admin_createUserAdminMessage({recipientUserId:eh.id,acknowledgmentText:null,content:t,safetyReportId:null}),await P.Vf.admin_addAuditorNote({subjectUserId:eh.id,note:`Sent feedback:
8
9${(0,q.A)(t)}`,auditorLevel:null}),r(X.Z),null!=p.current&&(p.current.values.feedback=X.Z)},[eh]),ex=(0,C.useMemo)(()=>(0,n.Y)(et.A,{includeSessionInfo:!0,showAdminActions:!0,audits:ew??[]}),[ew]),eR=(0,C.useMemo)(()=>(0,n.Y)(er.A,{auditorNotes:eA??[]}),[eA]),eN=(0,C.useMemo)(()=>(0,n.FD)(a.B,{direction:"column",spacing:"24px",children:[(0,n.Y)(W.A,{ref:i,name:"ChangeLevel",blocks:eY,onSubmit:D.fZ,FooterComponent:Z.A}),(0,n.Y)(es,{aiAuditorLevel:ep,expandedUser:eh,handleSetFeedback:ey}),(0,n.Y)(W.A,{name:"SendFeedback",ref:p,blocks:eT,onSubmit:ek,FooterComponent:Z.A},JSON.stringify(t).slice(0,1e3)),(0,n.Y)(Y.$,{onClick:eI,width:"100%",isLoading:y,children:y?"Submitting...":"Submit Review"})]}),[ep,t,eI,ek,eY,eT,y,eh,ey]);return(0,n.FD)(n.FK,{children:[(0,n.Y)(Q.A,{size:"full",open:null!=eu,onClose:eb,title:()=>null==eh?null:(0,n.Y)(g.s,{justify:"center",children:(0,n.FD)(a.B,{direction:"row",align:"center",spacing:"12px",width:"1200px",maxWidth:"100%",children:[(0,n.FD)(l.D,{size:"xl",children:["Review ",eh.name]}),(0,n.Y)(J.A,{tutorAuditorLevel:eh.tutorAuditorLevel})]})}),body:()=>(0,n.FD)(w.a,{position:"relative",height:"calc(100vh - 130px)",overflowY:"scroll",children:[(0,n.Y)(g.s,{justify:"center",position:"sticky",top:"0",bg:"bg",zIndex:1,children:(0,n.Y)(w.a,{overflowX:"scroll",mb:"24px",width:"1200px",maxWidth:"100%",children:(0,n.Y)(V.A,{currentTab:m,onTabChange:f,tabs:["Review","Notes","Peer Reviews"]})})}),(0,n.Y)(g.s,{justify:"center",children:(0,n.FD)(w.a,{width:"1200px",px:"4px",children:[(0,n.Y)(w.a,{display:"Review"===m?"block":"none",children:eN}),(0,n.Y)(w.a,{display:"Notes"===m?"block":"none",children:eR}),(0,n.FD)(w.a,{display:"Peer Reviews"===m?"block":"none",overflowX:"scroll",children:[ex,(0,n.Y)(B.A,{scheme:"url",totalItemsCount:ef})]})]})})]})}),(0,n.FD)(T.X,{variant:"striped",children:[(0,n.Y)(I.d,{children:(0,n.FD)(k.Tr,{children:[(0,n.Y)(x.Th,{children:"Tutor name"}),(0,n.Y)(x.Th,{width:"200px",children:"Overdue Date"}),(0,n.Y)(x.Th,{children:"Total Audits"}),(0,n.Y)(x.Th,{children:"Last month"}),(0,n.Y)(x.Th,{children:"Last week"}),(0,n.Y)(x.Th,{children:"Notes"}),(0,n.Y)(x.Th,{children:"Actions"})]})}),0===e.length?(0,n.Y)(R.r,{children:"No reports to display."}):null,(0,n.Y)(N.N,{children:e.map(e=>{let t=e(d.Ay.id)??0,r=e(d.Ay.display_name)??"",i=e(d.Ay.countTotalAudits())??0,l=e(d.Ay.countWeekAudits())??0,o=e(d.Ay.countMonthAudits())??0,u=e((0,h.Xs)`COUNT(*) ${U.A.where({subjectUserId:d.Ay.id})}
9`)??0,c=e(s.A.getFirstAuditThatNeedsReviewDate()),p=e.one(d.Ay.getTutorProfile())(s.A.auditor_level)??v.JL.Novice;return(0,n.FD)(k.Tr,{children:[(0,n.Y)(L.Td,{minWidth:"150px",children:(0,n.FD)(a.B,{direction:"column",spacing:2,children:[(0,n.Y)(M.A,{href:(0,j.FG)(t),children:r}),(0,n.Y)(w.a,{children:(0,n.Y)(J.A,{tutorAuditorLevel:p})})]})}),(0,n.Y)(L.Td,{children:null==c?null:(0,n.Y)(w.a,{color:"fg.error",children:(0,n.Y)(ee.A,{time:c})})}),(0,n.Y)(L.Td,{children:i}),(0,n.Y)(L.Td,{children:o}),(0,n.Y)(L.Td,{children:l}),(0,n.Y)(L.Td,{children:u}),(0,n.Y)(L.Td,{children:(0,n.Y)(a.B,{direction:"column",spacing:2,children:(0,n.Y)(Y.$,{onClick:()=>{eg({userId:t,tutorAuditorLevel:p})},variant:"outline",leftIcon:(0,n.Y)(G.A,{color:"fg.subtle",faIcon:$.$UM,size:"md"}),children:"Review Tutor"})})})]},t)})})]})]})}var eu=r(49783),ec=r(91760),eh=r(99468),ep=r(76258);let ev=(0,p.A)(function(){let e=(0,u.I)(),t=(0,B.h)(50),r=(0,c.Jd)(),p={Overdue:(0,h.Xs)`${s.A.isOverdueForAuditorLevelReview()}`,All:(0,h.Xs)`TRUE`,"Has Peer Reviews":(0,h.Xs)`${d.Ay.hasPeerReviewed()}`,"Has No Peer Reviews":(0,h.Xs)`NOT(${d.Ay.hasPeerReviewed()})`},w=(0,ec.y)(p,"filter"),f={All:(0,h.Xs)`TRUE`,Flagged:s.A.hasAuditorLevel(v.JL.Flagged),Novice:s.A.hasAuditorLevel(v.JL.Novice),Beginner:s.A.hasAuditorLevel(v.JL.Beginner),Intermediate:s.A.hasAuditorLevel(v.JL.Intermediate),Advanced:s.A.hasAuditorLevel(v.JL.Advanced)},y=(0,ec.y)(f,"level"),b={"Needs Review Date (asc)":(0,h.Xs)`COALESCE(${s.A.getFirstAuditThatNeedsReviewDate()}, 'INFINITY') ASC`,"Last Reviewed Date (desc)":(0,h.Xs)`COALESCE(
10      (SELECT ${o.A.created_at} ${d.Ay.getMostRecentAudit()}),
11      '-INFINITY'
12    ) DESC`,"Last Reviewed Date (asc)":(0,h.Xs)` COALESCE(
13      (SELECT ${o.A.created_at} ${d.Ay.getMostRecentAudit()}),
14      '-INFINITY'
15    ) ASC`},g=(0,ec.y)(b),Y=(0,eh.S)(),T=Y.length>0?(0,h.Xs)`${d.Ay.display_name} ILIKE ${`%${Y}%`}`:(0,h.Xs)`TRUE`,{worldSlug:I,WorldFinder:k}=(0,ep.A)({adminIncludeAll:!0}),x=null!=I?(0,h.Xs)`${d.Ay.hasReviewedInWorld({slug:I})}`:(0,h.Xs)`TRUE`,R=(0,A.OK)(r,"admin:super")?(0,h.Xs)`TRUE`:(0,h.Xs)`${d.Ay.id} != ${r.id}`,N=d.Ay.where({include:[{association:"TutorProfile",required:!0}]},(0,h.Xs)`
16      ${d.Ay.hasCompletedPeerReviewTraining({userId:d.Ay.id})}
17     AND ${x}
18     AND ${R}
19    `),L=e.many`
20    ${N} AND ${T} AND ${w} AND ${y}
21    ORDER BY ${g}
22    LIMIT ${50} OFFSET ${t}
23  `,$=e`COUNT(*) ${N} AND ${T} AND ${w} AND ${y}`;return(0,n.Y)(eu.A,{title:"Peer Review Admin Panel",children:(0,n.FD)(i.m,{children:[(0,n.Y)(m.A,{currentTab:"Peer Reviewers"}),(0,n.Y)(l.D,{size:"2xl",mb:8,children:"Peer Reviewer Admin"}),(0,n.Y)(a.B,{direction:"row",justify:"space-between",mb:"36px",spacing:4,children:(0,n.Y)(eh.I,{})}),(0,n.FD)(a.B,{direction:["column","row"],justify:"space-between",mb:"52px",spacing:4,children:[(0,n.Y)(ec.V,{sorts:p,queryKey:"filter",text:"Show"}),(0,n.Y)(ec.V,{sorts:f,queryKey:"level",text:"Peer Reviewer Level"}),(0,n.Y)(ec.V,{sorts:b}),(0,n.Y)(k,{})]}),(0,n.Y)(ed,{users:L}),(0,n.Y)(B.A,{scheme:"url",totalItemsCount:$??0,itemsPerPage:50})]})})},{userRoles:["admin:mentor"]});var eA=!0;let em=ev},70794:(e,t,r)=>{"use strict";r.d(t,{A:()=>d});var n=r(89112),i=r(85562),l=r(54443),a=r(75292),o=r(78919),s=r(97501);function d(e,t={numRandomUsersToInclude:0,adminIncludeAll:!1}){let r=(0,a.Jd)(),u=(0,l.I)(),{numRandomUsersToInclude:c,adminIncludeAll:h}=t;return u.many(i.A.where({include:[{association:"Course",required:!1}],order:[[i.A.position,"asc"]]},(0,o.Xs)`(${i.A.isVisible()} OR ${i.A.isUserMember(r.id)} OR ${h?(0,o.Xs)`TRUE`:(0,o.Xs)`FALSE`})`)).map(t=>{let l=0===c?[]:t.many`
24      ${n.A.where({worldId:i.A.id,include:[{association:"User",required:!0}],tableSample:(0,o.Xs)`BERNOULLI(10)`})}
25      LIMIT ${c}
26    `;return{...(0,s.$h)(e,{world:t,userId:r.id}),users:l.map(e=>(0,s.oL)(["id","avatarUrl","displayName"],{user:e}))}})}},75662:(e,t,r)=>{"use strict";r.d(t,{A:()=>g});var n=r(18153),i=r(59803),l=r(99407),a=r(63973),o=r(2665),s=r(55791),d=r(83734),u=r(43043),c=r(64435),h=r(39955),p=r(14232),v=r(80484),A=r(55720),m=r(46304),w=r(92231),f=r(46860),y=r(23538),b=r(90799);function g({auditorNotes:e}){return(0,n.Y)(i.s,{flexDir:"column",children:(0,n.FD)(l.X,{variant:"simple",children:[(0,n.Y)(a.d,{children:(0,n.FD)(o.Tr,{children:[(0,n.Y)(s.Th,{width:"150px",children:"Logged by"}),(0,n.Y)(s.Th,{width:"150px",children:"Auditor"}),(0,n.Y)(s.Th,{width:"150px",children:"Date Logged"}),(0,n.Y)(s.Th,{children:"New Level"}),(0,n.Y)(s.Th,{children:"Note"})]})}),0===e.length?(0,n.Y)(d.r,{children:"No notes to display."}):null,(0,n.Y)(u.N,{children:e.map(e=>{let t=e(v.A.id),r=e(v.A.created_at),i=e(v.A.user_id)??0,l=e(A.Ay.display_name),a=e(v.A.new_auditor_level),s=e(v.A.note),d=e.one(v.A.getSubject()),u=d(A.Ay.id)??0,g=d(A.Ay.display_name)??"";return(0,n.Y)(p.Fragment,{children:(0,n.FD)(o.Tr,{children:[(0,n.Y)(c.Td,{children:(0,n.Y)(f.A,{href:(0,m.FG)(i),children:l})}),(0,n.Y)(c.Td,{children:(0,n.Y)(f.A,{href:(0,m.FG)(u),children:g})}),(0,n.Y)(c.Td,{children:(0,n.Y)(b.A,{time:r})}),(0,n.Y)(c.Td,{children:null==a?"-":(0,n.Y)(w.A,{tutorAuditorLevel:a})}),(0,n.Y)(c.Td,{children:(0,n.Y)(h.a,{maxHeight:"200px",overflowY:"scroll",children:(0,n.Y)(y.A,{text:s})})})]})},t??0)})})]})})}},76258:(e,t,r)=>{"use strict";r.d(t,{A:()=>p});var n=r(18153),i=r(76032),l=r(39955),a=r(89099),o=r(14232),s=r(46304),d=r(85279),u=r(70794);let c="All Subjects";function h({worldSlug:e,adminIncludeAll:t}){let r=(0,a.useRouter)(),p=[{label:c,value:c},...(0,u.A)(["slug","title"],{adminIncludeAll:t,numRandomUsersToInclude:0}).map(e=>({label:e.title,value:e.slug}))],v=null!=e?p.find(t=>t.value===e):p[0],A=o.useCallback(async e=>{let{[s.Emr]:t,...n}=r.query,i=e===c?{}:{[s.Emr]:e};await r.replace({query:{...n,...i}})},[r]);return(0,n.FD)(i.B,{direction:"row",spacing:"8px",align:"center",children:[(0,n.Y)(l.a,{fontWeight:"bold",children:"Subject"}),(0,n.Y)(l.a,{width:"200px",children:(0,n.Y)(d.A,{instanceId:"world-finder",name:"world-finder",options:p,defaultValue:v,onCh
26ange:e=>A(e?.value??""),isClearable:!1,components:{IndicatorSeparator:()=>null}})})]})}function p({adminIncludeAll:e=!1}){let t,r=null==(t=(0,a.useRouter)().query[s.Emr])?null:`${t}`;return{worldSlug:r,WorldFinder:()=>(0,n.Y)(h,{worldSlug:r,adminIncludeAll:e})}}},91313:(e,t,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/peer-review",function(){return r(69732)}])},91760:(e,t,r)=>{"use strict";r.d(t,{V:()=>p,y:()=>v});var n=r(18153),i=r(59803),l=r(39955),a=r(89099),o=r(14232),s=r(74175),d=r(85279),u=r(47808),c=r(45895),h=r(45755);function p({sorts:e,queryKey:t="sort",zIndex:r="auto",width:v="15rem",text:A="Sort by",defaultSortKey:m,menuPortalTargetRef:w,tooltipText:f}){let y=(0,a.useRouter)(),b=`${y.query[t]}`,g=Object.keys(e).map(e=>({label:e,inputValue:e,value:(0,h.Z)(e)})),Y=g.find(e=>e.value===b),T=g.find(e=>e.value===m),I=g?.[0],[k,x]=(0,o.useState)(null),R=y.query[c.nw],[N]=(0,s.A)(async e=>{if(null==e)return;x(e);let r=null!=R?{[c.nw]:1}:{};await y.replace({query:{...y.query,[t]:e.value,...r}}),x(null)},[R,t,y],"Process Sort Value change");return(0,n.FD)(i.s,{align:"center",children:[(0,n.Y)(u.A,{content:f,disabled:null==f,children:(0,n.Y)(l.a,{fontWeight:"bold",mr:2,flexShrink:0,children:A})}),(0,n.Y)(l.a,{width:v,zIndex:r,children:(0,n.Y)(d.A,{instanceId:t,name:t,options:g,value:k??Y??T??I,onChange:N,isSearchable:!0,isClearable:!1,components:{IndicatorSeparator:()=>null},menuPortalTarget:w?.current})})]})}function v(e,t="sort"){let r=(0,a.useRouter)(),n=`${r.query[t]}`,i=Object.entries(e).find(([e])=>(0,h.Z)(e)===n);return i?i[1]:Object.values(e)[0]}},96491:(e,t,r)=>{"use strict";r.d(t,{p:()=>u});var n=r(37876),i=r(29185),l=r(75255),a=r(70667),o=r(11842),s=r(66394),d=r(85696);let u=(0,o.R)(function(e,t){let{htmlSize:r,...o}=e,u=(0,s.o)("Input",o),c=(0,i.M)(o),h=(0,a.t)(c),p=(0,l.cx)("chakra-input",e.className);return(0,n.jsx)(d.B.input,{size:r,...h,__css:u.field,ref:t,className:p})});u.displayName="Input",u.id="Input"},99468:(e,t,r)=>{"use strict";r.d(t,{I:()=>p,S:()=>h});var n=r(18153),i=r(39955),l=r(96491),a=r(50485),o=r(44517),s=r(89099),d=r(14232),u=r(81188),c=r(82899);function h(e="search"){let t=(0,s.useRouter)().query[e];return"string"==typeof t?decodeURIComponent(`${t}`):""}function p({queryKey:e="search",placeholder:t="",inputProps:r,iconOffset:v="0px",...A}){let m=(0,s.useRouter)(),w=h(e),[f,y]=(0,d.useState)(w),b=(0,d.useCallback)(t=>{m.push({query:{...m.query,[e]:encodeURIComponent(t)}}).catch(e=>{u.A.error("Navigation failed",{err:e})})},[e,m]);return(0,n.FD)(i.a,{position:"relative",...A,children:[(0,n.Y)(l.p,{value:f,onChange:e=>y(e.target.value),placeholder:t,onKeyDown:e=>{"Enter"===e.key&&b(f)},variant:"normal",pr:"32px",...r}),(0,n.Y)(i.a,{position:"absolute",...{right:v,top:"50%",transform:"translateY(-50%)"},children:(0,n.Y)(a.K,{variant:"ghost",icon:(0,n.Y)(c.A,{faIcon:o.$UM,size:"md"}),onClick:()=>b(f),"aria-label":"Search"})})]})}}},e=>{e.O(0,[8828,6425,3916,8113,636,6593,8792],()=>e(e.s=91313)),_N_E=e.O()}]);
27//# sourceMappingURL=peer-review-e0b6a249adcd3f71.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.