PageSourceSearch

https://cdn.apopro.dk/2026-09-17-12-49-50/_next/static/chunks/5628.514c54af5707ae68.js

js apopro.dk collected 2026-09-25 02:39:37 UTC 84,966 bytes, 22 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5628],{35628:(e,t,n)=>{n.r(t),n.d(t,{TasksStudioActiveToolLayout:()=>nO});var i=n(30200),o=n(77835),s=n(31787),a=n(37846),r=n(62858),l=n(9483),d=n(97439),c=n(68322),u=n(80985),m=n(95073),p=n(6747),h=n(11695),f=n(33355),x=n(92363),g=n(42372),y=n(17065),b=n(30020),j=n(70568),v=n(7962),w=n(73108),I=n(45160),_=n(10158),C=n(56148),k=n(74248),T=n(52262),S=n(78514),z=n(12115),N=n(19749),D=n(95155),B=n(80825),$=n(13638),A=n(66093),U=n(40220),P=n(42262),R=n(73793),E=n(30457),L=n(21565),F=n(73052),H=n(13478),O=n(51862),M=n(6052),Y=n(62512),G=n(71136),W=n(89237),V=n(51452),Z=n(44714),X=n(18608),J=n(20129),q=n(55684),K=n(87953),Q=n(6878),ee=n(8982),et=n(61016),en=n(68764),ei=n(75554),eo=n(88829),es=n(88689),ea=n(51595),er=n(7571),el=n(94163),ed=n(69685),ec=n(96063),eu=n(49544),em=n(24035),ep=n(1382),eh=n(68949),ef=n(65015),ex=n(33905),eg=n(52346),ey=n(46461),eb=n(55168),ej=n(99539),ev=n(91993),ew=n(83475),eI=n(70061),e_=n(25037),eC=n(55656);function ek(e){let t=(0,N.c)(8),[n,i]=(0,z.useState)(null),o;t[0]===n?o=t[1]:(o={documentValue:n,permission:"read"},t[0]=n,t[1]=o);let s=(0,x.pt)(o),a;t[2]!==s||t[3]!==n?(a={mentionOptions:s,selectedDocument:n,setSelectedDocument:i},t[2]=s,t[3]=n,t[4]=a):a=t[4];let r=a,l;return t[5]!==e.children||t[6]!==r?(l=(0,D.jsx)(B.BY.Provider,{value:r,children:e.children}),t[5]=e.children,t[6]=r,t[7]=l):l=t[7],l}function eT(){let e=(0,z.useContext)(B.BY);if(!e)throw Error("useMentionUser must be used within a MentionUserProvider");return e}let eS=l.n.apiVersion,ez=[{value:"open",title:"To Do",icon:(0,D.jsx)(et.CircleIcon,{})},{value:"closed",title:"Done",icon:(0,D.jsx)(ey.CheckmarkCircleIcon,{})}],eN=O.I4.div.withConfig({displayName:"AvatarRoot",componentId:"sc-ztexr-0"})(e=>{let t=(0,Q.t)(e.theme);return(0,O.AH)`min-height:${t.avatar.sizes[e.$size]?.size}px;min-width:${t.avatar.sizes[e.$size]?.size}px;display:flex;align-items:center;justify-content:center;border-radius:50%;${e.$border?"box-shadow: inset 0 0 0 1px var(--card-border-color);":""};${e.$removeBg?"--card-avatar-gray-bg-color: transparent;":""}`});function eD(e){let t,n,i,o,s=(0,N.c)(27),{user:a,size:l,border:d}=e,c=void 0===l?0:l,p=void 0===d||d,[h,f]=(0,u.r)(a?.id||"");if(f){let e;return s[0]===c?e=s[1]:(e=(0,D.jsx)(m.s,{$size:c,animated:!0}),s[0]=c,s[1]=e),e}if(!a||!h){let e,t,n;return s[2]===Symbol.for("react.memo_cache_sentinel")?(e=(0,D.jsx)(ej.UserIcon,{}),s[2]=e):e=s[2],s[3]===c?t=s[4]:(t=(0,D.jsx)(A.n,{size:c,children:e}),s[3]=c,s[4]=t),s[5]!==p||s[6]!==c||s[7]!==t?(n=(0,D.jsx)(eN,{$size:c,$border:p,children:t}),s[5]=p,s[6]=c,s[7]=t,s[8]=n):n=s[8],n}let x=!e.withTooltip,g;s[9]===Symbol.for("react.memo_cache_sentinel")?(g=["top","top-start"],s[9]=g):g=s[9];let y=!!h?.imageUrl,b;return s[10]===h.imageUrl?b=s[11]:(b=h?.imageUrl?{color:void 0}:{},s[10]=h.imageUrl,s[11]=b),s[12]===e.withTooltip?t=s[13]:(t=e.withTooltip?{title:null}:{},s[12]=e.withTooltip,s[13]=t),s[14]!==h||s[15]!==c||s[16]!==b||s[17]!==t?(n=(0,D.jsx)(m.c,{user:h,size:c,...b,...t}),s[14]=h,s[15]=c,s[16]=b,s[17]=t,s[18]=n):n=s[18],s[19]!==c||s[20]!==y||s[21]!==n?(i=(0,D.jsx)(eN,{$size:c,$removeBg:y,children:n}),s[19]=c,s[20]=y,s[21]=n,s[22]=i):i=s[22],s[23]!==h.displayName||s[24]!==x||s[25]!==i?(o=(0,D.jsx)(r.s,{content:h.displayName,disabled:x,portal:!0,fallbackPlacements:g,placement:"top-end",children:i}),s[23]=h.displayName,s[24]=x,s[25]=i,s[26]=o):o=s[26],o}function eB(e){let t,n,i,o,s,r=(0,N.c)(21),{user:l,onSelect:d,pressed:c}=e,{t:u}=(0,a.t)(w.n),m;r[0]!==d||r[1]!==l.id?(m=()=>d(l.id),r[0]=d,r[1]=l.id,r[2]=m):m=r[2];let p=m,h=!l.granted,f=l.id?l:void 0,x;return r[3]===f?x=r[4]:(x=(0,D.jsx)(eD,{user:f,size:1}),r[3]=f,r[4]=x),r[5]===l.displayName?t=r[6]:(t=(0,D.jsx)(A.n,{size:1,textOverflow:"ellipsis",title:l.displayName,children:l.displayName}),r[5]=l.displayName,r[6]=t),r[7]!==x||r[8]!==t?(n=(0,D.jsxs)(M.so,{alignItems:"center",gap:2,flexBasis:"0%",flexGrow:1,children:[x,t]}),r[7]=x,r[8]=t,r[9]=n):n=r[9],r[10]!==u||r[11]!==l.granted?(i=!l.granted&&(0,D.jsx)(U.Ex,{fontSize:1,children:u("form.input.assignee.unauthorized.text")}),r[10]=u,r[11]=l.granted,r[12]=i):i=r[12],r[13]!==n||r[14]!==i?(o=(0,D.jsxs)(M.so,{alignItems:"center",gap:3,children:[n,i]}),r[13]=n,r[14]=i,r[15]=o):o=r[15],r[16]!==p||r[17]!==c||r[18]!==h||r[19]!==o?(s=(0,D.jsx)(em.Dr,{onClick:p,padding:1,disabled:h,pressed:c,children:o}),r[16]=p,r[17]=c,r[18]=h,r[19]=o,r[20]=s):s=r[20],s}let e$=(0,O.I4)(em.W1).withConfig({displayName:"StyledMenu",componentId:"sc-i3gcj2-0"})`width:308px;border-radius:3px;`,eA=["Control","Shift","Alt","Enter","Home","End","PageUp","PageDown","Meta","Tab","CapsLock"],eU={id:"",displayName:"No assignee",granted:!0};function eP(e){let t,n,i,o,s,r,l=(0,N.c)(29),{onSelect:d,value:c}=e,m=void 0===c?"":c,[p,h]=(0,z.useState)(""),{mentionOptions:f}=eT(),x=(0,z.useRef)(null),g;l[0]===Symbol.for("react.memo_cache_sentinel")?(g=[eU],l[0]=g):g=l[0],l[1]===f.data?t=l[2]:(t=g.concat(f.data||[]),l[1]=f.data,l[2]=t);let y=t,b;l[3]===Symbol.for("react.memo_cache_sentinel")?(b=e=>{h(e.currentTarget.value)},l[3]=b):b=l[3];let j=b,v;e:{let e;if(!p){let e;l[4]===y?e=l[5]:(e=y||[],l[4]=y,l[5]=e),v=e;break e}
1if(l[6]!==y||l[7]!==p){let t=(0,eb.A)(p).toLocaleLowerCase();e=y?.map(eR)?.filter(e=>e?.searchName.includes(t))?.sort((e,n)=>{let i=e.searchName.startsWith(t),o=n.searchName.startsWith(t);return i&&!o?-1:!i&&o?1:0}),l[6]=y,l[7]=p,l[8]=e}else e=l[8];let t=e,n;l[9]===t?n=l[10]:(n=t||[],l[9]=t,l[10]=n),v=n}let I=v,_;l[11]!==d||l[12]!==m?(_=e=>(0,D.jsx)(eB,{user:e,onSelect:d,pressed:e.id===m},e.id),l[11]=d,l[12]=m,l[13]=_):_=l[13];let C=_,k;l[14]===Symbol.for("react.memo_cache_sentinel")?(k=e=>{e.target!==x.current&&(eA.includes(e.key)||x.current?.focus())},l[14]=k):k=l[14];let T=k,{t:S}=(0,a.t)(w.n);if(f.loading){let e;return l[15]===Symbol.for("react.memo_cache_sentinel")?(e=(0,D.jsx)(U.mc,{width:0,children:(0,D.jsx)(u.t,{showText:!0})}),l[15]=e):e=l[15],e}return l[16]===S?n=l[17]:(n=S("form.input.assignee.search.placeholder"),l[16]=S,l[17]=n),l[18]!==p||l[19]!==n?(i=(0,D.jsx)(P.t,{placeholder:n,autoFocus:!0,border:!1,onChange:j,value:p,fontSize:1,icon:ej.UserIcon,ref:x,name:"assigneeSearch",autoComplete:"off"}),l[18]=p,l[19]=n,l[20]=i):i=l[20],l[21]===Symbol.for("react.memo_cache_sentinel")?(o={maxHeight:"320px",overflowY:"scroll",paddingTop:"8px"},l[21]=o):o=l[21],l[22]!==I||l[23]!==C||l[24]!==S?(s=(0,D.jsx)("div",{style:o,children:0===I.length?(0,D.jsx)(M.az,{padding:3,children:(0,D.jsx)(A.n,{align:"center",size:1,muted:!0,children:S("form.input.assignee.search.no-users.text")})}):(0,D.jsx)(U.wj,{items:I,renderItem:C})}),l[22]=I,l[23]=C,l[24]=S,l[25]=s):s=l[25],l[26]!==s||l[27]!==i?(r=(0,D.jsxs)("div",{onKeyDown:T,children:[i,s]}),l[26]=s,l[27]=i,l[28]=r):r=l[28],r}function eR(e){return{...e,searchName:(0,eb.A)(e.displayName||"").toLocaleLowerCase()}}function eE(e){let t,n,i=(0,N.c)(7),{onSelect:o,menuButton:s,value:a}=e,l;return i[0]!==o||i[1]!==a?(l=(0,D.jsx)(e$,{children:(0,D.jsx)(eP,{onSelect:o,value:a})}),i[0]=o,i[1]=a,i[2]=l):l=i[2],i[3]===Symbol.for("react.memo_cache_sentinel")?(t={placement:"bottom",fallbackPlacements:["bottom"],portal:!0,constrainSize:!0},i[3]=t):t=i[3],i[4]!==s||i[5]!==l?(n=(0,D.jsx)(r.i,{button:s,id:"assign-user-menu",menu:l,popover:t}),i[4]=s,i[5]=l,i[6]=n):n=i[6],n}let eL=(0,O.I4)(R.s).withConfig({displayName:"FocusableCard",componentId:"sc-jzar2w-0"})(e=>{let t=(0,Q.t)(e.theme);return(0,O.AH)`&[data-as='button']{border:1px solid var(--card-border-color);&:focus-within{border:1px solid var(--card-focus-ring-color);}--card-muted-fg-color:${t.color.input.default.enabled.placeholder};}`});function eF(e){let t,n,o,s,r=(0,N.c)(29),{value:l,onChange:d}=e,{mentionOptions:c}=eT(),u;r[0]!==c.data||r[1]!==l?(u=c.data?.find(e=>e.id===l),r[0]=c.data,r[1]=l,r[2]=u):u=r[2];let m=u,p;r[3]===d?p=r[4]:(p=e=>d((0,i.Ta)(e)),r[3]=d,r[4]=p);let h=p,{t:f}=(0,a.t)(w.n),x;e:{let e;if(l){if(c.loading){let e;r[5]===Symbol.for("react.memo_cache_sentinel")?(e=(0,D.jsx)(U.r5,{animated:!0,style:{width:"10ch"}}),r[5]=e):e=r[5],x=e;break e}if(m){x=m.displayName||m.email;break e}if(!m){let e;r[6]===f?e=r[7]:(e=f("form.input.assignee.user-not-found.text"),r[6]=f,r[7]=e),x=e;break e}}r[8]===f?e=r[9]:(e=f("form.input.assignee.search.placeholder"),r[8]=f,r[9]=e),x=e}let g=x,y;r[10]===m?y=r[11]:(y=(0,D.jsx)(eD,{user:m,size:1,border:!1}),r[10]=m,r[11]=y);let b=!m,j;return r[12]!==g||r[13]!==b?(j=(0,D.jsx)(A.n,{size:1,textOverflow:"ellipsis",muted:b,children:g}),r[12]=g,r[13]=b,r[14]=j):j=r[14],r[15]!==y||r[16]!==j?(t=(0,D.jsxs)(M.so,{alignItems:"center",gap:1,flexBasis:"0%",flexGrow:1,children:[y,j]}),r[15]=y,r[16]=j,r[17]=t):t=r[17],r[18]!==m||r[19]!==f||r[20]!==l?(n=l&&m&&!m.granted&&(0,D.jsx)(U.Ex,{fontSize:1,children:f("form.input.assignee.unauthorized.text")}),r[18]=m,r[19]=f,r[20]=l,r[21]=n):n=r[21],r[22]!==t||r[23]!==n?(o=(0,D.jsx)(eL,{"data-as":"button",padding:1,radius:2,tabIndex:0,children:(0,D.jsxs)(M.so,{alignItems:"center",gap:3,children:[t,n]})}),r[22]=t,r[23]=n,r[24]=o):o=r[24],r[25]!==h||r[26]!==o||r[27]!==l?(s=(0,D.jsx)(eE,{onSelect:h,value:l,menuButton:o}),r[25]=h,r[26]=o,r[27]=l,r[28]=s):s=r[28],s}let eH=(0,O.I4)(A.n).withConfig({displayName:"NormalText",componentId:"sc-8jv5j1-0"})`word-break:break-word;`;function eO(e){let t=(0,N.c)(2),{children:n}=e,i;return t[0]===n?i=t[1]:(i=(0,D.jsx)(M.az,{paddingTop:2,paddingBottom:3,children:(0,D.jsx)(eH,{size:1,children:n})}),t[0]=n,t[1]=i),i}let eM=e=>{let{children:t}=e;return(0,D.jsx)(eO,{children:t})},eY=O.I4.div.withConfig({displayName:"DescriptionInputRoot",componentId:"sc-n4qyg8-0"})(e=>{let t=(0,Q.t)(e.theme),n="edit"===e.$mode?t.space[1]:t.space[3],i="edit"===e.$mode?120:200;return(0,O.AH)`[data-ui='CommentInputEditableWrap']{overflow:hidden;padding:${"edit"===e.$mode?`${n}px 0px`:`${n}px ${t.space[2]}px`};min-height:${Math.max(e.$minHeight+n,i)}px !important;}#comment-input-root{box-shadow:${"edit"===e.$mode?"none":""};}[data-ui='CommentInputActions']{display:none !important;}`});function eG(e){let t,n,o,s,r,l=(0,N.c)(23),{value:d,mode:c,inputProps:m}=e,{onChange:p}=m,h=(0,u.n)(),{mentionOptions:f}=eT(),x;l[0]===p?x=l[1]:(x=e=>p((0,i.Ta)(e)),l[0]=p,l[1]=x);let g=x,[b,j]=(0,z.useState)(null),[v,I]=(0,z.useState)(200),_;l[2]===Symbol.for("react.memo_cache_sentinel")?(_=e=>{let t=e.querySelector('[role="textbox"]');t&&I(t.scrollHeight)}
1,l[2]=_):_=l[2];let C=_,k;l[3]===Symbol.for("react.memo_cache_sentinel")?(k=e=>{e&&(0,z.startTransition)(()=>{j(e)})},l[3]=k):k=l[3];let T=k,{t:S}=(0,a.t)(w.n),B;return(l[4]===b?B=l[5]:(B=()=>{b&&C(b)},l[4]=b,l[5]=B),l[6]!==b||l[7]!==d?(t=[d,C,b],l[6]=b,l[7]=d,l[8]=t):t=l[8],(0,z.useEffect)(B,t),h)?(l[9]===d?n=l[10]:(n=d??[],l[9]=d,l[10]=n),l[11]===S?o=l[12]:(o=S("form.input.description.placeholder"),l[11]=S,l[12]=o),l[13]!==h||l[14]!==g||l[15]!==f||l[16]!==n||l[17]!==o?(s=(0,D.jsx)(y.o,{expandOnFocus:!1,currentUser:h,mentionOptions:f,onChange:g,value:n,withAvatar:!1,placeholder:o,onDiscardConfirm:eW,renderBlock:eM}),l[13]=h,l[14]=g,l[15]=f,l[16]=n,l[17]=o,l[18]=s):s=l[18],l[19]!==c||l[20]!==s||l[21]!==v?(r=(0,D.jsx)(eY,{$mode:c,ref:T,$minHeight:v,children:s}),l[19]=c,l[20]=s,l[21]=v,l[22]=r):r=l[22],r):null}function eW(){return null}let eV=O.I4.div.withConfig({displayName:"FieldWrapperRoot",componentId:"sc-4yecpf-0"})(e=>{let t=(0,Q.t)(e.theme);return(0,O.AH)`[data-ui='fieldHeaderContentBox']{padding:0;label{font-weight:${t.font.text.weights.regular};}}`});function eZ(e){let t,n=(0,N.c)(4),i;return n[0]===e?i=n[1]:(i=e.renderDefault(e),n[0]=e,n[1]=i),n[2]===i?t=n[3]:(t=(0,D.jsx)(eV,{children:i}),n[2]=i,n[3]=t),t}function eX(){let e=(0,N.c)(1),t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,D.jsx)("div",{children:"Config errors"}),e[0]=t):t=e[0],t}function eJ(e){let t=(0,N.c)(2),{children:n}=e,i;return t[0]===n?i=t[1]:(i=(0,D.jsx)(x.t,{LoadingComponent:u.t,ConfigErrorsComponent:eX,children:n}),t[0]=n,t[1]=i),i}let eq=(0,O.I4)(R.s).withConfig({displayName:"EmptyReferenceRoot",componentId:"sc-abs3ri-0"})(e=>{let t=(0,Q.t)(e.theme);return(0,O.AH)`&:focus{border:1px solid var(--card-focus-ring-color);}&:focus-visible{outline:none;border:1px solid var(--card-focus-ring-color);}&:hover{border-color:${t.color.input.default.hovered.border};}`}),eK=(0,O.I4)(A.n).withConfig({displayName:"Placeholder",componentId:"sc-abs3ri-1"})(e=>`
2      color: ${(0,Q.t)(e.theme).color.input.default.enabled.placeholder};
3      margin-left: 3px;
4  `),eQ=(0,O.I4)(R.s).withConfig({displayName:"TargetRoot",componentId:"sc-abs3ri-2"})`position:relative;[data-ui='show-on-hover']{opacity:0;position:absolute;right:6px;top:4px;display:flex;}&:focus-within,&:hover{padding-right:36px;[data-testid='compact-preview__status']{opacity:0;}[data-ui='show-on-hover']{transition:opacity 200ms;opacity:1;}}`,e0=(0,O.I4)(ec.RZ).withConfig({displayName:"StyledIntentLink",componentId:"sc-abs3ri-3"})(()=>(0,O.AH)`text-decoration:none;width:100%;overflow:hidden;cursor:pointer;&:focus{box-shadow:0 0 0 1px var(--card-focus-ring-color);}&:focus-visible{outline:none;box-shadow:0 0 0 1px var(--card-focus-ring-color);}`);function e1(e){let t,n,o,l,d,u,m=(0,N.c)(28),{value:p,handleRemove:h}=e,f=p.document._ref,x=p.documentType,y=(0,s.Yt)(),b;m[0]!==y||m[1]!==p.documentType?(b=y.get(p.documentType),m[0]=y,m[1]=p.documentType,m[2]=b):b=m[2];let j=b,v=(0,i.Cn)(f),{t:I}=(0,a.t)(w.n),_;m[3]!==f||m[4]!==x?(_=function(e){let{ref:t,...n}=e,i=(0,c.u)(f);return(0,D.jsx)(e0,{...n,intent:"edit",params:{id:(0,c.l)(f),type:x},ref:t,searchParams:i?[["perspective",i]]:void 0})},m[3]=f,m[4]=x,m[5]=_):_=m[5];let C=_;if(!j){let e,t;return m[6]===I?e=m[7]:(e=I("form.input.target.error.schema-not-found"),m[6]=I,m[7]=e),m[8]===e?t=m[9]:(t=(0,D.jsx)(A.n,{children:e}),m[8]=e,m[9]=t),t}return m[10]!==v||m[11]!==x||m[12]!==j||m[13]!==p.document._ref?(t=(0,D.jsx)(g._,{documentType:x,documentId:p.document._ref,layout:"compact",presence:v,schemaType:j,showBadge:!1}),m[10]=v,m[11]=x,m[12]=j,m[13]=p.document._ref,m[14]=t):t=m[14],m[15]!==C||m[16]!==t?(n=(0,D.jsx)(R.s,{as:C,radius:2,"data-as":"button",children:t}),m[15]=C,m[16]=t,m[17]=n):n=m[17],m[18]===I?o=m[19]:(o=I("form.input.target.buttons.remove.text"),m[18]=I,m[19]=o),m[20]===o?l=m[21]:(l={content:o},m[20]=o,m[21]=l),m[22]!==h||m[23]!==l?(d=(0,D.jsx)("div",{"data-ui":"show-on-hover",children:(0,D.jsx)(r.o,{icon:q.CloseIcon,mode:"bleed",onClick:h,tooltipProps:l})}),m[22]=h,m[23]=l,m[24]=d):d=m[24],m[25]!==n||m[26]!==d?(u=(0,D.jsx)(eQ,{border:!0,radius:2,"data-testid":"task-target-field-preview",children:(0,D.jsxs)(M.so,{gap:1,alignItems:"center",justifyContent:"space-between",children:[n,d]})}),m[25]=n,m[26]=d,m[27]=u):u=m[27],u}function e2(e){let t,n,s,r,d,c=(0,N.c)(32),[u,m]=(0,z.useState)(!1),{dataset:p,projectId:h}=(0,l.c)(),{mode:f,inputProps:x,value:y}=e,{onChange:b}=x,j;c[0]!==p||c[1]!==b||c[2]!==h?(j=e=>{b((0,i.Ta)((0,T.r)({documentId:e._id,documentType:e._type,dataset:p,projectId:h})))},c[0]=p,c[1]=b,c[2]=h,c[3]=j):j=c[3];let v=j,I;c[4]===b?I=c[5]:(I=()=>{b((0,i.Da)())},c[4]=b,c[5]=I);let _=I,C;c[6]===Symbol.for("react.memo_cache_sentinel")?(C=()=>{m(!0)},c[6]=C):C=c[6];let k=C,S;c[7]===Symbol.for("react.memo_cache_sentinel")?(S=()=>{m(!1)},c[7]=S):S=c[7];let B=S,$;c[8]===Symbol.for("react.memo_cache_sentinel")?($=e=>{("Enter"===e.key||" "===e.key)&&m(!0)},c[8]=$):$=c[8];let U=$,{t:P}=(0,a.t)(w.n),E="edit"===f,L=4*("edit"===f),F;return c[9]!==f||c[10]!==e.description||c[11]!==e.inputId||c[12]!==e.title||c[13]!==e.validation?(F="create"===f&&(0,D.jsx)(M.az,{"data-ui":"fieldHeaderContentBox",children:(0,D.jsx)(o.g,{description:e.description,inputId:e.inputId,title:e.title,validation:e.validation,deprecated:void 0})}),c[9]=f,c[10]=e.description,c[11]=e.inputId,c[12]=e.title,c[13]=e.validation,c[14]=F):F=c[14],c[15]!==_||c[16]!==P||c[17]!==y?(t=y?(0,D.jsx)(e1,{value:y,handleRemove:_}):(0,D.jsx)(eq,{border:!0,radius:2,paddingX:2,paddingY:3,onClick:k,onKeyDown:U,tabIndex:0,children:(0,D.jsxs)(M.so,{gap:1,justifyContent:"flex-start",alignItems:"center",children:[(0,D.jsx)(M.az,{paddingX:1,children:(0,D.jsx)(A.n,{size:1,children:(0,D.jsx)(es.DocumentIcon,{})})}),(0,D.jsx)(eK,{size:1,children:P("form.input.target.search.placeholder")})]})}),c[15]=_,c[16]=P,c[17]=y,c[18]=t):t=c[18],c[19]!==F||c[20]!==t?(n=(0,D.jsxs)(A.t,{gap:2,children:[F,t]}),c[19]=F,c[20]=t,c[21]=n):n=c[21],c[22]!==v||c[23]!==u?(s=(0,D.jsx)(g.n,{open:u,onClose:B,onItemSelect:v,disableIntentLink:!0}),c[22]=v,c[23]=u,c[24]=s):s=c[24],c[25]!==n||c[26]!==s?(r=(0,D.jsx)(eV,{children:(0,D.jsx)(R.n,{zOffset:100,children:(0,D.jsx)(eJ,{children:(0,D.jsxs)(g.t,{children:[n,s]})})})}),c[25]=n,c[26]=s,c[27]=r):r=c[27],c[28]!==r||c[29]!==E||c[30]!==L?(d=(0,D.jsx)(R.s,{borderBottom:E,paddingBottom:L,children:r}),c[28]=r,c[29]=E,c[30]=L,c[31]=d):d=c[31],d}let e3=O.I4.div.withConfig({displayName:"Root",componentId:"sc-e1xmtd-0"})(e=>`
5      display: grid;
6      grid-template-columns: 1fr;
7      padding-top: ${(0,Q.t)(e.theme).space[3]}px;
8    `),e4=O.I4.textarea.withConfig({displayName:"TitleInput",componentId:"sc-e1xmtd-1"})(e=>{let{color:t,font:n}=(0,Q.t)(e.theme);return(0,O.AH)`resize:none;overflow:hidden;appearance:none;background:none;border:0;padding:0;border-radius:0;outline:none;width:100%;box-sizing:border-box;font-family:${n.text.family};
8font-weight:${n.text.weights.semibold};font-size:${n.text.sizes[3].fontSize}px;line-height:${n.text.sizes[3].lineHeight}px;margin:0;position:relative;z-index:1;display:block;transition:height 500ms;&:-webkit-autofill,&:-webkit-autofill:hover,&:-webkit-autofill:focus,&:-webkit-autofill:active{-webkit-text-fill-color:var(--input-fg-color) !important;transition:background-color 5000s;transition-delay:86400s;}color:${t.input.default.enabled.fg};&::placeholder{color:${t.input.default.enabled.placeholder};}`});function e5(e){let t,n,o=(0,N.c)(11),{value:s,onChange:a,placeholder:r,path:l}=e,d=(0,z.useRef)(null),c;o[0]===Symbol.for("react.memo_cache_sentinel")?(c=()=>{d.current&&(d.current.style.height="auto",d.current.style.height=`${d.current.scrollHeight}px`)},o[0]=c):c=o[0],o[1]===s?t=o[2]:(t=[s],o[1]=s,o[2]=t),(0,z.useEffect)(c,t),o[3]!==a||o[4]!==l?(n=e=>{let t=e.currentTarget.value;return t||a((0,i.Da)(l)),a((0,i.Ta)(t.replace(/\n/g,""),l))},o[3]=a,o[4]=l,o[5]=n):n=o[5];let u=n,m=!s,p;return o[6]!==u||o[7]!==r||o[8]!==m||o[9]!==s?(p=(0,D.jsx)(e3,{children:(0,D.jsx)(e4,{ref:d,autoFocus:m,value:s,placeholder:r,onChange:u,rows:1})}),o[6]=u,o[7]=r,o[8]=m,o[9]=s,o[10]=p):p=o[10],p}function e6(e){let t=(0,N.c)(4),{value:n,inputProps:i}=e,{onChange:o,schemaType:s}=i,a;return t[0]!==o||t[1]!==s.placeholder||t[2]!==n?(a=(0,D.jsx)(e5,{value:n,onChange:o,placeholder:s.placeholder}),t[0]=o,t[1]=s.placeholder,t[2]=n,t[3]=a):a=t[3],a}function e7(){let e=(0,N.c)(12),{client:t,createAddonDataset:n}=(0,j.t)(),i=(0,u.n)(),o;e[0]!==t||e[1]!==n||e[2]!==i?(o=async e=>{if(!i)throw Error("No current user found. Unable to create task.");let o={...e,authorId:i.id,_type:"tasks.task"};if(!t){let e=await n();if(!e)throw Error("No addon client found. Unable to create task.");return await e.create(o)}return await t.create(o)},e[0]=t,e[1]=n,e[2]=i,e[3]=o):o=e[3];let s=o,a;e[4]===t?a=e[5]:(a=async(e,n)=>{if(!t)throw Error("No client. Unable to create task.");return await t.patch(e).set(n).commit()},e[4]=t,e[5]=a);let r=a,l;e[6]===t?l=e[7]:(l=async e=>{if(!t)throw Error("No client. Unable to create task.");await t.delete(e)},e[6]=t,e[7]=l);let d=l,c;return e[8]!==s||e[9]!==r||e[10]!==d?(c={create:s,edit:r,remove:d},e[8]=s,e[9]=r,e[10]=d,e[11]=c):c=e[11],c}function e8(e){let t=(0,N.c)(12),{id:n,onError:i,onRemoved:o}=e,[s,a]=(0,z.useState)("idle"),[r,l]=(0,z.useState)(!1),[d,c]=(0,z.useState)(null),u=e7(),m;t[0]!==n||t[1]!==i||t[2]!==o||t[3]!==u?(m=async()=>{let e=async()=>{a("loading"),await u.remove(n),o?.(),a("idle"),await new Promise(e9),l(!1)};try{await e()}catch(e){i?.(e.message),c(e.message),a("error")}a("idle")},t[0]=n,t[1]=i,t[2]=o,t[3]=u,t[4]=m):m=t[4];let p=m,h;t[5]===Symbol.for("react.memo_cache_sentinel")?(h=()=>{l(!0)},t[5]=h):h=t[5];let f=h,x;t[6]===Symbol.for("react.memo_cache_sentinel")?(x=()=>
8{l(!1)},t[6]=x):x=t[6];let g=x,y;return t[7]!==d||t[8]!==p||t[9]!==s||t[10]!==r?(y={removeStatus:s,showDialog:r,error:d,handleRemove:p,handleOpenDialog:f,handleCloseDialog:g},t[7]=d,t[8]=p,t[9]=s,t[10]=r,t[11]=y):y=t[11],y}function e9(e){return setTimeout(e,300)}function te(e){let t,n,o,s,l,d,c,u,m,p,h,f,x=(0,N.c)(67),[g,y]=(0,z.useState)(!1),{onChange:b}=e,{setViewMode:j,setActiveTab:v}=(0,w.t)(),I=(0,G.dj)(),_=(0,Y.Jr)(),[C,B]=(0,z.useState)(!1),$;x[0]===Symbol.for("react.memo_cache_sentinel")?($=()=>B(tt),x[0]=$):$=x[0];let P=$,R=e.value,E;x[1]===j?E=x[2]:(E=()=>{j({type:"list"})},x[1]=j,x[2]=E);let L=E,F;x[3]!==L||x[4]!==R._id?(F={id:R._id,onRemoved:L},x[3]=L,x[4]=R._id,x[5]=F):F=x[5];let{handleRemove:H,removeStatus:O}=e8(F),{t:W}=(0,a.t)(w.n),{data:V}=(0,k.t)(),Z;if(x[6]!==V||x[7]!==R._id){let e;x[9]===R._id?e=x[10]:(e=e=>e._id===R._id,x[9]=R._id,x[10]=e),Z=V.find(e),x[6]=V,x[7]=R._id,x[8]=Z}else Z=x[8];let X=Z,J;x[11]!==C||x[12]!==v||x[13]!==j||x[14]!==W||x[15]!==_||x[16]!==I?(J=()=>{_.log(S.i),I.push({closable:!0,status:"success",title:W("form.status.success")}),y(!1),C?j({type:"create"}):v("subscribed")},x[11]=C,x[12]=v,x[13]=j,x[14]=W,x[15]=_,x[16]=I,x[17]=J):J=x[17];let q=(0,K.J)(J),Q;x[18]!==g||x[19]!==q||x[20]!==X?.createdByUser?(Q=()=>{g&&X?.createdByUser&&q()},x[18]=g,x[19]=q,x[20]=X?.createdByUser,x[21]=Q):Q=x[21];let ee=X?.createdByUser,et;x[22]!==g||x[23]!==ee?(et=[g,ee],x[22]=g,x[23]=ee,x[24]=et):et=x[24],(0,z.useEffect)(Q,et),x[25]!==W||x[26]!==I?(t=()=>{y(!1),I.push({closable:!0,status:"error",title:W("form.status.error.creation-failed")})},x[25]=W,x[26]=I,x[27]=t):t=x[27];let en=(0,K.J)(t),eo;x[28]!==g||x[29]!==en?(eo=()=>{let e=null;return g&&(e=setTimeout(()=>en(),1e4)),()=>{e&&clearTimeout(e)}},x[28]=g,x[29]=en,x[30]=eo):eo=x[30],x[31]===g?n=x[32]:(n=[g],x[31]=g,x[32]=n),(0,z.useEffect)(eo,n),x[33]!==b||x[34]!==W||x[35]!==I||x[36]!==R?(o=async()=>{let e;(y(!0),R?.title)?b([(0,i.Ta)((e=R.subscribers||[],(0,T.t)(R.description).forEach(t=>{e.includes(t)||e.push(t)}),R.assignedTo&&(e.includes(R.assignedTo)||e.push(R.assignedTo)),e),["subscribers"]),(0,i.Ta)(new Date().toISOString(),["createdByUser"])]):I.push({closable:!0,status:"error",title:W("form.status.error.title-required")})},x[33]=b,x[34]=W,x[35]=I,x[36]=R,x[37]=o):o=x[37];let es=o,ea;return x[38]===e?ea=x[39]:(ea=e.renderDefault(e),x[38]=e,x[39]=ea),x[40]!==H||x[41]!==O||x[42]!==W||x[43]!==R._rev?(s=R._rev&&(0,D.jsx)(r.o,{onClick:H,mode:"bleed",icon:ei.TrashIcon,tooltipProps:{content:W("buttons.discard.text")},disabled:"loading"===O,loading:"loading"===O}),x[40]=H,x[41]=O,x[42]=W,x[43]=R._rev,x[44]=s):s=x[44],x[45]===C?l=x[46]:(l=(0,D.jsx)(U.dO,{onChange:P,checked:C}),x[45]=C,x[46]=l),x[47]===W?d=x[48]:(d=W("form.input.create-more.text"),x[47]=W,x[48]=d),x[49]===d?c=x[50]:(c=(0,D.jsx)(A.n,{size:1,muted:!0,children:d}),x[49]=d,x[50]=c),x[51]!==l||x[52]!==c?(u=(0,D.jsxs)(M.so,{alignItems:"center",gap:2,justifyContent:"flex-end",flexBasis:"0%",flexGrow:1,children:[l,c]}),x[51]=l,x[52]=c,x[53]=u):u=x[53],x[54]===W?m=x[55]:(m=W("buttons.create.text"),x[54]=W,x[55]=m),x[56]!==g||x[57]!==es||x[58]!==m?(p=(0,D.jsx)(r.o,{text:m,onClick:es,disabled:g,loading:g}),x[56]=g,x[57]=es,x[58]=m,x[59]=p):p=x[59],x[60]!==s||x[61]!==u||x[62]!==p?(h=(0,D.jsx)(M.az,{paddingY:5,children:(0,D.jsxs)(M.so,{paddingTop:1,gap:4,children:[s,u,p]})}),x[60]=s,x[61]=u,x[62]=p,x[63]=h):h=x[63],x[64]!==ea||x[65]!==h?(f=(0,D.jsxs)(D.Fragment,{children:[ea,h]}),x[64]=ea,x[65]=h,x[66]=f):f=x[66],f}function tt(e){return!e}let tn=["title","status","assignedTo","dueBy","target","description"],ti={month:"long",day:"2-digit",minute:"2-digit",hour:"2-digit",second:"2-digit"},to={minimal:!0,useTemporalPhrase:!0},ts=O.I4.strong.withConfig({displayName:"Strong",componentId:"sc-40ftf6-0"})`font-weight:600;`,ta=O.I4.span.withConfig({displayName:"NoWrap",componentId:"sc-40ftf6-1"})`white-space:nowrap;`;function tr(e){let t=(0,N.c)(3),n=new Date(e),o=(0,i.Mi)(ti).format(n),s=(0,p.n)(n||"",to),a;return t[0]!==o||t[1]!==s?(a={timeAgo:s,formattedDate:o},t[0]=o,t[1]=s,t[2]=a):a=t[2],a}function tl(e){let t=(0,N.c)(3),{userId:n}=e,[i,o]=(0,u.r)(n),s;return t[0]!==o||t[1]!==i?.displayName?(s=o?(0,D.jsx)(U.r5,{style:{width:"15ch"}}):(0,D.jsx)(ts,{children:i?.displayName}),t[0]=o,t[1]=i?.displayName,t[2]=s):s=t[2],s}let td={month:"short",day:"numeric",timeZone:"UTC"};function tc(e){let t=(0,N.c)(2),{date:n}
8=e,o=new Date(n),s=(0,i.Mi)(td).format(o),a;return t[0]===s?a=t[1]:(a=(0,D.jsx)(ts,{children:(0,D.jsx)(ta,{children:s})}),t[0]=s,t[1]=a),a}let tu=O.I4.span.withConfig({displayName:"LinkWrapper",componentId:"sc-40ftf6-2"})`> a{color:var(--card-fg-muted-color);text-decoration:underline;text-underline-offset:1px;font-weight:600;}`;function tm(e){let t,n=(0,N.c)(12),{target:i}=e,o=(0,s.Yt)(),a=i.document._ref,r=i.documentType,l=o.get(r),{perspectiveStack:c,selectedVariantName:u}=(0,d.nt)(),m;n[0]!==a||n[1]!==r||n[2]!==c||n[3]!==u?(m={documentId:a,documentType:r,perspectiveStack:c,variant:u},n[0]=a,n[1]=r,n[2]=c,n[3]=u,n[4]=m):m=n[4];let{isLoading:p,value:h}=(0,C.t)(m);if(p){let e;return n[5]===Symbol.for("react.memo_cache_sentinel")?(e=(0,D.jsx)(U.r5,{style:{width:"15ch"}}),n[5]=e):e=n[5],e}if(!l)return null;n[6]!==a||n[7]!==r?(t={id:a,type:r},n[6]=a,n[7]=r,n[8]=t):t=n[8];let f=h?.title,x;return n[9]!==t||n[10]!==f?(x=(0,D.jsx)(tu,{children:(0,D.jsx)(ec.RZ,{intent:"edit",params:t,children:f})}),n[9]=t,n[10]=f,n[11]=x):x=n[11],x}let tp=(0,z.memo)(function(e){let t,n,i,o,s,a=(0,N.c)(20),{activity:l}=e,{formattedDate:d,timeAgo:c}=tr(l.timestamp),u;a[0]===l?u=a[1]:(u=function(e){switch(e.field){case"status":{let t=ez.find(t=>t.value===e.to)?.title;return{text:"changed status to",icon:ez.find(t=>t.value===e.to)?.icon||(0,D.jsx)(et.CircleIcon,{}),changeTo:(0,D.jsx)(ts,{children:t})}}case"target":return e.to?{text:"set target content to",icon:(0,D.jsx)(eu.LinkIcon,{}),changeTo:(0,D.jsx)(tm,{target:e.to})}:{text:"removed target content",icon:(0,D.jsx)(eu.LinkIcon,{}),changeTo:void 0};case"dueBy":return e.from?e.to?{text:"changed the due date to",icon:(0,D.jsx)(ee.CalendarIcon,{}),changeTo:(0,D.jsx)(tc,{date:e.to})}:{text:"removed the due date",icon:(0,D.jsx)(ee.CalendarIcon,{}),changeTo:void 0}:{text:"set the due date to",icon:(0,D.jsx)(ee.CalendarIcon,{}),changeTo:(0,D.jsx)(tc,{date:e.to})};case"assignedTo":return e.to?{text:"assigned to",icon:(0,D.jsx)(ej.UserIcon,{}),changeTo:(0,D.jsx)(tl,{userId:e.to})}:{text:"unassigned this task",icon:(0,D.jsx)(ej.UserIcon,{}),changeTo:void 0};case"description":return{text:"updated the task description",icon:(0,D.jsx)(en.EditIcon,{}),changeTo:void 0};case"title":return{text:"updated the task title",icon:(0,D.jsx)(en.EditIcon,{}),changeTo:void 0};default:return{text:"",icon:(0,D.jsx)(et.CircleIcon,{})}}}(l),a[0]=l,a[1]=u);let{icon:m,text:p,changeTo:h}=u,f;return a[2]===m?f=a[3]:(f=(0,D.jsx)(M.az,{marginTop:1,marginLeft:1,marginRight:3,children:(0,D.jsx)(M.az,{marginRight:1,children:(0,D.jsx)(A.n,{children:m})})}),a[2]=m,a[3]=f),a[4]===l.author?t=a[5]:(t=(0,D.jsx)(tl,{userId:l.author}),a[4]=l.author,a[5]=t),a[6]!==d||a[7]!==c?(n=(0,D.jsx)(ta,{children:(0,D.jsx)("time",{dateTime:d,children:c})}),a[6]=d,a[7]=c,a[8]=n):n=a[8],a[9]!==d||a[10]!==n?(i=(0,D.jsx)(r.s,{content:d,placement:"top-end",children:n}),a[9]=d,a[10]=n,a[11]=i):i=a[11],a[12]!==h||a[13]!==t||a[14]!==i||a[15]!==p?(o=(0,D.jsxs)(A.n,{muted:!0,size:1,children:[t," ",p," ",h," •"," ",i]}),a[12]=h,a[13]=t,a[14]=i,a[15]=p,a[16]=o):o=a[16],a[17]!==f||a[18]!==o?(s=(0,D.jsxs)(M.so,{gap:1,children:[f,o]}),a[17]=f,a[18]=o,a[19]=s):s=a[19],s},(e,t)=>e.activity.timestamp===t.activity.timestamp),th=(0,O.I4)(M.so).withConfig({displayName:"ActivityChildrenRoot",componentId:"sc-61g8se-0"})`height:100%;`,tf=O.I4.div.withConfig({displayName:"ActivityItemChildrenContainer",componentId:"sc-61g8se-1"})`width:100%;`;function tx(e){let t,n,i,o=(0,N.c)(10),{avatarPaddingTop:s,userId:a,children:r}=e,l=void 0===s?1:s,d;return o[0]===a?d=o[1]:(d=(0,D.jsx)(eD,{user:{id:a},size:0}),o[0]=a,o[1]=d),o[2]!==l||o[3]!==d?(t=(0,D.jsx)(M.az,{marginRight:3,paddingTop:l,children:d}),o[2]=l,o[3]=d,o[4]=t):t=o[4],o[5]===r?n=o[6]:(n=(0,D.jsx)(th,{alignItems:"center",flexBasis:"0%",flexGrow:1,children:(0,D.jsx)(tf,{children:r})}),o[5]=r,o[6]=n),o[7]!==t||o[8]!==n?(i=(0,D.jsxs)(M.so,{children:[t,n]}),o[7]=t,o[8]=n,o[9]=i):i=o[9],i}function tg(e){let t,n,i=(0,N.c)(25),{mentionOptions:o,currentUser:s,onSubmit:r}=e,{mode:l}=(0,I.t)(),[d,c]=(0,z.useState)(null),u=(0,z.useRef)(null),m;i[0]===d?m=i[1]:(m=(0,y.d)(d),i[0]=d,i[1]=m);let p=m,h;i[2]===Symbol.for("react.memo_cache_sentinel")?(h=e=>{c(e)},i[2]=h):h=i[2];let f=h,x;i[3]!==p||i[4]!==r||i[5]!==d?(x=()=>{p&&(r(d),c(null))},i[3]=p,i[4]=r,i[5]=d,i[6]=x):x=i[6];let g=x,b;i[7]===Symbol.for("react.memo_cache_sentinel")?(b=()=>{u.current?.discardDialogController.close()},i[7]=b):b=i[7];let j=b,v;i[8]===Symbol.for("react.memo_cache_sentinel")?(v=()=>{u.current?.discardDialogController.close(),c(null)},i[8]=v):v=i[8];let _=v,C;i[9]===p?C=i[10]:(C=e=>{"Escape"===e.key&&(e.preventDefault(),e.stopPropagation(),p?u.current?.discardDialogController.open():(u.current?.discardDialogController.close(),c(null)))},i[9]=p,i[10]=C);let k=C,{t:T}=(0,a.t)(w.n),S="upsell"===l,B;return i[11]!==l||i[12]!==T?(B=T("upsell"===l?"panel.comment.placeholder.upsell":"panel.comment.placeholder"),i[11]=l,i[12]=T,i[13]=B):B=i[13],i[14]!==s||i[15]!==k||i[16]!==g||i[17]!==o||i[18]!==S||i[19]!==B||i[20]!==d?(t=(0,D.jsx)(R.s,{tone:"transparent",radius:3,padding:2,children:(0,D.jsx)(y.o,{withAvatar:!1,currentUser:s,expandOnFocus:!0,mentionOptions:o,onChange:f,onDiscardConfirm:_,onDiscardCancel:j,onKeyDown:k,onSubmit:g,readOnly:S,placeholder:B,ref:u,value:d})}),i[14]=s,i[15]=k,i[16]=g,i[17]=o,i[18]=S,i[19]=B,i[20]=d,i[21]=t):t=i[21],i[22]!==s.id||i[23]!==t?(n=(0,D.jsx)(tx,{userId:s.id,avatarPaddingTop:3,children:t}),i[22]=s.id,i[23]=t,i[24]=n):n=i[24],n}let ty={parentCommentAvatar:!1,threadCommentsAvatar:!0,replyAvatar:!0,avatarSize:0},tb=O.I4.div.withConfig({displayName:"CommentListItemRoot",componentId:"sc-jwxdnq-0"})(e=>{let t=(0,Q.t)(e.theme);return(0,O.AH)`[data-ui='CommentsListItem']{padding-right:${t.space[2]}px;}[data-ui='CommentInputEditableWrap']:focus-within{padding-bottom:${t.space[2]}px;}`});function tj(e){let t,n=(0,N.c)(6),{parentComment:i}=e,{mode:o}=(0,I.t)(),s=o??"default",a;return n[0]!==e||n[1]!==s?(a=(0,D.jsx)(tb,{children:(0,D.jsx)(b.t,{...e,avatarConfig:ty,canReply:!0,isSelected:!1,mode:s})}),n[0]=e,n[1]=s,n[2]=a):a=n[2],n[3]!==i.authorId||n[4]!==a?(t=(0,D.jsx)(tx,{userId:i.authorId,avatarPaddingTop:3,children:a}),n[3]=i.authorId,n[4]=a,n[5]=t):t=n[5],t}let tv=(0,O.I4)(U.r5).withConfig({displayName:"UserSkeleton",componentId:"sc-8hiju9-0"})`max-width:15ch;width:'100%';`,tw=(0,z.memo)(function(e){let t,n,i,o,s,l,d,c=(0,N.c)(22),{createdAt:m,authorId:p}=e,[h,f]=(0,u.r)(p),{timeAgo:x,formattedDate:g}=tr(m),{t:y}=(0,a.t)(w.n),b;return c[0]===Symbol.for("react.memo_cache_sentinel")?(b={fontWeight:600},c[0]=b):b=c[0],c[1]!==f||c[2]!==y||c[3]!==h?.displayName?(t=f?(0,D.jsx)(tv,{}
8):h?.displayName??y("panel.activity.unknown-user"),c[1]=f,c[2]=y,c[3]=h?.displayName,c[4]=t):t=c[4],c[5]===t?n=c[6]:(n=(0,D.jsxs)("strong",{style:b,children:[t," "]}),c[5]=t,c[6]=n),c[7]===y?i=c[8]:(i=y("panel.activity.created-fragment"),c[7]=y,c[8]=i),c[9]!==m||c[10]!==x?(o=(0,D.jsx)(ta,{children:(0,D.jsx)("time",{dateTime:m,children:x})}),c[9]=m,c[10]=x,c[11]=o):o=c[11],c[12]!==g||c[13]!==o?(s=(0,D.jsx)(r.s,{content:g,placement:"top-end",children:o}),c[12]=g,c[13]=o,c[14]=s):s=c[14],c[15]!==n||c[16]!==i||c[17]!==s?(l=(0,D.jsx)(M.so,{alignItems:"center",paddingTop:1,children:(0,D.jsxs)(A.n,{size:1,muted:!0,children:[n,i," •"," ",s]})}),c[15]=n,c[16]=i,c[17]=s,c[18]=l):l=c[18],c[19]!==p||c[20]!==l?(d=(0,D.jsx)(tx,{userId:p,children:l}),c[19]=p,c[20]=l,c[21]=d):d=c[21],d},(e,t)=>e.createdAt===t.createdAt);function tI(e){let t,n,o=(0,N.c)(13),{value:s,onChange:a,path:l,currentUserId:d}=e,c=s.subscribers?.includes(d)?"Unsubscribe":"Subscribe",u;o[0]!==d||o[1]!==a||o[2]!==l||o[3]!==s.subscribers?(u=()=>{let e=s.subscribers||[];e.includes(d)||a((0,i.Ta)(e.concat(d),l)),e.includes(d)&&a((0,i.Ta)(e.filter(e=>e!==d),l))},o[0]=d,o[1]=a,o[2]=l,o[3]=s.subscribers,o[4]=u):u=o[4];let m=u,p;return o[5]!==c||o[6]!==m?(p=(0,D.jsx)(r.o,{mode:"bleed",text:c,onClick:m}),o[5]=c,o[6]=m,o[7]=p):p=o[7],o[8]===s.subscribers?t=o[9]:(t=s.subscribers&&s.subscribers?.length>0&&(0,D.jsx)(tC,{subscriberIds:s.subscribers}),o[8]=s.subscribers,o[9]=t),o[10]!==p||o[11]!==t?(n=(0,D.jsxs)(M.so,{gap:1,alignItems:"center",children:[p,t]}),o[10]=p,o[11]=t,o[12]=n):n=o[12],n}let t_=[];function tC(e){let t,n=(0,N.c)(6),{subscriberIds:i}=e,o;n[0]===i?o=n[1]:(o=i?.filter(Boolean)||t_,n[0]=i,n[1]=o);let s=o,a;return n[2]===s?a=n[3]:(a=s.map(tk),n[2]=s,n[3]=a),n[4]===a?t=n[5]:(t=(0,D.jsx)(X.N,{initial:!1,children:(0,D.jsx)(U.GE,{maxLength:3,size:0,children:a})}),n[4]=a,n[5]=t),t}function tk(e){return(0,D.jsx)(J.PY1.div,{exit:{opacity:0,x:"2px",scale:.9},animate:{opacity:1,x:0,scale:1,transition:{type:"spring",visualDuration:.2}},initial:{opacity:0,x:"2px",scale:.9},children:(0,D.jsx)(eD,{user:{id:e},size:0})},e)}let tT=[],tS={hidden:{opacity:0,x:0},visible:{opacity:1,x:0}},tz=(0,O.I4)(J.PY1.create(A.t)).withConfig({displayName:"MotionStack",componentId:"sc-6nj0n1-0"})``;function tN(e){let t,n,o,s,r,d,c,m,p,h=(0,N.c)(79),{value:f,onChange:x,path:g,activityData:j}=e,v;h[0]===j?v=h[1]:(v=void 0===j?[]:j,h[0]=j,h[1]=v);let I=v,_=(0,u.n)(),{title:C,basePath:k,name:B}=(0,l.c)(),{comments:$,mentionOptions:U,operation:P,getComment:R}=(0,y.t)(),[E,L]=(0,z.useState)(null),[F,H]=(0,z.useState)(null),[O,Y]=(0,z.useState)(!1),G=$.loading,W=$.data.open,V;h[2]!==k||h[3]!==f._id||h[4]!==f.subscribers||h[5]!==f.title||h[6]!==B||h[7]!==C?(V=(e,t)=>{let n=new URL(`${window.location.origin}${k?`${k}/`:""}`);n.searchParams.set(S.n,"tasks"),n.searchParams.set(S.t,f?._id),n.searchParams.set(S.r,"edit"),n.searchParams.set("commentId",t);let i=(0,T.t)(e),o=Array.from(new Set([...f.subscribers||[],...i]));return{documentTitle:f.title||"Sanity task",url:n.toString(),workspaceTitle:C,workspaceName:B,subscribers:o}},h[2]=k,h[3]=f._id,h[4]=f.subscribers,h[5]=f.title,h[6]=B,h[7]=C,h[8]=V):V=h[8];let Z=V,J;h[9]!==Z||h[10]!==x||h[11]!==P?(J=async e=>{let t=(0,ed.A)(),n=Z(e,t),o={id:t,type:"task",message:e,parentCommentId:void 0,reactions:tT,status:"open",threadId:(0,ed.A)(),context:{notification:n}};x((0,i.Ta)(n.subscribers,["subscribers"])),await P.create(o)},h[9]=Z,h[10]=x,h[11]=P,h[12]=J):J=h[12];let q=J,K;h[13]!==Z||h[14]!==x||h[15]!==P?(K=async e=>{let t=(0,ed.A)(),n=Z(e.message,t);x((0,i.Ta)(n.subscribers,["subscribers"])),await P.create({id:t,type:"task",message:e.message,parentCommentId:e.parentCommentId,reactions:tT,status:"open",threadId:e.threadId,context:{notification:n}})},h[13]=Z,h[14]=x,h[15]=P,h[16]=K):K=h[16];let Q=K,ee;h[17]!==R||h[18]!==Z||h[19]!==x||h[20]!==P?(ee=async e=>{let t=R(e);if(!t)return;let n=Z(t.message,t._id);x((0,i.Ta)(n.subscribers,["subscribers"])),await P.create({type:"task",id:t._id,message:t.message,parentCommentId:t.parentCommentId,reactions:t.reactions||tT,status:t.status,threadId:t.threadId,context:{notification:n}})},h[17]=R,h[18]=Z,h[19]=x,h[20]=P,h[21]=ee):ee=h[21];let et=ee,en;h[22]===P?en=h[23]:(en=async(e,t)=>{await P.react(e,t)},h[22]=P,h[23]=en);let ei=en,eo;h[24]===Symbol.for("react.memo_cache_sentinel")?(eo=e=>L(e),h[24]=eo):eo=h[24];let es=eo,ea;h[25]===Symbol.for("react.memo_cache_sentinel")?(ea=()=>L(null),h[25]=ea):ea=h[25];let er=ea,el;h[26]===P?el=h[27]:(el=async e=>{try{Y(!0),H(null),await P.remove(e),L(null)}catch(e){H(e)}Y(!1)},h[26]=P,h[27]=el);let ec=el,eu;h[28]===P?eu=h[29]:(eu=async(e,t)=>{await P.update(e,t)},h[28]=P,h[29]=eu);let em=eu,ep;if(h[30]!==I||h[31]!==W){let e=I.map(t$),t=W.map(tB);ep=e.concat(t).sort(tD),h[30]=I,h[31]=W,h[32]=ep}else ep=h[32];let eh=ep,{t:ef}=(0,a.t)(w.n),ex;if(h[33]!==E||h[34]!==W){let e;h[36]===E?e=h[37]:(e=e=>e.parentComment?._id===E,h[36]=E,h[37]=e),ex=W.find(e),h[33]=E,h[34]=W,h[35]=ex}else ex=h[35];let eg=ex,ey=!!(eg&&eg?.replies?.length>0),eb;return h[38]!==F||h[39]!==O||h[40]!==E||h[41]!==ey||h[42]!==ec?(eb=E&&(0,D.jsx)(b.r,{commentId:E,error:F,isParent:ey,loading:O,onClose:er,onConfirm:ec}),h[38]=F,h[39]=O,h[40]=E,h[41]=ey,h[42]=ec,h[43]=eb):eb=h[43],h[44]===ef?t=h[45]:(t=ef("panel.activity.title"),h[44]=ef,h[45]=t),h[46]===t?n=h[47]:(n=(0,D.jsx)(M.az,{flexBasis:"0%",flexGrow:1,children:(0,D.jsx)(A.n,{size:2,weight:"semibold",children:t})}),h[46]=t,h[47]=n),h[48]!==_||h[49]!==x||h[50]!==g||h[51]!==f?(o=_?.id&&(0,D.jsx)(tI,{currentUserId:_.id,value:f,onChange:x,path:g}),h[48]=_,h[49]=x,h[50]=g,h[51]=f,h[52]=o):o=h[52],h[53]!==n||h[54]!==o?(s=(0,D.jsxs)(M.so,{alignItems:"center",children:[n,o]}),h[53]=n,h[54]=o,h[55]=s):s=h[55],h[56]===G?r=h[57]:(r=G&&(0,D.jsx)(u.t,{showText:!0,title:"Loading activity"}),h[56]=G,h[57]=r),h[58]!==eh||h[59]!==_||h[60]!==q||h[61]!==et||h[62]!==em||h[63]!==ei||h[64]!==Q||h[65]!==G||h[66]!==U||h[67]!==f.authorId||h[68]!==f.createdByUser?(
8d=!G&&(0,D.jsxs)(tz,{animate:"visible",initial:"hidden",gap:4,variants:tS,children:[f.createdByUser&&(0,D.jsx)(A.t,{paddingBottom:1,children:(0,D.jsx)(tw,{createdAt:f.createdByUser,authorId:f.authorId})}),_&&(0,D.jsxs)(A.t,{gap:4,marginTop:1,children:[eh.map(e=>"activity"===e._type?(0,D.jsx)(tp,{activity:e.payload},e.timestamp):(0,D.jsx)(tj,{currentUser:_,mentionOptions:U,onCreateRetry:et,onDelete:es,onEdit:em,onReactionSelect:ei,onReply:Q,parentComment:e.payload.parentComment,replies:e.payload.replies},e.payload.parentComment._id)),(0,D.jsx)(tg,{currentUser:_,mentionOptions:U,onSubmit:q})]})]}),h[58]=eh,h[59]=_,h[60]=q,h[61]=et,h[62]=em,h[63]=ei,h[64]=Q,h[65]=G,h[66]=U,h[67]=f.authorId,h[68]=f.createdByUser,h[69]=d):d=h[69],h[70]===d?c=h[71]:(c=(0,D.jsx)(X.N,{children:d}),h[70]=d,h[71]=c),h[72]!==s||h[73]!==r||h[74]!==c?(m=(0,D.jsxs)(A.t,{gap:5,children:[s,r,c]}),h[72]=s,h[73]=r,h[74]=c,h[75]=m):m=h[75],h[76]!==eb||h[77]!==m?(p=(0,D.jsxs)(D.Fragment,{children:[eb,m]}),h[76]=eb,h[77]=m,h[78]=p):p=h[78],p}function tD(e,t){return new Date(e.timestamp).getTime()-new Date(t.timestamp).getTime()}function tB(e){return{_type:"comment",payload:e,timestamp:e.parentComment._createdAt}}function t$(e){return{_type:"activity",payload:e,timestamp:e.timestamp}}let tA=(0,O.I4)(E.t).withConfig({displayName:"StyledButton",componentId:"sc-jd44oy-0"})`padding:3px 6px;`;function tU(e){let t,n,o,s,l,d,c,u=(0,N.c)(37),{value:m,onChange:p,path:h}=e,f;u[0]===Symbol.for("react.memo_cache_sentinel")?(f=["subscribers"],u[0]=f):f=u[0];let x=(0,i.Ar)(f),{mentionOptions:g}=eT(),y;u[1]!==g.data||u[2]!==m?(y=g.data?.find(e=>e.id===m),u[1]=g.data,u[2]=m,u[3]=y):y=u[3];let b=y,{t:j}=(0,a.t)(w.n),v;u[4]!==p||u[5]!==h||u[6]!==x?(v=e=>{p((0,i.Ta)(e,h)),x&&!x.includes(e)&&e&&p((0,i.Ta)([...x,e],["subscribers"]))},u[4]=p,u[5]=h,u[6]=x,u[7]=v):v=u[7];let I=v,_;e:{let e;if(m){if(g.loading){let e;u[8]===Symbol.for("react.memo_cache_sentinel")?(e=(0,D.jsx)(U.r5,{animated:!0,style:{width:"10ch"}}),u[8]=e):e=u[8],_=e;break e}if(b){_=b.displayName||b.email;break e}if(!b){let e;u[9]===j?e=u[10]:(e=j("form.input.assignee.user-not-found.text"),u[9]=j,u[10]=e),_=e;break e}}u[11]===j?e=u[12]:(e=j("form.input.assignee.no-user-assigned.text"),u[11]=j,u[12]=e),_=e}let C=_,k;return u[13]!==j||u[14]!==m?(k=j(m?"form.input.assignee.user-assigned.tooltip":"form.input.assignee.no-user-assigned.tooltip"),u[13]=j,u[14]=m,u[15]=k):k=u[15],u[16]===b?t=u[17]:(t=(0,D.jsx)(eD,{user:b,size:0}),u[16]=b,u[17]=t),u[18]===C?n=u[19]:(n=(0,D.jsx)(M.az,{children:(0,D.jsx)(A.n,{size:1,textOverflow:"ellipsis",children:C})}),u[18]=C,u[19]=n),u[20]!==t||u[21]!==n?(o=(0,D.jsxs)(M.so,{alignItems:"center",gap:2,flexBasis:"0%",flexGrow:1,children:[t,n]}),u[20]=t,u[21]=n,u[22]=o):o=u[22],u[23]!==b||u[24]!==j||u[25]!==m?(s=m&&b&&!b.granted&&(0,D.jsx)(U.Ex,{fontSize:1,children:j("form.input.assignee.unauthorized.text")}),u[23]=b,u[24]=j,u[25]=m,u[26]=s):s=u[26],u[27]!==o||u[28]!==s?(l=(0,D.jsxs)(M.so,{alignItems:"center",gap:3,children:[o,s]}),u[27]=o,u[28]=s,u[29]=l):l=u[29],u[30]!==k||u[31]!==l?(d=(0,D.jsx)(tA,{mode:"ghost",padding:0,children:(0,D.jsx)(r.s,{content:k,children:l})}),u[30]=k,u[31]=l,u[32]=d):d=u[32],u[33]!==I||u[34]!==d||u[35]!==m?(c=(0,D.jsx)(eE,{onSelect:I,value:m,menuButton:d}),u[33]=I,u[34]=d,u[35]=m,u[36]=c):c=u[36],c}let tP={dateStyle:"long",timeZone:"UTC"},tR={month:"short",day:"numeric",timeZone:"UTC"};function tE(e){let t,n,o,s,l,d,c,u=(0,N.c)(49),{value:m,onChange:p,path:x}=e,{t:g}=(0,a.t)(),{t:y}=(0,a.t)(w.n),[b,j]=(0,z.useState)(!1),I=(0,z.useRef)(null),_=(0,z.useRef)(null),C=(0,i.Mi)(tP),k=(0,i.Mi)(tR),T;e:{let e;if(!m){let e;u[0]===Symbol.for("react.memo_cache_sentinel")?(e={short:"----",full:"----"},u[0]=e):e=u[0],T=e;break e}u[1]!==C||u[2]!==m?(e=C.format(new Date(m)),u[1]=C,u[2]=m,u[3]=e):e=u[3];let t=e,n;u[4]!==k||u[5]!==m?(n=k.format(new Date(m)),u[4]=k,u[5]=m,u[6]=n):n=u[6];let i=n,o;u[7]!==t||u[8]!==i?(o={short:i,full:t},u[7]=t,u[8]=i,u[9]=o):o=u[9],T=o}let S=T,B,$;u[10]===Symbol.for("react.memo_cache_sentinel")?(B=()=>j(!1),$=()=>[I.current],u[10]=B,u[11]=$):(B=u[10],$=u[11]),(0,L.t)(B,$),u[12]===Symbol.for("react.memo_cache_sentinel")?(t=e=>{"Escape"===e.key&&j(!1)},u[12]=t):t=u[12];let A=t,U;u[13]===Symbol.for("react.memo_cache_sentinel")?(U=()=>j(tL),u[13]=U):U=u[13];let P=U,R;u[14]===g?R=u[15]:(R=(0,f.t)(g),u[14]=g,u[15]=R);let E=R,F;u[16]!==p||u[17]!==x?(F=e=>{p(e?(0,i.Ta)((0,eo.GP)(e,eo.D2),x):(0,i.Da)(x)),j(!1)},u[16]=p,u[17]=x,u[18]=F):F=u[18];let H=F,O,Y,G;if(u[19]!==m){let e;O=(0,eo.qg)(m||"",eo.D2),u[23]===Symbol.for("react.memo_cache_sentinel")?(e=()=>{_.current?.focus()},u[23]=e):e=u[23],Y=e,G=O?.date?.getFullYear(),u[19]=m,u[20]=O,u[21]=Y,u[22]=G}else O=u[20],Y=u[21],G=u[22];let W=G===new Date().getFullYear(),V;u[24]!==E||u[25]!==O.date||u[26]!==H?(V=(0,D.jsx)(f.i,{calendarLabels:E,selectTime:!1,timeStep:1,onKeyUp:A,value:O.date,onChange:H,timeZoneScope:v.i}),u[24]=E,u[25]=O.date,u[26]=H,u[27]=V):V=u[27],u[28]!==H||u[29]!==y||u[30]!==m?(n=m&&(0,D.jsx)(M.so,{justifyContent:"flex-start",padding:3,paddingTop:0,children:(0,D.jsx)(r.o,{mode:"bleed",text:y("form.input.date.buttons.remove.text"),onClick:()=>H(null),tone:"critical"})}),u[28]=H,u[29]=y,u[30]=m,u[31]=n):n=u[31],u[32]!==Y||u[33]!==V||u[34]!==n?(o=(0,D.jsx)(M.az,{overflow:"auto",children:(0,D.jsxs)(ep.Ay,{onDeactivation:Y,children:[V,n]})}),u[32]=Y,u[33]=V,u[34]=n,u[35]=o):o=u[35],u[36]===Symbol.for("react.memo_cache_sentinel")?(s=["bottom-start","bottom-end"],u[36]=s):s=u[36];let Z=W?S.short:S.full,X;return u[37]!==y||u[38]!==m?(X=y(m?"form.input.date.buttons.tooltip":"form.input.date.buttons.empty.tooltip"),u[37]=y,u[38]=m,u[39]=X):X=u[39],u[40]===X?l=u[41]:(l={content:X}
8,u[40]=X,u[41]=l),u[42]!==Z||u[43]!==l?(d=(0,D.jsx)(r.o,{icon:ee.CalendarIcon,mode:"ghost",text:Z,onClick:P,ref:_,tooltipProps:l}),u[42]=Z,u[43]=l,u[44]=d):d=u[44],u[45]!==b||u[46]!==o||u[47]!==d?(c=(0,D.jsx)(h.r,{constrainSize:!0,"data-testid":"date-input-dialog",portal:!0,ref:I,content:o,open:b,placement:"bottom",fallbackPlacements:s,children:d}),u[45]=b,u[46]=o,u[47]=d,u[48]=c):c=u[48],c}function tL(e){return!e}function tF(e){let t,n,i=(0,N.c)(22),{t:o}=(0,a.t)(w.n),s,l,d,c;if(i[0]===e?(s=i[1],l=i[2],d=i[3],c=i[4]):({ref:l,value:c,options:s,...d}=e,i[0]=e,i[1]=s,i[2]=l,i[3]=d,i[4]=c),i[5]!==s||i[6]!==c){let e;i[8]===c?e=i[9]:(e=e=>e.value===c,i[8]=c,i[9]=e),t=s.find(e),i[5]=s,i[6]=c,i[7]=t}else t=i[7];let u=t,m;i[10]===c?m=i[11]:(m=ez.find(e=>e.value===c)?.icon,i[10]=c,i[11]=m);let p=m,h;i[12]===o?h=i[13]:(h=o("form.input.status.button.tooltip"),i[12]=o,i[13]=h),i[14]===h?n=i[15]:(n={content:h},i[14]=h,i[15]=n);let f=u?.title||c,x;return i[16]!==p||i[17]!==l||i[18]!==d||i[19]!==n||i[20]!==f?(x=(0,D.jsx)(r.o,{...d,ref:l,tooltipProps:n,icon:p,text:f,tone:"default",mode:"ghost"}),i[16]=p,i[17]=l,i[18]=d,i[19]=n,i[20]=f,i[21]=x):x=i[21],x}function tH(e){let t,n,o,s=(0,N.c)(20),{value:a,onChange:l,options:d,path:c}=e,u=(0,Y.Jr)(),m;s[0]!==l||s[1]!==c||s[2]!==u||s[3]!==a?(m=e=>{l((0,i.Ta)(e,c)),u.log(S.l,{from:a,to:e})},s[0]=l,s[1]=c,s[2]=u,s[3]=a,s[4]=m):m=s[4];let p=m,h;if(s[5]!==d||s[6]!==a?(h=(0,D.jsx)(tF,{value:a,options:d}),s[5]=d,s[6]=a,s[7]=h):h=s[7],s[8]!==p||s[9]!==d||s[10]!==a){let e;s[12]!==p||s[13]!==a?(e=e=>{let t=a===e.value,n=ez.find(t=>t.value===e.value)?.icon;return(0,D.jsx)(r.r,{icon:"string"==typeof e.value&&n||et.CircleIcon,text:e.title||e.value,pressed:t,iconRight:t&&(0,D.jsx)(eh.CheckmarkIcon,{}),onClick:()=>p(e.value)},e.title)},s[12]=p,s[13]=a,s[14]=e):e=s[14],t=d.map(e),s[8]=p,s[9]=d,s[10]=a,s[11]=t}else t=s[11];return s[15]===t?n=s[16]:(n=(0,D.jsx)(em.W1,{children:t}),s[15]=t,s[16]=n),s[17]!==h||s[18]!==n?(o=(0,D.jsx)(r.i,{button:h,id:"reference-menuButton",menu:n}),s[17]=h,s[18]=n,s[19]=o):o=s[19],o}function tO(e){let t=(0,N.c)(25),{handleCloseDialog:n,handleRemove:i,removeStatus:o,showDialog:s}=e,{t:r}=(0,a.t)(w.n);if(s){let e,s,a,l,d,c,u,m;t[0]===r?e=t[1]:(e=r("dialog.remove-task.title"),t[0]=r,t[1]=e),t[2]===r?s=t[3]:(s=r("dialog.remove-task.buttons.cancel.text"),t[2]=r,t[3]=s),t[4]!==n||t[5]!==s?(a={text:s,onClick:n},t[4]=n,t[5]=s,t[6]=a):a=t[6],t[7]===r?l=t[8]:(l=r("dialog.remove-task.buttons.confirm.text"),t[7]=r,t[8]=l);let p="loading"===o,f;return t[9]!==i||t[10]!==l||t[11]!==p?(f={text:l,tone:"critical",onClick:i,loading:p},t[9]=i,t[10]=l,t[11]=p,t[12]=f):f=t[12],t[13]!==a||t[14]!==f?(d={cancelButton:a,confirmButton:f},t[13]=a,t[14]=f,t[15]=d):d=t[15],t[16]===r?c=t[17]:(c=r("dialog.remove-task.body"),t[16]=r,t[17]=c),t[18]===c?u=t[19]:(u=(0,D.jsx)(A.t,{gap:3,children:(0,D.jsx)(A.n,{as:"p",children:c})}),t[18]=c,t[19]=u),t[20]!==n||t[21]!==e||t[22]!==d||t[23]!==u?(m=(0,D.jsx)(h.n,{id:"remove-task",header:e,onClose:n,footer:d,children:u}),t[20]=n,t[21]=e,t[22]=d,t[23]=u,t[24]=m):m=t[24],m}return null}let tM=(0,O.I4)(M.so).withConfig({displayName:"FirstRow",componentId:"sc-l19a8r-0"})(e=>{let t=(0,Q.t)(e.theme);return(0,O.AH)`column-gap:${t.space[2]}px;row-gap:${t.space[3]}px;`});function tY(e){let t,n,i,o,s,l,d,c,u,m,h,f=(0,N.c)(42),{id:x,value:g}=e,{setViewMode:y,handleCopyLinkToTask:b}=(0,w.t)(),{mode:j}=(0,I.t)(),v=(0,Y.Jr)(),_;f[0]!==y||f[1]!==v?(_=()=>{y({type:"list"}),v.log(S.c)},f[0]=y,f[1]=v,f[2]=_):_=f[2];let C=_,k;f[3]!==x||f[4]!==C?(k={id:x,onRemoved:C},f[3]=x,f[4]=C,f[5]=k):k=f[5];let T=e8(k),z;f[6]!==y||f[7]!==v||f[8]!==g?(z=()=>{y({type:"duplicate",duplicateTaskValues:g}),v.log(S.a)},f[6]=y,f[7]=v,f[8]=g,f[9]=z):z=f[9];let B=z,{t:$}=(0,a.t)(w.n),A;f[10]===Symbol.for("react.memo_cache_sentinel")?(A=(0,D.jsx)(p.t,{}),f[10]=A):A=f[10],f[11]===Symbol.for("react.memo_cache_sentinel")?(t={placement:"bottom",fallbackPlacements:["bottom-end","bottom-start"]},f[11]=t):t=f[11],f[12]===$?n=f[13]:(n=$("menuitem.duplicate.text"),f[12]=$,f[13]=n),f[14]!==j||f[15]!==$?(i="upsell"===j?{content:$("menuitem.duplicate.upsell-tooltip")}:void 0,f[14]=j,f[15]=$,f[16]=i):i=f[16];let U="upsell"===j,P;return f[17]!==B||f[18]!==n||f[19]!==i||f[20]!==U?(P=(0,D.jsx)(r.r,{text:n,icon:ex.CopyIcon,onClick:B,tooltipProps:i,disabled:U}),f[17]=B,f[18]=n,f[19]=i,f[20]=U,f[21]=P):P=f[21],f[22]===$?o=f[23]:(o=$("menuitem.copylink.text"),f[22]=$,f[23]=o),f[24]!==b||f[25]!==o?(s=(0,D.jsx)(r.r,{text:o,icon:eu.LinkIcon,onClick:b}),f[24]=b,f[25]=o,f[26]=s):s=f[26],f[27]===Symbol.for("react.memo_cache_sentinel")?(l=(0,D.jsx)(em.Nj,{}),f[27]=l):l=f[27],f[28]===$?d=f[29]:(d=$("menuitem.delete.text"),f[28]=$,f[29]=d),f[30]!==T.handleOpenDialog||f[31]!==d?(c=(0,D.jsx)(r.r,{text:d,icon:ei.TrashIcon,onClick:T.handleOpenDialog,tone:"critical"}),f[30]=T.handleOpenDialog,f[31]=d,f[32]=c):c=f[32],f[33]!==s||f[34]!==c||f[35]!==P?(u=(0,D.jsx)(M.az,{paddingTop:3,children:(0,D.jsx)(r.i,{id:"edit-task-menu",button:A,popover:t,menu:(0,D.jsxs)(em.W1,{children:[P,s,l,c]})})}),f[33]=s,f[34]=c,f[35]=P,f[36]=u):u=f[36],f[37]===T?m=f[38]:(m=(0,D.jsx)(tO,{...T}),f[37]=T,f[38]=m),f[39]!==u||f[40]!==m?(h=(0,D.jsxs)(D.Fragment,{children:[u,m]}),f[39]=u,f[40]=m,f[41]=h):h=f[41],h}function tG(e){let t,n,o,s,d,m,p,h,f,g,y,b,j=(0,N.c)(52),v;j[0]===e.schemaType.fields?v=j[1]:(v=e.schemaType.fields.find(tW),j[0]=e.sc
8hemaType.fields,j[1]=v);let I=v,_=e.value,C=(0,u.n)(),{t:k}=(0,a.t)(w.n),T=function(e){let t,n,o=(0,N.c)(17),s;o[0]===Symbol.for("react.memo_cache_sentinel")?(s=[],o[0]=s):s=o[0];let[a,r]=(0,z.useState)(s),d;o[1]===Symbol.for("react.memo_cache_sentinel")?(d={apiVersion:eS},o[1]=d):d=o[1];let u=(0,l.i)(d),m=e?._id??"",p;o[2]===m?p=o[3]:(p=(0,c.l)(m),o[2]=m,o[3]=p);let h=p,f;o[4]!==u||o[5]!==h?(f=async e=>{try{if(!h)return;let t=await (0,i.la)(u,h,{tag:"sanity.studio.tasks.history",effectFormat:"mendoza",reverse:!0}),n=function(e,t,n){let i=function(e){let{_rev:t,...n}=e;return n}(e),o=[],s=i;for(let e of t){let{timestamp:t,effects:a}=e,r=a[e.documentIDs[0]];r&&r.revert&&(s=(0,W.X)(i,r.revert),n.forEach(n=>{s?.[n]!==i?.[n]&&o.push({field:n,from:s?.[n],to:i?.[n],timestamp:t,author:e.author})}),i=s)}let a=o.sort((e,t)=>e.timestamp.localeCompare(t.timestamp)),r=a.findIndex(e=>"createdByUser"===e.field);return function(e){let t=[];for(let n of e){let e=t[t.length-1];if(!e||!tn.includes(n.field)){t.push(n);continue}if(e.author===n.author&&e.field===n.field){let t=new Date(e.timestamp),i=new Date(n.timestamp);if(12e4>=Math.abs(t.getTime()-i.getTime())){e.to=n.to,e.timestamp=n.timestamp;continue}}t.push(n)}return t}(a.slice(r+1))}(e,[...t],["createdByUser","title","description","dueBy","assignedTo","status","target"]);r(n)}catch(e){console.error("Failed to fetch and parse activity log",e)}},o[4]=u,o[5]=h,o[6]=f):f=o[6];let x=f,g;o[7]!==x||o[8]!==e?(g=t=>x(e),o[7]=x,o[8]=e,o[9]=g):g=o[9];let y=(0,K.J)(g),b;return o[10]!==y||o[11]!==e._rev?(b=()=>{y(e._rev)},o[10]=y,o[11]=e._rev,o[12]=b):b=o[12],o[13]===e._rev?t=o[14]:(t=[e._rev],o[13]=e._rev,o[14]=t),(0,z.useEffect)(b,t),o[15]===a?n=o[16]:(n={changes:a},o[15]=a,o[16]=n),n}(_).changes,S;j[2]!==C||j[3]!==e||j[4]!==_.subscribers?(S=t=>{let n=_.subscribers||[];e.onChange(t),C&&(n.includes(C.id)||e.onChange((0,i.Ta)([...n,C.id],["subscribers"])))},j[2]=C,j[3]=e,j[4]=_.subscribers,j[5]=S):S=j[5];let B=S;if(!I)throw Error("Status field not found");if(!_?._id){let e;return j[6]===Symbol.for("react.memo_cache_sentinel")?(e=(0,D.jsx)(u.t,{}),j[6]=e):e=j[6],e}let $=e.value?.title,U;j[7]===Symbol.for("react.memo_cache_sentinel")?(U=["title"],j[7]=U):U=j[7],j[8]===k?t=j[9]:(t=k("form.input.title.placeholder"),j[8]=k,j[9]=t),j[10]!==B||j[11]!==$||j[12]!==t?(n=(0,D.jsx)(A.t,{flex:1,children:(0,D.jsx)(e5,{onChange:B,value:$,path:U,placeholder:t})}),j[10]=B,j[11]=$,j[12]=t,j[13]=n):n=j[13];let P=e.value?._id,E;j[14]!==P||j[15]!==_?(E=(0,D.jsx)(tY,{id:P,value:_}),j[14]=P,j[15]=_,j[16]=E):E=j[16],j[17]!==n||j[18]!==E?(o=(0,D.jsxs)(M.so,{alignItems:"flex-start",gap:3,children:[n,E]}),j[17]=n,j[18]=E,j[19]=o):o=j[19];let L=e.value?.status,F;j[20]===Symbol.for("react.memo_cache_sentinel")?(F=["status"],j[20]=F):F=j[20],j[21]!==B||j[22]!==I.type.options.list||j[23]!==L?(s=(0,D.jsx)(tH,{value:L,path:F,onChange:B,options:I.type.options.list}),j[21]=B,j[22]=I.type.options.list,j[23]=L,j[24]=s):s=j[24];let H=e.value?.assignedTo,O;j[25]===Symbol.for("react.memo_cache_sentinel")?(O=["assignedTo"],j[25]=O):O=j[25],j[26]!==B||j[27]!==H?(d=(0,D.jsx)(tU,{value:H,onChange:B,path:O}),j[26]=B,j[27]=H,j[28]=d):d=j[28];let Y=e.value?.dueBy,G;return j[29]===Symbol.for("react.memo_cache_sentinel")?(G=["dueBy"],j[29]=G):G=j[29],j[30]!==B||j[31]!==Y?(m=(0,D.jsx)(tE,{value:Y,onChange:B,path:G}),j[30]=B,j[31]=Y,j[32]=m):m=j[32],j[33]!==s||j[34]!==d||j[35]!==m?(p=(0,D.jsx)(R.s,{borderTop:!0,marginTop:3,children:(0,D.jsx)(tM,{paddingBottom:3,paddingTop:4,alignItems:"flex-start",justifyContent:"flex-start",flexWrap:"wrap",children:(0,D.jsxs)(r.n,{children:[s,d,m]})})}),j[33]=s,j[34]=d,j[35]=m,j[36]=p):p=j[36],j[37]===e?h=j[38]:(h=e.renderDefault(e),j[37]=e,j[38]=h),j[39]===Symbol.for("react.memo_cache_sentinel")?(f=["subscribers"],j[39]=f):f=j[39],j[40]!==T||j[41]!==e.onChange||j[42]!==_?(g=(0,D.jsx)(R.s,{borderTop:!0,paddingTop:4,marginTop:4,paddingBottom:6,children:(0,D.jsx)(tN,{value:_,onChange:e.onChange,path:f,activityData:T})}),j[40]=T,j[41]=e.onChange,j[42]=_,j[43]=g):g=j[43],j[44]!==g||j[45]!==_._id?(y=(0,D.jsx)(eJ,{children:(0,D.jsx)(x.dt,{documentId:_._id,documentType:"tasks.task",sortOrder:"asc",type:"task",children:g})}),j[44]=g,j[45]=_._id,j[46]=y):y=j[46],j[47]!==p||j[48]!==h||j[49]!==y||j[50]!==o?(b=(0,D.jsxs)(D.Fragment,{children:[o,p,h,y]}),j[47]=p,j[48]=h,j[49]=y,j[50]=o,j[51]=b):b=j[51],b}function tW(e){return"status"===e.name}function tV(e){let t,n=(0,N.c)(11),o=e.value,s=(0,u.n)(),a;n[0]===o.subscribers?a=n[1]:(a=o.subscribers||[],n[0]=o.subscribers,n[1]=a);let r=a,l;n[2]!==s||n[3]!==r||n[4]!==o.description?(l=e=>{if(!s||e.some(tq)||e.some(tJ))return e;let t=[...r],n=e.find(tX);n&&"set"===n.type&&"string"==typeof n.value&&!t.includes(n.value)&&t.push(n.value),t.includes(s.id
8)||t.push(s.id);let a=e.find(tZ);if(a){let e=(0,T.t)(o.description),n="set"===a.type?a.value:void 0;(0,T.t)(n).filter(t=>!e.includes(t)).forEach(e=>{t.includes(e)||t.push(e)})}return t.length!==r.length&&e.push((0,i.Ta)(t,["subscribers"])),e},n[2]=s,n[3]=r,n[4]=o.description,n[5]=l):l=n[5];let d=l,c;return n[6]===e?c=n[7]:(c=(0,D.jsx)(tG,{...e}),n[6]=e,n[7]=c),n[8]!==c||n[9]!==d?(t=(0,D.jsx)(i.m,{transform:d,children:c}),n[8]=c,n[9]=d,n[10]=t):t=n[10],t}function tZ(e){return"description"===e.path[0]&&"set"===e.type}function tX(e){return"assignedTo"===e.path[0]}function tJ(e){return"context"===e.path[0]&&"notification"===e.path[1]}function tq(e){return"subscribers"===e.path[0]}function tK(e){let t,n=(0,N.c)(38),{inputProps:o}=e,{onChange:a}=o,r=(0,ec.ks)(tQ),c;n[0]===Symbol.for("react.memo_cache_sentinel")?(c=[],n[0]=c):c=n[0];let{target:u,_id:m,context:p,_rev:h}=(0,i.Ar)(c),{title:f,basePath:x,name:g}=(0,l.c)(),y=(0,l.i)(l.n),b;n[1]===y?b=n[2]:(b=(0,er.OX)(y),n[1]=y,n[2]=b);let j=b,v=u?.document?._ref??"",w=u?.documentType??"",{perspectiveStack:I,selectedVariantName:_}=(0,d.nt)(),k;n[3]!==v||n[4]!==w||n[5]!==I||n[6]!==_?(k={documentId:v,documentType:w,perspectiveStack:I,variant:_},n[3]=v,n[4]=w,n[5]=I,n[6]=_,n[7]=k):k=n[7];let{isLoading:T,value:D}=(0,C.t)(k),B=D?.title||null,$;n[8]!==j||n[9]!==D?($=(0,Z.LG)(D?.media)?j.image(D.media).width(96).height(96).url():null,n[8]=j,n[9]=D,n[10]=$):$=n[10];let A=$;p?.notification?.url;let U=p?.notification?.url,P;n[11]!==m||n[12]!==r||n[13]!==x||n[14]!==U?(P=U&&s.O?U:function(e,t,n=""){let i=window.location.origin;t&&(i+=t),n&&(i+=`/${n}`);let o=new URL(`${i}/`);return o.searchParams.set(S.n,"tasks"),o.searchParams.set(S.t,e),o.searchParams.set(S.r,"edit"),o.toString()}(m,x,r),n[11]=m,n[12]=r,n[13]=x,n[14]=U,n[15]=P):P=n[15];let R=P,E;n[16]!==A||n[17]!==R||n[18]!==B||n[19]!==g||n[20]!==f?(E={url:R,workspaceTitle:f,targetContentImageUrl:A,targetContentTitle:B,workspaceName:g},n[16]=A,n[17]=R,n[18]=B,n[19]=g,n[20]=f,n[21]=E):E=n[21];let L=E,F;return n[22]!==h||n[23]!==p?.notification||n[24]!==v||n[25]!==w||n[26]!==L||n[27]!==a||n[28]!==T?(F=()=>{v&&w&&T||h&&((0,V.j)(p?.notification,L)||a((0,i.Ta)(L,["notification"])))},n[22]=h,n[23]=p?.notification,n[24]=v,n[25]=w,n[26]=L,n[27]=a,n[28]=T,n[29]=F):F=n[29],n[30]!==h||n[31]!==p||n[32]!==v||n[33]!==w||n[34]!==L||n[35]!==a||n[36]!==T?(t=[h,p,v,w,L,T,a],n[30]=h,n[31]=p,n[32]=v,n[33]=w,n[34]=L,n[35]=a,n[36]=T,n[37]=t):t=n[37],(0,z.useEffect)(F,t),null}function tQ(e){return"string"==typeof e.tool?e.tool:void 0}function t0(e){let t=(0,N.c)(2),n;return t[0]===e?n=t[1]:(n=(0,D.jsx)(eJ,{children:(0,D.jsx)(tK,{...e})}),t[0]=e,t[1]=n),n}let t1=e=>(0,$.MI)({type:"object",name:"target",title:"Target",components:{field:t=>(0,D.jsx)(e2,{...t,mode:e})},fields:[{name:"document",type:"crossDatasetReference",dataset:"playground",weak:!0,studioUrl:({id:e,type:t})=>`intent/edit/id=${e};type=${t}/`,to:[{type:"any_document",preview:{select:{title:"title"}}}]},{name:"documentType",type:"string",title:"Document type"},{name:"documentVersionId",type:"string",hidden:!0}]}),t2=e=>(0,$.MI)({type:"array",name:"description",title:"Description",components:{field:t=>(0,D.jsx)(eG,{...t,mode:e})},of:[{type:"block",name:"block",of:[{name:"mention",type:"object",fields:[{name:"userId",type:"string"}]}],marks:{annotations:[]},styles:[{title:"Normal",value:"normal"}],lists:[]}]});function t3(e){let t,n,i,o,a,r=(0,N.c)(23),{children:d,mode:c,addonDataset:u}=e,m;r[0]===Symbol.for("react.memo_cache_sentinel")?(m={apiVersion:eS},r[0]=m):m=r[0];let p=(0,l.i)(m),h;r[1]===p?h=r[2]:(h=p.config(),r[1]=p,r[2]=h);let f=h.apiHost,g=(0,l.o)(),y=`addon-dataset-${u}`,b=g.projectId,j;r[3]===c?j=r[4]:(j=(0,$.U8)({type:"document",name:"tasks.task",liveEdit:!0,components:{input:"edit"===c?tV:te},fields:[{type:"string",title:"Title",name:"title",placeholder:"Task title",components:{field:e6},hidden:"edit"===c},..."edit"===c?[t1(c),t2(c)]:[t2(c),t1(c)],{type:"string",name:"assignedTo",title:"Assign to",placeholder:"Select assignee",components:{field:eZ,input:eF},hidden:"edit"===c},{type:"date",name:"dueBy",title:"Deadline",placeholder:"yyyy-mm-dd",components:{field:eZ},hidden:"edit"===c},{type:"string",name:"authorId",hidden:!0},{type:"string",name:"createdByUser",hidden:!0},{type:"array",of:[{type:"string"}],name:"subscribers",hidden:!0},{type:"string",name:"status",title:"Status",options:{list:ez.map(e=>({value:e.value,title:e.title}))},hidden:!0},{type:"object",name:"context",components:{field:t0},fields:[{type:"object",name:"notification",fields:[{type:"string",name:"url"},{type:"string",name:"workspaceTitle"},{type:"string",name:"targetContentImageUrl"},{type:"string",name:"targetContentTitle"}]}]}]}),r[3]=c,r[4]=j),r[5]===j?t=r[6]:(t={types:[j]},r[5]=j,r[6]=t),r[7]!==u||r[8]!==f||r[9]!==g.projectId||r[10]!==y||r[11]!==t?(n={basePath:"",dataset:u,name:y,projectId:b,apiHost:f,schema:t},r[7]=u,r[8]=f,r[9]=g.projectId,r[10]=y,r[11]=t,r[12]=n):n=r[12];let v=n,w;r[13]===v?w=r[14]:(w=(0,x.w)(v,{basePath:""}),r[13]=v,r[14]=w);let{workspaces:I}=w,_=(0,x.n)(I[0]);return _?(r[15]===d?i=r[16]:(i=(0,D.jsx)(s.p,{children:d}),r[15]=d,r[16]=i),r[17]!==_.unstable_sources[0]||r[18]!==i?(o=(0,D.jsx)(l.a,{source:_.unstable_sources[0],children:i}),r[17]=_.unstable_sources[0],r[18]=i,r[19]=o):o=r[19],r[20]!==_||r[21]!==o?(a=(0,D.jsx)(l.s,{workspace:_,children:o}),r[20]=_,r[21]=o,r[22]=a):a=r[22],a):null}function t4(e){let t,n=(0,N.c)(11),{client:i,ready:o,createAddonDataset:s}=(0,j.t)(),a;n[0]===i?a=n[1]:(a=i?.config().dataset,n[0]=i,n[1]=a);let r=a,l,d;if(n[2]!==r||n[3]!==s||n[4]!==o?(l=()=>{!r&&o&&s()},d=[r,o,s],n[2]=r,n[3]=s,n[4]=o,n[5]=l,n[6]=d):(l=n[5],d=n[6]),(0,z.useEffect)(l,d),!r){let e;return n[7]===Symbol.for("react.memo_cache_sentinel")?(e=(0,D.jsx)(u.t,{}),n[7]=e):e=n[7],e}return n[8]!==r||n[9]!==e?(t=(0,D.jsx)(t3,{...e,addonDataset:r}),n[8]=r,n[9]=e,n[10]=t):t=n[10],t}let t5={hidden:{opacity:0}
8,visible:{opacity:1,transition:{duration:.2,delay:.2}}},t6=(0,O.I4)(J.PY1.div).withConfig({displayName:"FormBuilderRoot",componentId:"sc-za1buc-0"})(e=>{let t=(0,Q.t)(e.theme);return`
9    // Update spacing for the form builder
10    & > [data-ui='Stack'] {
11      grid-gap: ${(0,F.a)(t.space[4])};
12    }
13`}),t7=e=>{let t,n,o=(0,N.c)(25),{documentId:s,initialValue:a}=e,[r]=(0,z.useState)(t9),l;o[0]===a?l=o[1]:(l=a?{loading:!1,value:a,error:null}:void 0,o[0]=a,o[1]=l),o[2]!==s||o[3]!==l?(t={documentId:s,documentType:"tasks.task",initialValue:l},o[2]=s,o[3]=l,o[4]=t):t=o[4];let{formState:d,onChange:c,onPathOpen:m,onFocus:p,onBlur:h,onSetActiveFieldGroup:f,onSetCollapsedFieldSet:g,onSetCollapsedPath:y,collapsedFieldSets:b,ready:j,collapsedPaths:v,schemaType:w,value:I}=(0,x.a)(t),_=null===d||!j,{setSelectedDocument:C}=eT(),k=_?void 0:I?.target,T=k?.document?._ref,S=k?.documentType,B,$;return o[5]!==C||o[6]!==T||o[7]!==S?(B=()=>{C(T&&S?{_id:T,_type:S}:null)},$=[T,S,C],o[5]=C,o[6]=T,o[7]=S,o[8]=B,o[9]=$):(B=o[8],$=o[9]),(0,z.useEffect)(B,$),o[10]!==b||o[11]!==v||o[12]!==d||o[13]!==_||o[14]!==h||o[15]!==c||o[16]!==p||o[17]!==m||o[18]!==f||o[19]!==g||o[20]!==y||o[21]!==r||o[22]!==w||o[23]!==I?(n=(0,D.jsx)(M.az,{children:_?(0,D.jsx)(u.t,{showText:!0}):(0,D.jsx)(t6,{id:"wrapper",initial:"hidden",animate:"visible",variants:t5,children:(0,D.jsx)(i.h,{__internal_patchChannel:r,id:"root",onChange:c,onPathFocus:p,onPathOpen:m,onPathBlur:h,onFieldGroupSelect:f,onSetFieldSetCollapsed:g,onSetPathCollapsed:y,collapsedPaths:v,collapsedFieldSets:b,focusPath:d.focusPath,changed:d.changed,focused:d.focused,groups:d.groups,validation:d.val
13idation,members:d.members,presence:d.presence,schemaType:w,value:I,hasUpstreamVersion:!1,hasBaseVariant:!1})})}),o[10]=b,o[11]=v,o[12]=d,o[13]=_,o[14]=h,o[15]=c,o[16]=p,o[17]=m,o[18]=f,o[19]=g,o[20]=y,o[21]=r,o[22]=w,o[23]=I,o[24]=n):n=o[24],n};function t8(){let e,t=(0,N.c)(23),n=(0,u.n)(),{activeDocument:o}=(0,k.t)(),{dataset:s,projectId:a}=(0,l.c)(),{state:r}=(0,w.t)(),{selectedTask:d,viewMode:c,duplicateTaskValues:m}=r,p;e:{if(!n||!d){p=void 0;break e}if("duplicate"===c){let e=`${m?.title} (copy)`,i;t[0]!==n.id||t[1]!==m||t[2]!==d||t[3]!==e?(i={...m,title:e,createdByUser:void 0,_id:d,_type:"tasks.task",authorId:n.id,status:"open"},t[0]=n.id,t[1]=m,t[2]=d,t[3]=e,t[4]=i):i=t[4],p=i;break e}if("create"===c){let e,i,r;t[5]===n.id?e=t[6]:(e=[n.id],t[5]=n.id,t[6]=e),t[7]!==o||t[8]!==s||t[9]!==a?(i=o?(0,T.r)({documentId:o.documentId,documentType:o.documentType,dataset:s,projectId:a}):void 0,t[7]=o,t[8]=s,t[9]=a,t[10]=i):i=t[10],t[11]!==n.id||t[12]!==d||t[13]!==e||t[14]!==i?(r={_id:d,_type:"tasks.task",authorId:n.id,status:"open",subscribers:e,target:i},t[11]=n.id,t[12]=d,t[13]=e,t[14]=i,t[15]=r):r=t[15],p=r;break e}p=void 0}let h=p;if(!n){let e;return t[16]===Symbol.for("react.memo_cache_sentinel")?(e=(0,D.jsx)(u.t,{showText:!0,title:"Loading current user"}),t[16]=e):e=t[16],e}if(!d)return null;let f="edit"===c?"edit":"create",x;return t[17]!==h||t[18]!==d?(x=(0,D.jsx)(t7,{documentId:d,initialValue:h}),t[17]=h,t[18]=d,t[19]=x):x=t[19],t[20]!==f||t[21]!==x?(e=(0,D.jsx)(ek,{children:(0,D.jsx)(i.t,{selectedPerspectiveName:void 0,children:(0,D.jsx)(t4,{mode:f,children:x})})}),t[20]=f,t[21]=x,t[22]=e):e=t[22],e}function t9(){return(0,i.pr)()}let ne={open:{assigned:{heading:"empty-state.status.list.open.assigned.heading",text:"empty-state.status.list.open.assigned.text"},document:{heading:"empty-state.status.list.open.document.heading",text:""},subscribed:{heading:"empty-state.status.list.open.subscribed.heading",text:"empty-state.status.list.open.subscribed.text"}},closed:{assigned:{heading:"empty-state.status.list.closed.assigned.heading",text:"empty-state.status.list.closed.assigned.text"},document:{heading:"empty-state.status.list.closed.document.heading",text:""},subscribed:{heading:"empty-state.status.list.closed.subscribed.heading",text:"empty-state.status.list.closed.subscribed.text"}}};function nt(e){let t,n,i,o,s=(0,N.c)(13),{status:r}=e,{state:l}=(0,w.t)(),{activeTabId:d}=l,{t:c}=(0,a.t)(w.n),{heading:u,text:m}=ne[r][d],p;return s[0]!==u||s[1]!==c?(p=c(u),s[0]=u,s[1]=c,s[2]=p):p=s[2],s[3]===p?t=s[4]:(t=(0,D.jsx)(A.n,{size:1,weight:"semibold",children:p}),s[3]=p,s[4]=t),s[5]!==c||s[6]!==m?(n=c(m),s[5]=c,s[6]=m,s[7]=n):n=s[7],s[8]===n?i=s[9]:(i=(0,D.jsx)(A.n,{size:1,children:n}),s[8]=n,s[9]=i),s[10]!==t||s[11]!==i?(o=(0,D.jsxs)(A.t,{gap:3,children:[t,i]}),s[10]=t,s[11]=i,s[12]=o):o=s[12],o}let nn={assigned:{heading:"empty-state.list.assigned.heading",text:"empty-state.list.assigned.text"},subscribed:{heading:"empty-state.list.subscribed.heading",text:"empty-state.list.subscribed.text"},document:{heading:"empty-state.list.document.heading",text:"empty-state.list.document.text"},noActiveDocument:{heading:"empty-state.list.no-active-document.heading",text:"empty-state.list.no-active-document.text"}},ni=O.I4.div.withConfig({displayName:"Root",componentId:"sc-5ai503-0"})`max-width:268px;margin:0 auto;height:100%;margin-top:40%;`,no=(0,O.I4)(A.n).withConfig({displayName:"AnimatedText",componentId:"sc-5ai503-1"})`@keyframes fadeIn{from{opacity:0;}to{opacity:1;}}animation:fadeIn 0.2s ease-in-out;`;function ns(){let e,t,n,i,o,s=(0,N.c)(22),{activeDocument:l}=(0,k.t)(),{mode:d}=(0,I.t)(),{state:c,setViewMode:u}=(0,w.t)(),{activeTabId:m}=c,p=l||"document"!==m?m:"noActiveDocument",{heading:h,text:f}=nn[p],{t:x}=(0,a.t)(w.n),g;s[0]===u?g=s[1]:(g=()=>{u({type:"create"})},s[0]=u,s[1]=g);let y=g,b;return s[2]!==h||s[3]!==x?(b=x(h),s[2]=h,s[3]=x,s[4]=b):b=s[4],s[5]!==p||s[6]!==b?(e=(0,D.jsx)(no,{size:1,weight:"semibold",children:b},p),s[5]=p,s[6]=b,s[7]=e):e=s[7],s[8]!==x||s[9]!==f?(t=x(f),s[8]=x,s[9]=f,s[10]=t):t=s[10],s[11]!==p||s[12]!==t?(n=(0,D.jsx)(M.az,{paddingBottom:6,paddingTop:1,children:(0,D.jsx)(no,{size:1,align:"center",children:t},p)}),s[11]=p,s[12]=t,s[13]=n):n=s[13],s[14]!==y||s[15]!==d||s[16]!==x?(i="upsell"!==d&&(0,D.jsx)(r.o,{icon:ef.AddIcon,text:x("empty-state.list.create-new"),onClick:y}
13),s[14]=y,s[15]=d,s[16]=x,s[17]=i):i=s[17],s[18]!==e||s[19]!==n||s[20]!==i?(o=(0,D.jsx)(ni,{children:(0,D.jsxs)(M.so,{flexDirection:"column",gap:3,alignItems:"center",flexBasis:"0%",flexGrow:1,justifyContent:"center",children:[e,n,i]})}),s[18]=e,s[19]=n,s[20]=i,s[21]=o):o=s[21],o}let na=(0,O.I4)(ec.RZ).withConfig({displayName:"StyledIntentLink",componentId:"sc-m8b76i-0"})(e=>`
14  text-decoration: underline;
15  text-decoration-color: ${(0,Q.t)(e.theme).color.input.default.enabled.border};
16  text-underline-offset: 2px;
17`);function nr(e){let t,n,i=(0,N.c)(13),{documentId:o,documentType:a}=e,r=(0,s.Yt)().get(a),{perspectiveStack:l,selectedVariantName:c}=(0,d.nt)(),u;i[0]!==o||i[1]!==a||i[2]!==l||i[3]!==c?(u={documentId:o,documentType:a,perspectiveStack:l,variant:c},i[0]=o,i[1]=a,i[2]=l,i[3]=c,i[4]=u):u=i[4];let{isLoading:m,value:p}=(0,C.t)(u),h;i[5]!==o||i[6]!==a?(h=function(e){let{ref:t,...n}=e;return(0,D.jsx)(na,{...n,intent:"edit",params:{id:o,type:a},ref:t})},i[5]=o,i[6]=a,i[7]=h):h=i[7];let f=h;return r?(i[8]===Symbol.for("react.memo_cache_sentinel")?(t=(0,D.jsx)(A.n,{size:1,children:(0,D.jsx)(es.DocumentIcon,{})}),i[8]=t):t=i[8],i[9]!==f||i[10]!==m||i[11]!==p?.title?(n=(0,D.jsxs)(M.so,{alignItems:"center",gap:2,children:[t,m?(0,D.jsx)(U.r5,{size:1,muted:!0}):(0,D.jsx)(A.n,{size:1,as:f,weight:"medium",style:{maxWidth:"20ch"},textOverflow:"ellipsis",children:p?.title||"Untitled"})]}),i[9]=f,i[10]=m,i[11]=p?.title,i[12]=n):n=i[12],n):null}function nl(e){let t=(0,N.c)(7),n=e7(),{documentId:i,status:o}=e,[s,a]=(0,z.useState)("closed"===o),[r,l]=(0,z.useState)(!1),d;t[0]!==i||t[1]!==n?(d=async e=>{let t=e.target.checked;a(t),l(!0);try{t?await n.edit(i,{status:"closed"}):t||await n.edit(i,{status:"open"})}catch(e){console.error("An error occurred while updating the task status",e)}l(!1)},t[0]=i,t[1]=n,t[2]=d):d=t[2];let c=d,u;return t[3]!==s||t[4]!==c||t[5]!==r?(u=(0,D.jsx)(M.so,{children:r?(0,D.jsx)("div",{style:{height:"17px",width:"17px"},children:(0,D.jsx)(E.n,{style:{marginLeft:"3.5px",marginRight:"3.5px",marginTop:"3.5px"}})}):(0,D.jsx)(U.Sc,{onChange:c,checked:s,disabled:r})}),t[3]=s,t[4]=c,t[5]=r,t[6]=u):u=t[6],u}let nd=(0,O.I4)(E.t).withConfig({displayName:"TitleButton",componentId:"sc-r4h1w5-0"})`width:100%;max-width:100%;`,nc=(0,O.I4)(M.so).withConfig({displayName:"TaskDetailsRoot",componentId:"sc-r4h1w5-1"})`margin-left:29px;`,nu={dateStyle:"medium",timeZone:"UTC"},nm={month:"short",day:"numeric",timeZone:"UTC"},np={weekday:"long",timeZone:"UTC"};function nh(e){let t,n,o,s=(0,N.c)(24),{dueBy:a}=e,l=(0,i.Mi)(nu),d=(0,i.Mi)(nm),c=(0,i.Mi)(np),u,m,p,h,f;if(s[0]!==c||s[1]!==a||s[2]!==l||s[3]!==d){let e=new Date(a);u=l.format(e),m=d.format(e),p=c.format(e),h=(0,eC.r)((0,ev.w)(e,e),(0,ew.A)(e)),f=function(e,t,n){let[i,o]=(0,eI.x)(n?.in,e,t);return+(0,e_.k)(i,n)==+(0,e_.k)(o,n)}((0,ev.w)(e,e),(0,ew.A)(e),{...void 0,weekStartsOn:1}),s[0]=c,s[1]=a,s[2]=l,s[3]=d,s[4]=u,s[5]=m,s[6]=p,s[7]=h,s[8]=f}else u=s[4],m=s[5],p=s[6],h=s[7],f=s[8];s[9]!==u||s[10]!==m||s[11]!==p||s[12]!==h||s[13]!==f?(t={fullDate:u,monthAndDay:m,day:p,isDueByToday:h,isDueThisWeek:f},s[9]=u,s[10]=m,s[11]=p,s[12]=h,s[13]=f,s[14]=t):t=s[14];let{fullDate:x,monthAndDay:g,day:y,isDueByToday:b,isDueThisWeek:j}=t,v=b?"critical":"transparent",w=b?"Today":j?y:g,I;return s[15]!==a||s[16]!==w?(I=(0,D.jsx)(M.so,{alignItems:"center",gap:2,children:(0,D.jsx)(A.n,{as:"time",size:1,dateTime:a,muted:!0,children:w})}),s[15]=a,s[16]=w,s[17]=I):I=s[17],s[18]!==v||s[19]!==I?(n=(0,D.jsx)(R.s,{tone:v,padding:1,radius:2,children:I}),s[18]=v,s[19]=I,s[20]=n):n=s[20],s[21]!==x||s[22]!==n?(o=(0,D.jsx)(r.s,{content:x,children:n}),s[21]=x,s[22]=n,s[23]=o):o=s[23],o}function nf(e){let t,n,i,o,s,a,r=(0,N.c)(24),{assignedTo:l,title:d,dueBy:c,target:u,onSelect:m,documentId:p,status:h}=e,f;r[0]===u?f=r[1]:(f=function(e){if(e?.document?._ref)return{_ref:e?.document._ref,_type:e?.documentType}}(u),r[0]=u,r[1]=f);let x=f,g;r[2]!==p||r[3]!==h?(g=(0,D.jsx)(M.az,{children:(0,D.jsx)(nl,{documentId:p,status:h})}),r[2]=p,r[3]=h,r[4]=g):g=r[4];let y=d||"Untitled",b;return r[5]===y?b=r[6]:(b=(0,D.jsx)(A.n,{size:1,textOverflow:"ellipsis",weight:"semibold",children:y}),r[5]=y,r[6]=b),r[7]!==m||r[8]!==b?(t=(0,D.jsx)(M.so,{flexBasis:"0%",flexGrow:1,children:(0,D.jsx)(nd,{onClick:m,mode:"bleed",padding:2,children:b})}),r[7]=m,r[8]=b,r[9]=t):t=r[9],r[10]===l?n=r[11]:(n=l?{id:l}:void 0,r[10]=l,r[11]=n),r[12]===n?i=r[13]:(i=(0,D.jsx)(eD,{user:n,withTooltip:!0}),r[12]=n,r[13]=i),r[14]!==g||r[15]!==t||r[16]!==i?(o=(0,D.jsxs)(M.so,{alignItems:"center",gap:1,children:[g,t,i]}
17),r[14]=g,r[15]=t,r[16]=i,r[17]=o):o=r[17],r[18]!==c||r[19]!==x?(s=(c||x)&&(0,D.jsxs)(nc,{alignItems:"center",gap:2,paddingX:0,children:[c&&(0,D.jsx)(nh,{dueBy:c}),x&&(0,D.jsx)(M.az,{marginLeft:1,children:(0,D.jsx)(nr,{documentId:x._ref,documentType:x._type})})]}),r[18]=c,r[19]=x,r[20]=s):s=r[20],r[21]!==o||r[22]!==s?(a=(0,D.jsxs)(A.t,{gap:3,"data-testid":"tasks-list-item",children:[o,s]}),r[21]=o,r[22]=s,r[23]=a):a=r[23],a}let nx=[],ng=(0,O.I4)(M.so).withConfig({displayName:"DetailsFlex",componentId:"sc-sodwgc-0"})`[data-ui='summary-icon']{transition:transform 0.2s;transform:rotate(-90deg);}&[open] [data-ui='summary-icon']{transform:rotate(0);}> summary::-webkit-details-marker{display:none;}`,ny=(0,O.I4)(M.az).withConfig({displayName:"SummaryBox",componentId:"sc-sodwgc-1"})`list-style:none;`;function nb(e){let t,n,i,o,s,a,r=(0,N.c)(17),{status:l,tasks:d,onTaskSelect:c}=e,u="open"===l,m;return r[0]===l?m=r[1]:(m=ez.find(e=>e.value===l)?.title,r[0]=l,r[1]=m),r[2]===m?t=r[3]:(t=(0,D.jsx)(A.n,{size:1,weight:"medium",muted:!0,children:m}),r[2]=m,r[3]=t),r[4]===Symbol.for("react.memo_cache_sentinel")?(n=(0,D.jsx)(A.n,{muted:!0,size:1,children:(0,D.jsx)(el.ChevronDownIcon,{"data-ui":"summary-icon"})}),r[4]=n):n=r[4],r[5]===t?i=r[6]:(i=(0,D.jsx)(ny,{forwardedAs:"summary",paddingY:1,children:(0,D.jsxs)(M.so,{alignItems:"center",gap:1,paddingY:1,children:[t,n]})}),r[5]=t,r[6]=i),r[7]!==c||r[8]!==l||r[9]!==d?(o=d?.length>0?d.map((e,t)=>{let n=t<d.length-1;return(0,D.jsxs)(z.Fragment,{children:[(0,D.jsx)(nf,{documentId:e._id,title:e.title,dueBy:e.dueBy,assignedTo:e.assignedTo,target:e.target,onSelect:()=>c(e._id),status:e.status}),n&&(0,D.jsx)(em.Nj,{})]},e._id)}):(0,D.jsx)(nt,{status:l}),r[7]=c,r[8]=l,r[9]=d,r[10]=o):o=r[10],r[11]===o?s=r[12]:(s=(0,D.jsx)(A.t,{gap:4,marginTop:3,paddingBottom:5,children:o}),r[11]=o,r[12]=s),r[13]!==u||r[14]!==i||r[15]!==s?(a=(0,D.jsxs)(ng,{forwardedAs:"details",flexDirection:"column",open:u,children:[i,s]}),r[13]=u,r[14]=i,r[15]=s,r[16]=a):a=r[16],a}function nj(e){let t=(0,N.c)(8),{items:n,onTaskSelect:i}=e,o=void 0===n?nx:n,s;t[0]===o?s=t[1]:(s=o.reduce(nv,{}),t[0]=o,t[1]=s);let a=s,r=a.open?.length>0,l=a.closed?.length>0,d;return t[2]!==l||t[3]!==r||t[4]!==i||t[5]!==a.closed||t[6]!==a.open?(d=(0,D.jsx)(A.t,{gap:4,flex:1,children:r||l?(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(nb,{status:"open",tasks:a.open,onTaskSelect:i}),(0,D.jsx)(nb,{status:"closed",tasks:a.closed,onTaskSelect:i})]}):(0,D.jsx)(ns,{})}),t[2]=l,t[3]=r,t[4]=i,t[5]=a.closed,t[6]=a.open,t[7]=d):d=t[7],d}function nv(e,t){return e[t.status]||(e[t.status]=[]),e[t.status].push(t),e}function nw(){let e,t=(0,N.c)(4),{upsellData:n,telemetryLogs:i}=(0,x.E)(),{panelPrimaryClicked:o,panelSecondaryClicked:s}=i;return n?(t[0]!==n||t[1]!==o||t[2]!==s?(e=(0,D.jsx)(U.mc,{width:1,children:(0,D.jsx)(M.az,{marginBottom:6,children:(0,D.jsx)(_.t,{data:n,onPrimaryClick:o,onSecondaryClick:s})})}),t[0]=n,t[1]=o,t[2]=s,t[3]=e):e=t[3],e):null}let nI={marginLeft:"-0.5em",justifyContent:"space-between",display:"flex"};function n_(e){let t,n,i,o,s,l,d=(0,N.c)(22),{activeTabId:c,onChange:u}=e,{t:m}=(0,a.t)(w.n),p;d[0]===m?p=d[1]:(p=m("tab.assigned.label"),d[0]=m,d[1]=p),d[2]===p?t=d[3]:(t={id:"assigned",label:p},d[2]=p,d[3]=t),d[4]===m?n=d[5]:(n=m("tab.subscribed.label"),d[4]=m,d[5]=n),d[6]===n?i=d[7]:(i={id:"subscribed",label:n},d[6]=n,d[7]=i),d[8]===m?o=d[9]:(o=m("tab.document.label"),d[8]=m,d[9]=o),d[10]===o?s=d[11]:(s={id:"document",label:o},d[10]=o,d[11]=s),d[12]!==t||d[13]!==i||d[14]!==s?(l=[t,i,s],d[12]=t,d[13]=i,d[14]=s,d[15]=l):l=d[15];let h=l,f;d[16]===u?f=d[17]:(f=e=>{u(e.id)},d[16]=u,d[17]=f);let x=f,g;return d[18]!==c||d[19]!==x||d[20]!==h?(g=(0,D.jsx)(U.wb,{gap:2,style:nI,children:h.map(e=>(0,D.jsx)(r.t,{"aria-controls":`${e.id}-panel`,id:`${e.id}-tab`,onClick:()=>x(e),selected:e.id===c,children:(0,D.jsx)(A.n,{size:1,weight:"medium",children:e.label})},`${e.id}-tab`))}),d[18]=c,d[19]=x,d[20]=h,d[21]=g):g=d[21],g}let nC=O.I4.div.withConfig({displayName:"Divider",componentId:"sc-7w8glf-0"})(e=>`
18    height: 25px;
19    width: 1px;
20    background-color: ${(0,Q.t)(e.theme).color.input.default.enabled.border};
21  `);function nk(e){let t,n,i,o,s,l,d,c,u,m,p=(0,N.c)(41),{items:h}=e,{state:f,setViewMode:x}=(0,w.t)(),{selectedTask:g}=f,y,b;if(p[0]!==h||p[1]!==g){let e;y=h.filter(nT),p[4]===g?e=p[5]:(e=e=>e._id===g,p[4]=g,p[5]=e),b=y.findIndex(e),p[0]=h,p[1]=g,p[2]=y,p[3]=b}else y=p[2],b=p[3];let j=b,v;p[6]!==j||p[7]!==y||p[8]!==x?(v=()=>{x({type:"edit",id:j>0?y[j-1]._id:y[y.length-1]._id})},p[6]=j,p[7]=y,p[8]=x,p[9]=v):v=p[9];let I=v,_;p[10]!==j||p[11]!==y||p[12]!==x?(_=()=>{x({type:"edit",id:j<y.length-1?y[j+1]._id:y[0]._id})},p[10]=j,p[11]=y,p[12]=x,p[13]=_):_=p[13];let C=_,{t:k}=(0,a.t)(w.n);if(!y.length)return null;p[14]===k?t=p[15]:(t=k("buttons.previous.tooltip"),p[14]=k,p[15]=t),p[16]===t?n=p[17]:(n={content:t},p[16]=t,p[17]=n),p[18]!==I||p[19]!==n?(i=(0,D.jsx)(r.o,{tooltipProps:n,mode:"bleed",icon:eg.ChevronLeftIcon,onClick:I}),p[18]=I,p[19]=n,p[20]=i):i=p[20],p[21]===k?o=p[22]:(o=k("panel.navigation.tooltip"),p[21]=k,p[22]=o);let T=j+1,S;return p[23]!==y.length||p[24]!==T?(S=(0,D.jsx)(M.az,{paddingY:2,children:(0,D.jsxs)(A.n,{size:1,children:[T," / ",y.length]})}),p[23]=y.length,p[24]=T,p[25]=S):S=p[25],p[26]!==o||p[27]!==S?(s=(0,D.jsx)(r.s,{content:o,children:S}),p[26]=o,p[27]=S,p[28]=s):s=p[28],p[29]===k?l=p[30]:(l=k("buttons.next.tooltip"),p[29]=k,p[30]=l),p[31]===l?d=p[32]:(d={content:l},p[31]=l,p[32]=d),p[33]!==C||p[34]!==d?(c=(0,D.jsx)(r.o,{tooltipProps:d,mode:"bleed",icon:ea.ChevronRightIcon,onClick:C}),p[33]=C,p[34]=d,p[35]=c):c=p[35],p[36]===Symbol.for("react.memo_cache_sentinel")?(u=(0,D.jsx)(nC,{}),p[36]=u):u=p[36],p[37]!==c||p[38]!==i||p[39]!==s?(m=(0,D.jsx)(r.n,{children:(0,D.jsxs)(M.so,{gap:1,alignItems:"center",children:[i,s,c,u]})}),p[37]=c,p[38]=i,p[39]=s,p[40]=m):m=p[40],m}function nT(e){return"open"===e.status}let nS={constrainSize:!0,fallbackPlacements:["bottom-end"],placement:"bottom-end",portal:!0},nz=(0,O.I4)(em.W1).withConfig({displayName:"StyledMenu",componentId:"sc-w1zuan-0"})`width:220px;`;function nN(e){let t=(0,N.c)(8),{isSelected:n,item:i,onSelect:o}=e,s;t[0]!==i._id||t[1]!==o?(s=()=>{o(i._id)},t[0]=i._id,t[1]=o,t[2]=s):s=t[2];let a=s,l=n?eh.CheckmarkIcon:void 0,d=i.title||"Untitled",c;return t[3]!==a||t[4]!==l||t[5]!==n||t[6]!==d?(c=(0,D.jsx)(r.r,{iconRight:l,onClick:a,pressed:n,selected:n,text:d}),t[3]=a,t[4]=l,t[5]=n,t[6]=d,t[7]=c):c=t[7],c}function nD(){let e,t,n,o,s,l=(0,N.c)(20),{data:d}=(0,k.t)(),{state:c,setViewMode:m}=(0,w.t)(),{viewMode:p,selectedTask:h}=c,f=(0,u.n)(),x=f?.id?d.filter(e=>{let t=e.authorId===f.id,n=!e.createdByUser,i=e._updatedAt!==e._createdAt,o="create"!==p||e._id!==h;return t&&n&&o&&i}):i.jr,g;l[0]===m?g=l[1]:(g=e=>{m({type:"draft",id:e})},l[0]=m,l[1]=g);let y=g,{t:b}=(0,a.t)(w.n);if(!x.length)return null;let j=r.i,v;l[2]===b?v=l[3]:(v=b("buttons.draft.text"),l[2]=b,l[3]=v),l[4]===v?t=l[5]:(t=(0,D.jsx)(r.o,{text:v,mode:"ghost",iconRight:el.ChevronDownIcon}
21),l[4]=v,l[5]=t),l[6]===b?e=l[7]:(e=b("panel.drafts.title"),l[6]=b,l[7]=e),l[8]===e?n=l[9]:(n=(0,D.jsx)(M.az,{padding:3,children:(0,D.jsx)(A.n,{size:1,weight:"semibold",children:e})}),l[8]=e,l[9]=n),l[10]===Symbol.for("react.memo_cache_sentinel")?(o=(0,D.jsx)(em.Nj,{}),l[10]=o):o=l[10];let I=x?.map(e=>(0,D.jsx)(nN,{isSelected:h===e._id,item:e,onSelect:y},e._id)),_;return l[11]!==nz||l[12]!==n||l[13]!==o||l[14]!==I?(_=(0,D.jsxs)(nz,{children:[n,o,I]}),l[11]=nz,l[12]=n,l[13]=o,l[14]=I,l[15]=_):_=l[15],l[16]!==j||l[17]!==t||l[18]!==_?(s=(0,D.jsx)(j,{button:t,id:"edit-task-menu",menu:_,popover:nS}),l[16]=j,l[17]=t,l[18]=_,l[19]=s):s=l[19],s}function nB(e){let t,n,i,o,s,l,d,c,u=(0,N.c)(34),{items:m}=e,{mode:p}=(0,I.t)(),{state:h,setViewMode:f,handleCloseTasks:x}=(0,w.t)(),{viewMode:g,activeTabId:y}=h,b;u[0]===f?b=u[1]:(b=()=>{f({type:"create"})},u[0]=f,u[1]=b);let j=b,v;u[2]===f?v=u[3]:(v=()=>{f({type:"list"})},u[2]=f,u[3]=v);let _=v,{t:C}=(0,a.t)(w.n),k;return u[4]!==y||u[5]!==_||u[6]!==C||u[7]!==g?(k=(0,D.jsx)(M.so,{alignItems:"center",flexBasis:"0%",flexGrow:1,children:"list"===g?(0,D.jsx)(M.az,{padding:2,children:(0,D.jsx)(A.n,{size:2,weight:"semibold",children:C("panel.title")})}):(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(E.t,{mode:"bleed",gap:2,padding:2,onClick:_,children:(0,D.jsx)(A.n,{size:1,children:C("panel.title")})}),(0,D.jsx)(ea.ChevronRightIcon,{}),(0,D.jsx)(M.az,{paddingX:2,children:(0,D.jsx)(A.n,{size:1,weight:"semibold",style:{textTransform:"capitalize"},children:"create"===g||"draft"===g?C("panel.create.title"):y})})]})}),u[4]=y,u[5]=_,u[6]=C,u[7]=g,u[8]=k):k=u[8],u[9]===g?t=u[10]:(t=("create"===g||"draft"===g)&&(0,D.jsx)(nD,{}),u[9]=g,u[10]=t),u[11]!==m||u[12]!==g?(n="edit"===g&&(0,D.jsx)(nk,{items:m}),u[11]=m,u[12]=g,u[13]=n):n=u[13],u[14]!==j||u[15]!==p||u[16]!==C||u[17]!==g?(i="list"===g&&(0,D.jsx)(r.o,{icon:ef.AddIcon,onClick:j,mode:"bleed",text:C("buttons.new.text"),disabled:"upsell"===p,tooltipProps:"upsell"===p?{content:C("buttons.new.upsell-tooltip")}:void 0}),u[14]=j,u[15]=p,u[16]=C,u[17]=g,u[18]=i):i=u[18],u[19]===C?o=u[20]:(o=C("panel.close.tooltip"),u[19]=C,u[20]=o),u[21]===o?s=u[22]:(s={content:o},u[21]=o,u[22]=s),u[23]!==x||u[24]!==s?(l=(0,D.jsx)(r.o,{tooltipProps:s,iconRight:q.CloseIcon,mode:"bleed",onClick:x}),u[23]=x,u[24]=s,u[25]=l):l=u[25],u[26]!==i||u[27]!==l?(d=(0,D.jsxs)(M.so,{gap:1,children:[i,l]}),u[26]=i,u[27]=l,u[28]=d):d=u[28],u[29]!==k||u[30]!==t||u[31]!==n||u[32]!==d?(c=(0,D.jsxs)(M.so,{justifyContent:"space-between",alignItems:"center",gap:1,children:[k,t,n,d]}),u[29]=k,u[30]=t,u[31]=n,u[32]=d,u[33]=c):c=u[33],c}let n$=J.PY1.create(R.s),nA=(0,O.I4)(n$).withConfig({displayName:"RootCard",componentId:"sc-7xmppz-0"})`flex:1;flex-direction:column;`,nU=(0,O.I4)(A.t).withConfig({displayName:"HeaderStack",componentId:"sc-7xmppz-1"})`border-bottom:1px solid var(--card-border-color);`,nP=(0,O.I4)(M.so).withConfig({displayName:"ContentFlex",componentId:"sc-7xmppz-2"})`overflow-y:scroll;overflow-x:hidden;`;function nR(){let e,t,n,i,o,s,a=(0,N.c)(39),{mode:r}=(0,I.t)(),{activeDocument:l,data:d,isLoading:c}=(0,k.t)(),{state:m,setActiveTab:p,setViewMode:h}=(0,w.t)(),{activeTabId:f,viewMode:x,selectedTask:g}=m,y=(0,u.n)(),b;a[0]===h?b=a[1]:(b=e=>h({type:"edit",id:e}),a[0]=h,a[1]=b);let j=b,v;if(a[2]!==l||a[3]!==f||a[4]!==y||a[5]!==d){let e;a[7]!==l||a[8]!==f||a[9]!==y?(e=e=>!!e.createdByUser&&("assigned"===f?e.assignedTo===y?.id:"subscribed"===f?y?.id&&e.subscribers?.includes(y.id):"document"===f&&l?.documentId&&(0,T.n)(e.target)===l.documentId),a[7]=l,a[8]=f,a[9]=y,a[10]=e):e=a[10],v=d.filter(e),a[2]=l,a[3]=f,a[4]=y,a[5]=d,a[6]=v}else v=a[6];let _=v,C;e:{let e,t,n;if("list"!==x){let e;a[11]===g?e=a[12]:(e=(0,D.jsx)(t8,{},g),a[11]=g,a[12]=e),C=e;break e}if(c){let e;a[13]===Symbol.for("react.memo_cache_sentinel")?(e=(0,D.jsx)(M.so,{alignItems:"center",justifyContent:"center",children:(0,D.jsx)(E.n,{})}),a[13]=e):e=a[13],C=e;break e}a[14]===r?e=a[15]:(e="upsell"===r&&(0,D.jsx)(nw,{}),a[14]=r,a[15]=e),a[16]!==_||a[17]!==j?(t=(0,D.jsx)(nj,{items:_,onTaskSelect:j}),a[16]=_,a[17]=j,a[18]=t):t=a[18],a[19]!==e||a[20]!==t?(n=(0,D.jsxs)(D.Fragment,{children:[e,t]}),a[19]=e,a[20]=t,a[21]=n):n=a[21],C=n}let S=C,z;return a[22]===Symbol.for("react.memo_cache_sentinel")?(z={opacity:0}
21,a[22]=z):z=a[22],a[23]===Symbol.for("react.memo_cache_sentinel")?(e={opacity:1,transition:{duration:.2}},a[23]=e):e=a[23],a[24]===_?t=a[25]:(t=(0,D.jsx)(nB,{items:_}),a[24]=_,a[25]=t),a[26]!==f||a[27]!==c||a[28]!==p||a[29]!==x?(n="list"===x&&!c&&(0,D.jsx)(n_,{activeTabId:f,onChange:p}),a[26]=f,a[27]=c,a[28]=p,a[29]=x,a[30]=n):n=a[30],a[31]!==t||a[32]!==n?(i=(0,D.jsxs)(nU,{gap:3,padding:3,sizing:"border",children:[t,n]}),a[31]=t,a[32]=n,a[33]=i):i=a[33],a[34]===S?o=a[35]:(o=(0,D.jsx)(nP,{flexDirection:"column",flexBasis:"0%",flexGrow:1,overflow:"auto",padding:3,paddingTop:4,paddingX:4,children:S}),a[34]=S,a[35]=o),a[36]!==i||a[37]!==o?(s=(0,D.jsxs)(nA,{display:"flex",height:"fill",flex:1,overflow:"hidden",initial:z,animate:e,children:[i,o]}),a[36]=i,a[37]=o,a[38]=s):s=a[38],s}function nE(){let e,t=(0,N.c)(1),{enabled:n}=(0,I.t)();return n?(t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,D.jsx)(nR,{}),t[0]=e):e=t[0],e):null}let nL=(0,O.I4)(M.so).withConfig({displayName:"RootFlex",componentId:"sc-8rdynp-0"})(({theme:e})=>{let t=e.sanity.media;return(0,O.AH)`min-height:100%;@media (max-width:${t[3]}px){position:relative;}`}),nF=(0,O.I4)(H.t).withConfig({displayName:"SidebarMotionLayer",componentId:"sc-8rdynp-1"})(({theme:e})=>{let t=e.sanity.media;return(0,O.AH)`display:flex;flex-direction:column;height:100%;width:360px;border-left:1px solid var(--card-border-color);box-sizing:border-box;overflow:hidden;box-shadow:0px 6px 8px -4px var(--card-shadow-umbra-color),0px 12px 17px -1px var(--card-shadow-penumbra-color);@media (max-width:${t[3]}px){bottom:0;position:absolute;right:0;top:0;}@media (max-width:${t[1]}px){border-left:0;min-width:100%;left:0;}`});function nH(e){let t,n,i,o,s=(0,N.c)(12),a=(0,R.o)(),{state:r}=(0,w.t)(),{isOpen:l}=r,d=a<=1&&l?"hidden":"auto",c;return s[0]===e?c=s[1]:(c=e.renderDefault(e),s[0]=e,s[1]=c),s[2]!==d||s[3]!==c?(t=(0,D.jsx)(M.az,{flexBasis:"0%",flexGrow:1,height:"100%",overflow:d,children:c}),s[2]=d,s[3]=c,s[4]=t):t=s[4],s[5]===l?n=s[6]:(n=l&&(0,D.jsx)(nF,{zOffset:100,height:"fill",children:(0,D.jsx)(nE,{})}),s[5]=l,s[6]=n),s[7]===n?i=s[8]:(i=(0,D.jsx)(X.N,{initial:!1,children:n}),s[7]=n,s[8]=i),s[9]!==t||s[10]!==i?(o=(0,D.jsxs)(nL,{height:"100%",children:[t,i]}),s[9]=t,s[10]=i,s[11]=o):o=s[11],o}function nO(e){let t,n=(0,N.c)(4),{enabled:i}=(0,I.t)();if(!i){let t;return n[0]===e?t=n[1]:(t=e.renderDefault(e),n[0]=e,n[1]=t),t}return n[2]===e?t=n[3]:(t=(0,D.jsx)(nH,{...e}),n[2]=e,n[3]=t),t}},52262:(e,t,n)=>{n.d(t,{n:()=>a,r:()=>s,t:()=>r});var i=n(68322),o=n(13638);function s({documentId:e,documentType:t,dataset:n,projectId:o}){return{documentType:t,document:{_ref:(0,i.l)(e),_type:"crossDatasetReference",_dataset:n,_projectId:o,_weak:!0},documentVersionId:(0,i.u)(e)}}function a(e){let t=e?.document?._ref;if(t)return e.documentVersionId?(0,i.d)(t,e.documentVersionId):t}function r(e){if(!e)return[];let t=[];return e?.forEach(e=>{(0,o.L4)(e)&&e.children.forEach(e=>{"mention"!==e._type||"string"!=typeof e.userId||t.includes(e.userId)||t.push(e.userId)})}),t}},74248:(e,t,n)=>{n.d(t,{t:()=>a});var i=n(12115),o=n(19749),s=n(80825);function a(){let e=(0,o.c)(1),t=(0,i.useContext)(s.sF);if(!t){let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t={activeDocument:null,setActiveDocument:r,data:[],isLoading:!1},e[0]=t):t=e[0],t}return t}function r(){return null}},78514:(e,t,n)=>{n.d(t,{a:()=>a,c:()=>r,i:()=>o,l:()=>s,n:()=>c,o:()=>l,r:()=>m,s:()=>d,t:()=>u});var i=n(88586);let o=(0,i.g_)({name:"Task Created",version:1,description:"A task is created"}),s=(0,i.g_)({name:"Task Status Changed",version:1,description:"Task status changed"}),a=(0,i.g_)({name:"Task Duplicated",version:1,description:"A task is duplicated"}),r=(0,i.g_)({name:"Task Removed",version:1,description:"A task is removed"}),l=(0,i.g_)({name:"Task Link Copied",version:1,description:"The link to a task is copied"}),d=(0,i.g_)({name:"Task Link Opened",version:1,description:"User visited the studio through a link with a task"}),c="sidebar",u="selectedTask",m="viewMode"}}]);
22//# sourceMappingURL=5628.514c54af5707ae68.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.