@ehfuse/taskbox 0.5.7 → 0.5.8
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 +7 -7
- package/dist/index.esm.js.map +3 -3
- package/dist/index.js +7 -7
- package/dist/index.js.map +3 -3
- package/dist/types/theme.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
var Mn="waiting",sr="replied";import{createContext as xm,useContext as gm,useMemo as rl}from"react";import{Box as bm}from"@mui/material";var fi="--app-mobile-font-offset";function po(e,o=0){return`calc(${e}px + max(0px, var(${fi}, 0px) - ${o}px))`}import{jsx as nl}from"react/jsx-runtime";var il=xm({});function hm({config:e,children:o}){let t=rl(()=>e??{},[e]),n=t.mobileFontOffsetPx;return nl(il.Provider,{value:t,children:n===void 0?o:nl(bm,{sx:{display:"contents",[fi]:`${n}px`},children:o})})}function yo(){return gm(il)}function xi(){let{buildFileUrl:e}=yo();return rl(()=>e||((o,t)=>{let n=[];return t?.thumb&&n.push(`thumb=${t.thumb}`),t?.download&&n.push("download=1"),`/api/v1/files/${o}${n.length?`?${n.join("&")}`:""}`}),[e])}function En(){let{uploadMaxMb:e}=yo();return e??50}import{useGlobalForm as td}from"@ehfuse/forma";import al from"@mui/icons-material/DoNotDisturbAltOutlined";import ll from"@mui/icons-material/BookmarkBorderOutlined";import km from"@mui/icons-material/LabelOutlined";import Tm from"@mui/icons-material/FlagOutlined";import ym from"@mui/icons-material/StarBorderOutlined";import Sm from"@mui/icons-material/FolderOutlined";import Bm from"@mui/icons-material/EventOutlined";import Cm from"@mui/icons-material/BuildOutlined";import vm from"@mui/icons-material/LocalShippingOutlined";import Im from"@mui/icons-material/StorefrontOutlined";import _m from"@mui/icons-material/GroupsOutlined";import wm from"@mui/icons-material/LightbulbOutlined";import Dm from"@mui/icons-material/FavoriteBorderOutlined";import Om from"@mui/icons-material/AssignmentOutlined";import Mm from"@mui/icons-material/HomeOutlined";import Em from"@mui/icons-material/WorkOutline";import Pm from"@mui/icons-material/SchoolOutlined";import Rm from"@mui/icons-material/LocalHospitalOutlined";import zm from"@mui/icons-material/RestaurantOutlined";import qm from"@mui/icons-material/LocalFloristOutlined";import Am from"@mui/icons-material/DirectionsCarOutlined";import Lm from"@mui/icons-material/CampaignOutlined";import Nm from"@mui/icons-material/SavingsOutlined";import Fm from"@mui/icons-material/Inventory2Outlined";import Hm from"@mui/icons-material/CleaningServicesOutlined";import sl from"@mui/icons-material/HandymanOutlined";import Wm from"@mui/icons-material/LocalPhoneOutlined";import $m from"@mui/icons-material/EmailOutlined";import Km from"@mui/icons-material/ShoppingCartOutlined";import Um from"@mui/icons-material/BarChartOutlined";import Vm from"@mui/icons-material/PrintOutlined";import Gm from"@mui/icons-material/SecurityOutlined";import Ym from"@mui/icons-material/AlarmOutlined";import jm from"@mui/icons-material/AttachFileOutlined";import Xm from"@mui/icons-material/PhotoCameraOutlined";import Qm from"@mui/icons-material/ImageOutlined";import Jm from"@mui/icons-material/MenuBookOutlined";import Zm from"@mui/icons-material/EditOutlined";import eu from"@mui/icons-material/KeyOutlined";import ou from"@mui/icons-material/LockOutlined";import tu from"@mui/icons-material/LockOpenOutlined";import nu from"@mui/icons-material/SettingsOutlined";import ru from"@mui/icons-material/CloudOutlined";import iu from"@mui/icons-material/WifiOutlined";import au from"@mui/icons-material/ComputerOutlined";import lu from"@mui/icons-material/SmartphoneOutlined";import su from"@mui/icons-material/TvOutlined";import cu from"@mui/icons-material/AccessTimeOutlined";import mu from"@mui/icons-material/TimerOutlined";import uu from"@mui/icons-material/MapOutlined";import pu from"@mui/icons-material/PlaceOutlined";import du from"@mui/icons-material/NavigationOutlined";import fu from"@mui/icons-material/FlightOutlined";import xu from"@mui/icons-material/TrainOutlined";import gu from"@mui/icons-material/DirectionsBusOutlined";import bu from"@mui/icons-material/DirectionsBikeOutlined";import hu from"@mui/icons-material/DirectionsWalkOutlined";import ku from"@mui/icons-material/DirectionsRunOutlined";import Tu from"@mui/icons-material/FitnessCenterOutlined";import yu from"@mui/icons-material/SportsSoccerOutlined";import Su from"@mui/icons-material/EmojiEventsOutlined";import Bu from"@mui/icons-material/CardGiftcardOutlined";import Cu from"@mui/icons-material/CakeOutlined";import cl from"@mui/icons-material/CoffeeOutlined";import vu from"@mui/icons-material/LocalPizzaOutlined";import Iu from"@mui/icons-material/ShoppingBagOutlined";import ml from"@mui/icons-material/CreditCardOutlined";import _u from"@mui/icons-material/AccountBalanceOutlined";import wu from"@mui/icons-material/AccountBalanceWalletOutlined";import Du from"@mui/icons-material/AttachMoneyOutlined";import Ou from"@mui/icons-material/ReceiptLongOutlined";import Mu from"@mui/icons-material/CalculateOutlined";import Eu from"@mui/icons-material/TrendingUpOutlined";import Pu from"@mui/icons-material/ListAltOutlined";import Ru from"@mui/icons-material/TaskAltOutlined";import zu from"@mui/icons-material/DoneAllOutlined";import qu from"@mui/icons-material/WarningAmberOutlined";import Au from"@mui/icons-material/InfoOutlined";import Lu from"@mui/icons-material/HelpOutlined";import Nu from"@mui/icons-material/SupportAgentOutlined";import Fu from"@mui/icons-material/PersonOutlined";import Hu from"@mui/icons-material/PersonAddOutlined";import Wu from"@mui/icons-material/BadgeOutlined";import $u from"@mui/icons-material/WbSunnyOutlined";import Ku from"@mui/icons-material/DarkModeOutlined";import Uu from"@mui/icons-material/LocalFireDepartmentOutlined";import Vu from"@mui/icons-material/WaterDropOutlined";import Gu from"@mui/icons-material/BoltOutlined";import Yu from"@mui/icons-material/AutorenewOutlined";import ju from"@mui/icons-material/ScienceOutlined";import Xu from"@mui/icons-material/MedicalServicesOutlined";import Qu from"@mui/icons-material/NotificationsOutlined";import Ju from"@mui/icons-material/SendOutlined";import Zu from"@mui/icons-material/LinkOutlined";import ep from"@mui/icons-material/PublicOutlined";import ul from"@mui/icons-material/ApartmentOutlined";import op from"@mui/icons-material/PlumbingOutlined";import tp from"@mui/icons-material/ElectricalServicesOutlined";import np from"@mui/icons-material/ChatOutlined";import rp from"@mui/icons-material/DescriptionOutlined";import ip from"@mui/icons-material/FactCheckOutlined";import ap from"@mui/icons-material/RocketLaunchOutlined";import lp from"@mui/icons-material/PaletteOutlined";import sp from"@mui/icons-material/MusicNoteOutlined";import cp from"@mui/icons-material/VideocamOutlined";import mp from"@mui/icons-material/ThumbUpOutlined";import up from"@mui/icons-material/PushPinOutlined";import pp from"@mui/icons-material/SearchOutlined";import dp from"@mui/icons-material/VisibilityOutlined";import fp from"@mui/icons-material/VerifiedOutlined";import xp from"@mui/icons-material/TrackChangesOutlined";import gp from"@mui/icons-material/ExtensionOutlined";import bp from"@mui/icons-material/CodeOutlined";import hp from"@mui/icons-material/BugReportOutlined";import kp from"@mui/icons-material/SmartToyOutlined";import Tp from"@mui/icons-material/StorageOutlined";import yp from"@mui/icons-material/QrCode2Outlined";import Sp from"@mui/icons-material/FileDownloadOutlined";import Bp from"@mui/icons-material/FileUploadOutlined";import Cp from"@mui/icons-material/MicOutlined";import vp from"@mui/icons-material/HeadphonesOutlined";import Ip from"@mui/icons-material/MovieOutlined";import _p from"@mui/icons-material/SportsEsportsOutlined";import wp from"@mui/icons-material/BrushOutlined";import Dp from"@mui/icons-material/ArchitectureOutlined";import Op from"@mui/icons-material/EngineeringOutlined";import Mp from"@mui/icons-material/FactoryOutlined";import Ep from"@mui/icons-material/AgricultureOutlined";import Pp from"@mui/icons-material/DirectionsBoatOutlined";import Rp from"@mui/icons-material/TwoWheelerOutlined";import zp from"@mui/icons-material/HandshakeOutlined";import qp from"@mui/icons-material/GavelOutlined";import Ap from"@mui/icons-material/BalanceOutlined";import Lp from"@mui/icons-material/TranslateOutlined";import Np from"@mui/icons-material/PsychologyOutlined";import Fp from"@mui/icons-material/PetsOutlined";import Hp from"@mui/icons-material/CelebrationOutlined";import Wp from"@mui/icons-material/BeachAccessOutlined";import $p from"@mui/icons-material/AcUnitOutlined";import Kp from"@mui/icons-material/ForestOutlined";import Up from"@mui/icons-material/LandscapeOutlined";import Vp from"@mui/icons-material/HotelOutlined";import Gp from"@mui/icons-material/LocalLaundryServiceOutlined";import Yp from"@mui/icons-material/ChairOutlined";import jp from"@mui/icons-material/LocalBarOutlined";import Xp from"@mui/icons-material/LunchDiningOutlined";import Qp from"@mui/icons-material/IcecreamOutlined";import Jp from"@mui/icons-material/WorkspacePremiumOutlined";import Zp from"@mui/icons-material/DiamondOutlined";import ed from"@mui/icons-material/VaccinesOutlined";var gi="bookmark",_e="label",Mo="notifications",Pn="warning",Rn="#e53e3e",pl="none",bi=[{key:pl,Icon:al},{key:"label",Icon:km},{key:"bookmark",Icon:ll},{key:"flag",Icon:Tm},{key:"star",Icon:ym},{key:"folder",Icon:Sm},{key:"event",Icon:Bm},{key:"build",Icon:Cm},{key:"shipping",Icon:vm},{key:"store",Icon:Im},{key:"groups",Icon:_m},{key:"idea",Icon:wm},{key:"heart",Icon:Dm},{key:"assignment",Icon:Om},{key:"home",Icon:Mm},{key:"work",Icon:Em},{key:"school",Icon:Pm},{key:"hospital",Icon:Rm},{key:"restaurant",Icon:zm},{key:"flower",Icon:qm},{key:"car",Icon:Am},{key:"campaign",Icon:Lm},{key:"savings",Icon:Nm},{key:"inventory",Icon:Fm},{key:"cleaning",Icon:Hm},{key:"handyman",Icon:sl},{key:"phone",Icon:Wm},{key:"email",Icon:$m},{key:"cart",Icon:Km},{key:"chart",Icon:Um},{key:"print",Icon:Vm},{key:"security",Icon:Gm},{key:"alarm",Icon:Ym},{key:"attach",Icon:jm},{key:"camera",Icon:Xm},{key:"image",Icon:Qm},{key:"book",Icon:Jm},{key:"edit",Icon:Zm},{key:"key",Icon:eu},{key:"lock",Icon:ou},{key:"unlock",Icon:tu},{key:"settings",Icon:nu},{key:"cloud",Icon:ru},{key:"wifi",Icon:iu},{key:"computer",Icon:au},{key:"smartphone",Icon:lu},{key:"tv",Icon:su},{key:"clock",Icon:cu},{key:"timer",Icon:mu},{key:"map",Icon:uu},{key:"place",Icon:pu},{key:"navigation",Icon:du},{key:"flight",Icon:fu},{key:"train",Icon:xu},{key:"bus",Icon:gu},{key:"bike",Icon:bu},{key:"walk",Icon:hu},{key:"run",Icon:ku},{key:"fitness",Icon:Tu},{key:"soccer",Icon:yu},{key:"trophy",Icon:Su},{key:"gift",Icon:Bu},{key:"cake",Icon:Cu},{key:"coffee",Icon:cl},{key:"pizza",Icon:vu},{key:"bag",Icon:Iu},{key:"card",Icon:ml},{key:"bank",Icon:_u},{key:"wallet",Icon:wu},{key:"money",Icon:Du},{key:"receipt",Icon:Ou},{key:"calculate",Icon:Mu},{key:"trending",Icon:Eu},{key:"listalt",Icon:Pu},{key:"task",Icon:Ru},{key:"doneall",Icon:zu},{key:"warning",Icon:qu},{key:"info",Icon:Au},{key:"help",Icon:Lu},{key:"support",Icon:Nu},{key:"person",Icon:Fu},{key:"personadd",Icon:Hu},{key:"badge",Icon:Wu},{key:"sun",Icon:$u},{key:"moon",Icon:Ku},{key:"fire",Icon:Uu},{key:"water",Icon:Vu},{key:"bolt",Icon:Gu},{key:"renew",Icon:Yu},{key:"science",Icon:ju},{key:"medical",Icon:Xu},{key:"notifications",Icon:Qu},{key:"send",Icon:Ju},{key:"link",Icon:Zu},{key:"public",Icon:ep},{key:"apartment",Icon:ul},{key:"plumbing",Icon:op},{key:"electrical",Icon:tp},{key:"chat",Icon:np},{key:"description",Icon:rp},{key:"factcheck",Icon:ip},{key:"rocket",Icon:ap},{key:"palette",Icon:lp},{key:"music",Icon:sp},{key:"video",Icon:cp},{key:"thumbup",Icon:mp},{key:"pin",Icon:up},{key:"search",Icon:pp},{key:"eye",Icon:dp},{key:"verified",Icon:fp},{key:"target",Icon:xp},{key:"extension",Icon:gp},{key:"code",Icon:bp},{key:"bug",Icon:hp},{key:"robot",Icon:kp},{key:"storage",Icon:Tp},{key:"qrcode",Icon:yp},{key:"download",Icon:Sp},{key:"upload",Icon:Bp},{key:"mic",Icon:Cp},{key:"headphones",Icon:vp},{key:"movie",Icon:Ip},{key:"game",Icon:_p},{key:"brush",Icon:wp},{key:"architecture",Icon:Dp},{key:"engineering",Icon:Op},{key:"factory",Icon:Mp},{key:"agriculture",Icon:Ep},{key:"boat",Icon:Pp},{key:"motorcycle",Icon:Rp},{key:"handshake",Icon:zp},{key:"gavel",Icon:qp},{key:"balance",Icon:Ap},{key:"translate",Icon:Lp},{key:"psychology",Icon:Np},{key:"pets",Icon:Fp},{key:"celebration",Icon:Hp},{key:"beach",Icon:Wp},{key:"snow",Icon:$p},{key:"forest",Icon:Kp},{key:"mountain",Icon:Up},{key:"hotel",Icon:Vp},{key:"laundry",Icon:Gp},{key:"chair",Icon:Yp},{key:"bar",Icon:jp},{key:"burger",Icon:Xp},{key:"icecream",Icon:Qp},{key:"medal",Icon:Jp},{key:"diamond",Icon:Zp},{key:"vaccine",Icon:ed}],od={cafe:cl,payment:ml,business:ul,construction:sl};function Oe(e){return e===pl?null:bi.find(o=>o.key===e)?.Icon??od[String(e??"")]??ll}function cr(e){return Oe(e)??al}var hi={title:"",icon:_e,icon_color:"",manager_name:"",manager_account_seq:0,receiver_names:[],receiver_account_seqs:[],is_notice:!1,is_event:!1,is_bug:!1,is_open:!1,bug_repro:"",bug_device:"",bug_where:"",bug_version:"",sprint_seq:0,story_points:0,event_time:"",event_place:"",event_address:"",target_names:[],target_account_seqs:[],start_date:"",due_date:"",reminder:"none",priority:"medium",label_keys:[],note:"",content:"",checklist:[],tab_key:""},ki={createAttachmentFiles:[],createSubmitting:!1,attachmentUpload:null};function nd(e){let{formId:o="taskbox-create-form",initialValues:t,onValidate:n,onSubmit:r}=e;return td({formId:o,initialValues:{...hi,...t},onValidate:n,onSubmit:r})}import{useGlobalFormaState as rd}from"@ehfuse/forma";var dl="taskbox-ui-state";function et(){return rd({stateId:dl,initialValues:ki})}import{useMemo as id}from"react";import{useTheme as ad}from"@mui/material";function ln(e,o){let t=Math.max(0,Math.min(1,o));if(t<=0)return"transparent";let n=e.trim().replace("#",""),r=n.length===3?n.split("").map(u=>u+u).join(""):n;if(!/^[0-9a-fA-F]{6}$/.test(r))return e;let i=Number.parseInt(r.slice(0,2),16),a=Number.parseInt(r.slice(2,4),16),l=Number.parseInt(r.slice(4,6),16);return`rgba(${i}, ${a}, ${l}, ${t})`}function Ti(e,o){let t=Math.max(0,Math.min(1,o)),n=e.trim().replace("#",""),r=n.length===3?n.split("").map(c=>c+c).join(""):n;if(!/^[0-9a-fA-F]{6}$/.test(r))return e;let i=c=>Math.round(c+(255-c)*t),a=i(Number.parseInt(r.slice(0,2),16)),l=i(Number.parseInt(r.slice(2,4),16)),u=i(Number.parseInt(r.slice(4,6),16));return`#${[a,l,u].map(c=>c.toString(16).padStart(2,"0")).join("")}`}function yi(e,o,t){return t==="dark"?{accent:e,accentContrast:o,accentSoft:"#1d2b45",accentOnSurface:Ti(e,.45),danger:"#f87171",dangerSoft:"#3a1f22",success:"#4ade80",warning:"#fbbf24",textStrong:"#f8fafc",textPrimary:"#e2e8f0",textSecondary:"#a3adbb",textMuted:"#77808d",textInverse:"#0f1216",surface:"#161a1f",surfaceSubtle:"#1e232a",surfaceHover:"#272d36",border:"#2c333c",borderStrong:"#3b434e"}:{accent:e,accentContrast:o,accentSoft:"#eef4ff",accentOnSurface:e,danger:"#e5484d",dangerSoft:"#fdebec",success:"#16a34a",warning:"#e8a33d",textStrong:"#000000",textPrimary:"#37352f",textSecondary:"#787774",textMuted:"#9a9a97",textInverse:"#ffffff",surface:"#ffffff",surfaceSubtle:"#fafaf9",surfaceHover:"#f4f4f2",border:"#e6e6e3",borderStrong:"#dedddb"}}function ld(e,o){let t=o==="dark";return{bg:t?Ti(e.accent,.45):e.accent,color:t?e.textInverse:e.accentContrast,border:"none",fontSize:11.5,fontWeight:600,minWidth:20,width:34,borderRadius:999,paddingX:.6}}function fl(e,o){return{...e,...o??{}}}function mr(e,o="light"){let t=ld(e,o),n=e.accentOnSurface;return{mode:o,colors:e,table:{bg:e.surface,borderColor:e.borderStrong,headerBg:e.surface,headerColor:e.textSecondary,headerActiveColor:e.textStrong,headerFilteredColor:n,headerFontSize:13,rowBg:e.surface,rowColor:e.textPrimary,rowSubColor:e.textSecondary,rowTitleColor:e.textStrong,rowTitleFontWeight:o==="dark"?400:500,rowHoverBg:e.surfaceHover,rowBorderColor:e.border,cellHoverBg:e.surfaceHover,emptyColor:e.textMuted,groupHeader:{bg:e.surfaceSubtle,hoverBg:e.surfaceHover,borderColor:e.border,labelColor:o==="dark"?e.textStrong:e.textPrimary,labelFontSize:15.5,labelFontWeight:o==="dark"?400:700,minHeight:48,badge:{...t,borderRadius:4,width:34}}},board:{columnBg:e.surfaceSubtle,columnHeaderColor:e.textPrimary,columnHeaderFontSize:13.5,badge:{...t,borderRadius:4,width:34}},summary:{gaugeTrackColor:o==="dark"?e.borderStrong:"#ececea",gaugeBarColor:n,gaugeCompleteColor:e.success,gaugeHeight:6,numberColor:n,overdueColor:e.danger,textColor:e.textStrong},actionButton:{bg:e.accent,color:e.accentContrast,hoverBg:e.accent},tabs:{bg:o==="dark"?e.surfaceSubtle:e.surface,color:o==="dark"?e.textSecondary:e.textStrong,hoverBg:e.surfaceHover,borderColor:o==="dark"?e.border:e.borderStrong,selectedBg:o==="dark"?e.surfaceHover:e.textStrong,selectedColor:o==="dark"?e.textStrong:e.surface},calendar:{bg:e.surface,borderColor:e.border,headerBg:e.surfaceSubtle,headerColor:e.textSecondary,cellBg:e.surface,otherMonthBg:e.surfaceSubtle,todayBg:e.accentSoft,hoverBg:e.surfaceHover,dateColor:e.textPrimary,holidayColor:e.danger},card:{bg:o==="dark"?e.surfaceSubtle:e.surface,borderColor:e.border,hoverBg:e.surfaceHover,titleColor:e.textPrimary,subColor:e.textSecondary},timeline:{bg:e.surface,gridColor:e.border,headerBg:e.surfaceSubtle,headerColor:e.textSecondary,todayLineColor:e.accentOnSurface,barColor:e.accentOnSurface,overdueBarColor:e.danger},avatar:{ringColor:o==="dark"?e.textStrong:e.accent,separatorColor:e.surface},chip:{borderRadius:.75,fontSize:13,fontWeight:500,plainColor:o==="dark"?e.textSecondary:"#57564f",plainDotColor:e.textMuted,darkBgAlpha:.15,darkTextSource:"dot"}}}function Si(e,o){if(!o)return e;let t=o.mode??e.mode,r={...t===e.mode?e.colors:yi(e.colors.accent,e.colors.accentContrast,t),...o.colors??{}},i=mr(r,t),{groupHeader:a,...l}=o.table??{},{badge:u,...c}=o.board??{},{badge:d,...p}=a??{};return{mode:t,colors:r,table:{...i.table,...l,groupHeader:{...i.table.groupHeader,...p,badge:fl(i.table.groupHeader.badge,d)}},board:{...i.board,...c,badge:fl(i.board.badge,u)},summary:{...i.summary,...o.summary??{}},chip:{...i.chip,...o.chip??{}},actionButton:{...i.actionButton,...o.actionButton??{}},tabs:{...i.tabs,...o.tabs??{}},avatar:{...i.avatar,...o.avatar??{}},calendar:{...i.calendar,...o.calendar??{}},card:{...i.card,...o.card??{}},timeline:{...i.timeline,...o.timeline??{}}}}function sd(e={}){let{mode:o="light",accent:t="#2563eb",accentContrast:n="#ffffff",input:r}=e;return Si(mr(yi(t,n,o),o),r)}function le(){let e=ad(),{theme:o}=yo(),t=e.palette.primary.main,n=e.palette.primary.contrastText,r=e.palette.mode==="dark"?"dark":"light";return id(()=>Si(mr(yi(t,n,r),r),o),[t,n,r,o])}import{useCallback as rt,useEffect as Hl,useMemo as Hn,useRef as Af,useState as it}from"react";import{Box as Po,Divider as Lf,ListItemIcon as Nf,Menu as Wl,MenuItem as wr}from"@mui/material";import Ff from"@mui/icons-material/Add";import Hf from"@mui/icons-material/ArrowUpward";import Wf from"@mui/icons-material/ArrowDownward";import $f from"@mui/icons-material/KeyboardArrowDown";import Kf from"@mui/icons-material/KeyboardArrowRight";import Yi from"@mui/icons-material/Check";import Uf from"@mui/icons-material/FilterList";import Vf from"@mui/icons-material/InboxOutlined";import{Virtuoso as $l}from"react-virtuoso";import Gf from"@ehfuse/overlay-scrollbar";import{DatePicker as Yf}from"@ehfuse/mui-datetime-picker";function cd(e){let o=String(e??"").trim().replace("T"," "),t=o.match(/^(\d{4})-(\d{2})-(\d{2})(?:[ ](\d{2}):(\d{2})(?::(\d{2}))?)?/);return t?new Date(Number(t[1]),Number(t[2])-1,Number(t[3]),Number(t[4]??0),Number(t[5]??0),Number(t[6]??0)):new Date(o)}function qe(e,o="YYYY-MM-DD"){let t=typeof e=="string"?cd(e):e;if(!e||e===""||isNaN(t.getTime()))return"";let n=t.getFullYear(),r=(t.getMonth()+1).toString().padStart(2,"0"),i=t.getDate().toString().padStart(2,"0"),a=n.toString().slice(-2);switch(o){case"YYYY-MM-DD":return`${n}-${r}-${i}`;case"YY.MM.DD":return`${a}.${r}.${i}`;case"MM/DD/YYYY":return`${r}/${i}/${n}`;case"DD.MM.YYYY":return`${i}.${r}.${n}`;case"YYYYMMDD":return`${n}${r}${i}`;default:return o.replace(/YYYY/g,n.toString()).replace(/YY/g,a).replace(/MM/g,r).replace(/DD/g,i)}}import{Box as xl}from"@mui/material";import{jsx as ud,jsxs as pd}from"react/jsx-runtime";var md={high:{label:"\uB192\uC74C",dot:"#e5484d",bgcolor:"#fdebec",color:"#c4554d"},medium:{label:"\uC911\uAC04",dot:"#2f80ed",bgcolor:"#e3eefb",color:"#1d4f91"},low:{label:"\uB0AE\uC74C",dot:"#9a9a97",bgcolor:"#efefed",color:"#57564f"}};function Eo({priority:e,small:o=!1,plain:t=!1}){let n=md[e],r=le(),i=r.mode==="dark",a=t||e==="low";return pd(xl,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:o?.5:.75,px:a?0:o?.9:1.25,py:a?0:o?.25:.5,borderRadius:.75,fontSize:o?11.5:13,fontWeight:500,bgcolor:a?"transparent":i?ln(n.dot,r.chip.darkBgAlpha):n.bgcolor,color:a?i?r.chip.plainColor:n.color:i?r.chip.darkTextSource==="fg"?n.color:n.dot:n.color,whiteSpace:"nowrap"},children:[ud(xl,{component:"span",sx:{width:o?6:8,height:o?6:8,borderRadius:"50%",bgcolor:n.dot}}),n.label]})}import{Menu as bd,MenuItem as hd}from"@mui/material";import kd from"@mui/icons-material/Check";function Uo(){return{}}var Bi=[{key:"always",name:"\uD56D\uC0C1"},{key:"often",name:"\uC790\uC8FC"},{key:"sometimes",name:"\uAC00\uB054"},{key:"once",name:"1\uD68C"},{key:"unable",name:"\uC7AC\uD604\uBD88\uAC00"}],Ci=[{key:"desktop",name:"\uB370\uC2A4\uD06C\uD1B1"},{key:"tablet",name:"\uD0DC\uBE14\uB9BF"},{key:"mobile",name:"\uD734\uB300\uD3F0"}],vi=[{key:"fixed",name:"\uC218\uC815\uC644\uB8CC"},{key:"duplicate",name:"\uC911\uBCF5"},{key:"cannot_reproduce",name:"\uC7AC\uD604\uBD88\uAC00"},{key:"by_design",name:"\uC0AC\uC591\uB300\uB85C"},{key:"wont_fix",name:"\uC548 \uACE0\uCE68"}];function gl(e){return Bi.find(o=>o.key===e)?.name??""}function bl(e){return Ci.find(o=>o.key===e)?.name??""}function ur(e){return vi.find(o=>o.key===e)?.name??""}function Ii(e,o=new Date){if(!e.is_event)return!1;let t=String(e.due_date??"").trim().slice(0,10);if(!/^\d{4}-\d{2}-\d{2}$/.test(t))return!1;let n=String(e.event_time??"").trim();if(/^\d{2}:\d{2}$/.test(n)){let i=new Date(`${t}T${n}:00`);return!Number.isNaN(i.getTime())&&i.getTime()<=o.getTime()}let r=new Date(`${t}T00:00:00`);return Number.isNaN(r.getTime())?!1:(r.setDate(r.getDate()+1),r.getTime()<=o.getTime())}function pr(e,o=new Date){return e.is_event?Ii(e,o):!!e.completed}var zt=[{key:"not_started",name:"\uC2DC\uC791\uC804",bg:"#efefed",fg:"#57564f",dot:"#9a9a97"},{key:"in_progress",name:"\uC9C4\uD589\uC911",bg:"#dcf2e3",fg:"#1f6b3a",dot:"#2f9e5b"},{key:"hold",name:"\uBCF4\uB958",bg:"#fbeee0",fg:"#8a5a2b",dot:"#d9730d"},{key:Mn,name:"\uD655\uC778\uC911",bg:"#faf1d7",fg:"#8a6d1d",dot:"#e8a33d"},{key:sr,name:"\uD655\uC778\uC644\uB8CC",bg:"#e3eefb",fg:"#1d4f91",dot:"#2f80ed"}],qn=zt.filter(e=>e.key!==Mn&&e.key!==sr);function dr(e){return zt.find(o=>o.key===e)??zt[0]}var _i={key:"completed",name:"\uC644\uB8CC",bg:"#e3eefb",fg:"#1d4f91",dot:"#2f80ed"};function fo(e){if(e.is_notice)return hl(e.status);if(e.is_bug&&e.completed){let o=ur(e.resolution)||"\uC644\uB8CC";return{..._i,name:o}}return e.completed?_i:e.is_bug?fd(e.status):dr(e.status)}var dd={key:"event_ended",name:"\uC885\uB8CC",bg:"#efefed",fg:"#57564f",dot:"#9a9a97"};function An(e){return Ii(e)?dd:null}var zn=[{key:"notice_scheduled",name:"\uAC8C\uC2DC\uC608\uC815",bg:"#faf1d7",fg:"#8a6d1d",dot:"#e8a33d"},{key:"notice_active",name:"\uAC8C\uC2DC\uC911",bg:"#dcf2e3",fg:"#1f6b3a",dot:"#2f9e5b"},{key:"notice_closed",name:"\uC885\uB8CC",bg:"#efefed",fg:"#57564f",dot:"#9a9a97"}];function hl(e){return zn.find(o=>o.key===e)??zn[1]}var wi="__closed__",qt=[{key:"bug_received",name:"\uC811\uC218",bg:"#fdeaea",fg:"#9b2c2c",dot:"#e53e3e"},{key:"bug_confirmed",name:"\uD655\uC778\uC911",bg:"#faf1d7",fg:"#8a6d1d",dot:"#e8a33d"},{key:"bug_in_progress",name:"\uC9C4\uD589\uC911",bg:"#dcf2e3",fg:"#1f6b3a",dot:"#2f9e5b"},{key:"bug_hold",name:"\uBCF4\uB958",bg:"#efefed",fg:"#57564f",dot:"#9a9a97"}],RC=[...qt.filter(e=>e.key!=="bug_hold"),{key:wi,name:"\uC644\uB8CC",bg:"#e3eefb",fg:"#1d4f91",dot:"#2f80ed"},...qt.filter(e=>e.key==="bug_hold")];function fd(e){return qt.find(o=>o.key===e)??qt[0]}function kl(e){return e.is_notice?zn:e.is_bug?qt:qn}function Di(e){return e.status===Mn}var xd={in_progress:0,[Mn]:1,not_started:2,hold:3,[sr]:4};function zC(e){return e.completed?9:xd[String(e.status??"")]??2}function kt(e,o){let t=new Map(o.map(r=>[r.key,r])),n=(e.label_keys??[]).map(r=>t.get(r)).filter(r=>!!r);if(e.is_event){let r=An({is_event:!0,due_date:String(e.due_date??""),event_time:e.event_time});return r?[r,...n]:n}return e.is_notice?String(e.status??"")==="notice_active"?n:[hl(e.status),...n]:e.is_bug?[fo({...e,is_notice:!1}),...n]:e.completed?[_i,...n]:[dr(e.status),...n]}function Tl(e){return{bg:`${e}1f`,fg:e,dot:e}}function fr(e,o){return e.includes(o)?e.filter(t=>t!==o):[...e,o]}import{Box as xr}from"@mui/material";import{jsx as Ln,jsxs as gd}from"react/jsx-runtime";function we({option:e,small:o=!1}){let t=le(),n=t.mode==="dark",r=e.key==="not_started";return gd(xr,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:o?.5:.75,px:r?0:o?.9:1.25,py:r?0:o?.25:.5,borderRadius:1.25,fontSize:o?11.5:13,fontWeight:500,bgcolor:r?"transparent":n?ln(e.dot,t.chip.darkBgAlpha):e.bg,color:r?n?t.chip.plainColor:e.fg:n?t.chip.darkTextSource==="fg"?e.fg:e.dot:e.fg,whiteSpace:"nowrap"},children:[Ln(xr,{component:"span",sx:{width:o?6:8,height:o?6:8,borderRadius:"50%",bgcolor:e.dot,flexShrink:0}}),e.name]})}function HC({task:e,statusOptions:o,small:t=!1}){let n=kt(e,o);return n.length===0?null:Ln(xr,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:.5},children:n.map(r=>Ln(we,{option:r,small:t},r.key))})}function Tt({labelKeys:e,labelOptions:o}){let t=new Map(o.map(r=>[r.key,r])),n=e.map(r=>t.get(r)).filter(r=>!!r);return n.length===0?null:Ln(xr,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:.5},children:n.map(r=>Ln(we,{option:r,small:!0},r.key))})}import{jsx as Oi,jsxs as Td}from"react/jsx-runtime";function gr({anchorEl:e,value:o,options:t=zt,onSelect:n,onClose:r}){let i=Uo();return Oi(bd,{anchorEl:e,open:!!e,onClose:r,transitionDuration:0,...i,children:t.map(a=>Td(hd,{onClick:()=>{n(a.key),r()},sx:{fontSize:14,minWidth:150,gap:1},children:[Oi(we,{option:a}),o===a.key?Oi(kd,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},a.key))})}function br(e,o){if(o<=0)return!1;if(e.is_notice){if((e.author_account_seq??0)===o)return!0;let t=(e.target_account_seqs??[]).filter(n=>n>0);return t.length===0||t.includes(o)}return Mi(e)?!0:(e.author_account_seq??0)===o||(e.manager_account_seq??0)===o||(e.receiver_account_seqs??[]).includes(o)}function Mi(e){return e.is_notice||!e.is_open||e.completed||e.archived?!1:(e.manager_account_seq??0)===0}function hr(e,o){return o<=0?!1:Mi(e)}function kr(e,o){return o<=0||e.is_notice||e.is_event||e.completed||e.archived||(e.manager_account_seq??0)>0||Mi(e)?!1:(e.receiver_account_seqs??[]).includes(o)||(e.author_account_seq??0)===o}function yl(e){return!!e.is_bug&&(e.manager_account_seq??0)===0&&e.status==="bug_received"}function ot(e,o){return o<=0?!1:e.is_notice?(e.author_account_seq??0)===o:(e.author_account_seq??0)===o||(e.manager_account_seq??0)===o||(e.receiver_account_seqs??[]).includes(o)}var QC=[119,121,141,143];var Ei=[{value:"due",label:"\uADF8\uB8F9 : \uB9C8\uAC10\uAE30\uD55C"},{value:"status",label:"\uADF8\uB8F9 : \uC0C1\uD0DC"},{value:"manager",label:"\uADF8\uB8F9 : \uCC45\uC784\uC790"},{value:"tab",label:"\uADF8\uB8F9 : \uD504\uB85C\uC81D\uD2B8"},{value:"none",label:"\uADF8\uB8F9 \uC5C6\uC74C"}];function yd(e){let o=new Date(`${e}T00:00:00`);return o.setDate(o.getDate()+(6-o.getDay())),qe(o)}var Sd=[{key:"overdue",label:"\uC9C0\uB0A8"},{key:"today",label:"\uC624\uB298"},{key:"this_week",label:"\uC774\uBC88 \uC8FC"},{key:"later",label:"\uC774\uD6C4"},{key:"no_due",label:"\uB9C8\uAC10 \uC5C6\uC74C"}];function Bd(e,o,t){let n=e.due_date.slice(0,10);return n?n<o?"overdue":n===o?"today":n<=t?"this_week":"later":"no_due"}function Pi(e,o,t,n=[],r=[],i="",a){let l=e.filter(s=>s.is_notice);if(l.length>0){let s=Pi(e.filter(m=>!m.is_notice),o,t,n,r,i,a);return[{key:"__notice__",label:"\uACF5\uC9C0\uC0AC\uD56D",tasks:l},...s]}let u=new Map,c=(s,m)=>{let x=u.get(s);x?x.push(m):u.set(s,[m])},d;if(o==="due"){let s=yd(t);for(let m of e)c(Bd(m,t,s),m);d=Sd}else if(o==="status"){for(let s of e)c(dr(s.status).key,s);d=zt.map(s=>({key:s.key,label:s.name}))}else if(o==="tab"){for(let s of e)c(s.tab_key?.trim()||"__none__",s);d=[...n.filter(s=>!s.archived).map(s=>({key:s.key,label:s.label})),{key:"__none__",label:"\uAE30\uBCF8 \uC5C5\uBB34\uD568"},...n.filter(s=>s.archived).map(s=>({key:s.key,label:`${s.label} (\uBCF4\uAD00\uB428)`}))]}else if(a?.enabled){let s=Number(a.myAccountSeq??0),m=i.trim();for(let x of e){if(!(Number(x.manager_account_seq??0)>0||String(x.manager_name??"").trim()!=="")){c("__none__",x);continue}let b=s>0&&Number(x.manager_account_seq??0)===s||!!m&&String(x.manager_name??"").trim()===m;c(b?"__manager__":"__reference__",x)}d=[{key:"__manager__",label:"\uCC45\uC784\uC790"},{key:"__none__",label:"\uCC45\uC784\uC790 \uBBF8\uBC30\uC815"},{key:"__reference__",label:"\uCC38\uC870\uC790"}]}else{for(let b of e)c(String(b.manager_name??"").trim()||"__none__",b);let s=i.trim(),m=[...u.keys()].filter(b=>b!=="__none__").sort((b,h)=>{if(s){if(b===s)return-1;if(h===s)return 1}return b.localeCompare(h)}),x=!!s&&m.includes(s),B=m.filter(b=>b!==s);d=[...x?[{key:s,label:"\uB0B4 \uC5C5\uBB34"}]:[],{key:"__none__",label:"\uCC45\uC784\uC790 \uBBF8\uBC30\uC815"},...B.map(b=>({key:b,label:b}))]}let p=[];for(let s of d){let m=u.get(s.key);!m||m.length===0||p.push({key:s.key,label:s.label,tasks:m})}return p}import Cd from"@mui/icons-material/NotesOutlined";import vd from"@mui/icons-material/AutorenewOutlined";import Id from"@mui/icons-material/CalendarTodayOutlined";import _d from"@mui/icons-material/EventOutlined";import wd from"@mui/icons-material/PersonOutlineOutlined";import Bl from"@mui/icons-material/PeopleAltOutlined";import qi from"@mui/icons-material/CheckCircleOutlineOutlined";import Dd from"@mui/icons-material/FlagOutlined";import Od from"@mui/icons-material/AccessTimeOutlined";import Md from"@mui/icons-material/StickyNote2Outlined";import Ed from"@mui/icons-material/ViewKanbanOutlined";import Pd from"@mui/icons-material/ConfirmationNumberOutlined";import{jsx as ao}from"react/jsx-runtime";var Rd={role_mark:"11px",completed:"44px",ticket_no:"100px",title:"minmax(220px, 1.8fr)",status:"110px",start_date:"110px",due_date:"120px",manager_name:"110px",receiver_names:"170px",targets:"170px",priority:"84px",ack:"104px",confirm:"100px",project:"150px",request:"100px",completed_time:"150px",note:"minmax(200px, 1.2fr)"};function Tr(e){return Ai(e).map(o=>Rd[o.id]).join(" ")}var zd={id:"completed_time",label:"\uC644\uB8CC\uC77C\uC2DC",icon:ao(Od,{sx:{fontSize:15}}),align:"center",sortable:!0},qd={id:"ticket_no",label:"\uD2F0\uCF13",icon:ao(Pd,{sx:{fontSize:15}}),align:"center"},Ad={id:"project",label:"\uD504\uB85C\uC81D\uD2B8",icon:ao(Ed,{sx:{fontSize:15}}),projectFilter:!0},Ld={id:"targets",label:"\uB300\uC0C1\uC790",icon:ao(Bl,{sx:{fontSize:15}})},Sl={id:"priority",label:"\uC911\uC694\uB3C4",icon:ao(Dd,{sx:{fontSize:15}}),align:"center",priorityFilter:!0},Nd={id:"ack",label:"\uD655\uC778",icon:ao(qi,{sx:{fontSize:15}}),align:"center",ackFilter:!0},Fd={id:"confirm",label:"\uD655\uC778",icon:ao(qi,{sx:{fontSize:15}}),align:"center",ackFilter:!0};function Ri(e){let o=e.findIndex(n=>n.id==="receiver_names"||n.id==="targets"),t=o>=0?o+1:e.findIndex(n=>n.id==="note");return t<0?[...e,Sl]:[...e.slice(0,t),Sl,...e.slice(t)]}function Ai(e){let{showProject:o=!1,showManager:t=!0,showActions:n=!0,showRequest:r=!0,notice:i=!1,bug:a=!1,confirmMode:l="none"}=e??{},u=p=>{if(!a)return p;let s=p.filter(B=>B.id!=="note"),m=s.findIndex(B=>B.id==="completed"),x=m>=0?m+1:0;return[...s.slice(0,x),qd,...s.slice(x)]};if(i)return u(Ri(zi.filter(p=>!["manager_name","receiver_names","request"].includes(p.id)).flatMap(p=>p.id==="due_date"?[p,Ld]:p.id==="note"?[Nd,p]:[p])));let c=t?zi:zi.filter(p=>p.id!=="manager_name");if(n)r||(c=c.filter(p=>p.id!=="request"));else{c=c.filter(s=>s.id!=="request");let p=c.findIndex(s=>s.id==="note");c=[...c.slice(0,p),zd,...c.slice(p)]}if(l==="action"){let p=c.findIndex(s=>s.id==="note");c=[...c.slice(0,p),Fd,...c.slice(p)]}if(!o)return u(Ri(c));let d=c.findIndex(p=>p.id==="receiver_names");return u(Ri([...c.slice(0,d+1),Ad,...c.slice(d+1)]))}var zi=[{id:"role_mark",label:"",icon:null},{id:"completed",label:"\uC644\uB8CC",icon:null,align:"center"},{id:"title",label:"\uC81C\uBAA9",icon:ao(Cd,{sx:{fontSize:15}}),sortable:!0},{id:"status",label:"\uC0C1\uD0DC",icon:ao(vd,{sx:{fontSize:15}}),align:"center",statusFilter:!0},{id:"start_date",label:"\uC2DC\uC791\uC77C\uC790",icon:ao(Id,{sx:{fontSize:15}}),align:"center",sortable:!0},{id:"due_date",label:"\uB9C8\uAC10\uAE30\uD55C",icon:ao(_d,{sx:{fontSize:15}}),align:"center",sortable:!0},{id:"manager_name",label:"\uCC45\uC784\uC790",icon:ao(wd,{sx:{fontSize:15}}),memberFilter:"manager"},{id:"receiver_names",label:"\uCC38\uC870\uC790",icon:ao(Bl,{sx:{fontSize:15}}),memberFilter:"receivers"},{id:"request",label:"\uD655\uC778",icon:ao(qi,{sx:{fontSize:15}}),align:"center",ackFilter:!0},{id:"note",label:"\uBE44\uACE0",icon:ao(Md,{sx:{fontSize:15}})}];import{Button as Cl,ClickAwayListener as $d,Dialog as Kd,Paper as Ud,Popper as Vd,Typography as Gd,Box as Yd}from"@mui/material";import{useMediaQuery as Hd,useTheme as Wd}from"@mui/material";function He(){let{isMobile:e}=yo(),o=Wd(),t=Hd(o.breakpoints.up("lg"));return e!==void 0?e:!t}import{Fragment as Xd,jsx as yt,jsxs as vl}from"react/jsx-runtime";function jd({title:e,content:o,confirmText:t,cancelText:n,titleFontSize:r,actionFontSize:i,actionMinHeight:a,onCancel:l,onConfirm:u}){return vl(Xd,{children:[yt(Gd,{component:"div",sx:{fontSize:r,fontWeight:700,color:"#0f172a",lineHeight:1.4},children:e}),o,vl(Yd,{sx:{display:"flex",gap:2,justifyContent:"flex-end"},children:[yt(Cl,{size:"medium",variant:"outlined",color:"inherit",onClick:l,fullWidth:!0,sx:{fontSize:i,minHeight:a,fontWeight:700},children:n}),yt(Cl,{size:"medium",variant:"contained",color:"primary",onClick:u,fullWidth:!0,sx:{fontSize:i,minHeight:a,fontWeight:700},children:t})]})]})}function Ue({open:e,anchorEl:o,title:t="\uD655\uC778\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",content:n,confirmText:r="\uD655\uC778",cancelText:i="\uCDE8\uC18C",placement:a="top",minWidth:l=160,minHeight:u,titleFontSize:c=17,actionFontSize:d=16,actionMinHeight:p=44,zIndex:s=1300,onCancel:m,onConfirm:x}){let B=He(),b=yt(jd,{title:t,content:n,confirmText:r,cancelText:i,titleFontSize:c,actionFontSize:d,actionMinHeight:p,onCancel:m,onConfirm:x});return B?yt(Kd,{open:e,onClose:m,sx:{zIndex:s},slotProps:{paper:{sx:{p:3,display:"flex",flexDirection:"column",gap:3,minWidth:260}}},children:b}):yt(Vd,{open:e,anchorEl:o,placement:a,sx:{zIndex:s},children:yt($d,{onClickAway:m,children:yt(Ud,{elevation:4,sx:{p:3,display:"flex",flexDirection:"column",gap:3,minWidth:l,minHeight:u,justifyContent:u?"space-between":"flex-start"},onClick:h=>h.stopPropagation(),onMouseDown:h=>h.stopPropagation(),children:b})})})}import{useEffect as cf,useRef as mf,useState as Pl}from"react";import{Box as be,Button as uf,Checkbox as pf,Tooltip as Fi}from"@mui/material";import df from"@mui/icons-material/AlarmOutlined";import ff from"@mui/icons-material/CheckCircle";import xf from"@mui/icons-material/CheckCircleOutlineOutlined";import{useEffect as Qd,useState as Il}from"react";import{Avatar as _l}from"@mui/material";import Jd from"@mui/icons-material/PersonOutlineOutlined";import{jsx as Ni}from"react/jsx-runtime";var Li=new Set,wl=e=>e.startsWith("data:")||e.startsWith("blob:");function sn({src:e,avatarSx:o,iconFontSize:t=40}){let[n,r]=Il(()=>e?wl(e)||Li.has(e):!1),[i,a]=Il(!1),l={position:"relative",overflow:"hidden",borderRadius:"15px"},u=o?[l,...Array.isArray(o)?o:[o]]:l;return Qd(()=>{a(!1),r(e?wl(e)||Li.has(e):!1)},[e]),!e||i?Ni(_l,{sx:u,children:Ni(Jd,{sx:{fontSize:t}})}):Ni(_l,{src:e,imgProps:{onLoad:()=>{Li.add(e),r(!0)},onError:()=>a(!0),style:n?void 0:{opacity:0}},sx:u})}var Zd=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),yr=(e,o)=>{if(!o||!o.trim())return[{text:e,highlight:!1}];try{let t=Zd(o.trim()),n=new RegExp(`(${t})`,"gi");return e.split(n).map(i=>i.toLowerCase()===o.trim().toLowerCase()?{text:i,highlight:!0}:{text:i,highlight:!1}).filter(i=>i.text)}catch{return[{text:e,highlight:!1}]}};var ef=["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"];function Vo(e){let o=String(e??"").trim().slice(0,10);if(!/^\d{4}-\d{2}-\d{2}$/.test(o))return"";let t=new Date(`${o}T00:00:00`);return Number.isNaN(t.getTime())?"":`${o.slice(2).replaceAll("-",".")} (${ef[t.getDay()]})`}function tt(e){let o=String(e??"").trim(),[t,n=""]=o.split(" "),r=Vo(t);return r?n?`${r} ${n.slice(0,5)}`:r:""}import{Box as Dl,Tooltip as of}from"@mui/material";import{jsx as Sr}from"react/jsx-runtime";var cn=[{bgcolor:"#dbe7ff",color:"#24408e"},{bgcolor:"#ffe4d6",color:"#8a4b21"},{bgcolor:"#dcf2e3",color:"#1f6b3a"},{bgcolor:"#f3e3f7",color:"#6d2f80"},{bgcolor:"#fdf0cf",color:"#8a6d1d"},{bgcolor:"#e0f0f6",color:"#1d5f78"},{bgcolor:"#efe6dc",color:"#6b4a2b"}];function xo({names:e,size:o=22,ringFirst:t=!1,avatarSrcByName:n}){let r=le();return Sr(Dl,{sx:{display:"flex",alignItems:"center"},children:e.map((i,a)=>{let l=t&&a===0;return Sr(of,{title:l?`\uCC45\uC784\uC790 \xB7 ${i}`:i,arrow:!0,children:Sr(Dl,{sx:{ml:a===0?0:"-7px",zIndex:a,borderRadius:"50%",border:`2px solid ${l?r.avatar.ringColor:r.avatar.separatorColor}`,display:"inline-flex",...r.avatar.sx},children:Sr(sn,{src:n?.get(i)??"",avatarSx:{width:o,height:o,fontSize:Math.round(o/2),borderRadius:"50%",...cn[a%cn.length]},iconFontSize:Math.round(o*.6)})})},`${i}-${a}`)})})}import{Box as Ol,Button as El}from"@mui/material";import tf from"@mui/icons-material/CheckCircle";import{Fragment as af,jsx as Nn,jsxs as Ml}from"react/jsx-runtime";function nf(e){let o=e.mode==="dark";return{minWidth:0,width:"100%",px:1,py:.25,fontSize:13,color:e.table.rowColor,borderColor:e.colors.borderStrong,background:o?e.colors.surfaceHover:"linear-gradient(180deg, #ffffff 0%, #f6f7f9 100%)",whiteSpace:"nowrap","&:hover":{background:o?e.colors.surfaceSubtle:"linear-gradient(180deg, #fcfcfd 0%, #f0f2f4 100%)",borderColor:e.colors.borderStrong}}}function rf(e){return{minWidth:0,px:1.25,py:.25,fontSize:13,whiteSpace:"nowrap",color:e.actionButton.color,backgroundColor:e.actionButton.bg,backgroundImage:"none",boxShadow:"none","&:hover":{backgroundColor:e.actionButton.hoverBg,boxShadow:"none",filter:"brightness(1.08)"},...e.actionButton.sx}}function mn({onClick:e,children:o,fullWidth:t=!1,sx:n}){let r=le();return Nn(El,{size:"small",variant:"contained",color:"inherit",fullWidth:t,sx:[rf(r),...Array.isArray(n)?n:n?[n]:[]],onClick:i=>{i.stopPropagation(),e(i)},children:o})}function un({canConfirm:e,count:o,total:t,myConfirmed:n=!1,onConfirm:r,onShowList:i}){let a=le(),l=nf(a);return e?Nn(mn,{onClick:()=>r(),children:"\uD655\uC778"}):Ml(El,{size:"small",variant:"outlined",color:"inherit",sx:l,onClick:u=>{u.stopPropagation(),i(u.currentTarget)},children:[n?Nn(tf,{sx:{fontSize:16,color:"#2f80ed",flexShrink:0}}):null,Nn(Ol,{component:"span",sx:{flex:1,textAlign:"center",minWidth:0},children:t>0&&o>=t?"\uC644\uB8CC":Ml(af,{children:[o,Nn(Ol,{component:"span",sx:{mx:.15},children:"/"}),t]})})]})}import{SvgIcon as lf}from"@mui/material";import{jsx as Br,jsxs as sf}from"react/jsx-runtime";function Cr({sx:e,...o}){return sf(lf,{viewBox:"0 0 48 48",...o,sx:{fill:"none",...e},children:[Br("path",{d:"M24,6C13.23,6,4.5,12.93,4.5,21.46c0,5.39,3.5,10.13,8.79,12.89l-1.76,7.06a.46.46,0,0,0,.68.51L21,36.7a24,24,0,0,0,3,.2c10.77,0,19.5-6.91,19.5-15.44S34.77,6,24,6Z",fill:"none",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),Br("circle",{cx:"23.91",cy:"21.46",r:"2.71",fill:"currentColor",stroke:"none"}),Br("circle",{cx:"33.65",cy:"21.46",r:"2.71",fill:"currentColor",stroke:"none"}),Br("circle",{cx:"14.18",cy:"21.46",r:"2.71",fill:"currentColor",stroke:"none"})]})}import{Fragment as Wi,jsx as U,jsxs as pn}from"react/jsx-runtime";function Rl(e){let o=String(e??"").trim();return o?o.slice(2,10).replaceAll("-","."):"-"}function Hi(e,o){let t=String(e??"").trim()||"-";return yr(t,o).map((n,r)=>U("span",{className:n.highlight?"font-semibold text-blue-600":void 0,children:n.text},`${n.text}-${r}`))}function vr({names:e,searchText:o,avatarSrcByName:t,emphasize:n=!1}){let r=e.filter(i=>i.trim());if(r.length===0)return null;if(r.length===1){let i=r[0]??"";return pn(Wi,{children:[U(sn,{src:t?.get(i)??"",avatarSx:{width:24,height:24,borderRadius:"50%",...cn[0]},iconFontSize:15}),U(be,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...n?{fontWeight:500,color:"#2f80ed"}:{}},children:Hi(i,o)})]})}return U(xo,{names:r,size:22,avatarSrcByName:t})}function zl({display:e,summary:o,searchText:t,avatarSrcByName:n}){if(!e||e.kind==="everyone")return U(be,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:o||"\uBAA8\uB4E0 \uC9C1\uC6D0"});let{teamNames:r,individualNames:i}=e;if(r.length===0)return U(vr,{names:i,searchText:t,avatarSrcByName:n});let a=[...r,...i],l=a.join(", ");return a.length>2?U(Fi,{title:l,arrow:!0,children:U(be,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:`${a[0]}, ${a[1]} \uC678 ${a.length-2}\uBA85`})}):U(Fi,{title:l,arrow:!0,children:pn(be,{sx:{display:"flex",alignItems:"center",gap:.75,minWidth:0},children:[U(be,{component:"span",sx:{flexShrink:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:r.join(", ")+(i.length>0?",":"")}),i.length>0?U(vr,{names:i,searchText:t,avatarSrcByName:n}):null]})})}function ql({task:e,statusOptions:o,avatarSrcByName:t,searchText:n,myAccountSeq:r=0,todayStr:i,showProject:a=!1,showManager:l=!0,showActions:u=!0,showRequest:c=!0,confirmMode:d="none",bugMode:p=!1,confirmInfo:s,onConfirmTask:m,projectLabel:x="",projectIcon:B="",onProjectClick:b,onRequestToggleCompleted:h,onDateClick:f,onChangeNote:T,onMemberClick:g,onClaimClick:v,onVolunteerClick:C,onStatusClick:I,onOpenDetail:M,onTaskContextMenu:Q,hideBottomBorder:E=!1,completeLocked:te=!1,unread:w=!1,notice:y=!1,noticeReadOnly:H=!1,noteLocked:N=!1,targetSummary:$="",targetDisplay:P,onArchiveTask:oe,ackInfo:pe,onAckConfirm:A,onAckListClick:W,onPriorityClick:K}){let[F,O]=Pl(!1),[L,X]=Pl(""),J=mf(null);cf(()=>{if(!F)return;let V=Ee=>{let Xe=J.current;Xe&&(Ee.target instanceof Node&&Xe.contains(Ee.target)||Xe.blur())};return document.addEventListener("mousedown",V,!0),document.addEventListener("touchstart",V,!0),()=>{document.removeEventListener("mousedown",V,!0),document.removeEventListener("touchstart",V,!0)}},[F]);let ue=[e.manager_account_seq??0,...e.receiver_account_seqs??[]].some(V=>V>0&&V!==(e.author_account_seq??0)),Z=H,ye=r>0&&!e.is_notice&&!e.is_event&&(e.manager_account_seq??0)===r,R=Z||!!e.is_notice,k=le(),ne=!!v&&hr(e,r),re=!!C&&kr(e,r),ve=R&&!yl(e),$e=e.is_notice?U(un,{canConfirm:!!pe?.canAck,count:pe?.count??0,total:pe?.total??0,myConfirmed:!!pe?.acked,onConfirm:()=>A?.(e),onShowList:V=>W?.(e,V)}):null,Ie=!e.is_notice&&!!e.due_date&&e.due_date.slice(0,10)<=i?"#e5484d":"#2f80ed";return pn(be,{onContextMenu:V=>Q(e,V),sx:{display:"grid",gridTemplateColumns:Tr({showProject:a,showManager:l,showActions:u,showRequest:c,notice:y,confirmMode:d,bug:p}),minHeight:48,fontSize:15,bgcolor:k.table.rowBg,color:k.table.rowColor,borderBottom:E?"none":`1px solid ${k.table.rowBorderColor}`,"&:hover":{bgcolor:k.table.rowHoverBg},"& > .cell":{px:1,minWidth:0,display:"flex",alignItems:"center",borderRight:`1px solid ${k.table.rowBorderColor}`},"& > .cell:first-of-type":{px:0,borderRight:"none"},"& > .cell:nth-of-type(2)":{pl:1.5,pr:2},"& > .cell:last-child":{borderRight:"none",pr:2}},children:[U(be,{className:"cell",children:ye?U(be,{sx:{width:3,alignSelf:"stretch",my:.5,ml:.5,bgcolor:"#2f80ed",borderRadius:1.5}}):null}),U(be,{className:"cell",sx:{justifyContent:"center"},children:!Z&&!te?U(Fi,{title:e.completed&&e.completed_by?`${e.completed_by} \xB7 ${tt(e.completed_time)} \uC644\uB8CC`:e.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC",arrow:!0,enterDelay:300,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:U(pf,{checked:e.completed,icon:U(xf,{sx:{fontSize:20,color:"#9a9a97",opacity:.45}}),checkedIcon:U(ff,{sx:{fontSize:20,color:"#2f80ed"}}),onClick:V=>V.stopPropagation(),onChange:(V,Ee)=>h({anchorEl:V.currentTarget,task:e,nextCompleted:Ee}),sx:{p:.5}})}):null}),p?U(be,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap",fontVariantNumeric:"tabular-nums",color:"#37352f"},children:e.ticket_no||"-"}):null,pn(be,{className:"cell",onClick:()=>M(e),sx:{gap:1,cursor:"pointer","&:hover":{bgcolor:k.table.cellHoverBg}},children:[(()=>{let V=Oe(e.icon||(e.is_notice?Mo:_e));if(!V)return null;let Ee=e.icon_color||(e.is_notice?"#e5484d":"#1e3a8a");return U(V,{sx:{fontSize:18,flexShrink:0,color:Ee}})})(),U(be,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontWeight:e.completed?400:k.table.rowTitleFontWeight,color:e.completed?k.colors.textMuted:k.table.rowTitleColor,textDecoration:e.completed?"line-through":"none"},children:Hi(e.title,n)}),(e.comment_count??e.comments?.length??0)>0?U(Cr,{sx:{fontSize:16,flexShrink:0,color:"#9a9a97"}}):null,U(be,{sx:{flexShrink:0,display:"flex",alignItems:"center"},children:U(Tt,{labelKeys:e.label_keys??[],labelOptions:o})}),w?U(be,{component:"span",sx:{flexShrink:0,px:.55,fontSize:10.5,fontWeight:700,lineHeight:1.6,color:"#fff",bgcolor:"#e5484d",borderRadius:"4px"},children:"N"}):null,pr(e)&&!e.archived&&!Z&&oe?U(uf,{size:"small",variant:"outlined",color:"inherit",sx:{ml:"auto",flexShrink:0,minWidth:0,px:1.25,py:.25,fontSize:13,color:"text.primary",borderColor:"#d5d8dc",bgcolor:"#fff",whiteSpace:"nowrap"},onClick:V=>{V.stopPropagation(),oe(e)},children:"\uBCF4\uAD00"}):null]}),(()=>{let V=Z||!!e.is_event||!!e.completed;return U(be,{className:"cell",onClick:V?void 0:Ee=>I(e,Ee.currentTarget),sx:{py:.5,justifyContent:"center",...V?{}:{cursor:"pointer","&:hover":{bgcolor:k.table.cellHoverBg}}},children:e.is_event?(()=>{let Ee=An(e);return Ee?U(we,{option:Ee}):null})():U(we,{option:fo(e)})})})(),U(be,{className:"cell",onClick:Z?void 0:V=>f(e,"start_date",V.currentTarget),sx:{justifyContent:"center",whiteSpace:"nowrap",...Z?{}:{cursor:"pointer","&:hover":{bgcolor:k.table.cellHoverBg}}},children:Rl(e.start_date)}),U(be,{className:"cell",onClick:Z?void 0:V=>f(e,"due_date",V.currentTarget),sx:{justifyContent:"center",gap:.5,color:Ie,fontWeight:500,whiteSpace:"nowrap",...Z?{}:{cursor:"pointer","&:hover":{bgcolor:k.table.cellHoverBg}}},children:e.due_date?pn(Wi,{children:[Rl(e.due_date),U(df,{sx:{fontSize:15}})]}):null}),y?U(be,{className:"cell",onClick:Z?void 0:()=>g(e,"targets"),sx:{gap:.75,...Z?{}:{cursor:"pointer","&:hover":{bgcolor:k.table.cellHoverBg}}},children:U(zl,{display:P,summary:$,searchText:n,avatarSrcByName:t})}):null,!y&&e.is_notice?U(be,{className:"cell",onClick:Z?void 0:()=>g(e,"targets"),sx:{gridColumn:l?"span 2":"auto",gap:.75,...Z?{}:{cursor:"pointer","&:hover":{bgcolor:k.table.cellHoverBg}}},children:U(zl,{display:P,summary:$,searchText:n,avatarSrcByName:t})}):null,!y&&!e.is_notice&&!e.is_event&&l?U(be,{className:"cell",onClick:ve?void 0:()=>g(e,"manager"),sx:{gap:.75,...ne||re?{justifyContent:"center"}:{},...ve?{}:{cursor:"pointer","&:hover":{bgcolor:k.table.cellHoverBg}}},children:ne?U(mn,{onClick:V=>v?.(e,V.currentTarget),children:"\uAC00\uC838\uAC00\uAE30"}):re?U(mn,{onClick:V=>C?.(e,V.currentTarget),children:"\uAC00\uC838\uAC00\uAE30"}):U(vr,{names:e.manager_name?[e.manager_name]:[],searchText:n,avatarSrcByName:t,emphasize:ye})}):null,!y&&!e.is_notice?U(be,{className:"cell",onClick:R?void 0:()=>g(e,"receivers"),sx:{gridColumn:e.is_event&&l?"span 2":"auto",gap:.75,...R?{}:{cursor:"pointer","&:hover":{bgcolor:k.table.cellHoverBg}}},children:U(vr,{names:e.receiver_names,searchText:n,avatarSrcByName:t})}):null,U(be,{className:"cell",onClick:Z?void 0:V=>K?.(e,V.currentTarget),sx:{py:.5,justifyContent:"center",...Z?{}:{cursor:"pointer","&:hover":{bgcolor:k.table.cellHoverBg}}},children:U(Eo,{priority:e.priority,plain:!0})}),a?U(be,{className:"cell",onClick:Z?void 0:V=>b?.(e,V.currentTarget),sx:{gap:.5,justifyContent:"flex-start",...Z?{}:{cursor:"pointer","&:hover":{bgcolor:k.table.cellHoverBg}}},children:x?pn(Wi,{children:[(()=>{let V=Oe(B);return V?U(V,{sx:{fontSize:15,flexShrink:0,color:"#1e3a8a"}}):null})(),U(be,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:x})]}):null}):null,y?U(be,{className:"cell",sx:{justifyContent:"center"},children:$e}):null,!y&&u&&c?U(be,{className:"cell",sx:{justifyContent:"center"},children:e.is_notice?$e:ue?U(un,{canConfirm:!!s?.canConfirm,count:s?.count??0,total:s?.total??0,myConfirmed:!!s?.myTime,onConfirm:()=>m?.(e),onShowList:V=>W?.(e,V)}):null}):null,!y&&d==="action"?U(be,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap",color:k.table.rowSubColor},children:e.is_notice?$e:s&&s.total>0?U(un,{canConfirm:!!s.canConfirm,count:s.count,total:s.total,myConfirmed:!!s.myTime,onConfirm:()=>m?.(e),onShowList:V=>W?.(e,V)}):"-"}):null,!y&&!u?U(be,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap",color:k.table.rowSubColor},children:e.completed_time||"-"}):null,p?null:U(be,{className:"cell",onClick:()=>{!N&&!F&&(X(e.note),O(!0))},sx:{color:"#6f6f6c",cursor:N?"default":"text"},children:F?U(be,{component:"input",ref:J,autoFocus:!0,spellCheck:!1,value:L,onChange:V=>X(V.target.value),onBlur:()=>{O(!1),L.trim()!==e.note&&T(e.seq,L)},onKeyDown:V=>{V.key==="Enter"&&V.target.blur(),V.key==="Escape"&&(X(e.note),O(!1))},sx:{flex:1,minWidth:0,width:"100%",border:"none",outline:"none",bgcolor:"transparent",font:"inherit",lineHeight:"inherit",letterSpacing:"inherit",color:k.table.rowTitleColor,caretColor:k.table.rowTitleColor,p:0,m:0}}):U(be,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.note?Hi(e.note,n):""})})]})}import{useState as gf}from"react";import{Box as Fn,Button as Al,ButtonBase as bf,Dialog as hf,Divider as Ll,Menu as kf,MenuItem as Tf,Popover as yf}from"@mui/material";import Sf from"@mui/icons-material/ChevronRight";import Bf from"@mui/icons-material/Check";import Cf from"@mui/icons-material/NotificationsActiveOutlined";import{SimpleCalendar as vf}from"@ehfuse/mui-datetime-picker";import{Fragment as wf,jsx as Co,jsxs as At}from"react/jsx-runtime";var If=[{value:"min30_before",label:"30\uBD84 \uC804"},{value:"hour1_before",label:"1\uC2DC\uAC04 \uC804"},{value:"hour2_before",label:"2\uC2DC\uAC04 \uC804"}],Nl=[{value:"day_before",label:"1\uC77C \uC804"},{value:"two_days_before",label:"2\uC77C \uC804"},{value:"three_days_before",label:"3\uC77C \uC804"},{value:"week_before",label:"1\uC8FC\uC77C \uC804"}],Fl=[{value:"none",label:"\uC5C6\uC74C"},...If,...Nl];function $i(e){return e?Fl:[{value:"none",label:"\uC5C6\uC74C"},...Nl]}function Ki(e){return e==="same_day"?"\uB2F9\uC77C":Fl.find(o=>o.value===e)?.label??"\uC5C6\uC74C"}function _f(e){let o=e?new Date(`${e}T00:00:00`):new Date;return Number.isNaN(o.getTime())?new Date:o}function St({anchorEl:e,open:o,date:t,reminder:n,hideReminder:r=!1,centered:i=!1,onClose:a,onDateChange:l,onReminderChange:u}){let[c,d]=gf(null),p=Uo(),s=At(Fn,{sx:{width:300,maxWidth:"100%"},children:[Co(Fn,{sx:{height:320},children:Co(vf,{selectedDate:_f(t),onSelect:m=>{l(qe(m)),a()},onClose:a,showFooter:!1,autoApply:!0})}),r?null:At(wf,{children:[Co(Ll,{sx:{borderColor:"#e6e6e3"}}),At(bf,{onClick:m=>d(m.currentTarget),sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",px:2,py:1.25,fontSize:14,"&:hover":{bgcolor:"#f8f8f7"}},children:[At(Fn,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:.75,color:"#37352f"},children:[Co(Cf,{sx:{fontSize:17,color:"#9a9a97"}}),"\uB9AC\uB9C8\uC778\uB354"]}),At(Fn,{component:"span",sx:{display:"inline-flex",alignItems:"center",color:"#37352f"},children:[Ki(n),Co(Sf,{sx:{fontSize:18,ml:.25,color:"#9a9a97"}})]})]}),Co(kf,{transitionDuration:0,anchorEl:c,open:!!c,onClose:()=>d(null),anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},...p,children:$i(!1).map(m=>At(Tf,{selected:m.value===n,onClick:()=>{u(m.value),d(null)},sx:{fontSize:14,minWidth:120,justifyContent:"space-between",gap:1},children:[m.label,m.value===n?Co(Bf,{sx:{fontSize:16,color:"#2f80ed"}}):null]},m.value))})]}),Co(Ll,{sx:{borderColor:"#e6e6e3"}}),At(Fn,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",px:1,py:.5},children:[Co(Al,{size:"small",onClick:()=>{l(qe(new Date)),a()},sx:{minWidth:0,px:1.25,fontSize:13.5,color:"#2563eb"},children:"\uC624\uB298"}),Co(Al,{size:"small",onClick:a,sx:{minWidth:0,px:1.25,fontSize:13.5,color:"#2563eb"},children:"\uB2EB\uAE30"})]})]});return i?Co(hf,{open:o,onClose:a,slotProps:{paper:{sx:{borderRadius:3,width:300,maxWidth:"calc(100vw - 48px)",overflow:"hidden"}}},children:s}):Co(yf,{transitionDuration:0,open:o,anchorEl:e,onClose:a,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},slotProps:{paper:{sx:{borderRadius:2,boxShadow:"0 8px 24px rgba(0,0,0,0.14)"}}},children:s})}import{useEffect as Mf,useState as Vi}from"react";import{Box as Lt,Button as Ef,Switch as Pf}from"@mui/material";import{FormDialog as Rf}from"@ehfuse/mui-form-dialog";import{ClearTextField as zf}from"@ehfuse/mui-form-controls";import{ErrorAlert as qf}from"@ehfuse/alerts";import{Box as Df,ButtonBase as Of}from"@mui/material";import{jsx as Ui}from"react/jsx-runtime";function Ir({value:e,onChange:o}){return Ui(Df,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(40px, 1fr))",gap:1},children:bi.map(({key:t,Icon:n})=>{let r=t===e;return Ui(Of,{onClick:()=>o(t),sx:{display:"flex",alignItems:"center",justifyContent:"center",height:40,minWidth:40,borderRadius:1,border:r?"2px solid #2563eb":"1px solid #dedddb",bgcolor:r?"#eef4ff":"#fff",color:r?"#1e3a8a":"#787774","&:hover":{bgcolor:r?"#eef4ff":"#f4f4f2"}},children:Ui(n,{sx:{fontSize:20}})},t)})})}import{jsx as nt,jsxs as Gi}from"react/jsx-runtime";function _r({open:e,title:o="\uC0C8 \uD504\uB85C\uC81D\uD2B8 \uCD94\uAC00",initialLabel:t="",initialIcon:n=gi,confirmText:r="\uCD94\uAC00",initialUseSprints:i=!1,onClose:a,onSubmit:l}){let[u,c]=Vi(""),[d,p]=Vi(gi),[s,m]=Vi(!1);Mf(()=>{e&&(c(t),p(n),m(i))},[e]);let x=()=>{let b=u.trim();if(!b){qf("\uD504\uB85C\uC81D\uD2B8 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}l(b,d,s),a()};return nt(Rf,{open:e,onClose:a,maxWidth:"xs",title:o,locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-add-tab",sections:[{id:"add-tab",showTitle:!1,children:Gi(Lt,{children:[nt(zf,{label:"\uD504\uB85C\uC81D\uD2B8 \uC774\uB984",value:u,onChange:b=>c(b.target.value),onKeyDown:b=>{b.key==="Enter"&&(b.preventDefault(),x())},fullWidth:!0,autoFocus:!0,sx:{mt:.5}}),nt(Lt,{sx:{mt:2,fontSize:13,color:"#787774"},children:"\uC544\uC774\uCF58"}),nt(Lt,{sx:{mt:1,maxHeight:264,overflowY:"auto",pr:.5},children:nt(Ir,{value:d,onChange:p})}),Gi(Lt,{sx:{mt:2,display:"flex",alignItems:"center",justifyContent:"space-between",gap:1},children:[Gi(Lt,{children:[nt(Lt,{sx:{fontSize:14,color:"#37352f"},children:"\uBAA9\uD45C(\uC2A4\uD504\uB9B0\uD2B8) \uC0AC\uC6A9"}),nt(Lt,{sx:{fontSize:12.5,color:"#9a9a97"},children:"\uBAA9\uD45C \uBC30\uC815\uC73C\uB85C \uBC18\uBCF5 \uC8FC\uAE30\uB97C \uAD00\uB9AC\uD569\uB2C8\uB2E4(\uAC1C\uBC1C\uD300\uC6A9)"})]}),nt(Pf,{checked:s,onChange:(b,h)=>m(h)})]})]})}],actions:{showCancelButton:!0,right:nt(Ef,{variant:"contained",onClick:x,children:r})}})}import{jsx as he,jsxs as Go}from"react/jsx-runtime";function jf(e){let o=e?new Date(`${e}T00:00:00`):new Date;return Number.isNaN(o.getTime())?new Date:o}function Kl({tasks:e,statusOptions:o,avatarSrcByName:t,searchText:n,todayStr:r,sortBy:i,sortDirection:a,onSort:l,onRequestReply:u,onToggleCompleted:c,onChangeTaskDate:d,onChangeTaskReminder:p,groupBy:s,collapsedGroupKeys:m,customTabs:x,onToggleGroup:B,renderGroupSummary:b,renderGroupTitleSummary:h,onChangeTaskProject:f,onAddProject:T,onChangeNote:g,onMemberClick:v,onClaimTask:C,onChangeTaskStatus:I,onOpenDetail:M,onTaskContextMenu:Q,onMemberFilterClick:E,activeMemberFilters:te=[],onStatusFilterClick:w,statusFilterActive:y=!1,onAckFilterClick:H,ackFilterActive:N=!1,onProjectFilterClick:$,projectFilterActive:P=!1,onPriorityFilterClick:oe,priorityFilterActive:pe=!1,columns:A,getConfirmInfo:W,onConfirmTask:K,myAccountSeq:F=0,currentUserName:O="",groupManagerByMyRole:L=!1,allowManagerVolunteer:X=!0,noticeAdmin:J=!1,getTargetSummary:ue,getTargetDisplay:Z,onArchiveTask:ye,isTaskUnread:R,getAckInfo:k,onAckConfirm:ne,onAckListClick:re,onChangeTaskPriority:ve,onEndReached:$e}){let se=le(),Ie=Hn(()=>({showManager:!0,showActions:!0,showRequest:!0,...A}),[A]),V=Ie.showManager??!0,Ee=Ie.showActions??!0,Xe=Ie.showRequest??!0,bt=Ie.confirmMode??"none",Wo=Ie.notice??!1,Zo=Ie.bug??!1,$o=s!=="none",Pt=Hn(()=>$o?Pi(e,s,r,x,o,O,{enabled:L,myAccountSeq:F}):[],[$o,e,s,r,x,o,O,L,F]),rn=Hn(()=>new Set(m),[m]),Oo=Ie.showProject??(!Wo&&s!=="tab"),no=Hn(()=>Ai({...Ie,showProject:Oo}),[Ie,Oo]),mo=Tr({...Ie,showProject:Oo}),uo=Hn(()=>{let S=new Map;for(let G of x)S.set(G.key,{label:G.archived?`${G.label} (\uBCF4\uAD00\uB428)`:G.label,icon:G.icon});return S},[x]),Rt=Af(null),[de,D]=it(null),z=e.length>0;Hl(()=>{if(!z){D(null);return}let S=window.requestAnimationFrame(()=>{D(Rt.current?.getScrollContainer()??null)});return()=>window.cancelAnimationFrame(S)},[z]);let[ie,ce]=it(!1);Hl(()=>{if(!de)return;let S=()=>ce(de.scrollHeight>de.clientHeight);S();let G=new ResizeObserver(S);return G.observe(de),de.firstElementChild&&G.observe(de.firstElementChild),()=>G.disconnect()},[de]);let[ae,fe]=it(null),[_,ro]=it(null),[Qe,io]=it(null),[Pe,ht]=it(null),[_n,wn]=it(!1),[an,nr]=it(null),Dn=an?e.find(S=>S.seq===an.taskSeq)??null:null,[rr,di]=it(null),ir=rr?e.find(S=>S.seq===rr.taskSeq)??null:null,Ja=rt((S,G)=>{di({anchorEl:G,taskSeq:S.seq})},[]),Za=rt((S,G)=>{nr({anchorEl:G,taskSeq:S.seq})},[]),um=rt((S,G)=>{if(!G)return;l(S,i===S&&a==="asc"?"desc":"asc")},[l,i,a]),el=rt((S,G,Fe)=>{fe({anchorEl:Fe,taskSeq:S.seq,field:G,date:S[G],reminder:S.reminder,completed:S.completed})},[]),ol=rt((S,G)=>{ht({anchorEl:G,task:S})},[]),pm=rt(S=>{ae&&(d(ae.taskSeq,ae.field,qe(S)),fe(null))},[ae,d]),dm=rt(S=>{ae&&(d(ae.taskSeq,ae.field,S),fe(G=>G&&{...G,date:S}))},[ae,d]),fm=rt(S=>{ae&&(p(ae.taskSeq,S),fe(G=>G&&{...G,reminder:S}))},[ae,p]),tl=rt((S,G=!1)=>he(ql,{hideBottomBorder:G,task:S,statusOptions:o,avatarSrcByName:t,searchText:n,myAccountSeq:F,todayStr:r,showProject:Oo,showManager:V,showActions:Ee,showRequest:Xe,confirmMode:bt,confirmInfo:S.is_notice?void 0:W?.(S),onConfirmTask:K,projectLabel:uo.get(S.tab_key??"")?.label??"",projectIcon:uo.get(S.tab_key??"")?.icon??"",onProjectClick:ol,onRequestReply:u,onRequestToggleCompleted:ro,onDateClick:el,onChangeNote:g,onMemberClick:v,onClaimClick:C?(Fe,Ko)=>io({anchorEl:Ko,taskSeq:Fe.seq,title:Fe.title,kind:"claim"}):void 0,onVolunteerClick:X?(Fe,Ko)=>io({anchorEl:Ko,taskSeq:Fe.seq,title:Fe.title,kind:"volunteer"}):void 0,onStatusClick:Za,onOpenDetail:M,onTaskContextMenu:Q,notice:Wo,bugMode:Zo,noticeReadOnly:!ot(S,F),noteLocked:S.is_notice?!br(S,F):!ot(S,F),completeLocked:S.is_event?!0:S.is_notice?(S.author_account_seq??0)!==F:(S.author_account_seq??0)!==F&&(S.manager_account_seq??0)!==F,targetSummary:S.is_notice?ue?.(S):void 0,targetDisplay:S.is_notice?Z?.(S):void 0,onArchiveTask:ye,unread:R?.(S)??!1,ackInfo:S.is_notice?k?.(S):void 0,onAckConfirm:ne,onAckListClick:re,onPriorityClick:Ja},S.seq),[n,o,t,r,Oo,V,Ee,Xe,bt,W,K,Wo,Zo,F,J,ue,Z,ye,R,k,ne,re,Ja,uo,ol,u,el,g,v,C,Za,M,Q]);return Go(Po,{sx:{display:"flex",flexDirection:"column",flex:1,minHeight:0,border:`1px solid ${se.table.borderColor}`,borderRadius:"0 0 4px 4px",overflow:"hidden",bgcolor:se.table.bg,color:se.table.rowColor,...se.table.sx},children:[he(Po,{sx:{display:"grid",gridTemplateColumns:mo,borderBottom:`1px solid ${se.table.borderColor}`,flexShrink:0,bgcolor:se.table.headerBg,"& > *":{borderRight:`1px solid ${se.table.rowBorderColor}`},"& > *:first-of-type":{px:0,borderRight:"none"},"& > *:nth-of-type(2)":{pl:1.5,pr:2},"& > *:last-child":{borderRight:"none",pr:2},...se.table.headerSx},children:no.map(S=>{let G=i===S.id,Fe=!!S.memberFilter,Ko=Fe&&te.includes(S.memberFilter),ar=Fe||!!S.statusFilter||!!S.ackFilter||!!S.projectFilter||!!S.priorityFilter,lr=Ko||!!S.statusFilter&&y||!!S.ackFilter&&N||!!S.projectFilter&&P||!!S.priorityFilter&&pe;return Go(Po,{onClick:On=>{S.memberFilter?E(S.memberFilter,On.currentTarget):S.statusFilter?w(On.currentTarget):S.ackFilter?H?.(On.currentTarget):S.projectFilter?$?.(On.currentTarget):S.priorityFilter?oe?.(On.currentTarget):um(S.id,S.sortable)},sx:{display:"flex",alignItems:"center",justifyContent:S.align==="center"?"center":"flex-start",gap:.5,px:1,py:1,minWidth:0,fontSize:se.table.headerFontSize,color:S.sortable||ar?se.table.headerActiveColor:se.table.headerColor,whiteSpace:"nowrap",cursor:S.sortable||ar?"pointer":"default",userSelect:"none",...G?{color:se.table.headerFilteredColor}:{},...lr?{color:se.table.headerFilteredColor,fontWeight:600}:{}},children:[S.icon,S.label,lr?he(Uf,{sx:{fontSize:14}}):null,G?a==="asc"?he(Hf,{sx:{fontSize:13}}):he(Wf,{sx:{fontSize:13}}):null]},S.id)})}),e.length===0?he(Po,{sx:{py:8,textAlign:"center",color:se.table.emptyColor,fontSize:14},children:Zo?"\uB4F1\uB85D\uB41C \uC624\uB958\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.":Wo?"\uB4F1\uB85D\uB41C \uACF5\uC9C0\uC0AC\uD56D\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.":"\uD45C\uC2DC\uD560 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):he(Po,{sx:{flex:1,minHeight:0},children:he(Gf,{ref:Rt,style:{height:"100%"},thumb:{width:8},children:de?$o?he($l,{customScrollParent:de,data:Pt,computeItemKey:(S,G)=>G.key,itemContent:(S,G)=>{let Fe=rn.has(G.key),Ko=S===Pt.length-1;return Go(Po,{children:[Go(Po,{onClick:()=>B(G.key),sx:{display:"flex",alignItems:"center",gap:.5,px:1.5,minHeight:se.table.groupHeader.minHeight,bgcolor:se.table.groupHeader.bg,borderBottom:`1px solid ${se.table.groupHeader.borderColor}`,cursor:"pointer",userSelect:"none","&:hover":{bgcolor:se.table.groupHeader.hoverBg},...se.table.groupHeader.sx},children:[Fe?he(Kf,{sx:{fontSize:20,color:se.colors.textMuted}}):he($f,{sx:{fontSize:20,color:se.colors.textMuted}}),he(Po,{component:"span",sx:{fontSize:se.table.groupHeader.labelFontSize,fontWeight:se.table.groupHeader.labelFontWeight,color:se.table.groupHeader.labelColor},children:G.label}),h?he(Po,{sx:{flexShrink:0,display:"flex",alignItems:"center",ml:.5},children:h(G.key,G.tasks)}):null,Go(Po,{sx:{ml:"auto",minWidth:0,display:"flex",alignItems:"center",gap:1,pr:.5},children:[b?b(G.key,G.tasks):null,he(Po,{component:"span",sx:{flexShrink:0,width:se.table.groupHeader.badge.width,py:.1,borderRadius:`${se.table.groupHeader.badge.borderRadius}px`,bgcolor:se.table.groupHeader.badge.bg,border:se.table.groupHeader.badge.border,color:se.table.groupHeader.badge.color,fontSize:se.table.groupHeader.badge.fontSize,fontWeight:se.table.groupHeader.badge.fontWeight,lineHeight:1.6,textAlign:"center",fontVariantNumeric:"tabular-nums"},children:G.tasks.length})]})]}),Fe?null:G.tasks.map((ar,lr)=>tl(ar,Ko&&lr===G.tasks.length-1&&ie))]})}}):he($l,{customScrollParent:de,data:e,computeItemKey:(S,G)=>G.seq,endReached:$e,itemContent:(S,G)=>tl(G,S===e.length-1&&ie)}):null})}),he(gr,{anchorEl:an?.anchorEl??null,value:Dn?.status??"",options:Dn?kl(Dn):qn,onSelect:S=>{Dn&&I(Dn.seq,S)},onClose:()=>nr(null)}),he(Wl,{transitionDuration:0,anchorEl:rr?.anchorEl??null,open:!!rr,onClose:()=>di(null),children:["high","medium","low"].map(S=>Go(wr,{selected:ir?.priority===S,onClick:()=>{ir&&ve?.(ir.seq,S),di(null)},sx:{fontSize:14,minWidth:130,gap:1},children:[he(Eo,{priority:S,small:!0}),ir?.priority===S?he(Yi,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},S))}),Go(Wl,{anchorEl:Pe?.anchorEl??null,open:!!Pe,onClose:()=>ht(null),transitionDuration:0,children:[Go(wr,{selected:!Pe?.task.tab_key,onClick:()=>{Pe&&f(Pe.task.seq,""),ht(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[he(Vf,{sx:{fontSize:17,color:"#9a9a97"}}),"\uC5C6\uC74C",Pe?.task.tab_key?null:he(Yi,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}})]}),x.filter(S=>!S.archived).map(S=>{let G=Oe(S.icon),Fe=Pe?.task.tab_key===S.key;return Go(wr,{selected:Fe,onClick:()=>{Pe&&f(Pe.task.seq,S.key),ht(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[G?he(G,{sx:{fontSize:17,color:"#1e3a8a"}}):null,S.label,Fe?he(Yi,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},S.key)}),T?[he(Lf,{},"add-project-divider"),Go(wr,{onClick:()=>wn(!0),sx:{fontSize:14,color:"#787774"},children:[he(Nf,{children:he(Ff,{sx:{fontSize:18,color:"#787774"}})}),"\uD504\uB85C\uC81D\uD2B8 \uCD94\uAC00"]},"add-project")]:null]}),T?he(_r,{open:_n,onClose:()=>wn(!1),onSubmit:(S,G)=>{let Fe=Pe?.task.seq??0;(async()=>{let Ko=await T(S,G);Ko&&Fe&&f(Fe,Ko)})(),ht(null)}}):null,he(Yf,{anchorEl:ae?.anchorEl??null,open:!!ae&&ae?.field==="start_date",onClose:()=>fe(null),selectedDate:jf(ae?.date??""),onDateChange:pm}),he(St,{anchorEl:ae?.anchorEl??null,open:!!ae&&ae?.field==="due_date",date:ae?.date??"",reminder:ae?.reminder??"none",hideReminder:!!ae?.completed,onClose:()=>fe(null),onDateChange:dm,onReminderChange:fm}),he(Ue,{open:!!Qe,anchorEl:Qe?.anchorEl??null,title:Qe?.kind==="claim"?"\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:()=>io(null),onConfirm:()=>{Qe&&C?.(Qe.taskSeq),io(null)}}),he(Ue,{open:!!_,anchorEl:_?.anchorEl??null,title:_?.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:_?.nextCompleted?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>ro(null),onConfirm:()=>{_&&c(_.task,_.nextCompleted),ro(null)}})]})}import{useCallback as lt,useMemo as st,useRef as xx,useState as ct}from"react";import{Box as Se,ButtonBase as rs,Divider as Yl,IconButton as jl,Menu as Xl,MenuItem as Ct}from"@mui/material";import Ji from"@mui/icons-material/Add";import Ql from"@mui/icons-material/MoreVert";import Jl from"@mui/icons-material/EditOutlined";import Zl from"@mui/icons-material/ArchiveOutlined";import es from"@mui/icons-material/UnarchiveOutlined";import gx from"@mui/icons-material/NotificationsOutlined";import bx from"@mui/icons-material/PeopleAltOutlined";import{SvgIcon as Xf}from"@mui/material";import{jsx as Ul}from"react/jsx-runtime";function at({sx:e,...o}){return Ul(Xf,{viewBox:"0 0 24 24",...o,sx:{fill:"none",...e},children:Ul("path",{d:"M4 6H20M16 6L15.7294 5.18807C15.4671 4.40125 15.3359 4.00784 15.0927 3.71698C14.8779 3.46013 14.6021 3.26132 14.2905 3.13878C13.9376 3 13.523 3 12.6936 3H11.3064C10.477 3 10.0624 3 9.70951 3.13878C9.39792 3.26132 9.12208 3.46013 8.90729 3.71698C8.66405 4.00784 8.53292 4.40125 8.27064 5.18807L8 6M18 6V16.2C18 17.8802 18 18.7202 17.673 19.362C17.3854 19.9265 16.9265 20.3854 16.362 20.673C15.7202 21 14.8802 21 13.2 21H10.8C9.11984 21 8.27976 21 7.63803 20.673C7.07354 20.3854 6.6146 19.9265 6.32698 19.362C6 18.7202 6 17.8802 6 16.2V6M14 10V17M10 10V17",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}import{DndContext as hx,DragOverlay as kx,PointerSensor as Tx,pointerWithin as yx,rectIntersection as Sx,useDroppable as Bx,useSensor as Cx,useSensors as vx}from"@dnd-kit/core";import{SortableContext as is,arrayMove as os,horizontalListSortingStrategy as Ix,useSortable as _x,verticalListSortingStrategy as wx}from"@dnd-kit/sortable";import{CSS as Dx}from"@dnd-kit/utilities";import Zi from"@ehfuse/overlay-scrollbar";import{useState as ox}from"react";import{Box as Bt,ButtonBase as tx,Checkbox as nx,Tooltip as rx}from"@mui/material";import ix from"@mui/icons-material/AlarmOutlined";import ax from"@mui/icons-material/TimerOutlined";import{Box as Nt,Button as Qf,Popover as Jf}from"@mui/material";import Zf from"@mui/icons-material/CheckCircle";import{jsx as Ft,jsxs as Dr}from"react/jsx-runtime";function Or({anchorEl:e,open:o,acks:t,total:n,avatarSrcByName:r,onRequestConfirm:i,onClose:a}){let l=He();return Ft(Jf,{open:o&&(l||!!e),anchorEl:e,onClose:a,transitionDuration:0,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},...l?{anchorReference:"none",slotProps:{paper:{sx:{position:"fixed",top:"50%",left:"50%",translate:"-50% -50%",maxWidth:"calc(100vw - 48px)",maxHeight:"70vh",borderRadius:3}}}}:{},children:Dr(Nt,{sx:{minWidth:240,maxWidth:320,py:1},children:[Dr(Nt,{sx:{px:2,pb:.75,fontSize:po(13.5),fontWeight:600,color:"#37352f",borderBottom:"1px solid #efefed"},children:["\uD655\uC778 ",t.length,"/",n]}),t.length===0?Ft(Nt,{sx:{px:2,py:1.5,fontSize:po(13.5),color:"#9a9a97"},children:"\uC544\uC9C1 \uD655\uC778\uD55C \uC0AC\uB78C\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):t.map(u=>Dr(Nt,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:.75,minWidth:0},children:[Ft(xo,{names:[u.name],size:22,avatarSrcByName:r}),Ft(Nt,{component:"span",sx:{fontSize:po(14),color:"#37352f",whiteSpace:"nowrap"},children:u.name}),Ft(Nt,{component:"span",sx:{ml:"auto",fontSize:po(12.5),color:"#9a9a97",whiteSpace:"nowrap"},children:tt(u.time)}),Ft(Zf,{sx:{fontSize:16,color:"#2f80ed",flexShrink:0}})]},u.account_seq)),i?Ft(Nt,{sx:{borderTop:"1px solid #efefed",px:1.5,pt:1,pb:.25},children:Dr(Qf,{size:"small",fullWidth:!0,variant:"outlined",onClick:()=>{i(),a()},sx:{fontSize:po(13)},children:["\uD655\uC778 \uC694\uCCAD (",n-t.length,"\uBA85 \uBBF8\uD655\uC778)"]})}):null]})})}function ex(e){let o=Number(e.author_account_seq??0);return[...new Set([Number(e.manager_account_seq??0),...e.receiver_account_seqs??[]].filter(t=>t>0&&t!==o))]}function Vl(e,o){let t=ex(e),n=e.acks??[],r=o>0?n.find(i=>i.account_seq===o):void 0;return{myTime:r?.time??"",canConfirm:o>0&&t.includes(o)&&!r,count:n.filter(i=>t.includes(i.account_seq)).length,total:t.length}}function k1(e){let o=String(e??"").trim();return o?o.slice(5,16).replaceAll("-","."):""}import{Fragment as cx,jsx as go,jsxs as Ht}from"react/jsx-runtime";function dn(e){return{border:`1px solid ${e.borderColor}`,borderRadius:1,p:1,bgcolor:e.bg,display:"flex",flexDirection:"column",gap:.75,boxShadow:"0 1px 2px rgba(0,0,0,0.04)",...e.sx}}function lx(e){let o=e.trim();return o?o.slice(2,10).replaceAll("-","."):"-"}function sx(){let e=new Date,o=String(e.getMonth()+1).padStart(2,"0"),t=String(e.getDate()).padStart(2,"0");return`${e.getFullYear()}-${o}-${t}`}function Wt({task:e,statusOptions:o,showDueDate:t=!1,onRequestArchiveToggle:n,onRequestReply:r,onDueDateClick:i,titleFontSize:a=13}){let l=le(),c=!!e.due_date&&e.due_date.slice(0,10)<=sx()?l.colors.danger:l.colors.accentOnSurface,d=Vl(e,0),[p,s]=ox(null),m=kt(e,o),x=new Set(e.label_keys??[]),B=m.filter(h=>!x.has(h.key)),b=m.filter(h=>x.has(h.key));return Ht(cx,{children:[Ht(Bt,{sx:{display:"flex",alignItems:"center",gap:.5},children:[go(nx,{size:"small",checked:e.completed,onPointerDown:h=>h.stopPropagation(),onClick:h=>h.stopPropagation(),onChange:(h,f)=>n?.({anchorEl:h.currentTarget,taskSeq:e.seq,nextCompleted:f}),sx:{p:0}}),go(rx,{title:e.title,arrow:!0,enterDelay:300,children:Ht(Bt,{sx:{flex:1,minWidth:0,pr:3.5,fontSize:a,fontWeight:e.completed?400:500,color:l.colors.textPrimary,lineHeight:1.35,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",textDecoration:e.completed?"line-through":"none"},children:[e.is_event&&e.event_time?`${e.event_time} `:"",e.title]})}),(e.comment_count??e.comments?.length??0)>0?go(Cr,{sx:{fontSize:15,flexShrink:0,color:l.colors.textMuted}}):null]}),e.is_bug&&e.ticket_no?go(Bt,{sx:{pl:3,mt:-.5,fontSize:12.5,color:l.colors.textSecondary,fontWeight:500,fontVariantNumeric:"tabular-nums"},children:e.ticket_no}):null,Ht(Bt,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:.5},children:[Ht(Bt,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:.5,minWidth:0},children:[B.map(h=>go(we,{option:h,small:!0},h.key)),go(Eo,{priority:e.priority,small:!0}),b.map(h=>go(we,{option:h,small:!0},h.key))]}),t&&String(e.due_date??"").trim()?Ht(tx,{disabled:!i,onPointerDown:h=>h.stopPropagation(),onClick:h=>{h.stopPropagation(),i?.(e,h.currentTarget)},sx:{display:"inline-flex",alignItems:"center",gap:.25,px:.5,py:.1,borderRadius:.75,fontSize:13,fontWeight:500,color:c,whiteSpace:"nowrap","&:hover":i?{bgcolor:l.colors.border}:void 0},children:[lx(e.due_date),go(ix,{sx:{fontSize:15}})]}):null]}),t&&e.estimated_time?Ht(Bt,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:.25,mt:-.5,fontSize:12,color:l.colors.textSecondary},children:[go(ax,{sx:{fontSize:14}}),e.estimated_time]}):null,go(xo,{names:[...e.manager_name?[e.manager_name]:[],...e.receiver_names],size:20,ringFirst:!!e.manager_name}),d.total>0?go(Bt,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:.5},children:go(Bt,{sx:{flexShrink:0,width:64},onPointerDown:h=>h.stopPropagation(),onClick:h=>h.stopPropagation(),children:go(un,{canConfirm:!1,count:d.count,total:d.total,onConfirm:()=>{},onShowList:h=>s(h)})})}):null,go(Or,{anchorEl:p,open:!!p,acks:e.acks??[],total:d.total,onRequestConfirm:r&&d.count<d.total?()=>{r(e),s(null)}:void 0,onClose:()=>s(null)})]})}import{Box as mx}from"@mui/material";import{useSortable as ux}from"@dnd-kit/sortable";import{CSS as px}from"@dnd-kit/utilities";import{jsx as Gl}from"react/jsx-runtime";function dx(e){return{px:1.25,py:1,display:"flex",flexDirection:"column",gap:.75,borderBottom:`1px solid ${e.borderColor}`,bgcolor:e.bg}}function Mr({task:e,statusOptions:o,variant:t="card",showDueDate:n=!1,onRequestArchiveToggle:r,onRequestReply:i,onDueDateClick:a,onCardClick:l,onCardContextMenu:u,titleFontSize:c}){let d=le(),{attributes:p,listeners:s,setNodeRef:m,transform:x,transition:B,isDragging:b}=ux({id:String(e.seq)}),h=t==="list";return Gl(mx,{ref:m,...p,...s,onClick:l?()=>l(e):void 0,onContextMenu:u?f=>u(e,f):void 0,sx:{...h?dx(d.card):dn(d.card),opacity:b?.35:e.completed?.55:1,transform:px.Translate.toString(x),transition:B,position:"relative",cursor:"default",touchAction:"none","&:hover":h?{bgcolor:d.card.hoverBg}:{boxShadow:"0 3px 8px rgba(0,0,0,0.1)"}},children:Gl(Wt,{task:e,statusOptions:o,showDueDate:n,onRequestArchiveToggle:r,onRequestReply:i,onDueDateClick:a,titleFontSize:c})})}function fx(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?e.slice(5).replace("-","."):""}function vo(e){if(e.status==="closed")return`${e.name} (\uC885\uB8CC)`;let o=fx(e.end_date);return o?`${e.name} (~${o})`:e.name}import{jsx as j,jsxs as Me}from"react/jsx-runtime";var ts=2,Er="group-",Io="colmove-",ji="__default__",Xi=wi,Qi="__other__",Pr="sprint-",ns=`${Pr}0`,Ox={planning:"#9a9a97",active:"#2f80ed",closed:"#9a9a97"};function as(e){return{flexShrink:0,width:e.width,py:.1,borderRadius:`${e.borderRadius}px`,bgcolor:e.bg,border:e.border,color:e.color,fontSize:e.fontSize,fontWeight:e.fontWeight,lineHeight:1.6,textAlign:"center",fontVariantNumeric:"tabular-nums",...e.sx}}function Mx({column:e,tasks:o,statusOptions:t,onRequestArchiveToggle:n,onRequestReply:r,onDueDateClick:i,onAddTask:a,canAdd:l,onOpenMenu:u,onCardClick:c,onCardContextMenu:d,grow:p,summary:s,onOpenSprintMenu:m}){let x=le(),{setNodeRef:B,isOver:b}=Bx({id:`${Er}${e.key}`}),{attributes:h,listeners:f,setNodeRef:T,transform:g,transition:v,isDragging:C}=_x({id:`${Io}${e.key}`,disabled:e.isDefault||e.isArchived||!!e.locked});return Me(Se,{ref:I=>{B(I),T(I)},sx:{flex:p?"1 0 270px":"0 0 270px",minWidth:270,contain:"inline-size",minHeight:0,maxHeight:"100%",display:"flex",flexDirection:"column",borderRadius:1.5,boxShadow:I=>I.shadows[1],bgcolor:b?x.colors.accentSoft:x.board.columnBg,transition:"background-color 0.15s",overflow:"hidden",transform:Dx.Translate.toString(g),...v?{transition:`${v}, background-color 0.15s`}:{},opacity:C?.6:1},children:[Me(Se,{...h,...f,sx:{display:"flex",alignItems:"center",gap:.75,pl:1.25,pr:.5,py:1.1,borderBottom:"1px solid #e6e6e3",flexShrink:0,touchAction:"none",cursor:e.isDefault||e.isArchived||e.locked?"default":"grab",opacity:e.isArchived?.65:1},children:[e.dot?j(Se,{sx:{width:8,height:8,borderRadius:"50%",bgcolor:e.dot,flexShrink:0}}):e.isDefault?null:(()=>{let I=Oe(e.icon);return I?j(I,{sx:{fontSize:17,color:"#1e3a8a"}}):null})(),j(Se,{component:"span",sx:{fontSize:x.board.columnHeaderFontSize,fontWeight:700,color:x.board.columnHeaderColor,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.label}),j(Se,{component:"span",sx:{...as(x.board.badge),ml:"auto"},children:o.length}),e.sprint&&m?j(jl,{size:"small","aria-label":"\uBAA9\uD45C \uBA54\uB274",onPointerDown:I=>I.stopPropagation(),onClick:I=>m(I.currentTarget,e.sprint),sx:{color:"#9a9a97"},children:j(Ql,{sx:{fontSize:18}})}):e.locked?null:j(jl,{size:"small","aria-label":"\uD504\uB85C\uC81D\uD2B8 \uBA54\uB274",onPointerDown:I=>I.stopPropagation(),onClick:I=>u({anchorEl:I.currentTarget,column:e}),sx:{color:"#9a9a97"},children:j(Ql,{sx:{fontSize:18}})})]}),s?j(Se,{sx:{px:1.25,py:1.25,borderBottom:"1px solid #e6e6e3",flexShrink:0},children:s}):null,j(Se,{sx:{flex:"1 1 auto",minHeight:0,display:"flex",flexDirection:"column"},children:j(Zi,{style:{height:"auto",flex:"1 1 auto",minHeight:0},contentStyle:{minWidth:0},thumb:{width:6},children:Me(Se,{sx:{display:"flex",flexDirection:"column",flexGrow:1},children:[j(is,{items:o.map(I=>String(I.seq)),strategy:wx,children:o.map(I=>j(Mr,{task:I,statusOptions:t,variant:"list",showDueDate:!0,titleFontSize:15,onRequestArchiveToggle:n,onRequestReply:r,onDueDateClick:i,onCardClick:c,onCardContextMenu:d},I.seq))}),o.length===0&&!l?j(Se,{sx:{py:3,textAlign:"center",fontSize:13,color:"#9a9a97"},children:"\uCE74\uB4DC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):null,o.length===0&&l?j(Se,{sx:{flexGrow:1,minHeight:56,display:"flex",flexDirection:"column","&:hover .taskbox-board-add":{opacity:1,pointerEvents:"auto"}},children:Me(rs,{className:"taskbox-board-add",onClick:()=>a(e.isDefault?"":e.key),sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:.5,px:1.25,py:1.75,borderBottom:"1px dashed #e6e6e3",bgcolor:x.card.bg,color:"#2563eb",fontSize:13,fontWeight:500,opacity:0,pointerEvents:"none",transition:"opacity 0.15s","&:hover":{bgcolor:x.card.hoverBg}},children:[j(Ji,{sx:{fontSize:16}}),"\uC5C5\uBB34 \uB4F1\uB85D"]})}):null]})})})]})}function ea({tasks:e,statusOptions:o,customTabs:t,mode:n="active",onToggleCompleted:r,onRequestReply:i,onChangeDueDate:a,onChangeReminder:l,onMoveTask:u,columnAxis:c="project",statusColumns:d=[],onMoveTaskStatus:p,sprintColumns:s=[],onMoveTaskSprint:m,onAddGroup:x,onAddTask:B,canAdd:b=!0,onRequestRename:h,onArchiveProject:f,onDeleteProject:T,onReorderProjects:g,onOpenDetail:v,onTaskContextMenu:C,renderColumnSummary:I,onEditSprint:M,onChangeSprintStatus:Q,onRemoveSprint:E}){let te=le(),[w,y]=ct(null),[H,N]=ct(null),[$,P]=ct(null),[oe,pe]=ct(null),[A,W]=ct(null),[K,F]=ct(null),[O,L]=ct(null),[X,J]=ct(null),[ue,Z]=ct(null),ye=xx(!1),R=st(()=>new Map(e.map(D=>[D.seq,D])),[e]),k=st(()=>{let D=e.filter(z=>z.is_notice);return D.sort((z,ie)=>z.completed!==ie.completed?z.completed?1:-1:ie.seq-z.seq),D},[e]),ne=st(()=>t.filter(D=>!D.archived),[t]),re=st(()=>t.filter(D=>D.archived),[t]),ve=D=>({key:D.key,label:D.label,icon:D.icon,isDefault:!1,isArchived:D.archived}),$e=st(()=>new Set(d.map(D=>D.key)),[d]),se=st(()=>new Set(s.map(D=>D.seq)),[s]),Ie=st(()=>{if(c==="sprint")return[{key:ns,label:"\uBBF8\uBC30\uC815",icon:"",isDefault:!0,isArchived:!1,dot:"#c9c8c5",locked:!0},...s.map(D=>({key:`${Pr}${D.seq}`,label:vo(D),icon:"",isDefault:!1,isArchived:!1,dot:Ox[D.status],locked:!0,sprint:D}))];if(c==="status"){let D=d.map(z=>({key:z.key,label:z.name,icon:"",isDefault:!1,isArchived:!1,dot:z.dot,locked:!0}));return D.some(z=>z.key===Xi)?D:[...D,{key:Xi,label:"\uC644\uB8CC",icon:"",isDefault:!1,isArchived:!1,dot:"#2f80ed",locked:!0}]}return n==="archived"?re.map(ve):[{key:ji,label:"\uAE30\uBCF8 \uC5C5\uBB34\uD568",icon:"",isDefault:!0,isArchived:!1},...ne.map(ve)]},[c,d,s,n,ne,re]),V=vx(Cx(Tx,{activationConstraint:{distance:5}})),Ee=lt(D=>{let z=String(D.active.id).startsWith(Io),ie=yx(D),ce=ie.length>0?ie:Sx(D);if(z)return ce.filter(_=>String(_.id).startsWith(Io));let ae=ce.filter(_=>!String(_.id).startsWith(Io)),fe=ae.filter(_=>!String(_.id).startsWith(Er));return fe.length>0?fe:ae},[]),Xe=st(()=>{let D=new Map;for(let z of e){if(z.is_notice)continue;let ie;if(c==="sprint"){let ae=z.sprint_seq??0;ie=se.has(ae)?`${Pr}${ae}`:ns}else ie=c==="status"?z.completed?Xi:$e.has(String(z.status??""))?String(z.status??""):Qi:z.tab_key?.trim()||ji;let ce=D.get(ie);ce?ce.push(z):D.set(ie,[z])}for(let z of D.values())z.sort((ie,ce)=>{if(ie.completed!==ce.completed)return ie.completed?1:-1;let ae=(ie.group_sort_no??0)>0,fe=(ce.group_sort_no??0)>0;return ae&&fe?(ie.group_sort_no??0)-(ce.group_sort_no??0):ae!==fe?ae?-1:1:ie.due_date!==ce.due_date?ie.due_date<ce.due_date?-1:1:ie.seq-ce.seq});return D},[e,c,$e,se]),bt=st(()=>c!=="status"||(Xe.get(Qi)??[]).length===0?Ie:[...Ie,{key:Qi,label:"\uAE30\uD0C0",icon:"",isDefault:!1,isArchived:!1,dot:"#c9c8c5",locked:!0}],[c,Ie,Xe]),Wo=lt(D=>O?(O.get(D)??[]).map(z=>R.get(z)).filter(z=>!!z):Xe.get(D)??[],[O,R,Xe]),Zo=lt(D=>{let z=String(D.active.id);if(z.startsWith(Io)){Z(z.slice(Io.length));return}J(Number(z)),L(new Map(Ie.map(ie=>[ie.key,(Xe.get(ie.key)??[]).map(ce=>ce.seq)])))},[Ie,Xe]),$o=lt((D,z)=>{if(D.startsWith(Er))return{key:D.slice(Er.length),overSeq:null};let ie=Number(D);for(let[ce,ae]of z)if(ae.includes(ie))return{key:ce,overSeq:ie};return null},[]),Pt=lt(D=>{let{active:z,over:ie}=D;!ie||String(z.id).startsWith(Io)||L(ce=>{if(!ce)return ce;let ae=Number(z.id),fe=$o(String(ie.id),ce);if(!fe)return ce;let _=[...ce.entries()].find(([,Pe])=>Pe.includes(ae))?.[0];if(!_||_===fe.key)return ce;let ro=new Map(ce);ro.set(_,(ro.get(_)??[]).filter(Pe=>Pe!==ae));let Qe=[...ro.get(fe.key)??[]],io=Qe.length;if(fe.overSeq!==null){let Pe=Qe.indexOf(fe.overSeq);Pe!==-1&&(io=Pe)}return Qe.splice(io,0,ae),ro.set(fe.key,Qe),ro})},[$o]),rn=lt(D=>{let z=String(D.active.id);if(z.startsWith(Io)){Z(null);let io=String(D.over?.id??"");if(!io.startsWith(Io))return;let Pe=z.slice(Io.length),ht=io.slice(Io.length);if(Pe===ht)return;let _n=t.map(nr=>nr.key),wn=_n.indexOf(Pe),an=_n.indexOf(ht);if(wn===-1||an===-1)return;g(os(_n,wn,an));return}let ie=O;if(L(null),J(null),ye.current=!0,!ie||!D.over)return;let ce=Number(z),ae=[...ie.entries()].find(([,io])=>io.includes(ce));if(!ae)return;let[fe,_]=ae,ro=[..._],Qe=$o(String(D.over.id),ie);if(Qe&&Qe.key===fe&&Qe.overSeq!==null&&Qe.overSeq!==ce){let io=ro.indexOf(ce),Pe=ro.indexOf(Qe.overSeq);io!==-1&&Pe!==-1&&(ro=os(ro,io,Pe))}if(c==="status"){p?.(ce,fe);return}if(c==="sprint"){m?.(ce,Number(fe.slice(Pr.length))||0);return}u(ce,fe===ji?"":fe,ro)},[t,O,$o,u,g,c,p,m]),Oo=lt(()=>{L(null),J(null),Z(null),ye.current=!0},[]),no=lt(D=>{if(ye.current){ye.current=!1;return}v(D)},[v]),mo=X!==null?R.get(X)??null:null,uo=ue!==null?Ie.find(D=>D.key===ue)??null:null,Rt=lt((D,z)=>{F({anchorEl:z,taskSeq:D.seq,date:D.due_date,reminder:D.reminder})},[]),de=H?.column??null;return Me(Se,{sx:{flex:1,minHeight:0,height:"100%",display:"flex",flexDirection:"column",border:"1px solid #dedddb",borderRadius:"0 0 4px 4px",overflow:"hidden",p:ts,bgcolor:te.colors.surfaceSubtle},children:[Me(hx,{sensors:V,collisionDetection:Ee,onDragStart:Zo,onDragOver:Pt,onDragEnd:rn,onDragCancel:Oo,children:[j(Se,{sx:{flex:1,minHeight:0,minWidth:0,contain:"inline-size"},children:n==="archived"&&Ie.length===0?j(Se,{sx:{py:8,textAlign:"center",color:"#9a9a97",fontSize:14},children:"\uBCF4\uAD00\uB41C \uD504\uB85C\uC81D\uD2B8\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):j(Zi,{style:{height:"100%"},contentStyle:{width:"max-content",minWidth:"100%",height:"100%"},thumb:{width:8},showHorizontalScrollbar:!0,children:Me(Se,{sx:{display:"flex",alignItems:"flex-start",gap:ts,height:"100%",minWidth:"min-content",pb:.5},children:[n==="active"&&k.length>0?Me(Se,{sx:{flex:c!=="project"?"1 0 270px":"0 0 270px",minWidth:270,contain:"inline-size",minHeight:0,maxHeight:"100%",display:"flex",flexDirection:"column",borderRadius:1.5,boxShadow:D=>D.shadows[1],bgcolor:te.card.bg,overflow:"hidden"},children:[Me(Se,{sx:{display:"flex",alignItems:"center",gap:.75,pl:1.25,pr:.5,py:1.1,borderBottom:"1px solid #e6e6e3",flexShrink:0,minHeight:48},children:[j(gx,{sx:{fontSize:17,color:"#e8763a"}}),j(Se,{component:"span",sx:{fontSize:14.5,fontWeight:700,color:te.board.columnHeaderColor},children:"\uACF5\uC9C0\uC0AC\uD56D"}),Me(Se,{component:"span",sx:{fontSize:13,color:"#9a9a97",flexShrink:0},children:["(",k.length,")"]})]}),j(Se,{sx:{flex:"1 1 auto",minHeight:0,display:"flex",flexDirection:"column"},children:j(Zi,{style:{height:"auto",flex:"1 1 auto",minHeight:0},contentStyle:{minWidth:0},thumb:{width:6},children:j(Se,{sx:{display:"flex",flexDirection:"column"},children:k.map(D=>Me(Se,{onClick:()=>no(D),onContextMenu:z=>C(D,z),sx:{px:1.25,py:1,display:"flex",flexDirection:"column",gap:.75,borderBottom:"1px solid #e6e6e3",bgcolor:te.card.bg,cursor:"pointer","&:hover":{bgcolor:"#f7f7f5"}},children:[j(Wt,{task:D,statusOptions:o,showDueDate:!0,titleFontSize:15,onRequestArchiveToggle:y}),(()=>{let z=(D.target_names??[]).filter(ce=>ce.trim());if(z.length===0)return null;let ie=z.length>2?`${z[0]}, ${z[1]} \uC678 ${z.length-2}`:z.join(", ");return Me(Se,{sx:{display:"flex",alignItems:"center",gap:.5,fontSize:12.5,color:"#787774",overflow:"hidden",whiteSpace:"nowrap"},children:[j(bx,{sx:{fontSize:14,flexShrink:0}}),j(Se,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis"},children:ie})]})})()]},D.seq))})})})]}):null,j(is,{items:ne.map(D=>`${Io}${D.key}`),strategy:Ix,children:bt.map(D=>j(Mx,{column:D,tasks:Wo(D.key),summary:I?.(D.key,Wo(D.key)),onOpenSprintMenu:M||Q||E?(z,ie)=>P({anchorEl:z,sprint:ie}):void 0,statusOptions:o,onRequestArchiveToggle:y,onRequestReply:i,onDueDateClick:Rt,onAddTask:B,canAdd:b&&c==="project",onOpenMenu:N,onCardClick:no,onCardContextMenu:C,grow:c!=="project"},D.key))}),n==="active"&&c==="project"?Me(rs,{onClick:x,sx:{flex:"0 0 270px",minWidth:270,display:"flex",alignItems:"center",justifyContent:"center",gap:.5,py:2,border:"1.5px dashed #cfcfcc",borderRadius:1.5,color:"#787774",fontSize:14,"&:hover":{bgcolor:"#eef2f6",borderColor:"#9a9a97"}},children:[j(Ji,{sx:{fontSize:18}}),"\uC0C8 \uD504\uB85C\uC81D\uD2B8"]}):null,n==="active"&&bt.length===0&&k.length===0?j(Se,{sx:{flex:1,minWidth:240,display:"flex",alignItems:"center",justifyContent:"center",color:"#9a9a97",fontSize:14,py:6},children:c==="project"?"\uD504\uB85C\uC81D\uD2B8\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4. \uC0C8 \uD504\uB85C\uC81D\uD2B8\uB97C \uCD94\uAC00\uD574 \uC5C5\uBB34\uB97C \uC815\uB9AC\uD558\uC138\uC694.":"\uD45C\uC2DC\uD560 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):null]})})}),j(kx,{children:mo?j(Se,{sx:{...dn,width:250,boxShadow:"0 8px 20px rgba(0,0,0,0.18)",cursor:"grabbing"},children:j(Wt,{task:mo,statusOptions:o,showDueDate:!0,titleFontSize:15})}):uo?Me(Se,{sx:{display:"flex",alignItems:"center",gap:.75,width:270,px:1.25,py:1,bgcolor:"#fff",border:"1px solid #dedddb",borderRadius:1.5,boxShadow:"0 8px 20px rgba(0,0,0,0.18)",opacity:.9,cursor:"grabbing"},children:[(()=>{let D=Oe(uo.icon);return D?j(D,{sx:{fontSize:17,color:"#1e3a8a"}}):null})(),j(Se,{component:"span",sx:{fontSize:13.5,fontWeight:700,color:te.board.columnHeaderColor},children:uo.label}),j(Se,{component:"span",sx:as(te.board.badge),children:(Xe.get(uo.key)??[]).length})]}):null})]}),Me(Xl,{transitionDuration:0,anchorEl:H?.anchorEl??null,open:!!H,onClose:()=>N(null),children:[de&&!de.isArchived&&b?Me(Ct,{onClick:()=>{de&&B(de.isDefault?"":de.key),N(null)},sx:{fontSize:14,gap:1},children:[j(Ji,{sx:{fontSize:18,color:"#787774"}}),"\uC0C8 \uC5C5\uBB34 \uB4F1\uB85D"]}):null,de&&!de.isDefault&&!de.isArchived?Me(Ct,{onClick:()=>{h(de.key,de.label,de.icon),N(null)},sx:{fontSize:14,gap:1},children:[j(Jl,{sx:{fontSize:18,color:"#787774"}}),"\uC218\uC815"]}):null,de&&!de.isDefault&&!de.isArchived?Me(Ct,{onClick:()=>{f(de.key,!0),N(null)},sx:{fontSize:14,gap:1},children:[j(Zl,{sx:{fontSize:18,color:"#787774"}}),"\uBCF4\uAD00"]}):null,de&&de.isArchived?Me(Ct,{onClick:()=>{f(de.key,!1),N(null)},sx:{fontSize:14,gap:1},children:[j(es,{sx:{fontSize:18,color:"#787774"}}),"\uBCF5\uC6D0"]}):null,de&&!de.isDefault?j(Yl,{}):null,de&&!de.isDefault?Me(Ct,{onClick:()=>{H&&W(H),N(null)},sx:{fontSize:14,gap:1,color:"#e5484d"},children:[j(at,{sx:{fontSize:18}}),"\uC0AD\uC81C"]}):null]}),Me(Xl,{transitionDuration:0,anchorEl:$?.anchorEl??null,open:!!$,onClose:()=>P(null),children:[M?Me(Ct,{onClick:()=>{$&&M($.sprint.seq),P(null)},sx:{fontSize:14,gap:1},children:[j(Jl,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uC218\uC815"]}):null,Q?Me(Ct,{onClick:()=>{$&&Q($.sprint.seq,$.sprint.status==="closed"?"active":"closed"),P(null)},sx:{fontSize:14,gap:1},children:[$?.sprint.status==="closed"?j(es,{sx:{fontSize:18,color:"#787774"}}):j(Zl,{sx:{fontSize:18,color:"#787774"}}),$?.sprint.status==="closed"?"\uB2E4\uC2DC \uC2DC\uC791":"\uBAA9\uD45C \uC885\uB8CC"]}):null,E?j(Yl,{}):null,E?Me(Ct,{onClick:()=>{$&&pe($),P(null)},sx:{fontSize:14,gap:1,color:"#e5484d"},children:[j(at,{sx:{fontSize:18}}),"\uBAA9\uD45C \uC0AD\uC81C"]}):null]}),j(Ue,{open:!!oe,anchorEl:oe?.anchorEl??null,title:`"${oe?.sprint.name??""}" \uBAA9\uD45C\uB97C \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`,confirmText:"\uC0AD\uC81C",onCancel:()=>pe(null),onConfirm:()=>{oe&&E?.(oe.sprint.seq),pe(null)}}),j(St,{anchorEl:K?.anchorEl??null,open:!!K,date:K?.date??"",reminder:K?.reminder??"none",onClose:()=>F(null),onDateChange:D=>{K&&(a(K.taskSeq,D),F(z=>z&&{...z,date:D}))},onReminderChange:D=>{K&&(l(K.taskSeq,D),F(z=>z&&{...z,reminder:D}))}}),j(Ue,{open:!!A,anchorEl:A?.anchorEl??null,title:`"${A?.column.label??""}" \uD504\uB85C\uC81D\uD2B8\uB97C \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?
|
|
2
|
-
\uC18C\uC18D \uC5C5\uBB34\uB294 \uAE30\uBCF8 \uC5C5\uBB34\uD568\uC73C\uB85C \uC774\uB3D9\uD569\uB2C8\uB2E4.`,confirmText:"\uC0AD\uC81C",onCancel:()=>W(null),onConfirm:()=>{A&&T(A.column.key),W(null)}}),j(Ue,{open:!!w,anchorEl:w?.anchorEl??null,title:w?.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:w?.nextCompleted?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>y(null),onConfirm:()=>{w&&r(w.taskSeq,w.nextCompleted),y(null)}})]})}import{useCallback as It,useMemo as Wn,useRef as Ax,useState as $n}from"react";import{Box as Ve,Button as Lx,ButtonBase as ss,IconButton as ls}from"@mui/material";import Nx from"@mui/icons-material/Add";import Fx from"@mui/icons-material/ChevronLeft";import Hx from"@mui/icons-material/ChevronRight";import Wx from"@mui/icons-material/KeyboardArrowDown";import{DatePicker as $x}from"@ehfuse/mui-datetime-picker";import{DndContext as Kx,DragOverlay as Ux,PointerSensor as Vx,pointerWithin as Gx,rectIntersection as Yx,useDroppable as jx,useSensor as Xx,useSensors as Qx}from"@dnd-kit/core";import{SortableContext as Jx,arrayMove as Zx,verticalListSortingStrategy as eg}from"@dnd-kit/sortable";import og from"@ehfuse/overlay-scrollbar";import{useEffect as Ex,useState as Px}from"react";function vt(e){let{loadHolidays:o}=yo(),[t,n]=Px(()=>new Map),r=e.join(",");return Ex(()=>{if(!o||!r){n(new Map);return}let i=!1;return o(r.split(",").map(Number)).then(a=>{if(i)return;let l=new Map;for(let u of a)l.has(u.date)||l.set(u.date,u.name);n(l)}).catch(()=>{}),()=>{i=!0}},[o,r]),t}function Rx(e){let[o,t,n]=e.split("-").map(Number),r=new Date(Date.UTC(o,t-1,n+1)),i=a=>String(a).padStart(2,"0");return`${r.getUTCFullYear()}-${i(r.getUTCMonth()+1)}-${i(r.getUTCDate())}`}function fn(e){let o=new Map;for(let t of e){let n=t.start_date;for(let r=0;r<62&&n<=t.end_date;r+=1){let i=o.get(n);i?i.push(t):o.set(n,[t]),n=Rx(n)}}for(let t of o.values())t.sort((n,r)=>(n.time||"99:99").localeCompare(r.time||"99:99")||n.title.localeCompare(r.title));return o}import{Box as oa,Tooltip as zx}from"@mui/material";import{jsx as ta,jsxs as qx}from"react/jsx-runtime";function xn({event:e,small:o=!1}){let t=e.time?`${e.time} ${e.title}`:e.title,n=e.calendar?`\uAD6C\uAE00 \xB7 ${e.calendar}`:"\uAD6C\uAE00 \uCE98\uB9B0\uB354",r=i=>{i.stopPropagation();let[a,l,u]=e.start_date.split("-").map(Number);window.open(`https://calendar.google.com/calendar/r/day/${a}/${l}/${u}`,"_blank")};return ta(zx,{title:`(${n}) ${t}`,arrow:!0,enterDelay:300,children:qx(oa,{onClick:r,onPointerDown:i=>i.stopPropagation(),sx:{display:"flex",alignItems:"center",gap:.5,px:1,py:o?.6:.8,borderRadius:.75,bgcolor:"#f1f1ef",color:"#37352f",fontSize:15,fontWeight:500,overflow:"hidden",whiteSpace:"nowrap",flexShrink:0,minWidth:0,maxWidth:"100%",cursor:"pointer","&:hover":{bgcolor:"#ececea"}},children:[ta(oa,{component:"span",sx:{width:6,height:6,borderRadius:"50%",bgcolor:"#0f9d58",flexShrink:0}}),ta(oa,{component:"span",sx:{minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},children:t})]})})}import{jsx as Be,jsxs as mt}from"react/jsx-runtime";var tg=["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"],Rr="day-";function na(e){let o=new Date(e);return o.setHours(0,0,0,0),o.setDate(o.getDate()-o.getDay()),o}function ra(e,o){let t=new Date(e);return t.setDate(t.getDate()+o),t}function ng(e){let o=e[0],t=e[e.length-1];return o.getMonth()===t.getMonth()?`${o.getFullYear()}\uB144 ${o.getMonth()+1}\uC6D4`:o.getFullYear()===t.getFullYear()?`${o.getFullYear()}\uB144 ${o.getMonth()+1}\uC6D4 - ${t.getMonth()+1}\uC6D4`:`${o.getFullYear()}\uB144 ${o.getMonth()+1}\uC6D4 - ${t.getFullYear()}\uB144 ${t.getMonth()+1}\uC6D4`}function rg(e){return e.getDate()===1?`${e.getMonth()+1}\uC6D4 1\uC77C`:String(e.getDate())}function ig({dayKey:e,isToday:o,dayLabel:t,holidayName:n,tasks:r,googleEvents:i,statusOptions:a,onRequestArchiveToggle:l,onRequestReply:u,onAddSchedule:c,canAdd:d,onCardClick:p,onCardContextMenu:s,summary:m}){let x=le(),{setNodeRef:B}=jx({id:`${Rr}${e}`});return mt(Ve,{ref:B,sx:{minWidth:0,minHeight:0,height:"100%",display:"flex",flexDirection:"column",bgcolor:o?x.calendar.todayBg:x.calendar.cellBg},children:[mt(Ve,{sx:{display:"flex",justifyContent:"flex-end",alignItems:"center",gap:.5,px:1,height:36,borderBottom:r.length>0?`1px solid ${x.calendar.borderColor}`:"none",flexShrink:0},children:[n?Be(Ve,{component:"span",sx:{mr:"auto",fontSize:11.5,fontWeight:600,color:x.colors.danger,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:n}):null,o?Be(Ve,{component:"span",sx:{mr:.75,px:.6,py:.1,borderRadius:.5,fontSize:11,fontWeight:600,bgcolor:x.colors.danger,color:x.calendar.cellBg,lineHeight:1.6},children:"\uC624\uB298"}):null,Be(Ve,{component:"span",sx:{fontSize:12.5,fontWeight:o?700:400,color:n?x.colors.danger:x.colors.textPrimary,flexShrink:0},children:t})]}),m?Be(Ve,{sx:{px:1,py:1,borderBottom:`1px solid ${x.calendar.borderColor}`,flexShrink:0},children:m}):null,Be(Ve,{sx:{flex:1,minHeight:0,bgcolor:o?x.calendar.todayBg:x.colors.surfaceSubtle},children:Be(og,{style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:mt(Ve,{sx:{display:"flex",flexDirection:"column",flexGrow:1},children:[i.length>0?Be(Ve,{sx:{display:"flex",flexDirection:"column",gap:.5,px:1,pt:.75,pb:.25},children:i.map(b=>Be(xn,{event:b},b.uid))}):null,Be(Jx,{items:r.map(b=>String(b.seq)),strategy:eg,children:r.map(b=>Be(Mr,{titleFontSize:15,task:b,statusOptions:a,variant:"list",onRequestArchiveToggle:l,onRequestReply:u,onCardClick:p,onCardContextMenu:s},b.seq))}),Be(Ve,{sx:{flexGrow:1,minHeight:56,display:"flex",flexDirection:"column",pb:1,...d?{"&:hover .taskbox-add-schedule":{opacity:1,pointerEvents:"auto"}}:{}},children:mt(ss,{className:"taskbox-add-schedule",onClick:()=>c(e),sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:.5,px:1.25,py:1.75,borderBottom:`1px dashed ${x.calendar.borderColor}`,bgcolor:x.calendar.cellBg,color:x.colors.accentOnSurface,fontSize:13,fontWeight:500,opacity:0,pointerEvents:"none",transition:"opacity 0.15s","&:hover":{bgcolor:x.calendar.hoverBg}},children:[Be(Nx,{sx:{fontSize:16}}),"\uC5C5\uBB34 \uB4F1\uB85D"]})})]})})})]})}function cs({tasks:e,googleEvents:o=[],statusOptions:t,todayStr:n,onToggleCompleted:r,onMoveTask:i,onRequestReply:a,onAddSchedule:l,canAdd:u=!0,onOpenDetail:c,onTaskContextMenu:d,renderColumnSummary:p}){let s=le(),[m,x]=$n(()=>na(new Date)),[B,b]=$n(null),[h,f]=$n(null),[T,g]=$n(null),[v,C]=$n(null),I=Ax(!1),M=Wn(()=>Array.from({length:7},(O,L)=>ra(m,L)),[m]),Q=Wn(()=>new Map(e.map(O=>[O.seq,O])),[e]),E=Wn(()=>[...new Set(M.map(O=>O.getFullYear()))],[M]),te=vt(E),w=Qx(Xx(Vx,{activationConstraint:{distance:5}})),y=It(O=>{let L=Gx(O),X=L.length>0?L:Yx(O),J=X.filter(ue=>!String(ue.id).startsWith(Rr));return J.length>0?J:X},[]),H=Wn(()=>fn(o),[o]),N=Wn(()=>{let O=new Map;for(let L of e){let X=L.due_date.slice(0,10);if(!X)continue;let J=O.get(X);J?J.push(L):O.set(X,[L])}for(let L of O.values())L.sort((X,J)=>{let ue=X.sort_no>0,Z=J.sort_no>0;if(ue&&Z)return X.sort_no-J.sort_no;if(ue!==Z)return ue?-1:1;if(X.completed!==J.completed)return X.completed?1:-1;let ye=Di(X),R=Di(J);return ye!==R?ye?-1:1:X.seq-J.seq});return O},[e]),$=It(O=>T?(T.get(O)??[]).map(L=>Q.get(L)).filter(L=>!!L):N.get(O)??[],[T,Q,N]),P=It(O=>{C(Number(O.active.id)),g(new Map(M.map(L=>{let X=qe(L);return[X,(N.get(X)??[]).map(J=>J.seq)]})))},[M,N]),oe=It((O,L)=>{if(O.startsWith(Rr))return{day:O.slice(Rr.length),overSeq:null};let X=Number(O);for(let[J,ue]of L)if(ue.includes(X))return{day:J,overSeq:X};return null},[]),pe=It(O=>{let{active:L,over:X}=O;X&&g(J=>{if(!J)return J;let ue=Number(L.id),Z=oe(String(X.id),J);if(!Z)return J;let ye=[...J.entries()].find(([,re])=>re.includes(ue))?.[0];if(!ye||ye===Z.day)return J;let R=new Map(J);R.set(ye,(R.get(ye)??[]).filter(re=>re!==ue));let k=[...R.get(Z.day)??[]],ne=k.length;if(Z.overSeq!==null){let re=k.indexOf(Z.overSeq);re!==-1&&(ne=re)}return k.splice(ne,0,ue),R.set(Z.day,k),R})},[oe]),A=It(O=>{let{active:L,over:X}=O,J=T;if(g(null),C(null),I.current=!0,!J||!X)return;let ue=Number(L.id),Z=[...J.entries()].find(([,re])=>re.includes(ue));if(!Z)return;let[ye,R]=Z,k=[...R],ne=oe(String(X.id),J);if(ne&&ne.day===ye&&ne.overSeq!==null&&ne.overSeq!==ue){let re=k.indexOf(ue),ve=k.indexOf(ne.overSeq);re!==-1&&ve!==-1&&(k=Zx(k,re,ve))}i(ue,ye,k)},[T,i,oe]),W=It(()=>{g(null),C(null),I.current=!0},[]),K=It(O=>{if(I.current){I.current=!1;return}c(O)},[c]),F=v!==null?Q.get(v)??null:null;return mt(Ve,{sx:{display:"flex",flexDirection:"column",flex:1,minHeight:0,border:`1px solid ${s.calendar.borderColor}`,borderRadius:"0 0 4px 4px",overflow:"hidden"},children:[mt(Ve,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1,bgcolor:s.calendar.headerBg,borderBottom:`1px solid ${s.calendar.borderColor}`,flexShrink:0},children:[mt(Ve,{sx:{display:"flex",alignItems:"center",gap:.25},children:[Be(ls,{size:"small","aria-label":"\uC774\uC804 \uC8FC",onClick:()=>x(ra(m,-7)),children:Be(Fx,{sx:{fontSize:20,color:s.colors.textSecondary}})}),Be(Lx,{size:"small",color:"inherit",onClick:()=>x(na(new Date)),sx:{minWidth:0,px:1,mx:1,fontSize:13,color:s.colors.textPrimary},children:"\uC624\uB298"}),Be(ls,{size:"small","aria-label":"\uB2E4\uC74C \uC8FC",onClick:()=>x(ra(m,7)),children:Be(Hx,{sx:{fontSize:20,color:s.colors.textSecondary}})})]}),mt(ss,{onClick:O=>f(O.currentTarget),sx:{display:"inline-flex",alignItems:"center",gap:.25,px:.75,py:.25,borderRadius:1,fontSize:15,fontWeight:700,color:s.colors.textPrimary,"&:hover":{bgcolor:s.colors.surfaceHover}},children:[ng(M),Be(Wx,{sx:{fontSize:18,color:s.colors.textMuted}})]})]}),Be(Ve,{sx:{display:"grid",gridTemplateColumns:"repeat(7, minmax(0, 1fr))",bgcolor:s.calendar.headerBg,borderBottom:`1px solid ${s.calendar.borderColor}`,flexShrink:0,"& > *":{borderRight:`1px solid ${s.calendar.borderColor}`},"& > *:last-child":{borderRight:"none"}},children:M.map(O=>{let L=O.getDay(),X=te.has(qe(O));return Be(Ve,{sx:{py:.75,textAlign:"center",fontSize:12.5,color:L===0||X?s.colors.danger:L===6?s.colors.accentOnSurface:s.colors.textSecondary},children:tg[L]},qe(O))})}),Be(Ve,{sx:{flex:1,minHeight:0},children:mt(Kx,{sensors:w,collisionDetection:y,onDragStart:P,onDragOver:pe,onDragEnd:A,onDragCancel:W,children:[Be(Ve,{sx:{display:"grid",gridTemplateColumns:"repeat(7, minmax(0, 1fr))",height:"100%",minHeight:0,"& > *":{borderRight:`1px solid ${s.calendar.borderColor}`},"& > *:last-child":{borderRight:"none"}},children:M.map(O=>{let L=qe(O);return Be(ig,{dayKey:L,isToday:L===n,dayLabel:rg(O),holidayName:te.get(L)??"",summary:p?.(L,$(L)),tasks:$(L),googleEvents:H.get(L)??[],statusOptions:t,onRequestArchiveToggle:b,onRequestReply:a,onAddSchedule:l,canAdd:u,onCardClick:K,onCardContextMenu:d},L)})}),Be(Ux,{children:F?Be(Ve,{sx:{...dn,boxShadow:"0 8px 20px rgba(0,0,0,0.18)",cursor:"grabbing"},children:Be(Wt,{task:F,statusOptions:t})}):null})]})}),Be($x,{anchorEl:h,open:!!h,onClose:()=>f(null),selectedDate:m,onDateChange:O=>{x(na(O)),f(null)}}),Be(Ue,{open:!!B,anchorEl:B?.anchorEl??null,title:B?.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:B?.nextCompleted?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>b(null),onConfirm:()=>{B&&r(B.taskSeq,B.nextCompleted),b(null)}})]})}import{useCallback as Kn,useMemo as $t,useState as zr}from"react";import{Box as Ge,Button as ag,ButtonBase as ps,IconButton as ms,Tooltip as lg}from"@mui/material";import sg from"@mui/icons-material/Add";import cg from"@mui/icons-material/ChevronLeft";import mg from"@mui/icons-material/ChevronRight";import ug from"@mui/icons-material/KeyboardArrowDown";import{DatePicker as pg}from"@ehfuse/mui-datetime-picker";import{DndContext as dg,DragOverlay as fg,PointerSensor as xg,pointerWithin as gg,rectIntersection as bg,useDraggable as hg,useDroppable as ds,useSensor as kg,useSensors as Tg}from"@dnd-kit/core";import yg from"@ehfuse/overlay-scrollbar";import{jsx as De,jsxs as Ro}from"react/jsx-runtime";var Sg=["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"],qr="mday-",Ar="mchip-",Bg=26,ia=15,fs={high:"#e5484d",medium:"#2f80ed",low:"#d9a514"};function Cg(e){let o=new Date(e);return o.setHours(0,0,0,0),o.setDate(o.getDate()-o.getDay()),o}function Lr(e){let o=new Date(e);return o.setHours(0,0,0,0),o.setDate(1),o}function vg(e,o){let t=new Date(e);return t.setDate(t.getDate()+o),t}function us(e,o){let t=Lr(e);return t.setMonth(t.getMonth()+o),t}function Ig({task:e,statusOptions:o,isPreview:t=!1,onOpenDetail:n,onContextMenu:r}){let i=le(),a=i.mode==="dark",{attributes:l,listeners:u,setNodeRef:c,isDragging:d}=hg({id:String(e.seq),disabled:t}),{setNodeRef:p}=ds({id:`${Ar}${e.seq}`,disabled:t}),s=Oe(e.icon||_e),[m]=kt(e,o);return De(lg,{title:e.title,arrow:!0,enterDelay:400,children:Ro(Ge,{ref:x=>{c(x),p(x)},...l,...u,onClick:()=>n(e),onContextMenu:x=>r(e,x),sx:{display:"flex",alignItems:"center",gap:.5,py:.6,px:.75,flexShrink:0,borderRadius:.75,bgcolor:m?a?ln(m.dot,i.chip.darkBgAlpha):m.bg:a?i.card.bg:i.colors.surfaceHover,color:m?a?i.chip.darkTextSource==="fg"?m.fg:m.dot:m.fg:i.colors.textPrimary,fontSize:ia,fontWeight:e.completed?400:500,textDecoration:e.completed?"line-through":"none",opacity:t?.5:d?.35:e.completed?.6:1,border:t?`1px dashed ${i.colors.accent}`:"1px solid transparent",pointerEvents:t?"none":"auto",cursor:"pointer",touchAction:"none",overflow:"hidden","&:hover":{filter:"brightness(0.96)"}},children:[De(Ge,{component:"span",sx:{width:6,height:6,borderRadius:"50%",flexShrink:0,bgcolor:fs[e.priority]}}),s?De(s,{sx:{fontSize:14,flexShrink:0,opacity:.75}}):null,Ro(Ge,{component:"span",sx:{minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:i.colors.textPrimary},children:[e.is_event&&e.event_time?`${e.event_time} `:"",e.title]})]})})}function _g({dayKey:e,dayNumber:o,isToday:t,isOtherMonth:n,weekday:r,holidayName:i,tasks:a,googleEvents:l,statusOptions:u,previewSeq:c,onOpenDetail:d,onTaskContextMenu:p,onAddSchedule:s,canAdd:m}){let x=le(),B=x.mode==="dark",{setNodeRef:b,isOver:h}=ds({id:`${qr}${e}`}),f=a,T=!!i||r===0;return Ro(Ge,{ref:b,sx:{minWidth:0,minHeight:0,display:"flex",flexDirection:"column",gap:.25,p:.5,bgcolor:h?x.colors.accentSoft:t?x.calendar.todayBg:n?x.colors.surfaceSubtle:x.calendar.cellBg,transition:"background-color 0.15s",overflow:"hidden",...m?{"&:hover .taskbox-month-add":{opacity:1,pointerEvents:"auto"}}:{}},children:[Ro(Ge,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:.5,height:20,flexShrink:0,pr:.5},children:[i?De(Ge,{component:"span",sx:{mr:.25,minWidth:0,fontSize:11,fontWeight:600,color:x.colors.danger,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:i}):null,t?De(Ge,{component:"span",sx:{px:.5,borderRadius:.5,fontSize:10.5,fontWeight:600,bgcolor:x.colors.danger,color:x.calendar.cellBg,lineHeight:1.6},children:"\uC624\uB298"}):null,De(Ge,{component:"span",sx:{fontSize:12.5,fontWeight:t?700:400,color:n?x.colors.textMuted:T?x.colors.danger:r===6?x.colors.accentOnSurface:x.colors.textPrimary,flexShrink:0},children:o})]}),l.map(g=>De(xn,{event:g,small:!0},g.uid)),f.map(g=>De(Ig,{task:g,statusOptions:u,isPreview:g.seq===c,onOpenDetail:d,onContextMenu:p},g.seq)),De(Ge,{sx:{flexGrow:1,minHeight:0,display:"flex",alignItems:"flex-start"},children:Ro(ps,{className:"taskbox-month-add",onClick:()=>s(e),sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"flex-start",gap:.25,height:Bg,px:.75,borderRadius:.75,color:x.colors.accentOnSurface,fontSize:ia,fontWeight:500,opacity:0,pointerEvents:"none",transition:"opacity 0.15s","&:hover":{bgcolor:x.calendar.hoverBg}},children:[De(sg,{sx:{fontSize:16}}),"\uC5C5\uBB34 \uB4F1\uB85D"]})})]})}function xs({tasks:e,googleEvents:o=[],statusOptions:t,todayStr:n,onMoveTask:r,onAddSchedule:i,canAdd:a=!0,onOpenDetail:l,onTaskContextMenu:u}){let c=le(),d=c.mode==="dark",[p,s]=zr(()=>Lr(new Date)),[m,x]=zr(null),[B,b]=zr(null),[h,f]=zr(null),T=$t(()=>{let A=Cg(p);return Array.from({length:42},(W,K)=>vg(A,K))},[p]),g=$t(()=>new Map(e.map(A=>[A.seq,A])),[e]),v=$t(()=>fn(o),[o]),C=$t(()=>[...new Set(T.map(A=>A.getFullYear()))],[T]),I=vt(C),M=$t(()=>{let A=new Map;for(let W of e){let K=W.due_date.slice(0,10);if(!K)continue;let F=A.get(K);F?F.push(W):A.set(K,[W])}for(let W of A.values())W.sort((K,F)=>{let O=K.sort_no>0,L=F.sort_no>0;return O&&L?K.sort_no-F.sort_no:O!==L?O?-1:1:K.completed!==F.completed?K.completed?1:-1:K.seq-F.seq});return A},[e]),Q=Tg(kg(xg,{activationConstraint:{distance:5}})),E=Kn(A=>{let W=gg(A),K=W.length>0?W:bg(A),F=K.filter(O=>String(O.id).startsWith(Ar));return F.length>0?F:K.filter(O=>String(O.id).startsWith(qr))},[]),te=Kn(A=>{b(Number(A.active.id))},[]),w=Kn(A=>{f(A.over?String(A.over.id):null)},[]),y=$t(()=>{let A=new Map;for(let[W,K]of M)for(let F of K)A.set(F.seq,W);return A},[M]),H=B!==null?g.get(B)?.due_date.slice(0,10)??"":"",N=$t(()=>{if(B===null||!h)return null;if(h.startsWith(Ar)){let A=Number(h.slice(Ar.length)),W=y.get(A);if(!W)return null;let K=(M.get(W)??[]).filter(O=>O.seq!==B),F=K.findIndex(O=>O.seq===A);return{day:W,index:F===-1?K.length:F}}if(h.startsWith(qr)){let A=h.slice(qr.length),W=(M.get(A)??[]).filter(K=>K.seq!==B);return{day:A,index:W.length}}return null},[B,y,h,M]),$=Kn(A=>{let W=M.get(A)??[];if(B===null||!N)return W;let K=g.get(B);if(!K)return W;let F=W.filter(O=>O.seq!==B);return A===N.day?[...F.slice(0,N.index),K,...F.slice(N.index)]:A===H?F:W},[B,H,N,g,M]),P=Kn(A=>{let W=B,K=N;if(b(null),f(null),W===null||!K)return;let F=(M.get(K.day)??[]).filter(L=>L.seq!==W),O=[...F.slice(0,K.index).map(L=>L.seq),W,...F.slice(K.index).map(L=>L.seq)];r(W,K.day,O)},[B,N,r,M]),oe=B!==null?g.get(B)??null:null,pe=`${p.getFullYear()}\uB144 ${p.getMonth()+1}\uC6D4`;return Ro(Ge,{sx:{display:"flex",flexDirection:"column",flex:1,minHeight:0,border:`1px solid ${c.calendar.borderColor}`,borderRadius:"0 0 4px 4px",overflow:"hidden"},children:[Ro(Ge,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1,bgcolor:c.calendar.headerBg,borderBottom:`1px solid ${c.calendar.borderColor}`,flexShrink:0},children:[Ro(Ge,{sx:{display:"flex",alignItems:"center",gap:.25},children:[De(ms,{size:"small","aria-label":"\uC774\uC804 \uB2EC",onClick:()=>s(us(p,-1)),children:De(cg,{sx:{fontSize:20,color:c.colors.textSecondary}})}),De(ag,{size:"small",color:"inherit",onClick:()=>s(Lr(new Date)),sx:{minWidth:0,px:1,mx:1,fontSize:13,color:c.colors.textPrimary},children:"\uC624\uB298"}),De(ms,{size:"small","aria-label":"\uB2E4\uC74C \uB2EC",onClick:()=>s(us(p,1)),children:De(mg,{sx:{fontSize:20,color:c.colors.textSecondary}})})]}),Ro(ps,{onClick:A=>x(A.currentTarget),sx:{display:"inline-flex",alignItems:"center",gap:.25,ml:{xs:"auto",lg:0},px:.75,py:.25,borderRadius:1,fontSize:15,fontWeight:700,color:c.colors.textPrimary,"&:hover":{bgcolor:c.colors.surfaceHover}},children:[pe,De(ug,{sx:{fontSize:18,color:c.colors.textMuted}})]})]}),De(Ge,{sx:{display:"grid",gridTemplateColumns:"repeat(7, minmax(0, 1fr))",bgcolor:c.calendar.headerBg,borderBottom:`1px solid ${c.calendar.borderColor}`,flexShrink:0,"& > *":{borderRight:`1px solid ${c.calendar.borderColor}`},"& > *:last-child":{borderRight:"none"}},children:Sg.map((A,W)=>De(Ge,{sx:{py:.75,textAlign:"center",fontSize:12.5,color:W===0?c.colors.danger:W===6?c.colors.accentOnSurface:c.colors.textSecondary},children:A},A))}),De(Ge,{sx:{flex:1,minHeight:0},children:Ro(dg,{sensors:Q,collisionDetection:E,onDragStart:te,onDragOver:w,onDragEnd:P,onDragCancel:()=>{b(null),f(null)},children:[De(yg,{style:{height:"100%"},thumb:{width:8},children:De(Ge,{sx:{display:"grid",gridTemplateColumns:"repeat(7, minmax(0, 1fr))",gridTemplateRows:"repeat(6, minmax(112px, auto))",minHeight:"100%",flexShrink:0,"& > *":{borderRight:`1px solid ${c.calendar.borderColor}`,borderBottom:`1px solid ${c.calendar.borderColor}`},"& > *:nth-of-type(7n)":{borderRight:"none"},"& > *:nth-last-of-type(-n+7)":{borderBottom:"none"}},children:T.map(A=>{let W=qe(A);return De(_g,{dayKey:W,dayNumber:A.getDate(),isToday:W===n,isOtherMonth:A.getMonth()!==p.getMonth(),weekday:A.getDay(),holidayName:I.get(W)??"",tasks:$(W),googleEvents:v.get(W)??[],statusOptions:t,previewSeq:N?.day===W?B:null,onOpenDetail:l,onTaskContextMenu:u,onAddSchedule:i,canAdd:a},W)})})}),De(fg,{children:oe?Ro(Ge,{sx:{display:"flex",alignItems:"center",gap:.5,py:.6,px:.75,borderRadius:.75,bgcolor:c.calendar.cellBg,border:`1px solid ${c.calendar.borderColor}`,boxShadow:"0 6px 16px rgba(0,0,0,0.18)",fontSize:ia,fontWeight:500,color:c.colors.textPrimary,cursor:"grabbing",whiteSpace:"nowrap"},children:[De(Ge,{component:"span",sx:{width:6,height:6,borderRadius:"50%",bgcolor:fs[oe.priority]}}),oe.title]}):null})]})}),De(pg,{anchorEl:m,open:!!m,onClose:()=>x(null),selectedDate:p,onDateChange:A=>{s(Lr(A)),x(null)}})]})}import{useEffect as wg,useMemo as Nr,useRef as Dg,useState as gs}from"react";import{Box as So,Button as Og,IconButton as bs}from"@mui/material";import Mg from"@mui/icons-material/ChevronLeft";import Eg from"@mui/icons-material/ChevronRight";import Pg from"@mui/icons-material/KeyboardArrowDown";import{DatePicker as Rg}from"@ehfuse/mui-datetime-picker";import{jsx as lo,jsxs as _t}from"react/jsx-runtime";var zg=["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"],qg={high:"#e5484d",medium:"#2f80ed",low:"#d9a514"};function aa(e){let o=new Date(e);return o.setHours(0,0,0,0),o.setDate(1),o}function hs(e){let o=t=>String(t).padStart(2,"0");return`${e.getFullYear()}-${o(e.getMonth()+1)}-${o(e.getDate())}`}function Ag({task:e,statusOptions:o,onOpenDetail:t}){let n=le(),[r]=kt(e,o),i=Oe(e.icon||(e.is_notice?Mo:_e));return _t(So,{onClick:a=>{a.stopPropagation(),t(e)},sx:{display:"flex",alignItems:"center",gap:.5,py:.6,px:1,borderRadius:.75,minWidth:0,maxWidth:"100%",bgcolor:r?.bg??n.colors.surfaceHover,color:r?.fg??n.colors.textPrimary,fontSize:15,fontWeight:e.completed?400:500,textDecoration:e.completed?"line-through":"none",opacity:e.completed?.6:1,cursor:"pointer",overflow:"hidden"},children:[lo(So,{component:"span",sx:{width:6,height:6,borderRadius:"50%",flexShrink:0,bgcolor:qg[e.priority]??n.colors.accentOnSurface}}),i?lo(i,{sx:{fontSize:16,flexShrink:0,opacity:.75}}):null,_t(So,{component:"span",sx:{minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:n.colors.textPrimary},children:[e.is_event&&e.event_time?`${e.event_time} `:"",e.title]})]})}function ks({tasks:e,googleEvents:o=[],statusOptions:t,todayStr:n,onOpenDetail:r,onAddSchedule:i}){let a=le(),[l,u]=gs(()=>aa(new Date)),[c,d]=gs(!1),p=Nr(()=>{let f=new Date(l.getFullYear(),l.getMonth()+1,0).getDate();return Array.from({length:f},(T,g)=>{let v=new Date(l.getFullYear(),l.getMonth(),g+1);return{ymd:hs(v),dayNumber:g+1,weekday:v.getDay()}})},[l]),s=Nr(()=>{let f=new Map;for(let T of e){let g=T.due_date.slice(0,10);if(!g)continue;let v=f.get(g);v?v.push(T):f.set(g,[T])}for(let T of f.values())T.sort((g,v)=>g.completed!==v.completed?g.completed?1:-1:g.seq-v.seq);return f},[e]),m=Nr(()=>fn(o),[o]),x=Nr(()=>[l.getFullYear()],[l]),B=vt(x),b=Dg(null),h=n.slice(0,7)===hs(l).slice(0,7);return wg(()=>{if(!h)return;let f=C=>{let I=C?.parentElement??null;for(;I;){let M=window.getComputedStyle(I);if(/(auto|scroll)/.test(M.overflowY)&&I.scrollHeight>I.clientHeight)return I;I=I.parentElement}return null},T=()=>{let C=b.current,I=f(C);if(!I||!C)return;let M=C.getBoundingClientRect().top-I.getBoundingClientRect().top+I.scrollTop;I.scrollTop=Math.max(0,M-I.clientHeight/2+C.clientHeight/2)},g=setTimeout(T,100),v=setTimeout(T,400);return()=>{clearTimeout(g),clearTimeout(v)}},[h,l]),_t(So,{sx:{minWidth:0,maxWidth:"100%",overflow:"hidden",bgcolor:a.colors.surface},children:[_t(So,{sx:{display:"flex",alignItems:"center",gap:.5,px:1.5,py:1,flexShrink:0},children:[lo(bs,{size:"small","aria-label":"\uC774\uC804 \uB2EC",onClick:()=>u(f=>new Date(f.getFullYear(),f.getMonth()-1,1)),children:lo(Mg,{sx:{fontSize:20,color:a.colors.textSecondary}})}),lo(Og,{size:"small",color:"inherit",onClick:()=>u(aa(new Date)),sx:{minWidth:0,px:1,fontSize:13.5,color:a.colors.textPrimary},children:"\uC624\uB298"}),lo(bs,{size:"small","aria-label":"\uB2E4\uC74C \uB2EC",onClick:()=>u(f=>new Date(f.getFullYear(),f.getMonth()+1,1)),children:lo(Eg,{sx:{fontSize:20,color:a.colors.textSecondary}})}),_t(So,{onClick:()=>d(!0),sx:{ml:"auto",pr:.5,display:"flex",alignItems:"center",gap:.25,fontSize:16.5,fontWeight:700,color:a.colors.textPrimary,cursor:"pointer"},children:[l.getFullYear(),"\uB144 ",l.getMonth()+1,"\uC6D4",lo(Pg,{sx:{fontSize:20,color:a.colors.textMuted}})]})]}),lo(So,{sx:{minWidth:0,overflowX:"hidden",borderTop:`1px solid ${a.calendar.borderColor}`},children:p.map(({ymd:f,dayNumber:T,weekday:g})=>{let v=B.get(f)??"",C=f===n,I=!!v||g===0,M=s.get(f)??[],Q=m.get(f)??[],E=M.length>0||Q.length>0;return _t(So,{ref:C?b:void 0,onClick:i?()=>i(f):void 0,sx:{display:"flex",alignItems:"center",gap:1,px:1,minWidth:0,maxWidth:"100%",py:E?.75:.5,minHeight:44,flexShrink:0,borderBottom:`1px solid ${a.calendar.borderColor}`,...i?{cursor:"pointer"}:{}},children:[lo(So,{sx:{width:52,flexShrink:0,display:"flex",flexDirection:"column",alignItems:"center",gap:.25},children:_t(So,{sx:{display:"flex",alignItems:"center",gap:.5},children:[lo(So,{component:"span",sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:26,height:26,borderRadius:"50%",fontSize:15.5,fontWeight:C?700:500,color:C?a.colors.surface:I?a.colors.danger:g===6?a.colors.accentOnSurface:a.colors.textPrimary,bgcolor:C?a.colors.accentOnSurface:"transparent"},children:T}),lo(So,{component:"span",sx:{fontSize:12.5,color:I?a.colors.danger:g===6?a.colors.accentOnSurface:a.colors.textSecondary},children:zg[g]})]})}),_t(So,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",gap:.5},children:[Q.map(te=>lo(xn,{event:te},te.uid)),M.map(te=>lo(Ag,{task:te,statusOptions:t,onOpenDetail:r},te.seq))]})]},f)})}),lo(Rg,{open:c,centered:!0,monthOnly:!0,onClose:()=>d(!1),selectedDate:l,onDateChange:f=>{u(aa(f)),d(!1)}})]})}import{useCallback as Ts,useEffect as ys,useMemo as la,useRef as Hr,useState as Wr}from"react";import{Box as Ae,Tooltip as Cs}from"@mui/material";import Lg from"@ehfuse/overlay-scrollbar";import Ng from"@mui/icons-material/CheckCircle";import Fg from"@mui/icons-material/RadioButtonUnchecked";import{DndContext as Hg,PointerSensor as Wg,closestCenter as $g,useSensor as Kg,useSensors as Ug}from"@dnd-kit/core";import{SortableContext as Vg,arrayMove as Gg,useSortable as Yg,verticalListSortingStrategy as jg}from"@dnd-kit/sortable";import Xg from"@mui/icons-material/DragIndicator";import{jsx as Re,jsxs as wt}from"react/jsx-runtime";var sa=36,Qg=48,Ss=40,Jg=24,Zg=4,eb=14,Bs=36,ob=12.5,gn=220,tb={high:{bg:"#f6c6c9",border:"#e5484d"},medium:{bg:"#c5d8f6",border:"#2f80ed"},low:{bg:"#f3e3b6",border:"#d9a514"}};function Kt(e){let o=String(e??"").trim();if(!o)return null;let t=new Date(`${o}T00:00:00`);return Number.isNaN(t.getTime())?null:t}function Fr(e,o){let t=new Date(e);return t.setDate(t.getDate()+o),t}function ca(e,o){return Math.round((o.getTime()-e.getTime())/864e5)}function nb({task:e,dragHandle:o,onPointerDown:t,onClick:n}){let r=le(),i=Hr(null),[a,l]=Wr("");return Re(Cs,{title:a,arrow:!0,enterDelay:300,children:wt(Ae,{onPointerDown:t,onClick:u=>n(e,u),onMouseEnter:()=>{let u=i.current;l(u&&u.scrollWidth>u.clientWidth?e.title:"")},sx:{width:gn,flexShrink:0,position:"sticky",left:0,zIndex:2,bgcolor:r.timeline.bg,borderRight:`1px solid ${r.timeline.gridColor}`,display:"flex",alignItems:"center",gap:.5,pl:.5,pr:1.5,fontSize:15,fontWeight:e.completed?400:500,color:e.completed?r.colors.textMuted:r.colors.textPrimary,overflow:"hidden",whiteSpace:"nowrap",cursor:"pointer",textDecoration:e.completed?"line-through":"none","&:hover":{bgcolor:r.colors.surfaceHover}},children:[o,Re(Ae,{ref:i,component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.title})]})})}function rb({id:e,showIndicator:o,children:t}){let n=le(),{attributes:r,listeners:i,setNodeRef:a}=Yg({id:e});return wt(Ae,{ref:a,sx:{position:"relative"},children:[o?Re(Ae,{sx:{position:"absolute",top:-1,left:0,right:0,height:2,bgcolor:n.colors.accentOnSurface,zIndex:5}}):null,t({...r,...i})]})}function vs({tasks:e,todayStr:o,onOpenDetail:t,onToggleChecklist:n,onReorderTasks:r,onTaskContextMenu:i}){let a=le(),l=la(()=>[...e].sort((y,H)=>{let N=(y.timeline_sort_no??0)>0,$=(H.timeline_sort_no??0)>0;if(N&&$)return(y.timeline_sort_no??0)-(H.timeline_sort_no??0);if(N!==$)return N?-1:1;let P=y.due_date||y.start_date,oe=H.due_date||H.start_date;return P!==oe?P<oe?-1:1:y.seq-H.seq}),[e]),[u,c]=Wr(null),[d,p]=Wr(null),s=Ug(Kg(Wg,{activationConstraint:{distance:4}})),m=Ts(y=>{c(y.over?Number(y.over.id):null)},[]),x=Ts(y=>{c(null),p(null);let{active:H,over:N}=y;if(!N||H.id===N.id)return;let $=l.map(pe=>pe.seq),P=$.indexOf(Number(H.id)),oe=$.indexOf(Number(N.id));P===-1||oe===-1||r(Gg($,P,oe))},[l,r]),B=la(()=>{let y=Kt(o)??new Date,H=y,N=Fr(y,21);for(let oe of l){let pe=Kt(oe.start_date)??Kt(oe.due_date),A=Kt(oe.due_date)??pe;pe&&pe<H&&(H=pe),A&&A>N&&(N=A)}let $=Fr(H,-3),P=ca($,Fr(N,3))+1;return Array.from({length:P},(oe,pe)=>Fr($,pe))},[l,o]),b=B[0],h=B.findIndex(y=>qe(y)===o),{dayWidths:f,dayOffsets:T,gridWidth:g}=la(()=>{let y=B.map(($,P)=>$.getDate()===1||P===0?Qg:sa),H=[],N=0;for(let $ of y)H.push(N),N+=$;return{dayWidths:y,dayOffsets:H,gridWidth:N}},[B]),v=gn+g,C=Hr(null),I=y=>{C.current={x:y.clientX,y:y.clientY}},M=(y,H)=>{let N=C.current;C.current=null,!(N&&(Math.abs(H.clientX-N.x)>5||Math.abs(H.clientY-N.y)>5))&&t(y)},Q=Hr(null),[E,te]=Wr(!1);ys(()=>{let y=Q.current?.getScrollContainer();if(!y)return;let H=()=>te(y.scrollHeight>y.clientHeight);H();let N=new ResizeObserver(H);return N.observe(y),()=>N.disconnect()},[l.length]);let w=Hr(!1);return ys(()=>{if(l.length===0||w.current)return;w.current=!0;let y=window.requestAnimationFrame(()=>{let H=Q.current?.getScrollContainer();!H||h<0||(H.scrollLeft=Math.max(0,T[h]-sa*3))});return()=>window.cancelAnimationFrame(y)},[l.length]),Re(Ae,{sx:{flex:1,minHeight:0,minWidth:0,maxWidth:"100%",display:"flex",flexDirection:"column",border:`1px solid ${a.timeline.gridColor}`,borderRadius:"0 0 4px 4px",overflow:"hidden",bgcolor:a.timeline.headerBg},children:Re(Ae,{sx:{flex:1,minHeight:0,minWidth:0,contain:"inline-size"},children:Re(Lg,{ref:Q,style:{height:"100%"},contentStyle:{width:"max-content",minWidth:"100%"},thumb:{width:8},showHorizontalScrollbar:!0,dragScroll:{excludeClasses:["taskbox-timeline-handle"]},children:wt(Ae,{sx:{width:v,position:"relative",bgcolor:a.timeline.bg},children:[wt(Ae,{sx:{display:"flex",position:"sticky",top:0,zIndex:3,bgcolor:a.timeline.headerBg,borderBottom:`1px solid ${a.timeline.gridColor}`},children:[Re(Ae,{sx:{width:gn,height:Bs,flexShrink:0,position:"sticky",left:0,zIndex:4,bgcolor:a.timeline.headerBg,borderRight:`1px solid ${a.timeline.gridColor}`,display:"flex",alignItems:"center",px:1.5,fontSize:13,color:a.colors.textSecondary},children:"\uC81C\uBAA9"}),B.map((y,H)=>{let N=y.getDay(),$=H===h,P=y.getDate()===1||H===0;return Re(Ae,{sx:{width:f[H],height:Bs,flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",fontSize:ob,fontWeight:$?700:400,color:$?a.timeline.bg:N===0?a.colors.danger:N===6?a.colors.accentOnSurface:a.colors.textSecondary,bgcolor:$?a.colors.danger:"transparent",borderRight:`1px solid ${a.timeline.gridColor}`,whiteSpace:"nowrap"},children:P?`${y.getMonth()+1}/${y.getDate()}`:y.getDate()},qe(y))})]}),Re(Hg,{sensors:s,collisionDetection:$g,onDragStart:y=>p(Number(y.active.id)),onDragOver:m,onDragEnd:x,onDragCancel:()=>{c(null),p(null)},children:Re(Vg,{items:l.map(y=>String(y.seq)),strategy:jg,children:wt(Ae,{sx:{position:"relative"},children:[B.map((y,H)=>{let N=y.getDay(),$=H===h;return!$&&N!==0&&N!==6?null:Re(Ae,{sx:{position:"absolute",top:0,bottom:0,left:gn+T[H],width:f[H],bgcolor:$?"rgba(229,72,77,0.07)":a.colors.surfaceSubtle,zIndex:0}},`stripe-${qe(y)}`)}),l.map((y,H)=>{let N=Kt(y.start_date)??Kt(y.due_date),$=Kt(y.due_date)??N,P=N?Math.min(B.length-1,Math.max(0,ca(b,N))):0,oe=$?Math.min(B.length-1,Math.max(P,ca(b,$))):P,pe=tb[y.priority],A=gn+T[P]+2,W=T[oe]+f[oe]-T[P]-4,K=y.checklist??[];return Re(rb,{id:String(y.seq),showIndicator:u===y.seq&&d!==y.seq,children:F=>wt(Ae,{sx:{borderBottom:H===l.length-1&&E?"none":`1px solid ${a.timeline.gridColor}`,position:"relative",zIndex:1,opacity:d===y.seq?.45:1},children:[wt(Ae,{onContextMenu:O=>i(y,O),sx:{display:"flex",height:Ss,position:"relative","&:hover":{bgcolor:"rgba(47,128,237,0.04)"}},children:[Re(nb,{task:y,dragHandle:Re(Ae,{component:"span",className:"taskbox-timeline-handle",...F,onClick:O=>O.stopPropagation(),sx:{display:"inline-flex",alignItems:"center",flexShrink:0,color:a.colors.accentOnSurface,cursor:"grab",touchAction:"none","&:hover":{color:a.colors.accentOnSurface}},children:(()=>{let O=Oe(y.icon||_e)??Xg;return Re(O,{sx:{fontSize:17}})})()}),onPointerDown:I,onClick:M}),Re(Cs,{title:`${y.title} (${y.start_date||"?"} ~ ${y.due_date||"?"})`,arrow:!0,enterDelay:300,children:Re(Ae,{onPointerDown:I,onClick:O=>M(y,O),sx:{position:"absolute",top:(Ss-20)/2,left:A,width:Math.max(sa-4,W),height:20,borderRadius:1,bgcolor:pe.bg,border:`1px solid ${pe.border}`,opacity:y.completed?.45:1,cursor:"pointer","&:hover":{filter:"brightness(0.95)"}}})})]}),K.map((O,L)=>Re(Ae,{sx:{display:"flex",height:Jg,position:"relative",mt:L===0?`${Zg}px`:0,mb:L===K.length-1?`${eb}px`:0},children:Re(Ae,{sx:{width:gn,flexShrink:0,position:"sticky",left:0,zIndex:2,bgcolor:a.timeline.bg,borderRight:`1px solid ${a.timeline.gridColor}`,display:"flex",alignItems:"center",pl:4.25,pr:1.5,fontSize:13,color:O.checked?a.colors.textMuted:a.colors.textPrimary},children:wt(Ae,{onClick:()=>n(y.seq,L,!O.checked),sx:{display:"inline-flex",alignItems:"center",gap:.75,minWidth:0,cursor:"pointer"},children:[O.checked?Re(Ng,{sx:{fontSize:17,color:a.colors.accentOnSurface,flexShrink:0}}):Re(Fg,{sx:{fontSize:17,color:a.colors.textMuted,flexShrink:0}}),Re(Ae,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",textDecoration:O.checked?"line-through":"none"},children:O.label})]})})},`${y.seq}-check-${L}`))]})},y.seq)}),l.length===0?Re(Ae,{sx:{py:8,textAlign:"center",color:a.colors.textMuted,fontSize:14},children:"\uD45C\uC2DC\uD560 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):null]})})})]})})})})}import{jsx as Ut}from"react/jsx-runtime";function Fw(e){switch(e.view){case"card":case"kanban":{let{view:o,...t}=e;return Ut(ea,{...t,columnAxis:o==="kanban"?"status":"project"})}case"sprint":{let{view:o,...t}=e;return Ut(ea,{...t,columnAxis:"sprint"})}case"calendar":{let{view:o,...t}=e;return Ut(cs,{...t})}case"month":{let{view:o,...t}=e;return Ut(xs,{...t})}case"agenda":{let{view:o,...t}=e;return Ut(ks,{...t})}case"timeline":{let{view:o,...t}=e;return Ut(vs,{...t})}default:{let{view:o,...t}=e;return Ut(Kl,{...t})}}}var Hw=["list","card","kanban","calendar","month","timeline"];import{Box as bo}from"@mui/material";function ib(e){let o=String(e??"").trim();if(!o)return 0;let t=0,n=!1;for(let r of o.matchAll(/(\d+(?:\.\d+)?)\s*(h|시간|m|분|d|일)/gi)){let i=parseFloat(r[1]),a=r[2].toLowerCase();n=!0,a==="m"||a==="\uBD84"?t+=i/60:a==="d"||a==="\uC77C"?t+=i*8:t+=i}if(!n){let r=parseFloat(o);Number.isFinite(r)&&(t+=r)}return t}function Is(e){let o=Math.round(e*10)/10;return`${o%1===0?o.toFixed(0):o.toFixed(1)}\uC2DC\uAC04`}function _s(e,o,t){if(!/^\d{4}-\d{2}-\d{2}$/.test(e)||!/^\d{4}-\d{2}-\d{2}$/.test(o))return 0;let n=new Date(`${e}T00:00:00`),r=new Date(`${o}T00:00:00`);if(r<n||r.getTime()-n.getTime()>3660*864e5)return 0;let i=0;for(let a=new Date(n);a<=r;a.setDate(a.getDate()+1)){let l=a.getDay();if(l===0||l===6)continue;let u=`${a.getFullYear()}-${String(a.getMonth()+1).padStart(2,"0")}-${String(a.getDate()).padStart(2,"0")}`;t.has(u)||(i+=1)}return i}function ws(e){return e.reduce((o,t)=>t.completed?o:o+ib(t.estimated_time),0)}import{Fragment as ab,jsx as Dt,jsxs as zo}from"react/jsx-runtime";function Ds(e,o){if(!/^\d{4}-\d{2}-\d{2}$/.test(e)||!/^\d{4}-\d{2}-\d{2}$/.test(o))return null;let t=new Date(`${e}T00:00:00`),n=new Date(`${o}T00:00:00`);return Math.round((t.getTime()-n.getTime())/864e5)}function Os({tasks:e,todayStr:o,showProgress:t=!0,dday:n=null,workdaysLeft:r=null,showPoints:i=!0,showHours:a=!0,showOverdue:l=!0,showInfo:u=!0,inline:c=!1}){let d=le(),p=e.filter(M=>!M.archived),s=p.filter(M=>M.completed).length,m=p.length>0?Math.round(s/p.length*100):0,x=p.filter(M=>!M.completed&&!M.is_event&&!!M.due_date&&M.due_date.slice(0,10)<o).length,B=p.reduce((M,Q)=>Q.completed?M:M+(Q.story_points??0),0),b=ws(p),h=t?Dt(bo,{sx:{flex:c?"0 0 110px":"1 1 auto",minWidth:0,height:d.summary.gaugeHeight,borderRadius:3,bgcolor:d.summary.gaugeTrackColor},children:Dt(bo,{sx:{height:"100%",borderRadius:3,width:`${m}%`,bgcolor:m>=100?d.summary.gaugeCompleteColor:d.summary.gaugeBarColor,transition:"width 0.2s"}})}):null,f=t?zo(bo,{component:"span",sx:{flexShrink:0,fontSize:c?14:13,color:d.summary.textColor},children:[m,"%"]}):null,T={color:d.summary.numberColor,fontWeight:700,fontSize:c?15:14},g=p.length-s,v=zo(ab,{children:[c?null:zo("span",{children:["\uB0A8\uC740 ",Dt(bo,{component:"span",sx:T,children:g}),"\uAC74"]}),l&&x>0?zo(bo,{component:"span",sx:{color:d.summary.overdueColor,fontWeight:600},children:["\uC9C0\uC5F0"," ",Dt(bo,{component:"span",sx:{fontWeight:700,fontSize:c?15:14},children:x}),"\uAC74"]}):null,i&&B>0?zo("span",{children:[Dt(bo,{component:"span",sx:T,children:B}),"SP"]}):null,a&&b>0?zo("span",{children:["\uC57D ",Dt(bo,{component:"span",sx:T,children:Is(b).replace("\uC2DC\uAC04","")}),"\uC2DC\uAC04"]}):null]}),C=typeof r=="number"&&Number.isFinite(r)?zo("span",{children:["\uADFC\uBB34\uC77C ",Dt(bo,{component:"span",sx:T,children:r}),"\uC77C"]}):null,I=typeof n=="number"&&Number.isFinite(n)?Dt(bo,{component:"span",sx:{ml:c?0:"auto",flexShrink:0,px:.6,py:.1,borderRadius:.5,fontSize:12,fontWeight:600,bgcolor:d.summary.overdueColor,color:d.colors.textInverse,lineHeight:1.6},children:n===0?"D-day":n>0?`D-${n}`:`D+${-n}`}):null;return c?zo(bo,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0,fontSize:14.5,color:d.summary.textColor,whiteSpace:"nowrap",...d.summary.sx},children:[u?v:null,u?C:null,u?I:null,h,f]}):zo(bo,{sx:{display:"flex",flexDirection:"column",gap:.5},children:[t?zo(bo,{sx:{display:"flex",alignItems:"center",gap:1},children:[h,f]}):null,zo(bo,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,fontSize:13.5,color:d.summary.textColor},children:[v,C,I]})]})}import{useMemo as lb}from"react";import{jsx as sb}from"react/jsx-runtime";function eD({sprint:e,tasks:o,todayStr:t,...n}){let r=e.status==="closed"?null:Ds(e.end_date,t),i=r!==null&&r>=0,a=lb(()=>{if(!i)return[];let c=Number(t.slice(0,4)),d=Number(e.end_date.slice(0,4))||c,p=[];for(let s=c;s<=Math.max(c,d);s+=1)p.push(s);return p},[i,t,e.end_date]),l=vt(a),u=i?_s(t,e.end_date,new Set(l.keys())):null;return sb(Os,{tasks:o,todayStr:t,dday:r,workdaysLeft:u,...n})}import{useEffect as hb,useRef as kb,useState as Tb}from"react";import{Box as ua}from"@mui/material";import{Children as cb}from"react";import{Box as ma,CircularProgress as mb}from"@mui/material";import{jsx as $r}from"react/jsx-runtime";var Ms={xs:2,md:3};function Es(){return $r(ma,{sx:{position:"fixed",top:"calc(50% + 30px)",left:"50%",transform:"translate(-50%, -50%)",zIndex:1},children:$r(mb,{size:44,thickness:4,sx:{color:"#94a3b8"}})})}function Ps({children:e}){return $r(ma,{sx:{minWidth:0,display:"flex",flexDirection:"column",gap:Ms,pb:Ms},children:cb.map(e,o=>o==null||o===!1?null:$r(ma,{sx:{bgcolor:"background.paper",borderRadius:"12px",boxShadow:"0 1px 3px rgba(15,23,42,0.08)",minWidth:0},children:o}))})}import{Box as pt,Button as fb,Checkbox as xb,Typography as Ot}from"@mui/material";import zs from"@mui/icons-material/CheckCircle";import gb from"@mui/icons-material/CheckCircleOutlineOutlined";import{Fragment as db,jsx as Rs}from"react/jsx-runtime";var ub="taskbox-search-highlight";function pb(e,o){let t=o?.keyPrefix??"hl";return e.map((n,r)=>Rs("span",{className:n.highlight?o?.highlightClassName??ub:o?.className,style:n.highlight?{fontWeight:700,color:"#2563eb"}:void 0,children:n.text},`${t}-${n.text}-${r}`))}function Kr({text:e,keyword:o,fallback:t="-",className:n,highlightClassName:r,keyPrefix:i}){let a=String(e??"").trim()||t,l=yr(a,o);return Rs(db,{children:pb(l,{className:n,highlightClassName:r,keyPrefix:i})})}import{jsx as ge,jsxs as bn}from"react/jsx-runtime";var bb={flexShrink:0,minWidth:64,textAlign:"center",px:.75,py:.35,borderRadius:.75,bgcolor:"#f1f5f9",color:"#64748b",fontSize:po(12.5),fontWeight:500,lineHeight:1.4},ut={fontSize:po(14.5),color:"#374151",minWidth:0,lineHeight:1.45};function Yo({label:e,children:o}){return bn(pt,{sx:{display:"flex",alignItems:"flex-start",gap:1,minWidth:0},children:[ge(pt,{sx:bb,children:e}),ge(pt,{sx:{...ut,flex:1,pt:.2},children:o})]})}function qs({task:e,statusOptions:o,projectLabel:t,searchText:n,todayStr:r,onRequestToggleCompleted:i,onOpenDetail:a,onTaskContextMenu:l,targetSummary:u="",ackInfo:c,completeLocked:d=!1,unread:p=!1,noticeReadOnly:s=!1,onAckConfirm:m,onAckListClick:x,myManaged:B=!1}){let b=e.is_event?An(e):fo(e),h=Vo(e.start_date),f=Vo(e.due_date),T=!e.is_notice&&!e.completed&&!!e.due_date&&e.due_date<r,g=(e.receiver_names??[]).filter(Boolean);return bn(pt,{role:"button",tabIndex:0,onClick:()=>a(e),onKeyDown:v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),a(e))},onContextMenu:v=>l(e,v),sx:{display:"flex",flexDirection:"column",gap:.75,minWidth:0,p:1.25,cursor:"pointer",position:"relative"},children:[B?ge(pt,{sx:{position:"absolute",left:3,top:5,bottom:5,width:3,borderRadius:"999px",bgcolor:"#2f80ed"}}):null,bn(pt,{sx:{display:"flex",alignItems:"flex-start",gap:.75,minWidth:0,mb:1},children:[!s&&!d?ge(xb,{checked:e.completed,icon:ge(gb,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:ge(zs,{sx:{fontSize:22,color:"#2f80ed"}}),onClick:v=>v.stopPropagation(),onChange:(v,C)=>i({anchorEl:v.currentTarget,taskSeq:e.seq,nextCompleted:C}),sx:{p:0,mt:.1,flexShrink:0}}):null,(()=>{let v=Oe(e.icon||(e.is_notice?Mo:_e));if(!v)return null;let C=e.icon_color||(e.is_notice?"#e5484d":"#1e3a8a");return ge(v,{sx:{fontSize:19,flexShrink:0,mt:"1px",color:C}})})(),ge(Ot,{sx:{fontSize:po(16),fontWeight:600,lineHeight:1.35,minWidth:0,flex:1,color:e.completed?"#9a9a97":"#111827",textDecoration:e.completed?"line-through":"none"},children:ge(Kr,{text:e.title,keyword:n})}),p?ge(pt,{component:"span",sx:{flexShrink:0,px:.55,fontSize:po(10.5),fontWeight:700,lineHeight:1.6,color:"#fff",bgcolor:"#e5484d",borderRadius:"4px"},children:"N"}):null]}),bn(pt,{sx:{display:"flex",flexDirection:"column",gap:.6,minWidth:0},children:[ge(Yo,{label:b?"\uC0C1\uD0DC":"\uC911\uC694\uB3C4",children:bn(pt,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:.5},children:[b?ge(we,{option:b,small:!0}):null,ge(Eo,{priority:e.priority,small:!0})]})}),(e.label_keys??[]).length>0?ge(Yo,{label:"\uB77C\uBCA8",children:ge(Tt,{labelKeys:e.label_keys,labelOptions:o})}):null,t?ge(Yo,{label:"\uD504\uB85C\uC81D\uD2B8",children:ge(Ot,{sx:ut,children:t})}):null,h?ge(Yo,{label:"\uC2DC\uC791",children:ge(Ot,{sx:ut,children:h})}):null,f?ge(Yo,{label:"\uB9C8\uAC10",children:bn(Ot,{sx:{...ut,color:T?"#e5484d":ut.color,fontWeight:T?600:400},children:[f,T?" \xB7 \uC9C0\uC5F0":""]})}):null,e.is_notice?ge(Yo,{label:"\uB300\uC0C1\uC790",children:ge(Ot,{sx:ut,children:u||"\uBAA8\uB4E0 \uC9C1\uC6D0"})}):null,e.is_notice&&c?ge(Yo,{label:"\uD655\uC778",children:ge(fb,{size:"small",variant:c.canAck?"contained":"outlined",color:"inherit",startIcon:c.acked?ge(zs,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:v=>{v.stopPropagation(),c.canAck?m?.(e):x?.(e,v.currentTarget)},sx:{py:0,px:1.25,minWidth:0,fontSize:po(13),...c.canAck?{color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}}:{bgcolor:"#fff",borderColor:"#d5d8dc"}},children:c.canAck?"\uD655\uC778":`${c.count}/${c.total}`})}):null,!e.is_notice&&e.manager_name?ge(Yo,{label:"\uCC45\uC784\uC790",children:ge(Ot,{sx:ut,children:ge(Kr,{text:e.manager_name,keyword:n})})}):null,!e.is_notice&&g.length>0?ge(Yo,{label:"\uCC38\uC870\uC790",children:ge(Ot,{sx:ut,children:g.join(", ")})}):null,e.note?ge(Yo,{label:"\uBE44\uACE0",children:ge(Ot,{sx:ut,children:ge(Kr,{text:e.note,keyword:n})})}):null]})]})}import{jsx as hn,jsxs as yb}from"react/jsx-runtime";function _D({tasks:e,statusOptions:o,customTabs:t,loading:n,searchText:r,todayStr:i,onToggleCompleted:a,onOpenDetail:l,onTaskContextMenu:u,getTargetSummary:c,getAckInfo:d,getNoticeReadOnly:p,isTaskUnread:s,getCompleteLocked:m,onAckConfirm:x,onAckListClick:B,onEndReached:b,myAccountSeq:h=0}){let f=new Map(t.map(C=>[C.key,C.label])),[T,g]=Tb(null),v=kb(null);return hb(()=>{let C=v.current;if(!b||!C)return;let I=new IntersectionObserver(M=>{M[0]?.isIntersecting&&b()});return I.observe(C),()=>I.disconnect()},[b,e.length]),e.length===0?n?hn(Es,{}):hn(ua,{sx:{py:6,textAlign:"center",color:"#94a3b8",fontSize:"0.9rem"},children:"\uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):yb(ua,{sx:{minWidth:0},children:[hn(Ps,{children:e.map(C=>hn(qs,{myManaged:h>0&&!C.is_notice&&!C.is_event&&(C.manager_account_seq??0)===h,task:C,statusOptions:o,projectLabel:C.tab_key?f.get(C.tab_key)??"":"",searchText:r,todayStr:i,onRequestToggleCompleted:g,onOpenDetail:l,onTaskContextMenu:u,targetSummary:C.is_notice?c?.(C):void 0,ackInfo:C.is_notice?d?.(C):void 0,noticeReadOnly:C.is_notice?p?.(C):!1,unread:s?.(C)??!1,completeLocked:m?.(C)??!1,onAckConfirm:x,onAckListClick:B},C.seq))}),b?hn(ua,{ref:v,sx:{height:"1px"}}):null,hn(Ue,{open:!!T,anchorEl:T?.anchorEl??null,title:T?.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:T?.nextCompleted?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>g(null),onConfirm:()=>{T&&a(T.taskSeq,T.nextCompleted),g(null)}})]})}import{useEffect as pk,useRef as dk,useState as dc}from"react";import{Box as Qn,Button as fc,Divider as fk,Drawer as xk,IconButton as va,Tooltip as gk}from"@mui/material";import bk from"@mui/icons-material/Close";import hk from"@mui/icons-material/ArrowBack";import kk from"@ehfuse/overlay-scrollbar";import{Box as pa,ButtonBase as Sb,Divider as Bb,Popover as Cb}from"@mui/material";import vb from"@mui/icons-material/Check";import Ib from"@ehfuse/overlay-scrollbar";import{jsx as Vt,jsxs as Ls}from"react/jsx-runtime";var As=["#1e3a8a","#2f80ed","#06b6d4","#0fa3a3","#2f9e5b","#84cc16","#e8a33d","#d9730d","#e5484d","#e255a1","#a355c0","#8a5a2b","#57564f","#111827"];function Ur({anchorEl:e,value:o,color:t="",onSelect:n,onSelectColor:r,onClose:i}){return Vt(Cb,{transitionDuration:0,open:!!e,anchorEl:e,onClose:i,anchorOrigin:{vertical:"bottom",horizontal:"left"},marginThreshold:16,slotProps:{paper:{sx:{mt:1,maxHeight:"calc(100dvh - 96px)"}}},children:Ls(pa,{sx:{width:"min(492px, calc(100vw - 32px))"},children:[Vt(Ib,{style:{maxHeight:"min(432px, calc(100dvh - 240px))"},contentStyle:{minWidth:0,padding:10},thumb:{width:6},children:Vt(Ir,{value:o||_e,onChange:a=>{n(a),i()}})}),r?Ls(pa,{sx:{px:1.25,pb:1.25},children:[Vt(Bb,{sx:{mb:1,borderColor:"#efefed"}}),Vt(pa,{sx:{display:"flex",flexWrap:"wrap",gap:.75},children:As.map(a=>{let l=(t||As[0])===a;return Vt(Sb,{"aria-label":`\uC544\uC774\uCF58 \uC0C9 ${a}`,onClick:()=>r(a),sx:{width:26,height:26,borderRadius:"50%",bgcolor:a,display:"flex",alignItems:"center",justifyContent:"center"},children:l?Vt(vb,{sx:{fontSize:15,color:"#ffffff"}}):null},a)})})]}):null]})})}import{useState as mc}from"react";import{Box as Yn,ButtonBase as tk,Divider as jn,Menu as nk,MenuItem as rk}from"@mui/material";import ik from"@mui/icons-material/SubjectOutlined";import ak from"@mui/icons-material/StickyNote2Outlined";import lk from"@mui/icons-material/LabelOutlined";import sk from"@mui/icons-material/DirectionsRunOutlined";import ck from"@mui/icons-material/SpeedOutlined";import{TextField as mk}from"@ehfuse/mui-form-controls";import{InfoAlert as uk}from"@ehfuse/alerts";import{useState as Mt}from"react";import{Box as Gs,Divider as Ub,ListItemIcon as Vb,Menu as xa,MenuItem as Un}from"@mui/material";import Gb from"@mui/icons-material/Add";import Gr from"@mui/icons-material/Check";import Yb from"@mui/icons-material/ViewKanbanOutlined";import jb from"@mui/icons-material/CalendarTodayOutlined";import Xb from"@mui/icons-material/EventOutlined";import Qb from"@mui/icons-material/PersonOutlineOutlined";import $s from"@mui/icons-material/PeopleAltOutlined";import Jb from"@mui/icons-material/FlagOutlined";import Ks from"@mui/icons-material/TimerOutlined";import Zb from"@mui/icons-material/NotificationsNoneOutlined";import eh from"@mui/icons-material/InboxOutlined";import oh from"@mui/icons-material/PlaceOutlined";import th from"@mui/icons-material/MapOutlined";import{DatePicker as nh,TimePicker as Us}from"@ehfuse/mui-datetime-picker";var jo="@media (max-width: 719.95px)";function so(e){return{[jo]:{order:e}}}import{useEffect as _b,useState as wb}from"react";import{Box as Db}from"@mui/material";import{jsx as Ob}from"react/jsx-runtime";function dt({value:e,placeholder:o,readOnly:t,onCommit:n}){let r=le(),[i,a]=wb(e);return _b(()=>a(e),[e]),Ob(Db,{component:"input",spellCheck:!1,value:i,readOnly:t,placeholder:o,onChange:l=>a(l.target.value),onBlur:()=>{i.trim()!==e&&n(i.trim())},onKeyDown:l=>{l.key==="Enter"&&l.target.blur()},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:14,color:r.colors.textPrimary,caretColor:r.colors.textPrimary,bgcolor:"transparent",p:0,"&::placeholder":{color:"#9a9a97"}}})}import{Box as da}from"@mui/material";import{jsx as Mb,jsxs as Ns}from"react/jsx-runtime";function xe({icon:e,label:o,onClick:t,sx:n,children:r}){return Ns(da,{sx:[{display:"flex",alignItems:"center",minHeight:26,[jo]:{minHeight:25}},...Array.isArray(n)?n:[n]],children:[Ns(da,{sx:{display:"flex",alignItems:"center",gap:1,width:104,flexShrink:0,fontSize:13.5,color:"#787774"},children:[e,o]}),Mb(da,{onClick:t?i=>t(i.currentTarget):void 0,sx:{flex:1,minWidth:0,display:"flex",alignItems:"center",gap:.5,px:1,py:.25,borderRadius:1,fontSize:14,cursor:t?"pointer":"default","&:hover":t?{bgcolor:"#f2f2f0"}:void 0,[jo]:{py:.25}},children:r})]})}import{Suspense as Eb,lazy as Pb,useEffect as Rb,useState as Fs}from"react";import{Box as fa,Dialog as zb,DialogContent as qb,DialogTitle as Ab,IconButton as Hs,Tooltip as Lb}from"@mui/material";import Nb from"@mui/icons-material/Close";import Fb from"@mui/icons-material/Search";import{Fragment as Kb,jsx as qo,jsxs as Vr}from"react/jsx-runtime";function Hb(e){return qo(fa,{sx:{p:3,fontSize:14,color:"#9a9a97"},children:"\uC8FC\uC18C \uAC80\uC0C9 \uBAA8\uB4C8(react-daum-postcode)\uC744 \uBD88\uB7EC\uC62C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uC8FC\uC18C\uB97C \uC9C1\uC811 \uC785\uB825\uD574 \uC8FC\uC138\uC694."})}var Wb=Pb(()=>import("react-daum-postcode").then(e=>({default:e.default})).catch(()=>({default:Hb})));function $b(e){if(e.addressType!=="R")return e.address;let o="";return e.bname!==""&&/[동|로|가]$/g.test(e.bname)&&(o+=e.bname),e.buildingName!==""&&e.apartment==="Y"&&(o+=o!==""?`, ${e.buildingName}`:e.buildingName),o!==""?`${e.address} (${o})`:e.address}function Ws({value:e,placeholder:o="\uC8FC\uC18C \uC785\uB825",readOnly:t,onCommit:n}){let[r,i]=Fs(e),[a,l]=Fs(!1),u=yo().slots?.addressSearch;Rb(()=>i(e),[e]);let c=p=>{i(p),l(!1),p!==e&&n(p)};return Vr(Kb,{children:[Vr(fa,{sx:{display:"flex",alignItems:"center",gap:.5,flex:1,minWidth:0},children:[qo(fa,{component:"input",spellCheck:!1,value:r,readOnly:t,placeholder:o,onChange:p=>i(p.target.value),onBlur:()=>{a||r.trim()!==e&&n(r.trim())},onKeyDown:p=>{p.key==="Enter"&&(p.preventDefault(),!t&&l(!0))},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:14,color:"#37352f",bgcolor:"transparent",p:0,"&::placeholder":{color:"#9a9a97"}}}),t?null:qo(Lb,{title:"\uC8FC\uC18C \uAC80\uC0C9",arrow:!0,children:qo(Hs,{tabIndex:-1,size:"small","aria-label":"\uC8FC\uC18C \uAC80\uC0C9",onClick:()=>l(!0),sx:{color:"#9a9a97",p:.25,flexShrink:0},children:qo(Fb,{sx:{fontSize:17}})})})]}),u?qo(u,{open:a,onComplete:c,onClose:()=>l(!1)}):Vr(zb,{open:a,onClose:()=>l(!1),maxWidth:"sm",fullWidth:!0,slotProps:{paper:{sx:{height:550}}},children:[Vr(Ab,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",pr:2},children:["\uC8FC\uC18C \uAC80\uC0C9",qo(Hs,{onClick:()=>l(!1),size:"small",children:qo(Nb,{})})]}),qo(qb,{style:{padding:0},dividers:!0,children:a?qo(Eb,{fallback:null,children:qo(Wb,{onComplete:p=>{c($b(p))},onClose:()=>l(!1),defaultQuery:r,style:{width:"100%",height:"100%"}})}):null})]})]})}import{Fragment as Yr,jsx as Y,jsxs as Ao}from"react/jsx-runtime";function rh(e){let o=e?new Date(`${e}T00:00:00`):new Date;return Number.isNaN(o.getTime())?new Date:o}function Vs(e){let[o="00",t="00"]=String(e??"").split(":");return{hour:/^\d{2}$/.test(o)?o:"00",minute:/^\d{2}$/.test(t)?t:"00"}}function Gt({label:e="\uBE44\uC5B4 \uC788\uC74C"}){return Y(Gs,{component:"span",sx:{color:"#9a9a97"},children:e})}function jr({values:e,customTabs:o,avatarSrcByName:t,showEstimatedTime:n=!1,managerLocked:r=!1,notice:i=!1,event:a=!1,readOnly:l=!1,targetSummary:u="",narrowCollapsedSx:c,reminderLocked:d=!1,managerAction:p,hideProject:s=!1,leading:m,trailing:x,onChangeProject:B,onChangeStartDate:b,onChangeDueDate:h,onChangeReminder:f,onChangePriority:T,onChangeEstimatedTime:g,onChangeEventTime:v,onChangeEventPlace:C,onChangeEventAddress:I,onMemberEdit:M,onAddProject:Q}){let[E,te]=Mt(null),[w,y]=Mt(!1),[H,N]=Mt(null),[$,P]=Mt(null),[oe,pe]=Mt(null),[A,W]=Mt(null),[K,F]=Mt(null),[O,L]=Mt(null),X=He(),J=Uo(),ue=R=>[so(R),...c?Array.isArray(c)?c:[c]:[]],Z=o.find(R=>R.key===e.tabKey),ye=o.filter(R=>!R.archived);return Ao(Yr,{children:[Ao(Gs,{sx:{display:"grid",gridTemplateColumns:"repeat(2, minmax(0, 1fr))",columnGap:3,rowGap:.25,px:2,[jo]:{gridTemplateColumns:"minmax(0, 1fr)"}},children:[m,s?null:Y(xe,{icon:Y(Yb,{sx:{fontSize:17}}),label:"\uD504\uB85C\uC81D\uD2B8",onClick:l?void 0:R=>te(R),sx:ue(1),children:Z?(()=>{let R=Oe(Z.icon);return Ao(Yr,{children:[R?Y(R,{sx:{fontSize:16,color:"#1e3a8a"}}):null,Z.label]})})():"\uAE30\uBCF8"}),i?Y(xe,{icon:Y($s,{sx:{fontSize:17}}),label:"\uB300\uC0C1\uC790",onClick:l?void 0:()=>M("targets"),sx:so(7),children:u||"\uBAA8\uB4E0 \uC9C1\uC6D0"}):null,!i&&!a?Y(xe,{icon:Y(Qb,{sx:{fontSize:17}}),label:"\uCC45\uC784\uC790",onClick:r||l||!e.managerName&&p?void 0:()=>M("manager"),sx:so(7),children:e.managerName?Ao(Yr,{children:[Y(xo,{names:[e.managerName],size:20,avatarSrcByName:t}),e.managerName]}):p??Y(Gt,{})}):null,a?null:Y(xe,{icon:Y(jb,{sx:{fontSize:17}}),label:"\uC2DC\uC791\uC77C\uC790",onClick:l?void 0:R=>pe(R),sx:so(2),children:e.startDate?Vo(e.startDate):Y(Gt,{})}),i?null:Y(xe,{icon:Y($s,{sx:{fontSize:17}}),label:a?"\uCC38\uC11D\uC790":"\uCC38\uC870\uC790",onClick:l?void 0:()=>M("receivers"),sx:so(a?7:8),children:e.receiverNames.length>0?Ao(Yr,{children:[Y(xo,{names:e.receiverNames,size:20,avatarSrcByName:t}),e.receiverNames.length===1?e.receiverNames[0]:null]}):Y(Gt,{})}),Y(xe,{icon:Y(Xb,{sx:{fontSize:17}}),label:a?"\uB0A0\uC9DC":"\uB9C8\uAC10\uAE30\uD55C",onClick:l?void 0:R=>W(R),sx:so(3),children:e.dueDate?Vo(e.dueDate):Y(Gt,{})}),a?Y(xe,{icon:Y(Ks,{sx:{fontSize:17}}),label:"\uC2DC\uAC01",onClick:l?void 0:R=>L(R),sx:so(4),children:e.eventTime?e.eventTime:Y(Gt,{label:"\uC885\uC77C"})}):null,a?Y(xe,{icon:Y(oh,{sx:{fontSize:17}}),label:"\uC7A5\uC18C",sx:so(5),children:Y(dt,{value:e.eventPlace??"",placeholder:"\uC7A5\uC18C \uC785\uB825",readOnly:l,onCommit:R=>C?.(R)})}):null,n?Y(xe,{icon:Y(Ks,{sx:{fontSize:17}}),label:"\uC608\uC0C1\uC2DC\uAC04",onClick:l?void 0:R=>F(R),sx:ue(4),children:e.estimatedTime?e.estimatedTime:Y(Gt,{})}):null,Y(xe,{icon:Y(Zb,{sx:{fontSize:17}}),label:"\uB9AC\uB9C8\uC778\uB354",onClick:l||d?void 0:R=>P(R),sx:ue(a?8:5),children:e.reminder==="none"?Y(Gt,{label:"\uC5C6\uC74C"}):Ki(e.reminder)}),a?Y(xe,{icon:Y(th,{sx:{fontSize:17}}),label:"\uC8FC\uC18C",sx:[{gridColumn:"1 / -1"},so(6)],children:Y(Ws,{value:e.eventAddress??"",placeholder:"\uC8FC\uC18C \uC785\uB825",readOnly:l,onCommit:R=>I?.(R)})}):null,a?null:Y(xe,{icon:Y(Jb,{sx:{fontSize:17}}),label:"\uC911\uC694\uB3C4",onClick:l?void 0:R=>N(R),sx:ue(6),children:Y(Eo,{priority:e.priority,small:!0})}),x]}),Ao(xa,{transitionDuration:0,anchorEl:E,open:!!E,onClose:()=>te(null),...J,children:[Ao(Un,{selected:!e.tabKey,onClick:()=>{B(""),te(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[Y(eh,{sx:{fontSize:17,color:"#9a9a97"}}),"\uC5C6\uC74C",e.tabKey?null:Y(Gr,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}})]}),ye.map(R=>{let k=Oe(R.icon),ne=e.tabKey===R.key;return Ao(Un,{selected:ne,onClick:()=>{B(R.key),te(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[k?Y(k,{sx:{fontSize:17,color:"#1e3a8a"}}):null,R.label,ne?Y(Gr,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},R.key)}),Q?[Y(Ub,{},"add-project-divider"),Ao(Un,{onClick:()=>y(!0),sx:{fontSize:14,color:"#787774"},children:[Y(Vb,{children:Y(Gb,{sx:{fontSize:18,color:"#787774"}})}),"\uD504\uB85C\uC81D\uD2B8 \uCD94\uAC00"]},"add-project")]:null]}),Q?Y(_r,{open:w,onClose:()=>y(!1),onSubmit:(R,k,ne)=>{(async()=>{let re=await Q(R,k,ne);re&&B(re)})(),te(null)}}):null,Y(xa,{transitionDuration:0,anchorEl:H,open:!!H,onClose:()=>N(null),...J,children:["high","medium","low"].map(R=>Ao(Un,{selected:e.priority===R,onClick:()=>{T(R),N(null)},sx:{fontSize:14,minWidth:130,gap:1},children:[Y(Eo,{priority:R,small:!0}),e.priority===R?Y(Gr,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},R))}),Y(xa,{transitionDuration:0,anchorEl:$,open:!!$,onClose:()=>P(null),...J,children:$i(a&&!!e.eventTime).map(R=>Ao(Un,{selected:e.reminder===R.value,onClick:()=>{f(R.value),P(null)},sx:{fontSize:14,minWidth:150,gap:1},children:[R.label,e.reminder===R.value?Y(Gr,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},R.value))}),n?Y(Us,{anchorEl:K,open:!!K,onClose:()=>F(null),value:Vs(e.estimatedTime),format:"HH:mm",minuteStep:5,autoApply:!0,centered:X,locale:"ko",onChange:(R,k)=>{g?.(`${R}:${k}`),F(null)}}):null,a?Y(Us,{anchorEl:O,open:!!O,onClose:()=>L(null),value:Vs(e.eventTime),format:"HH:mm",minuteStep:10,autoApply:!0,centered:X,locale:"ko",onChange:(R,k)=>{v?.(`${R}:${k}`),L(null)}}):null,Y(nh,{anchorEl:oe,open:!!oe,onClose:()=>pe(null),selectedDate:rh(e.startDate),centered:X,onDateChange:R=>{b(qe(R)),pe(null)}}),Y(St,{anchorEl:A,open:!!A,date:e.dueDate,reminder:e.reminder,hideReminder:d,centered:X,onClose:()=>W(null),onDateChange:h,onReminderChange:f})]})}import{useState as ih}from"react";import{Box as ah,Menu as lh,MenuItem as sh}from"@mui/material";import ch from"@mui/icons-material/RepeatOutlined";import mh from"@mui/icons-material/DevicesOutlined";import uh from"@mui/icons-material/ScreenSearchDesktopOutlined";import ph from"@mui/icons-material/SellOutlined";import dh from"@mui/icons-material/TaskAltOutlined";import{Fragment as Ys,jsx as Ye,jsxs as js}from"react/jsx-runtime";function ga({label:e="\uBE44\uC5B4 \uC788\uC74C"}){return Ye(ah,{component:"span",sx:{color:"#9a9a97"},children:e})}function Xr({values:e,readOnly:o=!1,showResolution:t=!1,onChangeRepro:n,onChangeDevice:r,onChangeWhere:i,onChangeVersion:a,onChangeResolution:l}){let[u,c]=ih(null),d=u?.field==="repro"?Bi:u?.field==="device"?Ci:vi,p=s=>{u?.field==="repro"?n(s):u?.field==="device"?r(s):u?.field==="resolution"&&l?.(s),c(null)};return js(Ys,{children:[js(Ys,{children:[Ye(xe,{icon:Ye(ch,{sx:{fontSize:17}}),label:"\uC7AC\uD604\uBE48\uB3C4",onClick:o?void 0:s=>c({field:"repro",el:s}),children:gl(e.repro)||Ye(ga,{label:"\uC120\uD0DD"})}),Ye(xe,{icon:Ye(mh,{sx:{fontSize:17}}),label:"\uB514\uBC14\uC774\uC2A4",onClick:o?void 0:s=>c({field:"device",el:s}),children:bl(e.device)||Ye(ga,{label:"\uC120\uD0DD"})}),Ye(xe,{icon:Ye(uh,{sx:{fontSize:17}}),label:"\uBC1C\uC0DD\uD654\uBA74",children:Ye(dt,{value:e.where,placeholder:"\uC608: POS > \uC8FC\uBB38\uD604\uD669",readOnly:o,onCommit:i})}),Ye(xe,{icon:Ye(ph,{sx:{fontSize:17}}),label:"\uBC1C\uC0DD\uBC84\uC804",children:Ye(dt,{value:e.version,placeholder:"\uC608: 2026-08-06 \uBC30\uD3EC",readOnly:o,onCommit:a})}),t?Ye(xe,{icon:Ye(dh,{sx:{fontSize:17}}),label:"\uC885\uB8CC\uC0AC\uC720",onClick:o?void 0:s=>c({field:"resolution",el:s}),children:ur(e.resolution)||Ye(ga,{label:"\uC120\uD0DD"})}):null]}),Ye(lh,{open:!!u,anchorEl:u?.el??null,onClose:()=>c(null),transitionDuration:0,children:d.map(s=>Ye(sh,{onClick:()=>p(s.key),sx:{fontSize:14},children:s.name},s.key))})]})}import{Box as Xs}from"@mui/material";import{jsxs as Qs}from"react/jsx-runtime";function _o({icon:e,title:o,titleExtra:t,children:n}){return Qs(Xs,{sx:{px:2,display:"flex",flexDirection:"column",gap:.25},children:[Qs(Xs,{sx:{display:"flex",alignItems:"center",gap:1,fontSize:14.5,fontWeight:500,color:"#37352f"},children:[e,o,t]}),n]})}import{useEffect as fh,useRef as ba,useState as xh}from"react";import{Box as ha,IconButton as gh,Tooltip as bh}from"@mui/material";import hh from"@mui/icons-material/ContentCopyOutlined";import kh from"@mui/icons-material/Check";import{EhfuseEditor as Th,minimalToolbarOptions as yh}from"@ehfuse/editor";import{jsx as Yt,jsxs as Bh}from"react/jsx-runtime";function ka(e){let o=e.trim();return o?o.startsWith("<")?e:`<p>${o}</p>`:"<p></p>"}function Sh(e){let o=e.replace(/<br\s*\/?>/gi,`
|
|
1
|
+
var Mn="waiting",sr="replied";import{createContext as xm,useContext as gm,useMemo as nl}from"react";import{Box as bm}from"@mui/material";var fi="--app-mobile-font-offset";function po(e,o=0){return`calc(${e}px + max(0px, var(${fi}, 0px) - ${o}px))`}import{jsx as tl}from"react/jsx-runtime";var rl=xm({});function hm({config:e,children:o}){let t=nl(()=>e??{},[e]),n=t.mobileFontOffsetPx;return tl(rl.Provider,{value:t,children:n===void 0?o:tl(bm,{sx:{display:"contents",[fi]:`${n}px`},children:o})})}function yo(){return gm(rl)}function xi(){let{buildFileUrl:e}=yo();return nl(()=>e||((o,t)=>{let n=[];return t?.thumb&&n.push(`thumb=${t.thumb}`),t?.download&&n.push("download=1"),`/api/v1/files/${o}${n.length?`?${n.join("&")}`:""}`}),[e])}function En(){let{uploadMaxMb:e}=yo();return e??50}import{useGlobalForm as tp}from"@ehfuse/forma";import il from"@mui/icons-material/DoNotDisturbAltOutlined";import al from"@mui/icons-material/BookmarkBorderOutlined";import km from"@mui/icons-material/LabelOutlined";import Tm from"@mui/icons-material/FlagOutlined";import ym from"@mui/icons-material/StarBorderOutlined";import Sm from"@mui/icons-material/FolderOutlined";import Bm from"@mui/icons-material/EventOutlined";import Cm from"@mui/icons-material/BuildOutlined";import vm from"@mui/icons-material/LocalShippingOutlined";import Im from"@mui/icons-material/StorefrontOutlined";import _m from"@mui/icons-material/GroupsOutlined";import wm from"@mui/icons-material/LightbulbOutlined";import Dm from"@mui/icons-material/FavoriteBorderOutlined";import Om from"@mui/icons-material/AssignmentOutlined";import Mm from"@mui/icons-material/HomeOutlined";import Em from"@mui/icons-material/WorkOutline";import Pm from"@mui/icons-material/SchoolOutlined";import Rm from"@mui/icons-material/LocalHospitalOutlined";import zm from"@mui/icons-material/RestaurantOutlined";import qm from"@mui/icons-material/LocalFloristOutlined";import Am from"@mui/icons-material/DirectionsCarOutlined";import Lm from"@mui/icons-material/CampaignOutlined";import Nm from"@mui/icons-material/SavingsOutlined";import Fm from"@mui/icons-material/Inventory2Outlined";import Hm from"@mui/icons-material/CleaningServicesOutlined";import ll from"@mui/icons-material/HandymanOutlined";import Wm from"@mui/icons-material/LocalPhoneOutlined";import $m from"@mui/icons-material/EmailOutlined";import Km from"@mui/icons-material/ShoppingCartOutlined";import Um from"@mui/icons-material/BarChartOutlined";import Vm from"@mui/icons-material/PrintOutlined";import Gm from"@mui/icons-material/SecurityOutlined";import Ym from"@mui/icons-material/AlarmOutlined";import jm from"@mui/icons-material/AttachFileOutlined";import Xm from"@mui/icons-material/PhotoCameraOutlined";import Qm from"@mui/icons-material/ImageOutlined";import Jm from"@mui/icons-material/MenuBookOutlined";import Zm from"@mui/icons-material/EditOutlined";import eu from"@mui/icons-material/KeyOutlined";import ou from"@mui/icons-material/LockOutlined";import tu from"@mui/icons-material/LockOpenOutlined";import nu from"@mui/icons-material/SettingsOutlined";import ru from"@mui/icons-material/CloudOutlined";import iu from"@mui/icons-material/WifiOutlined";import au from"@mui/icons-material/ComputerOutlined";import lu from"@mui/icons-material/SmartphoneOutlined";import su from"@mui/icons-material/TvOutlined";import cu from"@mui/icons-material/AccessTimeOutlined";import mu from"@mui/icons-material/TimerOutlined";import uu from"@mui/icons-material/MapOutlined";import du from"@mui/icons-material/PlaceOutlined";import pu from"@mui/icons-material/NavigationOutlined";import fu from"@mui/icons-material/FlightOutlined";import xu from"@mui/icons-material/TrainOutlined";import gu from"@mui/icons-material/DirectionsBusOutlined";import bu from"@mui/icons-material/DirectionsBikeOutlined";import hu from"@mui/icons-material/DirectionsWalkOutlined";import ku from"@mui/icons-material/DirectionsRunOutlined";import Tu from"@mui/icons-material/FitnessCenterOutlined";import yu from"@mui/icons-material/SportsSoccerOutlined";import Su from"@mui/icons-material/EmojiEventsOutlined";import Bu from"@mui/icons-material/CardGiftcardOutlined";import Cu from"@mui/icons-material/CakeOutlined";import sl from"@mui/icons-material/CoffeeOutlined";import vu from"@mui/icons-material/LocalPizzaOutlined";import Iu from"@mui/icons-material/ShoppingBagOutlined";import cl from"@mui/icons-material/CreditCardOutlined";import _u from"@mui/icons-material/AccountBalanceOutlined";import wu from"@mui/icons-material/AccountBalanceWalletOutlined";import Du from"@mui/icons-material/AttachMoneyOutlined";import Ou from"@mui/icons-material/ReceiptLongOutlined";import Mu from"@mui/icons-material/CalculateOutlined";import Eu from"@mui/icons-material/TrendingUpOutlined";import Pu from"@mui/icons-material/ListAltOutlined";import Ru from"@mui/icons-material/TaskAltOutlined";import zu from"@mui/icons-material/DoneAllOutlined";import qu from"@mui/icons-material/WarningAmberOutlined";import Au from"@mui/icons-material/InfoOutlined";import Lu from"@mui/icons-material/HelpOutlined";import Nu from"@mui/icons-material/SupportAgentOutlined";import Fu from"@mui/icons-material/PersonOutlined";import Hu from"@mui/icons-material/PersonAddOutlined";import Wu from"@mui/icons-material/BadgeOutlined";import $u from"@mui/icons-material/WbSunnyOutlined";import Ku from"@mui/icons-material/DarkModeOutlined";import Uu from"@mui/icons-material/LocalFireDepartmentOutlined";import Vu from"@mui/icons-material/WaterDropOutlined";import Gu from"@mui/icons-material/BoltOutlined";import Yu from"@mui/icons-material/AutorenewOutlined";import ju from"@mui/icons-material/ScienceOutlined";import Xu from"@mui/icons-material/MedicalServicesOutlined";import Qu from"@mui/icons-material/NotificationsOutlined";import Ju from"@mui/icons-material/SendOutlined";import Zu from"@mui/icons-material/LinkOutlined";import ed from"@mui/icons-material/PublicOutlined";import ml from"@mui/icons-material/ApartmentOutlined";import od from"@mui/icons-material/PlumbingOutlined";import td from"@mui/icons-material/ElectricalServicesOutlined";import nd from"@mui/icons-material/ChatOutlined";import rd from"@mui/icons-material/DescriptionOutlined";import id from"@mui/icons-material/FactCheckOutlined";import ad from"@mui/icons-material/RocketLaunchOutlined";import ld from"@mui/icons-material/PaletteOutlined";import sd from"@mui/icons-material/MusicNoteOutlined";import cd from"@mui/icons-material/VideocamOutlined";import md from"@mui/icons-material/ThumbUpOutlined";import ud from"@mui/icons-material/PushPinOutlined";import dd from"@mui/icons-material/SearchOutlined";import pd from"@mui/icons-material/VisibilityOutlined";import fd from"@mui/icons-material/VerifiedOutlined";import xd from"@mui/icons-material/TrackChangesOutlined";import gd from"@mui/icons-material/ExtensionOutlined";import bd from"@mui/icons-material/CodeOutlined";import hd from"@mui/icons-material/BugReportOutlined";import kd from"@mui/icons-material/SmartToyOutlined";import Td from"@mui/icons-material/StorageOutlined";import yd from"@mui/icons-material/QrCode2Outlined";import Sd from"@mui/icons-material/FileDownloadOutlined";import Bd from"@mui/icons-material/FileUploadOutlined";import Cd from"@mui/icons-material/MicOutlined";import vd from"@mui/icons-material/HeadphonesOutlined";import Id from"@mui/icons-material/MovieOutlined";import _d from"@mui/icons-material/SportsEsportsOutlined";import wd from"@mui/icons-material/BrushOutlined";import Dd from"@mui/icons-material/ArchitectureOutlined";import Od from"@mui/icons-material/EngineeringOutlined";import Md from"@mui/icons-material/FactoryOutlined";import Ed from"@mui/icons-material/AgricultureOutlined";import Pd from"@mui/icons-material/DirectionsBoatOutlined";import Rd from"@mui/icons-material/TwoWheelerOutlined";import zd from"@mui/icons-material/HandshakeOutlined";import qd from"@mui/icons-material/GavelOutlined";import Ad from"@mui/icons-material/BalanceOutlined";import Ld from"@mui/icons-material/TranslateOutlined";import Nd from"@mui/icons-material/PsychologyOutlined";import Fd from"@mui/icons-material/PetsOutlined";import Hd from"@mui/icons-material/CelebrationOutlined";import Wd from"@mui/icons-material/BeachAccessOutlined";import $d from"@mui/icons-material/AcUnitOutlined";import Kd from"@mui/icons-material/ForestOutlined";import Ud from"@mui/icons-material/LandscapeOutlined";import Vd from"@mui/icons-material/HotelOutlined";import Gd from"@mui/icons-material/LocalLaundryServiceOutlined";import Yd from"@mui/icons-material/ChairOutlined";import jd from"@mui/icons-material/LocalBarOutlined";import Xd from"@mui/icons-material/LunchDiningOutlined";import Qd from"@mui/icons-material/IcecreamOutlined";import Jd from"@mui/icons-material/WorkspacePremiumOutlined";import Zd from"@mui/icons-material/DiamondOutlined";import ep from"@mui/icons-material/VaccinesOutlined";var gi="bookmark",_e="label",Mo="notifications",Pn="warning",Rn="#e53e3e",ul="none",bi=[{key:ul,Icon:il},{key:"label",Icon:km},{key:"bookmark",Icon:al},{key:"flag",Icon:Tm},{key:"star",Icon:ym},{key:"folder",Icon:Sm},{key:"event",Icon:Bm},{key:"build",Icon:Cm},{key:"shipping",Icon:vm},{key:"store",Icon:Im},{key:"groups",Icon:_m},{key:"idea",Icon:wm},{key:"heart",Icon:Dm},{key:"assignment",Icon:Om},{key:"home",Icon:Mm},{key:"work",Icon:Em},{key:"school",Icon:Pm},{key:"hospital",Icon:Rm},{key:"restaurant",Icon:zm},{key:"flower",Icon:qm},{key:"car",Icon:Am},{key:"campaign",Icon:Lm},{key:"savings",Icon:Nm},{key:"inventory",Icon:Fm},{key:"cleaning",Icon:Hm},{key:"handyman",Icon:ll},{key:"phone",Icon:Wm},{key:"email",Icon:$m},{key:"cart",Icon:Km},{key:"chart",Icon:Um},{key:"print",Icon:Vm},{key:"security",Icon:Gm},{key:"alarm",Icon:Ym},{key:"attach",Icon:jm},{key:"camera",Icon:Xm},{key:"image",Icon:Qm},{key:"book",Icon:Jm},{key:"edit",Icon:Zm},{key:"key",Icon:eu},{key:"lock",Icon:ou},{key:"unlock",Icon:tu},{key:"settings",Icon:nu},{key:"cloud",Icon:ru},{key:"wifi",Icon:iu},{key:"computer",Icon:au},{key:"smartphone",Icon:lu},{key:"tv",Icon:su},{key:"clock",Icon:cu},{key:"timer",Icon:mu},{key:"map",Icon:uu},{key:"place",Icon:du},{key:"navigation",Icon:pu},{key:"flight",Icon:fu},{key:"train",Icon:xu},{key:"bus",Icon:gu},{key:"bike",Icon:bu},{key:"walk",Icon:hu},{key:"run",Icon:ku},{key:"fitness",Icon:Tu},{key:"soccer",Icon:yu},{key:"trophy",Icon:Su},{key:"gift",Icon:Bu},{key:"cake",Icon:Cu},{key:"coffee",Icon:sl},{key:"pizza",Icon:vu},{key:"bag",Icon:Iu},{key:"card",Icon:cl},{key:"bank",Icon:_u},{key:"wallet",Icon:wu},{key:"money",Icon:Du},{key:"receipt",Icon:Ou},{key:"calculate",Icon:Mu},{key:"trending",Icon:Eu},{key:"listalt",Icon:Pu},{key:"task",Icon:Ru},{key:"doneall",Icon:zu},{key:"warning",Icon:qu},{key:"info",Icon:Au},{key:"help",Icon:Lu},{key:"support",Icon:Nu},{key:"person",Icon:Fu},{key:"personadd",Icon:Hu},{key:"badge",Icon:Wu},{key:"sun",Icon:$u},{key:"moon",Icon:Ku},{key:"fire",Icon:Uu},{key:"water",Icon:Vu},{key:"bolt",Icon:Gu},{key:"renew",Icon:Yu},{key:"science",Icon:ju},{key:"medical",Icon:Xu},{key:"notifications",Icon:Qu},{key:"send",Icon:Ju},{key:"link",Icon:Zu},{key:"public",Icon:ed},{key:"apartment",Icon:ml},{key:"plumbing",Icon:od},{key:"electrical",Icon:td},{key:"chat",Icon:nd},{key:"description",Icon:rd},{key:"factcheck",Icon:id},{key:"rocket",Icon:ad},{key:"palette",Icon:ld},{key:"music",Icon:sd},{key:"video",Icon:cd},{key:"thumbup",Icon:md},{key:"pin",Icon:ud},{key:"search",Icon:dd},{key:"eye",Icon:pd},{key:"verified",Icon:fd},{key:"target",Icon:xd},{key:"extension",Icon:gd},{key:"code",Icon:bd},{key:"bug",Icon:hd},{key:"robot",Icon:kd},{key:"storage",Icon:Td},{key:"qrcode",Icon:yd},{key:"download",Icon:Sd},{key:"upload",Icon:Bd},{key:"mic",Icon:Cd},{key:"headphones",Icon:vd},{key:"movie",Icon:Id},{key:"game",Icon:_d},{key:"brush",Icon:wd},{key:"architecture",Icon:Dd},{key:"engineering",Icon:Od},{key:"factory",Icon:Md},{key:"agriculture",Icon:Ed},{key:"boat",Icon:Pd},{key:"motorcycle",Icon:Rd},{key:"handshake",Icon:zd},{key:"gavel",Icon:qd},{key:"balance",Icon:Ad},{key:"translate",Icon:Ld},{key:"psychology",Icon:Nd},{key:"pets",Icon:Fd},{key:"celebration",Icon:Hd},{key:"beach",Icon:Wd},{key:"snow",Icon:$d},{key:"forest",Icon:Kd},{key:"mountain",Icon:Ud},{key:"hotel",Icon:Vd},{key:"laundry",Icon:Gd},{key:"chair",Icon:Yd},{key:"bar",Icon:jd},{key:"burger",Icon:Xd},{key:"icecream",Icon:Qd},{key:"medal",Icon:Jd},{key:"diamond",Icon:Zd},{key:"vaccine",Icon:ep}],op={cafe:sl,payment:cl,business:ml,construction:ll};function Oe(e){return e===ul?null:bi.find(o=>o.key===e)?.Icon??op[String(e??"")]??al}function cr(e){return Oe(e)??il}var hi={title:"",icon:_e,icon_color:"",manager_name:"",manager_account_seq:0,receiver_names:[],receiver_account_seqs:[],is_notice:!1,is_event:!1,is_bug:!1,is_open:!1,bug_repro:"",bug_device:"",bug_where:"",bug_version:"",sprint_seq:0,story_points:0,event_time:"",event_place:"",event_address:"",target_names:[],target_account_seqs:[],start_date:"",due_date:"",reminder:"none",priority:"medium",label_keys:[],note:"",content:"",checklist:[],tab_key:""},ki={createAttachmentFiles:[],createSubmitting:!1,attachmentUpload:null};function np(e){let{formId:o="taskbox-create-form",initialValues:t,onValidate:n,onSubmit:r}=e;return tp({formId:o,initialValues:{...hi,...t},onValidate:n,onSubmit:r})}import{useGlobalFormaState as rp}from"@ehfuse/forma";var dl="taskbox-ui-state";function et(){return rp({stateId:dl,initialValues:ki})}import{useMemo as ip}from"react";import{useTheme as ap}from"@mui/material";function ln(e,o){let t=Math.max(0,Math.min(1,o));if(t<=0)return"transparent";let n=e.trim().replace("#",""),r=n.length===3?n.split("").map(u=>u+u).join(""):n;if(!/^[0-9a-fA-F]{6}$/.test(r))return e;let i=Number.parseInt(r.slice(0,2),16),a=Number.parseInt(r.slice(2,4),16),l=Number.parseInt(r.slice(4,6),16);return`rgba(${i}, ${a}, ${l}, ${t})`}function Ti(e,o){let t=Math.max(0,Math.min(1,o)),n=e.trim().replace("#",""),r=n.length===3?n.split("").map(c=>c+c).join(""):n;if(!/^[0-9a-fA-F]{6}$/.test(r))return e;let i=c=>Math.round(c+(255-c)*t),a=i(Number.parseInt(r.slice(0,2),16)),l=i(Number.parseInt(r.slice(2,4),16)),u=i(Number.parseInt(r.slice(4,6),16));return`#${[a,l,u].map(c=>c.toString(16).padStart(2,"0")).join("")}`}function yi(e,o,t){return t==="dark"?{accent:e,accentContrast:o,accentSoft:"#1d2b45",accentOnSurface:Ti(e,.45),danger:"#f87171",dangerSoft:"#3a1f22",success:"#4ade80",warning:"#fbbf24",textStrong:"#f8fafc",textPrimary:"#e2e8f0",textSecondary:"#a3adbb",textMuted:"#77808d",textInverse:"#0f1216",surface:"#161a1f",surfaceSubtle:"#1e232a",surfaceHover:"#272d36",border:"#2c333c",borderStrong:"#3b434e"}:{accent:e,accentContrast:o,accentSoft:"#eef4ff",accentOnSurface:e,danger:"#e5484d",dangerSoft:"#fdebec",success:"#16a34a",warning:"#e8a33d",textStrong:"#000000",textPrimary:"#37352f",textSecondary:"#787774",textMuted:"#9a9a97",textInverse:"#ffffff",surface:"#ffffff",surfaceSubtle:"#fafaf9",surfaceHover:"#f4f4f2",border:"#e6e6e3",borderStrong:"#dedddb"}}function lp(e,o){let t=o==="dark";return{bg:t?Ti(e.accent,.45):e.accent,color:t?e.textInverse:e.accentContrast,border:"none",fontSize:11.5,fontWeight:600,minWidth:20,width:34,borderRadius:999,paddingX:.6}}function pl(e,o){return{...e,...o??{}}}function mr(e,o="light"){let t=lp(e,o),n=e.accentOnSurface;return{mode:o,colors:e,table:{bg:e.surface,borderColor:e.borderStrong,headerBg:e.surface,headerColor:e.textSecondary,headerActiveColor:e.textStrong,headerFilteredColor:n,headerFontSize:13,rowBg:e.surface,rowColor:e.textPrimary,rowSubColor:e.textSecondary,rowTitleColor:e.textStrong,rowTitleFontWeight:o==="dark"?400:500,rowHoverBg:e.surfaceHover,rowBorderColor:e.border,cellHoverBg:e.surfaceHover,emptyColor:e.textMuted,groupHeader:{bg:e.surfaceSubtle,hoverBg:e.surfaceHover,borderColor:e.border,labelColor:o==="dark"?e.textStrong:e.textPrimary,labelFontSize:15.5,labelFontWeight:o==="dark"?400:700,minHeight:48,badge:{...t,borderRadius:4,width:34}}},board:{columnBg:e.surfaceSubtle,columnHeaderColor:e.textPrimary,columnHeaderFontSize:13.5,badge:{...t,borderRadius:4,width:34}},summary:{gaugeTrackColor:o==="dark"?e.borderStrong:"#ececea",gaugeBarColor:n,gaugeCompleteColor:e.success,gaugeHeight:6,numberColor:n,overdueColor:e.danger,textColor:e.textStrong},actionButton:{bg:e.accent,color:e.accentContrast,hoverBg:e.accent},tabs:{bg:o==="dark"?e.surfaceSubtle:e.surface,color:o==="dark"?e.textSecondary:e.textStrong,hoverBg:e.surfaceHover,borderColor:o==="dark"?e.border:e.borderStrong,selectedBg:o==="dark"?e.surfaceHover:e.textStrong,selectedColor:o==="dark"?e.textStrong:e.surface},calendar:{bg:e.surface,borderColor:e.border,headerBg:e.surfaceSubtle,headerColor:e.textSecondary,cellBg:e.surface,dateBandBg:e.surface,otherMonthBg:e.surfaceSubtle,todayBg:e.accentSoft,hoverBg:e.surfaceHover,dateColor:e.textPrimary,holidayColor:e.danger},card:{bg:o==="dark"?e.surfaceSubtle:e.surface,borderColor:e.border,hoverBg:e.surfaceHover,titleColor:e.textPrimary,subColor:e.textSecondary},timeline:{bg:e.surface,gridColor:e.border,headerBg:e.surfaceSubtle,headerColor:e.textSecondary,todayLineColor:e.accentOnSurface,barColor:e.accentOnSurface,overdueBarColor:e.danger},avatar:{ringColor:o==="dark"?e.textStrong:e.accent,separatorColor:e.surface},chip:{borderRadius:.75,fontSize:13,fontWeight:500,plainColor:o==="dark"?e.textSecondary:"#57564f",plainDotColor:e.textMuted,darkBgAlpha:.15,darkTextSource:"dot"}}}function Si(e,o){if(!o)return e;let t=o.mode??e.mode,r={...t===e.mode?e.colors:yi(e.colors.accent,e.colors.accentContrast,t),...o.colors??{}},i=mr(r,t),{groupHeader:a,...l}=o.table??{},{badge:u,...c}=o.board??{},{badge:p,...d}=a??{};return{mode:t,colors:r,table:{...i.table,...l,groupHeader:{...i.table.groupHeader,...d,badge:pl(i.table.groupHeader.badge,p)}},board:{...i.board,...c,badge:pl(i.board.badge,u)},summary:{...i.summary,...o.summary??{}},chip:{...i.chip,...o.chip??{}},actionButton:{...i.actionButton,...o.actionButton??{}},tabs:{...i.tabs,...o.tabs??{}},avatar:{...i.avatar,...o.avatar??{}},calendar:{...i.calendar,...o.calendar??{}},card:{...i.card,...o.card??{}},timeline:{...i.timeline,...o.timeline??{}}}}function sp(e={}){let{mode:o="light",accent:t="#2563eb",accentContrast:n="#ffffff",input:r}=e;return Si(mr(yi(t,n,o),o),r)}function le(){let e=ap(),{theme:o}=yo(),t=e.palette.primary.main,n=e.palette.primary.contrastText,r=e.palette.mode==="dark"?"dark":"light";return ip(()=>Si(mr(yi(t,n,r),r),o),[t,n,r,o])}import{useCallback as rt,useEffect as Fl,useMemo as Hn,useRef as Af,useState as it}from"react";import{Box as Po,Divider as Lf,ListItemIcon as Nf,Menu as Hl,MenuItem as wr}from"@mui/material";import Ff from"@mui/icons-material/Add";import Hf from"@mui/icons-material/ArrowUpward";import Wf from"@mui/icons-material/ArrowDownward";import $f from"@mui/icons-material/KeyboardArrowDown";import Kf from"@mui/icons-material/KeyboardArrowRight";import Yi from"@mui/icons-material/Check";import Uf from"@mui/icons-material/FilterList";import Vf from"@mui/icons-material/InboxOutlined";import{Virtuoso as Wl}from"react-virtuoso";import Gf from"@ehfuse/overlay-scrollbar";import{DatePicker as Yf}from"@ehfuse/mui-datetime-picker";function cp(e){let o=String(e??"").trim().replace("T"," "),t=o.match(/^(\d{4})-(\d{2})-(\d{2})(?:[ ](\d{2}):(\d{2})(?::(\d{2}))?)?/);return t?new Date(Number(t[1]),Number(t[2])-1,Number(t[3]),Number(t[4]??0),Number(t[5]??0),Number(t[6]??0)):new Date(o)}function qe(e,o="YYYY-MM-DD"){let t=typeof e=="string"?cp(e):e;if(!e||e===""||isNaN(t.getTime()))return"";let n=t.getFullYear(),r=(t.getMonth()+1).toString().padStart(2,"0"),i=t.getDate().toString().padStart(2,"0"),a=n.toString().slice(-2);switch(o){case"YYYY-MM-DD":return`${n}-${r}-${i}`;case"YY.MM.DD":return`${a}.${r}.${i}`;case"MM/DD/YYYY":return`${r}/${i}/${n}`;case"DD.MM.YYYY":return`${i}.${r}.${n}`;case"YYYYMMDD":return`${n}${r}${i}`;default:return o.replace(/YYYY/g,n.toString()).replace(/YY/g,a).replace(/MM/g,r).replace(/DD/g,i)}}import{Box as fl}from"@mui/material";import{jsx as up,jsxs as dp}from"react/jsx-runtime";var mp={high:{label:"\uB192\uC74C",dot:"#e5484d",bgcolor:"#fdebec",color:"#c4554d"},medium:{label:"\uC911\uAC04",dot:"#2f80ed",bgcolor:"#e3eefb",color:"#1d4f91"},low:{label:"\uB0AE\uC74C",dot:"#9a9a97",bgcolor:"#efefed",color:"#57564f"}};function Eo({priority:e,small:o=!1,plain:t=!1}){let n=mp[e],r=le(),i=r.mode==="dark",a=t||e==="low";return dp(fl,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:o?.5:.75,px:a?0:o?.9:1.25,py:a?0:o?.25:.5,borderRadius:.75,fontSize:o?11.5:13,fontWeight:500,bgcolor:a?"transparent":i?ln(n.dot,r.chip.darkBgAlpha):n.bgcolor,color:a?i?r.chip.plainColor:n.color:i?r.chip.darkTextSource==="fg"?n.color:n.dot:n.color,whiteSpace:"nowrap"},children:[up(fl,{component:"span",sx:{width:o?6:8,height:o?6:8,borderRadius:"50%",bgcolor:n.dot}}),n.label]})}import{Menu as bp,MenuItem as hp}from"@mui/material";import kp from"@mui/icons-material/Check";function Uo(){return{}}var Bi=[{key:"always",name:"\uD56D\uC0C1"},{key:"often",name:"\uC790\uC8FC"},{key:"sometimes",name:"\uAC00\uB054"},{key:"once",name:"1\uD68C"},{key:"unable",name:"\uC7AC\uD604\uBD88\uAC00"}],Ci=[{key:"desktop",name:"\uB370\uC2A4\uD06C\uD1B1"},{key:"tablet",name:"\uD0DC\uBE14\uB9BF"},{key:"mobile",name:"\uD734\uB300\uD3F0"}],vi=[{key:"fixed",name:"\uC218\uC815\uC644\uB8CC"},{key:"duplicate",name:"\uC911\uBCF5"},{key:"cannot_reproduce",name:"\uC7AC\uD604\uBD88\uAC00"},{key:"by_design",name:"\uC0AC\uC591\uB300\uB85C"},{key:"wont_fix",name:"\uC548 \uACE0\uCE68"}];function xl(e){return Bi.find(o=>o.key===e)?.name??""}function gl(e){return Ci.find(o=>o.key===e)?.name??""}function ur(e){return vi.find(o=>o.key===e)?.name??""}function Ii(e,o=new Date){if(!e.is_event)return!1;let t=String(e.due_date??"").trim().slice(0,10);if(!/^\d{4}-\d{2}-\d{2}$/.test(t))return!1;let n=String(e.event_time??"").trim();if(/^\d{2}:\d{2}$/.test(n)){let i=new Date(`${t}T${n}:00`);return!Number.isNaN(i.getTime())&&i.getTime()<=o.getTime()}let r=new Date(`${t}T00:00:00`);return Number.isNaN(r.getTime())?!1:(r.setDate(r.getDate()+1),r.getTime()<=o.getTime())}function dr(e,o=new Date){return e.is_event?Ii(e,o):!!e.completed}var zt=[{key:"not_started",name:"\uC2DC\uC791\uC804",bg:"#efefed",fg:"#57564f",dot:"#9a9a97"},{key:"in_progress",name:"\uC9C4\uD589\uC911",bg:"#dcf2e3",fg:"#1f6b3a",dot:"#2f9e5b"},{key:"hold",name:"\uBCF4\uB958",bg:"#fbeee0",fg:"#8a5a2b",dot:"#d9730d"},{key:Mn,name:"\uD655\uC778\uC911",bg:"#faf1d7",fg:"#8a6d1d",dot:"#e8a33d"},{key:sr,name:"\uD655\uC778\uC644\uB8CC",bg:"#e3eefb",fg:"#1d4f91",dot:"#2f80ed"}],qn=zt.filter(e=>e.key!==Mn&&e.key!==sr);function pr(e){return zt.find(o=>o.key===e)??zt[0]}var _i={key:"completed",name:"\uC644\uB8CC",bg:"#e3eefb",fg:"#1d4f91",dot:"#2f80ed"};function fo(e){if(e.is_notice)return bl(e.status);if(e.is_bug&&e.completed){let o=ur(e.resolution)||"\uC644\uB8CC";return{..._i,name:o}}return e.completed?_i:e.is_bug?fp(e.status):pr(e.status)}var pp={key:"event_ended",name:"\uC885\uB8CC",bg:"#efefed",fg:"#57564f",dot:"#9a9a97"};function An(e){return Ii(e)?pp:null}var zn=[{key:"notice_scheduled",name:"\uAC8C\uC2DC\uC608\uC815",bg:"#faf1d7",fg:"#8a6d1d",dot:"#e8a33d"},{key:"notice_active",name:"\uAC8C\uC2DC\uC911",bg:"#dcf2e3",fg:"#1f6b3a",dot:"#2f9e5b"},{key:"notice_closed",name:"\uC885\uB8CC",bg:"#efefed",fg:"#57564f",dot:"#9a9a97"}];function bl(e){return zn.find(o=>o.key===e)??zn[1]}var wi="__closed__",qt=[{key:"bug_received",name:"\uC811\uC218",bg:"#fdeaea",fg:"#9b2c2c",dot:"#e53e3e"},{key:"bug_confirmed",name:"\uD655\uC778\uC911",bg:"#faf1d7",fg:"#8a6d1d",dot:"#e8a33d"},{key:"bug_in_progress",name:"\uC9C4\uD589\uC911",bg:"#dcf2e3",fg:"#1f6b3a",dot:"#2f9e5b"},{key:"bug_hold",name:"\uBCF4\uB958",bg:"#efefed",fg:"#57564f",dot:"#9a9a97"}],PC=[...qt.filter(e=>e.key!=="bug_hold"),{key:wi,name:"\uC644\uB8CC",bg:"#e3eefb",fg:"#1d4f91",dot:"#2f80ed"},...qt.filter(e=>e.key==="bug_hold")];function fp(e){return qt.find(o=>o.key===e)??qt[0]}function hl(e){return e.is_notice?zn:e.is_bug?qt:qn}function Di(e){return e.status===Mn}var xp={in_progress:0,[Mn]:1,not_started:2,hold:3,[sr]:4};function RC(e){return e.completed?9:xp[String(e.status??"")]??2}function kt(e,o){let t=new Map(o.map(r=>[r.key,r])),n=(e.label_keys??[]).map(r=>t.get(r)).filter(r=>!!r);if(e.is_event){let r=An({is_event:!0,due_date:String(e.due_date??""),event_time:e.event_time});return r?[r,...n]:n}return e.is_notice?String(e.status??"")==="notice_active"?n:[bl(e.status),...n]:e.is_bug?[fo({...e,is_notice:!1}),...n]:e.completed?[_i,...n]:[pr(e.status),...n]}function kl(e){return{bg:`${e}1f`,fg:e,dot:e}}function fr(e,o){return e.includes(o)?e.filter(t=>t!==o):[...e,o]}import{Box as xr}from"@mui/material";import{jsx as Ln,jsxs as gp}from"react/jsx-runtime";function we({option:e,small:o=!1}){let t=le(),n=t.mode==="dark",r=e.key==="not_started";return gp(xr,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:o?.5:.75,px:r?0:o?.9:1.25,py:r?0:o?.25:.5,borderRadius:1.25,fontSize:o?11.5:13,fontWeight:500,bgcolor:r?"transparent":n?ln(e.dot,t.chip.darkBgAlpha):e.bg,color:r?n?t.chip.plainColor:e.fg:n?t.chip.darkTextSource==="fg"?e.fg:e.dot:e.fg,whiteSpace:"nowrap"},children:[Ln(xr,{component:"span",sx:{width:o?6:8,height:o?6:8,borderRadius:"50%",bgcolor:e.dot,flexShrink:0}}),e.name]})}function FC({task:e,statusOptions:o,small:t=!1}){let n=kt(e,o);return n.length===0?null:Ln(xr,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:.5},children:n.map(r=>Ln(we,{option:r,small:t},r.key))})}function Tt({labelKeys:e,labelOptions:o}){let t=new Map(o.map(r=>[r.key,r])),n=e.map(r=>t.get(r)).filter(r=>!!r);return n.length===0?null:Ln(xr,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:.5},children:n.map(r=>Ln(we,{option:r,small:!0},r.key))})}import{jsx as Oi,jsxs as Tp}from"react/jsx-runtime";function gr({anchorEl:e,value:o,options:t=zt,onSelect:n,onClose:r}){let i=Uo();return Oi(bp,{anchorEl:e,open:!!e,onClose:r,transitionDuration:0,...i,children:t.map(a=>Tp(hp,{onClick:()=>{n(a.key),r()},sx:{fontSize:14,minWidth:150,gap:1},children:[Oi(we,{option:a}),o===a.key?Oi(kp,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},a.key))})}function br(e,o){if(o<=0)return!1;if(e.is_notice){if((e.author_account_seq??0)===o)return!0;let t=(e.target_account_seqs??[]).filter(n=>n>0);return t.length===0||t.includes(o)}return Mi(e)?!0:(e.author_account_seq??0)===o||(e.manager_account_seq??0)===o||(e.receiver_account_seqs??[]).includes(o)}function Mi(e){return e.is_notice||!e.is_open||e.completed||e.archived?!1:(e.manager_account_seq??0)===0}function hr(e,o){return o<=0?!1:Mi(e)}function kr(e,o){return o<=0||e.is_notice||e.is_event||e.completed||e.archived||(e.manager_account_seq??0)>0||Mi(e)?!1:(e.receiver_account_seqs??[]).includes(o)||(e.author_account_seq??0)===o}function Tl(e){return!!e.is_bug&&(e.manager_account_seq??0)===0&&e.status==="bug_received"}function ot(e,o){return o<=0?!1:e.is_notice?(e.author_account_seq??0)===o:(e.author_account_seq??0)===o||(e.manager_account_seq??0)===o||(e.receiver_account_seqs??[]).includes(o)}var XC=[119,121,141,143];var Ei=[{value:"due",label:"\uADF8\uB8F9 : \uB9C8\uAC10\uAE30\uD55C"},{value:"status",label:"\uADF8\uB8F9 : \uC0C1\uD0DC"},{value:"manager",label:"\uADF8\uB8F9 : \uCC45\uC784\uC790"},{value:"tab",label:"\uADF8\uB8F9 : \uD504\uB85C\uC81D\uD2B8"},{value:"none",label:"\uADF8\uB8F9 \uC5C6\uC74C"}];function yp(e){let o=new Date(`${e}T00:00:00`);return o.setDate(o.getDate()+(6-o.getDay())),qe(o)}var Sp=[{key:"overdue",label:"\uC9C0\uB0A8"},{key:"today",label:"\uC624\uB298"},{key:"this_week",label:"\uC774\uBC88 \uC8FC"},{key:"later",label:"\uC774\uD6C4"},{key:"no_due",label:"\uB9C8\uAC10 \uC5C6\uC74C"}];function Bp(e,o,t){let n=e.due_date.slice(0,10);return n?n<o?"overdue":n===o?"today":n<=t?"this_week":"later":"no_due"}function Pi(e,o,t,n=[],r=[],i="",a){let l=e.filter(s=>s.is_notice);if(l.length>0){let s=Pi(e.filter(m=>!m.is_notice),o,t,n,r,i,a);return[{key:"__notice__",label:"\uACF5\uC9C0\uC0AC\uD56D",tasks:l},...s]}let u=new Map,c=(s,m)=>{let f=u.get(s);f?f.push(m):u.set(s,[m])},p;if(o==="due"){let s=yp(t);for(let m of e)c(Bp(m,t,s),m);p=Sp}else if(o==="status"){for(let s of e)c(pr(s.status).key,s);p=zt.map(s=>({key:s.key,label:s.name}))}else if(o==="tab"){for(let s of e)c(s.tab_key?.trim()||"__none__",s);p=[...n.filter(s=>!s.archived).map(s=>({key:s.key,label:s.label})),{key:"__none__",label:"\uAE30\uBCF8 \uC5C5\uBB34\uD568"},...n.filter(s=>s.archived).map(s=>({key:s.key,label:`${s.label} (\uBCF4\uAD00\uB428)`}))]}else if(a?.enabled){let s=Number(a.myAccountSeq??0),m=i.trim();for(let f of e){if(!(Number(f.manager_account_seq??0)>0||String(f.manager_name??"").trim()!=="")){c("__none__",f);continue}let b=s>0&&Number(f.manager_account_seq??0)===s||!!m&&String(f.manager_name??"").trim()===m;c(b?"__manager__":"__reference__",f)}p=[{key:"__manager__",label:"\uCC45\uC784\uC790"},{key:"__none__",label:"\uCC45\uC784\uC790 \uBBF8\uBC30\uC815"},{key:"__reference__",label:"\uCC38\uC870\uC790"}]}else{for(let b of e)c(String(b.manager_name??"").trim()||"__none__",b);let s=i.trim(),m=[...u.keys()].filter(b=>b!=="__none__").sort((b,h)=>{if(s){if(b===s)return-1;if(h===s)return 1}return b.localeCompare(h)}),f=!!s&&m.includes(s),B=m.filter(b=>b!==s);p=[...f?[{key:s,label:"\uB0B4 \uC5C5\uBB34"}]:[],{key:"__none__",label:"\uCC45\uC784\uC790 \uBBF8\uBC30\uC815"},...B.map(b=>({key:b,label:b}))]}let d=[];for(let s of p){let m=u.get(s.key);!m||m.length===0||d.push({key:s.key,label:s.label,tasks:m})}return d}import Cp from"@mui/icons-material/NotesOutlined";import vp from"@mui/icons-material/AutorenewOutlined";import Ip from"@mui/icons-material/CalendarTodayOutlined";import _p from"@mui/icons-material/EventOutlined";import wp from"@mui/icons-material/PersonOutlineOutlined";import Sl from"@mui/icons-material/PeopleAltOutlined";import qi from"@mui/icons-material/CheckCircleOutlineOutlined";import Dp from"@mui/icons-material/FlagOutlined";import Op from"@mui/icons-material/AccessTimeOutlined";import Mp from"@mui/icons-material/StickyNote2Outlined";import Ep from"@mui/icons-material/ViewKanbanOutlined";import Pp from"@mui/icons-material/ConfirmationNumberOutlined";import{jsx as ao}from"react/jsx-runtime";var Rp={role_mark:"11px",completed:"44px",ticket_no:"100px",title:"minmax(220px, 1.8fr)",status:"110px",start_date:"110px",due_date:"120px",manager_name:"110px",receiver_names:"170px",targets:"170px",priority:"84px",ack:"104px",confirm:"100px",project:"150px",request:"100px",completed_time:"150px",note:"minmax(200px, 1.2fr)"};function Tr(e){return Ai(e).map(o=>Rp[o.id]).join(" ")}var zp={id:"completed_time",label:"\uC644\uB8CC\uC77C\uC2DC",icon:ao(Op,{sx:{fontSize:15}}),align:"center",sortable:!0},qp={id:"ticket_no",label:"\uD2F0\uCF13",icon:ao(Pp,{sx:{fontSize:15}}),align:"center"},Ap={id:"project",label:"\uD504\uB85C\uC81D\uD2B8",icon:ao(Ep,{sx:{fontSize:15}}),projectFilter:!0},Lp={id:"targets",label:"\uB300\uC0C1\uC790",icon:ao(Sl,{sx:{fontSize:15}})},yl={id:"priority",label:"\uC911\uC694\uB3C4",icon:ao(Dp,{sx:{fontSize:15}}),align:"center",priorityFilter:!0},Np={id:"ack",label:"\uD655\uC778",icon:ao(qi,{sx:{fontSize:15}}),align:"center",ackFilter:!0},Fp={id:"confirm",label:"\uD655\uC778",icon:ao(qi,{sx:{fontSize:15}}),align:"center",ackFilter:!0};function Ri(e){let o=e.findIndex(n=>n.id==="receiver_names"||n.id==="targets"),t=o>=0?o+1:e.findIndex(n=>n.id==="note");return t<0?[...e,yl]:[...e.slice(0,t),yl,...e.slice(t)]}function Ai(e){let{showProject:o=!1,showManager:t=!0,showActions:n=!0,showRequest:r=!0,notice:i=!1,bug:a=!1,confirmMode:l="none"}=e??{},u=d=>{if(!a)return d;let s=d.filter(B=>B.id!=="note"),m=s.findIndex(B=>B.id==="completed"),f=m>=0?m+1:0;return[...s.slice(0,f),qp,...s.slice(f)]};if(i)return u(Ri(zi.filter(d=>!["manager_name","receiver_names","request"].includes(d.id)).flatMap(d=>d.id==="due_date"?[d,Lp]:d.id==="note"?[Np,d]:[d])));let c=t?zi:zi.filter(d=>d.id!=="manager_name");if(n)r||(c=c.filter(d=>d.id!=="request"));else{c=c.filter(s=>s.id!=="request");let d=c.findIndex(s=>s.id==="note");c=[...c.slice(0,d),zp,...c.slice(d)]}if(l==="action"){let d=c.findIndex(s=>s.id==="note");c=[...c.slice(0,d),Fp,...c.slice(d)]}if(!o)return u(Ri(c));let p=c.findIndex(d=>d.id==="receiver_names");return u(Ri([...c.slice(0,p+1),Ap,...c.slice(p+1)]))}var zi=[{id:"role_mark",label:"",icon:null},{id:"completed",label:"\uC644\uB8CC",icon:null,align:"center"},{id:"title",label:"\uC81C\uBAA9",icon:ao(Cp,{sx:{fontSize:15}}),sortable:!0},{id:"status",label:"\uC0C1\uD0DC",icon:ao(vp,{sx:{fontSize:15}}),align:"center",statusFilter:!0},{id:"start_date",label:"\uC2DC\uC791\uC77C\uC790",icon:ao(Ip,{sx:{fontSize:15}}),align:"center",sortable:!0},{id:"due_date",label:"\uB9C8\uAC10\uAE30\uD55C",icon:ao(_p,{sx:{fontSize:15}}),align:"center",sortable:!0},{id:"manager_name",label:"\uCC45\uC784\uC790",icon:ao(wp,{sx:{fontSize:15}}),memberFilter:"manager"},{id:"receiver_names",label:"\uCC38\uC870\uC790",icon:ao(Sl,{sx:{fontSize:15}}),memberFilter:"receivers"},{id:"request",label:"\uD655\uC778",icon:ao(qi,{sx:{fontSize:15}}),align:"center",ackFilter:!0},{id:"note",label:"\uBE44\uACE0",icon:ao(Mp,{sx:{fontSize:15}})}];import{Button as Bl,ClickAwayListener as $p,Dialog as Kp,Paper as Up,Popper as Vp,Typography as Gp,Box as Yp}from"@mui/material";import{useMediaQuery as Hp,useTheme as Wp}from"@mui/material";function He(){let{isMobile:e}=yo(),o=Wp(),t=Hp(o.breakpoints.up("lg"));return e!==void 0?e:!t}import{Fragment as Xp,jsx as yt,jsxs as Cl}from"react/jsx-runtime";function jp({title:e,content:o,confirmText:t,cancelText:n,titleFontSize:r,actionFontSize:i,actionMinHeight:a,onCancel:l,onConfirm:u}){return Cl(Xp,{children:[yt(Gp,{component:"div",sx:{fontSize:r,fontWeight:700,color:"#0f172a",lineHeight:1.4},children:e}),o,Cl(Yp,{sx:{display:"flex",gap:2,justifyContent:"flex-end"},children:[yt(Bl,{size:"medium",variant:"outlined",color:"inherit",onClick:l,fullWidth:!0,sx:{fontSize:i,minHeight:a,fontWeight:700},children:n}),yt(Bl,{size:"medium",variant:"contained",color:"primary",onClick:u,fullWidth:!0,sx:{fontSize:i,minHeight:a,fontWeight:700},children:t})]})]})}function Ue({open:e,anchorEl:o,title:t="\uD655\uC778\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",content:n,confirmText:r="\uD655\uC778",cancelText:i="\uCDE8\uC18C",placement:a="top",minWidth:l=160,minHeight:u,titleFontSize:c=17,actionFontSize:p=16,actionMinHeight:d=44,zIndex:s=1300,onCancel:m,onConfirm:f}){let B=He(),b=yt(jp,{title:t,content:n,confirmText:r,cancelText:i,titleFontSize:c,actionFontSize:p,actionMinHeight:d,onCancel:m,onConfirm:f});return B?yt(Kp,{open:e,onClose:m,sx:{zIndex:s},slotProps:{paper:{sx:{p:3,display:"flex",flexDirection:"column",gap:3,minWidth:260}}},children:b}):yt(Vp,{open:e,anchorEl:o,placement:a,sx:{zIndex:s},children:yt($p,{onClickAway:m,children:yt(Up,{elevation:4,sx:{p:3,display:"flex",flexDirection:"column",gap:3,minWidth:l,minHeight:u,justifyContent:u?"space-between":"flex-start"},onClick:h=>h.stopPropagation(),onMouseDown:h=>h.stopPropagation(),children:b})})})}import{useEffect as cf,useRef as mf,useState as El}from"react";import{Box as be,Button as uf,Checkbox as df,Tooltip as Fi}from"@mui/material";import pf from"@mui/icons-material/AlarmOutlined";import ff from"@mui/icons-material/CheckCircle";import xf from"@mui/icons-material/CheckCircleOutlineOutlined";import{useEffect as Qp,useState as vl}from"react";import{Avatar as Il}from"@mui/material";import Jp from"@mui/icons-material/PersonOutlineOutlined";import{jsx as Ni}from"react/jsx-runtime";var Li=new Set,_l=e=>e.startsWith("data:")||e.startsWith("blob:");function sn({src:e,avatarSx:o,iconFontSize:t=40}){let[n,r]=vl(()=>e?_l(e)||Li.has(e):!1),[i,a]=vl(!1),l={position:"relative",overflow:"hidden",borderRadius:"15px"},u=o?[l,...Array.isArray(o)?o:[o]]:l;return Qp(()=>{a(!1),r(e?_l(e)||Li.has(e):!1)},[e]),!e||i?Ni(Il,{sx:u,children:Ni(Jp,{sx:{fontSize:t}})}):Ni(Il,{src:e,imgProps:{onLoad:()=>{Li.add(e),r(!0)},onError:()=>a(!0),style:n?void 0:{opacity:0}},sx:u})}var Zp=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),yr=(e,o)=>{if(!o||!o.trim())return[{text:e,highlight:!1}];try{let t=Zp(o.trim()),n=new RegExp(`(${t})`,"gi");return e.split(n).map(i=>i.toLowerCase()===o.trim().toLowerCase()?{text:i,highlight:!0}:{text:i,highlight:!1}).filter(i=>i.text)}catch{return[{text:e,highlight:!1}]}};var ef=["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"];function Vo(e){let o=String(e??"").trim().slice(0,10);if(!/^\d{4}-\d{2}-\d{2}$/.test(o))return"";let t=new Date(`${o}T00:00:00`);return Number.isNaN(t.getTime())?"":`${o.slice(2).replaceAll("-",".")} (${ef[t.getDay()]})`}function tt(e){let o=String(e??"").trim(),[t,n=""]=o.split(" "),r=Vo(t);return r?n?`${r} ${n.slice(0,5)}`:r:""}import{Box as wl,Tooltip as of}from"@mui/material";import{jsx as Sr}from"react/jsx-runtime";var cn=[{bgcolor:"#dbe7ff",color:"#24408e"},{bgcolor:"#ffe4d6",color:"#8a4b21"},{bgcolor:"#dcf2e3",color:"#1f6b3a"},{bgcolor:"#f3e3f7",color:"#6d2f80"},{bgcolor:"#fdf0cf",color:"#8a6d1d"},{bgcolor:"#e0f0f6",color:"#1d5f78"},{bgcolor:"#efe6dc",color:"#6b4a2b"}];function xo({names:e,size:o=22,ringFirst:t=!1,avatarSrcByName:n}){let r=le();return Sr(wl,{sx:{display:"flex",alignItems:"center"},children:e.map((i,a)=>{let l=t&&a===0;return Sr(of,{title:l?`\uCC45\uC784\uC790 \xB7 ${i}`:i,arrow:!0,children:Sr(wl,{sx:{ml:a===0?0:"-7px",zIndex:a,borderRadius:"50%",border:`2px solid ${l?r.avatar.ringColor:r.avatar.separatorColor}`,display:"inline-flex",...r.avatar.sx},children:Sr(sn,{src:n?.get(i)??"",avatarSx:{width:o,height:o,fontSize:Math.round(o/2),borderRadius:"50%",...cn[a%cn.length]},iconFontSize:Math.round(o*.6)})})},`${i}-${a}`)})})}import{Box as Dl,Button as Ml}from"@mui/material";import tf from"@mui/icons-material/CheckCircle";import{Fragment as af,jsx as Nn,jsxs as Ol}from"react/jsx-runtime";function nf(e){let o=e.mode==="dark";return{minWidth:0,width:"100%",px:1,py:.25,fontSize:13,color:e.table.rowColor,borderColor:e.colors.borderStrong,background:o?e.colors.surfaceHover:"linear-gradient(180deg, #ffffff 0%, #f6f7f9 100%)",whiteSpace:"nowrap","&:hover":{background:o?e.colors.surfaceSubtle:"linear-gradient(180deg, #fcfcfd 0%, #f0f2f4 100%)",borderColor:e.colors.borderStrong}}}function rf(e){return{minWidth:0,px:1.25,py:.25,fontSize:13,whiteSpace:"nowrap",color:e.actionButton.color,backgroundColor:e.actionButton.bg,backgroundImage:"none",boxShadow:"none","&:hover":{backgroundColor:e.actionButton.hoverBg,boxShadow:"none",filter:"brightness(1.08)"},...e.actionButton.sx}}function mn({onClick:e,children:o,fullWidth:t=!1,sx:n}){let r=le();return Nn(Ml,{size:"small",variant:"contained",color:"inherit",fullWidth:t,sx:[rf(r),...Array.isArray(n)?n:n?[n]:[]],onClick:i=>{i.stopPropagation(),e(i)},children:o})}function un({canConfirm:e,count:o,total:t,myConfirmed:n=!1,onConfirm:r,onShowList:i}){let a=le(),l=nf(a);return e?Nn(mn,{onClick:()=>r(),children:"\uD655\uC778"}):Ol(Ml,{size:"small",variant:"outlined",color:"inherit",sx:l,onClick:u=>{u.stopPropagation(),i(u.currentTarget)},children:[n?Nn(tf,{sx:{fontSize:16,color:"#2f80ed",flexShrink:0}}):null,Nn(Dl,{component:"span",sx:{flex:1,textAlign:"center",minWidth:0},children:t>0&&o>=t?"\uC644\uB8CC":Ol(af,{children:[o,Nn(Dl,{component:"span",sx:{mx:.15},children:"/"}),t]})})]})}import{SvgIcon as lf}from"@mui/material";import{jsx as Br,jsxs as sf}from"react/jsx-runtime";function Cr({sx:e,...o}){return sf(lf,{viewBox:"0 0 48 48",...o,sx:{fill:"none",...e},children:[Br("path",{d:"M24,6C13.23,6,4.5,12.93,4.5,21.46c0,5.39,3.5,10.13,8.79,12.89l-1.76,7.06a.46.46,0,0,0,.68.51L21,36.7a24,24,0,0,0,3,.2c10.77,0,19.5-6.91,19.5-15.44S34.77,6,24,6Z",fill:"none",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),Br("circle",{cx:"23.91",cy:"21.46",r:"2.71",fill:"currentColor",stroke:"none"}),Br("circle",{cx:"33.65",cy:"21.46",r:"2.71",fill:"currentColor",stroke:"none"}),Br("circle",{cx:"14.18",cy:"21.46",r:"2.71",fill:"currentColor",stroke:"none"})]})}import{Fragment as Wi,jsx as U,jsxs as dn}from"react/jsx-runtime";function Pl(e){let o=String(e??"").trim();return o?o.slice(2,10).replaceAll("-","."):"-"}function Hi(e,o){let t=String(e??"").trim()||"-";return yr(t,o).map((n,r)=>U("span",{className:n.highlight?"font-semibold text-blue-600":void 0,children:n.text},`${n.text}-${r}`))}function vr({names:e,searchText:o,avatarSrcByName:t,emphasize:n=!1}){let r=e.filter(i=>i.trim());if(r.length===0)return null;if(r.length===1){let i=r[0]??"";return dn(Wi,{children:[U(sn,{src:t?.get(i)??"",avatarSx:{width:24,height:24,borderRadius:"50%",...cn[0]},iconFontSize:15}),U(be,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...n?{fontWeight:500,color:"#2f80ed"}:{}},children:Hi(i,o)})]})}return U(xo,{names:r,size:22,avatarSrcByName:t})}function Rl({display:e,summary:o,searchText:t,avatarSrcByName:n}){if(!e||e.kind==="everyone")return U(be,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:o||"\uBAA8\uB4E0 \uC9C1\uC6D0"});let{teamNames:r,individualNames:i}=e;if(r.length===0)return U(vr,{names:i,searchText:t,avatarSrcByName:n});let a=[...r,...i],l=a.join(", ");return a.length>2?U(Fi,{title:l,arrow:!0,children:U(be,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:`${a[0]}, ${a[1]} \uC678 ${a.length-2}\uBA85`})}):U(Fi,{title:l,arrow:!0,children:dn(be,{sx:{display:"flex",alignItems:"center",gap:.75,minWidth:0},children:[U(be,{component:"span",sx:{flexShrink:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:r.join(", ")+(i.length>0?",":"")}),i.length>0?U(vr,{names:i,searchText:t,avatarSrcByName:n}):null]})})}function zl({task:e,statusOptions:o,avatarSrcByName:t,searchText:n,myAccountSeq:r=0,todayStr:i,showProject:a=!1,showManager:l=!0,showActions:u=!0,showRequest:c=!0,confirmMode:p="none",bugMode:d=!1,confirmInfo:s,onConfirmTask:m,projectLabel:f="",projectIcon:B="",onProjectClick:b,onRequestToggleCompleted:h,onDateClick:x,onChangeNote:T,onMemberClick:g,onClaimClick:v,onVolunteerClick:C,onStatusClick:I,onOpenDetail:M,onTaskContextMenu:Q,hideBottomBorder:E=!1,completeLocked:te=!1,unread:w=!1,notice:y=!1,noticeReadOnly:H=!1,noteLocked:N=!1,targetSummary:$="",targetDisplay:P,onArchiveTask:oe,ackInfo:de,onAckConfirm:A,onAckListClick:W,onPriorityClick:K}){let[F,O]=El(!1),[L,X]=El(""),J=mf(null);cf(()=>{if(!F)return;let V=Ee=>{let Xe=J.current;Xe&&(Ee.target instanceof Node&&Xe.contains(Ee.target)||Xe.blur())};return document.addEventListener("mousedown",V,!0),document.addEventListener("touchstart",V,!0),()=>{document.removeEventListener("mousedown",V,!0),document.removeEventListener("touchstart",V,!0)}},[F]);let ue=[e.manager_account_seq??0,...e.receiver_account_seqs??[]].some(V=>V>0&&V!==(e.author_account_seq??0)),Z=H,ye=r>0&&!e.is_notice&&!e.is_event&&(e.manager_account_seq??0)===r,R=Z||!!e.is_notice,k=le(),ne=!!v&&hr(e,r),re=!!C&&kr(e,r),ve=R&&!Tl(e),$e=e.is_notice?U(un,{canConfirm:!!de?.canAck,count:de?.count??0,total:de?.total??0,myConfirmed:!!de?.acked,onConfirm:()=>A?.(e),onShowList:V=>W?.(e,V)}):null,Ie=!e.is_notice&&!!e.due_date&&e.due_date.slice(0,10)<=i?"#e5484d":"#2f80ed";return dn(be,{onContextMenu:V=>Q(e,V),sx:{display:"grid",gridTemplateColumns:Tr({showProject:a,showManager:l,showActions:u,showRequest:c,notice:y,confirmMode:p,bug:d}),minHeight:48,fontSize:15,bgcolor:k.table.rowBg,color:k.table.rowColor,borderBottom:E?"none":`1px solid ${k.table.rowBorderColor}`,"&:hover":{bgcolor:k.table.rowHoverBg},"& > .cell":{px:1,minWidth:0,display:"flex",alignItems:"center",borderRight:`1px solid ${k.table.rowBorderColor}`},"& > .cell:first-of-type":{px:0,borderRight:"none"},"& > .cell:nth-of-type(2)":{pl:1.5,pr:2},"& > .cell:last-child":{borderRight:"none",pr:2}},children:[U(be,{className:"cell",children:ye?U(be,{sx:{width:3,alignSelf:"stretch",my:.5,ml:.5,bgcolor:"#2f80ed",borderRadius:1.5}}):null}),U(be,{className:"cell",sx:{justifyContent:"center"},children:!Z&&!te?U(Fi,{title:e.completed&&e.completed_by?`${e.completed_by} \xB7 ${tt(e.completed_time)} \uC644\uB8CC`:e.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC",arrow:!0,enterDelay:300,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:U(df,{checked:e.completed,icon:U(xf,{sx:{fontSize:20,color:"#9a9a97",opacity:.45}}),checkedIcon:U(ff,{sx:{fontSize:20,color:"#2f80ed"}}),onClick:V=>V.stopPropagation(),onChange:(V,Ee)=>h({anchorEl:V.currentTarget,task:e,nextCompleted:Ee}),sx:{p:.5}})}):null}),d?U(be,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap",fontVariantNumeric:"tabular-nums",color:"#37352f"},children:e.ticket_no||"-"}):null,dn(be,{className:"cell",onClick:()=>M(e),sx:{gap:1,cursor:"pointer","&:hover":{bgcolor:k.table.cellHoverBg}},children:[(()=>{let V=Oe(e.icon||(e.is_notice?Mo:_e));if(!V)return null;let Ee=e.icon_color||(e.is_notice?"#e5484d":"#1e3a8a");return U(V,{sx:{fontSize:18,flexShrink:0,color:Ee}})})(),U(be,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontWeight:e.completed?400:k.table.rowTitleFontWeight,color:e.completed?k.colors.textMuted:k.table.rowTitleColor,textDecoration:e.completed?"line-through":"none"},children:Hi(e.title,n)}),(e.comment_count??e.comments?.length??0)>0?U(Cr,{sx:{fontSize:16,flexShrink:0,color:"#9a9a97"}}):null,U(be,{sx:{flexShrink:0,display:"flex",alignItems:"center"},children:U(Tt,{labelKeys:e.label_keys??[],labelOptions:o})}),w?U(be,{component:"span",sx:{flexShrink:0,px:.55,fontSize:10.5,fontWeight:700,lineHeight:1.6,color:"#fff",bgcolor:"#e5484d",borderRadius:"4px"},children:"N"}):null,dr(e)&&!e.archived&&!Z&&oe?U(uf,{size:"small",variant:"outlined",color:"inherit",sx:{ml:"auto",flexShrink:0,minWidth:0,px:1.25,py:.25,fontSize:13,color:"text.primary",borderColor:"#d5d8dc",bgcolor:"#fff",whiteSpace:"nowrap"},onClick:V=>{V.stopPropagation(),oe(e)},children:"\uBCF4\uAD00"}):null]}),(()=>{let V=Z||!!e.is_event||!!e.completed;return U(be,{className:"cell",onClick:V?void 0:Ee=>I(e,Ee.currentTarget),sx:{py:.5,justifyContent:"center",...V?{}:{cursor:"pointer","&:hover":{bgcolor:k.table.cellHoverBg}}},children:e.is_event?(()=>{let Ee=An(e);return Ee?U(we,{option:Ee}):null})():U(we,{option:fo(e)})})})(),U(be,{className:"cell",onClick:Z?void 0:V=>x(e,"start_date",V.currentTarget),sx:{justifyContent:"center",whiteSpace:"nowrap",...Z?{}:{cursor:"pointer","&:hover":{bgcolor:k.table.cellHoverBg}}},children:Pl(e.start_date)}),U(be,{className:"cell",onClick:Z?void 0:V=>x(e,"due_date",V.currentTarget),sx:{justifyContent:"center",gap:.5,color:Ie,fontWeight:500,whiteSpace:"nowrap",...Z?{}:{cursor:"pointer","&:hover":{bgcolor:k.table.cellHoverBg}}},children:e.due_date?dn(Wi,{children:[Pl(e.due_date),U(pf,{sx:{fontSize:15}})]}):null}),y?U(be,{className:"cell",onClick:Z?void 0:()=>g(e,"targets"),sx:{gap:.75,...Z?{}:{cursor:"pointer","&:hover":{bgcolor:k.table.cellHoverBg}}},children:U(Rl,{display:P,summary:$,searchText:n,avatarSrcByName:t})}):null,!y&&e.is_notice?U(be,{className:"cell",onClick:Z?void 0:()=>g(e,"targets"),sx:{gridColumn:l?"span 2":"auto",gap:.75,...Z?{}:{cursor:"pointer","&:hover":{bgcolor:k.table.cellHoverBg}}},children:U(Rl,{display:P,summary:$,searchText:n,avatarSrcByName:t})}):null,!y&&!e.is_notice&&!e.is_event&&l?U(be,{className:"cell",onClick:ve?void 0:()=>g(e,"manager"),sx:{gap:.75,...ne||re?{justifyContent:"center"}:{},...ve?{}:{cursor:"pointer","&:hover":{bgcolor:k.table.cellHoverBg}}},children:ne?U(mn,{onClick:V=>v?.(e,V.currentTarget),children:"\uAC00\uC838\uAC00\uAE30"}):re?U(mn,{onClick:V=>C?.(e,V.currentTarget),children:"\uAC00\uC838\uAC00\uAE30"}):U(vr,{names:e.manager_name?[e.manager_name]:[],searchText:n,avatarSrcByName:t,emphasize:ye})}):null,!y&&!e.is_notice?U(be,{className:"cell",onClick:R?void 0:()=>g(e,"receivers"),sx:{gridColumn:e.is_event&&l?"span 2":"auto",gap:.75,...R?{}:{cursor:"pointer","&:hover":{bgcolor:k.table.cellHoverBg}}},children:U(vr,{names:e.receiver_names,searchText:n,avatarSrcByName:t})}):null,U(be,{className:"cell",onClick:Z?void 0:V=>K?.(e,V.currentTarget),sx:{py:.5,justifyContent:"center",...Z?{}:{cursor:"pointer","&:hover":{bgcolor:k.table.cellHoverBg}}},children:U(Eo,{priority:e.priority,plain:!0})}),a?U(be,{className:"cell",onClick:Z?void 0:V=>b?.(e,V.currentTarget),sx:{gap:.5,justifyContent:"flex-start",...Z?{}:{cursor:"pointer","&:hover":{bgcolor:k.table.cellHoverBg}}},children:f?dn(Wi,{children:[(()=>{let V=Oe(B);return V?U(V,{sx:{fontSize:15,flexShrink:0,color:"#1e3a8a"}}):null})(),U(be,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:f})]}):null}):null,y?U(be,{className:"cell",sx:{justifyContent:"center"},children:$e}):null,!y&&u&&c?U(be,{className:"cell",sx:{justifyContent:"center"},children:e.is_notice?$e:ue?U(un,{canConfirm:!!s?.canConfirm,count:s?.count??0,total:s?.total??0,myConfirmed:!!s?.myTime,onConfirm:()=>m?.(e),onShowList:V=>W?.(e,V)}):null}):null,!y&&p==="action"?U(be,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap",color:k.table.rowSubColor},children:e.is_notice?$e:s&&s.total>0?U(un,{canConfirm:!!s.canConfirm,count:s.count,total:s.total,myConfirmed:!!s.myTime,onConfirm:()=>m?.(e),onShowList:V=>W?.(e,V)}):"-"}):null,!y&&!u?U(be,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap",color:k.table.rowSubColor},children:e.completed_time||"-"}):null,d?null:U(be,{className:"cell",onClick:()=>{!N&&!F&&(X(e.note),O(!0))},sx:{color:"#6f6f6c",cursor:N?"default":"text"},children:F?U(be,{component:"input",ref:J,autoFocus:!0,spellCheck:!1,value:L,onChange:V=>X(V.target.value),onBlur:()=>{O(!1),L.trim()!==e.note&&T(e.seq,L)},onKeyDown:V=>{V.key==="Enter"&&V.target.blur(),V.key==="Escape"&&(X(e.note),O(!1))},sx:{flex:1,minWidth:0,width:"100%",border:"none",outline:"none",bgcolor:"transparent",font:"inherit",lineHeight:"inherit",letterSpacing:"inherit",color:k.table.rowTitleColor,caretColor:k.table.rowTitleColor,p:0,m:0}}):U(be,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.note?Hi(e.note,n):""})})]})}import{useState as gf}from"react";import{Box as Fn,Button as ql,ButtonBase as bf,Dialog as hf,Divider as Al,Menu as kf,MenuItem as Tf,Popover as yf}from"@mui/material";import Sf from"@mui/icons-material/ChevronRight";import Bf from"@mui/icons-material/Check";import Cf from"@mui/icons-material/NotificationsActiveOutlined";import{SimpleCalendar as vf}from"@ehfuse/mui-datetime-picker";import{Fragment as wf,jsx as Co,jsxs as At}from"react/jsx-runtime";var If=[{value:"min30_before",label:"30\uBD84 \uC804"},{value:"hour1_before",label:"1\uC2DC\uAC04 \uC804"},{value:"hour2_before",label:"2\uC2DC\uAC04 \uC804"}],Ll=[{value:"day_before",label:"1\uC77C \uC804"},{value:"two_days_before",label:"2\uC77C \uC804"},{value:"three_days_before",label:"3\uC77C \uC804"},{value:"week_before",label:"1\uC8FC\uC77C \uC804"}],Nl=[{value:"none",label:"\uC5C6\uC74C"},...If,...Ll];function $i(e){return e?Nl:[{value:"none",label:"\uC5C6\uC74C"},...Ll]}function Ki(e){return e==="same_day"?"\uB2F9\uC77C":Nl.find(o=>o.value===e)?.label??"\uC5C6\uC74C"}function _f(e){let o=e?new Date(`${e}T00:00:00`):new Date;return Number.isNaN(o.getTime())?new Date:o}function St({anchorEl:e,open:o,date:t,reminder:n,hideReminder:r=!1,centered:i=!1,onClose:a,onDateChange:l,onReminderChange:u}){let[c,p]=gf(null),d=Uo(),s=At(Fn,{sx:{width:300,maxWidth:"100%"},children:[Co(Fn,{sx:{height:320},children:Co(vf,{selectedDate:_f(t),onSelect:m=>{l(qe(m)),a()},onClose:a,showFooter:!1,autoApply:!0})}),r?null:At(wf,{children:[Co(Al,{sx:{borderColor:"#e6e6e3"}}),At(bf,{onClick:m=>p(m.currentTarget),sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",px:2,py:1.25,fontSize:14,"&:hover":{bgcolor:"#f8f8f7"}},children:[At(Fn,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:.75,color:"#37352f"},children:[Co(Cf,{sx:{fontSize:17,color:"#9a9a97"}}),"\uB9AC\uB9C8\uC778\uB354"]}),At(Fn,{component:"span",sx:{display:"inline-flex",alignItems:"center",color:"#37352f"},children:[Ki(n),Co(Sf,{sx:{fontSize:18,ml:.25,color:"#9a9a97"}})]})]}),Co(kf,{transitionDuration:0,anchorEl:c,open:!!c,onClose:()=>p(null),anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},...d,children:$i(!1).map(m=>At(Tf,{selected:m.value===n,onClick:()=>{u(m.value),p(null)},sx:{fontSize:14,minWidth:120,justifyContent:"space-between",gap:1},children:[m.label,m.value===n?Co(Bf,{sx:{fontSize:16,color:"#2f80ed"}}):null]},m.value))})]}),Co(Al,{sx:{borderColor:"#e6e6e3"}}),At(Fn,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",px:1,py:.5},children:[Co(ql,{size:"small",onClick:()=>{l(qe(new Date)),a()},sx:{minWidth:0,px:1.25,fontSize:13.5,color:"#2563eb"},children:"\uC624\uB298"}),Co(ql,{size:"small",onClick:a,sx:{minWidth:0,px:1.25,fontSize:13.5,color:"#2563eb"},children:"\uB2EB\uAE30"})]})]});return i?Co(hf,{open:o,onClose:a,slotProps:{paper:{sx:{borderRadius:3,width:300,maxWidth:"calc(100vw - 48px)",overflow:"hidden"}}},children:s}):Co(yf,{transitionDuration:0,open:o,anchorEl:e,onClose:a,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},slotProps:{paper:{sx:{borderRadius:2,boxShadow:"0 8px 24px rgba(0,0,0,0.14)"}}},children:s})}import{useEffect as Mf,useState as Vi}from"react";import{Box as Lt,Button as Ef,Switch as Pf}from"@mui/material";import{FormDialog as Rf}from"@ehfuse/mui-form-dialog";import{ClearTextField as zf}from"@ehfuse/mui-form-controls";import{ErrorAlert as qf}from"@ehfuse/alerts";import{Box as Df,ButtonBase as Of}from"@mui/material";import{jsx as Ui}from"react/jsx-runtime";function Ir({value:e,onChange:o}){return Ui(Df,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(40px, 1fr))",gap:1},children:bi.map(({key:t,Icon:n})=>{let r=t===e;return Ui(Of,{onClick:()=>o(t),sx:{display:"flex",alignItems:"center",justifyContent:"center",height:40,minWidth:40,borderRadius:1,border:r?"2px solid #2563eb":"1px solid #dedddb",bgcolor:r?"#eef4ff":"#fff",color:r?"#1e3a8a":"#787774","&:hover":{bgcolor:r?"#eef4ff":"#f4f4f2"}},children:Ui(n,{sx:{fontSize:20}})},t)})})}import{jsx as nt,jsxs as Gi}from"react/jsx-runtime";function _r({open:e,title:o="\uC0C8 \uD504\uB85C\uC81D\uD2B8 \uCD94\uAC00",initialLabel:t="",initialIcon:n=gi,confirmText:r="\uCD94\uAC00",initialUseSprints:i=!1,onClose:a,onSubmit:l}){let[u,c]=Vi(""),[p,d]=Vi(gi),[s,m]=Vi(!1);Mf(()=>{e&&(c(t),d(n),m(i))},[e]);let f=()=>{let b=u.trim();if(!b){qf("\uD504\uB85C\uC81D\uD2B8 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}l(b,p,s),a()};return nt(Rf,{open:e,onClose:a,maxWidth:"xs",title:o,locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-add-tab",sections:[{id:"add-tab",showTitle:!1,children:Gi(Lt,{children:[nt(zf,{label:"\uD504\uB85C\uC81D\uD2B8 \uC774\uB984",value:u,onChange:b=>c(b.target.value),onKeyDown:b=>{b.key==="Enter"&&(b.preventDefault(),f())},fullWidth:!0,autoFocus:!0,sx:{mt:.5}}),nt(Lt,{sx:{mt:2,fontSize:13,color:"#787774"},children:"\uC544\uC774\uCF58"}),nt(Lt,{sx:{mt:1,maxHeight:264,overflowY:"auto",pr:.5},children:nt(Ir,{value:p,onChange:d})}),Gi(Lt,{sx:{mt:2,display:"flex",alignItems:"center",justifyContent:"space-between",gap:1},children:[Gi(Lt,{children:[nt(Lt,{sx:{fontSize:14,color:"#37352f"},children:"\uBAA9\uD45C(\uC2A4\uD504\uB9B0\uD2B8) \uC0AC\uC6A9"}),nt(Lt,{sx:{fontSize:12.5,color:"#9a9a97"},children:"\uBAA9\uD45C \uBC30\uC815\uC73C\uB85C \uBC18\uBCF5 \uC8FC\uAE30\uB97C \uAD00\uB9AC\uD569\uB2C8\uB2E4(\uAC1C\uBC1C\uD300\uC6A9)"})]}),nt(Pf,{checked:s,onChange:(b,h)=>m(h)})]})]})}],actions:{showCancelButton:!0,right:nt(Ef,{variant:"contained",onClick:f,children:r})}})}import{jsx as he,jsxs as Go}from"react/jsx-runtime";function jf(e){let o=e?new Date(`${e}T00:00:00`):new Date;return Number.isNaN(o.getTime())?new Date:o}function $l({tasks:e,statusOptions:o,avatarSrcByName:t,searchText:n,todayStr:r,sortBy:i,sortDirection:a,onSort:l,onRequestReply:u,onToggleCompleted:c,onChangeTaskDate:p,onChangeTaskReminder:d,groupBy:s,collapsedGroupKeys:m,customTabs:f,onToggleGroup:B,renderGroupSummary:b,renderGroupTitleSummary:h,onChangeTaskProject:x,onAddProject:T,onChangeNote:g,onMemberClick:v,onClaimTask:C,onChangeTaskStatus:I,onOpenDetail:M,onTaskContextMenu:Q,onMemberFilterClick:E,activeMemberFilters:te=[],onStatusFilterClick:w,statusFilterActive:y=!1,onAckFilterClick:H,ackFilterActive:N=!1,onProjectFilterClick:$,projectFilterActive:P=!1,onPriorityFilterClick:oe,priorityFilterActive:de=!1,columns:A,getConfirmInfo:W,onConfirmTask:K,myAccountSeq:F=0,currentUserName:O="",groupManagerByMyRole:L=!1,allowManagerVolunteer:X=!0,noticeAdmin:J=!1,getTargetSummary:ue,getTargetDisplay:Z,onArchiveTask:ye,isTaskUnread:R,getAckInfo:k,onAckConfirm:ne,onAckListClick:re,onChangeTaskPriority:ve,onEndReached:$e}){let se=le(),Ie=Hn(()=>({showManager:!0,showActions:!0,showRequest:!0,...A}),[A]),V=Ie.showManager??!0,Ee=Ie.showActions??!0,Xe=Ie.showRequest??!0,bt=Ie.confirmMode??"none",Wo=Ie.notice??!1,Zo=Ie.bug??!1,$o=s!=="none",Pt=Hn(()=>$o?Pi(e,s,r,f,o,O,{enabled:L,myAccountSeq:F}):[],[$o,e,s,r,f,o,O,L,F]),rn=Hn(()=>new Set(m),[m]),Oo=Ie.showProject??(!Wo&&s!=="tab"),no=Hn(()=>Ai({...Ie,showProject:Oo}),[Ie,Oo]),mo=Tr({...Ie,showProject:Oo}),uo=Hn(()=>{let S=new Map;for(let G of f)S.set(G.key,{label:G.archived?`${G.label} (\uBCF4\uAD00\uB428)`:G.label,icon:G.icon});return S},[f]),Rt=Af(null),[pe,D]=it(null),z=e.length>0;Fl(()=>{if(!z){D(null);return}let S=window.requestAnimationFrame(()=>{D(Rt.current?.getScrollContainer()??null)});return()=>window.cancelAnimationFrame(S)},[z]);let[ie,ce]=it(!1);Fl(()=>{if(!pe)return;let S=()=>ce(pe.scrollHeight>pe.clientHeight);S();let G=new ResizeObserver(S);return G.observe(pe),pe.firstElementChild&&G.observe(pe.firstElementChild),()=>G.disconnect()},[pe]);let[ae,fe]=it(null),[_,ro]=it(null),[Qe,io]=it(null),[Pe,ht]=it(null),[_n,wn]=it(!1),[an,nr]=it(null),Dn=an?e.find(S=>S.seq===an.taskSeq)??null:null,[rr,pi]=it(null),ir=rr?e.find(S=>S.seq===rr.taskSeq)??null:null,Qa=rt((S,G)=>{pi({anchorEl:G,taskSeq:S.seq})},[]),Ja=rt((S,G)=>{nr({anchorEl:G,taskSeq:S.seq})},[]),um=rt((S,G)=>{if(!G)return;l(S,i===S&&a==="asc"?"desc":"asc")},[l,i,a]),Za=rt((S,G,Fe)=>{fe({anchorEl:Fe,taskSeq:S.seq,field:G,date:S[G],reminder:S.reminder,completed:S.completed})},[]),el=rt((S,G)=>{ht({anchorEl:G,task:S})},[]),dm=rt(S=>{ae&&(p(ae.taskSeq,ae.field,qe(S)),fe(null))},[ae,p]),pm=rt(S=>{ae&&(p(ae.taskSeq,ae.field,S),fe(G=>G&&{...G,date:S}))},[ae,p]),fm=rt(S=>{ae&&(d(ae.taskSeq,S),fe(G=>G&&{...G,reminder:S}))},[ae,d]),ol=rt((S,G=!1)=>he(zl,{hideBottomBorder:G,task:S,statusOptions:o,avatarSrcByName:t,searchText:n,myAccountSeq:F,todayStr:r,showProject:Oo,showManager:V,showActions:Ee,showRequest:Xe,confirmMode:bt,confirmInfo:S.is_notice?void 0:W?.(S),onConfirmTask:K,projectLabel:uo.get(S.tab_key??"")?.label??"",projectIcon:uo.get(S.tab_key??"")?.icon??"",onProjectClick:el,onRequestReply:u,onRequestToggleCompleted:ro,onDateClick:Za,onChangeNote:g,onMemberClick:v,onClaimClick:C?(Fe,Ko)=>io({anchorEl:Ko,taskSeq:Fe.seq,title:Fe.title,kind:"claim"}):void 0,onVolunteerClick:X?(Fe,Ko)=>io({anchorEl:Ko,taskSeq:Fe.seq,title:Fe.title,kind:"volunteer"}):void 0,onStatusClick:Ja,onOpenDetail:M,onTaskContextMenu:Q,notice:Wo,bugMode:Zo,noticeReadOnly:!ot(S,F),noteLocked:S.is_notice?!br(S,F):!ot(S,F),completeLocked:S.is_event?!0:S.is_notice?(S.author_account_seq??0)!==F:(S.author_account_seq??0)!==F&&(S.manager_account_seq??0)!==F,targetSummary:S.is_notice?ue?.(S):void 0,targetDisplay:S.is_notice?Z?.(S):void 0,onArchiveTask:ye,unread:R?.(S)??!1,ackInfo:S.is_notice?k?.(S):void 0,onAckConfirm:ne,onAckListClick:re,onPriorityClick:Qa},S.seq),[n,o,t,r,Oo,V,Ee,Xe,bt,W,K,Wo,Zo,F,J,ue,Z,ye,R,k,ne,re,Qa,uo,el,u,Za,g,v,C,Ja,M,Q]);return Go(Po,{sx:{display:"flex",flexDirection:"column",flex:1,minHeight:0,border:`1px solid ${se.table.borderColor}`,borderRadius:"0 0 4px 4px",overflow:"hidden",bgcolor:se.table.bg,color:se.table.rowColor,...se.table.sx},children:[he(Po,{sx:{display:"grid",gridTemplateColumns:mo,borderBottom:`1px solid ${se.table.borderColor}`,flexShrink:0,bgcolor:se.table.headerBg,"& > *":{borderRight:`1px solid ${se.table.rowBorderColor}`},"& > *:first-of-type":{px:0,borderRight:"none"},"& > *:nth-of-type(2)":{pl:1.5,pr:2},"& > *:last-child":{borderRight:"none",pr:2},...se.table.headerSx},children:no.map(S=>{let G=i===S.id,Fe=!!S.memberFilter,Ko=Fe&&te.includes(S.memberFilter),ar=Fe||!!S.statusFilter||!!S.ackFilter||!!S.projectFilter||!!S.priorityFilter,lr=Ko||!!S.statusFilter&&y||!!S.ackFilter&&N||!!S.projectFilter&&P||!!S.priorityFilter&&de;return Go(Po,{onClick:On=>{S.memberFilter?E(S.memberFilter,On.currentTarget):S.statusFilter?w(On.currentTarget):S.ackFilter?H?.(On.currentTarget):S.projectFilter?$?.(On.currentTarget):S.priorityFilter?oe?.(On.currentTarget):um(S.id,S.sortable)},sx:{display:"flex",alignItems:"center",justifyContent:S.align==="center"?"center":"flex-start",gap:.5,px:1,py:1,minWidth:0,fontSize:se.table.headerFontSize,color:S.sortable||ar?se.table.headerActiveColor:se.table.headerColor,whiteSpace:"nowrap",cursor:S.sortable||ar?"pointer":"default",userSelect:"none",...G?{color:se.table.headerFilteredColor}:{},...lr?{color:se.table.headerFilteredColor,fontWeight:600}:{}},children:[S.icon,S.label,lr?he(Uf,{sx:{fontSize:14}}):null,G?a==="asc"?he(Hf,{sx:{fontSize:13}}):he(Wf,{sx:{fontSize:13}}):null]},S.id)})}),e.length===0?he(Po,{sx:{py:8,textAlign:"center",color:se.table.emptyColor,fontSize:14},children:Zo?"\uB4F1\uB85D\uB41C \uC624\uB958\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.":Wo?"\uB4F1\uB85D\uB41C \uACF5\uC9C0\uC0AC\uD56D\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.":"\uD45C\uC2DC\uD560 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):he(Po,{sx:{flex:1,minHeight:0},children:he(Gf,{ref:Rt,style:{height:"100%"},thumb:{width:8},children:pe?$o?he(Wl,{customScrollParent:pe,data:Pt,computeItemKey:(S,G)=>G.key,itemContent:(S,G)=>{let Fe=rn.has(G.key),Ko=S===Pt.length-1;return Go(Po,{children:[Go(Po,{onClick:()=>B(G.key),sx:{display:"flex",alignItems:"center",gap:.5,px:1.5,minHeight:se.table.groupHeader.minHeight,bgcolor:se.table.groupHeader.bg,borderBottom:`1px solid ${se.table.groupHeader.borderColor}`,cursor:"pointer",userSelect:"none","&:hover":{bgcolor:se.table.groupHeader.hoverBg},...se.table.groupHeader.sx},children:[Fe?he(Kf,{sx:{fontSize:20,color:se.colors.textMuted}}):he($f,{sx:{fontSize:20,color:se.colors.textMuted}}),he(Po,{component:"span",sx:{fontSize:se.table.groupHeader.labelFontSize,fontWeight:se.table.groupHeader.labelFontWeight,color:se.table.groupHeader.labelColor},children:G.label}),h?he(Po,{sx:{flexShrink:0,display:"flex",alignItems:"center",ml:.5},children:h(G.key,G.tasks)}):null,Go(Po,{sx:{ml:"auto",minWidth:0,display:"flex",alignItems:"center",gap:1,pr:.5},children:[b?b(G.key,G.tasks):null,he(Po,{component:"span",sx:{flexShrink:0,width:se.table.groupHeader.badge.width,py:.1,borderRadius:`${se.table.groupHeader.badge.borderRadius}px`,bgcolor:se.table.groupHeader.badge.bg,border:se.table.groupHeader.badge.border,color:se.table.groupHeader.badge.color,fontSize:se.table.groupHeader.badge.fontSize,fontWeight:se.table.groupHeader.badge.fontWeight,lineHeight:1.6,textAlign:"center",fontVariantNumeric:"tabular-nums"},children:G.tasks.length})]})]}),Fe?null:G.tasks.map((ar,lr)=>ol(ar,Ko&&lr===G.tasks.length-1&&ie))]})}}):he(Wl,{customScrollParent:pe,data:e,computeItemKey:(S,G)=>G.seq,endReached:$e,itemContent:(S,G)=>ol(G,S===e.length-1&&ie)}):null})}),he(gr,{anchorEl:an?.anchorEl??null,value:Dn?.status??"",options:Dn?hl(Dn):qn,onSelect:S=>{Dn&&I(Dn.seq,S)},onClose:()=>nr(null)}),he(Hl,{transitionDuration:0,anchorEl:rr?.anchorEl??null,open:!!rr,onClose:()=>pi(null),children:["high","medium","low"].map(S=>Go(wr,{selected:ir?.priority===S,onClick:()=>{ir&&ve?.(ir.seq,S),pi(null)},sx:{fontSize:14,minWidth:130,gap:1},children:[he(Eo,{priority:S,small:!0}),ir?.priority===S?he(Yi,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},S))}),Go(Hl,{anchorEl:Pe?.anchorEl??null,open:!!Pe,onClose:()=>ht(null),transitionDuration:0,children:[Go(wr,{selected:!Pe?.task.tab_key,onClick:()=>{Pe&&x(Pe.task.seq,""),ht(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[he(Vf,{sx:{fontSize:17,color:"#9a9a97"}}),"\uC5C6\uC74C",Pe?.task.tab_key?null:he(Yi,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}})]}),f.filter(S=>!S.archived).map(S=>{let G=Oe(S.icon),Fe=Pe?.task.tab_key===S.key;return Go(wr,{selected:Fe,onClick:()=>{Pe&&x(Pe.task.seq,S.key),ht(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[G?he(G,{sx:{fontSize:17,color:"#1e3a8a"}}):null,S.label,Fe?he(Yi,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},S.key)}),T?[he(Lf,{},"add-project-divider"),Go(wr,{onClick:()=>wn(!0),sx:{fontSize:14,color:"#787774"},children:[he(Nf,{children:he(Ff,{sx:{fontSize:18,color:"#787774"}})}),"\uD504\uB85C\uC81D\uD2B8 \uCD94\uAC00"]},"add-project")]:null]}),T?he(_r,{open:_n,onClose:()=>wn(!1),onSubmit:(S,G)=>{let Fe=Pe?.task.seq??0;(async()=>{let Ko=await T(S,G);Ko&&Fe&&x(Fe,Ko)})(),ht(null)}}):null,he(Yf,{anchorEl:ae?.anchorEl??null,open:!!ae&&ae?.field==="start_date",onClose:()=>fe(null),selectedDate:jf(ae?.date??""),onDateChange:dm}),he(St,{anchorEl:ae?.anchorEl??null,open:!!ae&&ae?.field==="due_date",date:ae?.date??"",reminder:ae?.reminder??"none",hideReminder:!!ae?.completed,onClose:()=>fe(null),onDateChange:pm,onReminderChange:fm}),he(Ue,{open:!!Qe,anchorEl:Qe?.anchorEl??null,title:Qe?.kind==="claim"?"\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:()=>io(null),onConfirm:()=>{Qe&&C?.(Qe.taskSeq),io(null)}}),he(Ue,{open:!!_,anchorEl:_?.anchorEl??null,title:_?.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:_?.nextCompleted?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>ro(null),onConfirm:()=>{_&&c(_.task,_.nextCompleted),ro(null)}})]})}import{useCallback as lt,useMemo as st,useRef as xx,useState as ct}from"react";import{Box as Se,ButtonBase as ns,Divider as Gl,IconButton as Yl,Menu as jl,MenuItem as Ct}from"@mui/material";import Ji from"@mui/icons-material/Add";import Xl from"@mui/icons-material/MoreVert";import Ql from"@mui/icons-material/EditOutlined";import Jl from"@mui/icons-material/ArchiveOutlined";import Zl from"@mui/icons-material/UnarchiveOutlined";import gx from"@mui/icons-material/NotificationsOutlined";import bx from"@mui/icons-material/PeopleAltOutlined";import{SvgIcon as Xf}from"@mui/material";import{jsx as Kl}from"react/jsx-runtime";function at({sx:e,...o}){return Kl(Xf,{viewBox:"0 0 24 24",...o,sx:{fill:"none",...e},children:Kl("path",{d:"M4 6H20M16 6L15.7294 5.18807C15.4671 4.40125 15.3359 4.00784 15.0927 3.71698C14.8779 3.46013 14.6021 3.26132 14.2905 3.13878C13.9376 3 13.523 3 12.6936 3H11.3064C10.477 3 10.0624 3 9.70951 3.13878C9.39792 3.26132 9.12208 3.46013 8.90729 3.71698C8.66405 4.00784 8.53292 4.40125 8.27064 5.18807L8 6M18 6V16.2C18 17.8802 18 18.7202 17.673 19.362C17.3854 19.9265 16.9265 20.3854 16.362 20.673C15.7202 21 14.8802 21 13.2 21H10.8C9.11984 21 8.27976 21 7.63803 20.673C7.07354 20.3854 6.6146 19.9265 6.32698 19.362C6 18.7202 6 17.8802 6 16.2V6M14 10V17M10 10V17",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}import{DndContext as hx,DragOverlay as kx,PointerSensor as Tx,pointerWithin as yx,rectIntersection as Sx,useDroppable as Bx,useSensor as Cx,useSensors as vx}from"@dnd-kit/core";import{SortableContext as rs,arrayMove as es,horizontalListSortingStrategy as Ix,useSortable as _x,verticalListSortingStrategy as wx}from"@dnd-kit/sortable";import{CSS as Dx}from"@dnd-kit/utilities";import Zi from"@ehfuse/overlay-scrollbar";import{useState as ox}from"react";import{Box as Bt,ButtonBase as tx,Checkbox as nx,Tooltip as rx}from"@mui/material";import ix from"@mui/icons-material/AlarmOutlined";import ax from"@mui/icons-material/TimerOutlined";import{Box as Nt,Button as Qf,Popover as Jf}from"@mui/material";import Zf from"@mui/icons-material/CheckCircle";import{jsx as Ft,jsxs as Dr}from"react/jsx-runtime";function Or({anchorEl:e,open:o,acks:t,total:n,avatarSrcByName:r,onRequestConfirm:i,onClose:a}){let l=He();return Ft(Jf,{open:o&&(l||!!e),anchorEl:e,onClose:a,transitionDuration:0,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},...l?{anchorReference:"none",slotProps:{paper:{sx:{position:"fixed",top:"50%",left:"50%",translate:"-50% -50%",maxWidth:"calc(100vw - 48px)",maxHeight:"70vh",borderRadius:3}}}}:{},children:Dr(Nt,{sx:{minWidth:240,maxWidth:320,py:1},children:[Dr(Nt,{sx:{px:2,pb:.75,fontSize:po(13.5),fontWeight:600,color:"#37352f",borderBottom:"1px solid #efefed"},children:["\uD655\uC778 ",t.length,"/",n]}),t.length===0?Ft(Nt,{sx:{px:2,py:1.5,fontSize:po(13.5),color:"#9a9a97"},children:"\uC544\uC9C1 \uD655\uC778\uD55C \uC0AC\uB78C\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):t.map(u=>Dr(Nt,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:.75,minWidth:0},children:[Ft(xo,{names:[u.name],size:22,avatarSrcByName:r}),Ft(Nt,{component:"span",sx:{fontSize:po(14),color:"#37352f",whiteSpace:"nowrap"},children:u.name}),Ft(Nt,{component:"span",sx:{ml:"auto",fontSize:po(12.5),color:"#9a9a97",whiteSpace:"nowrap"},children:tt(u.time)}),Ft(Zf,{sx:{fontSize:16,color:"#2f80ed",flexShrink:0}})]},u.account_seq)),i?Ft(Nt,{sx:{borderTop:"1px solid #efefed",px:1.5,pt:1,pb:.25},children:Dr(Qf,{size:"small",fullWidth:!0,variant:"outlined",onClick:()=>{i(),a()},sx:{fontSize:po(13)},children:["\uD655\uC778 \uC694\uCCAD (",n-t.length,"\uBA85 \uBBF8\uD655\uC778)"]})}):null]})})}function ex(e){let o=Number(e.author_account_seq??0);return[...new Set([Number(e.manager_account_seq??0),...e.receiver_account_seqs??[]].filter(t=>t>0&&t!==o))]}function Ul(e,o){let t=ex(e),n=e.acks??[],r=o>0?n.find(i=>i.account_seq===o):void 0;return{myTime:r?.time??"",canConfirm:o>0&&t.includes(o)&&!r,count:n.filter(i=>t.includes(i.account_seq)).length,total:t.length}}function h1(e){let o=String(e??"").trim();return o?o.slice(5,16).replaceAll("-","."):""}import{Fragment as cx,jsx as go,jsxs as Ht}from"react/jsx-runtime";function pn(e){return{border:`1px solid ${e.borderColor}`,borderRadius:1,p:1,bgcolor:e.bg,display:"flex",flexDirection:"column",gap:.75,boxShadow:"0 1px 2px rgba(0,0,0,0.04)",...e.sx}}function lx(e){let o=e.trim();return o?o.slice(2,10).replaceAll("-","."):"-"}function sx(){let e=new Date,o=String(e.getMonth()+1).padStart(2,"0"),t=String(e.getDate()).padStart(2,"0");return`${e.getFullYear()}-${o}-${t}`}function Wt({task:e,statusOptions:o,showDueDate:t=!1,onRequestArchiveToggle:n,onRequestReply:r,onDueDateClick:i,titleFontSize:a=13}){let l=le(),c=!!e.due_date&&e.due_date.slice(0,10)<=sx()?l.colors.danger:l.colors.accentOnSurface,p=Ul(e,0),[d,s]=ox(null),m=kt(e,o),f=new Set(e.label_keys??[]),B=m.filter(h=>!f.has(h.key)),b=m.filter(h=>f.has(h.key));return Ht(cx,{children:[Ht(Bt,{sx:{display:"flex",alignItems:"center",gap:.5},children:[go(nx,{size:"small",checked:e.completed,onPointerDown:h=>h.stopPropagation(),onClick:h=>h.stopPropagation(),onChange:(h,x)=>n?.({anchorEl:h.currentTarget,taskSeq:e.seq,nextCompleted:x}),sx:{p:0}}),go(rx,{title:e.title,arrow:!0,enterDelay:300,children:Ht(Bt,{sx:{flex:1,minWidth:0,pr:3.5,fontSize:a,fontWeight:e.completed?400:500,color:l.colors.textPrimary,lineHeight:1.35,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",textDecoration:e.completed?"line-through":"none"},children:[e.is_event&&e.event_time?`${e.event_time} `:"",e.title]})}),(e.comment_count??e.comments?.length??0)>0?go(Cr,{sx:{fontSize:15,flexShrink:0,color:l.colors.textMuted}}):null]}),e.is_bug&&e.ticket_no?go(Bt,{sx:{pl:3,mt:-.5,fontSize:12.5,color:l.colors.textSecondary,fontWeight:500,fontVariantNumeric:"tabular-nums"},children:e.ticket_no}):null,Ht(Bt,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:.5},children:[Ht(Bt,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:.5,minWidth:0},children:[B.map(h=>go(we,{option:h,small:!0},h.key)),go(Eo,{priority:e.priority,small:!0}),b.map(h=>go(we,{option:h,small:!0},h.key))]}),t&&String(e.due_date??"").trim()?Ht(tx,{disabled:!i,onPointerDown:h=>h.stopPropagation(),onClick:h=>{h.stopPropagation(),i?.(e,h.currentTarget)},sx:{display:"inline-flex",alignItems:"center",gap:.25,px:.5,py:.1,borderRadius:.75,fontSize:13,fontWeight:500,color:c,whiteSpace:"nowrap","&:hover":i?{bgcolor:l.colors.border}:void 0},children:[lx(e.due_date),go(ix,{sx:{fontSize:15}})]}):null]}),t&&e.estimated_time?Ht(Bt,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:.25,mt:-.5,fontSize:12,color:l.colors.textSecondary},children:[go(ax,{sx:{fontSize:14}}),e.estimated_time]}):null,go(xo,{names:[...e.manager_name?[e.manager_name]:[],...e.receiver_names],size:20,ringFirst:!!e.manager_name}),p.total>0?go(Bt,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:.5},children:go(Bt,{sx:{flexShrink:0,width:64},onPointerDown:h=>h.stopPropagation(),onClick:h=>h.stopPropagation(),children:go(un,{canConfirm:!1,count:p.count,total:p.total,onConfirm:()=>{},onShowList:h=>s(h)})})}):null,go(Or,{anchorEl:d,open:!!d,acks:e.acks??[],total:p.total,onRequestConfirm:r&&p.count<p.total?()=>{r(e),s(null)}:void 0,onClose:()=>s(null)})]})}import{Box as mx}from"@mui/material";import{useSortable as ux}from"@dnd-kit/sortable";import{CSS as dx}from"@dnd-kit/utilities";import{jsx as Vl}from"react/jsx-runtime";function px(e){return{px:1.25,py:1,display:"flex",flexDirection:"column",gap:.75,borderBottom:`1px solid ${e.borderColor}`,bgcolor:e.bg}}function Mr({task:e,statusOptions:o,variant:t="card",showDueDate:n=!1,onRequestArchiveToggle:r,onRequestReply:i,onDueDateClick:a,onCardClick:l,onCardContextMenu:u,titleFontSize:c}){let p=le(),{attributes:d,listeners:s,setNodeRef:m,transform:f,transition:B,isDragging:b}=ux({id:String(e.seq)}),h=t==="list";return Vl(mx,{ref:m,...d,...s,onClick:l?()=>l(e):void 0,onContextMenu:u?x=>u(e,x):void 0,sx:{...h?px(p.card):pn(p.card),opacity:b?.35:e.completed?.55:1,transform:dx.Translate.toString(f),transition:B,position:"relative",cursor:"default",touchAction:"none","&:hover":h?{bgcolor:p.card.hoverBg}:{boxShadow:"0 3px 8px rgba(0,0,0,0.1)"}},children:Vl(Wt,{task:e,statusOptions:o,showDueDate:n,onRequestArchiveToggle:r,onRequestReply:i,onDueDateClick:a,titleFontSize:c})})}function fx(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?e.slice(5).replace("-","."):""}function vo(e){if(e.status==="closed")return`${e.name} (\uC885\uB8CC)`;let o=fx(e.end_date);return o?`${e.name} (~${o})`:e.name}import{jsx as j,jsxs as Me}from"react/jsx-runtime";var os=2,Er="group-",Io="colmove-",ji="__default__",Xi=wi,Qi="__other__",Pr="sprint-",ts=`${Pr}0`,Ox={planning:"#9a9a97",active:"#2f80ed",closed:"#9a9a97"};function is(e){return{flexShrink:0,width:e.width,py:.1,borderRadius:`${e.borderRadius}px`,bgcolor:e.bg,border:e.border,color:e.color,fontSize:e.fontSize,fontWeight:e.fontWeight,lineHeight:1.6,textAlign:"center",fontVariantNumeric:"tabular-nums",...e.sx}}function Mx({column:e,tasks:o,statusOptions:t,onRequestArchiveToggle:n,onRequestReply:r,onDueDateClick:i,onAddTask:a,canAdd:l,onOpenMenu:u,onCardClick:c,onCardContextMenu:p,grow:d,summary:s,onOpenSprintMenu:m}){let f=le(),{setNodeRef:B,isOver:b}=Bx({id:`${Er}${e.key}`}),{attributes:h,listeners:x,setNodeRef:T,transform:g,transition:v,isDragging:C}=_x({id:`${Io}${e.key}`,disabled:e.isDefault||e.isArchived||!!e.locked});return Me(Se,{ref:I=>{B(I),T(I)},sx:{flex:d?"1 0 270px":"0 0 270px",minWidth:270,contain:"inline-size",minHeight:0,maxHeight:"100%",display:"flex",flexDirection:"column",borderRadius:1.5,boxShadow:I=>I.shadows[1],bgcolor:b?f.colors.accentSoft:f.board.columnBg,transition:"background-color 0.15s",overflow:"hidden",transform:Dx.Translate.toString(g),...v?{transition:`${v}, background-color 0.15s`}:{},opacity:C?.6:1},children:[Me(Se,{...h,...x,sx:{display:"flex",alignItems:"center",gap:.75,pl:1.25,pr:.5,py:1.1,borderBottom:"1px solid #e6e6e3",flexShrink:0,touchAction:"none",cursor:e.isDefault||e.isArchived||e.locked?"default":"grab",opacity:e.isArchived?.65:1},children:[e.dot?j(Se,{sx:{width:8,height:8,borderRadius:"50%",bgcolor:e.dot,flexShrink:0}}):e.isDefault?null:(()=>{let I=Oe(e.icon);return I?j(I,{sx:{fontSize:17,color:"#1e3a8a"}}):null})(),j(Se,{component:"span",sx:{fontSize:f.board.columnHeaderFontSize,fontWeight:700,color:f.board.columnHeaderColor,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.label}),j(Se,{component:"span",sx:{...is(f.board.badge),ml:"auto"},children:o.length}),e.sprint&&m?j(Yl,{size:"small","aria-label":"\uBAA9\uD45C \uBA54\uB274",onPointerDown:I=>I.stopPropagation(),onClick:I=>m(I.currentTarget,e.sprint),sx:{color:"#9a9a97"},children:j(Xl,{sx:{fontSize:18}})}):e.locked?null:j(Yl,{size:"small","aria-label":"\uD504\uB85C\uC81D\uD2B8 \uBA54\uB274",onPointerDown:I=>I.stopPropagation(),onClick:I=>u({anchorEl:I.currentTarget,column:e}),sx:{color:"#9a9a97"},children:j(Xl,{sx:{fontSize:18}})})]}),s?j(Se,{sx:{px:1.25,py:1.25,borderBottom:"1px solid #e6e6e3",flexShrink:0},children:s}):null,j(Se,{sx:{flex:"1 1 auto",minHeight:0,display:"flex",flexDirection:"column"},children:j(Zi,{style:{height:"auto",flex:"1 1 auto",minHeight:0},contentStyle:{minWidth:0},thumb:{width:6},children:Me(Se,{sx:{display:"flex",flexDirection:"column",flexGrow:1},children:[j(rs,{items:o.map(I=>String(I.seq)),strategy:wx,children:o.map(I=>j(Mr,{task:I,statusOptions:t,variant:"list",showDueDate:!0,titleFontSize:15,onRequestArchiveToggle:n,onRequestReply:r,onDueDateClick:i,onCardClick:c,onCardContextMenu:p},I.seq))}),o.length===0&&!l?j(Se,{sx:{py:3,textAlign:"center",fontSize:13,color:"#9a9a97"},children:"\uCE74\uB4DC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):null,o.length===0&&l?j(Se,{sx:{flexGrow:1,minHeight:56,display:"flex",flexDirection:"column","&:hover .taskbox-board-add":{opacity:1,pointerEvents:"auto"}},children:Me(ns,{className:"taskbox-board-add",onClick:()=>a(e.isDefault?"":e.key),sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:.5,px:1.25,py:1.75,borderBottom:"1px dashed #e6e6e3",bgcolor:f.card.bg,color:"#2563eb",fontSize:13,fontWeight:500,opacity:0,pointerEvents:"none",transition:"opacity 0.15s","&:hover":{bgcolor:f.card.hoverBg}},children:[j(Ji,{sx:{fontSize:16}}),"\uC5C5\uBB34 \uB4F1\uB85D"]})}):null]})})})]})}function ea({tasks:e,statusOptions:o,customTabs:t,mode:n="active",onToggleCompleted:r,onRequestReply:i,onChangeDueDate:a,onChangeReminder:l,onMoveTask:u,columnAxis:c="project",statusColumns:p=[],onMoveTaskStatus:d,sprintColumns:s=[],onMoveTaskSprint:m,onAddGroup:f,onAddTask:B,canAdd:b=!0,onRequestRename:h,onArchiveProject:x,onDeleteProject:T,onReorderProjects:g,onOpenDetail:v,onTaskContextMenu:C,renderColumnSummary:I,onEditSprint:M,onChangeSprintStatus:Q,onRemoveSprint:E}){let te=le(),[w,y]=ct(null),[H,N]=ct(null),[$,P]=ct(null),[oe,de]=ct(null),[A,W]=ct(null),[K,F]=ct(null),[O,L]=ct(null),[X,J]=ct(null),[ue,Z]=ct(null),ye=xx(!1),R=st(()=>new Map(e.map(D=>[D.seq,D])),[e]),k=st(()=>{let D=e.filter(z=>z.is_notice);return D.sort((z,ie)=>z.completed!==ie.completed?z.completed?1:-1:ie.seq-z.seq),D},[e]),ne=st(()=>t.filter(D=>!D.archived),[t]),re=st(()=>t.filter(D=>D.archived),[t]),ve=D=>({key:D.key,label:D.label,icon:D.icon,isDefault:!1,isArchived:D.archived}),$e=st(()=>new Set(p.map(D=>D.key)),[p]),se=st(()=>new Set(s.map(D=>D.seq)),[s]),Ie=st(()=>{if(c==="sprint")return[{key:ts,label:"\uBBF8\uBC30\uC815",icon:"",isDefault:!0,isArchived:!1,dot:"#c9c8c5",locked:!0},...s.map(D=>({key:`${Pr}${D.seq}`,label:vo(D),icon:"",isDefault:!1,isArchived:!1,dot:Ox[D.status],locked:!0,sprint:D}))];if(c==="status"){let D=p.map(z=>({key:z.key,label:z.name,icon:"",isDefault:!1,isArchived:!1,dot:z.dot,locked:!0}));return D.some(z=>z.key===Xi)?D:[...D,{key:Xi,label:"\uC644\uB8CC",icon:"",isDefault:!1,isArchived:!1,dot:"#2f80ed",locked:!0}]}return n==="archived"?re.map(ve):[{key:ji,label:"\uAE30\uBCF8 \uC5C5\uBB34\uD568",icon:"",isDefault:!0,isArchived:!1},...ne.map(ve)]},[c,p,s,n,ne,re]),V=vx(Cx(Tx,{activationConstraint:{distance:5}})),Ee=lt(D=>{let z=String(D.active.id).startsWith(Io),ie=yx(D),ce=ie.length>0?ie:Sx(D);if(z)return ce.filter(_=>String(_.id).startsWith(Io));let ae=ce.filter(_=>!String(_.id).startsWith(Io)),fe=ae.filter(_=>!String(_.id).startsWith(Er));return fe.length>0?fe:ae},[]),Xe=st(()=>{let D=new Map;for(let z of e){if(z.is_notice)continue;let ie;if(c==="sprint"){let ae=z.sprint_seq??0;ie=se.has(ae)?`${Pr}${ae}`:ts}else ie=c==="status"?z.completed?Xi:$e.has(String(z.status??""))?String(z.status??""):Qi:z.tab_key?.trim()||ji;let ce=D.get(ie);ce?ce.push(z):D.set(ie,[z])}for(let z of D.values())z.sort((ie,ce)=>{if(ie.completed!==ce.completed)return ie.completed?1:-1;let ae=(ie.group_sort_no??0)>0,fe=(ce.group_sort_no??0)>0;return ae&&fe?(ie.group_sort_no??0)-(ce.group_sort_no??0):ae!==fe?ae?-1:1:ie.due_date!==ce.due_date?ie.due_date<ce.due_date?-1:1:ie.seq-ce.seq});return D},[e,c,$e,se]),bt=st(()=>c!=="status"||(Xe.get(Qi)??[]).length===0?Ie:[...Ie,{key:Qi,label:"\uAE30\uD0C0",icon:"",isDefault:!1,isArchived:!1,dot:"#c9c8c5",locked:!0}],[c,Ie,Xe]),Wo=lt(D=>O?(O.get(D)??[]).map(z=>R.get(z)).filter(z=>!!z):Xe.get(D)??[],[O,R,Xe]),Zo=lt(D=>{let z=String(D.active.id);if(z.startsWith(Io)){Z(z.slice(Io.length));return}J(Number(z)),L(new Map(Ie.map(ie=>[ie.key,(Xe.get(ie.key)??[]).map(ce=>ce.seq)])))},[Ie,Xe]),$o=lt((D,z)=>{if(D.startsWith(Er))return{key:D.slice(Er.length),overSeq:null};let ie=Number(D);for(let[ce,ae]of z)if(ae.includes(ie))return{key:ce,overSeq:ie};return null},[]),Pt=lt(D=>{let{active:z,over:ie}=D;!ie||String(z.id).startsWith(Io)||L(ce=>{if(!ce)return ce;let ae=Number(z.id),fe=$o(String(ie.id),ce);if(!fe)return ce;let _=[...ce.entries()].find(([,Pe])=>Pe.includes(ae))?.[0];if(!_||_===fe.key)return ce;let ro=new Map(ce);ro.set(_,(ro.get(_)??[]).filter(Pe=>Pe!==ae));let Qe=[...ro.get(fe.key)??[]],io=Qe.length;if(fe.overSeq!==null){let Pe=Qe.indexOf(fe.overSeq);Pe!==-1&&(io=Pe)}return Qe.splice(io,0,ae),ro.set(fe.key,Qe),ro})},[$o]),rn=lt(D=>{let z=String(D.active.id);if(z.startsWith(Io)){Z(null);let io=String(D.over?.id??"");if(!io.startsWith(Io))return;let Pe=z.slice(Io.length),ht=io.slice(Io.length);if(Pe===ht)return;let _n=t.map(nr=>nr.key),wn=_n.indexOf(Pe),an=_n.indexOf(ht);if(wn===-1||an===-1)return;g(es(_n,wn,an));return}let ie=O;if(L(null),J(null),ye.current=!0,!ie||!D.over)return;let ce=Number(z),ae=[...ie.entries()].find(([,io])=>io.includes(ce));if(!ae)return;let[fe,_]=ae,ro=[..._],Qe=$o(String(D.over.id),ie);if(Qe&&Qe.key===fe&&Qe.overSeq!==null&&Qe.overSeq!==ce){let io=ro.indexOf(ce),Pe=ro.indexOf(Qe.overSeq);io!==-1&&Pe!==-1&&(ro=es(ro,io,Pe))}if(c==="status"){d?.(ce,fe);return}if(c==="sprint"){m?.(ce,Number(fe.slice(Pr.length))||0);return}u(ce,fe===ji?"":fe,ro)},[t,O,$o,u,g,c,d,m]),Oo=lt(()=>{L(null),J(null),Z(null),ye.current=!0},[]),no=lt(D=>{if(ye.current){ye.current=!1;return}v(D)},[v]),mo=X!==null?R.get(X)??null:null,uo=ue!==null?Ie.find(D=>D.key===ue)??null:null,Rt=lt((D,z)=>{F({anchorEl:z,taskSeq:D.seq,date:D.due_date,reminder:D.reminder})},[]),pe=H?.column??null;return Me(Se,{sx:{flex:1,minHeight:0,height:"100%",display:"flex",flexDirection:"column",border:"1px solid #dedddb",borderRadius:"0 0 4px 4px",overflow:"hidden",p:os,bgcolor:te.colors.surfaceSubtle},children:[Me(hx,{sensors:V,collisionDetection:Ee,onDragStart:Zo,onDragOver:Pt,onDragEnd:rn,onDragCancel:Oo,children:[j(Se,{sx:{flex:1,minHeight:0,minWidth:0,contain:"inline-size"},children:n==="archived"&&Ie.length===0?j(Se,{sx:{py:8,textAlign:"center",color:"#9a9a97",fontSize:14},children:"\uBCF4\uAD00\uB41C \uD504\uB85C\uC81D\uD2B8\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):j(Zi,{style:{height:"100%"},contentStyle:{width:"max-content",minWidth:"100%",height:"100%"},thumb:{width:8},showHorizontalScrollbar:!0,children:Me(Se,{sx:{display:"flex",alignItems:"flex-start",gap:os,height:"100%",minWidth:"min-content",pb:.5},children:[n==="active"&&k.length>0?Me(Se,{sx:{flex:c!=="project"?"1 0 270px":"0 0 270px",minWidth:270,contain:"inline-size",minHeight:0,maxHeight:"100%",display:"flex",flexDirection:"column",borderRadius:1.5,boxShadow:D=>D.shadows[1],bgcolor:te.card.bg,overflow:"hidden"},children:[Me(Se,{sx:{display:"flex",alignItems:"center",gap:.75,pl:1.25,pr:.5,py:1.1,borderBottom:"1px solid #e6e6e3",flexShrink:0,minHeight:48},children:[j(gx,{sx:{fontSize:17,color:"#e8763a"}}),j(Se,{component:"span",sx:{fontSize:14.5,fontWeight:700,color:te.board.columnHeaderColor},children:"\uACF5\uC9C0\uC0AC\uD56D"}),Me(Se,{component:"span",sx:{fontSize:13,color:"#9a9a97",flexShrink:0},children:["(",k.length,")"]})]}),j(Se,{sx:{flex:"1 1 auto",minHeight:0,display:"flex",flexDirection:"column"},children:j(Zi,{style:{height:"auto",flex:"1 1 auto",minHeight:0},contentStyle:{minWidth:0},thumb:{width:6},children:j(Se,{sx:{display:"flex",flexDirection:"column"},children:k.map(D=>Me(Se,{onClick:()=>no(D),onContextMenu:z=>C(D,z),sx:{px:1.25,py:1,display:"flex",flexDirection:"column",gap:.75,borderBottom:"1px solid #e6e6e3",bgcolor:te.card.bg,cursor:"pointer","&:hover":{bgcolor:"#f7f7f5"}},children:[j(Wt,{task:D,statusOptions:o,showDueDate:!0,titleFontSize:15,onRequestArchiveToggle:y}),(()=>{let z=(D.target_names??[]).filter(ce=>ce.trim());if(z.length===0)return null;let ie=z.length>2?`${z[0]}, ${z[1]} \uC678 ${z.length-2}`:z.join(", ");return Me(Se,{sx:{display:"flex",alignItems:"center",gap:.5,fontSize:12.5,color:"#787774",overflow:"hidden",whiteSpace:"nowrap"},children:[j(bx,{sx:{fontSize:14,flexShrink:0}}),j(Se,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis"},children:ie})]})})()]},D.seq))})})})]}):null,j(rs,{items:ne.map(D=>`${Io}${D.key}`),strategy:Ix,children:bt.map(D=>j(Mx,{column:D,tasks:Wo(D.key),summary:I?.(D.key,Wo(D.key)),onOpenSprintMenu:M||Q||E?(z,ie)=>P({anchorEl:z,sprint:ie}):void 0,statusOptions:o,onRequestArchiveToggle:y,onRequestReply:i,onDueDateClick:Rt,onAddTask:B,canAdd:b&&c==="project",onOpenMenu:N,onCardClick:no,onCardContextMenu:C,grow:c!=="project"},D.key))}),n==="active"&&c==="project"?Me(ns,{onClick:f,sx:{flex:"0 0 270px",minWidth:270,display:"flex",alignItems:"center",justifyContent:"center",gap:.5,py:2,border:"1.5px dashed #cfcfcc",borderRadius:1.5,color:"#787774",fontSize:14,"&:hover":{bgcolor:"#eef2f6",borderColor:"#9a9a97"}},children:[j(Ji,{sx:{fontSize:18}}),"\uC0C8 \uD504\uB85C\uC81D\uD2B8"]}):null,n==="active"&&bt.length===0&&k.length===0?j(Se,{sx:{flex:1,minWidth:240,display:"flex",alignItems:"center",justifyContent:"center",color:"#9a9a97",fontSize:14,py:6},children:c==="project"?"\uD504\uB85C\uC81D\uD2B8\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4. \uC0C8 \uD504\uB85C\uC81D\uD2B8\uB97C \uCD94\uAC00\uD574 \uC5C5\uBB34\uB97C \uC815\uB9AC\uD558\uC138\uC694.":"\uD45C\uC2DC\uD560 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):null]})})}),j(kx,{children:mo?j(Se,{sx:{...pn,width:250,boxShadow:"0 8px 20px rgba(0,0,0,0.18)",cursor:"grabbing"},children:j(Wt,{task:mo,statusOptions:o,showDueDate:!0,titleFontSize:15})}):uo?Me(Se,{sx:{display:"flex",alignItems:"center",gap:.75,width:270,px:1.25,py:1,bgcolor:"#fff",border:"1px solid #dedddb",borderRadius:1.5,boxShadow:"0 8px 20px rgba(0,0,0,0.18)",opacity:.9,cursor:"grabbing"},children:[(()=>{let D=Oe(uo.icon);return D?j(D,{sx:{fontSize:17,color:"#1e3a8a"}}):null})(),j(Se,{component:"span",sx:{fontSize:13.5,fontWeight:700,color:te.board.columnHeaderColor},children:uo.label}),j(Se,{component:"span",sx:is(te.board.badge),children:(Xe.get(uo.key)??[]).length})]}):null})]}),Me(jl,{transitionDuration:0,anchorEl:H?.anchorEl??null,open:!!H,onClose:()=>N(null),children:[pe&&!pe.isArchived&&b?Me(Ct,{onClick:()=>{pe&&B(pe.isDefault?"":pe.key),N(null)},sx:{fontSize:14,gap:1},children:[j(Ji,{sx:{fontSize:18,color:"#787774"}}),"\uC0C8 \uC5C5\uBB34 \uB4F1\uB85D"]}):null,pe&&!pe.isDefault&&!pe.isArchived?Me(Ct,{onClick:()=>{h(pe.key,pe.label,pe.icon),N(null)},sx:{fontSize:14,gap:1},children:[j(Ql,{sx:{fontSize:18,color:"#787774"}}),"\uC218\uC815"]}):null,pe&&!pe.isDefault&&!pe.isArchived?Me(Ct,{onClick:()=>{x(pe.key,!0),N(null)},sx:{fontSize:14,gap:1},children:[j(Jl,{sx:{fontSize:18,color:"#787774"}}),"\uBCF4\uAD00"]}):null,pe&&pe.isArchived?Me(Ct,{onClick:()=>{x(pe.key,!1),N(null)},sx:{fontSize:14,gap:1},children:[j(Zl,{sx:{fontSize:18,color:"#787774"}}),"\uBCF5\uC6D0"]}):null,pe&&!pe.isDefault?j(Gl,{}):null,pe&&!pe.isDefault?Me(Ct,{onClick:()=>{H&&W(H),N(null)},sx:{fontSize:14,gap:1,color:"#e5484d"},children:[j(at,{sx:{fontSize:18}}),"\uC0AD\uC81C"]}):null]}),Me(jl,{transitionDuration:0,anchorEl:$?.anchorEl??null,open:!!$,onClose:()=>P(null),children:[M?Me(Ct,{onClick:()=>{$&&M($.sprint.seq),P(null)},sx:{fontSize:14,gap:1},children:[j(Ql,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uC218\uC815"]}):null,Q?Me(Ct,{onClick:()=>{$&&Q($.sprint.seq,$.sprint.status==="closed"?"active":"closed"),P(null)},sx:{fontSize:14,gap:1},children:[$?.sprint.status==="closed"?j(Zl,{sx:{fontSize:18,color:"#787774"}}):j(Jl,{sx:{fontSize:18,color:"#787774"}}),$?.sprint.status==="closed"?"\uB2E4\uC2DC \uC2DC\uC791":"\uBAA9\uD45C \uC885\uB8CC"]}):null,E?j(Gl,{}):null,E?Me(Ct,{onClick:()=>{$&&de($),P(null)},sx:{fontSize:14,gap:1,color:"#e5484d"},children:[j(at,{sx:{fontSize:18}}),"\uBAA9\uD45C \uC0AD\uC81C"]}):null]}),j(Ue,{open:!!oe,anchorEl:oe?.anchorEl??null,title:`"${oe?.sprint.name??""}" \uBAA9\uD45C\uB97C \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`,confirmText:"\uC0AD\uC81C",onCancel:()=>de(null),onConfirm:()=>{oe&&E?.(oe.sprint.seq),de(null)}}),j(St,{anchorEl:K?.anchorEl??null,open:!!K,date:K?.date??"",reminder:K?.reminder??"none",onClose:()=>F(null),onDateChange:D=>{K&&(a(K.taskSeq,D),F(z=>z&&{...z,date:D}))},onReminderChange:D=>{K&&(l(K.taskSeq,D),F(z=>z&&{...z,reminder:D}))}}),j(Ue,{open:!!A,anchorEl:A?.anchorEl??null,title:`"${A?.column.label??""}" \uD504\uB85C\uC81D\uD2B8\uB97C \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?
|
|
2
|
+
\uC18C\uC18D \uC5C5\uBB34\uB294 \uAE30\uBCF8 \uC5C5\uBB34\uD568\uC73C\uB85C \uC774\uB3D9\uD569\uB2C8\uB2E4.`,confirmText:"\uC0AD\uC81C",onCancel:()=>W(null),onConfirm:()=>{A&&T(A.column.key),W(null)}}),j(Ue,{open:!!w,anchorEl:w?.anchorEl??null,title:w?.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:w?.nextCompleted?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>y(null),onConfirm:()=>{w&&r(w.taskSeq,w.nextCompleted),y(null)}})]})}import{useCallback as It,useMemo as Wn,useRef as Ax,useState as $n}from"react";import{Box as Ve,Button as Lx,ButtonBase as ls,IconButton as as}from"@mui/material";import Nx from"@mui/icons-material/Add";import Fx from"@mui/icons-material/ChevronLeft";import Hx from"@mui/icons-material/ChevronRight";import Wx from"@mui/icons-material/KeyboardArrowDown";import{DatePicker as $x}from"@ehfuse/mui-datetime-picker";import{DndContext as Kx,DragOverlay as Ux,PointerSensor as Vx,pointerWithin as Gx,rectIntersection as Yx,useDroppable as jx,useSensor as Xx,useSensors as Qx}from"@dnd-kit/core";import{SortableContext as Jx,arrayMove as Zx,verticalListSortingStrategy as eg}from"@dnd-kit/sortable";import og from"@ehfuse/overlay-scrollbar";import{useEffect as Ex,useState as Px}from"react";function vt(e){let{loadHolidays:o}=yo(),[t,n]=Px(()=>new Map),r=e.join(",");return Ex(()=>{if(!o||!r){n(new Map);return}let i=!1;return o(r.split(",").map(Number)).then(a=>{if(i)return;let l=new Map;for(let u of a)l.has(u.date)||l.set(u.date,u.name);n(l)}).catch(()=>{}),()=>{i=!0}},[o,r]),t}function Rx(e){let[o,t,n]=e.split("-").map(Number),r=new Date(Date.UTC(o,t-1,n+1)),i=a=>String(a).padStart(2,"0");return`${r.getUTCFullYear()}-${i(r.getUTCMonth()+1)}-${i(r.getUTCDate())}`}function fn(e){let o=new Map;for(let t of e){let n=t.start_date;for(let r=0;r<62&&n<=t.end_date;r+=1){let i=o.get(n);i?i.push(t):o.set(n,[t]),n=Rx(n)}}for(let t of o.values())t.sort((n,r)=>(n.time||"99:99").localeCompare(r.time||"99:99")||n.title.localeCompare(r.title));return o}import{Box as oa,Tooltip as zx}from"@mui/material";import{jsx as ta,jsxs as qx}from"react/jsx-runtime";function xn({event:e,small:o=!1}){let t=e.time?`${e.time} ${e.title}`:e.title,n=e.calendar?`\uAD6C\uAE00 \xB7 ${e.calendar}`:"\uAD6C\uAE00 \uCE98\uB9B0\uB354",r=i=>{i.stopPropagation();let[a,l,u]=e.start_date.split("-").map(Number);window.open(`https://calendar.google.com/calendar/r/day/${a}/${l}/${u}`,"_blank")};return ta(zx,{title:`(${n}) ${t}`,arrow:!0,enterDelay:300,children:qx(oa,{onClick:r,onPointerDown:i=>i.stopPropagation(),sx:{display:"flex",alignItems:"center",gap:.5,px:1,py:o?.6:.8,borderRadius:.75,bgcolor:"#f1f1ef",color:"#37352f",fontSize:15,fontWeight:500,overflow:"hidden",whiteSpace:"nowrap",flexShrink:0,minWidth:0,maxWidth:"100%",cursor:"pointer","&:hover":{bgcolor:"#ececea"}},children:[ta(oa,{component:"span",sx:{width:6,height:6,borderRadius:"50%",bgcolor:"#0f9d58",flexShrink:0}}),ta(oa,{component:"span",sx:{minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},children:t})]})})}import{jsx as Be,jsxs as mt}from"react/jsx-runtime";var tg=["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"],Rr="day-";function na(e){let o=new Date(e);return o.setHours(0,0,0,0),o.setDate(o.getDate()-o.getDay()),o}function ra(e,o){let t=new Date(e);return t.setDate(t.getDate()+o),t}function ng(e){let o=e[0],t=e[e.length-1];return o.getMonth()===t.getMonth()?`${o.getFullYear()}\uB144 ${o.getMonth()+1}\uC6D4`:o.getFullYear()===t.getFullYear()?`${o.getFullYear()}\uB144 ${o.getMonth()+1}\uC6D4 - ${t.getMonth()+1}\uC6D4`:`${o.getFullYear()}\uB144 ${o.getMonth()+1}\uC6D4 - ${t.getFullYear()}\uB144 ${t.getMonth()+1}\uC6D4`}function rg(e){return e.getDate()===1?`${e.getMonth()+1}\uC6D4 1\uC77C`:String(e.getDate())}function ig({dayKey:e,isToday:o,dayLabel:t,holidayName:n,tasks:r,googleEvents:i,statusOptions:a,onRequestArchiveToggle:l,onRequestReply:u,onAddSchedule:c,canAdd:p,onCardClick:d,onCardContextMenu:s,summary:m}){let f=le(),{setNodeRef:B}=jx({id:`${Rr}${e}`});return mt(Ve,{ref:B,sx:{minWidth:0,minHeight:0,height:"100%",display:"flex",flexDirection:"column",bgcolor:o?f.calendar.todayBg:f.calendar.cellBg},children:[mt(Ve,{sx:{display:"flex",justifyContent:"flex-end",alignItems:"center",gap:.5,px:1,height:36,bgcolor:o?f.calendar.todayBg:f.calendar.dateBandBg,borderBottom:r.length>0?`1px solid ${f.calendar.borderColor}`:"none",flexShrink:0},children:[n?Be(Ve,{component:"span",sx:{mr:"auto",fontSize:11.5,fontWeight:600,color:f.colors.danger,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:n}):null,o?Be(Ve,{component:"span",sx:{mr:.75,px:.6,py:.1,borderRadius:.5,fontSize:11,fontWeight:600,bgcolor:f.colors.danger,color:f.calendar.cellBg,lineHeight:1.6},children:"\uC624\uB298"}):null,Be(Ve,{component:"span",sx:{fontSize:12.5,fontWeight:o?700:400,color:n?f.colors.danger:f.colors.textPrimary,flexShrink:0},children:t})]}),m?Be(Ve,{sx:{px:1,py:1,borderBottom:`1px solid ${f.calendar.borderColor}`,flexShrink:0},children:m}):null,Be(Ve,{sx:{flex:1,minHeight:0,bgcolor:o?f.calendar.todayBg:f.colors.surfaceSubtle},children:Be(og,{style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:mt(Ve,{sx:{display:"flex",flexDirection:"column",flexGrow:1},children:[i.length>0?Be(Ve,{sx:{display:"flex",flexDirection:"column",gap:.5,px:1,pt:.75,pb:.25},children:i.map(b=>Be(xn,{event:b},b.uid))}):null,Be(Jx,{items:r.map(b=>String(b.seq)),strategy:eg,children:r.map(b=>Be(Mr,{titleFontSize:15,task:b,statusOptions:a,variant:"list",onRequestArchiveToggle:l,onRequestReply:u,onCardClick:d,onCardContextMenu:s},b.seq))}),Be(Ve,{sx:{flexGrow:1,minHeight:56,display:"flex",flexDirection:"column",pb:1,...p?{"&:hover .taskbox-add-schedule":{opacity:1,pointerEvents:"auto"}}:{}},children:mt(ls,{className:"taskbox-add-schedule",onClick:()=>c(e),sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:.5,px:1.25,py:1.75,borderBottom:`1px dashed ${f.calendar.borderColor}`,bgcolor:f.calendar.cellBg,color:f.colors.accentOnSurface,fontSize:13,fontWeight:500,opacity:0,pointerEvents:"none",transition:"opacity 0.15s","&:hover":{bgcolor:f.calendar.hoverBg}},children:[Be(Nx,{sx:{fontSize:16}}),"\uC5C5\uBB34 \uB4F1\uB85D"]})})]})})})]})}function ss({tasks:e,googleEvents:o=[],statusOptions:t,todayStr:n,onToggleCompleted:r,onMoveTask:i,onRequestReply:a,onAddSchedule:l,canAdd:u=!0,onOpenDetail:c,onTaskContextMenu:p,renderColumnSummary:d}){let s=le(),[m,f]=$n(()=>na(new Date)),[B,b]=$n(null),[h,x]=$n(null),[T,g]=$n(null),[v,C]=$n(null),I=Ax(!1),M=Wn(()=>Array.from({length:7},(O,L)=>ra(m,L)),[m]),Q=Wn(()=>new Map(e.map(O=>[O.seq,O])),[e]),E=Wn(()=>[...new Set(M.map(O=>O.getFullYear()))],[M]),te=vt(E),w=Qx(Xx(Vx,{activationConstraint:{distance:5}})),y=It(O=>{let L=Gx(O),X=L.length>0?L:Yx(O),J=X.filter(ue=>!String(ue.id).startsWith(Rr));return J.length>0?J:X},[]),H=Wn(()=>fn(o),[o]),N=Wn(()=>{let O=new Map;for(let L of e){let X=L.due_date.slice(0,10);if(!X)continue;let J=O.get(X);J?J.push(L):O.set(X,[L])}for(let L of O.values())L.sort((X,J)=>{let ue=X.sort_no>0,Z=J.sort_no>0;if(ue&&Z)return X.sort_no-J.sort_no;if(ue!==Z)return ue?-1:1;if(X.completed!==J.completed)return X.completed?1:-1;let ye=Di(X),R=Di(J);return ye!==R?ye?-1:1:X.seq-J.seq});return O},[e]),$=It(O=>T?(T.get(O)??[]).map(L=>Q.get(L)).filter(L=>!!L):N.get(O)??[],[T,Q,N]),P=It(O=>{C(Number(O.active.id)),g(new Map(M.map(L=>{let X=qe(L);return[X,(N.get(X)??[]).map(J=>J.seq)]})))},[M,N]),oe=It((O,L)=>{if(O.startsWith(Rr))return{day:O.slice(Rr.length),overSeq:null};let X=Number(O);for(let[J,ue]of L)if(ue.includes(X))return{day:J,overSeq:X};return null},[]),de=It(O=>{let{active:L,over:X}=O;X&&g(J=>{if(!J)return J;let ue=Number(L.id),Z=oe(String(X.id),J);if(!Z)return J;let ye=[...J.entries()].find(([,re])=>re.includes(ue))?.[0];if(!ye||ye===Z.day)return J;let R=new Map(J);R.set(ye,(R.get(ye)??[]).filter(re=>re!==ue));let k=[...R.get(Z.day)??[]],ne=k.length;if(Z.overSeq!==null){let re=k.indexOf(Z.overSeq);re!==-1&&(ne=re)}return k.splice(ne,0,ue),R.set(Z.day,k),R})},[oe]),A=It(O=>{let{active:L,over:X}=O,J=T;if(g(null),C(null),I.current=!0,!J||!X)return;let ue=Number(L.id),Z=[...J.entries()].find(([,re])=>re.includes(ue));if(!Z)return;let[ye,R]=Z,k=[...R],ne=oe(String(X.id),J);if(ne&&ne.day===ye&&ne.overSeq!==null&&ne.overSeq!==ue){let re=k.indexOf(ue),ve=k.indexOf(ne.overSeq);re!==-1&&ve!==-1&&(k=Zx(k,re,ve))}i(ue,ye,k)},[T,i,oe]),W=It(()=>{g(null),C(null),I.current=!0},[]),K=It(O=>{if(I.current){I.current=!1;return}c(O)},[c]),F=v!==null?Q.get(v)??null:null;return mt(Ve,{sx:{display:"flex",flexDirection:"column",flex:1,minHeight:0,border:`1px solid ${s.calendar.borderColor}`,borderRadius:"0 0 4px 4px",overflow:"hidden"},children:[mt(Ve,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1,bgcolor:s.calendar.headerBg,borderBottom:`1px solid ${s.calendar.borderColor}`,flexShrink:0},children:[mt(Ve,{sx:{display:"flex",alignItems:"center",gap:.25},children:[Be(as,{size:"small","aria-label":"\uC774\uC804 \uC8FC",onClick:()=>f(ra(m,-7)),children:Be(Fx,{sx:{fontSize:20,color:s.colors.textSecondary}})}),Be(Lx,{size:"small",color:"inherit",onClick:()=>f(na(new Date)),sx:{minWidth:0,px:1,mx:1,fontSize:13,fontWeight:s.mode==="dark"?400:500,color:s.colors.textPrimary},children:"\uC624\uB298"}),Be(as,{size:"small","aria-label":"\uB2E4\uC74C \uC8FC",onClick:()=>f(ra(m,7)),children:Be(Hx,{sx:{fontSize:20,color:s.colors.textSecondary}})})]}),mt(ls,{onClick:O=>x(O.currentTarget),sx:{display:"inline-flex",alignItems:"center",gap:.25,px:.75,py:.25,borderRadius:1,fontSize:15,fontWeight:s.mode==="dark"?400:700,color:s.colors.textPrimary,"&:hover":{bgcolor:s.colors.surfaceHover}},children:[ng(M),Be(Wx,{sx:{fontSize:18,color:s.colors.textMuted}})]})]}),Be(Ve,{sx:{display:"grid",gridTemplateColumns:"repeat(7, minmax(0, 1fr))",bgcolor:s.calendar.headerBg,borderBottom:`1px solid ${s.calendar.borderColor}`,flexShrink:0,"& > *":{borderRight:`1px solid ${s.calendar.borderColor}`},"& > *:last-child":{borderRight:"none"}},children:M.map(O=>{let L=O.getDay(),X=te.has(qe(O));return Be(Ve,{sx:{py:.75,textAlign:"center",fontSize:12.5,color:L===0||X?s.colors.danger:L===6?s.colors.accentOnSurface:s.colors.textSecondary},children:tg[L]},qe(O))})}),Be(Ve,{sx:{flex:1,minHeight:0},children:mt(Kx,{sensors:w,collisionDetection:y,onDragStart:P,onDragOver:de,onDragEnd:A,onDragCancel:W,children:[Be(Ve,{sx:{display:"grid",gridTemplateColumns:"repeat(7, minmax(0, 1fr))",height:"100%",minHeight:0,"& > *":{borderRight:`1px solid ${s.calendar.borderColor}`},"& > *:last-child":{borderRight:"none"}},children:M.map(O=>{let L=qe(O);return Be(ig,{dayKey:L,isToday:L===n,dayLabel:rg(O),holidayName:te.get(L)??"",summary:d?.(L,$(L)),tasks:$(L),googleEvents:H.get(L)??[],statusOptions:t,onRequestArchiveToggle:b,onRequestReply:a,onAddSchedule:l,canAdd:u,onCardClick:K,onCardContextMenu:p},L)})}),Be(Ux,{children:F?Be(Ve,{sx:{...pn,boxShadow:"0 8px 20px rgba(0,0,0,0.18)",cursor:"grabbing"},children:Be(Wt,{task:F,statusOptions:t})}):null})]})}),Be($x,{anchorEl:h,open:!!h,onClose:()=>x(null),selectedDate:m,onDateChange:O=>{f(na(O)),x(null)}}),Be(Ue,{open:!!B,anchorEl:B?.anchorEl??null,title:B?.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:B?.nextCompleted?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>b(null),onConfirm:()=>{B&&r(B.taskSeq,B.nextCompleted),b(null)}})]})}import{useCallback as Kn,useMemo as $t,useState as zr}from"react";import{Box as Ge,Button as ag,ButtonBase as us,IconButton as cs,Tooltip as lg}from"@mui/material";import sg from"@mui/icons-material/Add";import cg from"@mui/icons-material/ChevronLeft";import mg from"@mui/icons-material/ChevronRight";import ug from"@mui/icons-material/KeyboardArrowDown";import{DatePicker as dg}from"@ehfuse/mui-datetime-picker";import{DndContext as pg,DragOverlay as fg,PointerSensor as xg,pointerWithin as gg,rectIntersection as bg,useDraggable as hg,useDroppable as ds,useSensor as kg,useSensors as Tg}from"@dnd-kit/core";import yg from"@ehfuse/overlay-scrollbar";import{jsx as De,jsxs as Ro}from"react/jsx-runtime";var Sg=["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"],qr="mday-",Ar="mchip-",ps=15,fs={high:"#e5484d",medium:"#2f80ed",low:"#d9a514"};function Bg(e){let o=new Date(e);return o.setHours(0,0,0,0),o.setDate(o.getDate()-o.getDay()),o}function Lr(e){let o=new Date(e);return o.setHours(0,0,0,0),o.setDate(1),o}function Cg(e,o){let t=new Date(e);return t.setDate(t.getDate()+o),t}function ms(e,o){let t=Lr(e);return t.setMonth(t.getMonth()+o),t}function vg({task:e,statusOptions:o,isPreview:t=!1,onOpenDetail:n,onContextMenu:r}){let i=le(),a=i.mode==="dark",{attributes:l,listeners:u,setNodeRef:c,isDragging:p}=hg({id:String(e.seq),disabled:t}),{setNodeRef:d}=ds({id:`${Ar}${e.seq}`,disabled:t}),s=Oe(e.icon||_e),[m]=kt(e,o);return De(lg,{title:e.title,arrow:!0,enterDelay:400,children:Ro(Ge,{ref:f=>{c(f),d(f)},...l,...u,onClick:()=>n(e),onContextMenu:f=>r(e,f),sx:{display:"flex",alignItems:"center",gap:.5,py:.6,px:.75,flexShrink:0,borderRadius:.75,bgcolor:m?a?ln(m.dot,i.chip.darkBgAlpha):m.bg:a?i.card.bg:i.colors.surfaceHover,color:m?a?i.chip.darkTextSource==="fg"?m.fg:m.dot:m.fg:i.colors.textPrimary,fontSize:ps,fontWeight:e.completed?400:500,textDecoration:e.completed?"line-through":"none",opacity:t?.5:p?.35:e.completed?.6:1,border:t?`1px dashed ${i.colors.accent}`:"1px solid transparent",pointerEvents:t?"none":"auto",cursor:"pointer",touchAction:"none",overflow:"hidden","&:hover":{filter:"brightness(0.96)"}},children:[De(Ge,{component:"span",sx:{width:6,height:6,borderRadius:"50%",flexShrink:0,bgcolor:fs[e.priority]}}),s?De(s,{sx:{fontSize:14,flexShrink:0,opacity:.75}}):null,Ro(Ge,{component:"span",sx:{minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:i.colors.textPrimary},children:[e.is_event&&e.event_time?`${e.event_time} `:"",e.title]})]})})}function Ig({dayKey:e,dayNumber:o,isToday:t,isOtherMonth:n,weekday:r,holidayName:i,tasks:a,googleEvents:l,statusOptions:u,previewSeq:c,onOpenDetail:p,onTaskContextMenu:d,onAddSchedule:s,canAdd:m}){let f=le(),B=f.mode==="dark",{setNodeRef:b,isOver:h}=ds({id:`${qr}${e}`}),x=a,T=!!i||r===0;return Ro(Ge,{ref:b,sx:{minWidth:0,minHeight:0,display:"flex",flexDirection:"column",gap:.25,p:.5,bgcolor:h?f.colors.accentSoft:t?f.calendar.todayBg:n?f.colors.surfaceSubtle:f.calendar.cellBg,transition:"background-color 0.15s",overflow:"hidden",...m?{"&:hover .taskbox-month-add":{opacity:1,pointerEvents:"auto"}}:{}},children:[Ro(Ge,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:.5,height:22,flexShrink:0,mx:-.5,mt:-.5,px:1,bgcolor:t?f.calendar.todayBg:f.calendar.dateBandBg,borderBottom:`1px solid ${f.calendar.borderColor}`},children:[i?De(Ge,{component:"span",sx:{mr:.25,minWidth:0,fontSize:11,fontWeight:600,color:f.colors.danger,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:i}):null,t?De(Ge,{component:"span",sx:{px:.5,borderRadius:.5,fontSize:10.5,fontWeight:600,bgcolor:f.colors.danger,color:f.calendar.cellBg,lineHeight:1.6},children:"\uC624\uB298"}):null,De(Ge,{component:"span",sx:{fontSize:12.5,fontWeight:t?700:400,color:n?f.colors.textMuted:T?f.colors.danger:r===6?f.colors.accentOnSurface:f.colors.textPrimary,flexShrink:0},children:o})]}),l.map(g=>De(xn,{event:g,small:!0},g.uid)),x.map(g=>De(vg,{task:g,statusOptions:u,isPreview:g.seq===c,onOpenDetail:p,onContextMenu:d},g.seq)),De(Ge,{sx:{flexGrow:1,minHeight:0,display:"flex",alignItems:"flex-start"},children:Ro(us,{className:"taskbox-month-add",onClick:()=>s(e),sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"flex-start",gap:.5,px:1.25,py:.75,borderBottom:`1px dashed ${f.calendar.borderColor}`,bgcolor:f.calendar.cellBg,color:f.colors.accentOnSurface,fontSize:13,fontWeight:500,opacity:0,pointerEvents:"none",transition:"opacity 0.15s","&:hover":{bgcolor:f.calendar.hoverBg}},children:[De(sg,{sx:{fontSize:16}}),"\uC5C5\uBB34 \uB4F1\uB85D"]})})]})}function xs({tasks:e,googleEvents:o=[],statusOptions:t,todayStr:n,onMoveTask:r,onAddSchedule:i,canAdd:a=!0,onOpenDetail:l,onTaskContextMenu:u}){let c=le(),p=c.mode==="dark",[d,s]=zr(()=>Lr(new Date)),[m,f]=zr(null),[B,b]=zr(null),[h,x]=zr(null),T=$t(()=>{let A=Bg(d);return Array.from({length:42},(W,K)=>Cg(A,K))},[d]),g=$t(()=>new Map(e.map(A=>[A.seq,A])),[e]),v=$t(()=>fn(o),[o]),C=$t(()=>[...new Set(T.map(A=>A.getFullYear()))],[T]),I=vt(C),M=$t(()=>{let A=new Map;for(let W of e){let K=W.due_date.slice(0,10);if(!K)continue;let F=A.get(K);F?F.push(W):A.set(K,[W])}for(let W of A.values())W.sort((K,F)=>{let O=K.sort_no>0,L=F.sort_no>0;return O&&L?K.sort_no-F.sort_no:O!==L?O?-1:1:K.completed!==F.completed?K.completed?1:-1:K.seq-F.seq});return A},[e]),Q=Tg(kg(xg,{activationConstraint:{distance:5}})),E=Kn(A=>{let W=gg(A),K=W.length>0?W:bg(A),F=K.filter(O=>String(O.id).startsWith(Ar));return F.length>0?F:K.filter(O=>String(O.id).startsWith(qr))},[]),te=Kn(A=>{b(Number(A.active.id))},[]),w=Kn(A=>{x(A.over?String(A.over.id):null)},[]),y=$t(()=>{let A=new Map;for(let[W,K]of M)for(let F of K)A.set(F.seq,W);return A},[M]),H=B!==null?g.get(B)?.due_date.slice(0,10)??"":"",N=$t(()=>{if(B===null||!h)return null;if(h.startsWith(Ar)){let A=Number(h.slice(Ar.length)),W=y.get(A);if(!W)return null;let K=(M.get(W)??[]).filter(O=>O.seq!==B),F=K.findIndex(O=>O.seq===A);return{day:W,index:F===-1?K.length:F}}if(h.startsWith(qr)){let A=h.slice(qr.length),W=(M.get(A)??[]).filter(K=>K.seq!==B);return{day:A,index:W.length}}return null},[B,y,h,M]),$=Kn(A=>{let W=M.get(A)??[];if(B===null||!N)return W;let K=g.get(B);if(!K)return W;let F=W.filter(O=>O.seq!==B);return A===N.day?[...F.slice(0,N.index),K,...F.slice(N.index)]:A===H?F:W},[B,H,N,g,M]),P=Kn(A=>{let W=B,K=N;if(b(null),x(null),W===null||!K)return;let F=(M.get(K.day)??[]).filter(L=>L.seq!==W),O=[...F.slice(0,K.index).map(L=>L.seq),W,...F.slice(K.index).map(L=>L.seq)];r(W,K.day,O)},[B,N,r,M]),oe=B!==null?g.get(B)??null:null,de=`${d.getFullYear()}\uB144 ${d.getMonth()+1}\uC6D4`;return Ro(Ge,{sx:{display:"flex",flexDirection:"column",flex:1,minHeight:0,border:`1px solid ${c.calendar.borderColor}`,borderRadius:"0 0 4px 4px",overflow:"hidden"},children:[Ro(Ge,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1,bgcolor:c.calendar.headerBg,borderBottom:`1px solid ${c.calendar.borderColor}`,flexShrink:0},children:[Ro(Ge,{sx:{display:"flex",alignItems:"center",gap:.25},children:[De(cs,{size:"small","aria-label":"\uC774\uC804 \uB2EC",onClick:()=>s(ms(d,-1)),children:De(cg,{sx:{fontSize:20,color:c.colors.textSecondary}})}),De(ag,{size:"small",color:"inherit",onClick:()=>s(Lr(new Date)),sx:{minWidth:0,px:1,mx:1,fontSize:13,fontWeight:c.mode==="dark"?400:500,color:c.colors.textPrimary},children:"\uC624\uB298"}),De(cs,{size:"small","aria-label":"\uB2E4\uC74C \uB2EC",onClick:()=>s(ms(d,1)),children:De(mg,{sx:{fontSize:20,color:c.colors.textSecondary}})})]}),Ro(us,{onClick:A=>f(A.currentTarget),sx:{display:"inline-flex",alignItems:"center",gap:.25,ml:{xs:"auto",lg:0},px:.75,py:.25,borderRadius:1,fontSize:15,fontWeight:c.mode==="dark"?400:700,color:c.colors.textPrimary,"&:hover":{bgcolor:c.colors.surfaceHover}},children:[de,De(ug,{sx:{fontSize:18,color:c.colors.textMuted}})]})]}),De(Ge,{sx:{display:"grid",gridTemplateColumns:"repeat(7, minmax(0, 1fr))",bgcolor:c.calendar.headerBg,borderBottom:`1px solid ${c.calendar.borderColor}`,flexShrink:0,"& > *":{borderRight:`1px solid ${c.calendar.borderColor}`},"& > *:last-child":{borderRight:"none"}},children:Sg.map((A,W)=>De(Ge,{sx:{py:.75,textAlign:"center",fontSize:12.5,color:W===0?c.colors.danger:W===6?c.colors.accentOnSurface:c.colors.textSecondary},children:A},A))}),De(Ge,{sx:{flex:1,minHeight:0},children:Ro(pg,{sensors:Q,collisionDetection:E,onDragStart:te,onDragOver:w,onDragEnd:P,onDragCancel:()=>{b(null),x(null)},children:[De(yg,{style:{height:"100%"},thumb:{width:8},children:De(Ge,{sx:{display:"grid",gridTemplateColumns:"repeat(7, minmax(0, 1fr))",gridTemplateRows:"repeat(6, minmax(112px, auto))",minHeight:"100%",flexShrink:0,"& > *":{borderRight:`1px solid ${c.calendar.borderColor}`,borderBottom:`1px solid ${c.calendar.borderColor}`},"& > *:nth-of-type(7n)":{borderRight:"none"},"& > *:nth-last-of-type(-n+7)":{borderBottom:"none"}},children:T.map(A=>{let W=qe(A);return De(Ig,{dayKey:W,dayNumber:A.getDate(),isToday:W===n,isOtherMonth:A.getMonth()!==d.getMonth(),weekday:A.getDay(),holidayName:I.get(W)??"",tasks:$(W),googleEvents:v.get(W)??[],statusOptions:t,previewSeq:N?.day===W?B:null,onOpenDetail:l,onTaskContextMenu:u,onAddSchedule:i,canAdd:a},W)})})}),De(fg,{children:oe?Ro(Ge,{sx:{display:"flex",alignItems:"center",gap:.5,py:.6,px:.75,borderRadius:.75,bgcolor:c.calendar.cellBg,border:`1px solid ${c.calendar.borderColor}`,boxShadow:"0 6px 16px rgba(0,0,0,0.18)",fontSize:ps,fontWeight:500,color:c.colors.textPrimary,cursor:"grabbing",whiteSpace:"nowrap"},children:[De(Ge,{component:"span",sx:{width:6,height:6,borderRadius:"50%",bgcolor:fs[oe.priority]}}),oe.title]}):null})]})}),De(dg,{anchorEl:m,open:!!m,onClose:()=>f(null),selectedDate:d,onDateChange:A=>{s(Lr(A)),f(null)}})]})}import{useEffect as _g,useMemo as Nr,useRef as wg,useState as gs}from"react";import{Box as So,Button as Dg,IconButton as bs}from"@mui/material";import Og from"@mui/icons-material/ChevronLeft";import Mg from"@mui/icons-material/ChevronRight";import Eg from"@mui/icons-material/KeyboardArrowDown";import{DatePicker as Pg}from"@ehfuse/mui-datetime-picker";import{jsx as lo,jsxs as _t}from"react/jsx-runtime";var Rg=["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"],zg={high:"#e5484d",medium:"#2f80ed",low:"#d9a514"};function ia(e){let o=new Date(e);return o.setHours(0,0,0,0),o.setDate(1),o}function hs(e){let o=t=>String(t).padStart(2,"0");return`${e.getFullYear()}-${o(e.getMonth()+1)}-${o(e.getDate())}`}function qg({task:e,statusOptions:o,onOpenDetail:t}){let n=le(),[r]=kt(e,o),i=Oe(e.icon||(e.is_notice?Mo:_e));return _t(So,{onClick:a=>{a.stopPropagation(),t(e)},sx:{display:"flex",alignItems:"center",gap:.5,py:.6,px:1,borderRadius:.75,minWidth:0,maxWidth:"100%",bgcolor:r?.bg??n.colors.surfaceHover,color:r?.fg??n.colors.textPrimary,fontSize:15,fontWeight:e.completed?400:500,textDecoration:e.completed?"line-through":"none",opacity:e.completed?.6:1,cursor:"pointer",overflow:"hidden"},children:[lo(So,{component:"span",sx:{width:6,height:6,borderRadius:"50%",flexShrink:0,bgcolor:zg[e.priority]??n.colors.accentOnSurface}}),i?lo(i,{sx:{fontSize:16,flexShrink:0,opacity:.75}}):null,_t(So,{component:"span",sx:{minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:n.colors.textPrimary},children:[e.is_event&&e.event_time?`${e.event_time} `:"",e.title]})]})}function ks({tasks:e,googleEvents:o=[],statusOptions:t,todayStr:n,onOpenDetail:r,onAddSchedule:i}){let a=le(),[l,u]=gs(()=>ia(new Date)),[c,p]=gs(!1),d=Nr(()=>{let x=new Date(l.getFullYear(),l.getMonth()+1,0).getDate();return Array.from({length:x},(T,g)=>{let v=new Date(l.getFullYear(),l.getMonth(),g+1);return{ymd:hs(v),dayNumber:g+1,weekday:v.getDay()}})},[l]),s=Nr(()=>{let x=new Map;for(let T of e){let g=T.due_date.slice(0,10);if(!g)continue;let v=x.get(g);v?v.push(T):x.set(g,[T])}for(let T of x.values())T.sort((g,v)=>g.completed!==v.completed?g.completed?1:-1:g.seq-v.seq);return x},[e]),m=Nr(()=>fn(o),[o]),f=Nr(()=>[l.getFullYear()],[l]),B=vt(f),b=wg(null),h=n.slice(0,7)===hs(l).slice(0,7);return _g(()=>{if(!h)return;let x=C=>{let I=C?.parentElement??null;for(;I;){let M=window.getComputedStyle(I);if(/(auto|scroll)/.test(M.overflowY)&&I.scrollHeight>I.clientHeight)return I;I=I.parentElement}return null},T=()=>{let C=b.current,I=x(C);if(!I||!C)return;let M=C.getBoundingClientRect().top-I.getBoundingClientRect().top+I.scrollTop;I.scrollTop=Math.max(0,M-I.clientHeight/2+C.clientHeight/2)},g=setTimeout(T,100),v=setTimeout(T,400);return()=>{clearTimeout(g),clearTimeout(v)}},[h,l]),_t(So,{sx:{minWidth:0,maxWidth:"100%",overflow:"hidden",bgcolor:a.colors.surface},children:[_t(So,{sx:{display:"flex",alignItems:"center",gap:.5,px:1.5,py:1,flexShrink:0},children:[lo(bs,{size:"small","aria-label":"\uC774\uC804 \uB2EC",onClick:()=>u(x=>new Date(x.getFullYear(),x.getMonth()-1,1)),children:lo(Og,{sx:{fontSize:20,color:a.colors.textSecondary}})}),lo(Dg,{size:"small",color:"inherit",onClick:()=>u(ia(new Date)),sx:{minWidth:0,px:1,fontSize:13.5,color:a.colors.textPrimary},children:"\uC624\uB298"}),lo(bs,{size:"small","aria-label":"\uB2E4\uC74C \uB2EC",onClick:()=>u(x=>new Date(x.getFullYear(),x.getMonth()+1,1)),children:lo(Mg,{sx:{fontSize:20,color:a.colors.textSecondary}})}),_t(So,{onClick:()=>p(!0),sx:{ml:"auto",pr:.5,display:"flex",alignItems:"center",gap:.25,fontSize:16.5,fontWeight:700,color:a.colors.textPrimary,cursor:"pointer"},children:[l.getFullYear(),"\uB144 ",l.getMonth()+1,"\uC6D4",lo(Eg,{sx:{fontSize:20,color:a.colors.textMuted}})]})]}),lo(So,{sx:{minWidth:0,overflowX:"hidden",borderTop:`1px solid ${a.calendar.borderColor}`},children:d.map(({ymd:x,dayNumber:T,weekday:g})=>{let v=B.get(x)??"",C=x===n,I=!!v||g===0,M=s.get(x)??[],Q=m.get(x)??[],E=M.length>0||Q.length>0;return _t(So,{ref:C?b:void 0,onClick:i?()=>i(x):void 0,sx:{display:"flex",alignItems:"center",gap:1,px:1,minWidth:0,maxWidth:"100%",py:E?.75:.5,minHeight:44,flexShrink:0,borderBottom:`1px solid ${a.calendar.borderColor}`,...i?{cursor:"pointer"}:{}},children:[lo(So,{sx:{width:52,flexShrink:0,display:"flex",flexDirection:"column",alignItems:"center",gap:.25},children:_t(So,{sx:{display:"flex",alignItems:"center",gap:.5},children:[lo(So,{component:"span",sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:26,height:26,borderRadius:"50%",fontSize:15.5,fontWeight:C?700:500,color:C?a.colors.surface:I?a.colors.danger:g===6?a.colors.accentOnSurface:a.colors.textPrimary,bgcolor:C?a.colors.accentOnSurface:"transparent"},children:T}),lo(So,{component:"span",sx:{fontSize:12.5,color:I?a.colors.danger:g===6?a.colors.accentOnSurface:a.colors.textSecondary},children:Rg[g]})]})}),_t(So,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",gap:.5},children:[Q.map(te=>lo(xn,{event:te},te.uid)),M.map(te=>lo(qg,{task:te,statusOptions:t,onOpenDetail:r},te.seq))]})]},x)})}),lo(Pg,{open:c,centered:!0,monthOnly:!0,onClose:()=>p(!1),selectedDate:l,onDateChange:x=>{u(ia(x)),p(!1)}})]})}import{useCallback as Ts,useEffect as ys,useMemo as aa,useRef as Hr,useState as Wr}from"react";import{Box as Ae,Tooltip as Cs}from"@mui/material";import Ag from"@ehfuse/overlay-scrollbar";import Lg from"@mui/icons-material/CheckCircle";import Ng from"@mui/icons-material/RadioButtonUnchecked";import{DndContext as Fg,PointerSensor as Hg,closestCenter as Wg,useSensor as $g,useSensors as Kg}from"@dnd-kit/core";import{SortableContext as Ug,arrayMove as Vg,useSortable as Gg,verticalListSortingStrategy as Yg}from"@dnd-kit/sortable";import jg from"@mui/icons-material/DragIndicator";import{jsx as Re,jsxs as wt}from"react/jsx-runtime";var la=36,Xg=48,Ss=40,Qg=24,Jg=4,Zg=14,Bs=36,eb=12.5,gn=220,ob={high:{bg:"#f6c6c9",border:"#e5484d"},medium:{bg:"#c5d8f6",border:"#2f80ed"},low:{bg:"#f3e3b6",border:"#d9a514"}};function Kt(e){let o=String(e??"").trim();if(!o)return null;let t=new Date(`${o}T00:00:00`);return Number.isNaN(t.getTime())?null:t}function Fr(e,o){let t=new Date(e);return t.setDate(t.getDate()+o),t}function sa(e,o){return Math.round((o.getTime()-e.getTime())/864e5)}function tb({task:e,dragHandle:o,onPointerDown:t,onClick:n}){let r=le(),i=Hr(null),[a,l]=Wr("");return Re(Cs,{title:a,arrow:!0,enterDelay:300,children:wt(Ae,{onPointerDown:t,onClick:u=>n(e,u),onMouseEnter:()=>{let u=i.current;l(u&&u.scrollWidth>u.clientWidth?e.title:"")},sx:{width:gn,flexShrink:0,position:"sticky",left:0,zIndex:2,bgcolor:r.timeline.bg,borderRight:`1px solid ${r.timeline.gridColor}`,display:"flex",alignItems:"center",gap:.5,pl:.5,pr:1.5,fontSize:15,fontWeight:r.mode==="dark"||e.completed?400:500,color:e.completed?r.colors.textMuted:r.colors.textPrimary,overflow:"hidden",whiteSpace:"nowrap",cursor:"pointer",textDecoration:e.completed?"line-through":"none","&:hover":{bgcolor:r.colors.surfaceHover}},children:[o,Re(Ae,{ref:i,component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.title})]})})}function nb({id:e,showIndicator:o,children:t}){let n=le(),{attributes:r,listeners:i,setNodeRef:a}=Gg({id:e});return wt(Ae,{ref:a,sx:{position:"relative"},children:[o?Re(Ae,{sx:{position:"absolute",top:-1,left:0,right:0,height:2,bgcolor:n.colors.accentOnSurface,zIndex:5}}):null,t({...r,...i})]})}function vs({tasks:e,todayStr:o,onOpenDetail:t,onToggleChecklist:n,onReorderTasks:r,onTaskContextMenu:i}){let a=le(),l=aa(()=>[...e].sort((y,H)=>{let N=(y.timeline_sort_no??0)>0,$=(H.timeline_sort_no??0)>0;if(N&&$)return(y.timeline_sort_no??0)-(H.timeline_sort_no??0);if(N!==$)return N?-1:1;let P=y.due_date||y.start_date,oe=H.due_date||H.start_date;return P!==oe?P<oe?-1:1:y.seq-H.seq}),[e]),[u,c]=Wr(null),[p,d]=Wr(null),s=Kg($g(Hg,{activationConstraint:{distance:4}})),m=Ts(y=>{c(y.over?Number(y.over.id):null)},[]),f=Ts(y=>{c(null),d(null);let{active:H,over:N}=y;if(!N||H.id===N.id)return;let $=l.map(de=>de.seq),P=$.indexOf(Number(H.id)),oe=$.indexOf(Number(N.id));P===-1||oe===-1||r(Vg($,P,oe))},[l,r]),B=aa(()=>{let y=Kt(o)??new Date,H=y,N=Fr(y,21);for(let oe of l){let de=Kt(oe.start_date)??Kt(oe.due_date),A=Kt(oe.due_date)??de;de&&de<H&&(H=de),A&&A>N&&(N=A)}let $=Fr(H,-3),P=sa($,Fr(N,3))+1;return Array.from({length:P},(oe,de)=>Fr($,de))},[l,o]),b=B[0],h=B.findIndex(y=>qe(y)===o),{dayWidths:x,dayOffsets:T,gridWidth:g}=aa(()=>{let y=B.map(($,P)=>$.getDate()===1||P===0?Xg:la),H=[],N=0;for(let $ of y)H.push(N),N+=$;return{dayWidths:y,dayOffsets:H,gridWidth:N}},[B]),v=gn+g,C=Hr(null),I=y=>{C.current={x:y.clientX,y:y.clientY}},M=(y,H)=>{let N=C.current;C.current=null,!(N&&(Math.abs(H.clientX-N.x)>5||Math.abs(H.clientY-N.y)>5))&&t(y)},Q=Hr(null),[E,te]=Wr(!1);ys(()=>{let y=Q.current?.getScrollContainer();if(!y)return;let H=()=>te(y.scrollHeight>y.clientHeight);H();let N=new ResizeObserver(H);return N.observe(y),()=>N.disconnect()},[l.length]);let w=Hr(!1);return ys(()=>{if(l.length===0||w.current)return;w.current=!0;let y=window.requestAnimationFrame(()=>{let H=Q.current?.getScrollContainer();!H||h<0||(H.scrollLeft=Math.max(0,T[h]-la*3))});return()=>window.cancelAnimationFrame(y)},[l.length]),Re(Ae,{sx:{flex:1,minHeight:0,minWidth:0,maxWidth:"100%",display:"flex",flexDirection:"column",border:`1px solid ${a.timeline.gridColor}`,borderRadius:"0 0 4px 4px",overflow:"hidden",bgcolor:a.timeline.headerBg},children:Re(Ae,{sx:{flex:1,minHeight:0,minWidth:0,contain:"inline-size"},children:Re(Ag,{ref:Q,style:{height:"100%"},contentStyle:{width:"max-content",minWidth:"100%"},thumb:{width:8},showHorizontalScrollbar:!0,dragScroll:{excludeClasses:["taskbox-timeline-handle"]},children:wt(Ae,{sx:{width:v,position:"relative",bgcolor:a.timeline.bg},children:[wt(Ae,{sx:{display:"flex",position:"sticky",top:0,zIndex:3,bgcolor:a.timeline.headerBg,borderBottom:`1px solid ${a.timeline.gridColor}`},children:[Re(Ae,{sx:{width:gn,height:Bs,flexShrink:0,position:"sticky",left:0,zIndex:4,bgcolor:a.timeline.headerBg,borderRight:`1px solid ${a.timeline.gridColor}`,display:"flex",alignItems:"center",px:1.5,fontSize:13,color:a.colors.textSecondary},children:"\uC81C\uBAA9"}),B.map((y,H)=>{let N=y.getDay(),$=H===h,P=y.getDate()===1||H===0;return Re(Ae,{sx:{width:x[H],height:Bs,flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",fontSize:eb,fontWeight:$&&a.mode!=="dark"?700:400,color:$?a.timeline.bg:N===0?a.colors.danger:N===6?a.colors.accentOnSurface:a.colors.textSecondary,bgcolor:$?a.colors.danger:"transparent",borderRight:`1px solid ${a.timeline.gridColor}`,whiteSpace:"nowrap"},children:P?`${y.getMonth()+1}/${y.getDate()}`:y.getDate()},qe(y))})]}),Re(Fg,{sensors:s,collisionDetection:Wg,onDragStart:y=>d(Number(y.active.id)),onDragOver:m,onDragEnd:f,onDragCancel:()=>{c(null),d(null)},children:Re(Ug,{items:l.map(y=>String(y.seq)),strategy:Yg,children:wt(Ae,{sx:{position:"relative"},children:[B.map((y,H)=>{let N=y.getDay(),$=H===h;return!$&&N!==0&&N!==6?null:Re(Ae,{sx:{position:"absolute",top:0,bottom:0,left:gn+T[H],width:x[H],bgcolor:$?"rgba(229,72,77,0.07)":a.colors.surfaceSubtle,zIndex:0}},`stripe-${qe(y)}`)}),l.map((y,H)=>{let N=Kt(y.start_date)??Kt(y.due_date),$=Kt(y.due_date)??N,P=N?Math.min(B.length-1,Math.max(0,sa(b,N))):0,oe=$?Math.min(B.length-1,Math.max(P,sa(b,$))):P,de=ob[y.priority],A=gn+T[P]+2,W=T[oe]+x[oe]-T[P]-4,K=y.checklist??[];return Re(nb,{id:String(y.seq),showIndicator:u===y.seq&&p!==y.seq,children:F=>wt(Ae,{sx:{borderBottom:H===l.length-1&&E?"none":`1px solid ${a.timeline.gridColor}`,position:"relative",zIndex:1,opacity:p===y.seq?.45:1},children:[wt(Ae,{onContextMenu:O=>i(y,O),sx:{display:"flex",height:Ss,position:"relative","&:hover":{bgcolor:"rgba(47,128,237,0.04)"}},children:[Re(tb,{task:y,dragHandle:Re(Ae,{component:"span",className:"taskbox-timeline-handle",...F,onClick:O=>O.stopPropagation(),sx:{display:"inline-flex",alignItems:"center",flexShrink:0,color:a.colors.accentOnSurface,cursor:"grab",touchAction:"none","&:hover":{color:a.colors.accentOnSurface}},children:(()=>{let O=Oe(y.icon||_e)??jg;return Re(O,{sx:{fontSize:17}})})()}),onPointerDown:I,onClick:M}),Re(Cs,{title:`${y.title} (${y.start_date||"?"} ~ ${y.due_date||"?"})`,arrow:!0,enterDelay:300,children:Re(Ae,{onPointerDown:I,onClick:O=>M(y,O),sx:{position:"absolute",top:(Ss-20)/2,left:A,width:Math.max(la-4,W),height:20,borderRadius:1,bgcolor:de.bg,border:`1px solid ${de.border}`,opacity:y.completed?.45:1,cursor:"pointer","&:hover":{filter:"brightness(0.95)"}}})})]}),K.map((O,L)=>Re(Ae,{sx:{display:"flex",height:Qg,position:"relative",mt:L===0?`${Jg}px`:0,mb:L===K.length-1?`${Zg}px`:0},children:Re(Ae,{sx:{width:gn,flexShrink:0,position:"sticky",left:0,zIndex:2,bgcolor:a.timeline.bg,borderRight:`1px solid ${a.timeline.gridColor}`,display:"flex",alignItems:"center",pl:4.25,pr:1.5,fontSize:13,color:O.checked?a.colors.textMuted:a.colors.textPrimary},children:wt(Ae,{onClick:()=>n(y.seq,L,!O.checked),sx:{display:"inline-flex",alignItems:"center",gap:.75,minWidth:0,cursor:"pointer"},children:[O.checked?Re(Lg,{sx:{fontSize:17,color:a.colors.accentOnSurface,flexShrink:0}}):Re(Ng,{sx:{fontSize:17,color:a.colors.textMuted,flexShrink:0}}),Re(Ae,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",textDecoration:O.checked?"line-through":"none"},children:O.label})]})})},`${y.seq}-check-${L}`))]})},y.seq)}),l.length===0?Re(Ae,{sx:{py:8,textAlign:"center",color:a.colors.textMuted,fontSize:14},children:"\uD45C\uC2DC\uD560 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):null]})})})]})})})})}import{jsx as Ut}from"react/jsx-runtime";function Nw(e){switch(e.view){case"card":case"kanban":{let{view:o,...t}=e;return Ut(ea,{...t,columnAxis:o==="kanban"?"status":"project"})}case"sprint":{let{view:o,...t}=e;return Ut(ea,{...t,columnAxis:"sprint"})}case"calendar":{let{view:o,...t}=e;return Ut(ss,{...t})}case"month":{let{view:o,...t}=e;return Ut(xs,{...t})}case"agenda":{let{view:o,...t}=e;return Ut(ks,{...t})}case"timeline":{let{view:o,...t}=e;return Ut(vs,{...t})}default:{let{view:o,...t}=e;return Ut($l,{...t})}}}var Fw=["list","card","kanban","calendar","month","timeline"];import{Box as bo}from"@mui/material";function rb(e){let o=String(e??"").trim();if(!o)return 0;let t=0,n=!1;for(let r of o.matchAll(/(\d+(?:\.\d+)?)\s*(h|시간|m|분|d|일)/gi)){let i=parseFloat(r[1]),a=r[2].toLowerCase();n=!0,a==="m"||a==="\uBD84"?t+=i/60:a==="d"||a==="\uC77C"?t+=i*8:t+=i}if(!n){let r=parseFloat(o);Number.isFinite(r)&&(t+=r)}return t}function Is(e){let o=Math.round(e*10)/10;return`${o%1===0?o.toFixed(0):o.toFixed(1)}\uC2DC\uAC04`}function _s(e,o,t){if(!/^\d{4}-\d{2}-\d{2}$/.test(e)||!/^\d{4}-\d{2}-\d{2}$/.test(o))return 0;let n=new Date(`${e}T00:00:00`),r=new Date(`${o}T00:00:00`);if(r<n||r.getTime()-n.getTime()>3660*864e5)return 0;let i=0;for(let a=new Date(n);a<=r;a.setDate(a.getDate()+1)){let l=a.getDay();if(l===0||l===6)continue;let u=`${a.getFullYear()}-${String(a.getMonth()+1).padStart(2,"0")}-${String(a.getDate()).padStart(2,"0")}`;t.has(u)||(i+=1)}return i}function ws(e){return e.reduce((o,t)=>t.completed?o:o+rb(t.estimated_time),0)}import{Fragment as ib,jsx as Dt,jsxs as zo}from"react/jsx-runtime";function Ds(e,o){if(!/^\d{4}-\d{2}-\d{2}$/.test(e)||!/^\d{4}-\d{2}-\d{2}$/.test(o))return null;let t=new Date(`${e}T00:00:00`),n=new Date(`${o}T00:00:00`);return Math.round((t.getTime()-n.getTime())/864e5)}function Os({tasks:e,todayStr:o,showProgress:t=!0,dday:n=null,workdaysLeft:r=null,showPoints:i=!0,showHours:a=!0,showOverdue:l=!0,showInfo:u=!0,inline:c=!1}){let p=le(),d=e.filter(M=>!M.archived),s=d.filter(M=>M.completed).length,m=d.length>0?Math.round(s/d.length*100):0,f=d.filter(M=>!M.completed&&!M.is_event&&!!M.due_date&&M.due_date.slice(0,10)<o).length,B=d.reduce((M,Q)=>Q.completed?M:M+(Q.story_points??0),0),b=ws(d),h=t?Dt(bo,{sx:{flex:c?"0 0 110px":"1 1 auto",minWidth:0,height:p.summary.gaugeHeight,borderRadius:3,bgcolor:p.summary.gaugeTrackColor},children:Dt(bo,{sx:{height:"100%",borderRadius:3,width:`${m}%`,bgcolor:m>=100?p.summary.gaugeCompleteColor:p.summary.gaugeBarColor,transition:"width 0.2s"}})}):null,x=t?zo(bo,{component:"span",sx:{flexShrink:0,fontSize:c?14:13,color:p.summary.textColor},children:[m,"%"]}):null,T={color:p.summary.numberColor,fontWeight:700,fontSize:c?15:14},g=d.length-s,v=zo(ib,{children:[c?null:zo("span",{children:["\uB0A8\uC740 ",Dt(bo,{component:"span",sx:T,children:g}),"\uAC74"]}),l&&f>0?zo(bo,{component:"span",sx:{color:p.summary.overdueColor,fontWeight:600},children:["\uC9C0\uC5F0"," ",Dt(bo,{component:"span",sx:{fontWeight:700,fontSize:c?15:14},children:f}),"\uAC74"]}):null,i&&B>0?zo("span",{children:[Dt(bo,{component:"span",sx:T,children:B}),"SP"]}):null,a&&b>0?zo("span",{children:["\uC57D ",Dt(bo,{component:"span",sx:T,children:Is(b).replace("\uC2DC\uAC04","")}),"\uC2DC\uAC04"]}):null]}),C=typeof r=="number"&&Number.isFinite(r)?zo("span",{children:["\uADFC\uBB34\uC77C ",Dt(bo,{component:"span",sx:T,children:r}),"\uC77C"]}):null,I=typeof n=="number"&&Number.isFinite(n)?Dt(bo,{component:"span",sx:{ml:c?0:"auto",flexShrink:0,px:.6,py:.1,borderRadius:.5,fontSize:12,fontWeight:600,bgcolor:p.summary.overdueColor,color:p.colors.textInverse,lineHeight:1.6},children:n===0?"D-day":n>0?`D-${n}`:`D+${-n}`}):null;return c?zo(bo,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0,fontSize:14.5,color:p.summary.textColor,whiteSpace:"nowrap",...p.summary.sx},children:[u?v:null,u?C:null,u?I:null,h,x]}):zo(bo,{sx:{display:"flex",flexDirection:"column",gap:.5},children:[t?zo(bo,{sx:{display:"flex",alignItems:"center",gap:1},children:[h,x]}):null,zo(bo,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,fontSize:13.5,color:p.summary.textColor},children:[v,C,I]})]})}import{useMemo as ab}from"react";import{jsx as lb}from"react/jsx-runtime";function Zw({sprint:e,tasks:o,todayStr:t,...n}){let r=e.status==="closed"?null:Ds(e.end_date,t),i=r!==null&&r>=0,a=ab(()=>{if(!i)return[];let c=Number(t.slice(0,4)),p=Number(e.end_date.slice(0,4))||c,d=[];for(let s=c;s<=Math.max(c,p);s+=1)d.push(s);return d},[i,t,e.end_date]),l=vt(a),u=i?_s(t,e.end_date,new Set(l.keys())):null;return lb(Os,{tasks:o,todayStr:t,dday:r,workdaysLeft:u,...n})}import{useEffect as bb,useRef as hb,useState as kb}from"react";import{Box as ma}from"@mui/material";import{Children as sb}from"react";import{Box as ca,CircularProgress as cb}from"@mui/material";import{jsx as $r}from"react/jsx-runtime";var Ms={xs:2,md:3};function Es(){return $r(ca,{sx:{position:"fixed",top:"calc(50% + 30px)",left:"50%",transform:"translate(-50%, -50%)",zIndex:1},children:$r(cb,{size:44,thickness:4,sx:{color:"#94a3b8"}})})}function Ps({children:e}){return $r(ca,{sx:{minWidth:0,display:"flex",flexDirection:"column",gap:Ms,pb:Ms},children:sb.map(e,o=>o==null||o===!1?null:$r(ca,{sx:{bgcolor:"background.paper",borderRadius:"12px",boxShadow:"0 1px 3px rgba(15,23,42,0.08)",minWidth:0},children:o}))})}import{Box as dt,Button as pb,Checkbox as fb,Typography as Ot}from"@mui/material";import zs from"@mui/icons-material/CheckCircle";import xb from"@mui/icons-material/CheckCircleOutlineOutlined";import{Fragment as db,jsx as Rs}from"react/jsx-runtime";var mb="taskbox-search-highlight";function ub(e,o){let t=o?.keyPrefix??"hl";return e.map((n,r)=>Rs("span",{className:n.highlight?o?.highlightClassName??mb:o?.className,style:n.highlight?{fontWeight:700,color:"#2563eb"}:void 0,children:n.text},`${t}-${n.text}-${r}`))}function Kr({text:e,keyword:o,fallback:t="-",className:n,highlightClassName:r,keyPrefix:i}){let a=String(e??"").trim()||t,l=yr(a,o);return Rs(db,{children:ub(l,{className:n,highlightClassName:r,keyPrefix:i})})}import{jsx as ge,jsxs as bn}from"react/jsx-runtime";var gb={flexShrink:0,minWidth:64,textAlign:"center",px:.75,py:.35,borderRadius:.75,bgcolor:"#f1f5f9",color:"#64748b",fontSize:po(12.5),fontWeight:500,lineHeight:1.4},ut={fontSize:po(14.5),color:"#374151",minWidth:0,lineHeight:1.45};function Yo({label:e,children:o}){return bn(dt,{sx:{display:"flex",alignItems:"flex-start",gap:1,minWidth:0},children:[ge(dt,{sx:gb,children:e}),ge(dt,{sx:{...ut,flex:1,pt:.2},children:o})]})}function qs({task:e,statusOptions:o,projectLabel:t,searchText:n,todayStr:r,onRequestToggleCompleted:i,onOpenDetail:a,onTaskContextMenu:l,targetSummary:u="",ackInfo:c,completeLocked:p=!1,unread:d=!1,noticeReadOnly:s=!1,onAckConfirm:m,onAckListClick:f,myManaged:B=!1}){let b=e.is_event?An(e):fo(e),h=Vo(e.start_date),x=Vo(e.due_date),T=!e.is_notice&&!e.completed&&!!e.due_date&&e.due_date<r,g=(e.receiver_names??[]).filter(Boolean);return bn(dt,{role:"button",tabIndex:0,onClick:()=>a(e),onKeyDown:v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),a(e))},onContextMenu:v=>l(e,v),sx:{display:"flex",flexDirection:"column",gap:.75,minWidth:0,p:1.25,cursor:"pointer",position:"relative"},children:[B?ge(dt,{sx:{position:"absolute",left:3,top:5,bottom:5,width:3,borderRadius:"999px",bgcolor:"#2f80ed"}}):null,bn(dt,{sx:{display:"flex",alignItems:"flex-start",gap:.75,minWidth:0,mb:1},children:[!s&&!p?ge(fb,{checked:e.completed,icon:ge(xb,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:ge(zs,{sx:{fontSize:22,color:"#2f80ed"}}),onClick:v=>v.stopPropagation(),onChange:(v,C)=>i({anchorEl:v.currentTarget,taskSeq:e.seq,nextCompleted:C}),sx:{p:0,mt:.1,flexShrink:0}}):null,(()=>{let v=Oe(e.icon||(e.is_notice?Mo:_e));if(!v)return null;let C=e.icon_color||(e.is_notice?"#e5484d":"#1e3a8a");return ge(v,{sx:{fontSize:19,flexShrink:0,mt:"1px",color:C}})})(),ge(Ot,{sx:{fontSize:po(16),fontWeight:600,lineHeight:1.35,minWidth:0,flex:1,color:e.completed?"#9a9a97":"#111827",textDecoration:e.completed?"line-through":"none"},children:ge(Kr,{text:e.title,keyword:n})}),d?ge(dt,{component:"span",sx:{flexShrink:0,px:.55,fontSize:po(10.5),fontWeight:700,lineHeight:1.6,color:"#fff",bgcolor:"#e5484d",borderRadius:"4px"},children:"N"}):null]}),bn(dt,{sx:{display:"flex",flexDirection:"column",gap:.6,minWidth:0},children:[ge(Yo,{label:b?"\uC0C1\uD0DC":"\uC911\uC694\uB3C4",children:bn(dt,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:.5},children:[b?ge(we,{option:b,small:!0}):null,ge(Eo,{priority:e.priority,small:!0})]})}),(e.label_keys??[]).length>0?ge(Yo,{label:"\uB77C\uBCA8",children:ge(Tt,{labelKeys:e.label_keys,labelOptions:o})}):null,t?ge(Yo,{label:"\uD504\uB85C\uC81D\uD2B8",children:ge(Ot,{sx:ut,children:t})}):null,h?ge(Yo,{label:"\uC2DC\uC791",children:ge(Ot,{sx:ut,children:h})}):null,x?ge(Yo,{label:"\uB9C8\uAC10",children:bn(Ot,{sx:{...ut,color:T?"#e5484d":ut.color,fontWeight:T?600:400},children:[x,T?" \xB7 \uC9C0\uC5F0":""]})}):null,e.is_notice?ge(Yo,{label:"\uB300\uC0C1\uC790",children:ge(Ot,{sx:ut,children:u||"\uBAA8\uB4E0 \uC9C1\uC6D0"})}):null,e.is_notice&&c?ge(Yo,{label:"\uD655\uC778",children:ge(pb,{size:"small",variant:c.canAck?"contained":"outlined",color:"inherit",startIcon:c.acked?ge(zs,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:v=>{v.stopPropagation(),c.canAck?m?.(e):f?.(e,v.currentTarget)},sx:{py:0,px:1.25,minWidth:0,fontSize:po(13),...c.canAck?{color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}}:{bgcolor:"#fff",borderColor:"#d5d8dc"}},children:c.canAck?"\uD655\uC778":`${c.count}/${c.total}`})}):null,!e.is_notice&&e.manager_name?ge(Yo,{label:"\uCC45\uC784\uC790",children:ge(Ot,{sx:ut,children:ge(Kr,{text:e.manager_name,keyword:n})})}):null,!e.is_notice&&g.length>0?ge(Yo,{label:"\uCC38\uC870\uC790",children:ge(Ot,{sx:ut,children:g.join(", ")})}):null,e.note?ge(Yo,{label:"\uBE44\uACE0",children:ge(Ot,{sx:ut,children:ge(Kr,{text:e.note,keyword:n})})}):null]})]})}import{jsx as hn,jsxs as Tb}from"react/jsx-runtime";function ID({tasks:e,statusOptions:o,customTabs:t,loading:n,searchText:r,todayStr:i,onToggleCompleted:a,onOpenDetail:l,onTaskContextMenu:u,getTargetSummary:c,getAckInfo:p,getNoticeReadOnly:d,isTaskUnread:s,getCompleteLocked:m,onAckConfirm:f,onAckListClick:B,onEndReached:b,myAccountSeq:h=0}){let x=new Map(t.map(C=>[C.key,C.label])),[T,g]=kb(null),v=hb(null);return bb(()=>{let C=v.current;if(!b||!C)return;let I=new IntersectionObserver(M=>{M[0]?.isIntersecting&&b()});return I.observe(C),()=>I.disconnect()},[b,e.length]),e.length===0?n?hn(Es,{}):hn(ma,{sx:{py:6,textAlign:"center",color:"#94a3b8",fontSize:"0.9rem"},children:"\uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):Tb(ma,{sx:{minWidth:0},children:[hn(Ps,{children:e.map(C=>hn(qs,{myManaged:h>0&&!C.is_notice&&!C.is_event&&(C.manager_account_seq??0)===h,task:C,statusOptions:o,projectLabel:C.tab_key?x.get(C.tab_key)??"":"",searchText:r,todayStr:i,onRequestToggleCompleted:g,onOpenDetail:l,onTaskContextMenu:u,targetSummary:C.is_notice?c?.(C):void 0,ackInfo:C.is_notice?p?.(C):void 0,noticeReadOnly:C.is_notice?d?.(C):!1,unread:s?.(C)??!1,completeLocked:m?.(C)??!1,onAckConfirm:f,onAckListClick:B},C.seq))}),b?hn(ma,{ref:v,sx:{height:"1px"}}):null,hn(Ue,{open:!!T,anchorEl:T?.anchorEl??null,title:T?.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:T?.nextCompleted?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>g(null),onConfirm:()=>{T&&a(T.taskSeq,T.nextCompleted),g(null)}})]})}import{useEffect as uk,useRef as dk,useState as pc}from"react";import{Box as Qn,Button as fc,Divider as pk,Drawer as fk,IconButton as Ca,Tooltip as xk}from"@mui/material";import gk from"@mui/icons-material/Close";import bk from"@mui/icons-material/ArrowBack";import hk from"@ehfuse/overlay-scrollbar";import{Box as ua,ButtonBase as yb,Divider as Sb,Popover as Bb}from"@mui/material";import Cb from"@mui/icons-material/Check";import vb from"@ehfuse/overlay-scrollbar";import{jsx as Vt,jsxs as Ls}from"react/jsx-runtime";var As=["#1e3a8a","#2f80ed","#06b6d4","#0fa3a3","#2f9e5b","#84cc16","#e8a33d","#d9730d","#e5484d","#e255a1","#a355c0","#8a5a2b","#57564f","#111827"];function Ur({anchorEl:e,value:o,color:t="",onSelect:n,onSelectColor:r,onClose:i}){return Vt(Bb,{transitionDuration:0,open:!!e,anchorEl:e,onClose:i,anchorOrigin:{vertical:"bottom",horizontal:"left"},marginThreshold:16,slotProps:{paper:{sx:{mt:1,maxHeight:"calc(100dvh - 96px)"}}},children:Ls(ua,{sx:{width:"min(492px, calc(100vw - 32px))"},children:[Vt(vb,{style:{maxHeight:"min(432px, calc(100dvh - 240px))"},contentStyle:{minWidth:0,padding:10},thumb:{width:6},children:Vt(Ir,{value:o||_e,onChange:a=>{n(a),i()}})}),r?Ls(ua,{sx:{px:1.25,pb:1.25},children:[Vt(Sb,{sx:{mb:1,borderColor:"#efefed"}}),Vt(ua,{sx:{display:"flex",flexWrap:"wrap",gap:.75},children:As.map(a=>{let l=(t||As[0])===a;return Vt(yb,{"aria-label":`\uC544\uC774\uCF58 \uC0C9 ${a}`,onClick:()=>r(a),sx:{width:26,height:26,borderRadius:"50%",bgcolor:a,display:"flex",alignItems:"center",justifyContent:"center"},children:l?Vt(Cb,{sx:{fontSize:15,color:"#ffffff"}}):null},a)})})]}):null]})})}import{useState as mc}from"react";import{Box as Yn,ButtonBase as ok,Divider as jn,Menu as tk,MenuItem as nk}from"@mui/material";import rk from"@mui/icons-material/SubjectOutlined";import ik from"@mui/icons-material/StickyNote2Outlined";import ak from"@mui/icons-material/LabelOutlined";import lk from"@mui/icons-material/DirectionsRunOutlined";import sk from"@mui/icons-material/SpeedOutlined";import{TextField as ck}from"@ehfuse/mui-form-controls";import{InfoAlert as mk}from"@ehfuse/alerts";import{useState as Mt}from"react";import{Box as Gs,Divider as Kb,ListItemIcon as Ub,Menu as fa,MenuItem as Un}from"@mui/material";import Vb from"@mui/icons-material/Add";import Gr from"@mui/icons-material/Check";import Gb from"@mui/icons-material/ViewKanbanOutlined";import Yb from"@mui/icons-material/CalendarTodayOutlined";import jb from"@mui/icons-material/EventOutlined";import Xb from"@mui/icons-material/PersonOutlineOutlined";import $s from"@mui/icons-material/PeopleAltOutlined";import Qb from"@mui/icons-material/FlagOutlined";import Ks from"@mui/icons-material/TimerOutlined";import Jb from"@mui/icons-material/NotificationsNoneOutlined";import Zb from"@mui/icons-material/InboxOutlined";import eh from"@mui/icons-material/PlaceOutlined";import oh from"@mui/icons-material/MapOutlined";import{DatePicker as th,TimePicker as Us}from"@ehfuse/mui-datetime-picker";var jo="@media (max-width: 719.95px)";function so(e){return{[jo]:{order:e}}}import{useEffect as Ib,useState as _b}from"react";import{Box as wb}from"@mui/material";import{jsx as Db}from"react/jsx-runtime";function pt({value:e,placeholder:o,readOnly:t,onCommit:n}){let r=le(),[i,a]=_b(e);return Ib(()=>a(e),[e]),Db(wb,{component:"input",spellCheck:!1,value:i,readOnly:t,placeholder:o,onChange:l=>a(l.target.value),onBlur:()=>{i.trim()!==e&&n(i.trim())},onKeyDown:l=>{l.key==="Enter"&&l.target.blur()},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:14,color:r.colors.textPrimary,caretColor:r.colors.textPrimary,bgcolor:"transparent",p:0,"&::placeholder":{color:"#9a9a97"}}})}import{Box as da}from"@mui/material";import{jsx as Ob,jsxs as Ns}from"react/jsx-runtime";function xe({icon:e,label:o,onClick:t,sx:n,children:r}){return Ns(da,{sx:[{display:"flex",alignItems:"center",minHeight:26,[jo]:{minHeight:25}},...Array.isArray(n)?n:[n]],children:[Ns(da,{sx:{display:"flex",alignItems:"center",gap:1,width:104,flexShrink:0,fontSize:13.5,color:"#787774"},children:[e,o]}),Ob(da,{onClick:t?i=>t(i.currentTarget):void 0,sx:{flex:1,minWidth:0,display:"flex",alignItems:"center",gap:.5,px:1,py:.25,borderRadius:1,fontSize:14,cursor:t?"pointer":"default","&:hover":t?{bgcolor:"#f2f2f0"}:void 0,[jo]:{py:.25}},children:r})]})}import{Suspense as Mb,lazy as Eb,useEffect as Pb,useState as Fs}from"react";import{Box as pa,Dialog as Rb,DialogContent as zb,DialogTitle as qb,IconButton as Hs,Tooltip as Ab}from"@mui/material";import Lb from"@mui/icons-material/Close";import Nb from"@mui/icons-material/Search";import{Fragment as $b,jsx as qo,jsxs as Vr}from"react/jsx-runtime";function Fb(e){return qo(pa,{sx:{p:3,fontSize:14,color:"#9a9a97"},children:"\uC8FC\uC18C \uAC80\uC0C9 \uBAA8\uB4C8(react-daum-postcode)\uC744 \uBD88\uB7EC\uC62C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uC8FC\uC18C\uB97C \uC9C1\uC811 \uC785\uB825\uD574 \uC8FC\uC138\uC694."})}var Hb=Eb(()=>import("react-daum-postcode").then(e=>({default:e.default})).catch(()=>({default:Fb})));function Wb(e){if(e.addressType!=="R")return e.address;let o="";return e.bname!==""&&/[동|로|가]$/g.test(e.bname)&&(o+=e.bname),e.buildingName!==""&&e.apartment==="Y"&&(o+=o!==""?`, ${e.buildingName}`:e.buildingName),o!==""?`${e.address} (${o})`:e.address}function Ws({value:e,placeholder:o="\uC8FC\uC18C \uC785\uB825",readOnly:t,onCommit:n}){let[r,i]=Fs(e),[a,l]=Fs(!1),u=yo().slots?.addressSearch;Pb(()=>i(e),[e]);let c=d=>{i(d),l(!1),d!==e&&n(d)};return Vr($b,{children:[Vr(pa,{sx:{display:"flex",alignItems:"center",gap:.5,flex:1,minWidth:0},children:[qo(pa,{component:"input",spellCheck:!1,value:r,readOnly:t,placeholder:o,onChange:d=>i(d.target.value),onBlur:()=>{a||r.trim()!==e&&n(r.trim())},onKeyDown:d=>{d.key==="Enter"&&(d.preventDefault(),!t&&l(!0))},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:14,color:"#37352f",bgcolor:"transparent",p:0,"&::placeholder":{color:"#9a9a97"}}}),t?null:qo(Ab,{title:"\uC8FC\uC18C \uAC80\uC0C9",arrow:!0,children:qo(Hs,{tabIndex:-1,size:"small","aria-label":"\uC8FC\uC18C \uAC80\uC0C9",onClick:()=>l(!0),sx:{color:"#9a9a97",p:.25,flexShrink:0},children:qo(Nb,{sx:{fontSize:17}})})})]}),u?qo(u,{open:a,onComplete:c,onClose:()=>l(!1)}):Vr(Rb,{open:a,onClose:()=>l(!1),maxWidth:"sm",fullWidth:!0,slotProps:{paper:{sx:{height:550}}},children:[Vr(qb,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",pr:2},children:["\uC8FC\uC18C \uAC80\uC0C9",qo(Hs,{onClick:()=>l(!1),size:"small",children:qo(Lb,{})})]}),qo(zb,{style:{padding:0},dividers:!0,children:a?qo(Mb,{fallback:null,children:qo(Hb,{onComplete:d=>{c(Wb(d))},onClose:()=>l(!1),defaultQuery:r,style:{width:"100%",height:"100%"}})}):null})]})]})}import{Fragment as Yr,jsx as Y,jsxs as Ao}from"react/jsx-runtime";function nh(e){let o=e?new Date(`${e}T00:00:00`):new Date;return Number.isNaN(o.getTime())?new Date:o}function Vs(e){let[o="00",t="00"]=String(e??"").split(":");return{hour:/^\d{2}$/.test(o)?o:"00",minute:/^\d{2}$/.test(t)?t:"00"}}function Gt({label:e="\uBE44\uC5B4 \uC788\uC74C"}){return Y(Gs,{component:"span",sx:{color:"#9a9a97"},children:e})}function jr({values:e,customTabs:o,avatarSrcByName:t,showEstimatedTime:n=!1,managerLocked:r=!1,notice:i=!1,event:a=!1,readOnly:l=!1,targetSummary:u="",narrowCollapsedSx:c,reminderLocked:p=!1,managerAction:d,hideProject:s=!1,leading:m,trailing:f,onChangeProject:B,onChangeStartDate:b,onChangeDueDate:h,onChangeReminder:x,onChangePriority:T,onChangeEstimatedTime:g,onChangeEventTime:v,onChangeEventPlace:C,onChangeEventAddress:I,onMemberEdit:M,onAddProject:Q}){let[E,te]=Mt(null),[w,y]=Mt(!1),[H,N]=Mt(null),[$,P]=Mt(null),[oe,de]=Mt(null),[A,W]=Mt(null),[K,F]=Mt(null),[O,L]=Mt(null),X=He(),J=Uo(),ue=R=>[so(R),...c?Array.isArray(c)?c:[c]:[]],Z=o.find(R=>R.key===e.tabKey),ye=o.filter(R=>!R.archived);return Ao(Yr,{children:[Ao(Gs,{sx:{display:"grid",gridTemplateColumns:"repeat(2, minmax(0, 1fr))",columnGap:3,rowGap:.25,px:2,[jo]:{gridTemplateColumns:"minmax(0, 1fr)"}},children:[m,s?null:Y(xe,{icon:Y(Gb,{sx:{fontSize:17}}),label:"\uD504\uB85C\uC81D\uD2B8",onClick:l?void 0:R=>te(R),sx:ue(1),children:Z?(()=>{let R=Oe(Z.icon);return Ao(Yr,{children:[R?Y(R,{sx:{fontSize:16,color:"#1e3a8a"}}):null,Z.label]})})():"\uAE30\uBCF8"}),i?Y(xe,{icon:Y($s,{sx:{fontSize:17}}),label:"\uB300\uC0C1\uC790",onClick:l?void 0:()=>M("targets"),sx:so(7),children:u||"\uBAA8\uB4E0 \uC9C1\uC6D0"}):null,!i&&!a?Y(xe,{icon:Y(Xb,{sx:{fontSize:17}}),label:"\uCC45\uC784\uC790",onClick:r||l||!e.managerName&&d?void 0:()=>M("manager"),sx:so(7),children:e.managerName?Ao(Yr,{children:[Y(xo,{names:[e.managerName],size:20,avatarSrcByName:t}),e.managerName]}):d??Y(Gt,{})}):null,a?null:Y(xe,{icon:Y(Yb,{sx:{fontSize:17}}),label:"\uC2DC\uC791\uC77C\uC790",onClick:l?void 0:R=>de(R),sx:so(2),children:e.startDate?Vo(e.startDate):Y(Gt,{})}),i?null:Y(xe,{icon:Y($s,{sx:{fontSize:17}}),label:a?"\uCC38\uC11D\uC790":"\uCC38\uC870\uC790",onClick:l?void 0:()=>M("receivers"),sx:so(a?7:8),children:e.receiverNames.length>0?Ao(Yr,{children:[Y(xo,{names:e.receiverNames,size:20,avatarSrcByName:t}),e.receiverNames.length===1?e.receiverNames[0]:null]}):Y(Gt,{})}),Y(xe,{icon:Y(jb,{sx:{fontSize:17}}),label:a?"\uB0A0\uC9DC":"\uB9C8\uAC10\uAE30\uD55C",onClick:l?void 0:R=>W(R),sx:so(3),children:e.dueDate?Vo(e.dueDate):Y(Gt,{})}),a?Y(xe,{icon:Y(Ks,{sx:{fontSize:17}}),label:"\uC2DC\uAC01",onClick:l?void 0:R=>L(R),sx:so(4),children:e.eventTime?e.eventTime:Y(Gt,{label:"\uC885\uC77C"})}):null,a?Y(xe,{icon:Y(eh,{sx:{fontSize:17}}),label:"\uC7A5\uC18C",sx:so(5),children:Y(pt,{value:e.eventPlace??"",placeholder:"\uC7A5\uC18C \uC785\uB825",readOnly:l,onCommit:R=>C?.(R)})}):null,n?Y(xe,{icon:Y(Ks,{sx:{fontSize:17}}),label:"\uC608\uC0C1\uC2DC\uAC04",onClick:l?void 0:R=>F(R),sx:ue(4),children:e.estimatedTime?e.estimatedTime:Y(Gt,{})}):null,Y(xe,{icon:Y(Jb,{sx:{fontSize:17}}),label:"\uB9AC\uB9C8\uC778\uB354",onClick:l||p?void 0:R=>P(R),sx:ue(a?8:5),children:e.reminder==="none"?Y(Gt,{label:"\uC5C6\uC74C"}):Ki(e.reminder)}),a?Y(xe,{icon:Y(oh,{sx:{fontSize:17}}),label:"\uC8FC\uC18C",sx:[{gridColumn:"1 / -1"},so(6)],children:Y(Ws,{value:e.eventAddress??"",placeholder:"\uC8FC\uC18C \uC785\uB825",readOnly:l,onCommit:R=>I?.(R)})}):null,a?null:Y(xe,{icon:Y(Qb,{sx:{fontSize:17}}),label:"\uC911\uC694\uB3C4",onClick:l?void 0:R=>N(R),sx:ue(6),children:Y(Eo,{priority:e.priority,small:!0})}),f]}),Ao(fa,{transitionDuration:0,anchorEl:E,open:!!E,onClose:()=>te(null),...J,children:[Ao(Un,{selected:!e.tabKey,onClick:()=>{B(""),te(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[Y(Zb,{sx:{fontSize:17,color:"#9a9a97"}}),"\uC5C6\uC74C",e.tabKey?null:Y(Gr,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}})]}),ye.map(R=>{let k=Oe(R.icon),ne=e.tabKey===R.key;return Ao(Un,{selected:ne,onClick:()=>{B(R.key),te(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[k?Y(k,{sx:{fontSize:17,color:"#1e3a8a"}}):null,R.label,ne?Y(Gr,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},R.key)}),Q?[Y(Kb,{},"add-project-divider"),Ao(Un,{onClick:()=>y(!0),sx:{fontSize:14,color:"#787774"},children:[Y(Ub,{children:Y(Vb,{sx:{fontSize:18,color:"#787774"}})}),"\uD504\uB85C\uC81D\uD2B8 \uCD94\uAC00"]},"add-project")]:null]}),Q?Y(_r,{open:w,onClose:()=>y(!1),onSubmit:(R,k,ne)=>{(async()=>{let re=await Q(R,k,ne);re&&B(re)})(),te(null)}}):null,Y(fa,{transitionDuration:0,anchorEl:H,open:!!H,onClose:()=>N(null),...J,children:["high","medium","low"].map(R=>Ao(Un,{selected:e.priority===R,onClick:()=>{T(R),N(null)},sx:{fontSize:14,minWidth:130,gap:1},children:[Y(Eo,{priority:R,small:!0}),e.priority===R?Y(Gr,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},R))}),Y(fa,{transitionDuration:0,anchorEl:$,open:!!$,onClose:()=>P(null),...J,children:$i(a&&!!e.eventTime).map(R=>Ao(Un,{selected:e.reminder===R.value,onClick:()=>{x(R.value),P(null)},sx:{fontSize:14,minWidth:150,gap:1},children:[R.label,e.reminder===R.value?Y(Gr,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},R.value))}),n?Y(Us,{anchorEl:K,open:!!K,onClose:()=>F(null),value:Vs(e.estimatedTime),format:"HH:mm",minuteStep:5,autoApply:!0,centered:X,locale:"ko",onChange:(R,k)=>{g?.(`${R}:${k}`),F(null)}}):null,a?Y(Us,{anchorEl:O,open:!!O,onClose:()=>L(null),value:Vs(e.eventTime),format:"HH:mm",minuteStep:10,autoApply:!0,centered:X,locale:"ko",onChange:(R,k)=>{v?.(`${R}:${k}`),L(null)}}):null,Y(th,{anchorEl:oe,open:!!oe,onClose:()=>de(null),selectedDate:nh(e.startDate),centered:X,onDateChange:R=>{b(qe(R)),de(null)}}),Y(St,{anchorEl:A,open:!!A,date:e.dueDate,reminder:e.reminder,hideReminder:p,centered:X,onClose:()=>W(null),onDateChange:h,onReminderChange:x})]})}import{useState as rh}from"react";import{Box as ih,Menu as ah,MenuItem as lh}from"@mui/material";import sh from"@mui/icons-material/RepeatOutlined";import ch from"@mui/icons-material/DevicesOutlined";import mh from"@mui/icons-material/ScreenSearchDesktopOutlined";import uh from"@mui/icons-material/SellOutlined";import dh from"@mui/icons-material/TaskAltOutlined";import{Fragment as Ys,jsx as Ye,jsxs as js}from"react/jsx-runtime";function xa({label:e="\uBE44\uC5B4 \uC788\uC74C"}){return Ye(ih,{component:"span",sx:{color:"#9a9a97"},children:e})}function Xr({values:e,readOnly:o=!1,showResolution:t=!1,onChangeRepro:n,onChangeDevice:r,onChangeWhere:i,onChangeVersion:a,onChangeResolution:l}){let[u,c]=rh(null),p=u?.field==="repro"?Bi:u?.field==="device"?Ci:vi,d=s=>{u?.field==="repro"?n(s):u?.field==="device"?r(s):u?.field==="resolution"&&l?.(s),c(null)};return js(Ys,{children:[js(Ys,{children:[Ye(xe,{icon:Ye(sh,{sx:{fontSize:17}}),label:"\uC7AC\uD604\uBE48\uB3C4",onClick:o?void 0:s=>c({field:"repro",el:s}),children:xl(e.repro)||Ye(xa,{label:"\uC120\uD0DD"})}),Ye(xe,{icon:Ye(ch,{sx:{fontSize:17}}),label:"\uB514\uBC14\uC774\uC2A4",onClick:o?void 0:s=>c({field:"device",el:s}),children:gl(e.device)||Ye(xa,{label:"\uC120\uD0DD"})}),Ye(xe,{icon:Ye(mh,{sx:{fontSize:17}}),label:"\uBC1C\uC0DD\uD654\uBA74",children:Ye(pt,{value:e.where,placeholder:"\uC608: POS > \uC8FC\uBB38\uD604\uD669",readOnly:o,onCommit:i})}),Ye(xe,{icon:Ye(uh,{sx:{fontSize:17}}),label:"\uBC1C\uC0DD\uBC84\uC804",children:Ye(pt,{value:e.version,placeholder:"\uC608: 2026-08-06 \uBC30\uD3EC",readOnly:o,onCommit:a})}),t?Ye(xe,{icon:Ye(dh,{sx:{fontSize:17}}),label:"\uC885\uB8CC\uC0AC\uC720",onClick:o?void 0:s=>c({field:"resolution",el:s}),children:ur(e.resolution)||Ye(xa,{label:"\uC120\uD0DD"})}):null]}),Ye(ah,{open:!!u,anchorEl:u?.el??null,onClose:()=>c(null),transitionDuration:0,children:p.map(s=>Ye(lh,{onClick:()=>d(s.key),sx:{fontSize:14},children:s.name},s.key))})]})}import{Box as Xs}from"@mui/material";import{jsxs as Qs}from"react/jsx-runtime";function _o({icon:e,title:o,titleExtra:t,children:n}){return Qs(Xs,{sx:{px:2,display:"flex",flexDirection:"column",gap:.25},children:[Qs(Xs,{sx:{display:"flex",alignItems:"center",gap:1,fontSize:14.5,fontWeight:500,color:"#37352f"},children:[e,o,t]}),n]})}import{useEffect as ph,useRef as ga,useState as fh}from"react";import{Box as ba,IconButton as xh,Tooltip as gh}from"@mui/material";import bh from"@mui/icons-material/ContentCopyOutlined";import hh from"@mui/icons-material/Check";import{EhfuseEditor as kh,minimalToolbarOptions as Th}from"@ehfuse/editor";import{jsx as Yt,jsxs as Sh}from"react/jsx-runtime";function ha(e){let o=e.trim();return o?o.startsWith("<")?e:`<p>${o}</p>`:"<p></p>"}function yh(e){let o=e.replace(/<br\s*\/?>/gi,`
|
|
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 Qr({syncKey:e,value:o,onChange:t,readOnly:n=!1,minHeight:r=180}){let i=ba(null),a=ba(null),l=ba(Date.now()+800),[u,c]=xh(!1),d=He();return fh(()=>{if(n)return;let p=ka(o);a.current===p||a.current===o||(a.current=p,l.current=Date.now()+800,i.current?.setHtml(p))},[e,o,n]),n?Bh(ha,{sx:{position:"relative",mt:1},children:[Yt(ha,{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:ka(o)}}),Yt(bh,{title:"\uB0B4\uC6A9 \uBCF5\uC0AC",arrow:!0,children:Yt(gh,{size:"small","aria-label":"\uB0B4\uC6A9 \uBCF5\uC0AC",onClick:()=>{navigator.clipboard.writeText(Sh(o)).then(()=>{c(!0),window.setTimeout(()=>c(!1),1500)})},sx:{position:"absolute",top:6,right:6,color:"#9a9a97"},children:u?Yt(kh,{sx:{fontSize:17,color:"#2f9e5b"}}):Yt(hh,{sx:{fontSize:17}})})})]}):Yt(ha,{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:Yt(Th,{ref:i,defaultValue:ka(o),showToolbar:!d,focusBorder:!0,styles:{focusBorderColor:"var(--primary)"},toolbarOptions:yh,locale:"ko",minHeight:r,placeholder:"\uB0B4\uC6A9\uC744 \uC785\uB825\uD558\uC138\uC694",contentStyle:{padding:"12px"},onChange:p=>{let s=Date.now()<l.current,m=p===a.current;a.current=p,!(s||m)&&t(p)}})})}import{useState as Ta}from"react";import{Box as Lo,IconButton as ya,Tooltip as Ch}from"@mui/material";import vh from"@mui/icons-material/Close";import Ih from"@mui/icons-material/AddCircle";import _h from"@mui/icons-material/AddTask";import wh from"@mui/icons-material/Checklist";import Dh from"@mui/icons-material/CheckCircle";import Oh from"@mui/icons-material/Launch";import Mh from"@mui/icons-material/RadioButtonUnchecked";import{Fragment as Eh,jsx as Ke,jsxs as kn}from"react/jsx-runtime";function Jr({taskSeq:e,checklist:o,onAdd:t,onToggle:n,onRemove:r,onUpdate:i,removeLocked:a=!1,onConvertToTask:l,onOpenLinkedTask:u,resolveLinkedTask:c}){let[d,p]=Ta(""),[s,m]=Ta(null),[x,B]=Ta(null),b=T=>{let g=T.task_seq?c?.(T.task_seq):void 0;return g?g.completed:T.checked},h=o.filter(b).length,f=()=>{d.trim()&&(t(e,d),p(""))};return kn(_o,{icon:Ke(wh,{sx:{fontSize:19,display:"block"}}),title:kn(Eh,{children:["\uD560\uC77C",o.length>0?kn(Lo,{component:"span",sx:{fontSize:12.5,color:"#9a9a97"},children:[h," / ",o.length]}):null]}),titleExtra:o.length>0?Ke(Lo,{sx:{flex:1,minWidth:0,ml:1,height:6,borderRadius:3,bgcolor:"#ececea"},children:Ke(Lo,{sx:{height:"100%",borderRadius:3,width:`${Math.round(h/o.length*100)}%`,bgcolor:"#2f80ed",transition:"width 0.2s"}})}):null,children:[Ke(Lo,{sx:{display:"flex",flexDirection:"column",mt:.5,pl:3.25},children:o.map((T,g)=>{let v=T.task_seq?c?.(T.task_seq):void 0,C=b(T),I=!!T.task_seq;return kn(Lo,{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(Lo,{component:"span",onClick:()=>n(e,g,!C),sx:{display:"inline-flex",flexShrink:0,cursor:"pointer"},children:C?Ke(Dh,{sx:{fontSize:18,color:"#2f80ed"}}):Ke(Mh,{sx:{fontSize:18,color:"#9a9a97"}})}),s?.index===g?Ke(Lo,{component:"input",autoFocus:!0,spellCheck:!1,value:s.label,enterKeyHint:"done",onChange:M=>m({index:g,label:M.target.value}),onBlur:()=>{s.label.trim()&&s.label.trim()!==T.label&&i?.(e,g,s.label),m(null)},onKeyDown:M=>{M.key==="Enter"&&M.target.blur(),M.key==="Escape"&&m(null)},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:14,color:"#37352f",bgcolor:"transparent",p:0}}):Ke(Lo,{component:"span",onClick:I?T.task_seq&&u?()=>u(T.task_seq):void 0:a||!i?void 0:()=>m({index:g,label:T.label}),sx:{flex:1,minWidth:0,fontSize:14,color:C?"#9a9a97":"#37352f",textDecoration:C?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...I?u?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}:a||!i?{}:{cursor:"text"}},children:T.label}),I?kn(Lo,{component:"span",onClick:T.task_seq&&u?()=>u(T.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",...u?{cursor:"pointer"}:{}},children:[Ke(Oh,{sx:{fontSize:12}}),v?.manager_name?.trim()||"\uC5C5\uBB34"]}):null,!a&&!I&&l?Ke(Ch,{title:"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",arrow:!0,enterDelay:300,disableInteractive:!0,children:Ke(ya,{className:"taskbox-checklist-convert",size:"small","aria-label":"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",onClick:M=>B({anchorEl:M.currentTarget,index:g,label:T.label}),sx:{opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:Ke(_h,{sx:{fontSize:16}})})}):null,a?null:Ke(ya,{className:"taskbox-checklist-remove",size:"small","aria-label":"\uD560\uC77C \uC0AD\uC81C",onClick:()=>r(e,g),sx:{opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:Ke(vh,{sx:{fontSize:15}})})]},`${T.label}-${g}`)})}),kn(Lo,{sx:{mt:.5,ml:3.25,display:"flex",alignItems:"center",gap:.5},children:[Ke(Lo,{component:"input",spellCheck:!1,value:d,placeholder:"+ \uD560\uC77C \uCD94\uAC00",enterKeyHint:"done",onChange:T=>p(T.target.value),onKeyDown:T=>{T.key==="Enter"&&f()},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"}}}),Ke(ya,{size:"small","aria-label":"\uD560\uC77C \uCD94\uAC00",disabled:!d.trim(),onMouseDown:T=>T.preventDefault(),onClick:f,sx:{flexShrink:0,color:d.trim()?"#2f80ed":"#c9c8c5"},children:Ke(Ih,{sx:{fontSize:20}})})]}),Ke(Ue,{open:!!x,anchorEl:x?.anchorEl??null,title:"\uC774 \uD560\uC77C\uC744 \uBCC4\uB3C4 \uC5C5\uBB34\uB85C \uB9CC\uB4DC\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uB9CC\uB4E4\uAE30",onCancel:()=>B(null),onConfirm:()=>{x&&l?.(e,x.index,x.label),B(null)}})]})}import{useRef as Lh,useState as Nh}from"react";import{Box as Xo,IconButton as Fh}from"@mui/material";import Hh from"@mui/icons-material/Close";import oc from"@mui/icons-material/AttachFileOutlined";var Ph=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"]),Js=e=>{let o=e?.split(".").pop()?.toLowerCase()??"";return Ph.has(o)};import{LinearProgress as Rh}from"@mui/material";import{Fragment as zh,jsx as Ah,jsxs as qh}from"react/jsx-runtime";function Zs(e){let o=et(),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 Sa(){let o=et().useValue("attachmentUpload.progress");return qh(zh,{children:[o??0,"%"]})}function ec(){let o=et().useValue("attachmentUpload.progress");return Ah(Rh,{variant:"determinate",value:o??0,sx:{height:4,borderRadius:2,bgcolor:"#dbe9fb",mt:.75}})}import{Fragment as Wh,jsx as ho,jsxs as Vn}from"react/jsx-runtime";function Zr(e){return e>=1048576?`${(e/1048576).toFixed(1)}MB`:`${Math.max(1,Math.round(e/1024))}KB`}var ei={flex:1,minWidth:0,fontSize:13.5,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"};function oi({taskSeq:e,attachments:o,onAdd:t,onRemove:n,removeLocked:r=!1,onPreview:i,onDownload:a}){let[l,u]=Nh(!1),c=Lh(null),d=He(),p=En(),s=xi(),m=Zs(e),x=e===0,B=g=>{if(i){i(g);return}window.open(s(g.uuid??""),"_blank","noopener,noreferrer")},b=g=>{if(a){a(g);return}window.open(s(g.uuid??"",{download:!0}),"_blank","noopener,noreferrer")},h=g=>m?g+1<m.index?"done":g+1===m.index?"uploading":"waiting":"waiting",f=(g,v,C,I={})=>Vn(Xo,{sx:{px:1,py:.5,borderRadius:1,border:"1px solid",borderColor:I.uploading?"#d5e6fb":"#e6e6e3",bgcolor:I.uploading?"#f4f9ff":"transparent","&:hover .taskbox-file-remove":{opacity:1}},children:[Vn(Xo,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[ho(oc,{sx:{fontSize:16,color:"#9a9a97"}}),v,ho(Xo,{component:"span",sx:{fontSize:12,color:I.uploading?"#2f80ed":"#9a9a97",flexShrink:0},children:C}),I.removeIndex!==void 0?ho(Fh,{className:"taskbox-file-remove",size:"small","aria-label":"\uCCA8\uBD80 \uC0AD\uC81C",onClick:()=>n(e,I.removeIndex),sx:{opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:ho(Hh,{sx:{fontSize:15}})}):null]}),I.uploading?ho(ec,{}):null]},g),T=g=>{let v=Js(g.name);return ho(Xo,{component:"button",type:"button",onClick:()=>v?B(g):b(g),title:`${g.name} ${v?"\uBBF8\uB9AC\uBCF4\uAE30":"\uB2E4\uC6B4\uB85C\uB4DC"}`,sx:{...ei,color:"#37352f",textAlign:"left",p:0,border:"none",background:"none",font:"inherit",fontSize:13.5,cursor:"pointer","&:hover":{textDecoration:"underline",color:"#2f80ed"}},children:g.name})};return Vn(_o,{icon:ho(oc,{sx:{fontSize:18,display:"block"}}),title:Vn(Wh,{children:["\uD30C\uC77C ",o.length>0?o.length:""]}),children:[Vn(Xo,{sx:{display:"flex",flexDirection:"column",gap:.5,mt:1},children:[o.map((g,v)=>{let C=`${g.uuid||g.name}-${v}`;if(x){let I=h(v),M=I==="uploading";return f(C,ho(Xo,{component:"span",sx:{...ei,color:I==="done"?"#37352f":"#9a9a97"},children:g.name}),M?ho(Sa,{}):Zr(g.size),{uploading:M,removeIndex:!r&&!m?v:void 0})}return g.uuid?f(C,T(g),Zr(g.size),{removeIndex:r?void 0:v}):f(C,ho(Xo,{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:{...ei,color:"#9a9a97"},children:g.name}),Zr(g.size),{removeIndex:r?void 0:v})}),!x&&m?m.queue.slice(m.index-1).map((g,v)=>{let C=v===0;return f(`uploading-${m.index+v}-${g.name}`,ho(Xo,{component:"span",sx:{...ei,color:"#9a9a97"},children:g.name}),C?ho(Sa,{}):Zr(g.size),{uploading:C})}):null]}),ho(Xo,{onClick:()=>c.current?.click(),onDragOver:g=>{g.preventDefault(),u(!0)},onDragLeave:()=>u(!1),onDrop:g=>{g.preventDefault(),u(!1);let v=Array.from(g.dataTransfer.files);v.length>0&&t(e,v)},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:d?`\uD30C\uC77C\uC744 \uCCA8\uBD80\uD558\uC138\uC694 (\uCD5C\uB300 ${p}MB)`:`\uD30C\uC77C\uC744 \uB04C\uC5B4\uB2E4 \uB193\uAC70\uB098 \uD074\uB9AD\uD574 \uCCA8\uBD80\uD558\uC138\uC694 (\uCD5C\uB300 ${p}MB)`}),ho(Xo,{component:"input",ref:c,type:"file",multiple:!0,onChange:g=>{let v=Array.from(g.target.files??[]);v.length>0&&t(e,v),g.target.value=""},sx:{display:"none"}})]})}import{useState as jh}from"react";import{Checkbox as Xh,Divider as Qh,ListItemIcon as Jh,Menu as Zh,MenuItem as ic}from"@mui/material";import ek from"@mui/icons-material/Add";import{useEffect as $h,useState as tc}from"react";import{Box as Ba,Button as Kh}from"@mui/material";import{FormDialog as Uh}from"@ehfuse/mui-form-dialog";import{ClearTextField as Vh}from"@ehfuse/mui-form-controls";import{ColorPicker as Gh}from"@ehfuse/mui-color-picker";import{ErrorAlert as Yh}from"@ehfuse/alerts";import{jsx as Gn,jsxs as Ca}from"react/jsx-runtime";var nc="#2f80ed";function rc({open:e,onClose:o,onSubmit:t}){let[n,r]=tc(""),[i,a]=tc(nc);$h(()=>{e&&(r(""),a(nc))},[e]);let l=()=>{let d=n.trim();if(!d){Yh("\uB77C\uBCA8 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}t(d,i),o()},u=Tl(i),c=Ca(Ba,{children:[Ca(Ba,{sx:{display:"flex",alignItems:"center",gap:1.5,mt:.5},children:[Gn(Vh,{label:"\uB77C\uBCA8 \uC774\uB984",value:n,onChange:d=>r(d.target.value),onKeyDown:d=>{d.key==="Enter"&&(d.preventDefault(),l())},fullWidth:!0,autoFocus:!0}),Gn(Gh,{value:i,onChange:d=>a(d),shape:"circle",colorSize:28})]}),Ca(Ba,{sx:{mt:2,display:"flex",alignItems:"center",gap:1,fontSize:13,color:"#787774"},children:["\uBBF8\uB9AC\uBCF4\uAE30",Gn(we,{option:{key:"__preview__",name:n.trim()||"\uB77C\uBCA8",...u}})]})]});return Gn(Uh,{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:Gn(Kh,{variant:"contained",onClick:l,children:"\uCD94\uAC00"})}})}import{Fragment as ok,jsx as Tn,jsxs as ti}from"react/jsx-runtime";function ni({anchorEl:e,selectedKeys:o,labelOptions:t,onToggle:n,onAddLabel:r,onClose:i}){let[a,l]=jh(!1),u=Uo();return ti(ok,{children:[ti(Zh,{anchorEl:e,open:!!e,onClose:i,transitionDuration:0,...u,children:[t.map(c=>{let d=o.includes(c.key);return ti(ic,{onClick:()=>n(c.key),sx:{fontSize:14,minWidth:170,gap:1},children:[Tn(Xh,{size:"small",checked:d,sx:{p:0}}),Tn(we,{option:c})]},c.key)}),Tn(Qh,{}),ti(ic,{onClick:()=>l(!0),sx:{fontSize:14,color:"#787774"},children:[Tn(Jh,{children:Tn(ek,{sx:{fontSize:18,color:"#787774"}})}),"\uB77C\uBCA8 \uCD94\uAC00"]})]}),Tn(rc,{open:a,onClose:()=>l(!1),onSubmit:r})]})}function ac(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 lc(e,o){let t=(e.target_account_seqs??[]).filter(p=>p>0);if(t.length===0)return null;let n=new Set(t),r=ac(e,o),i=new Map;for(let p of r){let s=String(p.department??"").trim();if(!s)continue;let m=i.get(s)??[];m.push(p),i.set(s,m)}let a=[],l=new Set;for(let[p,s]of i)if(s.every(x=>n.has(Number(x.account_seq??0)))){a.push(p);for(let x of s)l.add(Number(x.account_seq??0))}let u=new Map(r.map(p=>[Number(p.account_seq??0),p.name])),c=e.target_names??[],d=[];return t.forEach((p,s)=>{l.has(p)||d.push(u.get(p)??c[s]??"\uC774\uB984\uC5C6\uC74C")}),{teamNames:a,individualNames:d}}function ri(e,o){let t=lc(e,o);return t?[...t.teamNames,...t.individualNames].join(", "):"\uBAA8\uB4E0 \uC9C1\uC6D0"}function GM(e,o){let t=lc(e,o);return t?{kind:"members",teamNames:t.teamNames,individualNames:t.individualNames}:{kind:"everyone"}}function sc(e,o,t){let n=(e.target_account_seqs??[]).filter(d=>d>0),r=ac(e,o),i=n.length>0?n.length:r.length,a=e.acks??[],l=t>0&&a.some(d=>d.account_seq===t),u=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&&!u&&c&&!l&&!e.completed}}function cc(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
|
-
\uC81C\uC678\uB41C \uD30C\uC77C: ${r.map(l=>l.name).join(", ")}`:null;return{accepted:i,rejected:r,message:a}}import{Fragment as ii,jsx as ke,jsxs as Xn}from"react/jsx-runtime";var uc="#0f9d58";function pc({form:e,statusOptions:o,customTabs:t,sprints:n=[],avatarSrcByName:r,isNotice:i=!1,hideProject:a=!1,employees:l=[],myAccountSeq:u=0,onMemberEdit:c,onAddProject:d,onAddLabelOption:p,contentSyncKey:s="create"}){let m=et(),x=En(),B=e.useFormValue("manager_name"),b=e.useFormValue("receiver_names"),h=e.useFormValue("start_date"),f=!!e.useFormValue("is_event"),T=!!e.useFormValue("is_bug"),g=e.useFormValue("bug_repro")??"",v=e.useFormValue("bug_device")??"",C=e.useFormValue("bug_where")??"",I=e.useFormValue("bug_version")??"",M=e.useFormValue("event_time")??"",Q=e.useFormValue("event_place")??"",E=e.useFormValue("event_address")??"",te=e.useFormValue("due_date"),w=e.useFormValue("reminder"),y=e.useFormValue("priority"),H=e.useFormValue("content"),$=e.useFormValue("checklist")??[],P=e.useFormValue("tab_key"),oe=e.useFormValue("sprint_seq")??0,pe=e.useFormValue("story_points")??0,A=t.find(k=>k.key===P&&k.useSprints),W=A?n.filter(k=>`custom-${k.group_seq}`===P):[],[K,F]=mc(null),O=e.useFormValue("label_keys"),[L,X]=mc(null),J=e.useFormValue("target_names"),ue=e.useFormValue("target_account_seqs"),ye=m.useValue("createAttachmentFiles")??[],R=i?ri({author_account_seq:u,target_names:J,target_account_seqs:ue},l):"";return Xn(ii,{children:[i?null:ke(Yn,{sx:{display:"flex",gap:1.25,px:2,pb:1.5,flexShrink:0},children:[{value:"task",label:"\uC5C5\uBB34"},{value:"event",label:"\uC77C\uC815"},{value:"bug",label:"\uC624\uB958"}].map(k=>{let ne=T?"bug":f?"event":"task",re=ne===k.value;return ke(tk,{onClick:()=>{if(ne===k.value)return;e.setFormValue("is_event",k.value==="event"),e.setFormValue("is_bug",k.value==="bug"),e.setFormValue("is_open",k.value==="bug");let ve=e.getFormValue("icon"),$e=e.getFormValue("icon_color"),se=[_e,"event",Pn].includes(ve),Ie=!$e||$e===uc||$e===Rn;se&&e.setFormValue("icon",k.value==="event"?"event":k.value==="bug"?Pn:_e),Ie&&e.setFormValue("icon_color",k.value==="event"?uc:k.value==="bug"?Rn:"")},sx:{px:1.75,py:.75,borderRadius:99,fontSize:13.5,fontWeight:re?600:400,color:re?"#ffffff":"#787774",bgcolor:re?"#2563eb":"#f4f4f2"},children:k.label},k.label)})}),ke(jn,{sx:{borderColor:"#e6e6e3"}}),Xn(Yn,{sx:{py:1.5,display:"flex",flexDirection:"column",gap:.25},children:[ke(jr,{hideProject:a,values:{tabKey:P,managerName:B,receiverNames:b,startDate:h,dueDate:te,reminder:w,priority:y,eventTime:M,eventPlace:Q,eventAddress:E},customTabs:t,avatarSrcByName:r,notice:i,event:f,onChangeEventTime:k=>e.setFormValue("event_time",k),onChangeEventPlace:k=>e.setFormValue("event_place",k),onChangeEventAddress:k=>e.setFormValue("event_address",k),targetSummary:R,onChangeProject:k=>e.setFormValue("tab_key",k),onAddProject:d,onChangeStartDate:k=>e.setFormValue("start_date",k),onChangeDueDate:k=>e.setFormValue("due_date",k),onChangeReminder:k=>e.setFormValue("reminder",k),onChangePriority:k=>e.setFormValue("priority",k),onMemberEdit:c,trailing:Xn(ii,{children:[A&&!f&&!i?Xn(ii,{children:[ke(xe,{icon:ke(sk,{sx:{fontSize:17}}),label:"\uBAA9\uD45C",onClick:k=>F(k),children:oe>0?W.find(k=>k.seq===oe)?.name??"\uC0AD\uC81C\uB41C \uBAA9\uD45C":ke(Yn,{component:"span",sx:{color:"#9a9a97"},children:"\uBBF8\uBC30\uC815"})}),ke(xe,{icon:ke(ck,{sx:{fontSize:17}}),label:"\uD3EC\uC778\uD2B8",children:ke(dt,{value:pe>0?String(pe):"",placeholder:"\uBBF8\uCD94\uC815",onCommit:k=>e.setFormValue("story_points",Number(k.replace(/[^0-9.]/g,""))||0)})})]}):null,T?ke(Xr,{values:{repro:g,device:v,where:C,version:I},onChangeRepro:k=>e.setFormValue("bug_repro",k),onChangeDevice:k=>e.setFormValue("bug_device",k),onChangeWhere:k=>e.setFormValue("bug_where",k),onChangeVersion:k=>e.setFormValue("bug_version",k)}):null]}),leading:f?null:ke(Yn,{sx:{gridColumn:"1 / -1"},children:ke(xe,{icon:ke(lk,{sx:{fontSize:17}}),label:"\uB77C\uBCA8",onClick:k=>X(k),children:(O??[]).length>0?ke(Tt,{labelKeys:O??[],labelOptions:o}):ke(Yn,{component:"span",sx:{color:"#9a9a97"},children:"\uBE44\uC5B4 \uC788\uC74C"})})})}),ke(jn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),ke(_o,{icon:ke(ik,{sx:{fontSize:18,display:"block"}}),title:"\uB0B4\uC6A9",children:ke(Qr,{syncKey:s,value:H,onChange:k=>e.setFormValue("content",k)})}),f?null:ke(jn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),f?null:ke(Jr,{taskSeq:0,checklist:$,onAdd:(k,ne)=>e.setFormValue("checklist",[...$,{label:ne,checked:!1}]),onToggle:(k,ne,re)=>e.setFormValue("checklist",$.map((ve,$e)=>$e===ne?{...ve,checked:re}:ve)),onRemove:(k,ne)=>e.setFormValue("checklist",$.filter((re,ve)=>ve!==ne)),onUpdate:(k,ne,re)=>e.setFormValue("checklist",$.map((ve,$e)=>$e===ne?{...ve,label:re}:ve))}),ke(jn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),ke(oi,{taskSeq:0,attachments:ye.map(k=>({name:k.name,size:k.size})),onAdd:(k,ne)=>{let re=cc(ne,x);re.message&&uk(re.message),re.accepted.length!==0&&m.setValue("createAttachmentFiles",[...m.getValue("createAttachmentFiles")??[],...re.accepted])},onRemove:(k,ne)=>m.setValue("createAttachmentFiles",ye.filter((re,ve)=>ve!==ne))}),T?null:Xn(ii,{children:[ke(jn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),ke(_o,{icon:ke(ak,{sx:{fontSize:18,display:"block"}}),title:"\uBE44\uACE0",children:ke(mk,{form:e,name:"note",placeholder:"\uBE44\uACE0 \uC785\uB825",fullWidth:!0,size:"medium",sx:{mt:1}})})]})]}),ke(nk,{transitionDuration:0,anchorEl:K,open:!!K,onClose:()=>F(null),children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...W.map(k=>({seq:k.seq,label:vo(k)}))].map(k=>ke(rk,{onClick:()=>{e.setFormValue("sprint_seq",k.seq),F(null)},sx:{fontSize:14,minWidth:170},children:k.label},k.seq))}),ke(ni,{anchorEl:L,selectedKeys:O??[],labelOptions:o,onToggle:k=>e.setFormValue("label_keys",fr(O??[],k)),onAddLabel:(k,ne)=>p?.(k,ne),onClose:()=>X(null)})]})}import{Fragment as Tk,jsx as Je,jsxs as ai}from"react/jsx-runtime";function zE({open:e,onClose:o,...t}){let{form:n,presetDueDate:r="",presetTabKey:i="",presetManager:a=null,isNotice:l=!1,defaultBug:u=!1}=t,c=et(),d=dk(!1),[p,s]=dc(0),[m,x]=dc(null),B=n.useFormValue("title"),b=n.useFormValue("icon"),h=n.useFormValue("icon_color"),f=!!n.useFormValue("is_event"),T=!!n.useFormValue("is_bug"),g=He(),C=c.useValue("createSubmitting")??!1,I=cr(b||_e);return pk(()=>{let M=d.current;d.current=e,!(!e||M)&&(n.setFormValues({...n.getFormValues(),title:"",icon:l?Mo:u?Pn:_e,icon_color:l?"#e5484d":u?Rn:"",manager_name:a?.name??"",manager_account_seq:a?.accountSeq??0,receiver_names:[],receiver_account_seqs:[],is_notice:l,is_event:!1,is_bug:u,is_open:u,bug_repro:"",bug_device:"",bug_where:"",bug_version:"",event_time:"",event_place:"",event_address:"",target_names:[],target_account_seqs:[],start_date:qe(new Date),due_date:r,reminder:"none",priority:"medium",note:"",content:"",checklist:[],tab_key:i}),c.setValue("createAttachmentFiles",[]),s(Q=>Q+1))},[e]),ai(Tk,{children:[Je(xk,{anchor:"right",open:e,onClose:o,sx:{zIndex:M=>M.zIndex.modal},slotProps:{paper:{sx:{width:720,maxWidth:"100vw"}}},children:ai(Qn,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[ai(Qn,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1.5,flexShrink:0},children:[g?Je(va,{"aria-label":"\uB2EB\uAE30",onClick:o,sx:{color:"#6b7280"},children:Je(hk,{})}):null,Je(gk,{title:"\uC544\uC774\uCF58 \uBCC0\uACBD",arrow:!0,children:Je(va,{size:"small",onClick:M=>x(M.currentTarget),sx:{color:h||"#1e3a8a"},children:Je(I,{sx:{fontSize:20}})})}),Je(Qn,{component:"input",autoFocus:!0,spellCheck:!1,value:B,placeholder:l?"\uACF5\uC9C0 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694":f?"\uC77C\uC815 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694":T?"\uC5B4\uB5A4 \uC624\uB958\uC778\uC9C0 \uD55C \uC904\uB85C \uC801\uC5B4\uC8FC\uC138\uC694":"\uC5C5\uBB34 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694",onChange:M=>n.setFormValue("title",M.target.value),sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:18,fontWeight:500,color:"#37352f",p:0,m:0,"&::placeholder":{color:"#c9c8c5",fontWeight:400}}}),g?null:Je(va,{"aria-label":"\uB2EB\uAE30",onClick:o,sx:{color:"#6b7280"},children:Je(bk,{})})]}),Je(Qn,{sx:{flex:1,minHeight:0},children:Je(kk,{style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:Je(pc,{...t,contentSyncKey:`create-${p}`})})}),Je(fk,{sx:{borderColor:"#e6e6e3"}}),ai(Qn,{sx:{display:"flex",justifyContent:"flex-end",gap:1,px:2,py:1.5,flexShrink:0},children:[Je(fc,{onClick:o,color:"inherit",disabled:C,children:"\uCDE8\uC18C"}),Je(fc,{onClick:n.submit,variant:"contained",disabled:C,children:C?"\uB4F1\uB85D \uC911\u2026":"\uB4F1\uB85D"})]})]})}),Je(Ur,{anchorEl:m,value:b,color:h||"#1e3a8a",onSelect:M=>n.setFormValue("icon",M),onSelectColor:M=>n.setFormValue("icon_color",M),onClose:()=>x(null)})]})}import{useRef as yT}from"react";import{Box as qa,Divider as Nc,Drawer as ST}from"@mui/material";import BT from"@ehfuse/overlay-scrollbar";import{useRef as xc,useState as _a}from"react";import{Box as Te,Button as gc,Chip as Tc,IconButton as jt,Tooltip as yk}from"@mui/material";import bc from"@mui/icons-material/Send";import{TextField as Sk}from"@ehfuse/mui-form-controls";import Bk from"@mui/icons-material/Close";import Ck from"@mui/icons-material/EditOutlined";import vk from"@mui/icons-material/Favorite";import Ik from"@mui/icons-material/FavoriteBorderOutlined";import _k from"@mui/icons-material/CheckCircle";import wk from"@mui/icons-material/CheckCircleOutlineOutlined";import wa from"@mui/icons-material/AttachFileOutlined";import Dk from"@mui/icons-material/ImageOutlined";var Ia=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 kc,jsx as ee,jsxs as Ze}from"react/jsx-runtime";function hc({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:ee(Te,{sx:{whiteSpace:"pre-line",fontSize:12},children:r.map(c=>`${c.name} \xB7 ${c.time}`).join(`
|
|
8
|
-
`)}),u=e==="like"?"#e5484d":"#2f80ed";return ee(
|
|
6
|
+
`).trim()}function Qr({syncKey:e,value:o,onChange:t,readOnly:n=!1,minHeight:r=180}){let i=ga(null),a=ga(null),l=ga(Date.now()+800),[u,c]=fh(!1),p=He();return ph(()=>{if(n)return;let d=ha(o);a.current===d||a.current===o||(a.current=d,l.current=Date.now()+800,i.current?.setHtml(d))},[e,o,n]),n?Sh(ba,{sx:{position:"relative",mt:1},children:[Yt(ba,{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:ha(o)}}),Yt(gh,{title:"\uB0B4\uC6A9 \uBCF5\uC0AC",arrow:!0,children:Yt(xh,{size:"small","aria-label":"\uB0B4\uC6A9 \uBCF5\uC0AC",onClick:()=>{navigator.clipboard.writeText(yh(o)).then(()=>{c(!0),window.setTimeout(()=>c(!1),1500)})},sx:{position:"absolute",top:6,right:6,color:"#9a9a97"},children:u?Yt(hh,{sx:{fontSize:17,color:"#2f9e5b"}}):Yt(bh,{sx:{fontSize:17}})})})]}):Yt(ba,{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:Yt(kh,{ref:i,defaultValue:ha(o),showToolbar:!p,focusBorder:!0,styles:{focusBorderColor:"var(--primary)"},toolbarOptions:Th,locale:"ko",minHeight:r,placeholder:"\uB0B4\uC6A9\uC744 \uC785\uB825\uD558\uC138\uC694",contentStyle:{padding:"12px"},onChange:d=>{let s=Date.now()<l.current,m=d===a.current;a.current=d,!(s||m)&&t(d)}})})}import{useState as ka}from"react";import{Box as Lo,IconButton as Ta,Tooltip as Bh}from"@mui/material";import Ch from"@mui/icons-material/Close";import vh from"@mui/icons-material/AddCircle";import Ih from"@mui/icons-material/AddTask";import _h from"@mui/icons-material/Checklist";import wh from"@mui/icons-material/CheckCircle";import Dh from"@mui/icons-material/Launch";import Oh from"@mui/icons-material/RadioButtonUnchecked";import{Fragment as Mh,jsx as Ke,jsxs as kn}from"react/jsx-runtime";function Jr({taskSeq:e,checklist:o,onAdd:t,onToggle:n,onRemove:r,onUpdate:i,removeLocked:a=!1,onConvertToTask:l,onOpenLinkedTask:u,resolveLinkedTask:c}){let[p,d]=ka(""),[s,m]=ka(null),[f,B]=ka(null),b=T=>{let g=T.task_seq?c?.(T.task_seq):void 0;return g?g.completed:T.checked},h=o.filter(b).length,x=()=>{p.trim()&&(t(e,p),d(""))};return kn(_o,{icon:Ke(_h,{sx:{fontSize:19,display:"block"}}),title:kn(Mh,{children:["\uD560\uC77C",o.length>0?kn(Lo,{component:"span",sx:{fontSize:12.5,color:"#9a9a97"},children:[h," / ",o.length]}):null]}),titleExtra:o.length>0?Ke(Lo,{sx:{flex:1,minWidth:0,ml:1,height:6,borderRadius:3,bgcolor:"#ececea"},children:Ke(Lo,{sx:{height:"100%",borderRadius:3,width:`${Math.round(h/o.length*100)}%`,bgcolor:"#2f80ed",transition:"width 0.2s"}})}):null,children:[Ke(Lo,{sx:{display:"flex",flexDirection:"column",mt:.5,pl:3.25},children:o.map((T,g)=>{let v=T.task_seq?c?.(T.task_seq):void 0,C=b(T),I=!!T.task_seq;return kn(Lo,{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(Lo,{component:"span",onClick:()=>n(e,g,!C),sx:{display:"inline-flex",flexShrink:0,cursor:"pointer"},children:C?Ke(wh,{sx:{fontSize:18,color:"#2f80ed"}}):Ke(Oh,{sx:{fontSize:18,color:"#9a9a97"}})}),s?.index===g?Ke(Lo,{component:"input",autoFocus:!0,spellCheck:!1,value:s.label,enterKeyHint:"done",onChange:M=>m({index:g,label:M.target.value}),onBlur:()=>{s.label.trim()&&s.label.trim()!==T.label&&i?.(e,g,s.label),m(null)},onKeyDown:M=>{M.key==="Enter"&&M.target.blur(),M.key==="Escape"&&m(null)},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:14,color:"#37352f",bgcolor:"transparent",p:0}}):Ke(Lo,{component:"span",onClick:I?T.task_seq&&u?()=>u(T.task_seq):void 0:a||!i?void 0:()=>m({index:g,label:T.label}),sx:{flex:1,minWidth:0,fontSize:14,color:C?"#9a9a97":"#37352f",textDecoration:C?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...I?u?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}:a||!i?{}:{cursor:"text"}},children:T.label}),I?kn(Lo,{component:"span",onClick:T.task_seq&&u?()=>u(T.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",...u?{cursor:"pointer"}:{}},children:[Ke(Dh,{sx:{fontSize:12}}),v?.manager_name?.trim()||"\uC5C5\uBB34"]}):null,!a&&!I&&l?Ke(Bh,{title:"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",arrow:!0,enterDelay:300,disableInteractive:!0,children:Ke(Ta,{className:"taskbox-checklist-convert",size:"small","aria-label":"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",onClick:M=>B({anchorEl:M.currentTarget,index:g,label:T.label}),sx:{opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:Ke(Ih,{sx:{fontSize:16}})})}):null,a?null:Ke(Ta,{className:"taskbox-checklist-remove",size:"small","aria-label":"\uD560\uC77C \uC0AD\uC81C",onClick:()=>r(e,g),sx:{opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:Ke(Ch,{sx:{fontSize:15}})})]},`${T.label}-${g}`)})}),kn(Lo,{sx:{mt:.5,ml:3.25,display:"flex",alignItems:"center",gap:.5},children:[Ke(Lo,{component:"input",spellCheck:!1,value:p,placeholder:"+ \uD560\uC77C \uCD94\uAC00",enterKeyHint:"done",onChange:T=>d(T.target.value),onKeyDown:T=>{T.key==="Enter"&&x()},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"}}}),Ke(Ta,{size:"small","aria-label":"\uD560\uC77C \uCD94\uAC00",disabled:!p.trim(),onMouseDown:T=>T.preventDefault(),onClick:x,sx:{flexShrink:0,color:p.trim()?"#2f80ed":"#c9c8c5"},children:Ke(vh,{sx:{fontSize:20}})})]}),Ke(Ue,{open:!!f,anchorEl:f?.anchorEl??null,title:"\uC774 \uD560\uC77C\uC744 \uBCC4\uB3C4 \uC5C5\uBB34\uB85C \uB9CC\uB4DC\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uB9CC\uB4E4\uAE30",onCancel:()=>B(null),onConfirm:()=>{f&&l?.(e,f.index,f.label),B(null)}})]})}import{useRef as Ah,useState as Lh}from"react";import{Box as Xo,IconButton as Nh}from"@mui/material";import Fh from"@mui/icons-material/Close";import oc from"@mui/icons-material/AttachFileOutlined";var Eh=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"]),Js=e=>{let o=e?.split(".").pop()?.toLowerCase()??"";return Eh.has(o)};import{LinearProgress as Ph}from"@mui/material";import{Fragment as Rh,jsx as qh,jsxs as zh}from"react/jsx-runtime";function Zs(e){let o=et(),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 ya(){let o=et().useValue("attachmentUpload.progress");return zh(Rh,{children:[o??0,"%"]})}function ec(){let o=et().useValue("attachmentUpload.progress");return qh(Ph,{variant:"determinate",value:o??0,sx:{height:4,borderRadius:2,bgcolor:"#dbe9fb",mt:.75}})}import{Fragment as Hh,jsx as ho,jsxs as Vn}from"react/jsx-runtime";function Zr(e){return e>=1048576?`${(e/1048576).toFixed(1)}MB`:`${Math.max(1,Math.round(e/1024))}KB`}var ei={flex:1,minWidth:0,fontSize:13.5,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"};function oi({taskSeq:e,attachments:o,onAdd:t,onRemove:n,removeLocked:r=!1,onPreview:i,onDownload:a}){let[l,u]=Lh(!1),c=Ah(null),p=He(),d=En(),s=xi(),m=Zs(e),f=e===0,B=g=>{if(i){i(g);return}window.open(s(g.uuid??""),"_blank","noopener,noreferrer")},b=g=>{if(a){a(g);return}window.open(s(g.uuid??"",{download:!0}),"_blank","noopener,noreferrer")},h=g=>m?g+1<m.index?"done":g+1===m.index?"uploading":"waiting":"waiting",x=(g,v,C,I={})=>Vn(Xo,{sx:{px:1,py:.5,borderRadius:1,border:"1px solid",borderColor:I.uploading?"#d5e6fb":"#e6e6e3",bgcolor:I.uploading?"#f4f9ff":"transparent","&:hover .taskbox-file-remove":{opacity:1}},children:[Vn(Xo,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[ho(oc,{sx:{fontSize:16,color:"#9a9a97"}}),v,ho(Xo,{component:"span",sx:{fontSize:12,color:I.uploading?"#2f80ed":"#9a9a97",flexShrink:0},children:C}),I.removeIndex!==void 0?ho(Nh,{className:"taskbox-file-remove",size:"small","aria-label":"\uCCA8\uBD80 \uC0AD\uC81C",onClick:()=>n(e,I.removeIndex),sx:{opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:ho(Fh,{sx:{fontSize:15}})}):null]}),I.uploading?ho(ec,{}):null]},g),T=g=>{let v=Js(g.name);return ho(Xo,{component:"button",type:"button",onClick:()=>v?B(g):b(g),title:`${g.name} ${v?"\uBBF8\uB9AC\uBCF4\uAE30":"\uB2E4\uC6B4\uB85C\uB4DC"}`,sx:{...ei,color:"#37352f",textAlign:"left",p:0,border:"none",background:"none",font:"inherit",fontSize:13.5,cursor:"pointer","&:hover":{textDecoration:"underline",color:"#2f80ed"}},children:g.name})};return Vn(_o,{icon:ho(oc,{sx:{fontSize:18,display:"block"}}),title:Vn(Hh,{children:["\uD30C\uC77C ",o.length>0?o.length:""]}),children:[Vn(Xo,{sx:{display:"flex",flexDirection:"column",gap:.5,mt:1},children:[o.map((g,v)=>{let C=`${g.uuid||g.name}-${v}`;if(f){let I=h(v),M=I==="uploading";return x(C,ho(Xo,{component:"span",sx:{...ei,color:I==="done"?"#37352f":"#9a9a97"},children:g.name}),M?ho(ya,{}):Zr(g.size),{uploading:M,removeIndex:!r&&!m?v:void 0})}return g.uuid?x(C,T(g),Zr(g.size),{removeIndex:r?void 0:v}):x(C,ho(Xo,{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:{...ei,color:"#9a9a97"},children:g.name}),Zr(g.size),{removeIndex:r?void 0:v})}),!f&&m?m.queue.slice(m.index-1).map((g,v)=>{let C=v===0;return x(`uploading-${m.index+v}-${g.name}`,ho(Xo,{component:"span",sx:{...ei,color:"#9a9a97"},children:g.name}),C?ho(ya,{}):Zr(g.size),{uploading:C})}):null]}),ho(Xo,{onClick:()=>c.current?.click(),onDragOver:g=>{g.preventDefault(),u(!0)},onDragLeave:()=>u(!1),onDrop:g=>{g.preventDefault(),u(!1);let v=Array.from(g.dataTransfer.files);v.length>0&&t(e,v)},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:p?`\uD30C\uC77C\uC744 \uCCA8\uBD80\uD558\uC138\uC694 (\uCD5C\uB300 ${d}MB)`:`\uD30C\uC77C\uC744 \uB04C\uC5B4\uB2E4 \uB193\uAC70\uB098 \uD074\uB9AD\uD574 \uCCA8\uBD80\uD558\uC138\uC694 (\uCD5C\uB300 ${d}MB)`}),ho(Xo,{component:"input",ref:c,type:"file",multiple:!0,onChange:g=>{let v=Array.from(g.target.files??[]);v.length>0&&t(e,v),g.target.value=""},sx:{display:"none"}})]})}import{useState as Yh}from"react";import{Checkbox as jh,Divider as Xh,ListItemIcon as Qh,Menu as Jh,MenuItem as ic}from"@mui/material";import Zh from"@mui/icons-material/Add";import{useEffect as Wh,useState as tc}from"react";import{Box as Sa,Button as $h}from"@mui/material";import{FormDialog as Kh}from"@ehfuse/mui-form-dialog";import{ClearTextField as Uh}from"@ehfuse/mui-form-controls";import{ColorPicker as Vh}from"@ehfuse/mui-color-picker";import{ErrorAlert as Gh}from"@ehfuse/alerts";import{jsx as Gn,jsxs as Ba}from"react/jsx-runtime";var nc="#2f80ed";function rc({open:e,onClose:o,onSubmit:t}){let[n,r]=tc(""),[i,a]=tc(nc);Wh(()=>{e&&(r(""),a(nc))},[e]);let l=()=>{let p=n.trim();if(!p){Gh("\uB77C\uBCA8 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}t(p,i),o()},u=kl(i),c=Ba(Sa,{children:[Ba(Sa,{sx:{display:"flex",alignItems:"center",gap:1.5,mt:.5},children:[Gn(Uh,{label:"\uB77C\uBCA8 \uC774\uB984",value:n,onChange:p=>r(p.target.value),onKeyDown:p=>{p.key==="Enter"&&(p.preventDefault(),l())},fullWidth:!0,autoFocus:!0}),Gn(Vh,{value:i,onChange:p=>a(p),shape:"circle",colorSize:28})]}),Ba(Sa,{sx:{mt:2,display:"flex",alignItems:"center",gap:1,fontSize:13,color:"#787774"},children:["\uBBF8\uB9AC\uBCF4\uAE30",Gn(we,{option:{key:"__preview__",name:n.trim()||"\uB77C\uBCA8",...u}})]})]});return Gn(Kh,{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:Gn($h,{variant:"contained",onClick:l,children:"\uCD94\uAC00"})}})}import{Fragment as ek,jsx as Tn,jsxs as ti}from"react/jsx-runtime";function ni({anchorEl:e,selectedKeys:o,labelOptions:t,onToggle:n,onAddLabel:r,onClose:i}){let[a,l]=Yh(!1),u=Uo();return ti(ek,{children:[ti(Jh,{anchorEl:e,open:!!e,onClose:i,transitionDuration:0,...u,children:[t.map(c=>{let p=o.includes(c.key);return ti(ic,{onClick:()=>n(c.key),sx:{fontSize:14,minWidth:170,gap:1},children:[Tn(jh,{size:"small",checked:p,sx:{p:0}}),Tn(we,{option:c})]},c.key)}),Tn(Xh,{}),ti(ic,{onClick:()=>l(!0),sx:{fontSize:14,color:"#787774"},children:[Tn(Qh,{children:Tn(Zh,{sx:{fontSize:18,color:"#787774"}})}),"\uB77C\uBCA8 \uCD94\uAC00"]})]}),Tn(rc,{open:a,onClose:()=>l(!1),onSubmit:r})]})}function ac(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 lc(e,o){let t=(e.target_account_seqs??[]).filter(d=>d>0);if(t.length===0)return null;let n=new Set(t),r=ac(e,o),i=new Map;for(let d of r){let s=String(d.department??"").trim();if(!s)continue;let m=i.get(s)??[];m.push(d),i.set(s,m)}let a=[],l=new Set;for(let[d,s]of i)if(s.every(f=>n.has(Number(f.account_seq??0)))){a.push(d);for(let f of s)l.add(Number(f.account_seq??0))}let u=new Map(r.map(d=>[Number(d.account_seq??0),d.name])),c=e.target_names??[],p=[];return t.forEach((d,s)=>{l.has(d)||p.push(u.get(d)??c[s]??"\uC774\uB984\uC5C6\uC74C")}),{teamNames:a,individualNames:p}}function ri(e,o){let t=lc(e,o);return t?[...t.teamNames,...t.individualNames].join(", "):"\uBAA8\uB4E0 \uC9C1\uC6D0"}function VM(e,o){let t=lc(e,o);return t?{kind:"members",teamNames:t.teamNames,individualNames:t.individualNames}:{kind:"everyone"}}function sc(e,o,t){let n=(e.target_account_seqs??[]).filter(p=>p>0),r=ac(e,o),i=n.length>0?n.length:r.length,a=e.acks??[],l=t>0&&a.some(p=>p.account_seq===t),u=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&&!u&&c&&!l&&!e.completed}}function cc(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
|
+
\uC81C\uC678\uB41C \uD30C\uC77C: ${r.map(l=>l.name).join(", ")}`:null;return{accepted:i,rejected:r,message:a}}import{Fragment as ii,jsx as ke,jsxs as Xn}from"react/jsx-runtime";var uc="#0f9d58";function dc({form:e,statusOptions:o,customTabs:t,sprints:n=[],avatarSrcByName:r,isNotice:i=!1,hideProject:a=!1,employees:l=[],myAccountSeq:u=0,onMemberEdit:c,onAddProject:p,onAddLabelOption:d,contentSyncKey:s="create"}){let m=et(),f=En(),B=e.useFormValue("manager_name"),b=e.useFormValue("receiver_names"),h=e.useFormValue("start_date"),x=!!e.useFormValue("is_event"),T=!!e.useFormValue("is_bug"),g=e.useFormValue("bug_repro")??"",v=e.useFormValue("bug_device")??"",C=e.useFormValue("bug_where")??"",I=e.useFormValue("bug_version")??"",M=e.useFormValue("event_time")??"",Q=e.useFormValue("event_place")??"",E=e.useFormValue("event_address")??"",te=e.useFormValue("due_date"),w=e.useFormValue("reminder"),y=e.useFormValue("priority"),H=e.useFormValue("content"),$=e.useFormValue("checklist")??[],P=e.useFormValue("tab_key"),oe=e.useFormValue("sprint_seq")??0,de=e.useFormValue("story_points")??0,A=t.find(k=>k.key===P&&k.useSprints),W=A?n.filter(k=>`custom-${k.group_seq}`===P):[],[K,F]=mc(null),O=e.useFormValue("label_keys"),[L,X]=mc(null),J=e.useFormValue("target_names"),ue=e.useFormValue("target_account_seqs"),ye=m.useValue("createAttachmentFiles")??[],R=i?ri({author_account_seq:u,target_names:J,target_account_seqs:ue},l):"";return Xn(ii,{children:[i?null:ke(Yn,{sx:{display:"flex",gap:1.25,px:2,pb:1.5,flexShrink:0},children:[{value:"task",label:"\uC5C5\uBB34"},{value:"event",label:"\uC77C\uC815"},{value:"bug",label:"\uC624\uB958"}].map(k=>{let ne=T?"bug":x?"event":"task",re=ne===k.value;return ke(ok,{onClick:()=>{if(ne===k.value)return;e.setFormValue("is_event",k.value==="event"),e.setFormValue("is_bug",k.value==="bug"),e.setFormValue("is_open",k.value==="bug");let ve=e.getFormValue("icon"),$e=e.getFormValue("icon_color"),se=[_e,"event",Pn].includes(ve),Ie=!$e||$e===uc||$e===Rn;se&&e.setFormValue("icon",k.value==="event"?"event":k.value==="bug"?Pn:_e),Ie&&e.setFormValue("icon_color",k.value==="event"?uc:k.value==="bug"?Rn:"")},sx:{px:1.75,py:.75,borderRadius:99,fontSize:13.5,fontWeight:re?600:400,color:re?"#ffffff":"#787774",bgcolor:re?"#2563eb":"#f4f4f2"},children:k.label},k.label)})}),ke(jn,{sx:{borderColor:"#e6e6e3"}}),Xn(Yn,{sx:{py:1.5,display:"flex",flexDirection:"column",gap:.25},children:[ke(jr,{hideProject:a,values:{tabKey:P,managerName:B,receiverNames:b,startDate:h,dueDate:te,reminder:w,priority:y,eventTime:M,eventPlace:Q,eventAddress:E},customTabs:t,avatarSrcByName:r,notice:i,event:x,onChangeEventTime:k=>e.setFormValue("event_time",k),onChangeEventPlace:k=>e.setFormValue("event_place",k),onChangeEventAddress:k=>e.setFormValue("event_address",k),targetSummary:R,onChangeProject:k=>e.setFormValue("tab_key",k),onAddProject:p,onChangeStartDate:k=>e.setFormValue("start_date",k),onChangeDueDate:k=>e.setFormValue("due_date",k),onChangeReminder:k=>e.setFormValue("reminder",k),onChangePriority:k=>e.setFormValue("priority",k),onMemberEdit:c,trailing:Xn(ii,{children:[A&&!x&&!i?Xn(ii,{children:[ke(xe,{icon:ke(lk,{sx:{fontSize:17}}),label:"\uBAA9\uD45C",onClick:k=>F(k),children:oe>0?W.find(k=>k.seq===oe)?.name??"\uC0AD\uC81C\uB41C \uBAA9\uD45C":ke(Yn,{component:"span",sx:{color:"#9a9a97"},children:"\uBBF8\uBC30\uC815"})}),ke(xe,{icon:ke(sk,{sx:{fontSize:17}}),label:"\uD3EC\uC778\uD2B8",children:ke(pt,{value:de>0?String(de):"",placeholder:"\uBBF8\uCD94\uC815",onCommit:k=>e.setFormValue("story_points",Number(k.replace(/[^0-9.]/g,""))||0)})})]}):null,T?ke(Xr,{values:{repro:g,device:v,where:C,version:I},onChangeRepro:k=>e.setFormValue("bug_repro",k),onChangeDevice:k=>e.setFormValue("bug_device",k),onChangeWhere:k=>e.setFormValue("bug_where",k),onChangeVersion:k=>e.setFormValue("bug_version",k)}):null]}),leading:x?null:ke(Yn,{sx:{gridColumn:"1 / -1"},children:ke(xe,{icon:ke(ak,{sx:{fontSize:17}}),label:"\uB77C\uBCA8",onClick:k=>X(k),children:(O??[]).length>0?ke(Tt,{labelKeys:O??[],labelOptions:o}):ke(Yn,{component:"span",sx:{color:"#9a9a97"},children:"\uBE44\uC5B4 \uC788\uC74C"})})})}),ke(jn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),ke(_o,{icon:ke(rk,{sx:{fontSize:18,display:"block"}}),title:"\uB0B4\uC6A9",children:ke(Qr,{syncKey:s,value:H,onChange:k=>e.setFormValue("content",k)})}),x?null:ke(jn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),x?null:ke(Jr,{taskSeq:0,checklist:$,onAdd:(k,ne)=>e.setFormValue("checklist",[...$,{label:ne,checked:!1}]),onToggle:(k,ne,re)=>e.setFormValue("checklist",$.map((ve,$e)=>$e===ne?{...ve,checked:re}:ve)),onRemove:(k,ne)=>e.setFormValue("checklist",$.filter((re,ve)=>ve!==ne)),onUpdate:(k,ne,re)=>e.setFormValue("checklist",$.map((ve,$e)=>$e===ne?{...ve,label:re}:ve))}),ke(jn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),ke(oi,{taskSeq:0,attachments:ye.map(k=>({name:k.name,size:k.size})),onAdd:(k,ne)=>{let re=cc(ne,f);re.message&&mk(re.message),re.accepted.length!==0&&m.setValue("createAttachmentFiles",[...m.getValue("createAttachmentFiles")??[],...re.accepted])},onRemove:(k,ne)=>m.setValue("createAttachmentFiles",ye.filter((re,ve)=>ve!==ne))}),T?null:Xn(ii,{children:[ke(jn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),ke(_o,{icon:ke(ik,{sx:{fontSize:18,display:"block"}}),title:"\uBE44\uACE0",children:ke(ck,{form:e,name:"note",placeholder:"\uBE44\uACE0 \uC785\uB825",fullWidth:!0,size:"medium",sx:{mt:1}})})]})]}),ke(tk,{transitionDuration:0,anchorEl:K,open:!!K,onClose:()=>F(null),children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...W.map(k=>({seq:k.seq,label:vo(k)}))].map(k=>ke(nk,{onClick:()=>{e.setFormValue("sprint_seq",k.seq),F(null)},sx:{fontSize:14,minWidth:170},children:k.label},k.seq))}),ke(ni,{anchorEl:L,selectedKeys:O??[],labelOptions:o,onToggle:k=>e.setFormValue("label_keys",fr(O??[],k)),onAddLabel:(k,ne)=>d?.(k,ne),onClose:()=>X(null)})]})}import{Fragment as kk,jsx as Je,jsxs as ai}from"react/jsx-runtime";function RE({open:e,onClose:o,...t}){let{form:n,presetDueDate:r="",presetTabKey:i="",presetManager:a=null,isNotice:l=!1,defaultBug:u=!1}=t,c=et(),p=dk(!1),[d,s]=pc(0),[m,f]=pc(null),B=n.useFormValue("title"),b=n.useFormValue("icon"),h=n.useFormValue("icon_color"),x=!!n.useFormValue("is_event"),T=!!n.useFormValue("is_bug"),g=He(),C=c.useValue("createSubmitting")??!1,I=cr(b||_e);return uk(()=>{let M=p.current;p.current=e,!(!e||M)&&(n.setFormValues({...n.getFormValues(),title:"",icon:l?Mo:u?Pn:_e,icon_color:l?"#e5484d":u?Rn:"",manager_name:a?.name??"",manager_account_seq:a?.accountSeq??0,receiver_names:[],receiver_account_seqs:[],is_notice:l,is_event:!1,is_bug:u,is_open:u,bug_repro:"",bug_device:"",bug_where:"",bug_version:"",event_time:"",event_place:"",event_address:"",target_names:[],target_account_seqs:[],start_date:qe(new Date),due_date:r,reminder:"none",priority:"medium",note:"",content:"",checklist:[],tab_key:i}),c.setValue("createAttachmentFiles",[]),s(Q=>Q+1))},[e]),ai(kk,{children:[Je(fk,{anchor:"right",open:e,onClose:o,sx:{zIndex:M=>M.zIndex.modal},slotProps:{paper:{sx:{width:720,maxWidth:"100vw"}}},children:ai(Qn,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[ai(Qn,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1.5,flexShrink:0},children:[g?Je(Ca,{"aria-label":"\uB2EB\uAE30",onClick:o,sx:{color:"#6b7280"},children:Je(bk,{})}):null,Je(xk,{title:"\uC544\uC774\uCF58 \uBCC0\uACBD",arrow:!0,children:Je(Ca,{size:"small",onClick:M=>f(M.currentTarget),sx:{color:h||"#1e3a8a"},children:Je(I,{sx:{fontSize:20}})})}),Je(Qn,{component:"input",autoFocus:!0,spellCheck:!1,value:B,placeholder:l?"\uACF5\uC9C0 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694":x?"\uC77C\uC815 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694":T?"\uC5B4\uB5A4 \uC624\uB958\uC778\uC9C0 \uD55C \uC904\uB85C \uC801\uC5B4\uC8FC\uC138\uC694":"\uC5C5\uBB34 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694",onChange:M=>n.setFormValue("title",M.target.value),sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:18,fontWeight:500,color:"#37352f",p:0,m:0,"&::placeholder":{color:"#c9c8c5",fontWeight:400}}}),g?null:Je(Ca,{"aria-label":"\uB2EB\uAE30",onClick:o,sx:{color:"#6b7280"},children:Je(gk,{})})]}),Je(Qn,{sx:{flex:1,minHeight:0},children:Je(hk,{style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:Je(dc,{...t,contentSyncKey:`create-${d}`})})}),Je(pk,{sx:{borderColor:"#e6e6e3"}}),ai(Qn,{sx:{display:"flex",justifyContent:"flex-end",gap:1,px:2,py:1.5,flexShrink:0},children:[Je(fc,{onClick:o,color:"inherit",disabled:C,children:"\uCDE8\uC18C"}),Je(fc,{onClick:n.submit,variant:"contained",disabled:C,children:C?"\uB4F1\uB85D \uC911\u2026":"\uB4F1\uB85D"})]})]})}),Je(Ur,{anchorEl:m,value:b,color:h||"#1e3a8a",onSelect:M=>n.setFormValue("icon",M),onSelectColor:M=>n.setFormValue("icon_color",M),onClose:()=>f(null)})]})}import{useRef as TT}from"react";import{Box as za,Divider as Nc,Drawer as yT}from"@mui/material";import ST from"@ehfuse/overlay-scrollbar";import{useRef as xc,useState as Ia}from"react";import{Box as Te,Button as gc,Chip as Tc,IconButton as jt,Tooltip as Tk}from"@mui/material";import bc from"@mui/icons-material/Send";import{TextField as yk}from"@ehfuse/mui-form-controls";import Sk from"@mui/icons-material/Close";import Bk from"@mui/icons-material/EditOutlined";import Ck from"@mui/icons-material/Favorite";import vk from"@mui/icons-material/FavoriteBorderOutlined";import Ik from"@mui/icons-material/CheckCircle";import _k from"@mui/icons-material/CheckCircleOutlineOutlined";import _a from"@mui/icons-material/AttachFileOutlined";import wk from"@mui/icons-material/ImageOutlined";var va=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 kc,jsx as ee,jsxs as Ze}from"react/jsx-runtime";function hc({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:ee(Te,{sx:{whiteSpace:"pre-line",fontSize:12},children:r.map(c=>`${c.name} \xB7 ${c.time}`).join(`
|
|
8
|
+
`)}),u=e==="like"?"#e5484d":"#2f80ed";return ee(Tk,{title:l,arrow:!0,enterDelay:300,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:Ze(Te,{sx:{display:"inline-flex",alignItems:"center"},children:[ee(jt,{size:"small","aria-label":`\uB313\uAE00 ${a}`,onClick:n,sx:{color:i?u:"#c9c8c5",p:.5},children:e==="like"?i?ee(Ck,{sx:{fontSize:16}}):ee(vk,{sx:{fontSize:16}}):i?ee(Ik,{sx:{fontSize:16}}):ee(_k,{sx:{fontSize:16}})}),r.length>0?ee(Te,{component:"span",sx:{fontSize:12,color:i?u:"#9a9a97",ml:-.25},children:r.length}):null]})})}function yc({taskSeq:e,comments:o,currentUserName:t="",myAccountSeq:n=0,avatarSrcByName:r,onUpdate:i,onRemove:a,onToggleReaction:l}){let[u,c]=Ia(null),p=yo().slots?.avatar;return Ze(Te,{sx:{px:2,pb:2,display:"flex",flexDirection:"column",gap:.25},children:[Ze(Te,{sx:{fontSize:14.5,fontWeight:500,color:"#37352f"},children:["\uB313\uAE00",o.length>0?` (${o.length})`:""]}),o.length===0?ee(Te,{sx:{mt:1,fontSize:13.5,color:"#9a9a97"},children:"\uB4F1\uB85D\uB41C \uB313\uAE00\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):null,ee(Te,{sx:{display:"flex",flexDirection:"column",gap:1,mt:1},children:o.map((d,s)=>Ze(Te,{sx:{display:"flex",gap:1.5,alignItems:"flex-start","&:hover .taskbox-comment-actions":{opacity:1,pointerEvents:"auto"},"&:not(:last-child)":{borderBottom:"1px dashed #e0dfdc",pb:1}},children:[(()=>{let m=r?.get(d.author)??"";return p?ee(Te,{sx:{display:"inline-flex",flexShrink:0},children:ee(p,{name:d.author,src:m||void 0,size:44})}):ee(Te,{sx:{display:"inline-flex",flexShrink:0},children:ee(sn,{src:m,avatarSx:{width:44,height:44,fontSize:20,borderRadius:"50%",...cn[0]},iconFontSize:24})})})(),Ze(Te,{sx:{flex:1,minWidth:0},children:[Ze(Te,{sx:{display:"flex",alignItems:"center",gap:.75,minWidth:0,position:"relative"},children:[ee(Te,{component:"span",sx:{fontSize:14.5,fontWeight:700,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:d.author}),ee(Te,{component:"span",sx:{fontSize:12.5,color:"#9a9a97",flexShrink:0,whiteSpace:"nowrap"},children:d.time}),Ze(Te,{sx:{display:"flex",alignItems:"center",gap:.25,ml:"auto",flexShrink:0},children:[ee(hc,{kind:"like",reactions:d.likes,myAccountSeq:n,onToggle:()=>l?.(e,s,"like")}),ee(hc,{kind:"ack",reactions:d.acks,myAccountSeq:n,onToggle:()=>l?.(e,s,"ack")})]}),t&&d.author===t?Ze(Te,{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:[ee(jt,{size:"small","aria-label":"\uB313\uAE00 \uC218\uC815",onClick:()=>c({index:s,text:d.text}),sx:{color:"#9a9a97"},children:ee(Bk,{sx:{fontSize:15}})}),ee(jt,{size:"small","aria-label":"\uB313\uAE00 \uC0AD\uC81C",onClick:()=>{a(e,s),c(null)},sx:{color:"#9a9a97"},children:ee(Sk,{sx:{fontSize:15}})})]}):null]}),u?.index===s?Ze(Te,{sx:{mt:.5},children:[ee(Te,{component:"textarea",autoFocus:!0,spellCheck:!1,value:u.text,onChange:m=>c({index:s,text:m.target.value}),sx:{width:"100%",minHeight:56,border:"1px solid #dedddb",borderRadius:1,outline:"none",font:"inherit",fontSize:14,p:1,resize:"vertical"}}),Ze(Te,{sx:{display:"flex",justifyContent:"flex-end",gap:.75,mt:.5},children:[ee(gc,{size:"small",color:"inherit",onClick:()=>c(null),children:"\uCDE8\uC18C"}),ee(gc,{size:"small",variant:"contained",disabled:!u.text.trim(),onClick:()=>{i(e,s,u.text),c(null)},children:"\uC800\uC7A5"})]})]}):Ze(Te,{children:[d.text?ee(Te,{sx:{fontSize:15,whiteSpace:"pre-wrap"},children:d.text}):null,(d.attachments??[]).length>0?ee(Te,{sx:{display:"flex",flexWrap:"wrap",gap:.5,mt:.5},children:(d.attachments??[]).map((m,f)=>ee(Tc,{size:"small",icon:ee(_a,{sx:{fontSize:14}}),label:`${m.name} (${va(m.size)})`,sx:{fontSize:12,bgcolor:"#f1f5f9"}},`${m.name}-${f}`))}):null]})]})]},`${d.time}-${s}`))})]})}function Sc({onSubmit:e}){let[o,t]=Ia(""),[n,r]=Ia([]),i=xc(null),a=xc(null),l=He(),u=d=>{let s=Array.from(d??[]).map(m=>({name:m.name,size:m.size}));s.length!==0&&r(m=>[...m,...s].slice(0,10))},c=()=>{let d=o.trim();!d&&n.length===0||(e(d,n.length>0?n:void 0),t(""),r([]))},p=Ze(kc,{children:[ee(jt,{size:"small","aria-label":"\uD30C\uC77C \uCCA8\uBD80",onClick:()=>i.current?.click(),sx:{color:"#9a9a97"},children:ee(_a,{sx:{fontSize:20}})}),ee(jt,{size:"small","aria-label":"\uC774\uBBF8\uC9C0 \uCCA8\uBD80",onClick:()=>a.current?.click(),sx:{color:"#9a9a97"},children:ee(wk,{sx:{fontSize:20}})})]});return Ze(Te,{children:[n.length>0?ee(Te,{sx:{display:"flex",flexWrap:"wrap",gap:.5,px:2,pt:1},children:n.map((d,s)=>ee(Tc,{size:"small",icon:ee(_a,{sx:{fontSize:14}}),label:`${d.name} (${va(d.size)})`,onDelete:()=>r(m=>m.filter((f,B)=>B!==s)),sx:{fontSize:12,bgcolor:"#f1f5f9"}},`${d.name}-${s}`))}):null,Ze(Te,{sx:{position:"relative",display:"flex"},children:[ee(yk,{value:o,placeholder:"\uB313\uAE00\uC744 \uC785\uB825\uD558\uC138\uC694",onChange:d=>t(d.target.value),fullWidth:!0,multiline:!0,minRows:l?1:3,maxRows:3,sx:{"& .MuiInputBase-root":{pl:2,pr:l?15:6.5,pb:l?void 0:5,borderRadius:0},"& .MuiOutlinedInput-notchedOutline":{border:"none"}}}),l?Ze(Te,{sx:{position:"absolute",right:8,top:"50%",transform:"translateY(-50%)",display:"flex",alignItems:"center",gap:.25},children:[p,ee(jt,{"aria-label":"\uB313\uAE00 \uB4F1\uB85D",disabled:!o.trim()&&n.length===0,onClick:c,sx:{color:"#2563eb","&.Mui-disabled":{color:"#c9c8c5"}},children:ee(bc,{sx:{fontSize:22}})})]}):Ze(kc,{children:[ee(Te,{sx:{position:"absolute",left:8,bottom:6,display:"flex",alignItems:"center",gap:.25},children:p}),ee(jt,{"aria-label":"\uB313\uAE00 \uB4F1\uB85D",disabled:!o.trim()&&n.length===0,onClick:c,sx:{position:"absolute",right:8,top:"50%",transform:"translateY(-50%)",color:"#2563eb","&.Mui-disabled":{color:"#c9c8c5"}},children:ee(bc,{sx:{fontSize:22}})})]})]}),ee(Te,{component:"input",ref:i,type:"file",multiple:!0,onChange:d=>{u(d.target.files),d.target.value=""},sx:{display:"none"}}),ee(Te,{component:"input",ref:a,type:"file",accept:"image/*",multiple:!0,onChange:d=>{u(d.target.files),d.target.value=""},sx:{display:"none"}})]})}import{useState as vc}from"react";import{Box as wa,Checkbox as Ek,IconButton as Da,Tooltip as Oa}from"@mui/material";import Pk from"@mui/icons-material/Close";import Rk from"@mui/icons-material/ShareOutlined";import zk from"@mui/icons-material/ContentPasteOutlined";import qk from"@mui/icons-material/CheckCircle";import Ak from"@mui/icons-material/CheckCircleOutlineOutlined";import{InfoAlert as Dk,SuccessAlert as Ok}from"@ehfuse/alerts";var Bc=e=>e?e.replace(/<(script|style)[\s\S]*?<\/\1>/gi,"").replace(/<br\s*\/?>/gi,`
|
|
9
9
|
`).replace(/<\/(p|div|li|h[1-6]|tr)>/gi,`
|
|
10
10
|
`).replace(/<[^>]+>/g,"").replace(/ /gi," ").replace(/</gi,"<").replace(/>/gi,">").replace(/"/gi,'"').replace(/'/gi,"'").replace(/&/gi,"&").replace(/\n{3,}/g,`
|
|
11
11
|
|
|
12
|
-
`).trim():"";function
|
|
13
|
-
`)}function Cc(e){navigator.clipboard.writeText(e).then(()=>Mk("\uC5C5\uBB34 \uB0B4\uC6A9\uC744 \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>Ok("\uBCF5\uC0AC\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uB0B4\uC6A9\uC744 \uC9C1\uC811 \uC120\uD0DD\uD574 \uBCF5\uC0AC\uD574 \uC8FC\uC138\uC694."))}function li(e,o){let t=Ek(e);if(o&&typeof navigator.share=="function"){navigator.share({text:t}).catch(n=>{n?.name!=="AbortError"&&Cc(t)});return}Cc(t)}import{Fragment as Nk,jsx as eo,jsxs as Ic}from"react/jsx-runtime";function _c({task:e,myAccountSeq:o=0,onToggleCompleted:t,onChangeTitle:n,onChangeIcon:r,onChangeIconColor:i,onClose:a}){let l=He(),[u,c]=vc(null),[d,p]=vc(null),s=cr(e.icon||(e.is_notice?Mo:e.is_event?"event":_e)),m=!!e.is_notice,x=!!e.is_event,B=m&&o>0&&(e.author_account_seq??0)===o,b=!ot(e,o),h=!x&&(m?B:(e.author_account_seq??0)===o||(e.manager_account_seq??0)===o);return Ic(Nk,{children:[Ic(Da,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1.5,flexShrink:0},children:[h?eo(Ma,{title:e.completed&&e.completed_by?`${e.completed_by} \xB7 ${tt(e.completed_time)} \uC644\uB8CC`:e.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC",arrow:!0,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:eo(Pk,{checked:e.completed,icon:eo(Lk,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:eo(Ak,{sx:{fontSize:22,color:"#2f80ed"}}),onChange:(f,T)=>t(e.seq,T),sx:{p:0}})}):null,eo(Ma,{title:b?"":"\uC544\uC774\uCF58 \uBCC0\uACBD",arrow:!0,children:eo(Oa,{size:"small",onClick:b?void 0:f=>p(f.currentTarget),sx:{color:e.icon_color||(m?"#e5484d":"#1e3a8a")},children:eo(s,{sx:{fontSize:20}})})}),u!==null?eo(Da,{component:"input",autoFocus:!0,spellCheck:!1,value:u,onChange:f=>c(f.target.value),onBlur:()=>{u.trim()&&u.trim()!==e.title&&n(e.seq,u.trim()),c(null)},onKeyDown:f=>{f.key==="Enter"&&f.target.blur(),f.key==="Escape"&&c(null)},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:18,fontWeight:500,color:"#37352f",p:0,m:0}}):eo(Da,{onClick:b?void 0:()=>c(e.title),sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",cursor:b?"default":"text",textDecoration:e.completed?"line-through":"none"},children:e.title}),eo(Ma,{title:l?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",arrow:!0,children:eo(Oa,{"aria-label":l?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",onClick:()=>li(e,l),sx:{color:"#6b7280"},children:l?eo(zk,{sx:{fontSize:20}}):eo(qk,{sx:{fontSize:20}})})}),a?eo(Oa,{"aria-label":"\uB2EB\uAE30",onClick:a,sx:{color:"#6b7280"},children:eo(Rk,{})}):null]}),eo(Ur,{anchorEl:d,value:e.icon||(m?Mo:""),color:e.icon_color||(m?"#e5484d":"#1e3a8a"),onSelect:f=>r(e.seq,f),onSelectColor:f=>i?.(e.seq,f),onClose:()=>p(null)})]})}import{useState as Sn}from"react";import{Box as Bo,Button as si,ButtonBase as iT,Divider as Qt,Menu as aT,MenuItem as lT}from"@mui/material";import sT from"@mui/icons-material/ExpandLess";import cT from"@mui/icons-material/ExpandMore";import mT from"@mui/icons-material/ConfirmationNumberOutlined";import uT from"@mui/icons-material/Check";import pT from"@mui/icons-material/DirectionsRunOutlined";import dT from"@mui/icons-material/SpeedOutlined";import fT from"@mui/icons-material/CheckCircle";import qc from"@mui/icons-material/CheckCircleOutlined";import Ac from"@mui/icons-material/AccessTimeOutlined";import xT from"@mui/icons-material/AutorenewOutlined";import gT from"@mui/icons-material/LabelOutlined";import bT from"@mui/icons-material/PersonOutlineOutlined";import hT from"@mui/icons-material/SubjectOutlined";import kT from"@mui/icons-material/StickyNote2Outlined";import TT from"@mui/icons-material/PanToolAltOutlined";import{useState as Fk}from"react";import{TextField as Hk}from"@ehfuse/mui-form-controls";import{jsx as Wk}from"react/jsx-runtime";function wc({value:e,onCommit:o,onDraftChange:t,readOnly:n=!1}){let[r,i]=Fk(null);return Wk(Hk,{value:r??e,placeholder:n?"":"\uBE44\uACE0 \uC785\uB825",fullWidth:!0,size:"medium",slotProps:{input:{readOnly:n}},onChange:a=>{i(a.target.value),t?.(a.target.value)},onBlur:()=>{r!==null&&r.trim()!==e&&o(r),i(null)},onKeyDown:a=>{a.key==="Enter"&&a.target.blur(),a.key==="Escape"&&i(null)},sx:{mt:1}})}import{useMemo as Pc,useState as Ra}from"react";import{Box as oo,Button as Rc,IconButton as Zk}from"@mui/material";import eT from"@mui/icons-material/AccountTreeOutlined";import oT from"@mui/icons-material/Add";import tT from"@mui/icons-material/Close";import nT from"@mui/icons-material/NextPlanOutlined";function Xt(e){return e.relations??[]}function DP(e,o,t){return Xt(e).some(n=>n.type===t&&n.task_seq===o.seq)||Xt(o).some(n=>n.type===t&&n.task_seq===e.seq)}function Dc(e){return`${e.created_time??""}|${String(e.seq).padStart(12,"0")}`}function Oc(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 Xt(m))x.type==="follow_up"&&t.has(x.task_seq)&&r(m.seq,x.task_seq);let i=new Set([e.seq]),a=[e.seq];for(;a.length>0;){let m=a.shift();for(let x of n.get(m)??[])i.has(x)||(i.add(x),a.push(x))}let l=[...i].map(m=>t.get(m)).filter(m=>!!m).sort((m,x)=>Dc(m).localeCompare(Dc(x))),u=new Set;for(let m of Xt(e))m.type==="related"&&u.add(m.task_seq);for(let m of t.values())m.seq!==e.seq&&Xt(m).some(x=>x.type==="related"&&x.task_seq===e.seq)&&u.add(m.seq);let c=[...u].map(m=>t.get(m)).filter(m=>m!==void 0&&m.seq!==e.seq),d=[...t.values()].filter(m=>m.seq!==e.seq&&Xt(m).some(x=>x.type==="duplicate_of"&&x.task_seq===e.seq)),p=Xt(e).find(m=>m.type==="duplicate_of")?.task_seq,s=p?t.get(p)??null:null;return{lineage:l,related:c,duplicates:d,duplicateOf:s}}import{useEffect as $k,useMemo as Kk,useState as Ea}from"react";import{Box as yn,Button as Uk,Tab as Vk,Tabs as Gk}from"@mui/material";import Yk from"@mui/icons-material/Check";import{FormDialog as jk}from"@ehfuse/mui-form-dialog";import{ClearTextField as Xk}from"@ehfuse/mui-form-controls";import{ErrorAlert as Qk}from"@ehfuse/alerts";import{OverlayScrollbar as Jk}from"@ehfuse/overlay-scrollbar";import{jsx as wo,jsxs as Pa}from"react/jsx-runtime";var Mc=[{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 Ec({open:e,task:o,tasks:t,excludeSeqs:n=[],onClose:r,onSubmit:i}){let[a,l]=Ea("related"),[u,c]=Ea(""),[d,p]=Ea(0);$k(()=>{e&&(l("related"),c(""),p(0))},[e]);let s=Kk(()=>{let b=new Set([o.seq,...n]),h=u.trim().toLowerCase();return t.filter(f=>b.has(f.seq)||f.is_event||f.is_notice?!1:h?f.title.toLowerCase().includes(h)||(f.ticket_no??"").toLowerCase().includes(h):!0)},[t,o.seq,n,u]),m=()=>{if(!d){Qk("\uC5F0\uACB0\uD560 \uC5C5\uBB34\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return}i(d,a),r()},x=Mc.find(b=>b.type===a)?.hint??"",B=Pa(yn,{children:[wo(Gk,{value:a,onChange:(b,h)=>l(h),sx:{minHeight:38,mb:.75,"& .MuiTab-root":{minHeight:38,py:.5,fontSize:14}},children:Mc.map(b=>wo(Vk,{value:b.type,label:b.label},b.type))}),wo(yn,{sx:{mb:1.5,fontSize:12.5,color:"#9a9a97"},children:x}),wo(Xk,{label:"\uC5C5\uBB34 \uAC80\uC0C9",placeholder:"\uC81C\uBAA9\xB7\uD2F0\uCF13\uBC88\uD638\uB85C \uAC80\uC0C9",value:u,onChange:b=>c(b.target.value),fullWidth:!0,autoFocus:!0}),wo(yn,{sx:{mt:1.5,height:300,border:"1px solid #e6e6e3",borderRadius:1},children:wo(Jk,{style:{height:"100%"},children:s.length===0?wo(yn,{sx:{py:4,textAlign:"center",fontSize:13.5,color:"#9a9a97"},children:"\uC5F0\uACB0\uD560 \uC218 \uC788\uB294 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):s.map(b=>{let h=Oe(b.icon||_e),f=b.seq===d;return Pa(yn,{onClick:()=>p(f?0:b.seq),sx:{display:"flex",alignItems:"center",gap:.75,px:1.25,py:.75,cursor:"pointer",bgcolor:f?"#e3eefb":"transparent","&:hover":{bgcolor:f?"#e3eefb":"#f7f7f5"}},children:[h?wo(h,{sx:{fontSize:17,flexShrink:0,color:b.icon_color||"#1e3a8a"}}):null,Pa(yn,{component:"span",sx:{flex:1,minWidth:0,fontSize:14,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[b.ticket_no?`${b.ticket_no} `:"",b.title]}),wo(we,{option:fo(b),small:!0}),f?wo(Yk,{sx:{fontSize:17,flexShrink:0,color:"#2f80ed"}}):null]},b.seq)})})})]});return wo(jk,{open:e,onClose:r,maxWidth:"sm",title:"\uAD00\uB828 \uC5C5\uBB34 \uC5F0\uACB0",locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-task-link",sections:[{id:"task-link",showTitle:!1,children:B}],actions:{showCancelButton:!0,right:wo(Uk,{variant:"contained",disabled:!d,onClick:m,children:"\uC5F0\uACB0"})}})}import{Fragment as rT,jsx as ze,jsxs as No}from"react/jsx-runtime";function za({item:e,caption:o,onOpen:t,onUnlink:n}){let r=Oe(e.icon||_e);return No(oo,{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?ze(oo,{component:"span",sx:{flexShrink:0,px:.6,py:.1,borderRadius:.75,fontSize:11.5,fontWeight:500,color:"#8a6d1d",bgcolor:"#faf1d7"},children:o}):null,r?ze(r,{sx:{fontSize:16,flexShrink:0,color:e.icon_color||"#1e3a8a"}}):null,No(oo,{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]}),ze(we,{option:fo(e),small:!0}),n?ze(Zk,{className:"taskbox-relation-unlink",size:"small","aria-label":"\uC5F0\uACB0 \uD574\uC81C",onClick:n,sx:{opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:ze(tT,{sx:{fontSize:15}})}):null]})}function zc({task:e,tasks:o,readOnly:t=!1,onOpenTask:n,onLink:r,onUnlink:i,onCreateFollowUp:a}){let[l,u]=Ra(!1),[c,d]=Ra(null),[p,s]=Ra(null),m=Pc(()=>Oc(e,o),[e,o]),x=m.lineage.length>=2,B=(x?m.lineage.length-1:0)+m.related.length+m.duplicates.length+(m.duplicateOf?1:0),b=Pc(()=>{let f=new Set;for(let T of m.lineage)f.add(T.seq);for(let T of m.related)f.add(T.seq);for(let T of m.duplicates)f.add(T.seq);return m.duplicateOf&&f.add(m.duplicateOf.seq),[...f]},[m]),h=(f,T,g)=>{s({anchorEl:f,targetSeq:T,type:g})};return No(_o,{icon:ze(eT,{sx:{fontSize:19,display:"block"}}),title:No(rT,{children:["\uAD00\uB828 \uC5C5\uBB34",B>0?ze(oo,{component:"span",sx:{fontSize:12.5,color:"#9a9a97"},children:B}):null]}),titleExtra:t?null:No(oo,{sx:{ml:"auto",display:"flex",alignItems:"center",gap:.5},children:[a?ze(Rc,{size:"small",color:"inherit",startIcon:ze(nT,{sx:{fontSize:16}}),onClick:f=>d(f.currentTarget),sx:{minWidth:0,px:1,fontSize:12.5,color:"#787774"},children:"\uD6C4\uC18D \uC5C5\uBB34"}):null,r?ze(Rc,{size:"small",color:"inherit",startIcon:ze(oT,{sx:{fontSize:16}}),onClick:()=>u(!0),sx:{minWidth:0,px:1,fontSize:12.5,color:"#787774"},children:"\uC5F0\uACB0"}):null]}),children:[No(oo,{sx:{display:"flex",flexDirection:"column",mt:.5,pl:3.25},children:[x?ze(oo,{sx:{mb:m.related.length||m.duplicates.length||m.duplicateOf?1:0},children:m.lineage.map((f,T)=>{let g=f.seq===e.seq,v=T===m.lineage.length-1;return No(oo,{sx:{display:"flex",gap:1},children:[No(oo,{sx:{display:"flex",flexDirection:"column",alignItems:"center",width:14,flexShrink:0,pt:1.1},children:[ze(oo,{sx:{width:g?9:7,height:g?9:7,borderRadius:"50%",bgcolor:g?"#2f80ed":f.completed?"#9a9a97":"#c9c8c5",flexShrink:0}}),v?null:ze(oo,{sx:{width:"2px",flex:1,bgcolor:"#e6e6e3"}})]}),No(oo,{sx:{flex:1,minWidth:0,pb:v?0:.5},children:[No(oo,{sx:{display:"flex",alignItems:"center",gap:.75},children:[No(oo,{component:"span",onClick:!g&&n?()=>n(f.seq):void 0,sx:{minWidth:0,fontSize:14,fontWeight:g?600:400,color:g?"#2f80ed":f.completed?"#9a9a97":"#37352f",textDecoration:f.completed?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...!g&&n?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}},children:[f.ticket_no?`${f.ticket_no} `:"",f.title]}),ze(we,{option:fo(f),small:!0})]}),ze(oo,{sx:{fontSize:12,color:"#9a9a97"},children:f.completed&&f.completed_time?`${f.completed_time} \uC644\uB8CC`:f.created_time??""})]})]},f.seq)})}):null,m.duplicateOf?ze(za,{item:m.duplicateOf,caption:"\uC6D0\uBCF8",onOpen:n?()=>n(m.duplicateOf.seq):void 0,onUnlink:!t&&i?f=>h(f.currentTarget,m.duplicateOf.seq,"duplicate_of"):void 0}):null,m.duplicates.map(f=>ze(za,{item:f,caption:"\uC911\uBCF5",onOpen:n?()=>n(f.seq):void 0,onUnlink:!t&&i?T=>h(T.currentTarget,f.seq,"duplicate_of"):void 0},`dup-${f.seq}`)),m.related.map(f=>ze(za,{item:f,onOpen:n?()=>n(f.seq):void 0,onUnlink:!t&&i?T=>h(T.currentTarget,f.seq,"related"):void 0},`rel-${f.seq}`)),B===0?ze(oo,{sx:{px:1.25,py:.75,fontSize:13.5,color:"#9a9a97"},children:"\uC5F0\uACB0\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):null]}),r?ze(Ec,{open:l,task:e,tasks:o,excludeSeqs:b,onClose:()=>u(!1),onSubmit:(f,T)=>r(e.seq,f,T)}):null,ze(Ue,{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:()=>{a?.(e.seq),d(null)}}),ze(Ue,{open:!!p,anchorEl:p?.anchorEl??null,title:"\uC774 \uC5C5\uBB34\uC640\uC758 \uC5F0\uACB0\uC744 \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uD574\uC81C",onCancel:()=>s(null),onConfirm:()=>{p&&i?.(e.seq,p.targetSeq,p.type),s(null)}})]})}import{Fragment as ko,jsx as q,jsxs as We}from"react/jsx-runtime";function Bn({label:e="\uBE44\uC5B4 \uC788\uC74C"}){return q(Bo,{component:"span",sx:{color:"#9a9a97"},children:e})}function Lc({task:e,customTabs:o,statusOptions:t,avatarSrcByName:n,onChangeStatus:r,onChangeLabels:i,onAddLabelOption:a,onChangeProject:l,onAddProject:u,onChangeDate:c,onChangeReminder:d,onMemberEdit:p,onChangePriority:s,onChangeEstimatedTime:m,onChangeEventTime:x,onChangeEventPlace:B,onChangeEventAddress:b,onChangeNote:h,onChangeContent:f,onAddChecklistItem:T,onToggleChecklistItem:g,onRemoveChecklistItem:v,onUpdateChecklistItem:C,onConvertChecklistToTask:I,onOpenChecklistTask:M,resolveChecklistTask:Q,relatedTasksPool:E,onOpenRelatedTask:te,onLinkRelatedTask:w,onUnlinkRelatedTask:y,onCreateFollowUpTask:H,onAddAttachments:N,onRemoveAttachment:$,onPreview:P,onDownload:oe,onUpdateComment:pe,onRemoveComment:A,onToggleCommentReaction:W,currentUserName:K="",myAccountSeq:F=0,noticeAdmin:O=!1,hideProject:L=!1,employees:X=[],onAckConfirm:J,onChangeBugField:ue,sprints:Z=[],sprintProject:ye=!1,onChangeSprint:R,onChangeStoryPoints:k,onChangeResolution:ne,onClaimTask:re,onVerifyBug:ve}){let[$e,se]=Sn(null),[Ie,V]=Sn(!1),Ee={[jo]:Ie?{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"}},[Xe,bt]=Sn(null),[Wo,Zo]=Sn(null),[$o,Pt]=Sn(null),[rn,Oo]=Sn(null),no=!!e.is_notice,mo=!!e.is_event,uo=!!e.is_bug,Rt=!!re&&hr(e,F),de=!!re&&kr(e,F),D=!!ve&&uo&&!!e.completed&&F>0&&(e.author_account_seq??0)===F&&!(e.acks??[]).some(_=>_.account_seq===F),z=!ot(e,F),ie=no?!br(e,F):z,ce=Rt||de?We(mn,{onClick:_=>Oo(_.currentTarget),children:[q(TT,{sx:{fontSize:16,mr:.5}}),"\uAC00\uC838\uAC00\uAE30"]}):null,ae=no?ri(e,X):"",fe=no?sc(e,X,F):null;return We(ko,{children:[We(Bo,{sx:{py:1.5,display:"flex",flexDirection:"column",gap:.25},children:[q(jr,{hideProject:L,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:!mo,notice:no,event:mo,readOnly:z,targetSummary:ae,onChangeProject:_=>l(e.seq,_),onAddProject:u,onChangeStartDate:_=>c(e.seq,"start_date",_),onChangeDueDate:_=>c(e.seq,"due_date",_),onChangeReminder:_=>d(e.seq,_),onChangePriority:_=>s(e.seq,_),onChangeEstimatedTime:_=>m(e.seq,_),onChangeEventTime:_=>x?.(e.seq,_),onChangeEventPlace:_=>B?.(e.seq,_),onChangeEventAddress:_=>b?.(e.seq,_),onMemberEdit:_=>p(e,_),narrowCollapsedSx:Ee,reminderLocked:e.completed,managerAction:ce,leading:We(ko,{children:[D||ce&&(no||mo)?We(Bo,{sx:{gridColumn:"1 / -1",display:"flex",justifyContent:"center",gap:1,px:2,py:.75},children:[no||mo?ce:null,D?We(ko,{children:[q(si,{variant:"contained",size:"small",onClick:()=>ve?.(e.seq,!0),sx:{bgcolor:"#2f80ed"},children:"\uC218\uC815 \uD655\uC778(\uAC80\uC99D \uC644\uB8CC)"}),q(si,{variant:"outlined",size:"small",color:"error",onClick:()=>ve?.(e.seq,!1),children:"\uC544\uC9C1 \uC7AC\uD604\uB428(\uC7AC\uC624\uD508)"})]}):null]}):null,uo&&e.ticket_no?q(xe,{icon:q(mT,{sx:{fontSize:17}}),label:"\uD2F0\uCF13",children:q(Bo,{component:"span",sx:{fontVariantNumeric:"tabular-nums"},children:e.ticket_no})}):null,mo?null:q(Bo,{sx:uo&&e.ticket_no?void 0:{gridColumn:"1 / -1"},children:q(xe,{icon:q(xT,{sx:{fontSize:17}}),label:"\uC0C1\uD0DC",onClick:z||e.completed?void 0:_=>bt(_),children:q(we,{option:fo(e)})})}),ye&&!mo&&!no?We(ko,{children:[q(xe,{icon:q(pT,{sx:{fontSize:17}}),label:"\uBAA9\uD45C",onClick:z?void 0:_=>Zo(_),children:(e.sprint_seq??0)>0?Z.find(_=>_.seq===e.sprint_seq)?.name??"\uC0AD\uC81C\uB41C \uC2A4\uD504\uB9B0\uD2B8":q(Bn,{label:"\uBBF8\uBC30\uC815"})}),q(xe,{icon:q(dT,{sx:{fontSize:17}}),label:"\uD3EC\uC778\uD2B8",children:q(dt,{value:(e.story_points??0)>0?String(e.story_points):"",placeholder:"\uBBF8\uCD94\uC815",readOnly:z,onCommit:_=>k?.(e.seq,Number(_.replace(/[^0-9.]/g,""))||0)})})]}):null,mo?null:q(Bo,{sx:[{gridColumn:"1 / -1"},Ee??null],children:q(xe,{icon:q(gT,{sx:{fontSize:17}}),label:"\uB77C\uBCA8",onClick:z?void 0:_=>Pt(_),children:(e.label_keys??[]).length>0?q(Tt,{labelKeys:e.label_keys??[],labelOptions:t}):q(Bn,{})})}),no&&fe?q(Bo,{sx:{gridColumn:"1 / -1"},children:q(xe,{icon:q(qc,{sx:{fontSize:17}}),label:"\uD655\uC778",children:q(Bo,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,minWidth:0},children:fe.canAck?q(si,{size:"small",variant:"contained",onClick:()=>J?.(e.seq),sx:{py:.1,px:1.25,minWidth:0,color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}},children:"\uD655\uC778"}):q(si,{size:"small",variant:"outlined",color:"inherit",startIcon:fe.acked?q(fT,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:_=>se({anchorEl:_.currentTarget,open:!0}),sx:{py:.1,px:1.25,minWidth:0,fontSize:13,color:"text.primary",borderColor:"#d5d8dc",bgcolor:"#fff",whiteSpace:"nowrap"},children:fe.total>0&&fe.count>=fe.total?"\uC644\uB8CC":We(ko,{children:[fe.count,q(Bo,{component:"span",sx:{mx:.4},children:"/"}),fe.total]})})})})}):null]}),trailing:We(ko,{children:[uo?q(Xr,{values:{repro:e.bug_repro??"",device:e.bug_device??"",where:e.bug_where??"",version:e.bug_version??"",resolution:e.resolution??""},readOnly:z,showResolution:!!e.completed,onChangeRepro:_=>ue?.(e.seq,"bug_repro",_),onChangeDevice:_=>ue?.(e.seq,"bug_device",_),onChangeWhere:_=>ue?.(e.seq,"bug_where",_),onChangeVersion:_=>ue?.(e.seq,"bug_version",_),onChangeResolution:_=>ne?.(e.seq,_)}):null,q(xe,{icon:q(bT,{sx:{fontSize:17}}),label:"\uC791\uC131\uC790",sx:[so(9),Ee??null],children:e.created_by?We(ko,{children:[q(xo,{names:[e.created_by],size:20,avatarSrcByName:n}),e.created_by]}):q(Bn,{})}),q(xe,{icon:q(Ac,{sx:{fontSize:17}}),label:"\uC791\uC131\uC2DC\uAC04",sx:[so(11),Ee??null],children:e.created_time?tt(e.created_time):q(Bn,{})}),e.completed?We(ko,{children:[q(xe,{icon:q(qc,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC790",sx:[so(10),Ee??null],children:e.completed_by?We(ko,{children:[q(xo,{names:[e.completed_by],size:20,avatarSrcByName:n}),e.completed_by]}):q(Bn,{})}),q(xe,{icon:q(Ac,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC2DC\uAC04",sx:[so(12),Ee??null],children:e.completed_time?tt(e.completed_time):q(Bn,{})})]}):null]})}),We(Bo,{sx:{display:"none",[jo]:{display:"block",mt:1.5}},children:[q(Qt,{sx:{borderColor:"#e6e6e3"}}),q(iT,{onClick:()=>V(_=>!_),sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",gap:.5,pt:1.5,pb:1.25,fontSize:13,color:"#787774","&:active":{opacity:.6}},children:Ie?We(ko,{children:["\uC811\uAE30 ",q(sT,{sx:{fontSize:18}})]}):We(ko,{children:["\uC815\uBCF4 \uB354\uBCF4\uAE30 ",q(cT,{sx:{fontSize:18}})]})})]}),We(Bo,{children:[q(Qt,{sx:{my:1.5,borderColor:"#e6e6e3",[jo]:{mt:0}}}),q(_o,{icon:q(hT,{sx:{fontSize:18,display:"block"}}),title:"\uB0B4\uC6A9",children:q(Bo,{sx:{userSelect:"text"},children:q(Qr,{syncKey:e.seq,value:e.content??"",readOnly:z,onChange:_=>f(e.seq,_)})})}),e.is_bug?null:We(ko,{children:[q(Qt,{sx:{my:1.5,borderColor:"#e6e6e3"}}),q(_o,{icon:q(kT,{sx:{fontSize:18,display:"block"}}),title:"\uBE44\uACE0",children:q(Bo,{sx:{userSelect:"text"},children:q(wc,{value:e.note,readOnly:ie,onCommit:_=>h(e.seq,_)})})})]}),mo?null:We(ko,{children:[q(Qt,{sx:{my:1.5,borderColor:"#e6e6e3"}}),q(Jr,{taskSeq:e.seq,checklist:e.checklist??[],removeLocked:ie,onAdd:T,onToggle:g,onRemove:v,onUpdate:C,onConvertToTask:I,onOpenLinkedTask:M,resolveLinkedTask:Q})]}),E&&!mo&&!no?We(ko,{children:[q(Qt,{sx:{my:1.5,borderColor:"#e6e6e3"}}),q(zc,{task:e,tasks:E,readOnly:z,onOpenTask:te,onLink:w,onUnlink:y,onCreateFollowUp:H})]}):null,q(Qt,{sx:{my:1.5,borderColor:"#e6e6e3"}}),q(oi,{taskSeq:e.seq,attachments:e.attachments??[],removeLocked:ie,onAdd:N,onRemove:$,onPreview:P?_=>P({..._,taskSeq:e.seq}):void 0,onDownload:oe?_=>oe({..._,taskSeq:e.seq}):void 0})]}),q(Qt,{sx:{my:1.5,borderColor:"#e6e6e3"}}),q(yc,{taskSeq:e.seq,comments:e.comments??[],currentUserName:K,myAccountSeq:F,avatarSrcByName:n,onUpdate:pe,onRemove:A,onToggleReaction:W})]}),q(gr,{anchorEl:Xe,value:e.status,options:no?zn:uo?qt:qn,onSelect:_=>r(e.seq,_),onClose:()=>bt(null)}),q(aT,{transitionDuration:0,anchorEl:Wo,open:!!Wo,onClose:()=>Zo(null),children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...Z.filter(_=>`custom-${_.group_seq}`===String(e.tab_key??"")).map(_=>({seq:_.seq,label:vo(_)}))].map(_=>We(lT,{onClick:()=>{R?.(e.seq,_.seq),Zo(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[_.label,(e.sprint_seq??0)===_.seq?q(uT,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},_.seq))}),q(Or,{anchorEl:$e?.anchorEl??null,open:!!$e?.open,acks:e.acks??[],total:fe?.total??0,avatarSrcByName:n,onClose:()=>se(_=>_?{..._,open:!1}:null)}),q(ni,{anchorEl:$o,selectedKeys:e.label_keys??[],labelOptions:t,onToggle:_=>i(e.seq,fr(e.label_keys??[],_)),onAddLabel:a,onClose:()=>Pt(null)}),q(Ue,{open:!!rn,anchorEl:rn,title:Rt?"\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:()=>Oo(null),onConfirm:()=>{re?.(e.seq),Oo(null)}})]})}import{jsx as ft,jsxs as CT}from"react/jsx-runtime";function Z5(){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 eR({open:e,task:o,onClose:t,onAddComment:n,myAccountSeq:r=0,onToggleCompleted:i,onChangeTitle:a,onChangeIcon:l,onChangeIconColor:u,...c}){let d=yT(null);o&&(d.current=o);let p=o??d.current;return p?ft(ST,{anchor:"right",open:e,onClose:t,sx:{zIndex:s=>s.zIndex.modal},slotProps:{paper:{sx:{width:720,maxWidth:"100vw"}}},children:CT(qa,{sx:{display:"flex",flexDirection:"column",height:"100%",userSelect:"none"},children:[ft(_c,{task:p,myAccountSeq:r,onToggleCompleted:i,onChangeTitle:a,onChangeIcon:l,onChangeIconColor:u,onClose:t}),ft(Nc,{sx:{borderColor:"#e6e6e3"}}),ft(qa,{sx:{flex:1,minHeight:0},children:ft(BT,{style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:ft(Lc,{...c,task:p,myAccountSeq:r})})}),ft(Nc,{sx:{borderColor:"#37352f"}}),ft(qa,{sx:{flexShrink:0},children:ft(Sc,{onSubmit:(s,m)=>n(p.seq,s,m)},p.seq)})]})}):null}import{useEffect as IT,useState as Jt}from"react";import{Box as To,Button as Na,IconButton as Fc}from"@mui/material";import{FormDialog as _T}from"@ehfuse/mui-form-dialog";import wT from"@mui/icons-material/EditOutlined";import{ErrorAlert as Hc}from"@ehfuse/alerts";import{ClearTextField as Wc,DateTextField as $c,LabelSelect as Kc}from"@ehfuse/mui-form-controls";var Aa="custom-";function vT(e){return e.startsWith(Aa)}function nR(e){return e>0?`${Aa}${e}`:""}function La(e){if(!vT(e))return 0;let o=Number(e.slice(Aa.length));return Number.isInteger(o)&&o>0?o:0}import{Fragment as OT,jsx as Le,jsxs as Et}from"react/jsx-runtime";var DT=[{value:"planning",label:"\uACC4\uD68D\uC911"},{value:"active",label:"\uC9C4\uD589\uC911"},{value:"closed",label:"\uC885\uB8CC"}];function Uc(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?e.slice(5).replace("-","."):"-"}function dR({open:e,customTabs:o,sprints:t,onClose:n,onCreate:r,onUpdate:i,onChangeStatus:a,onRemove:l}){let u=o.filter(w=>w.useSprints&&!w.archived),[c,d]=Jt(""),[p,s]=Jt(""),[m,x]=Jt(""),[B,b]=Jt(""),[h,f]=Jt(""),[T,g]=Jt(!1),[v,C]=Jt(0);IT(()=>{e&&(d(u.length===1?u[0].key:""),s(""),x(""),b(""),f(""),C(0))},[e]);let I=()=>{s(""),x(""),b(""),f(""),C(0)},M=w=>{C(w.seq),d(`custom-${w.group_seq}`),s(w.name),x(w.goal),b(w.start_date),f(w.end_date)},Q=async()=>{let w=La(c);if(!w){Hc("\uBAA9\uD45C\uB97C \uB9CC\uB4E4 \uD504\uB85C\uC81D\uD2B8\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return}if(!p.trim()){Hc("\uBAA9\uD45C \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}g(!0);try{if(v>0){i(v,{name:p.trim(),goal:m.trim(),start_date:B,end_date:h}),I();return}await r({group_seq:w,name:p.trim(),goal:m.trim(),start_date:B,end_date:h})&&I()}finally{g(!1)}},E=new Map(o.map(w=>[La(w.key),w.label])),te=Le(To,{children:u.length===0?Le(To,{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.'}):Et(OT,{children:[Et(To,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2.5,mt:1},children:[Le(Kc,{label:"\uD504\uB85C\uC81D\uD2B8",size:"medium",value:c,options:u.map(w=>({value:w.key,label:w.label})),onChange:w=>d(String(w.target.value)),disabled:v>0}),Le(Wc,{label:"\uBAA9\uD45C \uC774\uB984",size:"medium",placeholder:"\uC608: 8\uC6D4 2\uC8FC\uCC28",value:p,onChange:w=>s(w.target.value)}),Le($c,{size:"medium",label:"\uC2DC\uC791\uC77C",value:B,onChange:w=>b(w.target.value)}),Le($c,{size:"medium",label:"\uC885\uB8CC\uC77C",value:h,onChange:w=>f(w.target.value)}),Le(Wc,{label:"\uC124\uBA85",size:"medium",placeholder:"\uC120\uD0DD \uC785\uB825",value:m,onChange:w=>x(w.target.value),sx:{gridColumn:"1 / -1"}})]}),Et(To,{sx:{mt:1.5,display:"flex",justifyContent:"flex-end",gap:1},children:[v>0?Le(Na,{color:"inherit",onClick:I,disabled:T,children:"\uCDE8\uC18C"}):null,Le(Na,{variant:"contained",onClick:()=>{Q()},disabled:T,children:v>0?"\uBAA9\uD45C \uC800\uC7A5":"\uBAA9\uD45C \uB9CC\uB4E4\uAE30"})]}),Le(To,{sx:{mt:2,borderTop:"1px solid #e6e6e3"},children:t.length===0?Le(To,{sx:{py:3,textAlign:"center",fontSize:14,color:"#9a9a97"},children:"\uB4F1\uB85D\uB41C \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):t.map(w=>Et(To,{sx:{display:"flex",flexDirection:"column",gap:1,py:1.75,borderBottom:"1px solid #f0efed"},children:[Et(To,{sx:{minWidth:0},children:[Et(To,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[Le(To,{component:"span",sx:{fontSize:16,fontWeight:600,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},children:w.name}),Le(To,{component:"span",sx:{flexShrink:0,px:1,py:.25,borderRadius:.75,bgcolor:"#f1f5f9",color:"#64748b",fontSize:13,fontWeight:500},children:E.get(w.group_seq)??"\uC0AD\uC81C\uB41C \uD504\uB85C\uC81D\uD2B8"}),Et(To,{component:"span",sx:{flexShrink:0,fontSize:14,color:"#57564f"},children:[Uc(w.start_date)," ~ ",Uc(w.end_date)]})]}),w.goal?Le(To,{sx:{mt:.5,fontSize:14,color:"#787774",lineHeight:1.5},children:w.goal}):null]}),Et(To,{sx:{display:"flex",alignItems:"center",gap:.5},children:[Le(Kc,{label:"\uC0C1\uD0DC",showLabel:!1,size:"small",value:w.status,options:DT.map(y=>({value:y.value,label:y.label})),onChange:y=>a(w.seq,String(y.target.value)),sx:{width:104,flexShrink:0}}),Le(Fc,{"aria-label":"\uBAA9\uD45C \uC218\uC815",onClick:()=>M(w),sx:{color:"#9a9a97","&:hover":{color:"#2563eb"}},children:Le(wT,{sx:{fontSize:18}})}),Le(Fc,{"aria-label":"\uBAA9\uD45C \uC0AD\uC81C",onClick:()=>l(w.seq),sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:Le(at,{style:{width:16,height:16}})})]})]},w.seq))})]})});return Le(_T,{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:te}],actions:{showCancelButton:!1,right:Le(Na,{variant:"contained",onClick:n,children:"\uB2EB\uAE30"})}})}import{useState as Vc}from"react";import{Box as je,Button as Fa,Divider as MT,IconButton as ET,TextField as PT}from"@mui/material";import{FormDialog as RT}from"@ehfuse/mui-form-dialog";import zT from"@mui/icons-material/OpenInNewOutlined";import qT from"@mui/icons-material/EventOutlined";import{ConfirmDialog as AT}from"@ehfuse/alerts";import{jsx as Ce,jsxs as Zt}from"react/jsx-runtime";function BR({open:e,imports:o,onRegister:t,onRemove:n,onClose:r}){let[i,a]=Vc(""),[l,u]=Vc(!1),c=async()=>{let s=i.trim();if(s){u(!0);try{await t(s)&&a("")}finally{u(!1)}}},d=async s=>{await AT({title:"\uAC00\uC838\uC624\uAE30 \uD574\uC81C",message:`"${s.name||"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}" \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30\uB97C \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&n(s.seq)},p=Zt(je,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[Zt(je,{sx:{color:"#37352f",lineHeight:1.7},children:["\uAD6C\uAE00 \uCE98\uB9B0\uB354\uC758 \uC77C\uC815\uC744 ",Ce("b",{children:"\uC77D\uAE30\uC804\uC6A9"}),"\uC73C\uB85C \uC5C5\uBB34\uD568 \uCE98\uB9B0\uB354\uC5D0 \uD568\uAED8 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4.",Ce("br",{}),"\uD45C\uC2DC/\uC228\uAE40\uC740 \uC5C5\uBB34\uD568 \uC6B0\uC0C1\uB2E8\uC758 ",Ce("b",{children:"\uAD6C\uAE00 \uC77C\uC815"})," \uC2A4\uC704\uCE58\uB85C \uCF1C\uACE0 \uB055\uB2C8\uB2E4."]}),Ce(je,{sx:{fontWeight:700,color:"#37352f",mt:.5},children:"\uB4F1\uB85D\uB41C \uCE98\uB9B0\uB354"}),o.length>0?Ce(je,{sx:{display:"flex",flexDirection:"column",border:"1px solid #e6e6e3",borderRadius:1},children:o.map((s,m)=>Zt(je,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:.75,borderTop:m>0?"1px solid #efefed":"none"},children:[Ce(qT,{sx:{fontSize:18,color:"#0f9d58",flexShrink:0}}),Ce(je,{component:"span",sx:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:s.name||"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),Ce(ET,{"aria-label":"\uAC00\uC838\uC624\uAE30 \uD574\uC81C",size:"small",onClick:()=>{d(s)},sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:Ce(at,{sx:{fontSize:18}})})]},s.seq))}):Ce(je,{sx:{color:"#9a9a97",px:.5},children:"\uC544\uC9C1 \uB4F1\uB85D\uB41C \uCE98\uB9B0\uB354\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}),Ce(MT,{sx:{my:1,borderColor:"#e6e6e3"}}),Ce(je,{sx:{fontWeight:700,color:"#37352f"},children:"\uC0C8 \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30"}),Zt(je,{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:[Ce(je,{children:Zt(je,{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 > ",Ce("b",{children:"\uC124\uC815 \uBC0F \uACF5\uC720"}),"\uB97C \uC5FD\uB2C8\uB2E4."]})}),Ce(je,{children:Zt(je,{component:"span",children:[Ce("b",{children:"\uCE98\uB9B0\uB354 \uD1B5\uD569"})," \uC139\uC158\uC758 ",Ce("b",{children:'"iCal \uD615\uC2DD\uC758 \uBE44\uBC00 \uC8FC\uC18C"'})," \uB97C \uBCF5\uC0AC\uD574 \uC544\uB798\uC5D0 \uBD99\uC5EC\uB123\uC73C\uC138\uC694."]})}),Ce(je,{children:Ce(je,{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."})}),Ce(je,{children:Ce(je,{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."})})]}),Zt(je,{sx:{display:"flex",gap:2,alignItems:"center"},children:[Ce(PT,{value:i,onChange:s=>a(s.target.value),fullWidth:!0,label:"\uBE44\uBC00 iCal \uC8FC\uC18C",placeholder:"https://calendar.google.com/calendar/ical/\u2026/basic.ics",slotProps:{input:{spellCheck:!1}}}),Ce(Fa,{variant:"contained",disabled:!i.trim()||l,onClick:()=>{c()},sx:{flexShrink:0},children:l?"\uD655\uC778 \uC911\u2026":"\uB4F1\uB85D"})]})]});return Ce(RT,{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:p}],actions:{showCancelButton:!1,left:Ce(Fa,{variant:"outlined",startIcon:Ce(zT,{sx:{fontSize:16}}),onClick:()=>window.open("https://calendar.google.com/calendar","_blank"),children:"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),right:Ce(Fa,{variant:"contained",onClick:r,children:"\uB2EB\uAE30"})}})}import{Box as xt,Button as Jn,TextField as LT}from"@mui/material";import{FormDialog as NT}from"@ehfuse/mui-form-dialog";import FT from"@mui/icons-material/ContentCopyOutlined";import Gc from"@mui/icons-material/OpenInNewOutlined";import{InfoAlert as Yc}from"@ehfuse/alerts";import{Fragment as WT,jsx as Ne,jsxs as en}from"react/jsx-runtime";function HT(e){return`${window.location.origin}/api/v1/taskbox/calendar/${e}.ics`}function MR({open:e,feed:o,feedTaskCount:t,buildFeedUrl:n,onSubscribe:r,onClose:i}){let a=n??HT,l=o.subscribed?a(o.token):"",u=()=>{navigator.clipboard.writeText(l).then(()=>Yc("\uD53C\uB4DC \uC8FC\uC18C\uB97C \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>Yc("\uBCF5\uC0AC\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uC8FC\uC18C\uB97C \uC9C1\uC811 \uC120\uD0DD\uD574 \uBCF5\uC0AC\uD558\uC138\uC694."))},c=()=>{let p=l.replace(/^https?:\/\//,"webcal://");window.open(`https://calendar.google.com/calendar/r?cid=${encodeURIComponent(p)}`,"_blank")},d=en(xt,{sx:{display:"flex",flexDirection:"column",gap:2.5},children:[en(xt,{sx:{color:"#37352f",lineHeight:1.7},children:["\uB0B4\uAC00 \uAD00\uC5EC\uD55C \uC5C5\uBB34\uB97C ",Ne("b",{children:"\uC77D\uAE30\uC804\uC6A9"}),"\uC73C\uB85C \uAD6C\uAE00 \uCE98\uB9B0\uB354\uC5D0\uC11C \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4."]}),t===0?en(xt,{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.",Ne("br",{}),Ne("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?en(WT,{children:[Ne(LT,{value:l,fullWidth:!0,label:"\uB0B4 \uD53C\uB4DC \uC8FC\uC18C",slotProps:{input:{readOnly:!0}}}),en(xt,{sx:{display:"flex",gap:2},children:[Ne(Jn,{variant:"outlined",startIcon:Ne(FT,{}),onClick:u,children:"\uC8FC\uC18C \uBCF5\uC0AC"}),Ne(Jn,{variant:"contained",startIcon:Ne(Gc,{}),onClick:c,children:"Google \uCE98\uB9B0\uB354\uC5D0 \uCD94\uAC00"})]}),en(xt,{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:[Ne(xt,{children:en("span",{children:["\uBC84\uD2BC\uC774 \uB3D9\uC791\uD558\uC9C0 \uC54A\uC73C\uBA74 \uAD6C\uAE00 \uCE98\uB9B0\uB354 > \uB2E4\uB978 \uCE98\uB9B0\uB354 + > ",Ne("b",{children:"URL\uB85C \uCD94\uAC00"}),"\uC5D0 \uC704 \uC8FC\uC18C\uB97C \uBD99\uC5EC\uB123\uC73C\uC138\uC694."]})}),Ne(xt,{children:Ne("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."})}),Ne(xt,{children:Ne("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."})}),Ne(xt,{children:Ne("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."})})]})]}):Ne(Jn,{variant:"contained",onClick:r,sx:{alignSelf:"flex-start"},children:"\uAD6C\uB3C5 \uC2DC\uC791 (\uD53C\uB4DC \uBC1C\uAE09)"})]});return Ne(NT,{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:Ne(Jn,{variant:"outlined",startIcon:Ne(Gc,{sx:{fontSize:16}}),onClick:()=>window.open("https://calendar.google.com/calendar","_blank"),children:"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),right:Ne(Jn,{variant:"contained",onClick:i,children:"\uB2EB\uAE30"})}})}import{useEffect as $T,useMemo as Ha,useState as Wa}from"react";import{Box as Zn,Button as KT,Typography as UT}from"@mui/material";import{FormDialog as VT}from"@ehfuse/mui-form-dialog";import{SearchTextField as GT}from"@ehfuse/mui-form-controls";import{TreeView as YT}from"@ehfuse/tree-view";import{Fragment as ey,jsx as Fo,jsxs as oy}from"react/jsx-runtime";function jc(e){return`${e.name}#${e.seq}`}function jT(e){return Number(e.slice(e.lastIndexOf("#")+1))||0}function XT(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 QT(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 JT(e){let o=[[e.name,e.role_name].filter(Boolean).join(" "),e.department].filter(Boolean).join(" / ");return{id:`emp:${e.seq}`,label:jc(e),renderLabel:Fo(Zn,{component:"span",sx:{display:"inline-flex",alignItems:"baseline",gap:.75},children:Fo(Zn,{component:"span",sx:{fontWeight:400,color:"text.primary"},children:o})})}}function Xc(e,o){let t=(e.groups??[]).map(r=>Xc(r,o)).filter(r=>r!==null),n=(e.employees??[]).filter(r=>QT(r,o)).map(JT);return t.length===0&&n.length===0?null:{id:`group:${e.key}`,label:e.name,children:[...t,...n]}}function ZT({groups:e,allEmployees:o,initialSelectedSeqs:t,multiple:n,isMobile:r,onSelectionChange:i}){let[a,l]=Wa(""),u=Ha(()=>e.map(d=>Xc(d,a.trim().toLowerCase())).filter(d=>d!==null),[e,a]),c=Ha(()=>o.filter(d=>t.includes(d.seq)).map(jc),[]);return oy(ey,{children:[Fo(Zn,{sx:{px:1.5,py:1,borderBottom:"1px solid #cccccc",flexShrink:0},children:Fo(GT,{size:"small",fullWidth:!0,placeholder:"\uC774\uB984, \uBD80\uC11C \uAC80\uC0C9",onSearch:l,onClear:()=>l(""),sx:{"& .MuiOutlinedInput-notchedOutline":{border:"none"},"& .MuiInputBase-root":{px:0}}})}),Fo(Zn,{sx:r?{display:"flex",flexDirection:"column"}:{flex:1,minHeight:0,overflow:"hidden",display:"flex",flexDirection:"column"},children:Fo(YT,{items:u,checkbox:!0,multiSelect:n,selectionMode:"child",showSearch:!1,defaultExpanded:!0,initialSelections:c,onChange:d=>i(d.map(jT).filter(p=>p>0)),styles:{border:"none",borderRadius:"0"}})})]})}function FR({open:e,title:o="\uC9C1\uC6D0 \uC120\uD0DD",hint:t="",groups:n,multiple:r=!1,selectedSeqs:i,confirmText:a="\uD655\uC778",onConfirm:l,onClose:u}){let c=He(),[d,p]=Wa([]),[s,m]=Wa(0),x=Ha(()=>XT(n),[n]),B=i??[];$T(()=>{e&&(p(B),m(h=>h+1))},[e]);let b=()=>{let h=x.filter(f=>d.includes(f.seq));l(r?h:h.slice(0,1)),u()};return Fo(VT,{open:e,onClose:u,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:Fo(Zn,{sx:{...c?{}:{height:560},display:"flex",flexDirection:"column",border:"1px solid #cccccc",borderRadius:1,...c?{}:{overflow:"hidden"},userSelect:"none"},children:Fo(ZT,{groups:n,allEmployees:x,initialSelectedSeqs:B,multiple:r,isMobile:c,onSelectionChange:p},s)})}],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?Fo(UT,{variant:"body2",color:"text.secondary",sx:{whiteSpace:"pre-line",lineHeight:1.35},children:t}):void 0,right:Fo(KT,{variant:"contained",onClick:b,children:a})}})}import{useEffect as iy,useMemo as ay,useState as ly}from"react";import{Box as In,Button as sy,Divider as cy}from"@mui/material";import{FormDialog as my}from"@ehfuse/mui-form-dialog";import{LabelSelect as uy}from"@ehfuse/mui-form-controls";import{Box as Qo}from"@mui/material";import{jsx as Cn,jsxs as vn}from"react/jsx-runtime";function ty(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 Qc({sprints:e,tasks:o,height:t=160}){let r=[...e].sort((d,p)=>`${d.start_date}|${d.seq}`.localeCompare(`${p.start_date}|${p.seq}`)).map(d=>({sprint:d,...ty(d,o)})),i=r.some(d=>d.points>0),a=r.map(d=>i?d.points:d.count),l=Math.max(1,...a),u=r.filter(d=>d.sprint.status==="closed").map(d=>i?d.points:d.count),c=u.length>0?Math.round(u.reduce((d,p)=>d+p,0)/u.length*10)/10:null;return r.length===0?Cn(Qo,{sx:{py:4,textAlign:"center",fontSize:14.5,color:"#9a9a97"},children:"\uD45C\uC2DC\uD560 \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):vn(Qo,{children:[vn(Qo,{sx:{mb:1,display:"flex",justifyContent:"space-between",fontSize:14,color:"#000"},children:[vn("span",{children:["\uC644\uB8CC ",i?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uBAA9\uD45C\uBCC4"]}),c!==null?vn("span",{children:["\uD3C9\uADE0(\uC885\uB8CC \uBAA9\uD45C)"," ",Cn(Qo,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:c}),i?"SP":"\uAC74"]}):null]}),Cn(Qo,{sx:{display:"flex",alignItems:"flex-end",gap:2,height:t,px:.5},children:r.map(d=>{let p=i?d.points:d.count,s=Math.round((t-24)*p/l),m=d.sprint.status==="closed";return vn(Qo,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-end",height:"100%"},children:[Cn(Qo,{sx:{fontSize:14,fontWeight:700,color:"#37352f",lineHeight:1.5},children:p}),Cn(Qo,{sx:{width:"60%",maxWidth:56,height:Math.max(2,s),borderRadius:"4px 4px 0 0",bgcolor:m?"#2f80ed":"#a9c9f5"}})]},d.sprint.seq)})}),Cn(Qo,{sx:{display:"flex",gap:2,px:.5,mt:.5},children:r.map(d=>vn(Qo,{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))})]})}import{useMemo as ny}from"react";import{Box as on}from"@mui/material";import{jsx as Jo,jsxs as tn}from"react/jsx-runtime";function Jc(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?new Date(`${e}T00:00:00`):null}function ry(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function $a(e){return e.slice(5).replace("-",".")}function Zc({sprint:e,tasks:o,todayStr:t,height:n=200}){let r=ny(()=>{let h=Jc(e.start_date),f=Jc(e.end_date);if(!h||!f||f<h||Math.round((f.getTime()-h.getTime())/864e5)+1>366)return null;let g=o.filter(w=>w.sprint_seq===e.seq&&!w.archived);if(g.length===0)return{empty:!0};let v=g.some(w=>(w.story_points??0)>0),C=w=>v?w.story_points??0:1,I=g.reduce((w,y)=>w+C(y),0),M=new Map;for(let w of g){if(!w.completed)continue;let y=(w.completed_time??"").slice(0,10),H=/^\d{4}-\d{2}-\d{2}$/.test(y)?y:e.start_date;M.set(H,(M.get(H)??0)+C(w))}let Q=[];for(let w=new Date(h);w<=f;w.setDate(w.getDate()+1))Q.push(ry(w));let E=I,te=[];for(let w of Q){if(w>t)break;E-=M.get(w)??0,te.push({day:w,value:Math.max(0,E)})}return{empty:!1,days:Q,total:I,usePoints:v,actual:te}},[e,o,t]);if(!r)return Jo(on,{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 Jo(on,{sx:{py:4,textAlign:"center",fontSize:14.5,color:"#9a9a97"},children:"\uBC30\uC815\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."});let{days:i,total:a,usePoints:l,actual:u}=r,c=600,d=200,p=8,s=h=>i.length===1?0:h/(i.length-1)*c,m=h=>p+(d-p*2)*(1-h/Math.max(1,a)),x=`${s(0)},${m(a)} ${s(i.length-1)},${m(0)}`,B=u.map(h=>`${s(i.indexOf(h.day))},${m(h.value)}`).join(" "),b=u[u.length-1];return tn(on,{children:[tn(on,{sx:{mb:1,display:"flex",justifyContent:"space-between",fontSize:14,color:"#000"},children:[tn("span",{children:["\uB0A8\uC740 ",l?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uCD1D ",a]}),b?tn("span",{children:["\uD604\uC7AC"," ",Jo(on,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:b.value}),l?"SP":"\uAC74"," \uB0A8\uC74C"]}):null]}),Jo(on,{sx:{border:"1px solid #e6e6e3",borderRadius:1,bgcolor:"#fafaf9",px:1,py:.5},children:tn("svg",{viewBox:`0 0 ${c} ${d}`,preserveAspectRatio:"none",style:{display:"block",width:"100%",height:n},children:[Jo("line",{x1:0,y1:m(0),x2:c,y2:m(0),stroke:"#e6e6e3",strokeWidth:1}),Jo("polyline",{points:x,fill:"none",stroke:"#9a9a97",strokeWidth:1.5,strokeDasharray:"6 5",vectorEffect:"non-scaling-stroke"}),u.length>1?Jo("polyline",{points:B,fill:"none",stroke:"#2f80ed",strokeWidth:2.5,vectorEffect:"non-scaling-stroke"}):null,b?Jo("circle",{cx:s(i.indexOf(b.day)),cy:m(b.value),r:4,fill:"#2f80ed",vectorEffect:"non-scaling-stroke"}):null]})}),tn(on,{sx:{mt:.5,display:"flex",justifyContent:"space-between",fontSize:13.5,color:"#000"},children:[Jo("span",{children:$a(e.start_date)}),t>e.start_date&&t<e.end_date?tn("span",{children:["\uC624\uB298 ",$a(t)]}):null,Jo("span",{children:$a(e.end_date)})]})]})}import{jsx as gt,jsxs as Ka}from"react/jsx-runtime";function n2({open:e,sprints:o,tasks:t,todayStr:n,initialSprintSeq:r=0,onClose:i}){let[a,l]=ly(0);iy(()=>{if(!e)return;let d=o.find(s=>s.status==="active")??o[0],p=o.find(s=>s.seq===r)??d;l(p?.seq??0)},[e]);let u=ay(()=>o.find(d=>d.seq===a)??null,[o,a]),c=Ka(In,{sx:{display:"flex",flexDirection:"column"},children:[Ka(In,{sx:{px:3,py:2.5},children:[gt(In,{sx:{mb:1.5,fontSize:17,fontWeight:700,color:"#37352f"},children:"\uBCA8\uB85C\uC2DC\uD2F0"}),gt(Qc,{sprints:o,tasks:t})]}),gt(cy,{sx:{borderColor:"#e6e6e3"}}),Ka(In,{sx:{px:3,py:2.5},children:[gt(In,{sx:{mb:1.5,fontSize:17,fontWeight:700,color:"#37352f"},children:"\uBC88\uB2E4\uC6B4"}),gt(uy,{label:"\uBAA9\uD45C",showLabel:!1,value:a?String(a):"",options:o.map(d=>({value:String(d.seq),label:vo(d)})),onChange:d=>l(Number(d.target.value)||0),sx:{width:280,mb:2}}),u?gt(Zc,{sprint:u,tasks:t,todayStr:n}):gt(In,{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 gt(my,{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:gt(sy,{variant:"contained",onClick:i,children:"\uB2EB\uAE30"})}})}import{Checkbox as py,Divider as dy,Menu as fy,MenuItem as Ua}from"@mui/material";import{jsx as er,jsxs as em}from"react/jsx-runtime";function s2({anchorEl:e,candidates:o,selectedNames:t,avatarSrcByName:n,onToggle:r,onClear:i,onClose:a}){return em(fy,{anchorEl:e,open:!!e,onClose:a,transitionDuration:0,children:[o.length===0?er(Ua,{disabled:!0,sx:{fontSize:14},children:"\uBAA9\uB85D\uC5D0 \uC9C0\uC815\uB41C \uC0AC\uB78C\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):o.map(l=>{let u=t.includes(l.name);return em(Ua,{onClick:()=>r(l),sx:{fontSize:14,minWidth:170,gap:1},children:[er(py,{size:"small",checked:u,sx:{p:0}}),er(xo,{names:[l.name],size:20,avatarSrcByName:n}),l.name]},`${l.accountSeq}-${l.name}`)}),er(dy,{}),er(Ua,{disabled:t.length===0,onClick:i,sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}import{useState as xy}from"react";import{ButtonBase as gy,Menu as by,MenuItem as hy}from"@mui/material";import ky from"@mui/icons-material/KeyboardArrowDown";import Ty from"@mui/icons-material/Check";import{Fragment as yy,jsx as Va,jsxs as Ga}from"react/jsx-runtime";function g2({value:e,onChange:o,options:t}){let[n,r]=xy(null),i=t??Ei,a=Ei.find(l=>l.value===e)?.label??"";return Ga(yy,{children:[Ga(gy,{onClick:l=>r(l.currentTarget),sx:{display:"flex",alignItems:"center",gap:.5,px:1,py:.5,borderRadius:1,fontSize:13.5,color:"#37352f","&:hover":{bgcolor:"#f2f2f0"}},children:[a,Va(ky,{sx:{fontSize:17,color:"#9a9a97"}})]}),Va(by,{transitionDuration:0,anchorEl:n,open:!!n,onClose:()=>r(null),children:i.map(l=>Ga(hy,{selected:l.value===e,onClick:()=>{o(l.value),r(null)},sx:{fontSize:14,minWidth:140,justifyContent:"space-between",gap:1},children:[l.label,l.value===e?Va(Ty,{sx:{fontSize:16,color:"#2f80ed"}}):null]},l.value))})]})}import{Box as mi,ButtonBase as Sy}from"@mui/material";import{DateTextField as om}from"@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 k2(e=new Date){return{fromDate:nn(ci(1,e)),toDate:nn(e)}}import{jsx as or,jsxs as tm}from"react/jsx-runtime";var By=[{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 nm({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 tm(mi,{sx:{display:"flex",alignItems:"center",gap:1.5,flexWrap:"wrap"},children:[or(mi,{sx:{display:"flex",alignItems:"center",gap:1.5},children:By.map(i=>{let a=r(i.months);return or(Sy,{onClick:()=>n(i.months),sx:{px:1.25,py:.85,borderRadius:1,fontSize:13,fontWeight:a?500:400,border:"1px solid",borderColor:a?"#2f80ed":"#dedddb",color:a?"#2f80ed":"#37352f",bgcolor:a?"#eef6ff":"transparent","&:hover":{bgcolor:a?"#eef6ff":"#f7f7f5"}},children:i.label},i.label)})}),tm(mi,{sx:{display:"flex",alignItems:"center",gap:.5},children:[or(om,{value:e,size:"small",placeholder:"\uC2DC\uC791\uC77C",onChange:i=>t(i.target.value,o),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}}),or(mi,{component:"span",sx:{fontSize:13,color:"#9a9a97"},children:"~"}),or(om,{value:o,size:"small",placeholder:"\uC885\uB8CC\uC77C",onChange:i=>t(e,i.target.value),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}})]})]})}import{Popover as Cy}from"@mui/material";import{jsx as rm}from"react/jsx-runtime";function w2({anchorEl:e,fromDate:o,toDate:t,onChange:n,onClose:r}){return rm(Cy,{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:rm(nm,{fromDate:o,toDate:t,onChange:n})})}import{Box as vy,ButtonBase as Iy,Tab as _y,Tabs as wy}from"@mui/material";import Dy from"@mui/icons-material/Checklist";import Oy from"@mui/icons-material/Face";import My from"@mui/icons-material/Publish";import Ey from"@mui/icons-material/NotificationsOutlined";import Py from"@mui/icons-material/BugReportOutlined";import Ry from"@mui/icons-material/DescriptionOutlined";import zy from"@mui/icons-material/Inventory2Outlined";import{jsx as Ho}from"react/jsx-runtime";function im(e,o){return o>0?`${e} (${o})`:e}var H2=[{id:"my",label:"\uC804\uCCB4",icon:Ho(Dy,{sx:{fontSize:18}})},{id:"notice",label:"\uACF5\uC9C0\uC0AC\uD56D",icon:Ho(Ey,{sx:{fontSize:18}})},{id:"mine",label:"\uB0B4 \uC5C5\uBB34",icon:Ho(Oy,{sx:{fontSize:18}})},{id:"sent",label:"\uBCF4\uB0B8 \uC5C5\uBB34",icon:Ho(My,{sx:{fontSize:18}})},{id:"bug",label:"\uC624\uB958",icon:Ho(Py,{sx:{fontSize:18}})},{id:"archive",label:"\uBCF4\uAD00\uD568",icon:Ho(zy,{sx:{fontSize:18}}),hideCount:!0},{id:"report",label:"\uBCF4\uACE0\uC11C",icon:Ho(Ry,{sx:{fontSize:18}}),hideCount:!0}];function qy(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 W2({items:e,activeTab:o,counts:t,onChange:n,compact:r=!1}){let i=le(),a=qy(i.tabs),l=e;return r?Ho(vy,{sx:{display:"flex",flexWrap:"wrap",gap:1.25},children:l.map(u=>{let c=o===u.id;return Ho(Iy,{onClick:()=>n(u.id),sx:{px:1.5,py:.75,borderRadius:1,fontSize:po(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:im(u.label,u.hideCount?0:t[u.id]??0)},u.id)})}):Ho(wy,{value:o,onChange:(u,c)=>n(c),sx:{minHeight:46,"& .MuiTabs-indicator":{display:"none"},"& .MuiTabs-flexContainer":{gap:"12px",minHeight:46}},children:l.map(u=>Ho(_y,{value:u.id,label:im(u.label,u.hideCount?0:t[u.id]??0),icon:u.icon,iconPosition:"start",sx:a},u.id))})}import{useEffect as Ay,useMemo as Ly,useState as Ya}from"react";import{Divider as ja,ListItemIcon as Do,Menu as Xa,MenuItem as co}from"@mui/material";import Ny from"@mui/icons-material/OpenInNewOutlined";import Fy from"@mui/icons-material/Check";import Hy from"@mui/icons-material/CheckCircleOutlined";import Wy from"@mui/icons-material/RadioButtonUnchecked";import $y from"@mui/icons-material/SendOutlined";import Ky from"@mui/icons-material/EventOutlined";import Uy from"@mui/icons-material/PersonOutlineOutlined";import Vy from"@mui/icons-material/ViewKanbanOutlined";import Gy from"@mui/icons-material/ContentCopyOutlined";import Yy from"@mui/icons-material/NextPlanOutlined";import jy from"@mui/icons-material/ContentPasteOutlined";import Xy from"@mui/icons-material/ShareOutlined";import Qy from"@mui/icons-material/DirectionsRunOutlined";import am from"@mui/icons-material/ChevronRight";import Jy from"@mui/icons-material/ArchiveOutlined";import Zy from"@mui/icons-material/UnarchiveOutlined";import{ConfirmDialog as eS}from"@ehfuse/alerts";import{Fragment as oS,jsx as me,jsxs as to}from"react/jsx-runtime";function hz({target:e,onClose:o,customTabs:t,sprints:n=[],myAccountSeq:r=0,onOpenDetail:i,onToggleCompleted:a,onRequestConfirm:l,onChangeDueDate:u,onChangeReminder:c,onMemberEdit:d,onMoveProject:p,onDuplicate:s,onCreateFollowUp:m,onShare:x,onAssignSprint:B,onArchiveToggle:b,onDelete:h}){let f=He(),T=Uo(),[g,v]=Ya(null),[C,I]=Ya(null),[M,Q]=Ya(null);Ay(()=>{e||(v(null),I(null),Q(null))},[e]);let E=e?.task??null,te=!!E?.is_notice,w=!!E?.is_event,y=E?!ot(E,r):!1,H=Ly(()=>new Set(t.filter(P=>P.useSprints).map(P=>P.key)),[t]),N=async()=>{let P=E;if(o(),!P)return;await eS({title:"\uC5C5\uBB34 \uC0AD\uC81C",message:`"${P.title}" \uC5C5\uBB34\uB97C \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&h(P.seq)},$=()=>{E&&b(E.seq,!E.archived),o()};return to(oS,{children:[to(Xa,{open:!!e,onClose:o,transitionDuration:0,anchorReference:f?"none":"anchorPosition",anchorPosition:!f&&e?{top:e.position.top,left:e.position.left}:void 0,slotProps:{paper:{sx:{minWidth:190,...f?{position:"fixed",top:"50%",left:"50%",translate:"-50% -50%",maxHeight:"70vh"}:{}}},list:f?{sx:{"& .MuiMenuItem-root":{py:1,minHeight:0}}}:void 0},children:[to(co,{onClick:()=>{E&&i(E),o()},sx:{fontSize:14},children:[me(Do,{children:me(Ny,{sx:{fontSize:19}})}),"\uC0C1\uC138 \uC5F4\uAE30"]}),to(co,{disabled:te?(E?.author_account_seq??0)!==r:(E?.author_account_seq??0)!==r&&(E?.manager_account_seq??0)!==r,onClick:()=>{E&&a(E.seq,!E.completed),o()},sx:{fontSize:14},children:[me(Do,{children:E?.completed?me(Wy,{sx:{fontSize:19}}):me(Hy,{sx:{fontSize:19}})}),E?.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC"]}),!te&&l?to(co,{disabled:!(E?.manager_account_seq??0)&&(E?.receiver_account_seqs??[]).length===0,onClick:()=>{E&&l(E),o()},sx:{fontSize:14},children:[me(Do,{children:me($y,{sx:{fontSize:19}})}),"\uD655\uC778 \uC694\uCCAD"]}):null,w?null:me(ja,{}),w?null:to(co,{disabled:y,onClick:P=>{E&&v({anchorEl:P.currentTarget,task:E})},sx:{fontSize:14},children:[me(Do,{children:me(Ky,{sx:{fontSize:19}})}),"\uB9C8\uAC10\uAE30\uD55C \uBCC0\uACBD"]}),!te&&!w&&d?to(co,{onClick:()=>{E&&d(E,"manager"),o()},sx:{fontSize:14},children:[me(Do,{children:me(Uy,{sx:{fontSize:19}})}),"\uCC45\uC784\uC790 \uBCC0\uACBD"]}):null,w?null:to(co,{disabled:y,onClick:P=>{E&&I({anchorEl:P.currentTarget,task:E})},sx:{fontSize:14},children:[me(Do,{children:me(Vy,{sx:{fontSize:19}})}),"\uD504\uB85C\uC81D\uD2B8 \uC774\uB3D9",me(am,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}),me(ja,{}),s?to(co,{disabled:y,onClick:()=>{E&&s(E.seq),o()},sx:{fontSize:14},children:[me(Do,{children:me(Gy,{sx:{fontSize:19}})}),"\uBCF5\uC81C"]}):null,m&&E&&!E.is_event&&!E.is_notice?to(co,{onClick:()=>{E&&m(E.seq),o()},sx:{fontSize:14},children:[me(Do,{children:me(Yy,{sx:{fontSize:19}})}),"\uD6C4\uC18D \uC5C5\uBB34 \uB9CC\uB4E4\uAE30"]}):null,to(co,{onClick:()=>{E&&(x?x(E):li(E,f)),o()},sx:{fontSize:14},children:[me(Do,{children:f?me(Xy,{sx:{fontSize:19}}):me(jy,{sx:{fontSize:19}})}),f?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC"]}),E&&!E.is_notice&&!E.is_event&&H.has(String(E.tab_key??""))&&B?to(co,{onClick:P=>Q(P.currentTarget),sx:{fontSize:14},children:[me(Do,{children:me(Qy,{sx:{fontSize:19}})}),"\uBAA9\uD45C\uC5D0 \uB123\uAE30",me(am,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}):null,to(co,{onClick:$,disabled:y||!E?.archived&&!(E&&pr(E)),sx:{fontSize:14},children:[me(Do,{children:E?.archived?me(Zy,{sx:{fontSize:19}}):me(Jy,{sx:{fontSize:19}})}),E?.archived?"\uBCF4\uAD00 \uD574\uC81C":"\uBCF4\uAD00"]}),me(ja,{}),to(co,{disabled:y,onClick:N,sx:{fontSize:14,color:"#e5484d"},children:[me(Do,{children:me(at,{sx:{fontSize:19,color:"#e5484d"}})}),"\uC0AD\uC81C"]})]}),me(St,{anchorEl:g?.anchorEl??null,open:!!g,date:g?.task.due_date??"",reminder:g?.task.reminder??"none",hideReminder:!!g?.task.completed,centered:f,onClose:()=>{v(null),o()},onDateChange:P=>{g&&u(g.task.seq,P)},onReminderChange:P=>{g&&c?.(g.task.seq,P)}}),to(Xa,{transitionDuration:0,anchorEl:C?.anchorEl??null,open:!!C,onClose:()=>{I(null),o()},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},...T,children:[me(co,{selected:!C?.task.tab_key,onClick:()=>{C&&p(C.task.seq,""),I(null),o()},sx:{fontSize:14,minWidth:170},children:"\uC5C6\uC74C"}),t.filter(P=>!P.archived).map(P=>me(co,{selected:C?.task.tab_key===P.key,onClick:()=>{C&&p(C.task.seq,P.key),I(null),o()},sx:{fontSize:14,minWidth:170},children:P.label},P.key))]}),me(Xa,{transitionDuration:0,anchorEl:M,open:!!M,onClose:()=>Q(null),anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...n.filter(P=>`custom-${P.group_seq}`===String(E?.tab_key??"")).map(P=>({seq:P.seq,label:vo(P)}))].map(P=>to(co,{onClick:()=>{E&&B?.(E.seq,P.seq),Q(null),o()},sx:{fontSize:14,minWidth:160,gap:1},children:[P.label,(E?.sprint_seq??0)===P.seq?me(Fy,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},P.seq))})]})}import{Checkbox as tS,Divider as nS,Menu as rS,MenuItem as lm}from"@mui/material";import{jsx as ui,jsxs as sm}from"react/jsx-runtime";function Bz({anchorEl:e,labelOptions:o,selectedKeys:t,onToggle:n,onClear:r,onClose:i}){return sm(rS,{transitionDuration:0,anchorEl:e,open:!!e,onClose:i,children:[o.map(a=>{let l=t.includes(a.key);return sm(lm,{onClick:()=>n(a.key),sx:{fontSize:14,minWidth:190,gap:1},children:[ui(tS,{size:"small",checked:l,sx:{p:0}}),ui(we,{option:a})]},a.key)}),ui(nS,{}),ui(lm,{disabled:t.length===0,onClick:()=>{r(),i()},sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}import{Divider as cm,Menu as iS,MenuItem as Qa}from"@mui/material";import aS from"@mui/icons-material/Check";import lS from"@mui/icons-material/BarChartOutlined";import sS from"@mui/icons-material/SettingsOutlined";import{jsx as tr,jsxs as pi}from"react/jsx-runtime";function Mz(e){let{anchorEl:o,sprints:t,value:n,onSelect:r,onManage:i,onCharts:a,onClose:l}=e;return pi(iS,{transitionDuration:0,anchorEl:o,open:!!o,onClose:l,children:[[{seq:0,label:"\uC804\uCCB4"},{seq:-1,label:"\uBBF8\uBC30\uC815 \uC5C5\uBB34"},...t.map(u=>({seq:u.seq,label:vo(u)}))].map(u=>pi(Qa,{onClick:()=>{r(u.seq),l()},sx:{fontSize:14,minWidth:180,gap:1},children:[u.label,n===u.seq?tr(aS,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},u.seq)),tr(cm,{}),a?pi(Qa,{onClick:()=>{l(),a()},sx:{fontSize:14,gap:1},children:[tr(lS,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uCC28\uD2B8"]}):null,a?tr(cm,{}):null,pi(Qa,{onClick:()=>{l(),i()},sx:{fontSize:14,gap:1},children:[tr(sS,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uAD00\uB9AC\u2026"]})]})}var cS={my:"tasks",mine:"tasks",sent:"tasks",notice:"notice",bug:"bug",archive:"archive",done:"done",report:"report"};function mS(e){return cS[e]??"tasks"}var Rz={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"},mm=["list","calendar","month","card","kanban","sprint","timeline"],uS=["list","card"];function zz(e){let o=mS(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:mm,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:uS,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:mm,showCreate:!0,createLabel:"\uC5C5\uBB34 \uB4F1\uB85D",showGroupBy:!0,showSprintFilter:!0,showDateRange:!1,showHideCompleted:!0,forceFlatList:!1,columns:e==="mine"?{showRequest:!1,confirmMode:"action"}:e==="sent"?{confirmMode:"time"}:{}}}}export{QC as ALL_TASK_VIEWER_ACCOUNT_SEQS,rc as AddLabelDialog,_r as AddTabDialog,ec as AttachmentUploadGauge,Sa as AttachmentUploadPercent,Ci as BUG_DEVICE_OPTIONS,Rn as BUG_ICON_COLOR,RC as BUG_KANBAN_COLUMNS,Bi as BUG_REPRO_OPTIONS,vi as BUG_RESOLUTION_OPTIONS,qt as BUG_STATUS_OPTIONS,Pn as BUG_TASK_ICON,Xr as BugPropertiesGrid,Rd as COLUMN_WIDTHS,_i as COMPLETED_STATUS_OPTION,Aa as CUSTOM_TAB_KEY_PREFIX,BR as CalendarImportDialog,MR as CalendarSubscribeDialog,Cr as CommentBubbleIcon,un as ConfirmCountButton,Nl as DATE_REMINDER_OPTIONS,gi as DEFAULT_PROJECT_ICON,H2 as DEFAULT_TASKBOX_TAB_ITEMS,_e as DEFAULT_TASK_ICON,w2 as DateRangeFilterPopover,_o as DrawerSection,St as DueDatePickerPopover,dd as ENDED_EVENT_STATUS_OPTION,uc as EVENT_ICON_COLOR,FR as EmployeeSelectDialog,Ei as GROUP_BY_OPTIONS,xn as GoogleEventChip,g2 as GroupByMenuButton,Ir as IconPickerGrid,Ws as InlineAddressInput,dt as InlineTextValue,wi as KANBAN_CLOSED_COLUMN_KEY,Bz as LabelFilterMenu,ni as LabelSelectMenu,qn as MANUAL_TASK_STATUS_OPTIONS,s2 as MemberFilterMenu,zn as NOTICE_STATUS_OPTIONS,Mo as NOTICE_TASK_ICON,pl as NO_TASK_ICON,bi as PROJECT_ICON_OPTIONS,xe as PropertyRow,cn as RECEIVER_AVATAR_COLORS,Fl as REMINDER_OPTIONS,xo as ReceiverAvatarStack,zc as RelatedTasksSection,sr as STATUS_KEY_REPLIED,Mn as STATUS_KEY_WAITING,Mr as SortableTaskCard,Zc as SprintBurndownChart,n2 as SprintChartsDialog,Mz as SprintFilterMenu,dR as SprintManageDialog,Qc as SprintVelocityChart,gr as StatusSelectMenu,zi as TASKBOX_COLUMNS,jo as TASKBOX_DRAWER_NARROW_MQ,dl as TASKBOX_UI_STATE_ID,Rz as TASKBOX_VIEW_LABELS,Hw as TASKBOX_VIEW_MODES,zt as TASK_STATUS_OPTIONS,If as TIME_REMINDER_OPTIONS,Or as TaskAckListPopover,mn as TaskActionButton,oi as TaskAttachmentsSection,Os as TaskBoxColumnSummary,ea as TaskBoxGroupBoard,_D as TaskBoxMobileList,ks as TaskBoxMonthAgenda,xs as TaskBoxMonthCalendar,eD as TaskBoxSprintColumnSummary,Kl as TaskBoxTable,W2 as TaskBoxTabs,vs as TaskBoxTimeline,Fw as TaskBoxView,cs as TaskBoxWeekCalendar,Wt as TaskCardContent,Jr as TaskChecklistSection,Sc as TaskCommentInput,yc as TaskCommentsSection,Qr as TaskContentEditor,hz as TaskContextMenu,jr as TaskCorePropertiesGrid,pc as TaskCreateBody,zE as TaskCreateDrawer,nm as TaskDateRangeFilter,Lc as TaskDetailBody,eR as TaskDetailDrawer,_c as TaskDetailHeader,Ur as TaskIconPickerPopover,Tt as TaskLabelChips,Ec as TaskLinkDialog,wc as TaskNoteField,Eo as TaskPriorityChip,we as TaskStatusChip,HC as TaskStatusChips,hm as TaskboxProvider,HT as buildCalendarFeedUrl,dn as buildCardBaseSx,Tl as buildStatusOptionColors,Pi as buildTaskGroupSections,Oc as buildTaskRelationsModel,Ek as buildTaskShareText,mr as buildTaskboxTheme,yl as canAssignBugManager,hr as canClaimTaskItem,ot as canEditTaskItem,br as canViewTaskItem,kr as canVolunteerTaskItem,_s as countWorkdays,sd as createTaskboxTheme,Ds as daysLeftUntil,hi as defaultTaskBoxFormValues,ki as defaultTaskboxUiStateValues,cc as filterFilesWithinLimit,k1 as formatConfirmTime,Is as formatHours,Vo as formatKoreanDate,tt as formatKoreanDateTime,vo as formatSprintOptionLabel,bl as getBugDeviceName,gl as getBugReproName,ur as getBugResolutionName,fd as getBugStatusOption,k2 as getDefaultDateRange,An as getEventDisplayStatusOption,zC as getNoDueStatusRank,sc as getNoticeAckInfo,hl as getNoticeStatusOption,GM as getNoticeTargetDisplay,cr as getProjectIconAnchorComponent,Oe as getProjectIconComponent,Ki as getReminderLabel,$i as getReminderOptions,kl as getStatusOptionsForTask,zz as getTabHeaderConfig,Ai as getTaskBoxColumnDefs,Tr as getTaskBoxGridTemplate,mS as getTaskBoxTabKind,Vl as getTaskConfirmInfo,fo as getTaskDisplayStatusOption,dr as getTaskStatusOption,fn as groupGoogleEventsByDate,La as groupSeqFromTabKey,DP as hasRelation,Sh as htmlToPlainText,vT as isCustomTabKey,Mi as isOpenPoolTaskItem,Ii as isPastEvent,pr as isTaskDone,Di as isWaitingTask,ci as monthsAgoDate,so as narrowOrderSx,Z5 as nowDateTimeString,ib as parseEstimatedHours,Xt as relationsOf,kt as resolveTaskStatusOptions,Si as resolveTaskboxTheme,li as shareTaskText,ws as sumRemainingHours,ri as summarizeNoticeTargets,nR as tabKeyFromGroupSeq,nn as toYmd,fr as toggleLabelKey,xi as useBuildFileUrl,Zs as useTaskAttachmentUploadMeta,yo as useTaskboxConfig,nd as useTaskboxForm,le as useTaskboxTheme,et as useTaskboxUiState,En as useUploadMaxMb};
|
|
12
|
+
`).trim():"";function Mk(e){let o=[`[\uC5C5\uBB34] ${e.title}`],t=Vo(e.start_date),n=Vo(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=fo(e).name;r&&o.push(`\uC0C1\uD0DC: ${r}`);let i=Bc(e.content);i&&o.push("",i);let a=String(e.note??"").trim();return a&&o.push("",`\uBE44\uACE0: ${a}`),o.join(`
|
|
13
|
+
`)}function Cc(e){navigator.clipboard.writeText(e).then(()=>Ok("\uC5C5\uBB34 \uB0B4\uC6A9\uC744 \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>Dk("\uBCF5\uC0AC\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uB0B4\uC6A9\uC744 \uC9C1\uC811 \uC120\uD0DD\uD574 \uBCF5\uC0AC\uD574 \uC8FC\uC138\uC694."))}function li(e,o){let t=Mk(e);if(o&&typeof navigator.share=="function"){navigator.share({text:t}).catch(n=>{n?.name!=="AbortError"&&Cc(t)});return}Cc(t)}import{Fragment as Lk,jsx as eo,jsxs as Ic}from"react/jsx-runtime";function _c({task:e,myAccountSeq:o=0,onToggleCompleted:t,onChangeTitle:n,onChangeIcon:r,onChangeIconColor:i,onClose:a}){let l=He(),[u,c]=vc(null),[p,d]=vc(null),s=cr(e.icon||(e.is_notice?Mo:e.is_event?"event":_e)),m=!!e.is_notice,f=!!e.is_event,B=m&&o>0&&(e.author_account_seq??0)===o,b=!ot(e,o),h=!f&&(m?B:(e.author_account_seq??0)===o||(e.manager_account_seq??0)===o);return Ic(Lk,{children:[Ic(wa,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1.5,flexShrink:0},children:[h?eo(Oa,{title:e.completed&&e.completed_by?`${e.completed_by} \xB7 ${tt(e.completed_time)} \uC644\uB8CC`:e.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC",arrow:!0,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:eo(Ek,{checked:e.completed,icon:eo(Ak,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:eo(qk,{sx:{fontSize:22,color:"#2f80ed"}}),onChange:(x,T)=>t(e.seq,T),sx:{p:0}})}):null,eo(Oa,{title:b?"":"\uC544\uC774\uCF58 \uBCC0\uACBD",arrow:!0,children:eo(Da,{size:"small",onClick:b?void 0:x=>d(x.currentTarget),sx:{color:e.icon_color||(m?"#e5484d":"#1e3a8a")},children:eo(s,{sx:{fontSize:20}})})}),u!==null?eo(wa,{component:"input",autoFocus:!0,spellCheck:!1,value:u,onChange:x=>c(x.target.value),onBlur:()=>{u.trim()&&u.trim()!==e.title&&n(e.seq,u.trim()),c(null)},onKeyDown:x=>{x.key==="Enter"&&x.target.blur(),x.key==="Escape"&&c(null)},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:18,fontWeight:500,color:"#37352f",p:0,m:0}}):eo(wa,{onClick:b?void 0:()=>c(e.title),sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",cursor:b?"default":"text",textDecoration:e.completed?"line-through":"none"},children:e.title}),eo(Oa,{title:l?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",arrow:!0,children:eo(Da,{"aria-label":l?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",onClick:()=>li(e,l),sx:{color:"#6b7280"},children:l?eo(Rk,{sx:{fontSize:20}}):eo(zk,{sx:{fontSize:20}})})}),a?eo(Da,{"aria-label":"\uB2EB\uAE30",onClick:a,sx:{color:"#6b7280"},children:eo(Pk,{})}):null]}),eo(Ur,{anchorEl:p,value:e.icon||(m?Mo:""),color:e.icon_color||(m?"#e5484d":"#1e3a8a"),onSelect:x=>r(e.seq,x),onSelectColor:x=>i?.(e.seq,x),onClose:()=>d(null)})]})}import{useState as Sn}from"react";import{Box as Bo,Button as si,ButtonBase as rT,Divider as Qt,Menu as iT,MenuItem as aT}from"@mui/material";import lT from"@mui/icons-material/ExpandLess";import sT from"@mui/icons-material/ExpandMore";import cT from"@mui/icons-material/ConfirmationNumberOutlined";import mT from"@mui/icons-material/Check";import uT from"@mui/icons-material/DirectionsRunOutlined";import dT from"@mui/icons-material/SpeedOutlined";import pT from"@mui/icons-material/CheckCircle";import qc from"@mui/icons-material/CheckCircleOutlined";import Ac from"@mui/icons-material/AccessTimeOutlined";import fT from"@mui/icons-material/AutorenewOutlined";import xT from"@mui/icons-material/LabelOutlined";import gT from"@mui/icons-material/PersonOutlineOutlined";import bT from"@mui/icons-material/SubjectOutlined";import hT from"@mui/icons-material/StickyNote2Outlined";import kT from"@mui/icons-material/PanToolAltOutlined";import{useState as Nk}from"react";import{TextField as Fk}from"@ehfuse/mui-form-controls";import{jsx as Hk}from"react/jsx-runtime";function wc({value:e,onCommit:o,onDraftChange:t,readOnly:n=!1}){let[r,i]=Nk(null);return Hk(Fk,{value:r??e,placeholder:n?"":"\uBE44\uACE0 \uC785\uB825",fullWidth:!0,size:"medium",slotProps:{input:{readOnly:n}},onChange:a=>{i(a.target.value),t?.(a.target.value)},onBlur:()=>{r!==null&&r.trim()!==e&&o(r),i(null)},onKeyDown:a=>{a.key==="Enter"&&a.target.blur(),a.key==="Escape"&&i(null)},sx:{mt:1}})}import{useMemo as Pc,useState as Pa}from"react";import{Box as oo,Button as Rc,IconButton as Jk}from"@mui/material";import Zk from"@mui/icons-material/AccountTreeOutlined";import eT from"@mui/icons-material/Add";import oT from"@mui/icons-material/Close";import tT from"@mui/icons-material/NextPlanOutlined";function Xt(e){return e.relations??[]}function wP(e,o,t){return Xt(e).some(n=>n.type===t&&n.task_seq===o.seq)||Xt(o).some(n=>n.type===t&&n.task_seq===e.seq)}function Dc(e){return`${e.created_time??""}|${String(e.seq).padStart(12,"0")}`}function Oc(e,o){let t=new Map(o.map(m=>[m.seq,m]));t.set(e.seq,e);let n=new Map,r=(m,f)=>{n.has(m)||n.set(m,new Set),n.has(f)||n.set(f,new Set),n.get(m).add(f),n.get(f).add(m)};for(let m of t.values())for(let f of Xt(m))f.type==="follow_up"&&t.has(f.task_seq)&&r(m.seq,f.task_seq);let i=new Set([e.seq]),a=[e.seq];for(;a.length>0;){let m=a.shift();for(let f of n.get(m)??[])i.has(f)||(i.add(f),a.push(f))}let l=[...i].map(m=>t.get(m)).filter(m=>!!m).sort((m,f)=>Dc(m).localeCompare(Dc(f))),u=new Set;for(let m of Xt(e))m.type==="related"&&u.add(m.task_seq);for(let m of t.values())m.seq!==e.seq&&Xt(m).some(f=>f.type==="related"&&f.task_seq===e.seq)&&u.add(m.seq);let c=[...u].map(m=>t.get(m)).filter(m=>m!==void 0&&m.seq!==e.seq),p=[...t.values()].filter(m=>m.seq!==e.seq&&Xt(m).some(f=>f.type==="duplicate_of"&&f.task_seq===e.seq)),d=Xt(e).find(m=>m.type==="duplicate_of")?.task_seq,s=d?t.get(d)??null:null;return{lineage:l,related:c,duplicates:p,duplicateOf:s}}import{useEffect as Wk,useMemo as $k,useState as Ma}from"react";import{Box as yn,Button as Kk,Tab as Uk,Tabs as Vk}from"@mui/material";import Gk from"@mui/icons-material/Check";import{FormDialog as Yk}from"@ehfuse/mui-form-dialog";import{ClearTextField as jk}from"@ehfuse/mui-form-controls";import{ErrorAlert as Xk}from"@ehfuse/alerts";import{OverlayScrollbar as Qk}from"@ehfuse/overlay-scrollbar";import{jsx as wo,jsxs as Ea}from"react/jsx-runtime";var Mc=[{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 Ec({open:e,task:o,tasks:t,excludeSeqs:n=[],onClose:r,onSubmit:i}){let[a,l]=Ma("related"),[u,c]=Ma(""),[p,d]=Ma(0);Wk(()=>{e&&(l("related"),c(""),d(0))},[e]);let s=$k(()=>{let b=new Set([o.seq,...n]),h=u.trim().toLowerCase();return t.filter(x=>b.has(x.seq)||x.is_event||x.is_notice?!1:h?x.title.toLowerCase().includes(h)||(x.ticket_no??"").toLowerCase().includes(h):!0)},[t,o.seq,n,u]),m=()=>{if(!p){Xk("\uC5F0\uACB0\uD560 \uC5C5\uBB34\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return}i(p,a),r()},f=Mc.find(b=>b.type===a)?.hint??"",B=Ea(yn,{children:[wo(Vk,{value:a,onChange:(b,h)=>l(h),sx:{minHeight:38,mb:.75,"& .MuiTab-root":{minHeight:38,py:.5,fontSize:14}},children:Mc.map(b=>wo(Uk,{value:b.type,label:b.label},b.type))}),wo(yn,{sx:{mb:1.5,fontSize:12.5,color:"#9a9a97"},children:f}),wo(jk,{label:"\uC5C5\uBB34 \uAC80\uC0C9",placeholder:"\uC81C\uBAA9\xB7\uD2F0\uCF13\uBC88\uD638\uB85C \uAC80\uC0C9",value:u,onChange:b=>c(b.target.value),fullWidth:!0,autoFocus:!0}),wo(yn,{sx:{mt:1.5,height:300,border:"1px solid #e6e6e3",borderRadius:1},children:wo(Qk,{style:{height:"100%"},children:s.length===0?wo(yn,{sx:{py:4,textAlign:"center",fontSize:13.5,color:"#9a9a97"},children:"\uC5F0\uACB0\uD560 \uC218 \uC788\uB294 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):s.map(b=>{let h=Oe(b.icon||_e),x=b.seq===p;return Ea(yn,{onClick:()=>d(x?0:b.seq),sx:{display:"flex",alignItems:"center",gap:.75,px:1.25,py:.75,cursor:"pointer",bgcolor:x?"#e3eefb":"transparent","&:hover":{bgcolor:x?"#e3eefb":"#f7f7f5"}},children:[h?wo(h,{sx:{fontSize:17,flexShrink:0,color:b.icon_color||"#1e3a8a"}}):null,Ea(yn,{component:"span",sx:{flex:1,minWidth:0,fontSize:14,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[b.ticket_no?`${b.ticket_no} `:"",b.title]}),wo(we,{option:fo(b),small:!0}),x?wo(Gk,{sx:{fontSize:17,flexShrink:0,color:"#2f80ed"}}):null]},b.seq)})})})]});return wo(Yk,{open:e,onClose:r,maxWidth:"sm",title:"\uAD00\uB828 \uC5C5\uBB34 \uC5F0\uACB0",locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-task-link",sections:[{id:"task-link",showTitle:!1,children:B}],actions:{showCancelButton:!0,right:wo(Kk,{variant:"contained",disabled:!p,onClick:m,children:"\uC5F0\uACB0"})}})}import{Fragment as nT,jsx as ze,jsxs as No}from"react/jsx-runtime";function Ra({item:e,caption:o,onOpen:t,onUnlink:n}){let r=Oe(e.icon||_e);return No(oo,{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?ze(oo,{component:"span",sx:{flexShrink:0,px:.6,py:.1,borderRadius:.75,fontSize:11.5,fontWeight:500,color:"#8a6d1d",bgcolor:"#faf1d7"},children:o}):null,r?ze(r,{sx:{fontSize:16,flexShrink:0,color:e.icon_color||"#1e3a8a"}}):null,No(oo,{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]}),ze(we,{option:fo(e),small:!0}),n?ze(Jk,{className:"taskbox-relation-unlink",size:"small","aria-label":"\uC5F0\uACB0 \uD574\uC81C",onClick:n,sx:{opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:ze(oT,{sx:{fontSize:15}})}):null]})}function zc({task:e,tasks:o,readOnly:t=!1,onOpenTask:n,onLink:r,onUnlink:i,onCreateFollowUp:a}){let[l,u]=Pa(!1),[c,p]=Pa(null),[d,s]=Pa(null),m=Pc(()=>Oc(e,o),[e,o]),f=m.lineage.length>=2,B=(f?m.lineage.length-1:0)+m.related.length+m.duplicates.length+(m.duplicateOf?1:0),b=Pc(()=>{let x=new Set;for(let T of m.lineage)x.add(T.seq);for(let T of m.related)x.add(T.seq);for(let T of m.duplicates)x.add(T.seq);return m.duplicateOf&&x.add(m.duplicateOf.seq),[...x]},[m]),h=(x,T,g)=>{s({anchorEl:x,targetSeq:T,type:g})};return No(_o,{icon:ze(Zk,{sx:{fontSize:19,display:"block"}}),title:No(nT,{children:["\uAD00\uB828 \uC5C5\uBB34",B>0?ze(oo,{component:"span",sx:{fontSize:12.5,color:"#9a9a97"},children:B}):null]}),titleExtra:t?null:No(oo,{sx:{ml:"auto",display:"flex",alignItems:"center",gap:.5},children:[a?ze(Rc,{size:"small",color:"inherit",startIcon:ze(tT,{sx:{fontSize:16}}),onClick:x=>p(x.currentTarget),sx:{minWidth:0,px:1,fontSize:12.5,color:"#787774"},children:"\uD6C4\uC18D \uC5C5\uBB34"}):null,r?ze(Rc,{size:"small",color:"inherit",startIcon:ze(eT,{sx:{fontSize:16}}),onClick:()=>u(!0),sx:{minWidth:0,px:1,fontSize:12.5,color:"#787774"},children:"\uC5F0\uACB0"}):null]}),children:[No(oo,{sx:{display:"flex",flexDirection:"column",mt:.5,pl:3.25},children:[f?ze(oo,{sx:{mb:m.related.length||m.duplicates.length||m.duplicateOf?1:0},children:m.lineage.map((x,T)=>{let g=x.seq===e.seq,v=T===m.lineage.length-1;return No(oo,{sx:{display:"flex",gap:1},children:[No(oo,{sx:{display:"flex",flexDirection:"column",alignItems:"center",width:14,flexShrink:0,pt:1.1},children:[ze(oo,{sx:{width:g?9:7,height:g?9:7,borderRadius:"50%",bgcolor:g?"#2f80ed":x.completed?"#9a9a97":"#c9c8c5",flexShrink:0}}),v?null:ze(oo,{sx:{width:"2px",flex:1,bgcolor:"#e6e6e3"}})]}),No(oo,{sx:{flex:1,minWidth:0,pb:v?0:.5},children:[No(oo,{sx:{display:"flex",alignItems:"center",gap:.75},children:[No(oo,{component:"span",onClick:!g&&n?()=>n(x.seq):void 0,sx:{minWidth:0,fontSize:14,fontWeight:g?600:400,color:g?"#2f80ed":x.completed?"#9a9a97":"#37352f",textDecoration:x.completed?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...!g&&n?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}},children:[x.ticket_no?`${x.ticket_no} `:"",x.title]}),ze(we,{option:fo(x),small:!0})]}),ze(oo,{sx:{fontSize:12,color:"#9a9a97"},children:x.completed&&x.completed_time?`${x.completed_time} \uC644\uB8CC`:x.created_time??""})]})]},x.seq)})}):null,m.duplicateOf?ze(Ra,{item:m.duplicateOf,caption:"\uC6D0\uBCF8",onOpen:n?()=>n(m.duplicateOf.seq):void 0,onUnlink:!t&&i?x=>h(x.currentTarget,m.duplicateOf.seq,"duplicate_of"):void 0}):null,m.duplicates.map(x=>ze(Ra,{item:x,caption:"\uC911\uBCF5",onOpen:n?()=>n(x.seq):void 0,onUnlink:!t&&i?T=>h(T.currentTarget,x.seq,"duplicate_of"):void 0},`dup-${x.seq}`)),m.related.map(x=>ze(Ra,{item:x,onOpen:n?()=>n(x.seq):void 0,onUnlink:!t&&i?T=>h(T.currentTarget,x.seq,"related"):void 0},`rel-${x.seq}`)),B===0?ze(oo,{sx:{px:1.25,py:.75,fontSize:13.5,color:"#9a9a97"},children:"\uC5F0\uACB0\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):null]}),r?ze(Ec,{open:l,task:e,tasks:o,excludeSeqs:b,onClose:()=>u(!1),onSubmit:(x,T)=>r(e.seq,x,T)}):null,ze(Ue,{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:()=>p(null),onConfirm:()=>{a?.(e.seq),p(null)}}),ze(Ue,{open:!!d,anchorEl:d?.anchorEl??null,title:"\uC774 \uC5C5\uBB34\uC640\uC758 \uC5F0\uACB0\uC744 \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uD574\uC81C",onCancel:()=>s(null),onConfirm:()=>{d&&i?.(e.seq,d.targetSeq,d.type),s(null)}})]})}import{Fragment as ko,jsx as q,jsxs as We}from"react/jsx-runtime";function Bn({label:e="\uBE44\uC5B4 \uC788\uC74C"}){return q(Bo,{component:"span",sx:{color:"#9a9a97"},children:e})}function Lc({task:e,customTabs:o,statusOptions:t,avatarSrcByName:n,onChangeStatus:r,onChangeLabels:i,onAddLabelOption:a,onChangeProject:l,onAddProject:u,onChangeDate:c,onChangeReminder:p,onMemberEdit:d,onChangePriority:s,onChangeEstimatedTime:m,onChangeEventTime:f,onChangeEventPlace:B,onChangeEventAddress:b,onChangeNote:h,onChangeContent:x,onAddChecklistItem:T,onToggleChecklistItem:g,onRemoveChecklistItem:v,onUpdateChecklistItem:C,onConvertChecklistToTask:I,onOpenChecklistTask:M,resolveChecklistTask:Q,relatedTasksPool:E,onOpenRelatedTask:te,onLinkRelatedTask:w,onUnlinkRelatedTask:y,onCreateFollowUpTask:H,onAddAttachments:N,onRemoveAttachment:$,onPreview:P,onDownload:oe,onUpdateComment:de,onRemoveComment:A,onToggleCommentReaction:W,currentUserName:K="",myAccountSeq:F=0,noticeAdmin:O=!1,hideProject:L=!1,employees:X=[],onAckConfirm:J,onChangeBugField:ue,sprints:Z=[],sprintProject:ye=!1,onChangeSprint:R,onChangeStoryPoints:k,onChangeResolution:ne,onClaimTask:re,onVerifyBug:ve}){let[$e,se]=Sn(null),[Ie,V]=Sn(!1),Ee={[jo]:Ie?{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"}},[Xe,bt]=Sn(null),[Wo,Zo]=Sn(null),[$o,Pt]=Sn(null),[rn,Oo]=Sn(null),no=!!e.is_notice,mo=!!e.is_event,uo=!!e.is_bug,Rt=!!re&&hr(e,F),pe=!!re&&kr(e,F),D=!!ve&&uo&&!!e.completed&&F>0&&(e.author_account_seq??0)===F&&!(e.acks??[]).some(_=>_.account_seq===F),z=!ot(e,F),ie=no?!br(e,F):z,ce=Rt||pe?We(mn,{onClick:_=>Oo(_.currentTarget),children:[q(kT,{sx:{fontSize:16,mr:.5}}),"\uAC00\uC838\uAC00\uAE30"]}):null,ae=no?ri(e,X):"",fe=no?sc(e,X,F):null;return We(ko,{children:[We(Bo,{sx:{py:1.5,display:"flex",flexDirection:"column",gap:.25},children:[q(jr,{hideProject:L,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:!mo,notice:no,event:mo,readOnly:z,targetSummary:ae,onChangeProject:_=>l(e.seq,_),onAddProject:u,onChangeStartDate:_=>c(e.seq,"start_date",_),onChangeDueDate:_=>c(e.seq,"due_date",_),onChangeReminder:_=>p(e.seq,_),onChangePriority:_=>s(e.seq,_),onChangeEstimatedTime:_=>m(e.seq,_),onChangeEventTime:_=>f?.(e.seq,_),onChangeEventPlace:_=>B?.(e.seq,_),onChangeEventAddress:_=>b?.(e.seq,_),onMemberEdit:_=>d(e,_),narrowCollapsedSx:Ee,reminderLocked:e.completed,managerAction:ce,leading:We(ko,{children:[D||ce&&(no||mo)?We(Bo,{sx:{gridColumn:"1 / -1",display:"flex",justifyContent:"center",gap:1,px:2,py:.75},children:[no||mo?ce:null,D?We(ko,{children:[q(si,{variant:"contained",size:"small",onClick:()=>ve?.(e.seq,!0),sx:{bgcolor:"#2f80ed"},children:"\uC218\uC815 \uD655\uC778(\uAC80\uC99D \uC644\uB8CC)"}),q(si,{variant:"outlined",size:"small",color:"error",onClick:()=>ve?.(e.seq,!1),children:"\uC544\uC9C1 \uC7AC\uD604\uB428(\uC7AC\uC624\uD508)"})]}):null]}):null,uo&&e.ticket_no?q(xe,{icon:q(cT,{sx:{fontSize:17}}),label:"\uD2F0\uCF13",children:q(Bo,{component:"span",sx:{fontVariantNumeric:"tabular-nums"},children:e.ticket_no})}):null,mo?null:q(Bo,{sx:uo&&e.ticket_no?void 0:{gridColumn:"1 / -1"},children:q(xe,{icon:q(fT,{sx:{fontSize:17}}),label:"\uC0C1\uD0DC",onClick:z||e.completed?void 0:_=>bt(_),children:q(we,{option:fo(e)})})}),ye&&!mo&&!no?We(ko,{children:[q(xe,{icon:q(uT,{sx:{fontSize:17}}),label:"\uBAA9\uD45C",onClick:z?void 0:_=>Zo(_),children:(e.sprint_seq??0)>0?Z.find(_=>_.seq===e.sprint_seq)?.name??"\uC0AD\uC81C\uB41C \uC2A4\uD504\uB9B0\uD2B8":q(Bn,{label:"\uBBF8\uBC30\uC815"})}),q(xe,{icon:q(dT,{sx:{fontSize:17}}),label:"\uD3EC\uC778\uD2B8",children:q(pt,{value:(e.story_points??0)>0?String(e.story_points):"",placeholder:"\uBBF8\uCD94\uC815",readOnly:z,onCommit:_=>k?.(e.seq,Number(_.replace(/[^0-9.]/g,""))||0)})})]}):null,mo?null:q(Bo,{sx:[{gridColumn:"1 / -1"},Ee??null],children:q(xe,{icon:q(xT,{sx:{fontSize:17}}),label:"\uB77C\uBCA8",onClick:z?void 0:_=>Pt(_),children:(e.label_keys??[]).length>0?q(Tt,{labelKeys:e.label_keys??[],labelOptions:t}):q(Bn,{})})}),no&&fe?q(Bo,{sx:{gridColumn:"1 / -1"},children:q(xe,{icon:q(qc,{sx:{fontSize:17}}),label:"\uD655\uC778",children:q(Bo,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,minWidth:0},children:fe.canAck?q(si,{size:"small",variant:"contained",onClick:()=>J?.(e.seq),sx:{py:.1,px:1.25,minWidth:0,color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}},children:"\uD655\uC778"}):q(si,{size:"small",variant:"outlined",color:"inherit",startIcon:fe.acked?q(pT,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:_=>se({anchorEl:_.currentTarget,open:!0}),sx:{py:.1,px:1.25,minWidth:0,fontSize:13,color:"text.primary",borderColor:"#d5d8dc",bgcolor:"#fff",whiteSpace:"nowrap"},children:fe.total>0&&fe.count>=fe.total?"\uC644\uB8CC":We(ko,{children:[fe.count,q(Bo,{component:"span",sx:{mx:.4},children:"/"}),fe.total]})})})})}):null]}),trailing:We(ko,{children:[uo?q(Xr,{values:{repro:e.bug_repro??"",device:e.bug_device??"",where:e.bug_where??"",version:e.bug_version??"",resolution:e.resolution??""},readOnly:z,showResolution:!!e.completed,onChangeRepro:_=>ue?.(e.seq,"bug_repro",_),onChangeDevice:_=>ue?.(e.seq,"bug_device",_),onChangeWhere:_=>ue?.(e.seq,"bug_where",_),onChangeVersion:_=>ue?.(e.seq,"bug_version",_),onChangeResolution:_=>ne?.(e.seq,_)}):null,q(xe,{icon:q(gT,{sx:{fontSize:17}}),label:"\uC791\uC131\uC790",sx:[so(9),Ee??null],children:e.created_by?We(ko,{children:[q(xo,{names:[e.created_by],size:20,avatarSrcByName:n}),e.created_by]}):q(Bn,{})}),q(xe,{icon:q(Ac,{sx:{fontSize:17}}),label:"\uC791\uC131\uC2DC\uAC04",sx:[so(11),Ee??null],children:e.created_time?tt(e.created_time):q(Bn,{})}),e.completed?We(ko,{children:[q(xe,{icon:q(qc,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC790",sx:[so(10),Ee??null],children:e.completed_by?We(ko,{children:[q(xo,{names:[e.completed_by],size:20,avatarSrcByName:n}),e.completed_by]}):q(Bn,{})}),q(xe,{icon:q(Ac,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC2DC\uAC04",sx:[so(12),Ee??null],children:e.completed_time?tt(e.completed_time):q(Bn,{})})]}):null]})}),We(Bo,{sx:{display:"none",[jo]:{display:"block",mt:1.5}},children:[q(Qt,{sx:{borderColor:"#e6e6e3"}}),q(rT,{onClick:()=>V(_=>!_),sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",gap:.5,pt:1.5,pb:1.25,fontSize:13,color:"#787774","&:active":{opacity:.6}},children:Ie?We(ko,{children:["\uC811\uAE30 ",q(lT,{sx:{fontSize:18}})]}):We(ko,{children:["\uC815\uBCF4 \uB354\uBCF4\uAE30 ",q(sT,{sx:{fontSize:18}})]})})]}),We(Bo,{children:[q(Qt,{sx:{my:1.5,borderColor:"#e6e6e3",[jo]:{mt:0}}}),q(_o,{icon:q(bT,{sx:{fontSize:18,display:"block"}}),title:"\uB0B4\uC6A9",children:q(Bo,{sx:{userSelect:"text"},children:q(Qr,{syncKey:e.seq,value:e.content??"",readOnly:z,onChange:_=>x(e.seq,_)})})}),e.is_bug?null:We(ko,{children:[q(Qt,{sx:{my:1.5,borderColor:"#e6e6e3"}}),q(_o,{icon:q(hT,{sx:{fontSize:18,display:"block"}}),title:"\uBE44\uACE0",children:q(Bo,{sx:{userSelect:"text"},children:q(wc,{value:e.note,readOnly:ie,onCommit:_=>h(e.seq,_)})})})]}),mo?null:We(ko,{children:[q(Qt,{sx:{my:1.5,borderColor:"#e6e6e3"}}),q(Jr,{taskSeq:e.seq,checklist:e.checklist??[],removeLocked:ie,onAdd:T,onToggle:g,onRemove:v,onUpdate:C,onConvertToTask:I,onOpenLinkedTask:M,resolveLinkedTask:Q})]}),E&&!mo&&!no?We(ko,{children:[q(Qt,{sx:{my:1.5,borderColor:"#e6e6e3"}}),q(zc,{task:e,tasks:E,readOnly:z,onOpenTask:te,onLink:w,onUnlink:y,onCreateFollowUp:H})]}):null,q(Qt,{sx:{my:1.5,borderColor:"#e6e6e3"}}),q(oi,{taskSeq:e.seq,attachments:e.attachments??[],removeLocked:ie,onAdd:N,onRemove:$,onPreview:P?_=>P({..._,taskSeq:e.seq}):void 0,onDownload:oe?_=>oe({..._,taskSeq:e.seq}):void 0})]}),q(Qt,{sx:{my:1.5,borderColor:"#e6e6e3"}}),q(yc,{taskSeq:e.seq,comments:e.comments??[],currentUserName:K,myAccountSeq:F,avatarSrcByName:n,onUpdate:de,onRemove:A,onToggleReaction:W})]}),q(gr,{anchorEl:Xe,value:e.status,options:no?zn:uo?qt:qn,onSelect:_=>r(e.seq,_),onClose:()=>bt(null)}),q(iT,{transitionDuration:0,anchorEl:Wo,open:!!Wo,onClose:()=>Zo(null),children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...Z.filter(_=>`custom-${_.group_seq}`===String(e.tab_key??"")).map(_=>({seq:_.seq,label:vo(_)}))].map(_=>We(aT,{onClick:()=>{R?.(e.seq,_.seq),Zo(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[_.label,(e.sprint_seq??0)===_.seq?q(mT,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},_.seq))}),q(Or,{anchorEl:$e?.anchorEl??null,open:!!$e?.open,acks:e.acks??[],total:fe?.total??0,avatarSrcByName:n,onClose:()=>se(_=>_?{..._,open:!1}:null)}),q(ni,{anchorEl:$o,selectedKeys:e.label_keys??[],labelOptions:t,onToggle:_=>i(e.seq,fr(e.label_keys??[],_)),onAddLabel:a,onClose:()=>Pt(null)}),q(Ue,{open:!!rn,anchorEl:rn,title:Rt?"\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:()=>Oo(null),onConfirm:()=>{re?.(e.seq),Oo(null)}})]})}import{jsx as ft,jsxs as BT}from"react/jsx-runtime";function J5(){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 Z5({open:e,task:o,onClose:t,onAddComment:n,myAccountSeq:r=0,onToggleCompleted:i,onChangeTitle:a,onChangeIcon:l,onChangeIconColor:u,...c}){let p=TT(null);o&&(p.current=o);let d=o??p.current;return d?ft(yT,{anchor:"right",open:e,onClose:t,sx:{zIndex:s=>s.zIndex.modal},slotProps:{paper:{sx:{width:720,maxWidth:"100vw"}}},children:BT(za,{sx:{display:"flex",flexDirection:"column",height:"100%",userSelect:"none"},children:[ft(_c,{task:d,myAccountSeq:r,onToggleCompleted:i,onChangeTitle:a,onChangeIcon:l,onChangeIconColor:u,onClose:t}),ft(Nc,{sx:{borderColor:"#e6e6e3"}}),ft(za,{sx:{flex:1,minHeight:0},children:ft(ST,{style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:ft(Lc,{...c,task:d,myAccountSeq:r})})}),ft(Nc,{sx:{borderColor:"#37352f"}}),ft(za,{sx:{flexShrink:0},children:ft(Sc,{onSubmit:(s,m)=>n(d.seq,s,m)},d.seq)})]})}):null}import{useEffect as vT,useState as Jt}from"react";import{Box as To,Button as La,IconButton as Fc}from"@mui/material";import{FormDialog as IT}from"@ehfuse/mui-form-dialog";import _T from"@mui/icons-material/EditOutlined";import{ErrorAlert as Hc}from"@ehfuse/alerts";import{ClearTextField as Wc,DateTextField as $c,LabelSelect as Kc}from"@ehfuse/mui-form-controls";var qa="custom-";function CT(e){return e.startsWith(qa)}function tR(e){return e>0?`${qa}${e}`:""}function Aa(e){if(!CT(e))return 0;let o=Number(e.slice(qa.length));return Number.isInteger(o)&&o>0?o:0}import{Fragment as DT,jsx as Le,jsxs as Et}from"react/jsx-runtime";var wT=[{value:"planning",label:"\uACC4\uD68D\uC911"},{value:"active",label:"\uC9C4\uD589\uC911"},{value:"closed",label:"\uC885\uB8CC"}];function Uc(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?e.slice(5).replace("-","."):"-"}function dR({open:e,customTabs:o,sprints:t,onClose:n,onCreate:r,onUpdate:i,onChangeStatus:a,onRemove:l}){let u=o.filter(w=>w.useSprints&&!w.archived),[c,p]=Jt(""),[d,s]=Jt(""),[m,f]=Jt(""),[B,b]=Jt(""),[h,x]=Jt(""),[T,g]=Jt(!1),[v,C]=Jt(0);vT(()=>{e&&(p(u.length===1?u[0].key:""),s(""),f(""),b(""),x(""),C(0))},[e]);let I=()=>{s(""),f(""),b(""),x(""),C(0)},M=w=>{C(w.seq),p(`custom-${w.group_seq}`),s(w.name),f(w.goal),b(w.start_date),x(w.end_date)},Q=async()=>{let w=Aa(c);if(!w){Hc("\uBAA9\uD45C\uB97C \uB9CC\uB4E4 \uD504\uB85C\uC81D\uD2B8\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return}if(!d.trim()){Hc("\uBAA9\uD45C \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}g(!0);try{if(v>0){i(v,{name:d.trim(),goal:m.trim(),start_date:B,end_date:h}),I();return}await r({group_seq:w,name:d.trim(),goal:m.trim(),start_date:B,end_date:h})&&I()}finally{g(!1)}},E=new Map(o.map(w=>[Aa(w.key),w.label])),te=Le(To,{children:u.length===0?Le(To,{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.'}):Et(DT,{children:[Et(To,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2.5,mt:1},children:[Le(Kc,{label:"\uD504\uB85C\uC81D\uD2B8",size:"medium",value:c,options:u.map(w=>({value:w.key,label:w.label})),onChange:w=>p(String(w.target.value)),disabled:v>0}),Le(Wc,{label:"\uBAA9\uD45C \uC774\uB984",size:"medium",placeholder:"\uC608: 8\uC6D4 2\uC8FC\uCC28",value:d,onChange:w=>s(w.target.value)}),Le($c,{size:"medium",label:"\uC2DC\uC791\uC77C",value:B,onChange:w=>b(w.target.value)}),Le($c,{size:"medium",label:"\uC885\uB8CC\uC77C",value:h,onChange:w=>x(w.target.value)}),Le(Wc,{label:"\uC124\uBA85",size:"medium",placeholder:"\uC120\uD0DD \uC785\uB825",value:m,onChange:w=>f(w.target.value),sx:{gridColumn:"1 / -1"}})]}),Et(To,{sx:{mt:1.5,display:"flex",justifyContent:"flex-end",gap:1},children:[v>0?Le(La,{color:"inherit",onClick:I,disabled:T,children:"\uCDE8\uC18C"}):null,Le(La,{variant:"contained",onClick:()=>{Q()},disabled:T,children:v>0?"\uBAA9\uD45C \uC800\uC7A5":"\uBAA9\uD45C \uB9CC\uB4E4\uAE30"})]}),Le(To,{sx:{mt:2,borderTop:"1px solid #e6e6e3"},children:t.length===0?Le(To,{sx:{py:3,textAlign:"center",fontSize:14,color:"#9a9a97"},children:"\uB4F1\uB85D\uB41C \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):t.map(w=>Et(To,{sx:{display:"flex",flexDirection:"column",gap:1,py:1.75,borderBottom:"1px solid #f0efed"},children:[Et(To,{sx:{minWidth:0},children:[Et(To,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[Le(To,{component:"span",sx:{fontSize:16,fontWeight:600,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},children:w.name}),Le(To,{component:"span",sx:{flexShrink:0,px:1,py:.25,borderRadius:.75,bgcolor:"#f1f5f9",color:"#64748b",fontSize:13,fontWeight:500},children:E.get(w.group_seq)??"\uC0AD\uC81C\uB41C \uD504\uB85C\uC81D\uD2B8"}),Et(To,{component:"span",sx:{flexShrink:0,fontSize:14,color:"#57564f"},children:[Uc(w.start_date)," ~ ",Uc(w.end_date)]})]}),w.goal?Le(To,{sx:{mt:.5,fontSize:14,color:"#787774",lineHeight:1.5},children:w.goal}):null]}),Et(To,{sx:{display:"flex",alignItems:"center",gap:.5},children:[Le(Kc,{label:"\uC0C1\uD0DC",showLabel:!1,size:"small",value:w.status,options:wT.map(y=>({value:y.value,label:y.label})),onChange:y=>a(w.seq,String(y.target.value)),sx:{width:104,flexShrink:0}}),Le(Fc,{"aria-label":"\uBAA9\uD45C \uC218\uC815",onClick:()=>M(w),sx:{color:"#9a9a97","&:hover":{color:"#2563eb"}},children:Le(_T,{sx:{fontSize:18}})}),Le(Fc,{"aria-label":"\uBAA9\uD45C \uC0AD\uC81C",onClick:()=>l(w.seq),sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:Le(at,{style:{width:16,height:16}})})]})]},w.seq))})]})});return Le(IT,{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:te}],actions:{showCancelButton:!1,right:Le(La,{variant:"contained",onClick:n,children:"\uB2EB\uAE30"})}})}import{useState as Vc}from"react";import{Box as je,Button as Na,Divider as OT,IconButton as MT,TextField as ET}from"@mui/material";import{FormDialog as PT}from"@ehfuse/mui-form-dialog";import RT from"@mui/icons-material/OpenInNewOutlined";import zT from"@mui/icons-material/EventOutlined";import{ConfirmDialog as qT}from"@ehfuse/alerts";import{jsx as Ce,jsxs as Zt}from"react/jsx-runtime";function SR({open:e,imports:o,onRegister:t,onRemove:n,onClose:r}){let[i,a]=Vc(""),[l,u]=Vc(!1),c=async()=>{let s=i.trim();if(s){u(!0);try{await t(s)&&a("")}finally{u(!1)}}},p=async s=>{await qT({title:"\uAC00\uC838\uC624\uAE30 \uD574\uC81C",message:`"${s.name||"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}" \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30\uB97C \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&n(s.seq)},d=Zt(je,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[Zt(je,{sx:{color:"#37352f",lineHeight:1.7},children:["\uAD6C\uAE00 \uCE98\uB9B0\uB354\uC758 \uC77C\uC815\uC744 ",Ce("b",{children:"\uC77D\uAE30\uC804\uC6A9"}),"\uC73C\uB85C \uC5C5\uBB34\uD568 \uCE98\uB9B0\uB354\uC5D0 \uD568\uAED8 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4.",Ce("br",{}),"\uD45C\uC2DC/\uC228\uAE40\uC740 \uC5C5\uBB34\uD568 \uC6B0\uC0C1\uB2E8\uC758 ",Ce("b",{children:"\uAD6C\uAE00 \uC77C\uC815"})," \uC2A4\uC704\uCE58\uB85C \uCF1C\uACE0 \uB055\uB2C8\uB2E4."]}),Ce(je,{sx:{fontWeight:700,color:"#37352f",mt:.5},children:"\uB4F1\uB85D\uB41C \uCE98\uB9B0\uB354"}),o.length>0?Ce(je,{sx:{display:"flex",flexDirection:"column",border:"1px solid #e6e6e3",borderRadius:1},children:o.map((s,m)=>Zt(je,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:.75,borderTop:m>0?"1px solid #efefed":"none"},children:[Ce(zT,{sx:{fontSize:18,color:"#0f9d58",flexShrink:0}}),Ce(je,{component:"span",sx:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:s.name||"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),Ce(MT,{"aria-label":"\uAC00\uC838\uC624\uAE30 \uD574\uC81C",size:"small",onClick:()=>{p(s)},sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:Ce(at,{sx:{fontSize:18}})})]},s.seq))}):Ce(je,{sx:{color:"#9a9a97",px:.5},children:"\uC544\uC9C1 \uB4F1\uB85D\uB41C \uCE98\uB9B0\uB354\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}),Ce(OT,{sx:{my:1,borderColor:"#e6e6e3"}}),Ce(je,{sx:{fontWeight:700,color:"#37352f"},children:"\uC0C8 \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30"}),Zt(je,{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:[Ce(je,{children:Zt(je,{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 > ",Ce("b",{children:"\uC124\uC815 \uBC0F \uACF5\uC720"}),"\uB97C \uC5FD\uB2C8\uB2E4."]})}),Ce(je,{children:Zt(je,{component:"span",children:[Ce("b",{children:"\uCE98\uB9B0\uB354 \uD1B5\uD569"})," \uC139\uC158\uC758 ",Ce("b",{children:'"iCal \uD615\uC2DD\uC758 \uBE44\uBC00 \uC8FC\uC18C"'})," \uB97C \uBCF5\uC0AC\uD574 \uC544\uB798\uC5D0 \uBD99\uC5EC\uB123\uC73C\uC138\uC694."]})}),Ce(je,{children:Ce(je,{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."})}),Ce(je,{children:Ce(je,{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."})})]}),Zt(je,{sx:{display:"flex",gap:2,alignItems:"center"},children:[Ce(ET,{value:i,onChange:s=>a(s.target.value),fullWidth:!0,label:"\uBE44\uBC00 iCal \uC8FC\uC18C",placeholder:"https://calendar.google.com/calendar/ical/\u2026/basic.ics",slotProps:{input:{spellCheck:!1}}}),Ce(Na,{variant:"contained",disabled:!i.trim()||l,onClick:()=>{c()},sx:{flexShrink:0},children:l?"\uD655\uC778 \uC911\u2026":"\uB4F1\uB85D"})]})]});return Ce(PT,{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:d}],actions:{showCancelButton:!1,left:Ce(Na,{variant:"outlined",startIcon:Ce(RT,{sx:{fontSize:16}}),onClick:()=>window.open("https://calendar.google.com/calendar","_blank"),children:"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),right:Ce(Na,{variant:"contained",onClick:r,children:"\uB2EB\uAE30"})}})}import{Box as xt,Button as Jn,TextField as AT}from"@mui/material";import{FormDialog as LT}from"@ehfuse/mui-form-dialog";import NT from"@mui/icons-material/ContentCopyOutlined";import Gc from"@mui/icons-material/OpenInNewOutlined";import{InfoAlert as Yc}from"@ehfuse/alerts";import{Fragment as HT,jsx as Ne,jsxs as en}from"react/jsx-runtime";function FT(e){return`${window.location.origin}/api/v1/taskbox/calendar/${e}.ics`}function OR({open:e,feed:o,feedTaskCount:t,buildFeedUrl:n,onSubscribe:r,onClose:i}){let a=n??FT,l=o.subscribed?a(o.token):"",u=()=>{navigator.clipboard.writeText(l).then(()=>Yc("\uD53C\uB4DC \uC8FC\uC18C\uB97C \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>Yc("\uBCF5\uC0AC\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uC8FC\uC18C\uB97C \uC9C1\uC811 \uC120\uD0DD\uD574 \uBCF5\uC0AC\uD558\uC138\uC694."))},c=()=>{let d=l.replace(/^https?:\/\//,"webcal://");window.open(`https://calendar.google.com/calendar/r?cid=${encodeURIComponent(d)}`,"_blank")},p=en(xt,{sx:{display:"flex",flexDirection:"column",gap:2.5},children:[en(xt,{sx:{color:"#37352f",lineHeight:1.7},children:["\uB0B4\uAC00 \uAD00\uC5EC\uD55C \uC5C5\uBB34\uB97C ",Ne("b",{children:"\uC77D\uAE30\uC804\uC6A9"}),"\uC73C\uB85C \uAD6C\uAE00 \uCE98\uB9B0\uB354\uC5D0\uC11C \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4."]}),t===0?en(xt,{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.",Ne("br",{}),Ne("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?en(HT,{children:[Ne(AT,{value:l,fullWidth:!0,label:"\uB0B4 \uD53C\uB4DC \uC8FC\uC18C",slotProps:{input:{readOnly:!0}}}),en(xt,{sx:{display:"flex",gap:2},children:[Ne(Jn,{variant:"outlined",startIcon:Ne(NT,{}),onClick:u,children:"\uC8FC\uC18C \uBCF5\uC0AC"}),Ne(Jn,{variant:"contained",startIcon:Ne(Gc,{}),onClick:c,children:"Google \uCE98\uB9B0\uB354\uC5D0 \uCD94\uAC00"})]}),en(xt,{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:[Ne(xt,{children:en("span",{children:["\uBC84\uD2BC\uC774 \uB3D9\uC791\uD558\uC9C0 \uC54A\uC73C\uBA74 \uAD6C\uAE00 \uCE98\uB9B0\uB354 > \uB2E4\uB978 \uCE98\uB9B0\uB354 + > ",Ne("b",{children:"URL\uB85C \uCD94\uAC00"}),"\uC5D0 \uC704 \uC8FC\uC18C\uB97C \uBD99\uC5EC\uB123\uC73C\uC138\uC694."]})}),Ne(xt,{children:Ne("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."})}),Ne(xt,{children:Ne("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."})}),Ne(xt,{children:Ne("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."})})]})]}):Ne(Jn,{variant:"contained",onClick:r,sx:{alignSelf:"flex-start"},children:"\uAD6C\uB3C5 \uC2DC\uC791 (\uD53C\uB4DC \uBC1C\uAE09)"})]});return Ne(LT,{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:p}],actions:{showCancelButton:!1,left:Ne(Jn,{variant:"outlined",startIcon:Ne(Gc,{sx:{fontSize:16}}),onClick:()=>window.open("https://calendar.google.com/calendar","_blank"),children:"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),right:Ne(Jn,{variant:"contained",onClick:i,children:"\uB2EB\uAE30"})}})}import{useEffect as WT,useMemo as Fa,useState as Ha}from"react";import{Box as Zn,Button as $T,Typography as KT}from"@mui/material";import{FormDialog as UT}from"@ehfuse/mui-form-dialog";import{SearchTextField as VT}from"@ehfuse/mui-form-controls";import{TreeView as GT}from"@ehfuse/tree-view";import{Fragment as ZT,jsx as Fo,jsxs as ey}from"react/jsx-runtime";function jc(e){return`${e.name}#${e.seq}`}function YT(e){return Number(e.slice(e.lastIndexOf("#")+1))||0}function jT(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 XT(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 QT(e){let o=[[e.name,e.role_name].filter(Boolean).join(" "),e.department].filter(Boolean).join(" / ");return{id:`emp:${e.seq}`,label:jc(e),renderLabel:Fo(Zn,{component:"span",sx:{display:"inline-flex",alignItems:"baseline",gap:.75},children:Fo(Zn,{component:"span",sx:{fontWeight:400,color:"text.primary"},children:o})})}}function Xc(e,o){let t=(e.groups??[]).map(r=>Xc(r,o)).filter(r=>r!==null),n=(e.employees??[]).filter(r=>XT(r,o)).map(QT);return t.length===0&&n.length===0?null:{id:`group:${e.key}`,label:e.name,children:[...t,...n]}}function JT({groups:e,allEmployees:o,initialSelectedSeqs:t,multiple:n,isMobile:r,onSelectionChange:i}){let[a,l]=Ha(""),u=Fa(()=>e.map(p=>Xc(p,a.trim().toLowerCase())).filter(p=>p!==null),[e,a]),c=Fa(()=>o.filter(p=>t.includes(p.seq)).map(jc),[]);return ey(ZT,{children:[Fo(Zn,{sx:{px:1.5,py:1,borderBottom:"1px solid #cccccc",flexShrink:0},children:Fo(VT,{size:"small",fullWidth:!0,placeholder:"\uC774\uB984, \uBD80\uC11C \uAC80\uC0C9",onSearch:l,onClear:()=>l(""),sx:{"& .MuiOutlinedInput-notchedOutline":{border:"none"},"& .MuiInputBase-root":{px:0}}})}),Fo(Zn,{sx:r?{display:"flex",flexDirection:"column"}:{flex:1,minHeight:0,overflow:"hidden",display:"flex",flexDirection:"column"},children:Fo(GT,{items:u,checkbox:!0,multiSelect:n,selectionMode:"child",showSearch:!1,defaultExpanded:!0,initialSelections:c,onChange:p=>i(p.map(YT).filter(d=>d>0)),styles:{border:"none",borderRadius:"0"}})})]})}function NR({open:e,title:o="\uC9C1\uC6D0 \uC120\uD0DD",hint:t="",groups:n,multiple:r=!1,selectedSeqs:i,confirmText:a="\uD655\uC778",onConfirm:l,onClose:u}){let c=He(),[p,d]=Ha([]),[s,m]=Ha(0),f=Fa(()=>jT(n),[n]),B=i??[];WT(()=>{e&&(d(B),m(h=>h+1))},[e]);let b=()=>{let h=f.filter(x=>p.includes(x.seq));l(r?h:h.slice(0,1)),u()};return Fo(UT,{open:e,onClose:u,title:`${o}${r&&p.length>0?` (${p.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:Fo(Zn,{sx:{...c?{}:{height:560},display:"flex",flexDirection:"column",border:"1px solid #cccccc",borderRadius:1,...c?{}:{overflow:"hidden"},userSelect:"none"},children:Fo(JT,{groups:n,allEmployees:f,initialSelectedSeqs:B,multiple:r,isMobile:c,onSelectionChange:d},s)})}],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?Fo(KT,{variant:"body2",color:"text.secondary",sx:{whiteSpace:"pre-line",lineHeight:1.35},children:t}):void 0,right:Fo($T,{variant:"contained",onClick:b,children:a})}})}import{useEffect as ry,useMemo as iy,useState as ay}from"react";import{Box as In,Button as ly,Divider as sy}from"@mui/material";import{FormDialog as cy}from"@ehfuse/mui-form-dialog";import{LabelSelect as my}from"@ehfuse/mui-form-controls";import{Box as Qo}from"@mui/material";import{jsx as Cn,jsxs as vn}from"react/jsx-runtime";function oy(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 Qc({sprints:e,tasks:o,height:t=160}){let r=[...e].sort((p,d)=>`${p.start_date}|${p.seq}`.localeCompare(`${d.start_date}|${d.seq}`)).map(p=>({sprint:p,...oy(p,o)})),i=r.some(p=>p.points>0),a=r.map(p=>i?p.points:p.count),l=Math.max(1,...a),u=r.filter(p=>p.sprint.status==="closed").map(p=>i?p.points:p.count),c=u.length>0?Math.round(u.reduce((p,d)=>p+d,0)/u.length*10)/10:null;return r.length===0?Cn(Qo,{sx:{py:4,textAlign:"center",fontSize:14.5,color:"#9a9a97"},children:"\uD45C\uC2DC\uD560 \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):vn(Qo,{children:[vn(Qo,{sx:{mb:1,display:"flex",justifyContent:"space-between",fontSize:14,color:"#000"},children:[vn("span",{children:["\uC644\uB8CC ",i?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uBAA9\uD45C\uBCC4"]}),c!==null?vn("span",{children:["\uD3C9\uADE0(\uC885\uB8CC \uBAA9\uD45C)"," ",Cn(Qo,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:c}),i?"SP":"\uAC74"]}):null]}),Cn(Qo,{sx:{display:"flex",alignItems:"flex-end",gap:2,height:t,px:.5},children:r.map(p=>{let d=i?p.points:p.count,s=Math.round((t-24)*d/l),m=p.sprint.status==="closed";return vn(Qo,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-end",height:"100%"},children:[Cn(Qo,{sx:{fontSize:14,fontWeight:700,color:"#37352f",lineHeight:1.5},children:d}),Cn(Qo,{sx:{width:"60%",maxWidth:56,height:Math.max(2,s),borderRadius:"4px 4px 0 0",bgcolor:m?"#2f80ed":"#a9c9f5"}})]},p.sprint.seq)})}),Cn(Qo,{sx:{display:"flex",gap:2,px:.5,mt:.5},children:r.map(p=>vn(Qo,{sx:{flex:1,minWidth:0,textAlign:"center",fontSize:13.5,color:"#000",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[p.sprint.name,p.sprint.status!=="closed"?" (\uC9C4\uD589\uC911)":""]},p.sprint.seq))})]})}import{useMemo as ty}from"react";import{Box as on}from"@mui/material";import{jsx as Jo,jsxs as tn}from"react/jsx-runtime";function Jc(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?new Date(`${e}T00:00:00`):null}function ny(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function Wa(e){return e.slice(5).replace("-",".")}function Zc({sprint:e,tasks:o,todayStr:t,height:n=200}){let r=ty(()=>{let h=Jc(e.start_date),x=Jc(e.end_date);if(!h||!x||x<h||Math.round((x.getTime()-h.getTime())/864e5)+1>366)return null;let g=o.filter(w=>w.sprint_seq===e.seq&&!w.archived);if(g.length===0)return{empty:!0};let v=g.some(w=>(w.story_points??0)>0),C=w=>v?w.story_points??0:1,I=g.reduce((w,y)=>w+C(y),0),M=new Map;for(let w of g){if(!w.completed)continue;let y=(w.completed_time??"").slice(0,10),H=/^\d{4}-\d{2}-\d{2}$/.test(y)?y:e.start_date;M.set(H,(M.get(H)??0)+C(w))}let Q=[];for(let w=new Date(h);w<=x;w.setDate(w.getDate()+1))Q.push(ny(w));let E=I,te=[];for(let w of Q){if(w>t)break;E-=M.get(w)??0,te.push({day:w,value:Math.max(0,E)})}return{empty:!1,days:Q,total:I,usePoints:v,actual:te}},[e,o,t]);if(!r)return Jo(on,{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 Jo(on,{sx:{py:4,textAlign:"center",fontSize:14.5,color:"#9a9a97"},children:"\uBC30\uC815\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."});let{days:i,total:a,usePoints:l,actual:u}=r,c=600,p=200,d=8,s=h=>i.length===1?0:h/(i.length-1)*c,m=h=>d+(p-d*2)*(1-h/Math.max(1,a)),f=`${s(0)},${m(a)} ${s(i.length-1)},${m(0)}`,B=u.map(h=>`${s(i.indexOf(h.day))},${m(h.value)}`).join(" "),b=u[u.length-1];return tn(on,{children:[tn(on,{sx:{mb:1,display:"flex",justifyContent:"space-between",fontSize:14,color:"#000"},children:[tn("span",{children:["\uB0A8\uC740 ",l?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uCD1D ",a]}),b?tn("span",{children:["\uD604\uC7AC"," ",Jo(on,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:b.value}),l?"SP":"\uAC74"," \uB0A8\uC74C"]}):null]}),Jo(on,{sx:{border:"1px solid #e6e6e3",borderRadius:1,bgcolor:"#fafaf9",px:1,py:.5},children:tn("svg",{viewBox:`0 0 ${c} ${p}`,preserveAspectRatio:"none",style:{display:"block",width:"100%",height:n},children:[Jo("line",{x1:0,y1:m(0),x2:c,y2:m(0),stroke:"#e6e6e3",strokeWidth:1}),Jo("polyline",{points:f,fill:"none",stroke:"#9a9a97",strokeWidth:1.5,strokeDasharray:"6 5",vectorEffect:"non-scaling-stroke"}),u.length>1?Jo("polyline",{points:B,fill:"none",stroke:"#2f80ed",strokeWidth:2.5,vectorEffect:"non-scaling-stroke"}):null,b?Jo("circle",{cx:s(i.indexOf(b.day)),cy:m(b.value),r:4,fill:"#2f80ed",vectorEffect:"non-scaling-stroke"}):null]})}),tn(on,{sx:{mt:.5,display:"flex",justifyContent:"space-between",fontSize:13.5,color:"#000"},children:[Jo("span",{children:Wa(e.start_date)}),t>e.start_date&&t<e.end_date?tn("span",{children:["\uC624\uB298 ",Wa(t)]}):null,Jo("span",{children:Wa(e.end_date)})]})]})}import{jsx as gt,jsxs as $a}from"react/jsx-runtime";function t2({open:e,sprints:o,tasks:t,todayStr:n,initialSprintSeq:r=0,onClose:i}){let[a,l]=ay(0);ry(()=>{if(!e)return;let p=o.find(s=>s.status==="active")??o[0],d=o.find(s=>s.seq===r)??p;l(d?.seq??0)},[e]);let u=iy(()=>o.find(p=>p.seq===a)??null,[o,a]),c=$a(In,{sx:{display:"flex",flexDirection:"column"},children:[$a(In,{sx:{px:3,py:2.5},children:[gt(In,{sx:{mb:1.5,fontSize:17,fontWeight:700,color:"#37352f"},children:"\uBCA8\uB85C\uC2DC\uD2F0"}),gt(Qc,{sprints:o,tasks:t})]}),gt(sy,{sx:{borderColor:"#e6e6e3"}}),$a(In,{sx:{px:3,py:2.5},children:[gt(In,{sx:{mb:1.5,fontSize:17,fontWeight:700,color:"#37352f"},children:"\uBC88\uB2E4\uC6B4"}),gt(my,{label:"\uBAA9\uD45C",showLabel:!1,value:a?String(a):"",options:o.map(p=>({value:String(p.seq),label:vo(p)})),onChange:p=>l(Number(p.target.value)||0),sx:{width:280,mb:2}}),u?gt(Zc,{sprint:u,tasks:t,todayStr:n}):gt(In,{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 gt(cy,{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:gt(ly,{variant:"contained",onClick:i,children:"\uB2EB\uAE30"})}})}import{Checkbox as uy,Divider as dy,Menu as py,MenuItem as Ka}from"@mui/material";import{jsx as er,jsxs as em}from"react/jsx-runtime";function l2({anchorEl:e,candidates:o,selectedNames:t,avatarSrcByName:n,onToggle:r,onClear:i,onClose:a}){return em(py,{anchorEl:e,open:!!e,onClose:a,transitionDuration:0,children:[o.length===0?er(Ka,{disabled:!0,sx:{fontSize:14},children:"\uBAA9\uB85D\uC5D0 \uC9C0\uC815\uB41C \uC0AC\uB78C\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):o.map(l=>{let u=t.includes(l.name);return em(Ka,{onClick:()=>r(l),sx:{fontSize:14,minWidth:170,gap:1},children:[er(uy,{size:"small",checked:u,sx:{p:0}}),er(xo,{names:[l.name],size:20,avatarSrcByName:n}),l.name]},`${l.accountSeq}-${l.name}`)}),er(dy,{}),er(Ka,{disabled:t.length===0,onClick:i,sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}import{useState as fy}from"react";import{ButtonBase as xy,Menu as gy,MenuItem as by}from"@mui/material";import hy from"@mui/icons-material/KeyboardArrowDown";import ky from"@mui/icons-material/Check";import{Fragment as Ty,jsx as Ua,jsxs as Va}from"react/jsx-runtime";function x2({value:e,onChange:o,options:t}){let[n,r]=fy(null),i=t??Ei,a=Ei.find(l=>l.value===e)?.label??"";return Va(Ty,{children:[Va(xy,{onClick:l=>r(l.currentTarget),sx:{display:"flex",alignItems:"center",gap:.5,px:1,py:.5,borderRadius:1,fontSize:13.5,color:"#37352f","&:hover":{bgcolor:"#f2f2f0"}},children:[a,Ua(hy,{sx:{fontSize:17,color:"#9a9a97"}})]}),Ua(gy,{transitionDuration:0,anchorEl:n,open:!!n,onClose:()=>r(null),children:i.map(l=>Va(by,{selected:l.value===e,onClick:()=>{o(l.value),r(null)},sx:{fontSize:14,minWidth:140,justifyContent:"space-between",gap:1},children:[l.label,l.value===e?Ua(ky,{sx:{fontSize:16,color:"#2f80ed"}}):null]},l.value))})]})}import{Box as mi,ButtonBase as yy}from"@mui/material";import{DateTextField as om}from"@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 h2(e=new Date){return{fromDate:nn(ci(1,e)),toDate:nn(e)}}import{jsx as or,jsxs as tm}from"react/jsx-runtime";var Sy=[{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 nm({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 tm(mi,{sx:{display:"flex",alignItems:"center",gap:1.5,flexWrap:"wrap"},children:[or(mi,{sx:{display:"flex",alignItems:"center",gap:1.5},children:Sy.map(i=>{let a=r(i.months);return or(yy,{onClick:()=>n(i.months),sx:{px:1.25,py:.85,borderRadius:1,fontSize:13,fontWeight:a?500:400,border:"1px solid",borderColor:a?"#2f80ed":"#dedddb",color:a?"#2f80ed":"#37352f",bgcolor:a?"#eef6ff":"transparent","&:hover":{bgcolor:a?"#eef6ff":"#f7f7f5"}},children:i.label},i.label)})}),tm(mi,{sx:{display:"flex",alignItems:"center",gap:.5},children:[or(om,{value:e,size:"small",placeholder:"\uC2DC\uC791\uC77C",onChange:i=>t(i.target.value,o),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}}),or(mi,{component:"span",sx:{fontSize:13,color:"#9a9a97"},children:"~"}),or(om,{value:o,size:"small",placeholder:"\uC885\uB8CC\uC77C",onChange:i=>t(e,i.target.value),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}})]})]})}import{Popover as By}from"@mui/material";import{jsx as rm}from"react/jsx-runtime";function _2({anchorEl:e,fromDate:o,toDate:t,onChange:n,onClose:r}){return rm(By,{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:rm(nm,{fromDate:o,toDate:t,onChange:n})})}import{Box as Cy,ButtonBase as vy,Tab as Iy,Tabs as _y}from"@mui/material";import wy from"@mui/icons-material/Checklist";import Dy from"@mui/icons-material/Face";import Oy from"@mui/icons-material/Publish";import My from"@mui/icons-material/NotificationsOutlined";import Ey from"@mui/icons-material/BugReportOutlined";import Py from"@mui/icons-material/DescriptionOutlined";import Ry from"@mui/icons-material/Inventory2Outlined";import{jsx as Ho}from"react/jsx-runtime";function im(e,o){return o>0?`${e} (${o})`:e}var F2=[{id:"my",label:"\uC804\uCCB4",icon:Ho(wy,{sx:{fontSize:18}})},{id:"notice",label:"\uACF5\uC9C0\uC0AC\uD56D",icon:Ho(My,{sx:{fontSize:18}})},{id:"mine",label:"\uB0B4 \uC5C5\uBB34",icon:Ho(Dy,{sx:{fontSize:18}})},{id:"sent",label:"\uBCF4\uB0B8 \uC5C5\uBB34",icon:Ho(Oy,{sx:{fontSize:18}})},{id:"bug",label:"\uC624\uB958",icon:Ho(Ey,{sx:{fontSize:18}})},{id:"archive",label:"\uBCF4\uAD00\uD568",icon:Ho(Ry,{sx:{fontSize:18}}),hideCount:!0},{id:"report",label:"\uBCF4\uACE0\uC11C",icon:Ho(Py,{sx:{fontSize:18}}),hideCount:!0}];function zy(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 H2({items:e,activeTab:o,counts:t,onChange:n,compact:r=!1}){let i=le(),a=zy(i.tabs),l=e;return r?Ho(Cy,{sx:{display:"flex",flexWrap:"wrap",gap:1.25},children:l.map(u=>{let c=o===u.id;return Ho(vy,{onClick:()=>n(u.id),sx:{px:1.5,py:.75,borderRadius:1,fontSize:po(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:im(u.label,u.hideCount?0:t[u.id]??0)},u.id)})}):Ho(_y,{value:o,onChange:(u,c)=>n(c),sx:{minHeight:46,"& .MuiTabs-indicator":{display:"none"},"& .MuiTabs-flexContainer":{gap:"12px",minHeight:46}},children:l.map(u=>Ho(Iy,{value:u.id,label:im(u.label,u.hideCount?0:t[u.id]??0),icon:u.icon,iconPosition:"start",sx:a},u.id))})}import{useEffect as qy,useMemo as Ay,useState as Ga}from"react";import{Divider as Ya,ListItemIcon as Do,Menu as ja,MenuItem as co}from"@mui/material";import Ly from"@mui/icons-material/OpenInNewOutlined";import Ny from"@mui/icons-material/Check";import Fy from"@mui/icons-material/CheckCircleOutlined";import Hy from"@mui/icons-material/RadioButtonUnchecked";import Wy from"@mui/icons-material/SendOutlined";import $y from"@mui/icons-material/EventOutlined";import Ky from"@mui/icons-material/PersonOutlineOutlined";import Uy from"@mui/icons-material/ViewKanbanOutlined";import Vy from"@mui/icons-material/ContentCopyOutlined";import Gy from"@mui/icons-material/NextPlanOutlined";import Yy from"@mui/icons-material/ContentPasteOutlined";import jy from"@mui/icons-material/ShareOutlined";import Xy from"@mui/icons-material/DirectionsRunOutlined";import am from"@mui/icons-material/ChevronRight";import Qy from"@mui/icons-material/ArchiveOutlined";import Jy from"@mui/icons-material/UnarchiveOutlined";import{ConfirmDialog as Zy}from"@ehfuse/alerts";import{Fragment as eS,jsx as me,jsxs as to}from"react/jsx-runtime";function bz({target:e,onClose:o,customTabs:t,sprints:n=[],myAccountSeq:r=0,onOpenDetail:i,onToggleCompleted:a,onRequestConfirm:l,onChangeDueDate:u,onChangeReminder:c,onMemberEdit:p,onMoveProject:d,onDuplicate:s,onCreateFollowUp:m,onShare:f,onAssignSprint:B,onArchiveToggle:b,onDelete:h}){let x=He(),T=Uo(),[g,v]=Ga(null),[C,I]=Ga(null),[M,Q]=Ga(null);qy(()=>{e||(v(null),I(null),Q(null))},[e]);let E=e?.task??null,te=!!E?.is_notice,w=!!E?.is_event,y=E?!ot(E,r):!1,H=Ay(()=>new Set(t.filter(P=>P.useSprints).map(P=>P.key)),[t]),N=async()=>{let P=E;if(o(),!P)return;await Zy({title:"\uC5C5\uBB34 \uC0AD\uC81C",message:`"${P.title}" \uC5C5\uBB34\uB97C \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&h(P.seq)},$=()=>{E&&b(E.seq,!E.archived),o()};return to(eS,{children:[to(ja,{open:!!e,onClose:o,transitionDuration:0,anchorReference:x?"none":"anchorPosition",anchorPosition:!x&&e?{top:e.position.top,left:e.position.left}:void 0,slotProps:{paper:{sx:{minWidth:190,...x?{position:"fixed",top:"50%",left:"50%",translate:"-50% -50%",maxHeight:"70vh"}:{}}},list:x?{sx:{"& .MuiMenuItem-root":{py:1,minHeight:0}}}:void 0},children:[to(co,{onClick:()=>{E&&i(E),o()},sx:{fontSize:14},children:[me(Do,{children:me(Ly,{sx:{fontSize:19}})}),"\uC0C1\uC138 \uC5F4\uAE30"]}),to(co,{disabled:te?(E?.author_account_seq??0)!==r:(E?.author_account_seq??0)!==r&&(E?.manager_account_seq??0)!==r,onClick:()=>{E&&a(E.seq,!E.completed),o()},sx:{fontSize:14},children:[me(Do,{children:E?.completed?me(Hy,{sx:{fontSize:19}}):me(Fy,{sx:{fontSize:19}})}),E?.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC"]}),!te&&l?to(co,{disabled:!(E?.manager_account_seq??0)&&(E?.receiver_account_seqs??[]).length===0,onClick:()=>{E&&l(E),o()},sx:{fontSize:14},children:[me(Do,{children:me(Wy,{sx:{fontSize:19}})}),"\uD655\uC778 \uC694\uCCAD"]}):null,w?null:me(Ya,{}),w?null:to(co,{disabled:y,onClick:P=>{E&&v({anchorEl:P.currentTarget,task:E})},sx:{fontSize:14},children:[me(Do,{children:me($y,{sx:{fontSize:19}})}),"\uB9C8\uAC10\uAE30\uD55C \uBCC0\uACBD"]}),!te&&!w&&p?to(co,{onClick:()=>{E&&p(E,"manager"),o()},sx:{fontSize:14},children:[me(Do,{children:me(Ky,{sx:{fontSize:19}})}),"\uCC45\uC784\uC790 \uBCC0\uACBD"]}):null,w?null:to(co,{disabled:y,onClick:P=>{E&&I({anchorEl:P.currentTarget,task:E})},sx:{fontSize:14},children:[me(Do,{children:me(Uy,{sx:{fontSize:19}})}),"\uD504\uB85C\uC81D\uD2B8 \uC774\uB3D9",me(am,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}),me(Ya,{}),s?to(co,{disabled:y,onClick:()=>{E&&s(E.seq),o()},sx:{fontSize:14},children:[me(Do,{children:me(Vy,{sx:{fontSize:19}})}),"\uBCF5\uC81C"]}):null,m&&E&&!E.is_event&&!E.is_notice?to(co,{onClick:()=>{E&&m(E.seq),o()},sx:{fontSize:14},children:[me(Do,{children:me(Gy,{sx:{fontSize:19}})}),"\uD6C4\uC18D \uC5C5\uBB34 \uB9CC\uB4E4\uAE30"]}):null,to(co,{onClick:()=>{E&&(f?f(E):li(E,x)),o()},sx:{fontSize:14},children:[me(Do,{children:x?me(jy,{sx:{fontSize:19}}):me(Yy,{sx:{fontSize:19}})}),x?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC"]}),E&&!E.is_notice&&!E.is_event&&H.has(String(E.tab_key??""))&&B?to(co,{onClick:P=>Q(P.currentTarget),sx:{fontSize:14},children:[me(Do,{children:me(Xy,{sx:{fontSize:19}})}),"\uBAA9\uD45C\uC5D0 \uB123\uAE30",me(am,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}):null,to(co,{onClick:$,disabled:y||!E?.archived&&!(E&&dr(E)),sx:{fontSize:14},children:[me(Do,{children:E?.archived?me(Jy,{sx:{fontSize:19}}):me(Qy,{sx:{fontSize:19}})}),E?.archived?"\uBCF4\uAD00 \uD574\uC81C":"\uBCF4\uAD00"]}),me(Ya,{}),to(co,{disabled:y,onClick:N,sx:{fontSize:14,color:"#e5484d"},children:[me(Do,{children:me(at,{sx:{fontSize:19,color:"#e5484d"}})}),"\uC0AD\uC81C"]})]}),me(St,{anchorEl:g?.anchorEl??null,open:!!g,date:g?.task.due_date??"",reminder:g?.task.reminder??"none",hideReminder:!!g?.task.completed,centered:x,onClose:()=>{v(null),o()},onDateChange:P=>{g&&u(g.task.seq,P)},onReminderChange:P=>{g&&c?.(g.task.seq,P)}}),to(ja,{transitionDuration:0,anchorEl:C?.anchorEl??null,open:!!C,onClose:()=>{I(null),o()},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},...T,children:[me(co,{selected:!C?.task.tab_key,onClick:()=>{C&&d(C.task.seq,""),I(null),o()},sx:{fontSize:14,minWidth:170},children:"\uC5C6\uC74C"}),t.filter(P=>!P.archived).map(P=>me(co,{selected:C?.task.tab_key===P.key,onClick:()=>{C&&d(C.task.seq,P.key),I(null),o()},sx:{fontSize:14,minWidth:170},children:P.label},P.key))]}),me(ja,{transitionDuration:0,anchorEl:M,open:!!M,onClose:()=>Q(null),anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...n.filter(P=>`custom-${P.group_seq}`===String(E?.tab_key??"")).map(P=>({seq:P.seq,label:vo(P)}))].map(P=>to(co,{onClick:()=>{E&&B?.(E.seq,P.seq),Q(null),o()},sx:{fontSize:14,minWidth:160,gap:1},children:[P.label,(E?.sprint_seq??0)===P.seq?me(Ny,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},P.seq))})]})}import{Checkbox as oS,Divider as tS,Menu as nS,MenuItem as lm}from"@mui/material";import{jsx as ui,jsxs as sm}from"react/jsx-runtime";function Sz({anchorEl:e,labelOptions:o,selectedKeys:t,onToggle:n,onClear:r,onClose:i}){return sm(nS,{transitionDuration:0,anchorEl:e,open:!!e,onClose:i,children:[o.map(a=>{let l=t.includes(a.key);return sm(lm,{onClick:()=>n(a.key),sx:{fontSize:14,minWidth:190,gap:1},children:[ui(oS,{size:"small",checked:l,sx:{p:0}}),ui(we,{option:a})]},a.key)}),ui(tS,{}),ui(lm,{disabled:t.length===0,onClick:()=>{r(),i()},sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}import{Divider as cm,Menu as rS,MenuItem as Xa}from"@mui/material";import iS from"@mui/icons-material/Check";import aS from"@mui/icons-material/BarChartOutlined";import lS from"@mui/icons-material/SettingsOutlined";import{jsx as tr,jsxs as di}from"react/jsx-runtime";function Oz(e){let{anchorEl:o,sprints:t,value:n,onSelect:r,onManage:i,onCharts:a,onClose:l}=e;return di(rS,{transitionDuration:0,anchorEl:o,open:!!o,onClose:l,children:[[{seq:0,label:"\uC804\uCCB4"},{seq:-1,label:"\uBBF8\uBC30\uC815 \uC5C5\uBB34"},...t.map(u=>({seq:u.seq,label:vo(u)}))].map(u=>di(Xa,{onClick:()=>{r(u.seq),l()},sx:{fontSize:14,minWidth:180,gap:1},children:[u.label,n===u.seq?tr(iS,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},u.seq)),tr(cm,{}),a?di(Xa,{onClick:()=>{l(),a()},sx:{fontSize:14,gap:1},children:[tr(aS,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uCC28\uD2B8"]}):null,a?tr(cm,{}):null,di(Xa,{onClick:()=>{l(),i()},sx:{fontSize:14,gap:1},children:[tr(lS,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uAD00\uB9AC\u2026"]})]})}var sS={my:"tasks",mine:"tasks",sent:"tasks",notice:"notice",bug:"bug",archive:"archive",done:"done",report:"report"};function cS(e){return sS[e]??"tasks"}var Pz={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"},mm=["list","calendar","month","card","kanban","sprint","timeline"],mS=["list","card"];function Rz(e){let o=cS(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:mm,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:mS,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:mm,showCreate:!0,createLabel:"\uC5C5\uBB34 \uB4F1\uB85D",showGroupBy:!0,showSprintFilter:!0,showDateRange:!1,showHideCompleted:!0,forceFlatList:!1,columns:e==="mine"?{showRequest:!1,confirmMode:"action"}:e==="sent"?{confirmMode:"time"}:{}}}}export{XC as ALL_TASK_VIEWER_ACCOUNT_SEQS,rc as AddLabelDialog,_r as AddTabDialog,ec as AttachmentUploadGauge,ya as AttachmentUploadPercent,Ci as BUG_DEVICE_OPTIONS,Rn as BUG_ICON_COLOR,PC as BUG_KANBAN_COLUMNS,Bi as BUG_REPRO_OPTIONS,vi as BUG_RESOLUTION_OPTIONS,qt as BUG_STATUS_OPTIONS,Pn as BUG_TASK_ICON,Xr as BugPropertiesGrid,Rp as COLUMN_WIDTHS,_i as COMPLETED_STATUS_OPTION,qa as CUSTOM_TAB_KEY_PREFIX,SR as CalendarImportDialog,OR as CalendarSubscribeDialog,Cr as CommentBubbleIcon,un as ConfirmCountButton,Ll as DATE_REMINDER_OPTIONS,gi as DEFAULT_PROJECT_ICON,F2 as DEFAULT_TASKBOX_TAB_ITEMS,_e as DEFAULT_TASK_ICON,_2 as DateRangeFilterPopover,_o as DrawerSection,St as DueDatePickerPopover,pp as ENDED_EVENT_STATUS_OPTION,uc as EVENT_ICON_COLOR,NR as EmployeeSelectDialog,Ei as GROUP_BY_OPTIONS,xn as GoogleEventChip,x2 as GroupByMenuButton,Ir as IconPickerGrid,Ws as InlineAddressInput,pt as InlineTextValue,wi as KANBAN_CLOSED_COLUMN_KEY,Sz as LabelFilterMenu,ni as LabelSelectMenu,qn as MANUAL_TASK_STATUS_OPTIONS,l2 as MemberFilterMenu,zn as NOTICE_STATUS_OPTIONS,Mo as NOTICE_TASK_ICON,ul as NO_TASK_ICON,bi as PROJECT_ICON_OPTIONS,xe as PropertyRow,cn as RECEIVER_AVATAR_COLORS,Nl as REMINDER_OPTIONS,xo as ReceiverAvatarStack,zc as RelatedTasksSection,sr as STATUS_KEY_REPLIED,Mn as STATUS_KEY_WAITING,Mr as SortableTaskCard,Zc as SprintBurndownChart,t2 as SprintChartsDialog,Oz as SprintFilterMenu,dR as SprintManageDialog,Qc as SprintVelocityChart,gr as StatusSelectMenu,zi as TASKBOX_COLUMNS,jo as TASKBOX_DRAWER_NARROW_MQ,dl as TASKBOX_UI_STATE_ID,Pz as TASKBOX_VIEW_LABELS,Fw as TASKBOX_VIEW_MODES,zt as TASK_STATUS_OPTIONS,If as TIME_REMINDER_OPTIONS,Or as TaskAckListPopover,mn as TaskActionButton,oi as TaskAttachmentsSection,Os as TaskBoxColumnSummary,ea as TaskBoxGroupBoard,ID as TaskBoxMobileList,ks as TaskBoxMonthAgenda,xs as TaskBoxMonthCalendar,Zw as TaskBoxSprintColumnSummary,$l as TaskBoxTable,H2 as TaskBoxTabs,vs as TaskBoxTimeline,Nw as TaskBoxView,ss as TaskBoxWeekCalendar,Wt as TaskCardContent,Jr as TaskChecklistSection,Sc as TaskCommentInput,yc as TaskCommentsSection,Qr as TaskContentEditor,bz as TaskContextMenu,jr as TaskCorePropertiesGrid,dc as TaskCreateBody,RE as TaskCreateDrawer,nm as TaskDateRangeFilter,Lc as TaskDetailBody,Z5 as TaskDetailDrawer,_c as TaskDetailHeader,Ur as TaskIconPickerPopover,Tt as TaskLabelChips,Ec as TaskLinkDialog,wc as TaskNoteField,Eo as TaskPriorityChip,we as TaskStatusChip,FC as TaskStatusChips,hm as TaskboxProvider,FT as buildCalendarFeedUrl,pn as buildCardBaseSx,kl as buildStatusOptionColors,Pi as buildTaskGroupSections,Oc as buildTaskRelationsModel,Mk as buildTaskShareText,mr as buildTaskboxTheme,Tl as canAssignBugManager,hr as canClaimTaskItem,ot as canEditTaskItem,br as canViewTaskItem,kr as canVolunteerTaskItem,_s as countWorkdays,sp as createTaskboxTheme,Ds as daysLeftUntil,hi as defaultTaskBoxFormValues,ki as defaultTaskboxUiStateValues,cc as filterFilesWithinLimit,h1 as formatConfirmTime,Is as formatHours,Vo as formatKoreanDate,tt as formatKoreanDateTime,vo as formatSprintOptionLabel,gl as getBugDeviceName,xl as getBugReproName,ur as getBugResolutionName,fp as getBugStatusOption,h2 as getDefaultDateRange,An as getEventDisplayStatusOption,RC as getNoDueStatusRank,sc as getNoticeAckInfo,bl as getNoticeStatusOption,VM as getNoticeTargetDisplay,cr as getProjectIconAnchorComponent,Oe as getProjectIconComponent,Ki as getReminderLabel,$i as getReminderOptions,hl as getStatusOptionsForTask,Rz as getTabHeaderConfig,Ai as getTaskBoxColumnDefs,Tr as getTaskBoxGridTemplate,cS as getTaskBoxTabKind,Ul as getTaskConfirmInfo,fo as getTaskDisplayStatusOption,pr as getTaskStatusOption,fn as groupGoogleEventsByDate,Aa as groupSeqFromTabKey,wP as hasRelation,yh as htmlToPlainText,CT as isCustomTabKey,Mi as isOpenPoolTaskItem,Ii as isPastEvent,dr as isTaskDone,Di as isWaitingTask,ci as monthsAgoDate,so as narrowOrderSx,J5 as nowDateTimeString,rb as parseEstimatedHours,Xt as relationsOf,kt as resolveTaskStatusOptions,Si as resolveTaskboxTheme,li as shareTaskText,ws as sumRemainingHours,ri as summarizeNoticeTargets,tR as tabKeyFromGroupSeq,nn as toYmd,fr as toggleLabelKey,xi as useBuildFileUrl,Zs as useTaskAttachmentUploadMeta,yo as useTaskboxConfig,np as useTaskboxForm,le as useTaskboxTheme,et as useTaskboxUiState,En as useUploadMaxMb};
|
|
14
14
|
//# sourceMappingURL=index.esm.js.map
|