PageSourceSearch

https://app.hypertask.ai/_next/static/chunks/3575.82c13ec2842aa342.js

js hypertask.ai collected 2026-10-05 14:32:27 UTC 8,870 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1838,3575],{52998:(e,t,s)=>{s.r(t),s.d(t,{default:()=>I});var i=s(95155),n=s(12115),a=s(26696),o=s(58838),l=s.n(o),r=s(89034),d=s(93110),c=s(85699),u=s(56135),m=s(18955),h=s(86867),f=s(99043),k=s(35625),p=s(48934),g=s(52108),y=s(38434),v=s(25177);let I=({mode:e="Others",moveTaskToColumnHandler:t,projectId:s,task:o,callback:I,taskCacheCallback:w,title:j="Move task to column",bulkTaskIds:b,onBulkMove:x})=>{let[A,E]=(0,d.L4)(c.Jy),C=(0,k.jE)(),S=(0,n.useRef)(o).current,_=S?.projectId??s,M=(0,n.useRef)(null),[T,D]=(0,n.useState)(!1),[N,U]=(0,n.useState)(!1),[$,q]=(0,n.useState)(!0),{removeFromListWithStatus:L,moveItem:P}=(0,m.A)(),[Q,B]=(0,n.useState)([]),[F,K]=(0,n.useState)([]),[V,J]=(0,n.useState)(0),{handleMouseEnter:O,handleMouseLeave:R,handleMouseMove:z,elRef:H}=(0,f.A)({setSelectedIndex:J}),{data:W,isFetched:Z}=(0,u.c)(["moveTaskModal",_],_),[G,X]=(0,n.useState)(""),Y=()=>{t(!0)};(0,n.useEffect)(()=>{M.current?.focus(),K(W),B(W),S?(console.log("\uD83D\uDE80 ~ useEffect ~ sectionId:",S.sectionId),requestAnimationFrame(()=>{let e=W.findIndex((e,t)=>e.id===S.sectionId);if(-1!==e){J(e);let t=document.getElementById(`task_${W[e].id}`),s=document.getElementById("users-list");if(t&&s){let e=t.offsetTop,i=s.clientHeight;s.scrollTop=e-i+t.clientHeight}}})):J(0),U(!1)},[W,S]);let ee=async()=>{D(!0)},{mutate:et}=(0,p.n)({mutationFn:async({section:e,ranking:t})=>{if(!S)throw Error("Unable to find task");let s=await fetch("/api/tasks/moveTask",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({projectId:S.projectId,taskId:S.taskId,section_title:e.section_title,sectionId:e.id,section:e.section_title,ranking:t})});if(!s.ok)throw Error("Unable to move task");return s.json()},onMutate:async({section:e})=>{if(!S)throw Error("Unable to find task");let s=S.taskId,i=S.sectionId,n=S.projectId;await Promise.all([C.cancelQueries({queryKey:["projectsAll"]}),C.cancelQueries({queryKey:["task-",s]})]);let a=C.getQueryData(["projectsAll"]),o=C.getQueryData(["task-",s]),l=W.find(e=>e.id===i),r=a?.updatedProjects.find(e=>e.id===n)?.sections.flatMap(e=>e.items).find(e=>e.id===s);return I?.(e),C.setQueryData(["task-",s],t=>t&&!Array.isArray(t)?{...t,sectionId:e.id,section:e.section_title}:t),i&&n&&s&&(e.visibility?e.id&&await P({destinationSectionId:e.id,itemId:s,sourceSectionId:i},{persistRanking:!1,refetchIfMissing:!1,showToast:!1}):(await L(i,n,s,"Move"),E(null))),t(!0),document.getElementById("droppable-section-container-"+e.id)?.scrollTo({top:0}),{movedTask:r,previousProjects:a,previousSection:l,previousTask:o,taskId:s}},onSuccess:(e,{section:t},s)=>{e.newComment&&w?.(e.newComment),S&&"number"==typeof t.id&&window.dispatchEvent(new CustomEvent(v.GD,{detail:{fromSectionId:S.sectionId,projectId:S.projectId,taskId:S.taskId,toSectionId:t.id,title:t.section_title}})),t.visibility&&s?.movedTask&&(0,y.Ay)(`${s.movedTask.ticketNumber?.toUpperCase()} has been moved to ${t.section_title}`)},onError:(e,t,s)=>{C.setQueryData(["projectsAll"],s?.previousProjects),C.setQueryData(["task-",s?.taskId],s?.previousTask),s?.previousSection&&I?.(s.previousSection),s?.taskId&&E(s.taskId)},onSettled:async(e,t,s,i)=>{await Promise.all([C.invalidateQueries({queryKey:["projectsAll"]}),C.invalidateQueries({queryKey:["task-",i?.taskId]})])}}),es=(0,n.useCallback)(async t=>{if("CreatingTask"===e&&I)return void(I&&I(t));if(b?.length&&x){U(!0);try{await x(t)}finally{U(!1),Y()}return}if(!S)return;console.log("\uD83D\uDE80 ~ handleLinkClick ~ sectionToMoveID & fromSectionID",t.id,S.sectionId);let s=C.getQueryData(["projectsAll"]),i=s?.updatedProjects.find(e=>e.id===S.projectId)?.sections.find(e=>e.sectionId===t.id);et({section:t,ranking:(0,g.A)(void 0,i?.items[0]?.ranking)})},[I,e,b,x,et,C,S]),ei=e=>{let t=Q[V];if(t)return"ArrowDown"===e.key?(t?-1===V||V===Q.length-1||(J(e=>e+1),document.getElementById(`task_${Q[V+1].id}`)?.scrollIntoView({behavior:"smooth",block:"center"})):Q.length>0&&(J(0),document.getElementById(`task_${Q[0].id}`)?.scrollIntoView({behavior:"smooth",block:"center"})),!0):"ArrowUp"===e.key?(t?V<=0||(J(e=>e-1),document.getElementById(`task_${Q[V-1].id}`)?.scrollIntoView({behavior:"smooth",block:"center"})):F.length>0&&(J(F.length-1),document.getElementById(`task_${Q[F.length-1].id}`)?.scrollIntoView({behavior:"smooth",block:"center"})),!0):"Enter"===e.key&&!!t&&(es(t),!0)};return(0,n.useEffect)(()=>(document.addEventListener("keydown",ei),()=>{document.removeEventListener("keydown",ei)}),[Q,V]),(0,n.useEffect)(()=>{J(0)},[Q]),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(h.ow,{id:"MoveModal",isOpen:$,onOpened:ee,toggle:Y,className:`paletteModalSizing sm:min-w-[560px] sm:top-[24%] ${l().links_modal}`,children:[(0,i.jsx)(h.kp,{header:j}),(0,i.jsxs)(a.A,{className:"p-0 rounded-b-[4px]",children:[(0,i.jsx)(h.iv,{id:"linksModal",placeholder:"Search Column",ref:M,value:G,onChange:e=>{X(e.target.value),B(t=>F.filter(t=>!e.target.value||t.section_title?.toLowerCase().includes(e.target.value.toLowerCase())))}}),(0,i.jsx)(h.RW,{className:"max-h-[364px]",handleMouseMove:z,id:"users-list","aria-labelledby":"assignDelayButton",children:F&&Q?.filter(e=>!G||e.section_title?.toLowerCase().includes(G.toLowerCase())).map((e,t)=>(0,i.jsxs)(h.vX,{id:`task_${e.id}`,index:t,handleMouseLeave:R,onMouseEnter:()=>O(t),onClick:()=>es(e),isSelected:V===t,children:[(0,i.jsx)("span",{className:`${l().links_list}`,children:e.section_title}),!1===e.visibility&&(0,i.jsx)(r.A,{size:16,strokeWidth:1.75})]},`user-${t}`))})]})]})})}},56135:(e,t,s)=>{s.d(t,{c:()=>a});var i=s(26708),n=s(82285);let a=(e,t,s,a=!0)=>{let o=(0,i.I)({queryKey:e,queryFn:()=>n.A.getSectionsForMoveTask(t),enabled:Number.isFinite(t)&&a,initialData:s??[]});return{...o,data:Array.isArray(o.data)?o.data:[]}}},58719:(e,t,s)=>{s.d(t,{U:()=>a});var i=s(26708),n=s(82285);let a=(e,t,s,a)=>(0,i.I)({queryKey:e,queryFn:()=>n.A.getMembersOwnersForAssignees(t),initialData:s??[],enabled:t>0&&(a?.enabled??!0)})},61834:(e,t,s)=>{s.d(t,{Pf:()=>m,Vd:()=>u,Zm:()=>c});var i=s(18071),n=s(23662),a=s(82364),o=s(56278);let l=new Set([i.Df.defaultPhotoURL,"https://duv2gcpdgd578.cloudfront.net/tasks/attachments/1757584422625image.png"]),r=e=>(0,n.Jq)(e.toUpperCase())[0]??"",d=e=>e.slice(0,2).map(r).join("");function c(e){let t=e?.trim();return!!t&&!l.has(t.split(/[?#]/,1)[0])}
1function u(e){let t=(e??"").trim().split(/\s+/u).filter(Boolean);if(0===t.length)return"?";let s=(0,n.Jq)(t[0]);if(1===t.length)return d(s);let i=(0,n.Jq)(t[t.length-1]);return d([s[0]??"",i[0]??""])}function m(e){return(0,a.gn)(o,{seed:e,size:128}).toDataUri()}},64394:(e,t,s)=>{s.d(t,{A:()=>l});var i=s(95155),n=s(61834),a=s(98766),o=s(12115);let l=({alt:e,className:t,compactOnMobile:s=!1,fallbackClassName:l,imageClassName:r,name:d,photoURL:c,size:u=20,title:m,agentId:h})=>{let[f,k]=(0,o.useState)(null),p=e??(d?`${d} avatar`:"Profile avatar"),g=(0,a.cn)("shrink-0 overflow-hidden rounded-full",s&&"h-4 w-4 sm:h-8 sm:w-8",t),y=(0,o.useMemo)(()=>h?(0,n.Pf)(h):null,[h]);return(0,n.Zm)(c)&&f!==c?(0,i.jsx)("img",{alt:p,className:(0,a.cn)(g,"object-cover",r),decoding:"async",height:u,onError:()=>k(c),src:c,title:m,width:u}):y?(0,i.jsx)("img",{alt:p,className:(0,a.cn)(g,r),height:u,src:y,title:m,width:u}):(0,i.jsx)("span",{"aria-hidden":""===p||void 0,"aria-label":p||void 0,className:(0,a.cn)(g,"inline-flex items-center justify-center bg-active-modal-element font-semibold leading-none text-white-black",s?"text-[8px] sm:text-meta":u<=16?"text-[8px]":u<=24?"text-micro":u<=32?"text-meta":"text-emphasis",l),role:p?"img":void 0,style:s?void 0:{height:u,width:u},title:m,children:(0,n.Vd)(d)})}},65880:(e,t,s)=>{s.r(t),s.d(t,{default:()=>d});var i=s(95155),n=s(12115),a=s(50989),o=s(10104),l=s(52998);let r={id:0,displayName:"Clear auto-assign",assigned:!1},d=({project:e,onClose:t,onSelect:s})=>{let[d,c]=(0,n.useState)(null);if(!d)return(0,i.jsx)(l.default,{mode:"CreatingTask",projectId:e.id,title:"Auto-assign: choose a column",moveTaskToColumnHandler:t,callback:c});
1let u=e.section?.find(e=>e.id===d.id),m=u?.autoAssignUserId??null,h=u?.autoAssignAgentId??null;return(0,i.jsx)(a.default,{mode:"Create",project:e,title:`Auto-assign for ${d.section_title}`,includeAgents:!0,selectedUserIds:m?[m]:[],selectedAgentIds:h?[h]:[],extraUsers:[{...r,assigned:(0,o.jD)(u??{})}],assignees:[],onClose:e=>{if(!e)return c(null);s(d.id,(0,o.si)(e))}})}},89034:(e,t,s)=>{s.d(t,{A:()=>a});var i=s(21425);let n={name:"eye-off",size:24,node:[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]};n.node;let a=(0,i.A)(n)}}]);

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.