@ehfuse/taskbox 0.5.347 → 0.5.348

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -1,4 +1,4 @@
1
- var hg=Object.create;var Xf=Object.defineProperty;var pg=Object.getOwnPropertyDescriptor;var mg=Object.getOwnPropertyNames;var gg=Object.getPrototypeOf,bg=Object.prototype.hasOwnProperty;var _s=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(d,b)=>(typeof require<"u"?require:d)[b]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var yg=(e,d)=>()=>(d||e((d={exports:{}}).exports,d),d.exports);var xg=(e,d,b,l)=>{if(d&&typeof d=="object"||typeof d=="function")for(let o of mg(d))!bg.call(e,o)&&o!==b&&Xf(e,o,{get:()=>d[o],enumerable:!(l=pg(d,o))||l.enumerable});return e};var vg=(e,d,b)=>(b=e!=null?hg(gg(e)):{},xg(d||!e||!e.__esModule?Xf(b,"default",{value:e,enumerable:!0}):b,e));var dg=yg((fg,Kf)=>{(function(e){typeof fg=="object"&&typeof Kf<"u"?Kf.exports=e():typeof define=="function"&&define.amd?define([],e):(typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this).ExcelJS=e()})((function(){return(function e(d,b,l){function o(t,n){if(!b[t]){if(!d[t]){var c=typeof _s=="function"&&_s;if(!n&&c)return c(t,!0);if(s)return s(t,!0);var i=new Error("Cannot find module '"+t+"'");throw i.code="MODULE_NOT_FOUND",i}var a=b[t]={exports:{}};d[t][0].call(a.exports,(function(h){return o(d[t][1][h]||h)}),a,a.exports,e,d,b,l)}return b[t].exports}for(var s=typeof _s=="function"&&_s,r=0;r<l.length;r++)o(l[r]);return o})({1:[function(e,d,b){"use strict";let l=e("fs"),o=e("fast-csv"),s=e("dayjs/plugin/customParseFormat"),r=e("dayjs/plugin/utc"),t=e("dayjs").extend(s).extend(r),n=e("../utils/stream-buf"),{fs:{exists:c}}=e("../utils/utils"),i={true:!0,false:!1,"#N/A":{error:"#N/A"},"#REF!":{error:"#REF!"},"#NAME?":{error:"#NAME?"},"#DIV/0!":{error:"#DIV/0!"},"#NULL!":{error:"#NULL!"},"#VALUE!":{error:"#VALUE!"},"#NUM!":{error:"#NUM!"}};d.exports=class{constructor(a){this.workbook=a,this.worksheet=null}async readFile(a,h){if(h=h||{},!await c(a))throw new Error("File not found: "+a);let f=l.createReadStream(a),u=await this.read(f,h);return f.close(),u}read(a,h){return h=h||{},new Promise((f,u)=>{let g=this.workbook.addWorksheet(h.sheetName),m=h.dateFormats||["YYYY-MM-DD[T]HH:mm:ssZ","YYYY-MM-DD[T]HH:mm:ss","MM-DD-YYYY","YYYY-MM-DD"],v=h.map||function(B){if(B==="")return null;let R=Number(B);if(!Number.isNaN(R)&&R!==1/0)return R;let L=m.reduce((P,N)=>{if(P)return P;let q=t(B,N,!0);return q.isValid()?q:null},null);if(L)return new Date(L.valueOf());let A=i[B];return A!==void 0?A:B},k=o.parse(h.parserOptions).on("data",B=>{g.addRow(B.map(v))}).on("end",()=>{k.emit("worksheet",g)});k.on("worksheet",f).on("error",u),a.pipe(k)})}createInputStream(){throw new Error("`CSV#createInputStream` is deprecated. You should use `CSV#read` instead. This method will be removed in version 5.0. Please follow upgrade instruction: https://github.com/exceljs/exceljs/blob/master/UPGRADE-4.0.md")}write(a,h){return new Promise((f,u)=>{h=h||{};let g=this.workbook.getWorksheet(h.sheetName||h.sheetId),m=o.format(h.formatterOptions);a.on("finish",()=>{f()}),m.on("error",u),m.pipe(a);let{dateFormat:v,dateUTC:k}=h,B=h.map||(A=>{if(A){if(A.text||A.hyperlink)return A.hyperlink||A.text||"";if(A.formula||A.result)return A.result||"";if(A instanceof Date)return v?k?t.utc(A).format(v):t(A).format(v):k?t.utc(A).format():t(A).format();if(A.error)return A.error;if(typeof A=="object")return JSON.stringify(A)}return A}),R=h.includeEmptyRows===void 0||h.includeEmptyRows,L=1;g&&g.eachRow((A,P)=>{if(R)for(;L++<P-1;)m.write([]);let{values:N}=A;N.shift(),m.write(N.map(B)),L=P}),m.end()})}writeFile(a,h){let f={encoding:(h=h||{}).encoding||"utf8"},u=l.createWriteStream(a,f);return this.write(u,h)}async writeBuffer(a){let h=new n;return await this.write(h,a),h.read()}}},{"../utils/stream-buf":24,"../utils/utils":27,dayjs:391,"dayjs/plugin/customParseFormat":392,"dayjs/plugin/utc":393,"fast-csv":424,fs:216}],2:[function(e,d,b){"use strict";let l=e("../utils/col-cache");class o{constructor(r,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;if(this.worksheet=r,t)if(typeof t=="string"){let c=l.decodeAddress(t);this.nativeCol=c.col+n,this.nativeColOff=0,this.nativeRow=c.row+n,this.nativeRowOff=0}else t.nativeCol!==void 0?(this.nativeCol=t.nativeCol||0,this.nativeColOff=t.nativeColOff||0,this.nativeRow=t.nativeRow||0,this.nativeRowOff=t.nativeRowOff||0):t.col!==void 0?(this.col=t.col+n,this.row=t.row+n):(this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0);else this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0}static asInstance(r){return r instanceof o||r==null?r:new o(r)}get col(){return this.nativeCol+Math.min(this.colWidth-1,this.nativeColOff)/this.colWidth}set col(r){this.nativeCol=Math.floor(r),this.nativeColOff=Math.floor((r-this.nativeCol)*this.colWidth)}get row(){return this.nativeRow+Math.min(this.rowHeight-1,this.nativeRowOff)/this.rowHeight}set row(r){this.nativeRow=Math.floor(r),this.nativeRowOff=Math.floor((r-this.nativeRow)*this.rowHeight)}get colWidth(){return this.worksheet&&this.worksheet.getColumn(this.nativeCol+1)&&this.worksheet.getColumn(this.nativeCol+1).isCustomWidth?Math.floor(1e4*this.worksheet.getColumn(this.nativeCol+1).width):64e4}get rowHeight(){return this.worksheet&&this.worksheet.getRow(this.nativeRow+1)&&this.worksheet.getRow(this.nativeRow+1).height?Math.floor(1e4*this.worksheet.getRow(this.nativeRow+1).height):18e4}get model(){return{nativeCol:this.nativeCol,nativeColOff:this.nativeColOff,nativeRow:this.nativeRow,nativeRowOff:this.nativeRowOff}}set model(r){this.nativeCol=r.nativeCol,this.nativeColOff=r.nativeColOff,this.nativeRow=r.nativeRow,this.nativeRowOff=r.nativeRowOff}}d.exports=o},{"../utils/col-cache":19}],3:[function(e,d,b){"use strict";let l=e("../utils/col-cache"),o=e("../utils/under-dash"),s=e("./enums"),{slideFormula:r}=e("../utils/shared-formula"),t=e("./note");class n{constructor(a,h,f){if(!a||!h)throw new Error("A Cell needs a Row");this._row=a,this._column=h,l.validateAddress(f),this._address=f,this._value=c.create(n.Types.Null,this),this.style=this._mergeStyle(a.style,h.style,{}),this._mergeCount=0}get worksheet(){return this._row.worksheet}get workbook(){return this._row.worksheet.workbook}destroy(){delete this.style,delete this._value,delete this._row,delete this._column,delete this._address}get numFmt(){return this.style.numFmt}set numFmt(a){this.style.numFmt=a}get font(){return this.style.font}set font(a){this.style.font=a}get alignment(){return this.style.alignment}set alignment(a){this.style.alignment=a}get border(){return this.style.border}set border(a){this.style.border=a}get fill(){return this.style.fill}set fill(a){this.style.fill=a}get protection(){return this.style.protection}set protection(a){this.style.protection=a}_mergeStyle(a,h,f){let u=a&&a.numFmt||h&&h.numFmt;u&&(f.numFmt=u);let g=a&&a.font||h&&h.font;g&&(f.font=g);let m=a&&a.alignment||h&&h.alignment;m&&(f.alignment=m);let v=a&&a.border||h&&h.border;v&&(f.border=v);let k=a&&a.fill||h&&h.fill;k&&(f.fill=k);let B=a&&a.protection||h&&h.protection;return B&&(f.protection=B),f}get address(){return this._address}get row(){return this._row.number}get col(){return this._column.number}get $col$row(){return`$${this._column.letter}$${this.row}`}get type(){return this._value.type}get effectiveType(){return this._value.effectiveType}toCsvString(){return this._value.toCsvString()}addMergeRef(){this._mergeCount++}releaseMergeRef(){this._mergeCount--}get isMerged(){return this._mergeCount>0||this.type===n.Types.Merge}merge(a,h){this._value.release(),this._value=c.create(n.Types.Merge,this,a),h||(this.style=a.style)}unmerge(){this.type===n.Types.Merge&&(this._value.release(),this._value=c.create(n.Types.Null,this),this.style=this._mergeStyle(this._row.style,this._column.style,{}))}isMergedTo(a){return this._value.type===n.Types.Merge&&this._value.isMergedTo(a)}get master(){return this.type===n.Types.Merge?this._value.master:this}get isHyperlink(){return this._value.type===n.Types.Hyperlink}get hyperlink(){return this._value.hyperlink}get value(){return this._value.value}set value(a){this.type!==n.Types.Merge?(this._value.release(),this._value=c.create(c.getType(a),this,a)):this._value.master.value=a}get note(){return this._comment&&this._comment.note}set note(a){this._comment=new t(a)}get text(){return this._value.toString()}get html(){return o.escapeHtml(this.text)}toString(){return this.text}_upgradeToHyperlink(a){this.type===n.Types.String&&(this._value=c.create(n.Types.Hyperlink,this,{text:this._value.value,hyperlink:a}))}get formula(){return this._value.formula}get result(){return this._value.result}get formulaType(){return this._value.formulaType}get fullAddress(){let{worksheet:a}=this._row;return{sheetName:a.name,address:this.address,row:this.row,col:this.col}}get name(){return this.names[0]}set name(a){this.names=[a]}get names(){return this.workbook.definedNames.getNamesEx(this.fullAddress)}set names(a){let{definedNames:h}=this.workbook;h.removeAllNames(this.fullAddress),a.forEach(f=>{h.addEx(this.fullAddress,f)})}addName(a){this.workbook.definedNames.addEx(this.fullAddress,a)}removeName(a){this.workbook.definedNames.removeEx(this.fullAddress,a)}removeAllNames(){this.workbook.definedNames.removeAllNames(this.fullAddress)}get _dataValidations(){return this.worksheet.dataValidations}get dataValidation(){return this._dataValidations.find(this.address)}set dataValidation(a){this._dataValidations.add(this.address,a)}get model(){let{model:a}=this._value;return a.style=this.style,this._comment&&(a.comment=this._comment.model),a}set model(a){this._value.release(),this._value=c.create(a.type,this),this._value.model=a,a.comment&&a.comment.type==="note"&&(this._comment=t.fromModel(a.comment)),a.style?this.style=a.style:this.style={}}}n.Types=s.ValueType;let c={getType:i=>i==null?n.Types.Null:i instanceof String||typeof i=="string"?n.Types.String:typeof i=="number"?n.Types.Number:typeof i=="boolean"?n.Types.Boolean:i instanceof Date?n.Types.Date:i.text&&i.hyperlink?n.Types.Hyperlink:i.formula||i.sharedFormula?n.Types.Formula:i.richText?n.Types.RichText:i.sharedString?n.Types.SharedString:i.error?n.Types.Error:n.Types.JSON,types:[{t:n.Types.Null,f:class{constructor(i){this.model={address:i.address,type:n.Types.Null}}get value(){return null}set value(i){}get type(){return n.Types.Null}get effectiveType(){return n.Types.Null}get address(){return this.model.address}set address(i){this.model.address=i}toCsvString(){return""}release(){}toString(){return""}}},{t:n.Types.Number,f:class{constructor(i,a){this.model={address:i.address,type:n.Types.Number,value:a}}get value(){return this.model.value}set value(i){this.model.value=i}get type(){return n.Types.Number}get effectiveType(){return n.Types.Number}get address(){return this.model.address}set address(i){this.model.address=i}toCsvString(){return this.model.value.toString()}release(){}toString(){return this.model.value.toString()}}},{t:n.Types.String,f:class{constructor(i,a){this.model={address:i.address,type:n.Types.String,value:a}}get value(){return this.model.value}set value(i){this.model.value=i}get type(){return n.Types.String}get effectiveType(){return n.Types.String}get address(){return this.model.address}set address(i){this.model.address=i}toCsvString(){return`"${this.model.value.replace(/"/g,'""')}"`}release(){}toString(){return this.model.value}}},{t:n.Types.Date,f:class{constructor(i,a){this.model={address:i.address,type:n.Types.Date,value:a}}get value(){return this.model.value}set value(i){this.model.value=i}get type(){return n.Types.Date}get effectiveType(){return n.Types.Date}get address(){return this.model.address}set address(i){this.model.address=i}toCsvString(){return this.model.value.toISOString()}release(){}toString(){return this.model.value.toString()}}},{t:n.Types.Hyperlink,f:class{constructor(i,a){this.model={address:i.address,type:n.Types.Hyperlink,text:a?a.text:void 0,hyperlink:a?a.hyperlink:void 0},a&&a.tooltip&&(this.model.tooltip=a.tooltip)}get value(){let i={text:this.model.text,hyperlink:this.model.hyperlink};return this.model.tooltip&&(i.tooltip=this.model.tooltip),i}set value(i){this.model={text:i.text,hyperlink:i.hyperlink},i.tooltip&&(this.model.tooltip=i.tooltip)}get text(){return this.model.text}set text(i){this.model.text=i}get hyperlink(){return this.model.hyperlink}set hyperlink(i){this.model.hyperlink=i}get type(){return n.Types.Hyperlink}get effectiveType(){return n.Types.Hyperlink}get address(){return this.model.address}set address(i){this.model.address=i}toCsvString(){return this.model.hyperlink}release(){}toString(){return this.model.text}}},{t:n.Types.Formula,f:class{constructor(i,a){this.cell=i,this.model={address:i.address,type:n.Types.Formula,shareType:a?a.shareType:void 0,ref:a?a.ref:void 0,formula:a?a.formula:void 0,sharedFormula:a?a.sharedFormula:void 0,result:a?a.result:void 0}}_copyModel(i){let a={},h=f=>{let u=i[f];u&&(a[f]=u)};return h("formula"),h("result"),h("ref"),h("shareType"),h("sharedFormula"),a}get value(){return this._copyModel(this.model)}set value(i){this.model=this._copyModel(i)}validate(i){switch(c.getType(i)){case n.Types.Null:case n.Types.String:case n.Types.Number:case n.Types.Date:break;case n.Types.Hyperlink:case n.Types.Formula:default:throw new Error("Cannot process that type of result value")}}get dependencies(){return{ranges:this.formula.match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g),cells:this.formula.replace(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g,"").match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}/g)}}get formula(){return this.model.formula||this._getTranslatedFormula()}set formula(i){this.model.formula=i}get formulaType(){return this.model.formula?s.FormulaType.Master:this.model.sharedFormula?s.FormulaType.Shared:s.FormulaType.None}get result(){return this.model.result}set result(i){this.model.result=i}get type(){return n.Types.Formula}get effectiveType(){let i=this.model.result;return i==null?s.ValueType.Null:i instanceof String||typeof i=="string"?s.ValueType.String:typeof i=="number"?s.ValueType.Number:i instanceof Date?s.ValueType.Date:i.text&&i.hyperlink?s.ValueType.Hyperlink:i.formula?s.ValueType.Formula:s.ValueType.Null}get address(){return this.model.address}set address(i){this.model.address=i}_getTranslatedFormula(){if(!this._translatedFormula&&this.model.sharedFormula){let{worksheet:i}=this.cell,a=i.findCell(this.model.sharedFormula);this._translatedFormula=a&&r(a.formula,a.address,this.model.address)}return this._translatedFormula}toCsvString(){return""+(this.model.result||"")}release(){}toString(){return this.model.result?this.model.result.toString():""}}},{t:n.Types.Merge,f:class{constructor(i,a){this.model={address:i.address,type:n.Types.Merge,master:a?a.address:void 0},this._master=a,a&&a.addMergeRef()}get value(){return this._master.value}set value(i){i instanceof n?(this._master&&this._master.releaseMergeRef(),i.addMergeRef(),this._master=i):this._master.value=i}isMergedTo(i){return i===this._master}get master(){return this._master}get type(){return n.Types.Merge}get effectiveType(){return this._master.effectiveType}get address(){return this.model.address}set address(i){this.model.address=i}toCsvString(){return""}release(){this._master.releaseMergeRef()}toString(){return this.value.toString()}}},{t:n.Types.JSON,f:class{constructor(i,a){this.model={address:i.address,type:n.Types.String,value:JSON.stringify(a),rawValue:a}}get value(){return this.model.rawValue}set value(i){this.model.rawValue=i,this.model.value=JSON.stringify(i)}get type(){return n.Types.String}get effectiveType(){return n.Types.String}get address(){return this.model.address}set address(i){this.model.address=i}toCsvString(){return this.model.value}release(){}toString(){return this.model.value}}},{t:n.Types.SharedString,f:class{constructor(i,a){this.model={address:i.address,type:n.Types.SharedString,value:a}}get value(){return this.model.value}set value(i){this.model.value=i}get type(){return n.Types.SharedString}get effectiveType(){return n.Types.SharedString}get address(){return this.model.address}set address(i){this.model.address=i}toCsvString(){return this.model.value.toString()}release(){}toString(){return this.model.value.toString()}}},{t:n.Types.RichText,f:class{constructor(i,a){this.model={address:i.address,type:n.Types.String,value:a}}get value(){return this.model.value}set value(i){this.model.value=i}toString(){return this.model.value.richText.map(i=>i.text).join("")}get type(){return n.Types.RichText}get effectiveType(){return n.Types.RichText}get address(){return this.model.address}set address(i){this.model.address=i}toCsvString(){return`"${this.text.replace(/"/g,'""')}"`}release(){}}},{t:n.Types.Boolean,f:class{constructor(i,a){this.model={address:i.address,type:n.Types.Boolean,value:a}}get value(){return this.model.value}set value(i){this.model.value=i}get type(){return n.Types.Boolean}get effectiveType(){return n.Types.Boolean}get address(){return this.model.address}set address(i){this.model.address=i}toCsvString(){return this.model.value?1:0}release(){}toString(){return this.model.value.toString()}}},{t:n.Types.Error,f:class{constructor(i,a){this.model={address:i.address,type:n.Types.Error,value:a}}get value(){return this.model.value}set value(i){this.model.value=i}get type(){return n.Types.Error}get effectiveType(){return n.Types.Error}get address(){return this.model.address}set address(i){this.model.address=i}toCsvString(){return this.toString()}release(){}toString(){return this.model.value.error.toString()}}}].reduce((i,a)=>(i[a.t]=a.f,i),[]),create(i,a,h){let f=this.types[i];if(!f)throw new Error("Could not create Value of type "+i);return new f(a,h)}};d.exports=n},{"../utils/col-cache":19,"../utils/shared-formula":23,"../utils/under-dash":26,"./enums":7,"./note":9}],4:[function(e,d,b){"use strict";let l=e("../utils/under-dash"),o=e("./enums"),s=e("../utils/col-cache");class r{constructor(n,c,i){this._worksheet=n,this._number=c,i!==!1&&(this.defn=i)}get number(){return this._number}get worksheet(){return this._worksheet}get letter(){return s.n2l(this._number)}get isCustomWidth(){return this.width!==void 0&&this.width!==9}get defn(){return{header:this._header,key:this.key,width:this.width,style:this.style,hidden:this.hidden,outlineLevel:this.outlineLevel}}set defn(n){n?(this.key=n.key,this.width=n.width!==void 0?n.width:9,this.outlineLevel=n.outlineLevel,n.style?this.style=n.style:this.style={},this.header=n.header,this._hidden=!!n.hidden):(delete this._header,delete this._key,delete this.width,this.style={},this.outlineLevel=0)}get headers(){return this._header&&this._header instanceof Array?this._header:[this._header]}get header(){return this._header}set header(n){n!==void 0?(this._header=n,this.headers.forEach((c,i)=>{this._worksheet.getCell(i+1,this.number).value=c})):this._header=void 0}get key(){return this._key}set key(n){(this._key&&this._worksheet.getColumnKey(this._key))===this&&this._worksheet.deleteColumnKey(this._key),this._key=n,n&&this._worksheet.setColumnKey(this._key,this)}get hidden(){return!!this._hidden}set hidden(n){this._hidden=n}get outlineLevel(){return this._outlineLevel||0}set outlineLevel(n){this._outlineLevel=n}get collapsed(){return!!(this._outlineLevel&&this._outlineLevel>=this._worksheet.properties.outlineLevelCol)}toString(){return JSON.stringify({key:this.key,width:this.width,headers:this.headers.length?this.headers:void 0})}equivalentTo(n){return this.width===n.width&&this.hidden===n.hidden&&this.outlineLevel===n.outlineLevel&&l.isEqual(this.style,n.style)}get isDefault(){if(this.isCustomWidth||this.hidden||this.outlineLevel)return!1;let n=this.style;return!n||!(n.font||n.numFmt||n.alignment||n.border||n.fill||n.protection)}get headerCount(){return this.headers.length}eachCell(n,c){let i=this.number;c||(c=n,n=null),this._worksheet.eachRow(n,(a,h)=>{c(a.getCell(i),h)})}get values(){let n=[];return this.eachCell((c,i)=>{c&&c.type!==o.ValueType.Null&&(n[i]=c.value)}),n}set values(n){if(!n)return;let c=this.number,i=0;n.hasOwnProperty("0")&&(i=1),n.forEach((a,h)=>{this._worksheet.getCell(h+i,c).value=a})}_applyStyle(n,c){return this.style[n]=c,this.eachCell(i=>{i[n]=c}),c}get numFmt(){return this.style.numFmt}set numFmt(n){this._applyStyle("numFmt",n)}get font(){return this.style.font}set font(n){this._applyStyle("font",n)}get alignment(){return this.style.alignment}set alignment(n){this._applyStyle("alignment",n)}get protection(){return this.style.protection}set protection(n){this._applyStyle("protection",n)}get border(){return this.style.border}set border(n){this._applyStyle("border",n)}get fill(){return this.style.fill}set fill(n){this._applyStyle("fill",n)}static toModel(n){let c=[],i=null;return n&&n.forEach((a,h)=>{a.isDefault?i&&(i=null):i&&a.equivalentTo(i)?i.max=h+1:(i={min:h+1,max:h+1,width:a.width!==void 0?a.width:9,style:a.style,isCustomWidth:a.isCustomWidth,hidden:a.hidden,outlineLevel:a.outlineLevel,collapsed:a.collapsed},c.push(i))}),c.length?c:void 0}static fromModel(n,c){let i=[],a=1,h=0;for(c=(c=c||[]).sort((function(f,u){return f.min-u.min}));h<c.length;){let f=c[h++];for(;a<f.min;)i.push(new r(n,a++));for(;a<=f.max;)i.push(new r(n,a++,f))}return i.length?i:null}}d.exports=r},{"../utils/col-cache":19,"../utils/under-dash":26,"./enums":7}],5:[function(e,d,b){"use strict";d.exports=class{constructor(l){this.model=l||{}}add(l,o){return this.model[l]=o}find(l){return this.model[l]}remove(l){this.model[l]=void 0}}},{}],6:[function(e,d,b){"use strict";let l=e("../utils/under-dash"),o=e("../utils/col-cache"),s=e("../utils/cell-matrix"),r=e("./range"),t=/[$](\w+)[$](\d+)(:[$](\w+)[$](\d+))?/;d.exports=class{constructor(){this.matrixMap={}}getMatrix(n){return this.matrixMap[n]||(this.matrixMap[n]=new s)}add(n,c){let i=o.decodeEx(n);this.addEx(i,c)}addEx(n,c){let i=this.getMatrix(c);if(n.top)for(let a=n.left;a<=n.right;a++)for(let h=n.top;h<=n.bottom;h++){let f={sheetName:n.sheetName,address:o.n2l(a)+h,row:h,col:a};i.addCellEx(f)}else i.addCellEx(n)}remove(n,c){let i=o.decodeEx(n);this.removeEx(i,c)}removeEx(n,c){this.getMatrix(c).removeCellEx(n)}removeAllNames(n){l.each(this.matrixMap,c=>{c.removeCellEx(n)})}forEach(n){l.each(this.matrixMap,(c,i)=>{c.forEach(a=>{n(i,a)})})}getNames(n){return this.getNamesEx(o.decodeEx(n))}getNamesEx(n){return l.map(this.matrixMap,(c,i)=>c.findCellEx(n)&&i).filter(Boolean)}_explore(n,c){c.mark=!1;let{sheetName:i}=c,a=new r(c.row,c.col,c.row,c.col,i),h,f;function u(m,v){let k=n.findCellAt(i,m,c.col);return!(!k||!k.mark)&&(a[v]=m,k.mark=!1,!0)}for(f=c.row-1;u(f,"top");f--);for(f=c.row+1;u(f,"bottom");f++);function g(m,v){let k=[];for(f=a.top;f<=a.bottom;f++){let B=n.findCellAt(i,f,m);if(!B||!B.mark)return!1;k.push(B)}a[v]=m;for(let B=0;B<k.length;B++)k[B].mark=!1;return!0}for(h=c.col-1;g(h,"left");h--);for(h=c.col+1;g(h,"right");h++);return a}getRanges(n,c){return(c=c||this.matrixMap[n])?(c.forEach(i=>{i.mark=!0}),{name:n,ranges:c.map(i=>i.mark&&this._explore(c,i)).filter(Boolean).map(i=>i.$shortRange)}):{name:n,ranges:[]}}normaliseMatrix(n,c){n.forEachInSheet(c,(i,a,h)=>{i&&(i.row===a&&i.col===h||(i.row=a,i.col=h,i.address=o.n2l(h)+a))})}spliceRows(n,c,i,a){l.each(this.matrixMap,h=>{h.spliceRows(n,c,i,a),this.normaliseMatrix(h,n)})}spliceColumns(n,c,i,a){l.each(this.matrixMap,h=>{h.spliceColumns(n,c,i,a),this.normaliseMatrix(h,n)})}get model(){return l.map(this.matrixMap,(n,c)=>this.getRanges(c,n)).filter(n=>n.ranges.length)}set model(n){let c=this.matrixMap={};n.forEach(i=>{let a=c[i.name]=new s;i.ranges.forEach(h=>{t.test(h.split("!").pop()||"")&&a.addCell(h)})})}}},{"../utils/cell-matrix":18,"../utils/col-cache":19,"../utils/under-dash":26,"./range":10}],7:[function(e,d,b){"use strict";d.exports={ValueType:{Null:0,Merge:1,Number:2,String:3,Date:4,Hyperlink:5,Formula:6,SharedString:7,RichText:8,Boolean:9,Error:10},FormulaType:{None:0,Master:1,Shared:2},RelationshipType:{None:0,OfficeDocument:1,Worksheet:2,CalcChain:3,SharedStrings:4,Styles:5,Theme:6,Hyperlink:7},DocumentType:{Xlsx:1},ReadingOrder:{LeftToRight:1,RightToLeft:2},ErrorValue:{NotApplicable:"#N/A",Ref:"#REF!",Name:"#NAME?",DivZero:"#DIV/0!",Null:"#NULL!",Value:"#VALUE!",Num:"#NUM!"}}},{}],8:[function(e,d,b){"use strict";let l=e("../utils/col-cache"),o=e("./anchor");d.exports=class{constructor(s,r){this.worksheet=s,this.model=r}get model(){switch(this.type){case"background":return{type:this.type,imageId:this.imageId};case"image":return{type:this.type,imageId:this.imageId,hyperlinks:this.range.hyperlinks,range:{tl:this.range.tl.model,br:this.range.br&&this.range.br.model,ext:this.range.ext,editAs:this.range.editAs}};default:throw new Error("Invalid Image Type")}}set model(s){let{type:r,imageId:t,range:n,hyperlinks:c}=s;if(this.type=r,this.imageId=t,r==="image")if(typeof n=="string"){let i=l.decode(n);this.range={tl:new o(this.worksheet,{col:i.left,row:i.top},-1),br:new o(this.worksheet,{col:i.right,row:i.bottom},0),editAs:"oneCell"}}else this.range={tl:new o(this.worksheet,n.tl,0),br:n.br&&new o(this.worksheet,n.br,0),ext:n.ext,editAs:n.editAs,hyperlinks:c||n.hyperlinks}}}},{"../utils/col-cache":19,"./anchor":2}],9:[function(e,d,b){"use strict";let l=e("../utils/under-dash");class o{constructor(r){this.note=r}get model(){let r=null;return typeof this.note==="string"?r={type:"note",note:{texts:[{text:this.note}]}}:r={type:"note",note:this.note},l.deepMerge({},o.DEFAULT_CONFIGS,r)}set model(r){let{note:t}=r,{texts:n}=t;n.length===1&&Object.keys(n[0]).length===1?this.note=n[0].text:this.note=t}static fromModel(r){let t=new o;return t.model=r,t}}o.DEFAULT_CONFIGS={note:{margins:{insetmode:"auto",inset:[.13,.13,.25,.25]},protection:{locked:"True",lockText:"True"},editAs:"absolute"}},d.exports=o},{"../utils/under-dash":26}],10:[function(e,d,b){"use strict";let l=e("../utils/col-cache");class o{constructor(){this.decode(arguments)}setTLBR(r,t,n,c,i){if(arguments.length<4){let a=l.decodeAddress(r),h=l.decodeAddress(t);this.model={top:Math.min(a.row,h.row),left:Math.min(a.col,h.col),bottom:Math.max(a.row,h.row),right:Math.max(a.col,h.col),sheetName:n},this.setTLBR(a.row,a.col,h.row,h.col,i)}else this.model={top:Math.min(r,n),left:Math.min(t,c),bottom:Math.max(r,n),right:Math.max(t,c),sheetName:i}}decode(r){switch(r.length){case 5:this.setTLBR(r[0],r[1],r[2],r[3],r[4]);break;case 4:this.setTLBR(r[0],r[1],r[2],r[3]);break;case 3:this.setTLBR(r[0],r[1],r[2]);break;case 2:this.setTLBR(r[0],r[1]);break;case 1:{let t=r[0];if(t instanceof o)this.model={top:t.model.top,left:t.model.left,bottom:t.model.bottom,right:t.model.right,sheetName:t.sheetName};else if(t instanceof Array)this.decode(t);else if(t.top&&t.left&&t.bottom&&t.right)this.model={top:t.top,left:t.left,bottom:t.bottom,right:t.right,sheetName:t.sheetName};else{let n=l.decodeEx(t);n.top?this.model={top:n.top,left:n.left,bottom:n.bottom,right:n.right,sheetName:n.sheetName}:this.model={top:n.row,left:n.col,bottom:n.row,right:n.col,sheetName:n.sheetName}}break}case 0:this.model={top:0,left:0,bottom:0,right:0};break;default:throw new Error("Invalid number of arguments to _getDimensions() - "+r.length)}}get top(){return this.model.top||1}set top(r){this.model.top=r}get left(){return this.model.left||1}set left(r){this.model.left=r}get bottom(){return this.model.bottom||1}set bottom(r){this.model.bottom=r}get right(){return this.model.right||1}set right(r){this.model.right=r}get sheetName(){return this.model.sheetName}set sheetName(r){this.model.sheetName=r}get _serialisedSheetName(){let{sheetName:r}=this.model;return r?/^[a-zA-Z0-9]*$/.test(r)?r+"!":`'${r}'!`:""}expand(r,t,n,c){(!this.model.top||r<this.top)&&(this.top=r),(!this.model.left||t<this.left)&&(this.left=t),(!this.model.bottom||n>this.bottom)&&(this.bottom=n),(!this.model.right||c>this.right)&&(this.right=c)}expandRow(r){if(r){let{dimensions:t,number:n}=r;t&&this.expand(n,t.min,n,t.max)}}expandToAddress(r){let t=l.decodeEx(r);this.expand(t.row,t.col,t.row,t.col)}get tl(){return l.n2l(this.left)+this.top}get $t$l(){return`$${l.n2l(this.left)}$${this.top}`}get br(){return l.n2l(this.right)+this.bottom}get $b$r(){return`$${l.n2l(this.right)}$${this.bottom}`}get range(){return`${this._serialisedSheetName+this.tl}:${this.br}`}get $range(){return`${this._serialisedSheetName+this.$t$l}:${this.$b$r}`}get shortRange(){return this.count>1?this.range:this._serialisedSheetName+this.tl}get $shortRange(){return this.count>1?this.$range:this._serialisedSheetName+this.$t$l}get count(){return(1+this.bottom-this.top)*(1+this.right-this.left)}toString(){return this.range}intersects(r){return(!r.sheetName||!this.sheetName||r.sheetName===this.sheetName)&&!(r.bottom<this.top)&&!(r.top>this.bottom)&&!(r.right<this.left)&&!(r.left>this.right)}contains(r){let t=l.decodeEx(r);return this.containsEx(t)}containsEx(r){return(!r.sheetName||!this.sheetName||r.sheetName===this.sheetName)&&r.row>=this.top&&r.row<=this.bottom&&r.col>=this.left&&r.col<=this.right}forEachAddress(r){for(let t=this.left;t<=this.right;t++)for(let n=this.top;n<=this.bottom;n++)r(l.encodeAddress(n,t),n,t)}}d.exports=o},{"../utils/col-cache":19}],11:[function(e,d,b){"use strict";let l=e("../utils/under-dash"),o=e("./enums"),s=e("../utils/col-cache"),r=e("./cell");d.exports=class{constructor(t,n){this._worksheet=t,this._number=n,this._cells=[],this.style={},this.outlineLevel=0}get number(){return this._number}get worksheet(){return this._worksheet}commit(){this._worksheet._commitRow(this)}destroy(){delete this._worksheet,delete this._cells,delete this.style}findCell(t){return this._cells[t-1]}getCellEx(t){let n=this._cells[t.col-1];if(!n){let c=this._worksheet.getColumn(t.col);n=new r(this,c,t.address),this._cells[t.col-1]=n}return n}getCell(t){if(typeof t=="string"){let n=this._worksheet.getColumnKey(t);t=n?n.number:s.l2n(t)}return this._cells[t-1]||this.getCellEx({address:s.encodeAddress(this._number,t),row:this._number,col:t})}splice(t,n){let c=t+n;for(var i=arguments.length,a=new Array(i>2?i-2:0),h=2;h<i;h++)a[h-2]=arguments[h];let f=a.length-n,u=this._cells.length,g,m,v;if(f<0)for(g=t+a.length;g<=u;g++)v=this._cells[g-1],m=this._cells[g-f-1],m?(v=this.getCell(g),v.value=m.value,v.style=m.style,v._comment=m._comment):v&&(v.value=null,v.style={},v._comment=void 0);else if(f>0)for(g=u;g>=c;g--)m=this._cells[g-1],m?(v=this.getCell(g+f),v.value=m.value,v.style=m.style,v._comment=m._comment):this._cells[g+f-1]=void 0;for(g=0;g<a.length;g++)v=this.getCell(t+g),v.value=a[g],v.style={},v._comment=void 0}eachCell(t,n){if(n||(n=t,t=null),t&&t.includeEmpty){let c=this._cells.length;for(let i=1;i<=c;i++)n(this.getCell(i),i)}else this._cells.forEach((c,i)=>{c&&c.type!==o.ValueType.Null&&n(c,i+1)})}addPageBreak(t,n){let c=this._worksheet,i=Math.max(0,t-1)||0,a=Math.max(0,n-1)||16838,h={id:this._number,max:a,man:1};i&&(h.min=i),c.rowBreaks.push(h)}get values(){let t=[];return this._cells.forEach(n=>{n&&n.type!==o.ValueType.Null&&(t[n.col]=n.value)}),t}set values(t){if(this._cells=[],t)if(t instanceof Array){let n=0;t.hasOwnProperty("0")&&(n=1),t.forEach((c,i)=>{c!==void 0&&(this.getCellEx({address:s.encodeAddress(this._number,i+n),row:this._number,col:i+n}).value=c)})}else this._worksheet.eachColumnKey((n,c)=>{t[c]!==void 0&&(this.getCellEx({address:s.encodeAddress(this._number,n.number),row:this._number,col:n.number}).value=t[c])})}get hasValues(){return l.some(this._cells,t=>t&&t.type!==o.ValueType.Null)}get cellCount(){return this._cells.length}get actualCellCount(){let t=0;return this.eachCell(()=>{t++}),t}get dimensions(){let t=0,n=0;return this._cells.forEach(c=>{c&&c.type!==o.ValueType.Null&&((!t||t>c.col)&&(t=c.col),n<c.col&&(n=c.col))}),t>0?{min:t,max:n}:null}_applyStyle(t,n){return this.style[t]=n,this._cells.forEach(c=>{c&&(c[t]=n)}),n}get numFmt(){return this.style.numFmt}set numFmt(t){this._applyStyle("numFmt",t)}get font(){return this.style.font}set font(t){this._applyStyle("font",t)}get alignment(){return this.style.alignment}set alignment(t){this._applyStyle("alignment",t)}get protection(){return this.style.protection}set protection(t){this._applyStyle("protection",t)}get border(){return this.style.border}set border(t){this._applyStyle("border",t)}get fill(){return this.style.fill}set fill(t){this._applyStyle("fill",t)}get hidden(){return!!this._hidden}set hidden(t){this._hidden=t}get outlineLevel(){return this._outlineLevel||0}set outlineLevel(t){this._outlineLevel=t}get collapsed(){return!!(this._outlineLevel&&this._outlineLevel>=this._worksheet.properties.outlineLevelRow)}get model(){let t=[],n=0,c=0;return this._cells.forEach(i=>{if(i){let a=i.model;a&&((!n||n>i.col)&&(n=i.col),c<i.col&&(c=i.col),t.push(a))}}),this.height||t.length?{cells:t,number:this.number,min:n,max:c,height:this.height,style:this.style,hidden:this.hidden,outlineLevel:this.outlineLevel,collapsed:this.collapsed}:null}set model(t){if(t.number!==this._number)throw new Error("Invalid row number in model");let n;this._cells=[],t.cells.forEach(c=>{switch(c.type){case r.Types.Merge:break;default:{let i;if(c.address)i=s.decodeAddress(c.address);else if(n){let{row:a}=n,h=n.col+1;i={row:a,col:h,address:s.encodeAddress(a,h),$col$row:`$${s.n2l(h)}$${a}`}}n=i,this.getCellEx(i).model=c;break}}}),t.height?this.height=t.height:delete this.height,this.hidden=t.hidden,this.outlineLevel=t.outlineLevel||0,this.style=t.style&&JSON.parse(JSON.stringify(t.style))||{}}}},{"../utils/col-cache":19,"../utils/under-dash":26,"./cell":3,"./enums":7}],12:[function(e,d,b){"use strict";let l=e("../utils/col-cache");class o{constructor(r,t,n){this.table=r,this.column=t,this.index=n}_set(r,t){this.table.cacheState(),this.column[r]=t}get name(){return this.column.name}set name(r){this._set("name",r)}get filterButton(){return this.column.filterButton}set filterButton(r){this.column.filterButton=r}get style(){return this.column.style}set style(r){this.column.style=r}get totalsRowLabel(){return this.column.totalsRowLabel}set totalsRowLabel(r){this._set("totalsRowLabel",r)}get totalsRowFunction(){return this.column.totalsRowFunction}set totalsRowFunction(r){this._set("totalsRowFunction",r)}get totalsRowResult(){return this.column.totalsRowResult}set totalsRowResult(r){this._set("totalsRowResult",r)}get totalsRowFormula(){return this.column.totalsRowFormula}set totalsRowFormula(r){this._set("totalsRowFormula",r)}}d.exports=class{constructor(s,r){this.worksheet=s,r&&(this.table=r,this.validate(),this.store())}getFormula(s){switch(s.totalsRowFunction){case"none":return null;case"average":return`SUBTOTAL(101,${this.table.name}[${s.name}])`;case"countNums":return`SUBTOTAL(102,${this.table.name}[${s.name}])`;case"count":return`SUBTOTAL(103,${this.table.name}[${s.name}])`;case"max":return`SUBTOTAL(104,${this.table.name}[${s.name}])`;case"min":return`SUBTOTAL(105,${this.table.name}[${s.name}])`;case"stdDev":return`SUBTOTAL(106,${this.table.name}[${s.name}])`;case"var":return`SUBTOTAL(107,${this.table.name}[${s.name}])`;case"sum":return`SUBTOTAL(109,${this.table.name}[${s.name}])`;case"custom":return s.totalsRowFormula;default:throw new Error("Invalid Totals Row Function: "+s.totalsRowFunction)}}get width(){return this.table.columns.length}get height(){return this.table.rows.length}get filterHeight(){return this.height+(this.table.headerRow?1:0)}get tableHeight(){return this.filterHeight+(this.table.totalsRow?1:0)}validate(){let{table:s}=this,r=(f,u,g)=>{f[u]===void 0&&(f[u]=g)};r(s,"headerRow",!0),r(s,"totalsRow",!1),r(s,"style",{}),r(s.style,"theme","TableStyleMedium2"),r(s.style,"showFirstColumn",!1),r(s.style,"showLastColumn",!1),r(s.style,"showRowStripes",!1),r(s.style,"showColumnStripes",!1);let t=(f,u)=>{if(!f)throw new Error(u)};t(s.ref,"Table must have ref"),t(s.columns,"Table must have column definitions"),t(s.rows,"Table must have row definitions"),s.tl=l.decodeAddress(s.ref);let{row:n,col:c}=s.tl;t(n>0,"Table must be on valid row"),t(c>0,"Table must be on valid col");let{width:i,filterHeight:a,tableHeight:h}=this;s.autoFilterRef=l.encode(n,c,n+a-1,c+i-1),s.tableRef=l.encode(n,c,n+h-1,c+i-1),s.columns.forEach((f,u)=>{t(f.name,`Column ${u} must have a name`),u===0?r(f,"totalsRowLabel","Total"):(r(f,"totalsRowFunction","none"),f.totalsRowFormula=this.getFormula(f))})}store(){let s=(a,h)=>{h&&Object.keys(h).forEach(f=>{a[f]=h[f]})},{worksheet:r,table:t}=this,{row:n,col:c}=t.tl,i=0;if(t.headerRow){let a=r.getRow(n+i++);t.columns.forEach((h,f)=>{let{style:u,name:g}=h,m=a.getCell(c+f);m.value=g,s(m,u)})}if(t.rows.forEach(a=>{let h=r.getRow(n+i++);a.forEach((f,u)=>{let g=h.getCell(c+u);g.value=f,s(g,t.columns[u].style)})}),t.totalsRow){let a=r.getRow(n+i++);t.columns.forEach((h,f)=>{let u=a.getCell(c+f);if(f===0)u.value=h.totalsRowLabel;else{let g=this.getFormula(h);u.value=g?{formula:h.totalsRowFormula,result:h.totalsRowResult}:null}s(u,h.style)})}}load(s){let{table:r}=this,{row:t,col:n}=r.tl,c=0;if(r.headerRow){let i=s.getRow(t+c++);r.columns.forEach((a,h)=>{i.getCell(n+h).value=a.name})}if(r.rows.forEach(i=>{let a=s.getRow(t+c++);i.forEach((h,f)=>{a.getCell(n+f).value=h})}),r.totalsRow){let i=s.getRow(t+c++);r.columns.forEach((a,h)=>{let f=i.getCell(n+h);h===0?f.value=a.totalsRowLabel:this.getFormula(a)&&(f.value={formula:a.totalsRowFormula,result:a.totalsRowResult})})}}get model(){return this.table}set model(s){this.table=s}cacheState(){this._cache||(this._cache={ref:this.ref,width:this.width,tableHeight:this.tableHeight})}commit(){if(!this._cache)return;this.validate();let s=l.decodeAddress(this._cache.ref);if(this.ref!==this._cache.ref)for(let r=0;r<this._cache.tableHeight;r++){let t=this.worksheet.getRow(s.row+r);for(let n=0;n<this._cache.width;n++)t.getCell(s.col+n).value=null}else{for(let r=this.tableHeight;r<this._cache.tableHeight;r++){let t=this.worksheet.getRow(s.row+r);for(let n=0;n<this._cache.width;n++)t.getCell(s.col+n).value=null}for(let r=0;r<this.tableHeight;r++){let t=this.worksheet.getRow(s.row+r);for(let n=this.width;n<this._cache.width;n++)t.getCell(s.col+n).value=null}}this.store()}addRow(s,r){this.cacheState(),r===void 0?this.table.rows.push(s):this.table.rows.splice(r,0,s)}removeRows(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;this.cacheState(),this.table.rows.splice(s,r)}getColumn(s){let r=this.table.columns[s];return new o(this,r,s)}addColumn(s,r,t){this.cacheState(),t===void 0?(this.table.columns.push(s),this.table.rows.forEach((n,c)=>{n.push(r[c])})):(this.table.columns.splice(t,0,s),this.table.rows.forEach((n,c)=>{n.splice(t,0,r[c])}))}removeColumns(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;this.cacheState(),this.table.columns.splice(s,r),this.table.rows.forEach(t=>{t.splice(s,r)})}_assign(s,r,t){this.cacheState(),s[r]=t}get ref(){return this.table.ref}set ref(s){this._assign(this.table,"ref",s)}get name(){return this.table.name}set name(s){this.table.name=s}get displayName(){return this.table.displyName||this.table.name}set displayNamename(s){this.table.displayName=s}get headerRow(){return this.table.headerRow}set headerRow(s){this._assign(this.table,"headerRow",s)}get totalsRow(){return this.table.totalsRow}set totalsRow(s){this._assign(this.table,"totalsRow",s)}get theme(){return this.table.style.name}set theme(s){this.table.style.name=s}get showFirstColumn(){return this.table.style.showFirstColumn}set showFirstColumn(s){this.table.style.showFirstColumn=s}get showLastColumn(){return this.table.style.showLastColumn}set showLastColumn(s){this.table.style.showLastColumn=s}get showRowStripes(){return this.table.style.showRowStripes}set showRowStripes(s){this.table.style.showRowStripes=s}get showColumnStripes(){return this.table.style.showColumnStripes}set showColumnStripes(s){this.table.style.showColumnStripes=s}}},{"../utils/col-cache":19}],13:[function(e,d,b){"use strict";let l=e("./worksheet"),o=e("./defined-names"),s=e("../xlsx/xlsx"),r=e("../csv/csv");d.exports=class{constructor(){this.category="",this.company="",this.created=new Date,this.description="",this.keywords="",this.manager="",this.modified=this.created,this.properties={},this.calcProperties={},this._worksheets=[],this.subject="",this.title="",this.views=[],this.media=[],this._definedNames=new o}get xlsx(){return this._xlsx||(this._xlsx=new s(this)),this._xlsx}get csv(){return this._csv||(this._csv=new r(this)),this._csv}get nextId(){for(let t=1;t<this._worksheets.length;t++)if(!this._worksheets[t])return t;return this._worksheets.length||1}addWorksheet(t,n){let c=this.nextId;n&&(typeof n=="string"?(console.trace('tabColor argument is now deprecated. Please use workbook.addWorksheet(name, {properties: { tabColor: { argb: "rbg value" } }'),n={properties:{tabColor:{argb:n}}}):(n.argb||n.theme||n.indexed)&&(console.trace("tabColor argument is now deprecated. Please use workbook.addWorksheet(name, {properties: { tabColor: { ... } }"),n={properties:{tabColor:n}}));let i=this._worksheets.reduce((f,u)=>(u&&u.orderNo)>f?u.orderNo:f,0),a=Object.assign({},n,{id:c,name:t,orderNo:i+1,workbook:this}),h=new l(a);return this._worksheets[c]=h,h}removeWorksheetEx(t){delete this._worksheets[t.id]}removeWorksheet(t){let n=this.getWorksheet(t);n&&n.destroy()}getWorksheet(t){return t===void 0?this._worksheets.find(Boolean):typeof t=="number"?this._worksheets[t]:typeof t=="string"?this._worksheets.find(n=>n&&n.name===t):void 0}get worksheets(){return this._worksheets.slice(1).sort((t,n)=>t.orderNo-n.orderNo).filter(Boolean)}eachSheet(t){this.worksheets.forEach(n=>{t(n,n.id)})}get definedNames(){return this._definedNames}clearThemes(){this._themes=void 0}addImage(t){let n=this.media.length;return this.media.push(Object.assign({},t,{type:"image"})),n}getImage(t){return this.media[t]}get model(){return{creator:this.creator||"Unknown",lastModifiedBy:this.lastModifiedBy||"Unknown",lastPrinted:this.lastPrinted,created:this.created,modified:this.modified,properties:this.properties,worksheets:this.worksheets.map(t=>t.model),sheets:this.worksheets.map(t=>t.model).filter(Boolean),definedNames:this._definedNames.model,views:this.views,company:this.company,manager:this.manager,title:this.title,subject:this.subject,keywords:this.keywords,category:this.category,description:this.description,language:this.language,revision:this.revision,contentStatus:this.contentStatus,themes:this._themes,media:this.media,calcProperties:this.calcProperties}}set model(t){this.creator=t.creator,this.lastModifiedBy=t.lastModifiedBy,this.lastPrinted=t.lastPrinted,this.created=t.created,this.modified=t.modified,this.company=t.company,this.manager=t.manager,this.title=t.title,this.subject=t.subject,this.keywords=t.keywords,this.category=t.category,this.description=t.description,this.language=t.language,this.revision=t.revision,this.contentStatus=t.contentStatus,this.properties=t.properties,this.calcProperties=t.calcProperties,this._worksheets=[],t.worksheets.forEach(n=>{let{id:c,name:i,state:a}=n,h=t.sheets&&t.sheets.findIndex(f=>f.id===c);(this._worksheets[c]=new l({id:c,name:i,orderNo:h,state:a,workbook:this})).model=n}),this._definedNames.model=t.definedNames,this.views=t.views,this._themes=t.themes,this.media=t.media||[]}}},{"../csv/csv":1,"../xlsx/xlsx":144,"./defined-names":6,"./worksheet":14}],14:[function(e,d,b){"use strict";let l=e("../utils/under-dash"),o=e("../utils/col-cache"),s=e("./range"),r=e("./row"),t=e("./column"),n=e("./enums"),c=e("./image"),i=e("./table"),a=e("./data-validations"),h=e("../utils/encryptor"),{copyStyle:f}=e("../utils/copy-style");d.exports=class{constructor(u){u=u||{},this._workbook=u.workbook,this.id=u.id,this.orderNo=u.orderNo,this.name=u.name,this.state=u.state||"visible",this._rows=[],this._columns=null,this._keys={},this._merges={},this.rowBreaks=[],this.properties=Object.assign({},{defaultRowHeight:15,dyDescent:55,outlineLevelCol:0,outlineLevelRow:0},u.properties),this.pageSetup=Object.assign({},{margins:{left:.7,right:.7,top:.75,bottom:.75,header:.3,footer:.3},orientation:"portrait",horizontalDpi:4294967295,verticalDpi:4294967295,fitToPage:!(!u.pageSetup||!u.pageSetup.fitToWidth&&!u.pageSetup.fitToHeight||u.pageSetup.scale),pageOrder:"downThenOver",blackAndWhite:!1,draft:!1,cellComments:"None",errors:"displayed",scale:100,fitToWidth:1,fitToHeight:1,paperSize:void 0,showRowColHeaders:!1,showGridLines:!1,firstPageNumber:void 0,horizontalCentered:!1,verticalCentered:!1,rowBreaks:null,colBreaks:null},u.pageSetup),this.headerFooter=Object.assign({},{differentFirst:!1,differentOddEven:!1,oddHeader:null,oddFooter:null,evenHeader:null,evenFooter:null,firstHeader:null,firstFooter:null},u.headerFooter),this.dataValidations=new a,this.views=u.views||[],this.autoFilter=u.autoFilter||null,this._media=[],this.sheetProtection=null,this.tables={},this.conditionalFormattings=[]}get name(){return this._name}set name(u){if(u===void 0&&(u="sheet"+this.id),this._name!==u){if(typeof u!="string")throw new Error("The name has to be a string.");if(u==="")throw new Error("The name can't be empty.");if(u==="History")throw new Error('The name "History" is protected. Please use a different name.');if(/[*?:/\\[\]]/.test(u))throw new Error(`Worksheet name ${u} cannot include any of the following characters: * ? : \\ / [ ]`);if(/(^')|('$)/.test(u))throw new Error("The first or last character of worksheet name cannot be a single quotation mark: "+u);if(u&&u.length>31&&(console.warn(`Worksheet name ${u} exceeds 31 chars. This will be truncated`),u=u.substring(0,31)),this._workbook._worksheets.find(g=>g&&g.name.toLowerCase()===u.toLowerCase()))throw new Error("Worksheet name already exists: "+u);this._name=u}}get workbook(){return this._workbook}destroy(){this._workbook.removeWorksheetEx(this)}get dimensions(){let u=new s;return this._rows.forEach(g=>{if(g){let m=g.dimensions;m&&u.expand(g.number,m.min,g.number,m.max)}}),u}get columns(){return this._columns}set columns(u){this._headerRowCount=u.reduce((v,k)=>{let B=(k.header?1:k.headers&&k.headers.length)||0;return Math.max(v,B)},0);let g=1,m=this._columns=[];u.forEach(v=>{let k=new t(this,g++,!1);m.push(k),k.defn=v})}getColumnKey(u){return this._keys[u]}setColumnKey(u,g){this._keys[u]=g}deleteColumnKey(u){delete this._keys[u]}eachColumnKey(u){l.each(this._keys,u)}getColumn(u){if(typeof u=="string"){let g=this._keys[u];if(g)return g;u=o.l2n(u)}if(this._columns||(this._columns=[]),u>this._columns.length){let g=this._columns.length+1;for(;g<=u;)this._columns.push(new t(this,g++))}return this._columns[u-1]}spliceColumns(u,g){let m=this._rows.length;for(var v=arguments.length,k=new Array(v>2?v-2:0),B=2;B<v;B++)k[B-2]=arguments[B];if(k.length>0)for(let P=0;P<m;P++){let N=[u,g];k.forEach(j=>{N.push(j[P]||null)});let q=this.getRow(P+1);q.splice.apply(q,N)}else this._rows.forEach(P=>{P&&P.splice(u,g)});let R=k.length-g,L=u+g,A=this._columns.length;if(R<0)for(let P=u+k.length;P<=A;P++)this.getColumn(P).defn=this.getColumn(P-R).defn;else if(R>0)for(let P=A;P>=L;P--)this.getColumn(P+R).defn=this.getColumn(P).defn;for(let P=u;P<u+k.length;P++)this.getColumn(P).defn=null;this.workbook.definedNames.spliceColumns(this.name,u,g,k.length)}get lastColumn(){return this.getColumn(this.columnCount)}get columnCount(){let u=0;return this.eachRow(g=>{u=Math.max(u,g.cellCount)}),u}get actualColumnCount(){let u=[],g=0;return this.eachRow(m=>{m.eachCell(v=>{let{col:k}=v;u[k]||(u[k]=!0,g++)})}),g}_commitRow(){}get _lastRowNumber(){let u=this._rows,g=u.length;for(;g>0&&u[g-1]===void 0;)g--;return g}get _nextRow(){return this._lastRowNumber+1}get lastRow(){if(this._rows.length)return this._rows[this._rows.length-1]}findRow(u){return this._rows[u-1]}findRows(u,g){return this._rows.slice(u-1,u-1+g)}get rowCount(){return this._lastRowNumber}get actualRowCount(){let u=0;return this.eachRow(()=>{u++}),u}getRow(u){let g=this._rows[u-1];return g||(g=this._rows[u-1]=new r(this,u)),g}getRows(u,g){if(g<1)return;let m=[];for(let v=u;v<u+g;v++)m.push(this.getRow(v));return m}addRow(u){let g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n",m=this._nextRow,v=this.getRow(m);return v.values=u,this._setStyleOption(m,g[0]==="i"?g:"n"),v}addRows(u){let g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n",m=[];return u.forEach(v=>{m.push(this.addRow(v,g))}),m}insertRow(u,g){let m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"n";return this.spliceRows(u,0,g),this._setStyleOption(u,m),this.getRow(u)}insertRows(u,g){let m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"n";if(this.spliceRows(u,0,...g),m!=="n")for(let v=0;v<g.length;v++)m[0]==="o"&&this.findRow(g.length+u+v)!==void 0?this._copyStyle(g.length+u+v,u+v,m[1]==="+"):m[0]==="i"&&this.findRow(u-1)!==void 0&&this._copyStyle(u-1,u+v,m[1]==="+");return this.getRows(u,g.length)}_setStyleOption(u){let g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n";g[0]==="o"&&this.findRow(u+1)!==void 0?this._copyStyle(u+1,u,g[1]==="+"):g[0]==="i"&&this.findRow(u-1)!==void 0&&this._copyStyle(u-1,u,g[1]==="+")}_copyStyle(u,g){let m=arguments.length>2&&arguments[2]!==void 0&&arguments[2],v=this.getRow(u),k=this.getRow(g);k.style=f(v.style),v.eachCell({includeEmpty:m},(B,R)=>{k.getCell(R).style=f(B.style)}),k.height=v.height}duplicateRow(u,g){let m=arguments.length>2&&arguments[2]!==void 0&&arguments[2],v=this._rows[u-1],k=new Array(g).fill(v.values);this.spliceRows(u+1,m?0:g,...k);for(let B=0;B<g;B++){let R=this._rows[u+B];R.style=v.style,R.height=v.height,v.eachCell({includeEmpty:!0},(L,A)=>{R.getCell(A).style=L.style})}}spliceRows(u,g){let m=u+g;for(var v=arguments.length,k=new Array(v>2?v-2:0),B=2;B<v;B++)k[B-2]=arguments[B];let R=k.length,L=R-g,A=this._rows.length,P,N;if(L<0)for(u===A&&(this._rows[A-1]=void 0),P=m;P<=A;P++)if(N=this._rows[P-1],N){let q=this.getRow(P+L);q.values=N.values,q.style=N.style,q.height=N.height,N.eachCell({includeEmpty:!0},(j,S)=>{q.getCell(S).style=j.style}),this._rows[P-1]=void 0}else this._rows[P+L-1]=void 0;else if(L>0)for(P=A;P>=m;P--)if(N=this._rows[P-1],N){let q=this.getRow(P+L);q.values=N.values,q.style=N.style,q.height=N.height,N.eachCell({includeEmpty:!0},(j,S)=>{if(q.getCell(S).style=j.style,j._value.constructor.name==="MergeValue"){let T=this.getRow(j._row._number+R).getCell(S),D=j._value._master,p=this.getRow(D._row._number+R).getCell(D._column._number);T.merge(p)}})}else this._rows[P+L-1]=void 0;for(P=0;P<R;P++){let q=this.getRow(u+P);q.style={},q.values=k[P]}this.workbook.definedNames.spliceRows(this.name,u,g,R)}eachRow(u,g){if(g||(g=u,u=void 0),u&&u.includeEmpty){let m=this._rows.length;for(let v=1;v<=m;v++)g(this.getRow(v),v)}else this._rows.forEach(m=>{m&&m.hasValues&&g(m,m.number)})}getSheetValues(){let u=[];return this._rows.forEach(g=>{g&&(u[g.number]=g.values)}),u}findCell(u,g){let m=o.getAddress(u,g),v=this._rows[m.row-1];return v?v.findCell(m.col):void 0}getCell(u,g){let m=o.getAddress(u,g);return this.getRow(m.row).getCellEx(m)}mergeCells(){for(var u=arguments.length,g=new Array(u),m=0;m<u;m++)g[m]=arguments[m];let v=new s(g);this._mergeCellsInternal(v)}mergeCellsWithoutStyle(){for(var u=arguments.length,g=new Array(u),m=0;m<u;m++)g[m]=arguments[m];let v=new s(g);this._mergeCellsInternal(v,!0)}_mergeCellsInternal(u,g){l.each(this._merges,v=>{if(v.intersects(u))throw new Error("Cannot merge already merged cells")});let m=this.getCell(u.top,u.left);for(let v=u.top;v<=u.bottom;v++)for(let k=u.left;k<=u.right;k++)(v>u.top||k>u.left)&&this.getCell(v,k).merge(m,g);this._merges[m.address]=u}_unMergeMaster(u){let g=this._merges[u.address];if(g){for(let m=g.top;m<=g.bottom;m++)for(let v=g.left;v<=g.right;v++)this.getCell(m,v).unmerge();delete this._merges[u.address]}}get hasMerges(){return l.some(this._merges,Boolean)}unMergeCells(){for(var u=arguments.length,g=new Array(u),m=0;m<u;m++)g[m]=arguments[m];let v=new s(g);for(let k=v.top;k<=v.bottom;k++)for(let B=v.left;B<=v.right;B++){let R=this.findCell(k,B);R&&(R.type===n.ValueType.Merge?this._unMergeMaster(R.master):this._merges[R.address]&&this._unMergeMaster(R))}}fillFormula(u,g,m){let v=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"shared",k=o.decode(u),{top:B,left:R,bottom:L,right:A}=k,P=A-R+1,N=o.encodeAddress(B,R),q=v==="shared",j;j=typeof m=="function"?m:Array.isArray(m)?Array.isArray(m[0])?(T,D)=>m[T-B][D-R]:(T,D)=>m[(T-B)*P+(D-R)]:()=>{};let S=!0;for(let T=B;T<=L;T++)for(let D=R;D<=A;D++)S?(this.getCell(T,D).value={shareType:v,formula:g,ref:u,result:j(T,D)},S=!1):this.getCell(T,D).value=q?{sharedFormula:N,result:j(T,D)}:j(T,D)}addImage(u,g){let m={type:"image",imageId:u,range:g};this._media.push(new c(this,m))}getImages(){return this._media.filter(u=>u.type==="image")}addBackgroundImage(u){let g={type:"background",imageId:u};this._media.push(new c(this,g))}getBackgroundImageId(){let u=this._media.find(g=>g.type==="background");return u&&u.imageId}protect(u,g){return new Promise(m=>{this.sheetProtection={sheet:!0},g&&"spinCount"in g&&(g.spinCount=Number.isFinite(g.spinCount)?Math.round(Math.max(0,g.spinCount)):1e5),u&&(this.sheetProtection.algorithmName="SHA-512",this.sheetProtection.saltValue=h.randomBytes(16).toString("base64"),this.sheetProtection.spinCount=g&&"spinCount"in g?g.spinCount:1e5,this.sheetProtection.hashValue=h.convertPasswordToHash(u,"SHA512",this.sheetProtection.saltValue,this.sheetProtection.spinCount)),g&&(this.sheetProtection=Object.assign(this.sheetProtection,g),!u&&"spinCount"in g&&delete this.sheetProtection.spinCount),m()})}unprotect(){this.sheetProtection=null}addTable(u){let g=new i(this,u);return this.tables[u.name]=g,g}getTable(u){return this.tables[u]}removeTable(u){delete this.tables[u]}getTables(){return Object.values(this.tables)}addConditionalFormatting(u){this.conditionalFormattings.push(u)}removeConditionalFormatting(u){typeof u=="number"?this.conditionalFormattings.splice(u,1):this.conditionalFormattings=u instanceof Function?this.conditionalFormattings.filter(u):[]}get tabColor(){return console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor}set tabColor(u){console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor=u}get model(){let u={id:this.id,name:this.name,dataValidations:this.dataValidations.model,properties:this.properties,state:this.state,pageSetup:this.pageSetup,headerFooter:this.headerFooter,rowBreaks:this.rowBreaks,views:this.views,autoFilter:this.autoFilter,media:this._media.map(v=>v.model),sheetProtection:this.sheetProtection,tables:Object.values(this.tables).map(v=>v.model),conditionalFormattings:this.conditionalFormattings};u.cols=t.toModel(this.columns);let g=u.rows=[],m=u.dimensions=new s;return this._rows.forEach(v=>{let k=v&&v.model;k&&(m.expand(k.number,k.min,k.number,k.max),g.push(k))}),u.merges=[],l.each(this._merges,v=>{u.merges.push(v.range)}),u}_parseRows(u){this._rows=[],u.rows.forEach(g=>{let m=new r(this,g.number);this._rows[m.number-1]=m,m.model=g})}_parseMergeCells(u){l.each(u.mergeCells,g=>{this.mergeCellsWithoutStyle(g)})}set model(u){this.name=u.name,this._columns=t.fromModel(this,u.cols),this._parseRows(u),this._parseMergeCells(u),this.dataValidations=new a(u.dataValidations),this.properties=u.properties,this.pageSetup=u.pageSetup,this.headerFooter=u.headerFooter,this.views=u.views,this.autoFilter=u.autoFilter,this._media=u.media.map(g=>new c(this,g)),this.sheetProtection=u.sheetProtection,this.tables=u.tables.reduce((g,m)=>{let v=new i;return v.model=m,g[m.name]=v,g},{}),this.conditionalFormattings=u.conditionalFormattings}}},{"../utils/col-cache":19,"../utils/copy-style":20,"../utils/encryptor":21,"../utils/under-dash":26,"./column":4,"./data-validations":5,"./enums":7,"./image":8,"./range":10,"./row":11,"./table":12}],15:[function(e,d,b){"use strict";e("core-js/modules/es.promise"),e("core-js/modules/es.promise.finally"),e("core-js/modules/es.object.assign"),e("core-js/modules/es.object.keys"),e("core-js/modules/es.object.values"),e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.async-iterator"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.includes"),e("core-js/modules/es.array.find-index"),e("core-js/modules/es.array.find"),e("core-js/modules/es.string.from-code-point"),e("core-js/modules/es.string.includes"),e("core-js/modules/es.number.is-nan"),e("regenerator-runtime/runtime");let l={Workbook:e("./doc/workbook")},o=e("./doc/enums");Object.keys(o).forEach(s=>{l[s]=o[s]}),d.exports=l},{"./doc/enums":7,"./doc/workbook":13,"core-js/modules/es.array.find":359,"core-js/modules/es.array.find-index":358,"core-js/modules/es.array.includes":360,"core-js/modules/es.array.iterator":361,"core-js/modules/es.number.is-nan":363,"core-js/modules/es.object.assign":364,"core-js/modules/es.object.keys":366,"core-js/modules/es.object.values":367,"core-js/modules/es.promise":372,"core-js/modules/es.promise.finally":371,"core-js/modules/es.string.from-code-point":376,"core-js/modules/es.string.includes":377,"core-js/modules/es.symbol":381,"core-js/modules/es.symbol.async-iterator":378,"regenerator-runtime/runtime":492}],16:[function(e,d,b){"use strict";let l=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");b.bufferToString=function(o){return typeof o=="string"?o:l?l.decode(o):o.toString()}},{}],17:[function(e,d,b){"use strict";let l=typeof TextEncoder>"u"?null:new TextEncoder("utf-8"),{Buffer:o}=e("buffer");b.stringToBuffer=function(s){return typeof s!="string"?s:l?o.from(l.encode(s).buffer):o.from(s)}},{buffer:220}],18:[function(e,d,b){"use strict";let l=e("./under-dash"),o=e("./col-cache");d.exports=class{constructor(s){this.template=s,this.sheets={}}addCell(s){this.addCellEx(o.decodeEx(s))}getCell(s){return this.findCellEx(o.decodeEx(s),!0)}findCell(s){return this.findCellEx(o.decodeEx(s),!1)}findCellAt(s,r,t){let n=this.sheets[s],c=n&&n[r];return c&&c[t]}addCellEx(s){if(s.top)for(let r=s.top;r<=s.bottom;r++)for(let t=s.left;t<=s.right;t++)this.getCellAt(s.sheetName,r,t);else this.findCellEx(s,!0)}getCellEx(s){return this.findCellEx(s,!0)}findCellEx(s,r){let t=this.findSheet(s,r),n=this.findSheetRow(t,s,r);return this.findRowCell(n,s,r)}getCellAt(s,r,t){let n=this.sheets[s]||(this.sheets[s]=[]),c=n[r]||(n[r]=[]);return c[t]||(c[t]={sheetName:s,address:o.n2l(t)+r,row:r,col:t})}removeCellEx(s){let r=this.findSheet(s);if(!r)return;let t=this.findSheetRow(r,s);t&&delete t[s.col]}forEachInSheet(s,r){let t=this.sheets[s];t&&t.forEach((n,c)=>{n&&n.forEach((i,a)=>{i&&r(i,c,a)})})}forEach(s){l.each(this.sheets,(r,t)=>{this.forEachInSheet(t,s)})}map(s){let r=[];return this.forEach(t=>{r.push(s(t))}),r}findSheet(s,r){let t=s.sheetName;return this.sheets[t]?this.sheets[t]:r?this.sheets[t]=[]:void 0}findSheetRow(s,r,t){let{row:n}=r;return s&&s[n]?s[n]:t?s[n]=[]:void 0}findRowCell(s,r,t){let{col:n}=r;return s&&s[n]?s[n]:t?s[n]=this.template?Object.assign(r,JSON.parse(JSON.stringify(this.template))):r:void 0}spliceRows(s,r,t,n){let c=this.sheets[s];if(c){let i=[];for(let a=0;a<n;a++)i.push([]);c.splice(r,t,...i)}}spliceColumns(s,r,t,n){let c=this.sheets[s];if(c){let i=[];for(let a=0;a<n;a++)i.push(null);l.each(c,a=>{a.splice(r,t,...i)})}}}},{"./col-cache":19,"./under-dash":26}],19:[function(e,d,b){"use strict";let l=/^[A-Z]+\d+$/,o={_dictionary:["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],_l2nFill:0,_l2n:{},_n2l:[],_level:s=>s<=26?1:s<=676?2:3,_fill(s){let r,t,n,c,i,a=1;if(s>=4)throw new Error("Out of bounds. Excel supports columns from 1 to 16384");if(this._l2nFill<1&&s>=1){for(;a<=26;)r=this._dictionary[a-1],this._n2l[a]=r,this._l2n[r]=a,a++;this._l2nFill=1}if(this._l2nFill<2&&s>=2){for(a=27;a<=702;)t=a-27,n=t%26,c=Math.floor(t/26),r=this._dictionary[c]+this._dictionary[n],this._n2l[a]=r,this._l2n[r]=a,a++;this._l2nFill=2}if(this._l2nFill<3&&s>=3){for(a=703;a<=16384;)t=a-703,n=t%26,c=Math.floor(t/26)%26,i=Math.floor(t/676),r=this._dictionary[i]+this._dictionary[c]+this._dictionary[n],this._n2l[a]=r,this._l2n[r]=a,a++;this._l2nFill=3}},l2n(s){if(this._l2n[s]||this._fill(s.length),!this._l2n[s])throw new Error("Out of bounds. Invalid column letter: "+s);return this._l2n[s]},n2l(s){if(s<1||s>16384)throw new Error(s+" is out of bounds. Excel supports columns from 1 to 16384");return this._n2l[s]||this._fill(this._level(s)),this._n2l[s]},_hash:{},validateAddress(s){if(!l.test(s))throw new Error("Invalid Address: "+s);return!0},decodeAddress(s){let r=s.length<5&&this._hash[s];if(r)return r;let t=!1,n="",c=0,i=!1,a="",h=0;for(let u,g=0;g<s.length;g++)if(u=s.charCodeAt(g),!i&&u>=65&&u<=90)t=!0,n+=s[g],c=26*c+u-64;else if(u>=48&&u<=57)i=!0,a+=s[g],h=10*h+u-48;else if(i&&t&&u!==36)break;if(t){if(c>16384)throw new Error("Out of bounds. Invalid column letter: "+n)}else c=void 0;i||(h=void 0);let f={address:s=n+a,col:c,row:h,$col$row:`$${n}$${a}`};return c<=100&&h<=100&&(this._hash[s]=f,this._hash[f.$col$row]=f),f},getAddress(s,r){if(r){let t=this.n2l(r)+s;return this.decodeAddress(t)}return this.decodeAddress(s)},decode(s){let r=s.split(":");if(r.length===2){let t=this.decodeAddress(r[0]),n=this.decodeAddress(r[1]),c={top:Math.min(t.row,n.row),left:Math.min(t.col,n.col),bottom:Math.max(t.row,n.row),right:Math.max(t.col,n.col)};return c.tl=this.n2l(c.left)+c.top,c.br=this.n2l(c.right)+c.bottom,c.dimensions=`${c.tl}:${c.br}`,c}return this.decodeAddress(s)},decodeEx(s){let r=s.match(/(?:(?:(?:'((?:[^']|'')*)')|([^'^ !]*))!)?(.*)/),t=r[1]||r[2],n=r[3],c=n.split(":");if(c.length>1){let a=this.decodeAddress(c[0]),h=this.decodeAddress(c[1]),f=Math.min(a.row,h.row),u=Math.min(a.col,h.col),g=Math.max(a.row,h.row),m=Math.max(a.col,h.col);return a=this.n2l(u)+f,h=this.n2l(m)+g,{top:f,left:u,bottom:g,right:m,sheetName:t,tl:{address:a,col:u,row:f,$col$row:`$${this.n2l(u)}$${f}`,sheetName:t},br:{address:h,col:m,row:g,$col$row:`$${this.n2l(m)}$${g}`,sheetName:t},dimensions:`${a}:${h}`}}if(n.startsWith("#"))return t?{sheetName:t,error:n}:{error:n};let i=this.decodeAddress(n);return t?{sheetName:t,...i}:i},encodeAddress:(s,r)=>o.n2l(r)+s,encode(){switch(arguments.length){case 2:return o.encodeAddress(arguments[0],arguments[1]);case 4:return`${o.encodeAddress(arguments[0],arguments[1])}:${o.encodeAddress(arguments[2],arguments[3])}`;default:throw new Error("Can only encode with 2 or 4 arguments")}},inRange(s,r){let[t,n,,c,i]=s,[a,h]=r;return a>=t&&a<=c&&h>=n&&h<=i}};d.exports=o},{}],20:[function(e,d,b){"use strict";let l=(s,r)=>({...s,...r.reduce((t,n)=>(s[n]&&(t[n]={...s[n]}),t),{})}),o=function(s,r,t){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:[];s[t]&&(r[t]=l(s[t],n))};b.copyStyle=s=>{if(!s)return s;if(r=s,Object.keys(r).length===0)return{};var r;let t={...s};return o(s,t,"font",["color"]),o(s,t,"alignment"),o(s,t,"protection"),s.border&&(o(s,t,"border"),o(s.border,t.border,"top",["color"]),o(s.border,t.border,"left",["color"]),o(s.border,t.border,"bottom",["color"]),o(s.border,t.border,"right",["color"]),o(s.border,t.border,"diagonal",["color"])),s.fill&&(o(s,t,"fill",["fgColor","bgColor","center"]),s.fill.stops&&(t.fill.stops=s.fill.stops.map(n=>l(n,["color"])))),t}},{}],21:[function(e,d,b){(function(l){(function(){"use strict";let o=e("crypto"),s={hash(r){let t=o.createHash(r);for(var n=arguments.length,c=new Array(n>1?n-1:0),i=1;i<n;i++)c[i-1]=arguments[i];return t.update(l.concat(c)),t.digest()},convertPasswordToHash(r,t,n,c){if(t=t.toLowerCase(),o.getHashes().indexOf(t)<0)throw new Error(`Hash algorithm '${t}' not supported!`);let i=l.from(r,"utf16le"),a=this.hash(t,l.from(n,"base64"),i);for(let h=0;h<c;h++){let f=l.alloc(4);f.writeUInt32LE(h,0),a=this.hash(t,a,f)}return a.toString("base64")},randomBytes:r=>o.randomBytes(r)};d.exports=s}).call(this)}).call(this,e("buffer").Buffer)},{buffer:220,crypto:390}],22:[function(e,d,b){"use strict";let{SaxesParser:l}=e("saxes"),{PassThrough:o}=e("readable-stream"),{bufferToString:s}=e("./browser-buffer-decode");d.exports=async function*(r){r.pipe&&!r[Symbol.asyncIterator]&&(r=r.pipe(new o));let t=new l,n;t.on("error",i=>{n=i});let c=[];t.on("opentag",i=>c.push({eventType:"opentag",value:i})),t.on("text",i=>c.push({eventType:"text",value:i})),t.on("closetag",i=>c.push({eventType:"closetag",value:i}));for await(let i of r){if(t.write(s(i)),n)throw n;yield c,c=[]}}},{"./browser-buffer-decode":16,"readable-stream":491,saxes:496}],23:[function(e,d,b){"use strict";let l=e("./col-cache"),o=/(([a-z_\-0-9]*)!)?([a-z0-9_$]{2,})([(])?/gi,s=/^([$])?([a-z]+)([$])?([1-9][0-9]*)$/i;d.exports={slideFormula:function(r,t,n){let c=l.decode(t),i=l.decode(n);return r.replace(o,(a,h,f,u,g)=>{if(g)return a;let m=s.exec(u);if(m){let v=m[1],k=m[2].toUpperCase(),B=m[3],R=m[4];if(k.length>3||k.length===3&&k>"XFD")return a;let L=l.l2n(k),A=parseInt(R,10);return v||(L+=i.col-c.col),B||(A+=i.row-c.row),(h||"")+(v||"")+l.n2l(L)+(B||"")+A}return a})}}},{"./col-cache":19}],24:[function(e,d,b){(function(l,o){(function(){"use strict";let s=e("readable-stream"),r=e("./utils"),t=e("./string-buf");class n{constructor(u,g){this._data=u,this._encoding=g}get length(){return this.toBuffer().length}copy(u,g,m,v){return this.toBuffer().copy(u,g,m,v)}toBuffer(){return this._buffer||(this._buffer=o.from(this._data,this._encoding)),this._buffer}}class c{constructor(u){this._data=u}get length(){return this._data.length}copy(u,g,m,v){return this._data._buf.copy(u,g,m,v)}toBuffer(){return this._data.toBuffer()}}class i{constructor(u){this._data=u}get length(){return this._data.length}copy(u,g,m,v){this._data.copy(u,g,m,v)}toBuffer(){return this._data}}class a{constructor(u){this.size=u,this.buffer=o.alloc(u),this.iRead=0,this.iWrite=0}toBuffer(){if(this.iRead===0&&this.iWrite===this.size)return this.buffer;let u=o.alloc(this.iWrite-this.iRead);return this.buffer.copy(u,0,this.iRead,this.iWrite),u}get length(){return this.iWrite-this.iRead}get eod(){return this.iRead===this.iWrite}get full(){return this.iWrite===this.size}read(u){let g;return u===0?null:u===void 0||u>=this.length?(g=this.toBuffer(),this.iRead=this.iWrite,g):(g=o.alloc(u),this.buffer.copy(g,0,this.iRead,u),this.iRead+=u,g)}write(u,g,m){let v=Math.min(m,this.size-this.iWrite);return u.copy(this.buffer,this.iWrite,g,g+v),this.iWrite+=v,v}}let h=function(f){f=f||{},this.bufSize=f.bufSize||1048576,this.buffers=[],this.batch=f.batch||!1,this.corked=!1,this.inPos=0,this.outPos=0,this.pipes=[],this.paused=!1,this.encoding=null};r.inherits(h,s.Duplex,{toBuffer(){switch(this.buffers.length){case 0:return null;case 1:return this.buffers[0].toBuffer();default:return o.concat(this.buffers.map(f=>f.toBuffer()))}},_getWritableBuffer(){if(this.buffers.length){let u=this.buffers[this.buffers.length-1];if(!u.full)return u}let f=new a(this.bufSize);return this.buffers.push(f),f},async _pipe(f){await Promise.all(this.pipes.map((function(u){return new Promise(g=>{u.write(f.toBuffer(),()=>{g()})})})))},_writeToBuffers(f){let u=0,g=f.length;for(;u<g;)u+=this._getWritableBuffer().write(f,u,g-u)},async write(f,u,g){let m;if(u instanceof Function&&(g=u,u="utf8"),g=g||r.nop,f instanceof t)m=new c(f);else if(f instanceof o)m=new i(f);else{if(!(typeof f=="string"||f instanceof String||f instanceof ArrayBuffer))throw new Error("Chunk must be one of type String, Buffer or StringBuf.");m=new n(f,u)}if(this.pipes.length)if(this.batch)for(this._writeToBuffers(m);!this.corked&&this.buffers.length>1;)this._pipe(this.buffers.shift());else this.corked?(this._writeToBuffers(m),l.nextTick(g)):(await this._pipe(m),g());else this.paused||this.emit("data",m.toBuffer()),this._writeToBuffers(m),this.emit("readable");return!0},cork(){this.corked=!0},_flush(){if(this.pipes.length)for(;this.buffers.length;)this._pipe(this.buffers.shift())},uncork(){this.corked=!1,this._flush()},end(f,u,g){let m=v=>{v?g(v):(this._flush(),this.pipes.forEach(k=>{k.end()}),this.emit("finish"))};f?this.write(f,u,m):m()},read(f){let u;if(f){for(u=[];f&&this.buffers.length&&!this.buffers[0].eod;){let g=this.buffers[0],m=g.read(f);f-=m.length,u.push(m),g.eod&&g.full&&this.buffers.shift()}return o.concat(u)}return u=this.buffers.map(g=>g.toBuffer()).filter(Boolean),this.buffers=[],o.concat(u)},setEncoding(f){this.encoding=f},pause(){this.paused=!0},resume(){this.paused=!1},isPaused(){return!!this.paused},pipe(f){this.pipes.push(f),!this.paused&&this.buffers.length&&this.end()},unpipe(f){this.pipes=this.pipes.filter(u=>u!==f)},unshift(){throw new Error("Not Implemented")},wrap(){throw new Error("Not Implemented")}}),d.exports=h}).call(this)}).call(this,e("_process"),e("buffer").Buffer)},{"./string-buf":25,"./utils":27,_process:467,buffer:220,"readable-stream":491}],25:[function(e,d,b){(function(l){(function(){"use strict";d.exports=class{constructor(o){this._buf=l.alloc(o&&o.size||16384),this._encoding=o&&o.encoding||"utf8",this._inPos=0,this._buffer=void 0}get length(){return this._inPos}get capacity(){return this._buf.length}get buffer(){return this._buf}toBuffer(){return this._buffer||(this._buffer=l.alloc(this.length),this._buf.copy(this._buffer,0,0,this.length)),this._buffer}reset(o){o=o||0,this._buffer=void 0,this._inPos=o}_grow(o){let s=2*this._buf.length;for(;s<o;)s*=2;let r=l.alloc(s);this._buf.copy(r,0),this._buf=r}addText(o){this._buffer=void 0;let s=this._inPos+this._buf.write(o,this._inPos,this._encoding);for(;s>=this._buf.length-4;)this._grow(this._inPos+o.length),s=this._inPos+this._buf.write(o,this._inPos,this._encoding);this._inPos=s}addStringBuf(o){o.length&&(this._buffer=void 0,this.length+o.length>this.capacity&&this._grow(this.length+o.length),o._buf.copy(this._buf,this._inPos,0,o.length),this._inPos+=o.length)}}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:220}],26:[function(e,d,b){"use strict";let{toString:l}=Object.prototype,o=/["&<>]/,s={each:function(r,t){r&&(Array.isArray(r)?r.forEach(t):Object.keys(r).forEach(n=>{t(r[n],n)}))},some:function(r,t){return!!r&&(Array.isArray(r)?r.some(t):Object.keys(r).some(n=>t(r[n],n)))},every:function(r,t){return!r||(Array.isArray(r)?r.every(t):Object.keys(r).every(n=>t(r[n],n)))},map:function(r,t){return r?Array.isArray(r)?r.map(t):Object.keys(r).map(n=>t(r[n],n)):[]},keyBy:(r,t)=>r.reduce((n,c)=>(n[c[t]]=c,n),{}),isEqual:function(r,t){let n=typeof r,c=typeof t,i=Array.isArray(r),a=Array.isArray(t),h;if(n!==c)return!1;switch(typeof r){case"object":if(i||a)return!(!i||!a)&&r.length===t.length&&r.every((f,u)=>{let g=t[u];return s.isEqual(f,g)});if(r===null||t===null)return r===t;if(h=Object.keys(r),Object.keys(t).length!==h.length)return!1;for(let f of h)if(!t.hasOwnProperty(f))return!1;return s.every(r,(f,u)=>{let g=t[u];return s.isEqual(f,g)});default:return r===t}},escapeHtml(r){let t=o.exec(r);if(!t)return r;let n="",c="",i=0,a=t.index;for(;a<r.length;a++){switch(r.charAt(a)){case'"':c="&quot;";break;case"&":c="&amp;";break;case"'":c="&apos;";break;case"<":c="&lt;";break;case">":c="&gt;";break;default:continue}i!==a&&(n+=r.substring(i,a)),i=a+1,n+=c}return i!==a?n+r.substring(i,a):n},strcmp:(r,t)=>r<t?-1:r>t?1:0,isUndefined:r=>l.call(r)==="[object Undefined]",isObject:r=>l.call(r)==="[object Object]",deepMerge(){let r=arguments[0]||{},{length:t}=arguments,n,c,i;function a(h,f){n=r[f],i=Array.isArray(h),s.isObject(h)||i?(i?(i=!1,c=n&&Array.isArray(n)?n:[]):c=n&&s.isObject(n)?n:{},r[f]=s.deepMerge(c,h)):s.isUndefined(h)||(r[f]=h)}for(let h=0;h<t;h++)s.each(arguments[h],a);return r}};d.exports=s},{}],27:[function(e,d,b){(function(l,o){(function(){"use strict";let s=e("fs"),r=/[<>&'"\x7F\x00-\x08\x0B-\x0C\x0E-\x1F]/,t={nop(){},promiseImmediate:n=>new Promise(c=>{l.setImmediate?o(()=>{c(n)}):setTimeout(()=>{c(n)},1)}),inherits:function(n,c,i,a){n.super_=c,a||(a=i,i=null),i&&Object.keys(i).forEach(f=>{Object.defineProperty(n,f,Object.getOwnPropertyDescriptor(i,f))});let h={constructor:{value:n,enumerable:!1,writable:!1,configurable:!0}};a&&Object.keys(a).forEach(f=>{h[f]=Object.getOwnPropertyDescriptor(a,f)}),n.prototype=Object.create(c.prototype,h)},dateToExcel:(n,c)=>25569+n.getTime()/864e5-(c?1462:0),excelToDate(n,c){let i=Math.round(24*(n-25569+(c?1462:0))*3600*1e3);return new Date(i)},parsePath(n){let c=n.lastIndexOf("/");return{path:n.substring(0,c),name:n.substring(c+1)}},getRelsPath(n){let c=t.parsePath(n);return`${c.path}/_rels/${c.name}.rels`},xmlEncode(n){let c=r.exec(n);if(!c)return n;let i="",a="",h=0,f=c.index;for(;f<n.length;f++){let u=n.charCodeAt(f);switch(u){case 34:a="&quot;";break;case 38:a="&amp;";break;case 39:a="&apos;";break;case 60:a="&lt;";break;case 62:a="&gt;";break;case 127:a="";break;default:if(u<=31&&(u<=8||u>=11&&u!==13)){a="";break}continue}h!==f&&(i+=n.substring(h,f)),h=f+1,a&&(i+=a)}return h!==f?i+n.substring(h,f):i},xmlDecode:n=>n.replace(/&([a-z]*);/g,c=>{switch(c){case"&lt;":return"<";case"&gt;":return">";case"&amp;":return"&";case"&apos;":return"'";case"&quot;":return'"';default:return c}}),validInt(n){let c=parseInt(n,10);return Number.isNaN(c)?0:c},isDateFmt(n){return n?(n=(n=n.replace(/\[[^\]]*]/g,"")).replace(/"[^"]*"/g,"")).match(/[ymdhMsb]+/)!==null:!1},fs:{exists:n=>new Promise(c=>{s.access(n,s.constants.F_OK,i=>{c(!i)})})},toIsoDateString:n=>n.toIsoString().subsstr(0,10),parseBoolean:n=>n===!0||n==="true"||n===1||n==="1"};d.exports=t}).call(this)}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{},e("timers").setImmediate)},{fs:216,timers:523}],28:[function(e,d,b){"use strict";let l=e("./under-dash"),o=e("./utils");function s(n,c,i){n.push(` ${c}="${o.xmlEncode(i.toString())}"`)}function r(n,c){if(c){let i=[];l.each(c,(a,h)=>{a!==void 0&&s(i,h,a)}),n.push(i.join(""))}}class t{constructor(){this._xml=[],this._stack=[],this._rollbacks=[]}get tos(){return this._stack.length?this._stack[this._stack.length-1]:void 0}get cursor(){return this._xml.length}openXml(c){let i=this._xml;i.push("<?xml"),r(i,c),i.push(`?>
1
+ var kg=Object.create;var Xf=Object.defineProperty;var Sg=Object.getOwnPropertyDescriptor;var Tg=Object.getOwnPropertyNames;var Cg=Object.getPrototypeOf,Bg=Object.prototype.hasOwnProperty;var _s=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(d,b)=>(typeof require<"u"?require:d)[b]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var Ig=(e,d)=>()=>(d||e((d={exports:{}}).exports,d),d.exports);var Eg=(e,d,b,l)=>{if(d&&typeof d=="object"||typeof d=="function")for(let o of Tg(d))!Bg.call(e,o)&&o!==b&&Xf(e,o,{get:()=>d[o],enumerable:!(l=Sg(d,o))||l.enumerable});return e};var Mg=(e,d,b)=>(b=e!=null?kg(Cg(e)):{},Eg(d||!e||!e.__esModule?Xf(b,"default",{value:e,enumerable:!0}):b,e));var _g=Ig((wg,Kf)=>{(function(e){typeof wg=="object"&&typeof Kf<"u"?Kf.exports=e():typeof define=="function"&&define.amd?define([],e):(typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this).ExcelJS=e()})((function(){return(function e(d,b,l){function o(t,n){if(!b[t]){if(!d[t]){var c=typeof _s=="function"&&_s;if(!n&&c)return c(t,!0);if(s)return s(t,!0);var i=new Error("Cannot find module '"+t+"'");throw i.code="MODULE_NOT_FOUND",i}var a=b[t]={exports:{}};d[t][0].call(a.exports,(function(h){return o(d[t][1][h]||h)}),a,a.exports,e,d,b,l)}return b[t].exports}for(var s=typeof _s=="function"&&_s,r=0;r<l.length;r++)o(l[r]);return o})({1:[function(e,d,b){"use strict";let l=e("fs"),o=e("fast-csv"),s=e("dayjs/plugin/customParseFormat"),r=e("dayjs/plugin/utc"),t=e("dayjs").extend(s).extend(r),n=e("../utils/stream-buf"),{fs:{exists:c}}=e("../utils/utils"),i={true:!0,false:!1,"#N/A":{error:"#N/A"},"#REF!":{error:"#REF!"},"#NAME?":{error:"#NAME?"},"#DIV/0!":{error:"#DIV/0!"},"#NULL!":{error:"#NULL!"},"#VALUE!":{error:"#VALUE!"},"#NUM!":{error:"#NUM!"}};d.exports=class{constructor(a){this.workbook=a,this.worksheet=null}async readFile(a,h){if(h=h||{},!await c(a))throw new Error("File not found: "+a);let f=l.createReadStream(a),u=await this.read(f,h);return f.close(),u}read(a,h){return h=h||{},new Promise((f,u)=>{let g=this.workbook.addWorksheet(h.sheetName),m=h.dateFormats||["YYYY-MM-DD[T]HH:mm:ssZ","YYYY-MM-DD[T]HH:mm:ss","MM-DD-YYYY","YYYY-MM-DD"],v=h.map||function(B){if(B==="")return null;let R=Number(B);if(!Number.isNaN(R)&&R!==1/0)return R;let L=m.reduce((P,N)=>{if(P)return P;let q=t(B,N,!0);return q.isValid()?q:null},null);if(L)return new Date(L.valueOf());let A=i[B];return A!==void 0?A:B},k=o.parse(h.parserOptions).on("data",B=>{g.addRow(B.map(v))}).on("end",()=>{k.emit("worksheet",g)});k.on("worksheet",f).on("error",u),a.pipe(k)})}createInputStream(){throw new Error("`CSV#createInputStream` is deprecated. You should use `CSV#read` instead. This method will be removed in version 5.0. Please follow upgrade instruction: https://github.com/exceljs/exceljs/blob/master/UPGRADE-4.0.md")}write(a,h){return new Promise((f,u)=>{h=h||{};let g=this.workbook.getWorksheet(h.sheetName||h.sheetId),m=o.format(h.formatterOptions);a.on("finish",()=>{f()}),m.on("error",u),m.pipe(a);let{dateFormat:v,dateUTC:k}=h,B=h.map||(A=>{if(A){if(A.text||A.hyperlink)return A.hyperlink||A.text||"";if(A.formula||A.result)return A.result||"";if(A instanceof Date)return v?k?t.utc(A).format(v):t(A).format(v):k?t.utc(A).format():t(A).format();if(A.error)return A.error;if(typeof A=="object")return JSON.stringify(A)}return A}),R=h.includeEmptyRows===void 0||h.includeEmptyRows,L=1;g&&g.eachRow((A,P)=>{if(R)for(;L++<P-1;)m.write([]);let{values:N}=A;N.shift(),m.write(N.map(B)),L=P}),m.end()})}writeFile(a,h){let f={encoding:(h=h||{}).encoding||"utf8"},u=l.createWriteStream(a,f);return this.write(u,h)}async writeBuffer(a){let h=new n;return await this.write(h,a),h.read()}}},{"../utils/stream-buf":24,"../utils/utils":27,dayjs:391,"dayjs/plugin/customParseFormat":392,"dayjs/plugin/utc":393,"fast-csv":424,fs:216}],2:[function(e,d,b){"use strict";let l=e("../utils/col-cache");class o{constructor(r,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;if(this.worksheet=r,t)if(typeof t=="string"){let c=l.decodeAddress(t);this.nativeCol=c.col+n,this.nativeColOff=0,this.nativeRow=c.row+n,this.nativeRowOff=0}else t.nativeCol!==void 0?(this.nativeCol=t.nativeCol||0,this.nativeColOff=t.nativeColOff||0,this.nativeRow=t.nativeRow||0,this.nativeRowOff=t.nativeRowOff||0):t.col!==void 0?(this.col=t.col+n,this.row=t.row+n):(this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0);else this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0}static asInstance(r){return r instanceof o||r==null?r:new o(r)}get col(){return this.nativeCol+Math.min(this.colWidth-1,this.nativeColOff)/this.colWidth}set col(r){this.nativeCol=Math.floor(r),this.nativeColOff=Math.floor((r-this.nativeCol)*this.colWidth)}get row(){return this.nativeRow+Math.min(this.rowHeight-1,this.nativeRowOff)/this.rowHeight}set row(r){this.nativeRow=Math.floor(r),this.nativeRowOff=Math.floor((r-this.nativeRow)*this.rowHeight)}get colWidth(){return this.worksheet&&this.worksheet.getColumn(this.nativeCol+1)&&this.worksheet.getColumn(this.nativeCol+1).isCustomWidth?Math.floor(1e4*this.worksheet.getColumn(this.nativeCol+1).width):64e4}get rowHeight(){return this.worksheet&&this.worksheet.getRow(this.nativeRow+1)&&this.worksheet.getRow(this.nativeRow+1).height?Math.floor(1e4*this.worksheet.getRow(this.nativeRow+1).height):18e4}get model(){return{nativeCol:this.nativeCol,nativeColOff:this.nativeColOff,nativeRow:this.nativeRow,nativeRowOff:this.nativeRowOff}}set model(r){this.nativeCol=r.nativeCol,this.nativeColOff=r.nativeColOff,this.nativeRow=r.nativeRow,this.nativeRowOff=r.nativeRowOff}}d.exports=o},{"../utils/col-cache":19}],3:[function(e,d,b){"use strict";let l=e("../utils/col-cache"),o=e("../utils/under-dash"),s=e("./enums"),{slideFormula:r}=e("../utils/shared-formula"),t=e("./note");class n{constructor(a,h,f){if(!a||!h)throw new Error("A Cell needs a Row");this._row=a,this._column=h,l.validateAddress(f),this._address=f,this._value=c.create(n.Types.Null,this),this.style=this._mergeStyle(a.style,h.style,{}),this._mergeCount=0}get worksheet(){return this._row.worksheet}get workbook(){return this._row.worksheet.workbook}destroy(){delete this.style,delete this._value,delete this._row,delete this._column,delete this._address}get numFmt(){return this.style.numFmt}set numFmt(a){this.style.numFmt=a}get font(){return this.style.font}set font(a){this.style.font=a}get alignment(){return this.style.alignment}set alignment(a){this.style.alignment=a}get border(){return this.style.border}set border(a){this.style.border=a}get fill(){return this.style.fill}set fill(a){this.style.fill=a}get protection(){return this.style.protection}set protection(a){this.style.protection=a}_mergeStyle(a,h,f){let u=a&&a.numFmt||h&&h.numFmt;u&&(f.numFmt=u);let g=a&&a.font||h&&h.font;g&&(f.font=g);let m=a&&a.alignment||h&&h.alignment;m&&(f.alignment=m);let v=a&&a.border||h&&h.border;v&&(f.border=v);let k=a&&a.fill||h&&h.fill;k&&(f.fill=k);let B=a&&a.protection||h&&h.protection;return B&&(f.protection=B),f}get address(){return this._address}get row(){return this._row.number}get col(){return this._column.number}get $col$row(){return`$${this._column.letter}$${this.row}`}get type(){return this._value.type}get effectiveType(){return this._value.effectiveType}toCsvString(){return this._value.toCsvString()}addMergeRef(){this._mergeCount++}releaseMergeRef(){this._mergeCount--}get isMerged(){return this._mergeCount>0||this.type===n.Types.Merge}merge(a,h){this._value.release(),this._value=c.create(n.Types.Merge,this,a),h||(this.style=a.style)}unmerge(){this.type===n.Types.Merge&&(this._value.release(),this._value=c.create(n.Types.Null,this),this.style=this._mergeStyle(this._row.style,this._column.style,{}))}isMergedTo(a){return this._value.type===n.Types.Merge&&this._value.isMergedTo(a)}get master(){return this.type===n.Types.Merge?this._value.master:this}get isHyperlink(){return this._value.type===n.Types.Hyperlink}get hyperlink(){return this._value.hyperlink}get value(){return this._value.value}set value(a){this.type!==n.Types.Merge?(this._value.release(),this._value=c.create(c.getType(a),this,a)):this._value.master.value=a}get note(){return this._comment&&this._comment.note}set note(a){this._comment=new t(a)}get text(){return this._value.toString()}get html(){return o.escapeHtml(this.text)}toString(){return this.text}_upgradeToHyperlink(a){this.type===n.Types.String&&(this._value=c.create(n.Types.Hyperlink,this,{text:this._value.value,hyperlink:a}))}get formula(){return this._value.formula}get result(){return this._value.result}get formulaType(){return this._value.formulaType}get fullAddress(){let{worksheet:a}=this._row;return{sheetName:a.name,address:this.address,row:this.row,col:this.col}}get name(){return this.names[0]}set name(a){this.names=[a]}get names(){return this.workbook.definedNames.getNamesEx(this.fullAddress)}set names(a){let{definedNames:h}=this.workbook;h.removeAllNames(this.fullAddress),a.forEach(f=>{h.addEx(this.fullAddress,f)})}addName(a){this.workbook.definedNames.addEx(this.fullAddress,a)}removeName(a){this.workbook.definedNames.removeEx(this.fullAddress,a)}removeAllNames(){this.workbook.definedNames.removeAllNames(this.fullAddress)}get _dataValidations(){return this.worksheet.dataValidations}get dataValidation(){return this._dataValidations.find(this.address)}set dataValidation(a){this._dataValidations.add(this.address,a)}get model(){let{model:a}=this._value;return a.style=this.style,this._comment&&(a.comment=this._comment.model),a}set model(a){this._value.release(),this._value=c.create(a.type,this),this._value.model=a,a.comment&&a.comment.type==="note"&&(this._comment=t.fromModel(a.comment)),a.style?this.style=a.style:this.style={}}}n.Types=s.ValueType;let c={getType:i=>i==null?n.Types.Null:i instanceof String||typeof i=="string"?n.Types.String:typeof i=="number"?n.Types.Number:typeof i=="boolean"?n.Types.Boolean:i instanceof Date?n.Types.Date:i.text&&i.hyperlink?n.Types.Hyperlink:i.formula||i.sharedFormula?n.Types.Formula:i.richText?n.Types.RichText:i.sharedString?n.Types.SharedString:i.error?n.Types.Error:n.Types.JSON,types:[{t:n.Types.Null,f:class{constructor(i){this.model={address:i.address,type:n.Types.Null}}get value(){return null}set value(i){}get type(){return n.Types.Null}get effectiveType(){return n.Types.Null}get address(){return this.model.address}set address(i){this.model.address=i}toCsvString(){return""}release(){}toString(){return""}}},{t:n.Types.Number,f:class{constructor(i,a){this.model={address:i.address,type:n.Types.Number,value:a}}get value(){return this.model.value}set value(i){this.model.value=i}get type(){return n.Types.Number}get effectiveType(){return n.Types.Number}get address(){return this.model.address}set address(i){this.model.address=i}toCsvString(){return this.model.value.toString()}release(){}toString(){return this.model.value.toString()}}},{t:n.Types.String,f:class{constructor(i,a){this.model={address:i.address,type:n.Types.String,value:a}}get value(){return this.model.value}set value(i){this.model.value=i}get type(){return n.Types.String}get effectiveType(){return n.Types.String}get address(){return this.model.address}set address(i){this.model.address=i}toCsvString(){return`"${this.model.value.replace(/"/g,'""')}"`}release(){}toString(){return this.model.value}}},{t:n.Types.Date,f:class{constructor(i,a){this.model={address:i.address,type:n.Types.Date,value:a}}get value(){return this.model.value}set value(i){this.model.value=i}get type(){return n.Types.Date}get effectiveType(){return n.Types.Date}get address(){return this.model.address}set address(i){this.model.address=i}toCsvString(){return this.model.value.toISOString()}release(){}toString(){return this.model.value.toString()}}},{t:n.Types.Hyperlink,f:class{constructor(i,a){this.model={address:i.address,type:n.Types.Hyperlink,text:a?a.text:void 0,hyperlink:a?a.hyperlink:void 0},a&&a.tooltip&&(this.model.tooltip=a.tooltip)}get value(){let i={text:this.model.text,hyperlink:this.model.hyperlink};return this.model.tooltip&&(i.tooltip=this.model.tooltip),i}set value(i){this.model={text:i.text,hyperlink:i.hyperlink},i.tooltip&&(this.model.tooltip=i.tooltip)}get text(){return this.model.text}set text(i){this.model.text=i}get hyperlink(){return this.model.hyperlink}set hyperlink(i){this.model.hyperlink=i}get type(){return n.Types.Hyperlink}get effectiveType(){return n.Types.Hyperlink}get address(){return this.model.address}set address(i){this.model.address=i}toCsvString(){return this.model.hyperlink}release(){}toString(){return this.model.text}}},{t:n.Types.Formula,f:class{constructor(i,a){this.cell=i,this.model={address:i.address,type:n.Types.Formula,shareType:a?a.shareType:void 0,ref:a?a.ref:void 0,formula:a?a.formula:void 0,sharedFormula:a?a.sharedFormula:void 0,result:a?a.result:void 0}}_copyModel(i){let a={},h=f=>{let u=i[f];u&&(a[f]=u)};return h("formula"),h("result"),h("ref"),h("shareType"),h("sharedFormula"),a}get value(){return this._copyModel(this.model)}set value(i){this.model=this._copyModel(i)}validate(i){switch(c.getType(i)){case n.Types.Null:case n.Types.String:case n.Types.Number:case n.Types.Date:break;case n.Types.Hyperlink:case n.Types.Formula:default:throw new Error("Cannot process that type of result value")}}get dependencies(){return{ranges:this.formula.match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g),cells:this.formula.replace(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g,"").match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}/g)}}get formula(){return this.model.formula||this._getTranslatedFormula()}set formula(i){this.model.formula=i}get formulaType(){return this.model.formula?s.FormulaType.Master:this.model.sharedFormula?s.FormulaType.Shared:s.FormulaType.None}get result(){return this.model.result}set result(i){this.model.result=i}get type(){return n.Types.Formula}get effectiveType(){let i=this.model.result;return i==null?s.ValueType.Null:i instanceof String||typeof i=="string"?s.ValueType.String:typeof i=="number"?s.ValueType.Number:i instanceof Date?s.ValueType.Date:i.text&&i.hyperlink?s.ValueType.Hyperlink:i.formula?s.ValueType.Formula:s.ValueType.Null}get address(){return this.model.address}set address(i){this.model.address=i}_getTranslatedFormula(){if(!this._translatedFormula&&this.model.sharedFormula){let{worksheet:i}=this.cell,a=i.findCell(this.model.sharedFormula);this._translatedFormula=a&&r(a.formula,a.address,this.model.address)}return this._translatedFormula}toCsvString(){return""+(this.model.result||"")}release(){}toString(){return this.model.result?this.model.result.toString():""}}},{t:n.Types.Merge,f:class{constructor(i,a){this.model={address:i.address,type:n.Types.Merge,master:a?a.address:void 0},this._master=a,a&&a.addMergeRef()}get value(){return this._master.value}set value(i){i instanceof n?(this._master&&this._master.releaseMergeRef(),i.addMergeRef(),this._master=i):this._master.value=i}isMergedTo(i){return i===this._master}get master(){return this._master}get type(){return n.Types.Merge}get effectiveType(){return this._master.effectiveType}get address(){return this.model.address}set address(i){this.model.address=i}toCsvString(){return""}release(){this._master.releaseMergeRef()}toString(){return this.value.toString()}}},{t:n.Types.JSON,f:class{constructor(i,a){this.model={address:i.address,type:n.Types.String,value:JSON.stringify(a),rawValue:a}}get value(){return this.model.rawValue}set value(i){this.model.rawValue=i,this.model.value=JSON.stringify(i)}get type(){return n.Types.String}get effectiveType(){return n.Types.String}get address(){return this.model.address}set address(i){this.model.address=i}toCsvString(){return this.model.value}release(){}toString(){return this.model.value}}},{t:n.Types.SharedString,f:class{constructor(i,a){this.model={address:i.address,type:n.Types.SharedString,value:a}}get value(){return this.model.value}set value(i){this.model.value=i}get type(){return n.Types.SharedString}get effectiveType(){return n.Types.SharedString}get address(){return this.model.address}set address(i){this.model.address=i}toCsvString(){return this.model.value.toString()}release(){}toString(){return this.model.value.toString()}}},{t:n.Types.RichText,f:class{constructor(i,a){this.model={address:i.address,type:n.Types.String,value:a}}get value(){return this.model.value}set value(i){this.model.value=i}toString(){return this.model.value.richText.map(i=>i.text).join("")}get type(){return n.Types.RichText}get effectiveType(){return n.Types.RichText}get address(){return this.model.address}set address(i){this.model.address=i}toCsvString(){return`"${this.text.replace(/"/g,'""')}"`}release(){}}},{t:n.Types.Boolean,f:class{constructor(i,a){this.model={address:i.address,type:n.Types.Boolean,value:a}}get value(){return this.model.value}set value(i){this.model.value=i}get type(){return n.Types.Boolean}get effectiveType(){return n.Types.Boolean}get address(){return this.model.address}set address(i){this.model.address=i}toCsvString(){return this.model.value?1:0}release(){}toString(){return this.model.value.toString()}}},{t:n.Types.Error,f:class{constructor(i,a){this.model={address:i.address,type:n.Types.Error,value:a}}get value(){return this.model.value}set value(i){this.model.value=i}get type(){return n.Types.Error}get effectiveType(){return n.Types.Error}get address(){return this.model.address}set address(i){this.model.address=i}toCsvString(){return this.toString()}release(){}toString(){return this.model.value.error.toString()}}}].reduce((i,a)=>(i[a.t]=a.f,i),[]),create(i,a,h){let f=this.types[i];if(!f)throw new Error("Could not create Value of type "+i);return new f(a,h)}};d.exports=n},{"../utils/col-cache":19,"../utils/shared-formula":23,"../utils/under-dash":26,"./enums":7,"./note":9}],4:[function(e,d,b){"use strict";let l=e("../utils/under-dash"),o=e("./enums"),s=e("../utils/col-cache");class r{constructor(n,c,i){this._worksheet=n,this._number=c,i!==!1&&(this.defn=i)}get number(){return this._number}get worksheet(){return this._worksheet}get letter(){return s.n2l(this._number)}get isCustomWidth(){return this.width!==void 0&&this.width!==9}get defn(){return{header:this._header,key:this.key,width:this.width,style:this.style,hidden:this.hidden,outlineLevel:this.outlineLevel}}set defn(n){n?(this.key=n.key,this.width=n.width!==void 0?n.width:9,this.outlineLevel=n.outlineLevel,n.style?this.style=n.style:this.style={},this.header=n.header,this._hidden=!!n.hidden):(delete this._header,delete this._key,delete this.width,this.style={},this.outlineLevel=0)}get headers(){return this._header&&this._header instanceof Array?this._header:[this._header]}get header(){return this._header}set header(n){n!==void 0?(this._header=n,this.headers.forEach((c,i)=>{this._worksheet.getCell(i+1,this.number).value=c})):this._header=void 0}get key(){return this._key}set key(n){(this._key&&this._worksheet.getColumnKey(this._key))===this&&this._worksheet.deleteColumnKey(this._key),this._key=n,n&&this._worksheet.setColumnKey(this._key,this)}get hidden(){return!!this._hidden}set hidden(n){this._hidden=n}get outlineLevel(){return this._outlineLevel||0}set outlineLevel(n){this._outlineLevel=n}get collapsed(){return!!(this._outlineLevel&&this._outlineLevel>=this._worksheet.properties.outlineLevelCol)}toString(){return JSON.stringify({key:this.key,width:this.width,headers:this.headers.length?this.headers:void 0})}equivalentTo(n){return this.width===n.width&&this.hidden===n.hidden&&this.outlineLevel===n.outlineLevel&&l.isEqual(this.style,n.style)}get isDefault(){if(this.isCustomWidth||this.hidden||this.outlineLevel)return!1;let n=this.style;return!n||!(n.font||n.numFmt||n.alignment||n.border||n.fill||n.protection)}get headerCount(){return this.headers.length}eachCell(n,c){let i=this.number;c||(c=n,n=null),this._worksheet.eachRow(n,(a,h)=>{c(a.getCell(i),h)})}get values(){let n=[];return this.eachCell((c,i)=>{c&&c.type!==o.ValueType.Null&&(n[i]=c.value)}),n}set values(n){if(!n)return;let c=this.number,i=0;n.hasOwnProperty("0")&&(i=1),n.forEach((a,h)=>{this._worksheet.getCell(h+i,c).value=a})}_applyStyle(n,c){return this.style[n]=c,this.eachCell(i=>{i[n]=c}),c}get numFmt(){return this.style.numFmt}set numFmt(n){this._applyStyle("numFmt",n)}get font(){return this.style.font}set font(n){this._applyStyle("font",n)}get alignment(){return this.style.alignment}set alignment(n){this._applyStyle("alignment",n)}get protection(){return this.style.protection}set protection(n){this._applyStyle("protection",n)}get border(){return this.style.border}set border(n){this._applyStyle("border",n)}get fill(){return this.style.fill}set fill(n){this._applyStyle("fill",n)}static toModel(n){let c=[],i=null;return n&&n.forEach((a,h)=>{a.isDefault?i&&(i=null):i&&a.equivalentTo(i)?i.max=h+1:(i={min:h+1,max:h+1,width:a.width!==void 0?a.width:9,style:a.style,isCustomWidth:a.isCustomWidth,hidden:a.hidden,outlineLevel:a.outlineLevel,collapsed:a.collapsed},c.push(i))}),c.length?c:void 0}static fromModel(n,c){let i=[],a=1,h=0;for(c=(c=c||[]).sort((function(f,u){return f.min-u.min}));h<c.length;){let f=c[h++];for(;a<f.min;)i.push(new r(n,a++));for(;a<=f.max;)i.push(new r(n,a++,f))}return i.length?i:null}}d.exports=r},{"../utils/col-cache":19,"../utils/under-dash":26,"./enums":7}],5:[function(e,d,b){"use strict";d.exports=class{constructor(l){this.model=l||{}}add(l,o){return this.model[l]=o}find(l){return this.model[l]}remove(l){this.model[l]=void 0}}},{}],6:[function(e,d,b){"use strict";let l=e("../utils/under-dash"),o=e("../utils/col-cache"),s=e("../utils/cell-matrix"),r=e("./range"),t=/[$](\w+)[$](\d+)(:[$](\w+)[$](\d+))?/;d.exports=class{constructor(){this.matrixMap={}}getMatrix(n){return this.matrixMap[n]||(this.matrixMap[n]=new s)}add(n,c){let i=o.decodeEx(n);this.addEx(i,c)}addEx(n,c){let i=this.getMatrix(c);if(n.top)for(let a=n.left;a<=n.right;a++)for(let h=n.top;h<=n.bottom;h++){let f={sheetName:n.sheetName,address:o.n2l(a)+h,row:h,col:a};i.addCellEx(f)}else i.addCellEx(n)}remove(n,c){let i=o.decodeEx(n);this.removeEx(i,c)}removeEx(n,c){this.getMatrix(c).removeCellEx(n)}removeAllNames(n){l.each(this.matrixMap,c=>{c.removeCellEx(n)})}forEach(n){l.each(this.matrixMap,(c,i)=>{c.forEach(a=>{n(i,a)})})}getNames(n){return this.getNamesEx(o.decodeEx(n))}getNamesEx(n){return l.map(this.matrixMap,(c,i)=>c.findCellEx(n)&&i).filter(Boolean)}_explore(n,c){c.mark=!1;let{sheetName:i}=c,a=new r(c.row,c.col,c.row,c.col,i),h,f;function u(m,v){let k=n.findCellAt(i,m,c.col);return!(!k||!k.mark)&&(a[v]=m,k.mark=!1,!0)}for(f=c.row-1;u(f,"top");f--);for(f=c.row+1;u(f,"bottom");f++);function g(m,v){let k=[];for(f=a.top;f<=a.bottom;f++){let B=n.findCellAt(i,f,m);if(!B||!B.mark)return!1;k.push(B)}a[v]=m;for(let B=0;B<k.length;B++)k[B].mark=!1;return!0}for(h=c.col-1;g(h,"left");h--);for(h=c.col+1;g(h,"right");h++);return a}getRanges(n,c){return(c=c||this.matrixMap[n])?(c.forEach(i=>{i.mark=!0}),{name:n,ranges:c.map(i=>i.mark&&this._explore(c,i)).filter(Boolean).map(i=>i.$shortRange)}):{name:n,ranges:[]}}normaliseMatrix(n,c){n.forEachInSheet(c,(i,a,h)=>{i&&(i.row===a&&i.col===h||(i.row=a,i.col=h,i.address=o.n2l(h)+a))})}spliceRows(n,c,i,a){l.each(this.matrixMap,h=>{h.spliceRows(n,c,i,a),this.normaliseMatrix(h,n)})}spliceColumns(n,c,i,a){l.each(this.matrixMap,h=>{h.spliceColumns(n,c,i,a),this.normaliseMatrix(h,n)})}get model(){return l.map(this.matrixMap,(n,c)=>this.getRanges(c,n)).filter(n=>n.ranges.length)}set model(n){let c=this.matrixMap={};n.forEach(i=>{let a=c[i.name]=new s;i.ranges.forEach(h=>{t.test(h.split("!").pop()||"")&&a.addCell(h)})})}}},{"../utils/cell-matrix":18,"../utils/col-cache":19,"../utils/under-dash":26,"./range":10}],7:[function(e,d,b){"use strict";d.exports={ValueType:{Null:0,Merge:1,Number:2,String:3,Date:4,Hyperlink:5,Formula:6,SharedString:7,RichText:8,Boolean:9,Error:10},FormulaType:{None:0,Master:1,Shared:2},RelationshipType:{None:0,OfficeDocument:1,Worksheet:2,CalcChain:3,SharedStrings:4,Styles:5,Theme:6,Hyperlink:7},DocumentType:{Xlsx:1},ReadingOrder:{LeftToRight:1,RightToLeft:2},ErrorValue:{NotApplicable:"#N/A",Ref:"#REF!",Name:"#NAME?",DivZero:"#DIV/0!",Null:"#NULL!",Value:"#VALUE!",Num:"#NUM!"}}},{}],8:[function(e,d,b){"use strict";let l=e("../utils/col-cache"),o=e("./anchor");d.exports=class{constructor(s,r){this.worksheet=s,this.model=r}get model(){switch(this.type){case"background":return{type:this.type,imageId:this.imageId};case"image":return{type:this.type,imageId:this.imageId,hyperlinks:this.range.hyperlinks,range:{tl:this.range.tl.model,br:this.range.br&&this.range.br.model,ext:this.range.ext,editAs:this.range.editAs}};default:throw new Error("Invalid Image Type")}}set model(s){let{type:r,imageId:t,range:n,hyperlinks:c}=s;if(this.type=r,this.imageId=t,r==="image")if(typeof n=="string"){let i=l.decode(n);this.range={tl:new o(this.worksheet,{col:i.left,row:i.top},-1),br:new o(this.worksheet,{col:i.right,row:i.bottom},0),editAs:"oneCell"}}else this.range={tl:new o(this.worksheet,n.tl,0),br:n.br&&new o(this.worksheet,n.br,0),ext:n.ext,editAs:n.editAs,hyperlinks:c||n.hyperlinks}}}},{"../utils/col-cache":19,"./anchor":2}],9:[function(e,d,b){"use strict";let l=e("../utils/under-dash");class o{constructor(r){this.note=r}get model(){let r=null;return typeof this.note==="string"?r={type:"note",note:{texts:[{text:this.note}]}}:r={type:"note",note:this.note},l.deepMerge({},o.DEFAULT_CONFIGS,r)}set model(r){let{note:t}=r,{texts:n}=t;n.length===1&&Object.keys(n[0]).length===1?this.note=n[0].text:this.note=t}static fromModel(r){let t=new o;return t.model=r,t}}o.DEFAULT_CONFIGS={note:{margins:{insetmode:"auto",inset:[.13,.13,.25,.25]},protection:{locked:"True",lockText:"True"},editAs:"absolute"}},d.exports=o},{"../utils/under-dash":26}],10:[function(e,d,b){"use strict";let l=e("../utils/col-cache");class o{constructor(){this.decode(arguments)}setTLBR(r,t,n,c,i){if(arguments.length<4){let a=l.decodeAddress(r),h=l.decodeAddress(t);this.model={top:Math.min(a.row,h.row),left:Math.min(a.col,h.col),bottom:Math.max(a.row,h.row),right:Math.max(a.col,h.col),sheetName:n},this.setTLBR(a.row,a.col,h.row,h.col,i)}else this.model={top:Math.min(r,n),left:Math.min(t,c),bottom:Math.max(r,n),right:Math.max(t,c),sheetName:i}}decode(r){switch(r.length){case 5:this.setTLBR(r[0],r[1],r[2],r[3],r[4]);break;case 4:this.setTLBR(r[0],r[1],r[2],r[3]);break;case 3:this.setTLBR(r[0],r[1],r[2]);break;case 2:this.setTLBR(r[0],r[1]);break;case 1:{let t=r[0];if(t instanceof o)this.model={top:t.model.top,left:t.model.left,bottom:t.model.bottom,right:t.model.right,sheetName:t.sheetName};else if(t instanceof Array)this.decode(t);else if(t.top&&t.left&&t.bottom&&t.right)this.model={top:t.top,left:t.left,bottom:t.bottom,right:t.right,sheetName:t.sheetName};else{let n=l.decodeEx(t);n.top?this.model={top:n.top,left:n.left,bottom:n.bottom,right:n.right,sheetName:n.sheetName}:this.model={top:n.row,left:n.col,bottom:n.row,right:n.col,sheetName:n.sheetName}}break}case 0:this.model={top:0,left:0,bottom:0,right:0};break;default:throw new Error("Invalid number of arguments to _getDimensions() - "+r.length)}}get top(){return this.model.top||1}set top(r){this.model.top=r}get left(){return this.model.left||1}set left(r){this.model.left=r}get bottom(){return this.model.bottom||1}set bottom(r){this.model.bottom=r}get right(){return this.model.right||1}set right(r){this.model.right=r}get sheetName(){return this.model.sheetName}set sheetName(r){this.model.sheetName=r}get _serialisedSheetName(){let{sheetName:r}=this.model;return r?/^[a-zA-Z0-9]*$/.test(r)?r+"!":`'${r}'!`:""}expand(r,t,n,c){(!this.model.top||r<this.top)&&(this.top=r),(!this.model.left||t<this.left)&&(this.left=t),(!this.model.bottom||n>this.bottom)&&(this.bottom=n),(!this.model.right||c>this.right)&&(this.right=c)}expandRow(r){if(r){let{dimensions:t,number:n}=r;t&&this.expand(n,t.min,n,t.max)}}expandToAddress(r){let t=l.decodeEx(r);this.expand(t.row,t.col,t.row,t.col)}get tl(){return l.n2l(this.left)+this.top}get $t$l(){return`$${l.n2l(this.left)}$${this.top}`}get br(){return l.n2l(this.right)+this.bottom}get $b$r(){return`$${l.n2l(this.right)}$${this.bottom}`}get range(){return`${this._serialisedSheetName+this.tl}:${this.br}`}get $range(){return`${this._serialisedSheetName+this.$t$l}:${this.$b$r}`}get shortRange(){return this.count>1?this.range:this._serialisedSheetName+this.tl}get $shortRange(){return this.count>1?this.$range:this._serialisedSheetName+this.$t$l}get count(){return(1+this.bottom-this.top)*(1+this.right-this.left)}toString(){return this.range}intersects(r){return(!r.sheetName||!this.sheetName||r.sheetName===this.sheetName)&&!(r.bottom<this.top)&&!(r.top>this.bottom)&&!(r.right<this.left)&&!(r.left>this.right)}contains(r){let t=l.decodeEx(r);return this.containsEx(t)}containsEx(r){return(!r.sheetName||!this.sheetName||r.sheetName===this.sheetName)&&r.row>=this.top&&r.row<=this.bottom&&r.col>=this.left&&r.col<=this.right}forEachAddress(r){for(let t=this.left;t<=this.right;t++)for(let n=this.top;n<=this.bottom;n++)r(l.encodeAddress(n,t),n,t)}}d.exports=o},{"../utils/col-cache":19}],11:[function(e,d,b){"use strict";let l=e("../utils/under-dash"),o=e("./enums"),s=e("../utils/col-cache"),r=e("./cell");d.exports=class{constructor(t,n){this._worksheet=t,this._number=n,this._cells=[],this.style={},this.outlineLevel=0}get number(){return this._number}get worksheet(){return this._worksheet}commit(){this._worksheet._commitRow(this)}destroy(){delete this._worksheet,delete this._cells,delete this.style}findCell(t){return this._cells[t-1]}getCellEx(t){let n=this._cells[t.col-1];if(!n){let c=this._worksheet.getColumn(t.col);n=new r(this,c,t.address),this._cells[t.col-1]=n}return n}getCell(t){if(typeof t=="string"){let n=this._worksheet.getColumnKey(t);t=n?n.number:s.l2n(t)}return this._cells[t-1]||this.getCellEx({address:s.encodeAddress(this._number,t),row:this._number,col:t})}splice(t,n){let c=t+n;for(var i=arguments.length,a=new Array(i>2?i-2:0),h=2;h<i;h++)a[h-2]=arguments[h];let f=a.length-n,u=this._cells.length,g,m,v;if(f<0)for(g=t+a.length;g<=u;g++)v=this._cells[g-1],m=this._cells[g-f-1],m?(v=this.getCell(g),v.value=m.value,v.style=m.style,v._comment=m._comment):v&&(v.value=null,v.style={},v._comment=void 0);else if(f>0)for(g=u;g>=c;g--)m=this._cells[g-1],m?(v=this.getCell(g+f),v.value=m.value,v.style=m.style,v._comment=m._comment):this._cells[g+f-1]=void 0;for(g=0;g<a.length;g++)v=this.getCell(t+g),v.value=a[g],v.style={},v._comment=void 0}eachCell(t,n){if(n||(n=t,t=null),t&&t.includeEmpty){let c=this._cells.length;for(let i=1;i<=c;i++)n(this.getCell(i),i)}else this._cells.forEach((c,i)=>{c&&c.type!==o.ValueType.Null&&n(c,i+1)})}addPageBreak(t,n){let c=this._worksheet,i=Math.max(0,t-1)||0,a=Math.max(0,n-1)||16838,h={id:this._number,max:a,man:1};i&&(h.min=i),c.rowBreaks.push(h)}get values(){let t=[];return this._cells.forEach(n=>{n&&n.type!==o.ValueType.Null&&(t[n.col]=n.value)}),t}set values(t){if(this._cells=[],t)if(t instanceof Array){let n=0;t.hasOwnProperty("0")&&(n=1),t.forEach((c,i)=>{c!==void 0&&(this.getCellEx({address:s.encodeAddress(this._number,i+n),row:this._number,col:i+n}).value=c)})}else this._worksheet.eachColumnKey((n,c)=>{t[c]!==void 0&&(this.getCellEx({address:s.encodeAddress(this._number,n.number),row:this._number,col:n.number}).value=t[c])})}get hasValues(){return l.some(this._cells,t=>t&&t.type!==o.ValueType.Null)}get cellCount(){return this._cells.length}get actualCellCount(){let t=0;return this.eachCell(()=>{t++}),t}get dimensions(){let t=0,n=0;return this._cells.forEach(c=>{c&&c.type!==o.ValueType.Null&&((!t||t>c.col)&&(t=c.col),n<c.col&&(n=c.col))}),t>0?{min:t,max:n}:null}_applyStyle(t,n){return this.style[t]=n,this._cells.forEach(c=>{c&&(c[t]=n)}),n}get numFmt(){return this.style.numFmt}set numFmt(t){this._applyStyle("numFmt",t)}get font(){return this.style.font}set font(t){this._applyStyle("font",t)}get alignment(){return this.style.alignment}set alignment(t){this._applyStyle("alignment",t)}get protection(){return this.style.protection}set protection(t){this._applyStyle("protection",t)}get border(){return this.style.border}set border(t){this._applyStyle("border",t)}get fill(){return this.style.fill}set fill(t){this._applyStyle("fill",t)}get hidden(){return!!this._hidden}set hidden(t){this._hidden=t}get outlineLevel(){return this._outlineLevel||0}set outlineLevel(t){this._outlineLevel=t}get collapsed(){return!!(this._outlineLevel&&this._outlineLevel>=this._worksheet.properties.outlineLevelRow)}get model(){let t=[],n=0,c=0;return this._cells.forEach(i=>{if(i){let a=i.model;a&&((!n||n>i.col)&&(n=i.col),c<i.col&&(c=i.col),t.push(a))}}),this.height||t.length?{cells:t,number:this.number,min:n,max:c,height:this.height,style:this.style,hidden:this.hidden,outlineLevel:this.outlineLevel,collapsed:this.collapsed}:null}set model(t){if(t.number!==this._number)throw new Error("Invalid row number in model");let n;this._cells=[],t.cells.forEach(c=>{switch(c.type){case r.Types.Merge:break;default:{let i;if(c.address)i=s.decodeAddress(c.address);else if(n){let{row:a}=n,h=n.col+1;i={row:a,col:h,address:s.encodeAddress(a,h),$col$row:`$${s.n2l(h)}$${a}`}}n=i,this.getCellEx(i).model=c;break}}}),t.height?this.height=t.height:delete this.height,this.hidden=t.hidden,this.outlineLevel=t.outlineLevel||0,this.style=t.style&&JSON.parse(JSON.stringify(t.style))||{}}}},{"../utils/col-cache":19,"../utils/under-dash":26,"./cell":3,"./enums":7}],12:[function(e,d,b){"use strict";let l=e("../utils/col-cache");class o{constructor(r,t,n){this.table=r,this.column=t,this.index=n}_set(r,t){this.table.cacheState(),this.column[r]=t}get name(){return this.column.name}set name(r){this._set("name",r)}get filterButton(){return this.column.filterButton}set filterButton(r){this.column.filterButton=r}get style(){return this.column.style}set style(r){this.column.style=r}get totalsRowLabel(){return this.column.totalsRowLabel}set totalsRowLabel(r){this._set("totalsRowLabel",r)}get totalsRowFunction(){return this.column.totalsRowFunction}set totalsRowFunction(r){this._set("totalsRowFunction",r)}get totalsRowResult(){return this.column.totalsRowResult}set totalsRowResult(r){this._set("totalsRowResult",r)}get totalsRowFormula(){return this.column.totalsRowFormula}set totalsRowFormula(r){this._set("totalsRowFormula",r)}}d.exports=class{constructor(s,r){this.worksheet=s,r&&(this.table=r,this.validate(),this.store())}getFormula(s){switch(s.totalsRowFunction){case"none":return null;case"average":return`SUBTOTAL(101,${this.table.name}[${s.name}])`;case"countNums":return`SUBTOTAL(102,${this.table.name}[${s.name}])`;case"count":return`SUBTOTAL(103,${this.table.name}[${s.name}])`;case"max":return`SUBTOTAL(104,${this.table.name}[${s.name}])`;case"min":return`SUBTOTAL(105,${this.table.name}[${s.name}])`;case"stdDev":return`SUBTOTAL(106,${this.table.name}[${s.name}])`;case"var":return`SUBTOTAL(107,${this.table.name}[${s.name}])`;case"sum":return`SUBTOTAL(109,${this.table.name}[${s.name}])`;case"custom":return s.totalsRowFormula;default:throw new Error("Invalid Totals Row Function: "+s.totalsRowFunction)}}get width(){return this.table.columns.length}get height(){return this.table.rows.length}get filterHeight(){return this.height+(this.table.headerRow?1:0)}get tableHeight(){return this.filterHeight+(this.table.totalsRow?1:0)}validate(){let{table:s}=this,r=(f,u,g)=>{f[u]===void 0&&(f[u]=g)};r(s,"headerRow",!0),r(s,"totalsRow",!1),r(s,"style",{}),r(s.style,"theme","TableStyleMedium2"),r(s.style,"showFirstColumn",!1),r(s.style,"showLastColumn",!1),r(s.style,"showRowStripes",!1),r(s.style,"showColumnStripes",!1);let t=(f,u)=>{if(!f)throw new Error(u)};t(s.ref,"Table must have ref"),t(s.columns,"Table must have column definitions"),t(s.rows,"Table must have row definitions"),s.tl=l.decodeAddress(s.ref);let{row:n,col:c}=s.tl;t(n>0,"Table must be on valid row"),t(c>0,"Table must be on valid col");let{width:i,filterHeight:a,tableHeight:h}=this;s.autoFilterRef=l.encode(n,c,n+a-1,c+i-1),s.tableRef=l.encode(n,c,n+h-1,c+i-1),s.columns.forEach((f,u)=>{t(f.name,`Column ${u} must have a name`),u===0?r(f,"totalsRowLabel","Total"):(r(f,"totalsRowFunction","none"),f.totalsRowFormula=this.getFormula(f))})}store(){let s=(a,h)=>{h&&Object.keys(h).forEach(f=>{a[f]=h[f]})},{worksheet:r,table:t}=this,{row:n,col:c}=t.tl,i=0;if(t.headerRow){let a=r.getRow(n+i++);t.columns.forEach((h,f)=>{let{style:u,name:g}=h,m=a.getCell(c+f);m.value=g,s(m,u)})}if(t.rows.forEach(a=>{let h=r.getRow(n+i++);a.forEach((f,u)=>{let g=h.getCell(c+u);g.value=f,s(g,t.columns[u].style)})}),t.totalsRow){let a=r.getRow(n+i++);t.columns.forEach((h,f)=>{let u=a.getCell(c+f);if(f===0)u.value=h.totalsRowLabel;else{let g=this.getFormula(h);u.value=g?{formula:h.totalsRowFormula,result:h.totalsRowResult}:null}s(u,h.style)})}}load(s){let{table:r}=this,{row:t,col:n}=r.tl,c=0;if(r.headerRow){let i=s.getRow(t+c++);r.columns.forEach((a,h)=>{i.getCell(n+h).value=a.name})}if(r.rows.forEach(i=>{let a=s.getRow(t+c++);i.forEach((h,f)=>{a.getCell(n+f).value=h})}),r.totalsRow){let i=s.getRow(t+c++);r.columns.forEach((a,h)=>{let f=i.getCell(n+h);h===0?f.value=a.totalsRowLabel:this.getFormula(a)&&(f.value={formula:a.totalsRowFormula,result:a.totalsRowResult})})}}get model(){return this.table}set model(s){this.table=s}cacheState(){this._cache||(this._cache={ref:this.ref,width:this.width,tableHeight:this.tableHeight})}commit(){if(!this._cache)return;this.validate();let s=l.decodeAddress(this._cache.ref);if(this.ref!==this._cache.ref)for(let r=0;r<this._cache.tableHeight;r++){let t=this.worksheet.getRow(s.row+r);for(let n=0;n<this._cache.width;n++)t.getCell(s.col+n).value=null}else{for(let r=this.tableHeight;r<this._cache.tableHeight;r++){let t=this.worksheet.getRow(s.row+r);for(let n=0;n<this._cache.width;n++)t.getCell(s.col+n).value=null}for(let r=0;r<this.tableHeight;r++){let t=this.worksheet.getRow(s.row+r);for(let n=this.width;n<this._cache.width;n++)t.getCell(s.col+n).value=null}}this.store()}addRow(s,r){this.cacheState(),r===void 0?this.table.rows.push(s):this.table.rows.splice(r,0,s)}removeRows(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;this.cacheState(),this.table.rows.splice(s,r)}getColumn(s){let r=this.table.columns[s];return new o(this,r,s)}addColumn(s,r,t){this.cacheState(),t===void 0?(this.table.columns.push(s),this.table.rows.forEach((n,c)=>{n.push(r[c])})):(this.table.columns.splice(t,0,s),this.table.rows.forEach((n,c)=>{n.splice(t,0,r[c])}))}removeColumns(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;this.cacheState(),this.table.columns.splice(s,r),this.table.rows.forEach(t=>{t.splice(s,r)})}_assign(s,r,t){this.cacheState(),s[r]=t}get ref(){return this.table.ref}set ref(s){this._assign(this.table,"ref",s)}get name(){return this.table.name}set name(s){this.table.name=s}get displayName(){return this.table.displyName||this.table.name}set displayNamename(s){this.table.displayName=s}get headerRow(){return this.table.headerRow}set headerRow(s){this._assign(this.table,"headerRow",s)}get totalsRow(){return this.table.totalsRow}set totalsRow(s){this._assign(this.table,"totalsRow",s)}get theme(){return this.table.style.name}set theme(s){this.table.style.name=s}get showFirstColumn(){return this.table.style.showFirstColumn}set showFirstColumn(s){this.table.style.showFirstColumn=s}get showLastColumn(){return this.table.style.showLastColumn}set showLastColumn(s){this.table.style.showLastColumn=s}get showRowStripes(){return this.table.style.showRowStripes}set showRowStripes(s){this.table.style.showRowStripes=s}get showColumnStripes(){return this.table.style.showColumnStripes}set showColumnStripes(s){this.table.style.showColumnStripes=s}}},{"../utils/col-cache":19}],13:[function(e,d,b){"use strict";let l=e("./worksheet"),o=e("./defined-names"),s=e("../xlsx/xlsx"),r=e("../csv/csv");d.exports=class{constructor(){this.category="",this.company="",this.created=new Date,this.description="",this.keywords="",this.manager="",this.modified=this.created,this.properties={},this.calcProperties={},this._worksheets=[],this.subject="",this.title="",this.views=[],this.media=[],this._definedNames=new o}get xlsx(){return this._xlsx||(this._xlsx=new s(this)),this._xlsx}get csv(){return this._csv||(this._csv=new r(this)),this._csv}get nextId(){for(let t=1;t<this._worksheets.length;t++)if(!this._worksheets[t])return t;return this._worksheets.length||1}addWorksheet(t,n){let c=this.nextId;n&&(typeof n=="string"?(console.trace('tabColor argument is now deprecated. Please use workbook.addWorksheet(name, {properties: { tabColor: { argb: "rbg value" } }'),n={properties:{tabColor:{argb:n}}}):(n.argb||n.theme||n.indexed)&&(console.trace("tabColor argument is now deprecated. Please use workbook.addWorksheet(name, {properties: { tabColor: { ... } }"),n={properties:{tabColor:n}}));let i=this._worksheets.reduce((f,u)=>(u&&u.orderNo)>f?u.orderNo:f,0),a=Object.assign({},n,{id:c,name:t,orderNo:i+1,workbook:this}),h=new l(a);return this._worksheets[c]=h,h}removeWorksheetEx(t){delete this._worksheets[t.id]}removeWorksheet(t){let n=this.getWorksheet(t);n&&n.destroy()}getWorksheet(t){return t===void 0?this._worksheets.find(Boolean):typeof t=="number"?this._worksheets[t]:typeof t=="string"?this._worksheets.find(n=>n&&n.name===t):void 0}get worksheets(){return this._worksheets.slice(1).sort((t,n)=>t.orderNo-n.orderNo).filter(Boolean)}eachSheet(t){this.worksheets.forEach(n=>{t(n,n.id)})}get definedNames(){return this._definedNames}clearThemes(){this._themes=void 0}addImage(t){let n=this.media.length;return this.media.push(Object.assign({},t,{type:"image"})),n}getImage(t){return this.media[t]}get model(){return{creator:this.creator||"Unknown",lastModifiedBy:this.lastModifiedBy||"Unknown",lastPrinted:this.lastPrinted,created:this.created,modified:this.modified,properties:this.properties,worksheets:this.worksheets.map(t=>t.model),sheets:this.worksheets.map(t=>t.model).filter(Boolean),definedNames:this._definedNames.model,views:this.views,company:this.company,manager:this.manager,title:this.title,subject:this.subject,keywords:this.keywords,category:this.category,description:this.description,language:this.language,revision:this.revision,contentStatus:this.contentStatus,themes:this._themes,media:this.media,calcProperties:this.calcProperties}}set model(t){this.creator=t.creator,this.lastModifiedBy=t.lastModifiedBy,this.lastPrinted=t.lastPrinted,this.created=t.created,this.modified=t.modified,this.company=t.company,this.manager=t.manager,this.title=t.title,this.subject=t.subject,this.keywords=t.keywords,this.category=t.category,this.description=t.description,this.language=t.language,this.revision=t.revision,this.contentStatus=t.contentStatus,this.properties=t.properties,this.calcProperties=t.calcProperties,this._worksheets=[],t.worksheets.forEach(n=>{let{id:c,name:i,state:a}=n,h=t.sheets&&t.sheets.findIndex(f=>f.id===c);(this._worksheets[c]=new l({id:c,name:i,orderNo:h,state:a,workbook:this})).model=n}),this._definedNames.model=t.definedNames,this.views=t.views,this._themes=t.themes,this.media=t.media||[]}}},{"../csv/csv":1,"../xlsx/xlsx":144,"./defined-names":6,"./worksheet":14}],14:[function(e,d,b){"use strict";let l=e("../utils/under-dash"),o=e("../utils/col-cache"),s=e("./range"),r=e("./row"),t=e("./column"),n=e("./enums"),c=e("./image"),i=e("./table"),a=e("./data-validations"),h=e("../utils/encryptor"),{copyStyle:f}=e("../utils/copy-style");d.exports=class{constructor(u){u=u||{},this._workbook=u.workbook,this.id=u.id,this.orderNo=u.orderNo,this.name=u.name,this.state=u.state||"visible",this._rows=[],this._columns=null,this._keys={},this._merges={},this.rowBreaks=[],this.properties=Object.assign({},{defaultRowHeight:15,dyDescent:55,outlineLevelCol:0,outlineLevelRow:0},u.properties),this.pageSetup=Object.assign({},{margins:{left:.7,right:.7,top:.75,bottom:.75,header:.3,footer:.3},orientation:"portrait",horizontalDpi:4294967295,verticalDpi:4294967295,fitToPage:!(!u.pageSetup||!u.pageSetup.fitToWidth&&!u.pageSetup.fitToHeight||u.pageSetup.scale),pageOrder:"downThenOver",blackAndWhite:!1,draft:!1,cellComments:"None",errors:"displayed",scale:100,fitToWidth:1,fitToHeight:1,paperSize:void 0,showRowColHeaders:!1,showGridLines:!1,firstPageNumber:void 0,horizontalCentered:!1,verticalCentered:!1,rowBreaks:null,colBreaks:null},u.pageSetup),this.headerFooter=Object.assign({},{differentFirst:!1,differentOddEven:!1,oddHeader:null,oddFooter:null,evenHeader:null,evenFooter:null,firstHeader:null,firstFooter:null},u.headerFooter),this.dataValidations=new a,this.views=u.views||[],this.autoFilter=u.autoFilter||null,this._media=[],this.sheetProtection=null,this.tables={},this.conditionalFormattings=[]}get name(){return this._name}set name(u){if(u===void 0&&(u="sheet"+this.id),this._name!==u){if(typeof u!="string")throw new Error("The name has to be a string.");if(u==="")throw new Error("The name can't be empty.");if(u==="History")throw new Error('The name "History" is protected. Please use a different name.');if(/[*?:/\\[\]]/.test(u))throw new Error(`Worksheet name ${u} cannot include any of the following characters: * ? : \\ / [ ]`);if(/(^')|('$)/.test(u))throw new Error("The first or last character of worksheet name cannot be a single quotation mark: "+u);if(u&&u.length>31&&(console.warn(`Worksheet name ${u} exceeds 31 chars. This will be truncated`),u=u.substring(0,31)),this._workbook._worksheets.find(g=>g&&g.name.toLowerCase()===u.toLowerCase()))throw new Error("Worksheet name already exists: "+u);this._name=u}}get workbook(){return this._workbook}destroy(){this._workbook.removeWorksheetEx(this)}get dimensions(){let u=new s;return this._rows.forEach(g=>{if(g){let m=g.dimensions;m&&u.expand(g.number,m.min,g.number,m.max)}}),u}get columns(){return this._columns}set columns(u){this._headerRowCount=u.reduce((v,k)=>{let B=(k.header?1:k.headers&&k.headers.length)||0;return Math.max(v,B)},0);let g=1,m=this._columns=[];u.forEach(v=>{let k=new t(this,g++,!1);m.push(k),k.defn=v})}getColumnKey(u){return this._keys[u]}setColumnKey(u,g){this._keys[u]=g}deleteColumnKey(u){delete this._keys[u]}eachColumnKey(u){l.each(this._keys,u)}getColumn(u){if(typeof u=="string"){let g=this._keys[u];if(g)return g;u=o.l2n(u)}if(this._columns||(this._columns=[]),u>this._columns.length){let g=this._columns.length+1;for(;g<=u;)this._columns.push(new t(this,g++))}return this._columns[u-1]}spliceColumns(u,g){let m=this._rows.length;for(var v=arguments.length,k=new Array(v>2?v-2:0),B=2;B<v;B++)k[B-2]=arguments[B];if(k.length>0)for(let P=0;P<m;P++){let N=[u,g];k.forEach(j=>{N.push(j[P]||null)});let q=this.getRow(P+1);q.splice.apply(q,N)}else this._rows.forEach(P=>{P&&P.splice(u,g)});let R=k.length-g,L=u+g,A=this._columns.length;if(R<0)for(let P=u+k.length;P<=A;P++)this.getColumn(P).defn=this.getColumn(P-R).defn;else if(R>0)for(let P=A;P>=L;P--)this.getColumn(P+R).defn=this.getColumn(P).defn;for(let P=u;P<u+k.length;P++)this.getColumn(P).defn=null;this.workbook.definedNames.spliceColumns(this.name,u,g,k.length)}get lastColumn(){return this.getColumn(this.columnCount)}get columnCount(){let u=0;return this.eachRow(g=>{u=Math.max(u,g.cellCount)}),u}get actualColumnCount(){let u=[],g=0;return this.eachRow(m=>{m.eachCell(v=>{let{col:k}=v;u[k]||(u[k]=!0,g++)})}),g}_commitRow(){}get _lastRowNumber(){let u=this._rows,g=u.length;for(;g>0&&u[g-1]===void 0;)g--;return g}get _nextRow(){return this._lastRowNumber+1}get lastRow(){if(this._rows.length)return this._rows[this._rows.length-1]}findRow(u){return this._rows[u-1]}findRows(u,g){return this._rows.slice(u-1,u-1+g)}get rowCount(){return this._lastRowNumber}get actualRowCount(){let u=0;return this.eachRow(()=>{u++}),u}getRow(u){let g=this._rows[u-1];return g||(g=this._rows[u-1]=new r(this,u)),g}getRows(u,g){if(g<1)return;let m=[];for(let v=u;v<u+g;v++)m.push(this.getRow(v));return m}addRow(u){let g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n",m=this._nextRow,v=this.getRow(m);return v.values=u,this._setStyleOption(m,g[0]==="i"?g:"n"),v}addRows(u){let g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n",m=[];return u.forEach(v=>{m.push(this.addRow(v,g))}),m}insertRow(u,g){let m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"n";return this.spliceRows(u,0,g),this._setStyleOption(u,m),this.getRow(u)}insertRows(u,g){let m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"n";if(this.spliceRows(u,0,...g),m!=="n")for(let v=0;v<g.length;v++)m[0]==="o"&&this.findRow(g.length+u+v)!==void 0?this._copyStyle(g.length+u+v,u+v,m[1]==="+"):m[0]==="i"&&this.findRow(u-1)!==void 0&&this._copyStyle(u-1,u+v,m[1]==="+");return this.getRows(u,g.length)}_setStyleOption(u){let g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n";g[0]==="o"&&this.findRow(u+1)!==void 0?this._copyStyle(u+1,u,g[1]==="+"):g[0]==="i"&&this.findRow(u-1)!==void 0&&this._copyStyle(u-1,u,g[1]==="+")}_copyStyle(u,g){let m=arguments.length>2&&arguments[2]!==void 0&&arguments[2],v=this.getRow(u),k=this.getRow(g);k.style=f(v.style),v.eachCell({includeEmpty:m},(B,R)=>{k.getCell(R).style=f(B.style)}),k.height=v.height}duplicateRow(u,g){let m=arguments.length>2&&arguments[2]!==void 0&&arguments[2],v=this._rows[u-1],k=new Array(g).fill(v.values);this.spliceRows(u+1,m?0:g,...k);for(let B=0;B<g;B++){let R=this._rows[u+B];R.style=v.style,R.height=v.height,v.eachCell({includeEmpty:!0},(L,A)=>{R.getCell(A).style=L.style})}}spliceRows(u,g){let m=u+g;for(var v=arguments.length,k=new Array(v>2?v-2:0),B=2;B<v;B++)k[B-2]=arguments[B];let R=k.length,L=R-g,A=this._rows.length,P,N;if(L<0)for(u===A&&(this._rows[A-1]=void 0),P=m;P<=A;P++)if(N=this._rows[P-1],N){let q=this.getRow(P+L);q.values=N.values,q.style=N.style,q.height=N.height,N.eachCell({includeEmpty:!0},(j,S)=>{q.getCell(S).style=j.style}),this._rows[P-1]=void 0}else this._rows[P+L-1]=void 0;else if(L>0)for(P=A;P>=m;P--)if(N=this._rows[P-1],N){let q=this.getRow(P+L);q.values=N.values,q.style=N.style,q.height=N.height,N.eachCell({includeEmpty:!0},(j,S)=>{if(q.getCell(S).style=j.style,j._value.constructor.name==="MergeValue"){let T=this.getRow(j._row._number+R).getCell(S),D=j._value._master,p=this.getRow(D._row._number+R).getCell(D._column._number);T.merge(p)}})}else this._rows[P+L-1]=void 0;for(P=0;P<R;P++){let q=this.getRow(u+P);q.style={},q.values=k[P]}this.workbook.definedNames.spliceRows(this.name,u,g,R)}eachRow(u,g){if(g||(g=u,u=void 0),u&&u.includeEmpty){let m=this._rows.length;for(let v=1;v<=m;v++)g(this.getRow(v),v)}else this._rows.forEach(m=>{m&&m.hasValues&&g(m,m.number)})}getSheetValues(){let u=[];return this._rows.forEach(g=>{g&&(u[g.number]=g.values)}),u}findCell(u,g){let m=o.getAddress(u,g),v=this._rows[m.row-1];return v?v.findCell(m.col):void 0}getCell(u,g){let m=o.getAddress(u,g);return this.getRow(m.row).getCellEx(m)}mergeCells(){for(var u=arguments.length,g=new Array(u),m=0;m<u;m++)g[m]=arguments[m];let v=new s(g);this._mergeCellsInternal(v)}mergeCellsWithoutStyle(){for(var u=arguments.length,g=new Array(u),m=0;m<u;m++)g[m]=arguments[m];let v=new s(g);this._mergeCellsInternal(v,!0)}_mergeCellsInternal(u,g){l.each(this._merges,v=>{if(v.intersects(u))throw new Error("Cannot merge already merged cells")});let m=this.getCell(u.top,u.left);for(let v=u.top;v<=u.bottom;v++)for(let k=u.left;k<=u.right;k++)(v>u.top||k>u.left)&&this.getCell(v,k).merge(m,g);this._merges[m.address]=u}_unMergeMaster(u){let g=this._merges[u.address];if(g){for(let m=g.top;m<=g.bottom;m++)for(let v=g.left;v<=g.right;v++)this.getCell(m,v).unmerge();delete this._merges[u.address]}}get hasMerges(){return l.some(this._merges,Boolean)}unMergeCells(){for(var u=arguments.length,g=new Array(u),m=0;m<u;m++)g[m]=arguments[m];let v=new s(g);for(let k=v.top;k<=v.bottom;k++)for(let B=v.left;B<=v.right;B++){let R=this.findCell(k,B);R&&(R.type===n.ValueType.Merge?this._unMergeMaster(R.master):this._merges[R.address]&&this._unMergeMaster(R))}}fillFormula(u,g,m){let v=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"shared",k=o.decode(u),{top:B,left:R,bottom:L,right:A}=k,P=A-R+1,N=o.encodeAddress(B,R),q=v==="shared",j;j=typeof m=="function"?m:Array.isArray(m)?Array.isArray(m[0])?(T,D)=>m[T-B][D-R]:(T,D)=>m[(T-B)*P+(D-R)]:()=>{};let S=!0;for(let T=B;T<=L;T++)for(let D=R;D<=A;D++)S?(this.getCell(T,D).value={shareType:v,formula:g,ref:u,result:j(T,D)},S=!1):this.getCell(T,D).value=q?{sharedFormula:N,result:j(T,D)}:j(T,D)}addImage(u,g){let m={type:"image",imageId:u,range:g};this._media.push(new c(this,m))}getImages(){return this._media.filter(u=>u.type==="image")}addBackgroundImage(u){let g={type:"background",imageId:u};this._media.push(new c(this,g))}getBackgroundImageId(){let u=this._media.find(g=>g.type==="background");return u&&u.imageId}protect(u,g){return new Promise(m=>{this.sheetProtection={sheet:!0},g&&"spinCount"in g&&(g.spinCount=Number.isFinite(g.spinCount)?Math.round(Math.max(0,g.spinCount)):1e5),u&&(this.sheetProtection.algorithmName="SHA-512",this.sheetProtection.saltValue=h.randomBytes(16).toString("base64"),this.sheetProtection.spinCount=g&&"spinCount"in g?g.spinCount:1e5,this.sheetProtection.hashValue=h.convertPasswordToHash(u,"SHA512",this.sheetProtection.saltValue,this.sheetProtection.spinCount)),g&&(this.sheetProtection=Object.assign(this.sheetProtection,g),!u&&"spinCount"in g&&delete this.sheetProtection.spinCount),m()})}unprotect(){this.sheetProtection=null}addTable(u){let g=new i(this,u);return this.tables[u.name]=g,g}getTable(u){return this.tables[u]}removeTable(u){delete this.tables[u]}getTables(){return Object.values(this.tables)}addConditionalFormatting(u){this.conditionalFormattings.push(u)}removeConditionalFormatting(u){typeof u=="number"?this.conditionalFormattings.splice(u,1):this.conditionalFormattings=u instanceof Function?this.conditionalFormattings.filter(u):[]}get tabColor(){return console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor}set tabColor(u){console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor=u}get model(){let u={id:this.id,name:this.name,dataValidations:this.dataValidations.model,properties:this.properties,state:this.state,pageSetup:this.pageSetup,headerFooter:this.headerFooter,rowBreaks:this.rowBreaks,views:this.views,autoFilter:this.autoFilter,media:this._media.map(v=>v.model),sheetProtection:this.sheetProtection,tables:Object.values(this.tables).map(v=>v.model),conditionalFormattings:this.conditionalFormattings};u.cols=t.toModel(this.columns);let g=u.rows=[],m=u.dimensions=new s;return this._rows.forEach(v=>{let k=v&&v.model;k&&(m.expand(k.number,k.min,k.number,k.max),g.push(k))}),u.merges=[],l.each(this._merges,v=>{u.merges.push(v.range)}),u}_parseRows(u){this._rows=[],u.rows.forEach(g=>{let m=new r(this,g.number);this._rows[m.number-1]=m,m.model=g})}_parseMergeCells(u){l.each(u.mergeCells,g=>{this.mergeCellsWithoutStyle(g)})}set model(u){this.name=u.name,this._columns=t.fromModel(this,u.cols),this._parseRows(u),this._parseMergeCells(u),this.dataValidations=new a(u.dataValidations),this.properties=u.properties,this.pageSetup=u.pageSetup,this.headerFooter=u.headerFooter,this.views=u.views,this.autoFilter=u.autoFilter,this._media=u.media.map(g=>new c(this,g)),this.sheetProtection=u.sheetProtection,this.tables=u.tables.reduce((g,m)=>{let v=new i;return v.model=m,g[m.name]=v,g},{}),this.conditionalFormattings=u.conditionalFormattings}}},{"../utils/col-cache":19,"../utils/copy-style":20,"../utils/encryptor":21,"../utils/under-dash":26,"./column":4,"./data-validations":5,"./enums":7,"./image":8,"./range":10,"./row":11,"./table":12}],15:[function(e,d,b){"use strict";e("core-js/modules/es.promise"),e("core-js/modules/es.promise.finally"),e("core-js/modules/es.object.assign"),e("core-js/modules/es.object.keys"),e("core-js/modules/es.object.values"),e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.async-iterator"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.includes"),e("core-js/modules/es.array.find-index"),e("core-js/modules/es.array.find"),e("core-js/modules/es.string.from-code-point"),e("core-js/modules/es.string.includes"),e("core-js/modules/es.number.is-nan"),e("regenerator-runtime/runtime");let l={Workbook:e("./doc/workbook")},o=e("./doc/enums");Object.keys(o).forEach(s=>{l[s]=o[s]}),d.exports=l},{"./doc/enums":7,"./doc/workbook":13,"core-js/modules/es.array.find":359,"core-js/modules/es.array.find-index":358,"core-js/modules/es.array.includes":360,"core-js/modules/es.array.iterator":361,"core-js/modules/es.number.is-nan":363,"core-js/modules/es.object.assign":364,"core-js/modules/es.object.keys":366,"core-js/modules/es.object.values":367,"core-js/modules/es.promise":372,"core-js/modules/es.promise.finally":371,"core-js/modules/es.string.from-code-point":376,"core-js/modules/es.string.includes":377,"core-js/modules/es.symbol":381,"core-js/modules/es.symbol.async-iterator":378,"regenerator-runtime/runtime":492}],16:[function(e,d,b){"use strict";let l=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");b.bufferToString=function(o){return typeof o=="string"?o:l?l.decode(o):o.toString()}},{}],17:[function(e,d,b){"use strict";let l=typeof TextEncoder>"u"?null:new TextEncoder("utf-8"),{Buffer:o}=e("buffer");b.stringToBuffer=function(s){return typeof s!="string"?s:l?o.from(l.encode(s).buffer):o.from(s)}},{buffer:220}],18:[function(e,d,b){"use strict";let l=e("./under-dash"),o=e("./col-cache");d.exports=class{constructor(s){this.template=s,this.sheets={}}addCell(s){this.addCellEx(o.decodeEx(s))}getCell(s){return this.findCellEx(o.decodeEx(s),!0)}findCell(s){return this.findCellEx(o.decodeEx(s),!1)}findCellAt(s,r,t){let n=this.sheets[s],c=n&&n[r];return c&&c[t]}addCellEx(s){if(s.top)for(let r=s.top;r<=s.bottom;r++)for(let t=s.left;t<=s.right;t++)this.getCellAt(s.sheetName,r,t);else this.findCellEx(s,!0)}getCellEx(s){return this.findCellEx(s,!0)}findCellEx(s,r){let t=this.findSheet(s,r),n=this.findSheetRow(t,s,r);return this.findRowCell(n,s,r)}getCellAt(s,r,t){let n=this.sheets[s]||(this.sheets[s]=[]),c=n[r]||(n[r]=[]);return c[t]||(c[t]={sheetName:s,address:o.n2l(t)+r,row:r,col:t})}removeCellEx(s){let r=this.findSheet(s);if(!r)return;let t=this.findSheetRow(r,s);t&&delete t[s.col]}forEachInSheet(s,r){let t=this.sheets[s];t&&t.forEach((n,c)=>{n&&n.forEach((i,a)=>{i&&r(i,c,a)})})}forEach(s){l.each(this.sheets,(r,t)=>{this.forEachInSheet(t,s)})}map(s){let r=[];return this.forEach(t=>{r.push(s(t))}),r}findSheet(s,r){let t=s.sheetName;return this.sheets[t]?this.sheets[t]:r?this.sheets[t]=[]:void 0}findSheetRow(s,r,t){let{row:n}=r;return s&&s[n]?s[n]:t?s[n]=[]:void 0}findRowCell(s,r,t){let{col:n}=r;return s&&s[n]?s[n]:t?s[n]=this.template?Object.assign(r,JSON.parse(JSON.stringify(this.template))):r:void 0}spliceRows(s,r,t,n){let c=this.sheets[s];if(c){let i=[];for(let a=0;a<n;a++)i.push([]);c.splice(r,t,...i)}}spliceColumns(s,r,t,n){let c=this.sheets[s];if(c){let i=[];for(let a=0;a<n;a++)i.push(null);l.each(c,a=>{a.splice(r,t,...i)})}}}},{"./col-cache":19,"./under-dash":26}],19:[function(e,d,b){"use strict";let l=/^[A-Z]+\d+$/,o={_dictionary:["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],_l2nFill:0,_l2n:{},_n2l:[],_level:s=>s<=26?1:s<=676?2:3,_fill(s){let r,t,n,c,i,a=1;if(s>=4)throw new Error("Out of bounds. Excel supports columns from 1 to 16384");if(this._l2nFill<1&&s>=1){for(;a<=26;)r=this._dictionary[a-1],this._n2l[a]=r,this._l2n[r]=a,a++;this._l2nFill=1}if(this._l2nFill<2&&s>=2){for(a=27;a<=702;)t=a-27,n=t%26,c=Math.floor(t/26),r=this._dictionary[c]+this._dictionary[n],this._n2l[a]=r,this._l2n[r]=a,a++;this._l2nFill=2}if(this._l2nFill<3&&s>=3){for(a=703;a<=16384;)t=a-703,n=t%26,c=Math.floor(t/26)%26,i=Math.floor(t/676),r=this._dictionary[i]+this._dictionary[c]+this._dictionary[n],this._n2l[a]=r,this._l2n[r]=a,a++;this._l2nFill=3}},l2n(s){if(this._l2n[s]||this._fill(s.length),!this._l2n[s])throw new Error("Out of bounds. Invalid column letter: "+s);return this._l2n[s]},n2l(s){if(s<1||s>16384)throw new Error(s+" is out of bounds. Excel supports columns from 1 to 16384");return this._n2l[s]||this._fill(this._level(s)),this._n2l[s]},_hash:{},validateAddress(s){if(!l.test(s))throw new Error("Invalid Address: "+s);return!0},decodeAddress(s){let r=s.length<5&&this._hash[s];if(r)return r;let t=!1,n="",c=0,i=!1,a="",h=0;for(let u,g=0;g<s.length;g++)if(u=s.charCodeAt(g),!i&&u>=65&&u<=90)t=!0,n+=s[g],c=26*c+u-64;else if(u>=48&&u<=57)i=!0,a+=s[g],h=10*h+u-48;else if(i&&t&&u!==36)break;if(t){if(c>16384)throw new Error("Out of bounds. Invalid column letter: "+n)}else c=void 0;i||(h=void 0);let f={address:s=n+a,col:c,row:h,$col$row:`$${n}$${a}`};return c<=100&&h<=100&&(this._hash[s]=f,this._hash[f.$col$row]=f),f},getAddress(s,r){if(r){let t=this.n2l(r)+s;return this.decodeAddress(t)}return this.decodeAddress(s)},decode(s){let r=s.split(":");if(r.length===2){let t=this.decodeAddress(r[0]),n=this.decodeAddress(r[1]),c={top:Math.min(t.row,n.row),left:Math.min(t.col,n.col),bottom:Math.max(t.row,n.row),right:Math.max(t.col,n.col)};return c.tl=this.n2l(c.left)+c.top,c.br=this.n2l(c.right)+c.bottom,c.dimensions=`${c.tl}:${c.br}`,c}return this.decodeAddress(s)},decodeEx(s){let r=s.match(/(?:(?:(?:'((?:[^']|'')*)')|([^'^ !]*))!)?(.*)/),t=r[1]||r[2],n=r[3],c=n.split(":");if(c.length>1){let a=this.decodeAddress(c[0]),h=this.decodeAddress(c[1]),f=Math.min(a.row,h.row),u=Math.min(a.col,h.col),g=Math.max(a.row,h.row),m=Math.max(a.col,h.col);return a=this.n2l(u)+f,h=this.n2l(m)+g,{top:f,left:u,bottom:g,right:m,sheetName:t,tl:{address:a,col:u,row:f,$col$row:`$${this.n2l(u)}$${f}`,sheetName:t},br:{address:h,col:m,row:g,$col$row:`$${this.n2l(m)}$${g}`,sheetName:t},dimensions:`${a}:${h}`}}if(n.startsWith("#"))return t?{sheetName:t,error:n}:{error:n};let i=this.decodeAddress(n);return t?{sheetName:t,...i}:i},encodeAddress:(s,r)=>o.n2l(r)+s,encode(){switch(arguments.length){case 2:return o.encodeAddress(arguments[0],arguments[1]);case 4:return`${o.encodeAddress(arguments[0],arguments[1])}:${o.encodeAddress(arguments[2],arguments[3])}`;default:throw new Error("Can only encode with 2 or 4 arguments")}},inRange(s,r){let[t,n,,c,i]=s,[a,h]=r;return a>=t&&a<=c&&h>=n&&h<=i}};d.exports=o},{}],20:[function(e,d,b){"use strict";let l=(s,r)=>({...s,...r.reduce((t,n)=>(s[n]&&(t[n]={...s[n]}),t),{})}),o=function(s,r,t){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:[];s[t]&&(r[t]=l(s[t],n))};b.copyStyle=s=>{if(!s)return s;if(r=s,Object.keys(r).length===0)return{};var r;let t={...s};return o(s,t,"font",["color"]),o(s,t,"alignment"),o(s,t,"protection"),s.border&&(o(s,t,"border"),o(s.border,t.border,"top",["color"]),o(s.border,t.border,"left",["color"]),o(s.border,t.border,"bottom",["color"]),o(s.border,t.border,"right",["color"]),o(s.border,t.border,"diagonal",["color"])),s.fill&&(o(s,t,"fill",["fgColor","bgColor","center"]),s.fill.stops&&(t.fill.stops=s.fill.stops.map(n=>l(n,["color"])))),t}},{}],21:[function(e,d,b){(function(l){(function(){"use strict";let o=e("crypto"),s={hash(r){let t=o.createHash(r);for(var n=arguments.length,c=new Array(n>1?n-1:0),i=1;i<n;i++)c[i-1]=arguments[i];return t.update(l.concat(c)),t.digest()},convertPasswordToHash(r,t,n,c){if(t=t.toLowerCase(),o.getHashes().indexOf(t)<0)throw new Error(`Hash algorithm '${t}' not supported!`);let i=l.from(r,"utf16le"),a=this.hash(t,l.from(n,"base64"),i);for(let h=0;h<c;h++){let f=l.alloc(4);f.writeUInt32LE(h,0),a=this.hash(t,a,f)}return a.toString("base64")},randomBytes:r=>o.randomBytes(r)};d.exports=s}).call(this)}).call(this,e("buffer").Buffer)},{buffer:220,crypto:390}],22:[function(e,d,b){"use strict";let{SaxesParser:l}=e("saxes"),{PassThrough:o}=e("readable-stream"),{bufferToString:s}=e("./browser-buffer-decode");d.exports=async function*(r){r.pipe&&!r[Symbol.asyncIterator]&&(r=r.pipe(new o));let t=new l,n;t.on("error",i=>{n=i});let c=[];t.on("opentag",i=>c.push({eventType:"opentag",value:i})),t.on("text",i=>c.push({eventType:"text",value:i})),t.on("closetag",i=>c.push({eventType:"closetag",value:i}));for await(let i of r){if(t.write(s(i)),n)throw n;yield c,c=[]}}},{"./browser-buffer-decode":16,"readable-stream":491,saxes:496}],23:[function(e,d,b){"use strict";let l=e("./col-cache"),o=/(([a-z_\-0-9]*)!)?([a-z0-9_$]{2,})([(])?/gi,s=/^([$])?([a-z]+)([$])?([1-9][0-9]*)$/i;d.exports={slideFormula:function(r,t,n){let c=l.decode(t),i=l.decode(n);return r.replace(o,(a,h,f,u,g)=>{if(g)return a;let m=s.exec(u);if(m){let v=m[1],k=m[2].toUpperCase(),B=m[3],R=m[4];if(k.length>3||k.length===3&&k>"XFD")return a;let L=l.l2n(k),A=parseInt(R,10);return v||(L+=i.col-c.col),B||(A+=i.row-c.row),(h||"")+(v||"")+l.n2l(L)+(B||"")+A}return a})}}},{"./col-cache":19}],24:[function(e,d,b){(function(l,o){(function(){"use strict";let s=e("readable-stream"),r=e("./utils"),t=e("./string-buf");class n{constructor(u,g){this._data=u,this._encoding=g}get length(){return this.toBuffer().length}copy(u,g,m,v){return this.toBuffer().copy(u,g,m,v)}toBuffer(){return this._buffer||(this._buffer=o.from(this._data,this._encoding)),this._buffer}}class c{constructor(u){this._data=u}get length(){return this._data.length}copy(u,g,m,v){return this._data._buf.copy(u,g,m,v)}toBuffer(){return this._data.toBuffer()}}class i{constructor(u){this._data=u}get length(){return this._data.length}copy(u,g,m,v){this._data.copy(u,g,m,v)}toBuffer(){return this._data}}class a{constructor(u){this.size=u,this.buffer=o.alloc(u),this.iRead=0,this.iWrite=0}toBuffer(){if(this.iRead===0&&this.iWrite===this.size)return this.buffer;let u=o.alloc(this.iWrite-this.iRead);return this.buffer.copy(u,0,this.iRead,this.iWrite),u}get length(){return this.iWrite-this.iRead}get eod(){return this.iRead===this.iWrite}get full(){return this.iWrite===this.size}read(u){let g;return u===0?null:u===void 0||u>=this.length?(g=this.toBuffer(),this.iRead=this.iWrite,g):(g=o.alloc(u),this.buffer.copy(g,0,this.iRead,u),this.iRead+=u,g)}write(u,g,m){let v=Math.min(m,this.size-this.iWrite);return u.copy(this.buffer,this.iWrite,g,g+v),this.iWrite+=v,v}}let h=function(f){f=f||{},this.bufSize=f.bufSize||1048576,this.buffers=[],this.batch=f.batch||!1,this.corked=!1,this.inPos=0,this.outPos=0,this.pipes=[],this.paused=!1,this.encoding=null};r.inherits(h,s.Duplex,{toBuffer(){switch(this.buffers.length){case 0:return null;case 1:return this.buffers[0].toBuffer();default:return o.concat(this.buffers.map(f=>f.toBuffer()))}},_getWritableBuffer(){if(this.buffers.length){let u=this.buffers[this.buffers.length-1];if(!u.full)return u}let f=new a(this.bufSize);return this.buffers.push(f),f},async _pipe(f){await Promise.all(this.pipes.map((function(u){return new Promise(g=>{u.write(f.toBuffer(),()=>{g()})})})))},_writeToBuffers(f){let u=0,g=f.length;for(;u<g;)u+=this._getWritableBuffer().write(f,u,g-u)},async write(f,u,g){let m;if(u instanceof Function&&(g=u,u="utf8"),g=g||r.nop,f instanceof t)m=new c(f);else if(f instanceof o)m=new i(f);else{if(!(typeof f=="string"||f instanceof String||f instanceof ArrayBuffer))throw new Error("Chunk must be one of type String, Buffer or StringBuf.");m=new n(f,u)}if(this.pipes.length)if(this.batch)for(this._writeToBuffers(m);!this.corked&&this.buffers.length>1;)this._pipe(this.buffers.shift());else this.corked?(this._writeToBuffers(m),l.nextTick(g)):(await this._pipe(m),g());else this.paused||this.emit("data",m.toBuffer()),this._writeToBuffers(m),this.emit("readable");return!0},cork(){this.corked=!0},_flush(){if(this.pipes.length)for(;this.buffers.length;)this._pipe(this.buffers.shift())},uncork(){this.corked=!1,this._flush()},end(f,u,g){let m=v=>{v?g(v):(this._flush(),this.pipes.forEach(k=>{k.end()}),this.emit("finish"))};f?this.write(f,u,m):m()},read(f){let u;if(f){for(u=[];f&&this.buffers.length&&!this.buffers[0].eod;){let g=this.buffers[0],m=g.read(f);f-=m.length,u.push(m),g.eod&&g.full&&this.buffers.shift()}return o.concat(u)}return u=this.buffers.map(g=>g.toBuffer()).filter(Boolean),this.buffers=[],o.concat(u)},setEncoding(f){this.encoding=f},pause(){this.paused=!0},resume(){this.paused=!1},isPaused(){return!!this.paused},pipe(f){this.pipes.push(f),!this.paused&&this.buffers.length&&this.end()},unpipe(f){this.pipes=this.pipes.filter(u=>u!==f)},unshift(){throw new Error("Not Implemented")},wrap(){throw new Error("Not Implemented")}}),d.exports=h}).call(this)}).call(this,e("_process"),e("buffer").Buffer)},{"./string-buf":25,"./utils":27,_process:467,buffer:220,"readable-stream":491}],25:[function(e,d,b){(function(l){(function(){"use strict";d.exports=class{constructor(o){this._buf=l.alloc(o&&o.size||16384),this._encoding=o&&o.encoding||"utf8",this._inPos=0,this._buffer=void 0}get length(){return this._inPos}get capacity(){return this._buf.length}get buffer(){return this._buf}toBuffer(){return this._buffer||(this._buffer=l.alloc(this.length),this._buf.copy(this._buffer,0,0,this.length)),this._buffer}reset(o){o=o||0,this._buffer=void 0,this._inPos=o}_grow(o){let s=2*this._buf.length;for(;s<o;)s*=2;let r=l.alloc(s);this._buf.copy(r,0),this._buf=r}addText(o){this._buffer=void 0;let s=this._inPos+this._buf.write(o,this._inPos,this._encoding);for(;s>=this._buf.length-4;)this._grow(this._inPos+o.length),s=this._inPos+this._buf.write(o,this._inPos,this._encoding);this._inPos=s}addStringBuf(o){o.length&&(this._buffer=void 0,this.length+o.length>this.capacity&&this._grow(this.length+o.length),o._buf.copy(this._buf,this._inPos,0,o.length),this._inPos+=o.length)}}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:220}],26:[function(e,d,b){"use strict";let{toString:l}=Object.prototype,o=/["&<>]/,s={each:function(r,t){r&&(Array.isArray(r)?r.forEach(t):Object.keys(r).forEach(n=>{t(r[n],n)}))},some:function(r,t){return!!r&&(Array.isArray(r)?r.some(t):Object.keys(r).some(n=>t(r[n],n)))},every:function(r,t){return!r||(Array.isArray(r)?r.every(t):Object.keys(r).every(n=>t(r[n],n)))},map:function(r,t){return r?Array.isArray(r)?r.map(t):Object.keys(r).map(n=>t(r[n],n)):[]},keyBy:(r,t)=>r.reduce((n,c)=>(n[c[t]]=c,n),{}),isEqual:function(r,t){let n=typeof r,c=typeof t,i=Array.isArray(r),a=Array.isArray(t),h;if(n!==c)return!1;switch(typeof r){case"object":if(i||a)return!(!i||!a)&&r.length===t.length&&r.every((f,u)=>{let g=t[u];return s.isEqual(f,g)});if(r===null||t===null)return r===t;if(h=Object.keys(r),Object.keys(t).length!==h.length)return!1;for(let f of h)if(!t.hasOwnProperty(f))return!1;return s.every(r,(f,u)=>{let g=t[u];return s.isEqual(f,g)});default:return r===t}},escapeHtml(r){let t=o.exec(r);if(!t)return r;let n="",c="",i=0,a=t.index;for(;a<r.length;a++){switch(r.charAt(a)){case'"':c="&quot;";break;case"&":c="&amp;";break;case"'":c="&apos;";break;case"<":c="&lt;";break;case">":c="&gt;";break;default:continue}i!==a&&(n+=r.substring(i,a)),i=a+1,n+=c}return i!==a?n+r.substring(i,a):n},strcmp:(r,t)=>r<t?-1:r>t?1:0,isUndefined:r=>l.call(r)==="[object Undefined]",isObject:r=>l.call(r)==="[object Object]",deepMerge(){let r=arguments[0]||{},{length:t}=arguments,n,c,i;function a(h,f){n=r[f],i=Array.isArray(h),s.isObject(h)||i?(i?(i=!1,c=n&&Array.isArray(n)?n:[]):c=n&&s.isObject(n)?n:{},r[f]=s.deepMerge(c,h)):s.isUndefined(h)||(r[f]=h)}for(let h=0;h<t;h++)s.each(arguments[h],a);return r}};d.exports=s},{}],27:[function(e,d,b){(function(l,o){(function(){"use strict";let s=e("fs"),r=/[<>&'"\x7F\x00-\x08\x0B-\x0C\x0E-\x1F]/,t={nop(){},promiseImmediate:n=>new Promise(c=>{l.setImmediate?o(()=>{c(n)}):setTimeout(()=>{c(n)},1)}),inherits:function(n,c,i,a){n.super_=c,a||(a=i,i=null),i&&Object.keys(i).forEach(f=>{Object.defineProperty(n,f,Object.getOwnPropertyDescriptor(i,f))});let h={constructor:{value:n,enumerable:!1,writable:!1,configurable:!0}};a&&Object.keys(a).forEach(f=>{h[f]=Object.getOwnPropertyDescriptor(a,f)}),n.prototype=Object.create(c.prototype,h)},dateToExcel:(n,c)=>25569+n.getTime()/864e5-(c?1462:0),excelToDate(n,c){let i=Math.round(24*(n-25569+(c?1462:0))*3600*1e3);return new Date(i)},parsePath(n){let c=n.lastIndexOf("/");return{path:n.substring(0,c),name:n.substring(c+1)}},getRelsPath(n){let c=t.parsePath(n);return`${c.path}/_rels/${c.name}.rels`},xmlEncode(n){let c=r.exec(n);if(!c)return n;let i="",a="",h=0,f=c.index;for(;f<n.length;f++){let u=n.charCodeAt(f);switch(u){case 34:a="&quot;";break;case 38:a="&amp;";break;case 39:a="&apos;";break;case 60:a="&lt;";break;case 62:a="&gt;";break;case 127:a="";break;default:if(u<=31&&(u<=8||u>=11&&u!==13)){a="";break}continue}h!==f&&(i+=n.substring(h,f)),h=f+1,a&&(i+=a)}return h!==f?i+n.substring(h,f):i},xmlDecode:n=>n.replace(/&([a-z]*);/g,c=>{switch(c){case"&lt;":return"<";case"&gt;":return">";case"&amp;":return"&";case"&apos;":return"'";case"&quot;":return'"';default:return c}}),validInt(n){let c=parseInt(n,10);return Number.isNaN(c)?0:c},isDateFmt(n){return n?(n=(n=n.replace(/\[[^\]]*]/g,"")).replace(/"[^"]*"/g,"")).match(/[ymdhMsb]+/)!==null:!1},fs:{exists:n=>new Promise(c=>{s.access(n,s.constants.F_OK,i=>{c(!i)})})},toIsoDateString:n=>n.toIsoString().subsstr(0,10),parseBoolean:n=>n===!0||n==="true"||n===1||n==="1"};d.exports=t}).call(this)}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{},e("timers").setImmediate)},{fs:216,timers:523}],28:[function(e,d,b){"use strict";let l=e("./under-dash"),o=e("./utils");function s(n,c,i){n.push(` ${c}="${o.xmlEncode(i.toString())}"`)}function r(n,c){if(c){let i=[];l.each(c,(a,h)=>{a!==void 0&&s(i,h,a)}),n.push(i.join(""))}}class t{constructor(){this._xml=[],this._stack=[],this._rollbacks=[]}get tos(){return this._stack.length?this._stack[this._stack.length-1]:void 0}get cursor(){return this._xml.length}openXml(c){let i=this._xml;i.push("<?xml"),r(i,c),i.push(`?>
2
2
  `)}openNode(c,i){let a=this.tos,h=this._xml;a&&this.open&&h.push(">"),this._stack.push(c),h.push("<"),h.push(c),r(h,i),this.leaf=!0,this.open=!0}addAttribute(c,i){if(!this.open)throw new Error("Cannot write attributes to node if it is not open");i!==void 0&&s(this._xml,c,i)}addAttributes(c){if(!this.open)throw new Error("Cannot write attributes to node if it is not open");r(this._xml,c)}writeText(c){let i=this._xml;this.open&&(i.push(">"),this.open=!1),this.leaf=!1,i.push(o.xmlEncode(c.toString()))}writeXml(c){this.open&&(this._xml.push(">"),this.open=!1),this.leaf=!1,this._xml.push(c)}closeNode(){let c=this._stack.pop(),i=this._xml;this.leaf?i.push("/>"):(i.push("</"),i.push(c),i.push(">")),this.open=!1,this.leaf=!1}leafNode(c,i,a){this.openNode(c,i),a!==void 0&&this.writeText(a),this.closeNode()}closeAll(){for(;this._stack.length;)this.closeNode()}addRollback(){return this._rollbacks.push({xml:this._xml.length,stack:this._stack.length,leaf:this.leaf,open:this.open}),this.cursor}commit(){this._rollbacks.pop()}rollback(){let c=this._rollbacks.pop();this._xml.length>c.xml&&this._xml.splice(c.xml,this._xml.length-c.xml),this._stack.length>c.stack&&this._stack.splice(c.stack,this._stack.length-c.stack),this.leaf=c.leaf,this.open=c.open}get xml(){return this.closeAll(),this._xml.join("")}}t.StdDocAttributes={version:"1.0",encoding:"UTF-8",standalone:"yes"},d.exports=t},{"./under-dash":26,"./utils":27}],29:[function(e,d,b){(function(l){(function(){"use strict";let o=e("events"),s=e("jszip"),r=e("./stream-buf"),{stringToBuffer:t}=e("./browser-buffer-encode");class n extends o.EventEmitter{constructor(i){super(),this.options=Object.assign({type:"nodebuffer",compression:"DEFLATE"},i),this.zip=new s,this.stream=new r}append(i,a){a.hasOwnProperty("base64")&&a.base64?this.zip.file(a.name,i,{base64:!0}):(l.browser&&typeof i=="string"&&(i=t(i)),this.zip.file(a.name,i))}async finalize(){let i=await this.zip.generateAsync(this.options);this.stream.end(i),this.emit("finish")}read(i){return this.stream.read(i)}setEncoding(i){return this.stream.setEncoding(i)}pause(){return this.stream.pause()}resume(){return this.stream.resume()}isPaused(){return this.stream.isPaused()}pipe(i,a){return this.stream.pipe(i,a)}unpipe(i){return this.stream.unpipe(i)}unshift(i){return this.stream.unshift(i)}wrap(i){return this.stream.wrap(i)}}d.exports={ZipWriter:n}}).call(this)}).call(this,e("_process"))},{"./browser-buffer-encode":17,"./stream-buf":24,_process:467,events:422,jszip:441}],30:[function(e,d,b){"use strict";d.exports={0:{f:"General"},1:{f:"0"},2:{f:"0.00"},3:{f:"#,##0"},4:{f:"#,##0.00"},9:{f:"0%"},10:{f:"0.00%"},11:{f:"0.00E+00"},12:{f:"# ?/?"},13:{f:"# ??/??"},14:{f:"mm-dd-yy"},15:{f:"d-mmm-yy"},16:{f:"d-mmm"},17:{f:"mmm-yy"},18:{f:"h:mm AM/PM"},19:{f:"h:mm:ss AM/PM"},20:{f:"h:mm"},21:{f:"h:mm:ss"},22:{f:'m/d/yy "h":mm'},27:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"\u5E74"m"\u6708"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"\u5E74" mm"\u6708" dd"\u65E5"'},28:{"zh-tw":'[$-404]e"\u5E74"m"\u6708"d"\u65E5"',"zh-cn":'m"\u6708"d"\u65E5"',"ja-jp":'[$-411]ggge"\u5E74"m"\u6708"d"\u65E5"',"ko-kr":"mm-dd"},29:{"zh-tw":'[$-404]e"\u5E74"m"\u6708"d"\u65E5"',"zh-cn":'m"\u6708"d"\u65E5"',"ja-jp":'[$-411]ggge"\u5E74"m"\u6708"d"\u65E5"',"ko-kr":"mm-dd"},30:{"zh-tw":"m/d/yy ","zh-cn":"m-d-yy","ja-jp":"m/d/yy","ko-kr":"mm-dd-yy"},31:{"zh-tw":'yyyy"\u5E74"m"\u6708"d"\u65E5"',"zh-cn":'yyyy"\u5E74"m"\u6708"d"\u65E5"',"ja-jp":'yyyy"\u5E74"m"\u6708"d"\u65E5"',"ko-kr":'yyyy"\uB144" mm"\uC6D4" dd"\uC77C"'},32:{"zh-tw":'hh"\u6642"mm"\u5206"',"zh-cn":'h"\u65F6"mm"\u5206"',"ja-jp":'h"\u6642"mm"\u5206"',"ko-kr":'h"\uC2DC" mm"\uBD84"'},33:{"zh-tw":'hh"\u6642"mm"\u5206"ss"\u79D2"',"zh-cn":'h"\u65F6"mm"\u5206"ss"\u79D2"',"ja-jp":'h"\u6642"mm"\u5206"ss"\u79D2"',"ko-kr":'h"\uC2DC" mm"\uBD84" ss"\uCD08"'},34:{"zh-tw":'\u4E0A\u5348/\u4E0B\u5348 hh"\u6642"mm"\u5206"',"zh-cn":'\u4E0A\u5348/\u4E0B\u5348 h"\u65F6"mm"\u5206"',"ja-jp":'yyyy"\u5E74"m"\u6708"',"ko-kr":"yyyy-mm-dd"},35:{"zh-tw":'\u4E0A\u5348/\u4E0B\u5348 hh"\u6642"mm"\u5206"ss"\u79D2"',"zh-cn":'\u4E0A\u5348/\u4E0B\u5348 h"\u65F6"mm"\u5206"ss"\u79D2"',"ja-jp":'m"\u6708"d"\u65E5"',"ko-kr":"yyyy-mm-dd"},36:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"\u5E74"m"\u6708"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"\u5E74" mm"\u6708" dd"\u65E5"'},37:{f:"#,##0 ;(#,##0)"},38:{f:"#,##0 ;[Red](#,##0)"},39:{f:"#,##0.00 ;(#,##0.00)"},40:{f:"#,##0.00 ;[Red](#,##0.00)"},45:{f:"mm:ss"},46:{f:"[h]:mm:ss"},47:{f:"mmss.0"},48:{f:"##0.0E+0"},49:{f:"@"},50:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"\u5E74"m"\u6708"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"\u5E74" mm"\u6708" dd"\u65E5"'},51:{"zh-tw":'[$-404]e"\u5E74"m"\u6708"d"\u65E5"',"zh-cn":'m"\u6708"d"\u65E5"',"ja-jp":'[$-411]ggge"\u5E74"m"\u6708"d"\u65E5"',"ko-kr":"mm-dd"},52:{"zh-tw":'\u4E0A\u5348/\u4E0B\u5348 hh"\u6642"mm"\u5206"',"zh-cn":'yyyy"\u5E74"m"\u6708"',"ja-jp":'yyyy"\u5E74"m"\u6708"',"ko-kr":"yyyy-mm-dd"},53:{"zh-tw":'\u4E0A\u5348/\u4E0B\u5348 hh"\u6642"mm"\u5206"ss"\u79D2"',"zh-cn":'m"\u6708"d"\u65E5"',"ja-jp":'m"\u6708"d"\u65E5"',"ko-kr":"yyyy-mm-dd"},54:{"zh-tw":'[$-404]e"\u5E74"m"\u6708"d"\u65E5"',"zh-cn":'m"\u6708"d"\u65E5"',"ja-jp":'[$-411]ggge"\u5E74"m"\u6708"d"\u65E5"',"ko-kr":"mm-dd"},55:{"zh-tw":'\u4E0A\u5348/\u4E0B\u5348 hh"\u6642"mm"\u5206"',"zh-cn":'\u4E0A\u5348/\u4E0B\u5348 h"\u65F6"mm"\u5206"',"ja-jp":'yyyy"\u5E74"m"\u6708"',"ko-kr":"yyyy-mm-dd"},56:{"zh-tw":'\u4E0A\u5348/\u4E0B\u5348 hh"\u6642"mm"\u5206"ss"\u79D2"',"zh-cn":'\u4E0A\u5348/\u4E0B\u5348 h"\u65F6"mm"\u5206"ss"\u79D2"',"ja-jp":'m"\u6708"d"\u65E5"',"ko-kr":"yyyy-mm-dd"},57:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"\u5E74"m"\u6708"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"\u5E74" mm"\u6708" dd"\u65E5"'},58:{"zh-tw":'[$-404]e"\u5E74"m"\u6708"d"\u65E5"',"zh-cn":'m"\u6708"d"\u65E5"',"ja-jp":'[$-411]ggge"\u5E74"m"\u6708"d"\u65E5"',"ko-kr":"mm-dd"},59:{"th-th":"t0"},60:{"th-th":"t0.00"},61:{"th-th":"t#,##0"},62:{"th-th":"t#,##0.00"},67:{"th-th":"t0%"},68:{"th-th":"t0.00%"},69:{"th-th":"t# ?/?"},70:{"th-th":"t# ??/??"},81:{"th-th":"d/m/bb"}}},{}],31:[function(e,d,b){"use strict";d.exports={OfficeDocument:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",Worksheet:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet",CalcChain:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/calcChain",SharedStrings:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",Styles:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",Theme:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",Hyperlink:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",Image:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",CoreProperties:"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",ExtenderProperties:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",Comments:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",VmlDrawing:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing",Table:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/table"}},{}],32:[function(e,d,b){"use strict";let l=e("../../utils/parse-sax"),o=e("../../utils/xml-stream");class s{prepare(){}render(){}parseOpen(t){}parseText(t){}parseClose(t){}reconcile(t,n){}reset(){this.model=null,this.map&&Object.values(this.map).forEach(t=>{t instanceof s?t.reset():t.xform&&t.xform.reset()})}mergeModel(t){this.model=Object.assign(this.model||{},t)}async parse(t){for await(let n of t)for(let{eventType:c,value:i}of n)if(c==="opentag")this.parseOpen(i);else if(c==="text")this.parseText(i);else if(c==="closetag"&&!this.parseClose(i.name))return this.model;return this.model}async parseStream(t){return this.parse(l(t))}get xml(){return this.toXml(this.model)}toXml(t){let n=new o;return this.render(n,t),n.xml}static toAttribute(t,n){let c=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(t===void 0){if(c)return n}else if(c||t!==n)return t.toString()}static toStringAttribute(t,n){let c=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return s.toAttribute(t,n,c)}static toStringValue(t,n){return t===void 0?n:t}static toBoolAttribute(t,n){let c=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(t===void 0){if(c)return n}else if(c||t!==n)return t?"1":"0"}static toBoolValue(t,n){return t===void 0?n:t==="1"}static toIntAttribute(t,n){let c=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return s.toAttribute(t,n,c)}static toIntValue(t,n){return t===void 0?n:parseInt(t,10)}static toFloatAttribute(t,n){let c=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return s.toAttribute(t,n,c)}static toFloatValue(t,n){return t===void 0?n:parseFloat(t)}}d.exports=s},{"../../utils/parse-sax":22,"../../utils/xml-stream":28}],33:[function(e,d,b){"use strict";let l=e("../base-xform"),o=e("../../../utils/col-cache");function s(t){try{return o.decodeEx(t),!0}catch{return!1}}function r(t){let n=[],c=!1,i="";return t.split(",").forEach(a=>{if(!a)return;let h=(a.match(/'/g)||[]).length;if(!h)return void(c?i+=a+",":s(a)&&n.push(a));let f=h%2==0;!c&&f&&s(a)?n.push(a):c&&!f?(c=!1,s(i+a)&&n.push(i+a),i=""):(c=!0,i+=a+",")}),n}d.exports=class extends l{render(t,n){t.openNode("definedName",{name:n.name,localSheetId:n.localSheetId}),t.writeText(n.ranges.join(",")),t.closeNode()}parseOpen(t){return t.name==="definedName"?(this._parsedName=t.attributes.name,this._parsedLocalSheetId=t.attributes.localSheetId,this._parsedText=[],!0):!1}parseText(t){this._parsedText.push(t)}parseClose(){return this.model={name:this._parsedName,ranges:r(this._parsedText.join(""))},this._parsedLocalSheetId!==void 0&&(this.model.localSheetId=parseInt(this._parsedLocalSheetId,10)),!1}}},{"../../../utils/col-cache":19,"../base-xform":32}],34:[function(e,d,b){"use strict";let l=e("../../../utils/utils"),o=e("../base-xform");d.exports=class extends o{render(s,r){s.leafNode("sheet",{sheetId:r.id,name:r.name,state:r.state,"r:id":r.rId})}parseOpen(s){return s.name==="sheet"&&(this.model={name:l.xmlDecode(s.attributes.name),id:parseInt(s.attributes.sheetId,10),state:s.attributes.state,rId:s.attributes["r:id"]},!0)}parseText(){}parseClose(){return!1}}},{"../../../utils/utils":27,"../base-xform":32}],35:[function(e,d,b){"use strict";let l=e("../base-xform");d.exports=class extends l{render(o,s){o.leafNode("calcPr",{calcId:171027,fullCalcOnLoad:s.fullCalcOnLoad?1:void 0})}parseOpen(o){return o.name==="calcPr"&&(this.model={},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],36:[function(e,d,b){"use strict";let l=e("../base-xform");d.exports=class extends l{render(o,s){o.leafNode("workbookPr",{date1904:s.date1904?1:void 0,defaultThemeVersion:164011,filterPrivacy:1})}parseOpen(o){return o.name==="workbookPr"&&(this.model={date1904:o.attributes.date1904==="1"},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],37:[function(e,d,b){"use strict";let l=e("../base-xform");d.exports=class extends l{render(o,s){let r={xWindow:s.x||0,yWindow:s.y||0,windowWidth:s.width||12e3,windowHeight:s.height||24e3,firstSheet:s.firstSheet,activeTab:s.activeTab};s.visibility&&s.visibility!=="visible"&&(r.visibility=s.visibility),o.leafNode("workbookView",r)}parseOpen(o){if(o.name==="workbookView"){let s=this.model={},r=function(n,c,i){let a=c!==void 0?s[n]=c:i;a!==void 0&&(s[n]=a)},t=function(n,c,i){let a=c!==void 0?s[n]=parseInt(c,10):i;a!==void 0&&(s[n]=a)};return t("x",o.attributes.xWindow,0),t("y",o.attributes.yWindow,0),t("width",o.attributes.windowWidth,25e3),t("height",o.attributes.windowHeight,1e4),r("visibility",o.attributes.visibility,"visible"),t("activeTab",o.attributes.activeTab,void 0),t("firstSheet",o.attributes.firstSheet,void 0),!0}return!1}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],38:[function(e,d,b){"use strict";let l=e("../../../utils/under-dash"),o=e("../../../utils/col-cache"),s=e("../../../utils/xml-stream"),r=e("../base-xform"),t=e("../static-xform"),n=e("../list-xform"),c=e("./defined-name-xform"),i=e("./sheet-xform"),a=e("./workbook-view-xform"),h=e("./workbook-properties-xform"),f=e("./workbook-calc-properties-xform");class u extends r{constructor(){super(),this.map={fileVersion:u.STATIC_XFORMS.fileVersion,workbookPr:new h,bookViews:new n({tag:"bookViews",count:!1,childXform:new a}),sheets:new n({tag:"sheets",count:!1,childXform:new i}),definedNames:new n({tag:"definedNames",count:!1,childXform:new c}),calcPr:new f}}prepare(m){m.sheets=m.worksheets;let v=[],k=0;m.sheets.forEach(B=>{if(B.pageSetup&&B.pageSetup.printArea&&B.pageSetup.printArea.split("&&").forEach(R=>{let L=R.split(":"),A={name:"_xlnm.Print_Area",ranges:[`'${B.name}'!$${L[0]}:$${L[1]}`],localSheetId:k};v.push(A)}),B.pageSetup&&(B.pageSetup.printTitlesRow||B.pageSetup.printTitlesColumn)){let R=[];if(B.pageSetup.printTitlesColumn){let A=B.pageSetup.printTitlesColumn.split(":");R.push(`'${B.name}'!$${A[0]}:$${A[1]}`)}if(B.pageSetup.printTitlesRow){let A=B.pageSetup.printTitlesRow.split(":");R.push(`'${B.name}'!$${A[0]}:$${A[1]}`)}let L={name:"_xlnm.Print_Titles",ranges:R,localSheetId:k};v.push(L)}k++}),v.length&&(m.definedNames=m.definedNames.concat(v)),(m.media||[]).forEach((B,R)=>{B.name=B.type+(R+1)})}render(m,v){m.openXml(s.StdDocAttributes),m.openNode("workbook",u.WORKBOOK_ATTRIBUTES),this.map.fileVersion.render(m),this.map.workbookPr.render(m,v.properties),this.map.bookViews.render(m,v.views),this.map.sheets.render(m,v.sheets),this.map.definedNames.render(m,v.definedNames),this.map.calcPr.render(m,v.calcProperties),m.closeNode()}parseOpen(m){return this.parser?(this.parser.parseOpen(m),!0):(m.name==="workbook"||(this.parser=this.map[m.name],this.parser&&this.parser.parseOpen(m)),!0)}parseText(m){this.parser&&this.parser.parseText(m)}parseClose(m){return this.parser?(this.parser.parseClose(m)||(this.parser=void 0),!0):m==="workbook"?(this.model={sheets:this.map.sheets.model,properties:this.map.workbookPr.model||{},views:this.map.bookViews.model,calcProperties:{}},this.map.definedNames.model&&(this.model.definedNames=this.map.definedNames.model),!1):!0}reconcile(m){let v=(m.workbookRels||[]).reduce((A,P)=>(A[P.Id]=P,A),{}),k=[],B,R=0;(m.sheets||[]).forEach(A=>{let P=v[A.rId];P&&(B=m.worksheetHash["xl/"+P.Target.replace(/^(\s|\/xl\/)+/,"")],B&&(B.name=A.name,B.id=A.id,B.state=A.state,k[R++]=B))});let L=[];l.each(m.definedNames,A=>{if(A.name==="_xlnm.Print_Area"){if(B=k[A.localSheetId],B){B.pageSetup||(B.pageSetup={});let P=o.decodeEx(A.ranges[0]);B.pageSetup.printArea=B.pageSetup.printArea?`${B.pageSetup.printArea}&&${P.dimensions}`:P.dimensions}}else if(A.name==="_xlnm.Print_Titles"){if(B=k[A.localSheetId],B){B.pageSetup||(B.pageSetup={});let P=A.ranges.join(","),N=/\$/g,q=/\$\d+:\$\d+/,j=P.match(q);if(j&&j.length){let D=j[0];B.pageSetup.printTitlesRow=D.replace(N,"")}let S=/\$[A-Z]+:\$[A-Z]+/,T=P.match(S);if(T&&T.length){let D=T[0];B.pageSetup.printTitlesColumn=D.replace(N,"")}}}else L.push(A)}),m.definedNames=L,m.media.forEach((A,P)=>{A.index=P})}}u.WORKBOOK_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"x15","xmlns:x15":"http://schemas.microsoft.com/office/spreadsheetml/2010/11/main"},u.STATIC_XFORMS={fileVersion:new t({tag:"fileVersion",$:{appName:"xl",lastEdited:5,lowestEdited:5,rupBuild:9303}})},d.exports=u},{"../../../utils/col-cache":19,"../../../utils/under-dash":26,"../../../utils/xml-stream":28,"../base-xform":32,"../list-xform":71,"../static-xform":120,"./defined-name-xform":33,"./sheet-xform":34,"./workbook-calc-properties-xform":35,"./workbook-properties-xform":36,"./workbook-view-xform":37}],39:[function(e,d,b){"use strict";let l=e("../strings/rich-text-xform"),o=e("../../../utils/utils"),s=e("../base-xform"),r=d.exports=function(t){this.model=t};o.inherits(r,s,{get tag(){return"r"},get richTextXform(){return this._richTextXform||(this._richTextXform=new l),this._richTextXform},render(t,n){n=n||this.model,t.openNode("comment",{ref:n.ref,authorId:0}),t.openNode("text"),n&&n.note&&n.note.texts&&n.note.texts.forEach(c=>{this.richTextXform.render(t,c)}),t.closeNode(),t.closeNode()},parseOpen(t){if(this.parser)return this.parser.parseOpen(t),!0;switch(t.name){case"comment":return this.model={type:"note",note:{texts:[]},...t.attributes},!0;case"r":return this.parser=this.richTextXform,this.parser.parseOpen(t),!0;default:return!1}},parseText(t){this.parser&&this.parser.parseText(t)},parseClose(t){switch(t){case"comment":return!1;case"r":return this.model.note.texts.push(this.parser.model),this.parser=void 0,!0;default:return this.parser&&this.parser.parseClose(t),!0}}})},{"../../../utils/utils":27,"../base-xform":32,"../strings/rich-text-xform":122}],40:[function(e,d,b){"use strict";let l=e("../../../utils/xml-stream"),o=e("../../../utils/utils"),s=e("../base-xform"),r=e("./comment-xform"),t=d.exports=function(){this.map={comment:new r}};o.inherits(t,s,{COMMENTS_ATTRIBUTES:{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main"}},{render(n,c){c=c||this.model,n.openXml(l.StdDocAttributes),n.openNode("comments",t.COMMENTS_ATTRIBUTES),n.openNode("authors"),n.leafNode("author",null,"Author"),n.closeNode(),n.openNode("commentList"),c.comments.forEach(i=>{this.map.comment.render(n,i)}),n.closeNode(),n.closeNode()},parseOpen(n){if(this.parser)return this.parser.parseOpen(n),!0;switch(n.name){case"commentList":return this.model={comments:[]},!0;case"comment":return this.parser=this.map.comment,this.parser.parseOpen(n),!0;default:return!1}},parseText(n){this.parser&&this.parser.parseText(n)},parseClose(n){switch(n){case"commentList":return!1;case"comment":return this.model.comments.push(this.parser.model),this.parser=void 0,!0;default:return this.parser&&this.parser.parseClose(n),!0}}})},{"../../../utils/utils":27,"../../../utils/xml-stream":28,"../base-xform":32,"./comment-xform":39}],41:[function(e,d,b){"use strict";let l=e("../../base-xform");d.exports=class extends l{constructor(o){super(),this._model=o}get tag(){return this._model&&this._model.tag}render(o,s,r){(s===r[2]||this.tag==="x:SizeWithCells"&&s===r[1])&&o.leafNode(this.tag)}parseOpen(o){return o.name===this.tag?(this.model={},this.model[this.tag]=!0,!0):!1}parseText(){}parseClose(){return!1}}},{"../../base-xform":32}],42:[function(e,d,b){"use strict";let l=e("../../base-xform");d.exports=class extends l{constructor(o){super(),this._model=o}get tag(){return this._model&&this._model.tag}render(o,s){o.leafNode(this.tag,null,s)}parseOpen(o){return o.name===this.tag?(this.text="",!0):!1}parseText(o){this.text=o}parseClose(){return!1}}},{"../../base-xform":32}],43:[function(e,d,b){"use strict";let l=e("../base-xform");d.exports=class extends l{get tag(){return"x:Anchor"}getAnchorRect(o){let s=Math.floor(o.left),r=Math.floor(68*(o.left-s)),t=Math.floor(o.top),n=Math.floor(18*(o.top-t)),c=Math.floor(o.right),i=Math.floor(68*(o.right-c)),a=Math.floor(o.bottom);return[s,r,t,n,c,i,a,Math.floor(18*(o.bottom-a))]}getDefaultRect(o){let s=o.col,r=Math.max(o.row-2,0);return[s,6,r,14,s+2,2,r+4,16]}render(o,s){let r=s.anchor?this.getAnchorRect(s.anchor):this.getDefaultRect(s.refAddress);o.leafNode("x:Anchor",null,r.join(", "))}parseOpen(o){return o.name===this.tag?(this.text="",!0):!1}parseText(o){this.text=o}parseClose(){return!1}}},{"../base-xform":32}],44:[function(e,d,b){"use strict";let l=e("../base-xform"),o=e("./vml-anchor-xform"),s=e("./style/vml-protection-xform"),r=e("./style/vml-position-xform"),t=["twoCells","oneCells","absolute"];d.exports=class extends l{constructor(){super(),this.map={"x:Anchor":new o,"x:Locked":new s({tag:"x:Locked"}),"x:LockText":new s({tag:"x:LockText"}),"x:SizeWithCells":new r({tag:"x:SizeWithCells"}),"x:MoveWithCells":new r({tag:"x:MoveWithCells"})}}get tag(){return"x:ClientData"}render(n,c){let{protection:i,editAs:a}=c.note;n.openNode(this.tag,{ObjectType:"Note"}),this.map["x:MoveWithCells"].render(n,a,t),this.map["x:SizeWithCells"].render(n,a,t),this.map["x:Anchor"].render(n,c),this.map["x:Locked"].render(n,i.locked),n.leafNode("x:AutoFill",null,"False"),this.map["x:LockText"].render(n,i.lockText),n.leafNode("x:Row",null,c.refAddress.row-1),n.leafNode("x:Column",null,c.refAddress.col-1),n.closeNode()}parseOpen(n){return n.name===this.tag?(this.reset(),this.model={anchor:[],protection:{},editAs:""}):(this.parser=this.map[n.name],this.parser&&this.parser.parseOpen(n)),!0}parseText(n){this.parser&&this.parser.parseText(n)}parseClose(n){return this.parser?(this.parser.parseClose(n)||(this.parser=void 0),!0):n===this.tag?(this.normalizeModel(),!1):!0}normalizeModel(){let n=Object.assign({},this.map["x:MoveWithCells"].model,this.map["x:SizeWithCells"].model),c=Object.keys(n).length;this.model.editAs=t[c],this.model.anchor=this.map["x:Anchor"].text,this.model.protection.locked=this.map["x:Locked"].text,this.model.protection.lockText=this.map["x:LockText"].text}}},{"../base-xform":32,"./style/vml-position-xform":41,"./style/vml-protection-xform":42,"./vml-anchor-xform":43}],45:[function(e,d,b){"use strict";let l=e("../../../utils/xml-stream"),o=e("../base-xform"),s=e("./vml-shape-xform");class r extends o{constructor(){super(),this.map={"v:shape":new s}}get tag(){return"xml"}render(n,c){n.openXml(l.StdDocAttributes),n.openNode(this.tag,r.DRAWING_ATTRIBUTES),n.openNode("o:shapelayout",{"v:ext":"edit"}),n.leafNode("o:idmap",{"v:ext":"edit",data:1}),n.closeNode(),n.openNode("v:shapetype",{id:"_x0000_t202",coordsize:"21600,21600","o:spt":202,path:"m,l,21600r21600,l21600,xe"}),n.leafNode("v:stroke",{joinstyle:"miter"}),n.leafNode("v:path",{gradientshapeok:"t","o:connecttype":"rect"}),n.closeNode(),c.comments.forEach((i,a)=>{this.map["v:shape"].render(n,i,a)}),n.closeNode()}parseOpen(n){return this.parser?(this.parser.parseOpen(n),!0):(n.name===this.tag?(this.reset(),this.model={comments:[]}):(this.parser=this.map[n.name],this.parser&&this.parser.parseOpen(n)),!0)}parseText(n){this.parser&&this.parser.parseText(n)}parseClose(n){return this.parser?(this.parser.parseClose(n)||(this.model.comments.push(this.parser.model),this.parser=void 0),!0):n!==this.tag}reconcile(n,c){n.anchors.forEach(i=>{i.br?this.map["xdr:twoCellAnchor"].reconcile(i,c):this.map["xdr:oneCellAnchor"].reconcile(i,c)})}}r.DRAWING_ATTRIBUTES={"xmlns:v":"urn:schemas-microsoft-com:vml","xmlns:o":"urn:schemas-microsoft-com:office:office","xmlns:x":"urn:schemas-microsoft-com:office:excel"},d.exports=r},{"../../../utils/xml-stream":28,"../base-xform":32,"./vml-shape-xform":46}],46:[function(e,d,b){"use strict";let l=e("../base-xform"),o=e("./vml-textbox-xform"),s=e("./vml-client-data-xform");class r extends l{constructor(){super(),this.map={"v:textbox":new o,"x:ClientData":new s}}get tag(){return"v:shape"}render(n,c,i){n.openNode("v:shape",r.V_SHAPE_ATTRIBUTES(c,i)),n.leafNode("v:fill",{color2:"infoBackground [80]"}),n.leafNode("v:shadow",{color:"none [81]",obscured:"t"}),n.leafNode("v:path",{"o:connecttype":"none"}),this.map["v:textbox"].render(n,c),this.map["x:ClientData"].render(n,c),n.closeNode()}parseOpen(n){return this.parser?(this.parser.parseOpen(n),!0):(n.name===this.tag?(this.reset(),this.model={margins:{insetmode:n.attributes["o:insetmode"]},anchor:"",editAs:"",protection:{}}):(this.parser=this.map[n.name],this.parser&&this.parser.parseOpen(n)),!0)}parseText(n){this.parser&&this.parser.parseText(n)}parseClose(n){return this.parser?(this.parser.parseClose(n)||(this.parser=void 0),!0):n===this.tag?(this.model.margins.inset=this.map["v:textbox"].model&&this.map["v:textbox"].model.inset,this.model.protection=this.map["x:ClientData"].model&&this.map["x:ClientData"].model.protection,this.model.anchor=this.map["x:ClientData"].model&&this.map["x:ClientData"].model.anchor,this.model.editAs=this.map["x:ClientData"].model&&this.map["x:ClientData"].model.editAs,!1):!0}}r.V_SHAPE_ATTRIBUTES=(t,n)=>({id:"_x0000_s"+(1025+n),type:"#_x0000_t202",style:"position:absolute; margin-left:105.3pt;margin-top:10.5pt;width:97.8pt;height:59.1pt;z-index:1;visibility:hidden",fillcolor:"infoBackground [80]",strokecolor:"none [81]","o:insetmode":t.note.margins&&t.note.margins.insetmode}),d.exports=r},{"../base-xform":32,"./vml-client-data-xform":44,"./vml-textbox-xform":47}],47:[function(e,d,b){"use strict";let l=e("../base-xform");d.exports=class extends l{get tag(){return"v:textbox"}conversionUnit(o,s,r){return`${parseFloat(o)*s.toFixed(2)}${r}`}reverseConversionUnit(o){return(o||"").split(",").map(s=>Number(parseFloat(this.conversionUnit(parseFloat(s),.1,"")).toFixed(2)))}render(o,s){let r={style:"mso-direction-alt:auto"};if(s&&s.note){let{inset:t}=s.note&&s.note.margins;Array.isArray(t)&&(t=t.map(n=>this.conversionUnit(n,10,"mm")).join(",")),t&&(r.inset=t)}o.openNode("v:textbox",r),o.leafNode("div",{style:"text-align:left"}),o.closeNode()}parseOpen(o){return o.name===this.tag&&(this.model={inset:this.reverseConversionUnit(o.attributes.inset)}),!0}parseText(){}parseClose(o){return o!==this.tag}}},{"../base-xform":32}],48:[function(e,d,b){"use strict";let l=e("./base-xform");d.exports=class extends l{createNewModel(o){return{}}parseOpen(o){return this.parser=this.parser||this.map[o.name],this.parser?(this.parser.parseOpen(o),!0):o.name===this.tag&&(this.model=this.createNewModel(o),!0)}parseText(o){this.parser&&this.parser.parseText(o)}onParserClose(o,s){this.model[o]=s.model}parseClose(o){return this.parser?(this.parser.parseClose(o)||(this.onParserClose(o,this.parser),this.parser=void 0),!0):o!==this.tag}}},{"./base-xform":32}],49:[function(e,d,b){"use strict";let l=e("../base-xform");d.exports=class extends l{render(o,s){o.openNode("HeadingPairs"),o.openNode("vt:vector",{size:2,baseType:"variant"}),o.openNode("vt:variant"),o.leafNode("vt:lpstr",void 0,"Worksheets"),o.closeNode(),o.openNode("vt:variant"),o.leafNode("vt:i4",void 0,s.length),o.closeNode(),o.closeNode(),o.closeNode()}parseOpen(o){return o.name==="HeadingPairs"}parseText(){}parseClose(o){return o!=="HeadingPairs"}}},{"../base-xform":32}],50:[function(e,d,b){"use strict";let l=e("../base-xform");d.exports=class extends l{render(o,s){o.openNode("TitlesOfParts"),o.openNode("vt:vector",{size:s.length,baseType:"lpstr"}),s.forEach(r=>{o.leafNode("vt:lpstr",void 0,r.name)}),o.closeNode(),o.closeNode()}parseOpen(o){return o.name==="TitlesOfParts"}parseText(){}parseClose(o){return o!=="TitlesOfParts"}}},{"../base-xform":32}],51:[function(e,d,b){"use strict";let l=e("../../../utils/xml-stream"),o=e("../base-xform"),s=e("../simple/string-xform"),r=e("./app-heading-pairs-xform"),t=e("./app-titles-of-parts-xform");class n extends o{constructor(){super(),this.map={Company:new s({tag:"Company"}),Manager:new s({tag:"Manager"}),HeadingPairs:new r,TitleOfParts:new t}}render(i,a){i.openXml(l.StdDocAttributes),i.openNode("Properties",n.PROPERTY_ATTRIBUTES),i.leafNode("Application",void 0,"Microsoft Excel"),i.leafNode("DocSecurity",void 0,"0"),i.leafNode("ScaleCrop",void 0,"false"),this.map.HeadingPairs.render(i,a.worksheets),this.map.TitleOfParts.render(i,a.worksheets),this.map.Company.render(i,a.company||""),this.map.Manager.render(i,a.manager),i.leafNode("LinksUpToDate",void 0,"false"),i.leafNode("SharedDoc",void 0,"false"),i.leafNode("HyperlinksChanged",void 0,"false"),i.leafNode("AppVersion",void 0,"16.0300"),i.closeNode()}parseOpen(i){return this.parser?(this.parser.parseOpen(i),!0):i.name==="Properties"?!0:(this.parser=this.map[i.name],!!this.parser&&(this.parser.parseOpen(i),!0))}parseText(i){this.parser&&this.parser.parseText(i)}parseClose(i){return this.parser?(this.parser.parseClose(i)||(this.parser=void 0),!0):i==="Properties"?(this.model={worksheets:this.map.TitleOfParts.model,company:this.map.Company.model,manager:this.map.Manager.model},!1):!0}}n.DateFormat=function(c){return c.toISOString().replace(/[.]\d{3,6}/,"")},n.DateAttrs={"xsi:type":"dcterms:W3CDTF"},n.PROPERTY_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties","xmlns:vt":"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"},d.exports=n},{"../../../utils/xml-stream":28,"../base-xform":32,"../simple/string-xform":119,"./app-heading-pairs-xform":49,"./app-titles-of-parts-xform":50}],52:[function(e,d,b){"use strict";let l=e("../../../utils/xml-stream"),o=e("../base-xform");class s extends o{render(t,n){t.openXml(l.StdDocAttributes),t.openNode("Types",s.PROPERTY_ATTRIBUTES);let c={};(n.media||[]).forEach(i=>{if(i.type==="image"){let a=i.extension;c[a]||(c[a]=!0,t.leafNode("Default",{Extension:a,ContentType:"image/"+a}))}}),t.leafNode("Default",{Extension:"rels",ContentType:"application/vnd.openxmlformats-package.relationships+xml"}),t.leafNode("Default",{Extension:"xml",ContentType:"application/xml"}),t.leafNode("Override",{PartName:"/xl/workbook.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"}),n.worksheets.forEach(i=>{let a=`/xl/worksheets/sheet${i.id}.xml`;t.leafNode("Override",{PartName:a,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"})}),t.leafNode("Override",{PartName:"/xl/theme/theme1.xml",ContentType:"application/vnd.openxmlformats-officedocument.theme+xml"}),t.leafNode("Override",{PartName:"/xl/styles.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"}),n.sharedStrings&&n.sharedStrings.count&&t.leafNode("Override",{PartName:"/xl/sharedStrings.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml"}),n.tables&&n.tables.forEach(i=>{t.leafNode("Override",{PartName:"/xl/tables/"+i.target,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml"})}),n.drawings&&n.drawings.forEach(i=>{t.leafNode("Override",{PartName:`/xl/drawings/${i.name}.xml`,ContentType:"application/vnd.openxmlformats-officedocument.drawing+xml"})}),n.commentRefs&&(t.leafNode("Default",{Extension:"vml",ContentType:"application/vnd.openxmlformats-officedocument.vmlDrawing"}),n.commentRefs.forEach(i=>{let{commentName:a}=i;t.leafNode("Override",{PartName:`/xl/${a}.xml`,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml"})})),t.leafNode("Override",{PartName:"/docProps/core.xml",ContentType:"application/vnd.openxmlformats-package.core-properties+xml"}),t.leafNode("Override",{PartName:"/docProps/app.xml",ContentType:"application/vnd.openxmlformats-officedocument.extended-properties+xml"}),t.closeNode()}parseOpen(){return!1}parseText(){}parseClose(){return!1}}s.PROPERTY_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/package/2006/content-types"},d.exports=s},{"../../../utils/xml-stream":28,"../base-xform":32}],53:[function(e,d,b){"use strict";let l=e("../../../utils/xml-stream"),o=e("../base-xform"),s=e("../simple/date-xform"),r=e("../simple/string-xform"),t=e("../simple/integer-xform");class n extends o{constructor(){super(),this.map={"dc:creator":new r({tag:"dc:creator"}),"dc:title":new r({tag:"dc:title"}),"dc:subject":new r({tag:"dc:subject"}),"dc:description":new r({tag:"dc:description"}),"dc:identifier":new r({tag:"dc:identifier"}),"dc:language":new r({tag:"dc:language"}),"cp:keywords":new r({tag:"cp:keywords"}),"cp:category":new r({tag:"cp:category"}),"cp:lastModifiedBy":new r({tag:"cp:lastModifiedBy"}),"cp:lastPrinted":new s({tag:"cp:lastPrinted",format:n.DateFormat}),"cp:revision":new t({tag:"cp:revision"}),"cp:version":new r({tag:"cp:version"}),"cp:contentStatus":new r({tag:"cp:contentStatus"}),"cp:contentType":new r({tag:"cp:contentType"}),"dcterms:created":new s({tag:"dcterms:created",attrs:n.DateAttrs,format:n.DateFormat}),"dcterms:modified":new s({tag:"dcterms:modified",attrs:n.DateAttrs,format:n.DateFormat})}}render(i,a){i.openXml(l.StdDocAttributes),i.openNode("cp:coreProperties",n.CORE_PROPERTY_ATTRIBUTES),this.map["dc:creator"].render(i,a.creator),this.map["dc:title"].render(i,a.title),this.map["dc:subject"].render(i,a.subject),this.map["dc:description"].render(i,a.description),this.map["dc:identifier"].render(i,a.identifier),this.map["dc:language"].render(i,a.language),this.map["cp:keywords"].render(i,a.keywords),this.map["cp:category"].render(i,a.category),this.map["cp:lastModifiedBy"].render(i,a.lastModifiedBy),this.map["cp:lastPrinted"].render(i,a.lastPrinted),this.map["cp:revision"].render(i,a.revision),this.map["cp:version"].render(i,a.version),this.map["cp:contentStatus"].render(i,a.contentStatus),this.map["cp:contentType"].render(i,a.contentType),this.map["dcterms:created"].render(i,a.created),this.map["dcterms:modified"].render(i,a.modified),i.closeNode()}parseOpen(i){if(this.parser)return this.parser.parseOpen(i),!0;switch(i.name){case"cp:coreProperties":case"coreProperties":return!0;default:if(this.parser=this.map[i.name],this.parser)return this.parser.parseOpen(i),!0;throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(i))}}parseText(i){this.parser&&this.parser.parseText(i)}parseClose(i){if(this.parser)return this.parser.parseClose(i)||(this.parser=void 0),!0;switch(i){case"cp:coreProperties":case"coreProperties":return this.model={creator:this.map["dc:creator"].model,title:this.map["dc:title"].model,subject:this.map["dc:subject"].model,description:this.map["dc:description"].model,identifier:this.map["dc:identifier"].model,language:this.map["dc:language"].model,keywords:this.map["cp:keywords"].model,category:this.map["cp:category"].model,lastModifiedBy:this.map["cp:lastModifiedBy"].model,lastPrinted:this.map["cp:lastPrinted"].model,revision:this.map["cp:revision"].model,contentStatus:this.map["cp:contentStatus"].model,contentType:this.map["cp:contentType"].model,created:this.map["dcterms:created"].model,modified:this.map["dcterms:modified"].model},!1;default:throw new Error("Unexpected xml node in parseClose: "+i)}}}n.DateFormat=function(c){return c.toISOString().replace(/[.]\d{3}/,"")},n.DateAttrs={"xsi:type":"dcterms:W3CDTF"},n.CORE_PROPERTY_ATTRIBUTES={"xmlns:cp":"http://schemas.openxmlformats.org/package/2006/metadata/core-properties","xmlns:dc":"http://purl.org/dc/elements/1.1/","xmlns:dcterms":"http://purl.org/dc/terms/","xmlns:dcmitype":"http://purl.org/dc/dcmitype/","xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance"},d.exports=n},{"../../../utils/xml-stream":28,"../base-xform":32,"../simple/date-xform":117,"../simple/integer-xform":118,"../simple/string-xform":119}],54:[function(e,d,b){"use strict";let l=e("../base-xform");d.exports=class extends l{render(o,s){o.leafNode("Relationship",s)}parseOpen(o){return o.name==="Relationship"?(this.model=o.attributes,!0):!1}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],55:[function(e,d,b){"use strict";let l=e("../../../utils/xml-stream"),o=e("../base-xform"),s=e("./relationship-xform");class r extends o{constructor(){super(),this.map={Relationship:new s}}render(n,c){c=c||this._values,n.openXml(l.StdDocAttributes),n.openNode("Relationships",r.RELATIONSHIPS_ATTRIBUTES),c.forEach(i=>{this.map.Relationship.render(n,i)}),n.closeNode()}parseOpen(n){if(this.parser)return this.parser.parseOpen(n),!0;switch(n.name){case"Relationships":return this.model=[],!0;default:if(this.parser=this.map[n.name],this.parser)return this.parser.parseOpen(n),!0;throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(n))}}parseText(n){this.parser&&this.parser.parseText(n)}parseClose(n){if(this.parser)return this.parser.parseClose(n)||(this.model.push(this.parser.model),this.parser=void 0),!0;if(n==="Relationships")return!1;throw new Error("Unexpected xml node in parseClose: "+n)}}r.RELATIONSHIPS_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/package/2006/relationships"},d.exports=r},{"../../../utils/xml-stream":28,"../base-xform":32,"./relationship-xform":54}],56:[function(e,d,b){"use strict";let l=e("../base-xform");d.exports=class extends l{parseOpen(o){return this.parser?(this.parser.parseOpen(o),!0):(o.name===this.tag?(this.reset(),this.model={range:{editAs:o.attributes.editAs||"oneCell"}}):(this.parser=this.map[o.name],this.parser&&this.parser.parseOpen(o)),!0)}parseText(o){this.parser&&this.parser.parseText(o)}reconcilePicture(o,s){if(o&&o.rId){let r=s.rels[o.rId].Target.match(/.*\/media\/(.+[.][a-zA-Z]{3,4})/);if(r){let t=r[1],n=s.mediaIndex[t];return s.media[n]}}}}},{"../base-xform":32}],57:[function(e,d,b){"use strict";let l=e("../base-xform"),o=e("./blip-xform");d.exports=class extends l{constructor(){super(),this.map={"a:blip":new o}}get tag(){return"xdr:blipFill"}render(s,r){s.openNode(this.tag),this.map["a:blip"].render(s,r),s.openNode("a:stretch"),s.leafNode("a:fillRect"),s.closeNode(),s.closeNode()}parseOpen(s){return this.parser?(this.parser.parseOpen(s),!0):(s.name===this.tag?this.reset():(this.parser=this.map[s.name],this.parser&&this.parser.parseOpen(s)),!0)}parseText(){}parseClose(s){return this.parser?(this.parser.parseClose(s)||(this.parser=void 0),!0):s===this.tag?(this.model=this.map["a:blip"].model,!1):!0}}},{"../base-xform":32,"./blip-xform":58}],58:[function(e,d,b){"use strict";let l=e("../base-xform");d.exports=class extends l{get tag(){return"a:blip"}render(o,s){o.leafNode(this.tag,{"xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","r:embed":s.rId,cstate:"print"})}parseOpen(o){return o.name===this.tag&&(this.model={rId:o.attributes["r:embed"]}),!0}parseText(){}parseClose(o){return o!==this.tag}}},{"../base-xform":32}],59:[function(e,d,b){"use strict";let l=e("../base-xform");d.exports=class extends l{get tag(){return"xdr:cNvPicPr"}render(o){o.openNode(this.tag),o.leafNode("a:picLocks",{noChangeAspect:"1"}),o.closeNode()}parseOpen(o){switch(o.name){case this.tag:default:return!0}}parseText(){}parseClose(o){return o!==this.tag}}},{"../base-xform":32}],60:[function(e,d,b){"use strict";let l=e("../base-xform"),o=e("./hlink-click-xform"),s=e("./ext-lst-xform");d.exports=class extends l{constructor(){super(),this.map={"a:hlinkClick":new o,"a:extLst":new s}}get tag(){return"xdr:cNvPr"}render(r,t){r.openNode(this.tag,{id:t.index,name:"Picture "+t.index}),this.map["a:hlinkClick"].render(r,t),this.map["a:extLst"].render(r,t),r.closeNode()}parseOpen(r){return this.parser?(this.parser.parseOpen(r),!0):(r.name===this.tag?this.reset():(this.parser=this.map[r.name],this.parser&&this.parser.parseOpen(r)),!0)}parseText(){}parseClose(r){return this.parser?(this.parser.parseClose(r)||(this.parser=void 0),!0):r===this.tag?(this.model=this.map["a:hlinkClick"].model,!1):!0}}},{"../base-xform":32,"./ext-lst-xform":63,"./hlink-click-xform":65}],61:[function(e,d,b){"use strict";let l=e("../base-xform"),o=e("../simple/integer-xform");d.exports=class extends l{constructor(s){super(),this.tag=s.tag,this.map={"xdr:col":new o({tag:"xdr:col",zero:!0}),"xdr:colOff":new o({tag:"xdr:colOff",zero:!0}),"xdr:row":new o({tag:"xdr:row",zero:!0}),"xdr:rowOff":new o({tag:"xdr:rowOff",zero:!0})}}render(s,r){s.openNode(this.tag),this.map["xdr:col"].render(s,r.nativeCol),this.map["xdr:colOff"].render(s,r.nativeColOff),this.map["xdr:row"].render(s,r.nativeRow),this.map["xdr:rowOff"].render(s,r.nativeRowOff),s.closeNode()}parseOpen(s){return this.parser?(this.parser.parseOpen(s),!0):(s.name===this.tag?this.reset():(this.parser=this.map[s.name],this.parser&&this.parser.parseOpen(s)),!0)}parseText(s){this.parser&&this.parser.parseText(s)}parseClose(s){return this.parser?(this.parser.parseClose(s)||(this.parser=void 0),!0):s===this.tag?(this.model={nativeCol:this.map["xdr:col"].model,nativeColOff:this.map["xdr:colOff"].model,nativeRow:this.map["xdr:row"].model,nativeRowOff:this.map["xdr:rowOff"].model},!1):!0}}},{"../base-xform":32,"../simple/integer-xform":118}],62:[function(e,d,b){"use strict";let l=e("../../../utils/col-cache"),o=e("../../../utils/xml-stream"),s=e("../base-xform"),r=e("./two-cell-anchor-xform"),t=e("./one-cell-anchor-xform");class n extends s{constructor(){super(),this.map={"xdr:twoCellAnchor":new r,"xdr:oneCellAnchor":new t}}prepare(i){i.anchors.forEach((a,h)=>{a.anchorType=(function(f){return(typeof f.range=="string"?l.decode(f.range):f.range).br?"xdr:twoCellAnchor":"xdr:oneCellAnchor"})(a),this.map[a.anchorType].prepare(a,{index:h})})}get tag(){return"xdr:wsDr"}render(i,a){i.openXml(o.StdDocAttributes),i.openNode(this.tag,n.DRAWING_ATTRIBUTES),a.anchors.forEach(h=>{this.map[h.anchorType].render(i,h)}),i.closeNode()}parseOpen(i){return this.parser?(this.parser.parseOpen(i),!0):(i.name===this.tag?(this.reset(),this.model={anchors:[]}):(this.parser=this.map[i.name],this.parser&&this.parser.parseOpen(i)),!0)}parseText(i){this.parser&&this.parser.parseText(i)}parseClose(i){return this.parser?(this.parser.parseClose(i)||(this.model.anchors.push(this.parser.model),this.parser=void 0),!0):i!==this.tag}reconcile(i,a){i.anchors.forEach(h=>{h.br?this.map["xdr:twoCellAnchor"].reconcile(h,a):this.map["xdr:oneCellAnchor"].reconcile(h,a)})}}n.DRAWING_ATTRIBUTES={"xmlns:xdr":"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing","xmlns:a":"http://schemas.openxmlformats.org/drawingml/2006/main"},d.exports=n},{"../../../utils/col-cache":19,"../../../utils/xml-stream":28,"../base-xform":32,"./one-cell-anchor-xform":67,"./two-cell-anchor-xform":70}],63:[function(e,d,b){"use strict";let l=e("../base-xform");d.exports=class extends l{get tag(){return"a:extLst"}render(o){o.openNode(this.tag),o.openNode("a:ext",{uri:"{FF2B5EF4-FFF2-40B4-BE49-F238E27FC236}"}),o.leafNode("a16:creationId",{"xmlns:a16":"http://schemas.microsoft.com/office/drawing/2014/main",id:"{00000000-0008-0000-0000-000002000000}"}),o.closeNode(),o.closeNode()}parseOpen(o){switch(o.name){case this.tag:default:return!0}}parseText(){}parseClose(o){return o!==this.tag}}},{"../base-xform":32}],64:[function(e,d,b){"use strict";let l=e("../base-xform");d.exports=class extends l{constructor(o){super(),this.tag=o.tag,this.map={}}render(o,s){o.openNode(this.tag);let r=Math.floor(9525*s.width),t=Math.floor(9525*s.height);o.addAttribute("cx",r),o.addAttribute("cy",t),o.closeNode()}parseOpen(o){return o.name===this.tag&&(this.model={width:parseInt(o.attributes.cx||"0",10)/9525,height:parseInt(o.attributes.cy||"0",10)/9525},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],65:[function(e,d,b){"use strict";let l=e("../base-xform");d.exports=class extends l{get tag(){return"a:hlinkClick"}render(o,s){s.hyperlinks&&s.hyperlinks.rId&&o.leafNode(this.tag,{"xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","r:id":s.hyperlinks.rId,tooltip:s.hyperlinks.tooltip})}parseOpen(o){return o.name===this.tag&&(this.model={hyperlinks:{rId:o.attributes["r:id"],tooltip:o.attributes.tooltip}}),!0}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],66:[function(e,d,b){"use strict";let l=e("../base-xform"),o=e("./c-nv-pr-xform"),s=e("./c-nv-pic-pr-xform");d.exports=class extends l{constructor(){super(),this.map={"xdr:cNvPr":new o,"xdr:cNvPicPr":new s}}get tag(){return"xdr:nvPicPr"}render(r,t){r.openNode(this.tag),this.map["xdr:cNvPr"].render(r,t),this.map["xdr:cNvPicPr"].render(r,t),r.closeNode()}parseOpen(r){return this.parser?(this.parser.parseOpen(r),!0):(r.name===this.tag?this.reset():(this.parser=this.map[r.name],this.parser&&this.parser.parseOpen(r)),!0)}parseText(){}parseClose(r){return this.parser?(this.parser.parseClose(r)||(this.parser=void 0),!0):r===this.tag?(this.model=this.map["xdr:cNvPr"].model,!1):!0}}},{"../base-xform":32,"./c-nv-pic-pr-xform":59,"./c-nv-pr-xform":60}],67:[function(e,d,b){"use strict";let l=e("./base-cell-anchor-xform"),o=e("../static-xform"),s=e("./cell-position-xform"),r=e("./ext-xform"),t=e("./pic-xform");d.exports=class extends l{constructor(){super(),this.map={"xdr:from":new s({tag:"xdr:from"}),"xdr:ext":new r({tag:"xdr:ext"}),"xdr:pic":new t,"xdr:clientData":new o({tag:"xdr:clientData"})}}get tag(){return"xdr:oneCellAnchor"}prepare(n,c){this.map["xdr:pic"].prepare(n.picture,c)}render(n,c){n.openNode(this.tag,{editAs:c.range.editAs||"oneCell"}),this.map["xdr:from"].render(n,c.range.tl),this.map["xdr:ext"].render(n,c.range.ext),this.map["xdr:pic"].render(n,c.picture),this.map["xdr:clientData"].render(n,{}),n.closeNode()}parseClose(n){return this.parser?(this.parser.parseClose(n)||(this.parser=void 0),!0):n===this.tag?(this.model.range.tl=this.map["xdr:from"].model,this.model.range.ext=this.map["xdr:ext"].model,this.model.picture=this.map["xdr:pic"].model,!1):!0}reconcile(n,c){n.medium=this.reconcilePicture(n.picture,c)}}},{"../static-xform":120,"./base-cell-anchor-xform":56,"./cell-position-xform":61,"./ext-xform":64,"./pic-xform":68}],68:[function(e,d,b){"use strict";let l=e("../base-xform"),o=e("../static-xform"),s=e("./blip-fill-xform"),r=e("./nv-pic-pr-xform"),t=e("./sp-pr");d.exports=class extends l{constructor(){super(),this.map={"xdr:nvPicPr":new r,"xdr:blipFill":new s,"xdr:spPr":new o(t)}}get tag(){return"xdr:pic"}prepare(n,c){n.index=c.index+1}render(n,c){n.openNode(this.tag),this.map["xdr:nvPicPr"].render(n,c),this.map["xdr:blipFill"].render(n,c),this.map["xdr:spPr"].render(n,c),n.closeNode()}parseOpen(n){return this.parser?(this.parser.parseOpen(n),!0):(n.name===this.tag?this.reset():(this.parser=this.map[n.name],this.parser&&this.parser.parseOpen(n)),!0)}parseText(){}parseClose(n){return this.parser?(this.parser.parseClose(n)||(this.mergeModel(this.parser.model),this.parser=void 0),!0):n!==this.tag}}},{"../base-xform":32,"../static-xform":120,"./blip-fill-xform":57,"./nv-pic-pr-xform":66,"./sp-pr":69}],69:[function(e,d,b){"use strict";d.exports={tag:"xdr:spPr",c:[{tag:"a:xfrm",c:[{tag:"a:off",$:{x:"0",y:"0"}},{tag:"a:ext",$:{cx:"0",cy:"0"}}]},{tag:"a:prstGeom",$:{prst:"rect"},c:[{tag:"a:avLst"}]}]}},{}],70:[function(e,d,b){"use strict";let l=e("./base-cell-anchor-xform"),o=e("../static-xform"),s=e("./cell-position-xform"),r=e("./pic-xform");d.exports=class extends l{constructor(){super(),this.map={"xdr:from":new s({tag:"xdr:from"}),"xdr:to":new s({tag:"xdr:to"}),"xdr:pic":new r,"xdr:clientData":new o({tag:"xdr:clientData"})}}get tag(){return"xdr:twoCellAnchor"}prepare(t,n){this.map["xdr:pic"].prepare(t.picture,n)}render(t,n){t.openNode(this.tag,{editAs:n.range.editAs||"oneCell"}),this.map["xdr:from"].render(t,n.range.tl),this.map["xdr:to"].render(t,n.range.br),this.map["xdr:pic"].render(t,n.picture),this.map["xdr:clientData"].render(t,{}),t.closeNode()}parseClose(t){return this.parser?(this.parser.parseClose(t)||(this.parser=void 0),!0):t===this.tag?(this.model.range.tl=this.map["xdr:from"].model,this.model.range.br=this.map["xdr:to"].model,this.model.picture=this.map["xdr:pic"].model,!1):!0}reconcile(t,n){t.medium=this.reconcilePicture(t.picture,n)}}},{"../static-xform":120,"./base-cell-anchor-xform":56,"./cell-position-xform":61,"./pic-xform":68}],71:[function(e,d,b){"use strict";let l=e("./base-xform");d.exports=class extends l{constructor(o){super(),this.tag=o.tag,this.always=!!o.always,this.count=o.count,this.empty=o.empty,this.$count=o.$count||"count",this.$=o.$,this.childXform=o.childXform,this.maxItems=o.maxItems}prepare(o,s){let{childXform:r}=this;o&&o.forEach((t,n)=>{s.index=n,r.prepare(t,s)})}render(o,s){if(this.always||s&&s.length){o.openNode(this.tag,this.$),this.count&&o.addAttribute(this.$count,s&&s.length||0);let{childXform:r}=this;(s||[]).forEach((t,n)=>{r.render(o,t,n)}),o.closeNode()}else this.empty&&o.leafNode(this.tag)}parseOpen(o){return this.parser?(this.parser.parseOpen(o),!0):o.name===this.tag?(this.model=[],!0):!!this.childXform.parseOpen(o)&&(this.parser=this.childXform,!0)}parseText(o){this.parser&&this.parser.parseText(o)}parseClose(o){if(this.parser){if(!this.parser.parseClose(o)&&(this.model.push(this.parser.model),this.parser=void 0,this.maxItems&&this.model.length>this.maxItems))throw new Error(`Max ${this.childXform.tag} count (${this.maxItems}) exceeded`);return!0}return!1}reconcile(o,s){if(o){let{childXform:r}=this;o.forEach(t=>{r.reconcile(t,s)})}}}},{"./base-xform":32}],72:[function(e,d,b){"use strict";let l=e("../../../utils/col-cache"),o=e("../base-xform");d.exports=class extends o{get tag(){return"autoFilter"}render(s,r){if(r)if(typeof r=="string")s.leafNode("autoFilter",{ref:r});else{let t=function(i){return typeof i=="string"?i:l.getAddress(i.row,i.column).address},n=t(r.from),c=t(r.to);n&&c&&s.leafNode("autoFilter",{ref:`${n}:${c}`})}}parseOpen(s){s.name==="autoFilter"&&(this.model=s.attributes.ref)}}},{"../../../utils/col-cache":19,"../base-xform":32}],73:[function(e,d,b){"use strict";let l=e("../../../utils/utils"),o=e("../base-xform"),s=e("../../../doc/range"),r=e("../../../doc/enums"),t=e("../strings/rich-text-xform");function n(c){if(c==null)return r.ValueType.Null;if(c instanceof String||typeof c=="string")return r.ValueType.String;if(typeof c=="number")return r.ValueType.Number;if(typeof c=="boolean")return r.ValueType.Boolean;if(c instanceof Date)return r.ValueType.Date;if(c.text&&c.hyperlink)return r.ValueType.Hyperlink;if(c.formula)return r.ValueType.Formula;if(c.error)return r.ValueType.Error;throw new Error("I could not understand type of value")}d.exports=class extends o{constructor(){super(),this.richTextXForm=new t}get tag(){return"c"}prepare(c,i){let a=i.styles.addStyleModel(c.style||{},(function(h){return h.type===r.ValueType.Formula?n(h.result):h.type})(c));switch(a&&(c.styleId=a),c.comment&&i.comments.push({...c.comment,ref:c.address}),c.type){case r.ValueType.String:case r.ValueType.RichText:i.sharedStrings&&(c.ssId=i.sharedStrings.add(c.value));break;case r.ValueType.Date:i.date1904&&(c.date1904=!0);break;case r.ValueType.Hyperlink:i.sharedStrings&&c.text!==void 0&&c.text!==null&&(c.ssId=i.sharedStrings.add(c.text)),i.hyperlinks.push({address:c.address,target:c.hyperlink,tooltip:c.tooltip});break;case r.ValueType.Merge:i.merges.add(c);break;case r.ValueType.Formula:if(i.date1904&&(c.date1904=!0),c.shareType==="shared"&&(c.si=i.siFormulae++),c.formula)i.formulae[c.address]=c;else if(c.sharedFormula){let h=i.formulae[c.sharedFormula];if(!h)throw new Error("Shared Formula master must exist above and or left of clone for cell "+c.address);h.si===void 0?(h.shareType="shared",h.si=i.siFormulae++,h.range=new s(h.address,c.address)):h.range&&h.range.expandToAddress(c.address),c.si=h.si}}}renderFormula(c,i){let a=null;switch(i.shareType){case"shared":a={t:"shared",ref:i.ref||i.range.range,si:i.si};break;case"array":a={t:"array",ref:i.ref};break;default:i.si!==void 0&&(a={t:"shared",si:i.si})}switch(n(i.result)){case r.ValueType.Null:c.leafNode("f",a,i.formula);break;case r.ValueType.String:c.addAttribute("t","str"),c.leafNode("f",a,i.formula),c.leafNode("v",null,i.result);break;case r.ValueType.Number:c.leafNode("f",a,i.formula),c.leafNode("v",null,i.result);break;case r.ValueType.Boolean:c.addAttribute("t","b"),c.leafNode("f",a,i.formula),c.leafNode("v",null,i.result?1:0);break;case r.ValueType.Error:c.addAttribute("t","e"),c.leafNode("f",a,i.formula),c.leafNode("v",null,i.result.error);break;case r.ValueType.Date:c.leafNode("f",a,i.formula),c.leafNode("v",null,l.dateToExcel(i.result,i.date1904));break;default:throw new Error("I could not understand type of value")}}render(c,i){if(i.type!==r.ValueType.Null||i.styleId){switch(c.openNode("c"),c.addAttribute("r",i.address),i.styleId&&c.addAttribute("s",i.styleId),i.type){case r.ValueType.Null:break;case r.ValueType.Number:c.leafNode("v",null,i.value);break;case r.ValueType.Boolean:c.addAttribute("t","b"),c.leafNode("v",null,i.value?"1":"0");break;case r.ValueType.Error:c.addAttribute("t","e"),c.leafNode("v",null,i.value.error);break;case r.ValueType.String:case r.ValueType.RichText:i.ssId!==void 0?(c.addAttribute("t","s"),c.leafNode("v",null,i.ssId)):i.value&&i.value.richText?(c.addAttribute("t","inlineStr"),c.openNode("is"),i.value.richText.forEach(a=>{this.richTextXForm.render(c,a)}),c.closeNode("is")):(c.addAttribute("t","str"),c.leafNode("v",null,i.value));break;case r.ValueType.Date:c.leafNode("v",null,l.dateToExcel(i.value,i.date1904));break;case r.ValueType.Hyperlink:i.ssId!==void 0?(c.addAttribute("t","s"),c.leafNode("v",null,i.ssId)):(c.addAttribute("t","str"),c.leafNode("v",null,i.text));break;case r.ValueType.Formula:this.renderFormula(c,i);break;case r.ValueType.Merge:}c.closeNode()}}parseOpen(c){if(this.parser)return this.parser.parseOpen(c),!0;switch(c.name){case"c":return this.model={address:c.attributes.r},this.t=c.attributes.t,c.attributes.s&&(this.model.styleId=parseInt(c.attributes.s,10)),!0;case"f":return this.currentNode="f",this.model.si=c.attributes.si,this.model.shareType=c.attributes.t,this.model.ref=c.attributes.ref,!0;case"v":return this.currentNode="v",!0;case"t":return this.currentNode="t",!0;case"r":return this.parser=this.richTextXForm,this.parser.parseOpen(c),!0;default:return!1}}parseText(c){if(this.parser)this.parser.parseText(c);else switch(this.currentNode){case"f":this.model.formula=this.model.formula?this.model.formula+c:c;break;case"v":case"t":this.model.value&&this.model.value.richText?this.model.value.richText.text=this.model.value.richText.text?this.model.value.richText.text+c:c:this.model.value=this.model.value?this.model.value+c:c}}parseClose(c){switch(c){case"c":{let{model:i}=this;if(i.formula||i.shareType)i.type=r.ValueType.Formula,i.value&&(this.t==="str"?i.result=l.xmlDecode(i.value):this.t==="b"?i.result=parseInt(i.value,10)!==0:this.t==="e"?i.result={error:i.value}:i.result=parseFloat(i.value),i.value=void 0);else if(i.value!==void 0)switch(this.t){case"s":i.type=r.ValueType.String,i.value=parseInt(i.value,10);break;case"str":i.type=r.ValueType.String,i.value=l.xmlDecode(i.value);break;case"inlineStr":i.type=r.ValueType.String;break;case"b":i.type=r.ValueType.Boolean,i.value=parseInt(i.value,10)!==0;break;case"e":i.type=r.ValueType.Error,i.value={error:i.value};break;default:i.type=r.ValueType.Number,i.value=parseFloat(i.value)}else i.styleId?i.type=r.ValueType.Null:i.type=r.ValueType.Merge;return!1}case"f":case"v":case"is":return this.currentNode=void 0,!0;case"t":return this.parser?(this.parser.parseClose(c),!0):(this.currentNode=void 0,!0);case"r":return this.model.value=this.model.value||{},this.model.value.richText=this.model.value.richText||[],this.model.value.richText.push(this.parser.model),this.parser=void 0,this.currentNode=void 0,!0;default:return!!this.parser&&(this.parser.parseClose(c),!0)}}reconcile(c,i){let a=c.styleId&&i.styles&&i.styles.getStyleModel(c.styleId);switch(a&&(c.style=a),c.styleId!==void 0&&(c.styleId=void 0),c.type){case r.ValueType.String:typeof c.value=="number"&&i.sharedStrings&&(c.value=i.sharedStrings.getString(c.value)),c.value.richText&&(c.type=r.ValueType.RichText);break;case r.ValueType.Number:a&&l.isDateFmt(a.numFmt)&&(c.type=r.ValueType.Date,c.value=l.excelToDate(c.value,i.date1904));break;case r.ValueType.Formula:c.result!==void 0&&a&&l.isDateFmt(a.numFmt)&&(c.result=l.excelToDate(c.result,i.date1904)),c.shareType==="shared"&&(c.ref?i.formulae[c.si]=c.address:(c.sharedFormula=i.formulae[c.si],delete c.shareType),delete c.si)}let h=i.hyperlinkMap[c.address];h&&(c.type===r.ValueType.Formula?(c.text=c.result,c.result=void 0):(c.text=c.value,c.value=void 0),c.type=r.ValueType.Hyperlink,c.hyperlink=h);let f=i.commentsMap&&i.commentsMap[c.address];f&&(c.comment=f)}}},{"../../../doc/enums":7,"../../../doc/range":10,"../../../utils/utils":27,"../base-xform":32,"../strings/rich-text-xform":122}],74:[function(e,d,b){"use strict";let l=e("../../base-xform");d.exports=class extends l{get tag(){return"x14:cfIcon"}render(o,s){o.leafNode(this.tag,{iconSet:s.iconSet,iconId:s.iconId})}parseOpen(o){let{attributes:s}=o;this.model={iconSet:s.iconSet,iconId:l.toIntValue(s.iconId)}}parseClose(o){return o!==this.tag}}},{"../../base-xform":32}],75:[function(e,d,b){"use strict";let{v4:l}=e("uuid"),o=e("../../base-xform"),s=e("../../composite-xform"),r=e("./databar-ext-xform"),t=e("./icon-set-ext-xform"),n={"3Triangles":!0,"3Stars":!0,"5Boxes":!0};class c extends s{constructor(){super(),this.map={"x14:dataBar":this.databarXform=new r,"x14:iconSet":this.iconSetXform=new t}}get tag(){return"x14:cfRule"}static isExt(a){return a.type==="dataBar"?r.isExt(a):!(a.type!=="iconSet"||!a.custom&&!n[a.iconSet])}prepare(a){c.isExt(a)&&(a.x14Id=`{${l()}}`.toUpperCase())}render(a,h){if(c.isExt(h))switch(h.type){case"dataBar":this.renderDataBar(a,h);break;case"iconSet":this.renderIconSet(a,h)}}renderDataBar(a,h){a.openNode(this.tag,{type:"dataBar",id:h.x14Id}),this.databarXform.render(a,h),a.closeNode()}renderIconSet(a,h){a.openNode(this.tag,{type:"iconSet",priority:h.priority,id:h.x14Id||`{${l()}}`}),this.iconSetXform.render(a,h),a.closeNode()}createNewModel(a){let{attributes:h}=a;return{type:h.type,x14Id:h.id,priority:o.toIntValue(h.priority)}}onParserClose(a,h){Object.assign(this.model,h.model)}}d.exports=c},{"../../base-xform":32,"../../composite-xform":48,"./databar-ext-xform":79,"./icon-set-ext-xform":81,uuid:528}],76:[function(e,d,b){"use strict";let l=e("../../composite-xform"),o=e("./f-ext-xform");d.exports=class extends l{constructor(){super(),this.map={"xm:f":this.fExtXform=new o}}get tag(){return"x14:cfvo"}render(s,r){s.openNode(this.tag,{type:r.type}),r.value!==void 0&&this.fExtXform.render(s,r.value),s.closeNode()}createNewModel(s){return{type:s.attributes.type}}onParserClose(s,r){s==="xm:f"&&(this.model.value=r.model?parseFloat(r.model):0)}}},{"../../composite-xform":48,"./f-ext-xform":80}],77:[function(e,d,b){"use strict";let l=e("../../composite-xform"),o=e("./sqref-ext-xform"),s=e("./cf-rule-ext-xform");d.exports=class extends l{constructor(){super(),this.map={"xm:sqref":this.sqRef=new o,"x14:cfRule":this.cfRule=new s}}get tag(){return"x14:conditionalFormatting"}prepare(r,t){r.rules.forEach(n=>{this.cfRule.prepare(n,t)})}render(r,t){t.rules.some(s.isExt)&&(r.openNode(this.tag,{"xmlns:xm":"http://schemas.microsoft.com/office/excel/2006/main"}),t.rules.filter(s.isExt).forEach(n=>this.cfRule.render(r,n)),this.sqRef.render(r,t.ref),r.closeNode())}createNewModel(){return{rules:[]}}onParserClose(r,t){switch(r){case"xm:sqref":this.model.ref=t.model;break;case"x14:cfRule":this.model.rules.push(t.model)}}}},{"../../composite-xform":48,"./cf-rule-ext-xform":75,"./sqref-ext-xform":82}],78:[function(e,d,b){"use strict";let l=e("../../composite-xform"),o=e("./cf-rule-ext-xform"),s=e("./conditional-formatting-ext-xform");d.exports=class extends l{constructor(){super(),this.map={"x14:conditionalFormatting":this.cfXform=new s}}get tag(){return"x14:conditionalFormattings"}hasContent(r){return r.hasExtContent===void 0&&(r.hasExtContent=r.some(t=>t.rules.some(o.isExt))),r.hasExtContent}prepare(r,t){r.forEach(n=>{this.cfXform.prepare(n,t)})}render(r,t){this.hasContent(t)&&(r.openNode(this.tag),t.forEach(n=>this.cfXform.render(r,n)),r.closeNode())}createNewModel(){return[]}onParserClose(r,t){this.model.push(t.model)}}},{"../../composite-xform":48,"./cf-rule-ext-xform":75,"./conditional-formatting-ext-xform":77}],79:[function(e,d,b){"use strict";let l=e("../../base-xform"),o=e("../../composite-xform"),s=e("../../style/color-xform"),r=e("./cfvo-ext-xform");d.exports=class extends o{constructor(){super(),this.map={"x14:cfvo":this.cfvoXform=new r,"x14:borderColor":this.borderColorXform=new s("x14:borderColor"),"x14:negativeBorderColor":this.negativeBorderColorXform=new s("x14:negativeBorderColor"),"x14:negativeFillColor":this.negativeFillColorXform=new s("x14:negativeFillColor"),"x14:axisColor":this.axisColorXform=new s("x14:axisColor")}}static isExt(t){return!t.gradient}get tag(){return"x14:dataBar"}render(t,n){t.openNode(this.tag,{minLength:l.toIntAttribute(n.minLength,0,!0),maxLength:l.toIntAttribute(n.maxLength,100,!0),border:l.toBoolAttribute(n.border,!1),gradient:l.toBoolAttribute(n.gradient,!0),negativeBarColorSameAsPositive:l.toBoolAttribute(n.negativeBarColorSameAsPositive,!0),negativeBarBorderColorSameAsPositive:l.toBoolAttribute(n.negativeBarBorderColorSameAsPositive,!0),axisPosition:l.toAttribute(n.axisPosition,"auto"),direction:l.toAttribute(n.direction,"leftToRight")}),n.cfvo.forEach(c=>{this.cfvoXform.render(t,c)}),this.borderColorXform.render(t,n.borderColor),this.negativeBorderColorXform.render(t,n.negativeBorderColor),this.negativeFillColorXform.render(t,n.negativeFillColor),this.axisColorXform.render(t,n.axisColor),t.closeNode()}createNewModel(t){let{attributes:n}=t;return{cfvo:[],minLength:l.toIntValue(n.minLength,0),maxLength:l.toIntValue(n.maxLength,100),border:l.toBoolValue(n.border,!1),gradient:l.toBoolValue(n.gradient,!0),negativeBarColorSameAsPositive:l.toBoolValue(n.negativeBarColorSameAsPositive,!0),negativeBarBorderColorSameAsPositive:l.toBoolValue(n.negativeBarBorderColorSameAsPositive,!0),axisPosition:l.toStringValue(n.axisPosition,"auto"),direction:l.toStringValue(n.direction,"leftToRight")}}onParserClose(t,n){let[,c]=t.split(":");c==="cfvo"?this.model.cfvo.push(n.model):this.model[c]=n.model}}},{"../../base-xform":32,"../../composite-xform":48,"../../style/color-xform":128,"./cfvo-ext-xform":76}],80:[function(e,d,b){"use strict";let l=e("../../base-xform");d.exports=class extends l{get tag(){return"xm:f"}render(o,s){o.leafNode(this.tag,null,s)}parseOpen(){this.model=""}parseText(o){this.model+=o}parseClose(o){return o!==this.tag}}},{"../../base-xform":32}],81:[function(e,d,b){"use strict";let l=e("../../base-xform"),o=e("../../composite-xform"),s=e("./cfvo-ext-xform"),r=e("./cf-icon-ext-xform");d.exports=class extends o{constructor(){super(),this.map={"x14:cfvo":this.cfvoXform=new s,"x14:cfIcon":this.cfIconXform=new r}}get tag(){return"x14:iconSet"}render(t,n){t.openNode(this.tag,{iconSet:l.toStringAttribute(n.iconSet),reverse:l.toBoolAttribute(n.reverse,!1),showValue:l.toBoolAttribute(n.showValue,!0),custom:l.toBoolAttribute(n.icons,!1)}),n.cfvo.forEach(c=>{this.cfvoXform.render(t,c)}),n.icons&&n.icons.forEach((c,i)=>{c.iconId=i,this.cfIconXform.render(t,c)}),t.closeNode()}createNewModel(t){let{attributes:n}=t;return{cfvo:[],iconSet:l.toStringValue(n.iconSet,"3TrafficLights"),reverse:l.toBoolValue(n.reverse,!1),showValue:l.toBoolValue(n.showValue,!0)}}onParserClose(t,n){let[,c]=t.split(":");switch(c){case"cfvo":this.model.cfvo.push(n.model);break;case"cfIcon":this.model.icons||(this.model.icons=[]),this.model.icons.push(n.model);break;default:this.model[c]=n.model}}}},{"../../base-xform":32,"../../composite-xform":48,"./cf-icon-ext-xform":74,"./cfvo-ext-xform":76}],82:[function(e,d,b){"use strict";let l=e("../../base-xform");d.exports=class extends l{get tag(){return"xm:sqref"}render(o,s){o.leafNode(this.tag,null,s)}parseOpen(){this.model=""}parseText(o){this.model+=o}parseClose(o){return o!==this.tag}}},{"../../base-xform":32}],83:[function(e,d,b){"use strict";let l=e("../../base-xform"),o=e("../../composite-xform"),s=e("../../../../doc/range"),r=e("./databar-xform"),t=e("./ext-lst-ref-xform"),n=e("./formula-xform"),c=e("./color-scale-xform"),i=e("./icon-set-xform"),a={"3Triangles":!0,"3Stars":!0,"5Boxes":!0},h=u=>{let{type:g,operator:m}=u;switch(g){case"containsText":case"containsBlanks":case"notContainsBlanks":case"containsErrors":case"notContainsErrors":return{type:"containsText",operator:g};default:return{type:g,operator:m}}};class f extends o{constructor(){super(),this.map={dataBar:this.databarXform=new r,extLst:this.extLstRefXform=new t,formula:this.formulaXform=new n,colorScale:this.colorScaleXform=new c,iconSet:this.iconSetXform=new i}}get tag(){return"cfRule"}static isPrimitive(g){return g.type!=="iconSet"||!g.custom&&!a[g.iconSet]}render(g,m){switch(m.type){case"expression":this.renderExpression(g,m);break;case"cellIs":this.renderCellIs(g,m);break;case"top10":this.renderTop10(g,m);break;case"aboveAverage":this.renderAboveAverage(g,m);break;case"dataBar":this.renderDataBar(g,m);break;case"colorScale":this.renderColorScale(g,m);break;case"iconSet":this.renderIconSet(g,m);break;case"containsText":this.renderText(g,m);break;case"timePeriod":this.renderTimePeriod(g,m)}}renderExpression(g,m){g.openNode(this.tag,{type:"expression",dxfId:m.dxfId,priority:m.priority}),this.formulaXform.render(g,m.formulae[0]),g.closeNode()}renderCellIs(g,m){g.openNode(this.tag,{type:"cellIs",dxfId:m.dxfId,priority:m.priority,operator:m.operator}),m.formulae.forEach(v=>{this.formulaXform.render(g,v)}),g.closeNode()}renderTop10(g,m){g.leafNode(this.tag,{type:"top10",dxfId:m.dxfId,priority:m.priority,percent:l.toBoolAttribute(m.percent,!1),bottom:l.toBoolAttribute(m.bottom,!1),rank:l.toIntValue(m.rank,10,!0)})}renderAboveAverage(g,m){g.leafNode(this.tag,{type:"aboveAverage",dxfId:m.dxfId,priority:m.priority,aboveAverage:l.toBoolAttribute(m.aboveAverage,!0)})}renderDataBar(g,m){g.openNode(this.tag,{type:"dataBar",priority:m.priority}),this.databarXform.render(g,m),this.extLstRefXform.render(g,m),g.closeNode()}renderColorScale(g,m){g.openNode(this.tag,{type:"colorScale",priority:m.priority}),this.colorScaleXform.render(g,m),g.closeNode()}renderIconSet(g,m){f.isPrimitive(m)&&(g.openNode(this.tag,{type:"iconSet",priority:m.priority}),this.iconSetXform.render(g,m),g.closeNode())}renderText(g,m){g.openNode(this.tag,{type:m.operator,dxfId:m.dxfId,priority:m.priority,operator:l.toStringAttribute(m.operator,"containsText")});let v=(k=>{if(k.formulae&&k.formulae[0])return k.formulae[0];let B=new s(k.ref),{tl:R}=B;switch(k.operator){case"containsText":return`NOT(ISERROR(SEARCH("${k.text}",${R})))`;case"containsBlanks":return`LEN(TRIM(${R}))=0`;case"notContainsBlanks":return`LEN(TRIM(${R}))>0`;case"containsErrors":return`ISERROR(${R})`;case"notContainsErrors":return`NOT(ISERROR(${R}))`;default:return}})(m);v&&this.formulaXform.render(g,v),g.closeNode()}renderTimePeriod(g,m){g.openNode(this.tag,{type:"timePeriod",dxfId:m.dxfId,priority:m.priority,timePeriod:m.timePeriod});let v=(k=>{if(k.formulae&&k.formulae[0])return k.formulae[0];let B=new s(k.ref),{tl:R}=B;switch(k.timePeriod){case"thisWeek":return`AND(TODAY()-ROUNDDOWN(${R},0)<=WEEKDAY(TODAY())-1,ROUNDDOWN(${R},0)-TODAY()<=7-WEEKDAY(TODAY()))`;case"lastWeek":return`AND(TODAY()-ROUNDDOWN(${R},0)>=(WEEKDAY(TODAY())),TODAY()-ROUNDDOWN(${R},0)<(WEEKDAY(TODAY())+7))`;case"nextWeek":return`AND(ROUNDDOWN(${R},0)-TODAY()>(7-WEEKDAY(TODAY())),ROUNDDOWN(${R},0)-TODAY()<(15-WEEKDAY(TODAY())))`;case"yesterday":return`FLOOR(${R},1)=TODAY()-1`;case"today":return`FLOOR(${R},1)=TODAY()`;case"tomorrow":return`FLOOR(${R},1)=TODAY()+1`;case"last7Days":return`AND(TODAY()-FLOOR(${R},1)<=6,FLOOR(${R},1)<=TODAY())`;case"lastMonth":return`AND(MONTH(${R})=MONTH(EDATE(TODAY(),0-1)),YEAR(${R})=YEAR(EDATE(TODAY(),0-1)))`;case"thisMonth":return`AND(MONTH(${R})=MONTH(TODAY()),YEAR(${R})=YEAR(TODAY()))`;case"nextMonth":return`AND(MONTH(${R})=MONTH(EDATE(TODAY(),0+1)),YEAR(${R})=YEAR(EDATE(TODAY(),0+1)))`;default:return}})(m);v&&this.formulaXform.render(g,v),g.closeNode()}createNewModel(g){let{attributes:m}=g;return{...h(m),dxfId:l.toIntValue(m.dxfId),priority:l.toIntValue(m.priority),timePeriod:m.timePeriod,percent:l.toBoolValue(m.percent),bottom:l.toBoolValue(m.bottom),rank:l.toIntValue(m.rank),aboveAverage:l.toBoolValue(m.aboveAverage)}}onParserClose(g,m){switch(g){case"dataBar":case"extLst":case"colorScale":case"iconSet":Object.assign(this.model,m.model);break;case"formula":this.model.formulae=this.model.formulae||[],this.model.formulae.push(m.model)}}}d.exports=f},{"../../../../doc/range":10,"../../base-xform":32,"../../composite-xform":48,"./color-scale-xform":85,"./databar-xform":88,"./ext-lst-ref-xform":89,"./formula-xform":90,"./icon-set-xform":91}],84:[function(e,d,b){"use strict";let l=e("../../base-xform");d.exports=class extends l{get tag(){return"cfvo"}render(o,s){o.leafNode(this.tag,{type:s.type,val:s.value})}parseOpen(o){this.model={type:o.attributes.type,value:l.toFloatValue(o.attributes.val)}}parseClose(o){return o!==this.tag}}},{"../../base-xform":32}],85:[function(e,d,b){"use strict";let l=e("../../composite-xform"),o=e("../../style/color-xform"),s=e("./cfvo-xform");d.exports=class extends l{constructor(){super(),this.map={cfvo:this.cfvoXform=new s,color:this.colorXform=new o}}get tag(){return"colorScale"}render(r,t){r.openNode(this.tag),t.cfvo.forEach(n=>{this.cfvoXform.render(r,n)}),t.color.forEach(n=>{this.colorXform.render(r,n)}),r.closeNode()}createNewModel(r){return{cfvo:[],color:[]}}onParserClose(r,t){this.model[r].push(t.model)}}},{"../../composite-xform":48,"../../style/color-xform":128,"./cfvo-xform":84}],86:[function(e,d,b){"use strict";let l=e("../../composite-xform"),o=e("./cf-rule-xform");d.exports=class extends l{constructor(){super(),this.map={cfRule:new o}}get tag(){return"conditionalFormatting"}render(s,r){r.rules.some(o.isPrimitive)&&(s.openNode(this.tag,{sqref:r.ref}),r.rules.forEach(t=>{o.isPrimitive(t)&&(t.ref=r.ref,this.map.cfRule.render(s,t))}),s.closeNode())}createNewModel(s){let{attributes:r}=s;return{ref:r.sqref,rules:[]}}onParserClose(s,r){this.model.rules.push(r.model)}}},{"../../composite-xform":48,"./cf-rule-xform":83}],87:[function(e,d,b){"use strict";let l=e("../../base-xform"),o=e("./conditional-formatting-xform");d.exports=class extends l{constructor(){super(),this.cfXform=new o}get tag(){return"conditionalFormatting"}reset(){this.model=[]}prepare(s,r){let t=s.reduce((n,c)=>Math.max(n,...c.rules.map(i=>i.priority||0)),1);s.forEach(n=>{n.rules.forEach(c=>{c.priority||(c.priority=t++),c.style&&(c.dxfId=r.styles.addDxfStyle(c.style))})})}render(s,r){r.forEach(t=>{this.cfXform.render(s,t)})}parseOpen(s){return this.parser?(this.parser.parseOpen(s),!0):s.name==="conditionalFormatting"?(this.parser=this.cfXform,this.parser.parseOpen(s),!0):!1}parseText(s){this.parser&&this.parser.parseText(s)}parseClose(s){return!!this.parser&&(!!this.parser.parseClose(s)||(this.model.push(this.parser.model),this.parser=void 0,!1))}reconcile(s,r){s.forEach(t=>{t.rules.forEach(n=>{n.dxfId!==void 0&&(n.style=r.styles.getDxfStyle(n.dxfId),delete n.dxfId)})})}}},{"../../base-xform":32,"./conditional-formatting-xform":86}],88:[function(e,d,b){"use strict";let l=e("../../composite-xform"),o=e("../../style/color-xform"),s=e("./cfvo-xform");d.exports=class extends l{constructor(){super(),this.map={cfvo:this.cfvoXform=new s,color:this.colorXform=new o}}get tag(){return"dataBar"}render(r,t){r.openNode(this.tag),t.cfvo.forEach(n=>{this.cfvoXform.render(r,n)}),this.colorXform.render(r,t.color),r.closeNode()}createNewModel(){return{cfvo:[]}}onParserClose(r,t){switch(r){case"cfvo":this.model.cfvo.push(t.model);break;case"color":this.model.color=t.model}}}},{"../../composite-xform":48,"../../style/color-xform":128,"./cfvo-xform":84}],89:[function(e,d,b){"use strict";let l=e("../../base-xform"),o=e("../../composite-xform");class s extends l{get tag(){return"x14:id"}render(n,c){n.leafNode(this.tag,null,c)}parseOpen(){this.model=""}parseText(n){this.model+=n}parseClose(n){return n!==this.tag}}class r extends o{constructor(){super(),this.map={"x14:id":this.idXform=new s}}get tag(){return"ext"}render(n,c){n.openNode(this.tag,{uri:"{B025F937-C7B1-47D3-B67F-A62EFF666E3E}","xmlns:x14":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"}),this.idXform.render(n,c.x14Id),n.closeNode()}createNewModel(){return{}}onParserClose(n,c){this.model.x14Id=c.model}}d.exports=class extends o{constructor(){super(),this.map={ext:new r}}get tag(){return"extLst"}render(t,n){t.openNode(this.tag),this.map.ext.render(t,n),t.closeNode()}createNewModel(){return{}}onParserClose(t,n){Object.assign(this.model,n.model)}}},{"../../base-xform":32,"../../composite-xform":48}],90:[function(e,d,b){"use strict";let l=e("../../base-xform");d.exports=class extends l{get tag(){return"formula"}render(o,s){o.leafNode(this.tag,null,s)}parseOpen(){this.model=""}parseText(o){this.model+=o}parseClose(o){return o!==this.tag}}},{"../../base-xform":32}],91:[function(e,d,b){"use strict";let l=e("../../base-xform"),o=e("../../composite-xform"),s=e("./cfvo-xform");d.exports=class extends o{constructor(){super(),this.map={cfvo:this.cfvoXform=new s}}get tag(){return"iconSet"}render(r,t){r.openNode(this.tag,{iconSet:l.toStringAttribute(t.iconSet,"3TrafficLights"),reverse:l.toBoolAttribute(t.reverse,!1),showValue:l.toBoolAttribute(t.showValue,!0)}),t.cfvo.forEach(n=>{this.cfvoXform.render(r,n)}),r.closeNode()}createNewModel(r){let{attributes:t}=r;return{iconSet:l.toStringValue(t.iconSet,"3TrafficLights"),reverse:l.toBoolValue(t.reverse),showValue:l.toBoolValue(t.showValue),cfvo:[]}}onParserClose(r,t){this.model[r].push(t.model)}}},{"../../base-xform":32,"../../composite-xform":48,"./cfvo-xform":84}],92:[function(e,d,b){"use strict";let l=e("../../../utils/utils"),o=e("../base-xform");d.exports=class extends o{get tag(){return"col"}prepare(s,r){let t=r.styles.addStyleModel(s.style||{});t&&(s.styleId=t)}render(s,r){s.openNode("col"),s.addAttribute("min",r.min),s.addAttribute("max",r.max),r.width&&s.addAttribute("width",r.width),r.styleId&&s.addAttribute("style",r.styleId),r.hidden&&s.addAttribute("hidden","1"),r.bestFit&&s.addAttribute("bestFit","1"),r.outlineLevel&&s.addAttribute("outlineLevel",r.outlineLevel),r.collapsed&&s.addAttribute("collapsed","1"),s.addAttribute("customWidth","1"),s.closeNode()}parseOpen(s){if(s.name==="col"){let r=this.model={min:parseInt(s.attributes.min||"0",10),max:parseInt(s.attributes.max||"0",10),width:s.attributes.width===void 0?void 0:parseFloat(s.attributes.width||"0")};return s.attributes.style&&(r.styleId=parseInt(s.attributes.style,10)),l.parseBoolean(s.attributes.hidden)&&(r.hidden=!0),l.parseBoolean(s.attributes.bestFit)&&(r.bestFit=!0),s.attributes.outlineLevel&&(r.outlineLevel=parseInt(s.attributes.outlineLevel,10)),l.parseBoolean(s.attributes.collapsed)&&(r.collapsed=!0),!0}return!1}parseText(){}parseClose(){return!1}reconcile(s,r){s.styleId&&(s.style=r.styles.getStyleModel(s.styleId))}}},{"../../../utils/utils":27,"../base-xform":32}],93:[function(e,d,b){"use strict";let l=e("../../../utils/under-dash"),o=e("../../../utils/utils"),s=e("../../../utils/col-cache"),r=e("../base-xform"),t=e("../../../doc/range");function n(i,a,h,f){let u=a[h];u!==void 0?i[h]=u:f!==void 0&&(i[h]=f)}function c(i,a,h,f){let u=a[h];u!==void 0?i[h]=o.parseBoolean(u):f!==void 0&&(i[h]=f)}d.exports=class extends r{get tag(){return"dataValidations"}render(i,a){let h=(function(f){let u=l.map(f,(v,k)=>({address:k,dataValidation:v,marked:!1})).sort((v,k)=>l.strcmp(v.address,k.address)),g=l.keyBy(u,"address"),m=(v,k,B)=>{for(let R=0;R<k;R++){let L=s.encodeAddress(v.row+R,B);if(!f[L]||!l.isEqual(f[v.address],f[L]))return!1}return!0};return u.map(v=>{if(!v.marked){let k=s.decodeEx(v.address);if(k.dimensions)return g[k.dimensions].marked=!0,{...v.dataValidation,sqref:v.address};let B=1,R=s.encodeAddress(k.row+B,k.col);for(;f[R]&&l.isEqual(v.dataValidation,f[R]);)B++,R=s.encodeAddress(k.row+B,k.col);let L=1;for(;m(k,B,k.col+L);)L++;for(let A=0;A<B;A++)for(let P=0;P<L;P++)R=s.encodeAddress(k.row+A,k.col+P),g[R].marked=!0;if(B>1||L>1){let A=k.row+(B-1),P=k.col+(L-1);return{...v.dataValidation,sqref:`${v.address}:${s.encodeAddress(A,P)}`}}return{...v.dataValidation,sqref:v.address}}return null}).filter(Boolean)})(a);h.length&&(i.openNode("dataValidations",{count:h.length}),h.forEach(f=>{i.openNode("dataValidation"),f.type!=="any"&&(i.addAttribute("type",f.type),f.operator&&f.type!=="list"&&f.operator!=="between"&&i.addAttribute("operator",f.operator),f.allowBlank&&i.addAttribute("allowBlank","1")),f.showInputMessage&&i.addAttribute("showInputMessage","1"),f.promptTitle&&i.addAttribute("promptTitle",f.promptTitle),f.prompt&&i.addAttribute("prompt",f.prompt),f.showErrorMessage&&i.addAttribute("showErrorMessage","1"),f.errorStyle&&i.addAttribute("errorStyle",f.errorStyle),f.errorTitle&&i.addAttribute("errorTitle",f.errorTitle),f.error&&i.addAttribute("error",f.error),i.addAttribute("sqref",f.sqref),(f.formulae||[]).forEach((u,g)=>{i.openNode("formula"+(g+1)),f.type==="date"?i.writeText(o.dateToExcel(new Date(u))):i.writeText(u),i.closeNode()}),i.closeNode()}),i.closeNode())}parseOpen(i){switch(i.name){case"dataValidations":return this.model={},!0;case"dataValidation":{this._address=i.attributes.sqref;let a={type:i.attributes.type||"any",formulae:[]};switch(i.attributes.type&&c(a,i.attributes,"allowBlank"),c(a,i.attributes,"showInputMessage"),c(a,i.attributes,"showErrorMessage"),a.type){case"any":case"list":case"custom":break;default:n(a,i.attributes,"operator","between")}return n(a,i.attributes,"promptTitle"),n(a,i.attributes,"prompt"),n(a,i.attributes,"errorStyle"),n(a,i.attributes,"errorTitle"),n(a,i.attributes,"error"),this._dataValidation=a,!0}case"formula1":case"formula2":return this._formula=[],!0;default:return!1}}parseText(i){this._formula&&this._formula.push(i)}parseClose(i){switch(i){case"dataValidations":return!1;case"dataValidation":return this._dataValidation.formulae&&this._dataValidation.formulae.length||(delete this._dataValidation.formulae,delete this._dataValidation.operator),(this._address.split(/\s+/g)||[]).forEach(a=>{a.includes(":")?new t(a).forEachAddress(h=>{this.model[h]=this._dataValidation}):this.model[a]=this._dataValidation}),!0;case"formula1":case"formula2":{let a=this._formula.join("");switch(this._dataValidation.type){case"whole":case"textLength":a=parseInt(a,10);break;case"decimal":a=parseFloat(a);break;case"date":a=o.excelToDate(parseFloat(a))}return this._dataValidation.formulae.push(a),this._formula=void 0,!0}default:return!0}}}},{"../../../doc/range":10,"../../../utils/col-cache":19,"../../../utils/under-dash":26,"../../../utils/utils":27,"../base-xform":32}],94:[function(e,d,b){"use strict";let l=e("../base-xform");d.exports=class extends l{get tag(){return"dimension"}render(o,s){s&&o.leafNode("dimension",{ref:s})}parseOpen(o){return o.name==="dimension"&&(this.model=o.attributes.ref,!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],95:[function(e,d,b){"use strict";let l=e("../base-xform");d.exports=class extends l{get tag(){return"drawing"}render(o,s){s&&o.leafNode(this.tag,{"r:id":s.rId})}parseOpen(o){return o.name===this.tag?(this.model={rId:o.attributes["r:id"]},!0):!1}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],96:[function(e,d,b){"use strict";let l=e("../composite-xform"),o=e("./cf-ext/conditional-formattings-ext-xform");class s extends l{constructor(){super(),this.map={"x14:conditionalFormattings":this.conditionalFormattings=new o}}get tag(){return"ext"}hasContent(t){return this.conditionalFormattings.hasContent(t.conditionalFormattings)}prepare(t,n){this.conditionalFormattings.prepare(t.conditionalFormattings,n)}render(t,n){t.openNode("ext",{uri:"{78C0D931-6437-407d-A8EE-F0AAD7539E65}","xmlns:x14":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"}),this.conditionalFormattings.render(t,n.conditionalFormattings),t.closeNode()}createNewModel(){return{}}onParserClose(t,n){this.model[t]=n.model}}d.exports=class extends l{constructor(){super(),this.map={ext:this.ext=new s}}get tag(){return"extLst"}prepare(r,t){this.ext.prepare(r,t)}hasContent(r){return this.ext.hasContent(r)}render(r,t){this.hasContent(t)&&(r.openNode("extLst"),this.ext.render(r,t),r.closeNode())}createNewModel(){return{}}onParserClose(r,t){Object.assign(this.model,t.model)}}},{"../composite-xform":48,"./cf-ext/conditional-formattings-ext-xform":78}],97:[function(e,d,b){"use strict";let l=e("../base-xform");d.exports=class extends l{get tag(){return"headerFooter"}render(o,s){if(s){o.addRollback();let r=!1;o.openNode("headerFooter"),s.differentFirst&&(o.addAttribute("differentFirst","1"),r=!0),s.differentOddEven&&(o.addAttribute("differentOddEven","1"),r=!0),s.oddHeader&&typeof s.oddHeader=="string"&&(o.leafNode("oddHeader",null,s.oddHeader),r=!0),s.oddFooter&&typeof s.oddFooter=="string"&&(o.leafNode("oddFooter",null,s.oddFooter),r=!0),s.evenHeader&&typeof s.evenHeader=="string"&&(o.leafNode("evenHeader",null,s.evenHeader),r=!0),s.evenFooter&&typeof s.evenFooter=="string"&&(o.leafNode("evenFooter",null,s.evenFooter),r=!0),s.firstHeader&&typeof s.firstHeader=="string"&&(o.leafNode("firstHeader",null,s.firstHeader),r=!0),s.firstFooter&&typeof s.firstFooter=="string"&&(o.leafNode("firstFooter",null,s.firstFooter),r=!0),r?(o.closeNode(),o.commit()):o.rollback()}}parseOpen(o){switch(o.name){case"headerFooter":return this.model={},o.attributes.differentFirst&&(this.model.differentFirst=parseInt(o.attributes.differentFirst,0)===1),o.attributes.differentOddEven&&(this.model.differentOddEven=parseInt(o.attributes.differentOddEven,0)===1),!0;case"oddHeader":return this.currentNode="oddHeader",!0;case"oddFooter":return this.currentNode="oddFooter",!0;case"evenHeader":return this.currentNode="evenHeader",!0;case"evenFooter":return this.currentNode="evenFooter",!0;case"firstHeader":return this.currentNode="firstHeader",!0;case"firstFooter":return this.currentNode="firstFooter",!0;default:return!1}}parseText(o){switch(this.currentNode){case"oddHeader":this.model.oddHeader=o;break;case"oddFooter":this.model.oddFooter=o;break;case"evenHeader":this.model.evenHeader=o;break;case"evenFooter":this.model.evenFooter=o;break;case"firstHeader":this.model.firstHeader=o;break;case"firstFooter":this.model.firstFooter=o}}parseClose(){switch(this.currentNode){case"oddHeader":case"oddFooter":case"evenHeader":case"evenFooter":case"firstHeader":case"firstFooter":return this.currentNode=void 0,!0;default:return!1}}}},{"../base-xform":32}],98:[function(e,d,b){"use strict";let l=e("../base-xform");d.exports=class extends l{get tag(){return"hyperlink"}render(o,s){this.isInternalLink(s)?o.leafNode("hyperlink",{ref:s.address,"r:id":s.rId,tooltip:s.tooltip,location:s.target}):o.leafNode("hyperlink",{ref:s.address,"r:id":s.rId,tooltip:s.tooltip})}parseOpen(o){return o.name==="hyperlink"&&(this.model={address:o.attributes.ref,rId:o.attributes["r:id"],tooltip:o.attributes.tooltip},o.attributes.location&&(this.model.target=o.attributes.location),!0)}parseText(){}parseClose(){return!1}isInternalLink(o){return o.target&&/^[^!]+![a-zA-Z]+[\d]+$/.test(o.target)}}},{"../base-xform":32}],99:[function(e,d,b){"use strict";let l=e("../base-xform");d.exports=class extends l{get tag(){return"mergeCell"}render(o,s){o.leafNode("mergeCell",{ref:s})}parseOpen(o){return o.name==="mergeCell"&&(this.model=o.attributes.ref,!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],100:[function(e,d,b){"use strict";let l=e("../../../utils/under-dash"),o=e("../../../doc/range"),s=e("../../../utils/col-cache"),r=e("../../../doc/enums");d.exports=class{constructor(){this.merges={}}add(t){if(this.merges[t.master])this.merges[t.master].expandToAddress(t.address);else{let n=`${t.master}:${t.address}`;this.merges[t.master]=new o(n)}}get mergeCells(){return l.map(this.merges,t=>t.range)}reconcile(t,n){l.each(t,c=>{let i=s.decode(c);for(let a=i.top;a<=i.bottom;a++){let h=n[a-1];for(let f=i.left;f<=i.right;f++){let u=h.cells[f-1];u?u.type===r.ValueType.Merge&&(u.master=i.tl):h.cells[f]={type:r.ValueType.Null,address:s.encodeAddress(a,f)}}}})}getMasterAddress(t){let n=this.hash[t];return n&&n.tl}}},{"../../../doc/enums":7,"../../../doc/range":10,"../../../utils/col-cache":19,"../../../utils/under-dash":26}],101:[function(e,d,b){"use strict";let l=e("../base-xform"),o=s=>s!==void 0;d.exports=class extends l{get tag(){return"outlinePr"}render(s,r){return!(!r||!o(r.summaryBelow)&&!o(r.summaryRight))&&(s.leafNode(this.tag,{summaryBelow:o(r.summaryBelow)?Number(r.summaryBelow):void 0,summaryRight:o(r.summaryRight)?Number(r.summaryRight):void 0}),!0)}parseOpen(s){return s.name===this.tag&&(this.model={summaryBelow:o(s.attributes.summaryBelow)?!!Number(s.attributes.summaryBelow):void 0,summaryRight:o(s.attributes.summaryRight)?!!Number(s.attributes.summaryRight):void 0},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],102:[function(e,d,b){"use strict";let l=e("../base-xform");d.exports=class extends l{get tag(){return"brk"}render(o,s){o.leafNode("brk",s)}parseOpen(o){return o.name==="brk"&&(this.model=o.attributes.ref,!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],103:[function(e,d,b){"use strict";let l=e("../../../utils/under-dash"),o=e("../base-xform");d.exports=class extends o{get tag(){return"pageMargins"}render(s,r){if(r){let t={left:r.left,right:r.right,top:r.top,bottom:r.bottom,header:r.header,footer:r.footer};l.some(t,n=>n!==void 0)&&s.leafNode(this.tag,t)}}parseOpen(s){return s.name===this.tag?(this.model={left:parseFloat(s.attributes.left||.7),right:parseFloat(s.attributes.right||.7),top:parseFloat(s.attributes.top||.75),bottom:parseFloat(s.attributes.bottom||.75),header:parseFloat(s.attributes.header||.3),footer:parseFloat(s.attributes.footer||.3)},!0):!1}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],104:[function(e,d,b){"use strict";let l=e("../base-xform");d.exports=class extends l{get tag(){return"pageSetUpPr"}render(o,s){return!(!s||!s.fitToPage)&&(o.leafNode(this.tag,{fitToPage:s.fitToPage?"1":void 0}),!0)}parseOpen(o){return o.name===this.tag&&(this.model={fitToPage:o.attributes.fitToPage==="1"},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],105:[function(e,d,b){"use strict";let l=e("../../../utils/under-dash"),o=e("../base-xform");function s(c){return c?"1":void 0}function r(c){if(c==="overThenDown")return c}function t(c){switch(c){case"atEnd":case"asDisplyed":return c;default:return}}function n(c){switch(c){case"dash":case"blank":case"NA":return c;default:return}}d.exports=class extends o{get tag(){return"pageSetup"}render(c,i){if(i){let a={paperSize:i.paperSize,orientation:i.orientation,horizontalDpi:i.horizontalDpi,verticalDpi:i.verticalDpi,pageOrder:r(i.pageOrder),blackAndWhite:s(i.blackAndWhite),draft:s(i.draft),cellComments:t(i.cellComments),errors:n(i.errors),scale:i.scale,fitToWidth:i.fitToWidth,fitToHeight:i.fitToHeight,firstPageNumber:i.firstPageNumber,useFirstPageNumber:s(i.firstPageNumber),usePrinterDefaults:s(i.usePrinterDefaults),copies:i.copies};l.some(a,h=>h!==void 0)&&c.leafNode(this.tag,a)}}parseOpen(c){if(c.name===this.tag)return this.model={paperSize:(i=c.attributes.paperSize,i!==void 0?parseInt(i,10):void 0),orientation:c.attributes.orientation||"portrait",horizontalDpi:parseInt(c.attributes.horizontalDpi||"4294967295",10),verticalDpi:parseInt(c.attributes.verticalDpi||"4294967295",10),pageOrder:c.attributes.pageOrder||"downThenOver",blackAndWhite:c.attributes.blackAndWhite==="1",draft:c.attributes.draft==="1",cellComments:c.attributes.cellComments||"None",errors:c.attributes.errors||"displayed",scale:parseInt(c.attributes.scale||"100",10),fitToWidth:parseInt(c.attributes.fitToWidth||"1",10),fitToHeight:parseInt(c.attributes.fitToHeight||"1",10),firstPageNumber:parseInt(c.attributes.firstPageNumber||"1",10),useFirstPageNumber:c.attributes.useFirstPageNumber==="1",usePrinterDefaults:c.attributes.usePrinterDefaults==="1",copies:parseInt(c.attributes.copies||"1",10)},!0;return!1;var i}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],106:[function(e,d,b){"use strict";let l=e("../base-xform");d.exports=class extends l{get tag(){return"picture"}render(o,s){s&&o.leafNode(this.tag,{"r:id":s.rId})}parseOpen(o){return o.name===this.tag?(this.model={rId:o.attributes["r:id"]},!0):!1}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],107:[function(e,d,b){"use strict";let l=e("../../../utils/under-dash"),o=e("../base-xform");function s(r){return r?"1":void 0}d.exports=class extends o{get tag(){return"printOptions"}render(r,t){if(t){let n={headings:s(t.showRowColHeaders),gridLines:s(t.showGridLines),horizontalCentered:s(t.horizontalCentered),verticalCentered:s(t.verticalCentered)};l.some(n,c=>c!==void 0)&&r.leafNode(this.tag,n)}}parseOpen(r){return r.name===this.tag?(this.model={showRowColHeaders:r.attributes.headings==="1",showGridLines:r.attributes.gridLines==="1",horizontalCentered:r.attributes.horizontalCentered==="1",verticalCentered:r.attributes.verticalCentered==="1"},!0):!1}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],108:[function(e,d,b){"use strict";let l=e("./page-breaks-xform"),o=e("../list-xform");d.exports=class extends o{constructor(){super({tag:"rowBreaks",count:!0,childXform:new l})}render(s,r){if(r&&r.length){s.openNode(this.tag,this.$),this.count&&(s.addAttribute(this.$count,r.length),s.addAttribute("manualBreakCount",r.length));let{childXform:t}=this;r.forEach(n=>{t.render(s,n)}),s.closeNode()}else this.empty&&s.leafNode(this.tag)}}},{"../list-xform":71,"./page-breaks-xform":102}],109:[function(e,d,b){"use strict";let l=e("../base-xform"),o=e("../../../utils/utils"),s=e("./cell-xform");d.exports=class extends l{constructor(r){super(),this.maxItems=r&&r.maxItems,this.map={c:new s}}get tag(){return"row"}prepare(r,t){let n=t.styles.addStyleModel(r.style);n&&(r.styleId=n);let c=this.map.c;r.cells.forEach(i=>{c.prepare(i,t)})}render(r,t,n){r.openNode("row"),r.addAttribute("r",t.number),t.height&&(r.addAttribute("ht",t.height),r.addAttribute("customHeight","1")),t.hidden&&r.addAttribute("hidden","1"),t.min>0&&t.max>0&&t.min<=t.max&&r.addAttribute("spans",`${t.min}:${t.max}`),t.styleId&&(r.addAttribute("s",t.styleId),r.addAttribute("customFormat","1")),r.addAttribute("x14ac:dyDescent","0.25"),t.outlineLevel&&r.addAttribute("outlineLevel",t.outlineLevel),t.collapsed&&r.addAttribute("collapsed","1");let c=this.map.c;t.cells.forEach(i=>{c.render(r,i,n)}),r.closeNode()}parseOpen(r){if(this.parser)return this.parser.parseOpen(r),!0;if(r.name==="row"){this.numRowsSeen+=1;let t=r.attributes.spans?r.attributes.spans.split(":").map(c=>parseInt(c,10)):[void 0,void 0],n=this.model={number:parseInt(r.attributes.r,10),min:t[0],max:t[1],cells:[]};return r.attributes.s&&(n.styleId=parseInt(r.attributes.s,10)),o.parseBoolean(r.attributes.hidden)&&(n.hidden=!0),o.parseBoolean(r.attributes.bestFit)&&(n.bestFit=!0),r.attributes.ht&&(n.height=parseFloat(r.attributes.ht)),r.attributes.outlineLevel&&(n.outlineLevel=parseInt(r.attributes.outlineLevel,10)),o.parseBoolean(r.attributes.collapsed)&&(n.collapsed=!0),!0}return this.parser=this.map[r.name],!!this.parser&&(this.parser.parseOpen(r),!0)}parseText(r){this.parser&&this.parser.parseText(r)}parseClose(r){if(this.parser){if(!this.parser.parseClose(r)){if(this.model.cells.push(this.parser.model),this.maxItems&&this.model.cells.length>this.maxItems)throw new Error(`Max column count (${this.maxItems}) exceeded`);this.parser=void 0}return!0}return!1}reconcile(r,t){r.style=r.styleId?t.styles.getStyleModel(r.styleId):{},r.styleId!==void 0&&(r.styleId=void 0);let n=this.map.c;r.cells.forEach(c=>{n.reconcile(c,t)})}}},{"../../../utils/utils":27,"../base-xform":32,"./cell-xform":73}],110:[function(e,d,b){"use strict";let l=e("../../../utils/under-dash"),o=e("../base-xform");d.exports=class extends o{get tag(){return"sheetFormatPr"}render(s,r){if(r){let t={defaultRowHeight:r.defaultRowHeight,outlineLevelRow:r.outlineLevelRow,outlineLevelCol:r.outlineLevelCol,"x14ac:dyDescent":r.dyDescent};r.defaultColWidth&&(t.defaultColWidth=r.defaultColWidth),r.defaultRowHeight&&r.defaultRowHeight===15||(t.customHeight="1"),l.some(t,n=>n!==void 0)&&s.leafNode("sheetFormatPr",t)}}parseOpen(s){return s.name==="sheetFormatPr"&&(this.model={defaultRowHeight:parseFloat(s.attributes.defaultRowHeight||"0"),dyDescent:parseFloat(s.attributes["x14ac:dyDescent"]||"0"),outlineLevelRow:parseInt(s.attributes.outlineLevelRow||"0",10),outlineLevelCol:parseInt(s.attributes.outlineLevelCol||"0",10)},s.attributes.defaultColWidth&&(this.model.defaultColWidth=parseFloat(s.attributes.defaultColWidth)),!0)}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],111:[function(e,d,b){"use strict";let l=e("../base-xform"),o=e("../style/color-xform"),s=e("./page-setup-properties-xform"),r=e("./outline-properties-xform");d.exports=class extends l{constructor(){super(),this.map={tabColor:new o("tabColor"),pageSetUpPr:new s,outlinePr:new r}}get tag(){return"sheetPr"}render(t,n){if(n){t.addRollback(),t.openNode("sheetPr");let c=!1;c=this.map.tabColor.render(t,n.tabColor)||c,c=this.map.pageSetUpPr.render(t,n.pageSetup)||c,c=this.map.outlinePr.render(t,n.outlineProperties)||c,c?(t.closeNode(),t.commit()):t.rollback()}}parseOpen(t){return this.parser?(this.parser.parseOpen(t),!0):t.name===this.tag?(this.reset(),!0):!!this.map[t.name]&&(this.parser=this.map[t.name],this.parser.parseOpen(t),!0)}parseText(t){return!!this.parser&&(this.parser.parseText(t),!0)}parseClose(t){return this.parser?(this.parser.parseClose(t)||(this.parser=void 0),!0):(this.map.tabColor.model||this.map.pageSetUpPr.model||this.map.outlinePr.model?(this.model={},this.map.tabColor.model&&(this.model.tabColor=this.map.tabColor.model),this.map.pageSetUpPr.model&&(this.model.pageSetup=this.map.pageSetUpPr.model),this.map.outlinePr.model&&(this.model.outlineProperties=this.map.outlinePr.model)):this.model=null,!1)}}},{"../base-xform":32,"../style/color-xform":128,"./outline-properties-xform":101,"./page-setup-properties-xform":104}],112:[function(e,d,b){"use strict";let l=e("../../../utils/under-dash"),o=e("../base-xform");function s(t,n){return t?n:void 0}function r(t,n){return t===n||void 0}d.exports=class extends o{get tag(){return"sheetProtection"}render(t,n){if(n){let c={sheet:s(n.sheet,"1"),selectLockedCells:n.selectLockedCells===!1?"1":void 0,selectUnlockedCells:n.selectUnlockedCells===!1?"1":void 0,formatCells:s(n.formatCells,"0"),formatColumns:s(n.formatColumns,"0"),formatRows:s(n.formatRows,"0"),insertColumns:s(n.insertColumns,"0"),insertRows:s(n.insertRows,"0"),insertHyperlinks:s(n.insertHyperlinks,"0"),deleteColumns:s(n.deleteColumns,"0"),deleteRows:s(n.deleteRows,"0"),sort:s(n.sort,"0"),autoFilter:s(n.autoFilter,"0"),pivotTables:s(n.pivotTables,"0")};n.sheet&&(c.algorithmName=n.algorithmName,c.hashValue=n.hashValue,c.saltValue=n.saltValue,c.spinCount=n.spinCount,c.objects=s(n.objects===!1,"1"),c.scenarios=s(n.scenarios===!1,"1")),l.some(c,i=>i!==void 0)&&t.leafNode(this.tag,c)}}parseOpen(t){return t.name===this.tag?(this.model={sheet:r(t.attributes.sheet,"1"),objects:t.attributes.objects!=="1"&&void 0,scenarios:t.attributes.scenarios!=="1"&&void 0,selectLockedCells:t.attributes.selectLockedCells!=="1"&&void 0,selectUnlockedCells:t.attributes.selectUnlockedCells!=="1"&&void 0,formatCells:r(t.attributes.formatCells,"0"),formatColumns:r(t.attributes.formatColumns,"0"),formatRows:r(t.attributes.formatRows,"0"),insertColumns:r(t.attributes.insertColumns,"0"),insertRows:r(t.attributes.insertRows,"0"),insertHyperlinks:r(t.attributes.insertHyperlinks,"0"),deleteColumns:r(t.attributes.deleteColumns,"0"),deleteRows:r(t.attributes.deleteRows,"0"),sort:r(t.attributes.sort,"0"),autoFilter:r(t.attributes.autoFilter,"0"),pivotTables:r(t.attributes.pivotTables,"0")},t.attributes.algorithmName&&(this.model.algorithmName=t.attributes.algorithmName,this.model.hashValue=t.attributes.hashValue,this.model.saltValue=t.attributes.saltValue,this.model.spinCount=parseInt(t.attributes.spinCount,10)),!0):!1}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],113:[function(e,d,b){"use strict";let l=e("../../../utils/col-cache"),o=e("../base-xform"),s={frozen:"frozen",frozenSplit:"frozen",split:"split"};d.exports=class extends o{get tag(){return"sheetView"}prepare(r){switch(r.state){case"frozen":case"split":break;default:r.state="normal"}}render(r,t){r.openNode("sheetView",{workbookViewId:t.workbookViewId||0});let n=function(f,u,g){g&&r.addAttribute(f,u)},c,i,a,h;switch(n("rightToLeft","1",t.rightToLeft===!0),n("tabSelected","1",t.tabSelected),n("showRuler","0",t.showRuler===!1),n("showRowColHeaders","0",t.showRowColHeaders===!1),n("showGridLines","0",t.showGridLines===!1),n("zoomScale",t.zoomScale,t.zoomScale),n("zoomScaleNormal",t.zoomScaleNormal,t.zoomScaleNormal),n("view",t.style,t.style),t.state){case"frozen":i=t.xSplit||0,a=t.ySplit||0,c=t.topLeftCell||l.getAddress(a+1,i+1).address,h=(t.xSplit&&t.ySplit?"bottomRight":t.xSplit&&"topRight")||"bottomLeft",r.leafNode("pane",{xSplit:t.xSplit||void 0,ySplit:t.ySplit||void 0,topLeftCell:c,activePane:h,state:"frozen"}),r.leafNode("selection",{pane:h,activeCell:t.activeCell,sqref:t.activeCell});break;case"split":t.activePane==="topLeft"&&(t.activePane=void 0),r.leafNode("pane",{xSplit:t.xSplit||void 0,ySplit:t.ySplit||void 0,topLeftCell:t.topLeftCell,activePane:t.activePane}),r.leafNode("selection",{pane:t.activePane,activeCell:t.activeCell,sqref:t.activeCell});break;case"normal":t.activeCell&&r.leafNode("selection",{activeCell:t.activeCell,sqref:t.activeCell})}r.closeNode()}parseOpen(r){switch(r.name){case"sheetView":return this.sheetView={workbookViewId:parseInt(r.attributes.workbookViewId,10),rightToLeft:r.attributes.rightToLeft==="1",tabSelected:r.attributes.tabSelected==="1",showRuler:r.attributes.showRuler!=="0",showRowColHeaders:r.attributes.showRowColHeaders!=="0",showGridLines:r.attributes.showGridLines!=="0",zoomScale:parseInt(r.attributes.zoomScale||"100",10),zoomScaleNormal:parseInt(r.attributes.zoomScaleNormal||"100",10),style:r.attributes.view},this.pane=void 0,this.selections={},!0;case"pane":return this.pane={xSplit:parseInt(r.attributes.xSplit||"0",10),ySplit:parseInt(r.attributes.ySplit||"0",10),topLeftCell:r.attributes.topLeftCell,activePane:r.attributes.activePane||"topLeft",state:r.attributes.state},!0;case"selection":{let t=r.attributes.pane||"topLeft";return this.selections[t]={pane:t,activeCell:r.attributes.activeCell},!0}default:return!1}}parseText(){}parseClose(r){let t,n;return r==="sheetView"?(this.sheetView&&this.pane?(t=this.model={workbookViewId:this.sheetView.workbookViewId,rightToLeft:this.sheetView.rightToLeft,state:s[this.pane.state]||"split",xSplit:this.pane.xSplit,ySplit:this.pane.ySplit,topLeftCell:this.pane.topLeftCell,showRuler:this.sheetView.showRuler,showRowColHeaders:this.sheetView.showRowColHeaders,showGridLines:this.sheetView.showGridLines,zoomScale:this.sheetView.zoomScale,zoomScaleNormal:this.sheetView.zoomScaleNormal},this.model.state==="split"&&(t.activePane=this.pane.activePane),n=this.selections[this.pane.activePane],n&&n.activeCell&&(t.activeCell=n.activeCell),this.sheetView.style&&(t.style=this.sheetView.style)):(t=this.model={workbookViewId:this.sheetView.workbookViewId,rightToLeft:this.sheetView.rightToLeft,state:"normal",showRuler:this.sheetView.showRuler,showRowColHeaders:this.sheetView.showRowColHeaders,showGridLines:this.sheetView.showGridLines,zoomScale:this.sheetView.zoomScale,zoomScaleNormal:this.sheetView.zoomScaleNormal},n=this.selections.topLeft,n&&n.activeCell&&(t.activeCell=n.activeCell),this.sheetView.style&&(t.style=this.sheetView.style)),!1):!0}reconcile(){}}},{"../../../utils/col-cache":19,"../base-xform":32}],114:[function(e,d,b){"use strict";let l=e("../base-xform");d.exports=class extends l{get tag(){return"tablePart"}render(o,s){s&&o.leafNode(this.tag,{"r:id":s.rId})}parseOpen(o){return o.name===this.tag?(this.model={rId:o.attributes["r:id"]},!0):!1}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],115:[function(e,d,b){"use strict";let l=e("../../../utils/under-dash"),o=e("../../../utils/col-cache"),s=e("../../../utils/xml-stream"),r=e("../../rel-type"),t=e("./merges"),n=e("../base-xform"),c=e("../list-xform"),i=e("./row-xform"),a=e("./col-xform"),h=e("./dimension-xform"),f=e("./hyperlink-xform"),u=e("./merge-cell-xform"),g=e("./data-validations-xform"),m=e("./sheet-properties-xform"),v=e("./sheet-format-properties-xform"),k=e("./sheet-view-xform"),B=e("./sheet-protection-xform"),R=e("./page-margins-xform"),L=e("./page-setup-xform"),A=e("./print-options-xform"),P=e("./auto-filter-xform"),N=e("./picture-xform"),q=e("./drawing-xform"),j=e("./table-part-xform"),S=e("./row-breaks-xform"),T=e("./header-footer-xform"),D=e("./cf/conditional-formattings-xform"),p=e("./ext-lst-xform"),y=(w,_)=>{if(!_||!_.length)return w;if(!w||!w.length)return _;let C={},O={};return w.forEach(z=>{C[z.ref]=z,z.rules.forEach($=>{let{x14Id:V}=$;V&&(O[V]=$)})}),_.forEach(z=>{z.rules.forEach($=>{let V=O[$.x14Id];V?((M,H)=>{Object.keys(H).forEach(I=>{let E=M[I],F=H[I];E===void 0&&F!==void 0&&(M[I]=F)})})(V,$):C[z.ref]?C[z.ref].rules.push($):w.push({ref:z.ref,rules:[$]})})}),w};class x extends n{constructor(_){super();let{maxRows:C,maxCols:O,ignoreNodes:z}=_||{};this.ignoreNodes=z||[],this.map={sheetPr:new m,dimension:new h,sheetViews:new c({tag:"sheetViews",count:!1,childXform:new k}),sheetFormatPr:new v,cols:new c({tag:"cols",count:!1,childXform:new a}),sheetData:new c({tag:"sheetData",count:!1,empty:!0,childXform:new i({maxItems:O}),maxItems:C}),autoFilter:new P,mergeCells:new c({tag:"mergeCells",count:!0,childXform:new u}),rowBreaks:new S,hyperlinks:new c({tag:"hyperlinks",count:!1,childXform:new f}),pageMargins:new R,dataValidations:new g,pageSetup:new L,headerFooter:new T,printOptions:new A,picture:new N,drawing:new q,sheetProtection:new B,tableParts:new c({tag:"tableParts",count:!0,childXform:new j}),conditionalFormatting:new D,extLst:new p}}prepare(_,C){C.merges=new t,_.hyperlinks=C.hyperlinks=[],_.comments=C.comments=[],C.formulae={},C.siFormulae=0,this.map.cols.prepare(_.cols,C),this.map.sheetData.prepare(_.rows,C),this.map.conditionalFormatting.prepare(_.conditionalFormattings,C),_.mergeCells=C.merges.mergeCells;let O=_.rels=[];function z(M){return"rId"+(M.length+1)}if(_.hyperlinks.forEach(M=>{let H=z(O);M.rId=H,O.push({Id:H,Type:r.Hyperlink,Target:M.target,TargetMode:"External"})}),_.comments.length>0){let M={Id:z(O),Type:r.Comments,Target:`../comments${_.id}.xml`};O.push(M);let H={Id:z(O),Type:r.VmlDrawing,Target:`../drawings/vmlDrawing${_.id}.vml`};O.push(H),_.comments.forEach(I=>{I.refAddress=o.decodeAddress(I.ref)}),C.commentRefs.push({commentName:"comments"+_.id,vmlDrawing:"vmlDrawing"+_.id})}let $=[],V;_.media.forEach(M=>{if(M.type==="background"){let H=z(O);V=C.media[M.imageId],O.push({Id:H,Type:r.Image,Target:`../media/${V.name}.${V.extension}`}),_.background={rId:H},_.image=C.media[M.imageId]}else if(M.type==="image"){let{drawing:H}=_;V=C.media[M.imageId],H||(H=_.drawing={rId:z(O),name:"drawing"+ ++C.drawingsCount,anchors:[],rels:[]},C.drawings.push(H),O.push({Id:H.rId,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",Target:`../drawings/${H.name}.xml`}));let I=this.preImageId===M.imageId?$[M.imageId]:$[H.rels.length];I||(I=z(H.rels),$[H.rels.length]=I,H.rels.push({Id:I,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",Target:`../media/${V.name}.${V.extension}`}));let E={picture:{rId:I},range:M.range};if(M.hyperlinks&&M.hyperlinks.hyperlink){let F=z(H.rels);$[H.rels.length]=F,E.picture.hyperlinks={tooltip:M.hyperlinks.tooltip,rId:F},H.rels.push({Id:F,Type:r.Hyperlink,Target:M.hyperlinks.hyperlink,TargetMode:"External"})}this.preImageId=M.imageId,H.anchors.push(E)}}),_.tables.forEach(M=>{let H=z(O);M.rId=H,O.push({Id:H,Type:r.Table,Target:"../tables/"+M.target}),M.columns.forEach(I=>{let{style:E}=I;E&&(I.dxfId=C.styles.addDxfStyle(E))})}),this.map.extLst.prepare(_,C)}render(_,C){_.openXml(s.StdDocAttributes),_.openNode("worksheet",x.WORKSHEET_ATTRIBUTES);let O=C.properties?{defaultRowHeight:C.properties.defaultRowHeight,dyDescent:C.properties.dyDescent,outlineLevelCol:C.properties.outlineLevelCol,outlineLevelRow:C.properties.outlineLevelRow}:void 0;C.properties&&C.properties.defaultColWidth&&(O.defaultColWidth=C.properties.defaultColWidth);let z={outlineProperties:C.properties&&C.properties.outlineProperties,tabColor:C.properties&&C.properties.tabColor,pageSetup:C.pageSetup&&C.pageSetup.fitToPage?{fitToPage:C.pageSetup.fitToPage}:void 0},$=C.pageSetup&&C.pageSetup.margins,V={showRowColHeaders:C.pageSetup&&C.pageSetup.showRowColHeaders,showGridLines:C.pageSetup&&C.pageSetup.showGridLines,horizontalCentered:C.pageSetup&&C.pageSetup.horizontalCentered,verticalCentered:C.pageSetup&&C.pageSetup.verticalCentered},M=C.sheetProtection;this.map.sheetPr.render(_,z),this.map.dimension.render(_,C.dimensions),this.map.sheetViews.render(_,C.views),this.map.sheetFormatPr.render(_,O),this.map.cols.render(_,C.cols),this.map.sheetData.render(_,C.rows),this.map.sheetProtection.render(_,M),this.map.autoFilter.render(_,C.autoFilter),this.map.mergeCells.render(_,C.mergeCells),this.map.conditionalFormatting.render(_,C.conditionalFormattings),this.map.dataValidations.render(_,C.dataValidations),this.map.hyperlinks.render(_,C.hyperlinks),this.map.printOptions.render(_,V),this.map.pageMargins.render(_,$),this.map.pageSetup.render(_,C.pageSetup),this.map.headerFooter.render(_,C.headerFooter),this.map.rowBreaks.render(_,C.rowBreaks),this.map.drawing.render(_,C.drawing),this.map.picture.render(_,C.background),this.map.tableParts.render(_,C.tables),this.map.extLst.render(_,C),C.rels&&C.rels.forEach(H=>{H.Type===r.VmlDrawing&&_.leafNode("legacyDrawing",{"r:id":H.Id})}),_.closeNode()}parseOpen(_){return this.parser?(this.parser.parseOpen(_),!0):_.name==="worksheet"?(l.each(this.map,C=>{C.reset()}),!0):(this.map[_.name]&&!this.ignoreNodes.includes(_.name)&&(this.parser=this.map[_.name],this.parser.parseOpen(_)),!0)}parseText(_){this.parser&&this.parser.parseText(_)}parseClose(_){if(this.parser)return this.parser.parseClose(_)||(this.parser=void 0),!0;if(_==="worksheet"){let C=this.map.sheetFormatPr.model||{};this.map.sheetPr.model&&this.map.sheetPr.model.tabColor&&(C.tabColor=this.map.sheetPr.model.tabColor),this.map.sheetPr.model&&this.map.sheetPr.model.outlineProperties&&(C.outlineProperties=this.map.sheetPr.model.outlineProperties);let O={fitToPage:this.map.sheetPr.model&&this.map.sheetPr.model.pageSetup&&this.map.sheetPr.model.pageSetup.fitToPage||!1,margins:this.map.pageMargins.model},z=Object.assign(O,this.map.pageSetup.model,this.map.printOptions.model),$=y(this.map.conditionalFormatting.model,this.map.extLst.model&&this.map.extLst.model["x14:conditionalFormattings"]);return this.model={dimensions:this.map.dimension.model,cols:this.map.cols.model,rows:this.map.sheetData.model,mergeCells:this.map.mergeCells.model,hyperlinks:this.map.hyperlinks.model,dataValidations:this.map.dataValidations.model,properties:C,views:this.map.sheetViews.model,pageSetup:z,headerFooter:this.map.headerFooter.model,background:this.map.picture.model,drawing:this.map.drawing.model,tables:this.map.tableParts.model,conditionalFormattings:$},this.map.autoFilter.model&&(this.model.autoFilter=this.map.autoFilter.model),this.map.sheetProtection.model&&(this.model.sheetProtection=this.map.sheetProtection.model),!1}else return!0}reconcile(_,C){let O=(_.relationships||[]).reduce(($,V)=>{if($[V.Id]=V,V.Type===r.Comments&&(_.comments=C.comments[V.Target].comments),V.Type===r.VmlDrawing&&_.comments&&_.comments.length){let M=C.vmlDrawings[V.Target].comments;_.comments.forEach((H,I)=>{H.note=Object.assign({},H.note,M[I])})}return $},{});if(C.commentsMap=(_.comments||[]).reduce(($,V)=>(V.ref&&($[V.ref]=V),$),{}),C.hyperlinkMap=(_.hyperlinks||[]).reduce(($,V)=>(V.rId&&($[V.address]=O[V.rId].Target),$),{}),C.formulae={},_.rows=_.rows&&_.rows.filter(Boolean)||[],_.rows.forEach($=>{$.cells=$.cells&&$.cells.filter(Boolean)||[]}),this.map.cols.reconcile(_.cols,C),this.map.sheetData.reconcile(_.rows,C),this.map.conditionalFormatting.reconcile(_.conditionalFormattings,C),_.media=[],_.drawing){let $=O[_.drawing.rId].Target.match(/\/drawings\/([a-zA-Z0-9]+)[.][a-zA-Z]{3,4}$/);if($){let V=$[1];C.drawings[V].anchors.forEach(M=>{if(M.medium){let H={type:"image",imageId:M.medium.index,range:M.range,hyperlinks:M.picture.hyperlinks};_.media.push(H)}})}}let z=_.background&&O[_.background.rId];if(z){let $=z.Target.split("/media/")[1],V=C.mediaIndex&&C.mediaIndex[$];V!==void 0&&_.media.push({type:"background",imageId:V})}_.tables=(_.tables||[]).map($=>{let V=O[$.rId];return C.tables[V.Target]}),delete _.relationships,delete _.hyperlinks,delete _.comments}}x.WORKSHEET_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"x14ac","xmlns:x14ac":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac"},d.exports=x},{"../../../utils/col-cache":19,"../../../utils/under-dash":26,"../../../utils/xml-stream":28,"../../rel-type":31,"../base-xform":32,"../list-xform":71,"./auto-filter-xform":72,"./cf/conditional-formattings-xform":87,"./col-xform":92,"./data-validations-xform":93,"./dimension-xform":94,"./drawing-xform":95,"./ext-lst-xform":96,"./header-footer-xform":97,"./hyperlink-xform":98,"./merge-cell-xform":99,"./merges":100,"./page-margins-xform":103,"./page-setup-xform":105,"./picture-xform":106,"./print-options-xform":107,"./row-breaks-xform":108,"./row-xform":109,"./sheet-format-properties-xform":110,"./sheet-properties-xform":111,"./sheet-protection-xform":112,"./sheet-view-xform":113,"./table-part-xform":114}],116:[function(e,d,b){"use strict";let l=e("../base-xform");d.exports=class extends l{constructor(o){super(),this.tag=o.tag,this.attr=o.attr}render(o,s){s&&(o.openNode(this.tag),o.closeNode())}parseOpen(o){o.name===this.tag&&(this.model=!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],117:[function(e,d,b){"use strict";let l=e("../base-xform");d.exports=class extends l{constructor(o){super(),this.tag=o.tag,this.attr=o.attr,this.attrs=o.attrs,this._format=o.format||function(s){try{return Number.isNaN(s.getTime())?"":s.toISOString()}catch{return""}},this._parse=o.parse||function(s){return new Date(s)}}render(o,s){s&&(o.openNode(this.tag),this.attrs&&o.addAttributes(this.attrs),this.attr?o.addAttribute(this.attr,this._format(s)):o.writeText(this._format(s)),o.closeNode())}parseOpen(o){o.name===this.tag&&(this.attr?this.model=this._parse(o.attributes[this.attr]):this.text=[])}parseText(o){this.attr||this.text.push(o)}parseClose(){return this.attr||(this.model=this._parse(this.text.join(""))),!1}}},{"../base-xform":32}],118:[function(e,d,b){"use strict";let l=e("../base-xform");d.exports=class extends l{constructor(o){super(),this.tag=o.tag,this.attr=o.attr,this.attrs=o.attrs,this.zero=o.zero}render(o,s){(s||this.zero)&&(o.openNode(this.tag),this.attrs&&o.addAttributes(this.attrs),this.attr?o.addAttribute(this.attr,s):o.writeText(s),o.closeNode())}parseOpen(o){return o.name===this.tag&&(this.attr?this.model=parseInt(o.attributes[this.attr],10):this.text=[],!0)}parseText(o){this.attr||this.text.push(o)}parseClose(){return this.attr||(this.model=parseInt(this.text.join("")||0,10)),!1}}},{"../base-xform":32}],119:[function(e,d,b){"use strict";let l=e("../base-xform");d.exports=class extends l{constructor(o){super(),this.tag=o.tag,this.attr=o.attr,this.attrs=o.attrs}render(o,s){s!==void 0&&(o.openNode(this.tag),this.attrs&&o.addAttributes(this.attrs),this.attr?o.addAttribute(this.attr,s):o.writeText(s),o.closeNode())}parseOpen(o){o.name===this.tag&&(this.attr?this.model=o.attributes[this.attr]:this.text=[])}parseText(o){this.attr||this.text.push(o)}parseClose(){return this.attr||(this.model=this.text.join("")),!1}}},{"../base-xform":32}],120:[function(e,d,b){"use strict";let l=e("./base-xform"),o=e("../../utils/xml-stream");d.exports=class extends l{constructor(s){super(),this._model=s}render(s){if(!this._xml){let r=new o;(function t(n,c){n.openNode(c.tag,c.$),c.c&&c.c.forEach(i=>{t(n,i)}),c.t&&n.writeText(c.t),n.closeNode()})(r,this._model),this._xml=r.xml}s.writeXml(this._xml)}parseOpen(){return!0}parseText(){}parseClose(s){return s!==this._model.tag}}},{"../../utils/xml-stream":28,"./base-xform":32}],121:[function(e,d,b){"use strict";let l=e("./text-xform"),o=e("./rich-text-xform"),s=e("../base-xform");d.exports=class extends s{constructor(){super(),this.map={r:new o,t:new l}}get tag(){return"rPh"}render(r,t){if(r.openNode(this.tag,{sb:t.sb||0,eb:t.eb||0}),t&&t.hasOwnProperty("richText")&&t.richText){let{r:n}=this.map;t.richText.forEach(c=>{n.render(r,c)})}else t&&this.map.t.render(r,t.text);r.closeNode()}parseOpen(r){let{name:t}=r;return this.parser?(this.parser.parseOpen(r),!0):t===this.tag?(this.model={sb:parseInt(r.attributes.sb,10),eb:parseInt(r.attributes.eb,10)},!0):(this.parser=this.map[t],!!this.parser&&(this.parser.parseOpen(r),!0))}parseText(r){this.parser&&this.parser.parseText(r)}parseClose(r){if(this.parser){if(!this.parser.parseClose(r)){switch(r){case"r":{let t=this.model.richText;t||(t=this.model.richText=[]),t.push(this.parser.model);break}case"t":this.model.text=this.parser.model}this.parser=void 0}return!0}return r!==this.tag}}},{"../base-xform":32,"./rich-text-xform":122,"./text-xform":125}],122:[function(e,d,b){"use strict";let l=e("./text-xform"),o=e("../style/font-xform"),s=e("../base-xform");class r extends s{constructor(n){super(),this.model=n}get tag(){return"r"}get textXform(){return this._textXform||(this._textXform=new l)}get fontXform(){return this._fontXform||(this._fontXform=new o(r.FONT_OPTIONS))}render(n,c){c=c||this.model,n.openNode("r"),c.font&&this.fontXform.render(n,c.font),this.textXform.render(n,c.text),n.closeNode()}parseOpen(n){if(this.parser)return this.parser.parseOpen(n),!0;switch(n.name){case"r":return this.model={},!0;case"t":return this.parser=this.textXform,this.parser.parseOpen(n),!0;case"rPr":return this.parser=this.fontXform,this.parser.parseOpen(n),!0;default:return!1}}parseText(n){this.parser&&this.parser.parseText(n)}parseClose(n){switch(n){case"r":return!1;case"t":return this.model.text=this.parser.model,this.parser=void 0,!0;case"rPr":return this.model.font=this.parser.model,this.parser=void 0,!0;default:return this.parser&&this.parser.parseClose(n),!0}}}r.FONT_OPTIONS={tagName:"rPr",fontNameTag:"rFont"},d.exports=r},{"../base-xform":32,"../style/font-xform":131,"./text-xform":125}],123:[function(e,d,b){"use strict";let l=e("./text-xform"),o=e("./rich-text-xform"),s=e("./phonetic-text-xform"),r=e("../base-xform");d.exports=class extends r{constructor(t){super(),this.model=t,this.map={r:new o,t:new l,rPh:new s}}get tag(){return"si"}render(t,n){t.openNode(this.tag),n&&n.hasOwnProperty("richText")&&n.richText?n.richText.length?n.richText.forEach(c=>{this.map.r.render(t,c)}):this.map.t.render(t,""):n!=null&&this.map.t.render(t,n),t.closeNode()}parseOpen(t){let{name:n}=t;return this.parser?(this.parser.parseOpen(t),!0):n===this.tag?(this.model={},!0):(this.parser=this.map[n],!!this.parser&&(this.parser.parseOpen(t),!0))}parseText(t){this.parser&&this.parser.parseText(t)}parseClose(t){if(this.parser){if(!this.parser.parseClose(t)){switch(t){case"r":{let n=this.model.richText;n||(n=this.model.richText=[]),n.push(this.parser.model);break}case"t":this.model=this.parser.model}this.parser=void 0}return!0}return t!==this.tag}}},{"../base-xform":32,"./phonetic-text-xform":121,"./rich-text-xform":122,"./text-xform":125}],124:[function(e,d,b){"use strict";let l=e("../../../utils/xml-stream"),o=e("../base-xform"),s=e("./shared-string-xform");d.exports=class extends o{constructor(r){super(),this.model=r||{values:[],count:0},this.hash=Object.create(null),this.rich=Object.create(null)}get sharedStringXform(){return this._sharedStringXform||(this._sharedStringXform=new s)}get values(){return this.model.values}get uniqueCount(){return this.model.values.length}get count(){return this.model.count}getString(r){return this.model.values[r]}add(r){return r.richText?this.addRichText(r):this.addText(r)}addText(r){let t=this.hash[r];return t===void 0&&(t=this.hash[r]=this.model.values.length,this.model.values.push(r)),this.model.count++,t}addRichText(r){let t=this.sharedStringXform.toXml(r),n=this.rich[t];return n===void 0&&(n=this.rich[t]=this.model.values.length,this.model.values.push(r)),this.model.count++,n}render(r,t){t=t||this._values,r.openXml(l.StdDocAttributes),r.openNode("sst",{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main",count:t.count,uniqueCount:t.values.length});let n=this.sharedStringXform;t.values.forEach(c=>{n.render(r,c)}),r.closeNode()}parseOpen(r){if(this.parser)return this.parser.parseOpen(r),!0;switch(r.name){case"sst":return!0;case"si":return this.parser=this.sharedStringXform,this.parser.parseOpen(r),!0;default:throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(r))}}parseText(r){this.parser&&this.parser.parseText(r)}parseClose(r){if(this.parser)return this.parser.parseClose(r)||(this.model.values.push(this.parser.model),this.model.count++,this.parser=void 0),!0;if(r==="sst")return!1;throw new Error("Unexpected xml node in parseClose: "+r)}}},{"../../../utils/xml-stream":28,"../base-xform":32,"./shared-string-xform":123}],125:[function(e,d,b){"use strict";let l=e("../base-xform");d.exports=class extends l{get tag(){return"t"}render(o,s){o.openNode("t"),/^\s|\n|\s$/.test(s)&&o.addAttribute("xml:space","preserve"),o.writeText(s),o.closeNode()}get model(){return this._text.join("").replace(/_x([0-9A-F]{4})_/g,(o,s)=>String.fromCharCode(parseInt(s,16)))}parseOpen(o){return o.name==="t"?(this._text=[],!0):!1}parseText(o){this._text.push(o)}parseClose(){return!1}}},{"../base-xform":32}],126:[function(e,d,b){"use strict";let l=e("../../../doc/enums"),o=e("../../../utils/utils"),s=e("../base-xform"),r={horizontalValues:["left","center","right","fill","centerContinuous","distributed","justify"].reduce((n,c)=>(n[c]=!0,n),{}),horizontal(n){return this.horizontalValues[n]?n:void 0},verticalValues:["top","middle","bottom","distributed","justify"].reduce((n,c)=>(n[c]=!0,n),{}),vertical(n){return n==="middle"?"center":this.verticalValues[n]?n:void 0},wrapText:n=>!!n||void 0,shrinkToFit:n=>!!n||void 0,textRotation(n){return n==="vertical"||(n=o.validInt(n))>=-90&&n<=90?n:void 0},indent:n=>(n=o.validInt(n),Math.max(0,n)),readingOrder(n){switch(n){case"ltr":return l.ReadingOrder.LeftToRight;case"rtl":return l.ReadingOrder.RightToLeft;default:return}}},t={toXml(n){if(n=r.textRotation(n)){if(n==="vertical")return 255;let c=Math.round(n);if(c>=0&&c<=90)return c;if(c<0&&c>=-90)return 90-c}},toModel(n){let c=o.validInt(n);if(c!==void 0){if(c===255)return"vertical";if(c>=0&&c<=90)return c;if(c>90&&c<=180)return 90-c}}};d.exports=class extends s{get tag(){return"alignment"}render(n,c){n.addRollback(),n.openNode("alignment");let i=!1;function a(h,f){f&&(n.addAttribute(h,f),i=!0)}a("horizontal",r.horizontal(c.horizontal)),a("vertical",r.vertical(c.vertical)),a("wrapText",!!r.wrapText(c.wrapText)&&"1"),a("shrinkToFit",!!r.shrinkToFit(c.shrinkToFit)&&"1"),a("indent",r.indent(c.indent)),a("textRotation",t.toXml(c.textRotation)),a("readingOrder",r.readingOrder(c.readingOrder)),n.closeNode(),i?n.commit():n.rollback()}parseOpen(n){let c={},i=!1;function a(h,f,u){h&&(c[f]=u,i=!0)}a(n.attributes.horizontal,"horizontal",n.attributes.horizontal),a(n.attributes.vertical,"vertical",n.attributes.vertical==="center"?"middle":n.attributes.vertical),a(n.attributes.wrapText,"wrapText",o.parseBoolean(n.attributes.wrapText)),a(n.attributes.shrinkToFit,"shrinkToFit",o.parseBoolean(n.attributes.shrinkToFit)),a(n.attributes.indent,"indent",parseInt(n.attributes.indent,10)),a(n.attributes.textRotation,"textRotation",t.toModel(n.attributes.textRotation)),a(n.attributes.readingOrder,"readingOrder",n.attributes.readingOrder==="2"?"rtl":"ltr"),this.model=i?c:null}parseText(){}parseClose(){return!1}}},{"../../../doc/enums":7,"../../../utils/utils":27,"../base-xform":32}],127:[function(e,d,b){"use strict";let l=e("../base-xform"),o=e("../../../utils/utils"),s=e("./color-xform");class r extends l{constructor(n){super(),this.name=n,this.map={color:new s}}get tag(){return this.name}render(n,c,i){let a=c&&c.color||i||this.defaultColor;n.openNode(this.name),c&&c.style&&(n.addAttribute("style",c.style),a&&this.map.color.render(n,a)),n.closeNode()}parseOpen(n){if(this.parser)return this.parser.parseOpen(n),!0;switch(n.name){case this.name:{let{style:c}=n.attributes;return this.model=c?{style:c}:void 0,!0}case"color":return this.parser=this.map.color,this.parser.parseOpen(n),!0;default:return!1}}parseText(n){this.parser&&this.parser.parseText(n)}parseClose(n){return this.parser?(this.parser.parseClose(n)||(this.parser=void 0),!0):(n===this.name&&this.map.color.model&&(this.model||(this.model={}),this.model.color=this.map.color.model),!1)}validStyle(n){return r.validStyleValues[n]}}r.validStyleValues=["thin","dashed","dotted","dashDot","hair","dashDotDot","slantDashDot","mediumDashed","mediumDashDotDot","mediumDashDot","medium","double","thick"].reduce((t,n)=>(t[n]=!0,t),{}),d.exports=class extends l{constructor(){super(),this.map={top:new r("top"),left:new r("left"),bottom:new r("bottom"),right:new r("right"),diagonal:new r("diagonal")}}render(t,n){let{color:c}=n;function i(a,h){a&&!a.color&&n.color&&(a={...a,color:n.color}),h.render(t,a,c)}t.openNode("border"),n.diagonal&&n.diagonal.style&&(n.diagonal.up&&t.addAttribute("diagonalUp","1"),n.diagonal.down&&t.addAttribute("diagonalDown","1")),i(n.left,this.map.left),i(n.right,this.map.right),i(n.top,this.map.top),i(n.bottom,this.map.bottom),i(n.diagonal,this.map.diagonal),t.closeNode()}parseOpen(t){return this.parser?(this.parser.parseOpen(t),!0):t.name==="border"?(this.reset(),this.diagonalUp=o.parseBoolean(t.attributes.diagonalUp),this.diagonalDown=o.parseBoolean(t.attributes.diagonalDown),!0):(this.parser=this.map[t.name],!!this.parser&&(this.parser.parseOpen(t),!0))}parseText(t){this.parser&&this.parser.parseText(t)}parseClose(t){if(this.parser)return this.parser.parseClose(t)||(this.parser=void 0),!0;if(t==="border"){let n=this.model={},c=function(i,a,h){a&&(h&&Object.assign(a,h),n[i]=a)};c("left",this.map.left.model),c("right",this.map.right.model),c("top",this.map.top.model),c("bottom",this.map.bottom.model),c("diagonal",this.map.diagonal.model,{up:this.diagonalUp,down:this.diagonalDown})}return!1}}},{"../../../utils/utils":27,"../base-xform":32,"./color-xform":128}],128:[function(e,d,b){"use strict";let l=e("../base-xform");d.exports=class extends l{constructor(o){super(),this.name=o||"color"}get tag(){return this.name}render(o,s){return!!s&&(o.openNode(this.name),s.argb?o.addAttribute("rgb",s.argb):s.theme!==void 0?(o.addAttribute("theme",s.theme),s.tint!==void 0&&o.addAttribute("tint",s.tint)):s.indexed!==void 0?o.addAttribute("indexed",s.indexed):o.addAttribute("auto","1"),o.closeNode(),!0)}parseOpen(o){return o.name===this.name&&(o.attributes.rgb?this.model={argb:o.attributes.rgb}:o.attributes.theme?(this.model={theme:parseInt(o.attributes.theme,10)},o.attributes.tint&&(this.model.tint=parseFloat(o.attributes.tint))):o.attributes.indexed?this.model={indexed:parseInt(o.attributes.indexed,10)}:this.model=void 0,!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],129:[function(e,d,b){"use strict";let l=e("../base-xform"),o=e("./alignment-xform"),s=e("./border-xform"),r=e("./fill-xform"),t=e("./font-xform"),n=e("./numfmt-xform"),c=e("./protection-xform");d.exports=class extends l{constructor(){super(),this.map={alignment:new o,border:new s,fill:new r,font:new t,numFmt:new n,protection:new c}}get tag(){return"dxf"}render(i,a){if(i.openNode(this.tag),a.font&&this.map.font.render(i,a.font),a.numFmt&&a.numFmtId){let h={id:a.numFmtId,formatCode:a.numFmt};this.map.numFmt.render(i,h)}a.fill&&this.map.fill.render(i,a.fill),a.alignment&&this.map.alignment.render(i,a.alignment),a.border&&this.map.border.render(i,a.border),a.protection&&this.map.protection.render(i,a.protection),i.closeNode()}parseOpen(i){return this.parser?(this.parser.parseOpen(i),!0):i.name===this.tag?(this.reset(),!0):(this.parser=this.map[i.name],this.parser&&this.parser.parseOpen(i),!0)}parseText(i){this.parser&&this.parser.parseText(i)}parseClose(i){return this.parser?(this.parser.parseClose(i)||(this.parser=void 0),!0):i!==this.tag||(this.model={alignment:this.map.alignment.model,border:this.map.border.model,fill:this.map.fill.model,font:this.map.font.model,numFmt:this.map.numFmt.model,protection:this.map.protection.model},!1)}}},{"../base-xform":32,"./alignment-xform":126,"./border-xform":127,"./fill-xform":130,"./font-xform":131,"./numfmt-xform":132,"./protection-xform":133}],130:[function(e,d,b){"use strict";let l=e("../base-xform"),o=e("./color-xform");class s extends l{constructor(){super(),this.map={color:new o}}get tag(){return"stop"}render(i,a){i.openNode("stop"),i.addAttribute("position",a.position),this.map.color.render(i,a.color),i.closeNode()}parseOpen(i){if(this.parser)return this.parser.parseOpen(i),!0;switch(i.name){case"stop":return this.model={position:parseFloat(i.attributes.position)},!0;case"color":return this.parser=this.map.color,this.parser.parseOpen(i),!0;default:return!1}}parseText(){}parseClose(i){return!!this.parser&&(this.parser.parseClose(i)||(this.model.color=this.parser.model,this.parser=void 0),!0)}}class r extends l{constructor(){super(),this.map={fgColor:new o("fgColor"),bgColor:new o("bgColor")}}get name(){return"pattern"}get tag(){return"patternFill"}render(i,a){i.openNode("patternFill"),i.addAttribute("patternType",a.pattern),a.fgColor&&this.map.fgColor.render(i,a.fgColor),a.bgColor&&this.map.bgColor.render(i,a.bgColor),i.closeNode()}parseOpen(i){return this.parser?(this.parser.parseOpen(i),!0):i.name==="patternFill"?(this.model={type:"pattern",pattern:i.attributes.patternType},!0):(this.parser=this.map[i.name],!!this.parser&&(this.parser.parseOpen(i),!0))}parseText(i){this.parser&&this.parser.parseText(i)}parseClose(i){return!!this.parser&&(this.parser.parseClose(i)||(this.parser.model&&(this.model[i]=this.parser.model),this.parser=void 0),!0)}}class t extends l{constructor(){super(),this.map={stop:new s}}get name(){return"gradient"}get tag(){return"gradientFill"}render(i,a){switch(i.openNode("gradientFill"),a.gradient){case"angle":i.addAttribute("degree",a.degree);break;case"path":i.addAttribute("type","path"),a.center.left&&(i.addAttribute("left",a.center.left),a.center.right===void 0&&i.addAttribute("right",a.center.left)),a.center.right&&i.addAttribute("right",a.center.right),a.center.top&&(i.addAttribute("top",a.center.top),a.center.bottom===void 0&&i.addAttribute("bottom",a.center.top)),a.center.bottom&&i.addAttribute("bottom",a.center.bottom)}let h=this.map.stop;a.stops.forEach(f=>{h.render(i,f)}),i.closeNode()}parseOpen(i){if(this.parser)return this.parser.parseOpen(i),!0;switch(i.name){case"gradientFill":{let a=this.model={stops:[]};return i.attributes.degree?(a.gradient="angle",a.degree=parseInt(i.attributes.degree,10)):i.attributes.type==="path"&&(a.gradient="path",a.center={left:i.attributes.left?parseFloat(i.attributes.left):0,top:i.attributes.top?parseFloat(i.attributes.top):0},i.attributes.right!==i.attributes.left&&(a.center.right=i.attributes.right?parseFloat(i.attributes.right):0),i.attributes.bottom!==i.attributes.top&&(a.center.bottom=i.attributes.bottom?parseFloat(i.attributes.bottom):0)),!0}case"stop":return this.parser=this.map.stop,this.parser.parseOpen(i),!0;default:return!1}}parseText(i){this.parser&&this.parser.parseText(i)}parseClose(i){return!!this.parser&&(this.parser.parseClose(i)||(this.model.stops.push(this.parser.model),this.parser=void 0),!0)}}class n extends l{constructor(){super(),this.map={patternFill:new r,gradientFill:new t}}get tag(){return"fill"}render(i,a){switch(i.addRollback(),i.openNode("fill"),a.type){case"pattern":this.map.patternFill.render(i,a);break;case"gradient":this.map.gradientFill.render(i,a);break;default:return void i.rollback()}i.closeNode(),i.commit()}parseOpen(i){return this.parser?(this.parser.parseOpen(i),!0):i.name==="fill"?(this.model={},!0):(this.parser=this.map[i.name],!!this.parser&&(this.parser.parseOpen(i),!0))}parseText(i){this.parser&&this.parser.parseText(i)}parseClose(i){return!!this.parser&&(this.parser.parseClose(i)||(this.model=this.parser.model,this.model.type=this.parser.name,this.parser=void 0),!0)}validStyle(i){return n.validPatternValues[i]}}n.validPatternValues=["none","solid","darkVertical","darkGray","mediumGray","lightGray","gray125","gray0625","darkHorizontal","darkVertical","darkDown","darkUp","darkGrid","darkTrellis","lightHorizontal","lightVertical","lightDown","lightUp","lightGrid","lightTrellis","lightGrid"].reduce((c,i)=>(c[i]=!0,c),{}),n.StopXform=s,n.PatternFillXform=r,n.GradientFillXform=t,d.exports=n},{"../base-xform":32,"./color-xform":128}],131:[function(e,d,b){"use strict";let l=e("./color-xform"),o=e("../simple/boolean-xform"),s=e("../simple/integer-xform"),r=e("../simple/string-xform"),t=e("./underline-xform"),n=e("../../../utils/under-dash"),c=e("../base-xform");class i extends c{constructor(h){super(),this.options=h||i.OPTIONS,this.map={b:{prop:"bold",xform:new o({tag:"b",attr:"val"})},i:{prop:"italic",xform:new o({tag:"i",attr:"val"})},u:{prop:"underline",xform:new t},charset:{prop:"charset",xform:new s({tag:"charset",attr:"val"})},color:{prop:"color",xform:new l},condense:{prop:"condense",xform:new o({tag:"condense",attr:"val"})},extend:{prop:"extend",xform:new o({tag:"extend",attr:"val"})},family:{prop:"family",xform:new s({tag:"family",attr:"val"})},outline:{prop:"outline",xform:new o({tag:"outline",attr:"val"})},vertAlign:{prop:"vertAlign",xform:new r({tag:"vertAlign",attr:"val"})},scheme:{prop:"scheme",xform:new r({tag:"scheme",attr:"val"})},shadow:{prop:"shadow",xform:new o({tag:"shadow",attr:"val"})},strike:{prop:"strike",xform:new o({tag:"strike",attr:"val"})},sz:{prop:"size",xform:new s({tag:"sz",attr:"val"})}},this.map[this.options.fontNameTag]={prop:"name",xform:new r({tag:this.options.fontNameTag,attr:"val"})}}get tag(){return this.options.tagName}render(h,f){let{map:u}=this;h.openNode(this.options.tagName),n.each(this.map,(g,m)=>{u[m].xform.render(h,f[g.prop])}),h.closeNode()}parseOpen(h){return this.parser?(this.parser.parseOpen(h),!0):this.map[h.name]?(this.parser=this.map[h.name].xform,this.parser.parseOpen(h)):h.name===this.options.tagName?(this.model={},!0):!1}parseText(h){this.parser&&this.parser.parseText(h)}parseClose(h){if(this.parser&&!this.parser.parseClose(h)){let f=this.map[h];return this.parser.model&&(this.model[f.prop]=this.parser.model),this.parser=void 0,!0}return h!==this.options.tagName}}i.OPTIONS={tagName:"font",fontNameTag:"name"},d.exports=i},{"../../../utils/under-dash":26,"../base-xform":32,"../simple/boolean-xform":116,"../simple/integer-xform":118,"../simple/string-xform":119,"./color-xform":128,"./underline-xform":136}],132:[function(e,d,b){"use strict";let l=e("../../../utils/under-dash"),o=e("../../defaultnumformats"),s=e("../base-xform"),r=(function(){let n={};return l.each(o,(c,i)=>{c.f&&(n[c.f]=parseInt(i,10))}),n})();class t extends s{constructor(c,i){super(),this.id=c,this.formatCode=i}get tag(){return"numFmt"}render(c,i){c.leafNode("numFmt",{numFmtId:i.id,formatCode:i.formatCode})}parseOpen(c){return c.name==="numFmt"?(this.model={id:parseInt(c.attributes.numFmtId,10),formatCode:c.attributes.formatCode.replace(/[\\](.)/g,"$1")},!0):!1}parseText(){}parseClose(){return!1}}t.getDefaultFmtId=function(n){return r[n]},t.getDefaultFmtCode=function(n){return o[n]&&o[n].f},d.exports=t},{"../../../utils/under-dash":26,"../../defaultnumformats":30,"../base-xform":32}],133:[function(e,d,b){"use strict";let l=e("../base-xform"),o={boolean:(s,r)=>s===void 0?r:s};d.exports=class extends l{get tag(){return"protection"}render(s,r){s.addRollback(),s.openNode("protection");let t=!1;function n(c,i){i!==void 0&&(s.addAttribute(c,i),t=!0)}n("locked",o.boolean(r.locked,!0)?void 0:"0"),n("hidden",o.boolean(r.hidden,!1)?"1":void 0),s.closeNode(),t?s.commit():s.rollback()}parseOpen(s){let r={locked:s.attributes.locked!=="0",hidden:s.attributes.hidden==="1"},t=!r.locked||r.hidden;this.model=t?r:null}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],134:[function(e,d,b){"use strict";let l=e("../base-xform"),o=e("./alignment-xform"),s=e("./protection-xform");d.exports=class extends l{constructor(r){super(),this.xfId=!(!r||!r.xfId),this.map={alignment:new o,protection:new s}}get tag(){return"xf"}render(r,t){r.openNode("xf",{numFmtId:t.numFmtId||0,fontId:t.fontId||0,fillId:t.fillId||0,borderId:t.borderId||0}),this.xfId&&r.addAttribute("xfId",t.xfId||0),t.numFmtId&&r.addAttribute("applyNumberFormat","1"),t.fontId&&r.addAttribute("applyFont","1"),t.fillId&&r.addAttribute("applyFill","1"),t.borderId&&r.addAttribute("applyBorder","1"),t.alignment&&r.addAttribute("applyAlignment","1"),t.protection&&r.addAttribute("applyProtection","1"),t.alignment&&this.map.alignment.render(r,t.alignment),t.protection&&this.map.protection.render(r,t.protection),r.closeNode()}parseOpen(r){if(this.parser)return this.parser.parseOpen(r),!0;switch(r.name){case"xf":return this.model={numFmtId:parseInt(r.attributes.numFmtId,10),fontId:parseInt(r.attributes.fontId,10),fillId:parseInt(r.attributes.fillId,10),borderId:parseInt(r.attributes.borderId,10)},this.xfId&&(this.model.xfId=parseInt(r.attributes.xfId,10)),!0;case"alignment":return this.parser=this.map.alignment,this.parser.parseOpen(r),!0;case"protection":return this.parser=this.map.protection,this.parser.parseOpen(r),!0;default:return!1}}parseText(r){this.parser&&this.parser.parseText(r)}parseClose(r){return this.parser?(this.parser.parseClose(r)||(this.map.protection===this.parser?this.model.protection=this.parser.model:this.model.alignment=this.parser.model,this.parser=void 0),!0):r!=="xf"}}},{"../base-xform":32,"./alignment-xform":126,"./protection-xform":133}],135:[function(e,d,b){"use strict";let l=e("../../../doc/enums"),o=e("../../../utils/xml-stream"),s=e("../base-xform"),r=e("../static-xform"),t=e("../list-xform"),n=e("./font-xform"),c=e("./fill-xform"),i=e("./border-xform"),a=e("./numfmt-xform"),h=e("./style-xform"),f=e("./dxf-xform");class u extends s{constructor(m){super(),this.map={numFmts:new t({tag:"numFmts",count:!0,childXform:new a}),fonts:new t({tag:"fonts",count:!0,childXform:new n,$:{"x14ac:knownFonts":1}}),fills:new t({tag:"fills",count:!0,childXform:new c}),borders:new t({tag:"borders",count:!0,childXform:new i}),cellStyleXfs:new t({tag:"cellStyleXfs",count:!0,childXform:new h}),cellXfs:new t({tag:"cellXfs",count:!0,childXform:new h({xfId:!0})}),dxfs:new t({tag:"dxfs",always:!0,count:!0,childXform:new f}),numFmt:new a,font:new n,fill:new c,border:new i,style:new h({xfId:!0}),cellStyles:u.STATIC_XFORMS.cellStyles,tableStyles:u.STATIC_XFORMS.tableStyles,extLst:u.STATIC_XFORMS.extLst},m&&this.init()}initIndex(){this.index={style:{},numFmt:{},numFmtNextId:164,font:{},border:{},fill:{}}}init(){this.model={styles:[],numFmts:[],fonts:[],borders:[],fills:[],dxfs:[]},this.initIndex(),this._addBorder({}),this._addStyle({numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}),this._addFill({type:"pattern",pattern:"none"}),this._addFill({type:"pattern",pattern:"gray125"}),this.weakMap=new WeakMap}render(m,v){v=v||this.model,m.openXml(o.StdDocAttributes),m.openNode("styleSheet",u.STYLESHEET_ATTRIBUTES),this.index?(v.numFmts&&v.numFmts.length&&(m.openNode("numFmts",{count:v.numFmts.length}),v.numFmts.forEach(k=>{m.writeXml(k)}),m.closeNode()),v.fonts.length||this._addFont({size:11,color:{theme:1},name:"Calibri",family:2,scheme:"minor"}),m.openNode("fonts",{count:v.fonts.length,"x14ac:knownFonts":1}),v.fonts.forEach(k=>{m.writeXml(k)}),m.closeNode(),m.openNode("fills",{count:v.fills.length}),v.fills.forEach(k=>{m.writeXml(k)}),m.closeNode(),m.openNode("borders",{count:v.borders.length}),v.borders.forEach(k=>{m.writeXml(k)}),m.closeNode(),this.map.cellStyleXfs.render(m,[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}]),m.openNode("cellXfs",{count:v.styles.length}),v.styles.forEach(k=>{m.writeXml(k)}),m.closeNode()):(this.map.numFmts.render(m,v.numFmts),this.map.fonts.render(m,v.fonts),this.map.fills.render(m,v.fills),this.map.borders.render(m,v.borders),this.map.cellStyleXfs.render(m,[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}]),this.map.cellXfs.render(m,v.styles)),u.STATIC_XFORMS.cellStyles.render(m),this.map.dxfs.render(m,v.dxfs),u.STATIC_XFORMS.tableStyles.render(m),u.STATIC_XFORMS.extLst.render(m),m.closeNode()}parseOpen(m){return this.parser?(this.parser.parseOpen(m),!0):m.name==="styleSheet"?(this.initIndex(),!0):(this.parser=this.map[m.name],this.parser&&this.parser.parseOpen(m),!0)}parseText(m){this.parser&&this.parser.parseText(m)}parseClose(m){if(this.parser)return this.parser.parseClose(m)||(this.parser=void 0),!0;switch(m){case"styleSheet":{this.model={};let v=(k,B)=>{B.model&&B.model.length&&(this.model[k]=B.model)};if(v("numFmts",this.map.numFmts),v("fonts",this.map.fonts),v("fills",this.map.fills),v("borders",this.map.borders),v("styles",this.map.cellXfs),v("dxfs",this.map.dxfs),this.index={model:[],numFmt:[]},this.model.numFmts){let k=this.index.numFmt;this.model.numFmts.forEach(B=>{k[B.id]=B.formatCode})}return!1}default:return!0}}addStyleModel(m,v){if(!m)return 0;if(this.model.fonts.length||this._addFont({size:11,color:{theme:1},name:"Calibri",family:2,scheme:"minor"}),this.weakMap&&this.weakMap.has(m))return this.weakMap.get(m);let k={};if(v=v||l.ValueType.Number,m.numFmt)k.numFmtId=this._addNumFmtStr(m.numFmt);else switch(v){case l.ValueType.Number:k.numFmtId=this._addNumFmtStr("General");break;case l.ValueType.Date:k.numFmtId=this._addNumFmtStr("mm-dd-yy")}m.font&&(k.fontId=this._addFont(m.font)),m.border&&(k.borderId=this._addBorder(m.border)),m.fill&&(k.fillId=this._addFill(m.fill)),m.alignment&&(k.alignment=m.alignment),m.protection&&(k.protection=m.protection);let B=this._addStyle(k);return this.weakMap&&this.weakMap.set(m,B),B}getStyleModel(m){let v=this.model.styles[m];if(!v)return null;let k=this.index.model[m];if(k)return k;if(k=this.index.model[m]={},v.numFmtId){let R=this.index.numFmt[v.numFmtId]||a.getDefaultFmtCode(v.numFmtId);R&&(k.numFmt=R)}function B(R,L,A){if(A||A===0){let P=L[A];P&&(k[R]=P)}}return B("font",this.model.fonts,v.fontId),B("border",this.model.borders,v.borderId),B("fill",this.model.fills,v.fillId),v.alignment&&(k.alignment=v.alignment),v.protection&&(k.protection=v.protection),k}addDxfStyle(m){return m.numFmt&&(m.numFmtId=this._addNumFmtStr(m.numFmt)),this.model.dxfs.push(m),this.model.dxfs.length-1}getDxfStyle(m){return this.model.dxfs[m]}_addStyle(m){let v=this.map.style.toXml(m),k=this.index.style[v];return k===void 0&&(k=this.index.style[v]=this.model.styles.length,this.model.styles.push(v)),k}_addNumFmtStr(m){let v=a.getDefaultFmtId(m);if(v!==void 0||(v=this.index.numFmt[m],v!==void 0))return v;v=this.index.numFmt[m]=164+this.model.numFmts.length;let k=this.map.numFmt.toXml({id:v,formatCode:m});return this.model.numFmts.push(k),v}_addFont(m){let v=this.map.font.toXml(m),k=this.index.font[v];return k===void 0&&(k=this.index.font[v]=this.model.fonts.length,this.model.fonts.push(v)),k}_addBorder(m){let v=this.map.border.toXml(m),k=this.index.border[v];return k===void 0&&(k=this.index.border[v]=this.model.borders.length,this.model.borders.push(v)),k}_addFill(m){let v=this.map.fill.toXml(m),k=this.index.fill[v];return k===void 0&&(k=this.index.fill[v]=this.model.fills.length,this.model.fills.push(v)),k}}u.STYLESHEET_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"x14ac x16r2","xmlns:x14ac":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac","xmlns:x16r2":"http://schemas.microsoft.com/office/spreadsheetml/2015/02/main"},u.STATIC_XFORMS={cellStyles:new r({tag:"cellStyles",$:{count:1},c:[{tag:"cellStyle",$:{name:"Normal",xfId:0,builtinId:0}}]}),dxfs:new r({tag:"dxfs",$:{count:0}}),tableStyles:new r({tag:"tableStyles",$:{count:0,defaultTableStyle:"TableStyleMedium2",defaultPivotStyle:"PivotStyleLight16"}}),extLst:new r({tag:"extLst",c:[{tag:"ext",$:{uri:"{EB79DEF2-80B8-43e5-95BD-54CBDDF9020C}","xmlns:x14":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"},c:[{tag:"x14:slicerStyles",$:{defaultSlicerStyle:"SlicerStyleLight1"}}]},{tag:"ext",$:{uri:"{9260A510-F301-46a8-8635-F512D64BE5F5}","xmlns:x15":"http://schemas.microsoft.com/office/spreadsheetml/2010/11/main"},c:[{tag:"x15:timelineStyles",$:{defaultTimelineStyle:"TimeSlicerStyleLight1"}}]}]})},u.Mock=class extends u{constructor(){super(),this.model={styles:[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}],numFmts:[],fonts:[{size:11,color:{theme:1},name:"Calibri",family:2,scheme:"minor"}],borders:[{}],fills:[{type:"pattern",pattern:"none"},{type:"pattern",pattern:"gray125"}]}}parseStream(g){return g.autodrain(),Promise.resolve()}addStyleModel(g,m){return m===l.ValueType.Date?this.dateStyleId:0}get dateStyleId(){if(!this._dateStyleId){let g={numFmtId:a.getDefaultFmtId("mm-dd-yy")};this._dateStyleId=this.model.styles.length,this.model.styles.push(g)}return this._dateStyleId}getStyleModel(){return{}}},d.exports=u},{"../../../doc/enums":7,"../../../utils/xml-stream":28,"../base-xform":32,"../list-xform":71,"../static-xform":120,"./border-xform":127,"./dxf-xform":129,"./fill-xform":130,"./font-xform":131,"./numfmt-xform":132,"./style-xform":134}],136:[function(e,d,b){"use strict";let l=e("../base-xform");class o extends l{constructor(r){super(),this.model=r}get tag(){return"u"}render(r,t){if((t=t||this.model)===!0)r.leafNode("u");else{let n=o.Attributes[t];n&&r.leafNode("u",n)}}parseOpen(r){r.name==="u"&&(this.model=r.attributes.val||!0)}parseText(){}parseClose(){return!1}}o.Attributes={single:{},double:{val:"double"},singleAccounting:{val:"singleAccounting"},doubleAccounting:{val:"doubleAccounting"}},d.exports=o},{"../base-xform":32}],137:[function(e,d,b){"use strict";let l=e("../base-xform"),o=e("./filter-column-xform");d.exports=class extends l{constructor(){super(),this.map={filterColumn:new o}}get tag(){return"autoFilter"}prepare(s){s.columns.forEach((r,t)=>{this.map.filterColumn.prepare(r,{index:t})})}render(s,r){return s.openNode(this.tag,{ref:r.autoFilterRef}),r.columns.forEach(t=>{this.map.filterColumn.render(s,t)}),s.closeNode(),!0}parseOpen(s){if(this.parser)return this.parser.parseOpen(s),!0;switch(s.name){case this.tag:return this.model={autoFilterRef:s.attributes.ref,columns:[]},!0;default:if(this.parser=this.map[s.name],this.parser)return this.parseOpen(s),!0;throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(s))}}parseText(s){this.parser&&this.parser.parseText(s)}parseClose(s){if(this.parser)return this.parser.parseClose(s)||(this.model.columns.push(this.parser.model),this.parser=void 0),!0;if(s===this.tag)return!1;throw new Error("Unexpected xml node in parseClose: "+s)}}},{"../base-xform":32,"./filter-column-xform":139}],138:[function(e,d,b){"use strict";let l=e("../base-xform");d.exports=class extends l{get tag(){return"customFilter"}render(o,s){o.leafNode(this.tag,{val:s.val,operator:s.operator})}parseOpen(o){return o.name===this.tag&&(this.model={val:o.attributes.val,operator:o.attributes.operator},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],139:[function(e,d,b){"use strict";let l=e("../base-xform"),o=e("../list-xform"),s=e("./custom-filter-xform"),r=e("./filter-xform");d.exports=class extends l{constructor(){super(),this.map={customFilters:new o({tag:"customFilters",count:!1,empty:!0,childXform:new s}),filters:new o({tag:"filters",count:!1,empty:!0,childXform:new r})}}get tag(){return"filterColumn"}prepare(t,n){t.colId=n.index.toString()}render(t,n){return n.customFilters?(t.openNode(this.tag,{colId:n.colId,hiddenButton:n.filterButton?"0":"1"}),this.map.customFilters.render(t,n.customFilters),t.closeNode(),!0):(t.leafNode(this.tag,{colId:n.colId,hiddenButton:n.filterButton?"0":"1"}),!0)}parseOpen(t){if(this.parser)return this.parser.parseOpen(t),!0;let{attributes:n}=t;switch(t.name){case this.tag:return this.model={filterButton:n.hiddenButton==="0"},!0;default:if(this.parser=this.map[t.name],this.parser)return this.parseOpen(t),!0;throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(t))}}parseText(){}parseClose(t){return this.parser?(this.parser.parseClose(t)||(this.parser=void 0),!0):t===this.tag?(this.model.customFilters=this.map.customFilters.model,!1):!0}}},{"../base-xform":32,"../list-xform":71,"./custom-filter-xform":138,"./filter-xform":140}],140:[function(e,d,b){"use strict";let l=e("../base-xform");d.exports=class extends l{get tag(){return"filter"}render(o,s){o.leafNode(this.tag,{val:s.val})}parseOpen(o){return o.name===this.tag&&(this.model={val:o.attributes.val},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],141:[function(e,d,b){"use strict";let l=e("../base-xform");d.exports=class extends l{get tag(){return"tableColumn"}prepare(o,s){o.id=s.index+1}render(o,s){return o.leafNode(this.tag,{id:s.id.toString(),name:s.name,totalsRowLabel:s.totalsRowLabel,totalsRowFunction:s.totalsRowFunction,dxfId:s.dxfId}),!0}parseOpen(o){if(o.name===this.tag){let{attributes:s}=o;return this.model={name:s.name,totalsRowLabel:s.totalsRowLabel,totalsRowFunction:s.totalsRowFunction,dxfId:s.dxfId},!0}return!1}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],142:[function(e,d,b){"use strict";let l=e("../base-xform");d.exports=class extends l{get tag(){return"tableStyleInfo"}render(o,s){return o.leafNode(this.tag,{name:s.theme?s.theme:void 0,showFirstColumn:s.showFirstColumn?"1":"0",showLastColumn:s.showLastColumn?"1":"0",showRowStripes:s.showRowStripes?"1":"0",showColumnStripes:s.showColumnStripes?"1":"0"}),!0}parseOpen(o){if(o.name===this.tag){let{attributes:s}=o;return this.model={theme:s.name?s.name:null,showFirstColumn:s.showFirstColumn==="1",showLastColumn:s.showLastColumn==="1",showRowStripes:s.showRowStripes==="1",showColumnStripes:s.showColumnStripes==="1"},!0}return!1}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],143:[function(e,d,b){"use strict";let l=e("../../../utils/xml-stream"),o=e("../base-xform"),s=e("../list-xform"),r=e("./auto-filter-xform"),t=e("./table-column-xform"),n=e("./table-style-info-xform");class c extends o{constructor(){super(),this.map={autoFilter:new r,tableColumns:new s({tag:"tableColumns",count:!0,empty:!0,childXform:new t}),tableStyleInfo:new n}}prepare(a,h){this.map.autoFilter.prepare(a),this.map.tableColumns.prepare(a.columns,h)}get tag(){return"table"}render(a,h){a.openXml(l.StdDocAttributes),a.openNode(this.tag,{...c.TABLE_ATTRIBUTES,id:h.id,name:h.name,displayName:h.displayName||h.name,ref:h.tableRef,totalsRowCount:h.totalsRow?"1":void 0,totalsRowShown:h.totalsRow?void 0:"1",headerRowCount:h.headerRow?"1":"0"}),this.map.autoFilter.render(a,h),this.map.tableColumns.render(a,h.columns),this.map.tableStyleInfo.render(a,h.style),a.closeNode()}parseOpen(a){if(this.parser)return this.parser.parseOpen(a),!0;let{name:h,attributes:f}=a;return h===this.tag?(this.reset(),this.model={name:f.name,displayName:f.displayName||f.name,tableRef:f.ref,totalsRow:f.totalsRowCount==="1",headerRow:f.headerRowCount==="1"}):(this.parser=this.map[a.name],this.parser&&this.parser.parseOpen(a)),!0}parseText(a){this.parser&&this.parser.parseText(a)}parseClose(a){return this.parser?(this.parser.parseClose(a)||(this.parser=void 0),!0):a===this.tag?(this.model.columns=this.map.tableColumns.model,this.map.autoFilter.model&&(this.model.autoFilterRef=this.map.autoFilter.model.autoFilterRef,this.map.autoFilter.model.columns.forEach((h,f)=>{this.model.columns[f].filterButton=h.filterButton})),this.model.style=this.map.tableStyleInfo.model,!1):!0}reconcile(a,h){a.columns.forEach(f=>{f.dxfId!==void 0&&(f.style=h.styles.getDxfStyle(f.dxfId))})}}c.TABLE_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"xr xr3","xmlns:xr":"http://schemas.microsoft.com/office/spreadsheetml/2014/revision","xmlns:xr3":"http://schemas.microsoft.com/office/spreadsheetml/2016/revision3"},d.exports=c},{"../../../utils/xml-stream":28,"../base-xform":32,"../list-xform":71,"./auto-filter-xform":137,"./table-column-xform":141,"./table-style-info-xform":142}],144:[function(e,d,b){(function(l,o){(function(){"use strict";let s=e("fs"),r=e("jszip"),{PassThrough:t}=e("readable-stream"),n=e("../utils/zip-stream"),c=e("../utils/stream-buf"),i=e("../utils/utils"),a=e("../utils/xml-stream"),{bufferToString:h}=e("../utils/browser-buffer-decode"),f=e("./xform/style/styles-xform"),u=e("./xform/core/core-xform"),g=e("./xform/strings/shared-strings-xform"),m=e("./xform/core/relationships-xform"),v=e("./xform/core/content-types-xform"),k=e("./xform/core/app-xform"),B=e("./xform/book/workbook-xform"),R=e("./xform/sheet/worksheet-xform"),L=e("./xform/drawing/drawing-xform"),A=e("./xform/table/table-xform"),P=e("./xform/comment/comments-xform"),N=e("./xform/comment/vml-notes-xform"),q=e("./xml/theme1");class j{constructor(T){this.workbook=T}async readFile(T,D){if(!await i.fs.exists(T))throw new Error("File not found: "+T);let p=s.createReadStream(T);try{let y=await this.read(p,D);return p.close(),y}catch(y){throw p.close(),y}}parseRels(T){return new m().parseStream(T)}parseWorkbook(T){return new B().parseStream(T)}parseSharedStrings(T){return new g().parseStream(T)}reconcile(T,D){let p=new B,y=new R(D),x=new L,w=new A;p.reconcile(T);let _={media:T.media,mediaIndex:T.mediaIndex};Object.keys(T.drawings).forEach(z=>{let $=T.drawings[z],V=T.drawingRels[z];V&&(_.rels=V.reduce((M,H)=>(M[H.Id]=H,M),{}),($.anchors||[]).forEach(M=>{let H=M.picture&&M.picture.hyperlinks;H&&_.rels[H.rId]&&(H.hyperlink=_.rels[H.rId].Target,delete H.rId)}),x.reconcile($,_))});let C={styles:T.styles};Object.values(T.tables).forEach(z=>{w.reconcile(z,C)});let O={styles:T.styles,sharedStrings:T.sharedStrings,media:T.media,mediaIndex:T.mediaIndex,date1904:T.properties&&T.properties.date1904,drawings:T.drawings,comments:T.comments,tables:T.tables,vmlDrawings:T.vmlDrawings};T.worksheets.forEach(z=>{z.relationships=T.worksheetRels[z.sheetNo],y.reconcile(z,O)}),delete T.worksheetHash,delete T.worksheetRels,delete T.globalRels,delete T.sharedStrings,delete T.workbookRels,delete T.sheetDefs,delete T.styles,delete T.mediaIndex,delete T.drawings,delete T.drawingRels,delete T.vmlDrawings}async _processWorksheetEntry(T,D,p,y,x){let w=new R(y),_=await w.parseStream(T);_.sheetNo=p,D.worksheetHash[x]=_,D.worksheets.push(_)}async _processCommentEntry(T,D,p){let y=new P,x=await y.parseStream(T);D.comments[`../${p}.xml`]=x}async _processTableEntry(T,D,p){let y=new A,x=await y.parseStream(T);D.tables[`../tables/${p}.xml`]=x}async _processWorksheetRelsEntry(T,D,p){let y=new m,x=await y.parseStream(T);D.worksheetRels[p]=x}async _processMediaEntry(T,D,p){let y=p.lastIndexOf(".");if(y>=1){let x=p.substr(y+1),w=p.substr(0,y);await new Promise((_,C)=>{let O=new c;O.on("finish",()=>{D.mediaIndex[p]=D.media.length,D.mediaIndex[w]=D.media.length;let z={type:"image",name:w,extension:x,buffer:O.toBuffer()};D.media.push(z),_()}),T.on("error",z=>{C(z)}),T.pipe(O)})}}async _processDrawingEntry(T,D,p){let y=new L,x=await y.parseStream(T);D.drawings[p]=x}async _processDrawingRelsEntry(T,D,p){let y=new m,x=await y.parseStream(T);D.drawingRels[p]=x}async _processVmlDrawingEntry(T,D,p){let y=new N,x=await y.parseStream(T);D.vmlDrawings[`../drawings/${p}.vml`]=x}async _processThemeEntry(T,D,p){await new Promise((y,x)=>{let w=new c;T.on("error",x),w.on("error",x),w.on("finish",()=>{D.themes[p]=w.read().toString(),y()}),T.pipe(w)})}createInputStream(){throw new Error("`XLSX#createInputStream` is deprecated. You should use `XLSX#read` instead. This method will be removed in version 5.0. Please follow upgrade instruction: https://github.com/exceljs/exceljs/blob/master/UPGRADE-4.0.md")}async read(T,D){!T[Symbol.asyncIterator]&&T.pipe&&(T=T.pipe(new t));let p=[];for await(let y of T)p.push(y);return this.load(o.concat(p),D)}async load(T,D){let p;p=D&&D.base64?o.from(T.toString(),"base64"):T;let y={worksheets:[],worksheetHash:{},worksheetRels:[],themes:{},media:[],mediaIndex:{},drawings:{},drawingRels:{},comments:{},tables:{},vmlDrawings:{}},x=await r.loadAsync(p);for(let w of Object.values(x.files))if(!w.dir){let _,C=w.name;if(C[0]==="/"&&(C=C.substr(1)),C.match(/xl\/media\//)||C.match(/xl\/theme\/([a-zA-Z0-9]+)[.]xml/))_=new t,_.write(await w.async("nodebuffer"));else{let O;_=new t({writableObjectMode:!0,readableObjectMode:!0}),O=l.browser?h(await w.async("nodebuffer")):await w.async("string");let z=16384;for(let $=0;$<O.length;$+=z)_.write(O.substring($,$+z))}switch(_.end(),C){case"_rels/.rels":y.globalRels=await this.parseRels(_);break;case"xl/workbook.xml":{let O=await this.parseWorkbook(_);y.sheets=O.sheets,y.definedNames=O.definedNames,y.views=O.views,y.properties=O.properties,y.calcProperties=O.calcProperties;break}case"xl/_rels/workbook.xml.rels":y.workbookRels=await this.parseRels(_);break;case"xl/sharedStrings.xml":y.sharedStrings=new g,await y.sharedStrings.parseStream(_);break;case"xl/styles.xml":y.styles=new f,await y.styles.parseStream(_);break;case"docProps/app.xml":{let O=new k,z=await O.parseStream(_);y.company=z.company,y.manager=z.manager;break}case"docProps/core.xml":{let O=new u,z=await O.parseStream(_);Object.assign(y,z);break}default:{let O=C.match(/xl\/worksheets\/sheet(\d+)[.]xml/);if(O){await this._processWorksheetEntry(_,y,O[1],D,C);break}if(O=C.match(/xl\/worksheets\/_rels\/sheet(\d+)[.]xml.rels/),O){await this._processWorksheetRelsEntry(_,y,O[1]);break}if(O=C.match(/xl\/theme\/([a-zA-Z0-9]+)[.]xml/),O){await this._processThemeEntry(_,y,O[1]);break}if(O=C.match(/xl\/media\/([a-zA-Z0-9]+[.][a-zA-Z0-9]{3,4})$/),O){await this._processMediaEntry(_,y,O[1]);break}if(O=C.match(/xl\/drawings\/([a-zA-Z0-9]+)[.]xml/),O){await this._processDrawingEntry(_,y,O[1]);break}if(O=C.match(/xl\/(comments\d+)[.]xml/),O){await this._processCommentEntry(_,y,O[1]);break}if(O=C.match(/xl\/tables\/(table\d+)[.]xml/),O){await this._processTableEntry(_,y,O[1]);break}if(O=C.match(/xl\/drawings\/_rels\/([a-zA-Z0-9]+)[.]xml[.]rels/),O){await this._processDrawingRelsEntry(_,y,O[1]);break}if(O=C.match(/xl\/drawings\/(vmlDrawing\d+)[.]vml/),O){await this._processVmlDrawingEntry(_,y,O[1]);break}}}}return this.reconcile(y,D),this.workbook.model=y,this.workbook}async addMedia(T,D){await Promise.all(D.media.map(async p=>{if(p.type==="image"){let y=`xl/media/${p.name}.${p.extension}`;if(p.filename){let x=await(function(w,_){return new Promise((C,O)=>{s.readFile(w,_,(z,$)=>{z?O(z):C($)})})})(p.filename);return T.append(x,{name:y})}if(p.buffer)return T.append(p.buffer,{name:y});if(p.base64){let x=p.base64,w=x.substring(x.indexOf(",")+1);return T.append(w,{name:y,base64:!0})}}throw new Error("Unsupported media")}))}addDrawings(T,D){let p=new L,y=new m;D.worksheets.forEach(x=>{let{drawing:w}=x;if(w){p.prepare(w,{});let _=p.toXml(w);T.append(_,{name:`xl/drawings/${w.name}.xml`}),_=y.toXml(w.rels),T.append(_,{name:`xl/drawings/_rels/${w.name}.xml.rels`})}})}addTables(T,D){let p=new A;D.worksheets.forEach(y=>{let{tables:x}=y;x.forEach(w=>{p.prepare(w,{});let _=p.toXml(w);T.append(_,{name:"xl/tables/"+w.target})})})}async addContentTypes(T,D){let p=new v().toXml(D);T.append(p,{name:"[Content_Types].xml"})}async addApp(T,D){let p=new k().toXml(D);T.append(p,{name:"docProps/app.xml"})}async addCore(T,D){let p=new u;T.append(p.toXml(D),{name:"docProps/core.xml"})}async addThemes(T,D){let p=D.themes||{theme1:q};Object.keys(p).forEach(y=>{let x=p[y],w=`xl/theme/${y}.xml`;T.append(x,{name:w})})}async addOfficeRels(T){let D=new m().toXml([{Id:"rId1",Type:j.RelType.OfficeDocument,Target:"xl/workbook.xml"},{Id:"rId2",Type:j.RelType.CoreProperties,Target:"docProps/core.xml"},{Id:"rId3",Type:j.RelType.ExtenderProperties,Target:"docProps/app.xml"}]);T.append(D,{name:"_rels/.rels"})}async addWorkbookRels(T,D){let p=1,y=[{Id:"rId"+p++,Type:j.RelType.Styles,Target:"styles.xml"},{Id:"rId"+p++,Type:j.RelType.Theme,Target:"theme/theme1.xml"}];D.sharedStrings.count&&y.push({Id:"rId"+p++,Type:j.RelType.SharedStrings,Target:"sharedStrings.xml"}),D.worksheets.forEach(w=>{w.rId="rId"+p++,y.push({Id:w.rId,Type:j.RelType.Worksheet,Target:`worksheets/sheet${w.id}.xml`})});let x=new m().toXml(y);T.append(x,{name:"xl/_rels/workbook.xml.rels"})}async addSharedStrings(T,D){D.sharedStrings&&D.sharedStrings.count&&T.append(D.sharedStrings.xml,{name:"xl/sharedStrings.xml"})}async addStyles(T,D){let{xml:p}=D.styles;p&&T.append(p,{name:"xl/styles.xml"})}async addWorkbook(T,D){let p=new B;T.append(p.toXml(D),{name:"xl/workbook.xml"})}async addWorksheets(T,D){let p=new R,y=new m,x=new P,w=new N;D.worksheets.forEach(_=>{let C=new a;p.render(C,_),T.append(C.xml,{name:`xl/worksheets/sheet${_.id}.xml`}),_.rels&&_.rels.length&&(C=new a,y.render(C,_.rels),T.append(C.xml,{name:`xl/worksheets/_rels/sheet${_.id}.xml.rels`})),_.comments.length>0&&(C=new a,x.render(C,_),T.append(C.xml,{name:`xl/comments${_.id}.xml`}),C=new a,w.render(C,_),T.append(C.xml,{name:`xl/drawings/vmlDrawing${_.id}.vml`}))})}_finalize(T){return new Promise((D,p)=>{T.on("finish",()=>{D(this)}),T.on("error",p),T.finalize()})}prepareModel(T,D){T.creator=T.creator||"ExcelJS",T.lastModifiedBy=T.lastModifiedBy||"ExcelJS",T.created=T.created||new Date,T.modified=T.modified||new Date,T.useSharedStrings=D.useSharedStrings===void 0||D.useSharedStrings,T.useStyles=D.useStyles===void 0||D.useStyles,T.sharedStrings=new g,T.styles=T.useStyles?new f(!0):new f.Mock;let p=new B,y=new R;p.prepare(T);let x={sharedStrings:T.sharedStrings,styles:T.styles,date1904:T.properties.date1904,drawingsCount:0,media:T.media};x.drawings=T.drawings=[],x.commentRefs=T.commentRefs=[];let w=0;T.tables=[],T.worksheets.forEach(_=>{_.tables.forEach(C=>{w++,C.target=`table${w}.xml`,C.id=w,T.tables.push(C)}),y.prepare(_,x)})}async write(T,D){D=D||{};let{model:p}=this.workbook,y=new n.ZipWriter(D.zip);return y.pipe(T),this.prepareModel(p,D),await this.addContentTypes(y,p),await this.addOfficeRels(y,p),await this.addWorkbookRels(y,p),await this.addWorksheets(y,p),await this.addSharedStrings(y,p),await this.addDrawings(y,p),await this.addTables(y,p),await Promise.all([this.addThemes(y,p),this.addStyles(y,p)]),await this.addMedia(y,p),await Promise.all([this.addApp(y,p),this.addCore(y,p)]),await this.addWorkbook(y,p),this._finalize(y)}writeFile(T,D){let p=s.createWriteStream(T);return new Promise((y,x)=>{p.on("finish",()=>{y()}),p.on("error",w=>{x(w)}),this.write(p,D).then(()=>{p.end()}).catch(w=>{x(w)})})}async writeBuffer(T){let D=new c;return await this.write(D,T),D.read()}}j.RelType=e("./rel-type"),d.exports=j}).call(this)}).call(this,e("_process"),e("buffer").Buffer)},{"../utils/browser-buffer-decode":16,"../utils/stream-buf":24,"../utils/utils":27,"../utils/xml-stream":28,"../utils/zip-stream":29,"./rel-type":31,"./xform/book/workbook-xform":38,"./xform/comment/comments-xform":40,"./xform/comment/vml-notes-xform":45,"./xform/core/app-xform":51,"./xform/core/content-types-xform":52,"./xform/core/core-xform":53,"./xform/core/relationships-xform":55,"./xform/drawing/drawing-xform":62,"./xform/sheet/worksheet-xform":115,"./xform/strings/shared-strings-xform":124,"./xform/style/styles-xform":135,"./xform/table/table-xform":143,"./xml/theme1":145,_process:467,buffer:220,fs:216,jszip:441,"readable-stream":491}],145:[function(e,d,b){"use strict";d.exports=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
3
3
  <a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="Office Theme"> <a:themeElements> <a:clrScheme name="Office"> <a:dk1> <a:sysClr val="windowText" lastClr="000000"/> </a:dk1> <a:lt1> <a:sysClr val="window" lastClr="FFFFFF"/> </a:lt1> <a:dk2> <a:srgbClr val="1F497D"/> </a:dk2> <a:lt2> <a:srgbClr val="EEECE1"/> </a:lt2> <a:accent1> <a:srgbClr val="4F81BD"/> </a:accent1> <a:accent2> <a:srgbClr val="C0504D"/> </a:accent2> <a:accent3> <a:srgbClr val="9BBB59"/> </a:accent3> <a:accent4> <a:srgbClr val="8064A2"/> </a:accent4> <a:accent5> <a:srgbClr val="4BACC6"/> </a:accent5> <a:accent6> <a:srgbClr val="F79646"/> </a:accent6> <a:hlink> <a:srgbClr val="0000FF"/> </a:hlink> <a:folHlink> <a:srgbClr val="800080"/> </a:folHlink> </a:clrScheme> <a:fontScheme name="Office"> <a:majorFont> <a:latin typeface="Cambria"/> <a:ea typeface=""/> <a:cs typeface=""/> <a:font script="Jpan" typeface="\uFF2D\uFF33 \uFF30\u30B4\u30B7\u30C3\u30AF"/> <a:font script="Hang" typeface="\uB9D1\uC740 \uACE0\uB515"/> <a:font script="Hans" typeface="\u5B8B\u4F53"/> <a:font script="Hant" typeface="\u65B0\u7D30\u660E\u9AD4"/> <a:font script="Arab" typeface="Times New Roman"/> <a:font script="Hebr" typeface="Times New Roman"/> <a:font script="Thai" typeface="Tahoma"/> <a:font script="Ethi" typeface="Nyala"/> <a:font script="Beng" typeface="Vrinda"/> <a:font script="Gujr" typeface="Shruti"/> <a:font script="Khmr" typeface="MoolBoran"/> <a:font script="Knda" typeface="Tunga"/> <a:font script="Guru" typeface="Raavi"/> <a:font script="Cans" typeface="Euphemia"/> <a:font script="Cher" typeface="Plantagenet Cherokee"/> <a:font script="Yiii" typeface="Microsoft Yi Baiti"/> <a:font script="Tibt" typeface="Microsoft Himalaya"/> <a:font script="Thaa" typeface="MV Boli"/> <a:font script="Deva" typeface="Mangal"/> <a:font script="Telu" typeface="Gautami"/> <a:font script="Taml" typeface="Latha"/> <a:font script="Syrc" typeface="Estrangelo Edessa"/> <a:font script="Orya" typeface="Kalinga"/> <a:font script="Mlym" typeface="Kartika"/> <a:font script="Laoo" typeface="DokChampa"/> <a:font script="Sinh" typeface="Iskoola Pota"/> <a:font script="Mong" typeface="Mongolian Baiti"/> <a:font script="Viet" typeface="Times New Roman"/> <a:font script="Uigh" typeface="Microsoft Uighur"/> <a:font script="Geor" typeface="Sylfaen"/> </a:majorFont> <a:minorFont> <a:latin typeface="Calibri"/> <a:ea typeface=""/> <a:cs typeface=""/> <a:font script="Jpan" typeface="\uFF2D\uFF33 \uFF30\u30B4\u30B7\u30C3\u30AF"/> <a:font script="Hang" typeface="\uB9D1\uC740 \uACE0\uB515"/> <a:font script="Hans" typeface="\u5B8B\u4F53"/> <a:font script="Hant" typeface="\u65B0\u7D30\u660E\u9AD4"/> <a:font script="Arab" typeface="Arial"/> <a:font script="Hebr" typeface="Arial"/> <a:font script="Thai" typeface="Tahoma"/> <a:font script="Ethi" typeface="Nyala"/> <a:font script="Beng" typeface="Vrinda"/> <a:font script="Gujr" typeface="Shruti"/> <a:font script="Khmr" typeface="DaunPenh"/> <a:font script="Knda" typeface="Tunga"/> <a:font script="Guru" typeface="Raavi"/> <a:font script="Cans" typeface="Euphemia"/> <a:font script="Cher" typeface="Plantagenet Cherokee"/> <a:font script="Yiii" typeface="Microsoft Yi Baiti"/> <a:font script="Tibt" typeface="Microsoft Himalaya"/> <a:font script="Thaa" typeface="MV Boli"/> <a:font script="Deva" typeface="Mangal"/> <a:font script="Telu" typeface="Gautami"/> <a:font script="Taml" typeface="Latha"/> <a:font script="Syrc" typeface="Estrangelo Edessa"/> <a:font script="Orya" typeface="Kalinga"/> <a:font script="Mlym" typeface="Kartika"/> <a:font script="Laoo" typeface="DokChampa"/> <a:font script="Sinh" typeface="Iskoola Pota"/> <a:font script="Mong" typeface="Mongolian Baiti"/> <a:font script="Viet" typeface="Arial"/> <a:font script="Uigh" typeface="Microsoft Uighur"/> <a:font script="Geor" typeface="Sylfaen"/> </a:minorFont> </a:fontScheme> <a:fmtScheme name="Office"> <a:fillStyleLst> <a:solidFill> <a:schemeClr val="phClr"/> </a:solidFill> <a:gradFill rotWithShape="1"> <a:gsLst> <a:gs pos="0"> <a:schemeClr val="phClr"> <a:tint val="50000"/> <a:satMod val="300000"/> </a:schemeClr> </a:gs> <a:gs pos="35000"> <a:schemeClr val="phClr"> <a:tint val="37000"/> <a:satMod val="300000"/> </a:schemeClr> </a:gs> <a:gs pos="100000"> <a:schemeClr val="phClr"> <a:tint val="15000"/> <a:satMod val="350000"/> </a:schemeClr> </a:gs> </a:gsLst> <a:lin ang="16200000" scaled="1"/> </a:gradFill> <a:gradFill rotWithShape="1"> <a:gsLst> <a:gs pos="0"> <a:schemeClr val="phClr"> <a:tint val="100000"/> <a:shade val="100000"/> <a:satMod val="130000"/> </a:schemeClr> </a:gs> <a:gs pos="100000"> <a:schemeClr val="phClr"> <a:tint val="50000"/> <a:shade val="100000"/> <a:satMod val="350000"/> </a:schemeClr> </a:gs> </a:gsLst> <a:lin ang="16200000" scaled="0"/> </a:gradFill> </a:fillStyleLst> <a:lnStyleLst> <a:ln w="9525" cap="flat" cmpd="sng" algn="ctr"> <a:solidFill> <a:schemeClr val="phClr"> <a:shade val="95000"/> <a:satMod val="105000"/> </a:schemeClr> </a:solidFill> <a:prstDash val="solid"/> </a:ln> <a:ln w="25400" cap="flat" cmpd="sng" algn="ctr"> <a:solidFill> <a:schemeClr val="phClr"/> </a:solidFill> <a:prstDash val="solid"/> </a:ln> <a:ln w="38100" cap="flat" cmpd="sng" algn="ctr"> <a:solidFill> <a:schemeClr val="phClr"/> </a:solidFill> <a:prstDash val="solid"/> </a:ln> </a:lnStyleLst> <a:effectStyleLst> <a:effectStyle> <a:effectLst> <a:outerShdw blurRad="40000" dist="20000" dir="5400000" rotWithShape="0"> <a:srgbClr val="000000"> <a:alpha val="38000"/> </a:srgbClr> </a:outerShdw> </a:effectLst> </a:effectStyle> <a:effectStyle> <a:effectLst> <a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"> <a:srgbClr val="000000"> <a:alpha val="35000"/> </a:srgbClr> </a:outerShdw> </a:effectLst> </a:effectStyle> <a:effectStyle> <a:effectLst> <a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"> <a:srgbClr val="000000"> <a:alpha val="35000"/> </a:srgbClr> </a:outerShdw> </a:effectLst> <a:scene3d> <a:camera prst="orthographicFront"> <a:rot lat="0" lon="0" rev="0"/> </a:camera> <a:lightRig rig="threePt" dir="t"> <a:rot lat="0" lon="0" rev="1200000"/> </a:lightRig> </a:scene3d> <a:sp3d> <a:bevelT w="63500" h="25400"/> </a:sp3d> </a:effectStyle> </a:effectStyleLst> <a:bgFillStyleLst> <a:solidFill> <a:schemeClr val="phClr"/> </a:solidFill> <a:gradFill rotWithShape="1"> <a:gsLst> <a:gs pos="0"> <a:schemeClr val="phClr"> <a:tint val="40000"/> <a:satMod val="350000"/> </a:schemeClr> </a:gs> <a:gs pos="40000"> <a:schemeClr val="phClr"> <a:tint val="45000"/> <a:shade val="99000"/> <a:satMod val="350000"/> </a:schemeClr> </a:gs> <a:gs pos="100000"> <a:schemeClr val="phClr"> <a:shade val="20000"/> <a:satMod val="255000"/> </a:schemeClr> </a:gs> </a:gsLst> <a:path path="circle"> <a:fillToRect l="50000" t="-80000" r="50000" b="180000"/> </a:path> </a:gradFill> <a:gradFill rotWithShape="1"> <a:gsLst> <a:gs pos="0"> <a:schemeClr val="phClr"> <a:tint val="80000"/> <a:satMod val="300000"/> </a:schemeClr> </a:gs> <a:gs pos="100000"> <a:schemeClr val="phClr"> <a:shade val="30000"/> <a:satMod val="200000"/> </a:schemeClr> </a:gs> </a:gsLst> <a:path path="circle"> <a:fillToRect l="50000" t="50000" r="50000" b="50000"/> </a:path> </a:gradFill> </a:bgFillStyleLst> </a:fmtScheme> </a:themeElements> <a:objectDefaults> <a:spDef> <a:spPr/> <a:bodyPr/> <a:lstStyle/> <a:style> <a:lnRef idx="1"> <a:schemeClr val="accent1"/> </a:lnRef> <a:fillRef idx="3"> <a:schemeClr val="accent1"/> </a:fillRef> <a:effectRef idx="2"> <a:schemeClr val="accent1"/> </a:effectRef> <a:fontRef idx="minor"> <a:schemeClr val="lt1"/> </a:fontRef> </a:style> </a:spDef> <a:lnDef> <a:spPr/> <a:bodyPr/> <a:lstStyle/> <a:style> <a:lnRef idx="2"> <a:schemeClr val="accent1"/> </a:lnRef> <a:fillRef idx="0"> <a:schemeClr val="accent1"/> </a:fillRef> <a:effectRef idx="1"> <a:schemeClr val="accent1"/> </a:effectRef> <a:fontRef idx="minor"> <a:schemeClr val="tx1"/> </a:fontRef> </a:style> </a:lnDef> </a:objectDefaults> <a:extraClrSchemeLst/> </a:theme>`},{}],146:[function(e,d,b){(function(l){(function(){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.CsvFormatterStream=void 0;let o=e("stream"),s=e("./formatter");class r extends o.Transform{constructor(n){super({writableObjectMode:n.objectMode}),this.hasWrittenBOM=!1,this.formatterOptions=n,this.rowFormatter=new s.RowFormatter(n),this.hasWrittenBOM=!n.writeBOM}transform(n){return this.rowFormatter.rowTransform=n,this}_transform(n,c,i){let a=!1;try{this.hasWrittenBOM||(this.push(this.formatterOptions.BOM),this.hasWrittenBOM=!0),this.rowFormatter.format(n,(h,f)=>h?(a=!0,i(h)):(f&&f.forEach(u=>{this.push(l.from(u,"utf8"))}),a=!0,i()))}catch(h){if(a)throw h;i(h)}}_flush(n){this.rowFormatter.finish((c,i)=>c?n(c):(i&&i.forEach(a=>{this.push(l.from(a,"utf8"))}),n()))}}b.CsvFormatterStream=r}).call(this)}).call(this,e("buffer").Buffer)},{"./formatter":150,buffer:220,stream:505}],147:[function(e,d,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.FormatterOptions=void 0,b.FormatterOptions=class{constructor(){let l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};var o;this.objectMode=!0,this.delimiter=",",this.rowDelimiter=`
4
4
  `,this.quote='"',this.escape=this.quote,this.quoteColumns=!1,this.quoteHeaders=this.quoteColumns,this.headers=null,this.includeEndRowDelimiter=!1,this.writeBOM=!1,this.BOM="\uFEFF",this.alwaysWriteHeaders=!1,Object.assign(this,l||{}),l?.quoteHeaders===void 0&&(this.quoteHeaders=this.quoteColumns),l?.quote===!0?this.quote='"':l?.quote===!1&&(this.quote=""),typeof l?.escape!="string"&&(this.escape=this.quote),this.shouldWriteHeaders=!!this.headers&&((o=l.writeHeaders)===null||o===void 0||o),this.headers=Array.isArray(this.headers)?this.headers:null,this.escapedQuote=`${this.escape}${this.quote}`}}},{}],148:[function(e,d,b){"use strict";var l=function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(b,"__esModule",{value:!0}),b.FieldFormatter=void 0;let o=l(e("lodash.isboolean")),s=l(e("lodash.isnil")),r=l(e("lodash.escaperegexp"));b.FieldFormatter=class{constructor(t){this._headers=null,this.formatterOptions=t,t.headers!==null&&(this.headers=t.headers),this.REPLACE_REGEXP=new RegExp(t.quote,"g");let n=`[${t.delimiter}${r.default(t.rowDelimiter)}|\r|
@@ -26,25 +26,25 @@ use chrome, FireFox or Internet Explorer 11`)}var r=e("safe-buffer"),t=e("random
26
26
  `)):z=p.stylize("[Circular]","special")),B(O)){if(C&&_.match(/^\d+$/))return z;(O=JSON.stringify(""+_)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(O=O.substr(1,O.length-2),O=p.stylize(O,"name")):(O=O.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),O=p.stylize(O,"string"))}return O+": "+z}function u(p){return Array.isArray(p)}function g(p){return typeof p=="boolean"}function m(p){return p===null}function v(p){return typeof p=="number"}function k(p){return typeof p=="string"}function B(p){return p===void 0}function R(p){return L(p)&&q(p)==="[object RegExp]"}function L(p){return typeof p=="object"&&p!==null}function A(p){return L(p)&&q(p)==="[object Date]"}function P(p){return L(p)&&(q(p)==="[object Error]"||p instanceof Error)}function N(p){return typeof p=="function"}function q(p){return Object.prototype.toString.call(p)}function j(p){return p<10?"0"+p.toString(10):p.toString(10)}b.debuglog=function(p){if(B(r)&&(r=l.env.NODE_DEBUG||""),p=p.toUpperCase(),!t[p])if(new RegExp("\\b"+p+"\\b","i").test(r)){var y=l.pid;t[p]=function(){var x=b.format.apply(b,arguments);console.error("%s %d: %s",p,y,x)}}else t[p]=function(){};return t[p]},b.inspect=n,n.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},n.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},b.isArray=u,b.isBoolean=g,b.isNull=m,b.isNullOrUndefined=function(p){return p==null},b.isNumber=v,b.isString=k,b.isSymbol=function(p){return typeof p=="symbol"},b.isUndefined=B,b.isRegExp=R,b.isObject=L,b.isDate=A,b.isError=P,b.isFunction=N,b.isPrimitive=function(p){return p===null||typeof p=="boolean"||typeof p=="number"||typeof p=="string"||typeof p=="symbol"||p===void 0},b.isBuffer=e("./support/isBuffer");var S=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function T(){var p=new Date,y=[j(p.getHours()),j(p.getMinutes()),j(p.getSeconds())].join(":");return[p.getDate(),S[p.getMonth()],y].join(" ")}function D(p,y){return Object.prototype.hasOwnProperty.call(p,y)}b.log=function(){console.log("%s - %s",T(),b.format.apply(b,arguments))},b.inherits=e("inherits"),b._extend=function(p,y){if(!y||!L(y))return p;for(var x=Object.keys(y),w=x.length;w--;)p[x[w]]=y[x[w]];return p}}).call(this)}).call(this,e("_process"),typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{"./support/isBuffer":526,_process:467,inherits:525}],528:[function(e,d,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"v1",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(b,"v3",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(b,"v4",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(b,"v5",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(b,"NIL",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(b,"version",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(b,"validate",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(b,"stringify",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(b,"parse",{enumerable:!0,get:function(){return a.default}});var l=h(e("./v1.js")),o=h(e("./v3.js")),s=h(e("./v4.js")),r=h(e("./v5.js")),t=h(e("./nil.js")),n=h(e("./version.js")),c=h(e("./validate.js")),i=h(e("./stringify.js")),a=h(e("./parse.js"));function h(f){return f&&f.__esModule?f:{default:f}}},{"./nil.js":530,"./parse.js":531,"./stringify.js":535,"./v1.js":536,"./v3.js":537,"./v4.js":539,"./v5.js":540,"./validate.js":541,"./version.js":542}],529:[function(e,d,b){"use strict";function l(a){return 14+(a+64>>>9<<4)+1}function o(a,h){let f=(65535&a)+(65535&h);return(a>>16)+(h>>16)+(f>>16)<<16|65535&f}function s(a,h,f,u,g,m){return o((v=o(o(h,a),o(u,m)))<<(k=g)|v>>>32-k,f);var v,k}function r(a,h,f,u,g,m,v){return s(h&f|~h&u,a,h,g,m,v)}function t(a,h,f,u,g,m,v){return s(h&u|f&~u,a,h,g,m,v)}function n(a,h,f,u,g,m,v){return s(h^f^u,a,h,g,m,v)}function c(a,h,f,u,g,m,v){return s(f^(h|~u),a,h,g,m,v)}Object.defineProperty(b,"__esModule",{value:!0}),b.default=void 0;var i=function(a){if(typeof a=="string"){let h=unescape(encodeURIComponent(a));a=new Uint8Array(h.length);for(let f=0;f<h.length;++f)a[f]=h.charCodeAt(f)}return(function(h){let f=[],u=32*h.length;for(let g=0;g<u;g+=8){let m=h[g>>5]>>>g%32&255,v=parseInt("0123456789abcdef".charAt(m>>>4&15)+"0123456789abcdef".charAt(15&m),16);f.push(v)}return f})((function(h,f){h[f>>5]|=128<<f%32,h[l(f)-1]=f;let u=1732584193,g=-271733879,m=-1732584194,v=271733878;for(let k=0;k<h.length;k+=16){let B=u,R=g,L=m,A=v;u=r(u,g,m,v,h[k],7,-680876936),v=r(v,u,g,m,h[k+1],12,-389564586),m=r(m,v,u,g,h[k+2],17,606105819),g=r(g,m,v,u,h[k+3],22,-1044525330),u=r(u,g,m,v,h[k+4],7,-176418897),v=r(v,u,g,m,h[k+5],12,1200080426),m=r(m,v,u,g,h[k+6],17,-1473231341),g=r(g,m,v,u,h[k+7],22,-45705983),u=r(u,g,m,v,h[k+8],7,1770035416),v=r(v,u,g,m,h[k+9],12,-1958414417),m=r(m,v,u,g,h[k+10],17,-42063),g=r(g,m,v,u,h[k+11],22,-1990404162),u=r(u,g,m,v,h[k+12],7,1804603682),v=r(v,u,g,m,h[k+13],12,-40341101),m=r(m,v,u,g,h[k+14],17,-1502002290),g=r(g,m,v,u,h[k+15],22,1236535329),u=t(u,g,m,v,h[k+1],5,-165796510),v=t(v,u,g,m,h[k+6],9,-1069501632),m=t(m,v,u,g,h[k+11],14,643717713),g=t(g,m,v,u,h[k],20,-373897302),u=t(u,g,m,v,h[k+5],5,-701558691),v=t(v,u,g,m,h[k+10],9,38016083),m=t(m,v,u,g,h[k+15],14,-660478335),g=t(g,m,v,u,h[k+4],20,-405537848),u=t(u,g,m,v,h[k+9],5,568446438),v=t(v,u,g,m,h[k+14],9,-1019803690),m=t(m,v,u,g,h[k+3],14,-187363961),g=t(g,m,v,u,h[k+8],20,1163531501),u=t(u,g,m,v,h[k+13],5,-1444681467),v=t(v,u,g,m,h[k+2],9,-51403784),m=t(m,v,u,g,h[k+7],14,1735328473),g=t(g,m,v,u,h[k+12],20,-1926607734),u=n(u,g,m,v,h[k+5],4,-378558),v=n(v,u,g,m,h[k+8],11,-2022574463),m=n(m,v,u,g,h[k+11],16,1839030562),g=n(g,m,v,u,h[k+14],23,-35309556),u=n(u,g,m,v,h[k+1],4,-1530992060),v=n(v,u,g,m,h[k+4],11,1272893353),m=n(m,v,u,g,h[k+7],16,-155497632),g=n(g,m,v,u,h[k+10],23,-1094730640),u=n(u,g,m,v,h[k+13],4,681279174),v=n(v,u,g,m,h[k],11,-358537222),m=n(m,v,u,g,h[k+3],16,-722521979),g=n(g,m,v,u,h[k+6],23,76029189),u=n(u,g,m,v,h[k+9],4,-640364487),v=n(v,u,g,m,h[k+12],11,-421815835),m=n(m,v,u,g,h[k+15],16,530742520),g=n(g,m,v,u,h[k+2],23,-995338651),u=c(u,g,m,v,h[k],6,-198630844),v=c(v,u,g,m,h[k+7],10,1126891415),m=c(m,v,u,g,h[k+14],15,-1416354905),g=c(g,m,v,u,h[k+5],21,-57434055),u=c(u,g,m,v,h[k+12],6,1700485571),v=c(v,u,g,m,h[k+3],10,-1894986606),m=c(m,v,u,g,h[k+10],15,-1051523),g=c(g,m,v,u,h[k+1],21,-2054922799),u=c(u,g,m,v,h[k+8],6,1873313359),v=c(v,u,g,m,h[k+15],10,-30611744),m=c(m,v,u,g,h[k+6],15,-1560198380),g=c(g,m,v,u,h[k+13],21,1309151649),u=c(u,g,m,v,h[k+4],6,-145523070),v=c(v,u,g,m,h[k+11],10,-1120210379),m=c(m,v,u,g,h[k+2],15,718787259),g=c(g,m,v,u,h[k+9],21,-343485551),u=o(u,B),g=o(g,R),m=o(m,L),v=o(v,A)}return[u,g,m,v]})((function(h){if(h.length===0)return[];let f=8*h.length,u=new Uint32Array(l(f));for(let g=0;g<f;g+=8)u[g>>5]|=(255&h[g/8])<<g%32;return u})(a),8*a.length))};b.default=i},{}],530:[function(e,d,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.default=void 0,b.default="00000000-0000-0000-0000-000000000000"},{}],531:[function(e,d,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.default=void 0;var l,o=(l=e("./validate.js"))&&l.__esModule?l:{default:l},s=function(r){if(!(0,o.default)(r))throw TypeError("Invalid UUID");let t,n=new Uint8Array(16);return n[0]=(t=parseInt(r.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n[4]=(t=parseInt(r.slice(9,13),16))>>>8,n[5]=255&t,n[6]=(t=parseInt(r.slice(14,18),16))>>>8,n[7]=255&t,n[8]=(t=parseInt(r.slice(19,23),16))>>>8,n[9]=255&t,n[10]=(t=parseInt(r.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=255&t,n};b.default=s},{"./validate.js":541}],532:[function(e,d,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.default=void 0,b.default=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i},{}],533:[function(e,d,b){"use strict";let l;Object.defineProperty(b,"__esModule",{value:!0}),b.default=function(){if(!l&&(l=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!l))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return l(o)};let o=new Uint8Array(16)},{}],534:[function(e,d,b){"use strict";function l(r,t,n,c){switch(r){case 0:return t&n^~t&c;case 1:return t^n^c;case 2:return t&n^t&c^n&c;case 3:return t^n^c}}function o(r,t){return r<<t|r>>>32-t}Object.defineProperty(b,"__esModule",{value:!0}),b.default=void 0;var s=function(r){let t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof r=="string"){let h=unescape(encodeURIComponent(r));r=[];for(let f=0;f<h.length;++f)r.push(h.charCodeAt(f))}else Array.isArray(r)||(r=Array.prototype.slice.call(r));r.push(128);let c=r.length/4+2,i=Math.ceil(c/16),a=new Array(i);for(let h=0;h<i;++h){let f=new Uint32Array(16);for(let u=0;u<16;++u)f[u]=r[64*h+4*u]<<24|r[64*h+4*u+1]<<16|r[64*h+4*u+2]<<8|r[64*h+4*u+3];a[h]=f}a[i-1][14]=8*(r.length-1)/Math.pow(2,32),a[i-1][14]=Math.floor(a[i-1][14]),a[i-1][15]=8*(r.length-1)&4294967295;for(let h=0;h<i;++h){let f=new Uint32Array(80);for(let B=0;B<16;++B)f[B]=a[h][B];for(let B=16;B<80;++B)f[B]=o(f[B-3]^f[B-8]^f[B-14]^f[B-16],1);let u=n[0],g=n[1],m=n[2],v=n[3],k=n[4];for(let B=0;B<80;++B){let R=Math.floor(B/20),L=o(u,5)+l(R,g,m,v)+k+t[R]+f[B]>>>0;k=v,v=m,m=o(g,30)>>>0,g=u,u=L}n[0]=n[0]+u>>>0,n[1]=n[1]+g>>>0,n[2]=n[2]+m>>>0,n[3]=n[3]+v>>>0,n[4]=n[4]+k>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]};b.default=s},{}],535:[function(e,d,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.default=void 0;var l,o=(l=e("./validate.js"))&&l.__esModule?l:{default:l};let s=[];for(let t=0;t<256;++t)s.push((t+256).toString(16).substr(1));var r=function(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,c=(s[t[n+0]]+s[t[n+1]]+s[t[n+2]]+s[t[n+3]]+"-"+s[t[n+4]]+s[t[n+5]]+"-"+s[t[n+6]]+s[t[n+7]]+"-"+s[t[n+8]]+s[t[n+9]]+"-"+s[t[n+10]]+s[t[n+11]]+s[t[n+12]]+s[t[n+13]]+s[t[n+14]]+s[t[n+15]]).toLowerCase();if(!(0,o.default)(c))throw TypeError("Stringified UUID is invalid");return c};b.default=r},{"./validate.js":541}],536:[function(e,d,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.default=void 0;var l=s(e("./rng.js")),o=s(e("./stringify.js"));function s(a){return a&&a.__esModule?a:{default:a}}let r,t,n=0,c=0;var i=function(a,h,f){let u=h&&f||0,g=h||new Array(16),m=(a=a||{}).node||r,v=a.clockseq!==void 0?a.clockseq:t;if(m==null||v==null){let P=a.random||(a.rng||l.default)();m==null&&(m=r=[1|P[0],P[1],P[2],P[3],P[4],P[5]]),v==null&&(v=t=16383&(P[6]<<8|P[7]))}let k=a.msecs!==void 0?a.msecs:Date.now(),B=a.nsecs!==void 0?a.nsecs:c+1,R=k-n+(B-c)/1e4;if(R<0&&a.clockseq===void 0&&(v=v+1&16383),(R<0||k>n)&&a.nsecs===void 0&&(B=0),B>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");n=k,c=B,t=v,k+=122192928e5;let L=(1e4*(268435455&k)+B)%4294967296;g[u++]=L>>>24&255,g[u++]=L>>>16&255,g[u++]=L>>>8&255,g[u++]=255&L;let A=k/4294967296*1e4&268435455;g[u++]=A>>>8&255,g[u++]=255&A,g[u++]=A>>>24&15|16,g[u++]=A>>>16&255,g[u++]=v>>>8|128,g[u++]=255&v;for(let P=0;P<6;++P)g[u+P]=m[P];return h||(0,o.default)(g)};b.default=i},{"./rng.js":533,"./stringify.js":535}],537:[function(e,d,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.default=void 0;var l=s(e("./v35.js")),o=s(e("./md5.js"));function s(t){return t&&t.__esModule?t:{default:t}}var r=(0,l.default)("v3",48,o.default);b.default=r},{"./md5.js":529,"./v35.js":538}],538:[function(e,d,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.default=function(n,c,i){function a(h,f,u,g){if(typeof h=="string"&&(h=(function(v){v=unescape(encodeURIComponent(v));let k=[];for(let B=0;B<v.length;++B)k.push(v.charCodeAt(B));return k})(h)),typeof f=="string"&&(f=(0,o.default)(f)),f.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let m=new Uint8Array(16+h.length);if(m.set(f),m.set(h,f.length),m=i(m),m[6]=15&m[6]|c,m[8]=63&m[8]|128,u){g=g||0;for(let v=0;v<16;++v)u[g+v]=m[v];return u}return(0,l.default)(m)}try{a.name=n}catch{}return a.DNS=r,a.URL=t,a},b.URL=b.DNS=void 0;var l=s(e("./stringify.js")),o=s(e("./parse.js"));function s(n){return n&&n.__esModule?n:{default:n}}let r="6ba7b810-9dad-11d1-80b4-00c04fd430c8";b.DNS=r;let t="6ba7b811-9dad-11d1-80b4-00c04fd430c8";b.URL=t},{"./parse.js":531,"./stringify.js":535}],539:[function(e,d,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.default=void 0;var l=s(e("./rng.js")),o=s(e("./stringify.js"));function s(t){return t&&t.__esModule?t:{default:t}}var r=function(t,n,c){let i=(t=t||{}).random||(t.rng||l.default)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,n){c=c||0;for(let a=0;a<16;++a)n[c+a]=i[a];return n}return(0,o.default)(i)};b.default=r},{"./rng.js":533,"./stringify.js":535}],540:[function(e,d,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.default=void 0;var l=s(e("./v35.js")),o=s(e("./sha1.js"));function s(t){return t&&t.__esModule?t:{default:t}}var r=(0,l.default)("v5",80,o.default);b.default=r},{"./sha1.js":534,"./v35.js":538}],541:[function(e,d,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.default=void 0;var l,o=(l=e("./regex.js"))&&l.__esModule?l:{default:l},s=function(r){return typeof r=="string"&&o.default.test(r)};b.default=s},{"./regex.js":532}],542:[function(e,d,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.default=void 0;var l,o=(l=e("./validate.js"))&&l.__esModule?l:{default:l},s=function(r){if(!(0,o.default)(r))throw TypeError("Invalid UUID");return parseInt(r.substr(14,1),16)};b.default=s},{"./validate.js":541}],543:[function(e,d,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.CHAR=`
27
27
  \r -\uD7FF\uE000-\uFFFD\u{10000}-\u{10FFFF}`,b.S=` \r
28
28
  `,b.NAME_START_CHAR=":A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u{10000}-\u{EFFFF}",b.NAME_CHAR="-"+b.NAME_START_CHAR+".0-9\xB7\u0300-\u036F\u203F-\u2040",b.CHAR_RE=new RegExp("^["+b.CHAR+"]$","u"),b.S_RE=new RegExp("^["+b.S+"]+$","u"),b.NAME_START_CHAR_RE=new RegExp("^["+b.NAME_START_CHAR+"]$","u"),b.NAME_CHAR_RE=new RegExp("^["+b.NAME_CHAR+"]$","u"),b.NAME_RE=new RegExp("^["+b.NAME_START_CHAR+"]["+b.NAME_CHAR+"]*$","u"),b.NMTOKEN_RE=new RegExp("^["+b.NAME_CHAR+"]+$","u");function l(o){return o>=65&&o<=90||o>=97&&o<=122||o===58||o===95||o===8204||o===8205||o>=192&&o<=214||o>=216&&o<=246||o>=248&&o<=767||o>=880&&o<=893||o>=895&&o<=8191||o>=8304&&o<=8591||o>=11264&&o<=12271||o>=12289&&o<=55295||o>=63744&&o<=64975||o>=65008&&o<=65533||o>=65536&&o<=983039}b.S_LIST=[32,10,13,9],b.isChar=function(o){return o>=32&&o<=55295||o===10||o===13||o===9||o>=57344&&o<=65533||o>=65536&&o<=1114111},b.isS=function(o){return o===32||o===10||o===13||o===9},b.isNameStartChar=l,b.isNameChar=function(o){return l(o)||o>=48&&o<=57||o===45||o===46||o===183||o>=768&&o<=879||o>=8255&&o<=8256}},{}],544:[function(e,d,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.CHAR="-\uD7FF\uE000-\uFFFD\u{10000}-\u{10FFFF}",b.RESTRICTED_CHAR="-\b\v\f-\x7F-\x84\x86-\x9F",b.S=` \r
29
- `,b.NAME_START_CHAR=":A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u{10000}-\u{EFFFF}",b.NAME_CHAR="-"+b.NAME_START_CHAR+".0-9\xB7\u0300-\u036F\u203F-\u2040",b.CHAR_RE=new RegExp("^["+b.CHAR+"]$","u"),b.RESTRICTED_CHAR_RE=new RegExp("^["+b.RESTRICTED_CHAR+"]$","u"),b.S_RE=new RegExp("^["+b.S+"]+$","u"),b.NAME_START_CHAR_RE=new RegExp("^["+b.NAME_START_CHAR+"]$","u"),b.NAME_CHAR_RE=new RegExp("^["+b.NAME_CHAR+"]$","u"),b.NAME_RE=new RegExp("^["+b.NAME_START_CHAR+"]["+b.NAME_CHAR+"]*$","u"),b.NMTOKEN_RE=new RegExp("^["+b.NAME_CHAR+"]+$","u");function l(o){return o>=65&&o<=90||o>=97&&o<=122||o===58||o===95||o===8204||o===8205||o>=192&&o<=214||o>=216&&o<=246||o>=248&&o<=767||o>=880&&o<=893||o>=895&&o<=8191||o>=8304&&o<=8591||o>=11264&&o<=12271||o>=12289&&o<=55295||o>=63744&&o<=64975||o>=65008&&o<=65533||o>=65536&&o<=983039}b.S_LIST=[32,10,13,9],b.isChar=function(o){return o>=1&&o<=55295||o>=57344&&o<=65533||o>=65536&&o<=1114111},b.isRestrictedChar=function(o){return o>=1&&o<=8||o===11||o===12||o>=14&&o<=31||o>=127&&o<=132||o>=134&&o<=159},b.isCharAndNotRestricted=function(o){return o===9||o===10||o===13||o>31&&o<127||o===133||o>159&&o<=55295||o>=57344&&o<=65533||o>=65536&&o<=1114111},b.isS=function(o){return o===32||o===10||o===13||o===9},b.isNameStartChar=l,b.isNameChar=function(o){return l(o)||o>=48&&o<=57||o===45||o===46||o===183||o>=768&&o<=879||o>=8255&&o<=8256}},{}],545:[function(e,d,b){"use strict";function l(o){return o>=65&&o<=90||o===95||o>=97&&o<=122||o>=192&&o<=214||o>=216&&o<=246||o>=248&&o<=767||o>=880&&o<=893||o>=895&&o<=8191||o>=8204&&o<=8205||o>=8304&&o<=8591||o>=11264&&o<=12271||o>=12289&&o<=55295||o>=63744&&o<=64975||o>=65008&&o<=65533||o>=65536&&o<=983039}Object.defineProperty(b,"__esModule",{value:!0}),b.NC_NAME_START_CHAR="A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u{10000}-\u{EFFFF}",b.NC_NAME_CHAR="-"+b.NC_NAME_START_CHAR+".0-9\xB7\u0300-\u036F\u203F-\u2040",b.NC_NAME_START_CHAR_RE=new RegExp("^["+b.NC_NAME_START_CHAR+"]$","u"),b.NC_NAME_CHAR_RE=new RegExp("^["+b.NC_NAME_CHAR+"]$","u"),b.NC_NAME_RE=new RegExp("^["+b.NC_NAME_START_CHAR+"]["+b.NC_NAME_CHAR+"]*$","u"),b.isNCNameStartChar=l,b.isNCNameChar=function(o){return l(o)||o===45||o===46||o>=48&&o<=57||o===183||o>=768&&o<=879||o>=8255&&o<=8256}},{}]},{},[15])(15)}))});var Zf="waiting",a7="replied";var fo={basis:"count",default_capacity:0,by_account:{}};function c7(e){let d=e&&typeof e=="object"&&!Array.isArray(e)?e:{},b=d.basis==="points"?"points":"count",l=Math.max(0,Math.floor(Number(d.default_capacity)||0)),o={},s=d.by_account&&typeof d.by_account=="object"?d.by_account:{};for(let[r,t]of Object.entries(s)){let n=Number(r)||0,c=Math.max(0,Math.floor(Number(t)||0));n>0&&c>0&&(o[n]=c)}return{basis:b,default_capacity:l,by_account:o}}import{createContext as wg,useContext as _g,useMemo as Qf}from"react";import{Box as kg}from"@mui/material";var yc="--app-mobile-font-offset";function Ir(e,d=0){return`calc(${e}px + max(0px, var(${yc}, 0px) - ${d}px))`}import{jsx as Jf}from"react/jsx-runtime";var ed=wg({});function Sg({config:e,children:d}){let b=Qf(()=>e??{},[e]),l=b.mobileFontOffsetPx;return Jf(ed.Provider,{value:b,children:l===void 0?d:Jf(kg,{sx:{display:"contents",[yc]:`${l}px`},children:d})})}function $t(){return _g(ed)}function ks(){let{buildFileUrl:e}=$t();return Qf(()=>e||((d,b)=>{let l=[];return b?.thumb&&l.push(`thumb=${b.thumb}`),b?.download&&l.push("download=1"),`/api/v1/files/${d}${l.length?`?${l.join("&")}`:""}`}),[e])}function Ss(){let{uploadMaxMb:e}=$t();return e??50}import{useGlobalForm as ly}from"@ehfuse/forma";import td from"@mui/icons-material/DoNotDisturbAltOutlined";import rd from"@mui/icons-material/BookmarkBorderOutlined";import Tg from"@mui/icons-material/LabelOutlined";import Cg from"@mui/icons-material/FlagOutlined";import Bg from"@mui/icons-material/StarBorderOutlined";import Ig from"@mui/icons-material/FolderOutlined";import Eg from"@mui/icons-material/EventOutlined";import Mg from"@mui/icons-material/BuildOutlined";import Rg from"@mui/icons-material/LocalShippingOutlined";import Og from"@mui/icons-material/StorefrontOutlined";import Ag from"@mui/icons-material/GroupsOutlined";import Dg from"@mui/icons-material/LightbulbOutlined";import Pg from"@mui/icons-material/FavoriteBorderOutlined";import Ng from"@mui/icons-material/AssignmentOutlined";import Lg from"@mui/icons-material/HomeOutlined";import zg from"@mui/icons-material/WorkOutline";import jg from"@mui/icons-material/SchoolOutlined";import Fg from"@mui/icons-material/LocalHospitalOutlined";import qg from"@mui/icons-material/RestaurantOutlined";import $g from"@mui/icons-material/LocalFloristOutlined";import Hg from"@mui/icons-material/DirectionsCarOutlined";import Wg from"@mui/icons-material/CampaignOutlined";import Ug from"@mui/icons-material/SavingsOutlined";import Vg from"@mui/icons-material/Inventory2Outlined";import Kg from"@mui/icons-material/CleaningServicesOutlined";import nd from"@mui/icons-material/HandymanOutlined";import Gg from"@mui/icons-material/LocalPhoneOutlined";import Yg from"@mui/icons-material/EmailOutlined";import Xg from"@mui/icons-material/ShoppingCartOutlined";import Zg from"@mui/icons-material/BarChartOutlined";import Jg from"@mui/icons-material/PrintOutlined";import Qg from"@mui/icons-material/SecurityOutlined";import eb from"@mui/icons-material/AlarmOutlined";import tb from"@mui/icons-material/AttachFileOutlined";import rb from"@mui/icons-material/PhotoCameraOutlined";import nb from"@mui/icons-material/ImageOutlined";import ob from"@mui/icons-material/MenuBookOutlined";import ib from"@mui/icons-material/EditOutlined";import sb from"@mui/icons-material/KeyOutlined";import ab from"@mui/icons-material/LockOutlined";import lb from"@mui/icons-material/LockOpenOutlined";import cb from"@mui/icons-material/SettingsOutlined";import ub from"@mui/icons-material/CloudOutlined";import fb from"@mui/icons-material/WifiOutlined";import db from"@mui/icons-material/ComputerOutlined";import hb from"@mui/icons-material/SmartphoneOutlined";import pb from"@mui/icons-material/TvOutlined";import mb from"@mui/icons-material/AccessTimeOutlined";import gb from"@mui/icons-material/TimerOutlined";import bb from"@mui/icons-material/MapOutlined";import yb from"@mui/icons-material/PlaceOutlined";import xb from"@mui/icons-material/NavigationOutlined";import vb from"@mui/icons-material/FlightOutlined";import wb from"@mui/icons-material/TrainOutlined";import _b from"@mui/icons-material/DirectionsBusOutlined";import kb from"@mui/icons-material/DirectionsBikeOutlined";import Sb from"@mui/icons-material/DirectionsWalkOutlined";import Tb from"@mui/icons-material/DirectionsRunOutlined";import Cb from"@mui/icons-material/FitnessCenterOutlined";import Bb from"@mui/icons-material/SportsSoccerOutlined";import Ib from"@mui/icons-material/EmojiEventsOutlined";import Eb from"@mui/icons-material/CardGiftcardOutlined";import Mb from"@mui/icons-material/CakeOutlined";import od from"@mui/icons-material/CoffeeOutlined";import Rb from"@mui/icons-material/LocalPizzaOutlined";import Ob from"@mui/icons-material/ShoppingBagOutlined";import id from"@mui/icons-material/CreditCardOutlined";import Ab from"@mui/icons-material/AccountBalanceOutlined";import Db from"@mui/icons-material/AccountBalanceWalletOutlined";import Pb from"@mui/icons-material/AttachMoneyOutlined";import Nb from"@mui/icons-material/ReceiptLongOutlined";import Lb from"@mui/icons-material/CalculateOutlined";import zb from"@mui/icons-material/TrendingUpOutlined";import jb from"@mui/icons-material/ListAltOutlined";import Fb from"@mui/icons-material/TaskAltOutlined";import qb from"@mui/icons-material/DoneAllOutlined";import $b from"@mui/icons-material/WarningAmberOutlined";import Hb from"@mui/icons-material/InfoOutlined";import Wb from"@mui/icons-material/HelpOutlined";import Ub from"@mui/icons-material/SupportAgentOutlined";import Vb from"@mui/icons-material/PersonOutlined";import Kb from"@mui/icons-material/PersonAddOutlined";import Gb from"@mui/icons-material/BadgeOutlined";import Yb from"@mui/icons-material/WbSunnyOutlined";import Xb from"@mui/icons-material/DarkModeOutlined";import Zb from"@mui/icons-material/LocalFireDepartmentOutlined";import Jb from"@mui/icons-material/WaterDropOutlined";import Qb from"@mui/icons-material/BoltOutlined";import e1 from"@mui/icons-material/AutorenewOutlined";import t1 from"@mui/icons-material/ScienceOutlined";import r1 from"@mui/icons-material/MedicalServicesOutlined";import n1 from"@mui/icons-material/NotificationsOutlined";import o1 from"@mui/icons-material/SendOutlined";import i1 from"@mui/icons-material/LinkOutlined";import s1 from"@mui/icons-material/PublicOutlined";import sd from"@mui/icons-material/ApartmentOutlined";import a1 from"@mui/icons-material/PlumbingOutlined";import l1 from"@mui/icons-material/ElectricalServicesOutlined";import c1 from"@mui/icons-material/ChatOutlined";import u1 from"@mui/icons-material/DescriptionOutlined";import f1 from"@mui/icons-material/FactCheckOutlined";import d1 from"@mui/icons-material/RocketLaunchOutlined";import h1 from"@mui/icons-material/PaletteOutlined";import p1 from"@mui/icons-material/MusicNoteOutlined";import m1 from"@mui/icons-material/VideocamOutlined";import g1 from"@mui/icons-material/ThumbUpOutlined";import b1 from"@mui/icons-material/PushPinOutlined";import y1 from"@mui/icons-material/SearchOutlined";import x1 from"@mui/icons-material/VisibilityOutlined";import v1 from"@mui/icons-material/VerifiedOutlined";import w1 from"@mui/icons-material/TrackChangesOutlined";import _1 from"@mui/icons-material/ExtensionOutlined";import k1 from"@mui/icons-material/CodeOutlined";import S1 from"@mui/icons-material/BugReportOutlined";import T1 from"@mui/icons-material/SmartToyOutlined";import C1 from"@mui/icons-material/StorageOutlined";import B1 from"@mui/icons-material/QrCode2Outlined";import I1 from"@mui/icons-material/FileDownloadOutlined";import E1 from"@mui/icons-material/FileUploadOutlined";import M1 from"@mui/icons-material/MicOutlined";import R1 from"@mui/icons-material/HeadphonesOutlined";import O1 from"@mui/icons-material/MovieOutlined";import A1 from"@mui/icons-material/SportsEsportsOutlined";import D1 from"@mui/icons-material/BrushOutlined";import P1 from"@mui/icons-material/ArchitectureOutlined";import N1 from"@mui/icons-material/EngineeringOutlined";import L1 from"@mui/icons-material/FactoryOutlined";import z1 from"@mui/icons-material/AgricultureOutlined";import j1 from"@mui/icons-material/DirectionsBoatOutlined";import F1 from"@mui/icons-material/TwoWheelerOutlined";import q1 from"@mui/icons-material/HandshakeOutlined";import $1 from"@mui/icons-material/GavelOutlined";import H1 from"@mui/icons-material/BalanceOutlined";import W1 from"@mui/icons-material/TranslateOutlined";import U1 from"@mui/icons-material/PsychologyOutlined";import V1 from"@mui/icons-material/PetsOutlined";import K1 from"@mui/icons-material/CelebrationOutlined";import G1 from"@mui/icons-material/BeachAccessOutlined";import Y1 from"@mui/icons-material/AcUnitOutlined";import X1 from"@mui/icons-material/ForestOutlined";import Z1 from"@mui/icons-material/LandscapeOutlined";import J1 from"@mui/icons-material/HotelOutlined";import Q1 from"@mui/icons-material/LocalLaundryServiceOutlined";import ey from"@mui/icons-material/ChairOutlined";import ty from"@mui/icons-material/LocalBarOutlined";import ry from"@mui/icons-material/LunchDiningOutlined";import ny from"@mui/icons-material/IcecreamOutlined";import oy from"@mui/icons-material/WorkspacePremiumOutlined";import iy from"@mui/icons-material/DiamondOutlined";import sy from"@mui/icons-material/VaccinesOutlined";var xc="bookmark",ho="label",ir="notifications",cr="event",Ts="warning",Cs="#e53e3e",ad="none",vc=[{key:ad,Icon:td},{key:"label",Icon:Tg},{key:"bookmark",Icon:rd},{key:"flag",Icon:Cg},{key:"star",Icon:Bg},{key:"folder",Icon:Ig},{key:"event",Icon:Eg},{key:"build",Icon:Mg},{key:"shipping",Icon:Rg},{key:"store",Icon:Og},{key:"groups",Icon:Ag},{key:"idea",Icon:Dg},{key:"heart",Icon:Pg},{key:"assignment",Icon:Ng},{key:"home",Icon:Lg},{key:"work",Icon:zg},{key:"school",Icon:jg},{key:"hospital",Icon:Fg},{key:"restaurant",Icon:qg},{key:"flower",Icon:$g},{key:"car",Icon:Hg},{key:"campaign",Icon:Wg},{key:"savings",Icon:Ug},{key:"inventory",Icon:Vg},{key:"cleaning",Icon:Kg},{key:"handyman",Icon:nd},{key:"phone",Icon:Gg},{key:"email",Icon:Yg},{key:"cart",Icon:Xg},{key:"chart",Icon:Zg},{key:"print",Icon:Jg},{key:"security",Icon:Qg},{key:"alarm",Icon:eb},{key:"attach",Icon:tb},{key:"camera",Icon:rb},{key:"image",Icon:nb},{key:"book",Icon:ob},{key:"edit",Icon:ib},{key:"key",Icon:sb},{key:"lock",Icon:ab},{key:"unlock",Icon:lb},{key:"settings",Icon:cb},{key:"cloud",Icon:ub},{key:"wifi",Icon:fb},{key:"computer",Icon:db},{key:"smartphone",Icon:hb},{key:"tv",Icon:pb},{key:"clock",Icon:mb},{key:"timer",Icon:gb},{key:"map",Icon:bb},{key:"place",Icon:yb},{key:"navigation",Icon:xb},{key:"flight",Icon:vb},{key:"train",Icon:wb},{key:"bus",Icon:_b},{key:"bike",Icon:kb},{key:"walk",Icon:Sb},{key:"run",Icon:Tb},{key:"fitness",Icon:Cb},{key:"soccer",Icon:Bb},{key:"trophy",Icon:Ib},{key:"gift",Icon:Eb},{key:"cake",Icon:Mb},{key:"coffee",Icon:od},{key:"pizza",Icon:Rb},{key:"bag",Icon:Ob},{key:"card",Icon:id},{key:"bank",Icon:Ab},{key:"wallet",Icon:Db},{key:"money",Icon:Pb},{key:"receipt",Icon:Nb},{key:"calculate",Icon:Lb},{key:"trending",Icon:zb},{key:"listalt",Icon:jb},{key:"task",Icon:Fb},{key:"doneall",Icon:qb},{key:"warning",Icon:$b},{key:"info",Icon:Hb},{key:"help",Icon:Wb},{key:"support",Icon:Ub},{key:"person",Icon:Vb},{key:"personadd",Icon:Kb},{key:"badge",Icon:Gb},{key:"sun",Icon:Yb},{key:"moon",Icon:Xb},{key:"fire",Icon:Zb},{key:"water",Icon:Jb},{key:"bolt",Icon:Qb},{key:"renew",Icon:e1},{key:"science",Icon:t1},{key:"medical",Icon:r1},{key:"notifications",Icon:n1},{key:"send",Icon:o1},{key:"link",Icon:i1},{key:"public",Icon:s1},{key:"apartment",Icon:sd},{key:"plumbing",Icon:a1},{key:"electrical",Icon:l1},{key:"chat",Icon:c1},{key:"description",Icon:u1},{key:"factcheck",Icon:f1},{key:"rocket",Icon:d1},{key:"palette",Icon:h1},{key:"music",Icon:p1},{key:"video",Icon:m1},{key:"thumbup",Icon:g1},{key:"pin",Icon:b1},{key:"search",Icon:y1},{key:"eye",Icon:x1},{key:"verified",Icon:v1},{key:"target",Icon:w1},{key:"extension",Icon:_1},{key:"code",Icon:k1},{key:"bug",Icon:S1},{key:"robot",Icon:T1},{key:"storage",Icon:C1},{key:"qrcode",Icon:B1},{key:"download",Icon:I1},{key:"upload",Icon:E1},{key:"mic",Icon:M1},{key:"headphones",Icon:R1},{key:"movie",Icon:O1},{key:"game",Icon:A1},{key:"brush",Icon:D1},{key:"architecture",Icon:P1},{key:"engineering",Icon:N1},{key:"factory",Icon:L1},{key:"agriculture",Icon:z1},{key:"boat",Icon:j1},{key:"motorcycle",Icon:F1},{key:"handshake",Icon:q1},{key:"gavel",Icon:$1},{key:"balance",Icon:H1},{key:"translate",Icon:W1},{key:"psychology",Icon:U1},{key:"pets",Icon:V1},{key:"celebration",Icon:K1},{key:"beach",Icon:G1},{key:"snow",Icon:Y1},{key:"forest",Icon:X1},{key:"mountain",Icon:Z1},{key:"hotel",Icon:J1},{key:"laundry",Icon:Q1},{key:"chair",Icon:ey},{key:"bar",Icon:ty},{key:"burger",Icon:ry},{key:"icecream",Icon:ny},{key:"medal",Icon:oy},{key:"diamond",Icon:iy},{key:"vaccine",Icon:sy}],ay={cafe:od,payment:id,business:sd,construction:nd};function Tt(e){return e===ad?null:vc.find(d=>d.key===e)?.Icon??ay[String(e??"")]??rd}function iB(e){return Tt(e)??td}var wc={title:"",icon:ho,icon_color:"",manager_name:"",manager_account_seq:0,receiver_names:[],receiver_account_seqs:[],is_notice:!1,is_event:!1,is_bug:!1,visibility:"involved",visibility_group_seq:0,repeat_rule:"",repeat_until:"",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:"",reminders:[],priority:"medium",label_keys:[],note:"",content:"",checklist:[],tab_key:""},_c={createAttachmentFiles:[],createSubmitting:!1,attachmentUpload:null};function cy(e){let{formId:d="taskbox-create-form",initialValues:b,onValidate:l,onSubmit:o}=e;return ly({formId:d,initialValues:{...wc,...b},onValidate:l,onSubmit:o})}import{useGlobalFormaState as uy}from"@ehfuse/forma";var ld="taskbox-ui-state";function po(){return uy({stateId:ld,initialValues:_c})}import{useMemo as fy}from"react";import{useTheme as dy}from"@mui/material";function Ri(e,d){let b=Math.max(0,Math.min(1,d));if(b<=0)return"transparent";let l=e.trim().replace("#",""),o=l.length===3?l.split("").map(n=>n+n).join(""):l;if(!/^[0-9a-fA-F]{6}$/.test(o))return e;let s=Number.parseInt(o.slice(0,2),16),r=Number.parseInt(o.slice(2,4),16),t=Number.parseInt(o.slice(4,6),16);return`rgba(${s}, ${r}, ${t}, ${b})`}function cd(e,d){let b=Math.max(0,Math.min(1,d)),l=e.trim().replace("#",""),o=l.length===3?l.split("").map(c=>c+c).join(""):l;if(!/^[0-9a-fA-F]{6}$/.test(o))return e;let s=c=>Math.round(c+(255-c)*b),r=s(Number.parseInt(o.slice(0,2),16)),t=s(Number.parseInt(o.slice(2,4),16)),n=s(Number.parseInt(o.slice(4,6),16));return`#${[r,t,n].map(c=>c.toString(16).padStart(2,"0")).join("")}`}function kc(e,d,b){return b==="dark"?{accent:e,accentContrast:d,accentSoft:"#1d2b45",accentOnSurface:"#b3d1ff",danger:"#f87171",dangerSoft:"#3a1f22",success:"#4ade80",warning:"#fbbf24",textStrong:"#ffffff",textPrimary:"#e2e8f0",textSecondary:"#a3adbb",textMuted:"#77808d",textInverse:"#0f1216",surface:"#161a1f",surfaceSubtle:"#1e232a",surfaceHover:"#272d36",surfaceHoverStrong:"#323a45",border:"#2c333c",borderStrong:"#3b434e"}:{accent:e,accentContrast:d,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:"#f8f8f7",surfaceHoverStrong:"#efefed",border:"#e6e6e3",borderStrong:"#dedddb"}}function hy(e,d){let b=d==="dark";return{bg:b?cd(e.accent,.45):e.accent,color:b?e.textInverse:e.accentContrast,border:"none",fontSize:11.5,fontWeight:600,minWidth:20,width:34,borderRadius:999,paddingX:.6,paddingY:.4}}function ud(e,d){return{...e,...d??{}}}function Na(e,d="light"){let b=d==="dark",l=hy(e,d),o=e.accentOnSurface;return{mode:d,colors:e,table:{bg:e.surface,borderColor:e.borderStrong,headerBg:e.surface,headerColor:e.textSecondary,headerActiveColor:e.textStrong,headerFilteredColor:o,headerFontSize:13,rowBg:e.surface,rowColor:e.textPrimary,rowSubColor:e.textSecondary,rowTitleColor:e.textStrong,rowTitleFontWeight:d==="dark"?400:500,rowHoverBg:e.surfaceHover,rowBorderColor:e.border,cellHoverBg:e.surfaceHoverStrong,emptyColor:e.textMuted,groupHeader:{bg:e.surfaceSubtle,hoverBg:e.surfaceHover,borderColor:e.border,labelColor:d==="dark"?e.textStrong:e.textPrimary,labelFontSize:15.5,labelFontWeight:d==="dark"?400:700,minHeight:48,badge:{...l,borderRadius:4,width:34}}},board:{columnBg:d==="dark"?e.surfaceSubtle:e.surface,columnHeaderColor:e.textPrimary,columnHeaderFontSize:13.5,badge:{...l,borderRadius:4,width:34}},summary:{gaugeTrackColor:d==="dark"?e.borderStrong:"#ececea",gaugeBarColor:o,gaugeCompleteColor:e.success,gaugeHeight:6,numberColor:o,overdueColor:e.danger,textColor:e.textStrong},actionButton:{bg:"#2f80ed",color:"#ffffff",hoverBg:"#2470dd",bgImage:"linear-gradient(180deg, #5ba1f5 0%, #2f80ed 100%)",hoverBgImage:"linear-gradient(180deg, #4d95ee 0%, #2470dd 100%)"},tabs:{bg:d==="dark"?e.surfaceSubtle:e.surface,color:d==="dark"?e.textSecondary:e.textStrong,hoverBg:e.surfaceHover,borderColor:d==="dark"?e.border:e.borderStrong,selectedBg:d==="dark"?e.surfaceHover:e.textStrong,selectedColor:d==="dark"?e.textStrong:e.surface},calendar:{bg:e.surface,borderColor:b?"#3a434f":e.border,headerBg:e.surfaceSubtle,headerColor:e.textSecondary,cellBg:b?"#1a1e24":e.surface,dateBandBg:e.surface,otherMonthBg:b?"#1a1e24":e.surface,todayBg:e.accentSoft,hoverBg:e.surfaceHover,dateColor:e.textPrimary,holidayColor:e.danger},card:{bg:b?"#232a33":e.surface,borderColor:b?"#333c47":e.border,hoverBg:b?"#2b3441":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:d==="dark"?e.textStrong:e.accent,separatorColor:e.surface},chip:{borderRadius:.75,fontSize:13,fontWeight:500,plainColor:d==="dark"?e.textSecondary:"#57564f",plainDotColor:e.textMuted,darkBgAlpha:.15,darkTextSource:"dot"}}}function Sc(e,d){if(!d)return e;let b=d.mode??e.mode,o={...b===e.mode?e.colors:kc(e.colors.accent,e.colors.accentContrast,b),...d.colors??{}},s=Na(o,b),{groupHeader:r,...t}=d.table??{},{badge:n,...c}=d.board??{},{badge:i,...a}=r??{};return{mode:b,colors:o,table:{...s.table,...t,groupHeader:{...s.table.groupHeader,...a,badge:ud(s.table.groupHeader.badge,i)}},board:{...s.board,...c,badge:ud(s.board.badge,n)},summary:{...s.summary,...d.summary??{}},chip:{...s.chip,...d.chip??{}},actionButton:{...s.actionButton,...d.actionButton??{}},tabs:{...s.tabs,...d.tabs??{}},avatar:{...s.avatar,...d.avatar??{}},calendar:{...s.calendar,...d.calendar??{}},card:{...s.card,...d.card??{}},timeline:{...s.timeline,...d.timeline??{}}}}function py(e={}){let{mode:d="light",accent:b="#2563eb",accentContrast:l="#ffffff",input:o}=e;return Sc(Na(kc(b,l,d),d),o)}function at(){let e=dy(),{theme:d}=$t(),b=e.palette.primary.main,l=e.palette.primary.contrastText,o=e.palette.mode==="dark"?"dark":"light";return fy(()=>Sc(Na(kc(b,l,o),o),d),[b,l,o,d])}import{useCallback as Un,useEffect as Ps,useMemo as Vn,useRef as Zc,useState as Kn}from"react";import{Box as wr,Divider as u2,IconButton as f2,ListItemIcon as d2,Menu as Zd,MenuItem as il}from"@mui/material";import Jd from"@mui/icons-material/Add";import h2 from"@mui/icons-material/ArrowUpward";import p2 from"@mui/icons-material/ArrowDownward";import m2 from"@mui/icons-material/KeyboardArrowDown";import g2 from"@mui/icons-material/KeyboardArrowRight";import Jc from"@mui/icons-material/Check";import b2 from"@mui/icons-material/FilterList";import y2 from"@mui/icons-material/InboxOutlined";import{Virtuoso as x2}from"react-virtuoso";import v2 from"@ehfuse/overlay-scrollbar";import{Box as fd}from"@mui/material";import{jsx as gy,jsxs as by}from"react/jsx-runtime";var my={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 Fr({priority:e,small:d=!1,plain:b=!1}){let l=my[e],o=at(),s=o.mode==="dark",r=b||e==="low";return by(fd,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:d?.5:.75,px:r?0:d?.9:1.25,py:r?0:d?.25:.5,borderRadius:.75,fontSize:d?11.5:13,fontWeight:500,bgcolor:r?"transparent":s?Ri(l.dot,o.chip.darkBgAlpha):l.bgcolor,color:r?s?o.chip.plainColor:l.color:s?o.chip.darkTextSource==="fg"?l.color:l.dot:l.color,whiteSpace:"nowrap"},children:[gy(fd,{component:"span",sx:{width:d?6:8,height:d?6:8,borderRadius:"50%",bgcolor:l.dot}}),l.label]})}import{Divider as _y,Menu as ky,MenuItem as gd}from"@mui/material";import Sy from"@mui/icons-material/Check";function qn(){return{}}var Tc=[{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"}],Cc=[{key:"desktop",name:"\uB370\uC2A4\uD06C\uD1B1"},{key:"tablet",name:"\uD0DC\uBE14\uB9BF"},{key:"mobile",name:"\uD734\uB300\uD3F0"}],Bc=[{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 dd(e){return Tc.find(d=>d.key===e)?.name??""}function hd(e){return Cc.find(d=>d.key===e)?.name??""}function La(e){return Bc.find(d=>d.key===e)?.name??""}function Ic(e,d=new Date){if(!e.is_event)return!1;let b=String(e.due_date??"").trim().slice(0,10);if(!/^\d{4}-\d{2}-\d{2}$/.test(b))return!1;let l=String(e.event_time??"").trim();if(/^\d{2}:\d{2}$/.test(l)){let s=new Date(`${b}T${l}:00`);return!Number.isNaN(s.getTime())&&s.getTime()<=d.getTime()}let o=new Date(`${b}T00:00:00`);return Number.isNaN(o.getTime())?!1:(o.setDate(o.getDate()+1),o.getTime()<=d.getTime())}function za(e,d=new Date){return e.is_event?Ic(e,d):!!e.completed}var cn=[{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:"review_waiting",name:"\uAC80\uD1A0\uB300\uAE30",bg:"#ede9fe",fg:"#5b3fa8",dot:"#8b5cf6"},{key:"hold",name:"\uBCF4\uB958",bg:"#fbeee0",fg:"#8a5a2b",dot:"#d9730d"}],Es=cn;function ja(e){return cn.find(d=>d.key===e)??cn[0]}var Bs={key:"completed",name:"\uC644\uB8CC",bg:"#e3eefb",fg:"#1d4f91",dot:"#2f80ed"};function ur(e){if(e.is_notice)return pd(e.status);if(e.is_bug&&e.completed){let d=La(e.resolution)||"\uC644\uB8CC";return{...Bs,name:d}}return e.completed&&e.status!=="hold"?Bs:e.is_bug?xy(e.status):ja(e.status)}var yy={key:"event_ended",name:"\uC885\uB8CC",bg:"#efefed",fg:"#57564f",dot:"#9a9a97"};function Ms(e){return Ic(e)?yy:null}var Is=[{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 pd(e){return Is.find(d=>d.key===e)??Is[1]}var Ec="__closed__",ai=[{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"}],AB=[...ai.filter(e=>e.key!=="bug_hold"),{key:Ec,name:"\uC644\uB8CC",bg:"#e3eefb",fg:"#1d4f91",dot:"#2f80ed"},...ai.filter(e=>e.key==="bug_hold")];function xy(e){return ai.find(d=>d.key===e)??ai[0]}function Fa(e){return e.is_notice?Is:e.is_bug?ai:Es}function DB(e){return e.status===Zf}var vy={in_progress:0,not_started:2,hold:3};function PB(e){return e.completed?9:vy[String(e.status??"")]??2}function Oi(e,d){let b=new Map(d.map(o=>[o.key,o])),l=(e.label_keys??[]).map(o=>b.get(o)).filter(o=>!!o);if(e.is_event){let o=Ms({is_event:!0,due_date:String(e.due_date??""),event_time:e.event_time});return o?[o,...l]:l}return e.is_notice?String(e.status??"")==="notice_active"?l:[pd(e.status),...l]:e.is_bug?[ur({...e,is_notice:!1}),...l]:e.completed?[Bs,...l]:[ja(e.status),...l]}function md(e){return{bg:`${e}1f`,fg:e,dot:e}}function qa(e,d){return e.includes(d)?e.filter(b=>b!==d):[...e,d]}import{Box as $a}from"@mui/material";import{jsx as Rs,jsxs as wy}from"react/jsx-runtime";function At({option:e,small:d=!1}){let b=at(),l=b.mode==="dark",o=e.key==="not_started";return wy($a,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:d?.5:.75,...o?{pr:d?.5:.75}:{px:d?.9:1.25},py:o?0:d?.25:.5,borderRadius:1.25,fontSize:d?11.5:13,fontWeight:500,bgcolor:o?"transparent":l?Ri(e.dot,b.chip.darkBgAlpha):e.bg,color:o?l?b.chip.plainColor:e.fg:l?b.chip.darkTextSource==="fg"?e.fg:e.dot:e.fg,whiteSpace:"nowrap"},children:[Rs($a,{component:"span",sx:{width:d?6:8,height:d?6:8,borderRadius:"50%",bgcolor:e.dot,flexShrink:0}}),e.name]})}function qB({task:e,statusOptions:d,small:b=!1}){let l=Oi(e,d);return l.length===0?null:Rs($a,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:.5},children:l.map(o=>Rs(At,{option:o,small:b},o.key))})}function qo({labelKeys:e,labelOptions:d}){let b=new Map(d.map(o=>[o.key,o])),l=e.map(o=>b.get(o)).filter(o=>!!o);return l.length===0?null:Rs($a,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:.5},children:l.map(o=>Rs(At,{option:o,small:!0},o.key))})}import{jsx as Os,jsxs as bd}from"react/jsx-runtime";function Ai({anchorEl:e,value:d,options:b=cn,onSelect:l,onComplete:o,onClose:s}){let r=qn();return bd(ky,{anchorEl:e,open:!!e,onClose:s,transitionDuration:0,...r,children:[b.map(t=>bd(gd,{onClick:()=>{l(t.key),s()},sx:{fontSize:14,minWidth:150,gap:1},children:[Os(At,{option:t}),d===t.key?Os(Sy,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},t.key)),o?[Os(_y,{sx:{my:.5}},"complete-divider"),Os(gd,{onClick:()=>{o(),s()},sx:{fontSize:14,minWidth:150,gap:1},children:Os(At,{option:Bs})},"complete")]:null]})}function Mc(e){let d=String(e??"").trim().replace("T"," "),b=d.match(/^(\d{4})-(\d{2})-(\d{2})(?:[ ](\d{2}):(\d{2})(?::(\d{2}))?)?/);return b?new Date(Number(b[1]),Number(b[2])-1,Number(b[3]),Number(b[4]??0),Number(b[5]??0),Number(b[6]??0)):new Date(d)}function vr(e,d="YYYY-MM-DD"){let b=typeof e=="string"?Mc(e):e;if(!e||e===""||isNaN(b.getTime()))return"";let l=b.getFullYear(),o=(b.getMonth()+1).toString().padStart(2,"0"),s=b.getDate().toString().padStart(2,"0"),r=l.toString().slice(-2);switch(d){case"YYYY-MM-DD":return`${l}-${o}-${s}`;case"YY.MM.DD":return`${r}.${o}.${s}`;case"MM/DD/YYYY":return`${o}/${s}/${l}`;case"DD.MM.YYYY":return`${s}.${o}.${l}`;case"YYYYMMDD":return`${l}${o}${s}`;default:return d.replace(/YYYY/g,l.toString()).replace(/YY/g,r).replace(/MM/g,o).replace(/DD/g,s)}}function yd(){return vr(new Date)}var Rc=[{value:"due",label:"\uADF8\uB8F9 : \uB9C8\uAC10\uC608\uC815"},{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"}],Ty="__notice__",Cy="__bug__",By="__support__";function Iy(e){let d=new Date(`${e}T00:00:00`);return d.setDate(d.getDate()+(6-d.getDay())),vr(d)}var Ey=[{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 My(e,d,b){let l=e.due_date.slice(0,10);return l?l<d?"overdue":l===d?"today":l<=b?"this_week":"later":"no_due"}function Ha(e,d,b,l=[],o=[],s="",r,t=!1){let n=e.filter(f=>f.is_notice);if(n.length>0){let f=Ha(e.filter(u=>!u.is_notice),d,b,l,o,s,r,t);return[{key:Ty,label:"\uACF5\uC9C0\uC0AC\uD56D",tasks:n},...f]}if(t){let f=e.filter(g=>g.is_bug),u=e.filter(g=>!g.is_bug&&g.is_support);if(f.length>0||u.length>0){let g=Ha(e.filter(m=>!m.is_bug&&!m.is_support),d,b,l,o,s,r,!1);return[...f.length>0?[{key:Cy,label:"\uC624\uB958",tasks:f}]:[],...u.length>0?[{key:By,label:"\uACE0\uAC1D\uC13C\uD130",tasks:u}]:[],...g]}}let c=new Map,i=(f,u)=>{let g=c.get(f);g?g.push(u):c.set(f,[u])},a;if(d==="due"){let f=Iy(b);for(let u of e)i(My(u,b,f),u);a=Ey}else if(d==="status"){for(let f of e)i(ja(f.status).key,f);a=cn.map(f=>({key:f.key,label:f.name}))}else if(d==="tab"){for(let f of e)i(f.tab_key?.trim()||"__none__",f);a=[...l.filter(f=>!f.archived).map(f=>({key:f.key,label:f.label})),{key:"__none__",label:"\uAE30\uBCF8 \uC5C5\uBB34\uD568"},...l.filter(f=>f.archived).map(f=>({key:f.key,label:`${f.label} (\uBCF4\uAD00\uB428)`}))]}else if(r?.enabled){let f=Number(r.myAccountSeq??0),u=s.trim();for(let g of e){if(g.is_event){i("__event__",g);continue}if(!(Number(g.manager_account_seq??0)>0||String(g.manager_name??"").trim()!=="")){i("__none__",g);continue}let v=f>0&&Number(g.manager_account_seq??0)===f||!!u&&String(g.manager_name??"").trim()===u;i(v?"__manager__":"__reference__",g)}a=[{key:"__manager__",label:"\uCC45\uC784\uC790"},{key:"__none__",label:"\uCC45\uC784\uC790 \uBBF8\uBC30\uC815"},{key:"__event__",label:"\uC77C\uC815"},{key:"__reference__",label:"\uCC38\uC870\uC790"}]}else{for(let v of e)i(v.is_event?"__event__":String(v.manager_name??"").trim()||"__none__",v);let f=s.trim(),u=[...c.keys()].filter(v=>v!=="__none__"&&v!=="__event__").sort((v,k)=>{if(f){if(v===f)return-1;if(k===f)return 1}return v.localeCompare(k)}),g=!!f&&u.includes(f),m=u.filter(v=>v!==f);a=[...g?[{key:f,label:"\uB0B4 \uC5C5\uBB34"}]:[],{key:"__none__",label:"\uCC45\uC784\uC790 \uBBF8\uBC30\uC815"},{key:"__event__",label:"\uC77C\uC815"},...m.map(v=>({key:v,label:v}))]}let h=[];for(let f of a){let u=c.get(f.key);!u||u.length===0||h.push({key:f.key,label:f.label,tasks:u})}return h}import Ry from"@mui/icons-material/LabelOutlined";import Oy from"@mui/icons-material/NotesOutlined";import Ay from"@mui/icons-material/AutorenewOutlined";import Dy from"@mui/icons-material/CalendarTodayOutlined";import Py from"@mui/icons-material/EventOutlined";import xd from"@mui/icons-material/PersonOutlineOutlined";import vd from"@mui/icons-material/PeopleAltOutlined";import Dc from"@mui/icons-material/CheckCircleOutlineOutlined";import Ny from"@mui/icons-material/FlagOutlined";import Pc from"@mui/icons-material/AccessTimeOutlined";import Ly from"@mui/icons-material/StickyNote2Outlined";import zy from"@mui/icons-material/ViewKanbanOutlined";import jy from"@mui/icons-material/ConfirmationNumberOutlined";import Fy from"@mui/icons-material/QuestionAnswerOutlined";import{jsx as fr}from"react/jsx-runtime";var wd={completed:"50px",ticket_no:"100px",title:"minmax(220px, 1.8fr)",status:"110px",start_date:"132px",due_date:"132px",manager_name:"110px",receiver_names:"170px",answerer_names:"110px",targets:"170px",priority:"84px",ack:"104px",confirm:"100px",project:"150px",request:"100px",deleted_time:"150px",completed_time:"150px",created_time:"132px",note:"minmax(140px, 0.7fr)",origin_license_name:"150px",support_type:"90px",author_name:"110px"};function _d(e){return Ua(e).map(d=>wd[d.id]).join(" ")}function kd(e){return Ua(e).reduce((d,b)=>{let l=wd[b.id]??"",o=/^(\d+)px$/.exec(l);if(o)return d+Number(o[1]);let s=/^minmax\((\d+)px/.exec(l);return s?d+Number(s[1]):d},0)}var qy={id:"deleted_time",label:"\uC0AD\uC81C\uC77C\uC2DC",icon:fr(Pc,{sx:{fontSize:15}}),align:"center",sortable:!0},$y={id:"completed_time",label:"\uC644\uB8CC\uC77C\uC2DC",icon:fr(Pc,{sx:{fontSize:15}}),align:"center",sortable:!0},Hy={id:"created_time",label:"\uC791\uC131\uC77C\uC2DC",icon:fr(Pc,{sx:{fontSize:15}}),align:"center",sortable:!0},Wy={id:"ticket_no",label:"\uD2F0\uCF13",icon:fr(jy,{sx:{fontSize:15}}),align:"center"},Uy={id:"support_type",label:"\uC885\uB958",icon:fr(Ry,{sx:{fontSize:15}}),align:"center"},Vy={id:"author_name",label:"\uC791\uC131\uC790",icon:fr(xd,{sx:{fontSize:15}}),align:"center",valueFilter:"author_name"},Ky={id:"answerer_names",label:"\uB2F5\uBCC0\uC790",icon:fr(Fy,{sx:{fontSize:15}}),align:"center",valueFilter:"answerer_names"},Gy={id:"project",label:"\uD504\uB85C\uC81D\uD2B8",icon:fr(zy,{sx:{fontSize:15}}),projectFilter:!0},Yy={id:"targets",label:"\uB300\uC0C1\uC790",icon:fr(vd,{sx:{fontSize:15}})},Ac={id:"priority",label:"\uC911\uC694\uB3C4",icon:fr(Ny,{sx:{fontSize:15}}),align:"center",priorityFilter:!0},Xy={id:"ack",label:"\uD655\uC778",icon:fr(Dc,{sx:{fontSize:15}}),align:"center",ackFilter:!0},Zy={id:"confirm",label:"\uD655\uC778",icon:fr(Dc,{sx:{fontSize:15}}),align:"center",ackFilter:!0};function Oc(e){let d=e.findIndex(l=>l.id==="receiver_names"||l.id==="targets"),b=d>=0?d+1:e.findIndex(l=>l.id==="note");return b<0?[...e,Ac]:[...e.slice(0,b),Ac,...e.slice(b)]}function Ua(e){let{showProject:d=!1,showManager:b=!0,showActions:l=!0,showRequest:o=!0,notice:s=!1,bug:r=!1,support:t=!1,centerManager:n=!1,trash:c=!1,confirmMode:i="none"}=e??{};if(t){let u=g=>Wa.find(m=>m.id===g);return[u("completed"),Uy,u("title"),u("status"),Hy,u("start_date"),u("due_date"),Vy,Ky,{...u("manager_name"),align:"center"},u("receiver_names"),Ac]}let a=u=>{if(!r)return u;let g=u.filter(k=>k.id!=="note"),m=g.findIndex(k=>k.id==="completed"),v=m>=0?m+1:0;return[...g.slice(0,v),Wy,...g.slice(v)]};if(s)return a(Oc(Wa.filter(u=>!["manager_name","receiver_names","request"].includes(u.id)).flatMap(u=>u.id==="due_date"?[u,Yy]:u.id==="note"?[Xy,u]:[u])));let h=b?Wa:Wa.filter(u=>u.id!=="manager_name");if(n&&(h=h.map(u=>u.id==="manager_name"?{...u,align:"center"}:u)),l)o||(h=h.filter(u=>u.id!=="request"));else{h=h.filter(g=>g.id!=="request");let u=h.findIndex(g=>g.id==="note");h=[...h.slice(0,u),c?qy:$y,...h.slice(u)]}if(i==="action"){let u=h.findIndex(g=>g.id==="note");h=[...h.slice(0,u),Zy,...h.slice(u)]}if(!d)return a(Oc(h));let f=h.findIndex(u=>u.id==="receiver_names");return a(Oc([...h.slice(0,f+1),Gy,...h.slice(f+1)]))}var Wa=[{id:"completed",label:"\uC644\uB8CC",icon:null,align:"center"},{id:"title",label:"\uC81C\uBAA9",icon:fr(Oy,{sx:{fontSize:15}}),sortable:!0},{id:"status",label:"\uC0C1\uD0DC",icon:fr(Ay,{sx:{fontSize:15}}),align:"center",statusFilter:!0},{id:"start_date",label:"\uC2DC\uC791\uC77C\uC2DC",icon:fr(Dy,{sx:{fontSize:15}}),align:"center",sortable:!0},{id:"due_date",label:"\uB9C8\uAC10\uC608\uC815",icon:fr(Py,{sx:{fontSize:15}}),align:"center",sortable:!0},{id:"manager_name",label:"\uCC45\uC784\uC790",icon:fr(xd,{sx:{fontSize:15}}),memberFilter:"manager"},{id:"receiver_names",label:"\uCC38\uC870\uC790",icon:fr(vd,{sx:{fontSize:15}}),memberFilter:"receivers"},{id:"request",label:"\uD655\uC778",icon:fr(Dc,{sx:{fontSize:15}}),align:"center",ackFilter:!0},{id:"note",label:"\uBE44\uACE0",icon:fr(Ly,{sx:{fontSize:15}})}];import{Button as Sd,ClickAwayListener as ex,Dialog as tx,Paper as rx,Popper as nx,Typography as ox,Box as ix}from"@mui/material";import{useMediaQuery as Jy,useTheme as Qy}from"@mui/material";function Lt(){let{isMobile:e}=$t(),d=Qy(),b=Jy(d.breakpoints.up("lg"));return e!==void 0?e:!b}import{Fragment as ax,jsx as $o,jsxs as Cd}from"react/jsx-runtime";function Td(){if(typeof document>"u")return;let e=0,d=l=>{l.stopPropagation(),l.preventDefault(),b()},b=()=>{window.clearTimeout(e),document.removeEventListener("click",d,!0)};document.addEventListener("click",d,!0),e=window.setTimeout(b,350)}function sx({title:e,content:d,confirmText:b,cancelText:l,titleFontSize:o,actionFontSize:s,actionMinHeight:r,onCancel:t,onConfirm:n}){return Cd(ax,{children:[$o(ox,{component:"div",sx:{fontSize:o,fontWeight:700,color:"#0f172a",lineHeight:1.4},children:e}),d,Cd(ix,{sx:{display:"flex",gap:2,justifyContent:"flex-end"},children:[$o(Sd,{size:"medium",variant:"outlined",color:"inherit",onClick:()=>{Td(),t()},fullWidth:!0,sx:{fontSize:s,minHeight:r,fontWeight:700},children:l}),$o(Sd,{size:"medium",variant:"contained",color:"primary",onClick:()=>{Td(),n()},fullWidth:!0,sx:{fontSize:s,minHeight:r,fontWeight:700},children:b})]})]})}function kt({open:e,anchorEl:d,title:b="\uD655\uC778\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",content:l,confirmText:o="\uD655\uC778",cancelText:s="\uCDE8\uC18C",placement:r="top",minWidth:t=160,minHeight:n,titleFontSize:c=17,actionFontSize:i=16,actionMinHeight:a=44,zIndex:h=1300,onCancel:f,onConfirm:u}){let g=Lt(),m=$o(sx,{title:b,content:l,confirmText:o,cancelText:s,titleFontSize:c,actionFontSize:i,actionMinHeight:a,onCancel:f,onConfirm:u});return g?$o(tx,{open:e,onClose:f,sx:{zIndex:h},slotProps:{paper:{sx:{p:3,display:"flex",flexDirection:"column",gap:3,minWidth:260}}},children:m}):$o(nx,{open:e,anchorEl:d,placement:r,sx:{zIndex:h},children:$o(ex,{onClickAway:f,children:$o(rx,{elevation:4,sx:{p:3,display:"flex",flexDirection:"column",gap:3,minWidth:t,minHeight:n,justifyContent:n?"space-between":"flex-start"},onClick:v=>v.stopPropagation(),onMouseDown:v=>v.stopPropagation(),children:m})})})}import{memo as Ox}from"react";function En(e){let d=e.visibility;return d==="involved"||d==="group"||d==="all"?d:e.is_open?"all":"involved"}function Va(e,d,b=0){if(d<=0)return!1;if(e.is_notice){if((e.author_account_seq??0)===d)return!0;let s=(e.target_account_seqs??[]).filter(r=>r>0);return s.length===0||s.includes(d)}if((e.author_account_seq??0)===d||(e.manager_account_seq??0)===d||(e.receiver_account_seqs??[]).includes(d))return!0;let o=En(e);if(o==="all")return!0;if(o==="group"){let s=e.visibility_group_seq??0;return s>0&&b===s}return!1}function Bd(e){return e.is_notice||e.is_event||e.completed||e.archived||(e.manager_account_seq??0)!==0?!1:En(e)!=="involved"}function Ka(e,d){return d<=0||(e.author_account_seq??0)===d?!1:Bd(e)}function Ga(e,d){return d<=0||e.is_notice||e.is_event||e.completed||e.archived||(e.manager_account_seq??0)>0||(e.author_account_seq??0)===d||Bd(e)?!1:(e.receiver_account_seqs??[]).includes(d)}function Id(e){return!!e.is_bug&&(e.manager_account_seq??0)===0&&e.status==="bug_received"}function Ed(e){return(e.origin_license_seq??0)>0}function Md(e,d){if(d<=0)return!1;let b=(e.author_account_seq??0)===d;return e.is_notice?b:b||(e.manager_account_seq??0)===d}function mo(e,d){return d<=0?!1:Ed(e)?!0:e.is_notice?(e.author_account_seq??0)===d:(e.author_account_seq??0)===d||(e.manager_account_seq??0)===d||(e.receiver_account_seqs??[]).includes(d)}var SI=[119,121,141,143];function Ya(e,d){let b=String(e.origin_author_avatar??"").trim(),l=String(e.author_name||e.origin_author_name||e.created_by||"").trim();if(!b||!l||!Ed(e)||d?.get(l)===b)return d;let o=new Map(d??[]);return o.set(l,b),o}import{memo as wx,useEffect as _x,useRef as kx,useState as zd}from"react";import{Box as xt,Button as Sx,ButtonBase as Tx,Checkbox as Cx,Tooltip as Li}from"@mui/material";import Bx from"@mui/icons-material/PublicOutlined";import Ix from"@mui/icons-material/Group";import Ex from"@mui/icons-material/CheckCircle";import Mx from"@mui/icons-material/CheckCircleOutlineOutlined";import{useEffect as lx,useState as Rd}from"react";import{Avatar as Od,Box as cx}from"@mui/material";import ux from"@mui/icons-material/PersonOutlineOutlined";import{jsx as Xa}from"react/jsx-runtime";var Nc=new Set,Ad=e=>e.startsWith("data:")||e.startsWith("blob:");function fx(e){let d=e.trim();return d?([...d][0]??"").toUpperCase():""}function bn({src:e,name:d="",avatarSx:b,iconFontSize:l=40}){let[o,s]=Rd(()=>e?Ad(e)||Nc.has(e):!1),[r,t]=Rd(!1),n={position:"relative",overflow:"hidden",borderRadius:"15px"},c=b?[n,...Array.isArray(b)?b:[b]]:n;if(lx(()=>{t(!1),s(e?Ad(e)||Nc.has(e):!1)},[e]),!e||r){let i=fx(d);return Xa(Od,{sx:c,children:i?Xa(cx,{component:"span",sx:{fontSize:"inherit",fontWeight:600,lineHeight:1,userSelect:"none"},children:i}):Xa(ux,{sx:{fontSize:l}})})}return Xa(Od,{src:e,imgProps:{onLoad:()=>{Nc.add(e),s(!0)},onError:()=>t(!0),style:o?void 0:{opacity:0}},sx:c})}var dx=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Za=(e,d)=>{if(!d||!d.trim())return[{text:e,highlight:!1}];try{let b=dx(d.trim()),l=new RegExp(`(${b})`,"gi");return e.split(l).map(s=>s.toLowerCase()===d.trim().toLowerCase()?{text:s,highlight:!0}:{text:s,highlight:!1}).filter(s=>s.text)}catch{return[{text:e,highlight:!1}]}};var hx=["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"];function yn(e){let d=String(e??"").trim().slice(0,10);if(!/^\d{4}-\d{2}-\d{2}$/.test(d))return"";let b=new Date(`${d}T00:00:00`);return Number.isNaN(b.getTime())?"":`${d.slice(2).replaceAll("-",".")} (${hx[b.getDay()]})`}function Lc(e){let d=String(e??"").trim().slice(0,10);if(!/^\d{4}-\d{2}-\d{2}$/.test(d))return"";let b=Number(d.slice(5,7)),l=Number(d.slice(8,10));return!b||!l?"":`${b}\uC6D4 ${l}\uC77C`}function un(e){let d=String(e??"").trim(),[b,l=""]=d.split(" "),o=yn(b);return o?l?`${o} ${l.slice(0,5)}`:o:""}function Di(e,d){let b=(e.checklist??[]).filter(o=>!(d&&o.task_seq&&!d(Number(o.task_seq))));return b.length===0?"":`${b.filter(o=>o.checked).length}/${b.length}`}import{Box as Dd,Tooltip as px}from"@mui/material";import{jsx as Ja}from"react/jsx-runtime";var Pi=[{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 qr({names:e,size:d=22,ringFirst:b=!1,avatarSrcByName:l}){let o=at(),s=$t().avatarSrcByName,r=l??s;return Ja(Dd,{sx:{display:"flex",alignItems:"center"},children:e.map((t,n)=>Ja(px,{title:b&&n===0?`\uCC45\uC784\uC790 \xB7 ${t}`:t,arrow:!0,children:Ja(Dd,{sx:{ml:n===0?0:"-7px",zIndex:n,borderRadius:"50%",border:`2px solid ${o.avatar.separatorColor}`,display:"inline-flex",...o.avatar.sx},children:Ja(bn,{src:r?.get(t)??"",name:t,avatarSx:{width:d,height:d,fontSize:Math.round(d/2),borderRadius:"50%",...Pi[n%Pi.length]},iconFontSize:Math.round(d*.6)})})},`${t}-${n}`))})}import{Box as Pd,Button as Ld}from"@mui/material";import mx from"@mui/icons-material/CheckCircle";import{Fragment as yx,jsx as As,jsxs as Nd}from"react/jsx-runtime";function gx(e){let d=e.mode==="dark";return{minWidth:0,width:"100%",px:1,py:.25,gap:.5,fontSize:13,color:e.table.rowColor,borderColor:e.colors.borderStrong,background:d?e.colors.surfaceHover:"linear-gradient(180deg, #ffffff 0%, #f6f7f9 100%)",whiteSpace:"nowrap","&:hover":{background:d?e.colors.surfaceSubtle:"linear-gradient(180deg, #fcfcfd 0%, #f0f2f4 100%)",borderColor:e.colors.borderStrong}}}function bx(e){return{minWidth:0,px:1.25,py:.25,fontSize:13,whiteSpace:"nowrap",color:e.actionButton.color,backgroundColor:e.actionButton.bg,backgroundImage:e.actionButton.bgImage,boxShadow:"none","&:hover":{backgroundColor:e.actionButton.hoverBg,backgroundImage:e.actionButton.hoverBgImage,boxShadow:"none"},...e.actionButton.sx}}function $n({onClick:e,children:d,fullWidth:b=!1,sx:l}){let o=at();return As(Ld,{size:"small",variant:"contained",color:"inherit",fullWidth:b,sx:[bx(o),...Array.isArray(l)?l:l?[l]:[]],onClick:s=>{s.stopPropagation(),e(s)},children:d})}function Ni({canConfirm:e,count:d,total:b,myConfirmed:l=!1,onConfirm:o,onShowList:s}){let r=at(),t=gx(r);return e?As($n,{onClick:()=>o(),children:"\uD655\uC778"}):Nd(Ld,{size:"small",variant:"outlined",color:"inherit",sx:t,onClick:n=>{n.stopPropagation(),s(n.currentTarget)},children:[l?As(mx,{sx:{fontSize:16,color:"#2f80ed",flexShrink:0}}):null,As(Pd,{component:"span",sx:{flex:1,textAlign:"center",minWidth:0},children:b>0&&d>=b?"\uD655\uC778\uC644\uB8CC":Nd(yx,{children:[d,As(Pd,{component:"span",sx:{mx:.15},children:"/"}),b]})})]})}import{SvgIcon as xx}from"@mui/material";import{jsx as Qa,jsxs as vx}from"react/jsx-runtime";function Ho({sx:e,...d}){return vx(xx,{viewBox:"0 0 48 48",...d,sx:{fill:"none",...e},children:[Qa("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"}),Qa("circle",{cx:"23.91",cy:"21.46",r:"2.71",fill:"currentColor",stroke:"none"}),Qa("circle",{cx:"33.65",cy:"21.46",r:"2.71",fill:"currentColor",stroke:"none"}),Qa("circle",{cx:"14.18",cy:"21.46",r:"2.71",fill:"currentColor",stroke:"none"})]})}import{Fragment as Fc,jsx as Fe,jsxs as ji}from"react/jsx-runtime";function Ds(e){let d=String(e??"").trim();if(!d)return"-";let b=d.slice(2,10).replaceAll("-","."),l=d.slice(11,16);return/^\d{2}:\d{2}$/.test(l)?`${b} ${l}`:b}function Rx(e){let d=String(e.event_time??"").trim();return e.is_event&&/^\d{2}:\d{2}$/.test(d)?Ds(`${String(e.due_date??"").slice(0,10)} ${d}`):Ds(e.due_date)}function jc(e,d){let b=String(e??"").trim()||"-";return Za(b,d).map((l,o)=>Fe("span",{className:l.highlight?"font-semibold text-blue-600":void 0,children:l.text},`${l.text}-${o}`))}function zi({names:e,searchText:d,avatarSrcByName:b,emphasize:l=!1}){let o=e.filter(s=>s.trim());if(o.length===0)return null;if(o.length===1){let s=o[0]??"";return ji(Fc,{children:[Fe(bn,{src:b?.get(s)??"",name:s,avatarSx:{width:24,height:24,fontSize:12,borderRadius:"50%",...Pi[0]},iconFontSize:15}),Fe(xt,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...l?{fontWeight:500,color:"#2f80ed"}:{}},children:jc(s,d)})]})}return Fe(qr,{names:o,size:22,avatarSrcByName:b})}function jd({display:e,summary:d,searchText:b,avatarSrcByName:l}){if(!e||e.kind==="everyone")return Fe(xt,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:d||"\uBAA8\uB4E0 \uC9C1\uC6D0"});let{teamNames:o,individualNames:s}=e;if(o.length===0)return Fe(zi,{names:s,searchText:b,avatarSrcByName:l});let r=[...o,...s],t=r.join(", ");return r.length>2?Fe(Li,{title:t,arrow:!0,children:Fe(xt,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:`${r[0]}, ${r[1]} \uC678 ${r.length-2}\uBA85`})}):Fe(Li,{title:t,arrow:!0,children:ji(xt,{sx:{display:"flex",alignItems:"center",gap:.75,minWidth:0},children:[Fe(xt,{component:"span",sx:{flexShrink:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:o.join(", ")+(s.length>0?",":"")}),s.length>0?Fe(zi,{names:s,searchText:b,avatarSrcByName:l}):null]})})}function el(e){return e==="\uC624\uB958\uC81C\uBCF4"?"\uC624\uB958":e}function Fd(e){return e==="\uBB38\uC758"?{bg:"#e8f1fd",fg:"#2f80ed"}:e==="\uAC74\uC758\uC0AC\uD56D"?{bg:"#f1ecfe",fg:"#8b5cf6"}:e==="\uC624\uB958\uC81C\uBCF4"?{bg:"#fdecec",fg:"#e5484d"}:e==="\uC0C1\uB2F4\uC2E0\uCCAD"?{bg:"#e6f7ec",fg:"#1f8a4c"}:{bg:"#f1f1ef",fg:"#6f6f6c"}}function zc({label:e,bg:d,fg:b}){return Fe(xt,{component:"span",sx:{flexShrink:0,px:.75,fontSize:12,fontWeight:500,lineHeight:"20px",color:b,bgcolor:d,borderRadius:"4px",whiteSpace:"nowrap",maxWidth:140,overflow:"hidden",textOverflow:"ellipsis"},children:e})}var qd=wx(function({task:d,gridTemplate:b,statusOptions:l,avatarSrcByName:o,searchText:s,myAccountSeq:r=0,todayStr:t,showProject:n=!1,showManager:c=!0,showActions:i=!0,showRequest:a=!0,confirmMode:h="none",bugMode:f=!1,supportMode:u=!1,managerCentered:g=!1,trashMode:m=!1,dimCompleted:v=!0,confirmInfo:k,onConfirmTask:B,projectLabel:R="",projectIcon:L="",onProjectClick:A,onRequestToggleCompleted:P,onDateClick:N,onChangeNote:q,onMemberClick:j,onClaimClick:S,onVolunteerClick:T,onStatusClick:D,onOpenDetail:p,onTaskContextMenu:y,hideBottomBorder:x=!1,completeLocked:w=!1,unread:_=!1,notice:C=!1,noticeReadOnly:O=!1,readOnly:z=!1,onIconClick:$,lastColumnCentered:V=!1,noteLocked:M=!1,targetSummary:H="",targetDisplay:I,onArchiveTask:E,ackInfo:F,onAckConfirm:U,onAckListClick:Y,onPriorityClick:K}){let[W,X]=zd(!1),[J,G]=zd(""),te=kx(null);_x(()=>{if(!W)return;let ee=Se=>{let ge=te.current;ge&&(Se.target instanceof Node&&ge.contains(Se.target)||ge.blur())};return document.addEventListener("mousedown",ee,!0),document.addEventListener("touchstart",ee,!0),()=>{document.removeEventListener("mousedown",ee,!0),document.removeEventListener("touchstart",ee,!0)}},[W]);let Z=[d.manager_account_seq??0,...d.receiver_account_seqs??[]].some(ee=>ee>0&&ee!==(d.author_account_seq??0)),re=O||z,ie=r>0&&!d.is_notice&&!d.is_event&&(d.manager_account_seq??0)===r,se=re||!!d.is_notice,oe=at(),pe=!!S&&Ka(d,r),me=!!T&&Ga(d,r),ke=se&&!Id(d),Le=d.is_notice?Fe(Ni,{canConfirm:!!F?.canAck,count:F?.count??0,total:F?.total??0,myConfirmed:!!F?.acked,onConfirm:()=>U?.(d),onShowList:ee=>Y?.(d,ee)}):null,Te=!d.is_notice&&!d.completed&&!!d.due_date&&d.due_date.slice(0,10)<=t,Me=Di(d,$t().resolveTask),nt=Te?"#e5484d":oe.colors.textPrimary,we=Fe(xt,{className:"cell",onClick:re?void 0:ee=>N(d,"due_date",ee.currentTarget),sx:{justifyContent:"center",color:nt,fontWeight:500,whiteSpace:"nowrap",...re?{}:{cursor:"pointer","&:hover":{bgcolor:oe.table.cellHoverBg}}},children:d.due_date?Rx(d):null});return ji(xt,{onContextMenu:ee=>y(d,ee),sx:{display:"grid",gridTemplateColumns:b,minHeight:48,position:"relative",fontSize:15,bgcolor:oe.table.rowBg,color:oe.table.rowColor,borderBottom:x?"none":`1px solid ${oe.table.rowBorderColor}`,"&:hover":{bgcolor:oe.table.rowHoverBg},"& > .cell":{px:1,minWidth:0,display:"flex",alignItems:"center",borderRight:`1px solid ${oe.table.rowBorderColor}`},"& > .cell:first-of-type":{px:1.5},"& > .cell:last-of-type":{borderRight:"none",pr:2,...V?{pl:2}:{}}},children:[Fe(xt,{className:"cell",sx:{justifyContent:"center"},children:d.is_event?(()=>{let ee=Tt(d.icon||cr);if(!ee)return null;let Se=Fe(ee,{sx:{fontSize:19,color:d.icon_color||"#1e3a8a"}});return re||!$?Se:Fe(Li,{title:"\uC544\uC774\uCF58 \uBCC0\uACBD",arrow:!0,enterDelay:400,disableInteractive:!0,children:Fe(Tx,{onClick:ge=>{ge.stopPropagation(),$(d,ge.currentTarget)},sx:{p:.25,borderRadius:1,"&:hover":{bgcolor:oe.table.cellHoverBg}},children:Se})})})():!O&&!w&&!m?Fe(Li,{title:d.completed&&d.completed_by?`${d.completed_by} \xB7 ${un(d.completed_time)} \uC644\uB8CC`:d.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC",arrow:!0,enterDelay:300,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:Fe(Cx,{checked:d.completed,inputProps:{"aria-label":d.completed?`${d.title} \uC644\uB8CC \uD574\uC81C`:`${d.title} \uC644\uB8CC \uCC98\uB9AC`},icon:Fe(Mx,{sx:{fontSize:20,color:"#9a9a97",opacity:.45}}),checkedIcon:Fe(Ex,{sx:{fontSize:20,color:"#2f80ed"}}),onClick:ee=>ee.stopPropagation(),onChange:(ee,Se)=>P({anchorEl:ee.currentTarget,task:d,nextCompleted:Se}),sx:{p:.5}})}):null}),f?Fe(xt,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap",fontVariantNumeric:"tabular-nums",color:"#37352f"},children:d.ticket_no||"-"}):null,u?Fe(xt,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap"},children:d.support_type?(()=>{let ee=Fd(d.support_type);return Fe(zc,{label:el(d.support_type),bg:ee.bg,fg:ee.fg})})():"-"}):null,ji(xt,{className:"cell",onClick:()=>p(d),sx:{gap:1,pl:2,cursor:"pointer","&:hover":{bgcolor:oe.table.cellHoverBg}},children:[(()=>{if(!d.is_notice)return null;let ee=Tt(d.icon||ir);return ee?Fe(ee,{sx:{fontSize:18,flexShrink:0,color:d.icon_color||"#e5484d"}}):null})(),!u&&d.is_support&&d.support_type?(()=>{let ee=Fd(d.support_type);return Fe(zc,{label:el(d.support_type),bg:ee.bg,fg:ee.fg})})():null,f&&(d.origin_license_seq??0)>0&&d.origin_license_name?Fe(zc,{label:d.origin_license_name,bg:"#fdf0e6",fg:"#d9730d"}):null,(()=>{if(d.is_notice||u||d.is_support)return null;let ee=En(d);return ee==="involved"?null:Fe(Li,{title:ee==="all"?"\uC804\uCCB4\uACF5\uAC1C \u2014 \uBAA8\uB4E0 \uC9C1\uC6D0\uC774 \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4":"\uBD80\uC11C\uACF5\uAC1C \u2014 \uC9C0\uC815\uD55C \uBD80\uC11C\uC758 \uC9C1\uC6D0\uC774 \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4",arrow:!0,disableInteractive:!0,children:ee==="all"?Fe(Bx,{sx:{fontSize:15,flexShrink:0,color:"#2f80ed"}}):Fe(Ix,{sx:{fontSize:15,flexShrink:0,color:"#d9730d"}})})})(),Fe(xt,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:16,fontWeight:d.completed&&v?400:oe.table.rowTitleFontWeight,color:d.completed&&v?oe.colors.textMuted:oe.table.rowTitleColor,textDecoration:d.completed&&v?"line-through":"none"},children:jc(d.title,s)}),Me?Fe(xt,{component:"span",sx:{flexShrink:0,fontSize:12.5,color:oe.colors.textMuted,fontVariantNumeric:"tabular-nums"},children:Me}):null,(d.comment_count??d.comments?.length??0)>0?Fe(Ho,{sx:{fontSize:16,flexShrink:0,color:"#9a9a97"}}):null,Fe(xt,{sx:{flexShrink:0,display:"flex",alignItems:"center"},children:Fe(qo,{labelKeys:d.label_keys??[],labelOptions:l})}),_&&!d.completed?Fe(xt,{component:"span",sx:{flexShrink:0,px:.55,fontSize:10.5,fontWeight:700,lineHeight:1.6,color:"#fff",bgcolor:"#e5484d",borderRadius:"4px"},children:"N"}):null,za(d)&&!d.archived&&!re&&E?Fe(Sx,{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:ee=>{ee.stopPropagation(),E(d)},children:"\uBCF4\uAD00"}):null]}),(()=>{let ee=re||!!d.is_event||!!d.completed;return Fe(xt,{className:"cell",onClick:ee?void 0:Se=>D(d,Se.currentTarget),sx:{py:.5,justifyContent:"center",...ee?{}:{cursor:"pointer","&:hover":{bgcolor:oe.table.cellHoverBg}}},children:d.is_event?(()=>{let Se=Ms(d);return Se?Fe(At,{option:Se}):null})():Fe(At,{option:ur(d)})})})(),u?Fe(xt,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap",fontVariantNumeric:"tabular-nums"},children:Ds(d.created_time)}):null,Fe(xt,{className:"cell",onClick:re?void 0:ee=>N(d,"start_date",ee.currentTarget),sx:{justifyContent:"center",whiteSpace:"nowrap",...re?{}:{cursor:"pointer","&:hover":{bgcolor:oe.table.cellHoverBg}}},children:Ds(d.start_date)}),we,u?ji(Fc,{children:[Fe(Li,{title:d.origin_license_name||"",arrow:!0,placement:"top",disableInteractive:!0,slotProps:{transition:{timeout:0}},children:Fe(xt,{className:"cell",sx:{gap:.75,justifyContent:"center"},children:Fe(zi,{names:[d.author_name||d.origin_author_name||d.created_by||""],searchText:s,avatarSrcByName:Ya(d,o)})})}),Fe(xt,{className:"cell",sx:{gap:.75,justifyContent:"center"},children:Fe(zi,{names:(d.answerer_names??[]).slice(0,1),searchText:s,avatarSrcByName:o})})]}):null,C?Fe(xt,{className:"cell",onClick:re?void 0:()=>j(d,"targets"),sx:{gap:.75,...re?{}:{cursor:"pointer","&:hover":{bgcolor:oe.table.cellHoverBg}}},children:Fe(jd,{display:I,summary:H,searchText:s,avatarSrcByName:o})}):null,!C&&d.is_notice?Fe(xt,{className:"cell",onClick:re?void 0:()=>j(d,"targets"),sx:{gridColumn:c?"span 2":"auto",gap:.75,...re?{}:{cursor:"pointer","&:hover":{bgcolor:oe.table.cellHoverBg}}},children:Fe(jd,{display:I,summary:H,searchText:s,avatarSrcByName:o})}):null,!C&&!d.is_notice&&!d.is_event&&c?Fe(xt,{className:"cell",onClick:ke?void 0:()=>j(d,"manager"),sx:{gap:.75,...pe||me||g?{justifyContent:"center"}:{},...ke?{}:{cursor:"pointer","&:hover":{bgcolor:oe.table.cellHoverBg}}},children:pe?Fe($n,{onClick:ee=>S?.(d,ee.currentTarget),children:"\uAC00\uC838\uAC00\uAE30"}):me?Fe($n,{onClick:ee=>T?.(d,ee.currentTarget),children:"\uAC00\uC838\uAC00\uAE30"}):Fe(zi,{names:d.manager_name?[d.manager_name]:[],searchText:s,avatarSrcByName:o,emphasize:ie})}):null,!C&&!d.is_notice?Fe(xt,{className:"cell",onClick:se?void 0:()=>j(d,"receivers"),sx:{gridColumn:d.is_event&&c?"span 2":"auto",gap:.75,...se?{}:{cursor:"pointer","&:hover":{bgcolor:oe.table.cellHoverBg}}},children:Fe(zi,{names:d.receiver_names,searchText:s,avatarSrcByName:o})}):null,Fe(xt,{className:"cell",onClick:re?void 0:ee=>K?.(d,ee.currentTarget),sx:{py:.5,justifyContent:"center",...re?{}:{cursor:"pointer","&:hover":{bgcolor:oe.table.cellHoverBg}}},children:Fe(Fr,{priority:d.priority,plain:!0})}),n?Fe(xt,{className:"cell",onClick:re?void 0:ee=>A?.(d,ee.currentTarget),sx:{gap:.5,justifyContent:"flex-start",...re?{}:{cursor:"pointer","&:hover":{bgcolor:oe.table.cellHoverBg}}},children:R?ji(Fc,{children:[(()=>{let ee=Tt(L);return ee?Fe(ee,{sx:{fontSize:15,flexShrink:0,color:"#1e3a8a"}}):null})(),Fe(xt,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:R})]}):null}):null,C?Fe(xt,{className:"cell",sx:{justifyContent:"center"},children:Le}):null,!C&&i&&a&&!u?Fe(xt,{className:"cell",sx:{justifyContent:"center"},children:d.is_notice?Le:Z?Fe(Ni,{canConfirm:!!k?.canConfirm,count:k?.count??0,total:k?.total??0,myConfirmed:!!k?.myTime,onConfirm:()=>B?.(d),onShowList:ee=>Y?.(d,ee)}):null}):null,!C&&h==="action"?Fe(xt,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap",color:oe.table.rowSubColor},children:d.is_notice?Le:k&&k.total>0?Fe(Ni,{canConfirm:!!k.canConfirm,count:k.count,total:k.total,myConfirmed:!!k.myTime,onConfirm:()=>B?.(d),onShowList:ee=>Y?.(d,ee)}):"-"}):null,!C&&!i?Fe(xt,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap",color:m?oe.colors.danger:v?oe.table.rowSubColor:oe.table.rowTitleColor},children:m?Ds(d.deleted_time):d.completed_time||"-"}):null,f||u?null:Fe(xt,{className:"cell",onClick:()=>{!M&&!W&&(G(d.note),X(!0))},sx:{color:"#6f6f6c",cursor:M?"default":"text"},children:W?Fe(xt,{component:"input",ref:te,autoFocus:!0,spellCheck:!1,value:J,onChange:ee=>G(ee.target.value),onBlur:()=>{X(!1),J.trim()!==d.note&&q(d.seq,J)},onKeyDown:ee=>{ee.key==="Enter"&&ee.target.blur(),ee.key==="Escape"&&(G(d.note),X(!1))},sx:{flex:1,minWidth:0,width:"100%",border:"none",outline:"none",bgcolor:"transparent",font:"inherit",lineHeight:"inherit",letterSpacing:"inherit",color:oe.table.rowTitleColor,caretColor:oe.table.rowTitleColor,p:0,m:0}}):Fe(xt,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:d.note?jc(d.note,s):""})}),ie?Fe(xt,{component:"span",sx:{position:"absolute",left:3,top:6,bottom:6,width:3,bgcolor:"#2f80ed",borderRadius:1.5,pointerEvents:"none"}}):null]})});import{jsx as Ax}from"react/jsx-runtime";var $d=Ox(function(d){let l=(d.useTaskItem?d.useTaskItem(d.task.seq):void 0)??d.task,{myAccountSeq:o}=d,s=d.projectByKey.get(l.tab_key??"");return Ax(qd,{hideBottomBorder:d.hideBottomBorder,gridTemplate:d.gridTemplate,task:l,statusOptions:d.statusOptions,avatarSrcByName:d.avatarSrcByName,searchText:d.searchText,myAccountSeq:o,todayStr:d.todayStr,showProject:d.showProject,showManager:d.showManager,showActions:d.showActions,showRequest:d.showRequest,confirmMode:d.confirmMode,confirmInfo:l.is_notice?void 0:d.getConfirmInfo?.(l),onConfirmTask:d.onConfirmTask,projectLabel:s?.label??"",projectIcon:s?.icon??"",onProjectClick:d.onProjectClick,onRequestReply:d.onRequestReply,onRequestToggleCompleted:d.onRequestToggleCompleted,onDateClick:d.onDateClick,onChangeNote:d.onChangeNote,onMemberClick:d.onMemberClick,onClaimClick:d.onClaimClick,onVolunteerClick:d.onVolunteerClick,onStatusClick:d.onStatusClick,onOpenDetail:d.onOpenDetail,onTaskContextMenu:d.onTaskContextMenu,notice:d.notice,bugMode:d.bugMode,supportMode:d.supportMode,managerCentered:d.managerCentered,trashMode:d.trashMode,dimCompleted:d.dimCompleted,noticeReadOnly:!mo(l,o),readOnly:d.readOnly,noteLocked:d.readOnly||(l.is_notice?!Va(l,o):!mo(l,o)),completeLocked:l.is_event?!0:l.is_notice?(l.author_account_seq??0)!==o:(l.author_account_seq??0)!==o&&(l.manager_account_seq??0)!==o,targetSummary:l.is_notice?d.getTargetSummary?.(l):void 0,targetDisplay:l.is_notice?d.getTargetDisplay?.(l):void 0,onArchiveTask:d.onArchiveTask,unread:d.isTaskUnread?.(l)??!1,ackInfo:l.is_notice?d.getAckInfo?.(l):void 0,onAckConfirm:d.onAckConfirm,onAckListClick:d.onAckListClick,onPriorityClick:d.onPriorityClick,onIconClick:d.onIconClick,lastColumnCentered:d.lastColumnCentered})});import{useMemo as Hd,useState as $c}from"react";import{Box as li,Button as Wd,ButtonBase as Ud,Dialog as Nx,Divider as Hc,Menu as Lx,MenuItem as zx,Popover as jx}from"@mui/material";import Vd from"@mui/icons-material/ChevronRight";import Fx from"@mui/icons-material/Check";import qx from"@mui/icons-material/NotificationsActiveOutlined";import{SimpleCalendar as $x,TimePicker as Hx}from"@ehfuse/mui-datetime-picker";import Wx from"@mui/icons-material/TimerOutlined";import{useEffect as Dx,useState as Px}from"react";function Hn(e){let{loadHolidays:d}=$t(),[b,l]=Px(()=>new Map),o=e.join(",");return Dx(()=>{if(!d||!o){l(new Map);return}let s=!1;return d(o.split(",").map(Number)).then(r=>{if(s)return;let t=new Map;for(let n of r)t.has(n.date)||t.set(n.date,n.name);l(t)}).catch(()=>{}),()=>{s=!0}},[d,o]),b}var qc=["min30_before","hour1_before","hour2_before","same_day","day_before","two_days_before","three_days_before","week_before"];function Wn(e){let d=Array.isArray(e?.reminders)?e?.reminders:[e?.reminder],b=new Set;for(let l of d){let o=String(l??"").trim();qc.includes(o)&&b.add(o)}return qc.filter(l=>b.has(l))}function tl(e,d){if(d==="none")return[];let b=e.includes(d)?e.filter(l=>l!==d):[...e,d];return qc.filter(l=>b.includes(l))}import{Fragment as Kd,jsx as Rr,jsxs as Mn}from"react/jsx-runtime";var Ux=9,Vx=[{value:"min30_before",label:"30\uBD84 \uC804"},{value:"hour1_before",label:"1\uC2DC\uAC04 \uC804"},{value:"hour2_before",label:"2\uC2DC\uAC04 \uC804"}],Gd=[{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"}],Yd=[{value:"none",label:"\uC5C6\uC74C"},...Vx,...Gd];function Wc(e){return e?Yd:[{value:"none",label:"\uC5C6\uC74C"},...Gd]}function Kx(e){return e==="same_day"?"\uB2F9\uC77C":Yd.find(d=>d.value===e)?.label??"\uC5C6\uC74C"}function Uc(e){if(e.length===0)return"\uC5C6\uC74C";let d=e.map(b=>Kx(b));return d.length<=3?d.join(", "):`${d.slice(0,3).join(", ")} \uC678 ${d.length-3}`}function Gx(e){let d=e?new Date(`${e}T00:00:00`):new Date;return Number.isNaN(d.getTime())?new Date:d}function xn({anchorEl:e,open:d,date:b,reminders:l,hideReminder:o=!1,showTime:s=!1,centered:r=!1,onClose:t,onDateChange:n,onReminderChange:c}){let[i,a]=$c(null),[h,f]=$c(null),u=qn(),g=String(b??"").trim().slice(0,10),m=String(b??"").trim().slice(11,16),v=/^\d{2}:\d{2}$/.test(m)?m:"",k=(S,T)=>n(T?`${S} ${T}`:S),{defaultDueHour:B}=$t(),R=`${String(Number.isInteger(B)&&B>=0&&B<=23?B:Ux).padStart(2,"0")}:00`,[L,A]=$c(()=>{let S=Number(g.slice(0,4));return Number.isFinite(S)&&S>1900?S:new Date().getFullYear()}),P=Hd(()=>[L-1,L,L+1],[L]),N=Hn(P),q=Hd(()=>{let S=[];for(let T of N.keys()){let D=new Date(`${T}T00:00:00`);Number.isNaN(D.getTime())||S.push(D)}return S},[N]),j=Mn(li,{sx:{width:300,maxWidth:"100%"},children:[Rr(li,{sx:{height:320},children:Rr($x,{selectedDate:Gx(g),onSelect:S=>{k(vr(S),s?v||R:v),s||t()},onClose:t,showFooter:!1,autoApply:!0,holidays:q,onYearChange:S=>A(S),onMonthChange:(S,T)=>{typeof T=="number"&&A(T)}})}),s?Mn(Kd,{children:[Rr(Hc,{sx:{borderColor:"#e6e6e3"}}),Mn(Ud,{onClick:S=>f(S.currentTarget),sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",px:2,py:1.25,fontSize:14,"&:hover":{bgcolor:"#f8f8f7"}},children:[Mn(li,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:.75,color:"#37352f"},children:[Rr(Wx,{sx:{fontSize:17,color:"#9a9a97"}}),"\uC2DC\uAC01"]}),Mn(li,{component:"span",sx:{display:"inline-flex",alignItems:"center",color:"#37352f"},children:[v||"\uC5C6\uC74C",Rr(Vd,{sx:{fontSize:18,ml:.25,color:"#9a9a97"}})]})]}),Rr(Hx,{anchorEl:h,open:!!h,onClose:()=>f(null),centered:r,value:{hour:v.slice(0,2)||R.slice(0,2),minute:v.slice(3,5)||"00"},format:"HH:mm",minuteStep:5,autoApply:!0,locale:"ko",onChange:(S,T)=>{k(g||vr(new Date),`${S}:${T}`),f(null)}})]}):null,o?null:Mn(Kd,{children:[Rr(Hc,{sx:{borderColor:"#e6e6e3"}}),Mn(Ud,{onClick:S=>a(S.currentTarget),sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",px:2,py:1.25,fontSize:14,"&:hover":{bgcolor:"#f8f8f7"}},children:[Mn(li,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:.75,color:"#37352f"},children:[Rr(qx,{sx:{fontSize:17,color:"#9a9a97"}}),"\uC0AC\uC804\uC54C\uB9BC"]}),Mn(li,{component:"span",sx:{display:"inline-flex",alignItems:"center",color:"#37352f"},children:[Uc(l),Rr(Vd,{sx:{fontSize:18,ml:.25,color:"#9a9a97"}})]})]}),Rr(Lx,{transitionDuration:0,anchorEl:i,open:!!i,onClose:()=>a(null),anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},...u,children:Wc(!!v).map(S=>{let T=S.value==="none"?l.length===0:l.includes(S.value);return Mn(zx,{selected:T,onClick:()=>{c(tl(l,S.value)),S.value==="none"&&a(null)},sx:{fontSize:14,minWidth:140,justifyContent:"space-between",gap:1},children:[S.label,T?Rr(Fx,{sx:{fontSize:16,color:"#2f80ed"}}):null]},S.value)})})]}),Rr(Hc,{sx:{borderColor:"#e6e6e3"}}),Mn(li,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",px:1,py:.5},children:[Rr(Wd,{size:"small",onClick:()=>{k(vr(new Date),v),t()},sx:{minWidth:0,px:1.25,fontSize:13.5,color:"#2563eb"},children:"\uC624\uB298"}),Rr(Wd,{size:"small",onClick:t,sx:{minWidth:0,px:1.25,fontSize:13.5,color:"#2563eb"},children:"\uB2EB\uAE30"})]})]});return r?Rr(Nx,{open:d,onClose:t,slotProps:{paper:{sx:{borderRadius:3,width:300,maxWidth:"calc(100vw - 48px)",overflow:"hidden"}}},children:j}):Rr(jx,{transitionDuration:0,open:d,anchorEl:e,onClose:t,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:j})}import{useEffect as Zx,useState as Kc}from"react";import{Box as ci,Button as Jx,Switch as Qx}from"@mui/material";import{FormDialog as e2}from"@ehfuse/mui-form-dialog";import{ClearTextField as t2}from"@ehfuse/mui-form-controls";import{ErrorAlert as r2}from"@ehfuse/alerts";import{Box as Yx,ButtonBase as Xx}from"@mui/material";import{jsx as Vc}from"react/jsx-runtime";function rl({value:e,onChange:d}){return Vc(Yx,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(40px, 1fr))",gap:1},children:vc.map(({key:b,Icon:l})=>{let o=b===e;return Vc(Xx,{onClick:()=>d(b),sx:{display:"flex",alignItems:"center",justifyContent:"center",height:40,minWidth:40,borderRadius:1,border:o?"2px solid #2563eb":"1px solid #dedddb",bgcolor:o?"#eef4ff":"#fff",color:o?"#1e3a8a":"#787774","&:hover":{bgcolor:o?"#eef4ff":"#f4f4f2"}},children:Vc(l,{sx:{fontSize:20}})},b)})})}import{jsx as go,jsxs as Gc}from"react/jsx-runtime";function nl({open:e,title:d="\uC0C8 \uD504\uB85C\uC81D\uD2B8 \uCD94\uAC00",initialLabel:b="",initialIcon:l=xc,confirmText:o="\uCD94\uAC00",initialUseSprints:s=!1,onClose:r,onSubmit:t}){let[n,c]=Kc(""),[i,a]=Kc(xc),[h,f]=Kc(!1);Zx(()=>{e&&(c(b),a(l),f(s))},[e]);let u=()=>{let m=n.trim();if(!m){r2("\uD504\uB85C\uC81D\uD2B8 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}t(m,i,h),r()};return go(e2,{open:e,onClose:r,maxWidth:"xs",title:d,locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-add-tab",sections:[{id:"add-tab",showTitle:!1,children:Gc(ci,{children:[go(t2,{label:"\uD504\uB85C\uC81D\uD2B8 \uC774\uB984",value:n,onChange:m=>c(m.target.value),onKeyDown:m=>{m.key==="Enter"&&(m.preventDefault(),u())},fullWidth:!0,autoFocus:!0,sx:{mt:.5}}),go(ci,{sx:{mt:2,fontSize:13,color:"#787774"},children:"\uC544\uC774\uCF58"}),go(ci,{sx:{mt:1,maxHeight:264,overflowY:"auto",pr:.5},children:go(rl,{value:i,onChange:a})}),Gc(ci,{sx:{mt:2,display:"flex",alignItems:"center",justifyContent:"space-between",gap:1},children:[Gc(ci,{children:[go(ci,{sx:{fontSize:14,color:"#37352f"},children:"\uBAA9\uD45C(\uC2A4\uD504\uB9B0\uD2B8) \uC0AC\uC6A9"}),go(ci,{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)"})]}),go(Qx,{checked:h,onChange:(m,v)=>f(v)})]})]})}],actions:{showCancelButton:!0,right:go(Jx,{variant:"contained",onClick:u,children:o})}})}import{Box as n2}from"@mui/material";import{jsx as o2}from"react/jsx-runtime";function ol({size:e=40}){return o2(n2,{sx:{boxSizing:"border-box",width:e,height:e,borderRadius:"50%",border:"4px solid rgba(28, 64, 125, 0.14)",borderTopColor:"#1c407d",animation:"taskbox-content-loading-spin 0.75s linear infinite","@keyframes taskbox-content-loading-spin":{to:{transform:"rotate(360deg)"}}}})}import{Box as Yc,ButtonBase as i2,Divider as s2,Popover as a2}from"@mui/material";import l2 from"@mui/icons-material/Check";import c2 from"@ehfuse/overlay-scrollbar";import{jsx as ui,jsxs as Xd}from"react/jsx-runtime";var Xc=["#1e3a8a","#2f80ed","#06b6d4","#0fa3a3","#2f9e5b","#84cc16","#e8a33d","#d9730d","#e5484d","#e255a1","#a355c0","#8a5a2b","#57564f","#111827"];function Wo({anchorEl:e,value:d,color:b="",onSelect:l,onSelectColor:o,onClose:s}){return ui(a2,{transitionDuration:0,open:!!e,anchorEl:e,onClose:s,anchorOrigin:{vertical:"bottom",horizontal:"left"},marginThreshold:16,slotProps:{paper:{sx:{mt:1,maxHeight:"calc(100dvh - 96px)"}}},children:Xd(Yc,{sx:{width:"min(492px, calc(100vw - 32px))"},children:[ui(c2,{style:{maxHeight:"min(432px, calc(100dvh - 240px))"},contentStyle:{minWidth:0,padding:10},thumb:{width:6},children:ui(rl,{value:d||ho,onChange:r=>{l(r),s()}})}),o?Xd(Yc,{sx:{px:1.25,pb:1.25},children:[ui(s2,{sx:{mb:1,borderColor:"#efefed"}}),ui(Yc,{sx:{display:"grid",gridTemplateColumns:`repeat(${Xc.length}, 1fr)`,justifyItems:"center"},children:Xc.map(r=>{let t=(b||Xc[0])===r;return ui(i2,{"aria-label":`\uC544\uC774\uCF58 \uC0C9 ${r}`,onClick:()=>o(r),sx:{width:"100%",maxWidth:26,aspectRatio:"1 / 1",borderRadius:"50%",bgcolor:r,display:"flex",alignItems:"center",justifyContent:"center"},children:t?ui(l2,{sx:{fontSize:15,color:"#ffffff"}}):null},r)})})]}):null]})})}import{jsx as mt,jsxs as Rn}from"react/jsx-runtime";var Qd=48,w2=5;function eh({tasks:e,statusOptions:d,avatarSrcByName:b,searchText:l,todayStr:o,sortBy:s,sortDirection:r,onSort:t,onRequestReply:n,onToggleCompleted:c,onChangeTaskDate:i,onChangeTaskReminder:a,groupBy:h,collapsedGroupKeys:f,customTabs:u,onToggleGroup:g,hideCompleted:m=!1,loading:v=!1,dimCompleted:k=!0,readOnly:B=!1,onChangeTaskIcon:R,onChangeTaskIconColor:L,onAddInGroup:A,canAddInGroup:P,renderGroupSummary:N,renderGroupTitleSummary:q,onChangeTaskProject:j,onAddProject:S,onChangeNote:T,onMemberClick:D,onClaimTask:p,onChangeTaskStatus:y,onOpenDetail:x,onTaskContextMenu:w,onMemberFilterClick:_,activeMemberFilters:C=[],onStatusFilterClick:O,statusFilterActive:z=!1,onAckFilterClick:$,ackFilterActive:V=!1,onProjectFilterClick:M,projectFilterActive:H=!1,onPriorityFilterClick:I,priorityFilterActive:E=!1,onValueFilterClick:F,activeValueFilters:U=[],columns:Y,getConfirmInfo:K,onConfirmTask:W,myAccountSeq:X=0,currentUserName:J="",groupManagerByMyRole:G=!1,pinKindGroups:te=!1,allowManagerVolunteer:Z=!0,noticeAdmin:re=!1,getTargetSummary:ie,getTargetDisplay:se,onArchiveTask:oe,isTaskUnread:pe,getAckInfo:me,onAckConfirm:ke,onAckListClick:Le,onChangeTaskPriority:Te,onEndReached:Me,useTaskItem:nt}){let we=at(),ee=Vn(()=>({showManager:!0,showActions:!0,showRequest:!0,...Y}),[Y]),Se=ee.showManager??!0,ge=ee.showActions??!0,xe=ee.showRequest??!0,Ze=ee.confirmMode??"none",Pe=ee.notice??!1,He=ee.bug??!1,Qt=ee.support??!1,Ue=Qt||(ee.centerManager??!1),Oe=ee.trash??!1,be=h!=="none",ye=Vn(()=>be?Ha(e,h,o,u,d,J,{enabled:G,myAccountSeq:X},te):[],[be,e,h,o,u,d,J,G,X,te]),Ce=Vn(()=>m?e.filter(ce=>!ce.completed):e,[e,m]),et=Vn(()=>Ce.filter(ce=>ce.completed||ce.archived?!1:ce.is_notice?!!me?.(ce).canAck:!!K?.(ce).canConfirm),[Ce,me,K]),ze=Vn(()=>new Set(et.map(ce=>ce.seq)),[et]),De=Vn(()=>ye.map(ce=>({section:ce,visibleTasks:ce.tasks.filter(je=>!ze.has(je.seq)&&(!m||!je.completed))})).filter(ce=>ce.visibleTasks.length>0),[ye,m,ze]),vt=Vn(()=>new Set(f),[f]),Ve=Vn(()=>{let ce=[];if(be)for(let{section:je,visibleTasks:ht}of De){let Qr=vt.has(je.key);if(ce.push({kind:"header",section:je,visibleTasks:ht,collapsed:Qr}),!Qr)for(let lr of ht)ce.push({kind:"task",task:lr,last:!1})}else for(let je of Ce)ze.has(je.seq)||ce.push({kind:"task",task:je,last:!1});for(let je=ce.length-1;je>=0;je-=1){let ht=ce[je];if(ht.kind==="task"){ht.last=!0;break}}return ce},[be,De,Ce,vt,ze]),qe=ee.showProject??(!Pe&&h!=="tab"),Mt=Vn(()=>Ua({...ee,showProject:qe}),[ee,qe]),Ke=_d({...ee,showProject:qe}),ne=kd({...ee,showProject:qe}),ue=Zc(null),de=Zc(null),_e=Mt[Mt.length-1]?.align==="center",dt=Vn(()=>{let ce=new Map;for(let je of u)ce.set(je.key,{label:je.archived?`${je.label} (\uBCF4\uAD00\uB428)`:je.label,icon:je.icon});return ce},[u]),Re=Zc(null),[Be,wt]=Kn(null);Ps(()=>{if(!Be)return;let ce=()=>{ue.current&&(ue.current.scrollLeft=Be.scrollLeft),de.current&&(de.current.scrollLeft=Be.scrollLeft)};return ce(),Be.addEventListener("scroll",ce,{passive:!0}),()=>Be.removeEventListener("scroll",ce)},[Be]);let Ge=Ce.length>0;Ps(()=>{if(!Ge){wt(null);return}let ce=window.requestAnimationFrame(()=>{wt(Re.current?.getScrollContainer()??null)});return()=>window.cancelAnimationFrame(ce)},[Ge]);let Ee=`${h}|${s}|${r}|${l}|${m?1:0}`;Ps(()=>{Be&&(Be.scrollTop=0)},[Ee,Be]);let[tt,ot]=Kn(!1);Ps(()=>{if(!Be)return;let ce=()=>ot(Be.scrollHeight-Be.clientHeight>4),je=window.requestAnimationFrame(ce),ht=new ResizeObserver(ce);return ht.observe(Be),Be.firstElementChild&&ht.observe(Be.firstElementChild),()=>{window.cancelAnimationFrame(je),ht.disconnect()}},[Be,Ve.length,f.length]),Ps(()=>{if(!Be)return;let ce=Be.clientHeight,je=new ResizeObserver(()=>{let ht=Be.clientHeight;ht!==ce&&(ce=ht,Be.dispatchEvent(new Event("scroll")))});return je.observe(Be),()=>je.disconnect()},[Be]);let[Ye,yt]=Kn(null),[Bt,bt]=Kn(null),[er,Nt]=Kn(null),[Rt,Q]=Kn(null),[le,he]=Kn(!1),[fe,Ie]=Kn(null),Ae=fe?e.find(ce=>ce.seq===fe.taskSeq)??null:null,[$e,lt]=Kn(null),ae=$e?e.find(ce=>ce.seq===$e.taskSeq)??null:null,[Ne,Je]=Kn(null),St=Ne?e.find(ce=>ce.seq===Ne.taskSeq)??null:null,qt=Un((ce,je)=>{Je({anchorEl:je,taskSeq:ce.seq})},[]),It=Un((ce,je)=>{lt({anchorEl:je,taskSeq:ce.seq})},[]),Ot=Un((ce,je)=>{Ie({anchorEl:je,taskSeq:ce.seq})},[]),xr=Un((ce,je)=>{if(!je)return;t(ce,s===ce&&r==="asc"?"desc":"asc")},[t,s,r]),Zr=Un((ce,je,ht)=>{yt({anchorEl:ht,taskSeq:ce.seq,field:je,date:ce[je],isEvent:!!ce.is_event,reminders:Wn(ce),completed:ce.completed})},[]),Jr=Un((ce,je)=>{Q({anchorEl:je,task:ce})},[]),ln=Un(ce=>{Ye&&(i(Ye.taskSeq,Ye.field,ce),yt(je=>je&&{...je,date:ce}))},[Ye,i]),uo=Un(ce=>{Ye&&(a(Ye.taskSeq,ce),yt(je=>je&&{...je,reminders:ce}))},[Ye,a]),Ei=Un((ce,je)=>{Nt({anchorEl:je,taskSeq:ce.seq,title:ce.title,kind:"claim"})},[]),jo=Un((ce,je)=>{Nt({anchorEl:je,taskSeq:ce.seq,title:ce.title,kind:"volunteer"})},[]),_t=(ce,je)=>mt($d,{task:ce,hideBottomBorder:je,gridTemplate:Ke,useTaskItem:nt,statusOptions:d,avatarSrcByName:b,searchText:l,myAccountSeq:X,todayStr:o,showProject:qe,showManager:Se,showActions:ge,showRequest:xe,confirmMode:Ze,notice:Pe,bugMode:He,supportMode:Qt,managerCentered:Ue,trashMode:Oe,dimCompleted:k,readOnly:B,projectByKey:dt,getConfirmInfo:K,onConfirmTask:W,onProjectClick:Jr,onRequestReply:n,onRequestToggleCompleted:bt,onDateClick:Zr,onChangeNote:T,onMemberClick:D,onClaimClick:p?Ei:void 0,onVolunteerClick:Z?jo:void 0,onStatusClick:Ot,onOpenDetail:x,onTaskContextMenu:w,onPriorityClick:It,onIconClick:R?qt:void 0,lastColumnCentered:_e,getTargetSummary:ie,getTargetDisplay:se,getAckInfo:me,isTaskUnread:pe,onArchiveTask:oe,onAckConfirm:ke,onAckListClick:Le},ce.seq);return Rn(wr,{sx:{display:"flex",flexDirection:"column",flex:1,minHeight:0,border:`1px solid ${we.table.borderColor}`,borderRadius:"0 0 4px 4px",overflow:"hidden",bgcolor:we.table.bg,color:we.table.rowColor,...we.table.sx},children:[mt(wr,{ref:ue,sx:{overflow:"hidden",flexShrink:0},children:mt(wr,{sx:{display:"grid",gridTemplateColumns:Ke,minWidth:ne,borderBottom:`1px solid ${we.table.borderColor}`,flexShrink:0,bgcolor:we.table.headerBg,"& > *":{borderRight:`1px solid ${we.table.rowBorderColor}`},"& > *:first-of-type":{px:1.5},"& > *:last-child":{borderRight:"none",pr:2,..._e?{pl:2}:{}},...we.table.headerSx},children:Mt.map(ce=>{let je=s===ce.id,ht=!!ce.memberFilter,Qr=ht&&C.includes(ce.memberFilter),lr=ht||!!ce.statusFilter||!!ce.ackFilter||!!ce.projectFilter||!!ce.priorityFilter||!!ce.valueFilter,en=Qr||!!ce.valueFilter&&U.includes(ce.valueFilter)||!!ce.statusFilter&&z||!!ce.ackFilter&&V||!!ce.projectFilter&&H||!!ce.priorityFilter&&E;return Rn(wr,{onClick:jr=>{ce.memberFilter?_(ce.memberFilter,jr.currentTarget):ce.statusFilter?O(jr.currentTarget):ce.ackFilter?$?.(jr.currentTarget):ce.projectFilter?M?.(jr.currentTarget):ce.priorityFilter?I?.(jr.currentTarget):ce.valueFilter?F?.(ce.valueFilter,jr.currentTarget):xr(ce.id,ce.sortable)},sx:{display:"flex",alignItems:"center",justifyContent:ce.align==="center"?"center":"flex-start",gap:.5,px:1,...ce.id==="title"?{pl:2}:{},py:1,minWidth:0,fontSize:we.table.headerFontSize,color:ce.sortable||lr?we.table.headerActiveColor:we.table.headerColor,whiteSpace:"nowrap",cursor:ce.sortable||lr?"pointer":"default",userSelect:"none",...je?{color:we.table.headerFilteredColor}:{},...en?{color:we.table.headerFilteredColor,fontWeight:600}:{}},children:[ce.icon,ce.label,en?mt(b2,{sx:{fontSize:14}}):null,je?r==="asc"?mt(h2,{sx:{fontSize:13}}):mt(p2,{sx:{fontSize:13}}):null]},ce.id)})})}),et.length>0?mt(wr,{sx:{flexShrink:0,maxHeight:`${we.table.groupHeader.minHeight+1+Qd*w2}px`,overflowY:"auto",overflowX:"hidden",borderBottom:"1px solid #000"},ref:de,children:Rn(wr,{sx:{minWidth:ne},children:[Rn(wr,{sx:{position:"sticky",top:0,zIndex:1,display:"flex",alignItems:"center",gap:.5,px:1.5,minHeight:we.table.groupHeader.minHeight,bgcolor:"#fdf3f2",borderBottom:"1px solid #f2d7d4"},children:[mt(wr,{component:"span",sx:{fontSize:we.table.groupHeader.labelFontSize,fontWeight:we.table.groupHeader.labelFontWeight,color:we.table.groupHeader.labelColor},children:"\uBBF8\uD655\uC778"}),mt(wr,{sx:{ml:"auto",display:"flex",alignItems:"center",pr:.5},children:mt(wr,{component:"span",sx:{flexShrink:0,width:we.table.groupHeader.badge.width,py:we.table.groupHeader.badge.paddingY,borderRadius:`${we.table.groupHeader.badge.borderRadius}px`,bgcolor:"#e5484d",color:"#fff",fontSize:we.table.groupHeader.badge.fontSize,fontWeight:we.table.groupHeader.badge.fontWeight,lineHeight:1.6,textAlign:"center",fontVariantNumeric:"tabular-nums"},children:et.length})})]}),et.map((ce,je)=>_t(ce,je===et.length-1))]})}):null,Ce.length===0&&v?mt(wr,{role:"status","aria-live":"polite","aria-label":"\uC5C5\uBB34 \uBAA9\uB85D\uC744 \uBD88\uB7EC\uC624\uB294 \uC911\uC785\uB2C8\uB2E4.",sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",py:8},children:mt(ol,{})}):Ce.length===0?mt(wr,{role:"status","aria-live":"polite",sx:{py:8,textAlign:"center",color:we.table.emptyColor,fontSize:14},children:e.length>0?`\uC644\uB8CC\uB41C \uC5C5\uBB34 ${e.length}\uAC74\uC774 "\uC644\uB8CC \uC228\uAE30\uAE30"\uB85C \uAC10\uCDB0\uC838 \uC788\uC2B5\uB2C8\uB2E4.`:He?"\uB4F1\uB85D\uB41C \uC624\uB958\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.":Qt?"\uC811\uC218\uB41C \uBB38\uC758\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.":Pe?"\uB4F1\uB85D\uB41C \uACF5\uC9C0\uC0AC\uD56D\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.":"\uD45C\uC2DC\uD560 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):mt(wr,{sx:{flex:1,minHeight:0},children:mt(v2,{ref:Re,style:{height:"100%"},contentStyle:{minWidth:ne},thumb:{width:8},showHorizontalScrollbar:!0,scrollTopFab:!0,children:Be?mt(x2,{customScrollParent:Be,data:Ve,computeItemKey:(ce,je)=>je.kind==="header"?`group:${je.section.key}`:je.task.seq,endReached:be?void 0:Me,defaultItemHeight:Qd,increaseViewportBy:{top:600,bottom:600},itemContent:(ce,je)=>{if(je.kind==="task")return _t(je.task,je.last&&tt);let{section:ht,visibleTasks:Qr,collapsed:lr}=je;return Rn(wr,{onClick:()=>g(ht.key),sx:{display:"flex",alignItems:"center",gap:.5,px:1.5,minHeight:we.table.groupHeader.minHeight,bgcolor:we.table.groupHeader.bg,borderBottom:`1px solid ${we.table.groupHeader.borderColor}`,cursor:"pointer",userSelect:"none","&:hover":{bgcolor:we.table.groupHeader.hoverBg},...we.table.groupHeader.sx},children:[lr?mt(g2,{sx:{fontSize:20,color:we.colors.textMuted}}):mt(m2,{sx:{fontSize:20,color:we.colors.textMuted}}),mt(wr,{component:"span",sx:{fontSize:we.table.groupHeader.labelFontSize,fontWeight:we.table.groupHeader.labelFontWeight,color:we.table.groupHeader.labelColor},children:ht.label}),q?mt(wr,{sx:{flexShrink:0,display:"flex",alignItems:"center",ml:.5},children:q(ht.key,ht.tasks)}):null,A&&(!P||P(ht.key))?mt(f2,{size:"small","aria-label":"\uC774 \uADF8\uB8F9\uC5D0 \uC5C5\uBB34 \uB4F1\uB85D",onClick:en=>{en.stopPropagation(),A(ht.key,ht.tasks)},sx:{flexShrink:0,ml:.75,p:.25,color:we.colors.textSecondary,"&:hover":{bgcolor:we.colors.surfaceHover,color:we.colors.accentOnSurface}},children:mt(Jd,{sx:{fontSize:21}})}):null,Rn(wr,{sx:{ml:"auto",minWidth:0,display:"flex",alignItems:"center",gap:1,pr:.5},children:[N?N(ht.key,ht.tasks):null,mt(wr,{component:"span",sx:{flexShrink:0,width:we.table.groupHeader.badge.width,py:we.table.groupHeader.badge.paddingY,borderRadius:`${we.table.groupHeader.badge.borderRadius}px`,bgcolor:we.table.groupHeader.badge.bg,border:we.table.groupHeader.badge.border,color:we.table.groupHeader.badge.color,fontSize:we.table.groupHeader.badge.fontSize,fontWeight:we.table.groupHeader.badge.fontWeight,lineHeight:1.6,textAlign:"center",fontVariantNumeric:"tabular-nums"},children:Qr.length})]})]})}},Ee):null})}),mt(Ai,{anchorEl:fe?.anchorEl??null,value:Ae?.status??"",options:Ae?Fa(Ae):Es,onSelect:ce=>{Ae&&y(Ae.seq,ce)},onComplete:Ae&&!Ae.completed&&!Ae.is_notice&&!Ae.is_event&&!Ae.is_bug&&!Oe&&((Ae.author_account_seq??0)===X||(Ae.manager_account_seq??0)===X)?()=>c(Ae,!0):void 0,onClose:()=>Ie(null)}),mt(Zd,{transitionDuration:0,anchorEl:$e?.anchorEl??null,open:!!$e,onClose:()=>lt(null),children:["high","medium","low"].map(ce=>Rn(il,{selected:ae?.priority===ce,onClick:()=>{ae&&Te?.(ae.seq,ce),lt(null)},sx:{fontSize:14,minWidth:130,gap:1},children:[mt(Fr,{priority:ce,small:!0}),ae?.priority===ce?mt(Jc,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},ce))}),Rn(Zd,{anchorEl:Rt?.anchorEl??null,open:!!Rt,onClose:()=>Q(null),transitionDuration:0,children:[Rn(il,{selected:!Rt?.task.tab_key,onClick:()=>{Rt&&j(Rt.task.seq,""),Q(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[mt(y2,{sx:{fontSize:17,color:"#9a9a97"}}),"\uC5C6\uC74C",Rt?.task.tab_key?null:mt(Jc,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}})]}),u.filter(ce=>!ce.archived).map(ce=>{let je=Tt(ce.icon),ht=Rt?.task.tab_key===ce.key;return Rn(il,{selected:ht,onClick:()=>{Rt&&j(Rt.task.seq,ce.key),Q(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[je?mt(je,{sx:{fontSize:17,color:"#1e3a8a"}}):null,ce.label,ht?mt(Jc,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},ce.key)}),S?[mt(u2,{},"add-project-divider"),Rn(il,{onClick:()=>he(!0),sx:{fontSize:14,color:"#787774"},children:[mt(d2,{children:mt(Jd,{sx:{fontSize:18,color:"#787774"}})}),"\uD504\uB85C\uC81D\uD2B8 \uCD94\uAC00"]},"add-project")]:null]}),S?mt(nl,{open:le,onClose:()=>he(!1),onSubmit:(ce,je)=>{let ht=Rt?.task.seq??0;(async()=>{let Qr=await S(ce,je);Qr&&ht&&j(ht,Qr)})(),Q(null)}}):null,mt(Wo,{anchorEl:Ne?.anchorEl??null,value:St?.icon??"",color:St?.icon_color??"",onSelect:ce=>{Ne&&R?.(Ne.taskSeq,ce),Je(null)},onSelectColor:L?ce=>{Ne&&L(Ne.taskSeq,ce)}:void 0,onClose:()=>Je(null)}),mt(xn,{anchorEl:Ye?.anchorEl??null,open:!!Ye&&Ye?.field==="start_date",date:Ye?.date??"",reminders:[],hideReminder:!0,showTime:!Ye?.isEvent,onClose:()=>yt(null),onDateChange:ln,onReminderChange:()=>{}}),mt(xn,{anchorEl:Ye?.anchorEl??null,open:!!Ye&&Ye?.field==="due_date",date:Ye?.date??"",showTime:!Ye?.isEvent,reminders:Ye?.reminders??[],hideReminder:!!Ye?.completed,onClose:()=>yt(null),onDateChange:ln,onReminderChange:uo}),mt(kt,{open:!!er,anchorEl:er?.anchorEl??null,title:er?.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:()=>Nt(null),onConfirm:()=>{er&&p?.(er.taskSeq),Nt(null)}}),mt(kt,{open:!!Bt,anchorEl:Bt?.anchorEl??null,title:Bt?.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:Bt?.nextCompleted?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>bt(null),onConfirm:()=>{Bt&&c(Bt.task,Bt.nextCompleted),bt(null)}})]})}import{useCallback as Xn,useMemo as bo,useRef as V2,useState as An}from"react";import{Box as zt,ButtonBase as mh,Divider as ih,IconButton as sh,Menu as ah,MenuItem as Uo}from"@mui/material";import nu from"@mui/icons-material/Add";import lh from"@mui/icons-material/MoreVert";import ch from"@mui/icons-material/EditOutlined";import uh from"@mui/icons-material/ArchiveOutlined";import fh from"@mui/icons-material/UnarchiveOutlined";import K2 from"@mui/icons-material/NotificationsOutlined";import G2 from"@mui/icons-material/PeopleAltOutlined";import{SvgIcon as _2}from"@mui/material";import{jsx as th}from"react/jsx-runtime";function dr({sx:e,...d}){return th(_2,{viewBox:"0 0 24 24",...d,sx:{fill:"none",...e},children:th("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 Y2,DragOverlay as X2,PointerSensor as Z2,pointerWithin as J2,rectIntersection as Q2,useDroppable as ev,useSensor as tv,useSensors as rv}from"@dnd-kit/core";import{SortableContext as gh,arrayMove as dh,horizontalListSortingStrategy as nv,useSortable as ov,verticalListSortingStrategy as iv}from"@dnd-kit/sortable";import{CSS as sv}from"@dnd-kit/utilities";import ou from"@ehfuse/overlay-scrollbar";import{useState as E2}from"react";import{Box as Yn,ButtonBase as M2,Checkbox as R2,Tooltip as rh}from"@mui/material";import O2 from"@mui/icons-material/AlarmOutlined";import A2 from"@mui/icons-material/DragIndicator";import D2 from"@mui/icons-material/RadioButtonUnchecked";import P2 from"@mui/icons-material/CheckCircle";import N2 from"@mui/icons-material/TimerOutlined";import{Box as On,Button as k2,Popover as S2}from"@mui/material";import T2 from"@mui/icons-material/CheckCircle";import{Fragment as C2,jsx as Gn,jsxs as fi}from"react/jsx-runtime";function sl({anchorEl:e,open:d,acks:b,total:l,avatarSrcByName:o,pendingNames:s=[],onRequestConfirm:r,onClose:t}){let n=Lt();return Gn(S2,{open:d&&(n||!!e),anchorEl:e,onClose:t,transitionDuration:0,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},...n?{anchorReference:"none",slotProps:{paper:{sx:{position:"fixed",top:"50%",left:"50%",translate:"-50% -50%",maxWidth:"calc(100vw - 48px)",maxHeight:"70vh",borderRadius:3}}}}:{},children:fi(On,{sx:{minWidth:240,maxWidth:320,py:1},children:[fi(On,{sx:{px:2,pb:.75,fontSize:Ir(13.5),fontWeight:600,color:"#37352f",borderBottom:"1px solid #efefed"},children:["\uD655\uC778 ",b.length,"/",l]}),s.length>0&&b.length>0?fi(On,{sx:{px:2,pt:1,pb:.5,fontSize:Ir(12.5),fontWeight:600,color:"#9a9a97"},children:["\uD655\uC778 ",b.length]}):null,b.length===0?s.length>0?null:Gn(On,{sx:{px:2,py:1.5,fontSize:Ir(13.5),color:"#9a9a97"},children:"\uC544\uC9C1 \uD655\uC778\uD55C \uC0AC\uB78C\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):b.map(c=>fi(On,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:.75,minWidth:0},children:[Gn(qr,{names:[c.name],size:22,avatarSrcByName:o}),Gn(On,{component:"span",sx:{fontSize:Ir(14),color:"#37352f",whiteSpace:"nowrap"},children:c.name}),Gn(On,{component:"span",sx:{ml:"auto",fontSize:Ir(12.5),color:"#9a9a97",whiteSpace:"nowrap"},children:un(c.time)}),Gn(T2,{sx:{fontSize:16,color:"#2f80ed",flexShrink:0}})]},c.account_seq)),s.length>0?fi(C2,{children:[fi(On,{sx:{mt:b.length>0?.75:0,px:2,pt:1,pb:.5,borderTop:b.length>0?"1px solid #efefed":"none",fontSize:Ir(12.5),fontWeight:600,color:"#9a9a97"},children:["\uBBF8\uD655\uC778 ",s.length]}),s.map(c=>fi(On,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:.75,minWidth:0},children:[Gn(qr,{names:[c],size:22,avatarSrcByName:o}),Gn(On,{component:"span",sx:{fontSize:Ir(14),color:"#37352f",whiteSpace:"nowrap"},children:c})]},c))]}):null,r?Gn(On,{sx:{borderTop:"1px solid #efefed",px:1.5,pt:1,pb:.25},children:Gn(k2,{size:"small",fullWidth:!0,variant:"outlined",onClick:()=>{r(),t()},sx:{fontSize:Ir(13)},children:"\uD655\uC778 \uC694\uCCAD"})}):null]})})}function B2(e){let d=Number(e.author_account_seq??0);return[...new Set([Number(e.manager_account_seq??0),...e.receiver_account_seqs??[]].filter(b=>b>0&&b!==d))]}function I2(e){let d=new Map,b=Number(e.manager_account_seq??0);b>0&&d.set(b,String(e.manager_name??"").trim());let l=e.receiver_account_seqs??[],o=e.receiver_names??[];return l.forEach((s,r)=>{s>0&&!d.has(s)&&d.set(s,String(o[r]??"").trim())}),d}function Fi(e,d){let b=B2(e),l=e.acks??[],o=d>0?l.find(t=>t.account_seq===d):void 0,s=new Set(l.map(t=>t.account_seq)),r=I2(e);return{myTime:o?.time??"",canConfirm:d>0&&b.includes(d)&&!o,count:l.filter(t=>b.includes(t.account_seq)).length,total:b.length,pendingNames:b.filter(t=>!s.has(t)).map(t=>r.get(t)??"").filter(t=>t.length>0)}}function GM(e){let d=String(e??"").trim();return d?d.slice(5,16).replaceAll("-","."):""}import{Fragment as F2,jsx as sr,jsxs as qi}from"react/jsx-runtime";function al(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}}var L2=3;function z2(e){let d=e.trim();return d?d.slice(2,10).replaceAll("-","."):"-"}function j2(){let e=new Date,d=String(e.getMonth()+1).padStart(2,"0"),b=String(e.getDate()).padStart(2,"0");return`${e.getFullYear()}-${d}-${b}`}var Qc="taskbox-card-drag-handle";function Ns({task:e,statusOptions:d,showDueDate:b=!1,onRequestArchiveToggle:l,onRequestReply:o,onDueDateClick:s,titleFontSize:r=13,dragHandleProps:t}){let n=at(),c=Di(e,$t().resolveTask),a=!!e.due_date&&e.due_date.slice(0,10)<=j2()?n.colors.danger:n.colors.textPrimary,h=Fi(e,0),[f,u]=E2(null),g=Oi(e,d),m=new Set(e.label_keys??[]),v=g.filter(B=>!m.has(B.key)),k=g.filter(B=>m.has(B.key));return qi(F2,{children:[qi(Yn,{sx:{display:"flex",alignItems:"flex-start",gap:.5},children:[t?sr(Yn,{className:Qc,...t,onClick:B=>B.stopPropagation(),sx:{display:"inline-flex",alignItems:"center",flexShrink:0,ml:-.5,mr:-.25,color:n.colors.textMuted,cursor:"grab",touchAction:"none","&:active":{cursor:"grabbing"}},children:sr(A2,{sx:{fontSize:18}})}):null,sr(R2,{size:"small",icon:sr(D2,{sx:{fontSize:20}}),checkedIcon:sr(P2,{sx:{fontSize:20}}),checked:e.completed,inputProps:{"aria-label":e.completed?`${e.title} \uC644\uB8CC \uD574\uC81C`:`${e.title} \uC644\uB8CC \uCC98\uB9AC`},onPointerDown:B=>B.stopPropagation(),onClick:B=>B.stopPropagation(),onChange:(B,R)=>l?.({anchorEl:B.currentTarget,taskSeq:e.seq,nextCompleted:R}),sx:{p:0}}),sr(rh,{title:e.title,arrow:!0,enterDelay:300,children:qi(Yn,{sx:{flex:1,minWidth:0,pr:1,fontSize:r,fontWeight:n.mode==="dark"||e.completed?400:500,color:n.mode==="dark"?n.colors.textStrong:n.colors.textPrimary,lineHeight:1.35,overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:L2,overflowWrap:"anywhere",textDecoration:e.completed?"line-through":"none"},children:[e.is_event&&e.event_time?`${e.event_time} `:"",e.title,c?sr(Yn,{component:"span",sx:{ml:.75,fontSize:12.5,fontWeight:400,color:n.colors.textMuted,fontVariantNumeric:"tabular-nums",whiteSpace:"nowrap",textDecoration:"none"},children:c}):null,(e.comment_count??e.comments?.length??0)>0?sr(Ho,{sx:{fontSize:15,ml:.5,verticalAlign:"-2px",color:n.colors.textMuted}}):null]})})]}),e.is_bug&&e.ticket_no?sr(Yn,{sx:{pl:3,mt:-.5,fontSize:12.5,color:n.colors.textSecondary,fontWeight:500,fontVariantNumeric:"tabular-nums"},children:e.ticket_no}):null,qi(Yn,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:.5},children:[qi(Yn,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:.5,minWidth:0},children:[v.map(B=>sr(At,{option:B,small:!0},B.key)),sr(Fr,{priority:e.priority,small:!0}),k.map(B=>sr(At,{option:B,small:!0},B.key))]}),b?sr(rh,{title:"\uB9C8\uAC10\uC608\uC815",arrow:!0,placement:"top",disableInteractive:!0,slotProps:{transition:{timeout:0}},children:sr(M2,{disabled:!s,onPointerDown:B=>B.stopPropagation(),onClick:B=>{B.stopPropagation(),s?.(e,B.currentTarget)},sx:{display:"inline-flex",alignItems:"center",px:.5,py:.1,borderRadius:.75,fontSize:13,fontWeight:500,color:a,whiteSpace:"nowrap","&:hover":s?{bgcolor:n.colors.border}:void 0},children:String(e.due_date??"").trim()?z2(e.due_date):sr(O2,{sx:{fontSize:15,color:n.colors.textMuted}})})}):null]}),b&&(e.due_date.slice(11,16)||e.estimated_time)?qi(Yn,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:.25,mt:-.5,fontSize:12,color:n.colors.textSecondary},children:[sr(N2,{sx:{fontSize:14}}),e.due_date.slice(11,16)||e.estimated_time]}):null,sr(qr,{names:[...e.manager_name?[e.manager_name]:[],...e.receiver_names],size:20,ringFirst:!!e.manager_name}),h.total>0?sr(Yn,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:.5},children:sr(Yn,{sx:{flexShrink:0,width:64},onPointerDown:B=>B.stopPropagation(),onClick:B=>B.stopPropagation(),children:sr(Ni,{canConfirm:!1,count:h.count,total:h.total,onConfirm:()=>{},onShowList:B=>u(B)})})}):null,sr(sl,{anchorEl:f,open:!!f,acks:e.acks??[],total:h.total,pendingNames:h.pendingNames,onRequestConfirm:o&&h.count<h.total?()=>{o(e),u(null)}:void 0,onClose:()=>u(null)})]})}import{Box as q2}from"@mui/material";import{useSortable as $2}from"@dnd-kit/sortable";import{CSS as H2}from"@dnd-kit/utilities";import{jsx as nh}from"react/jsx-runtime";function W2(e){return{px:1.25,py:1,display:"flex",flexDirection:"column",gap:.75,borderBottom:`1px solid ${e.borderColor}`,bgcolor:e.bg}}function oh({task:e,statusOptions:d,variant:b="card",showDueDate:l=!1,onRequestArchiveToggle:o,onRequestReply:s,onDueDateClick:r,onCardClick:t,onCardContextMenu:n,titleFontSize:c}){let i=at(),{attributes:a,listeners:h,setNodeRef:f,transform:u,transition:g,isDragging:m}=$2({id:String(e.seq)}),v=b==="list";return nh(q2,{ref:f,onClick:t?()=>t(e):void 0,onContextMenu:n?k=>n(e,k):void 0,sx:{...v?W2(i.card):al(i.card),opacity:m?.35:e.completed?.55:1,transform:H2.Translate.toString(u),transition:g,position:"relative",cursor:"default","&:hover":v?{bgcolor:i.card.hoverBg}:{boxShadow:"0 3px 8px rgba(0,0,0,0.1)"}},children:nh(Ns,{task:e,statusOptions:d,showDueDate:l,onRequestArchiveToggle:o,onRequestReply:s,onDueDateClick:r,titleFontSize:c,dragHandleProps:{...a,...h}})})}function U2(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?e.slice(5).replace("-","."):""}function vn(e){if(e.status==="closed")return`${e.name} (\uC885\uB8CC)`;let d=U2(e.end_date);return d?`${e.name} (~${d})`:e.name}import{jsx as rt,jsxs as Ut}from"react/jsx-runtime";var hh=2,bh="taskbox-column-drag-handle",iu=[Qc,bh],ll="group-",wn="colmove-",eu="__default__",tu=Ec,ru="__other__",cl="sprint-",ph=`${cl}0`,av={planning:"#9a9a97",active:"#2f80ed",closed:"#9a9a97"};function yh(e){return{flexShrink:0,width:e.width,py:e.paddingY,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 lv({column:e,tasks:d,statusOptions:b,onRequestArchiveToggle:l,onRequestReply:o,onDueDateClick:s,onAddTask:r,canAdd:t,onOpenMenu:n,onCardClick:c,onCardContextMenu:i,grow:a,summary:h,onOpenSprintMenu:f}){let u=at(),{setNodeRef:g,isOver:m}=ev({id:`${ll}${e.key}`}),{attributes:v,listeners:k,setNodeRef:B,transform:R,transition:L,isDragging:A}=ov({id:`${wn}${e.key}`,disabled:e.isDefault||e.isArchived||!!e.locked});return Ut(zt,{ref:P=>{g(P),B(P)},sx:{flex:a?"1 0 270px":"0 0 270px",minWidth:270,contain:"inline-size",minHeight:0,maxHeight:"100%",display:"flex",flexDirection:"column",borderRadius:1.5,boxShadow:P=>P.shadows[1],bgcolor:m?u.colors.accentSoft:u.board.columnBg,transition:"background-color 0.15s",overflow:"hidden",transform:sv.Translate.toString(R),...L?{transition:`${L}, background-color 0.15s`}:{},opacity:A?.6:1},children:[Ut(zt,{className:bh,...v,...k,sx:{display:"flex",alignItems:"center",gap:.75,pl:1.25,pr:.5,py:1.1,borderBottom:`1px solid ${u.card.borderColor}`,flexShrink:0,touchAction:"none",cursor:e.isDefault||e.isArchived||e.locked?"default":"grab",opacity:e.isArchived?.65:1},children:[e.dot?rt(zt,{sx:{width:8,height:8,borderRadius:"50%",bgcolor:e.dot,flexShrink:0}}):e.isDefault?null:(()=>{let P=Tt(e.icon);return P?rt(P,{sx:{fontSize:17,color:"#1e3a8a"}}):null})(),rt(zt,{component:"span",sx:{fontSize:u.board.columnHeaderFontSize,fontWeight:700,color:u.board.columnHeaderColor,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.label}),rt(zt,{component:"span",sx:{...yh(u.board.badge),ml:"auto"},children:d.length}),e.sprint&&f?rt(sh,{size:"small","aria-label":"\uBAA9\uD45C \uBA54\uB274",onPointerDown:P=>P.stopPropagation(),onClick:P=>f(P.currentTarget,e.sprint),sx:{color:"#9a9a97"},children:rt(lh,{sx:{fontSize:18}})}):e.locked?null:rt(sh,{size:"small","aria-label":"\uD504\uB85C\uC81D\uD2B8 \uBA54\uB274",onPointerDown:P=>P.stopPropagation(),onClick:P=>n({anchorEl:P.currentTarget,column:e}),sx:{color:"#9a9a97"},children:rt(lh,{sx:{fontSize:18}})})]}),h?rt(zt,{sx:{px:1.25,py:1.25,borderBottom:`1px solid ${u.card.borderColor}`,flexShrink:0},children:h}):null,rt(zt,{sx:{flex:"1 1 auto",minHeight:0,display:"flex",flexDirection:"column"},children:rt(ou,{style:{height:"auto",flex:"1 1 auto",minHeight:0},contentStyle:{minWidth:0},thumb:{width:6},dragScroll:{excludeClasses:iu},children:Ut(zt,{sx:{display:"flex",flexDirection:"column",flexGrow:1},children:[rt(gh,{items:d.map(P=>String(P.seq)),strategy:iv,children:d.map(P=>rt(oh,{task:P,statusOptions:b,variant:"list",showDueDate:!0,titleFontSize:15,onRequestArchiveToggle:l,onRequestReply:o,onDueDateClick:s,onCardClick:c,onCardContextMenu:i},P.seq))}),d.length===0&&!t?rt(zt,{sx:{py:3,textAlign:"center",fontSize:13,color:"#9a9a97"},children:"\uCE74\uB4DC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):null,d.length===0&&t?rt(zt,{sx:{flexGrow:1,minHeight:56,display:"flex",flexDirection:"column","&:hover .taskbox-board-add":{opacity:1,pointerEvents:"auto"}},children:Ut(mh,{className:"taskbox-board-add",onClick:()=>r(e.isDefault?"":e.key),sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:.5,px:1.25,py:1.75,borderBottom:`1px dashed ${u.card.borderColor}`,bgcolor:u.card.bg,color:u.colors.accentOnSurface,fontSize:13,fontWeight:500,opacity:0,pointerEvents:"none",transition:"opacity 0.15s","&:hover":{bgcolor:u.card.hoverBg}},children:[rt(nu,{sx:{fontSize:16}}),"\uC5C5\uBB34 \uB4F1\uB85D"]})}):null]})})})]})}function su({tasks:e,statusOptions:d,customTabs:b,mode:l="active",onToggleCompleted:o,onRequestReply:s,onChangeDueDate:r,onChangeReminder:t,onMoveTask:n,columnAxis:c="project",statusColumns:i=[],onMoveTaskStatus:a,sprintColumns:h=[],onMoveTaskSprint:f,onAddGroup:u,onAddTask:g,canAdd:m=!0,onRequestRename:v,onArchiveProject:k,onDeleteProject:B,onReorderProjects:R,onOpenDetail:L,onTaskContextMenu:A,hideCompleted:P=!1,renderColumnSummary:N,onEditSprint:q,onChangeSprintStatus:j,onRemoveSprint:S}){let T=at(),[D,p]=An(null),[y,x]=An(null),[w,_]=An(null),[C,O]=An(null),[z,$]=An(null),[V,M]=An(null),[H,I]=An(null),[E,F]=An(null),[U,Y]=An(null),[K,W]=An(null),[X,J]=An(null),G=V2(!1),te=bo(()=>new Map(e.map(be=>[be.seq,be])),[e]),Z=bo(()=>{let be=e.filter(ye=>ye.is_notice);return be.sort((ye,Ce)=>ye.completed!==Ce.completed?ye.completed?1:-1:Ce.seq-ye.seq),be},[e]),re=bo(()=>b.filter(be=>!be.archived),[b]),ie=bo(()=>b.filter(be=>be.archived),[b]),se=be=>({key:be.key,label:be.label,icon:be.icon,isDefault:!1,isArchived:be.archived}),oe=bo(()=>new Set(i.map(be=>be.key)),[i]),pe=bo(()=>new Set(h.map(be=>be.seq)),[h]),me=bo(()=>{if(c==="sprint")return[{key:ph,label:"\uBBF8\uBC30\uC815",icon:"",isDefault:!0,isArchived:!1,dot:"#c9c8c5",locked:!0},...h.map(be=>({key:`${cl}${be.seq}`,label:vn(be),icon:"",isDefault:!1,isArchived:!1,dot:av[be.status],locked:!0,sprint:be}))];if(c==="status"){let be=i.map(ye=>({key:ye.key,label:ye.name,icon:"",isDefault:!1,isArchived:!1,dot:ye.dot,locked:!0}));return be.some(ye=>ye.key===tu)?be:[...be,{key:tu,label:"\uC644\uB8CC",icon:"",isDefault:!1,isArchived:!1,dot:"#2f80ed",locked:!0}]}return l==="archived"?ie.map(se):[{key:eu,label:"\uAE30\uBCF8 \uC5C5\uBB34\uD568",icon:"",isDefault:!0,isArchived:!1},...re.map(se)]},[c,i,h,l,re,ie]),ke=rv(tv(Z2,{activationConstraint:{distance:5}})),Le=Xn(be=>{let ye=String(be.active.id).startsWith(wn),Ce=J2(be),et=Ce.length>0?Ce:Q2(be);if(ye)return et.filter(vt=>String(vt.id).startsWith(wn));let ze=et.filter(vt=>!String(vt.id).startsWith(wn)),De=ze.filter(vt=>!String(vt.id).startsWith(ll));return De.length>0?De:ze},[]),Te=bo(()=>{let be=new Map;for(let ye of e){if(ye.is_notice)continue;let Ce;if(c==="sprint"){let ze=ye.sprint_seq??0;Ce=pe.has(ze)?`${cl}${ze}`:ph}else Ce=c==="status"?ye.completed?tu:oe.has(String(ye.status??""))?String(ye.status??""):ru:ye.tab_key?.trim()||eu;let et=be.get(Ce);et?et.push(ye):be.set(Ce,[ye])}for(let ye of be.values())ye.sort((Ce,et)=>{if(Ce.completed!==et.completed)return Ce.completed?1:-1;let ze=(Ce.group_sort_no??0)>0,De=(et.group_sort_no??0)>0;return ze&&De?(Ce.group_sort_no??0)-(et.group_sort_no??0):ze!==De?ze?-1:1:Ce.due_date!==et.due_date?Ce.due_date<et.due_date?-1:1:Ce.seq-et.seq});return be},[e,c,oe,pe]),Me=bo(()=>c!=="status"||(Te.get(ru)??[]).length===0?me:[...me,{key:ru,label:"\uAE30\uD0C0",icon:"",isDefault:!1,isArchived:!1,dot:"#c9c8c5",locked:!0}],[c,me,Te]),nt=Xn(be=>U?(U.get(be)??[]).map(ye=>te.get(ye)).filter(ye=>!!ye):Te.get(be)??[],[U,te,Te]),we=Xn(be=>{let ye=nt(be);return P?ye.filter(Ce=>!Ce.completed):ye},[nt,P]),ee=Xn(be=>{let ye=String(be.active.id);if(ye.startsWith(wn)){J(ye.slice(wn.length));return}W(Number(ye)),Y(new Map(me.map(Ce=>[Ce.key,(Te.get(Ce.key)??[]).map(et=>et.seq)])))},[me,Te]),Se=Xn((be,ye)=>{if(be.startsWith(ll))return{key:be.slice(ll.length),overSeq:null};let Ce=Number(be);for(let[et,ze]of ye)if(ze.includes(Ce))return{key:et,overSeq:Ce};return null},[]),ge=Xn(be=>{let{active:ye,over:Ce}=be;!Ce||String(ye.id).startsWith(wn)||Y(et=>{if(!et)return et;let ze=Number(ye.id),De=Se(String(Ce.id),et);if(!De)return et;let vt=[...et.entries()].find(([,Ke])=>Ke.includes(ze))?.[0];if(!vt||vt===De.key)return et;let Ve=new Map(et);Ve.set(vt,(Ve.get(vt)??[]).filter(Ke=>Ke!==ze));let qe=[...Ve.get(De.key)??[]],Mt=qe.length;if(De.overSeq!==null){let Ke=qe.indexOf(De.overSeq);Ke!==-1&&(Mt=Ke)}return qe.splice(Mt,0,ze),Ve.set(De.key,qe),Ve})},[Se]),xe=Xn(be=>{let ye=String(be.active.id);if(ye.startsWith(wn)){J(null);let Mt=String(be.over?.id??"");if(!Mt.startsWith(wn))return;let Ke=ye.slice(wn.length),ne=Mt.slice(wn.length);if(Ke===ne)return;let ue=b.map(dt=>dt.key),de=ue.indexOf(Ke),_e=ue.indexOf(ne);if(de===-1||_e===-1)return;R(dh(ue,de,_e));return}let Ce=U;if(Y(null),W(null),G.current=!0,!Ce||!be.over)return;let et=Number(ye),ze=[...Ce.entries()].find(([,Mt])=>Mt.includes(et));if(!ze)return;let[De,vt]=ze,Ve=[...vt],qe=Se(String(be.over.id),Ce);if(qe&&qe.key===De&&qe.overSeq!==null&&qe.overSeq!==et){let Mt=Ve.indexOf(et),Ke=Ve.indexOf(qe.overSeq);Mt!==-1&&Ke!==-1&&(Ve=dh(Ve,Mt,Ke))}if(c==="status"){a?.(et,De);return}if(c==="sprint"){f?.(et,Number(De.slice(cl.length))||0);return}n(et,De===eu?"":De,Ve)},[b,U,Se,n,R,c,a,f]),Ze=Xn(()=>{Y(null),W(null),J(null),G.current=!0},[]),Pe=Xn(be=>{if(G.current){G.current=!1;return}L(be)},[L]),He=K!==null?te.get(K)??null:null,Qt=X!==null?me.find(be=>be.key===X)??null:null,Ue=Xn((be,ye)=>{F({anchorEl:ye,taskSeq:be.seq,date:be.due_date,reminders:Wn(be)})},[]),Oe=y?.column??null;return Ut(zt,{sx:{flex:1,minHeight:0,height:"100%",display:"flex",flexDirection:"column",border:`1px solid ${T.card.borderColor}`,borderRadius:"0 0 4px 4px",overflow:"hidden",bgcolor:T.colors.surfaceSubtle},children:[Ut(Y2,{sensors:ke,collisionDetection:Le,onDragStart:ee,onDragOver:ge,onDragEnd:xe,onDragCancel:Ze,children:[rt(zt,{sx:{flex:1,minHeight:0,minWidth:0,contain:"inline-size"},children:l==="archived"&&me.length===0?rt(zt,{sx:{py:8,textAlign:"center",color:"#9a9a97",fontSize:14},children:"\uBCF4\uAD00\uB41C \uD504\uB85C\uC81D\uD2B8\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):rt(ou,{style:{height:"100%"},contentStyle:{width:"max-content",minWidth:"100%",height:"100%"},thumb:{width:8},showHorizontalScrollbar:!0,dragScroll:{excludeClasses:iu},children:Ut(zt,{sx:{display:"flex",alignItems:"flex-start",gap:hh,height:"100%",minWidth:"min-content",p:hh,boxSizing:"border-box"},children:[l==="active"&&Z.length>0?Ut(zt,{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:be=>be.shadows[1],bgcolor:T.card.bg,overflow:"hidden"},children:[Ut(zt,{sx:{display:"flex",alignItems:"center",gap:.75,pl:1.25,pr:.5,py:1.1,borderBottom:`1px solid ${T.card.borderColor}`,flexShrink:0,minHeight:48},children:[rt(K2,{sx:{fontSize:17,color:"#e8763a"}}),rt(zt,{component:"span",sx:{fontSize:14.5,fontWeight:700,color:T.board.columnHeaderColor},children:"\uACF5\uC9C0\uC0AC\uD56D"}),Ut(zt,{component:"span",sx:{fontSize:13,color:"#9a9a97",flexShrink:0},children:["(",Z.length,")"]})]}),rt(zt,{sx:{flex:"1 1 auto",minHeight:0,display:"flex",flexDirection:"column"},children:rt(ou,{style:{height:"auto",flex:"1 1 auto",minHeight:0},contentStyle:{minWidth:0},dragScroll:{excludeClasses:iu},thumb:{width:6},children:rt(zt,{sx:{display:"flex",flexDirection:"column"},children:Z.map(be=>Ut(zt,{onClick:()=>Pe(be),onContextMenu:ye=>A(be,ye),sx:{px:1.25,py:1,display:"flex",flexDirection:"column",gap:.75,borderBottom:`1px solid ${T.card.borderColor}`,bgcolor:T.card.bg,cursor:"pointer","&:hover":{bgcolor:T.card.hoverBg}},children:[rt(Ns,{task:be,statusOptions:d,showDueDate:!0,titleFontSize:15,onRequestArchiveToggle:p}),(()=>{let ye=(be.target_names??[]).filter(et=>et.trim());if(ye.length===0)return null;let Ce=ye.length>2?`${ye[0]}, ${ye[1]} \uC678 ${ye.length-2}`:ye.join(", ");return Ut(zt,{sx:{display:"flex",alignItems:"center",gap:.5,fontSize:12.5,color:"#787774",overflow:"hidden",whiteSpace:"nowrap"},children:[rt(G2,{sx:{fontSize:14,flexShrink:0}}),rt(zt,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis"},children:Ce})]})})()]},be.seq))})})})]}):null,rt(gh,{items:re.map(be=>`${wn}${be.key}`),strategy:nv,children:Me.map(be=>rt(lv,{column:be,tasks:we(be.key),summary:N?.(be.key,nt(be.key)),onOpenSprintMenu:q||j||S?(ye,Ce)=>_({anchorEl:ye,sprint:Ce}):void 0,statusOptions:d,onRequestArchiveToggle:p,onRequestReply:s,onDueDateClick:Ue,onAddTask:g,canAdd:m&&c==="project",onOpenMenu:x,onCardClick:Pe,onCardContextMenu:A,grow:c!=="project"},be.key))}),l==="active"&&c==="project"?Ut(mh,{onClick:u,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:[rt(nu,{sx:{fontSize:18}}),"\uC0C8 \uD504\uB85C\uC81D\uD2B8"]}):null,l==="active"&&Me.length===0&&Z.length===0?rt(zt,{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]})})}),rt(X2,{children:He?rt(zt,{sx:{...al,width:250,boxShadow:"0 8px 20px rgba(0,0,0,0.18)",cursor:"grabbing"},children:rt(Ns,{task:He,statusOptions:d,showDueDate:!0,titleFontSize:15})}):Qt?Ut(zt,{sx:{display:"flex",alignItems:"center",gap:.75,width:270,px:1.25,py:1,bgcolor:T.card.bg,border:`1px solid ${T.card.borderColor}`,borderRadius:1.5,boxShadow:"0 8px 20px rgba(0,0,0,0.18)",opacity:.9,cursor:"grabbing"},children:[(()=>{let be=Tt(Qt.icon);return be?rt(be,{sx:{fontSize:17,color:"#1e3a8a"}}):null})(),rt(zt,{component:"span",sx:{fontSize:13.5,fontWeight:700,color:T.board.columnHeaderColor},children:Qt.label}),rt(zt,{component:"span",sx:yh(T.board.badge),children:(Te.get(Qt.key)??[]).length})]}):null})]}),Ut(ah,{transitionDuration:0,anchorEl:y?.anchorEl??null,open:!!y,onClose:()=>x(null),children:[Oe&&!Oe.isArchived&&m?Ut(Uo,{onClick:()=>{Oe&&g(Oe.isDefault?"":Oe.key),x(null)},sx:{fontSize:14,gap:1},children:[rt(nu,{sx:{fontSize:18,color:"#787774"}}),"\uC0C8 \uC5C5\uBB34 \uB4F1\uB85D"]}):null,Oe&&!Oe.isDefault&&!Oe.isArchived?Ut(Uo,{onClick:()=>{v(Oe.key,Oe.label,Oe.icon),x(null)},sx:{fontSize:14,gap:1},children:[rt(ch,{sx:{fontSize:18,color:"#787774"}}),"\uC218\uC815"]}):null,Oe&&!Oe.isDefault&&!Oe.isArchived?Ut(Uo,{onClick:()=>{if(y){let be=(Te.get(y.column.key)??[]).filter(ye=>!ye.completed&&!ye.archived).length;be>0?M({anchorEl:y.anchorEl,count:be}):$(y)}x(null)},sx:{fontSize:14,gap:1},children:[rt(uh,{sx:{fontSize:18,color:"#787774"}}),"\uBCF4\uAD00"]}):null,Oe&&Oe.isArchived?Ut(Uo,{onClick:()=>{k(Oe.key,!1),x(null)},sx:{fontSize:14,gap:1},children:[rt(fh,{sx:{fontSize:18,color:"#787774"}}),"\uBCF5\uC6D0"]}):null,Oe&&!Oe.isDefault?rt(ih,{}):null,Oe&&!Oe.isDefault?Ut(Uo,{onClick:()=>{y&&I(y),x(null)},sx:{fontSize:14,gap:1,color:"#e5484d"},children:[rt(dr,{sx:{fontSize:18}}),"\uC0AD\uC81C"]}):null]}),Ut(ah,{transitionDuration:0,anchorEl:w?.anchorEl??null,open:!!w,onClose:()=>_(null),children:[q?Ut(Uo,{onClick:()=>{w&&q(w.sprint.seq),_(null)},sx:{fontSize:14,gap:1},children:[rt(ch,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uC218\uC815"]}):null,j?Ut(Uo,{onClick:()=>{w&&j(w.sprint.seq,w.sprint.status==="closed"?"active":"closed"),_(null)},sx:{fontSize:14,gap:1},children:[w?.sprint.status==="closed"?rt(fh,{sx:{fontSize:18,color:"#787774"}}):rt(uh,{sx:{fontSize:18,color:"#787774"}}),w?.sprint.status==="closed"?"\uB2E4\uC2DC \uC2DC\uC791":"\uBAA9\uD45C \uC885\uB8CC"]}):null,S?rt(ih,{}):null,S?Ut(Uo,{onClick:()=>{w&&O(w),_(null)},sx:{fontSize:14,gap:1,color:"#e5484d"},children:[rt(dr,{sx:{fontSize:18}}),"\uBAA9\uD45C \uC0AD\uC81C"]}):null]}),rt(kt,{open:!!C,anchorEl:C?.anchorEl??null,title:`"${C?.sprint.name??""}" \uBAA9\uD45C\uB97C \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`,confirmText:"\uC0AD\uC81C",onCancel:()=>O(null),onConfirm:()=>{C&&S?.(C.sprint.seq),O(null)}}),rt(xn,{anchorEl:E?.anchorEl??null,open:!!E,date:E?.date??"",reminders:E?.reminders??[],onClose:()=>F(null),onDateChange:be=>{E&&(r(E.taskSeq,be),F(ye=>ye&&{...ye,date:be}))},onReminderChange:be=>{E&&(t(E.taskSeq,be),F(ye=>ye&&{...ye,reminders:be}))}}),rt(kt,{open:!!V,anchorEl:V?.anchorEl??null,title:`\uBBF8\uC644\uB8CC \uC5C5\uBB34 ${V?.count??0}\uAC74\uC774 \uC788\uC5B4 \uBCF4\uAD00\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
29
+ `,b.NAME_START_CHAR=":A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u{10000}-\u{EFFFF}",b.NAME_CHAR="-"+b.NAME_START_CHAR+".0-9\xB7\u0300-\u036F\u203F-\u2040",b.CHAR_RE=new RegExp("^["+b.CHAR+"]$","u"),b.RESTRICTED_CHAR_RE=new RegExp("^["+b.RESTRICTED_CHAR+"]$","u"),b.S_RE=new RegExp("^["+b.S+"]+$","u"),b.NAME_START_CHAR_RE=new RegExp("^["+b.NAME_START_CHAR+"]$","u"),b.NAME_CHAR_RE=new RegExp("^["+b.NAME_CHAR+"]$","u"),b.NAME_RE=new RegExp("^["+b.NAME_START_CHAR+"]["+b.NAME_CHAR+"]*$","u"),b.NMTOKEN_RE=new RegExp("^["+b.NAME_CHAR+"]+$","u");function l(o){return o>=65&&o<=90||o>=97&&o<=122||o===58||o===95||o===8204||o===8205||o>=192&&o<=214||o>=216&&o<=246||o>=248&&o<=767||o>=880&&o<=893||o>=895&&o<=8191||o>=8304&&o<=8591||o>=11264&&o<=12271||o>=12289&&o<=55295||o>=63744&&o<=64975||o>=65008&&o<=65533||o>=65536&&o<=983039}b.S_LIST=[32,10,13,9],b.isChar=function(o){return o>=1&&o<=55295||o>=57344&&o<=65533||o>=65536&&o<=1114111},b.isRestrictedChar=function(o){return o>=1&&o<=8||o===11||o===12||o>=14&&o<=31||o>=127&&o<=132||o>=134&&o<=159},b.isCharAndNotRestricted=function(o){return o===9||o===10||o===13||o>31&&o<127||o===133||o>159&&o<=55295||o>=57344&&o<=65533||o>=65536&&o<=1114111},b.isS=function(o){return o===32||o===10||o===13||o===9},b.isNameStartChar=l,b.isNameChar=function(o){return l(o)||o>=48&&o<=57||o===45||o===46||o===183||o>=768&&o<=879||o>=8255&&o<=8256}},{}],545:[function(e,d,b){"use strict";function l(o){return o>=65&&o<=90||o===95||o>=97&&o<=122||o>=192&&o<=214||o>=216&&o<=246||o>=248&&o<=767||o>=880&&o<=893||o>=895&&o<=8191||o>=8204&&o<=8205||o>=8304&&o<=8591||o>=11264&&o<=12271||o>=12289&&o<=55295||o>=63744&&o<=64975||o>=65008&&o<=65533||o>=65536&&o<=983039}Object.defineProperty(b,"__esModule",{value:!0}),b.NC_NAME_START_CHAR="A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u{10000}-\u{EFFFF}",b.NC_NAME_CHAR="-"+b.NC_NAME_START_CHAR+".0-9\xB7\u0300-\u036F\u203F-\u2040",b.NC_NAME_START_CHAR_RE=new RegExp("^["+b.NC_NAME_START_CHAR+"]$","u"),b.NC_NAME_CHAR_RE=new RegExp("^["+b.NC_NAME_CHAR+"]$","u"),b.NC_NAME_RE=new RegExp("^["+b.NC_NAME_START_CHAR+"]["+b.NC_NAME_CHAR+"]*$","u"),b.isNCNameStartChar=l,b.isNCNameChar=function(o){return l(o)||o===45||o===46||o>=48&&o<=57||o===183||o>=768&&o<=879||o>=8255&&o<=8256}},{}]},{},[15])(15)}))});var Zf="waiting",g7="replied";var fo={basis:"count",default_capacity:0,by_account:{}};function y7(e){let d=e&&typeof e=="object"&&!Array.isArray(e)?e:{},b=d.basis==="points"?"points":"count",l=Math.max(0,Math.floor(Number(d.default_capacity)||0)),o={},s=d.by_account&&typeof d.by_account=="object"?d.by_account:{};for(let[r,t]of Object.entries(s)){let n=Number(r)||0,c=Math.max(0,Math.floor(Number(t)||0));n>0&&c>0&&(o[n]=c)}return{basis:b,default_capacity:l,by_account:o}}import{createContext as Rg,useContext as Og,useMemo as Qf}from"react";import{Box as Ag}from"@mui/material";var yc="--app-mobile-font-offset";function Ir(e,d=0){return`calc(${e}px + max(0px, var(${yc}, 0px) - ${d}px))`}import{jsx as Jf}from"react/jsx-runtime";var ed=Rg({});function Dg({config:e,children:d}){let b=Qf(()=>e??{},[e]),l=b.mobileFontOffsetPx;return Jf(ed.Provider,{value:b,children:l===void 0?d:Jf(Ag,{sx:{display:"contents",[yc]:`${l}px`},children:d})})}function $t(){return Og(ed)}function ks(){let{buildFileUrl:e}=$t();return Qf(()=>e||((d,b)=>{let l=[];return b?.thumb&&l.push(`thumb=${b.thumb}`),b?.download&&l.push("download=1"),`/api/v1/files/${d}${l.length?`?${l.join("&")}`:""}`}),[e])}function Ss(){let{uploadMaxMb:e}=$t();return e??50}import{useGlobalForm as yy}from"@ehfuse/forma";import td from"@mui/icons-material/DoNotDisturbAltOutlined";import rd from"@mui/icons-material/BookmarkBorderOutlined";import Pg from"@mui/icons-material/LabelOutlined";import Ng from"@mui/icons-material/FlagOutlined";import Lg from"@mui/icons-material/StarBorderOutlined";import zg from"@mui/icons-material/FolderOutlined";import jg from"@mui/icons-material/EventOutlined";import Fg from"@mui/icons-material/BuildOutlined";import qg from"@mui/icons-material/LocalShippingOutlined";import $g from"@mui/icons-material/StorefrontOutlined";import Hg from"@mui/icons-material/GroupsOutlined";import Wg from"@mui/icons-material/LightbulbOutlined";import Ug from"@mui/icons-material/FavoriteBorderOutlined";import Vg from"@mui/icons-material/AssignmentOutlined";import Kg from"@mui/icons-material/HomeOutlined";import Gg from"@mui/icons-material/WorkOutline";import Yg from"@mui/icons-material/SchoolOutlined";import Xg from"@mui/icons-material/LocalHospitalOutlined";import Zg from"@mui/icons-material/RestaurantOutlined";import Jg from"@mui/icons-material/LocalFloristOutlined";import Qg from"@mui/icons-material/DirectionsCarOutlined";import eb from"@mui/icons-material/CampaignOutlined";import tb from"@mui/icons-material/SavingsOutlined";import rb from"@mui/icons-material/Inventory2Outlined";import nb from"@mui/icons-material/CleaningServicesOutlined";import nd from"@mui/icons-material/HandymanOutlined";import ob from"@mui/icons-material/LocalPhoneOutlined";import ib from"@mui/icons-material/EmailOutlined";import sb from"@mui/icons-material/ShoppingCartOutlined";import ab from"@mui/icons-material/BarChartOutlined";import lb from"@mui/icons-material/PrintOutlined";import cb from"@mui/icons-material/SecurityOutlined";import ub from"@mui/icons-material/AlarmOutlined";import fb from"@mui/icons-material/AttachFileOutlined";import db from"@mui/icons-material/PhotoCameraOutlined";import hb from"@mui/icons-material/ImageOutlined";import pb from"@mui/icons-material/MenuBookOutlined";import mb from"@mui/icons-material/EditOutlined";import gb from"@mui/icons-material/KeyOutlined";import bb from"@mui/icons-material/LockOutlined";import yb from"@mui/icons-material/LockOpenOutlined";import xb from"@mui/icons-material/SettingsOutlined";import vb from"@mui/icons-material/CloudOutlined";import wb from"@mui/icons-material/WifiOutlined";import _b from"@mui/icons-material/ComputerOutlined";import kb from"@mui/icons-material/SmartphoneOutlined";import Sb from"@mui/icons-material/TvOutlined";import Tb from"@mui/icons-material/AccessTimeOutlined";import Cb from"@mui/icons-material/TimerOutlined";import Bb from"@mui/icons-material/MapOutlined";import Ib from"@mui/icons-material/PlaceOutlined";import Eb from"@mui/icons-material/NavigationOutlined";import Mb from"@mui/icons-material/FlightOutlined";import Rb from"@mui/icons-material/TrainOutlined";import Ob from"@mui/icons-material/DirectionsBusOutlined";import Ab from"@mui/icons-material/DirectionsBikeOutlined";import Db from"@mui/icons-material/DirectionsWalkOutlined";import Pb from"@mui/icons-material/DirectionsRunOutlined";import Nb from"@mui/icons-material/FitnessCenterOutlined";import Lb from"@mui/icons-material/SportsSoccerOutlined";import zb from"@mui/icons-material/EmojiEventsOutlined";import jb from"@mui/icons-material/CardGiftcardOutlined";import Fb from"@mui/icons-material/CakeOutlined";import od from"@mui/icons-material/CoffeeOutlined";import qb from"@mui/icons-material/LocalPizzaOutlined";import $b from"@mui/icons-material/ShoppingBagOutlined";import id from"@mui/icons-material/CreditCardOutlined";import Hb from"@mui/icons-material/AccountBalanceOutlined";import Wb from"@mui/icons-material/AccountBalanceWalletOutlined";import Ub from"@mui/icons-material/AttachMoneyOutlined";import Vb from"@mui/icons-material/ReceiptLongOutlined";import Kb from"@mui/icons-material/CalculateOutlined";import Gb from"@mui/icons-material/TrendingUpOutlined";import Yb from"@mui/icons-material/ListAltOutlined";import Xb from"@mui/icons-material/TaskAltOutlined";import Zb from"@mui/icons-material/DoneAllOutlined";import Jb from"@mui/icons-material/WarningAmberOutlined";import Qb from"@mui/icons-material/InfoOutlined";import e1 from"@mui/icons-material/HelpOutlined";import t1 from"@mui/icons-material/SupportAgentOutlined";import r1 from"@mui/icons-material/PersonOutlined";import n1 from"@mui/icons-material/PersonAddOutlined";import o1 from"@mui/icons-material/BadgeOutlined";import i1 from"@mui/icons-material/WbSunnyOutlined";import s1 from"@mui/icons-material/DarkModeOutlined";import a1 from"@mui/icons-material/LocalFireDepartmentOutlined";import l1 from"@mui/icons-material/WaterDropOutlined";import c1 from"@mui/icons-material/BoltOutlined";import u1 from"@mui/icons-material/AutorenewOutlined";import f1 from"@mui/icons-material/ScienceOutlined";import d1 from"@mui/icons-material/MedicalServicesOutlined";import h1 from"@mui/icons-material/NotificationsOutlined";import p1 from"@mui/icons-material/SendOutlined";import m1 from"@mui/icons-material/LinkOutlined";import g1 from"@mui/icons-material/PublicOutlined";import sd from"@mui/icons-material/ApartmentOutlined";import b1 from"@mui/icons-material/PlumbingOutlined";import y1 from"@mui/icons-material/ElectricalServicesOutlined";import x1 from"@mui/icons-material/ChatOutlined";import v1 from"@mui/icons-material/DescriptionOutlined";import w1 from"@mui/icons-material/FactCheckOutlined";import _1 from"@mui/icons-material/RocketLaunchOutlined";import k1 from"@mui/icons-material/PaletteOutlined";import S1 from"@mui/icons-material/MusicNoteOutlined";import T1 from"@mui/icons-material/VideocamOutlined";import C1 from"@mui/icons-material/ThumbUpOutlined";import B1 from"@mui/icons-material/PushPinOutlined";import I1 from"@mui/icons-material/SearchOutlined";import E1 from"@mui/icons-material/VisibilityOutlined";import M1 from"@mui/icons-material/VerifiedOutlined";import R1 from"@mui/icons-material/TrackChangesOutlined";import O1 from"@mui/icons-material/ExtensionOutlined";import A1 from"@mui/icons-material/CodeOutlined";import D1 from"@mui/icons-material/BugReportOutlined";import P1 from"@mui/icons-material/SmartToyOutlined";import N1 from"@mui/icons-material/StorageOutlined";import L1 from"@mui/icons-material/QrCode2Outlined";import z1 from"@mui/icons-material/FileDownloadOutlined";import j1 from"@mui/icons-material/FileUploadOutlined";import F1 from"@mui/icons-material/MicOutlined";import q1 from"@mui/icons-material/HeadphonesOutlined";import $1 from"@mui/icons-material/MovieOutlined";import H1 from"@mui/icons-material/SportsEsportsOutlined";import W1 from"@mui/icons-material/BrushOutlined";import U1 from"@mui/icons-material/ArchitectureOutlined";import V1 from"@mui/icons-material/EngineeringOutlined";import K1 from"@mui/icons-material/FactoryOutlined";import G1 from"@mui/icons-material/AgricultureOutlined";import Y1 from"@mui/icons-material/DirectionsBoatOutlined";import X1 from"@mui/icons-material/TwoWheelerOutlined";import Z1 from"@mui/icons-material/HandshakeOutlined";import J1 from"@mui/icons-material/GavelOutlined";import Q1 from"@mui/icons-material/BalanceOutlined";import ey from"@mui/icons-material/TranslateOutlined";import ty from"@mui/icons-material/PsychologyOutlined";import ry from"@mui/icons-material/PetsOutlined";import ny from"@mui/icons-material/CelebrationOutlined";import oy from"@mui/icons-material/BeachAccessOutlined";import iy from"@mui/icons-material/AcUnitOutlined";import sy from"@mui/icons-material/ForestOutlined";import ay from"@mui/icons-material/LandscapeOutlined";import ly from"@mui/icons-material/HotelOutlined";import cy from"@mui/icons-material/LocalLaundryServiceOutlined";import uy from"@mui/icons-material/ChairOutlined";import fy from"@mui/icons-material/LocalBarOutlined";import dy from"@mui/icons-material/LunchDiningOutlined";import hy from"@mui/icons-material/IcecreamOutlined";import py from"@mui/icons-material/WorkspacePremiumOutlined";import my from"@mui/icons-material/DiamondOutlined";import gy from"@mui/icons-material/VaccinesOutlined";var xc="bookmark",ho="label",ir="notifications",cr="event",Ts="warning",Cs="#e53e3e",ad="none",vc=[{key:ad,Icon:td},{key:"label",Icon:Pg},{key:"bookmark",Icon:rd},{key:"flag",Icon:Ng},{key:"star",Icon:Lg},{key:"folder",Icon:zg},{key:"event",Icon:jg},{key:"build",Icon:Fg},{key:"shipping",Icon:qg},{key:"store",Icon:$g},{key:"groups",Icon:Hg},{key:"idea",Icon:Wg},{key:"heart",Icon:Ug},{key:"assignment",Icon:Vg},{key:"home",Icon:Kg},{key:"work",Icon:Gg},{key:"school",Icon:Yg},{key:"hospital",Icon:Xg},{key:"restaurant",Icon:Zg},{key:"flower",Icon:Jg},{key:"car",Icon:Qg},{key:"campaign",Icon:eb},{key:"savings",Icon:tb},{key:"inventory",Icon:rb},{key:"cleaning",Icon:nb},{key:"handyman",Icon:nd},{key:"phone",Icon:ob},{key:"email",Icon:ib},{key:"cart",Icon:sb},{key:"chart",Icon:ab},{key:"print",Icon:lb},{key:"security",Icon:cb},{key:"alarm",Icon:ub},{key:"attach",Icon:fb},{key:"camera",Icon:db},{key:"image",Icon:hb},{key:"book",Icon:pb},{key:"edit",Icon:mb},{key:"key",Icon:gb},{key:"lock",Icon:bb},{key:"unlock",Icon:yb},{key:"settings",Icon:xb},{key:"cloud",Icon:vb},{key:"wifi",Icon:wb},{key:"computer",Icon:_b},{key:"smartphone",Icon:kb},{key:"tv",Icon:Sb},{key:"clock",Icon:Tb},{key:"timer",Icon:Cb},{key:"map",Icon:Bb},{key:"place",Icon:Ib},{key:"navigation",Icon:Eb},{key:"flight",Icon:Mb},{key:"train",Icon:Rb},{key:"bus",Icon:Ob},{key:"bike",Icon:Ab},{key:"walk",Icon:Db},{key:"run",Icon:Pb},{key:"fitness",Icon:Nb},{key:"soccer",Icon:Lb},{key:"trophy",Icon:zb},{key:"gift",Icon:jb},{key:"cake",Icon:Fb},{key:"coffee",Icon:od},{key:"pizza",Icon:qb},{key:"bag",Icon:$b},{key:"card",Icon:id},{key:"bank",Icon:Hb},{key:"wallet",Icon:Wb},{key:"money",Icon:Ub},{key:"receipt",Icon:Vb},{key:"calculate",Icon:Kb},{key:"trending",Icon:Gb},{key:"listalt",Icon:Yb},{key:"task",Icon:Xb},{key:"doneall",Icon:Zb},{key:"warning",Icon:Jb},{key:"info",Icon:Qb},{key:"help",Icon:e1},{key:"support",Icon:t1},{key:"person",Icon:r1},{key:"personadd",Icon:n1},{key:"badge",Icon:o1},{key:"sun",Icon:i1},{key:"moon",Icon:s1},{key:"fire",Icon:a1},{key:"water",Icon:l1},{key:"bolt",Icon:c1},{key:"renew",Icon:u1},{key:"science",Icon:f1},{key:"medical",Icon:d1},{key:"notifications",Icon:h1},{key:"send",Icon:p1},{key:"link",Icon:m1},{key:"public",Icon:g1},{key:"apartment",Icon:sd},{key:"plumbing",Icon:b1},{key:"electrical",Icon:y1},{key:"chat",Icon:x1},{key:"description",Icon:v1},{key:"factcheck",Icon:w1},{key:"rocket",Icon:_1},{key:"palette",Icon:k1},{key:"music",Icon:S1},{key:"video",Icon:T1},{key:"thumbup",Icon:C1},{key:"pin",Icon:B1},{key:"search",Icon:I1},{key:"eye",Icon:E1},{key:"verified",Icon:M1},{key:"target",Icon:R1},{key:"extension",Icon:O1},{key:"code",Icon:A1},{key:"bug",Icon:D1},{key:"robot",Icon:P1},{key:"storage",Icon:N1},{key:"qrcode",Icon:L1},{key:"download",Icon:z1},{key:"upload",Icon:j1},{key:"mic",Icon:F1},{key:"headphones",Icon:q1},{key:"movie",Icon:$1},{key:"game",Icon:H1},{key:"brush",Icon:W1},{key:"architecture",Icon:U1},{key:"engineering",Icon:V1},{key:"factory",Icon:K1},{key:"agriculture",Icon:G1},{key:"boat",Icon:Y1},{key:"motorcycle",Icon:X1},{key:"handshake",Icon:Z1},{key:"gavel",Icon:J1},{key:"balance",Icon:Q1},{key:"translate",Icon:ey},{key:"psychology",Icon:ty},{key:"pets",Icon:ry},{key:"celebration",Icon:ny},{key:"beach",Icon:oy},{key:"snow",Icon:iy},{key:"forest",Icon:sy},{key:"mountain",Icon:ay},{key:"hotel",Icon:ly},{key:"laundry",Icon:cy},{key:"chair",Icon:uy},{key:"bar",Icon:fy},{key:"burger",Icon:dy},{key:"icecream",Icon:hy},{key:"medal",Icon:py},{key:"diamond",Icon:my},{key:"vaccine",Icon:gy}],by={cafe:od,payment:id,business:sd,construction:nd};function Tt(e){return e===ad?null:vc.find(d=>d.key===e)?.Icon??by[String(e??"")]??rd}function pB(e){return Tt(e)??td}var wc={title:"",icon:ho,icon_color:"",manager_name:"",manager_account_seq:0,receiver_names:[],receiver_account_seqs:[],is_notice:!1,is_event:!1,is_bug:!1,visibility:"involved",visibility_group_seq:0,repeat_rule:"",repeat_until:"",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:"",reminders:[],priority:"medium",label_keys:[],note:"",content:"",checklist:[],tab_key:""},_c={createAttachmentFiles:[],createSubmitting:!1,attachmentUpload:null};function xy(e){let{formId:d="taskbox-create-form",initialValues:b,onValidate:l,onSubmit:o}=e;return yy({formId:d,initialValues:{...wc,...b},onValidate:l,onSubmit:o})}import{useGlobalFormaState as vy}from"@ehfuse/forma";var ld="taskbox-ui-state";function po(){return vy({stateId:ld,initialValues:_c})}import{useMemo as wy}from"react";import{useTheme as _y}from"@mui/material";function Ri(e,d){let b=Math.max(0,Math.min(1,d));if(b<=0)return"transparent";let l=e.trim().replace("#",""),o=l.length===3?l.split("").map(n=>n+n).join(""):l;if(!/^[0-9a-fA-F]{6}$/.test(o))return e;let s=Number.parseInt(o.slice(0,2),16),r=Number.parseInt(o.slice(2,4),16),t=Number.parseInt(o.slice(4,6),16);return`rgba(${s}, ${r}, ${t}, ${b})`}function cd(e,d){let b=Math.max(0,Math.min(1,d)),l=e.trim().replace("#",""),o=l.length===3?l.split("").map(c=>c+c).join(""):l;if(!/^[0-9a-fA-F]{6}$/.test(o))return e;let s=c=>Math.round(c+(255-c)*b),r=s(Number.parseInt(o.slice(0,2),16)),t=s(Number.parseInt(o.slice(2,4),16)),n=s(Number.parseInt(o.slice(4,6),16));return`#${[r,t,n].map(c=>c.toString(16).padStart(2,"0")).join("")}`}function kc(e,d,b){return b==="dark"?{accent:e,accentContrast:d,accentSoft:"#1d2b45",accentOnSurface:"#b3d1ff",danger:"#f87171",dangerSoft:"#3a1f22",success:"#4ade80",warning:"#fbbf24",textStrong:"#ffffff",textPrimary:"#e2e8f0",textSecondary:"#a3adbb",textMuted:"#77808d",textInverse:"#0f1216",surface:"#161a1f",surfaceSubtle:"#1e232a",surfaceHover:"#272d36",surfaceHoverStrong:"#323a45",border:"#2c333c",borderStrong:"#3b434e"}:{accent:e,accentContrast:d,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:"#f8f8f7",surfaceHoverStrong:"#efefed",border:"#e6e6e3",borderStrong:"#dedddb"}}function ky(e,d){let b=d==="dark";return{bg:b?cd(e.accent,.45):e.accent,color:b?e.textInverse:e.accentContrast,border:"none",fontSize:11.5,fontWeight:600,minWidth:20,width:34,borderRadius:999,paddingX:.6,paddingY:.4}}function ud(e,d){return{...e,...d??{}}}function Na(e,d="light"){let b=d==="dark",l=ky(e,d),o=e.accentOnSurface;return{mode:d,colors:e,table:{bg:e.surface,borderColor:e.borderStrong,headerBg:e.surface,headerColor:e.textSecondary,headerActiveColor:e.textStrong,headerFilteredColor:o,headerFontSize:13,rowBg:e.surface,rowColor:e.textPrimary,rowSubColor:e.textSecondary,rowTitleColor:e.textStrong,rowTitleFontWeight:d==="dark"?400:500,rowHoverBg:e.surfaceHover,rowBorderColor:e.border,cellHoverBg:e.surfaceHoverStrong,emptyColor:e.textMuted,groupHeader:{bg:e.surfaceSubtle,hoverBg:e.surfaceHover,borderColor:e.border,labelColor:d==="dark"?e.textStrong:e.textPrimary,labelFontSize:15.5,labelFontWeight:d==="dark"?400:700,minHeight:48,badge:{...l,borderRadius:4,width:34}}},board:{columnBg:d==="dark"?e.surfaceSubtle:e.surface,columnHeaderColor:e.textPrimary,columnHeaderFontSize:13.5,badge:{...l,borderRadius:4,width:34}},summary:{gaugeTrackColor:d==="dark"?e.borderStrong:"#ececea",gaugeBarColor:o,gaugeCompleteColor:e.success,gaugeHeight:6,numberColor:o,overdueColor:e.danger,textColor:e.textStrong},actionButton:{bg:"#2f80ed",color:"#ffffff",hoverBg:"#2470dd",bgImage:"linear-gradient(180deg, #5ba1f5 0%, #2f80ed 100%)",hoverBgImage:"linear-gradient(180deg, #4d95ee 0%, #2470dd 100%)"},tabs:{bg:d==="dark"?e.surfaceSubtle:e.surface,color:d==="dark"?e.textSecondary:e.textStrong,hoverBg:e.surfaceHover,borderColor:d==="dark"?e.border:e.borderStrong,selectedBg:d==="dark"?e.surfaceHover:e.textStrong,selectedColor:d==="dark"?e.textStrong:e.surface},calendar:{bg:e.surface,borderColor:b?"#3a434f":e.border,headerBg:e.surfaceSubtle,headerColor:e.textSecondary,cellBg:b?"#1a1e24":e.surface,dateBandBg:e.surface,otherMonthBg:b?"#1a1e24":e.surface,todayBg:e.accentSoft,hoverBg:e.surfaceHover,dateColor:e.textPrimary,holidayColor:e.danger},card:{bg:b?"#232a33":e.surface,borderColor:b?"#333c47":e.border,hoverBg:b?"#2b3441":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:d==="dark"?e.textStrong:e.accent,separatorColor:e.surface},chip:{borderRadius:.75,fontSize:13,fontWeight:500,plainColor:d==="dark"?e.textSecondary:"#57564f",plainDotColor:e.textMuted,darkBgAlpha:.15,darkTextSource:"dot"}}}function Sc(e,d){if(!d)return e;let b=d.mode??e.mode,o={...b===e.mode?e.colors:kc(e.colors.accent,e.colors.accentContrast,b),...d.colors??{}},s=Na(o,b),{groupHeader:r,...t}=d.table??{},{badge:n,...c}=d.board??{},{badge:i,...a}=r??{};return{mode:b,colors:o,table:{...s.table,...t,groupHeader:{...s.table.groupHeader,...a,badge:ud(s.table.groupHeader.badge,i)}},board:{...s.board,...c,badge:ud(s.board.badge,n)},summary:{...s.summary,...d.summary??{}},chip:{...s.chip,...d.chip??{}},actionButton:{...s.actionButton,...d.actionButton??{}},tabs:{...s.tabs,...d.tabs??{}},avatar:{...s.avatar,...d.avatar??{}},calendar:{...s.calendar,...d.calendar??{}},card:{...s.card,...d.card??{}},timeline:{...s.timeline,...d.timeline??{}}}}function Sy(e={}){let{mode:d="light",accent:b="#2563eb",accentContrast:l="#ffffff",input:o}=e;return Sc(Na(kc(b,l,d),d),o)}function at(){let e=_y(),{theme:d}=$t(),b=e.palette.primary.main,l=e.palette.primary.contrastText,o=e.palette.mode==="dark"?"dark":"light";return wy(()=>Sc(Na(kc(b,l,o),o),d),[b,l,o,d])}import{useCallback as Un,useEffect as Ps,useMemo as Vn,useRef as Zc,useState as Kn}from"react";import{Box as wr,Divider as v2,IconButton as w2,ListItemIcon as _2,Menu as Zd,MenuItem as il}from"@mui/material";import Jd from"@mui/icons-material/Add";import k2 from"@mui/icons-material/ArrowUpward";import S2 from"@mui/icons-material/ArrowDownward";import T2 from"@mui/icons-material/KeyboardArrowDown";import C2 from"@mui/icons-material/KeyboardArrowRight";import Jc from"@mui/icons-material/Check";import B2 from"@mui/icons-material/FilterList";import I2 from"@mui/icons-material/InboxOutlined";import{Virtuoso as E2}from"react-virtuoso";import M2 from"@ehfuse/overlay-scrollbar";import{Box as fd}from"@mui/material";import{jsx as Cy,jsxs as By}from"react/jsx-runtime";var Ty={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 Fr({priority:e,small:d=!1,plain:b=!1}){let l=Ty[e],o=at(),s=o.mode==="dark",r=b||e==="low";return By(fd,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:d?.5:.75,px:r?0:d?.9:1.25,py:r?0:d?.25:.5,borderRadius:.75,fontSize:d?11.5:13,fontWeight:500,bgcolor:r?"transparent":s?Ri(l.dot,o.chip.darkBgAlpha):l.bgcolor,color:r?s?o.chip.plainColor:l.color:s?o.chip.darkTextSource==="fg"?l.color:l.dot:l.color,whiteSpace:"nowrap"},children:[Cy(fd,{component:"span",sx:{width:d?6:8,height:d?6:8,borderRadius:"50%",bgcolor:l.dot}}),l.label]})}import{Divider as Oy,Menu as Ay,MenuItem as gd}from"@mui/material";import Dy from"@mui/icons-material/Check";function qn(){return{}}var Tc=[{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"}],Cc=[{key:"desktop",name:"\uB370\uC2A4\uD06C\uD1B1"},{key:"tablet",name:"\uD0DC\uBE14\uB9BF"},{key:"mobile",name:"\uD734\uB300\uD3F0"}],Bc=[{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 dd(e){return Tc.find(d=>d.key===e)?.name??""}function hd(e){return Cc.find(d=>d.key===e)?.name??""}function La(e){return Bc.find(d=>d.key===e)?.name??""}function Ic(e,d=new Date){if(!e.is_event)return!1;let b=String(e.due_date??"").trim().slice(0,10);if(!/^\d{4}-\d{2}-\d{2}$/.test(b))return!1;let l=String(e.event_time??"").trim();if(/^\d{2}:\d{2}$/.test(l)){let s=new Date(`${b}T${l}:00`);return!Number.isNaN(s.getTime())&&s.getTime()<=d.getTime()}let o=new Date(`${b}T00:00:00`);return Number.isNaN(o.getTime())?!1:(o.setDate(o.getDate()+1),o.getTime()<=d.getTime())}function za(e,d=new Date){return e.is_event?Ic(e,d):!!e.completed}var cn=[{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:"review_waiting",name:"\uAC80\uD1A0\uB300\uAE30",bg:"#ede9fe",fg:"#5b3fa8",dot:"#8b5cf6"},{key:"hold",name:"\uBCF4\uB958",bg:"#fbeee0",fg:"#8a5a2b",dot:"#d9730d"}],Es=cn;function ja(e){return cn.find(d=>d.key===e)??cn[0]}var Bs={key:"completed",name:"\uC644\uB8CC",bg:"#e3eefb",fg:"#1d4f91",dot:"#2f80ed"};function ur(e){if(e.is_notice)return pd(e.status);if(e.is_bug&&e.completed){let d=La(e.resolution)||"\uC644\uB8CC";return{...Bs,name:d}}return e.completed&&e.status!=="hold"?Bs:e.is_bug?Ey(e.status):ja(e.status)}var Iy={key:"event_ended",name:"\uC885\uB8CC",bg:"#efefed",fg:"#57564f",dot:"#9a9a97"};function Ms(e){return Ic(e)?Iy:null}var Is=[{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 pd(e){return Is.find(d=>d.key===e)??Is[1]}var Ec="__closed__",ai=[{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"}],$B=[...ai.filter(e=>e.key!=="bug_hold"),{key:Ec,name:"\uC644\uB8CC",bg:"#e3eefb",fg:"#1d4f91",dot:"#2f80ed"},...ai.filter(e=>e.key==="bug_hold")];function Ey(e){return ai.find(d=>d.key===e)??ai[0]}function Fa(e){return e.is_notice?Is:e.is_bug?ai:Es}function HB(e){return e.status===Zf}var My={in_progress:0,not_started:2,hold:3};function WB(e){return e.completed?9:My[String(e.status??"")]??2}function Oi(e,d){let b=new Map(d.map(o=>[o.key,o])),l=(e.label_keys??[]).map(o=>b.get(o)).filter(o=>!!o);if(e.is_event){let o=Ms({is_event:!0,due_date:String(e.due_date??""),event_time:e.event_time});return o?[o,...l]:l}return e.is_notice?String(e.status??"")==="notice_active"?l:[pd(e.status),...l]:e.is_bug?[ur({...e,is_notice:!1}),...l]:e.completed?[Bs,...l]:[ja(e.status),...l]}function md(e){return{bg:`${e}1f`,fg:e,dot:e}}function qa(e,d){return e.includes(d)?e.filter(b=>b!==d):[...e,d]}import{Box as $a}from"@mui/material";import{jsx as Rs,jsxs as Ry}from"react/jsx-runtime";function At({option:e,small:d=!1}){let b=at(),l=b.mode==="dark",o=e.key==="not_started";return Ry($a,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:d?.5:.75,...o?{pr:d?.5:.75}:{px:d?.9:1.25},py:o?0:d?.25:.5,borderRadius:1.25,fontSize:d?11.5:13,fontWeight:500,bgcolor:o?"transparent":l?Ri(e.dot,b.chip.darkBgAlpha):e.bg,color:o?l?b.chip.plainColor:e.fg:l?b.chip.darkTextSource==="fg"?e.fg:e.dot:e.fg,whiteSpace:"nowrap"},children:[Rs($a,{component:"span",sx:{width:d?6:8,height:d?6:8,borderRadius:"50%",bgcolor:e.dot,flexShrink:0}}),e.name]})}function XB({task:e,statusOptions:d,small:b=!1}){let l=Oi(e,d);return l.length===0?null:Rs($a,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:.5},children:l.map(o=>Rs(At,{option:o,small:b},o.key))})}function qo({labelKeys:e,labelOptions:d}){let b=new Map(d.map(o=>[o.key,o])),l=e.map(o=>b.get(o)).filter(o=>!!o);return l.length===0?null:Rs($a,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:.5},children:l.map(o=>Rs(At,{option:o,small:!0},o.key))})}import{jsx as Os,jsxs as bd}from"react/jsx-runtime";function Ai({anchorEl:e,value:d,options:b=cn,onSelect:l,onComplete:o,onClose:s}){let r=qn();return bd(Ay,{anchorEl:e,open:!!e,onClose:s,transitionDuration:0,...r,children:[b.map(t=>bd(gd,{onClick:()=>{l(t.key),s()},sx:{fontSize:14,minWidth:150,gap:1},children:[Os(At,{option:t}),d===t.key?Os(Dy,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},t.key)),o?[Os(Oy,{sx:{my:.5}},"complete-divider"),Os(gd,{onClick:()=>{o(),s()},sx:{fontSize:14,minWidth:150,gap:1},children:Os(At,{option:Bs})},"complete")]:null]})}function Mc(e){let d=String(e??"").trim().replace("T"," "),b=d.match(/^(\d{4})-(\d{2})-(\d{2})(?:[ ](\d{2}):(\d{2})(?::(\d{2}))?)?/);return b?new Date(Number(b[1]),Number(b[2])-1,Number(b[3]),Number(b[4]??0),Number(b[5]??0),Number(b[6]??0)):new Date(d)}function vr(e,d="YYYY-MM-DD"){let b=typeof e=="string"?Mc(e):e;if(!e||e===""||isNaN(b.getTime()))return"";let l=b.getFullYear(),o=(b.getMonth()+1).toString().padStart(2,"0"),s=b.getDate().toString().padStart(2,"0"),r=l.toString().slice(-2);switch(d){case"YYYY-MM-DD":return`${l}-${o}-${s}`;case"YY.MM.DD":return`${r}.${o}.${s}`;case"MM/DD/YYYY":return`${o}/${s}/${l}`;case"DD.MM.YYYY":return`${s}.${o}.${l}`;case"YYYYMMDD":return`${l}${o}${s}`;default:return d.replace(/YYYY/g,l.toString()).replace(/YY/g,r).replace(/MM/g,o).replace(/DD/g,s)}}function yd(){return vr(new Date)}var Rc=[{value:"due",label:"\uADF8\uB8F9 : \uB9C8\uAC10\uC608\uC815"},{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"}],Py="__notice__",Ny="__bug__",Ly="__support__";function zy(e){let d=new Date(`${e}T00:00:00`);return d.setDate(d.getDate()+(6-d.getDay())),vr(d)}var jy=[{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 Fy(e,d,b){let l=e.due_date.slice(0,10);return l?l<d?"overdue":l===d?"today":l<=b?"this_week":"later":"no_due"}function Ha(e,d,b,l=[],o=[],s="",r,t=!1){let n=e.filter(f=>f.is_notice);if(n.length>0){let f=Ha(e.filter(u=>!u.is_notice),d,b,l,o,s,r,t);return[{key:Py,label:"\uACF5\uC9C0\uC0AC\uD56D",tasks:n},...f]}if(t){let f=e.filter(g=>g.is_bug),u=e.filter(g=>!g.is_bug&&g.is_support);if(f.length>0||u.length>0){let g=Ha(e.filter(m=>!m.is_bug&&!m.is_support),d,b,l,o,s,r,!1);return[...f.length>0?[{key:Ny,label:"\uC624\uB958",tasks:f}]:[],...u.length>0?[{key:Ly,label:"\uACE0\uAC1D\uC13C\uD130",tasks:u}]:[],...g]}}let c=new Map,i=(f,u)=>{let g=c.get(f);g?g.push(u):c.set(f,[u])},a;if(d==="due"){let f=zy(b);for(let u of e)i(Fy(u,b,f),u);a=jy}else if(d==="status"){for(let f of e)i(ja(f.status).key,f);a=cn.map(f=>({key:f.key,label:f.name}))}else if(d==="tab"){for(let f of e)i(f.tab_key?.trim()||"__none__",f);a=[...l.filter(f=>!f.archived).map(f=>({key:f.key,label:f.label})),{key:"__none__",label:"\uAE30\uBCF8 \uC5C5\uBB34\uD568"},...l.filter(f=>f.archived).map(f=>({key:f.key,label:`${f.label} (\uBCF4\uAD00\uB428)`}))]}else if(r?.enabled){let f=Number(r.myAccountSeq??0),u=s.trim();for(let g of e){if(g.is_event){i("__event__",g);continue}if(!(Number(g.manager_account_seq??0)>0||String(g.manager_name??"").trim()!=="")){i("__none__",g);continue}let v=f>0&&Number(g.manager_account_seq??0)===f||!!u&&String(g.manager_name??"").trim()===u;i(v?"__manager__":"__reference__",g)}a=[{key:"__manager__",label:"\uCC45\uC784\uC790"},{key:"__none__",label:"\uCC45\uC784\uC790 \uBBF8\uBC30\uC815"},{key:"__event__",label:"\uC77C\uC815"},{key:"__reference__",label:"\uCC38\uC870\uC790"}]}else{for(let v of e)i(v.is_event?"__event__":String(v.manager_name??"").trim()||"__none__",v);let f=s.trim(),u=[...c.keys()].filter(v=>v!=="__none__"&&v!=="__event__").sort((v,k)=>{if(f){if(v===f)return-1;if(k===f)return 1}return v.localeCompare(k)}),g=!!f&&u.includes(f),m=u.filter(v=>v!==f);a=[...g?[{key:f,label:"\uB0B4 \uC5C5\uBB34"}]:[],{key:"__none__",label:"\uCC45\uC784\uC790 \uBBF8\uBC30\uC815"},{key:"__event__",label:"\uC77C\uC815"},...m.map(v=>({key:v,label:v}))]}let h=[];for(let f of a){let u=c.get(f.key);!u||u.length===0||h.push({key:f.key,label:f.label,tasks:u})}return h}import qy from"@mui/icons-material/LabelOutlined";import $y from"@mui/icons-material/NotesOutlined";import Hy from"@mui/icons-material/AutorenewOutlined";import Wy from"@mui/icons-material/CalendarTodayOutlined";import Uy from"@mui/icons-material/EventOutlined";import xd from"@mui/icons-material/PersonOutlineOutlined";import vd from"@mui/icons-material/PeopleAltOutlined";import Dc from"@mui/icons-material/CheckCircleOutlineOutlined";import Vy from"@mui/icons-material/FlagOutlined";import Pc from"@mui/icons-material/AccessTimeOutlined";import Ky from"@mui/icons-material/StickyNote2Outlined";import Gy from"@mui/icons-material/ViewKanbanOutlined";import Yy from"@mui/icons-material/ConfirmationNumberOutlined";import Xy from"@mui/icons-material/QuestionAnswerOutlined";import{jsx as fr}from"react/jsx-runtime";var wd={completed:"50px",ticket_no:"100px",title:"minmax(220px, 1.8fr)",status:"110px",start_date:"132px",due_date:"132px",manager_name:"110px",receiver_names:"170px",answerer_names:"110px",targets:"170px",priority:"84px",ack:"104px",confirm:"100px",project:"150px",request:"100px",deleted_time:"150px",completed_time:"150px",created_time:"132px",note:"minmax(140px, 0.7fr)",origin_license_name:"150px",support_type:"90px",author_name:"110px"};function _d(e){return Ua(e).map(d=>wd[d.id]).join(" ")}function kd(e){return Ua(e).reduce((d,b)=>{let l=wd[b.id]??"",o=/^(\d+)px$/.exec(l);if(o)return d+Number(o[1]);let s=/^minmax\((\d+)px/.exec(l);return s?d+Number(s[1]):d},0)}var Zy={id:"deleted_time",label:"\uC0AD\uC81C\uC77C\uC2DC",icon:fr(Pc,{sx:{fontSize:15}}),align:"center",sortable:!0},Jy={id:"completed_time",label:"\uC644\uB8CC\uC77C\uC2DC",icon:fr(Pc,{sx:{fontSize:15}}),align:"center",sortable:!0},Qy={id:"created_time",label:"\uC791\uC131\uC77C\uC2DC",icon:fr(Pc,{sx:{fontSize:15}}),align:"center",sortable:!0},ex={id:"ticket_no",label:"\uD2F0\uCF13",icon:fr(Yy,{sx:{fontSize:15}}),align:"center"},tx={id:"support_type",label:"\uC885\uB958",icon:fr(qy,{sx:{fontSize:15}}),align:"center"},rx={id:"author_name",label:"\uC791\uC131\uC790",icon:fr(xd,{sx:{fontSize:15}}),align:"center",valueFilter:"author_name"},nx={id:"answerer_names",label:"\uB2F5\uBCC0\uC790",icon:fr(Xy,{sx:{fontSize:15}}),align:"center",valueFilter:"answerer_names"},ox={id:"project",label:"\uD504\uB85C\uC81D\uD2B8",icon:fr(Gy,{sx:{fontSize:15}}),projectFilter:!0},ix={id:"targets",label:"\uB300\uC0C1\uC790",icon:fr(vd,{sx:{fontSize:15}})},Ac={id:"priority",label:"\uC911\uC694\uB3C4",icon:fr(Vy,{sx:{fontSize:15}}),align:"center",priorityFilter:!0},sx={id:"ack",label:"\uD655\uC778",icon:fr(Dc,{sx:{fontSize:15}}),align:"center",ackFilter:!0},ax={id:"confirm",label:"\uD655\uC778",icon:fr(Dc,{sx:{fontSize:15}}),align:"center",ackFilter:!0};function Oc(e){let d=e.findIndex(l=>l.id==="receiver_names"||l.id==="targets"),b=d>=0?d+1:e.findIndex(l=>l.id==="note");return b<0?[...e,Ac]:[...e.slice(0,b),Ac,...e.slice(b)]}function Ua(e){let{showProject:d=!1,showManager:b=!0,showActions:l=!0,showRequest:o=!0,notice:s=!1,bug:r=!1,support:t=!1,centerManager:n=!1,trash:c=!1,confirmMode:i="none"}=e??{};if(t){let u=g=>Wa.find(m=>m.id===g);return[u("completed"),tx,u("title"),u("status"),Qy,u("start_date"),u("due_date"),rx,nx,{...u("manager_name"),align:"center"},u("receiver_names"),Ac]}let a=u=>{if(!r)return u;let g=u.filter(k=>k.id!=="note"),m=g.findIndex(k=>k.id==="completed"),v=m>=0?m+1:0;return[...g.slice(0,v),ex,...g.slice(v)]};if(s)return a(Oc(Wa.filter(u=>!["manager_name","receiver_names","request"].includes(u.id)).flatMap(u=>u.id==="due_date"?[u,ix]:u.id==="note"?[sx,u]:[u])));let h=b?Wa:Wa.filter(u=>u.id!=="manager_name");if(n&&(h=h.map(u=>u.id==="manager_name"?{...u,align:"center"}:u)),l)o||(h=h.filter(u=>u.id!=="request"));else{h=h.filter(g=>g.id!=="request");let u=h.findIndex(g=>g.id==="note");h=[...h.slice(0,u),c?Zy:Jy,...h.slice(u)]}if(i==="action"){let u=h.findIndex(g=>g.id==="note");h=[...h.slice(0,u),ax,...h.slice(u)]}if(!d)return a(Oc(h));let f=h.findIndex(u=>u.id==="receiver_names");return a(Oc([...h.slice(0,f+1),ox,...h.slice(f+1)]))}var Wa=[{id:"completed",label:"\uC644\uB8CC",icon:null,align:"center"},{id:"title",label:"\uC81C\uBAA9",icon:fr($y,{sx:{fontSize:15}}),sortable:!0},{id:"status",label:"\uC0C1\uD0DC",icon:fr(Hy,{sx:{fontSize:15}}),align:"center",statusFilter:!0},{id:"start_date",label:"\uC2DC\uC791\uC77C\uC2DC",icon:fr(Wy,{sx:{fontSize:15}}),align:"center",sortable:!0},{id:"due_date",label:"\uB9C8\uAC10\uC608\uC815",icon:fr(Uy,{sx:{fontSize:15}}),align:"center",sortable:!0},{id:"manager_name",label:"\uCC45\uC784\uC790",icon:fr(xd,{sx:{fontSize:15}}),memberFilter:"manager"},{id:"receiver_names",label:"\uCC38\uC870\uC790",icon:fr(vd,{sx:{fontSize:15}}),memberFilter:"receivers"},{id:"request",label:"\uD655\uC778",icon:fr(Dc,{sx:{fontSize:15}}),align:"center",ackFilter:!0},{id:"note",label:"\uBE44\uACE0",icon:fr(Ky,{sx:{fontSize:15}})}];import{Button as Sd,ClickAwayListener as ux,Dialog as fx,Paper as dx,Popper as hx,Typography as px,Box as mx}from"@mui/material";import{useMediaQuery as lx,useTheme as cx}from"@mui/material";function Lt(){let{isMobile:e}=$t(),d=cx(),b=lx(d.breakpoints.up("lg"));return e!==void 0?e:!b}import{Fragment as bx,jsx as $o,jsxs as Cd}from"react/jsx-runtime";function Td(){if(typeof document>"u")return;let e=0,d=l=>{l.stopPropagation(),l.preventDefault(),b()},b=()=>{window.clearTimeout(e),document.removeEventListener("click",d,!0)};document.addEventListener("click",d,!0),e=window.setTimeout(b,350)}function gx({title:e,content:d,confirmText:b,cancelText:l,titleFontSize:o,actionFontSize:s,actionMinHeight:r,onCancel:t,onConfirm:n}){return Cd(bx,{children:[$o(px,{component:"div",sx:{fontSize:o,fontWeight:700,color:"#0f172a",lineHeight:1.4},children:e}),d,Cd(mx,{sx:{display:"flex",gap:2,justifyContent:"flex-end"},children:[$o(Sd,{size:"medium",variant:"outlined",color:"inherit",onClick:()=>{Td(),t()},fullWidth:!0,sx:{fontSize:s,minHeight:r,fontWeight:700},children:l}),$o(Sd,{size:"medium",variant:"contained",color:"primary",onClick:()=>{Td(),n()},fullWidth:!0,sx:{fontSize:s,minHeight:r,fontWeight:700},children:b})]})]})}function kt({open:e,anchorEl:d,title:b="\uD655\uC778\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",content:l,confirmText:o="\uD655\uC778",cancelText:s="\uCDE8\uC18C",placement:r="top",minWidth:t=160,minHeight:n,titleFontSize:c=17,actionFontSize:i=16,actionMinHeight:a=44,zIndex:h=1300,onCancel:f,onConfirm:u}){let g=Lt(),m=$o(gx,{title:b,content:l,confirmText:o,cancelText:s,titleFontSize:c,actionFontSize:i,actionMinHeight:a,onCancel:f,onConfirm:u});return g?$o(fx,{open:e,onClose:f,sx:{zIndex:h},slotProps:{paper:{sx:{p:3,display:"flex",flexDirection:"column",gap:3,minWidth:260}}},children:m}):$o(hx,{open:e,anchorEl:d,placement:r,sx:{zIndex:h},children:$o(ux,{onClickAway:f,children:$o(dx,{elevation:4,sx:{p:3,display:"flex",flexDirection:"column",gap:3,minWidth:t,minHeight:n,justifyContent:n?"space-between":"flex-start"},onClick:v=>v.stopPropagation(),onMouseDown:v=>v.stopPropagation(),children:m})})})}import{memo as $x}from"react";function En(e){let d=e.visibility;return d==="involved"||d==="group"||d==="all"?d:e.is_open?"all":"involved"}function Va(e,d,b=0){if(d<=0)return!1;if(e.is_notice){if((e.author_account_seq??0)===d)return!0;let s=(e.target_account_seqs??[]).filter(r=>r>0);return s.length===0||s.includes(d)}if((e.author_account_seq??0)===d||(e.manager_account_seq??0)===d||(e.receiver_account_seqs??[]).includes(d))return!0;let o=En(e);if(o==="all")return!0;if(o==="group"){let s=e.visibility_group_seq??0;return s>0&&b===s}return!1}function Bd(e){return e.is_notice||e.is_event||e.completed||e.archived||(e.manager_account_seq??0)!==0?!1:En(e)!=="involved"}function Ka(e,d){return d<=0||(e.author_account_seq??0)===d?!1:Bd(e)}function Ga(e,d){return d<=0||e.is_notice||e.is_event||e.completed||e.archived||(e.manager_account_seq??0)>0||(e.author_account_seq??0)===d||Bd(e)?!1:(e.receiver_account_seqs??[]).includes(d)}function Id(e){return!!e.is_bug&&(e.manager_account_seq??0)===0&&e.status==="bug_received"}function Ed(e){return(e.origin_license_seq??0)>0}function Md(e,d){if(d<=0)return!1;let b=(e.author_account_seq??0)===d;return e.is_notice?b:b||(e.manager_account_seq??0)===d}function mo(e,d){return d<=0?!1:Ed(e)?!0:e.is_notice?(e.author_account_seq??0)===d:(e.author_account_seq??0)===d||(e.manager_account_seq??0)===d||(e.receiver_account_seqs??[]).includes(d)}var AI=[119,121,141,143];function Ya(e,d){let b=String(e.origin_author_avatar??"").trim(),l=String(e.author_name||e.origin_author_name||e.created_by||"").trim();if(!b||!l||!Ed(e)||d?.get(l)===b)return d;let o=new Map(d??[]);return o.set(l,b),o}import{memo as Rx,useEffect as Ox,useRef as Ax,useState as zd}from"react";import{Box as xt,Button as Dx,ButtonBase as Px,Checkbox as Nx,Tooltip as Li}from"@mui/material";import Lx from"@mui/icons-material/PublicOutlined";import zx from"@mui/icons-material/Group";import jx from"@mui/icons-material/CheckCircle";import Fx from"@mui/icons-material/CheckCircleOutlineOutlined";import{useEffect as yx,useState as Rd}from"react";import{Avatar as Od,Box as xx}from"@mui/material";import vx from"@mui/icons-material/PersonOutlineOutlined";import{jsx as Xa}from"react/jsx-runtime";var Nc=new Set,Ad=e=>e.startsWith("data:")||e.startsWith("blob:");function wx(e){let d=e.trim();return d?([...d][0]??"").toUpperCase():""}function bn({src:e,name:d="",avatarSx:b,iconFontSize:l=40}){let[o,s]=Rd(()=>e?Ad(e)||Nc.has(e):!1),[r,t]=Rd(!1),n={position:"relative",overflow:"hidden",borderRadius:"15px"},c=b?[n,...Array.isArray(b)?b:[b]]:n;if(yx(()=>{t(!1),s(e?Ad(e)||Nc.has(e):!1)},[e]),!e||r){let i=wx(d);return Xa(Od,{sx:c,children:i?Xa(xx,{component:"span",sx:{fontSize:"inherit",fontWeight:600,lineHeight:1,userSelect:"none"},children:i}):Xa(vx,{sx:{fontSize:l}})})}return Xa(Od,{src:e,imgProps:{onLoad:()=>{Nc.add(e),s(!0)},onError:()=>t(!0),style:o?void 0:{opacity:0}},sx:c})}var _x=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Za=(e,d)=>{if(!d||!d.trim())return[{text:e,highlight:!1}];try{let b=_x(d.trim()),l=new RegExp(`(${b})`,"gi");return e.split(l).map(s=>s.toLowerCase()===d.trim().toLowerCase()?{text:s,highlight:!0}:{text:s,highlight:!1}).filter(s=>s.text)}catch{return[{text:e,highlight:!1}]}};var kx=["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"];function yn(e){let d=String(e??"").trim().slice(0,10);if(!/^\d{4}-\d{2}-\d{2}$/.test(d))return"";let b=new Date(`${d}T00:00:00`);return Number.isNaN(b.getTime())?"":`${d.slice(2).replaceAll("-",".")} (${kx[b.getDay()]})`}function Lc(e){let d=String(e??"").trim().slice(0,10);if(!/^\d{4}-\d{2}-\d{2}$/.test(d))return"";let b=Number(d.slice(5,7)),l=Number(d.slice(8,10));return!b||!l?"":`${b}\uC6D4 ${l}\uC77C`}function un(e){let d=String(e??"").trim(),[b,l=""]=d.split(" "),o=yn(b);return o?l?`${o} ${l.slice(0,5)}`:o:""}function Di(e,d){let b=(e.checklist??[]).filter(o=>!(d&&o.task_seq&&!d(Number(o.task_seq))));return b.length===0?"":`${b.filter(o=>o.checked).length}/${b.length}`}import{Box as Dd,Tooltip as Sx}from"@mui/material";import{jsx as Ja}from"react/jsx-runtime";var Pi=[{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 qr({names:e,size:d=22,ringFirst:b=!1,avatarSrcByName:l}){let o=at(),s=$t().avatarSrcByName,r=l??s;return Ja(Dd,{sx:{display:"flex",alignItems:"center"},children:e.map((t,n)=>Ja(Sx,{title:b&&n===0?`\uCC45\uC784\uC790 \xB7 ${t}`:t,arrow:!0,children:Ja(Dd,{sx:{ml:n===0?0:"-7px",zIndex:n,borderRadius:"50%",border:`2px solid ${o.avatar.separatorColor}`,display:"inline-flex",...o.avatar.sx},children:Ja(bn,{src:r?.get(t)??"",name:t,avatarSx:{width:d,height:d,fontSize:Math.round(d/2),borderRadius:"50%",...Pi[n%Pi.length]},iconFontSize:Math.round(d*.6)})})},`${t}-${n}`))})}import{Box as Pd,Button as Ld}from"@mui/material";import Tx from"@mui/icons-material/CheckCircle";import{Fragment as Ix,jsx as As,jsxs as Nd}from"react/jsx-runtime";function Cx(e){let d=e.mode==="dark";return{minWidth:0,width:"100%",px:1,py:.25,gap:.5,fontSize:13,color:e.table.rowColor,borderColor:e.colors.borderStrong,background:d?e.colors.surfaceHover:"linear-gradient(180deg, #ffffff 0%, #f6f7f9 100%)",whiteSpace:"nowrap","&:hover":{background:d?e.colors.surfaceSubtle:"linear-gradient(180deg, #fcfcfd 0%, #f0f2f4 100%)",borderColor:e.colors.borderStrong}}}function Bx(e){return{minWidth:0,px:1.25,py:.25,fontSize:13,whiteSpace:"nowrap",color:e.actionButton.color,backgroundColor:e.actionButton.bg,backgroundImage:e.actionButton.bgImage,boxShadow:"none","&:hover":{backgroundColor:e.actionButton.hoverBg,backgroundImage:e.actionButton.hoverBgImage,boxShadow:"none"},...e.actionButton.sx}}function $n({onClick:e,children:d,fullWidth:b=!1,sx:l}){let o=at();return As(Ld,{size:"small",variant:"contained",color:"inherit",fullWidth:b,sx:[Bx(o),...Array.isArray(l)?l:l?[l]:[]],onClick:s=>{s.stopPropagation(),e(s)},children:d})}function Ni({canConfirm:e,count:d,total:b,myConfirmed:l=!1,onConfirm:o,onShowList:s}){let r=at(),t=Cx(r);return e?As($n,{onClick:()=>o(),children:"\uD655\uC778"}):Nd(Ld,{size:"small",variant:"outlined",color:"inherit",sx:t,onClick:n=>{n.stopPropagation(),s(n.currentTarget)},children:[l?As(Tx,{sx:{fontSize:16,color:"#2f80ed",flexShrink:0}}):null,As(Pd,{component:"span",sx:{flex:1,textAlign:"center",minWidth:0},children:b>0&&d>=b?"\uD655\uC778\uC644\uB8CC":Nd(Ix,{children:[d,As(Pd,{component:"span",sx:{mx:.15},children:"/"}),b]})})]})}import{SvgIcon as Ex}from"@mui/material";import{jsx as Qa,jsxs as Mx}from"react/jsx-runtime";function Ho({sx:e,...d}){return Mx(Ex,{viewBox:"0 0 48 48",...d,sx:{fill:"none",...e},children:[Qa("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"}),Qa("circle",{cx:"23.91",cy:"21.46",r:"2.71",fill:"currentColor",stroke:"none"}),Qa("circle",{cx:"33.65",cy:"21.46",r:"2.71",fill:"currentColor",stroke:"none"}),Qa("circle",{cx:"14.18",cy:"21.46",r:"2.71",fill:"currentColor",stroke:"none"})]})}import{Fragment as Fc,jsx as Fe,jsxs as ji}from"react/jsx-runtime";function Ds(e){let d=String(e??"").trim();if(!d)return"-";let b=d.slice(2,10).replaceAll("-","."),l=d.slice(11,16);return/^\d{2}:\d{2}$/.test(l)?`${b} ${l}`:b}function qx(e){let d=String(e.event_time??"").trim();return e.is_event&&/^\d{2}:\d{2}$/.test(d)?Ds(`${String(e.due_date??"").slice(0,10)} ${d}`):Ds(e.due_date)}function jc(e,d){let b=String(e??"").trim()||"-";return Za(b,d).map((l,o)=>Fe("span",{className:l.highlight?"font-semibold text-blue-600":void 0,children:l.text},`${l.text}-${o}`))}function zi({names:e,searchText:d,avatarSrcByName:b,emphasize:l=!1}){let o=e.filter(s=>s.trim());if(o.length===0)return null;if(o.length===1){let s=o[0]??"";return ji(Fc,{children:[Fe(bn,{src:b?.get(s)??"",name:s,avatarSx:{width:24,height:24,fontSize:12,borderRadius:"50%",...Pi[0]},iconFontSize:15}),Fe(xt,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...l?{fontWeight:500,color:"#2f80ed"}:{}},children:jc(s,d)})]})}return Fe(qr,{names:o,size:22,avatarSrcByName:b})}function jd({display:e,summary:d,searchText:b,avatarSrcByName:l}){if(!e||e.kind==="everyone")return Fe(xt,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:d||"\uBAA8\uB4E0 \uC9C1\uC6D0"});let{teamNames:o,individualNames:s}=e;if(o.length===0)return Fe(zi,{names:s,searchText:b,avatarSrcByName:l});let r=[...o,...s],t=r.join(", ");return r.length>2?Fe(Li,{title:t,arrow:!0,children:Fe(xt,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:`${r[0]}, ${r[1]} \uC678 ${r.length-2}\uBA85`})}):Fe(Li,{title:t,arrow:!0,children:ji(xt,{sx:{display:"flex",alignItems:"center",gap:.75,minWidth:0},children:[Fe(xt,{component:"span",sx:{flexShrink:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:o.join(", ")+(s.length>0?",":"")}),s.length>0?Fe(zi,{names:s,searchText:b,avatarSrcByName:l}):null]})})}function el(e){return e==="\uC624\uB958\uC81C\uBCF4"?"\uC624\uB958":e}function Fd(e){return e==="\uBB38\uC758"?{bg:"#e8f1fd",fg:"#2f80ed"}:e==="\uAC74\uC758\uC0AC\uD56D"?{bg:"#f1ecfe",fg:"#8b5cf6"}:e==="\uC624\uB958\uC81C\uBCF4"?{bg:"#fdecec",fg:"#e5484d"}:e==="\uC0C1\uB2F4\uC2E0\uCCAD"?{bg:"#e6f7ec",fg:"#1f8a4c"}:{bg:"#f1f1ef",fg:"#6f6f6c"}}function zc({label:e,bg:d,fg:b}){return Fe(xt,{component:"span",sx:{flexShrink:0,px:.75,fontSize:12,fontWeight:500,lineHeight:"20px",color:b,bgcolor:d,borderRadius:"4px",whiteSpace:"nowrap",maxWidth:140,overflow:"hidden",textOverflow:"ellipsis"},children:e})}var qd=Rx(function({task:d,gridTemplate:b,statusOptions:l,avatarSrcByName:o,searchText:s,myAccountSeq:r=0,todayStr:t,showProject:n=!1,showManager:c=!0,showActions:i=!0,showRequest:a=!0,confirmMode:h="none",bugMode:f=!1,supportMode:u=!1,managerCentered:g=!1,trashMode:m=!1,dimCompleted:v=!0,confirmInfo:k,onConfirmTask:B,projectLabel:R="",projectIcon:L="",onProjectClick:A,onRequestToggleCompleted:P,onDateClick:N,onChangeNote:q,onMemberClick:j,onClaimClick:S,onVolunteerClick:T,onStatusClick:D,onOpenDetail:p,onTaskContextMenu:y,hideBottomBorder:x=!1,completeLocked:w=!1,unread:_=!1,notice:C=!1,noticeReadOnly:O=!1,readOnly:z=!1,onIconClick:$,lastColumnCentered:V=!1,noteLocked:M=!1,targetSummary:H="",targetDisplay:I,onArchiveTask:E,ackInfo:F,onAckConfirm:U,onAckListClick:Y,onPriorityClick:K}){let[W,X]=zd(!1),[J,G]=zd(""),te=Ax(null);Ox(()=>{if(!W)return;let ee=Se=>{let ge=te.current;ge&&(Se.target instanceof Node&&ge.contains(Se.target)||ge.blur())};return document.addEventListener("mousedown",ee,!0),document.addEventListener("touchstart",ee,!0),()=>{document.removeEventListener("mousedown",ee,!0),document.removeEventListener("touchstart",ee,!0)}},[W]);let Z=[d.manager_account_seq??0,...d.receiver_account_seqs??[]].some(ee=>ee>0&&ee!==(d.author_account_seq??0)),re=O||z,ie=r>0&&!d.is_notice&&!d.is_event&&(d.manager_account_seq??0)===r,se=re||!!d.is_notice,oe=at(),pe=!!S&&Ka(d,r),me=!!T&&Ga(d,r),ke=se&&!Id(d),Le=d.is_notice?Fe(Ni,{canConfirm:!!F?.canAck,count:F?.count??0,total:F?.total??0,myConfirmed:!!F?.acked,onConfirm:()=>U?.(d),onShowList:ee=>Y?.(d,ee)}):null,Te=!d.is_notice&&!d.completed&&!!d.due_date&&d.due_date.slice(0,10)<=t,Me=Di(d,$t().resolveTask),nt=Te?"#e5484d":oe.colors.textPrimary,we=Fe(xt,{className:"cell",onClick:re?void 0:ee=>N(d,"due_date",ee.currentTarget),sx:{justifyContent:"center",color:nt,fontWeight:500,whiteSpace:"nowrap",...re?{}:{cursor:"pointer","&:hover":{bgcolor:oe.table.cellHoverBg}}},children:d.due_date?qx(d):null});return ji(xt,{onContextMenu:ee=>y(d,ee),sx:{display:"grid",gridTemplateColumns:b,minHeight:48,position:"relative",fontSize:15,bgcolor:oe.table.rowBg,color:oe.table.rowColor,borderBottom:x?"none":`1px solid ${oe.table.rowBorderColor}`,"&:hover":{bgcolor:oe.table.rowHoverBg},"& > .cell":{px:1,minWidth:0,display:"flex",alignItems:"center",borderRight:`1px solid ${oe.table.rowBorderColor}`},"& > .cell:first-of-type":{px:1.5},"& > .cell:last-of-type":{borderRight:"none",pr:2,...V?{pl:2}:{}}},children:[Fe(xt,{className:"cell",sx:{justifyContent:"center"},children:d.is_event?(()=>{let ee=Tt(d.icon||cr);if(!ee)return null;let Se=Fe(ee,{sx:{fontSize:19,color:d.icon_color||"#1e3a8a"}});return re||!$?Se:Fe(Li,{title:"\uC544\uC774\uCF58 \uBCC0\uACBD",arrow:!0,enterDelay:400,disableInteractive:!0,children:Fe(Px,{onClick:ge=>{ge.stopPropagation(),$(d,ge.currentTarget)},sx:{p:.25,borderRadius:1,"&:hover":{bgcolor:oe.table.cellHoverBg}},children:Se})})})():!O&&!w&&!m?Fe(Li,{title:d.completed&&d.completed_by?`${d.completed_by} \xB7 ${un(d.completed_time)} \uC644\uB8CC`:d.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC",arrow:!0,enterDelay:300,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:Fe(Nx,{checked:d.completed,inputProps:{"aria-label":d.completed?`${d.title} \uC644\uB8CC \uD574\uC81C`:`${d.title} \uC644\uB8CC \uCC98\uB9AC`},icon:Fe(Fx,{sx:{fontSize:20,color:"#9a9a97",opacity:.45}}),checkedIcon:Fe(jx,{sx:{fontSize:20,color:"#2f80ed"}}),onClick:ee=>ee.stopPropagation(),onChange:(ee,Se)=>P({anchorEl:ee.currentTarget,task:d,nextCompleted:Se}),sx:{p:.5}})}):null}),f?Fe(xt,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap",fontVariantNumeric:"tabular-nums",color:"#37352f"},children:d.ticket_no||"-"}):null,u?Fe(xt,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap"},children:d.support_type?(()=>{let ee=Fd(d.support_type);return Fe(zc,{label:el(d.support_type),bg:ee.bg,fg:ee.fg})})():"-"}):null,ji(xt,{className:"cell",onClick:()=>p(d),sx:{gap:1,pl:2,cursor:"pointer","&:hover":{bgcolor:oe.table.cellHoverBg}},children:[(()=>{if(!d.is_notice)return null;let ee=Tt(d.icon||ir);return ee?Fe(ee,{sx:{fontSize:18,flexShrink:0,color:d.icon_color||"#e5484d"}}):null})(),!u&&d.is_support&&d.support_type?(()=>{let ee=Fd(d.support_type);return Fe(zc,{label:el(d.support_type),bg:ee.bg,fg:ee.fg})})():null,f&&(d.origin_license_seq??0)>0&&d.origin_license_name?Fe(zc,{label:d.origin_license_name,bg:"#fdf0e6",fg:"#d9730d"}):null,(()=>{if(d.is_notice||u||d.is_support)return null;let ee=En(d);return ee==="involved"?null:Fe(Li,{title:ee==="all"?"\uC804\uCCB4\uACF5\uAC1C \u2014 \uBAA8\uB4E0 \uC9C1\uC6D0\uC774 \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4":"\uBD80\uC11C\uACF5\uAC1C \u2014 \uC9C0\uC815\uD55C \uBD80\uC11C\uC758 \uC9C1\uC6D0\uC774 \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4",arrow:!0,disableInteractive:!0,children:ee==="all"?Fe(Lx,{sx:{fontSize:15,flexShrink:0,color:"#2f80ed"}}):Fe(zx,{sx:{fontSize:15,flexShrink:0,color:"#d9730d"}})})})(),Fe(xt,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:16,fontWeight:d.completed&&v?400:oe.table.rowTitleFontWeight,color:d.completed&&v?oe.colors.textMuted:oe.table.rowTitleColor,textDecoration:d.completed&&v?"line-through":"none"},children:jc(d.title,s)}),Me?Fe(xt,{component:"span",sx:{flexShrink:0,fontSize:12.5,color:oe.colors.textMuted,fontVariantNumeric:"tabular-nums"},children:Me}):null,(d.comment_count??d.comments?.length??0)>0?Fe(Ho,{sx:{fontSize:16,flexShrink:0,color:"#9a9a97"}}):null,Fe(xt,{sx:{flexShrink:0,display:"flex",alignItems:"center"},children:Fe(qo,{labelKeys:d.label_keys??[],labelOptions:l})}),_&&!d.completed?Fe(xt,{component:"span",sx:{flexShrink:0,px:.55,fontSize:10.5,fontWeight:700,lineHeight:1.6,color:"#fff",bgcolor:"#e5484d",borderRadius:"4px"},children:"N"}):null,za(d)&&!d.archived&&!re&&E?Fe(Dx,{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:ee=>{ee.stopPropagation(),E(d)},children:"\uBCF4\uAD00"}):null]}),(()=>{let ee=re||!!d.is_event||!!d.completed;return Fe(xt,{className:"cell",onClick:ee?void 0:Se=>D(d,Se.currentTarget),sx:{py:.5,justifyContent:"center",...ee?{}:{cursor:"pointer","&:hover":{bgcolor:oe.table.cellHoverBg}}},children:d.is_event?(()=>{let Se=Ms(d);return Se?Fe(At,{option:Se}):null})():Fe(At,{option:ur(d)})})})(),u?Fe(xt,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap",fontVariantNumeric:"tabular-nums"},children:Ds(d.created_time)}):null,Fe(xt,{className:"cell",onClick:re?void 0:ee=>N(d,"start_date",ee.currentTarget),sx:{justifyContent:"center",whiteSpace:"nowrap",...re?{}:{cursor:"pointer","&:hover":{bgcolor:oe.table.cellHoverBg}}},children:Ds(d.start_date)}),we,u?ji(Fc,{children:[Fe(Li,{title:d.origin_license_name||"",arrow:!0,placement:"top",disableInteractive:!0,slotProps:{transition:{timeout:0}},children:Fe(xt,{className:"cell",sx:{gap:.75,justifyContent:"center"},children:Fe(zi,{names:[d.author_name||d.origin_author_name||d.created_by||""],searchText:s,avatarSrcByName:Ya(d,o)})})}),Fe(xt,{className:"cell",sx:{gap:.75,justifyContent:"center"},children:Fe(zi,{names:(d.answerer_names??[]).slice(0,1),searchText:s,avatarSrcByName:o})})]}):null,C?Fe(xt,{className:"cell",onClick:re?void 0:()=>j(d,"targets"),sx:{gap:.75,...re?{}:{cursor:"pointer","&:hover":{bgcolor:oe.table.cellHoverBg}}},children:Fe(jd,{display:I,summary:H,searchText:s,avatarSrcByName:o})}):null,!C&&d.is_notice?Fe(xt,{className:"cell",onClick:re?void 0:()=>j(d,"targets"),sx:{gridColumn:c?"span 2":"auto",gap:.75,...re?{}:{cursor:"pointer","&:hover":{bgcolor:oe.table.cellHoverBg}}},children:Fe(jd,{display:I,summary:H,searchText:s,avatarSrcByName:o})}):null,!C&&!d.is_notice&&!d.is_event&&c?Fe(xt,{className:"cell",onClick:ke?void 0:()=>j(d,"manager"),sx:{gap:.75,...pe||me||g?{justifyContent:"center"}:{},...ke?{}:{cursor:"pointer","&:hover":{bgcolor:oe.table.cellHoverBg}}},children:pe?Fe($n,{onClick:ee=>S?.(d,ee.currentTarget),children:"\uAC00\uC838\uAC00\uAE30"}):me?Fe($n,{onClick:ee=>T?.(d,ee.currentTarget),children:"\uAC00\uC838\uAC00\uAE30"}):Fe(zi,{names:d.manager_name?[d.manager_name]:[],searchText:s,avatarSrcByName:o,emphasize:ie})}):null,!C&&!d.is_notice?Fe(xt,{className:"cell",onClick:se?void 0:()=>j(d,"receivers"),sx:{gridColumn:d.is_event&&c?"span 2":"auto",gap:.75,...se?{}:{cursor:"pointer","&:hover":{bgcolor:oe.table.cellHoverBg}}},children:Fe(zi,{names:d.receiver_names,searchText:s,avatarSrcByName:o})}):null,Fe(xt,{className:"cell",onClick:re?void 0:ee=>K?.(d,ee.currentTarget),sx:{py:.5,justifyContent:"center",...re?{}:{cursor:"pointer","&:hover":{bgcolor:oe.table.cellHoverBg}}},children:Fe(Fr,{priority:d.priority,plain:!0})}),n?Fe(xt,{className:"cell",onClick:re?void 0:ee=>A?.(d,ee.currentTarget),sx:{gap:.5,justifyContent:"flex-start",...re?{}:{cursor:"pointer","&:hover":{bgcolor:oe.table.cellHoverBg}}},children:R?ji(Fc,{children:[(()=>{let ee=Tt(L);return ee?Fe(ee,{sx:{fontSize:15,flexShrink:0,color:"#1e3a8a"}}):null})(),Fe(xt,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:R})]}):null}):null,C?Fe(xt,{className:"cell",sx:{justifyContent:"center"},children:Le}):null,!C&&i&&a&&!u?Fe(xt,{className:"cell",sx:{justifyContent:"center"},children:d.is_notice?Le:Z?Fe(Ni,{canConfirm:!!k?.canConfirm,count:k?.count??0,total:k?.total??0,myConfirmed:!!k?.myTime,onConfirm:()=>B?.(d),onShowList:ee=>Y?.(d,ee)}):null}):null,!C&&h==="action"?Fe(xt,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap",color:oe.table.rowSubColor},children:d.is_notice?Le:k&&k.total>0?Fe(Ni,{canConfirm:!!k.canConfirm,count:k.count,total:k.total,myConfirmed:!!k.myTime,onConfirm:()=>B?.(d),onShowList:ee=>Y?.(d,ee)}):"-"}):null,!C&&!i?Fe(xt,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap",color:m?oe.colors.danger:v?oe.table.rowSubColor:oe.table.rowTitleColor},children:m?Ds(d.deleted_time):d.completed_time||"-"}):null,f||u?null:Fe(xt,{className:"cell",onClick:()=>{!M&&!W&&(G(d.note),X(!0))},sx:{color:"#6f6f6c",cursor:M?"default":"text"},children:W?Fe(xt,{component:"input",ref:te,autoFocus:!0,spellCheck:!1,value:J,onChange:ee=>G(ee.target.value),onBlur:()=>{X(!1),J.trim()!==d.note&&q(d.seq,J)},onKeyDown:ee=>{ee.key==="Enter"&&ee.target.blur(),ee.key==="Escape"&&(G(d.note),X(!1))},sx:{flex:1,minWidth:0,width:"100%",border:"none",outline:"none",bgcolor:"transparent",font:"inherit",lineHeight:"inherit",letterSpacing:"inherit",color:oe.table.rowTitleColor,caretColor:oe.table.rowTitleColor,p:0,m:0}}):Fe(xt,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:d.note?jc(d.note,s):""})}),ie?Fe(xt,{component:"span",sx:{position:"absolute",left:3,top:6,bottom:6,width:3,bgcolor:"#2f80ed",borderRadius:1.5,pointerEvents:"none"}}):null]})});import{jsx as Hx}from"react/jsx-runtime";var $d=$x(function(d){let l=(d.useTaskItem?d.useTaskItem(d.task.seq):void 0)??d.task,{myAccountSeq:o}=d,s=d.projectByKey.get(l.tab_key??"");return Hx(qd,{hideBottomBorder:d.hideBottomBorder,gridTemplate:d.gridTemplate,task:l,statusOptions:d.statusOptions,avatarSrcByName:d.avatarSrcByName,searchText:d.searchText,myAccountSeq:o,todayStr:d.todayStr,showProject:d.showProject,showManager:d.showManager,showActions:d.showActions,showRequest:d.showRequest,confirmMode:d.confirmMode,confirmInfo:l.is_notice?void 0:d.getConfirmInfo?.(l),onConfirmTask:d.onConfirmTask,projectLabel:s?.label??"",projectIcon:s?.icon??"",onProjectClick:d.onProjectClick,onRequestReply:d.onRequestReply,onRequestToggleCompleted:d.onRequestToggleCompleted,onDateClick:d.onDateClick,onChangeNote:d.onChangeNote,onMemberClick:d.onMemberClick,onClaimClick:d.onClaimClick,onVolunteerClick:d.onVolunteerClick,onStatusClick:d.onStatusClick,onOpenDetail:d.onOpenDetail,onTaskContextMenu:d.onTaskContextMenu,notice:d.notice,bugMode:d.bugMode,supportMode:d.supportMode,managerCentered:d.managerCentered,trashMode:d.trashMode,dimCompleted:d.dimCompleted,noticeReadOnly:!mo(l,o),readOnly:d.readOnly,noteLocked:d.readOnly||(l.is_notice?!Va(l,o):!mo(l,o)),completeLocked:l.is_event?!0:l.is_notice?(l.author_account_seq??0)!==o:(l.author_account_seq??0)!==o&&(l.manager_account_seq??0)!==o,targetSummary:l.is_notice?d.getTargetSummary?.(l):void 0,targetDisplay:l.is_notice?d.getTargetDisplay?.(l):void 0,onArchiveTask:d.onArchiveTask,unread:d.isTaskUnread?.(l)??!1,ackInfo:l.is_notice?d.getAckInfo?.(l):void 0,onAckConfirm:d.onAckConfirm,onAckListClick:d.onAckListClick,onPriorityClick:d.onPriorityClick,onIconClick:d.onIconClick,lastColumnCentered:d.lastColumnCentered})});import{useMemo as Hd,useState as $c}from"react";import{Box as li,Button as Wd,ButtonBase as Ud,Dialog as Vx,Divider as Hc,Menu as Kx,MenuItem as Gx,Popover as Yx}from"@mui/material";import Vd from"@mui/icons-material/ChevronRight";import Xx from"@mui/icons-material/Check";import Zx from"@mui/icons-material/NotificationsActiveOutlined";import{SimpleCalendar as Jx,TimePicker as Qx}from"@ehfuse/mui-datetime-picker";import e2 from"@mui/icons-material/TimerOutlined";import{useEffect as Wx,useState as Ux}from"react";function Hn(e){let{loadHolidays:d}=$t(),[b,l]=Ux(()=>new Map),o=e.join(",");return Wx(()=>{if(!d||!o){l(new Map);return}let s=!1;return d(o.split(",").map(Number)).then(r=>{if(s)return;let t=new Map;for(let n of r)t.has(n.date)||t.set(n.date,n.name);l(t)}).catch(()=>{}),()=>{s=!0}},[d,o]),b}var qc=["min30_before","hour1_before","hour2_before","same_day","day_before","two_days_before","three_days_before","week_before"];function Wn(e){let d=Array.isArray(e?.reminders)?e?.reminders:[e?.reminder],b=new Set;for(let l of d){let o=String(l??"").trim();qc.includes(o)&&b.add(o)}return qc.filter(l=>b.has(l))}function tl(e,d){if(d==="none")return[];let b=e.includes(d)?e.filter(l=>l!==d):[...e,d];return qc.filter(l=>b.includes(l))}import{Fragment as Kd,jsx as Rr,jsxs as Mn}from"react/jsx-runtime";var t2=9,r2=[{value:"min30_before",label:"30\uBD84 \uC804"},{value:"hour1_before",label:"1\uC2DC\uAC04 \uC804"},{value:"hour2_before",label:"2\uC2DC\uAC04 \uC804"}],Gd=[{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"}],Yd=[{value:"none",label:"\uC5C6\uC74C"},...r2,...Gd];function Wc(e){return e?Yd:[{value:"none",label:"\uC5C6\uC74C"},...Gd]}function n2(e){return e==="same_day"?"\uB2F9\uC77C":Yd.find(d=>d.value===e)?.label??"\uC5C6\uC74C"}function Uc(e){if(e.length===0)return"\uC5C6\uC74C";let d=e.map(b=>n2(b));return d.length<=3?d.join(", "):`${d.slice(0,3).join(", ")} \uC678 ${d.length-3}`}function o2(e){let d=e?new Date(`${e}T00:00:00`):new Date;return Number.isNaN(d.getTime())?new Date:d}function xn({anchorEl:e,open:d,date:b,reminders:l,hideReminder:o=!1,showTime:s=!1,centered:r=!1,onClose:t,onDateChange:n,onReminderChange:c}){let[i,a]=$c(null),[h,f]=$c(null),u=qn(),g=String(b??"").trim().slice(0,10),m=String(b??"").trim().slice(11,16),v=/^\d{2}:\d{2}$/.test(m)?m:"",k=(S,T)=>n(T?`${S} ${T}`:S),{defaultDueHour:B}=$t(),R=`${String(Number.isInteger(B)&&B>=0&&B<=23?B:t2).padStart(2,"0")}:00`,[L,A]=$c(()=>{let S=Number(g.slice(0,4));return Number.isFinite(S)&&S>1900?S:new Date().getFullYear()}),P=Hd(()=>[L-1,L,L+1],[L]),N=Hn(P),q=Hd(()=>{let S=[];for(let T of N.keys()){let D=new Date(`${T}T00:00:00`);Number.isNaN(D.getTime())||S.push(D)}return S},[N]),j=Mn(li,{sx:{width:300,maxWidth:"100%"},children:[Rr(li,{sx:{height:320},children:Rr(Jx,{selectedDate:o2(g),onSelect:S=>{k(vr(S),s?v||R:v),s||t()},onClose:t,showFooter:!1,autoApply:!0,holidays:q,onYearChange:S=>A(S),onMonthChange:(S,T)=>{typeof T=="number"&&A(T)}})}),s?Mn(Kd,{children:[Rr(Hc,{sx:{borderColor:"#e6e6e3"}}),Mn(Ud,{onClick:S=>f(S.currentTarget),sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",px:2,py:1.25,fontSize:14,"&:hover":{bgcolor:"#f8f8f7"}},children:[Mn(li,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:.75,color:"#37352f"},children:[Rr(e2,{sx:{fontSize:17,color:"#9a9a97"}}),"\uC2DC\uAC01"]}),Mn(li,{component:"span",sx:{display:"inline-flex",alignItems:"center",color:"#37352f"},children:[v||"\uC5C6\uC74C",Rr(Vd,{sx:{fontSize:18,ml:.25,color:"#9a9a97"}})]})]}),Rr(Qx,{anchorEl:h,open:!!h,onClose:()=>f(null),centered:r,value:{hour:v.slice(0,2)||R.slice(0,2),minute:v.slice(3,5)||"00"},format:"HH:mm",minuteStep:5,autoApply:!0,locale:"ko",onChange:(S,T)=>{k(g||vr(new Date),`${S}:${T}`),f(null)}})]}):null,o?null:Mn(Kd,{children:[Rr(Hc,{sx:{borderColor:"#e6e6e3"}}),Mn(Ud,{onClick:S=>a(S.currentTarget),sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",px:2,py:1.25,fontSize:14,"&:hover":{bgcolor:"#f8f8f7"}},children:[Mn(li,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:.75,color:"#37352f"},children:[Rr(Zx,{sx:{fontSize:17,color:"#9a9a97"}}),"\uC0AC\uC804\uC54C\uB9BC"]}),Mn(li,{component:"span",sx:{display:"inline-flex",alignItems:"center",color:"#37352f"},children:[Uc(l),Rr(Vd,{sx:{fontSize:18,ml:.25,color:"#9a9a97"}})]})]}),Rr(Kx,{transitionDuration:0,anchorEl:i,open:!!i,onClose:()=>a(null),anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},...u,children:Wc(!!v).map(S=>{let T=S.value==="none"?l.length===0:l.includes(S.value);return Mn(Gx,{selected:T,onClick:()=>{c(tl(l,S.value)),S.value==="none"&&a(null)},sx:{fontSize:14,minWidth:140,justifyContent:"space-between",gap:1},children:[S.label,T?Rr(Xx,{sx:{fontSize:16,color:"#2f80ed"}}):null]},S.value)})})]}),Rr(Hc,{sx:{borderColor:"#e6e6e3"}}),Mn(li,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",px:1,py:.5},children:[Rr(Wd,{size:"small",onClick:()=>{k(vr(new Date),v),t()},sx:{minWidth:0,px:1.25,fontSize:13.5,color:"#2563eb"},children:"\uC624\uB298"}),Rr(Wd,{size:"small",onClick:t,sx:{minWidth:0,px:1.25,fontSize:13.5,color:"#2563eb"},children:"\uB2EB\uAE30"})]})]});return r?Rr(Vx,{open:d,onClose:t,slotProps:{paper:{sx:{borderRadius:3,width:300,maxWidth:"calc(100vw - 48px)",overflow:"hidden"}}},children:j}):Rr(Yx,{transitionDuration:0,open:d,anchorEl:e,onClose:t,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:j})}import{useEffect as a2,useState as Kc}from"react";import{Box as ci,Button as l2,Switch as c2}from"@mui/material";import{FormDialog as u2}from"@ehfuse/mui-form-dialog";import{ClearTextField as f2}from"@ehfuse/mui-form-controls";import{ErrorAlert as d2}from"@ehfuse/alerts";import{Box as i2,ButtonBase as s2}from"@mui/material";import{jsx as Vc}from"react/jsx-runtime";function rl({value:e,onChange:d}){return Vc(i2,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(40px, 1fr))",gap:1},children:vc.map(({key:b,Icon:l})=>{let o=b===e;return Vc(s2,{onClick:()=>d(b),sx:{display:"flex",alignItems:"center",justifyContent:"center",height:40,minWidth:40,borderRadius:1,border:o?"2px solid #2563eb":"1px solid #dedddb",bgcolor:o?"#eef4ff":"#fff",color:o?"#1e3a8a":"#787774","&:hover":{bgcolor:o?"#eef4ff":"#f4f4f2"}},children:Vc(l,{sx:{fontSize:20}})},b)})})}import{jsx as go,jsxs as Gc}from"react/jsx-runtime";function nl({open:e,title:d="\uC0C8 \uD504\uB85C\uC81D\uD2B8 \uCD94\uAC00",initialLabel:b="",initialIcon:l=xc,confirmText:o="\uCD94\uAC00",initialUseSprints:s=!1,onClose:r,onSubmit:t}){let[n,c]=Kc(""),[i,a]=Kc(xc),[h,f]=Kc(!1);a2(()=>{e&&(c(b),a(l),f(s))},[e]);let u=()=>{let m=n.trim();if(!m){d2("\uD504\uB85C\uC81D\uD2B8 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}t(m,i,h),r()};return go(u2,{open:e,onClose:r,maxWidth:"xs",title:d,locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-add-tab",sections:[{id:"add-tab",showTitle:!1,children:Gc(ci,{children:[go(f2,{label:"\uD504\uB85C\uC81D\uD2B8 \uC774\uB984",value:n,onChange:m=>c(m.target.value),onKeyDown:m=>{m.key==="Enter"&&(m.preventDefault(),u())},fullWidth:!0,autoFocus:!0,sx:{mt:.5}}),go(ci,{sx:{mt:2,fontSize:13,color:"#787774"},children:"\uC544\uC774\uCF58"}),go(ci,{sx:{mt:1,maxHeight:264,overflowY:"auto",pr:.5},children:go(rl,{value:i,onChange:a})}),Gc(ci,{sx:{mt:2,display:"flex",alignItems:"center",justifyContent:"space-between",gap:1},children:[Gc(ci,{children:[go(ci,{sx:{fontSize:14,color:"#37352f"},children:"\uBAA9\uD45C(\uC2A4\uD504\uB9B0\uD2B8) \uC0AC\uC6A9"}),go(ci,{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)"})]}),go(c2,{checked:h,onChange:(m,v)=>f(v)})]})]})}],actions:{showCancelButton:!0,right:go(l2,{variant:"contained",onClick:u,children:o})}})}import{Box as h2}from"@mui/material";import{jsx as p2}from"react/jsx-runtime";function ol({size:e=40}){return p2(h2,{sx:{boxSizing:"border-box",width:e,height:e,borderRadius:"50%",border:"4px solid rgba(28, 64, 125, 0.14)",borderTopColor:"#1c407d",animation:"taskbox-content-loading-spin 0.75s linear infinite","@keyframes taskbox-content-loading-spin":{to:{transform:"rotate(360deg)"}}}})}import{Box as Yc,ButtonBase as m2,Divider as g2,Popover as b2}from"@mui/material";import y2 from"@mui/icons-material/Check";import x2 from"@ehfuse/overlay-scrollbar";import{jsx as ui,jsxs as Xd}from"react/jsx-runtime";var Xc=["#1e3a8a","#2f80ed","#06b6d4","#0fa3a3","#2f9e5b","#84cc16","#e8a33d","#d9730d","#e5484d","#e255a1","#a355c0","#8a5a2b","#57564f","#111827"];function Wo({anchorEl:e,value:d,color:b="",onSelect:l,onSelectColor:o,onClose:s}){return ui(b2,{transitionDuration:0,open:!!e,anchorEl:e,onClose:s,anchorOrigin:{vertical:"bottom",horizontal:"left"},marginThreshold:16,slotProps:{paper:{sx:{mt:1,maxHeight:"calc(100dvh - 96px)"}}},children:Xd(Yc,{sx:{width:"min(492px, calc(100vw - 32px))"},children:[ui(x2,{style:{maxHeight:"min(432px, calc(100dvh - 240px))"},contentStyle:{minWidth:0,padding:10},thumb:{width:6},children:ui(rl,{value:d||ho,onChange:r=>{l(r),s()}})}),o?Xd(Yc,{sx:{px:1.25,pb:1.25},children:[ui(g2,{sx:{mb:1,borderColor:"#efefed"}}),ui(Yc,{sx:{display:"grid",gridTemplateColumns:`repeat(${Xc.length}, 1fr)`,justifyItems:"center"},children:Xc.map(r=>{let t=(b||Xc[0])===r;return ui(m2,{"aria-label":`\uC544\uC774\uCF58 \uC0C9 ${r}`,onClick:()=>o(r),sx:{width:"100%",maxWidth:26,aspectRatio:"1 / 1",borderRadius:"50%",bgcolor:r,display:"flex",alignItems:"center",justifyContent:"center"},children:t?ui(y2,{sx:{fontSize:15,color:"#ffffff"}}):null},r)})})]}):null]})})}import{jsx as mt,jsxs as Rn}from"react/jsx-runtime";var Qd=48,R2=5;function eh({tasks:e,statusOptions:d,avatarSrcByName:b,searchText:l,todayStr:o,sortBy:s,sortDirection:r,onSort:t,onRequestReply:n,onToggleCompleted:c,onChangeTaskDate:i,onChangeTaskReminder:a,groupBy:h,collapsedGroupKeys:f,customTabs:u,onToggleGroup:g,hideCompleted:m=!1,loading:v=!1,dimCompleted:k=!0,readOnly:B=!1,onChangeTaskIcon:R,onChangeTaskIconColor:L,onAddInGroup:A,canAddInGroup:P,renderGroupSummary:N,renderGroupTitleSummary:q,onChangeTaskProject:j,onAddProject:S,onChangeNote:T,onMemberClick:D,onClaimTask:p,onChangeTaskStatus:y,onOpenDetail:x,onTaskContextMenu:w,onMemberFilterClick:_,activeMemberFilters:C=[],onStatusFilterClick:O,statusFilterActive:z=!1,onAckFilterClick:$,ackFilterActive:V=!1,onProjectFilterClick:M,projectFilterActive:H=!1,onPriorityFilterClick:I,priorityFilterActive:E=!1,onValueFilterClick:F,activeValueFilters:U=[],columns:Y,getConfirmInfo:K,onConfirmTask:W,myAccountSeq:X=0,currentUserName:J="",groupManagerByMyRole:G=!1,pinKindGroups:te=!1,allowManagerVolunteer:Z=!0,noticeAdmin:re=!1,getTargetSummary:ie,getTargetDisplay:se,onArchiveTask:oe,isTaskUnread:pe,getAckInfo:me,onAckConfirm:ke,onAckListClick:Le,onChangeTaskPriority:Te,onEndReached:Me,useTaskItem:nt}){let we=at(),ee=Vn(()=>({showManager:!0,showActions:!0,showRequest:!0,...Y}),[Y]),Se=ee.showManager??!0,ge=ee.showActions??!0,xe=ee.showRequest??!0,Ze=ee.confirmMode??"none",Pe=ee.notice??!1,He=ee.bug??!1,Qt=ee.support??!1,Ue=Qt||(ee.centerManager??!1),Oe=ee.trash??!1,be=h!=="none",ye=Vn(()=>be?Ha(e,h,o,u,d,J,{enabled:G,myAccountSeq:X},te):[],[be,e,h,o,u,d,J,G,X,te]),Ce=Vn(()=>m?e.filter(ce=>!ce.completed):e,[e,m]),et=Vn(()=>Ce.filter(ce=>ce.completed||ce.archived?!1:ce.is_notice?!!me?.(ce).canAck:!!K?.(ce).canConfirm),[Ce,me,K]),ze=Vn(()=>new Set(et.map(ce=>ce.seq)),[et]),De=Vn(()=>ye.map(ce=>({section:ce,visibleTasks:ce.tasks.filter(je=>!ze.has(je.seq)&&(!m||!je.completed))})).filter(ce=>ce.visibleTasks.length>0),[ye,m,ze]),vt=Vn(()=>new Set(f),[f]),Ve=Vn(()=>{let ce=[];if(be)for(let{section:je,visibleTasks:ht}of De){let Qr=vt.has(je.key);if(ce.push({kind:"header",section:je,visibleTasks:ht,collapsed:Qr}),!Qr)for(let lr of ht)ce.push({kind:"task",task:lr,last:!1})}else for(let je of Ce)ze.has(je.seq)||ce.push({kind:"task",task:je,last:!1});for(let je=ce.length-1;je>=0;je-=1){let ht=ce[je];if(ht.kind==="task"){ht.last=!0;break}}return ce},[be,De,Ce,vt,ze]),qe=ee.showProject??(!Pe&&h!=="tab"),Mt=Vn(()=>Ua({...ee,showProject:qe}),[ee,qe]),Ke=_d({...ee,showProject:qe}),ne=kd({...ee,showProject:qe}),ue=Zc(null),de=Zc(null),_e=Mt[Mt.length-1]?.align==="center",dt=Vn(()=>{let ce=new Map;for(let je of u)ce.set(je.key,{label:je.archived?`${je.label} (\uBCF4\uAD00\uB428)`:je.label,icon:je.icon});return ce},[u]),Re=Zc(null),[Be,wt]=Kn(null);Ps(()=>{if(!Be)return;let ce=()=>{ue.current&&(ue.current.scrollLeft=Be.scrollLeft),de.current&&(de.current.scrollLeft=Be.scrollLeft)};return ce(),Be.addEventListener("scroll",ce,{passive:!0}),()=>Be.removeEventListener("scroll",ce)},[Be]);let Ge=Ce.length>0;Ps(()=>{if(!Ge){wt(null);return}let ce=window.requestAnimationFrame(()=>{wt(Re.current?.getScrollContainer()??null)});return()=>window.cancelAnimationFrame(ce)},[Ge]);let Ee=`${h}|${s}|${r}|${l}|${m?1:0}`;Ps(()=>{Be&&(Be.scrollTop=0)},[Ee,Be]);let[tt,ot]=Kn(!1);Ps(()=>{if(!Be)return;let ce=()=>ot(Be.scrollHeight-Be.clientHeight>4),je=window.requestAnimationFrame(ce),ht=new ResizeObserver(ce);return ht.observe(Be),Be.firstElementChild&&ht.observe(Be.firstElementChild),()=>{window.cancelAnimationFrame(je),ht.disconnect()}},[Be,Ve.length,f.length]),Ps(()=>{if(!Be)return;let ce=Be.clientHeight,je=new ResizeObserver(()=>{let ht=Be.clientHeight;ht!==ce&&(ce=ht,Be.dispatchEvent(new Event("scroll")))});return je.observe(Be),()=>je.disconnect()},[Be]);let[Ye,yt]=Kn(null),[Bt,bt]=Kn(null),[er,Nt]=Kn(null),[Rt,Q]=Kn(null),[le,he]=Kn(!1),[fe,Ie]=Kn(null),Ae=fe?e.find(ce=>ce.seq===fe.taskSeq)??null:null,[$e,lt]=Kn(null),ae=$e?e.find(ce=>ce.seq===$e.taskSeq)??null:null,[Ne,Je]=Kn(null),St=Ne?e.find(ce=>ce.seq===Ne.taskSeq)??null:null,qt=Un((ce,je)=>{Je({anchorEl:je,taskSeq:ce.seq})},[]),It=Un((ce,je)=>{lt({anchorEl:je,taskSeq:ce.seq})},[]),Ot=Un((ce,je)=>{Ie({anchorEl:je,taskSeq:ce.seq})},[]),xr=Un((ce,je)=>{if(!je)return;t(ce,s===ce&&r==="asc"?"desc":"asc")},[t,s,r]),Zr=Un((ce,je,ht)=>{yt({anchorEl:ht,taskSeq:ce.seq,field:je,date:ce[je],isEvent:!!ce.is_event,reminders:Wn(ce),completed:ce.completed})},[]),Jr=Un((ce,je)=>{Q({anchorEl:je,task:ce})},[]),ln=Un(ce=>{Ye&&(i(Ye.taskSeq,Ye.field,ce),yt(je=>je&&{...je,date:ce}))},[Ye,i]),uo=Un(ce=>{Ye&&(a(Ye.taskSeq,ce),yt(je=>je&&{...je,reminders:ce}))},[Ye,a]),Ei=Un((ce,je)=>{Nt({anchorEl:je,taskSeq:ce.seq,title:ce.title,kind:"claim"})},[]),jo=Un((ce,je)=>{Nt({anchorEl:je,taskSeq:ce.seq,title:ce.title,kind:"volunteer"})},[]),_t=(ce,je)=>mt($d,{task:ce,hideBottomBorder:je,gridTemplate:Ke,useTaskItem:nt,statusOptions:d,avatarSrcByName:b,searchText:l,myAccountSeq:X,todayStr:o,showProject:qe,showManager:Se,showActions:ge,showRequest:xe,confirmMode:Ze,notice:Pe,bugMode:He,supportMode:Qt,managerCentered:Ue,trashMode:Oe,dimCompleted:k,readOnly:B,projectByKey:dt,getConfirmInfo:K,onConfirmTask:W,onProjectClick:Jr,onRequestReply:n,onRequestToggleCompleted:bt,onDateClick:Zr,onChangeNote:T,onMemberClick:D,onClaimClick:p?Ei:void 0,onVolunteerClick:Z?jo:void 0,onStatusClick:Ot,onOpenDetail:x,onTaskContextMenu:w,onPriorityClick:It,onIconClick:R?qt:void 0,lastColumnCentered:_e,getTargetSummary:ie,getTargetDisplay:se,getAckInfo:me,isTaskUnread:pe,onArchiveTask:oe,onAckConfirm:ke,onAckListClick:Le},ce.seq);return Rn(wr,{sx:{display:"flex",flexDirection:"column",flex:1,minHeight:0,border:`1px solid ${we.table.borderColor}`,borderRadius:"0 0 4px 4px",overflow:"hidden",bgcolor:we.table.bg,color:we.table.rowColor,...we.table.sx},children:[mt(wr,{ref:ue,sx:{overflow:"hidden",flexShrink:0},children:mt(wr,{sx:{display:"grid",gridTemplateColumns:Ke,minWidth:ne,borderBottom:`1px solid ${we.table.borderColor}`,flexShrink:0,bgcolor:we.table.headerBg,"& > *":{borderRight:`1px solid ${we.table.rowBorderColor}`},"& > *:first-of-type":{px:1.5},"& > *:last-child":{borderRight:"none",pr:2,..._e?{pl:2}:{}},...we.table.headerSx},children:Mt.map(ce=>{let je=s===ce.id,ht=!!ce.memberFilter,Qr=ht&&C.includes(ce.memberFilter),lr=ht||!!ce.statusFilter||!!ce.ackFilter||!!ce.projectFilter||!!ce.priorityFilter||!!ce.valueFilter,en=Qr||!!ce.valueFilter&&U.includes(ce.valueFilter)||!!ce.statusFilter&&z||!!ce.ackFilter&&V||!!ce.projectFilter&&H||!!ce.priorityFilter&&E;return Rn(wr,{onClick:jr=>{ce.memberFilter?_(ce.memberFilter,jr.currentTarget):ce.statusFilter?O(jr.currentTarget):ce.ackFilter?$?.(jr.currentTarget):ce.projectFilter?M?.(jr.currentTarget):ce.priorityFilter?I?.(jr.currentTarget):ce.valueFilter?F?.(ce.valueFilter,jr.currentTarget):xr(ce.id,ce.sortable)},sx:{display:"flex",alignItems:"center",justifyContent:ce.align==="center"?"center":"flex-start",gap:.5,px:1,...ce.id==="title"?{pl:2}:{},py:1,minWidth:0,fontSize:we.table.headerFontSize,color:ce.sortable||lr?we.table.headerActiveColor:we.table.headerColor,whiteSpace:"nowrap",cursor:ce.sortable||lr?"pointer":"default",userSelect:"none",...je?{color:we.table.headerFilteredColor}:{},...en?{color:we.table.headerFilteredColor,fontWeight:600}:{}},children:[ce.icon,ce.label,en?mt(B2,{sx:{fontSize:14}}):null,je?r==="asc"?mt(k2,{sx:{fontSize:13}}):mt(S2,{sx:{fontSize:13}}):null]},ce.id)})})}),et.length>0?mt(wr,{sx:{flexShrink:0,maxHeight:`${we.table.groupHeader.minHeight+1+Qd*R2}px`,overflowY:"auto",overflowX:"hidden",borderBottom:"1px solid #000"},ref:de,children:Rn(wr,{sx:{minWidth:ne},children:[Rn(wr,{sx:{position:"sticky",top:0,zIndex:1,display:"flex",alignItems:"center",gap:.5,px:1.5,minHeight:we.table.groupHeader.minHeight,bgcolor:"#fdf3f2",borderBottom:"1px solid #f2d7d4"},children:[mt(wr,{component:"span",sx:{fontSize:we.table.groupHeader.labelFontSize,fontWeight:we.table.groupHeader.labelFontWeight,color:we.table.groupHeader.labelColor},children:"\uBBF8\uD655\uC778"}),mt(wr,{sx:{ml:"auto",display:"flex",alignItems:"center",pr:.5},children:mt(wr,{component:"span",sx:{flexShrink:0,width:we.table.groupHeader.badge.width,py:we.table.groupHeader.badge.paddingY,borderRadius:`${we.table.groupHeader.badge.borderRadius}px`,bgcolor:"#e5484d",color:"#fff",fontSize:we.table.groupHeader.badge.fontSize,fontWeight:we.table.groupHeader.badge.fontWeight,lineHeight:1.6,textAlign:"center",fontVariantNumeric:"tabular-nums"},children:et.length})})]}),et.map((ce,je)=>_t(ce,je===et.length-1))]})}):null,Ce.length===0&&v?mt(wr,{role:"status","aria-live":"polite","aria-label":"\uC5C5\uBB34 \uBAA9\uB85D\uC744 \uBD88\uB7EC\uC624\uB294 \uC911\uC785\uB2C8\uB2E4.",sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",py:8},children:mt(ol,{})}):Ce.length===0?mt(wr,{role:"status","aria-live":"polite",sx:{py:8,textAlign:"center",color:we.table.emptyColor,fontSize:14},children:e.length>0?`\uC644\uB8CC\uB41C \uC5C5\uBB34 ${e.length}\uAC74\uC774 "\uC644\uB8CC \uC228\uAE30\uAE30"\uB85C \uAC10\uCDB0\uC838 \uC788\uC2B5\uB2C8\uB2E4.`:He?"\uB4F1\uB85D\uB41C \uC624\uB958\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.":Qt?"\uC811\uC218\uB41C \uBB38\uC758\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.":Pe?"\uB4F1\uB85D\uB41C \uACF5\uC9C0\uC0AC\uD56D\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.":"\uD45C\uC2DC\uD560 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):mt(wr,{sx:{flex:1,minHeight:0},children:mt(M2,{ref:Re,style:{height:"100%"},contentStyle:{minWidth:ne},thumb:{width:8},showHorizontalScrollbar:!0,scrollTopFab:!0,children:Be?mt(E2,{customScrollParent:Be,data:Ve,computeItemKey:(ce,je)=>je.kind==="header"?`group:${je.section.key}`:je.task.seq,endReached:be?void 0:Me,defaultItemHeight:Qd,increaseViewportBy:{top:600,bottom:600},itemContent:(ce,je)=>{if(je.kind==="task")return _t(je.task,je.last&&tt);let{section:ht,visibleTasks:Qr,collapsed:lr}=je;return Rn(wr,{onClick:()=>g(ht.key),sx:{display:"flex",alignItems:"center",gap:.5,px:1.5,minHeight:we.table.groupHeader.minHeight,bgcolor:we.table.groupHeader.bg,borderBottom:`1px solid ${we.table.groupHeader.borderColor}`,cursor:"pointer",userSelect:"none","&:hover":{bgcolor:we.table.groupHeader.hoverBg},...we.table.groupHeader.sx},children:[lr?mt(C2,{sx:{fontSize:20,color:we.colors.textMuted}}):mt(T2,{sx:{fontSize:20,color:we.colors.textMuted}}),mt(wr,{component:"span",sx:{fontSize:we.table.groupHeader.labelFontSize,fontWeight:we.table.groupHeader.labelFontWeight,color:we.table.groupHeader.labelColor},children:ht.label}),q?mt(wr,{sx:{flexShrink:0,display:"flex",alignItems:"center",ml:.5},children:q(ht.key,ht.tasks)}):null,A&&(!P||P(ht.key))?mt(w2,{size:"small","aria-label":"\uC774 \uADF8\uB8F9\uC5D0 \uC5C5\uBB34 \uB4F1\uB85D",onClick:en=>{en.stopPropagation(),A(ht.key,ht.tasks)},sx:{flexShrink:0,ml:.75,p:.25,color:we.colors.textSecondary,"&:hover":{bgcolor:we.colors.surfaceHover,color:we.colors.accentOnSurface}},children:mt(Jd,{sx:{fontSize:21}})}):null,Rn(wr,{sx:{ml:"auto",minWidth:0,display:"flex",alignItems:"center",gap:1,pr:.5},children:[N?N(ht.key,ht.tasks):null,mt(wr,{component:"span",sx:{flexShrink:0,width:we.table.groupHeader.badge.width,py:we.table.groupHeader.badge.paddingY,borderRadius:`${we.table.groupHeader.badge.borderRadius}px`,bgcolor:we.table.groupHeader.badge.bg,border:we.table.groupHeader.badge.border,color:we.table.groupHeader.badge.color,fontSize:we.table.groupHeader.badge.fontSize,fontWeight:we.table.groupHeader.badge.fontWeight,lineHeight:1.6,textAlign:"center",fontVariantNumeric:"tabular-nums"},children:Qr.length})]})]})}},Ee):null})}),mt(Ai,{anchorEl:fe?.anchorEl??null,value:Ae?.status??"",options:Ae?Fa(Ae):Es,onSelect:ce=>{Ae&&y(Ae.seq,ce)},onComplete:Ae&&!Ae.completed&&!Ae.is_notice&&!Ae.is_event&&!Ae.is_bug&&!Oe&&((Ae.author_account_seq??0)===X||(Ae.manager_account_seq??0)===X)?()=>c(Ae,!0):void 0,onClose:()=>Ie(null)}),mt(Zd,{transitionDuration:0,anchorEl:$e?.anchorEl??null,open:!!$e,onClose:()=>lt(null),children:["high","medium","low"].map(ce=>Rn(il,{selected:ae?.priority===ce,onClick:()=>{ae&&Te?.(ae.seq,ce),lt(null)},sx:{fontSize:14,minWidth:130,gap:1},children:[mt(Fr,{priority:ce,small:!0}),ae?.priority===ce?mt(Jc,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},ce))}),Rn(Zd,{anchorEl:Rt?.anchorEl??null,open:!!Rt,onClose:()=>Q(null),transitionDuration:0,children:[Rn(il,{selected:!Rt?.task.tab_key,onClick:()=>{Rt&&j(Rt.task.seq,""),Q(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[mt(I2,{sx:{fontSize:17,color:"#9a9a97"}}),"\uC5C6\uC74C",Rt?.task.tab_key?null:mt(Jc,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}})]}),u.filter(ce=>!ce.archived).map(ce=>{let je=Tt(ce.icon),ht=Rt?.task.tab_key===ce.key;return Rn(il,{selected:ht,onClick:()=>{Rt&&j(Rt.task.seq,ce.key),Q(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[je?mt(je,{sx:{fontSize:17,color:"#1e3a8a"}}):null,ce.label,ht?mt(Jc,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},ce.key)}),S?[mt(v2,{},"add-project-divider"),Rn(il,{onClick:()=>he(!0),sx:{fontSize:14,color:"#787774"},children:[mt(_2,{children:mt(Jd,{sx:{fontSize:18,color:"#787774"}})}),"\uD504\uB85C\uC81D\uD2B8 \uCD94\uAC00"]},"add-project")]:null]}),S?mt(nl,{open:le,onClose:()=>he(!1),onSubmit:(ce,je)=>{let ht=Rt?.task.seq??0;(async()=>{let Qr=await S(ce,je);Qr&&ht&&j(ht,Qr)})(),Q(null)}}):null,mt(Wo,{anchorEl:Ne?.anchorEl??null,value:St?.icon??"",color:St?.icon_color??"",onSelect:ce=>{Ne&&R?.(Ne.taskSeq,ce),Je(null)},onSelectColor:L?ce=>{Ne&&L(Ne.taskSeq,ce)}:void 0,onClose:()=>Je(null)}),mt(xn,{anchorEl:Ye?.anchorEl??null,open:!!Ye&&Ye?.field==="start_date",date:Ye?.date??"",reminders:[],hideReminder:!0,showTime:!Ye?.isEvent,onClose:()=>yt(null),onDateChange:ln,onReminderChange:()=>{}}),mt(xn,{anchorEl:Ye?.anchorEl??null,open:!!Ye&&Ye?.field==="due_date",date:Ye?.date??"",showTime:!Ye?.isEvent,reminders:Ye?.reminders??[],hideReminder:!!Ye?.completed,onClose:()=>yt(null),onDateChange:ln,onReminderChange:uo}),mt(kt,{open:!!er,anchorEl:er?.anchorEl??null,title:er?.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:()=>Nt(null),onConfirm:()=>{er&&p?.(er.taskSeq),Nt(null)}}),mt(kt,{open:!!Bt,anchorEl:Bt?.anchorEl??null,title:Bt?.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:Bt?.nextCompleted?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>bt(null),onConfirm:()=>{Bt&&c(Bt.task,Bt.nextCompleted),bt(null)}})]})}import{useCallback as Xn,useMemo as bo,useRef as rv,useState as An}from"react";import{Box as zt,ButtonBase as mh,Divider as ih,IconButton as sh,Menu as ah,MenuItem as Uo}from"@mui/material";import nu from"@mui/icons-material/Add";import lh from"@mui/icons-material/MoreVert";import ch from"@mui/icons-material/EditOutlined";import uh from"@mui/icons-material/ArchiveOutlined";import fh from"@mui/icons-material/UnarchiveOutlined";import nv from"@mui/icons-material/NotificationsOutlined";import ov from"@mui/icons-material/PeopleAltOutlined";import{SvgIcon as O2}from"@mui/material";import{jsx as th}from"react/jsx-runtime";function dr({sx:e,...d}){return th(O2,{viewBox:"0 0 24 24",...d,sx:{fill:"none",...e},children:th("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 iv,DragOverlay as sv,PointerSensor as av,pointerWithin as lv,rectIntersection as cv,useDroppable as uv,useSensor as fv,useSensors as dv}from"@dnd-kit/core";import{SortableContext as gh,arrayMove as dh,horizontalListSortingStrategy as hv,useSortable as pv,verticalListSortingStrategy as mv}from"@dnd-kit/sortable";import{CSS as gv}from"@dnd-kit/utilities";import ou from"@ehfuse/overlay-scrollbar";import{useState as j2}from"react";import{Box as Yn,ButtonBase as F2,Checkbox as q2,Tooltip as rh}from"@mui/material";import $2 from"@mui/icons-material/AlarmOutlined";import H2 from"@mui/icons-material/DragIndicator";import W2 from"@mui/icons-material/RadioButtonUnchecked";import U2 from"@mui/icons-material/CheckCircle";import V2 from"@mui/icons-material/TimerOutlined";import{Box as On,Button as A2,Popover as D2}from"@mui/material";import P2 from"@mui/icons-material/CheckCircle";import{Fragment as N2,jsx as Gn,jsxs as fi}from"react/jsx-runtime";function sl({anchorEl:e,open:d,acks:b,total:l,avatarSrcByName:o,pendingNames:s=[],onRequestConfirm:r,onClose:t}){let n=Lt();return Gn(D2,{open:d&&(n||!!e),anchorEl:e,onClose:t,transitionDuration:0,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},...n?{anchorReference:"none",slotProps:{paper:{sx:{position:"fixed",top:"50%",left:"50%",translate:"-50% -50%",maxWidth:"calc(100vw - 48px)",maxHeight:"70vh",borderRadius:3}}}}:{},children:fi(On,{sx:{minWidth:240,maxWidth:320,py:1},children:[fi(On,{sx:{px:2,pb:.75,fontSize:Ir(13.5),fontWeight:600,color:"#37352f",borderBottom:"1px solid #efefed"},children:["\uD655\uC778 ",b.length,"/",l]}),s.length>0&&b.length>0?fi(On,{sx:{px:2,pt:1,pb:.5,fontSize:Ir(12.5),fontWeight:600,color:"#9a9a97"},children:["\uD655\uC778 ",b.length]}):null,b.length===0?s.length>0?null:Gn(On,{sx:{px:2,py:1.5,fontSize:Ir(13.5),color:"#9a9a97"},children:"\uC544\uC9C1 \uD655\uC778\uD55C \uC0AC\uB78C\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):b.map(c=>fi(On,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:.75,minWidth:0},children:[Gn(qr,{names:[c.name],size:22,avatarSrcByName:o}),Gn(On,{component:"span",sx:{fontSize:Ir(14),color:"#37352f",whiteSpace:"nowrap"},children:c.name}),Gn(On,{component:"span",sx:{ml:"auto",fontSize:Ir(12.5),color:"#9a9a97",whiteSpace:"nowrap"},children:un(c.time)}),Gn(P2,{sx:{fontSize:16,color:"#2f80ed",flexShrink:0}})]},c.account_seq)),s.length>0?fi(N2,{children:[fi(On,{sx:{mt:b.length>0?.75:0,px:2,pt:1,pb:.5,borderTop:b.length>0?"1px solid #efefed":"none",fontSize:Ir(12.5),fontWeight:600,color:"#9a9a97"},children:["\uBBF8\uD655\uC778 ",s.length]}),s.map(c=>fi(On,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:.75,minWidth:0},children:[Gn(qr,{names:[c],size:22,avatarSrcByName:o}),Gn(On,{component:"span",sx:{fontSize:Ir(14),color:"#37352f",whiteSpace:"nowrap"},children:c})]},c))]}):null,r?Gn(On,{sx:{borderTop:"1px solid #efefed",px:1.5,pt:1,pb:.25},children:Gn(A2,{size:"small",fullWidth:!0,variant:"outlined",onClick:()=>{r(),t()},sx:{fontSize:Ir(13)},children:"\uD655\uC778 \uC694\uCCAD"})}):null]})})}function L2(e){let d=Number(e.author_account_seq??0);return[...new Set([Number(e.manager_account_seq??0),...e.receiver_account_seqs??[]].filter(b=>b>0&&b!==d))]}function z2(e){let d=new Map,b=Number(e.manager_account_seq??0);b>0&&d.set(b,String(e.manager_name??"").trim());let l=e.receiver_account_seqs??[],o=e.receiver_names??[];return l.forEach((s,r)=>{s>0&&!d.has(s)&&d.set(s,String(o[r]??"").trim())}),d}function Fi(e,d){let b=L2(e),l=e.acks??[],o=d>0?l.find(t=>t.account_seq===d):void 0,s=new Set(l.map(t=>t.account_seq)),r=z2(e);return{myTime:o?.time??"",canConfirm:d>0&&b.includes(d)&&!o,count:l.filter(t=>b.includes(t.account_seq)).length,total:b.length,pendingNames:b.filter(t=>!s.has(t)).map(t=>r.get(t)??"").filter(t=>t.length>0)}}function nR(e){let d=String(e??"").trim();return d?d.slice(5,16).replaceAll("-","."):""}import{Fragment as X2,jsx as sr,jsxs as qi}from"react/jsx-runtime";function al(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}}var K2=3;function G2(e){let d=e.trim();return d?d.slice(2,10).replaceAll("-","."):"-"}function Y2(){let e=new Date,d=String(e.getMonth()+1).padStart(2,"0"),b=String(e.getDate()).padStart(2,"0");return`${e.getFullYear()}-${d}-${b}`}var Qc="taskbox-card-drag-handle";function Ns({task:e,statusOptions:d,showDueDate:b=!1,onRequestArchiveToggle:l,onRequestReply:o,onDueDateClick:s,titleFontSize:r=13,dragHandleProps:t}){let n=at(),c=Di(e,$t().resolveTask),a=!!e.due_date&&e.due_date.slice(0,10)<=Y2()?n.colors.danger:n.colors.textPrimary,h=Fi(e,0),[f,u]=j2(null),g=Oi(e,d),m=new Set(e.label_keys??[]),v=g.filter(B=>!m.has(B.key)),k=g.filter(B=>m.has(B.key));return qi(X2,{children:[qi(Yn,{sx:{display:"flex",alignItems:"flex-start",gap:.5},children:[t?sr(Yn,{className:Qc,...t,onClick:B=>B.stopPropagation(),sx:{display:"inline-flex",alignItems:"center",flexShrink:0,ml:-.5,mr:-.25,color:n.colors.textMuted,cursor:"grab",touchAction:"none","&:active":{cursor:"grabbing"}},children:sr(H2,{sx:{fontSize:18}})}):null,sr(q2,{size:"small",icon:sr(W2,{sx:{fontSize:20}}),checkedIcon:sr(U2,{sx:{fontSize:20}}),checked:e.completed,inputProps:{"aria-label":e.completed?`${e.title} \uC644\uB8CC \uD574\uC81C`:`${e.title} \uC644\uB8CC \uCC98\uB9AC`},onPointerDown:B=>B.stopPropagation(),onClick:B=>B.stopPropagation(),onChange:(B,R)=>l?.({anchorEl:B.currentTarget,taskSeq:e.seq,nextCompleted:R}),sx:{p:0}}),sr(rh,{title:e.title,arrow:!0,enterDelay:300,children:qi(Yn,{sx:{flex:1,minWidth:0,pr:1,fontSize:r,fontWeight:n.mode==="dark"||e.completed?400:500,color:n.mode==="dark"?n.colors.textStrong:n.colors.textPrimary,lineHeight:1.35,overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:K2,overflowWrap:"anywhere",textDecoration:e.completed?"line-through":"none"},children:[e.is_event&&e.event_time?`${e.event_time} `:"",e.title,c?sr(Yn,{component:"span",sx:{ml:.75,fontSize:12.5,fontWeight:400,color:n.colors.textMuted,fontVariantNumeric:"tabular-nums",whiteSpace:"nowrap",textDecoration:"none"},children:c}):null,(e.comment_count??e.comments?.length??0)>0?sr(Ho,{sx:{fontSize:15,ml:.5,verticalAlign:"-2px",color:n.colors.textMuted}}):null]})})]}),e.is_bug&&e.ticket_no?sr(Yn,{sx:{pl:3,mt:-.5,fontSize:12.5,color:n.colors.textSecondary,fontWeight:500,fontVariantNumeric:"tabular-nums"},children:e.ticket_no}):null,qi(Yn,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:.5},children:[qi(Yn,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:.5,minWidth:0},children:[v.map(B=>sr(At,{option:B,small:!0},B.key)),sr(Fr,{priority:e.priority,small:!0}),k.map(B=>sr(At,{option:B,small:!0},B.key))]}),b?sr(rh,{title:"\uB9C8\uAC10\uC608\uC815",arrow:!0,placement:"top",disableInteractive:!0,slotProps:{transition:{timeout:0}},children:sr(F2,{disabled:!s,onPointerDown:B=>B.stopPropagation(),onClick:B=>{B.stopPropagation(),s?.(e,B.currentTarget)},sx:{display:"inline-flex",alignItems:"center",px:.5,py:.1,borderRadius:.75,fontSize:13,fontWeight:500,color:a,whiteSpace:"nowrap","&:hover":s?{bgcolor:n.colors.border}:void 0},children:String(e.due_date??"").trim()?G2(e.due_date):sr($2,{sx:{fontSize:15,color:n.colors.textMuted}})})}):null]}),b&&(e.due_date.slice(11,16)||e.estimated_time)?qi(Yn,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:.25,mt:-.5,fontSize:12,color:n.colors.textSecondary},children:[sr(V2,{sx:{fontSize:14}}),e.due_date.slice(11,16)||e.estimated_time]}):null,sr(qr,{names:[...e.manager_name?[e.manager_name]:[],...e.receiver_names],size:20,ringFirst:!!e.manager_name}),h.total>0?sr(Yn,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:.5},children:sr(Yn,{sx:{flexShrink:0,width:64},onPointerDown:B=>B.stopPropagation(),onClick:B=>B.stopPropagation(),children:sr(Ni,{canConfirm:!1,count:h.count,total:h.total,onConfirm:()=>{},onShowList:B=>u(B)})})}):null,sr(sl,{anchorEl:f,open:!!f,acks:e.acks??[],total:h.total,pendingNames:h.pendingNames,onRequestConfirm:o&&h.count<h.total?()=>{o(e),u(null)}:void 0,onClose:()=>u(null)})]})}import{Box as Z2}from"@mui/material";import{useSortable as J2}from"@dnd-kit/sortable";import{CSS as Q2}from"@dnd-kit/utilities";import{jsx as nh}from"react/jsx-runtime";function ev(e){return{px:1.25,py:1,display:"flex",flexDirection:"column",gap:.75,borderBottom:`1px solid ${e.borderColor}`,bgcolor:e.bg}}function oh({task:e,statusOptions:d,variant:b="card",showDueDate:l=!1,onRequestArchiveToggle:o,onRequestReply:s,onDueDateClick:r,onCardClick:t,onCardContextMenu:n,titleFontSize:c}){let i=at(),{attributes:a,listeners:h,setNodeRef:f,transform:u,transition:g,isDragging:m}=J2({id:String(e.seq)}),v=b==="list";return nh(Z2,{ref:f,onClick:t?()=>t(e):void 0,onContextMenu:n?k=>n(e,k):void 0,sx:{...v?ev(i.card):al(i.card),opacity:m?.35:e.completed?.55:1,transform:Q2.Translate.toString(u),transition:g,position:"relative",cursor:"default","&:hover":v?{bgcolor:i.card.hoverBg}:{boxShadow:"0 3px 8px rgba(0,0,0,0.1)"}},children:nh(Ns,{task:e,statusOptions:d,showDueDate:l,onRequestArchiveToggle:o,onRequestReply:s,onDueDateClick:r,titleFontSize:c,dragHandleProps:{...a,...h}})})}function tv(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?e.slice(5).replace("-","."):""}function vn(e){if(e.status==="closed")return`${e.name} (\uC885\uB8CC)`;let d=tv(e.end_date);return d?`${e.name} (~${d})`:e.name}import{jsx as rt,jsxs as Ut}from"react/jsx-runtime";var hh=2,bh="taskbox-column-drag-handle",iu=[Qc,bh],ll="group-",wn="colmove-",eu="__default__",tu=Ec,ru="__other__",cl="sprint-",ph=`${cl}0`,bv={planning:"#9a9a97",active:"#2f80ed",closed:"#9a9a97"};function yh(e){return{flexShrink:0,width:e.width,py:e.paddingY,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 yv({column:e,tasks:d,statusOptions:b,onRequestArchiveToggle:l,onRequestReply:o,onDueDateClick:s,onAddTask:r,canAdd:t,onOpenMenu:n,onCardClick:c,onCardContextMenu:i,grow:a,summary:h,onOpenSprintMenu:f}){let u=at(),{setNodeRef:g,isOver:m}=uv({id:`${ll}${e.key}`}),{attributes:v,listeners:k,setNodeRef:B,transform:R,transition:L,isDragging:A}=pv({id:`${wn}${e.key}`,disabled:e.isDefault||e.isArchived||!!e.locked});return Ut(zt,{ref:P=>{g(P),B(P)},sx:{flex:a?"1 0 270px":"0 0 270px",minWidth:270,contain:"inline-size",minHeight:0,maxHeight:"100%",display:"flex",flexDirection:"column",borderRadius:1.5,boxShadow:P=>P.shadows[1],bgcolor:m?u.colors.accentSoft:u.board.columnBg,transition:"background-color 0.15s",overflow:"hidden",transform:gv.Translate.toString(R),...L?{transition:`${L}, background-color 0.15s`}:{},opacity:A?.6:1},children:[Ut(zt,{className:bh,...v,...k,sx:{display:"flex",alignItems:"center",gap:.75,pl:1.25,pr:.5,py:1.1,borderBottom:`1px solid ${u.card.borderColor}`,flexShrink:0,touchAction:"none",cursor:e.isDefault||e.isArchived||e.locked?"default":"grab",opacity:e.isArchived?.65:1},children:[e.dot?rt(zt,{sx:{width:8,height:8,borderRadius:"50%",bgcolor:e.dot,flexShrink:0}}):e.isDefault?null:(()=>{let P=Tt(e.icon);return P?rt(P,{sx:{fontSize:17,color:"#1e3a8a"}}):null})(),rt(zt,{component:"span",sx:{fontSize:u.board.columnHeaderFontSize,fontWeight:700,color:u.board.columnHeaderColor,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.label}),rt(zt,{component:"span",sx:{...yh(u.board.badge),ml:"auto"},children:d.length}),e.sprint&&f?rt(sh,{size:"small","aria-label":"\uBAA9\uD45C \uBA54\uB274",onPointerDown:P=>P.stopPropagation(),onClick:P=>f(P.currentTarget,e.sprint),sx:{color:"#9a9a97"},children:rt(lh,{sx:{fontSize:18}})}):e.locked?null:rt(sh,{size:"small","aria-label":"\uD504\uB85C\uC81D\uD2B8 \uBA54\uB274",onPointerDown:P=>P.stopPropagation(),onClick:P=>n({anchorEl:P.currentTarget,column:e}),sx:{color:"#9a9a97"},children:rt(lh,{sx:{fontSize:18}})})]}),h?rt(zt,{sx:{px:1.25,py:1.25,borderBottom:`1px solid ${u.card.borderColor}`,flexShrink:0},children:h}):null,rt(zt,{sx:{flex:"1 1 auto",minHeight:0,display:"flex",flexDirection:"column"},children:rt(ou,{style:{height:"auto",flex:"1 1 auto",minHeight:0},contentStyle:{minWidth:0},thumb:{width:6},dragScroll:{excludeClasses:iu},children:Ut(zt,{sx:{display:"flex",flexDirection:"column",flexGrow:1},children:[rt(gh,{items:d.map(P=>String(P.seq)),strategy:mv,children:d.map(P=>rt(oh,{task:P,statusOptions:b,variant:"list",showDueDate:!0,titleFontSize:15,onRequestArchiveToggle:l,onRequestReply:o,onDueDateClick:s,onCardClick:c,onCardContextMenu:i},P.seq))}),d.length===0&&!t?rt(zt,{sx:{py:3,textAlign:"center",fontSize:13,color:"#9a9a97"},children:"\uCE74\uB4DC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):null,d.length===0&&t?rt(zt,{sx:{flexGrow:1,minHeight:56,display:"flex",flexDirection:"column","&:hover .taskbox-board-add":{opacity:1,pointerEvents:"auto"}},children:Ut(mh,{className:"taskbox-board-add",onClick:()=>r(e.isDefault?"":e.key),sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:.5,px:1.25,py:1.75,borderBottom:`1px dashed ${u.card.borderColor}`,bgcolor:u.card.bg,color:u.colors.accentOnSurface,fontSize:13,fontWeight:500,opacity:0,pointerEvents:"none",transition:"opacity 0.15s","&:hover":{bgcolor:u.card.hoverBg}},children:[rt(nu,{sx:{fontSize:16}}),"\uC5C5\uBB34 \uB4F1\uB85D"]})}):null]})})})]})}function su({tasks:e,statusOptions:d,customTabs:b,mode:l="active",onToggleCompleted:o,onRequestReply:s,onChangeDueDate:r,onChangeReminder:t,onMoveTask:n,columnAxis:c="project",statusColumns:i=[],onMoveTaskStatus:a,sprintColumns:h=[],onMoveTaskSprint:f,onAddGroup:u,onAddTask:g,canAdd:m=!0,onRequestRename:v,onArchiveProject:k,onDeleteProject:B,onReorderProjects:R,onOpenDetail:L,onTaskContextMenu:A,hideCompleted:P=!1,renderColumnSummary:N,onEditSprint:q,onChangeSprintStatus:j,onRemoveSprint:S}){let T=at(),[D,p]=An(null),[y,x]=An(null),[w,_]=An(null),[C,O]=An(null),[z,$]=An(null),[V,M]=An(null),[H,I]=An(null),[E,F]=An(null),[U,Y]=An(null),[K,W]=An(null),[X,J]=An(null),G=rv(!1),te=bo(()=>new Map(e.map(be=>[be.seq,be])),[e]),Z=bo(()=>{let be=e.filter(ye=>ye.is_notice);return be.sort((ye,Ce)=>ye.completed!==Ce.completed?ye.completed?1:-1:Ce.seq-ye.seq),be},[e]),re=bo(()=>b.filter(be=>!be.archived),[b]),ie=bo(()=>b.filter(be=>be.archived),[b]),se=be=>({key:be.key,label:be.label,icon:be.icon,isDefault:!1,isArchived:be.archived}),oe=bo(()=>new Set(i.map(be=>be.key)),[i]),pe=bo(()=>new Set(h.map(be=>be.seq)),[h]),me=bo(()=>{if(c==="sprint")return[{key:ph,label:"\uBBF8\uBC30\uC815",icon:"",isDefault:!0,isArchived:!1,dot:"#c9c8c5",locked:!0},...h.map(be=>({key:`${cl}${be.seq}`,label:vn(be),icon:"",isDefault:!1,isArchived:!1,dot:bv[be.status],locked:!0,sprint:be}))];if(c==="status"){let be=i.map(ye=>({key:ye.key,label:ye.name,icon:"",isDefault:!1,isArchived:!1,dot:ye.dot,locked:!0}));return be.some(ye=>ye.key===tu)?be:[...be,{key:tu,label:"\uC644\uB8CC",icon:"",isDefault:!1,isArchived:!1,dot:"#2f80ed",locked:!0}]}return l==="archived"?ie.map(se):[{key:eu,label:"\uAE30\uBCF8 \uC5C5\uBB34\uD568",icon:"",isDefault:!0,isArchived:!1},...re.map(se)]},[c,i,h,l,re,ie]),ke=dv(fv(av,{activationConstraint:{distance:5}})),Le=Xn(be=>{let ye=String(be.active.id).startsWith(wn),Ce=lv(be),et=Ce.length>0?Ce:cv(be);if(ye)return et.filter(vt=>String(vt.id).startsWith(wn));let ze=et.filter(vt=>!String(vt.id).startsWith(wn)),De=ze.filter(vt=>!String(vt.id).startsWith(ll));return De.length>0?De:ze},[]),Te=bo(()=>{let be=new Map;for(let ye of e){if(ye.is_notice)continue;let Ce;if(c==="sprint"){let ze=ye.sprint_seq??0;Ce=pe.has(ze)?`${cl}${ze}`:ph}else Ce=c==="status"?ye.completed?tu:oe.has(String(ye.status??""))?String(ye.status??""):ru:ye.tab_key?.trim()||eu;let et=be.get(Ce);et?et.push(ye):be.set(Ce,[ye])}for(let ye of be.values())ye.sort((Ce,et)=>{if(Ce.completed!==et.completed)return Ce.completed?1:-1;let ze=(Ce.group_sort_no??0)>0,De=(et.group_sort_no??0)>0;return ze&&De?(Ce.group_sort_no??0)-(et.group_sort_no??0):ze!==De?ze?-1:1:Ce.due_date!==et.due_date?Ce.due_date<et.due_date?-1:1:Ce.seq-et.seq});return be},[e,c,oe,pe]),Me=bo(()=>c!=="status"||(Te.get(ru)??[]).length===0?me:[...me,{key:ru,label:"\uAE30\uD0C0",icon:"",isDefault:!1,isArchived:!1,dot:"#c9c8c5",locked:!0}],[c,me,Te]),nt=Xn(be=>U?(U.get(be)??[]).map(ye=>te.get(ye)).filter(ye=>!!ye):Te.get(be)??[],[U,te,Te]),we=Xn(be=>{let ye=nt(be);return P?ye.filter(Ce=>!Ce.completed):ye},[nt,P]),ee=Xn(be=>{let ye=String(be.active.id);if(ye.startsWith(wn)){J(ye.slice(wn.length));return}W(Number(ye)),Y(new Map(me.map(Ce=>[Ce.key,(Te.get(Ce.key)??[]).map(et=>et.seq)])))},[me,Te]),Se=Xn((be,ye)=>{if(be.startsWith(ll))return{key:be.slice(ll.length),overSeq:null};let Ce=Number(be);for(let[et,ze]of ye)if(ze.includes(Ce))return{key:et,overSeq:Ce};return null},[]),ge=Xn(be=>{let{active:ye,over:Ce}=be;!Ce||String(ye.id).startsWith(wn)||Y(et=>{if(!et)return et;let ze=Number(ye.id),De=Se(String(Ce.id),et);if(!De)return et;let vt=[...et.entries()].find(([,Ke])=>Ke.includes(ze))?.[0];if(!vt||vt===De.key)return et;let Ve=new Map(et);Ve.set(vt,(Ve.get(vt)??[]).filter(Ke=>Ke!==ze));let qe=[...Ve.get(De.key)??[]],Mt=qe.length;if(De.overSeq!==null){let Ke=qe.indexOf(De.overSeq);Ke!==-1&&(Mt=Ke)}return qe.splice(Mt,0,ze),Ve.set(De.key,qe),Ve})},[Se]),xe=Xn(be=>{let ye=String(be.active.id);if(ye.startsWith(wn)){J(null);let Mt=String(be.over?.id??"");if(!Mt.startsWith(wn))return;let Ke=ye.slice(wn.length),ne=Mt.slice(wn.length);if(Ke===ne)return;let ue=b.map(dt=>dt.key),de=ue.indexOf(Ke),_e=ue.indexOf(ne);if(de===-1||_e===-1)return;R(dh(ue,de,_e));return}let Ce=U;if(Y(null),W(null),G.current=!0,!Ce||!be.over)return;let et=Number(ye),ze=[...Ce.entries()].find(([,Mt])=>Mt.includes(et));if(!ze)return;let[De,vt]=ze,Ve=[...vt],qe=Se(String(be.over.id),Ce);if(qe&&qe.key===De&&qe.overSeq!==null&&qe.overSeq!==et){let Mt=Ve.indexOf(et),Ke=Ve.indexOf(qe.overSeq);Mt!==-1&&Ke!==-1&&(Ve=dh(Ve,Mt,Ke))}if(c==="status"){a?.(et,De);return}if(c==="sprint"){f?.(et,Number(De.slice(cl.length))||0);return}n(et,De===eu?"":De,Ve)},[b,U,Se,n,R,c,a,f]),Ze=Xn(()=>{Y(null),W(null),J(null),G.current=!0},[]),Pe=Xn(be=>{if(G.current){G.current=!1;return}L(be)},[L]),He=K!==null?te.get(K)??null:null,Qt=X!==null?me.find(be=>be.key===X)??null:null,Ue=Xn((be,ye)=>{F({anchorEl:ye,taskSeq:be.seq,date:be.due_date,reminders:Wn(be)})},[]),Oe=y?.column??null;return Ut(zt,{sx:{flex:1,minHeight:0,height:"100%",display:"flex",flexDirection:"column",border:`1px solid ${T.card.borderColor}`,borderRadius:"0 0 4px 4px",overflow:"hidden",bgcolor:T.colors.surfaceSubtle},children:[Ut(iv,{sensors:ke,collisionDetection:Le,onDragStart:ee,onDragOver:ge,onDragEnd:xe,onDragCancel:Ze,children:[rt(zt,{sx:{flex:1,minHeight:0,minWidth:0,contain:"inline-size"},children:l==="archived"&&me.length===0?rt(zt,{sx:{py:8,textAlign:"center",color:"#9a9a97",fontSize:14},children:"\uBCF4\uAD00\uB41C \uD504\uB85C\uC81D\uD2B8\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):rt(ou,{style:{height:"100%"},contentStyle:{width:"max-content",minWidth:"100%",height:"100%"},thumb:{width:8},showHorizontalScrollbar:!0,dragScroll:{excludeClasses:iu},children:Ut(zt,{sx:{display:"flex",alignItems:"flex-start",gap:hh,height:"100%",minWidth:"min-content",p:hh,boxSizing:"border-box"},children:[l==="active"&&Z.length>0?Ut(zt,{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:be=>be.shadows[1],bgcolor:T.card.bg,overflow:"hidden"},children:[Ut(zt,{sx:{display:"flex",alignItems:"center",gap:.75,pl:1.25,pr:.5,py:1.1,borderBottom:`1px solid ${T.card.borderColor}`,flexShrink:0,minHeight:48},children:[rt(nv,{sx:{fontSize:17,color:"#e8763a"}}),rt(zt,{component:"span",sx:{fontSize:14.5,fontWeight:700,color:T.board.columnHeaderColor},children:"\uACF5\uC9C0\uC0AC\uD56D"}),Ut(zt,{component:"span",sx:{fontSize:13,color:"#9a9a97",flexShrink:0},children:["(",Z.length,")"]})]}),rt(zt,{sx:{flex:"1 1 auto",minHeight:0,display:"flex",flexDirection:"column"},children:rt(ou,{style:{height:"auto",flex:"1 1 auto",minHeight:0},contentStyle:{minWidth:0},dragScroll:{excludeClasses:iu},thumb:{width:6},children:rt(zt,{sx:{display:"flex",flexDirection:"column"},children:Z.map(be=>Ut(zt,{onClick:()=>Pe(be),onContextMenu:ye=>A(be,ye),sx:{px:1.25,py:1,display:"flex",flexDirection:"column",gap:.75,borderBottom:`1px solid ${T.card.borderColor}`,bgcolor:T.card.bg,cursor:"pointer","&:hover":{bgcolor:T.card.hoverBg}},children:[rt(Ns,{task:be,statusOptions:d,showDueDate:!0,titleFontSize:15,onRequestArchiveToggle:p}),(()=>{let ye=(be.target_names??[]).filter(et=>et.trim());if(ye.length===0)return null;let Ce=ye.length>2?`${ye[0]}, ${ye[1]} \uC678 ${ye.length-2}`:ye.join(", ");return Ut(zt,{sx:{display:"flex",alignItems:"center",gap:.5,fontSize:12.5,color:"#787774",overflow:"hidden",whiteSpace:"nowrap"},children:[rt(ov,{sx:{fontSize:14,flexShrink:0}}),rt(zt,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis"},children:Ce})]})})()]},be.seq))})})})]}):null,rt(gh,{items:re.map(be=>`${wn}${be.key}`),strategy:hv,children:Me.map(be=>rt(yv,{column:be,tasks:we(be.key),summary:N?.(be.key,nt(be.key)),onOpenSprintMenu:q||j||S?(ye,Ce)=>_({anchorEl:ye,sprint:Ce}):void 0,statusOptions:d,onRequestArchiveToggle:p,onRequestReply:s,onDueDateClick:Ue,onAddTask:g,canAdd:m&&c==="project",onOpenMenu:x,onCardClick:Pe,onCardContextMenu:A,grow:c!=="project"},be.key))}),l==="active"&&c==="project"?Ut(mh,{onClick:u,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:[rt(nu,{sx:{fontSize:18}}),"\uC0C8 \uD504\uB85C\uC81D\uD2B8"]}):null,l==="active"&&Me.length===0&&Z.length===0?rt(zt,{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]})})}),rt(sv,{children:He?rt(zt,{sx:{...al,width:250,boxShadow:"0 8px 20px rgba(0,0,0,0.18)",cursor:"grabbing"},children:rt(Ns,{task:He,statusOptions:d,showDueDate:!0,titleFontSize:15})}):Qt?Ut(zt,{sx:{display:"flex",alignItems:"center",gap:.75,width:270,px:1.25,py:1,bgcolor:T.card.bg,border:`1px solid ${T.card.borderColor}`,borderRadius:1.5,boxShadow:"0 8px 20px rgba(0,0,0,0.18)",opacity:.9,cursor:"grabbing"},children:[(()=>{let be=Tt(Qt.icon);return be?rt(be,{sx:{fontSize:17,color:"#1e3a8a"}}):null})(),rt(zt,{component:"span",sx:{fontSize:13.5,fontWeight:700,color:T.board.columnHeaderColor},children:Qt.label}),rt(zt,{component:"span",sx:yh(T.board.badge),children:(Te.get(Qt.key)??[]).length})]}):null})]}),Ut(ah,{transitionDuration:0,anchorEl:y?.anchorEl??null,open:!!y,onClose:()=>x(null),children:[Oe&&!Oe.isArchived&&m?Ut(Uo,{onClick:()=>{Oe&&g(Oe.isDefault?"":Oe.key),x(null)},sx:{fontSize:14,gap:1},children:[rt(nu,{sx:{fontSize:18,color:"#787774"}}),"\uC0C8 \uC5C5\uBB34 \uB4F1\uB85D"]}):null,Oe&&!Oe.isDefault&&!Oe.isArchived?Ut(Uo,{onClick:()=>{v(Oe.key,Oe.label,Oe.icon),x(null)},sx:{fontSize:14,gap:1},children:[rt(ch,{sx:{fontSize:18,color:"#787774"}}),"\uC218\uC815"]}):null,Oe&&!Oe.isDefault&&!Oe.isArchived?Ut(Uo,{onClick:()=>{if(y){let be=(Te.get(y.column.key)??[]).filter(ye=>!ye.completed&&!ye.archived).length;be>0?M({anchorEl:y.anchorEl,count:be}):$(y)}x(null)},sx:{fontSize:14,gap:1},children:[rt(uh,{sx:{fontSize:18,color:"#787774"}}),"\uBCF4\uAD00"]}):null,Oe&&Oe.isArchived?Ut(Uo,{onClick:()=>{k(Oe.key,!1),x(null)},sx:{fontSize:14,gap:1},children:[rt(fh,{sx:{fontSize:18,color:"#787774"}}),"\uBCF5\uC6D0"]}):null,Oe&&!Oe.isDefault?rt(ih,{}):null,Oe&&!Oe.isDefault?Ut(Uo,{onClick:()=>{y&&I(y),x(null)},sx:{fontSize:14,gap:1,color:"#e5484d"},children:[rt(dr,{sx:{fontSize:18}}),"\uC0AD\uC81C"]}):null]}),Ut(ah,{transitionDuration:0,anchorEl:w?.anchorEl??null,open:!!w,onClose:()=>_(null),children:[q?Ut(Uo,{onClick:()=>{w&&q(w.sprint.seq),_(null)},sx:{fontSize:14,gap:1},children:[rt(ch,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uC218\uC815"]}):null,j?Ut(Uo,{onClick:()=>{w&&j(w.sprint.seq,w.sprint.status==="closed"?"active":"closed"),_(null)},sx:{fontSize:14,gap:1},children:[w?.sprint.status==="closed"?rt(fh,{sx:{fontSize:18,color:"#787774"}}):rt(uh,{sx:{fontSize:18,color:"#787774"}}),w?.sprint.status==="closed"?"\uB2E4\uC2DC \uC2DC\uC791":"\uBAA9\uD45C \uC885\uB8CC"]}):null,S?rt(ih,{}):null,S?Ut(Uo,{onClick:()=>{w&&O(w),_(null)},sx:{fontSize:14,gap:1,color:"#e5484d"},children:[rt(dr,{sx:{fontSize:18}}),"\uBAA9\uD45C \uC0AD\uC81C"]}):null]}),rt(kt,{open:!!C,anchorEl:C?.anchorEl??null,title:`"${C?.sprint.name??""}" \uBAA9\uD45C\uB97C \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`,confirmText:"\uC0AD\uC81C",onCancel:()=>O(null),onConfirm:()=>{C&&S?.(C.sprint.seq),O(null)}}),rt(xn,{anchorEl:E?.anchorEl??null,open:!!E,date:E?.date??"",reminders:E?.reminders??[],onClose:()=>F(null),onDateChange:be=>{E&&(r(E.taskSeq,be),F(ye=>ye&&{...ye,date:be}))},onReminderChange:be=>{E&&(t(E.taskSeq,be),F(ye=>ye&&{...ye,reminders:be}))}}),rt(kt,{open:!!V,anchorEl:V?.anchorEl??null,title:`\uBBF8\uC644\uB8CC \uC5C5\uBB34 ${V?.count??0}\uAC74\uC774 \uC788\uC5B4 \uBCF4\uAD00\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
30
30
  \uC644\uB8CC\uD558\uAC70\uB098 \uB2E4\uB978 \uD504\uB85C\uC81D\uD2B8\uB85C \uC62E\uAE34 \uB4A4 \uBCF4\uAD00\uD558\uC138\uC694.`,confirmText:"\uD655\uC778",onCancel:()=>M(null),onConfirm:()=>M(null)}),rt(kt,{open:!!z,anchorEl:z?.anchorEl??null,title:`"${z?.column.label??""}" \uD504\uB85C\uC81D\uD2B8\uB97C \uBCF4\uAD00\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?
31
31
  \uBCF4\uAD00\uD568 \uD0ED\uC5D0\uC11C \uBCF5\uC6D0\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.`,confirmText:"\uBCF4\uAD00",onCancel:()=>$(null),onConfirm:()=>{z&&k(z.column.key,!0),$(null)}}),rt(kt,{open:!!H,anchorEl:H?.anchorEl??null,title:`"${H?.column.label??""}" \uD504\uB85C\uC81D\uD2B8\uB97C \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?
32
- \uC18C\uC18D \uC5C5\uBB34\uB294 \uAE30\uBCF8 \uC5C5\uBB34\uD568\uC73C\uB85C \uC774\uB3D9\uD569\uB2C8\uB2E4.`,confirmText:"\uC0AD\uC81C",onCancel:()=>I(null),onConfirm:()=>{H&&B(H.column.key),I(null)}}),rt(kt,{open:!!D,anchorEl:D?.anchorEl??null,title:D?.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:D?.nextCompleted?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>p(null),onConfirm:()=>{D&&o(D.taskSeq,D.nextCompleted),p(null)}})]})}import{useCallback as xo,useMemo as Ls,useRef as wh,useState as zs}from"react";import{Box as yr,Button as yv,ButtonBase as kh,IconButton as _h}from"@mui/material";import xv from"@mui/icons-material/Add";import vv from"@mui/icons-material/ChevronLeft";import wv from"@mui/icons-material/ChevronRight";import _v from"@mui/icons-material/KeyboardArrowDown";import{DatePicker as kv}from"@ehfuse/mui-datetime-picker";import{DndContext as Sv,DragOverlay as Tv,PointerSensor as Cv,pointerWithin as Bv,rectIntersection as Iv,useDroppable as Ev,useSensor as Mv,useSensors as Rv}from"@dnd-kit/core";import{SortableContext as Ov,arrayMove as Av,useSortable as Dv,verticalListSortingStrategy as Pv}from"@dnd-kit/sortable";import{CSS as Nv}from"@dnd-kit/utilities";import Lv from"@ehfuse/overlay-scrollbar";function cv(e){let[d,b,l]=e.split("-").map(Number),o=new Date(Date.UTC(d,b-1,l+1)),s=r=>String(r).padStart(2,"0");return`${o.getUTCFullYear()}-${s(o.getUTCMonth()+1)}-${s(o.getUTCDate())}`}function $i(e){let d=new Map;for(let b of e){let l=b.start_date;for(let o=0;o<62&&l<=b.end_date;o+=1){let s=d.get(l);s?s.push(b):d.set(l,[b]),l=cv(l)}}for(let b of d.values())b.sort((l,o)=>(l.time||"99:99").localeCompare(o.time||"99:99")||l.title.localeCompare(o.title));return d}function Hi(e){let d=String((e.is_event?e.event_time:e.due_date.slice(11,16)||e.estimated_time)??"").trim();return/^\d{1,2}:\d{2}$/.test(d)?d:""}function Wi(e,d){if(e.completed!==d.completed)return e.completed?1:-1;let b=Hi(e),l=Hi(d);if(!!b!=!!l)return b?-1:1;if(b&&l&&b!==l)return b<l?-1:1;let o=e.sort_no>0,s=d.sort_no>0;return o&&s?e.sort_no-d.sort_no:o!==s?o?-1:1:e.seq-d.seq}import{Box as au,Tooltip as uv}from"@mui/material";import{jsx as lu,jsxs as fv}from"react/jsx-runtime";function Ui({event:e,small:d=!1}){let b=e.time?`${e.time} ${e.title}`:e.title,l=e.calendar?`\uAD6C\uAE00 \xB7 ${e.calendar}`:"\uAD6C\uAE00 \uCE98\uB9B0\uB354",o=s=>{s.stopPropagation();let[r,t,n]=e.start_date.split("-").map(Number);window.open(`https://calendar.google.com/calendar/r/day/${r}/${t}/${n}`,"_blank")};return lu(uv,{title:`(${l}) ${b}`,arrow:!0,enterDelay:300,children:fv(au,{onClick:o,onPointerDown:s=>s.stopPropagation(),sx:{display:"flex",alignItems:"center",gap:.5,px:1,py:d?.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:[lu(au,{component:"span",sx:{width:6,height:6,borderRadius:"50%",bgcolor:"#0f9d58",flexShrink:0}}),lu(au,{component:"span",sx:{minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},children:b})]})})}import{useCallback as pv}from"react";import{Box as Vo,Checkbox as mv}from"@mui/material";import{useLayoutEffect as dv,useState as xh}from"react";var uu=new WeakMap,cu=null;function hv(){return typeof ResizeObserver>"u"?null:(cu||(cu=new ResizeObserver(e=>{for(let d of e){let b=uu.get(d.target);if(!b)continue;let l=d.borderBoxSize?.[0]?.inlineSize??d.target.getBoundingClientRect().width;b(l)}})),cu)}function vh(){let[e,d]=xh(null),[b,l]=xh(0);return dv(()=>{if(!e)return;l(e.getBoundingClientRect().width);let o=hv();if(o)return uu.set(e,s=>l(r=>Math.abs(r-s)<1?r:s)),o.observe(e),()=>{o.unobserve(e),uu.delete(e)}},[e]),{ref:d,width:b}}import{jsx as yo,jsxs as fu}from"react/jsx-runtime";var du={high:"#e5484d",medium:"#2f80ed",low:"#d9a514"},Vi=15,gv=150,bv=3;function Ko({task:e,statusOptions:d,onOpenDetail:b,onContextMenu:l,isPreview:o=!1,isDragging:s=!1,isMine:r=!1,avatarSrcByName:t,showManagerAvatar:n=!1,onOpenMembers:c,setNodeRef:i,dragProps:a,trailing:h,showCheckbox:f=!1,onRequestToggleCompleted:u,showTime:g=!0,wrapTitle:m=!1}){let v=at(),k=v.mode==="dark",[B]=Oi(e,d),R=String(e.manager_name??"").trim(),L=g?Hi(e):"",A=Di(e,$t().resolveTask),P=!e.completed&&!e.is_event&&!e.due_date.slice(0,10),N=e.is_notice||e.is_event?Tt(e.icon||(e.is_notice?ir:cr)):null,q=!e.completed&&!e.is_event&&!!e.due_date&&e.due_date.slice(0,10)<yd(),{ref:j,width:S}=vh(),T=S>0&&S<gv,D=T||m,p=pv(x=>{j(x),i?.(x)},[j,i]),y=n&&!r&&!T&&!!R;return fu(Vo,{ref:p,...a??{},onClick:x=>{x.stopPropagation(),b(e)},onContextMenu:l?x=>l(e,x):void 0,sx:{display:"flex",alignItems:D?"flex-start":"center",gap:.5,py:.6,px:1,flexShrink:0,borderRadius:.75,minWidth:0,maxWidth:"100%",bgcolor:B?k?Ri(B.dot,v.chip.darkBgAlpha):B.bg:k?v.card.bg:v.colors.surfaceHover,color:B?k?v.chip.darkTextSource==="fg"?B.fg:B.dot:B.fg:v.colors.textPrimary,fontSize:Vi,fontWeight:k||e.completed?400:500,textDecoration:e.completed?"line-through":"none",opacity:o?.5:s?.35:e.completed?.6:P?.75:1,border:o?`1px dashed ${v.colors.accent}`:"1px solid transparent",pointerEvents:o?"none":"auto",cursor:"pointer",touchAction:a?"none":"auto",overflow:"hidden","&:hover":{filter:"brightness(0.96)"},...q?{borderLeft:`3px solid ${v.colors.danger}`,pl:.75}:r?{borderLeft:"3px solid #2f80ed",pl:.75}:{}},children:[yo(Vo,{component:"span",sx:{width:6,height:6,borderRadius:"50%",flexShrink:0,...D?{mt:"7px"}:{},bgcolor:du[e.priority]??v.colors.accentOnSurface}}),f&&!T&&u?yo(mv,{size:"small",checked:e.completed,onPointerDown:x=>x.stopPropagation(),onClick:x=>x.stopPropagation(),onChange:(x,w)=>u({anchorEl:x.currentTarget,taskSeq:e.seq,nextCompleted:w}),sx:{p:0,flexShrink:0}}):null,N&&!T?yo(N,{sx:{fontSize:15,flexShrink:0,opacity:.75,...D?{mt:"3px"}:{}}}):null,fu(Vo,{sx:{minWidth:0,overflow:"hidden",display:"flex",flexDirection:"column",color:k?v.colors.textStrong:v.colors.textPrimary,...P&&!k?{color:v.colors.textSecondary}:{}},children:[T&&L?yo(Vo,{component:"span",sx:{lineHeight:1.35,fontSize:Vi-1,color:e.completed?v.colors.textPrimary:v.colors.danger},children:L}):null,fu(Vo,{component:"span",sx:{minWidth:0,overflow:"hidden",...D?{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:bv,whiteSpace:"normal",overflowWrap:"anywhere",lineHeight:1.35}:{textOverflow:"ellipsis",whiteSpace:"nowrap"}},children:[!T&&L?yo(Vo,{component:"span",sx:{mr:.5,fontSize:Vi-1,color:e.completed?v.colors.textPrimary:v.colors.danger},children:L}):null,e.title,!T&&A?yo(Vo,{component:"span",sx:{ml:.5,fontSize:Vi-2,color:v.colors.textMuted,fontVariantNumeric:"tabular-nums"},children:A}):null,!T&&(e.comment_count??e.comments?.length??0)>0?yo(Ho,{sx:{fontSize:15,ml:.5,verticalAlign:"-2px",color:v.colors.textMuted}}):null]})]}),h??null,!h&&y?yo(Vo,{component:"span",onClick:c?x=>{x.stopPropagation(),c(e)}:void 0,sx:{display:"inline-flex",flexShrink:0,ml:"auto",pl:.5},children:yo(bn,{src:t?.get(R)??"",name:R,avatarSx:{width:22,height:22,fontSize:11},iconFontSize:14})}):null]})}import{jsx as Dt,jsxs as vo}from"react/jsx-runtime";var Sh=36,zv=["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"],fl="day-";function hu(e){let d=new Date(e);return d.setHours(0,0,0,0),d.setDate(d.getDate()-d.getDay()),d}function ul(e,d){let b=new Date(e);return b.setDate(b.getDate()+d),b}function jv(e){let d=e[0],b=e[e.length-1];return d.getMonth()===b.getMonth()?`${d.getFullYear()}\uB144 ${d.getMonth()+1}\uC6D4`:d.getFullYear()===b.getFullYear()?`${d.getFullYear()}\uB144 ${d.getMonth()+1}\uC6D4 - ${b.getMonth()+1}\uC6D4`:`${d.getFullYear()}\uB144 ${d.getMonth()+1}\uC6D4 - ${b.getFullYear()}\uB144 ${b.getMonth()+1}\uC6D4`}function Fv(e){return e.getDate()===1?`${e.getMonth()+1}\uC6D4 1\uC77C`:String(e.getDate())}function qv({task:e,statusOptions:d,isMine:b,avatarSrcByName:l,onCardClick:o,onCardContextMenu:s,onRequestArchiveToggle:r,dragDisabled:t=!1}){let{attributes:n,listeners:c,setNodeRef:i,transform:a,transition:h,isDragging:f}=Dv({id:String(e.seq),disabled:t});return Dt(Ko,{task:e,statusOptions:d,isMine:b,avatarSrcByName:l,showManagerAvatar:!0,wrapTitle:!0,onOpenDetail:u=>o?.(u),onContextMenu:s,showCheckbox:!0,onRequestToggleCompleted:r,isDragging:f,setNodeRef:i,dragProps:t?void 0:{...n,...c,style:{transform:Nv.Translate.toString(a),transition:h}}})}function $v({dayKey:e,isToday:d,dayLabel:b,holidayName:l,tasks:o,googleEvents:s,statusOptions:r,onRequestArchiveToggle:t,onRequestReply:n,onAddSchedule:c,canAdd:i,onCardClick:a,onCardContextMenu:h,summary:f,myAccountSeq:u,avatarSrcByName:g,dragDisabled:m=!1}){let v=at(),{setNodeRef:k}=Ev({id:`${fl}${e}`,disabled:m});return vo(yr,{ref:k,sx:{minWidth:0,minHeight:0,height:"100%",display:"flex",flexDirection:"column",bgcolor:d?v.calendar.todayBg:v.calendar.cellBg},children:[vo(yr,{sx:{display:"flex",justifyContent:"flex-end",alignItems:"center",gap:.5,px:1,height:Sh,bgcolor:d?v.calendar.todayBg:v.calendar.dateBandBg,borderBottom:`1px solid ${v.calendar.borderColor}`,flexShrink:0},children:[l?Dt(yr,{component:"span",sx:{mr:"auto",fontSize:11.5,fontWeight:600,color:v.colors.danger,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:l}):null,d?Dt(yr,{component:"span",sx:{mr:.75,px:.6,py:.1,borderRadius:.5,fontSize:11,fontWeight:600,bgcolor:v.colors.danger,color:v.calendar.cellBg,lineHeight:1.6},children:"\uC624\uB298"}):null,Dt(yr,{component:"span",sx:{fontSize:13.5,fontWeight:d?700:400,color:l?v.colors.danger:v.mode==="dark"?v.colors.textStrong:v.colors.textPrimary,flexShrink:0},children:b})]}),f?Dt(yr,{sx:{px:1,py:1,borderBottom:`1px solid ${v.calendar.borderColor}`,flexShrink:0},children:f}):null,Dt(yr,{sx:{flex:1,minHeight:0,bgcolor:d?v.calendar.todayBg:v.colors.surfaceSubtle},children:Dt(Lv,{style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:vo(yr,{sx:{display:"flex",flexDirection:"column",flexGrow:1},children:[s.length>0?Dt(yr,{sx:{display:"flex",flexDirection:"column",gap:.5,px:1,pt:.75,pb:.25},children:s.map(B=>Dt(Ui,{event:B},B.uid))}):null,Dt(Ov,{items:o.map(B=>String(B.seq)),strategy:Pv,children:Dt(yr,{sx:{display:"flex",flexDirection:"column",gap:.5,px:1,pt:o.length>0?.75:0},children:o.map(B=>Dt(qv,{task:B,statusOptions:r,isMine:u>0&&Number(B.manager_account_seq??0)===u,avatarSrcByName:g,onCardClick:a,onCardContextMenu:h,onRequestArchiveToggle:t,dragDisabled:m},B.seq))})}),Dt(yr,{sx:{flexGrow:1,minHeight:56,display:"flex",flexDirection:"column",pb:1,...i?{"&:hover .taskbox-add-schedule":{opacity:1,pointerEvents:"auto"}}:{}},children:vo(kh,{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 ${v.calendar.borderColor}`,bgcolor:v.calendar.cellBg,color:v.colors.accentOnSurface,fontSize:13,fontWeight:500,opacity:0,pointerEvents:"none",transition:"opacity 0.15s","&:hover":{bgcolor:v.calendar.hoverBg}},children:[Dt(xv,{sx:{fontSize:16}}),"\uC5C5\uBB34 \uB4F1\uB85D"]})})]})})})]})}function Th({tasks:e,googleEvents:d=[],statusOptions:b,fallbackToStartDate:l=!1,myAccountSeq:o=0,avatarSrcByName:s,todayStr:r,onToggleCompleted:t,onMoveTask:n,onRequestReply:c,onAddSchedule:i,canAdd:a=!0,disableDrag:h=!1,onOpenDetail:f,onTaskContextMenu:u,hideCompleted:g=!1,renderColumnSummary:m}){let v=at(),[k,B]=zs(()=>hu(new Date)),[R,L]=zs(null),[A,P]=zs(null),[N,q]=zs(null),[j,S]=zs(null),T=wh(!1),D=Ls(()=>Array.from({length:7},(K,W)=>ul(k,W)),[k]),p=Ls(()=>new Map(e.map(K=>[K.seq,K])),[e]),y=Ls(()=>[...new Set(D.map(K=>K.getFullYear()))],[D]),x=Hn(y),w=Rv(Mv(Cv,{activationConstraint:{distance:5}})),_=xo(K=>{let W=Bv(K),X=W.length>0?W:Iv(K),J=X.filter(G=>!String(G.id).startsWith(fl));return J.length>0?J:X},[]),C=Ls(()=>$i(d),[d]),O=Ls(()=>{let K=new Map;for(let W of e){let X=W.due_date.slice(0,10)||(l?W.start_date.slice(0,10)||String(W.created_time??"").slice(0,10):"");if(!X)continue;let J=K.get(X);J?J.push(W):K.set(X,[W])}for(let W of K.values())W.sort(Wi);return K},[e,l]),z=xo(K=>N?(N.get(K)??[]).map(W=>p.get(W)).filter(W=>!!W):O.get(K)??[],[N,p,O]),$=xo(K=>{let W=z(K);return g?W.filter(X=>!X.completed):W},[z,g]),V=xo(K=>{S(Number(K.active.id)),q(new Map(D.map(W=>{let X=vr(W);return[X,(O.get(X)??[]).map(J=>J.seq)]})))},[D,O]),M=xo((K,W)=>{if(K.startsWith(fl))return{day:K.slice(fl.length),overSeq:null};let X=Number(K);for(let[J,G]of W)if(G.includes(X))return{day:J,overSeq:X};return null},[]),H=xo(K=>{let{active:W,over:X}=K;X&&q(J=>{if(!J)return J;let G=Number(W.id),te=M(String(X.id),J);if(!te)return J;let Z=[...J.entries()].find(([,oe])=>oe.includes(G))?.[0];if(!Z||Z===te.day)return J;let re=new Map(J);re.set(Z,(re.get(Z)??[]).filter(oe=>oe!==G));let ie=[...re.get(te.day)??[]],se=ie.length;if(te.overSeq!==null){let oe=ie.indexOf(te.overSeq);oe!==-1&&(se=oe)}return ie.splice(se,0,G),re.set(te.day,ie),re})},[M]),I=xo(K=>{let{active:W,over:X}=K,J=N;if(q(null),S(null),T.current=!0,!J||!X)return;let G=Number(W.id),te=[...J.entries()].find(([,oe])=>oe.includes(G));if(!te)return;let[Z,re]=te,ie=[...re],se=M(String(X.id),J);if(se&&se.day===Z&&se.overSeq!==null&&se.overSeq!==G){let oe=ie.indexOf(G),pe=ie.indexOf(se.overSeq);oe!==-1&&pe!==-1&&(ie=Av(ie,oe,pe))}n(G,Z,ie)},[N,n,M]),E=xo(()=>{q(null),S(null),T.current=!0},[]),F=xo(K=>{if(T.current){T.current=!1;return}f(K)},[f]),U=j!==null?p.get(j)??null:null,Y=wh(null);return vo(yr,{onTouchStart:K=>{let W=K.touches[0];Y.current=W?{x:W.clientX,y:W.clientY}:null},onTouchEnd:K=>{let W=Y.current;Y.current=null;let X=K.changedTouches[0];if(!W||!X||j!==null)return;let J=X.clientX-W.x,G=X.clientY-W.y;Math.abs(J)<60||Math.abs(J)<=Math.abs(G)||B(ul(k,J<0?7:-7))},sx:{display:"flex",flexDirection:"column",flex:1,minHeight:0,border:`1px solid ${v.calendar.borderColor}`,borderRadius:"0 0 4px 4px",overflow:"hidden"},children:[vo(yr,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1,bgcolor:v.calendar.bg,borderBottom:`1px solid ${v.calendar.borderColor}`,flexShrink:0},children:[vo(yr,{sx:{display:"flex",alignItems:"center",gap:.25},children:[Dt(_h,{size:"small","aria-label":"\uC774\uC804 \uC8FC",onClick:()=>B(ul(k,-7)),children:Dt(vv,{sx:{fontSize:24,color:v.colors.textSecondary}})}),Dt(yv,{size:"small",color:"inherit",onClick:()=>B(hu(new Date)),sx:{minWidth:0,px:1,mx:1,fontSize:15.5,fontWeight:v.mode==="dark"?400:500,color:v.mode==="dark"?v.colors.textStrong:v.colors.textPrimary},children:"\uC624\uB298"}),Dt(_h,{size:"small","aria-label":"\uB2E4\uC74C \uC8FC",onClick:()=>B(ul(k,7)),children:Dt(wv,{sx:{fontSize:24,color:v.colors.textSecondary}})})]}),vo(kh,{onClick:K=>P(K.currentTarget),sx:{ml:{xs:"auto",lg:0},display:"inline-flex",alignItems:"center",gap:.25,px:.75,py:.25,borderRadius:1,fontSize:15,fontWeight:v.mode==="dark"?400:700,color:v.mode==="dark"?v.colors.textStrong:v.colors.textPrimary,"&:hover":{bgcolor:v.colors.surfaceHover}},children:[jv(D),Dt(_v,{sx:{fontSize:18,color:v.colors.textMuted}})]})]}),Dt(yr,{sx:{display:"grid",gridTemplateColumns:"repeat(7, minmax(0, 1fr))",bgcolor:v.calendar.headerBg,borderBottom:`1px solid ${v.calendar.borderColor}`,flexShrink:0,"& > *":{borderRight:`1px solid ${v.calendar.borderColor}`},"& > *:last-child":{borderRight:"none"}},children:D.map(K=>{let W=K.getDay(),X=x.has(vr(K));return Dt(yr,{sx:{height:Sh,display:"flex",alignItems:"center",justifyContent:"center",fontSize:12.5,color:W===0||X?v.colors.danger:W===6?v.colors.accentOnSurface:v.colors.textSecondary},children:zv[W]},vr(K))})}),Dt(yr,{sx:{flex:1,minHeight:0},children:vo(Sv,{sensors:w,collisionDetection:_,onDragStart:V,onDragOver:H,onDragEnd:I,onDragCancel:E,children:[Dt(yr,{sx:{display:"grid",gridTemplateColumns:"repeat(7, minmax(0, 1fr))",height:"100%",minHeight:0,"& > *":{borderRight:`1px solid ${v.calendar.borderColor}`},"& > *:last-child":{borderRight:"none"}},children:D.map(K=>{let W=vr(K);return Dt($v,{dayKey:W,isToday:W===r,dayLabel:Fv(K),holidayName:x.get(W)??"",summary:m?.(W,z(W)),tasks:$(W),googleEvents:C.get(W)??[],statusOptions:b,onRequestArchiveToggle:L,onRequestReply:c,onAddSchedule:i,canAdd:a,onCardClick:F,onCardContextMenu:u,myAccountSeq:o,avatarSrcByName:s,dragDisabled:h},W)})}),Dt(Tv,{children:U?Dt(yr,{sx:{boxShadow:"0 8px 20px rgba(0,0,0,0.18)",borderRadius:.75,cursor:"grabbing"},children:Dt(Ko,{task:U,statusOptions:b,onOpenDetail:()=>{},isMine:o>0&&Number(U.manager_account_seq??0)===o})}):null})]})}),Dt(kv,{anchorEl:A,open:!!A,onClose:()=>P(null),selectedDate:k,onDateChange:K=>{B(hu(K)),P(null)}}),Dt(kt,{open:!!R,anchorEl:R?.anchorEl??null,title:R?.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:R?.nextCompleted?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>L(null),onConfirm:()=>{R&&t(R.taskSeq,R.nextCompleted),L(null)}})]})}import{useCallback as js,useMemo as di,useRef as Hv,useState as Fs}from"react";import{Box as $r,Button as Wv,ButtonBase as Bh,IconButton as Ch,Tooltip as Uv}from"@mui/material";import Vv from"@mui/icons-material/Add";import Kv from"@mui/icons-material/ChevronLeft";import Gv from"@mui/icons-material/ChevronRight";import Yv from"@mui/icons-material/KeyboardArrowDown";import{DatePicker as Xv}from"@ehfuse/mui-datetime-picker";import{DndContext as Zv,DragOverlay as Jv,PointerSensor as Qv,pointerWithin as ew,rectIntersection as tw,useDraggable as rw,useDroppable as Ih,useSensor as nw,useSensors as ow}from"@dnd-kit/core";import iw from"@ehfuse/overlay-scrollbar";import{jsx as Ht,jsxs as wo}from"react/jsx-runtime";var sw=["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"],dl="mday-",hl="mchip-",Eh=36;function aw(e){let d=new Date(e);return d.setHours(0,0,0,0),d.setDate(d.getDate()-d.getDay()),d}function pl(e){let d=new Date(e);return d.setHours(0,0,0,0),d.setDate(1),d}function lw(e,d){let b=new Date(e);return b.setDate(b.getDate()+d),b}function pu(e,d){let b=pl(e);return b.setMonth(b.getMonth()+d),b}function cw({task:e,statusOptions:d,isPreview:b=!1,isMine:l=!1,avatarSrcByName:o,onOpenDetail:s,onContextMenu:r,onRequestToggleCompleted:t,dragDisabled:n=!1}){let{attributes:c,listeners:i,setNodeRef:a,isDragging:h}=rw({id:String(e.seq),disabled:b||n}),{setNodeRef:f}=Ih({id:`${hl}${e.seq}`,disabled:b||n});return Ht(Uv,{title:e.title,arrow:!0,enterDelay:400,children:Ht(Ko,{task:e,statusOptions:d,onOpenDetail:s,onContextMenu:r,showCheckbox:!!t,onRequestToggleCompleted:t,isPreview:b,isDragging:h,isMine:l,avatarSrcByName:o,showManagerAvatar:!0,wrapTitle:!0,setNodeRef:u=>{a(u),f(u)},dragProps:n?void 0:{...c,...i}})})}function uw({dayKey:e,dayNumber:d,isToday:b,isOtherMonth:l,weekday:o,holidayName:s,tasks:r,googleEvents:t,statusOptions:n,previewSeq:c,myAccountSeq:i,avatarSrcByName:a,onRequestToggleCompleted:h,onOpenDetail:f,onTaskContextMenu:u,onAddSchedule:g,canAdd:m,dragDisabled:v=!1}){let k=at(),B=k.mode==="dark",{setNodeRef:R,isOver:L}=Ih({id:`${dl}${e}`,disabled:v}),A=r,P=!!s||o===0;return wo($r,{ref:R,sx:{minWidth:0,minHeight:0,display:"flex",flexDirection:"column",gap:.5,p:.5,bgcolor:L?k.colors.accentSoft:b?k.calendar.todayBg:l?k.calendar.otherMonthBg:k.calendar.cellBg,transition:"background-color 0.15s",overflow:"hidden",...m?{"&:hover .taskbox-month-add":{opacity:1,pointerEvents:"auto"}}:{}},children:[wo($r,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:.5,height:Eh,flexShrink:0,mx:-.5,mt:-.5,px:1,bgcolor:b?k.calendar.todayBg:k.calendar.dateBandBg,borderBottom:`1px solid ${k.calendar.borderColor}`},children:[s?Ht($r,{component:"span",sx:{mr:.25,minWidth:0,fontSize:11,fontWeight:600,color:k.colors.danger,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:s}):null,b?Ht($r,{component:"span",sx:{px:.5,borderRadius:.5,fontSize:10.5,fontWeight:600,bgcolor:k.colors.danger,color:k.calendar.cellBg,lineHeight:1.6},children:"\uC624\uB298"}):null,Ht($r,{component:"span",sx:{fontSize:13.5,fontWeight:b?700:400,color:l?k.colors.textMuted:P?k.colors.danger:o===6?k.colors.accentOnSurface:B?k.colors.textStrong:k.colors.textPrimary,flexShrink:0},children:d})]}),t.map(N=>Ht(Ui,{event:N,small:!0},N.uid)),A.map(N=>Ht(cw,{task:N,statusOptions:n,isPreview:N.seq===c,isMine:i>0&&Number(N.manager_account_seq??0)===i,avatarSrcByName:a,onRequestToggleCompleted:h,onOpenDetail:f,onContextMenu:u,dragDisabled:v},N.seq)),Ht($r,{sx:{flexGrow:1,minHeight:0,display:"flex",alignItems:"flex-start"},children:wo(Bh,{className:"taskbox-month-add",onClick:()=>g(e),sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"flex-start",gap:.5,px:1.25,py:.75,borderBottom:`1px dashed ${k.calendar.borderColor}`,bgcolor:k.calendar.cellBg,color:k.colors.accentOnSurface,fontSize:13,fontWeight:500,opacity:0,pointerEvents:"none",transition:"opacity 0.15s","&:hover":{bgcolor:k.calendar.hoverBg}},children:[Ht(Vv,{sx:{fontSize:16}}),"\uC5C5\uBB34 \uB4F1\uB85D"]})})]})}function Mh({tasks:e,googleEvents:d=[],statusOptions:b,fallbackToStartDate:l=!1,myAccountSeq:o=0,avatarSrcByName:s,onToggleCompleted:r,todayStr:t,onMoveTask:n,onAddSchedule:c,canAdd:i=!0,disableDrag:a=!1,onOpenDetail:h,onTaskContextMenu:f}){let u=at(),g=u.mode==="dark",[m,v]=Fs(()=>pl(new Date)),[k,B]=Fs(null),[R,L]=Fs(null),[A,P]=Fs(null),[N,q]=Fs(null),j=di(()=>{let F=aw(m);return Array.from({length:42},(U,Y)=>lw(F,Y))},[m]),S=di(()=>new Map(e.map(F=>[F.seq,F])),[e]),T=di(()=>$i(d),[d]),D=di(()=>[...new Set(j.map(F=>F.getFullYear()))],[j]),p=Hn(D),y=di(()=>{let F=new Map;for(let U of e){let Y=U.due_date.slice(0,10)||(l?U.start_date.slice(0,10)||String(U.created_time??"").slice(0,10):"");if(!Y)continue;let K=F.get(Y);K?K.push(U):F.set(Y,[U])}for(let U of F.values())U.sort(Wi);return F},[e,l]),x=ow(nw(Qv,{activationConstraint:{distance:5}})),w=js(F=>{let U=ew(F),Y=U.length>0?U:tw(F),K=Y.filter(W=>String(W.id).startsWith(hl));return K.length>0?K:Y.filter(W=>String(W.id).startsWith(dl))},[]),_=js(F=>{P(Number(F.active.id))},[]),C=js(F=>{q(F.over?String(F.over.id):null)},[]),O=di(()=>{let F=new Map;for(let[U,Y]of y)for(let K of Y)F.set(K.seq,U);return F},[y]),z=A!==null?S.get(A)?.due_date.slice(0,10)??"":"",$=di(()=>{if(A===null||!N)return null;if(N.startsWith(hl)){let F=Number(N.slice(hl.length)),U=O.get(F);if(!U)return null;let Y=(y.get(U)??[]).filter(W=>W.seq!==A),K=Y.findIndex(W=>W.seq===F);return{day:U,index:K===-1?Y.length:K}}if(N.startsWith(dl)){let F=N.slice(dl.length),U=(y.get(F)??[]).filter(Y=>Y.seq!==A);return{day:F,index:U.length}}return null},[A,O,N,y]),V=js(F=>{let U=y.get(F)??[];if(A===null||!$)return U;let Y=S.get(A);if(!Y)return U;let K=U.filter(W=>W.seq!==A);return F===$.day?[...K.slice(0,$.index),Y,...K.slice($.index)]:F===z?K:U},[A,z,$,S,y]),M=js(F=>{let U=A,Y=$;if(P(null),q(null),U===null||!Y)return;let K=(y.get(Y.day)??[]).filter(X=>X.seq!==U),W=[...K.slice(0,Y.index).map(X=>X.seq),U,...K.slice(Y.index).map(X=>X.seq)];n(U,Y.day,W)},[A,$,n,y]),H=A!==null?S.get(A)??null:null,I=`${m.getFullYear()}\uB144 ${m.getMonth()+1}\uC6D4`,E=Hv(null);return wo($r,{onTouchStart:F=>{let U=F.touches[0];E.current=U?{x:U.clientX,y:U.clientY}:null},onTouchEnd:F=>{let U=E.current;E.current=null;let Y=F.changedTouches[0];if(!U||!Y||A!==null)return;let K=Y.clientX-U.x,W=Y.clientY-U.y;Math.abs(K)<60||Math.abs(K)<=Math.abs(W)||v(pu(m,K<0?1:-1))},sx:{display:"flex",flexDirection:"column",flex:1,minHeight:0,border:`1px solid ${u.calendar.borderColor}`,borderRadius:"0 0 4px 4px",overflow:"hidden"},children:[wo($r,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1,bgcolor:u.calendar.bg,borderBottom:`1px solid ${u.calendar.borderColor}`,flexShrink:0},children:[wo($r,{sx:{display:"flex",alignItems:"center",gap:.25},children:[Ht(Ch,{size:"small","aria-label":"\uC774\uC804 \uB2EC",onClick:()=>v(pu(m,-1)),children:Ht(Kv,{sx:{fontSize:24,color:u.colors.textSecondary}})}),Ht(Wv,{size:"small",color:"inherit",onClick:()=>v(pl(new Date)),sx:{minWidth:0,px:1,mx:1,fontSize:15.5,fontWeight:u.mode==="dark"?400:500,color:u.mode==="dark"?u.colors.textStrong:u.colors.textPrimary},children:"\uC624\uB298"}),Ht(Ch,{size:"small","aria-label":"\uB2E4\uC74C \uB2EC",onClick:()=>v(pu(m,1)),children:Ht(Gv,{sx:{fontSize:24,color:u.colors.textSecondary}})})]}),wo(Bh,{onClick:F=>B(F.currentTarget),sx:{display:"inline-flex",alignItems:"center",gap:.25,ml:{xs:"auto",lg:0},px:.75,py:.25,borderRadius:1,fontSize:15,fontWeight:u.mode==="dark"?400:700,color:u.mode==="dark"?u.colors.textStrong:u.colors.textPrimary,"&:hover":{bgcolor:u.colors.surfaceHover}},children:[I,Ht(Yv,{sx:{fontSize:18,color:u.colors.textMuted}})]})]}),Ht($r,{sx:{display:"grid",gridTemplateColumns:"repeat(7, minmax(0, 1fr))",bgcolor:u.calendar.headerBg,borderBottom:`1px solid ${u.calendar.borderColor}`,flexShrink:0,"& > *":{borderRight:`1px solid ${u.calendar.borderColor}`},"& > *:last-child":{borderRight:"none"}},children:sw.map((F,U)=>Ht($r,{sx:{height:Eh,display:"flex",alignItems:"center",justifyContent:"center",fontSize:12.5,color:U===0?u.colors.danger:U===6?u.colors.accentOnSurface:u.colors.textSecondary},children:F},F))}),Ht($r,{sx:{flex:1,minHeight:0},children:wo(Zv,{sensors:x,collisionDetection:w,onDragStart:_,onDragOver:C,onDragEnd:M,onDragCancel:()=>{P(null),q(null)},children:[Ht(iw,{style:{height:"100%"},thumb:{width:8},children:Ht($r,{sx:{display:"grid",gridTemplateColumns:"repeat(7, minmax(0, 1fr))",gridTemplateRows:"repeat(6, minmax(112px, auto))",minHeight:"100%",flexShrink:0,"& > *":{borderRight:`1px solid ${u.calendar.borderColor}`,borderBottom:`1px solid ${u.calendar.borderColor}`},"& > *:nth-of-type(7n)":{borderRight:"none"},"& > *:nth-last-of-type(-n+7)":{borderBottom:"none"}},children:j.map(F=>{let U=vr(F);return Ht(uw,{dayKey:U,dayNumber:F.getDate(),isToday:U===t,isOtherMonth:F.getMonth()!==m.getMonth(),weekday:F.getDay(),holidayName:p.get(U)??"",tasks:V(U),googleEvents:T.get(U)??[],statusOptions:b,previewSeq:$?.day===U?A:null,myAccountSeq:o,avatarSrcByName:s,onRequestToggleCompleted:r?L:void 0,onOpenDetail:h,onTaskContextMenu:f,onAddSchedule:c,canAdd:i,dragDisabled:a},U)})})}),Ht(Jv,{children:H?wo($r,{sx:{display:"flex",alignItems:"center",gap:.5,py:.6,px:.75,borderRadius:.75,bgcolor:u.calendar.cellBg,border:`1px solid ${u.calendar.borderColor}`,boxShadow:"0 6px 16px rgba(0,0,0,0.18)",fontSize:Vi,fontWeight:500,color:u.colors.textPrimary,cursor:"grabbing",whiteSpace:"nowrap"},children:[Ht($r,{component:"span",sx:{width:6,height:6,borderRadius:"50%",bgcolor:du[H.priority]}}),H.title]}):null})]})}),Ht(kt,{open:!!R,anchorEl:R?.anchorEl??null,title:R?.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:R?.nextCompleted?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>L(null),onConfirm:()=>{R&&r?.(R.taskSeq,R.nextCompleted),L(null)}}),Ht(Xv,{anchorEl:k,open:!!k,onClose:()=>B(null),selectedDate:m,onDateChange:F=>{v(pl(F)),B(null)}})]})}import{useEffect as hw,useMemo as qs,useRef as gu,useState as bu}from"react";import{Box as Or,Button as pw,IconButton as Oh,useMediaQuery as mw}from"@mui/material";import gw from"@mui/icons-material/ChevronLeft";import bw from"@mui/icons-material/ChevronRight";import yw from"@mui/icons-material/KeyboardArrowDown";import{DatePicker as xw}from"@ehfuse/mui-datetime-picker";import{Box as _o,Button as fw,Dialog as dw}from"@mui/material";import{jsx as ko,jsxs as mu}from"react/jsx-runtime";function Rh({task:e,avatarSrcByName:d,onClose:b}){let l=at(),o=e?[{label:"\uCC45\uC784\uC790",names:[String(e.manager_name??"").trim()]},{label:"\uCC38\uC870\uC790",names:e.receiver_names??[]},{label:"\uC791\uC131\uC790",names:[String(e.created_by??"").trim()]}]:[];return ko(dw,{open:!!e,onClose:b,maxWidth:"xs",fullWidth:!0,slotProps:{paper:{sx:{borderRadius:2,m:2}}},children:e?mu(_o,{sx:{p:2,display:"flex",flexDirection:"column",gap:1.5,bgcolor:l.colors.surface},children:[ko(_o,{sx:{fontSize:15.5,fontWeight:600,color:l.colors.textStrong,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.title}),o.map(s=>{let r=s.names.filter(t=>!!t);return mu(_o,{sx:{display:"flex",alignItems:"flex-start",gap:1.5},children:[ko(_o,{sx:{width:56,flexShrink:0,fontSize:13.5,color:l.colors.textSecondary,pt:.5},children:s.label}),ko(_o,{sx:{display:"flex",flexWrap:"wrap",gap:1,minWidth:0},children:r.length===0?ko(_o,{sx:{fontSize:14,color:l.colors.textMuted,pt:.5},children:"\uBE44\uC5B4 \uC788\uC74C"}):r.map(t=>mu(_o,{sx:{display:"flex",alignItems:"center",gap:.75},children:[ko(bn,{src:d?.get(t)??"",name:t,avatarSx:{width:26,height:26,fontSize:12},iconFontSize:16}),ko(_o,{sx:{fontSize:14.5,color:l.colors.textPrimary},children:t})]},`${s.label}-${t}`))})]},s.label)}),ko(_o,{sx:{display:"flex",justifyContent:"flex-end",pt:.5},children:ko(fw,{size:"small",color:"inherit",onClick:b,children:"\uB2EB\uAE30"})})]}):null})}import{jsx as _r,jsxs as Zn}from"react/jsx-runtime";var vw=["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"];function Ah(e){let d=e?.parentElement??null;for(;d;){let b=window.getComputedStyle(d);if(/(auto|scroll)/.test(b.overflowY)&&d.scrollHeight>d.clientHeight)return d;d=d.parentElement}return null}var ww="(min-width:600px)";function yu(e){let d=new Date(e);return d.setHours(0,0,0,0),d.setDate(1),d}function Dh(e){let d=b=>String(b).padStart(2,"0");return`${e.getFullYear()}-${d(e.getMonth()+1)}-${d(e.getDate())}`}function Ph({tasks:e,googleEvents:d=[],statusOptions:b,todayStr:l,onOpenDetail:o,onAddSchedule:s,myAccountSeq:r=0,avatarSrcByName:t,fallbackToStartDate:n=!1}){let c=at(),i=mw(ww),[a,h]=bu(()=>yu(new Date)),[f,u]=bu(!1),g=qs(()=>{let T=new Date(a.getFullYear(),a.getMonth()+1,0).getDate();return Array.from({length:T},(D,p)=>{let y=new Date(a.getFullYear(),a.getMonth(),p+1);return{ymd:Dh(y),dayNumber:p+1,weekday:y.getDay()}})},[a]),m=qs(()=>{let T=new Map;for(let D of e){let p=D.due_date.slice(0,10)||(n?D.start_date.slice(0,10)||String(D.created_time??"").slice(0,10):"");if(!p)continue;let y=T.get(p);y?y.push(D):T.set(p,[D])}for(let D of T.values())D.sort(Wi);return T},[e,n]),v=qs(()=>n?e.filter(T=>!T.due_date.slice(0,10)&&!T.start_date.slice(0,10)&&!String(T.created_time??"").slice(0,10)).sort((T,D)=>T.completed!==D.completed?T.completed?1:-1:T.seq-D.seq):[],[e,n]),[k,B]=bu(null),R=qs(()=>$i(d),[d]),L=qs(()=>[a.getFullYear()],[a]),A=Hn(L),P=gu(null),N=l.slice(0,7)===Dh(a).slice(0,7);hw(()=>{if(!N)return;let T=()=>{let y=P.current,x=Ah(y);if(!x||!y)return;let w=y.getBoundingClientRect().top-x.getBoundingClientRect().top+x.scrollTop;x.scrollTop=Math.max(0,w-x.clientHeight/2+y.clientHeight/2)},D=setTimeout(T,100),p=setTimeout(T,400);return()=>{clearTimeout(D),clearTimeout(p)}},[N,a]);let q=gu(null),j=gu(null),S=T=>{h(p=>new Date(p.getFullYear(),p.getMonth()+T,1));let D=Ah(q.current);D&&D.scrollTo({top:0,behavior:"auto"})};return Zn(Or,{ref:q,onTouchStart:T=>{let D=T.touches[0];j.current=D?{x:D.clientX,y:D.clientY}:null},onTouchEnd:T=>{let D=j.current;j.current=null;let p=T.changedTouches[0];if(!D||!p)return;let y=p.clientX-D.x,x=p.clientY-D.y;Math.abs(y)<60||Math.abs(y)<=Math.abs(x)||S(y<0?1:-1)},sx:{minWidth:0,maxWidth:"100%",overflow:"hidden",bgcolor:c.colors.surface},children:[Zn(Or,{sx:{display:"flex",alignItems:"center",gap:.5,px:1.5,py:1,flexShrink:0},children:[_r(Oh,{size:"small","aria-label":"\uC774\uC804 \uB2EC",onClick:()=>S(-1),children:_r(gw,{sx:{fontSize:24,color:c.colors.textSecondary}})}),_r(pw,{size:"small",color:"inherit",onClick:()=>h(yu(new Date)),sx:{minWidth:0,px:1,fontSize:15.5,color:c.mode==="dark"?c.colors.textStrong:c.colors.textPrimary},children:"\uC624\uB298"}),_r(Oh,{size:"small","aria-label":"\uB2E4\uC74C \uB2EC",onClick:()=>S(1),children:_r(bw,{sx:{fontSize:24,color:c.colors.textSecondary}})}),Zn(Or,{onClick:()=>u(!0),sx:{ml:"auto",pr:.5,display:"flex",alignItems:"center",gap:.25,fontSize:16.5,fontWeight:c.mode==="dark"?400:700,color:c.mode==="dark"?c.colors.textStrong:c.colors.textPrimary,cursor:"pointer"},children:[a.getFullYear(),"\uB144 ",a.getMonth()+1,"\uC6D4",_r(yw,{sx:{fontSize:20,color:c.colors.textMuted}})]})]}),Zn(Or,{sx:{minWidth:0,overflowX:"hidden",borderTop:`1px solid ${c.calendar.borderColor}`},children:[v.length>0?Zn(Or,{sx:{display:"flex",alignItems:"center",gap:1,px:1,py:.75,minWidth:0,maxWidth:"100%",flexShrink:0,borderBottom:`1px solid ${c.calendar.borderColor}`},children:[Zn(Or,{sx:{width:52,flexShrink:0,fontSize:12.5,lineHeight:1.3,color:c.colors.textSecondary,textAlign:"center"},children:["\uB0A0\uC9DC",_r("br",{}),"\uC5C6\uC74C"]}),_r(Or,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",gap:.5},children:v.map(T=>_r(Ko,{task:T,statusOptions:b,onOpenDetail:o,isMine:r>0&&Number(T.manager_account_seq??0)===r,avatarSrcByName:t,showManagerAvatar:!0,onOpenMembers:B},T.seq))})]}):null,g.map(({ymd:T,dayNumber:D,weekday:p})=>{let y=A.get(T)??"",x=T===l,w=!!y||p===0,_=m.get(T)??[],C=R.get(T)??[],O=_.length>0||C.length>0;return Zn(Or,{ref:x?P:void 0,onClick:s?()=>s(T):void 0,sx:{display:"flex",alignItems:"center",gap:1,px:1,minWidth:0,maxWidth:"100%",py:O?.75:.5,minHeight:44,flexShrink:0,borderBottom:`1px solid ${c.calendar.borderColor}`,...s?{cursor:"pointer"}:{}},children:[_r(Or,{sx:{width:52,flexShrink:0,display:"flex",flexDirection:"column",alignItems:"center",gap:.25},children:Zn(Or,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:.25,"@media (min-width:600px)":{flexDirection:"row",gap:.75}},children:[_r(Or,{component:"span",sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:40,height:32,borderRadius:1,px:1.25,fontSize:22,fontWeight:500,color:x?c.colors.surface:w?c.colors.danger:p===6?c.colors.accentOnSurface:c.colors.textPrimary,bgcolor:x?c.colors.accentOnSurface:"transparent"},children:D}),_r(Or,{component:"span",sx:{fontSize:13,color:w?c.colors.danger:p===6?c.colors.accentOnSurface:c.colors.textSecondary},children:vw[p]})]})}),Zn(Or,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",gap:.5},children:[C.map(z=>_r(Ui,{event:z},z.uid)),_.map(z=>{let $=Hi(z),V=_r(Ko,{task:z,statusOptions:b,onOpenDetail:o,isMine:r>0&&Number(z.manager_account_seq??0)===r,avatarSrcByName:t,showManagerAvatar:!0,onOpenMembers:B,showTime:!i,wrapTitle:!0},z.seq);return i?Zn(Or,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[_r(Or,{component:"span",sx:{width:44,flexShrink:0,textAlign:"right",fontSize:13.5,fontWeight:400,opacity:1,color:$?z.completed?c.colors.textPrimary:c.colors.danger:"transparent"},children:$||"00:00"}),_r(Or,{sx:{flex:1,minWidth:0},children:V})]},z.seq):V})]})]},T)})]}),_r(Rh,{task:k,avatarSrcByName:t,onClose:()=>B(null)}),_r(xw,{open:f,centered:!0,monthOnly:!0,onClose:()=>u(!1),selectedDate:a,onDateChange:T=>{h(yu(T)),u(!1)}})]})}import{useCallback as Nh,useEffect as Lh,useMemo as xu,useRef as gl,useState as $s}from"react";import{Box as ar,Tooltip as Fh}from"@mui/material";import _w from"@ehfuse/overlay-scrollbar";import kw from"@mui/icons-material/CheckCircle";import Sw from"@mui/icons-material/RadioButtonUnchecked";import{DndContext as Tw,PointerSensor as Cw,closestCenter as Bw,useSensor as Iw,useSensors as Ew}from"@dnd-kit/core";import{SortableContext as Mw,arrayMove as Rw,useSortable as Ow,verticalListSortingStrategy as Aw}from"@dnd-kit/sortable";import Dw from"@mui/icons-material/DragIndicator";import{jsx as Gt,jsxs as So}from"react/jsx-runtime";var vu=36,Pw=48,zh=40,Nw=24,Lw=4,zw=14,jh=36,jw=12.5,Ki=220,Fw={high:{bg:"#f6c6c9",border:"#e5484d"},medium:{bg:"#c5d8f6",border:"#2f80ed"},low:{bg:"#f3e3b6",border:"#d9a514"}};function hi(e){let d=String(e??"").trim();if(!d)return null;let b=new Date(`${d}T00:00:00`);return Number.isNaN(b.getTime())?null:b}function ml(e,d){let b=new Date(e);return b.setDate(b.getDate()+d),b}function wu(e,d){return Math.round((d.getTime()-e.getTime())/864e5)}function qw({task:e,dragHandle:d,onPointerDown:b,onClick:l}){let o=at(),s=gl(null),[r,t]=$s("");return Gt(Fh,{title:r,arrow:!0,enterDelay:300,children:So(ar,{onPointerDown:b,onClick:n=>l(e,n),onMouseEnter:()=>{let n=s.current;t(n&&n.scrollWidth>n.clientWidth?e.title:"")},sx:{width:Ki,flexShrink:0,position:"sticky",left:0,zIndex:2,bgcolor:o.timeline.bg,borderRight:`1px solid ${o.timeline.gridColor}`,display:"flex",alignItems:"center",gap:.5,pl:.5,pr:1.5,fontSize:15,fontWeight:o.mode==="dark"||e.completed?400:500,color:e.completed?o.colors.textMuted:o.mode==="dark"?o.colors.textStrong:o.colors.textPrimary,overflow:"hidden",whiteSpace:"nowrap",cursor:"pointer",textDecoration:e.completed?"line-through":"none","&:hover":{bgcolor:o.colors.surfaceHover}},children:[d,Gt(ar,{ref:s,component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.title})]})})}function $w({id:e,showIndicator:d,children:b}){let l=at(),{attributes:o,listeners:s,setNodeRef:r}=Ow({id:e});return So(ar,{ref:r,sx:{position:"relative"},children:[d?Gt(ar,{sx:{position:"absolute",top:-1,left:0,right:0,height:2,bgcolor:l.colors.accentOnSurface,zIndex:5}}):null,b({...o,...s})]})}function qh({tasks:e,hideCompletedChecklist:d=!1,todayStr:b,onOpenDetail:l,onToggleChecklist:o,onReorderTasks:s,onTaskContextMenu:r}){let t=at(),[n,c]=$s(null),i=xu(()=>[...e].sort((x,w)=>{let _=(x.timeline_sort_no??0)>0,C=(w.timeline_sort_no??0)>0;if(_&&C)return(x.timeline_sort_no??0)-(w.timeline_sort_no??0);if(_!==C)return _?-1:1;let O=x.due_date||x.start_date,z=w.due_date||w.start_date;return O!==z?O<z?-1:1:x.seq-w.seq}),[e]),[a,h]=$s(null),[f,u]=$s(null),g=Ew(Iw(Cw,{activationConstraint:{distance:4}})),m=Nh(x=>{h(x.over?Number(x.over.id):null)},[]),v=Nh(x=>{h(null),u(null);let{active:w,over:_}=x;if(!_||w.id===_.id)return;let C=i.map($=>$.seq),O=C.indexOf(Number(w.id)),z=C.indexOf(Number(_.id));O===-1||z===-1||s(Rw(C,O,z))},[i,s]),k=xu(()=>{let x=hi(b)??new Date,w=x,_=ml(x,21);for(let z of i){let $=hi(z.start_date)??hi(z.due_date),V=hi(z.due_date)??$;$&&$<w&&(w=$),V&&V>_&&(_=V)}let C=ml(w,-3),O=wu(C,ml(_,3))+1;return Array.from({length:O},(z,$)=>ml(C,$))},[i,b]),B=k[0],R=k.findIndex(x=>vr(x)===b),{dayWidths:L,dayOffsets:A,gridWidth:P}=xu(()=>{let x=k.map((C,O)=>C.getDate()===1||O===0?Pw:vu),w=[],_=0;for(let C of x)w.push(_),_+=C;return{dayWidths:x,dayOffsets:w,gridWidth:_}},[k]),N=Ki+P,q=gl(null),j=x=>{q.current={x:x.clientX,y:x.clientY}},S=(x,w)=>{let _=q.current;q.current=null,!(_&&(Math.abs(w.clientX-_.x)>5||Math.abs(w.clientY-_.y)>5))&&l(x)},T=gl(null),[D,p]=$s(!1);Lh(()=>{let x=T.current?.getScrollContainer();if(!x)return;let w=()=>p(x.scrollHeight>x.clientHeight);w();let _=new ResizeObserver(w);return _.observe(x),()=>_.disconnect()},[i.length]);let y=gl(!1);return Lh(()=>{if(i.length===0||y.current)return;y.current=!0;let x=window.requestAnimationFrame(()=>{let w=T.current?.getScrollContainer();!w||R<0||(w.scrollLeft=Math.max(0,A[R]-vu*3))});return()=>window.cancelAnimationFrame(x)},[i.length]),So(ar,{sx:{flex:1,minHeight:0,minWidth:0,maxWidth:"100%",display:"flex",flexDirection:"column",border:`1px solid ${t.timeline.gridColor}`,borderRadius:"0 0 4px 4px",overflow:"hidden",bgcolor:t.timeline.headerBg},children:[Gt(ar,{sx:{flex:1,minHeight:0,minWidth:0,contain:"inline-size"},children:Gt(_w,{ref:T,style:{height:"100%"},contentStyle:{width:"max-content",minWidth:"100%"},thumb:{width:8},showHorizontalScrollbar:!0,dragScroll:{excludeClasses:["taskbox-timeline-handle"]},children:So(ar,{sx:{width:N,position:"relative",bgcolor:t.timeline.bg},children:[So(ar,{sx:{display:"flex",position:"sticky",top:0,zIndex:3,bgcolor:t.timeline.headerBg,borderBottom:`1px solid ${t.timeline.gridColor}`},children:[Gt(ar,{sx:{width:Ki,height:jh,flexShrink:0,position:"sticky",left:0,zIndex:4,bgcolor:t.timeline.headerBg,borderRight:`1px solid ${t.timeline.gridColor}`,display:"flex",alignItems:"center",px:1.5,fontSize:13,color:t.colors.textSecondary},children:"\uC81C\uBAA9"}),k.map((x,w)=>{let _=x.getDay(),C=w===R,O=x.getDate()===1||w===0;return Gt(ar,{sx:{width:L[w],height:jh,flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",fontSize:jw,fontWeight:C&&t.mode!=="dark"?700:400,color:C?t.timeline.bg:_===0?t.colors.danger:_===6?t.colors.accentOnSurface:t.colors.textSecondary,bgcolor:C?t.colors.danger:"transparent",borderRight:`1px solid ${t.timeline.gridColor}`,whiteSpace:"nowrap"},children:O?`${x.getMonth()+1}/${x.getDate()}`:x.getDate()},vr(x))})]}),Gt(Tw,{sensors:g,collisionDetection:Bw,onDragStart:x=>u(Number(x.active.id)),onDragOver:m,onDragEnd:v,onDragCancel:()=>{h(null),u(null)},children:Gt(Mw,{items:i.map(x=>String(x.seq)),strategy:Aw,children:So(ar,{sx:{position:"relative"},children:[k.map((x,w)=>{let _=x.getDay(),C=w===R;return!C&&_!==0&&_!==6?null:Gt(ar,{sx:{position:"absolute",top:0,bottom:0,left:Ki+A[w],width:L[w],bgcolor:C?"rgba(229,72,77,0.07)":t.colors.surfaceSubtle,zIndex:0}},`stripe-${vr(x)}`)}),i.map((x,w)=>{let _=hi(x.start_date)??hi(x.due_date),C=hi(x.due_date)??_,O=_?Math.min(k.length-1,Math.max(0,wu(B,_))):0,z=C?Math.min(k.length-1,Math.max(O,wu(B,C))):O,$=Fw[x.priority],V=Ki+A[O]+2,M=A[z]+L[z]-A[O]-4,H=(x.checklist??[]).map((I,E)=>({entry:I,index:E})).filter(({entry:I})=>!d||!I.checked);return Gt($w,{id:String(x.seq),showIndicator:a===x.seq&&f!==x.seq,children:I=>So(ar,{sx:{borderBottom:w===i.length-1&&D?"none":`1px solid ${t.timeline.gridColor}`,position:"relative",zIndex:1,opacity:f===x.seq?.45:1},children:[So(ar,{onContextMenu:E=>r(x,E),sx:{display:"flex",height:zh,position:"relative","&:hover":{bgcolor:"rgba(47,128,237,0.04)"}},children:[Gt(qw,{task:x,dragHandle:Gt(ar,{component:"span",className:"taskbox-timeline-handle",...I,onClick:E=>E.stopPropagation(),sx:{display:"inline-flex",alignItems:"center",flexShrink:0,color:t.colors.accentOnSurface,cursor:"grab",touchAction:"none","&:hover":{color:t.colors.accentOnSurface}},children:(()=>{let E=(x.is_notice||x.is_event?Tt(x.icon||(x.is_notice?ir:cr)):null)??Dw;return Gt(E,{sx:{fontSize:17}})})()}),onPointerDown:j,onClick:S}),Gt(Fh,{title:`${x.title} (${x.start_date||"?"} ~ ${x.due_date||"?"})`,arrow:!0,enterDelay:300,children:Gt(ar,{onPointerDown:j,onClick:E=>S(x,E),sx:{position:"absolute",top:(zh-20)/2,left:V,width:Math.max(vu-4,M),height:20,borderRadius:1,bgcolor:$.bg,border:`1px solid ${$.border}`,opacity:x.completed?.45:1,cursor:"pointer","&:hover":{filter:"brightness(0.95)"}}})})]}),H.map(({entry:E,index:F},U)=>Gt(ar,{sx:{display:"flex",height:Nw,position:"relative",mt:U===0?`${Lw}px`:0,mb:U===H.length-1?`${zw}px`:0},children:Gt(ar,{sx:{width:Ki,flexShrink:0,position:"sticky",left:0,zIndex:2,bgcolor:t.timeline.bg,borderRight:`1px solid ${t.timeline.gridColor}`,display:"flex",alignItems:"center",pl:4.25,pr:1.5,fontSize:13,color:E.checked?t.colors.textMuted:t.colors.textPrimary},children:So(ar,{onClick:Y=>c({anchorEl:Y.currentTarget,taskSeq:x.seq,index:F,checked:!E.checked}),sx:{display:"inline-flex",alignItems:"center",gap:.75,minWidth:0,cursor:"pointer"},children:[E.checked?Gt(kw,{sx:{fontSize:17,color:t.colors.accentOnSurface,flexShrink:0}}):Gt(Sw,{sx:{fontSize:17,color:t.colors.textMuted,flexShrink:0}}),Gt(ar,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",textDecoration:E.checked?"line-through":"none"},children:E.label})]})})},`${x.seq}-check-${F}`))]})},x.seq)}),i.length===0?Gt(ar,{sx:{py:8,textAlign:"center",color:t.colors.textMuted,fontSize:14},children:"\uD45C\uC2DC\uD560 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):null]})})})]})})}),Gt(kt,{open:!!n,anchorEl:n?.anchorEl??null,title:n?.checked?"\uC774 \uD560\uC77C\uC744 \uC644\uB8CC \uCC98\uB9AC\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?":"\uC644\uB8CC\uB97C \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:n?.checked?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>c(null),onConfirm:()=>{n&&o(n.taskSeq,n.index,n.checked),c(null)}})]})}import{jsx as pi}from"react/jsx-runtime";function UA(e){switch(e.view){case"card":case"kanban":{let{view:d,...b}=e;return pi(su,{...b,columnAxis:d==="kanban"?"status":"project"})}case"sprint":{let{view:d,...b}=e;return pi(su,{...b,columnAxis:"sprint"})}case"calendar":{let{view:d,...b}=e;return pi(Th,{...b})}case"month":{let{view:d,...b}=e;return pi(Mh,{...b})}case"agenda":{let{view:d,...b}=e;return pi(Ph,{...b})}case"timeline":{let{view:d,...b}=e;return pi(qh,{...b})}default:{let{view:d,...b}=e;return pi(eh,{...b})}}}var VA=["list","card","kanban","calendar","month","timeline"];import{Box as fn}from"@mui/material";import{Fragment as Hw,jsx as mi,jsxs as Jn}from"react/jsx-runtime";function $h(e,d){if(!/^\d{4}-\d{2}-\d{2}$/.test(e)||!/^\d{4}-\d{2}-\d{2}$/.test(d))return null;let b=new Date(`${e}T00:00:00`),l=new Date(`${d}T00:00:00`);return Math.round((b.getTime()-l.getTime())/864e5)}function Hh({tasks:e,todayStr:d,showProgress:b=!0,dday:l=null,workdaysLeft:o=null,showPoints:s=!0,showHours:r=!0,showOverdue:t=!0,showInfo:n=!0,inline:c=!1}){let i=at(),a=e.filter(P=>!P.archived),h=a.filter(P=>P.completed).length,f=a.length>0?Math.round(h/a.length*100):0,u=a.filter(P=>!P.completed&&!P.is_event&&!!P.due_date&&P.due_date.slice(0,10)<d).length,g=a.reduce((P,N)=>N.completed?P:P+(N.story_points??0),0),m=b?mi(fn,{sx:{flex:c?"0 0 110px":"1 1 auto",minWidth:0,height:i.summary.gaugeHeight,borderRadius:3,bgcolor:i.summary.gaugeTrackColor},children:mi(fn,{sx:{height:"100%",borderRadius:3,width:`${f}%`,bgcolor:f>=100?i.summary.gaugeCompleteColor:i.summary.gaugeBarColor,transition:"width 0.2s"}})}):null,v=b?Jn(fn,{component:"span",sx:{flexShrink:0,fontSize:c?14:13,color:i.summary.textColor},children:[f,"%"]}):null,k={color:i.summary.numberColor,fontWeight:700,fontSize:c?15:14},B=a.length-h,R=Jn(Hw,{children:[c?null:Jn("span",{children:["\uB0A8\uC740 ",mi(fn,{component:"span",sx:k,children:B}),"\uAC74"]}),t&&u>0?Jn(fn,{component:"span",sx:{color:i.summary.overdueColor,fontWeight:600},children:["\uC9C0\uC5F0"," ",mi(fn,{component:"span",sx:{fontWeight:700,fontSize:c?15:14},children:u}),"\uAC74"]}):null,s&&g>0?Jn("span",{children:[mi(fn,{component:"span",sx:k,children:g}),"SP"]}):null]}),L=typeof o=="number"&&Number.isFinite(o)?Jn("span",{children:["\uADFC\uBB34\uC77C ",mi(fn,{component:"span",sx:k,children:o}),"\uC77C"]}):null,A=typeof l=="number"&&Number.isFinite(l)?mi(fn,{component:"span",sx:{ml:c?0:"auto",flexShrink:0,px:.6,py:.1,borderRadius:.5,fontSize:12,fontWeight:600,bgcolor:i.summary.overdueColor,color:i.colors.textInverse,lineHeight:1.6},children:l===0?"D-day":l>0?`D-${l}`:`D+${-l}`}):null;return c?Jn(fn,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0,fontSize:14.5,color:i.summary.textColor,whiteSpace:"nowrap",...i.summary.sx},children:[n?R:null,n?L:null,n?A:null,m,v]}):Jn(fn,{sx:{display:"flex",flexDirection:"column",gap:.5},children:[b?Jn(fn,{sx:{display:"flex",alignItems:"center",gap:1},children:[m,v]}):null,Jn(fn,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,fontSize:13.5,color:i.summary.textColor},children:[R,L,A]})]})}import{useMemo as Uw}from"react";function Ww(e){let d=String(e??"").trim();if(!d)return 0;let b=0,l=!1;for(let o of d.matchAll(/(\d+(?:\.\d+)?)\s*(h|시간|m|분|d|일)/gi)){let s=parseFloat(o[1]),r=o[2].toLowerCase();l=!0,r==="m"||r==="\uBD84"?b+=s/60:r==="d"||r==="\uC77C"?b+=s*8:b+=s}if(!l){let o=parseFloat(d);Number.isFinite(o)&&(b+=o)}return b}function QA(e){let d=Math.round(e*10)/10;return`${d%1===0?d.toFixed(0):d.toFixed(1)}\uC2DC\uAC04`}function Wh(e,d,b){if(!/^\d{4}-\d{2}-\d{2}$/.test(e)||!/^\d{4}-\d{2}-\d{2}$/.test(d))return 0;let l=new Date(`${e}T00:00:00`),o=new Date(`${d}T00:00:00`);if(o<l||o.getTime()-l.getTime()>3660*864e5)return 0;let s=0;for(let r=new Date(l);r<=o;r.setDate(r.getDate()+1)){let t=r.getDay();if(t===0||t===6)continue;let n=`${r.getFullYear()}-${String(r.getMonth()+1).padStart(2,"0")}-${String(r.getDate()).padStart(2,"0")}`;b.has(n)||(s+=1)}return s}function eD(e){return e.reduce((d,b)=>b.completed?d:d+Ww(b.estimated_time),0)}import{jsx as Vw}from"react/jsx-runtime";function sD({sprint:e,tasks:d,todayStr:b,...l}){let o=e.status==="closed"?null:$h(e.end_date,b),s=o!==null&&o>=0,r=Uw(()=>{if(!s)return[];let c=Number(b.slice(0,4)),i=Number(e.end_date.slice(0,4))||c,a=[];for(let h=c;h<=Math.max(c,i);h+=1)a.push(h);return a},[s,b,e.end_date]),t=Hn(r),n=s?Wh(b,e.end_date,new Set(t.keys())):null;return Vw(Hh,{tasks:d,todayStr:b,dday:o,workdaysLeft:n,...l})}import{useEffect as r_,useRef as n_,useState as o_}from"react";import{Box as ku}from"@mui/material";import{Children as Kw}from"react";import{Box as _u,CircularProgress as Gw}from"@mui/material";import{jsx as bl}from"react/jsx-runtime";var Uh={xs:2,md:3};function Vh(){return bl(_u,{sx:{position:"fixed",top:"calc(50% + 30px)",left:"50%",transform:"translate(-50%, -50%)",zIndex:1},children:bl(Gw,{size:44,thickness:4,sx:{color:"#94a3b8"}})})}function Kh({children:e}){return bl(_u,{sx:{minWidth:0,display:"flex",flexDirection:"column",gap:Uh,pb:Uh},children:Kw.map(e,d=>d==null||d===!1?null:bl(_u,{sx:{bgcolor:"background.paper",borderRadius:"12px",boxShadow:"0 1px 3px rgba(15,23,42,0.08)",minWidth:0},children:d}))})}import{Box as Co,Button as Jw,Checkbox as Qw,Typography as Go}from"@mui/material";import Yh from"@mui/icons-material/CheckCircle";import e_ from"@mui/icons-material/CheckCircleOutlineOutlined";import{Fragment as Zw,jsx as Gh}from"react/jsx-runtime";var Yw="taskbox-search-highlight";function Xw(e,d){let b=d?.keyPrefix??"hl";return e.map((l,o)=>Gh("span",{className:l.highlight?d?.highlightClassName??Yw:d?.className,style:l.highlight?{fontWeight:700,color:"#2563eb"}:void 0,children:l.text},`${b}-${l.text}-${o}`))}function yl({text:e,keyword:d,fallback:b="-",className:l,highlightClassName:o,keyPrefix:s}){let r=String(e??"").trim()||b,t=Za(r,d);return Gh(Zw,{children:Xw(t,{className:l,highlightClassName:o,keyPrefix:s})})}import{jsx as Ct,jsxs as Gi}from"react/jsx-runtime";var t_={flexShrink:0,minWidth:64,textAlign:"center",px:.75,py:.35,borderRadius:.75,bgcolor:"#f1f5f9",color:"#64748b",fontSize:Ir(12.5),fontWeight:500,lineHeight:1.4},To={fontSize:Ir(14.5),color:"#374151",minWidth:0,lineHeight:1.45};function Qn({label:e,children:d}){return Gi(Co,{sx:{display:"flex",alignItems:"flex-start",gap:1,minWidth:0},children:[Ct(Co,{sx:t_,children:e}),Ct(Co,{sx:{...To,flex:1,pt:.2},children:d})]})}function Xh({task:e,statusOptions:d,projectLabel:b,searchText:l,todayStr:o,dimCompleted:s=!0,onRequestToggleCompleted:r,onOpenDetail:t,onTaskContextMenu:n,targetSummary:c="",ackInfo:i,completeLocked:a=!1,unread:h=!1,noticeReadOnly:f=!1,onAckConfirm:u,onAckListClick:g,myManaged:m=!1}){let v=e.is_event?Ms(e):ur(e),k=String(e.due_date??"").slice(11,16),B=e.is_event?String(e.event_time??"").trim():/^\d{2}:\d{2}$/.test(k)?k:String(e.estimated_time??"").trim(),R=yn(e.start_date),L=yn(e.due_date),A=R&&B&&!L?`${R} ${B}`:R,P=L&&B?`${L} ${B}`:L,N=!e.is_notice&&!e.is_event&&!String(e.due_date??"").trim(),q=!e.is_notice&&!e.completed&&!!e.due_date&&e.due_date<o,j=(e.receiver_names??[]).filter(Boolean);return Gi(Co,{role:"button",tabIndex:0,onClick:()=>t(e),onKeyDown:S=>{(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),t(e))},onContextMenu:S=>n(e,S),sx:{display:"flex",flexDirection:"column",gap:.75,minWidth:0,p:1.25,cursor:"pointer",opacity:N?.6:1,position:"relative"},children:[m?Ct(Co,{sx:{position:"absolute",left:3,top:5,bottom:5,width:3,borderRadius:"999px",bgcolor:"#2f80ed"}}):null,Gi(Co,{sx:{display:"flex",alignItems:"flex-start",gap:.75,minWidth:0,mb:1},children:[e.is_event?(()=>{let S=Tt(e.icon||cr);return S?Ct(S,{sx:{fontSize:21,flexShrink:0,mt:.2,color:e.icon_color||"#1e3a8a"}}):null})():!f&&!a?Ct(Qw,{checked:e.completed,icon:Ct(e_,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:Ct(Yh,{sx:{fontSize:22,color:"#2f80ed"}}),onClick:S=>S.stopPropagation(),onChange:(S,T)=>r({anchorEl:S.currentTarget,taskSeq:e.seq,nextCompleted:T}),sx:{p:0,mt:.1,flexShrink:0}}):null,(()=>{if(!e.is_notice)return null;let S=Tt(e.icon||ir);return S?Ct(S,{sx:{fontSize:19,flexShrink:0,mt:"1px",color:e.icon_color||"#e5484d"}}):null})(),Ct(Go,{sx:{fontSize:Ir(16),fontWeight:600,lineHeight:1.35,minWidth:0,flex:1,color:e.completed&&s?"#9a9a97":N?"#5f5e5b":"#111827",textDecoration:e.completed&&s?"line-through":"none"},children:Ct(yl,{text:e.title,keyword:l})}),h&&!e.completed?Ct(Co,{component:"span",sx:{flexShrink:0,px:.55,fontSize:Ir(10.5),fontWeight:700,lineHeight:1.6,color:"#fff",bgcolor:"#e5484d",borderRadius:"4px"},children:"N"}):null]}),Gi(Co,{sx:{display:"flex",flexDirection:"column",gap:.6,minWidth:0},children:[Ct(Qn,{label:v?"\uC0C1\uD0DC":"\uC911\uC694\uB3C4",children:Gi(Co,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1.25},children:[v?Ct(At,{option:v,small:!0}):null,Ct(Fr,{priority:e.priority,small:!0})]})}),(e.label_keys??[]).length>0?Ct(Qn,{label:"\uB77C\uBCA8",children:Ct(qo,{labelKeys:e.label_keys,labelOptions:d})}):null,b?Ct(Qn,{label:"\uD504\uB85C\uC81D\uD2B8",children:Ct(Go,{sx:To,children:b})}):null,A?Ct(Qn,{label:"\uC2DC\uC791",children:Ct(Go,{sx:To,children:A})}):null,P?Ct(Qn,{label:"\uB9C8\uAC10",children:Gi(Go,{sx:{...To,color:q?"#e5484d":To.color,fontWeight:q?600:400},children:[P,q?" \xB7 \uC9C0\uC5F0":""]})}):null,e.is_notice?Ct(Qn,{label:"\uB300\uC0C1\uC790",children:Ct(Go,{sx:To,children:c||"\uBAA8\uB4E0 \uC9C1\uC6D0"})}):null,i?Ct(Qn,{label:"\uD655\uC778",children:Ct(Jw,{size:"small",variant:i.canAck?"contained":"outlined",color:"inherit",startIcon:i.acked?Ct(Yh,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:S=>{S.stopPropagation(),i.canAck?u?.(e):g?.(e,S.currentTarget)},sx:{py:0,px:1.25,minWidth:0,fontSize:Ir(13),...i.canAck?{color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}}:{bgcolor:"#fff",borderColor:"#d5d8dc"}},children:i.canAck?"\uD655\uC778":`${i.count}/${i.total}`})}):null,!e.is_notice&&e.manager_name?Ct(Qn,{label:"\uCC45\uC784\uC790",children:Ct(Go,{sx:To,children:Ct(yl,{text:e.manager_name,keyword:l})})}):null,!e.is_notice&&j.length>0?Ct(Qn,{label:"\uCC38\uC870\uC790",children:Ct(Go,{sx:To,children:j.join(", ")})}):null,e.note?Ct(Qn,{label:"\uBE44\uACE0",children:Ct(Go,{sx:To,children:Ct(yl,{text:e.note,keyword:l})})}):null]})]})}import{jsx as Yi,jsxs as s_}from"react/jsx-runtime";function i_(e,d){if(e.completed||e.archived||d<=0)return;let b=Fi(e,d);if(b.canConfirm)return{count:b.count,total:b.total,acked:!1,canAck:!0,pendingNames:b.pendingNames}}function DD({tasks:e,statusOptions:d,customTabs:b,loading:l,dimCompleted:o=!0,searchText:s,todayStr:r,onToggleCompleted:t,onOpenDetail:n,onTaskContextMenu:c,getTargetSummary:i,getAckInfo:a,getNoticeReadOnly:h,isTaskUnread:f,getCompleteLocked:u,onAckConfirm:g,onAckListClick:m,onEndReached:v,myAccountSeq:k=0}){let B=new Map(b.map(P=>[P.key,P.label])),[R,L]=o_(null),A=n_(null);return r_(()=>{let P=A.current;if(!v||!P)return;let N=new IntersectionObserver(q=>{q[0]?.isIntersecting&&v()});return N.observe(P),()=>N.disconnect()},[v,e.length]),e.length===0?l?Yi(Vh,{}):Yi(ku,{sx:{py:6,textAlign:"center",color:"#94a3b8",fontSize:"0.9rem"},children:"\uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):s_(ku,{sx:{minWidth:0},children:[Yi(Kh,{children:e.map(P=>Yi(Xh,{dimCompleted:o,myManaged:k>0&&!P.is_notice&&!P.is_event&&(P.manager_account_seq??0)===k,task:P,statusOptions:d,projectLabel:P.tab_key?B.get(P.tab_key)??"":"",searchText:s,todayStr:r,onRequestToggleCompleted:L,onOpenDetail:n,onTaskContextMenu:c,targetSummary:P.is_notice?i?.(P):void 0,ackInfo:P.is_notice?a?.(P):i_(P,k),noticeReadOnly:P.is_notice?h?.(P):!1,unread:f?.(P)??!1,completeLocked:u?.(P)??!1,onAckConfirm:g,onAckListClick:m},P.seq))}),v?Yi(ku,{ref:A,sx:{height:"1px"}}):null,Yi(kt,{open:!!R,anchorEl:R?.anchorEl??null,title:R?.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:R?.nextCompleted?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>L(null),onConfirm:()=>{R&&t(R.taskSeq,R.nextCompleted),L(null)}})]})}import{useState as Hs}from"react";import{Box as tr,Checkbox as a_,Menu as l_,MenuItem as Zh,Tooltip as c_}from"@mui/material";import u_ from"@mui/icons-material/CheckCircle";import f_ from"@mui/icons-material/CheckCircleOutlineOutlined";import d_ from"@mui/icons-material/NotesOutlined";import h_ from"@mui/icons-material/AutorenewOutlined";import p_ from"@mui/icons-material/CalendarTodayOutlined";import m_ from"@mui/icons-material/EventOutlined";import g_ from"@mui/icons-material/PersonOutlineOutlined";import b_ from"@mui/icons-material/PeopleAltOutlined";import y_ from"@mui/icons-material/StickyNote2Outlined";import{Fragment as w_,jsx as gt,jsxs as Yo}from"react/jsx-runtime";var Su={completed:{label:"\uC644\uB8CC",width:"44px",align:"center",icon:null},title:{label:"\uC81C\uBAA9",width:"1fr",align:"left",icon:gt(d_,{sx:{fontSize:15}})},manager_name:{label:"\uCC45\uC784\uC790",width:"112px",align:"center",icon:gt(g_,{sx:{fontSize:15}})},receiver_names:{label:"\uCC38\uC870\uC790",width:"120px",align:"center",icon:gt(b_,{sx:{fontSize:15}})},status:{label:"\uC0C1\uD0DC",width:"104px",align:"center",icon:gt(h_,{sx:{fontSize:15}})},priority:{label:"\uC911\uC694\uB3C4",width:"88px",align:"center",icon:null},start_date:{label:"\uC2DC\uC791\uC77C\uC2DC",width:"110px",align:"center",icon:gt(p_,{sx:{fontSize:15}})},due_date:{label:"\uB9C8\uAC10\uC608\uC815",width:"110px",align:"center",icon:gt(m_,{sx:{fontSize:15}})},note:{label:"\uBE44\uACE0",width:"1fr",align:"left",icon:gt(y_,{sx:{fontSize:15}})}},x_=[{id:"completed"},{id:"title"},{id:"manager_name"},{id:"due_date"},{id:"status"}],v_=new Set(["manager_name","status","due_date"]);function Jh(e){let d=String(e??"").trim();return d?d.slice(2,10).replaceAll("-","."):""}function sP(e,d){return d>0?e.filter(b=>!b.is_notice&&!b.completed&&!b.archived&&En(b)==="group"&&Number(b.visibility_group_seq??0)===d).sort((b,l)=>{let o=String(b.due_date??"").trim(),s=String(l.due_date??"").trim();return o!==s?o?s?o.localeCompare(s):-1:1:Number(b.seq)-Number(l.seq)}):[]}function aP({tasks:e,columns:d=x_,loading:b=!1,emptyText:l="\uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",myAccountSeq:o=0,avatarSrcByName:s,managerCandidates:r=[],canAssignManager:t,onOpenDetail:n,onToggleCompleted:c,onChangeStatus:i,onChangeDueDate:a,onChangeReminder:h,onChangeManager:f,onClaimTask:u}){let g=at(),[m,v]=Hs(null),[k,B]=Hs(null),[R,L]=Hs(null),[A,P]=Hs(null),[N,q]=Hs(null),j=d.map(D=>D.width??Su[D.id].width).join(" "),S=(D,p)=>gt(bn,{src:s?.get(D)??"",name:D,avatarSx:{width:p,height:p,fontSize:Math.round(p/2),flexShrink:0,borderRadius:"50%"},iconFontSize:Math.round(p*.6)}),T=(D,p)=>{let x=Su[D.id].align==="center";switch(D.id){case"completed":if(p.is_event){let w=Tt(p.icon||cr);return gt(tr,{className:"cell",sx:{justifyContent:"center"},children:w?gt(w,{sx:{fontSize:19,color:p.icon_color||"#1e3a8a"}}):null},D.id)}return gt(tr,{className:"cell",sx:{justifyContent:"center",...c?{"&:hover":{bgcolor:g.table.cellHoverBg}}:{}},children:gt(c_,{title:p.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC",arrow:!0,enterDelay:300,disableInteractive:!0,children:gt(a_,{checked:!!p.completed,icon:gt(f_,{sx:{fontSize:20,color:"#9a9a97",opacity:.45}}),checkedIcon:gt(u_,{sx:{fontSize:20,color:"#2f80ed"}}),onChange:w=>P({anchorEl:w.currentTarget,task:p}),sx:{p:.5}})})},D.id);case"title":{let w=p.is_notice?Tt(p.icon||ir):null,_=p.icon_color||"#e5484d";return Yo(tr,{className:"cell",onClick:()=>n(p),sx:{gap:1,cursor:"pointer","&:hover":{bgcolor:g.table.cellHoverBg}},children:[w?gt(w,{sx:{fontSize:18,flexShrink:0,color:_}}):null,gt(tr,{component:"span",sx:{fontSize:14.5,fontWeight:g.table.rowTitleFontWeight,color:g.table.rowTitleColor,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:p.title||"(\uC81C\uBAA9 \uC5C6\uC74C)"})]},D.id)}case"manager_name":{let w=t?t(p):!1,_=o>0&&Number(p.manager_account_seq??0)===o;return w&&f?Yo(tr,{className:"cell",onClick:C=>L({anchorEl:C.currentTarget,task:p}),sx:{gap:.75,justifyContent:"center",cursor:"pointer","&:hover":{bgcolor:g.table.cellHoverBg}},children:[p.manager_name?S(p.manager_name,22):null,gt(tr,{component:"span",sx:{fontSize:14,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:p.manager_name||""})]},D.id):gt(tr,{className:"cell",sx:{gap:.75,justifyContent:"center"},children:p.manager_name?Yo(w_,{children:[S(p.manager_name,22),gt(tr,{component:"span",sx:{fontSize:14,fontWeight:_?600:400,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:p.manager_name})]}):u?gt($n,{onClick:C=>q({anchorEl:C.currentTarget,taskSeq:Number(p.seq)}),children:"\uAC00\uC838\uAC00\uAE30"}):null},D.id)}case"receiver_names":return gt(tr,{className:"cell",sx:{justifyContent:"center",fontSize:14,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:(p.receiver_names??[]).join(", ")},D.id);case"status":return gt(tr,{className:"cell",onClick:i?w=>v({anchorEl:w.currentTarget,task:p}):void 0,sx:{py:.5,justifyContent:"center",...i?{cursor:"pointer","&:hover":{bgcolor:g.table.cellHoverBg}}:{}},children:gt(At,{option:ur(p)})},D.id);case"priority":return gt(tr,{className:"cell",sx:{justifyContent:"center"},children:gt(Fr,{priority:p.priority,plain:!0})},D.id);case"start_date":return gt(tr,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap",fontSize:14},children:Jh(p.start_date)},D.id);case"due_date":return gt(tr,{className:"cell",onClick:a?w=>B({anchorEl:w.currentTarget,taskSeq:Number(p.seq),date:String(p.due_date??"").slice(0,10),reminders:Wn(p)}):void 0,sx:{justifyContent:"center",whiteSpace:"nowrap",fontSize:14,...a?{cursor:"pointer","&:hover":{bgcolor:g.table.cellHoverBg}}:{}},children:Jh(p.due_date)},D.id);case"note":return gt(tr,{className:"cell",sx:{justifyContent:x?"center":"flex-start",fontSize:14,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:p.note||""},D.id);default:return null}};return Yo(tr,{sx:{border:`1px solid ${g.table.borderColor}`,borderRadius:1,overflow:"hidden",bgcolor:g.table.bg,color:g.table.rowColor},children:[gt(tr,{sx:{display:"grid",gridTemplateColumns:j,borderBottom:`1px solid ${g.table.borderColor}`,bgcolor:g.table.headerBg,"& > *":{display:"flex",alignItems:"center",gap:.5,px:1,py:1,minWidth:0,fontSize:g.table.headerFontSize,whiteSpace:"nowrap",userSelect:"none",borderRight:`1px solid ${g.table.rowBorderColor}`},"& > *:first-of-type":{px:.5},"& > *:last-child":{borderRight:"none",pr:2}},children:d.map(D=>{let p=Su[D.id];return Yo(tr,{sx:{justifyContent:p.align==="center"?"center":"flex-start",color:v_.has(D.id)?g.table.headerActiveColor:g.table.headerColor},children:[p.icon,D.label??p.label]},D.id)})}),b?gt(tr,{sx:{py:3,textAlign:"center",color:g.table.emptyColor,fontSize:14},children:"\uBD88\uB7EC\uC624\uB294 \uC911\u2026"}):e.length===0?gt(tr,{sx:{py:3,textAlign:"center",color:g.table.emptyColor,fontSize:14},children:l}):e.map((D,p)=>gt(tr,{sx:{display:"grid",gridTemplateColumns:j,minHeight:44,fontSize:15,bgcolor:g.table.rowBg,borderTop:p===0?"none":`1px solid ${g.table.rowBorderColor}`,"&:hover":{bgcolor:g.table.rowHoverBg},"& > .cell":{px:1,minWidth:0,display:"flex",alignItems:"center",borderRight:`1px solid ${g.table.rowBorderColor}`},"& > .cell:first-of-type":{px:.5},"& > .cell:last-child":{borderRight:"none",pr:2}},children:d.map(y=>T(y,D))},D.seq)),gt(Ai,{anchorEl:m?.anchorEl??null,value:String(m?.task.status??""),options:m?Fa(m.task):void 0,onSelect:D=>{m&&i?.(Number(m.task.seq),D),v(null)},onComplete:c&&m&&!m.task.completed&&!m.task.is_notice&&!m.task.is_event&&!m.task.is_bug?()=>c(m.task,!0):void 0,onClose:()=>v(null)}),Yo(l_,{anchorEl:R?.anchorEl??null,open:!!R,onClose:()=>L(null),transitionDuration:0,children:[Yo(Zh,{onClick:()=>{R&&f?.(Number(R.task.seq),"",0),L(null)},sx:{fontSize:14,minWidth:170,gap:1,color:g.table.headerColor},children:[gt(tr,{sx:{width:24,flexShrink:0}}),"\uC9C0\uC815 \uC548 \uD568"]}),r.map(D=>Yo(Zh,{selected:Number(R?.task.manager_account_seq??0)===Number(D.account_seq??0),onClick:()=>{R&&f?.(Number(R.task.seq),D.name,Number(D.account_seq??0)),L(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[S(D.name,24),D.name,D.role_name?gt(tr,{component:"span",sx:{color:g.table.headerColor,fontSize:13},children:D.role_name}):null]},D.seq))]}),gt(xn,{anchorEl:k?.anchorEl??null,open:!!k,date:k?.date??"",reminders:k?.reminders??[],hideReminder:!h,onClose:()=>B(null),onDateChange:D=>{k&&(a?.(k.taskSeq,D),B(p=>p?{...p,date:D}:null))},onReminderChange:D=>{k&&(h?.(k.taskSeq,D),B(p=>p?{...p,reminders:D}:null))}}),gt(kt,{open:!!A,anchorEl:A?.anchorEl??null,title:A?.task.completed?"\uC644\uB8CC\uB97C \uD574\uC81C\uD560\uAE4C\uC694?":"\uC644\uB8CC \uCC98\uB9AC\uD560\uAE4C\uC694?",confirmText:A?.task.completed?"\uD574\uC81C":"\uC644\uB8CC",onCancel:()=>P(null),onConfirm:()=>{A&&c?.(A.task,!A.task.completed),P(null)}}),gt(kt,{open:!!N,anchorEl:N?.anchorEl??null,title:"\uC774 \uC5C5\uBB34\uB97C \uB9E1\uC744\uAE4C\uC694?",confirmText:"\uAC00\uC838\uAC00\uAE30",onCancel:()=>q(null),onConfirm:()=>{N&&u?.(N.taskSeq),q(null)}})]})}var Ws=[{value:"daily",label:"\uB9E4\uC77C"},{value:"weekly",label:"\uB9E4\uC8FC"},{value:"monthly",label:"\uB9E4\uC6D4"},{value:"yearly",label:"\uB9E4\uB144"}];function xl(e){return Ws.find(d=>d.value===e)?.label??"\uC5C6\uC74C"}function __(e){if(!/^\d{4}-\d{2}-\d{2}$/.test(e))return null;let d=new Date(`${e}T00:00:00`);return Number.isNaN(d.getTime())?null:d}function vl(e,d){let b=__(e);if(!b)return"";let l=new Date(b);d==="daily"?l.setMonth(l.getMonth()+1):d==="weekly"?l.setMonth(l.getMonth()+3):d==="monthly"?l.setFullYear(l.getFullYear()+1):l.setFullYear(l.getFullYear()+3);let o=s=>String(s).padStart(2,"0");return`${l.getFullYear()}-${o(l.getMonth()+1)}-${o(l.getDate())}`}function k_(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)}function Qh(e,d){let b=String(e??"").slice(0,10);if(!k_(b)||typeof d!="number"||!Number.isFinite(d))return"";let l=new Date(`${b}T12:00:00`);l.setDate(l.getDate()+Math.trunc(d));let o=l.getFullYear(),s=String(l.getMonth()+1).padStart(2,"0"),r=String(l.getDate()).padStart(2,"0");return`${o}-${s}-${r}`}function S_(e,d,b){return{title:String(e.title??"").trim(),content:String(e.content??""),start_date:Qh(d,e.start_offset_days),due_date:Qh(d,e.due_offset_days),priority:e.priority??"medium",label_keys:[...e.label_keys??[]],manager_account_seq:Number(e.manager_account_seq)||0,manager_name:String(e.manager_name??""),checklist:(e.checklist??[]).map(l=>String(l??"").trim()).filter(l=>l.length>0).map(l=>({label:l,checked:!1})),group_seq:b}}function ep(e,d){let b=Number(e.group_seq)||0;return(e.items??[]).map(l=>S_(l,d,b)).filter(l=>l.title.length>0)}function fP(e){return typeof e!="number"||!Number.isFinite(e)?"-":e===0?"\uAE30\uC900\uC77C":e>0?`\uAE30\uC900\uC77C +${Math.trunc(e)}\uC77C`:`\uAE30\uC900\uC77C ${Math.trunc(e)}\uC77C`}import{useEffect as Z5,useRef as J5,useState as Dp}from"react";import{Box as Io,Button as Wu,ButtonBase as Q5,Divider as Pp,Drawer as e4,IconButton as t4,Tooltip as r4}from"@mui/material";import n4 from"@mui/icons-material/Close";import o4 from"@ehfuse/overlay-scrollbar";import{FormDialog as i4}from"@ehfuse/mui-form-dialog";import{useState as Ys}from"react";import{Box as yi,ButtonBase as F5,Divider as Xs,Menu as qu,MenuItem as $u,Tooltip as q5}from"@mui/material";import $5 from"@mui/icons-material/SubjectOutlined";import H5 from"@mui/icons-material/StickyNote2Outlined";import W5 from"@mui/icons-material/LabelOutlined";import U5 from"@mui/icons-material/DirectionsRunOutlined";import Ep from"@mui/icons-material/LockOutlined";import Mp from"@mui/icons-material/PublicOutlined";import Rp from"@mui/icons-material/Group";import V5 from"@mui/icons-material/Repeat";import K5 from"@mui/icons-material/EventOutlined";import G5 from"@mui/icons-material/SpeedOutlined";import{TextField as Y5}from"@ehfuse/mui-form-controls";import{InfoAlert as Op}from"@ehfuse/alerts";import{useState as gi}from"react";import{Box as kl,Divider as H_,ListItemIcon as W_,Menu as Bu,MenuItem as Us}from"@mui/material";import U_ from"@mui/icons-material/Add";import _l from"@mui/icons-material/Check";import V_ from"@mui/icons-material/ViewKanbanOutlined";import K_ from"@mui/icons-material/CalendarTodayOutlined";import G_ from"@mui/icons-material/EventOutlined";import Y_ from"@mui/icons-material/PersonOutlineOutlined";import ip from"@mui/icons-material/PeopleAltOutlined";import X_ from"@mui/icons-material/FlagOutlined";import Z_ from"@mui/icons-material/TimerOutlined";import J_ from"@mui/icons-material/NotificationsNoneOutlined";import Q_ from"@mui/icons-material/InboxOutlined";import e3 from"@mui/icons-material/PlaceOutlined";import t3 from"@mui/icons-material/MapOutlined";import{TimePicker as r3}from"@ehfuse/mui-datetime-picker";import{InfoAlert as n3}from"@ehfuse/alerts";var Dn="@media (max-width: 719.95px)";function eo(e){return{[Dn]:{order:e}}}import{useEffect as T_,useState as C_}from"react";import{Box as B_}from"@mui/material";import{jsx as I_}from"react/jsx-runtime";function Bo({value:e,placeholder:d,readOnly:b,onCommit:l}){let o=at(),[s,r]=C_(e);return T_(()=>r(e),[e]),I_(B_,{component:"input",spellCheck:!1,value:s,readOnly:b,placeholder:d,onChange:t=>r(t.target.value),onBlur:()=>{s.trim()!==e&&l(s.trim())},onKeyDown:t=>{t.key==="Enter"&&t.target.blur()},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:14,color:o.colors.textPrimary,caretColor:o.colors.textPrimary,bgcolor:"transparent",p:0,"&::placeholder":{color:"#9a9a97"}}})}import{Box as Tu}from"@mui/material";import{jsx as E_,jsxs as tp}from"react/jsx-runtime";function pt({icon:e,label:d,onClick:b,sx:l,children:o}){return tp(Tu,{sx:[{display:"flex",alignItems:"center",minHeight:32},...Array.isArray(l)?l:[l]],children:[tp(Tu,{sx:{display:"flex",alignItems:"center",gap:1,width:104,flexShrink:0,fontSize:13.5,color:"#787774"},children:[e,d]}),E_(Tu,{onClick:b?s=>b(s.currentTarget):void 0,sx:{flex:1,minWidth:0,display:"flex",alignItems:"center",gap:.5,px:1,py:.25,borderRadius:1,fontSize:14,cursor:b?"pointer":"default","&:hover":b?{bgcolor:"#f2f2f0"}:void 0,[Dn]:{py:.25}},children:o})]})}import o3 from"@mui/icons-material/StorefrontOutlined";import i3 from"@mui/icons-material/SupportAgentOutlined";import{Suspense as M_,lazy as R_,useEffect as O_,useState as rp}from"react";import{Box as Cu,Dialog as A_,DialogContent as D_,DialogTitle as P_,IconButton as np,Tooltip as N_}from"@mui/material";import L_ from"@mui/icons-material/Close";import z_ from"@mui/icons-material/Search";import{Fragment as $_,jsx as Pn,jsxs as wl}from"react/jsx-runtime";function j_(e){return Pn(Cu,{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 F_=R_(()=>import("react-daum-postcode").then(e=>({default:e.default})).catch(()=>({default:j_})));function q_(e){if(e.addressType!=="R")return e.address;let d="";return e.bname!==""&&/[동|로|가]$/g.test(e.bname)&&(d+=e.bname),e.buildingName!==""&&e.apartment==="Y"&&(d+=d!==""?`, ${e.buildingName}`:e.buildingName),d!==""?`${e.address} (${d})`:e.address}function op({value:e,placeholder:d="\uC8FC\uC18C \uC785\uB825",readOnly:b,onCommit:l}){let[o,s]=rp(e),[r,t]=rp(!1),n=$t().slots?.addressSearch;O_(()=>s(e),[e]);let c=a=>{s(a),t(!1),a!==e&&l(a)};return wl($_,{children:[wl(Cu,{sx:{display:"flex",alignItems:"center",gap:.5,flex:1,minWidth:0},children:[Pn(Cu,{component:"input",spellCheck:!1,value:o,readOnly:b,placeholder:d,onChange:a=>s(a.target.value),onBlur:()=>{r||o.trim()!==e&&l(o.trim())},onKeyDown:a=>{a.key==="Enter"&&(a.preventDefault(),!b&&t(!0))},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:14,color:"#37352f",bgcolor:"transparent",p:0,"&::placeholder":{color:"#9a9a97"}}}),b?null:Pn(N_,{title:"\uC8FC\uC18C \uAC80\uC0C9",arrow:!0,children:Pn(np,{tabIndex:-1,size:"small","aria-label":"\uC8FC\uC18C \uAC80\uC0C9",onClick:()=>t(!0),sx:{color:"#9a9a97",p:.25,flexShrink:0},children:Pn(z_,{sx:{fontSize:17}})})})]}),n?Pn(n,{open:r,onComplete:c,onClose:()=>t(!1)}):wl(A_,{open:r,onClose:()=>t(!1),maxWidth:"sm",fullWidth:!0,slotProps:{paper:{sx:{height:550}}},children:[wl(P_,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",pr:2},children:["\uC8FC\uC18C \uAC80\uC0C9",Pn(np,{"aria-label":"\uC8FC\uC18C \uAC80\uC0C9 \uB2EB\uAE30",onClick:()=>t(!1),size:"small",children:Pn(L_,{})})]}),Pn(D_,{style:{padding:0},dividers:!0,children:r?Pn(M_,{fallback:null,children:Pn(F_,{onComplete:a=>{c(q_(a))},onClose:()=>t(!1),defaultQuery:o,style:{width:"100%",height:"100%"}})}):null})]})]})}import{Fragment as Vs,jsx as Qe,jsxs as dn}from"react/jsx-runtime";function sp(e){return String(e??"").includes(" ")?un(e):yn(e)}function s3(e){let[d="00",b="00"]=String(e??"").split(":");return{hour:/^\d{2}$/.test(d)?d:"00",minute:/^\d{2}$/.test(b)?b:"00"}}function Xo({label:e="\uBE44\uC5B4 \uC788\uC74C"}){return Qe(kl,{component:"span",sx:{color:"#9a9a97"},children:e})}var rr=e=>({gridColumn:`${e}`,[Dn]:{gridColumn:"auto"}});function Sl({values:e,customTabs:d,avatarSrcByName:b,managerLocked:l=!1,notice:o=!1,event:s=!1,hideDueDate:r=!1,hideReminder:t=!1,beforeStart:n,pinColumns:c=!1,projectColumn:i=1,afterProject:a,readOnly:h=!1,targetSummary:f="",narrowCollapsedSx:u,reminderLocked:g=!1,managerAction:m,hideProject:v=!1,leading:k,supportOrigin:B,trailing:R,onChangeProject:L,onChangeStartDate:A,onChangeDueDate:P,onChangeReminder:N,onChangePriority:q,onChangeEventTime:j,onChangeEventPlace:S,onChangeEventAddress:T,onMemberEdit:D,onAddProject:p}){let[y,x]=gi(null),[w,_]=gi(!1),[C,O]=gi(null),[z,$]=gi(null),[V,M]=gi(null),[H,I]=gi(null),[E,F]=gi(null),U=Lt(),Y=qn(),K=c&&!s,W=(Z,re,ie=!1)=>[eo(Z),...ie&&u?Array.isArray(u)?u:[u]:[],...K&&re?[rr(re)]:[]],X=d.find(Z=>Z.key===e.tabKey),J=d.filter(Z=>!Z.archived),G=Z=>{let re=!!String(e.startDate??"").trim();if(A(Z),re||o||s)return;let ie=Mc(Z);Number.isNaN(ie.getTime())||ie.getTime()<=Date.now()||n3("\uC2DC\uC791\uC77C\uC2DC\uAC00 \uB418\uBA74 \uCC45\uC784\uC790\uC5D0\uAC8C \uC54C\uB9BC\uC774 \uBC1C\uC1A1\uB429\uB2C8\uB2E4.")},te=Qe(pt,{icon:Qe(J_,{sx:{fontSize:17}}),label:"\uC0AC\uC804\uC54C\uB9BC",onClick:h||g?void 0:Z=>$(Z),sx:W(s?8:5,2,!0),children:e.reminders.length===0?Qe(Xo,{label:"\uC5C6\uC74C"}):Uc(e.reminders)});return dn(Vs,{children:[dn(kl,{sx:{display:"grid",gridTemplateColumns:"repeat(2, minmax(0, 1fr))",gridAutoFlow:"row dense",columnGap:3,rowGap:0,px:2,[Dn]:{gridTemplateColumns:"minmax(0, 1fr)"}},children:[k,B?dn(Vs,{children:[dn(pt,{icon:Qe(o3,{sx:{fontSize:17}}),label:"\uAC00\uB9F9\uC810",sx:W(0,1),children:[B.licenseName||Qe(Xo,{}),B.contactPhone?Qe(kl,{component:"span",sx:{ml:1,color:"#6f6f6c",fontSize:"0.92em"},children:B.contactPhone}):null,B.contactEmail?Qe(kl,{component:"span",sx:{ml:1,color:"#6f6f6c",fontSize:"0.92em"},children:B.contactEmail}):null]}),Qe(pt,{icon:Qe(i3,{sx:{fontSize:17}}),label:"\uC720\uD615",sx:W(0,2),children:B.supportType||Qe(Xo,{})})]}):null,v?null:Qe(pt,{icon:Qe(V_,{sx:{fontSize:17}}),label:"\uD504\uB85C\uC81D\uD2B8",onClick:h?void 0:Z=>x(Z),sx:K&&i==="full"?[W(1,void 0,!0),{gridColumn:"1 / -1"}]:W(1,i==="full"?1:i,!0),children:X?(()=>{let Z=Tt(X.icon);return dn(Vs,{children:[Z?Qe(Z,{sx:{fontSize:16,color:"#1e3a8a"}}):null,X.label]})})():"\uAE30\uBCF8"}),a,o?Qe(pt,{icon:Qe(ip,{sx:{fontSize:17}}),label:"\uB300\uC0C1\uC790",onClick:h?void 0:()=>D("targets"),sx:W(7,1),children:f||"\uBAA8\uB4E0 \uC9C1\uC6D0"}):null,!o&&!s?Qe(pt,{icon:Qe(Y_,{sx:{fontSize:17}}),label:"\uCC45\uC784\uC790",onClick:l||h||!e.managerName&&m?void 0:()=>D("manager"),sx:W(7,1),children:e.managerName?dn(Vs,{children:[Qe(qr,{names:[e.managerName],size:20,avatarSrcByName:b}),e.managerName]}):m??Qe(Xo,{})}):null,n,s?null:Qe(pt,{icon:Qe(K_,{sx:{fontSize:17}}),label:"\uC2DC\uC791\uC77C\uC2DC",onClick:h?void 0:Z=>M(Z),sx:W(2,2),children:e.startDate?sp(e.startDate):Qe(Xo,{})}),o?null:Qe(pt,{icon:Qe(ip,{sx:{fontSize:17}}),label:s?"\uCC38\uC11D\uC790":"\uCC38\uC870\uC790",onClick:h?void 0:()=>D("receivers"),sx:W(s?7:8,1),children:e.receiverNames.length>0?dn(Vs,{children:[Qe(qr,{names:e.receiverNames,size:20,avatarSrcByName:b}),e.receiverNames.length===1?e.receiverNames[0]:null]}):Qe(Xo,{})}),r?null:Qe(pt,{icon:Qe(G_,{sx:{fontSize:17}}),label:s?"\uB0A0\uC9DC":"\uB9C8\uAC10\uC608\uC815",onClick:h?void 0:Z=>I(Z),sx:W(3,2),children:e.dueDate?s?yn(e.dueDate):sp(e.dueDate):Qe(Xo,{})}),s?Qe(pt,{icon:Qe(Z_,{sx:{fontSize:17}}),label:"\uC2DC\uAC01",onClick:h?void 0:Z=>F(Z),sx:eo(4),children:e.eventTime?e.eventTime:Qe(Xo,{label:"\uC885\uC77C"})}):null,s?Qe(pt,{icon:Qe(e3,{sx:{fontSize:17}}),label:"\uC7A5\uC18C",sx:eo(5),children:Qe(Bo,{value:e.eventPlace??"",placeholder:"\uC7A5\uC18C \uC785\uB825",readOnly:h,onCommit:Z=>S?.(Z)})}):null,!t&&s?te:null,s?Qe(pt,{icon:Qe(t3,{sx:{fontSize:17}}),label:"\uC8FC\uC18C",sx:[{gridColumn:"1 / -1"},eo(6)],children:Qe(op,{value:e.eventAddress??"",placeholder:"\uC8FC\uC18C \uC785\uB825",readOnly:h,onCommit:Z=>T?.(Z)})}):null,s?null:Qe(pt,{icon:Qe(X_,{sx:{fontSize:17}}),label:"\uC911\uC694\uB3C4",onClick:h?void 0:Z=>O(Z),sx:W(6,1,!0),children:Qe(Fr,{priority:e.priority,small:!0})}),!t&&!s?te:null,R]}),dn(Bu,{transitionDuration:0,anchorEl:y,open:!!y,onClose:()=>x(null),...Y,children:[dn(Us,{selected:!e.tabKey,onClick:()=>{L(""),x(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[Qe(Q_,{sx:{fontSize:17,color:"#9a9a97"}}),"\uC5C6\uC74C",e.tabKey?null:Qe(_l,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}})]}),J.map(Z=>{let re=Tt(Z.icon),ie=e.tabKey===Z.key;return dn(Us,{selected:ie,onClick:()=>{L(Z.key),x(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[re?Qe(re,{sx:{fontSize:17,color:"#1e3a8a"}}):null,Z.label,ie?Qe(_l,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},Z.key)}),p?[Qe(H_,{},"add-project-divider"),dn(Us,{onClick:()=>_(!0),sx:{fontSize:14,color:"#787774"},children:[Qe(W_,{children:Qe(U_,{sx:{fontSize:18,color:"#787774"}})}),"\uD504\uB85C\uC81D\uD2B8 \uCD94\uAC00"]},"add-project")]:null]}),p?Qe(nl,{open:w,onClose:()=>_(!1),onSubmit:(Z,re,ie)=>{(async()=>{let se=await p(Z,re,ie);se&&L(se)})(),x(null)}}):null,Qe(Bu,{transitionDuration:0,anchorEl:C,open:!!C,onClose:()=>O(null),...Y,children:["high","medium","low"].map(Z=>dn(Us,{selected:e.priority===Z,onClick:()=>{q(Z),O(null)},sx:{fontSize:14,minWidth:130,gap:1},children:[Qe(Fr,{priority:Z,small:!0}),e.priority===Z?Qe(_l,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},Z))}),Qe(Bu,{transitionDuration:0,anchorEl:z,open:!!z,onClose:()=>$(null),...Y,children:Wc(s?!!e.eventTime:String(e.dueDate??"").includes(" ")).map(Z=>{let re=Z.value==="none"?e.reminders.length===0:e.reminders.includes(Z.value);return dn(Us,{selected:re,onClick:()=>{N(tl(e.reminders,Z.value)),Z.value==="none"&&$(null)},sx:{fontSize:14,minWidth:150,gap:1},children:[Z.label,re?Qe(_l,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},Z.value)})}),s?Qe(r3,{anchorEl:E,open:!!E,onClose:()=>F(null),value:s3(e.eventTime),format:"HH:mm",minuteStep:10,autoApply:!0,centered:U,locale:"ko",onChange:(Z,re)=>{j?.(`${Z}:${re}`),F(null)}}):null,Qe(xn,{anchorEl:V,open:!!V,date:e.startDate,reminders:[],hideReminder:!0,showTime:!0,centered:U,onClose:()=>M(null),onDateChange:G,onReminderChange:()=>{}}),Qe(xn,{anchorEl:H,open:!!H,date:e.dueDate,reminders:e.reminders,hideReminder:g||t,showTime:!s,centered:U,onClose:()=>I(null),onDateChange:P,onReminderChange:N})]})}import{useState as a3}from"react";import{Box as l3,Menu as c3,MenuItem as u3}from"@mui/material";import f3 from"@mui/icons-material/RepeatOutlined";import d3 from"@mui/icons-material/DevicesOutlined";import h3 from"@mui/icons-material/ScreenSearchDesktopOutlined";import p3 from"@mui/icons-material/SellOutlined";import m3 from"@mui/icons-material/TaskAltOutlined";import{Fragment as ap,jsx as kr,jsxs as lp}from"react/jsx-runtime";function Iu({label:e="\uBE44\uC5B4 \uC788\uC74C"}){return kr(l3,{component:"span",sx:{color:"#9a9a97"},children:e})}function Tl({values:e,readOnly:d=!1,showResolution:b=!1,onChangeRepro:l,onChangeDevice:o,onChangeWhere:s,onChangeVersion:r,onChangeResolution:t}){let[n,c]=a3(null),i=n?.field==="repro"?Tc:n?.field==="device"?Cc:Bc,a=h=>{n?.field==="repro"?l(h):n?.field==="device"?o(h):n?.field==="resolution"&&t?.(h),c(null)};return lp(ap,{children:[lp(ap,{children:[kr(pt,{icon:kr(f3,{sx:{fontSize:17}}),label:"\uC7AC\uD604\uBE48\uB3C4",onClick:d?void 0:h=>c({field:"repro",el:h}),children:dd(e.repro)||kr(Iu,{label:"\uC120\uD0DD"})}),kr(pt,{icon:kr(d3,{sx:{fontSize:17}}),label:"\uB514\uBC14\uC774\uC2A4",onClick:d?void 0:h=>c({field:"device",el:h}),children:hd(e.device)||kr(Iu,{label:"\uC120\uD0DD"})}),kr(pt,{icon:kr(h3,{sx:{fontSize:17}}),label:"\uBC1C\uC0DD\uD654\uBA74",children:kr(Bo,{value:e.where,placeholder:"\uC608: POS > \uC8FC\uBB38\uD604\uD669",readOnly:d,onCommit:s})}),kr(pt,{icon:kr(p3,{sx:{fontSize:17}}),label:"\uBC1C\uC0DD\uBC84\uC804",children:kr(Bo,{value:e.version,placeholder:"\uC608: 2026-08-06 \uBC30\uD3EC",readOnly:d,onCommit:r})}),b?kr(pt,{icon:kr(m3,{sx:{fontSize:17}}),label:"\uC885\uB8CC\uC0AC\uC720",onClick:d?void 0:h=>c({field:"resolution",el:h}),children:La(e.resolution)||kr(Iu,{label:"\uC120\uD0DD"})}):null]}),kr(c3,{open:!!n,anchorEl:n?.el??null,onClose:()=>c(null),transitionDuration:0,children:i.map(h=>kr(u3,{onClick:()=>a(h.key),sx:{fontSize:14},children:h.name},h.key))})]})}import{Box as cp}from"@mui/material";import{jsxs as up}from"react/jsx-runtime";var Eu=16;function _n({icon:e,title:d,titleExtra:b,children:l}){return up(cp,{sx:{px:2,display:"flex",flexDirection:"column",gap:.25},children:[up(cp,{sx:{display:"flex",alignItems:"center",gap:1,fontSize:Eu,fontWeight:500,color:"#37352f"},children:[e,d,b]}),l]})}import{useState as Mu}from"react";import{Box as Ru,Button as g3,Divider as b3,IconButton as fp,Menu as y3,MenuItem as Ou,Tooltip as x3}from"@mui/material";import v3 from"@mui/icons-material/MoreVert";import{ConfirmDialog as w3}from"@ehfuse/alerts";import{FormDialog as _3}from"@ehfuse/mui-form-dialog";import{ClearTextField as k3}from"@ehfuse/mui-form-controls";import{Fragment as S3,jsx as hn,jsxs as Cl}from"react/jsx-runtime";function dp(e){return String(e??"").replace(/<[^>]*>/g,"").replace(/&nbsp;/g," ").trim().length>0}function Bl({content:e,templates:d,onApply:b,onSave:l,onRemove:o}){let[s,r]=Mu(null),[t,n]=Mu(!1),[c,i]=Mu(""),a=async h=>{r(null),!(dp(e)&&!await w3({title:"\uC591\uC2DD \uBD88\uB7EC\uC624\uAE30",message:`\uC9C0\uAE08 \uC4F4 \uB0B4\uC6A9\uC744 "${h.name}" \uC591\uC2DD\uC73C\uB85C \uBC14\uAFC9\uB2C8\uB2E4. \uACC4\uC18D\uD560\uAE4C\uC694?`}))&&b(h.content)};return Cl(S3,{children:[hn(x3,{title:"\uBCF8\uBB38 \uC591\uC2DD",arrow:!0,disableInteractive:!0,children:hn(fp,{size:"small","aria-label":"\uBCF8\uBB38 \uC591\uC2DD",onClick:h=>r(h.currentTarget),sx:{ml:"auto",color:"#9a9a97"},children:hn(v3,{sx:{fontSize:18}})})}),Cl(y3,{anchorEl:s,open:!!s,onClose:()=>r(null),transitionDuration:0,children:[l?hn(Ou,{disabled:!dp(e),onClick:()=>{r(null),i(""),n(!0)},sx:{fontSize:14,minWidth:220},children:"\uD604\uC7AC \uB0B4\uC6A9\uC744 \uC591\uC2DD\uC73C\uB85C \uC800\uC7A5"}):null,l?hn(b3,{sx:{my:.5}}):null,d.length===0?hn(Ou,{disabled:!0,sx:{fontSize:14,minWidth:220},children:"\uC800\uC7A5\uB41C \uC591\uC2DD\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"}):d.map(h=>Cl(Ou,{onClick:()=>{a(h)},sx:{fontSize:14,minWidth:220,gap:1},children:[hn(Ru,{sx:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:h.name}),o?hn(fp,{size:"small","aria-label":`${h.name} \uC591\uC2DD \uC0AD\uC81C`,onClick:f=>{f.stopPropagation(),o(h.seq)},sx:{color:"#9a9a97"},children:hn(dr,{sx:{fontSize:16}})}):null]},h.seq))]}),hn(_3,{open:t,onClose:()=>n(!1),maxWidth:"xs",title:"\uC591\uC2DD\uC73C\uB85C \uC800\uC7A5",locale:"ko",backdropClick:!1,titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},tabs:{visible:!1},actions:{showCancelButton:!0,right:hn(g3,{variant:"contained",disabled:!c.trim(),onClick:()=>{l?.(c.trim(),e),n(!1)},children:"\uC800\uC7A5"})},sections:[{id:"template-name",title:"",showTitle:!1,children:Cl(Ru,{sx:{display:"flex",flexDirection:"column",gap:1},children:[hn(Ru,{sx:{fontSize:15,color:"#37352f"},children:"\uC9C0\uAE08 \uB0B4\uC6A9\uC744 \uC591\uC2DD\uC73C\uB85C \uC800\uC7A5\uD569\uB2C8\uB2E4. \uB2E4\uC74C\uBD80\uD130 \uC774 \uC774\uB984\uC73C\uB85C \uAEBC\uB0B4 \uC4F8 \uC218 \uC788\uC2B5\uB2C8\uB2E4."}),hn(k3,{size:"medium",fullWidth:!0,autoFocus:!0,placeholder:"\uC591\uC2DD \uC774\uB984 (\uC608: \uC624\uB958 \uC2E0\uACE0 \uC11C\uC2DD)",value:c,onChange:h=>i(h.target.value)})]})}]})]})}import{useEffect as Au,useRef as Zo,useState as T3}from"react";import{Box as Du,IconButton as C3,Tooltip as B3}from"@mui/material";import I3 from"@mui/icons-material/ContentCopyOutlined";import E3 from"@mui/icons-material/Check";import{EhfuseEditor as M3,ImageResizePlugin as R3,minimalToolbarOptions as O3}from"@ehfuse/editor";import{jsx as bi,jsxs as D3}from"react/jsx-runtime";function Pu(e){let d=e.trim();return d?d.startsWith("<")?e:`<p>${d}</p>`:"<p></p>"}function A3(e){let d=e.replace(/<br\s*\/?>/gi,`
32
+ \uC18C\uC18D \uC5C5\uBB34\uB294 \uAE30\uBCF8 \uC5C5\uBB34\uD568\uC73C\uB85C \uC774\uB3D9\uD569\uB2C8\uB2E4.`,confirmText:"\uC0AD\uC81C",onCancel:()=>I(null),onConfirm:()=>{H&&B(H.column.key),I(null)}}),rt(kt,{open:!!D,anchorEl:D?.anchorEl??null,title:D?.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:D?.nextCompleted?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>p(null),onConfirm:()=>{D&&o(D.taskSeq,D.nextCompleted),p(null)}})]})}import{useCallback as xo,useMemo as Ls,useRef as wh,useState as zs}from"react";import{Box as yr,Button as Iv,ButtonBase as kh,IconButton as _h}from"@mui/material";import Ev from"@mui/icons-material/Add";import Mv from"@mui/icons-material/ChevronLeft";import Rv from"@mui/icons-material/ChevronRight";import Ov from"@mui/icons-material/KeyboardArrowDown";import{DatePicker as Av}from"@ehfuse/mui-datetime-picker";import{DndContext as Dv,DragOverlay as Pv,PointerSensor as Nv,pointerWithin as Lv,rectIntersection as zv,useDroppable as jv,useSensor as Fv,useSensors as qv}from"@dnd-kit/core";import{SortableContext as $v,arrayMove as Hv,useSortable as Wv,verticalListSortingStrategy as Uv}from"@dnd-kit/sortable";import{CSS as Vv}from"@dnd-kit/utilities";import Kv from"@ehfuse/overlay-scrollbar";function xv(e){let[d,b,l]=e.split("-").map(Number),o=new Date(Date.UTC(d,b-1,l+1)),s=r=>String(r).padStart(2,"0");return`${o.getUTCFullYear()}-${s(o.getUTCMonth()+1)}-${s(o.getUTCDate())}`}function $i(e){let d=new Map;for(let b of e){let l=b.start_date;for(let o=0;o<62&&l<=b.end_date;o+=1){let s=d.get(l);s?s.push(b):d.set(l,[b]),l=xv(l)}}for(let b of d.values())b.sort((l,o)=>(l.time||"99:99").localeCompare(o.time||"99:99")||l.title.localeCompare(o.title));return d}function Hi(e){let d=String((e.is_event?e.event_time:e.due_date.slice(11,16)||e.estimated_time)??"").trim();return/^\d{1,2}:\d{2}$/.test(d)?d:""}function Wi(e,d){if(e.completed!==d.completed)return e.completed?1:-1;let b=Hi(e),l=Hi(d);if(!!b!=!!l)return b?-1:1;if(b&&l&&b!==l)return b<l?-1:1;let o=e.sort_no>0,s=d.sort_no>0;return o&&s?e.sort_no-d.sort_no:o!==s?o?-1:1:e.seq-d.seq}import{Box as au,Tooltip as vv}from"@mui/material";import{jsx as lu,jsxs as wv}from"react/jsx-runtime";function Ui({event:e,small:d=!1}){let b=e.time?`${e.time} ${e.title}`:e.title,l=e.calendar?`\uAD6C\uAE00 \xB7 ${e.calendar}`:"\uAD6C\uAE00 \uCE98\uB9B0\uB354",o=s=>{s.stopPropagation();let[r,t,n]=e.start_date.split("-").map(Number);window.open(`https://calendar.google.com/calendar/r/day/${r}/${t}/${n}`,"_blank")};return lu(vv,{title:`(${l}) ${b}`,arrow:!0,enterDelay:300,children:wv(au,{onClick:o,onPointerDown:s=>s.stopPropagation(),sx:{display:"flex",alignItems:"center",gap:.5,px:1,py:d?.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:[lu(au,{component:"span",sx:{width:6,height:6,borderRadius:"50%",bgcolor:"#0f9d58",flexShrink:0}}),lu(au,{component:"span",sx:{minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},children:b})]})})}import{useCallback as Sv}from"react";import{Box as Vo,Checkbox as Tv}from"@mui/material";import{useLayoutEffect as _v,useState as xh}from"react";var uu=new WeakMap,cu=null;function kv(){return typeof ResizeObserver>"u"?null:(cu||(cu=new ResizeObserver(e=>{for(let d of e){let b=uu.get(d.target);if(!b)continue;let l=d.borderBoxSize?.[0]?.inlineSize??d.target.getBoundingClientRect().width;b(l)}})),cu)}function vh(){let[e,d]=xh(null),[b,l]=xh(0);return _v(()=>{if(!e)return;l(e.getBoundingClientRect().width);let o=kv();if(o)return uu.set(e,s=>l(r=>Math.abs(r-s)<1?r:s)),o.observe(e),()=>{o.unobserve(e),uu.delete(e)}},[e]),{ref:d,width:b}}import{jsx as yo,jsxs as fu}from"react/jsx-runtime";var du={high:"#e5484d",medium:"#2f80ed",low:"#d9a514"},Vi=15,Cv=150,Bv=3;function Ko({task:e,statusOptions:d,onOpenDetail:b,onContextMenu:l,isPreview:o=!1,isDragging:s=!1,isMine:r=!1,avatarSrcByName:t,showManagerAvatar:n=!1,onOpenMembers:c,setNodeRef:i,dragProps:a,trailing:h,showCheckbox:f=!1,onRequestToggleCompleted:u,showTime:g=!0,wrapTitle:m=!1}){let v=at(),k=v.mode==="dark",[B]=Oi(e,d),R=String(e.manager_name??"").trim(),L=g?Hi(e):"",A=Di(e,$t().resolveTask),P=!e.completed&&!e.is_event&&!e.due_date.slice(0,10),N=e.is_notice||e.is_event?Tt(e.icon||(e.is_notice?ir:cr)):null,q=!e.completed&&!e.is_event&&!!e.due_date&&e.due_date.slice(0,10)<yd(),{ref:j,width:S}=vh(),T=S>0&&S<Cv,D=T||m,p=Sv(x=>{j(x),i?.(x)},[j,i]),y=n&&!r&&!T&&!!R;return fu(Vo,{ref:p,...a??{},onClick:x=>{x.stopPropagation(),b(e)},onContextMenu:l?x=>l(e,x):void 0,sx:{display:"flex",alignItems:D?"flex-start":"center",gap:.5,py:.6,px:1,flexShrink:0,borderRadius:.75,minWidth:0,maxWidth:"100%",bgcolor:B?k?Ri(B.dot,v.chip.darkBgAlpha):B.bg:k?v.card.bg:v.colors.surfaceHover,color:B?k?v.chip.darkTextSource==="fg"?B.fg:B.dot:B.fg:v.colors.textPrimary,fontSize:Vi,fontWeight:k||e.completed?400:500,textDecoration:e.completed?"line-through":"none",opacity:o?.5:s?.35:e.completed?.6:P?.75:1,border:o?`1px dashed ${v.colors.accent}`:"1px solid transparent",pointerEvents:o?"none":"auto",cursor:"pointer",touchAction:a?"none":"auto",overflow:"hidden","&:hover":{filter:"brightness(0.96)"},...q?{borderLeft:`3px solid ${v.colors.danger}`,pl:.75}:r?{borderLeft:"3px solid #2f80ed",pl:.75}:{}},children:[yo(Vo,{component:"span",sx:{width:6,height:6,borderRadius:"50%",flexShrink:0,...D?{mt:"7px"}:{},bgcolor:du[e.priority]??v.colors.accentOnSurface}}),f&&!T&&u?yo(Tv,{size:"small",checked:e.completed,onPointerDown:x=>x.stopPropagation(),onClick:x=>x.stopPropagation(),onChange:(x,w)=>u({anchorEl:x.currentTarget,taskSeq:e.seq,nextCompleted:w}),sx:{p:0,flexShrink:0}}):null,N&&!T?yo(N,{sx:{fontSize:15,flexShrink:0,opacity:.75,...D?{mt:"3px"}:{}}}):null,fu(Vo,{sx:{minWidth:0,overflow:"hidden",display:"flex",flexDirection:"column",color:k?v.colors.textStrong:v.colors.textPrimary,...P&&!k?{color:v.colors.textSecondary}:{}},children:[T&&L?yo(Vo,{component:"span",sx:{lineHeight:1.35,fontSize:Vi-1,color:e.completed?v.colors.textPrimary:v.colors.danger},children:L}):null,fu(Vo,{component:"span",sx:{minWidth:0,overflow:"hidden",...D?{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:Bv,whiteSpace:"normal",overflowWrap:"anywhere",lineHeight:1.35}:{textOverflow:"ellipsis",whiteSpace:"nowrap"}},children:[!T&&L?yo(Vo,{component:"span",sx:{mr:.5,fontSize:Vi-1,color:e.completed?v.colors.textPrimary:v.colors.danger},children:L}):null,e.title,!T&&A?yo(Vo,{component:"span",sx:{ml:.5,fontSize:Vi-2,color:v.colors.textMuted,fontVariantNumeric:"tabular-nums"},children:A}):null,!T&&(e.comment_count??e.comments?.length??0)>0?yo(Ho,{sx:{fontSize:15,ml:.5,verticalAlign:"-2px",color:v.colors.textMuted}}):null]})]}),h??null,!h&&y?yo(Vo,{component:"span",onClick:c?x=>{x.stopPropagation(),c(e)}:void 0,sx:{display:"inline-flex",flexShrink:0,ml:"auto",pl:.5},children:yo(bn,{src:t?.get(R)??"",name:R,avatarSx:{width:22,height:22,fontSize:11},iconFontSize:14})}):null]})}import{jsx as Dt,jsxs as vo}from"react/jsx-runtime";var Sh=36,Gv=["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"],fl="day-";function hu(e){let d=new Date(e);return d.setHours(0,0,0,0),d.setDate(d.getDate()-d.getDay()),d}function ul(e,d){let b=new Date(e);return b.setDate(b.getDate()+d),b}function Yv(e){let d=e[0],b=e[e.length-1];return d.getMonth()===b.getMonth()?`${d.getFullYear()}\uB144 ${d.getMonth()+1}\uC6D4`:d.getFullYear()===b.getFullYear()?`${d.getFullYear()}\uB144 ${d.getMonth()+1}\uC6D4 - ${b.getMonth()+1}\uC6D4`:`${d.getFullYear()}\uB144 ${d.getMonth()+1}\uC6D4 - ${b.getFullYear()}\uB144 ${b.getMonth()+1}\uC6D4`}function Xv(e){return e.getDate()===1?`${e.getMonth()+1}\uC6D4 1\uC77C`:String(e.getDate())}function Zv({task:e,statusOptions:d,isMine:b,avatarSrcByName:l,onCardClick:o,onCardContextMenu:s,onRequestArchiveToggle:r,dragDisabled:t=!1}){let{attributes:n,listeners:c,setNodeRef:i,transform:a,transition:h,isDragging:f}=Wv({id:String(e.seq),disabled:t});return Dt(Ko,{task:e,statusOptions:d,isMine:b,avatarSrcByName:l,showManagerAvatar:!0,wrapTitle:!0,onOpenDetail:u=>o?.(u),onContextMenu:s,showCheckbox:!0,onRequestToggleCompleted:r,isDragging:f,setNodeRef:i,dragProps:t?void 0:{...n,...c,style:{transform:Vv.Translate.toString(a),transition:h}}})}function Jv({dayKey:e,isToday:d,dayLabel:b,holidayName:l,tasks:o,googleEvents:s,statusOptions:r,onRequestArchiveToggle:t,onRequestReply:n,onAddSchedule:c,canAdd:i,onCardClick:a,onCardContextMenu:h,summary:f,myAccountSeq:u,avatarSrcByName:g,dragDisabled:m=!1}){let v=at(),{setNodeRef:k}=jv({id:`${fl}${e}`,disabled:m});return vo(yr,{ref:k,sx:{minWidth:0,minHeight:0,height:"100%",display:"flex",flexDirection:"column",bgcolor:d?v.calendar.todayBg:v.calendar.cellBg},children:[vo(yr,{sx:{display:"flex",justifyContent:"flex-end",alignItems:"center",gap:.5,px:1,height:Sh,bgcolor:d?v.calendar.todayBg:v.calendar.dateBandBg,borderBottom:`1px solid ${v.calendar.borderColor}`,flexShrink:0},children:[l?Dt(yr,{component:"span",sx:{mr:"auto",fontSize:11.5,fontWeight:600,color:v.colors.danger,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:l}):null,d?Dt(yr,{component:"span",sx:{mr:.75,px:.6,py:.1,borderRadius:.5,fontSize:11,fontWeight:600,bgcolor:v.colors.danger,color:v.calendar.cellBg,lineHeight:1.6},children:"\uC624\uB298"}):null,Dt(yr,{component:"span",sx:{fontSize:13.5,fontWeight:d?700:400,color:l?v.colors.danger:v.mode==="dark"?v.colors.textStrong:v.colors.textPrimary,flexShrink:0},children:b})]}),f?Dt(yr,{sx:{px:1,py:1,borderBottom:`1px solid ${v.calendar.borderColor}`,flexShrink:0},children:f}):null,Dt(yr,{sx:{flex:1,minHeight:0,bgcolor:d?v.calendar.todayBg:v.colors.surfaceSubtle},children:Dt(Kv,{style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:vo(yr,{sx:{display:"flex",flexDirection:"column",flexGrow:1},children:[s.length>0?Dt(yr,{sx:{display:"flex",flexDirection:"column",gap:.5,px:1,pt:.75,pb:.25},children:s.map(B=>Dt(Ui,{event:B},B.uid))}):null,Dt($v,{items:o.map(B=>String(B.seq)),strategy:Uv,children:Dt(yr,{sx:{display:"flex",flexDirection:"column",gap:.5,px:1,pt:o.length>0?.75:0},children:o.map(B=>Dt(Zv,{task:B,statusOptions:r,isMine:u>0&&Number(B.manager_account_seq??0)===u,avatarSrcByName:g,onCardClick:a,onCardContextMenu:h,onRequestArchiveToggle:t,dragDisabled:m},B.seq))})}),Dt(yr,{sx:{flexGrow:1,minHeight:56,display:"flex",flexDirection:"column",pb:1,...i?{"&:hover .taskbox-add-schedule":{opacity:1,pointerEvents:"auto"}}:{}},children:vo(kh,{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 ${v.calendar.borderColor}`,bgcolor:v.calendar.cellBg,color:v.colors.accentOnSurface,fontSize:13,fontWeight:500,opacity:0,pointerEvents:"none",transition:"opacity 0.15s","&:hover":{bgcolor:v.calendar.hoverBg}},children:[Dt(Ev,{sx:{fontSize:16}}),"\uC5C5\uBB34 \uB4F1\uB85D"]})})]})})})]})}function Th({tasks:e,googleEvents:d=[],statusOptions:b,fallbackToStartDate:l=!1,myAccountSeq:o=0,avatarSrcByName:s,todayStr:r,onToggleCompleted:t,onMoveTask:n,onRequestReply:c,onAddSchedule:i,canAdd:a=!0,disableDrag:h=!1,onOpenDetail:f,onTaskContextMenu:u,hideCompleted:g=!1,renderColumnSummary:m}){let v=at(),[k,B]=zs(()=>hu(new Date)),[R,L]=zs(null),[A,P]=zs(null),[N,q]=zs(null),[j,S]=zs(null),T=wh(!1),D=Ls(()=>Array.from({length:7},(K,W)=>ul(k,W)),[k]),p=Ls(()=>new Map(e.map(K=>[K.seq,K])),[e]),y=Ls(()=>[...new Set(D.map(K=>K.getFullYear()))],[D]),x=Hn(y),w=qv(Fv(Nv,{activationConstraint:{distance:5}})),_=xo(K=>{let W=Lv(K),X=W.length>0?W:zv(K),J=X.filter(G=>!String(G.id).startsWith(fl));return J.length>0?J:X},[]),C=Ls(()=>$i(d),[d]),O=Ls(()=>{let K=new Map;for(let W of e){let X=W.due_date.slice(0,10)||(l?W.start_date.slice(0,10)||String(W.created_time??"").slice(0,10):"");if(!X)continue;let J=K.get(X);J?J.push(W):K.set(X,[W])}for(let W of K.values())W.sort(Wi);return K},[e,l]),z=xo(K=>N?(N.get(K)??[]).map(W=>p.get(W)).filter(W=>!!W):O.get(K)??[],[N,p,O]),$=xo(K=>{let W=z(K);return g?W.filter(X=>!X.completed):W},[z,g]),V=xo(K=>{S(Number(K.active.id)),q(new Map(D.map(W=>{let X=vr(W);return[X,(O.get(X)??[]).map(J=>J.seq)]})))},[D,O]),M=xo((K,W)=>{if(K.startsWith(fl))return{day:K.slice(fl.length),overSeq:null};let X=Number(K);for(let[J,G]of W)if(G.includes(X))return{day:J,overSeq:X};return null},[]),H=xo(K=>{let{active:W,over:X}=K;X&&q(J=>{if(!J)return J;let G=Number(W.id),te=M(String(X.id),J);if(!te)return J;let Z=[...J.entries()].find(([,oe])=>oe.includes(G))?.[0];if(!Z||Z===te.day)return J;let re=new Map(J);re.set(Z,(re.get(Z)??[]).filter(oe=>oe!==G));let ie=[...re.get(te.day)??[]],se=ie.length;if(te.overSeq!==null){let oe=ie.indexOf(te.overSeq);oe!==-1&&(se=oe)}return ie.splice(se,0,G),re.set(te.day,ie),re})},[M]),I=xo(K=>{let{active:W,over:X}=K,J=N;if(q(null),S(null),T.current=!0,!J||!X)return;let G=Number(W.id),te=[...J.entries()].find(([,oe])=>oe.includes(G));if(!te)return;let[Z,re]=te,ie=[...re],se=M(String(X.id),J);if(se&&se.day===Z&&se.overSeq!==null&&se.overSeq!==G){let oe=ie.indexOf(G),pe=ie.indexOf(se.overSeq);oe!==-1&&pe!==-1&&(ie=Hv(ie,oe,pe))}n(G,Z,ie)},[N,n,M]),E=xo(()=>{q(null),S(null),T.current=!0},[]),F=xo(K=>{if(T.current){T.current=!1;return}f(K)},[f]),U=j!==null?p.get(j)??null:null,Y=wh(null);return vo(yr,{onTouchStart:K=>{let W=K.touches[0];Y.current=W?{x:W.clientX,y:W.clientY}:null},onTouchEnd:K=>{let W=Y.current;Y.current=null;let X=K.changedTouches[0];if(!W||!X||j!==null)return;let J=X.clientX-W.x,G=X.clientY-W.y;Math.abs(J)<60||Math.abs(J)<=Math.abs(G)||B(ul(k,J<0?7:-7))},sx:{display:"flex",flexDirection:"column",flex:1,minHeight:0,border:`1px solid ${v.calendar.borderColor}`,borderRadius:"0 0 4px 4px",overflow:"hidden"},children:[vo(yr,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1,bgcolor:v.calendar.bg,borderBottom:`1px solid ${v.calendar.borderColor}`,flexShrink:0},children:[vo(yr,{sx:{display:"flex",alignItems:"center",gap:.25},children:[Dt(_h,{size:"small","aria-label":"\uC774\uC804 \uC8FC",onClick:()=>B(ul(k,-7)),children:Dt(Mv,{sx:{fontSize:24,color:v.colors.textSecondary}})}),Dt(Iv,{size:"small",color:"inherit",onClick:()=>B(hu(new Date)),sx:{minWidth:0,px:1,mx:1,fontSize:15.5,fontWeight:v.mode==="dark"?400:500,color:v.mode==="dark"?v.colors.textStrong:v.colors.textPrimary},children:"\uC624\uB298"}),Dt(_h,{size:"small","aria-label":"\uB2E4\uC74C \uC8FC",onClick:()=>B(ul(k,7)),children:Dt(Rv,{sx:{fontSize:24,color:v.colors.textSecondary}})})]}),vo(kh,{onClick:K=>P(K.currentTarget),sx:{ml:{xs:"auto",lg:0},display:"inline-flex",alignItems:"center",gap:.25,px:.75,py:.25,borderRadius:1,fontSize:15,fontWeight:v.mode==="dark"?400:700,color:v.mode==="dark"?v.colors.textStrong:v.colors.textPrimary,"&:hover":{bgcolor:v.colors.surfaceHover}},children:[Yv(D),Dt(Ov,{sx:{fontSize:18,color:v.colors.textMuted}})]})]}),Dt(yr,{sx:{display:"grid",gridTemplateColumns:"repeat(7, minmax(0, 1fr))",bgcolor:v.calendar.headerBg,borderBottom:`1px solid ${v.calendar.borderColor}`,flexShrink:0,"& > *":{borderRight:`1px solid ${v.calendar.borderColor}`},"& > *:last-child":{borderRight:"none"}},children:D.map(K=>{let W=K.getDay(),X=x.has(vr(K));return Dt(yr,{sx:{height:Sh,display:"flex",alignItems:"center",justifyContent:"center",fontSize:12.5,color:W===0||X?v.colors.danger:W===6?v.colors.accentOnSurface:v.colors.textSecondary},children:Gv[W]},vr(K))})}),Dt(yr,{sx:{flex:1,minHeight:0},children:vo(Dv,{sensors:w,collisionDetection:_,onDragStart:V,onDragOver:H,onDragEnd:I,onDragCancel:E,children:[Dt(yr,{sx:{display:"grid",gridTemplateColumns:"repeat(7, minmax(0, 1fr))",height:"100%",minHeight:0,"& > *":{borderRight:`1px solid ${v.calendar.borderColor}`},"& > *:last-child":{borderRight:"none"}},children:D.map(K=>{let W=vr(K);return Dt(Jv,{dayKey:W,isToday:W===r,dayLabel:Xv(K),holidayName:x.get(W)??"",summary:m?.(W,z(W)),tasks:$(W),googleEvents:C.get(W)??[],statusOptions:b,onRequestArchiveToggle:L,onRequestReply:c,onAddSchedule:i,canAdd:a,onCardClick:F,onCardContextMenu:u,myAccountSeq:o,avatarSrcByName:s,dragDisabled:h},W)})}),Dt(Pv,{children:U?Dt(yr,{sx:{boxShadow:"0 8px 20px rgba(0,0,0,0.18)",borderRadius:.75,cursor:"grabbing"},children:Dt(Ko,{task:U,statusOptions:b,onOpenDetail:()=>{},isMine:o>0&&Number(U.manager_account_seq??0)===o})}):null})]})}),Dt(Av,{anchorEl:A,open:!!A,onClose:()=>P(null),selectedDate:k,onDateChange:K=>{B(hu(K)),P(null)}}),Dt(kt,{open:!!R,anchorEl:R?.anchorEl??null,title:R?.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:R?.nextCompleted?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>L(null),onConfirm:()=>{R&&t(R.taskSeq,R.nextCompleted),L(null)}})]})}import{useCallback as js,useMemo as di,useRef as Qv,useState as Fs}from"react";import{Box as $r,Button as ew,ButtonBase as Bh,IconButton as Ch,Tooltip as tw}from"@mui/material";import rw from"@mui/icons-material/Add";import nw from"@mui/icons-material/ChevronLeft";import ow from"@mui/icons-material/ChevronRight";import iw from"@mui/icons-material/KeyboardArrowDown";import{DatePicker as sw}from"@ehfuse/mui-datetime-picker";import{DndContext as aw,DragOverlay as lw,PointerSensor as cw,pointerWithin as uw,rectIntersection as fw,useDraggable as dw,useDroppable as Ih,useSensor as hw,useSensors as pw}from"@dnd-kit/core";import mw from"@ehfuse/overlay-scrollbar";import{jsx as Ht,jsxs as wo}from"react/jsx-runtime";var gw=["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"],dl="mday-",hl="mchip-",Eh=36;function bw(e){let d=new Date(e);return d.setHours(0,0,0,0),d.setDate(d.getDate()-d.getDay()),d}function pl(e){let d=new Date(e);return d.setHours(0,0,0,0),d.setDate(1),d}function yw(e,d){let b=new Date(e);return b.setDate(b.getDate()+d),b}function pu(e,d){let b=pl(e);return b.setMonth(b.getMonth()+d),b}function xw({task:e,statusOptions:d,isPreview:b=!1,isMine:l=!1,avatarSrcByName:o,onOpenDetail:s,onContextMenu:r,onRequestToggleCompleted:t,dragDisabled:n=!1}){let{attributes:c,listeners:i,setNodeRef:a,isDragging:h}=dw({id:String(e.seq),disabled:b||n}),{setNodeRef:f}=Ih({id:`${hl}${e.seq}`,disabled:b||n});return Ht(tw,{title:e.title,arrow:!0,enterDelay:400,children:Ht(Ko,{task:e,statusOptions:d,onOpenDetail:s,onContextMenu:r,showCheckbox:!!t,onRequestToggleCompleted:t,isPreview:b,isDragging:h,isMine:l,avatarSrcByName:o,showManagerAvatar:!0,wrapTitle:!0,setNodeRef:u=>{a(u),f(u)},dragProps:n?void 0:{...c,...i}})})}function vw({dayKey:e,dayNumber:d,isToday:b,isOtherMonth:l,weekday:o,holidayName:s,tasks:r,googleEvents:t,statusOptions:n,previewSeq:c,myAccountSeq:i,avatarSrcByName:a,onRequestToggleCompleted:h,onOpenDetail:f,onTaskContextMenu:u,onAddSchedule:g,canAdd:m,dragDisabled:v=!1}){let k=at(),B=k.mode==="dark",{setNodeRef:R,isOver:L}=Ih({id:`${dl}${e}`,disabled:v}),A=r,P=!!s||o===0;return wo($r,{ref:R,sx:{minWidth:0,minHeight:0,display:"flex",flexDirection:"column",gap:.5,p:.5,bgcolor:L?k.colors.accentSoft:b?k.calendar.todayBg:l?k.calendar.otherMonthBg:k.calendar.cellBg,transition:"background-color 0.15s",overflow:"hidden",...m?{"&:hover .taskbox-month-add":{opacity:1,pointerEvents:"auto"}}:{}},children:[wo($r,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:.5,height:Eh,flexShrink:0,mx:-.5,mt:-.5,px:1,bgcolor:b?k.calendar.todayBg:k.calendar.dateBandBg,borderBottom:`1px solid ${k.calendar.borderColor}`},children:[s?Ht($r,{component:"span",sx:{mr:.25,minWidth:0,fontSize:11,fontWeight:600,color:k.colors.danger,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:s}):null,b?Ht($r,{component:"span",sx:{px:.5,borderRadius:.5,fontSize:10.5,fontWeight:600,bgcolor:k.colors.danger,color:k.calendar.cellBg,lineHeight:1.6},children:"\uC624\uB298"}):null,Ht($r,{component:"span",sx:{fontSize:13.5,fontWeight:b?700:400,color:l?k.colors.textMuted:P?k.colors.danger:o===6?k.colors.accentOnSurface:B?k.colors.textStrong:k.colors.textPrimary,flexShrink:0},children:d})]}),t.map(N=>Ht(Ui,{event:N,small:!0},N.uid)),A.map(N=>Ht(xw,{task:N,statusOptions:n,isPreview:N.seq===c,isMine:i>0&&Number(N.manager_account_seq??0)===i,avatarSrcByName:a,onRequestToggleCompleted:h,onOpenDetail:f,onContextMenu:u,dragDisabled:v},N.seq)),Ht($r,{sx:{flexGrow:1,minHeight:0,display:"flex",alignItems:"flex-start"},children:wo(Bh,{className:"taskbox-month-add",onClick:()=>g(e),sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"flex-start",gap:.5,px:1.25,py:.75,borderBottom:`1px dashed ${k.calendar.borderColor}`,bgcolor:k.calendar.cellBg,color:k.colors.accentOnSurface,fontSize:13,fontWeight:500,opacity:0,pointerEvents:"none",transition:"opacity 0.15s","&:hover":{bgcolor:k.calendar.hoverBg}},children:[Ht(rw,{sx:{fontSize:16}}),"\uC5C5\uBB34 \uB4F1\uB85D"]})})]})}function Mh({tasks:e,googleEvents:d=[],statusOptions:b,fallbackToStartDate:l=!1,myAccountSeq:o=0,avatarSrcByName:s,onToggleCompleted:r,todayStr:t,onMoveTask:n,onAddSchedule:c,canAdd:i=!0,disableDrag:a=!1,onOpenDetail:h,onTaskContextMenu:f}){let u=at(),g=u.mode==="dark",[m,v]=Fs(()=>pl(new Date)),[k,B]=Fs(null),[R,L]=Fs(null),[A,P]=Fs(null),[N,q]=Fs(null),j=di(()=>{let F=bw(m);return Array.from({length:42},(U,Y)=>yw(F,Y))},[m]),S=di(()=>new Map(e.map(F=>[F.seq,F])),[e]),T=di(()=>$i(d),[d]),D=di(()=>[...new Set(j.map(F=>F.getFullYear()))],[j]),p=Hn(D),y=di(()=>{let F=new Map;for(let U of e){let Y=U.due_date.slice(0,10)||(l?U.start_date.slice(0,10)||String(U.created_time??"").slice(0,10):"");if(!Y)continue;let K=F.get(Y);K?K.push(U):F.set(Y,[U])}for(let U of F.values())U.sort(Wi);return F},[e,l]),x=pw(hw(cw,{activationConstraint:{distance:5}})),w=js(F=>{let U=uw(F),Y=U.length>0?U:fw(F),K=Y.filter(W=>String(W.id).startsWith(hl));return K.length>0?K:Y.filter(W=>String(W.id).startsWith(dl))},[]),_=js(F=>{P(Number(F.active.id))},[]),C=js(F=>{q(F.over?String(F.over.id):null)},[]),O=di(()=>{let F=new Map;for(let[U,Y]of y)for(let K of Y)F.set(K.seq,U);return F},[y]),z=A!==null?S.get(A)?.due_date.slice(0,10)??"":"",$=di(()=>{if(A===null||!N)return null;if(N.startsWith(hl)){let F=Number(N.slice(hl.length)),U=O.get(F);if(!U)return null;let Y=(y.get(U)??[]).filter(W=>W.seq!==A),K=Y.findIndex(W=>W.seq===F);return{day:U,index:K===-1?Y.length:K}}if(N.startsWith(dl)){let F=N.slice(dl.length),U=(y.get(F)??[]).filter(Y=>Y.seq!==A);return{day:F,index:U.length}}return null},[A,O,N,y]),V=js(F=>{let U=y.get(F)??[];if(A===null||!$)return U;let Y=S.get(A);if(!Y)return U;let K=U.filter(W=>W.seq!==A);return F===$.day?[...K.slice(0,$.index),Y,...K.slice($.index)]:F===z?K:U},[A,z,$,S,y]),M=js(F=>{let U=A,Y=$;if(P(null),q(null),U===null||!Y)return;let K=(y.get(Y.day)??[]).filter(X=>X.seq!==U),W=[...K.slice(0,Y.index).map(X=>X.seq),U,...K.slice(Y.index).map(X=>X.seq)];n(U,Y.day,W)},[A,$,n,y]),H=A!==null?S.get(A)??null:null,I=`${m.getFullYear()}\uB144 ${m.getMonth()+1}\uC6D4`,E=Qv(null);return wo($r,{onTouchStart:F=>{let U=F.touches[0];E.current=U?{x:U.clientX,y:U.clientY}:null},onTouchEnd:F=>{let U=E.current;E.current=null;let Y=F.changedTouches[0];if(!U||!Y||A!==null)return;let K=Y.clientX-U.x,W=Y.clientY-U.y;Math.abs(K)<60||Math.abs(K)<=Math.abs(W)||v(pu(m,K<0?1:-1))},sx:{display:"flex",flexDirection:"column",flex:1,minHeight:0,border:`1px solid ${u.calendar.borderColor}`,borderRadius:"0 0 4px 4px",overflow:"hidden"},children:[wo($r,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1,bgcolor:u.calendar.bg,borderBottom:`1px solid ${u.calendar.borderColor}`,flexShrink:0},children:[wo($r,{sx:{display:"flex",alignItems:"center",gap:.25},children:[Ht(Ch,{size:"small","aria-label":"\uC774\uC804 \uB2EC",onClick:()=>v(pu(m,-1)),children:Ht(nw,{sx:{fontSize:24,color:u.colors.textSecondary}})}),Ht(ew,{size:"small",color:"inherit",onClick:()=>v(pl(new Date)),sx:{minWidth:0,px:1,mx:1,fontSize:15.5,fontWeight:u.mode==="dark"?400:500,color:u.mode==="dark"?u.colors.textStrong:u.colors.textPrimary},children:"\uC624\uB298"}),Ht(Ch,{size:"small","aria-label":"\uB2E4\uC74C \uB2EC",onClick:()=>v(pu(m,1)),children:Ht(ow,{sx:{fontSize:24,color:u.colors.textSecondary}})})]}),wo(Bh,{onClick:F=>B(F.currentTarget),sx:{display:"inline-flex",alignItems:"center",gap:.25,ml:{xs:"auto",lg:0},px:.75,py:.25,borderRadius:1,fontSize:15,fontWeight:u.mode==="dark"?400:700,color:u.mode==="dark"?u.colors.textStrong:u.colors.textPrimary,"&:hover":{bgcolor:u.colors.surfaceHover}},children:[I,Ht(iw,{sx:{fontSize:18,color:u.colors.textMuted}})]})]}),Ht($r,{sx:{display:"grid",gridTemplateColumns:"repeat(7, minmax(0, 1fr))",bgcolor:u.calendar.headerBg,borderBottom:`1px solid ${u.calendar.borderColor}`,flexShrink:0,"& > *":{borderRight:`1px solid ${u.calendar.borderColor}`},"& > *:last-child":{borderRight:"none"}},children:gw.map((F,U)=>Ht($r,{sx:{height:Eh,display:"flex",alignItems:"center",justifyContent:"center",fontSize:12.5,color:U===0?u.colors.danger:U===6?u.colors.accentOnSurface:u.colors.textSecondary},children:F},F))}),Ht($r,{sx:{flex:1,minHeight:0},children:wo(aw,{sensors:x,collisionDetection:w,onDragStart:_,onDragOver:C,onDragEnd:M,onDragCancel:()=>{P(null),q(null)},children:[Ht(mw,{style:{height:"100%"},thumb:{width:8},children:Ht($r,{sx:{display:"grid",gridTemplateColumns:"repeat(7, minmax(0, 1fr))",gridTemplateRows:"repeat(6, minmax(112px, auto))",minHeight:"100%",flexShrink:0,"& > *":{borderRight:`1px solid ${u.calendar.borderColor}`,borderBottom:`1px solid ${u.calendar.borderColor}`},"& > *:nth-of-type(7n)":{borderRight:"none"},"& > *:nth-last-of-type(-n+7)":{borderBottom:"none"}},children:j.map(F=>{let U=vr(F);return Ht(vw,{dayKey:U,dayNumber:F.getDate(),isToday:U===t,isOtherMonth:F.getMonth()!==m.getMonth(),weekday:F.getDay(),holidayName:p.get(U)??"",tasks:V(U),googleEvents:T.get(U)??[],statusOptions:b,previewSeq:$?.day===U?A:null,myAccountSeq:o,avatarSrcByName:s,onRequestToggleCompleted:r?L:void 0,onOpenDetail:h,onTaskContextMenu:f,onAddSchedule:c,canAdd:i,dragDisabled:a},U)})})}),Ht(lw,{children:H?wo($r,{sx:{display:"flex",alignItems:"center",gap:.5,py:.6,px:.75,borderRadius:.75,bgcolor:u.calendar.cellBg,border:`1px solid ${u.calendar.borderColor}`,boxShadow:"0 6px 16px rgba(0,0,0,0.18)",fontSize:Vi,fontWeight:500,color:u.colors.textPrimary,cursor:"grabbing",whiteSpace:"nowrap"},children:[Ht($r,{component:"span",sx:{width:6,height:6,borderRadius:"50%",bgcolor:du[H.priority]}}),H.title]}):null})]})}),Ht(kt,{open:!!R,anchorEl:R?.anchorEl??null,title:R?.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:R?.nextCompleted?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>L(null),onConfirm:()=>{R&&r?.(R.taskSeq,R.nextCompleted),L(null)}}),Ht(sw,{anchorEl:k,open:!!k,onClose:()=>B(null),selectedDate:m,onDateChange:F=>{v(pl(F)),B(null)}})]})}import{useEffect as kw,useMemo as qs,useRef as gu,useState as bu}from"react";import{Box as Or,Button as Sw,IconButton as Oh,useMediaQuery as Tw}from"@mui/material";import Cw from"@mui/icons-material/ChevronLeft";import Bw from"@mui/icons-material/ChevronRight";import Iw from"@mui/icons-material/KeyboardArrowDown";import{DatePicker as Ew}from"@ehfuse/mui-datetime-picker";import{Box as _o,Button as ww,Dialog as _w}from"@mui/material";import{jsx as ko,jsxs as mu}from"react/jsx-runtime";function Rh({task:e,avatarSrcByName:d,onClose:b}){let l=at(),o=e?[{label:"\uCC45\uC784\uC790",names:[String(e.manager_name??"").trim()]},{label:"\uCC38\uC870\uC790",names:e.receiver_names??[]},{label:"\uC791\uC131\uC790",names:[String(e.created_by??"").trim()]}]:[];return ko(_w,{open:!!e,onClose:b,maxWidth:"xs",fullWidth:!0,slotProps:{paper:{sx:{borderRadius:2,m:2}}},children:e?mu(_o,{sx:{p:2,display:"flex",flexDirection:"column",gap:1.5,bgcolor:l.colors.surface},children:[ko(_o,{sx:{fontSize:15.5,fontWeight:600,color:l.colors.textStrong,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.title}),o.map(s=>{let r=s.names.filter(t=>!!t);return mu(_o,{sx:{display:"flex",alignItems:"flex-start",gap:1.5},children:[ko(_o,{sx:{width:56,flexShrink:0,fontSize:13.5,color:l.colors.textSecondary,pt:.5},children:s.label}),ko(_o,{sx:{display:"flex",flexWrap:"wrap",gap:1,minWidth:0},children:r.length===0?ko(_o,{sx:{fontSize:14,color:l.colors.textMuted,pt:.5},children:"\uBE44\uC5B4 \uC788\uC74C"}):r.map(t=>mu(_o,{sx:{display:"flex",alignItems:"center",gap:.75},children:[ko(bn,{src:d?.get(t)??"",name:t,avatarSx:{width:26,height:26,fontSize:12},iconFontSize:16}),ko(_o,{sx:{fontSize:14.5,color:l.colors.textPrimary},children:t})]},`${s.label}-${t}`))})]},s.label)}),ko(_o,{sx:{display:"flex",justifyContent:"flex-end",pt:.5},children:ko(ww,{size:"small",color:"inherit",onClick:b,children:"\uB2EB\uAE30"})})]}):null})}import{jsx as _r,jsxs as Zn}from"react/jsx-runtime";var Mw=["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"];function Ah(e){let d=e?.parentElement??null;for(;d;){let b=window.getComputedStyle(d);if(/(auto|scroll)/.test(b.overflowY)&&d.scrollHeight>d.clientHeight)return d;d=d.parentElement}return null}var Rw="(min-width:600px)";function yu(e){let d=new Date(e);return d.setHours(0,0,0,0),d.setDate(1),d}function Dh(e){let d=b=>String(b).padStart(2,"0");return`${e.getFullYear()}-${d(e.getMonth()+1)}-${d(e.getDate())}`}function Ph({tasks:e,googleEvents:d=[],statusOptions:b,todayStr:l,onOpenDetail:o,onAddSchedule:s,myAccountSeq:r=0,avatarSrcByName:t,fallbackToStartDate:n=!1}){let c=at(),i=Tw(Rw),[a,h]=bu(()=>yu(new Date)),[f,u]=bu(!1),g=qs(()=>{let T=new Date(a.getFullYear(),a.getMonth()+1,0).getDate();return Array.from({length:T},(D,p)=>{let y=new Date(a.getFullYear(),a.getMonth(),p+1);return{ymd:Dh(y),dayNumber:p+1,weekday:y.getDay()}})},[a]),m=qs(()=>{let T=new Map;for(let D of e){let p=D.due_date.slice(0,10)||(n?D.start_date.slice(0,10)||String(D.created_time??"").slice(0,10):"");if(!p)continue;let y=T.get(p);y?y.push(D):T.set(p,[D])}for(let D of T.values())D.sort(Wi);return T},[e,n]),v=qs(()=>n?e.filter(T=>!T.due_date.slice(0,10)&&!T.start_date.slice(0,10)&&!String(T.created_time??"").slice(0,10)).sort((T,D)=>T.completed!==D.completed?T.completed?1:-1:T.seq-D.seq):[],[e,n]),[k,B]=bu(null),R=qs(()=>$i(d),[d]),L=qs(()=>[a.getFullYear()],[a]),A=Hn(L),P=gu(null),N=l.slice(0,7)===Dh(a).slice(0,7);kw(()=>{if(!N)return;let T=()=>{let y=P.current,x=Ah(y);if(!x||!y)return;let w=y.getBoundingClientRect().top-x.getBoundingClientRect().top+x.scrollTop;x.scrollTop=Math.max(0,w-x.clientHeight/2+y.clientHeight/2)},D=setTimeout(T,100),p=setTimeout(T,400);return()=>{clearTimeout(D),clearTimeout(p)}},[N,a]);let q=gu(null),j=gu(null),S=T=>{h(p=>new Date(p.getFullYear(),p.getMonth()+T,1));let D=Ah(q.current);D&&D.scrollTo({top:0,behavior:"auto"})};return Zn(Or,{ref:q,onTouchStart:T=>{let D=T.touches[0];j.current=D?{x:D.clientX,y:D.clientY}:null},onTouchEnd:T=>{let D=j.current;j.current=null;let p=T.changedTouches[0];if(!D||!p)return;let y=p.clientX-D.x,x=p.clientY-D.y;Math.abs(y)<60||Math.abs(y)<=Math.abs(x)||S(y<0?1:-1)},sx:{minWidth:0,maxWidth:"100%",overflow:"hidden",bgcolor:c.colors.surface},children:[Zn(Or,{sx:{display:"flex",alignItems:"center",gap:.5,px:1.5,py:1,flexShrink:0},children:[_r(Oh,{size:"small","aria-label":"\uC774\uC804 \uB2EC",onClick:()=>S(-1),children:_r(Cw,{sx:{fontSize:24,color:c.colors.textSecondary}})}),_r(Sw,{size:"small",color:"inherit",onClick:()=>h(yu(new Date)),sx:{minWidth:0,px:1,fontSize:15.5,color:c.mode==="dark"?c.colors.textStrong:c.colors.textPrimary},children:"\uC624\uB298"}),_r(Oh,{size:"small","aria-label":"\uB2E4\uC74C \uB2EC",onClick:()=>S(1),children:_r(Bw,{sx:{fontSize:24,color:c.colors.textSecondary}})}),Zn(Or,{onClick:()=>u(!0),sx:{ml:"auto",pr:.5,display:"flex",alignItems:"center",gap:.25,fontSize:16.5,fontWeight:c.mode==="dark"?400:700,color:c.mode==="dark"?c.colors.textStrong:c.colors.textPrimary,cursor:"pointer"},children:[a.getFullYear(),"\uB144 ",a.getMonth()+1,"\uC6D4",_r(Iw,{sx:{fontSize:20,color:c.colors.textMuted}})]})]}),Zn(Or,{sx:{minWidth:0,overflowX:"hidden",borderTop:`1px solid ${c.calendar.borderColor}`},children:[v.length>0?Zn(Or,{sx:{display:"flex",alignItems:"center",gap:1,px:1,py:.75,minWidth:0,maxWidth:"100%",flexShrink:0,borderBottom:`1px solid ${c.calendar.borderColor}`},children:[Zn(Or,{sx:{width:52,flexShrink:0,fontSize:12.5,lineHeight:1.3,color:c.colors.textSecondary,textAlign:"center"},children:["\uB0A0\uC9DC",_r("br",{}),"\uC5C6\uC74C"]}),_r(Or,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",gap:.5},children:v.map(T=>_r(Ko,{task:T,statusOptions:b,onOpenDetail:o,isMine:r>0&&Number(T.manager_account_seq??0)===r,avatarSrcByName:t,showManagerAvatar:!0,onOpenMembers:B},T.seq))})]}):null,g.map(({ymd:T,dayNumber:D,weekday:p})=>{let y=A.get(T)??"",x=T===l,w=!!y||p===0,_=m.get(T)??[],C=R.get(T)??[],O=_.length>0||C.length>0;return Zn(Or,{ref:x?P:void 0,onClick:s?()=>s(T):void 0,sx:{display:"flex",alignItems:"center",gap:1,px:1,minWidth:0,maxWidth:"100%",py:O?.75:.5,minHeight:44,flexShrink:0,borderBottom:`1px solid ${c.calendar.borderColor}`,...s?{cursor:"pointer"}:{}},children:[_r(Or,{sx:{width:52,flexShrink:0,display:"flex",flexDirection:"column",alignItems:"center",gap:.25},children:Zn(Or,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:.25,"@media (min-width:600px)":{flexDirection:"row",gap:.75}},children:[_r(Or,{component:"span",sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:40,height:32,borderRadius:1,px:1.25,fontSize:22,fontWeight:500,color:x?c.colors.surface:w?c.colors.danger:p===6?c.colors.accentOnSurface:c.colors.textPrimary,bgcolor:x?c.colors.accentOnSurface:"transparent"},children:D}),_r(Or,{component:"span",sx:{fontSize:13,color:w?c.colors.danger:p===6?c.colors.accentOnSurface:c.colors.textSecondary},children:Mw[p]})]})}),Zn(Or,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",gap:.5},children:[C.map(z=>_r(Ui,{event:z},z.uid)),_.map(z=>{let $=Hi(z),V=_r(Ko,{task:z,statusOptions:b,onOpenDetail:o,isMine:r>0&&Number(z.manager_account_seq??0)===r,avatarSrcByName:t,showManagerAvatar:!0,onOpenMembers:B,showTime:!i,wrapTitle:!0},z.seq);return i?Zn(Or,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[_r(Or,{component:"span",sx:{width:44,flexShrink:0,textAlign:"right",fontSize:13.5,fontWeight:400,opacity:1,color:$?z.completed?c.colors.textPrimary:c.colors.danger:"transparent"},children:$||"00:00"}),_r(Or,{sx:{flex:1,minWidth:0},children:V})]},z.seq):V})]})]},T)})]}),_r(Rh,{task:k,avatarSrcByName:t,onClose:()=>B(null)}),_r(Ew,{open:f,centered:!0,monthOnly:!0,onClose:()=>u(!1),selectedDate:a,onDateChange:T=>{h(yu(T)),u(!1)}})]})}import{useCallback as Nh,useEffect as Lh,useMemo as xu,useRef as gl,useState as $s}from"react";import{Box as ar,Tooltip as Fh}from"@mui/material";import Ow from"@ehfuse/overlay-scrollbar";import Aw from"@mui/icons-material/CheckCircle";import Dw from"@mui/icons-material/RadioButtonUnchecked";import{DndContext as Pw,PointerSensor as Nw,closestCenter as Lw,useSensor as zw,useSensors as jw}from"@dnd-kit/core";import{SortableContext as Fw,arrayMove as qw,useSortable as $w,verticalListSortingStrategy as Hw}from"@dnd-kit/sortable";import Ww from"@mui/icons-material/DragIndicator";import{jsx as Gt,jsxs as So}from"react/jsx-runtime";var vu=36,Uw=48,zh=40,Vw=24,Kw=4,Gw=14,jh=36,Yw=12.5,Ki=220,Xw={high:{bg:"#f6c6c9",border:"#e5484d"},medium:{bg:"#c5d8f6",border:"#2f80ed"},low:{bg:"#f3e3b6",border:"#d9a514"}};function hi(e){let d=String(e??"").trim();if(!d)return null;let b=new Date(`${d}T00:00:00`);return Number.isNaN(b.getTime())?null:b}function ml(e,d){let b=new Date(e);return b.setDate(b.getDate()+d),b}function wu(e,d){return Math.round((d.getTime()-e.getTime())/864e5)}function Zw({task:e,dragHandle:d,onPointerDown:b,onClick:l}){let o=at(),s=gl(null),[r,t]=$s("");return Gt(Fh,{title:r,arrow:!0,enterDelay:300,children:So(ar,{onPointerDown:b,onClick:n=>l(e,n),onMouseEnter:()=>{let n=s.current;t(n&&n.scrollWidth>n.clientWidth?e.title:"")},sx:{width:Ki,flexShrink:0,position:"sticky",left:0,zIndex:2,bgcolor:o.timeline.bg,borderRight:`1px solid ${o.timeline.gridColor}`,display:"flex",alignItems:"center",gap:.5,pl:.5,pr:1.5,fontSize:15,fontWeight:o.mode==="dark"||e.completed?400:500,color:e.completed?o.colors.textMuted:o.mode==="dark"?o.colors.textStrong:o.colors.textPrimary,overflow:"hidden",whiteSpace:"nowrap",cursor:"pointer",textDecoration:e.completed?"line-through":"none","&:hover":{bgcolor:o.colors.surfaceHover}},children:[d,Gt(ar,{ref:s,component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.title})]})})}function Jw({id:e,showIndicator:d,children:b}){let l=at(),{attributes:o,listeners:s,setNodeRef:r}=$w({id:e});return So(ar,{ref:r,sx:{position:"relative"},children:[d?Gt(ar,{sx:{position:"absolute",top:-1,left:0,right:0,height:2,bgcolor:l.colors.accentOnSurface,zIndex:5}}):null,b({...o,...s})]})}function qh({tasks:e,hideCompletedChecklist:d=!1,todayStr:b,onOpenDetail:l,onToggleChecklist:o,onReorderTasks:s,onTaskContextMenu:r}){let t=at(),[n,c]=$s(null),i=xu(()=>[...e].sort((x,w)=>{let _=(x.timeline_sort_no??0)>0,C=(w.timeline_sort_no??0)>0;if(_&&C)return(x.timeline_sort_no??0)-(w.timeline_sort_no??0);if(_!==C)return _?-1:1;let O=x.due_date||x.start_date,z=w.due_date||w.start_date;return O!==z?O<z?-1:1:x.seq-w.seq}),[e]),[a,h]=$s(null),[f,u]=$s(null),g=jw(zw(Nw,{activationConstraint:{distance:4}})),m=Nh(x=>{h(x.over?Number(x.over.id):null)},[]),v=Nh(x=>{h(null),u(null);let{active:w,over:_}=x;if(!_||w.id===_.id)return;let C=i.map($=>$.seq),O=C.indexOf(Number(w.id)),z=C.indexOf(Number(_.id));O===-1||z===-1||s(qw(C,O,z))},[i,s]),k=xu(()=>{let x=hi(b)??new Date,w=x,_=ml(x,21);for(let z of i){let $=hi(z.start_date)??hi(z.due_date),V=hi(z.due_date)??$;$&&$<w&&(w=$),V&&V>_&&(_=V)}let C=ml(w,-3),O=wu(C,ml(_,3))+1;return Array.from({length:O},(z,$)=>ml(C,$))},[i,b]),B=k[0],R=k.findIndex(x=>vr(x)===b),{dayWidths:L,dayOffsets:A,gridWidth:P}=xu(()=>{let x=k.map((C,O)=>C.getDate()===1||O===0?Uw:vu),w=[],_=0;for(let C of x)w.push(_),_+=C;return{dayWidths:x,dayOffsets:w,gridWidth:_}},[k]),N=Ki+P,q=gl(null),j=x=>{q.current={x:x.clientX,y:x.clientY}},S=(x,w)=>{let _=q.current;q.current=null,!(_&&(Math.abs(w.clientX-_.x)>5||Math.abs(w.clientY-_.y)>5))&&l(x)},T=gl(null),[D,p]=$s(!1);Lh(()=>{let x=T.current?.getScrollContainer();if(!x)return;let w=()=>p(x.scrollHeight>x.clientHeight);w();let _=new ResizeObserver(w);return _.observe(x),()=>_.disconnect()},[i.length]);let y=gl(!1);return Lh(()=>{if(i.length===0||y.current)return;y.current=!0;let x=window.requestAnimationFrame(()=>{let w=T.current?.getScrollContainer();!w||R<0||(w.scrollLeft=Math.max(0,A[R]-vu*3))});return()=>window.cancelAnimationFrame(x)},[i.length]),So(ar,{sx:{flex:1,minHeight:0,minWidth:0,maxWidth:"100%",display:"flex",flexDirection:"column",border:`1px solid ${t.timeline.gridColor}`,borderRadius:"0 0 4px 4px",overflow:"hidden",bgcolor:t.timeline.headerBg},children:[Gt(ar,{sx:{flex:1,minHeight:0,minWidth:0,contain:"inline-size"},children:Gt(Ow,{ref:T,style:{height:"100%"},contentStyle:{width:"max-content",minWidth:"100%"},thumb:{width:8},showHorizontalScrollbar:!0,dragScroll:{excludeClasses:["taskbox-timeline-handle"]},children:So(ar,{sx:{width:N,position:"relative",bgcolor:t.timeline.bg},children:[So(ar,{sx:{display:"flex",position:"sticky",top:0,zIndex:3,bgcolor:t.timeline.headerBg,borderBottom:`1px solid ${t.timeline.gridColor}`},children:[Gt(ar,{sx:{width:Ki,height:jh,flexShrink:0,position:"sticky",left:0,zIndex:4,bgcolor:t.timeline.headerBg,borderRight:`1px solid ${t.timeline.gridColor}`,display:"flex",alignItems:"center",px:1.5,fontSize:13,color:t.colors.textSecondary},children:"\uC81C\uBAA9"}),k.map((x,w)=>{let _=x.getDay(),C=w===R,O=x.getDate()===1||w===0;return Gt(ar,{sx:{width:L[w],height:jh,flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",fontSize:Yw,fontWeight:C&&t.mode!=="dark"?700:400,color:C?t.timeline.bg:_===0?t.colors.danger:_===6?t.colors.accentOnSurface:t.colors.textSecondary,bgcolor:C?t.colors.danger:"transparent",borderRight:`1px solid ${t.timeline.gridColor}`,whiteSpace:"nowrap"},children:O?`${x.getMonth()+1}/${x.getDate()}`:x.getDate()},vr(x))})]}),Gt(Pw,{sensors:g,collisionDetection:Lw,onDragStart:x=>u(Number(x.active.id)),onDragOver:m,onDragEnd:v,onDragCancel:()=>{h(null),u(null)},children:Gt(Fw,{items:i.map(x=>String(x.seq)),strategy:Hw,children:So(ar,{sx:{position:"relative"},children:[k.map((x,w)=>{let _=x.getDay(),C=w===R;return!C&&_!==0&&_!==6?null:Gt(ar,{sx:{position:"absolute",top:0,bottom:0,left:Ki+A[w],width:L[w],bgcolor:C?"rgba(229,72,77,0.07)":t.colors.surfaceSubtle,zIndex:0}},`stripe-${vr(x)}`)}),i.map((x,w)=>{let _=hi(x.start_date)??hi(x.due_date),C=hi(x.due_date)??_,O=_?Math.min(k.length-1,Math.max(0,wu(B,_))):0,z=C?Math.min(k.length-1,Math.max(O,wu(B,C))):O,$=Xw[x.priority],V=Ki+A[O]+2,M=A[z]+L[z]-A[O]-4,H=(x.checklist??[]).map((I,E)=>({entry:I,index:E})).filter(({entry:I})=>!d||!I.checked);return Gt(Jw,{id:String(x.seq),showIndicator:a===x.seq&&f!==x.seq,children:I=>So(ar,{sx:{borderBottom:w===i.length-1&&D?"none":`1px solid ${t.timeline.gridColor}`,position:"relative",zIndex:1,opacity:f===x.seq?.45:1},children:[So(ar,{onContextMenu:E=>r(x,E),sx:{display:"flex",height:zh,position:"relative","&:hover":{bgcolor:"rgba(47,128,237,0.04)"}},children:[Gt(Zw,{task:x,dragHandle:Gt(ar,{component:"span",className:"taskbox-timeline-handle",...I,onClick:E=>E.stopPropagation(),sx:{display:"inline-flex",alignItems:"center",flexShrink:0,color:t.colors.accentOnSurface,cursor:"grab",touchAction:"none","&:hover":{color:t.colors.accentOnSurface}},children:(()=>{let E=(x.is_notice||x.is_event?Tt(x.icon||(x.is_notice?ir:cr)):null)??Ww;return Gt(E,{sx:{fontSize:17}})})()}),onPointerDown:j,onClick:S}),Gt(Fh,{title:`${x.title} (${x.start_date||"?"} ~ ${x.due_date||"?"})`,arrow:!0,enterDelay:300,children:Gt(ar,{onPointerDown:j,onClick:E=>S(x,E),sx:{position:"absolute",top:(zh-20)/2,left:V,width:Math.max(vu-4,M),height:20,borderRadius:1,bgcolor:$.bg,border:`1px solid ${$.border}`,opacity:x.completed?.45:1,cursor:"pointer","&:hover":{filter:"brightness(0.95)"}}})})]}),H.map(({entry:E,index:F},U)=>Gt(ar,{sx:{display:"flex",height:Vw,position:"relative",mt:U===0?`${Kw}px`:0,mb:U===H.length-1?`${Gw}px`:0},children:Gt(ar,{sx:{width:Ki,flexShrink:0,position:"sticky",left:0,zIndex:2,bgcolor:t.timeline.bg,borderRight:`1px solid ${t.timeline.gridColor}`,display:"flex",alignItems:"center",pl:4.25,pr:1.5,fontSize:13,color:E.checked?t.colors.textMuted:t.colors.textPrimary},children:So(ar,{onClick:Y=>c({anchorEl:Y.currentTarget,taskSeq:x.seq,index:F,checked:!E.checked}),sx:{display:"inline-flex",alignItems:"center",gap:.75,minWidth:0,cursor:"pointer"},children:[E.checked?Gt(Aw,{sx:{fontSize:17,color:t.colors.accentOnSurface,flexShrink:0}}):Gt(Dw,{sx:{fontSize:17,color:t.colors.textMuted,flexShrink:0}}),Gt(ar,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",textDecoration:E.checked?"line-through":"none"},children:E.label})]})})},`${x.seq}-check-${F}`))]})},x.seq)}),i.length===0?Gt(ar,{sx:{py:8,textAlign:"center",color:t.colors.textMuted,fontSize:14},children:"\uD45C\uC2DC\uD560 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):null]})})})]})})}),Gt(kt,{open:!!n,anchorEl:n?.anchorEl??null,title:n?.checked?"\uC774 \uD560\uC77C\uC744 \uC644\uB8CC \uCC98\uB9AC\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?":"\uC644\uB8CC\uB97C \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:n?.checked?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>c(null),onConfirm:()=>{n&&o(n.taskSeq,n.index,n.checked),c(null)}})]})}import{jsx as pi}from"react/jsx-runtime";function eD(e){switch(e.view){case"card":case"kanban":{let{view:d,...b}=e;return pi(su,{...b,columnAxis:d==="kanban"?"status":"project"})}case"sprint":{let{view:d,...b}=e;return pi(su,{...b,columnAxis:"sprint"})}case"calendar":{let{view:d,...b}=e;return pi(Th,{...b})}case"month":{let{view:d,...b}=e;return pi(Mh,{...b})}case"agenda":{let{view:d,...b}=e;return pi(Ph,{...b})}case"timeline":{let{view:d,...b}=e;return pi(qh,{...b})}default:{let{view:d,...b}=e;return pi(eh,{...b})}}}var tD=["list","card","kanban","calendar","month","timeline"];import{Box as fn}from"@mui/material";import{Fragment as Qw,jsx as mi,jsxs as Jn}from"react/jsx-runtime";function $h(e,d){if(!/^\d{4}-\d{2}-\d{2}$/.test(e)||!/^\d{4}-\d{2}-\d{2}$/.test(d))return null;let b=new Date(`${e}T00:00:00`),l=new Date(`${d}T00:00:00`);return Math.round((b.getTime()-l.getTime())/864e5)}function Hh({tasks:e,todayStr:d,showProgress:b=!0,dday:l=null,workdaysLeft:o=null,showPoints:s=!0,showHours:r=!0,showOverdue:t=!0,showInfo:n=!0,inline:c=!1}){let i=at(),a=e.filter(P=>!P.archived),h=a.filter(P=>P.completed).length,f=a.length>0?Math.round(h/a.length*100):0,u=a.filter(P=>!P.completed&&!P.is_event&&!!P.due_date&&P.due_date.slice(0,10)<d).length,g=a.reduce((P,N)=>N.completed?P:P+(N.story_points??0),0),m=b?mi(fn,{sx:{flex:c?"0 0 110px":"1 1 auto",minWidth:0,height:i.summary.gaugeHeight,borderRadius:3,bgcolor:i.summary.gaugeTrackColor},children:mi(fn,{sx:{height:"100%",borderRadius:3,width:`${f}%`,bgcolor:f>=100?i.summary.gaugeCompleteColor:i.summary.gaugeBarColor,transition:"width 0.2s"}})}):null,v=b?Jn(fn,{component:"span",sx:{flexShrink:0,fontSize:c?14:13,color:i.summary.textColor},children:[f,"%"]}):null,k={color:i.summary.numberColor,fontWeight:700,fontSize:c?15:14},B=a.length-h,R=Jn(Qw,{children:[c?null:Jn("span",{children:["\uB0A8\uC740 ",mi(fn,{component:"span",sx:k,children:B}),"\uAC74"]}),t&&u>0?Jn(fn,{component:"span",sx:{color:i.summary.overdueColor,fontWeight:600},children:["\uC9C0\uC5F0"," ",mi(fn,{component:"span",sx:{fontWeight:700,fontSize:c?15:14},children:u}),"\uAC74"]}):null,s&&g>0?Jn("span",{children:[mi(fn,{component:"span",sx:k,children:g}),"SP"]}):null]}),L=typeof o=="number"&&Number.isFinite(o)?Jn("span",{children:["\uADFC\uBB34\uC77C ",mi(fn,{component:"span",sx:k,children:o}),"\uC77C"]}):null,A=typeof l=="number"&&Number.isFinite(l)?mi(fn,{component:"span",sx:{ml:c?0:"auto",flexShrink:0,px:.6,py:.1,borderRadius:.5,fontSize:12,fontWeight:600,bgcolor:i.summary.overdueColor,color:i.colors.textInverse,lineHeight:1.6},children:l===0?"D-day":l>0?`D-${l}`:`D+${-l}`}):null;return c?Jn(fn,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0,fontSize:14.5,color:i.summary.textColor,whiteSpace:"nowrap",...i.summary.sx},children:[n?R:null,n?L:null,n?A:null,m,v]}):Jn(fn,{sx:{display:"flex",flexDirection:"column",gap:.5},children:[b?Jn(fn,{sx:{display:"flex",alignItems:"center",gap:1},children:[m,v]}):null,Jn(fn,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,fontSize:13.5,color:i.summary.textColor},children:[R,L,A]})]})}import{useMemo as t_}from"react";function e_(e){let d=String(e??"").trim();if(!d)return 0;let b=0,l=!1;for(let o of d.matchAll(/(\d+(?:\.\d+)?)\s*(h|시간|m|분|d|일)/gi)){let s=parseFloat(o[1]),r=o[2].toLowerCase();l=!0,r==="m"||r==="\uBD84"?b+=s/60:r==="d"||r==="\uC77C"?b+=s*8:b+=s}if(!l){let o=parseFloat(d);Number.isFinite(o)&&(b+=o)}return b}function lD(e){let d=Math.round(e*10)/10;return`${d%1===0?d.toFixed(0):d.toFixed(1)}\uC2DC\uAC04`}function Wh(e,d,b){if(!/^\d{4}-\d{2}-\d{2}$/.test(e)||!/^\d{4}-\d{2}-\d{2}$/.test(d))return 0;let l=new Date(`${e}T00:00:00`),o=new Date(`${d}T00:00:00`);if(o<l||o.getTime()-l.getTime()>3660*864e5)return 0;let s=0;for(let r=new Date(l);r<=o;r.setDate(r.getDate()+1)){let t=r.getDay();if(t===0||t===6)continue;let n=`${r.getFullYear()}-${String(r.getMonth()+1).padStart(2,"0")}-${String(r.getDate()).padStart(2,"0")}`;b.has(n)||(s+=1)}return s}function cD(e){return e.reduce((d,b)=>b.completed?d:d+e_(b.estimated_time),0)}import{jsx as r_}from"react/jsx-runtime";function mD({sprint:e,tasks:d,todayStr:b,...l}){let o=e.status==="closed"?null:$h(e.end_date,b),s=o!==null&&o>=0,r=t_(()=>{if(!s)return[];let c=Number(b.slice(0,4)),i=Number(e.end_date.slice(0,4))||c,a=[];for(let h=c;h<=Math.max(c,i);h+=1)a.push(h);return a},[s,b,e.end_date]),t=Hn(r),n=s?Wh(b,e.end_date,new Set(t.keys())):null;return r_(Hh,{tasks:d,todayStr:b,dday:o,workdaysLeft:n,...l})}import{useEffect as d_,useRef as h_,useState as p_}from"react";import{Box as ku}from"@mui/material";import{Children as n_}from"react";import{Box as _u,CircularProgress as o_}from"@mui/material";import{jsx as bl}from"react/jsx-runtime";var Uh={xs:2,md:3};function Vh(){return bl(_u,{sx:{position:"fixed",top:"calc(50% + 30px)",left:"50%",transform:"translate(-50%, -50%)",zIndex:1},children:bl(o_,{size:44,thickness:4,sx:{color:"#94a3b8"}})})}function Kh({children:e}){return bl(_u,{sx:{minWidth:0,display:"flex",flexDirection:"column",gap:Uh,pb:Uh},children:n_.map(e,d=>d==null||d===!1?null:bl(_u,{sx:{bgcolor:"background.paper",borderRadius:"12px",boxShadow:"0 1px 3px rgba(15,23,42,0.08)",minWidth:0},children:d}))})}import{Box as Co,Button as l_,Checkbox as c_,Typography as Go}from"@mui/material";import Yh from"@mui/icons-material/CheckCircle";import u_ from"@mui/icons-material/CheckCircleOutlineOutlined";import{Fragment as a_,jsx as Gh}from"react/jsx-runtime";var i_="taskbox-search-highlight";function s_(e,d){let b=d?.keyPrefix??"hl";return e.map((l,o)=>Gh("span",{className:l.highlight?d?.highlightClassName??i_:d?.className,style:l.highlight?{fontWeight:700,color:"#2563eb"}:void 0,children:l.text},`${b}-${l.text}-${o}`))}function yl({text:e,keyword:d,fallback:b="-",className:l,highlightClassName:o,keyPrefix:s}){let r=String(e??"").trim()||b,t=Za(r,d);return Gh(a_,{children:s_(t,{className:l,highlightClassName:o,keyPrefix:s})})}import{jsx as Ct,jsxs as Gi}from"react/jsx-runtime";var f_={flexShrink:0,minWidth:64,textAlign:"center",px:.75,py:.35,borderRadius:.75,bgcolor:"#f1f5f9",color:"#64748b",fontSize:Ir(12.5),fontWeight:500,lineHeight:1.4},To={fontSize:Ir(14.5),color:"#374151",minWidth:0,lineHeight:1.45};function Qn({label:e,children:d}){return Gi(Co,{sx:{display:"flex",alignItems:"flex-start",gap:1,minWidth:0},children:[Ct(Co,{sx:f_,children:e}),Ct(Co,{sx:{...To,flex:1,pt:.2},children:d})]})}function Xh({task:e,statusOptions:d,projectLabel:b,searchText:l,todayStr:o,dimCompleted:s=!0,onRequestToggleCompleted:r,onOpenDetail:t,onTaskContextMenu:n,targetSummary:c="",ackInfo:i,completeLocked:a=!1,unread:h=!1,noticeReadOnly:f=!1,onAckConfirm:u,onAckListClick:g,myManaged:m=!1}){let v=e.is_event?Ms(e):ur(e),k=String(e.due_date??"").slice(11,16),B=e.is_event?String(e.event_time??"").trim():/^\d{2}:\d{2}$/.test(k)?k:String(e.estimated_time??"").trim(),R=yn(e.start_date),L=yn(e.due_date),A=R&&B&&!L?`${R} ${B}`:R,P=L&&B?`${L} ${B}`:L,N=!e.is_notice&&!e.is_event&&!String(e.due_date??"").trim(),q=!e.is_notice&&!e.completed&&!!e.due_date&&e.due_date<o,j=(e.receiver_names??[]).filter(Boolean);return Gi(Co,{role:"button",tabIndex:0,onClick:()=>t(e),onKeyDown:S=>{(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),t(e))},onContextMenu:S=>n(e,S),sx:{display:"flex",flexDirection:"column",gap:.75,minWidth:0,p:1.25,cursor:"pointer",opacity:N?.6:1,position:"relative"},children:[m?Ct(Co,{sx:{position:"absolute",left:3,top:5,bottom:5,width:3,borderRadius:"999px",bgcolor:"#2f80ed"}}):null,Gi(Co,{sx:{display:"flex",alignItems:"flex-start",gap:.75,minWidth:0,mb:1},children:[e.is_event?(()=>{let S=Tt(e.icon||cr);return S?Ct(S,{sx:{fontSize:21,flexShrink:0,mt:.2,color:e.icon_color||"#1e3a8a"}}):null})():!f&&!a?Ct(c_,{checked:e.completed,icon:Ct(u_,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:Ct(Yh,{sx:{fontSize:22,color:"#2f80ed"}}),onClick:S=>S.stopPropagation(),onChange:(S,T)=>r({anchorEl:S.currentTarget,taskSeq:e.seq,nextCompleted:T}),sx:{p:0,mt:.1,flexShrink:0}}):null,(()=>{if(!e.is_notice)return null;let S=Tt(e.icon||ir);return S?Ct(S,{sx:{fontSize:19,flexShrink:0,mt:"1px",color:e.icon_color||"#e5484d"}}):null})(),Ct(Go,{sx:{fontSize:Ir(16),fontWeight:600,lineHeight:1.35,minWidth:0,flex:1,color:e.completed&&s?"#9a9a97":N?"#5f5e5b":"#111827",textDecoration:e.completed&&s?"line-through":"none"},children:Ct(yl,{text:e.title,keyword:l})}),h&&!e.completed?Ct(Co,{component:"span",sx:{flexShrink:0,px:.55,fontSize:Ir(10.5),fontWeight:700,lineHeight:1.6,color:"#fff",bgcolor:"#e5484d",borderRadius:"4px"},children:"N"}):null]}),Gi(Co,{sx:{display:"flex",flexDirection:"column",gap:.6,minWidth:0},children:[Ct(Qn,{label:v?"\uC0C1\uD0DC":"\uC911\uC694\uB3C4",children:Gi(Co,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1.25},children:[v?Ct(At,{option:v,small:!0}):null,Ct(Fr,{priority:e.priority,small:!0})]})}),(e.label_keys??[]).length>0?Ct(Qn,{label:"\uB77C\uBCA8",children:Ct(qo,{labelKeys:e.label_keys,labelOptions:d})}):null,b?Ct(Qn,{label:"\uD504\uB85C\uC81D\uD2B8",children:Ct(Go,{sx:To,children:b})}):null,A?Ct(Qn,{label:"\uC2DC\uC791",children:Ct(Go,{sx:To,children:A})}):null,P?Ct(Qn,{label:"\uB9C8\uAC10",children:Gi(Go,{sx:{...To,color:q?"#e5484d":To.color,fontWeight:q?600:400},children:[P,q?" \xB7 \uC9C0\uC5F0":""]})}):null,e.is_notice?Ct(Qn,{label:"\uB300\uC0C1\uC790",children:Ct(Go,{sx:To,children:c||"\uBAA8\uB4E0 \uC9C1\uC6D0"})}):null,i?Ct(Qn,{label:"\uD655\uC778",children:Ct(l_,{size:"small",variant:i.canAck?"contained":"outlined",color:"inherit",startIcon:i.acked?Ct(Yh,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:S=>{S.stopPropagation(),i.canAck?u?.(e):g?.(e,S.currentTarget)},sx:{py:0,px:1.25,minWidth:0,fontSize:Ir(13),...i.canAck?{color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}}:{bgcolor:"#fff",borderColor:"#d5d8dc"}},children:i.canAck?"\uD655\uC778":`${i.count}/${i.total}`})}):null,!e.is_notice&&e.manager_name?Ct(Qn,{label:"\uCC45\uC784\uC790",children:Ct(Go,{sx:To,children:Ct(yl,{text:e.manager_name,keyword:l})})}):null,!e.is_notice&&j.length>0?Ct(Qn,{label:"\uCC38\uC870\uC790",children:Ct(Go,{sx:To,children:j.join(", ")})}):null,e.note?Ct(Qn,{label:"\uBE44\uACE0",children:Ct(Go,{sx:To,children:Ct(yl,{text:e.note,keyword:l})})}):null]})]})}import{jsx as Yi,jsxs as g_}from"react/jsx-runtime";function m_(e,d){if(e.completed||e.archived||d<=0)return;let b=Fi(e,d);if(b.canConfirm)return{count:b.count,total:b.total,acked:!1,canAck:!0,pendingNames:b.pendingNames}}function HD({tasks:e,statusOptions:d,customTabs:b,loading:l,dimCompleted:o=!0,searchText:s,todayStr:r,onToggleCompleted:t,onOpenDetail:n,onTaskContextMenu:c,getTargetSummary:i,getAckInfo:a,getNoticeReadOnly:h,isTaskUnread:f,getCompleteLocked:u,onAckConfirm:g,onAckListClick:m,onEndReached:v,myAccountSeq:k=0}){let B=new Map(b.map(P=>[P.key,P.label])),[R,L]=p_(null),A=h_(null);return d_(()=>{let P=A.current;if(!v||!P)return;let N=new IntersectionObserver(q=>{q[0]?.isIntersecting&&v()});return N.observe(P),()=>N.disconnect()},[v,e.length]),e.length===0?l?Yi(Vh,{}):Yi(ku,{sx:{py:6,textAlign:"center",color:"#94a3b8",fontSize:"0.9rem"},children:"\uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):g_(ku,{sx:{minWidth:0},children:[Yi(Kh,{children:e.map(P=>Yi(Xh,{dimCompleted:o,myManaged:k>0&&!P.is_notice&&!P.is_event&&(P.manager_account_seq??0)===k,task:P,statusOptions:d,projectLabel:P.tab_key?B.get(P.tab_key)??"":"",searchText:s,todayStr:r,onRequestToggleCompleted:L,onOpenDetail:n,onTaskContextMenu:c,targetSummary:P.is_notice?i?.(P):void 0,ackInfo:P.is_notice?a?.(P):m_(P,k),noticeReadOnly:P.is_notice?h?.(P):!1,unread:f?.(P)??!1,completeLocked:u?.(P)??!1,onAckConfirm:g,onAckListClick:m},P.seq))}),v?Yi(ku,{ref:A,sx:{height:"1px"}}):null,Yi(kt,{open:!!R,anchorEl:R?.anchorEl??null,title:R?.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:R?.nextCompleted?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>L(null),onConfirm:()=>{R&&t(R.taskSeq,R.nextCompleted),L(null)}})]})}import{useState as Hs}from"react";import{Box as tr,Checkbox as b_,Menu as y_,MenuItem as Zh,Tooltip as x_}from"@mui/material";import v_ from"@mui/icons-material/CheckCircle";import w_ from"@mui/icons-material/CheckCircleOutlineOutlined";import __ from"@mui/icons-material/NotesOutlined";import k_ from"@mui/icons-material/AutorenewOutlined";import S_ from"@mui/icons-material/CalendarTodayOutlined";import T_ from"@mui/icons-material/EventOutlined";import C_ from"@mui/icons-material/PersonOutlineOutlined";import B_ from"@mui/icons-material/PeopleAltOutlined";import I_ from"@mui/icons-material/StickyNote2Outlined";import{Fragment as R_,jsx as gt,jsxs as Yo}from"react/jsx-runtime";var Su={completed:{label:"\uC644\uB8CC",width:"44px",align:"center",icon:null},title:{label:"\uC81C\uBAA9",width:"1fr",align:"left",icon:gt(__,{sx:{fontSize:15}})},manager_name:{label:"\uCC45\uC784\uC790",width:"112px",align:"center",icon:gt(C_,{sx:{fontSize:15}})},receiver_names:{label:"\uCC38\uC870\uC790",width:"120px",align:"center",icon:gt(B_,{sx:{fontSize:15}})},status:{label:"\uC0C1\uD0DC",width:"104px",align:"center",icon:gt(k_,{sx:{fontSize:15}})},priority:{label:"\uC911\uC694\uB3C4",width:"88px",align:"center",icon:null},start_date:{label:"\uC2DC\uC791\uC77C\uC2DC",width:"110px",align:"center",icon:gt(S_,{sx:{fontSize:15}})},due_date:{label:"\uB9C8\uAC10\uC608\uC815",width:"110px",align:"center",icon:gt(T_,{sx:{fontSize:15}})},note:{label:"\uBE44\uACE0",width:"1fr",align:"left",icon:gt(I_,{sx:{fontSize:15}})}},E_=[{id:"completed"},{id:"title"},{id:"manager_name"},{id:"due_date"},{id:"status"}],M_=new Set(["manager_name","status","due_date"]);function Jh(e){let d=String(e??"").trim();return d?d.slice(2,10).replaceAll("-","."):""}function mP(e,d){return d>0?e.filter(b=>!b.is_notice&&!b.completed&&!b.archived&&En(b)==="group"&&Number(b.visibility_group_seq??0)===d).sort((b,l)=>{let o=String(b.due_date??"").trim(),s=String(l.due_date??"").trim();return o!==s?o?s?o.localeCompare(s):-1:1:Number(b.seq)-Number(l.seq)}):[]}function gP({tasks:e,columns:d=E_,loading:b=!1,emptyText:l="\uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",myAccountSeq:o=0,avatarSrcByName:s,managerCandidates:r=[],canAssignManager:t,onOpenDetail:n,onToggleCompleted:c,onChangeStatus:i,onChangeDueDate:a,onChangeReminder:h,onChangeManager:f,onClaimTask:u}){let g=at(),[m,v]=Hs(null),[k,B]=Hs(null),[R,L]=Hs(null),[A,P]=Hs(null),[N,q]=Hs(null),j=d.map(D=>D.width??Su[D.id].width).join(" "),S=(D,p)=>gt(bn,{src:s?.get(D)??"",name:D,avatarSx:{width:p,height:p,fontSize:Math.round(p/2),flexShrink:0,borderRadius:"50%"},iconFontSize:Math.round(p*.6)}),T=(D,p)=>{let x=Su[D.id].align==="center";switch(D.id){case"completed":if(p.is_event){let w=Tt(p.icon||cr);return gt(tr,{className:"cell",sx:{justifyContent:"center"},children:w?gt(w,{sx:{fontSize:19,color:p.icon_color||"#1e3a8a"}}):null},D.id)}return gt(tr,{className:"cell",sx:{justifyContent:"center",...c?{"&:hover":{bgcolor:g.table.cellHoverBg}}:{}},children:gt(x_,{title:p.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC",arrow:!0,enterDelay:300,disableInteractive:!0,children:gt(b_,{checked:!!p.completed,icon:gt(w_,{sx:{fontSize:20,color:"#9a9a97",opacity:.45}}),checkedIcon:gt(v_,{sx:{fontSize:20,color:"#2f80ed"}}),onChange:w=>P({anchorEl:w.currentTarget,task:p}),sx:{p:.5}})})},D.id);case"title":{let w=p.is_notice?Tt(p.icon||ir):null,_=p.icon_color||"#e5484d";return Yo(tr,{className:"cell",onClick:()=>n(p),sx:{gap:1,cursor:"pointer","&:hover":{bgcolor:g.table.cellHoverBg}},children:[w?gt(w,{sx:{fontSize:18,flexShrink:0,color:_}}):null,gt(tr,{component:"span",sx:{fontSize:14.5,fontWeight:g.table.rowTitleFontWeight,color:g.table.rowTitleColor,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:p.title||"(\uC81C\uBAA9 \uC5C6\uC74C)"})]},D.id)}case"manager_name":{let w=t?t(p):!1,_=o>0&&Number(p.manager_account_seq??0)===o;return w&&f?Yo(tr,{className:"cell",onClick:C=>L({anchorEl:C.currentTarget,task:p}),sx:{gap:.75,justifyContent:"center",cursor:"pointer","&:hover":{bgcolor:g.table.cellHoverBg}},children:[p.manager_name?S(p.manager_name,22):null,gt(tr,{component:"span",sx:{fontSize:14,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:p.manager_name||""})]},D.id):gt(tr,{className:"cell",sx:{gap:.75,justifyContent:"center"},children:p.manager_name?Yo(R_,{children:[S(p.manager_name,22),gt(tr,{component:"span",sx:{fontSize:14,fontWeight:_?600:400,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:p.manager_name})]}):u?gt($n,{onClick:C=>q({anchorEl:C.currentTarget,taskSeq:Number(p.seq)}),children:"\uAC00\uC838\uAC00\uAE30"}):null},D.id)}case"receiver_names":return gt(tr,{className:"cell",sx:{justifyContent:"center",fontSize:14,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:(p.receiver_names??[]).join(", ")},D.id);case"status":return gt(tr,{className:"cell",onClick:i?w=>v({anchorEl:w.currentTarget,task:p}):void 0,sx:{py:.5,justifyContent:"center",...i?{cursor:"pointer","&:hover":{bgcolor:g.table.cellHoverBg}}:{}},children:gt(At,{option:ur(p)})},D.id);case"priority":return gt(tr,{className:"cell",sx:{justifyContent:"center"},children:gt(Fr,{priority:p.priority,plain:!0})},D.id);case"start_date":return gt(tr,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap",fontSize:14},children:Jh(p.start_date)},D.id);case"due_date":return gt(tr,{className:"cell",onClick:a?w=>B({anchorEl:w.currentTarget,taskSeq:Number(p.seq),date:String(p.due_date??"").slice(0,10),reminders:Wn(p)}):void 0,sx:{justifyContent:"center",whiteSpace:"nowrap",fontSize:14,...a?{cursor:"pointer","&:hover":{bgcolor:g.table.cellHoverBg}}:{}},children:Jh(p.due_date)},D.id);case"note":return gt(tr,{className:"cell",sx:{justifyContent:x?"center":"flex-start",fontSize:14,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:p.note||""},D.id);default:return null}};return Yo(tr,{sx:{border:`1px solid ${g.table.borderColor}`,borderRadius:1,overflow:"hidden",bgcolor:g.table.bg,color:g.table.rowColor},children:[gt(tr,{sx:{display:"grid",gridTemplateColumns:j,borderBottom:`1px solid ${g.table.borderColor}`,bgcolor:g.table.headerBg,"& > *":{display:"flex",alignItems:"center",gap:.5,px:1,py:1,minWidth:0,fontSize:g.table.headerFontSize,whiteSpace:"nowrap",userSelect:"none",borderRight:`1px solid ${g.table.rowBorderColor}`},"& > *:first-of-type":{px:.5},"& > *:last-child":{borderRight:"none",pr:2}},children:d.map(D=>{let p=Su[D.id];return Yo(tr,{sx:{justifyContent:p.align==="center"?"center":"flex-start",color:M_.has(D.id)?g.table.headerActiveColor:g.table.headerColor},children:[p.icon,D.label??p.label]},D.id)})}),b?gt(tr,{sx:{py:3,textAlign:"center",color:g.table.emptyColor,fontSize:14},children:"\uBD88\uB7EC\uC624\uB294 \uC911\u2026"}):e.length===0?gt(tr,{sx:{py:3,textAlign:"center",color:g.table.emptyColor,fontSize:14},children:l}):e.map((D,p)=>gt(tr,{sx:{display:"grid",gridTemplateColumns:j,minHeight:44,fontSize:15,bgcolor:g.table.rowBg,borderTop:p===0?"none":`1px solid ${g.table.rowBorderColor}`,"&:hover":{bgcolor:g.table.rowHoverBg},"& > .cell":{px:1,minWidth:0,display:"flex",alignItems:"center",borderRight:`1px solid ${g.table.rowBorderColor}`},"& > .cell:first-of-type":{px:.5},"& > .cell:last-child":{borderRight:"none",pr:2}},children:d.map(y=>T(y,D))},D.seq)),gt(Ai,{anchorEl:m?.anchorEl??null,value:String(m?.task.status??""),options:m?Fa(m.task):void 0,onSelect:D=>{m&&i?.(Number(m.task.seq),D),v(null)},onComplete:c&&m&&!m.task.completed&&!m.task.is_notice&&!m.task.is_event&&!m.task.is_bug?()=>c(m.task,!0):void 0,onClose:()=>v(null)}),Yo(y_,{anchorEl:R?.anchorEl??null,open:!!R,onClose:()=>L(null),transitionDuration:0,children:[Yo(Zh,{onClick:()=>{R&&f?.(Number(R.task.seq),"",0),L(null)},sx:{fontSize:14,minWidth:170,gap:1,color:g.table.headerColor},children:[gt(tr,{sx:{width:24,flexShrink:0}}),"\uC9C0\uC815 \uC548 \uD568"]}),r.map(D=>Yo(Zh,{selected:Number(R?.task.manager_account_seq??0)===Number(D.account_seq??0),onClick:()=>{R&&f?.(Number(R.task.seq),D.name,Number(D.account_seq??0)),L(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[S(D.name,24),D.name,D.role_name?gt(tr,{component:"span",sx:{color:g.table.headerColor,fontSize:13},children:D.role_name}):null]},D.seq))]}),gt(xn,{anchorEl:k?.anchorEl??null,open:!!k,date:k?.date??"",reminders:k?.reminders??[],hideReminder:!h,onClose:()=>B(null),onDateChange:D=>{k&&(a?.(k.taskSeq,D),B(p=>p?{...p,date:D}:null))},onReminderChange:D=>{k&&(h?.(k.taskSeq,D),B(p=>p?{...p,reminders:D}:null))}}),gt(kt,{open:!!A,anchorEl:A?.anchorEl??null,title:A?.task.completed?"\uC644\uB8CC\uB97C \uD574\uC81C\uD560\uAE4C\uC694?":"\uC644\uB8CC \uCC98\uB9AC\uD560\uAE4C\uC694?",confirmText:A?.task.completed?"\uD574\uC81C":"\uC644\uB8CC",onCancel:()=>P(null),onConfirm:()=>{A&&c?.(A.task,!A.task.completed),P(null)}}),gt(kt,{open:!!N,anchorEl:N?.anchorEl??null,title:"\uC774 \uC5C5\uBB34\uB97C \uB9E1\uC744\uAE4C\uC694?",confirmText:"\uAC00\uC838\uAC00\uAE30",onCancel:()=>q(null),onConfirm:()=>{N&&u?.(N.taskSeq),q(null)}})]})}var Ws=[{value:"daily",label:"\uB9E4\uC77C"},{value:"weekly",label:"\uB9E4\uC8FC"},{value:"monthly",label:"\uB9E4\uC6D4"},{value:"yearly",label:"\uB9E4\uB144"}];function xl(e){return Ws.find(d=>d.value===e)?.label??"\uC5C6\uC74C"}function O_(e){if(!/^\d{4}-\d{2}-\d{2}$/.test(e))return null;let d=new Date(`${e}T00:00:00`);return Number.isNaN(d.getTime())?null:d}function vl(e,d){let b=O_(e);if(!b)return"";let l=new Date(b);d==="daily"?l.setMonth(l.getMonth()+1):d==="weekly"?l.setMonth(l.getMonth()+3):d==="monthly"?l.setFullYear(l.getFullYear()+1):l.setFullYear(l.getFullYear()+3);let o=s=>String(s).padStart(2,"0");return`${l.getFullYear()}-${o(l.getMonth()+1)}-${o(l.getDate())}`}function A_(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)}function Qh(e,d){let b=String(e??"").slice(0,10);if(!A_(b)||typeof d!="number"||!Number.isFinite(d))return"";let l=new Date(`${b}T12:00:00`);l.setDate(l.getDate()+Math.trunc(d));let o=l.getFullYear(),s=String(l.getMonth()+1).padStart(2,"0"),r=String(l.getDate()).padStart(2,"0");return`${o}-${s}-${r}`}function D_(e,d,b){return{title:String(e.title??"").trim(),content:String(e.content??""),start_date:Qh(d,e.start_offset_days),due_date:Qh(d,e.due_offset_days),priority:e.priority??"medium",label_keys:[...e.label_keys??[]],manager_account_seq:Number(e.manager_account_seq)||0,manager_name:String(e.manager_name??""),checklist:(e.checklist??[]).map(l=>String(l??"").trim()).filter(l=>l.length>0).map(l=>({label:l,checked:!1})),group_seq:b}}function ep(e,d){let b=Number(e.group_seq)||0;return(e.items??[]).map(l=>D_(l,d,b)).filter(l=>l.title.length>0)}function vP(e){return typeof e!="number"||!Number.isFinite(e)?"-":e===0?"\uAE30\uC900\uC77C":e>0?`\uAE30\uC900\uC77C +${Math.trunc(e)}\uC77C`:`\uAE30\uC900\uC77C ${Math.trunc(e)}\uC77C`}import{useEffect as a4,useRef as l4,useState as Dp}from"react";import{Box as Io,Button as Wu,ButtonBase as c4,Divider as Pp,Drawer as u4,IconButton as f4,Tooltip as d4}from"@mui/material";import h4 from"@mui/icons-material/Close";import p4 from"@ehfuse/overlay-scrollbar";import{FormDialog as m4}from"@ehfuse/mui-form-dialog";import{useState as Ys}from"react";import{Box as yi,ButtonBase as X5,Divider as Xs,Menu as qu,MenuItem as $u,Tooltip as Z5}from"@mui/material";import J5 from"@mui/icons-material/SubjectOutlined";import Q5 from"@mui/icons-material/StickyNote2Outlined";import e4 from"@mui/icons-material/LabelOutlined";import t4 from"@mui/icons-material/DirectionsRunOutlined";import Ep from"@mui/icons-material/LockOutlined";import Mp from"@mui/icons-material/PublicOutlined";import Rp from"@mui/icons-material/Group";import r4 from"@mui/icons-material/Repeat";import n4 from"@mui/icons-material/EventOutlined";import o4 from"@mui/icons-material/SpeedOutlined";import{TextField as i4}from"@ehfuse/mui-form-controls";import{InfoAlert as Op}from"@ehfuse/alerts";import{useState as gi}from"react";import{Box as kl,Divider as Q_,ListItemIcon as e3,Menu as Bu,MenuItem as Us}from"@mui/material";import t3 from"@mui/icons-material/Add";import _l from"@mui/icons-material/Check";import r3 from"@mui/icons-material/ViewKanbanOutlined";import n3 from"@mui/icons-material/CalendarTodayOutlined";import o3 from"@mui/icons-material/EventOutlined";import i3 from"@mui/icons-material/PersonOutlineOutlined";import ip from"@mui/icons-material/PeopleAltOutlined";import s3 from"@mui/icons-material/FlagOutlined";import a3 from"@mui/icons-material/TimerOutlined";import l3 from"@mui/icons-material/NotificationsNoneOutlined";import c3 from"@mui/icons-material/InboxOutlined";import u3 from"@mui/icons-material/PlaceOutlined";import f3 from"@mui/icons-material/MapOutlined";import{TimePicker as d3}from"@ehfuse/mui-datetime-picker";import{InfoAlert as h3}from"@ehfuse/alerts";var Dn="@media (max-width: 719.95px)";function eo(e){return{[Dn]:{order:e}}}import{useEffect as P_,useState as N_}from"react";import{Box as L_}from"@mui/material";import{jsx as z_}from"react/jsx-runtime";function Bo({value:e,placeholder:d,readOnly:b,onCommit:l}){let o=at(),[s,r]=N_(e);return P_(()=>r(e),[e]),z_(L_,{component:"input",spellCheck:!1,value:s,readOnly:b,placeholder:d,onChange:t=>r(t.target.value),onBlur:()=>{s.trim()!==e&&l(s.trim())},onKeyDown:t=>{t.key==="Enter"&&t.target.blur()},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:14,color:o.colors.textPrimary,caretColor:o.colors.textPrimary,bgcolor:"transparent",p:0,"&::placeholder":{color:"#9a9a97"}}})}import{Box as Tu}from"@mui/material";import{jsx as j_,jsxs as tp}from"react/jsx-runtime";function pt({icon:e,label:d,onClick:b,sx:l,children:o}){return tp(Tu,{sx:[{display:"flex",alignItems:"center",minHeight:32},...Array.isArray(l)?l:[l]],children:[tp(Tu,{sx:{display:"flex",alignItems:"center",gap:1,width:104,flexShrink:0,fontSize:13.5,color:"#787774"},children:[e,d]}),j_(Tu,{onClick:b?s=>b(s.currentTarget):void 0,sx:{flex:1,minWidth:0,display:"flex",alignItems:"center",gap:.5,px:1,py:.25,borderRadius:1,fontSize:14,cursor:b?"pointer":"default","&:hover":b?{bgcolor:"#f2f2f0"}:void 0,[Dn]:{py:.25}},children:o})]})}import p3 from"@mui/icons-material/StorefrontOutlined";import m3 from"@mui/icons-material/SupportAgentOutlined";import{Suspense as F_,lazy as q_,useEffect as $_,useState as rp}from"react";import{Box as Cu,Dialog as H_,DialogContent as W_,DialogTitle as U_,IconButton as np,Tooltip as V_}from"@mui/material";import K_ from"@mui/icons-material/Close";import G_ from"@mui/icons-material/Search";import{Fragment as J_,jsx as Pn,jsxs as wl}from"react/jsx-runtime";function Y_(e){return Pn(Cu,{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 X_=q_(()=>import("react-daum-postcode").then(e=>({default:e.default})).catch(()=>({default:Y_})));function Z_(e){if(e.addressType!=="R")return e.address;let d="";return e.bname!==""&&/[동|로|가]$/g.test(e.bname)&&(d+=e.bname),e.buildingName!==""&&e.apartment==="Y"&&(d+=d!==""?`, ${e.buildingName}`:e.buildingName),d!==""?`${e.address} (${d})`:e.address}function op({value:e,placeholder:d="\uC8FC\uC18C \uC785\uB825",readOnly:b,onCommit:l}){let[o,s]=rp(e),[r,t]=rp(!1),n=$t().slots?.addressSearch;$_(()=>s(e),[e]);let c=a=>{s(a),t(!1),a!==e&&l(a)};return wl(J_,{children:[wl(Cu,{sx:{display:"flex",alignItems:"center",gap:.5,flex:1,minWidth:0},children:[Pn(Cu,{component:"input",spellCheck:!1,value:o,readOnly:b,placeholder:d,onChange:a=>s(a.target.value),onBlur:()=>{r||o.trim()!==e&&l(o.trim())},onKeyDown:a=>{a.key==="Enter"&&(a.preventDefault(),!b&&t(!0))},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:14,color:"#37352f",bgcolor:"transparent",p:0,"&::placeholder":{color:"#9a9a97"}}}),b?null:Pn(V_,{title:"\uC8FC\uC18C \uAC80\uC0C9",arrow:!0,children:Pn(np,{tabIndex:-1,size:"small","aria-label":"\uC8FC\uC18C \uAC80\uC0C9",onClick:()=>t(!0),sx:{color:"#9a9a97",p:.25,flexShrink:0},children:Pn(G_,{sx:{fontSize:17}})})})]}),n?Pn(n,{open:r,onComplete:c,onClose:()=>t(!1)}):wl(H_,{open:r,onClose:()=>t(!1),maxWidth:"sm",fullWidth:!0,slotProps:{paper:{sx:{height:550}}},children:[wl(U_,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",pr:2},children:["\uC8FC\uC18C \uAC80\uC0C9",Pn(np,{"aria-label":"\uC8FC\uC18C \uAC80\uC0C9 \uB2EB\uAE30",onClick:()=>t(!1),size:"small",children:Pn(K_,{})})]}),Pn(W_,{style:{padding:0},dividers:!0,children:r?Pn(F_,{fallback:null,children:Pn(X_,{onComplete:a=>{c(Z_(a))},onClose:()=>t(!1),defaultQuery:o,style:{width:"100%",height:"100%"}})}):null})]})]})}import{Fragment as Vs,jsx as Qe,jsxs as dn}from"react/jsx-runtime";function sp(e){return String(e??"").includes(" ")?un(e):yn(e)}function g3(e){let[d="00",b="00"]=String(e??"").split(":");return{hour:/^\d{2}$/.test(d)?d:"00",minute:/^\d{2}$/.test(b)?b:"00"}}function Xo({label:e="\uBE44\uC5B4 \uC788\uC74C"}){return Qe(kl,{component:"span",sx:{color:"#9a9a97"},children:e})}var rr=e=>({gridColumn:`${e}`,[Dn]:{gridColumn:"auto"}});function Sl({values:e,customTabs:d,avatarSrcByName:b,managerLocked:l=!1,notice:o=!1,event:s=!1,hideDueDate:r=!1,hideReminder:t=!1,beforeStart:n,pinColumns:c=!1,projectColumn:i=1,afterProject:a,readOnly:h=!1,targetSummary:f="",narrowCollapsedSx:u,reminderLocked:g=!1,managerAction:m,hideProject:v=!1,leading:k,supportOrigin:B,trailing:R,onChangeProject:L,onChangeStartDate:A,onChangeDueDate:P,onChangeReminder:N,onChangePriority:q,onChangeEventTime:j,onChangeEventPlace:S,onChangeEventAddress:T,onMemberEdit:D,onAddProject:p}){let[y,x]=gi(null),[w,_]=gi(!1),[C,O]=gi(null),[z,$]=gi(null),[V,M]=gi(null),[H,I]=gi(null),[E,F]=gi(null),U=Lt(),Y=qn(),K=c&&!s,W=(Z,re,ie=!1)=>[eo(Z),...ie&&u?Array.isArray(u)?u:[u]:[],...K&&re?[rr(re)]:[]],X=d.find(Z=>Z.key===e.tabKey),J=d.filter(Z=>!Z.archived),G=Z=>{let re=!!String(e.startDate??"").trim();if(A(Z),re||o||s)return;let ie=Mc(Z);Number.isNaN(ie.getTime())||ie.getTime()<=Date.now()||h3("\uC2DC\uC791\uC77C\uC2DC\uAC00 \uB418\uBA74 \uCC45\uC784\uC790\uC5D0\uAC8C \uC54C\uB9BC\uC774 \uBC1C\uC1A1\uB429\uB2C8\uB2E4.")},te=Qe(pt,{icon:Qe(l3,{sx:{fontSize:17}}),label:"\uC0AC\uC804\uC54C\uB9BC",onClick:h||g?void 0:Z=>$(Z),sx:W(s?8:5,2,!0),children:e.reminders.length===0?Qe(Xo,{label:"\uC5C6\uC74C"}):Uc(e.reminders)});return dn(Vs,{children:[dn(kl,{sx:{display:"grid",gridTemplateColumns:"repeat(2, minmax(0, 1fr))",gridAutoFlow:"row dense",columnGap:3,rowGap:0,px:2,[Dn]:{gridTemplateColumns:"minmax(0, 1fr)"}},children:[k,B?dn(Vs,{children:[dn(pt,{icon:Qe(p3,{sx:{fontSize:17}}),label:"\uAC00\uB9F9\uC810",sx:W(0,1),children:[B.licenseName||Qe(Xo,{}),B.contactPhone?Qe(kl,{component:"span",sx:{ml:1,color:"#6f6f6c",fontSize:"0.92em"},children:B.contactPhone}):null,B.contactEmail?Qe(kl,{component:"span",sx:{ml:1,color:"#6f6f6c",fontSize:"0.92em"},children:B.contactEmail}):null]}),Qe(pt,{icon:Qe(m3,{sx:{fontSize:17}}),label:"\uC720\uD615",sx:W(0,2),children:B.supportType||Qe(Xo,{})})]}):null,v?null:Qe(pt,{icon:Qe(r3,{sx:{fontSize:17}}),label:"\uD504\uB85C\uC81D\uD2B8",onClick:h?void 0:Z=>x(Z),sx:K&&i==="full"?[W(1,void 0,!0),{gridColumn:"1 / -1"}]:W(1,i==="full"?1:i,!0),children:X?(()=>{let Z=Tt(X.icon);return dn(Vs,{children:[Z?Qe(Z,{sx:{fontSize:16,color:"#1e3a8a"}}):null,X.label]})})():"\uAE30\uBCF8"}),a,o?Qe(pt,{icon:Qe(ip,{sx:{fontSize:17}}),label:"\uB300\uC0C1\uC790",onClick:h?void 0:()=>D("targets"),sx:W(7,1),children:f||"\uBAA8\uB4E0 \uC9C1\uC6D0"}):null,!o&&!s?Qe(pt,{icon:Qe(i3,{sx:{fontSize:17}}),label:"\uCC45\uC784\uC790",onClick:l||h||!e.managerName&&m?void 0:()=>D("manager"),sx:W(7,1),children:e.managerName?dn(Vs,{children:[Qe(qr,{names:[e.managerName],size:20,avatarSrcByName:b}),e.managerName]}):m??Qe(Xo,{})}):null,n,s?null:Qe(pt,{icon:Qe(n3,{sx:{fontSize:17}}),label:"\uC2DC\uC791\uC77C\uC2DC",onClick:h?void 0:Z=>M(Z),sx:W(2,2),children:e.startDate?sp(e.startDate):Qe(Xo,{})}),o?null:Qe(pt,{icon:Qe(ip,{sx:{fontSize:17}}),label:s?"\uCC38\uC11D\uC790":"\uCC38\uC870\uC790",onClick:h?void 0:()=>D("receivers"),sx:W(s?7:8,1),children:e.receiverNames.length>0?dn(Vs,{children:[Qe(qr,{names:e.receiverNames,size:20,avatarSrcByName:b}),e.receiverNames.length===1?e.receiverNames[0]:null]}):Qe(Xo,{})}),r?null:Qe(pt,{icon:Qe(o3,{sx:{fontSize:17}}),label:s?"\uB0A0\uC9DC":"\uB9C8\uAC10\uC608\uC815",onClick:h?void 0:Z=>I(Z),sx:W(3,2),children:e.dueDate?s?yn(e.dueDate):sp(e.dueDate):Qe(Xo,{})}),s?Qe(pt,{icon:Qe(a3,{sx:{fontSize:17}}),label:"\uC2DC\uAC01",onClick:h?void 0:Z=>F(Z),sx:eo(4),children:e.eventTime?e.eventTime:Qe(Xo,{label:"\uC885\uC77C"})}):null,s?Qe(pt,{icon:Qe(u3,{sx:{fontSize:17}}),label:"\uC7A5\uC18C",sx:eo(5),children:Qe(Bo,{value:e.eventPlace??"",placeholder:"\uC7A5\uC18C \uC785\uB825",readOnly:h,onCommit:Z=>S?.(Z)})}):null,!t&&s?te:null,s?Qe(pt,{icon:Qe(f3,{sx:{fontSize:17}}),label:"\uC8FC\uC18C",sx:[{gridColumn:"1 / -1"},eo(6)],children:Qe(op,{value:e.eventAddress??"",placeholder:"\uC8FC\uC18C \uC785\uB825",readOnly:h,onCommit:Z=>T?.(Z)})}):null,s?null:Qe(pt,{icon:Qe(s3,{sx:{fontSize:17}}),label:"\uC911\uC694\uB3C4",onClick:h?void 0:Z=>O(Z),sx:W(6,1,!0),children:Qe(Fr,{priority:e.priority,small:!0})}),!t&&!s?te:null,R]}),dn(Bu,{transitionDuration:0,anchorEl:y,open:!!y,onClose:()=>x(null),...Y,children:[dn(Us,{selected:!e.tabKey,onClick:()=>{L(""),x(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[Qe(c3,{sx:{fontSize:17,color:"#9a9a97"}}),"\uC5C6\uC74C",e.tabKey?null:Qe(_l,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}})]}),J.map(Z=>{let re=Tt(Z.icon),ie=e.tabKey===Z.key;return dn(Us,{selected:ie,onClick:()=>{L(Z.key),x(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[re?Qe(re,{sx:{fontSize:17,color:"#1e3a8a"}}):null,Z.label,ie?Qe(_l,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},Z.key)}),p?[Qe(Q_,{},"add-project-divider"),dn(Us,{onClick:()=>_(!0),sx:{fontSize:14,color:"#787774"},children:[Qe(e3,{children:Qe(t3,{sx:{fontSize:18,color:"#787774"}})}),"\uD504\uB85C\uC81D\uD2B8 \uCD94\uAC00"]},"add-project")]:null]}),p?Qe(nl,{open:w,onClose:()=>_(!1),onSubmit:(Z,re,ie)=>{(async()=>{let se=await p(Z,re,ie);se&&L(se)})(),x(null)}}):null,Qe(Bu,{transitionDuration:0,anchorEl:C,open:!!C,onClose:()=>O(null),...Y,children:["high","medium","low"].map(Z=>dn(Us,{selected:e.priority===Z,onClick:()=>{q(Z),O(null)},sx:{fontSize:14,minWidth:130,gap:1},children:[Qe(Fr,{priority:Z,small:!0}),e.priority===Z?Qe(_l,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},Z))}),Qe(Bu,{transitionDuration:0,anchorEl:z,open:!!z,onClose:()=>$(null),...Y,children:Wc(s?!!e.eventTime:String(e.dueDate??"").includes(" ")).map(Z=>{let re=Z.value==="none"?e.reminders.length===0:e.reminders.includes(Z.value);return dn(Us,{selected:re,onClick:()=>{N(tl(e.reminders,Z.value)),Z.value==="none"&&$(null)},sx:{fontSize:14,minWidth:150,gap:1},children:[Z.label,re?Qe(_l,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},Z.value)})}),s?Qe(d3,{anchorEl:E,open:!!E,onClose:()=>F(null),value:g3(e.eventTime),format:"HH:mm",minuteStep:10,autoApply:!0,centered:U,locale:"ko",onChange:(Z,re)=>{j?.(`${Z}:${re}`),F(null)}}):null,Qe(xn,{anchorEl:V,open:!!V,date:e.startDate,reminders:[],hideReminder:!0,showTime:!0,centered:U,onClose:()=>M(null),onDateChange:G,onReminderChange:()=>{}}),Qe(xn,{anchorEl:H,open:!!H,date:e.dueDate,reminders:e.reminders,hideReminder:g||t,showTime:!s,centered:U,onClose:()=>I(null),onDateChange:P,onReminderChange:N})]})}import{useState as b3}from"react";import{Box as y3,Menu as x3,MenuItem as v3}from"@mui/material";import w3 from"@mui/icons-material/RepeatOutlined";import _3 from"@mui/icons-material/DevicesOutlined";import k3 from"@mui/icons-material/ScreenSearchDesktopOutlined";import S3 from"@mui/icons-material/SellOutlined";import T3 from"@mui/icons-material/TaskAltOutlined";import{Fragment as ap,jsx as kr,jsxs as lp}from"react/jsx-runtime";function Iu({label:e="\uBE44\uC5B4 \uC788\uC74C"}){return kr(y3,{component:"span",sx:{color:"#9a9a97"},children:e})}function Tl({values:e,readOnly:d=!1,showResolution:b=!1,onChangeRepro:l,onChangeDevice:o,onChangeWhere:s,onChangeVersion:r,onChangeResolution:t}){let[n,c]=b3(null),i=n?.field==="repro"?Tc:n?.field==="device"?Cc:Bc,a=h=>{n?.field==="repro"?l(h):n?.field==="device"?o(h):n?.field==="resolution"&&t?.(h),c(null)};return lp(ap,{children:[lp(ap,{children:[kr(pt,{icon:kr(w3,{sx:{fontSize:17}}),label:"\uC7AC\uD604\uBE48\uB3C4",onClick:d?void 0:h=>c({field:"repro",el:h}),children:dd(e.repro)||kr(Iu,{label:"\uC120\uD0DD"})}),kr(pt,{icon:kr(_3,{sx:{fontSize:17}}),label:"\uB514\uBC14\uC774\uC2A4",onClick:d?void 0:h=>c({field:"device",el:h}),children:hd(e.device)||kr(Iu,{label:"\uC120\uD0DD"})}),kr(pt,{icon:kr(k3,{sx:{fontSize:17}}),label:"\uBC1C\uC0DD\uD654\uBA74",children:kr(Bo,{value:e.where,placeholder:"\uC608: POS > \uC8FC\uBB38\uD604\uD669",readOnly:d,onCommit:s})}),kr(pt,{icon:kr(S3,{sx:{fontSize:17}}),label:"\uBC1C\uC0DD\uBC84\uC804",children:kr(Bo,{value:e.version,placeholder:"\uC608: 2026-08-06 \uBC30\uD3EC",readOnly:d,onCommit:r})}),b?kr(pt,{icon:kr(T3,{sx:{fontSize:17}}),label:"\uC885\uB8CC\uC0AC\uC720",onClick:d?void 0:h=>c({field:"resolution",el:h}),children:La(e.resolution)||kr(Iu,{label:"\uC120\uD0DD"})}):null]}),kr(x3,{open:!!n,anchorEl:n?.el??null,onClose:()=>c(null),transitionDuration:0,children:i.map(h=>kr(v3,{onClick:()=>a(h.key),sx:{fontSize:14},children:h.name},h.key))})]})}import{Box as cp}from"@mui/material";import{jsxs as up}from"react/jsx-runtime";var Eu=16;function _n({icon:e,title:d,titleExtra:b,children:l}){return up(cp,{sx:{px:2,display:"flex",flexDirection:"column",gap:.25},children:[up(cp,{sx:{display:"flex",alignItems:"center",gap:1,fontSize:Eu,fontWeight:500,color:"#37352f"},children:[e,d,b]}),l]})}import{useState as Mu}from"react";import{Box as Ru,Button as C3,Divider as B3,IconButton as fp,Menu as I3,MenuItem as Ou,Tooltip as E3}from"@mui/material";import M3 from"@mui/icons-material/MoreVert";import{ConfirmDialog as R3}from"@ehfuse/alerts";import{FormDialog as O3}from"@ehfuse/mui-form-dialog";import{ClearTextField as A3}from"@ehfuse/mui-form-controls";import{Fragment as D3,jsx as hn,jsxs as Cl}from"react/jsx-runtime";function dp(e){return String(e??"").replace(/<[^>]*>/g,"").replace(/&nbsp;/g," ").trim().length>0}function Bl({content:e,templates:d,onApply:b,onSave:l,onRemove:o}){let[s,r]=Mu(null),[t,n]=Mu(!1),[c,i]=Mu(""),a=async h=>{r(null),!(dp(e)&&!await R3({title:"\uC591\uC2DD \uBD88\uB7EC\uC624\uAE30",message:`\uC9C0\uAE08 \uC4F4 \uB0B4\uC6A9\uC744 "${h.name}" \uC591\uC2DD\uC73C\uB85C \uBC14\uAFC9\uB2C8\uB2E4. \uACC4\uC18D\uD560\uAE4C\uC694?`}))&&b(h.content)};return Cl(D3,{children:[hn(E3,{title:"\uBCF8\uBB38 \uC591\uC2DD",arrow:!0,disableInteractive:!0,children:hn(fp,{size:"small","aria-label":"\uBCF8\uBB38 \uC591\uC2DD",onClick:h=>r(h.currentTarget),sx:{ml:"auto",color:"#9a9a97"},children:hn(M3,{sx:{fontSize:18}})})}),Cl(I3,{anchorEl:s,open:!!s,onClose:()=>r(null),transitionDuration:0,children:[l?hn(Ou,{disabled:!dp(e),onClick:()=>{r(null),i(""),n(!0)},sx:{fontSize:14,minWidth:220},children:"\uD604\uC7AC \uB0B4\uC6A9\uC744 \uC591\uC2DD\uC73C\uB85C \uC800\uC7A5"}):null,l?hn(B3,{sx:{my:.5}}):null,d.length===0?hn(Ou,{disabled:!0,sx:{fontSize:14,minWidth:220},children:"\uC800\uC7A5\uB41C \uC591\uC2DD\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"}):d.map(h=>Cl(Ou,{onClick:()=>{a(h)},sx:{fontSize:14,minWidth:220,gap:1},children:[hn(Ru,{sx:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:h.name}),o?hn(fp,{size:"small","aria-label":`${h.name} \uC591\uC2DD \uC0AD\uC81C`,onClick:f=>{f.stopPropagation(),o(h.seq)},sx:{color:"#9a9a97"},children:hn(dr,{sx:{fontSize:16}})}):null]},h.seq))]}),hn(O3,{open:t,onClose:()=>n(!1),maxWidth:"xs",title:"\uC591\uC2DD\uC73C\uB85C \uC800\uC7A5",locale:"ko",backdropClick:!1,titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},tabs:{visible:!1},actions:{showCancelButton:!0,right:hn(C3,{variant:"contained",disabled:!c.trim(),onClick:()=>{l?.(c.trim(),e),n(!1)},children:"\uC800\uC7A5"})},sections:[{id:"template-name",title:"",showTitle:!1,children:Cl(Ru,{sx:{display:"flex",flexDirection:"column",gap:1},children:[hn(Ru,{sx:{fontSize:15,color:"#37352f"},children:"\uC9C0\uAE08 \uB0B4\uC6A9\uC744 \uC591\uC2DD\uC73C\uB85C \uC800\uC7A5\uD569\uB2C8\uB2E4. \uB2E4\uC74C\uBD80\uD130 \uC774 \uC774\uB984\uC73C\uB85C \uAEBC\uB0B4 \uC4F8 \uC218 \uC788\uC2B5\uB2C8\uB2E4."}),hn(A3,{size:"medium",fullWidth:!0,autoFocus:!0,placeholder:"\uC591\uC2DD \uC774\uB984 (\uC608: \uC624\uB958 \uC2E0\uACE0 \uC11C\uC2DD)",value:c,onChange:h=>i(h.target.value)})]})}]})]})}import{useEffect as Au,useRef as Zo,useState as P3}from"react";import{Box as Du,IconButton as N3,Tooltip as L3}from"@mui/material";import z3 from"@mui/icons-material/ContentCopyOutlined";import j3 from"@mui/icons-material/Check";import{EhfuseEditor as F3,ImageResizePlugin as q3,minimalToolbarOptions as $3}from"@ehfuse/editor";import{jsx as bi,jsxs as W3}from"react/jsx-runtime";function Pu(e){let d=e.trim();return d?d.startsWith("<")?e:`<p>${d}</p>`:"<p></p>"}function H3(e){let d=e.replace(/<br\s*\/?>/gi,`
33
33
  `).replace(/<\/(p|div|li|h[1-6]|blockquote)>/gi,`
34
34
  `),b=document.createElement("div");return b.innerHTML=d,(b.textContent??"").replace(/\n{3,}/g,`
35
35
 
36
- `).trim()}function Il({syncKey:e,value:d,onChange:b,readOnly:l=!1,minHeight:o=180,height:s=0,onChangeHeight:r}){let{uploadContentImage:t}=$t(),n=Zo(null),c=Zo(new R3),i=Zo(null),a=s>0?s:0,h=Zo(a),f=Zo(r);f.current=r;let u=Zo(null),g=Zo(Date.now()+800),[m,v]=T3(!1),k=Lt();Au(()=>{if(l)return;let R=Pu(d);u.current===R||u.current===d||(u.current=R,g.current=Date.now()+800,n.current?.setHtml(R))},[e,d,l]);let B=Zo(-1);return Au(()=>{if(l||k||s<=0||B.current===s||(B.current=s,Math.abs(s-h.current)<1))return;let R=i.current?.querySelector(".ehfuse-editor-container");R&&(Math.abs(R.getBoundingClientRect().height-s)<1||(R.style.height=`${s}px`,h.current=s))},[l,k,s]),Au(()=>{if(l||k)return;let R=i.current?.querySelector(".ehfuse-editor-container");if(!R||typeof ResizeObserver>"u")return;let L,A=new ResizeObserver(P=>{let N=Math.round(P[0]?.contentRect.height??0);N<=0||(window.clearTimeout(L),L=window.setTimeout(()=>{Math.abs(N-h.current)<1||(h.current=N,f.current?.(N))},300))});return A.observe(R),()=>{window.clearTimeout(L),A.disconnect()}},[l,k]),l?D3(Du,{sx:{position:"relative",mt:1},children:[bi(Du,{sx:{border:"1px solid #e0e0e0",borderRadius:1,p:"12px",pr:"40px",minHeight:o,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:Pu(d)}}),bi(B3,{title:"\uB0B4\uC6A9 \uBCF5\uC0AC",arrow:!0,children:bi(C3,{size:"small","aria-label":"\uB0B4\uC6A9 \uBCF5\uC0AC",onClick:()=>{navigator.clipboard.writeText(A3(d)).then(()=>{v(!0),window.setTimeout(()=>v(!1),1500)})},sx:{position:"absolute",top:6,right:6,color:"#9a9a97"},children:m?bi(E3,{sx:{fontSize:17,color:"#2f9e5b"}}):bi(I3,{sx:{fontSize:17}})})})]}):bi(Du,{ref:i,onDragOver:R=>R.stopPropagation(),onDrop:R=>R.stopPropagation(),sx:{mt:1,"& .ehfuse-editor-content > p:first-of-type":{mt:0},"& .ehfuse-editor-content > p:last-of-type":{mb:0},"& .ehfuse-editor-content.ehfuse-editor-empty::before":{top:"12px",left:"12px"}},children:bi(M3,{ref:n,defaultValue:Pu(d),autoHeight:k,resizable:!k,showToolbar:!k,focusBorder:!0,styles:{focusBorderColor:"var(--primary)"},toolbarOptions:O3,plugins:[c.current],locale:"ko",minHeight:a||o,placeholder:"\uB0B4\uC6A9\uC744 \uC785\uB825\uD558\uC138\uC694",onImageUpload:t,contentStyle:{padding:"12px"},onChange:R=>{let L=Date.now()<g.current,A=R===u.current;u.current=R,!(L||A)&&b(R)}})})}import{useState as Xi}from"react";import{Box as hr,Button as pp,Dialog as V3,IconButton as Zi,Switch as K3,TextField as G3,Tooltip as Lu}from"@mui/material";import{DndContext as Y3,PointerSensor as X3,closestCenter as Z3,useSensor as J3,useSensors as Q3}from"@dnd-kit/core";import{restrictToParentElement as e5,restrictToVerticalAxis as t5}from"@dnd-kit/modifiers";import{SortableContext as r5,arrayMove as n5,useSortable as o5,verticalListSortingStrategy as i5}from"@dnd-kit/sortable";import{CSS as s5}from"@dnd-kit/utilities";import mp from"@mui/icons-material/Close";import a5 from"@mui/icons-material/AddCircle";import gp from"@mui/icons-material/AddTask";import l5 from"@mui/icons-material/Checklist";import c5 from"@mui/icons-material/CheckCircle";import u5 from"@mui/icons-material/DragIndicator";import f5 from"@mui/icons-material/Launch";import d5 from"@mui/icons-material/LinkOutlined";import h5 from"@mui/icons-material/RadioButtonUnchecked";import{useEffect as P3,useMemo as N3,useState as Nu}from"react";import{Box as to,Button as L3,Tab as z3,Tabs as j3}from"@mui/material";import{FormDialog as F3}from"@ehfuse/mui-form-dialog";import{ClearTextField as q3}from"@ehfuse/mui-form-controls";import{ErrorAlert as $3}from"@ehfuse/alerts";import H3 from"@mui/icons-material/CheckCircle";import W3 from"@mui/icons-material/RadioButtonUnchecked";import{OverlayScrollbar as U3}from"@ehfuse/overlay-scrollbar";import{jsx as Ar,jsxs as El}from"react/jsx-runtime";var hp=[{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 Ml({open:e,task:d,tasks:b,excludeSeqs:l=[],onClose:o,onSubmit:s,hideRelationType:r=!1,title:t="\uAD00\uB828 \uC5C5\uBB34 \uC5F0\uACB0",confirmLabel:n="\uC5F0\uACB0",multiSelect:c=!1}){let i=Lt(),[a,h]=Nu("related"),[f,u]=Nu(""),[g,m]=Nu([]);P3(()=>{e&&(h("related"),u(""),m([]))},[e]);let v=N3(()=>{let A=new Set([d.seq,...l]),P=f.trim().toLowerCase();return b.filter(N=>A.has(N.seq)||N.is_event||N.is_notice||N.linked_only?!1:P?N.title.toLowerCase().includes(P)||(N.ticket_no??"").toLowerCase().includes(P):!0).sort((N,q)=>!!N.completed!=!!q.completed?N.completed?1:-1:q.seq-N.seq)},[b,d.seq,l,f]),k=()=>{if(g.length===0){$3("\uC5F0\uACB0\uD560 \uC5C5\uBB34\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return}for(let A of g)s(A,a);o()},B=A=>{m(P=>P.includes(A)?P.filter(N=>N!==A):c?[...P,A]:[A])},R=hp.find(A=>A.type===a)?.hint??"",L=El(to,{sx:{display:"flex",flexDirection:"column",minHeight:0,height:i?"100%":"auto"},children:[r?null:Ar(j3,{value:a,onChange:(A,P)=>h(P),sx:{minHeight:38,flexShrink:0,borderBottom:"1px solid #ededeb","& .MuiTab-root":{minHeight:38,py:.5,fontSize:16,color:"#333333"}},children:hp.map(A=>Ar(z3,{value:A.type,label:A.label},A.type))}),r?null:Ar(to,{sx:{mt:1,mb:1.5,fontSize:14,flexShrink:0},children:R}),El(to,{sx:{...i?{height:"100%",minHeight:0}:{height:560},display:"flex",flexDirection:"column",...i?{}:{border:"1px solid #cccccc",borderRadius:1},overflow:"hidden",userSelect:"none"},children:[Ar(to,{sx:{px:1.5,py:1,borderBottom:"1px solid #cccccc",flexShrink:0},children:Ar(q3,{placeholder:"\uC81C\uBAA9\xB7\uD2F0\uCF13\uBC88\uD638\uB85C \uAC80\uC0C9",value:f,onChange:A=>u(A.target.value),fullWidth:!0,autoFocus:!0,size:"small",sx:{"& .MuiOutlinedInput-notchedOutline":{border:"none"},"& .MuiInputBase-root":{px:0}}})}),Ar(to,{sx:{flex:1,minHeight:0},children:Ar(U3,{style:{height:"100%"},contentStyle:{paddingTop:0},children:Ar(to,{sx:{display:"flex",flexDirection:"column"},children:v.length===0?Ar(to,{sx:{py:4,textAlign:"center",fontSize:13.5,color:"#9a9a97"},children:"\uC5F0\uACB0\uD560 \uC218 \uC788\uB294 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):v.map(A=>{let P=A.is_notice||A.is_event?Tt(A.icon||(A.is_notice?ir:cr)):null,N=g.includes(A.seq);return El(to,{onClick:()=>B(A.seq),sx:{display:"flex",alignItems:"center",gap:.75,px:1.5,py:1.25,flexShrink:0,cursor:"pointer",borderBottom:"1px solid #ededeb","&:last-of-type":{borderBottom:"none"},bgcolor:N?"#e3eefb":"transparent","&:hover":{bgcolor:N?"#e3eefb":"#f7f7f5"}},children:[N?Ar(H3,{sx:{fontSize:20,flexShrink:0,color:"#2f6fd0"}}):Ar(W3,{sx:{fontSize:20,flexShrink:0,color:"#c9c8c5"}}),P?Ar(P,{sx:{fontSize:17,flexShrink:0,color:A.icon_color||"#1e3a8a"}}):null,El(to,{component:"span",sx:{flex:1,minWidth:0,fontSize:15,color:"#37352f",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:3,overflow:"hidden",lineHeight:1.5,wordBreak:"break-word"},children:[A.ticket_no?`${A.ticket_no} `:"",A.title]}),Ar(to,{sx:{flexShrink:0,display:"flex",alignItems:"center"},children:Ar(At,{option:ur(A)})})]},A.seq)})})})})]})]});return Ar(F3,{open:e,onClose:o,maxWidth:"sm",fullScreen:i,mobilePresentation:i?"slide":"dialog",...i?{contentPaddingX:0,contentTopPadding:0,sectionsPaddingTop:0}:{},sx:i?{DialogContent:{pb:0,"& .os-content > div":{height:"100%",boxSizing:"border-box",paddingBottom:0,marginBottom:0},"& .FormSection-content, & .section-content":{height:"100%",paddingBottom:0,marginBottom:0}}}:void 0,title:t,locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-task-link",sections:[{id:"task-link",showTitle:!1,children:L}],scrollPastLastSection:!1,sectionContentPaddingTop:0,contentTopPadding:12,actions:{showCancelButton:!0,right:Ar(L3,{variant:"contained",disabled:g.length===0,onClick:k,children:n})}})}import{Fragment as g5,jsx as ut,jsxs as ro}from"react/jsx-runtime";var bp="taskbox.checklist.hideCompleted";function p5({id:e,children:d}){let{attributes:b,listeners:l,setNodeRef:o,transform:s,transition:r,isDragging:t}=o5({id:e});return ut(hr,{ref:o,sx:{transform:s5.Transform.toString(s),transition:r,...t?{opacity:.6,position:"relative",zIndex:1}:{}},children:d({handleProps:{...b,...l},dragging:t})})}function m5({sortable:e,sensors:d,rowIds:b,onDragEnd:l,children:o}){let s=ut(hr,{sx:{display:"flex",flexDirection:"column",mt:.5,pl:3.25},children:o});return e?ut(Y3,{sensors:d,collisionDetection:Z3,modifiers:[t5,e5],onDragEnd:l,children:ut(r5,{items:b,strategy:i5,children:s})}):s}function Rl({taskSeq:e,checklist:d,onAdd:b,onToggle:l,onRemove:o,onUpdate:s,onReorder:r,removeLocked:t=!1,onConvertToTask:n,onOpenLinkedTask:c,linkCandidates:i,linkBaseTask:a,onLinkExistingTask:h,resolveLinkedTask:f,myAccountSeq:u=0}){let[g,m]=Xi(""),[v,k]=Xi(!1),[B,R]=Xi(null),L=Lt(),[A,P]=Xi(null),[N,q]=Xi(null),j=H=>{let I=H.task_seq?f?.(H.task_seq):void 0;return I?I.completed:H.checked},S=H=>{if(!H.task_seq||u<=0)return!1;let I=f?.(H.task_seq);return I?!Md(I,u):!1},T=H=>!!H.task_seq&&!!f&&!f?.(H.task_seq),D=d.filter(H=>!T(H)),p=D.filter(j).length,[y,x]=Xi(()=>{try{return localStorage.getItem(bp)==="1"}catch{return!1}}),w=H=>{x(H);try{localStorage.setItem(bp,H?"1":"0")}catch{}},_=!!r&&!L&&!t,C=Q3(J3(X3,{activationConstraint:{distance:5}})),O=(H,I)=>H.task_seq?`linked-${H.task_seq}`:`row-${I}`,z=d.map(O),$=z.filter((H,I)=>{let E=d[I];return T(E)?!1:!(y&&j(E))}),V=H=>{let{active:I,over:E}=H;if(!E||I.id===E.id)return;let F=z.indexOf(String(I.id)),U=z.indexOf(String(E.id));F<0||U<0||r?.(e,n5(d,F,U))},M=()=>{g.trim()&&(b(e,g),m(""))};return ro(_n,{icon:ut(l5,{sx:{fontSize:19,display:"block"}}),title:ro(g5,{children:["\uD560\uC77C",d.length>0?ro(hr,{component:"span",sx:{fontSize:12.5,color:"#9a9a97"},children:[p," / ",d.length]}):null]}),titleExtra:D.length>0?ro(hr,{sx:{flex:1,minWidth:0,ml:1,display:"flex",alignItems:"center",gap:1},children:[ut(hr,{sx:{flex:1,minWidth:0,height:6,borderRadius:3,bgcolor:"#ececea"},children:ut(hr,{sx:{height:"100%",borderRadius:3,width:`${Math.round(p/D.length*100)}%`,bgcolor:"#2f80ed",transition:"width 0.2s"}})}),p>0?ro(hr,{component:"label",sx:{display:"inline-flex",alignItems:"center",gap:.25,flexShrink:0,cursor:"pointer",fontSize:13.5,fontWeight:400,color:"#57564f",userSelect:"none"},children:[ut(K3,{size:"small",checked:y,onChange:(H,I)=>w(I)}),"\uC644\uB8CC\uC228\uAE40"]}):null]}):null,children:[ut(m5,{sortable:_,sensors:C,rowIds:$,onDragEnd:V,children:d.map((H,I)=>{let E=H.task_seq?f?.(H.task_seq):void 0,F=j(H);if(y&&F||T(H))return null;let U=!!H.task_seq,Y=S(H),K=W=>ro(hr,{sx:{display:"flex",alignItems:L?"flex-start":"center",gap:1,px:1.25,..._?{ml:-3,pl:.5}:{},py:.5,borderRadius:1,"&:hover":{bgcolor:"#f7f7f5"},"&:hover .taskbox-checklist-remove":{opacity:1},"&:hover .taskbox-checklist-convert":{opacity:1},"&:hover .taskbox-checklist-handle":{opacity:1}},children:[W?ut(hr,{className:"taskbox-checklist-handle",...W,sx:{display:"inline-flex",flexShrink:0,alignItems:"center",color:"#c9c8c5",opacity:0,transition:"opacity 0.15s",cursor:"grab","&:active":{cursor:"grabbing"},touchAction:"none",userSelect:"none"},children:ut(u5,{sx:{fontSize:16}})}):null,ut(Lu,{title:Y?"\uC5F0\uACB0 \uC5C5\uBB34\uC758 \uC791\uC131\uC790\xB7\uCC45\uC784\uC790\uB9CC \uC644\uB8CC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4":"",arrow:!0,disableInteractive:!0,children:ut(hr,{component:"span",onClick:Y?void 0:()=>l(e,I,!F),sx:{display:"inline-flex",flexShrink:0,cursor:Y?"default":"pointer",...L?{mt:"1px"}:{}},children:F?ut(c5,{sx:{fontSize:18,color:Y?"#a9c6ec":"#2f80ed"}}):ut(h5,{sx:{fontSize:18,color:Y?"#d6d5d1":"#9a9a97"}})})}),B?.index===I?ut(hr,{component:"input",autoFocus:!0,spellCheck:!1,value:B.label,enterKeyHint:"done",onChange:X=>R({index:I,label:X.target.value}),onBlur:()=>{B.label.trim()&&B.label.trim()!==H.label&&s?.(e,I,B.label),R(null)},onKeyDown:X=>{X.key==="Enter"&&X.target.blur(),X.key==="Escape"&&R(null)},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:14,color:"#37352f",bgcolor:"transparent",p:0}}):ut(hr,{component:"span",onClick:U?H.task_seq&&c?()=>c(H.task_seq):void 0:t||!s?void 0:L?()=>P({index:I,label:H.label}):()=>R({index:I,label:H.label}),sx:{flex:1,minWidth:0,fontSize:14.5,color:"#37352f",textDecoration:F?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",...L?{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:3,lineHeight:1.4,wordBreak:"break-word"}:{whiteSpace:"nowrap"},...U?c?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}:t||!s?{}:{cursor:"text"}},children:H.label}),U?ro(hr,{component:"span",onClick:H.task_seq&&c?()=>c(H.task_seq):void 0,sx:{display:"inline-flex",alignItems:"center",gap:.4,flexShrink:0,...L?{mt:"1px"}:{},px:.75,py:.2,borderRadius:1,fontSize:12,fontWeight:500,color:"#1d4f91",bgcolor:"#e3eefb",whiteSpace:"nowrap",...c?{cursor:"pointer"}:{}},children:[ut(f5,{sx:{fontSize:12}}),E?.manager_name?.trim()||"\uC5C5\uBB34"]}):null,!t&&!U&&n?ut(Lu,{title:"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",arrow:!0,enterDelay:300,disableInteractive:!0,children:ut(Zi,{className:"taskbox-checklist-convert",size:"small","aria-label":"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",onClick:X=>q({anchorEl:X.currentTarget,index:I,label:H.label}),sx:{display:L?"none":"inline-flex",opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:ut(gp,{sx:{fontSize:16}})})}):null,t?null:ut(Zi,{className:"taskbox-checklist-remove",size:"small","aria-label":"\uD560\uC77C \uC0AD\uC81C",onClick:()=>o(e,I),sx:{display:L?"none":"inline-flex",opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:ut(mp,{sx:{fontSize:15}})})]});return _?ut(p5,{id:z[I],children:({handleProps:W})=>K(W)},z[I]):ut(hr,{children:K(null)},z[I])})}),ro(hr,{sx:{mt:.5,ml:3.25,display:"flex",alignItems:"center",gap:.5},children:[ut(hr,{component:"input",spellCheck:!1,value:g,placeholder:"+ \uD560\uC77C \uCD94\uAC00",enterKeyHint:"done",onChange:H=>m(H.target.value),onKeyDown:H=>{H.key==="Enter"&&M()},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"}}}),i&&a&&h?ut(Lu,{title:"\uAE30\uC874 \uC5C5\uBB34 \uBD99\uC774\uAE30",arrow:!0,children:ut(Zi,{size:"small","aria-label":"\uAE30\uC874 \uC5C5\uBB34 \uBD99\uC774\uAE30",onMouseDown:H=>H.preventDefault(),onClick:()=>k(!0),sx:{flexShrink:0,color:"#9a9a97"},children:ut(d5,{sx:{fontSize:20}})})}):null,ut(Zi,{size:"small","aria-label":"\uD560\uC77C \uCD94\uAC00",disabled:!g.trim(),onMouseDown:H=>H.preventDefault(),onClick:M,sx:{flexShrink:0,color:g.trim()?"#2f80ed":"#c9c8c5"},children:ut(a5,{sx:{fontSize:20}})})]}),i&&a&&h?ut(Ml,{open:v,task:a,tasks:i,excludeSeqs:d.map(H=>Number(H.task_seq??0)).filter(H=>H>0),hideRelationType:!0,multiSelect:!0,title:"\uAE30\uC874 \uC5C5\uBB34 \uBD99\uC774\uAE30",confirmLabel:"\uBD99\uC774\uAE30",onClose:()=>k(!1),onSubmit:H=>{let I=i.find(E=>E.seq===H);h(e,H,String(I?.title??"").trim())}}):null,ut(kt,{open:!!N,anchorEl:N?.anchorEl??null,title:"\uC774 \uD560\uC77C\uC744 \uBCC4\uB3C4 \uC5C5\uBB34\uB85C \uB9CC\uB4DC\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uB9CC\uB4E4\uAE30",onCancel:()=>q(null),onConfirm:()=>{N&&n?.(e,N.index,N.label),q(null)}}),ut(V3,{open:!!A,onClose:()=>P(null),maxWidth:"xs",fullWidth:!0,slotProps:{paper:{sx:{borderRadius:2,m:2}}},children:ro(hr,{sx:{p:2,display:"flex",flexDirection:"column",gap:1.5},children:[ut(hr,{sx:{fontSize:15.5,fontWeight:600,color:"#37352f"},children:"\uD560\uC77C \uC218\uC815"}),ut(G3,{autoFocus:!0,fullWidth:!0,size:"medium",value:A?.label??"",onChange:H=>P(I=>I&&{...I,label:H.target.value}),onKeyDown:H=>{if(H.key!=="Enter")return;let I=A;I&&I.label.trim()&&s?.(e,I.index,I.label.trim()),P(null)}}),ro(hr,{sx:{display:"flex",alignItems:"center",gap:1},children:[!t&&n&&A&&!d[A.index]?.task_seq?ut(Zi,{"aria-label":"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",onClick:()=>{n(e,A.index,d[A.index]?.label??""),P(null)},sx:{color:"#57564f"},children:ut(gp,{sx:{fontSize:20}})}):null,!t&&A?ut(Zi,{"aria-label":"\uD560\uC77C \uC0AD\uC81C",onClick:()=>{o(e,A.index),P(null)},sx:{color:"#e5484d"},children:ut(mp,{sx:{fontSize:19}})}):null,ut(hr,{sx:{flex:1}}),ut(pp,{color:"inherit",onClick:()=>P(null),children:"\uCDE8\uC18C"}),ut(pp,{variant:"contained",disabled:!A?.label.trim(),onClick:()=>{A&&A.label.trim()&&s?.(e,A.index,A.label.trim()),P(null)},children:"\uD655\uC778"})]})]})})]})}import{useRef as _5,useState as k5}from"react";import{Box as no,IconButton as S5}from"@mui/material";import T5 from"@mui/icons-material/Close";import vp from"@mui/icons-material/AttachFileOutlined";var b5=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"]),Ol=e=>{let d=e?.split(".").pop()?.toLowerCase()??"";return b5.has(d)};import{LinearProgress as y5}from"@mui/material";import{Fragment as x5,jsx as w5,jsxs as v5}from"react/jsx-runtime";function yp(e){let d=po(),b=d.useValue("attachmentUpload.taskSeq"),l=d.useValue("attachmentUpload.index"),o=d.useValue("attachmentUpload.total"),s=d.useValue("attachmentUpload.queue"),r=l??0;return!r||e>0&&(b??0)!==e?null:{index:r,total:o??0,queue:s??[]}}function zu(){let d=po().useValue("attachmentUpload.progress");return v5(x5,{children:[d??0,"%"]})}function xp(){let d=po().useValue("attachmentUpload.progress");return w5(y5,{variant:"determinate",value:d??0,sx:{height:4,borderRadius:2,bgcolor:"#dbe9fb",mt:.75}})}import{Fragment as C5,jsx as tn,jsxs as Ks}from"react/jsx-runtime";function Al(e){return e>=1048576?`${(e/1048576).toFixed(1)}MB`:`${Math.max(1,Math.round(e/1024))}KB`}var Dl={flex:1,minWidth:0,fontSize:13.5,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"};function Pl({taskSeq:e,attachments:d,onAdd:b,onRemove:l,removeLocked:o=!1,onPreview:s,onDownload:r}){let[t,n]=k5(!1),c=_5(null),i=Lt(),a=Ss(),h=ks(),f=yp(e),u=e===0,g=R=>{if(s){s(R);return}window.open(h(R.uuid??""),"_blank","noopener,noreferrer")},m=R=>{if(r){r(R);return}window.open(h(R.uuid??"",{download:!0}),"_blank","noopener,noreferrer")},v=R=>f?R+1<f.index?"done":R+1===f.index?"uploading":"waiting":"waiting",k=(R,L,A,P={})=>Ks(no,{sx:{px:1,py:.5,borderRadius:1,border:"1px solid",borderColor:P.uploading?"#d5e6fb":"#e6e6e3",bgcolor:P.uploading?"#f4f9ff":"transparent","&:hover .taskbox-file-remove":{opacity:1}},children:[Ks(no,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[tn(vp,{sx:{fontSize:16,color:"#9a9a97"}}),L,tn(no,{component:"span",sx:{fontSize:12,color:P.uploading?"#2f80ed":"#9a9a97",flexShrink:0},children:A}),P.removeIndex!==void 0?tn(S5,{className:"taskbox-file-remove",size:"small","aria-label":"\uCCA8\uBD80 \uC0AD\uC81C",onClick:()=>l(e,P.removeIndex),sx:{opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:tn(T5,{sx:{fontSize:15}})}):null]}),P.uploading?tn(xp,{}):null]},R),B=R=>{let L=Ol(R.name);return tn(no,{component:"button",type:"button",onClick:()=>L?g(R):m(R),title:`${R.name} ${L?"\uBBF8\uB9AC\uBCF4\uAE30":"\uB2E4\uC6B4\uB85C\uB4DC"}`,sx:{...Dl,color:"#37352f",textAlign:"left",p:0,border:"none",background:"none",font:"inherit",fontSize:13.5,cursor:"pointer","&:hover":{textDecoration:"underline",color:"#2f80ed"}},children:R.name})};return Ks(_n,{icon:tn(vp,{sx:{fontSize:18,display:"block"}}),title:Ks(C5,{children:["\uD30C\uC77C ",d.length>0?d.length:""]}),children:[Ks(no,{sx:{display:"flex",flexDirection:"column",gap:.5,mt:1},children:[d.map((R,L)=>{let A=`${R.uuid||R.name}-${L}`;if(u){let P=v(L),N=P==="uploading";return k(A,tn(no,{component:"span",sx:{...Dl,color:P==="done"?"#37352f":"#9a9a97"},children:R.name}),N?tn(zu,{}):Al(R.size),{uploading:N,removeIndex:!o&&!f?L:void 0})}return R.uuid?k(A,B(R),Al(R.size),{removeIndex:o?void 0:L}):k(A,tn(no,{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:{...Dl,color:"#9a9a97"},children:R.name}),Al(R.size),{removeIndex:o?void 0:L})}),!u&&f?f.queue.slice(f.index-1).map((R,L)=>{let A=L===0;return k(`uploading-${f.index+L}-${R.name}`,tn(no,{component:"span",sx:{...Dl,color:"#9a9a97"},children:R.name}),A?tn(zu,{}):Al(R.size),{uploading:A})}):null]}),tn(no,{onClick:()=>c.current?.click(),onDragOver:R=>{R.preventDefault(),n(!0)},onDragLeave:()=>n(!1),onDrop:R=>{R.preventDefault(),n(!1);let L=Array.from(R.dataTransfer.files);L.length>0&&b(e,L)},sx:{mt:1,py:2.5,display:"flex",alignItems:"center",justifyContent:"center",gap:.5,border:"1.5px dashed",borderColor:t?"#2f80ed":"#cfcfcc",borderRadius:1,bgcolor:t?"#eef6ff":"transparent",color:"#787774",fontSize:13.5,cursor:"pointer",transition:"background-color 0.15s, border-color 0.15s","&:hover":{bgcolor:"#fafaf9",borderColor:"#9a9a97"}},children:i?`\uD30C\uC77C\uC744 \uCCA8\uBD80\uD558\uC138\uC694 (\uCD5C\uB300 ${a}MB)`:`\uD30C\uC77C\uC744 \uB04C\uC5B4\uB2E4 \uB193\uAC70\uB098 \uD074\uB9AD\uD574 \uCCA8\uBD80\uD558\uC138\uC694 (\uCD5C\uB300 ${a}MB)`}),tn(no,{component:"input",ref:c,type:"file",multiple:!0,onChange:R=>{let L=Array.from(R.target.files??[]);L.length>0&&b(e,L),R.target.value=""},sx:{display:"none"}})]})}import{useState as A5}from"react";import{Checkbox as D5,Divider as P5,ListItemIcon as N5,Menu as L5,MenuItem as Sp}from"@mui/material";import z5 from"@mui/icons-material/Add";import{useEffect as B5,useState as wp}from"react";import{Box as ju,Button as I5}from"@mui/material";import{FormDialog as E5}from"@ehfuse/mui-form-dialog";import{ClearTextField as M5}from"@ehfuse/mui-form-controls";import{ColorPicker as R5}from"@ehfuse/mui-color-picker";import{ErrorAlert as O5}from"@ehfuse/alerts";import{jsx as Gs,jsxs as Fu}from"react/jsx-runtime";var _p="#2f80ed";function kp({open:e,onClose:d,onSubmit:b}){let[l,o]=wp(""),[s,r]=wp(_p);B5(()=>{e&&(o(""),r(_p))},[e]);let t=()=>{let i=l.trim();if(!i){O5("\uB77C\uBCA8 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}b(i,s),d()},n=md(s),c=Fu(ju,{children:[Fu(ju,{sx:{display:"flex",alignItems:"center",gap:1.5,mt:.5},children:[Gs(M5,{label:"\uB77C\uBCA8 \uC774\uB984",value:l,onChange:i=>o(i.target.value),onKeyDown:i=>{i.key==="Enter"&&(i.preventDefault(),t())},fullWidth:!0,autoFocus:!0}),Gs(R5,{value:s,onChange:i=>r(i),shape:"circle",colorSize:28})]}),Fu(ju,{sx:{mt:2,display:"flex",alignItems:"center",gap:1,fontSize:13,color:"#787774"},children:["\uBBF8\uB9AC\uBCF4\uAE30",Gs(At,{option:{key:"__preview__",name:l.trim()||"\uB77C\uBCA8",...n}})]})]});return Gs(E5,{open:e,onClose:d,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:Gs(I5,{variant:"contained",onClick:t,children:"\uCD94\uAC00"})}})}import{Fragment as j5,jsx as Ji,jsxs as Nl}from"react/jsx-runtime";function Ll({anchorEl:e,selectedKeys:d,labelOptions:b,onToggle:l,onAddLabel:o,onClose:s}){let[r,t]=A5(!1),n=qn();return Nl(j5,{children:[Nl(L5,{anchorEl:e,open:!!e,onClose:s,transitionDuration:0,...n,children:[b.map(c=>{let i=d.includes(c.key);return Nl(Sp,{onClick:()=>l(c.key),sx:{fontSize:14,minWidth:170,gap:1},children:[Ji(D5,{size:"small",checked:i,sx:{p:0}}),Ji(At,{option:c})]},c.key)}),Ji(P5,{}),Nl(Sp,{onClick:()=>t(!0),sx:{fontSize:14,color:"#787774"},children:[Ji(N5,{children:Ji(z5,{sx:{fontSize:18,color:"#787774"}})}),"\uB77C\uBCA8 \uCD94\uAC00"]})]}),Ji(kp,{open:r,onClose:()=>t(!1),onSubmit:o})]})}function Tp(e,d){let b=Number(e.author_account_seq??0);return d.filter(l=>{let o=Number(l.account_seq??0);return o>0&&o!==b})}function Cp(e,d){let b=(e.target_account_seqs??[]).filter(a=>a>0);if(b.length===0)return null;let l=new Set(b),o=Tp(e,d),s=new Map;for(let a of o){let h=String(a.department??"").trim();if(!h)continue;let f=s.get(h)??[];f.push(a),s.set(h,f)}let r=[],t=new Set;for(let[a,h]of s)if(h.every(u=>l.has(Number(u.account_seq??0)))){r.push(a);for(let u of h)t.add(Number(u.account_seq??0))}let n=new Map(o.map(a=>[Number(a.account_seq??0),a.name])),c=e.target_names??[],i=[];return b.forEach((a,h)=>{t.has(a)||i.push(n.get(a)??c[h]??"\uC774\uB984\uC5C6\uC74C")}),{teamNames:r,individualNames:i}}function zl(e,d){let b=Cp(e,d);return b?[...b.teamNames,...b.individualNames].join(", "):"\uBAA8\uB4E0 \uC9C1\uC6D0"}function az(e,d){let b=Cp(e,d);return b?{kind:"members",teamNames:b.teamNames,individualNames:b.individualNames}:{kind:"everyone"}}function Bp(e,d,b){let l=(e.target_account_seqs??[]).filter(f=>f>0),o=Tp(e,d),s=l.length>0?l.length:o.length,r=e.acks??[],t=b>0&&r.some(f=>f.account_seq===b),n=b>0&&Number(e.author_account_seq??0)===b,c=l.length===0||l.includes(b),i=new Set(r.map(f=>f.account_seq)),h=(l.length>0?o.filter(f=>l.includes(Number(f.account_seq??0))):o).filter(f=>!i.has(Number(f.account_seq??0))).map(f=>String(f.name??"").trim()).filter(f=>f.length>0);return{count:r.length,total:s,acked:t,pendingNames:h,canAck:b>0&&!n&&c&&!t&&!e.completed}}function Ip(e,d){let b=Number(d)||50,l=b*1024*1024,o=e.filter(t=>t.size>l),s=e.filter(t=>t.size<=l),r=o.length>0?`\uD30C\uC77C\uC740 1\uAC1C\uB2F9 \uCD5C\uB300 ${b}MB \uAE4C\uC9C0 \uCCA8\uBD80\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
37
- \uC81C\uC678\uB41C \uD30C\uC77C: ${o.map(t=>t.name).join(", ")}`:null;return{accepted:s,rejected:o,message:r}}import{DatePicker as X5}from"@ehfuse/mui-datetime-picker";import{Fragment as Zs,jsx as it,jsxs as xi}from"react/jsx-runtime";var Ap="#0f9d58";function Hu({form:e,statusOptions:d,customTabs:b,sprints:l=[],avatarSrcByName:o,isNotice:s=!1,hideProject:r=!1,hideBug:t=!1,leadingRow:n,hideLabel:c=!1,employees:i=[],myAccountSeq:a=0,departments:h=[],myGroupSeq:f=0,onMemberEdit:u,onAddProject:g,onAddLabelOption:m,contentSyncKey:v="create",contentTemplates:k,onSaveContentTemplate:B,onRemoveContentTemplate:R}){let L=po(),A=Ss(),P=e.useFormValue("manager_name"),N=e.useFormValue("receiver_names"),q=e.useFormValue("start_date"),j=!!e.useFormValue("is_event"),S=!!e.useFormValue("is_bug"),T=e.useFormValue("bug_repro")??"",D=e.useFormValue("bug_device")??"",p=e.useFormValue("bug_where")??"",y=e.useFormValue("bug_version")??"",x=e.useFormValue("event_time")??"",w=e.useFormValue("event_place")??"",_=e.useFormValue("event_address")??"",C=e.useFormValue("due_date"),O=e.useFormValue("reminders")??[],z=e.useFormValue("priority"),$=e.useFormValue("content"),M=e.useFormValue("checklist")??[],H=e.useFormValue("tab_key"),I=e.useFormValue("sprint_seq")??0,E=e.useFormValue("story_points")??0,F=b.find(ee=>ee.key===H&&ee.useSprints),U=F?l.filter(ee=>`custom-${ee.group_seq}`===H):[],[Y,K]=Ys(null),W=e.useFormValue("label_keys"),[X,J]=Ys(null),G=e.useFormValue("visibility")||"involved",te=Number(e.useFormValue("visibility_group_seq")??0),[Z,re]=Ys(null),ie=e.useFormValue("repeat_rule")||"",se=e.useFormValue("repeat_until")||"",[oe,pe]=Ys(null),[me,ke]=Ys(null),Le=e.useFormValue("target_names"),Te=e.useFormValue("target_account_seqs"),nt=L.useValue("createAttachmentFiles")??[],we=s?zl({author_account_seq:a,target_names:Le,target_account_seqs:Te},i):"";return xi(Zs,{children:[n,s?null:it(yi,{sx:{display:"flex",gap:1.25,px:2,pt:1.5,pb:1.5,flexShrink:0},children:[{value:"task",label:"\uC5C5\uBB34"},{value:"event",label:"\uC77C\uC815"},...t?[]:[{value:"bug",label:"\uC624\uB958"}]].map(ee=>{let Se=S?"bug":j?"event":"task",ge=Se===ee.value;return it(F5,{onClick:()=>{if(Se===ee.value)return;e.setFormValue("is_event",ee.value==="event"),e.setFormValue("is_bug",ee.value==="bug"),e.setFormValue("visibility",ee.value==="bug"?"all":"involved"),e.setFormValue("visibility_group_seq",0),ee.value==="bug"&&(e.setFormValue("repeat_rule",""),e.setFormValue("repeat_until",""));let xe=e.getFormValue("icon"),Ze=e.getFormValue("icon_color"),Pe=[ho,"event",Ts].includes(xe),He=!Ze||Ze===Ap||Ze===Cs;Pe&&e.setFormValue("icon",ee.value==="event"?"event":ee.value==="bug"?Ts:ho),He&&e.setFormValue("icon_color",ee.value==="event"?Ap:ee.value==="bug"?Cs:"")},sx:{px:1.75,py:.75,borderRadius:99,fontSize:13.5,fontWeight:ge?600:400,color:ge?"#ffffff":"#787774",bgcolor:ge?"#2563eb":"#f4f4f2"},children:ee.label},ee.label)})}),it(Xs,{sx:{borderColor:"#e6e6e3"}}),xi(yi,{sx:{py:1.5,display:"flex",flexDirection:"column",gap:.25},children:[it(Sl,{hideProject:r,hideDueDate:!j&&!!ie,hideReminder:!!ie,values:{tabKey:H,managerName:P,receiverNames:N,startDate:q,dueDate:C,reminders:O,priority:z,eventTime:x,eventPlace:w,eventAddress:_},customTabs:b,avatarSrcByName:o,notice:s,event:j,onChangeEventTime:ee=>e.setFormValue("event_time",ee),onChangeEventPlace:ee=>e.setFormValue("event_place",ee),onChangeEventAddress:ee=>e.setFormValue("event_address",ee),targetSummary:we,onChangeProject:ee=>e.setFormValue("tab_key",ee),onAddProject:g,onChangeStartDate:ee=>e.setFormValue("start_date",ee),onChangeDueDate:ee=>e.setFormValue("due_date",ee),onChangeReminder:ee=>e.setFormValue("reminders",ee),onChangePriority:ee=>e.setFormValue("priority",ee),onMemberEdit:u,pinColumns:!0,beforeStart:xi(Zs,{children:[!s&&!S?it(pt,{icon:it(V5,{sx:{fontSize:17,...ie?{color:"#2f80ed"}:{}}}),label:"\uBC18\uBCF5",onClick:ee=>pe(ee),sx:j?void 0:rr(2),children:ie?xl(ie):it(yi,{component:"span",sx:{color:"#9a9a97"},children:"\uC5C6\uC74C"})}):null,!s&&!S&&ie?it(pt,{icon:it(K5,{sx:{fontSize:17}}),label:"\uBC18\uBCF5 \uC885\uB8CC",onClick:ee=>ke(ee),sx:j?void 0:rr(2),children:se?yn(se):it(yi,{component:"span",sx:{color:"#9a9a97"},children:"\uC790\uB3D9"})}):null]}),trailing:xi(Zs,{children:[s?null:it(pt,{icon:G==="all"?it(Mp,{sx:{fontSize:17,color:"#2f80ed"}}):G==="group"?it(Rp,{sx:{fontSize:17,color:"#d9730d"}}):it(Ep,{sx:{fontSize:17}}),label:"\uACF5\uAC1C",onClick:ee=>re(ee),sx:j?void 0:rr(1),children:G==="all"?"\uC804\uCCB4\uACF5\uAC1C":G==="group"?`\uBD80\uC11C\uACF5\uAC1C \xB7 ${h.find(ee=>ee.seq===te)?.name??"\uBD80\uC11C"}`:"\uBE44\uACF5\uAC1C"}),F&&!j&&!s?xi(Zs,{children:[it(pt,{icon:it(U5,{sx:{fontSize:17}}),label:"\uBAA9\uD45C",onClick:ee=>K(ee),sx:rr(1),children:I>0?U.find(ee=>ee.seq===I)?.name??"\uC0AD\uC81C\uB41C \uBAA9\uD45C":it(yi,{component:"span",sx:{color:"#9a9a97"},children:"\uBBF8\uBC30\uC815"})}),it(pt,{icon:it(G5,{sx:{fontSize:17}}),label:"\uD3EC\uC778\uD2B8",sx:rr(1),children:it(Bo,{value:E>0?String(E):"",placeholder:"\uBBF8\uCD94\uC815",onCommit:ee=>e.setFormValue("story_points",Number(ee.replace(/[^0-9.]/g,""))||0)})})]}):null,S?it(Tl,{values:{repro:T,device:D,where:p,version:y},onChangeRepro:ee=>e.setFormValue("bug_repro",ee),onChangeDevice:ee=>e.setFormValue("bug_device",ee),onChangeWhere:ee=>e.setFormValue("bug_where",ee),onChangeVersion:ee=>e.setFormValue("bug_version",ee)}):null]}),leading:j||c?null:it(yi,{sx:{gridColumn:"1 / -1"},children:it(pt,{icon:it(W5,{sx:{fontSize:17}}),label:"\uB77C\uBCA8",onClick:ee=>J(ee),children:(W??[]).length>0?it(qo,{labelKeys:W??[],labelOptions:d}):it(yi,{component:"span",sx:{color:"#9a9a97"},children:"\uBE44\uC5B4 \uC788\uC74C"})})})}),it(Xs,{sx:{my:1.5,borderColor:"#e6e6e3"}}),it(_n,{icon:it($5,{sx:{fontSize:18,display:"block"}}),title:"\uB0B4\uC6A9",titleExtra:k?it(Bl,{content:$,templates:k,onApply:ee=>e.setFormValue("content",ee),onSave:B,onRemove:R}):void 0,children:it(Il,{syncKey:v,value:$,onChange:ee=>e.setFormValue("content",ee)})}),j?null:it(Xs,{sx:{my:1.5,borderColor:"#e6e6e3"}}),j?null:it(Rl,{taskSeq:0,checklist:M,onAdd:(ee,Se)=>e.setFormValue("checklist",[...M,{label:Se,checked:!1}]),onToggle:(ee,Se,ge)=>e.setFormValue("checklist",M.map((xe,Ze)=>Ze===Se?{...xe,checked:ge}:xe)),onRemove:(ee,Se)=>e.setFormValue("checklist",M.filter((ge,xe)=>xe!==Se)),onUpdate:(ee,Se,ge)=>e.setFormValue("checklist",M.map((xe,Ze)=>Ze===Se?{...xe,label:ge}:xe))}),it(Xs,{sx:{my:1.5,borderColor:"#e6e6e3"}}),it(Pl,{taskSeq:0,attachments:nt.map(ee=>({name:ee.name,size:ee.size})),onAdd:(ee,Se)=>{let ge=Ip(Se,A);ge.message&&Op(ge.message),ge.accepted.length!==0&&L.setValue("createAttachmentFiles",[...L.getValue("createAttachmentFiles")??[],...ge.accepted])},onRemove:(ee,Se)=>L.setValue("createAttachmentFiles",nt.filter((ge,xe)=>xe!==Se))}),S?null:xi(Zs,{children:[it(Xs,{sx:{my:1.5,borderColor:"#e6e6e3"}}),it(_n,{icon:it(H5,{sx:{fontSize:18,display:"block"}}),title:"\uBE44\uACE0",children:it(Y5,{form:e,name:"note",placeholder:"\uBE44\uACE0 \uC785\uB825",fullWidth:!0,size:"medium",sx:{mt:1}})})]})]}),it(qu,{transitionDuration:0,anchorEl:Y,open:!!Y,onClose:()=>K(null),children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...U.map(ee=>({seq:ee.seq,label:vn(ee)}))].map(ee=>it($u,{onClick:()=>{e.setFormValue("sprint_seq",ee.seq),K(null)},sx:{fontSize:14,minWidth:170},children:ee.label},ee.seq))}),it(qu,{transitionDuration:0,anchorEl:oe,open:!!oe,onClose:()=>pe(null),children:[{value:"",label:"\uC5C6\uC74C"},...Ws].map(ee=>it($u,{selected:ie===ee.value,onClick:()=>{if(pe(null),ee.value===""){e.setFormValue("repeat_rule",""),e.setFormValue("repeat_until","");return}let Se;if(j){if(Se=String(e.getFormValue("due_date")??"").slice(0,10),!Se){Op("\uBC18\uBCF5\uD558\uB824\uBA74 \uC77C\uC815 \uB0A0\uC9DC\uB97C \uBA3C\uC800 \uC120\uD0DD\uD558\uC138\uC694.");return}}else{if(Se=String(e.getFormValue("start_date")??"").slice(0,10),!Se){let ge=new Date,xe=Ze=>String(Ze).padStart(2,"0");Se=`${ge.getFullYear()}-${xe(ge.getMonth()+1)}-${xe(ge.getDate())}`}e.setFormValue("due_date",""),e.setFormValue("reminders",[])}e.setFormValue("repeat_rule",ee.value),e.setFormValue("repeat_until",vl(Se,ee.value))},sx:{fontSize:14,minWidth:140},children:ee.label},ee.value||"none"))}),it(X5,{anchorEl:me,open:!!me,onClose:()=>ke(null),selectedDate:se?new Date(`${se}T00:00:00`):new Date,onDateChange:ee=>{let Se=ge=>String(ge).padStart(2,"0");e.setFormValue("repeat_until",`${ee.getFullYear()}-${Se(ee.getMonth()+1)}-${Se(ee.getDate())}`),ke(null)}}),it(qu,{transitionDuration:0,anchorEl:Z,open:!!Z,onClose:()=>re(null),children:[{key:"involved",label:"\uBE44\uACF5\uAC1C",tip:"\uC791\uC131\uC790\xB7\uCC45\uC784\uC790\xB7\uCC38\uC870\uC790\uB9CC \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4",icon:it(Ep,{sx:{fontSize:17,color:"#57564f"}}),selected:G==="involved",onPick:()=>{e.setFormValue("visibility","involved"),e.setFormValue("visibility_group_seq",0)}},{key:"all",label:"\uC804\uCCB4\uACF5\uAC1C",tip:"\uBAA8\uB4E0 \uC9C1\uC6D0\uC774 \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4",icon:it(Mp,{sx:{fontSize:17,color:"#2f80ed"}}),selected:G==="all",onPick:()=>{e.setFormValue("visibility","all"),e.setFormValue("visibility_group_seq",0)}},...[...h].sort((ee,Se)=>ee.seq===f?-1:Se.seq===f?1:0).map(ee=>({key:`group-${ee.seq}`,label:`\uBD80\uC11C\uACF5\uAC1C \xB7 ${ee.name}`,tip:`${ee.name} \uC18C\uC18D \uC9C1\uC6D0\uC774 \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4`,icon:it(Rp,{sx:{fontSize:17,color:"#d9730d"}}),selected:G==="group"&&te===ee.seq,onPick:()=>{e.setFormValue("visibility","group"),e.setFormValue("visibility_group_seq",ee.seq)}}))].map(ee=>it(q5,{title:ee.tip,arrow:!0,disableInteractive:!0,placement:"right",children:xi($u,{selected:ee.selected,onClick:()=>{ee.onPick(),re(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[ee.icon,ee.label]})},ee.key))}),it(Ll,{anchorEl:X,selectedKeys:W??[],labelOptions:d,onToggle:ee=>e.setFormValue("label_keys",qa(W??[],ee)),onAddLabel:(ee,Se)=>m?.(ee,Se),onClose:()=>J(null)})]})}import{Fragment as Np,jsx as Yt,jsxs as Js}from"react/jsx-runtime";function nj({open:e,onClose:d,...b}){let{form:l,presetTitle:o="",presetContent:s="",presetVisibility:r,presetVisibilityGroupSeq:t=0,presetDueDate:n="",presetTabKey:c="",presetManager:i=null,isNotice:a=!1,defaultBug:h=!1}=b,f=po(),u=J5(!1),[g,m]=Dp(0),v=l.useFormValue("title"),k=l.useFormValue("icon"),B=l.useFormValue("icon_color"),R=!!l.useFormValue("is_event"),L=!!l.useFormValue("is_bug"),A=Lt(),N=f.useValue("createSubmitting")??!1,q=a||R?Tt(k||(a?ir:cr)):null,j=a?"\uACF5\uC9C0 \uB4F1\uB85D":R?"\uC77C\uC815 \uB4F1\uB85D":L?"\uC624\uB958 \uB4F1\uB85D":"\uC5C5\uBB34 \uB4F1\uB85D",S=a?"\uACF5\uC9C0 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694":R?"\uC77C\uC815 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694":L?"\uC5B4\uB5A4 \uC624\uB958\uC778\uC9C0 \uD55C \uC904\uB85C \uC801\uC5B4\uC8FC\uC138\uC694":"\uC5C5\uBB34 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694";Z5(()=>{let x=u.current;u.current=e,!(!e||x)&&(l.setFormValues({...l.getFormValues(),title:o,icon:a?ir:h?Ts:ho,icon_color:a?"#e5484d":h?Cs:"",manager_name:i?.name??"",manager_account_seq:i?.accountSeq??0,receiver_names:[],receiver_account_seqs:[],is_notice:a,is_event:!1,is_bug:h,visibility:r??(h?"all":"involved"),visibility_group_seq:r==="group"?t:0,bug_repro:"",bug_device:"",bug_where:"",bug_version:"",event_time:"",event_place:"",event_address:"",target_names:[],target_account_seqs:[],start_date:"",due_date:n,reminders:[],priority:"medium",note:"",content:s,checklist:[],tab_key:c}),f.setValue("createAttachmentFiles",[]),m(w=>w+1))},[e]);let[T,D]=Dp(null),p=x=>q?R?Yt(r4,{title:"\uC544\uC774\uCF58 \uBCC0\uACBD",arrow:!0,enterDelay:400,disableInteractive:!0,children:Yt(Q5,{onClick:w=>D(w.currentTarget),sx:{display:"flex",p:.5,borderRadius:1,color:B||"#1e3a8a","&:hover":{bgcolor:"#f2f2f0"}},children:Yt(q,{sx:{fontSize:20}})})}):Yt(Io,{sx:[{display:"flex",color:B||"#1e3a8a"},x],children:Yt(q,{sx:{fontSize:20}})}):null,y=Js(Io,{sx:{display:"flex",alignItems:"center",gap:1,px:2,pt:2,pb:1},children:[p({p:0}),Yt(Io,{component:"input",autoFocus:!0,spellCheck:!1,value:v,placeholder:S,onChange:x=>l.setFormValue("title",x.target.value),sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:19,fontWeight:600,color:"#37352f",p:0,m:0,"&::placeholder":{color:"#c9c8c5",fontWeight:400}}})]});return A?Yt(Np,{children:Yt(i4,{open:e,onClose:d,locale:"ko",fontScale:{enabled:!0,default:1.1,min:.6},title:j,titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},fullScreen:!0,mobilePresentation:"slide",actions:{showCancelButton:!0,right:Yt(Wu,{variant:"contained",disableElevation:!0,disabled:N,onClick:N?void 0:l.submit,children:N?"\uC800\uC7A5 \uC911\u2026":"\uC800\uC7A5\uD558\uAE30"})},tabs:{visible:!1},contentTopPadding:0,contentPaddingX:0,sectionsPaddingTop:0,sectionContentPaddingTop:0,contentBottomPadding:0,scrollPastLastSection:!1,overlayScrollbar:{enabled:!0,contentStyle:{minWidth:0}},sections:[{id:"task-create",title:"",showTitle:!1,children:Yt(Io,{sx:{width:"100%",minWidth:0,display:"flex",flexDirection:"column",gap:0},children:Yt(Hu,{...b,contentSyncKey:`create-${g}`,leadingRow:y})})}]})}):Js(Np,{children:[Yt(e4,{anchor:"right",open:e,onClose:d,"aria-label":"\uC0C8 \uC5C5\uBB34 \uB4F1\uB85D",sx:{zIndex:x=>x.zIndex.modal},slotProps:{paper:{sx:{width:720,maxWidth:"100vw"}}},children:Js(Io,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[Js(Io,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1.5,flexShrink:0},children:[p({px:.5}),Yt(Io,{component:"input",autoFocus:!0,spellCheck:!1,value:v,placeholder:S,onChange:x=>l.setFormValue("title",x.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}}}),Yt(t4,{"aria-label":"\uB2EB\uAE30",onClick:d,sx:{color:"#6b7280"},children:Yt(n4,{})})]}),Yt(Pp,{sx:{borderColor:"#e6e6e3"}}),Yt(Io,{sx:{flex:1,minHeight:0},children:Yt(o4,{style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:Yt(Hu,{...b,contentSyncKey:`create-${g}`})})}),Yt(Pp,{sx:{borderColor:"#e6e6e3"}}),Js(Io,{sx:{display:"flex",justifyContent:"flex-end",gap:1,px:2,py:1.5,flexShrink:0},children:[Yt(Wu,{onClick:d,color:"inherit",disabled:N,children:"\uCDE8\uC18C"}),Yt(Wu,{onClick:l.submit,variant:"contained",disabled:N,children:N?"\uB4F1\uB85D \uC911\u2026":"\uB4F1\uB85D"})]})]})}),Yt(Wo,{anchorEl:T,value:k,color:B,onSelect:x=>{l.setFormValue("icon",x),D(null)},onSelectColor:x=>l.setFormValue("icon_color",x),onClose:()=>D(null)})]})}import{useEffect as lm,useRef as cm,useState as Ul}from"react";import{Box as Vl,Button as sk,Divider as um,Drawer as ak,IconButton as lk,ListItemIcon as tf,ListItemText as rf,Menu as ck,MenuItem as nf}from"@mui/material";import uk from"@mui/icons-material/MoreVert";import fk from"@mui/icons-material/DeleteOutline";import dk from"@mui/icons-material/ShareOutlined";import hk from"@mui/icons-material/HistoryOutlined";import pk from"@ehfuse/overlay-scrollbar";import{FormDialog as mk}from"@ehfuse/mui-form-dialog";import{SuccessAlert as fm}from"@ehfuse/alerts";import{useRef as Vu,useState as Qi}from"react";import{Box as ft,Button as Lp,Chip as jl,IconButton as Nn,Tooltip as qp}from"@mui/material";import zp from"@mui/icons-material/Send";import{TextField as s4}from"@ehfuse/mui-form-controls";import Fl from"@mui/icons-material/Close";import a4 from"@mui/icons-material/EditOutlined";import l4 from"@mui/icons-material/Favorite";import c4 from"@mui/icons-material/FavoriteBorderOutlined";import u4 from"@mui/icons-material/CheckCircle";import f4 from"@mui/icons-material/CheckCircleOutlineOutlined";import es from"@mui/icons-material/AttachFileOutlined";import d4 from"@mui/icons-material/AddCircleOutline";import h4 from"@mui/icons-material/ImageOutlined";var Uu=e=>{if(e===0)return"0 Bytes";let d=1024,b=["Bytes","KB","MB","GB","TB"],l=Math.floor(Math.log(e)/Math.log(d));return parseFloat((e/Math.pow(d,l)).toFixed(2))+" "+b[l]};import{Fragment as Fp,jsx as We,jsxs as nr}from"react/jsx-runtime";var p4=5;function jp({kind:e,reactions:d,myAccountSeq:b,onToggle:l}){let o=d??[],s=b>0&&o.some(c=>c.account_seq===b),r=e==="like"?"\uC88B\uC544\uC694":"\uD655\uC778",t=o.length===0?r:We(ft,{sx:{whiteSpace:"pre-line",fontSize:12},children:o.map(c=>`${c.name} \xB7 ${c.time}`).join(`
38
- `)}),n=e==="like"?"#e5484d":"#2f80ed";return We(qp,{title:t,arrow:!0,enterDelay:300,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:nr(ft,{sx:{display:"inline-flex",alignItems:"center"},children:[We(Nn,{size:"small","aria-label":`\uB313\uAE00 ${r}`,onClick:l,sx:{color:s?n:"#c9c8c5",p:.5},children:e==="like"?s?We(l4,{sx:{fontSize:16}}):We(c4,{sx:{fontSize:16}}):s?We(u4,{sx:{fontSize:16}}):We(f4,{sx:{fontSize:16}})}),o.length>0?We(ft,{component:"span",sx:{fontSize:12,color:s?n:"#9a9a97",ml:-.25},children:o.length}):null]})})}function $p({taskSeq:e,comments:d,currentUserName:b="",myAccountSeq:l=0,avatarSrcByName:o,onUpdate:s,onRemove:r,onToggleReaction:t,onPreview:n,onDownload:c}){let[i,a]=Qi(null),h=Vu(null),[f,u]=Qi(null),[g,m]=Qi(!1),v=Math.max(0,d.length-p4),k=v>0&&!g,B=i?Math.min(i.index,v):v,R=d.map((q,j)=>({comment:q,index:j})).slice(k?B:0),L=ks(),A=q=>{if(n){n(q);return}window.open(L(q.uuid??""),"_blank","noopener,noreferrer")},P=q=>{if(c){c(q);return}window.open(L(q.uuid??"",{download:!0}),"_blank","noopener,noreferrer")},N=$t().slots?.avatar;return nr(ft,{sx:{px:2,pb:2,display:"flex",flexDirection:"column",gap:.25},children:[nr(ft,{sx:{display:"flex",alignItems:"center",gap:1},children:[We(Ho,{sx:{fontSize:18,display:"block",color:"#37352f"}}),nr(ft,{sx:{fontSize:Eu,fontWeight:500,color:"#37352f"},children:["\uB313\uAE00",d.length>0?` (${d.length})`:""]}),v>0&&(!k||B>0)?We(ft,{role:"button",tabIndex:0,onClick:()=>m(q=>!q),onKeyDown:q=>{(q.key==="Enter"||q.key===" ")&&(q.preventDefault(),m(j=>!j))},sx:{ml:"auto",flexShrink:0,cursor:"pointer",fontSize:14.5,color:"#5b87d6","&:hover":{textDecoration:"underline"}},children:k?`\uC774\uC804 \uB313\uAE00 ${B}\uAC1C \uB354 \uBCF4\uAE30`:"\uC774\uC804 \uB313\uAE00 \uC811\uAE30"}):null]}),d.length===0?We(ft,{sx:{mt:1,fontSize:14.5,color:"#9a9a97"},children:"\uB4F1\uB85D\uB41C \uB313\uAE00\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):null,We(ft,{sx:{display:"flex",flexDirection:"column",gap:1,mt:1},children:R.map(({comment:q,index:j})=>{let S=!!b&&q.author===b;return nr(ft,{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 T=o?.get(q.author)??"";return N?We(ft,{sx:{display:"inline-flex",flexShrink:0},children:We(N,{name:q.author,src:T||void 0,size:44})}):We(ft,{sx:{display:"inline-flex",flexShrink:0},children:We(bn,{src:T,name:q.author,avatarSx:{width:44,height:44,fontSize:20,borderRadius:"50%",...Pi[0]},iconFontSize:24})})})(),nr(ft,{sx:{flex:1,minWidth:0},children:[nr(ft,{sx:{display:"flex",alignItems:"center",gap:.75,minWidth:0,position:"relative"},children:[We(ft,{component:"span",sx:{fontSize:14.5,fontWeight:700,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:q.author}),q.external?We(ft,{component:"span",sx:{flexShrink:0,px:.6,fontSize:11.5,fontWeight:500,lineHeight:"18px",color:"#d9730d",bgcolor:"#fdf0e6",borderRadius:"4px",whiteSpace:"nowrap"},children:"\uAC00\uB9F9\uC810"}):null,We(ft,{component:"span",sx:{fontSize:12.5,color:"#9a9a97",flexShrink:0,whiteSpace:"nowrap"},children:q.time}),S?We(ft,{sx:{ml:"auto"}}):nr(ft,{sx:{display:"flex",alignItems:"center",gap:.25,ml:"auto",flexShrink:0},children:[We(jp,{kind:"like",reactions:q.likes,myAccountSeq:l,onToggle:()=>t?.(e,j,"like")}),We(jp,{kind:"ack",reactions:q.acks,myAccountSeq:l,onToggle:()=>t?.(e,j,"ack")})]}),S?nr(ft,{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:[We(Nn,{size:"small","aria-label":"\uB313\uAE00 \uC218\uC815",onClick:()=>a({index:j,text:q.text,attachments:[...q.attachments??[]],files:[]}),sx:{color:"#9a9a97"},children:We(a4,{sx:{fontSize:15}})}),We(Nn,{size:"small","aria-label":"\uB313\uAE00 \uC0AD\uC81C",onClick:T=>u({anchorEl:T.currentTarget,index:j}),sx:{color:"#9a9a97"},children:We(Fl,{sx:{fontSize:15}})})]}):null]}),i?.index===j?nr(ft,{sx:{mt:.5},children:[We(ft,{component:"textarea",autoFocus:!0,spellCheck:!1,value:i.text,onChange:T=>a({...i,text:T.target.value}),sx:{width:"100%",minHeight:56,border:"1px solid #dedddb",borderRadius:1,outline:"none",font:"inherit",fontSize:14,p:1,resize:"vertical"}}),nr(ft,{sx:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:.75,mt:.75},children:[i.attachments.map((T,D)=>{let p=()=>a({...i,attachments:i.attachments.filter((y,x)=>x!==D)});return ql(T.name)&&T.uuid?nr(ft,{sx:{position:"relative"},children:[We(ft,{component:"img",src:L(T.uuid,{thumb:"md"}),alt:T.name,title:T.name,loading:"lazy",sx:{width:72,height:72,objectFit:"cover",borderRadius:1,border:"1px solid #e6e6e3",display:"block"}}),We(Nn,{size:"small","aria-label":"\uCCA8\uBD80 \uC81C\uAC70",onClick:p,sx:{position:"absolute",top:-6,right:-6,p:.25,bgcolor:"#ffffff",border:"1px solid #e6e6e3","&:hover":{bgcolor:"#f1f5f9"}},children:We(Fl,{sx:{fontSize:14}})})]},`kept-${T.uuid}-${D}`):We(jl,{size:"small",icon:We(es,{sx:{fontSize:14}}),label:T.name,onDelete:p,sx:{fontSize:14,height:26,bgcolor:"#f1f5f9"}},`kept-${T.uuid??T.name}-${D}`)}),i.files.map((T,D)=>{let p=()=>a({...i,files:i.files.filter((y,x)=>x!==D)});return ql(T.name)?nr(ft,{sx:{position:"relative"},children:[We(ft,{component:"img",src:URL.createObjectURL(T),alt:T.name,title:`${T.name} (\uC0C8 \uD30C\uC77C)`,onLoad:y=>URL.revokeObjectURL(y.target.src),sx:{width:72,height:72,objectFit:"cover",borderRadius:1,border:"2px solid #2f80ed",display:"block"}}),We(Nn,{size:"small","aria-label":"\uCCA8\uBD80 \uC81C\uAC70",onClick:p,sx:{position:"absolute",top:-6,right:-6,p:.25,bgcolor:"#ffffff",border:"1px solid #e6e6e3","&:hover":{bgcolor:"#f1f5f9"}},children:We(Fl,{sx:{fontSize:14}})})]},`new-${T.name}-${D}`):We(jl,{size:"small",icon:We(es,{sx:{fontSize:14}}),label:`${T.name} (\uC0C8 \uD30C\uC77C)`,onDelete:p,sx:{fontSize:14,height:26,bgcolor:"#eef4ff"}},`new-${T.name}-${D}`)}),We(qp,{title:"\uCCA8\uBD80 \uCD94\uAC00",arrow:!0,children:We(Nn,{size:"small","aria-label":"\uCCA8\uBD80 \uCD94\uAC00",onClick:()=>h.current?.click(),sx:{ml:"auto",color:"#2f80ed"},children:We(d4,{sx:{fontSize:20}})})})]}),nr(ft,{sx:{display:"flex",justifyContent:"flex-end",alignItems:"center",gap:.75,mt:.5},children:[We(Lp,{size:"small",color:"inherit",onClick:()=>a(null),children:"\uCDE8\uC18C"}),We(Lp,{size:"small",variant:"contained",disabled:!i.text.trim()&&i.attachments.length===0&&i.files.length===0,onClick:()=>{s(e,j,i.text,{attachments:i.attachments,files:i.files}),a(null)},children:"\uC800\uC7A5"})]}),We(ft,{component:"input",type:"file",multiple:!0,ref:h,sx:{display:"none"},onChange:T=>{let D=Array.from(T.target.files??[]);D.length>0&&a({...i,files:[...i.files,...D].slice(0,10)}),T.target.value=""}})]}):nr(ft,{children:[q.text?We(ft,{sx:{fontSize:15,whiteSpace:"pre-wrap"},children:q.text}):null,(q.attachments??[]).length>0?We(ft,{sx:{display:"flex",flexWrap:"wrap",gap:.75,mt:.75},children:(q.attachments??[]).map((T,D)=>{let p=!!T.uuid;if(ql(T.name)&&p)return We(ft,{component:"img",src:L(T.uuid??"",{thumb:"md"}),alt:T.name,title:`${T.name} \uD06C\uAC8C \uBCF4\uAE30`,loading:"lazy",onClick:()=>A(T),sx:{width:96,height:96,objectFit:"cover",borderRadius:1,border:"1px solid #e6e6e3",cursor:"pointer",bgcolor:"#f8fafc"}},`${T.name}-${D}`);let x=Ol(T.name);return We(jl,{size:"small",icon:We(es,{sx:{fontSize:14}}),label:`${T.name} (${Uu(T.size)})`,clickable:p,onClick:p?()=>x?A(T):P(T):void 0,title:p?`${T.name} ${x?"\uBBF8\uB9AC\uBCF4\uAE30":"\uB2E4\uC6B4\uB85C\uB4DC"}`:T.name,sx:{fontSize:14,height:26,bgcolor:"#f1f5f9"}},`${T.name}-${D}`)})}):null]})]})]},`${q.time}-${j}`)})}),We(kt,{open:!!f,anchorEl:f?.anchorEl??null,title:"\uC774 \uB313\uAE00\uC744 \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uC0AD\uC81C",onCancel:()=>u(null),onConfirm:()=>{f&&(r(e,f.index),a(null)),u(null)}})]})}function ql(e){return/\.(png|jpe?g|gif|webp|bmp|svg|heic|heif)$/i.test(String(e??"").trim())}function Hp({onSubmit:e}){let[d,b]=Qi(""),[l,o]=Qi([]),[s,r]=Qi(!1),t=Vu(null),n=Vu(null),c=Lt(),i=f=>{let u=Array.from(f??[]);u.length!==0&&o(g=>[...g,...u].slice(0,10))},a=()=>{let f=d.trim();!f&&l.length===0||(e(f,l.length>0?l:void 0),b(""),o([]))},h=nr(Fp,{children:[We(Nn,{size:"small","aria-label":"\uD30C\uC77C \uCCA8\uBD80",onClick:()=>t.current?.click(),sx:{color:"#9a9a97"},children:We(es,{sx:{fontSize:20}})}),We(Nn,{size:"small","aria-label":"\uC774\uBBF8\uC9C0 \uCCA8\uBD80",onClick:()=>n.current?.click(),sx:{color:"#9a9a97"},children:We(h4,{sx:{fontSize:20}})})]});return nr(ft,{children:[l.length>0?We(ft,{sx:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:1.5,px:2,pt:2},children:l.map((f,u)=>ql(f.name)?nr(ft,{sx:{position:"relative"},children:[We(ft,{component:"img",src:URL.createObjectURL(f),alt:f.name,title:f.name,onLoad:g=>URL.revokeObjectURL(g.target.src),sx:{width:72,height:72,objectFit:"cover",borderRadius:1,border:"1px solid #e6e6e3",display:"block"}}),We(Nn,{size:"small","aria-label":"\uCCA8\uBD80 \uC81C\uAC70",onClick:()=>o(g=>g.filter((m,v)=>v!==u)),sx:{position:"absolute",top:-6,right:-6,p:.25,bgcolor:"#ffffff",border:"1px solid #e6e6e3","&:hover":{bgcolor:"#f1f5f9"}},children:We(Fl,{sx:{fontSize:14}})})]},`${f.name}-${u}`):We(jl,{size:"small",icon:We(es,{sx:{fontSize:14}}),label:`${f.name} (${Uu(f.size)})`,onDelete:()=>o(g=>g.filter((m,v)=>v!==u)),sx:{fontSize:14,height:26,bgcolor:"#f1f5f9"}},`${f.name}-${u}`))}):null,nr(ft,{sx:{position:"relative",display:"flex"},onDragOver:f=>{Array.from(f.dataTransfer?.types??[]).includes("Files")&&(f.preventDefault(),r(!0))},onDragLeave:f=>{f.currentTarget.contains(f.relatedTarget)||r(!1)},onDrop:f=>{Array.from(f.dataTransfer?.types??[]).includes("Files")&&(f.preventDefault(),r(!1),i(f.dataTransfer?.files??null))},children:[s?nr(ft,{sx:{position:"absolute",inset:0,zIndex:2,display:"flex",alignItems:"center",justifyContent:"center",gap:.75,borderRadius:1,border:"2px dashed #2f80ed",bgcolor:"rgba(47,128,237,0.08)",color:"#2f80ed",fontSize:14,fontWeight:600,pointerEvents:"none"},children:[We(es,{sx:{fontSize:18}}),"\uC5EC\uAE30\uC5D0 \uB193\uC73C\uBA74 \uCCA8\uBD80\uB429\uB2C8\uB2E4"]}):null,We(s4,{value:d,placeholder:"\uB313\uAE00\uC744 \uC785\uB825\uD558\uC138\uC694",onChange:f=>b(f.target.value),onPaste:f=>{Array.from(f.clipboardData?.files??[]).length!==0&&(f.preventDefault(),i(f.clipboardData.files))},fullWidth:!0,multiline:!0,minRows:c?1:3,maxRows:3,sx:{"& .MuiInputBase-root":{pl:2,pr:c?15:6.5,pb:c?void 0:5,borderRadius:0},"& .MuiOutlinedInput-notchedOutline":{border:"none"}}}),c?nr(ft,{sx:{position:"absolute",right:8,top:"50%",transform:"translateY(-50%)",display:"flex",alignItems:"center",gap:.25},children:[h,We(Nn,{"aria-label":"\uB313\uAE00 \uB4F1\uB85D",disabled:!d.trim()&&l.length===0,onClick:a,sx:{color:"#2563eb","&.Mui-disabled":{color:"#c9c8c5"}},children:We(zp,{sx:{fontSize:22}})})]}):nr(Fp,{children:[We(ft,{sx:{position:"absolute",left:8,bottom:6,display:"flex",alignItems:"center",gap:.25},children:h}),We(Nn,{"aria-label":"\uB313\uAE00 \uB4F1\uB85D",disabled:!d.trim()&&l.length===0,onClick:a,sx:{position:"absolute",right:8,top:"50%",transform:"translateY(-50%)",color:"#2563eb","&.Mui-disabled":{color:"#c9c8c5"}},children:We(zp,{sx:{fontSize:22}})})]})]}),We(ft,{component:"input",ref:t,type:"file",multiple:!0,onChange:f=>{i(f.target.files),f.target.value=""},sx:{display:"none"}}),We(ft,{component:"input",ref:n,type:"file",accept:"image/*",multiple:!0,onChange:f=>{i(f.target.files),f.target.value=""},sx:{display:"none"}})]})}import{useState as Qs}from"react";import{Box as rs,ButtonBase as T4,IconButton as ns,Tooltip as os}from"@mui/material";import C4 from"@mui/icons-material/Close";import B4 from"@mui/icons-material/ArrowBack";import I4 from"@mui/icons-material/ShareOutlined";import E4 from"@mui/icons-material/ContentCopyOutlined";import M4 from"@mui/icons-material/HistoryOutlined";import R4 from"@mui/icons-material/Print";import{useEffect as m4}from"react";import{Box as Eo,Button as g4,CircularProgress as b4}from"@mui/material";import{FormDialog as y4}from"@ehfuse/mui-form-dialog";import{OverlayScrollbar as x4}from"@ehfuse/overlay-scrollbar";import{jsx as Mo,jsxs as $l}from"react/jsx-runtime";var v4={created:"\uC5C5\uBB34\uB97C \uB4F1\uB85D\uD588\uC2B5\uB2C8\uB2E4",completed:"\uC644\uB8CC \uCC98\uB9AC\uD588\uC2B5\uB2C8\uB2E4",uncompleted:"\uC644\uB8CC\uB97C \uD574\uC81C\uD588\uC2B5\uB2C8\uB2E4",confirm_requested:"\uD655\uC778\uC744 \uC694\uCCAD\uD588\uC2B5\uB2C8\uB2E4",acked:"\uD655\uC778\uD588\uC2B5\uB2C8\uB2E4",claimed:"\uC5C5\uBB34\uB97C \uAC00\uC838\uAC14\uC2B5\uB2C8\uB2E4",bug_verified:"\uC218\uC815\uC744 \uD655\uC778\uD588\uC2B5\uB2C8\uB2E4(\uC885\uB8CC)",bug_reopened:"\uC7AC\uC624\uD508\uD588\uC2B5\uB2C8\uB2E4"};function Wp(e){return String(e??"").trim()||"\uC5C6\uC74C"}function w4(e){if(e.kind!=="field")return v4[String(e.kind)]??"\uBCC0\uACBD\uD588\uC2B5\uB2C8\uB2E4";let d=String(e.field_label??e.field??"").trim()||"\uD56D\uBAA9",b=String(e.old_value??"").trim(),l=String(e.new_value??"").trim();return!b&&l?`${d}\uC744(\uB97C) "${l}"(\uC73C)\uB85C \uC785\uB825\uD588\uC2B5\uB2C8\uB2E4`:b&&!l?`${d}\uC744(\uB97C) \uBE44\uC6E0\uC2B5\uB2C8\uB2E4`:`${d}\uC744(\uB97C) "${Wp(b)}" \u2192 "${Wp(l)}" \uB85C \uBC14\uAFE8\uC2B5\uB2C8\uB2E4`}function Hl({open:e,taskSeq:d,items:b,loading:l,onLoad:o,onClose:s}){let r=Lt();m4(()=>{e&&d>0&&!b&&o?.(d)},[e,d,b,o]);let t=Mo(Eo,{sx:{height:r?"100%":420,minHeight:0},children:Mo(x4,{style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:$l(Eo,{sx:{px:2,pt:2,display:"flex",flexDirection:"column",gap:1,"&::after":{content:'""',flexShrink:0,height:16}},children:[l&&!b?$l(Eo,{sx:{display:"flex",alignItems:"center",gap:1,color:"#9a9a97",fontSize:14.5},children:[Mo(b4,{size:14,thickness:5,sx:{color:"#9a9a97"}}),"\uBD88\uB7EC\uC624\uB294 \uC911\u2026"]}):null,b&&b.length===0?Mo(Eo,{sx:{fontSize:14.5,color:"#9a9a97"},children:"\uAE30\uB85D\uB41C \uD65C\uB3D9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):null,(b??[]).map(n=>$l(Eo,{sx:{display:"flex",flexDirection:r?"column":"row",gap:r?.25:1,alignItems:r?"stretch":"baseline",minWidth:0,flexShrink:0,...r?{pb:1,borderBottom:"1px solid #ededeb","&:last-of-type":{borderBottom:"none",pb:0}}:{}},children:[Mo(Eo,{sx:{flexShrink:0,...r?{}:{width:"10.5em"},whiteSpace:"nowrap",fontSize:13.5,color:"#9a9a97",lineHeight:1.5},children:un(n.acted_time)}),$l(Eo,{sx:{minWidth:0,fontSize:14.5,color:"#37352f",lineHeight:1.5},children:[Mo(Eo,{component:"span",sx:{fontWeight:500},children:String(n.actor_name??"").trim()||"\uC774\uB984\uC5C6\uC74C"}),Mo(Eo,{component:"span",sx:{ml:.5},children:w4(n)})]})]},n.seq))]})})});return Mo(y4,{open:e,onClose:s,maxWidth:"sm",fullScreen:r,mobilePresentation:r?"slide":"dialog",contentPaddingX:0,contentTopPadding:0,contentBottomPadding:0,sectionsPaddingTop:0,sectionContentPaddingTop:0,sx:r?{DialogContent:{pb:0,"& .os-content > div":{height:"100%",boxSizing:"border-box",paddingBottom:0,marginBottom:0},"& .FormSection-content, & .section-content":{height:"100%",paddingBottom:0,marginBottom:0}}}:void 0,title:`\uD65C\uB3D9${b&&b.length>0?` (${b.length})`:""}`,locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-task-activity",sections:[{id:"task-activity",showTitle:!1,children:t}],scrollPastLastSection:!1,actions:{showCancelButton:!1,right:Mo(g4,{variant:"contained",onClick:s,children:"\uB2EB\uAE30"})}})}import{InfoAlert as _4,SuccessAlert as k4}from"@ehfuse/alerts";var Up=e=>e?e.replace(/<(script|style)[\s\S]*?<\/\1>/gi,"").replace(/<br\s*\/?>/gi,`
36
+ `).trim()}function Il({syncKey:e,value:d,onChange:b,readOnly:l=!1,minHeight:o=180,height:s=0,onChangeHeight:r}){let{uploadContentImage:t}=$t(),n=Zo(null),c=Zo(new q3),i=Zo(null),a=s>0?s:0,h=Zo(a),f=Zo(r);f.current=r;let u=Zo(null),g=Zo(Date.now()+800),[m,v]=P3(!1),k=Lt();Au(()=>{if(l)return;let R=Pu(d);u.current===R||u.current===d||(u.current=R,g.current=Date.now()+800,n.current?.setHtml(R))},[e,d,l]);let B=Zo(-1);return Au(()=>{if(l||k||s<=0||B.current===s||(B.current=s,Math.abs(s-h.current)<1))return;let R=i.current?.querySelector(".ehfuse-editor-container");R&&(Math.abs(R.getBoundingClientRect().height-s)<1||(R.style.height=`${s}px`,h.current=s))},[l,k,s]),Au(()=>{if(l||k)return;let R=i.current?.querySelector(".ehfuse-editor-container");if(!R||typeof ResizeObserver>"u")return;let L,A=new ResizeObserver(P=>{let N=Math.round(P[0]?.contentRect.height??0);N<=0||(window.clearTimeout(L),L=window.setTimeout(()=>{Math.abs(N-h.current)<1||(h.current=N,f.current?.(N))},300))});return A.observe(R),()=>{window.clearTimeout(L),A.disconnect()}},[l,k]),l?W3(Du,{sx:{position:"relative",mt:1},children:[bi(Du,{sx:{border:"1px solid #e0e0e0",borderRadius:1,p:"12px",pr:"40px",minHeight:o,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:Pu(d)}}),bi(L3,{title:"\uB0B4\uC6A9 \uBCF5\uC0AC",arrow:!0,children:bi(N3,{size:"small","aria-label":"\uB0B4\uC6A9 \uBCF5\uC0AC",onClick:()=>{navigator.clipboard.writeText(H3(d)).then(()=>{v(!0),window.setTimeout(()=>v(!1),1500)})},sx:{position:"absolute",top:6,right:6,color:"#9a9a97"},children:m?bi(j3,{sx:{fontSize:17,color:"#2f9e5b"}}):bi(z3,{sx:{fontSize:17}})})})]}):bi(Du,{ref:i,onDragOver:R=>R.stopPropagation(),onDrop:R=>R.stopPropagation(),sx:{mt:1,"& .ehfuse-editor-content > p:first-of-type":{mt:0},"& .ehfuse-editor-content > p:last-of-type":{mb:0},"& .ehfuse-editor-content.ehfuse-editor-empty::before":{top:"12px",left:"12px"}},children:bi(F3,{ref:n,defaultValue:Pu(d),autoHeight:k,resizable:!k,showToolbar:!k,focusBorder:!0,styles:{focusBorderColor:"var(--primary)"},toolbarOptions:$3,plugins:[c.current],locale:"ko",minHeight:a||o,placeholder:"\uB0B4\uC6A9\uC744 \uC785\uB825\uD558\uC138\uC694",onImageUpload:t,contentStyle:{padding:"12px"},onChange:R=>{let L=Date.now()<g.current,A=R===u.current;u.current=R,!(L||A)&&b(R)}})})}import{useState as Xi}from"react";import{Box as hr,Button as pp,Dialog as r5,IconButton as Zi,Switch as n5,TextField as o5,Tooltip as Lu}from"@mui/material";import{DndContext as i5,PointerSensor as s5,closestCenter as a5,useSensor as l5,useSensors as c5}from"@dnd-kit/core";import{restrictToParentElement as u5,restrictToVerticalAxis as f5}from"@dnd-kit/modifiers";import{SortableContext as d5,arrayMove as h5,useSortable as p5,verticalListSortingStrategy as m5}from"@dnd-kit/sortable";import{CSS as g5}from"@dnd-kit/utilities";import mp from"@mui/icons-material/Close";import b5 from"@mui/icons-material/AddCircle";import gp from"@mui/icons-material/AddTask";import y5 from"@mui/icons-material/Checklist";import x5 from"@mui/icons-material/CheckCircle";import v5 from"@mui/icons-material/DragIndicator";import w5 from"@mui/icons-material/Launch";import _5 from"@mui/icons-material/LinkOutlined";import k5 from"@mui/icons-material/RadioButtonUnchecked";import{useEffect as U3,useMemo as V3,useState as Nu}from"react";import{Box as to,Button as K3,Tab as G3,Tabs as Y3}from"@mui/material";import{FormDialog as X3}from"@ehfuse/mui-form-dialog";import{ClearTextField as Z3}from"@ehfuse/mui-form-controls";import{ErrorAlert as J3}from"@ehfuse/alerts";import Q3 from"@mui/icons-material/CheckCircle";import e5 from"@mui/icons-material/RadioButtonUnchecked";import{OverlayScrollbar as t5}from"@ehfuse/overlay-scrollbar";import{jsx as Ar,jsxs as El}from"react/jsx-runtime";var hp=[{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 Ml({open:e,task:d,tasks:b,excludeSeqs:l=[],onClose:o,onSubmit:s,hideRelationType:r=!1,title:t="\uAD00\uB828 \uC5C5\uBB34 \uC5F0\uACB0",confirmLabel:n="\uC5F0\uACB0",multiSelect:c=!1}){let i=Lt(),[a,h]=Nu("related"),[f,u]=Nu(""),[g,m]=Nu([]);U3(()=>{e&&(h("related"),u(""),m([]))},[e]);let v=V3(()=>{let A=new Set([d.seq,...l]),P=f.trim().toLowerCase();return b.filter(N=>A.has(N.seq)||N.is_event||N.is_notice||N.linked_only?!1:P?N.title.toLowerCase().includes(P)||(N.ticket_no??"").toLowerCase().includes(P):!0).sort((N,q)=>!!N.completed!=!!q.completed?N.completed?1:-1:q.seq-N.seq)},[b,d.seq,l,f]),k=()=>{if(g.length===0){J3("\uC5F0\uACB0\uD560 \uC5C5\uBB34\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return}for(let A of g)s(A,a);o()},B=A=>{m(P=>P.includes(A)?P.filter(N=>N!==A):c?[...P,A]:[A])},R=hp.find(A=>A.type===a)?.hint??"",L=El(to,{sx:{display:"flex",flexDirection:"column",minHeight:0,height:i?"100%":"auto"},children:[r?null:Ar(Y3,{value:a,onChange:(A,P)=>h(P),sx:{minHeight:38,flexShrink:0,borderBottom:"1px solid #ededeb","& .MuiTab-root":{minHeight:38,py:.5,fontSize:16,color:"#333333"}},children:hp.map(A=>Ar(G3,{value:A.type,label:A.label},A.type))}),r?null:Ar(to,{sx:{mt:1,mb:1.5,fontSize:14,flexShrink:0},children:R}),El(to,{sx:{...i?{height:"100%",minHeight:0}:{height:560},display:"flex",flexDirection:"column",...i?{}:{border:"1px solid #cccccc",borderRadius:1},overflow:"hidden",userSelect:"none"},children:[Ar(to,{sx:{px:1.5,py:1,borderBottom:"1px solid #cccccc",flexShrink:0},children:Ar(Z3,{placeholder:"\uC81C\uBAA9\xB7\uD2F0\uCF13\uBC88\uD638\uB85C \uAC80\uC0C9",value:f,onChange:A=>u(A.target.value),fullWidth:!0,autoFocus:!0,size:"small",sx:{"& .MuiOutlinedInput-notchedOutline":{border:"none"},"& .MuiInputBase-root":{px:0}}})}),Ar(to,{sx:{flex:1,minHeight:0},children:Ar(t5,{style:{height:"100%"},contentStyle:{paddingTop:0},children:Ar(to,{sx:{display:"flex",flexDirection:"column"},children:v.length===0?Ar(to,{sx:{py:4,textAlign:"center",fontSize:13.5,color:"#9a9a97"},children:"\uC5F0\uACB0\uD560 \uC218 \uC788\uB294 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):v.map(A=>{let P=A.is_notice||A.is_event?Tt(A.icon||(A.is_notice?ir:cr)):null,N=g.includes(A.seq);return El(to,{onClick:()=>B(A.seq),sx:{display:"flex",alignItems:"center",gap:.75,px:1.5,py:1.25,flexShrink:0,cursor:"pointer",borderBottom:"1px solid #ededeb","&:last-of-type":{borderBottom:"none"},bgcolor:N?"#e3eefb":"transparent","&:hover":{bgcolor:N?"#e3eefb":"#f7f7f5"}},children:[N?Ar(Q3,{sx:{fontSize:20,flexShrink:0,color:"#2f6fd0"}}):Ar(e5,{sx:{fontSize:20,flexShrink:0,color:"#c9c8c5"}}),P?Ar(P,{sx:{fontSize:17,flexShrink:0,color:A.icon_color||"#1e3a8a"}}):null,El(to,{component:"span",sx:{flex:1,minWidth:0,fontSize:15,color:"#37352f",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:3,overflow:"hidden",lineHeight:1.5,wordBreak:"break-word"},children:[A.ticket_no?`${A.ticket_no} `:"",A.title]}),Ar(to,{sx:{flexShrink:0,display:"flex",alignItems:"center"},children:Ar(At,{option:ur(A)})})]},A.seq)})})})})]})]});return Ar(X3,{open:e,onClose:o,maxWidth:"sm",fullScreen:i,mobilePresentation:i?"slide":"dialog",...i?{contentPaddingX:0,contentTopPadding:0,sectionsPaddingTop:0}:{},sx:i?{DialogContent:{pb:0,"& .os-content > div":{height:"100%",boxSizing:"border-box",paddingBottom:0,marginBottom:0},"& .FormSection-content, & .section-content":{height:"100%",paddingBottom:0,marginBottom:0}}}:void 0,title:t,locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-task-link",sections:[{id:"task-link",showTitle:!1,children:L}],scrollPastLastSection:!1,sectionContentPaddingTop:0,contentTopPadding:12,actions:{showCancelButton:!0,right:Ar(K3,{variant:"contained",disabled:g.length===0,onClick:k,children:n})}})}import{Fragment as C5,jsx as ut,jsxs as ro}from"react/jsx-runtime";var bp="taskbox.checklist.hideCompleted";function S5({id:e,children:d}){let{attributes:b,listeners:l,setNodeRef:o,transform:s,transition:r,isDragging:t}=p5({id:e});return ut(hr,{ref:o,sx:{transform:g5.Transform.toString(s),transition:r,...t?{opacity:.6,position:"relative",zIndex:1}:{}},children:d({handleProps:{...b,...l},dragging:t})})}function T5({sortable:e,sensors:d,rowIds:b,onDragEnd:l,children:o}){let s=ut(hr,{sx:{display:"flex",flexDirection:"column",mt:.5,pl:3.25},children:o});return e?ut(i5,{sensors:d,collisionDetection:a5,modifiers:[f5,u5],onDragEnd:l,children:ut(d5,{items:b,strategy:m5,children:s})}):s}function Rl({taskSeq:e,checklist:d,onAdd:b,onToggle:l,onRemove:o,onUpdate:s,onReorder:r,removeLocked:t=!1,onConvertToTask:n,onOpenLinkedTask:c,linkCandidates:i,linkBaseTask:a,onLinkExistingTask:h,resolveLinkedTask:f,myAccountSeq:u=0}){let[g,m]=Xi(""),[v,k]=Xi(!1),[B,R]=Xi(null),L=Lt(),[A,P]=Xi(null),[N,q]=Xi(null),j=H=>{let I=H.task_seq?f?.(H.task_seq):void 0;return I?I.completed:H.checked},S=H=>{if(!H.task_seq||u<=0)return!1;let I=f?.(H.task_seq);return I?!Md(I,u):!1},T=H=>!!H.task_seq&&!!f&&!f?.(H.task_seq),D=d.filter(H=>!T(H)),p=D.filter(j).length,[y,x]=Xi(()=>{try{return localStorage.getItem(bp)==="1"}catch{return!1}}),w=H=>{x(H);try{localStorage.setItem(bp,H?"1":"0")}catch{}},_=!!r&&!L&&!t,C=c5(l5(s5,{activationConstraint:{distance:5}})),O=(H,I)=>H.task_seq?`linked-${H.task_seq}`:`row-${I}`,z=d.map(O),$=z.filter((H,I)=>{let E=d[I];return T(E)?!1:!(y&&j(E))}),V=H=>{let{active:I,over:E}=H;if(!E||I.id===E.id)return;let F=z.indexOf(String(I.id)),U=z.indexOf(String(E.id));F<0||U<0||r?.(e,h5(d,F,U))},M=()=>{g.trim()&&(b(e,g),m(""))};return ro(_n,{icon:ut(y5,{sx:{fontSize:19,display:"block"}}),title:ro(C5,{children:["\uD560\uC77C",d.length>0?ro(hr,{component:"span",sx:{fontSize:12.5,color:"#9a9a97"},children:[p," / ",d.length]}):null]}),titleExtra:D.length>0?ro(hr,{sx:{flex:1,minWidth:0,ml:1,display:"flex",alignItems:"center",gap:1},children:[ut(hr,{sx:{flex:1,minWidth:0,height:6,borderRadius:3,bgcolor:"#ececea"},children:ut(hr,{sx:{height:"100%",borderRadius:3,width:`${Math.round(p/D.length*100)}%`,bgcolor:"#2f80ed",transition:"width 0.2s"}})}),p>0?ro(hr,{component:"label",sx:{display:"inline-flex",alignItems:"center",gap:.25,flexShrink:0,cursor:"pointer",fontSize:13.5,fontWeight:400,color:"#57564f",userSelect:"none"},children:[ut(n5,{size:"small",checked:y,onChange:(H,I)=>w(I)}),"\uC644\uB8CC\uC228\uAE40"]}):null]}):null,children:[ut(T5,{sortable:_,sensors:C,rowIds:$,onDragEnd:V,children:d.map((H,I)=>{let E=H.task_seq?f?.(H.task_seq):void 0,F=j(H);if(y&&F||T(H))return null;let U=!!H.task_seq,Y=S(H),K=W=>ro(hr,{sx:{display:"flex",alignItems:L?"flex-start":"center",gap:1,px:1.25,..._?{ml:-3,pl:.5}:{},py:.5,borderRadius:1,"&:hover":{bgcolor:"#f7f7f5"},"&:hover .taskbox-checklist-remove":{opacity:1},"&:hover .taskbox-checklist-convert":{opacity:1},"&:hover .taskbox-checklist-handle":{opacity:1}},children:[W?ut(hr,{className:"taskbox-checklist-handle",...W,sx:{display:"inline-flex",flexShrink:0,alignItems:"center",color:"#c9c8c5",opacity:0,transition:"opacity 0.15s",cursor:"grab","&:active":{cursor:"grabbing"},touchAction:"none",userSelect:"none"},children:ut(v5,{sx:{fontSize:16}})}):null,ut(Lu,{title:Y?"\uC5F0\uACB0 \uC5C5\uBB34\uC758 \uC791\uC131\uC790\xB7\uCC45\uC784\uC790\uB9CC \uC644\uB8CC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4":"",arrow:!0,disableInteractive:!0,children:ut(hr,{component:"span",onClick:Y?void 0:()=>l(e,I,!F),sx:{display:"inline-flex",flexShrink:0,cursor:Y?"default":"pointer",...L?{mt:"1px"}:{}},children:F?ut(x5,{sx:{fontSize:18,color:Y?"#a9c6ec":"#2f80ed"}}):ut(k5,{sx:{fontSize:18,color:Y?"#d6d5d1":"#9a9a97"}})})}),B?.index===I?ut(hr,{component:"input",autoFocus:!0,spellCheck:!1,value:B.label,enterKeyHint:"done",onChange:X=>R({index:I,label:X.target.value}),onBlur:()=>{B.label.trim()&&B.label.trim()!==H.label&&s?.(e,I,B.label),R(null)},onKeyDown:X=>{X.key==="Enter"&&X.target.blur(),X.key==="Escape"&&R(null)},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:14,color:"#37352f",bgcolor:"transparent",p:0}}):ut(hr,{component:"span",onClick:U?H.task_seq&&c?()=>c(H.task_seq):void 0:t||!s?void 0:L?()=>P({index:I,label:H.label}):()=>R({index:I,label:H.label}),sx:{flex:1,minWidth:0,fontSize:14.5,color:"#37352f",textDecoration:F?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",...L?{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:3,lineHeight:1.4,wordBreak:"break-word"}:{whiteSpace:"nowrap"},...U?c?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}:t||!s?{}:{cursor:"text"}},children:H.label}),U?ro(hr,{component:"span",onClick:H.task_seq&&c?()=>c(H.task_seq):void 0,sx:{display:"inline-flex",alignItems:"center",gap:.4,flexShrink:0,...L?{mt:"1px"}:{},px:.75,py:.2,borderRadius:1,fontSize:12,fontWeight:500,color:"#1d4f91",bgcolor:"#e3eefb",whiteSpace:"nowrap",...c?{cursor:"pointer"}:{}},children:[ut(w5,{sx:{fontSize:12}}),E?.manager_name?.trim()||"\uC5C5\uBB34"]}):null,!t&&!U&&n?ut(Lu,{title:"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",arrow:!0,enterDelay:300,disableInteractive:!0,children:ut(Zi,{className:"taskbox-checklist-convert",size:"small","aria-label":"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",onClick:X=>q({anchorEl:X.currentTarget,index:I,label:H.label}),sx:{display:L?"none":"inline-flex",opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:ut(gp,{sx:{fontSize:16}})})}):null,t?null:ut(Zi,{className:"taskbox-checklist-remove",size:"small","aria-label":"\uD560\uC77C \uC0AD\uC81C",onClick:()=>o(e,I),sx:{display:L?"none":"inline-flex",opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:ut(mp,{sx:{fontSize:15}})})]});return _?ut(S5,{id:z[I],children:({handleProps:W})=>K(W)},z[I]):ut(hr,{children:K(null)},z[I])})}),ro(hr,{sx:{mt:.5,ml:3.25,display:"flex",alignItems:"center",gap:.5},children:[ut(hr,{component:"input",spellCheck:!1,value:g,placeholder:"+ \uD560\uC77C \uCD94\uAC00",enterKeyHint:"done",onChange:H=>m(H.target.value),onKeyDown:H=>{H.key==="Enter"&&M()},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"}}}),i&&a&&h?ut(Lu,{title:"\uAE30\uC874 \uC5C5\uBB34 \uBD99\uC774\uAE30",arrow:!0,children:ut(Zi,{size:"small","aria-label":"\uAE30\uC874 \uC5C5\uBB34 \uBD99\uC774\uAE30",onMouseDown:H=>H.preventDefault(),onClick:()=>k(!0),sx:{flexShrink:0,color:"#9a9a97"},children:ut(_5,{sx:{fontSize:20}})})}):null,ut(Zi,{size:"small","aria-label":"\uD560\uC77C \uCD94\uAC00",disabled:!g.trim(),onMouseDown:H=>H.preventDefault(),onClick:M,sx:{flexShrink:0,color:g.trim()?"#2f80ed":"#c9c8c5"},children:ut(b5,{sx:{fontSize:20}})})]}),i&&a&&h?ut(Ml,{open:v,task:a,tasks:i,excludeSeqs:d.map(H=>Number(H.task_seq??0)).filter(H=>H>0),hideRelationType:!0,multiSelect:!0,title:"\uAE30\uC874 \uC5C5\uBB34 \uBD99\uC774\uAE30",confirmLabel:"\uBD99\uC774\uAE30",onClose:()=>k(!1),onSubmit:H=>{let I=i.find(E=>E.seq===H);h(e,H,String(I?.title??"").trim())}}):null,ut(kt,{open:!!N,anchorEl:N?.anchorEl??null,title:"\uC774 \uD560\uC77C\uC744 \uBCC4\uB3C4 \uC5C5\uBB34\uB85C \uB9CC\uB4DC\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uB9CC\uB4E4\uAE30",onCancel:()=>q(null),onConfirm:()=>{N&&n?.(e,N.index,N.label),q(null)}}),ut(r5,{open:!!A,onClose:()=>P(null),maxWidth:"xs",fullWidth:!0,slotProps:{paper:{sx:{borderRadius:2,m:2}}},children:ro(hr,{sx:{p:2,display:"flex",flexDirection:"column",gap:1.5},children:[ut(hr,{sx:{fontSize:15.5,fontWeight:600,color:"#37352f"},children:"\uD560\uC77C \uC218\uC815"}),ut(o5,{autoFocus:!0,fullWidth:!0,size:"medium",value:A?.label??"",onChange:H=>P(I=>I&&{...I,label:H.target.value}),onKeyDown:H=>{if(H.key!=="Enter")return;let I=A;I&&I.label.trim()&&s?.(e,I.index,I.label.trim()),P(null)}}),ro(hr,{sx:{display:"flex",alignItems:"center",gap:1},children:[!t&&n&&A&&!d[A.index]?.task_seq?ut(Zi,{"aria-label":"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",onClick:()=>{n(e,A.index,d[A.index]?.label??""),P(null)},sx:{color:"#57564f"},children:ut(gp,{sx:{fontSize:20}})}):null,!t&&A?ut(Zi,{"aria-label":"\uD560\uC77C \uC0AD\uC81C",onClick:()=>{o(e,A.index),P(null)},sx:{color:"#e5484d"},children:ut(mp,{sx:{fontSize:19}})}):null,ut(hr,{sx:{flex:1}}),ut(pp,{color:"inherit",onClick:()=>P(null),children:"\uCDE8\uC18C"}),ut(pp,{variant:"contained",disabled:!A?.label.trim(),onClick:()=>{A&&A.label.trim()&&s?.(e,A.index,A.label.trim()),P(null)},children:"\uD655\uC778"})]})]})})]})}import{useRef as O5,useState as A5}from"react";import{Box as no,IconButton as D5}from"@mui/material";import P5 from"@mui/icons-material/Close";import vp from"@mui/icons-material/AttachFileOutlined";var B5=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"]),Ol=e=>{let d=e?.split(".").pop()?.toLowerCase()??"";return B5.has(d)};import{LinearProgress as I5}from"@mui/material";import{Fragment as E5,jsx as R5,jsxs as M5}from"react/jsx-runtime";function yp(e){let d=po(),b=d.useValue("attachmentUpload.taskSeq"),l=d.useValue("attachmentUpload.index"),o=d.useValue("attachmentUpload.total"),s=d.useValue("attachmentUpload.queue"),r=l??0;return!r||e>0&&(b??0)!==e?null:{index:r,total:o??0,queue:s??[]}}function zu(){let d=po().useValue("attachmentUpload.progress");return M5(E5,{children:[d??0,"%"]})}function xp(){let d=po().useValue("attachmentUpload.progress");return R5(I5,{variant:"determinate",value:d??0,sx:{height:4,borderRadius:2,bgcolor:"#dbe9fb",mt:.75}})}import{Fragment as N5,jsx as tn,jsxs as Ks}from"react/jsx-runtime";function Al(e){return e>=1048576?`${(e/1048576).toFixed(1)}MB`:`${Math.max(1,Math.round(e/1024))}KB`}var Dl={flex:1,minWidth:0,fontSize:13.5,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"};function Pl({taskSeq:e,attachments:d,onAdd:b,onRemove:l,removeLocked:o=!1,onPreview:s,onDownload:r}){let[t,n]=A5(!1),c=O5(null),i=Lt(),a=Ss(),h=ks(),f=yp(e),u=e===0,g=R=>{if(s){s(R);return}window.open(h(R.uuid??""),"_blank","noopener,noreferrer")},m=R=>{if(r){r(R);return}window.open(h(R.uuid??"",{download:!0}),"_blank","noopener,noreferrer")},v=R=>f?R+1<f.index?"done":R+1===f.index?"uploading":"waiting":"waiting",k=(R,L,A,P={})=>Ks(no,{sx:{px:1,py:.5,borderRadius:1,border:"1px solid",borderColor:P.uploading?"#d5e6fb":"#e6e6e3",bgcolor:P.uploading?"#f4f9ff":"transparent","&:hover .taskbox-file-remove":{opacity:1}},children:[Ks(no,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[tn(vp,{sx:{fontSize:16,color:"#9a9a97"}}),L,tn(no,{component:"span",sx:{fontSize:12,color:P.uploading?"#2f80ed":"#9a9a97",flexShrink:0},children:A}),P.removeIndex!==void 0?tn(D5,{className:"taskbox-file-remove",size:"small","aria-label":"\uCCA8\uBD80 \uC0AD\uC81C",onClick:()=>l(e,P.removeIndex),sx:{opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:tn(P5,{sx:{fontSize:15}})}):null]}),P.uploading?tn(xp,{}):null]},R),B=R=>{let L=Ol(R.name);return tn(no,{component:"button",type:"button",onClick:()=>L?g(R):m(R),title:`${R.name} ${L?"\uBBF8\uB9AC\uBCF4\uAE30":"\uB2E4\uC6B4\uB85C\uB4DC"}`,sx:{...Dl,color:"#37352f",textAlign:"left",p:0,border:"none",background:"none",font:"inherit",fontSize:13.5,cursor:"pointer","&:hover":{textDecoration:"underline",color:"#2f80ed"}},children:R.name})};return Ks(_n,{icon:tn(vp,{sx:{fontSize:18,display:"block"}}),title:Ks(N5,{children:["\uD30C\uC77C ",d.length>0?d.length:""]}),children:[Ks(no,{sx:{display:"flex",flexDirection:"column",gap:.5,mt:1},children:[d.map((R,L)=>{let A=`${R.uuid||R.name}-${L}`;if(u){let P=v(L),N=P==="uploading";return k(A,tn(no,{component:"span",sx:{...Dl,color:P==="done"?"#37352f":"#9a9a97"},children:R.name}),N?tn(zu,{}):Al(R.size),{uploading:N,removeIndex:!o&&!f?L:void 0})}return R.uuid?k(A,B(R),Al(R.size),{removeIndex:o?void 0:L}):k(A,tn(no,{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:{...Dl,color:"#9a9a97"},children:R.name}),Al(R.size),{removeIndex:o?void 0:L})}),!u&&f?f.queue.slice(f.index-1).map((R,L)=>{let A=L===0;return k(`uploading-${f.index+L}-${R.name}`,tn(no,{component:"span",sx:{...Dl,color:"#9a9a97"},children:R.name}),A?tn(zu,{}):Al(R.size),{uploading:A})}):null]}),tn(no,{onClick:()=>c.current?.click(),onDragOver:R=>{R.preventDefault(),n(!0)},onDragLeave:()=>n(!1),onDrop:R=>{R.preventDefault(),n(!1);let L=Array.from(R.dataTransfer.files);L.length>0&&b(e,L)},sx:{mt:1,py:2.5,display:"flex",alignItems:"center",justifyContent:"center",gap:.5,border:"1.5px dashed",borderColor:t?"#2f80ed":"#cfcfcc",borderRadius:1,bgcolor:t?"#eef6ff":"transparent",color:"#787774",fontSize:13.5,cursor:"pointer",transition:"background-color 0.15s, border-color 0.15s","&:hover":{bgcolor:"#fafaf9",borderColor:"#9a9a97"}},children:i?`\uD30C\uC77C\uC744 \uCCA8\uBD80\uD558\uC138\uC694 (\uCD5C\uB300 ${a}MB)`:`\uD30C\uC77C\uC744 \uB04C\uC5B4\uB2E4 \uB193\uAC70\uB098 \uD074\uB9AD\uD574 \uCCA8\uBD80\uD558\uC138\uC694 (\uCD5C\uB300 ${a}MB)`}),tn(no,{component:"input",ref:c,type:"file",multiple:!0,onChange:R=>{let L=Array.from(R.target.files??[]);L.length>0&&b(e,L),R.target.value=""},sx:{display:"none"}})]})}import{useState as H5}from"react";import{Checkbox as W5,Divider as U5,ListItemIcon as V5,Menu as K5,MenuItem as Sp}from"@mui/material";import G5 from"@mui/icons-material/Add";import{useEffect as L5,useState as wp}from"react";import{Box as ju,Button as z5}from"@mui/material";import{FormDialog as j5}from"@ehfuse/mui-form-dialog";import{ClearTextField as F5}from"@ehfuse/mui-form-controls";import{ColorPicker as q5}from"@ehfuse/mui-color-picker";import{ErrorAlert as $5}from"@ehfuse/alerts";import{jsx as Gs,jsxs as Fu}from"react/jsx-runtime";var _p="#2f80ed";function kp({open:e,onClose:d,onSubmit:b}){let[l,o]=wp(""),[s,r]=wp(_p);L5(()=>{e&&(o(""),r(_p))},[e]);let t=()=>{let i=l.trim();if(!i){$5("\uB77C\uBCA8 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}b(i,s),d()},n=md(s),c=Fu(ju,{children:[Fu(ju,{sx:{display:"flex",alignItems:"center",gap:1.5,mt:.5},children:[Gs(F5,{label:"\uB77C\uBCA8 \uC774\uB984",value:l,onChange:i=>o(i.target.value),onKeyDown:i=>{i.key==="Enter"&&(i.preventDefault(),t())},fullWidth:!0,autoFocus:!0}),Gs(q5,{value:s,onChange:i=>r(i),shape:"circle",colorSize:28})]}),Fu(ju,{sx:{mt:2,display:"flex",alignItems:"center",gap:1,fontSize:13,color:"#787774"},children:["\uBBF8\uB9AC\uBCF4\uAE30",Gs(At,{option:{key:"__preview__",name:l.trim()||"\uB77C\uBCA8",...n}})]})]});return Gs(j5,{open:e,onClose:d,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:Gs(z5,{variant:"contained",onClick:t,children:"\uCD94\uAC00"})}})}import{Fragment as Y5,jsx as Ji,jsxs as Nl}from"react/jsx-runtime";function Ll({anchorEl:e,selectedKeys:d,labelOptions:b,onToggle:l,onAddLabel:o,onClose:s}){let[r,t]=H5(!1),n=qn();return Nl(Y5,{children:[Nl(K5,{anchorEl:e,open:!!e,onClose:s,transitionDuration:0,...n,children:[b.map(c=>{let i=d.includes(c.key);return Nl(Sp,{onClick:()=>l(c.key),sx:{fontSize:14,minWidth:170,gap:1},children:[Ji(W5,{size:"small",checked:i,sx:{p:0}}),Ji(At,{option:c})]},c.key)}),Ji(U5,{}),Nl(Sp,{onClick:()=>t(!0),sx:{fontSize:14,color:"#787774"},children:[Ji(V5,{children:Ji(G5,{sx:{fontSize:18,color:"#787774"}})}),"\uB77C\uBCA8 \uCD94\uAC00"]})]}),Ji(kp,{open:r,onClose:()=>t(!1),onSubmit:o})]})}function Tp(e,d){let b=Number(e.author_account_seq??0);return d.filter(l=>{let o=Number(l.account_seq??0);return o>0&&o!==b})}function Cp(e,d){let b=(e.target_account_seqs??[]).filter(a=>a>0);if(b.length===0)return null;let l=new Set(b),o=Tp(e,d),s=new Map;for(let a of o){let h=String(a.department??"").trim();if(!h)continue;let f=s.get(h)??[];f.push(a),s.set(h,f)}let r=[],t=new Set;for(let[a,h]of s)if(h.every(u=>l.has(Number(u.account_seq??0)))){r.push(a);for(let u of h)t.add(Number(u.account_seq??0))}let n=new Map(o.map(a=>[Number(a.account_seq??0),a.name])),c=e.target_names??[],i=[];return b.forEach((a,h)=>{t.has(a)||i.push(n.get(a)??c[h]??"\uC774\uB984\uC5C6\uC74C")}),{teamNames:r,individualNames:i}}function zl(e,d){let b=Cp(e,d);return b?[...b.teamNames,...b.individualNames].join(", "):"\uBAA8\uB4E0 \uC9C1\uC6D0"}function gz(e,d){let b=Cp(e,d);return b?{kind:"members",teamNames:b.teamNames,individualNames:b.individualNames}:{kind:"everyone"}}function Bp(e,d,b){let l=(e.target_account_seqs??[]).filter(f=>f>0),o=Tp(e,d),s=l.length>0?l.length:o.length,r=e.acks??[],t=b>0&&r.some(f=>f.account_seq===b),n=b>0&&Number(e.author_account_seq??0)===b,c=l.length===0||l.includes(b),i=new Set(r.map(f=>f.account_seq)),h=(l.length>0?o.filter(f=>l.includes(Number(f.account_seq??0))):o).filter(f=>!i.has(Number(f.account_seq??0))).map(f=>String(f.name??"").trim()).filter(f=>f.length>0);return{count:r.length,total:s,acked:t,pendingNames:h,canAck:b>0&&!n&&c&&!t&&!e.completed}}function Ip(e,d){let b=Number(d)||50,l=b*1024*1024,o=e.filter(t=>t.size>l),s=e.filter(t=>t.size<=l),r=o.length>0?`\uD30C\uC77C\uC740 1\uAC1C\uB2F9 \uCD5C\uB300 ${b}MB \uAE4C\uC9C0 \uCCA8\uBD80\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
37
+ \uC81C\uC678\uB41C \uD30C\uC77C: ${o.map(t=>t.name).join(", ")}`:null;return{accepted:s,rejected:o,message:r}}import{DatePicker as s4}from"@ehfuse/mui-datetime-picker";import{Fragment as Zs,jsx as it,jsxs as xi}from"react/jsx-runtime";var Ap="#0f9d58";function Hu({form:e,statusOptions:d,customTabs:b,sprints:l=[],avatarSrcByName:o,isNotice:s=!1,hideProject:r=!1,hideBug:t=!1,leadingRow:n,hideLabel:c=!1,employees:i=[],myAccountSeq:a=0,departments:h=[],myGroupSeq:f=0,onMemberEdit:u,onAddProject:g,onAddLabelOption:m,contentSyncKey:v="create",contentTemplates:k,onSaveContentTemplate:B,onRemoveContentTemplate:R}){let L=po(),A=Ss(),P=e.useFormValue("manager_name"),N=e.useFormValue("receiver_names"),q=e.useFormValue("start_date"),j=!!e.useFormValue("is_event"),S=!!e.useFormValue("is_bug"),T=e.useFormValue("bug_repro")??"",D=e.useFormValue("bug_device")??"",p=e.useFormValue("bug_where")??"",y=e.useFormValue("bug_version")??"",x=e.useFormValue("event_time")??"",w=e.useFormValue("event_place")??"",_=e.useFormValue("event_address")??"",C=e.useFormValue("due_date"),O=e.useFormValue("reminders")??[],z=e.useFormValue("priority"),$=e.useFormValue("content"),M=e.useFormValue("checklist")??[],H=e.useFormValue("tab_key"),I=e.useFormValue("sprint_seq")??0,E=e.useFormValue("story_points")??0,F=b.find(ee=>ee.key===H&&ee.useSprints),U=F?l.filter(ee=>`custom-${ee.group_seq}`===H):[],[Y,K]=Ys(null),W=e.useFormValue("label_keys"),[X,J]=Ys(null),G=e.useFormValue("visibility")||"involved",te=Number(e.useFormValue("visibility_group_seq")??0),[Z,re]=Ys(null),ie=e.useFormValue("repeat_rule")||"",se=e.useFormValue("repeat_until")||"",[oe,pe]=Ys(null),[me,ke]=Ys(null),Le=e.useFormValue("target_names"),Te=e.useFormValue("target_account_seqs"),nt=L.useValue("createAttachmentFiles")??[],we=s?zl({author_account_seq:a,target_names:Le,target_account_seqs:Te},i):"";return xi(Zs,{children:[n,s?null:it(yi,{sx:{display:"flex",gap:1.25,px:2,pt:1.5,pb:1.5,flexShrink:0},children:[{value:"task",label:"\uC5C5\uBB34"},{value:"event",label:"\uC77C\uC815"},...t?[]:[{value:"bug",label:"\uC624\uB958"}]].map(ee=>{let Se=S?"bug":j?"event":"task",ge=Se===ee.value;return it(X5,{onClick:()=>{if(Se===ee.value)return;e.setFormValue("is_event",ee.value==="event"),e.setFormValue("is_bug",ee.value==="bug"),e.setFormValue("visibility",ee.value==="bug"?"all":"involved"),e.setFormValue("visibility_group_seq",0),ee.value==="bug"&&(e.setFormValue("repeat_rule",""),e.setFormValue("repeat_until",""));let xe=e.getFormValue("icon"),Ze=e.getFormValue("icon_color"),Pe=[ho,"event",Ts].includes(xe),He=!Ze||Ze===Ap||Ze===Cs;Pe&&e.setFormValue("icon",ee.value==="event"?"event":ee.value==="bug"?Ts:ho),He&&e.setFormValue("icon_color",ee.value==="event"?Ap:ee.value==="bug"?Cs:"")},sx:{px:1.75,py:.75,borderRadius:99,fontSize:13.5,fontWeight:ge?600:400,color:ge?"#ffffff":"#787774",bgcolor:ge?"#2563eb":"#f4f4f2"},children:ee.label},ee.label)})}),it(Xs,{sx:{borderColor:"#e6e6e3"}}),xi(yi,{sx:{py:1.5,display:"flex",flexDirection:"column",gap:.25},children:[it(Sl,{hideProject:r,hideDueDate:!j&&!!ie,hideReminder:!!ie,values:{tabKey:H,managerName:P,receiverNames:N,startDate:q,dueDate:C,reminders:O,priority:z,eventTime:x,eventPlace:w,eventAddress:_},customTabs:b,avatarSrcByName:o,notice:s,event:j,onChangeEventTime:ee=>e.setFormValue("event_time",ee),onChangeEventPlace:ee=>e.setFormValue("event_place",ee),onChangeEventAddress:ee=>e.setFormValue("event_address",ee),targetSummary:we,onChangeProject:ee=>e.setFormValue("tab_key",ee),onAddProject:g,onChangeStartDate:ee=>e.setFormValue("start_date",ee),onChangeDueDate:ee=>e.setFormValue("due_date",ee),onChangeReminder:ee=>e.setFormValue("reminders",ee),onChangePriority:ee=>e.setFormValue("priority",ee),onMemberEdit:u,pinColumns:!0,beforeStart:xi(Zs,{children:[!s&&!S?it(pt,{icon:it(r4,{sx:{fontSize:17,...ie?{color:"#2f80ed"}:{}}}),label:"\uBC18\uBCF5",onClick:ee=>pe(ee),sx:j?void 0:rr(2),children:ie?xl(ie):it(yi,{component:"span",sx:{color:"#9a9a97"},children:"\uC5C6\uC74C"})}):null,!s&&!S&&ie?it(pt,{icon:it(n4,{sx:{fontSize:17}}),label:"\uBC18\uBCF5 \uC885\uB8CC",onClick:ee=>ke(ee),sx:j?void 0:rr(2),children:se?yn(se):it(yi,{component:"span",sx:{color:"#9a9a97"},children:"\uC790\uB3D9"})}):null]}),trailing:xi(Zs,{children:[s?null:it(pt,{icon:G==="all"?it(Mp,{sx:{fontSize:17,color:"#2f80ed"}}):G==="group"?it(Rp,{sx:{fontSize:17,color:"#d9730d"}}):it(Ep,{sx:{fontSize:17}}),label:"\uACF5\uAC1C",onClick:ee=>re(ee),sx:j?void 0:rr(1),children:G==="all"?"\uC804\uCCB4\uACF5\uAC1C":G==="group"?`\uBD80\uC11C\uACF5\uAC1C \xB7 ${h.find(ee=>ee.seq===te)?.name??"\uBD80\uC11C"}`:"\uBE44\uACF5\uAC1C"}),F&&!j&&!s?xi(Zs,{children:[it(pt,{icon:it(t4,{sx:{fontSize:17}}),label:"\uBAA9\uD45C",onClick:ee=>K(ee),sx:rr(1),children:I>0?U.find(ee=>ee.seq===I)?.name??"\uC0AD\uC81C\uB41C \uBAA9\uD45C":it(yi,{component:"span",sx:{color:"#9a9a97"},children:"\uBBF8\uBC30\uC815"})}),it(pt,{icon:it(o4,{sx:{fontSize:17}}),label:"\uD3EC\uC778\uD2B8",sx:rr(1),children:it(Bo,{value:E>0?String(E):"",placeholder:"\uBBF8\uCD94\uC815",onCommit:ee=>e.setFormValue("story_points",Number(ee.replace(/[^0-9.]/g,""))||0)})})]}):null,S?it(Tl,{values:{repro:T,device:D,where:p,version:y},onChangeRepro:ee=>e.setFormValue("bug_repro",ee),onChangeDevice:ee=>e.setFormValue("bug_device",ee),onChangeWhere:ee=>e.setFormValue("bug_where",ee),onChangeVersion:ee=>e.setFormValue("bug_version",ee)}):null]}),leading:j||c?null:it(yi,{sx:{gridColumn:"1 / -1"},children:it(pt,{icon:it(e4,{sx:{fontSize:17}}),label:"\uB77C\uBCA8",onClick:ee=>J(ee),children:(W??[]).length>0?it(qo,{labelKeys:W??[],labelOptions:d}):it(yi,{component:"span",sx:{color:"#9a9a97"},children:"\uBE44\uC5B4 \uC788\uC74C"})})})}),it(Xs,{sx:{my:1.5,borderColor:"#e6e6e3"}}),it(_n,{icon:it(J5,{sx:{fontSize:18,display:"block"}}),title:"\uB0B4\uC6A9",titleExtra:k?it(Bl,{content:$,templates:k,onApply:ee=>e.setFormValue("content",ee),onSave:B,onRemove:R}):void 0,children:it(Il,{syncKey:v,value:$,onChange:ee=>e.setFormValue("content",ee)})}),j?null:it(Xs,{sx:{my:1.5,borderColor:"#e6e6e3"}}),j?null:it(Rl,{taskSeq:0,checklist:M,onAdd:(ee,Se)=>e.setFormValue("checklist",[...M,{label:Se,checked:!1}]),onToggle:(ee,Se,ge)=>e.setFormValue("checklist",M.map((xe,Ze)=>Ze===Se?{...xe,checked:ge}:xe)),onRemove:(ee,Se)=>e.setFormValue("checklist",M.filter((ge,xe)=>xe!==Se)),onUpdate:(ee,Se,ge)=>e.setFormValue("checklist",M.map((xe,Ze)=>Ze===Se?{...xe,label:ge}:xe))}),it(Xs,{sx:{my:1.5,borderColor:"#e6e6e3"}}),it(Pl,{taskSeq:0,attachments:nt.map(ee=>({name:ee.name,size:ee.size})),onAdd:(ee,Se)=>{let ge=Ip(Se,A);ge.message&&Op(ge.message),ge.accepted.length!==0&&L.setValue("createAttachmentFiles",[...L.getValue("createAttachmentFiles")??[],...ge.accepted])},onRemove:(ee,Se)=>L.setValue("createAttachmentFiles",nt.filter((ge,xe)=>xe!==Se))}),S?null:xi(Zs,{children:[it(Xs,{sx:{my:1.5,borderColor:"#e6e6e3"}}),it(_n,{icon:it(Q5,{sx:{fontSize:18,display:"block"}}),title:"\uBE44\uACE0",children:it(i4,{form:e,name:"note",placeholder:"\uBE44\uACE0 \uC785\uB825",fullWidth:!0,size:"medium",sx:{mt:1}})})]})]}),it(qu,{transitionDuration:0,anchorEl:Y,open:!!Y,onClose:()=>K(null),children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...U.map(ee=>({seq:ee.seq,label:vn(ee)}))].map(ee=>it($u,{onClick:()=>{e.setFormValue("sprint_seq",ee.seq),K(null)},sx:{fontSize:14,minWidth:170},children:ee.label},ee.seq))}),it(qu,{transitionDuration:0,anchorEl:oe,open:!!oe,onClose:()=>pe(null),children:[{value:"",label:"\uC5C6\uC74C"},...Ws].map(ee=>it($u,{selected:ie===ee.value,onClick:()=>{if(pe(null),ee.value===""){e.setFormValue("repeat_rule",""),e.setFormValue("repeat_until","");return}let Se;if(j){if(Se=String(e.getFormValue("due_date")??"").slice(0,10),!Se){Op("\uBC18\uBCF5\uD558\uB824\uBA74 \uC77C\uC815 \uB0A0\uC9DC\uB97C \uBA3C\uC800 \uC120\uD0DD\uD558\uC138\uC694.");return}}else{if(Se=String(e.getFormValue("start_date")??"").slice(0,10),!Se){let ge=new Date,xe=Ze=>String(Ze).padStart(2,"0");Se=`${ge.getFullYear()}-${xe(ge.getMonth()+1)}-${xe(ge.getDate())}`}e.setFormValue("due_date",""),e.setFormValue("reminders",[])}e.setFormValue("repeat_rule",ee.value),e.setFormValue("repeat_until",vl(Se,ee.value))},sx:{fontSize:14,minWidth:140},children:ee.label},ee.value||"none"))}),it(s4,{anchorEl:me,open:!!me,onClose:()=>ke(null),selectedDate:se?new Date(`${se}T00:00:00`):new Date,onDateChange:ee=>{let Se=ge=>String(ge).padStart(2,"0");e.setFormValue("repeat_until",`${ee.getFullYear()}-${Se(ee.getMonth()+1)}-${Se(ee.getDate())}`),ke(null)}}),it(qu,{transitionDuration:0,anchorEl:Z,open:!!Z,onClose:()=>re(null),children:[{key:"involved",label:"\uBE44\uACF5\uAC1C",tip:"\uC791\uC131\uC790\xB7\uCC45\uC784\uC790\xB7\uCC38\uC870\uC790\uB9CC \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4",icon:it(Ep,{sx:{fontSize:17,color:"#57564f"}}),selected:G==="involved",onPick:()=>{e.setFormValue("visibility","involved"),e.setFormValue("visibility_group_seq",0)}},{key:"all",label:"\uC804\uCCB4\uACF5\uAC1C",tip:"\uBAA8\uB4E0 \uC9C1\uC6D0\uC774 \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4",icon:it(Mp,{sx:{fontSize:17,color:"#2f80ed"}}),selected:G==="all",onPick:()=>{e.setFormValue("visibility","all"),e.setFormValue("visibility_group_seq",0)}},...[...h].sort((ee,Se)=>ee.seq===f?-1:Se.seq===f?1:0).map(ee=>({key:`group-${ee.seq}`,label:`\uBD80\uC11C\uACF5\uAC1C \xB7 ${ee.name}`,tip:`${ee.name} \uC18C\uC18D \uC9C1\uC6D0\uC774 \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4`,icon:it(Rp,{sx:{fontSize:17,color:"#d9730d"}}),selected:G==="group"&&te===ee.seq,onPick:()=>{e.setFormValue("visibility","group"),e.setFormValue("visibility_group_seq",ee.seq)}}))].map(ee=>it(Z5,{title:ee.tip,arrow:!0,disableInteractive:!0,placement:"right",children:xi($u,{selected:ee.selected,onClick:()=>{ee.onPick(),re(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[ee.icon,ee.label]})},ee.key))}),it(Ll,{anchorEl:X,selectedKeys:W??[],labelOptions:d,onToggle:ee=>e.setFormValue("label_keys",qa(W??[],ee)),onAddLabel:(ee,Se)=>m?.(ee,Se),onClose:()=>J(null)})]})}import{Fragment as Np,jsx as Yt,jsxs as Js}from"react/jsx-runtime";function dj({open:e,onClose:d,...b}){let{form:l,presetTitle:o="",presetContent:s="",presetVisibility:r,presetVisibilityGroupSeq:t=0,presetDueDate:n="",presetTabKey:c="",presetManager:i=null,isNotice:a=!1,defaultBug:h=!1}=b,f=po(),u=l4(!1),[g,m]=Dp(0),v=l.useFormValue("title"),k=l.useFormValue("icon"),B=l.useFormValue("icon_color"),R=!!l.useFormValue("is_event"),L=!!l.useFormValue("is_bug"),A=Lt(),N=f.useValue("createSubmitting")??!1,q=a||R?Tt(k||(a?ir:cr)):null,j=a?"\uACF5\uC9C0 \uB4F1\uB85D":R?"\uC77C\uC815 \uB4F1\uB85D":L?"\uC624\uB958 \uB4F1\uB85D":"\uC5C5\uBB34 \uB4F1\uB85D",S=a?"\uACF5\uC9C0 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694":R?"\uC77C\uC815 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694":L?"\uC5B4\uB5A4 \uC624\uB958\uC778\uC9C0 \uD55C \uC904\uB85C \uC801\uC5B4\uC8FC\uC138\uC694":"\uC5C5\uBB34 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694";a4(()=>{let x=u.current;u.current=e,!(!e||x)&&(l.setFormValues({...l.getFormValues(),title:o,icon:a?ir:h?Ts:ho,icon_color:a?"#e5484d":h?Cs:"",manager_name:i?.name??"",manager_account_seq:i?.accountSeq??0,receiver_names:[],receiver_account_seqs:[],is_notice:a,is_event:!1,is_bug:h,visibility:r??(h?"all":"involved"),visibility_group_seq:r==="group"?t:0,bug_repro:"",bug_device:"",bug_where:"",bug_version:"",event_time:"",event_place:"",event_address:"",target_names:[],target_account_seqs:[],start_date:"",due_date:n,reminders:[],priority:"medium",note:"",content:s,checklist:[],tab_key:c}),f.setValue("createAttachmentFiles",[]),m(w=>w+1))},[e]);let[T,D]=Dp(null),p=x=>q?R?Yt(d4,{title:"\uC544\uC774\uCF58 \uBCC0\uACBD",arrow:!0,enterDelay:400,disableInteractive:!0,children:Yt(c4,{onClick:w=>D(w.currentTarget),sx:{display:"flex",p:.5,borderRadius:1,color:B||"#1e3a8a","&:hover":{bgcolor:"#f2f2f0"}},children:Yt(q,{sx:{fontSize:20}})})}):Yt(Io,{sx:[{display:"flex",color:B||"#1e3a8a"},x],children:Yt(q,{sx:{fontSize:20}})}):null,y=Js(Io,{sx:{display:"flex",alignItems:"center",gap:1,px:2,pt:2,pb:1},children:[p({p:0}),Yt(Io,{component:"input",autoFocus:!0,spellCheck:!1,value:v,placeholder:S,onChange:x=>l.setFormValue("title",x.target.value),sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:19,fontWeight:600,color:"#37352f",p:0,m:0,"&::placeholder":{color:"#c9c8c5",fontWeight:400}}})]});return A?Yt(Np,{children:Yt(m4,{open:e,onClose:d,locale:"ko",fontScale:{enabled:!0,default:1.1,min:.6},title:j,titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},fullScreen:!0,mobilePresentation:"slide",actions:{showCancelButton:!0,right:Yt(Wu,{variant:"contained",disableElevation:!0,disabled:N,onClick:N?void 0:l.submit,children:N?"\uC800\uC7A5 \uC911\u2026":"\uC800\uC7A5\uD558\uAE30"})},tabs:{visible:!1},contentTopPadding:0,contentPaddingX:0,sectionsPaddingTop:0,sectionContentPaddingTop:0,contentBottomPadding:0,scrollPastLastSection:!1,overlayScrollbar:{enabled:!0,contentStyle:{minWidth:0}},sections:[{id:"task-create",title:"",showTitle:!1,children:Yt(Io,{sx:{width:"100%",minWidth:0,display:"flex",flexDirection:"column",gap:0},children:Yt(Hu,{...b,contentSyncKey:`create-${g}`,leadingRow:y})})}]})}):Js(Np,{children:[Yt(u4,{anchor:"right",open:e,onClose:d,"aria-label":"\uC0C8 \uC5C5\uBB34 \uB4F1\uB85D",sx:{zIndex:x=>x.zIndex.modal},slotProps:{paper:{sx:{width:720,maxWidth:"100vw"}}},children:Js(Io,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[Js(Io,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1.5,flexShrink:0},children:[p({px:.5}),Yt(Io,{component:"input",autoFocus:!0,spellCheck:!1,value:v,placeholder:S,onChange:x=>l.setFormValue("title",x.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}}}),Yt(f4,{"aria-label":"\uB2EB\uAE30",onClick:d,sx:{color:"#6b7280"},children:Yt(h4,{})})]}),Yt(Pp,{sx:{borderColor:"#e6e6e3"}}),Yt(Io,{sx:{flex:1,minHeight:0},children:Yt(p4,{style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:Yt(Hu,{...b,contentSyncKey:`create-${g}`})})}),Yt(Pp,{sx:{borderColor:"#e6e6e3"}}),Js(Io,{sx:{display:"flex",justifyContent:"flex-end",gap:1,px:2,py:1.5,flexShrink:0},children:[Yt(Wu,{onClick:d,color:"inherit",disabled:N,children:"\uCDE8\uC18C"}),Yt(Wu,{onClick:l.submit,variant:"contained",disabled:N,children:N?"\uB4F1\uB85D \uC911\u2026":"\uB4F1\uB85D"})]})]})}),Yt(Wo,{anchorEl:T,value:k,color:B,onSelect:x=>{l.setFormValue("icon",x),D(null)},onSelectColor:x=>l.setFormValue("icon_color",x),onClose:()=>D(null)})]})}import{useEffect as lm,useRef as cm,useState as Ul}from"react";import{Box as Vl,Button as gk,Divider as um,Drawer as bk,IconButton as yk,ListItemIcon as tf,ListItemText as rf,Menu as xk,MenuItem as nf}from"@mui/material";import vk from"@mui/icons-material/MoreVert";import wk from"@mui/icons-material/DeleteOutline";import _k from"@mui/icons-material/ShareOutlined";import kk from"@mui/icons-material/HistoryOutlined";import Sk from"@ehfuse/overlay-scrollbar";import{FormDialog as Tk}from"@ehfuse/mui-form-dialog";import{SuccessAlert as fm}from"@ehfuse/alerts";import{useRef as Vu,useState as Qi}from"react";import{Box as ft,Button as Lp,Chip as jl,IconButton as Nn,Tooltip as qp}from"@mui/material";import zp from"@mui/icons-material/Send";import{TextField as g4}from"@ehfuse/mui-form-controls";import Fl from"@mui/icons-material/Close";import b4 from"@mui/icons-material/EditOutlined";import y4 from"@mui/icons-material/Favorite";import x4 from"@mui/icons-material/FavoriteBorderOutlined";import v4 from"@mui/icons-material/CheckCircle";import w4 from"@mui/icons-material/CheckCircleOutlineOutlined";import es from"@mui/icons-material/AttachFileOutlined";import _4 from"@mui/icons-material/AddCircleOutline";import k4 from"@mui/icons-material/ImageOutlined";var Uu=e=>{if(e===0)return"0 Bytes";let d=1024,b=["Bytes","KB","MB","GB","TB"],l=Math.floor(Math.log(e)/Math.log(d));return parseFloat((e/Math.pow(d,l)).toFixed(2))+" "+b[l]};import{Fragment as Fp,jsx as We,jsxs as nr}from"react/jsx-runtime";var S4=5;function jp({kind:e,reactions:d,myAccountSeq:b,onToggle:l}){let o=d??[],s=b>0&&o.some(c=>c.account_seq===b),r=e==="like"?"\uC88B\uC544\uC694":"\uD655\uC778",t=o.length===0?r:We(ft,{sx:{whiteSpace:"pre-line",fontSize:12},children:o.map(c=>`${c.name} \xB7 ${c.time}`).join(`
38
+ `)}),n=e==="like"?"#e5484d":"#2f80ed";return We(qp,{title:t,arrow:!0,enterDelay:300,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:nr(ft,{sx:{display:"inline-flex",alignItems:"center"},children:[We(Nn,{size:"small","aria-label":`\uB313\uAE00 ${r}`,onClick:l,sx:{color:s?n:"#c9c8c5",p:.5},children:e==="like"?s?We(y4,{sx:{fontSize:16}}):We(x4,{sx:{fontSize:16}}):s?We(v4,{sx:{fontSize:16}}):We(w4,{sx:{fontSize:16}})}),o.length>0?We(ft,{component:"span",sx:{fontSize:12,color:s?n:"#9a9a97",ml:-.25},children:o.length}):null]})})}function $p({taskSeq:e,comments:d,currentUserName:b="",myAccountSeq:l=0,avatarSrcByName:o,onUpdate:s,onRemove:r,onToggleReaction:t,onPreview:n,onDownload:c}){let[i,a]=Qi(null),h=Vu(null),[f,u]=Qi(null),[g,m]=Qi(!1),v=Math.max(0,d.length-S4),k=v>0&&!g,B=i?Math.min(i.index,v):v,R=d.map((q,j)=>({comment:q,index:j})).slice(k?B:0),L=ks(),A=q=>{if(n){n(q);return}window.open(L(q.uuid??""),"_blank","noopener,noreferrer")},P=q=>{if(c){c(q);return}window.open(L(q.uuid??"",{download:!0}),"_blank","noopener,noreferrer")},N=$t().slots?.avatar;return nr(ft,{sx:{px:2,pb:2,display:"flex",flexDirection:"column",gap:.25},children:[nr(ft,{sx:{display:"flex",alignItems:"center",gap:1},children:[We(Ho,{sx:{fontSize:18,display:"block",color:"#37352f"}}),nr(ft,{sx:{fontSize:Eu,fontWeight:500,color:"#37352f"},children:["\uB313\uAE00",d.length>0?` (${d.length})`:""]}),v>0&&(!k||B>0)?We(ft,{role:"button",tabIndex:0,onClick:()=>m(q=>!q),onKeyDown:q=>{(q.key==="Enter"||q.key===" ")&&(q.preventDefault(),m(j=>!j))},sx:{ml:"auto",flexShrink:0,cursor:"pointer",fontSize:14.5,color:"#5b87d6","&:hover":{textDecoration:"underline"}},children:k?`\uC774\uC804 \uB313\uAE00 ${B}\uAC1C \uB354 \uBCF4\uAE30`:"\uC774\uC804 \uB313\uAE00 \uC811\uAE30"}):null]}),d.length===0?We(ft,{sx:{mt:1,fontSize:14.5,color:"#9a9a97"},children:"\uB4F1\uB85D\uB41C \uB313\uAE00\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):null,We(ft,{sx:{display:"flex",flexDirection:"column",gap:1,mt:1},children:R.map(({comment:q,index:j})=>{let S=!!b&&q.author===b;return nr(ft,{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 T=o?.get(q.author)??"";return N?We(ft,{sx:{display:"inline-flex",flexShrink:0},children:We(N,{name:q.author,src:T||void 0,size:44})}):We(ft,{sx:{display:"inline-flex",flexShrink:0},children:We(bn,{src:T,name:q.author,avatarSx:{width:44,height:44,fontSize:20,borderRadius:"50%",...Pi[0]},iconFontSize:24})})})(),nr(ft,{sx:{flex:1,minWidth:0},children:[nr(ft,{sx:{display:"flex",alignItems:"center",gap:.75,minWidth:0,position:"relative"},children:[We(ft,{component:"span",sx:{fontSize:14.5,fontWeight:700,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:q.author}),q.external?We(ft,{component:"span",sx:{flexShrink:0,px:.6,fontSize:11.5,fontWeight:500,lineHeight:"18px",color:"#d9730d",bgcolor:"#fdf0e6",borderRadius:"4px",whiteSpace:"nowrap"},children:"\uAC00\uB9F9\uC810"}):null,We(ft,{component:"span",sx:{fontSize:12.5,color:"#9a9a97",flexShrink:0,whiteSpace:"nowrap"},children:q.time}),S?We(ft,{sx:{ml:"auto"}}):nr(ft,{sx:{display:"flex",alignItems:"center",gap:.25,ml:"auto",flexShrink:0},children:[We(jp,{kind:"like",reactions:q.likes,myAccountSeq:l,onToggle:()=>t?.(e,j,"like")}),We(jp,{kind:"ack",reactions:q.acks,myAccountSeq:l,onToggle:()=>t?.(e,j,"ack")})]}),S?nr(ft,{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:[We(Nn,{size:"small","aria-label":"\uB313\uAE00 \uC218\uC815",onClick:()=>a({index:j,text:q.text,attachments:[...q.attachments??[]],files:[]}),sx:{color:"#9a9a97"},children:We(b4,{sx:{fontSize:15}})}),We(Nn,{size:"small","aria-label":"\uB313\uAE00 \uC0AD\uC81C",onClick:T=>u({anchorEl:T.currentTarget,index:j}),sx:{color:"#9a9a97"},children:We(Fl,{sx:{fontSize:15}})})]}):null]}),i?.index===j?nr(ft,{sx:{mt:.5},children:[We(ft,{component:"textarea",autoFocus:!0,spellCheck:!1,value:i.text,onChange:T=>a({...i,text:T.target.value}),sx:{width:"100%",minHeight:56,border:"1px solid #dedddb",borderRadius:1,outline:"none",font:"inherit",fontSize:14,p:1,resize:"vertical"}}),nr(ft,{sx:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:.75,mt:.75},children:[i.attachments.map((T,D)=>{let p=()=>a({...i,attachments:i.attachments.filter((y,x)=>x!==D)});return ql(T.name)&&T.uuid?nr(ft,{sx:{position:"relative"},children:[We(ft,{component:"img",src:L(T.uuid,{thumb:"md"}),alt:T.name,title:T.name,loading:"lazy",sx:{width:72,height:72,objectFit:"cover",borderRadius:1,border:"1px solid #e6e6e3",display:"block"}}),We(Nn,{size:"small","aria-label":"\uCCA8\uBD80 \uC81C\uAC70",onClick:p,sx:{position:"absolute",top:-6,right:-6,p:.25,bgcolor:"#ffffff",border:"1px solid #e6e6e3","&:hover":{bgcolor:"#f1f5f9"}},children:We(Fl,{sx:{fontSize:14}})})]},`kept-${T.uuid}-${D}`):We(jl,{size:"small",icon:We(es,{sx:{fontSize:14}}),label:T.name,onDelete:p,sx:{fontSize:14,height:26,bgcolor:"#f1f5f9"}},`kept-${T.uuid??T.name}-${D}`)}),i.files.map((T,D)=>{let p=()=>a({...i,files:i.files.filter((y,x)=>x!==D)});return ql(T.name)?nr(ft,{sx:{position:"relative"},children:[We(ft,{component:"img",src:URL.createObjectURL(T),alt:T.name,title:`${T.name} (\uC0C8 \uD30C\uC77C)`,onLoad:y=>URL.revokeObjectURL(y.target.src),sx:{width:72,height:72,objectFit:"cover",borderRadius:1,border:"2px solid #2f80ed",display:"block"}}),We(Nn,{size:"small","aria-label":"\uCCA8\uBD80 \uC81C\uAC70",onClick:p,sx:{position:"absolute",top:-6,right:-6,p:.25,bgcolor:"#ffffff",border:"1px solid #e6e6e3","&:hover":{bgcolor:"#f1f5f9"}},children:We(Fl,{sx:{fontSize:14}})})]},`new-${T.name}-${D}`):We(jl,{size:"small",icon:We(es,{sx:{fontSize:14}}),label:`${T.name} (\uC0C8 \uD30C\uC77C)`,onDelete:p,sx:{fontSize:14,height:26,bgcolor:"#eef4ff"}},`new-${T.name}-${D}`)}),We(qp,{title:"\uCCA8\uBD80 \uCD94\uAC00",arrow:!0,children:We(Nn,{size:"small","aria-label":"\uCCA8\uBD80 \uCD94\uAC00",onClick:()=>h.current?.click(),sx:{ml:"auto",color:"#2f80ed"},children:We(_4,{sx:{fontSize:20}})})})]}),nr(ft,{sx:{display:"flex",justifyContent:"flex-end",alignItems:"center",gap:.75,mt:.5},children:[We(Lp,{size:"small",color:"inherit",onClick:()=>a(null),children:"\uCDE8\uC18C"}),We(Lp,{size:"small",variant:"contained",disabled:!i.text.trim()&&i.attachments.length===0&&i.files.length===0,onClick:()=>{s(e,j,i.text,{attachments:i.attachments,files:i.files}),a(null)},children:"\uC800\uC7A5"})]}),We(ft,{component:"input",type:"file",multiple:!0,ref:h,sx:{display:"none"},onChange:T=>{let D=Array.from(T.target.files??[]);D.length>0&&a({...i,files:[...i.files,...D].slice(0,10)}),T.target.value=""}})]}):nr(ft,{children:[q.text?We(ft,{sx:{fontSize:15,whiteSpace:"pre-wrap"},children:q.text}):null,(q.attachments??[]).length>0?We(ft,{sx:{display:"flex",flexWrap:"wrap",gap:.75,mt:.75},children:(q.attachments??[]).map((T,D)=>{let p=!!T.uuid;if(ql(T.name)&&p)return We(ft,{component:"img",src:L(T.uuid??"",{thumb:"md"}),alt:T.name,title:`${T.name} \uD06C\uAC8C \uBCF4\uAE30`,loading:"lazy",onClick:()=>A(T),sx:{width:96,height:96,objectFit:"cover",borderRadius:1,border:"1px solid #e6e6e3",cursor:"pointer",bgcolor:"#f8fafc"}},`${T.name}-${D}`);let x=Ol(T.name);return We(jl,{size:"small",icon:We(es,{sx:{fontSize:14}}),label:`${T.name} (${Uu(T.size)})`,clickable:p,onClick:p?()=>x?A(T):P(T):void 0,title:p?`${T.name} ${x?"\uBBF8\uB9AC\uBCF4\uAE30":"\uB2E4\uC6B4\uB85C\uB4DC"}`:T.name,sx:{fontSize:14,height:26,bgcolor:"#f1f5f9"}},`${T.name}-${D}`)})}):null]})]})]},`${q.time}-${j}`)})}),We(kt,{open:!!f,anchorEl:f?.anchorEl??null,title:"\uC774 \uB313\uAE00\uC744 \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uC0AD\uC81C",onCancel:()=>u(null),onConfirm:()=>{f&&(r(e,f.index),a(null)),u(null)}})]})}function ql(e){return/\.(png|jpe?g|gif|webp|bmp|svg|heic|heif)$/i.test(String(e??"").trim())}function Hp({onSubmit:e}){let[d,b]=Qi(""),[l,o]=Qi([]),[s,r]=Qi(!1),t=Vu(null),n=Vu(null),c=Lt(),i=f=>{let u=Array.from(f??[]);u.length!==0&&o(g=>[...g,...u].slice(0,10))},a=()=>{let f=d.trim();!f&&l.length===0||(e(f,l.length>0?l:void 0),b(""),o([]))},h=nr(Fp,{children:[We(Nn,{size:"small","aria-label":"\uD30C\uC77C \uCCA8\uBD80",onClick:()=>t.current?.click(),sx:{color:"#9a9a97"},children:We(es,{sx:{fontSize:20}})}),We(Nn,{size:"small","aria-label":"\uC774\uBBF8\uC9C0 \uCCA8\uBD80",onClick:()=>n.current?.click(),sx:{color:"#9a9a97"},children:We(k4,{sx:{fontSize:20}})})]});return nr(ft,{children:[l.length>0?We(ft,{sx:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:1.5,px:2,pt:2},children:l.map((f,u)=>ql(f.name)?nr(ft,{sx:{position:"relative"},children:[We(ft,{component:"img",src:URL.createObjectURL(f),alt:f.name,title:f.name,onLoad:g=>URL.revokeObjectURL(g.target.src),sx:{width:72,height:72,objectFit:"cover",borderRadius:1,border:"1px solid #e6e6e3",display:"block"}}),We(Nn,{size:"small","aria-label":"\uCCA8\uBD80 \uC81C\uAC70",onClick:()=>o(g=>g.filter((m,v)=>v!==u)),sx:{position:"absolute",top:-6,right:-6,p:.25,bgcolor:"#ffffff",border:"1px solid #e6e6e3","&:hover":{bgcolor:"#f1f5f9"}},children:We(Fl,{sx:{fontSize:14}})})]},`${f.name}-${u}`):We(jl,{size:"small",icon:We(es,{sx:{fontSize:14}}),label:`${f.name} (${Uu(f.size)})`,onDelete:()=>o(g=>g.filter((m,v)=>v!==u)),sx:{fontSize:14,height:26,bgcolor:"#f1f5f9"}},`${f.name}-${u}`))}):null,nr(ft,{sx:{position:"relative",display:"flex"},onDragOver:f=>{Array.from(f.dataTransfer?.types??[]).includes("Files")&&(f.preventDefault(),r(!0))},onDragLeave:f=>{f.currentTarget.contains(f.relatedTarget)||r(!1)},onDrop:f=>{Array.from(f.dataTransfer?.types??[]).includes("Files")&&(f.preventDefault(),r(!1),i(f.dataTransfer?.files??null))},children:[s?nr(ft,{sx:{position:"absolute",inset:0,zIndex:2,display:"flex",alignItems:"center",justifyContent:"center",gap:.75,borderRadius:1,border:"2px dashed #2f80ed",bgcolor:"rgba(47,128,237,0.08)",color:"#2f80ed",fontSize:14,fontWeight:600,pointerEvents:"none"},children:[We(es,{sx:{fontSize:18}}),"\uC5EC\uAE30\uC5D0 \uB193\uC73C\uBA74 \uCCA8\uBD80\uB429\uB2C8\uB2E4"]}):null,We(g4,{value:d,placeholder:"\uB313\uAE00\uC744 \uC785\uB825\uD558\uC138\uC694",onChange:f=>b(f.target.value),onPaste:f=>{Array.from(f.clipboardData?.files??[]).length!==0&&(f.preventDefault(),i(f.clipboardData.files))},fullWidth:!0,multiline:!0,minRows:c?1:3,maxRows:3,sx:{"& .MuiInputBase-root":{pl:2,pr:c?15:6.5,pb:c?void 0:5,borderRadius:0},"& .MuiOutlinedInput-notchedOutline":{border:"none"}}}),c?nr(ft,{sx:{position:"absolute",right:8,top:"50%",transform:"translateY(-50%)",display:"flex",alignItems:"center",gap:.25},children:[h,We(Nn,{"aria-label":"\uB313\uAE00 \uB4F1\uB85D",disabled:!d.trim()&&l.length===0,onClick:a,sx:{color:"#2563eb","&.Mui-disabled":{color:"#c9c8c5"}},children:We(zp,{sx:{fontSize:22}})})]}):nr(Fp,{children:[We(ft,{sx:{position:"absolute",left:8,bottom:6,display:"flex",alignItems:"center",gap:.25},children:h}),We(Nn,{"aria-label":"\uB313\uAE00 \uB4F1\uB85D",disabled:!d.trim()&&l.length===0,onClick:a,sx:{position:"absolute",right:8,top:"50%",transform:"translateY(-50%)",color:"#2563eb","&.Mui-disabled":{color:"#c9c8c5"}},children:We(zp,{sx:{fontSize:22}})})]})]}),We(ft,{component:"input",ref:t,type:"file",multiple:!0,onChange:f=>{i(f.target.files),f.target.value=""},sx:{display:"none"}}),We(ft,{component:"input",ref:n,type:"file",accept:"image/*",multiple:!0,onChange:f=>{i(f.target.files),f.target.value=""},sx:{display:"none"}})]})}import{useState as Qs}from"react";import{Box as rs,ButtonBase as P4,IconButton as ns,Tooltip as os}from"@mui/material";import N4 from"@mui/icons-material/Close";import L4 from"@mui/icons-material/ArrowBack";import z4 from"@mui/icons-material/ShareOutlined";import j4 from"@mui/icons-material/ContentCopyOutlined";import F4 from"@mui/icons-material/HistoryOutlined";import q4 from"@mui/icons-material/Print";import{useEffect as T4}from"react";import{Box as Eo,Button as C4,CircularProgress as B4}from"@mui/material";import{FormDialog as I4}from"@ehfuse/mui-form-dialog";import{OverlayScrollbar as E4}from"@ehfuse/overlay-scrollbar";import{jsx as Mo,jsxs as $l}from"react/jsx-runtime";var M4={created:"\uC5C5\uBB34\uB97C \uB4F1\uB85D\uD588\uC2B5\uB2C8\uB2E4",completed:"\uC644\uB8CC \uCC98\uB9AC\uD588\uC2B5\uB2C8\uB2E4",uncompleted:"\uC644\uB8CC\uB97C \uD574\uC81C\uD588\uC2B5\uB2C8\uB2E4",confirm_requested:"\uD655\uC778\uC744 \uC694\uCCAD\uD588\uC2B5\uB2C8\uB2E4",acked:"\uD655\uC778\uD588\uC2B5\uB2C8\uB2E4",claimed:"\uC5C5\uBB34\uB97C \uAC00\uC838\uAC14\uC2B5\uB2C8\uB2E4",bug_verified:"\uC218\uC815\uC744 \uD655\uC778\uD588\uC2B5\uB2C8\uB2E4(\uC885\uB8CC)",bug_reopened:"\uC7AC\uC624\uD508\uD588\uC2B5\uB2C8\uB2E4"};function Wp(e){return String(e??"").trim()||"\uC5C6\uC74C"}function R4(e){if(e.kind!=="field")return M4[String(e.kind)]??"\uBCC0\uACBD\uD588\uC2B5\uB2C8\uB2E4";let d=String(e.field_label??e.field??"").trim()||"\uD56D\uBAA9",b=String(e.old_value??"").trim(),l=String(e.new_value??"").trim();return!b&&l?`${d}\uC744(\uB97C) "${l}"(\uC73C)\uB85C \uC785\uB825\uD588\uC2B5\uB2C8\uB2E4`:b&&!l?`${d}\uC744(\uB97C) \uBE44\uC6E0\uC2B5\uB2C8\uB2E4`:`${d}\uC744(\uB97C) "${Wp(b)}" \u2192 "${Wp(l)}" \uB85C \uBC14\uAFE8\uC2B5\uB2C8\uB2E4`}function Hl({open:e,taskSeq:d,items:b,loading:l,onLoad:o,onClose:s}){let r=Lt();T4(()=>{e&&d>0&&!b&&o?.(d)},[e,d,b,o]);let t=Mo(Eo,{sx:{height:r?"100%":420,minHeight:0},children:Mo(E4,{style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:$l(Eo,{sx:{px:2,pt:2,display:"flex",flexDirection:"column",gap:1,"&::after":{content:'""',flexShrink:0,height:16}},children:[l&&!b?$l(Eo,{sx:{display:"flex",alignItems:"center",gap:1,color:"#9a9a97",fontSize:14.5},children:[Mo(B4,{size:14,thickness:5,sx:{color:"#9a9a97"}}),"\uBD88\uB7EC\uC624\uB294 \uC911\u2026"]}):null,b&&b.length===0?Mo(Eo,{sx:{fontSize:14.5,color:"#9a9a97"},children:"\uAE30\uB85D\uB41C \uD65C\uB3D9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):null,(b??[]).map(n=>$l(Eo,{sx:{display:"flex",flexDirection:r?"column":"row",gap:r?.25:1,alignItems:r?"stretch":"baseline",minWidth:0,flexShrink:0,...r?{pb:1,borderBottom:"1px solid #ededeb","&:last-of-type":{borderBottom:"none",pb:0}}:{}},children:[Mo(Eo,{sx:{flexShrink:0,...r?{}:{width:"10.5em"},whiteSpace:"nowrap",fontSize:13.5,color:"#9a9a97",lineHeight:1.5},children:un(n.acted_time)}),$l(Eo,{sx:{minWidth:0,fontSize:14.5,color:"#37352f",lineHeight:1.5},children:[Mo(Eo,{component:"span",sx:{fontWeight:500},children:String(n.actor_name??"").trim()||"\uC774\uB984\uC5C6\uC74C"}),Mo(Eo,{component:"span",sx:{ml:.5},children:R4(n)})]})]},n.seq))]})})});return Mo(I4,{open:e,onClose:s,maxWidth:"sm",fullScreen:r,mobilePresentation:r?"slide":"dialog",contentPaddingX:0,contentTopPadding:0,contentBottomPadding:0,sectionsPaddingTop:0,sectionContentPaddingTop:0,sx:r?{DialogContent:{pb:0,"& .os-content > div":{height:"100%",boxSizing:"border-box",paddingBottom:0,marginBottom:0},"& .FormSection-content, & .section-content":{height:"100%",paddingBottom:0,marginBottom:0}}}:void 0,title:`\uD65C\uB3D9${b&&b.length>0?` (${b.length})`:""}`,locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-task-activity",sections:[{id:"task-activity",showTitle:!1,children:t}],scrollPastLastSection:!1,actions:{showCancelButton:!1,right:Mo(C4,{variant:"contained",onClick:s,children:"\uB2EB\uAE30"})}})}import{InfoAlert as O4,SuccessAlert as A4}from"@ehfuse/alerts";var Up=e=>e?e.replace(/<(script|style)[\s\S]*?<\/\1>/gi,"").replace(/<br\s*\/?>/gi,`
39
39
  `).replace(/<\/(p|div|li|h[1-6]|tr)>/gi,`
40
40
  `).replace(/<[^>]+>/g,"").replace(/&nbsp;/gi," ").replace(/&lt;/gi,"<").replace(/&gt;/gi,">").replace(/&quot;/gi,'"').replace(/&#39;/gi,"'").replace(/&amp;/gi,"&").replace(/\n{3,}/g,`
41
41
 
42
- `).trim():"";function S4(e){let d=[`[\uC5C5\uBB34] ${e.title}`],b=yn(e.start_date),l=yn(e.due_date);(b||l)&&d.push(`\uAE30\uAC04: ${b&&l?`${b} ~ ${l}`:b||l}`),e.manager_name&&d.push(`\uCC45\uC784\uC790: ${e.manager_name}`);let o=ur(e).name;o&&d.push(`\uC0C1\uD0DC: ${o}`);let s=Up(e.content);s&&d.push("",s);let r=String(e.note??"").trim();return r&&d.push("",`\uBE44\uACE0: ${r}`),d.join(`
43
- `)}function Vp(e){navigator.clipboard.writeText(e).then(()=>k4("\uC5C5\uBB34 \uB0B4\uC6A9\uC744 \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>_4("\uBCF5\uC0AC\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uB0B4\uC6A9\uC744 \uC9C1\uC811 \uC120\uD0DD\uD574 \uBCF5\uC0AC\uD574 \uC8FC\uC138\uC694."))}function ts(e,d){let b=S4(e);if(d&&typeof navigator.share=="function"){navigator.share({text:b}).catch(l=>{l?.name!=="AbortError"&&Vp(b)});return}Vp(b)}import{Fragment as O4,jsx as Et,jsxs as Kp}from"react/jsx-runtime";function Gp({task:e,myAccountSeq:d=0,onToggleCompleted:b,onChangeTitle:l,onChangeIcon:o,onChangeIconColor:s,onClose:r,appBarMode:t=!1,activityItems:n,activityLoading:c,onLoadActivity:i,onPrint:a,onDelete:h,canDelete:f}){let u=Lt(),[g,m]=Qs(!1),[v,k]=Qs(null),[B,R]=Qs(null),[L,A]=Qs(null),[P,N]=Qs(null),q=!!e.is_notice,j=!!e.is_event,S=q?Tt(e.icon||ir):j?Tt(e.icon||cr):null,T=q&&d>0&&(e.author_account_seq??0)===d,D=!mo(e,d),p=!!h&&(f??(d>0&&(e.author_account_seq??0)===d)),y=!j&&(q?T:(e.author_account_seq??0)===d||(e.manager_account_seq??0)===d);return Kp(O4,{children:[Kp(rs,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1.5,flexShrink:0},children:[t&&r?Et(ns,{"aria-label":"\uB4A4\uB85C",onClick:r,sx:{color:"#37352f",ml:-1},children:Et(B4,{})}):null,y&&!t?Et(os,{title:e.completed&&e.completed_by?`${e.completed_by} \xB7 ${un(e.completed_time)} \uC644\uB8CC`:"",arrow:!0,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:Et(rs,{sx:{display:"flex",flexShrink:0,mr:1},children:Et($n,{onClick:x=>N({anchorEl:x.currentTarget,nextCompleted:!e.completed}),children:e.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC\uD558\uAE30"})})}):null,t||!S?null:j&&!D?Et(os,{title:"\uC544\uC774\uCF58 \uBCC0\uACBD",arrow:!0,enterDelay:400,disableInteractive:!0,children:Et(T4,{onClick:x=>R(x.currentTarget),sx:{display:"flex",p:.5,borderRadius:1,color:e.icon_color||"#1e3a8a","&:hover":{bgcolor:"#f2f2f0"}},children:Et(S,{sx:{fontSize:20}})})}):Et(rs,{sx:{display:"flex",px:.5,color:e.icon_color||(q?"#e5484d":"#1e3a8a")},children:Et(S,{sx:{fontSize:20}})}),v!==null?Et(rs,{component:"input",autoFocus:!0,spellCheck:!1,value:v,onChange:x=>k(x.target.value),onBlur:()=>{v.trim()&&v.trim()!==e.title&&l(e.seq,v.trim()),k(null)},onKeyDown:x=>{x.key==="Enter"&&x.target.blur(),x.key==="Escape"&&k(null)},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:18,fontWeight:500,color:"#37352f",p:0,m:0}}):t?Et(rs,{sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:q?"\uACF5\uC9C0":j?"\uC77C\uC815":e.is_bug?"\uC624\uB958":"\uC5C5\uBB34"}):Et(rs,{onClick:D?void 0:()=>k(e.title),sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",cursor:D?"default":"text",textDecoration:e.completed?"line-through":"none"},children:e.title}),i?Et(os,{title:"\uD65C\uB3D9",arrow:!0,children:Et(ns,{"aria-label":"\uD65C\uB3D9",onClick:()=>m(!0),sx:{color:"#6b7280"},children:Et(M4,{sx:{fontSize:20}})})}):null,Et(os,{title:u?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",arrow:!0,children:Et(ns,{"aria-label":u?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",onClick:()=>ts(e,u),sx:{color:"#6b7280"},children:u?Et(I4,{sx:{fontSize:20}}):Et(E4,{sx:{fontSize:20}})})}),a?Et(os,{title:"\uC778\uC1C4",arrow:!0,children:Et(ns,{"aria-label":"\uC778\uC1C4",onClick:()=>a(e),sx:{color:"#6b7280"},children:Et(R4,{sx:{fontSize:20}})})}):null,p?Et(os,{title:"\uC0AD\uC81C",arrow:!0,children:Et(ns,{"aria-label":"\uC0AD\uC81C",onClick:x=>A(x.currentTarget),sx:{color:"#6b7280","&:hover":{color:"#e5484d"}},children:Et(dr,{sx:{fontSize:20}})})}):null,r&&!t?Et(ns,{"aria-label":"\uB2EB\uAE30",onClick:r,sx:{color:"#6b7280"},children:Et(C4,{})}):null]}),Et(kt,{open:!!P,anchorEl:P?.anchorEl??null,title:P?.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:P?.nextCompleted?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>N(null),onConfirm:()=>{P&&b(e.seq,P.nextCompleted),N(null)}}),Et(Wo,{anchorEl:B,value:e.icon??"",color:e.icon_color??"",onSelect:x=>{o(e.seq,x),R(null)},onSelectColor:s?x=>s(e.seq,x):void 0,onClose:()=>R(null)}),Et(kt,{open:!!L,anchorEl:L,title:"\uC774 \uC5C5\uBB34\uB97C \uD734\uC9C0\uD1B5\uC73C\uB85C \uBCF4\uB0B4\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uC0AD\uC81C",onCancel:()=>A(null),onConfirm:()=>{A(null),h?.(e)}}),Et(Hl,{open:g,taskSeq:e.seq,items:n,loading:c,onLoad:i,onClose:()=>m(!1)})]})}import{useRef as $4,useState as kn}from"react";import{Box as Xt,Button as is,ButtonBase as em,Checkbox as H4,Divider as wi,Menu as Zu,MenuItem as Ju}from"@mui/material";import W4 from"@mui/icons-material/ExpandLess";import U4 from"@mui/icons-material/ExpandMore";import V4 from"@mui/icons-material/ConfirmationNumberOutlined";import tm from"@mui/icons-material/Check";import K4 from"@mui/icons-material/DirectionsRunOutlined";import G4 from"@mui/icons-material/SpeedOutlined";import Qu from"@mui/icons-material/CheckCircle";import Y4 from"@mui/icons-material/CheckCircleOutlineOutlined";import ef from"@mui/icons-material/CheckCircleOutlined";import rm from"@mui/icons-material/AccessTimeOutlined";import X4 from"@mui/icons-material/AutorenewOutlined";import Z4 from"@mui/icons-material/LabelOutlined";import J4 from"@mui/icons-material/PersonOutlineOutlined";import Q4 from"@mui/icons-material/SubjectOutlined";import ek from"@mui/icons-material/StickyNote2Outlined";import tk from"@mui/icons-material/PanToolAltOutlined";import nm from"@mui/icons-material/LockOutlined";import om from"@mui/icons-material/PublicOutlined";import im from"@mui/icons-material/Group";import rk from"@mui/icons-material/Repeat";import nk from"@mui/icons-material/EventOutlined";import{ConfirmDialog as sm,InfoAlert as ok}from"@ehfuse/alerts";import{DatePicker as ik}from"@ehfuse/mui-datetime-picker";import{useState as A4}from"react";import{TextField as D4}from"@ehfuse/mui-form-controls";import{jsx as P4}from"react/jsx-runtime";function Yp({value:e,onCommit:d,onDraftChange:b,readOnly:l=!1}){let[o,s]=A4(null);return P4(D4,{value:o??e,placeholder:l?"":"\uBE44\uACE0 \uC785\uB825",fullWidth:!0,size:"medium",slotProps:{input:{readOnly:l}},onChange:r=>{s(r.target.value),b?.(r.target.value)},onBlur:()=>{o!==null&&o.trim()!==e&&d(o),s(null)},onKeyDown:r=>{r.key==="Enter"&&r.target.blur(),r.key==="Escape"&&s(null)},sx:{mt:1}})}import{useMemo as Yu,useState as Xu}from"react";import{Box as Dr,Button as Jp,IconButton as N4}from"@mui/material";import L4 from"@mui/icons-material/AccountTreeOutlined";import z4 from"@mui/icons-material/LinkOutlined";import j4 from"@mui/icons-material/Close";import F4 from"@mui/icons-material/RedoOutlined";function vi(e){return e.relations??[]}function mF(e,d,b){return vi(e).some(l=>l.type===b&&l.task_seq===d.seq)||vi(d).some(l=>l.type===b&&l.task_seq===e.seq)}function Xp(e){return`${e.created_time??""}|${String(e.seq).padStart(12,"0")}`}function Ku(e,d){let b=new Map(d.map(u=>[u.seq,u]));b.set(e.seq,e);let l=new Map,o=(u,g)=>{l.has(u)||l.set(u,new Set),l.has(g)||l.set(g,new Set),l.get(u).add(g),l.get(g).add(u)};for(let u of b.values())for(let g of vi(u))g.type==="follow_up"&&b.has(g.task_seq)&&o(u.seq,g.task_seq);let s=new Set([e.seq]),r=[e.seq];for(;r.length>0;){let u=r.shift();for(let g of l.get(u)??[])s.has(g)||(s.add(g),r.push(g))}let t=[...s].map(u=>b.get(u)).filter(u=>!!u).sort((u,g)=>Xp(u).localeCompare(Xp(g))),n=new Set;for(let u of vi(e))u.type==="related"&&n.add(u.task_seq);for(let u of b.values())u.seq!==e.seq&&vi(u).some(g=>g.type==="related"&&g.task_seq===e.seq)&&n.add(u.seq);let c=[...n].map(u=>b.get(u)).filter(u=>u!==void 0&&u.seq!==e.seq),i=[...b.values()].filter(u=>u.seq!==e.seq&&vi(u).some(g=>g.type==="duplicate_of"&&g.task_seq===e.seq)),a=vi(e).find(u=>u.type==="duplicate_of")?.task_seq,h=a?b.get(a)??null:null,f=[...b.values()].filter(u=>u.seq!==e.seq&&(u.checklist??[]).some(g=>Number(g.task_seq??0)===e.seq));return{lineage:t,related:c,duplicates:i,duplicateOf:h,parents:f}}function Gu(e,d){let b=Ku(e,d);return(b.lineage.length>=2?b.lineage.length-1:0)+b.related.length+b.duplicates.length+(b.duplicateOf?1:0)+b.parents.length}function Zp(e,d){return Gu(e,d)>0}import{Fragment as q4,jsx as Vt,jsxs as Ln}from"react/jsx-runtime";function Wl({item:e,caption:d,onOpen:b,onUnlink:l}){let o=e.is_notice||e.is_event?Tt(e.icon||(e.is_notice?ir:cr)):null;return Ln(Dr,{sx:{display:"flex",alignItems:"center",gap:.75,px:1.25,py:.5,borderRadius:1,"&:hover":{bgcolor:"#f7f7f5"},"&:hover .taskbox-relation-unlink":{opacity:1}},children:[d?Vt(Dr,{component:"span",sx:{flexShrink:0,px:.6,py:.1,borderRadius:.75,fontSize:11.5,fontWeight:500,color:"#8a6d1d",bgcolor:"#faf1d7"},children:d}):null,o?Vt(o,{sx:{fontSize:16,flexShrink:0,color:e.icon_color||"#1e3a8a"}}):null,Ln(Dr,{component:"span",onClick:b,sx:{flex:1,minWidth:0,fontSize:14,color:e.completed?"#9a9a97":"#37352f",textDecoration:e.completed?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...b?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}},children:[e.ticket_no?`${e.ticket_no} `:"",e.title]}),Vt(At,{option:ur(e),small:!0}),l?Vt(N4,{className:"taskbox-relation-unlink",size:"small","aria-label":"\uC5F0\uACB0 \uD574\uC81C",onClick:l,sx:{opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:Vt(j4,{sx:{fontSize:15}})}):null]})}function Qp({task:e,tasks:d,readOnly:b=!1,onOpenTask:l,onLink:o,onUnlink:s,onCreateFollowUp:r}){let[t,n]=Xu(!1),[c,i]=Xu(null),[a,h]=Xu(null),f=Yu(()=>Ku(e,d),[e,d]),u=f.lineage.length>=2,g=Yu(()=>Gu(e,d),[e,d]),m=Yu(()=>{let k=new Set;for(let B of f.lineage)k.add(B.seq);for(let B of f.related)k.add(B.seq);for(let B of f.duplicates)k.add(B.seq);for(let B of f.parents)k.add(B.seq);return f.duplicateOf&&k.add(f.duplicateOf.seq),[...k]},[f]),v=(k,B,R)=>{h({anchorEl:k,targetSeq:B,type:R})};return Ln(_n,{icon:Vt(L4,{sx:{fontSize:19,display:"block"}}),title:Ln(q4,{children:["\uAD00\uB828 \uC5C5\uBB34",g>0?Vt(Dr,{component:"span",sx:{fontSize:12.5,color:"#9a9a97"},children:g}):null]}),titleExtra:b?null:Ln(Dr,{sx:{ml:"auto",display:"flex",alignItems:"center",gap:.5},children:[r?Vt(Jp,{size:"small",color:"inherit",startIcon:Vt(F4,{sx:{fontSize:16}}),onClick:k=>i(k.currentTarget),sx:{minWidth:0,px:1,fontSize:12.5,color:"#787774"},children:"\uD6C4\uC18D \uC5C5\uBB34"}):null,o?Vt(Jp,{size:"small",color:"inherit",startIcon:Vt(z4,{sx:{fontSize:16}}),onClick:()=>n(!0),sx:{minWidth:0,px:1,fontSize:12.5,color:"#787774"},children:"\uC5F0\uACB0"}):null]}),children:[Ln(Dr,{sx:{display:"flex",flexDirection:"column",mt:.5,pl:3.25},children:[u?Vt(Dr,{sx:{mb:f.related.length||f.duplicates.length||f.duplicateOf?1:0},children:f.lineage.map((k,B)=>{let R=k.seq===e.seq,L=B===f.lineage.length-1;return Ln(Dr,{sx:{display:"flex",gap:1},children:[Ln(Dr,{sx:{display:"flex",flexDirection:"column",alignItems:"center",width:14,flexShrink:0,pt:1.1},children:[Vt(Dr,{sx:{width:R?9:7,height:R?9:7,borderRadius:"50%",bgcolor:R?"#2f80ed":k.completed?"#9a9a97":"#c9c8c5",flexShrink:0}}),L?null:Vt(Dr,{sx:{width:"2px",flex:1,bgcolor:"#e6e6e3"}})]}),Ln(Dr,{sx:{flex:1,minWidth:0,pb:L?0:.5},children:[Ln(Dr,{sx:{display:"flex",alignItems:"center",gap:.75},children:[Ln(Dr,{component:"span",onClick:!R&&l?()=>l(k.seq):void 0,sx:{minWidth:0,fontSize:14,fontWeight:R?600:400,color:R?"#2f80ed":k.completed?"#9a9a97":"#37352f",textDecoration:k.completed?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...!R&&l?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}},children:[k.ticket_no?`${k.ticket_no} `:"",k.title]}),Vt(At,{option:ur(k),small:!0})]}),Vt(Dr,{sx:{fontSize:12,color:"#9a9a97"},children:k.completed&&k.completed_time?`${k.completed_time} \uC644\uB8CC`:k.created_time??""})]})]},k.seq)})}):null,f.parents.map(k=>Vt(Wl,{item:k,caption:"\uC0C1\uC704 \uC5C5\uBB34",onOpen:l?()=>l(k.seq):void 0},`parent-${k.seq}`)),f.duplicateOf?Vt(Wl,{item:f.duplicateOf,caption:"\uC6D0\uBCF8",onOpen:l?()=>l(f.duplicateOf.seq):void 0,onUnlink:!b&&s?k=>v(k.currentTarget,f.duplicateOf.seq,"duplicate_of"):void 0}):null,f.duplicates.map(k=>Vt(Wl,{item:k,caption:"\uC911\uBCF5",onOpen:l?()=>l(k.seq):void 0,onUnlink:!b&&s?B=>v(B.currentTarget,k.seq,"duplicate_of"):void 0},`dup-${k.seq}`)),f.related.map(k=>Vt(Wl,{item:k,onOpen:l?()=>l(k.seq):void 0,onUnlink:!b&&s?B=>v(B.currentTarget,k.seq,"related"):void 0},`rel-${k.seq}`)),g===0?Vt(Dr,{sx:{px:1.25,py:.75,fontSize:13.5,color:"#9a9a97"},children:"\uC5F0\uACB0\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):null]}),o?Vt(Ml,{open:t,task:e,tasks:d,excludeSeqs:m,onClose:()=>n(!1),onSubmit:(k,B)=>o(e.seq,k,B)}):null,Vt(kt,{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:()=>i(null),onConfirm:()=>{r?.(e.seq),i(null)}}),Vt(kt,{open:!!a,anchorEl:a?.anchorEl??null,title:"\uC774 \uC5C5\uBB34\uC640\uC758 \uC5F0\uACB0\uC744 \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uD574\uC81C",onCancel:()=>h(null),onConfirm:()=>{a&&s?.(e.seq,a.targetSeq,a.type),h(null)}})]})}import{Fragment as Hr,jsx as ve,jsxs as Kt}from"react/jsx-runtime";function Jo({label:e="\uBE44\uC5B4 \uC788\uC74C"}){return ve(Xt,{component:"span",sx:{color:"#9a9a97"},children:e})}function am({task:e,customTabs:d,statusOptions:b,avatarSrcByName:l,onChangeStatus:o,onChangeLabels:s,onAddLabelOption:r,onChangeProject:t,onAddProject:n,onChangeDate:c,onChangeReminder:i,onMemberEdit:a,onChangePriority:h,onChangeVisibility:f,onChangeRepeat:u,departments:g=[],onChangeEventTime:m,onChangeEventPlace:v,onChangeEventAddress:k,onChangeNote:B,onChangeNoteDraft:R,onChangeContent:L,contentTemplates:A,onSaveContentTemplate:P,onRemoveContentTemplate:N,contentLoading:q=!1,onChangeContentHeight:j,onAddChecklistItem:S,onToggleChecklistItem:T,onRemoveChecklistItem:D,onUpdateChecklistItem:p,onReorderChecklist:y,onConvertChecklistToTask:x,onOpenChecklistTask:w,onLinkChecklistTask:_,resolveChecklistTask:C,relatedTasksPool:O,onOpenRelatedTask:z,onLinkRelatedTask:$,onUnlinkRelatedTask:V,onCreateFollowUpTask:M,onAddAttachments:H,onRemoveAttachment:I,onPreview:E,onDownload:F,onUpdateComment:U,onRemoveComment:Y,onToggleCommentReaction:K,currentUserName:W="",myAccountSeq:X=0,noticeAdmin:J=!1,hideProject:G=!1,hideLabel:te=!1,showTitle:Z=!1,onChangeTitle:re,onToggleCompleted:ie,onChangeIcon:se,onChangeIconColor:oe,employees:pe=[],onAckConfirm:me,onRequestConfirm:ke,onChangeBugField:Le,sprints:Te=[],sprintProject:Me=!1,hideSprint:nt=!1,onChangeSprint:we,onChangeStoryPoints:ee,onChangeResolution:Se,onClaimTask:ge,onVerifyBug:xe}){let[Ze,Pe]=kn(null),He=$4(!1),[Qt,Ue]=kn(null),[Oe,be]=kn(null),[ye,Ce]=kn(null),[et,ze]=kn(!1),De={[Dn]:et?{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"}},[vt,Ve]=kn(null),[qe,Mt]=kn(null),[Ke,ne]=kn(null),[ue,de]=kn(null),[_e,dt]=kn(null),[Re,Be]=kn(null),[wt,Ge]=kn(null),Ee=!!e.is_notice,tt=!!e.is_event,ot=!!e.is_bug,Ye=!!ge&&Ka(e,X),yt=!!ge&&Ga(e,X),Bt=!!xe&&ot&&!!e.completed&&X>0&&(e.author_account_seq??0)===X&&!(e.acks??[]).some(ae=>ae.account_seq===X),bt=!mo(e,X),er=!e.is_event&&(e.is_notice?X>0&&(e.author_account_seq??0)===X:(e.author_account_seq??0)===X||(e.manager_account_seq??0)===X),Nt=e.is_notice||e.is_event?Tt(e.icon||(e.is_notice?ir:cr)):null,Rt=Ee?!Va(e,X):bt,Q=Ye||yt?Kt($n,{onClick:ae=>Ge(ae.currentTarget),children:[ve(tk,{sx:{fontSize:16,mr:.5}}),"\uAC00\uC838\uAC00\uAE30"]}):null,le=Ee?zl(e,pe):"",he=Ee?Bp(e,pe,X):null,fe=Ee?null:Fi(e,X),Ie=!!(fe&&fe.total>0||Ee&&he),Ae=(e.origin_license_seq??0)>0,$e=!Ee&&!Ae,lt=Kt(Hr,{children:[ve(pt,{icon:ve(J4,{sx:{fontSize:17}}),label:"\uC791\uC131\uC790",sx:[eo(9),De??null,...tt?[]:[rr(1)]],children:e.created_by?Kt(Hr,{children:[ve(qr,{names:[e.created_by],size:20,avatarSrcByName:l}),e.created_by]}):ve(Jo,{})}),ve(pt,{icon:ve(rm,{sx:{fontSize:17}}),label:"\uC791\uC131\uC77C\uC2DC",sx:[eo(11),De??null,...tt?[]:[rr(2)]],children:e.created_time?un(e.created_time):ve(Jo,{})})]});return Kt(Hr,{children:[Z?Kt(Xt,{sx:{px:2,pt:2,pb:.5,display:"flex",alignItems:"flex-start",gap:1},children:[er?ve(H4,{checked:e.completed,icon:ve(Y4,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:ve(Qu,{sx:{fontSize:22,color:"#2f80ed"}}),onChange:(ae,Ne)=>{Oe||be({anchorEl:ae.currentTarget,nextCompleted:Ne})},sx:{p:0,mt:.25}}):null,Nt?tt&&!bt?ve(em,{onClick:ae=>Ue(ae.currentTarget),sx:{display:"flex",p:.25,mt:.1,borderRadius:1,color:e.icon_color||"#1e3a8a","&:hover":{bgcolor:"#f2f2f0"}},children:ve(Nt,{sx:{fontSize:20}})}):ve(Xt,{sx:{display:"flex",p:0,mt:.25,color:e.icon_color||(Ee?"#e5484d":"#1e3a8a")},children:ve(Nt,{sx:{fontSize:20}})}):null,ve(Xt,{sx:{flex:1,minWidth:0},children:Ze!==null?ve(Xt,{component:"div",contentEditable:!0,suppressContentEditableWarning:!0,spellCheck:!1,ref:ae=>{if(!ae||ae.dataset.focused)return;ae.dataset.focused="1",ae.focus();let Ne=document.createRange();Ne.selectNodeContents(ae),Ne.collapse(!1);let Je=window.getSelection();Je?.removeAllRanges(),Je?.addRange(Ne)},onBlur:ae=>{let Ne=(ae.currentTarget.textContent??"").replace(/\n/g," ").trim();!He.current&&Ne&&Ne!==e.title&&re(e.seq,Ne),He.current=!1,Pe(null)},onKeyDown:ae=>{ae.key==="Enter"&&(ae.preventDefault(),ae.target.blur()),ae.key==="Escape"&&(He.current=!0,ae.target.blur())},onPaste:ae=>{ae.preventDefault();let Ne=ae.clipboardData.getData("text/plain").replace(/\n/g," ");document.execCommand("insertText",!1,Ne)},sx:{outline:"none",fontSize:19,fontWeight:600,color:"#37352f",lineHeight:"26px",cursor:"text",textDecoration:e.completed?"line-through":"none",userSelect:"text",wordBreak:"break-word"},children:Ze}):ve(Xt,{onClick:()=>Pe(e.title),sx:{fontSize:19,fontWeight:600,color:"#37352f",lineHeight:"26px",cursor:"text",textDecoration:e.completed?"line-through":"none",userSelect:"text",wordBreak:"break-word"},children:e.title})}),ve(kt,{open:!!Oe,anchorEl:Oe?.anchorEl??null,title:Oe?.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:Oe?.nextCompleted?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>be(null),onConfirm:()=>{Oe&&ie(e.seq,Oe.nextCompleted),be(null)}})]}):null,Kt(Xt,{sx:{py:1.5,display:"flex",flexDirection:"column",gap:0,[Dn]:{pb:0,"& > :last-child":{mb:0}}},children:[ve(Sl,{hideProject:G,pinColumns:!0,projectColumn:!tt&&!te?2:"full",values:{tabKey:e.tab_key??"",managerName:e.manager_name,receiverNames:e.receiver_names,startDate:e.start_date,dueDate:e.due_date,reminders:Wn(e),priority:e.priority,eventTime:e.event_time??"",eventPlace:e.event_place??"",eventAddress:e.event_address??""},customTabs:d,avatarSrcByName:Ya(e,l),hideDueDate:!tt&&!!e.repeat_rule,hideReminder:!!e.repeat_rule,notice:Ee,event:tt,readOnly:bt,targetSummary:le,onChangeProject:ae=>t(e.seq,ae),onAddProject:n,onChangeStartDate:ae=>c(e.seq,"start_date",ae),onChangeDueDate:ae=>c(e.seq,"due_date",ae),onChangeReminder:ae=>i(e.seq,ae),onChangePriority:ae=>h(e.seq,ae),onChangeEventTime:ae=>m?.(e.seq,ae),onChangeEventPlace:ae=>v?.(e.seq,ae),onChangeEventAddress:ae=>k?.(e.seq,ae),onMemberEdit:ae=>a(e,ae,null),narrowCollapsedSx:De,reminderLocked:e.completed,managerAction:Q,supportOrigin:(e.origin_license_seq??0)>0?{licenseName:e.origin_license_name??"",authorName:e.origin_author_name||e.author_name||e.created_by||"",contactPhone:e.origin_contact_phone??"",contactEmail:e.origin_contact_email??"",supportType:el(e.support_type??"")}:void 0,leading:Kt(Hr,{children:[Bt||Q&&(Ee||tt)?Kt(Xt,{sx:{gridColumn:"1 / -1",display:"flex",justifyContent:"flex-start",gap:2,px:2,py:1.5},children:[Ee||tt?Q:null,Bt?Kt(Hr,{children:[ve(is,{variant:"contained",size:"large",onClick:()=>xe?.(e.seq,!0),sx:{bgcolor:"#2f80ed"},children:"\uAC80\uC99D\uC644\uB8CC"}),ve(is,{variant:"outlined",size:"large",color:"error",onClick:()=>xe?.(e.seq,!1),children:"\uC7AC\uC624\uD508"})]}):null]}):null,ot&&e.ticket_no?ve(pt,{icon:ve(V4,{sx:{fontSize:17}}),label:"\uD2F0\uCF13",sx:rr(1),children:ve(Xt,{component:"span",sx:{fontVariantNumeric:"tabular-nums"},children:e.ticket_no})}):null,tt?null:ve(Xt,{sx:ot&&e.ticket_no||$e||Ie?rr(ot&&e.ticket_no?2:1):{gridColumn:"1 / -1"},children:ve(pt,{icon:ve(X4,{sx:{fontSize:17}}),label:"\uC0C1\uD0DC",onClick:bt||e.completed?void 0:ae=>Ve(ae),children:ve(At,{option:ur(e)})})}),$e?(()=>{let ae=En(e),Ne=ae==="all"?ve(om,{sx:{fontSize:17,color:"#2f80ed"}}):ae==="group"?ve(im,{sx:{fontSize:17,color:"#d9730d"}}):ve(nm,{sx:{fontSize:17}}),Je=ae==="all"?"\uC804\uCCB4\uACF5\uAC1C":ae==="group"?`\uBD80\uC11C\uACF5\uAC1C \xB7 ${g.find(St=>St.seq===(e.visibility_group_seq??0))?.name??"\uBD80\uC11C"}`:"\uBE44\uACF5\uAC1C";return ve(Xt,{sx:tt?void 0:rr(ot?1:2),children:ve(pt,{icon:Ne,label:"\uACF5\uAC1C",onClick:bt||!f?void 0:St=>Mt(St),children:Je})})})():null,!Ee&&!ot&&!Ae?ve(Xt,{sx:tt?void 0:rr(1),children:ve(pt,{icon:ve(rk,{sx:{fontSize:17,...e.repeat_rule?{color:"#2f80ed"}:{}}}),label:"\uBC18\uBCF5",onClick:bt||!u?void 0:ae=>ne(ae),children:e.repeat_rule?xl(e.repeat_rule):ve(Jo,{label:"\uC5C6\uC74C"})})}):null,!Ee&&!ot&&e.repeat_rule?ve(Xt,{sx:tt?void 0:rr(2),children:ve(pt,{icon:ve(nk,{sx:{fontSize:17}}),label:"\uBC18\uBCF5 \uC885\uB8CC",onClick:bt||!u?void 0:ae=>de(ae),children:e.repeat_until?`${e.repeat_until}\uAE4C\uC9C0`:ve(Jo,{})})}):null,fe&&fe.total>0?ve(Xt,{sx:tt?void 0:rr(2),children:ve(pt,{icon:ve(ef,{sx:{fontSize:17}}),label:"\uD655\uC778",children:fe.canConfirm?ve(is,{size:"small",variant:"contained",onClick:()=>me?.(e.seq),sx:{py:.1,px:1.25,minWidth:0,color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}},children:"\uD655\uC778"}):Kt(is,{size:"small",variant:"outlined",color:"inherit",startIcon:fe.myTime?ve(Qu,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:ae=>Ce({anchorEl:ae.currentTarget,open:!0}),sx:{py:.1,px:1.25,minWidth:0,fontSize:13,color:"text.primary",borderColor:"#d5d8dc",bgcolor:"#fff",whiteSpace:"nowrap"},children:[fe.count," / ",fe.total]})})}):null,Ee&&he?ve(Xt,{sx:rr(2),children:ve(pt,{icon:ve(ef,{sx:{fontSize:17}}),label:"\uD655\uC778",children:ve(Xt,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,minWidth:0},children:he.canAck?ve(is,{size:"small",variant:"contained",onClick:()=>me?.(e.seq),sx:{py:.1,px:1.25,minWidth:0,color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}},children:"\uD655\uC778"}):ve(is,{size:"small",variant:"outlined",color:"inherit",startIcon:he.acked?ve(Qu,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:ae=>Ce({anchorEl:ae.currentTarget,open:!0}),sx:{py:.1,px:1.25,minWidth:0,fontSize:13,color:"text.primary",borderColor:"#d5d8dc",bgcolor:"#fff",whiteSpace:"nowrap"},children:he.total>0&&he.count>=he.total?"\uC644\uB8CC":Kt(Hr,{children:[he.count,ve(Xt,{component:"span",sx:{mx:.4},children:"/"}),he.total]})})})})}):null,Me&&!nt&&!tt&&!Ee?Kt(Hr,{children:[ve(pt,{icon:ve(K4,{sx:{fontSize:17}}),label:"\uBAA9\uD45C",onClick:bt?void 0:ae=>dt(ae),sx:rr(1),children:(e.sprint_seq??0)>0?Te.find(ae=>ae.seq===e.sprint_seq)?.name??"\uC0AD\uC81C\uB41C \uC2A4\uD504\uB9B0\uD2B8":ve(Jo,{label:"\uBBF8\uBC30\uC815"})}),ve(pt,{icon:ve(G4,{sx:{fontSize:17}}),label:"\uD3EC\uC778\uD2B8",sx:rr(2),children:ve(Bo,{value:(e.story_points??0)>0?String(e.story_points):"",placeholder:"\uBBF8\uCD94\uC815",readOnly:bt,onCommit:ae=>ee?.(e.seq,Number(ae.replace(/[^0-9.]/g,""))||0)})})]}):null,tt||te?null:ve(Xt,{sx:[G?{gridColumn:"1 / -1"}:rr(1),De??null],children:ve(pt,{icon:ve(Z4,{sx:{fontSize:17}}),label:"\uB77C\uBCA8",onClick:bt?void 0:ae=>Be(ae),children:(e.label_keys??[]).length>0?ve(qo,{labelKeys:e.label_keys??[],labelOptions:b}):ve(Jo,{})})})]}),afterProject:tt?null:lt,trailing:Kt(Hr,{children:[ot?ve(Tl,{values:{repro:e.bug_repro??"",device:e.bug_device??"",where:e.bug_where??"",version:e.bug_version??"",resolution:e.resolution??""},readOnly:bt,showResolution:!!e.completed,onChangeRepro:ae=>Le?.(e.seq,"bug_repro",ae),onChangeDevice:ae=>Le?.(e.seq,"bug_device",ae),onChangeWhere:ae=>Le?.(e.seq,"bug_where",ae),onChangeVersion:ae=>Le?.(e.seq,"bug_version",ae),onChangeResolution:ae=>Se?.(e.seq,ae)}):null,tt?lt:null,e.completed?Kt(Hr,{children:[ve(pt,{icon:ve(ef,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC790",sx:[eo(10),De??null,...tt?[]:[rr(1)]],children:e.completed_by?Kt(Hr,{children:[ve(qr,{names:[e.completed_by],size:20,avatarSrcByName:l}),e.completed_by]}):ve(Jo,{})}),ve(pt,{icon:ve(rm,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC77C\uC2DC",sx:[eo(12),De??null,...tt?[]:[rr(2)]],children:e.completed_time?un(e.completed_time):ve(Jo,{})})]}):null]})}),Kt(Xt,{sx:{display:"none",[Dn]:{display:"block",mt:1.5,mb:0}},children:[ve(wi,{sx:{borderColor:"#e6e6e3"}}),ve(em,{onClick:()=>ze(ae=>!ae),sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",gap:.5,pt:1.25,pb:1.25,fontSize:13.5,bgcolor:"#f4f4f2",color:"#37352f","&:active":{opacity:.6}},children:et?Kt(Hr,{children:["\uC811\uAE30 ",ve(W4,{sx:{fontSize:18}})]}):Kt(Hr,{children:["\uC815\uBCF4 \uB354\uBCF4\uAE30 ",ve(U4,{sx:{fontSize:18}})]})})]}),Kt(Xt,{children:[ve(wi,{sx:{my:1.5,borderColor:"#e6e6e3",[Dn]:{mt:0,mb:1.25}}}),ve(_n,{icon:ve(Q4,{sx:{fontSize:18,display:"block"}}),title:"\uB0B4\uC6A9",titleExtra:A&&!bt?ve(Bl,{content:e.content??"",templates:A,onApply:ae=>L?.(e.seq,ae),onSave:P,onRemove:N}):void 0,children:ve(Xt,{sx:{userSelect:"text"},children:q?ve(Xt,{sx:{minHeight:e.content_height||180,display:"flex",alignItems:"center",justifyContent:"center"},children:ve(ol,{})}):ve(Il,{syncKey:e.seq,value:e.content??"",height:e.content_height??0,onChangeHeight:j?ae=>j(e.seq,ae):void 0,readOnly:bt,onChange:ae=>L(e.seq,ae)})})}),e.is_bug?null:Kt(Hr,{children:[ve(wi,{sx:{my:1.5,borderColor:"#e6e6e3"}}),ve(_n,{icon:ve(ek,{sx:{fontSize:18,display:"block"}}),title:"\uBE44\uACE0",children:ve(Xt,{sx:{userSelect:"text"},children:ve(Yp,{value:e.note,readOnly:Rt,onCommit:ae=>B(e.seq,ae),onDraftChange:R?ae=>R(e.seq,ae):void 0})})})]}),tt?null:Kt(Hr,{children:[ve(wi,{sx:{my:1.5,borderColor:"#e6e6e3"}}),ve(Rl,{taskSeq:e.seq,checklist:e.checklist??[],removeLocked:Rt,onAdd:S,onToggle:T,onRemove:D,onUpdate:p,onReorder:y,onConvertToTask:x,onOpenLinkedTask:w,resolveLinkedTask:C,myAccountSeq:X,linkCandidates:O,linkBaseTask:e,onLinkExistingTask:_})]}),O&&!tt&&!Ee&&Zp(e,O)?Kt(Hr,{children:[ve(wi,{sx:{my:1.5,borderColor:"#e6e6e3"}}),ve(Qp,{task:e,tasks:O,readOnly:bt,onOpenTask:z,onLink:$,onUnlink:V,onCreateFollowUp:M})]}):null,ve(wi,{sx:{my:1.5,borderColor:"#e6e6e3"}}),ve(Pl,{taskSeq:e.seq,attachments:e.attachments??[],removeLocked:Rt,onAdd:H,onRemove:I,onPreview:E?ae=>E({...ae,taskSeq:e.seq}):void 0,onDownload:F?ae=>F({...ae,taskSeq:e.seq}):void 0})]}),ve(wi,{sx:{my:1.5,borderColor:"#e6e6e3"}}),ve($p,{taskSeq:e.seq,comments:e.comments??[],currentUserName:W,myAccountSeq:X,avatarSrcByName:l,onUpdate:U,onRemove:Y,onToggleReaction:K,onPreview:E?ae=>E({...ae,taskSeq:e.seq}):void 0,onDownload:F?ae=>F({...ae,taskSeq:e.seq}):void 0})]}),ve(Ai,{anchorEl:vt,value:e.status,options:Ee?Is:ot?ai:Es,onSelect:ae=>o(e.seq,ae),onClose:()=>Ve(null)}),ve(Zu,{transitionDuration:0,anchorEl:Ke,open:!!Ke,onClose:()=>ne(null),children:[{value:"",label:"\uC5C6\uC74C"},...Ws].map(ae=>ve(Ju,{selected:(e.repeat_rule??"")===ae.value,onClick:()=>{ne(null),(async()=>{let Ne=e.repeat_rule??"";if(ae.value===Ne)return;if(ae.value===""){await sm({title:"\uBC18\uBCF5 \uD574\uC81C",message:"\uC774\uD6C4 \uBC18\uBCF5 \uD68C\uCC28\uB97C \uBAA8\uB450 \uC0AD\uC81C\uD558\uACE0 \uBC18\uBCF5\uC744 \uD574\uC81C\uD560\uAE4C\uC694? (\uC9C0\uB09C \uD68C\uCC28\uB294 \uB0A8\uC2B5\uB2C8\uB2E4)"})&&u?.(e.seq,"","");return}let Je=String(e.due_date??"").slice(0,10);if(!Je){ok(e.is_event?"\uBC18\uBCF5\uD558\uB824\uBA74 \uC77C\uC815 \uB0A0\uC9DC\uB97C \uBA3C\uC800 \uC120\uD0DD\uD558\uC138\uC694.":"\uBC18\uBCF5\uD558\uB824\uBA74 \uB9C8\uAC10\uC608\uC815\uC744 \uBA3C\uC800 \uC120\uD0DD\uD558\uC138\uC694.");return}Ne&&!await sm({title:"\uBC18\uBCF5 \uBCC0\uACBD",message:"\uC774\uD6C4 \uD68C\uCC28\uB97C \uC0C8 \uADDC\uCE59\uC73C\uB85C \uB2E4\uC2DC \uC0DD\uC131\uD560\uAE4C\uC694? \uC774\uD6C4 \uD68C\uCC28\uC758 \uB313\uAE00\xB7\uCCA8\uBD80\uB294 \uC0AC\uB77C\uC9D1\uB2C8\uB2E4."})||u?.(e.seq,ae.value,vl(Je,ae.value))})()},sx:{fontSize:14,minWidth:140},children:ae.label},ae.value||"none"))}),ve(ik,{anchorEl:ue,open:!!ue,onClose:()=>de(null),selectedDate:e.repeat_until?new Date(`${e.repeat_until}T00:00:00`):new Date,onDateChange:ae=>{de(null);let Ne=qt=>String(qt).padStart(2,"0"),Je=`${ae.getFullYear()}-${Ne(ae.getMonth()+1)}-${Ne(ae.getDate())}`,St=e.repeat_rule??"";St&&u?.(e.seq,St,Je)}}),ve(Zu,{transitionDuration:0,anchorEl:qe,open:!!qe,onClose:()=>Mt(null),children:[{key:"involved",label:"\uBE44\uACF5\uAC1C",icon:ve(nm,{sx:{fontSize:17,color:"#57564f"}}),selected:En(e)==="involved",onPick:()=>f?.(e.seq,"involved",0)},{key:"all",label:"\uC804\uCCB4\uACF5\uAC1C",icon:ve(om,{sx:{fontSize:17,color:"#2f80ed"}}),selected:En(e)==="all",onPick:()=>f?.(e.seq,"all",0)},...g.map(ae=>({key:`group-${ae.seq}`,label:`\uBD80\uC11C\uACF5\uAC1C \xB7 ${ae.name}`,icon:ve(im,{sx:{fontSize:17,color:"#d9730d"}}),selected:En(e)==="group"&&(e.visibility_group_seq??0)===ae.seq,onPick:()=>f?.(e.seq,"group",ae.seq)}))].map(ae=>Kt(Ju,{selected:ae.selected,onClick:()=>{ae.onPick(),Mt(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[ae.icon,ae.label,ae.selected?ve(tm,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},ae.key))}),ve(Zu,{transitionDuration:0,anchorEl:_e,open:!!_e,onClose:()=>dt(null),children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...Te.filter(ae=>`custom-${ae.group_seq}`===String(e.tab_key??"")).map(ae=>({seq:ae.seq,label:vn(ae)}))].map(ae=>Kt(Ju,{onClick:()=>{we?.(e.seq,ae.seq),dt(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[ae.label,(e.sprint_seq??0)===ae.seq?ve(tm,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},ae.seq))}),ve(sl,{anchorEl:ye?.anchorEl??null,open:!!ye?.open,acks:e.acks??[],total:he?.total??fe?.total??0,pendingNames:he?.pendingNames??fe?.pendingNames??[],avatarSrcByName:l,onRequestConfirm:ke&&(he?he.count<he.total:fe&&fe.count<fe.total)?()=>{ke(e.seq),Ce(ae=>ae?{...ae,open:!1}:null)}:void 0,onClose:()=>Ce(ae=>ae?{...ae,open:!1}:null)}),ve(Ll,{anchorEl:Re,selectedKeys:e.label_keys??[],labelOptions:b,onToggle:ae=>s(e.seq,qa(e.label_keys??[],ae)),onAddLabel:r,onClose:()=>Be(null)}),ve(Wo,{anchorEl:Qt,value:e.icon??"",color:e.icon_color??"",onSelect:ae=>{se(e.seq,ae),Ue(null)},onSelectColor:oe?ae=>oe(e.seq,ae):void 0,onClose:()=>Ue(null)}),ve(kt,{open:!!wt,anchorEl:wt,title:Ye?"\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:()=>Ge(null),onConfirm:()=>{ge?.(e.seq),Ge(null)}})]})}import{Fragment as gk,jsx as Wt,jsxs as ss}from"react/jsx-runtime";function r$(){let e=new Date,d=b=>String(b).padStart(2,"0");return`${e.getFullYear()}-${d(e.getMonth()+1)}-${d(e.getDate())} ${d(e.getHours())}:${d(e.getMinutes())}`}function n$({open:e,task:d,onClose:b,onAddComment:l,onSaveFields:o,presentation:s="auto",myAccountSeq:r=0,onToggleCompleted:t,onChangeTitle:n,onChangeIcon:c,onChangeIconColor:i,activityItems:a,activityLoading:h,onLoadActivity:f,onPrint:u,onDelete:g,canDelete:m,...v}){let k=Lt(),B=cm(null);d&&(B.current=d);let R=d??B.current,[L,A]=Ul(!1),[P,N]=Ul(null),[q,j]=Ul(null),S=!!g&&(m??(r>0&&(R?.author_account_seq??0)===r)),[T,D]=Ul({}),p=Object.keys(T).length>0;lm(()=>{D({})},[d?.seq,e]);let y=cm(null);if(lm(()=>{y.current?.scrollTo({top:0})},[d?.seq]),!R)return null;let x=k&&p?{...R,...T}:R,w=x.checklist??[],_=(M,H)=>{k?D(I=>({...I,...M})):H()},C=()=>{let M=T;D({});let H=R.seq,I=M.title===void 0?void 0:String(M.title).trim();if(o){let E={...M};I!==void 0&&(I?E.title=I:delete E.title),Object.keys(E).length>0&&o(H,E),fm({message:"\uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",position:"center"});return}I&&n(H,I),M.icon!==void 0&&c(H,String(M.icon)),M.icon_color!==void 0&&i?.(H,String(M.icon_color)),M.status!==void 0&&v.onChangeStatus(H,M.status),M.label_keys!==void 0&&v.onChangeLabels(H,M.label_keys??[]),M.tab_key!==void 0&&v.onChangeProject(H,String(M.tab_key??"")),M.start_date!==void 0&&v.onChangeDate(H,"start_date",String(M.start_date??"")),M.due_date!==void 0&&v.onChangeDate(H,"due_date",String(M.due_date??"")),M.reminders!==void 0&&v.onChangeReminder(H,M.reminders),M.priority!==void 0&&v.onChangePriority(H,M.priority),M.event_time!==void 0&&v.onChangeEventTime?.(H,String(M.event_time??"")),M.event_place!==void 0&&v.onChangeEventPlace?.(H,String(M.event_place??"")),M.event_address!==void 0&&v.onChangeEventAddress?.(H,String(M.event_address??"")),M.content!==void 0&&v.onChangeContent(H,String(M.content??"")),M.note!==void 0&&v.onChangeNote(H,String(M.note??"")),M.visibility!==void 0&&v.onChangeVisibility?.(H,M.visibility,Number(M.visibility_group_seq??0)),fm({message:"\uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",position:"center"})},O={...v,onChangeStatus:(M,H)=>_({status:H},()=>v.onChangeStatus(M,H)),onChangeLabels:(M,H)=>_({label_keys:H},()=>v.onChangeLabels(M,H)),onChangeProject:(M,H)=>_({tab_key:H},()=>v.onChangeProject(M,H)),onChangeDate:(M,H,I)=>_({[H]:I},()=>v.onChangeDate(M,H,I)),onChangeReminder:(M,H)=>_({reminders:H},()=>v.onChangeReminder(M,H)),onChangePriority:(M,H)=>_({priority:H},()=>v.onChangePriority(M,H)),onChangeEventTime:(M,H)=>_({event_time:H},()=>v.onChangeEventTime?.(M,H)),onChangeEventPlace:(M,H)=>_({event_place:H},()=>v.onChangeEventPlace?.(M,H)),onChangeEventAddress:(M,H)=>_({event_address:H},()=>v.onChangeEventAddress?.(M,H)),onChangeContent:(M,H)=>_({content:H},()=>v.onChangeContent(M,H)),onChangeNote:(M,H)=>_({note:H},()=>v.onChangeNote(M,H)),onMemberEdit:(M,H)=>v.onMemberEdit(M,H,k?I=>D(E=>({...E,...I})):null),onChangeNoteDraft:k?(M,H)=>_({note:H},()=>{}):void 0,onChangeVisibility:v.onChangeVisibility?(M,H,I)=>_({visibility:H,visibility_group_seq:I},()=>v.onChangeVisibility?.(M,H,I)):void 0,onAddChecklistItem:(M,H)=>_({checklist:[...w,{label:H,checked:!1}]},()=>v.onAddChecklistItem(M,H)),onToggleChecklistItem:(M,H,I)=>_({checklist:w.map((E,F)=>F===H?{...E,checked:I}:E)},()=>v.onToggleChecklistItem(M,H,I)),onRemoveChecklistItem:(M,H)=>_({checklist:w.filter((I,E)=>E!==H)},()=>v.onRemoveChecklistItem(M,H)),onUpdateChecklistItem:v.onUpdateChecklistItem?(M,H,I)=>_({checklist:w.map((E,F)=>F===H?{...E,label:I}:E)},()=>v.onUpdateChecklistItem?.(M,H,I)):void 0,onReorderChecklist:v.onReorderChecklist?(M,H)=>_({checklist:H},()=>v.onReorderChecklist?.(M,H)):void 0,onLinkChecklistTask:v.onLinkChecklistTask?(M,H,I)=>_({checklist:[...w,{label:I,checked:!1,task_seq:H}]},()=>v.onLinkChecklistTask?.(M,H,I)):void 0},z=Wt(am,{...O,task:x,myAccountSeq:r,onChangeTitle:(M,H)=>_({title:H},()=>n(M,H)),onToggleCompleted:t,onChangeIcon:(M,H)=>_({icon:H},()=>c(M,H)),onChangeIconColor:(M,H)=>_({icon_color:H},()=>i?.(M,H)),showTitle:k||s==="dialog"}),$=Wt(Hp,{onSubmit:(M,H)=>l(x.seq,M,H)},x.seq);return k||s==="dialog"?ss(gk,{children:[Wt(mk,{open:e,onClose:b,locale:"ko",fontScale:{enabled:!0,default:1.1,min:.6},title:x.is_notice?"\uACF5\uC9C0\uC0AC\uD56D":x.is_event?"\uC77C\uC815":x.is_bug?"\uC624\uB958":"\uC5C5\uBB34",titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1},custom:[{raw:!0,icon:Wt(lk,{size:"small","aria-label":"\uB354\uBCF4\uAE30",onClick:M=>N(M.currentTarget),children:Wt(uk,{sx:{color:"#6b7280"}})})},...k?[{raw:!0,icon:Wt(sk,{variant:"contained",size:"small",disableElevation:!0,disabled:!p,onClick:p?C:void 0,sx:{ml:1.5,height:32,minWidth:64,px:1.75,py:0,borderRadius:1,fontSize:14,fontWeight:600,bgcolor:"#2f80ed","&:hover":{bgcolor:"#2f80ed"},"&.Mui-disabled":{bgcolor:"#f2f2f0",color:"#c9c8c5"}},children:"\uC800\uC7A5\uD558\uAE30"})}]:[]]},fullScreen:k,maxWidth:k?void 0:"md",width:k?void 0:720,mobilePresentation:k?"slide":void 0,tabs:{visible:!1},contentTopPadding:0,contentPaddingX:0,sectionsPaddingTop:0,sectionContentPaddingTop:0,contentBottomPadding:0,scrollPastLastSection:!1,overlayScrollbar:{enabled:!0,contentStyle:{minWidth:0}},actions:{visible:!0,showCancelButton:!1,left:$},sx:{DialogContent:{borderBottom:"none"}},dialogActionSx:{padding:"0 !important","@media (max-width:1023.95px)":{padding:"0 !important"},borderTop:"1px solid #37352f","& .left-actions":{flex:1,width:"100%",minWidth:0,"& > *":{flex:1,minWidth:0}},"& .right-actions":{display:"none"}},sections:[{id:"task-detail",title:"",showTitle:!1,children:Wt(Vl,{sx:{userSelect:"none",width:"100%",minWidth:0,display:"flex",flexDirection:"column",gap:0},children:z})}]},R.seq),ss(ck,{open:!!P,anchorEl:P,onClose:()=>N(null),anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},sx:{zIndex:1500},children:[f?ss(nf,{onClick:()=>{N(null),A(!0)},children:[Wt(tf,{children:Wt(hk,{fontSize:"small"})}),Wt(rf,{children:"\uD65C\uB3D9"})]}):null,ss(nf,{onClick:()=>{N(null),ts(x,!0)},children:[Wt(tf,{children:Wt(dk,{fontSize:"small"})}),Wt(rf,{children:"\uACF5\uC720\uD558\uAE30"})]}),S?ss(nf,{onClick:M=>{let H=P??M.currentTarget;N(null),j(H)},sx:{color:"#e5484d"},children:[Wt(tf,{children:Wt(fk,{fontSize:"small",sx:{color:"#e5484d"}})}),Wt(rf,{children:"\uC0AD\uC81C"})]}):null]}),Wt(kt,{open:!!q,anchorEl:q,title:"\uC774 \uC5C5\uBB34\uB97C \uD734\uC9C0\uD1B5\uC73C\uB85C \uBCF4\uB0B4\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uC0AD\uC81C",onCancel:()=>j(null),onConfirm:()=>{j(null),g?.(x)}}),Wt(Hl,{open:L,taskSeq:x.seq,items:a,loading:h,onLoad:f,onClose:()=>A(!1)})]}):Wt(ak,{anchor:"right",open:e,onClose:b,"aria-label":"\uC5C5\uBB34 \uC0C1\uC138",disableAutoFocus:!0,disableEnforceFocus:!0,sx:{zIndex:M=>M.zIndex.modal},slotProps:{paper:{sx:{width:720,maxWidth:"100vw"}}},children:ss(Vl,{sx:{display:"flex",flexDirection:"column",height:"100%",userSelect:"none"},children:[Wt(Gp,{task:x,myAccountSeq:r,onToggleCompleted:t,onChangeTitle:n,onChangeIcon:c,onChangeIconColor:i,onClose:b,activityItems:a,activityLoading:h,onLoadActivity:f,onPrint:u,onDelete:g,canDelete:m}),Wt(um,{sx:{borderColor:"#e6e6e3"}}),Wt(Vl,{sx:{flex:1,minHeight:0},children:Wt(pk,{ref:y,style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:z})}),Wt(um,{sx:{borderColor:"#37352f"}}),Wt(Vl,{sx:{flexShrink:0},children:$})]})})}import{useEffect as Tk,useState as Oo}from"react";import{Box as Wr,Button as lf,IconButton as pm}from"@mui/material";import{FormDialog as mm}from"@ehfuse/mui-form-dialog";import Ck from"@mui/icons-material/Add";import Bk from"@mui/icons-material/DirectionsRunOutlined";import Ik from"@mui/icons-material/EditOutlined";import{ErrorAlert as gm}from"@ehfuse/alerts";import{ClearTextField as bm,DateTextField as ym,LabelSelect as xm}from"@ehfuse/mui-form-controls";import{useEffect as bk,useState as dm}from"react";import{Box as Ro,Button as yk,FormControlLabel as of,Radio as sf,RadioGroup as xk}from"@mui/material";import{FormDialog as vk}from"@ehfuse/mui-form-dialog";import{LabelSelect as wk}from"@ehfuse/mui-form-controls";import _k from"@ehfuse/overlay-scrollbar";import{Fragment as kk,jsx as Pr,jsxs as as}from"react/jsx-runtime";function hm({open:e,sprint:d,remainingTasks:b,sprints:l,onClose:o,onConfirm:s}){let r=l.filter(h=>h.seq!==d?.seq&&h.group_seq===(d?.group_seq??0)&&h.status!=="closed"),[t,n]=dm("backlog"),[c,i]=dm(0);bk(()=>{e&&(n(r.length>0?"move":"backlog"),i(r[0]?.seq??0))},[e]);let a=b.length>0;return Pr(vk,{open:e,onClose:o,maxWidth:"sm",title:"\uBAA9\uD45C \uB9C8\uAC10",locale:"ko",backdropClick:!1,titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-sprint-close",tabs:{visible:!1},actions:{showCancelButton:!0,right:Pr(yk,{variant:"contained",onClick:()=>s({mode:a?t:"keep",moveToSprintSeq:t==="move"?c:0,taskSeqs:b.map(h=>h.seq)}),disabled:a&&t==="move"&&!(c>0),children:"\uB9C8\uAC10"})},sections:[{id:"sprint-close",title:"",showTitle:!1,children:as(Ro,{sx:{display:"flex",flexDirection:"column",gap:2},children:[as(Ro,{sx:{fontSize:18,color:"#37352f"},children:[Pr(Ro,{component:"span",sx:{fontWeight:600},children:d?.name??""})," \uBAA9\uD45C\uB97C \uB9C8\uAC10\uD569\uB2C8\uB2E4."]}),a?as(kk,{children:[as(Ro,{sx:{fontSize:15,color:"#6f6f6c"},children:["\uB05D\uB098\uC9C0 \uC54A\uC740 \uC5C5\uBB34\uAC00"," ",b.length,"\uAC74 \uC788\uC2B5\uB2C8\uB2E4. \uC5B4\uB5BB\uAC8C \uD560\uAE4C\uC694?"]}),Pr(Ro,{sx:{border:"1px solid #e6e6e3",borderRadius:1,overflow:"hidden"},children:Pr(_k,{style:{maxHeight:220},thumb:{width:6},children:b.map(h=>as(Ro,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1,borderBottom:"1px solid #f2f2f0","&:last-of-type":{borderBottom:"none"}},children:[Pr(Ro,{sx:{flex:1,minWidth:0,fontSize:16,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:h.title}),Pr(At,{option:ur(h)})]},h.seq))})}),as(xk,{value:t,onChange:(h,f)=>n(f),children:[r.length>0?Pr(of,{value:"move",control:Pr(sf,{size:"small"}),label:"\uB2E4\uC74C \uBAA9\uD45C\uB85C \uC774\uC6D4",sx:{"& .MuiFormControlLabel-label":{fontSize:16}}}):null,t==="move"&&r.length>0?Pr(Ro,{sx:{pl:4,pb:1},children:Pr(wk,{size:"small",label:"",fullWidth:!0,value:String(c),options:r.map(h=>({value:String(h.seq),label:h.name})),onChange:h=>i(Number(h.target.value)||0)})}):null,Pr(of,{value:"backlog",control:Pr(sf,{size:"small"}),label:"\uBBF8\uBC30\uC815(\uBC31\uB85C\uADF8)\uC73C\uB85C \uBE7C\uAE30",sx:{"& .MuiFormControlLabel-label":{fontSize:16}}}),Pr(of,{value:"keep",control:Pr(sf,{size:"small"}),label:"\uC774 \uBAA9\uD45C\uC5D0 \uADF8\uB300\uB85C \uB450\uAE30",sx:{"& .MuiFormControlLabel-label":{fontSize:16}}})]})]}):Pr(Ro,{sx:{fontSize:15,color:"#6f6f6c"},children:"\uB0A8\uC740 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4. \uC774\uB300\uB85C \uB9C8\uAC10\uD558\uBA74 \uBAA9\uD45C\uAC00 \uC885\uB8CC\uB429\uB2C8\uB2E4."})]})}]})}var af="custom-";function Sk(e){return e.startsWith(af)}function m$(e){return e>0?`${af}${e}`:""}function Qo(e){if(!Sk(e))return 0;let d=Number(e.slice(af.length));return Number.isInteger(d)&&d>0?d:0}import{Fragment as wm,jsx as Ft,jsxs as ei}from"react/jsx-runtime";var Ek=[{value:"planning",label:"\uACC4\uD68D\uC911"},{value:"active",label:"\uC9C4\uD589\uC911"},{value:"closed",label:"\uC885\uB8CC"}];function vm(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?e.slice(5).replace("-","."):"-"}function I$({open:e,customTabs:d,sprints:b,onClose:l,onCreate:o,onUpdate:s,onChangeStatus:r,tasks:t=[],onCloseSprint:n,onRemove:c}){let i=d.filter(O=>O.useSprints&&!O.archived),[a,h]=Oo(""),[f,u]=Oo(""),[g,m]=Oo(""),[v,k]=Oo(""),[B,R]=Oo(""),[L,A]=Oo(!1),[P,N]=Oo(!1),[q,j]=Oo(null),S=q?t.filter(O=>(O.sprint_seq??0)===q.seq&&!O.completed):[],[T,D]=Oo(0);Tk(()=>{e&&(h(i.length===1?i[0].key:""),u(""),m(""),k(""),R(""),D(0))},[e]);let p=()=>{u(""),m(""),k(""),R(""),D(0),N(!1)},y=O=>{D(O.seq),h(`custom-${O.group_seq}`),u(O.name),m(O.goal),k(O.start_date),R(O.end_date)},x=T>0||P,w=async()=>{let O=Qo(a);if(!O){gm("\uBAA9\uD45C\uB97C \uB9CC\uB4E4 \uD504\uB85C\uC81D\uD2B8\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return}if(!f.trim()){gm("\uBAA9\uD45C \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}A(!0);try{if(T>0){s(T,{name:f.trim(),goal:g.trim(),start_date:v,end_date:B}),p();return}await o({group_seq:O,name:f.trim(),goal:g.trim(),start_date:v,end_date:B})&&p()}finally{A(!1)}},_=new Map(d.map(O=>[Qo(O.key),O.label])),C=Ft(Wr,{children:i.length===0?Ft(Wr,{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.'}):Ft(wm,{children:Ft(Wr,{children:b.length===0?ei(Wr,{sx:{py:4,display:"flex",flexDirection:"column",alignItems:"center",gap:2,color:"#9a9a97"},children:[Ft(Bk,{sx:{fontSize:48,color:"#d9d9d6"}}),Ft(Wr,{sx:{fontSize:13.5},children:"\uB4F1\uB85D\uB41C \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."})]}):b.map(O=>ei(Wr,{sx:{display:"flex",flexDirection:"column",gap:1,"&:not(:last-of-type)::after":{content:'""',display:"block",my:1.75,borderBottom:"1px solid #f0efed"}},children:[ei(Wr,{sx:{minWidth:0},children:[ei(Wr,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[Ft(Wr,{component:"span",sx:{fontSize:18,fontWeight:600,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},children:O.name}),Ft(Wr,{component:"span",sx:{flexShrink:0,px:1,py:.25,borderRadius:.75,bgcolor:"#f1f5f9",color:"#64748b",fontSize:13,fontWeight:500},children:_.get(O.group_seq)??"\uC0AD\uC81C\uB41C \uD504\uB85C\uC81D\uD2B8"}),ei(Wr,{component:"span",sx:{flexShrink:0,fontSize:14,color:"#57564f"},children:[vm(O.start_date)," ~"," ",vm(O.end_date)]})]}),O.goal?Ft(Wr,{sx:{mt:.5,fontSize:14,color:"#787774",lineHeight:1.5},children:O.goal}):null]}),ei(Wr,{sx:{display:"flex",alignItems:"center",gap:.5},children:[Ft(xm,{label:"\uC0C1\uD0DC",showLabel:!1,size:"small",value:O.status,options:Ek.map(z=>({value:z.value,label:z.label})),onChange:z=>{let $=String(z.target.value);if($==="closed"&&n){j(O);return}r(O.seq,$)},sx:{width:104,flexShrink:0}}),Ft(pm,{"aria-label":"\uBAA9\uD45C \uC218\uC815",onClick:()=>y(O),sx:{color:"#9a9a97","&:hover":{color:"#2563eb"}},children:Ft(Ik,{sx:{fontSize:18}})}),Ft(pm,{"aria-label":"\uBAA9\uD45C \uC0AD\uC81C",onClick:()=>c(O.seq),sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:Ft(dr,{style:{width:16,height:16}})})]})]},O.seq))})})});return ei(wm,{children:[Ft(mm,{open:e,onClose:l,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:C}],sectionContentPaddingTop:0,actions:{showCancelButton:!0,left:i.length>0?Ft(lf,{startIcon:Ft(Ck,{}),onClick:()=>{p(),N(!0)},sx:{color:"#2563eb"},children:"\uC0C8 \uBAA9\uD45C"}):void 0,right:Ft(lf,{variant:"contained",onClick:l,children:"\uD655\uC778"})}}),Ft(hm,{open:q!==null,sprint:q,remainingTasks:S,sprints:b,onClose:()=>j(null),onConfirm:O=>{q&&n?.(q.seq,O),j(null)}}),Ft(mm,{open:x,onClose:()=>{N(!1),p()},maxWidth:"sm",title:T>0?"\uBAA9\uD45C \uC218\uC815":"\uC0C8 \uBAA9\uD45C",locale:"ko",backdropClick:!1,tabs:{visible:!1},titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-sprint-form",sections:[{id:"sprint-form",title:"",showTitle:!1,children:Ft(Wr,{sx:{pt:1},children:ei(Wr,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2.5,mt:1},children:[Ft(xm,{label:"\uD504\uB85C\uC81D\uD2B8",size:"medium",value:a,options:i.map(O=>({value:O.key,label:O.label})),onChange:O=>h(String(O.target.value)),disabled:T>0}),Ft(bm,{label:"\uBAA9\uD45C \uC774\uB984",size:"medium",placeholder:"\uC608: 8\uC6D4 2\uC8FC\uCC28",value:f,onChange:O=>u(O.target.value)}),Ft(ym,{size:"medium",label:"\uC2DC\uC791\uC77C",value:v,onChange:O=>k(O.target.value)}),Ft(ym,{size:"medium",label:"\uC885\uB8CC\uC77C",value:B,onChange:O=>R(O.target.value)}),Ft(bm,{label:"\uC124\uBA85",size:"medium",placeholder:"\uC120\uD0DD \uC785\uB825",value:g,onChange:O=>m(O.target.value),sx:{gridColumn:"1 / -1"}})]})})}],actions:{showCancelButton:!0,right:Ft(lf,{variant:"contained",onClick:()=>{w()},disabled:L,children:T>0?"\uC218\uC815":"\uBAA9\uD45C \uB9CC\uB4E4\uAE30"})}})]})}import{Box as rn,Button as Tm,Tooltip as Mk}from"@mui/material";import{FormDialog as Rk}from"@ehfuse/mui-form-dialog";import Ok from"@mui/icons-material/CalendarMonthOutlined";import Ak from"@mui/icons-material/FileUploadOutlined";import Dk from"@mui/icons-material/FileDownloadOutlined";var cf={google:{key:"google",name:"\uAD6C\uAE00 \uCE98\uB9B0\uB354",homeUrl:"https://calendar.google.com/calendar",defaultCalendarName:"\uAD6C\uAE00 \uCE98\uB9B0\uB354",exportSupported:!0,importSupported:!0,subscribeSteps:["\uBC84\uD2BC\uC774 \uB3D9\uC791\uD558\uC9C0 \uC54A\uC73C\uBA74 \uAD6C\uAE00 \uCE98\uB9B0\uB354 > \uB2E4\uB978 \uCE98\uB9B0\uB354 + > **URL\uB85C \uCD94\uAC00**\uC5D0 \uC704 \uC8FC\uC18C\uB97C \uBD99\uC5EC\uB123\uC73C\uC138\uC694.","\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.","\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."],importSteps:["\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 > **\uC124\uC815 \uBC0F \uACF5\uC720**\uB97C \uC5FD\uB2C8\uB2E4.","**\uCE98\uB9B0\uB354 \uD1B5\uD569** \uC139\uC158\uC758 **iCal \uD615\uC2DD\uC758 \uBE44\uBC00 \uC8FC\uC18C**\uB97C \uBCF5\uC0AC\uD574 \uC544\uB798\uC5D0 \uBD99\uC5EC\uB123\uC73C\uC138\uC694."],importPlaceholder:"https://calendar.google.com/calendar/ical/\u2026/basic.ics",buildSubscribeUrl:e=>`https://calendar.google.com/calendar/r?cid=${encodeURIComponent(e.replace(/^https?:\/\//,"webcal://"))}`},apple:{key:"apple",name:"\uC560\uD50C \uCE98\uB9B0\uB354",homeUrl:"https://www.icloud.com/calendar",defaultCalendarName:"\uC560\uD50C \uCE98\uB9B0\uB354",exportSupported:!0,importSupported:!0,subscribeSteps:["\uC544\uC774\uD3F0\xB7\uC544\uC774\uD328\uB4DC: **\uC124\uC815 > \uCE98\uB9B0\uB354 > \uACC4\uC815 > \uACC4\uC815 \uCD94\uAC00 > \uAE30\uD0C0 > \uAD6C\uB3C5 \uCE98\uB9B0\uB354 \uCD94\uAC00**\uC5D0 \uC704 \uC8FC\uC18C\uB97C \uBD99\uC5EC\uB123\uC73C\uC138\uC694.","\uB9E5: \uCE98\uB9B0\uB354 \uC571 > **\uD30C\uC77C > \uC0C8\uB85C\uC6B4 \uCE98\uB9B0\uB354 \uAD6C\uB3C5**\uC5D0 \uBD99\uC5EC\uB123\uC2B5\uB2C8\uB2E4.","iCloud.com(\uC6F9)\uC5D0\uC11C\uB294 \uAD6C\uB3C5\uC744 \uCD94\uAC00\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4 \u2014 \uAE30\uAE30\uC5D0\uC11C \uCD94\uAC00\uD558\uBA74 iCloud \uB85C \uB3D9\uAE30\uD654\uB429\uB2C8\uB2E4."],importSteps:["iCloud.com > \uCE98\uB9B0\uB354\uC5D0\uC11C \uAC00\uC838\uC62C \uCE98\uB9B0\uB354 \uC606 **\uACF5\uC720 \uC544\uC774\uCF58**\uC744 \uB204\uB985\uB2C8\uB2E4.","**\uACF5\uC6A9 \uCE98\uB9B0\uB354**\uB97C \uCF1C\uACE0 \uB098\uC624\uB294 **\uB9C1\uD06C\uB97C \uBCF5\uC0AC**\uD574 \uC544\uB798\uC5D0 \uBD99\uC5EC\uB123\uC73C\uC138\uC694(webcal:// \uC8FC\uC18C\uB3C4 \uADF8\uB300\uB85C \uB429\uB2C8\uB2E4)."],importPlaceholder:"webcal://p00-calendars.icloud.com/published/\u2026",importWarning:"\uC560\uD50C\uC740 **\uACF5\uC6A9 \uCE98\uB9B0\uB354**\uB85C \uBC14\uAFD4\uC57C \uC8FC\uC18C\uAC00 \uB098\uC635\uB2C8\uB2E4. \uC8FC\uC18C\uB97C \uC544\uB294 \uC0AC\uB78C\uC740 \uADF8 \uCE98\uB9B0\uB354\uB97C \uBCFC \uC218 \uC788\uC73C\uB2C8, \uAC1C\uC778 \uC77C\uC815\uC774 \uB2F4\uAE34 \uCE98\uB9B0\uB354\uB294 \uACF5\uAC1C\uD558\uC9C0 \uB9C8\uC138\uC694."},naver:{key:"naver",name:"\uB124\uC774\uBC84 \uCE98\uB9B0\uB354",homeUrl:"https://calendar.naver.com",defaultCalendarName:"\uB124\uC774\uBC84 \uCE98\uB9B0\uB354",exportSupported:!0,importSupported:!0,subscribeSteps:["\uB124\uC774\uBC84 \uCE98\uB9B0\uB354 > \uC67C\uCABD **\uB0B4 \uCE98\uB9B0\uB354** \uC606 **+** > **URL\uB85C \uAD6C\uB3C5\uD558\uAE30**\uC5D0 \uC704 \uC8FC\uC18C\uB97C \uBD99\uC5EC\uB123\uC73C\uC138\uC694.","\uB124\uC774\uBC84\uAC00 \uD53C\uB4DC\uB97C \uC8FC\uAE30\uC801\uC73C\uB85C \uAC00\uC838\uAC00\uBBC0\uB85C \uBCC0\uACBD\uC0AC\uD56D \uBC18\uC601\uC774 \uB2A6\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4.","\uB0B4\uBCF4\uB0B4\uAE30\uB97C \uADF8\uB9CC\uD558\uB824\uBA74 \uB124\uC774\uBC84 \uCE98\uB9B0\uB354\uC5D0\uC11C \uAD6C\uB3C5\uD55C \uCE98\uB9B0\uB354\uB97C \uC0AD\uC81C\uD558\uBA74 \uB429\uB2C8\uB2E4."],importSteps:["\uB124\uC774\uBC84 \uCE98\uB9B0\uB354 > \uC67C\uCABD **\uCE98\uB9B0\uB354 \uC124\uC815**(\uD1B1\uB2C8)\uC5D0\uC11C \uAC00\uC838\uC62C \uCE98\uB9B0\uB354\uB97C \uACE0\uB985\uB2C8\uB2E4.","**\uC678\uBD80 \uACF5\uAC1C** \uD56D\uBAA9\uC5D0\uC11C **\uCE98\uB9B0\uB354 \uACF5\uAC1C**\uB97C \uCCB4\uD06C\uD558\uBA74 \uB098\uC624\uB294 **iCal \uC8FC\uC18C**\uB97C \uBCF5\uC0AC\uD574 \uC544\uB798\uC5D0 \uBD99\uC5EC\uB123\uC73C\uC138\uC694."],importPlaceholder:"https://calendar.naver.com/\u2026(iCal \uC8FC\uC18C)",importWarning:"\uB124\uC774\uBC84\uB294 **\uCE98\uB9B0\uB354\uB97C \uACF5\uAC1C**\uD574\uC57C iCal \uC8FC\uC18C\uAC00 \uB098\uC635\uB2C8\uB2E4. \uC8FC\uC18C\uB97C \uC544\uB294 \uC0AC\uB78C\uC740 \uADF8 \uCE98\uB9B0\uB354\uB97C \uBCFC \uC218 \uC788\uC73C\uB2C8, \uAC1C\uC778 \uC77C\uC815\uC774 \uB2F4\uAE34 \uCE98\uB9B0\uB354\uB294 \uACF5\uAC1C\uD558\uC9C0 \uB9C8\uC138\uC694."}},_m=Object.values(cf);function Kl(e){return cf[e??"google"]??cf.google}import{jsx as pr,jsxs as ls}from"react/jsx-runtime";function z$({open:e,imports:d=[],onOpenExport:b,onOpenImport:l,onClose:o}){let s=ls(rn,{sx:{display:"flex",flexDirection:"column",gap:"24px"},children:[ls(rn,{sx:{bgcolor:"#f2f6fa",borderRadius:1,px:1.5,py:1.25,fontSize:15,lineHeight:1.8,color:"#37352f",display:"flex",flexDirection:"column",gap:.25,"& > div":{display:"flex",gap:1},"& > div::before":{content:'"\u2022"',flexShrink:0}},children:[pr(rn,{children:ls(rn,{component:"span",children:[pr("b",{children:"\uB0B4\uBCF4\uB0B4\uAE30"}),"\uB294 \uB0B4 \uC5C5\uBB34\uB97C \uB2E4\uB978 \uCE98\uB9B0\uB354\uC5D0\uC11C"," ",pr("b",{children:"\uC77D\uAE30\uC804\uC6A9"}),"\uC73C\uB85C \uBCF4\uAC8C \uD569\uB2C8\uB2E4."]})}),pr(rn,{children:ls(rn,{component:"span",children:[pr("b",{children:"\uAC00\uC838\uC624\uAE30"}),"\uB294 \uADF8 \uCE98\uB9B0\uB354\uC758 \uC77C\uC815\uC744 \uC5C5\uBB34\uD568 \uCE98\uB9B0\uB354\uC5D0 \uACB9\uCCD0 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4."]})}),pr(rn,{children:pr(rn,{component:"span",children:"\uB450 \uBC29\uD5A5 \uBAA8\uB450 \uC6D0\uBCF8\uC744 \uACE0\uCE58\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."})})]}),pr(rn,{sx:{border:"1px solid #e6e6e3",borderRadius:1,overflow:"hidden"},children:_m.map((r,t)=>ls(rn,{sx:{display:"flex",alignItems:"center",gap:2,px:2,py:1.75,borderTop:t>0?"1px solid #f2f2f0":"none"},children:[pr(Ok,{sx:{fontSize:22,color:"#787774",flexShrink:0}}),ls(rn,{sx:{flex:1,minWidth:0},children:[pr(rn,{sx:{fontSize:16,color:"#37352f"},children:r.name}),r.exportBlockedReason??r.importBlockedReason?pr(rn,{sx:{fontSize:13.5,color:"#8a6d1d",mt:.25,lineHeight:1.6},children:r.exportBlockedReason??r.importBlockedReason}):null]}),pr(Sm,{label:"\uB0B4\uBCF4\uB0B4\uAE30",icon:pr(Ak,{sx:{fontSize:18}}),supported:r.exportSupported,reason:r.exportBlockedReason,onClick:()=>b(r.key)}),pr(Sm,{label:km(d,r.key)>0?`\uAC00\uC838\uC624\uAE30 (${km(d,r.key)})`:"\uAC00\uC838\uC624\uAE30",icon:pr(Dk,{sx:{fontSize:18}}),supported:r.importSupported,reason:r.importBlockedReason,onClick:()=>l(r.key)})]},r.key))})]});return pr(Rk,{open:e,onClose:o,width:680,title:"\uCE98\uB9B0\uB354 \uC5F0\uB3D9",locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-calendar-link",sectionContentPaddingTop:0,sections:[{id:"calendar-link",showTitle:!1,children:s}],actions:{showCancelButton:!1,right:pr(Tm,{variant:"contained",onClick:o,children:"\uB2EB\uAE30"})}})}function km(e,d){return e.filter(b=>b.provider===d).length}function Sm({label:e,icon:d,supported:b,reason:l,onClick:o}){let s=pr(rn,{component:"span",sx:{flexShrink:0},children:pr(Tm,{size:"medium",variant:"outlined",startIcon:d,disabled:!b,onClick:o,sx:{minWidth:132,whiteSpace:"nowrap"},children:e})});return b?s:pr(Mk,{title:l??"\uC774 \uC11C\uBE44\uC2A4\uB294 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.",arrow:!0,children:s})}import{useState as Cm}from"react";import{Box as Sr,Button as ff,Divider as Lk,IconButton as zk,TextField as jk}from"@mui/material";import{FormDialog as Fk}from"@ehfuse/mui-form-dialog";import qk from"@mui/icons-material/OpenInNewOutlined";import $k from"@mui/icons-material/EventOutlined";import{ConfirmDialog as Hk}from"@ehfuse/alerts";import{Fragment as Pk}from"react";import{Fragment as Nk,jsx as uf}from"react/jsx-runtime";function ea({text:e}){let d=String(e??"").split("**");return uf(Nk,{children:d.map((b,l)=>l%2===1?uf("b",{children:b},l):uf(Pk,{children:b},l))})}import{jsx as jt,jsxs as ta}from"react/jsx-runtime";function Q$({open:e,imports:d,provider:b,onRegister:l,onRemove:o,onClose:s}){let r=Kl(b),[t,n]=Cm(""),[c,i]=Cm(!1),a=async()=>{let u=t.trim();if(u){i(!0);try{await l(u)&&n("")}finally{i(!1)}}},h=async u=>{await Hk({title:"\uAC00\uC838\uC624\uAE30 \uD574\uC81C",message:`"${u.name||r.defaultCalendarName}" \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30\uB97C \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&o(u.seq)},f=ta(Sr,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[ta(Sr,{sx:{color:"#37352f",lineHeight:1.7},children:[r.name,"\uC758 \uC77C\uC815\uC744 ",jt("b",{children:"\uC77D\uAE30\uC804\uC6A9"}),"\uC73C\uB85C \uC5C5\uBB34\uD568 \uCE98\uB9B0\uB354\uC5D0 \uD568\uAED8 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4.",jt("br",{}),"\uD45C\uC2DC/\uC228\uAE40\uC740 \uC5C5\uBB34\uD568 \uC6B0\uC0C1\uB2E8\uC758 ",jt("b",{children:"\uC678\uBD80 \uCE98\uB9B0\uB354 \uC77C\uC815"})," \uC2A4\uC704\uCE58\uB85C \uCF1C\uACE0 \uB055\uB2C8\uB2E4."]}),jt(Sr,{sx:{fontWeight:700,color:"#37352f",mt:.5},children:"\uB4F1\uB85D\uB41C \uCE98\uB9B0\uB354"}),d.length>0?jt(Sr,{sx:{display:"flex",flexDirection:"column",border:"1px solid #e6e6e3",borderRadius:1},children:d.map((u,g)=>ta(Sr,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:.75,borderTop:g>0?"1px solid #efefed":"none"},children:[jt($k,{sx:{fontSize:18,color:"#0f9d58",flexShrink:0}}),jt(Sr,{component:"span",sx:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:u.name||r.defaultCalendarName}),jt(zk,{"aria-label":"\uAC00\uC838\uC624\uAE30 \uD574\uC81C",size:"small",onClick:()=>{h(u)},sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:jt(dr,{sx:{fontSize:18}})})]},u.seq))}):jt(Sr,{sx:{color:"#9a9a97",px:.5},children:"\uC544\uC9C1 \uB4F1\uB85D\uB41C \uCE98\uB9B0\uB354\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}),jt(Lk,{sx:{my:1,borderColor:"#e6e6e3"}}),jt(Sr,{sx:{fontWeight:700,color:"#37352f"},children:"\uC0C8 \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30"}),ta(Sr,{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:[r.importSteps.map(u=>jt(Sr,{children:jt(Sr,{component:"span",children:jt(ea,{text:u})})},u)),jt(Sr,{children:jt(Sr,{component:"span",children:"\uB4F1\uB85D\uD55C \uC8FC\uC18C\uB294 \uC11C\uBC84\uC5D0 \uC800\uC7A5\uB418\uBA70 \uB2E4\uB978 \uC9C1\uC6D0\uC5D0\uAC8C \uBCF4\uC774\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."})}),jt(Sr,{children:jt(Sr,{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."})}),r.importWarning?jt(Sr,{children:jt(Sr,{component:"span",children:jt(ea,{text:r.importWarning})})}):null]}),ta(Sr,{sx:{display:"flex",gap:2,alignItems:"center"},children:[jt(jk,{value:t,onChange:u=>n(u.target.value),fullWidth:!0,label:"iCal \uC8FC\uC18C",placeholder:r.importPlaceholder,slotProps:{input:{spellCheck:!1}}}),jt(ff,{variant:"contained",disabled:!t.trim()||c,onClick:()=>{a()},sx:{flexShrink:0},children:c?"\uD655\uC778 \uC911\u2026":"\uB4F1\uB85D"})]})]});return jt(Fk,{open:e,onClose:s,width:680,title:`${r.name} \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:f}],actions:{showCancelButton:!1,left:jt(ff,{variant:"outlined",startIcon:jt(qk,{sx:{fontSize:16}}),onClick:()=>window.open(r.homeUrl,"_blank"),children:r.name}),right:jt(ff,{variant:"contained",onClick:s,children:"\uB2EB\uAE30"})}})}import{Box as _i,Button as ra,TextField as Wk}from"@mui/material";import{FormDialog as Uk}from"@ehfuse/mui-form-dialog";import Vk from"@mui/icons-material/ContentCopyOutlined";import Bm from"@mui/icons-material/OpenInNewOutlined";import{InfoAlert as Im}from"@ehfuse/alerts";import{Fragment as Gk,jsx as Er,jsxs as ki}from"react/jsx-runtime";function Kk(e){return`${window.location.origin}/api/v1/taskbox/calendar/${e}.ics`}function cH({open:e,feed:d,feedTaskCount:b,provider:l,buildFeedUrl:o,onSubscribe:s,onClose:r}){let t=Kl(l),n=o??Kk,c=d.subscribed?n(d.token):"",i=()=>{navigator.clipboard.writeText(c).then(()=>Im("\uD53C\uB4DC \uC8FC\uC18C\uB97C \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>Im("\uBCF5\uC0AC\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uC8FC\uC18C\uB97C \uC9C1\uC811 \uC120\uD0DD\uD574 \uBCF5\uC0AC\uD558\uC138\uC694."))},a=()=>{let f=t.buildSubscribeUrl?.(c);f&&window.open(f,"_blank")},h=ki(_i,{sx:{display:"flex",flexDirection:"column",gap:2.5},children:[ki(_i,{sx:{color:"#37352f",lineHeight:1.7},children:["\uB0B4\uAC00 \uAD00\uC5EC\uD55C \uC5C5\uBB34\uB97C ",Er("b",{children:"\uC77D\uAE30\uC804\uC6A9"}),"\uC73C\uB85C ",t.name,"\uC5D0\uC11C \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4."]}),b===0?ki(_i,{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.",Er("br",{}),Er("b",{children:"\uB9C8\uAC10\uC608\uC815\uC774 \uC788\uB294 \uB0B4 \uC5C5\uBB34 \uB610\uB294 \uBCF4\uB0B8\uC5C5\uBB34"}),"\uAC00 \uC0DD\uAE30\uBA74"," ",d.subscribed?`${t.name}\uC5D0 \uC790\uB3D9\uC73C\uB85C \uD45C\uC2DC\uB429\uB2C8\uB2E4.`:"\uC5EC\uAE30\uC11C \uAD6C\uB3C5\uC744 \uC2DC\uC791\uD558\uC138\uC694."]}):d.subscribed&&d.enabled?ki(Gk,{children:[Er(Wk,{value:c,fullWidth:!0,label:"\uB0B4 \uD53C\uB4DC \uC8FC\uC18C",slotProps:{input:{readOnly:!0}}}),ki(_i,{sx:{display:"flex",gap:2},children:[Er(ra,{variant:"outlined",startIcon:Er(Vk,{}),onClick:i,children:"\uC8FC\uC18C \uBCF5\uC0AC"}),t.buildSubscribeUrl?ki(ra,{variant:"contained",startIcon:Er(Bm,{}),onClick:a,children:[t.name,"\uC5D0 \uCD94\uAC00"]}):null]}),ki(_i,{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:[t.subscribeSteps.map(f=>Er(_i,{children:Er("span",{children:Er(ea,{text:f})})},f)),Er(_i,{children:Er("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."})})]})]}):Er(ra,{variant:"contained",onClick:s,sx:{alignSelf:"flex-start"},children:"\uAD6C\uB3C5 \uC2DC\uC791 (\uD53C\uB4DC \uBC1C\uAE09)"})]});return Er(Uk,{open:e,onClose:r,width:680,title:`${t.name}\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:h}],actions:{showCancelButton:!1,left:Er(ra,{variant:"outlined",startIcon:Er(Bm,{sx:{fontSize:16}}),onClick:()=>window.open(t.homeUrl,"_blank"),children:t.name}),right:Er(ra,{variant:"contained",onClick:r,children:"\uB2EB\uAE30"})}})}import{useEffect as Yk,useMemo as df,useState as hf}from"react";import{Box as na,Button as Xk,Typography as Zk}from"@mui/material";import{FormDialog as Jk}from"@ehfuse/mui-form-dialog";import{SearchTextField as Qk}from"@ehfuse/mui-form-controls";import{TreeView as e6}from"@ehfuse/tree-view";import{Fragment as s6,jsx as zn,jsxs as a6}from"react/jsx-runtime";function Em(e){return`${e.name}#${e.seq}`}function t6(e){return Number(e.slice(e.lastIndexOf("#")+1))||0}function r6(e){let d=[],b=l=>{for(let o of l.employees??[])d.push(o);for(let o of l.groups??[])b(o)};for(let l of e)b(l);return d}function n6(e,d){return d?[e.name,e.department,e.role_name,e.work_position].filter(Boolean).some(b=>String(b).toLowerCase().includes(d)):!0}function o6(e){let d=[[e.name,e.role_name].filter(Boolean).join(" "),e.department].filter(Boolean).join(" / ");return{id:`emp:${e.seq}`,label:Em(e),renderLabel:zn(na,{component:"span",sx:{display:"inline-flex",alignItems:"baseline",gap:.75},children:zn(na,{component:"span",sx:{fontWeight:400,color:"text.primary"},children:d})})}}function Mm(e,d){let b=(e.groups??[]).map(o=>Mm(o,d)).filter(o=>o!==null),l=(e.employees??[]).filter(o=>n6(o,d)).map(o6);return b.length===0&&l.length===0?null:{id:`group:${e.key}`,label:e.name,children:[...b,...l]}}function i6({groups:e,allEmployees:d,initialSelectedSeqs:b,multiple:l,isMobile:o,onSelectionChange:s}){let[r,t]=hf(""),n=df(()=>e.map(i=>Mm(i,r.trim().toLowerCase())).filter(i=>i!==null),[e,r]),c=df(()=>d.filter(i=>b.includes(i.seq)).map(Em),[]);return a6(s6,{children:[zn(na,{sx:{px:1.5,py:1,borderBottom:"1px solid #cccccc",flexShrink:0},children:zn(Qk,{size:"small",fullWidth:!0,placeholder:"\uC774\uB984, \uBD80\uC11C \uAC80\uC0C9",onSearch:t,onClear:()=>t(""),sx:{"& .MuiOutlinedInput-notchedOutline":{border:"none"},"& .MuiInputBase-root":{px:0}}})}),zn(na,{sx:o?{display:"flex",flexDirection:"column"}:{flex:1,minHeight:0,overflow:"hidden",display:"flex",flexDirection:"column"},children:zn(e6,{items:n,checkbox:!0,multiSelect:l,selectionMode:"child",showSearch:!1,defaultExpanded:!0,initialSelections:c,onChange:i=>s(i.map(t6).filter(a=>a>0)),styles:{border:"none",borderRadius:"0"}})})]})}function yH({open:e,title:d="\uC9C1\uC6D0 \uC120\uD0DD",hint:b="",groups:l,multiple:o=!1,selectedSeqs:s,confirmText:r="\uD655\uC778",onConfirm:t,onClose:n}){let c=Lt(),[i,a]=hf([]),[h,f]=hf(0),u=df(()=>r6(l),[l]),g=s??[];Yk(()=>{e&&(a(g),f(v=>v+1))},[e]);let m=()=>{let v=u.filter(k=>i.includes(k.seq));t(o?v:v.slice(0,1)),n()};return zn(Jk,{open:e,onClose:n,title:`${d}${o&&i.length>0?` (${i.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:zn(na,{sx:{...c?{}:{height:560},display:"flex",flexDirection:"column",border:"1px solid #cccccc",borderRadius:1,...c?{}:{overflow:"hidden"},userSelect:"none"},children:zn(i6,{groups:l,allEmployees:u,initialSelectedSeqs:g,multiple:o,isMobile:c,onSelectionChange:a},h)})}],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:b?zn(Zk,{variant:"body2",color:"text.secondary",sx:{whiteSpace:"pre-line",lineHeight:1.35},children:b}):void 0,right:zn(Xk,{variant:"contained",onClick:m,children:r})}})}import{useEffect as R8,useMemo as f0,useState as ua}from"react";import{Box as Po,Button as d0}from"@mui/material";import{FormDialog as O8}from"@ehfuse/mui-form-dialog";import{LabelSelect as kf}from"@ehfuse/mui-form-controls";import A8 from"@mui/icons-material/SpeedOutlined";import{useEffect as l6,useState as c6}from"react";import{Box as nn,Button as u6}from"@mui/material";import{FormDialog as f6}from"@ehfuse/mui-form-dialog";import{LabelSelect as d6,NumberField as Rm}from"@ehfuse/mui-form-controls";import h6 from"@ehfuse/overlay-scrollbar";import{jsx as Ur,jsxs as oa}from"react/jsx-runtime";var p6=[{value:"count",label:"\uBBF8\uC644\uB8CC \uAC74\uC218"},{value:"points",label:"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8"}];function Om({open:e,capacity:d,employees:b,onClose:l,onSave:o}){let[s,r]=c6(d??fo);l6(()=>{e&&r(d??fo)},[e,d]);let t=s.basis==="points"?"SP":"\uAC74",n=(c,i)=>{let a=Math.max(0,Math.floor(Number(i)||0));r(h=>{let f={...h.by_account};return a>0?f[c]=a:delete f[c],{...h,by_account:f}})};return Ur(f6,{open:e,onClose:l,maxWidth:"sm",title:"\uC778\uC6D0 \uC6A9\uB7C9",locale:"ko",backdropClick:!1,titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-workload-capacity",tabs:{visible:!1},actions:{showCancelButton:!0,right:Ur(u6,{variant:"contained",onClick:()=>{o(s)},children:"\uC800\uC7A5"})},sectionContentPaddingTop:0,sections:[{id:"capacity",title:"",showTitle:!1,children:oa(nn,{sx:{display:"flex",flexDirection:"column",gap:2},children:[Ur(nn,{sx:{fontSize:15,color:"#37352f"},children:"\uD55C \uC0AC\uB78C\uC774 \uB3D9\uC2DC\uC5D0 \uC548\uC744 \uC218 \uC788\uB294 \uC591\uC744 \uC815\uD569\uB2C8\uB2E4. \uC774 \uAC12\uC744 \uB118\uAE30\uBA74 \uC6CC\uD06C\uB85C\uB4DC \uCC28\uD2B8\uC5D0\uC11C \uBD89\uAC8C \uD45C\uC2DC\uB429\uB2C8\uB2E4. 0 \uC73C\uB85C \uB450\uBA74 \uC6A9\uB7C9\uC744 \uC4F0\uC9C0 \uC54A\uACE0 \uD300 \uD3C9\uADE0\uC744 \uAE30\uC900\uC73C\uB85C \uBD05\uB2C8\uB2E4."}),oa(nn,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[Ur(nn,{sx:{width:104,flexShrink:0,fontSize:16,color:"#37352f"},children:"\uC138\uB294 \uB2E8\uC704"}),Ur(d6,{size:"medium",fullWidth:!0,label:"",value:s.basis,options:p6,onChange:c=>r(i=>({...i,basis:c.target.value}))})]}),oa(nn,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[Ur(nn,{sx:{width:104,flexShrink:0,fontSize:16,color:"#37352f"},children:"\uAE30\uBCF8 \uC6A9\uB7C9"}),Ur(Rm,{size:"medium",fullWidth:!0,min:0,max:999,thousandSeparator:!1,align:"right",suffix:t,value:s.default_capacity,onValueChange:c=>r(i=>({...i,default_capacity:Math.max(0,Math.floor(Number(c)||0))}))})]}),Ur(nn,{sx:{pl:"119px",mt:-1.25,fontSize:13.5,color:"#37352f"},children:`\uC804\uC6D0 \uACF5\uD1B5 \uAE30\uC900(${t}) \xB7 0 = \uC6A9\uB7C9 \uC548 \uC500`}),Ur(nn,{sx:{fontSize:16,fontWeight:700,color:"#37352f"},children:"\uC0AC\uB78C\uBCC4 \uC608\uC678"}),b.length===0?Ur(nn,{sx:{fontSize:15,color:"#787774"},children:"\uC9C1\uC6D0 \uBAA9\uB85D\uC774 \uC5C6\uC2B5\uB2C8\uB2E4. \uAE30\uBCF8 \uC6A9\uB7C9\uB9CC \uC801\uC6A9\uB429\uB2C8\uB2E4."}):Ur(nn,{sx:{border:"1px solid #e6e6e3",borderRadius:1,overflow:"hidden"},children:Ur(h6,{style:{maxHeight:260},thumb:{width:6},children:b.filter(c=>Number(c.account_seq)>0).map(c=>oa(nn,{sx:{display:"flex",alignItems:"center",gap:1.5,px:2,py:1,borderBottom:"1px solid #f2f2f0","&:last-of-type":{borderBottom:"none"}},children:[oa(nn,{sx:{flex:1,minWidth:0,fontSize:16,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[c.name,c.department?Ur(nn,{component:"span",sx:{ml:1,fontSize:14,color:"#787774"},children:c.department}):null]}),Ur(nn,{sx:{width:132,flexShrink:0},children:Ur(Rm,{size:"small",fullWidth:!0,min:0,max:999,thousandSeparator:!1,align:"right",suffix:t,clearWhenZero:!0,value:s.by_account[Number(c.account_seq)]??0,onValueChange:i=>n(Number(c.account_seq),String(i??""))})})]},c.account_seq))})})]})}]})}import{Box as Yl}from"@mui/material";import{Bar as y6,BarChart as x6,CartesianGrid as v6,Cell as w6,ReferenceLine as _6,ResponsiveContainer as k6,Tooltip as S6,XAxis as T6,YAxis as C6}from"recharts";import{Box as m6}from"@mui/material";import{jsx as g6}from"react/jsx-runtime";function Vr({text:e,height:d}){return g6(m6,{sx:{display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center",fontSize:14.5,color:"#9a9a97",...typeof d=="number"?{height:d,minHeight:120}:{position:"absolute",inset:0,pointerEvents:"none"}},children:e})}import{createElement as b6}from"react";var Gl="#2f80ed",Am="#a9c9f5",Si="#9a9a97",pf="#2e9e6b",oo="#3d7eff",mf="#c3c8ce",ia="#f2a30f",sa={contentStyle:{fontSize:13.5,color:"#37352f",border:"1px solid #e6e6e3",borderRadius:6},labelStyle:{fontSize:13.5,color:"#37352f",fontWeight:700},itemStyle:{fontSize:13.5}},cs={...sa,cursor:!1},us={wrapperStyle:{fontSize:13.5,paddingTop:10},formatter:e=>b6("span",{style:{paddingRight:14,color:"#37352f"}},e)};function mr(e){return{display:"flex",flexDirection:"column",minHeight:0,position:"relative",...typeof e=="string"?{flex:1}:{}}}var Nr={flexShrink:0,mb:1.5,display:"flex",alignItems:"center",gap:2,flexWrap:"wrap"};function io(e){return{"& *":{outline:"none"},userSelect:"none",...typeof e=="number"?{height:e,flexShrink:0}:{flex:1,minHeight:0}}}import{jsx as jn,jsxs as aa}from"react/jsx-runtime";function B6(e,d){let b=d.filter(l=>l.sprint_seq===e.seq&&!l.archived&&l.completed);return{points:b.reduce((l,o)=>l+(o.story_points??0),0),count:b.length}}function Dm({sprints:e,tasks:d,height:b=200}){let o=[...e].sort((i,a)=>`${i.start_date}|${i.seq}`.localeCompare(`${a.start_date}|${a.seq}`)).map(i=>({sprint:i,...B6(i,d)})),s=o.some(i=>i.points>0),r=s?"SP":"\uAC74",t=o.filter(i=>i.sprint.status==="closed").map(i=>s?i.points:i.count),n=t.length>0?Math.round(t.reduce((i,a)=>i+a,0)/t.length*10)/10:null,c=o.map(i=>({\uBAA9\uD45C:`${i.sprint.name}${i.sprint.status!=="closed"?" (\uC9C4\uD589\uC911)":""}`,\uC644\uB8CC:s?i.points:i.count,closed:i.sprint.status==="closed"}));return o.length===0?jn(Vr,{text:"\uD45C\uC2DC\uD560 \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",height:b}):aa(Yl,{sx:mr(b),children:[aa(Yl,{sx:{flexShrink:0,mb:1,display:"flex",justifyContent:"space-between",flexWrap:"wrap",gap:1,fontSize:14,color:"#000"},children:[aa("span",{children:["\uC644\uB8CC ",s?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uBAA9\uD45C\uBCC4"]}),n!==null?aa("span",{children:["\uD3C9\uADE0(\uC885\uB8CC \uBAA9\uD45C)"," ",jn(Yl,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:n}),r]}):null]}),jn(Yl,{sx:io(b),children:jn(k6,{width:"100%",height:"100%",children:aa(x6,{data:c,margin:{top:8,right:12,left:0,bottom:0},barCategoryGap:"28%",children:[jn(v6,{strokeDasharray:"3 3",stroke:"#e6e6e3"}),jn(T6,{dataKey:"\uBAA9\uD45C",tick:{fontSize:13},tickMargin:6,interval:0}),jn(C6,{tick:{fontSize:13},width:40,allowDecimals:!1}),jn(S6,{...cs,formatter:i=>`${Number(i??0)}${r}`}),n!==null?jn(_6,{y:n,stroke:Si,strokeDasharray:"6 5",label:{value:`\uD3C9\uADE0 ${n}${r}`,position:"right",fontSize:13}}):null,jn(y6,{dataKey:"\uC644\uB8CC",radius:[4,4,0,0],children:c.map(i=>jn(w6,{fill:i.closed?Gl:Am},i.\uBAA9\uD45C))})]})})})]})}import{useMemo as I6}from"react";import{Box as so}from"@mui/material";import{CartesianGrid as E6,Line as Pm,LineChart as M6,ResponsiveContainer as R6,Tooltip as O6,XAxis as A6,YAxis as D6}from"recharts";import{jsx as on,jsxs as ti}from"react/jsx-runtime";function Nm(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?new Date(`${e}T00:00:00`):null}function P6(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function N6(e){return e.slice(5).replace("-",".")}function Lm({sprint:e,tasks:d,todayStr:b,height:l=200,headerLeft:o}){let s=I6(()=>{let a=Nm(e.start_date),h=Nm(e.end_date);if(!a||!h||h<a||Math.round((h.getTime()-a.getTime())/864e5)+1>366)return null;let u=d.filter(P=>P.sprint_seq===e.seq&&!P.archived);if(u.length===0)return{empty:!0};let g=u.some(P=>(P.story_points??0)>0),m=P=>g?P.story_points??0:1,v=u.reduce((P,N)=>P+m(N),0),k=new Map;for(let P of u){if(!P.completed)continue;let N=(P.completed_time??"").slice(0,10),q=/^\d{4}-\d{2}-\d{2}$/.test(N)?N:e.start_date;k.set(q,(k.get(q)??0)+m(P))}let B=[];for(let P=new Date(a);P<=h;P.setDate(P.getDate()+1))B.push(P6(P));let R=v,L=v;return{empty:!1,data:B.map((P,N)=>{let q=B.length===1?0:v*(1-N/(B.length-1));return P<=b&&(R-=k.get(P)??0,L=Math.max(0,R)),{\uB0A0\uC9DC:N6(P),\uC774\uC0C1:Math.round(q*10)/10,\uB0A8\uC740\uB7C9:P<=b?Math.max(0,R):null}}),total:v,usePoints:g,last:L}},[e,d,b]);if(!s)return ti(so,{sx:mr(l),children:[o?on(so,{sx:Nr,children:o}):null,on(Vr,{text:"\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.",height:l})]});if(s.empty)return ti(so,{sx:mr(l),children:[o?on(so,{sx:Nr,children:o}):null,on(Vr,{text:"\uBC30\uC815\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",height:l})]});let{data:r,total:t,usePoints:n,last:c}=s,i=n?"SP":"\uAC74";return ti(so,{sx:mr(l),children:[ti(so,{sx:Nr,children:[o?on(so,{sx:{flexShrink:0},children:o}):null,ti(so,{sx:{flex:1,minWidth:220,display:"flex",justifyContent:"space-between",flexWrap:"wrap",gap:1,fontSize:14,color:"#000"},children:[ti("span",{children:["\uB0A8\uC740 ",n?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uCD1D ",t]}),ti("span",{children:["\uD604\uC7AC"," ",on(so,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:c}),i," \uB0A8\uC74C"]})]})]}),on(so,{sx:io(l),children:on(R6,{width:"100%",height:"100%",children:ti(M6,{data:r,margin:{top:8,right:12,left:0,bottom:0},children:[on(E6,{strokeDasharray:"3 3",stroke:"#e6e6e3"}),on(A6,{dataKey:"\uB0A0\uC9DC",tick:{fontSize:13},tickMargin:6,minTickGap:24}),on(D6,{tick:{fontSize:13},width:40,allowDecimals:!1}),on(O6,{...sa,formatter:a=>`${Number(a??0)}${i}`}),on(Pm,{type:"linear",dataKey:"\uC774\uC0C1",stroke:Si,strokeDasharray:"6 5",strokeWidth:1.5,dot:!1}),on(Pm,{type:"monotone",dataKey:"\uB0A8\uC740\uB7C9",stroke:Gl,strokeWidth:2.5,dot:!1,connectNulls:!1})]})})})]})}import{useMemo as Wm}from"react";import{Box as ao}from"@mui/material";import{Area as yf,AreaChart as F6,CartesianGrid as q6,Legend as $6,ResponsiveContainer as H6,Tooltip as W6,XAxis as U6,YAxis as V6}from"recharts";function Ao(e){let d=b=>String(b).padStart(2,"0");return`${e.getFullYear()}-${d(e.getMonth()+1)}-${d(e.getDate())}`}function Xl(e,d=new Date){let b=new Date(d);return b.setMonth(b.getMonth()-e),b}function KH(e=new Date){return{fromDate:Ao(Xl(1,e)),toDate:Ao(e)}}var bf=864e5,la=[0,1,2,3,5,8,13,21];function Fm(e){return!e.archived&&!e.linked_only&&!e.is_notice&&!e.is_event}function gf(e){let d=String(e??"").trim(),b=/^(\d{4}-\d{2}-\d{2})(?:[ T](\d{2}:\d{2}))?/.exec(d);if(!b)return null;let l=new Date(`${b[1]}T${b[2]??"00:00"}:00`).getTime();return Number.isNaN(l)?null:l}function fs(e){let d=String(e??"").trim();return/^\d{4}-\d{2}-\d{2}/.test(d)?d.slice(0,10):""}function L6(e){let d=fs(e.created_time)||fs(e.start_date)||fs(e.completed_time);if(!d)return null;let b=fs(e.start_date),l=b&&b>d?b:d,o=e.completed?fs(e.completed_time)||d:"";return{created:d,started:l,done:o}}function qm(e,d){let b=/^\d{4}-\d{2}-\d{2}$/.test(d)?new Date(`${d}T00:00:00`):new Date,l=Math.max(2,Math.min(366,Math.round(e))),o=[];for(let s=l-1;s>=0;s-=1)o.push(Ao(new Date(b.getTime()-s*bf)));return o}function $m(e,d,b){let l=qm(d,b),o=e.filter(Fm).map(L6).filter(n=>n!==null),s=l.map(n=>{let c=0,i=0,a=0;for(let h of o)h.created>n||(h.done&&h.done<=n?c+=1:h.started<=n?i+=1:a+=1);return{day:n,done:c,inProgress:i,waiting:a}}),r=s[s.length-1],t=s.reduce((n,c)=>Math.max(n,c.done+c.inProgress+c.waiting),0);return{points:s,max:t,currentWip:r?.inProgress??0,currentTotal:r?r.done+r.inProgress+r.waiting:0,currentDone:r?.done??0}}function z6(e,d){if(e.length===0)return 0;let b=Math.min(e.length-1,Math.max(0,Math.ceil(e.length*d)-1));return e[b]}function zm(e){if(e.length===0)return null;let d=[...e].sort((s,r)=>s-r),b=s=>Math.round(s*10)/10,l=Math.floor(d.length/2),o=d.length%2===1?d[l]:(d[l-1]+d[l])/2;return{count:d.length,median:b(o),average:b(d.reduce((s,r)=>s+r,0)/d.length),p85:b(z6(d,.85))}}function jm(e){for(let d=la.length-1;d>=0;d-=1)if(e>=la[d])return d;return 0}function j6(){return la.map((e,d)=>d===la.length-1?`${e}\uC77C+`:`${e}~${la[d+1]}\uC77C`)}function Hm(e,d,b){let l=qm(d,b),o=l[0],s=l[l.length-1],r=j6(),t=r.map(()=>0),n=r.map(()=>0),c=[],i=[];for(let a of e){if(!Fm(a)||!a.completed)continue;let h=fs(a.completed_time);if(!h||h<o||h>s)continue;let f=gf(a.completed_time),u=gf(a.created_time);if(f===null||u===null)continue;let g=Math.max(0,(f-u)/bf);c.push(g),t[jm(g)]+=1;let m=gf(a.start_date);if(m===null||m>f)continue;let v=Math.max(0,(f-Math.max(m,u))/bf);i.push(v),n[jm(v)]+=1}return{labels:r,leadCounts:t,cycleCounts:n,lead:zm(c),cycle:zm(i)}}import{jsx as Kr,jsxs as ri}from"react/jsx-runtime";function K6(e){return e.slice(5).replace("-",".")}function Um({tasks:e,todayStr:d,days:b=30,height:l=220,headerLeft:o}){let s=Wm(()=>$m(e,b,d),[e,b,d]),r=Wm(()=>s.points.map(n=>({\uB0A0\uC9DC:K6(n.day),\uC644\uB8CC:n.done,\uC9C4\uD589:n.inProgress,\uB300\uAE30:n.waiting})),[s]),t=ri(ao,{sx:Nr,children:[o?Kr(ao,{sx:{flexShrink:0},children:o}):null,ri(ao,{sx:{flex:1,minWidth:220,display:"flex",flexDirection:"column",gap:.5},children:[ri(ao,{sx:{display:"flex",justifyContent:"space-between",flexWrap:"wrap",gap:1,fontSize:14,color:"#000"},children:[ri("span",{children:["\uCD5C\uADFC ",s.points.length,"\uC77C \u2014 \uC811\uC218 ",s.currentTotal,"\uAC74 / \uC644\uB8CC ",s.currentDone,"\uAC74"]}),ri("span",{children:["\uC9C4\uD589 \uC911"," ",Kr(ao,{component:"span",sx:{color:oo,fontWeight:700},children:s.currentWip}),"\uAC74"]})]}),Kr(ao,{sx:{fontSize:13.5,color:"#37352f"},children:"\uB760\uAC00 \uB450\uAEBC\uC6CC\uC9C0\uBA74 \uC77C\uC774 \uC313\uC774\uB294 \uC911, \uC587\uC544\uC9C0\uBA74 \uCC98\uB9AC\uB418\uB294 \uC911\uC785\uB2C8\uB2E4."})]})]});return r.length===0||s.max===0?ri(ao,{sx:mr(l),children:[o?Kr(ao,{sx:Nr,children:o}):null,Kr(Vr,{text:"\uC774 \uAE30\uAC04\uC5D0 \uC811\uC218\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",height:l})]}):ri(ao,{sx:mr(l),children:[t,Kr(ao,{sx:io(l),children:Kr(H6,{width:"100%",height:"100%",children:ri(F6,{data:r,margin:{top:8,right:12,left:0,bottom:4},children:[Kr(q6,{strokeDasharray:"3 3",stroke:"#e6e6e3"}),Kr(U6,{dataKey:"\uB0A0\uC9DC",tick:{fontSize:13},tickMargin:6,minTickGap:24}),Kr(V6,{tick:{fontSize:13},width:40,allowDecimals:!1}),Kr(W6,{...sa,formatter:n=>`${Number(n??0)}\uAC74`}),Kr($6,{...us}),Kr(yf,{type:"monotone",dataKey:"\uC644\uB8CC",stackId:"flow",stroke:pf,fill:pf,fillOpacity:.9}),Kr(yf,{type:"monotone",dataKey:"\uC9C4\uD589",stackId:"flow",stroke:oo,fill:oo,fillOpacity:.85}),Kr(yf,{type:"monotone",dataKey:"\uB300\uAE30",stackId:"flow",stroke:mf,fill:mf,fillOpacity:.9})]})})})]})}import{useMemo as Vm}from"react";import{Box as sn}from"@mui/material";import{Bar as Km,BarChart as G6,CartesianGrid as Y6,Legend as X6,ResponsiveContainer as Z6,Tooltip as J6,XAxis as Q6,YAxis as e8}from"recharts";import{jsx as Tr,jsxs as Sn}from"react/jsx-runtime";function Gm({label:e,color:d,summary:b}){let l=Sn(sn,{sx:{display:"flex",alignItems:"center",gap:.75},children:[Tr(sn,{sx:{width:10,height:10,borderRadius:.5,bgcolor:d,flexShrink:0}}),Tr(sn,{component:"span",sx:{fontWeight:700,color:"#37352f"},children:e})]});return b?Sn(sn,{sx:{display:"contents"},children:[l,Sn("span",{children:[b.count,"\uAC74"]}),Sn("span",{children:["\uC911\uC559\uAC12"," ",Tr(sn,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:b.median}),"\uC77C"]}),Sn("span",{children:["\uD3C9\uADE0 ",b.average,"\uC77C"]}),Sn("span",{children:["85% ",b.p85,"\uC77C \uC774\uB0B4"]})]}):Sn(sn,{sx:{display:"contents"},children:[l,Tr(sn,{component:"span",sx:{gridColumn:"span 4",color:"#9a9a97"},children:"\uD45C\uBCF8 \uC5C6\uC74C"})]})}function Ym({tasks:e,todayStr:d,days:b=30,height:l=200,headerLeft:o}){let s=Vm(()=>Hm(e,b,d),[e,b,d]),r=Vm(()=>s.labels.map((t,n)=>({\uAD6C\uAC04:t,\uB9AC\uB4DC\uD0C0\uC784:s.leadCounts[n],\uC0AC\uC774\uD074\uD0C0\uC784:s.cycleCounts[n]})),[s]);return s.lead?Sn(sn,{sx:mr(l),children:[Sn(sn,{sx:Nr,children:[o?Tr(sn,{sx:{flexShrink:0},children:o}):null,Sn(sn,{sx:{flex:1,minWidth:260,display:"grid",gridTemplateColumns:"max-content max-content max-content max-content max-content",justifyContent:"start",alignItems:"center",columnGap:3,rowGap:.5,fontSize:14,color:"#000"},children:[Tr(Gm,{label:"\uB9AC\uB4DC\uD0C0\uC784(\uC791\uC131\u2192\uC644\uB8CC)",color:oo,summary:s.lead}),Tr(Gm,{label:"\uC0AC\uC774\uD074\uD0C0\uC784(\uC2DC\uC791\u2192\uC644\uB8CC)",color:ia,summary:s.cycle})]})]}),Tr(sn,{sx:io(l),children:Tr(Z6,{width:"100%",height:"100%",children:Sn(G6,{data:r,margin:{top:8,right:12,left:0,bottom:4},barCategoryGap:"24%",children:[Tr(Y6,{strokeDasharray:"3 3",stroke:"#e6e6e3"}),Tr(Q6,{dataKey:"\uAD6C\uAC04",tick:{fontSize:13},tickMargin:6,interval:0}),Tr(e8,{tick:{fontSize:13},width:40,allowDecimals:!1}),Tr(J6,{...cs,formatter:t=>`${Number(t??0)}\uAC74`}),Tr(X6,{...us}),Tr(Km,{dataKey:"\uB9AC\uB4DC\uD0C0\uC784",fill:oo,radius:[3,3,0,0]}),Tr(Km,{dataKey:"\uC0AC\uC774\uD074\uD0C0\uC784",fill:ia,radius:[3,3,0,0]})]})})})]}):Sn(sn,{sx:mr(l),children:[o?Tr(sn,{sx:Nr,children:o}):null,Tr(Vr,{text:"\uC774 \uAE30\uAC04\uC5D0 \uC644\uB8CC\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",height:l})]})}import{useMemo as Qm}from"react";import{Box as Ti}from"@mui/material";import{Bar as vf,BarChart as i8,CartesianGrid as s8,Cell as a8,Legend as l8,ReferenceLine as e0,ResponsiveContainer as c8,Tooltip as u8,XAxis as f8,YAxis as d8}from"recharts";function t8(e,d){if(!/^\d{4}-\d{2}-\d{2}$/.test(e)||!/^\d{4}-\d{2}-\d{2}$/.test(d))return null;let b=new Date(`${e}T00:00:00`).getTime(),l=new Date(`${d}T00:00:00`).getTime();return Number.isNaN(b)||Number.isNaN(l)?null:Math.round((l-b)/864e5)}function r8(e,d,b){let l=String(e.due_date??"").slice(0,10),o=t8(d,l);return o===null?"later":o<0?"overdue":o<=b?"soon":"later"}function Zl(e,d){let{todayStr:b,soonDays:l=7,includeUnassigned:o=!0,limit:s,capacity:r}=d,t=r??fo,n=new Map;for(let i of e){if(i.completed||i.archived||i.is_notice||i.is_event||i.linked_only)continue;let a=Number(i.manager_account_seq??0);if(!a&&!o)continue;let h=a?String(i.manager_name??"").trim()||"\uC774\uB984 \uC5C6\uC74C":"\uBBF8\uBC30\uC815",f=n.get(a)??{accountSeq:a,name:h,overdue:0,soon:0,later:0,total:0,points:0,capacity:0,load:0,ratio:0};f[r8(i,b,l)]+=1,f.total+=1,f.points+=Number(i.story_points??0)||0,n.set(a,f)}for(let i of n.values())i.capacity=n8(i.accountSeq,t),i.load=t.basis==="points"?i.points:i.total,i.ratio=i.capacity>0?i.load/i.capacity:0;let c=[...n.values()].sort((i,a)=>i.accountSeq===0!=(a.accountSeq===0)?i.accountSeq===0?1:-1:i.overdue!==a.overdue?a.overdue-i.overdue:i.total!==a.total?a.total-i.total:i.name.localeCompare(a.name));return typeof s=="number"&&s>0?c.slice(0,s):c}function Jl(e,d){return e.filter(b=>b.completed||b.archived||b.is_notice||b.is_event||b.linked_only?!1:Number(b.manager_account_seq??0)===d).sort((b,l)=>{let o=String(b.due_date??"").slice(0,10),s=String(l.due_date??"").slice(0,10);return!o!=!s?o?-1:1:o!==s?o.localeCompare(s):String(b.title??"").localeCompare(String(l.title??""))})}function n8(e,d){if(!(e>0))return 0;let b=Math.max(0,Math.floor(Number(d.by_account?.[e])||0));return b>0?b:Math.max(0,Math.floor(Number(d.default_capacity)||0))}function Ql(e){return e.capacity>0&&e.load>e.capacity}function Xm(e,d){return d>0&&e.total>=d}function Zm(e){let d=e.filter(b=>b.accountSeq>0);return d.length===0?0:d.reduce((b,l)=>b+l.total,0)/d.length}function xf(e,d){let b=new Date(`${e}T00:00:00`);b.setDate(b.getDate()+d);let l=o=>String(o).padStart(2,"0");return`${b.getFullYear()}-${l(b.getMonth()+1)}-${l(b.getDate())}`}function o8(e){let d=new Date(`${e}T00:00:00`);if(Number.isNaN(d.getTime()))return e;let b=(d.getDay()+6)%7;return xf(e,-b)}function Jm(e,d){let{todayStr:b,includeUnassigned:l=!0,weeks:o=6,limit:s}=d,r=o8(b),t=Array.from({length:Math.max(1,o)},(f,u)=>{let g=xf(r,u*7),m=xf(g,6),[,v,k]=g.split("-");return{start:g,end:m,label:`${Number(v)}/${Number(k)}`,isCurrent:u===0}}),n=t[t.length-1].end,c=new Map;for(let f of e){if(f.completed||f.archived||f.is_notice||f.is_event||f.linked_only)continue;let u=Number(f.manager_account_seq??0);if(!u&&!l)continue;let g=u?String(f.manager_name??"").trim()||"\uC774\uB984 \uC5C6\uC74C":"\uBBF8\uBC30\uC815",m=c.get(u)??{accountSeq:u,name:g,overdue:0,byWeek:new Array(t.length).fill(0),noDue:0,total:0,beyond:0},v=String(f.due_date??"").slice(0,10);if(m.total+=1,!/^\d{4}-\d{2}-\d{2}$/.test(v))m.noDue+=1;else if(v<b)m.overdue+=1;else if(v>n)m.beyond+=1;else{let k=t.findIndex(B=>v>=B.start&&v<=B.end);k>=0?m.byWeek[k]+=1:m.beyond+=1}c.set(u,m)}let i=[...c.values()].sort((f,u)=>f.accountSeq===0!=(u.accountSeq===0)?f.accountSeq===0?1:-1:f.overdue!==u.overdue?u.overdue-f.overdue:f.total!==u.total?u.total-f.total:f.name.localeCompare(u.name)),a=typeof s=="number"&&s>0?i.slice(0,s):i,h=a.reduce((f,u)=>Math.max(f,u.overdue,u.noDue,...u.byWeek),0);return{weeks:t,rows:a,maxCell:h}}import{Fragment as t0,jsx as Cr,jsxs as ni}from"react/jsx-runtime";var ca="#e5484d";function r0({tasks:e,todayStr:d,soonDays:b=7,overloadThreshold:l=0,capacity:o=fo,height:s=200,headerLeft:r,selectedAccountSeq:t=0,onSelectPerson:n}){let c=Qm(()=>Zl(e,{todayStr:d,soonDays:b,capacity:o}),[e,d,b,o]),i=Qm(()=>Zm(c),[c]),a=l>0?l:Math.max(3,Math.ceil(i*1.5)),h=o.default_capacity>0||Object.keys(o.by_account).length>0,f=o.basis==="points"?"SP":"\uAC74",u=c.filter(g=>g.accountSeq>0&&(h?Ql(g):Xm(g,a))).length;return c.length===0?ni(Ti,{sx:mr(s),children:[r?Cr(Ti,{sx:Nr,children:r}):null,Cr(Vr,{text:"\uB2F4\uB2F9\uC790\uAC00 \uC9C0\uC815\uB41C \uBBF8\uC644\uB8CC \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",height:s})]}):ni(Ti,{sx:mr(s),children:[ni(Ti,{sx:Nr,children:[r,ni(Ti,{sx:{fontSize:13.5,color:"#37352f"},children:["1\uC778 \uD3C9\uADE0 ",Cr("b",{children:i.toFixed(1)}),"\uAC74 \xB7"," ",h?ni(t0,{children:["\uC6A9\uB7C9 ",Cr("b",{children:o.default_capacity||"\uAC1C\uC778\uBCC4"}),o.default_capacity?f:""]}):ni(t0,{children:["\uACFC\uBD80\uD558 \uAE30\uC900 ",Cr("b",{children:a}),"\uAC74"]}),u>0?ni(Ti,{component:"span",sx:{ml:1,color:ca,fontWeight:700},children:["\uCD08\uACFC ",u,"\uBA85"]}):null]})]}),Cr(Ti,{sx:io(s),children:Cr(c8,{width:"100%",height:"100%",children:ni(i8,{data:c,layout:"vertical",onClick:n?g=>{let m=c.find(v=>v.name===String(g?.activeLabel??""));m&&n(m.accountSeq===t?0:m.accountSeq)}:void 0,style:n?{cursor:"pointer"}:void 0,margin:{top:4,right:16,bottom:4,left:8},barCategoryGap:c.length>8?4:10,children:[Cr(s8,{strokeDasharray:"3 3",horizontal:!1,stroke:"#eceae6"}),Cr(f8,{type:"number",allowDecimals:!1,tick:{fontSize:12}}),Cr(d8,{type:"category",dataKey:"name",width:84,tick:{fontSize:12},interval:0}),Cr(u8,{...cs,formatter:(g,m)=>[`${Number(g)||0}\uAC74`,String(m)],labelFormatter:g=>{let m=c.find(v=>v.name===g);return!m||!(m.capacity>0)?String(g):`${g} \u2014 \uC6A9\uB7C9 ${m.capacity}${f} \uC911 ${m.load} (${Math.round(m.ratio*100)}%)`}}),Cr(l8,{...us}),i>0?Cr(e0,{x:i,stroke:Si,strokeDasharray:"4 4",label:{value:"\uD3C9\uADE0",position:"top",fontSize:11,fill:Si}}):null,o.default_capacity>0?Cr(e0,{x:o.default_capacity,stroke:ca,strokeDasharray:"2 3",label:{value:"\uC6A9\uB7C9",position:"top",fontSize:11,fill:ca}}):null,Cr(vf,{dataKey:"overdue",name:"\uC9C0\uC5F0",stackId:"load",fill:ca}),Cr(vf,{dataKey:"soon",name:`\uC784\uBC15(${b}\uC77C)`,stackId:"load",fill:ia}),Cr(vf,{dataKey:"later",name:"\uC5EC\uC720",stackId:"load",fill:oo,radius:[0,3,3,0],children:c.map(g=>Cr(a8,{fill:h&&Ql(g)?ca:oo,fillOpacity:h&&Ql(g)?.45:1,stroke:g.accountSeq===t?"#37352f":void 0,strokeWidth:g.accountSeq===t?1.5:0},g.accountSeq))})]})})})]})}import{useEffect as v8,useState as w8}from"react";import{Box as _8,Button as k8}from"@mui/material";import{FormDialog as S8}from"@ehfuse/mui-form-dialog";import{useState as h8}from"react";import{Box as gr,Button as p8,Menu as m8,MenuItem as g8}from"@mui/material";import b8 from"@mui/icons-material/PersonOutlineOutlined";import y8 from"@ehfuse/overlay-scrollbar";import{jsx as Mr,jsxs as Do}from"react/jsx-runtime";var n0=56,o0=68,i0=96;function x8(e){let d=String(e.due_date??"").slice(0,10);return d?d.slice(5).replace("-","/"):"-"}function s0(e,d){let b=String(e.due_date??"").slice(0,10);return!!b&&b<d}function a0({tasks:e,row:d,todayStr:b,employees:l,rows:o,height:s=200,hideSummary:r=!1,onChangeManager:t,onOpenTask:n}){let[c,i]=h8(null),a=Jl(e,d.accountSeq),h=f=>o.find(u=>u.accountSeq===f)?.total??0;return Do(gr,{sx:{display:"flex",flexDirection:"column",minHeight:0,height:s},children:[r?null:Do(gr,{sx:{display:"flex",alignItems:"center",gap:1,px:.5,pb:.75,fontSize:14,color:"#37352f"},children:[Mr(gr,{component:"span",sx:{fontWeight:700},children:d.name}),Do(gr,{component:"span",children:["\uBBF8\uC644\uB8CC ",a.length,"\uAC74"]}),d.capacity>0?Do(gr,{component:"span",sx:{color:d.load>d.capacity?"#e5484d":"#787774"},children:["\xB7 \uC6A9\uB7C9 ",d.capacity," \uC911 ",d.load]}):null]}),Do(gr,{sx:{flex:1,minHeight:0,display:"flex",flexDirection:"column",border:"1px solid #e6e6e3",borderRadius:1,overflow:"hidden"},children:[Do(gr,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1,flexShrink:0,bgcolor:"#fafaf9",borderBottom:"1px solid #e6e6e3",fontSize:13.5,fontWeight:600,color:"#37352f"},children:[Mr(gr,{sx:{width:n0,flexShrink:0},children:"\uB9C8\uAC10"}),Mr(gr,{sx:{flex:1,minWidth:0},children:"\uC5C5\uBB34"}),Mr(gr,{sx:{width:o0,flexShrink:0,textAlign:"center"},children:"\uC911\uC694\uB3C4"}),t?Mr(gr,{sx:{width:i0,flexShrink:0,textAlign:"center"},children:"\uCC45\uC784\uC790"}):null]}),Mr(gr,{sx:{flex:1,minHeight:0},children:Mr(y8,{style:{height:"100%"},thumb:{width:6},children:a.length===0?Mr(gr,{sx:{p:2,fontSize:14,color:"#9a9a97"},children:"\uBBF8\uC644\uB8CC \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):a.map(f=>Do(gr,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1.5,borderBottom:"1px solid #f2f2f0"},children:[Mr(gr,{sx:{width:n0,flexShrink:0,fontSize:13.5,color:s0(f,b)?"#e5484d":"#787774",fontWeight:s0(f,b)?700:400},children:x8(f)}),Mr(gr,{onClick:n?()=>n(f.seq):void 0,sx:{flex:1,minWidth:0,fontSize:14.5,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...n?{cursor:"pointer","&:hover":{textDecoration:"underline"}}:{}},children:f.title}),Mr(gr,{sx:{width:o0,flexShrink:0,display:"flex",justifyContent:"center"},children:Mr(Fr,{priority:f.priority})}),t?Mr(gr,{sx:{width:i0,flexShrink:0,display:"flex",justifyContent:"center"},children:Mr(p8,{size:"small",variant:"outlined",startIcon:Mr(b8,{sx:{fontSize:17}}),onClick:u=>i({el:u.currentTarget,taskSeq:f.seq}),children:"\uC62E\uAE30\uAE30"})}):null]},f.seq))})})]}),Mr(m8,{anchorEl:c?.el??null,open:!!c,onClose:()=>i(null),transitionDuration:0,children:l.filter(f=>Number(f.account_seq)>0&&Number(f.account_seq)!==d.accountSeq).map(f=>Do(g8,{onClick:()=>{c&&t&&t(c.taskSeq,Number(f.account_seq),f.name),i(null)},sx:{fontSize:14,minWidth:200},children:[Mr(gr,{sx:{flex:1},children:f.name}),Do(gr,{component:"span",sx:{ml:2,fontSize:13,color:"#787774"},children:[h(Number(f.account_seq)),"\uAC74"]})]},f.account_seq))})]})}import{jsx as ec}from"react/jsx-runtime";function l0({open:e,row:d,rows:b,tasks:l,todayStr:o,employees:s,onClose:r,onChangeManager:t,onOpenTask:n}){let[c,i]=w8(d);v8(()=>{d&&i(d)},[d]);let a=d??c,h=a?Jl(l,a.accountSeq).length:0;return ec(S8,{open:e,onClose:r,maxWidth:"sm",title:a?`${a.name} \uC5C5\uBB34 (${h})`:"\uC5C5\uBB34",locale:"ko",titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-workload-person",tabs:{visible:!1},actions:{showCancelButton:!1,right:ec(k8,{variant:"contained",onClick:r,children:"\uB2EB\uAE30"})},sections:[{id:"person-tasks",title:"",showTitle:!1,children:ec(_8,{sx:{minHeight:0},children:a?ec(a0,{tasks:l,row:a,rows:b,todayStr:o,employees:s,height:"min(420px, 52vh)",hideSummary:!0,onChangeManager:t,onOpenTask:n}):null})}]})}import{useMemo as T8}from"react";import{Box as pn,Tooltip as C8}from"@mui/material";import{OverlayScrollbar as B8}from"@ehfuse/overlay-scrollbar";import{jsx as Gr,jsxs as rc}from"react/jsx-runtime";var c0="#e5484d",I8="#2f80ed",E8="#9a9a97",wf=30,M8=96,tc=56;function _f({count:e,max:d,color:b,title:l}){let o=e>0&&d>0?.18+e/d*.72:0;return Gr(C8,{title:l,arrow:!0,disableInteractive:!0,placement:"top",children:Gr(pn,{sx:{display:"flex",alignItems:"center",justifyContent:"center",borderRight:"1px solid #ececea",borderBottom:"1px solid #ececea",bgcolor:o>0?`${b}${Math.round(o*255).toString(16).padStart(2,"0")}`:"transparent",color:o>.55?"#fff":"#37352f",fontSize:12.5,fontWeight:e>0?700:400,fontVariantNumeric:"tabular-nums"},children:e>0?e:""})})}function u0({tasks:e,todayStr:d,weeks:b=6,height:l=200}){let o=T8(()=>Jm(e,{todayStr:d,weeks:b}),[e,d,b]);if(o.rows.length===0)return Gr(pn,{sx:mr(l),children:Gr(Vr,{text:"\uB2F4\uB2F9\uC790\uAC00 \uC9C0\uC815\uB41C \uBBF8\uC644\uB8CC \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",height:l})});let s=`${M8}px ${tc}px repeat(${o.weeks.length}, minmax(${tc}px, 1fr)) ${tc}px ${tc}px`,r={height:wf,display:"flex",alignItems:"center",justifyContent:"center",borderRight:"1px solid #ececea",borderBottom:"1px solid #dcdad6",fontSize:12,fontWeight:700,color:"#37352f",bgcolor:"#f8f8f7",whiteSpace:"nowrap"};return Gr(pn,{sx:mr(l),children:Gr(B8,{style:{height:"100%"},thumb:{width:8},children:rc(pn,{sx:{display:"grid",gridTemplateColumns:s,minWidth:"fit-content",height:"100%",gridTemplateRows:`${wf}px repeat(${o.rows.length}, minmax(${wf}px, 1fr))`},children:[Gr(pn,{sx:{...r,justifyContent:"flex-start",pl:1},children:"\uB2F4\uB2F9\uC790"}),Gr(pn,{sx:{...r,color:c0},children:"\uC9C0\uC5F0"}),o.weeks.map(t=>Gr(pn,{sx:{...r,...t.isCurrent?{borderBottom:"2px solid #2f80ed"}:{}},children:t.label},t.start)),Gr(pn,{sx:r,children:"\uB9C8\uAC10\uC5C6\uC74C"}),Gr(pn,{sx:r,children:"\uD569\uACC4"}),o.rows.map(t=>rc(pn,{sx:{display:"contents"},children:[Gr(pn,{sx:{display:"flex",alignItems:"center",pl:1,borderRight:"1px solid #ececea",borderBottom:"1px solid #ececea",fontSize:13,color:t.accountSeq>0?"#37352f":"#9a9a97",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:t.name}),Gr(_f,{count:t.overdue,max:o.maxCell,color:c0,title:`${t.name} \xB7 \uC9C0\uC5F0 ${t.overdue}\uAC74`}),t.byWeek.map((n,c)=>Gr(_f,{count:n,max:o.maxCell,color:I8,title:`${t.name} \xB7 ${o.weeks[c].label} \uC8FC \uB9C8\uAC10 ${n}\uAC74`},o.weeks[c].start)),Gr(_f,{count:t.noDue,max:o.maxCell,color:E8,title:`${t.name} \xB7 \uB9C8\uAC10 \uBBF8\uC815 ${t.noDue}\uAC74`}),rc(pn,{sx:{display:"flex",alignItems:"center",justifyContent:"center",borderBottom:"1px solid #ececea",fontSize:12.5,fontWeight:700,color:"#37352f",fontVariantNumeric:"tabular-nums"},children:[t.total,t.beyond>0?rc(pn,{component:"span",sx:{ml:.25,fontSize:10.5,color:"#9a9a97"},children:["(+",t.beyond,")"]}):null]})]},t.accountSeq))]})})})}import{Fragment as h0,jsx as Zt,jsxs as nc}from"react/jsx-runtime";var p0="min(560px, 62vh)",D8=`calc(${p0} - 4px)`,P8=[{value:"30",label:"\uCD5C\uADFC 30\uC77C"},{value:"60",label:"\uCD5C\uADFC 60\uC77C"},{value:"90",label:"\uCD5C\uADFC 90\uC77C"}];function fU({open:e,sprints:d,tasks:b,todayStr:l,showSprintCharts:o,capacity:s=fo,capacityEmployees:r=[],onSaveCapacity:t,onChangeTaskManager:n,onOpenTask:c,initialSprintSeq:i=0,onClose:a}){let[h,f]=ua(0),[u,g]=ua(30);R8(()=>{if(!e)return;let y=d.find(w=>w.status==="active")??d[0],x=d.find(w=>w.seq===i)??y;f(x?.seq??0)},[e]);let m=f0(()=>d.find(y=>y.seq===h)??null,[d,h]),v={height:D8,boxSizing:"border-box",px:3,py:2.5,display:"flex",flexDirection:"column",minHeight:0,overflow:"hidden"},k=Zt(kf,{label:"\uBAA9\uD45C",showLabel:!1,showEmptyOption:!1,value:h?String(h):"",options:d.map(y=>({value:String(y.seq),label:vn(y)})),onChange:y=>f(Number(y.target.value)||0),sx:{width:280,flexShrink:0}}),[B,R]=ua("distribution"),L=Zt(kf,{label:"\uBCF4\uAE30",showLabel:!1,showEmptyOption:!1,value:B,options:[{value:"distribution",label:"\uC9C0\uAE08 \uBD80\uD558(\uC9C0\uC5F0\xB7\uC784\uBC15\xB7\uC5EC\uC720)"},{value:"timeline",label:"\uC8FC\uBCC4 \uB9C8\uAC10 \uBC00\uC9D1"}],onChange:y=>R(y.target.value==="timeline"?"timeline":"distribution"),sx:{width:280,flexShrink:0}}),[A,P]=ua(!1),[N,q]=ua(0),j=f0(()=>Zl(b,{todayStr:l,capacity:s}),[b,l,s]),S=j.find(y=>y.accountSeq===N)??null,T=nc(h0,{children:[L,t?Zt(d0,{size:"small",variant:"outlined",startIcon:Zt(A8,{sx:{fontSize:18}}),onClick:()=>P(!0),sx:{flexShrink:0},children:"\uC6A9\uB7C9"}):null]}),D=o??d.length>0,p=Zt(kf,{label:"\uAE30\uAC04",showLabel:!1,showEmptyOption:!1,value:String(u),options:P8,onChange:y=>g(Number(y.target.value)||30),sx:{width:280,flexShrink:0}});return nc(h0,{children:[Zt(O8,{open:e,onClose:a,maxWidth:"md",title:"\uC5C5\uBB34 \uCC28\uD2B8",locale:"ko",contentTopPadding:0,contentPaddingX:0,sectionsPaddingTop:0,sectionContentPaddingTop:0,sectionTitleGap:0,fixedHeight:p0,contentBottomPadding:0,scrollPastLastSection:!1,tabs:{visible:!0,switchContent:!0,fullWidth:!0},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-sprint-charts",sections:[...D?[{id:"velocity",tabTitle:"\uBCA8\uB85C\uC2DC\uD2F0",showTitle:!1,children:Zt(Po,{sx:v,children:Zt(Dm,{sprints:d,tasks:b,height:"100%"})})},{id:"burndown",tabTitle:"\uBC88\uB2E4\uC6B4",showTitle:!1,children:Zt(Po,{sx:v,children:m?Zt(Lm,{sprint:m,tasks:b,todayStr:l,height:"100%",headerLeft:k}):nc(Po,{sx:mr("100%"),children:[Zt(Po,{sx:Nr,children:k}),Zt(Vr,{text:"\uBC88\uB2E4\uC6B4\uC744 \uBCFC \uBAA9\uD45C\uB97C \uC120\uD0DD\uD558\uC138\uC694.",height:"100%"})]})})},{id:"cumulative-flow",tabTitle:"\uB204\uC801\uD750\uB984\uB3C4",showTitle:!1,children:Zt(Po,{sx:v,children:Zt(Um,{tasks:b,todayStr:l,days:u,height:"100%",headerLeft:p})})}]:[],{id:"workload",tabTitle:"\uC6CC\uD06C\uB85C\uB4DC",showTitle:!1,children:Zt(Po,{sx:v,children:B==="timeline"?nc(Po,{sx:{display:"flex",flexDirection:"column",height:"100%",minHeight:0},children:[Zt(Po,{sx:Nr,children:T}),Zt(u0,{tasks:b,todayStr:l,height:"100%"})]}):Zt(r0,{tasks:b,todayStr:l,height:"100%",capacity:s,headerLeft:T,selectedAccountSeq:N,onSelectPerson:n?q:void 0})})},{id:"lead-time",tabTitle:"\uB9AC\uB4DC\uD0C0\uC784",showTitle:!1,children:Zt(Po,{sx:v,children:Zt(Ym,{tasks:b,todayStr:l,days:u,height:"100%",headerLeft:p})})}],actions:{showCancelButton:!1,right:Zt(d0,{variant:"contained",onClick:a,children:"\uB2EB\uAE30"})}}),Zt(l0,{open:N>0,row:S,rows:j,tasks:b,todayStr:l,employees:r,onClose:()=>q(0),onChangeManager:n,onOpenTask:c}),t?Zt(Om,{open:A,capacity:s,employees:r,onClose:()=>P(!1),onSave:async y=>{await t(y),P(!1)}}):null]})}import{Checkbox as N8,Divider as L8,Menu as z8,MenuItem as Sf}from"@mui/material";import{jsx as fa,jsxs as m0}from"react/jsx-runtime";function gU({anchorEl:e,candidates:d,selectedNames:b,avatarSrcByName:l,onToggle:o,onClear:s,onClose:r}){return m0(z8,{anchorEl:e,open:!!e,onClose:r,transitionDuration:0,children:[d.length===0?fa(Sf,{disabled:!0,sx:{fontSize:14},children:"\uBAA9\uB85D\uC5D0 \uC9C0\uC815\uB41C \uC0AC\uB78C\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):d.map(t=>{let n=b.includes(t.name);return m0(Sf,{onClick:()=>o(t),sx:{fontSize:14,minWidth:170,gap:1},children:[fa(N8,{size:"small",checked:n,sx:{p:0}}),fa(qr,{names:[t.name],size:20,avatarSrcByName:l}),t.name]},`${t.accountSeq}-${t.name}`)}),fa(L8,{}),fa(Sf,{disabled:b.length===0,onClick:s,sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}import{useState as j8}from"react";import{ButtonBase as F8,Menu as q8,MenuItem as $8}from"@mui/material";import H8 from"@mui/icons-material/KeyboardArrowDown";import W8 from"@mui/icons-material/Check";import{Fragment as U8,jsx as Tf,jsxs as Cf}from"react/jsx-runtime";function SU({value:e,onChange:d,options:b}){let[l,o]=j8(null),s=b??Rc,r=Rc.find(t=>t.value===e)?.label??"";return Cf(U8,{children:[Cf(F8,{onClick:t=>o(t.currentTarget),sx:{display:"flex",alignItems:"center",gap:.5,px:1,py:.5,borderRadius:1,fontSize:13.5,color:"#37352f","&:hover":{bgcolor:"#f2f2f0"}},children:[r,Tf(H8,{sx:{fontSize:17,color:"#9a9a97"}})]}),Tf(q8,{transitionDuration:0,anchorEl:l,open:!!l,onClose:()=>o(null),children:s.map(t=>Cf($8,{selected:t.value===e,onClick:()=>{d(t.value),o(null)},sx:{fontSize:14,minWidth:140,justifyContent:"space-between",gap:1},children:[t.label,t.value===e?Tf(W8,{sx:{fontSize:16,color:"#2f80ed"}}):null]},t.value))})]})}import{Box as oc,ButtonBase as V8}from"@mui/material";import{DateTextField as g0}from"@ehfuse/mui-form-controls";import{jsx as da,jsxs as b0}from"react/jsx-runtime";var K8=[{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 y0({fromDate:e,toDate:d,onChange:b}){let l=s=>{if(s<=0){b("","");return}b(Ao(Xl(s)),Ao(new Date))},o=s=>s<=0?!e&&!d:!e||!d?!1:e===Ao(Xl(s))&&d===Ao(new Date);return b0(oc,{sx:{display:"flex",alignItems:"center",gap:1.5,flexWrap:"wrap"},children:[da(oc,{sx:{display:"flex",alignItems:"center",gap:1.5},children:K8.map(s=>{let r=o(s.months);return da(V8,{onClick:()=>l(s.months),sx:{px:1.25,py:.85,borderRadius:1,fontSize:13,fontWeight:r?500:400,border:"1px solid",borderColor:r?"#2f80ed":"#dedddb",color:r?"#2f80ed":"#37352f",bgcolor:r?"#eef6ff":"transparent","&:hover":{bgcolor:r?"#eef6ff":"#f7f7f5"}},children:s.label},s.label)})}),b0(oc,{sx:{display:"flex",alignItems:"center",gap:.5},children:[da(g0,{value:e,size:"small",placeholder:"\uC2DC\uC791\uC77C",onChange:s=>b(s.target.value,d),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}}),da(oc,{component:"span",sx:{fontSize:13,color:"#9a9a97"},children:"~"}),da(g0,{value:d,size:"small",placeholder:"\uC885\uB8CC\uC77C",onChange:s=>b(e,s.target.value),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}})]})]})}import{Popover as G8}from"@mui/material";import{jsx as x0}from"react/jsx-runtime";function DU({anchorEl:e,fromDate:d,toDate:b,onChange:l,onClose:o}){return x0(G8,{transitionDuration:0,anchorEl:e,open:!!e,onClose:o,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},slotProps:{paper:{sx:{p:1.5}}},children:x0(y0,{fromDate:d,toDate:b,onChange:l})})}import{Box as Y8,ButtonBase as X8,Tab as Z8,Tabs as J8}from"@mui/material";import Q8 from"@mui/icons-material/Checklist";import eS from"@mui/icons-material/Face";import tS from"@mui/icons-material/Publish";import rS from"@mui/icons-material/NotificationsOutlined";import nS from"@mui/icons-material/BugReportOutlined";import oS from"@mui/icons-material/SupportAgentOutlined";import iS from"@mui/icons-material/DescriptionOutlined";import sS from"@mui/icons-material/Inventory2Outlined";import{jsx as Tn}from"react/jsx-runtime";function v0(e,d){return d>0?`${e} (${d})`:e}var GU=[{id:"my",label:"\uC804\uCCB4",icon:Tn(Q8,{sx:{fontSize:18}})},{id:"mine",label:"\uB0B4 \uC5C5\uBB34",icon:Tn(eS,{sx:{fontSize:18}})},{id:"sent",label:"\uBCF4\uB0B8 \uC5C5\uBB34",icon:Tn(tS,{sx:{fontSize:18}})},{id:"support",label:"\uACE0\uAC1D\uC13C\uD130",icon:Tn(oS,{sx:{fontSize:18}})},{id:"bug",label:"\uC624\uB958",icon:Tn(nS,{sx:{fontSize:18}})},{id:"notice",label:"\uACF5\uC9C0\uC0AC\uD56D",icon:Tn(rS,{sx:{fontSize:18}})},{id:"archive",label:"\uBCF4\uAD00\uD568",icon:Tn(sS,{sx:{fontSize:18}}),hideCount:!0},{id:"report",label:"\uBCF4\uACE0\uC11C",icon:Tn(iS,{sx:{fontSize:18}}),hideCount:!0}];function aS(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 YU({items:e,activeTab:d,counts:b,onChange:l,compact:o=!1}){let s=at(),r=aS(s.tabs),t=e;return o?Tn(Y8,{sx:{display:"flex",flexWrap:"wrap",gap:1.25},children:t.map(n=>{let c=d===n.id;return Tn(X8,{onClick:()=>l(n.id),sx:{px:1.5,py:.75,borderRadius:1,fontSize:Ir(13.5),fontWeight:500,whiteSpace:"nowrap",border:"1px solid",bgcolor:c?s.tabs.selectedBg:s.tabs.bg,color:c?s.tabs.selectedColor:s.tabs.color,borderColor:c?s.tabs.selectedBg:s.tabs.borderColor},children:v0(n.label,n.hideCount?0:b[n.id]??0)},n.id)})}):Tn(J8,{value:d,onChange:(n,c)=>l(c),sx:{minHeight:46,"& .MuiTabs-indicator":{display:"none"},"& .MuiTabs-flexContainer":{gap:"12px",minHeight:46}},children:t.map(n=>Tn(Z8,{value:n.id,label:v0(n.label,n.hideCount?0:b[n.id]??0),icon:n.icon,iconPosition:"start",sx:r},n.id))})}import{useEffect as lS,useMemo as cS,useState as Bf}from"react";import{Divider as ic,ListItemIcon as Yr,Menu as If,MenuItem as Br}from"@mui/material";import uS from"@mui/icons-material/OpenInNewOutlined";import fS from"@mui/icons-material/RestoreFromTrashOutlined";import dS from"@mui/icons-material/Check";import hS from"@mui/icons-material/CheckCircleOutlined";import pS from"@mui/icons-material/RadioButtonUnchecked";import mS from"@mui/icons-material/SendOutlined";import gS from"@mui/icons-material/EventOutlined";import bS from"@mui/icons-material/PersonOutlineOutlined";import yS from"@mui/icons-material/ViewKanbanOutlined";import xS from"@mui/icons-material/ContentCopyOutlined";import vS from"@mui/icons-material/NextPlanOutlined";import wS from"@mui/icons-material/ContentPasteOutlined";import _S from"@mui/icons-material/ShareOutlined";import kS from"@mui/icons-material/DirectionsRunOutlined";import w0 from"@mui/icons-material/ChevronRight";import SS from"@mui/icons-material/ArchiveOutlined";import TS from"@mui/icons-material/UnarchiveOutlined";import{ConfirmDialog as _0}from"@ehfuse/alerts";import{Fragment as k0,jsx as ct,jsxs as br}from"react/jsx-runtime";function BV({target:e,onClose:d,customTabs:b,sprints:l=[],myAccountSeq:o=0,onOpenDetail:s,onToggleCompleted:r,onRequestConfirm:t,onChangeDueDate:n,onChangeReminder:c,onMemberEdit:i,onMoveProject:a,onDuplicate:h,onCreateFollowUp:f,onShare:u,onAssignSprint:g,onArchiveToggle:m,onDelete:v,onRestore:k,onPurge:B}){let R=Lt(),L=qn(),[A,P]=Bf(null),[N,q]=Bf(null),[j,S]=Bf(null);lS(()=>{e||(P(null),q(null),S(null))},[e]);let T=e?.task??null,D=!!T?.is_notice,p=!!T?.is_event,y=T?!mo(T,o):!1,x=!!T?.deleted,w=cS(()=>new Set(b.filter(z=>z.useSprints).map(z=>z.key)),[b]),_=async(z="one")=>{let $=T;if(d(),!$)return;await _0({title:"\uC5C5\uBB34 \uC0AD\uC81C",message:z==="series"?`"${$.title}" \uC758 \uC774 \uD68C\uCC28\uC640 \uC774\uD6C4 \uBC18\uBCF5 \uD68C\uCC28\uB97C \uBAA8\uB450 \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`:`"${$.title}" \uC5C5\uBB34\uB97C \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&v($.seq,z)},C=async()=>{let z=T;if(d(),!z)return;await _0({title:"\uC601\uAD6C \uC0AD\uC81C",message:`"${z.title}" \uC5C5\uBB34\uB97C \uC601\uAD6C\uD788 \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C? \uB418\uB3CC\uB9B4 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.`})&&B?.(z.seq)},O=()=>{T&&m(T.seq,!T.archived),d()};return br(k0,{children:[br(If,{open:!!e,onClose:d,transitionDuration:0,anchorReference:R?"none":"anchorPosition",anchorPosition:!R&&e?{top:e.position.top,left:e.position.left}:void 0,slotProps:{paper:{sx:{minWidth:190,...R?{position:"fixed",top:"50%",left:"50%",translate:"-50% -50%",maxHeight:"70vh"}:{}}},list:R?{sx:{"& .MuiMenuItem-root":{py:1,minHeight:0}}}:void 0},children:[br(Br,{onClick:()=>{T&&s(T),d()},sx:{fontSize:14},children:[ct(Yr,{children:ct(uS,{sx:{fontSize:19}})}),"\uC0C1\uC138 \uC5F4\uAE30"]}),x?ct(ic,{}):null,x&&k?br(Br,{onClick:()=>{T&&k(T.seq),d()},sx:{fontSize:14},children:[ct(Yr,{children:ct(fS,{sx:{fontSize:19}})}),"\uBCF5\uC6D0"]}):null,x&&B?br(Br,{onClick:()=>{C()},sx:{fontSize:14,color:"#e5484d"},children:[ct(Yr,{children:ct(dr,{sx:{fontSize:19,color:"#e5484d"}})}),"\uC601\uAD6C \uC0AD\uC81C"]}):null,x?null:br(k0,{children:[br(Br,{disabled:D?(T?.author_account_seq??0)!==o:(T?.author_account_seq??0)!==o&&(T?.manager_account_seq??0)!==o,onClick:()=>{T&&r(T.seq,!T.completed),d()},sx:{fontSize:14},children:[ct(Yr,{children:T?.completed?ct(pS,{sx:{fontSize:19}}):ct(hS,{sx:{fontSize:19}})}),T?.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC"]}),!D&&t?br(Br,{disabled:!(T?.manager_account_seq??0)&&(T?.receiver_account_seqs??[]).length===0,onClick:()=>{T&&t(T),d()},sx:{fontSize:14},children:[ct(Yr,{children:ct(mS,{sx:{fontSize:19}})}),"\uD655\uC778 \uC694\uCCAD"]}):null,p?null:ct(ic,{}),p?null:br(Br,{disabled:y,onClick:z=>{T&&P({anchorEl:z.currentTarget,task:T})},sx:{fontSize:14},children:[ct(Yr,{children:ct(gS,{sx:{fontSize:19}})}),"\uB9C8\uAC10\uC608\uC815 \uBCC0\uACBD"]}),!D&&!p&&i?br(Br,{onClick:()=>{T&&i(T,"manager"),d()},sx:{fontSize:14},children:[ct(Yr,{children:ct(bS,{sx:{fontSize:19}})}),"\uCC45\uC784\uC790 \uBCC0\uACBD"]}):null,p?null:br(Br,{disabled:y,onClick:z=>{T&&q({anchorEl:z.currentTarget,task:T})},sx:{fontSize:14},children:[ct(Yr,{children:ct(yS,{sx:{fontSize:19}})}),"\uD504\uB85C\uC81D\uD2B8 \uC774\uB3D9",ct(w0,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}),ct(ic,{}),h?br(Br,{disabled:y,onClick:()=>{T&&h(T.seq),d()},sx:{fontSize:14},children:[ct(Yr,{children:ct(xS,{sx:{fontSize:19}})}),"\uBCF5\uC81C"]}):null,f&&T&&!T.is_event&&!T.is_notice?br(Br,{onClick:()=>{T&&f(T.seq),d()},sx:{fontSize:14},children:[ct(Yr,{children:ct(vS,{sx:{fontSize:19}})}),"\uD6C4\uC18D \uC5C5\uBB34 \uB9CC\uB4E4\uAE30"]}):null,br(Br,{onClick:()=>{T&&(u?u(T):ts(T,R)),d()},sx:{fontSize:14},children:[ct(Yr,{children:R?ct(_S,{sx:{fontSize:19}}):ct(wS,{sx:{fontSize:19}})}),R?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC"]}),T&&!T.is_notice&&!T.is_event&&w.has(String(T.tab_key??""))&&g?br(Br,{onClick:z=>S(z.currentTarget),sx:{fontSize:14},children:[ct(Yr,{children:ct(kS,{sx:{fontSize:19}})}),"\uBAA9\uD45C\uC5D0 \uB123\uAE30",ct(w0,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}):null,br(Br,{onClick:O,disabled:y||!T?.archived&&!(T&&za(T)),sx:{fontSize:14},children:[ct(Yr,{children:T?.archived?ct(TS,{sx:{fontSize:19}}):ct(SS,{sx:{fontSize:19}})}),T?.archived?"\uBCF4\uAD00 \uD574\uC81C":"\uBCF4\uAD00"]}),ct(ic,{}),br(Br,{disabled:y,onClick:()=>{_("one")},sx:{fontSize:14,color:"#e5484d"},children:[ct(Yr,{children:ct(dr,{sx:{fontSize:19,color:"#e5484d"}})}),(T?.repeat_group_key??0)>0?"\uC0AD\uC81C (\uC774 \uD68C\uCC28\uB9CC)":"\uC0AD\uC81C"]}),(T?.repeat_group_key??0)>0?br(Br,{disabled:y,onClick:()=>{_("series")},sx:{fontSize:14,color:"#e5484d"},children:[ct(Yr,{children:ct(dr,{sx:{fontSize:19,color:"#e5484d"}})}),"\uC0AD\uC81C (\uC774\uD6C4 \uBC18\uBCF5 \uC804\uCCB4)"]}):null]})]}),ct(xn,{anchorEl:A?.anchorEl??null,open:!!A,date:A?.task.due_date??"",reminders:Wn(A?.task),hideReminder:!!A?.task.completed,centered:R,onClose:()=>{P(null),d()},onDateChange:z=>{A&&n(A.task.seq,z)},onReminderChange:z=>{A&&c?.(A.task.seq,z)}}),br(If,{transitionDuration:0,anchorEl:N?.anchorEl??null,open:!!N,onClose:()=>{q(null),d()},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},...L,children:[ct(Br,{selected:!N?.task.tab_key,onClick:()=>{N&&a(N.task.seq,""),q(null),d()},sx:{fontSize:14,minWidth:170},children:"\uC5C6\uC74C"}),b.filter(z=>!z.archived).map(z=>ct(Br,{selected:N?.task.tab_key===z.key,onClick:()=>{N&&a(N.task.seq,z.key),q(null),d()},sx:{fontSize:14,minWidth:170},children:z.label},z.key))]}),ct(If,{transitionDuration:0,anchorEl:j,open:!!j,onClose:()=>S(null),anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...l.filter(z=>`custom-${z.group_seq}`===String(T?.tab_key??"")).map(z=>({seq:z.seq,label:vn(z)}))].map(z=>br(Br,{onClick:()=>{T&&g?.(T.seq,z.seq),S(null),d()},sx:{fontSize:14,minWidth:160,gap:1},children:[z.label,(T?.sprint_seq??0)===z.seq?ct(dS,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},z.seq))})]})}import{Checkbox as CS,Divider as BS,Menu as IS,MenuItem as S0}from"@mui/material";import{jsx as sc,jsxs as T0}from"react/jsx-runtime";function OV({anchorEl:e,labelOptions:d,selectedKeys:b,onToggle:l,onClear:o,onClose:s}){return T0(IS,{transitionDuration:0,anchorEl:e,open:!!e,onClose:s,children:[d.map(r=>{let t=b.includes(r.key);return T0(S0,{onClick:()=>l(r.key),sx:{fontSize:14,minWidth:190,gap:1},children:[sc(CS,{size:"small",checked:t,sx:{p:0}}),sc(At,{option:r})]},r.key)}),sc(BS,{}),sc(S0,{disabled:b.length===0,onClick:()=>{o(),s()},sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}import{Divider as ES,Menu as MS,MenuItem as C0}from"@mui/material";import RS from"@mui/icons-material/Check";import OS from"@mui/icons-material/SettingsOutlined";import{jsx as Ef,jsxs as Mf}from"react/jsx-runtime";function jV(e){let{anchorEl:d,sprints:b,value:l,onSelect:o,onManage:s,onClose:r}=e;return Mf(MS,{transitionDuration:0,anchorEl:d,open:!!d,onClose:r,children:[[{seq:0,label:"\uC804\uCCB4"},{seq:-1,label:"\uBBF8\uBC30\uC815 \uC5C5\uBB34"},...b.map(t=>({seq:t.seq,label:vn(t)}))].map(t=>Mf(C0,{onClick:()=>{o(t.seq),r()},sx:{fontSize:14,minWidth:180,gap:1},children:[t.label,l===t.seq?Ef(RS,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},t.seq)),Ef(ES,{}),Mf(C0,{onClick:()=>{r(),s()},sx:{fontSize:14,gap:1},children:[Ef(OS,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uAD00\uB9AC\u2026"]})]})}var AS={my:"tasks",mine:"tasks",sent:"tasks",notice:"notice",support:"support",bug:"bug",archive:"archive",done:"done",report:"report"};function DS(e){return AS[e]??"tasks"}var I0={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"},B0=["list","calendar","month","card","kanban","sprint","timeline"],PS=["list","kanban"],NS=["list","card"];function $V(e){let d=DS(e);switch(d){case"notice":return{kind:d,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:d,viewOptions:B0,showCreate:!0,createLabel:"\uC624\uB958 \uB4F1\uB85D",showGroupBy:!0,showSprintFilter:!0,showDateRange:!1,showHideCompleted:!0,forceFlatList:!1,columns:{bug:!0}};case"support":return{kind:d,viewOptions:PS,showCreate:!1,createLabel:"",showGroupBy:!0,showSprintFilter:!1,showDateRange:!1,showHideCompleted:!0,forceFlatList:!1,columns:{support:!0,showProject:!1}};case"archive":return{kind:d,viewOptions:NS,showCreate:!1,createLabel:"",showGroupBy:!1,showSprintFilter:!1,showDateRange:!0,showHideCompleted:!1,forceFlatList:!0,columns:{showActions:!1}};case"done":return{kind:d,viewOptions:["list"],showCreate:!1,createLabel:"",showGroupBy:!1,showSprintFilter:!1,showDateRange:!0,showHideCompleted:!1,forceFlatList:!0,columns:{showActions:!1}};case"report":return{kind:d,viewOptions:[],showCreate:!1,createLabel:"",showGroupBy:!1,showSprintFilter:!1,showDateRange:!0,showHideCompleted:!1,forceFlatList:!0,columns:{}};default:return{kind:d,viewOptions:B0,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"}:{}}}}import{useMemo as LS}from"react";import{useKeyboardState as zS}from"@ehfuse/keyboard-state";var E0=[{key:"g l",view:"list"},{key:"g b",view:"card"},{key:"g k",view:"kanban"},{key:"g s",view:"sprint"},{key:"g c",view:"calendar"},{key:"g m",view:"month"},{key:"g t",view:"timeline"}];function KV(e,d={}){let{enabled:b=!0,views:l}=d,{onCreateTask:o,onFocusSearch:s,onToggleHelp:r,onChangeView:t,onRefresh:n,onEscape:c}=e,i=l?l.join(","):"",a=LS(()=>{let h=[];if(o&&h.push({key:"n",callback:o,options:{preventDefault:!0}}),s&&h.push({key:"/",callback:s,options:{preventDefault:!0}}),n&&h.push({key:"r",callback:n,options:{preventDefault:!0}}),r&&h.push({key:"shift+?",callback:r,options:{preventDefault:!0}}),c&&h.push({key:"escape",callback:c,options:{allowInEditable:!0}}),t)for(let f of M0(i?i.split(","):void 0))h.push({key:f.key,callback:()=>t(f.view),options:{preventDefault:!0}});return h},[o,s,r,t,n,c,i]);zS(b?a:[])}function M0(e){if(!e)return E0;let d=new Set(e);return E0.filter(b=>d.has(b.view))}function ha(e){return[{keys:"N",description:"\uC0C8 \uC5C5\uBB34 \uB4F1\uB85D"},{keys:"/",description:"\uAC80\uC0C9"},{keys:"R",description:"\uBAA9\uB85D \uC0C8\uB85C\uACE0\uCE68"},...M0(e).map(d=>({keys:d.key.split(" ").map(b=>b.toUpperCase()).join(" \u2192 "),description:`${I0[d.view]} \uBCF4\uAE30`})),{keys:"?",description:"\uB2E8\uCD95\uD0A4 \uB3C4\uC6C0\uB9D0"},{keys:"Esc",description:"\uB2EB\uAE30"}]}var GV=ha();import{Box as pa,Button as jS}from"@mui/material";import FS from"@mui/icons-material/ArrowRightAlt";import{FormDialog as qS}from"@ehfuse/mui-form-dialog";import{jsx as oi,jsxs as R0}from"react/jsx-runtime";function $S({keys:e}){return oi(pa,{sx:{display:"flex",alignItems:"center",gap:.5,justifyContent:"flex-end"},children:e.split(" \u2192 ").map((d,b)=>R0(pa,{sx:{display:"flex",alignItems:"center",gap:.5},children:[b>0?oi(FS,{sx:{fontSize:18,color:"#9a9a97"}}):null,oi(pa,{component:"span",sx:{minWidth:32,height:32,px:.75,display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:13.5,fontWeight:700,color:"#37352f",bgcolor:"#f4f4f2",border:"1px solid #e0dfdb",borderRadius:1,fontVariantNumeric:"tabular-nums"},children:d})]},`${d}-${b}`))})}function eK({open:e,onClose:d,views:b}){let l=ha(b);return oi(qS,{open:e,onClose:d,maxWidth:"xs",title:"\uB2E8\uCD95\uD0A4",locale:"ko",titleIcons:{delete:{visible:!1}},tabs:{visible:!1},sectionContentPaddingTop:0,sections:[{id:"shortcuts",showTitle:!1,children:oi(pa,{sx:{display:"grid",gridTemplateColumns:"auto 1fr",columnGap:2,rowGap:1.25,alignItems:"center",fontSize:14,color:"#37352f"},children:l.map(o=>R0(pa,{sx:{display:"contents"},children:[oi($S,{keys:o.keys}),oi("span",{children:o.description})]},o.keys))})}],actions:{showCancelButton:!1,right:oi(jS,{variant:"contained",onClick:d,children:"\uB2EB\uAE30"})}})}import{Fragment as HS}from"react";import{Box as lo,Button as WS}from"@mui/material";import US from"@mui/icons-material/ArrowRightAlt";import{FormDialog as VS}from"@ehfuse/mui-form-dialog";import{jsx as an,jsxs as Rf}from"react/jsx-runtime";var KS=[{id:"basics",tabTitle:"\uAE30\uBCF8",topics:[{title:"\uD0ED \uAD6C\uC131",lines:["**\uC804\uCCB4** \u2014 \uB0B4\uAC00 \uBCFC \uC218 \uC788\uB294 \uBAA8\uB4E0 \uC5C5\uBB34. \uB0B4 \uC5C5\uBB34\xB7\uCC45\uC784\uC790\uBCC4\xB7\uC77C\uC815 \uADF8\uB8F9\uC73C\uB85C \uB098\uB258\uC5B4 \uBCF4\uC785\uB2C8\uB2E4.","**\uB0B4 \uC5C5\uBB34** \u2014 \uB0B4\uAC00 \uCC45\uC784\uC790\uC774\uAC70\uB098 \uCC38\uC870\uC790\uB85C \uC9C0\uC815\uB41C \uC5C5\uBB34\uB9CC \uBAA8\uC74D\uB2C8\uB2E4.","**\uBCF4\uB0B8 \uC5C5\uBB34** \u2014 \uB0B4\uAC00 \uB4F1\uB85D\uD574 \uB2E4\uB978 \uC0AC\uB78C\uC5D0\uAC8C \uB9E1\uAE34 \uC5C5\uBB34\uC785\uB2C8\uB2E4.","**\uACF5\uC9C0\uC0AC\uD56D** \u2014 \uC804 \uC9C1\uC6D0 \uB610\uB294 \uC9C0\uC815 \uB300\uC0C1\uC790\uC5D0\uAC8C \uC54C\uB9AC\uB294 \uAE00. \uB300\uC0C1\uC790\uB294 \uD655\uC778 \uBC84\uD2BC\uC73C\uB85C \uC77D\uC74C\uC744 \uB0A8\uAE41\uB2C8\uB2E4.",'**\uBCF4\uAD00\uD568** \u2014 \uC644\uB8CC \uD6C4 \uBCF4\uAD00\uB41C \uC5C5\uBB34\xB7\uC77C\uC815, \uACE0\uAC1D\uC13C\uD130 \uAE00, \uD734\uC9C0\uD1B5\uC744 "\uC5C5\uBB34 \xB7 \uC77C\uC815 \u25BE" \uBA54\uB274\uB85C \uBC14\uAFD4 \uBD05\uB2C8\uB2E4.']},{title:"\uC624\uB958 \uD0ED",feature:"bug",lines:["\uD504\uB85C\uADF8\uB7A8 \uC624\uB958 \uC811\uC218 \uC804\uC6A9 \uD0ED\uC785\uB2C8\uB2E4. \uD2F0\uCF13\uBC88\uD638\uAC00 \uBD99\uACE0 \uC811\uC218 \u2192 \uCC98\uB9AC \u2192 \uC885\uB8CC\uC758 \uC0DD\uC560\uC8FC\uAE30\uB85C \uAD00\uB9AC\uD569\uB2C8\uB2E4.",'\uC624\uB958 \uD0ED\uC740 \uAC1C\uBC1C\uC0AC(\uCF54\uB4DC\uC0F5) \uC804\uC6A9\uC774\uBA70, \uAC00\uB9F9\uC810\uC5D0\uC11C \uC811\uC218\uD55C \uC624\uB958 \uC81C\uBCF4\uB294 \uACE0\uAC1D\uC13C\uD130 \uD0ED\uC5D0 "\uC624\uB958" \uC885\uB958\uB85C \uC313\uC785\uB2C8\uB2E4.']},{title:"\uACE0\uAC1D\uC13C\uD130 \uD0ED",feature:"support",lines:["\uAC00\uB9F9\uC810\uC774 \uB0A8\uAE34 \uBB38\uC758\xB7\uAC74\uC758\uC0AC\uD56D\xB7\uC624\uB958 \uC81C\uBCF4\uC640 \uD648\uD398\uC774\uC9C0 \uC0C1\uB2F4\uC2E0\uCCAD\uC774 \uC5C5\uBB34\uB85C \uC313\uC785\uB2C8\uB2E4.","**\uAC00\uC838\uAC00\uAE30**\uB85C \uCC45\uC784\uC790\uAC00 \uB418\uACE0, \uB313\uAE00\uB85C \uB2F5\uBCC0\uD558\uBA74 \uC791\uC131\uC790(\uAC00\uB9F9\uC810)\uC5D0\uAC8C \uC54C\uB9BC\uC774 \uAC11\uB2C8\uB2E4. \uC791\uC131\uC790\uC5D0\uAC8C\uB294 \uB2F5\uBCC0 \uC54C\uB9BC\uB9CC \uAC00\uACE0 \uC218\uC815\xB7\uBC30\uC815 \uC54C\uB9BC\uC740 \uAC00\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.","\uC791\uC131\uC790\xB7\uB2F5\uBCC0\uC790 \uC5F4 \uC81C\uBAA9\uC744 \uB204\uB974\uBA74 \uC774\uB984\uC73C\uB85C \uAC70\uB97C \uC218 \uC788\uACE0, \uC791\uC131\uC790 \uC774\uB984\uC5D0 \uB9C8\uC6B0\uC2A4\uB97C \uC62C\uB9AC\uBA74 \uAC00\uB9F9\uC810\uBA85\uC774 \uBCF4\uC785\uB2C8\uB2E4."]},{title:"\uD5E4\uB354 \uC2A4\uC704\uCE58",lines:["**\uC644\uB8CC \uC228\uAE30\uAE30** \u2014 \uB05D\uB09C \uC5C5\uBB34\uB97C \uBAA9\uB85D\xB7\uBCF4\uB4DC\xB7\uCE98\uB9B0\uB354\xB7\uD0C0\uC784\uB77C\uC778(\uD560\uC77C \uD3EC\uD568)\uC5D0\uC11C \uAC10\uCDA5\uB2C8\uB2E4.","**\uC678\uBD80 \uCE98\uB9B0\uB354 \uC77C\uC815** \u2014 \uAD6C\uAE00 \uB4F1\uC5D0\uC11C \uAC00\uC838\uC628 \uC77C\uC815\uC744 \uCE98\uB9B0\uB354 \uBCF4\uAE30\uC5D0 \uD568\uAED8 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4(\u22EE \u203A \uCE98\uB9B0\uB354 \uC5F0\uB3D9\uC5D0\uC11C \uC124\uC815).","**\uBAA8\uB4E0 \uC9C1\uC6D0** \u2014 (\uD5C8\uC6A9 \uACC4\uC815) \uAD00\uC5EC \uC5EC\uBD80\uC640 \uC0C1\uAD00\uC5C6\uC774 \uC804 \uC9C1\uC6D0\uC758 \uC5C5\uBB34\uB97C \uBD05\uB2C8\uB2E4.","\uD654\uBA74\uC774 \uC881\uC73C\uBA74 \uC2A4\uC704\uCE58\uB4E4\uC740 \uC624\uB978\uCABD **\u22EE \uBA54\uB274** \uC548\uC73C\uB85C \uB4E4\uC5B4\uAC11\uB2C8\uB2E4."]},{title:"\uC0AD\uC81C\xB7\uBCF4\uAD00 \uADDC\uCE59",lines:["**\uC644\uB8CC \u2192 \uBCF4\uAD00** \u2014 \uC644\uB8CC(\uACF5\uC9C0\uB294 \uAC8C\uC2DC\uC885\uB8CC)\uD55C \uC5C5\uBB34\uB294 \uC5C5\uBB34\uD568 \uC124\uC815\uC758 \uAE30\uAC04(\uAE30\uBCF8 7\uC77C)\uC774 \uC9C0\uB098\uBA74 \uB9E4\uC77C \uC0C8\uBCBD \uC790\uB3D9\uC73C\uB85C \uBCF4\uAD00\uD568\uC73C\uB85C \uC62E\uACA8\uC9D1\uB2C8\uB2E4. \uC6B0\uD074\uB9AD \u203A **\uBCF4\uAD00**\uC73C\uB85C \uBC14\uB85C \uBCF4\uB0BC \uC218\uB3C4 \uC788\uACE0, \uBCF4\uAD00\uD568\uC5D0\uC11C **\uBCF4\uAD00 \uD574\uC81C**\uB85C \uB418\uB3CC\uB9BD\uB2C8\uB2E4.","**\uC0AD\uC81C \u2192 \uD734\uC9C0\uD1B5** \u2014 \uC0AD\uC81C\uB294 \uC791\uC131\uC790\uB9CC \uD560 \uC218 \uC788\uACE0(\uC0C1\uC138\uC758 \uD734\uC9C0\uD1B5 \uC544\uC774\uCF58), \uC9C0\uC6B4 \uC5C5\uBB34\uB294 \uD734\uC9C0\uD1B5\uC5D0 \uB4E4\uC5B4\uAC00 **\uB418\uC0B4\uB9AC\uAE30**\uB85C \uBCF5\uAD6C\uB429\uB2C8\uB2E4. \uD734\uC9C0\uD1B5\uC740 \uC124\uC815 \uAE30\uAC04(\uAE30\uBCF8 90\uC77C) \uB4A4 \uC601\uAD6C \uC0AD\uC81C\uB429\uB2C8\uB2E4.",'\uBC18\uBCF5 \uC5C5\uBB34\uB97C \uC644\uB8CC\xB7\uC0AD\uC81C\uD560 \uB54C\uB294 "\uC774 \uD68C\uCC28\uB9CC / \uC774\uD6C4 \uC804\uCCB4"\uB97C \uACE0\uB985\uB2C8\uB2E4.',"**\uD504\uB85C\uC81D\uD2B8** \u2014 \uBCF4\uAD00\uC740 \uC18C\uC18D \uC5C5\uBB34\uAC00 \uBAA8\uB450 \uC644\uB8CC\uB41C \uB4A4\uC5D0\uB9CC \uB429\uB2C8\uB2E4(\uBBF8\uC644\uB8CC\uAC00 \uB0A8\uC544 \uC788\uC73C\uBA74 \uC548\uB0B4). \uC0AD\uC81C\uD558\uBA74 \uD504\uB85C\uC81D\uD2B8\uB9CC \uC5C6\uC5B4\uC9C0\uACE0 \uC18C\uC18D \uC5C5\uBB34\uB294 \uAE30\uBCF8 \uC5C5\uBB34\uD568\uC73C\uB85C \uC62E\uACA8\uC9D1\uB2C8\uB2E4.",'\uACE0\uAC1D\uC13C\uD130 \uAE00\uB3C4 \uAC19\uC740 \uADDC\uCE59\uC73C\uB85C \uC644\uB8CC 7\uC77C \uB4A4 \uBCF4\uAD00\uB418\uBA70, \uBCF4\uAD00\uD568\uC758 "\uACE0\uAC1D\uC13C\uD130" \uAD6C\uBD84\uC5D0\uC11C \uBD05\uB2C8\uB2E4.']}]},{id:"roles",tabTitle:"\uC5ED\uD560\xB7\uC54C\uB9BC",topics:[{title:"\uC791\uC131\uC790 \xB7 \uCC45\uC784\uC790 \xB7 \uCC38\uC870\uC790",lines:["**\uC791\uC131\uC790** \u2014 \uC5C5\uBB34\uB97C \uB4F1\uB85D\uD55C \uC0AC\uB78C. \uC5C5\uBB34\uC758 \uC8FC\uC778\uC73C\uB85C \uB0B4\uC6A9\uC744 \uACE0\uCE58\uACE0, \uC644\uB8CC \uCCB4\uD06C\xB7\uC0AD\uC81C(\uD734\uC9C0\uD1B5)\uB97C \uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.","**\uCC45\uC784\uC790** \u2014 \uC2E4\uC81C\uB85C \uCC98\uB9AC\uD558\uB294 \uC0AC\uB78C(1\uBA85). \uD655\uC778\xB7\uC644\uB8CC \uCCB4\uD06C\uB97C \uD558\uACE0, \uD560\uC77C\uC744 \uC5C5\uBB34\uB85C \uC2B9\uACA9\uD574 \uC5C5\uBB34\uB97C \uB098\uB20C \uC218 \uC788\uC2B5\uB2C8\uB2E4.","**\uCC38\uC870\uC790** \u2014 \uD568\uAED8 \uC54C\uACE0 \uC788\uC5B4\uC57C \uD560 \uC0AC\uB78C\uB4E4(\uC5EC\uB7EC \uBA85). \uC77D\uACE0 \uB313\uAE00\uC744 \uB2EC\uBA70 \uD655\uC778 \uBC84\uD2BC\uC73C\uB85C \uC77D\uC74C\uC744 \uB0A8\uAE41\uB2C8\uB2E4.",'\uC138 \uC5ED\uD560\uC740 \uBAA8\uB450 \uAD00\uC5EC\uC790\uC785\uB2C8\uB2E4. \uACF5\uAC1C \uBC94\uC704\uAC00 "\uAD00\uC5EC\uC790\uB9CC"\uC774\uC5B4\uB3C4 \uC11C\uB85C \uBCF4\uC774\uACE0, \uC0C1\uC138 \uC18D\uC131\uC5D0\uC11C \uBC14\uB85C \uBC14\uAFC0 \uC218 \uC788\uC2B5\uB2C8\uB2E4.']},{title:"\uB204\uAC00 \uC5B8\uC81C \uC54C\uB9BC\uC744 \uBC1B\uB098",lines:['**\uCC45\uC784\uC790** \u2014 \uC9C0\uC815\uB420 \uB54C(\uBC30\uC815), \uB0B4\uC6A9\uC774 \uACE0\uCCD0\uC9C8 \uB54C, \uC791\uC131\uC790\uAC00 \uB313\uAE00\uC744 \uB2EC \uB54C, \uB9C8\uAC10 \uC0AC\uC804\uC54C\uB9BC\xB7\uB2F9\uC77C\xB7\uC9C0\uC5F0. \uC2DC\uC791\uC77C\uC2DC\uAC00 \uBBF8\uB798\uBA74 \uC2DC\uC791 \uC804\uC5D0\uB294 \uBCA8\uB9CC \uC624\uACE0, \uC2DC\uC791\uC77C\uC2DC\uC5D0 "\uC0C8 \uC5C5\uBB34\uAC00 \uBC30\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4" \uD478\uC2DC\uAC00 1\uD68C \uC635\uB2C8\uB2E4.',"**\uC791\uC131\uC790** \u2014 \uCC45\uC784\uC790\uAC00 \uBC14\uB014 \uB54C, \uB204\uAD70\uAC00 \uAC00\uC838\uAC00\uAE30 \uD560 \uB54C, \uCC45\uC784\uC790\uAC00 \uD655\uC778\uD588\uC744 \uB54C, \uC644\uB8CC\uB410\uC744 \uB54C, \uB2E4\uB978 \uC0AC\uB78C\uC774 \uB313\uAE00\uC744 \uB2EC \uB54C, \uB9C8\uAC10 \uC0AC\uC804\uC54C\uB9BC\xB7\uB2F9\uC77C\xB7\uC9C0\uC5F0.","**\uCC38\uC870\uC790** \u2014 \uC0C8\uB85C \uCC38\uC870\uB85C \uC9C0\uC815\uB420 \uB54C, \uC644\uB8CC\uB410\uC744 \uB54C. \uCC45\uC784\uC790\uAC00 \uC544\uC9C1 \uC5C6\uB294 \uC5C5\uBB34\uB77C\uBA74 \uB313\uAE00\uB3C4 \uBC1B\uC2B5\uB2C8\uB2E4. \uB9C8\uAC10 \uC54C\uB9BC\uC740 \uBC1B\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.","**\uB313\uAE00 \uB300\uD654** \u2014 \uB313\uAE00\uC740 \uC791\uC131\uC790\uC640 \uC9C1\uC804 \uB313\uAE00 \uC791\uC131\uC790\uC5D0\uAC8C \uAC00\uBBC0\uB85C, \uB2F5\uAE00\uC744 \uC8FC\uACE0\uBC1B\uB294 \uB450 \uC0AC\uB78C\uC5D0\uAC8C \uC774\uC5B4\uC9D1\uB2C8\uB2E4. \uB313\uAE00 \uBC18\uC751(\uC88B\uC544\uC694\xB7\uD655\uC778)\uC740 \uADF8 \uB313\uAE00 \uC791\uC131\uC790\uC5D0\uAC8C \uAC11\uB2C8\uB2E4.","\uBCF8\uC778\uC774 \uD55C \uD589\uB3D9\uC740 \uBCF8\uC778\uC5D0\uAC8C \uC54C\uB9AC\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uC885\uB958\uBCC4 \uC218\uC2E0 \uC5EC\uBD80\uB294 **\uB0B4 \uC815\uBCF4 \u203A \uC54C\uB9BC \uC124\uC815**\uC5D0\uC11C \uBC14\uAFC9\uB2C8\uB2E4."]},{title:"\uC2DC\uC791\uC77C\uC2DC\uC640 \uB9C8\uAC10\uC608\uC815",lines:["**\uC2DC\uC791\uC77C\uC2DC** \u2014 \uC77C\uC744 \uC2DC\uC791\uD560 \uC2DC\uC810. \uCC45\uC784\uC790 \uD478\uC2DC \uC54C\uB9BC\uC740 \uC774\uB54C\uBD80\uD130 \uAC11\uB2C8\uB2E4(\uBBF8\uB798\uB85C \uC7A1\uC73C\uBA74 \uADF8 \uC804\uAE4C\uC9C0\uB294 \uBCA8\uC5D0\uB9CC \uC313\uC784). \uBE44\uC6CC \uB450\uBA74 \uBC14\uB85C \uC2DC\uC791\uC73C\uB85C \uBD05\uB2C8\uB2E4.","**\uB9C8\uAC10\uC608\uC815** \u2014 \uB05D\uB0B4\uAE30\uB85C \uD55C \uC2DC\uC810. \uC0AC\uC804\uC54C\uB9BC(\uC5C5\uBB34\uD568 \uC124\uC815 \uC2DC\uAC01)\xB7\uB2F9\uC77C\xB7\uC9C0\uC5F0 \uC54C\uB9BC\uC758 \uAE30\uC900\uC774\uACE0, \uCE98\uB9B0\uB354\xB7\uD0C0\uC784\uB77C\uC778\uC5D0 \uB193\uC774\uB294 \uB0A0\uC9DC\uC785\uB2C8\uB2E4. \uC9C0\uB09C \uB9C8\uAC10\uB9CC \uBE68\uAC04\uC0C9\uC73C\uB85C \uD45C\uC2DC\uB429\uB2C8\uB2E4.","\uB9C8\uAC10\uC608\uC815 \uC5C6\uC774 \uC644\uB8CC\uD558\uBA74 \uC644\uB8CC \uC2DC\uAC01\uC774 \uB9C8\uAC10\uC608\uC815\uC73C\uB85C \uCC44\uC6CC\uC9D1\uB2C8\uB2E4. \uC2DC\uC791\uC77C\uC2DC\uB294 \uCC44\uC6B0\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.","\uC77C\uC815(\uC2DC\uAC01 \uC788\uB294 \uD589\uC0AC)\uC740 \uB9C8\uAC10\uC608\uC815 \uB300\uC2E0 **\uC77C\uC2DC**\uAC00 \uAE30\uC900\uC774\uACE0, \uCC38\uC11D\uC790 \uC804\uC6D0\uACFC \uC791\uC131\uC790\uAC00 \uC54C\uB9BC\uC744 \uBC1B\uC2B5\uB2C8\uB2E4."]}]},{id:"tasks",tabTitle:"\uC5C5\uBB34",topics:[{title:"\uC5C5\uBB34 \uB4F1\uB85D",lines:["**\uC0C8\uB85C \uB9CC\uB4E4\uAE30** \uBC84\uD2BC \uB610\uB294 \uB2E8\uCD95\uD0A4 **N**. \uC81C\uBAA9\xB7\uB0B4\uC6A9\xB7\uCC45\uC784\uC790\xB7\uCC38\uC870\uC790\xB7\uC2DC\uC791\uC77C\uC2DC\xB7\uB9C8\uAC10\uC608\uC815\xB7\uC911\uC694\uB3C4\uB97C \uC815\uD569\uB2C8\uB2E4.","**\uACF5\uAC1C \uBC94\uC704** \u2014 \uAD00\uC5EC\uC790\uB9CC / \uBD80\uC11C / \uC804\uCCB4 \uC9C1\uC6D0. \uCC45\uC784\uC790\uAC00 \uC5C6\uB294 \uACF5\uAC1C \uC5C5\uBB34\uB294 \uC5F4\uB78C\uC790\uAC00 **\uAC00\uC838\uAC00\uAE30**\uB85C \uB9E1\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4.",'**\uBC18\uBCF5** \u2014 \uB9E4\uC77C\xB7\uB9E4\uC8FC\xB7\uB9E4\uC6D4 \uB4F1\uC73C\uB85C \uD68C\uCC28\uB97C \uB9CC\uB4E4\uACE0, \uC644\uB8CC\xB7\uC0AD\uC81C \uB54C "\uC774 \uD68C\uCC28\uB9CC / \uC774\uD6C4 \uC804\uCCB4"\uB97C \uACE0\uB985\uB2C8\uB2E4.','**\uC77C\uC815**\uC740 \uC2DC\uAC01\uC774 \uC788\uB294 \uD589\uC0AC\xB7\uAD50\uC721 \uB4F1\uC785\uB2C8\uB2E4. \uC644\uB8CC \uAC1C\uB150\uC774 \uC5C6\uACE0 \uCE98\uB9B0\uB354\uC640 \uC804\uCCB4 \uD0ED "\uC77C\uC815" \uADF8\uB8F9\uC5D0 \uB098\uC635\uB2C8\uB2E4.']},{title:"\uC5C5\uBB34 \uC0C1\uC138",lines:["\uC81C\uBAA9\xB7\uD589\uC744 \uB204\uB974\uBA74 \uC624\uB978\uCABD \uC0C1\uC138 \uD328\uB110(\uBAA8\uBC14\uC77C\uC740 \uC804\uCCB4 \uD654\uBA74)\uC774 \uC5F4\uB9BD\uB2C8\uB2E4. \uC81C\uBAA9\uACFC \uC18D\uC131\uC740 \uBC14\uB85C \uB20C\uB7EC \uACE0\uCE69\uB2C8\uB2E4.","**\uB0B4\uC6A9**\uC740 \uBCF8\uBB38 \uC591\uC2DD(\u22EE \u203A \uBCF8\uBB38 \uC591\uC2DD)\uC73C\uB85C \uC800\uC7A5\uD574 \uB450\uACE0 \uBD88\uB7EC\uC62C \uC218 \uC788\uC2B5\uB2C8\uB2E4.",'**\uC5C5\uBB34 \uB300\uD654\uB294 \uB313\uAE00\uB85C** \uD569\uB2C8\uB2E4. \uB313\uAE00\uC5D0\uB294 \uD30C\uC77C\xB7\uC774\uBBF8\uC9C0\uB97C \uBD99\uC774\uACE0, \uB313\uAE00\uC5D0 **\uD655\uC778(\u2713)\xB7\uC88B\uC544\uC694** \uBC18\uC751\uC744 \uB0A8\uACA8 "\uC77D\uC5C8\uB2E4/\uB3D9\uC758\uD55C\uB2E4"\uB97C \uD45C\uC2DC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4(\uBC18\uC751\uC740 \uB313\uAE00 \uC791\uC131\uC790\uC5D0\uAC8C \uC54C\uB9BC).',"\uB313\uAE00\uC740 \uC791\uC131\uC790\uC640 \uC9C1\uC804 \uB313\uAE00 \uC791\uC131\uC790\uC5D0\uAC8C \uC54C\uB9BC\uC774 \uAC00\uBBC0\uB85C \uB2F5\uAE00\uC774 \uC624\uAC00\uB294 \uD750\uB984\uC774 \uB04A\uAE30\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uACE0\uAC1D\uC13C\uD130 \uAE00\uC740 \uCF54\uB4DC\uC0F5 \uB313\uAE00\uC774 \uACE7 \uB2F5\uBCC0\uC785\uB2C8\uB2E4.","**\uD65C\uB3D9** \uC544\uC774\uCF58\uC73C\uB85C \uB4F1\uB85D\xB7\uC218\uC815\xB7\uD655\uC778\xB7\uC644\uB8CC \uC774\uB825\uC744 \uBD05\uB2C8\uB2E4. \uC0C1\uC138\uC758 \uD734\uC9C0\uD1B5 \uC544\uC774\uCF58\uC740 \uC791\uC131\uC790\uB9CC \uBCF4\uC785\uB2C8\uB2E4.","\uBAA8\uBC14\uC77C \uC0C1\uC138\uB294 \uC624\uB978\uCABD \uC704 **\u22EE** \uC5D0 \uD65C\uB3D9\xB7\uACF5\uC720\xB7\uC0AD\uC81C\uAC00 \uC788\uACE0, \uACE0\uCE5C \uB0B4\uC6A9\uC740 **\uC800\uC7A5\uD558\uAE30**\uB85C \uD55C \uBC88\uC5D0 \uBCF4\uB0C5\uB2C8\uB2E4."]},{title:"\uC0C1\uD0DC\uC640 \uC644\uB8CC",lines:["\uC0C1\uD0DC \uCE69\uC744 \uB204\uB974\uBA74 \uC2DC\uC791\uC804 \u203A \uC9C4\uD589\uC911 \u203A \uBCF4\uB958\uB97C \uACE0\uB985\uB2C8\uB2E4. \uBA54\uB274\uC758 **\uC644\uB8CC**\uB294 \uD655\uC778 \uC5C6\uC774 \uBC14\uB85C \uC644\uB8CC \uCC98\uB9AC\uB429\uB2C8\uB2E4.","\uC644\uB8CC \uCCB4\uD06C(\u25CB)\uB294 **\uC791\uC131\uC790\uC640 \uCC45\uC784\uC790\uB9CC** \uB204\uB97C \uC218 \uC788\uACE0, \uD655\uC778 \uD31D\uC5C5\uC744 \uAC70\uCCD0 \uC801\uC6A9\uB429\uB2C8\uB2E4. \uB9C8\uAC10\uC608\uC815\uC774 \uBE44\uC5B4 \uC788\uC73C\uBA74 \uC644\uB8CC \uC2DC\uAC01\uC73C\uB85C \uCC44\uC6CC\uC9D1\uB2C8\uB2E4.",'\uB9C8\uAC10\uC608\uC815\uC740 \uC9C0\uB09C \uAC83\uB9CC \uBE68\uAC04\uC0C9\uC73C\uB85C \uD45C\uC2DC\uB418\uBA70, \uC9C0\uC5F0 \uAC74\uC218\uB294 \uADF8\uB8F9 \uBA38\uB9AC\uC904\uC5D0 "\uC9C0\uC5F0 n\uAC74"\uC73C\uB85C \uBCF4\uC785\uB2C8\uB2E4.']},{title:"\uAD00\uB828 \uC5C5\uBB34",lines:["\uC0C1\uC138\uC758 **\uAD00\uB828 \uC5C5\uBB34**\uC5D0\uC11C \uD6C4\uC18D \uC5C5\uBB34 \uB9CC\uB4E4\uAE30, \uAD00\uB828\xB7\uC911\uBCF5 \uC5C5\uBB34 \uC5F0\uACB0\uC744 \uD569\uB2C8\uB2E4.","\uC6B0\uD074\uB9AD \uBA54\uB274\uC5D0\uC11C \uD504\uB85C\uC81D\uD2B8 \uC774\uB3D9, \uBAA9\uD45C\uC5D0 \uB123\uAE30, \uBCF4\uAD00, \uC0AD\uC81C\uB97C \uBC14\uB85C \uC2E4\uD589\uD569\uB2C8\uB2E4."]}]},{id:"checklist",tabTitle:"\uD560\uC77C",topics:[{title:"\uD560\uC77C \uBAA9\uB85D",lines:['\uC0C1\uC138\uC758 **\uD560\uC77C**\uC5D0 \uD56D\uBAA9\uC744 \uC801\uACE0 \uCCB4\uD06C\uD569\uB2C8\uB2E4. \uC9C4\uD589\uC740 \uBAA9\uB85D\xB7\uCE74\uB4DC\uC5D0 "1/3"\uCC98\uB7FC \uD45C\uC2DC\uB429\uB2C8\uB2E4.',"\uD0C0\uC784\uB77C\uC778 \uBCF4\uAE30\uC5D0\uC11C\uB294 \uC5C5\uBB34 \uC544\uB798 \uD560\uC77C \uC904\uC774 \uD3BC\uCCD0\uC9C0\uBA70, \uCCB4\uD06C\uD558\uBA74 \uD655\uC778 \uD31D\uC5C5 \uB4A4 \uC644\uB8CC\uB429\uB2C8\uB2E4."]},{title:"\uD560\uC77C\uC744 \uC5C5\uBB34\uB85C \u2014 \uC5C5\uBB34 \uB098\uB204\uAE30(\uBD84\uC7A5)",lines:["\u2460 \uC791\uC131\uC790\uAC00 \uD070 \uC5C5\uBB34\uB97C \uB4F1\uB85D\uD558\uACE0 \uCC45\uC784\uC790\uB97C \uC815\uD55C \uB4A4, \uD560\uC77C\uC5D0 \uD574\uC57C \uD560 \uC77C\uC744 \uD56D\uBAA9\uC73C\uB85C \uC801\uC2B5\uB2C8\uB2E4.","\u2461 \uCC45\uC784\uC790\uB294 \uD560\uC77C \uD56D\uBAA9\uC758 **\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30**\uB85C \uAC01 \uD56D\uBAA9\uC744 \uBCC4\uB3C4 \uC5C5\uBB34\uB85C \uC2B9\uACA9\uD558\uACE0, \uADF8 \uC5C5\uBB34\uC758 \uCC45\uC784\uC790\xB7\uB9C8\uAC10\uC608\uC815\uC744 \uC815\uD574 \uD300\uC6D0\uC5D0\uAC8C \uB098\uB220 \uB9E1\uAE41\uB2C8\uB2E4.",'\u2462 \uC2B9\uACA9\uB41C \uC5C5\uBB34\uB294 \uC6D0\uB798 \uC5C5\uBB34\uC758 \uD560\uC77C\uC5D0 \uC5F0\uACB0\uB41C \uCC44\uB85C \uB0A8\uC544, \uD300\uC6D0\uC774 \uC644\uB8CC\uD558\uBA74 \uC6D0\uB798 \uC5C5\uBB34\uC758 \uD560\uC77C\uB3C4 \uC644\uB8CC\uB85C \uD45C\uC2DC\uB429\uB2C8\uB2E4("3/4" \uC9C4\uD589 \uD45C\uC2DC).',"\u2463 \uB098\uB220 \uC900 \uC5C5\uBB34\uB07C\uB9AC \uB313\uAE00\uB85C \uB300\uD654\uD558\uACE0, \uBAA8\uB450 \uB05D\uB098\uBA74 \uCC45\uC784\uC790\uAC00 \uC6D0\uB798 \uC5C5\uBB34\uB97C \uC644\uB8CC\uD569\uB2C8\uB2E4.","\uC774\uBBF8 \uC788\uB294 \uC5C5\uBB34\uB97C \uD560\uC77C\uC5D0 \uBD99\uC77C \uC218\uB3C4 \uC788\uACE0, \uC5F0\uACB0 \uC5C5\uBB34\uB97C \uD734\uC9C0\uD1B5\uC5D0 \uBCF4\uB0B4\uBA74 \uD560\uC77C\uC5D0\uC11C\uB3C4 \uBE60\uC9D1\uB2C8\uB2E4(\uAC74\uC218\uB3C4 \uD568\uAED8 \uB9DE\uCDB0\uC9D1\uB2C8\uB2E4)."]}]},{id:"confirm",tabTitle:"\uD655\uC778\xB7\uC54C\uB9BC",topics:[{title:"\uD655\uC778 \uC694\uCCAD\uACFC \uD655\uC778 \uC644\uB8CC",lines:['\uCC45\uC784\uC790\xB7\uCC38\uC870\uC790\uB294 \uBC30\uC815\uB41C \uC5C5\uBB34\uB97C **\uD655\uC778** \uBC84\uD2BC\uC73C\uB85C \uC77D\uC74C \uCC98\uB9AC\uD569\uB2C8\uB2E4. \uD655\uC778 \uC804 \uC5C5\uBB34\uB294 \uD45C \uB9E8 \uC704 "\uBBF8\uD655\uC778" \uC601\uC5ED\uACFC \uBAA8\uBC14\uC77C "\uBBF8\uD655\uC778" \uADF8\uB8F9\uC5D0 \uBAA8\uC785\uB2C8\uB2E4.',"\uD655\uC778 \uC5F4\uC758 **n/m** \uC744 \uB204\uB974\uBA74 \uB204\uAC00 \uD655\uC778\uD588\uB294\uC9C0 \uBCF4\uC774\uACE0, \uC791\uC131\uC790\uB294 \uBBF8\uD655\uC778\uC790\uC5D0\uAC8C **\uD655\uC778 \uC694\uCCAD**\uC744 \uB2E4\uC2DC \uBCF4\uB0BC \uC218 \uC788\uC2B5\uB2C8\uB2E4.","\uACF5\uC9C0\uC0AC\uD56D\uC740 \uB300\uC0C1\uC790\uAC00 \uD655\uC778\uD558\uBA70, \uD655\uC778 \uC5F4 \uD544\uD130(\uC804\uCCB4/\uBBF8\uD655\uC778/\uD655\uC778\uD568)\uB85C \uAC70\uB985\uB2C8\uB2E4."]},{title:"\uC54C\uB9BC",lines:["\uBC30\uC815\xB7\uB2F4\uB2F9\uC790 \uBCC0\uACBD\xB7\uCC38\uC870 \uC9C0\uC815\xB7\uB313\uAE00\xB7\uB313\uAE00 \uBC18\uC751\xB7\uD655\uC778 \uC694\uCCAD\xB7\uD655\uC778 \uC644\uB8CC\xB7\uC5C5\uBB34 \uC644\uB8CC\xB7\uC218\uC815\xB7\uB9C8\uAC10 \uC54C\uB9BC\uC774 \uBCA8\uACFC \uC571 \uD478\uC2DC\uB85C \uC635\uB2C8\uB2E4.","**\uB0B4 \uC815\uBCF4 \u203A \uC54C\uB9BC \uC124\uC815**\uC5D0\uC11C \uC885\uB958\uBCC4\uB85C \uB044\uACE0 \uCF24 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uB9C8\uAC10 \uC0AC\uC804\uC54C\uB9BC \uC2DC\uAC01\uC740 \uC5C5\uBB34\uD568 \uC124\uC815(\uAD00\uB9AC\uC790)\uC5D0\uC11C \uC815\uD569\uB2C8\uB2E4.",'\uCC45\uC784\uC790 \uC54C\uB9BC\uC740 \uC2DC\uC791\uC77C\uC2DC\uBD80\uD130 \uAC11\uB2C8\uB2E4(\uC2DC\uC791\uC77C\uC2DC\uAC00 \uBBF8\uB798\uBA74 \uADF8\uB54C "\uC2DC\uC791" \uC54C\uB9BC\uC73C\uB85C \uC804\uB2EC).']}]},{id:"views",tabTitle:"\uBCF4\uAE30",topics:[{title:"\uBCF4\uAE30 \uC804\uD658",lines:["\uD5E4\uB354 \uC624\uB978\uCABD \uBC84\uD2BC(\uBAA9\uB85D\xB7\uC8FC\uAC04\xB7\uC6D4\uAC04\xB7\uD504\uB85C\uC81D\uD2B8\xB7\uC0C1\uD0DC\xB7\uBAA9\uD45C\xB7\uD0C0\uC784\uB77C\uC778)\uC73C\uB85C \uBC14\uAFB8\uBA70 \uD0ED\uB9C8\uB2E4 \uB530\uB85C \uAE30\uC5B5\uB429\uB2C8\uB2E4. \uD654\uBA74\uC774 \uC881\uC73C\uBA74 \uD604\uC7AC \uBCF4\uAE30 \uD558\uB098\uB9CC \uBCF4\uC774\uACE0 \uB204\uB974\uBA74 \uBA54\uB274\uAC00 \uC5F4\uB9BD\uB2C8\uB2E4.","\uB2E8\uCD95\uD0A4 **G** \uB2E4\uC74C \uAE00\uC790\uD0A4\uB85C\uB3C4 \uC804\uD658\uD569\uB2C8\uB2E4(\uB2E8\uCD95\uD0A4 \uD0ED \uCC38\uACE0)."]},{title:"\uBAA9\uB85D(\uD45C)",lines:["\uC5F4 \uC81C\uBAA9 \u2014 \uC81C\uBAA9\xB7\uC2DC\uC791\uC77C\uC2DC\xB7\uB9C8\uAC10\uC608\uC815\xB7\uC644\uB8CC\uC77C\uC2DC\uB294 **\uC815\uB82C**, \uC0C1\uD0DC\xB7\uD655\uC778\xB7\uCC45\uC784\uC790\xB7\uCC38\uC870\uC790\xB7\uD504\uB85C\uC81D\uD2B8\xB7\uC911\uC694\uB3C4\uB294 **\uD544\uD130**\uAC00 \uC5F4\uB9BD\uB2C8\uB2E4.","**\uADF8\uB8F9** \uBA54\uB274\uB85C \uCC45\uC784\uC790\xB7\uD504\uB85C\uC81D\uD2B8\xB7\uC0C1\uD0DC \uB4F1 \uAE30\uC900\uC744 \uBC14\uAFB8\uACE0, \uADF8\uB8F9 \uBA38\uB9AC\uC904\uC758 \u25B8 \uB85C \uC811\uC2B5\uB2C8\uB2E4. \uADF8\uB8F9 \uBA38\uB9AC\uC904 **+** \uB85C \uADF8 \uADF8\uB8F9\uC5D0 \uBC14\uB85C \uB4F1\uB85D\uD569\uB2C8\uB2E4.","\uD654\uBA74\uC774 \uC881\uC73C\uBA74 \uD45C\uAC00 \uAC00\uB85C\uB85C \uC2A4\uD06C\uB864\uB418\uACE0 \uC5F4 \uC81C\uBAA9\uC774 \uD568\uAED8 \uB530\uB77C\uC635\uB2C8\uB2E4."]},{title:"\uBCF4\uB4DC(\uD504\uB85C\uC81D\uD2B8\xB7\uC0C1\uD0DC\xB7\uBAA9\uD45C)",lines:["\uCE74\uB4DC\uB97C \uC81C\uBAA9 \uC55E **\u22EE\u22EE \uD578\uB4E4**\uB85C \uB04C\uC5B4 \uB2E4\uB978 \uCEEC\uB7FC(\uD504\uB85C\uC81D\uD2B8/\uC0C1\uD0DC/\uBAA9\uD45C)\uC73C\uB85C \uC62E\uAE41\uB2C8\uB2E4. \uCEEC\uB7FC \uBA38\uB9AC\uB97C \uB04C\uBA74 \uD504\uB85C\uC81D\uD2B8 \uC21C\uC11C\uAC00 \uBC14\uB01D\uB2C8\uB2E4.","\uCEEC\uB7FC **\u22EE** \uBA54\uB274 \u2014 \uC0C8 \uC5C5\uBB34 \uB4F1\uB85D \xB7 \uC218\uC815 \xB7 \uBCF4\uAD00 \xB7 \uC0AD\uC81C(\uC0AD\uC81C\uD558\uBA74 \uC18C\uC18D \uC5C5\uBB34\uB294 \uAE30\uBCF8 \uC5C5\uBB34\uD568\uC73C\uB85C \uC774\uB3D9).","\uCE74\uB4DC\uC758 \uC6D0\uD615 \uCCB4\uD06C\uB294 \uC644\uB8CC, \uB9C8\uAC10 \uB0A0\uC9DC\uB97C \uB204\uB974\uBA74 \uB2EC\uB825\uC73C\uB85C \uBC14\uAFC9\uB2C8\uB2E4. \uB9C8\uAC10\uC774 \uC5C6\uC73C\uBA74 \uC54C\uB78C \uC544\uC774\uCF58\uB9CC \uBCF4\uC785\uB2C8\uB2E4."]},{title:"\uC8FC\uAC04\xB7\uC6D4\uAC04 \uCE98\uB9B0\uB354",lines:["\uB9C8\uAC10\uC608\uC815(\uC77C\uC815\uC740 \uC77C\uC2DC) \uAE30\uC900\uC73C\uB85C \uCE78\uC5D0 \uB193\uC785\uB2C8\uB2E4. \uCE74\uB4DC\uB97C \uB2E4\uB978 \uB0A0\uB85C \uB04C\uBA74 \uB0A0\uC9DC\uAC00 \uBC14\uB01D\uB2C8\uB2E4.","\uBE48 \uCE78\uC5D0 \uB9C8\uC6B0\uC2A4\uB97C \uC62C\uB9AC\uBA74 **\uC5C5\uBB34 \uB4F1\uB85D** \uC904\uC774 \uB098\uD0C0\uB098 \uADF8 \uB0A0\uC9DC\uB85C \uBC14\uB85C \uB4F1\uB85D\uD569\uB2C8\uB2E4. \uC5F0/\uC6D4 \uC81C\uBAA9\uC744 \uB204\uB974\uBA74 \uB2EC\uB825\uC73C\uB85C \uC774\uB3D9\uD569\uB2C8\uB2E4.","\u22EE \u203A **\uCE98\uB9B0\uB354 \uC5F0\uB3D9**\uC5D0\uC11C \uAD6C\uAE00\xB7\uC560\uD50C\xB7\uB124\uC774\uBC84 \uCE98\uB9B0\uB354\uB85C \uB0B4\uBCF4\uB0B4\uAE30/\uAC00\uC838\uC624\uAE30\uB97C \uC124\uC815\uD569\uB2C8\uB2E4."]},{title:"\uD0C0\uC784\uB77C\uC778",feature:"timeline",lines:["\uC2DC\uC791\uC77C\uC2DC~\uB9C8\uAC10\uC608\uC815\uC744 \uB9C9\uB300\uB85C \uBCF4\uC5EC \uAE30\uAC04 \uACB9\uCE68\uC744 \uD655\uC778\uD569\uB2C8\uB2E4. \uC67C\uCABD \uC5C5\uBB34\uBA85 \uC904\uC758 \uD578\uB4E4\uB85C \uC21C\uC11C\uB97C \uBC14\uAFC9\uB2C8\uB2E4.","\uC5C5\uBB34 \uC544\uB798 \uD560\uC77C \uC904\uC774 \uD3BC\uCCD0\uC9C0\uBA70, \uC644\uB8CC \uC228\uAE30\uAE30\uAC00 \uCF1C\uC838 \uC788\uC73C\uBA74 \uC644\uB8CC\uB41C \uD560\uC77C\uB3C4 \uAC10\uCDA5\uB2C8\uB2E4."]},{title:"\uCC28\uD2B8",feature:"charts",lines:["**\uCC28\uD2B8** \uBC84\uD2BC\uC5D0\uC11C \uC6CC\uD06C\uB85C\uB4DC(\uC778\uC6D0\uBCC4 \uBD80\uD558)\xB7\uB204\uC801\uD750\uB984\uB3C4\xB7\uB9AC\uB4DC\uD0C0\uC784, \uBAA9\uD45C\uB97C \uC4F0\uBA74 \uBCA8\uB85C\uC2DC\uD2F0\xB7\uBC88\uB2E4\uC6B4\uC744 \uBD05\uB2C8\uB2E4.","\uC6CC\uD06C\uB85C\uB4DC\uC758 \uC778\uC6D0 \uC6A9\uB7C9\uC740 \uCC28\uD2B8 \uC548 \uC124\uC815 \uC544\uC774\uCF58\uC73C\uB85C \uC815\uD569\uB2C8\uB2E4."]}]},{id:"filters",tabTitle:"\uAC80\uC0C9\xB7\uD544\uD130",topics:[{title:"\uAC80\uC0C9\uACFC \uD544\uD130",lines:["\uAC80\uC0C9\uCE78\uC740 \uC81C\uBAA9\xB7\uBE44\uACE0\uB97C \uCC3E\uC2B5\uB2C8\uB2E4(\uB2E8\uCD95\uD0A4 **/**). \uBAA8\uBC14\uC77C\uC740 \uAC80\uC0C9 \uD654\uBA74\uC5D0\uC11C \uC0C1\uD0DC\xB7\uB77C\uBCA8 \uCE69\uC73C\uB85C \uD568\uAED8 \uAC70\uB985\uB2C8\uB2E4.","**\uD544\uD130**(\uBAA9\uB85D \uC678 \uBCF4\uAE30) \xB7 **\uCC45\uC784\uC790** \xB7 **\uD504\uB85C\uC81D\uD2B8** \xB7 **\uC911\uC694\uB3C4** \uBC84\uD2BC\uC740 \uAC01\uAC01 \uCCB4\uD06C \uBA54\uB274\uAC00 \uC5F4\uB9AC\uACE0, \uAC78\uB9B0 \uAC1C\uC218\uAC00 \uBC84\uD2BC\uC5D0 \uD45C\uC2DC\uB429\uB2C8\uB2E4.","**\uBAA9\uD45C** \uBC84\uD2BC\uC740 \uC804\uCCB4/\uBBF8\uBC30\uC815/\uBAA9\uD45C\uBCC4\uB85C \uAC70\uB985\uB2C8\uB2E4(\uBAA9\uD45C \uBCF4\uB4DC\uC5D0\uC11C\uB294 \uCEEC\uB7FC\uC774 \uACE7 \uBAA9\uD45C\uB77C \uC801\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4).","\uC644\uB8CC\xB7\uBCF4\uAD00\uD568 \uD0ED\uC740 **\uAE30\uAC04** \uBC84\uD2BC\uC73C\uB85C \uC644\uB8CC\uC77C \uBC94\uC704\uB97C \uC815\uD569\uB2C8\uB2E4."]},{title:"\uB77C\uBCA8",feature:"label",lines:["**\uB77C\uBCA8** \uBC84\uD2BC\uC73C\uB85C \uB77C\uBCA8\uBCC4\uB85C \uAC70\uB974\uACE0, \uC5C5\uBB34 \uC0C1\uC138\uC758 \uB77C\uBCA8 \uD589\uC5D0\uC11C \uBD99\uC785\uB2C8\uB2E4. \uB77C\uBCA8 \uC0AC\uC804\uC740 \uC5C5\uBB34\uD568 \uC124\uC815\uC5D0\uC11C \uAD00\uB9AC\uD569\uB2C8\uB2E4."]}]},{id:"projects",tabTitle:"\uD504\uB85C\uC81D\uD2B8\xB7\uBAA9\uD45C",feature:"project",topics:[{title:"\uD504\uB85C\uC81D\uD2B8",lines:["\uC5C5\uBB34\uB97C \uBB36\uB294 \uB2E8\uC704\uC785\uB2C8\uB2E4. \uD504\uB85C\uC81D\uD2B8 \uBCF4\uB4DC \uB9E8 \uB05D \uC810\uC120 \uCE78 \uB610\uB294 \uCEEC\uB7FC \u22EE \u203A \uC218\uC815\uC5D0\uC11C \uC774\uB984\xB7\uC544\uC774\uCF58\uC744 \uC815\uD569\uB2C8\uB2E4.","\uC5C5\uBB34\uC758 \uD504\uB85C\uC81D\uD2B8\uB294 \uC0C1\uC138 \uC18D\uC131\uC774\uB098 \uC6B0\uD074\uB9AD \u203A \uD504\uB85C\uC81D\uD2B8 \uC774\uB3D9\uC73C\uB85C \uBC14\uAFC9\uB2C8\uB2E4. \uAE30\uBCF8 \uC5C5\uBB34\uD568\uC740 \uD504\uB85C\uC81D\uD2B8\uAC00 \uC5C6\uB294 \uC5C5\uBB34\uC785\uB2C8\uB2E4."]},{title:"\uBAA9\uD45C(\uC2A4\uD504\uB9B0\uD2B8)",feature:"sprint",lines:["\uD504\uB85C\uC81D\uD2B8 \uC124\uC815\uC5D0\uC11C **\uBAA9\uD45C \uC0AC\uC6A9**\uC744 \uCF1C\uBA74 \uAE30\uAC04\uC774 \uC788\uB294 \uBAA9\uD45C\uB97C \uB9CC\uB4E4\uACE0 \uC5C5\uBB34\uB97C \uBC30\uC815\uD569\uB2C8\uB2E4(\uBAA9\uD45C \uBCF4\uB4DC\uC5D0\uC11C \uCE74\uB4DC \uB04C\uAE30, \uC6B0\uD074\uB9AD \u203A \uBAA9\uD45C\uC5D0 \uB123\uAE30).","\uBAA9\uD45C \uC885\uB8CC \uC2DC \uB0A8\uC740 \uC5C5\uBB34\uB97C \uB2E4\uC74C \uBAA9\uD45C\uB85C \uB118\uAE38\uC9C0, \uBBF8\uBC30\uC815\uC73C\uB85C \uBE84\uC9C0 \uACE0\uB985\uB2C8\uB2E4. \uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8\uB294 \uC0C1\uC138 \uC18D\uC131\uC5D0\uC11C \uC801\uC2B5\uB2C8\uB2E4."]},{title:"\uC5C5\uBB34 \uD15C\uD50C\uB9BF\xB7\uC790\uB3D9\uD654 \uADDC\uCE59",lines:["\u22EE \u203A **\uC5C5\uBB34 \uD15C\uD50C\uB9BF**\uC73C\uB85C \uC815\uD615 \uC808\uCC28(\uD560\uC77C \uD3EC\uD568)\uB97C \uD55C \uBC88\uC5D0 \uB9CC\uB4E4\uACE0, **\uC790\uB3D9\uD654 \uADDC\uCE59**\uC73C\uB85C \uB4F1\uB85D \uC2DC \uC870\uAC74\uBD80 \uBC30\uC815 \uB4F1\uC744 \uB9E1\uAE41\uB2C8\uB2E4."]},{title:"\uBCF4\uACE0\uC11C",feature:"report",lines:["**\uBCF4\uACE0\uC11C** \uD0ED\uC5D0\uC11C \uC5C5\uBB34 \uBCF4\uACE0\uC11C\uB97C \uC791\uC131\uD574 \uC804\uC790\uACB0\uC7AC\uB85C \uC0C1\uC2E0\uD569\uB2C8\uB2E4."]}]},{id:"shortcuts",tabTitle:"\uB2E8\uCD95\uD0A4",topics:[]}];function GS(e){return e.split(/(\*\*[^*]+\*\*)/g).filter(b=>b.length>0).map((b,l)=>b.startsWith("**")&&b.endsWith("**")?an(lo,{component:"strong",sx:{fontWeight:700},children:b.slice(2,-2)},l):an(HS,{children:b},l))}function YS({keys:e}){let d=at();return an(lo,{sx:{display:"flex",alignItems:"center",gap:.5,justifyContent:"flex-end"},children:e.split(" \u2192 ").map((b,l)=>Rf(lo,{sx:{display:"flex",alignItems:"center",gap:.5},children:[l>0?an(US,{sx:{fontSize:18,color:d.colors.textMuted}}):null,an(lo,{component:"span",sx:{minWidth:32,height:32,px:.75,display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:13.5,fontWeight:700,color:d.colors.textPrimary,bgcolor:d.colors.surfaceSubtle,border:`1px solid ${d.colors.border}`,borderRadius:1,fontVariantNumeric:"tabular-nums"},children:b})]},`${b}-${l}`))})}function cK({open:e,onClose:d,views:b,features:l={},initialTab:o}){let s=at(),r=c=>!c||l[c]!==!1,t=ha(b),n=KS.filter(c=>r(c.feature)).map(c=>({id:c.id,tabTitle:c.tabTitle,showTitle:!1,children:c.id==="shortcuts"?an(lo,{sx:{display:"grid",gridTemplateColumns:"auto 1fr",columnGap:2,rowGap:1.25,alignItems:"center",fontSize:14,color:s.colors.textPrimary,px:.5},children:t.map(i=>Rf(lo,{sx:{display:"contents"},children:[an(YS,{keys:i.keys}),an("span",{children:i.description})]},i.keys))}):an(lo,{sx:{display:"flex",flexDirection:"column",gap:2.5,px:.5},children:c.topics.filter(i=>r(i.feature)).map(i=>Rf(lo,{children:[an(lo,{sx:{fontSize:15,fontWeight:700,color:s.colors.textStrong,mb:.75},children:i.title}),an(lo,{component:"ul",sx:{m:0,pl:2.5,display:"flex",flexDirection:"column",gap:.5,fontSize:14,lineHeight:1.6,color:s.colors.textPrimary},children:i.lines.map((a,h)=>an("li",{children:GS(a)},h))})]},i.title))})}));return an(VS,{open:e,onClose:d,maxWidth:"sm",title:"\uC5C5\uBB34\uD568 \uB9E4\uB274\uC5BC",locale:"ko",titleIcons:{delete:{visible:!1}},tabs:{visible:!0,switchContent:!0},activeTabValue:Math.max(0,n.findIndex(c=>c.id===o)),fixedHeight:520,sectionContentPaddingTop:0,fontScale:{enabled:!0},fontScaleKey:"taskbox-manual",sections:n,actions:{showCancelButton:!1,right:an(WS,{variant:"contained",onClick:d,sx:{minWidth:80},children:"\uB2EB\uAE30"})}})}import{useEffect as O0,useRef as XS,useState as ds}from"react";import{Box as or,Button as Fn,IconButton as Of,Menu as A0,MenuItem as D0,Switch as ZS,Tooltip as P0}from"@mui/material";import{FormDialog as N0}from"@ehfuse/mui-form-dialog";import Af from"@mui/icons-material/Add";import JS from"@mui/icons-material/ArrowRightAlt";import QS from"@mui/icons-material/BoltOutlined";import eT from"@mui/icons-material/Close";import tT from"@mui/icons-material/EditOutlined";import{ErrorAlert as L0}from"@ehfuse/alerts";import{ClearTextField as ma,LabelSelect as mn}from"@ehfuse/mui-form-controls";import{Fragment as j0,jsx as Xe,jsxs as Cn}from"react/jsx-runtime";var Df=[{value:"created",label:"\uC5C5\uBB34 \uB4F1\uB85D \uC2DC",hint:"\uC0C8 \uC5C5\uBB34\uAC00 \uB9CC\uB4E4\uC5B4\uC9C4 \uC9C1\uD6C4 \uD55C \uBC88 \uC2E4\uD589\uD569\uB2C8\uB2E4."},{value:"status_changed",label:"\uC0C1\uD0DC \uBCC0\uACBD \uC2DC",hint:"\uC0C1\uD0DC\uAC00 \uC2E4\uC81C\uB85C \uBC14\uB010 \uC9C1\uD6C4 \uC2E4\uD589\uD569\uB2C8\uB2E4."},{value:"commented",label:"\uB313\uAE00\uC774 \uB2EC\uB838\uC744 \uB54C",hint:"\uB313\uAE00\uC774 \uC0C8\uB85C \uB2EC\uB9AC\uAC70\uB098 \uC218\uC815\uB41C \uC9C1\uD6C4 \uC2E4\uD589\uD569\uB2C8\uB2E4(\uD68C\uC2E0\uC744 \uBC1B\uC740 \uC790\uB9AC)."},{value:"manager_assigned",label:"\uCC45\uC784\uC790\uAC00 \uC9C0\uC815\uB410\uC744 \uB54C",hint:"\uCC45\uC784\uC790\uAC00 \uC0C8\uB85C \uC9C0\uC815\uB418\uAC70\uB098 \uBC14\uB010 \uC9C1\uD6C4 \uC2E4\uD589\uD569\uB2C8\uB2E4."},{value:"attachment_added",label:"\uCCA8\uBD80\uAC00 \uC62C\uB77C\uC654\uC744 \uB54C",hint:"\uC5C5\uBB34\uC5D0 \uD30C\uC77C\uC774 \uCCA8\uBD80\uB41C \uC9C1\uD6C4 \uC2E4\uD589\uD569\uB2C8\uB2E4(\uC99D\uBE59 \uC811\uC218 \uC790\uB9AC)."},{value:"field_changed",label:"\uD544\uB4DC\uAC00 \uBC14\uB00C\uC5C8\uC744 \uB54C",hint:"\uC9C0\uC815\uD55C \uD544\uB4DC\uAC00 \uC2E4\uC81C\uB85C \uBC14\uB010 \uC9C1\uD6C4 \uC2E4\uD589\uD569\uB2C8\uB2E4(\uD544\uB4DC\uB97C \uC548 \uACE0\uB974\uBA74 \uC544\uBB34 \uC218\uC815\uC5D0\uB098 \uC2E4\uD589)."},{value:"overdue",label:"\uB9C8\uAC10 \uACBD\uACFC \uC2DC",hint:"\uB9C8\uAC10\uC774 \uC9C0\uB09C \uBBF8\uC644\uB8CC \uC5C5\uBB34\uB97C \uB9E4\uC77C \uC810\uAC80\uD574 \uC2E4\uD589\uD569\uB2C8\uB2E4."}],ga=[{value:"due_date",label:"\uB9C8\uAC10\uC608\uC815"},{value:"start_date",label:"\uC2DC\uC791\uC77C\uC2DC"},{value:"priority",label:"\uC911\uC694\uB3C4"},{value:"manager_account_seq",label:"\uCC45\uC784\uC790"},{value:"receiver_account_seqs",label:"\uCC38\uC870\uC790"},{value:"label_keys",label:"\uB77C\uBCA8"},{value:"group_seq",label:"\uD504\uB85C\uC81D\uD2B8"},{value:"sprint_seq",label:"\uBAA9\uD45C"},{value:"content",label:"\uB0B4\uC6A9"},{value:"note",label:"\uBE44\uACE0"}],cc=[{value:"high",label:"\uB192\uC74C"},{value:"medium",label:"\uC911\uAC04"},{value:"low",label:"\uB0AE\uC74C"}];function ac(){return{name:"",trigger:"created",enabled:!0,sort_no:0,condition:{},action:{}}}function lc(e){return cn.find(d=>d.key===e)?.name??e}function rT(e,d,b){let{condition:l,action:o}=e,s=[];if(l.group_seq){let n=d.find(c=>Qo(c.key)===l.group_seq);s.push(`\uD504\uB85C\uC81D\uD2B8=${n?.label??`#${l.group_seq}`}`)}l.is_bug===!0&&s.push("\uC624\uB958\uB9CC"),l.is_event===!0&&s.push("\uC77C\uC815\uB9CC"),l.priority&&s.push(`\uC911\uC694\uB3C4=${cc.find(n=>n.value===l.priority)?.label}`),l.label_key&&s.push(`\uB77C\uBCA8=${b.find(n=>n.key===l.label_key)?.name??l.label_key}`),l.title_contains&&s.push(`\uC81C\uBAA9\uC5D0 "${l.title_contains}" \uD3EC\uD568`),l.status&&s.push(`\uC0C1\uD0DC=${lc(l.status)}`),l.from_status&&s.push(`${lc(l.from_status)}\uC5D0\uC11C`),l.to_status&&s.push(`${lc(l.to_status)}\uB85C`),l.manager_empty===!0&&s.push("\uCC45\uC784\uC790 \uC5C6\uC74C"),l.manager_empty===!1&&s.push("\uCC45\uC784\uC790 \uC788\uC74C"),l.manager_account_seq&&s.push(`\uCC45\uC784\uC790=${l.manager_name||`\uACC4\uC815 #${l.manager_account_seq}`}`),l.receiver_account_seq&&s.push(`\uCC38\uC870\uC790\uC5D0 ${l.receiver_name||`\uACC4\uC815 #${l.receiver_account_seq}`}`),l.changed_field&&s.push(`${ga.find(n=>n.value===l.changed_field)?.label??l.changed_field} \uBCC0\uACBD`),l.comment_contains&&s.push(`\uB313\uAE00\uC5D0 "${l.comment_contains}" \uD3EC\uD568`),l.comment_by_others===!0&&s.push("\uB0A8\uC774 \uC4F4 \uB313\uAE00"),typeof l.overdue_days=="number"&&s.push(`${l.overdue_days}\uC77C \uACBD\uACFC`);let r=[];o.set_status&&r.push(`\uC0C1\uD0DC=${lc(o.set_status)}`),o.set_priority&&r.push(`\uC911\uC694\uB3C4=${cc.find(n=>n.value===o.set_priority)?.label}`),o.assign_manager_account_seq&&r.push(`\uCC45\uC784\uC790=${o.assign_manager_name||"\uC9C0\uC815"}`),o.add_receiver_account_seq&&r.push(`\uCC38\uC870\uC790 + ${o.add_receiver_name||"\uC9C0\uC815"}`),o.add_label_key&&r.push(`\uB77C\uBCA8 + ${b.find(n=>n.key===o.add_label_key)?.name??o.add_label_key}`),o.apply_content_template_seq&&r.push(`\uBCF8\uBB38 \uC591\uC2DD=${o.apply_content_template_name||"\uC9C0\uC815"}`),o.notify_account_seq&&r.push("\uC54C\uB9BC \uBC1C\uC1A1");let t=Df.find(n=>n.value===e.trigger)?.label??e.trigger;return{left:s.length>0?`${t} \xB7 ${s.join(", ")}`:t,right:r.join(", ")||"\uB3D9\uC791 \uC5C6\uC74C"}}var z0={fontSize:16,fontWeight:700,color:"#37352f"},nT={display:"flex",alignItems:"center",gap:1},oT={width:104,flexShrink:0,fontSize:16,color:"#37352f"};function TK({open:e,rules:d,customTabs:b,statusOptions:l,contentTemplates:o=[],onPickAccount:s,onClose:r,onCreate:t,onUpdate:n,onToggle:c,onRemove:i}){let[a,h]=ds(!1),[f,u]=ds(0),[g,m]=ds(ac()),[v,k]=ds(!1),B=XS(null),[R,L]=ds(null),[A,P]=ds(null);O0(()=>{if(e)return;let W=window.setTimeout(()=>{h(!1),u(0),m(ac())},500);return()=>window.clearTimeout(W)},[e]),O0(()=>{if(!a)return;let W=window.setTimeout(()=>B.current?.focus(),120);return()=>window.clearTimeout(W)},[a]);let N=f>0,q=g.trigger,j=()=>{h(!1),u(0),m(ac())},S=(W,X)=>{m(J=>{let G={...J.condition};return X===""||X===void 0||X===null?delete G[W]:G[W]=X,{...J,condition:G}})},T=(W,X)=>{m(J=>{let G={...J.action};return X===""||X===void 0||X===null?delete G[W]:G[W]=X,{...J,action:G}})},D=W=>{m(X=>{let J={...X.condition};return W!=="status_changed"&&(delete J.from_status,delete J.to_status),W!=="overdue"&&delete J.overdue_days,W!=="field_changed"&&delete J.changed_field,W!=="commented"&&(delete J.comment_contains,delete J.comment_by_others),W==="field_changed"&&J.changed_field===void 0&&(J.changed_field=ga[0]?.value??""),{...X,trigger:W,condition:J}})},p=b.filter(W=>!W.archived),y=l.map(W=>({value:W.key,label:W.name})),x=cn.map(W=>({value:W.key,label:W.name})),w=p.map(W=>({value:String(Qo(W.key)),label:W.label})),{condition:_,action:C}=g,O=_.is_bug!==void 0||_.is_event!==void 0,z=[..._.group_seq===void 0&&w.length>0?[{key:"group_seq",label:"\uD504\uB85C\uC81D\uD2B8\uAC00 ~\uC778 \uACBD\uC6B0"}]:[],...O?[]:[{key:"kind",label:"\uC885\uB958\uAC00 \uC624\uB958/\uC77C\uC815\uC778 \uACBD\uC6B0"}],..._.priority===void 0?[{key:"priority",label:"\uC911\uC694\uB3C4\uAC00 ~\uC778 \uACBD\uC6B0"}]:[],..._.label_key===void 0&&y.length>0?[{key:"label_key",label:"\uB77C\uBCA8\uC774 \uBD99\uC5B4 \uC788\uB294 \uACBD\uC6B0"}]:[],..._.title_contains===void 0?[{key:"title_contains",label:"\uC81C\uBAA9\uC5D0 ~ \uB2E8\uC5B4\uAC00 \uD3EC\uD568\uB41C \uACBD\uC6B0"}]:[],..._.manager_empty===void 0?[{key:"manager_empty",label:"\uCC45\uC784\uC790\uAC00 \uC5C6\uB294/\uC788\uB294 \uACBD\uC6B0"}]:[],...s&&_.manager_account_seq===void 0?[{key:"manager_account",label:"\uCC45\uC784\uC790\uAC00 ~\uC778 \uACBD\uC6B0"}]:[],...s&&_.receiver_account_seq===void 0?[{key:"receiver_account",label:"\uCC38\uC870\uC790\uC5D0 ~\uAC00 \uD3EC\uD568\uB41C \uACBD\uC6B0"}]:[],...q==="status_changed"&&_.from_status===void 0?[{key:"from_status",label:"\uC774 \uC0C1\uD0DC\uC5D0\uC11C \uBC14\uB010 \uACBD\uC6B0"}]:[],...q==="status_changed"&&_.to_status===void 0?[{key:"to_status",label:"\uC774 \uC0C1\uD0DC\uB85C \uBC14\uB010 \uACBD\uC6B0"}]:[],...q==="field_changed"&&_.changed_field===void 0?[{key:"changed_field",label:"~ \uD544\uB4DC\uAC00 \uBCC0\uACBD\uB41C \uACBD\uC6B0"}]:[],...q==="commented"&&_.comment_contains===void 0?[{key:"comment_contains",label:"\uB313\uAE00\uC5D0 ~ \uB2E8\uC5B4\uAC00 \uD3EC\uD568\uB41C \uACBD\uC6B0"}]:[],...q==="commented"&&_.comment_by_others===void 0?[{key:"comment_by_others",label:"\uCC45\uC784\uC790\uAC00 \uC544\uB2CC \uC0AC\uB78C\uC774 \uC4F4 \uACBD\uC6B0"}]:[],...q==="overdue"&&_.overdue_days===void 0?[{key:"overdue_days",label:"\uB9C8\uAC10 \uD6C4 \uBA70\uCE60 \uC9C0\uB09C \uACBD\uC6B0"}]:[]],$=async W=>{if(!s)return;let X=W==="manager_account"?_.manager_account_seq??0:_.receiver_account_seq??0,J=await s(X,W==="manager_account"?"\uCC45\uC784\uC790":"\uCC38\uC870\uC790");J&&m(G=>{let te={...G.condition};return W==="manager_account"?(te.manager_account_seq=J.accountSeq,te.manager_name=J.name):(te.receiver_account_seq=J.accountSeq,te.receiver_name=J.name),{...G,condition:te}})},V=W=>{L(null),W==="group_seq"?S("group_seq",Number(w[0]?.value)||0):W==="kind"?S("is_bug",!0):W==="priority"?S("priority","high"):W==="label_key"?S("label_key",y[0]?.value??""):W==="title_contains"?m(X=>({...X,condition:{...X.condition,title_contains:""}})):W==="manager_empty"?S("manager_empty",!0):W==="manager_account"||W==="receiver_account"?$(W):W==="from_status"?S("from_status",cn[0]?.key??""):W==="to_status"?S("to_status",cn[0]?.key??""):W==="changed_field"?S("changed_field",ga[0]?.value??""):W==="comment_contains"?m(X=>({...X,condition:{...X.condition,comment_contains:""}})):W==="comment_by_others"?S("comment_by_others",!0):W==="overdue_days"&&S("overdue_days",1)},M=W=>{if(W==="kind"){S("is_bug",""),S("is_event","");return}if(W==="manager_account"){S("manager_account_seq",""),S("manager_name","");return}if(W==="receiver_account"){S("receiver_account_seq",""),S("receiver_name","");return}S(W==="group_seq"?"group_seq":W,"")},H=[...C.set_status===void 0?[{key:"set_status",label:"\uC0C1\uD0DC \uBC14\uAFB8\uAE30"}]:[],...C.set_priority===void 0?[{key:"set_priority",label:"\uC911\uC694\uB3C4 \uBC14\uAFB8\uAE30"}]:[],...C.add_label_key===void 0&&y.length>0?[{key:"add_label_key",label:"\uB77C\uBCA8 \uBD99\uC774\uAE30"}]:[],...s&&C.assign_manager_account_seq===void 0?[{key:"assign_manager",label:"\uCC45\uC784\uC790 \uC9C0\uC815\uD558\uAE30"}]:[],...s&&C.add_receiver_account_seq===void 0?[{key:"add_receiver",label:"\uCC38\uC870\uC790 \uCD94\uAC00\uD558\uAE30"}]:[],...o.length>0&&C.apply_content_template_seq===void 0?[{key:"apply_content_template",label:"\uBCF8\uBB38 \uC591\uC2DD \uCC44\uC6B0\uAE30"}]:[],...s&&C.notify_account_seq===void 0?[{key:"notify",label:"\uC54C\uB9BC \uBCF4\uB0B4\uAE30"}]:[]],I=async W=>{if(!s)return;let X=W==="assign_manager"?C.assign_manager_account_seq??0:W==="add_receiver"?C.add_receiver_account_seq??0:C.notify_account_seq??0,J=await s(X,W==="assign_manager"?"\uCC45\uC784\uC790":W==="add_receiver"?"\uCC38\uC870\uC790":"\uC54C\uB9BC \uBC1B\uC744 \uC0AC\uB78C");J&&m(G=>{let te={...G.action};return W==="assign_manager"?(te.assign_manager_account_seq=J.accountSeq,te.assign_manager_name=J.name):W==="add_receiver"?(te.add_receiver_account_seq=J.accountSeq,te.add_receiver_name=J.name):(te.notify_account_seq=J.accountSeq,te.notify_name=J.name),{...G,action:te}})},E=W=>{if(P(null),W==="set_status")T("set_status",cn[0]?.key??"");else if(W==="set_priority")T("set_priority","high");else if(W==="add_label_key")T("add_label_key",y[0]?.value??"");else if(W==="apply_content_template"){let X=o[0];m(J=>({...J,action:{...J.action,apply_content_template_seq:X?.seq??0,apply_content_template_name:X?.name??""}}))}else I(W)},F=W=>{W==="assign_manager"?(T("assign_manager_account_seq",""),T("assign_manager_name","")):W==="add_receiver"?(T("add_receiver_account_seq",""),T("add_receiver_name","")):W==="apply_content_template"?(T("apply_content_template_seq",""),T("apply_content_template_name","")):W==="notify"?(T("notify_account_seq",""),T("notify_name",""),T("notify_message","")):T(W,"")},U=async()=>{if(!g.name.trim()){L0({message:"\uADDC\uCE59 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694."});return}if(Object.keys(g.action).length===0){L0({message:"\uB3D9\uC791\uC744 \uD558\uB098 \uC774\uC0C1 \uCD94\uAC00\uD558\uC138\uC694."});return}let W=N?g.sort_no:d.reduce((J,G)=>Math.max(J,G.sort_no),0)+1;k(!0);let X=N?await n(f,{...g,sort_no:W}):await t({...g,sort_no:W});k(!1),X&&j()},Y=(W,X,J,G)=>Cn(or,{sx:nT,children:[Xe(or,{sx:oT,children:W}),Cn(or,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:G?"column":"row",alignItems:G?"stretch":"center",gap:G?.5:1},children:[X,G?Xe(or,{sx:{fontSize:13.5,color:"#37352f"},children:G}):null]}),Xe(P0,{title:"\uC774 \uC904 \uBE7C\uAE30",arrow:!0,disableInteractive:!0,children:Xe(Of,{size:"small","aria-label":`${W} \uC904 \uBE7C\uAE30`,onClick:J,children:Xe(eT,{sx:{fontSize:16}})})})]}),K=()=>Cn(or,{sx:{display:"flex",flexDirection:"column",gap:2.5},children:[Xe(ma,{size:"medium",label:"\uADDC\uCE59 \uC774\uB984",inputRef:B,placeholder:"\uC608: \uC811\uC218 \uC624\uB958 \uC790\uB3D9 \uBC30\uC815",value:g.name,onChange:W=>m(X=>({...X,name:W.target.value}))}),Xe(or,{sx:{display:"flex",alignItems:"center",gap:2,flexWrap:"wrap"},children:Df.map(W=>{let X=q===W.value;return Xe(Fn,{disableElevation:!0,variant:X?"contained":"outlined",color:X?"primary":"inherit",onClick:()=>D(W.value),sx:{borderRadius:99,px:1.75,...X?{}:{color:"#57564f",borderColor:"#d9d9d6"}},children:W.label},W.value)})}),Xe(or,{sx:{fontSize:13,color:"#787774",mt:-.5},children:Df.find(W=>W.value===q)?.hint}),Cn(or,{sx:{display:"flex",alignItems:"center",gap:1,mt:.5},children:[Xe(or,{sx:z0,children:"\uC5B4\uB5A4 \uC5C5\uBB34\uC77C \uB54C"}),z.length>0?Xe(Fn,{size:"small",startIcon:Xe(Af,{sx:{fontSize:16}}),onClick:W=>L(W.currentTarget),sx:{color:"#2563eb",minWidth:0},children:"\uC870\uAC74 \uCD94\uAC00"}):null]}),_.group_seq!==void 0?Y("\uD504\uB85C\uC81D\uD2B8",Xe(mn,{size:"medium",fullWidth:!0,label:"",value:String(_.group_seq),options:w,onChange:W=>S("group_seq",Number(W.target.value)||"")}),()=>M("group_seq")):null,O?Y("\uC885\uB958",Xe(mn,{size:"medium",fullWidth:!0,label:"",value:_.is_bug?"bug":"event",options:[{value:"bug",label:"\uC624\uB958\uB9CC"},{value:"event",label:"\uC77C\uC815\uB9CC"}],onChange:W=>{let X=W.target.value==="bug";S("is_bug",X?!0:""),S("is_event",X?"":!0)}}),()=>M("kind")):null,_.priority!==void 0?Y("\uC911\uC694\uB3C4",Xe(mn,{size:"medium",fullWidth:!0,label:"",value:_.priority,options:cc,onChange:W=>S("priority",W.target.value)}),()=>M("priority")):null,_.label_key!==void 0?Y("\uB77C\uBCA8",Xe(mn,{size:"medium",fullWidth:!0,label:"",value:_.label_key,options:y,onChange:W=>S("label_key",W.target.value)}),()=>M("label_key")):null,_.title_contains!==void 0?Y("\uC81C\uBAA9",Xe(ma,{size:"medium",fullWidth:!0,placeholder:"\uD3EC\uD568\uD560 \uB0B1\uB9D0 (\uC608: \uAE34\uAE09)",value:_.title_contains,onChange:W=>m(X=>({...X,condition:{...X.condition,title_contains:W.target.value}}))}),()=>M("title_contains")):null,_.manager_empty!==void 0?Y("\uCC45\uC784\uC790",Xe(mn,{size:"medium",fullWidth:!0,label:"",value:_.manager_empty?"empty":"assigned",options:[{value:"empty",label:"\uC5C6\uC74C"},{value:"assigned",label:"\uC788\uC74C"}],onChange:W=>S("manager_empty",W.target.value==="empty")}),()=>M("manager_empty")):null,_.manager_account_seq!==void 0?Y("\uCC45\uC784\uC790",Xe(Fn,{size:"medium",variant:"outlined",color:"inherit",onClick:()=>{$("manager_account")},children:_.manager_name||`\uACC4\uC815 #${_.manager_account_seq}`}),()=>M("manager_account")):null,_.receiver_account_seq!==void 0?Y("\uCC38\uC870\uC790",Xe(Fn,{size:"medium",variant:"outlined",color:"inherit",onClick:()=>{$("receiver_account")},children:_.receiver_name||`\uACC4\uC815 #${_.receiver_account_seq}`}),()=>M("receiver_account")):null,_.from_status!==void 0?Y("\uC774 \uC0C1\uD0DC\uC5D0\uC11C",Xe(mn,{size:"medium",fullWidth:!0,label:"",value:_.from_status,options:x,onChange:W=>S("from_status",W.target.value)}),()=>M("from_status")):null,_.to_status!==void 0?Y("\uC774 \uC0C1\uD0DC\uB85C",Xe(mn,{size:"medium",fullWidth:!0,label:"",value:_.to_status,options:x,onChange:W=>S("to_status",W.target.value)}),()=>M("to_status")):null,_.changed_field!==void 0?Y("\uBCC0\uACBD \uD544\uB4DC",Xe(mn,{size:"medium",fullWidth:!0,label:"",value:_.changed_field,options:ga,onChange:W=>S("changed_field",W.target.value)}),()=>M("changed_field")):null,_.comment_contains!==void 0?Y("\uB313\uAE00 \uB0B1\uB9D0",Xe(ma,{size:"medium",fullWidth:!0,placeholder:"\uD3EC\uD568\uD560 \uB0B1\uB9D0 (\uC608: \uD68C\uC2E0)",value:_.comment_contains,onChange:W=>m(X=>({...X,condition:{...X.condition,comment_contains:W.target.value}}))}),()=>M("comment_contains")):null,_.comment_by_others!==void 0?Y("\uB313\uAE00 \uC791\uC131\uC790",Xe(mn,{size:"medium",fullWidth:!0,label:"",value:_.comment_by_others?"others":"any",options:[{value:"others",label:"\uCC45\uC784\uC790\uAC00 \uC544\uB2CC \uC0AC\uB78C"},{value:"any",label:"\uB204\uAD6C\uB4E0"}],onChange:W=>S("comment_by_others",W.target.value==="others")}),()=>M("comment_by_others")):null,_.overdue_days!==void 0?Y("\uACBD\uACFC\uC77C",Xe(ma,{size:"medium",fullWidth:!0,type:"number",value:String(_.overdue_days),onChange:W=>S("overdue_days",Math.max(0,Number(W.target.value)||0)),helperText:"\uB9C8\uAC10 \uD6C4 \uBA70\uCE60 \uC9C0\uB0AC\uC744 \uB54C\uBD80\uD130 \uC2E4\uD589\uD560\uC9C0"}),()=>M("overdue_days")):null,Object.keys(_).length===0?Xe(or,{sx:{fontSize:13.5,color:"#9a9a97"},children:"\uC870\uAC74\uC774 \uC5C6\uC73C\uBA74 \uBAA8\uB4E0 \uC5C5\uBB34\uC5D0 \uC2E4\uD589\uB429\uB2C8\uB2E4."}):null,Cn(or,{sx:{display:"flex",alignItems:"center",gap:1,mt:.5},children:[Xe(or,{sx:z0,children:"\uBB34\uC5C7\uC744 \uD560\uAE4C\uC694"}),H.length>0?Xe(Fn,{size:"small",startIcon:Xe(Af,{sx:{fontSize:16}}),onClick:W=>P(W.currentTarget),sx:{color:"#2563eb",minWidth:0},children:"\uB3D9\uC791 \uCD94\uAC00"}):null]}),C.set_status!==void 0?Y("\uC0C1\uD0DC",Xe(mn,{size:"medium",fullWidth:!0,label:"",value:C.set_status,options:x,onChange:W=>T("set_status",W.target.value)}),()=>F("set_status")):null,C.set_priority!==void 0?Y("\uC911\uC694\uB3C4",Xe(mn,{size:"medium",fullWidth:!0,label:"",value:C.set_priority,options:cc,onChange:W=>T("set_priority",W.target.value)}),()=>F("set_priority")):null,C.apply_content_template_seq!==void 0?Y("\uBCF8\uBB38 \uC591\uC2DD",Xe(mn,{size:"medium",fullWidth:!0,label:"",value:String(C.apply_content_template_seq),options:o.map(W=>({value:String(W.seq),label:W.name})),onChange:W=>{let X=o.find(J=>String(J.seq)===String(W.target.value));m(J=>({...J,action:{...J.action,apply_content_template_seq:X?.seq??0,apply_content_template_name:X?.name??""}}))}}),()=>F("apply_content_template"),"\uBCF8\uBB38\uC774 \uBE44\uC5B4 \uC788\uC744 \uB54C\uB9CC \uCC44\uC6C1\uB2C8\uB2E4(\uC4F4 \uB0B4\uC6A9\uC744 \uB36E\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4)"):null,C.add_label_key!==void 0?Y("\uB77C\uBCA8",Xe(mn,{size:"medium",fullWidth:!0,label:"",value:C.add_label_key,options:y,onChange:W=>T("add_label_key",W.target.value)}),()=>F("add_label_key")):null,C.assign_manager_account_seq!==void 0?Y("\uCC45\uC784\uC790",Xe(Fn,{size:"medium",variant:"outlined",color:"inherit",onClick:()=>{I("assign_manager")},children:C.assign_manager_name||`\uACC4\uC815 #${C.assign_manager_account_seq}`}),()=>F("assign_manager")):null,C.add_receiver_account_seq!==void 0?Y("\uCC38\uC870\uC790",Xe(Fn,{size:"medium",variant:"outlined",color:"inherit",onClick:()=>{I("add_receiver")},children:C.add_receiver_name||`\uACC4\uC815 #${C.add_receiver_account_seq}`}),()=>F("add_receiver")):null,C.notify_account_seq!==void 0?Y("\uC54C\uB9BC",Cn(j0,{children:[Xe(Fn,{size:"medium",variant:"outlined",color:"inherit",onClick:()=>{I("notify")},sx:{flexShrink:0},children:C.notify_name||`\uACC4\uC815 #${C.notify_account_seq}`}),Xe(ma,{size:"medium",fullWidth:!0,placeholder:"\uC54C\uB9BC \uBB38\uAD6C(\uBE44\uC6B0\uBA74 \uAE30\uBCF8 \uBB38\uAD6C)",value:C.notify_message??"",onChange:W=>T("notify_message",W.target.value)})]}),()=>F("notify")):null,Object.keys(C).length===0?Xe(or,{sx:{fontSize:13.5,color:"#9a9a97"},children:'"+ \uB3D9\uC791 \uCD94\uAC00" \uB85C \uD560 \uC77C\uC744 \uD558\uB098 \uC774\uC0C1 \uACE8\uB77C \uC8FC\uC138\uC694.'}):null,Xe(A0,{transitionDuration:0,anchorEl:R,open:!!R,onClose:()=>L(null),children:z.map(W=>Xe(D0,{dense:!0,onClick:()=>V(W.key),sx:{fontSize:14},children:W.label},W.key))}),Xe(A0,{transitionDuration:0,anchorEl:A,open:!!A,onClose:()=>P(null),children:H.map(W=>Xe(D0,{dense:!0,onClick:()=>E(W.key),sx:{fontSize:14},children:W.label},W.key))})]});return Cn(j0,{children:[Xe(N0,{open:e,onClose:r,maxWidth:"sm",title:"\uC790\uB3D9\uD654 \uADDC\uCE59",locale:"ko",titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-rule-manage",tabs:{visible:!1},contentPaddingX:0,contentTopPadding:0,contentBottomPadding:0,sectionContentPaddingTop:0,sections:[{id:"rules",title:"",showTitle:!1,children:Cn(or,{sx:{display:"flex",flexDirection:"column",px:2.5,py:2},children:[d.length===0?Cn(or,{sx:{py:4,display:"flex",flexDirection:"column",alignItems:"center",gap:2,color:"#9a9a97"},children:[Xe(QS,{sx:{fontSize:48,color:"#d9d9d6"}}),Xe(or,{sx:{fontSize:15},children:"\uB4F1\uB85D\uB41C \uADDC\uCE59\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."})]}):null,d.map(W=>Cn(or,{sx:{display:"flex",alignItems:"center",gap:2,py:1,"&:not(:last-of-type)":{borderBottom:"1px solid #ececea"},opacity:W.enabled?1:.5},children:[Xe(P0,{title:W.enabled?"\uC0AC\uC6A9 \uC911":"\uAEBC\uC9D0",arrow:!0,disableInteractive:!0,children:Xe(ZS,{size:"small",inputProps:{"aria-label":`${W.name} \uADDC\uCE59 \uC0AC\uC6A9`},checked:W.enabled,onChange:(X,J)=>c(W.seq,J)})}),Cn(or,{sx:{flex:1,minWidth:0},children:[Xe(or,{sx:{fontSize:16,fontWeight:600,color:"#37352f"},children:W.name}),(()=>{let X=rT(W,b,l);return Cn(or,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:.5,fontSize:15,color:"#6f6f6c"},children:[Xe(or,{component:"span",children:X.left}),Xe(JS,{sx:{fontSize:18,color:"#9a9a97",flexShrink:0}}),Xe(or,{component:"span",children:X.right})]})})()]}),Xe(Of,{size:"small","aria-label":`${W.name} \uADDC\uCE59 \uC218\uC815`,onClick:()=>{u(W.seq),m({name:W.name,trigger:W.trigger,enabled:W.enabled,sort_no:W.sort_no,condition:{...W.condition,...W.trigger==="field_changed"&&W.condition.changed_field===void 0?{changed_field:ga[0]?.value??""}:{}},action:{...W.action}}),h(!0)},children:Xe(tT,{sx:{fontSize:18}})}),Xe(Of,{size:"small","aria-label":`${W.name} \uADDC\uCE59 \uC0AD\uC81C`,onClick:()=>i(W.seq),children:Xe(dr,{sx:{fontSize:18}})})]},W.seq))]})}],actions:{showCancelButton:!1,left:Xe(Fn,{startIcon:Xe(Af,{}),onClick:()=>{u(0),m(ac()),h(!0)},sx:{color:"#2563eb"},children:"\uC0C8 \uADDC\uCE59"}),right:Xe(Fn,{variant:"contained",onClick:r,children:"\uB2EB\uAE30"})}}),Xe(N0,{open:a,onClose:j,maxWidth:"sm",title:N?"\uADDC\uCE59 \uC218\uC815":"\uC0C8 \uADDC\uCE59",locale:"ko",backdropClick:!1,titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-rule-form",tabs:{visible:!1},sectionContentPaddingTop:0,sections:[{id:"rule-form",title:"",showTitle:!1,children:K()}],actions:{showCancelButton:!0,right:Xe(Fn,{variant:"contained",onClick:()=>{U()},disabled:v,children:N?"\uC218\uC815":"\uADDC\uCE59 \uCD94\uAC00"})}})]})}import{useEffect as F0,useRef as Pf,useState as hs}from"react";import{Box as Jt,Button as ps,IconButton as ba,Tooltip as ya}from"@mui/material";import q0 from"@mui/icons-material/Add";import iT from"@mui/icons-material/EditOutlined";import sT from"@mui/icons-material/ContentCopyOutlined";import aT from"@mui/icons-material/DragIndicator";import lT from"@mui/icons-material/Close";import cT from"@mui/icons-material/PlaylistAddCheckOutlined";import{DndContext as uT,PointerSensor as fT,closestCenter as dT,useSensor as hT,useSensors as pT}from"@dnd-kit/core";import{restrictToParentElement as mT,restrictToVerticalAxis as gT}from"@dnd-kit/modifiers";import{SortableContext as bT,arrayMove as $0,useSortable as yT,verticalListSortingStrategy as xT}from"@dnd-kit/sortable";import{CSS as vT}from"@dnd-kit/utilities";import{FormDialog as H0}from"@ehfuse/mui-form-dialog";import{ClearTextField as Nf,LabelSelect as W0,NumberField as U0}from"@ehfuse/mui-form-controls";import wT from"@ehfuse/overlay-scrollbar";import{ConfirmDialog as _T,ErrorAlert as V0}from"@ehfuse/alerts";import{Fragment as BT,jsx as st,jsxs as Bn}from"react/jsx-runtime";var kT=[{value:"high",label:"\uB192\uC74C"},{value:"medium",label:"\uC911\uAC04"},{value:"low",label:"\uB0AE\uC74C"}],K0="\uC5C5\uBB34 \uC81C\uBAA9",Lf=2,uc={flex:1,minWidth:0},G0=56,Y0=20,ST=`${Y0+Lf*8}px`;function fc(){return{name:"",description:"",group_seq:0,items:[]}}function TT(){return{title:"",start_offset_days:0,due_offset_days:0,priority:"medium"}}function CT({id:e,children:d}){let{attributes:b,listeners:l,setNodeRef:o,transform:s,transition:r,isDragging:t}=yT({id:e});return st(Jt,{ref:o,sx:{transform:vT.Transform.toString(s),transition:r,...t?{opacity:.6,position:"relative",zIndex:1}:{}},children:d({handleProps:{...b,...l},dragging:t})})}function VK({open:e,templates:d,customTabs:b,onPickAccount:l,onClose:o,onCreate:s,onUpdate:r,onRemove:t,onRun:n}){let[c,i]=hs(!1),[a,h]=hs(0),[f,u]=hs(fc()),[g,m]=hs(!1),[v,k]=hs([]),B=Pf(0),[R,L]=hs(0),A=Pf(null),P=Pf(null);F0(()=>{if(e)return;let z=window.setTimeout(()=>{i(!1),h(0),u(fc()),k([])},500);return()=>window.clearTimeout(z)},[e]);let N=()=>(B.current+=1,`template-item-${B.current}`),q=(z,$)=>{h(z),u($),k($.items.map(()=>N())),i(!0)},j=f.items.map((z,$)=>v[$]??`template-item-fallback-${$}`),S=()=>{let z=P.current?.getScrollContainer()??null;if(z){z.scrollTop=z.scrollHeight;return}let $=A.current?.querySelectorAll("*")??[];for(let V of Array.from($))if(V.scrollHeight>V.clientHeight+1){V.scrollTop=V.scrollHeight;return}},T=()=>{let z=A.current;if(!z)return null;let $=z.querySelectorAll("input[data-template-title]"),V=$.length?$:z.querySelectorAll(`input[placeholder="${K0}"]`);return V.length?V[V.length-1]:null};F0(()=>{if(R===0)return;let z=0,$=0,V=()=>{S();let H=T();H&&document.activeElement!==H&&H.focus(),z+=1,!(H&&document.activeElement===H)&&z<8&&($=window.setTimeout(V,50))},M=window.requestAnimationFrame(V);return()=>{window.cancelAnimationFrame(M),window.clearTimeout($)}},[R]);let D=b.filter(z=>!z.archived).map(z=>({value:String(Qo(z.key)),label:z.label})),p=(z,$)=>{u(V=>({...V,items:V.items.map((M,H)=>H===z?{...M,...$}:M)}))},y=pT(hT(fT,{activationConstraint:{distance:5}})),x=z=>{let $=String(z.active?.id??""),V=String(z.over?.id??"");if(!$||!V||$===V)return;let M=j.indexOf($),H=j.indexOf(V);M<0||H<0||(u(I=>({...I,items:$0(I.items,M,H)})),k(I=>$0(I,M,H)))},w=async z=>{if(!l)return;let $=await l(f.items[z]?.manager_account_seq??0,"\uCC45\uC784\uC790");$&&p(z,{manager_account_seq:$.accountSeq,manager_name:$.name})},_=async()=>{let z=f.name.trim();if(!z){V0({message:"\uD15C\uD50C\uB9BF \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694."});return}let $=f.items.filter(H=>H.title.trim().length>0);if($.length===0){V0({message:"\uC5C5\uBB34 \uD56D\uBAA9\uC744 \uD55C \uC904 \uC774\uC0C1 \uB123\uC73C\uC138\uC694."});return}m(!0);let V={...f,name:z,items:$},M=a>0?await r(a,V):await s(V);m(!1),M&&(i(!1),h(0),u(fc()))},C=st(Jt,{children:d.length===0?Bn(Jt,{sx:{py:4,display:"flex",flexDirection:"column",alignItems:"center",gap:2,color:"#9a9a97"},children:[st(cT,{sx:{fontSize:48,color:"#d9d9d6"}}),st(Jt,{sx:{fontSize:13.5},children:"\uB4F1\uB85D\uB41C \uD15C\uD50C\uB9BF\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."})]}):d.map(z=>Bn(Jt,{sx:{display:"flex",alignItems:"center",gap:2.5,py:1.75,"&:not(:last-of-type)::after":{content:'""',display:"block",my:1.75,borderBottom:"1px solid #f0efed"}},children:[Bn(Jt,{sx:{flex:1,minWidth:0},children:[st(Jt,{sx:{fontSize:18,fontWeight:600,color:"#37352f"},children:z.name}),Bn(Jt,{sx:{fontSize:14,color:"#787774",mt:.25},children:["\uC5C5\uBB34 ",z.items.length,"\uAC74",z.description?` \xB7 ${z.description}`:""]})]}),n?st(ps,{size:"medium",variant:"outlined",onClick:()=>n(z),sx:{flexShrink:0},children:"\uC2E4\uD589"}):null,st(ya,{title:"\uC218\uC815",arrow:!0,disableInteractive:!0,children:st(ba,{size:"medium","aria-label":`${z.name} \uD15C\uD50C\uB9BF \uC218\uC815`,onClick:()=>q(z.seq,{name:z.name,description:z.description??"",group_seq:z.group_seq??0,items:z.items.map($=>({...$}))}),children:st(iT,{sx:{fontSize:19}})})}),st(ya,{title:"\uBCF5\uC81C",arrow:!0,disableInteractive:!0,children:st(ba,{size:"medium","aria-label":`${z.name} \uD15C\uD50C\uB9BF \uBCF5\uC81C`,onClick:()=>q(0,{name:`${z.name} \uC0AC\uBCF8`,description:z.description??"",group_seq:z.group_seq??0,items:z.items.map($=>({...$}))}),children:st(sT,{sx:{fontSize:18}})})}),st(ya,{title:"\uC0AD\uC81C",arrow:!0,disableInteractive:!0,children:st(ba,{size:"medium","aria-label":`${z.name} \uD15C\uD50C\uB9BF \uC0AD\uC81C`,onClick:()=>{(async()=>await _T({title:"\uD15C\uD50C\uB9BF \uC0AD\uC81C",message:`"${z.name}" \uD15C\uD50C\uB9BF\uC744 \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&t(z.seq))()},children:st(dr,{sx:{fontSize:18}})})})]},z.seq))}),O=Bn(Jt,{sx:{display:"flex",flexDirection:"column",gap:3},children:[st(Nf,{size:"medium",label:"\uD15C\uD50C\uB9BF \uC774\uB984",placeholder:"\uC608: \uC2E0\uADDC \uC785\uC0AC\uC790 \uC628\uBCF4\uB529",fullWidth:!0,value:f.name,onChange:z=>u($=>({...$,name:z.target.value}))}),Bn(Jt,{sx:{display:"grid",gridTemplateColumns:D.length>0?"1fr 1fr":"1fr",gap:2},children:[st(Nf,{size:"medium",label:"\uC124\uBA85",placeholder:"\uBAA9\uB85D\uC5D0\uC11C \uBB34\uC5C7\uC778\uC9C0 \uC54C\uC544\uBCFC \uD55C \uC904(\uC120\uD0DD)",fullWidth:!0,value:f.description??"",onChange:z=>u($=>({...$,description:z.target.value}))}),D.length>0?st(W0,{size:"medium",fullWidth:!0,label:"\uB9CC\uB4E4 \uACF3(\uD504\uB85C\uC81D\uD2B8)",value:String(f.group_seq??0),options:[{value:"0",label:"\uAE30\uBCF8 \uC5C5\uBB34\uD568"},...D],onChange:z=>u($=>({...$,group_seq:Number(z.target.value)||0}))}):null]}),Bn(Jt,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[st(Jt,{sx:{fontSize:18,fontWeight:600,color:"#37352f"},children:"\uC5C5\uBB34 \uD56D\uBAA9"}),st(Jt,{sx:{fontSize:14,color:"#37352f"},children:"\uB0A0\uC9DC\uB294 \uC2E4\uD589\uD560 \uB54C \uACE0\uB974\uB294 \uAE30\uC900\uC77C\uC5D0\uC11C \uACC4\uC0B0\uB429\uB2C8\uB2E4."})]}),f.items.length===0?st(Jt,{sx:{fontSize:14,color:"#9a9a97",py:2},children:'\uC544\uC9C1 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4. "\uD56D\uBAA9 \uCD94\uAC00" \uB85C \uC808\uCC28\uB97C \uC21C\uC11C\uB300\uB85C \uC801\uC73C\uC138\uC694.'}):st(Jt,{ref:A,sx:{border:"1px solid #e6e6e3",borderRadius:1,overflow:"hidden"},children:st(wT,{ref:P,style:{maxHeight:"min(560px, 52vh)"},thumb:{width:6},children:st(uT,{sensors:y,collisionDetection:dT,modifiers:[gT,mT],onDragEnd:x,children:st(bT,{items:j,strategy:xT,children:f.items.map((z,$)=>st(CT,{id:j[$],children:({handleProps:V})=>Bn(Jt,{sx:{borderBottom:$===f.items.length-1?"none":"1px solid #f2f2f0",px:Lf,py:2,gap:2,display:"flex",flexDirection:"column"},children:[Bn(Jt,{sx:{display:"flex",alignItems:"center",gap:Lf},children:[st(Jt,{...V,"aria-label":`${$+1}\uBC88 \uD56D\uBAA9 \uC21C\uC11C \uC774\uB3D9`,sx:{display:"inline-flex",alignItems:"center",flexShrink:0,color:"#c9c8c5",cursor:"grab","&:active":{cursor:"grabbing"},touchAction:"none",userSelect:"none"},children:st(aT,{sx:{fontSize:Y0}})}),st(Nf,{size:"medium",fullWidth:!0,placeholder:K0,slotProps:{htmlInput:{"data-template-title":$}},value:z.title,onChange:M=>p($,{title:M.target.value})})]}),Bn(Jt,{sx:{display:"flex",alignItems:"center",gap:2,pl:ST},children:[st(Jt,{sx:uc,children:st(U0,{size:"medium",fullWidth:!0,label:"\uC2DC\uC791 D+",thousandSeparator:!1,align:"right",suffix:"\uC77C",value:z.start_offset_days??null,onValueChange:M=>p($,{start_offset_days:M===null?void 0:Math.trunc(Number(M))})})}),st(Jt,{sx:uc,children:st(U0,{size:"medium",fullWidth:!0,label:"\uB9C8\uAC10 D+",thousandSeparator:!1,align:"right",suffix:"\uC77C",value:z.due_offset_days??null,onValueChange:M=>p($,{due_offset_days:M===null?void 0:Math.trunc(Number(M))})})}),st(Jt,{sx:uc,children:st(W0,{size:"medium",fullWidth:!0,label:"\uC911\uC694\uB3C4",value:z.priority??"medium",options:kT,onChange:M=>p($,{priority:M.target.value})})}),l?Bn(Jt,{sx:{...uc,position:"relative"},children:[st(ps,{variant:"outlined",fullWidth:!0,onClick:()=>{w($)},sx:{height:G0,display:"block",textAlign:"left",textTransform:"none",fontSize:16,fontWeight:400,lineHeight:`${G0-2}px`,py:0,px:1.75,pr:z.manager_account_seq?4.5:1.75,borderColor:"#c4c4c4",color:z.manager_name?"#37352f":"#9a9a97",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap","&:hover":{borderColor:"#37352f",bgcolor:"transparent"}},children:z.manager_name||"\uCC45\uC784\uC790"}),z.manager_account_seq?st(ya,{title:"\uCC45\uC784\uC790 \uBE44\uC6B0\uAE30",arrow:!0,disableInteractive:!0,children:st(ba,{size:"small","aria-label":`${$+1}\uBC88 \uD56D\uBAA9 \uCC45\uC784\uC790 \uBE44\uC6B0\uAE30`,onClick:M=>{M.stopPropagation(),p($,{manager_account_seq:0,manager_name:""})},sx:{position:"absolute",right:6,top:"50%",transform:"translateY(-50%)"},children:st(lT,{sx:{fontSize:18}})})}):null]}):null,st(ya,{title:"\uD56D\uBAA9 \uC0AD\uC81C",arrow:!0,disableInteractive:!0,children:st(ba,{size:"medium","aria-label":`${$+1}\uBC88 \uD56D\uBAA9 \uC0AD\uC81C`,onClick:()=>{u(M=>({...M,items:M.items.filter((H,I)=>I!==$)})),k(M=>M.filter((H,I)=>I!==$))},children:st(dr,{sx:{fontSize:18}})})})]})]})},j[$]))})})})})]});return Bn(BT,{children:[st(H0,{open:e,onClose:o,maxWidth:"md",title:"\uC5C5\uBB34 \uD15C\uD50C\uB9BF",locale:"ko",titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-task-template",tabs:{visible:!1},actions:{showCancelButton:!1,left:st(ps,{startIcon:st(q0,{sx:{fontSize:18}}),onClick:()=>q(0,fc()),children:"\uC0C8 \uD15C\uD50C\uB9BF"}),right:st(ps,{variant:"contained",onClick:o,children:"\uB2EB\uAE30"})},sectionContentPaddingTop:0,sections:[{id:"templates",title:"",showTitle:!1,children:C}]}),st(H0,{open:c,onClose:()=>i(!1),maxWidth:"md",title:a>0?"\uD15C\uD50C\uB9BF \uC218\uC815":"\uC0C8 \uD15C\uD50C\uB9BF",locale:"ko",backdropClick:!1,fontScale:{enabled:!0},fontScaleKey:"taskbox-task-template-form",titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},tabs:{visible:!1},actions:{showCancelButton:!0,left:st(ps,{startIcon:st(q0,{sx:{fontSize:18}}),onClick:()=>{u(z=>({...z,items:[...z.items,TT()]})),k(z=>[...z,N()]),L(z=>z+1)},children:"\uD56D\uBAA9 \uCD94\uAC00"}),right:st(ps,{variant:"contained",disabled:g,onClick:()=>{_()},children:"\uC800\uC7A5"})},sectionContentPaddingTop:0,sections:[{id:"template-form",title:"",showTitle:!1,children:O}]})]})}import{useEffect as X0,useState as Z0}from"react";import{Box as Lr,Button as IT}from"@mui/material";import{FormDialog as ET}from"@ehfuse/mui-form-dialog";import{DateTextField as MT}from"@ehfuse/mui-form-controls";import RT from"@ehfuse/overlay-scrollbar";import{jsx as Xr,jsxs as xa}from"react/jsx-runtime";function rG({open:e,template:d,todayStr:b,running:l=!1,onClose:o,onRun:s}){let[r,t]=Z0(b),[n,c]=Z0(d);X0(()=>{d&&c(d)},[d]),X0(()=>{e&&t(b)},[e]);let i=d??n,a=i?ep(i,r):[];return Xr(ET,{open:e,onClose:o,maxWidth:"md",title:i?`${i.name} \uC2E4\uD589`:"\uD15C\uD50C\uB9BF \uC2E4\uD589",locale:"ko",backdropClick:!1,titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-template-run",tabs:{visible:!1},sectionContentPaddingTop:0,actions:{showCancelButton:!0,right:Xr(IT,{variant:"contained",disabled:l||a.length===0,onClick:()=>s(a,r),children:l?"\uB9CC\uB4DC\uB294 \uC911\u2026":`\uC5C5\uBB34 ${a.length}\uAC74 \uB9CC\uB4E4\uAE30`})},sections:[{id:"template-run",title:"",showTitle:!1,children:xa(Lr,{sx:{display:"flex",flexDirection:"column",gap:2},children:[xa(Lr,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[Xr(Lr,{sx:{width:72,flexShrink:0,fontSize:16,color:"#37352f"},children:"\uAE30\uC900\uC77C"}),Xr(MT,{size:"medium",fullWidth:!0,value:r,onChange:h=>t(h.target.value)})]}),Xr(Lr,{sx:{fontSize:14.5,color:"#37352f"},children:"\uC544\uB798 \uC5C5\uBB34\uAC00 \uD55C\uAEBC\uBC88\uC5D0 \uB9CC\uB4E4\uC5B4\uC9D1\uB2C8\uB2E4. \uB0A0\uC9DC\uB294 \uAE30\uC900\uC77C\uC5D0\uC11C \uACC4\uC0B0\uB41C \uAC12\uC785\uB2C8\uB2E4."}),xa(Lr,{sx:{border:"1px solid #e6e6e3",borderRadius:1,overflow:"hidden"},children:[xa(Lr,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1,bgcolor:"#fafaf9",borderBottom:"1px solid #e6e6e3",fontSize:13.5,fontWeight:600,color:"#37352f"},children:[Xr(Lr,{sx:{flex:1,minWidth:0},children:"\uC5C5\uBB34"}),Xr(Lr,{sx:{width:88,flexShrink:0,textAlign:"center"},children:"\uC2DC\uC791"}),Xr(Lr,{sx:{width:88,flexShrink:0,textAlign:"center"},children:"\uB9C8\uAC10"}),Xr(Lr,{sx:{width:96,flexShrink:0,textAlign:"center"},children:"\uCC45\uC784\uC790"})]}),Xr(RT,{style:{maxHeight:520},thumb:{width:6},children:a.length===0?Xr(Lr,{sx:{p:2,fontSize:14,color:"#9a9a97"},children:"\uB9CC\uB4E4 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):a.map((h,f)=>xa(Lr,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1.25,borderBottom:f===a.length-1?"none":"1px solid #f2f2f0",fontSize:16,fontWeight:500,color:"#111111"},children:[Xr(Lr,{sx:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:h.title}),Xr(Lr,{sx:{width:88,flexShrink:0,textAlign:"center",fontSize:13.5,color:h.start_date?"#37352f":"#9a9a97"},children:Lc(h.start_date)||"-"}),Xr(Lr,{sx:{width:88,flexShrink:0,textAlign:"center",fontSize:13.5,color:h.due_date?"#37352f":"#9a9a97"},children:Lc(h.due_date)||"-"}),Xr(Lr,{sx:{width:96,flexShrink:0,textAlign:"center",fontSize:13.5,color:h.manager_name?"#37352f":"#9a9a97",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:h.manager_name||"-"})]},f))})]})]})}]})}var OT={urgent:"\uAE34\uAE09",high:"\uB192\uC74C",normal:"\uC911\uAC04",low:"\uB0AE\uC74C"};function AT(e){return e.length===0?"":e.length<=2?e.join(", "):`${e[0]} \uC678 ${e.length-1}\uBA85`}function zf(e){let d=String(e??"").trim().slice(0,10);return/^\d{4}-\d{2}-\d{2}$/.test(d)?`${d.slice(2,4)}.${d.slice(5,7)}.${d.slice(8,10)}`:"-"}function ms(e){let d=b=>String(b).padStart(2,"0");return`${e.getFullYear()}-${d(e.getMonth()+1)}-${d(e.getDate())} ${d(e.getHours())}:${d(e.getMinutes())}`}function jf(e,d){let l=String(e.due_date??"").slice(11,16).trim()||String(e.estimated_time??"").trim(),o=zf(e.due_date),s=String(e.start_date??"").slice(11,16).trim(),r=zf(e.start_date),t=(e.receiver_names??[]).filter(Boolean).map(c=>String(c).trim()),n=(e.checklist??[]).length?`${(e.checklist??[]).filter(c=>c.checked).length}/${(e.checklist??[]).length}`:"";return{seq:Number(e.seq??0),title:String(e.title??"").trim(),statusName:ur(e).name,projectLabel:e.tab_key?d.get(String(e.tab_key))??"":"",managerName:String(e.manager_name??"").trim(),receiverNames:AT(t),receiverNamesFull:t.join(", "),startDate:r!=="-"&&s?`${r} ${s}`:r,dueDate:o!=="-"&&l?`${o} ${l}`:o,priorityName:OT[String(e.priority??"")]??"",checklist:n,note:String(e.note??"").trim(),completed:!!e.completed}}function Pt(e){return String(e??"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function DT(e,d){if(e===" ")return d*.3;let b=e.codePointAt(0)??0,l=b>=4352&&b<=4607||b>=12288&&b<=40959||b>=44032&&b<=55203||b>=63744&&b<=64255||b>=65280&&b<=65519;return d*(l?1:.55)}function dc(e,d){let b=0;for(let l of String(e??""))b+=DT(l,d);return b}function gs(e,d){let b=String(e??"").trim();if(!b)return["-"];let l=[],o="";for(let s of b){if(s===`
44
- `){o&&l.push(o),o="";continue}let r=`${o}${s}`;if(r.length>d&&o){l.push(o),o=s;continue}o=r}return o&&l.push(o),l.length>0?l:["-"]}function Ci(e,d,b){let l=String(e??"").replace(/\s+/g," ").trim();if(!l)return"";if(dc(l,b)<=d)return l;let o=dc("\u2026",b),s="",r=0;for(let t of l){let n=dc(t,b);if(r+n+o>d)break;s+=t,r+=n}return`${s}\u2026`}var wa=595.28,_a=841.89,ka=841.89,Sa=595.28,zr=28,In=96,gn=44,PT="'Malgun Gothic','\uB9D1\uC740 \uACE0\uB515','Apple SD Gothic Neo','Noto Sans KR',sans-serif",NT="'Batang','\uBC14\uD0D5','AppleMyungjo','Noto Serif KR',serif",va="#cbd5e1",LT=[`text { font-family: ${PT}; fill: #000000; }`,`.doc-title { font-family: ${NT}; font-size: 20px; font-weight: 700; }`,".doc-sub { font-size: 10.5px; fill: #333333; }",".doc-meta { font-size: 9.5px; fill: #333333; }",".th { font-size: 9.5px; font-weight: 700; fill: #000000; }",".td { font-size: 9px; }",".td.done { fill: #555555; }",".gt { font-size: 10px; font-weight: 700; fill: #000000; }",".label { font-size: 9px; fill: #333333; }",".value { font-size: 10px; }",".section { font-size: 11.5px; font-weight: 700; fill: #000000; }",".pageno { font-size: 9px; fill: #333333; }",`.head { fill: #eef2f7; stroke: ${va}; stroke-width: 0.5; }`,`.group { fill: #f8fafc; stroke: ${va}; stroke-width: 0.5; }`,`.frame { fill: none; stroke: ${va}; stroke-width: 0.5; }`,`.hline { stroke: ${va}; stroke-width: 0.5; }`,`.vline { stroke: ${va}; stroke-width: 0.5; }`,".bar { fill: #bfdbfe; stroke: #60a5fa; stroke-width: 0.6; }",".bar.done { fill: #e5e7eb; stroke: #cbd5e1; }",".bar.overdue { fill: #fecaca; stroke: #f87171; }"].join("");function No(e,d,b){let l=b-zr;return[`<text x="${zr}" y="46" class="doc-title">${Pt(e.documentTitle)}</text>`,`<text x="${zr}" y="66" class="doc-sub">${Pt(e.subtitle)}</text>`,`<text x="${l}" y="42" class="doc-meta" text-anchor="end">${Pt(e.facilityName)}</text>`,`<text x="${l}" y="58" class="doc-meta" text-anchor="end">\uCD9C\uB825 ${Pt(ms(e.printedAt))}${e.printedBy?` \xB7 ${Pt(e.printedBy)}`:""}</text>`,d?`<text x="${l}" y="74" class="doc-meta" text-anchor="end">${Pt(d)}</text>`:""].join("")}function Lo(e){let{width:d,height:b,body:l,pageIndex:o,pageCount:s}=e;return[`<svg xmlns="http://www.w3.org/2000/svg" width="${d}" height="${b}" viewBox="0 0 ${d} ${b}">`,`<style>${LT}</style>`,`<rect x="0" y="0" width="${d}" height="${b}" fill="#ffffff" />`,l,`<text x="${d/2}" y="${b-22}" class="pageno" text-anchor="middle">${o+1} / ${s}</text>`,"</svg>"].join("")}var qf=ka,Q0=Sa,zo=zr,Ta=qf-zr,Ba=22,Bi=20,Ii=22,Ca=5,eg=In,tg=gn,J0=Q0-46,Ia=[{key:"title",label:"\uC81C\uBAA9",width:250,align:"start"},{key:"status",label:"\uC0C1\uD0DC",width:56,align:"middle"},{key:"start",label:"\uC2DC\uC791",width:86,align:"middle"},{key:"due",label:"\uB9C8\uAC10",width:86,align:"middle"},{key:"manager",label:"\uCC45\uC784\uC790",width:62,align:"middle"},{key:"receivers",label:"\uCC38\uC870\uC790",width:122,align:"start"},{key:"priority",label:"\uC911\uC694\uB3C4",width:52,align:"middle"},{key:"project",label:"\uD504\uB85C\uC81D\uD2B8",width:72,align:"middle"}],Ff=Ia.reduce((e,d,b)=>(e.push(b===0?zo:e[b-1]+Ia[b-1].width),e),[]);function zT(e){let d=[],b=[],l=eg+Ba,o=(s,r)=>{d.push(b),b=[],l=tg+Ba,s&&(b.push({kind:"group",label:s,count:r,continued:!0}),l+=Ii)};for(let s of e){s.label&&(l+Ii+Bi>J0&&o("",0),b.push({kind:"group",label:s.label,count:s.rows.length,continued:!1}),l+=Ii);for(let r of s.rows)l+Bi>J0&&o(s.label,s.rows.length),b.push({kind:"row",completed:r.completed,values:Ia.map(t=>{switch(t.key){case"title":return r.title;case"status":return r.statusName;case"project":return r.projectLabel||"\uAE30\uBCF8";case"manager":return r.managerName||"-";case"receivers":return r.receiverNames||"-";case"start":return r.startDate;case"due":return r.dueDate;default:return r.priorityName||"-"}})}),l+=Bi}return d.push(b),d.filter((s,r)=>r===0||s.length>0)}function jT(e,d){let b=[];b.push(`<rect x="${zo}" y="${d}" width="${Ta-zo}" height="${Ba}" class="head" />`),Ia.forEach((o,s)=>{let r=Ff[s],t=o.align==="middle"?r+o.width/2:r+Ca;b.push(`<text x="${t}" y="${d+Ba-7}" class="th" text-anchor="${o.align}">${Pt(o.label)}</text>`)});let l=d+Ba;for(let o of e){if(o.kind==="group"){b.push(`<rect x="${zo}" y="${l}" width="${Ta-zo}" height="${Ii}" class="group" />`,`<text x="${zo+Ca}" y="${l+Ii-7}" class="gt">${Pt(o.continued?`${o.label} (\uC774\uC5B4\uC11C)`:o.label)}</text>`,`<text x="${Ta-Ca}" y="${l+Ii-7}" class="gt" text-anchor="end">${o.count}\uAC74</text>`),l+=Ii;continue}Ia.forEach((s,r)=>{let t=Ff[r],n=s.align==="middle"?t+s.width/2:t+Ca;b.push(`<text x="${n}" y="${l+Bi-6}" class="${o.completed?"td done":"td"}" text-anchor="${s.align}">${Pt(Ci(o.values[r]??"",s.width-Ca*2,9))}</text>`)}),b.push(`<line x1="${zo}" y1="${l+Bi}" x2="${Ta}" y2="${l+Bi}" class="hline" />`),l+=Bi}return Ff.slice(1).forEach(o=>{b.push(`<line x1="${o}" y1="${d}" x2="${o}" y2="${l}" class="vline" />`)}),b.push(`<rect x="${zo}" y="${d}" width="${Ta-zo}" height="${l-d}" class="frame" />`),b.join("")}async function FT(e,d){let b=zT(d),l=d.reduce((o,s)=>o+s.rows.length,0);return b.map((o,s)=>{let r=s===0?eg:tg,t=[s===0?No(e,`\uC804\uCCB4 ${l}\uAC74`,qf):"",jT(o,r)].join("");return Lo({width:qf,height:Q0,body:t,pageIndex:s,pageCount:b.length})})}var Hf=wa,rg=_a,co=zr,hc=Hf-zr,qT=rg-46,ng=22,$T=68,HT=(hc-co)/2,WT=14,$f=58;function bs(e){switch(e.kind){case"title":return 34;case"props":return Math.ceil(e.pairs.length/2)*ng+10;case"section":return 26;default:return WT}}function UT(e){let d=[{kind:"title",text:e.title,ticket:e.ticketNo}];return d.push({kind:"props",pairs:e.properties}),d.push({kind:"section",text:"\uB0B4\uC6A9"}),(e.content.trim()?e.content.split(`
45
- `).flatMap(l=>l.trim()?gs(l,$f):[""]):["(\uB0B4\uC6A9 \uC5C6\uC74C)"]).forEach(l=>d.push({kind:"line",text:l,muted:!e.content.trim()})),e.checklist.length>0&&(d.push({kind:"section",text:`\uD560\uC77C (${e.checklist.filter(l=>l.checked).length}/${e.checklist.length})`}),e.checklist.forEach(l=>{gs(l.label,$f-3).forEach((o,s)=>d.push({kind:s===0?"check":"line",text:o,checked:l.checked}))})),e.includeComments&&e.comments.length>0&&(d.push({kind:"section",text:`\uB313\uAE00 (${e.comments.length})`}),e.comments.forEach(l=>{d.push({kind:"line",text:`${l.author} \xB7 ${l.time}`,muted:!0}),gs(l.text,$f).forEach(o=>d.push({kind:"line",text:o}))})),d}function VT(e){let d=[],b=[],l=In;for(let o of e){let s=bs(o);l+s>qT&&(d.push(b),b=[],l=gn),b.push(o),l+=s}return d.push(b),d}function KT(e,d){switch(e.kind){case"title":{let b=e.ticket?`<text x="${hc}" y="${d+16}" class="doc-meta" text-anchor="end">${Pt(e.ticket)}</text>`:"";return{markup:`<text x="${co}" y="${d+16}" class="section" style="font-size:14px">${Pt(e.text)}</text>${b}<line x1="${co}" y1="${d+24}" x2="${hc}" y2="${d+24}" class="hline" />`,nextY:d+bs(e)}}case"props":{let b=[];return e.pairs.forEach((l,o)=>{let s=o%2,r=Math.floor(o/2),t=co+s*HT,n=d+r*ng;b.push(`<text x="${t}" y="${n+14}" class="label">${Pt(l.label)}</text>`,`<text x="${t+$T}" y="${n+14}" class="value">${Pt(gs(l.value||"-",26)[0]??"-")}</text>`)}),{markup:b.join(""),nextY:d+bs(e)}}case"section":return{markup:`<text x="${co}" y="${d+16}" class="section">${Pt(e.text)}</text><line x1="${co}" y1="${d+21}" x2="${hc}" y2="${d+21}" class="hline" />`,nextY:d+bs(e)};case"check":return{markup:`<text x="${co}" y="${d+10}" class="td">${e.checked?"\u2611":"\u2610"}</text><text x="${co+14}" y="${d+10}" class="${e.checked?"td done":"td"}">${Pt(e.text)}</text>`,nextY:d+bs(e)};default:return{markup:`<text x="${co}" y="${d+10}" class="${e.muted?"td done":"td"}">${Pt(e.text)}</text>`,nextY:d+bs(e)}}}async function GT(e,d){let b=VT(UT(d));return b.map((l,o)=>{let s=o===0?In:gn,r=[o===0?No(e,"",Hf):`<text x="${co}" y="${gn-12}" class="doc-meta">${Pt(`${d.title} (\uC774\uC5B4\uC11C)`)}</text>`];for(let t of l){let n=KT(t,s);r.push(n.markup),s=n.nextY}return Lo({width:Hf,height:rg,body:r.join(""),pageIndex:o,pageCount:b.length})})}var Uf=ka,sg=Sa,pc=zr,Ea=Uf-zr,og=sg-46,ig=210,ii=20,Wf=24;function si(e){if(!/^\d{4}-\d{2}-\d{2}$/.test(e))return null;let d=new Date(`${e}T00:00:00`);return Number.isNaN(d.getTime())?null:d}function ag(e,d){return Math.round((d.getTime()-e.getTime())/864e5)}function YT(e,d){let b=[];e.forEach(r=>{let t=si(r.startDate),n=si(r.dueDate);t&&b.push(t),n&&b.push(n)});let l=si(d)??new Date;if(b.length===0)return{start:l,days:30};let o=new Date(Math.min(...b.map(r=>r.getTime()))),s=new Date(Math.max(...b.map(r=>r.getTime())));return o.setDate(o.getDate()-1),s.setDate(s.getDate()+1),{start:o,days:Math.max(7,ag(o,s)+1)}}async function XT(e,d,b){let l=YT(d,b),o=pc+ig,r=(Ea-o)/l.days,t=si(b),n=f=>o+ag(l.start,f)*r,c=Math.max(1,Math.floor((og-In-Wf)/ii)),i=Math.max(1,Math.floor((og-gn-Wf)/ii)),a=[],h=0;for(;h<d.length||a.length===0;){let f=a.length===0?c:i;if(a.push(d.slice(h,h+f)),h+=f,h>=d.length)break}return a.map((f,u)=>{let g=u===0?In:gn,m=[u===0?No(e,`\uC804\uCCB4 ${d.length}\uAC74`,Uf):""],v=g+Wf;m.push(`<line x1="${pc}" y1="${v}" x2="${Ea}" y2="${v}" class="vline" />`);for(let k=0;k<l.days;k+=1){let B=new Date(l.start);if(B.setDate(B.getDate()+k),B.getDay()!==0&&k!==0)continue;let R=o+k*r;m.push(`<line x1="${R}" y1="${v}" x2="${R}" y2="${v+f.length*ii}" class="hline" />`,`<text x="${R+2}" y="${v-6}" class="label">${B.getMonth()+1}.${B.getDate()}</text>`)}if(t&&t>=l.start){let k=n(t);k>=o&&k<=Ea&&m.push(`<line x1="${k}" y1="${v}" x2="${k}" y2="${v+f.length*ii}" stroke="#f87171" stroke-width="0.8" />`)}return f.forEach((k,B)=>{let R=v+B*ii,L=Ci(k.title,ig-64,9);m.push(`<text x="${pc}" y="${R+14}" class="${k.completed?"td done":"td"}">${Pt(L)}</text>`,`<text x="${o-6}" y="${R+14}" class="label" text-anchor="end">${Pt(k.managerName)}</text>`,`<line x1="${pc}" y1="${R+ii}" x2="${Ea}" y2="${R+ii}" class="hline" />`);let A=si(k.startDate)??si(k.dueDate),P=si(k.dueDate)??si(k.startDate);if(!A||!P)return;let N=n(A),q=Math.max(N+r*.8,n(P)+r*.8),j=k.completed?"bar done":k.overdue?"bar overdue":"bar";m.push(`<rect x="${N}" y="${R+5}" width="${Math.max(3,Math.min(q,Ea)-N)}" height="${ii-10}" rx="2" class="${j}" />`)}),Lo({width:Uf,height:sg,body:m.join(""),pageIndex:u,pageCount:a.length})})}function ZT(e,d,b,l){return{title:e.title,managerName:e.managerName,startDate:String(d??"").slice(0,10),dueDate:String(b??"").slice(0,10),completed:e.completed,overdue:!e.completed&&!!b&&String(b).slice(0,10)<l}}var Vf=wa,cg=_a,ys=zr,mc=Vf-zr,lg=cg-46,xs=30,vs=18,ug=12;function JT(e){let d=[],b=[],l=In,o=(s,r)=>{d.push(b),b=[],l=gn,s&&(b.push({kind:"column",label:s,summary:r,continued:!0,gapBefore:!1}),l+=xs)};for(let s of e){let r=b.length>0,t=r?ug:0;if(l+t+xs+vs>lg?(o("",""),b.push({kind:"column",label:s.label,summary:s.summary,continued:!1,gapBefore:!1}),l+=xs):(b.push({kind:"column",label:s.label,summary:s.summary,continued:!1,gapBefore:r}),l+=t+xs),s.items.length===0){b.push({kind:"empty"}),l+=vs;continue}for(let n of s.items)l+vs>lg&&o(s.label,s.summary),b.push({kind:"item",title:n.title,meta:n.meta,completed:n.completed}),l+=vs}return d.push(b),d}async function QT(e,d,b){let l=JT(d);return l.map((o,s)=>{let r=s===0?In:gn,t=[s===0?No(e,b,Vf):""];for(let n of o){if(n.kind==="column"){n.gapBefore&&(r+=ug),t.push(`<rect x="${ys}" y="${r}" width="${mc-ys}" height="${xs-6}" class="group" />`,`<text x="${ys+6}" y="${r+16}" class="gt">${Pt(n.continued?`${n.label} (\uC774\uC5B4\uC11C)`:n.label)}</text>`,`<text x="${mc-6}" y="${r+16}" class="label" text-anchor="end">${Pt(n.summary)}</text>`),r+=xs;continue}if(n.kind==="empty"){t.push(`<text x="${ys+12}" y="${r+12}" class="td done">(\uC5C5\uBB34 \uC5C6\uC74C)</text>`),r+=vs;continue}t.push(`<text x="${ys+12}" y="${r+12}" class="${n.completed?"td done":"td"}">${Pt(Ci(n.title,mc-ys-12-120,9))}</text>`,`<text x="${mc-6}" y="${r+12}" class="label" text-anchor="end">${Pt(n.meta)}</text>`),r+=vs}return Lo({width:Vf,height:cg,body:t.join(""),pageIndex:s,pageCount:l.length})})}var e7=[{header:"\uADF8\uB8F9",width:16},{header:"\uC81C\uBAA9",width:44},{header:"\uC0C1\uD0DC",width:10},{header:"\uD504\uB85C\uC81D\uD2B8",width:14},{header:"\uCC45\uC784\uC790",width:10},{header:"\uCC38\uC870\uC790",width:22},{header:"\uC2DC\uC791",width:12},{header:"\uB9C8\uAC10",width:14},{header:"\uC911\uC694\uB3C4",width:8},{header:"\uD560\uC77C",width:8},{header:"\uBE44\uACE0",width:30}],t7="FFEEF2F7",gc="FFCBD5E1";function r7(e){return e.replace(/[\\/:*?"<>|]/g,"_").trim()||"\uC5C5\uBB34\uBAA9\uB85D"}async function n7(e,d){let b=await Promise.resolve().then(()=>vg(dg(),1)),l=new b.Workbook,o=l.addWorksheet("\uC5C5\uBB34\uBAA9\uB85D",{pageSetup:{paperSize:9,orientation:"landscape",fitToPage:!0,fitToWidth:1,fitToHeight:0}});o.columns=e7.map(i=>({header:i.header,width:i.width})),o.spliceRows(1,0,[`${e.documentTitle}`],[`${e.subtitle} \xB7 ${e.facilityName} \xB7 \uCD9C\uB825 ${ms(e.printedAt)}${e.printedBy?` \xB7 ${e.printedBy}`:""}`]),o.getRow(1).font={bold:!0,size:14},o.getRow(2).font={size:10,color:{argb:"FF6B7280"}};let s=o.getRow(3);s.font={bold:!0,size:10},s.eachCell(i=>{i.fill={type:"pattern",pattern:"solid",fgColor:{argb:t7}},i.alignment={vertical:"middle",horizontal:"center"}}),d.forEach(i=>{i.rows.forEach(a=>{let h=o.addRow([i.label,a.title,a.statusName,a.projectLabel||"\uAE30\uBCF8",a.managerName,a.receiverNamesFull,a.startDate==="-"?"":a.startDate,a.dueDate==="-"?"":a.dueDate,a.priorityName,a.checklist,a.note]);h.font={size:10,color:{argb:a.completed?"FF9CA3AF":"FF111827"}},h.alignment={vertical:"middle",wrapText:!1}})});let r=o.rowCount;for(let i=3;i<=r;i+=1)o.getRow(i).eachCell({includeEmpty:!0},a=>{a.border={top:{style:"thin",color:{argb:gc}},left:{style:"thin",color:{argb:gc}},bottom:{style:"thin",color:{argb:gc}},right:{style:"thin",color:{argb:gc}}}});o.views=[{state:"frozen",ySplit:3}];let t=await l.xlsx.writeBuffer(),n=new Blob([t],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),c=ms(e.printedAt).replace(/[: ]/g,"").slice(0,13);return{blob:n,fileName:`${r7(e.documentTitle)}_${c}.xlsx`}}function o7(e){return String(e??"").replace(/<br\s*\/?>(?=.)/gi,`
42
+ `).trim():"";function D4(e){let d=[`[\uC5C5\uBB34] ${e.title}`],b=yn(e.start_date),l=yn(e.due_date);(b||l)&&d.push(`\uAE30\uAC04: ${b&&l?`${b} ~ ${l}`:b||l}`),e.manager_name&&d.push(`\uCC45\uC784\uC790: ${e.manager_name}`);let o=ur(e).name;o&&d.push(`\uC0C1\uD0DC: ${o}`);let s=Up(e.content);s&&d.push("",s);let r=String(e.note??"").trim();return r&&d.push("",`\uBE44\uACE0: ${r}`),d.join(`
43
+ `)}function Vp(e){navigator.clipboard.writeText(e).then(()=>A4("\uC5C5\uBB34 \uB0B4\uC6A9\uC744 \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>O4("\uBCF5\uC0AC\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uB0B4\uC6A9\uC744 \uC9C1\uC811 \uC120\uD0DD\uD574 \uBCF5\uC0AC\uD574 \uC8FC\uC138\uC694."))}function ts(e,d){let b=D4(e);if(d&&typeof navigator.share=="function"){navigator.share({text:b}).catch(l=>{l?.name!=="AbortError"&&Vp(b)});return}Vp(b)}import{Fragment as $4,jsx as Et,jsxs as Kp}from"react/jsx-runtime";function Gp({task:e,myAccountSeq:d=0,onToggleCompleted:b,onChangeTitle:l,onChangeIcon:o,onChangeIconColor:s,onClose:r,appBarMode:t=!1,activityItems:n,activityLoading:c,onLoadActivity:i,onPrint:a,onDelete:h,canDelete:f}){let u=Lt(),[g,m]=Qs(!1),[v,k]=Qs(null),[B,R]=Qs(null),[L,A]=Qs(null),[P,N]=Qs(null),q=!!e.is_notice,j=!!e.is_event,S=q?Tt(e.icon||ir):j?Tt(e.icon||cr):null,T=q&&d>0&&(e.author_account_seq??0)===d,D=!mo(e,d),p=!!h&&(f??(d>0&&(e.author_account_seq??0)===d)),y=!j&&(q?T:(e.author_account_seq??0)===d||(e.manager_account_seq??0)===d);return Kp($4,{children:[Kp(rs,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1.5,flexShrink:0},children:[t&&r?Et(ns,{"aria-label":"\uB4A4\uB85C",onClick:r,sx:{color:"#37352f",ml:-1},children:Et(L4,{})}):null,y&&!t?Et(os,{title:e.completed&&e.completed_by?`${e.completed_by} \xB7 ${un(e.completed_time)} \uC644\uB8CC`:"",arrow:!0,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:Et(rs,{sx:{display:"flex",flexShrink:0,mr:1},children:Et($n,{onClick:x=>N({anchorEl:x.currentTarget,nextCompleted:!e.completed}),children:e.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC\uD558\uAE30"})})}):null,t||!S?null:j&&!D?Et(os,{title:"\uC544\uC774\uCF58 \uBCC0\uACBD",arrow:!0,enterDelay:400,disableInteractive:!0,children:Et(P4,{onClick:x=>R(x.currentTarget),sx:{display:"flex",p:.5,borderRadius:1,color:e.icon_color||"#1e3a8a","&:hover":{bgcolor:"#f2f2f0"}},children:Et(S,{sx:{fontSize:20}})})}):Et(rs,{sx:{display:"flex",px:.5,color:e.icon_color||(q?"#e5484d":"#1e3a8a")},children:Et(S,{sx:{fontSize:20}})}),v!==null?Et(rs,{component:"input",autoFocus:!0,spellCheck:!1,value:v,onChange:x=>k(x.target.value),onBlur:()=>{v.trim()&&v.trim()!==e.title&&l(e.seq,v.trim()),k(null)},onKeyDown:x=>{x.key==="Enter"&&x.target.blur(),x.key==="Escape"&&k(null)},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:18,fontWeight:500,color:"#37352f",p:0,m:0}}):t?Et(rs,{sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:q?"\uACF5\uC9C0":j?"\uC77C\uC815":e.is_bug?"\uC624\uB958":"\uC5C5\uBB34"}):Et(rs,{onClick:D?void 0:()=>k(e.title),sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",cursor:D?"default":"text",textDecoration:e.completed?"line-through":"none"},children:e.title}),i?Et(os,{title:"\uD65C\uB3D9",arrow:!0,children:Et(ns,{"aria-label":"\uD65C\uB3D9",onClick:()=>m(!0),sx:{color:"#6b7280"},children:Et(F4,{sx:{fontSize:20}})})}):null,Et(os,{title:u?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",arrow:!0,children:Et(ns,{"aria-label":u?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",onClick:()=>ts(e,u),sx:{color:"#6b7280"},children:u?Et(z4,{sx:{fontSize:20}}):Et(j4,{sx:{fontSize:20}})})}),a?Et(os,{title:"\uC778\uC1C4",arrow:!0,children:Et(ns,{"aria-label":"\uC778\uC1C4",onClick:()=>a(e),sx:{color:"#6b7280"},children:Et(q4,{sx:{fontSize:20}})})}):null,p?Et(os,{title:"\uC0AD\uC81C",arrow:!0,children:Et(ns,{"aria-label":"\uC0AD\uC81C",onClick:x=>A(x.currentTarget),sx:{color:"#6b7280","&:hover":{color:"#e5484d"}},children:Et(dr,{sx:{fontSize:20}})})}):null,r&&!t?Et(ns,{"aria-label":"\uB2EB\uAE30",onClick:r,sx:{color:"#6b7280"},children:Et(N4,{})}):null]}),Et(kt,{open:!!P,anchorEl:P?.anchorEl??null,title:P?.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:P?.nextCompleted?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>N(null),onConfirm:()=>{P&&b(e.seq,P.nextCompleted),N(null)}}),Et(Wo,{anchorEl:B,value:e.icon??"",color:e.icon_color??"",onSelect:x=>{o(e.seq,x),R(null)},onSelectColor:s?x=>s(e.seq,x):void 0,onClose:()=>R(null)}),Et(kt,{open:!!L,anchorEl:L,title:"\uC774 \uC5C5\uBB34\uB97C \uD734\uC9C0\uD1B5\uC73C\uB85C \uBCF4\uB0B4\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uC0AD\uC81C",onCancel:()=>A(null),onConfirm:()=>{A(null),h?.(e)}}),Et(Hl,{open:g,taskSeq:e.seq,items:n,loading:c,onLoad:i,onClose:()=>m(!1)})]})}import{useRef as J4,useState as kn}from"react";import{Box as Xt,Button as is,ButtonBase as em,Checkbox as Q4,Divider as wi,Menu as Zu,MenuItem as Ju}from"@mui/material";import ek from"@mui/icons-material/ExpandLess";import tk from"@mui/icons-material/ExpandMore";import rk from"@mui/icons-material/ConfirmationNumberOutlined";import tm from"@mui/icons-material/Check";import nk from"@mui/icons-material/DirectionsRunOutlined";import ok from"@mui/icons-material/SpeedOutlined";import Qu from"@mui/icons-material/CheckCircle";import ik from"@mui/icons-material/CheckCircleOutlineOutlined";import ef from"@mui/icons-material/CheckCircleOutlined";import rm from"@mui/icons-material/AccessTimeOutlined";import sk from"@mui/icons-material/AutorenewOutlined";import ak from"@mui/icons-material/LabelOutlined";import lk from"@mui/icons-material/PersonOutlineOutlined";import ck from"@mui/icons-material/SubjectOutlined";import uk from"@mui/icons-material/StickyNote2Outlined";import fk from"@mui/icons-material/PanToolAltOutlined";import nm from"@mui/icons-material/LockOutlined";import om from"@mui/icons-material/PublicOutlined";import im from"@mui/icons-material/Group";import dk from"@mui/icons-material/Repeat";import hk from"@mui/icons-material/EventOutlined";import{ConfirmDialog as sm,InfoAlert as pk}from"@ehfuse/alerts";import{DatePicker as mk}from"@ehfuse/mui-datetime-picker";import{useState as H4}from"react";import{TextField as W4}from"@ehfuse/mui-form-controls";import{jsx as U4}from"react/jsx-runtime";function Yp({value:e,onCommit:d,onDraftChange:b,readOnly:l=!1}){let[o,s]=H4(null);return U4(W4,{value:o??e,placeholder:l?"":"\uBE44\uACE0 \uC785\uB825",fullWidth:!0,size:"medium",slotProps:{input:{readOnly:l}},onChange:r=>{s(r.target.value),b?.(r.target.value)},onBlur:()=>{o!==null&&o.trim()!==e&&d(o),s(null)},onKeyDown:r=>{r.key==="Enter"&&r.target.blur(),r.key==="Escape"&&s(null)},sx:{mt:1}})}import{useMemo as Yu,useState as Xu}from"react";import{Box as Dr,Button as Jp,IconButton as V4}from"@mui/material";import K4 from"@mui/icons-material/AccountTreeOutlined";import G4 from"@mui/icons-material/LinkOutlined";import Y4 from"@mui/icons-material/Close";import X4 from"@mui/icons-material/RedoOutlined";function vi(e){return e.relations??[]}function SF(e,d,b){return vi(e).some(l=>l.type===b&&l.task_seq===d.seq)||vi(d).some(l=>l.type===b&&l.task_seq===e.seq)}function Xp(e){return`${e.created_time??""}|${String(e.seq).padStart(12,"0")}`}function Ku(e,d){let b=new Map(d.map(u=>[u.seq,u]));b.set(e.seq,e);let l=new Map,o=(u,g)=>{l.has(u)||l.set(u,new Set),l.has(g)||l.set(g,new Set),l.get(u).add(g),l.get(g).add(u)};for(let u of b.values())for(let g of vi(u))g.type==="follow_up"&&b.has(g.task_seq)&&o(u.seq,g.task_seq);let s=new Set([e.seq]),r=[e.seq];for(;r.length>0;){let u=r.shift();for(let g of l.get(u)??[])s.has(g)||(s.add(g),r.push(g))}let t=[...s].map(u=>b.get(u)).filter(u=>!!u).sort((u,g)=>Xp(u).localeCompare(Xp(g))),n=new Set;for(let u of vi(e))u.type==="related"&&n.add(u.task_seq);for(let u of b.values())u.seq!==e.seq&&vi(u).some(g=>g.type==="related"&&g.task_seq===e.seq)&&n.add(u.seq);let c=[...n].map(u=>b.get(u)).filter(u=>u!==void 0&&u.seq!==e.seq),i=[...b.values()].filter(u=>u.seq!==e.seq&&vi(u).some(g=>g.type==="duplicate_of"&&g.task_seq===e.seq)),a=vi(e).find(u=>u.type==="duplicate_of")?.task_seq,h=a?b.get(a)??null:null,f=[...b.values()].filter(u=>u.seq!==e.seq&&(u.checklist??[]).some(g=>Number(g.task_seq??0)===e.seq));return{lineage:t,related:c,duplicates:i,duplicateOf:h,parents:f}}function Gu(e,d){let b=Ku(e,d);return(b.lineage.length>=2?b.lineage.length-1:0)+b.related.length+b.duplicates.length+(b.duplicateOf?1:0)+b.parents.length}function Zp(e,d){return Gu(e,d)>0}import{Fragment as Z4,jsx as Vt,jsxs as Ln}from"react/jsx-runtime";function Wl({item:e,caption:d,onOpen:b,onUnlink:l}){let o=e.is_notice||e.is_event?Tt(e.icon||(e.is_notice?ir:cr)):null;return Ln(Dr,{sx:{display:"flex",alignItems:"center",gap:.75,px:1.25,py:.5,borderRadius:1,"&:hover":{bgcolor:"#f7f7f5"},"&:hover .taskbox-relation-unlink":{opacity:1}},children:[d?Vt(Dr,{component:"span",sx:{flexShrink:0,px:.6,py:.1,borderRadius:.75,fontSize:11.5,fontWeight:500,color:"#8a6d1d",bgcolor:"#faf1d7"},children:d}):null,o?Vt(o,{sx:{fontSize:16,flexShrink:0,color:e.icon_color||"#1e3a8a"}}):null,Ln(Dr,{component:"span",onClick:b,sx:{flex:1,minWidth:0,fontSize:14,color:e.completed?"#9a9a97":"#37352f",textDecoration:e.completed?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...b?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}},children:[e.ticket_no?`${e.ticket_no} `:"",e.title]}),Vt(At,{option:ur(e),small:!0}),l?Vt(V4,{className:"taskbox-relation-unlink",size:"small","aria-label":"\uC5F0\uACB0 \uD574\uC81C",onClick:l,sx:{opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:Vt(Y4,{sx:{fontSize:15}})}):null]})}function Qp({task:e,tasks:d,readOnly:b=!1,onOpenTask:l,onLink:o,onUnlink:s,onCreateFollowUp:r}){let[t,n]=Xu(!1),[c,i]=Xu(null),[a,h]=Xu(null),f=Yu(()=>Ku(e,d),[e,d]),u=f.lineage.length>=2,g=Yu(()=>Gu(e,d),[e,d]),m=Yu(()=>{let k=new Set;for(let B of f.lineage)k.add(B.seq);for(let B of f.related)k.add(B.seq);for(let B of f.duplicates)k.add(B.seq);for(let B of f.parents)k.add(B.seq);return f.duplicateOf&&k.add(f.duplicateOf.seq),[...k]},[f]),v=(k,B,R)=>{h({anchorEl:k,targetSeq:B,type:R})};return Ln(_n,{icon:Vt(K4,{sx:{fontSize:19,display:"block"}}),title:Ln(Z4,{children:["\uAD00\uB828 \uC5C5\uBB34",g>0?Vt(Dr,{component:"span",sx:{fontSize:12.5,color:"#9a9a97"},children:g}):null]}),titleExtra:b?null:Ln(Dr,{sx:{ml:"auto",display:"flex",alignItems:"center",gap:.5},children:[r?Vt(Jp,{size:"small",color:"inherit",startIcon:Vt(X4,{sx:{fontSize:16}}),onClick:k=>i(k.currentTarget),sx:{minWidth:0,px:1,fontSize:12.5,color:"#787774"},children:"\uD6C4\uC18D \uC5C5\uBB34"}):null,o?Vt(Jp,{size:"small",color:"inherit",startIcon:Vt(G4,{sx:{fontSize:16}}),onClick:()=>n(!0),sx:{minWidth:0,px:1,fontSize:12.5,color:"#787774"},children:"\uC5F0\uACB0"}):null]}),children:[Ln(Dr,{sx:{display:"flex",flexDirection:"column",mt:.5,pl:3.25},children:[u?Vt(Dr,{sx:{mb:f.related.length||f.duplicates.length||f.duplicateOf?1:0},children:f.lineage.map((k,B)=>{let R=k.seq===e.seq,L=B===f.lineage.length-1;return Ln(Dr,{sx:{display:"flex",gap:1},children:[Ln(Dr,{sx:{display:"flex",flexDirection:"column",alignItems:"center",width:14,flexShrink:0,pt:1.1},children:[Vt(Dr,{sx:{width:R?9:7,height:R?9:7,borderRadius:"50%",bgcolor:R?"#2f80ed":k.completed?"#9a9a97":"#c9c8c5",flexShrink:0}}),L?null:Vt(Dr,{sx:{width:"2px",flex:1,bgcolor:"#e6e6e3"}})]}),Ln(Dr,{sx:{flex:1,minWidth:0,pb:L?0:.5},children:[Ln(Dr,{sx:{display:"flex",alignItems:"center",gap:.75},children:[Ln(Dr,{component:"span",onClick:!R&&l?()=>l(k.seq):void 0,sx:{minWidth:0,fontSize:14,fontWeight:R?600:400,color:R?"#2f80ed":k.completed?"#9a9a97":"#37352f",textDecoration:k.completed?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...!R&&l?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}},children:[k.ticket_no?`${k.ticket_no} `:"",k.title]}),Vt(At,{option:ur(k),small:!0})]}),Vt(Dr,{sx:{fontSize:12,color:"#9a9a97"},children:k.completed&&k.completed_time?`${k.completed_time} \uC644\uB8CC`:k.created_time??""})]})]},k.seq)})}):null,f.parents.map(k=>Vt(Wl,{item:k,caption:"\uC0C1\uC704 \uC5C5\uBB34",onOpen:l?()=>l(k.seq):void 0},`parent-${k.seq}`)),f.duplicateOf?Vt(Wl,{item:f.duplicateOf,caption:"\uC6D0\uBCF8",onOpen:l?()=>l(f.duplicateOf.seq):void 0,onUnlink:!b&&s?k=>v(k.currentTarget,f.duplicateOf.seq,"duplicate_of"):void 0}):null,f.duplicates.map(k=>Vt(Wl,{item:k,caption:"\uC911\uBCF5",onOpen:l?()=>l(k.seq):void 0,onUnlink:!b&&s?B=>v(B.currentTarget,k.seq,"duplicate_of"):void 0},`dup-${k.seq}`)),f.related.map(k=>Vt(Wl,{item:k,onOpen:l?()=>l(k.seq):void 0,onUnlink:!b&&s?B=>v(B.currentTarget,k.seq,"related"):void 0},`rel-${k.seq}`)),g===0?Vt(Dr,{sx:{px:1.25,py:.75,fontSize:13.5,color:"#9a9a97"},children:"\uC5F0\uACB0\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):null]}),o?Vt(Ml,{open:t,task:e,tasks:d,excludeSeqs:m,onClose:()=>n(!1),onSubmit:(k,B)=>o(e.seq,k,B)}):null,Vt(kt,{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:()=>i(null),onConfirm:()=>{r?.(e.seq),i(null)}}),Vt(kt,{open:!!a,anchorEl:a?.anchorEl??null,title:"\uC774 \uC5C5\uBB34\uC640\uC758 \uC5F0\uACB0\uC744 \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uD574\uC81C",onCancel:()=>h(null),onConfirm:()=>{a&&s?.(e.seq,a.targetSeq,a.type),h(null)}})]})}import{Fragment as Hr,jsx as ve,jsxs as Kt}from"react/jsx-runtime";function Jo({label:e="\uBE44\uC5B4 \uC788\uC74C"}){return ve(Xt,{component:"span",sx:{color:"#9a9a97"},children:e})}function am({task:e,customTabs:d,statusOptions:b,avatarSrcByName:l,onChangeStatus:o,onChangeLabels:s,onAddLabelOption:r,onChangeProject:t,onAddProject:n,onChangeDate:c,onChangeReminder:i,onMemberEdit:a,onChangePriority:h,onChangeVisibility:f,onChangeRepeat:u,departments:g=[],onChangeEventTime:m,onChangeEventPlace:v,onChangeEventAddress:k,onChangeNote:B,onChangeNoteDraft:R,onChangeContent:L,contentTemplates:A,onSaveContentTemplate:P,onRemoveContentTemplate:N,contentLoading:q=!1,onChangeContentHeight:j,onAddChecklistItem:S,onToggleChecklistItem:T,onRemoveChecklistItem:D,onUpdateChecklistItem:p,onReorderChecklist:y,onConvertChecklistToTask:x,onOpenChecklistTask:w,onLinkChecklistTask:_,resolveChecklistTask:C,relatedTasksPool:O,onOpenRelatedTask:z,onLinkRelatedTask:$,onUnlinkRelatedTask:V,onCreateFollowUpTask:M,onAddAttachments:H,onRemoveAttachment:I,onPreview:E,onDownload:F,onUpdateComment:U,onRemoveComment:Y,onToggleCommentReaction:K,currentUserName:W="",myAccountSeq:X=0,noticeAdmin:J=!1,hideProject:G=!1,hideLabel:te=!1,showTitle:Z=!1,onChangeTitle:re,onToggleCompleted:ie,onChangeIcon:se,onChangeIconColor:oe,employees:pe=[],onAckConfirm:me,onRequestConfirm:ke,onChangeBugField:Le,sprints:Te=[],sprintProject:Me=!1,hideSprint:nt=!1,onChangeSprint:we,onChangeStoryPoints:ee,onChangeResolution:Se,onClaimTask:ge,onVerifyBug:xe}){let[Ze,Pe]=kn(null),He=J4(!1),[Qt,Ue]=kn(null),[Oe,be]=kn(null),[ye,Ce]=kn(null),[et,ze]=kn(!1),De={[Dn]:et?{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"}},[vt,Ve]=kn(null),[qe,Mt]=kn(null),[Ke,ne]=kn(null),[ue,de]=kn(null),[_e,dt]=kn(null),[Re,Be]=kn(null),[wt,Ge]=kn(null),Ee=!!e.is_notice,tt=!!e.is_event,ot=!!e.is_bug,Ye=!!ge&&Ka(e,X),yt=!!ge&&Ga(e,X),Bt=!!xe&&ot&&!!e.completed&&X>0&&(e.author_account_seq??0)===X&&!(e.acks??[]).some(ae=>ae.account_seq===X),bt=!mo(e,X),er=!e.is_event&&(e.is_notice?X>0&&(e.author_account_seq??0)===X:(e.author_account_seq??0)===X||(e.manager_account_seq??0)===X),Nt=e.is_notice||e.is_event?Tt(e.icon||(e.is_notice?ir:cr)):null,Rt=Ee?!Va(e,X):bt,Q=Ye||yt?Kt($n,{onClick:ae=>Ge(ae.currentTarget),children:[ve(fk,{sx:{fontSize:16,mr:.5}}),"\uAC00\uC838\uAC00\uAE30"]}):null,le=Ee?zl(e,pe):"",he=Ee?Bp(e,pe,X):null,fe=Ee?null:Fi(e,X),Ie=!!(fe&&fe.total>0||Ee&&he),Ae=(e.origin_license_seq??0)>0,$e=!Ee&&!Ae,lt=Kt(Hr,{children:[ve(pt,{icon:ve(lk,{sx:{fontSize:17}}),label:"\uC791\uC131\uC790",sx:[eo(9),De??null,...tt?[]:[rr(1)]],children:e.created_by?Kt(Hr,{children:[ve(qr,{names:[e.created_by],size:20,avatarSrcByName:l}),e.created_by]}):ve(Jo,{})}),ve(pt,{icon:ve(rm,{sx:{fontSize:17}}),label:"\uC791\uC131\uC77C\uC2DC",sx:[eo(11),De??null,...tt?[]:[rr(2)]],children:e.created_time?un(e.created_time):ve(Jo,{})})]});return Kt(Hr,{children:[Z?Kt(Xt,{sx:{px:2,pt:2,pb:.5,display:"flex",alignItems:"flex-start",gap:1},children:[er?ve(Q4,{checked:e.completed,icon:ve(ik,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:ve(Qu,{sx:{fontSize:22,color:"#2f80ed"}}),onChange:(ae,Ne)=>{Oe||be({anchorEl:ae.currentTarget,nextCompleted:Ne})},sx:{p:0,mt:.25}}):null,Nt?tt&&!bt?ve(em,{onClick:ae=>Ue(ae.currentTarget),sx:{display:"flex",p:.25,mt:.1,borderRadius:1,color:e.icon_color||"#1e3a8a","&:hover":{bgcolor:"#f2f2f0"}},children:ve(Nt,{sx:{fontSize:20}})}):ve(Xt,{sx:{display:"flex",p:0,mt:.25,color:e.icon_color||(Ee?"#e5484d":"#1e3a8a")},children:ve(Nt,{sx:{fontSize:20}})}):null,ve(Xt,{sx:{flex:1,minWidth:0},children:Ze!==null?ve(Xt,{component:"div",contentEditable:!0,suppressContentEditableWarning:!0,spellCheck:!1,ref:ae=>{if(!ae||ae.dataset.focused)return;ae.dataset.focused="1",ae.focus();let Ne=document.createRange();Ne.selectNodeContents(ae),Ne.collapse(!1);let Je=window.getSelection();Je?.removeAllRanges(),Je?.addRange(Ne)},onBlur:ae=>{let Ne=(ae.currentTarget.textContent??"").replace(/\n/g," ").trim();!He.current&&Ne&&Ne!==e.title&&re(e.seq,Ne),He.current=!1,Pe(null)},onKeyDown:ae=>{ae.key==="Enter"&&(ae.preventDefault(),ae.target.blur()),ae.key==="Escape"&&(He.current=!0,ae.target.blur())},onPaste:ae=>{ae.preventDefault();let Ne=ae.clipboardData.getData("text/plain").replace(/\n/g," ");document.execCommand("insertText",!1,Ne)},sx:{outline:"none",fontSize:19,fontWeight:600,color:"#37352f",lineHeight:"26px",cursor:"text",textDecoration:e.completed?"line-through":"none",userSelect:"text",wordBreak:"break-word"},children:Ze}):ve(Xt,{onClick:()=>Pe(e.title),sx:{fontSize:19,fontWeight:600,color:"#37352f",lineHeight:"26px",cursor:"text",textDecoration:e.completed?"line-through":"none",userSelect:"text",wordBreak:"break-word"},children:e.title})}),ve(kt,{open:!!Oe,anchorEl:Oe?.anchorEl??null,title:Oe?.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:Oe?.nextCompleted?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>be(null),onConfirm:()=>{Oe&&ie(e.seq,Oe.nextCompleted),be(null)}})]}):null,Kt(Xt,{sx:{py:1.5,display:"flex",flexDirection:"column",gap:0,[Dn]:{pb:0,"& > :last-child":{mb:0}}},children:[ve(Sl,{hideProject:G,pinColumns:!0,projectColumn:!tt&&!te?2:"full",values:{tabKey:e.tab_key??"",managerName:e.manager_name,receiverNames:e.receiver_names,startDate:e.start_date,dueDate:e.due_date,reminders:Wn(e),priority:e.priority,eventTime:e.event_time??"",eventPlace:e.event_place??"",eventAddress:e.event_address??""},customTabs:d,avatarSrcByName:Ya(e,l),hideDueDate:!tt&&!!e.repeat_rule,hideReminder:!!e.repeat_rule,notice:Ee,event:tt,readOnly:bt,targetSummary:le,onChangeProject:ae=>t(e.seq,ae),onAddProject:n,onChangeStartDate:ae=>c(e.seq,"start_date",ae),onChangeDueDate:ae=>c(e.seq,"due_date",ae),onChangeReminder:ae=>i(e.seq,ae),onChangePriority:ae=>h(e.seq,ae),onChangeEventTime:ae=>m?.(e.seq,ae),onChangeEventPlace:ae=>v?.(e.seq,ae),onChangeEventAddress:ae=>k?.(e.seq,ae),onMemberEdit:ae=>a(e,ae,null),narrowCollapsedSx:De,reminderLocked:e.completed,managerAction:Q,supportOrigin:(e.origin_license_seq??0)>0?{licenseName:e.origin_license_name??"",authorName:e.origin_author_name||e.author_name||e.created_by||"",contactPhone:e.origin_contact_phone??"",contactEmail:e.origin_contact_email??"",supportType:el(e.support_type??"")}:void 0,leading:Kt(Hr,{children:[Bt||Q&&(Ee||tt)?Kt(Xt,{sx:{gridColumn:"1 / -1",display:"flex",justifyContent:"flex-start",gap:2,px:2,py:1.5},children:[Ee||tt?Q:null,Bt?Kt(Hr,{children:[ve(is,{variant:"contained",size:"large",onClick:()=>xe?.(e.seq,!0),sx:{bgcolor:"#2f80ed"},children:"\uAC80\uC99D\uC644\uB8CC"}),ve(is,{variant:"outlined",size:"large",color:"error",onClick:()=>xe?.(e.seq,!1),children:"\uC7AC\uC624\uD508"})]}):null]}):null,ot&&e.ticket_no?ve(pt,{icon:ve(rk,{sx:{fontSize:17}}),label:"\uD2F0\uCF13",sx:rr(1),children:ve(Xt,{component:"span",sx:{fontVariantNumeric:"tabular-nums"},children:e.ticket_no})}):null,tt?null:ve(Xt,{sx:ot&&e.ticket_no||$e||Ie?rr(ot&&e.ticket_no?2:1):{gridColumn:"1 / -1"},children:ve(pt,{icon:ve(sk,{sx:{fontSize:17}}),label:"\uC0C1\uD0DC",onClick:bt||e.completed?void 0:ae=>Ve(ae),children:ve(At,{option:ur(e)})})}),$e?(()=>{let ae=En(e),Ne=ae==="all"?ve(om,{sx:{fontSize:17,color:"#2f80ed"}}):ae==="group"?ve(im,{sx:{fontSize:17,color:"#d9730d"}}):ve(nm,{sx:{fontSize:17}}),Je=ae==="all"?"\uC804\uCCB4\uACF5\uAC1C":ae==="group"?`\uBD80\uC11C\uACF5\uAC1C \xB7 ${g.find(St=>St.seq===(e.visibility_group_seq??0))?.name??"\uBD80\uC11C"}`:"\uBE44\uACF5\uAC1C";return ve(Xt,{sx:tt?void 0:rr(ot?1:2),children:ve(pt,{icon:Ne,label:"\uACF5\uAC1C",onClick:bt||!f?void 0:St=>Mt(St),children:Je})})})():null,!Ee&&!ot&&!Ae?ve(Xt,{sx:tt?void 0:rr(1),children:ve(pt,{icon:ve(dk,{sx:{fontSize:17,...e.repeat_rule?{color:"#2f80ed"}:{}}}),label:"\uBC18\uBCF5",onClick:bt||!u?void 0:ae=>ne(ae),children:e.repeat_rule?xl(e.repeat_rule):ve(Jo,{label:"\uC5C6\uC74C"})})}):null,!Ee&&!ot&&e.repeat_rule?ve(Xt,{sx:tt?void 0:rr(2),children:ve(pt,{icon:ve(hk,{sx:{fontSize:17}}),label:"\uBC18\uBCF5 \uC885\uB8CC",onClick:bt||!u?void 0:ae=>de(ae),children:e.repeat_until?`${e.repeat_until}\uAE4C\uC9C0`:ve(Jo,{})})}):null,fe&&fe.total>0?ve(Xt,{sx:tt?void 0:rr(2),children:ve(pt,{icon:ve(ef,{sx:{fontSize:17}}),label:"\uD655\uC778",children:fe.canConfirm?ve(is,{size:"small",variant:"contained",onClick:()=>me?.(e.seq),sx:{py:.1,px:1.25,minWidth:0,color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}},children:"\uD655\uC778"}):Kt(is,{size:"small",variant:"outlined",color:"inherit",startIcon:fe.myTime?ve(Qu,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:ae=>Ce({anchorEl:ae.currentTarget,open:!0}),sx:{py:.1,px:1.25,minWidth:0,fontSize:13,color:"text.primary",borderColor:"#d5d8dc",bgcolor:"#fff",whiteSpace:"nowrap"},children:[fe.count," / ",fe.total]})})}):null,Ee&&he?ve(Xt,{sx:rr(2),children:ve(pt,{icon:ve(ef,{sx:{fontSize:17}}),label:"\uD655\uC778",children:ve(Xt,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,minWidth:0},children:he.canAck?ve(is,{size:"small",variant:"contained",onClick:()=>me?.(e.seq),sx:{py:.1,px:1.25,minWidth:0,color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}},children:"\uD655\uC778"}):ve(is,{size:"small",variant:"outlined",color:"inherit",startIcon:he.acked?ve(Qu,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:ae=>Ce({anchorEl:ae.currentTarget,open:!0}),sx:{py:.1,px:1.25,minWidth:0,fontSize:13,color:"text.primary",borderColor:"#d5d8dc",bgcolor:"#fff",whiteSpace:"nowrap"},children:he.total>0&&he.count>=he.total?"\uC644\uB8CC":Kt(Hr,{children:[he.count,ve(Xt,{component:"span",sx:{mx:.4},children:"/"}),he.total]})})})})}):null,Me&&!nt&&!tt&&!Ee?Kt(Hr,{children:[ve(pt,{icon:ve(nk,{sx:{fontSize:17}}),label:"\uBAA9\uD45C",onClick:bt?void 0:ae=>dt(ae),sx:rr(1),children:(e.sprint_seq??0)>0?Te.find(ae=>ae.seq===e.sprint_seq)?.name??"\uC0AD\uC81C\uB41C \uC2A4\uD504\uB9B0\uD2B8":ve(Jo,{label:"\uBBF8\uBC30\uC815"})}),ve(pt,{icon:ve(ok,{sx:{fontSize:17}}),label:"\uD3EC\uC778\uD2B8",sx:rr(2),children:ve(Bo,{value:(e.story_points??0)>0?String(e.story_points):"",placeholder:"\uBBF8\uCD94\uC815",readOnly:bt,onCommit:ae=>ee?.(e.seq,Number(ae.replace(/[^0-9.]/g,""))||0)})})]}):null,tt||te?null:ve(Xt,{sx:[G?{gridColumn:"1 / -1"}:rr(1),De??null],children:ve(pt,{icon:ve(ak,{sx:{fontSize:17}}),label:"\uB77C\uBCA8",onClick:bt?void 0:ae=>Be(ae),children:(e.label_keys??[]).length>0?ve(qo,{labelKeys:e.label_keys??[],labelOptions:b}):ve(Jo,{})})})]}),afterProject:tt?null:lt,trailing:Kt(Hr,{children:[ot?ve(Tl,{values:{repro:e.bug_repro??"",device:e.bug_device??"",where:e.bug_where??"",version:e.bug_version??"",resolution:e.resolution??""},readOnly:bt,showResolution:!!e.completed,onChangeRepro:ae=>Le?.(e.seq,"bug_repro",ae),onChangeDevice:ae=>Le?.(e.seq,"bug_device",ae),onChangeWhere:ae=>Le?.(e.seq,"bug_where",ae),onChangeVersion:ae=>Le?.(e.seq,"bug_version",ae),onChangeResolution:ae=>Se?.(e.seq,ae)}):null,tt?lt:null,e.completed?Kt(Hr,{children:[ve(pt,{icon:ve(ef,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC790",sx:[eo(10),De??null,...tt?[]:[rr(1)]],children:e.completed_by?Kt(Hr,{children:[ve(qr,{names:[e.completed_by],size:20,avatarSrcByName:l}),e.completed_by]}):ve(Jo,{})}),ve(pt,{icon:ve(rm,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC77C\uC2DC",sx:[eo(12),De??null,...tt?[]:[rr(2)]],children:e.completed_time?un(e.completed_time):ve(Jo,{})})]}):null]})}),Kt(Xt,{sx:{display:"none",[Dn]:{display:"block",mt:1.5,mb:0}},children:[ve(wi,{sx:{borderColor:"#e6e6e3"}}),ve(em,{onClick:()=>ze(ae=>!ae),sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",gap:.5,pt:1.25,pb:1.25,fontSize:13.5,bgcolor:"#f4f4f2",color:"#37352f","&:active":{opacity:.6}},children:et?Kt(Hr,{children:["\uC811\uAE30 ",ve(ek,{sx:{fontSize:18}})]}):Kt(Hr,{children:["\uC815\uBCF4 \uB354\uBCF4\uAE30 ",ve(tk,{sx:{fontSize:18}})]})})]}),Kt(Xt,{children:[ve(wi,{sx:{my:1.5,borderColor:"#e6e6e3",[Dn]:{mt:0,mb:1.25}}}),ve(_n,{icon:ve(ck,{sx:{fontSize:18,display:"block"}}),title:"\uB0B4\uC6A9",titleExtra:A&&!bt?ve(Bl,{content:e.content??"",templates:A,onApply:ae=>L?.(e.seq,ae),onSave:P,onRemove:N}):void 0,children:ve(Xt,{sx:{userSelect:"text"},children:q?ve(Xt,{sx:{minHeight:e.content_height||180,display:"flex",alignItems:"center",justifyContent:"center"},children:ve(ol,{})}):ve(Il,{syncKey:e.seq,value:e.content??"",height:e.content_height??0,onChangeHeight:j?ae=>j(e.seq,ae):void 0,readOnly:bt,onChange:ae=>L(e.seq,ae)})})}),e.is_bug?null:Kt(Hr,{children:[ve(wi,{sx:{my:1.5,borderColor:"#e6e6e3"}}),ve(_n,{icon:ve(uk,{sx:{fontSize:18,display:"block"}}),title:"\uBE44\uACE0",children:ve(Xt,{sx:{userSelect:"text"},children:ve(Yp,{value:e.note,readOnly:Rt,onCommit:ae=>B(e.seq,ae),onDraftChange:R?ae=>R(e.seq,ae):void 0})})})]}),tt?null:Kt(Hr,{children:[ve(wi,{sx:{my:1.5,borderColor:"#e6e6e3"}}),ve(Rl,{taskSeq:e.seq,checklist:e.checklist??[],removeLocked:Rt,onAdd:S,onToggle:T,onRemove:D,onUpdate:p,onReorder:y,onConvertToTask:x,onOpenLinkedTask:w,resolveLinkedTask:C,myAccountSeq:X,linkCandidates:O,linkBaseTask:e,onLinkExistingTask:_})]}),O&&!tt&&!Ee&&Zp(e,O)?Kt(Hr,{children:[ve(wi,{sx:{my:1.5,borderColor:"#e6e6e3"}}),ve(Qp,{task:e,tasks:O,readOnly:bt,onOpenTask:z,onLink:$,onUnlink:V,onCreateFollowUp:M})]}):null,ve(wi,{sx:{my:1.5,borderColor:"#e6e6e3"}}),ve(Pl,{taskSeq:e.seq,attachments:e.attachments??[],removeLocked:Rt,onAdd:H,onRemove:I,onPreview:E?ae=>E({...ae,taskSeq:e.seq}):void 0,onDownload:F?ae=>F({...ae,taskSeq:e.seq}):void 0})]}),ve(wi,{sx:{my:1.5,borderColor:"#e6e6e3"}}),ve($p,{taskSeq:e.seq,comments:e.comments??[],currentUserName:W,myAccountSeq:X,avatarSrcByName:l,onUpdate:U,onRemove:Y,onToggleReaction:K,onPreview:E?ae=>E({...ae,taskSeq:e.seq}):void 0,onDownload:F?ae=>F({...ae,taskSeq:e.seq}):void 0})]}),ve(Ai,{anchorEl:vt,value:e.status,options:Ee?Is:ot?ai:Es,onSelect:ae=>o(e.seq,ae),onClose:()=>Ve(null)}),ve(Zu,{transitionDuration:0,anchorEl:Ke,open:!!Ke,onClose:()=>ne(null),children:[{value:"",label:"\uC5C6\uC74C"},...Ws].map(ae=>ve(Ju,{selected:(e.repeat_rule??"")===ae.value,onClick:()=>{ne(null),(async()=>{let Ne=e.repeat_rule??"";if(ae.value===Ne)return;if(ae.value===""){await sm({title:"\uBC18\uBCF5 \uD574\uC81C",message:"\uC774\uD6C4 \uBC18\uBCF5 \uD68C\uCC28\uB97C \uBAA8\uB450 \uC0AD\uC81C\uD558\uACE0 \uBC18\uBCF5\uC744 \uD574\uC81C\uD560\uAE4C\uC694? (\uC9C0\uB09C \uD68C\uCC28\uB294 \uB0A8\uC2B5\uB2C8\uB2E4)"})&&u?.(e.seq,"","");return}let Je=String(e.due_date??"").slice(0,10);if(!Je){pk(e.is_event?"\uBC18\uBCF5\uD558\uB824\uBA74 \uC77C\uC815 \uB0A0\uC9DC\uB97C \uBA3C\uC800 \uC120\uD0DD\uD558\uC138\uC694.":"\uBC18\uBCF5\uD558\uB824\uBA74 \uB9C8\uAC10\uC608\uC815\uC744 \uBA3C\uC800 \uC120\uD0DD\uD558\uC138\uC694.");return}Ne&&!await sm({title:"\uBC18\uBCF5 \uBCC0\uACBD",message:"\uC774\uD6C4 \uD68C\uCC28\uB97C \uC0C8 \uADDC\uCE59\uC73C\uB85C \uB2E4\uC2DC \uC0DD\uC131\uD560\uAE4C\uC694? \uC774\uD6C4 \uD68C\uCC28\uC758 \uB313\uAE00\xB7\uCCA8\uBD80\uB294 \uC0AC\uB77C\uC9D1\uB2C8\uB2E4."})||u?.(e.seq,ae.value,vl(Je,ae.value))})()},sx:{fontSize:14,minWidth:140},children:ae.label},ae.value||"none"))}),ve(mk,{anchorEl:ue,open:!!ue,onClose:()=>de(null),selectedDate:e.repeat_until?new Date(`${e.repeat_until}T00:00:00`):new Date,onDateChange:ae=>{de(null);let Ne=qt=>String(qt).padStart(2,"0"),Je=`${ae.getFullYear()}-${Ne(ae.getMonth()+1)}-${Ne(ae.getDate())}`,St=e.repeat_rule??"";St&&u?.(e.seq,St,Je)}}),ve(Zu,{transitionDuration:0,anchorEl:qe,open:!!qe,onClose:()=>Mt(null),children:[{key:"involved",label:"\uBE44\uACF5\uAC1C",icon:ve(nm,{sx:{fontSize:17,color:"#57564f"}}),selected:En(e)==="involved",onPick:()=>f?.(e.seq,"involved",0)},{key:"all",label:"\uC804\uCCB4\uACF5\uAC1C",icon:ve(om,{sx:{fontSize:17,color:"#2f80ed"}}),selected:En(e)==="all",onPick:()=>f?.(e.seq,"all",0)},...g.map(ae=>({key:`group-${ae.seq}`,label:`\uBD80\uC11C\uACF5\uAC1C \xB7 ${ae.name}`,icon:ve(im,{sx:{fontSize:17,color:"#d9730d"}}),selected:En(e)==="group"&&(e.visibility_group_seq??0)===ae.seq,onPick:()=>f?.(e.seq,"group",ae.seq)}))].map(ae=>Kt(Ju,{selected:ae.selected,onClick:()=>{ae.onPick(),Mt(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[ae.icon,ae.label,ae.selected?ve(tm,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},ae.key))}),ve(Zu,{transitionDuration:0,anchorEl:_e,open:!!_e,onClose:()=>dt(null),children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...Te.filter(ae=>`custom-${ae.group_seq}`===String(e.tab_key??"")).map(ae=>({seq:ae.seq,label:vn(ae)}))].map(ae=>Kt(Ju,{onClick:()=>{we?.(e.seq,ae.seq),dt(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[ae.label,(e.sprint_seq??0)===ae.seq?ve(tm,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},ae.seq))}),ve(sl,{anchorEl:ye?.anchorEl??null,open:!!ye?.open,acks:e.acks??[],total:he?.total??fe?.total??0,pendingNames:he?.pendingNames??fe?.pendingNames??[],avatarSrcByName:l,onRequestConfirm:ke&&(he?he.count<he.total:fe&&fe.count<fe.total)?()=>{ke(e.seq),Ce(ae=>ae?{...ae,open:!1}:null)}:void 0,onClose:()=>Ce(ae=>ae?{...ae,open:!1}:null)}),ve(Ll,{anchorEl:Re,selectedKeys:e.label_keys??[],labelOptions:b,onToggle:ae=>s(e.seq,qa(e.label_keys??[],ae)),onAddLabel:r,onClose:()=>Be(null)}),ve(Wo,{anchorEl:Qt,value:e.icon??"",color:e.icon_color??"",onSelect:ae=>{se(e.seq,ae),Ue(null)},onSelectColor:oe?ae=>oe(e.seq,ae):void 0,onClose:()=>Ue(null)}),ve(kt,{open:!!wt,anchorEl:wt,title:Ye?"\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:()=>Ge(null),onConfirm:()=>{ge?.(e.seq),Ge(null)}})]})}import{Fragment as Ck,jsx as Wt,jsxs as ss}from"react/jsx-runtime";function f$(){let e=new Date,d=b=>String(b).padStart(2,"0");return`${e.getFullYear()}-${d(e.getMonth()+1)}-${d(e.getDate())} ${d(e.getHours())}:${d(e.getMinutes())}`}function d$({open:e,task:d,onClose:b,onAddComment:l,onSaveFields:o,presentation:s="auto",myAccountSeq:r=0,onToggleCompleted:t,onChangeTitle:n,onChangeIcon:c,onChangeIconColor:i,activityItems:a,activityLoading:h,onLoadActivity:f,onPrint:u,onDelete:g,canDelete:m,...v}){let k=Lt(),B=cm(null);d&&(B.current=d);let R=d??B.current,[L,A]=Ul(!1),[P,N]=Ul(null),[q,j]=Ul(null),S=!!g&&(m??(r>0&&(R?.author_account_seq??0)===r)),[T,D]=Ul({}),p=Object.keys(T).length>0;lm(()=>{D({})},[d?.seq,e]);let y=cm(null);if(lm(()=>{y.current?.scrollTo({top:0})},[d?.seq]),!R)return null;let x=k&&p?{...R,...T}:R,w=x.checklist??[],_=(M,H)=>{k?D(I=>({...I,...M})):H()},C=()=>{let M=T;D({});let H=R.seq,I=M.title===void 0?void 0:String(M.title).trim();if(o){let E={...M};I!==void 0&&(I?E.title=I:delete E.title),Object.keys(E).length>0&&o(H,E),fm({message:"\uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",position:"center"});return}I&&n(H,I),M.icon!==void 0&&c(H,String(M.icon)),M.icon_color!==void 0&&i?.(H,String(M.icon_color)),M.status!==void 0&&v.onChangeStatus(H,M.status),M.label_keys!==void 0&&v.onChangeLabels(H,M.label_keys??[]),M.tab_key!==void 0&&v.onChangeProject(H,String(M.tab_key??"")),M.start_date!==void 0&&v.onChangeDate(H,"start_date",String(M.start_date??"")),M.due_date!==void 0&&v.onChangeDate(H,"due_date",String(M.due_date??"")),M.reminders!==void 0&&v.onChangeReminder(H,M.reminders),M.priority!==void 0&&v.onChangePriority(H,M.priority),M.event_time!==void 0&&v.onChangeEventTime?.(H,String(M.event_time??"")),M.event_place!==void 0&&v.onChangeEventPlace?.(H,String(M.event_place??"")),M.event_address!==void 0&&v.onChangeEventAddress?.(H,String(M.event_address??"")),M.content!==void 0&&v.onChangeContent(H,String(M.content??"")),M.note!==void 0&&v.onChangeNote(H,String(M.note??"")),M.visibility!==void 0&&v.onChangeVisibility?.(H,M.visibility,Number(M.visibility_group_seq??0)),fm({message:"\uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",position:"center"})},O={...v,onChangeStatus:(M,H)=>_({status:H},()=>v.onChangeStatus(M,H)),onChangeLabels:(M,H)=>_({label_keys:H},()=>v.onChangeLabels(M,H)),onChangeProject:(M,H)=>_({tab_key:H},()=>v.onChangeProject(M,H)),onChangeDate:(M,H,I)=>_({[H]:I},()=>v.onChangeDate(M,H,I)),onChangeReminder:(M,H)=>_({reminders:H},()=>v.onChangeReminder(M,H)),onChangePriority:(M,H)=>_({priority:H},()=>v.onChangePriority(M,H)),onChangeEventTime:(M,H)=>_({event_time:H},()=>v.onChangeEventTime?.(M,H)),onChangeEventPlace:(M,H)=>_({event_place:H},()=>v.onChangeEventPlace?.(M,H)),onChangeEventAddress:(M,H)=>_({event_address:H},()=>v.onChangeEventAddress?.(M,H)),onChangeContent:(M,H)=>_({content:H},()=>v.onChangeContent(M,H)),onChangeNote:(M,H)=>_({note:H},()=>v.onChangeNote(M,H)),onMemberEdit:(M,H)=>v.onMemberEdit(M,H,k?I=>D(E=>({...E,...I})):null),onChangeNoteDraft:k?(M,H)=>_({note:H},()=>{}):void 0,onChangeVisibility:v.onChangeVisibility?(M,H,I)=>_({visibility:H,visibility_group_seq:I},()=>v.onChangeVisibility?.(M,H,I)):void 0,onAddChecklistItem:(M,H)=>_({checklist:[...w,{label:H,checked:!1}]},()=>v.onAddChecklistItem(M,H)),onToggleChecklistItem:(M,H,I)=>_({checklist:w.map((E,F)=>F===H?{...E,checked:I}:E)},()=>v.onToggleChecklistItem(M,H,I)),onRemoveChecklistItem:(M,H)=>_({checklist:w.filter((I,E)=>E!==H)},()=>v.onRemoveChecklistItem(M,H)),onUpdateChecklistItem:v.onUpdateChecklistItem?(M,H,I)=>_({checklist:w.map((E,F)=>F===H?{...E,label:I}:E)},()=>v.onUpdateChecklistItem?.(M,H,I)):void 0,onReorderChecklist:v.onReorderChecklist?(M,H)=>_({checklist:H},()=>v.onReorderChecklist?.(M,H)):void 0,onLinkChecklistTask:v.onLinkChecklistTask?(M,H,I)=>_({checklist:[...w,{label:I,checked:!1,task_seq:H}]},()=>v.onLinkChecklistTask?.(M,H,I)):void 0},z=Wt(am,{...O,task:x,myAccountSeq:r,onChangeTitle:(M,H)=>_({title:H},()=>n(M,H)),onToggleCompleted:t,onChangeIcon:(M,H)=>_({icon:H},()=>c(M,H)),onChangeIconColor:(M,H)=>_({icon_color:H},()=>i?.(M,H)),showTitle:k||s==="dialog"}),$=Wt(Hp,{onSubmit:(M,H)=>l(x.seq,M,H)},x.seq);return k||s==="dialog"?ss(Ck,{children:[Wt(Tk,{open:e,onClose:b,locale:"ko",fontScale:{enabled:!0,default:1.1,min:.6},title:x.is_notice?"\uACF5\uC9C0\uC0AC\uD56D":x.is_event?"\uC77C\uC815":x.is_bug?"\uC624\uB958":"\uC5C5\uBB34",titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1},custom:[{raw:!0,icon:Wt(yk,{size:"small","aria-label":"\uB354\uBCF4\uAE30",onClick:M=>N(M.currentTarget),children:Wt(vk,{sx:{color:"#6b7280"}})})},...k?[{raw:!0,icon:Wt(gk,{variant:"contained",size:"small",disableElevation:!0,disabled:!p,onClick:p?C:void 0,sx:{ml:1.5,height:32,minWidth:64,px:1.75,py:0,borderRadius:1,fontSize:14,fontWeight:600,bgcolor:"#2f80ed","&:hover":{bgcolor:"#2f80ed"},"&.Mui-disabled":{bgcolor:"#f2f2f0",color:"#c9c8c5"}},children:"\uC800\uC7A5\uD558\uAE30"})}]:[]]},fullScreen:k,maxWidth:k?void 0:"md",width:k?void 0:720,mobilePresentation:k?"slide":void 0,tabs:{visible:!1},contentTopPadding:0,contentPaddingX:0,sectionsPaddingTop:0,sectionContentPaddingTop:0,contentBottomPadding:0,scrollPastLastSection:!1,overlayScrollbar:{enabled:!0,contentStyle:{minWidth:0}},actions:{visible:!0,showCancelButton:!1,left:$},sx:{DialogContent:{borderBottom:"none"}},dialogActionSx:{padding:"0 !important","@media (max-width:1023.95px)":{padding:"0 !important"},borderTop:"1px solid #37352f","& .left-actions":{flex:1,width:"100%",minWidth:0,"& > *":{flex:1,minWidth:0}},"& .right-actions":{display:"none"}},sections:[{id:"task-detail",title:"",showTitle:!1,children:Wt(Vl,{sx:{userSelect:"none",width:"100%",minWidth:0,display:"flex",flexDirection:"column",gap:0},children:z})}]},R.seq),ss(xk,{open:!!P,anchorEl:P,onClose:()=>N(null),anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},sx:{zIndex:1500},children:[f?ss(nf,{onClick:()=>{N(null),A(!0)},children:[Wt(tf,{children:Wt(kk,{fontSize:"small"})}),Wt(rf,{children:"\uD65C\uB3D9"})]}):null,ss(nf,{onClick:()=>{N(null),ts(x,!0)},children:[Wt(tf,{children:Wt(_k,{fontSize:"small"})}),Wt(rf,{children:"\uACF5\uC720\uD558\uAE30"})]}),S?ss(nf,{onClick:M=>{let H=P??M.currentTarget;N(null),j(H)},sx:{color:"#e5484d"},children:[Wt(tf,{children:Wt(wk,{fontSize:"small",sx:{color:"#e5484d"}})}),Wt(rf,{children:"\uC0AD\uC81C"})]}):null]}),Wt(kt,{open:!!q,anchorEl:q,title:"\uC774 \uC5C5\uBB34\uB97C \uD734\uC9C0\uD1B5\uC73C\uB85C \uBCF4\uB0B4\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uC0AD\uC81C",onCancel:()=>j(null),onConfirm:()=>{j(null),g?.(x)}}),Wt(Hl,{open:L,taskSeq:x.seq,items:a,loading:h,onLoad:f,onClose:()=>A(!1)})]}):Wt(bk,{anchor:"right",open:e,onClose:b,"aria-label":"\uC5C5\uBB34 \uC0C1\uC138",disableAutoFocus:!0,disableEnforceFocus:!0,sx:{zIndex:M=>M.zIndex.modal},slotProps:{paper:{sx:{width:720,maxWidth:"100vw"}}},children:ss(Vl,{sx:{display:"flex",flexDirection:"column",height:"100%",userSelect:"none"},children:[Wt(Gp,{task:x,myAccountSeq:r,onToggleCompleted:t,onChangeTitle:n,onChangeIcon:c,onChangeIconColor:i,onClose:b,activityItems:a,activityLoading:h,onLoadActivity:f,onPrint:u,onDelete:g,canDelete:m}),Wt(um,{sx:{borderColor:"#e6e6e3"}}),Wt(Vl,{sx:{flex:1,minHeight:0},children:Wt(Sk,{ref:y,style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:z})}),Wt(um,{sx:{borderColor:"#37352f"}}),Wt(Vl,{sx:{flexShrink:0},children:$})]})})}import{useEffect as Pk,useState as Oo}from"react";import{Box as Wr,Button as lf,IconButton as pm}from"@mui/material";import{FormDialog as mm}from"@ehfuse/mui-form-dialog";import Nk from"@mui/icons-material/Add";import Lk from"@mui/icons-material/DirectionsRunOutlined";import zk from"@mui/icons-material/EditOutlined";import{ErrorAlert as gm}from"@ehfuse/alerts";import{ClearTextField as bm,DateTextField as ym,LabelSelect as xm}from"@ehfuse/mui-form-controls";import{useEffect as Bk,useState as dm}from"react";import{Box as Ro,Button as Ik,FormControlLabel as of,Radio as sf,RadioGroup as Ek}from"@mui/material";import{FormDialog as Mk}from"@ehfuse/mui-form-dialog";import{LabelSelect as Rk}from"@ehfuse/mui-form-controls";import Ok from"@ehfuse/overlay-scrollbar";import{Fragment as Ak,jsx as Pr,jsxs as as}from"react/jsx-runtime";function hm({open:e,sprint:d,remainingTasks:b,sprints:l,onClose:o,onConfirm:s}){let r=l.filter(h=>h.seq!==d?.seq&&h.group_seq===(d?.group_seq??0)&&h.status!=="closed"),[t,n]=dm("backlog"),[c,i]=dm(0);Bk(()=>{e&&(n(r.length>0?"move":"backlog"),i(r[0]?.seq??0))},[e]);let a=b.length>0;return Pr(Mk,{open:e,onClose:o,maxWidth:"sm",title:"\uBAA9\uD45C \uB9C8\uAC10",locale:"ko",backdropClick:!1,titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-sprint-close",tabs:{visible:!1},actions:{showCancelButton:!0,right:Pr(Ik,{variant:"contained",onClick:()=>s({mode:a?t:"keep",moveToSprintSeq:t==="move"?c:0,taskSeqs:b.map(h=>h.seq)}),disabled:a&&t==="move"&&!(c>0),children:"\uB9C8\uAC10"})},sections:[{id:"sprint-close",title:"",showTitle:!1,children:as(Ro,{sx:{display:"flex",flexDirection:"column",gap:2},children:[as(Ro,{sx:{fontSize:18,color:"#37352f"},children:[Pr(Ro,{component:"span",sx:{fontWeight:600},children:d?.name??""})," \uBAA9\uD45C\uB97C \uB9C8\uAC10\uD569\uB2C8\uB2E4."]}),a?as(Ak,{children:[as(Ro,{sx:{fontSize:15,color:"#6f6f6c"},children:["\uB05D\uB098\uC9C0 \uC54A\uC740 \uC5C5\uBB34\uAC00"," ",b.length,"\uAC74 \uC788\uC2B5\uB2C8\uB2E4. \uC5B4\uB5BB\uAC8C \uD560\uAE4C\uC694?"]}),Pr(Ro,{sx:{border:"1px solid #e6e6e3",borderRadius:1,overflow:"hidden"},children:Pr(Ok,{style:{maxHeight:220},thumb:{width:6},children:b.map(h=>as(Ro,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1,borderBottom:"1px solid #f2f2f0","&:last-of-type":{borderBottom:"none"}},children:[Pr(Ro,{sx:{flex:1,minWidth:0,fontSize:16,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:h.title}),Pr(At,{option:ur(h)})]},h.seq))})}),as(Ek,{value:t,onChange:(h,f)=>n(f),children:[r.length>0?Pr(of,{value:"move",control:Pr(sf,{size:"small"}),label:"\uB2E4\uC74C \uBAA9\uD45C\uB85C \uC774\uC6D4",sx:{"& .MuiFormControlLabel-label":{fontSize:16}}}):null,t==="move"&&r.length>0?Pr(Ro,{sx:{pl:4,pb:1},children:Pr(Rk,{size:"small",label:"",fullWidth:!0,value:String(c),options:r.map(h=>({value:String(h.seq),label:h.name})),onChange:h=>i(Number(h.target.value)||0)})}):null,Pr(of,{value:"backlog",control:Pr(sf,{size:"small"}),label:"\uBBF8\uBC30\uC815(\uBC31\uB85C\uADF8)\uC73C\uB85C \uBE7C\uAE30",sx:{"& .MuiFormControlLabel-label":{fontSize:16}}}),Pr(of,{value:"keep",control:Pr(sf,{size:"small"}),label:"\uC774 \uBAA9\uD45C\uC5D0 \uADF8\uB300\uB85C \uB450\uAE30",sx:{"& .MuiFormControlLabel-label":{fontSize:16}}})]})]}):Pr(Ro,{sx:{fontSize:15,color:"#6f6f6c"},children:"\uB0A8\uC740 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4. \uC774\uB300\uB85C \uB9C8\uAC10\uD558\uBA74 \uBAA9\uD45C\uAC00 \uC885\uB8CC\uB429\uB2C8\uB2E4."})]})}]})}var af="custom-";function Dk(e){return e.startsWith(af)}function S$(e){return e>0?`${af}${e}`:""}function Qo(e){if(!Dk(e))return 0;let d=Number(e.slice(af.length));return Number.isInteger(d)&&d>0?d:0}import{Fragment as wm,jsx as Ft,jsxs as ei}from"react/jsx-runtime";var jk=[{value:"planning",label:"\uACC4\uD68D\uC911"},{value:"active",label:"\uC9C4\uD589\uC911"},{value:"closed",label:"\uC885\uB8CC"}];function vm(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?e.slice(5).replace("-","."):"-"}function L$({open:e,customTabs:d,sprints:b,onClose:l,onCreate:o,onUpdate:s,onChangeStatus:r,tasks:t=[],onCloseSprint:n,onRemove:c}){let i=d.filter(O=>O.useSprints&&!O.archived),[a,h]=Oo(""),[f,u]=Oo(""),[g,m]=Oo(""),[v,k]=Oo(""),[B,R]=Oo(""),[L,A]=Oo(!1),[P,N]=Oo(!1),[q,j]=Oo(null),S=q?t.filter(O=>(O.sprint_seq??0)===q.seq&&!O.completed):[],[T,D]=Oo(0);Pk(()=>{e&&(h(i.length===1?i[0].key:""),u(""),m(""),k(""),R(""),D(0))},[e]);let p=()=>{u(""),m(""),k(""),R(""),D(0),N(!1)},y=O=>{D(O.seq),h(`custom-${O.group_seq}`),u(O.name),m(O.goal),k(O.start_date),R(O.end_date)},x=T>0||P,w=async()=>{let O=Qo(a);if(!O){gm("\uBAA9\uD45C\uB97C \uB9CC\uB4E4 \uD504\uB85C\uC81D\uD2B8\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return}if(!f.trim()){gm("\uBAA9\uD45C \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}A(!0);try{if(T>0){s(T,{name:f.trim(),goal:g.trim(),start_date:v,end_date:B}),p();return}await o({group_seq:O,name:f.trim(),goal:g.trim(),start_date:v,end_date:B})&&p()}finally{A(!1)}},_=new Map(d.map(O=>[Qo(O.key),O.label])),C=Ft(Wr,{children:i.length===0?Ft(Wr,{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.'}):Ft(wm,{children:Ft(Wr,{children:b.length===0?ei(Wr,{sx:{py:4,display:"flex",flexDirection:"column",alignItems:"center",gap:2,color:"#9a9a97"},children:[Ft(Lk,{sx:{fontSize:48,color:"#d9d9d6"}}),Ft(Wr,{sx:{fontSize:13.5},children:"\uB4F1\uB85D\uB41C \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."})]}):b.map(O=>ei(Wr,{sx:{display:"flex",flexDirection:"column",gap:1,"&:not(:last-of-type)::after":{content:'""',display:"block",my:1.75,borderBottom:"1px solid #f0efed"}},children:[ei(Wr,{sx:{minWidth:0},children:[ei(Wr,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[Ft(Wr,{component:"span",sx:{fontSize:18,fontWeight:600,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},children:O.name}),Ft(Wr,{component:"span",sx:{flexShrink:0,px:1,py:.25,borderRadius:.75,bgcolor:"#f1f5f9",color:"#64748b",fontSize:13,fontWeight:500},children:_.get(O.group_seq)??"\uC0AD\uC81C\uB41C \uD504\uB85C\uC81D\uD2B8"}),ei(Wr,{component:"span",sx:{flexShrink:0,fontSize:14,color:"#57564f"},children:[vm(O.start_date)," ~"," ",vm(O.end_date)]})]}),O.goal?Ft(Wr,{sx:{mt:.5,fontSize:14,color:"#787774",lineHeight:1.5},children:O.goal}):null]}),ei(Wr,{sx:{display:"flex",alignItems:"center",gap:.5},children:[Ft(xm,{label:"\uC0C1\uD0DC",showLabel:!1,size:"small",value:O.status,options:jk.map(z=>({value:z.value,label:z.label})),onChange:z=>{let $=String(z.target.value);if($==="closed"&&n){j(O);return}r(O.seq,$)},sx:{width:104,flexShrink:0}}),Ft(pm,{"aria-label":"\uBAA9\uD45C \uC218\uC815",onClick:()=>y(O),sx:{color:"#9a9a97","&:hover":{color:"#2563eb"}},children:Ft(zk,{sx:{fontSize:18}})}),Ft(pm,{"aria-label":"\uBAA9\uD45C \uC0AD\uC81C",onClick:()=>c(O.seq),sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:Ft(dr,{style:{width:16,height:16}})})]})]},O.seq))})})});return ei(wm,{children:[Ft(mm,{open:e,onClose:l,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:C}],sectionContentPaddingTop:0,actions:{showCancelButton:!0,left:i.length>0?Ft(lf,{startIcon:Ft(Nk,{}),onClick:()=>{p(),N(!0)},sx:{color:"#2563eb"},children:"\uC0C8 \uBAA9\uD45C"}):void 0,right:Ft(lf,{variant:"contained",onClick:l,children:"\uD655\uC778"})}}),Ft(hm,{open:q!==null,sprint:q,remainingTasks:S,sprints:b,onClose:()=>j(null),onConfirm:O=>{q&&n?.(q.seq,O),j(null)}}),Ft(mm,{open:x,onClose:()=>{N(!1),p()},maxWidth:"sm",title:T>0?"\uBAA9\uD45C \uC218\uC815":"\uC0C8 \uBAA9\uD45C",locale:"ko",backdropClick:!1,tabs:{visible:!1},titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-sprint-form",sections:[{id:"sprint-form",title:"",showTitle:!1,children:Ft(Wr,{sx:{pt:1},children:ei(Wr,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2.5,mt:1},children:[Ft(xm,{label:"\uD504\uB85C\uC81D\uD2B8",size:"medium",value:a,options:i.map(O=>({value:O.key,label:O.label})),onChange:O=>h(String(O.target.value)),disabled:T>0}),Ft(bm,{label:"\uBAA9\uD45C \uC774\uB984",size:"medium",placeholder:"\uC608: 8\uC6D4 2\uC8FC\uCC28",value:f,onChange:O=>u(O.target.value)}),Ft(ym,{size:"medium",label:"\uC2DC\uC791\uC77C",value:v,onChange:O=>k(O.target.value)}),Ft(ym,{size:"medium",label:"\uC885\uB8CC\uC77C",value:B,onChange:O=>R(O.target.value)}),Ft(bm,{label:"\uC124\uBA85",size:"medium",placeholder:"\uC120\uD0DD \uC785\uB825",value:g,onChange:O=>m(O.target.value),sx:{gridColumn:"1 / -1"}})]})})}],actions:{showCancelButton:!0,right:Ft(lf,{variant:"contained",onClick:()=>{w()},disabled:L,children:T>0?"\uC218\uC815":"\uBAA9\uD45C \uB9CC\uB4E4\uAE30"})}})]})}import{Box as rn,Button as Tm,Tooltip as Fk}from"@mui/material";import{FormDialog as qk}from"@ehfuse/mui-form-dialog";import $k from"@mui/icons-material/CalendarMonthOutlined";import Hk from"@mui/icons-material/FileUploadOutlined";import Wk from"@mui/icons-material/FileDownloadOutlined";var cf={google:{key:"google",name:"\uAD6C\uAE00 \uCE98\uB9B0\uB354",homeUrl:"https://calendar.google.com/calendar",defaultCalendarName:"\uAD6C\uAE00 \uCE98\uB9B0\uB354",exportSupported:!0,importSupported:!0,subscribeSteps:["\uBC84\uD2BC\uC774 \uB3D9\uC791\uD558\uC9C0 \uC54A\uC73C\uBA74 \uAD6C\uAE00 \uCE98\uB9B0\uB354 > \uB2E4\uB978 \uCE98\uB9B0\uB354 + > **URL\uB85C \uCD94\uAC00**\uC5D0 \uC704 \uC8FC\uC18C\uB97C \uBD99\uC5EC\uB123\uC73C\uC138\uC694.","\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.","\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."],importSteps:["\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 > **\uC124\uC815 \uBC0F \uACF5\uC720**\uB97C \uC5FD\uB2C8\uB2E4.","**\uCE98\uB9B0\uB354 \uD1B5\uD569** \uC139\uC158\uC758 **iCal \uD615\uC2DD\uC758 \uBE44\uBC00 \uC8FC\uC18C**\uB97C \uBCF5\uC0AC\uD574 \uC544\uB798\uC5D0 \uBD99\uC5EC\uB123\uC73C\uC138\uC694."],importPlaceholder:"https://calendar.google.com/calendar/ical/\u2026/basic.ics",buildSubscribeUrl:e=>`https://calendar.google.com/calendar/r?cid=${encodeURIComponent(e.replace(/^https?:\/\//,"webcal://"))}`},apple:{key:"apple",name:"\uC560\uD50C \uCE98\uB9B0\uB354",homeUrl:"https://www.icloud.com/calendar",defaultCalendarName:"\uC560\uD50C \uCE98\uB9B0\uB354",exportSupported:!0,importSupported:!0,subscribeSteps:["\uC544\uC774\uD3F0\xB7\uC544\uC774\uD328\uB4DC: **\uC124\uC815 > \uCE98\uB9B0\uB354 > \uACC4\uC815 > \uACC4\uC815 \uCD94\uAC00 > \uAE30\uD0C0 > \uAD6C\uB3C5 \uCE98\uB9B0\uB354 \uCD94\uAC00**\uC5D0 \uC704 \uC8FC\uC18C\uB97C \uBD99\uC5EC\uB123\uC73C\uC138\uC694.","\uB9E5: \uCE98\uB9B0\uB354 \uC571 > **\uD30C\uC77C > \uC0C8\uB85C\uC6B4 \uCE98\uB9B0\uB354 \uAD6C\uB3C5**\uC5D0 \uBD99\uC5EC\uB123\uC2B5\uB2C8\uB2E4.","iCloud.com(\uC6F9)\uC5D0\uC11C\uB294 \uAD6C\uB3C5\uC744 \uCD94\uAC00\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4 \u2014 \uAE30\uAE30\uC5D0\uC11C \uCD94\uAC00\uD558\uBA74 iCloud \uB85C \uB3D9\uAE30\uD654\uB429\uB2C8\uB2E4."],importSteps:["iCloud.com > \uCE98\uB9B0\uB354\uC5D0\uC11C \uAC00\uC838\uC62C \uCE98\uB9B0\uB354 \uC606 **\uACF5\uC720 \uC544\uC774\uCF58**\uC744 \uB204\uB985\uB2C8\uB2E4.","**\uACF5\uC6A9 \uCE98\uB9B0\uB354**\uB97C \uCF1C\uACE0 \uB098\uC624\uB294 **\uB9C1\uD06C\uB97C \uBCF5\uC0AC**\uD574 \uC544\uB798\uC5D0 \uBD99\uC5EC\uB123\uC73C\uC138\uC694(webcal:// \uC8FC\uC18C\uB3C4 \uADF8\uB300\uB85C \uB429\uB2C8\uB2E4)."],importPlaceholder:"webcal://p00-calendars.icloud.com/published/\u2026",importWarning:"\uC560\uD50C\uC740 **\uACF5\uC6A9 \uCE98\uB9B0\uB354**\uB85C \uBC14\uAFD4\uC57C \uC8FC\uC18C\uAC00 \uB098\uC635\uB2C8\uB2E4. \uC8FC\uC18C\uB97C \uC544\uB294 \uC0AC\uB78C\uC740 \uADF8 \uCE98\uB9B0\uB354\uB97C \uBCFC \uC218 \uC788\uC73C\uB2C8, \uAC1C\uC778 \uC77C\uC815\uC774 \uB2F4\uAE34 \uCE98\uB9B0\uB354\uB294 \uACF5\uAC1C\uD558\uC9C0 \uB9C8\uC138\uC694."},naver:{key:"naver",name:"\uB124\uC774\uBC84 \uCE98\uB9B0\uB354",homeUrl:"https://calendar.naver.com",defaultCalendarName:"\uB124\uC774\uBC84 \uCE98\uB9B0\uB354",exportSupported:!0,importSupported:!0,subscribeSteps:["\uB124\uC774\uBC84 \uCE98\uB9B0\uB354 > \uC67C\uCABD **\uB0B4 \uCE98\uB9B0\uB354** \uC606 **+** > **URL\uB85C \uAD6C\uB3C5\uD558\uAE30**\uC5D0 \uC704 \uC8FC\uC18C\uB97C \uBD99\uC5EC\uB123\uC73C\uC138\uC694.","\uB124\uC774\uBC84\uAC00 \uD53C\uB4DC\uB97C \uC8FC\uAE30\uC801\uC73C\uB85C \uAC00\uC838\uAC00\uBBC0\uB85C \uBCC0\uACBD\uC0AC\uD56D \uBC18\uC601\uC774 \uB2A6\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4.","\uB0B4\uBCF4\uB0B4\uAE30\uB97C \uADF8\uB9CC\uD558\uB824\uBA74 \uB124\uC774\uBC84 \uCE98\uB9B0\uB354\uC5D0\uC11C \uAD6C\uB3C5\uD55C \uCE98\uB9B0\uB354\uB97C \uC0AD\uC81C\uD558\uBA74 \uB429\uB2C8\uB2E4."],importSteps:["\uB124\uC774\uBC84 \uCE98\uB9B0\uB354 > \uC67C\uCABD **\uCE98\uB9B0\uB354 \uC124\uC815**(\uD1B1\uB2C8)\uC5D0\uC11C \uAC00\uC838\uC62C \uCE98\uB9B0\uB354\uB97C \uACE0\uB985\uB2C8\uB2E4.","**\uC678\uBD80 \uACF5\uAC1C** \uD56D\uBAA9\uC5D0\uC11C **\uCE98\uB9B0\uB354 \uACF5\uAC1C**\uB97C \uCCB4\uD06C\uD558\uBA74 \uB098\uC624\uB294 **iCal \uC8FC\uC18C**\uB97C \uBCF5\uC0AC\uD574 \uC544\uB798\uC5D0 \uBD99\uC5EC\uB123\uC73C\uC138\uC694."],importPlaceholder:"https://calendar.naver.com/\u2026(iCal \uC8FC\uC18C)",importWarning:"\uB124\uC774\uBC84\uB294 **\uCE98\uB9B0\uB354\uB97C \uACF5\uAC1C**\uD574\uC57C iCal \uC8FC\uC18C\uAC00 \uB098\uC635\uB2C8\uB2E4. \uC8FC\uC18C\uB97C \uC544\uB294 \uC0AC\uB78C\uC740 \uADF8 \uCE98\uB9B0\uB354\uB97C \uBCFC \uC218 \uC788\uC73C\uB2C8, \uAC1C\uC778 \uC77C\uC815\uC774 \uB2F4\uAE34 \uCE98\uB9B0\uB354\uB294 \uACF5\uAC1C\uD558\uC9C0 \uB9C8\uC138\uC694."}},_m=Object.values(cf);function Kl(e){return cf[e??"google"]??cf.google}import{jsx as pr,jsxs as ls}from"react/jsx-runtime";function K$({open:e,imports:d=[],onOpenExport:b,onOpenImport:l,onClose:o}){let s=ls(rn,{sx:{display:"flex",flexDirection:"column",gap:"24px"},children:[ls(rn,{sx:{bgcolor:"#f2f6fa",borderRadius:1,px:1.5,py:1.25,fontSize:15,lineHeight:1.8,color:"#37352f",display:"flex",flexDirection:"column",gap:.25,"& > div":{display:"flex",gap:1},"& > div::before":{content:'"\u2022"',flexShrink:0}},children:[pr(rn,{children:ls(rn,{component:"span",children:[pr("b",{children:"\uB0B4\uBCF4\uB0B4\uAE30"}),"\uB294 \uB0B4 \uC5C5\uBB34\uB97C \uB2E4\uB978 \uCE98\uB9B0\uB354\uC5D0\uC11C"," ",pr("b",{children:"\uC77D\uAE30\uC804\uC6A9"}),"\uC73C\uB85C \uBCF4\uAC8C \uD569\uB2C8\uB2E4."]})}),pr(rn,{children:ls(rn,{component:"span",children:[pr("b",{children:"\uAC00\uC838\uC624\uAE30"}),"\uB294 \uADF8 \uCE98\uB9B0\uB354\uC758 \uC77C\uC815\uC744 \uC5C5\uBB34\uD568 \uCE98\uB9B0\uB354\uC5D0 \uACB9\uCCD0 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4."]})}),pr(rn,{children:pr(rn,{component:"span",children:"\uB450 \uBC29\uD5A5 \uBAA8\uB450 \uC6D0\uBCF8\uC744 \uACE0\uCE58\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."})})]}),pr(rn,{sx:{border:"1px solid #e6e6e3",borderRadius:1,overflow:"hidden"},children:_m.map((r,t)=>ls(rn,{sx:{display:"flex",alignItems:"center",gap:2,px:2,py:1.75,borderTop:t>0?"1px solid #f2f2f0":"none"},children:[pr($k,{sx:{fontSize:22,color:"#787774",flexShrink:0}}),ls(rn,{sx:{flex:1,minWidth:0},children:[pr(rn,{sx:{fontSize:16,color:"#37352f"},children:r.name}),r.exportBlockedReason??r.importBlockedReason?pr(rn,{sx:{fontSize:13.5,color:"#8a6d1d",mt:.25,lineHeight:1.6},children:r.exportBlockedReason??r.importBlockedReason}):null]}),pr(Sm,{label:"\uB0B4\uBCF4\uB0B4\uAE30",icon:pr(Hk,{sx:{fontSize:18}}),supported:r.exportSupported,reason:r.exportBlockedReason,onClick:()=>b(r.key)}),pr(Sm,{label:km(d,r.key)>0?`\uAC00\uC838\uC624\uAE30 (${km(d,r.key)})`:"\uAC00\uC838\uC624\uAE30",icon:pr(Wk,{sx:{fontSize:18}}),supported:r.importSupported,reason:r.importBlockedReason,onClick:()=>l(r.key)})]},r.key))})]});return pr(qk,{open:e,onClose:o,width:680,title:"\uCE98\uB9B0\uB354 \uC5F0\uB3D9",locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-calendar-link",sectionContentPaddingTop:0,sections:[{id:"calendar-link",showTitle:!1,children:s}],actions:{showCancelButton:!1,right:pr(Tm,{variant:"contained",onClick:o,children:"\uB2EB\uAE30"})}})}function km(e,d){return e.filter(b=>b.provider===d).length}function Sm({label:e,icon:d,supported:b,reason:l,onClick:o}){let s=pr(rn,{component:"span",sx:{flexShrink:0},children:pr(Tm,{size:"medium",variant:"outlined",startIcon:d,disabled:!b,onClick:o,sx:{minWidth:132,whiteSpace:"nowrap"},children:e})});return b?s:pr(Fk,{title:l??"\uC774 \uC11C\uBE44\uC2A4\uB294 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.",arrow:!0,children:s})}import{useState as Cm}from"react";import{Box as Sr,Button as ff,Divider as Kk,IconButton as Gk,TextField as Yk}from"@mui/material";import{FormDialog as Xk}from"@ehfuse/mui-form-dialog";import Zk from"@mui/icons-material/OpenInNewOutlined";import Jk from"@mui/icons-material/EventOutlined";import{ConfirmDialog as Qk}from"@ehfuse/alerts";import{Fragment as Uk}from"react";import{Fragment as Vk,jsx as uf}from"react/jsx-runtime";function ea({text:e}){let d=String(e??"").split("**");return uf(Vk,{children:d.map((b,l)=>l%2===1?uf("b",{children:b},l):uf(Uk,{children:b},l))})}import{jsx as jt,jsxs as ta}from"react/jsx-runtime";function lH({open:e,imports:d,provider:b,onRegister:l,onRemove:o,onClose:s}){let r=Kl(b),[t,n]=Cm(""),[c,i]=Cm(!1),a=async()=>{let u=t.trim();if(u){i(!0);try{await l(u)&&n("")}finally{i(!1)}}},h=async u=>{await Qk({title:"\uAC00\uC838\uC624\uAE30 \uD574\uC81C",message:`"${u.name||r.defaultCalendarName}" \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30\uB97C \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&o(u.seq)},f=ta(Sr,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[ta(Sr,{sx:{color:"#37352f",lineHeight:1.7},children:[r.name,"\uC758 \uC77C\uC815\uC744 ",jt("b",{children:"\uC77D\uAE30\uC804\uC6A9"}),"\uC73C\uB85C \uC5C5\uBB34\uD568 \uCE98\uB9B0\uB354\uC5D0 \uD568\uAED8 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4.",jt("br",{}),"\uD45C\uC2DC/\uC228\uAE40\uC740 \uC5C5\uBB34\uD568 \uC6B0\uC0C1\uB2E8\uC758 ",jt("b",{children:"\uC678\uBD80 \uCE98\uB9B0\uB354 \uC77C\uC815"})," \uC2A4\uC704\uCE58\uB85C \uCF1C\uACE0 \uB055\uB2C8\uB2E4."]}),jt(Sr,{sx:{fontWeight:700,color:"#37352f",mt:.5},children:"\uB4F1\uB85D\uB41C \uCE98\uB9B0\uB354"}),d.length>0?jt(Sr,{sx:{display:"flex",flexDirection:"column",border:"1px solid #e6e6e3",borderRadius:1},children:d.map((u,g)=>ta(Sr,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:.75,borderTop:g>0?"1px solid #efefed":"none"},children:[jt(Jk,{sx:{fontSize:18,color:"#0f9d58",flexShrink:0}}),jt(Sr,{component:"span",sx:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:u.name||r.defaultCalendarName}),jt(Gk,{"aria-label":"\uAC00\uC838\uC624\uAE30 \uD574\uC81C",size:"small",onClick:()=>{h(u)},sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:jt(dr,{sx:{fontSize:18}})})]},u.seq))}):jt(Sr,{sx:{color:"#9a9a97",px:.5},children:"\uC544\uC9C1 \uB4F1\uB85D\uB41C \uCE98\uB9B0\uB354\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}),jt(Kk,{sx:{my:1,borderColor:"#e6e6e3"}}),jt(Sr,{sx:{fontWeight:700,color:"#37352f"},children:"\uC0C8 \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30"}),ta(Sr,{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:[r.importSteps.map(u=>jt(Sr,{children:jt(Sr,{component:"span",children:jt(ea,{text:u})})},u)),jt(Sr,{children:jt(Sr,{component:"span",children:"\uB4F1\uB85D\uD55C \uC8FC\uC18C\uB294 \uC11C\uBC84\uC5D0 \uC800\uC7A5\uB418\uBA70 \uB2E4\uB978 \uC9C1\uC6D0\uC5D0\uAC8C \uBCF4\uC774\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."})}),jt(Sr,{children:jt(Sr,{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."})}),r.importWarning?jt(Sr,{children:jt(Sr,{component:"span",children:jt(ea,{text:r.importWarning})})}):null]}),ta(Sr,{sx:{display:"flex",gap:2,alignItems:"center"},children:[jt(Yk,{value:t,onChange:u=>n(u.target.value),fullWidth:!0,label:"iCal \uC8FC\uC18C",placeholder:r.importPlaceholder,slotProps:{input:{spellCheck:!1}}}),jt(ff,{variant:"contained",disabled:!t.trim()||c,onClick:()=>{a()},sx:{flexShrink:0},children:c?"\uD655\uC778 \uC911\u2026":"\uB4F1\uB85D"})]})]});return jt(Xk,{open:e,onClose:s,width:680,title:`${r.name} \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:f}],actions:{showCancelButton:!1,left:jt(ff,{variant:"outlined",startIcon:jt(Zk,{sx:{fontSize:16}}),onClick:()=>window.open(r.homeUrl,"_blank"),children:r.name}),right:jt(ff,{variant:"contained",onClick:s,children:"\uB2EB\uAE30"})}})}import{Box as _i,Button as ra,TextField as e6}from"@mui/material";import{FormDialog as t6}from"@ehfuse/mui-form-dialog";import r6 from"@mui/icons-material/ContentCopyOutlined";import Bm from"@mui/icons-material/OpenInNewOutlined";import{InfoAlert as Im}from"@ehfuse/alerts";import{Fragment as o6,jsx as Er,jsxs as ki}from"react/jsx-runtime";function n6(e){return`${window.location.origin}/api/v1/taskbox/calendar/${e}.ics`}function yH({open:e,feed:d,feedTaskCount:b,provider:l,buildFeedUrl:o,onSubscribe:s,onClose:r}){let t=Kl(l),n=o??n6,c=d.subscribed?n(d.token):"",i=()=>{navigator.clipboard.writeText(c).then(()=>Im("\uD53C\uB4DC \uC8FC\uC18C\uB97C \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>Im("\uBCF5\uC0AC\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uC8FC\uC18C\uB97C \uC9C1\uC811 \uC120\uD0DD\uD574 \uBCF5\uC0AC\uD558\uC138\uC694."))},a=()=>{let f=t.buildSubscribeUrl?.(c);f&&window.open(f,"_blank")},h=ki(_i,{sx:{display:"flex",flexDirection:"column",gap:2.5},children:[ki(_i,{sx:{color:"#37352f",lineHeight:1.7},children:["\uB0B4\uAC00 \uAD00\uC5EC\uD55C \uC5C5\uBB34\uB97C ",Er("b",{children:"\uC77D\uAE30\uC804\uC6A9"}),"\uC73C\uB85C ",t.name,"\uC5D0\uC11C \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4."]}),b===0?ki(_i,{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.",Er("br",{}),Er("b",{children:"\uB9C8\uAC10\uC608\uC815\uC774 \uC788\uB294 \uB0B4 \uC5C5\uBB34 \uB610\uB294 \uBCF4\uB0B8\uC5C5\uBB34"}),"\uAC00 \uC0DD\uAE30\uBA74"," ",d.subscribed?`${t.name}\uC5D0 \uC790\uB3D9\uC73C\uB85C \uD45C\uC2DC\uB429\uB2C8\uB2E4.`:"\uC5EC\uAE30\uC11C \uAD6C\uB3C5\uC744 \uC2DC\uC791\uD558\uC138\uC694."]}):d.subscribed&&d.enabled?ki(o6,{children:[Er(e6,{value:c,fullWidth:!0,label:"\uB0B4 \uD53C\uB4DC \uC8FC\uC18C",slotProps:{input:{readOnly:!0}}}),ki(_i,{sx:{display:"flex",gap:2},children:[Er(ra,{variant:"outlined",startIcon:Er(r6,{}),onClick:i,children:"\uC8FC\uC18C \uBCF5\uC0AC"}),t.buildSubscribeUrl?ki(ra,{variant:"contained",startIcon:Er(Bm,{}),onClick:a,children:[t.name,"\uC5D0 \uCD94\uAC00"]}):null]}),ki(_i,{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:[t.subscribeSteps.map(f=>Er(_i,{children:Er("span",{children:Er(ea,{text:f})})},f)),Er(_i,{children:Er("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."})})]})]}):Er(ra,{variant:"contained",onClick:s,sx:{alignSelf:"flex-start"},children:"\uAD6C\uB3C5 \uC2DC\uC791 (\uD53C\uB4DC \uBC1C\uAE09)"})]});return Er(t6,{open:e,onClose:r,width:680,title:`${t.name}\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:h}],actions:{showCancelButton:!1,left:Er(ra,{variant:"outlined",startIcon:Er(Bm,{sx:{fontSize:16}}),onClick:()=>window.open(t.homeUrl,"_blank"),children:t.name}),right:Er(ra,{variant:"contained",onClick:r,children:"\uB2EB\uAE30"})}})}import{useEffect as i6,useMemo as df,useState as hf}from"react";import{Box as na,Button as s6,Typography as a6}from"@mui/material";import{FormDialog as l6}from"@ehfuse/mui-form-dialog";import{SearchTextField as c6}from"@ehfuse/mui-form-controls";import{TreeView as u6}from"@ehfuse/tree-view";import{Fragment as g6,jsx as zn,jsxs as b6}from"react/jsx-runtime";function Em(e){return`${e.name}#${e.seq}`}function f6(e){return Number(e.slice(e.lastIndexOf("#")+1))||0}function d6(e){let d=[],b=l=>{for(let o of l.employees??[])d.push(o);for(let o of l.groups??[])b(o)};for(let l of e)b(l);return d}function h6(e,d){return d?[e.name,e.department,e.role_name,e.work_position].filter(Boolean).some(b=>String(b).toLowerCase().includes(d)):!0}function p6(e){let d=[[e.name,e.role_name].filter(Boolean).join(" "),e.department].filter(Boolean).join(" / ");return{id:`emp:${e.seq}`,label:Em(e),renderLabel:zn(na,{component:"span",sx:{display:"inline-flex",alignItems:"baseline",gap:.75},children:zn(na,{component:"span",sx:{fontWeight:400,color:"text.primary"},children:d})})}}function Mm(e,d){let b=(e.groups??[]).map(o=>Mm(o,d)).filter(o=>o!==null),l=(e.employees??[]).filter(o=>h6(o,d)).map(p6);return b.length===0&&l.length===0?null:{id:`group:${e.key}`,label:e.name,children:[...b,...l]}}function m6({groups:e,allEmployees:d,initialSelectedSeqs:b,multiple:l,isMobile:o,onSelectionChange:s}){let[r,t]=hf(""),n=df(()=>e.map(i=>Mm(i,r.trim().toLowerCase())).filter(i=>i!==null),[e,r]),c=df(()=>d.filter(i=>b.includes(i.seq)).map(Em),[]);return b6(g6,{children:[zn(na,{sx:{px:1.5,py:1,borderBottom:"1px solid #cccccc",flexShrink:0},children:zn(c6,{size:"small",fullWidth:!0,placeholder:"\uC774\uB984, \uBD80\uC11C \uAC80\uC0C9",onSearch:t,onClear:()=>t(""),sx:{"& .MuiOutlinedInput-notchedOutline":{border:"none"},"& .MuiInputBase-root":{px:0}}})}),zn(na,{sx:o?{display:"flex",flexDirection:"column"}:{flex:1,minHeight:0,overflow:"hidden",display:"flex",flexDirection:"column"},children:zn(u6,{items:n,checkbox:!0,multiSelect:l,selectionMode:"child",showSearch:!1,defaultExpanded:!0,initialSelections:c,onChange:i=>s(i.map(f6).filter(a=>a>0)),styles:{border:"none",borderRadius:"0"}})})]})}function BH({open:e,title:d="\uC9C1\uC6D0 \uC120\uD0DD",hint:b="",groups:l,multiple:o=!1,selectedSeqs:s,confirmText:r="\uD655\uC778",onConfirm:t,onClose:n}){let c=Lt(),[i,a]=hf([]),[h,f]=hf(0),u=df(()=>d6(l),[l]),g=s??[];i6(()=>{e&&(a(g),f(v=>v+1))},[e]);let m=()=>{let v=u.filter(k=>i.includes(k.seq));t(o?v:v.slice(0,1)),n()};return zn(l6,{open:e,onClose:n,title:`${d}${o&&i.length>0?` (${i.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:zn(na,{sx:{...c?{}:{height:560},display:"flex",flexDirection:"column",border:"1px solid #cccccc",borderRadius:1,...c?{}:{overflow:"hidden"},userSelect:"none"},children:zn(m6,{groups:l,allEmployees:u,initialSelectedSeqs:g,multiple:o,isMobile:c,onSelectionChange:a},h)})}],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:b?zn(a6,{variant:"body2",color:"text.secondary",sx:{whiteSpace:"pre-line",lineHeight:1.35},children:b}):void 0,right:zn(s6,{variant:"contained",onClick:m,children:r})}})}import{useEffect as q8,useMemo as f0,useState as ua}from"react";import{Box as Po,Button as d0}from"@mui/material";import{FormDialog as $8}from"@ehfuse/mui-form-dialog";import{LabelSelect as kf}from"@ehfuse/mui-form-controls";import H8 from"@mui/icons-material/SpeedOutlined";import{useEffect as y6,useState as x6}from"react";import{Box as nn,Button as v6}from"@mui/material";import{FormDialog as w6}from"@ehfuse/mui-form-dialog";import{LabelSelect as _6,NumberField as Rm}from"@ehfuse/mui-form-controls";import k6 from"@ehfuse/overlay-scrollbar";import{jsx as Ur,jsxs as oa}from"react/jsx-runtime";var S6=[{value:"count",label:"\uBBF8\uC644\uB8CC \uAC74\uC218"},{value:"points",label:"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8"}];function Om({open:e,capacity:d,employees:b,onClose:l,onSave:o}){let[s,r]=x6(d??fo);y6(()=>{e&&r(d??fo)},[e,d]);let t=s.basis==="points"?"SP":"\uAC74",n=(c,i)=>{let a=Math.max(0,Math.floor(Number(i)||0));r(h=>{let f={...h.by_account};return a>0?f[c]=a:delete f[c],{...h,by_account:f}})};return Ur(w6,{open:e,onClose:l,maxWidth:"sm",title:"\uC778\uC6D0 \uC6A9\uB7C9",locale:"ko",backdropClick:!1,titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-workload-capacity",tabs:{visible:!1},actions:{showCancelButton:!0,right:Ur(v6,{variant:"contained",onClick:()=>{o(s)},children:"\uC800\uC7A5"})},sectionContentPaddingTop:0,sections:[{id:"capacity",title:"",showTitle:!1,children:oa(nn,{sx:{display:"flex",flexDirection:"column",gap:2},children:[Ur(nn,{sx:{fontSize:15,color:"#37352f"},children:"\uD55C \uC0AC\uB78C\uC774 \uB3D9\uC2DC\uC5D0 \uC548\uC744 \uC218 \uC788\uB294 \uC591\uC744 \uC815\uD569\uB2C8\uB2E4. \uC774 \uAC12\uC744 \uB118\uAE30\uBA74 \uC6CC\uD06C\uB85C\uB4DC \uCC28\uD2B8\uC5D0\uC11C \uBD89\uAC8C \uD45C\uC2DC\uB429\uB2C8\uB2E4. 0 \uC73C\uB85C \uB450\uBA74 \uC6A9\uB7C9\uC744 \uC4F0\uC9C0 \uC54A\uACE0 \uD300 \uD3C9\uADE0\uC744 \uAE30\uC900\uC73C\uB85C \uBD05\uB2C8\uB2E4."}),oa(nn,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[Ur(nn,{sx:{width:104,flexShrink:0,fontSize:16,color:"#37352f"},children:"\uC138\uB294 \uB2E8\uC704"}),Ur(_6,{size:"medium",fullWidth:!0,label:"",value:s.basis,options:S6,onChange:c=>r(i=>({...i,basis:c.target.value}))})]}),oa(nn,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[Ur(nn,{sx:{width:104,flexShrink:0,fontSize:16,color:"#37352f"},children:"\uAE30\uBCF8 \uC6A9\uB7C9"}),Ur(Rm,{size:"medium",fullWidth:!0,min:0,max:999,thousandSeparator:!1,align:"right",suffix:t,value:s.default_capacity,onValueChange:c=>r(i=>({...i,default_capacity:Math.max(0,Math.floor(Number(c)||0))}))})]}),Ur(nn,{sx:{pl:"119px",mt:-1.25,fontSize:13.5,color:"#37352f"},children:`\uC804\uC6D0 \uACF5\uD1B5 \uAE30\uC900(${t}) \xB7 0 = \uC6A9\uB7C9 \uC548 \uC500`}),Ur(nn,{sx:{fontSize:16,fontWeight:700,color:"#37352f"},children:"\uC0AC\uB78C\uBCC4 \uC608\uC678"}),b.length===0?Ur(nn,{sx:{fontSize:15,color:"#787774"},children:"\uC9C1\uC6D0 \uBAA9\uB85D\uC774 \uC5C6\uC2B5\uB2C8\uB2E4. \uAE30\uBCF8 \uC6A9\uB7C9\uB9CC \uC801\uC6A9\uB429\uB2C8\uB2E4."}):Ur(nn,{sx:{border:"1px solid #e6e6e3",borderRadius:1,overflow:"hidden"},children:Ur(k6,{style:{maxHeight:260},thumb:{width:6},children:b.filter(c=>Number(c.account_seq)>0).map(c=>oa(nn,{sx:{display:"flex",alignItems:"center",gap:1.5,px:2,py:1,borderBottom:"1px solid #f2f2f0","&:last-of-type":{borderBottom:"none"}},children:[oa(nn,{sx:{flex:1,minWidth:0,fontSize:16,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[c.name,c.department?Ur(nn,{component:"span",sx:{ml:1,fontSize:14,color:"#787774"},children:c.department}):null]}),Ur(nn,{sx:{width:132,flexShrink:0},children:Ur(Rm,{size:"small",fullWidth:!0,min:0,max:999,thousandSeparator:!1,align:"right",suffix:t,clearWhenZero:!0,value:s.by_account[Number(c.account_seq)]??0,onValueChange:i=>n(Number(c.account_seq),String(i??""))})})]},c.account_seq))})})]})}]})}import{Box as Yl}from"@mui/material";import{Bar as I6,BarChart as E6,CartesianGrid as M6,Cell as R6,ReferenceLine as O6,ResponsiveContainer as A6,Tooltip as D6,XAxis as P6,YAxis as N6}from"recharts";import{Box as T6}from"@mui/material";import{jsx as C6}from"react/jsx-runtime";function Vr({text:e,height:d}){return C6(T6,{sx:{display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center",fontSize:14.5,color:"#9a9a97",...typeof d=="number"?{height:d,minHeight:120}:{position:"absolute",inset:0,pointerEvents:"none"}},children:e})}import{createElement as B6}from"react";var Gl="#2f80ed",Am="#a9c9f5",Si="#9a9a97",pf="#2e9e6b",oo="#3d7eff",mf="#c3c8ce",ia="#f2a30f",sa={contentStyle:{fontSize:13.5,color:"#37352f",border:"1px solid #e6e6e3",borderRadius:6},labelStyle:{fontSize:13.5,color:"#37352f",fontWeight:700},itemStyle:{fontSize:13.5}},cs={...sa,cursor:!1},us={wrapperStyle:{fontSize:13.5,paddingTop:10},formatter:e=>B6("span",{style:{paddingRight:14,color:"#37352f"}},e)};function mr(e){return{display:"flex",flexDirection:"column",minHeight:0,position:"relative",...typeof e=="string"?{flex:1}:{}}}var Nr={flexShrink:0,mb:1.5,display:"flex",alignItems:"center",gap:2,flexWrap:"wrap"};function io(e){return{"& *":{outline:"none"},userSelect:"none",...typeof e=="number"?{height:e,flexShrink:0}:{flex:1,minHeight:0}}}import{jsx as jn,jsxs as aa}from"react/jsx-runtime";function L6(e,d){let b=d.filter(l=>l.sprint_seq===e.seq&&!l.archived&&l.completed);return{points:b.reduce((l,o)=>l+(o.story_points??0),0),count:b.length}}function Dm({sprints:e,tasks:d,height:b=200}){let o=[...e].sort((i,a)=>`${i.start_date}|${i.seq}`.localeCompare(`${a.start_date}|${a.seq}`)).map(i=>({sprint:i,...L6(i,d)})),s=o.some(i=>i.points>0),r=s?"SP":"\uAC74",t=o.filter(i=>i.sprint.status==="closed").map(i=>s?i.points:i.count),n=t.length>0?Math.round(t.reduce((i,a)=>i+a,0)/t.length*10)/10:null,c=o.map(i=>({\uBAA9\uD45C:`${i.sprint.name}${i.sprint.status!=="closed"?" (\uC9C4\uD589\uC911)":""}`,\uC644\uB8CC:s?i.points:i.count,closed:i.sprint.status==="closed"}));return o.length===0?jn(Vr,{text:"\uD45C\uC2DC\uD560 \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",height:b}):aa(Yl,{sx:mr(b),children:[aa(Yl,{sx:{flexShrink:0,mb:1,display:"flex",justifyContent:"space-between",flexWrap:"wrap",gap:1,fontSize:14,color:"#000"},children:[aa("span",{children:["\uC644\uB8CC ",s?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uBAA9\uD45C\uBCC4"]}),n!==null?aa("span",{children:["\uD3C9\uADE0(\uC885\uB8CC \uBAA9\uD45C)"," ",jn(Yl,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:n}),r]}):null]}),jn(Yl,{sx:io(b),children:jn(A6,{width:"100%",height:"100%",children:aa(E6,{data:c,margin:{top:8,right:12,left:0,bottom:0},barCategoryGap:"28%",children:[jn(M6,{strokeDasharray:"3 3",stroke:"#e6e6e3"}),jn(P6,{dataKey:"\uBAA9\uD45C",tick:{fontSize:13},tickMargin:6,interval:0}),jn(N6,{tick:{fontSize:13},width:40,allowDecimals:!1}),jn(D6,{...cs,formatter:i=>`${Number(i??0)}${r}`}),n!==null?jn(O6,{y:n,stroke:Si,strokeDasharray:"6 5",label:{value:`\uD3C9\uADE0 ${n}${r}`,position:"right",fontSize:13}}):null,jn(I6,{dataKey:"\uC644\uB8CC",radius:[4,4,0,0],children:c.map(i=>jn(R6,{fill:i.closed?Gl:Am},i.\uBAA9\uD45C))})]})})})]})}import{useMemo as z6}from"react";import{Box as so}from"@mui/material";import{CartesianGrid as j6,Line as Pm,LineChart as F6,ResponsiveContainer as q6,Tooltip as $6,XAxis as H6,YAxis as W6}from"recharts";import{jsx as on,jsxs as ti}from"react/jsx-runtime";function Nm(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?new Date(`${e}T00:00:00`):null}function U6(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function V6(e){return e.slice(5).replace("-",".")}function Lm({sprint:e,tasks:d,todayStr:b,height:l=200,headerLeft:o}){let s=z6(()=>{let a=Nm(e.start_date),h=Nm(e.end_date);if(!a||!h||h<a||Math.round((h.getTime()-a.getTime())/864e5)+1>366)return null;let u=d.filter(P=>P.sprint_seq===e.seq&&!P.archived);if(u.length===0)return{empty:!0};let g=u.some(P=>(P.story_points??0)>0),m=P=>g?P.story_points??0:1,v=u.reduce((P,N)=>P+m(N),0),k=new Map;for(let P of u){if(!P.completed)continue;let N=(P.completed_time??"").slice(0,10),q=/^\d{4}-\d{2}-\d{2}$/.test(N)?N:e.start_date;k.set(q,(k.get(q)??0)+m(P))}let B=[];for(let P=new Date(a);P<=h;P.setDate(P.getDate()+1))B.push(U6(P));let R=v,L=v;return{empty:!1,data:B.map((P,N)=>{let q=B.length===1?0:v*(1-N/(B.length-1));return P<=b&&(R-=k.get(P)??0,L=Math.max(0,R)),{\uB0A0\uC9DC:V6(P),\uC774\uC0C1:Math.round(q*10)/10,\uB0A8\uC740\uB7C9:P<=b?Math.max(0,R):null}}),total:v,usePoints:g,last:L}},[e,d,b]);if(!s)return ti(so,{sx:mr(l),children:[o?on(so,{sx:Nr,children:o}):null,on(Vr,{text:"\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.",height:l})]});if(s.empty)return ti(so,{sx:mr(l),children:[o?on(so,{sx:Nr,children:o}):null,on(Vr,{text:"\uBC30\uC815\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",height:l})]});let{data:r,total:t,usePoints:n,last:c}=s,i=n?"SP":"\uAC74";return ti(so,{sx:mr(l),children:[ti(so,{sx:Nr,children:[o?on(so,{sx:{flexShrink:0},children:o}):null,ti(so,{sx:{flex:1,minWidth:220,display:"flex",justifyContent:"space-between",flexWrap:"wrap",gap:1,fontSize:14,color:"#000"},children:[ti("span",{children:["\uB0A8\uC740 ",n?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uCD1D ",t]}),ti("span",{children:["\uD604\uC7AC"," ",on(so,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:c}),i," \uB0A8\uC74C"]})]})]}),on(so,{sx:io(l),children:on(q6,{width:"100%",height:"100%",children:ti(F6,{data:r,margin:{top:8,right:12,left:0,bottom:0},children:[on(j6,{strokeDasharray:"3 3",stroke:"#e6e6e3"}),on(H6,{dataKey:"\uB0A0\uC9DC",tick:{fontSize:13},tickMargin:6,minTickGap:24}),on(W6,{tick:{fontSize:13},width:40,allowDecimals:!1}),on($6,{...sa,formatter:a=>`${Number(a??0)}${i}`}),on(Pm,{type:"linear",dataKey:"\uC774\uC0C1",stroke:Si,strokeDasharray:"6 5",strokeWidth:1.5,dot:!1}),on(Pm,{type:"monotone",dataKey:"\uB0A8\uC740\uB7C9",stroke:Gl,strokeWidth:2.5,dot:!1,connectNulls:!1})]})})})]})}import{useMemo as Wm}from"react";import{Box as ao}from"@mui/material";import{Area as yf,AreaChart as X6,CartesianGrid as Z6,Legend as J6,ResponsiveContainer as Q6,Tooltip as e8,XAxis as t8,YAxis as r8}from"recharts";function Ao(e){let d=b=>String(b).padStart(2,"0");return`${e.getFullYear()}-${d(e.getMonth()+1)}-${d(e.getDate())}`}function Xl(e,d=new Date){let b=new Date(d);return b.setMonth(b.getMonth()-e),b}function rW(e=new Date){return{fromDate:Ao(Xl(1,e)),toDate:Ao(e)}}var bf=864e5,la=[0,1,2,3,5,8,13,21];function Fm(e){return!e.archived&&!e.linked_only&&!e.is_notice&&!e.is_event}function gf(e){let d=String(e??"").trim(),b=/^(\d{4}-\d{2}-\d{2})(?:[ T](\d{2}:\d{2}))?/.exec(d);if(!b)return null;let l=new Date(`${b[1]}T${b[2]??"00:00"}:00`).getTime();return Number.isNaN(l)?null:l}function fs(e){let d=String(e??"").trim();return/^\d{4}-\d{2}-\d{2}/.test(d)?d.slice(0,10):""}function K6(e){let d=fs(e.created_time)||fs(e.start_date)||fs(e.completed_time);if(!d)return null;let b=fs(e.start_date),l=b&&b>d?b:d,o=e.completed?fs(e.completed_time)||d:"";return{created:d,started:l,done:o}}function qm(e,d){let b=/^\d{4}-\d{2}-\d{2}$/.test(d)?new Date(`${d}T00:00:00`):new Date,l=Math.max(2,Math.min(366,Math.round(e))),o=[];for(let s=l-1;s>=0;s-=1)o.push(Ao(new Date(b.getTime()-s*bf)));return o}function $m(e,d,b){let l=qm(d,b),o=e.filter(Fm).map(K6).filter(n=>n!==null),s=l.map(n=>{let c=0,i=0,a=0;for(let h of o)h.created>n||(h.done&&h.done<=n?c+=1:h.started<=n?i+=1:a+=1);return{day:n,done:c,inProgress:i,waiting:a}}),r=s[s.length-1],t=s.reduce((n,c)=>Math.max(n,c.done+c.inProgress+c.waiting),0);return{points:s,max:t,currentWip:r?.inProgress??0,currentTotal:r?r.done+r.inProgress+r.waiting:0,currentDone:r?.done??0}}function G6(e,d){if(e.length===0)return 0;let b=Math.min(e.length-1,Math.max(0,Math.ceil(e.length*d)-1));return e[b]}function zm(e){if(e.length===0)return null;let d=[...e].sort((s,r)=>s-r),b=s=>Math.round(s*10)/10,l=Math.floor(d.length/2),o=d.length%2===1?d[l]:(d[l-1]+d[l])/2;return{count:d.length,median:b(o),average:b(d.reduce((s,r)=>s+r,0)/d.length),p85:b(G6(d,.85))}}function jm(e){for(let d=la.length-1;d>=0;d-=1)if(e>=la[d])return d;return 0}function Y6(){return la.map((e,d)=>d===la.length-1?`${e}\uC77C+`:`${e}~${la[d+1]}\uC77C`)}function Hm(e,d,b){let l=qm(d,b),o=l[0],s=l[l.length-1],r=Y6(),t=r.map(()=>0),n=r.map(()=>0),c=[],i=[];for(let a of e){if(!Fm(a)||!a.completed)continue;let h=fs(a.completed_time);if(!h||h<o||h>s)continue;let f=gf(a.completed_time),u=gf(a.created_time);if(f===null||u===null)continue;let g=Math.max(0,(f-u)/bf);c.push(g),t[jm(g)]+=1;let m=gf(a.start_date);if(m===null||m>f)continue;let v=Math.max(0,(f-Math.max(m,u))/bf);i.push(v),n[jm(v)]+=1}return{labels:r,leadCounts:t,cycleCounts:n,lead:zm(c),cycle:zm(i)}}import{jsx as Kr,jsxs as ri}from"react/jsx-runtime";function n8(e){return e.slice(5).replace("-",".")}function Um({tasks:e,todayStr:d,days:b=30,height:l=220,headerLeft:o}){let s=Wm(()=>$m(e,b,d),[e,b,d]),r=Wm(()=>s.points.map(n=>({\uB0A0\uC9DC:n8(n.day),\uC644\uB8CC:n.done,\uC9C4\uD589:n.inProgress,\uB300\uAE30:n.waiting})),[s]),t=ri(ao,{sx:Nr,children:[o?Kr(ao,{sx:{flexShrink:0},children:o}):null,ri(ao,{sx:{flex:1,minWidth:220,display:"flex",flexDirection:"column",gap:.5},children:[ri(ao,{sx:{display:"flex",justifyContent:"space-between",flexWrap:"wrap",gap:1,fontSize:14,color:"#000"},children:[ri("span",{children:["\uCD5C\uADFC ",s.points.length,"\uC77C \u2014 \uC811\uC218 ",s.currentTotal,"\uAC74 / \uC644\uB8CC ",s.currentDone,"\uAC74"]}),ri("span",{children:["\uC9C4\uD589 \uC911"," ",Kr(ao,{component:"span",sx:{color:oo,fontWeight:700},children:s.currentWip}),"\uAC74"]})]}),Kr(ao,{sx:{fontSize:13.5,color:"#37352f"},children:"\uB760\uAC00 \uB450\uAEBC\uC6CC\uC9C0\uBA74 \uC77C\uC774 \uC313\uC774\uB294 \uC911, \uC587\uC544\uC9C0\uBA74 \uCC98\uB9AC\uB418\uB294 \uC911\uC785\uB2C8\uB2E4."})]})]});return r.length===0||s.max===0?ri(ao,{sx:mr(l),children:[o?Kr(ao,{sx:Nr,children:o}):null,Kr(Vr,{text:"\uC774 \uAE30\uAC04\uC5D0 \uC811\uC218\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",height:l})]}):ri(ao,{sx:mr(l),children:[t,Kr(ao,{sx:io(l),children:Kr(Q6,{width:"100%",height:"100%",children:ri(X6,{data:r,margin:{top:8,right:12,left:0,bottom:4},children:[Kr(Z6,{strokeDasharray:"3 3",stroke:"#e6e6e3"}),Kr(t8,{dataKey:"\uB0A0\uC9DC",tick:{fontSize:13},tickMargin:6,minTickGap:24}),Kr(r8,{tick:{fontSize:13},width:40,allowDecimals:!1}),Kr(e8,{...sa,formatter:n=>`${Number(n??0)}\uAC74`}),Kr(J6,{...us}),Kr(yf,{type:"monotone",dataKey:"\uC644\uB8CC",stackId:"flow",stroke:pf,fill:pf,fillOpacity:.9}),Kr(yf,{type:"monotone",dataKey:"\uC9C4\uD589",stackId:"flow",stroke:oo,fill:oo,fillOpacity:.85}),Kr(yf,{type:"monotone",dataKey:"\uB300\uAE30",stackId:"flow",stroke:mf,fill:mf,fillOpacity:.9})]})})})]})}import{useMemo as Vm}from"react";import{Box as sn}from"@mui/material";import{Bar as Km,BarChart as o8,CartesianGrid as i8,Legend as s8,ResponsiveContainer as a8,Tooltip as l8,XAxis as c8,YAxis as u8}from"recharts";import{jsx as Tr,jsxs as Sn}from"react/jsx-runtime";function Gm({label:e,color:d,summary:b}){let l=Sn(sn,{sx:{display:"flex",alignItems:"center",gap:.75},children:[Tr(sn,{sx:{width:10,height:10,borderRadius:.5,bgcolor:d,flexShrink:0}}),Tr(sn,{component:"span",sx:{fontWeight:700,color:"#37352f"},children:e})]});return b?Sn(sn,{sx:{display:"contents"},children:[l,Sn("span",{children:[b.count,"\uAC74"]}),Sn("span",{children:["\uC911\uC559\uAC12"," ",Tr(sn,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:b.median}),"\uC77C"]}),Sn("span",{children:["\uD3C9\uADE0 ",b.average,"\uC77C"]}),Sn("span",{children:["85% ",b.p85,"\uC77C \uC774\uB0B4"]})]}):Sn(sn,{sx:{display:"contents"},children:[l,Tr(sn,{component:"span",sx:{gridColumn:"span 4",color:"#9a9a97"},children:"\uD45C\uBCF8 \uC5C6\uC74C"})]})}function Ym({tasks:e,todayStr:d,days:b=30,height:l=200,headerLeft:o}){let s=Vm(()=>Hm(e,b,d),[e,b,d]),r=Vm(()=>s.labels.map((t,n)=>({\uAD6C\uAC04:t,\uB9AC\uB4DC\uD0C0\uC784:s.leadCounts[n],\uC0AC\uC774\uD074\uD0C0\uC784:s.cycleCounts[n]})),[s]);return s.lead?Sn(sn,{sx:mr(l),children:[Sn(sn,{sx:Nr,children:[o?Tr(sn,{sx:{flexShrink:0},children:o}):null,Sn(sn,{sx:{flex:1,minWidth:260,display:"grid",gridTemplateColumns:"max-content max-content max-content max-content max-content",justifyContent:"start",alignItems:"center",columnGap:3,rowGap:.5,fontSize:14,color:"#000"},children:[Tr(Gm,{label:"\uB9AC\uB4DC\uD0C0\uC784(\uC791\uC131\u2192\uC644\uB8CC)",color:oo,summary:s.lead}),Tr(Gm,{label:"\uC0AC\uC774\uD074\uD0C0\uC784(\uC2DC\uC791\u2192\uC644\uB8CC)",color:ia,summary:s.cycle})]})]}),Tr(sn,{sx:io(l),children:Tr(a8,{width:"100%",height:"100%",children:Sn(o8,{data:r,margin:{top:8,right:12,left:0,bottom:4},barCategoryGap:"24%",children:[Tr(i8,{strokeDasharray:"3 3",stroke:"#e6e6e3"}),Tr(c8,{dataKey:"\uAD6C\uAC04",tick:{fontSize:13},tickMargin:6,interval:0}),Tr(u8,{tick:{fontSize:13},width:40,allowDecimals:!1}),Tr(l8,{...cs,formatter:t=>`${Number(t??0)}\uAC74`}),Tr(s8,{...us}),Tr(Km,{dataKey:"\uB9AC\uB4DC\uD0C0\uC784",fill:oo,radius:[3,3,0,0]}),Tr(Km,{dataKey:"\uC0AC\uC774\uD074\uD0C0\uC784",fill:ia,radius:[3,3,0,0]})]})})})]}):Sn(sn,{sx:mr(l),children:[o?Tr(sn,{sx:Nr,children:o}):null,Tr(Vr,{text:"\uC774 \uAE30\uAC04\uC5D0 \uC644\uB8CC\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",height:l})]})}import{useMemo as Qm}from"react";import{Box as Ti}from"@mui/material";import{Bar as vf,BarChart as m8,CartesianGrid as g8,Cell as b8,Legend as y8,ReferenceLine as e0,ResponsiveContainer as x8,Tooltip as v8,XAxis as w8,YAxis as _8}from"recharts";function f8(e,d){if(!/^\d{4}-\d{2}-\d{2}$/.test(e)||!/^\d{4}-\d{2}-\d{2}$/.test(d))return null;let b=new Date(`${e}T00:00:00`).getTime(),l=new Date(`${d}T00:00:00`).getTime();return Number.isNaN(b)||Number.isNaN(l)?null:Math.round((l-b)/864e5)}function d8(e,d,b){let l=String(e.due_date??"").slice(0,10),o=f8(d,l);return o===null?"later":o<0?"overdue":o<=b?"soon":"later"}function Zl(e,d){let{todayStr:b,soonDays:l=7,includeUnassigned:o=!0,limit:s,capacity:r}=d,t=r??fo,n=new Map;for(let i of e){if(i.completed||i.archived||i.is_notice||i.is_event||i.linked_only)continue;let a=Number(i.manager_account_seq??0);if(!a&&!o)continue;let h=a?String(i.manager_name??"").trim()||"\uC774\uB984 \uC5C6\uC74C":"\uBBF8\uBC30\uC815",f=n.get(a)??{accountSeq:a,name:h,overdue:0,soon:0,later:0,total:0,points:0,capacity:0,load:0,ratio:0};f[d8(i,b,l)]+=1,f.total+=1,f.points+=Number(i.story_points??0)||0,n.set(a,f)}for(let i of n.values())i.capacity=h8(i.accountSeq,t),i.load=t.basis==="points"?i.points:i.total,i.ratio=i.capacity>0?i.load/i.capacity:0;let c=[...n.values()].sort((i,a)=>i.accountSeq===0!=(a.accountSeq===0)?i.accountSeq===0?1:-1:i.overdue!==a.overdue?a.overdue-i.overdue:i.total!==a.total?a.total-i.total:i.name.localeCompare(a.name));return typeof s=="number"&&s>0?c.slice(0,s):c}function Jl(e,d){return e.filter(b=>b.completed||b.archived||b.is_notice||b.is_event||b.linked_only?!1:Number(b.manager_account_seq??0)===d).sort((b,l)=>{let o=String(b.due_date??"").slice(0,10),s=String(l.due_date??"").slice(0,10);return!o!=!s?o?-1:1:o!==s?o.localeCompare(s):String(b.title??"").localeCompare(String(l.title??""))})}function h8(e,d){if(!(e>0))return 0;let b=Math.max(0,Math.floor(Number(d.by_account?.[e])||0));return b>0?b:Math.max(0,Math.floor(Number(d.default_capacity)||0))}function Ql(e){return e.capacity>0&&e.load>e.capacity}function Xm(e,d){return d>0&&e.total>=d}function Zm(e){let d=e.filter(b=>b.accountSeq>0);return d.length===0?0:d.reduce((b,l)=>b+l.total,0)/d.length}function xf(e,d){let b=new Date(`${e}T00:00:00`);b.setDate(b.getDate()+d);let l=o=>String(o).padStart(2,"0");return`${b.getFullYear()}-${l(b.getMonth()+1)}-${l(b.getDate())}`}function p8(e){let d=new Date(`${e}T00:00:00`);if(Number.isNaN(d.getTime()))return e;let b=(d.getDay()+6)%7;return xf(e,-b)}function Jm(e,d){let{todayStr:b,includeUnassigned:l=!0,weeks:o=6,limit:s}=d,r=p8(b),t=Array.from({length:Math.max(1,o)},(f,u)=>{let g=xf(r,u*7),m=xf(g,6),[,v,k]=g.split("-");return{start:g,end:m,label:`${Number(v)}/${Number(k)}`,isCurrent:u===0}}),n=t[t.length-1].end,c=new Map;for(let f of e){if(f.completed||f.archived||f.is_notice||f.is_event||f.linked_only)continue;let u=Number(f.manager_account_seq??0);if(!u&&!l)continue;let g=u?String(f.manager_name??"").trim()||"\uC774\uB984 \uC5C6\uC74C":"\uBBF8\uBC30\uC815",m=c.get(u)??{accountSeq:u,name:g,overdue:0,byWeek:new Array(t.length).fill(0),noDue:0,total:0,beyond:0},v=String(f.due_date??"").slice(0,10);if(m.total+=1,!/^\d{4}-\d{2}-\d{2}$/.test(v))m.noDue+=1;else if(v<b)m.overdue+=1;else if(v>n)m.beyond+=1;else{let k=t.findIndex(B=>v>=B.start&&v<=B.end);k>=0?m.byWeek[k]+=1:m.beyond+=1}c.set(u,m)}let i=[...c.values()].sort((f,u)=>f.accountSeq===0!=(u.accountSeq===0)?f.accountSeq===0?1:-1:f.overdue!==u.overdue?u.overdue-f.overdue:f.total!==u.total?u.total-f.total:f.name.localeCompare(u.name)),a=typeof s=="number"&&s>0?i.slice(0,s):i,h=a.reduce((f,u)=>Math.max(f,u.overdue,u.noDue,...u.byWeek),0);return{weeks:t,rows:a,maxCell:h}}import{Fragment as t0,jsx as Cr,jsxs as ni}from"react/jsx-runtime";var ca="#e5484d";function r0({tasks:e,todayStr:d,soonDays:b=7,overloadThreshold:l=0,capacity:o=fo,height:s=200,headerLeft:r,selectedAccountSeq:t=0,onSelectPerson:n}){let c=Qm(()=>Zl(e,{todayStr:d,soonDays:b,capacity:o}),[e,d,b,o]),i=Qm(()=>Zm(c),[c]),a=l>0?l:Math.max(3,Math.ceil(i*1.5)),h=o.default_capacity>0||Object.keys(o.by_account).length>0,f=o.basis==="points"?"SP":"\uAC74",u=c.filter(g=>g.accountSeq>0&&(h?Ql(g):Xm(g,a))).length;return c.length===0?ni(Ti,{sx:mr(s),children:[r?Cr(Ti,{sx:Nr,children:r}):null,Cr(Vr,{text:"\uB2F4\uB2F9\uC790\uAC00 \uC9C0\uC815\uB41C \uBBF8\uC644\uB8CC \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",height:s})]}):ni(Ti,{sx:mr(s),children:[ni(Ti,{sx:Nr,children:[r,ni(Ti,{sx:{fontSize:13.5,color:"#37352f"},children:["1\uC778 \uD3C9\uADE0 ",Cr("b",{children:i.toFixed(1)}),"\uAC74 \xB7"," ",h?ni(t0,{children:["\uC6A9\uB7C9 ",Cr("b",{children:o.default_capacity||"\uAC1C\uC778\uBCC4"}),o.default_capacity?f:""]}):ni(t0,{children:["\uACFC\uBD80\uD558 \uAE30\uC900 ",Cr("b",{children:a}),"\uAC74"]}),u>0?ni(Ti,{component:"span",sx:{ml:1,color:ca,fontWeight:700},children:["\uCD08\uACFC ",u,"\uBA85"]}):null]})]}),Cr(Ti,{sx:io(s),children:Cr(x8,{width:"100%",height:"100%",children:ni(m8,{data:c,layout:"vertical",onClick:n?g=>{let m=c.find(v=>v.name===String(g?.activeLabel??""));m&&n(m.accountSeq===t?0:m.accountSeq)}:void 0,style:n?{cursor:"pointer"}:void 0,margin:{top:4,right:16,bottom:4,left:8},barCategoryGap:c.length>8?4:10,children:[Cr(g8,{strokeDasharray:"3 3",horizontal:!1,stroke:"#eceae6"}),Cr(w8,{type:"number",allowDecimals:!1,tick:{fontSize:12}}),Cr(_8,{type:"category",dataKey:"name",width:84,tick:{fontSize:12},interval:0}),Cr(v8,{...cs,formatter:(g,m)=>[`${Number(g)||0}\uAC74`,String(m)],labelFormatter:g=>{let m=c.find(v=>v.name===g);return!m||!(m.capacity>0)?String(g):`${g} \u2014 \uC6A9\uB7C9 ${m.capacity}${f} \uC911 ${m.load} (${Math.round(m.ratio*100)}%)`}}),Cr(y8,{...us}),i>0?Cr(e0,{x:i,stroke:Si,strokeDasharray:"4 4",label:{value:"\uD3C9\uADE0",position:"top",fontSize:11,fill:Si}}):null,o.default_capacity>0?Cr(e0,{x:o.default_capacity,stroke:ca,strokeDasharray:"2 3",label:{value:"\uC6A9\uB7C9",position:"top",fontSize:11,fill:ca}}):null,Cr(vf,{dataKey:"overdue",name:"\uC9C0\uC5F0",stackId:"load",fill:ca}),Cr(vf,{dataKey:"soon",name:`\uC784\uBC15(${b}\uC77C)`,stackId:"load",fill:ia}),Cr(vf,{dataKey:"later",name:"\uC5EC\uC720",stackId:"load",fill:oo,radius:[0,3,3,0],children:c.map(g=>Cr(b8,{fill:h&&Ql(g)?ca:oo,fillOpacity:h&&Ql(g)?.45:1,stroke:g.accountSeq===t?"#37352f":void 0,strokeWidth:g.accountSeq===t?1.5:0},g.accountSeq))})]})})})]})}import{useEffect as M8,useState as R8}from"react";import{Box as O8,Button as A8}from"@mui/material";import{FormDialog as D8}from"@ehfuse/mui-form-dialog";import{useState as k8}from"react";import{Box as gr,Button as S8,Menu as T8,MenuItem as C8}from"@mui/material";import B8 from"@mui/icons-material/PersonOutlineOutlined";import I8 from"@ehfuse/overlay-scrollbar";import{jsx as Mr,jsxs as Do}from"react/jsx-runtime";var n0=56,o0=68,i0=96;function E8(e){let d=String(e.due_date??"").slice(0,10);return d?d.slice(5).replace("-","/"):"-"}function s0(e,d){let b=String(e.due_date??"").slice(0,10);return!!b&&b<d}function a0({tasks:e,row:d,todayStr:b,employees:l,rows:o,height:s=200,hideSummary:r=!1,onChangeManager:t,onOpenTask:n}){let[c,i]=k8(null),a=Jl(e,d.accountSeq),h=f=>o.find(u=>u.accountSeq===f)?.total??0;return Do(gr,{sx:{display:"flex",flexDirection:"column",minHeight:0,height:s},children:[r?null:Do(gr,{sx:{display:"flex",alignItems:"center",gap:1,px:.5,pb:.75,fontSize:14,color:"#37352f"},children:[Mr(gr,{component:"span",sx:{fontWeight:700},children:d.name}),Do(gr,{component:"span",children:["\uBBF8\uC644\uB8CC ",a.length,"\uAC74"]}),d.capacity>0?Do(gr,{component:"span",sx:{color:d.load>d.capacity?"#e5484d":"#787774"},children:["\xB7 \uC6A9\uB7C9 ",d.capacity," \uC911 ",d.load]}):null]}),Do(gr,{sx:{flex:1,minHeight:0,display:"flex",flexDirection:"column",border:"1px solid #e6e6e3",borderRadius:1,overflow:"hidden"},children:[Do(gr,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1,flexShrink:0,bgcolor:"#fafaf9",borderBottom:"1px solid #e6e6e3",fontSize:13.5,fontWeight:600,color:"#37352f"},children:[Mr(gr,{sx:{width:n0,flexShrink:0},children:"\uB9C8\uAC10"}),Mr(gr,{sx:{flex:1,minWidth:0},children:"\uC5C5\uBB34"}),Mr(gr,{sx:{width:o0,flexShrink:0,textAlign:"center"},children:"\uC911\uC694\uB3C4"}),t?Mr(gr,{sx:{width:i0,flexShrink:0,textAlign:"center"},children:"\uCC45\uC784\uC790"}):null]}),Mr(gr,{sx:{flex:1,minHeight:0},children:Mr(I8,{style:{height:"100%"},thumb:{width:6},children:a.length===0?Mr(gr,{sx:{p:2,fontSize:14,color:"#9a9a97"},children:"\uBBF8\uC644\uB8CC \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):a.map(f=>Do(gr,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1.5,borderBottom:"1px solid #f2f2f0"},children:[Mr(gr,{sx:{width:n0,flexShrink:0,fontSize:13.5,color:s0(f,b)?"#e5484d":"#787774",fontWeight:s0(f,b)?700:400},children:E8(f)}),Mr(gr,{onClick:n?()=>n(f.seq):void 0,sx:{flex:1,minWidth:0,fontSize:14.5,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...n?{cursor:"pointer","&:hover":{textDecoration:"underline"}}:{}},children:f.title}),Mr(gr,{sx:{width:o0,flexShrink:0,display:"flex",justifyContent:"center"},children:Mr(Fr,{priority:f.priority})}),t?Mr(gr,{sx:{width:i0,flexShrink:0,display:"flex",justifyContent:"center"},children:Mr(S8,{size:"small",variant:"outlined",startIcon:Mr(B8,{sx:{fontSize:17}}),onClick:u=>i({el:u.currentTarget,taskSeq:f.seq}),children:"\uC62E\uAE30\uAE30"})}):null]},f.seq))})})]}),Mr(T8,{anchorEl:c?.el??null,open:!!c,onClose:()=>i(null),transitionDuration:0,children:l.filter(f=>Number(f.account_seq)>0&&Number(f.account_seq)!==d.accountSeq).map(f=>Do(C8,{onClick:()=>{c&&t&&t(c.taskSeq,Number(f.account_seq),f.name),i(null)},sx:{fontSize:14,minWidth:200},children:[Mr(gr,{sx:{flex:1},children:f.name}),Do(gr,{component:"span",sx:{ml:2,fontSize:13,color:"#787774"},children:[h(Number(f.account_seq)),"\uAC74"]})]},f.account_seq))})]})}import{jsx as ec}from"react/jsx-runtime";function l0({open:e,row:d,rows:b,tasks:l,todayStr:o,employees:s,onClose:r,onChangeManager:t,onOpenTask:n}){let[c,i]=R8(d);M8(()=>{d&&i(d)},[d]);let a=d??c,h=a?Jl(l,a.accountSeq).length:0;return ec(D8,{open:e,onClose:r,maxWidth:"sm",title:a?`${a.name} \uC5C5\uBB34 (${h})`:"\uC5C5\uBB34",locale:"ko",titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-workload-person",tabs:{visible:!1},actions:{showCancelButton:!1,right:ec(A8,{variant:"contained",onClick:r,children:"\uB2EB\uAE30"})},sections:[{id:"person-tasks",title:"",showTitle:!1,children:ec(O8,{sx:{minHeight:0},children:a?ec(a0,{tasks:l,row:a,rows:b,todayStr:o,employees:s,height:"min(420px, 52vh)",hideSummary:!0,onChangeManager:t,onOpenTask:n}):null})}]})}import{useMemo as P8}from"react";import{Box as pn,Tooltip as N8}from"@mui/material";import{OverlayScrollbar as L8}from"@ehfuse/overlay-scrollbar";import{jsx as Gr,jsxs as rc}from"react/jsx-runtime";var c0="#e5484d",z8="#2f80ed",j8="#9a9a97",wf=30,F8=96,tc=56;function _f({count:e,max:d,color:b,title:l}){let o=e>0&&d>0?.18+e/d*.72:0;return Gr(N8,{title:l,arrow:!0,disableInteractive:!0,placement:"top",children:Gr(pn,{sx:{display:"flex",alignItems:"center",justifyContent:"center",borderRight:"1px solid #ececea",borderBottom:"1px solid #ececea",bgcolor:o>0?`${b}${Math.round(o*255).toString(16).padStart(2,"0")}`:"transparent",color:o>.55?"#fff":"#37352f",fontSize:12.5,fontWeight:e>0?700:400,fontVariantNumeric:"tabular-nums"},children:e>0?e:""})})}function u0({tasks:e,todayStr:d,weeks:b=6,height:l=200}){let o=P8(()=>Jm(e,{todayStr:d,weeks:b}),[e,d,b]);if(o.rows.length===0)return Gr(pn,{sx:mr(l),children:Gr(Vr,{text:"\uB2F4\uB2F9\uC790\uAC00 \uC9C0\uC815\uB41C \uBBF8\uC644\uB8CC \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",height:l})});let s=`${F8}px ${tc}px repeat(${o.weeks.length}, minmax(${tc}px, 1fr)) ${tc}px ${tc}px`,r={height:wf,display:"flex",alignItems:"center",justifyContent:"center",borderRight:"1px solid #ececea",borderBottom:"1px solid #dcdad6",fontSize:12,fontWeight:700,color:"#37352f",bgcolor:"#f8f8f7",whiteSpace:"nowrap"};return Gr(pn,{sx:mr(l),children:Gr(L8,{style:{height:"100%"},thumb:{width:8},children:rc(pn,{sx:{display:"grid",gridTemplateColumns:s,minWidth:"fit-content",height:"100%",gridTemplateRows:`${wf}px repeat(${o.rows.length}, minmax(${wf}px, 1fr))`},children:[Gr(pn,{sx:{...r,justifyContent:"flex-start",pl:1},children:"\uB2F4\uB2F9\uC790"}),Gr(pn,{sx:{...r,color:c0},children:"\uC9C0\uC5F0"}),o.weeks.map(t=>Gr(pn,{sx:{...r,...t.isCurrent?{borderBottom:"2px solid #2f80ed"}:{}},children:t.label},t.start)),Gr(pn,{sx:r,children:"\uB9C8\uAC10\uC5C6\uC74C"}),Gr(pn,{sx:r,children:"\uD569\uACC4"}),o.rows.map(t=>rc(pn,{sx:{display:"contents"},children:[Gr(pn,{sx:{display:"flex",alignItems:"center",pl:1,borderRight:"1px solid #ececea",borderBottom:"1px solid #ececea",fontSize:13,color:t.accountSeq>0?"#37352f":"#9a9a97",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:t.name}),Gr(_f,{count:t.overdue,max:o.maxCell,color:c0,title:`${t.name} \xB7 \uC9C0\uC5F0 ${t.overdue}\uAC74`}),t.byWeek.map((n,c)=>Gr(_f,{count:n,max:o.maxCell,color:z8,title:`${t.name} \xB7 ${o.weeks[c].label} \uC8FC \uB9C8\uAC10 ${n}\uAC74`},o.weeks[c].start)),Gr(_f,{count:t.noDue,max:o.maxCell,color:j8,title:`${t.name} \xB7 \uB9C8\uAC10 \uBBF8\uC815 ${t.noDue}\uAC74`}),rc(pn,{sx:{display:"flex",alignItems:"center",justifyContent:"center",borderBottom:"1px solid #ececea",fontSize:12.5,fontWeight:700,color:"#37352f",fontVariantNumeric:"tabular-nums"},children:[t.total,t.beyond>0?rc(pn,{component:"span",sx:{ml:.25,fontSize:10.5,color:"#9a9a97"},children:["(+",t.beyond,")"]}):null]})]},t.accountSeq))]})})})}import{Fragment as h0,jsx as Zt,jsxs as nc}from"react/jsx-runtime";var p0="min(560px, 62vh)",W8=`calc(${p0} - 4px)`,U8=[{value:"30",label:"\uCD5C\uADFC 30\uC77C"},{value:"60",label:"\uCD5C\uADFC 60\uC77C"},{value:"90",label:"\uCD5C\uADFC 90\uC77C"}];function vU({open:e,sprints:d,tasks:b,todayStr:l,showSprintCharts:o,capacity:s=fo,capacityEmployees:r=[],onSaveCapacity:t,onChangeTaskManager:n,onOpenTask:c,initialSprintSeq:i=0,onClose:a}){let[h,f]=ua(0),[u,g]=ua(30);q8(()=>{if(!e)return;let y=d.find(w=>w.status==="active")??d[0],x=d.find(w=>w.seq===i)??y;f(x?.seq??0)},[e]);let m=f0(()=>d.find(y=>y.seq===h)??null,[d,h]),v={height:W8,boxSizing:"border-box",px:3,py:2.5,display:"flex",flexDirection:"column",minHeight:0,overflow:"hidden"},k=Zt(kf,{label:"\uBAA9\uD45C",showLabel:!1,showEmptyOption:!1,value:h?String(h):"",options:d.map(y=>({value:String(y.seq),label:vn(y)})),onChange:y=>f(Number(y.target.value)||0),sx:{width:280,flexShrink:0}}),[B,R]=ua("distribution"),L=Zt(kf,{label:"\uBCF4\uAE30",showLabel:!1,showEmptyOption:!1,value:B,options:[{value:"distribution",label:"\uC9C0\uAE08 \uBD80\uD558(\uC9C0\uC5F0\xB7\uC784\uBC15\xB7\uC5EC\uC720)"},{value:"timeline",label:"\uC8FC\uBCC4 \uB9C8\uAC10 \uBC00\uC9D1"}],onChange:y=>R(y.target.value==="timeline"?"timeline":"distribution"),sx:{width:280,flexShrink:0}}),[A,P]=ua(!1),[N,q]=ua(0),j=f0(()=>Zl(b,{todayStr:l,capacity:s}),[b,l,s]),S=j.find(y=>y.accountSeq===N)??null,T=nc(h0,{children:[L,t?Zt(d0,{size:"small",variant:"outlined",startIcon:Zt(H8,{sx:{fontSize:18}}),onClick:()=>P(!0),sx:{flexShrink:0},children:"\uC6A9\uB7C9"}):null]}),D=o??d.length>0,p=Zt(kf,{label:"\uAE30\uAC04",showLabel:!1,showEmptyOption:!1,value:String(u),options:U8,onChange:y=>g(Number(y.target.value)||30),sx:{width:280,flexShrink:0}});return nc(h0,{children:[Zt($8,{open:e,onClose:a,maxWidth:"md",title:"\uC5C5\uBB34 \uCC28\uD2B8",locale:"ko",contentTopPadding:0,contentPaddingX:0,sectionsPaddingTop:0,sectionContentPaddingTop:0,sectionTitleGap:0,fixedHeight:p0,contentBottomPadding:0,scrollPastLastSection:!1,tabs:{visible:!0,switchContent:!0,fullWidth:!0},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-sprint-charts",sections:[...D?[{id:"velocity",tabTitle:"\uBCA8\uB85C\uC2DC\uD2F0",showTitle:!1,children:Zt(Po,{sx:v,children:Zt(Dm,{sprints:d,tasks:b,height:"100%"})})},{id:"burndown",tabTitle:"\uBC88\uB2E4\uC6B4",showTitle:!1,children:Zt(Po,{sx:v,children:m?Zt(Lm,{sprint:m,tasks:b,todayStr:l,height:"100%",headerLeft:k}):nc(Po,{sx:mr("100%"),children:[Zt(Po,{sx:Nr,children:k}),Zt(Vr,{text:"\uBC88\uB2E4\uC6B4\uC744 \uBCFC \uBAA9\uD45C\uB97C \uC120\uD0DD\uD558\uC138\uC694.",height:"100%"})]})})},{id:"cumulative-flow",tabTitle:"\uB204\uC801\uD750\uB984\uB3C4",showTitle:!1,children:Zt(Po,{sx:v,children:Zt(Um,{tasks:b,todayStr:l,days:u,height:"100%",headerLeft:p})})}]:[],{id:"workload",tabTitle:"\uC6CC\uD06C\uB85C\uB4DC",showTitle:!1,children:Zt(Po,{sx:v,children:B==="timeline"?nc(Po,{sx:{display:"flex",flexDirection:"column",height:"100%",minHeight:0},children:[Zt(Po,{sx:Nr,children:T}),Zt(u0,{tasks:b,todayStr:l,height:"100%"})]}):Zt(r0,{tasks:b,todayStr:l,height:"100%",capacity:s,headerLeft:T,selectedAccountSeq:N,onSelectPerson:n?q:void 0})})},{id:"lead-time",tabTitle:"\uB9AC\uB4DC\uD0C0\uC784",showTitle:!1,children:Zt(Po,{sx:v,children:Zt(Ym,{tasks:b,todayStr:l,days:u,height:"100%",headerLeft:p})})}],actions:{showCancelButton:!1,right:Zt(d0,{variant:"contained",onClick:a,children:"\uB2EB\uAE30"})}}),Zt(l0,{open:N>0,row:S,rows:j,tasks:b,todayStr:l,employees:r,onClose:()=>q(0),onChangeManager:n,onOpenTask:c}),t?Zt(Om,{open:A,capacity:s,employees:r,onClose:()=>P(!1),onSave:async y=>{await t(y),P(!1)}}):null]})}import{Checkbox as V8,Divider as K8,Menu as G8,MenuItem as Sf}from"@mui/material";import{jsx as fa,jsxs as m0}from"react/jsx-runtime";function TU({anchorEl:e,candidates:d,selectedNames:b,avatarSrcByName:l,onToggle:o,onClear:s,onClose:r}){return m0(G8,{anchorEl:e,open:!!e,onClose:r,transitionDuration:0,children:[d.length===0?fa(Sf,{disabled:!0,sx:{fontSize:14},children:"\uBAA9\uB85D\uC5D0 \uC9C0\uC815\uB41C \uC0AC\uB78C\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):d.map(t=>{let n=b.includes(t.name);return m0(Sf,{onClick:()=>o(t),sx:{fontSize:14,minWidth:170,gap:1},children:[fa(V8,{size:"small",checked:n,sx:{p:0}}),fa(qr,{names:[t.name],size:20,avatarSrcByName:l}),t.name]},`${t.accountSeq}-${t.name}`)}),fa(K8,{}),fa(Sf,{disabled:b.length===0,onClick:s,sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}import{useState as Y8}from"react";import{ButtonBase as X8,Menu as Z8,MenuItem as J8}from"@mui/material";import Q8 from"@mui/icons-material/KeyboardArrowDown";import eS from"@mui/icons-material/Check";import{Fragment as tS,jsx as Tf,jsxs as Cf}from"react/jsx-runtime";function AU({value:e,onChange:d,options:b}){let[l,o]=Y8(null),s=b??Rc,r=Rc.find(t=>t.value===e)?.label??"";return Cf(tS,{children:[Cf(X8,{onClick:t=>o(t.currentTarget),sx:{display:"flex",alignItems:"center",gap:.5,px:1,py:.5,borderRadius:1,fontSize:13.5,color:"#37352f","&:hover":{bgcolor:"#f2f2f0"}},children:[r,Tf(Q8,{sx:{fontSize:17,color:"#9a9a97"}})]}),Tf(Z8,{transitionDuration:0,anchorEl:l,open:!!l,onClose:()=>o(null),children:s.map(t=>Cf(J8,{selected:t.value===e,onClick:()=>{d(t.value),o(null)},sx:{fontSize:14,minWidth:140,justifyContent:"space-between",gap:1},children:[t.label,t.value===e?Tf(eS,{sx:{fontSize:16,color:"#2f80ed"}}):null]},t.value))})]})}import{Box as oc,ButtonBase as rS}from"@mui/material";import{DateTextField as g0}from"@ehfuse/mui-form-controls";import{jsx as da,jsxs as b0}from"react/jsx-runtime";var nS=[{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 y0({fromDate:e,toDate:d,onChange:b}){let l=s=>{if(s<=0){b("","");return}b(Ao(Xl(s)),Ao(new Date))},o=s=>s<=0?!e&&!d:!e||!d?!1:e===Ao(Xl(s))&&d===Ao(new Date);return b0(oc,{sx:{display:"flex",alignItems:"center",gap:1.5,flexWrap:"wrap"},children:[da(oc,{sx:{display:"flex",alignItems:"center",gap:1.5},children:nS.map(s=>{let r=o(s.months);return da(rS,{onClick:()=>l(s.months),sx:{px:1.25,py:.85,borderRadius:1,fontSize:13,fontWeight:r?500:400,border:"1px solid",borderColor:r?"#2f80ed":"#dedddb",color:r?"#2f80ed":"#37352f",bgcolor:r?"#eef6ff":"transparent","&:hover":{bgcolor:r?"#eef6ff":"#f7f7f5"}},children:s.label},s.label)})}),b0(oc,{sx:{display:"flex",alignItems:"center",gap:.5},children:[da(g0,{value:e,size:"small",placeholder:"\uC2DC\uC791\uC77C",onChange:s=>b(s.target.value,d),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}}),da(oc,{component:"span",sx:{fontSize:13,color:"#9a9a97"},children:"~"}),da(g0,{value:d,size:"small",placeholder:"\uC885\uB8CC\uC77C",onChange:s=>b(e,s.target.value),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}})]})]})}import{Popover as oS}from"@mui/material";import{jsx as x0}from"react/jsx-runtime";function HU({anchorEl:e,fromDate:d,toDate:b,onChange:l,onClose:o}){return x0(oS,{transitionDuration:0,anchorEl:e,open:!!e,onClose:o,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},slotProps:{paper:{sx:{p:1.5}}},children:x0(y0,{fromDate:d,toDate:b,onChange:l})})}import{Box as iS,ButtonBase as sS,Tab as aS,Tabs as lS}from"@mui/material";import cS from"@mui/icons-material/Checklist";import uS from"@mui/icons-material/Face";import fS from"@mui/icons-material/Publish";import dS from"@mui/icons-material/NotificationsOutlined";import hS from"@mui/icons-material/BugReportOutlined";import pS from"@mui/icons-material/SupportAgentOutlined";import mS from"@mui/icons-material/DescriptionOutlined";import gS from"@mui/icons-material/Inventory2Outlined";import{jsx as Tn}from"react/jsx-runtime";function v0(e,d){return d>0?`${e} (${d})`:e}var nV=[{id:"my",label:"\uC804\uCCB4",icon:Tn(cS,{sx:{fontSize:18}})},{id:"mine",label:"\uB0B4 \uC5C5\uBB34",icon:Tn(uS,{sx:{fontSize:18}})},{id:"sent",label:"\uBCF4\uB0B8 \uC5C5\uBB34",icon:Tn(fS,{sx:{fontSize:18}})},{id:"support",label:"\uACE0\uAC1D\uC13C\uD130",icon:Tn(pS,{sx:{fontSize:18}})},{id:"bug",label:"\uC624\uB958",icon:Tn(hS,{sx:{fontSize:18}})},{id:"notice",label:"\uACF5\uC9C0\uC0AC\uD56D",icon:Tn(dS,{sx:{fontSize:18}})},{id:"archive",label:"\uBCF4\uAD00\uD568",icon:Tn(gS,{sx:{fontSize:18}}),hideCount:!0},{id:"report",label:"\uBCF4\uACE0\uC11C",icon:Tn(mS,{sx:{fontSize:18}}),hideCount:!0}];function bS(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 oV({items:e,activeTab:d,counts:b,onChange:l,compact:o=!1}){let s=at(),r=bS(s.tabs),t=e;return o?Tn(iS,{sx:{display:"flex",flexWrap:"wrap",gap:1.25},children:t.map(n=>{let c=d===n.id;return Tn(sS,{onClick:()=>l(n.id),sx:{px:1.5,py:.75,borderRadius:1,fontSize:Ir(13.5),fontWeight:500,whiteSpace:"nowrap",border:"1px solid",bgcolor:c?s.tabs.selectedBg:s.tabs.bg,color:c?s.tabs.selectedColor:s.tabs.color,borderColor:c?s.tabs.selectedBg:s.tabs.borderColor},children:v0(n.label,n.hideCount?0:b[n.id]??0)},n.id)})}):Tn(lS,{value:d,onChange:(n,c)=>l(c),sx:{minHeight:46,"& .MuiTabs-indicator":{display:"none"},"& .MuiTabs-flexContainer":{gap:"12px",minHeight:46}},children:t.map(n=>Tn(aS,{value:n.id,label:v0(n.label,n.hideCount?0:b[n.id]??0),icon:n.icon,iconPosition:"start",sx:r},n.id))})}import{useEffect as yS,useMemo as xS,useState as Bf}from"react";import{Divider as ic,ListItemIcon as Yr,Menu as If,MenuItem as Br}from"@mui/material";import vS from"@mui/icons-material/OpenInNewOutlined";import wS from"@mui/icons-material/RestoreFromTrashOutlined";import _S from"@mui/icons-material/Check";import kS from"@mui/icons-material/CheckCircleOutlined";import SS from"@mui/icons-material/RadioButtonUnchecked";import TS from"@mui/icons-material/SendOutlined";import CS from"@mui/icons-material/EventOutlined";import BS from"@mui/icons-material/PersonOutlineOutlined";import IS from"@mui/icons-material/ViewKanbanOutlined";import ES from"@mui/icons-material/ContentCopyOutlined";import MS from"@mui/icons-material/NextPlanOutlined";import RS from"@mui/icons-material/ContentPasteOutlined";import OS from"@mui/icons-material/ShareOutlined";import AS from"@mui/icons-material/DirectionsRunOutlined";import w0 from"@mui/icons-material/ChevronRight";import DS from"@mui/icons-material/ArchiveOutlined";import PS from"@mui/icons-material/UnarchiveOutlined";import{ConfirmDialog as _0}from"@ehfuse/alerts";import{Fragment as k0,jsx as ct,jsxs as br}from"react/jsx-runtime";function NV({target:e,onClose:d,customTabs:b,sprints:l=[],myAccountSeq:o=0,onOpenDetail:s,onToggleCompleted:r,onRequestConfirm:t,onChangeDueDate:n,onChangeReminder:c,onMemberEdit:i,onMoveProject:a,onDuplicate:h,onCreateFollowUp:f,onShare:u,onAssignSprint:g,onArchiveToggle:m,onDelete:v,onRestore:k,onPurge:B}){let R=Lt(),L=qn(),[A,P]=Bf(null),[N,q]=Bf(null),[j,S]=Bf(null);yS(()=>{e||(P(null),q(null),S(null))},[e]);let T=e?.task??null,D=!!T?.is_notice,p=!!T?.is_event,y=T?!mo(T,o):!1,x=!!T?.deleted,w=xS(()=>new Set(b.filter(z=>z.useSprints).map(z=>z.key)),[b]),_=async(z="one")=>{let $=T;if(d(),!$)return;await _0({title:"\uC5C5\uBB34 \uC0AD\uC81C",message:z==="series"?`"${$.title}" \uC758 \uC774 \uD68C\uCC28\uC640 \uC774\uD6C4 \uBC18\uBCF5 \uD68C\uCC28\uB97C \uBAA8\uB450 \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`:`"${$.title}" \uC5C5\uBB34\uB97C \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&v($.seq,z)},C=async()=>{let z=T;if(d(),!z)return;await _0({title:"\uC601\uAD6C \uC0AD\uC81C",message:`"${z.title}" \uC5C5\uBB34\uB97C \uC601\uAD6C\uD788 \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C? \uB418\uB3CC\uB9B4 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.`})&&B?.(z.seq)},O=()=>{T&&m(T.seq,!T.archived),d()};return br(k0,{children:[br(If,{open:!!e,onClose:d,transitionDuration:0,anchorReference:R?"none":"anchorPosition",anchorPosition:!R&&e?{top:e.position.top,left:e.position.left}:void 0,slotProps:{paper:{sx:{minWidth:190,...R?{position:"fixed",top:"50%",left:"50%",translate:"-50% -50%",maxHeight:"70vh"}:{}}},list:R?{sx:{"& .MuiMenuItem-root":{py:1,minHeight:0}}}:void 0},children:[br(Br,{onClick:()=>{T&&s(T),d()},sx:{fontSize:14},children:[ct(Yr,{children:ct(vS,{sx:{fontSize:19}})}),"\uC0C1\uC138 \uC5F4\uAE30"]}),x?ct(ic,{}):null,x&&k?br(Br,{onClick:()=>{T&&k(T.seq),d()},sx:{fontSize:14},children:[ct(Yr,{children:ct(wS,{sx:{fontSize:19}})}),"\uBCF5\uC6D0"]}):null,x&&B?br(Br,{onClick:()=>{C()},sx:{fontSize:14,color:"#e5484d"},children:[ct(Yr,{children:ct(dr,{sx:{fontSize:19,color:"#e5484d"}})}),"\uC601\uAD6C \uC0AD\uC81C"]}):null,x?null:br(k0,{children:[br(Br,{disabled:D?(T?.author_account_seq??0)!==o:(T?.author_account_seq??0)!==o&&(T?.manager_account_seq??0)!==o,onClick:()=>{T&&r(T.seq,!T.completed),d()},sx:{fontSize:14},children:[ct(Yr,{children:T?.completed?ct(SS,{sx:{fontSize:19}}):ct(kS,{sx:{fontSize:19}})}),T?.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC"]}),!D&&t?br(Br,{disabled:!(T?.manager_account_seq??0)&&(T?.receiver_account_seqs??[]).length===0,onClick:()=>{T&&t(T),d()},sx:{fontSize:14},children:[ct(Yr,{children:ct(TS,{sx:{fontSize:19}})}),"\uD655\uC778 \uC694\uCCAD"]}):null,p?null:ct(ic,{}),p?null:br(Br,{disabled:y,onClick:z=>{T&&P({anchorEl:z.currentTarget,task:T})},sx:{fontSize:14},children:[ct(Yr,{children:ct(CS,{sx:{fontSize:19}})}),"\uB9C8\uAC10\uC608\uC815 \uBCC0\uACBD"]}),!D&&!p&&i?br(Br,{onClick:()=>{T&&i(T,"manager"),d()},sx:{fontSize:14},children:[ct(Yr,{children:ct(BS,{sx:{fontSize:19}})}),"\uCC45\uC784\uC790 \uBCC0\uACBD"]}):null,p?null:br(Br,{disabled:y,onClick:z=>{T&&q({anchorEl:z.currentTarget,task:T})},sx:{fontSize:14},children:[ct(Yr,{children:ct(IS,{sx:{fontSize:19}})}),"\uD504\uB85C\uC81D\uD2B8 \uC774\uB3D9",ct(w0,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}),ct(ic,{}),h?br(Br,{disabled:y,onClick:()=>{T&&h(T.seq),d()},sx:{fontSize:14},children:[ct(Yr,{children:ct(ES,{sx:{fontSize:19}})}),"\uBCF5\uC81C"]}):null,f&&T&&!T.is_event&&!T.is_notice?br(Br,{onClick:()=>{T&&f(T.seq),d()},sx:{fontSize:14},children:[ct(Yr,{children:ct(MS,{sx:{fontSize:19}})}),"\uD6C4\uC18D \uC5C5\uBB34 \uB9CC\uB4E4\uAE30"]}):null,br(Br,{onClick:()=>{T&&(u?u(T):ts(T,R)),d()},sx:{fontSize:14},children:[ct(Yr,{children:R?ct(OS,{sx:{fontSize:19}}):ct(RS,{sx:{fontSize:19}})}),R?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC"]}),T&&!T.is_notice&&!T.is_event&&w.has(String(T.tab_key??""))&&g?br(Br,{onClick:z=>S(z.currentTarget),sx:{fontSize:14},children:[ct(Yr,{children:ct(AS,{sx:{fontSize:19}})}),"\uBAA9\uD45C\uC5D0 \uB123\uAE30",ct(w0,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}):null,br(Br,{onClick:O,disabled:y||!T?.archived&&!(T&&za(T)),sx:{fontSize:14},children:[ct(Yr,{children:T?.archived?ct(PS,{sx:{fontSize:19}}):ct(DS,{sx:{fontSize:19}})}),T?.archived?"\uBCF4\uAD00 \uD574\uC81C":"\uBCF4\uAD00"]}),ct(ic,{}),br(Br,{disabled:y,onClick:()=>{_("one")},sx:{fontSize:14,color:"#e5484d"},children:[ct(Yr,{children:ct(dr,{sx:{fontSize:19,color:"#e5484d"}})}),(T?.repeat_group_key??0)>0?"\uC0AD\uC81C (\uC774 \uD68C\uCC28\uB9CC)":"\uC0AD\uC81C"]}),(T?.repeat_group_key??0)>0?br(Br,{disabled:y,onClick:()=>{_("series")},sx:{fontSize:14,color:"#e5484d"},children:[ct(Yr,{children:ct(dr,{sx:{fontSize:19,color:"#e5484d"}})}),"\uC0AD\uC81C (\uC774\uD6C4 \uBC18\uBCF5 \uC804\uCCB4)"]}):null]})]}),ct(xn,{anchorEl:A?.anchorEl??null,open:!!A,date:A?.task.due_date??"",reminders:Wn(A?.task),hideReminder:!!A?.task.completed,centered:R,onClose:()=>{P(null),d()},onDateChange:z=>{A&&n(A.task.seq,z)},onReminderChange:z=>{A&&c?.(A.task.seq,z)}}),br(If,{transitionDuration:0,anchorEl:N?.anchorEl??null,open:!!N,onClose:()=>{q(null),d()},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},...L,children:[ct(Br,{selected:!N?.task.tab_key,onClick:()=>{N&&a(N.task.seq,""),q(null),d()},sx:{fontSize:14,minWidth:170},children:"\uC5C6\uC74C"}),b.filter(z=>!z.archived).map(z=>ct(Br,{selected:N?.task.tab_key===z.key,onClick:()=>{N&&a(N.task.seq,z.key),q(null),d()},sx:{fontSize:14,minWidth:170},children:z.label},z.key))]}),ct(If,{transitionDuration:0,anchorEl:j,open:!!j,onClose:()=>S(null),anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...l.filter(z=>`custom-${z.group_seq}`===String(T?.tab_key??"")).map(z=>({seq:z.seq,label:vn(z)}))].map(z=>br(Br,{onClick:()=>{T&&g?.(T.seq,z.seq),S(null),d()},sx:{fontSize:14,minWidth:160,gap:1},children:[z.label,(T?.sprint_seq??0)===z.seq?ct(_S,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},z.seq))})]})}import{Checkbox as NS,Divider as LS,Menu as zS,MenuItem as S0}from"@mui/material";import{jsx as sc,jsxs as T0}from"react/jsx-runtime";function qV({anchorEl:e,labelOptions:d,selectedKeys:b,onToggle:l,onClear:o,onClose:s}){return T0(zS,{transitionDuration:0,anchorEl:e,open:!!e,onClose:s,children:[d.map(r=>{let t=b.includes(r.key);return T0(S0,{onClick:()=>l(r.key),sx:{fontSize:14,minWidth:190,gap:1},children:[sc(NS,{size:"small",checked:t,sx:{p:0}}),sc(At,{option:r})]},r.key)}),sc(LS,{}),sc(S0,{disabled:b.length===0,onClick:()=>{o(),s()},sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}import{Divider as jS,Menu as FS,MenuItem as C0}from"@mui/material";import qS from"@mui/icons-material/Check";import $S from"@mui/icons-material/SettingsOutlined";import{jsx as Ef,jsxs as Mf}from"react/jsx-runtime";function GV(e){let{anchorEl:d,sprints:b,value:l,onSelect:o,onManage:s,onClose:r}=e;return Mf(FS,{transitionDuration:0,anchorEl:d,open:!!d,onClose:r,children:[[{seq:0,label:"\uC804\uCCB4"},{seq:-1,label:"\uBBF8\uBC30\uC815 \uC5C5\uBB34"},...b.map(t=>({seq:t.seq,label:vn(t)}))].map(t=>Mf(C0,{onClick:()=>{o(t.seq),r()},sx:{fontSize:14,minWidth:180,gap:1},children:[t.label,l===t.seq?Ef(qS,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},t.seq)),Ef(jS,{}),Mf(C0,{onClick:()=>{r(),s()},sx:{fontSize:14,gap:1},children:[Ef($S,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uAD00\uB9AC\u2026"]})]})}var HS={my:"tasks",mine:"tasks",sent:"tasks",notice:"notice",support:"support",bug:"bug",archive:"archive",done:"done",report:"report"};function WS(e){return HS[e]??"tasks"}var I0={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"},B0=["list","calendar","month","card","kanban","sprint","timeline"],US=["list","kanban"],VS=["list","card"];function ZV(e){let d=WS(e);switch(d){case"notice":return{kind:d,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:d,viewOptions:B0,showCreate:!0,createLabel:"\uC624\uB958 \uB4F1\uB85D",showGroupBy:!0,showSprintFilter:!0,showDateRange:!1,showHideCompleted:!0,forceFlatList:!1,columns:{bug:!0}};case"support":return{kind:d,viewOptions:US,showCreate:!1,createLabel:"",showGroupBy:!0,showSprintFilter:!1,showDateRange:!1,showHideCompleted:!0,forceFlatList:!1,columns:{support:!0,showProject:!1}};case"archive":return{kind:d,viewOptions:VS,showCreate:!1,createLabel:"",showGroupBy:!1,showSprintFilter:!1,showDateRange:!0,showHideCompleted:!1,forceFlatList:!0,columns:{showActions:!1}};case"done":return{kind:d,viewOptions:["list"],showCreate:!1,createLabel:"",showGroupBy:!1,showSprintFilter:!1,showDateRange:!0,showHideCompleted:!1,forceFlatList:!0,columns:{showActions:!1}};case"report":return{kind:d,viewOptions:[],showCreate:!1,createLabel:"",showGroupBy:!1,showSprintFilter:!1,showDateRange:!0,showHideCompleted:!1,forceFlatList:!0,columns:{}};default:return{kind:d,viewOptions:B0,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"}:{}}}}import{useMemo as KS}from"react";import{useKeyboardState as GS}from"@ehfuse/keyboard-state";var E0=[{key:"g l",view:"list"},{key:"g b",view:"card"},{key:"g k",view:"kanban"},{key:"g s",view:"sprint"},{key:"g c",view:"calendar"},{key:"g m",view:"month"},{key:"g t",view:"timeline"}];function rK(e,d={}){let{enabled:b=!0,views:l}=d,{onCreateTask:o,onFocusSearch:s,onToggleHelp:r,onChangeView:t,onRefresh:n,onEscape:c}=e,i=l?l.join(","):"",a=KS(()=>{let h=[];if(o&&h.push({key:"n",callback:o,options:{preventDefault:!0}}),s&&h.push({key:"/",callback:s,options:{preventDefault:!0}}),n&&h.push({key:"r",callback:n,options:{preventDefault:!0}}),r&&h.push({key:"shift+?",callback:r,options:{preventDefault:!0}}),c&&h.push({key:"escape",callback:c,options:{allowInEditable:!0}}),t)for(let f of M0(i?i.split(","):void 0))h.push({key:f.key,callback:()=>t(f.view),options:{preventDefault:!0}});return h},[o,s,r,t,n,c,i]);GS(b?a:[])}function M0(e){if(!e)return E0;let d=new Set(e);return E0.filter(b=>d.has(b.view))}function ha(e){return[{keys:"N",description:"\uC0C8 \uC5C5\uBB34 \uB4F1\uB85D"},{keys:"/",description:"\uAC80\uC0C9"},{keys:"R",description:"\uBAA9\uB85D \uC0C8\uB85C\uACE0\uCE68"},...M0(e).map(d=>({keys:d.key.split(" ").map(b=>b.toUpperCase()).join(" \u2192 "),description:`${I0[d.view]} \uBCF4\uAE30`})),{keys:"?",description:"\uB2E8\uCD95\uD0A4 \uB3C4\uC6C0\uB9D0"},{keys:"Esc",description:"\uB2EB\uAE30"}]}var nK=ha();import{Box as pa,Button as YS}from"@mui/material";import XS from"@mui/icons-material/ArrowRightAlt";import{FormDialog as ZS}from"@ehfuse/mui-form-dialog";import{jsx as oi,jsxs as R0}from"react/jsx-runtime";function JS({keys:e}){return oi(pa,{sx:{display:"flex",alignItems:"center",gap:.5,justifyContent:"flex-end"},children:e.split(" \u2192 ").map((d,b)=>R0(pa,{sx:{display:"flex",alignItems:"center",gap:.5},children:[b>0?oi(XS,{sx:{fontSize:18,color:"#9a9a97"}}):null,oi(pa,{component:"span",sx:{minWidth:32,height:32,px:.75,display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:13.5,fontWeight:700,color:"#37352f",bgcolor:"#f4f4f2",border:"1px solid #e0dfdb",borderRadius:1,fontVariantNumeric:"tabular-nums"},children:d})]},`${d}-${b}`))})}function cK({open:e,onClose:d,views:b}){let l=ha(b);return oi(ZS,{open:e,onClose:d,maxWidth:"xs",title:"\uB2E8\uCD95\uD0A4",locale:"ko",titleIcons:{delete:{visible:!1}},tabs:{visible:!1},sectionContentPaddingTop:0,sections:[{id:"shortcuts",showTitle:!1,children:oi(pa,{sx:{display:"grid",gridTemplateColumns:"auto 1fr",columnGap:2,rowGap:1.25,alignItems:"center",fontSize:14,color:"#37352f"},children:l.map(o=>R0(pa,{sx:{display:"contents"},children:[oi(JS,{keys:o.keys}),oi("span",{children:o.description})]},o.keys))})}],actions:{showCancelButton:!1,right:oi(YS,{variant:"contained",onClick:d,children:"\uB2EB\uAE30"})}})}import{Fragment as QS}from"react";import{Box as lo,Button as eT}from"@mui/material";import tT from"@mui/icons-material/ArrowRightAlt";import{FormDialog as rT}from"@ehfuse/mui-form-dialog";var O0={id:"basics",tabTitle:"\uAE30\uBCF8",topics:[{title:"\uD0ED \uAD6C\uC131",lines:["**\uC804\uCCB4** \u2014 \uB0B4\uAC00 \uBCFC \uC218 \uC788\uB294 \uBAA8\uB4E0 \uC5C5\uBB34. \uB0B4 \uC5C5\uBB34\xB7\uCC45\uC784\uC790\uBCC4\xB7\uC77C\uC815 \uADF8\uB8F9\uC73C\uB85C \uB098\uB258\uC5B4 \uBCF4\uC785\uB2C8\uB2E4.","**\uB0B4 \uC5C5\uBB34** \u2014 \uB0B4\uAC00 \uCC45\uC784\uC790\uC774\uAC70\uB098 \uCC38\uC870\uC790\uB85C \uC9C0\uC815\uB41C \uC5C5\uBB34\uB9CC \uBAA8\uC74D\uB2C8\uB2E4.","**\uBCF4\uB0B8 \uC5C5\uBB34** \u2014 \uB0B4\uAC00 \uB4F1\uB85D\uD574 \uB2E4\uB978 \uC0AC\uB78C\uC5D0\uAC8C \uB9E1\uAE34 \uC5C5\uBB34\uC785\uB2C8\uB2E4.","**\uACF5\uC9C0\uC0AC\uD56D** \u2014 \uC804 \uC9C1\uC6D0 \uB610\uB294 \uC9C0\uC815 \uB300\uC0C1\uC790\uC5D0\uAC8C \uC54C\uB9AC\uB294 \uAE00. \uB300\uC0C1\uC790\uB294 \uD655\uC778 \uBC84\uD2BC\uC73C\uB85C \uC77D\uC74C\uC744 \uB0A8\uAE41\uB2C8\uB2E4.",'**\uBCF4\uAD00\uD568** \u2014 \uC644\uB8CC \uD6C4 \uBCF4\uAD00\uB41C \uC5C5\uBB34\xB7\uC77C\uC815, \uACE0\uAC1D\uC13C\uD130 \uAE00, \uD734\uC9C0\uD1B5\uC744 "\uC5C5\uBB34 \xB7 \uC77C\uC815 \u25BE" \uBA54\uB274\uB85C \uBC14\uAFD4 \uBD05\uB2C8\uB2E4.']},{title:"\uC624\uB958 \uD0ED",feature:"bug",lines:["\uD504\uB85C\uADF8\uB7A8 \uC624\uB958 \uC811\uC218 \uC804\uC6A9 \uD0ED\uC785\uB2C8\uB2E4. \uD2F0\uCF13\uBC88\uD638\uAC00 \uBD99\uACE0 \uC811\uC218 \u2192 \uCC98\uB9AC \u2192 \uC885\uB8CC\uC758 \uC0DD\uC560\uC8FC\uAE30\uB85C \uAD00\uB9AC\uD569\uB2C8\uB2E4.",'\uC624\uB958 \uD0ED\uC740 \uAC1C\uBC1C\uC0AC(\uCF54\uB4DC\uC0F5) \uC804\uC6A9\uC774\uBA70, \uAC00\uB9F9\uC810\uC5D0\uC11C \uC811\uC218\uD55C \uC624\uB958 \uC81C\uBCF4\uB294 \uACE0\uAC1D\uC13C\uD130 \uD0ED\uC5D0 "\uC624\uB958" \uC885\uB958\uB85C \uC313\uC785\uB2C8\uB2E4.']},{title:"\uACE0\uAC1D\uC13C\uD130 \uD0ED",feature:"support",lines:["\uAC00\uB9F9\uC810\uC774 \uB0A8\uAE34 \uBB38\uC758\xB7\uAC74\uC758\uC0AC\uD56D\xB7\uC624\uB958 \uC81C\uBCF4\uC640 \uD648\uD398\uC774\uC9C0 \uC0C1\uB2F4\uC2E0\uCCAD\uC774 \uC5C5\uBB34\uB85C \uC313\uC785\uB2C8\uB2E4.","**\uAC00\uC838\uAC00\uAE30**\uB85C \uCC45\uC784\uC790\uAC00 \uB418\uACE0, \uB313\uAE00\uB85C \uB2F5\uBCC0\uD558\uBA74 \uC791\uC131\uC790(\uAC00\uB9F9\uC810)\uC5D0\uAC8C \uC54C\uB9BC\uC774 \uAC11\uB2C8\uB2E4. \uC791\uC131\uC790\uC5D0\uAC8C\uB294 \uB2F5\uBCC0 \uC54C\uB9BC\uB9CC \uAC00\uACE0 \uC218\uC815\xB7\uBC30\uC815 \uC54C\uB9BC\uC740 \uAC00\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.","\uC791\uC131\uC790\xB7\uB2F5\uBCC0\uC790 \uC5F4 \uC81C\uBAA9\uC744 \uB204\uB974\uBA74 \uC774\uB984\uC73C\uB85C \uAC70\uB97C \uC218 \uC788\uACE0, \uC791\uC131\uC790 \uC774\uB984\uC5D0 \uB9C8\uC6B0\uC2A4\uB97C \uC62C\uB9AC\uBA74 \uAC00\uB9F9\uC810\uBA85\uC774 \uBCF4\uC785\uB2C8\uB2E4."]},{title:"\uD5E4\uB354 \uC2A4\uC704\uCE58",lines:["**\uC644\uB8CC \uC228\uAE30\uAE30** \u2014 \uB05D\uB09C \uC5C5\uBB34\uB97C \uBAA9\uB85D\xB7\uBCF4\uB4DC\xB7\uCE98\uB9B0\uB354\xB7\uD0C0\uC784\uB77C\uC778(\uD560\uC77C \uD3EC\uD568)\uC5D0\uC11C \uAC10\uCDA5\uB2C8\uB2E4.","**\uC678\uBD80 \uCE98\uB9B0\uB354 \uC77C\uC815** \u2014 \uAD6C\uAE00 \uB4F1\uC5D0\uC11C \uAC00\uC838\uC628 \uC77C\uC815\uC744 \uCE98\uB9B0\uB354 \uBCF4\uAE30\uC5D0 \uD568\uAED8 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4(\u22EE \u203A \uCE98\uB9B0\uB354 \uC5F0\uB3D9\uC5D0\uC11C \uC124\uC815).","**\uBAA8\uB4E0 \uC9C1\uC6D0** \u2014 (\uD5C8\uC6A9 \uACC4\uC815) \uAD00\uC5EC \uC5EC\uBD80\uC640 \uC0C1\uAD00\uC5C6\uC774 \uC804 \uC9C1\uC6D0\uC758 \uC5C5\uBB34\uB97C \uBD05\uB2C8\uB2E4.","\uD654\uBA74\uC774 \uC881\uC73C\uBA74 \uC2A4\uC704\uCE58\uB4E4\uC740 \uC624\uB978\uCABD **\u22EE \uBA54\uB274** \uC548\uC73C\uB85C \uB4E4\uC5B4\uAC11\uB2C8\uB2E4."]},{title:"\uC0AD\uC81C\xB7\uBCF4\uAD00 \uADDC\uCE59",lines:["**\uC644\uB8CC \u2192 \uBCF4\uAD00** \u2014 \uC644\uB8CC(\uACF5\uC9C0\uB294 \uAC8C\uC2DC\uC885\uB8CC)\uD55C \uC5C5\uBB34\uB294 \uC5C5\uBB34\uD568 \uC124\uC815\uC758 \uAE30\uAC04(\uAE30\uBCF8 7\uC77C)\uC774 \uC9C0\uB098\uBA74 \uB9E4\uC77C \uC0C8\uBCBD \uC790\uB3D9\uC73C\uB85C \uBCF4\uAD00\uD568\uC73C\uB85C \uC62E\uACA8\uC9D1\uB2C8\uB2E4. \uC6B0\uD074\uB9AD \u203A **\uBCF4\uAD00**\uC73C\uB85C \uBC14\uB85C \uBCF4\uB0BC \uC218\uB3C4 \uC788\uACE0, \uBCF4\uAD00\uD568\uC5D0\uC11C **\uBCF4\uAD00 \uD574\uC81C**\uB85C \uB418\uB3CC\uB9BD\uB2C8\uB2E4.","**\uC0AD\uC81C \u2192 \uD734\uC9C0\uD1B5** \u2014 \uC0AD\uC81C\uB294 \uC791\uC131\uC790\uB9CC \uD560 \uC218 \uC788\uACE0(\uC0C1\uC138\uC758 \uD734\uC9C0\uD1B5 \uC544\uC774\uCF58), \uC9C0\uC6B4 \uC5C5\uBB34\uB294 \uD734\uC9C0\uD1B5\uC5D0 \uB4E4\uC5B4\uAC00 **\uB418\uC0B4\uB9AC\uAE30**\uB85C \uBCF5\uAD6C\uB429\uB2C8\uB2E4. \uD734\uC9C0\uD1B5\uC740 \uC124\uC815 \uAE30\uAC04(\uAE30\uBCF8 90\uC77C) \uB4A4 \uC601\uAD6C \uC0AD\uC81C\uB429\uB2C8\uB2E4.",'\uBC18\uBCF5 \uC5C5\uBB34\uB97C \uC644\uB8CC\xB7\uC0AD\uC81C\uD560 \uB54C\uB294 "\uC774 \uD68C\uCC28\uB9CC / \uC774\uD6C4 \uC804\uCCB4"\uB97C \uACE0\uB985\uB2C8\uB2E4.',"**\uD504\uB85C\uC81D\uD2B8** \u2014 \uBCF4\uAD00\uC740 \uC18C\uC18D \uC5C5\uBB34\uAC00 \uBAA8\uB450 \uC644\uB8CC\uB41C \uB4A4\uC5D0\uB9CC \uB429\uB2C8\uB2E4(\uBBF8\uC644\uB8CC\uAC00 \uB0A8\uC544 \uC788\uC73C\uBA74 \uC548\uB0B4). \uC0AD\uC81C\uD558\uBA74 \uD504\uB85C\uC81D\uD2B8\uB9CC \uC5C6\uC5B4\uC9C0\uACE0 \uC18C\uC18D \uC5C5\uBB34\uB294 \uAE30\uBCF8 \uC5C5\uBB34\uD568\uC73C\uB85C \uC62E\uACA8\uC9D1\uB2C8\uB2E4.",'\uACE0\uAC1D\uC13C\uD130 \uAE00\uB3C4 \uAC19\uC740 \uADDC\uCE59\uC73C\uB85C \uC644\uB8CC 7\uC77C \uB4A4 \uBCF4\uAD00\uB418\uBA70, \uBCF4\uAD00\uD568\uC758 "\uACE0\uAC1D\uC13C\uD130" \uAD6C\uBD84\uC5D0\uC11C \uBD05\uB2C8\uB2E4.']}]};var A0={id:"roles",tabTitle:"\uC5ED\uD560\xB7\uC54C\uB9BC",topics:[{title:"\uC791\uC131\uC790 \xB7 \uCC45\uC784\uC790 \xB7 \uCC38\uC870\uC790",lines:["**\uC791\uC131\uC790** \u2014 \uC5C5\uBB34\uB97C \uB4F1\uB85D\uD55C \uC0AC\uB78C. \uC5C5\uBB34\uC758 \uC8FC\uC778\uC73C\uB85C \uB0B4\uC6A9\uC744 \uACE0\uCE58\uACE0, \uC644\uB8CC \uCCB4\uD06C\xB7\uC0AD\uC81C(\uD734\uC9C0\uD1B5)\uB97C \uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.","**\uCC45\uC784\uC790** \u2014 \uC2E4\uC81C\uB85C \uCC98\uB9AC\uD558\uB294 \uC0AC\uB78C(1\uBA85). \uD655\uC778\xB7\uC644\uB8CC \uCCB4\uD06C\uB97C \uD558\uACE0, \uD560\uC77C\uC744 \uC5C5\uBB34\uB85C \uC2B9\uACA9\uD574 \uC5C5\uBB34\uB97C \uB098\uB20C \uC218 \uC788\uC2B5\uB2C8\uB2E4.","**\uCC38\uC870\uC790** \u2014 \uD568\uAED8 \uC54C\uACE0 \uC788\uC5B4\uC57C \uD560 \uC0AC\uB78C\uB4E4(\uC5EC\uB7EC \uBA85). \uC77D\uACE0 \uB313\uAE00\uC744 \uB2EC\uBA70 \uD655\uC778 \uBC84\uD2BC\uC73C\uB85C \uC77D\uC74C\uC744 \uB0A8\uAE41\uB2C8\uB2E4.",'\uC138 \uC5ED\uD560\uC740 \uBAA8\uB450 \uAD00\uC5EC\uC790\uC785\uB2C8\uB2E4. \uACF5\uAC1C \uBC94\uC704\uAC00 "\uAD00\uC5EC\uC790\uB9CC"\uC774\uC5B4\uB3C4 \uC11C\uB85C \uBCF4\uC774\uACE0, \uC0C1\uC138 \uC18D\uC131\uC5D0\uC11C \uBC14\uB85C \uBC14\uAFC0 \uC218 \uC788\uC2B5\uB2C8\uB2E4.']},{title:"\uB204\uAC00 \uC5B8\uC81C \uC54C\uB9BC\uC744 \uBC1B\uB098",lines:['**\uCC45\uC784\uC790** \u2014 \uC9C0\uC815\uB420 \uB54C(\uBC30\uC815), \uB0B4\uC6A9\uC774 \uACE0\uCCD0\uC9C8 \uB54C, \uC791\uC131\uC790\uAC00 \uB313\uAE00\uC744 \uB2EC \uB54C, \uB9C8\uAC10 \uC0AC\uC804\uC54C\uB9BC\xB7\uB2F9\uC77C\xB7\uC9C0\uC5F0. \uC2DC\uC791\uC77C\uC2DC\uAC00 \uBBF8\uB798\uBA74 \uC2DC\uC791 \uC804\uC5D0\uB294 \uBCA8\uB9CC \uC624\uACE0, \uC2DC\uC791\uC77C\uC2DC\uC5D0 "\uC0C8 \uC5C5\uBB34\uAC00 \uBC30\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4" \uD478\uC2DC\uAC00 1\uD68C \uC635\uB2C8\uB2E4.',"**\uC791\uC131\uC790** \u2014 \uCC45\uC784\uC790\uAC00 \uBC14\uB014 \uB54C, \uB204\uAD70\uAC00 \uAC00\uC838\uAC00\uAE30 \uD560 \uB54C, \uCC45\uC784\uC790\uAC00 \uD655\uC778\uD588\uC744 \uB54C, \uC644\uB8CC\uB410\uC744 \uB54C, \uB2E4\uB978 \uC0AC\uB78C\uC774 \uB313\uAE00\uC744 \uB2EC \uB54C, \uB9C8\uAC10 \uC0AC\uC804\uC54C\uB9BC\xB7\uB2F9\uC77C\xB7\uC9C0\uC5F0.","**\uCC38\uC870\uC790** \u2014 \uC0C8\uB85C \uCC38\uC870\uB85C \uC9C0\uC815\uB420 \uB54C, \uC644\uB8CC\uB410\uC744 \uB54C. \uCC45\uC784\uC790\uAC00 \uC544\uC9C1 \uC5C6\uB294 \uC5C5\uBB34\uB77C\uBA74 \uB313\uAE00\uB3C4 \uBC1B\uC2B5\uB2C8\uB2E4. \uB9C8\uAC10 \uC54C\uB9BC\uC740 \uBC1B\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.","**\uB313\uAE00 \uB300\uD654** \u2014 \uB313\uAE00\uC740 \uC791\uC131\uC790\uC640 \uC9C1\uC804 \uB313\uAE00 \uC791\uC131\uC790\uC5D0\uAC8C \uAC00\uBBC0\uB85C, \uB2F5\uAE00\uC744 \uC8FC\uACE0\uBC1B\uB294 \uB450 \uC0AC\uB78C\uC5D0\uAC8C \uC774\uC5B4\uC9D1\uB2C8\uB2E4. \uB313\uAE00 \uBC18\uC751(\uC88B\uC544\uC694\xB7\uD655\uC778)\uC740 \uADF8 \uB313\uAE00 \uC791\uC131\uC790\uC5D0\uAC8C \uAC11\uB2C8\uB2E4.","\uBCF8\uC778\uC774 \uD55C \uD589\uB3D9\uC740 \uBCF8\uC778\uC5D0\uAC8C \uC54C\uB9AC\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uC885\uB958\uBCC4 \uC218\uC2E0 \uC5EC\uBD80\uB294 **\uB0B4 \uC815\uBCF4 \u203A \uC54C\uB9BC \uC124\uC815**\uC5D0\uC11C \uBC14\uAFC9\uB2C8\uB2E4."]},{title:"\uC2DC\uC791\uC77C\uC2DC\uC640 \uB9C8\uAC10\uC608\uC815",lines:["**\uC2DC\uC791\uC77C\uC2DC** \u2014 \uC77C\uC744 \uC2DC\uC791\uD560 \uC2DC\uC810. \uCC45\uC784\uC790 \uD478\uC2DC \uC54C\uB9BC\uC740 \uC774\uB54C\uBD80\uD130 \uAC11\uB2C8\uB2E4(\uBBF8\uB798\uB85C \uC7A1\uC73C\uBA74 \uADF8 \uC804\uAE4C\uC9C0\uB294 \uBCA8\uC5D0\uB9CC \uC313\uC784). \uBE44\uC6CC \uB450\uBA74 \uBC14\uB85C \uC2DC\uC791\uC73C\uB85C \uBD05\uB2C8\uB2E4.","**\uB9C8\uAC10\uC608\uC815** \u2014 \uB05D\uB0B4\uAE30\uB85C \uD55C \uC2DC\uC810. \uC0AC\uC804\uC54C\uB9BC(\uC5C5\uBB34\uD568 \uC124\uC815 \uC2DC\uAC01)\xB7\uB2F9\uC77C\xB7\uC9C0\uC5F0 \uC54C\uB9BC\uC758 \uAE30\uC900\uC774\uACE0, \uCE98\uB9B0\uB354\xB7\uD0C0\uC784\uB77C\uC778\uC5D0 \uB193\uC774\uB294 \uB0A0\uC9DC\uC785\uB2C8\uB2E4. \uC9C0\uB09C \uB9C8\uAC10\uB9CC \uBE68\uAC04\uC0C9\uC73C\uB85C \uD45C\uC2DC\uB429\uB2C8\uB2E4.","\uB9C8\uAC10\uC608\uC815 \uC5C6\uC774 \uC644\uB8CC\uD558\uBA74 \uC644\uB8CC \uC2DC\uAC01\uC774 \uB9C8\uAC10\uC608\uC815\uC73C\uB85C \uCC44\uC6CC\uC9D1\uB2C8\uB2E4. \uC2DC\uC791\uC77C\uC2DC\uB294 \uCC44\uC6B0\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.","\uC77C\uC815(\uC2DC\uAC01 \uC788\uB294 \uD589\uC0AC)\uC740 \uB9C8\uAC10\uC608\uC815 \uB300\uC2E0 **\uC77C\uC2DC**\uAC00 \uAE30\uC900\uC774\uACE0, \uCC38\uC11D\uC790 \uC804\uC6D0\uACFC \uC791\uC131\uC790\uAC00 \uC54C\uB9BC\uC744 \uBC1B\uC2B5\uB2C8\uB2E4."]}]};var D0={id:"tasks",tabTitle:"\uC5C5\uBB34",topics:[{title:"\uC5C5\uBB34 \uB4F1\uB85D",lines:["**\uC0C8\uB85C \uB9CC\uB4E4\uAE30** \uBC84\uD2BC \uB610\uB294 \uB2E8\uCD95\uD0A4 **N**. \uC81C\uBAA9\xB7\uB0B4\uC6A9\xB7\uCC45\uC784\uC790\xB7\uCC38\uC870\uC790\xB7\uC2DC\uC791\uC77C\uC2DC\xB7\uB9C8\uAC10\uC608\uC815\xB7\uC911\uC694\uB3C4\uB97C \uC815\uD569\uB2C8\uB2E4.","**\uACF5\uAC1C \uBC94\uC704** \u2014 \uAD00\uC5EC\uC790\uB9CC / \uBD80\uC11C / \uC804\uCCB4 \uC9C1\uC6D0. \uCC45\uC784\uC790\uAC00 \uC5C6\uB294 \uACF5\uAC1C \uC5C5\uBB34\uB294 \uC5F4\uB78C\uC790\uAC00 **\uAC00\uC838\uAC00\uAE30**\uB85C \uB9E1\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4.",'**\uBC18\uBCF5** \u2014 \uB9E4\uC77C\xB7\uB9E4\uC8FC\xB7\uB9E4\uC6D4 \uB4F1\uC73C\uB85C \uD68C\uCC28\uB97C \uB9CC\uB4E4\uACE0, \uC644\uB8CC\xB7\uC0AD\uC81C \uB54C "\uC774 \uD68C\uCC28\uB9CC / \uC774\uD6C4 \uC804\uCCB4"\uB97C \uACE0\uB985\uB2C8\uB2E4.','**\uC77C\uC815**\uC740 \uC2DC\uAC01\uC774 \uC788\uB294 \uD589\uC0AC\xB7\uAD50\uC721 \uB4F1\uC785\uB2C8\uB2E4. \uC644\uB8CC \uAC1C\uB150\uC774 \uC5C6\uACE0 \uCE98\uB9B0\uB354\uC640 \uC804\uCCB4 \uD0ED "\uC77C\uC815" \uADF8\uB8F9\uC5D0 \uB098\uC635\uB2C8\uB2E4.']},{title:"\uC5C5\uBB34 \uC0C1\uC138",lines:["\uC81C\uBAA9\xB7\uD589\uC744 \uB204\uB974\uBA74 \uC624\uB978\uCABD \uC0C1\uC138 \uD328\uB110(\uBAA8\uBC14\uC77C\uC740 \uC804\uCCB4 \uD654\uBA74)\uC774 \uC5F4\uB9BD\uB2C8\uB2E4. \uC81C\uBAA9\uACFC \uC18D\uC131\uC740 \uBC14\uB85C \uB20C\uB7EC \uACE0\uCE69\uB2C8\uB2E4.","**\uB0B4\uC6A9**\uC740 \uBCF8\uBB38 \uC591\uC2DD(\u22EE \u203A \uBCF8\uBB38 \uC591\uC2DD)\uC73C\uB85C \uC800\uC7A5\uD574 \uB450\uACE0 \uBD88\uB7EC\uC62C \uC218 \uC788\uC2B5\uB2C8\uB2E4.",'**\uC5C5\uBB34 \uB300\uD654\uB294 \uB313\uAE00\uB85C** \uD569\uB2C8\uB2E4. \uB313\uAE00\uC5D0\uB294 \uD30C\uC77C\xB7\uC774\uBBF8\uC9C0\uB97C \uBD99\uC774\uACE0, \uB313\uAE00\uC5D0 **\uD655\uC778(\u2713)\xB7\uC88B\uC544\uC694** \uBC18\uC751\uC744 \uB0A8\uACA8 "\uC77D\uC5C8\uB2E4/\uB3D9\uC758\uD55C\uB2E4"\uB97C \uD45C\uC2DC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4(\uBC18\uC751\uC740 \uB313\uAE00 \uC791\uC131\uC790\uC5D0\uAC8C \uC54C\uB9BC).',"\uB313\uAE00\uC740 \uC791\uC131\uC790\uC640 \uC9C1\uC804 \uB313\uAE00 \uC791\uC131\uC790\uC5D0\uAC8C \uC54C\uB9BC\uC774 \uAC00\uBBC0\uB85C \uB2F5\uAE00\uC774 \uC624\uAC00\uB294 \uD750\uB984\uC774 \uB04A\uAE30\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uACE0\uAC1D\uC13C\uD130 \uAE00\uC740 \uCF54\uB4DC\uC0F5 \uB313\uAE00\uC774 \uACE7 \uB2F5\uBCC0\uC785\uB2C8\uB2E4.","**\uD65C\uB3D9** \uC544\uC774\uCF58\uC73C\uB85C \uB4F1\uB85D\xB7\uC218\uC815\xB7\uD655\uC778\xB7\uC644\uB8CC \uC774\uB825\uC744 \uBD05\uB2C8\uB2E4. \uC0C1\uC138\uC758 \uD734\uC9C0\uD1B5 \uC544\uC774\uCF58\uC740 \uC791\uC131\uC790\uB9CC \uBCF4\uC785\uB2C8\uB2E4.","\uBAA8\uBC14\uC77C \uC0C1\uC138\uB294 \uC624\uB978\uCABD \uC704 **\u22EE** \uC5D0 \uD65C\uB3D9\xB7\uACF5\uC720\xB7\uC0AD\uC81C\uAC00 \uC788\uACE0, \uACE0\uCE5C \uB0B4\uC6A9\uC740 **\uC800\uC7A5\uD558\uAE30**\uB85C \uD55C \uBC88\uC5D0 \uBCF4\uB0C5\uB2C8\uB2E4."]},{title:"\uC0C1\uD0DC\uC640 \uC644\uB8CC",lines:["\uC0C1\uD0DC \uCE69\uC744 \uB204\uB974\uBA74 \uC2DC\uC791\uC804 \u203A \uC9C4\uD589\uC911 \u203A \uBCF4\uB958\uB97C \uACE0\uB985\uB2C8\uB2E4. \uBA54\uB274\uC758 **\uC644\uB8CC**\uB294 \uD655\uC778 \uC5C6\uC774 \uBC14\uB85C \uC644\uB8CC \uCC98\uB9AC\uB429\uB2C8\uB2E4.","\uC644\uB8CC \uCCB4\uD06C(\u25CB)\uB294 **\uC791\uC131\uC790\uC640 \uCC45\uC784\uC790\uB9CC** \uB204\uB97C \uC218 \uC788\uACE0, \uD655\uC778 \uD31D\uC5C5\uC744 \uAC70\uCCD0 \uC801\uC6A9\uB429\uB2C8\uB2E4. \uB9C8\uAC10\uC608\uC815\uC774 \uBE44\uC5B4 \uC788\uC73C\uBA74 \uC644\uB8CC \uC2DC\uAC01\uC73C\uB85C \uCC44\uC6CC\uC9D1\uB2C8\uB2E4.",'\uB9C8\uAC10\uC608\uC815\uC740 \uC9C0\uB09C \uAC83\uB9CC \uBE68\uAC04\uC0C9\uC73C\uB85C \uD45C\uC2DC\uB418\uBA70, \uC9C0\uC5F0 \uAC74\uC218\uB294 \uADF8\uB8F9 \uBA38\uB9AC\uC904\uC5D0 "\uC9C0\uC5F0 n\uAC74"\uC73C\uB85C \uBCF4\uC785\uB2C8\uB2E4.']},{title:"\uAD00\uB828 \uC5C5\uBB34",lines:["\uC0C1\uC138\uC758 **\uAD00\uB828 \uC5C5\uBB34**\uC5D0\uC11C \uD6C4\uC18D \uC5C5\uBB34 \uB9CC\uB4E4\uAE30, \uAD00\uB828\xB7\uC911\uBCF5 \uC5C5\uBB34 \uC5F0\uACB0\uC744 \uD569\uB2C8\uB2E4.","\uC6B0\uD074\uB9AD \uBA54\uB274\uC5D0\uC11C \uD504\uB85C\uC81D\uD2B8 \uC774\uB3D9, \uBAA9\uD45C\uC5D0 \uB123\uAE30, \uBCF4\uAD00, \uC0AD\uC81C\uB97C \uBC14\uB85C \uC2E4\uD589\uD569\uB2C8\uB2E4."]}]};var P0={id:"checklist",tabTitle:"\uD560\uC77C",topics:[{title:"\uD560\uC77C \uBAA9\uB85D",lines:['\uC0C1\uC138\uC758 **\uD560\uC77C**\uC5D0 \uD56D\uBAA9\uC744 \uC801\uACE0 \uCCB4\uD06C\uD569\uB2C8\uB2E4. \uC9C4\uD589\uC740 \uBAA9\uB85D\xB7\uCE74\uB4DC\uC5D0 "1/3"\uCC98\uB7FC \uD45C\uC2DC\uB429\uB2C8\uB2E4.',"\uD0C0\uC784\uB77C\uC778 \uBCF4\uAE30\uC5D0\uC11C\uB294 \uC5C5\uBB34 \uC544\uB798 \uD560\uC77C \uC904\uC774 \uD3BC\uCCD0\uC9C0\uBA70, \uCCB4\uD06C\uD558\uBA74 \uD655\uC778 \uD31D\uC5C5 \uB4A4 \uC644\uB8CC\uB429\uB2C8\uB2E4."]},{title:"\uD560\uC77C\uC744 \uC5C5\uBB34\uB85C \u2014 \uC5C5\uBB34 \uB098\uB204\uAE30(\uBD84\uC7A5)",lines:["\u2460 \uC791\uC131\uC790\uAC00 \uD070 \uC5C5\uBB34\uB97C \uB4F1\uB85D\uD558\uACE0 \uCC45\uC784\uC790\uB97C \uC815\uD55C \uB4A4, \uD560\uC77C\uC5D0 \uD574\uC57C \uD560 \uC77C\uC744 \uD56D\uBAA9\uC73C\uB85C \uC801\uC2B5\uB2C8\uB2E4.","\u2461 \uCC45\uC784\uC790\uB294 \uD560\uC77C \uD56D\uBAA9\uC758 **\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30**\uB85C \uAC01 \uD56D\uBAA9\uC744 \uBCC4\uB3C4 \uC5C5\uBB34\uB85C \uC2B9\uACA9\uD558\uACE0, \uADF8 \uC5C5\uBB34\uC758 \uCC45\uC784\uC790\xB7\uB9C8\uAC10\uC608\uC815\uC744 \uC815\uD574 \uD300\uC6D0\uC5D0\uAC8C \uB098\uB220 \uB9E1\uAE41\uB2C8\uB2E4.",'\u2462 \uC2B9\uACA9\uB41C \uC5C5\uBB34\uB294 \uC6D0\uB798 \uC5C5\uBB34\uC758 \uD560\uC77C\uC5D0 \uC5F0\uACB0\uB41C \uCC44\uB85C \uB0A8\uC544, \uD300\uC6D0\uC774 \uC644\uB8CC\uD558\uBA74 \uC6D0\uB798 \uC5C5\uBB34\uC758 \uD560\uC77C\uB3C4 \uC644\uB8CC\uB85C \uD45C\uC2DC\uB429\uB2C8\uB2E4("3/4" \uC9C4\uD589 \uD45C\uC2DC).',"\u2463 \uB098\uB220 \uC900 \uC5C5\uBB34\uB07C\uB9AC \uB313\uAE00\uB85C \uB300\uD654\uD558\uACE0, \uBAA8\uB450 \uB05D\uB098\uBA74 \uCC45\uC784\uC790\uAC00 \uC6D0\uB798 \uC5C5\uBB34\uB97C \uC644\uB8CC\uD569\uB2C8\uB2E4.","\uC774\uBBF8 \uC788\uB294 \uC5C5\uBB34\uB97C \uD560\uC77C\uC5D0 \uBD99\uC77C \uC218\uB3C4 \uC788\uACE0, \uC5F0\uACB0 \uC5C5\uBB34\uB97C \uD734\uC9C0\uD1B5\uC5D0 \uBCF4\uB0B4\uBA74 \uD560\uC77C\uC5D0\uC11C\uB3C4 \uBE60\uC9D1\uB2C8\uB2E4(\uAC74\uC218\uB3C4 \uD568\uAED8 \uB9DE\uCDB0\uC9D1\uB2C8\uB2E4)."]}]};var N0={id:"confirm",tabTitle:"\uD655\uC778\xB7\uC54C\uB9BC",topics:[{title:"\uD655\uC778 \uC694\uCCAD\uACFC \uD655\uC778 \uC644\uB8CC",lines:['\uCC45\uC784\uC790\xB7\uCC38\uC870\uC790\uB294 \uBC30\uC815\uB41C \uC5C5\uBB34\uB97C **\uD655\uC778** \uBC84\uD2BC\uC73C\uB85C \uC77D\uC74C \uCC98\uB9AC\uD569\uB2C8\uB2E4. \uD655\uC778 \uC804 \uC5C5\uBB34\uB294 \uD45C \uB9E8 \uC704 "\uBBF8\uD655\uC778" \uC601\uC5ED\uACFC \uBAA8\uBC14\uC77C "\uBBF8\uD655\uC778" \uADF8\uB8F9\uC5D0 \uBAA8\uC785\uB2C8\uB2E4.',"\uD655\uC778 \uC5F4\uC758 **n/m** \uC744 \uB204\uB974\uBA74 \uB204\uAC00 \uD655\uC778\uD588\uB294\uC9C0 \uBCF4\uC774\uACE0, \uC791\uC131\uC790\uB294 \uBBF8\uD655\uC778\uC790\uC5D0\uAC8C **\uD655\uC778 \uC694\uCCAD**\uC744 \uB2E4\uC2DC \uBCF4\uB0BC \uC218 \uC788\uC2B5\uB2C8\uB2E4.","\uACF5\uC9C0\uC0AC\uD56D\uC740 \uB300\uC0C1\uC790\uAC00 \uD655\uC778\uD558\uBA70, \uD655\uC778 \uC5F4 \uD544\uD130(\uC804\uCCB4/\uBBF8\uD655\uC778/\uD655\uC778\uD568)\uB85C \uAC70\uB985\uB2C8\uB2E4."]},{title:"\uC54C\uB9BC",lines:["\uBC30\uC815\xB7\uB2F4\uB2F9\uC790 \uBCC0\uACBD\xB7\uCC38\uC870 \uC9C0\uC815\xB7\uB313\uAE00\xB7\uB313\uAE00 \uBC18\uC751\xB7\uD655\uC778 \uC694\uCCAD\xB7\uD655\uC778 \uC644\uB8CC\xB7\uC5C5\uBB34 \uC644\uB8CC\xB7\uC218\uC815\xB7\uB9C8\uAC10 \uC54C\uB9BC\uC774 \uBCA8\uACFC \uC571 \uD478\uC2DC\uB85C \uC635\uB2C8\uB2E4.","**\uB0B4 \uC815\uBCF4 \u203A \uC54C\uB9BC \uC124\uC815**\uC5D0\uC11C \uC885\uB958\uBCC4\uB85C \uB044\uACE0 \uCF24 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uB9C8\uAC10 \uC0AC\uC804\uC54C\uB9BC \uC2DC\uAC01\uC740 \uC5C5\uBB34\uD568 \uC124\uC815(\uAD00\uB9AC\uC790)\uC5D0\uC11C \uC815\uD569\uB2C8\uB2E4.",'\uCC45\uC784\uC790 \uC54C\uB9BC\uC740 \uC2DC\uC791\uC77C\uC2DC\uBD80\uD130 \uAC11\uB2C8\uB2E4(\uC2DC\uC791\uC77C\uC2DC\uAC00 \uBBF8\uB798\uBA74 \uADF8\uB54C "\uC2DC\uC791" \uC54C\uB9BC\uC73C\uB85C \uC804\uB2EC).']}]};var L0={id:"views",tabTitle:"\uBCF4\uAE30",topics:[{title:"\uBCF4\uAE30 \uC804\uD658",lines:["\uD5E4\uB354 \uC624\uB978\uCABD \uBC84\uD2BC(\uBAA9\uB85D\xB7\uC8FC\uAC04\xB7\uC6D4\uAC04\xB7\uD504\uB85C\uC81D\uD2B8\xB7\uC0C1\uD0DC\xB7\uBAA9\uD45C\xB7\uD0C0\uC784\uB77C\uC778)\uC73C\uB85C \uBC14\uAFB8\uBA70 \uD0ED\uB9C8\uB2E4 \uB530\uB85C \uAE30\uC5B5\uB429\uB2C8\uB2E4. \uD654\uBA74\uC774 \uC881\uC73C\uBA74 \uD604\uC7AC \uBCF4\uAE30 \uD558\uB098\uB9CC \uBCF4\uC774\uACE0 \uB204\uB974\uBA74 \uBA54\uB274\uAC00 \uC5F4\uB9BD\uB2C8\uB2E4.","\uB2E8\uCD95\uD0A4 **G** \uB2E4\uC74C \uAE00\uC790\uD0A4\uB85C\uB3C4 \uC804\uD658\uD569\uB2C8\uB2E4(\uB2E8\uCD95\uD0A4 \uD0ED \uCC38\uACE0)."]},{title:"\uBAA9\uB85D(\uD45C)",lines:["\uC5F4 \uC81C\uBAA9 \u2014 \uC81C\uBAA9\xB7\uC2DC\uC791\uC77C\uC2DC\xB7\uB9C8\uAC10\uC608\uC815\xB7\uC644\uB8CC\uC77C\uC2DC\uB294 **\uC815\uB82C**, \uC0C1\uD0DC\xB7\uD655\uC778\xB7\uCC45\uC784\uC790\xB7\uCC38\uC870\uC790\xB7\uD504\uB85C\uC81D\uD2B8\xB7\uC911\uC694\uB3C4\uB294 **\uD544\uD130**\uAC00 \uC5F4\uB9BD\uB2C8\uB2E4.","**\uADF8\uB8F9** \uBA54\uB274\uB85C \uCC45\uC784\uC790\xB7\uD504\uB85C\uC81D\uD2B8\xB7\uC0C1\uD0DC \uB4F1 \uAE30\uC900\uC744 \uBC14\uAFB8\uACE0, \uADF8\uB8F9 \uBA38\uB9AC\uC904\uC758 \u25B8 \uB85C \uC811\uC2B5\uB2C8\uB2E4. \uADF8\uB8F9 \uBA38\uB9AC\uC904 **+** \uB85C \uADF8 \uADF8\uB8F9\uC5D0 \uBC14\uB85C \uB4F1\uB85D\uD569\uB2C8\uB2E4.","\uD654\uBA74\uC774 \uC881\uC73C\uBA74 \uD45C\uAC00 \uAC00\uB85C\uB85C \uC2A4\uD06C\uB864\uB418\uACE0 \uC5F4 \uC81C\uBAA9\uC774 \uD568\uAED8 \uB530\uB77C\uC635\uB2C8\uB2E4."]},{title:"\uBCF4\uB4DC(\uD504\uB85C\uC81D\uD2B8\xB7\uC0C1\uD0DC\xB7\uBAA9\uD45C)",lines:["\uCE74\uB4DC\uB97C \uC81C\uBAA9 \uC55E **\u22EE\u22EE \uD578\uB4E4**\uB85C \uB04C\uC5B4 \uB2E4\uB978 \uCEEC\uB7FC(\uD504\uB85C\uC81D\uD2B8/\uC0C1\uD0DC/\uBAA9\uD45C)\uC73C\uB85C \uC62E\uAE41\uB2C8\uB2E4. \uCEEC\uB7FC \uBA38\uB9AC\uB97C \uB04C\uBA74 \uD504\uB85C\uC81D\uD2B8 \uC21C\uC11C\uAC00 \uBC14\uB01D\uB2C8\uB2E4.","\uCEEC\uB7FC **\u22EE** \uBA54\uB274 \u2014 \uC0C8 \uC5C5\uBB34 \uB4F1\uB85D \xB7 \uC218\uC815 \xB7 \uBCF4\uAD00 \xB7 \uC0AD\uC81C(\uC0AD\uC81C\uD558\uBA74 \uC18C\uC18D \uC5C5\uBB34\uB294 \uAE30\uBCF8 \uC5C5\uBB34\uD568\uC73C\uB85C \uC774\uB3D9).","\uCE74\uB4DC\uC758 \uC6D0\uD615 \uCCB4\uD06C\uB294 \uC644\uB8CC, \uB9C8\uAC10 \uB0A0\uC9DC\uB97C \uB204\uB974\uBA74 \uB2EC\uB825\uC73C\uB85C \uBC14\uAFC9\uB2C8\uB2E4. \uB9C8\uAC10\uC774 \uC5C6\uC73C\uBA74 \uC54C\uB78C \uC544\uC774\uCF58\uB9CC \uBCF4\uC785\uB2C8\uB2E4."]},{title:"\uC8FC\uAC04\xB7\uC6D4\uAC04 \uCE98\uB9B0\uB354",lines:["\uB9C8\uAC10\uC608\uC815(\uC77C\uC815\uC740 \uC77C\uC2DC) \uAE30\uC900\uC73C\uB85C \uCE78\uC5D0 \uB193\uC785\uB2C8\uB2E4. \uCE74\uB4DC\uB97C \uB2E4\uB978 \uB0A0\uB85C \uB04C\uBA74 \uB0A0\uC9DC\uAC00 \uBC14\uB01D\uB2C8\uB2E4.","\uBE48 \uCE78\uC5D0 \uB9C8\uC6B0\uC2A4\uB97C \uC62C\uB9AC\uBA74 **\uC5C5\uBB34 \uB4F1\uB85D** \uC904\uC774 \uB098\uD0C0\uB098 \uADF8 \uB0A0\uC9DC\uB85C \uBC14\uB85C \uB4F1\uB85D\uD569\uB2C8\uB2E4. \uC5F0/\uC6D4 \uC81C\uBAA9\uC744 \uB204\uB974\uBA74 \uB2EC\uB825\uC73C\uB85C \uC774\uB3D9\uD569\uB2C8\uB2E4.","\u22EE \u203A **\uCE98\uB9B0\uB354 \uC5F0\uB3D9**\uC5D0\uC11C \uAD6C\uAE00\xB7\uC560\uD50C\xB7\uB124\uC774\uBC84 \uCE98\uB9B0\uB354\uB85C \uB0B4\uBCF4\uB0B4\uAE30/\uAC00\uC838\uC624\uAE30\uB97C \uC124\uC815\uD569\uB2C8\uB2E4."]},{title:"\uD0C0\uC784\uB77C\uC778",feature:"timeline",lines:["\uC2DC\uC791\uC77C\uC2DC~\uB9C8\uAC10\uC608\uC815\uC744 \uB9C9\uB300\uB85C \uBCF4\uC5EC \uAE30\uAC04 \uACB9\uCE68\uC744 \uD655\uC778\uD569\uB2C8\uB2E4. \uC67C\uCABD \uC5C5\uBB34\uBA85 \uC904\uC758 \uD578\uB4E4\uB85C \uC21C\uC11C\uB97C \uBC14\uAFC9\uB2C8\uB2E4.","\uC5C5\uBB34 \uC544\uB798 \uD560\uC77C \uC904\uC774 \uD3BC\uCCD0\uC9C0\uBA70, \uC644\uB8CC \uC228\uAE30\uAE30\uAC00 \uCF1C\uC838 \uC788\uC73C\uBA74 \uC644\uB8CC\uB41C \uD560\uC77C\uB3C4 \uAC10\uCDA5\uB2C8\uB2E4."]},{title:"\uCC28\uD2B8",feature:"charts",lines:["**\uCC28\uD2B8** \uBC84\uD2BC\uC5D0\uC11C \uC6CC\uD06C\uB85C\uB4DC(\uC778\uC6D0\uBCC4 \uBD80\uD558)\xB7\uB204\uC801\uD750\uB984\uB3C4\xB7\uB9AC\uB4DC\uD0C0\uC784, \uBAA9\uD45C\uB97C \uC4F0\uBA74 \uBCA8\uB85C\uC2DC\uD2F0\xB7\uBC88\uB2E4\uC6B4\uC744 \uBD05\uB2C8\uB2E4.","\uC6CC\uD06C\uB85C\uB4DC\uC758 \uC778\uC6D0 \uC6A9\uB7C9\uC740 \uCC28\uD2B8 \uC548 \uC124\uC815 \uC544\uC774\uCF58\uC73C\uB85C \uC815\uD569\uB2C8\uB2E4."]}]};var z0={id:"filters",tabTitle:"\uAC80\uC0C9\xB7\uD544\uD130",topics:[{title:"\uAC80\uC0C9\uACFC \uD544\uD130",lines:["\uAC80\uC0C9\uCE78\uC740 \uC81C\uBAA9\xB7\uBE44\uACE0\uB97C \uCC3E\uC2B5\uB2C8\uB2E4(\uB2E8\uCD95\uD0A4 **/**). \uBAA8\uBC14\uC77C\uC740 \uAC80\uC0C9 \uD654\uBA74\uC5D0\uC11C \uC0C1\uD0DC\xB7\uB77C\uBCA8 \uCE69\uC73C\uB85C \uD568\uAED8 \uAC70\uB985\uB2C8\uB2E4.","**\uD544\uD130**(\uBAA9\uB85D \uC678 \uBCF4\uAE30) \xB7 **\uCC45\uC784\uC790** \xB7 **\uD504\uB85C\uC81D\uD2B8** \xB7 **\uC911\uC694\uB3C4** \uBC84\uD2BC\uC740 \uAC01\uAC01 \uCCB4\uD06C \uBA54\uB274\uAC00 \uC5F4\uB9AC\uACE0, \uAC78\uB9B0 \uAC1C\uC218\uAC00 \uBC84\uD2BC\uC5D0 \uD45C\uC2DC\uB429\uB2C8\uB2E4.","**\uBAA9\uD45C** \uBC84\uD2BC\uC740 \uC804\uCCB4/\uBBF8\uBC30\uC815/\uBAA9\uD45C\uBCC4\uB85C \uAC70\uB985\uB2C8\uB2E4(\uBAA9\uD45C \uBCF4\uB4DC\uC5D0\uC11C\uB294 \uCEEC\uB7FC\uC774 \uACE7 \uBAA9\uD45C\uB77C \uC801\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4).","\uC644\uB8CC\xB7\uBCF4\uAD00\uD568 \uD0ED\uC740 **\uAE30\uAC04** \uBC84\uD2BC\uC73C\uB85C \uC644\uB8CC\uC77C \uBC94\uC704\uB97C \uC815\uD569\uB2C8\uB2E4."]},{title:"\uB77C\uBCA8",feature:"label",lines:["**\uB77C\uBCA8** \uBC84\uD2BC\uC73C\uB85C \uB77C\uBCA8\uBCC4\uB85C \uAC70\uB974\uACE0, \uC5C5\uBB34 \uC0C1\uC138\uC758 \uB77C\uBCA8 \uD589\uC5D0\uC11C \uBD99\uC785\uB2C8\uB2E4. \uB77C\uBCA8 \uC0AC\uC804\uC740 \uC5C5\uBB34\uD568 \uC124\uC815\uC5D0\uC11C \uAD00\uB9AC\uD569\uB2C8\uB2E4."]}]};var j0={id:"projects",tabTitle:"\uD504\uB85C\uC81D\uD2B8\xB7\uBAA9\uD45C",feature:"project",topics:[{title:"\uD504\uB85C\uC81D\uD2B8",lines:["\uC5C5\uBB34\uB97C \uBB36\uB294 \uB2E8\uC704\uC785\uB2C8\uB2E4. \uD504\uB85C\uC81D\uD2B8 \uBCF4\uB4DC \uB9E8 \uB05D \uC810\uC120 \uCE78 \uB610\uB294 \uCEEC\uB7FC \u22EE \u203A \uC218\uC815\uC5D0\uC11C \uC774\uB984\xB7\uC544\uC774\uCF58\uC744 \uC815\uD569\uB2C8\uB2E4.","\uC5C5\uBB34\uC758 \uD504\uB85C\uC81D\uD2B8\uB294 \uC0C1\uC138 \uC18D\uC131\uC774\uB098 \uC6B0\uD074\uB9AD \u203A \uD504\uB85C\uC81D\uD2B8 \uC774\uB3D9\uC73C\uB85C \uBC14\uAFC9\uB2C8\uB2E4. \uAE30\uBCF8 \uC5C5\uBB34\uD568\uC740 \uD504\uB85C\uC81D\uD2B8\uAC00 \uC5C6\uB294 \uC5C5\uBB34\uC785\uB2C8\uB2E4."]},{title:"\uBAA9\uD45C(\uC2A4\uD504\uB9B0\uD2B8)",feature:"sprint",lines:["\uD504\uB85C\uC81D\uD2B8 \uC124\uC815\uC5D0\uC11C **\uBAA9\uD45C \uC0AC\uC6A9**\uC744 \uCF1C\uBA74 \uAE30\uAC04\uC774 \uC788\uB294 \uBAA9\uD45C\uB97C \uB9CC\uB4E4\uACE0 \uC5C5\uBB34\uB97C \uBC30\uC815\uD569\uB2C8\uB2E4(\uBAA9\uD45C \uBCF4\uB4DC\uC5D0\uC11C \uCE74\uB4DC \uB04C\uAE30, \uC6B0\uD074\uB9AD \u203A \uBAA9\uD45C\uC5D0 \uB123\uAE30).","\uBAA9\uD45C \uC885\uB8CC \uC2DC \uB0A8\uC740 \uC5C5\uBB34\uB97C \uB2E4\uC74C \uBAA9\uD45C\uB85C \uB118\uAE38\uC9C0, \uBBF8\uBC30\uC815\uC73C\uB85C \uBE84\uC9C0 \uACE0\uB985\uB2C8\uB2E4. \uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8\uB294 \uC0C1\uC138 \uC18D\uC131\uC5D0\uC11C \uC801\uC2B5\uB2C8\uB2E4."]},{title:"\uC5C5\uBB34 \uD15C\uD50C\uB9BF\xB7\uC790\uB3D9\uD654 \uADDC\uCE59",lines:["\u22EE \u203A **\uC5C5\uBB34 \uD15C\uD50C\uB9BF**\uC73C\uB85C \uC815\uD615 \uC808\uCC28(\uD560\uC77C \uD3EC\uD568)\uB97C \uD55C \uBC88\uC5D0 \uB9CC\uB4E4\uACE0, **\uC790\uB3D9\uD654 \uADDC\uCE59**\uC73C\uB85C \uB4F1\uB85D \uC2DC \uC870\uAC74\uBD80 \uBC30\uC815 \uB4F1\uC744 \uB9E1\uAE41\uB2C8\uB2E4."]},{title:"\uBCF4\uACE0\uC11C",feature:"report",lines:["**\uBCF4\uACE0\uC11C** \uD0ED\uC5D0\uC11C \uC5C5\uBB34 \uBCF4\uACE0\uC11C\uB97C \uC791\uC131\uD574 \uC804\uC790\uACB0\uC7AC\uB85C \uC0C1\uC2E0\uD569\uB2C8\uB2E4."]}]};var F0={id:"shortcuts",tabTitle:"\uB2E8\uCD95\uD0A4",topics:[]};var q0=[O0,A0,D0,P0,N0,L0,z0,j0,F0];import{jsx as an,jsxs as Rf}from"react/jsx-runtime";function nT(e){return e.split(/(\*\*[^*]+\*\*)/g).filter(b=>b.length>0).map((b,l)=>b.startsWith("**")&&b.endsWith("**")?an(lo,{component:"strong",sx:{fontWeight:700},children:b.slice(2,-2)},l):an(QS,{children:b},l))}function oT({keys:e}){let d=at();return an(lo,{sx:{display:"flex",alignItems:"center",gap:.5,justifyContent:"flex-end"},children:e.split(" \u2192 ").map((b,l)=>Rf(lo,{sx:{display:"flex",alignItems:"center",gap:.5},children:[l>0?an(tT,{sx:{fontSize:18,color:d.colors.textMuted}}):null,an(lo,{component:"span",sx:{minWidth:32,height:32,px:.75,display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:13.5,fontWeight:700,color:d.colors.textPrimary,bgcolor:d.colors.surfaceSubtle,border:`1px solid ${d.colors.border}`,borderRadius:1,fontVariantNumeric:"tabular-nums"},children:b})]},`${b}-${l}`))})}function zK({open:e,onClose:d,views:b,features:l={},initialTab:o}){let s=at(),r=c=>!c||l[c]!==!1,t=ha(b),n=q0.filter(c=>r(c.feature)).map(c=>({id:c.id,tabTitle:c.tabTitle,showTitle:!1,children:c.id==="shortcuts"?an(lo,{sx:{display:"grid",gridTemplateColumns:"auto 1fr",columnGap:2,rowGap:1.25,alignItems:"center",fontSize:14,color:s.colors.textPrimary,px:.5},children:t.map(i=>Rf(lo,{sx:{display:"contents"},children:[an(oT,{keys:i.keys}),an("span",{children:i.description})]},i.keys))}):an(lo,{sx:{display:"flex",flexDirection:"column",gap:2.5,px:.5},children:c.topics.filter(i=>r(i.feature)).map(i=>Rf(lo,{children:[an(lo,{sx:{fontSize:15,fontWeight:700,color:s.colors.textStrong,mb:.75},children:i.title}),an(lo,{component:"ul",sx:{m:0,pl:2.5,display:"flex",flexDirection:"column",gap:.5,fontSize:14,lineHeight:1.6,color:s.colors.textPrimary},children:i.lines.map((a,h)=>an("li",{children:nT(a)},h))})]},i.title))})}));return an(rT,{open:e,onClose:d,maxWidth:"md",title:"\uC5C5\uBB34\uD568 \uB9E4\uB274\uC5BC",locale:"ko",titleIcons:{delete:{visible:!1}},tabs:{visible:!0,switchContent:!0},activeTabValue:Math.max(0,n.findIndex(c=>c.id===o)),fixedHeight:520,sectionContentPaddingTop:0,fontScale:{enabled:!0},fontScaleKey:"taskbox-manual",sections:n,actions:{showCancelButton:!1,right:an(eT,{variant:"contained",onClick:d,sx:{minWidth:80},children:"\uB2EB\uAE30"})}})}import{useEffect as $0,useRef as iT,useState as ds}from"react";import{Box as or,Button as Fn,IconButton as Of,Menu as H0,MenuItem as W0,Switch as sT,Tooltip as U0}from"@mui/material";import{FormDialog as V0}from"@ehfuse/mui-form-dialog";import Af from"@mui/icons-material/Add";import aT from"@mui/icons-material/ArrowRightAlt";import lT from"@mui/icons-material/BoltOutlined";import cT from"@mui/icons-material/Close";import uT from"@mui/icons-material/EditOutlined";import{ErrorAlert as K0}from"@ehfuse/alerts";import{ClearTextField as ma,LabelSelect as mn}from"@ehfuse/mui-form-controls";import{Fragment as Y0,jsx as Xe,jsxs as Cn}from"react/jsx-runtime";var Df=[{value:"created",label:"\uC5C5\uBB34 \uB4F1\uB85D \uC2DC",hint:"\uC0C8 \uC5C5\uBB34\uAC00 \uB9CC\uB4E4\uC5B4\uC9C4 \uC9C1\uD6C4 \uD55C \uBC88 \uC2E4\uD589\uD569\uB2C8\uB2E4."},{value:"status_changed",label:"\uC0C1\uD0DC \uBCC0\uACBD \uC2DC",hint:"\uC0C1\uD0DC\uAC00 \uC2E4\uC81C\uB85C \uBC14\uB010 \uC9C1\uD6C4 \uC2E4\uD589\uD569\uB2C8\uB2E4."},{value:"commented",label:"\uB313\uAE00\uC774 \uB2EC\uB838\uC744 \uB54C",hint:"\uB313\uAE00\uC774 \uC0C8\uB85C \uB2EC\uB9AC\uAC70\uB098 \uC218\uC815\uB41C \uC9C1\uD6C4 \uC2E4\uD589\uD569\uB2C8\uB2E4(\uD68C\uC2E0\uC744 \uBC1B\uC740 \uC790\uB9AC)."},{value:"manager_assigned",label:"\uCC45\uC784\uC790\uAC00 \uC9C0\uC815\uB410\uC744 \uB54C",hint:"\uCC45\uC784\uC790\uAC00 \uC0C8\uB85C \uC9C0\uC815\uB418\uAC70\uB098 \uBC14\uB010 \uC9C1\uD6C4 \uC2E4\uD589\uD569\uB2C8\uB2E4."},{value:"attachment_added",label:"\uCCA8\uBD80\uAC00 \uC62C\uB77C\uC654\uC744 \uB54C",hint:"\uC5C5\uBB34\uC5D0 \uD30C\uC77C\uC774 \uCCA8\uBD80\uB41C \uC9C1\uD6C4 \uC2E4\uD589\uD569\uB2C8\uB2E4(\uC99D\uBE59 \uC811\uC218 \uC790\uB9AC)."},{value:"field_changed",label:"\uD544\uB4DC\uAC00 \uBC14\uB00C\uC5C8\uC744 \uB54C",hint:"\uC9C0\uC815\uD55C \uD544\uB4DC\uAC00 \uC2E4\uC81C\uB85C \uBC14\uB010 \uC9C1\uD6C4 \uC2E4\uD589\uD569\uB2C8\uB2E4(\uD544\uB4DC\uB97C \uC548 \uACE0\uB974\uBA74 \uC544\uBB34 \uC218\uC815\uC5D0\uB098 \uC2E4\uD589)."},{value:"overdue",label:"\uB9C8\uAC10 \uACBD\uACFC \uC2DC",hint:"\uB9C8\uAC10\uC774 \uC9C0\uB09C \uBBF8\uC644\uB8CC \uC5C5\uBB34\uB97C \uB9E4\uC77C \uC810\uAC80\uD574 \uC2E4\uD589\uD569\uB2C8\uB2E4."}],ga=[{value:"due_date",label:"\uB9C8\uAC10\uC608\uC815"},{value:"start_date",label:"\uC2DC\uC791\uC77C\uC2DC"},{value:"priority",label:"\uC911\uC694\uB3C4"},{value:"manager_account_seq",label:"\uCC45\uC784\uC790"},{value:"receiver_account_seqs",label:"\uCC38\uC870\uC790"},{value:"label_keys",label:"\uB77C\uBCA8"},{value:"group_seq",label:"\uD504\uB85C\uC81D\uD2B8"},{value:"sprint_seq",label:"\uBAA9\uD45C"},{value:"content",label:"\uB0B4\uC6A9"},{value:"note",label:"\uBE44\uACE0"}],cc=[{value:"high",label:"\uB192\uC74C"},{value:"medium",label:"\uC911\uAC04"},{value:"low",label:"\uB0AE\uC74C"}];function ac(){return{name:"",trigger:"created",enabled:!0,sort_no:0,condition:{},action:{}}}function lc(e){return cn.find(d=>d.key===e)?.name??e}function fT(e,d,b){let{condition:l,action:o}=e,s=[];if(l.group_seq){let n=d.find(c=>Qo(c.key)===l.group_seq);s.push(`\uD504\uB85C\uC81D\uD2B8=${n?.label??`#${l.group_seq}`}`)}l.is_bug===!0&&s.push("\uC624\uB958\uB9CC"),l.is_event===!0&&s.push("\uC77C\uC815\uB9CC"),l.priority&&s.push(`\uC911\uC694\uB3C4=${cc.find(n=>n.value===l.priority)?.label}`),l.label_key&&s.push(`\uB77C\uBCA8=${b.find(n=>n.key===l.label_key)?.name??l.label_key}`),l.title_contains&&s.push(`\uC81C\uBAA9\uC5D0 "${l.title_contains}" \uD3EC\uD568`),l.status&&s.push(`\uC0C1\uD0DC=${lc(l.status)}`),l.from_status&&s.push(`${lc(l.from_status)}\uC5D0\uC11C`),l.to_status&&s.push(`${lc(l.to_status)}\uB85C`),l.manager_empty===!0&&s.push("\uCC45\uC784\uC790 \uC5C6\uC74C"),l.manager_empty===!1&&s.push("\uCC45\uC784\uC790 \uC788\uC74C"),l.manager_account_seq&&s.push(`\uCC45\uC784\uC790=${l.manager_name||`\uACC4\uC815 #${l.manager_account_seq}`}`),l.receiver_account_seq&&s.push(`\uCC38\uC870\uC790\uC5D0 ${l.receiver_name||`\uACC4\uC815 #${l.receiver_account_seq}`}`),l.changed_field&&s.push(`${ga.find(n=>n.value===l.changed_field)?.label??l.changed_field} \uBCC0\uACBD`),l.comment_contains&&s.push(`\uB313\uAE00\uC5D0 "${l.comment_contains}" \uD3EC\uD568`),l.comment_by_others===!0&&s.push("\uB0A8\uC774 \uC4F4 \uB313\uAE00"),typeof l.overdue_days=="number"&&s.push(`${l.overdue_days}\uC77C \uACBD\uACFC`);let r=[];o.set_status&&r.push(`\uC0C1\uD0DC=${lc(o.set_status)}`),o.set_priority&&r.push(`\uC911\uC694\uB3C4=${cc.find(n=>n.value===o.set_priority)?.label}`),o.assign_manager_account_seq&&r.push(`\uCC45\uC784\uC790=${o.assign_manager_name||"\uC9C0\uC815"}`),o.add_receiver_account_seq&&r.push(`\uCC38\uC870\uC790 + ${o.add_receiver_name||"\uC9C0\uC815"}`),o.add_label_key&&r.push(`\uB77C\uBCA8 + ${b.find(n=>n.key===o.add_label_key)?.name??o.add_label_key}`),o.apply_content_template_seq&&r.push(`\uBCF8\uBB38 \uC591\uC2DD=${o.apply_content_template_name||"\uC9C0\uC815"}`),o.notify_account_seq&&r.push("\uC54C\uB9BC \uBC1C\uC1A1");let t=Df.find(n=>n.value===e.trigger)?.label??e.trigger;return{left:s.length>0?`${t} \xB7 ${s.join(", ")}`:t,right:r.join(", ")||"\uB3D9\uC791 \uC5C6\uC74C"}}var G0={fontSize:16,fontWeight:700,color:"#37352f"},dT={display:"flex",alignItems:"center",gap:1},hT={width:104,flexShrink:0,fontSize:16,color:"#37352f"};function eG({open:e,rules:d,customTabs:b,statusOptions:l,contentTemplates:o=[],onPickAccount:s,onClose:r,onCreate:t,onUpdate:n,onToggle:c,onRemove:i}){let[a,h]=ds(!1),[f,u]=ds(0),[g,m]=ds(ac()),[v,k]=ds(!1),B=iT(null),[R,L]=ds(null),[A,P]=ds(null);$0(()=>{if(e)return;let W=window.setTimeout(()=>{h(!1),u(0),m(ac())},500);return()=>window.clearTimeout(W)},[e]),$0(()=>{if(!a)return;let W=window.setTimeout(()=>B.current?.focus(),120);return()=>window.clearTimeout(W)},[a]);let N=f>0,q=g.trigger,j=()=>{h(!1),u(0),m(ac())},S=(W,X)=>{m(J=>{let G={...J.condition};return X===""||X===void 0||X===null?delete G[W]:G[W]=X,{...J,condition:G}})},T=(W,X)=>{m(J=>{let G={...J.action};return X===""||X===void 0||X===null?delete G[W]:G[W]=X,{...J,action:G}})},D=W=>{m(X=>{let J={...X.condition};return W!=="status_changed"&&(delete J.from_status,delete J.to_status),W!=="overdue"&&delete J.overdue_days,W!=="field_changed"&&delete J.changed_field,W!=="commented"&&(delete J.comment_contains,delete J.comment_by_others),W==="field_changed"&&J.changed_field===void 0&&(J.changed_field=ga[0]?.value??""),{...X,trigger:W,condition:J}})},p=b.filter(W=>!W.archived),y=l.map(W=>({value:W.key,label:W.name})),x=cn.map(W=>({value:W.key,label:W.name})),w=p.map(W=>({value:String(Qo(W.key)),label:W.label})),{condition:_,action:C}=g,O=_.is_bug!==void 0||_.is_event!==void 0,z=[..._.group_seq===void 0&&w.length>0?[{key:"group_seq",label:"\uD504\uB85C\uC81D\uD2B8\uAC00 ~\uC778 \uACBD\uC6B0"}]:[],...O?[]:[{key:"kind",label:"\uC885\uB958\uAC00 \uC624\uB958/\uC77C\uC815\uC778 \uACBD\uC6B0"}],..._.priority===void 0?[{key:"priority",label:"\uC911\uC694\uB3C4\uAC00 ~\uC778 \uACBD\uC6B0"}]:[],..._.label_key===void 0&&y.length>0?[{key:"label_key",label:"\uB77C\uBCA8\uC774 \uBD99\uC5B4 \uC788\uB294 \uACBD\uC6B0"}]:[],..._.title_contains===void 0?[{key:"title_contains",label:"\uC81C\uBAA9\uC5D0 ~ \uB2E8\uC5B4\uAC00 \uD3EC\uD568\uB41C \uACBD\uC6B0"}]:[],..._.manager_empty===void 0?[{key:"manager_empty",label:"\uCC45\uC784\uC790\uAC00 \uC5C6\uB294/\uC788\uB294 \uACBD\uC6B0"}]:[],...s&&_.manager_account_seq===void 0?[{key:"manager_account",label:"\uCC45\uC784\uC790\uAC00 ~\uC778 \uACBD\uC6B0"}]:[],...s&&_.receiver_account_seq===void 0?[{key:"receiver_account",label:"\uCC38\uC870\uC790\uC5D0 ~\uAC00 \uD3EC\uD568\uB41C \uACBD\uC6B0"}]:[],...q==="status_changed"&&_.from_status===void 0?[{key:"from_status",label:"\uC774 \uC0C1\uD0DC\uC5D0\uC11C \uBC14\uB010 \uACBD\uC6B0"}]:[],...q==="status_changed"&&_.to_status===void 0?[{key:"to_status",label:"\uC774 \uC0C1\uD0DC\uB85C \uBC14\uB010 \uACBD\uC6B0"}]:[],...q==="field_changed"&&_.changed_field===void 0?[{key:"changed_field",label:"~ \uD544\uB4DC\uAC00 \uBCC0\uACBD\uB41C \uACBD\uC6B0"}]:[],...q==="commented"&&_.comment_contains===void 0?[{key:"comment_contains",label:"\uB313\uAE00\uC5D0 ~ \uB2E8\uC5B4\uAC00 \uD3EC\uD568\uB41C \uACBD\uC6B0"}]:[],...q==="commented"&&_.comment_by_others===void 0?[{key:"comment_by_others",label:"\uCC45\uC784\uC790\uAC00 \uC544\uB2CC \uC0AC\uB78C\uC774 \uC4F4 \uACBD\uC6B0"}]:[],...q==="overdue"&&_.overdue_days===void 0?[{key:"overdue_days",label:"\uB9C8\uAC10 \uD6C4 \uBA70\uCE60 \uC9C0\uB09C \uACBD\uC6B0"}]:[]],$=async W=>{if(!s)return;let X=W==="manager_account"?_.manager_account_seq??0:_.receiver_account_seq??0,J=await s(X,W==="manager_account"?"\uCC45\uC784\uC790":"\uCC38\uC870\uC790");J&&m(G=>{let te={...G.condition};return W==="manager_account"?(te.manager_account_seq=J.accountSeq,te.manager_name=J.name):(te.receiver_account_seq=J.accountSeq,te.receiver_name=J.name),{...G,condition:te}})},V=W=>{L(null),W==="group_seq"?S("group_seq",Number(w[0]?.value)||0):W==="kind"?S("is_bug",!0):W==="priority"?S("priority","high"):W==="label_key"?S("label_key",y[0]?.value??""):W==="title_contains"?m(X=>({...X,condition:{...X.condition,title_contains:""}})):W==="manager_empty"?S("manager_empty",!0):W==="manager_account"||W==="receiver_account"?$(W):W==="from_status"?S("from_status",cn[0]?.key??""):W==="to_status"?S("to_status",cn[0]?.key??""):W==="changed_field"?S("changed_field",ga[0]?.value??""):W==="comment_contains"?m(X=>({...X,condition:{...X.condition,comment_contains:""}})):W==="comment_by_others"?S("comment_by_others",!0):W==="overdue_days"&&S("overdue_days",1)},M=W=>{if(W==="kind"){S("is_bug",""),S("is_event","");return}if(W==="manager_account"){S("manager_account_seq",""),S("manager_name","");return}if(W==="receiver_account"){S("receiver_account_seq",""),S("receiver_name","");return}S(W==="group_seq"?"group_seq":W,"")},H=[...C.set_status===void 0?[{key:"set_status",label:"\uC0C1\uD0DC \uBC14\uAFB8\uAE30"}]:[],...C.set_priority===void 0?[{key:"set_priority",label:"\uC911\uC694\uB3C4 \uBC14\uAFB8\uAE30"}]:[],...C.add_label_key===void 0&&y.length>0?[{key:"add_label_key",label:"\uB77C\uBCA8 \uBD99\uC774\uAE30"}]:[],...s&&C.assign_manager_account_seq===void 0?[{key:"assign_manager",label:"\uCC45\uC784\uC790 \uC9C0\uC815\uD558\uAE30"}]:[],...s&&C.add_receiver_account_seq===void 0?[{key:"add_receiver",label:"\uCC38\uC870\uC790 \uCD94\uAC00\uD558\uAE30"}]:[],...o.length>0&&C.apply_content_template_seq===void 0?[{key:"apply_content_template",label:"\uBCF8\uBB38 \uC591\uC2DD \uCC44\uC6B0\uAE30"}]:[],...s&&C.notify_account_seq===void 0?[{key:"notify",label:"\uC54C\uB9BC \uBCF4\uB0B4\uAE30"}]:[]],I=async W=>{if(!s)return;let X=W==="assign_manager"?C.assign_manager_account_seq??0:W==="add_receiver"?C.add_receiver_account_seq??0:C.notify_account_seq??0,J=await s(X,W==="assign_manager"?"\uCC45\uC784\uC790":W==="add_receiver"?"\uCC38\uC870\uC790":"\uC54C\uB9BC \uBC1B\uC744 \uC0AC\uB78C");J&&m(G=>{let te={...G.action};return W==="assign_manager"?(te.assign_manager_account_seq=J.accountSeq,te.assign_manager_name=J.name):W==="add_receiver"?(te.add_receiver_account_seq=J.accountSeq,te.add_receiver_name=J.name):(te.notify_account_seq=J.accountSeq,te.notify_name=J.name),{...G,action:te}})},E=W=>{if(P(null),W==="set_status")T("set_status",cn[0]?.key??"");else if(W==="set_priority")T("set_priority","high");else if(W==="add_label_key")T("add_label_key",y[0]?.value??"");else if(W==="apply_content_template"){let X=o[0];m(J=>({...J,action:{...J.action,apply_content_template_seq:X?.seq??0,apply_content_template_name:X?.name??""}}))}else I(W)},F=W=>{W==="assign_manager"?(T("assign_manager_account_seq",""),T("assign_manager_name","")):W==="add_receiver"?(T("add_receiver_account_seq",""),T("add_receiver_name","")):W==="apply_content_template"?(T("apply_content_template_seq",""),T("apply_content_template_name","")):W==="notify"?(T("notify_account_seq",""),T("notify_name",""),T("notify_message","")):T(W,"")},U=async()=>{if(!g.name.trim()){K0({message:"\uADDC\uCE59 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694."});return}if(Object.keys(g.action).length===0){K0({message:"\uB3D9\uC791\uC744 \uD558\uB098 \uC774\uC0C1 \uCD94\uAC00\uD558\uC138\uC694."});return}let W=N?g.sort_no:d.reduce((J,G)=>Math.max(J,G.sort_no),0)+1;k(!0);let X=N?await n(f,{...g,sort_no:W}):await t({...g,sort_no:W});k(!1),X&&j()},Y=(W,X,J,G)=>Cn(or,{sx:dT,children:[Xe(or,{sx:hT,children:W}),Cn(or,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:G?"column":"row",alignItems:G?"stretch":"center",gap:G?.5:1},children:[X,G?Xe(or,{sx:{fontSize:13.5,color:"#37352f"},children:G}):null]}),Xe(U0,{title:"\uC774 \uC904 \uBE7C\uAE30",arrow:!0,disableInteractive:!0,children:Xe(Of,{size:"small","aria-label":`${W} \uC904 \uBE7C\uAE30`,onClick:J,children:Xe(cT,{sx:{fontSize:16}})})})]}),K=()=>Cn(or,{sx:{display:"flex",flexDirection:"column",gap:2.5},children:[Xe(ma,{size:"medium",label:"\uADDC\uCE59 \uC774\uB984",inputRef:B,placeholder:"\uC608: \uC811\uC218 \uC624\uB958 \uC790\uB3D9 \uBC30\uC815",value:g.name,onChange:W=>m(X=>({...X,name:W.target.value}))}),Xe(or,{sx:{display:"flex",alignItems:"center",gap:2,flexWrap:"wrap"},children:Df.map(W=>{let X=q===W.value;return Xe(Fn,{disableElevation:!0,variant:X?"contained":"outlined",color:X?"primary":"inherit",onClick:()=>D(W.value),sx:{borderRadius:99,px:1.75,...X?{}:{color:"#57564f",borderColor:"#d9d9d6"}},children:W.label},W.value)})}),Xe(or,{sx:{fontSize:13,color:"#787774",mt:-.5},children:Df.find(W=>W.value===q)?.hint}),Cn(or,{sx:{display:"flex",alignItems:"center",gap:1,mt:.5},children:[Xe(or,{sx:G0,children:"\uC5B4\uB5A4 \uC5C5\uBB34\uC77C \uB54C"}),z.length>0?Xe(Fn,{size:"small",startIcon:Xe(Af,{sx:{fontSize:16}}),onClick:W=>L(W.currentTarget),sx:{color:"#2563eb",minWidth:0},children:"\uC870\uAC74 \uCD94\uAC00"}):null]}),_.group_seq!==void 0?Y("\uD504\uB85C\uC81D\uD2B8",Xe(mn,{size:"medium",fullWidth:!0,label:"",value:String(_.group_seq),options:w,onChange:W=>S("group_seq",Number(W.target.value)||"")}),()=>M("group_seq")):null,O?Y("\uC885\uB958",Xe(mn,{size:"medium",fullWidth:!0,label:"",value:_.is_bug?"bug":"event",options:[{value:"bug",label:"\uC624\uB958\uB9CC"},{value:"event",label:"\uC77C\uC815\uB9CC"}],onChange:W=>{let X=W.target.value==="bug";S("is_bug",X?!0:""),S("is_event",X?"":!0)}}),()=>M("kind")):null,_.priority!==void 0?Y("\uC911\uC694\uB3C4",Xe(mn,{size:"medium",fullWidth:!0,label:"",value:_.priority,options:cc,onChange:W=>S("priority",W.target.value)}),()=>M("priority")):null,_.label_key!==void 0?Y("\uB77C\uBCA8",Xe(mn,{size:"medium",fullWidth:!0,label:"",value:_.label_key,options:y,onChange:W=>S("label_key",W.target.value)}),()=>M("label_key")):null,_.title_contains!==void 0?Y("\uC81C\uBAA9",Xe(ma,{size:"medium",fullWidth:!0,placeholder:"\uD3EC\uD568\uD560 \uB0B1\uB9D0 (\uC608: \uAE34\uAE09)",value:_.title_contains,onChange:W=>m(X=>({...X,condition:{...X.condition,title_contains:W.target.value}}))}),()=>M("title_contains")):null,_.manager_empty!==void 0?Y("\uCC45\uC784\uC790",Xe(mn,{size:"medium",fullWidth:!0,label:"",value:_.manager_empty?"empty":"assigned",options:[{value:"empty",label:"\uC5C6\uC74C"},{value:"assigned",label:"\uC788\uC74C"}],onChange:W=>S("manager_empty",W.target.value==="empty")}),()=>M("manager_empty")):null,_.manager_account_seq!==void 0?Y("\uCC45\uC784\uC790",Xe(Fn,{size:"medium",variant:"outlined",color:"inherit",onClick:()=>{$("manager_account")},children:_.manager_name||`\uACC4\uC815 #${_.manager_account_seq}`}),()=>M("manager_account")):null,_.receiver_account_seq!==void 0?Y("\uCC38\uC870\uC790",Xe(Fn,{size:"medium",variant:"outlined",color:"inherit",onClick:()=>{$("receiver_account")},children:_.receiver_name||`\uACC4\uC815 #${_.receiver_account_seq}`}),()=>M("receiver_account")):null,_.from_status!==void 0?Y("\uC774 \uC0C1\uD0DC\uC5D0\uC11C",Xe(mn,{size:"medium",fullWidth:!0,label:"",value:_.from_status,options:x,onChange:W=>S("from_status",W.target.value)}),()=>M("from_status")):null,_.to_status!==void 0?Y("\uC774 \uC0C1\uD0DC\uB85C",Xe(mn,{size:"medium",fullWidth:!0,label:"",value:_.to_status,options:x,onChange:W=>S("to_status",W.target.value)}),()=>M("to_status")):null,_.changed_field!==void 0?Y("\uBCC0\uACBD \uD544\uB4DC",Xe(mn,{size:"medium",fullWidth:!0,label:"",value:_.changed_field,options:ga,onChange:W=>S("changed_field",W.target.value)}),()=>M("changed_field")):null,_.comment_contains!==void 0?Y("\uB313\uAE00 \uB0B1\uB9D0",Xe(ma,{size:"medium",fullWidth:!0,placeholder:"\uD3EC\uD568\uD560 \uB0B1\uB9D0 (\uC608: \uD68C\uC2E0)",value:_.comment_contains,onChange:W=>m(X=>({...X,condition:{...X.condition,comment_contains:W.target.value}}))}),()=>M("comment_contains")):null,_.comment_by_others!==void 0?Y("\uB313\uAE00 \uC791\uC131\uC790",Xe(mn,{size:"medium",fullWidth:!0,label:"",value:_.comment_by_others?"others":"any",options:[{value:"others",label:"\uCC45\uC784\uC790\uAC00 \uC544\uB2CC \uC0AC\uB78C"},{value:"any",label:"\uB204\uAD6C\uB4E0"}],onChange:W=>S("comment_by_others",W.target.value==="others")}),()=>M("comment_by_others")):null,_.overdue_days!==void 0?Y("\uACBD\uACFC\uC77C",Xe(ma,{size:"medium",fullWidth:!0,type:"number",value:String(_.overdue_days),onChange:W=>S("overdue_days",Math.max(0,Number(W.target.value)||0)),helperText:"\uB9C8\uAC10 \uD6C4 \uBA70\uCE60 \uC9C0\uB0AC\uC744 \uB54C\uBD80\uD130 \uC2E4\uD589\uD560\uC9C0"}),()=>M("overdue_days")):null,Object.keys(_).length===0?Xe(or,{sx:{fontSize:13.5,color:"#9a9a97"},children:"\uC870\uAC74\uC774 \uC5C6\uC73C\uBA74 \uBAA8\uB4E0 \uC5C5\uBB34\uC5D0 \uC2E4\uD589\uB429\uB2C8\uB2E4."}):null,Cn(or,{sx:{display:"flex",alignItems:"center",gap:1,mt:.5},children:[Xe(or,{sx:G0,children:"\uBB34\uC5C7\uC744 \uD560\uAE4C\uC694"}),H.length>0?Xe(Fn,{size:"small",startIcon:Xe(Af,{sx:{fontSize:16}}),onClick:W=>P(W.currentTarget),sx:{color:"#2563eb",minWidth:0},children:"\uB3D9\uC791 \uCD94\uAC00"}):null]}),C.set_status!==void 0?Y("\uC0C1\uD0DC",Xe(mn,{size:"medium",fullWidth:!0,label:"",value:C.set_status,options:x,onChange:W=>T("set_status",W.target.value)}),()=>F("set_status")):null,C.set_priority!==void 0?Y("\uC911\uC694\uB3C4",Xe(mn,{size:"medium",fullWidth:!0,label:"",value:C.set_priority,options:cc,onChange:W=>T("set_priority",W.target.value)}),()=>F("set_priority")):null,C.apply_content_template_seq!==void 0?Y("\uBCF8\uBB38 \uC591\uC2DD",Xe(mn,{size:"medium",fullWidth:!0,label:"",value:String(C.apply_content_template_seq),options:o.map(W=>({value:String(W.seq),label:W.name})),onChange:W=>{let X=o.find(J=>String(J.seq)===String(W.target.value));m(J=>({...J,action:{...J.action,apply_content_template_seq:X?.seq??0,apply_content_template_name:X?.name??""}}))}}),()=>F("apply_content_template"),"\uBCF8\uBB38\uC774 \uBE44\uC5B4 \uC788\uC744 \uB54C\uB9CC \uCC44\uC6C1\uB2C8\uB2E4(\uC4F4 \uB0B4\uC6A9\uC744 \uB36E\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4)"):null,C.add_label_key!==void 0?Y("\uB77C\uBCA8",Xe(mn,{size:"medium",fullWidth:!0,label:"",value:C.add_label_key,options:y,onChange:W=>T("add_label_key",W.target.value)}),()=>F("add_label_key")):null,C.assign_manager_account_seq!==void 0?Y("\uCC45\uC784\uC790",Xe(Fn,{size:"medium",variant:"outlined",color:"inherit",onClick:()=>{I("assign_manager")},children:C.assign_manager_name||`\uACC4\uC815 #${C.assign_manager_account_seq}`}),()=>F("assign_manager")):null,C.add_receiver_account_seq!==void 0?Y("\uCC38\uC870\uC790",Xe(Fn,{size:"medium",variant:"outlined",color:"inherit",onClick:()=>{I("add_receiver")},children:C.add_receiver_name||`\uACC4\uC815 #${C.add_receiver_account_seq}`}),()=>F("add_receiver")):null,C.notify_account_seq!==void 0?Y("\uC54C\uB9BC",Cn(Y0,{children:[Xe(Fn,{size:"medium",variant:"outlined",color:"inherit",onClick:()=>{I("notify")},sx:{flexShrink:0},children:C.notify_name||`\uACC4\uC815 #${C.notify_account_seq}`}),Xe(ma,{size:"medium",fullWidth:!0,placeholder:"\uC54C\uB9BC \uBB38\uAD6C(\uBE44\uC6B0\uBA74 \uAE30\uBCF8 \uBB38\uAD6C)",value:C.notify_message??"",onChange:W=>T("notify_message",W.target.value)})]}),()=>F("notify")):null,Object.keys(C).length===0?Xe(or,{sx:{fontSize:13.5,color:"#9a9a97"},children:'"+ \uB3D9\uC791 \uCD94\uAC00" \uB85C \uD560 \uC77C\uC744 \uD558\uB098 \uC774\uC0C1 \uACE8\uB77C \uC8FC\uC138\uC694.'}):null,Xe(H0,{transitionDuration:0,anchorEl:R,open:!!R,onClose:()=>L(null),children:z.map(W=>Xe(W0,{dense:!0,onClick:()=>V(W.key),sx:{fontSize:14},children:W.label},W.key))}),Xe(H0,{transitionDuration:0,anchorEl:A,open:!!A,onClose:()=>P(null),children:H.map(W=>Xe(W0,{dense:!0,onClick:()=>E(W.key),sx:{fontSize:14},children:W.label},W.key))})]});return Cn(Y0,{children:[Xe(V0,{open:e,onClose:r,maxWidth:"sm",title:"\uC790\uB3D9\uD654 \uADDC\uCE59",locale:"ko",titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-rule-manage",tabs:{visible:!1},contentPaddingX:0,contentTopPadding:0,contentBottomPadding:0,sectionContentPaddingTop:0,sections:[{id:"rules",title:"",showTitle:!1,children:Cn(or,{sx:{display:"flex",flexDirection:"column",px:2.5,py:2},children:[d.length===0?Cn(or,{sx:{py:4,display:"flex",flexDirection:"column",alignItems:"center",gap:2,color:"#9a9a97"},children:[Xe(lT,{sx:{fontSize:48,color:"#d9d9d6"}}),Xe(or,{sx:{fontSize:15},children:"\uB4F1\uB85D\uB41C \uADDC\uCE59\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."})]}):null,d.map(W=>Cn(or,{sx:{display:"flex",alignItems:"center",gap:2,py:1,"&:not(:last-of-type)":{borderBottom:"1px solid #ececea"},opacity:W.enabled?1:.5},children:[Xe(U0,{title:W.enabled?"\uC0AC\uC6A9 \uC911":"\uAEBC\uC9D0",arrow:!0,disableInteractive:!0,children:Xe(sT,{size:"small",inputProps:{"aria-label":`${W.name} \uADDC\uCE59 \uC0AC\uC6A9`},checked:W.enabled,onChange:(X,J)=>c(W.seq,J)})}),Cn(or,{sx:{flex:1,minWidth:0},children:[Xe(or,{sx:{fontSize:16,fontWeight:600,color:"#37352f"},children:W.name}),(()=>{let X=fT(W,b,l);return Cn(or,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:.5,fontSize:15,color:"#6f6f6c"},children:[Xe(or,{component:"span",children:X.left}),Xe(aT,{sx:{fontSize:18,color:"#9a9a97",flexShrink:0}}),Xe(or,{component:"span",children:X.right})]})})()]}),Xe(Of,{size:"small","aria-label":`${W.name} \uADDC\uCE59 \uC218\uC815`,onClick:()=>{u(W.seq),m({name:W.name,trigger:W.trigger,enabled:W.enabled,sort_no:W.sort_no,condition:{...W.condition,...W.trigger==="field_changed"&&W.condition.changed_field===void 0?{changed_field:ga[0]?.value??""}:{}},action:{...W.action}}),h(!0)},children:Xe(uT,{sx:{fontSize:18}})}),Xe(Of,{size:"small","aria-label":`${W.name} \uADDC\uCE59 \uC0AD\uC81C`,onClick:()=>i(W.seq),children:Xe(dr,{sx:{fontSize:18}})})]},W.seq))]})}],actions:{showCancelButton:!1,left:Xe(Fn,{startIcon:Xe(Af,{}),onClick:()=>{u(0),m(ac()),h(!0)},sx:{color:"#2563eb"},children:"\uC0C8 \uADDC\uCE59"}),right:Xe(Fn,{variant:"contained",onClick:r,children:"\uB2EB\uAE30"})}}),Xe(V0,{open:a,onClose:j,maxWidth:"sm",title:N?"\uADDC\uCE59 \uC218\uC815":"\uC0C8 \uADDC\uCE59",locale:"ko",backdropClick:!1,titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-rule-form",tabs:{visible:!1},sectionContentPaddingTop:0,sections:[{id:"rule-form",title:"",showTitle:!1,children:K()}],actions:{showCancelButton:!0,right:Xe(Fn,{variant:"contained",onClick:()=>{U()},disabled:v,children:N?"\uC218\uC815":"\uADDC\uCE59 \uCD94\uAC00"})}})]})}import{useEffect as X0,useRef as Pf,useState as hs}from"react";import{Box as Jt,Button as ps,IconButton as ba,Tooltip as ya}from"@mui/material";import Z0 from"@mui/icons-material/Add";import pT from"@mui/icons-material/EditOutlined";import mT from"@mui/icons-material/ContentCopyOutlined";import gT from"@mui/icons-material/DragIndicator";import bT from"@mui/icons-material/Close";import yT from"@mui/icons-material/PlaylistAddCheckOutlined";import{DndContext as xT,PointerSensor as vT,closestCenter as wT,useSensor as _T,useSensors as kT}from"@dnd-kit/core";import{restrictToParentElement as ST,restrictToVerticalAxis as TT}from"@dnd-kit/modifiers";import{SortableContext as CT,arrayMove as J0,useSortable as BT,verticalListSortingStrategy as IT}from"@dnd-kit/sortable";import{CSS as ET}from"@dnd-kit/utilities";import{FormDialog as Q0}from"@ehfuse/mui-form-dialog";import{ClearTextField as Nf,LabelSelect as eg,NumberField as tg}from"@ehfuse/mui-form-controls";import MT from"@ehfuse/overlay-scrollbar";import{ConfirmDialog as RT,ErrorAlert as rg}from"@ehfuse/alerts";import{Fragment as NT,jsx as st,jsxs as Bn}from"react/jsx-runtime";var OT=[{value:"high",label:"\uB192\uC74C"},{value:"medium",label:"\uC911\uAC04"},{value:"low",label:"\uB0AE\uC74C"}],ng="\uC5C5\uBB34 \uC81C\uBAA9",Lf=2,uc={flex:1,minWidth:0},og=56,ig=20,AT=`${ig+Lf*8}px`;function fc(){return{name:"",description:"",group_seq:0,items:[]}}function DT(){return{title:"",start_offset_days:0,due_offset_days:0,priority:"medium"}}function PT({id:e,children:d}){let{attributes:b,listeners:l,setNodeRef:o,transform:s,transition:r,isDragging:t}=BT({id:e});return st(Jt,{ref:o,sx:{transform:ET.Transform.toString(s),transition:r,...t?{opacity:.6,position:"relative",zIndex:1}:{}},children:d({handleProps:{...b,...l},dragging:t})})}function wG({open:e,templates:d,customTabs:b,onPickAccount:l,onClose:o,onCreate:s,onUpdate:r,onRemove:t,onRun:n}){let[c,i]=hs(!1),[a,h]=hs(0),[f,u]=hs(fc()),[g,m]=hs(!1),[v,k]=hs([]),B=Pf(0),[R,L]=hs(0),A=Pf(null),P=Pf(null);X0(()=>{if(e)return;let z=window.setTimeout(()=>{i(!1),h(0),u(fc()),k([])},500);return()=>window.clearTimeout(z)},[e]);let N=()=>(B.current+=1,`template-item-${B.current}`),q=(z,$)=>{h(z),u($),k($.items.map(()=>N())),i(!0)},j=f.items.map((z,$)=>v[$]??`template-item-fallback-${$}`),S=()=>{let z=P.current?.getScrollContainer()??null;if(z){z.scrollTop=z.scrollHeight;return}let $=A.current?.querySelectorAll("*")??[];for(let V of Array.from($))if(V.scrollHeight>V.clientHeight+1){V.scrollTop=V.scrollHeight;return}},T=()=>{let z=A.current;if(!z)return null;let $=z.querySelectorAll("input[data-template-title]"),V=$.length?$:z.querySelectorAll(`input[placeholder="${ng}"]`);return V.length?V[V.length-1]:null};X0(()=>{if(R===0)return;let z=0,$=0,V=()=>{S();let H=T();H&&document.activeElement!==H&&H.focus(),z+=1,!(H&&document.activeElement===H)&&z<8&&($=window.setTimeout(V,50))},M=window.requestAnimationFrame(V);return()=>{window.cancelAnimationFrame(M),window.clearTimeout($)}},[R]);let D=b.filter(z=>!z.archived).map(z=>({value:String(Qo(z.key)),label:z.label})),p=(z,$)=>{u(V=>({...V,items:V.items.map((M,H)=>H===z?{...M,...$}:M)}))},y=kT(_T(vT,{activationConstraint:{distance:5}})),x=z=>{let $=String(z.active?.id??""),V=String(z.over?.id??"");if(!$||!V||$===V)return;let M=j.indexOf($),H=j.indexOf(V);M<0||H<0||(u(I=>({...I,items:J0(I.items,M,H)})),k(I=>J0(I,M,H)))},w=async z=>{if(!l)return;let $=await l(f.items[z]?.manager_account_seq??0,"\uCC45\uC784\uC790");$&&p(z,{manager_account_seq:$.accountSeq,manager_name:$.name})},_=async()=>{let z=f.name.trim();if(!z){rg({message:"\uD15C\uD50C\uB9BF \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694."});return}let $=f.items.filter(H=>H.title.trim().length>0);if($.length===0){rg({message:"\uC5C5\uBB34 \uD56D\uBAA9\uC744 \uD55C \uC904 \uC774\uC0C1 \uB123\uC73C\uC138\uC694."});return}m(!0);let V={...f,name:z,items:$},M=a>0?await r(a,V):await s(V);m(!1),M&&(i(!1),h(0),u(fc()))},C=st(Jt,{children:d.length===0?Bn(Jt,{sx:{py:4,display:"flex",flexDirection:"column",alignItems:"center",gap:2,color:"#9a9a97"},children:[st(yT,{sx:{fontSize:48,color:"#d9d9d6"}}),st(Jt,{sx:{fontSize:13.5},children:"\uB4F1\uB85D\uB41C \uD15C\uD50C\uB9BF\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."})]}):d.map(z=>Bn(Jt,{sx:{display:"flex",alignItems:"center",gap:2.5,py:1.75,"&:not(:last-of-type)::after":{content:'""',display:"block",my:1.75,borderBottom:"1px solid #f0efed"}},children:[Bn(Jt,{sx:{flex:1,minWidth:0},children:[st(Jt,{sx:{fontSize:18,fontWeight:600,color:"#37352f"},children:z.name}),Bn(Jt,{sx:{fontSize:14,color:"#787774",mt:.25},children:["\uC5C5\uBB34 ",z.items.length,"\uAC74",z.description?` \xB7 ${z.description}`:""]})]}),n?st(ps,{size:"medium",variant:"outlined",onClick:()=>n(z),sx:{flexShrink:0},children:"\uC2E4\uD589"}):null,st(ya,{title:"\uC218\uC815",arrow:!0,disableInteractive:!0,children:st(ba,{size:"medium","aria-label":`${z.name} \uD15C\uD50C\uB9BF \uC218\uC815`,onClick:()=>q(z.seq,{name:z.name,description:z.description??"",group_seq:z.group_seq??0,items:z.items.map($=>({...$}))}),children:st(pT,{sx:{fontSize:19}})})}),st(ya,{title:"\uBCF5\uC81C",arrow:!0,disableInteractive:!0,children:st(ba,{size:"medium","aria-label":`${z.name} \uD15C\uD50C\uB9BF \uBCF5\uC81C`,onClick:()=>q(0,{name:`${z.name} \uC0AC\uBCF8`,description:z.description??"",group_seq:z.group_seq??0,items:z.items.map($=>({...$}))}),children:st(mT,{sx:{fontSize:18}})})}),st(ya,{title:"\uC0AD\uC81C",arrow:!0,disableInteractive:!0,children:st(ba,{size:"medium","aria-label":`${z.name} \uD15C\uD50C\uB9BF \uC0AD\uC81C`,onClick:()=>{(async()=>await RT({title:"\uD15C\uD50C\uB9BF \uC0AD\uC81C",message:`"${z.name}" \uD15C\uD50C\uB9BF\uC744 \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&t(z.seq))()},children:st(dr,{sx:{fontSize:18}})})})]},z.seq))}),O=Bn(Jt,{sx:{display:"flex",flexDirection:"column",gap:3},children:[st(Nf,{size:"medium",label:"\uD15C\uD50C\uB9BF \uC774\uB984",placeholder:"\uC608: \uC2E0\uADDC \uC785\uC0AC\uC790 \uC628\uBCF4\uB529",fullWidth:!0,value:f.name,onChange:z=>u($=>({...$,name:z.target.value}))}),Bn(Jt,{sx:{display:"grid",gridTemplateColumns:D.length>0?"1fr 1fr":"1fr",gap:2},children:[st(Nf,{size:"medium",label:"\uC124\uBA85",placeholder:"\uBAA9\uB85D\uC5D0\uC11C \uBB34\uC5C7\uC778\uC9C0 \uC54C\uC544\uBCFC \uD55C \uC904(\uC120\uD0DD)",fullWidth:!0,value:f.description??"",onChange:z=>u($=>({...$,description:z.target.value}))}),D.length>0?st(eg,{size:"medium",fullWidth:!0,label:"\uB9CC\uB4E4 \uACF3(\uD504\uB85C\uC81D\uD2B8)",value:String(f.group_seq??0),options:[{value:"0",label:"\uAE30\uBCF8 \uC5C5\uBB34\uD568"},...D],onChange:z=>u($=>({...$,group_seq:Number(z.target.value)||0}))}):null]}),Bn(Jt,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[st(Jt,{sx:{fontSize:18,fontWeight:600,color:"#37352f"},children:"\uC5C5\uBB34 \uD56D\uBAA9"}),st(Jt,{sx:{fontSize:14,color:"#37352f"},children:"\uB0A0\uC9DC\uB294 \uC2E4\uD589\uD560 \uB54C \uACE0\uB974\uB294 \uAE30\uC900\uC77C\uC5D0\uC11C \uACC4\uC0B0\uB429\uB2C8\uB2E4."})]}),f.items.length===0?st(Jt,{sx:{fontSize:14,color:"#9a9a97",py:2},children:'\uC544\uC9C1 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4. "\uD56D\uBAA9 \uCD94\uAC00" \uB85C \uC808\uCC28\uB97C \uC21C\uC11C\uB300\uB85C \uC801\uC73C\uC138\uC694.'}):st(Jt,{ref:A,sx:{border:"1px solid #e6e6e3",borderRadius:1,overflow:"hidden"},children:st(MT,{ref:P,style:{maxHeight:"min(560px, 52vh)"},thumb:{width:6},children:st(xT,{sensors:y,collisionDetection:wT,modifiers:[TT,ST],onDragEnd:x,children:st(CT,{items:j,strategy:IT,children:f.items.map((z,$)=>st(PT,{id:j[$],children:({handleProps:V})=>Bn(Jt,{sx:{borderBottom:$===f.items.length-1?"none":"1px solid #f2f2f0",px:Lf,py:2,gap:2,display:"flex",flexDirection:"column"},children:[Bn(Jt,{sx:{display:"flex",alignItems:"center",gap:Lf},children:[st(Jt,{...V,"aria-label":`${$+1}\uBC88 \uD56D\uBAA9 \uC21C\uC11C \uC774\uB3D9`,sx:{display:"inline-flex",alignItems:"center",flexShrink:0,color:"#c9c8c5",cursor:"grab","&:active":{cursor:"grabbing"},touchAction:"none",userSelect:"none"},children:st(gT,{sx:{fontSize:ig}})}),st(Nf,{size:"medium",fullWidth:!0,placeholder:ng,slotProps:{htmlInput:{"data-template-title":$}},value:z.title,onChange:M=>p($,{title:M.target.value})})]}),Bn(Jt,{sx:{display:"flex",alignItems:"center",gap:2,pl:AT},children:[st(Jt,{sx:uc,children:st(tg,{size:"medium",fullWidth:!0,label:"\uC2DC\uC791 D+",thousandSeparator:!1,align:"right",suffix:"\uC77C",value:z.start_offset_days??null,onValueChange:M=>p($,{start_offset_days:M===null?void 0:Math.trunc(Number(M))})})}),st(Jt,{sx:uc,children:st(tg,{size:"medium",fullWidth:!0,label:"\uB9C8\uAC10 D+",thousandSeparator:!1,align:"right",suffix:"\uC77C",value:z.due_offset_days??null,onValueChange:M=>p($,{due_offset_days:M===null?void 0:Math.trunc(Number(M))})})}),st(Jt,{sx:uc,children:st(eg,{size:"medium",fullWidth:!0,label:"\uC911\uC694\uB3C4",value:z.priority??"medium",options:OT,onChange:M=>p($,{priority:M.target.value})})}),l?Bn(Jt,{sx:{...uc,position:"relative"},children:[st(ps,{variant:"outlined",fullWidth:!0,onClick:()=>{w($)},sx:{height:og,display:"block",textAlign:"left",textTransform:"none",fontSize:16,fontWeight:400,lineHeight:`${og-2}px`,py:0,px:1.75,pr:z.manager_account_seq?4.5:1.75,borderColor:"#c4c4c4",color:z.manager_name?"#37352f":"#9a9a97",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap","&:hover":{borderColor:"#37352f",bgcolor:"transparent"}},children:z.manager_name||"\uCC45\uC784\uC790"}),z.manager_account_seq?st(ya,{title:"\uCC45\uC784\uC790 \uBE44\uC6B0\uAE30",arrow:!0,disableInteractive:!0,children:st(ba,{size:"small","aria-label":`${$+1}\uBC88 \uD56D\uBAA9 \uCC45\uC784\uC790 \uBE44\uC6B0\uAE30`,onClick:M=>{M.stopPropagation(),p($,{manager_account_seq:0,manager_name:""})},sx:{position:"absolute",right:6,top:"50%",transform:"translateY(-50%)"},children:st(bT,{sx:{fontSize:18}})})}):null]}):null,st(ya,{title:"\uD56D\uBAA9 \uC0AD\uC81C",arrow:!0,disableInteractive:!0,children:st(ba,{size:"medium","aria-label":`${$+1}\uBC88 \uD56D\uBAA9 \uC0AD\uC81C`,onClick:()=>{u(M=>({...M,items:M.items.filter((H,I)=>I!==$)})),k(M=>M.filter((H,I)=>I!==$))},children:st(dr,{sx:{fontSize:18}})})})]})]})},j[$]))})})})})]});return Bn(NT,{children:[st(Q0,{open:e,onClose:o,maxWidth:"md",title:"\uC5C5\uBB34 \uD15C\uD50C\uB9BF",locale:"ko",titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-task-template",tabs:{visible:!1},actions:{showCancelButton:!1,left:st(ps,{startIcon:st(Z0,{sx:{fontSize:18}}),onClick:()=>q(0,fc()),children:"\uC0C8 \uD15C\uD50C\uB9BF"}),right:st(ps,{variant:"contained",onClick:o,children:"\uB2EB\uAE30"})},sectionContentPaddingTop:0,sections:[{id:"templates",title:"",showTitle:!1,children:C}]}),st(Q0,{open:c,onClose:()=>i(!1),maxWidth:"md",title:a>0?"\uD15C\uD50C\uB9BF \uC218\uC815":"\uC0C8 \uD15C\uD50C\uB9BF",locale:"ko",backdropClick:!1,fontScale:{enabled:!0},fontScaleKey:"taskbox-task-template-form",titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},tabs:{visible:!1},actions:{showCancelButton:!0,left:st(ps,{startIcon:st(Z0,{sx:{fontSize:18}}),onClick:()=>{u(z=>({...z,items:[...z.items,DT()]})),k(z=>[...z,N()]),L(z=>z+1)},children:"\uD56D\uBAA9 \uCD94\uAC00"}),right:st(ps,{variant:"contained",disabled:g,onClick:()=>{_()},children:"\uC800\uC7A5"})},sectionContentPaddingTop:0,sections:[{id:"template-form",title:"",showTitle:!1,children:O}]})]})}import{useEffect as sg,useState as ag}from"react";import{Box as Lr,Button as LT}from"@mui/material";import{FormDialog as zT}from"@ehfuse/mui-form-dialog";import{DateTextField as jT}from"@ehfuse/mui-form-controls";import FT from"@ehfuse/overlay-scrollbar";import{jsx as Xr,jsxs as xa}from"react/jsx-runtime";function RG({open:e,template:d,todayStr:b,running:l=!1,onClose:o,onRun:s}){let[r,t]=ag(b),[n,c]=ag(d);sg(()=>{d&&c(d)},[d]),sg(()=>{e&&t(b)},[e]);let i=d??n,a=i?ep(i,r):[];return Xr(zT,{open:e,onClose:o,maxWidth:"md",title:i?`${i.name} \uC2E4\uD589`:"\uD15C\uD50C\uB9BF \uC2E4\uD589",locale:"ko",backdropClick:!1,titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-template-run",tabs:{visible:!1},sectionContentPaddingTop:0,actions:{showCancelButton:!0,right:Xr(LT,{variant:"contained",disabled:l||a.length===0,onClick:()=>s(a,r),children:l?"\uB9CC\uB4DC\uB294 \uC911\u2026":`\uC5C5\uBB34 ${a.length}\uAC74 \uB9CC\uB4E4\uAE30`})},sections:[{id:"template-run",title:"",showTitle:!1,children:xa(Lr,{sx:{display:"flex",flexDirection:"column",gap:2},children:[xa(Lr,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[Xr(Lr,{sx:{width:72,flexShrink:0,fontSize:16,color:"#37352f"},children:"\uAE30\uC900\uC77C"}),Xr(jT,{size:"medium",fullWidth:!0,value:r,onChange:h=>t(h.target.value)})]}),Xr(Lr,{sx:{fontSize:14.5,color:"#37352f"},children:"\uC544\uB798 \uC5C5\uBB34\uAC00 \uD55C\uAEBC\uBC88\uC5D0 \uB9CC\uB4E4\uC5B4\uC9D1\uB2C8\uB2E4. \uB0A0\uC9DC\uB294 \uAE30\uC900\uC77C\uC5D0\uC11C \uACC4\uC0B0\uB41C \uAC12\uC785\uB2C8\uB2E4."}),xa(Lr,{sx:{border:"1px solid #e6e6e3",borderRadius:1,overflow:"hidden"},children:[xa(Lr,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1,bgcolor:"#fafaf9",borderBottom:"1px solid #e6e6e3",fontSize:13.5,fontWeight:600,color:"#37352f"},children:[Xr(Lr,{sx:{flex:1,minWidth:0},children:"\uC5C5\uBB34"}),Xr(Lr,{sx:{width:88,flexShrink:0,textAlign:"center"},children:"\uC2DC\uC791"}),Xr(Lr,{sx:{width:88,flexShrink:0,textAlign:"center"},children:"\uB9C8\uAC10"}),Xr(Lr,{sx:{width:96,flexShrink:0,textAlign:"center"},children:"\uCC45\uC784\uC790"})]}),Xr(FT,{style:{maxHeight:520},thumb:{width:6},children:a.length===0?Xr(Lr,{sx:{p:2,fontSize:14,color:"#9a9a97"},children:"\uB9CC\uB4E4 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):a.map((h,f)=>xa(Lr,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1.25,borderBottom:f===a.length-1?"none":"1px solid #f2f2f0",fontSize:16,fontWeight:500,color:"#111111"},children:[Xr(Lr,{sx:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:h.title}),Xr(Lr,{sx:{width:88,flexShrink:0,textAlign:"center",fontSize:13.5,color:h.start_date?"#37352f":"#9a9a97"},children:Lc(h.start_date)||"-"}),Xr(Lr,{sx:{width:88,flexShrink:0,textAlign:"center",fontSize:13.5,color:h.due_date?"#37352f":"#9a9a97"},children:Lc(h.due_date)||"-"}),Xr(Lr,{sx:{width:96,flexShrink:0,textAlign:"center",fontSize:13.5,color:h.manager_name?"#37352f":"#9a9a97",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:h.manager_name||"-"})]},f))})]})]})}]})}var qT={urgent:"\uAE34\uAE09",high:"\uB192\uC74C",normal:"\uC911\uAC04",low:"\uB0AE\uC74C"};function $T(e){return e.length===0?"":e.length<=2?e.join(", "):`${e[0]} \uC678 ${e.length-1}\uBA85`}function zf(e){let d=String(e??"").trim().slice(0,10);return/^\d{4}-\d{2}-\d{2}$/.test(d)?`${d.slice(2,4)}.${d.slice(5,7)}.${d.slice(8,10)}`:"-"}function ms(e){let d=b=>String(b).padStart(2,"0");return`${e.getFullYear()}-${d(e.getMonth()+1)}-${d(e.getDate())} ${d(e.getHours())}:${d(e.getMinutes())}`}function jf(e,d){let l=String(e.due_date??"").slice(11,16).trim()||String(e.estimated_time??"").trim(),o=zf(e.due_date),s=String(e.start_date??"").slice(11,16).trim(),r=zf(e.start_date),t=(e.receiver_names??[]).filter(Boolean).map(c=>String(c).trim()),n=(e.checklist??[]).length?`${(e.checklist??[]).filter(c=>c.checked).length}/${(e.checklist??[]).length}`:"";return{seq:Number(e.seq??0),title:String(e.title??"").trim(),statusName:ur(e).name,projectLabel:e.tab_key?d.get(String(e.tab_key))??"":"",managerName:String(e.manager_name??"").trim(),receiverNames:$T(t),receiverNamesFull:t.join(", "),startDate:r!=="-"&&s?`${r} ${s}`:r,dueDate:o!=="-"&&l?`${o} ${l}`:o,priorityName:qT[String(e.priority??"")]??"",checklist:n,note:String(e.note??"").trim(),completed:!!e.completed}}function Pt(e){return String(e??"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function HT(e,d){if(e===" ")return d*.3;let b=e.codePointAt(0)??0,l=b>=4352&&b<=4607||b>=12288&&b<=40959||b>=44032&&b<=55203||b>=63744&&b<=64255||b>=65280&&b<=65519;return d*(l?1:.55)}function dc(e,d){let b=0;for(let l of String(e??""))b+=HT(l,d);return b}function gs(e,d){let b=String(e??"").trim();if(!b)return["-"];let l=[],o="";for(let s of b){if(s===`
44
+ `){o&&l.push(o),o="";continue}let r=`${o}${s}`;if(r.length>d&&o){l.push(o),o=s;continue}o=r}return o&&l.push(o),l.length>0?l:["-"]}function Ci(e,d,b){let l=String(e??"").replace(/\s+/g," ").trim();if(!l)return"";if(dc(l,b)<=d)return l;let o=dc("\u2026",b),s="",r=0;for(let t of l){let n=dc(t,b);if(r+n+o>d)break;s+=t,r+=n}return`${s}\u2026`}var wa=595.28,_a=841.89,ka=841.89,Sa=595.28,zr=28,In=96,gn=44,WT="'Malgun Gothic','\uB9D1\uC740 \uACE0\uB515','Apple SD Gothic Neo','Noto Sans KR',sans-serif",UT="'Batang','\uBC14\uD0D5','AppleMyungjo','Noto Serif KR',serif",va="#cbd5e1",VT=[`text { font-family: ${WT}; fill: #000000; }`,`.doc-title { font-family: ${UT}; font-size: 20px; font-weight: 700; }`,".doc-sub { font-size: 10.5px; fill: #333333; }",".doc-meta { font-size: 9.5px; fill: #333333; }",".th { font-size: 9.5px; font-weight: 700; fill: #000000; }",".td { font-size: 9px; }",".td.done { fill: #555555; }",".gt { font-size: 10px; font-weight: 700; fill: #000000; }",".label { font-size: 9px; fill: #333333; }",".value { font-size: 10px; }",".section { font-size: 11.5px; font-weight: 700; fill: #000000; }",".pageno { font-size: 9px; fill: #333333; }",`.head { fill: #eef2f7; stroke: ${va}; stroke-width: 0.5; }`,`.group { fill: #f8fafc; stroke: ${va}; stroke-width: 0.5; }`,`.frame { fill: none; stroke: ${va}; stroke-width: 0.5; }`,`.hline { stroke: ${va}; stroke-width: 0.5; }`,`.vline { stroke: ${va}; stroke-width: 0.5; }`,".bar { fill: #bfdbfe; stroke: #60a5fa; stroke-width: 0.6; }",".bar.done { fill: #e5e7eb; stroke: #cbd5e1; }",".bar.overdue { fill: #fecaca; stroke: #f87171; }"].join("");function No(e,d,b){let l=b-zr;return[`<text x="${zr}" y="46" class="doc-title">${Pt(e.documentTitle)}</text>`,`<text x="${zr}" y="66" class="doc-sub">${Pt(e.subtitle)}</text>`,`<text x="${l}" y="42" class="doc-meta" text-anchor="end">${Pt(e.facilityName)}</text>`,`<text x="${l}" y="58" class="doc-meta" text-anchor="end">\uCD9C\uB825 ${Pt(ms(e.printedAt))}${e.printedBy?` \xB7 ${Pt(e.printedBy)}`:""}</text>`,d?`<text x="${l}" y="74" class="doc-meta" text-anchor="end">${Pt(d)}</text>`:""].join("")}function Lo(e){let{width:d,height:b,body:l,pageIndex:o,pageCount:s}=e;return[`<svg xmlns="http://www.w3.org/2000/svg" width="${d}" height="${b}" viewBox="0 0 ${d} ${b}">`,`<style>${VT}</style>`,`<rect x="0" y="0" width="${d}" height="${b}" fill="#ffffff" />`,l,`<text x="${d/2}" y="${b-22}" class="pageno" text-anchor="middle">${o+1} / ${s}</text>`,"</svg>"].join("")}var qf=ka,cg=Sa,zo=zr,Ta=qf-zr,Ba=22,Bi=20,Ii=22,Ca=5,ug=In,fg=gn,lg=cg-46,Ia=[{key:"title",label:"\uC81C\uBAA9",width:250,align:"start"},{key:"status",label:"\uC0C1\uD0DC",width:56,align:"middle"},{key:"start",label:"\uC2DC\uC791",width:86,align:"middle"},{key:"due",label:"\uB9C8\uAC10",width:86,align:"middle"},{key:"manager",label:"\uCC45\uC784\uC790",width:62,align:"middle"},{key:"receivers",label:"\uCC38\uC870\uC790",width:122,align:"start"},{key:"priority",label:"\uC911\uC694\uB3C4",width:52,align:"middle"},{key:"project",label:"\uD504\uB85C\uC81D\uD2B8",width:72,align:"middle"}],Ff=Ia.reduce((e,d,b)=>(e.push(b===0?zo:e[b-1]+Ia[b-1].width),e),[]);function KT(e){let d=[],b=[],l=ug+Ba,o=(s,r)=>{d.push(b),b=[],l=fg+Ba,s&&(b.push({kind:"group",label:s,count:r,continued:!0}),l+=Ii)};for(let s of e){s.label&&(l+Ii+Bi>lg&&o("",0),b.push({kind:"group",label:s.label,count:s.rows.length,continued:!1}),l+=Ii);for(let r of s.rows)l+Bi>lg&&o(s.label,s.rows.length),b.push({kind:"row",completed:r.completed,values:Ia.map(t=>{switch(t.key){case"title":return r.title;case"status":return r.statusName;case"project":return r.projectLabel||"\uAE30\uBCF8";case"manager":return r.managerName||"-";case"receivers":return r.receiverNames||"-";case"start":return r.startDate;case"due":return r.dueDate;default:return r.priorityName||"-"}})}),l+=Bi}return d.push(b),d.filter((s,r)=>r===0||s.length>0)}function GT(e,d){let b=[];b.push(`<rect x="${zo}" y="${d}" width="${Ta-zo}" height="${Ba}" class="head" />`),Ia.forEach((o,s)=>{let r=Ff[s],t=o.align==="middle"?r+o.width/2:r+Ca;b.push(`<text x="${t}" y="${d+Ba-7}" class="th" text-anchor="${o.align}">${Pt(o.label)}</text>`)});let l=d+Ba;for(let o of e){if(o.kind==="group"){b.push(`<rect x="${zo}" y="${l}" width="${Ta-zo}" height="${Ii}" class="group" />`,`<text x="${zo+Ca}" y="${l+Ii-7}" class="gt">${Pt(o.continued?`${o.label} (\uC774\uC5B4\uC11C)`:o.label)}</text>`,`<text x="${Ta-Ca}" y="${l+Ii-7}" class="gt" text-anchor="end">${o.count}\uAC74</text>`),l+=Ii;continue}Ia.forEach((s,r)=>{let t=Ff[r],n=s.align==="middle"?t+s.width/2:t+Ca;b.push(`<text x="${n}" y="${l+Bi-6}" class="${o.completed?"td done":"td"}" text-anchor="${s.align}">${Pt(Ci(o.values[r]??"",s.width-Ca*2,9))}</text>`)}),b.push(`<line x1="${zo}" y1="${l+Bi}" x2="${Ta}" y2="${l+Bi}" class="hline" />`),l+=Bi}return Ff.slice(1).forEach(o=>{b.push(`<line x1="${o}" y1="${d}" x2="${o}" y2="${l}" class="vline" />`)}),b.push(`<rect x="${zo}" y="${d}" width="${Ta-zo}" height="${l-d}" class="frame" />`),b.join("")}async function YT(e,d){let b=KT(d),l=d.reduce((o,s)=>o+s.rows.length,0);return b.map((o,s)=>{let r=s===0?ug:fg,t=[s===0?No(e,`\uC804\uCCB4 ${l}\uAC74`,qf):"",GT(o,r)].join("");return Lo({width:qf,height:cg,body:t,pageIndex:s,pageCount:b.length})})}var Hf=wa,dg=_a,co=zr,hc=Hf-zr,XT=dg-46,hg=22,ZT=68,JT=(hc-co)/2,QT=14,$f=58;function bs(e){switch(e.kind){case"title":return 34;case"props":return Math.ceil(e.pairs.length/2)*hg+10;case"section":return 26;default:return QT}}function e7(e){let d=[{kind:"title",text:e.title,ticket:e.ticketNo}];return d.push({kind:"props",pairs:e.properties}),d.push({kind:"section",text:"\uB0B4\uC6A9"}),(e.content.trim()?e.content.split(`
45
+ `).flatMap(l=>l.trim()?gs(l,$f):[""]):["(\uB0B4\uC6A9 \uC5C6\uC74C)"]).forEach(l=>d.push({kind:"line",text:l,muted:!e.content.trim()})),e.checklist.length>0&&(d.push({kind:"section",text:`\uD560\uC77C (${e.checklist.filter(l=>l.checked).length}/${e.checklist.length})`}),e.checklist.forEach(l=>{gs(l.label,$f-3).forEach((o,s)=>d.push({kind:s===0?"check":"line",text:o,checked:l.checked}))})),e.includeComments&&e.comments.length>0&&(d.push({kind:"section",text:`\uB313\uAE00 (${e.comments.length})`}),e.comments.forEach(l=>{d.push({kind:"line",text:`${l.author} \xB7 ${l.time}`,muted:!0}),gs(l.text,$f).forEach(o=>d.push({kind:"line",text:o}))})),d}function t7(e){let d=[],b=[],l=In;for(let o of e){let s=bs(o);l+s>XT&&(d.push(b),b=[],l=gn),b.push(o),l+=s}return d.push(b),d}function r7(e,d){switch(e.kind){case"title":{let b=e.ticket?`<text x="${hc}" y="${d+16}" class="doc-meta" text-anchor="end">${Pt(e.ticket)}</text>`:"";return{markup:`<text x="${co}" y="${d+16}" class="section" style="font-size:14px">${Pt(e.text)}</text>${b}<line x1="${co}" y1="${d+24}" x2="${hc}" y2="${d+24}" class="hline" />`,nextY:d+bs(e)}}case"props":{let b=[];return e.pairs.forEach((l,o)=>{let s=o%2,r=Math.floor(o/2),t=co+s*JT,n=d+r*hg;b.push(`<text x="${t}" y="${n+14}" class="label">${Pt(l.label)}</text>`,`<text x="${t+ZT}" y="${n+14}" class="value">${Pt(gs(l.value||"-",26)[0]??"-")}</text>`)}),{markup:b.join(""),nextY:d+bs(e)}}case"section":return{markup:`<text x="${co}" y="${d+16}" class="section">${Pt(e.text)}</text><line x1="${co}" y1="${d+21}" x2="${hc}" y2="${d+21}" class="hline" />`,nextY:d+bs(e)};case"check":return{markup:`<text x="${co}" y="${d+10}" class="td">${e.checked?"\u2611":"\u2610"}</text><text x="${co+14}" y="${d+10}" class="${e.checked?"td done":"td"}">${Pt(e.text)}</text>`,nextY:d+bs(e)};default:return{markup:`<text x="${co}" y="${d+10}" class="${e.muted?"td done":"td"}">${Pt(e.text)}</text>`,nextY:d+bs(e)}}}async function n7(e,d){let b=t7(e7(d));return b.map((l,o)=>{let s=o===0?In:gn,r=[o===0?No(e,"",Hf):`<text x="${co}" y="${gn-12}" class="doc-meta">${Pt(`${d.title} (\uC774\uC5B4\uC11C)`)}</text>`];for(let t of l){let n=r7(t,s);r.push(n.markup),s=n.nextY}return Lo({width:Hf,height:dg,body:r.join(""),pageIndex:o,pageCount:b.length})})}var Uf=ka,gg=Sa,pc=zr,Ea=Uf-zr,pg=gg-46,mg=210,ii=20,Wf=24;function si(e){if(!/^\d{4}-\d{2}-\d{2}$/.test(e))return null;let d=new Date(`${e}T00:00:00`);return Number.isNaN(d.getTime())?null:d}function bg(e,d){return Math.round((d.getTime()-e.getTime())/864e5)}function o7(e,d){let b=[];e.forEach(r=>{let t=si(r.startDate),n=si(r.dueDate);t&&b.push(t),n&&b.push(n)});let l=si(d)??new Date;if(b.length===0)return{start:l,days:30};let o=new Date(Math.min(...b.map(r=>r.getTime()))),s=new Date(Math.max(...b.map(r=>r.getTime())));return o.setDate(o.getDate()-1),s.setDate(s.getDate()+1),{start:o,days:Math.max(7,bg(o,s)+1)}}async function i7(e,d,b){let l=o7(d,b),o=pc+mg,r=(Ea-o)/l.days,t=si(b),n=f=>o+bg(l.start,f)*r,c=Math.max(1,Math.floor((pg-In-Wf)/ii)),i=Math.max(1,Math.floor((pg-gn-Wf)/ii)),a=[],h=0;for(;h<d.length||a.length===0;){let f=a.length===0?c:i;if(a.push(d.slice(h,h+f)),h+=f,h>=d.length)break}return a.map((f,u)=>{let g=u===0?In:gn,m=[u===0?No(e,`\uC804\uCCB4 ${d.length}\uAC74`,Uf):""],v=g+Wf;m.push(`<line x1="${pc}" y1="${v}" x2="${Ea}" y2="${v}" class="vline" />`);for(let k=0;k<l.days;k+=1){let B=new Date(l.start);if(B.setDate(B.getDate()+k),B.getDay()!==0&&k!==0)continue;let R=o+k*r;m.push(`<line x1="${R}" y1="${v}" x2="${R}" y2="${v+f.length*ii}" class="hline" />`,`<text x="${R+2}" y="${v-6}" class="label">${B.getMonth()+1}.${B.getDate()}</text>`)}if(t&&t>=l.start){let k=n(t);k>=o&&k<=Ea&&m.push(`<line x1="${k}" y1="${v}" x2="${k}" y2="${v+f.length*ii}" stroke="#f87171" stroke-width="0.8" />`)}return f.forEach((k,B)=>{let R=v+B*ii,L=Ci(k.title,mg-64,9);m.push(`<text x="${pc}" y="${R+14}" class="${k.completed?"td done":"td"}">${Pt(L)}</text>`,`<text x="${o-6}" y="${R+14}" class="label" text-anchor="end">${Pt(k.managerName)}</text>`,`<line x1="${pc}" y1="${R+ii}" x2="${Ea}" y2="${R+ii}" class="hline" />`);let A=si(k.startDate)??si(k.dueDate),P=si(k.dueDate)??si(k.startDate);if(!A||!P)return;let N=n(A),q=Math.max(N+r*.8,n(P)+r*.8),j=k.completed?"bar done":k.overdue?"bar overdue":"bar";m.push(`<rect x="${N}" y="${R+5}" width="${Math.max(3,Math.min(q,Ea)-N)}" height="${ii-10}" rx="2" class="${j}" />`)}),Lo({width:Uf,height:gg,body:m.join(""),pageIndex:u,pageCount:a.length})})}function s7(e,d,b,l){return{title:e.title,managerName:e.managerName,startDate:String(d??"").slice(0,10),dueDate:String(b??"").slice(0,10),completed:e.completed,overdue:!e.completed&&!!b&&String(b).slice(0,10)<l}}var Vf=wa,xg=_a,ys=zr,mc=Vf-zr,yg=xg-46,xs=30,vs=18,vg=12;function a7(e){let d=[],b=[],l=In,o=(s,r)=>{d.push(b),b=[],l=gn,s&&(b.push({kind:"column",label:s,summary:r,continued:!0,gapBefore:!1}),l+=xs)};for(let s of e){let r=b.length>0,t=r?vg:0;if(l+t+xs+vs>yg?(o("",""),b.push({kind:"column",label:s.label,summary:s.summary,continued:!1,gapBefore:!1}),l+=xs):(b.push({kind:"column",label:s.label,summary:s.summary,continued:!1,gapBefore:r}),l+=t+xs),s.items.length===0){b.push({kind:"empty"}),l+=vs;continue}for(let n of s.items)l+vs>yg&&o(s.label,s.summary),b.push({kind:"item",title:n.title,meta:n.meta,completed:n.completed}),l+=vs}return d.push(b),d}async function l7(e,d,b){let l=a7(d);return l.map((o,s)=>{let r=s===0?In:gn,t=[s===0?No(e,b,Vf):""];for(let n of o){if(n.kind==="column"){n.gapBefore&&(r+=vg),t.push(`<rect x="${ys}" y="${r}" width="${mc-ys}" height="${xs-6}" class="group" />`,`<text x="${ys+6}" y="${r+16}" class="gt">${Pt(n.continued?`${n.label} (\uC774\uC5B4\uC11C)`:n.label)}</text>`,`<text x="${mc-6}" y="${r+16}" class="label" text-anchor="end">${Pt(n.summary)}</text>`),r+=xs;continue}if(n.kind==="empty"){t.push(`<text x="${ys+12}" y="${r+12}" class="td done">(\uC5C5\uBB34 \uC5C6\uC74C)</text>`),r+=vs;continue}t.push(`<text x="${ys+12}" y="${r+12}" class="${n.completed?"td done":"td"}">${Pt(Ci(n.title,mc-ys-12-120,9))}</text>`,`<text x="${mc-6}" y="${r+12}" class="label" text-anchor="end">${Pt(n.meta)}</text>`),r+=vs}return Lo({width:Vf,height:xg,body:t.join(""),pageIndex:s,pageCount:l.length})})}var c7=[{header:"\uADF8\uB8F9",width:16},{header:"\uC81C\uBAA9",width:44},{header:"\uC0C1\uD0DC",width:10},{header:"\uD504\uB85C\uC81D\uD2B8",width:14},{header:"\uCC45\uC784\uC790",width:10},{header:"\uCC38\uC870\uC790",width:22},{header:"\uC2DC\uC791",width:12},{header:"\uB9C8\uAC10",width:14},{header:"\uC911\uC694\uB3C4",width:8},{header:"\uD560\uC77C",width:8},{header:"\uBE44\uACE0",width:30}],u7="FFEEF2F7",gc="FFCBD5E1";function f7(e){return e.replace(/[\\/:*?"<>|]/g,"_").trim()||"\uC5C5\uBB34\uBAA9\uB85D"}async function d7(e,d){let b=await Promise.resolve().then(()=>Mg(_g(),1)),l=new b.Workbook,o=l.addWorksheet("\uC5C5\uBB34\uBAA9\uB85D",{pageSetup:{paperSize:9,orientation:"landscape",fitToPage:!0,fitToWidth:1,fitToHeight:0}});o.columns=c7.map(i=>({header:i.header,width:i.width})),o.spliceRows(1,0,[`${e.documentTitle}`],[`${e.subtitle} \xB7 ${e.facilityName} \xB7 \uCD9C\uB825 ${ms(e.printedAt)}${e.printedBy?` \xB7 ${e.printedBy}`:""}`]),o.getRow(1).font={bold:!0,size:14},o.getRow(2).font={size:10,color:{argb:"FF6B7280"}};let s=o.getRow(3);s.font={bold:!0,size:10},s.eachCell(i=>{i.fill={type:"pattern",pattern:"solid",fgColor:{argb:u7}},i.alignment={vertical:"middle",horizontal:"center"}}),d.forEach(i=>{i.rows.forEach(a=>{let h=o.addRow([i.label,a.title,a.statusName,a.projectLabel||"\uAE30\uBCF8",a.managerName,a.receiverNamesFull,a.startDate==="-"?"":a.startDate,a.dueDate==="-"?"":a.dueDate,a.priorityName,a.checklist,a.note]);h.font={size:10,color:{argb:a.completed?"FF9CA3AF":"FF111827"}},h.alignment={vertical:"middle",wrapText:!1}})});let r=o.rowCount;for(let i=3;i<=r;i+=1)o.getRow(i).eachCell({includeEmpty:!0},a=>{a.border={top:{style:"thin",color:{argb:gc}},left:{style:"thin",color:{argb:gc}},bottom:{style:"thin",color:{argb:gc}},right:{style:"thin",color:{argb:gc}}}});o.views=[{state:"frozen",ySplit:3}];let t=await l.xlsx.writeBuffer(),n=new Blob([t],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),c=ms(e.printedAt).replace(/[: ]/g,"").slice(0,13);return{blob:n,fileName:`${f7(e.documentTitle)}_${c}.xlsx`}}function h7(e){return String(e??"").replace(/<br\s*\/?>(?=.)/gi,`
46
46
  `).replace(/<\/(p|div|li|h[1-6])>/gi,`
47
- `).replace(/<[^>]+>/g,"").replace(/&nbsp;/g," ").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&")}function i7(e,d){let b=jf(e,d);return{title:b.title,ticketNo:String(e.ticket_no??"").trim(),properties:[{label:"\uC0C1\uD0DC",value:b.statusName},{label:"\uD504\uB85C\uC81D\uD2B8",value:b.projectLabel||"\uAE30\uBCF8"},{label:"\uCC45\uC784\uC790",value:b.managerName},{label:"\uCC38\uC870\uC790",value:b.receiverNamesFull},{label:"\uC2DC\uC791\uC77C\uC2DC",value:b.startDate},{label:"\uB9C8\uAC10\uC608\uC815",value:b.dueDate},{label:"\uC911\uC694\uB3C4",value:b.priorityName},{label:"\uC791\uC131\uC790",value:String(e.created_by??"")}],content:o7(e.content),checklist:(e.checklist??[]).map(l=>({label:String(l.label??""),checked:!!l.checked})),comments:(e.comments??[]).map(l=>({author:String(l.author??""),time:String(l.time??""),text:String(l.text??"")})),includeComments:!0}}export{SI as ALL_TASK_VIEWER_ACCOUNT_SEQS,kp as AddLabelDialog,nl as AddTabDialog,xp as AttachmentUploadGauge,zu as AttachmentUploadPercent,Cc as BUG_DEVICE_OPTIONS,Cy as BUG_GROUP_KEY,Cs as BUG_ICON_COLOR,AB as BUG_KANBAN_COLUMNS,Tc as BUG_REPRO_OPTIONS,Bc as BUG_RESOLUTION_OPTIONS,ai as BUG_STATUS_OPTIONS,Ts as BUG_TASK_ICON,Tl as BugPropertiesGrid,cf as CALENDAR_PROVIDERS,_m as CALENDAR_PROVIDER_LIST,wd as COLUMN_WIDTHS,Bs as COMPLETED_STATUS_OPTION,gn as CONT_BODY_TOP,af as CUSTOM_TAB_KEY_PREFIX,Q$ as CalendarImportDialog,z$ as CalendarLinkDialog,cH as CalendarSubscribeDialog,Vr as ChartEmptyMessage,Ho as CommentBubbleIcon,Ni as ConfirmCountButton,Um as CumulativeFlowChart,Gd as DATE_REMINDER_OPTIONS,x_ as DEFAULT_COMPACT_COLUMNS,xc as DEFAULT_PROJECT_ICON,GU as DEFAULT_TASKBOX_TAB_ITEMS,ho as DEFAULT_TASK_ICON,fo as DEFAULT_WORKLOAD_CAPACITY,Eu as DRAWER_SECTION_TITLE_FONT_SIZE,DU as DateRangeFilterPopover,_n as DrawerSection,xn as DueDatePickerPopover,yy as ENDED_EVENT_STATUS_OPTION,Ap as EVENT_ICON_COLOR,cr as EVENT_TASK_ICON,yH as EmployeeSelectDialog,In as FIRST_BODY_TOP,Rc as GROUP_BY_OPTIONS,Ui as GoogleEventChip,SU as GroupByMenuButton,rl as IconPickerGrid,op as InlineAddressInput,Bo as InlineTextValue,Ec as KANBAN_CLOSED_COLUMN_KEY,Sa as LANDSCAPE_HEIGHT,ka as LANDSCAPE_WIDTH,OV as LabelFilterMenu,Ll as LabelSelectMenu,Ym as LeadTimeDistributionChart,Es as MANUAL_TASK_STATUS_OPTIONS,zr as MARGIN_X,gU as MemberFilterMenu,Ty as NOTICE_GROUP_KEY,Is as NOTICE_STATUS_OPTIONS,ir as NOTICE_TASK_ICON,ad as NO_TASK_ICON,_a as PORTRAIT_HEIGHT,wa as PORTRAIT_WIDTH,vc as PROJECT_ICON_OPTIONS,pt as PropertyRow,Pi as RECEIVER_AVATAR_COLORS,Yd as REMINDER_OPTIONS,qr as ReceiverAvatarStack,Qp as RelatedTasksSection,a7 as STATUS_KEY_REPLIED,Zf as STATUS_KEY_WAITING,By as SUPPORT_GROUP_KEY,eK as ShortcutHelpDialog,oh as SortableTaskCard,Lm as SprintBurndownChart,fU as SprintChartsDialog,hm as SprintCloseDialog,jV as SprintFilterMenu,I$ as SprintManageDialog,Dm as SprintVelocityChart,Ai as StatusSelectMenu,Wa as TASKBOX_COLUMNS,Dn as TASKBOX_DRAWER_NARROW_MQ,GV as TASKBOX_SHORTCUT_HELP,ld as TASKBOX_UI_STATE_ID,I0 as TASKBOX_VIEW_LABELS,VA as TASKBOX_VIEW_MODES,Qc as TASK_CARD_DRAG_HANDLE_CLASS,Ws as TASK_REPEAT_RULE_OPTIONS,cn as TASK_STATUS_OPTIONS,Vx as TIME_REMINDER_OPTIONS,sl as TaskAckListPopover,$n as TaskActionButton,Hl as TaskActivityDialog,Pl as TaskAttachmentsSection,Hh as TaskBoxColumnSummary,aP as TaskBoxCompactTable,su as TaskBoxGroupBoard,DD as TaskBoxMobileList,Ph as TaskBoxMonthAgenda,Mh as TaskBoxMonthCalendar,sD as TaskBoxSprintColumnSummary,eh as TaskBoxTable,YU as TaskBoxTabs,qh as TaskBoxTimeline,UA as TaskBoxView,Th as TaskBoxWeekCalendar,Ns as TaskCardContent,Rl as TaskChecklistSection,Hp as TaskCommentInput,$p as TaskCommentsSection,Il as TaskContentEditor,Bl as TaskContentTemplateMenu,BV as TaskContextMenu,Sl as TaskCorePropertiesGrid,Hu as TaskCreateBody,nj as TaskCreateDrawer,y0 as TaskDateRangeFilter,am as TaskDetailBody,n$ as TaskDetailDrawer,Gp as TaskDetailHeader,Wo as TaskIconPickerPopover,qo as TaskLabelChips,Ml as TaskLinkDialog,Yp as TaskNoteField,Fr as TaskPriorityChip,TK as TaskRuleManageDialog,At as TaskStatusChip,qB as TaskStatusChips,VK as TaskTemplateManageDialog,rG as TaskTemplateRunDialog,cK as TaskboxManualDialog,Sg as TaskboxProvider,Om as WorkloadCapacityDialog,r0 as WorkloadChart,a0 as WorkloadPersonTasks,l0 as WorkloadPersonTasksDialog,u0 as WorkloadTimelineGrid,Qh as addDaysToDate,Zm as averageWorkload,Kk as buildCalendarFeedUrl,al as buildCardBaseSx,$m as buildCumulativeFlow,Hm as buildLeadCycleDistribution,S_ as buildPlannedTask,md as buildStatusOptionColors,QT as buildTaskColumnsPrintSvgPages,i7 as buildTaskDetailPrintData,GT as buildTaskDetailPrintSvgPages,Ha as buildTaskGroupSections,FT as buildTaskListPrintSvgPages,n7 as buildTaskListXlsx,Ku as buildTaskRelationsModel,S4 as buildTaskShareText,XT as buildTaskTimelinePrintSvgPages,ha as buildTaskboxShortcutHelp,Na as buildTaskboxTheme,ep as buildTemplateTasks,Zl as buildWorkloadRows,Jm as buildWorkloadTimeline,Id as canAssignBugManager,Ka as canClaimTaskItem,Md as canCompleteTaskItem,mo as canEditTaskItem,Va as canViewTaskItem,Ga as canVolunteerTaskItem,Ci as clampPrintText,Gu as countTaskRelations,Wh as countWorkdays,py as createTaskboxTheme,$h as daysLeftUntil,vl as defaultRepeatUntil,wc as defaultTaskBoxFormValues,_c as defaultTaskboxUiStateValues,Pt as escapePrintXml,dc as estimatePrintTextWidth,Ip as filterFilesWithinLimit,GM as formatConfirmTime,QA as formatHours,yn as formatKoreanDate,un as formatKoreanDateTime,Lc as formatMonthDay,fP as formatOffsetLabel,zf as formatPrintDate,ms as formatPrintStamp,vn as formatSprintOptionLabel,hd as getBugDeviceName,dd as getBugReproName,La as getBugResolutionName,xy as getBugStatusOption,KH as getDefaultDateRange,Ms as getEventDisplayStatusOption,PB as getNoDueStatusRank,Bp as getNoticeAckInfo,pd as getNoticeStatusOption,az as getNoticeTargetDisplay,iB as getProjectIconAnchorComponent,Tt as getProjectIconComponent,Kx as getReminderLabel,Wc as getReminderOptions,Uc as getRemindersLabel,xl as getRepeatRuleLabel,Fa as getStatusOptionsForTask,$V as getTabHeaderConfig,Ua as getTaskBoxColumnDefs,kd as getTaskBoxGridMinWidth,_d as getTaskBoxGridTemplate,DS as getTaskBoxTabKind,Fi as getTaskConfirmInfo,ur as getTaskDisplayStatusOption,ja as getTaskStatusOption,$i as groupGoogleEventsByDate,Qo as groupSeqFromTabKey,mF as hasRelation,Zp as hasTaskRelations,A3 as htmlToPlainText,Sk as isCustomTabKey,Fm as isFlowTask,Bd as isOpenPoolTaskItem,Ql as isOverCapacity,Xm as isOverloaded,Ic as isPastEvent,Ed as isSupportOriginTaskItem,za as isTaskDone,DB as isWaitingTask,Xl as monthsAgoDate,eo as narrowOrderSx,r$ as nowDateTimeString,Ww as parseEstimatedHours,gf as parseTaskTimeMs,Jl as pickPersonWorkloadTasks,vi as relationsOf,No as renderPrintHeader,Kl as resolveCalendarProvider,Wn as resolveReminders,n8 as resolveRowCapacity,Oi as resolveTaskStatusOptions,Sc as resolveTaskboxTheme,c7 as resolveWorkloadCapacity,sP as selectDepartmentSharedTasks,ts as shareTaskText,eD as sumRemainingHours,zl as summarizeNoticeTargets,m$ as tabKeyFromGroupSeq,En as taskVisibilityOf,jf as toTaskPrintRow,ZT as toTimelinePrintRow,Ao as toYmd,qa as toggleLabelKey,tl as toggleReminder,ks as useBuildFileUrl,yp as useTaskAttachmentUploadMeta,$t as useTaskboxConfig,cy as useTaskboxForm,KV as useTaskboxShortcuts,at as useTaskboxTheme,po as useTaskboxUiState,Ss as useUploadMaxMb,rr as wideColumnSx,Ya as withOriginAuthorAvatar,Lo as wrapPrintPage,gs as wrapPrintText};
47
+ `).replace(/<[^>]+>/g,"").replace(/&nbsp;/g," ").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&")}function p7(e,d){let b=jf(e,d);return{title:b.title,ticketNo:String(e.ticket_no??"").trim(),properties:[{label:"\uC0C1\uD0DC",value:b.statusName},{label:"\uD504\uB85C\uC81D\uD2B8",value:b.projectLabel||"\uAE30\uBCF8"},{label:"\uCC45\uC784\uC790",value:b.managerName},{label:"\uCC38\uC870\uC790",value:b.receiverNamesFull},{label:"\uC2DC\uC791\uC77C\uC2DC",value:b.startDate},{label:"\uB9C8\uAC10\uC608\uC815",value:b.dueDate},{label:"\uC911\uC694\uB3C4",value:b.priorityName},{label:"\uC791\uC131\uC790",value:String(e.created_by??"")}],content:h7(e.content),checklist:(e.checklist??[]).map(l=>({label:String(l.label??""),checked:!!l.checked})),comments:(e.comments??[]).map(l=>({author:String(l.author??""),time:String(l.time??""),text:String(l.text??"")})),includeComments:!0}}export{AI as ALL_TASK_VIEWER_ACCOUNT_SEQS,kp as AddLabelDialog,nl as AddTabDialog,xp as AttachmentUploadGauge,zu as AttachmentUploadPercent,Cc as BUG_DEVICE_OPTIONS,Ny as BUG_GROUP_KEY,Cs as BUG_ICON_COLOR,$B as BUG_KANBAN_COLUMNS,Tc as BUG_REPRO_OPTIONS,Bc as BUG_RESOLUTION_OPTIONS,ai as BUG_STATUS_OPTIONS,Ts as BUG_TASK_ICON,Tl as BugPropertiesGrid,cf as CALENDAR_PROVIDERS,_m as CALENDAR_PROVIDER_LIST,wd as COLUMN_WIDTHS,Bs as COMPLETED_STATUS_OPTION,gn as CONT_BODY_TOP,af as CUSTOM_TAB_KEY_PREFIX,lH as CalendarImportDialog,K$ as CalendarLinkDialog,yH as CalendarSubscribeDialog,Vr as ChartEmptyMessage,Ho as CommentBubbleIcon,Ni as ConfirmCountButton,Um as CumulativeFlowChart,Gd as DATE_REMINDER_OPTIONS,E_ as DEFAULT_COMPACT_COLUMNS,xc as DEFAULT_PROJECT_ICON,nV as DEFAULT_TASKBOX_TAB_ITEMS,ho as DEFAULT_TASK_ICON,fo as DEFAULT_WORKLOAD_CAPACITY,Eu as DRAWER_SECTION_TITLE_FONT_SIZE,HU as DateRangeFilterPopover,_n as DrawerSection,xn as DueDatePickerPopover,Iy as ENDED_EVENT_STATUS_OPTION,Ap as EVENT_ICON_COLOR,cr as EVENT_TASK_ICON,BH as EmployeeSelectDialog,In as FIRST_BODY_TOP,Rc as GROUP_BY_OPTIONS,Ui as GoogleEventChip,AU as GroupByMenuButton,rl as IconPickerGrid,op as InlineAddressInput,Bo as InlineTextValue,Ec as KANBAN_CLOSED_COLUMN_KEY,Sa as LANDSCAPE_HEIGHT,ka as LANDSCAPE_WIDTH,qV as LabelFilterMenu,Ll as LabelSelectMenu,Ym as LeadTimeDistributionChart,Es as MANUAL_TASK_STATUS_OPTIONS,zr as MARGIN_X,TU as MemberFilterMenu,Py as NOTICE_GROUP_KEY,Is as NOTICE_STATUS_OPTIONS,ir as NOTICE_TASK_ICON,ad as NO_TASK_ICON,_a as PORTRAIT_HEIGHT,wa as PORTRAIT_WIDTH,vc as PROJECT_ICON_OPTIONS,pt as PropertyRow,Pi as RECEIVER_AVATAR_COLORS,Yd as REMINDER_OPTIONS,qr as ReceiverAvatarStack,Qp as RelatedTasksSection,g7 as STATUS_KEY_REPLIED,Zf as STATUS_KEY_WAITING,Ly as SUPPORT_GROUP_KEY,cK as ShortcutHelpDialog,oh as SortableTaskCard,Lm as SprintBurndownChart,vU as SprintChartsDialog,hm as SprintCloseDialog,GV as SprintFilterMenu,L$ as SprintManageDialog,Dm as SprintVelocityChart,Ai as StatusSelectMenu,Wa as TASKBOX_COLUMNS,Dn as TASKBOX_DRAWER_NARROW_MQ,nK as TASKBOX_SHORTCUT_HELP,ld as TASKBOX_UI_STATE_ID,I0 as TASKBOX_VIEW_LABELS,tD as TASKBOX_VIEW_MODES,Qc as TASK_CARD_DRAG_HANDLE_CLASS,Ws as TASK_REPEAT_RULE_OPTIONS,cn as TASK_STATUS_OPTIONS,r2 as TIME_REMINDER_OPTIONS,sl as TaskAckListPopover,$n as TaskActionButton,Hl as TaskActivityDialog,Pl as TaskAttachmentsSection,Hh as TaskBoxColumnSummary,gP as TaskBoxCompactTable,su as TaskBoxGroupBoard,HD as TaskBoxMobileList,Ph as TaskBoxMonthAgenda,Mh as TaskBoxMonthCalendar,mD as TaskBoxSprintColumnSummary,eh as TaskBoxTable,oV as TaskBoxTabs,qh as TaskBoxTimeline,eD as TaskBoxView,Th as TaskBoxWeekCalendar,Ns as TaskCardContent,Rl as TaskChecklistSection,Hp as TaskCommentInput,$p as TaskCommentsSection,Il as TaskContentEditor,Bl as TaskContentTemplateMenu,NV as TaskContextMenu,Sl as TaskCorePropertiesGrid,Hu as TaskCreateBody,dj as TaskCreateDrawer,y0 as TaskDateRangeFilter,am as TaskDetailBody,d$ as TaskDetailDrawer,Gp as TaskDetailHeader,Wo as TaskIconPickerPopover,qo as TaskLabelChips,Ml as TaskLinkDialog,Yp as TaskNoteField,Fr as TaskPriorityChip,eG as TaskRuleManageDialog,At as TaskStatusChip,XB as TaskStatusChips,wG as TaskTemplateManageDialog,RG as TaskTemplateRunDialog,zK as TaskboxManualDialog,Dg as TaskboxProvider,Om as WorkloadCapacityDialog,r0 as WorkloadChart,a0 as WorkloadPersonTasks,l0 as WorkloadPersonTasksDialog,u0 as WorkloadTimelineGrid,Qh as addDaysToDate,Zm as averageWorkload,n6 as buildCalendarFeedUrl,al as buildCardBaseSx,$m as buildCumulativeFlow,Hm as buildLeadCycleDistribution,D_ as buildPlannedTask,md as buildStatusOptionColors,l7 as buildTaskColumnsPrintSvgPages,p7 as buildTaskDetailPrintData,n7 as buildTaskDetailPrintSvgPages,Ha as buildTaskGroupSections,YT as buildTaskListPrintSvgPages,d7 as buildTaskListXlsx,Ku as buildTaskRelationsModel,D4 as buildTaskShareText,i7 as buildTaskTimelinePrintSvgPages,ha as buildTaskboxShortcutHelp,Na as buildTaskboxTheme,ep as buildTemplateTasks,Zl as buildWorkloadRows,Jm as buildWorkloadTimeline,Id as canAssignBugManager,Ka as canClaimTaskItem,Md as canCompleteTaskItem,mo as canEditTaskItem,Va as canViewTaskItem,Ga as canVolunteerTaskItem,Ci as clampPrintText,Gu as countTaskRelations,Wh as countWorkdays,Sy as createTaskboxTheme,$h as daysLeftUntil,vl as defaultRepeatUntil,wc as defaultTaskBoxFormValues,_c as defaultTaskboxUiStateValues,Pt as escapePrintXml,dc as estimatePrintTextWidth,Ip as filterFilesWithinLimit,nR as formatConfirmTime,lD as formatHours,yn as formatKoreanDate,un as formatKoreanDateTime,Lc as formatMonthDay,vP as formatOffsetLabel,zf as formatPrintDate,ms as formatPrintStamp,vn as formatSprintOptionLabel,hd as getBugDeviceName,dd as getBugReproName,La as getBugResolutionName,Ey as getBugStatusOption,rW as getDefaultDateRange,Ms as getEventDisplayStatusOption,WB as getNoDueStatusRank,Bp as getNoticeAckInfo,pd as getNoticeStatusOption,gz as getNoticeTargetDisplay,pB as getProjectIconAnchorComponent,Tt as getProjectIconComponent,n2 as getReminderLabel,Wc as getReminderOptions,Uc as getRemindersLabel,xl as getRepeatRuleLabel,Fa as getStatusOptionsForTask,ZV as getTabHeaderConfig,Ua as getTaskBoxColumnDefs,kd as getTaskBoxGridMinWidth,_d as getTaskBoxGridTemplate,WS as getTaskBoxTabKind,Fi as getTaskConfirmInfo,ur as getTaskDisplayStatusOption,ja as getTaskStatusOption,$i as groupGoogleEventsByDate,Qo as groupSeqFromTabKey,SF as hasRelation,Zp as hasTaskRelations,H3 as htmlToPlainText,Dk as isCustomTabKey,Fm as isFlowTask,Bd as isOpenPoolTaskItem,Ql as isOverCapacity,Xm as isOverloaded,Ic as isPastEvent,Ed as isSupportOriginTaskItem,za as isTaskDone,HB as isWaitingTask,Xl as monthsAgoDate,eo as narrowOrderSx,f$ as nowDateTimeString,e_ as parseEstimatedHours,gf as parseTaskTimeMs,Jl as pickPersonWorkloadTasks,vi as relationsOf,No as renderPrintHeader,Kl as resolveCalendarProvider,Wn as resolveReminders,h8 as resolveRowCapacity,Oi as resolveTaskStatusOptions,Sc as resolveTaskboxTheme,y7 as resolveWorkloadCapacity,mP as selectDepartmentSharedTasks,ts as shareTaskText,cD as sumRemainingHours,zl as summarizeNoticeTargets,S$ as tabKeyFromGroupSeq,En as taskVisibilityOf,jf as toTaskPrintRow,s7 as toTimelinePrintRow,Ao as toYmd,qa as toggleLabelKey,tl as toggleReminder,ks as useBuildFileUrl,yp as useTaskAttachmentUploadMeta,$t as useTaskboxConfig,xy as useTaskboxForm,rK as useTaskboxShortcuts,at as useTaskboxTheme,po as useTaskboxUiState,Ss as useUploadMaxMb,rr as wideColumnSx,Ya as withOriginAuthorAvatar,Lo as wrapPrintPage,gs as wrapPrintText};
48
48
  /*! Bundled license information:
49
49
 
50
50
  exceljs/dist/exceljs.min.js: