@ehfuse/taskbox 0.5.144 → 0.5.145
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 +1 -1
- package/dist/index.esm.js.map +2 -2
- package/dist/index.js +1 -1
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -10,5 +10,5 @@
|
|
|
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 zf(e){let o=[`[\uC5C5\uBB34] ${e.title}`],t=Rt(e.start_date),n=Rt(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=Xo(e).name;r&&o.push(`\uC0C1\uD0DC: ${r}`);let i=Rf(e.content);i&&o.push("",i);let l=String(e.note??"").trim();return l&&o.push("",`\uBE44\uACE0: ${l}`),o.join(`
|
|
13
|
-
`)}function Pf(e){navigator.clipboard.writeText(e).then(()=>(0,Ia.SuccessAlert)("\uC5C5\uBB34 \uB0B4\uC6A9\uC744 \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>(0,Ia.InfoAlert)("\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=zf(e);if(o&&typeof navigator.share=="function"){navigator.share({text:t}).catch(n=>{n?.name!=="AbortError"&&Pf(t)});return}Pf(t)}var ze=require("react/jsx-runtime");function rs({task:e,myAccountSeq:o=0,onToggleCompleted:t,onChangeTitle:n,onChangeIcon:r,onChangeIconColor:i,onClose:l,appBarMode:s=!1,activityItems:p,activityLoading:c,onLoadActivity:d,onPrint:g}){let f=Ke(),[m,x]=(0,_a.useState)(!1),[O,v]=(0,_a.useState)(null),[h,b]=(0,_a.useState)(null),w=Un(e.icon||(e.is_notice?Yo:e.is_event?"event":Ge)),B=!!e.is_notice,P=!!e.is_event,S=B&&o>0&&(e.author_account_seq??0)===o,D=!Vt(e,o),R=!P&&(B?S:(e.author_account_seq??0)===o||(e.manager_account_seq??0)===o);return(0,ze.jsxs)(ze.Fragment,{children:[(0,ze.jsxs)(wo.Box,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1.5,flexShrink:0},children:[s&&l?(0,ze.jsx)(wo.IconButton,{"aria-label":"\uB4A4\uB85C",onClick:l,sx:{color:"#37352f",ml:-1},children:(0,ze.jsx)(Af.default,{})}):null,R&&!s?(0,ze.jsx)(wo.Tooltip,{title:e.completed&&e.completed_by?`${e.completed_by} \xB7 ${Ct(e.completed_time)} \uC644\uB8CC`:e.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC",arrow:!0,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:(0,ze.jsx)(wo.Checkbox,{checked:e.completed,icon:(0,ze.jsx)(Hf.default,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:(0,ze.jsx)(Ff.default,{sx:{fontSize:22,color:"#2f80ed"}}),onChange:(I,E)=>t(e.seq,E),sx:{p:0}})}):null,s?null:(0,ze.jsx)(wo.Tooltip,{title:D?"":"\uC544\uC774\uCF58 \uBCC0\uACBD",arrow:!0,children:(0,ze.jsx)(wo.IconButton,{size:"small",onClick:D?void 0:I=>b(I.currentTarget),sx:{color:e.icon_color||(B?"#e5484d":"#1e3a8a")},children:(0,ze.jsx)(w,{sx:{fontSize:20}})})}),O!==null?(0,ze.jsx)(wo.Box,{component:"input",autoFocus:!0,spellCheck:!1,value:O,onChange:I=>v(I.target.value),onBlur:()=>{O.trim()&&O.trim()!==e.title&&n(e.seq,O.trim()),v(null)},onKeyDown:I=>{I.key==="Enter"&&I.target.blur(),I.key==="Escape"&&v(null)},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:18,fontWeight:500,color:"#37352f",p:0,m:0}}):s?(0,ze.jsx)(wo.Box,{sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:B?"\uACF5\uC9C0":P?"\uC77C\uC815":e.is_bug?"\uC624\uB958":"\uC5C5\uBB34"}):(0,ze.jsx)(wo.Box,{onClick:D?void 0:()=>v(e.title),sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",cursor:D?"default":"text",textDecoration:e.completed?"line-through":"none"},children:e.title}),d?(0,ze.jsx)(wo.Tooltip,{title:"\uD65C\uB3D9",arrow:!0,children:(0,ze.jsx)(wo.IconButton,{"aria-label":"\uD65C\uB3D9",onClick:()=>x(!0),sx:{color:"#6b7280"},children:(0,ze.jsx)(Wf.default,{sx:{fontSize:20}})})}):null,(0,ze.jsx)(wo.Tooltip,{title:f?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",arrow:!0,children:(0,ze.jsx)(wo.IconButton,{"aria-label":f?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",onClick:()=>rr(e,f),sx:{color:"#6b7280"},children:f?(0,ze.jsx)(Lf.default,{sx:{fontSize:20}}):(0,ze.jsx)(Nf.default,{sx:{fontSize:20}})})}),g?(0,ze.jsx)(wo.Tooltip,{title:"\uC778\uC1C4",arrow:!0,children:(0,ze.jsx)(wo.IconButton,{"aria-label":"\uC778\uC1C4",onClick:()=>g(e),sx:{color:"#6b7280"},children:(0,ze.jsx)($f.default,{sx:{fontSize:20}})})}):null,l&&!s?(0,ze.jsx)(wo.IconButton,{"aria-label":"\uB2EB\uAE30",onClick:l,sx:{color:"#6b7280"},children:(0,ze.jsx)(qf.default,{})}):null]}),(0,ze.jsx)(er,{anchorEl:h,value:e.icon||(B?Yo:""),color:e.icon_color||(B?"#e5484d":"#1e3a8a"),onSelect:I=>r(e.seq,I),onSelectColor:I=>i?.(e.seq,I),onClose:()=>b(null)}),(0,ze.jsx)(Bi,{open:m,taskSeq:e.seq,items:p,loading:c,onLoad:d,onClose:()=>x(!1)})]})}var en=require("react"),ce=require("@mui/material"),Zf=a(require("@mui/icons-material/ExpandLess"),1),Jf=a(require("@mui/icons-material/ExpandMore"),1),ex=a(require("@mui/icons-material/ConfirmationNumberOutlined"),1),ox=a(require("@mui/icons-material/Check"),1),tx=a(require("@mui/icons-material/DirectionsRunOutlined"),1),nx=a(require("@mui/icons-material/SpeedOutlined"),1),Ma=a(require("@mui/icons-material/CheckCircle"),1),rx=a(require("@mui/icons-material/CheckCircleOutlineOutlined"),1),Ea=a(require("@mui/icons-material/CheckCircleOutlined"),1),cs=a(require("@mui/icons-material/AccessTimeOutlined"),1),ix=a(require("@mui/icons-material/AutorenewOutlined"),1),ax=a(require("@mui/icons-material/LabelOutlined"),1),lx=a(require("@mui/icons-material/PersonOutlineOutlined"),1),sx=a(require("@mui/icons-material/SubjectOutlined"),1),cx=a(require("@mui/icons-material/StickyNote2Outlined"),1),mx=a(require("@mui/icons-material/PanToolAltOutlined"),1);var Kf=require("react"),Uf=require("@ehfuse/mui-form-controls"),Vf=require("react/jsx-runtime");function is({value:e,onCommit:o,onDraftChange:t,readOnly:n=!1}){let[r,i]=(0,Kf.useState)(null);return(0,Vf.jsx)(Uf.TextField,{value:r??e,placeholder:n?"":"\uBE44\uACE0 \uC785\uB825",fullWidth:!0,size:"medium",slotProps:{input:{readOnly:n}},onChange:l=>{i(l.target.value),t?.(l.target.value)},onBlur:()=>{r!==null&&r.trim()!==e&&o(r),i(null)},onKeyDown:l=>{l.key==="Enter"&&l.target.blur(),l.key==="Escape"&&i(null)},sx:{mt:1}})}var An=require("react"),To=require("@mui/material"),jf=a(require("@mui/icons-material/AccountTreeOutlined"),1),Yf=a(require("@mui/icons-material/Add"),1),Xf=a(require("@mui/icons-material/Close"),1),Qf=a(require("@mui/icons-material/NextPlanOutlined"),1);function qn(e){return e.relations??[]}function eh(e,o,t){return qn(e).some(n=>n.type===t&&n.task_seq===o.seq)||qn(o).some(n=>n.type===t&&n.task_seq===e.seq)}function Gf(e){return`${e.created_time??""}|${String(e.seq).padStart(12,"0")}`}function wa(e,o){let t=new Map(o.map(m=>[m.seq,m]));t.set(e.seq,e);let n=new Map,r=(m,x)=>{n.has(m)||n.set(m,new Set),n.has(x)||n.set(x,new Set),n.get(m).add(x),n.get(x).add(m)};for(let m of t.values())for(let x of qn(m))x.type==="follow_up"&&t.has(x.task_seq)&&r(m.seq,x.task_seq);let i=new Set([e.seq]),l=[e.seq];for(;l.length>0;){let m=l.shift();for(let x of n.get(m)??[])i.has(x)||(i.add(x),l.push(x))}let s=[...i].map(m=>t.get(m)).filter(m=>!!m).sort((m,x)=>Gf(m).localeCompare(Gf(x))),p=new Set;for(let m of qn(e))m.type==="related"&&p.add(m.task_seq);for(let m of t.values())m.seq!==e.seq&&qn(m).some(x=>x.type==="related"&&x.task_seq===e.seq)&&p.add(m.seq);let c=[...p].map(m=>t.get(m)).filter(m=>m!==void 0&&m.seq!==e.seq),d=[...t.values()].filter(m=>m.seq!==e.seq&&qn(m).some(x=>x.type==="duplicate_of"&&x.task_seq===e.seq)),g=qn(e).find(m=>m.type==="duplicate_of")?.task_seq,f=g?t.get(g)??null:null;return{lineage:s,related:c,duplicates:d,duplicateOf:f}}function Da(e,o){let t=wa(e,o);return(t.lineage.length>=2?t.lineage.length-1:0)+t.related.length+t.duplicates.length+(t.duplicateOf?1:0)}function as(e,o){return Da(e,o)>0}var he=require("react/jsx-runtime");function ls({item:e,caption:o,onOpen:t,onUnlink:n}){let r=co(e.icon||Ge);return(0,he.jsxs)(To.Box,{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?(0,he.jsx)(To.Box,{component:"span",sx:{flexShrink:0,px:.6,py:.1,borderRadius:.75,fontSize:11.5,fontWeight:500,color:"#8a6d1d",bgcolor:"#faf1d7"},children:o}):null,r?(0,he.jsx)(r,{sx:{fontSize:16,flexShrink:0,color:e.icon_color||"#1e3a8a"}}):null,(0,he.jsxs)(To.Box,{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]}),(0,he.jsx)(Ye,{option:Xo(e),small:!0}),n?(0,he.jsx)(To.IconButton,{className:"taskbox-relation-unlink",size:"small","aria-label":"\uC5F0\uACB0 \uD574\uC81C",onClick:n,sx:{opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:(0,he.jsx)(Xf.default,{sx:{fontSize:15}})}):null]})}function ss({task:e,tasks:o,readOnly:t=!1,onOpenTask:n,onLink:r,onUnlink:i,onCreateFollowUp:l}){let[s,p]=(0,An.useState)(!1),[c,d]=(0,An.useState)(null),[g,f]=(0,An.useState)(null),m=(0,An.useMemo)(()=>wa(e,o),[e,o]),x=m.lineage.length>=2,O=(0,An.useMemo)(()=>Da(e,o),[e,o]),v=(0,An.useMemo)(()=>{let b=new Set;for(let w of m.lineage)b.add(w.seq);for(let w of m.related)b.add(w.seq);for(let w of m.duplicates)b.add(w.seq);return m.duplicateOf&&b.add(m.duplicateOf.seq),[...b]},[m]),h=(b,w,B)=>{f({anchorEl:b,targetSeq:w,type:B})};return(0,he.jsxs)(kt,{icon:(0,he.jsx)(jf.default,{sx:{fontSize:19,display:"block"}}),title:(0,he.jsxs)(he.Fragment,{children:["\uAD00\uB828 \uC5C5\uBB34",O>0?(0,he.jsx)(To.Box,{component:"span",sx:{fontSize:12.5,color:"#9a9a97"},children:O}):null]}),titleExtra:t?null:(0,he.jsxs)(To.Box,{sx:{ml:"auto",display:"flex",alignItems:"center",gap:.5},children:[l?(0,he.jsx)(To.Button,{size:"small",color:"inherit",startIcon:(0,he.jsx)(Qf.default,{sx:{fontSize:16}}),onClick:b=>d(b.currentTarget),sx:{minWidth:0,px:1,fontSize:12.5,color:"#787774"},children:"\uD6C4\uC18D \uC5C5\uBB34"}):null,r?(0,he.jsx)(To.Button,{size:"small",color:"inherit",startIcon:(0,he.jsx)(Yf.default,{sx:{fontSize:16}}),onClick:()=>p(!0),sx:{minWidth:0,px:1,fontSize:12.5,color:"#787774"},children:"\uC5F0\uACB0"}):null]}),children:[(0,he.jsxs)(To.Box,{sx:{display:"flex",flexDirection:"column",mt:.5,pl:3.25},children:[x?(0,he.jsx)(To.Box,{sx:{mb:m.related.length||m.duplicates.length||m.duplicateOf?1:0},children:m.lineage.map((b,w)=>{let B=b.seq===e.seq,P=w===m.lineage.length-1;return(0,he.jsxs)(To.Box,{sx:{display:"flex",gap:1},children:[(0,he.jsxs)(To.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",width:14,flexShrink:0,pt:1.1},children:[(0,he.jsx)(To.Box,{sx:{width:B?9:7,height:B?9:7,borderRadius:"50%",bgcolor:B?"#2f80ed":b.completed?"#9a9a97":"#c9c8c5",flexShrink:0}}),P?null:(0,he.jsx)(To.Box,{sx:{width:"2px",flex:1,bgcolor:"#e6e6e3"}})]}),(0,he.jsxs)(To.Box,{sx:{flex:1,minWidth:0,pb:P?0:.5},children:[(0,he.jsxs)(To.Box,{sx:{display:"flex",alignItems:"center",gap:.75},children:[(0,he.jsxs)(To.Box,{component:"span",onClick:!B&&n?()=>n(b.seq):void 0,sx:{minWidth:0,fontSize:14,fontWeight:B?600:400,color:B?"#2f80ed":b.completed?"#9a9a97":"#37352f",textDecoration:b.completed?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...!B&&n?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}},children:[b.ticket_no?`${b.ticket_no} `:"",b.title]}),(0,he.jsx)(Ye,{option:Xo(b),small:!0})]}),(0,he.jsx)(To.Box,{sx:{fontSize:12,color:"#9a9a97"},children:b.completed&&b.completed_time?`${b.completed_time} \uC644\uB8CC`:b.created_time??""})]})]},b.seq)})}):null,m.duplicateOf?(0,he.jsx)(ls,{item:m.duplicateOf,caption:"\uC6D0\uBCF8",onOpen:n?()=>n(m.duplicateOf.seq):void 0,onUnlink:!t&&i?b=>h(b.currentTarget,m.duplicateOf.seq,"duplicate_of"):void 0}):null,m.duplicates.map(b=>(0,he.jsx)(ls,{item:b,caption:"\uC911\uBCF5",onOpen:n?()=>n(b.seq):void 0,onUnlink:!t&&i?w=>h(w.currentTarget,b.seq,"duplicate_of"):void 0},`dup-${b.seq}`)),m.related.map(b=>(0,he.jsx)(ls,{item:b,onOpen:n?()=>n(b.seq):void 0,onUnlink:!t&&i?w=>h(w.currentTarget,b.seq,"related"):void 0},`rel-${b.seq}`)),O===0?(0,he.jsx)(To.Box,{sx:{px:1.25,py:.75,fontSize:13.5,color:"#9a9a97"},children:"\uC5F0\uACB0\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):null]}),r?(0,he.jsx)(gi,{open:s,task:e,tasks:o,excludeSeqs:v,onClose:()=>p(!1),onSubmit:(b,w)=>r(e.seq,b,w)}):null,(0,he.jsx)(uo,{open:!!c,anchorEl:c,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:()=>d(null),onConfirm:()=>{l?.(e.seq),d(null)}}),(0,he.jsx)(uo,{open:!!g,anchorEl:g?.anchorEl??null,title:"\uC774 \uC5C5\uBB34\uC640\uC758 \uC5F0\uACB0\uC744 \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uD574\uC81C",onCancel:()=>f(null),onConfirm:()=>{g&&i?.(e.seq,g.targetSeq,g.type),f(null)}})]})}var _=require("react/jsx-runtime");function qr({label:e="\uBE44\uC5B4 \uC788\uC74C"}){return(0,_.jsx)(ce.Box,{component:"span",sx:{color:"#9a9a97"},children:e})}function ms({task:e,customTabs:o,statusOptions:t,avatarSrcByName:n,onChangeStatus:r,onChangeLabels:i,onAddLabelOption:l,onChangeProject:s,onAddProject:p,onChangeDate:c,onChangeReminder:d,onMemberEdit:g,onChangePriority:f,onChangeEstimatedTime:m,onChangeEventTime:x,onChangeEventPlace:O,onChangeEventAddress:v,onChangeNote:h,onChangeContent:b,onChangeContentHeight:w,onAddChecklistItem:B,onToggleChecklistItem:P,onRemoveChecklistItem:S,onUpdateChecklistItem:D,onConvertChecklistToTask:R,onOpenChecklistTask:I,onLinkChecklistTask:E,resolveChecklistTask:H,relatedTasksPool:u,onOpenRelatedTask:y,onLinkRelatedTask:k,onUnlinkRelatedTask:T,onCreateFollowUpTask:q,onAddAttachments:F,onRemoveAttachment:ge,onPreview:xe,onDownload:we,onUpdateComment:ke,onRemoveComment:Ie,onToggleCommentReaction:De,currentUserName:Te="",myAccountSeq:ie=0,noticeAdmin:Ze=!1,hideProject:ro=!1,hideLabel:G=!1,showTitle:Y=!1,onChangeTitle:re,onToggleCompleted:C,onChangeIcon:W,onChangeIconColor:oe,employees:X=[],onAckConfirm:We,onRequestConfirm:io,onChangeBugField:bo,sprints:So=[],sprintProject:je=!1,hideSprint:Io=!1,onChangeSprint:ee,onChangeStoryPoints:M,onChangeResolution:Le,onClaimTask:K,onVerifyBug:Ae}){let[Bo,Go]=(0,en.useState)(null),[Cn,Wt]=(0,en.useState)(null),[xt,ln]=(0,en.useState)(null),[$t,yt]=(0,en.useState)(null),[ar,Fe]=(0,en.useState)(!1),L={[Dt]:ar?{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"}},[j,de]=(0,en.useState)(null),[be,_e]=(0,en.useState)(null),[so,Oo]=(0,en.useState)(null),[zo,No]=(0,en.useState)(null),$e=!!e.is_notice,ae=!!e.is_event,jo=!!e.is_bug,tt=!!K&&Qr(e,ie),vn=!!K&&Zr(e,ie),Ot=!!Ae&&jo&&!!e.completed&&ie>0&&(e.author_account_seq??0)===ie&&!(e.acks??[]).some(A=>A.account_seq===ie),qo=!Vt(e,ie),St=!e.is_event&&(e.is_notice?ie>0&&(e.author_account_seq??0)===ie:(e.author_account_seq??0)===ie||(e.manager_account_seq??0)===ie),$n=Un(e.icon||(e.is_notice?Yo:e.is_event?"event":Ge)),Nr=$e?!Xr(e,ie):qo,lr=tt||vn?(0,_.jsxs)(jn,{onClick:A=>No(A.currentTarget),children:[(0,_.jsx)(mx.default,{sx:{fontSize:16,mr:.5}}),"\uAC00\uC838\uAC00\uAE30"]}):null,Fr=$e?yi(e,X):"",gt=$e?Ql(e,X,ie):null,Ro=!$e&&!ae?ii(e,ie):null,sr=!!(Ro&&Ro.total>0||$e&>);return(0,_.jsxs)(_.Fragment,{children:[Y?(0,_.jsxs)(ce.Box,{sx:{px:2,pt:2,pb:.5,display:"flex",alignItems:"flex-start",gap:1},children:[St?(0,_.jsx)(ce.Checkbox,{checked:e.completed,icon:(0,_.jsx)(rx.default,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:(0,_.jsx)(Ma.default,{sx:{fontSize:22,color:"#2f80ed"}}),onChange:(A,cr)=>{xt||ln({anchorEl:A.currentTarget,nextCompleted:cr})},sx:{p:0,mt:.25}}):null,(0,_.jsx)(ce.IconButton,{size:"small","aria-label":"\uC544\uC774\uCF58 \uBCC0\uACBD",onClick:qo?void 0:A=>Wt(A.currentTarget),sx:{p:0,mt:.25,color:e.icon_color||($e?"#e5484d":"#1e3a8a")},children:(0,_.jsx)($n,{sx:{fontSize:20}})}),(0,_.jsx)(ce.Box,{sx:{flex:1,minWidth:0},children:Bo!==null?(0,_.jsx)(ce.Box,{component:"input",autoFocus:!0,spellCheck:!1,value:Bo,onChange:A=>Go(A.target.value),onBlur:()=>{Bo.trim()&&Bo.trim()!==e.title&&re(e.seq,Bo.trim()),Go(null)},onKeyDown:A=>{A.key==="Enter"&&A.target.blur(),A.key==="Escape"&&Go(null)},sx:{width:"100%",border:"none",outline:"none",font:"inherit",fontSize:19,fontWeight:600,color:"#37352f",p:0,m:0}}):(0,_.jsx)(ce.Box,{onClick:()=>Go(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})}),(0,_.jsx)(uo,{open:!!xt,anchorEl:xt?.anchorEl??null,title:xt?.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:xt?.nextCompleted?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>ln(null),onConfirm:()=>{xt&&C(e.seq,xt.nextCompleted),ln(null)}}),(0,_.jsx)(er,{anchorEl:Cn,value:e.icon||($e?Yo:""),color:e.icon_color||($e?"#e5484d":"#1e3a8a"),onSelect:A=>W(e.seq,A),onSelectColor:A=>oe?.(e.seq,A),onClose:()=>Wt(null)})]}):null,(0,_.jsxs)(ce.Box,{sx:{py:1.5,display:"flex",flexDirection:"column",gap:0,[Dt]:{pb:0,"& > :last-child":{mb:0}}},children:[(0,_.jsx)(pi,{hideProject:ro,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:!ae,notice:$e,event:ae,readOnly:qo,targetSummary:Fr,onChangeProject:A=>s(e.seq,A),onAddProject:p,onChangeStartDate:A=>c(e.seq,"start_date",A),onChangeDueDate:A=>c(e.seq,"due_date",A),onChangeReminder:A=>d(e.seq,A),onChangePriority:A=>f(e.seq,A),onChangeEstimatedTime:A=>m(e.seq,A),onChangeEventTime:A=>x?.(e.seq,A),onChangeEventPlace:A=>O?.(e.seq,A),onChangeEventAddress:A=>v?.(e.seq,A),onMemberEdit:A=>g(e,A),narrowCollapsedSx:L,reminderLocked:e.completed,managerAction:lr,leading:(0,_.jsxs)(_.Fragment,{children:[Ot||lr&&($e||ae)?(0,_.jsxs)(ce.Box,{sx:{gridColumn:"1 / -1",display:"flex",justifyContent:"flex-start",gap:2,px:2,py:1.5},children:[$e||ae?lr:null,Ot?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(ce.Button,{variant:"contained",size:"large",onClick:()=>Ae?.(e.seq,!0),sx:{bgcolor:"#2f80ed"},children:"\uAC80\uC99D\uC644\uB8CC"}),(0,_.jsx)(ce.Button,{variant:"outlined",size:"large",color:"error",onClick:()=>Ae?.(e.seq,!1),children:"\uC7AC\uC624\uD508"})]}):null]}):null,jo&&e.ticket_no?(0,_.jsx)(Ce,{icon:(0,_.jsx)(ex.default,{sx:{fontSize:17}}),label:"\uD2F0\uCF13",children:(0,_.jsx)(ce.Box,{component:"span",sx:{fontVariantNumeric:"tabular-nums"},children:e.ticket_no})}):null,ae?null:(0,_.jsx)(ce.Box,{sx:jo&&e.ticket_no||sr?void 0:{gridColumn:"1 / -1"},children:(0,_.jsx)(Ce,{icon:(0,_.jsx)(ix.default,{sx:{fontSize:17}}),label:"\uC0C1\uD0DC",onClick:qo||e.completed?void 0:A=>de(A),children:(0,_.jsx)(Ye,{option:Xo(e)})})}),Ro&&Ro.total>0?(0,_.jsx)(ce.Box,{children:(0,_.jsx)(Ce,{icon:(0,_.jsx)(Ea.default,{sx:{fontSize:17}}),label:"\uD655\uC778",children:Ro.canConfirm?(0,_.jsx)(ce.Button,{size:"small",variant:"contained",onClick:()=>We?.(e.seq),sx:{py:.1,px:1.25,minWidth:0,color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}},children:"\uD655\uC778"}):(0,_.jsxs)(ce.Button,{size:"small",variant:"outlined",color:"inherit",startIcon:Ro.myTime?(0,_.jsx)(Ma.default,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:A=>yt({anchorEl:A.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,$e&>?(0,_.jsx)(ce.Box,{children:(0,_.jsx)(Ce,{icon:(0,_.jsx)(Ea.default,{sx:{fontSize:17}}),label:"\uD655\uC778",children:(0,_.jsx)(ce.Box,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,minWidth:0},children:gt.canAck?(0,_.jsx)(ce.Button,{size:"small",variant:"contained",onClick:()=>We?.(e.seq),sx:{py:.1,px:1.25,minWidth:0,color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}},children:"\uD655\uC778"}):(0,_.jsx)(ce.Button,{size:"small",variant:"outlined",color:"inherit",startIcon:gt.acked?(0,_.jsx)(Ma.default,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:A=>yt({anchorEl:A.currentTarget,open:!0}),sx:{py:.1,px:1.25,minWidth:0,fontSize:13,color:"text.primary",borderColor:"#d5d8dc",bgcolor:"#fff",whiteSpace:"nowrap"},children:gt.total>0&>.count>=gt.total?"\uC644\uB8CC":(0,_.jsxs)(_.Fragment,{children:[gt.count,(0,_.jsx)(ce.Box,{component:"span",sx:{mx:.4},children:"/"}),gt.total]})})})})}):null,je&&!Io&&!ae&&!$e?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(Ce,{icon:(0,_.jsx)(tx.default,{sx:{fontSize:17}}),label:"\uBAA9\uD45C",onClick:qo?void 0:A=>_e(A),children:(e.sprint_seq??0)>0?So.find(A=>A.seq===e.sprint_seq)?.name??"\uC0AD\uC81C\uB41C \uC2A4\uD504\uB9B0\uD2B8":(0,_.jsx)(qr,{label:"\uBBF8\uBC30\uC815"})}),(0,_.jsx)(Ce,{icon:(0,_.jsx)(nx.default,{sx:{fontSize:17}}),label:"\uD3EC\uC778\uD2B8",children:(0,_.jsx)(Qt,{value:(e.story_points??0)>0?String(e.story_points):"",placeholder:"\uBBF8\uCD94\uC815",readOnly:qo,onCommit:A=>M?.(e.seq,Number(A.replace(/[^0-9.]/g,""))||0)})})]}):null,ae||G?null:(0,_.jsx)(ce.Box,{sx:[{gridColumn:"1 / -1"},L??null],children:(0,_.jsx)(Ce,{icon:(0,_.jsx)(ax.default,{sx:{fontSize:17}}),label:"\uB77C\uBCA8",onClick:qo?void 0:A=>Oo(A),children:(e.label_keys??[]).length>0?(0,_.jsx)(cn,{labelKeys:e.label_keys??[],labelOptions:t}):(0,_.jsx)(qr,{})})})]}),trailing:(0,_.jsxs)(_.Fragment,{children:[jo?(0,_.jsx)(fi,{values:{repro:e.bug_repro??"",device:e.bug_device??"",where:e.bug_where??"",version:e.bug_version??"",resolution:e.resolution??""},readOnly:qo,showResolution:!!e.completed,onChangeRepro:A=>bo?.(e.seq,"bug_repro",A),onChangeDevice:A=>bo?.(e.seq,"bug_device",A),onChangeWhere:A=>bo?.(e.seq,"bug_where",A),onChangeVersion:A=>bo?.(e.seq,"bug_version",A),onChangeResolution:A=>Le?.(e.seq,A)}):null,(0,_.jsx)(Ce,{icon:(0,_.jsx)(lx.default,{sx:{fontSize:17}}),label:"\uC791\uC131\uC790",sx:[Ao(9),L??null],children:e.created_by?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(Zo,{names:[e.created_by],size:20,avatarSrcByName:n}),e.created_by]}):(0,_.jsx)(qr,{})}),(0,_.jsx)(Ce,{icon:(0,_.jsx)(cs.default,{sx:{fontSize:17}}),label:"\uC791\uC131\uC2DC\uAC04",sx:[Ao(11),L??null],children:e.created_time?Ct(e.created_time):(0,_.jsx)(qr,{})}),e.completed?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(Ce,{icon:(0,_.jsx)(Ea.default,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC790",sx:[Ao(10),L??null],children:e.completed_by?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(Zo,{names:[e.completed_by],size:20,avatarSrcByName:n}),e.completed_by]}):(0,_.jsx)(qr,{})}),(0,_.jsx)(Ce,{icon:(0,_.jsx)(cs.default,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC2DC\uAC04",sx:[Ao(12),L??null],children:e.completed_time?Ct(e.completed_time):(0,_.jsx)(qr,{})})]}):null]})}),(0,_.jsxs)(ce.Box,{sx:{display:"none",[Dt]:{display:"block",mt:1.5,mb:0}},children:[(0,_.jsx)(ce.Divider,{sx:{borderColor:"#e6e6e3"}}),(0,_.jsx)(ce.ButtonBase,{onClick:()=>Fe(A=>!A),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:ar?(0,_.jsxs)(_.Fragment,{children:["\uC811\uAE30 ",(0,_.jsx)(Zf.default,{sx:{fontSize:18}})]}):(0,_.jsxs)(_.Fragment,{children:["\uC815\uBCF4 \uB354\uBCF4\uAE30 ",(0,_.jsx)(Jf.default,{sx:{fontSize:18}})]})})]}),(0,_.jsxs)(ce.Box,{children:[(0,_.jsx)(ce.Divider,{sx:{my:1.5,borderColor:"#e6e6e3",[Dt]:{mt:0,mb:1.25}}}),(0,_.jsx)(kt,{icon:(0,_.jsx)(sx.default,{sx:{fontSize:18,display:"block"}}),title:"\uB0B4\uC6A9",children:(0,_.jsx)(ce.Box,{sx:{userSelect:"text"},children:(0,_.jsx)(xi,{syncKey:e.seq,value:e.content??"",height:e.content_height??0,onChangeHeight:w?A=>w(e.seq,A):void 0,readOnly:qo,onChange:A=>b(e.seq,A)})})}),e.is_bug?null:(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(ce.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,_.jsx)(kt,{icon:(0,_.jsx)(cx.default,{sx:{fontSize:18,display:"block"}}),title:"\uBE44\uACE0",children:(0,_.jsx)(ce.Box,{sx:{userSelect:"text"},children:(0,_.jsx)(is,{value:e.note,readOnly:Nr,onCommit:A=>h(e.seq,A)})})})]}),ae?null:(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(ce.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,_.jsx)(bi,{taskSeq:e.seq,checklist:e.checklist??[],removeLocked:Nr,onAdd:B,onToggle:P,onRemove:S,onUpdate:D,onConvertToTask:R,onOpenLinkedTask:I,resolveLinkedTask:H,linkCandidates:u,linkBaseTask:e,onLinkExistingTask:E})]}),u&&!ae&&!$e&&as(e,u)?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(ce.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,_.jsx)(ss,{task:e,tasks:u,readOnly:qo,onOpenTask:y,onLink:k,onUnlink:T,onCreateFollowUp:q})]}):null,(0,_.jsx)(ce.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,_.jsx)(hi,{taskSeq:e.seq,attachments:e.attachments??[],removeLocked:Nr,onAdd:F,onRemove:ge,onPreview:xe?A=>xe({...A,taskSeq:e.seq}):void 0,onDownload:we?A=>we({...A,taskSeq:e.seq}):void 0})]}),(0,_.jsx)(ce.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,_.jsx)(ts,{taskSeq:e.seq,comments:e.comments??[],currentUserName:Te,myAccountSeq:ie,avatarSrcByName:n,onUpdate:ke,onRemove:Ie,onToggleReaction:De,onPreview:xe?A=>xe({...A,taskSeq:e.seq}):void 0,onDownload:we?A=>we({...A,taskSeq:e.seq}):void 0})]}),(0,_.jsx)(jr,{anchorEl:j,value:e.status,options:$e?gr:jo?_n:br,onSelect:A=>r(e.seq,A),onClose:()=>de(null)}),(0,_.jsx)(ce.Menu,{transitionDuration:0,anchorEl:be,open:!!be,onClose:()=>_e(null),children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...So.filter(A=>`custom-${A.group_seq}`===String(e.tab_key??"")).map(A=>({seq:A.seq,label:ht(A)}))].map(A=>(0,_.jsxs)(ce.MenuItem,{onClick:()=>{ee?.(e.seq,A.seq),_e(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[A.label,(e.sprint_seq??0)===A.seq?(0,_.jsx)(ox.default,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},A.seq))}),(0,_.jsx)(ri,{anchorEl:$t?.anchorEl??null,open:!!$t?.open,acks:e.acks??[],total:gt?.total??Ro?.total??0,avatarSrcByName:n,onRequestConfirm:io&&Ro&&Ro.count<Ro.total?()=>{io(e.seq),yt(A=>A?{...A,open:!1}:null)}:void 0,onClose:()=>yt(A=>A?{...A,open:!1}:null)}),(0,_.jsx)(Ti,{anchorEl:so,selectedKeys:e.label_keys??[],labelOptions:t,onToggle:A=>i(e.seq,Vr(e.label_keys??[],A)),onAddLabel:l,onClose:()=>Oo(null)}),(0,_.jsx)(uo,{open:!!zo,anchorEl:zo,title:tt?"\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:()=>No(null),onConfirm:()=>{K?.(e.seq),No(null)}})]})}var vo=require("react/jsx-runtime");function oh(){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 th({open:e,task:o,onClose:t,onAddComment:n,onSaveFields:r,myAccountSeq:i=0,onToggleCompleted:l,onChangeTitle:s,onChangeIcon:p,onChangeIconColor:c,activityItems:d,activityLoading:g,onLoadActivity:f,onPrint:m,...x}){let O=Ke(),v=(0,hn.useRef)(null);o&&(v.current=o);let h=o??v.current,[b,w]=(0,hn.useState)(!1),[B,P]=(0,hn.useState)({}),S=Object.keys(B).length>0;(0,hn.useEffect)(()=>{P({})},[o?.seq,e]);let D=(0,hn.useRef)(null);if((0,hn.useEffect)(()=>{D.current?.scrollTo({top:0})},[o?.seq]),!h)return null;let R=O&&S?{...h,...B}:h,I=(k,T)=>{O?P(q=>({...q,...k})):T()},E=()=>{let k=B;P({});let T=h.seq,q=k.title===void 0?void 0:String(k.title).trim();if(r){let F={...k};q!==void 0&&(q?F.title=q:delete F.title),Object.keys(F).length>0&&r(T,F),(0,us.SuccessAlert)({message:"\uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",position:"center"});return}q&&s(T,q),k.icon!==void 0&&p(T,String(k.icon)),k.icon_color!==void 0&&c?.(T,String(k.icon_color)),k.status!==void 0&&x.onChangeStatus(T,k.status),k.label_keys!==void 0&&x.onChangeLabels(T,k.label_keys??[]),k.tab_key!==void 0&&x.onChangeProject(T,String(k.tab_key??"")),k.start_date!==void 0&&x.onChangeDate(T,"start_date",String(k.start_date??"")),k.due_date!==void 0&&x.onChangeDate(T,"due_date",String(k.due_date??"")),k.reminder!==void 0&&x.onChangeReminder(T,k.reminder),k.priority!==void 0&&x.onChangePriority(T,k.priority),k.estimated_time!==void 0&&x.onChangeEstimatedTime(T,String(k.estimated_time??"")),k.event_time!==void 0&&x.onChangeEventTime?.(T,String(k.event_time??"")),k.event_place!==void 0&&x.onChangeEventPlace?.(T,String(k.event_place??"")),k.event_address!==void 0&&x.onChangeEventAddress?.(T,String(k.event_address??"")),k.content!==void 0&&x.onChangeContent(T,String(k.content??"")),k.note!==void 0&&x.onChangeNote(T,String(k.note??"")),(0,us.SuccessAlert)({message:"\uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",position:"center"})},H={...x,onChangeStatus:(k,T)=>I({status:T},()=>x.onChangeStatus(k,T)),onChangeLabels:(k,T)=>I({label_keys:T},()=>x.onChangeLabels(k,T)),onChangeProject:(k,T)=>I({tab_key:T},()=>x.onChangeProject(k,T)),onChangeDate:(k,T,q)=>I({[T]:q},()=>x.onChangeDate(k,T,q)),onChangeReminder:(k,T)=>I({reminder:T},()=>x.onChangeReminder(k,T)),onChangePriority:(k,T)=>I({priority:T},()=>x.onChangePriority(k,T)),onChangeEstimatedTime:(k,T)=>I({estimated_time:T},()=>x.onChangeEstimatedTime(k,T)),onChangeEventTime:(k,T)=>I({event_time:T},()=>x.onChangeEventTime?.(k,T)),onChangeEventPlace:(k,T)=>I({event_place:T},()=>x.onChangeEventPlace?.(k,T)),onChangeEventAddress:(k,T)=>I({event_address:T},()=>x.onChangeEventAddress?.(k,T)),onChangeContent:(k,T)=>I({content:T},()=>x.onChangeContent(k,T)),onChangeNote:(k,T)=>I({note:T},()=>x.onChangeNote(k,T))},u=(0,vo.jsx)(ms,{...H,task:R,myAccountSeq:i,onChangeTitle:(k,T)=>I({title:T},()=>s(k,T)),onToggleCompleted:l,onChangeIcon:(k,T)=>I({icon:T},()=>p(k,T)),onChangeIconColor:(k,T)=>I({icon_color:T},()=>c?.(k,T)),showTitle:O}),y=(0,vo.jsx)(ns,{onSubmit:(k,T)=>n(R.seq,k,T)},R.seq);return O?(0,vo.jsxs)(vo.Fragment,{children:[(0,vo.jsx)(fx.FormDialog,{open:e,onClose:t,locale:"ko",fontScale:{enabled:!0,default:1.1,min:.6},title:R.is_notice?"\uACF5\uC9C0\uC0AC\uD56D":R.is_event?"\uC77C\uC815":R.is_bug?"\uC624\uB958":"\uC5C5\uBB34",titleIcons:{delete:{visible:!1},print:m?{visible:!0,color:"#6b7280",onClick:()=>m(R)}:{visible:!1},share:{visible:!1},custom:[...f?[{icon:(0,vo.jsx)(dx.default,{sx:{ml:2,color:"#6b7280"}}),tooltip:"\uD65C\uB3D9",onClick:()=>w(!0)}]:[],{icon:(0,vo.jsx)(ux.default,{sx:{ml:f?0:2,color:"#6b7280"}}),tooltip:"\uACF5\uC720\uD558\uAE30",onClick:()=>rr(R,!0)},{icon:(0,vo.jsx)(Mt.Button,{variant:"contained",size:"small",disableElevation:!0,disabled:!S,onClick:S?E: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:y},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:(0,vo.jsx)(Mt.Box,{sx:{userSelect:"none",width:"100%",minWidth:0,display:"flex",flexDirection:"column",gap:0},children:u})}]},h.seq),(0,vo.jsx)(Bi,{open:b,taskSeq:R.seq,items:d,loading:g,onLoad:f,onClose:()=>w(!1)})]}):(0,vo.jsx)(Mt.Drawer,{anchor:"right",open:e,onClose:t,disableAutoFocus:!0,disableEnforceFocus:!0,sx:{zIndex:k=>k.zIndex.modal},slotProps:{paper:{sx:{width:720,maxWidth:"100vw"}}},children:(0,vo.jsxs)(Mt.Box,{sx:{display:"flex",flexDirection:"column",height:"100%",userSelect:"none"},children:[(0,vo.jsx)(rs,{task:R,myAccountSeq:i,onToggleCompleted:l,onChangeTitle:s,onChangeIcon:p,onChangeIconColor:c,onClose:t,activityItems:d,activityLoading:g,onLoadActivity:f,onPrint:m}),(0,vo.jsx)(Mt.Divider,{sx:{borderColor:"#e6e6e3"}}),(0,vo.jsx)(Mt.Box,{sx:{flex:1,minHeight:0},children:(0,vo.jsx)(px.default,{ref:D,style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:u})}),(0,vo.jsx)(Mt.Divider,{sx:{borderColor:"#37352f"}}),(0,vo.jsx)(Mt.Box,{sx:{flexShrink:0},children:y})]})})}var on=require("react"),yo=require("@mui/material"),bx=require("@ehfuse/mui-form-dialog"),hx=a(require("@mui/icons-material/EditOutlined"),1),ds=require("@ehfuse/alerts"),kn=require("@ehfuse/mui-form-controls");var Oa="custom-";function xx(e){return e.startsWith(Oa)}function nh(e){return e>0?`${Oa}${e}`:""}function Ra(e){if(!xx(e))return 0;let o=Number(e.slice(Oa.length));return Number.isInteger(o)&&o>0?o:0}var Pe=require("react/jsx-runtime"),rh=[{value:"planning",label:"\uACC4\uD68D\uC911"},{value:"active",label:"\uC9C4\uD589\uC911"},{value:"closed",label:"\uC885\uB8CC"}];function gx(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?e.slice(5).replace("-","."):"-"}function ih({open:e,customTabs:o,sprints:t,onClose:n,onCreate:r,onUpdate:i,onChangeStatus:l,onRemove:s}){let p=o.filter(u=>u.useSprints&&!u.archived),[c,d]=(0,on.useState)(""),[g,f]=(0,on.useState)(""),[m,x]=(0,on.useState)(""),[O,v]=(0,on.useState)(""),[h,b]=(0,on.useState)(""),[w,B]=(0,on.useState)(!1),[P,S]=(0,on.useState)(0);(0,on.useEffect)(()=>{e&&(d(p.length===1?p[0].key:""),f(""),x(""),v(""),b(""),S(0))},[e]);let D=()=>{f(""),x(""),v(""),b(""),S(0)},R=u=>{S(u.seq),d(`custom-${u.group_seq}`),f(u.name),x(u.goal),v(u.start_date),b(u.end_date)},I=async()=>{let u=Ra(c);if(!u){(0,ds.ErrorAlert)("\uBAA9\uD45C\uB97C \uB9CC\uB4E4 \uD504\uB85C\uC81D\uD2B8\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return}if(!g.trim()){(0,ds.ErrorAlert)("\uBAA9\uD45C \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}B(!0);try{if(P>0){i(P,{name:g.trim(),goal:m.trim(),start_date:O,end_date:h}),D();return}await r({group_seq:u,name:g.trim(),goal:m.trim(),start_date:O,end_date:h})&&D()}finally{B(!1)}},E=new Map(o.map(u=>[Ra(u.key),u.label])),H=(0,Pe.jsx)(yo.Box,{children:p.length===0?(0,Pe.jsx)(yo.Box,{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.'}):(0,Pe.jsxs)(Pe.Fragment,{children:[(0,Pe.jsxs)(yo.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2.5,mt:1},children:[(0,Pe.jsx)(kn.LabelSelect,{label:"\uD504\uB85C\uC81D\uD2B8",size:"medium",value:c,options:p.map(u=>({value:u.key,label:u.label})),onChange:u=>d(String(u.target.value)),disabled:P>0}),(0,Pe.jsx)(kn.ClearTextField,{label:"\uBAA9\uD45C \uC774\uB984",size:"medium",placeholder:"\uC608: 8\uC6D4 2\uC8FC\uCC28",value:g,onChange:u=>f(u.target.value)}),(0,Pe.jsx)(kn.DateTextField,{size:"medium",label:"\uC2DC\uC791\uC77C",value:O,onChange:u=>v(u.target.value)}),(0,Pe.jsx)(kn.DateTextField,{size:"medium",label:"\uC885\uB8CC\uC77C",value:h,onChange:u=>b(u.target.value)}),(0,Pe.jsx)(kn.ClearTextField,{label:"\uC124\uBA85",size:"medium",placeholder:"\uC120\uD0DD \uC785\uB825",value:m,onChange:u=>x(u.target.value),sx:{gridColumn:"1 / -1"}})]}),(0,Pe.jsxs)(yo.Box,{sx:{mt:1.5,display:"flex",justifyContent:"flex-end",gap:1},children:[P>0?(0,Pe.jsx)(yo.Button,{color:"inherit",onClick:D,disabled:w,children:"\uCDE8\uC18C"}):null,(0,Pe.jsx)(yo.Button,{variant:"contained",onClick:()=>{I()},disabled:w,children:P>0?"\uBAA9\uD45C \uC800\uC7A5":"\uBAA9\uD45C \uB9CC\uB4E4\uAE30"})]}),(0,Pe.jsx)(yo.Box,{sx:{mt:2,borderTop:"1px solid #e6e6e3"},children:t.length===0?(0,Pe.jsx)(yo.Box,{sx:{py:3,textAlign:"center",fontSize:14,color:"#9a9a97"},children:"\uB4F1\uB85D\uB41C \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):t.map(u=>(0,Pe.jsxs)(yo.Box,{sx:{display:"flex",flexDirection:"column",gap:1,py:1.75,borderBottom:"1px solid #f0efed"},children:[(0,Pe.jsxs)(yo.Box,{sx:{minWidth:0},children:[(0,Pe.jsxs)(yo.Box,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[(0,Pe.jsx)(yo.Box,{component:"span",sx:{fontSize:16,fontWeight:600,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},children:u.name}),(0,Pe.jsx)(yo.Box,{component:"span",sx:{flexShrink:0,px:1,py:.25,borderRadius:.75,bgcolor:"#f1f5f9",color:"#64748b",fontSize:13,fontWeight:500},children:E.get(u.group_seq)??"\uC0AD\uC81C\uB41C \uD504\uB85C\uC81D\uD2B8"}),(0,Pe.jsxs)(yo.Box,{component:"span",sx:{flexShrink:0,fontSize:14,color:"#57564f"},children:[gx(u.start_date)," ~ ",gx(u.end_date)]})]}),u.goal?(0,Pe.jsx)(yo.Box,{sx:{mt:.5,fontSize:14,color:"#787774",lineHeight:1.5},children:u.goal}):null]}),(0,Pe.jsxs)(yo.Box,{sx:{display:"flex",alignItems:"center",gap:.5},children:[(0,Pe.jsx)(kn.LabelSelect,{label:"\uC0C1\uD0DC",showLabel:!1,size:"small",value:u.status,options:rh.map(y=>({value:y.value,label:y.label})),onChange:y=>l(u.seq,String(y.target.value)),sx:{width:104,flexShrink:0}}),(0,Pe.jsx)(yo.IconButton,{"aria-label":"\uBAA9\uD45C \uC218\uC815",onClick:()=>R(u),sx:{color:"#9a9a97","&:hover":{color:"#2563eb"}},children:(0,Pe.jsx)(hx.default,{sx:{fontSize:18}})}),(0,Pe.jsx)(yo.IconButton,{"aria-label":"\uBAA9\uD45C \uC0AD\uC81C",onClick:()=>s(u.seq),sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:(0,Pe.jsx)(pn,{style:{width:16,height:16}})})]})]},u.seq))})]})});return(0,Pe.jsx)(bx.FormDialog,{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:H}],actions:{showCancelButton:!1,right:(0,Pe.jsx)(yo.Button,{variant:"contained",onClick:n,children:"\uB2EB\uAE30"})}})}var ps=require("react"),He=require("@mui/material"),kx=require("@ehfuse/mui-form-dialog"),Tx=a(require("@mui/icons-material/OpenInNewOutlined"),1),yx=a(require("@mui/icons-material/EventOutlined"),1),Sx=require("@ehfuse/alerts");var ve=require("react/jsx-runtime");function ah({open:e,imports:o,onRegister:t,onRemove:n,onClose:r}){let[i,l]=(0,ps.useState)(""),[s,p]=(0,ps.useState)(!1),c=async()=>{let f=i.trim();if(f){p(!0);try{await t(f)&&l("")}finally{p(!1)}}},d=async f=>{await(0,Sx.ConfirmDialog)({title:"\uAC00\uC838\uC624\uAE30 \uD574\uC81C",message:`"${f.name||"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}" \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30\uB97C \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&n(f.seq)},g=(0,ve.jsxs)(He.Box,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[(0,ve.jsxs)(He.Box,{sx:{color:"#37352f",lineHeight:1.7},children:["\uAD6C\uAE00 \uCE98\uB9B0\uB354\uC758 \uC77C\uC815\uC744 ",(0,ve.jsx)("b",{children:"\uC77D\uAE30\uC804\uC6A9"}),"\uC73C\uB85C \uC5C5\uBB34\uD568 \uCE98\uB9B0\uB354\uC5D0 \uD568\uAED8 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4.",(0,ve.jsx)("br",{}),"\uD45C\uC2DC/\uC228\uAE40\uC740 \uC5C5\uBB34\uD568 \uC6B0\uC0C1\uB2E8\uC758 ",(0,ve.jsx)("b",{children:"\uAD6C\uAE00 \uC77C\uC815"})," \uC2A4\uC704\uCE58\uB85C \uCF1C\uACE0 \uB055\uB2C8\uB2E4."]}),(0,ve.jsx)(He.Box,{sx:{fontWeight:700,color:"#37352f",mt:.5},children:"\uB4F1\uB85D\uB41C \uCE98\uB9B0\uB354"}),o.length>0?(0,ve.jsx)(He.Box,{sx:{display:"flex",flexDirection:"column",border:"1px solid #e6e6e3",borderRadius:1},children:o.map((f,m)=>(0,ve.jsxs)(He.Box,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:.75,borderTop:m>0?"1px solid #efefed":"none"},children:[(0,ve.jsx)(yx.default,{sx:{fontSize:18,color:"#0f9d58",flexShrink:0}}),(0,ve.jsx)(He.Box,{component:"span",sx:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:f.name||"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),(0,ve.jsx)(He.IconButton,{"aria-label":"\uAC00\uC838\uC624\uAE30 \uD574\uC81C",size:"small",onClick:()=>{d(f)},sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:(0,ve.jsx)(pn,{sx:{fontSize:18}})})]},f.seq))}):(0,ve.jsx)(He.Box,{sx:{color:"#9a9a97",px:.5},children:"\uC544\uC9C1 \uB4F1\uB85D\uB41C \uCE98\uB9B0\uB354\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}),(0,ve.jsx)(He.Divider,{sx:{my:1,borderColor:"#e6e6e3"}}),(0,ve.jsx)(He.Box,{sx:{fontWeight:700,color:"#37352f"},children:"\uC0C8 \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30"}),(0,ve.jsxs)(He.Box,{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:[(0,ve.jsx)(He.Box,{children:(0,ve.jsxs)(He.Box,{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 > ",(0,ve.jsx)("b",{children:"\uC124\uC815 \uBC0F \uACF5\uC720"}),"\uB97C \uC5FD\uB2C8\uB2E4."]})}),(0,ve.jsx)(He.Box,{children:(0,ve.jsxs)(He.Box,{component:"span",children:[(0,ve.jsx)("b",{children:"\uCE98\uB9B0\uB354 \uD1B5\uD569"})," \uC139\uC158\uC758 ",(0,ve.jsx)("b",{children:'"iCal \uD615\uC2DD\uC758 \uBE44\uBC00 \uC8FC\uC18C"'})," \uB97C \uBCF5\uC0AC\uD574 \uC544\uB798\uC5D0 \uBD99\uC5EC\uB123\uC73C\uC138\uC694."]})}),(0,ve.jsx)(He.Box,{children:(0,ve.jsx)(He.Box,{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."})}),(0,ve.jsx)(He.Box,{children:(0,ve.jsx)(He.Box,{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."})})]}),(0,ve.jsxs)(He.Box,{sx:{display:"flex",gap:2,alignItems:"center"},children:[(0,ve.jsx)(He.TextField,{value:i,onChange:f=>l(f.target.value),fullWidth:!0,label:"\uBE44\uBC00 iCal \uC8FC\uC18C",placeholder:"https://calendar.google.com/calendar/ical/\u2026/basic.ics",slotProps:{input:{spellCheck:!1}}}),(0,ve.jsx)(He.Button,{variant:"contained",disabled:!i.trim()||s,onClick:()=>{c()},sx:{flexShrink:0},children:s?"\uD655\uC778 \uC911\u2026":"\uB4F1\uB85D"})]})]});return(0,ve.jsx)(kx.FormDialog,{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:g}],actions:{showCancelButton:!1,left:(0,ve.jsx)(He.Button,{variant:"outlined",startIcon:(0,ve.jsx)(Tx.default,{sx:{fontSize:16}}),onClick:()=>window.open("https://calendar.google.com/calendar","_blank"),children:"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),right:(0,ve.jsx)(He.Button,{variant:"contained",onClick:r,children:"\uB2EB\uAE30"})}})}var Po=require("@mui/material"),Bx=require("@ehfuse/mui-form-dialog"),Cx=a(require("@mui/icons-material/ContentCopyOutlined"),1),fs=a(require("@mui/icons-material/OpenInNewOutlined"),1),xs=require("@ehfuse/alerts"),qe=require("react/jsx-runtime");function vx(e){return`${window.location.origin}/api/v1/taskbox/calendar/${e}.ics`}function lh({open:e,feed:o,feedTaskCount:t,buildFeedUrl:n,onSubscribe:r,onClose:i}){let l=n??vx,s=o.subscribed?l(o.token):"",p=()=>{navigator.clipboard.writeText(s).then(()=>(0,xs.InfoAlert)("\uD53C\uB4DC \uC8FC\uC18C\uB97C \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>(0,xs.InfoAlert)("\uBCF5\uC0AC\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uC8FC\uC18C\uB97C \uC9C1\uC811 \uC120\uD0DD\uD574 \uBCF5\uC0AC\uD558\uC138\uC694."))},c=()=>{let g=s.replace(/^https?:\/\//,"webcal://");window.open(`https://calendar.google.com/calendar/r?cid=${encodeURIComponent(g)}`,"_blank")},d=(0,qe.jsxs)(Po.Box,{sx:{display:"flex",flexDirection:"column",gap:2.5},children:[(0,qe.jsxs)(Po.Box,{sx:{color:"#37352f",lineHeight:1.7},children:["\uB0B4\uAC00 \uAD00\uC5EC\uD55C \uC5C5\uBB34\uB97C ",(0,qe.jsx)("b",{children:"\uC77D\uAE30\uC804\uC6A9"}),"\uC73C\uB85C \uAD6C\uAE00 \uCE98\uB9B0\uB354\uC5D0\uC11C \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4."]}),t===0?(0,qe.jsxs)(Po.Box,{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.",(0,qe.jsx)("br",{}),(0,qe.jsx)("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?(0,qe.jsxs)(qe.Fragment,{children:[(0,qe.jsx)(Po.TextField,{value:s,fullWidth:!0,label:"\uB0B4 \uD53C\uB4DC \uC8FC\uC18C",slotProps:{input:{readOnly:!0}}}),(0,qe.jsxs)(Po.Box,{sx:{display:"flex",gap:2},children:[(0,qe.jsx)(Po.Button,{variant:"outlined",startIcon:(0,qe.jsx)(Cx.default,{}),onClick:p,children:"\uC8FC\uC18C \uBCF5\uC0AC"}),(0,qe.jsx)(Po.Button,{variant:"contained",startIcon:(0,qe.jsx)(fs.default,{}),onClick:c,children:"Google \uCE98\uB9B0\uB354\uC5D0 \uCD94\uAC00"})]}),(0,qe.jsxs)(Po.Box,{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:[(0,qe.jsx)(Po.Box,{children:(0,qe.jsxs)("span",{children:["\uBC84\uD2BC\uC774 \uB3D9\uC791\uD558\uC9C0 \uC54A\uC73C\uBA74 \uAD6C\uAE00 \uCE98\uB9B0\uB354 > \uB2E4\uB978 \uCE98\uB9B0\uB354 + > ",(0,qe.jsx)("b",{children:"URL\uB85C \uCD94\uAC00"}),"\uC5D0 \uC704 \uC8FC\uC18C\uB97C \uBD99\uC5EC\uB123\uC73C\uC138\uC694."]})}),(0,qe.jsx)(Po.Box,{children:(0,qe.jsx)("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."})}),(0,qe.jsx)(Po.Box,{children:(0,qe.jsx)("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."})}),(0,qe.jsx)(Po.Box,{children:(0,qe.jsx)("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."})})]})]}):(0,qe.jsx)(Po.Button,{variant:"contained",onClick:r,sx:{alignSelf:"flex-start"},children:"\uAD6C\uB3C5 \uC2DC\uC791 (\uD53C\uB4DC \uBC1C\uAE09)"})]});return(0,qe.jsx)(Bx.FormDialog,{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:d}],actions:{showCancelButton:!1,left:(0,qe.jsx)(Po.Button,{variant:"outlined",startIcon:(0,qe.jsx)(fs.default,{sx:{fontSize:16}}),onClick:()=>window.open("https://calendar.google.com/calendar","_blank"),children:"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),right:(0,qe.jsx)(Po.Button,{variant:"contained",onClick:i,children:"\uB2EB\uAE30"})}})}var tn=require("react"),nn=require("@mui/material"),Ix=require("@ehfuse/mui-form-dialog"),_x=require("@ehfuse/mui-form-controls"),wx=require("@ehfuse/tree-view");var Vo=require("react/jsx-runtime");function Dx(e){return`${e.name}#${e.seq}`}function sh(e){return Number(e.slice(e.lastIndexOf("#")+1))||0}function ch(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 mh(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 uh(e){let o=[[e.name,e.role_name].filter(Boolean).join(" "),e.department].filter(Boolean).join(" / ");return{id:`emp:${e.seq}`,label:Dx(e),renderLabel:(0,Vo.jsx)(nn.Box,{component:"span",sx:{display:"inline-flex",alignItems:"baseline",gap:.75},children:(0,Vo.jsx)(nn.Box,{component:"span",sx:{fontWeight:400,color:"text.primary"},children:o})})}}function Mx(e,o){let t=(e.groups??[]).map(r=>Mx(r,o)).filter(r=>r!==null),n=(e.employees??[]).filter(r=>mh(r,o)).map(uh);return t.length===0&&n.length===0?null:{id:`group:${e.key}`,label:e.name,children:[...t,...n]}}function dh({groups:e,allEmployees:o,initialSelectedSeqs:t,multiple:n,isMobile:r,onSelectionChange:i}){let[l,s]=(0,tn.useState)(""),p=(0,tn.useMemo)(()=>e.map(d=>Mx(d,l.trim().toLowerCase())).filter(d=>d!==null),[e,l]),c=(0,tn.useMemo)(()=>o.filter(d=>t.includes(d.seq)).map(Dx),[]);return(0,Vo.jsxs)(Vo.Fragment,{children:[(0,Vo.jsx)(nn.Box,{sx:{px:1.5,py:1,borderBottom:"1px solid #cccccc",flexShrink:0},children:(0,Vo.jsx)(_x.SearchTextField,{size:"small",fullWidth:!0,placeholder:"\uC774\uB984, \uBD80\uC11C \uAC80\uC0C9",onSearch:s,onClear:()=>s(""),sx:{"& .MuiOutlinedInput-notchedOutline":{border:"none"},"& .MuiInputBase-root":{px:0}}})}),(0,Vo.jsx)(nn.Box,{sx:r?{display:"flex",flexDirection:"column"}:{flex:1,minHeight:0,overflow:"hidden",display:"flex",flexDirection:"column"},children:(0,Vo.jsx)(wx.TreeView,{items:p,checkbox:!0,multiSelect:n,selectionMode:"child",showSearch:!1,defaultExpanded:!0,initialSelections:c,onChange:d=>i(d.map(sh).filter(g=>g>0)),styles:{border:"none",borderRadius:"0"}})})]})}function ph({open:e,title:o="\uC9C1\uC6D0 \uC120\uD0DD",hint:t="",groups:n,multiple:r=!1,selectedSeqs:i,confirmText:l="\uD655\uC778",onConfirm:s,onClose:p}){let c=Ke(),[d,g]=(0,tn.useState)([]),[f,m]=(0,tn.useState)(0),x=(0,tn.useMemo)(()=>ch(n),[n]),O=i??[];(0,tn.useEffect)(()=>{e&&(g(O),m(h=>h+1))},[e]);let v=()=>{let h=x.filter(b=>d.includes(b.seq));s(r?h:h.slice(0,1)),p()};return(0,Vo.jsx)(Ix.FormDialog,{open:e,onClose:p,title:`${o}${r&&d.length>0?` (${d.length}\uBA85)`:""}`,locale:"ko",fullScreen:c,mobilePresentation:c?"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:(0,Vo.jsx)(nn.Box,{sx:{...c?{}:{height:560},display:"flex",flexDirection:"column",border:"1px solid #cccccc",borderRadius:1,...c?{}:{overflow:"hidden"},userSelect:"none"},children:(0,Vo.jsx)(dh,{groups:n,allEmployees:x,initialSelectedSeqs:O,multiple:r,isMobile:c,onSelectionChange:g},f)})}],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?(0,Vo.jsx)(nn.Typography,{variant:"body2",color:"text.secondary",sx:{whiteSpace:"pre-line",lineHeight:1.35},children:t}):void 0,right:(0,Vo.jsx)(nn.Button,{variant:"contained",onClick:v,children:l})}})}var Ar=require("react"),Ft=require("@mui/material"),Rx=require("@ehfuse/mui-form-dialog"),Px=require("@ehfuse/mui-form-controls");var Nt=require("@mui/material"),pt=require("react/jsx-runtime");function fh(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 gs({sprints:e,tasks:o,height:t=160}){let r=[...e].sort((d,g)=>`${d.start_date}|${d.seq}`.localeCompare(`${g.start_date}|${g.seq}`)).map(d=>({sprint:d,...fh(d,o)})),i=r.some(d=>d.points>0),l=r.map(d=>i?d.points:d.count),s=Math.max(1,...l),p=r.filter(d=>d.sprint.status==="closed").map(d=>i?d.points:d.count),c=p.length>0?Math.round(p.reduce((d,g)=>d+g,0)/p.length*10)/10:null;return r.length===0?(0,pt.jsx)(Nt.Box,{sx:{py:4,textAlign:"center",fontSize:14.5,color:"#9a9a97"},children:"\uD45C\uC2DC\uD560 \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):(0,pt.jsxs)(Nt.Box,{children:[(0,pt.jsxs)(Nt.Box,{sx:{mb:1,display:"flex",justifyContent:"space-between",fontSize:14,color:"#000"},children:[(0,pt.jsxs)("span",{children:["\uC644\uB8CC ",i?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uBAA9\uD45C\uBCC4"]}),c!==null?(0,pt.jsxs)("span",{children:["\uD3C9\uADE0(\uC885\uB8CC \uBAA9\uD45C)"," ",(0,pt.jsx)(Nt.Box,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:c}),i?"SP":"\uAC74"]}):null]}),(0,pt.jsx)(Nt.Box,{sx:{display:"flex",alignItems:"flex-end",gap:2,height:t,px:.5},children:r.map(d=>{let g=i?d.points:d.count,f=Math.round((t-24)*g/s),m=d.sprint.status==="closed";return(0,pt.jsxs)(Nt.Box,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-end",height:"100%"},children:[(0,pt.jsx)(Nt.Box,{sx:{fontSize:14,fontWeight:700,color:"#37352f",lineHeight:1.5},children:g}),(0,pt.jsx)(Nt.Box,{sx:{width:"60%",maxWidth:56,height:Math.max(2,f),borderRadius:"4px 4px 0 0",bgcolor:m?"#2f80ed":"#a9c9f5"}})]},d.sprint.seq)})}),(0,pt.jsx)(Nt.Box,{sx:{display:"flex",gap:2,px:.5,mt:.5},children:r.map(d=>(0,pt.jsxs)(Nt.Box,{sx:{flex:1,minWidth:0,textAlign:"center",fontSize:13.5,color:"#000",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[d.sprint.name,d.sprint.status!=="closed"?" (\uC9C4\uD589\uC911)":""]},d.sprint.seq))})]})}var Ox=require("react"),Ln=require("@mui/material"),Eo=require("react/jsx-runtime");function Ex(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?new Date(`${e}T00:00:00`):null}function xh(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function bs(e){return e.slice(5).replace("-",".")}function hs({sprint:e,tasks:o,todayStr:t,height:n=200}){let r=(0,Ox.useMemo)(()=>{let h=Ex(e.start_date),b=Ex(e.end_date);if(!h||!b||b<h||Math.round((b.getTime()-h.getTime())/864e5)+1>366)return null;let B=o.filter(u=>u.sprint_seq===e.seq&&!u.archived);if(B.length===0)return{empty:!0};let P=B.some(u=>(u.story_points??0)>0),S=u=>P?u.story_points??0:1,D=B.reduce((u,y)=>u+S(y),0),R=new Map;for(let u of B){if(!u.completed)continue;let y=(u.completed_time??"").slice(0,10),k=/^\d{4}-\d{2}-\d{2}$/.test(y)?y:e.start_date;R.set(k,(R.get(k)??0)+S(u))}let I=[];for(let u=new Date(h);u<=b;u.setDate(u.getDate()+1))I.push(xh(u));let E=D,H=[];for(let u of I){if(u>t)break;E-=R.get(u)??0,H.push({day:u,value:Math.max(0,E)})}return{empty:!1,days:I,total:D,usePoints:P,actual:H}},[e,o,t]);if(!r)return(0,Eo.jsx)(Ln.Box,{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(0,Eo.jsx)(Ln.Box,{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:l,usePoints:s,actual:p}=r,c=600,d=200,g=8,f=h=>i.length===1?0:h/(i.length-1)*c,m=h=>g+(d-g*2)*(1-h/Math.max(1,l)),x=`${f(0)},${m(l)} ${f(i.length-1)},${m(0)}`,O=p.map(h=>`${f(i.indexOf(h.day))},${m(h.value)}`).join(" "),v=p[p.length-1];return(0,Eo.jsxs)(Ln.Box,{children:[(0,Eo.jsxs)(Ln.Box,{sx:{mb:1,display:"flex",justifyContent:"space-between",fontSize:14,color:"#000"},children:[(0,Eo.jsxs)("span",{children:["\uB0A8\uC740 ",s?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uCD1D ",l]}),v?(0,Eo.jsxs)("span",{children:["\uD604\uC7AC"," ",(0,Eo.jsx)(Ln.Box,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:v.value}),s?"SP":"\uAC74"," \uB0A8\uC74C"]}):null]}),(0,Eo.jsx)(Ln.Box,{sx:{border:"1px solid #e6e6e3",borderRadius:1,bgcolor:"#fafaf9",px:1,py:.5},children:(0,Eo.jsxs)("svg",{viewBox:`0 0 ${c} ${d}`,preserveAspectRatio:"none",style:{display:"block",width:"100%",height:n},children:[(0,Eo.jsx)("line",{x1:0,y1:m(0),x2:c,y2:m(0),stroke:"#e6e6e3",strokeWidth:1}),(0,Eo.jsx)("polyline",{points:x,fill:"none",stroke:"#9a9a97",strokeWidth:1.5,strokeDasharray:"6 5",vectorEffect:"non-scaling-stroke"}),p.length>1?(0,Eo.jsx)("polyline",{points:O,fill:"none",stroke:"#2f80ed",strokeWidth:2.5,vectorEffect:"non-scaling-stroke"}):null,v?(0,Eo.jsx)("circle",{cx:f(i.indexOf(v.day)),cy:m(v.value),r:4,fill:"#2f80ed",vectorEffect:"non-scaling-stroke"}):null]})}),(0,Eo.jsxs)(Ln.Box,{sx:{mt:.5,display:"flex",justifyContent:"space-between",fontSize:13.5,color:"#000"},children:[(0,Eo.jsx)("span",{children:bs(e.start_date)}),t>e.start_date&&t<e.end_date?(0,Eo.jsxs)("span",{children:["\uC624\uB298 ",bs(t)]}):null,(0,Eo.jsx)("span",{children:bs(e.end_date)})]})]})}var ft=require("react/jsx-runtime");function gh({open:e,sprints:o,tasks:t,todayStr:n,initialSprintSeq:r=0,onClose:i}){let[l,s]=(0,Ar.useState)(0);(0,Ar.useEffect)(()=>{if(!e)return;let d=o.find(f=>f.status==="active")??o[0],g=o.find(f=>f.seq===r)??d;s(g?.seq??0)},[e]);let p=(0,Ar.useMemo)(()=>o.find(d=>d.seq===l)??null,[o,l]),c=(0,ft.jsxs)(Ft.Box,{sx:{display:"flex",flexDirection:"column"},children:[(0,ft.jsxs)(Ft.Box,{sx:{px:3,py:2.5},children:[(0,ft.jsx)(Ft.Box,{sx:{mb:1.5,fontSize:17,fontWeight:700,color:"#37352f"},children:"\uBCA8\uB85C\uC2DC\uD2F0"}),(0,ft.jsx)(gs,{sprints:o,tasks:t})]}),(0,ft.jsx)(Ft.Divider,{sx:{borderColor:"#e6e6e3"}}),(0,ft.jsxs)(Ft.Box,{sx:{px:3,py:2.5},children:[(0,ft.jsx)(Ft.Box,{sx:{mb:1.5,fontSize:17,fontWeight:700,color:"#37352f"},children:"\uBC88\uB2E4\uC6B4"}),(0,ft.jsx)(Px.LabelSelect,{label:"\uBAA9\uD45C",showLabel:!1,value:l?String(l):"",options:o.map(d=>({value:String(d.seq),label:ht(d)})),onChange:d=>s(Number(d.target.value)||0),sx:{width:280,mb:2}}),p?(0,ft.jsx)(hs,{sprint:p,tasks:t,todayStr:n}):(0,ft.jsx)(Ft.Box,{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(0,ft.jsx)(Rx.FormDialog,{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:c}],actions:{showCancelButton:!1,right:(0,ft.jsx)(Ft.Button,{variant:"contained",onClick:i,children:"\uB2EB\uAE30"})}})}var rn=require("@mui/material");var Tn=require("react/jsx-runtime");function bh({anchorEl:e,candidates:o,selectedNames:t,avatarSrcByName:n,onToggle:r,onClear:i,onClose:l}){return(0,Tn.jsxs)(rn.Menu,{anchorEl:e,open:!!e,onClose:l,transitionDuration:0,children:[o.length===0?(0,Tn.jsx)(rn.MenuItem,{disabled:!0,sx:{fontSize:14},children:"\uBAA9\uB85D\uC5D0 \uC9C0\uC815\uB41C \uC0AC\uB78C\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):o.map(s=>{let p=t.includes(s.name);return(0,Tn.jsxs)(rn.MenuItem,{onClick:()=>r(s),sx:{fontSize:14,minWidth:170,gap:1},children:[(0,Tn.jsx)(rn.Checkbox,{size:"small",checked:p,sx:{p:0}}),(0,Tn.jsx)(Zo,{names:[s.name],size:20,avatarSrcByName:n}),s.name]},`${s.accountSeq}-${s.name}`)}),(0,Tn.jsx)(rn.Divider,{}),(0,Tn.jsx)(rn.MenuItem,{disabled:t.length===0,onClick:i,sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}var zx=require("react"),Lr=require("@mui/material"),qx=a(require("@mui/icons-material/KeyboardArrowDown"),1),Ax=a(require("@mui/icons-material/Check"),1);var an=require("react/jsx-runtime");function hh({value:e,onChange:o,options:t}){let[n,r]=(0,zx.useState)(null),i=t??Fi,l=Fi.find(s=>s.value===e)?.label??"";return(0,an.jsxs)(an.Fragment,{children:[(0,an.jsxs)(Lr.ButtonBase,{onClick:s=>r(s.currentTarget),sx:{display:"flex",alignItems:"center",gap:.5,px:1,py:.5,borderRadius:1,fontSize:13.5,color:"#37352f","&:hover":{bgcolor:"#f2f2f0"}},children:[l,(0,an.jsx)(qx.default,{sx:{fontSize:17,color:"#9a9a97"}})]}),(0,an.jsx)(Lr.Menu,{transitionDuration:0,anchorEl:n,open:!!n,onClose:()=>r(null),children:i.map(s=>(0,an.jsxs)(Lr.MenuItem,{selected:s.value===e,onClick:()=>{o(s.value),r(null)},sx:{fontSize:14,minWidth:140,justifyContent:"space-between",gap:1},children:[s.label,s.value===e?(0,an.jsx)(Ax.default,{sx:{fontSize:16,color:"#2f80ed"}}):null]},s.value))})]})}var ir=require("@mui/material"),ks=require("@ehfuse/mui-form-controls");function Nn(e){let o=t=>String(t).padStart(2,"0");return`${e.getFullYear()}-${o(e.getMonth()+1)}-${o(e.getDate())}`}function Ci(e,o=new Date){let t=new Date(o);return t.setMonth(t.getMonth()-e),t}function kh(e=new Date){return{fromDate:Nn(Ci(1,e)),toDate:Nn(e)}}var yn=require("react/jsx-runtime"),Th=[{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 Ts({fromDate:e,toDate:o,onChange:t}){let n=i=>{if(i<=0){t("","");return}t(Nn(Ci(i)),Nn(new Date))},r=i=>i<=0?!e&&!o:!e||!o?!1:e===Nn(Ci(i))&&o===Nn(new Date);return(0,yn.jsxs)(ir.Box,{sx:{display:"flex",alignItems:"center",gap:1.5,flexWrap:"wrap"},children:[(0,yn.jsx)(ir.Box,{sx:{display:"flex",alignItems:"center",gap:1.5},children:Th.map(i=>{let l=r(i.months);return(0,yn.jsx)(ir.ButtonBase,{onClick:()=>n(i.months),sx:{px:1.25,py:.85,borderRadius:1,fontSize:13,fontWeight:l?500:400,border:"1px solid",borderColor:l?"#2f80ed":"#dedddb",color:l?"#2f80ed":"#37352f",bgcolor:l?"#eef6ff":"transparent","&:hover":{bgcolor:l?"#eef6ff":"#f7f7f5"}},children:i.label},i.label)})}),(0,yn.jsxs)(ir.Box,{sx:{display:"flex",alignItems:"center",gap:.5},children:[(0,yn.jsx)(ks.DateTextField,{value:e,size:"small",placeholder:"\uC2DC\uC791\uC77C",onChange:i=>t(i.target.value,o),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}}),(0,yn.jsx)(ir.Box,{component:"span",sx:{fontSize:13,color:"#9a9a97"},children:"~"}),(0,yn.jsx)(ks.DateTextField,{value:o,size:"small",placeholder:"\uC885\uB8CC\uC77C",onChange:i=>t(e,i.target.value),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}})]})]})}var Lx=require("@mui/material");var ys=require("react/jsx-runtime");function yh({anchorEl:e,fromDate:o,toDate:t,onChange:n,onClose:r}){return(0,ys.jsx)(Lx.Popover,{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:(0,ys.jsx)(Ts,{fromDate:o,toDate:t,onChange:n})})}var Fn=require("@mui/material"),Fx=a(require("@mui/icons-material/Checklist"),1),Hx=a(require("@mui/icons-material/Face"),1),Wx=a(require("@mui/icons-material/Publish"),1),$x=a(require("@mui/icons-material/NotificationsOutlined"),1),Kx=a(require("@mui/icons-material/BugReportOutlined"),1),Ux=a(require("@mui/icons-material/DescriptionOutlined"),1),Vx=a(require("@mui/icons-material/Inventory2Outlined"),1);var Et=require("react/jsx-runtime");function Nx(e,o){return o>0?`${e} (${o})`:e}var Sh=[{id:"my",label:"\uC804\uCCB4",icon:(0,Et.jsx)(Fx.default,{sx:{fontSize:18}})},{id:"notice",label:"\uACF5\uC9C0\uC0AC\uD56D",icon:(0,Et.jsx)($x.default,{sx:{fontSize:18}})},{id:"mine",label:"\uB0B4 \uC5C5\uBB34",icon:(0,Et.jsx)(Hx.default,{sx:{fontSize:18}})},{id:"sent",label:"\uBCF4\uB0B8 \uC5C5\uBB34",icon:(0,Et.jsx)(Wx.default,{sx:{fontSize:18}})},{id:"bug",label:"\uC624\uB958",icon:(0,Et.jsx)(Kx.default,{sx:{fontSize:18}})},{id:"archive",label:"\uBCF4\uAD00\uD568",icon:(0,Et.jsx)(Vx.default,{sx:{fontSize:18}}),hideCount:!0},{id:"report",label:"\uBCF4\uACE0\uC11C",icon:(0,Et.jsx)(Ux.default,{sx:{fontSize:18}}),hideCount:!0}];function Bh(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 Ch({items:e,activeTab:o,counts:t,onChange:n,compact:r=!1}){let i=se(),l=Bh(i.tabs),s=e;return r?(0,Et.jsx)(Fn.Box,{sx:{display:"flex",flexWrap:"wrap",gap:1.25},children:s.map(p=>{let c=o===p.id;return(0,Et.jsx)(Fn.ButtonBase,{onClick:()=>n(p.id),sx:{px:1.5,py:.75,borderRadius:1,fontSize:nt(13.5),fontWeight:500,whiteSpace:"nowrap",border:"1px solid",bgcolor:c?i.tabs.selectedBg:i.tabs.bg,color:c?i.tabs.selectedColor:i.tabs.color,borderColor:c?i.tabs.selectedBg:i.tabs.borderColor},children:Nx(p.label,p.hideCount?0:t[p.id]??0)},p.id)})}):(0,Et.jsx)(Fn.Tabs,{value:o,onChange:(p,c)=>n(c),sx:{minHeight:46,"& .MuiTabs-indicator":{display:"none"},"& .MuiTabs-flexContainer":{gap:"12px",minHeight:46}},children:s.map(p=>(0,Et.jsx)(Fn.Tab,{value:p.id,label:Nx(p.label,p.hideCount?0:t[p.id]??0),icon:p.icon,iconPosition:"start",sx:l},p.id))})}var Hn=require("react"),ye=require("@mui/material"),Gx=a(require("@mui/icons-material/OpenInNewOutlined"),1),jx=a(require("@mui/icons-material/Check"),1),Yx=a(require("@mui/icons-material/CheckCircleOutlined"),1),Xx=a(require("@mui/icons-material/RadioButtonUnchecked"),1),Qx=a(require("@mui/icons-material/SendOutlined"),1),Zx=a(require("@mui/icons-material/EventOutlined"),1),Jx=a(require("@mui/icons-material/PersonOutlineOutlined"),1),eg=a(require("@mui/icons-material/ViewKanbanOutlined"),1),og=a(require("@mui/icons-material/ContentCopyOutlined"),1),tg=a(require("@mui/icons-material/NextPlanOutlined"),1),ng=a(require("@mui/icons-material/ContentPasteOutlined"),1),rg=a(require("@mui/icons-material/ShareOutlined"),1),ig=a(require("@mui/icons-material/DirectionsRunOutlined"),1),Ss=a(require("@mui/icons-material/ChevronRight"),1),ag=a(require("@mui/icons-material/ArchiveOutlined"),1),lg=a(require("@mui/icons-material/UnarchiveOutlined"),1),sg=require("@ehfuse/alerts");var J=require("react/jsx-runtime");function vh({target:e,onClose:o,customTabs:t,sprints:n=[],myAccountSeq:r=0,onOpenDetail:i,onToggleCompleted:l,onRequestConfirm:s,onChangeDueDate:p,onChangeReminder:c,onMemberEdit:d,onMoveProject:g,onDuplicate:f,onCreateFollowUp:m,onShare:x,onAssignSprint:O,onArchiveToggle:v,onDelete:h}){let b=Ke(),w=Ut(),[B,P]=(0,Hn.useState)(null),[S,D]=(0,Hn.useState)(null),[R,I]=(0,Hn.useState)(null);(0,Hn.useEffect)(()=>{e||(P(null),D(null),I(null))},[e]);let E=e?.task??null,H=!!E?.is_notice,u=!!E?.is_event,y=E?!Vt(E,r):!1,k=(0,Hn.useMemo)(()=>new Set(t.filter(F=>F.useSprints).map(F=>F.key)),[t]),T=async()=>{let F=E;if(o(),!F)return;await(0,sg.ConfirmDialog)({title:"\uC5C5\uBB34 \uC0AD\uC81C",message:`"${F.title}" \uC5C5\uBB34\uB97C \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&h(F.seq)},q=()=>{E&&v(E.seq,!E.archived),o()};return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(ye.Menu,{open:!!e,onClose:o,transitionDuration:0,anchorReference:b?"none":"anchorPosition",anchorPosition:!b&&e?{top:e.position.top,left:e.position.left}:void 0,slotProps:{paper:{sx:{minWidth:190,...b?{position:"fixed",top:"50%",left:"50%",translate:"-50% -50%",maxHeight:"70vh"}:{}}},list:b?{sx:{"& .MuiMenuItem-root":{py:1,minHeight:0}}}:void 0},children:[(0,J.jsxs)(ye.MenuItem,{onClick:()=>{E&&i(E),o()},sx:{fontSize:14},children:[(0,J.jsx)(ye.ListItemIcon,{children:(0,J.jsx)(Gx.default,{sx:{fontSize:19}})}),"\uC0C1\uC138 \uC5F4\uAE30"]}),(0,J.jsxs)(ye.MenuItem,{disabled:H?(E?.author_account_seq??0)!==r:(E?.author_account_seq??0)!==r&&(E?.manager_account_seq??0)!==r,onClick:()=>{E&&l(E.seq,!E.completed),o()},sx:{fontSize:14},children:[(0,J.jsx)(ye.ListItemIcon,{children:E?.completed?(0,J.jsx)(Xx.default,{sx:{fontSize:19}}):(0,J.jsx)(Yx.default,{sx:{fontSize:19}})}),E?.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC"]}),!H&&s?(0,J.jsxs)(ye.MenuItem,{disabled:!(E?.manager_account_seq??0)&&(E?.receiver_account_seqs??[]).length===0,onClick:()=>{E&&s(E),o()},sx:{fontSize:14},children:[(0,J.jsx)(ye.ListItemIcon,{children:(0,J.jsx)(Qx.default,{sx:{fontSize:19}})}),"\uD655\uC778 \uC694\uCCAD"]}):null,u?null:(0,J.jsx)(ye.Divider,{}),u?null:(0,J.jsxs)(ye.MenuItem,{disabled:y,onClick:F=>{E&&P({anchorEl:F.currentTarget,task:E})},sx:{fontSize:14},children:[(0,J.jsx)(ye.ListItemIcon,{children:(0,J.jsx)(Zx.default,{sx:{fontSize:19}})}),"\uB9C8\uAC10\uAE30\uD55C \uBCC0\uACBD"]}),!H&&!u&&d?(0,J.jsxs)(ye.MenuItem,{onClick:()=>{E&&d(E,"manager"),o()},sx:{fontSize:14},children:[(0,J.jsx)(ye.ListItemIcon,{children:(0,J.jsx)(Jx.default,{sx:{fontSize:19}})}),"\uCC45\uC784\uC790 \uBCC0\uACBD"]}):null,u?null:(0,J.jsxs)(ye.MenuItem,{disabled:y,onClick:F=>{E&&D({anchorEl:F.currentTarget,task:E})},sx:{fontSize:14},children:[(0,J.jsx)(ye.ListItemIcon,{children:(0,J.jsx)(eg.default,{sx:{fontSize:19}})}),"\uD504\uB85C\uC81D\uD2B8 \uC774\uB3D9",(0,J.jsx)(Ss.default,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}),(0,J.jsx)(ye.Divider,{}),f?(0,J.jsxs)(ye.MenuItem,{disabled:y,onClick:()=>{E&&f(E.seq),o()},sx:{fontSize:14},children:[(0,J.jsx)(ye.ListItemIcon,{children:(0,J.jsx)(og.default,{sx:{fontSize:19}})}),"\uBCF5\uC81C"]}):null,m&&E&&!E.is_event&&!E.is_notice?(0,J.jsxs)(ye.MenuItem,{onClick:()=>{E&&m(E.seq),o()},sx:{fontSize:14},children:[(0,J.jsx)(ye.ListItemIcon,{children:(0,J.jsx)(tg.default,{sx:{fontSize:19}})}),"\uD6C4\uC18D \uC5C5\uBB34 \uB9CC\uB4E4\uAE30"]}):null,(0,J.jsxs)(ye.MenuItem,{onClick:()=>{E&&(x?x(E):rr(E,b)),o()},sx:{fontSize:14},children:[(0,J.jsx)(ye.ListItemIcon,{children:b?(0,J.jsx)(rg.default,{sx:{fontSize:19}}):(0,J.jsx)(ng.default,{sx:{fontSize:19}})}),b?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC"]}),E&&!E.is_notice&&!E.is_event&&k.has(String(E.tab_key??""))&&O?(0,J.jsxs)(ye.MenuItem,{onClick:F=>I(F.currentTarget),sx:{fontSize:14},children:[(0,J.jsx)(ye.ListItemIcon,{children:(0,J.jsx)(ig.default,{sx:{fontSize:19}})}),"\uBAA9\uD45C\uC5D0 \uB123\uAE30",(0,J.jsx)(Ss.default,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}):null,(0,J.jsxs)(ye.MenuItem,{onClick:q,disabled:y||!E?.archived&&!(E&&Kr(E)),sx:{fontSize:14},children:[(0,J.jsx)(ye.ListItemIcon,{children:E?.archived?(0,J.jsx)(lg.default,{sx:{fontSize:19}}):(0,J.jsx)(ag.default,{sx:{fontSize:19}})}),E?.archived?"\uBCF4\uAD00 \uD574\uC81C":"\uBCF4\uAD00"]}),(0,J.jsx)(ye.Divider,{}),(0,J.jsxs)(ye.MenuItem,{disabled:y,onClick:T,sx:{fontSize:14,color:"#e5484d"},children:[(0,J.jsx)(ye.ListItemIcon,{children:(0,J.jsx)(pn,{sx:{fontSize:19,color:"#e5484d"}})}),"\uC0AD\uC81C"]})]}),(0,J.jsx)(dn,{anchorEl:B?.anchorEl??null,open:!!B,date:B?.task.due_date??"",reminder:B?.task.reminder??"none",hideReminder:!!B?.task.completed,centered:b,onClose:()=>{P(null),o()},onDateChange:F=>{B&&p(B.task.seq,F)},onReminderChange:F=>{B&&c?.(B.task.seq,F)}}),(0,J.jsxs)(ye.Menu,{transitionDuration:0,anchorEl:S?.anchorEl??null,open:!!S,onClose:()=>{D(null),o()},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},...w,children:[(0,J.jsx)(ye.MenuItem,{selected:!S?.task.tab_key,onClick:()=>{S&&g(S.task.seq,""),D(null),o()},sx:{fontSize:14,minWidth:170},children:"\uC5C6\uC74C"}),t.filter(F=>!F.archived).map(F=>(0,J.jsx)(ye.MenuItem,{selected:S?.task.tab_key===F.key,onClick:()=>{S&&g(S.task.seq,F.key),D(null),o()},sx:{fontSize:14,minWidth:170},children:F.label},F.key))]}),(0,J.jsx)(ye.Menu,{transitionDuration:0,anchorEl:R,open:!!R,onClose:()=>I(null),anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...n.filter(F=>`custom-${F.group_seq}`===String(E?.tab_key??"")).map(F=>({seq:F.seq,label:ht(F)}))].map(F=>(0,J.jsxs)(ye.MenuItem,{onClick:()=>{E&&O?.(E.seq,F.seq),I(null),o()},sx:{fontSize:14,minWidth:160,gap:1},children:[F.label,(E?.sprint_seq??0)===F.seq?(0,J.jsx)(jx.default,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},F.seq))})]})}var Sn=require("@mui/material");var Wn=require("react/jsx-runtime");function Ih({anchorEl:e,labelOptions:o,selectedKeys:t,onToggle:n,onClear:r,onClose:i}){return(0,Wn.jsxs)(Sn.Menu,{transitionDuration:0,anchorEl:e,open:!!e,onClose:i,children:[o.map(l=>{let s=t.includes(l.key);return(0,Wn.jsxs)(Sn.MenuItem,{onClick:()=>n(l.key),sx:{fontSize:14,minWidth:190,gap:1},children:[(0,Wn.jsx)(Sn.Checkbox,{size:"small",checked:s,sx:{p:0}}),(0,Wn.jsx)(Ye,{option:l})]},l.key)}),(0,Wn.jsx)(Sn.Divider,{}),(0,Wn.jsx)(Sn.MenuItem,{disabled:t.length===0,onClick:()=>{r(),i()},sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}var Bn=require("@mui/material"),cg=a(require("@mui/icons-material/Check"),1),mg=a(require("@mui/icons-material/BarChartOutlined"),1),ug=a(require("@mui/icons-material/SettingsOutlined"),1);var Ht=require("react/jsx-runtime");function _h(e){let{anchorEl:o,sprints:t,value:n,onSelect:r,onManage:i,onCharts:l,onClose:s}=e;return(0,Ht.jsxs)(Bn.Menu,{transitionDuration:0,anchorEl:o,open:!!o,onClose:s,children:[[{seq:0,label:"\uC804\uCCB4"},{seq:-1,label:"\uBBF8\uBC30\uC815 \uC5C5\uBB34"},...t.map(p=>({seq:p.seq,label:ht(p)}))].map(p=>(0,Ht.jsxs)(Bn.MenuItem,{onClick:()=>{r(p.seq),s()},sx:{fontSize:14,minWidth:180,gap:1},children:[p.label,n===p.seq?(0,Ht.jsx)(cg.default,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},p.seq)),(0,Ht.jsx)(Bn.Divider,{}),l?(0,Ht.jsxs)(Bn.MenuItem,{onClick:()=>{s(),l()},sx:{fontSize:14,gap:1},children:[(0,Ht.jsx)(mg.default,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uCC28\uD2B8"]}):null,l?(0,Ht.jsx)(Bn.Divider,{}):null,(0,Ht.jsxs)(Bn.MenuItem,{onClick:()=>{s(),i()},sx:{fontSize:14,gap:1},children:[(0,Ht.jsx)(ug.default,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uAD00\uB9AC\u2026"]})]})}var wh={my:"tasks",mine:"tasks",sent:"tasks",notice:"notice",bug:"bug",archive:"archive",done:"done",report:"report"};function pg(e){return wh[e]??"tasks"}var Dh={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"},dg=["list","calendar","month","card","kanban","sprint","timeline"],Mh=["list","card"];function Eh(e){let o=pg(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:dg,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:Mh,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:dg,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"}:{}}}}
|
|
13
|
+
`)}function Pf(e){navigator.clipboard.writeText(e).then(()=>(0,Ia.SuccessAlert)("\uC5C5\uBB34 \uB0B4\uC6A9\uC744 \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>(0,Ia.InfoAlert)("\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=zf(e);if(o&&typeof navigator.share=="function"){navigator.share({text:t}).catch(n=>{n?.name!=="AbortError"&&Pf(t)});return}Pf(t)}var ze=require("react/jsx-runtime");function rs({task:e,myAccountSeq:o=0,onToggleCompleted:t,onChangeTitle:n,onChangeIcon:r,onChangeIconColor:i,onClose:l,appBarMode:s=!1,activityItems:p,activityLoading:c,onLoadActivity:d,onPrint:g}){let f=Ke(),[m,x]=(0,_a.useState)(!1),[O,v]=(0,_a.useState)(null),[h,b]=(0,_a.useState)(null),w=Un(e.icon||(e.is_notice?Yo:e.is_event?"event":Ge)),B=!!e.is_notice,P=!!e.is_event,S=B&&o>0&&(e.author_account_seq??0)===o,D=!Vt(e,o),R=!P&&(B?S:(e.author_account_seq??0)===o||(e.manager_account_seq??0)===o);return(0,ze.jsxs)(ze.Fragment,{children:[(0,ze.jsxs)(wo.Box,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1.5,flexShrink:0},children:[s&&l?(0,ze.jsx)(wo.IconButton,{"aria-label":"\uB4A4\uB85C",onClick:l,sx:{color:"#37352f",ml:-1},children:(0,ze.jsx)(Af.default,{})}):null,R&&!s?(0,ze.jsx)(wo.Tooltip,{title:e.completed&&e.completed_by?`${e.completed_by} \xB7 ${Ct(e.completed_time)} \uC644\uB8CC`:e.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC",arrow:!0,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:(0,ze.jsx)(wo.Checkbox,{checked:e.completed,icon:(0,ze.jsx)(Hf.default,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:(0,ze.jsx)(Ff.default,{sx:{fontSize:22,color:"#2f80ed"}}),onChange:(I,E)=>t(e.seq,E),sx:{p:0}})}):null,s?null:(0,ze.jsx)(wo.Tooltip,{title:D?"":"\uC544\uC774\uCF58 \uBCC0\uACBD",arrow:!0,children:(0,ze.jsx)(wo.IconButton,{size:"small",onClick:D?void 0:I=>b(I.currentTarget),sx:{color:e.icon_color||(B?"#e5484d":"#1e3a8a")},children:(0,ze.jsx)(w,{sx:{fontSize:20}})})}),O!==null?(0,ze.jsx)(wo.Box,{component:"input",autoFocus:!0,spellCheck:!1,value:O,onChange:I=>v(I.target.value),onBlur:()=>{O.trim()&&O.trim()!==e.title&&n(e.seq,O.trim()),v(null)},onKeyDown:I=>{I.key==="Enter"&&I.target.blur(),I.key==="Escape"&&v(null)},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:18,fontWeight:500,color:"#37352f",p:0,m:0}}):s?(0,ze.jsx)(wo.Box,{sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:B?"\uACF5\uC9C0":P?"\uC77C\uC815":e.is_bug?"\uC624\uB958":"\uC5C5\uBB34"}):(0,ze.jsx)(wo.Box,{onClick:D?void 0:()=>v(e.title),sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",cursor:D?"default":"text",textDecoration:e.completed?"line-through":"none"},children:e.title}),d?(0,ze.jsx)(wo.Tooltip,{title:"\uD65C\uB3D9",arrow:!0,children:(0,ze.jsx)(wo.IconButton,{"aria-label":"\uD65C\uB3D9",onClick:()=>x(!0),sx:{color:"#6b7280"},children:(0,ze.jsx)(Wf.default,{sx:{fontSize:20}})})}):null,(0,ze.jsx)(wo.Tooltip,{title:f?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",arrow:!0,children:(0,ze.jsx)(wo.IconButton,{"aria-label":f?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",onClick:()=>rr(e,f),sx:{color:"#6b7280"},children:f?(0,ze.jsx)(Lf.default,{sx:{fontSize:20}}):(0,ze.jsx)(Nf.default,{sx:{fontSize:20}})})}),g?(0,ze.jsx)(wo.Tooltip,{title:"\uC778\uC1C4",arrow:!0,children:(0,ze.jsx)(wo.IconButton,{"aria-label":"\uC778\uC1C4",onClick:()=>g(e),sx:{color:"#6b7280"},children:(0,ze.jsx)($f.default,{sx:{fontSize:20}})})}):null,l&&!s?(0,ze.jsx)(wo.IconButton,{"aria-label":"\uB2EB\uAE30",onClick:l,sx:{color:"#6b7280"},children:(0,ze.jsx)(qf.default,{})}):null]}),(0,ze.jsx)(er,{anchorEl:h,value:e.icon||(B?Yo:""),color:e.icon_color||(B?"#e5484d":"#1e3a8a"),onSelect:I=>r(e.seq,I),onSelectColor:I=>i?.(e.seq,I),onClose:()=>b(null)}),(0,ze.jsx)(Bi,{open:m,taskSeq:e.seq,items:p,loading:c,onLoad:d,onClose:()=>x(!1)})]})}var en=require("react"),ce=require("@mui/material"),Zf=a(require("@mui/icons-material/ExpandLess"),1),Jf=a(require("@mui/icons-material/ExpandMore"),1),ex=a(require("@mui/icons-material/ConfirmationNumberOutlined"),1),ox=a(require("@mui/icons-material/Check"),1),tx=a(require("@mui/icons-material/DirectionsRunOutlined"),1),nx=a(require("@mui/icons-material/SpeedOutlined"),1),Ma=a(require("@mui/icons-material/CheckCircle"),1),rx=a(require("@mui/icons-material/CheckCircleOutlineOutlined"),1),Ea=a(require("@mui/icons-material/CheckCircleOutlined"),1),cs=a(require("@mui/icons-material/AccessTimeOutlined"),1),ix=a(require("@mui/icons-material/AutorenewOutlined"),1),ax=a(require("@mui/icons-material/LabelOutlined"),1),lx=a(require("@mui/icons-material/PersonOutlineOutlined"),1),sx=a(require("@mui/icons-material/SubjectOutlined"),1),cx=a(require("@mui/icons-material/StickyNote2Outlined"),1),mx=a(require("@mui/icons-material/PanToolAltOutlined"),1);var Kf=require("react"),Uf=require("@ehfuse/mui-form-controls"),Vf=require("react/jsx-runtime");function is({value:e,onCommit:o,onDraftChange:t,readOnly:n=!1}){let[r,i]=(0,Kf.useState)(null);return(0,Vf.jsx)(Uf.TextField,{value:r??e,placeholder:n?"":"\uBE44\uACE0 \uC785\uB825",fullWidth:!0,size:"medium",slotProps:{input:{readOnly:n}},onChange:l=>{i(l.target.value),t?.(l.target.value)},onBlur:()=>{r!==null&&r.trim()!==e&&o(r),i(null)},onKeyDown:l=>{l.key==="Enter"&&l.target.blur(),l.key==="Escape"&&i(null)},sx:{mt:1}})}var An=require("react"),To=require("@mui/material"),jf=a(require("@mui/icons-material/AccountTreeOutlined"),1),Yf=a(require("@mui/icons-material/Add"),1),Xf=a(require("@mui/icons-material/Close"),1),Qf=a(require("@mui/icons-material/NextPlanOutlined"),1);function qn(e){return e.relations??[]}function eh(e,o,t){return qn(e).some(n=>n.type===t&&n.task_seq===o.seq)||qn(o).some(n=>n.type===t&&n.task_seq===e.seq)}function Gf(e){return`${e.created_time??""}|${String(e.seq).padStart(12,"0")}`}function wa(e,o){let t=new Map(o.map(m=>[m.seq,m]));t.set(e.seq,e);let n=new Map,r=(m,x)=>{n.has(m)||n.set(m,new Set),n.has(x)||n.set(x,new Set),n.get(m).add(x),n.get(x).add(m)};for(let m of t.values())for(let x of qn(m))x.type==="follow_up"&&t.has(x.task_seq)&&r(m.seq,x.task_seq);let i=new Set([e.seq]),l=[e.seq];for(;l.length>0;){let m=l.shift();for(let x of n.get(m)??[])i.has(x)||(i.add(x),l.push(x))}let s=[...i].map(m=>t.get(m)).filter(m=>!!m).sort((m,x)=>Gf(m).localeCompare(Gf(x))),p=new Set;for(let m of qn(e))m.type==="related"&&p.add(m.task_seq);for(let m of t.values())m.seq!==e.seq&&qn(m).some(x=>x.type==="related"&&x.task_seq===e.seq)&&p.add(m.seq);let c=[...p].map(m=>t.get(m)).filter(m=>m!==void 0&&m.seq!==e.seq),d=[...t.values()].filter(m=>m.seq!==e.seq&&qn(m).some(x=>x.type==="duplicate_of"&&x.task_seq===e.seq)),g=qn(e).find(m=>m.type==="duplicate_of")?.task_seq,f=g?t.get(g)??null:null;return{lineage:s,related:c,duplicates:d,duplicateOf:f}}function Da(e,o){let t=wa(e,o);return(t.lineage.length>=2?t.lineage.length-1:0)+t.related.length+t.duplicates.length+(t.duplicateOf?1:0)}function as(e,o){return Da(e,o)>0}var he=require("react/jsx-runtime");function ls({item:e,caption:o,onOpen:t,onUnlink:n}){let r=co(e.icon||Ge);return(0,he.jsxs)(To.Box,{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?(0,he.jsx)(To.Box,{component:"span",sx:{flexShrink:0,px:.6,py:.1,borderRadius:.75,fontSize:11.5,fontWeight:500,color:"#8a6d1d",bgcolor:"#faf1d7"},children:o}):null,r?(0,he.jsx)(r,{sx:{fontSize:16,flexShrink:0,color:e.icon_color||"#1e3a8a"}}):null,(0,he.jsxs)(To.Box,{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]}),(0,he.jsx)(Ye,{option:Xo(e),small:!0}),n?(0,he.jsx)(To.IconButton,{className:"taskbox-relation-unlink",size:"small","aria-label":"\uC5F0\uACB0 \uD574\uC81C",onClick:n,sx:{opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:(0,he.jsx)(Xf.default,{sx:{fontSize:15}})}):null]})}function ss({task:e,tasks:o,readOnly:t=!1,onOpenTask:n,onLink:r,onUnlink:i,onCreateFollowUp:l}){let[s,p]=(0,An.useState)(!1),[c,d]=(0,An.useState)(null),[g,f]=(0,An.useState)(null),m=(0,An.useMemo)(()=>wa(e,o),[e,o]),x=m.lineage.length>=2,O=(0,An.useMemo)(()=>Da(e,o),[e,o]),v=(0,An.useMemo)(()=>{let b=new Set;for(let w of m.lineage)b.add(w.seq);for(let w of m.related)b.add(w.seq);for(let w of m.duplicates)b.add(w.seq);return m.duplicateOf&&b.add(m.duplicateOf.seq),[...b]},[m]),h=(b,w,B)=>{f({anchorEl:b,targetSeq:w,type:B})};return(0,he.jsxs)(kt,{icon:(0,he.jsx)(jf.default,{sx:{fontSize:19,display:"block"}}),title:(0,he.jsxs)(he.Fragment,{children:["\uAD00\uB828 \uC5C5\uBB34",O>0?(0,he.jsx)(To.Box,{component:"span",sx:{fontSize:12.5,color:"#9a9a97"},children:O}):null]}),titleExtra:t?null:(0,he.jsxs)(To.Box,{sx:{ml:"auto",display:"flex",alignItems:"center",gap:.5},children:[l?(0,he.jsx)(To.Button,{size:"small",color:"inherit",startIcon:(0,he.jsx)(Qf.default,{sx:{fontSize:16}}),onClick:b=>d(b.currentTarget),sx:{minWidth:0,px:1,fontSize:12.5,color:"#787774"},children:"\uD6C4\uC18D \uC5C5\uBB34"}):null,r?(0,he.jsx)(To.Button,{size:"small",color:"inherit",startIcon:(0,he.jsx)(Yf.default,{sx:{fontSize:16}}),onClick:()=>p(!0),sx:{minWidth:0,px:1,fontSize:12.5,color:"#787774"},children:"\uC5F0\uACB0"}):null]}),children:[(0,he.jsxs)(To.Box,{sx:{display:"flex",flexDirection:"column",mt:.5,pl:3.25},children:[x?(0,he.jsx)(To.Box,{sx:{mb:m.related.length||m.duplicates.length||m.duplicateOf?1:0},children:m.lineage.map((b,w)=>{let B=b.seq===e.seq,P=w===m.lineage.length-1;return(0,he.jsxs)(To.Box,{sx:{display:"flex",gap:1},children:[(0,he.jsxs)(To.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",width:14,flexShrink:0,pt:1.1},children:[(0,he.jsx)(To.Box,{sx:{width:B?9:7,height:B?9:7,borderRadius:"50%",bgcolor:B?"#2f80ed":b.completed?"#9a9a97":"#c9c8c5",flexShrink:0}}),P?null:(0,he.jsx)(To.Box,{sx:{width:"2px",flex:1,bgcolor:"#e6e6e3"}})]}),(0,he.jsxs)(To.Box,{sx:{flex:1,minWidth:0,pb:P?0:.5},children:[(0,he.jsxs)(To.Box,{sx:{display:"flex",alignItems:"center",gap:.75},children:[(0,he.jsxs)(To.Box,{component:"span",onClick:!B&&n?()=>n(b.seq):void 0,sx:{minWidth:0,fontSize:14,fontWeight:B?600:400,color:B?"#2f80ed":b.completed?"#9a9a97":"#37352f",textDecoration:b.completed?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...!B&&n?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}},children:[b.ticket_no?`${b.ticket_no} `:"",b.title]}),(0,he.jsx)(Ye,{option:Xo(b),small:!0})]}),(0,he.jsx)(To.Box,{sx:{fontSize:12,color:"#9a9a97"},children:b.completed&&b.completed_time?`${b.completed_time} \uC644\uB8CC`:b.created_time??""})]})]},b.seq)})}):null,m.duplicateOf?(0,he.jsx)(ls,{item:m.duplicateOf,caption:"\uC6D0\uBCF8",onOpen:n?()=>n(m.duplicateOf.seq):void 0,onUnlink:!t&&i?b=>h(b.currentTarget,m.duplicateOf.seq,"duplicate_of"):void 0}):null,m.duplicates.map(b=>(0,he.jsx)(ls,{item:b,caption:"\uC911\uBCF5",onOpen:n?()=>n(b.seq):void 0,onUnlink:!t&&i?w=>h(w.currentTarget,b.seq,"duplicate_of"):void 0},`dup-${b.seq}`)),m.related.map(b=>(0,he.jsx)(ls,{item:b,onOpen:n?()=>n(b.seq):void 0,onUnlink:!t&&i?w=>h(w.currentTarget,b.seq,"related"):void 0},`rel-${b.seq}`)),O===0?(0,he.jsx)(To.Box,{sx:{px:1.25,py:.75,fontSize:13.5,color:"#9a9a97"},children:"\uC5F0\uACB0\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):null]}),r?(0,he.jsx)(gi,{open:s,task:e,tasks:o,excludeSeqs:v,onClose:()=>p(!1),onSubmit:(b,w)=>r(e.seq,b,w)}):null,(0,he.jsx)(uo,{open:!!c,anchorEl:c,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:()=>d(null),onConfirm:()=>{l?.(e.seq),d(null)}}),(0,he.jsx)(uo,{open:!!g,anchorEl:g?.anchorEl??null,title:"\uC774 \uC5C5\uBB34\uC640\uC758 \uC5F0\uACB0\uC744 \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uD574\uC81C",onCancel:()=>f(null),onConfirm:()=>{g&&i?.(e.seq,g.targetSeq,g.type),f(null)}})]})}var _=require("react/jsx-runtime");function qr({label:e="\uBE44\uC5B4 \uC788\uC74C"}){return(0,_.jsx)(ce.Box,{component:"span",sx:{color:"#9a9a97"},children:e})}function ms({task:e,customTabs:o,statusOptions:t,avatarSrcByName:n,onChangeStatus:r,onChangeLabels:i,onAddLabelOption:l,onChangeProject:s,onAddProject:p,onChangeDate:c,onChangeReminder:d,onMemberEdit:g,onChangePriority:f,onChangeEstimatedTime:m,onChangeEventTime:x,onChangeEventPlace:O,onChangeEventAddress:v,onChangeNote:h,onChangeContent:b,onChangeContentHeight:w,onAddChecklistItem:B,onToggleChecklistItem:P,onRemoveChecklistItem:S,onUpdateChecklistItem:D,onConvertChecklistToTask:R,onOpenChecklistTask:I,onLinkChecklistTask:E,resolveChecklistTask:H,relatedTasksPool:u,onOpenRelatedTask:y,onLinkRelatedTask:k,onUnlinkRelatedTask:T,onCreateFollowUpTask:q,onAddAttachments:F,onRemoveAttachment:ge,onPreview:xe,onDownload:we,onUpdateComment:ke,onRemoveComment:Ie,onToggleCommentReaction:De,currentUserName:Te="",myAccountSeq:ie=0,noticeAdmin:Ze=!1,hideProject:ro=!1,hideLabel:G=!1,showTitle:Y=!1,onChangeTitle:re,onToggleCompleted:C,onChangeIcon:W,onChangeIconColor:oe,employees:X=[],onAckConfirm:We,onRequestConfirm:io,onChangeBugField:bo,sprints:So=[],sprintProject:je=!1,hideSprint:Io=!1,onChangeSprint:ee,onChangeStoryPoints:M,onChangeResolution:Le,onClaimTask:K,onVerifyBug:Ae}){let[Bo,Go]=(0,en.useState)(null),[Cn,Wt]=(0,en.useState)(null),[xt,ln]=(0,en.useState)(null),[$t,yt]=(0,en.useState)(null),[ar,Fe]=(0,en.useState)(!1),L={[Dt]:ar?{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"}},[j,de]=(0,en.useState)(null),[be,_e]=(0,en.useState)(null),[so,Oo]=(0,en.useState)(null),[zo,No]=(0,en.useState)(null),$e=!!e.is_notice,ae=!!e.is_event,jo=!!e.is_bug,tt=!!K&&Qr(e,ie),vn=!!K&&Zr(e,ie),Ot=!!Ae&&jo&&!!e.completed&&ie>0&&(e.author_account_seq??0)===ie&&!(e.acks??[]).some(A=>A.account_seq===ie),qo=!Vt(e,ie),St=!e.is_event&&(e.is_notice?ie>0&&(e.author_account_seq??0)===ie:(e.author_account_seq??0)===ie||(e.manager_account_seq??0)===ie),$n=Un(e.icon||(e.is_notice?Yo:e.is_event?"event":Ge)),Nr=$e?!Xr(e,ie):qo,lr=tt||vn?(0,_.jsxs)(jn,{onClick:A=>No(A.currentTarget),children:[(0,_.jsx)(mx.default,{sx:{fontSize:16,mr:.5}}),"\uAC00\uC838\uAC00\uAE30"]}):null,Fr=$e?yi(e,X):"",gt=$e?Ql(e,X,ie):null,Ro=!$e&&!ae?ii(e,ie):null,sr=!!(Ro&&Ro.total>0||$e&>);return(0,_.jsxs)(_.Fragment,{children:[Y?(0,_.jsxs)(ce.Box,{sx:{px:2,pt:2,pb:.5,display:"flex",alignItems:"flex-start",gap:1},children:[St?(0,_.jsx)(ce.Checkbox,{checked:e.completed,icon:(0,_.jsx)(rx.default,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:(0,_.jsx)(Ma.default,{sx:{fontSize:22,color:"#2f80ed"}}),onChange:(A,cr)=>{xt||ln({anchorEl:A.currentTarget,nextCompleted:cr})},sx:{p:0,mt:.25}}):null,(0,_.jsx)(ce.IconButton,{size:"small","aria-label":"\uC544\uC774\uCF58 \uBCC0\uACBD",onClick:qo?void 0:A=>Wt(A.currentTarget),sx:{p:0,mt:.25,color:e.icon_color||($e?"#e5484d":"#1e3a8a")},children:(0,_.jsx)($n,{sx:{fontSize:20}})}),(0,_.jsx)(ce.Box,{sx:{flex:1,minWidth:0},children:Bo!==null?(0,_.jsx)(ce.Box,{component:"input",autoFocus:!0,spellCheck:!1,value:Bo,onChange:A=>Go(A.target.value),onBlur:()=>{Bo.trim()&&Bo.trim()!==e.title&&re(e.seq,Bo.trim()),Go(null)},onKeyDown:A=>{A.key==="Enter"&&A.target.blur(),A.key==="Escape"&&Go(null)},sx:{width:"100%",border:"none",outline:"none",font:"inherit",fontSize:19,fontWeight:600,color:"#37352f",p:0,m:0}}):(0,_.jsx)(ce.Box,{onClick:()=>Go(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})}),(0,_.jsx)(uo,{open:!!xt,anchorEl:xt?.anchorEl??null,title:xt?.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:xt?.nextCompleted?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>ln(null),onConfirm:()=>{xt&&C(e.seq,xt.nextCompleted),ln(null)}}),(0,_.jsx)(er,{anchorEl:Cn,value:e.icon||($e?Yo:""),color:e.icon_color||($e?"#e5484d":"#1e3a8a"),onSelect:A=>W(e.seq,A),onSelectColor:A=>oe?.(e.seq,A),onClose:()=>Wt(null)})]}):null,(0,_.jsxs)(ce.Box,{sx:{py:1.5,display:"flex",flexDirection:"column",gap:0,[Dt]:{pb:0,"& > :last-child":{mb:0}}},children:[(0,_.jsx)(pi,{hideProject:ro,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:!ae,notice:$e,event:ae,readOnly:qo,targetSummary:Fr,onChangeProject:A=>s(e.seq,A),onAddProject:p,onChangeStartDate:A=>c(e.seq,"start_date",A),onChangeDueDate:A=>c(e.seq,"due_date",A),onChangeReminder:A=>d(e.seq,A),onChangePriority:A=>f(e.seq,A),onChangeEstimatedTime:A=>m(e.seq,A),onChangeEventTime:A=>x?.(e.seq,A),onChangeEventPlace:A=>O?.(e.seq,A),onChangeEventAddress:A=>v?.(e.seq,A),onMemberEdit:A=>g(e,A),narrowCollapsedSx:L,reminderLocked:e.completed,managerAction:lr,leading:(0,_.jsxs)(_.Fragment,{children:[Ot||lr&&($e||ae)?(0,_.jsxs)(ce.Box,{sx:{gridColumn:"1 / -1",display:"flex",justifyContent:"flex-start",gap:2,px:2,py:1.5},children:[$e||ae?lr:null,Ot?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(ce.Button,{variant:"contained",size:"large",onClick:()=>Ae?.(e.seq,!0),sx:{bgcolor:"#2f80ed"},children:"\uAC80\uC99D\uC644\uB8CC"}),(0,_.jsx)(ce.Button,{variant:"outlined",size:"large",color:"error",onClick:()=>Ae?.(e.seq,!1),children:"\uC7AC\uC624\uD508"})]}):null]}):null,jo&&e.ticket_no?(0,_.jsx)(Ce,{icon:(0,_.jsx)(ex.default,{sx:{fontSize:17}}),label:"\uD2F0\uCF13",children:(0,_.jsx)(ce.Box,{component:"span",sx:{fontVariantNumeric:"tabular-nums"},children:e.ticket_no})}):null,ae?null:(0,_.jsx)(ce.Box,{sx:jo&&e.ticket_no||sr?void 0:{gridColumn:"1 / -1"},children:(0,_.jsx)(Ce,{icon:(0,_.jsx)(ix.default,{sx:{fontSize:17}}),label:"\uC0C1\uD0DC",onClick:qo||e.completed?void 0:A=>de(A),children:(0,_.jsx)(Ye,{option:Xo(e)})})}),Ro&&Ro.total>0?(0,_.jsx)(ce.Box,{children:(0,_.jsx)(Ce,{icon:(0,_.jsx)(Ea.default,{sx:{fontSize:17}}),label:"\uD655\uC778",children:Ro.canConfirm?(0,_.jsx)(ce.Button,{size:"small",variant:"contained",onClick:()=>We?.(e.seq),sx:{py:.1,px:1.25,minWidth:0,color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}},children:"\uD655\uC778"}):(0,_.jsxs)(ce.Button,{size:"small",variant:"outlined",color:"inherit",startIcon:Ro.myTime?(0,_.jsx)(Ma.default,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:A=>yt({anchorEl:A.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,$e&>?(0,_.jsx)(ce.Box,{children:(0,_.jsx)(Ce,{icon:(0,_.jsx)(Ea.default,{sx:{fontSize:17}}),label:"\uD655\uC778",children:(0,_.jsx)(ce.Box,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,minWidth:0},children:gt.canAck?(0,_.jsx)(ce.Button,{size:"small",variant:"contained",onClick:()=>We?.(e.seq),sx:{py:.1,px:1.25,minWidth:0,color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}},children:"\uD655\uC778"}):(0,_.jsx)(ce.Button,{size:"small",variant:"outlined",color:"inherit",startIcon:gt.acked?(0,_.jsx)(Ma.default,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:A=>yt({anchorEl:A.currentTarget,open:!0}),sx:{py:.1,px:1.25,minWidth:0,fontSize:13,color:"text.primary",borderColor:"#d5d8dc",bgcolor:"#fff",whiteSpace:"nowrap"},children:gt.total>0&>.count>=gt.total?"\uC644\uB8CC":(0,_.jsxs)(_.Fragment,{children:[gt.count,(0,_.jsx)(ce.Box,{component:"span",sx:{mx:.4},children:"/"}),gt.total]})})})})}):null,je&&!Io&&!ae&&!$e?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(Ce,{icon:(0,_.jsx)(tx.default,{sx:{fontSize:17}}),label:"\uBAA9\uD45C",onClick:qo?void 0:A=>_e(A),children:(e.sprint_seq??0)>0?So.find(A=>A.seq===e.sprint_seq)?.name??"\uC0AD\uC81C\uB41C \uC2A4\uD504\uB9B0\uD2B8":(0,_.jsx)(qr,{label:"\uBBF8\uBC30\uC815"})}),(0,_.jsx)(Ce,{icon:(0,_.jsx)(nx.default,{sx:{fontSize:17}}),label:"\uD3EC\uC778\uD2B8",children:(0,_.jsx)(Qt,{value:(e.story_points??0)>0?String(e.story_points):"",placeholder:"\uBBF8\uCD94\uC815",readOnly:qo,onCommit:A=>M?.(e.seq,Number(A.replace(/[^0-9.]/g,""))||0)})})]}):null,ae||G?null:(0,_.jsx)(ce.Box,{sx:[{gridColumn:"1 / -1"},L??null],children:(0,_.jsx)(Ce,{icon:(0,_.jsx)(ax.default,{sx:{fontSize:17}}),label:"\uB77C\uBCA8",onClick:qo?void 0:A=>Oo(A),children:(e.label_keys??[]).length>0?(0,_.jsx)(cn,{labelKeys:e.label_keys??[],labelOptions:t}):(0,_.jsx)(qr,{})})})]}),trailing:(0,_.jsxs)(_.Fragment,{children:[jo?(0,_.jsx)(fi,{values:{repro:e.bug_repro??"",device:e.bug_device??"",where:e.bug_where??"",version:e.bug_version??"",resolution:e.resolution??""},readOnly:qo,showResolution:!!e.completed,onChangeRepro:A=>bo?.(e.seq,"bug_repro",A),onChangeDevice:A=>bo?.(e.seq,"bug_device",A),onChangeWhere:A=>bo?.(e.seq,"bug_where",A),onChangeVersion:A=>bo?.(e.seq,"bug_version",A),onChangeResolution:A=>Le?.(e.seq,A)}):null,(0,_.jsx)(Ce,{icon:(0,_.jsx)(lx.default,{sx:{fontSize:17}}),label:"\uC791\uC131\uC790",sx:[Ao(9),L??null],children:e.created_by?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(Zo,{names:[e.created_by],size:20,avatarSrcByName:n}),e.created_by]}):(0,_.jsx)(qr,{})}),(0,_.jsx)(Ce,{icon:(0,_.jsx)(cs.default,{sx:{fontSize:17}}),label:"\uC791\uC131\uC2DC\uAC04",sx:[Ao(11),L??null],children:e.created_time?Ct(e.created_time):(0,_.jsx)(qr,{})}),e.completed?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(Ce,{icon:(0,_.jsx)(Ea.default,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC790",sx:[Ao(10),L??null],children:e.completed_by?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(Zo,{names:[e.completed_by],size:20,avatarSrcByName:n}),e.completed_by]}):(0,_.jsx)(qr,{})}),(0,_.jsx)(Ce,{icon:(0,_.jsx)(cs.default,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC2DC\uAC04",sx:[Ao(12),L??null],children:e.completed_time?Ct(e.completed_time):(0,_.jsx)(qr,{})})]}):null]})}),(0,_.jsxs)(ce.Box,{sx:{display:"none",[Dt]:{display:"block",mt:1.5,mb:0}},children:[(0,_.jsx)(ce.Divider,{sx:{borderColor:"#e6e6e3"}}),(0,_.jsx)(ce.ButtonBase,{onClick:()=>Fe(A=>!A),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:ar?(0,_.jsxs)(_.Fragment,{children:["\uC811\uAE30 ",(0,_.jsx)(Zf.default,{sx:{fontSize:18}})]}):(0,_.jsxs)(_.Fragment,{children:["\uC815\uBCF4 \uB354\uBCF4\uAE30 ",(0,_.jsx)(Jf.default,{sx:{fontSize:18}})]})})]}),(0,_.jsxs)(ce.Box,{children:[(0,_.jsx)(ce.Divider,{sx:{my:1.5,borderColor:"#e6e6e3",[Dt]:{mt:0,mb:1.25}}}),(0,_.jsx)(kt,{icon:(0,_.jsx)(sx.default,{sx:{fontSize:18,display:"block"}}),title:"\uB0B4\uC6A9",children:(0,_.jsx)(ce.Box,{sx:{userSelect:"text"},children:(0,_.jsx)(xi,{syncKey:e.seq,value:e.content??"",height:e.content_height??0,onChangeHeight:w?A=>w(e.seq,A):void 0,readOnly:qo,onChange:A=>b(e.seq,A)})})}),e.is_bug?null:(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(ce.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,_.jsx)(kt,{icon:(0,_.jsx)(cx.default,{sx:{fontSize:18,display:"block"}}),title:"\uBE44\uACE0",children:(0,_.jsx)(ce.Box,{sx:{userSelect:"text"},children:(0,_.jsx)(is,{value:e.note,readOnly:Nr,onCommit:A=>h(e.seq,A)})})})]}),ae?null:(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(ce.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,_.jsx)(bi,{taskSeq:e.seq,checklist:e.checklist??[],removeLocked:Nr,onAdd:B,onToggle:P,onRemove:S,onUpdate:D,onConvertToTask:R,onOpenLinkedTask:I,resolveLinkedTask:H,linkCandidates:u,linkBaseTask:e,onLinkExistingTask:E})]}),u&&!ae&&!$e&&as(e,u)?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(ce.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,_.jsx)(ss,{task:e,tasks:u,readOnly:qo,onOpenTask:y,onLink:k,onUnlink:T,onCreateFollowUp:q})]}):null,(0,_.jsx)(ce.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,_.jsx)(hi,{taskSeq:e.seq,attachments:e.attachments??[],removeLocked:Nr,onAdd:F,onRemove:ge,onPreview:xe?A=>xe({...A,taskSeq:e.seq}):void 0,onDownload:we?A=>we({...A,taskSeq:e.seq}):void 0})]}),(0,_.jsx)(ce.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,_.jsx)(ts,{taskSeq:e.seq,comments:e.comments??[],currentUserName:Te,myAccountSeq:ie,avatarSrcByName:n,onUpdate:ke,onRemove:Ie,onToggleReaction:De,onPreview:xe?A=>xe({...A,taskSeq:e.seq}):void 0,onDownload:we?A=>we({...A,taskSeq:e.seq}):void 0})]}),(0,_.jsx)(jr,{anchorEl:j,value:e.status,options:$e?gr:jo?_n:br,onSelect:A=>r(e.seq,A),onClose:()=>de(null)}),(0,_.jsx)(ce.Menu,{transitionDuration:0,anchorEl:be,open:!!be,onClose:()=>_e(null),children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...So.filter(A=>`custom-${A.group_seq}`===String(e.tab_key??"")).map(A=>({seq:A.seq,label:ht(A)}))].map(A=>(0,_.jsxs)(ce.MenuItem,{onClick:()=>{ee?.(e.seq,A.seq),_e(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[A.label,(e.sprint_seq??0)===A.seq?(0,_.jsx)(ox.default,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},A.seq))}),(0,_.jsx)(ri,{anchorEl:$t?.anchorEl??null,open:!!$t?.open,acks:e.acks??[],total:gt?.total??Ro?.total??0,avatarSrcByName:n,onRequestConfirm:io&&Ro&&Ro.count<Ro.total?()=>{io(e.seq),yt(A=>A?{...A,open:!1}:null)}:void 0,onClose:()=>yt(A=>A?{...A,open:!1}:null)}),(0,_.jsx)(Ti,{anchorEl:so,selectedKeys:e.label_keys??[],labelOptions:t,onToggle:A=>i(e.seq,Vr(e.label_keys??[],A)),onAddLabel:l,onClose:()=>Oo(null)}),(0,_.jsx)(uo,{open:!!zo,anchorEl:zo,title:tt?"\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:()=>No(null),onConfirm:()=>{K?.(e.seq),No(null)}})]})}var vo=require("react/jsx-runtime");function oh(){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 th({open:e,task:o,onClose:t,onAddComment:n,onSaveFields:r,myAccountSeq:i=0,onToggleCompleted:l,onChangeTitle:s,onChangeIcon:p,onChangeIconColor:c,activityItems:d,activityLoading:g,onLoadActivity:f,onPrint:m,...x}){let O=Ke(),v=(0,hn.useRef)(null);o&&(v.current=o);let h=o??v.current,[b,w]=(0,hn.useState)(!1),[B,P]=(0,hn.useState)({}),S=Object.keys(B).length>0;(0,hn.useEffect)(()=>{P({})},[o?.seq,e]);let D=(0,hn.useRef)(null);if((0,hn.useEffect)(()=>{D.current?.scrollTo({top:0})},[o?.seq]),!h)return null;let R=O&&S?{...h,...B}:h,I=(k,T)=>{O?P(q=>({...q,...k})):T()},E=()=>{let k=B;P({});let T=h.seq,q=k.title===void 0?void 0:String(k.title).trim();if(r){let F={...k};q!==void 0&&(q?F.title=q:delete F.title),Object.keys(F).length>0&&r(T,F),(0,us.SuccessAlert)({message:"\uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",position:"center"});return}q&&s(T,q),k.icon!==void 0&&p(T,String(k.icon)),k.icon_color!==void 0&&c?.(T,String(k.icon_color)),k.status!==void 0&&x.onChangeStatus(T,k.status),k.label_keys!==void 0&&x.onChangeLabels(T,k.label_keys??[]),k.tab_key!==void 0&&x.onChangeProject(T,String(k.tab_key??"")),k.start_date!==void 0&&x.onChangeDate(T,"start_date",String(k.start_date??"")),k.due_date!==void 0&&x.onChangeDate(T,"due_date",String(k.due_date??"")),k.reminder!==void 0&&x.onChangeReminder(T,k.reminder),k.priority!==void 0&&x.onChangePriority(T,k.priority),k.estimated_time!==void 0&&x.onChangeEstimatedTime(T,String(k.estimated_time??"")),k.event_time!==void 0&&x.onChangeEventTime?.(T,String(k.event_time??"")),k.event_place!==void 0&&x.onChangeEventPlace?.(T,String(k.event_place??"")),k.event_address!==void 0&&x.onChangeEventAddress?.(T,String(k.event_address??"")),k.content!==void 0&&x.onChangeContent(T,String(k.content??"")),k.note!==void 0&&x.onChangeNote(T,String(k.note??"")),(0,us.SuccessAlert)({message:"\uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",position:"center"})},H={...x,onChangeStatus:(k,T)=>I({status:T},()=>x.onChangeStatus(k,T)),onChangeLabels:(k,T)=>I({label_keys:T},()=>x.onChangeLabels(k,T)),onChangeProject:(k,T)=>I({tab_key:T},()=>x.onChangeProject(k,T)),onChangeDate:(k,T,q)=>I({[T]:q},()=>x.onChangeDate(k,T,q)),onChangeReminder:(k,T)=>I({reminder:T},()=>x.onChangeReminder(k,T)),onChangePriority:(k,T)=>I({priority:T},()=>x.onChangePriority(k,T)),onChangeEstimatedTime:(k,T)=>I({estimated_time:T},()=>x.onChangeEstimatedTime(k,T)),onChangeEventTime:(k,T)=>I({event_time:T},()=>x.onChangeEventTime?.(k,T)),onChangeEventPlace:(k,T)=>I({event_place:T},()=>x.onChangeEventPlace?.(k,T)),onChangeEventAddress:(k,T)=>I({event_address:T},()=>x.onChangeEventAddress?.(k,T)),onChangeContent:(k,T)=>I({content:T},()=>x.onChangeContent(k,T)),onChangeNote:(k,T)=>I({note:T},()=>x.onChangeNote(k,T))},u=(0,vo.jsx)(ms,{...H,task:R,myAccountSeq:i,onChangeTitle:(k,T)=>I({title:T},()=>s(k,T)),onToggleCompleted:l,onChangeIcon:(k,T)=>I({icon:T},()=>p(k,T)),onChangeIconColor:(k,T)=>I({icon_color:T},()=>c?.(k,T)),showTitle:O}),y=(0,vo.jsx)(ns,{onSubmit:(k,T)=>n(R.seq,k,T)},R.seq);return O?(0,vo.jsxs)(vo.Fragment,{children:[(0,vo.jsx)(fx.FormDialog,{open:e,onClose:t,locale:"ko",fontScale:{enabled:!0,default:1.1,min:.6},title:R.is_notice?"\uACF5\uC9C0\uC0AC\uD56D":R.is_event?"\uC77C\uC815":R.is_bug?"\uC624\uB958":"\uC5C5\uBB34",titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1},custom:[...f?[{icon:(0,vo.jsx)(dx.default,{sx:{ml:2,color:"#6b7280"}}),tooltip:"\uD65C\uB3D9",onClick:()=>w(!0)}]:[],{icon:(0,vo.jsx)(ux.default,{sx:{ml:f?0:2,color:"#6b7280"}}),tooltip:"\uACF5\uC720\uD558\uAE30",onClick:()=>rr(R,!0)},{icon:(0,vo.jsx)(Mt.Button,{variant:"contained",size:"small",disableElevation:!0,disabled:!S,onClick:S?E: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:y},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:(0,vo.jsx)(Mt.Box,{sx:{userSelect:"none",width:"100%",minWidth:0,display:"flex",flexDirection:"column",gap:0},children:u})}]},h.seq),(0,vo.jsx)(Bi,{open:b,taskSeq:R.seq,items:d,loading:g,onLoad:f,onClose:()=>w(!1)})]}):(0,vo.jsx)(Mt.Drawer,{anchor:"right",open:e,onClose:t,disableAutoFocus:!0,disableEnforceFocus:!0,sx:{zIndex:k=>k.zIndex.modal},slotProps:{paper:{sx:{width:720,maxWidth:"100vw"}}},children:(0,vo.jsxs)(Mt.Box,{sx:{display:"flex",flexDirection:"column",height:"100%",userSelect:"none"},children:[(0,vo.jsx)(rs,{task:R,myAccountSeq:i,onToggleCompleted:l,onChangeTitle:s,onChangeIcon:p,onChangeIconColor:c,onClose:t,activityItems:d,activityLoading:g,onLoadActivity:f,onPrint:m}),(0,vo.jsx)(Mt.Divider,{sx:{borderColor:"#e6e6e3"}}),(0,vo.jsx)(Mt.Box,{sx:{flex:1,minHeight:0},children:(0,vo.jsx)(px.default,{ref:D,style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:u})}),(0,vo.jsx)(Mt.Divider,{sx:{borderColor:"#37352f"}}),(0,vo.jsx)(Mt.Box,{sx:{flexShrink:0},children:y})]})})}var on=require("react"),yo=require("@mui/material"),bx=require("@ehfuse/mui-form-dialog"),hx=a(require("@mui/icons-material/EditOutlined"),1),ds=require("@ehfuse/alerts"),kn=require("@ehfuse/mui-form-controls");var Oa="custom-";function xx(e){return e.startsWith(Oa)}function nh(e){return e>0?`${Oa}${e}`:""}function Ra(e){if(!xx(e))return 0;let o=Number(e.slice(Oa.length));return Number.isInteger(o)&&o>0?o:0}var Pe=require("react/jsx-runtime"),rh=[{value:"planning",label:"\uACC4\uD68D\uC911"},{value:"active",label:"\uC9C4\uD589\uC911"},{value:"closed",label:"\uC885\uB8CC"}];function gx(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?e.slice(5).replace("-","."):"-"}function ih({open:e,customTabs:o,sprints:t,onClose:n,onCreate:r,onUpdate:i,onChangeStatus:l,onRemove:s}){let p=o.filter(u=>u.useSprints&&!u.archived),[c,d]=(0,on.useState)(""),[g,f]=(0,on.useState)(""),[m,x]=(0,on.useState)(""),[O,v]=(0,on.useState)(""),[h,b]=(0,on.useState)(""),[w,B]=(0,on.useState)(!1),[P,S]=(0,on.useState)(0);(0,on.useEffect)(()=>{e&&(d(p.length===1?p[0].key:""),f(""),x(""),v(""),b(""),S(0))},[e]);let D=()=>{f(""),x(""),v(""),b(""),S(0)},R=u=>{S(u.seq),d(`custom-${u.group_seq}`),f(u.name),x(u.goal),v(u.start_date),b(u.end_date)},I=async()=>{let u=Ra(c);if(!u){(0,ds.ErrorAlert)("\uBAA9\uD45C\uB97C \uB9CC\uB4E4 \uD504\uB85C\uC81D\uD2B8\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return}if(!g.trim()){(0,ds.ErrorAlert)("\uBAA9\uD45C \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}B(!0);try{if(P>0){i(P,{name:g.trim(),goal:m.trim(),start_date:O,end_date:h}),D();return}await r({group_seq:u,name:g.trim(),goal:m.trim(),start_date:O,end_date:h})&&D()}finally{B(!1)}},E=new Map(o.map(u=>[Ra(u.key),u.label])),H=(0,Pe.jsx)(yo.Box,{children:p.length===0?(0,Pe.jsx)(yo.Box,{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.'}):(0,Pe.jsxs)(Pe.Fragment,{children:[(0,Pe.jsxs)(yo.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2.5,mt:1},children:[(0,Pe.jsx)(kn.LabelSelect,{label:"\uD504\uB85C\uC81D\uD2B8",size:"medium",value:c,options:p.map(u=>({value:u.key,label:u.label})),onChange:u=>d(String(u.target.value)),disabled:P>0}),(0,Pe.jsx)(kn.ClearTextField,{label:"\uBAA9\uD45C \uC774\uB984",size:"medium",placeholder:"\uC608: 8\uC6D4 2\uC8FC\uCC28",value:g,onChange:u=>f(u.target.value)}),(0,Pe.jsx)(kn.DateTextField,{size:"medium",label:"\uC2DC\uC791\uC77C",value:O,onChange:u=>v(u.target.value)}),(0,Pe.jsx)(kn.DateTextField,{size:"medium",label:"\uC885\uB8CC\uC77C",value:h,onChange:u=>b(u.target.value)}),(0,Pe.jsx)(kn.ClearTextField,{label:"\uC124\uBA85",size:"medium",placeholder:"\uC120\uD0DD \uC785\uB825",value:m,onChange:u=>x(u.target.value),sx:{gridColumn:"1 / -1"}})]}),(0,Pe.jsxs)(yo.Box,{sx:{mt:1.5,display:"flex",justifyContent:"flex-end",gap:1},children:[P>0?(0,Pe.jsx)(yo.Button,{color:"inherit",onClick:D,disabled:w,children:"\uCDE8\uC18C"}):null,(0,Pe.jsx)(yo.Button,{variant:"contained",onClick:()=>{I()},disabled:w,children:P>0?"\uBAA9\uD45C \uC800\uC7A5":"\uBAA9\uD45C \uB9CC\uB4E4\uAE30"})]}),(0,Pe.jsx)(yo.Box,{sx:{mt:2,borderTop:"1px solid #e6e6e3"},children:t.length===0?(0,Pe.jsx)(yo.Box,{sx:{py:3,textAlign:"center",fontSize:14,color:"#9a9a97"},children:"\uB4F1\uB85D\uB41C \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):t.map(u=>(0,Pe.jsxs)(yo.Box,{sx:{display:"flex",flexDirection:"column",gap:1,py:1.75,borderBottom:"1px solid #f0efed"},children:[(0,Pe.jsxs)(yo.Box,{sx:{minWidth:0},children:[(0,Pe.jsxs)(yo.Box,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[(0,Pe.jsx)(yo.Box,{component:"span",sx:{fontSize:16,fontWeight:600,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},children:u.name}),(0,Pe.jsx)(yo.Box,{component:"span",sx:{flexShrink:0,px:1,py:.25,borderRadius:.75,bgcolor:"#f1f5f9",color:"#64748b",fontSize:13,fontWeight:500},children:E.get(u.group_seq)??"\uC0AD\uC81C\uB41C \uD504\uB85C\uC81D\uD2B8"}),(0,Pe.jsxs)(yo.Box,{component:"span",sx:{flexShrink:0,fontSize:14,color:"#57564f"},children:[gx(u.start_date)," ~ ",gx(u.end_date)]})]}),u.goal?(0,Pe.jsx)(yo.Box,{sx:{mt:.5,fontSize:14,color:"#787774",lineHeight:1.5},children:u.goal}):null]}),(0,Pe.jsxs)(yo.Box,{sx:{display:"flex",alignItems:"center",gap:.5},children:[(0,Pe.jsx)(kn.LabelSelect,{label:"\uC0C1\uD0DC",showLabel:!1,size:"small",value:u.status,options:rh.map(y=>({value:y.value,label:y.label})),onChange:y=>l(u.seq,String(y.target.value)),sx:{width:104,flexShrink:0}}),(0,Pe.jsx)(yo.IconButton,{"aria-label":"\uBAA9\uD45C \uC218\uC815",onClick:()=>R(u),sx:{color:"#9a9a97","&:hover":{color:"#2563eb"}},children:(0,Pe.jsx)(hx.default,{sx:{fontSize:18}})}),(0,Pe.jsx)(yo.IconButton,{"aria-label":"\uBAA9\uD45C \uC0AD\uC81C",onClick:()=>s(u.seq),sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:(0,Pe.jsx)(pn,{style:{width:16,height:16}})})]})]},u.seq))})]})});return(0,Pe.jsx)(bx.FormDialog,{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:H}],actions:{showCancelButton:!1,right:(0,Pe.jsx)(yo.Button,{variant:"contained",onClick:n,children:"\uB2EB\uAE30"})}})}var ps=require("react"),He=require("@mui/material"),kx=require("@ehfuse/mui-form-dialog"),Tx=a(require("@mui/icons-material/OpenInNewOutlined"),1),yx=a(require("@mui/icons-material/EventOutlined"),1),Sx=require("@ehfuse/alerts");var ve=require("react/jsx-runtime");function ah({open:e,imports:o,onRegister:t,onRemove:n,onClose:r}){let[i,l]=(0,ps.useState)(""),[s,p]=(0,ps.useState)(!1),c=async()=>{let f=i.trim();if(f){p(!0);try{await t(f)&&l("")}finally{p(!1)}}},d=async f=>{await(0,Sx.ConfirmDialog)({title:"\uAC00\uC838\uC624\uAE30 \uD574\uC81C",message:`"${f.name||"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}" \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30\uB97C \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&n(f.seq)},g=(0,ve.jsxs)(He.Box,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[(0,ve.jsxs)(He.Box,{sx:{color:"#37352f",lineHeight:1.7},children:["\uAD6C\uAE00 \uCE98\uB9B0\uB354\uC758 \uC77C\uC815\uC744 ",(0,ve.jsx)("b",{children:"\uC77D\uAE30\uC804\uC6A9"}),"\uC73C\uB85C \uC5C5\uBB34\uD568 \uCE98\uB9B0\uB354\uC5D0 \uD568\uAED8 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4.",(0,ve.jsx)("br",{}),"\uD45C\uC2DC/\uC228\uAE40\uC740 \uC5C5\uBB34\uD568 \uC6B0\uC0C1\uB2E8\uC758 ",(0,ve.jsx)("b",{children:"\uAD6C\uAE00 \uC77C\uC815"})," \uC2A4\uC704\uCE58\uB85C \uCF1C\uACE0 \uB055\uB2C8\uB2E4."]}),(0,ve.jsx)(He.Box,{sx:{fontWeight:700,color:"#37352f",mt:.5},children:"\uB4F1\uB85D\uB41C \uCE98\uB9B0\uB354"}),o.length>0?(0,ve.jsx)(He.Box,{sx:{display:"flex",flexDirection:"column",border:"1px solid #e6e6e3",borderRadius:1},children:o.map((f,m)=>(0,ve.jsxs)(He.Box,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:.75,borderTop:m>0?"1px solid #efefed":"none"},children:[(0,ve.jsx)(yx.default,{sx:{fontSize:18,color:"#0f9d58",flexShrink:0}}),(0,ve.jsx)(He.Box,{component:"span",sx:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:f.name||"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),(0,ve.jsx)(He.IconButton,{"aria-label":"\uAC00\uC838\uC624\uAE30 \uD574\uC81C",size:"small",onClick:()=>{d(f)},sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:(0,ve.jsx)(pn,{sx:{fontSize:18}})})]},f.seq))}):(0,ve.jsx)(He.Box,{sx:{color:"#9a9a97",px:.5},children:"\uC544\uC9C1 \uB4F1\uB85D\uB41C \uCE98\uB9B0\uB354\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}),(0,ve.jsx)(He.Divider,{sx:{my:1,borderColor:"#e6e6e3"}}),(0,ve.jsx)(He.Box,{sx:{fontWeight:700,color:"#37352f"},children:"\uC0C8 \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30"}),(0,ve.jsxs)(He.Box,{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:[(0,ve.jsx)(He.Box,{children:(0,ve.jsxs)(He.Box,{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 > ",(0,ve.jsx)("b",{children:"\uC124\uC815 \uBC0F \uACF5\uC720"}),"\uB97C \uC5FD\uB2C8\uB2E4."]})}),(0,ve.jsx)(He.Box,{children:(0,ve.jsxs)(He.Box,{component:"span",children:[(0,ve.jsx)("b",{children:"\uCE98\uB9B0\uB354 \uD1B5\uD569"})," \uC139\uC158\uC758 ",(0,ve.jsx)("b",{children:'"iCal \uD615\uC2DD\uC758 \uBE44\uBC00 \uC8FC\uC18C"'})," \uB97C \uBCF5\uC0AC\uD574 \uC544\uB798\uC5D0 \uBD99\uC5EC\uB123\uC73C\uC138\uC694."]})}),(0,ve.jsx)(He.Box,{children:(0,ve.jsx)(He.Box,{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."})}),(0,ve.jsx)(He.Box,{children:(0,ve.jsx)(He.Box,{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."})})]}),(0,ve.jsxs)(He.Box,{sx:{display:"flex",gap:2,alignItems:"center"},children:[(0,ve.jsx)(He.TextField,{value:i,onChange:f=>l(f.target.value),fullWidth:!0,label:"\uBE44\uBC00 iCal \uC8FC\uC18C",placeholder:"https://calendar.google.com/calendar/ical/\u2026/basic.ics",slotProps:{input:{spellCheck:!1}}}),(0,ve.jsx)(He.Button,{variant:"contained",disabled:!i.trim()||s,onClick:()=>{c()},sx:{flexShrink:0},children:s?"\uD655\uC778 \uC911\u2026":"\uB4F1\uB85D"})]})]});return(0,ve.jsx)(kx.FormDialog,{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:g}],actions:{showCancelButton:!1,left:(0,ve.jsx)(He.Button,{variant:"outlined",startIcon:(0,ve.jsx)(Tx.default,{sx:{fontSize:16}}),onClick:()=>window.open("https://calendar.google.com/calendar","_blank"),children:"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),right:(0,ve.jsx)(He.Button,{variant:"contained",onClick:r,children:"\uB2EB\uAE30"})}})}var Po=require("@mui/material"),Bx=require("@ehfuse/mui-form-dialog"),Cx=a(require("@mui/icons-material/ContentCopyOutlined"),1),fs=a(require("@mui/icons-material/OpenInNewOutlined"),1),xs=require("@ehfuse/alerts"),qe=require("react/jsx-runtime");function vx(e){return`${window.location.origin}/api/v1/taskbox/calendar/${e}.ics`}function lh({open:e,feed:o,feedTaskCount:t,buildFeedUrl:n,onSubscribe:r,onClose:i}){let l=n??vx,s=o.subscribed?l(o.token):"",p=()=>{navigator.clipboard.writeText(s).then(()=>(0,xs.InfoAlert)("\uD53C\uB4DC \uC8FC\uC18C\uB97C \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>(0,xs.InfoAlert)("\uBCF5\uC0AC\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uC8FC\uC18C\uB97C \uC9C1\uC811 \uC120\uD0DD\uD574 \uBCF5\uC0AC\uD558\uC138\uC694."))},c=()=>{let g=s.replace(/^https?:\/\//,"webcal://");window.open(`https://calendar.google.com/calendar/r?cid=${encodeURIComponent(g)}`,"_blank")},d=(0,qe.jsxs)(Po.Box,{sx:{display:"flex",flexDirection:"column",gap:2.5},children:[(0,qe.jsxs)(Po.Box,{sx:{color:"#37352f",lineHeight:1.7},children:["\uB0B4\uAC00 \uAD00\uC5EC\uD55C \uC5C5\uBB34\uB97C ",(0,qe.jsx)("b",{children:"\uC77D\uAE30\uC804\uC6A9"}),"\uC73C\uB85C \uAD6C\uAE00 \uCE98\uB9B0\uB354\uC5D0\uC11C \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4."]}),t===0?(0,qe.jsxs)(Po.Box,{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.",(0,qe.jsx)("br",{}),(0,qe.jsx)("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?(0,qe.jsxs)(qe.Fragment,{children:[(0,qe.jsx)(Po.TextField,{value:s,fullWidth:!0,label:"\uB0B4 \uD53C\uB4DC \uC8FC\uC18C",slotProps:{input:{readOnly:!0}}}),(0,qe.jsxs)(Po.Box,{sx:{display:"flex",gap:2},children:[(0,qe.jsx)(Po.Button,{variant:"outlined",startIcon:(0,qe.jsx)(Cx.default,{}),onClick:p,children:"\uC8FC\uC18C \uBCF5\uC0AC"}),(0,qe.jsx)(Po.Button,{variant:"contained",startIcon:(0,qe.jsx)(fs.default,{}),onClick:c,children:"Google \uCE98\uB9B0\uB354\uC5D0 \uCD94\uAC00"})]}),(0,qe.jsxs)(Po.Box,{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:[(0,qe.jsx)(Po.Box,{children:(0,qe.jsxs)("span",{children:["\uBC84\uD2BC\uC774 \uB3D9\uC791\uD558\uC9C0 \uC54A\uC73C\uBA74 \uAD6C\uAE00 \uCE98\uB9B0\uB354 > \uB2E4\uB978 \uCE98\uB9B0\uB354 + > ",(0,qe.jsx)("b",{children:"URL\uB85C \uCD94\uAC00"}),"\uC5D0 \uC704 \uC8FC\uC18C\uB97C \uBD99\uC5EC\uB123\uC73C\uC138\uC694."]})}),(0,qe.jsx)(Po.Box,{children:(0,qe.jsx)("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."})}),(0,qe.jsx)(Po.Box,{children:(0,qe.jsx)("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."})}),(0,qe.jsx)(Po.Box,{children:(0,qe.jsx)("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."})})]})]}):(0,qe.jsx)(Po.Button,{variant:"contained",onClick:r,sx:{alignSelf:"flex-start"},children:"\uAD6C\uB3C5 \uC2DC\uC791 (\uD53C\uB4DC \uBC1C\uAE09)"})]});return(0,qe.jsx)(Bx.FormDialog,{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:d}],actions:{showCancelButton:!1,left:(0,qe.jsx)(Po.Button,{variant:"outlined",startIcon:(0,qe.jsx)(fs.default,{sx:{fontSize:16}}),onClick:()=>window.open("https://calendar.google.com/calendar","_blank"),children:"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),right:(0,qe.jsx)(Po.Button,{variant:"contained",onClick:i,children:"\uB2EB\uAE30"})}})}var tn=require("react"),nn=require("@mui/material"),Ix=require("@ehfuse/mui-form-dialog"),_x=require("@ehfuse/mui-form-controls"),wx=require("@ehfuse/tree-view");var Vo=require("react/jsx-runtime");function Dx(e){return`${e.name}#${e.seq}`}function sh(e){return Number(e.slice(e.lastIndexOf("#")+1))||0}function ch(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 mh(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 uh(e){let o=[[e.name,e.role_name].filter(Boolean).join(" "),e.department].filter(Boolean).join(" / ");return{id:`emp:${e.seq}`,label:Dx(e),renderLabel:(0,Vo.jsx)(nn.Box,{component:"span",sx:{display:"inline-flex",alignItems:"baseline",gap:.75},children:(0,Vo.jsx)(nn.Box,{component:"span",sx:{fontWeight:400,color:"text.primary"},children:o})})}}function Mx(e,o){let t=(e.groups??[]).map(r=>Mx(r,o)).filter(r=>r!==null),n=(e.employees??[]).filter(r=>mh(r,o)).map(uh);return t.length===0&&n.length===0?null:{id:`group:${e.key}`,label:e.name,children:[...t,...n]}}function dh({groups:e,allEmployees:o,initialSelectedSeqs:t,multiple:n,isMobile:r,onSelectionChange:i}){let[l,s]=(0,tn.useState)(""),p=(0,tn.useMemo)(()=>e.map(d=>Mx(d,l.trim().toLowerCase())).filter(d=>d!==null),[e,l]),c=(0,tn.useMemo)(()=>o.filter(d=>t.includes(d.seq)).map(Dx),[]);return(0,Vo.jsxs)(Vo.Fragment,{children:[(0,Vo.jsx)(nn.Box,{sx:{px:1.5,py:1,borderBottom:"1px solid #cccccc",flexShrink:0},children:(0,Vo.jsx)(_x.SearchTextField,{size:"small",fullWidth:!0,placeholder:"\uC774\uB984, \uBD80\uC11C \uAC80\uC0C9",onSearch:s,onClear:()=>s(""),sx:{"& .MuiOutlinedInput-notchedOutline":{border:"none"},"& .MuiInputBase-root":{px:0}}})}),(0,Vo.jsx)(nn.Box,{sx:r?{display:"flex",flexDirection:"column"}:{flex:1,minHeight:0,overflow:"hidden",display:"flex",flexDirection:"column"},children:(0,Vo.jsx)(wx.TreeView,{items:p,checkbox:!0,multiSelect:n,selectionMode:"child",showSearch:!1,defaultExpanded:!0,initialSelections:c,onChange:d=>i(d.map(sh).filter(g=>g>0)),styles:{border:"none",borderRadius:"0"}})})]})}function ph({open:e,title:o="\uC9C1\uC6D0 \uC120\uD0DD",hint:t="",groups:n,multiple:r=!1,selectedSeqs:i,confirmText:l="\uD655\uC778",onConfirm:s,onClose:p}){let c=Ke(),[d,g]=(0,tn.useState)([]),[f,m]=(0,tn.useState)(0),x=(0,tn.useMemo)(()=>ch(n),[n]),O=i??[];(0,tn.useEffect)(()=>{e&&(g(O),m(h=>h+1))},[e]);let v=()=>{let h=x.filter(b=>d.includes(b.seq));s(r?h:h.slice(0,1)),p()};return(0,Vo.jsx)(Ix.FormDialog,{open:e,onClose:p,title:`${o}${r&&d.length>0?` (${d.length}\uBA85)`:""}`,locale:"ko",fullScreen:c,mobilePresentation:c?"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:(0,Vo.jsx)(nn.Box,{sx:{...c?{}:{height:560},display:"flex",flexDirection:"column",border:"1px solid #cccccc",borderRadius:1,...c?{}:{overflow:"hidden"},userSelect:"none"},children:(0,Vo.jsx)(dh,{groups:n,allEmployees:x,initialSelectedSeqs:O,multiple:r,isMobile:c,onSelectionChange:g},f)})}],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?(0,Vo.jsx)(nn.Typography,{variant:"body2",color:"text.secondary",sx:{whiteSpace:"pre-line",lineHeight:1.35},children:t}):void 0,right:(0,Vo.jsx)(nn.Button,{variant:"contained",onClick:v,children:l})}})}var Ar=require("react"),Ft=require("@mui/material"),Rx=require("@ehfuse/mui-form-dialog"),Px=require("@ehfuse/mui-form-controls");var Nt=require("@mui/material"),pt=require("react/jsx-runtime");function fh(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 gs({sprints:e,tasks:o,height:t=160}){let r=[...e].sort((d,g)=>`${d.start_date}|${d.seq}`.localeCompare(`${g.start_date}|${g.seq}`)).map(d=>({sprint:d,...fh(d,o)})),i=r.some(d=>d.points>0),l=r.map(d=>i?d.points:d.count),s=Math.max(1,...l),p=r.filter(d=>d.sprint.status==="closed").map(d=>i?d.points:d.count),c=p.length>0?Math.round(p.reduce((d,g)=>d+g,0)/p.length*10)/10:null;return r.length===0?(0,pt.jsx)(Nt.Box,{sx:{py:4,textAlign:"center",fontSize:14.5,color:"#9a9a97"},children:"\uD45C\uC2DC\uD560 \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):(0,pt.jsxs)(Nt.Box,{children:[(0,pt.jsxs)(Nt.Box,{sx:{mb:1,display:"flex",justifyContent:"space-between",fontSize:14,color:"#000"},children:[(0,pt.jsxs)("span",{children:["\uC644\uB8CC ",i?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uBAA9\uD45C\uBCC4"]}),c!==null?(0,pt.jsxs)("span",{children:["\uD3C9\uADE0(\uC885\uB8CC \uBAA9\uD45C)"," ",(0,pt.jsx)(Nt.Box,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:c}),i?"SP":"\uAC74"]}):null]}),(0,pt.jsx)(Nt.Box,{sx:{display:"flex",alignItems:"flex-end",gap:2,height:t,px:.5},children:r.map(d=>{let g=i?d.points:d.count,f=Math.round((t-24)*g/s),m=d.sprint.status==="closed";return(0,pt.jsxs)(Nt.Box,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-end",height:"100%"},children:[(0,pt.jsx)(Nt.Box,{sx:{fontSize:14,fontWeight:700,color:"#37352f",lineHeight:1.5},children:g}),(0,pt.jsx)(Nt.Box,{sx:{width:"60%",maxWidth:56,height:Math.max(2,f),borderRadius:"4px 4px 0 0",bgcolor:m?"#2f80ed":"#a9c9f5"}})]},d.sprint.seq)})}),(0,pt.jsx)(Nt.Box,{sx:{display:"flex",gap:2,px:.5,mt:.5},children:r.map(d=>(0,pt.jsxs)(Nt.Box,{sx:{flex:1,minWidth:0,textAlign:"center",fontSize:13.5,color:"#000",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[d.sprint.name,d.sprint.status!=="closed"?" (\uC9C4\uD589\uC911)":""]},d.sprint.seq))})]})}var Ox=require("react"),Ln=require("@mui/material"),Eo=require("react/jsx-runtime");function Ex(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?new Date(`${e}T00:00:00`):null}function xh(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function bs(e){return e.slice(5).replace("-",".")}function hs({sprint:e,tasks:o,todayStr:t,height:n=200}){let r=(0,Ox.useMemo)(()=>{let h=Ex(e.start_date),b=Ex(e.end_date);if(!h||!b||b<h||Math.round((b.getTime()-h.getTime())/864e5)+1>366)return null;let B=o.filter(u=>u.sprint_seq===e.seq&&!u.archived);if(B.length===0)return{empty:!0};let P=B.some(u=>(u.story_points??0)>0),S=u=>P?u.story_points??0:1,D=B.reduce((u,y)=>u+S(y),0),R=new Map;for(let u of B){if(!u.completed)continue;let y=(u.completed_time??"").slice(0,10),k=/^\d{4}-\d{2}-\d{2}$/.test(y)?y:e.start_date;R.set(k,(R.get(k)??0)+S(u))}let I=[];for(let u=new Date(h);u<=b;u.setDate(u.getDate()+1))I.push(xh(u));let E=D,H=[];for(let u of I){if(u>t)break;E-=R.get(u)??0,H.push({day:u,value:Math.max(0,E)})}return{empty:!1,days:I,total:D,usePoints:P,actual:H}},[e,o,t]);if(!r)return(0,Eo.jsx)(Ln.Box,{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(0,Eo.jsx)(Ln.Box,{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:l,usePoints:s,actual:p}=r,c=600,d=200,g=8,f=h=>i.length===1?0:h/(i.length-1)*c,m=h=>g+(d-g*2)*(1-h/Math.max(1,l)),x=`${f(0)},${m(l)} ${f(i.length-1)},${m(0)}`,O=p.map(h=>`${f(i.indexOf(h.day))},${m(h.value)}`).join(" "),v=p[p.length-1];return(0,Eo.jsxs)(Ln.Box,{children:[(0,Eo.jsxs)(Ln.Box,{sx:{mb:1,display:"flex",justifyContent:"space-between",fontSize:14,color:"#000"},children:[(0,Eo.jsxs)("span",{children:["\uB0A8\uC740 ",s?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uCD1D ",l]}),v?(0,Eo.jsxs)("span",{children:["\uD604\uC7AC"," ",(0,Eo.jsx)(Ln.Box,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:v.value}),s?"SP":"\uAC74"," \uB0A8\uC74C"]}):null]}),(0,Eo.jsx)(Ln.Box,{sx:{border:"1px solid #e6e6e3",borderRadius:1,bgcolor:"#fafaf9",px:1,py:.5},children:(0,Eo.jsxs)("svg",{viewBox:`0 0 ${c} ${d}`,preserveAspectRatio:"none",style:{display:"block",width:"100%",height:n},children:[(0,Eo.jsx)("line",{x1:0,y1:m(0),x2:c,y2:m(0),stroke:"#e6e6e3",strokeWidth:1}),(0,Eo.jsx)("polyline",{points:x,fill:"none",stroke:"#9a9a97",strokeWidth:1.5,strokeDasharray:"6 5",vectorEffect:"non-scaling-stroke"}),p.length>1?(0,Eo.jsx)("polyline",{points:O,fill:"none",stroke:"#2f80ed",strokeWidth:2.5,vectorEffect:"non-scaling-stroke"}):null,v?(0,Eo.jsx)("circle",{cx:f(i.indexOf(v.day)),cy:m(v.value),r:4,fill:"#2f80ed",vectorEffect:"non-scaling-stroke"}):null]})}),(0,Eo.jsxs)(Ln.Box,{sx:{mt:.5,display:"flex",justifyContent:"space-between",fontSize:13.5,color:"#000"},children:[(0,Eo.jsx)("span",{children:bs(e.start_date)}),t>e.start_date&&t<e.end_date?(0,Eo.jsxs)("span",{children:["\uC624\uB298 ",bs(t)]}):null,(0,Eo.jsx)("span",{children:bs(e.end_date)})]})]})}var ft=require("react/jsx-runtime");function gh({open:e,sprints:o,tasks:t,todayStr:n,initialSprintSeq:r=0,onClose:i}){let[l,s]=(0,Ar.useState)(0);(0,Ar.useEffect)(()=>{if(!e)return;let d=o.find(f=>f.status==="active")??o[0],g=o.find(f=>f.seq===r)??d;s(g?.seq??0)},[e]);let p=(0,Ar.useMemo)(()=>o.find(d=>d.seq===l)??null,[o,l]),c=(0,ft.jsxs)(Ft.Box,{sx:{display:"flex",flexDirection:"column"},children:[(0,ft.jsxs)(Ft.Box,{sx:{px:3,py:2.5},children:[(0,ft.jsx)(Ft.Box,{sx:{mb:1.5,fontSize:17,fontWeight:700,color:"#37352f"},children:"\uBCA8\uB85C\uC2DC\uD2F0"}),(0,ft.jsx)(gs,{sprints:o,tasks:t})]}),(0,ft.jsx)(Ft.Divider,{sx:{borderColor:"#e6e6e3"}}),(0,ft.jsxs)(Ft.Box,{sx:{px:3,py:2.5},children:[(0,ft.jsx)(Ft.Box,{sx:{mb:1.5,fontSize:17,fontWeight:700,color:"#37352f"},children:"\uBC88\uB2E4\uC6B4"}),(0,ft.jsx)(Px.LabelSelect,{label:"\uBAA9\uD45C",showLabel:!1,value:l?String(l):"",options:o.map(d=>({value:String(d.seq),label:ht(d)})),onChange:d=>s(Number(d.target.value)||0),sx:{width:280,mb:2}}),p?(0,ft.jsx)(hs,{sprint:p,tasks:t,todayStr:n}):(0,ft.jsx)(Ft.Box,{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(0,ft.jsx)(Rx.FormDialog,{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:c}],actions:{showCancelButton:!1,right:(0,ft.jsx)(Ft.Button,{variant:"contained",onClick:i,children:"\uB2EB\uAE30"})}})}var rn=require("@mui/material");var Tn=require("react/jsx-runtime");function bh({anchorEl:e,candidates:o,selectedNames:t,avatarSrcByName:n,onToggle:r,onClear:i,onClose:l}){return(0,Tn.jsxs)(rn.Menu,{anchorEl:e,open:!!e,onClose:l,transitionDuration:0,children:[o.length===0?(0,Tn.jsx)(rn.MenuItem,{disabled:!0,sx:{fontSize:14},children:"\uBAA9\uB85D\uC5D0 \uC9C0\uC815\uB41C \uC0AC\uB78C\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):o.map(s=>{let p=t.includes(s.name);return(0,Tn.jsxs)(rn.MenuItem,{onClick:()=>r(s),sx:{fontSize:14,minWidth:170,gap:1},children:[(0,Tn.jsx)(rn.Checkbox,{size:"small",checked:p,sx:{p:0}}),(0,Tn.jsx)(Zo,{names:[s.name],size:20,avatarSrcByName:n}),s.name]},`${s.accountSeq}-${s.name}`)}),(0,Tn.jsx)(rn.Divider,{}),(0,Tn.jsx)(rn.MenuItem,{disabled:t.length===0,onClick:i,sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}var zx=require("react"),Lr=require("@mui/material"),qx=a(require("@mui/icons-material/KeyboardArrowDown"),1),Ax=a(require("@mui/icons-material/Check"),1);var an=require("react/jsx-runtime");function hh({value:e,onChange:o,options:t}){let[n,r]=(0,zx.useState)(null),i=t??Fi,l=Fi.find(s=>s.value===e)?.label??"";return(0,an.jsxs)(an.Fragment,{children:[(0,an.jsxs)(Lr.ButtonBase,{onClick:s=>r(s.currentTarget),sx:{display:"flex",alignItems:"center",gap:.5,px:1,py:.5,borderRadius:1,fontSize:13.5,color:"#37352f","&:hover":{bgcolor:"#f2f2f0"}},children:[l,(0,an.jsx)(qx.default,{sx:{fontSize:17,color:"#9a9a97"}})]}),(0,an.jsx)(Lr.Menu,{transitionDuration:0,anchorEl:n,open:!!n,onClose:()=>r(null),children:i.map(s=>(0,an.jsxs)(Lr.MenuItem,{selected:s.value===e,onClick:()=>{o(s.value),r(null)},sx:{fontSize:14,minWidth:140,justifyContent:"space-between",gap:1},children:[s.label,s.value===e?(0,an.jsx)(Ax.default,{sx:{fontSize:16,color:"#2f80ed"}}):null]},s.value))})]})}var ir=require("@mui/material"),ks=require("@ehfuse/mui-form-controls");function Nn(e){let o=t=>String(t).padStart(2,"0");return`${e.getFullYear()}-${o(e.getMonth()+1)}-${o(e.getDate())}`}function Ci(e,o=new Date){let t=new Date(o);return t.setMonth(t.getMonth()-e),t}function kh(e=new Date){return{fromDate:Nn(Ci(1,e)),toDate:Nn(e)}}var yn=require("react/jsx-runtime"),Th=[{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 Ts({fromDate:e,toDate:o,onChange:t}){let n=i=>{if(i<=0){t("","");return}t(Nn(Ci(i)),Nn(new Date))},r=i=>i<=0?!e&&!o:!e||!o?!1:e===Nn(Ci(i))&&o===Nn(new Date);return(0,yn.jsxs)(ir.Box,{sx:{display:"flex",alignItems:"center",gap:1.5,flexWrap:"wrap"},children:[(0,yn.jsx)(ir.Box,{sx:{display:"flex",alignItems:"center",gap:1.5},children:Th.map(i=>{let l=r(i.months);return(0,yn.jsx)(ir.ButtonBase,{onClick:()=>n(i.months),sx:{px:1.25,py:.85,borderRadius:1,fontSize:13,fontWeight:l?500:400,border:"1px solid",borderColor:l?"#2f80ed":"#dedddb",color:l?"#2f80ed":"#37352f",bgcolor:l?"#eef6ff":"transparent","&:hover":{bgcolor:l?"#eef6ff":"#f7f7f5"}},children:i.label},i.label)})}),(0,yn.jsxs)(ir.Box,{sx:{display:"flex",alignItems:"center",gap:.5},children:[(0,yn.jsx)(ks.DateTextField,{value:e,size:"small",placeholder:"\uC2DC\uC791\uC77C",onChange:i=>t(i.target.value,o),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}}),(0,yn.jsx)(ir.Box,{component:"span",sx:{fontSize:13,color:"#9a9a97"},children:"~"}),(0,yn.jsx)(ks.DateTextField,{value:o,size:"small",placeholder:"\uC885\uB8CC\uC77C",onChange:i=>t(e,i.target.value),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}})]})]})}var Lx=require("@mui/material");var ys=require("react/jsx-runtime");function yh({anchorEl:e,fromDate:o,toDate:t,onChange:n,onClose:r}){return(0,ys.jsx)(Lx.Popover,{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:(0,ys.jsx)(Ts,{fromDate:o,toDate:t,onChange:n})})}var Fn=require("@mui/material"),Fx=a(require("@mui/icons-material/Checklist"),1),Hx=a(require("@mui/icons-material/Face"),1),Wx=a(require("@mui/icons-material/Publish"),1),$x=a(require("@mui/icons-material/NotificationsOutlined"),1),Kx=a(require("@mui/icons-material/BugReportOutlined"),1),Ux=a(require("@mui/icons-material/DescriptionOutlined"),1),Vx=a(require("@mui/icons-material/Inventory2Outlined"),1);var Et=require("react/jsx-runtime");function Nx(e,o){return o>0?`${e} (${o})`:e}var Sh=[{id:"my",label:"\uC804\uCCB4",icon:(0,Et.jsx)(Fx.default,{sx:{fontSize:18}})},{id:"notice",label:"\uACF5\uC9C0\uC0AC\uD56D",icon:(0,Et.jsx)($x.default,{sx:{fontSize:18}})},{id:"mine",label:"\uB0B4 \uC5C5\uBB34",icon:(0,Et.jsx)(Hx.default,{sx:{fontSize:18}})},{id:"sent",label:"\uBCF4\uB0B8 \uC5C5\uBB34",icon:(0,Et.jsx)(Wx.default,{sx:{fontSize:18}})},{id:"bug",label:"\uC624\uB958",icon:(0,Et.jsx)(Kx.default,{sx:{fontSize:18}})},{id:"archive",label:"\uBCF4\uAD00\uD568",icon:(0,Et.jsx)(Vx.default,{sx:{fontSize:18}}),hideCount:!0},{id:"report",label:"\uBCF4\uACE0\uC11C",icon:(0,Et.jsx)(Ux.default,{sx:{fontSize:18}}),hideCount:!0}];function Bh(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 Ch({items:e,activeTab:o,counts:t,onChange:n,compact:r=!1}){let i=se(),l=Bh(i.tabs),s=e;return r?(0,Et.jsx)(Fn.Box,{sx:{display:"flex",flexWrap:"wrap",gap:1.25},children:s.map(p=>{let c=o===p.id;return(0,Et.jsx)(Fn.ButtonBase,{onClick:()=>n(p.id),sx:{px:1.5,py:.75,borderRadius:1,fontSize:nt(13.5),fontWeight:500,whiteSpace:"nowrap",border:"1px solid",bgcolor:c?i.tabs.selectedBg:i.tabs.bg,color:c?i.tabs.selectedColor:i.tabs.color,borderColor:c?i.tabs.selectedBg:i.tabs.borderColor},children:Nx(p.label,p.hideCount?0:t[p.id]??0)},p.id)})}):(0,Et.jsx)(Fn.Tabs,{value:o,onChange:(p,c)=>n(c),sx:{minHeight:46,"& .MuiTabs-indicator":{display:"none"},"& .MuiTabs-flexContainer":{gap:"12px",minHeight:46}},children:s.map(p=>(0,Et.jsx)(Fn.Tab,{value:p.id,label:Nx(p.label,p.hideCount?0:t[p.id]??0),icon:p.icon,iconPosition:"start",sx:l},p.id))})}var Hn=require("react"),ye=require("@mui/material"),Gx=a(require("@mui/icons-material/OpenInNewOutlined"),1),jx=a(require("@mui/icons-material/Check"),1),Yx=a(require("@mui/icons-material/CheckCircleOutlined"),1),Xx=a(require("@mui/icons-material/RadioButtonUnchecked"),1),Qx=a(require("@mui/icons-material/SendOutlined"),1),Zx=a(require("@mui/icons-material/EventOutlined"),1),Jx=a(require("@mui/icons-material/PersonOutlineOutlined"),1),eg=a(require("@mui/icons-material/ViewKanbanOutlined"),1),og=a(require("@mui/icons-material/ContentCopyOutlined"),1),tg=a(require("@mui/icons-material/NextPlanOutlined"),1),ng=a(require("@mui/icons-material/ContentPasteOutlined"),1),rg=a(require("@mui/icons-material/ShareOutlined"),1),ig=a(require("@mui/icons-material/DirectionsRunOutlined"),1),Ss=a(require("@mui/icons-material/ChevronRight"),1),ag=a(require("@mui/icons-material/ArchiveOutlined"),1),lg=a(require("@mui/icons-material/UnarchiveOutlined"),1),sg=require("@ehfuse/alerts");var J=require("react/jsx-runtime");function vh({target:e,onClose:o,customTabs:t,sprints:n=[],myAccountSeq:r=0,onOpenDetail:i,onToggleCompleted:l,onRequestConfirm:s,onChangeDueDate:p,onChangeReminder:c,onMemberEdit:d,onMoveProject:g,onDuplicate:f,onCreateFollowUp:m,onShare:x,onAssignSprint:O,onArchiveToggle:v,onDelete:h}){let b=Ke(),w=Ut(),[B,P]=(0,Hn.useState)(null),[S,D]=(0,Hn.useState)(null),[R,I]=(0,Hn.useState)(null);(0,Hn.useEffect)(()=>{e||(P(null),D(null),I(null))},[e]);let E=e?.task??null,H=!!E?.is_notice,u=!!E?.is_event,y=E?!Vt(E,r):!1,k=(0,Hn.useMemo)(()=>new Set(t.filter(F=>F.useSprints).map(F=>F.key)),[t]),T=async()=>{let F=E;if(o(),!F)return;await(0,sg.ConfirmDialog)({title:"\uC5C5\uBB34 \uC0AD\uC81C",message:`"${F.title}" \uC5C5\uBB34\uB97C \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&h(F.seq)},q=()=>{E&&v(E.seq,!E.archived),o()};return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(ye.Menu,{open:!!e,onClose:o,transitionDuration:0,anchorReference:b?"none":"anchorPosition",anchorPosition:!b&&e?{top:e.position.top,left:e.position.left}:void 0,slotProps:{paper:{sx:{minWidth:190,...b?{position:"fixed",top:"50%",left:"50%",translate:"-50% -50%",maxHeight:"70vh"}:{}}},list:b?{sx:{"& .MuiMenuItem-root":{py:1,minHeight:0}}}:void 0},children:[(0,J.jsxs)(ye.MenuItem,{onClick:()=>{E&&i(E),o()},sx:{fontSize:14},children:[(0,J.jsx)(ye.ListItemIcon,{children:(0,J.jsx)(Gx.default,{sx:{fontSize:19}})}),"\uC0C1\uC138 \uC5F4\uAE30"]}),(0,J.jsxs)(ye.MenuItem,{disabled:H?(E?.author_account_seq??0)!==r:(E?.author_account_seq??0)!==r&&(E?.manager_account_seq??0)!==r,onClick:()=>{E&&l(E.seq,!E.completed),o()},sx:{fontSize:14},children:[(0,J.jsx)(ye.ListItemIcon,{children:E?.completed?(0,J.jsx)(Xx.default,{sx:{fontSize:19}}):(0,J.jsx)(Yx.default,{sx:{fontSize:19}})}),E?.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC"]}),!H&&s?(0,J.jsxs)(ye.MenuItem,{disabled:!(E?.manager_account_seq??0)&&(E?.receiver_account_seqs??[]).length===0,onClick:()=>{E&&s(E),o()},sx:{fontSize:14},children:[(0,J.jsx)(ye.ListItemIcon,{children:(0,J.jsx)(Qx.default,{sx:{fontSize:19}})}),"\uD655\uC778 \uC694\uCCAD"]}):null,u?null:(0,J.jsx)(ye.Divider,{}),u?null:(0,J.jsxs)(ye.MenuItem,{disabled:y,onClick:F=>{E&&P({anchorEl:F.currentTarget,task:E})},sx:{fontSize:14},children:[(0,J.jsx)(ye.ListItemIcon,{children:(0,J.jsx)(Zx.default,{sx:{fontSize:19}})}),"\uB9C8\uAC10\uAE30\uD55C \uBCC0\uACBD"]}),!H&&!u&&d?(0,J.jsxs)(ye.MenuItem,{onClick:()=>{E&&d(E,"manager"),o()},sx:{fontSize:14},children:[(0,J.jsx)(ye.ListItemIcon,{children:(0,J.jsx)(Jx.default,{sx:{fontSize:19}})}),"\uCC45\uC784\uC790 \uBCC0\uACBD"]}):null,u?null:(0,J.jsxs)(ye.MenuItem,{disabled:y,onClick:F=>{E&&D({anchorEl:F.currentTarget,task:E})},sx:{fontSize:14},children:[(0,J.jsx)(ye.ListItemIcon,{children:(0,J.jsx)(eg.default,{sx:{fontSize:19}})}),"\uD504\uB85C\uC81D\uD2B8 \uC774\uB3D9",(0,J.jsx)(Ss.default,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}),(0,J.jsx)(ye.Divider,{}),f?(0,J.jsxs)(ye.MenuItem,{disabled:y,onClick:()=>{E&&f(E.seq),o()},sx:{fontSize:14},children:[(0,J.jsx)(ye.ListItemIcon,{children:(0,J.jsx)(og.default,{sx:{fontSize:19}})}),"\uBCF5\uC81C"]}):null,m&&E&&!E.is_event&&!E.is_notice?(0,J.jsxs)(ye.MenuItem,{onClick:()=>{E&&m(E.seq),o()},sx:{fontSize:14},children:[(0,J.jsx)(ye.ListItemIcon,{children:(0,J.jsx)(tg.default,{sx:{fontSize:19}})}),"\uD6C4\uC18D \uC5C5\uBB34 \uB9CC\uB4E4\uAE30"]}):null,(0,J.jsxs)(ye.MenuItem,{onClick:()=>{E&&(x?x(E):rr(E,b)),o()},sx:{fontSize:14},children:[(0,J.jsx)(ye.ListItemIcon,{children:b?(0,J.jsx)(rg.default,{sx:{fontSize:19}}):(0,J.jsx)(ng.default,{sx:{fontSize:19}})}),b?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC"]}),E&&!E.is_notice&&!E.is_event&&k.has(String(E.tab_key??""))&&O?(0,J.jsxs)(ye.MenuItem,{onClick:F=>I(F.currentTarget),sx:{fontSize:14},children:[(0,J.jsx)(ye.ListItemIcon,{children:(0,J.jsx)(ig.default,{sx:{fontSize:19}})}),"\uBAA9\uD45C\uC5D0 \uB123\uAE30",(0,J.jsx)(Ss.default,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}):null,(0,J.jsxs)(ye.MenuItem,{onClick:q,disabled:y||!E?.archived&&!(E&&Kr(E)),sx:{fontSize:14},children:[(0,J.jsx)(ye.ListItemIcon,{children:E?.archived?(0,J.jsx)(lg.default,{sx:{fontSize:19}}):(0,J.jsx)(ag.default,{sx:{fontSize:19}})}),E?.archived?"\uBCF4\uAD00 \uD574\uC81C":"\uBCF4\uAD00"]}),(0,J.jsx)(ye.Divider,{}),(0,J.jsxs)(ye.MenuItem,{disabled:y,onClick:T,sx:{fontSize:14,color:"#e5484d"},children:[(0,J.jsx)(ye.ListItemIcon,{children:(0,J.jsx)(pn,{sx:{fontSize:19,color:"#e5484d"}})}),"\uC0AD\uC81C"]})]}),(0,J.jsx)(dn,{anchorEl:B?.anchorEl??null,open:!!B,date:B?.task.due_date??"",reminder:B?.task.reminder??"none",hideReminder:!!B?.task.completed,centered:b,onClose:()=>{P(null),o()},onDateChange:F=>{B&&p(B.task.seq,F)},onReminderChange:F=>{B&&c?.(B.task.seq,F)}}),(0,J.jsxs)(ye.Menu,{transitionDuration:0,anchorEl:S?.anchorEl??null,open:!!S,onClose:()=>{D(null),o()},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},...w,children:[(0,J.jsx)(ye.MenuItem,{selected:!S?.task.tab_key,onClick:()=>{S&&g(S.task.seq,""),D(null),o()},sx:{fontSize:14,minWidth:170},children:"\uC5C6\uC74C"}),t.filter(F=>!F.archived).map(F=>(0,J.jsx)(ye.MenuItem,{selected:S?.task.tab_key===F.key,onClick:()=>{S&&g(S.task.seq,F.key),D(null),o()},sx:{fontSize:14,minWidth:170},children:F.label},F.key))]}),(0,J.jsx)(ye.Menu,{transitionDuration:0,anchorEl:R,open:!!R,onClose:()=>I(null),anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...n.filter(F=>`custom-${F.group_seq}`===String(E?.tab_key??"")).map(F=>({seq:F.seq,label:ht(F)}))].map(F=>(0,J.jsxs)(ye.MenuItem,{onClick:()=>{E&&O?.(E.seq,F.seq),I(null),o()},sx:{fontSize:14,minWidth:160,gap:1},children:[F.label,(E?.sprint_seq??0)===F.seq?(0,J.jsx)(jx.default,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},F.seq))})]})}var Sn=require("@mui/material");var Wn=require("react/jsx-runtime");function Ih({anchorEl:e,labelOptions:o,selectedKeys:t,onToggle:n,onClear:r,onClose:i}){return(0,Wn.jsxs)(Sn.Menu,{transitionDuration:0,anchorEl:e,open:!!e,onClose:i,children:[o.map(l=>{let s=t.includes(l.key);return(0,Wn.jsxs)(Sn.MenuItem,{onClick:()=>n(l.key),sx:{fontSize:14,minWidth:190,gap:1},children:[(0,Wn.jsx)(Sn.Checkbox,{size:"small",checked:s,sx:{p:0}}),(0,Wn.jsx)(Ye,{option:l})]},l.key)}),(0,Wn.jsx)(Sn.Divider,{}),(0,Wn.jsx)(Sn.MenuItem,{disabled:t.length===0,onClick:()=>{r(),i()},sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}var Bn=require("@mui/material"),cg=a(require("@mui/icons-material/Check"),1),mg=a(require("@mui/icons-material/BarChartOutlined"),1),ug=a(require("@mui/icons-material/SettingsOutlined"),1);var Ht=require("react/jsx-runtime");function _h(e){let{anchorEl:o,sprints:t,value:n,onSelect:r,onManage:i,onCharts:l,onClose:s}=e;return(0,Ht.jsxs)(Bn.Menu,{transitionDuration:0,anchorEl:o,open:!!o,onClose:s,children:[[{seq:0,label:"\uC804\uCCB4"},{seq:-1,label:"\uBBF8\uBC30\uC815 \uC5C5\uBB34"},...t.map(p=>({seq:p.seq,label:ht(p)}))].map(p=>(0,Ht.jsxs)(Bn.MenuItem,{onClick:()=>{r(p.seq),s()},sx:{fontSize:14,minWidth:180,gap:1},children:[p.label,n===p.seq?(0,Ht.jsx)(cg.default,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},p.seq)),(0,Ht.jsx)(Bn.Divider,{}),l?(0,Ht.jsxs)(Bn.MenuItem,{onClick:()=>{s(),l()},sx:{fontSize:14,gap:1},children:[(0,Ht.jsx)(mg.default,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uCC28\uD2B8"]}):null,l?(0,Ht.jsx)(Bn.Divider,{}):null,(0,Ht.jsxs)(Bn.MenuItem,{onClick:()=>{s(),i()},sx:{fontSize:14,gap:1},children:[(0,Ht.jsx)(ug.default,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uAD00\uB9AC\u2026"]})]})}var wh={my:"tasks",mine:"tasks",sent:"tasks",notice:"notice",bug:"bug",archive:"archive",done:"done",report:"report"};function pg(e){return wh[e]??"tasks"}var Dh={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"},dg=["list","calendar","month","card","kanban","sprint","timeline"],Mh=["list","card"];function Eh(e){let o=pg(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:dg,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:Mh,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:dg,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"}:{}}}}
|
|
14
14
|
//# sourceMappingURL=index.js.map
|