@ehfuse/taskbox 0.5.134 → 0.5.135

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 CHANGED
@@ -3,7 +3,7 @@ var Fl="waiting",IS="replied";import{createContext as mu,useContext as uu,useMem
3
3
  `).replace(/<\/(p|div|li|h[1-6]|blockquote)>/gi,`
4
4
  `),t=document.createElement("div");return t.innerHTML=o,(t.textContent??"").replace(/\n{3,}/g,`
5
5
 
6
- `).trim()}function Di({syncKey:e,value:o,onChange:t,readOnly:n=!1,minHeight:r=180,height:i=0,onChangeHeight:a}){let l=Sn(null),d=Sn(null),c=i>0?i:0,s=Sn(c),f=Sn(a);f.current=a;let p=Sn(null),m=Sn(Date.now()+800),[g,M]=bk(!1),v=Oe();nl(()=>{if(n)return;let x=il(o);p.current===x||p.current===o||(p.current=x,m.current=Date.now()+800,l.current?.setHtml(x))},[e,o,n]);let h=Sn(-1);return nl(()=>{if(n||v||i<=0||h.current===i||(h.current=i,Math.abs(i-s.current)<1))return;let x=d.current?.querySelector(".ehfuse-editor-container");x&&(Math.abs(x.getBoundingClientRect().height-i)<1||(x.style.height=`${i}px`,s.current=i))},[n,v,i]),nl(()=>{if(n||v)return;let x=d.current?.querySelector(".ehfuse-editor-container");if(!x||typeof ResizeObserver>"u")return;let B,S=new ResizeObserver(D=>{let y=Math.round(D[0]?.contentRect.height??0);y<=0||(window.clearTimeout(B),B=window.setTimeout(()=>{Math.abs(y-s.current)<1||(s.current=y,f.current?.(y))},300))});return S.observe(x),()=>{window.clearTimeout(B),S.disconnect()}},[n,v]),n?Ik(rl,{sx:{position:"relative",mt:1},children:[Bn(rl,{sx:{border:"1px solid #e0e0e0",borderRadius:1,p:"12px",pr:"40px",minHeight:r,fontSize:16,lineHeight:1.6,color:"#37352f",wordBreak:"break-word",userSelect:"none","& > p:first-of-type":{mt:0},"& > p:last-of-type":{mb:0}},dangerouslySetInnerHTML:{__html:il(o)}}),Bn(Tk,{title:"\uB0B4\uC6A9 \uBCF5\uC0AC",arrow:!0,children:Bn(kk,{size:"small","aria-label":"\uB0B4\uC6A9 \uBCF5\uC0AC",onClick:()=>{navigator.clipboard.writeText(vk(o)).then(()=>{M(!0),window.setTimeout(()=>M(!1),1500)})},sx:{position:"absolute",top:6,right:6,color:"#9a9a97"},children:g?Bn(Sk,{sx:{fontSize:17,color:"#2f9e5b"}}):Bn(yk,{sx:{fontSize:17}})})})]}):Bn(rl,{ref:d,onDragOver:x=>x.stopPropagation(),onDrop:x=>x.stopPropagation(),sx:{mt:1,"& .ehfuse-editor-content > p:first-of-type":{mt:0},"& .ehfuse-editor-content > p:last-of-type":{mb:0},"& .ehfuse-editor-content.ehfuse-editor-empty::before":{top:"12px",left:"12px"}},children:Bn(Bk,{ref:l,defaultValue:il(o),autoHeight:v,resizable:!v,showToolbar:!v,focusBorder:!0,styles:{focusBorderColor:"var(--primary)"},toolbarOptions:Ck,locale:"ko",minHeight:c||r,placeholder:"\uB0B4\uC6A9\uC744 \uC785\uB825\uD558\uC138\uC694",contentStyle:{padding:"12px"},onChange:x=>{let B=Date.now()<m.current,S=x===p.current;p.current=x,!(B||S)&&t(x)}})})}import{useState as Dr}from"react";import{Box as ko,Button as Uc,Dialog as Lk,IconButton as Zn,TextField as Nk,Tooltip as Vc}from"@mui/material";import Gc from"@mui/icons-material/Close";import Fk from"@mui/icons-material/AddCircle";import Yc from"@mui/icons-material/AddTask";import Hk from"@mui/icons-material/Checklist";import Wk from"@mui/icons-material/CheckCircle";import $k from"@mui/icons-material/Launch";import Kk from"@mui/icons-material/LinkOutlined";import Uk from"@mui/icons-material/RadioButtonUnchecked";import{useEffect as _k,useMemo as wk,useState as al}from"react";import{Box as Pt,Button as Dk,Tab as Ek,Tabs as Mk}from"@mui/material";import{FormDialog as Ok}from"@ehfuse/mui-form-dialog";import{ClearTextField as Rk}from"@ehfuse/mui-form-controls";import{ErrorAlert as Pk}from"@ehfuse/alerts";import zk from"@mui/icons-material/CheckCircle";import qk from"@mui/icons-material/RadioButtonUnchecked";import{OverlayScrollbar as Ak}from"@ehfuse/overlay-scrollbar";import{jsx as po,jsxs as ll}from"react/jsx-runtime";var Kc=[{type:"related",label:"\uAD00\uB828",hint:"\uB2E8\uC21C\uD788 \uAD00\uB828 \uC788\uB294 \uC5C5\uBB34\uB85C \uC5F0\uACB0\uD569\uB2C8\uB2E4"},{type:"follow_up",label:"\uC774\uC804 \uC5C5\uBB34",hint:"\uC774 \uC5C5\uBB34\uAC00 \uC120\uD0DD\uD55C \uC5C5\uBB34\uC5D0\uC11C \uC774\uC5B4\uC9C4 \uD6C4\uC18D\uC784\uC744 \uD45C\uC2DC\uD569\uB2C8\uB2E4(\uC774\uB825 \uD0C0\uC784\uB77C\uC778)"},{type:"duplicate_of",label:"\uC911\uBCF5(\uC6D0\uBCF8)",hint:"\uC774 \uC5C5\uBB34\uAC00 \uC120\uD0DD\uD55C \uC6D0\uBCF8 \uC5C5\uBB34\uC758 \uC911\uBCF5\uC784\uC744 \uD45C\uC2DC\uD569\uB2C8\uB2E4"}];function Ei({open:e,task:o,tasks:t,excludeSeqs:n=[],onClose:r,onSubmit:i,hideRelationType:a=!1,title:l="\uAD00\uB828 \uC5C5\uBB34 \uC5F0\uACB0",confirmLabel:d="\uC5F0\uACB0",multiSelect:c=!1}){let s=Oe(),[f,p]=al("related"),[m,g]=al(""),[M,v]=al([]);_k(()=>{e&&(p("related"),g(""),v([]))},[e]);let h=wk(()=>{let y=new Set([o.seq,...n]),w=m.trim().toLowerCase();return t.filter(T=>y.has(T.seq)||T.is_event||T.is_notice?!1:w?T.title.toLowerCase().includes(w)||(T.ticket_no??"").toLowerCase().includes(w):!0).sort((T,b)=>!!T.completed!=!!b.completed?T.completed?1:-1:b.seq-T.seq)},[t,o.seq,n,m]),x=()=>{if(M.length===0){Pk("\uC5F0\uACB0\uD560 \uC5C5\uBB34\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return}for(let y of M)i(y,f);r()},B=y=>{v(w=>w.includes(y)?w.filter(T=>T!==y):c?[...w,y]:[y])},S=Kc.find(y=>y.type===f)?.hint??"",D=ll(Pt,{sx:{...s?{height:"100%",minHeight:0}:{height:560},display:"flex",flexDirection:"column",...s?{}:{border:"1px solid #cccccc",borderRadius:1},overflow:"hidden",userSelect:"none"},children:[a?null:po(Mk,{value:f,onChange:(y,w)=>p(w),sx:{minHeight:38,mb:.75,flexShrink:0,"& .MuiTab-root":{minHeight:38,py:.5,fontSize:14}},children:Kc.map(y=>po(Ek,{value:y.type,label:y.label},y.type))}),a?null:po(Pt,{sx:{mb:1.5,fontSize:12.5,color:"#9a9a97"},children:S}),po(Pt,{sx:{px:1.5,py:1,borderBottom:"1px solid #cccccc",flexShrink:0},children:po(Rk,{placeholder:"\uC81C\uBAA9\xB7\uD2F0\uCF13\uBC88\uD638\uB85C \uAC80\uC0C9",value:m,onChange:y=>g(y.target.value),fullWidth:!0,autoFocus:!0,size:"small",sx:{"& .MuiOutlinedInput-notchedOutline":{border:"none"},"& .MuiInputBase-root":{px:0}}})}),po(Pt,{sx:{flex:1,minHeight:0},children:po(Ak,{style:{height:"100%"},contentStyle:{paddingTop:0},children:po(Pt,{sx:{display:"flex",flexDirection:"column"},children:h.length===0?po(Pt,{sx:{py:4,textAlign:"center",fontSize:13.5,color:"#9a9a97"},children:"\uC5F0\uACB0\uD560 \uC218 \uC788\uB294 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):h.map(y=>{let w=Ve(y.icon||Me),T=M.includes(y.seq);return ll(Pt,{onClick:()=>B(y.seq),sx:{display:"flex",alignItems:"center",gap:.75,px:1.5,py:1.25,flexShrink:0,cursor:"pointer",borderBottom:"1px solid #ededeb","&:last-of-type":{borderBottom:"none"},bgcolor:T?"#e3eefb":"transparent","&:hover":{bgcolor:T?"#e3eefb":"#f7f7f5"}},children:[T?po(zk,{sx:{fontSize:20,flexShrink:0,color:"#2f6fd0"}}):po(qk,{sx:{fontSize:20,flexShrink:0,color:"#c9c8c5"}}),w?po(w,{sx:{fontSize:17,flexShrink:0,color:y.icon_color||"#1e3a8a"}}):null,ll(Pt,{component:"span",sx:{flex:1,minWidth:0,fontSize:15,color:"#37352f",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:3,overflow:"hidden",lineHeight:1.5,wordBreak:"break-word"},children:[y.ticket_no?`${y.ticket_no} `:"",y.title]}),po(Pt,{sx:{flexShrink:0,display:"flex",alignItems:"center"},children:po(Re,{option:Io(y)})})]},y.seq)})})})})]});return po(Ok,{open:e,onClose:r,maxWidth:"sm",fullScreen:s,mobilePresentation:s?"slide":"dialog",...s?{contentPaddingX:0,contentTopPadding:0,sectionsPaddingTop:0}:{},sx:s?{DialogContent:{"& .os-content > div":{height:"100%",boxSizing:"border-box"},"& .FormSection-content, & .section-content":{height:"100%"}}}:void 0,title:l,locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-task-link",sections:[{id:"task-link",showTitle:!1,children:D}],scrollPastLastSection:!1,sectionContentPaddingTop:0,actions:{showCancelButton:!0,right:po(Dk,{variant:"contained",disabled:M.length===0,onClick:x,children:d})}})}import{Fragment as Vk,jsx as ke,jsxs as Jt}from"react/jsx-runtime";function Mi({taskSeq:e,checklist:o,onAdd:t,onToggle:n,onRemove:r,onUpdate:i,removeLocked:a=!1,onConvertToTask:l,onOpenLinkedTask:d,linkCandidates:c,linkBaseTask:s,onLinkExistingTask:f,resolveLinkedTask:p}){let[m,g]=Dr(""),[M,v]=Dr(!1),[h,x]=Dr(null),B=Oe(),[S,D]=Dr(null),[y,w]=Dr(null),T=z=>{let u=z.task_seq?p?.(z.task_seq):void 0;return u?u.completed:z.checked},b=o.filter(T).length,I=()=>{m.trim()&&(t(e,m),g(""))};return Jt(Wo,{icon:ke(Hk,{sx:{fontSize:19,display:"block"}}),title:Jt(Vk,{children:["\uD560\uC77C",o.length>0?Jt(ko,{component:"span",sx:{fontSize:12.5,color:"#9a9a97"},children:[b," / ",o.length]}):null]}),titleExtra:o.length>0?ke(ko,{sx:{flex:1,minWidth:0,ml:1,height:6,borderRadius:3,bgcolor:"#ececea"},children:ke(ko,{sx:{height:"100%",borderRadius:3,width:`${Math.round(b/o.length*100)}%`,bgcolor:"#2f80ed",transition:"width 0.2s"}})}):null,children:[ke(ko,{sx:{display:"flex",flexDirection:"column",mt:.5,pl:3.25},children:o.map((z,u)=>{let k=z.task_seq?p?.(z.task_seq):void 0,R=T(z),A=!!z.task_seq;return Jt(ko,{sx:{display:"flex",alignItems:"center",gap:1,px:1.25,py:.5,borderRadius:1,"&:hover":{bgcolor:"#f7f7f5"},"&:hover .taskbox-checklist-remove":{opacity:1},"&:hover .taskbox-checklist-convert":{opacity:1}},children:[ke(ko,{component:"span",onClick:()=>n(e,u,!R),sx:{display:"inline-flex",flexShrink:0,cursor:"pointer"},children:R?ke(Wk,{sx:{fontSize:18,color:"#2f80ed"}}):ke(Uk,{sx:{fontSize:18,color:"#9a9a97"}})}),h?.index===u?ke(ko,{component:"input",autoFocus:!0,spellCheck:!1,value:h.label,enterKeyHint:"done",onChange:L=>x({index:u,label:L.target.value}),onBlur:()=>{h.label.trim()&&h.label.trim()!==z.label&&i?.(e,u,h.label),x(null)},onKeyDown:L=>{L.key==="Enter"&&L.target.blur(),L.key==="Escape"&&x(null)},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:14,color:"#37352f",bgcolor:"transparent",p:0}}):ke(ko,{component:"span",onClick:A?z.task_seq&&d?()=>d(z.task_seq):void 0:a||!i?void 0:B?()=>D({index:u,label:z.label}):()=>x({index:u,label:z.label}),sx:{flex:1,minWidth:0,fontSize:14.5,color:"#37352f",textDecoration:R?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...A?d?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}:a||!i?{}:{cursor:"text"}},children:z.label}),A?Jt(ko,{component:"span",onClick:z.task_seq&&d?()=>d(z.task_seq):void 0,sx:{display:"inline-flex",alignItems:"center",gap:.4,flexShrink:0,px:.75,py:.2,borderRadius:1,fontSize:12,fontWeight:500,color:"#1d4f91",bgcolor:"#e3eefb",whiteSpace:"nowrap",...d?{cursor:"pointer"}:{}},children:[ke($k,{sx:{fontSize:12}}),k?.manager_name?.trim()||"\uC5C5\uBB34"]}):null,!a&&!A&&l?ke(Vc,{title:"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",arrow:!0,enterDelay:300,disableInteractive:!0,children:ke(Zn,{className:"taskbox-checklist-convert",size:"small","aria-label":"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",onClick:L=>w({anchorEl:L.currentTarget,index:u,label:z.label}),sx:{display:B?"none":"inline-flex",opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:ke(Yc,{sx:{fontSize:16}})})}):null,a?null:ke(Zn,{className:"taskbox-checklist-remove",size:"small","aria-label":"\uD560\uC77C \uC0AD\uC81C",onClick:()=>r(e,u),sx:{display:B?"none":"inline-flex",opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:ke(Gc,{sx:{fontSize:15}})})]},`${z.label}-${u}`)})}),Jt(ko,{sx:{mt:.5,ml:3.25,display:"flex",alignItems:"center",gap:.5},children:[ke(ko,{component:"input",spellCheck:!1,value:m,placeholder:"+ \uD560\uC77C \uCD94\uAC00",enterKeyHint:"done",onChange:z=>g(z.target.value),onKeyDown:z=>{z.key==="Enter"&&I()},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:14,color:"#37352f",bgcolor:"transparent",px:1.25,py:.75,"&::placeholder":{color:"#9a9a97"}}}),c&&s&&f?ke(Vc,{title:"\uAE30\uC874 \uC5C5\uBB34 \uBD99\uC774\uAE30",arrow:!0,children:ke(Zn,{size:"small","aria-label":"\uAE30\uC874 \uC5C5\uBB34 \uBD99\uC774\uAE30",onMouseDown:z=>z.preventDefault(),onClick:()=>v(!0),sx:{flexShrink:0,color:"#9a9a97"},children:ke(Kk,{sx:{fontSize:20}})})}):null,ke(Zn,{size:"small","aria-label":"\uD560\uC77C \uCD94\uAC00",disabled:!m.trim(),onMouseDown:z=>z.preventDefault(),onClick:I,sx:{flexShrink:0,color:m.trim()?"#2f80ed":"#c9c8c5"},children:ke(Fk,{sx:{fontSize:20}})})]}),c&&s&&f?ke(Ei,{open:M,task:s,tasks:c,excludeSeqs:o.map(z=>Number(z.task_seq??0)).filter(z=>z>0),hideRelationType:!0,multiSelect:!0,title:"\uAE30\uC874 \uC5C5\uBB34 \uBD99\uC774\uAE30",confirmLabel:"\uBD99\uC774\uAE30",onClose:()=>v(!1),onSubmit:z=>{let u=c.find(k=>k.seq===z);f(e,z,String(u?.title??"").trim())}}):null,ke(We,{open:!!y,anchorEl:y?.anchorEl??null,title:"\uC774 \uD560\uC77C\uC744 \uBCC4\uB3C4 \uC5C5\uBB34\uB85C \uB9CC\uB4DC\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uB9CC\uB4E4\uAE30",onCancel:()=>w(null),onConfirm:()=>{y&&l?.(e,y.index,y.label),w(null)}}),ke(Lk,{open:!!S,onClose:()=>D(null),maxWidth:"xs",fullWidth:!0,slotProps:{paper:{sx:{borderRadius:2,m:2}}},children:Jt(ko,{sx:{p:2,display:"flex",flexDirection:"column",gap:1.5},children:[ke(ko,{sx:{fontSize:15.5,fontWeight:600,color:"#37352f"},children:"\uD560\uC77C \uC218\uC815"}),ke(Nk,{autoFocus:!0,fullWidth:!0,size:"medium",value:S?.label??"",onChange:z=>D(u=>u&&{...u,label:z.target.value}),onKeyDown:z=>{if(z.key!=="Enter")return;let u=S;u&&u.label.trim()&&i?.(e,u.index,u.label.trim()),D(null)}}),Jt(ko,{sx:{display:"flex",alignItems:"center",gap:1},children:[!a&&l&&S&&!o[S.index]?.task_seq?ke(Zn,{"aria-label":"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",onClick:()=>{l(e,S.index,o[S.index]?.label??""),D(null)},sx:{color:"#57564f"},children:ke(Yc,{sx:{fontSize:20}})}):null,!a&&S?ke(Zn,{"aria-label":"\uD560\uC77C \uC0AD\uC81C",onClick:()=>{r(e,S.index),D(null)},sx:{color:"#e5484d"},children:ke(Gc,{sx:{fontSize:19}})}):null,ke(ko,{sx:{flex:1}}),ke(Uc,{color:"inherit",onClick:()=>D(null),children:"\uCDE8\uC18C"}),ke(Uc,{variant:"contained",disabled:!S?.label.trim(),onClick:()=>{S&&S.label.trim()&&i?.(e,S.index,S.label.trim()),D(null)},children:"\uD655\uC778"})]})]})})]})}import{useRef as Zk,useState as Jk}from"react";import{Box as mt,IconButton as eT}from"@mui/material";import oT from"@mui/icons-material/Close";import Qc from"@mui/icons-material/AttachFileOutlined";var Gk=new Set(["jpg","jpeg","png","gif","bmp","webp","svg","pdf","txt","json","xml","log","md","markdown","csv","xls","xlsx","html","htm","js","jsx","ts","tsx","css","scss","sass","less","php","py","java","c","cpp","h","hpp","cs","go","rs","rb","swift","kt","scala","sql","sh","bash","bat","ps1","yml","yaml","toml","ini","conf","mp4","avi","mov","wmv","flv","webm","mp3","wav","ogg","m4a","aac"]),Oi=e=>{let o=e?.split(".").pop()?.toLowerCase()??"";return Gk.has(o)};import{LinearProgress as Yk}from"@mui/material";import{Fragment as jk,jsx as Qk,jsxs as Xk}from"react/jsx-runtime";function jc(e){let o=gt(),t=o.useValue("attachmentUpload.taskSeq"),n=o.useValue("attachmentUpload.index"),r=o.useValue("attachmentUpload.total"),i=o.useValue("attachmentUpload.queue"),a=n??0;return!a||e>0&&(t??0)!==e?null:{index:a,total:r??0,queue:i??[]}}function sl(){let o=gt().useValue("attachmentUpload.progress");return Xk(jk,{children:[o??0,"%"]})}function Xc(){let o=gt().useValue("attachmentUpload.progress");return Qk(Yk,{variant:"determinate",value:o??0,sx:{height:4,borderRadius:2,bgcolor:"#dbe9fb",mt:.75}})}import{Fragment as tT,jsx as Do,jsxs as Er}from"react/jsx-runtime";function Ri(e){return e>=1048576?`${(e/1048576).toFixed(1)}MB`:`${Math.max(1,Math.round(e/1024))}KB`}var Pi={flex:1,minWidth:0,fontSize:13.5,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"};function zi({taskSeq:e,attachments:o,onAdd:t,onRemove:n,removeLocked:r=!1,onPreview:i,onDownload:a}){let[l,d]=Jk(!1),c=Zk(null),s=Oe(),f=dr(),p=ur(),m=jc(e),g=e===0,M=S=>{if(i){i(S);return}window.open(p(S.uuid??""),"_blank","noopener,noreferrer")},v=S=>{if(a){a(S);return}window.open(p(S.uuid??"",{download:!0}),"_blank","noopener,noreferrer")},h=S=>m?S+1<m.index?"done":S+1===m.index?"uploading":"waiting":"waiting",x=(S,D,y,w={})=>Er(mt,{sx:{px:1,py:.5,borderRadius:1,border:"1px solid",borderColor:w.uploading?"#d5e6fb":"#e6e6e3",bgcolor:w.uploading?"#f4f9ff":"transparent","&:hover .taskbox-file-remove":{opacity:1}},children:[Er(mt,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[Do(Qc,{sx:{fontSize:16,color:"#9a9a97"}}),D,Do(mt,{component:"span",sx:{fontSize:12,color:w.uploading?"#2f80ed":"#9a9a97",flexShrink:0},children:y}),w.removeIndex!==void 0?Do(eT,{className:"taskbox-file-remove",size:"small","aria-label":"\uCCA8\uBD80 \uC0AD\uC81C",onClick:()=>n(e,w.removeIndex),sx:{opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:Do(oT,{sx:{fontSize:15}})}):null]}),w.uploading?Do(Xc,{}):null]},S),B=S=>{let D=Oi(S.name);return Do(mt,{component:"button",type:"button",onClick:()=>D?M(S):v(S),title:`${S.name} ${D?"\uBBF8\uB9AC\uBCF4\uAE30":"\uB2E4\uC6B4\uB85C\uB4DC"}`,sx:{...Pi,color:"#37352f",textAlign:"left",p:0,border:"none",background:"none",font:"inherit",fontSize:13.5,cursor:"pointer","&:hover":{textDecoration:"underline",color:"#2f80ed"}},children:S.name})};return Er(Wo,{icon:Do(Qc,{sx:{fontSize:18,display:"block"}}),title:Er(tT,{children:["\uD30C\uC77C ",o.length>0?o.length:""]}),children:[Er(mt,{sx:{display:"flex",flexDirection:"column",gap:.5,mt:1},children:[o.map((S,D)=>{let y=`${S.uuid||S.name}-${D}`;if(g){let w=h(D),T=w==="uploading";return x(y,Do(mt,{component:"span",sx:{...Pi,color:w==="done"?"#37352f":"#9a9a97"},children:S.name}),T?Do(sl,{}):Ri(S.size),{uploading:T,removeIndex:!r&&!m?D:void 0})}return S.uuid?x(y,B(S),Ri(S.size),{removeIndex:r?void 0:D}):x(y,Do(mt,{component:"span",title:"\uC2E4\uD30C\uC77C\uC774 \uC5C6\uB294 \uC774\uC804 \uBC29\uC2DD \uCCA8\uBD80\uC785\uB2C8\uB2E4(\uB2E4\uC6B4\uB85C\uB4DC \uBD88\uAC00) \u2014 \uB2E4\uC2DC \uCCA8\uBD80\uD574 \uC8FC\uC138\uC694.",sx:{...Pi,color:"#9a9a97"},children:S.name}),Ri(S.size),{removeIndex:r?void 0:D})}),!g&&m?m.queue.slice(m.index-1).map((S,D)=>{let y=D===0;return x(`uploading-${m.index+D}-${S.name}`,Do(mt,{component:"span",sx:{...Pi,color:"#9a9a97"},children:S.name}),y?Do(sl,{}):Ri(S.size),{uploading:y})}):null]}),Do(mt,{onClick:()=>c.current?.click(),onDragOver:S=>{S.preventDefault(),d(!0)},onDragLeave:()=>d(!1),onDrop:S=>{S.preventDefault(),d(!1);let D=Array.from(S.dataTransfer.files);D.length>0&&t(e,D)},sx:{mt:1,py:2.5,display:"flex",alignItems:"center",justifyContent:"center",gap:.5,border:"1.5px dashed",borderColor:l?"#2f80ed":"#cfcfcc",borderRadius:1,bgcolor:l?"#eef6ff":"transparent",color:"#787774",fontSize:13.5,cursor:"pointer",transition:"background-color 0.15s, border-color 0.15s","&:hover":{bgcolor:"#fafaf9",borderColor:"#9a9a97"}},children:s?`\uD30C\uC77C\uC744 \uCCA8\uBD80\uD558\uC138\uC694 (\uCD5C\uB300 ${f}MB)`:`\uD30C\uC77C\uC744 \uB04C\uC5B4\uB2E4 \uB193\uAC70\uB098 \uD074\uB9AD\uD574 \uCCA8\uBD80\uD558\uC138\uC694 (\uCD5C\uB300 ${f}MB)`}),Do(mt,{component:"input",ref:c,type:"file",multiple:!0,onChange:S=>{let D=Array.from(S.target.files??[]);D.length>0&&t(e,D),S.target.value=""},sx:{display:"none"}})]})}import{useState as cT}from"react";import{Checkbox as mT,Divider as uT,ListItemIcon as dT,Menu as pT,MenuItem as om}from"@mui/material";import fT from"@mui/icons-material/Add";import{useEffect as nT,useState as Zc}from"react";import{Box as cl,Button as rT}from"@mui/material";import{FormDialog as iT}from"@ehfuse/mui-form-dialog";import{ClearTextField as aT}from"@ehfuse/mui-form-controls";import{ColorPicker as lT}from"@ehfuse/mui-color-picker";import{ErrorAlert as sT}from"@ehfuse/alerts";import{jsx as Mr,jsxs as ml}from"react/jsx-runtime";var Jc="#2f80ed";function em({open:e,onClose:o,onSubmit:t}){let[n,r]=Zc(""),[i,a]=Zc(Jc);nT(()=>{e&&(r(""),a(Jc))},[e]);let l=()=>{let s=n.trim();if(!s){sT("\uB77C\uBCA8 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}t(s,i),o()},d=as(i),c=ml(cl,{children:[ml(cl,{sx:{display:"flex",alignItems:"center",gap:1.5,mt:.5},children:[Mr(aT,{label:"\uB77C\uBCA8 \uC774\uB984",value:n,onChange:s=>r(s.target.value),onKeyDown:s=>{s.key==="Enter"&&(s.preventDefault(),l())},fullWidth:!0,autoFocus:!0}),Mr(lT,{value:i,onChange:s=>a(s),shape:"circle",colorSize:28})]}),ml(cl,{sx:{mt:2,display:"flex",alignItems:"center",gap:1,fontSize:13,color:"#787774"},children:["\uBBF8\uB9AC\uBCF4\uAE30",Mr(Re,{option:{key:"__preview__",name:n.trim()||"\uB77C\uBCA8",...d}})]})]});return Mr(iT,{open:e,onClose:o,maxWidth:"xs",title:"\uC0C8 \uB77C\uBCA8 \uCD94\uAC00",locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-add-label",sections:[{id:"add-label",showTitle:!1,children:c}],actions:{showCancelButton:!0,right:Mr(rT,{variant:"contained",onClick:l,children:"\uCD94\uAC00"})}})}import{Fragment as xT,jsx as Jn,jsxs as qi}from"react/jsx-runtime";function Ai({anchorEl:e,selectedKeys:o,labelOptions:t,onToggle:n,onAddLabel:r,onClose:i}){let[a,l]=cT(!1),d=nt();return qi(xT,{children:[qi(pT,{anchorEl:e,open:!!e,onClose:i,transitionDuration:0,...d,children:[t.map(c=>{let s=o.includes(c.key);return qi(om,{onClick:()=>n(c.key),sx:{fontSize:14,minWidth:170,gap:1},children:[Jn(mT,{size:"small",checked:s,sx:{p:0}}),Jn(Re,{option:c})]},c.key)}),Jn(uT,{}),qi(om,{onClick:()=>l(!0),sx:{fontSize:14,color:"#787774"},children:[Jn(dT,{children:Jn(fT,{sx:{fontSize:18,color:"#787774"}})}),"\uB77C\uBCA8 \uCD94\uAC00"]})]}),Jn(em,{open:a,onClose:()=>l(!1),onSubmit:r})]})}function tm(e,o){let t=Number(e.author_account_seq??0);return o.filter(n=>{let r=Number(n.account_seq??0);return r>0&&r!==t})}function nm(e,o){let t=(e.target_account_seqs??[]).filter(f=>f>0);if(t.length===0)return null;let n=new Set(t),r=tm(e,o),i=new Map;for(let f of r){let p=String(f.department??"").trim();if(!p)continue;let m=i.get(p)??[];m.push(f),i.set(p,m)}let a=[],l=new Set;for(let[f,p]of i)if(p.every(g=>n.has(Number(g.account_seq??0)))){a.push(f);for(let g of p)l.add(Number(g.account_seq??0))}let d=new Map(r.map(f=>[Number(f.account_seq??0),f.name])),c=e.target_names??[],s=[];return t.forEach((f,p)=>{l.has(f)||s.push(d.get(f)??c[p]??"\uC774\uB984\uC5C6\uC74C")}),{teamNames:a,individualNames:s}}function Li(e,o){let t=nm(e,o);return t?[...t.teamNames,...t.individualNames].join(", "):"\uBAA8\uB4E0 \uC9C1\uC6D0"}function oR(e,o){let t=nm(e,o);return t?{kind:"members",teamNames:t.teamNames,individualNames:t.individualNames}:{kind:"everyone"}}function rm(e,o,t){let n=(e.target_account_seqs??[]).filter(s=>s>0),r=tm(e,o),i=n.length>0?n.length:r.length,a=e.acks??[],l=t>0&&a.some(s=>s.account_seq===t),d=t>0&&Number(e.author_account_seq??0)===t,c=n.length===0||n.includes(t);return{count:a.length,total:i,acked:l,canAck:t>0&&!d&&c&&!l&&!e.completed}}function im(e,o){let t=Number(o)||50,n=t*1024*1024,r=e.filter(l=>l.size>n),i=e.filter(l=>l.size<=n),a=r.length>0?`\uD30C\uC77C\uC740 1\uAC1C\uB2F9 \uCD5C\uB300 ${t}MB \uAE4C\uC9C0 \uCCA8\uBD80\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
6
+ `).trim()}function Di({syncKey:e,value:o,onChange:t,readOnly:n=!1,minHeight:r=180,height:i=0,onChangeHeight:a}){let l=Sn(null),d=Sn(null),c=i>0?i:0,s=Sn(c),f=Sn(a);f.current=a;let p=Sn(null),m=Sn(Date.now()+800),[g,M]=bk(!1),v=Oe();nl(()=>{if(n)return;let x=il(o);p.current===x||p.current===o||(p.current=x,m.current=Date.now()+800,l.current?.setHtml(x))},[e,o,n]);let h=Sn(-1);return nl(()=>{if(n||v||i<=0||h.current===i||(h.current=i,Math.abs(i-s.current)<1))return;let x=d.current?.querySelector(".ehfuse-editor-container");x&&(Math.abs(x.getBoundingClientRect().height-i)<1||(x.style.height=`${i}px`,s.current=i))},[n,v,i]),nl(()=>{if(n||v)return;let x=d.current?.querySelector(".ehfuse-editor-container");if(!x||typeof ResizeObserver>"u")return;let B,S=new ResizeObserver(D=>{let y=Math.round(D[0]?.contentRect.height??0);y<=0||(window.clearTimeout(B),B=window.setTimeout(()=>{Math.abs(y-s.current)<1||(s.current=y,f.current?.(y))},300))});return S.observe(x),()=>{window.clearTimeout(B),S.disconnect()}},[n,v]),n?Ik(rl,{sx:{position:"relative",mt:1},children:[Bn(rl,{sx:{border:"1px solid #e0e0e0",borderRadius:1,p:"12px",pr:"40px",minHeight:r,fontSize:16,lineHeight:1.6,color:"#37352f",wordBreak:"break-word",userSelect:"none","& > p:first-of-type":{mt:0},"& > p:last-of-type":{mb:0}},dangerouslySetInnerHTML:{__html:il(o)}}),Bn(Tk,{title:"\uB0B4\uC6A9 \uBCF5\uC0AC",arrow:!0,children:Bn(kk,{size:"small","aria-label":"\uB0B4\uC6A9 \uBCF5\uC0AC",onClick:()=>{navigator.clipboard.writeText(vk(o)).then(()=>{M(!0),window.setTimeout(()=>M(!1),1500)})},sx:{position:"absolute",top:6,right:6,color:"#9a9a97"},children:g?Bn(Sk,{sx:{fontSize:17,color:"#2f9e5b"}}):Bn(yk,{sx:{fontSize:17}})})})]}):Bn(rl,{ref:d,onDragOver:x=>x.stopPropagation(),onDrop:x=>x.stopPropagation(),sx:{mt:1,"& .ehfuse-editor-content > p:first-of-type":{mt:0},"& .ehfuse-editor-content > p:last-of-type":{mb:0},"& .ehfuse-editor-content.ehfuse-editor-empty::before":{top:"12px",left:"12px"}},children:Bn(Bk,{ref:l,defaultValue:il(o),autoHeight:v,resizable:!v,showToolbar:!v,focusBorder:!0,styles:{focusBorderColor:"var(--primary)"},toolbarOptions:Ck,locale:"ko",minHeight:c||r,placeholder:"\uB0B4\uC6A9\uC744 \uC785\uB825\uD558\uC138\uC694",contentStyle:{padding:"12px"},onChange:x=>{let B=Date.now()<m.current,S=x===p.current;p.current=x,!(B||S)&&t(x)}})})}import{useState as Dr}from"react";import{Box as ko,Button as Uc,Dialog as Lk,IconButton as Zn,TextField as Nk,Tooltip as Vc}from"@mui/material";import Gc from"@mui/icons-material/Close";import Fk from"@mui/icons-material/AddCircle";import Yc from"@mui/icons-material/AddTask";import Hk from"@mui/icons-material/Checklist";import Wk from"@mui/icons-material/CheckCircle";import $k from"@mui/icons-material/Launch";import Kk from"@mui/icons-material/LinkOutlined";import Uk from"@mui/icons-material/RadioButtonUnchecked";import{useEffect as _k,useMemo as wk,useState as al}from"react";import{Box as Pt,Button as Dk,Tab as Ek,Tabs as Mk}from"@mui/material";import{FormDialog as Ok}from"@ehfuse/mui-form-dialog";import{ClearTextField as Rk}from"@ehfuse/mui-form-controls";import{ErrorAlert as Pk}from"@ehfuse/alerts";import zk from"@mui/icons-material/CheckCircle";import qk from"@mui/icons-material/RadioButtonUnchecked";import{OverlayScrollbar as Ak}from"@ehfuse/overlay-scrollbar";import{jsx as po,jsxs as ll}from"react/jsx-runtime";var Kc=[{type:"related",label:"\uAD00\uB828",hint:"\uB2E8\uC21C\uD788 \uAD00\uB828 \uC788\uB294 \uC5C5\uBB34\uB85C \uC5F0\uACB0\uD569\uB2C8\uB2E4"},{type:"follow_up",label:"\uC774\uC804 \uC5C5\uBB34",hint:"\uC774 \uC5C5\uBB34\uAC00 \uC120\uD0DD\uD55C \uC5C5\uBB34\uC5D0\uC11C \uC774\uC5B4\uC9C4 \uD6C4\uC18D\uC784\uC744 \uD45C\uC2DC\uD569\uB2C8\uB2E4(\uC774\uB825 \uD0C0\uC784\uB77C\uC778)"},{type:"duplicate_of",label:"\uC911\uBCF5(\uC6D0\uBCF8)",hint:"\uC774 \uC5C5\uBB34\uAC00 \uC120\uD0DD\uD55C \uC6D0\uBCF8 \uC5C5\uBB34\uC758 \uC911\uBCF5\uC784\uC744 \uD45C\uC2DC\uD569\uB2C8\uB2E4"}];function Ei({open:e,task:o,tasks:t,excludeSeqs:n=[],onClose:r,onSubmit:i,hideRelationType:a=!1,title:l="\uAD00\uB828 \uC5C5\uBB34 \uC5F0\uACB0",confirmLabel:d="\uC5F0\uACB0",multiSelect:c=!1}){let s=Oe(),[f,p]=al("related"),[m,g]=al(""),[M,v]=al([]);_k(()=>{e&&(p("related"),g(""),v([]))},[e]);let h=wk(()=>{let y=new Set([o.seq,...n]),w=m.trim().toLowerCase();return t.filter(T=>y.has(T.seq)||T.is_event||T.is_notice?!1:w?T.title.toLowerCase().includes(w)||(T.ticket_no??"").toLowerCase().includes(w):!0).sort((T,b)=>!!T.completed!=!!b.completed?T.completed?1:-1:b.seq-T.seq)},[t,o.seq,n,m]),x=()=>{if(M.length===0){Pk("\uC5F0\uACB0\uD560 \uC5C5\uBB34\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return}for(let y of M)i(y,f);r()},B=y=>{v(w=>w.includes(y)?w.filter(T=>T!==y):c?[...w,y]:[y])},S=Kc.find(y=>y.type===f)?.hint??"",D=ll(Pt,{sx:{...s?{height:"100%",minHeight:0}:{height:560},display:"flex",flexDirection:"column",...s?{}:{border:"1px solid #cccccc",borderRadius:1},overflow:"hidden",userSelect:"none"},children:[a?null:po(Mk,{value:f,onChange:(y,w)=>p(w),sx:{minHeight:38,mb:.75,flexShrink:0,"& .MuiTab-root":{minHeight:38,py:.5,fontSize:14}},children:Kc.map(y=>po(Ek,{value:y.type,label:y.label},y.type))}),a?null:po(Pt,{sx:{mb:1.5,fontSize:12.5,color:"#9a9a97"},children:S}),po(Pt,{sx:{px:1.5,py:1,borderBottom:"1px solid #cccccc",flexShrink:0},children:po(Rk,{placeholder:"\uC81C\uBAA9\xB7\uD2F0\uCF13\uBC88\uD638\uB85C \uAC80\uC0C9",value:m,onChange:y=>g(y.target.value),fullWidth:!0,autoFocus:!0,size:"small",sx:{"& .MuiOutlinedInput-notchedOutline":{border:"none"},"& .MuiInputBase-root":{px:0}}})}),po(Pt,{sx:{flex:1,minHeight:0},children:po(Ak,{style:{height:"100%"},contentStyle:{paddingTop:0},children:po(Pt,{sx:{display:"flex",flexDirection:"column"},children:h.length===0?po(Pt,{sx:{py:4,textAlign:"center",fontSize:13.5,color:"#9a9a97"},children:"\uC5F0\uACB0\uD560 \uC218 \uC788\uB294 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):h.map(y=>{let w=Ve(y.icon||Me),T=M.includes(y.seq);return ll(Pt,{onClick:()=>B(y.seq),sx:{display:"flex",alignItems:"center",gap:.75,px:1.5,py:1.25,flexShrink:0,cursor:"pointer",borderBottom:"1px solid #ededeb","&:last-of-type":{borderBottom:"none"},bgcolor:T?"#e3eefb":"transparent","&:hover":{bgcolor:T?"#e3eefb":"#f7f7f5"}},children:[T?po(zk,{sx:{fontSize:20,flexShrink:0,color:"#2f6fd0"}}):po(qk,{sx:{fontSize:20,flexShrink:0,color:"#c9c8c5"}}),w?po(w,{sx:{fontSize:17,flexShrink:0,color:y.icon_color||"#1e3a8a"}}):null,ll(Pt,{component:"span",sx:{flex:1,minWidth:0,fontSize:15,color:"#37352f",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:3,overflow:"hidden",lineHeight:1.5,wordBreak:"break-word"},children:[y.ticket_no?`${y.ticket_no} `:"",y.title]}),po(Pt,{sx:{flexShrink:0,display:"flex",alignItems:"center"},children:po(Re,{option:Io(y)})})]},y.seq)})})})})]});return po(Ok,{open:e,onClose:r,maxWidth:"sm",fullScreen:s,mobilePresentation:s?"slide":"dialog",...s?{contentPaddingX:0,contentTopPadding:0,sectionsPaddingTop:0}:{},sx:s?{DialogContent:{pb:0,"& .os-content > div":{height:"100%",boxSizing:"border-box",paddingBottom:0,marginBottom:0},"& .FormSection-content, & .section-content":{height:"100%",paddingBottom:0,marginBottom:0}}}:void 0,title:l,locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-task-link",sections:[{id:"task-link",showTitle:!1,children:D}],scrollPastLastSection:!1,sectionContentPaddingTop:0,actions:{showCancelButton:!0,right:po(Dk,{variant:"contained",disabled:M.length===0,onClick:x,children:d})}})}import{Fragment as Vk,jsx as ke,jsxs as Jt}from"react/jsx-runtime";function Mi({taskSeq:e,checklist:o,onAdd:t,onToggle:n,onRemove:r,onUpdate:i,removeLocked:a=!1,onConvertToTask:l,onOpenLinkedTask:d,linkCandidates:c,linkBaseTask:s,onLinkExistingTask:f,resolveLinkedTask:p}){let[m,g]=Dr(""),[M,v]=Dr(!1),[h,x]=Dr(null),B=Oe(),[S,D]=Dr(null),[y,w]=Dr(null),T=z=>{let u=z.task_seq?p?.(z.task_seq):void 0;return u?u.completed:z.checked},b=o.filter(T).length,I=()=>{m.trim()&&(t(e,m),g(""))};return Jt(Wo,{icon:ke(Hk,{sx:{fontSize:19,display:"block"}}),title:Jt(Vk,{children:["\uD560\uC77C",o.length>0?Jt(ko,{component:"span",sx:{fontSize:12.5,color:"#9a9a97"},children:[b," / ",o.length]}):null]}),titleExtra:o.length>0?ke(ko,{sx:{flex:1,minWidth:0,ml:1,height:6,borderRadius:3,bgcolor:"#ececea"},children:ke(ko,{sx:{height:"100%",borderRadius:3,width:`${Math.round(b/o.length*100)}%`,bgcolor:"#2f80ed",transition:"width 0.2s"}})}):null,children:[ke(ko,{sx:{display:"flex",flexDirection:"column",mt:.5,pl:3.25},children:o.map((z,u)=>{let k=z.task_seq?p?.(z.task_seq):void 0,R=T(z),A=!!z.task_seq;return Jt(ko,{sx:{display:"flex",alignItems:"center",gap:1,px:1.25,py:.5,borderRadius:1,"&:hover":{bgcolor:"#f7f7f5"},"&:hover .taskbox-checklist-remove":{opacity:1},"&:hover .taskbox-checklist-convert":{opacity:1}},children:[ke(ko,{component:"span",onClick:()=>n(e,u,!R),sx:{display:"inline-flex",flexShrink:0,cursor:"pointer"},children:R?ke(Wk,{sx:{fontSize:18,color:"#2f80ed"}}):ke(Uk,{sx:{fontSize:18,color:"#9a9a97"}})}),h?.index===u?ke(ko,{component:"input",autoFocus:!0,spellCheck:!1,value:h.label,enterKeyHint:"done",onChange:L=>x({index:u,label:L.target.value}),onBlur:()=>{h.label.trim()&&h.label.trim()!==z.label&&i?.(e,u,h.label),x(null)},onKeyDown:L=>{L.key==="Enter"&&L.target.blur(),L.key==="Escape"&&x(null)},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:14,color:"#37352f",bgcolor:"transparent",p:0}}):ke(ko,{component:"span",onClick:A?z.task_seq&&d?()=>d(z.task_seq):void 0:a||!i?void 0:B?()=>D({index:u,label:z.label}):()=>x({index:u,label:z.label}),sx:{flex:1,minWidth:0,fontSize:14.5,color:"#37352f",textDecoration:R?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...A?d?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}:a||!i?{}:{cursor:"text"}},children:z.label}),A?Jt(ko,{component:"span",onClick:z.task_seq&&d?()=>d(z.task_seq):void 0,sx:{display:"inline-flex",alignItems:"center",gap:.4,flexShrink:0,px:.75,py:.2,borderRadius:1,fontSize:12,fontWeight:500,color:"#1d4f91",bgcolor:"#e3eefb",whiteSpace:"nowrap",...d?{cursor:"pointer"}:{}},children:[ke($k,{sx:{fontSize:12}}),k?.manager_name?.trim()||"\uC5C5\uBB34"]}):null,!a&&!A&&l?ke(Vc,{title:"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",arrow:!0,enterDelay:300,disableInteractive:!0,children:ke(Zn,{className:"taskbox-checklist-convert",size:"small","aria-label":"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",onClick:L=>w({anchorEl:L.currentTarget,index:u,label:z.label}),sx:{display:B?"none":"inline-flex",opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:ke(Yc,{sx:{fontSize:16}})})}):null,a?null:ke(Zn,{className:"taskbox-checklist-remove",size:"small","aria-label":"\uD560\uC77C \uC0AD\uC81C",onClick:()=>r(e,u),sx:{display:B?"none":"inline-flex",opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:ke(Gc,{sx:{fontSize:15}})})]},`${z.label}-${u}`)})}),Jt(ko,{sx:{mt:.5,ml:3.25,display:"flex",alignItems:"center",gap:.5},children:[ke(ko,{component:"input",spellCheck:!1,value:m,placeholder:"+ \uD560\uC77C \uCD94\uAC00",enterKeyHint:"done",onChange:z=>g(z.target.value),onKeyDown:z=>{z.key==="Enter"&&I()},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:14,color:"#37352f",bgcolor:"transparent",px:1.25,py:.75,"&::placeholder":{color:"#9a9a97"}}}),c&&s&&f?ke(Vc,{title:"\uAE30\uC874 \uC5C5\uBB34 \uBD99\uC774\uAE30",arrow:!0,children:ke(Zn,{size:"small","aria-label":"\uAE30\uC874 \uC5C5\uBB34 \uBD99\uC774\uAE30",onMouseDown:z=>z.preventDefault(),onClick:()=>v(!0),sx:{flexShrink:0,color:"#9a9a97"},children:ke(Kk,{sx:{fontSize:20}})})}):null,ke(Zn,{size:"small","aria-label":"\uD560\uC77C \uCD94\uAC00",disabled:!m.trim(),onMouseDown:z=>z.preventDefault(),onClick:I,sx:{flexShrink:0,color:m.trim()?"#2f80ed":"#c9c8c5"},children:ke(Fk,{sx:{fontSize:20}})})]}),c&&s&&f?ke(Ei,{open:M,task:s,tasks:c,excludeSeqs:o.map(z=>Number(z.task_seq??0)).filter(z=>z>0),hideRelationType:!0,multiSelect:!0,title:"\uAE30\uC874 \uC5C5\uBB34 \uBD99\uC774\uAE30",confirmLabel:"\uBD99\uC774\uAE30",onClose:()=>v(!1),onSubmit:z=>{let u=c.find(k=>k.seq===z);f(e,z,String(u?.title??"").trim())}}):null,ke(We,{open:!!y,anchorEl:y?.anchorEl??null,title:"\uC774 \uD560\uC77C\uC744 \uBCC4\uB3C4 \uC5C5\uBB34\uB85C \uB9CC\uB4DC\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uB9CC\uB4E4\uAE30",onCancel:()=>w(null),onConfirm:()=>{y&&l?.(e,y.index,y.label),w(null)}}),ke(Lk,{open:!!S,onClose:()=>D(null),maxWidth:"xs",fullWidth:!0,slotProps:{paper:{sx:{borderRadius:2,m:2}}},children:Jt(ko,{sx:{p:2,display:"flex",flexDirection:"column",gap:1.5},children:[ke(ko,{sx:{fontSize:15.5,fontWeight:600,color:"#37352f"},children:"\uD560\uC77C \uC218\uC815"}),ke(Nk,{autoFocus:!0,fullWidth:!0,size:"medium",value:S?.label??"",onChange:z=>D(u=>u&&{...u,label:z.target.value}),onKeyDown:z=>{if(z.key!=="Enter")return;let u=S;u&&u.label.trim()&&i?.(e,u.index,u.label.trim()),D(null)}}),Jt(ko,{sx:{display:"flex",alignItems:"center",gap:1},children:[!a&&l&&S&&!o[S.index]?.task_seq?ke(Zn,{"aria-label":"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",onClick:()=>{l(e,S.index,o[S.index]?.label??""),D(null)},sx:{color:"#57564f"},children:ke(Yc,{sx:{fontSize:20}})}):null,!a&&S?ke(Zn,{"aria-label":"\uD560\uC77C \uC0AD\uC81C",onClick:()=>{r(e,S.index),D(null)},sx:{color:"#e5484d"},children:ke(Gc,{sx:{fontSize:19}})}):null,ke(ko,{sx:{flex:1}}),ke(Uc,{color:"inherit",onClick:()=>D(null),children:"\uCDE8\uC18C"}),ke(Uc,{variant:"contained",disabled:!S?.label.trim(),onClick:()=>{S&&S.label.trim()&&i?.(e,S.index,S.label.trim()),D(null)},children:"\uD655\uC778"})]})]})})]})}import{useRef as Zk,useState as Jk}from"react";import{Box as mt,IconButton as eT}from"@mui/material";import oT from"@mui/icons-material/Close";import Qc from"@mui/icons-material/AttachFileOutlined";var Gk=new Set(["jpg","jpeg","png","gif","bmp","webp","svg","pdf","txt","json","xml","log","md","markdown","csv","xls","xlsx","html","htm","js","jsx","ts","tsx","css","scss","sass","less","php","py","java","c","cpp","h","hpp","cs","go","rs","rb","swift","kt","scala","sql","sh","bash","bat","ps1","yml","yaml","toml","ini","conf","mp4","avi","mov","wmv","flv","webm","mp3","wav","ogg","m4a","aac"]),Oi=e=>{let o=e?.split(".").pop()?.toLowerCase()??"";return Gk.has(o)};import{LinearProgress as Yk}from"@mui/material";import{Fragment as jk,jsx as Qk,jsxs as Xk}from"react/jsx-runtime";function jc(e){let o=gt(),t=o.useValue("attachmentUpload.taskSeq"),n=o.useValue("attachmentUpload.index"),r=o.useValue("attachmentUpload.total"),i=o.useValue("attachmentUpload.queue"),a=n??0;return!a||e>0&&(t??0)!==e?null:{index:a,total:r??0,queue:i??[]}}function sl(){let o=gt().useValue("attachmentUpload.progress");return Xk(jk,{children:[o??0,"%"]})}function Xc(){let o=gt().useValue("attachmentUpload.progress");return Qk(Yk,{variant:"determinate",value:o??0,sx:{height:4,borderRadius:2,bgcolor:"#dbe9fb",mt:.75}})}import{Fragment as tT,jsx as Do,jsxs as Er}from"react/jsx-runtime";function Ri(e){return e>=1048576?`${(e/1048576).toFixed(1)}MB`:`${Math.max(1,Math.round(e/1024))}KB`}var Pi={flex:1,minWidth:0,fontSize:13.5,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"};function zi({taskSeq:e,attachments:o,onAdd:t,onRemove:n,removeLocked:r=!1,onPreview:i,onDownload:a}){let[l,d]=Jk(!1),c=Zk(null),s=Oe(),f=dr(),p=ur(),m=jc(e),g=e===0,M=S=>{if(i){i(S);return}window.open(p(S.uuid??""),"_blank","noopener,noreferrer")},v=S=>{if(a){a(S);return}window.open(p(S.uuid??"",{download:!0}),"_blank","noopener,noreferrer")},h=S=>m?S+1<m.index?"done":S+1===m.index?"uploading":"waiting":"waiting",x=(S,D,y,w={})=>Er(mt,{sx:{px:1,py:.5,borderRadius:1,border:"1px solid",borderColor:w.uploading?"#d5e6fb":"#e6e6e3",bgcolor:w.uploading?"#f4f9ff":"transparent","&:hover .taskbox-file-remove":{opacity:1}},children:[Er(mt,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[Do(Qc,{sx:{fontSize:16,color:"#9a9a97"}}),D,Do(mt,{component:"span",sx:{fontSize:12,color:w.uploading?"#2f80ed":"#9a9a97",flexShrink:0},children:y}),w.removeIndex!==void 0?Do(eT,{className:"taskbox-file-remove",size:"small","aria-label":"\uCCA8\uBD80 \uC0AD\uC81C",onClick:()=>n(e,w.removeIndex),sx:{opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:Do(oT,{sx:{fontSize:15}})}):null]}),w.uploading?Do(Xc,{}):null]},S),B=S=>{let D=Oi(S.name);return Do(mt,{component:"button",type:"button",onClick:()=>D?M(S):v(S),title:`${S.name} ${D?"\uBBF8\uB9AC\uBCF4\uAE30":"\uB2E4\uC6B4\uB85C\uB4DC"}`,sx:{...Pi,color:"#37352f",textAlign:"left",p:0,border:"none",background:"none",font:"inherit",fontSize:13.5,cursor:"pointer","&:hover":{textDecoration:"underline",color:"#2f80ed"}},children:S.name})};return Er(Wo,{icon:Do(Qc,{sx:{fontSize:18,display:"block"}}),title:Er(tT,{children:["\uD30C\uC77C ",o.length>0?o.length:""]}),children:[Er(mt,{sx:{display:"flex",flexDirection:"column",gap:.5,mt:1},children:[o.map((S,D)=>{let y=`${S.uuid||S.name}-${D}`;if(g){let w=h(D),T=w==="uploading";return x(y,Do(mt,{component:"span",sx:{...Pi,color:w==="done"?"#37352f":"#9a9a97"},children:S.name}),T?Do(sl,{}):Ri(S.size),{uploading:T,removeIndex:!r&&!m?D:void 0})}return S.uuid?x(y,B(S),Ri(S.size),{removeIndex:r?void 0:D}):x(y,Do(mt,{component:"span",title:"\uC2E4\uD30C\uC77C\uC774 \uC5C6\uB294 \uC774\uC804 \uBC29\uC2DD \uCCA8\uBD80\uC785\uB2C8\uB2E4(\uB2E4\uC6B4\uB85C\uB4DC \uBD88\uAC00) \u2014 \uB2E4\uC2DC \uCCA8\uBD80\uD574 \uC8FC\uC138\uC694.",sx:{...Pi,color:"#9a9a97"},children:S.name}),Ri(S.size),{removeIndex:r?void 0:D})}),!g&&m?m.queue.slice(m.index-1).map((S,D)=>{let y=D===0;return x(`uploading-${m.index+D}-${S.name}`,Do(mt,{component:"span",sx:{...Pi,color:"#9a9a97"},children:S.name}),y?Do(sl,{}):Ri(S.size),{uploading:y})}):null]}),Do(mt,{onClick:()=>c.current?.click(),onDragOver:S=>{S.preventDefault(),d(!0)},onDragLeave:()=>d(!1),onDrop:S=>{S.preventDefault(),d(!1);let D=Array.from(S.dataTransfer.files);D.length>0&&t(e,D)},sx:{mt:1,py:2.5,display:"flex",alignItems:"center",justifyContent:"center",gap:.5,border:"1.5px dashed",borderColor:l?"#2f80ed":"#cfcfcc",borderRadius:1,bgcolor:l?"#eef6ff":"transparent",color:"#787774",fontSize:13.5,cursor:"pointer",transition:"background-color 0.15s, border-color 0.15s","&:hover":{bgcolor:"#fafaf9",borderColor:"#9a9a97"}},children:s?`\uD30C\uC77C\uC744 \uCCA8\uBD80\uD558\uC138\uC694 (\uCD5C\uB300 ${f}MB)`:`\uD30C\uC77C\uC744 \uB04C\uC5B4\uB2E4 \uB193\uAC70\uB098 \uD074\uB9AD\uD574 \uCCA8\uBD80\uD558\uC138\uC694 (\uCD5C\uB300 ${f}MB)`}),Do(mt,{component:"input",ref:c,type:"file",multiple:!0,onChange:S=>{let D=Array.from(S.target.files??[]);D.length>0&&t(e,D),S.target.value=""},sx:{display:"none"}})]})}import{useState as cT}from"react";import{Checkbox as mT,Divider as uT,ListItemIcon as dT,Menu as pT,MenuItem as om}from"@mui/material";import fT from"@mui/icons-material/Add";import{useEffect as nT,useState as Zc}from"react";import{Box as cl,Button as rT}from"@mui/material";import{FormDialog as iT}from"@ehfuse/mui-form-dialog";import{ClearTextField as aT}from"@ehfuse/mui-form-controls";import{ColorPicker as lT}from"@ehfuse/mui-color-picker";import{ErrorAlert as sT}from"@ehfuse/alerts";import{jsx as Mr,jsxs as ml}from"react/jsx-runtime";var Jc="#2f80ed";function em({open:e,onClose:o,onSubmit:t}){let[n,r]=Zc(""),[i,a]=Zc(Jc);nT(()=>{e&&(r(""),a(Jc))},[e]);let l=()=>{let s=n.trim();if(!s){sT("\uB77C\uBCA8 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}t(s,i),o()},d=as(i),c=ml(cl,{children:[ml(cl,{sx:{display:"flex",alignItems:"center",gap:1.5,mt:.5},children:[Mr(aT,{label:"\uB77C\uBCA8 \uC774\uB984",value:n,onChange:s=>r(s.target.value),onKeyDown:s=>{s.key==="Enter"&&(s.preventDefault(),l())},fullWidth:!0,autoFocus:!0}),Mr(lT,{value:i,onChange:s=>a(s),shape:"circle",colorSize:28})]}),ml(cl,{sx:{mt:2,display:"flex",alignItems:"center",gap:1,fontSize:13,color:"#787774"},children:["\uBBF8\uB9AC\uBCF4\uAE30",Mr(Re,{option:{key:"__preview__",name:n.trim()||"\uB77C\uBCA8",...d}})]})]});return Mr(iT,{open:e,onClose:o,maxWidth:"xs",title:"\uC0C8 \uB77C\uBCA8 \uCD94\uAC00",locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-add-label",sections:[{id:"add-label",showTitle:!1,children:c}],actions:{showCancelButton:!0,right:Mr(rT,{variant:"contained",onClick:l,children:"\uCD94\uAC00"})}})}import{Fragment as xT,jsx as Jn,jsxs as qi}from"react/jsx-runtime";function Ai({anchorEl:e,selectedKeys:o,labelOptions:t,onToggle:n,onAddLabel:r,onClose:i}){let[a,l]=cT(!1),d=nt();return qi(xT,{children:[qi(pT,{anchorEl:e,open:!!e,onClose:i,transitionDuration:0,...d,children:[t.map(c=>{let s=o.includes(c.key);return qi(om,{onClick:()=>n(c.key),sx:{fontSize:14,minWidth:170,gap:1},children:[Jn(mT,{size:"small",checked:s,sx:{p:0}}),Jn(Re,{option:c})]},c.key)}),Jn(uT,{}),qi(om,{onClick:()=>l(!0),sx:{fontSize:14,color:"#787774"},children:[Jn(dT,{children:Jn(fT,{sx:{fontSize:18,color:"#787774"}})}),"\uB77C\uBCA8 \uCD94\uAC00"]})]}),Jn(em,{open:a,onClose:()=>l(!1),onSubmit:r})]})}function tm(e,o){let t=Number(e.author_account_seq??0);return o.filter(n=>{let r=Number(n.account_seq??0);return r>0&&r!==t})}function nm(e,o){let t=(e.target_account_seqs??[]).filter(f=>f>0);if(t.length===0)return null;let n=new Set(t),r=tm(e,o),i=new Map;for(let f of r){let p=String(f.department??"").trim();if(!p)continue;let m=i.get(p)??[];m.push(f),i.set(p,m)}let a=[],l=new Set;for(let[f,p]of i)if(p.every(g=>n.has(Number(g.account_seq??0)))){a.push(f);for(let g of p)l.add(Number(g.account_seq??0))}let d=new Map(r.map(f=>[Number(f.account_seq??0),f.name])),c=e.target_names??[],s=[];return t.forEach((f,p)=>{l.has(f)||s.push(d.get(f)??c[p]??"\uC774\uB984\uC5C6\uC74C")}),{teamNames:a,individualNames:s}}function Li(e,o){let t=nm(e,o);return t?[...t.teamNames,...t.individualNames].join(", "):"\uBAA8\uB4E0 \uC9C1\uC6D0"}function oR(e,o){let t=nm(e,o);return t?{kind:"members",teamNames:t.teamNames,individualNames:t.individualNames}:{kind:"everyone"}}function rm(e,o,t){let n=(e.target_account_seqs??[]).filter(s=>s>0),r=tm(e,o),i=n.length>0?n.length:r.length,a=e.acks??[],l=t>0&&a.some(s=>s.account_seq===t),d=t>0&&Number(e.author_account_seq??0)===t,c=n.length===0||n.includes(t);return{count:a.length,total:i,acked:l,canAck:t>0&&!d&&c&&!l&&!e.completed}}function im(e,o){let t=Number(o)||50,n=t*1024*1024,r=e.filter(l=>l.size>n),i=e.filter(l=>l.size<=n),a=r.length>0?`\uD30C\uC77C\uC740 1\uAC1C\uB2F9 \uCD5C\uB300 ${t}MB \uAE4C\uC9C0 \uCCA8\uBD80\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
7
7
  \uC81C\uC678\uB41C \uD30C\uC77C: ${r.map(l=>l.name).join(", ")}`:null;return{accepted:i,rejected:r,message:a}}import{Fragment as Ni,jsx as Ce,jsxs as Pr}from"react/jsx-runtime";var lm="#0f9d58";function ul({form:e,statusOptions:o,customTabs:t,sprints:n=[],avatarSrcByName:r,isNotice:i=!1,hideProject:a=!1,hideBug:l=!1,leadingRow:d,hideLabel:c=!1,employees:s=[],myAccountSeq:f=0,onMemberEdit:p,onAddProject:m,onAddLabelOption:g,contentSyncKey:M="create"}){let v=gt(),h=dr(),x=e.useFormValue("manager_name"),B=e.useFormValue("receiver_names"),S=e.useFormValue("start_date"),D=!!e.useFormValue("is_event"),y=!!e.useFormValue("is_bug"),w=e.useFormValue("bug_repro")??"",T=e.useFormValue("bug_device")??"",b=e.useFormValue("bug_where")??"",I=e.useFormValue("bug_version")??"",z=e.useFormValue("event_time")??"",u=e.useFormValue("event_place")??"",k=e.useFormValue("event_address")??"",R=e.useFormValue("due_date"),A=e.useFormValue("estimated_time")??"",L=e.useFormValue("reminder"),F=e.useFormValue("priority"),le=e.useFormValue("content"),me=e.useFormValue("checklist")??[],se=e.useFormValue("tab_key"),Te=e.useFormValue("sprint_seq")??0,fe=e.useFormValue("story_points")??0,ae=t.find(q=>q.key===se&&q.useSprints),ee=ae?n.filter(q=>`custom-${q.group_seq}`===se):[],[ye,ze]=am(null),W=e.useFormValue("label_keys"),[H,Z]=am(null),C=e.useFormValue("target_names"),E=e.useFormValue("target_account_seqs"),oe=v.useValue("createAttachmentFiles")??[],Ie=i?Li({author_account_seq:f,target_names:C,target_account_seqs:E},s):"";return Pr(Ni,{children:[d,i?null:Ce(Or,{sx:{display:"flex",gap:1.25,px:2,pt:1.5,pb:1.5,flexShrink:0},children:[{value:"task",label:"\uC5C5\uBB34"},{value:"event",label:"\uC77C\uC815"},...l?[]:[{value:"bug",label:"\uC624\uB958"}]].map(q=>{let xe=y?"bug":D?"event":"task",Se=xe===q.value;return Ce(gT,{onClick:()=>{if(xe===q.value)return;e.setFormValue("is_event",q.value==="event"),e.setFormValue("is_bug",q.value==="bug"),e.setFormValue("is_open",q.value==="bug");let ce=e.getFormValue("icon"),V=e.getFormValue("icon_color"),Be=[Me,"event",pr].includes(ce),U=!V||V===lm||V===fr;Be&&e.setFormValue("icon",q.value==="event"?"event":q.value==="bug"?pr:Me),U&&e.setFormValue("icon_color",q.value==="event"?lm:q.value==="bug"?fr:"")},sx:{px:1.75,py:.75,borderRadius:99,fontSize:13.5,fontWeight:Se?600:400,color:Se?"#ffffff":"#787774",bgcolor:Se?"#2563eb":"#f4f4f2"},children:q.label},q.label)})}),Ce(Rr,{sx:{borderColor:"#e6e6e3"}}),Pr(Or,{sx:{py:1.5,display:"flex",flexDirection:"column",gap:.25},children:[Ce(_i,{hideProject:a,showEstimatedTime:!D,values:{tabKey:se,managerName:x,receiverNames:B,startDate:S,dueDate:R,reminder:L,priority:F,estimatedTime:A,eventTime:z,eventPlace:u,eventAddress:k},onChangeEstimatedTime:q=>e.setFormValue("estimated_time",q),customTabs:t,avatarSrcByName:r,notice:i,event:D,onChangeEventTime:q=>e.setFormValue("event_time",q),onChangeEventPlace:q=>e.setFormValue("event_place",q),onChangeEventAddress:q=>e.setFormValue("event_address",q),targetSummary:Ie,onChangeProject:q=>e.setFormValue("tab_key",q),onAddProject:m,onChangeStartDate:q=>e.setFormValue("start_date",q),onChangeDueDate:q=>e.setFormValue("due_date",q),onChangeReminder:q=>e.setFormValue("reminder",q),onChangePriority:q=>e.setFormValue("priority",q),onMemberEdit:p,trailing:Pr(Ni,{children:[ae&&!D&&!i?Pr(Ni,{children:[Ce(pe,{icon:Ce(ST,{sx:{fontSize:17}}),label:"\uBAA9\uD45C",onClick:q=>ze(q),children:Te>0?ee.find(q=>q.seq===Te)?.name??"\uC0AD\uC81C\uB41C \uBAA9\uD45C":Ce(Or,{component:"span",sx:{color:"#9a9a97"},children:"\uBBF8\uBC30\uC815"})}),Ce(pe,{icon:Ce(BT,{sx:{fontSize:17}}),label:"\uD3EC\uC778\uD2B8",children:Ce(Rt,{value:fe>0?String(fe):"",placeholder:"\uBBF8\uCD94\uC815",onCommit:q=>e.setFormValue("story_points",Number(q.replace(/[^0-9.]/g,""))||0)})})]}):null,y?Ce(wi,{values:{repro:w,device:T,where:b,version:I},onChangeRepro:q=>e.setFormValue("bug_repro",q),onChangeDevice:q=>e.setFormValue("bug_device",q),onChangeWhere:q=>e.setFormValue("bug_where",q),onChangeVersion:q=>e.setFormValue("bug_version",q)}):null]}),leading:D||c?null:Ce(Or,{sx:{gridColumn:"1 / -1"},children:Ce(pe,{icon:Ce(yT,{sx:{fontSize:17}}),label:"\uB77C\uBCA8",onClick:q=>Z(q),children:(W??[]).length>0?Ce(Ht,{labelKeys:W??[],labelOptions:o}):Ce(Or,{component:"span",sx:{color:"#9a9a97"},children:"\uBE44\uC5B4 \uC788\uC74C"})})})}),Ce(Rr,{sx:{my:1.5,borderColor:"#e6e6e3"}}),Ce(Wo,{icon:Ce(kT,{sx:{fontSize:18,display:"block"}}),title:"\uB0B4\uC6A9",children:Ce(Di,{syncKey:M,value:le,onChange:q=>e.setFormValue("content",q)})}),D?null:Ce(Rr,{sx:{my:1.5,borderColor:"#e6e6e3"}}),D?null:Ce(Mi,{taskSeq:0,checklist:me,onAdd:(q,xe)=>e.setFormValue("checklist",[...me,{label:xe,checked:!1}]),onToggle:(q,xe,Se)=>e.setFormValue("checklist",me.map((ce,V)=>V===xe?{...ce,checked:Se}:ce)),onRemove:(q,xe)=>e.setFormValue("checklist",me.filter((Se,ce)=>ce!==xe)),onUpdate:(q,xe,Se)=>e.setFormValue("checklist",me.map((ce,V)=>V===xe?{...ce,label:Se}:ce))}),Ce(Rr,{sx:{my:1.5,borderColor:"#e6e6e3"}}),Ce(zi,{taskSeq:0,attachments:oe.map(q=>({name:q.name,size:q.size})),onAdd:(q,xe)=>{let Se=im(xe,h);Se.message&&vT(Se.message),Se.accepted.length!==0&&v.setValue("createAttachmentFiles",[...v.getValue("createAttachmentFiles")??[],...Se.accepted])},onRemove:(q,xe)=>v.setValue("createAttachmentFiles",oe.filter((Se,ce)=>ce!==xe))}),y?null:Pr(Ni,{children:[Ce(Rr,{sx:{my:1.5,borderColor:"#e6e6e3"}}),Ce(Wo,{icon:Ce(TT,{sx:{fontSize:18,display:"block"}}),title:"\uBE44\uACE0",children:Ce(CT,{form:e,name:"note",placeholder:"\uBE44\uACE0 \uC785\uB825",fullWidth:!0,size:"medium",sx:{mt:1}})})]})]}),Ce(hT,{transitionDuration:0,anchorEl:ye,open:!!ye,onClose:()=>ze(null),children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...ee.map(q=>({seq:q.seq,label:Fo(q)}))].map(q=>Ce(bT,{onClick:()=>{e.setFormValue("sprint_seq",q.seq),ze(null)},sx:{fontSize:14,minWidth:170},children:q.label},q.seq))}),Ce(Ai,{anchorEl:H,selectedKeys:W??[],labelOptions:o,onToggle:q=>e.setFormValue("label_keys",Yr(W??[],q)),onAddLabel:(q,xe)=>g?.(q,xe),onClose:()=>Z(null)})]})}import{Fragment as mm,jsx as Ge,jsxs as er}from"react/jsx-runtime";function $R({open:e,onClose:o,...t}){let{form:n,presetDueDate:r="",presetTabKey:i="",presetManager:a=null,isNotice:l=!1,defaultBug:d=!1}=t,c=gt(),s=_T(!1),[f,p]=sm(0),[m,g]=sm(null),M=n.useFormValue("title"),v=n.useFormValue("icon"),h=n.useFormValue("icon_color"),x=!!n.useFormValue("is_event"),B=!!n.useFormValue("is_bug"),S=Oe(),y=c.useValue("createSubmitting")??!1,w=zn(v||Me),T=l?"\uACF5\uC9C0 \uB4F1\uB85D":x?"\uC77C\uC815 \uB4F1\uB85D":B?"\uC624\uB958 \uB4F1\uB85D":"\uC5C5\uBB34 \uB4F1\uB85D",b=l?"\uACF5\uC9C0 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694":x?"\uC77C\uC815 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694":B?"\uC5B4\uB5A4 \uC624\uB958\uC778\uC9C0 \uD55C \uC904\uB85C \uC801\uC5B4\uC8FC\uC138\uC694":"\uC5C5\uBB34 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694";IT(()=>{let u=s.current;s.current=e,!(!e||u)&&(n.setFormValues({...n.getFormValues(),title:"",icon:l?vo:d?pr:Me,icon_color:l?"#e5484d":d?fr:"",manager_name:a?.name??"",manager_account_seq:a?.accountSeq??0,receiver_names:[],receiver_account_seqs:[],is_notice:l,is_event:!1,is_bug:d,is_open:d,bug_repro:"",bug_device:"",bug_where:"",bug_version:"",event_time:"",event_place:"",event_address:"",target_names:[],target_account_seqs:[],start_date:He(new Date),due_date:r,reminder:"none",priority:"medium",note:"",content:"",checklist:[],tab_key:i}),c.setValue("createAttachmentFiles",[]),p(k=>k+1))},[e]);let I=er(en,{sx:{display:"flex",alignItems:"center",gap:1,px:2,pt:2,pb:1},children:[Ge(pl,{size:"small","aria-label":"\uC544\uC774\uCF58 \uBCC0\uACBD",onClick:u=>g(u.currentTarget),sx:{p:0,color:h||"#1e3a8a"},children:Ge(w,{sx:{fontSize:20}})}),Ge(en,{component:"input",autoFocus:!0,spellCheck:!1,value:M,placeholder:b,onChange:u=>n.setFormValue("title",u.target.value),sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:19,fontWeight:600,color:"#37352f",p:0,m:0,"&::placeholder":{color:"#c9c8c5",fontWeight:400}}})]}),z=Ge(Qn,{anchorEl:m,value:v,color:h||"#1e3a8a",onSelect:u=>n.setFormValue("icon",u),onSelectColor:u=>n.setFormValue("icon_color",u),onClose:()=>g(null)});return S?er(mm,{children:[Ge(OT,{open:e,onClose:o,locale:"ko",fontScale:{enabled:!0,default:1.1,min:.6},title:T,titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1},custom:[{icon:Ge(dl,{variant:"contained",size:"small",disableElevation:!0,disabled:y,onClick:y?void 0:n.submit,sx:{ml:2,minWidth:0,px:1.5,py:.35,fontSize:14,fontWeight:600,bgcolor:"#2f80ed","&:hover":{bgcolor:"#2f80ed"}},children:"\uC800\uC7A5"}),tooltip:y?"\uC800\uC7A5 \uC911\u2026":""}]},fullScreen:!0,mobilePresentation:"slide",tabs:{visible:!1},contentTopPadding:0,contentPaddingX:0,sectionsPaddingTop:0,sectionContentPaddingTop:0,contentBottomPadding:0,scrollPastLastSection:!1,overlayScrollbar:{enabled:!0,contentStyle:{minWidth:0}},actions:{visible:!1},sections:[{id:"task-create",title:"",showTitle:!1,children:Ge(en,{sx:{width:"100%",minWidth:0,display:"flex",flexDirection:"column",gap:0},children:Ge(ul,{...t,contentSyncKey:`create-${f}`,leadingRow:I})})}]}),z]}):er(mm,{children:[Ge(wT,{anchor:"right",open:e,onClose:o,sx:{zIndex:u=>u.zIndex.modal},slotProps:{paper:{sx:{width:720,maxWidth:"100vw"}}},children:er(en,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[er(en,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1.5,flexShrink:0},children:[Ge(DT,{title:"\uC544\uC774\uCF58 \uBCC0\uACBD",arrow:!0,children:Ge(pl,{size:"small",onClick:u=>g(u.currentTarget),sx:{color:h||"#1e3a8a"},children:Ge(w,{sx:{fontSize:20}})})}),Ge(en,{component:"input",autoFocus:!0,spellCheck:!1,value:M,placeholder:b,onChange:u=>n.setFormValue("title",u.target.value),sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:18,fontWeight:500,color:"#37352f",p:0,m:0,"&::placeholder":{color:"#c9c8c5",fontWeight:400}}}),Ge(pl,{"aria-label":"\uB2EB\uAE30",onClick:o,sx:{color:"#6b7280"},children:Ge(ET,{})})]}),Ge(cm,{sx:{borderColor:"#e6e6e3"}}),Ge(en,{sx:{flex:1,minHeight:0},children:Ge(MT,{style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:Ge(ul,{...t,contentSyncKey:`create-${f}`})})}),Ge(cm,{sx:{borderColor:"#e6e6e3"}}),er(en,{sx:{display:"flex",justifyContent:"flex-end",gap:1,px:2,py:1.5,flexShrink:0},children:[Ge(dl,{onClick:o,color:"inherit",disabled:y,children:"\uCDE8\uC18C"}),Ge(dl,{onClick:n.submit,variant:"contained",disabled:y,children:y?"\uB4F1\uB85D \uC911\u2026":"\uB4F1\uB85D"})]})]})}),z]})}import{useEffect as Om,useRef as Rm,useState as Oy}from"react";import{Box as Ui,Button as Ry,Divider as Pm,Drawer as Py}from"@mui/material";import zy from"@mui/icons-material/ShareOutlined";import qy from"@ehfuse/overlay-scrollbar";import{FormDialog as Ay}from"@ehfuse/mui-form-dialog";import{SuccessAlert as zm}from"@ehfuse/alerts";import{useRef as xl,useState as or}from"react";import{Box as re,Button as um,Chip as Fi,IconButton as Zo,Tooltip as xm}from"@mui/material";import dm from"@mui/icons-material/Send";import{TextField as RT}from"@ehfuse/mui-form-controls";import Hi from"@mui/icons-material/Close";import PT from"@mui/icons-material/EditOutlined";import zT from"@mui/icons-material/Favorite";import qT from"@mui/icons-material/FavoriteBorderOutlined";import AT from"@mui/icons-material/CheckCircle";import LT from"@mui/icons-material/CheckCircleOutlineOutlined";import tr from"@mui/icons-material/AttachFileOutlined";import NT from"@mui/icons-material/AddCircleOutline";import FT from"@mui/icons-material/ImageOutlined";var fl=e=>{if(e===0)return"0 Bytes";let o=1024,t=["Bytes","KB","MB","GB","TB"],n=Math.floor(Math.log(e)/Math.log(o));return parseFloat((e/Math.pow(o,n)).toFixed(2))+" "+t[n]};import{Fragment as fm,jsx as K,jsxs as Ye}from"react/jsx-runtime";var HT=5;function pm({kind:e,reactions:o,myAccountSeq:t,onToggle:n}){let r=o??[],i=t>0&&r.some(c=>c.account_seq===t),a=e==="like"?"\uC88B\uC544\uC694":"\uD655\uC778",l=r.length===0?a:K(re,{sx:{whiteSpace:"pre-line",fontSize:12},children:r.map(c=>`${c.name} \xB7 ${c.time}`).join(`
8
8
  `)}),d=e==="like"?"#e5484d":"#2f80ed";return K(xm,{title:l,arrow:!0,enterDelay:300,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:Ye(re,{sx:{display:"inline-flex",alignItems:"center"},children:[K(Zo,{size:"small","aria-label":`\uB313\uAE00 ${a}`,onClick:n,sx:{color:i?d:"#c9c8c5",p:.5},children:e==="like"?i?K(zT,{sx:{fontSize:16}}):K(qT,{sx:{fontSize:16}}):i?K(AT,{sx:{fontSize:16}}):K(LT,{sx:{fontSize:16}})}),r.length>0?K(re,{component:"span",sx:{fontSize:12,color:i?d:"#9a9a97",ml:-.25},children:r.length}):null]})})}function gm({taskSeq:e,comments:o,currentUserName:t="",myAccountSeq:n=0,avatarSrcByName:r,onUpdate:i,onRemove:a,onToggleReaction:l,onPreview:d,onDownload:c}){let[s,f]=or(null),p=xl(null),[m,g]=or(null),[M,v]=or(!1),h=Math.max(0,o.length-HT),x=h>0&&!M,B=s?Math.min(s.index,h):h,S=o.map((b,I)=>({comment:b,index:I})).slice(x?B:0),D=ur(),y=b=>{if(d){d(b);return}window.open(D(b.uuid??""),"_blank","noopener,noreferrer")},w=b=>{if(c){c(b);return}window.open(D(b.uuid??"",{download:!0}),"_blank","noopener,noreferrer")},T=Ro().slots?.avatar;return Ye(re,{sx:{px:2,pb:2,display:"flex",flexDirection:"column",gap:.25},children:[Ye(re,{sx:{display:"flex",alignItems:"center",gap:1},children:[K($t,{sx:{fontSize:18,display:"block",color:"#37352f"}}),Ye(re,{sx:{fontSize:wr,fontWeight:500,color:"#37352f"},children:["\uB313\uAE00",o.length>0?` (${o.length})`:""]}),h>0&&(!x||B>0)?K(re,{role:"button",tabIndex:0,onClick:()=>v(b=>!b),onKeyDown:b=>{(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),v(I=>!I))},sx:{ml:"auto",flexShrink:0,cursor:"pointer",fontSize:14.5,color:"#5b87d6","&:hover":{textDecoration:"underline"}},children:x?`\uC774\uC804 \uB313\uAE00 ${B}\uAC1C \uB354 \uBCF4\uAE30`:"\uC774\uC804 \uB313\uAE00 \uC811\uAE30"}):null]}),o.length===0?K(re,{sx:{mt:1,fontSize:14.5,color:"#9a9a97"},children:"\uB4F1\uB85D\uB41C \uB313\uAE00\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):null,K(re,{sx:{display:"flex",flexDirection:"column",gap:1,mt:1},children:S.map(({comment:b,index:I})=>{let z=!!t&&b.author===t;return Ye(re,{sx:{display:"flex",gap:1.5,alignItems:"flex-start","&:hover .taskbox-comment-actions":{opacity:1,pointerEvents:"auto"},"&:not(:last-child)":{borderBottom:"1px dashed #e0dfdc",pb:1}},children:[(()=>{let u=r?.get(b.author)??"";return T?K(re,{sx:{display:"inline-flex",flexShrink:0},children:K(T,{name:b.author,src:u||void 0,size:44})}):K(re,{sx:{display:"inline-flex",flexShrink:0},children:K(rt,{src:u,avatarSx:{width:44,height:44,fontSize:20,borderRadius:"50%",...Nn[0]},iconFontSize:24})})})(),Ye(re,{sx:{flex:1,minWidth:0},children:[Ye(re,{sx:{display:"flex",alignItems:"center",gap:.75,minWidth:0,position:"relative"},children:[K(re,{component:"span",sx:{fontSize:14.5,fontWeight:700,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:b.author}),K(re,{component:"span",sx:{fontSize:12.5,color:"#9a9a97",flexShrink:0,whiteSpace:"nowrap"},children:b.time}),z?K(re,{sx:{ml:"auto"}}):Ye(re,{sx:{display:"flex",alignItems:"center",gap:.25,ml:"auto",flexShrink:0},children:[K(pm,{kind:"like",reactions:b.likes,myAccountSeq:n,onToggle:()=>l?.(e,I,"like")}),K(pm,{kind:"ack",reactions:b.acks,myAccountSeq:n,onToggle:()=>l?.(e,I,"ack")})]}),z?Ye(re,{className:"taskbox-comment-actions",sx:{display:"flex",alignItems:"center",gap:.25,position:"absolute",right:0,top:"50%",transform:"translateY(-50%)",pointerEvents:"none",backgroundColor:"#fff",opacity:0,transition:"opacity 0.15s"},children:[K(Zo,{size:"small","aria-label":"\uB313\uAE00 \uC218\uC815",onClick:()=>f({index:I,text:b.text,attachments:[...b.attachments??[]],files:[]}),sx:{color:"#9a9a97"},children:K(PT,{sx:{fontSize:15}})}),K(Zo,{size:"small","aria-label":"\uB313\uAE00 \uC0AD\uC81C",onClick:u=>g({anchorEl:u.currentTarget,index:I}),sx:{color:"#9a9a97"},children:K(Hi,{sx:{fontSize:15}})})]}):null]}),s?.index===I?Ye(re,{sx:{mt:.5},children:[K(re,{component:"textarea",autoFocus:!0,spellCheck:!1,value:s.text,onChange:u=>f({...s,text:u.target.value}),sx:{width:"100%",minHeight:56,border:"1px solid #dedddb",borderRadius:1,outline:"none",font:"inherit",fontSize:14,p:1,resize:"vertical"}}),Ye(re,{sx:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:.75,mt:.75},children:[s.attachments.map((u,k)=>{let R=()=>f({...s,attachments:s.attachments.filter((A,L)=>L!==k)});return Wi(u.name)&&u.uuid?Ye(re,{sx:{position:"relative"},children:[K(re,{component:"img",src:D(u.uuid,{thumb:"md"}),alt:u.name,title:u.name,loading:"lazy",sx:{width:72,height:72,objectFit:"cover",borderRadius:1,border:"1px solid #e6e6e3",display:"block"}}),K(Zo,{size:"small","aria-label":"\uCCA8\uBD80 \uC81C\uAC70",onClick:R,sx:{position:"absolute",top:-6,right:-6,p:.25,bgcolor:"#ffffff",border:"1px solid #e6e6e3","&:hover":{bgcolor:"#f1f5f9"}},children:K(Hi,{sx:{fontSize:14}})})]},`kept-${u.uuid}-${k}`):K(Fi,{size:"small",icon:K(tr,{sx:{fontSize:14}}),label:u.name,onDelete:R,sx:{fontSize:14,height:26,bgcolor:"#f1f5f9"}},`kept-${u.uuid??u.name}-${k}`)}),s.files.map((u,k)=>{let R=()=>f({...s,files:s.files.filter((A,L)=>L!==k)});return Wi(u.name)?Ye(re,{sx:{position:"relative"},children:[K(re,{component:"img",src:URL.createObjectURL(u),alt:u.name,title:`${u.name} (\uC0C8 \uD30C\uC77C)`,onLoad:A=>URL.revokeObjectURL(A.target.src),sx:{width:72,height:72,objectFit:"cover",borderRadius:1,border:"2px solid #2f80ed",display:"block"}}),K(Zo,{size:"small","aria-label":"\uCCA8\uBD80 \uC81C\uAC70",onClick:R,sx:{position:"absolute",top:-6,right:-6,p:.25,bgcolor:"#ffffff",border:"1px solid #e6e6e3","&:hover":{bgcolor:"#f1f5f9"}},children:K(Hi,{sx:{fontSize:14}})})]},`new-${u.name}-${k}`):K(Fi,{size:"small",icon:K(tr,{sx:{fontSize:14}}),label:`${u.name} (\uC0C8 \uD30C\uC77C)`,onDelete:R,sx:{fontSize:14,height:26,bgcolor:"#eef4ff"}},`new-${u.name}-${k}`)}),K(xm,{title:"\uCCA8\uBD80 \uCD94\uAC00",arrow:!0,children:K(Zo,{size:"small","aria-label":"\uCCA8\uBD80 \uCD94\uAC00",onClick:()=>p.current?.click(),sx:{ml:"auto",color:"#2f80ed"},children:K(NT,{sx:{fontSize:20}})})})]}),Ye(re,{sx:{display:"flex",justifyContent:"flex-end",alignItems:"center",gap:.75,mt:.5},children:[K(um,{size:"small",color:"inherit",onClick:()=>f(null),children:"\uCDE8\uC18C"}),K(um,{size:"small",variant:"contained",disabled:!s.text.trim()&&s.attachments.length===0&&s.files.length===0,onClick:()=>{i(e,I,s.text,{attachments:s.attachments,files:s.files}),f(null)},children:"\uC800\uC7A5"})]}),K(re,{component:"input",type:"file",multiple:!0,ref:p,sx:{display:"none"},onChange:u=>{let k=Array.from(u.target.files??[]);k.length>0&&f({...s,files:[...s.files,...k].slice(0,10)}),u.target.value=""}})]}):Ye(re,{children:[b.text?K(re,{sx:{fontSize:15,whiteSpace:"pre-wrap"},children:b.text}):null,(b.attachments??[]).length>0?K(re,{sx:{display:"flex",flexWrap:"wrap",gap:.75,mt:.75},children:(b.attachments??[]).map((u,k)=>{let R=!!u.uuid;if(Wi(u.name)&&R)return K(re,{component:"img",src:D(u.uuid??"",{thumb:"md"}),alt:u.name,title:`${u.name} \uD06C\uAC8C \uBCF4\uAE30`,loading:"lazy",onClick:()=>y(u),sx:{width:96,height:96,objectFit:"cover",borderRadius:1,border:"1px solid #e6e6e3",cursor:"pointer",bgcolor:"#f8fafc"}},`${u.name}-${k}`);let L=Oi(u.name);return K(Fi,{size:"small",icon:K(tr,{sx:{fontSize:14}}),label:`${u.name} (${fl(u.size)})`,clickable:R,onClick:R?()=>L?y(u):w(u):void 0,title:R?`${u.name} ${L?"\uBBF8\uB9AC\uBCF4\uAE30":"\uB2E4\uC6B4\uB85C\uB4DC"}`:u.name,sx:{fontSize:14,height:26,bgcolor:"#f1f5f9"}},`${u.name}-${k}`)})}):null]})]})]},`${b.time}-${I}`)})}),K(We,{open:!!m,anchorEl:m?.anchorEl??null,title:"\uC774 \uB313\uAE00\uC744 \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uC0AD\uC81C",onCancel:()=>g(null),onConfirm:()=>{m&&(a(e,m.index),f(null)),g(null)}})]})}function Wi(e){return/\.(png|jpe?g|gif|webp|bmp|svg|heic|heif)$/i.test(String(e??"").trim())}function hm({onSubmit:e}){let[o,t]=or(""),[n,r]=or([]),[i,a]=or(!1),l=xl(null),d=xl(null),c=Oe(),s=m=>{let g=Array.from(m??[]);g.length!==0&&r(M=>[...M,...g].slice(0,10))},f=()=>{let m=o.trim();!m&&n.length===0||(e(m,n.length>0?n:void 0),t(""),r([]))},p=Ye(fm,{children:[K(Zo,{size:"small","aria-label":"\uD30C\uC77C \uCCA8\uBD80",onClick:()=>l.current?.click(),sx:{color:"#9a9a97"},children:K(tr,{sx:{fontSize:20}})}),K(Zo,{size:"small","aria-label":"\uC774\uBBF8\uC9C0 \uCCA8\uBD80",onClick:()=>d.current?.click(),sx:{color:"#9a9a97"},children:K(FT,{sx:{fontSize:20}})})]});return Ye(re,{children:[n.length>0?K(re,{sx:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:.75,px:2,pt:1},children:n.map((m,g)=>Wi(m.name)?Ye(re,{sx:{position:"relative"},children:[K(re,{component:"img",src:URL.createObjectURL(m),alt:m.name,title:m.name,onLoad:M=>URL.revokeObjectURL(M.target.src),sx:{width:72,height:72,objectFit:"cover",borderRadius:1,border:"1px solid #e6e6e3",display:"block"}}),K(Zo,{size:"small","aria-label":"\uCCA8\uBD80 \uC81C\uAC70",onClick:()=>r(M=>M.filter((v,h)=>h!==g)),sx:{position:"absolute",top:-6,right:-6,p:.25,bgcolor:"#ffffff",border:"1px solid #e6e6e3","&:hover":{bgcolor:"#f1f5f9"}},children:K(Hi,{sx:{fontSize:14}})})]},`${m.name}-${g}`):K(Fi,{size:"small",icon:K(tr,{sx:{fontSize:14}}),label:`${m.name} (${fl(m.size)})`,onDelete:()=>r(M=>M.filter((v,h)=>h!==g)),sx:{fontSize:14,height:26,bgcolor:"#f1f5f9"}},`${m.name}-${g}`))}):null,Ye(re,{sx:{position:"relative",display:"flex"},onDragOver:m=>{Array.from(m.dataTransfer?.types??[]).includes("Files")&&(m.preventDefault(),a(!0))},onDragLeave:m=>{m.currentTarget.contains(m.relatedTarget)||a(!1)},onDrop:m=>{Array.from(m.dataTransfer?.types??[]).includes("Files")&&(m.preventDefault(),a(!1),s(m.dataTransfer?.files??null))},children:[i?Ye(re,{sx:{position:"absolute",inset:0,zIndex:2,display:"flex",alignItems:"center",justifyContent:"center",gap:.75,borderRadius:1,border:"2px dashed #2f80ed",bgcolor:"rgba(47,128,237,0.08)",color:"#2f80ed",fontSize:14,fontWeight:600,pointerEvents:"none"},children:[K(tr,{sx:{fontSize:18}}),"\uC5EC\uAE30\uC5D0 \uB193\uC73C\uBA74 \uCCA8\uBD80\uB429\uB2C8\uB2E4"]}):null,K(RT,{value:o,placeholder:"\uB313\uAE00\uC744 \uC785\uB825\uD558\uC138\uC694",onChange:m=>t(m.target.value),fullWidth:!0,multiline:!0,minRows:c?1:3,maxRows:3,sx:{"& .MuiInputBase-root":{pl:2,pr:c?15:6.5,pb:c?void 0:5,borderRadius:0},"& .MuiOutlinedInput-notchedOutline":{border:"none"}}}),c?Ye(re,{sx:{position:"absolute",right:8,top:"50%",transform:"translateY(-50%)",display:"flex",alignItems:"center",gap:.25},children:[p,K(Zo,{"aria-label":"\uB313\uAE00 \uB4F1\uB85D",disabled:!o.trim()&&n.length===0,onClick:f,sx:{color:"#2563eb","&.Mui-disabled":{color:"#c9c8c5"}},children:K(dm,{sx:{fontSize:22}})})]}):Ye(fm,{children:[K(re,{sx:{position:"absolute",left:8,bottom:6,display:"flex",alignItems:"center",gap:.25},children:p}),K(Zo,{"aria-label":"\uB313\uAE00 \uB4F1\uB85D",disabled:!o.trim()&&n.length===0,onClick:f,sx:{position:"absolute",right:8,top:"50%",transform:"translateY(-50%)",color:"#2563eb","&.Mui-disabled":{color:"#c9c8c5"}},children:K(dm,{sx:{fontSize:22}})})]})]}),K(re,{component:"input",ref:l,type:"file",multiple:!0,onChange:m=>{s(m.target.files),m.target.value=""},sx:{display:"none"}}),K(re,{component:"input",ref:d,type:"file",accept:"image/*",multiple:!0,onChange:m=>{s(m.target.files),m.target.value=""},sx:{display:"none"}})]})}import{useState as Tm}from"react";import{Box as $i,Checkbox as UT,IconButton as Ki,Tooltip as gl}from"@mui/material";import VT from"@mui/icons-material/Close";import GT from"@mui/icons-material/ArrowBack";import YT from"@mui/icons-material/ShareOutlined";import jT from"@mui/icons-material/ContentCopyOutlined";import XT from"@mui/icons-material/CheckCircle";import QT from"@mui/icons-material/CheckCircleOutlineOutlined";import{InfoAlert as WT,SuccessAlert as $T}from"@ehfuse/alerts";var bm=e=>e?e.replace(/<(script|style)[\s\S]*?<\/\1>/gi,"").replace(/<br\s*\/?>/gi,`
9
9
  `).replace(/<\/(p|div|li|h[1-6]|tr)>/gi,`