@ehfuse/taskbox 0.5.144 → 0.5.146
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +2 -2
- package/dist/index.esm.js.map +3 -3
- package/dist/index.js +2 -2
- package/dist/index.js.map +3 -3
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -5,10 +5,10 @@ var Fl="waiting",$S="replied";import{createContext as Tu,useContext as yu,useMem
|
|
|
5
5
|
|
|
6
6
|
`).trim()}function wi({syncKey:e,value:o,onChange:t,readOnly:n=!1,minHeight:r=180,height:i=0,onChangeHeight:a}){let l=kn(null),d=kn(null),s=i>0?i:0,u=kn(s),x=kn(a);x.current=a;let p=kn(null),c=kn(Date.now()+800),[f,M]=Pk(!1),C=_e();tl(()=>{if(n)return;let g=rl(o);p.current===g||p.current===o||(p.current=g,c.current=Date.now()+800,l.current?.setHtml(g))},[e,o,n]);let b=kn(-1);return tl(()=>{if(n||C||i<=0||b.current===i||(b.current=i,Math.abs(i-u.current)<1))return;let g=d.current?.querySelector(".ehfuse-editor-container");g&&(Math.abs(g.getBoundingClientRect().height-i)<1||(g.style.height=`${i}px`,u.current=i))},[n,C,i]),tl(()=>{if(n||C)return;let g=d.current?.querySelector(".ehfuse-editor-container");if(!g||typeof ResizeObserver>"u")return;let I,S=new ResizeObserver(O=>{let y=Math.round(O[0]?.contentRect.height??0);y<=0||(window.clearTimeout(I),I=window.setTimeout(()=>{Math.abs(y-u.current)<1||(u.current=y,x.current?.(y))},300))});return S.observe(g),()=>{window.clearTimeout(I),S.disconnect()}},[n,C]),n?Wk(nl,{sx:{position:"relative",mt:1},children:[Tn(nl,{sx:{border:"1px solid #e0e0e0",borderRadius:1,p:"12px",pr:"40px",minHeight:r,fontSize:16,lineHeight:1.6,color:"#37352f",wordBreak:"break-word",userSelect:"none","& > p:first-of-type":{mt:0},"& > p:last-of-type":{mb:0}},dangerouslySetInnerHTML:{__html:rl(o)}}),Tn(qk,{title:"\uB0B4\uC6A9 \uBCF5\uC0AC",arrow:!0,children:Tn(zk,{size:"small","aria-label":"\uB0B4\uC6A9 \uBCF5\uC0AC",onClick:()=>{navigator.clipboard.writeText(Hk(o)).then(()=>{M(!0),window.setTimeout(()=>M(!1),1500)})},sx:{position:"absolute",top:6,right:6,color:"#9a9a97"},children:f?Tn(Lk,{sx:{fontSize:17,color:"#2f9e5b"}}):Tn(Ak,{sx:{fontSize:17}})})})]}):Tn(nl,{ref:d,onDragOver:g=>g.stopPropagation(),onDrop:g=>g.stopPropagation(),sx:{mt:1,"& .ehfuse-editor-content > p:first-of-type":{mt:0},"& .ehfuse-editor-content > p:last-of-type":{mb:0},"& .ehfuse-editor-content.ehfuse-editor-empty::before":{top:"12px",left:"12px"}},children:Tn(Nk,{ref:l,defaultValue:rl(o),autoHeight:C,resizable:!C,showToolbar:!C,focusBorder:!0,styles:{focusBorderColor:"var(--primary)"},toolbarOptions:Fk,locale:"ko",minHeight:s||r,placeholder:"\uB0B4\uC6A9\uC744 \uC785\uB825\uD558\uC138\uC694",contentStyle:{padding:"12px"},onChange:g=>{let I=Date.now()<c.current,S=g===p.current;p.current=g,!(I||S)&&t(g)}})})}import{useState as Er}from"react";import{Box as Bo,Button as Vc,Dialog as eT,IconButton as Zn,TextField as oT,Tooltip as Gc}from"@mui/material";import jc from"@mui/icons-material/Close";import tT from"@mui/icons-material/AddCircle";import Yc from"@mui/icons-material/AddTask";import nT from"@mui/icons-material/Checklist";import rT from"@mui/icons-material/CheckCircle";import iT from"@mui/icons-material/Launch";import aT from"@mui/icons-material/LinkOutlined";import lT from"@mui/icons-material/RadioButtonUnchecked";import{useEffect as $k,useMemo as Kk,useState as il}from"react";import{Box as zt,Button as Uk,Tab as Vk,Tabs as Gk}from"@mui/material";import{FormDialog as jk}from"@ehfuse/mui-form-dialog";import{ClearTextField as Yk}from"@ehfuse/mui-form-controls";import{ErrorAlert as Xk}from"@ehfuse/alerts";import Qk from"@mui/icons-material/CheckCircle";import Zk from"@mui/icons-material/RadioButtonUnchecked";import{OverlayScrollbar as Jk}from"@ehfuse/overlay-scrollbar";import{jsx as xo,jsxs as al}from"react/jsx-runtime";var Uc=[{type:"related",label:"\uAD00\uB828",hint:"\uB2E8\uC21C\uD788 \uAD00\uB828 \uC788\uB294 \uC5C5\uBB34\uB85C \uC5F0\uACB0\uD569\uB2C8\uB2E4"},{type:"follow_up",label:"\uC774\uC804 \uC5C5\uBB34",hint:"\uC774 \uC5C5\uBB34\uAC00 \uC120\uD0DD\uD55C \uC5C5\uBB34\uC5D0\uC11C \uC774\uC5B4\uC9C4 \uD6C4\uC18D\uC784\uC744 \uD45C\uC2DC\uD569\uB2C8\uB2E4(\uC774\uB825 \uD0C0\uC784\uB77C\uC778)"},{type:"duplicate_of",label:"\uC911\uBCF5(\uC6D0\uBCF8)",hint:"\uC774 \uC5C5\uBB34\uAC00 \uC120\uD0DD\uD55C \uC6D0\uBCF8 \uC5C5\uBB34\uC758 \uC911\uBCF5\uC784\uC744 \uD45C\uC2DC\uD569\uB2C8\uB2E4"}];function Di({open:e,task:o,tasks:t,excludeSeqs:n=[],onClose:r,onSubmit:i,hideRelationType:a=!1,title:l="\uAD00\uB828 \uC5C5\uBB34 \uC5F0\uACB0",confirmLabel:d="\uC5F0\uACB0",multiSelect:s=!1}){let u=_e(),[x,p]=il("related"),[c,f]=il(""),[M,C]=il([]);$k(()=>{e&&(p("related"),f(""),C([]))},[e]);let b=Kk(()=>{let y=new Set([o.seq,...n]),_=c.trim().toLowerCase();return t.filter(E=>y.has(E.seq)||E.is_event||E.is_notice?!1:_?E.title.toLowerCase().includes(_)||(E.ticket_no??"").toLowerCase().includes(_):!0).sort((E,v)=>!!E.completed!=!!v.completed?E.completed?1:-1:v.seq-E.seq)},[t,o.seq,n,c]),g=()=>{if(M.length===0){Xk("\uC5F0\uACB0\uD560 \uC5C5\uBB34\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return}for(let y of M)i(y,x);r()},I=y=>{C(_=>_.includes(y)?_.filter(E=>E!==y):s?[..._,y]:[y])},S=Uc.find(y=>y.type===x)?.hint??"",O=al(zt,{sx:{...u?{height:"100%",minHeight:0}:{height:560},display:"flex",flexDirection:"column",...u?{}:{border:"1px solid #cccccc",borderRadius:1},overflow:"hidden",userSelect:"none"},children:[a?null:xo(Gk,{value:x,onChange:(y,_)=>p(_),sx:{minHeight:38,mb:.75,flexShrink:0,"& .MuiTab-root":{minHeight:38,py:.5,fontSize:14}},children:Uc.map(y=>xo(Vk,{value:y.type,label:y.label},y.type))}),a?null:xo(zt,{sx:{mb:1.5,fontSize:12.5,color:"#9a9a97"},children:S}),xo(zt,{sx:{px:1.5,py:1,borderBottom:"1px solid #cccccc",flexShrink:0},children:xo(Yk,{placeholder:"\uC81C\uBAA9\xB7\uD2F0\uCF13\uBC88\uD638\uB85C \uAC80\uC0C9",value:c,onChange:y=>f(y.target.value),fullWidth:!0,autoFocus:!0,size:"small",sx:{"& .MuiOutlinedInput-notchedOutline":{border:"none"},"& .MuiInputBase-root":{px:0}}})}),xo(zt,{sx:{flex:1,minHeight:0},children:xo(Jk,{style:{height:"100%"},contentStyle:{paddingTop:0},children:xo(zt,{sx:{display:"flex",flexDirection:"column"},children:b.length===0?xo(zt,{sx:{py:4,textAlign:"center",fontSize:13.5,color:"#9a9a97"},children:"\uC5F0\uACB0\uD560 \uC218 \uC788\uB294 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):b.map(y=>{let _=Ve(y.icon||Oe),E=M.includes(y.seq);return al(zt,{onClick:()=>I(y.seq),sx:{display:"flex",alignItems:"center",gap:.75,px:1.5,py:1.25,flexShrink:0,cursor:"pointer",borderBottom:"1px solid #ededeb","&:last-of-type":{borderBottom:"none"},bgcolor:E?"#e3eefb":"transparent","&:hover":{bgcolor:E?"#e3eefb":"#f7f7f5"}},children:[E?xo(Qk,{sx:{fontSize:20,flexShrink:0,color:"#2f6fd0"}}):xo(Zk,{sx:{fontSize:20,flexShrink:0,color:"#c9c8c5"}}),_?xo(_,{sx:{fontSize:17,flexShrink:0,color:y.icon_color||"#1e3a8a"}}):null,al(zt,{component:"span",sx:{flex:1,minWidth:0,fontSize:15,color:"#37352f",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:3,overflow:"hidden",lineHeight:1.5,wordBreak:"break-word"},children:[y.ticket_no?`${y.ticket_no} `:"",y.title]}),xo(zt,{sx:{flexShrink:0,display:"flex",alignItems:"center"},children:xo(ze,{option:Do(y)})})]},y.seq)})})})})]});return xo(jk,{open:e,onClose:r,maxWidth:"sm",fullScreen:u,mobilePresentation:u?"slide":"dialog",...u?{contentPaddingX:0,contentTopPadding:0,sectionsPaddingTop:0}:{},sx:u?{DialogContent:{pb:0,"& .os-content > div":{height:"100%",boxSizing:"border-box",paddingBottom:0,marginBottom:0},"& .FormSection-content, & .section-content":{height:"100%",paddingBottom:0,marginBottom:0}}}:void 0,title:l,locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-task-link",sections:[{id:"task-link",showTitle:!1,children:O}],scrollPastLastSection:!1,sectionContentPaddingTop:0,actions:{showCancelButton:!0,right:xo(Uk,{variant:"contained",disabled:M.length===0,onClick:g,children:d})}})}import{Fragment as sT,jsx as ke,jsxs as tn}from"react/jsx-runtime";function Mi({taskSeq:e,checklist:o,onAdd:t,onToggle:n,onRemove:r,onUpdate:i,removeLocked:a=!1,onConvertToTask:l,onOpenLinkedTask:d,linkCandidates:s,linkBaseTask:u,onLinkExistingTask:x,resolveLinkedTask:p}){let[c,f]=Er(""),[M,C]=Er(!1),[b,g]=Er(null),I=_e(),[S,O]=Er(null),[y,_]=Er(null),E=L=>{let m=L.task_seq?p?.(L.task_seq):void 0;return m?m.completed:L.checked},v=o.filter(E).length,D=()=>{c.trim()&&(t(e,c),f(""))};return tn($o,{icon:ke(nT,{sx:{fontSize:19,display:"block"}}),title:tn(sT,{children:["\uD560\uC77C",o.length>0?tn(Bo,{component:"span",sx:{fontSize:12.5,color:"#9a9a97"},children:[v," / ",o.length]}):null]}),titleExtra:o.length>0?ke(Bo,{sx:{flex:1,minWidth:0,ml:1,height:6,borderRadius:3,bgcolor:"#ececea"},children:ke(Bo,{sx:{height:"100%",borderRadius:3,width:`${Math.round(v/o.length*100)}%`,bgcolor:"#2f80ed",transition:"width 0.2s"}})}):null,children:[ke(Bo,{sx:{display:"flex",flexDirection:"column",mt:.5,pl:3.25},children:o.map((L,m)=>{let T=L.task_seq?p?.(L.task_seq):void 0,h=E(L),k=!!L.task_seq;return tn(Bo,{sx:{display:"flex",alignItems:"center",gap:1,px:1.25,py:.5,borderRadius:1,"&:hover":{bgcolor:"#f7f7f5"},"&:hover .taskbox-checklist-remove":{opacity:1},"&:hover .taskbox-checklist-convert":{opacity:1}},children:[ke(Bo,{component:"span",onClick:()=>n(e,m,!h),sx:{display:"inline-flex",flexShrink:0,cursor:"pointer"},children:h?ke(rT,{sx:{fontSize:18,color:"#2f80ed"}}):ke(lT,{sx:{fontSize:18,color:"#9a9a97"}})}),b?.index===m?ke(Bo,{component:"input",autoFocus:!0,spellCheck:!1,value:b.label,enterKeyHint:"done",onChange:P=>g({index:m,label:P.target.value}),onBlur:()=>{b.label.trim()&&b.label.trim()!==L.label&&i?.(e,m,b.label),g(null)},onKeyDown:P=>{P.key==="Enter"&&P.target.blur(),P.key==="Escape"&&g(null)},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:14,color:"#37352f",bgcolor:"transparent",p:0}}):ke(Bo,{component:"span",onClick:k?L.task_seq&&d?()=>d(L.task_seq):void 0:a||!i?void 0:I?()=>O({index:m,label:L.label}):()=>g({index:m,label:L.label}),sx:{flex:1,minWidth:0,fontSize:14.5,color:"#37352f",textDecoration:h?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...k?d?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}:a||!i?{}:{cursor:"text"}},children:L.label}),k?tn(Bo,{component:"span",onClick:L.task_seq&&d?()=>d(L.task_seq):void 0,sx:{display:"inline-flex",alignItems:"center",gap:.4,flexShrink:0,px:.75,py:.2,borderRadius:1,fontSize:12,fontWeight:500,color:"#1d4f91",bgcolor:"#e3eefb",whiteSpace:"nowrap",...d?{cursor:"pointer"}:{}},children:[ke(iT,{sx:{fontSize:12}}),T?.manager_name?.trim()||"\uC5C5\uBB34"]}):null,!a&&!k&&l?ke(Gc,{title:"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",arrow:!0,enterDelay:300,disableInteractive:!0,children:ke(Zn,{className:"taskbox-checklist-convert",size:"small","aria-label":"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",onClick:P=>_({anchorEl:P.currentTarget,index:m,label:L.label}),sx:{display:I?"none":"inline-flex",opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:ke(Yc,{sx:{fontSize:16}})})}):null,a?null:ke(Zn,{className:"taskbox-checklist-remove",size:"small","aria-label":"\uD560\uC77C \uC0AD\uC81C",onClick:()=>r(e,m),sx:{display:I?"none":"inline-flex",opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:ke(jc,{sx:{fontSize:15}})})]},`${L.label}-${m}`)})}),tn(Bo,{sx:{mt:.5,ml:3.25,display:"flex",alignItems:"center",gap:.5},children:[ke(Bo,{component:"input",spellCheck:!1,value:c,placeholder:"+ \uD560\uC77C \uCD94\uAC00",enterKeyHint:"done",onChange:L=>f(L.target.value),onKeyDown:L=>{L.key==="Enter"&&D()},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:14,color:"#37352f",bgcolor:"transparent",px:1.25,py:.75,"&::placeholder":{color:"#9a9a97"}}}),s&&u&&x?ke(Gc,{title:"\uAE30\uC874 \uC5C5\uBB34 \uBD99\uC774\uAE30",arrow:!0,children:ke(Zn,{size:"small","aria-label":"\uAE30\uC874 \uC5C5\uBB34 \uBD99\uC774\uAE30",onMouseDown:L=>L.preventDefault(),onClick:()=>C(!0),sx:{flexShrink:0,color:"#9a9a97"},children:ke(aT,{sx:{fontSize:20}})})}):null,ke(Zn,{size:"small","aria-label":"\uD560\uC77C \uCD94\uAC00",disabled:!c.trim(),onMouseDown:L=>L.preventDefault(),onClick:D,sx:{flexShrink:0,color:c.trim()?"#2f80ed":"#c9c8c5"},children:ke(tT,{sx:{fontSize:20}})})]}),s&&u&&x?ke(Di,{open:M,task:u,tasks:s,excludeSeqs:o.map(L=>Number(L.task_seq??0)).filter(L=>L>0),hideRelationType:!0,multiSelect:!0,title:"\uAE30\uC874 \uC5C5\uBB34 \uBD99\uC774\uAE30",confirmLabel:"\uBD99\uC774\uAE30",onClose:()=>C(!1),onSubmit:L=>{let m=s.find(T=>T.seq===L);x(e,L,String(m?.title??"").trim())}}):null,ke(We,{open:!!y,anchorEl:y?.anchorEl??null,title:"\uC774 \uD560\uC77C\uC744 \uBCC4\uB3C4 \uC5C5\uBB34\uB85C \uB9CC\uB4DC\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uB9CC\uB4E4\uAE30",onCancel:()=>_(null),onConfirm:()=>{y&&l?.(e,y.index,y.label),_(null)}}),ke(eT,{open:!!S,onClose:()=>O(null),maxWidth:"xs",fullWidth:!0,slotProps:{paper:{sx:{borderRadius:2,m:2}}},children:tn(Bo,{sx:{p:2,display:"flex",flexDirection:"column",gap:1.5},children:[ke(Bo,{sx:{fontSize:15.5,fontWeight:600,color:"#37352f"},children:"\uD560\uC77C \uC218\uC815"}),ke(oT,{autoFocus:!0,fullWidth:!0,size:"medium",value:S?.label??"",onChange:L=>O(m=>m&&{...m,label:L.target.value}),onKeyDown:L=>{if(L.key!=="Enter")return;let m=S;m&&m.label.trim()&&i?.(e,m.index,m.label.trim()),O(null)}}),tn(Bo,{sx:{display:"flex",alignItems:"center",gap:1},children:[!a&&l&&S&&!o[S.index]?.task_seq?ke(Zn,{"aria-label":"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",onClick:()=>{l(e,S.index,o[S.index]?.label??""),O(null)},sx:{color:"#57564f"},children:ke(Yc,{sx:{fontSize:20}})}):null,!a&&S?ke(Zn,{"aria-label":"\uD560\uC77C \uC0AD\uC81C",onClick:()=>{r(e,S.index),O(null)},sx:{color:"#e5484d"},children:ke(jc,{sx:{fontSize:19}})}):null,ke(Bo,{sx:{flex:1}}),ke(Vc,{color:"inherit",onClick:()=>O(null),children:"\uCDE8\uC18C"}),ke(Vc,{variant:"contained",disabled:!S?.label.trim(),onClick:()=>{S&&S.label.trim()&&i?.(e,S.index,S.label.trim()),O(null)},children:"\uD655\uC778"})]})]})})]})}import{useRef as fT,useState as xT}from"react";import{Box as dt,IconButton as gT}from"@mui/material";import bT from"@mui/icons-material/Close";import Zc from"@mui/icons-material/AttachFileOutlined";var cT=new Set(["jpg","jpeg","png","gif","bmp","webp","svg","pdf","txt","json","xml","log","md","markdown","csv","xls","xlsx","html","htm","js","jsx","ts","tsx","css","scss","sass","less","php","py","java","c","cpp","h","hpp","cs","go","rs","rb","swift","kt","scala","sql","sh","bash","bat","ps1","yml","yaml","toml","ini","conf","mp4","avi","mov","wmv","flv","webm","mp3","wav","ogg","m4a","aac"]),Ei=e=>{let o=e?.split(".").pop()?.toLowerCase()??"";return cT.has(o)};import{LinearProgress as mT}from"@mui/material";import{Fragment as uT,jsx as pT,jsxs as dT}from"react/jsx-runtime";function Xc(e){let o=bt(),t=o.useValue("attachmentUpload.taskSeq"),n=o.useValue("attachmentUpload.index"),r=o.useValue("attachmentUpload.total"),i=o.useValue("attachmentUpload.queue"),a=n??0;return!a||e>0&&(t??0)!==e?null:{index:a,total:r??0,queue:i??[]}}function ll(){let o=bt().useValue("attachmentUpload.progress");return dT(uT,{children:[o??0,"%"]})}function Qc(){let o=bt().useValue("attachmentUpload.progress");return pT(mT,{variant:"determinate",value:o??0,sx:{height:4,borderRadius:2,bgcolor:"#dbe9fb",mt:.75}})}import{Fragment as hT,jsx as Oo,jsxs as Or}from"react/jsx-runtime";function Oi(e){return e>=1048576?`${(e/1048576).toFixed(1)}MB`:`${Math.max(1,Math.round(e/1024))}KB`}var Ri={flex:1,minWidth:0,fontSize:13.5,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"};function Pi({taskSeq:e,attachments:o,onAdd:t,onRemove:n,removeLocked:r=!1,onPreview:i,onDownload:a}){let[l,d]=xT(!1),s=fT(null),u=_e(),x=xr(),p=fr(),c=Xc(e),f=e===0,M=S=>{if(i){i(S);return}window.open(p(S.uuid??""),"_blank","noopener,noreferrer")},C=S=>{if(a){a(S);return}window.open(p(S.uuid??"",{download:!0}),"_blank","noopener,noreferrer")},b=S=>c?S+1<c.index?"done":S+1===c.index?"uploading":"waiting":"waiting",g=(S,O,y,_={})=>Or(dt,{sx:{px:1,py:.5,borderRadius:1,border:"1px solid",borderColor:_.uploading?"#d5e6fb":"#e6e6e3",bgcolor:_.uploading?"#f4f9ff":"transparent","&:hover .taskbox-file-remove":{opacity:1}},children:[Or(dt,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[Oo(Zc,{sx:{fontSize:16,color:"#9a9a97"}}),O,Oo(dt,{component:"span",sx:{fontSize:12,color:_.uploading?"#2f80ed":"#9a9a97",flexShrink:0},children:y}),_.removeIndex!==void 0?Oo(gT,{className:"taskbox-file-remove",size:"small","aria-label":"\uCCA8\uBD80 \uC0AD\uC81C",onClick:()=>n(e,_.removeIndex),sx:{opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:Oo(bT,{sx:{fontSize:15}})}):null]}),_.uploading?Oo(Qc,{}):null]},S),I=S=>{let O=Ei(S.name);return Oo(dt,{component:"button",type:"button",onClick:()=>O?M(S):C(S),title:`${S.name} ${O?"\uBBF8\uB9AC\uBCF4\uAE30":"\uB2E4\uC6B4\uB85C\uB4DC"}`,sx:{...Ri,color:"#37352f",textAlign:"left",p:0,border:"none",background:"none",font:"inherit",fontSize:13.5,cursor:"pointer","&:hover":{textDecoration:"underline",color:"#2f80ed"}},children:S.name})};return Or($o,{icon:Oo(Zc,{sx:{fontSize:18,display:"block"}}),title:Or(hT,{children:["\uD30C\uC77C ",o.length>0?o.length:""]}),children:[Or(dt,{sx:{display:"flex",flexDirection:"column",gap:.5,mt:1},children:[o.map((S,O)=>{let y=`${S.uuid||S.name}-${O}`;if(f){let _=b(O),E=_==="uploading";return g(y,Oo(dt,{component:"span",sx:{...Ri,color:_==="done"?"#37352f":"#9a9a97"},children:S.name}),E?Oo(ll,{}):Oi(S.size),{uploading:E,removeIndex:!r&&!c?O:void 0})}return S.uuid?g(y,I(S),Oi(S.size),{removeIndex:r?void 0:O}):g(y,Oo(dt,{component:"span",title:"\uC2E4\uD30C\uC77C\uC774 \uC5C6\uB294 \uC774\uC804 \uBC29\uC2DD \uCCA8\uBD80\uC785\uB2C8\uB2E4(\uB2E4\uC6B4\uB85C\uB4DC \uBD88\uAC00) \u2014 \uB2E4\uC2DC \uCCA8\uBD80\uD574 \uC8FC\uC138\uC694.",sx:{...Ri,color:"#9a9a97"},children:S.name}),Oi(S.size),{removeIndex:r?void 0:O})}),!f&&c?c.queue.slice(c.index-1).map((S,O)=>{let y=O===0;return g(`uploading-${c.index+O}-${S.name}`,Oo(dt,{component:"span",sx:{...Ri,color:"#9a9a97"},children:S.name}),y?Oo(ll,{}):Oi(S.size),{uploading:y})}):null]}),Oo(dt,{onClick:()=>s.current?.click(),onDragOver:S=>{S.preventDefault(),d(!0)},onDragLeave:()=>d(!1),onDrop:S=>{S.preventDefault(),d(!1);let O=Array.from(S.dataTransfer.files);O.length>0&&t(e,O)},sx:{mt:1,py:2.5,display:"flex",alignItems:"center",justifyContent:"center",gap:.5,border:"1.5px dashed",borderColor:l?"#2f80ed":"#cfcfcc",borderRadius:1,bgcolor:l?"#eef6ff":"transparent",color:"#787774",fontSize:13.5,cursor:"pointer",transition:"background-color 0.15s, border-color 0.15s","&:hover":{bgcolor:"#fafaf9",borderColor:"#9a9a97"}},children:u?`\uD30C\uC77C\uC744 \uCCA8\uBD80\uD558\uC138\uC694 (\uCD5C\uB300 ${x}MB)`:`\uD30C\uC77C\uC744 \uB04C\uC5B4\uB2E4 \uB193\uAC70\uB098 \uD074\uB9AD\uD574 \uCCA8\uBD80\uD558\uC138\uC694 (\uCD5C\uB300 ${x}MB)`}),Oo(dt,{component:"input",ref:s,type:"file",multiple:!0,onChange:S=>{let O=Array.from(S.target.files??[]);O.length>0&&t(e,O),S.target.value=""},sx:{display:"none"}})]})}import{useState as vT}from"react";import{Checkbox as IT,Divider as _T,ListItemIcon as wT,Menu as DT,MenuItem as tm}from"@mui/material";import MT from"@mui/icons-material/Add";import{useEffect as kT,useState as Jc}from"react";import{Box as sl,Button as TT}from"@mui/material";import{FormDialog as yT}from"@ehfuse/mui-form-dialog";import{ClearTextField as ST}from"@ehfuse/mui-form-controls";import{ColorPicker as BT}from"@ehfuse/mui-color-picker";import{ErrorAlert as CT}from"@ehfuse/alerts";import{jsx as Rr,jsxs as cl}from"react/jsx-runtime";var em="#2f80ed";function om({open:e,onClose:o,onSubmit:t}){let[n,r]=Jc(""),[i,a]=Jc(em);kT(()=>{e&&(r(""),a(em))},[e]);let l=()=>{let u=n.trim();if(!u){CT("\uB77C\uBCA8 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}t(u,i),o()},d=as(i),s=cl(sl,{children:[cl(sl,{sx:{display:"flex",alignItems:"center",gap:1.5,mt:.5},children:[Rr(ST,{label:"\uB77C\uBCA8 \uC774\uB984",value:n,onChange:u=>r(u.target.value),onKeyDown:u=>{u.key==="Enter"&&(u.preventDefault(),l())},fullWidth:!0,autoFocus:!0}),Rr(BT,{value:i,onChange:u=>a(u),shape:"circle",colorSize:28})]}),cl(sl,{sx:{mt:2,display:"flex",alignItems:"center",gap:1,fontSize:13,color:"#787774"},children:["\uBBF8\uB9AC\uBCF4\uAE30",Rr(ze,{option:{key:"__preview__",name:n.trim()||"\uB77C\uBCA8",...d}})]})]});return Rr(yT,{open:e,onClose:o,maxWidth:"xs",title:"\uC0C8 \uB77C\uBCA8 \uCD94\uAC00",locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-add-label",sections:[{id:"add-label",showTitle:!1,children:s}],actions:{showCancelButton:!0,right:Rr(TT,{variant:"contained",onClick:l,children:"\uCD94\uAC00"})}})}import{Fragment as ET,jsx as Jn,jsxs as zi}from"react/jsx-runtime";function qi({anchorEl:e,selectedKeys:o,labelOptions:t,onToggle:n,onAddLabel:r,onClose:i}){let[a,l]=vT(!1),d=rt();return zi(ET,{children:[zi(DT,{anchorEl:e,open:!!e,onClose:i,transitionDuration:0,...d,children:[t.map(s=>{let u=o.includes(s.key);return zi(tm,{onClick:()=>n(s.key),sx:{fontSize:14,minWidth:170,gap:1},children:[Jn(IT,{size:"small",checked:u,sx:{p:0}}),Jn(ze,{option:s})]},s.key)}),Jn(_T,{}),zi(tm,{onClick:()=>l(!0),sx:{fontSize:14,color:"#787774"},children:[Jn(wT,{children:Jn(MT,{sx:{fontSize:18,color:"#787774"}})}),"\uB77C\uBCA8 \uCD94\uAC00"]})]}),Jn(om,{open:a,onClose:()=>l(!1),onSubmit:r})]})}function nm(e,o){let t=Number(e.author_account_seq??0);return o.filter(n=>{let r=Number(n.account_seq??0);return r>0&&r!==t})}function rm(e,o){let t=(e.target_account_seqs??[]).filter(x=>x>0);if(t.length===0)return null;let n=new Set(t),r=nm(e,o),i=new Map;for(let x of r){let p=String(x.department??"").trim();if(!p)continue;let c=i.get(p)??[];c.push(x),i.set(p,c)}let a=[],l=new Set;for(let[x,p]of i)if(p.every(f=>n.has(Number(f.account_seq??0)))){a.push(x);for(let f of p)l.add(Number(f.account_seq??0))}let d=new Map(r.map(x=>[Number(x.account_seq??0),x.name])),s=e.target_names??[],u=[];return t.forEach((x,p)=>{l.has(x)||u.push(d.get(x)??s[p]??"\uC774\uB984\uC5C6\uC74C")}),{teamNames:a,individualNames:u}}function Ai(e,o){let t=rm(e,o);return t?[...t.teamNames,...t.individualNames].join(", "):"\uBAA8\uB4E0 \uC9C1\uC6D0"}function BR(e,o){let t=rm(e,o);return t?{kind:"members",teamNames:t.teamNames,individualNames:t.individualNames}:{kind:"everyone"}}function im(e,o,t){let n=(e.target_account_seqs??[]).filter(u=>u>0),r=nm(e,o),i=n.length>0?n.length:r.length,a=e.acks??[],l=t>0&&a.some(u=>u.account_seq===t),d=t>0&&Number(e.author_account_seq??0)===t,s=n.length===0||n.includes(t);return{count:a.length,total:i,acked:l,canAck:t>0&&!d&&s&&!l&&!e.completed}}function am(e,o){let t=Number(o)||50,n=t*1024*1024,r=e.filter(l=>l.size>n),i=e.filter(l=>l.size<=n),a=r.length>0?`\uD30C\uC77C\uC740 1\uAC1C\uB2F9 \uCD5C\uB300 ${t}MB \uAE4C\uC9C0 \uCCA8\uBD80\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
|
|
7
7
|
\uC81C\uC678\uB41C \uD30C\uC77C: ${r.map(l=>l.name).join(", ")}`:null;return{accepted:i,rejected:r,message:a}}import{Fragment as Li,jsx as fe,jsxs as yn}from"react/jsx-runtime";var cm="#0f9d58";function dl({form:e,statusOptions:o,customTabs:t,sprints:n=[],avatarSrcByName:r,isNotice:i=!1,hideProject:a=!1,hideBug:l=!1,leadingRow:d,hideLabel:s=!1,employees:u=[],myAccountSeq:x=0,departments:p=[],myGroupSeq:c=0,onMemberEdit:f,onAddProject:M,onAddLabelOption:C,contentSyncKey:b="create"}){let g=bt(),I=xr(),S=e.useFormValue("manager_name"),O=e.useFormValue("receiver_names"),y=e.useFormValue("start_date"),_=!!e.useFormValue("is_event"),E=!!e.useFormValue("is_bug"),v=e.useFormValue("bug_repro")??"",D=e.useFormValue("bug_device")??"",L=e.useFormValue("bug_where")??"",m=e.useFormValue("bug_version")??"",T=e.useFormValue("event_time")??"",h=e.useFormValue("event_place")??"",k=e.useFormValue("event_address")??"",P=e.useFormValue("due_date"),A=e.useFormValue("estimated_time")??"",ae=e.useFormValue("reminder"),ie=e.useFormValue("priority"),xe=e.useFormValue("content"),ue=e.useFormValue("checklist")??[],ge=e.useFormValue("tab_key"),ce=e.useFormValue("sprint_seq")??0,ee=e.useFormValue("story_points")??0,Pe=t.find(w=>w.key===ge&&w.useSprints),Ae=Pe?n.filter(w=>`custom-${w.group_seq}`===ge):[],[W,K]=ml(null),J=e.useFormValue("label_keys"),[B,F]=ml(null),Q=e.useFormValue("visibility")||"involved",U=Number(e.useFormValue("visibility_group_seq")??0),[ve,Le]=ml(null),Ue=e.useFormValue("target_names"),Xe=e.useFormValue("target_account_seqs"),oo=g.useValue("createAttachmentFiles")??[],Y=i?Ai({author_account_seq:x,target_names:Ue,target_account_seqs:Xe},u):"";return yn(Li,{children:[d,i?null:yn(er,{sx:{display:"flex",gap:1.25,px:2,pt:1.5,pb:1.5,flexShrink:0},children:[[{value:"task",label:"\uC5C5\uBB34"},{value:"event",label:"\uC77C\uC815"},...l?[]:[{value:"bug",label:"\uC624\uB958"}]].map(w=>{let Se=E?"bug":_?"event":"task",H=Se===w.value;return fe(ul,{onClick:()=>{if(Se===w.value)return;e.setFormValue("is_event",w.value==="event"),e.setFormValue("is_bug",w.value==="bug"),e.setFormValue("visibility",w.value==="bug"?"all":"involved"),e.setFormValue("visibility_group_seq",0);let ye=e.getFormValue("icon"),Qe=e.getFormValue("icon_color"),ho=[Oe,"event",gr].includes(ye),Ht=!Qe||Qe===cm||Qe===br;ho&&e.setFormValue("icon",w.value==="event"?"event":w.value==="bug"?gr:Oe),Ht&&e.setFormValue("icon_color",w.value==="event"?cm:w.value==="bug"?br:"")},sx:{px:1.75,py:.75,borderRadius:99,fontSize:13.5,fontWeight:H?600:400,color:H?"#ffffff":"#787774",bgcolor:H?"#2563eb":"#f4f4f2"},children:w.label},w.label)}),yn(er,{sx:{ml:"auto",display:"flex",alignItems:"center",gap:.75},children:[[{value:"involved",label:"\uBE44\uACF5\uAC1C",tip:"\uC791\uC131\uC790\xB7\uCC45\uC784\uC790\xB7\uCC38\uC870\uC790\uB9CC \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4"},...p.length>0?[{value:"group",label:"\uBD80\uC11C\uACF5\uAC1C",tip:"\uC120\uD0DD\uD55C \uBD80\uC11C\uC758 \uC9C1\uC6D0\uC774 \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4"}]:[],{value:"all",label:"\uC804\uCCB4\uACF5\uAC1C",tip:"\uBAA8\uB4E0 \uC9C1\uC6D0\uC774 \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4"}].map(w=>{let Se=Q===w.value;return fe(OT,{title:w.tip,arrow:!0,disableInteractive:!0,children:fe(ul,{onClick:()=>{Q!==w.value&&(e.setFormValue("visibility",w.value),e.setFormValue("visibility_group_seq",w.value==="group"&&(c||p[0]?.seq)||0))},sx:{px:1.5,py:.6,borderRadius:99,fontSize:13,fontWeight:Se?600:400,color:Se?"#2563eb":"#57564f",bgcolor:Se?"#eef4ff":"transparent",border:`1px solid ${Se?"#2563eb":"#d5d8dc"}`},children:w.label})},w.value)}),Q==="group"?fe(ul,{onClick:w=>Le(w.currentTarget),sx:{px:1.5,py:.6,borderRadius:99,fontSize:13,fontWeight:600,color:"#ffffff",bgcolor:"#2563eb"},children:p.find(w=>w.seq===U)?.name??"\uBD80\uC11C \uC120\uD0DD"}):null]}),fe(lm,{anchorEl:ve,open:!!ve,onClose:()=>Le(null),transitionDuration:0,children:p.map(w=>fe(sm,{selected:w.seq===U,onClick:()=>{e.setFormValue("visibility_group_seq",w.seq),Le(null)},sx:{fontSize:14,minWidth:140},children:w.name},w.seq))})]}),fe(Pr,{sx:{borderColor:"#e6e6e3"}}),yn(er,{sx:{py:1.5,display:"flex",flexDirection:"column",gap:.25},children:[fe(Ii,{hideProject:a,showEstimatedTime:!_,values:{tabKey:ge,managerName:S,receiverNames:O,startDate:y,dueDate:P,reminder:ae,priority:ie,estimatedTime:A,eventTime:T,eventPlace:h,eventAddress:k},onChangeEstimatedTime:w=>e.setFormValue("estimated_time",w),customTabs:t,avatarSrcByName:r,notice:i,event:_,onChangeEventTime:w=>e.setFormValue("event_time",w),onChangeEventPlace:w=>e.setFormValue("event_place",w),onChangeEventAddress:w=>e.setFormValue("event_address",w),targetSummary:Y,onChangeProject:w=>e.setFormValue("tab_key",w),onAddProject:M,onChangeStartDate:w=>e.setFormValue("start_date",w),onChangeDueDate:w=>e.setFormValue("due_date",w),onChangeReminder:w=>e.setFormValue("reminder",w),onChangePriority:w=>e.setFormValue("priority",w),onMemberEdit:f,trailing:yn(Li,{children:[Pe&&!_&&!i?yn(Li,{children:[fe(pe,{icon:fe(qT,{sx:{fontSize:17}}),label:"\uBAA9\uD45C",onClick:w=>K(w),children:ce>0?Ae.find(w=>w.seq===ce)?.name??"\uC0AD\uC81C\uB41C \uBAA9\uD45C":fe(er,{component:"span",sx:{color:"#9a9a97"},children:"\uBBF8\uBC30\uC815"})}),fe(pe,{icon:fe(AT,{sx:{fontSize:17}}),label:"\uD3EC\uC778\uD2B8",children:fe(Pt,{value:ee>0?String(ee):"",placeholder:"\uBBF8\uCD94\uC815",onCommit:w=>e.setFormValue("story_points",Number(w.replace(/[^0-9.]/g,""))||0)})})]}):null,E?fe(_i,{values:{repro:v,device:D,where:L,version:m},onChangeRepro:w=>e.setFormValue("bug_repro",w),onChangeDevice:w=>e.setFormValue("bug_device",w),onChangeWhere:w=>e.setFormValue("bug_where",w),onChangeVersion:w=>e.setFormValue("bug_version",w)}):null]}),leading:_||s?null:fe(er,{sx:{gridColumn:"1 / -1"},children:fe(pe,{icon:fe(zT,{sx:{fontSize:17}}),label:"\uB77C\uBCA8",onClick:w=>F(w),children:(J??[]).length>0?fe($t,{labelKeys:J??[],labelOptions:o}):fe(er,{component:"span",sx:{color:"#9a9a97"},children:"\uBE44\uC5B4 \uC788\uC74C"})})})}),fe(Pr,{sx:{my:1.5,borderColor:"#e6e6e3"}}),fe($o,{icon:fe(RT,{sx:{fontSize:18,display:"block"}}),title:"\uB0B4\uC6A9",children:fe(wi,{syncKey:b,value:xe,onChange:w=>e.setFormValue("content",w)})}),_?null:fe(Pr,{sx:{my:1.5,borderColor:"#e6e6e3"}}),_?null:fe(Mi,{taskSeq:0,checklist:ue,onAdd:(w,Se)=>e.setFormValue("checklist",[...ue,{label:Se,checked:!1}]),onToggle:(w,Se,H)=>e.setFormValue("checklist",ue.map((ye,Qe)=>Qe===Se?{...ye,checked:H}:ye)),onRemove:(w,Se)=>e.setFormValue("checklist",ue.filter((H,ye)=>ye!==Se)),onUpdate:(w,Se,H)=>e.setFormValue("checklist",ue.map((ye,Qe)=>Qe===Se?{...ye,label:H}:ye))}),fe(Pr,{sx:{my:1.5,borderColor:"#e6e6e3"}}),fe(Pi,{taskSeq:0,attachments:oo.map(w=>({name:w.name,size:w.size})),onAdd:(w,Se)=>{let H=am(Se,I);H.message&&NT(H.message),H.accepted.length!==0&&g.setValue("createAttachmentFiles",[...g.getValue("createAttachmentFiles")??[],...H.accepted])},onRemove:(w,Se)=>g.setValue("createAttachmentFiles",oo.filter((H,ye)=>ye!==Se))}),E?null:yn(Li,{children:[fe(Pr,{sx:{my:1.5,borderColor:"#e6e6e3"}}),fe($o,{icon:fe(PT,{sx:{fontSize:18,display:"block"}}),title:"\uBE44\uACE0",children:fe(LT,{form:e,name:"note",placeholder:"\uBE44\uACE0 \uC785\uB825",fullWidth:!0,size:"medium",sx:{mt:1}})})]})]}),fe(lm,{transitionDuration:0,anchorEl:W,open:!!W,onClose:()=>K(null),children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...Ae.map(w=>({seq:w.seq,label:Ho(w)}))].map(w=>fe(sm,{onClick:()=>{e.setFormValue("sprint_seq",w.seq),K(null)},sx:{fontSize:14,minWidth:170},children:w.label},w.seq))}),fe(qi,{anchorEl:B,selectedKeys:J??[],labelOptions:o,onToggle:w=>e.setFormValue("label_keys",Vr(J??[],w)),onAddLabel:(w,Se)=>C?.(w,Se),onClose:()=>F(null)})]})}import{Fragment as dm,jsx as Ge,jsxs as or}from"react/jsx-runtime";function uP({open:e,onClose:o,...t}){let{form:n,presetDueDate:r="",presetTabKey:i="",presetManager:a=null,isNotice:l=!1,defaultBug:d=!1}=t,s=bt(),u=HT(!1),[x,p]=mm(0),[c,f]=mm(null),M=n.useFormValue("title"),C=n.useFormValue("icon"),b=n.useFormValue("icon_color"),g=!!n.useFormValue("is_event"),I=!!n.useFormValue("is_bug"),S=_e(),y=s.useValue("createSubmitting")??!1,_=zn(C||Oe),E=l?"\uACF5\uC9C0 \uB4F1\uB85D":g?"\uC77C\uC815 \uB4F1\uB85D":I?"\uC624\uB958 \uB4F1\uB85D":"\uC5C5\uBB34 \uB4F1\uB85D",v=l?"\uACF5\uC9C0 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694":g?"\uC77C\uC815 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694":I?"\uC5B4\uB5A4 \uC624\uB958\uC778\uC9C0 \uD55C \uC904\uB85C \uC801\uC5B4\uC8FC\uC138\uC694":"\uC5C5\uBB34 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694";FT(()=>{let m=u.current;u.current=e,!(!e||m)&&(n.setFormValues({...n.getFormValues(),title:"",icon:l?wo:d?gr:Oe,icon_color:l?"#e5484d":d?br:"",manager_name:a?.name??"",manager_account_seq:a?.accountSeq??0,receiver_names:[],receiver_account_seqs:[],is_notice:l,is_event:!1,is_bug:d,visibility:d?"all":"involved",visibility_group_seq:0,bug_repro:"",bug_device:"",bug_where:"",bug_version:"",event_time:"",event_place:"",event_address:"",target_names:[],target_account_seqs:[],start_date:He(new Date),due_date:r,reminder:"none",priority:"medium",note:"",content:"",checklist:[],tab_key:i}),s.setValue("createAttachmentFiles",[]),p(T=>T+1))},[e]);let D=or(nn,{sx:{display:"flex",alignItems:"center",gap:1,px:2,pt:2,pb:1},children:[Ge(fl,{size:"small","aria-label":"\uC544\uC774\uCF58 \uBCC0\uACBD",onClick:m=>f(m.currentTarget),sx:{p:0,color:b||"#1e3a8a"},children:Ge(_,{sx:{fontSize:20}})}),Ge(nn,{component:"input",autoFocus:!0,spellCheck:!1,value:M,placeholder:v,onChange:m=>n.setFormValue("title",m.target.value),sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:19,fontWeight:600,color:"#37352f",p:0,m:0,"&::placeholder":{color:"#c9c8c5",fontWeight:400}}})]}),L=Ge(Qn,{anchorEl:c,value:C,color:b||"#1e3a8a",onSelect:m=>n.setFormValue("icon",m),onSelectColor:m=>n.setFormValue("icon_color",m),onClose:()=>f(null)});return S?or(dm,{children:[Ge(VT,{open:e,onClose:o,locale:"ko",fontScale:{enabled:!0,default:1.1,min:.6},title:E,titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1},custom:[{icon:Ge(pl,{variant:"contained",size:"small",disableElevation:!0,disabled:y,onClick:y?void 0:n.submit,sx:{ml:2,minWidth:0,px:1.5,py:.35,fontSize:14,fontWeight:600,bgcolor:"#2f80ed","&:hover":{bgcolor:"#2f80ed"}},children:"\uC800\uC7A5"}),tooltip:y?"\uC800\uC7A5 \uC911\u2026":""}]},fullScreen:!0,mobilePresentation:"slide",tabs:{visible:!1},contentTopPadding:0,contentPaddingX:0,sectionsPaddingTop:0,sectionContentPaddingTop:0,contentBottomPadding:0,scrollPastLastSection:!1,overlayScrollbar:{enabled:!0,contentStyle:{minWidth:0}},actions:{visible:!1},sections:[{id:"task-create",title:"",showTitle:!1,children:Ge(nn,{sx:{width:"100%",minWidth:0,display:"flex",flexDirection:"column",gap:0},children:Ge(dl,{...t,contentSyncKey:`create-${x}`,leadingRow:D})})}]}),L]}):or(dm,{children:[Ge(WT,{anchor:"right",open:e,onClose:o,sx:{zIndex:m=>m.zIndex.modal},slotProps:{paper:{sx:{width:720,maxWidth:"100vw"}}},children:or(nn,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[or(nn,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1.5,flexShrink:0},children:[Ge($T,{title:"\uC544\uC774\uCF58 \uBCC0\uACBD",arrow:!0,children:Ge(fl,{size:"small",onClick:m=>f(m.currentTarget),sx:{color:b||"#1e3a8a"},children:Ge(_,{sx:{fontSize:20}})})}),Ge(nn,{component:"input",autoFocus:!0,spellCheck:!1,value:M,placeholder:v,onChange:m=>n.setFormValue("title",m.target.value),sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:18,fontWeight:500,color:"#37352f",p:0,m:0,"&::placeholder":{color:"#c9c8c5",fontWeight:400}}}),Ge(fl,{"aria-label":"\uB2EB\uAE30",onClick:o,sx:{color:"#6b7280"},children:Ge(KT,{})})]}),Ge(um,{sx:{borderColor:"#e6e6e3"}}),Ge(nn,{sx:{flex:1,minHeight:0},children:Ge(UT,{style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:Ge(dl,{...t,contentSyncKey:`create-${x}`})})}),Ge(um,{sx:{borderColor:"#e6e6e3"}}),or(nn,{sx:{display:"flex",justifyContent:"flex-end",gap:1,px:2,py:1.5,flexShrink:0},children:[Ge(pl,{onClick:o,color:"inherit",disabled:y,children:"\uCDE8\uC18C"}),Ge(pl,{onClick:n.submit,variant:"contained",disabled:y,children:y?"\uB4F1\uB85D \uC911\u2026":"\uB4F1\uB85D"})]})]})}),L]})}import{useEffect as Om,useRef as Rm,useState as Pm}from"react";import{Box as Ui,Button as Yy,Divider as zm,Drawer as Xy}from"@mui/material";import Qy from"@mui/icons-material/ShareOutlined";import Zy from"@mui/icons-material/HistoryOutlined";import Jy from"@ehfuse/overlay-scrollbar";import{FormDialog as e0}from"@ehfuse/mui-form-dialog";import{SuccessAlert as qm}from"@ehfuse/alerts";import{useRef as gl,useState as tr}from"react";import{Box as re,Button as pm,Chip as Ni,IconButton as Zo,Tooltip as bm}from"@mui/material";import fm from"@mui/icons-material/Send";import{TextField as GT}from"@ehfuse/mui-form-controls";import Fi from"@mui/icons-material/Close";import jT from"@mui/icons-material/EditOutlined";import YT from"@mui/icons-material/Favorite";import XT from"@mui/icons-material/FavoriteBorderOutlined";import QT from"@mui/icons-material/CheckCircle";import ZT from"@mui/icons-material/CheckCircleOutlineOutlined";import nr from"@mui/icons-material/AttachFileOutlined";import JT from"@mui/icons-material/AddCircleOutline";import ey from"@mui/icons-material/ImageOutlined";var xl=e=>{if(e===0)return"0 Bytes";let o=1024,t=["Bytes","KB","MB","GB","TB"],n=Math.floor(Math.log(e)/Math.log(o));return parseFloat((e/Math.pow(o,n)).toFixed(2))+" "+t[n]};import{Fragment as gm,jsx as V,jsxs as je}from"react/jsx-runtime";var oy=5;function xm({kind:e,reactions:o,myAccountSeq:t,onToggle:n}){let r=o??[],i=t>0&&r.some(s=>s.account_seq===t),a=e==="like"?"\uC88B\uC544\uC694":"\uD655\uC778",l=r.length===0?a:V(re,{sx:{whiteSpace:"pre-line",fontSize:12},children:r.map(s=>`${s.name} \xB7 ${s.time}`).join(`
|
|
8
|
-
`)}),d=e==="like"?"#e5484d":"#2f80ed";return V(bm,{title:l,arrow:!0,enterDelay:300,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:je(re,{sx:{display:"inline-flex",alignItems:"center"},children:[V(Zo,{size:"small","aria-label":`\uB313\uAE00 ${a}`,onClick:n,sx:{color:i?d:"#c9c8c5",p:.5},children:e==="like"?i?V(YT,{sx:{fontSize:16}}):V(XT,{sx:{fontSize:16}}):i?V(QT,{sx:{fontSize:16}}):V(ZT,{sx:{fontSize:16}})}),r.length>0?V(re,{component:"span",sx:{fontSize:12,color:i?d:"#9a9a97",ml:-.25},children:r.length}):null]})})}function hm({taskSeq:e,comments:o,currentUserName:t="",myAccountSeq:n=0,avatarSrcByName:r,onUpdate:i,onRemove:a,onToggleReaction:l,onPreview:d,onDownload:s}){let[u,x]=tr(null),p=gl(null),[c,f]=tr(null),[M,C]=tr(!1),b=Math.max(0,o.length-oy),g=b>0&&!M,I=u?Math.min(u.index,b):b,S=o.map((v,D)=>({comment:v,index:D})).slice(g?I:0),O=fr(),y=v=>{if(d){d(v);return}window.open(O(v.uuid??""),"_blank","noopener,noreferrer")},_=v=>{if(s){s(v);return}window.open(O(v.uuid??"",{download:!0}),"_blank","noopener,noreferrer")},E=Ao().slots?.avatar;return je(re,{sx:{px:2,pb:2,display:"flex",flexDirection:"column",gap:.25},children:[je(re,{sx:{display:"flex",alignItems:"center",gap:1},children:[V(Ut,{sx:{fontSize:18,display:"block",color:"#37352f"}}),je(re,{sx:{fontSize:ol,fontWeight:500,color:"#37352f"},children:["\uB313\uAE00",o.length>0?` (${o.length})`:""]}),b>0&&(!g||I>0)?V(re,{role:"button",tabIndex:0,onClick:()=>C(v=>!v),onKeyDown:v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),C(D=>!D))},sx:{ml:"auto",flexShrink:0,cursor:"pointer",fontSize:14.5,color:"#5b87d6","&:hover":{textDecoration:"underline"}},children:g?`\uC774\uC804 \uB313\uAE00 ${I}\uAC1C \uB354 \uBCF4\uAE30`:"\uC774\uC804 \uB313\uAE00 \uC811\uAE30"}):null]}),o.length===0?V(re,{sx:{mt:1,fontSize:14.5,color:"#9a9a97"},children:"\uB4F1\uB85D\uB41C \uB313\uAE00\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):null,V(re,{sx:{display:"flex",flexDirection:"column",gap:1,mt:1},children:S.map(({comment:v,index:D})=>{let L=!!t&&v.author===t;return je(re,{sx:{display:"flex",gap:1.5,alignItems:"flex-start","&:hover .taskbox-comment-actions":{opacity:1,pointerEvents:"auto"},"&:not(:last-child)":{borderBottom:"1px dashed #e0dfdc",pb:1}},children:[(()=>{let m=r?.get(v.author)??"";return E?V(re,{sx:{display:"inline-flex",flexShrink:0},children:V(E,{name:v.author,src:m||void 0,size:44})}):V(re,{sx:{display:"inline-flex",flexShrink:0},children:V(it,{src:m,avatarSx:{width:44,height:44,fontSize:20,borderRadius:"50%",...Nn[0]},iconFontSize:24})})})(),je(re,{sx:{flex:1,minWidth:0},children:[je(re,{sx:{display:"flex",alignItems:"center",gap:.75,minWidth:0,position:"relative"},children:[V(re,{component:"span",sx:{fontSize:14.5,fontWeight:700,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:v.author}),V(re,{component:"span",sx:{fontSize:12.5,color:"#9a9a97",flexShrink:0,whiteSpace:"nowrap"},children:v.time}),L?V(re,{sx:{ml:"auto"}}):je(re,{sx:{display:"flex",alignItems:"center",gap:.25,ml:"auto",flexShrink:0},children:[V(xm,{kind:"like",reactions:v.likes,myAccountSeq:n,onToggle:()=>l?.(e,D,"like")}),V(xm,{kind:"ack",reactions:v.acks,myAccountSeq:n,onToggle:()=>l?.(e,D,"ack")})]}),L?je(re,{className:"taskbox-comment-actions",sx:{display:"flex",alignItems:"center",gap:.25,position:"absolute",right:0,top:"50%",transform:"translateY(-50%)",pointerEvents:"none",backgroundColor:"#fff",opacity:0,transition:"opacity 0.15s"},children:[V(Zo,{size:"small","aria-label":"\uB313\uAE00 \uC218\uC815",onClick:()=>x({index:D,text:v.text,attachments:[...v.attachments??[]],files:[]}),sx:{color:"#9a9a97"},children:V(jT,{sx:{fontSize:15}})}),V(Zo,{size:"small","aria-label":"\uB313\uAE00 \uC0AD\uC81C",onClick:m=>f({anchorEl:m.currentTarget,index:D}),sx:{color:"#9a9a97"},children:V(Fi,{sx:{fontSize:15}})})]}):null]}),u?.index===D?je(re,{sx:{mt:.5},children:[V(re,{component:"textarea",autoFocus:!0,spellCheck:!1,value:u.text,onChange:m=>x({...u,text:m.target.value}),sx:{width:"100%",minHeight:56,border:"1px solid #dedddb",borderRadius:1,outline:"none",font:"inherit",fontSize:14,p:1,resize:"vertical"}}),je(re,{sx:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:.75,mt:.75},children:[u.attachments.map((m,T)=>{let h=()=>x({...u,attachments:u.attachments.filter((k,P)=>P!==T)});return Hi(m.name)&&m.uuid?je(re,{sx:{position:"relative"},children:[V(re,{component:"img",src:O(m.uuid,{thumb:"md"}),alt:m.name,title:m.name,loading:"lazy",sx:{width:72,height:72,objectFit:"cover",borderRadius:1,border:"1px solid #e6e6e3",display:"block"}}),V(Zo,{size:"small","aria-label":"\uCCA8\uBD80 \uC81C\uAC70",onClick:h,sx:{position:"absolute",top:-6,right:-6,p:.25,bgcolor:"#ffffff",border:"1px solid #e6e6e3","&:hover":{bgcolor:"#f1f5f9"}},children:V(Fi,{sx:{fontSize:14}})})]},`kept-${m.uuid}-${T}`):V(Ni,{size:"small",icon:V(nr,{sx:{fontSize:14}}),label:m.name,onDelete:h,sx:{fontSize:14,height:26,bgcolor:"#f1f5f9"}},`kept-${m.uuid??m.name}-${T}`)}),u.files.map((m,T)=>{let h=()=>x({...u,files:u.files.filter((k,P)=>P!==T)});return Hi(m.name)?je(re,{sx:{position:"relative"},children:[V(re,{component:"img",src:URL.createObjectURL(m),alt:m.name,title:`${m.name} (\uC0C8 \uD30C\uC77C)`,onLoad:k=>URL.revokeObjectURL(k.target.src),sx:{width:72,height:72,objectFit:"cover",borderRadius:1,border:"2px solid #2f80ed",display:"block"}}),V(Zo,{size:"small","aria-label":"\uCCA8\uBD80 \uC81C\uAC70",onClick:h,sx:{position:"absolute",top:-6,right:-6,p:.25,bgcolor:"#ffffff",border:"1px solid #e6e6e3","&:hover":{bgcolor:"#f1f5f9"}},children:V(Fi,{sx:{fontSize:14}})})]},`new-${m.name}-${T}`):V(Ni,{size:"small",icon:V(nr,{sx:{fontSize:14}}),label:`${m.name} (\uC0C8 \uD30C\uC77C)`,onDelete:h,sx:{fontSize:14,height:26,bgcolor:"#eef4ff"}},`new-${m.name}-${T}`)}),V(bm,{title:"\uCCA8\uBD80 \uCD94\uAC00",arrow:!0,children:V(Zo,{size:"small","aria-label":"\uCCA8\uBD80 \uCD94\uAC00",onClick:()=>p.current?.click(),sx:{ml:"auto",color:"#2f80ed"},children:V(JT,{sx:{fontSize:20}})})})]}),je(re,{sx:{display:"flex",justifyContent:"flex-end",alignItems:"center",gap:.75,mt:.5},children:[V(pm,{size:"small",color:"inherit",onClick:()=>x(null),children:"\uCDE8\uC18C"}),V(pm,{size:"small",variant:"contained",disabled:!u.text.trim()&&u.attachments.length===0&&u.files.length===0,onClick:()=>{i(e,D,u.text,{attachments:u.attachments,files:u.files}),x(null)},children:"\uC800\uC7A5"})]}),V(re,{component:"input",type:"file",multiple:!0,ref:p,sx:{display:"none"},onChange:m=>{let T=Array.from(m.target.files??[]);T.length>0&&x({...u,files:[...u.files,...T].slice(0,10)}),m.target.value=""}})]}):je(re,{children:[v.text?V(re,{sx:{fontSize:15,whiteSpace:"pre-wrap"},children:v.text}):null,(v.attachments??[]).length>0?V(re,{sx:{display:"flex",flexWrap:"wrap",gap:.75,mt:.75},children:(v.attachments??[]).map((m,T)=>{let h=!!m.uuid;if(Hi(m.name)&&h)return V(re,{component:"img",src:O(m.uuid??"",{thumb:"md"}),alt:m.name,title:`${m.name} \uD06C\uAC8C \uBCF4\uAE30`,loading:"lazy",onClick:()=>y(m),sx:{width:96,height:96,objectFit:"cover",borderRadius:1,border:"1px solid #e6e6e3",cursor:"pointer",bgcolor:"#f8fafc"}},`${m.name}-${T}`);let P=Ei(m.name);return V(Ni,{size:"small",icon:V(nr,{sx:{fontSize:14}}),label:`${m.name} (${xl(m.size)})`,clickable:h,onClick:h?()=>P?y(m):_(m):void 0,title:h?`${m.name} ${P?"\uBBF8\uB9AC\uBCF4\uAE30":"\uB2E4\uC6B4\uB85C\uB4DC"}`:m.name,sx:{fontSize:14,height:26,bgcolor:"#f1f5f9"}},`${m.name}-${T}`)})}):null]})]})]},`${v.time}-${D}`)})}),V(We,{open:!!c,anchorEl:c?.anchorEl??null,title:"\uC774 \uB313\uAE00\uC744 \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uC0AD\uC81C",onCancel:()=>f(null),onConfirm:()=>{c&&(a(e,c.index),x(null)),f(null)}})]})}function Hi(e){return/\.(png|jpe?g|gif|webp|bmp|svg|heic|heif)$/i.test(String(e??"").trim())}function km({onSubmit:e}){let[o,t]=tr(""),[n,r]=tr([]),[i,a]=tr(!1),l=gl(null),d=gl(null),s=_e(),u=c=>{let f=Array.from(c??[]);f.length!==0&&r(M=>[...M,...f].slice(0,10))},x=()=>{let c=o.trim();!c&&n.length===0||(e(c,n.length>0?n:void 0),t(""),r([]))},p=je(gm,{children:[V(Zo,{size:"small","aria-label":"\uD30C\uC77C \uCCA8\uBD80",onClick:()=>l.current?.click(),sx:{color:"#9a9a97"},children:V(nr,{sx:{fontSize:20}})}),V(Zo,{size:"small","aria-label":"\uC774\uBBF8\uC9C0 \uCCA8\uBD80",onClick:()=>d.current?.click(),sx:{color:"#9a9a97"},children:V(ey,{sx:{fontSize:20}})})]});return je(re,{children:[n.length>0?V(re,{sx:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:.75,px:2,pt:1},children:n.map((c,f)=>Hi(c.name)?je(re,{sx:{position:"relative"},children:[V(re,{component:"img",src:URL.createObjectURL(c),alt:c.name,title:c.name,onLoad:M=>URL.revokeObjectURL(M.target.src),sx:{width:72,height:72,objectFit:"cover",borderRadius:1,border:"1px solid #e6e6e3",display:"block"}}),V(Zo,{size:"small","aria-label":"\uCCA8\uBD80 \uC81C\uAC70",onClick:()=>r(M=>M.filter((C,b)=>b!==f)),sx:{position:"absolute",top:-6,right:-6,p:.25,bgcolor:"#ffffff",border:"1px solid #e6e6e3","&:hover":{bgcolor:"#f1f5f9"}},children:V(Fi,{sx:{fontSize:14}})})]},`${c.name}-${f}`):V(Ni,{size:"small",icon:V(nr,{sx:{fontSize:14}}),label:`${c.name} (${xl(c.size)})`,onDelete:()=>r(M=>M.filter((C,b)=>b!==f)),sx:{fontSize:14,height:26,bgcolor:"#f1f5f9"}},`${c.name}-${f}`))}):null,je(re,{sx:{position:"relative",display:"flex"},onDragOver:c=>{Array.from(c.dataTransfer?.types??[]).includes("Files")&&(c.preventDefault(),a(!0))},onDragLeave:c=>{c.currentTarget.contains(c.relatedTarget)||a(!1)},onDrop:c=>{Array.from(c.dataTransfer?.types??[]).includes("Files")&&(c.preventDefault(),a(!1),u(c.dataTransfer?.files??null))},children:[i?je(re,{sx:{position:"absolute",inset:0,zIndex:2,display:"flex",alignItems:"center",justifyContent:"center",gap:.75,borderRadius:1,border:"2px dashed #2f80ed",bgcolor:"rgba(47,128,237,0.08)",color:"#2f80ed",fontSize:14,fontWeight:600,pointerEvents:"none"},children:[V(nr,{sx:{fontSize:18}}),"\uC5EC\uAE30\uC5D0 \uB193\uC73C\uBA74 \uCCA8\uBD80\uB429\uB2C8\uB2E4"]}):null,V(GT,{value:o,placeholder:"\uB313\uAE00\uC744 \uC785\uB825\uD558\uC138\uC694",onChange:c=>t(c.target.value),fullWidth:!0,multiline:!0,minRows:s?1:3,maxRows:3,sx:{"& .MuiInputBase-root":{pl:2,pr:s?15:6.5,pb:s?void 0:5,borderRadius:0},"& .MuiOutlinedInput-notchedOutline":{border:"none"}}}),s?je(re,{sx:{position:"absolute",right:8,top:"50%",transform:"translateY(-50%)",display:"flex",alignItems:"center",gap:.25},children:[p,V(Zo,{"aria-label":"\uB313\uAE00 \uB4F1\uB85D",disabled:!o.trim()&&n.length===0,onClick:x,sx:{color:"#2563eb","&.Mui-disabled":{color:"#c9c8c5"}},children:V(fm,{sx:{fontSize:22}})})]}):je(gm,{children:[V(re,{sx:{position:"absolute",left:8,bottom:6,display:"flex",alignItems:"center",gap:.25},children:p}),V(Zo,{"aria-label":"\uB313\uAE00 \uB4F1\uB85D",disabled:!o.trim()&&n.length===0,onClick:x,sx:{position:"absolute",right:8,top:"50%",transform:"translateY(-50%)",color:"#2563eb","&.Mui-disabled":{color:"#c9c8c5"}},children:V(fm,{sx:{fontSize:22}})})]})]}),V(re,{component:"input",ref:l,type:"file",multiple:!0,onChange:c=>{u(c.target.files),c.target.value=""},sx:{display:"none"}}),V(re,{component:"input",ref:d,type:"file",accept:"image/*",multiple:!0,onChange:c=>{u(c.target.files),c.target.value=""},sx:{display:"none"}})]})}import{useState as bl}from"react";import{Box as Ki,Checkbox as dy,IconButton as ir,Tooltip as zr}from"@mui/material";import py from"@mui/icons-material/Close";import fy from"@mui/icons-material/ArrowBack";import xy from"@mui/icons-material/ShareOutlined";import gy from"@mui/icons-material/ContentCopyOutlined";import by from"@mui/icons-material/CheckCircle";import hy from"@mui/icons-material/CheckCircleOutlineOutlined";import ky from"@mui/icons-material/HistoryOutlined";import Ty from"@mui/icons-material/PrintOutlined";import{useEffect as ty}from"react";import{Box as qt,Button as ny,CircularProgress as ry}from"@mui/material";import{FormDialog as iy}from"@ehfuse/mui-form-dialog";import{OverlayScrollbar as ay}from"@ehfuse/overlay-scrollbar";import{jsx as At,jsxs as Wi}from"react/jsx-runtime";var ly={created:"\uC5C5\uBB34\uB97C \uB4F1\uB85D\uD588\uC2B5\uB2C8\uB2E4",completed:"\uC644\uB8CC \uCC98\uB9AC\uD588\uC2B5\uB2C8\uB2E4",uncompleted:"\uC644\uB8CC\uB97C \uD574\uC81C\uD588\uC2B5\uB2C8\uB2E4",confirm_requested:"\uD655\uC778\uC744 \uC694\uCCAD\uD588\uC2B5\uB2C8\uB2E4",acked:"\uD655\uC778\uD588\uC2B5\uB2C8\uB2E4",claimed:"\uC5C5\uBB34\uB97C \uAC00\uC838\uAC14\uC2B5\uB2C8\uB2E4",bug_verified:"\uC218\uC815\uC744 \uD655\uC778\uD588\uC2B5\uB2C8\uB2E4(\uC885\uB8CC)",bug_reopened:"\uC7AC\uC624\uD508\uD588\uC2B5\uB2C8\uB2E4"};function Tm(e){return String(e??"").trim()||"\uC5C6\uC74C"}function sy(e){if(e.kind!=="field")return ly[String(e.kind)]??"\uBCC0\uACBD\uD588\uC2B5\uB2C8\uB2E4";let o=String(e.field_label??e.field??"").trim()||"\uD56D\uBAA9",t=String(e.old_value??"").trim(),n=String(e.new_value??"").trim();return!t&&n?`${o}\uC744(\uB97C) "${n}"(\uC73C)\uB85C \uC785\uB825\uD588\uC2B5\uB2C8\uB2E4`:t&&!n?`${o}\uC744(\uB97C) \uBE44\uC6E0\uC2B5\uB2C8\uB2E4`:`${o}\uC744(\uB97C) "${Tm(t)}" \u2192 "${Tm(n)}" \uB85C \uBC14\uAFE8\uC2B5\uB2C8\uB2E4`}function $i({open:e,taskSeq:o,items:t,loading:n,onLoad:r,onClose:i}){let a=_e();ty(()=>{e&&o>0&&!t&&r?.(o)},[e,o,t,r]);let l=At(qt,{sx:{height:a?"100%":420,minHeight:0},children:At(ay,{style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:Wi(qt,{sx:{px:2,pt:2,display:"flex",flexDirection:"column",gap:1,"&::after":{content:'""',flexShrink:0,height:16}},children:[n&&!t?Wi(qt,{sx:{display:"flex",alignItems:"center",gap:1,color:"#9a9a97",fontSize:14.5},children:[At(ry,{size:14,thickness:5,sx:{color:"#9a9a97"}}),"\uBD88\uB7EC\uC624\uB294 \uC911\u2026"]}):null,t&&t.length===0?At(qt,{sx:{fontSize:14.5,color:"#9a9a97"},children:"\uAE30\uB85D\uB41C \uD65C\uB3D9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):null,(t??[]).map(d=>Wi(qt,{sx:{display:"flex",flexDirection:a?"column":"row",gap:a?.25:1,alignItems:a?"stretch":"baseline",minWidth:0,flexShrink:0,...a?{pb:1,borderBottom:"1px solid #ededeb","&:last-of-type":{borderBottom:"none",pb:0}}:{}},children:[At(qt,{sx:{flexShrink:0,...a?{}:{width:"10.5em"},whiteSpace:"nowrap",fontSize:13.5,color:"#9a9a97",lineHeight:1.5},children:Go(d.acted_time)}),Wi(qt,{sx:{minWidth:0,fontSize:14.5,color:"#37352f",lineHeight:1.5},children:[At(qt,{component:"span",sx:{fontWeight:500},children:String(d.actor_name??"").trim()||"\uC774\uB984\uC5C6\uC74C"}),At(qt,{component:"span",sx:{ml:.5},children:sy(d)})]})]},d.seq))]})})});return At(iy,{open:e,onClose:i,maxWidth:"sm",fullScreen:a,mobilePresentation:a?"slide":"dialog",contentPaddingX:0,contentTopPadding:0,contentBottomPadding:0,sectionsPaddingTop:0,sectionContentPaddingTop:0,sx:a?{DialogContent:{pb:0,"& .os-content > div":{height:"100%",boxSizing:"border-box",paddingBottom:0,marginBottom:0},"& .FormSection-content, & .section-content":{height:"100%",paddingBottom:0,marginBottom:0}}}:void 0,title:`\uD65C\uB3D9${t&&t.length>0?` (${t.length})`:""}`,locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-task-activity",sections:[{id:"task-activity",showTitle:!1,children:l}],scrollPastLastSection:!1,actions:{showCancelButton:!1,right:At(ny,{variant:"contained",onClick:i,children:"\uB2EB\uAE30"})}})}import{InfoAlert as cy,SuccessAlert as my}from"@ehfuse/alerts";var ym=e=>e?e.replace(/<(script|style)[\s\S]*?<\/\1>/gi,"").replace(/<br\s*\/?>/gi,`
|
|
8
|
+
`)}),d=e==="like"?"#e5484d":"#2f80ed";return V(bm,{title:l,arrow:!0,enterDelay:300,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:je(re,{sx:{display:"inline-flex",alignItems:"center"},children:[V(Zo,{size:"small","aria-label":`\uB313\uAE00 ${a}`,onClick:n,sx:{color:i?d:"#c9c8c5",p:.5},children:e==="like"?i?V(YT,{sx:{fontSize:16}}):V(XT,{sx:{fontSize:16}}):i?V(QT,{sx:{fontSize:16}}):V(ZT,{sx:{fontSize:16}})}),r.length>0?V(re,{component:"span",sx:{fontSize:12,color:i?d:"#9a9a97",ml:-.25},children:r.length}):null]})})}function hm({taskSeq:e,comments:o,currentUserName:t="",myAccountSeq:n=0,avatarSrcByName:r,onUpdate:i,onRemove:a,onToggleReaction:l,onPreview:d,onDownload:s}){let[u,x]=tr(null),p=gl(null),[c,f]=tr(null),[M,C]=tr(!1),b=Math.max(0,o.length-oy),g=b>0&&!M,I=u?Math.min(u.index,b):b,S=o.map((v,D)=>({comment:v,index:D})).slice(g?I:0),O=fr(),y=v=>{if(d){d(v);return}window.open(O(v.uuid??""),"_blank","noopener,noreferrer")},_=v=>{if(s){s(v);return}window.open(O(v.uuid??"",{download:!0}),"_blank","noopener,noreferrer")},E=Ao().slots?.avatar;return je(re,{sx:{px:2,pb:2,display:"flex",flexDirection:"column",gap:.25},children:[je(re,{sx:{display:"flex",alignItems:"center",gap:1},children:[V(Ut,{sx:{fontSize:18,display:"block",color:"#37352f"}}),je(re,{sx:{fontSize:ol,fontWeight:500,color:"#37352f"},children:["\uB313\uAE00",o.length>0?` (${o.length})`:""]}),b>0&&(!g||I>0)?V(re,{role:"button",tabIndex:0,onClick:()=>C(v=>!v),onKeyDown:v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),C(D=>!D))},sx:{ml:"auto",flexShrink:0,cursor:"pointer",fontSize:14.5,color:"#5b87d6","&:hover":{textDecoration:"underline"}},children:g?`\uC774\uC804 \uB313\uAE00 ${I}\uAC1C \uB354 \uBCF4\uAE30`:"\uC774\uC804 \uB313\uAE00 \uC811\uAE30"}):null]}),o.length===0?V(re,{sx:{mt:1,fontSize:14.5,color:"#9a9a97"},children:"\uB4F1\uB85D\uB41C \uB313\uAE00\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):null,V(re,{sx:{display:"flex",flexDirection:"column",gap:1,mt:1},children:S.map(({comment:v,index:D})=>{let L=!!t&&v.author===t;return je(re,{sx:{display:"flex",gap:1.5,alignItems:"flex-start","&:hover .taskbox-comment-actions":{opacity:1,pointerEvents:"auto"},"&:not(:last-child)":{borderBottom:"1px dashed #e0dfdc",pb:1}},children:[(()=>{let m=r?.get(v.author)??"";return E?V(re,{sx:{display:"inline-flex",flexShrink:0},children:V(E,{name:v.author,src:m||void 0,size:44})}):V(re,{sx:{display:"inline-flex",flexShrink:0},children:V(it,{src:m,avatarSx:{width:44,height:44,fontSize:20,borderRadius:"50%",...Nn[0]},iconFontSize:24})})})(),je(re,{sx:{flex:1,minWidth:0},children:[je(re,{sx:{display:"flex",alignItems:"center",gap:.75,minWidth:0,position:"relative"},children:[V(re,{component:"span",sx:{fontSize:14.5,fontWeight:700,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:v.author}),V(re,{component:"span",sx:{fontSize:12.5,color:"#9a9a97",flexShrink:0,whiteSpace:"nowrap"},children:v.time}),L?V(re,{sx:{ml:"auto"}}):je(re,{sx:{display:"flex",alignItems:"center",gap:.25,ml:"auto",flexShrink:0},children:[V(xm,{kind:"like",reactions:v.likes,myAccountSeq:n,onToggle:()=>l?.(e,D,"like")}),V(xm,{kind:"ack",reactions:v.acks,myAccountSeq:n,onToggle:()=>l?.(e,D,"ack")})]}),L?je(re,{className:"taskbox-comment-actions",sx:{display:"flex",alignItems:"center",gap:.25,position:"absolute",right:0,top:"50%",transform:"translateY(-50%)",pointerEvents:"none",backgroundColor:"#fff",opacity:0,transition:"opacity 0.15s"},children:[V(Zo,{size:"small","aria-label":"\uB313\uAE00 \uC218\uC815",onClick:()=>x({index:D,text:v.text,attachments:[...v.attachments??[]],files:[]}),sx:{color:"#9a9a97"},children:V(jT,{sx:{fontSize:15}})}),V(Zo,{size:"small","aria-label":"\uB313\uAE00 \uC0AD\uC81C",onClick:m=>f({anchorEl:m.currentTarget,index:D}),sx:{color:"#9a9a97"},children:V(Fi,{sx:{fontSize:15}})})]}):null]}),u?.index===D?je(re,{sx:{mt:.5},children:[V(re,{component:"textarea",autoFocus:!0,spellCheck:!1,value:u.text,onChange:m=>x({...u,text:m.target.value}),sx:{width:"100%",minHeight:56,border:"1px solid #dedddb",borderRadius:1,outline:"none",font:"inherit",fontSize:14,p:1,resize:"vertical"}}),je(re,{sx:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:.75,mt:.75},children:[u.attachments.map((m,T)=>{let h=()=>x({...u,attachments:u.attachments.filter((k,P)=>P!==T)});return Hi(m.name)&&m.uuid?je(re,{sx:{position:"relative"},children:[V(re,{component:"img",src:O(m.uuid,{thumb:"md"}),alt:m.name,title:m.name,loading:"lazy",sx:{width:72,height:72,objectFit:"cover",borderRadius:1,border:"1px solid #e6e6e3",display:"block"}}),V(Zo,{size:"small","aria-label":"\uCCA8\uBD80 \uC81C\uAC70",onClick:h,sx:{position:"absolute",top:-6,right:-6,p:.25,bgcolor:"#ffffff",border:"1px solid #e6e6e3","&:hover":{bgcolor:"#f1f5f9"}},children:V(Fi,{sx:{fontSize:14}})})]},`kept-${m.uuid}-${T}`):V(Ni,{size:"small",icon:V(nr,{sx:{fontSize:14}}),label:m.name,onDelete:h,sx:{fontSize:14,height:26,bgcolor:"#f1f5f9"}},`kept-${m.uuid??m.name}-${T}`)}),u.files.map((m,T)=>{let h=()=>x({...u,files:u.files.filter((k,P)=>P!==T)});return Hi(m.name)?je(re,{sx:{position:"relative"},children:[V(re,{component:"img",src:URL.createObjectURL(m),alt:m.name,title:`${m.name} (\uC0C8 \uD30C\uC77C)`,onLoad:k=>URL.revokeObjectURL(k.target.src),sx:{width:72,height:72,objectFit:"cover",borderRadius:1,border:"2px solid #2f80ed",display:"block"}}),V(Zo,{size:"small","aria-label":"\uCCA8\uBD80 \uC81C\uAC70",onClick:h,sx:{position:"absolute",top:-6,right:-6,p:.25,bgcolor:"#ffffff",border:"1px solid #e6e6e3","&:hover":{bgcolor:"#f1f5f9"}},children:V(Fi,{sx:{fontSize:14}})})]},`new-${m.name}-${T}`):V(Ni,{size:"small",icon:V(nr,{sx:{fontSize:14}}),label:`${m.name} (\uC0C8 \uD30C\uC77C)`,onDelete:h,sx:{fontSize:14,height:26,bgcolor:"#eef4ff"}},`new-${m.name}-${T}`)}),V(bm,{title:"\uCCA8\uBD80 \uCD94\uAC00",arrow:!0,children:V(Zo,{size:"small","aria-label":"\uCCA8\uBD80 \uCD94\uAC00",onClick:()=>p.current?.click(),sx:{ml:"auto",color:"#2f80ed"},children:V(JT,{sx:{fontSize:20}})})})]}),je(re,{sx:{display:"flex",justifyContent:"flex-end",alignItems:"center",gap:.75,mt:.5},children:[V(pm,{size:"small",color:"inherit",onClick:()=>x(null),children:"\uCDE8\uC18C"}),V(pm,{size:"small",variant:"contained",disabled:!u.text.trim()&&u.attachments.length===0&&u.files.length===0,onClick:()=>{i(e,D,u.text,{attachments:u.attachments,files:u.files}),x(null)},children:"\uC800\uC7A5"})]}),V(re,{component:"input",type:"file",multiple:!0,ref:p,sx:{display:"none"},onChange:m=>{let T=Array.from(m.target.files??[]);T.length>0&&x({...u,files:[...u.files,...T].slice(0,10)}),m.target.value=""}})]}):je(re,{children:[v.text?V(re,{sx:{fontSize:15,whiteSpace:"pre-wrap"},children:v.text}):null,(v.attachments??[]).length>0?V(re,{sx:{display:"flex",flexWrap:"wrap",gap:.75,mt:.75},children:(v.attachments??[]).map((m,T)=>{let h=!!m.uuid;if(Hi(m.name)&&h)return V(re,{component:"img",src:O(m.uuid??"",{thumb:"md"}),alt:m.name,title:`${m.name} \uD06C\uAC8C \uBCF4\uAE30`,loading:"lazy",onClick:()=>y(m),sx:{width:96,height:96,objectFit:"cover",borderRadius:1,border:"1px solid #e6e6e3",cursor:"pointer",bgcolor:"#f8fafc"}},`${m.name}-${T}`);let P=Ei(m.name);return V(Ni,{size:"small",icon:V(nr,{sx:{fontSize:14}}),label:`${m.name} (${xl(m.size)})`,clickable:h,onClick:h?()=>P?y(m):_(m):void 0,title:h?`${m.name} ${P?"\uBBF8\uB9AC\uBCF4\uAE30":"\uB2E4\uC6B4\uB85C\uB4DC"}`:m.name,sx:{fontSize:14,height:26,bgcolor:"#f1f5f9"}},`${m.name}-${T}`)})}):null]})]})]},`${v.time}-${D}`)})}),V(We,{open:!!c,anchorEl:c?.anchorEl??null,title:"\uC774 \uB313\uAE00\uC744 \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uC0AD\uC81C",onCancel:()=>f(null),onConfirm:()=>{c&&(a(e,c.index),x(null)),f(null)}})]})}function Hi(e){return/\.(png|jpe?g|gif|webp|bmp|svg|heic|heif)$/i.test(String(e??"").trim())}function km({onSubmit:e}){let[o,t]=tr(""),[n,r]=tr([]),[i,a]=tr(!1),l=gl(null),d=gl(null),s=_e(),u=c=>{let f=Array.from(c??[]);f.length!==0&&r(M=>[...M,...f].slice(0,10))},x=()=>{let c=o.trim();!c&&n.length===0||(e(c,n.length>0?n:void 0),t(""),r([]))},p=je(gm,{children:[V(Zo,{size:"small","aria-label":"\uD30C\uC77C \uCCA8\uBD80",onClick:()=>l.current?.click(),sx:{color:"#9a9a97"},children:V(nr,{sx:{fontSize:20}})}),V(Zo,{size:"small","aria-label":"\uC774\uBBF8\uC9C0 \uCCA8\uBD80",onClick:()=>d.current?.click(),sx:{color:"#9a9a97"},children:V(ey,{sx:{fontSize:20}})})]});return je(re,{children:[n.length>0?V(re,{sx:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:.75,px:2,pt:1},children:n.map((c,f)=>Hi(c.name)?je(re,{sx:{position:"relative"},children:[V(re,{component:"img",src:URL.createObjectURL(c),alt:c.name,title:c.name,onLoad:M=>URL.revokeObjectURL(M.target.src),sx:{width:72,height:72,objectFit:"cover",borderRadius:1,border:"1px solid #e6e6e3",display:"block"}}),V(Zo,{size:"small","aria-label":"\uCCA8\uBD80 \uC81C\uAC70",onClick:()=>r(M=>M.filter((C,b)=>b!==f)),sx:{position:"absolute",top:-6,right:-6,p:.25,bgcolor:"#ffffff",border:"1px solid #e6e6e3","&:hover":{bgcolor:"#f1f5f9"}},children:V(Fi,{sx:{fontSize:14}})})]},`${c.name}-${f}`):V(Ni,{size:"small",icon:V(nr,{sx:{fontSize:14}}),label:`${c.name} (${xl(c.size)})`,onDelete:()=>r(M=>M.filter((C,b)=>b!==f)),sx:{fontSize:14,height:26,bgcolor:"#f1f5f9"}},`${c.name}-${f}`))}):null,je(re,{sx:{position:"relative",display:"flex"},onDragOver:c=>{Array.from(c.dataTransfer?.types??[]).includes("Files")&&(c.preventDefault(),a(!0))},onDragLeave:c=>{c.currentTarget.contains(c.relatedTarget)||a(!1)},onDrop:c=>{Array.from(c.dataTransfer?.types??[]).includes("Files")&&(c.preventDefault(),a(!1),u(c.dataTransfer?.files??null))},children:[i?je(re,{sx:{position:"absolute",inset:0,zIndex:2,display:"flex",alignItems:"center",justifyContent:"center",gap:.75,borderRadius:1,border:"2px dashed #2f80ed",bgcolor:"rgba(47,128,237,0.08)",color:"#2f80ed",fontSize:14,fontWeight:600,pointerEvents:"none"},children:[V(nr,{sx:{fontSize:18}}),"\uC5EC\uAE30\uC5D0 \uB193\uC73C\uBA74 \uCCA8\uBD80\uB429\uB2C8\uB2E4"]}):null,V(GT,{value:o,placeholder:"\uB313\uAE00\uC744 \uC785\uB825\uD558\uC138\uC694",onChange:c=>t(c.target.value),fullWidth:!0,multiline:!0,minRows:s?1:3,maxRows:3,sx:{"& .MuiInputBase-root":{pl:2,pr:s?15:6.5,pb:s?void 0:5,borderRadius:0},"& .MuiOutlinedInput-notchedOutline":{border:"none"}}}),s?je(re,{sx:{position:"absolute",right:8,top:"50%",transform:"translateY(-50%)",display:"flex",alignItems:"center",gap:.25},children:[p,V(Zo,{"aria-label":"\uB313\uAE00 \uB4F1\uB85D",disabled:!o.trim()&&n.length===0,onClick:x,sx:{color:"#2563eb","&.Mui-disabled":{color:"#c9c8c5"}},children:V(fm,{sx:{fontSize:22}})})]}):je(gm,{children:[V(re,{sx:{position:"absolute",left:8,bottom:6,display:"flex",alignItems:"center",gap:.25},children:p}),V(Zo,{"aria-label":"\uB313\uAE00 \uB4F1\uB85D",disabled:!o.trim()&&n.length===0,onClick:x,sx:{position:"absolute",right:8,top:"50%",transform:"translateY(-50%)",color:"#2563eb","&.Mui-disabled":{color:"#c9c8c5"}},children:V(fm,{sx:{fontSize:22}})})]})]}),V(re,{component:"input",ref:l,type:"file",multiple:!0,onChange:c=>{u(c.target.files),c.target.value=""},sx:{display:"none"}}),V(re,{component:"input",ref:d,type:"file",accept:"image/*",multiple:!0,onChange:c=>{u(c.target.files),c.target.value=""},sx:{display:"none"}})]})}import{useState as bl}from"react";import{Box as Ki,Checkbox as dy,IconButton as ir,Tooltip as zr}from"@mui/material";import py from"@mui/icons-material/Close";import fy from"@mui/icons-material/ArrowBack";import xy from"@mui/icons-material/ShareOutlined";import gy from"@mui/icons-material/ContentCopyOutlined";import by from"@mui/icons-material/CheckCircle";import hy from"@mui/icons-material/CheckCircleOutlineOutlined";import ky from"@mui/icons-material/HistoryOutlined";import Ty from"@mui/icons-material/Print";import{useEffect as ty}from"react";import{Box as qt,Button as ny,CircularProgress as ry}from"@mui/material";import{FormDialog as iy}from"@ehfuse/mui-form-dialog";import{OverlayScrollbar as ay}from"@ehfuse/overlay-scrollbar";import{jsx as At,jsxs as Wi}from"react/jsx-runtime";var ly={created:"\uC5C5\uBB34\uB97C \uB4F1\uB85D\uD588\uC2B5\uB2C8\uB2E4",completed:"\uC644\uB8CC \uCC98\uB9AC\uD588\uC2B5\uB2C8\uB2E4",uncompleted:"\uC644\uB8CC\uB97C \uD574\uC81C\uD588\uC2B5\uB2C8\uB2E4",confirm_requested:"\uD655\uC778\uC744 \uC694\uCCAD\uD588\uC2B5\uB2C8\uB2E4",acked:"\uD655\uC778\uD588\uC2B5\uB2C8\uB2E4",claimed:"\uC5C5\uBB34\uB97C \uAC00\uC838\uAC14\uC2B5\uB2C8\uB2E4",bug_verified:"\uC218\uC815\uC744 \uD655\uC778\uD588\uC2B5\uB2C8\uB2E4(\uC885\uB8CC)",bug_reopened:"\uC7AC\uC624\uD508\uD588\uC2B5\uB2C8\uB2E4"};function Tm(e){return String(e??"").trim()||"\uC5C6\uC74C"}function sy(e){if(e.kind!=="field")return ly[String(e.kind)]??"\uBCC0\uACBD\uD588\uC2B5\uB2C8\uB2E4";let o=String(e.field_label??e.field??"").trim()||"\uD56D\uBAA9",t=String(e.old_value??"").trim(),n=String(e.new_value??"").trim();return!t&&n?`${o}\uC744(\uB97C) "${n}"(\uC73C)\uB85C \uC785\uB825\uD588\uC2B5\uB2C8\uB2E4`:t&&!n?`${o}\uC744(\uB97C) \uBE44\uC6E0\uC2B5\uB2C8\uB2E4`:`${o}\uC744(\uB97C) "${Tm(t)}" \u2192 "${Tm(n)}" \uB85C \uBC14\uAFE8\uC2B5\uB2C8\uB2E4`}function $i({open:e,taskSeq:o,items:t,loading:n,onLoad:r,onClose:i}){let a=_e();ty(()=>{e&&o>0&&!t&&r?.(o)},[e,o,t,r]);let l=At(qt,{sx:{height:a?"100%":420,minHeight:0},children:At(ay,{style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:Wi(qt,{sx:{px:2,pt:2,display:"flex",flexDirection:"column",gap:1,"&::after":{content:'""',flexShrink:0,height:16}},children:[n&&!t?Wi(qt,{sx:{display:"flex",alignItems:"center",gap:1,color:"#9a9a97",fontSize:14.5},children:[At(ry,{size:14,thickness:5,sx:{color:"#9a9a97"}}),"\uBD88\uB7EC\uC624\uB294 \uC911\u2026"]}):null,t&&t.length===0?At(qt,{sx:{fontSize:14.5,color:"#9a9a97"},children:"\uAE30\uB85D\uB41C \uD65C\uB3D9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):null,(t??[]).map(d=>Wi(qt,{sx:{display:"flex",flexDirection:a?"column":"row",gap:a?.25:1,alignItems:a?"stretch":"baseline",minWidth:0,flexShrink:0,...a?{pb:1,borderBottom:"1px solid #ededeb","&:last-of-type":{borderBottom:"none",pb:0}}:{}},children:[At(qt,{sx:{flexShrink:0,...a?{}:{width:"10.5em"},whiteSpace:"nowrap",fontSize:13.5,color:"#9a9a97",lineHeight:1.5},children:Go(d.acted_time)}),Wi(qt,{sx:{minWidth:0,fontSize:14.5,color:"#37352f",lineHeight:1.5},children:[At(qt,{component:"span",sx:{fontWeight:500},children:String(d.actor_name??"").trim()||"\uC774\uB984\uC5C6\uC74C"}),At(qt,{component:"span",sx:{ml:.5},children:sy(d)})]})]},d.seq))]})})});return At(iy,{open:e,onClose:i,maxWidth:"sm",fullScreen:a,mobilePresentation:a?"slide":"dialog",contentPaddingX:0,contentTopPadding:0,contentBottomPadding:0,sectionsPaddingTop:0,sectionContentPaddingTop:0,sx:a?{DialogContent:{pb:0,"& .os-content > div":{height:"100%",boxSizing:"border-box",paddingBottom:0,marginBottom:0},"& .FormSection-content, & .section-content":{height:"100%",paddingBottom:0,marginBottom:0}}}:void 0,title:`\uD65C\uB3D9${t&&t.length>0?` (${t.length})`:""}`,locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-task-activity",sections:[{id:"task-activity",showTitle:!1,children:l}],scrollPastLastSection:!1,actions:{showCancelButton:!1,right:At(ny,{variant:"contained",onClick:i,children:"\uB2EB\uAE30"})}})}import{InfoAlert as cy,SuccessAlert as my}from"@ehfuse/alerts";var ym=e=>e?e.replace(/<(script|style)[\s\S]*?<\/\1>/gi,"").replace(/<br\s*\/?>/gi,`
|
|
9
9
|
`).replace(/<\/(p|div|li|h[1-6]|tr)>/gi,`
|
|
10
10
|
`).replace(/<[^>]+>/g,"").replace(/ /gi," ").replace(/</gi,"<").replace(/>/gi,">").replace(/"/gi,'"').replace(/'/gi,"'").replace(/&/gi,"&").replace(/\n{3,}/g,`
|
|
11
11
|
|
|
12
12
|
`).trim():"";function uy(e){let o=[`[\uC5C5\uBB34] ${e.title}`],t=at(e.start_date),n=at(e.due_date);(t||n)&&o.push(`\uAE30\uAC04: ${t&&n?`${t} ~ ${n}`:t||n}`),e.manager_name&&o.push(`\uCC45\uC784\uC790: ${e.manager_name}`);let r=Do(e).name;r&&o.push(`\uC0C1\uD0DC: ${r}`);let i=ym(e.content);i&&o.push("",i);let a=String(e.note??"").trim();return a&&o.push("",`\uBE44\uACE0: ${a}`),o.join(`
|
|
13
|
-
`)}function Sm(e){navigator.clipboard.writeText(e).then(()=>my("\uC5C5\uBB34 \uB0B4\uC6A9\uC744 \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>cy("\uBCF5\uC0AC\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uB0B4\uC6A9\uC744 \uC9C1\uC811 \uC120\uD0DD\uD574 \uBCF5\uC0AC\uD574 \uC8FC\uC138\uC694."))}function rr(e,o){let t=uy(e);if(o&&typeof navigator.share=="function"){navigator.share({text:t}).catch(n=>{n?.name!=="AbortError"&&Sm(t)});return}Sm(t)}import{Fragment as yy,jsx as Re,jsxs as Bm}from"react/jsx-runtime";function Cm({task:e,myAccountSeq:o=0,onToggleCompleted:t,onChangeTitle:n,onChangeIcon:r,onChangeIconColor:i,onClose:a,appBarMode:l=!1,activityItems:d,activityLoading:s,onLoadActivity:u,onPrint:x}){let p=_e(),[c,f]=bl(!1),[M,C]=bl(null),[b,g]=bl(null),I=zn(e.icon||(e.is_notice?wo:e.is_event?"event":Oe)),S=!!e.is_notice,O=!!e.is_event,y=S&&o>0&&(e.author_account_seq??0)===o,_=!ht(e,o),E=!O&&(S?y:(e.author_account_seq??0)===o||(e.manager_account_seq??0)===o);return Bm(yy,{children:[Bm(Ki,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1.5,flexShrink:0},children:[l&&a?Re(ir,{"aria-label":"\uB4A4\uB85C",onClick:a,sx:{color:"#37352f",ml:-1},children:Re(fy,{})}):null,E&&!l?Re(zr,{title:e.completed&&e.completed_by?`${e.completed_by} \xB7 ${Go(e.completed_time)} \uC644\uB8CC`:e.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC",arrow:!0,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:Re(dy,{checked:e.completed,icon:Re(hy,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:Re(by,{sx:{fontSize:22,color:"#2f80ed"}}),onChange:(v,D)=>t(e.seq,D),sx:{p:0}})}):null,l?null:Re(zr,{title:_?"":"\uC544\uC774\uCF58 \uBCC0\uACBD",arrow:!0,children:Re(ir,{size:"small",onClick:_?void 0:v=>g(v.currentTarget),sx:{color:e.icon_color||(S?"#e5484d":"#1e3a8a")},children:Re(I,{sx:{fontSize:20}})})}),M!==null?Re(Ki,{component:"input",autoFocus:!0,spellCheck:!1,value:M,onChange:v=>C(v.target.value),onBlur:()=>{M.trim()&&M.trim()!==e.title&&n(e.seq,M.trim()),C(null)},onKeyDown:v=>{v.key==="Enter"&&v.target.blur(),v.key==="Escape"&&C(null)},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:18,fontWeight:500,color:"#37352f",p:0,m:0}}):l?Re(Ki,{sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:S?"\uACF5\uC9C0":O?"\uC77C\uC815":e.is_bug?"\uC624\uB958":"\uC5C5\uBB34"}):Re(Ki,{onClick:_?void 0:()=>C(e.title),sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",cursor:_?"default":"text",textDecoration:e.completed?"line-through":"none"},children:e.title}),u?Re(zr,{title:"\uD65C\uB3D9",arrow:!0,children:Re(ir,{"aria-label":"\uD65C\uB3D9",onClick:()=>f(!0),sx:{color:"#6b7280"},children:Re(ky,{sx:{fontSize:20}})})}):null,Re(zr,{title:p?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",arrow:!0,children:Re(ir,{"aria-label":p?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",onClick:()=>rr(e,p),sx:{color:"#6b7280"},children:p?Re(xy,{sx:{fontSize:20}}):Re(gy,{sx:{fontSize:20}})})}),x?Re(zr,{title:"\uC778\uC1C4",arrow:!0,children:Re(ir,{"aria-label":"\uC778\uC1C4",onClick:()=>x(e),sx:{color:"#6b7280"},children:Re(Ty,{sx:{fontSize:20}})})}):null,a&&!l?Re(ir,{"aria-label":"\uB2EB\uAE30",onClick:a,sx:{color:"#6b7280"},children:Re(py,{})}):null]}),Re(Qn,{anchorEl:b,value:e.icon||(S?wo:""),color:e.icon_color||(S?"#e5484d":"#1e3a8a"),onSelect:v=>r(e.seq,v),onSelectColor:v=>i?.(e.seq,v),onClose:()=>g(null)}),Re($i,{open:c,taskSeq:e.seq,items:d,loading:s,onLoad:u,onClose:()=>f(!1)})]})}import{useState as Lt}from"react";import{Box as lo,Button as ar,ButtonBase as Ey,Checkbox as Oy,Divider as Bn,IconButton as Ry,Menu as Py,MenuItem as zy}from"@mui/material";import qy from"@mui/icons-material/ExpandLess";import Ay from"@mui/icons-material/ExpandMore";import Ly from"@mui/icons-material/ConfirmationNumberOutlined";import Ny from"@mui/icons-material/Check";import Fy from"@mui/icons-material/DirectionsRunOutlined";import Hy from"@mui/icons-material/SpeedOutlined";import Bl from"@mui/icons-material/CheckCircle";import Wy from"@mui/icons-material/CheckCircleOutlineOutlined";import Cl from"@mui/icons-material/CheckCircleOutlined";import Mm from"@mui/icons-material/AccessTimeOutlined";import $y from"@mui/icons-material/AutorenewOutlined";import Ky from"@mui/icons-material/LabelOutlined";import Uy from"@mui/icons-material/PersonOutlineOutlined";import Vy from"@mui/icons-material/SubjectOutlined";import Gy from"@mui/icons-material/StickyNote2Outlined";import jy from"@mui/icons-material/PanToolAltOutlined";import{useState as Sy}from"react";import{TextField as By}from"@ehfuse/mui-form-controls";import{jsx as Cy}from"react/jsx-runtime";function vm({value:e,onCommit:o,onDraftChange:t,readOnly:n=!1}){let[r,i]=Sy(null);return Cy(By,{value:r??e,placeholder:n?"":"\uBE44\uACE0 \uC785\uB825",fullWidth:!0,size:"medium",slotProps:{input:{readOnly:n}},onChange:a=>{i(a.target.value),t?.(a.target.value)},onBlur:()=>{r!==null&&r.trim()!==e&&o(r),i(null)},onKeyDown:a=>{a.key==="Enter"&&a.target.blur(),a.key==="Escape"&&i(null)},sx:{mt:1}})}import{useMemo as Tl,useState as yl}from"react";import{Box as go,Button as wm,IconButton as vy}from"@mui/material";import Iy from"@mui/icons-material/AccountTreeOutlined";import _y from"@mui/icons-material/Add";import wy from"@mui/icons-material/Close";import Dy from"@mui/icons-material/NextPlanOutlined";function Sn(e){return e.relations??[]}function S2(e,o,t){return Sn(e).some(n=>n.type===t&&n.task_seq===o.seq)||Sn(o).some(n=>n.type===t&&n.task_seq===e.seq)}function Im(e){return`${e.created_time??""}|${String(e.seq).padStart(12,"0")}`}function hl(e,o){let t=new Map(o.map(c=>[c.seq,c]));t.set(e.seq,e);let n=new Map,r=(c,f)=>{n.has(c)||n.set(c,new Set),n.has(f)||n.set(f,new Set),n.get(c).add(f),n.get(f).add(c)};for(let c of t.values())for(let f of Sn(c))f.type==="follow_up"&&t.has(f.task_seq)&&r(c.seq,f.task_seq);let i=new Set([e.seq]),a=[e.seq];for(;a.length>0;){let c=a.shift();for(let f of n.get(c)??[])i.has(f)||(i.add(f),a.push(f))}let l=[...i].map(c=>t.get(c)).filter(c=>!!c).sort((c,f)=>Im(c).localeCompare(Im(f))),d=new Set;for(let c of Sn(e))c.type==="related"&&d.add(c.task_seq);for(let c of t.values())c.seq!==e.seq&&Sn(c).some(f=>f.type==="related"&&f.task_seq===e.seq)&&d.add(c.seq);let s=[...d].map(c=>t.get(c)).filter(c=>c!==void 0&&c.seq!==e.seq),u=[...t.values()].filter(c=>c.seq!==e.seq&&Sn(c).some(f=>f.type==="duplicate_of"&&f.task_seq===e.seq)),x=Sn(e).find(c=>c.type==="duplicate_of")?.task_seq,p=x?t.get(x)??null:null;return{lineage:l,related:s,duplicates:u,duplicateOf:p}}function kl(e,o){let t=hl(e,o);return(t.lineage.length>=2?t.lineage.length-1:0)+t.related.length+t.duplicates.length+(t.duplicateOf?1:0)}function _m(e,o){return kl(e,o)>0}import{Fragment as My,jsx as Ke,jsxs as Jo}from"react/jsx-runtime";function Sl({item:e,caption:o,onOpen:t,onUnlink:n}){let r=Ve(e.icon||Oe);return Jo(go,{sx:{display:"flex",alignItems:"center",gap:.75,px:1.25,py:.5,borderRadius:1,"&:hover":{bgcolor:"#f7f7f5"},"&:hover .taskbox-relation-unlink":{opacity:1}},children:[o?Ke(go,{component:"span",sx:{flexShrink:0,px:.6,py:.1,borderRadius:.75,fontSize:11.5,fontWeight:500,color:"#8a6d1d",bgcolor:"#faf1d7"},children:o}):null,r?Ke(r,{sx:{fontSize:16,flexShrink:0,color:e.icon_color||"#1e3a8a"}}):null,Jo(go,{component:"span",onClick:t,sx:{flex:1,minWidth:0,fontSize:14,color:e.completed?"#9a9a97":"#37352f",textDecoration:e.completed?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...t?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}},children:[e.ticket_no?`${e.ticket_no} `:"",e.title]}),Ke(ze,{option:Do(e),small:!0}),n?Ke(vy,{className:"taskbox-relation-unlink",size:"small","aria-label":"\uC5F0\uACB0 \uD574\uC81C",onClick:n,sx:{opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:Ke(wy,{sx:{fontSize:15}})}):null]})}function Dm({task:e,tasks:o,readOnly:t=!1,onOpenTask:n,onLink:r,onUnlink:i,onCreateFollowUp:a}){let[l,d]=yl(!1),[s,u]=yl(null),[x,p]=yl(null),c=Tl(()=>hl(e,o),[e,o]),f=c.lineage.length>=2,M=Tl(()=>kl(e,o),[e,o]),C=Tl(()=>{let g=new Set;for(let I of c.lineage)g.add(I.seq);for(let I of c.related)g.add(I.seq);for(let I of c.duplicates)g.add(I.seq);return c.duplicateOf&&g.add(c.duplicateOf.seq),[...g]},[c]),b=(g,I,S)=>{p({anchorEl:g,targetSeq:I,type:S})};return Jo($o,{icon:Ke(Iy,{sx:{fontSize:19,display:"block"}}),title:Jo(My,{children:["\uAD00\uB828 \uC5C5\uBB34",M>0?Ke(go,{component:"span",sx:{fontSize:12.5,color:"#9a9a97"},children:M}):null]}),titleExtra:t?null:Jo(go,{sx:{ml:"auto",display:"flex",alignItems:"center",gap:.5},children:[a?Ke(wm,{size:"small",color:"inherit",startIcon:Ke(Dy,{sx:{fontSize:16}}),onClick:g=>u(g.currentTarget),sx:{minWidth:0,px:1,fontSize:12.5,color:"#787774"},children:"\uD6C4\uC18D \uC5C5\uBB34"}):null,r?Ke(wm,{size:"small",color:"inherit",startIcon:Ke(_y,{sx:{fontSize:16}}),onClick:()=>d(!0),sx:{minWidth:0,px:1,fontSize:12.5,color:"#787774"},children:"\uC5F0\uACB0"}):null]}),children:[Jo(go,{sx:{display:"flex",flexDirection:"column",mt:.5,pl:3.25},children:[f?Ke(go,{sx:{mb:c.related.length||c.duplicates.length||c.duplicateOf?1:0},children:c.lineage.map((g,I)=>{let S=g.seq===e.seq,O=I===c.lineage.length-1;return Jo(go,{sx:{display:"flex",gap:1},children:[Jo(go,{sx:{display:"flex",flexDirection:"column",alignItems:"center",width:14,flexShrink:0,pt:1.1},children:[Ke(go,{sx:{width:S?9:7,height:S?9:7,borderRadius:"50%",bgcolor:S?"#2f80ed":g.completed?"#9a9a97":"#c9c8c5",flexShrink:0}}),O?null:Ke(go,{sx:{width:"2px",flex:1,bgcolor:"#e6e6e3"}})]}),Jo(go,{sx:{flex:1,minWidth:0,pb:O?0:.5},children:[Jo(go,{sx:{display:"flex",alignItems:"center",gap:.75},children:[Jo(go,{component:"span",onClick:!S&&n?()=>n(g.seq):void 0,sx:{minWidth:0,fontSize:14,fontWeight:S?600:400,color:S?"#2f80ed":g.completed?"#9a9a97":"#37352f",textDecoration:g.completed?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...!S&&n?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}},children:[g.ticket_no?`${g.ticket_no} `:"",g.title]}),Ke(ze,{option:Do(g),small:!0})]}),Ke(go,{sx:{fontSize:12,color:"#9a9a97"},children:g.completed&&g.completed_time?`${g.completed_time} \uC644\uB8CC`:g.created_time??""})]})]},g.seq)})}):null,c.duplicateOf?Ke(Sl,{item:c.duplicateOf,caption:"\uC6D0\uBCF8",onOpen:n?()=>n(c.duplicateOf.seq):void 0,onUnlink:!t&&i?g=>b(g.currentTarget,c.duplicateOf.seq,"duplicate_of"):void 0}):null,c.duplicates.map(g=>Ke(Sl,{item:g,caption:"\uC911\uBCF5",onOpen:n?()=>n(g.seq):void 0,onUnlink:!t&&i?I=>b(I.currentTarget,g.seq,"duplicate_of"):void 0},`dup-${g.seq}`)),c.related.map(g=>Ke(Sl,{item:g,onOpen:n?()=>n(g.seq):void 0,onUnlink:!t&&i?I=>b(I.currentTarget,g.seq,"related"):void 0},`rel-${g.seq}`)),M===0?Ke(go,{sx:{px:1.25,py:.75,fontSize:13.5,color:"#9a9a97"},children:"\uC5F0\uACB0\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):null]}),r?Ke(Di,{open:l,task:e,tasks:o,excludeSeqs:C,onClose:()=>d(!1),onSubmit:(g,I)=>r(e.seq,g,I)}):null,Ke(We,{open:!!s,anchorEl:s,title:"\uC774 \uC5C5\uBB34\uC5D0\uC11C \uC774\uC5B4\uC9C0\uB294 \uD6C4\uC18D \uC5C5\uBB34\uB97C \uB9CC\uB4DC\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uB9CC\uB4E4\uAE30",onCancel:()=>u(null),onConfirm:()=>{a?.(e.seq),u(null)}}),Ke(We,{open:!!x,anchorEl:x?.anchorEl??null,title:"\uC774 \uC5C5\uBB34\uC640\uC758 \uC5F0\uACB0\uC744 \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uD574\uC81C",onCancel:()=>p(null),onConfirm:()=>{x&&i?.(e.seq,x.targetSeq,x.type),p(null)}})]})}import{Fragment as Ro,jsx as N,jsxs as Ye}from"react/jsx-runtime";function lr({label:e="\uBE44\uC5B4 \uC788\uC74C"}){return N(lo,{component:"span",sx:{color:"#9a9a97"},children:e})}function Em({task:e,customTabs:o,statusOptions:t,avatarSrcByName:n,onChangeStatus:r,onChangeLabels:i,onAddLabelOption:a,onChangeProject:l,onAddProject:d,onChangeDate:s,onChangeReminder:u,onMemberEdit:x,onChangePriority:p,onChangeEstimatedTime:c,onChangeEventTime:f,onChangeEventPlace:M,onChangeEventAddress:C,onChangeNote:b,onChangeContent:g,onChangeContentHeight:I,onAddChecklistItem:S,onToggleChecklistItem:O,onRemoveChecklistItem:y,onUpdateChecklistItem:_,onConvertChecklistToTask:E,onOpenChecklistTask:v,onLinkChecklistTask:D,resolveChecklistTask:L,relatedTasksPool:m,onOpenRelatedTask:T,onLinkRelatedTask:h,onUnlinkRelatedTask:k,onCreateFollowUpTask:P,onAddAttachments:A,onRemoveAttachment:ae,onPreview:ie,onDownload:xe,onUpdateComment:se,onRemoveComment:ue,onToggleCommentReaction:ge,currentUserName:ce="",myAccountSeq:ee=0,noticeAdmin:Pe=!1,hideProject:Ae=!1,hideLabel:W=!1,showTitle:K=!1,onChangeTitle:J,onToggleCompleted:B,onChangeIcon:F,onChangeIconColor:Q,employees:U=[],onAckConfirm:ve,onRequestConfirm:Le,onChangeBugField:Ue,sprints:Xe=[],sprintProject:Ee=!1,hideSprint:oo=!1,onChangeSprint:Y,onChangeStoryPoints:w,onChangeResolution:Se,onClaimTask:H,onVerifyBug:ye}){let[Qe,ho]=Lt(null),[Ht,tt]=Lt(null),[zo,xt]=Lt(null),[nt,Lo]=Lt(null),[Mn,Ce]=Lt(!1),q={[Yo]:Mn?{maxHeight:120,opacity:1,overflow:"hidden",transition:"max-height 0.25s ease, opacity 0.2s ease"}:{minHeight:0,maxHeight:0,opacity:0,overflow:"hidden",pointerEvents:"none",transition:"max-height 0.25s ease, opacity 0.2s ease"}},[$,ne]=Lt(null),[le,de]=Lt(null),[Fe,no]=Lt(null),[co,uo]=Lt(null),Ie=!!e.is_notice,oe=!!e.is_event,ko=!!e.is_bug,Io=!!H&&Qr(e,ee),Wt=!!H&&Zr(e,ee),Uo=!!ye&&ko&&!!e.completed&&ee>0&&(e.author_account_seq??0)===ee&&!(e.acks??[]).some(z=>z.account_seq===ee),mo=!ht(e,ee),No=!e.is_event&&(e.is_notice?ee>0&&(e.author_account_seq??0)===ee:(e.author_account_seq??0)===ee||(e.manager_account_seq??0)===ee),an=zn(e.icon||(e.is_notice?wo:e.is_event?"event":Oe)),ur=Ie?!Xr(e,ee):mo,En=Io||Wt?Ye(Fn,{onClick:z=>uo(z.currentTarget),children:[N(jy,{sx:{fontSize:16,mr:.5}}),"\uAC00\uC838\uAC00\uAE30"]}):null,dr=Ie?Ai(e,U):"",qo=Ie?im(e,U,ee):null,ro=!Ie&&!oe?ci(e,ee):null,On=!!(ro&&ro.total>0||Ie&&qo);return Ye(Ro,{children:[K?Ye(lo,{sx:{px:2,pt:2,pb:.5,display:"flex",alignItems:"flex-start",gap:1},children:[No?N(Oy,{checked:e.completed,icon:N(Wy,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:N(Bl,{sx:{fontSize:22,color:"#2f80ed"}}),onChange:(z,Rn)=>{zo||xt({anchorEl:z.currentTarget,nextCompleted:Rn})},sx:{p:0,mt:.25}}):null,N(Ry,{size:"small","aria-label":"\uC544\uC774\uCF58 \uBCC0\uACBD",onClick:mo?void 0:z=>tt(z.currentTarget),sx:{p:0,mt:.25,color:e.icon_color||(Ie?"#e5484d":"#1e3a8a")},children:N(an,{sx:{fontSize:20}})}),N(lo,{sx:{flex:1,minWidth:0},children:Qe!==null?N(lo,{component:"input",autoFocus:!0,spellCheck:!1,value:Qe,onChange:z=>ho(z.target.value),onBlur:()=>{Qe.trim()&&Qe.trim()!==e.title&&J(e.seq,Qe.trim()),ho(null)},onKeyDown:z=>{z.key==="Enter"&&z.target.blur(),z.key==="Escape"&&ho(null)},sx:{width:"100%",border:"none",outline:"none",font:"inherit",fontSize:19,fontWeight:600,color:"#37352f",p:0,m:0}}):N(lo,{onClick:()=>ho(e.title),sx:{fontSize:19,fontWeight:600,color:"#37352f",lineHeight:1.35,cursor:"text",textDecoration:e.completed?"line-through":"none",userSelect:"text"},children:e.title})}),N(We,{open:!!zo,anchorEl:zo?.anchorEl??null,title:zo?.nextCompleted?"\uC774 \uC5C5\uBB34\uB97C \uC644\uB8CC \uCC98\uB9AC\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?":"\uC644\uB8CC\uB97C \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:zo?.nextCompleted?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>xt(null),onConfirm:()=>{zo&&B(e.seq,zo.nextCompleted),xt(null)}}),N(Qn,{anchorEl:Ht,value:e.icon||(Ie?wo:""),color:e.icon_color||(Ie?"#e5484d":"#1e3a8a"),onSelect:z=>F(e.seq,z),onSelectColor:z=>Q?.(e.seq,z),onClose:()=>tt(null)})]}):null,Ye(lo,{sx:{py:1.5,display:"flex",flexDirection:"column",gap:0,[Yo]:{pb:0,"& > :last-child":{mb:0}}},children:[N(Ii,{hideProject:Ae,values:{tabKey:e.tab_key??"",managerName:e.manager_name,receiverNames:e.receiver_names,startDate:e.start_date,dueDate:e.due_date,reminder:e.reminder,priority:e.priority,estimatedTime:e.estimated_time,eventTime:e.event_time??"",eventPlace:e.event_place??"",eventAddress:e.event_address??""},customTabs:o,avatarSrcByName:n,showEstimatedTime:!oe,notice:Ie,event:oe,readOnly:mo,targetSummary:dr,onChangeProject:z=>l(e.seq,z),onAddProject:d,onChangeStartDate:z=>s(e.seq,"start_date",z),onChangeDueDate:z=>s(e.seq,"due_date",z),onChangeReminder:z=>u(e.seq,z),onChangePriority:z=>p(e.seq,z),onChangeEstimatedTime:z=>c(e.seq,z),onChangeEventTime:z=>f?.(e.seq,z),onChangeEventPlace:z=>M?.(e.seq,z),onChangeEventAddress:z=>C?.(e.seq,z),onMemberEdit:z=>x(e,z),narrowCollapsedSx:q,reminderLocked:e.completed,managerAction:En,leading:Ye(Ro,{children:[Uo||En&&(Ie||oe)?Ye(lo,{sx:{gridColumn:"1 / -1",display:"flex",justifyContent:"flex-start",gap:2,px:2,py:1.5},children:[Ie||oe?En:null,Uo?Ye(Ro,{children:[N(ar,{variant:"contained",size:"large",onClick:()=>ye?.(e.seq,!0),sx:{bgcolor:"#2f80ed"},children:"\uAC80\uC99D\uC644\uB8CC"}),N(ar,{variant:"outlined",size:"large",color:"error",onClick:()=>ye?.(e.seq,!1),children:"\uC7AC\uC624\uD508"})]}):null]}):null,ko&&e.ticket_no?N(pe,{icon:N(Ly,{sx:{fontSize:17}}),label:"\uD2F0\uCF13",children:N(lo,{component:"span",sx:{fontVariantNumeric:"tabular-nums"},children:e.ticket_no})}):null,oe?null:N(lo,{sx:ko&&e.ticket_no||On?void 0:{gridColumn:"1 / -1"},children:N(pe,{icon:N($y,{sx:{fontSize:17}}),label:"\uC0C1\uD0DC",onClick:mo||e.completed?void 0:z=>ne(z),children:N(ze,{option:Do(e)})})}),ro&&ro.total>0?N(lo,{children:N(pe,{icon:N(Cl,{sx:{fontSize:17}}),label:"\uD655\uC778",children:ro.canConfirm?N(ar,{size:"small",variant:"contained",onClick:()=>ve?.(e.seq),sx:{py:.1,px:1.25,minWidth:0,color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}},children:"\uD655\uC778"}):Ye(ar,{size:"small",variant:"outlined",color:"inherit",startIcon:ro.myTime?N(Bl,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:z=>Lo({anchorEl:z.currentTarget,open:!0}),sx:{py:.1,px:1.25,minWidth:0,fontSize:13,color:"text.primary",borderColor:"#d5d8dc",bgcolor:"#fff",whiteSpace:"nowrap"},children:[ro.count," / ",ro.total]})})}):null,Ie&&qo?N(lo,{children:N(pe,{icon:N(Cl,{sx:{fontSize:17}}),label:"\uD655\uC778",children:N(lo,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,minWidth:0},children:qo.canAck?N(ar,{size:"small",variant:"contained",onClick:()=>ve?.(e.seq),sx:{py:.1,px:1.25,minWidth:0,color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}},children:"\uD655\uC778"}):N(ar,{size:"small",variant:"outlined",color:"inherit",startIcon:qo.acked?N(Bl,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:z=>Lo({anchorEl:z.currentTarget,open:!0}),sx:{py:.1,px:1.25,minWidth:0,fontSize:13,color:"text.primary",borderColor:"#d5d8dc",bgcolor:"#fff",whiteSpace:"nowrap"},children:qo.total>0&&qo.count>=qo.total?"\uC644\uB8CC":Ye(Ro,{children:[qo.count,N(lo,{component:"span",sx:{mx:.4},children:"/"}),qo.total]})})})})}):null,Ee&&!oo&&!oe&&!Ie?Ye(Ro,{children:[N(pe,{icon:N(Fy,{sx:{fontSize:17}}),label:"\uBAA9\uD45C",onClick:mo?void 0:z=>de(z),children:(e.sprint_seq??0)>0?Xe.find(z=>z.seq===e.sprint_seq)?.name??"\uC0AD\uC81C\uB41C \uC2A4\uD504\uB9B0\uD2B8":N(lr,{label:"\uBBF8\uBC30\uC815"})}),N(pe,{icon:N(Hy,{sx:{fontSize:17}}),label:"\uD3EC\uC778\uD2B8",children:N(Pt,{value:(e.story_points??0)>0?String(e.story_points):"",placeholder:"\uBBF8\uCD94\uC815",readOnly:mo,onCommit:z=>w?.(e.seq,Number(z.replace(/[^0-9.]/g,""))||0)})})]}):null,oe||W?null:N(lo,{sx:[{gridColumn:"1 / -1"},q??null],children:N(pe,{icon:N(Ky,{sx:{fontSize:17}}),label:"\uB77C\uBCA8",onClick:mo?void 0:z=>no(z),children:(e.label_keys??[]).length>0?N($t,{labelKeys:e.label_keys??[],labelOptions:t}):N(lr,{})})})]}),trailing:Ye(Ro,{children:[ko?N(_i,{values:{repro:e.bug_repro??"",device:e.bug_device??"",where:e.bug_where??"",version:e.bug_version??"",resolution:e.resolution??""},readOnly:mo,showResolution:!!e.completed,onChangeRepro:z=>Ue?.(e.seq,"bug_repro",z),onChangeDevice:z=>Ue?.(e.seq,"bug_device",z),onChangeWhere:z=>Ue?.(e.seq,"bug_where",z),onChangeVersion:z=>Ue?.(e.seq,"bug_version",z),onChangeResolution:z=>Se?.(e.seq,z)}):null,N(pe,{icon:N(Uy,{sx:{fontSize:17}}),label:"\uC791\uC131\uC790",sx:[fo(9),q??null],children:e.created_by?Ye(Ro,{children:[N(Mo,{names:[e.created_by],size:20,avatarSrcByName:n}),e.created_by]}):N(lr,{})}),N(pe,{icon:N(Mm,{sx:{fontSize:17}}),label:"\uC791\uC131\uC2DC\uAC04",sx:[fo(11),q??null],children:e.created_time?Go(e.created_time):N(lr,{})}),e.completed?Ye(Ro,{children:[N(pe,{icon:N(Cl,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC790",sx:[fo(10),q??null],children:e.completed_by?Ye(Ro,{children:[N(Mo,{names:[e.completed_by],size:20,avatarSrcByName:n}),e.completed_by]}):N(lr,{})}),N(pe,{icon:N(Mm,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC2DC\uAC04",sx:[fo(12),q??null],children:e.completed_time?Go(e.completed_time):N(lr,{})})]}):null]})}),Ye(lo,{sx:{display:"none",[Yo]:{display:"block",mt:1.5,mb:0}},children:[N(Bn,{sx:{borderColor:"#e6e6e3"}}),N(Ey,{onClick:()=>Ce(z=>!z),sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",gap:.5,pt:1.25,pb:1.25,fontSize:13.5,bgcolor:"#f4f4f2",color:"#37352f","&:active":{opacity:.6}},children:Mn?Ye(Ro,{children:["\uC811\uAE30 ",N(qy,{sx:{fontSize:18}})]}):Ye(Ro,{children:["\uC815\uBCF4 \uB354\uBCF4\uAE30 ",N(Ay,{sx:{fontSize:18}})]})})]}),Ye(lo,{children:[N(Bn,{sx:{my:1.5,borderColor:"#e6e6e3",[Yo]:{mt:0,mb:1.25}}}),N($o,{icon:N(Vy,{sx:{fontSize:18,display:"block"}}),title:"\uB0B4\uC6A9",children:N(lo,{sx:{userSelect:"text"},children:N(wi,{syncKey:e.seq,value:e.content??"",height:e.content_height??0,onChangeHeight:I?z=>I(e.seq,z):void 0,readOnly:mo,onChange:z=>g(e.seq,z)})})}),e.is_bug?null:Ye(Ro,{children:[N(Bn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),N($o,{icon:N(Gy,{sx:{fontSize:18,display:"block"}}),title:"\uBE44\uACE0",children:N(lo,{sx:{userSelect:"text"},children:N(vm,{value:e.note,readOnly:ur,onCommit:z=>b(e.seq,z)})})})]}),oe?null:Ye(Ro,{children:[N(Bn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),N(Mi,{taskSeq:e.seq,checklist:e.checklist??[],removeLocked:ur,onAdd:S,onToggle:O,onRemove:y,onUpdate:_,onConvertToTask:E,onOpenLinkedTask:v,resolveLinkedTask:L,linkCandidates:m,linkBaseTask:e,onLinkExistingTask:D})]}),m&&!oe&&!Ie&&_m(e,m)?Ye(Ro,{children:[N(Bn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),N(Dm,{task:e,tasks:m,readOnly:mo,onOpenTask:T,onLink:h,onUnlink:k,onCreateFollowUp:P})]}):null,N(Bn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),N(Pi,{taskSeq:e.seq,attachments:e.attachments??[],removeLocked:ur,onAdd:A,onRemove:ae,onPreview:ie?z=>ie({...z,taskSeq:e.seq}):void 0,onDownload:xe?z=>xe({...z,taskSeq:e.seq}):void 0})]}),N(Bn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),N(hm,{taskSeq:e.seq,comments:e.comments??[],currentUserName:ce,myAccountSeq:ee,avatarSrcByName:n,onUpdate:se,onRemove:ue,onToggleReaction:ge,onPreview:ie?z=>ie({...z,taskSeq:e.seq}):void 0,onDownload:xe?z=>xe({...z,taskSeq:e.seq}):void 0})]}),N(jr,{anchorEl:$,value:e.status,options:Ie?hr:ko?sn:kr,onSelect:z=>r(e.seq,z),onClose:()=>ne(null)}),N(Py,{transitionDuration:0,anchorEl:le,open:!!le,onClose:()=>de(null),children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...Xe.filter(z=>`custom-${z.group_seq}`===String(e.tab_key??"")).map(z=>({seq:z.seq,label:Ho(z)}))].map(z=>Ye(zy,{onClick:()=>{Y?.(e.seq,z.seq),de(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[z.label,(e.sprint_seq??0)===z.seq?N(Ny,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},z.seq))}),N(si,{anchorEl:nt?.anchorEl??null,open:!!nt?.open,acks:e.acks??[],total:qo?.total??ro?.total??0,avatarSrcByName:n,onRequestConfirm:Le&&ro&&ro.count<ro.total?()=>{Le(e.seq),Lo(z=>z?{...z,open:!1}:null)}:void 0,onClose:()=>Lo(z=>z?{...z,open:!1}:null)}),N(qi,{anchorEl:Fe,selectedKeys:e.label_keys??[],labelOptions:t,onToggle:z=>i(e.seq,Vr(e.label_keys??[],z)),onAddLabel:a,onClose:()=>no(null)}),N(We,{open:!!co,anchorEl:co,title:Io?"\uC774 \uC5C5\uBB34\uB97C \uAC00\uC838\uC640 \uCC45\uC784\uC790\uB97C \uB9E1\uC73C\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?":"\uC774 \uC5C5\uBB34\uC758 \uCC45\uC784\uC790\uB97C \uB9E1\uC73C\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uAC00\uC838\uAC00\uAE30",onCancel:()=>uo(null),onConfirm:()=>{H?.(e.seq),uo(null)}})]})}import{Fragment as o0,jsx as Co,jsxs as Am}from"react/jsx-runtime";function Vz(){let e=new Date,o=t=>String(t).padStart(2,"0");return`${e.getFullYear()}-${o(e.getMonth()+1)}-${o(e.getDate())} ${o(e.getHours())}:${o(e.getMinutes())}`}function Gz({open:e,task:o,onClose:t,onAddComment:n,onSaveFields:r,myAccountSeq:i=0,onToggleCompleted:a,onChangeTitle:l,onChangeIcon:d,onChangeIconColor:s,activityItems:u,activityLoading:x,onLoadActivity:p,onPrint:c,...f}){let M=_e(),C=Rm(null);o&&(C.current=o);let b=o??C.current,[g,I]=Pm(!1),[S,O]=Pm({}),y=Object.keys(S).length>0;Om(()=>{O({})},[o?.seq,e]);let _=Rm(null);if(Om(()=>{_.current?.scrollTo({top:0})},[o?.seq]),!b)return null;let E=M&&y?{...b,...S}:b,v=(h,k)=>{M?O(P=>({...P,...h})):k()},D=()=>{let h=S;O({});let k=b.seq,P=h.title===void 0?void 0:String(h.title).trim();if(r){let A={...h};P!==void 0&&(P?A.title=P:delete A.title),Object.keys(A).length>0&&r(k,A),qm({message:"\uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",position:"center"});return}P&&l(k,P),h.icon!==void 0&&d(k,String(h.icon)),h.icon_color!==void 0&&s?.(k,String(h.icon_color)),h.status!==void 0&&f.onChangeStatus(k,h.status),h.label_keys!==void 0&&f.onChangeLabels(k,h.label_keys??[]),h.tab_key!==void 0&&f.onChangeProject(k,String(h.tab_key??"")),h.start_date!==void 0&&f.onChangeDate(k,"start_date",String(h.start_date??"")),h.due_date!==void 0&&f.onChangeDate(k,"due_date",String(h.due_date??"")),h.reminder!==void 0&&f.onChangeReminder(k,h.reminder),h.priority!==void 0&&f.onChangePriority(k,h.priority),h.estimated_time!==void 0&&f.onChangeEstimatedTime(k,String(h.estimated_time??"")),h.event_time!==void 0&&f.onChangeEventTime?.(k,String(h.event_time??"")),h.event_place!==void 0&&f.onChangeEventPlace?.(k,String(h.event_place??"")),h.event_address!==void 0&&f.onChangeEventAddress?.(k,String(h.event_address??"")),h.content!==void 0&&f.onChangeContent(k,String(h.content??"")),h.note!==void 0&&f.onChangeNote(k,String(h.note??"")),qm({message:"\uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",position:"center"})},L={...f,onChangeStatus:(h,k)=>v({status:k},()=>f.onChangeStatus(h,k)),onChangeLabels:(h,k)=>v({label_keys:k},()=>f.onChangeLabels(h,k)),onChangeProject:(h,k)=>v({tab_key:k},()=>f.onChangeProject(h,k)),onChangeDate:(h,k,P)=>v({[k]:P},()=>f.onChangeDate(h,k,P)),onChangeReminder:(h,k)=>v({reminder:k},()=>f.onChangeReminder(h,k)),onChangePriority:(h,k)=>v({priority:k},()=>f.onChangePriority(h,k)),onChangeEstimatedTime:(h,k)=>v({estimated_time:k},()=>f.onChangeEstimatedTime(h,k)),onChangeEventTime:(h,k)=>v({event_time:k},()=>f.onChangeEventTime?.(h,k)),onChangeEventPlace:(h,k)=>v({event_place:k},()=>f.onChangeEventPlace?.(h,k)),onChangeEventAddress:(h,k)=>v({event_address:k},()=>f.onChangeEventAddress?.(h,k)),onChangeContent:(h,k)=>v({content:k},()=>f.onChangeContent(h,k)),onChangeNote:(h,k)=>v({note:k},()=>f.onChangeNote(h,k))},m=Co(Em,{...L,task:E,myAccountSeq:i,onChangeTitle:(h,k)=>v({title:k},()=>l(h,k)),onToggleCompleted:a,onChangeIcon:(h,k)=>v({icon:k},()=>d(h,k)),onChangeIconColor:(h,k)=>v({icon_color:k},()=>s?.(h,k)),showTitle:M}),T=Co(km,{onSubmit:(h,k)=>n(E.seq,h,k)},E.seq);return M?Am(o0,{children:[Co(e0,{open:e,onClose:t,locale:"ko",fontScale:{enabled:!0,default:1.1,min:.6},title:E.is_notice?"\uACF5\uC9C0\uC0AC\uD56D":E.is_event?"\uC77C\uC815":E.is_bug?"\uC624\uB958":"\uC5C5\uBB34",titleIcons:{delete:{visible:!1},print:c?{visible:!0,color:"#6b7280",onClick:()=>c(E)}:{visible:!1},share:{visible:!1},custom:[...p?[{icon:Co(Zy,{sx:{ml:2,color:"#6b7280"}}),tooltip:"\uD65C\uB3D9",onClick:()=>I(!0)}]:[],{icon:Co(Qy,{sx:{ml:p?0:2,color:"#6b7280"}}),tooltip:"\uACF5\uC720\uD558\uAE30",onClick:()=>rr(E,!0)},{icon:Co(Yy,{variant:"contained",size:"small",disableElevation:!0,disabled:!y,onClick:y?D:void 0,sx:{ml:1,minWidth:0,px:1.5,py:.35,fontSize:14,fontWeight:600,bgcolor:"#2f80ed","&:hover":{bgcolor:"#2f80ed"}},children:"\uC800\uC7A5"}),tooltip:""}]},fullScreen:!0,mobilePresentation:"slide",tabs:{visible:!1},contentTopPadding:0,contentPaddingX:0,sectionsPaddingTop:0,sectionContentPaddingTop:0,contentBottomPadding:0,scrollPastLastSection:!1,overlayScrollbar:{enabled:!0,contentStyle:{minWidth:0}},actions:{visible:!0,showCancelButton:!1,left:T},sx:{DialogContent:{borderBottom:"none"}},dialogActionSx:{padding:"0 !important","@media (max-width:1023.95px)":{padding:"0 !important"},borderTop:"1px solid #37352f","& .left-actions":{flex:1,width:"100%",minWidth:0,"& > *":{flex:1,minWidth:0}},"& .right-actions":{display:"none"}},sections:[{id:"task-detail",title:"",showTitle:!1,children:Co(Ui,{sx:{userSelect:"none",width:"100%",minWidth:0,display:"flex",flexDirection:"column",gap:0},children:m})}]},b.seq),Co($i,{open:g,taskSeq:E.seq,items:u,loading:x,onLoad:p,onClose:()=>I(!1)})]}):Co(Xy,{anchor:"right",open:e,onClose:t,disableAutoFocus:!0,disableEnforceFocus:!0,sx:{zIndex:h=>h.zIndex.modal},slotProps:{paper:{sx:{width:720,maxWidth:"100vw"}}},children:Am(Ui,{sx:{display:"flex",flexDirection:"column",height:"100%",userSelect:"none"},children:[Co(Cm,{task:E,myAccountSeq:i,onToggleCompleted:a,onChangeTitle:l,onChangeIcon:d,onChangeIconColor:s,onClose:t,activityItems:u,activityLoading:x,onLoadActivity:p,onPrint:c}),Co(zm,{sx:{borderColor:"#e6e6e3"}}),Co(Ui,{sx:{flex:1,minHeight:0},children:Co(Jy,{ref:_,style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:m})}),Co(zm,{sx:{borderColor:"#37352f"}}),Co(Ui,{sx:{flexShrink:0},children:T})]})})}import{useEffect as n0,useState as Cn}from"react";import{Box as Po,Button as _l,IconButton as Lm}from"@mui/material";import{FormDialog as r0}from"@ehfuse/mui-form-dialog";import i0 from"@mui/icons-material/EditOutlined";import{ErrorAlert as Nm}from"@ehfuse/alerts";import{ClearTextField as Fm,DateTextField as Hm,LabelSelect as Wm}from"@ehfuse/mui-form-controls";var vl="custom-";function t0(e){return e.startsWith(vl)}function Xz(e){return e>0?`${vl}${e}`:""}function Il(e){if(!t0(e))return 0;let o=Number(e.slice(vl.length));return Number.isInteger(o)&&o>0?o:0}import{Fragment as l0,jsx as Je,jsxs as rn}from"react/jsx-runtime";var a0=[{value:"planning",label:"\uACC4\uD68D\uC911"},{value:"active",label:"\uC9C4\uD589\uC911"},{value:"closed",label:"\uC885\uB8CC"}];function $m(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?e.slice(5).replace("-","."):"-"}function aq({open:e,customTabs:o,sprints:t,onClose:n,onCreate:r,onUpdate:i,onChangeStatus:a,onRemove:l}){let d=o.filter(m=>m.useSprints&&!m.archived),[s,u]=Cn(""),[x,p]=Cn(""),[c,f]=Cn(""),[M,C]=Cn(""),[b,g]=Cn(""),[I,S]=Cn(!1),[O,y]=Cn(0);n0(()=>{e&&(u(d.length===1?d[0].key:""),p(""),f(""),C(""),g(""),y(0))},[e]);let _=()=>{p(""),f(""),C(""),g(""),y(0)},E=m=>{y(m.seq),u(`custom-${m.group_seq}`),p(m.name),f(m.goal),C(m.start_date),g(m.end_date)},v=async()=>{let m=Il(s);if(!m){Nm("\uBAA9\uD45C\uB97C \uB9CC\uB4E4 \uD504\uB85C\uC81D\uD2B8\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return}if(!x.trim()){Nm("\uBAA9\uD45C \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}S(!0);try{if(O>0){i(O,{name:x.trim(),goal:c.trim(),start_date:M,end_date:b}),_();return}await r({group_seq:m,name:x.trim(),goal:c.trim(),start_date:M,end_date:b})&&_()}finally{S(!1)}},D=new Map(o.map(m=>[Il(m.key),m.label])),L=Je(Po,{children:d.length===0?Je(Po,{sx:{py:2,fontSize:14,color:"#787774"},children:'\uBAA9\uD45C\uB97C \uC0AC\uC6A9\uD558\uB294 \uD504\uB85C\uC81D\uD2B8\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4. \uD504\uB85C\uC81D\uD2B8 \uC218\uC815\uC5D0\uC11C "\uBAA9\uD45C(\uC2A4\uD504\uB9B0\uD2B8) \uC0AC\uC6A9"\uC744 \uBA3C\uC800 \uCF1C\uC138\uC694.'}):rn(l0,{children:[rn(Po,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2.5,mt:1},children:[Je(Wm,{label:"\uD504\uB85C\uC81D\uD2B8",size:"medium",value:s,options:d.map(m=>({value:m.key,label:m.label})),onChange:m=>u(String(m.target.value)),disabled:O>0}),Je(Fm,{label:"\uBAA9\uD45C \uC774\uB984",size:"medium",placeholder:"\uC608: 8\uC6D4 2\uC8FC\uCC28",value:x,onChange:m=>p(m.target.value)}),Je(Hm,{size:"medium",label:"\uC2DC\uC791\uC77C",value:M,onChange:m=>C(m.target.value)}),Je(Hm,{size:"medium",label:"\uC885\uB8CC\uC77C",value:b,onChange:m=>g(m.target.value)}),Je(Fm,{label:"\uC124\uBA85",size:"medium",placeholder:"\uC120\uD0DD \uC785\uB825",value:c,onChange:m=>f(m.target.value),sx:{gridColumn:"1 / -1"}})]}),rn(Po,{sx:{mt:1.5,display:"flex",justifyContent:"flex-end",gap:1},children:[O>0?Je(_l,{color:"inherit",onClick:_,disabled:I,children:"\uCDE8\uC18C"}):null,Je(_l,{variant:"contained",onClick:()=>{v()},disabled:I,children:O>0?"\uBAA9\uD45C \uC800\uC7A5":"\uBAA9\uD45C \uB9CC\uB4E4\uAE30"})]}),Je(Po,{sx:{mt:2,borderTop:"1px solid #e6e6e3"},children:t.length===0?Je(Po,{sx:{py:3,textAlign:"center",fontSize:14,color:"#9a9a97"},children:"\uB4F1\uB85D\uB41C \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):t.map(m=>rn(Po,{sx:{display:"flex",flexDirection:"column",gap:1,py:1.75,borderBottom:"1px solid #f0efed"},children:[rn(Po,{sx:{minWidth:0},children:[rn(Po,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[Je(Po,{component:"span",sx:{fontSize:16,fontWeight:600,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},children:m.name}),Je(Po,{component:"span",sx:{flexShrink:0,px:1,py:.25,borderRadius:.75,bgcolor:"#f1f5f9",color:"#64748b",fontSize:13,fontWeight:500},children:D.get(m.group_seq)??"\uC0AD\uC81C\uB41C \uD504\uB85C\uC81D\uD2B8"}),rn(Po,{component:"span",sx:{flexShrink:0,fontSize:14,color:"#57564f"},children:[$m(m.start_date)," ~ ",$m(m.end_date)]})]}),m.goal?Je(Po,{sx:{mt:.5,fontSize:14,color:"#787774",lineHeight:1.5},children:m.goal}):null]}),rn(Po,{sx:{display:"flex",alignItems:"center",gap:.5},children:[Je(Wm,{label:"\uC0C1\uD0DC",showLabel:!1,size:"small",value:m.status,options:a0.map(T=>({value:T.value,label:T.label})),onChange:T=>a(m.seq,String(T.target.value)),sx:{width:104,flexShrink:0}}),Je(Lm,{"aria-label":"\uBAA9\uD45C \uC218\uC815",onClick:()=>E(m),sx:{color:"#9a9a97","&:hover":{color:"#2563eb"}},children:Je(i0,{sx:{fontSize:18}})}),Je(Lm,{"aria-label":"\uBAA9\uD45C \uC0AD\uC81C",onClick:()=>l(m.seq),sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:Je(St,{style:{width:16,height:16}})})]})]},m.seq))})]})});return Je(r0,{open:e,onClose:n,maxWidth:"sm",title:"\uBAA9\uD45C \uAD00\uB9AC",locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-sprint-manage",sections:[{id:"sprint-manage",showTitle:!1,children:L}],actions:{showCancelButton:!1,right:Je(_l,{variant:"contained",onClick:n,children:"\uB2EB\uAE30"})}})}import{useState as Km}from"react";import{Box as so,Button as wl,Divider as s0,IconButton as c0,TextField as m0}from"@mui/material";import{FormDialog as u0}from"@ehfuse/mui-form-dialog";import d0 from"@mui/icons-material/OpenInNewOutlined";import p0 from"@mui/icons-material/EventOutlined";import{ConfirmDialog as f0}from"@ehfuse/alerts";import{jsx as Me,jsxs as vn}from"react/jsx-runtime";function gq({open:e,imports:o,onRegister:t,onRemove:n,onClose:r}){let[i,a]=Km(""),[l,d]=Km(!1),s=async()=>{let p=i.trim();if(p){d(!0);try{await t(p)&&a("")}finally{d(!1)}}},u=async p=>{await f0({title:"\uAC00\uC838\uC624\uAE30 \uD574\uC81C",message:`"${p.name||"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}" \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30\uB97C \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&n(p.seq)},x=vn(so,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[vn(so,{sx:{color:"#37352f",lineHeight:1.7},children:["\uAD6C\uAE00 \uCE98\uB9B0\uB354\uC758 \uC77C\uC815\uC744 ",Me("b",{children:"\uC77D\uAE30\uC804\uC6A9"}),"\uC73C\uB85C \uC5C5\uBB34\uD568 \uCE98\uB9B0\uB354\uC5D0 \uD568\uAED8 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4.",Me("br",{}),"\uD45C\uC2DC/\uC228\uAE40\uC740 \uC5C5\uBB34\uD568 \uC6B0\uC0C1\uB2E8\uC758 ",Me("b",{children:"\uAD6C\uAE00 \uC77C\uC815"})," \uC2A4\uC704\uCE58\uB85C \uCF1C\uACE0 \uB055\uB2C8\uB2E4."]}),Me(so,{sx:{fontWeight:700,color:"#37352f",mt:.5},children:"\uB4F1\uB85D\uB41C \uCE98\uB9B0\uB354"}),o.length>0?Me(so,{sx:{display:"flex",flexDirection:"column",border:"1px solid #e6e6e3",borderRadius:1},children:o.map((p,c)=>vn(so,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:.75,borderTop:c>0?"1px solid #efefed":"none"},children:[Me(p0,{sx:{fontSize:18,color:"#0f9d58",flexShrink:0}}),Me(so,{component:"span",sx:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:p.name||"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),Me(c0,{"aria-label":"\uAC00\uC838\uC624\uAE30 \uD574\uC81C",size:"small",onClick:()=>{u(p)},sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:Me(St,{sx:{fontSize:18}})})]},p.seq))}):Me(so,{sx:{color:"#9a9a97",px:.5},children:"\uC544\uC9C1 \uB4F1\uB85D\uB41C \uCE98\uB9B0\uB354\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}),Me(s0,{sx:{my:1,borderColor:"#e6e6e3"}}),Me(so,{sx:{fontWeight:700,color:"#37352f"},children:"\uC0C8 \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30"}),vn(so,{sx:{bgcolor:"#f2f6fa",borderRadius:1,px:1.5,py:1.25,mb:1,fontSize:15,lineHeight:1.8,display:"flex",flexDirection:"column",gap:.25,"& > div":{display:"flex",gap:1},"& > div::before":{content:'"\u2022"',flexShrink:0}},children:[Me(so,{children:vn(so,{component:"span",children:["\uAD6C\uAE00 \uCE98\uB9B0\uB354(\uC6F9) > \uC67C\uCABD \uBAA9\uB85D\uC5D0\uC11C \uAC00\uC838\uC62C \uCE98\uB9B0\uB354\uC5D0 \uB9C8\uC6B0\uC2A4\uB97C \uC62C\uB824 \u22EE > ",Me("b",{children:"\uC124\uC815 \uBC0F \uACF5\uC720"}),"\uB97C \uC5FD\uB2C8\uB2E4."]})}),Me(so,{children:vn(so,{component:"span",children:[Me("b",{children:"\uCE98\uB9B0\uB354 \uD1B5\uD569"})," \uC139\uC158\uC758 ",Me("b",{children:'"iCal \uD615\uC2DD\uC758 \uBE44\uBC00 \uC8FC\uC18C"'})," \uB97C \uBCF5\uC0AC\uD574 \uC544\uB798\uC5D0 \uBD99\uC5EC\uB123\uC73C\uC138\uC694."]})}),Me(so,{children:Me(so,{component:"span",children:"\uBE44\uBC00 \uC8FC\uC18C\uB294 \uBCF8\uC778 \uC804\uC6A9\uC785\uB2C8\uB2E4. \uC11C\uBC84\uC5D0 \uC800\uC7A5\uB418\uBA70 \uB2E4\uB978 \uC9C1\uC6D0\uC5D0\uAC8C \uBCF4\uC774\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."})}),Me(so,{children:Me(so,{component:"span",children:"\uC77C\uC815\uC740 \uC57D 10\uBD84 \uAC04\uACA9\uC73C\uB85C \uAC31\uC2E0\uB418\uACE0, \uBC18\uBCF5 \uC77C\uC815\uC740 \uC77C\uBC18\uC801\uC778 \uADDC\uCE59(\uB9E4\uC77C/\uB9E4\uC8FC/\uB9E4\uC6D4/\uB9E4\uB144)\uB9CC \uC9C0\uC6D0\uD569\uB2C8\uB2E4."})})]}),vn(so,{sx:{display:"flex",gap:2,alignItems:"center"},children:[Me(m0,{value:i,onChange:p=>a(p.target.value),fullWidth:!0,label:"\uBE44\uBC00 iCal \uC8FC\uC18C",placeholder:"https://calendar.google.com/calendar/ical/\u2026/basic.ics",slotProps:{input:{spellCheck:!1}}}),Me(wl,{variant:"contained",disabled:!i.trim()||l,onClick:()=>{s()},sx:{flexShrink:0},children:l?"\uD655\uC778 \uC911\u2026":"\uB4F1\uB85D"})]})]});return Me(u0,{open:e,onClose:r,width:680,title:"\uAD6C\uAE00 \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30",locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-calendar-import",sections:[{id:"calendar-import",showTitle:!1,children:x}],actions:{showCancelButton:!1,left:Me(wl,{variant:"outlined",startIcon:Me(d0,{sx:{fontSize:16}}),onClick:()=>window.open("https://calendar.google.com/calendar","_blank"),children:"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),right:Me(wl,{variant:"contained",onClick:r,children:"\uB2EB\uAE30"})}})}import{Box as Nt,Button as qr,TextField as x0}from"@mui/material";import{FormDialog as g0}from"@ehfuse/mui-form-dialog";import b0 from"@mui/icons-material/ContentCopyOutlined";import Um from"@mui/icons-material/OpenInNewOutlined";import{InfoAlert as Vm}from"@ehfuse/alerts";import{Fragment as k0,jsx as eo,jsxs as In}from"react/jsx-runtime";function h0(e){return`${window.location.origin}/api/v1/taskbox/calendar/${e}.ics`}function Cq({open:e,feed:o,feedTaskCount:t,buildFeedUrl:n,onSubscribe:r,onClose:i}){let a=n??h0,l=o.subscribed?a(o.token):"",d=()=>{navigator.clipboard.writeText(l).then(()=>Vm("\uD53C\uB4DC \uC8FC\uC18C\uB97C \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>Vm("\uBCF5\uC0AC\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uC8FC\uC18C\uB97C \uC9C1\uC811 \uC120\uD0DD\uD574 \uBCF5\uC0AC\uD558\uC138\uC694."))},s=()=>{let x=l.replace(/^https?:\/\//,"webcal://");window.open(`https://calendar.google.com/calendar/r?cid=${encodeURIComponent(x)}`,"_blank")},u=In(Nt,{sx:{display:"flex",flexDirection:"column",gap:2.5},children:[In(Nt,{sx:{color:"#37352f",lineHeight:1.7},children:["\uB0B4\uAC00 \uAD00\uC5EC\uD55C \uC5C5\uBB34\uB97C ",eo("b",{children:"\uC77D\uAE30\uC804\uC6A9"}),"\uC73C\uB85C \uAD6C\uAE00 \uCE98\uB9B0\uB354\uC5D0\uC11C \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4."]}),t===0?In(Nt,{sx:{color:"#8a6d1d",bgcolor:"#faf1d7",borderRadius:1,px:1.5,py:1.25,lineHeight:1.7},children:["\uC9C0\uAE08\uC740 \uCE98\uB9B0\uB354\uC5D0 \uD45C\uC2DC\uD560 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",eo("br",{}),eo("b",{children:"\uB9C8\uAC10\uAE30\uD55C\uC774 \uC788\uB294 \uB0B4 \uC5C5\uBB34 \uB610\uB294 \uBCF4\uB0B8\uC5C5\uBB34"}),"\uAC00 \uC0DD\uAE30\uBA74"," ",o.subscribed?"\uAD6C\uAE00 \uCE98\uB9B0\uB354\uC5D0 \uC790\uB3D9\uC73C\uB85C \uD45C\uC2DC\uB429\uB2C8\uB2E4.":"\uC5EC\uAE30\uC11C \uAD6C\uB3C5\uC744 \uC2DC\uC791\uD558\uC138\uC694."]}):o.subscribed&&o.enabled?In(k0,{children:[eo(x0,{value:l,fullWidth:!0,label:"\uB0B4 \uD53C\uB4DC \uC8FC\uC18C",slotProps:{input:{readOnly:!0}}}),In(Nt,{sx:{display:"flex",gap:2},children:[eo(qr,{variant:"outlined",startIcon:eo(b0,{}),onClick:d,children:"\uC8FC\uC18C \uBCF5\uC0AC"}),eo(qr,{variant:"contained",startIcon:eo(Um,{}),onClick:s,children:"Google \uCE98\uB9B0\uB354\uC5D0 \uCD94\uAC00"})]}),In(Nt,{sx:{bgcolor:"#f2f6fa",borderRadius:1,px:1.5,py:1.25,fontSize:15,lineHeight:1.8,display:"flex",flexDirection:"column",gap:.25,"& > div":{display:"flex",gap:1},"& > div::before":{content:'"\u2022"',flexShrink:0}},children:[eo(Nt,{children:In("span",{children:["\uBC84\uD2BC\uC774 \uB3D9\uC791\uD558\uC9C0 \uC54A\uC73C\uBA74 \uAD6C\uAE00 \uCE98\uB9B0\uB354 > \uB2E4\uB978 \uCE98\uB9B0\uB354 + > ",eo("b",{children:"URL\uB85C \uCD94\uAC00"}),"\uC5D0 \uC704 \uC8FC\uC18C\uB97C \uBD99\uC5EC\uB123\uC73C\uC138\uC694."]})}),eo(Nt,{children:eo("span",{children:"\uAD6C\uAE00\uC774 \uD53C\uB4DC\uB97C \uC8FC\uAE30\uC801\uC73C\uB85C(\uC218 \uC2DC\uAC04 \uAC04\uACA9) \uAC00\uC838\uAC00\uBBC0\uB85C \uBCC0\uACBD\uC0AC\uD56D \uBC18\uC601\uC774 \uB2A6\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4."})}),eo(Nt,{children:eo("span",{children:"\uB0B4\uBCF4\uB0B4\uAE30\uB97C \uADF8\uB9CC\uD558\uB824\uBA74 \uAD6C\uAE00 \uCE98\uB9B0\uB354\uC5D0\uC11C \uCD94\uAC00\uD55C \uCE98\uB9B0\uB354\uB97C \uC0AD\uC81C\uD558\uBA74 \uB429\uB2C8\uB2E4."})}),eo(Nt,{children:eo("span",{children:"\uC774 \uC8FC\uC18C\uB294 \uBCF8\uC778 \uC804\uC6A9\uC785\uB2C8\uB2E4. \uACF5\uC720\uD558\uBA74 \uB0B4 \uC5C5\uBB34 \uC77C\uC815\uC774 \uB178\uCD9C\uB429\uB2C8\uB2E4."})})]})]}):eo(qr,{variant:"contained",onClick:r,sx:{alignSelf:"flex-start"},children:"\uAD6C\uB3C5 \uC2DC\uC791 (\uD53C\uB4DC \uBC1C\uAE09)"})]});return eo(g0,{open:e,onClose:i,width:680,title:"\uAD6C\uAE00 \uCE98\uB9B0\uB354\uB85C \uB0B4\uBCF4\uB0B4\uAE30",locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-calendar-subscribe",sections:[{id:"calendar-subscribe",showTitle:!1,children:u}],actions:{showCancelButton:!1,left:eo(qr,{variant:"outlined",startIcon:eo(Um,{sx:{fontSize:16}}),onClick:()=>window.open("https://calendar.google.com/calendar","_blank"),children:"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),right:eo(qr,{variant:"contained",onClick:i,children:"\uB2EB\uAE30"})}})}import{useEffect as T0,useMemo as Dl,useState as Ml}from"react";import{Box as Ar,Button as y0,Typography as S0}from"@mui/material";import{FormDialog as B0}from"@ehfuse/mui-form-dialog";import{SearchTextField as C0}from"@ehfuse/mui-form-controls";import{TreeView as v0}from"@ehfuse/tree-view";import{Fragment as E0,jsx as et,jsxs as O0}from"react/jsx-runtime";function Gm(e){return`${e.name}#${e.seq}`}function I0(e){return Number(e.slice(e.lastIndexOf("#")+1))||0}function _0(e){let o=[],t=n=>{for(let r of n.employees??[])o.push(r);for(let r of n.groups??[])t(r)};for(let n of e)t(n);return o}function w0(e,o){return o?[e.name,e.department,e.role_name,e.work_position].filter(Boolean).some(t=>String(t).toLowerCase().includes(o)):!0}function D0(e){let o=[[e.name,e.role_name].filter(Boolean).join(" "),e.department].filter(Boolean).join(" / ");return{id:`emp:${e.seq}`,label:Gm(e),renderLabel:et(Ar,{component:"span",sx:{display:"inline-flex",alignItems:"baseline",gap:.75},children:et(Ar,{component:"span",sx:{fontWeight:400,color:"text.primary"},children:o})})}}function jm(e,o){let t=(e.groups??[]).map(r=>jm(r,o)).filter(r=>r!==null),n=(e.employees??[]).filter(r=>w0(r,o)).map(D0);return t.length===0&&n.length===0?null:{id:`group:${e.key}`,label:e.name,children:[...t,...n]}}function M0({groups:e,allEmployees:o,initialSelectedSeqs:t,multiple:n,isMobile:r,onSelectionChange:i}){let[a,l]=Ml(""),d=Dl(()=>e.map(u=>jm(u,a.trim().toLowerCase())).filter(u=>u!==null),[e,a]),s=Dl(()=>o.filter(u=>t.includes(u.seq)).map(Gm),[]);return O0(E0,{children:[et(Ar,{sx:{px:1.5,py:1,borderBottom:"1px solid #cccccc",flexShrink:0},children:et(C0,{size:"small",fullWidth:!0,placeholder:"\uC774\uB984, \uBD80\uC11C \uAC80\uC0C9",onSearch:l,onClear:()=>l(""),sx:{"& .MuiOutlinedInput-notchedOutline":{border:"none"},"& .MuiInputBase-root":{px:0}}})}),et(Ar,{sx:r?{display:"flex",flexDirection:"column"}:{flex:1,minHeight:0,overflow:"hidden",display:"flex",flexDirection:"column"},children:et(v0,{items:d,checkbox:!0,multiSelect:n,selectionMode:"child",showSearch:!1,defaultExpanded:!0,initialSelections:s,onChange:u=>i(u.map(I0).filter(x=>x>0)),styles:{border:"none",borderRadius:"0"}})})]})}function Rq({open:e,title:o="\uC9C1\uC6D0 \uC120\uD0DD",hint:t="",groups:n,multiple:r=!1,selectedSeqs:i,confirmText:a="\uD655\uC778",onConfirm:l,onClose:d}){let s=_e(),[u,x]=Ml([]),[p,c]=Ml(0),f=Dl(()=>_0(n),[n]),M=i??[];T0(()=>{e&&(x(M),c(b=>b+1))},[e]);let C=()=>{let b=f.filter(g=>u.includes(g.seq));l(r?b:b.slice(0,1)),d()};return et(B0,{open:e,onClose:d,title:`${o}${r&&u.length>0?` (${u.length}\uBA85)`:""}`,locale:"ko",fullScreen:s,mobilePresentation:s?"slide":"dialog",draggable:!0,width:"600px",tabs:{visible:!1},titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},scrollPastLastSection:!1,sectionContentPaddingTop:0,fontScale:{enabled:!0},fontScaleKey:"taskbox-employee-select",sections:[{id:"employee-select",title:"\uC9C1\uC6D0 \uC120\uD0DD",showTitle:!1,children:et(Ar,{sx:{...s?{}:{height:560},display:"flex",flexDirection:"column",border:"1px solid #cccccc",borderRadius:1,...s?{}:{overflow:"hidden"},userSelect:"none"},children:et(M0,{groups:n,allEmployees:f,initialSelectedSeqs:M,multiple:r,isMobile:s,onSelectionChange:x},p)})}],dialogActionSx:{"@media (max-width:1023.95px)":{gap:"0.75rem !important","& .left-actions":{flex:1,minWidth:0},"& .right-actions":{flex:1}}},actions:{visible:!0,showCancelButton:!1,left:t?et(S0,{variant:"body2",color:"text.secondary",sx:{whiteSpace:"pre-line",lineHeight:1.35},children:t}):void 0,right:et(y0,{variant:"contained",onClick:C,children:a})}})}import{useEffect as q0,useMemo as A0,useState as L0}from"react";import{Box as mr,Button as N0,Divider as F0}from"@mui/material";import{FormDialog as H0}from"@ehfuse/mui-form-dialog";import{LabelSelect as W0}from"@ehfuse/mui-form-controls";import{Box as pt}from"@mui/material";import{jsx as sr,jsxs as cr}from"react/jsx-runtime";function R0(e,o){let t=o.filter(n=>n.sprint_seq===e.seq&&!n.archived&&n.completed);return{points:t.reduce((n,r)=>n+(r.story_points??0),0),count:t.length}}function Ym({sprints:e,tasks:o,height:t=160}){let r=[...e].sort((u,x)=>`${u.start_date}|${u.seq}`.localeCompare(`${x.start_date}|${x.seq}`)).map(u=>({sprint:u,...R0(u,o)})),i=r.some(u=>u.points>0),a=r.map(u=>i?u.points:u.count),l=Math.max(1,...a),d=r.filter(u=>u.sprint.status==="closed").map(u=>i?u.points:u.count),s=d.length>0?Math.round(d.reduce((u,x)=>u+x,0)/d.length*10)/10:null;return r.length===0?sr(pt,{sx:{py:4,textAlign:"center",fontSize:14.5,color:"#9a9a97"},children:"\uD45C\uC2DC\uD560 \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):cr(pt,{children:[cr(pt,{sx:{mb:1,display:"flex",justifyContent:"space-between",fontSize:14,color:"#000"},children:[cr("span",{children:["\uC644\uB8CC ",i?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uBAA9\uD45C\uBCC4"]}),s!==null?cr("span",{children:["\uD3C9\uADE0(\uC885\uB8CC \uBAA9\uD45C)"," ",sr(pt,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:s}),i?"SP":"\uAC74"]}):null]}),sr(pt,{sx:{display:"flex",alignItems:"flex-end",gap:2,height:t,px:.5},children:r.map(u=>{let x=i?u.points:u.count,p=Math.round((t-24)*x/l),c=u.sprint.status==="closed";return cr(pt,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-end",height:"100%"},children:[sr(pt,{sx:{fontSize:14,fontWeight:700,color:"#37352f",lineHeight:1.5},children:x}),sr(pt,{sx:{width:"60%",maxWidth:56,height:Math.max(2,p),borderRadius:"4px 4px 0 0",bgcolor:c?"#2f80ed":"#a9c9f5"}})]},u.sprint.seq)})}),sr(pt,{sx:{display:"flex",gap:2,px:.5,mt:.5},children:r.map(u=>cr(pt,{sx:{flex:1,minWidth:0,textAlign:"center",fontSize:13.5,color:"#000",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[u.sprint.name,u.sprint.status!=="closed"?" (\uC9C4\uD589\uC911)":""]},u.sprint.seq))})]})}import{useMemo as P0}from"react";import{Box as _n}from"@mui/material";import{jsx as ft,jsxs as wn}from"react/jsx-runtime";function Xm(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?new Date(`${e}T00:00:00`):null}function z0(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function El(e){return e.slice(5).replace("-",".")}function Qm({sprint:e,tasks:o,todayStr:t,height:n=200}){let r=P0(()=>{let b=Xm(e.start_date),g=Xm(e.end_date);if(!b||!g||g<b||Math.round((g.getTime()-b.getTime())/864e5)+1>366)return null;let S=o.filter(m=>m.sprint_seq===e.seq&&!m.archived);if(S.length===0)return{empty:!0};let O=S.some(m=>(m.story_points??0)>0),y=m=>O?m.story_points??0:1,_=S.reduce((m,T)=>m+y(T),0),E=new Map;for(let m of S){if(!m.completed)continue;let T=(m.completed_time??"").slice(0,10),h=/^\d{4}-\d{2}-\d{2}$/.test(T)?T:e.start_date;E.set(h,(E.get(h)??0)+y(m))}let v=[];for(let m=new Date(b);m<=g;m.setDate(m.getDate()+1))v.push(z0(m));let D=_,L=[];for(let m of v){if(m>t)break;D-=E.get(m)??0,L.push({day:m,value:Math.max(0,D)})}return{empty:!1,days:v,total:_,usePoints:O,actual:L}},[e,o,t]);if(!r)return ft(_n,{sx:{py:4,textAlign:"center",fontSize:14.5,color:"#9a9a97"},children:"\uBAA9\uD45C\uC758 \uC2DC\uC791\uC77C\xB7\uC885\uB8CC\uC77C\uC774 \uC788\uC5B4\uC57C \uBC88\uB2E4\uC6B4\uC744 \uADF8\uB9B4 \uC218 \uC788\uC2B5\uB2C8\uB2E4."});if(r.empty)return ft(_n,{sx:{py:4,textAlign:"center",fontSize:14.5,color:"#9a9a97"},children:"\uBC30\uC815\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."});let{days:i,total:a,usePoints:l,actual:d}=r,s=600,u=200,x=8,p=b=>i.length===1?0:b/(i.length-1)*s,c=b=>x+(u-x*2)*(1-b/Math.max(1,a)),f=`${p(0)},${c(a)} ${p(i.length-1)},${c(0)}`,M=d.map(b=>`${p(i.indexOf(b.day))},${c(b.value)}`).join(" "),C=d[d.length-1];return wn(_n,{children:[wn(_n,{sx:{mb:1,display:"flex",justifyContent:"space-between",fontSize:14,color:"#000"},children:[wn("span",{children:["\uB0A8\uC740 ",l?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uCD1D ",a]}),C?wn("span",{children:["\uD604\uC7AC"," ",ft(_n,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:C.value}),l?"SP":"\uAC74"," \uB0A8\uC74C"]}):null]}),ft(_n,{sx:{border:"1px solid #e6e6e3",borderRadius:1,bgcolor:"#fafaf9",px:1,py:.5},children:wn("svg",{viewBox:`0 0 ${s} ${u}`,preserveAspectRatio:"none",style:{display:"block",width:"100%",height:n},children:[ft("line",{x1:0,y1:c(0),x2:s,y2:c(0),stroke:"#e6e6e3",strokeWidth:1}),ft("polyline",{points:f,fill:"none",stroke:"#9a9a97",strokeWidth:1.5,strokeDasharray:"6 5",vectorEffect:"non-scaling-stroke"}),d.length>1?ft("polyline",{points:M,fill:"none",stroke:"#2f80ed",strokeWidth:2.5,vectorEffect:"non-scaling-stroke"}):null,C?ft("circle",{cx:p(i.indexOf(C.day)),cy:c(C.value),r:4,fill:"#2f80ed",vectorEffect:"non-scaling-stroke"}):null]})}),wn(_n,{sx:{mt:.5,display:"flex",justifyContent:"space-between",fontSize:13.5,color:"#000"},children:[ft("span",{children:El(e.start_date)}),t>e.start_date&&t<e.end_date?wn("span",{children:["\uC624\uB298 ",El(t)]}):null,ft("span",{children:El(e.end_date)})]})]})}import{jsx as Ft,jsxs as Ol}from"react/jsx-runtime";function Xq({open:e,sprints:o,tasks:t,todayStr:n,initialSprintSeq:r=0,onClose:i}){let[a,l]=L0(0);q0(()=>{if(!e)return;let u=o.find(p=>p.status==="active")??o[0],x=o.find(p=>p.seq===r)??u;l(x?.seq??0)},[e]);let d=A0(()=>o.find(u=>u.seq===a)??null,[o,a]),s=Ol(mr,{sx:{display:"flex",flexDirection:"column"},children:[Ol(mr,{sx:{px:3,py:2.5},children:[Ft(mr,{sx:{mb:1.5,fontSize:17,fontWeight:700,color:"#37352f"},children:"\uBCA8\uB85C\uC2DC\uD2F0"}),Ft(Ym,{sprints:o,tasks:t})]}),Ft(F0,{sx:{borderColor:"#e6e6e3"}}),Ol(mr,{sx:{px:3,py:2.5},children:[Ft(mr,{sx:{mb:1.5,fontSize:17,fontWeight:700,color:"#37352f"},children:"\uBC88\uB2E4\uC6B4"}),Ft(W0,{label:"\uBAA9\uD45C",showLabel:!1,value:a?String(a):"",options:o.map(u=>({value:String(u.seq),label:Ho(u)})),onChange:u=>l(Number(u.target.value)||0),sx:{width:280,mb:2}}),d?Ft(Qm,{sprint:d,tasks:t,todayStr:n}):Ft(mr,{sx:{py:4,textAlign:"center",fontSize:13.5,color:"#9a9a97"},children:"\uBC88\uB2E4\uC6B4\uC744 \uBCFC \uBAA9\uD45C\uB97C \uC120\uD0DD\uD558\uC138\uC694."})]})]});return Ft(H0,{open:e,onClose:i,width:680,title:"\uBAA9\uD45C \uCC28\uD2B8",locale:"ko",contentTopPadding:0,contentPaddingX:0,sectionsPaddingTop:0,tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-sprint-charts",sections:[{id:"sprint-charts",showTitle:!1,children:s}],actions:{showCancelButton:!1,right:Ft(N0,{variant:"contained",onClick:i,children:"\uB2EB\uAE30"})}})}import{Checkbox as $0,Divider as K0,Menu as U0,MenuItem as Rl}from"@mui/material";import{jsx as Lr,jsxs as Zm}from"react/jsx-runtime";function oA({anchorEl:e,candidates:o,selectedNames:t,avatarSrcByName:n,onToggle:r,onClear:i,onClose:a}){return Zm(U0,{anchorEl:e,open:!!e,onClose:a,transitionDuration:0,children:[o.length===0?Lr(Rl,{disabled:!0,sx:{fontSize:14},children:"\uBAA9\uB85D\uC5D0 \uC9C0\uC815\uB41C \uC0AC\uB78C\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):o.map(l=>{let d=t.includes(l.name);return Zm(Rl,{onClick:()=>r(l),sx:{fontSize:14,minWidth:170,gap:1},children:[Lr($0,{size:"small",checked:d,sx:{p:0}}),Lr(Mo,{names:[l.name],size:20,avatarSrcByName:n}),l.name]},`${l.accountSeq}-${l.name}`)}),Lr(K0,{}),Lr(Rl,{disabled:t.length===0,onClick:i,sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}import{useState as V0}from"react";import{ButtonBase as G0,Menu as j0,MenuItem as Y0}from"@mui/material";import X0 from"@mui/icons-material/KeyboardArrowDown";import Q0 from"@mui/icons-material/Check";import{Fragment as Z0,jsx as Pl,jsxs as zl}from"react/jsx-runtime";function cA({value:e,onChange:o,options:t}){let[n,r]=V0(null),i=t??ma,a=ma.find(l=>l.value===e)?.label??"";return zl(Z0,{children:[zl(G0,{onClick:l=>r(l.currentTarget),sx:{display:"flex",alignItems:"center",gap:.5,px:1,py:.5,borderRadius:1,fontSize:13.5,color:"#37352f","&:hover":{bgcolor:"#f2f2f0"}},children:[a,Pl(X0,{sx:{fontSize:17,color:"#9a9a97"}})]}),Pl(j0,{transitionDuration:0,anchorEl:n,open:!!n,onClose:()=>r(null),children:i.map(l=>zl(Y0,{selected:l.value===e,onClick:()=>{o(l.value),r(null)},sx:{fontSize:14,minWidth:140,justifyContent:"space-between",gap:1},children:[l.label,l.value===e?Pl(Q0,{sx:{fontSize:16,color:"#2f80ed"}}):null]},l.value))})]})}import{Box as Gi,ButtonBase as J0}from"@mui/material";import{DateTextField as Jm}from"@ehfuse/mui-form-controls";function Dn(e){let o=t=>String(t).padStart(2,"0");return`${e.getFullYear()}-${o(e.getMonth()+1)}-${o(e.getDate())}`}function Vi(e,o=new Date){let t=new Date(o);return t.setMonth(t.getMonth()-e),t}function dA(e=new Date){return{fromDate:Dn(Vi(1,e)),toDate:Dn(e)}}import{jsx as Nr,jsxs as eu}from"react/jsx-runtime";var eS=[{label:"1\uAC1C\uC6D4",months:1},{label:"3\uAC1C\uC6D4",months:3},{label:"6\uAC1C\uC6D4",months:6},{label:"1\uB144",months:12},{label:"\uC804\uCCB4",months:0}];function ou({fromDate:e,toDate:o,onChange:t}){let n=i=>{if(i<=0){t("","");return}t(Dn(Vi(i)),Dn(new Date))},r=i=>i<=0?!e&&!o:!e||!o?!1:e===Dn(Vi(i))&&o===Dn(new Date);return eu(Gi,{sx:{display:"flex",alignItems:"center",gap:1.5,flexWrap:"wrap"},children:[Nr(Gi,{sx:{display:"flex",alignItems:"center",gap:1.5},children:eS.map(i=>{let a=r(i.months);return Nr(J0,{onClick:()=>n(i.months),sx:{px:1.25,py:.85,borderRadius:1,fontSize:13,fontWeight:a?500:400,border:"1px solid",borderColor:a?"#2f80ed":"#dedddb",color:a?"#2f80ed":"#37352f",bgcolor:a?"#eef6ff":"transparent","&:hover":{bgcolor:a?"#eef6ff":"#f7f7f5"}},children:i.label},i.label)})}),eu(Gi,{sx:{display:"flex",alignItems:"center",gap:.5},children:[Nr(Jm,{value:e,size:"small",placeholder:"\uC2DC\uC791\uC77C",onChange:i=>t(i.target.value,o),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}}),Nr(Gi,{component:"span",sx:{fontSize:13,color:"#9a9a97"},children:"~"}),Nr(Jm,{value:o,size:"small",placeholder:"\uC885\uB8CC\uC77C",onChange:i=>t(e,i.target.value),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}})]})]})}import{Popover as oS}from"@mui/material";import{jsx as tu}from"react/jsx-runtime";function yA({anchorEl:e,fromDate:o,toDate:t,onChange:n,onClose:r}){return tu(oS,{transitionDuration:0,anchorEl:e,open:!!e,onClose:r,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},slotProps:{paper:{sx:{p:1.5}}},children:tu(ou,{fromDate:o,toDate:t,onChange:n})})}import{Box as tS,ButtonBase as nS,Tab as rS,Tabs as iS}from"@mui/material";import aS from"@mui/icons-material/Checklist";import lS from"@mui/icons-material/Face";import sS from"@mui/icons-material/Publish";import cS from"@mui/icons-material/NotificationsOutlined";import mS from"@mui/icons-material/BugReportOutlined";import uS from"@mui/icons-material/DescriptionOutlined";import dS from"@mui/icons-material/Inventory2Outlined";import{jsx as ot}from"react/jsx-runtime";function nu(e,o){return o>0?`${e} (${o})`:e}var PA=[{id:"my",label:"\uC804\uCCB4",icon:ot(aS,{sx:{fontSize:18}})},{id:"notice",label:"\uACF5\uC9C0\uC0AC\uD56D",icon:ot(cS,{sx:{fontSize:18}})},{id:"mine",label:"\uB0B4 \uC5C5\uBB34",icon:ot(lS,{sx:{fontSize:18}})},{id:"sent",label:"\uBCF4\uB0B8 \uC5C5\uBB34",icon:ot(sS,{sx:{fontSize:18}})},{id:"bug",label:"\uC624\uB958",icon:ot(mS,{sx:{fontSize:18}})},{id:"archive",label:"\uBCF4\uAD00\uD568",icon:ot(dS,{sx:{fontSize:18}}),hideCount:!0},{id:"report",label:"\uBCF4\uACE0\uC11C",icon:ot(uS,{sx:{fontSize:18}}),hideCount:!0}];function pS(e){return{minHeight:46,minWidth:75,bgcolor:e.bg,color:e.color,borderRadius:"8px 8px 0 0",padding:"10px 18px",textTransform:"none",fontSize:14,fontWeight:500,border:`1px solid ${e.borderColor}`,borderBottom:"none","&:hover":{bgcolor:e.hoverBg},"&.Mui-selected":{bgcolor:e.selectedBg,color:e.selectedColor,border:`1px solid ${e.selectedBg}`,borderBottom:"none","&:hover":{bgcolor:e.selectedBg}},...e.sx}}function zA({items:e,activeTab:o,counts:t,onChange:n,compact:r=!1}){let i=te(),a=pS(i.tabs),l=e;return r?ot(tS,{sx:{display:"flex",flexWrap:"wrap",gap:1.25},children:l.map(d=>{let s=o===d.id;return ot(nS,{onClick:()=>n(d.id),sx:{px:1.5,py:.75,borderRadius:1,fontSize:_o(13.5),fontWeight:500,whiteSpace:"nowrap",border:"1px solid",bgcolor:s?i.tabs.selectedBg:i.tabs.bg,color:s?i.tabs.selectedColor:i.tabs.color,borderColor:s?i.tabs.selectedBg:i.tabs.borderColor},children:nu(d.label,d.hideCount?0:t[d.id]??0)},d.id)})}):ot(iS,{value:o,onChange:(d,s)=>n(s),sx:{minHeight:46,"& .MuiTabs-indicator":{display:"none"},"& .MuiTabs-flexContainer":{gap:"12px",minHeight:46}},children:l.map(d=>ot(rS,{value:d.id,label:nu(d.label,d.hideCount?0:t[d.id]??0),icon:d.icon,iconPosition:"start",sx:a},d.id))})}import{useEffect as fS,useMemo as xS,useState as ql}from"react";import{Divider as Al,ListItemIcon as Ko,Menu as Ll,MenuItem as vo}from"@mui/material";import gS from"@mui/icons-material/OpenInNewOutlined";import bS from"@mui/icons-material/Check";import hS from"@mui/icons-material/CheckCircleOutlined";import kS from"@mui/icons-material/RadioButtonUnchecked";import TS from"@mui/icons-material/SendOutlined";import yS from"@mui/icons-material/EventOutlined";import SS from"@mui/icons-material/PersonOutlineOutlined";import BS from"@mui/icons-material/ViewKanbanOutlined";import CS from"@mui/icons-material/ContentCopyOutlined";import vS from"@mui/icons-material/NextPlanOutlined";import IS from"@mui/icons-material/ContentPasteOutlined";import _S from"@mui/icons-material/ShareOutlined";import wS from"@mui/icons-material/DirectionsRunOutlined";import ru from"@mui/icons-material/ChevronRight";import DS from"@mui/icons-material/ArchiveOutlined";import MS from"@mui/icons-material/UnarchiveOutlined";import{ConfirmDialog as ES}from"@ehfuse/alerts";import{Fragment as OS,jsx as me,jsxs as bo}from"react/jsx-runtime";function uL({target:e,onClose:o,customTabs:t,sprints:n=[],myAccountSeq:r=0,onOpenDetail:i,onToggleCompleted:a,onRequestConfirm:l,onChangeDueDate:d,onChangeReminder:s,onMemberEdit:u,onMoveProject:x,onDuplicate:p,onCreateFollowUp:c,onShare:f,onAssignSprint:M,onArchiveToggle:C,onDelete:b}){let g=_e(),I=rt(),[S,O]=ql(null),[y,_]=ql(null),[E,v]=ql(null);fS(()=>{e||(O(null),_(null),v(null))},[e]);let D=e?.task??null,L=!!D?.is_notice,m=!!D?.is_event,T=D?!ht(D,r):!1,h=xS(()=>new Set(t.filter(A=>A.useSprints).map(A=>A.key)),[t]),k=async()=>{let A=D;if(o(),!A)return;await ES({title:"\uC5C5\uBB34 \uC0AD\uC81C",message:`"${A.title}" \uC5C5\uBB34\uB97C \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&b(A.seq)},P=()=>{D&&C(D.seq,!D.archived),o()};return bo(OS,{children:[bo(Ll,{open:!!e,onClose:o,transitionDuration:0,anchorReference:g?"none":"anchorPosition",anchorPosition:!g&&e?{top:e.position.top,left:e.position.left}:void 0,slotProps:{paper:{sx:{minWidth:190,...g?{position:"fixed",top:"50%",left:"50%",translate:"-50% -50%",maxHeight:"70vh"}:{}}},list:g?{sx:{"& .MuiMenuItem-root":{py:1,minHeight:0}}}:void 0},children:[bo(vo,{onClick:()=>{D&&i(D),o()},sx:{fontSize:14},children:[me(Ko,{children:me(gS,{sx:{fontSize:19}})}),"\uC0C1\uC138 \uC5F4\uAE30"]}),bo(vo,{disabled:L?(D?.author_account_seq??0)!==r:(D?.author_account_seq??0)!==r&&(D?.manager_account_seq??0)!==r,onClick:()=>{D&&a(D.seq,!D.completed),o()},sx:{fontSize:14},children:[me(Ko,{children:D?.completed?me(kS,{sx:{fontSize:19}}):me(hS,{sx:{fontSize:19}})}),D?.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC"]}),!L&&l?bo(vo,{disabled:!(D?.manager_account_seq??0)&&(D?.receiver_account_seqs??[]).length===0,onClick:()=>{D&&l(D),o()},sx:{fontSize:14},children:[me(Ko,{children:me(TS,{sx:{fontSize:19}})}),"\uD655\uC778 \uC694\uCCAD"]}):null,m?null:me(Al,{}),m?null:bo(vo,{disabled:T,onClick:A=>{D&&O({anchorEl:A.currentTarget,task:D})},sx:{fontSize:14},children:[me(Ko,{children:me(yS,{sx:{fontSize:19}})}),"\uB9C8\uAC10\uAE30\uD55C \uBCC0\uACBD"]}),!L&&!m&&u?bo(vo,{onClick:()=>{D&&u(D,"manager"),o()},sx:{fontSize:14},children:[me(Ko,{children:me(SS,{sx:{fontSize:19}})}),"\uCC45\uC784\uC790 \uBCC0\uACBD"]}):null,m?null:bo(vo,{disabled:T,onClick:A=>{D&&_({anchorEl:A.currentTarget,task:D})},sx:{fontSize:14},children:[me(Ko,{children:me(BS,{sx:{fontSize:19}})}),"\uD504\uB85C\uC81D\uD2B8 \uC774\uB3D9",me(ru,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}),me(Al,{}),p?bo(vo,{disabled:T,onClick:()=>{D&&p(D.seq),o()},sx:{fontSize:14},children:[me(Ko,{children:me(CS,{sx:{fontSize:19}})}),"\uBCF5\uC81C"]}):null,c&&D&&!D.is_event&&!D.is_notice?bo(vo,{onClick:()=>{D&&c(D.seq),o()},sx:{fontSize:14},children:[me(Ko,{children:me(vS,{sx:{fontSize:19}})}),"\uD6C4\uC18D \uC5C5\uBB34 \uB9CC\uB4E4\uAE30"]}):null,bo(vo,{onClick:()=>{D&&(f?f(D):rr(D,g)),o()},sx:{fontSize:14},children:[me(Ko,{children:g?me(_S,{sx:{fontSize:19}}):me(IS,{sx:{fontSize:19}})}),g?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC"]}),D&&!D.is_notice&&!D.is_event&&h.has(String(D.tab_key??""))&&M?bo(vo,{onClick:A=>v(A.currentTarget),sx:{fontSize:14},children:[me(Ko,{children:me(wS,{sx:{fontSize:19}})}),"\uBAA9\uD45C\uC5D0 \uB123\uAE30",me(ru,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}):null,bo(vo,{onClick:P,disabled:T||!D?.archived&&!(D&&Kr(D)),sx:{fontSize:14},children:[me(Ko,{children:D?.archived?me(MS,{sx:{fontSize:19}}):me(DS,{sx:{fontSize:19}})}),D?.archived?"\uBCF4\uAD00 \uD574\uC81C":"\uBCF4\uAD00"]}),me(Al,{}),bo(vo,{disabled:T,onClick:k,sx:{fontSize:14,color:"#e5484d"},children:[me(Ko,{children:me(St,{sx:{fontSize:19,color:"#e5484d"}})}),"\uC0AD\uC81C"]})]}),me(Vt,{anchorEl:S?.anchorEl??null,open:!!S,date:S?.task.due_date??"",reminder:S?.task.reminder??"none",hideReminder:!!S?.task.completed,centered:g,onClose:()=>{O(null),o()},onDateChange:A=>{S&&d(S.task.seq,A)},onReminderChange:A=>{S&&s?.(S.task.seq,A)}}),bo(Ll,{transitionDuration:0,anchorEl:y?.anchorEl??null,open:!!y,onClose:()=>{_(null),o()},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},...I,children:[me(vo,{selected:!y?.task.tab_key,onClick:()=>{y&&x(y.task.seq,""),_(null),o()},sx:{fontSize:14,minWidth:170},children:"\uC5C6\uC74C"}),t.filter(A=>!A.archived).map(A=>me(vo,{selected:y?.task.tab_key===A.key,onClick:()=>{y&&x(y.task.seq,A.key),_(null),o()},sx:{fontSize:14,minWidth:170},children:A.label},A.key))]}),me(Ll,{transitionDuration:0,anchorEl:E,open:!!E,onClose:()=>v(null),anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...n.filter(A=>`custom-${A.group_seq}`===String(D?.tab_key??"")).map(A=>({seq:A.seq,label:Ho(A)}))].map(A=>bo(vo,{onClick:()=>{D&&M?.(D.seq,A.seq),v(null),o()},sx:{fontSize:14,minWidth:160,gap:1},children:[A.label,(D?.sprint_seq??0)===A.seq?me(bS,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},A.seq))})]})}import{Checkbox as RS,Divider as PS,Menu as zS,MenuItem as iu}from"@mui/material";import{jsx as ji,jsxs as au}from"react/jsx-runtime";function gL({anchorEl:e,labelOptions:o,selectedKeys:t,onToggle:n,onClear:r,onClose:i}){return au(zS,{transitionDuration:0,anchorEl:e,open:!!e,onClose:i,children:[o.map(a=>{let l=t.includes(a.key);return au(iu,{onClick:()=>n(a.key),sx:{fontSize:14,minWidth:190,gap:1},children:[ji(RS,{size:"small",checked:l,sx:{p:0}}),ji(ze,{option:a})]},a.key)}),ji(PS,{}),ji(iu,{disabled:t.length===0,onClick:()=>{r(),i()},sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}import{Divider as lu,Menu as qS,MenuItem as Nl}from"@mui/material";import AS from"@mui/icons-material/Check";import LS from"@mui/icons-material/BarChartOutlined";import NS from"@mui/icons-material/SettingsOutlined";import{jsx as Fr,jsxs as Yi}from"react/jsx-runtime";function CL(e){let{anchorEl:o,sprints:t,value:n,onSelect:r,onManage:i,onCharts:a,onClose:l}=e;return Yi(qS,{transitionDuration:0,anchorEl:o,open:!!o,onClose:l,children:[[{seq:0,label:"\uC804\uCCB4"},{seq:-1,label:"\uBBF8\uBC30\uC815 \uC5C5\uBB34"},...t.map(d=>({seq:d.seq,label:Ho(d)}))].map(d=>Yi(Nl,{onClick:()=>{r(d.seq),l()},sx:{fontSize:14,minWidth:180,gap:1},children:[d.label,n===d.seq?Fr(AS,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},d.seq)),Fr(lu,{}),a?Yi(Nl,{onClick:()=>{l(),a()},sx:{fontSize:14,gap:1},children:[Fr(LS,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uCC28\uD2B8"]}):null,a?Fr(lu,{}):null,Yi(Nl,{onClick:()=>{l(),i()},sx:{fontSize:14,gap:1},children:[Fr(NS,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uAD00\uB9AC\u2026"]})]})}var FS={my:"tasks",mine:"tasks",sent:"tasks",notice:"notice",bug:"bug",archive:"archive",done:"done",report:"report"};function HS(e){return FS[e]??"tasks"}var _L={list:"\uBAA9\uB85D",card:"\uD504\uB85C\uC81D\uD2B8",kanban:"\uC0C1\uD0DC",sprint:"\uBAA9\uD45C",calendar:"\uC8FC\uAC04",month:"\uC6D4\uAC04",agenda:"\uC544\uC820\uB2E4",timeline:"\uD0C0\uC784\uB77C\uC778"},su=["list","calendar","month","card","kanban","sprint","timeline"],WS=["list","card"];function wL(e){let o=HS(e);switch(o){case"notice":return{kind:o,viewOptions:[],showCreate:!0,createLabel:"\uACF5\uC9C0\uC0AC\uD56D \uB4F1\uB85D",showGroupBy:!1,showSprintFilter:!1,showDateRange:!1,showHideCompleted:!0,forceFlatList:!0,columns:{notice:!0}};case"bug":return{kind:o,viewOptions:su,showCreate:!0,createLabel:"\uC624\uB958 \uB4F1\uB85D",showGroupBy:!0,showSprintFilter:!0,showDateRange:!1,showHideCompleted:!0,forceFlatList:!1,columns:{bug:!0}};case"archive":return{kind:o,viewOptions:WS,showCreate:!1,createLabel:"",showGroupBy:!1,showSprintFilter:!1,showDateRange:!0,showHideCompleted:!1,forceFlatList:!0,columns:{showActions:!1}};case"done":return{kind:o,viewOptions:["list"],showCreate:!1,createLabel:"",showGroupBy:!1,showSprintFilter:!1,showDateRange:!0,showHideCompleted:!1,forceFlatList:!0,columns:{showActions:!1}};case"report":return{kind:o,viewOptions:[],showCreate:!1,createLabel:"",showGroupBy:!1,showSprintFilter:!1,showDateRange:!0,showHideCompleted:!1,forceFlatList:!0,columns:{}};default:return{kind:o,viewOptions:su,showCreate:!0,createLabel:"\uC5C5\uBB34 \uB4F1\uB85D",showGroupBy:!0,showSprintFilter:!0,showDateRange:!1,showHideCompleted:!0,forceFlatList:!1,columns:e==="mine"?{showRequest:!1,confirmMode:"action"}:e==="sent"?{confirmMode:"time"}:{}}}}export{o1 as ALL_TASK_VIEWER_ACCOUNT_SEQS,om as AddLabelDialog,ii as AddTabDialog,Qc as AttachmentUploadGauge,ll as AttachmentUploadPercent,ra as BUG_DEVICE_OPTIONS,br as BUG_ICON_COLOR,pI as BUG_KANBAN_COLUMNS,na as BUG_REPRO_OPTIONS,ia as BUG_RESOLUTION_OPTIONS,sn as BUG_STATUS_OPTIONS,gr as BUG_TASK_ICON,_i as BugPropertiesGrid,Ff as COLUMN_WIDTHS,la as COMPLETED_STATUS_OPTION,vl as CUSTOM_TAB_KEY_PREFIX,gq as CalendarImportDialog,Cq as CalendarSubscribeDialog,Ut as CommentBubbleIcon,Hn as ConfirmCountButton,Ds as DATE_REMINDER_OPTIONS,Qi as DEFAULT_PROJECT_ICON,PA as DEFAULT_TASKBOX_TAB_ITEMS,Oe as DEFAULT_TASK_ICON,ol as DRAWER_SECTION_TITLE_FONT_SIZE,yA as DateRangeFilterPopover,$o as DrawerSection,Vt as DueDatePickerPopover,kf as ENDED_EVENT_STATUS_OPTION,cm as EVENT_ICON_COLOR,Rq as EmployeeSelectDialog,ma as GROUP_BY_OPTIONS,Vn as GoogleEventChip,cA as GroupByMenuButton,ri as IconPickerGrid,zc as InlineAddressInput,Pt as InlineTextValue,sa as KANBAN_CLOSED_COLUMN_KEY,gL as LabelFilterMenu,qi as LabelSelectMenu,kr as MANUAL_TASK_STATUS_OPTIONS,oA as MemberFilterMenu,hr as NOTICE_STATUS_OPTIONS,wo as NOTICE_TASK_ICON,Xl as NO_TASK_ICON,Zi as PROJECT_ICON_OPTIONS,pe as PropertyRow,Nn as RECEIVER_AVATAR_COLORS,Ms as REMINDER_OPTIONS,Mo as ReceiverAvatarStack,Dm as RelatedTasksSection,$S as STATUS_KEY_REPLIED,Fl as STATUS_KEY_WAITING,qs as SortableTaskCard,Qm as SprintBurndownChart,Xq as SprintChartsDialog,CL as SprintFilterMenu,aq as SprintManageDialog,Ym as SprintVelocityChart,jr as StatusSelectMenu,pa as TASKBOX_COLUMNS,Yo as TASKBOX_DRAWER_NARROW_MQ,Ql as TASKBOX_UI_STATE_ID,_L as TASKBOX_VIEW_LABELS,eE as TASKBOX_VIEW_MODES,ln as TASK_STATUS_OPTIONS,qx as TIME_REMINDER_OPTIONS,si as TaskAckListPopover,Fn as TaskActionButton,$i as TaskActivityDialog,Pi as TaskAttachmentsSection,Bc as TaskBoxColumnSummary,Oa as TaskBoxGroupBoard,FE as TaskBoxMobileList,dc as TaskBoxMonthAgenda,lc as TaskBoxMonthCalendar,pE as TaskBoxSprintColumnSummary,Rs as TaskBoxTable,zA as TaskBoxTabs,hc as TaskBoxTimeline,JM as TaskBoxView,tc as TaskBoxWeekCalendar,Cr as TaskCardContent,Mi as TaskChecklistSection,km as TaskCommentInput,hm as TaskCommentsSection,wi as TaskContentEditor,uL as TaskContextMenu,Ii as TaskCorePropertiesGrid,dl as TaskCreateBody,uP as TaskCreateDrawer,ou as TaskDateRangeFilter,Em as TaskDetailBody,Gz as TaskDetailDrawer,Cm as TaskDetailHeader,Qn as TaskIconPickerPopover,$t as TaskLabelChips,Di as TaskLinkDialog,vm as TaskNoteField,Vo as TaskPriorityChip,ze as TaskStatusChip,yI as TaskStatusChips,Bu as TaskboxProvider,h0 as buildCalendarFeedUrl,mi as buildCardBaseSx,as as buildStatusOptionColors,ua as buildTaskGroupSections,hl as buildTaskRelationsModel,uy as buildTaskShareText,Wr as buildTaskboxTheme,fs as canAssignBugManager,Qr as canClaimTaskItem,ht as canEditTaskItem,Xr as canViewTaskItem,Zr as canVolunteerTaskItem,kl as countTaskRelations,Tc as countWorkdays,ff as createTaskboxTheme,Sc as daysLeftUntil,Ji as defaultTaskBoxFormValues,ea as defaultTaskboxUiStateValues,am as filterFilesWithinLimit,aw as formatConfirmTime,kc as formatHours,at as formatKoreanDate,Go as formatKoreanDateTime,Ho as formatSprintOptionLabel,ns as getBugDeviceName,ts as getBugReproName,$r as getBugResolutionName,Tf as getBugStatusOption,dA as getDefaultDateRange,Tr as getEventDisplayStatusOption,xI as getNoDueStatusRank,im as getNoticeAckInfo,rs as getNoticeStatusOption,BR as getNoticeTargetDisplay,zn as getProjectIconAnchorComponent,Ve as getProjectIconComponent,ya as getReminderLabel,Ta as getReminderOptions,is as getStatusOptionsForTask,wL as getTabHeaderConfig,xa as getTaskBoxColumnDefs,cs as getTaskBoxGridTemplate,HS as getTaskBoxTabKind,ci as getTaskConfirmInfo,Do as getTaskDisplayStatusOption,Ur as getTaskStatusOption,$n as groupGoogleEventsByDate,Il as groupSeqFromTabKey,S2 as hasRelation,_m as hasTaskRelations,Hk as htmlToPlainText,t0 as isCustomTabKey,ps as isOpenPoolTaskItem,aa as isPastEvent,Kr as isTaskDone,fI as isWaitingTask,Vi as monthsAgoDate,fo as narrowOrderSx,Vz as nowDateTimeString,vh as parseEstimatedHours,Sn as relationsOf,An as resolveTaskStatusOptions,ta as resolveTaskboxTheme,rr as shareTaskText,yc as sumRemainingHours,Ai as summarizeNoticeTargets,Xz as tabKeyFromGroupSeq,Yr as taskVisibilityOf,Dn as toYmd,Vr as toggleLabelKey,fr as useBuildFileUrl,Xc as useTaskAttachmentUploadMeta,Ao as useTaskboxConfig,cf as useTaskboxForm,te as useTaskboxTheme,bt as useTaskboxUiState,xr as useUploadMaxMb};
|
|
13
|
+
`)}function Sm(e){navigator.clipboard.writeText(e).then(()=>my("\uC5C5\uBB34 \uB0B4\uC6A9\uC744 \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>cy("\uBCF5\uC0AC\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uB0B4\uC6A9\uC744 \uC9C1\uC811 \uC120\uD0DD\uD574 \uBCF5\uC0AC\uD574 \uC8FC\uC138\uC694."))}function rr(e,o){let t=uy(e);if(o&&typeof navigator.share=="function"){navigator.share({text:t}).catch(n=>{n?.name!=="AbortError"&&Sm(t)});return}Sm(t)}import{Fragment as yy,jsx as Re,jsxs as Bm}from"react/jsx-runtime";function Cm({task:e,myAccountSeq:o=0,onToggleCompleted:t,onChangeTitle:n,onChangeIcon:r,onChangeIconColor:i,onClose:a,appBarMode:l=!1,activityItems:d,activityLoading:s,onLoadActivity:u,onPrint:x}){let p=_e(),[c,f]=bl(!1),[M,C]=bl(null),[b,g]=bl(null),I=zn(e.icon||(e.is_notice?wo:e.is_event?"event":Oe)),S=!!e.is_notice,O=!!e.is_event,y=S&&o>0&&(e.author_account_seq??0)===o,_=!ht(e,o),E=!O&&(S?y:(e.author_account_seq??0)===o||(e.manager_account_seq??0)===o);return Bm(yy,{children:[Bm(Ki,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1.5,flexShrink:0},children:[l&&a?Re(ir,{"aria-label":"\uB4A4\uB85C",onClick:a,sx:{color:"#37352f",ml:-1},children:Re(fy,{})}):null,E&&!l?Re(zr,{title:e.completed&&e.completed_by?`${e.completed_by} \xB7 ${Go(e.completed_time)} \uC644\uB8CC`:e.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC",arrow:!0,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:Re(dy,{checked:e.completed,icon:Re(hy,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:Re(by,{sx:{fontSize:22,color:"#2f80ed"}}),onChange:(v,D)=>t(e.seq,D),sx:{p:0}})}):null,l?null:Re(zr,{title:_?"":"\uC544\uC774\uCF58 \uBCC0\uACBD",arrow:!0,children:Re(ir,{size:"small",onClick:_?void 0:v=>g(v.currentTarget),sx:{color:e.icon_color||(S?"#e5484d":"#1e3a8a")},children:Re(I,{sx:{fontSize:20}})})}),M!==null?Re(Ki,{component:"input",autoFocus:!0,spellCheck:!1,value:M,onChange:v=>C(v.target.value),onBlur:()=>{M.trim()&&M.trim()!==e.title&&n(e.seq,M.trim()),C(null)},onKeyDown:v=>{v.key==="Enter"&&v.target.blur(),v.key==="Escape"&&C(null)},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:18,fontWeight:500,color:"#37352f",p:0,m:0}}):l?Re(Ki,{sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:S?"\uACF5\uC9C0":O?"\uC77C\uC815":e.is_bug?"\uC624\uB958":"\uC5C5\uBB34"}):Re(Ki,{onClick:_?void 0:()=>C(e.title),sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",cursor:_?"default":"text",textDecoration:e.completed?"line-through":"none"},children:e.title}),u?Re(zr,{title:"\uD65C\uB3D9",arrow:!0,children:Re(ir,{"aria-label":"\uD65C\uB3D9",onClick:()=>f(!0),sx:{color:"#6b7280"},children:Re(ky,{sx:{fontSize:20}})})}):null,Re(zr,{title:p?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",arrow:!0,children:Re(ir,{"aria-label":p?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",onClick:()=>rr(e,p),sx:{color:"#6b7280"},children:p?Re(xy,{sx:{fontSize:20}}):Re(gy,{sx:{fontSize:20}})})}),x?Re(zr,{title:"\uC778\uC1C4",arrow:!0,children:Re(ir,{"aria-label":"\uC778\uC1C4",onClick:()=>x(e),sx:{color:"#6b7280"},children:Re(Ty,{sx:{fontSize:20}})})}):null,a&&!l?Re(ir,{"aria-label":"\uB2EB\uAE30",onClick:a,sx:{color:"#6b7280"},children:Re(py,{})}):null]}),Re(Qn,{anchorEl:b,value:e.icon||(S?wo:""),color:e.icon_color||(S?"#e5484d":"#1e3a8a"),onSelect:v=>r(e.seq,v),onSelectColor:v=>i?.(e.seq,v),onClose:()=>g(null)}),Re($i,{open:c,taskSeq:e.seq,items:d,loading:s,onLoad:u,onClose:()=>f(!1)})]})}import{useState as Lt}from"react";import{Box as lo,Button as ar,ButtonBase as Ey,Checkbox as Oy,Divider as Bn,IconButton as Ry,Menu as Py,MenuItem as zy}from"@mui/material";import qy from"@mui/icons-material/ExpandLess";import Ay from"@mui/icons-material/ExpandMore";import Ly from"@mui/icons-material/ConfirmationNumberOutlined";import Ny from"@mui/icons-material/Check";import Fy from"@mui/icons-material/DirectionsRunOutlined";import Hy from"@mui/icons-material/SpeedOutlined";import Bl from"@mui/icons-material/CheckCircle";import Wy from"@mui/icons-material/CheckCircleOutlineOutlined";import Cl from"@mui/icons-material/CheckCircleOutlined";import Mm from"@mui/icons-material/AccessTimeOutlined";import $y from"@mui/icons-material/AutorenewOutlined";import Ky from"@mui/icons-material/LabelOutlined";import Uy from"@mui/icons-material/PersonOutlineOutlined";import Vy from"@mui/icons-material/SubjectOutlined";import Gy from"@mui/icons-material/StickyNote2Outlined";import jy from"@mui/icons-material/PanToolAltOutlined";import{useState as Sy}from"react";import{TextField as By}from"@ehfuse/mui-form-controls";import{jsx as Cy}from"react/jsx-runtime";function vm({value:e,onCommit:o,onDraftChange:t,readOnly:n=!1}){let[r,i]=Sy(null);return Cy(By,{value:r??e,placeholder:n?"":"\uBE44\uACE0 \uC785\uB825",fullWidth:!0,size:"medium",slotProps:{input:{readOnly:n}},onChange:a=>{i(a.target.value),t?.(a.target.value)},onBlur:()=>{r!==null&&r.trim()!==e&&o(r),i(null)},onKeyDown:a=>{a.key==="Enter"&&a.target.blur(),a.key==="Escape"&&i(null)},sx:{mt:1}})}import{useMemo as Tl,useState as yl}from"react";import{Box as go,Button as wm,IconButton as vy}from"@mui/material";import Iy from"@mui/icons-material/AccountTreeOutlined";import _y from"@mui/icons-material/Add";import wy from"@mui/icons-material/Close";import Dy from"@mui/icons-material/NextPlanOutlined";function Sn(e){return e.relations??[]}function S2(e,o,t){return Sn(e).some(n=>n.type===t&&n.task_seq===o.seq)||Sn(o).some(n=>n.type===t&&n.task_seq===e.seq)}function Im(e){return`${e.created_time??""}|${String(e.seq).padStart(12,"0")}`}function hl(e,o){let t=new Map(o.map(c=>[c.seq,c]));t.set(e.seq,e);let n=new Map,r=(c,f)=>{n.has(c)||n.set(c,new Set),n.has(f)||n.set(f,new Set),n.get(c).add(f),n.get(f).add(c)};for(let c of t.values())for(let f of Sn(c))f.type==="follow_up"&&t.has(f.task_seq)&&r(c.seq,f.task_seq);let i=new Set([e.seq]),a=[e.seq];for(;a.length>0;){let c=a.shift();for(let f of n.get(c)??[])i.has(f)||(i.add(f),a.push(f))}let l=[...i].map(c=>t.get(c)).filter(c=>!!c).sort((c,f)=>Im(c).localeCompare(Im(f))),d=new Set;for(let c of Sn(e))c.type==="related"&&d.add(c.task_seq);for(let c of t.values())c.seq!==e.seq&&Sn(c).some(f=>f.type==="related"&&f.task_seq===e.seq)&&d.add(c.seq);let s=[...d].map(c=>t.get(c)).filter(c=>c!==void 0&&c.seq!==e.seq),u=[...t.values()].filter(c=>c.seq!==e.seq&&Sn(c).some(f=>f.type==="duplicate_of"&&f.task_seq===e.seq)),x=Sn(e).find(c=>c.type==="duplicate_of")?.task_seq,p=x?t.get(x)??null:null;return{lineage:l,related:s,duplicates:u,duplicateOf:p}}function kl(e,o){let t=hl(e,o);return(t.lineage.length>=2?t.lineage.length-1:0)+t.related.length+t.duplicates.length+(t.duplicateOf?1:0)}function _m(e,o){return kl(e,o)>0}import{Fragment as My,jsx as Ke,jsxs as Jo}from"react/jsx-runtime";function Sl({item:e,caption:o,onOpen:t,onUnlink:n}){let r=Ve(e.icon||Oe);return Jo(go,{sx:{display:"flex",alignItems:"center",gap:.75,px:1.25,py:.5,borderRadius:1,"&:hover":{bgcolor:"#f7f7f5"},"&:hover .taskbox-relation-unlink":{opacity:1}},children:[o?Ke(go,{component:"span",sx:{flexShrink:0,px:.6,py:.1,borderRadius:.75,fontSize:11.5,fontWeight:500,color:"#8a6d1d",bgcolor:"#faf1d7"},children:o}):null,r?Ke(r,{sx:{fontSize:16,flexShrink:0,color:e.icon_color||"#1e3a8a"}}):null,Jo(go,{component:"span",onClick:t,sx:{flex:1,minWidth:0,fontSize:14,color:e.completed?"#9a9a97":"#37352f",textDecoration:e.completed?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...t?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}},children:[e.ticket_no?`${e.ticket_no} `:"",e.title]}),Ke(ze,{option:Do(e),small:!0}),n?Ke(vy,{className:"taskbox-relation-unlink",size:"small","aria-label":"\uC5F0\uACB0 \uD574\uC81C",onClick:n,sx:{opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:Ke(wy,{sx:{fontSize:15}})}):null]})}function Dm({task:e,tasks:o,readOnly:t=!1,onOpenTask:n,onLink:r,onUnlink:i,onCreateFollowUp:a}){let[l,d]=yl(!1),[s,u]=yl(null),[x,p]=yl(null),c=Tl(()=>hl(e,o),[e,o]),f=c.lineage.length>=2,M=Tl(()=>kl(e,o),[e,o]),C=Tl(()=>{let g=new Set;for(let I of c.lineage)g.add(I.seq);for(let I of c.related)g.add(I.seq);for(let I of c.duplicates)g.add(I.seq);return c.duplicateOf&&g.add(c.duplicateOf.seq),[...g]},[c]),b=(g,I,S)=>{p({anchorEl:g,targetSeq:I,type:S})};return Jo($o,{icon:Ke(Iy,{sx:{fontSize:19,display:"block"}}),title:Jo(My,{children:["\uAD00\uB828 \uC5C5\uBB34",M>0?Ke(go,{component:"span",sx:{fontSize:12.5,color:"#9a9a97"},children:M}):null]}),titleExtra:t?null:Jo(go,{sx:{ml:"auto",display:"flex",alignItems:"center",gap:.5},children:[a?Ke(wm,{size:"small",color:"inherit",startIcon:Ke(Dy,{sx:{fontSize:16}}),onClick:g=>u(g.currentTarget),sx:{minWidth:0,px:1,fontSize:12.5,color:"#787774"},children:"\uD6C4\uC18D \uC5C5\uBB34"}):null,r?Ke(wm,{size:"small",color:"inherit",startIcon:Ke(_y,{sx:{fontSize:16}}),onClick:()=>d(!0),sx:{minWidth:0,px:1,fontSize:12.5,color:"#787774"},children:"\uC5F0\uACB0"}):null]}),children:[Jo(go,{sx:{display:"flex",flexDirection:"column",mt:.5,pl:3.25},children:[f?Ke(go,{sx:{mb:c.related.length||c.duplicates.length||c.duplicateOf?1:0},children:c.lineage.map((g,I)=>{let S=g.seq===e.seq,O=I===c.lineage.length-1;return Jo(go,{sx:{display:"flex",gap:1},children:[Jo(go,{sx:{display:"flex",flexDirection:"column",alignItems:"center",width:14,flexShrink:0,pt:1.1},children:[Ke(go,{sx:{width:S?9:7,height:S?9:7,borderRadius:"50%",bgcolor:S?"#2f80ed":g.completed?"#9a9a97":"#c9c8c5",flexShrink:0}}),O?null:Ke(go,{sx:{width:"2px",flex:1,bgcolor:"#e6e6e3"}})]}),Jo(go,{sx:{flex:1,minWidth:0,pb:O?0:.5},children:[Jo(go,{sx:{display:"flex",alignItems:"center",gap:.75},children:[Jo(go,{component:"span",onClick:!S&&n?()=>n(g.seq):void 0,sx:{minWidth:0,fontSize:14,fontWeight:S?600:400,color:S?"#2f80ed":g.completed?"#9a9a97":"#37352f",textDecoration:g.completed?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...!S&&n?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}},children:[g.ticket_no?`${g.ticket_no} `:"",g.title]}),Ke(ze,{option:Do(g),small:!0})]}),Ke(go,{sx:{fontSize:12,color:"#9a9a97"},children:g.completed&&g.completed_time?`${g.completed_time} \uC644\uB8CC`:g.created_time??""})]})]},g.seq)})}):null,c.duplicateOf?Ke(Sl,{item:c.duplicateOf,caption:"\uC6D0\uBCF8",onOpen:n?()=>n(c.duplicateOf.seq):void 0,onUnlink:!t&&i?g=>b(g.currentTarget,c.duplicateOf.seq,"duplicate_of"):void 0}):null,c.duplicates.map(g=>Ke(Sl,{item:g,caption:"\uC911\uBCF5",onOpen:n?()=>n(g.seq):void 0,onUnlink:!t&&i?I=>b(I.currentTarget,g.seq,"duplicate_of"):void 0},`dup-${g.seq}`)),c.related.map(g=>Ke(Sl,{item:g,onOpen:n?()=>n(g.seq):void 0,onUnlink:!t&&i?I=>b(I.currentTarget,g.seq,"related"):void 0},`rel-${g.seq}`)),M===0?Ke(go,{sx:{px:1.25,py:.75,fontSize:13.5,color:"#9a9a97"},children:"\uC5F0\uACB0\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):null]}),r?Ke(Di,{open:l,task:e,tasks:o,excludeSeqs:C,onClose:()=>d(!1),onSubmit:(g,I)=>r(e.seq,g,I)}):null,Ke(We,{open:!!s,anchorEl:s,title:"\uC774 \uC5C5\uBB34\uC5D0\uC11C \uC774\uC5B4\uC9C0\uB294 \uD6C4\uC18D \uC5C5\uBB34\uB97C \uB9CC\uB4DC\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uB9CC\uB4E4\uAE30",onCancel:()=>u(null),onConfirm:()=>{a?.(e.seq),u(null)}}),Ke(We,{open:!!x,anchorEl:x?.anchorEl??null,title:"\uC774 \uC5C5\uBB34\uC640\uC758 \uC5F0\uACB0\uC744 \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uD574\uC81C",onCancel:()=>p(null),onConfirm:()=>{x&&i?.(e.seq,x.targetSeq,x.type),p(null)}})]})}import{Fragment as Ro,jsx as N,jsxs as Ye}from"react/jsx-runtime";function lr({label:e="\uBE44\uC5B4 \uC788\uC74C"}){return N(lo,{component:"span",sx:{color:"#9a9a97"},children:e})}function Em({task:e,customTabs:o,statusOptions:t,avatarSrcByName:n,onChangeStatus:r,onChangeLabels:i,onAddLabelOption:a,onChangeProject:l,onAddProject:d,onChangeDate:s,onChangeReminder:u,onMemberEdit:x,onChangePriority:p,onChangeEstimatedTime:c,onChangeEventTime:f,onChangeEventPlace:M,onChangeEventAddress:C,onChangeNote:b,onChangeContent:g,onChangeContentHeight:I,onAddChecklistItem:S,onToggleChecklistItem:O,onRemoveChecklistItem:y,onUpdateChecklistItem:_,onConvertChecklistToTask:E,onOpenChecklistTask:v,onLinkChecklistTask:D,resolveChecklistTask:L,relatedTasksPool:m,onOpenRelatedTask:T,onLinkRelatedTask:h,onUnlinkRelatedTask:k,onCreateFollowUpTask:P,onAddAttachments:A,onRemoveAttachment:ae,onPreview:ie,onDownload:xe,onUpdateComment:se,onRemoveComment:ue,onToggleCommentReaction:ge,currentUserName:ce="",myAccountSeq:ee=0,noticeAdmin:Pe=!1,hideProject:Ae=!1,hideLabel:W=!1,showTitle:K=!1,onChangeTitle:J,onToggleCompleted:B,onChangeIcon:F,onChangeIconColor:Q,employees:U=[],onAckConfirm:ve,onRequestConfirm:Le,onChangeBugField:Ue,sprints:Xe=[],sprintProject:Ee=!1,hideSprint:oo=!1,onChangeSprint:Y,onChangeStoryPoints:w,onChangeResolution:Se,onClaimTask:H,onVerifyBug:ye}){let[Qe,ho]=Lt(null),[Ht,tt]=Lt(null),[zo,xt]=Lt(null),[nt,Lo]=Lt(null),[Mn,Ce]=Lt(!1),q={[Yo]:Mn?{maxHeight:120,opacity:1,overflow:"hidden",transition:"max-height 0.25s ease, opacity 0.2s ease"}:{minHeight:0,maxHeight:0,opacity:0,overflow:"hidden",pointerEvents:"none",transition:"max-height 0.25s ease, opacity 0.2s ease"}},[$,ne]=Lt(null),[le,de]=Lt(null),[Fe,no]=Lt(null),[co,uo]=Lt(null),Ie=!!e.is_notice,oe=!!e.is_event,ko=!!e.is_bug,Io=!!H&&Qr(e,ee),Wt=!!H&&Zr(e,ee),Uo=!!ye&&ko&&!!e.completed&&ee>0&&(e.author_account_seq??0)===ee&&!(e.acks??[]).some(z=>z.account_seq===ee),mo=!ht(e,ee),No=!e.is_event&&(e.is_notice?ee>0&&(e.author_account_seq??0)===ee:(e.author_account_seq??0)===ee||(e.manager_account_seq??0)===ee),an=zn(e.icon||(e.is_notice?wo:e.is_event?"event":Oe)),ur=Ie?!Xr(e,ee):mo,En=Io||Wt?Ye(Fn,{onClick:z=>uo(z.currentTarget),children:[N(jy,{sx:{fontSize:16,mr:.5}}),"\uAC00\uC838\uAC00\uAE30"]}):null,dr=Ie?Ai(e,U):"",qo=Ie?im(e,U,ee):null,ro=!Ie&&!oe?ci(e,ee):null,On=!!(ro&&ro.total>0||Ie&&qo);return Ye(Ro,{children:[K?Ye(lo,{sx:{px:2,pt:2,pb:.5,display:"flex",alignItems:"flex-start",gap:1},children:[No?N(Oy,{checked:e.completed,icon:N(Wy,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:N(Bl,{sx:{fontSize:22,color:"#2f80ed"}}),onChange:(z,Rn)=>{zo||xt({anchorEl:z.currentTarget,nextCompleted:Rn})},sx:{p:0,mt:.25}}):null,N(Ry,{size:"small","aria-label":"\uC544\uC774\uCF58 \uBCC0\uACBD",onClick:mo?void 0:z=>tt(z.currentTarget),sx:{p:0,mt:.25,color:e.icon_color||(Ie?"#e5484d":"#1e3a8a")},children:N(an,{sx:{fontSize:20}})}),N(lo,{sx:{flex:1,minWidth:0},children:Qe!==null?N(lo,{component:"input",autoFocus:!0,spellCheck:!1,value:Qe,onChange:z=>ho(z.target.value),onBlur:()=>{Qe.trim()&&Qe.trim()!==e.title&&J(e.seq,Qe.trim()),ho(null)},onKeyDown:z=>{z.key==="Enter"&&z.target.blur(),z.key==="Escape"&&ho(null)},sx:{width:"100%",border:"none",outline:"none",font:"inherit",fontSize:19,fontWeight:600,color:"#37352f",p:0,m:0}}):N(lo,{onClick:()=>ho(e.title),sx:{fontSize:19,fontWeight:600,color:"#37352f",lineHeight:1.35,cursor:"text",textDecoration:e.completed?"line-through":"none",userSelect:"text"},children:e.title})}),N(We,{open:!!zo,anchorEl:zo?.anchorEl??null,title:zo?.nextCompleted?"\uC774 \uC5C5\uBB34\uB97C \uC644\uB8CC \uCC98\uB9AC\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?":"\uC644\uB8CC\uB97C \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:zo?.nextCompleted?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>xt(null),onConfirm:()=>{zo&&B(e.seq,zo.nextCompleted),xt(null)}}),N(Qn,{anchorEl:Ht,value:e.icon||(Ie?wo:""),color:e.icon_color||(Ie?"#e5484d":"#1e3a8a"),onSelect:z=>F(e.seq,z),onSelectColor:z=>Q?.(e.seq,z),onClose:()=>tt(null)})]}):null,Ye(lo,{sx:{py:1.5,display:"flex",flexDirection:"column",gap:0,[Yo]:{pb:0,"& > :last-child":{mb:0}}},children:[N(Ii,{hideProject:Ae,values:{tabKey:e.tab_key??"",managerName:e.manager_name,receiverNames:e.receiver_names,startDate:e.start_date,dueDate:e.due_date,reminder:e.reminder,priority:e.priority,estimatedTime:e.estimated_time,eventTime:e.event_time??"",eventPlace:e.event_place??"",eventAddress:e.event_address??""},customTabs:o,avatarSrcByName:n,showEstimatedTime:!oe,notice:Ie,event:oe,readOnly:mo,targetSummary:dr,onChangeProject:z=>l(e.seq,z),onAddProject:d,onChangeStartDate:z=>s(e.seq,"start_date",z),onChangeDueDate:z=>s(e.seq,"due_date",z),onChangeReminder:z=>u(e.seq,z),onChangePriority:z=>p(e.seq,z),onChangeEstimatedTime:z=>c(e.seq,z),onChangeEventTime:z=>f?.(e.seq,z),onChangeEventPlace:z=>M?.(e.seq,z),onChangeEventAddress:z=>C?.(e.seq,z),onMemberEdit:z=>x(e,z),narrowCollapsedSx:q,reminderLocked:e.completed,managerAction:En,leading:Ye(Ro,{children:[Uo||En&&(Ie||oe)?Ye(lo,{sx:{gridColumn:"1 / -1",display:"flex",justifyContent:"flex-start",gap:2,px:2,py:1.5},children:[Ie||oe?En:null,Uo?Ye(Ro,{children:[N(ar,{variant:"contained",size:"large",onClick:()=>ye?.(e.seq,!0),sx:{bgcolor:"#2f80ed"},children:"\uAC80\uC99D\uC644\uB8CC"}),N(ar,{variant:"outlined",size:"large",color:"error",onClick:()=>ye?.(e.seq,!1),children:"\uC7AC\uC624\uD508"})]}):null]}):null,ko&&e.ticket_no?N(pe,{icon:N(Ly,{sx:{fontSize:17}}),label:"\uD2F0\uCF13",children:N(lo,{component:"span",sx:{fontVariantNumeric:"tabular-nums"},children:e.ticket_no})}):null,oe?null:N(lo,{sx:ko&&e.ticket_no||On?void 0:{gridColumn:"1 / -1"},children:N(pe,{icon:N($y,{sx:{fontSize:17}}),label:"\uC0C1\uD0DC",onClick:mo||e.completed?void 0:z=>ne(z),children:N(ze,{option:Do(e)})})}),ro&&ro.total>0?N(lo,{children:N(pe,{icon:N(Cl,{sx:{fontSize:17}}),label:"\uD655\uC778",children:ro.canConfirm?N(ar,{size:"small",variant:"contained",onClick:()=>ve?.(e.seq),sx:{py:.1,px:1.25,minWidth:0,color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}},children:"\uD655\uC778"}):Ye(ar,{size:"small",variant:"outlined",color:"inherit",startIcon:ro.myTime?N(Bl,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:z=>Lo({anchorEl:z.currentTarget,open:!0}),sx:{py:.1,px:1.25,minWidth:0,fontSize:13,color:"text.primary",borderColor:"#d5d8dc",bgcolor:"#fff",whiteSpace:"nowrap"},children:[ro.count," / ",ro.total]})})}):null,Ie&&qo?N(lo,{children:N(pe,{icon:N(Cl,{sx:{fontSize:17}}),label:"\uD655\uC778",children:N(lo,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,minWidth:0},children:qo.canAck?N(ar,{size:"small",variant:"contained",onClick:()=>ve?.(e.seq),sx:{py:.1,px:1.25,minWidth:0,color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}},children:"\uD655\uC778"}):N(ar,{size:"small",variant:"outlined",color:"inherit",startIcon:qo.acked?N(Bl,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:z=>Lo({anchorEl:z.currentTarget,open:!0}),sx:{py:.1,px:1.25,minWidth:0,fontSize:13,color:"text.primary",borderColor:"#d5d8dc",bgcolor:"#fff",whiteSpace:"nowrap"},children:qo.total>0&&qo.count>=qo.total?"\uC644\uB8CC":Ye(Ro,{children:[qo.count,N(lo,{component:"span",sx:{mx:.4},children:"/"}),qo.total]})})})})}):null,Ee&&!oo&&!oe&&!Ie?Ye(Ro,{children:[N(pe,{icon:N(Fy,{sx:{fontSize:17}}),label:"\uBAA9\uD45C",onClick:mo?void 0:z=>de(z),children:(e.sprint_seq??0)>0?Xe.find(z=>z.seq===e.sprint_seq)?.name??"\uC0AD\uC81C\uB41C \uC2A4\uD504\uB9B0\uD2B8":N(lr,{label:"\uBBF8\uBC30\uC815"})}),N(pe,{icon:N(Hy,{sx:{fontSize:17}}),label:"\uD3EC\uC778\uD2B8",children:N(Pt,{value:(e.story_points??0)>0?String(e.story_points):"",placeholder:"\uBBF8\uCD94\uC815",readOnly:mo,onCommit:z=>w?.(e.seq,Number(z.replace(/[^0-9.]/g,""))||0)})})]}):null,oe||W?null:N(lo,{sx:[{gridColumn:"1 / -1"},q??null],children:N(pe,{icon:N(Ky,{sx:{fontSize:17}}),label:"\uB77C\uBCA8",onClick:mo?void 0:z=>no(z),children:(e.label_keys??[]).length>0?N($t,{labelKeys:e.label_keys??[],labelOptions:t}):N(lr,{})})})]}),trailing:Ye(Ro,{children:[ko?N(_i,{values:{repro:e.bug_repro??"",device:e.bug_device??"",where:e.bug_where??"",version:e.bug_version??"",resolution:e.resolution??""},readOnly:mo,showResolution:!!e.completed,onChangeRepro:z=>Ue?.(e.seq,"bug_repro",z),onChangeDevice:z=>Ue?.(e.seq,"bug_device",z),onChangeWhere:z=>Ue?.(e.seq,"bug_where",z),onChangeVersion:z=>Ue?.(e.seq,"bug_version",z),onChangeResolution:z=>Se?.(e.seq,z)}):null,N(pe,{icon:N(Uy,{sx:{fontSize:17}}),label:"\uC791\uC131\uC790",sx:[fo(9),q??null],children:e.created_by?Ye(Ro,{children:[N(Mo,{names:[e.created_by],size:20,avatarSrcByName:n}),e.created_by]}):N(lr,{})}),N(pe,{icon:N(Mm,{sx:{fontSize:17}}),label:"\uC791\uC131\uC2DC\uAC04",sx:[fo(11),q??null],children:e.created_time?Go(e.created_time):N(lr,{})}),e.completed?Ye(Ro,{children:[N(pe,{icon:N(Cl,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC790",sx:[fo(10),q??null],children:e.completed_by?Ye(Ro,{children:[N(Mo,{names:[e.completed_by],size:20,avatarSrcByName:n}),e.completed_by]}):N(lr,{})}),N(pe,{icon:N(Mm,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC2DC\uAC04",sx:[fo(12),q??null],children:e.completed_time?Go(e.completed_time):N(lr,{})})]}):null]})}),Ye(lo,{sx:{display:"none",[Yo]:{display:"block",mt:1.5,mb:0}},children:[N(Bn,{sx:{borderColor:"#e6e6e3"}}),N(Ey,{onClick:()=>Ce(z=>!z),sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",gap:.5,pt:1.25,pb:1.25,fontSize:13.5,bgcolor:"#f4f4f2",color:"#37352f","&:active":{opacity:.6}},children:Mn?Ye(Ro,{children:["\uC811\uAE30 ",N(qy,{sx:{fontSize:18}})]}):Ye(Ro,{children:["\uC815\uBCF4 \uB354\uBCF4\uAE30 ",N(Ay,{sx:{fontSize:18}})]})})]}),Ye(lo,{children:[N(Bn,{sx:{my:1.5,borderColor:"#e6e6e3",[Yo]:{mt:0,mb:1.25}}}),N($o,{icon:N(Vy,{sx:{fontSize:18,display:"block"}}),title:"\uB0B4\uC6A9",children:N(lo,{sx:{userSelect:"text"},children:N(wi,{syncKey:e.seq,value:e.content??"",height:e.content_height??0,onChangeHeight:I?z=>I(e.seq,z):void 0,readOnly:mo,onChange:z=>g(e.seq,z)})})}),e.is_bug?null:Ye(Ro,{children:[N(Bn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),N($o,{icon:N(Gy,{sx:{fontSize:18,display:"block"}}),title:"\uBE44\uACE0",children:N(lo,{sx:{userSelect:"text"},children:N(vm,{value:e.note,readOnly:ur,onCommit:z=>b(e.seq,z)})})})]}),oe?null:Ye(Ro,{children:[N(Bn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),N(Mi,{taskSeq:e.seq,checklist:e.checklist??[],removeLocked:ur,onAdd:S,onToggle:O,onRemove:y,onUpdate:_,onConvertToTask:E,onOpenLinkedTask:v,resolveLinkedTask:L,linkCandidates:m,linkBaseTask:e,onLinkExistingTask:D})]}),m&&!oe&&!Ie&&_m(e,m)?Ye(Ro,{children:[N(Bn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),N(Dm,{task:e,tasks:m,readOnly:mo,onOpenTask:T,onLink:h,onUnlink:k,onCreateFollowUp:P})]}):null,N(Bn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),N(Pi,{taskSeq:e.seq,attachments:e.attachments??[],removeLocked:ur,onAdd:A,onRemove:ae,onPreview:ie?z=>ie({...z,taskSeq:e.seq}):void 0,onDownload:xe?z=>xe({...z,taskSeq:e.seq}):void 0})]}),N(Bn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),N(hm,{taskSeq:e.seq,comments:e.comments??[],currentUserName:ce,myAccountSeq:ee,avatarSrcByName:n,onUpdate:se,onRemove:ue,onToggleReaction:ge,onPreview:ie?z=>ie({...z,taskSeq:e.seq}):void 0,onDownload:xe?z=>xe({...z,taskSeq:e.seq}):void 0})]}),N(jr,{anchorEl:$,value:e.status,options:Ie?hr:ko?sn:kr,onSelect:z=>r(e.seq,z),onClose:()=>ne(null)}),N(Py,{transitionDuration:0,anchorEl:le,open:!!le,onClose:()=>de(null),children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...Xe.filter(z=>`custom-${z.group_seq}`===String(e.tab_key??"")).map(z=>({seq:z.seq,label:Ho(z)}))].map(z=>Ye(zy,{onClick:()=>{Y?.(e.seq,z.seq),de(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[z.label,(e.sprint_seq??0)===z.seq?N(Ny,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},z.seq))}),N(si,{anchorEl:nt?.anchorEl??null,open:!!nt?.open,acks:e.acks??[],total:qo?.total??ro?.total??0,avatarSrcByName:n,onRequestConfirm:Le&&ro&&ro.count<ro.total?()=>{Le(e.seq),Lo(z=>z?{...z,open:!1}:null)}:void 0,onClose:()=>Lo(z=>z?{...z,open:!1}:null)}),N(qi,{anchorEl:Fe,selectedKeys:e.label_keys??[],labelOptions:t,onToggle:z=>i(e.seq,Vr(e.label_keys??[],z)),onAddLabel:a,onClose:()=>no(null)}),N(We,{open:!!co,anchorEl:co,title:Io?"\uC774 \uC5C5\uBB34\uB97C \uAC00\uC838\uC640 \uCC45\uC784\uC790\uB97C \uB9E1\uC73C\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?":"\uC774 \uC5C5\uBB34\uC758 \uCC45\uC784\uC790\uB97C \uB9E1\uC73C\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uAC00\uC838\uAC00\uAE30",onCancel:()=>uo(null),onConfirm:()=>{H?.(e.seq),uo(null)}})]})}import{Fragment as o0,jsx as Co,jsxs as Am}from"react/jsx-runtime";function Vz(){let e=new Date,o=t=>String(t).padStart(2,"0");return`${e.getFullYear()}-${o(e.getMonth()+1)}-${o(e.getDate())} ${o(e.getHours())}:${o(e.getMinutes())}`}function Gz({open:e,task:o,onClose:t,onAddComment:n,onSaveFields:r,myAccountSeq:i=0,onToggleCompleted:a,onChangeTitle:l,onChangeIcon:d,onChangeIconColor:s,activityItems:u,activityLoading:x,onLoadActivity:p,onPrint:c,...f}){let M=_e(),C=Rm(null);o&&(C.current=o);let b=o??C.current,[g,I]=Pm(!1),[S,O]=Pm({}),y=Object.keys(S).length>0;Om(()=>{O({})},[o?.seq,e]);let _=Rm(null);if(Om(()=>{_.current?.scrollTo({top:0})},[o?.seq]),!b)return null;let E=M&&y?{...b,...S}:b,v=(h,k)=>{M?O(P=>({...P,...h})):k()},D=()=>{let h=S;O({});let k=b.seq,P=h.title===void 0?void 0:String(h.title).trim();if(r){let A={...h};P!==void 0&&(P?A.title=P:delete A.title),Object.keys(A).length>0&&r(k,A),qm({message:"\uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",position:"center"});return}P&&l(k,P),h.icon!==void 0&&d(k,String(h.icon)),h.icon_color!==void 0&&s?.(k,String(h.icon_color)),h.status!==void 0&&f.onChangeStatus(k,h.status),h.label_keys!==void 0&&f.onChangeLabels(k,h.label_keys??[]),h.tab_key!==void 0&&f.onChangeProject(k,String(h.tab_key??"")),h.start_date!==void 0&&f.onChangeDate(k,"start_date",String(h.start_date??"")),h.due_date!==void 0&&f.onChangeDate(k,"due_date",String(h.due_date??"")),h.reminder!==void 0&&f.onChangeReminder(k,h.reminder),h.priority!==void 0&&f.onChangePriority(k,h.priority),h.estimated_time!==void 0&&f.onChangeEstimatedTime(k,String(h.estimated_time??"")),h.event_time!==void 0&&f.onChangeEventTime?.(k,String(h.event_time??"")),h.event_place!==void 0&&f.onChangeEventPlace?.(k,String(h.event_place??"")),h.event_address!==void 0&&f.onChangeEventAddress?.(k,String(h.event_address??"")),h.content!==void 0&&f.onChangeContent(k,String(h.content??"")),h.note!==void 0&&f.onChangeNote(k,String(h.note??"")),qm({message:"\uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",position:"center"})},L={...f,onChangeStatus:(h,k)=>v({status:k},()=>f.onChangeStatus(h,k)),onChangeLabels:(h,k)=>v({label_keys:k},()=>f.onChangeLabels(h,k)),onChangeProject:(h,k)=>v({tab_key:k},()=>f.onChangeProject(h,k)),onChangeDate:(h,k,P)=>v({[k]:P},()=>f.onChangeDate(h,k,P)),onChangeReminder:(h,k)=>v({reminder:k},()=>f.onChangeReminder(h,k)),onChangePriority:(h,k)=>v({priority:k},()=>f.onChangePriority(h,k)),onChangeEstimatedTime:(h,k)=>v({estimated_time:k},()=>f.onChangeEstimatedTime(h,k)),onChangeEventTime:(h,k)=>v({event_time:k},()=>f.onChangeEventTime?.(h,k)),onChangeEventPlace:(h,k)=>v({event_place:k},()=>f.onChangeEventPlace?.(h,k)),onChangeEventAddress:(h,k)=>v({event_address:k},()=>f.onChangeEventAddress?.(h,k)),onChangeContent:(h,k)=>v({content:k},()=>f.onChangeContent(h,k)),onChangeNote:(h,k)=>v({note:k},()=>f.onChangeNote(h,k))},m=Co(Em,{...L,task:E,myAccountSeq:i,onChangeTitle:(h,k)=>v({title:k},()=>l(h,k)),onToggleCompleted:a,onChangeIcon:(h,k)=>v({icon:k},()=>d(h,k)),onChangeIconColor:(h,k)=>v({icon_color:k},()=>s?.(h,k)),showTitle:M}),T=Co(km,{onSubmit:(h,k)=>n(E.seq,h,k)},E.seq);return M?Am(o0,{children:[Co(e0,{open:e,onClose:t,locale:"ko",fontScale:{enabled:!0,default:1.1,min:.6},title:E.is_notice?"\uACF5\uC9C0\uC0AC\uD56D":E.is_event?"\uC77C\uC815":E.is_bug?"\uC624\uB958":"\uC5C5\uBB34",titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1},custom:[...p?[{icon:Co(Zy,{sx:{ml:2,color:"#6b7280"}}),tooltip:"\uD65C\uB3D9",onClick:()=>I(!0)}]:[],{icon:Co(Qy,{sx:{ml:p?0:2,color:"#6b7280"}}),tooltip:"\uACF5\uC720\uD558\uAE30",onClick:()=>rr(E,!0)},{icon:Co(Yy,{variant:"contained",size:"small",disableElevation:!0,disabled:!y,onClick:y?D:void 0,sx:{ml:1,minWidth:0,px:1.5,py:.35,fontSize:14,fontWeight:600,bgcolor:"#2f80ed","&:hover":{bgcolor:"#2f80ed"}},children:"\uC800\uC7A5"}),tooltip:""}]},fullScreen:!0,mobilePresentation:"slide",tabs:{visible:!1},contentTopPadding:0,contentPaddingX:0,sectionsPaddingTop:0,sectionContentPaddingTop:0,contentBottomPadding:0,scrollPastLastSection:!1,overlayScrollbar:{enabled:!0,contentStyle:{minWidth:0}},actions:{visible:!0,showCancelButton:!1,left:T},sx:{DialogContent:{borderBottom:"none"}},dialogActionSx:{padding:"0 !important","@media (max-width:1023.95px)":{padding:"0 !important"},borderTop:"1px solid #37352f","& .left-actions":{flex:1,width:"100%",minWidth:0,"& > *":{flex:1,minWidth:0}},"& .right-actions":{display:"none"}},sections:[{id:"task-detail",title:"",showTitle:!1,children:Co(Ui,{sx:{userSelect:"none",width:"100%",minWidth:0,display:"flex",flexDirection:"column",gap:0},children:m})}]},b.seq),Co($i,{open:g,taskSeq:E.seq,items:u,loading:x,onLoad:p,onClose:()=>I(!1)})]}):Co(Xy,{anchor:"right",open:e,onClose:t,disableAutoFocus:!0,disableEnforceFocus:!0,sx:{zIndex:h=>h.zIndex.modal},slotProps:{paper:{sx:{width:720,maxWidth:"100vw"}}},children:Am(Ui,{sx:{display:"flex",flexDirection:"column",height:"100%",userSelect:"none"},children:[Co(Cm,{task:E,myAccountSeq:i,onToggleCompleted:a,onChangeTitle:l,onChangeIcon:d,onChangeIconColor:s,onClose:t,activityItems:u,activityLoading:x,onLoadActivity:p,onPrint:c}),Co(zm,{sx:{borderColor:"#e6e6e3"}}),Co(Ui,{sx:{flex:1,minHeight:0},children:Co(Jy,{ref:_,style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:m})}),Co(zm,{sx:{borderColor:"#37352f"}}),Co(Ui,{sx:{flexShrink:0},children:T})]})})}import{useEffect as n0,useState as Cn}from"react";import{Box as Po,Button as _l,IconButton as Lm}from"@mui/material";import{FormDialog as r0}from"@ehfuse/mui-form-dialog";import i0 from"@mui/icons-material/EditOutlined";import{ErrorAlert as Nm}from"@ehfuse/alerts";import{ClearTextField as Fm,DateTextField as Hm,LabelSelect as Wm}from"@ehfuse/mui-form-controls";var vl="custom-";function t0(e){return e.startsWith(vl)}function Xz(e){return e>0?`${vl}${e}`:""}function Il(e){if(!t0(e))return 0;let o=Number(e.slice(vl.length));return Number.isInteger(o)&&o>0?o:0}import{Fragment as l0,jsx as Je,jsxs as rn}from"react/jsx-runtime";var a0=[{value:"planning",label:"\uACC4\uD68D\uC911"},{value:"active",label:"\uC9C4\uD589\uC911"},{value:"closed",label:"\uC885\uB8CC"}];function $m(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?e.slice(5).replace("-","."):"-"}function aq({open:e,customTabs:o,sprints:t,onClose:n,onCreate:r,onUpdate:i,onChangeStatus:a,onRemove:l}){let d=o.filter(m=>m.useSprints&&!m.archived),[s,u]=Cn(""),[x,p]=Cn(""),[c,f]=Cn(""),[M,C]=Cn(""),[b,g]=Cn(""),[I,S]=Cn(!1),[O,y]=Cn(0);n0(()=>{e&&(u(d.length===1?d[0].key:""),p(""),f(""),C(""),g(""),y(0))},[e]);let _=()=>{p(""),f(""),C(""),g(""),y(0)},E=m=>{y(m.seq),u(`custom-${m.group_seq}`),p(m.name),f(m.goal),C(m.start_date),g(m.end_date)},v=async()=>{let m=Il(s);if(!m){Nm("\uBAA9\uD45C\uB97C \uB9CC\uB4E4 \uD504\uB85C\uC81D\uD2B8\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return}if(!x.trim()){Nm("\uBAA9\uD45C \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}S(!0);try{if(O>0){i(O,{name:x.trim(),goal:c.trim(),start_date:M,end_date:b}),_();return}await r({group_seq:m,name:x.trim(),goal:c.trim(),start_date:M,end_date:b})&&_()}finally{S(!1)}},D=new Map(o.map(m=>[Il(m.key),m.label])),L=Je(Po,{children:d.length===0?Je(Po,{sx:{py:2,fontSize:14,color:"#787774"},children:'\uBAA9\uD45C\uB97C \uC0AC\uC6A9\uD558\uB294 \uD504\uB85C\uC81D\uD2B8\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4. \uD504\uB85C\uC81D\uD2B8 \uC218\uC815\uC5D0\uC11C "\uBAA9\uD45C(\uC2A4\uD504\uB9B0\uD2B8) \uC0AC\uC6A9"\uC744 \uBA3C\uC800 \uCF1C\uC138\uC694.'}):rn(l0,{children:[rn(Po,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2.5,mt:1},children:[Je(Wm,{label:"\uD504\uB85C\uC81D\uD2B8",size:"medium",value:s,options:d.map(m=>({value:m.key,label:m.label})),onChange:m=>u(String(m.target.value)),disabled:O>0}),Je(Fm,{label:"\uBAA9\uD45C \uC774\uB984",size:"medium",placeholder:"\uC608: 8\uC6D4 2\uC8FC\uCC28",value:x,onChange:m=>p(m.target.value)}),Je(Hm,{size:"medium",label:"\uC2DC\uC791\uC77C",value:M,onChange:m=>C(m.target.value)}),Je(Hm,{size:"medium",label:"\uC885\uB8CC\uC77C",value:b,onChange:m=>g(m.target.value)}),Je(Fm,{label:"\uC124\uBA85",size:"medium",placeholder:"\uC120\uD0DD \uC785\uB825",value:c,onChange:m=>f(m.target.value),sx:{gridColumn:"1 / -1"}})]}),rn(Po,{sx:{mt:1.5,display:"flex",justifyContent:"flex-end",gap:1},children:[O>0?Je(_l,{color:"inherit",onClick:_,disabled:I,children:"\uCDE8\uC18C"}):null,Je(_l,{variant:"contained",onClick:()=>{v()},disabled:I,children:O>0?"\uBAA9\uD45C \uC800\uC7A5":"\uBAA9\uD45C \uB9CC\uB4E4\uAE30"})]}),Je(Po,{sx:{mt:2,borderTop:"1px solid #e6e6e3"},children:t.length===0?Je(Po,{sx:{py:3,textAlign:"center",fontSize:14,color:"#9a9a97"},children:"\uB4F1\uB85D\uB41C \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):t.map(m=>rn(Po,{sx:{display:"flex",flexDirection:"column",gap:1,py:1.75,borderBottom:"1px solid #f0efed"},children:[rn(Po,{sx:{minWidth:0},children:[rn(Po,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[Je(Po,{component:"span",sx:{fontSize:16,fontWeight:600,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},children:m.name}),Je(Po,{component:"span",sx:{flexShrink:0,px:1,py:.25,borderRadius:.75,bgcolor:"#f1f5f9",color:"#64748b",fontSize:13,fontWeight:500},children:D.get(m.group_seq)??"\uC0AD\uC81C\uB41C \uD504\uB85C\uC81D\uD2B8"}),rn(Po,{component:"span",sx:{flexShrink:0,fontSize:14,color:"#57564f"},children:[$m(m.start_date)," ~ ",$m(m.end_date)]})]}),m.goal?Je(Po,{sx:{mt:.5,fontSize:14,color:"#787774",lineHeight:1.5},children:m.goal}):null]}),rn(Po,{sx:{display:"flex",alignItems:"center",gap:.5},children:[Je(Wm,{label:"\uC0C1\uD0DC",showLabel:!1,size:"small",value:m.status,options:a0.map(T=>({value:T.value,label:T.label})),onChange:T=>a(m.seq,String(T.target.value)),sx:{width:104,flexShrink:0}}),Je(Lm,{"aria-label":"\uBAA9\uD45C \uC218\uC815",onClick:()=>E(m),sx:{color:"#9a9a97","&:hover":{color:"#2563eb"}},children:Je(i0,{sx:{fontSize:18}})}),Je(Lm,{"aria-label":"\uBAA9\uD45C \uC0AD\uC81C",onClick:()=>l(m.seq),sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:Je(St,{style:{width:16,height:16}})})]})]},m.seq))})]})});return Je(r0,{open:e,onClose:n,maxWidth:"sm",title:"\uBAA9\uD45C \uAD00\uB9AC",locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-sprint-manage",sections:[{id:"sprint-manage",showTitle:!1,children:L}],actions:{showCancelButton:!1,right:Je(_l,{variant:"contained",onClick:n,children:"\uB2EB\uAE30"})}})}import{useState as Km}from"react";import{Box as so,Button as wl,Divider as s0,IconButton as c0,TextField as m0}from"@mui/material";import{FormDialog as u0}from"@ehfuse/mui-form-dialog";import d0 from"@mui/icons-material/OpenInNewOutlined";import p0 from"@mui/icons-material/EventOutlined";import{ConfirmDialog as f0}from"@ehfuse/alerts";import{jsx as Me,jsxs as vn}from"react/jsx-runtime";function gq({open:e,imports:o,onRegister:t,onRemove:n,onClose:r}){let[i,a]=Km(""),[l,d]=Km(!1),s=async()=>{let p=i.trim();if(p){d(!0);try{await t(p)&&a("")}finally{d(!1)}}},u=async p=>{await f0({title:"\uAC00\uC838\uC624\uAE30 \uD574\uC81C",message:`"${p.name||"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}" \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30\uB97C \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&n(p.seq)},x=vn(so,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[vn(so,{sx:{color:"#37352f",lineHeight:1.7},children:["\uAD6C\uAE00 \uCE98\uB9B0\uB354\uC758 \uC77C\uC815\uC744 ",Me("b",{children:"\uC77D\uAE30\uC804\uC6A9"}),"\uC73C\uB85C \uC5C5\uBB34\uD568 \uCE98\uB9B0\uB354\uC5D0 \uD568\uAED8 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4.",Me("br",{}),"\uD45C\uC2DC/\uC228\uAE40\uC740 \uC5C5\uBB34\uD568 \uC6B0\uC0C1\uB2E8\uC758 ",Me("b",{children:"\uAD6C\uAE00 \uC77C\uC815"})," \uC2A4\uC704\uCE58\uB85C \uCF1C\uACE0 \uB055\uB2C8\uB2E4."]}),Me(so,{sx:{fontWeight:700,color:"#37352f",mt:.5},children:"\uB4F1\uB85D\uB41C \uCE98\uB9B0\uB354"}),o.length>0?Me(so,{sx:{display:"flex",flexDirection:"column",border:"1px solid #e6e6e3",borderRadius:1},children:o.map((p,c)=>vn(so,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:.75,borderTop:c>0?"1px solid #efefed":"none"},children:[Me(p0,{sx:{fontSize:18,color:"#0f9d58",flexShrink:0}}),Me(so,{component:"span",sx:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:p.name||"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),Me(c0,{"aria-label":"\uAC00\uC838\uC624\uAE30 \uD574\uC81C",size:"small",onClick:()=>{u(p)},sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:Me(St,{sx:{fontSize:18}})})]},p.seq))}):Me(so,{sx:{color:"#9a9a97",px:.5},children:"\uC544\uC9C1 \uB4F1\uB85D\uB41C \uCE98\uB9B0\uB354\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}),Me(s0,{sx:{my:1,borderColor:"#e6e6e3"}}),Me(so,{sx:{fontWeight:700,color:"#37352f"},children:"\uC0C8 \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30"}),vn(so,{sx:{bgcolor:"#f2f6fa",borderRadius:1,px:1.5,py:1.25,mb:1,fontSize:15,lineHeight:1.8,display:"flex",flexDirection:"column",gap:.25,"& > div":{display:"flex",gap:1},"& > div::before":{content:'"\u2022"',flexShrink:0}},children:[Me(so,{children:vn(so,{component:"span",children:["\uAD6C\uAE00 \uCE98\uB9B0\uB354(\uC6F9) > \uC67C\uCABD \uBAA9\uB85D\uC5D0\uC11C \uAC00\uC838\uC62C \uCE98\uB9B0\uB354\uC5D0 \uB9C8\uC6B0\uC2A4\uB97C \uC62C\uB824 \u22EE > ",Me("b",{children:"\uC124\uC815 \uBC0F \uACF5\uC720"}),"\uB97C \uC5FD\uB2C8\uB2E4."]})}),Me(so,{children:vn(so,{component:"span",children:[Me("b",{children:"\uCE98\uB9B0\uB354 \uD1B5\uD569"})," \uC139\uC158\uC758 ",Me("b",{children:'"iCal \uD615\uC2DD\uC758 \uBE44\uBC00 \uC8FC\uC18C"'})," \uB97C \uBCF5\uC0AC\uD574 \uC544\uB798\uC5D0 \uBD99\uC5EC\uB123\uC73C\uC138\uC694."]})}),Me(so,{children:Me(so,{component:"span",children:"\uBE44\uBC00 \uC8FC\uC18C\uB294 \uBCF8\uC778 \uC804\uC6A9\uC785\uB2C8\uB2E4. \uC11C\uBC84\uC5D0 \uC800\uC7A5\uB418\uBA70 \uB2E4\uB978 \uC9C1\uC6D0\uC5D0\uAC8C \uBCF4\uC774\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."})}),Me(so,{children:Me(so,{component:"span",children:"\uC77C\uC815\uC740 \uC57D 10\uBD84 \uAC04\uACA9\uC73C\uB85C \uAC31\uC2E0\uB418\uACE0, \uBC18\uBCF5 \uC77C\uC815\uC740 \uC77C\uBC18\uC801\uC778 \uADDC\uCE59(\uB9E4\uC77C/\uB9E4\uC8FC/\uB9E4\uC6D4/\uB9E4\uB144)\uB9CC \uC9C0\uC6D0\uD569\uB2C8\uB2E4."})})]}),vn(so,{sx:{display:"flex",gap:2,alignItems:"center"},children:[Me(m0,{value:i,onChange:p=>a(p.target.value),fullWidth:!0,label:"\uBE44\uBC00 iCal \uC8FC\uC18C",placeholder:"https://calendar.google.com/calendar/ical/\u2026/basic.ics",slotProps:{input:{spellCheck:!1}}}),Me(wl,{variant:"contained",disabled:!i.trim()||l,onClick:()=>{s()},sx:{flexShrink:0},children:l?"\uD655\uC778 \uC911\u2026":"\uB4F1\uB85D"})]})]});return Me(u0,{open:e,onClose:r,width:680,title:"\uAD6C\uAE00 \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30",locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-calendar-import",sections:[{id:"calendar-import",showTitle:!1,children:x}],actions:{showCancelButton:!1,left:Me(wl,{variant:"outlined",startIcon:Me(d0,{sx:{fontSize:16}}),onClick:()=>window.open("https://calendar.google.com/calendar","_blank"),children:"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),right:Me(wl,{variant:"contained",onClick:r,children:"\uB2EB\uAE30"})}})}import{Box as Nt,Button as qr,TextField as x0}from"@mui/material";import{FormDialog as g0}from"@ehfuse/mui-form-dialog";import b0 from"@mui/icons-material/ContentCopyOutlined";import Um from"@mui/icons-material/OpenInNewOutlined";import{InfoAlert as Vm}from"@ehfuse/alerts";import{Fragment as k0,jsx as eo,jsxs as In}from"react/jsx-runtime";function h0(e){return`${window.location.origin}/api/v1/taskbox/calendar/${e}.ics`}function Cq({open:e,feed:o,feedTaskCount:t,buildFeedUrl:n,onSubscribe:r,onClose:i}){let a=n??h0,l=o.subscribed?a(o.token):"",d=()=>{navigator.clipboard.writeText(l).then(()=>Vm("\uD53C\uB4DC \uC8FC\uC18C\uB97C \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>Vm("\uBCF5\uC0AC\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uC8FC\uC18C\uB97C \uC9C1\uC811 \uC120\uD0DD\uD574 \uBCF5\uC0AC\uD558\uC138\uC694."))},s=()=>{let x=l.replace(/^https?:\/\//,"webcal://");window.open(`https://calendar.google.com/calendar/r?cid=${encodeURIComponent(x)}`,"_blank")},u=In(Nt,{sx:{display:"flex",flexDirection:"column",gap:2.5},children:[In(Nt,{sx:{color:"#37352f",lineHeight:1.7},children:["\uB0B4\uAC00 \uAD00\uC5EC\uD55C \uC5C5\uBB34\uB97C ",eo("b",{children:"\uC77D\uAE30\uC804\uC6A9"}),"\uC73C\uB85C \uAD6C\uAE00 \uCE98\uB9B0\uB354\uC5D0\uC11C \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4."]}),t===0?In(Nt,{sx:{color:"#8a6d1d",bgcolor:"#faf1d7",borderRadius:1,px:1.5,py:1.25,lineHeight:1.7},children:["\uC9C0\uAE08\uC740 \uCE98\uB9B0\uB354\uC5D0 \uD45C\uC2DC\uD560 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",eo("br",{}),eo("b",{children:"\uB9C8\uAC10\uAE30\uD55C\uC774 \uC788\uB294 \uB0B4 \uC5C5\uBB34 \uB610\uB294 \uBCF4\uB0B8\uC5C5\uBB34"}),"\uAC00 \uC0DD\uAE30\uBA74"," ",o.subscribed?"\uAD6C\uAE00 \uCE98\uB9B0\uB354\uC5D0 \uC790\uB3D9\uC73C\uB85C \uD45C\uC2DC\uB429\uB2C8\uB2E4.":"\uC5EC\uAE30\uC11C \uAD6C\uB3C5\uC744 \uC2DC\uC791\uD558\uC138\uC694."]}):o.subscribed&&o.enabled?In(k0,{children:[eo(x0,{value:l,fullWidth:!0,label:"\uB0B4 \uD53C\uB4DC \uC8FC\uC18C",slotProps:{input:{readOnly:!0}}}),In(Nt,{sx:{display:"flex",gap:2},children:[eo(qr,{variant:"outlined",startIcon:eo(b0,{}),onClick:d,children:"\uC8FC\uC18C \uBCF5\uC0AC"}),eo(qr,{variant:"contained",startIcon:eo(Um,{}),onClick:s,children:"Google \uCE98\uB9B0\uB354\uC5D0 \uCD94\uAC00"})]}),In(Nt,{sx:{bgcolor:"#f2f6fa",borderRadius:1,px:1.5,py:1.25,fontSize:15,lineHeight:1.8,display:"flex",flexDirection:"column",gap:.25,"& > div":{display:"flex",gap:1},"& > div::before":{content:'"\u2022"',flexShrink:0}},children:[eo(Nt,{children:In("span",{children:["\uBC84\uD2BC\uC774 \uB3D9\uC791\uD558\uC9C0 \uC54A\uC73C\uBA74 \uAD6C\uAE00 \uCE98\uB9B0\uB354 > \uB2E4\uB978 \uCE98\uB9B0\uB354 + > ",eo("b",{children:"URL\uB85C \uCD94\uAC00"}),"\uC5D0 \uC704 \uC8FC\uC18C\uB97C \uBD99\uC5EC\uB123\uC73C\uC138\uC694."]})}),eo(Nt,{children:eo("span",{children:"\uAD6C\uAE00\uC774 \uD53C\uB4DC\uB97C \uC8FC\uAE30\uC801\uC73C\uB85C(\uC218 \uC2DC\uAC04 \uAC04\uACA9) \uAC00\uC838\uAC00\uBBC0\uB85C \uBCC0\uACBD\uC0AC\uD56D \uBC18\uC601\uC774 \uB2A6\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4."})}),eo(Nt,{children:eo("span",{children:"\uB0B4\uBCF4\uB0B4\uAE30\uB97C \uADF8\uB9CC\uD558\uB824\uBA74 \uAD6C\uAE00 \uCE98\uB9B0\uB354\uC5D0\uC11C \uCD94\uAC00\uD55C \uCE98\uB9B0\uB354\uB97C \uC0AD\uC81C\uD558\uBA74 \uB429\uB2C8\uB2E4."})}),eo(Nt,{children:eo("span",{children:"\uC774 \uC8FC\uC18C\uB294 \uBCF8\uC778 \uC804\uC6A9\uC785\uB2C8\uB2E4. \uACF5\uC720\uD558\uBA74 \uB0B4 \uC5C5\uBB34 \uC77C\uC815\uC774 \uB178\uCD9C\uB429\uB2C8\uB2E4."})})]})]}):eo(qr,{variant:"contained",onClick:r,sx:{alignSelf:"flex-start"},children:"\uAD6C\uB3C5 \uC2DC\uC791 (\uD53C\uB4DC \uBC1C\uAE09)"})]});return eo(g0,{open:e,onClose:i,width:680,title:"\uAD6C\uAE00 \uCE98\uB9B0\uB354\uB85C \uB0B4\uBCF4\uB0B4\uAE30",locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-calendar-subscribe",sections:[{id:"calendar-subscribe",showTitle:!1,children:u}],actions:{showCancelButton:!1,left:eo(qr,{variant:"outlined",startIcon:eo(Um,{sx:{fontSize:16}}),onClick:()=>window.open("https://calendar.google.com/calendar","_blank"),children:"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),right:eo(qr,{variant:"contained",onClick:i,children:"\uB2EB\uAE30"})}})}import{useEffect as T0,useMemo as Dl,useState as Ml}from"react";import{Box as Ar,Button as y0,Typography as S0}from"@mui/material";import{FormDialog as B0}from"@ehfuse/mui-form-dialog";import{SearchTextField as C0}from"@ehfuse/mui-form-controls";import{TreeView as v0}from"@ehfuse/tree-view";import{Fragment as E0,jsx as et,jsxs as O0}from"react/jsx-runtime";function Gm(e){return`${e.name}#${e.seq}`}function I0(e){return Number(e.slice(e.lastIndexOf("#")+1))||0}function _0(e){let o=[],t=n=>{for(let r of n.employees??[])o.push(r);for(let r of n.groups??[])t(r)};for(let n of e)t(n);return o}function w0(e,o){return o?[e.name,e.department,e.role_name,e.work_position].filter(Boolean).some(t=>String(t).toLowerCase().includes(o)):!0}function D0(e){let o=[[e.name,e.role_name].filter(Boolean).join(" "),e.department].filter(Boolean).join(" / ");return{id:`emp:${e.seq}`,label:Gm(e),renderLabel:et(Ar,{component:"span",sx:{display:"inline-flex",alignItems:"baseline",gap:.75},children:et(Ar,{component:"span",sx:{fontWeight:400,color:"text.primary"},children:o})})}}function jm(e,o){let t=(e.groups??[]).map(r=>jm(r,o)).filter(r=>r!==null),n=(e.employees??[]).filter(r=>w0(r,o)).map(D0);return t.length===0&&n.length===0?null:{id:`group:${e.key}`,label:e.name,children:[...t,...n]}}function M0({groups:e,allEmployees:o,initialSelectedSeqs:t,multiple:n,isMobile:r,onSelectionChange:i}){let[a,l]=Ml(""),d=Dl(()=>e.map(u=>jm(u,a.trim().toLowerCase())).filter(u=>u!==null),[e,a]),s=Dl(()=>o.filter(u=>t.includes(u.seq)).map(Gm),[]);return O0(E0,{children:[et(Ar,{sx:{px:1.5,py:1,borderBottom:"1px solid #cccccc",flexShrink:0},children:et(C0,{size:"small",fullWidth:!0,placeholder:"\uC774\uB984, \uBD80\uC11C \uAC80\uC0C9",onSearch:l,onClear:()=>l(""),sx:{"& .MuiOutlinedInput-notchedOutline":{border:"none"},"& .MuiInputBase-root":{px:0}}})}),et(Ar,{sx:r?{display:"flex",flexDirection:"column"}:{flex:1,minHeight:0,overflow:"hidden",display:"flex",flexDirection:"column"},children:et(v0,{items:d,checkbox:!0,multiSelect:n,selectionMode:"child",showSearch:!1,defaultExpanded:!0,initialSelections:s,onChange:u=>i(u.map(I0).filter(x=>x>0)),styles:{border:"none",borderRadius:"0"}})})]})}function Rq({open:e,title:o="\uC9C1\uC6D0 \uC120\uD0DD",hint:t="",groups:n,multiple:r=!1,selectedSeqs:i,confirmText:a="\uD655\uC778",onConfirm:l,onClose:d}){let s=_e(),[u,x]=Ml([]),[p,c]=Ml(0),f=Dl(()=>_0(n),[n]),M=i??[];T0(()=>{e&&(x(M),c(b=>b+1))},[e]);let C=()=>{let b=f.filter(g=>u.includes(g.seq));l(r?b:b.slice(0,1)),d()};return et(B0,{open:e,onClose:d,title:`${o}${r&&u.length>0?` (${u.length}\uBA85)`:""}`,locale:"ko",fullScreen:s,mobilePresentation:s?"slide":"dialog",draggable:!0,width:"600px",tabs:{visible:!1},titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},scrollPastLastSection:!1,sectionContentPaddingTop:0,fontScale:{enabled:!0},fontScaleKey:"taskbox-employee-select",sections:[{id:"employee-select",title:"\uC9C1\uC6D0 \uC120\uD0DD",showTitle:!1,children:et(Ar,{sx:{...s?{}:{height:560},display:"flex",flexDirection:"column",border:"1px solid #cccccc",borderRadius:1,...s?{}:{overflow:"hidden"},userSelect:"none"},children:et(M0,{groups:n,allEmployees:f,initialSelectedSeqs:M,multiple:r,isMobile:s,onSelectionChange:x},p)})}],dialogActionSx:{"@media (max-width:1023.95px)":{gap:"0.75rem !important","& .left-actions":{flex:1,minWidth:0},"& .right-actions":{flex:1}}},actions:{visible:!0,showCancelButton:!1,left:t?et(S0,{variant:"body2",color:"text.secondary",sx:{whiteSpace:"pre-line",lineHeight:1.35},children:t}):void 0,right:et(y0,{variant:"contained",onClick:C,children:a})}})}import{useEffect as q0,useMemo as A0,useState as L0}from"react";import{Box as mr,Button as N0,Divider as F0}from"@mui/material";import{FormDialog as H0}from"@ehfuse/mui-form-dialog";import{LabelSelect as W0}from"@ehfuse/mui-form-controls";import{Box as pt}from"@mui/material";import{jsx as sr,jsxs as cr}from"react/jsx-runtime";function R0(e,o){let t=o.filter(n=>n.sprint_seq===e.seq&&!n.archived&&n.completed);return{points:t.reduce((n,r)=>n+(r.story_points??0),0),count:t.length}}function Ym({sprints:e,tasks:o,height:t=160}){let r=[...e].sort((u,x)=>`${u.start_date}|${u.seq}`.localeCompare(`${x.start_date}|${x.seq}`)).map(u=>({sprint:u,...R0(u,o)})),i=r.some(u=>u.points>0),a=r.map(u=>i?u.points:u.count),l=Math.max(1,...a),d=r.filter(u=>u.sprint.status==="closed").map(u=>i?u.points:u.count),s=d.length>0?Math.round(d.reduce((u,x)=>u+x,0)/d.length*10)/10:null;return r.length===0?sr(pt,{sx:{py:4,textAlign:"center",fontSize:14.5,color:"#9a9a97"},children:"\uD45C\uC2DC\uD560 \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):cr(pt,{children:[cr(pt,{sx:{mb:1,display:"flex",justifyContent:"space-between",fontSize:14,color:"#000"},children:[cr("span",{children:["\uC644\uB8CC ",i?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uBAA9\uD45C\uBCC4"]}),s!==null?cr("span",{children:["\uD3C9\uADE0(\uC885\uB8CC \uBAA9\uD45C)"," ",sr(pt,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:s}),i?"SP":"\uAC74"]}):null]}),sr(pt,{sx:{display:"flex",alignItems:"flex-end",gap:2,height:t,px:.5},children:r.map(u=>{let x=i?u.points:u.count,p=Math.round((t-24)*x/l),c=u.sprint.status==="closed";return cr(pt,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-end",height:"100%"},children:[sr(pt,{sx:{fontSize:14,fontWeight:700,color:"#37352f",lineHeight:1.5},children:x}),sr(pt,{sx:{width:"60%",maxWidth:56,height:Math.max(2,p),borderRadius:"4px 4px 0 0",bgcolor:c?"#2f80ed":"#a9c9f5"}})]},u.sprint.seq)})}),sr(pt,{sx:{display:"flex",gap:2,px:.5,mt:.5},children:r.map(u=>cr(pt,{sx:{flex:1,minWidth:0,textAlign:"center",fontSize:13.5,color:"#000",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[u.sprint.name,u.sprint.status!=="closed"?" (\uC9C4\uD589\uC911)":""]},u.sprint.seq))})]})}import{useMemo as P0}from"react";import{Box as _n}from"@mui/material";import{jsx as ft,jsxs as wn}from"react/jsx-runtime";function Xm(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?new Date(`${e}T00:00:00`):null}function z0(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function El(e){return e.slice(5).replace("-",".")}function Qm({sprint:e,tasks:o,todayStr:t,height:n=200}){let r=P0(()=>{let b=Xm(e.start_date),g=Xm(e.end_date);if(!b||!g||g<b||Math.round((g.getTime()-b.getTime())/864e5)+1>366)return null;let S=o.filter(m=>m.sprint_seq===e.seq&&!m.archived);if(S.length===0)return{empty:!0};let O=S.some(m=>(m.story_points??0)>0),y=m=>O?m.story_points??0:1,_=S.reduce((m,T)=>m+y(T),0),E=new Map;for(let m of S){if(!m.completed)continue;let T=(m.completed_time??"").slice(0,10),h=/^\d{4}-\d{2}-\d{2}$/.test(T)?T:e.start_date;E.set(h,(E.get(h)??0)+y(m))}let v=[];for(let m=new Date(b);m<=g;m.setDate(m.getDate()+1))v.push(z0(m));let D=_,L=[];for(let m of v){if(m>t)break;D-=E.get(m)??0,L.push({day:m,value:Math.max(0,D)})}return{empty:!1,days:v,total:_,usePoints:O,actual:L}},[e,o,t]);if(!r)return ft(_n,{sx:{py:4,textAlign:"center",fontSize:14.5,color:"#9a9a97"},children:"\uBAA9\uD45C\uC758 \uC2DC\uC791\uC77C\xB7\uC885\uB8CC\uC77C\uC774 \uC788\uC5B4\uC57C \uBC88\uB2E4\uC6B4\uC744 \uADF8\uB9B4 \uC218 \uC788\uC2B5\uB2C8\uB2E4."});if(r.empty)return ft(_n,{sx:{py:4,textAlign:"center",fontSize:14.5,color:"#9a9a97"},children:"\uBC30\uC815\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."});let{days:i,total:a,usePoints:l,actual:d}=r,s=600,u=200,x=8,p=b=>i.length===1?0:b/(i.length-1)*s,c=b=>x+(u-x*2)*(1-b/Math.max(1,a)),f=`${p(0)},${c(a)} ${p(i.length-1)},${c(0)}`,M=d.map(b=>`${p(i.indexOf(b.day))},${c(b.value)}`).join(" "),C=d[d.length-1];return wn(_n,{children:[wn(_n,{sx:{mb:1,display:"flex",justifyContent:"space-between",fontSize:14,color:"#000"},children:[wn("span",{children:["\uB0A8\uC740 ",l?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uCD1D ",a]}),C?wn("span",{children:["\uD604\uC7AC"," ",ft(_n,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:C.value}),l?"SP":"\uAC74"," \uB0A8\uC74C"]}):null]}),ft(_n,{sx:{border:"1px solid #e6e6e3",borderRadius:1,bgcolor:"#fafaf9",px:1,py:.5},children:wn("svg",{viewBox:`0 0 ${s} ${u}`,preserveAspectRatio:"none",style:{display:"block",width:"100%",height:n},children:[ft("line",{x1:0,y1:c(0),x2:s,y2:c(0),stroke:"#e6e6e3",strokeWidth:1}),ft("polyline",{points:f,fill:"none",stroke:"#9a9a97",strokeWidth:1.5,strokeDasharray:"6 5",vectorEffect:"non-scaling-stroke"}),d.length>1?ft("polyline",{points:M,fill:"none",stroke:"#2f80ed",strokeWidth:2.5,vectorEffect:"non-scaling-stroke"}):null,C?ft("circle",{cx:p(i.indexOf(C.day)),cy:c(C.value),r:4,fill:"#2f80ed",vectorEffect:"non-scaling-stroke"}):null]})}),wn(_n,{sx:{mt:.5,display:"flex",justifyContent:"space-between",fontSize:13.5,color:"#000"},children:[ft("span",{children:El(e.start_date)}),t>e.start_date&&t<e.end_date?wn("span",{children:["\uC624\uB298 ",El(t)]}):null,ft("span",{children:El(e.end_date)})]})]})}import{jsx as Ft,jsxs as Ol}from"react/jsx-runtime";function Xq({open:e,sprints:o,tasks:t,todayStr:n,initialSprintSeq:r=0,onClose:i}){let[a,l]=L0(0);q0(()=>{if(!e)return;let u=o.find(p=>p.status==="active")??o[0],x=o.find(p=>p.seq===r)??u;l(x?.seq??0)},[e]);let d=A0(()=>o.find(u=>u.seq===a)??null,[o,a]),s=Ol(mr,{sx:{display:"flex",flexDirection:"column"},children:[Ol(mr,{sx:{px:3,py:2.5},children:[Ft(mr,{sx:{mb:1.5,fontSize:17,fontWeight:700,color:"#37352f"},children:"\uBCA8\uB85C\uC2DC\uD2F0"}),Ft(Ym,{sprints:o,tasks:t})]}),Ft(F0,{sx:{borderColor:"#e6e6e3"}}),Ol(mr,{sx:{px:3,py:2.5},children:[Ft(mr,{sx:{mb:1.5,fontSize:17,fontWeight:700,color:"#37352f"},children:"\uBC88\uB2E4\uC6B4"}),Ft(W0,{label:"\uBAA9\uD45C",showLabel:!1,value:a?String(a):"",options:o.map(u=>({value:String(u.seq),label:Ho(u)})),onChange:u=>l(Number(u.target.value)||0),sx:{width:280,mb:2}}),d?Ft(Qm,{sprint:d,tasks:t,todayStr:n}):Ft(mr,{sx:{py:4,textAlign:"center",fontSize:13.5,color:"#9a9a97"},children:"\uBC88\uB2E4\uC6B4\uC744 \uBCFC \uBAA9\uD45C\uB97C \uC120\uD0DD\uD558\uC138\uC694."})]})]});return Ft(H0,{open:e,onClose:i,width:680,title:"\uBAA9\uD45C \uCC28\uD2B8",locale:"ko",contentTopPadding:0,contentPaddingX:0,sectionsPaddingTop:0,tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-sprint-charts",sections:[{id:"sprint-charts",showTitle:!1,children:s}],actions:{showCancelButton:!1,right:Ft(N0,{variant:"contained",onClick:i,children:"\uB2EB\uAE30"})}})}import{Checkbox as $0,Divider as K0,Menu as U0,MenuItem as Rl}from"@mui/material";import{jsx as Lr,jsxs as Zm}from"react/jsx-runtime";function oA({anchorEl:e,candidates:o,selectedNames:t,avatarSrcByName:n,onToggle:r,onClear:i,onClose:a}){return Zm(U0,{anchorEl:e,open:!!e,onClose:a,transitionDuration:0,children:[o.length===0?Lr(Rl,{disabled:!0,sx:{fontSize:14},children:"\uBAA9\uB85D\uC5D0 \uC9C0\uC815\uB41C \uC0AC\uB78C\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):o.map(l=>{let d=t.includes(l.name);return Zm(Rl,{onClick:()=>r(l),sx:{fontSize:14,minWidth:170,gap:1},children:[Lr($0,{size:"small",checked:d,sx:{p:0}}),Lr(Mo,{names:[l.name],size:20,avatarSrcByName:n}),l.name]},`${l.accountSeq}-${l.name}`)}),Lr(K0,{}),Lr(Rl,{disabled:t.length===0,onClick:i,sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}import{useState as V0}from"react";import{ButtonBase as G0,Menu as j0,MenuItem as Y0}from"@mui/material";import X0 from"@mui/icons-material/KeyboardArrowDown";import Q0 from"@mui/icons-material/Check";import{Fragment as Z0,jsx as Pl,jsxs as zl}from"react/jsx-runtime";function cA({value:e,onChange:o,options:t}){let[n,r]=V0(null),i=t??ma,a=ma.find(l=>l.value===e)?.label??"";return zl(Z0,{children:[zl(G0,{onClick:l=>r(l.currentTarget),sx:{display:"flex",alignItems:"center",gap:.5,px:1,py:.5,borderRadius:1,fontSize:13.5,color:"#37352f","&:hover":{bgcolor:"#f2f2f0"}},children:[a,Pl(X0,{sx:{fontSize:17,color:"#9a9a97"}})]}),Pl(j0,{transitionDuration:0,anchorEl:n,open:!!n,onClose:()=>r(null),children:i.map(l=>zl(Y0,{selected:l.value===e,onClick:()=>{o(l.value),r(null)},sx:{fontSize:14,minWidth:140,justifyContent:"space-between",gap:1},children:[l.label,l.value===e?Pl(Q0,{sx:{fontSize:16,color:"#2f80ed"}}):null]},l.value))})]})}import{Box as Gi,ButtonBase as J0}from"@mui/material";import{DateTextField as Jm}from"@ehfuse/mui-form-controls";function Dn(e){let o=t=>String(t).padStart(2,"0");return`${e.getFullYear()}-${o(e.getMonth()+1)}-${o(e.getDate())}`}function Vi(e,o=new Date){let t=new Date(o);return t.setMonth(t.getMonth()-e),t}function dA(e=new Date){return{fromDate:Dn(Vi(1,e)),toDate:Dn(e)}}import{jsx as Nr,jsxs as eu}from"react/jsx-runtime";var eS=[{label:"1\uAC1C\uC6D4",months:1},{label:"3\uAC1C\uC6D4",months:3},{label:"6\uAC1C\uC6D4",months:6},{label:"1\uB144",months:12},{label:"\uC804\uCCB4",months:0}];function ou({fromDate:e,toDate:o,onChange:t}){let n=i=>{if(i<=0){t("","");return}t(Dn(Vi(i)),Dn(new Date))},r=i=>i<=0?!e&&!o:!e||!o?!1:e===Dn(Vi(i))&&o===Dn(new Date);return eu(Gi,{sx:{display:"flex",alignItems:"center",gap:1.5,flexWrap:"wrap"},children:[Nr(Gi,{sx:{display:"flex",alignItems:"center",gap:1.5},children:eS.map(i=>{let a=r(i.months);return Nr(J0,{onClick:()=>n(i.months),sx:{px:1.25,py:.85,borderRadius:1,fontSize:13,fontWeight:a?500:400,border:"1px solid",borderColor:a?"#2f80ed":"#dedddb",color:a?"#2f80ed":"#37352f",bgcolor:a?"#eef6ff":"transparent","&:hover":{bgcolor:a?"#eef6ff":"#f7f7f5"}},children:i.label},i.label)})}),eu(Gi,{sx:{display:"flex",alignItems:"center",gap:.5},children:[Nr(Jm,{value:e,size:"small",placeholder:"\uC2DC\uC791\uC77C",onChange:i=>t(i.target.value,o),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}}),Nr(Gi,{component:"span",sx:{fontSize:13,color:"#9a9a97"},children:"~"}),Nr(Jm,{value:o,size:"small",placeholder:"\uC885\uB8CC\uC77C",onChange:i=>t(e,i.target.value),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}})]})]})}import{Popover as oS}from"@mui/material";import{jsx as tu}from"react/jsx-runtime";function yA({anchorEl:e,fromDate:o,toDate:t,onChange:n,onClose:r}){return tu(oS,{transitionDuration:0,anchorEl:e,open:!!e,onClose:r,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},slotProps:{paper:{sx:{p:1.5}}},children:tu(ou,{fromDate:o,toDate:t,onChange:n})})}import{Box as tS,ButtonBase as nS,Tab as rS,Tabs as iS}from"@mui/material";import aS from"@mui/icons-material/Checklist";import lS from"@mui/icons-material/Face";import sS from"@mui/icons-material/Publish";import cS from"@mui/icons-material/NotificationsOutlined";import mS from"@mui/icons-material/BugReportOutlined";import uS from"@mui/icons-material/DescriptionOutlined";import dS from"@mui/icons-material/Inventory2Outlined";import{jsx as ot}from"react/jsx-runtime";function nu(e,o){return o>0?`${e} (${o})`:e}var PA=[{id:"my",label:"\uC804\uCCB4",icon:ot(aS,{sx:{fontSize:18}})},{id:"notice",label:"\uACF5\uC9C0\uC0AC\uD56D",icon:ot(cS,{sx:{fontSize:18}})},{id:"mine",label:"\uB0B4 \uC5C5\uBB34",icon:ot(lS,{sx:{fontSize:18}})},{id:"sent",label:"\uBCF4\uB0B8 \uC5C5\uBB34",icon:ot(sS,{sx:{fontSize:18}})},{id:"bug",label:"\uC624\uB958",icon:ot(mS,{sx:{fontSize:18}})},{id:"archive",label:"\uBCF4\uAD00\uD568",icon:ot(dS,{sx:{fontSize:18}}),hideCount:!0},{id:"report",label:"\uBCF4\uACE0\uC11C",icon:ot(uS,{sx:{fontSize:18}}),hideCount:!0}];function pS(e){return{minHeight:46,minWidth:75,bgcolor:e.bg,color:e.color,borderRadius:"8px 8px 0 0",padding:"10px 18px",textTransform:"none",fontSize:14,fontWeight:500,border:`1px solid ${e.borderColor}`,borderBottom:"none","&:hover":{bgcolor:e.hoverBg},"&.Mui-selected":{bgcolor:e.selectedBg,color:e.selectedColor,border:`1px solid ${e.selectedBg}`,borderBottom:"none","&:hover":{bgcolor:e.selectedBg}},...e.sx}}function zA({items:e,activeTab:o,counts:t,onChange:n,compact:r=!1}){let i=te(),a=pS(i.tabs),l=e;return r?ot(tS,{sx:{display:"flex",flexWrap:"wrap",gap:1.25},children:l.map(d=>{let s=o===d.id;return ot(nS,{onClick:()=>n(d.id),sx:{px:1.5,py:.75,borderRadius:1,fontSize:_o(13.5),fontWeight:500,whiteSpace:"nowrap",border:"1px solid",bgcolor:s?i.tabs.selectedBg:i.tabs.bg,color:s?i.tabs.selectedColor:i.tabs.color,borderColor:s?i.tabs.selectedBg:i.tabs.borderColor},children:nu(d.label,d.hideCount?0:t[d.id]??0)},d.id)})}):ot(iS,{value:o,onChange:(d,s)=>n(s),sx:{minHeight:46,"& .MuiTabs-indicator":{display:"none"},"& .MuiTabs-flexContainer":{gap:"12px",minHeight:46}},children:l.map(d=>ot(rS,{value:d.id,label:nu(d.label,d.hideCount?0:t[d.id]??0),icon:d.icon,iconPosition:"start",sx:a},d.id))})}import{useEffect as fS,useMemo as xS,useState as ql}from"react";import{Divider as Al,ListItemIcon as Ko,Menu as Ll,MenuItem as vo}from"@mui/material";import gS from"@mui/icons-material/OpenInNewOutlined";import bS from"@mui/icons-material/Check";import hS from"@mui/icons-material/CheckCircleOutlined";import kS from"@mui/icons-material/RadioButtonUnchecked";import TS from"@mui/icons-material/SendOutlined";import yS from"@mui/icons-material/EventOutlined";import SS from"@mui/icons-material/PersonOutlineOutlined";import BS from"@mui/icons-material/ViewKanbanOutlined";import CS from"@mui/icons-material/ContentCopyOutlined";import vS from"@mui/icons-material/NextPlanOutlined";import IS from"@mui/icons-material/ContentPasteOutlined";import _S from"@mui/icons-material/ShareOutlined";import wS from"@mui/icons-material/DirectionsRunOutlined";import ru from"@mui/icons-material/ChevronRight";import DS from"@mui/icons-material/ArchiveOutlined";import MS from"@mui/icons-material/UnarchiveOutlined";import{ConfirmDialog as ES}from"@ehfuse/alerts";import{Fragment as OS,jsx as me,jsxs as bo}from"react/jsx-runtime";function uL({target:e,onClose:o,customTabs:t,sprints:n=[],myAccountSeq:r=0,onOpenDetail:i,onToggleCompleted:a,onRequestConfirm:l,onChangeDueDate:d,onChangeReminder:s,onMemberEdit:u,onMoveProject:x,onDuplicate:p,onCreateFollowUp:c,onShare:f,onAssignSprint:M,onArchiveToggle:C,onDelete:b}){let g=_e(),I=rt(),[S,O]=ql(null),[y,_]=ql(null),[E,v]=ql(null);fS(()=>{e||(O(null),_(null),v(null))},[e]);let D=e?.task??null,L=!!D?.is_notice,m=!!D?.is_event,T=D?!ht(D,r):!1,h=xS(()=>new Set(t.filter(A=>A.useSprints).map(A=>A.key)),[t]),k=async()=>{let A=D;if(o(),!A)return;await ES({title:"\uC5C5\uBB34 \uC0AD\uC81C",message:`"${A.title}" \uC5C5\uBB34\uB97C \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&b(A.seq)},P=()=>{D&&C(D.seq,!D.archived),o()};return bo(OS,{children:[bo(Ll,{open:!!e,onClose:o,transitionDuration:0,anchorReference:g?"none":"anchorPosition",anchorPosition:!g&&e?{top:e.position.top,left:e.position.left}:void 0,slotProps:{paper:{sx:{minWidth:190,...g?{position:"fixed",top:"50%",left:"50%",translate:"-50% -50%",maxHeight:"70vh"}:{}}},list:g?{sx:{"& .MuiMenuItem-root":{py:1,minHeight:0}}}:void 0},children:[bo(vo,{onClick:()=>{D&&i(D),o()},sx:{fontSize:14},children:[me(Ko,{children:me(gS,{sx:{fontSize:19}})}),"\uC0C1\uC138 \uC5F4\uAE30"]}),bo(vo,{disabled:L?(D?.author_account_seq??0)!==r:(D?.author_account_seq??0)!==r&&(D?.manager_account_seq??0)!==r,onClick:()=>{D&&a(D.seq,!D.completed),o()},sx:{fontSize:14},children:[me(Ko,{children:D?.completed?me(kS,{sx:{fontSize:19}}):me(hS,{sx:{fontSize:19}})}),D?.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC"]}),!L&&l?bo(vo,{disabled:!(D?.manager_account_seq??0)&&(D?.receiver_account_seqs??[]).length===0,onClick:()=>{D&&l(D),o()},sx:{fontSize:14},children:[me(Ko,{children:me(TS,{sx:{fontSize:19}})}),"\uD655\uC778 \uC694\uCCAD"]}):null,m?null:me(Al,{}),m?null:bo(vo,{disabled:T,onClick:A=>{D&&O({anchorEl:A.currentTarget,task:D})},sx:{fontSize:14},children:[me(Ko,{children:me(yS,{sx:{fontSize:19}})}),"\uB9C8\uAC10\uAE30\uD55C \uBCC0\uACBD"]}),!L&&!m&&u?bo(vo,{onClick:()=>{D&&u(D,"manager"),o()},sx:{fontSize:14},children:[me(Ko,{children:me(SS,{sx:{fontSize:19}})}),"\uCC45\uC784\uC790 \uBCC0\uACBD"]}):null,m?null:bo(vo,{disabled:T,onClick:A=>{D&&_({anchorEl:A.currentTarget,task:D})},sx:{fontSize:14},children:[me(Ko,{children:me(BS,{sx:{fontSize:19}})}),"\uD504\uB85C\uC81D\uD2B8 \uC774\uB3D9",me(ru,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}),me(Al,{}),p?bo(vo,{disabled:T,onClick:()=>{D&&p(D.seq),o()},sx:{fontSize:14},children:[me(Ko,{children:me(CS,{sx:{fontSize:19}})}),"\uBCF5\uC81C"]}):null,c&&D&&!D.is_event&&!D.is_notice?bo(vo,{onClick:()=>{D&&c(D.seq),o()},sx:{fontSize:14},children:[me(Ko,{children:me(vS,{sx:{fontSize:19}})}),"\uD6C4\uC18D \uC5C5\uBB34 \uB9CC\uB4E4\uAE30"]}):null,bo(vo,{onClick:()=>{D&&(f?f(D):rr(D,g)),o()},sx:{fontSize:14},children:[me(Ko,{children:g?me(_S,{sx:{fontSize:19}}):me(IS,{sx:{fontSize:19}})}),g?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC"]}),D&&!D.is_notice&&!D.is_event&&h.has(String(D.tab_key??""))&&M?bo(vo,{onClick:A=>v(A.currentTarget),sx:{fontSize:14},children:[me(Ko,{children:me(wS,{sx:{fontSize:19}})}),"\uBAA9\uD45C\uC5D0 \uB123\uAE30",me(ru,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}):null,bo(vo,{onClick:P,disabled:T||!D?.archived&&!(D&&Kr(D)),sx:{fontSize:14},children:[me(Ko,{children:D?.archived?me(MS,{sx:{fontSize:19}}):me(DS,{sx:{fontSize:19}})}),D?.archived?"\uBCF4\uAD00 \uD574\uC81C":"\uBCF4\uAD00"]}),me(Al,{}),bo(vo,{disabled:T,onClick:k,sx:{fontSize:14,color:"#e5484d"},children:[me(Ko,{children:me(St,{sx:{fontSize:19,color:"#e5484d"}})}),"\uC0AD\uC81C"]})]}),me(Vt,{anchorEl:S?.anchorEl??null,open:!!S,date:S?.task.due_date??"",reminder:S?.task.reminder??"none",hideReminder:!!S?.task.completed,centered:g,onClose:()=>{O(null),o()},onDateChange:A=>{S&&d(S.task.seq,A)},onReminderChange:A=>{S&&s?.(S.task.seq,A)}}),bo(Ll,{transitionDuration:0,anchorEl:y?.anchorEl??null,open:!!y,onClose:()=>{_(null),o()},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},...I,children:[me(vo,{selected:!y?.task.tab_key,onClick:()=>{y&&x(y.task.seq,""),_(null),o()},sx:{fontSize:14,minWidth:170},children:"\uC5C6\uC74C"}),t.filter(A=>!A.archived).map(A=>me(vo,{selected:y?.task.tab_key===A.key,onClick:()=>{y&&x(y.task.seq,A.key),_(null),o()},sx:{fontSize:14,minWidth:170},children:A.label},A.key))]}),me(Ll,{transitionDuration:0,anchorEl:E,open:!!E,onClose:()=>v(null),anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...n.filter(A=>`custom-${A.group_seq}`===String(D?.tab_key??"")).map(A=>({seq:A.seq,label:Ho(A)}))].map(A=>bo(vo,{onClick:()=>{D&&M?.(D.seq,A.seq),v(null),o()},sx:{fontSize:14,minWidth:160,gap:1},children:[A.label,(D?.sprint_seq??0)===A.seq?me(bS,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},A.seq))})]})}import{Checkbox as RS,Divider as PS,Menu as zS,MenuItem as iu}from"@mui/material";import{jsx as ji,jsxs as au}from"react/jsx-runtime";function gL({anchorEl:e,labelOptions:o,selectedKeys:t,onToggle:n,onClear:r,onClose:i}){return au(zS,{transitionDuration:0,anchorEl:e,open:!!e,onClose:i,children:[o.map(a=>{let l=t.includes(a.key);return au(iu,{onClick:()=>n(a.key),sx:{fontSize:14,minWidth:190,gap:1},children:[ji(RS,{size:"small",checked:l,sx:{p:0}}),ji(ze,{option:a})]},a.key)}),ji(PS,{}),ji(iu,{disabled:t.length===0,onClick:()=>{r(),i()},sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}import{Divider as lu,Menu as qS,MenuItem as Nl}from"@mui/material";import AS from"@mui/icons-material/Check";import LS from"@mui/icons-material/BarChartOutlined";import NS from"@mui/icons-material/SettingsOutlined";import{jsx as Fr,jsxs as Yi}from"react/jsx-runtime";function CL(e){let{anchorEl:o,sprints:t,value:n,onSelect:r,onManage:i,onCharts:a,onClose:l}=e;return Yi(qS,{transitionDuration:0,anchorEl:o,open:!!o,onClose:l,children:[[{seq:0,label:"\uC804\uCCB4"},{seq:-1,label:"\uBBF8\uBC30\uC815 \uC5C5\uBB34"},...t.map(d=>({seq:d.seq,label:Ho(d)}))].map(d=>Yi(Nl,{onClick:()=>{r(d.seq),l()},sx:{fontSize:14,minWidth:180,gap:1},children:[d.label,n===d.seq?Fr(AS,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},d.seq)),Fr(lu,{}),a?Yi(Nl,{onClick:()=>{l(),a()},sx:{fontSize:14,gap:1},children:[Fr(LS,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uCC28\uD2B8"]}):null,a?Fr(lu,{}):null,Yi(Nl,{onClick:()=>{l(),i()},sx:{fontSize:14,gap:1},children:[Fr(NS,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uAD00\uB9AC\u2026"]})]})}var FS={my:"tasks",mine:"tasks",sent:"tasks",notice:"notice",bug:"bug",archive:"archive",done:"done",report:"report"};function HS(e){return FS[e]??"tasks"}var _L={list:"\uBAA9\uB85D",card:"\uD504\uB85C\uC81D\uD2B8",kanban:"\uC0C1\uD0DC",sprint:"\uBAA9\uD45C",calendar:"\uC8FC\uAC04",month:"\uC6D4\uAC04",agenda:"\uC544\uC820\uB2E4",timeline:"\uD0C0\uC784\uB77C\uC778"},su=["list","calendar","month","card","kanban","sprint","timeline"],WS=["list","card"];function wL(e){let o=HS(e);switch(o){case"notice":return{kind:o,viewOptions:[],showCreate:!0,createLabel:"\uACF5\uC9C0\uC0AC\uD56D \uB4F1\uB85D",showGroupBy:!1,showSprintFilter:!1,showDateRange:!1,showHideCompleted:!0,forceFlatList:!0,columns:{notice:!0}};case"bug":return{kind:o,viewOptions:su,showCreate:!0,createLabel:"\uC624\uB958 \uB4F1\uB85D",showGroupBy:!0,showSprintFilter:!0,showDateRange:!1,showHideCompleted:!0,forceFlatList:!1,columns:{bug:!0}};case"archive":return{kind:o,viewOptions:WS,showCreate:!1,createLabel:"",showGroupBy:!1,showSprintFilter:!1,showDateRange:!0,showHideCompleted:!1,forceFlatList:!0,columns:{showActions:!1}};case"done":return{kind:o,viewOptions:["list"],showCreate:!1,createLabel:"",showGroupBy:!1,showSprintFilter:!1,showDateRange:!0,showHideCompleted:!1,forceFlatList:!0,columns:{showActions:!1}};case"report":return{kind:o,viewOptions:[],showCreate:!1,createLabel:"",showGroupBy:!1,showSprintFilter:!1,showDateRange:!0,showHideCompleted:!1,forceFlatList:!0,columns:{}};default:return{kind:o,viewOptions:su,showCreate:!0,createLabel:"\uC5C5\uBB34 \uB4F1\uB85D",showGroupBy:!0,showSprintFilter:!0,showDateRange:!1,showHideCompleted:!0,forceFlatList:!1,columns:e==="mine"?{showRequest:!1,confirmMode:"action"}:e==="sent"?{confirmMode:"time"}:{}}}}export{o1 as ALL_TASK_VIEWER_ACCOUNT_SEQS,om as AddLabelDialog,ii as AddTabDialog,Qc as AttachmentUploadGauge,ll as AttachmentUploadPercent,ra as BUG_DEVICE_OPTIONS,br as BUG_ICON_COLOR,pI as BUG_KANBAN_COLUMNS,na as BUG_REPRO_OPTIONS,ia as BUG_RESOLUTION_OPTIONS,sn as BUG_STATUS_OPTIONS,gr as BUG_TASK_ICON,_i as BugPropertiesGrid,Ff as COLUMN_WIDTHS,la as COMPLETED_STATUS_OPTION,vl as CUSTOM_TAB_KEY_PREFIX,gq as CalendarImportDialog,Cq as CalendarSubscribeDialog,Ut as CommentBubbleIcon,Hn as ConfirmCountButton,Ds as DATE_REMINDER_OPTIONS,Qi as DEFAULT_PROJECT_ICON,PA as DEFAULT_TASKBOX_TAB_ITEMS,Oe as DEFAULT_TASK_ICON,ol as DRAWER_SECTION_TITLE_FONT_SIZE,yA as DateRangeFilterPopover,$o as DrawerSection,Vt as DueDatePickerPopover,kf as ENDED_EVENT_STATUS_OPTION,cm as EVENT_ICON_COLOR,Rq as EmployeeSelectDialog,ma as GROUP_BY_OPTIONS,Vn as GoogleEventChip,cA as GroupByMenuButton,ri as IconPickerGrid,zc as InlineAddressInput,Pt as InlineTextValue,sa as KANBAN_CLOSED_COLUMN_KEY,gL as LabelFilterMenu,qi as LabelSelectMenu,kr as MANUAL_TASK_STATUS_OPTIONS,oA as MemberFilterMenu,hr as NOTICE_STATUS_OPTIONS,wo as NOTICE_TASK_ICON,Xl as NO_TASK_ICON,Zi as PROJECT_ICON_OPTIONS,pe as PropertyRow,Nn as RECEIVER_AVATAR_COLORS,Ms as REMINDER_OPTIONS,Mo as ReceiverAvatarStack,Dm as RelatedTasksSection,$S as STATUS_KEY_REPLIED,Fl as STATUS_KEY_WAITING,qs as SortableTaskCard,Qm as SprintBurndownChart,Xq as SprintChartsDialog,CL as SprintFilterMenu,aq as SprintManageDialog,Ym as SprintVelocityChart,jr as StatusSelectMenu,pa as TASKBOX_COLUMNS,Yo as TASKBOX_DRAWER_NARROW_MQ,Ql as TASKBOX_UI_STATE_ID,_L as TASKBOX_VIEW_LABELS,eE as TASKBOX_VIEW_MODES,ln as TASK_STATUS_OPTIONS,qx as TIME_REMINDER_OPTIONS,si as TaskAckListPopover,Fn as TaskActionButton,$i as TaskActivityDialog,Pi as TaskAttachmentsSection,Bc as TaskBoxColumnSummary,Oa as TaskBoxGroupBoard,FE as TaskBoxMobileList,dc as TaskBoxMonthAgenda,lc as TaskBoxMonthCalendar,pE as TaskBoxSprintColumnSummary,Rs as TaskBoxTable,zA as TaskBoxTabs,hc as TaskBoxTimeline,JM as TaskBoxView,tc as TaskBoxWeekCalendar,Cr as TaskCardContent,Mi as TaskChecklistSection,km as TaskCommentInput,hm as TaskCommentsSection,wi as TaskContentEditor,uL as TaskContextMenu,Ii as TaskCorePropertiesGrid,dl as TaskCreateBody,uP as TaskCreateDrawer,ou as TaskDateRangeFilter,Em as TaskDetailBody,Gz as TaskDetailDrawer,Cm as TaskDetailHeader,Qn as TaskIconPickerPopover,$t as TaskLabelChips,Di as TaskLinkDialog,vm as TaskNoteField,Vo as TaskPriorityChip,ze as TaskStatusChip,yI as TaskStatusChips,Bu as TaskboxProvider,h0 as buildCalendarFeedUrl,mi as buildCardBaseSx,as as buildStatusOptionColors,ua as buildTaskGroupSections,hl as buildTaskRelationsModel,uy as buildTaskShareText,Wr as buildTaskboxTheme,fs as canAssignBugManager,Qr as canClaimTaskItem,ht as canEditTaskItem,Xr as canViewTaskItem,Zr as canVolunteerTaskItem,kl as countTaskRelations,Tc as countWorkdays,ff as createTaskboxTheme,Sc as daysLeftUntil,Ji as defaultTaskBoxFormValues,ea as defaultTaskboxUiStateValues,am as filterFilesWithinLimit,aw as formatConfirmTime,kc as formatHours,at as formatKoreanDate,Go as formatKoreanDateTime,Ho as formatSprintOptionLabel,ns as getBugDeviceName,ts as getBugReproName,$r as getBugResolutionName,Tf as getBugStatusOption,dA as getDefaultDateRange,Tr as getEventDisplayStatusOption,xI as getNoDueStatusRank,im as getNoticeAckInfo,rs as getNoticeStatusOption,BR as getNoticeTargetDisplay,zn as getProjectIconAnchorComponent,Ve as getProjectIconComponent,ya as getReminderLabel,Ta as getReminderOptions,is as getStatusOptionsForTask,wL as getTabHeaderConfig,xa as getTaskBoxColumnDefs,cs as getTaskBoxGridTemplate,HS as getTaskBoxTabKind,ci as getTaskConfirmInfo,Do as getTaskDisplayStatusOption,Ur as getTaskStatusOption,$n as groupGoogleEventsByDate,Il as groupSeqFromTabKey,S2 as hasRelation,_m as hasTaskRelations,Hk as htmlToPlainText,t0 as isCustomTabKey,ps as isOpenPoolTaskItem,aa as isPastEvent,Kr as isTaskDone,fI as isWaitingTask,Vi as monthsAgoDate,fo as narrowOrderSx,Vz as nowDateTimeString,vh as parseEstimatedHours,Sn as relationsOf,An as resolveTaskStatusOptions,ta as resolveTaskboxTheme,rr as shareTaskText,yc as sumRemainingHours,Ai as summarizeNoticeTargets,Xz as tabKeyFromGroupSeq,Yr as taskVisibilityOf,Dn as toYmd,Vr as toggleLabelKey,fr as useBuildFileUrl,Xc as useTaskAttachmentUploadMeta,Ao as useTaskboxConfig,cf as useTaskboxForm,te as useTaskboxTheme,bt as useTaskboxUiState,xr as useUploadMaxMb};
|
|
14
14
|
//# sourceMappingURL=index.esm.js.map
|