@ehfuse/taskbox 0.5.420 → 0.5.422

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 Ug=Object.create;var pd=Object.defineProperty;var Vg=Object.getOwnPropertyDescriptor;var Kg=Object.getOwnPropertyNames;var Gg=Object.getPrototypeOf,Yg=Object.prototype.hasOwnProperty;var Ps=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(f,g)=>(typeof require<"u"?require:f)[g]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var Xg=(e,f)=>()=>(f||e((f={exports:{}}).exports,f),f.exports);var Zg=(e,f,g,l)=>{if(f&&typeof f=="object"||typeof f=="function")for(let o of Kg(f))!Yg.call(e,o)&&o!==g&&pd(e,o,{get:()=>f[o],enumerable:!(l=Vg(f,o))||l.enumerable});return e};var Jg=(e,f,g)=>(g=e!=null?Ug(Gg(e)):{},Zg(f||!e||!e.__esModule?pd(g,"default",{value:e,enumerable:!0}):g,e));var Wg=Xg((Hg,fd)=>{(function(e){typeof Hg=="object"&&typeof fd<"u"?fd.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(f,g,l){function o(t,n){if(!g[t]){if(!f[t]){var c=typeof Ps=="function"&&Ps;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=g[t]={exports:{}};f[t][0].call(a.exports,(function(h){return o(f[t][1][h]||h)}),a,a.exports,e,f,g,l)}return g[t].exports}for(var s=typeof Ps=="function"&&Ps,r=0;r<l.length;r++)o(l[r]);return o})({1:[function(e,f,g){"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!"}};f.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 d=l.createReadStream(a),u=await this.read(d,h);return d.close(),u}read(a,h){return h=h||{},new Promise((d,u)=>{let b=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"],x=h.map||function(B){if(B==="")return null;let R=Number(B);if(!Number.isNaN(R)&&R!==1/0)return R;let j=m.reduce((P,N)=>{if(P)return P;let q=t(B,N,!0);return q.isValid()?q:null},null);if(j)return new Date(j.valueOf());let A=i[B];return A!==void 0?A:B},k=o.parse(h.parserOptions).on("data",B=>{b.addRow(B.map(x))}).on("end",()=>{k.emit("worksheet",b)});k.on("worksheet",d).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((d,u)=>{h=h||{};let b=this.workbook.getWorksheet(h.sheetName||h.sheetId),m=o.format(h.formatterOptions);a.on("finish",()=>{d()}),m.on("error",u),m.pipe(a);let{dateFormat:x,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 x?k?t.utc(A).format(x):t(A).format(x):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,j=1;b&&b.eachRow((A,P)=>{if(R)for(;j++<P-1;)m.write([]);let{values:N}=A;N.shift(),m.write(N.map(B)),j=P}),m.end()})}writeFile(a,h){let d={encoding:(h=h||{}).encoding||"utf8"},u=l.createWriteStream(a,d);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,f,g){"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}}f.exports=o},{"../utils/col-cache":19}],3:[function(e,f,g){"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,d){if(!a||!h)throw new Error("A Cell needs a Row");this._row=a,this._column=h,l.validateAddress(d),this._address=d,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,d){let u=a&&a.numFmt||h&&h.numFmt;u&&(d.numFmt=u);let b=a&&a.font||h&&h.font;b&&(d.font=b);let m=a&&a.alignment||h&&h.alignment;m&&(d.alignment=m);let x=a&&a.border||h&&h.border;x&&(d.border=x);let k=a&&a.fill||h&&h.fill;k&&(d.fill=k);let B=a&&a.protection||h&&h.protection;return B&&(d.protection=B),d}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(d=>{h.addEx(this.fullAddress,d)})}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=d=>{let u=i[d];u&&(a[d]=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 d=this.types[i];if(!d)throw new Error("Could not create Value of type "+i);return new d(a,h)}};f.exports=n},{"../utils/col-cache":19,"../utils/shared-formula":23,"../utils/under-dash":26,"./enums":7,"./note":9}],4:[function(e,f,g){"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(d,u){return d.min-u.min}));h<c.length;){let d=c[h++];for(;a<d.min;)i.push(new r(n,a++));for(;a<=d.max;)i.push(new r(n,a++,d))}return i.length?i:null}}f.exports=r},{"../utils/col-cache":19,"../utils/under-dash":26,"./enums":7}],5:[function(e,f,g){"use strict";f.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,f,g){"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+))?/;f.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 d={sheetName:n.sheetName,address:o.n2l(a)+h,row:h,col:a};i.addCellEx(d)}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,d;function u(m,x){let k=n.findCellAt(i,m,c.col);return!(!k||!k.mark)&&(a[x]=m,k.mark=!1,!0)}for(d=c.row-1;u(d,"top");d--);for(d=c.row+1;u(d,"bottom");d++);function b(m,x){let k=[];for(d=a.top;d<=a.bottom;d++){let B=n.findCellAt(i,d,m);if(!B||!B.mark)return!1;k.push(B)}a[x]=m;for(let B=0;B<k.length;B++)k[B].mark=!1;return!0}for(h=c.col-1;b(h,"left");h--);for(h=c.col+1;b(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,f,g){"use strict";f.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,f,g){"use strict";let l=e("../utils/col-cache"),o=e("./anchor");f.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,f,g){"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"}},f.exports=o},{"../utils/under-dash":26}],10:[function(e,f,g){"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)}}f.exports=o},{"../utils/col-cache":19}],11:[function(e,f,g){"use strict";let l=e("../utils/under-dash"),o=e("./enums"),s=e("../utils/col-cache"),r=e("./cell");f.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 d=a.length-n,u=this._cells.length,b,m,x;if(d<0)for(b=t+a.length;b<=u;b++)x=this._cells[b-1],m=this._cells[b-d-1],m?(x=this.getCell(b),x.value=m.value,x.style=m.style,x._comment=m._comment):x&&(x.value=null,x.style={},x._comment=void 0);else if(d>0)for(b=u;b>=c;b--)m=this._cells[b-1],m?(x=this.getCell(b+d),x.value=m.value,x.style=m.style,x._comment=m._comment):this._cells[b+d-1]=void 0;for(b=0;b<a.length;b++)x=this.getCell(t+b),x.value=a[b],x.style={},x._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,f,g){"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)}}f.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=(d,u,b)=>{d[u]===void 0&&(d[u]=b)};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=(d,u)=>{if(!d)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((d,u)=>{t(d.name,`Column ${u} must have a name`),u===0?r(d,"totalsRowLabel","Total"):(r(d,"totalsRowFunction","none"),d.totalsRowFormula=this.getFormula(d))})}store(){let s=(a,h)=>{h&&Object.keys(h).forEach(d=>{a[d]=h[d]})},{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,d)=>{let{style:u,name:b}=h,m=a.getCell(c+d);m.value=b,s(m,u)})}if(t.rows.forEach(a=>{let h=r.getRow(n+i++);a.forEach((d,u)=>{let b=h.getCell(c+u);b.value=d,s(b,t.columns[u].style)})}),t.totalsRow){let a=r.getRow(n+i++);t.columns.forEach((h,d)=>{let u=a.getCell(c+d);if(d===0)u.value=h.totalsRowLabel;else{let b=this.getFormula(h);u.value=b?{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,d)=>{a.getCell(n+d).value=h})}),r.totalsRow){let i=s.getRow(t+c++);r.columns.forEach((a,h)=>{let d=i.getCell(n+h);h===0?d.value=a.totalsRowLabel:this.getFormula(a)&&(d.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,f,g){"use strict";let l=e("./worksheet"),o=e("./defined-names"),s=e("../xlsx/xlsx"),r=e("../csv/csv");f.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((d,u)=>(u&&u.orderNo)>d?u.orderNo:d,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(d=>d.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,f,g){"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:d}=e("../utils/copy-style");f.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(b=>b&&b.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(b=>{if(b){let m=b.dimensions;m&&u.expand(b.number,m.min,b.number,m.max)}}),u}get columns(){return this._columns}set columns(u){this._headerRowCount=u.reduce((x,k)=>{let B=(k.header?1:k.headers&&k.headers.length)||0;return Math.max(x,B)},0);let b=1,m=this._columns=[];u.forEach(x=>{let k=new t(this,b++,!1);m.push(k),k.defn=x})}getColumnKey(u){return this._keys[u]}setColumnKey(u,b){this._keys[u]=b}deleteColumnKey(u){delete this._keys[u]}eachColumnKey(u){l.each(this._keys,u)}getColumn(u){if(typeof u=="string"){let b=this._keys[u];if(b)return b;u=o.l2n(u)}if(this._columns||(this._columns=[]),u>this._columns.length){let b=this._columns.length+1;for(;b<=u;)this._columns.push(new t(this,b++))}return this._columns[u-1]}spliceColumns(u,b){let m=this._rows.length;for(var x=arguments.length,k=new Array(x>2?x-2:0),B=2;B<x;B++)k[B-2]=arguments[B];if(k.length>0)for(let P=0;P<m;P++){let N=[u,b];k.forEach(z=>{N.push(z[P]||null)});let q=this.getRow(P+1);q.splice.apply(q,N)}else this._rows.forEach(P=>{P&&P.splice(u,b)});let R=k.length-b,j=u+b,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>=j;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,b,k.length)}get lastColumn(){return this.getColumn(this.columnCount)}get columnCount(){let u=0;return this.eachRow(b=>{u=Math.max(u,b.cellCount)}),u}get actualColumnCount(){let u=[],b=0;return this.eachRow(m=>{m.eachCell(x=>{let{col:k}=x;u[k]||(u[k]=!0,b++)})}),b}_commitRow(){}get _lastRowNumber(){let u=this._rows,b=u.length;for(;b>0&&u[b-1]===void 0;)b--;return b}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,b){return this._rows.slice(u-1,u-1+b)}get rowCount(){return this._lastRowNumber}get actualRowCount(){let u=0;return this.eachRow(()=>{u++}),u}getRow(u){let b=this._rows[u-1];return b||(b=this._rows[u-1]=new r(this,u)),b}getRows(u,b){if(b<1)return;let m=[];for(let x=u;x<u+b;x++)m.push(this.getRow(x));return m}addRow(u){let b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n",m=this._nextRow,x=this.getRow(m);return x.values=u,this._setStyleOption(m,b[0]==="i"?b:"n"),x}addRows(u){let b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n",m=[];return u.forEach(x=>{m.push(this.addRow(x,b))}),m}insertRow(u,b){let m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"n";return this.spliceRows(u,0,b),this._setStyleOption(u,m),this.getRow(u)}insertRows(u,b){let m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"n";if(this.spliceRows(u,0,...b),m!=="n")for(let x=0;x<b.length;x++)m[0]==="o"&&this.findRow(b.length+u+x)!==void 0?this._copyStyle(b.length+u+x,u+x,m[1]==="+"):m[0]==="i"&&this.findRow(u-1)!==void 0&&this._copyStyle(u-1,u+x,m[1]==="+");return this.getRows(u,b.length)}_setStyleOption(u){let b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n";b[0]==="o"&&this.findRow(u+1)!==void 0?this._copyStyle(u+1,u,b[1]==="+"):b[0]==="i"&&this.findRow(u-1)!==void 0&&this._copyStyle(u-1,u,b[1]==="+")}_copyStyle(u,b){let m=arguments.length>2&&arguments[2]!==void 0&&arguments[2],x=this.getRow(u),k=this.getRow(b);k.style=d(x.style),x.eachCell({includeEmpty:m},(B,R)=>{k.getCell(R).style=d(B.style)}),k.height=x.height}duplicateRow(u,b){let m=arguments.length>2&&arguments[2]!==void 0&&arguments[2],x=this._rows[u-1],k=new Array(b).fill(x.values);this.spliceRows(u+1,m?0:b,...k);for(let B=0;B<b;B++){let R=this._rows[u+B];R.style=x.style,R.height=x.height,x.eachCell({includeEmpty:!0},(j,A)=>{R.getCell(A).style=j.style})}}spliceRows(u,b){let m=u+b;for(var x=arguments.length,k=new Array(x>2?x-2:0),B=2;B<x;B++)k[B-2]=arguments[B];let R=k.length,j=R-b,A=this._rows.length,P,N;if(j<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+j);q.values=N.values,q.style=N.style,q.height=N.height,N.eachCell({includeEmpty:!0},(z,T)=>{q.getCell(T).style=z.style}),this._rows[P-1]=void 0}else this._rows[P+j-1]=void 0;else if(j>0)for(P=A;P>=m;P--)if(N=this._rows[P-1],N){let q=this.getRow(P+j);q.values=N.values,q.style=N.style,q.height=N.height,N.eachCell({includeEmpty:!0},(z,T)=>{if(q.getCell(T).style=z.style,z._value.constructor.name==="MergeValue"){let S=this.getRow(z._row._number+R).getCell(T),D=z._value._master,p=this.getRow(D._row._number+R).getCell(D._column._number);S.merge(p)}})}else this._rows[P+j-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,b,R)}eachRow(u,b){if(b||(b=u,u=void 0),u&&u.includeEmpty){let m=this._rows.length;for(let x=1;x<=m;x++)b(this.getRow(x),x)}else this._rows.forEach(m=>{m&&m.hasValues&&b(m,m.number)})}getSheetValues(){let u=[];return this._rows.forEach(b=>{b&&(u[b.number]=b.values)}),u}findCell(u,b){let m=o.getAddress(u,b),x=this._rows[m.row-1];return x?x.findCell(m.col):void 0}getCell(u,b){let m=o.getAddress(u,b);return this.getRow(m.row).getCellEx(m)}mergeCells(){for(var u=arguments.length,b=new Array(u),m=0;m<u;m++)b[m]=arguments[m];let x=new s(b);this._mergeCellsInternal(x)}mergeCellsWithoutStyle(){for(var u=arguments.length,b=new Array(u),m=0;m<u;m++)b[m]=arguments[m];let x=new s(b);this._mergeCellsInternal(x,!0)}_mergeCellsInternal(u,b){l.each(this._merges,x=>{if(x.intersects(u))throw new Error("Cannot merge already merged cells")});let m=this.getCell(u.top,u.left);for(let x=u.top;x<=u.bottom;x++)for(let k=u.left;k<=u.right;k++)(x>u.top||k>u.left)&&this.getCell(x,k).merge(m,b);this._merges[m.address]=u}_unMergeMaster(u){let b=this._merges[u.address];if(b){for(let m=b.top;m<=b.bottom;m++)for(let x=b.left;x<=b.right;x++)this.getCell(m,x).unmerge();delete this._merges[u.address]}}get hasMerges(){return l.some(this._merges,Boolean)}unMergeCells(){for(var u=arguments.length,b=new Array(u),m=0;m<u;m++)b[m]=arguments[m];let x=new s(b);for(let k=x.top;k<=x.bottom;k++)for(let B=x.left;B<=x.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,b,m){let x=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"shared",k=o.decode(u),{top:B,left:R,bottom:j,right:A}=k,P=A-R+1,N=o.encodeAddress(B,R),q=x==="shared",z;z=typeof m=="function"?m:Array.isArray(m)?Array.isArray(m[0])?(S,D)=>m[S-B][D-R]:(S,D)=>m[(S-B)*P+(D-R)]:()=>{};let T=!0;for(let S=B;S<=j;S++)for(let D=R;D<=A;D++)T?(this.getCell(S,D).value={shareType:x,formula:b,ref:u,result:z(S,D)},T=!1):this.getCell(S,D).value=q?{sharedFormula:N,result:z(S,D)}:z(S,D)}addImage(u,b){let m={type:"image",imageId:u,range:b};this._media.push(new c(this,m))}getImages(){return this._media.filter(u=>u.type==="image")}addBackgroundImage(u){let b={type:"background",imageId:u};this._media.push(new c(this,b))}getBackgroundImageId(){let u=this._media.find(b=>b.type==="background");return u&&u.imageId}protect(u,b){return new Promise(m=>{this.sheetProtection={sheet:!0},b&&"spinCount"in b&&(b.spinCount=Number.isFinite(b.spinCount)?Math.round(Math.max(0,b.spinCount)):1e5),u&&(this.sheetProtection.algorithmName="SHA-512",this.sheetProtection.saltValue=h.randomBytes(16).toString("base64"),this.sheetProtection.spinCount=b&&"spinCount"in b?b.spinCount:1e5,this.sheetProtection.hashValue=h.convertPasswordToHash(u,"SHA512",this.sheetProtection.saltValue,this.sheetProtection.spinCount)),b&&(this.sheetProtection=Object.assign(this.sheetProtection,b),!u&&"spinCount"in b&&delete this.sheetProtection.spinCount),m()})}unprotect(){this.sheetProtection=null}addTable(u){let b=new i(this,u);return this.tables[u.name]=b,b}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(x=>x.model),sheetProtection:this.sheetProtection,tables:Object.values(this.tables).map(x=>x.model),conditionalFormattings:this.conditionalFormattings};u.cols=t.toModel(this.columns);let b=u.rows=[],m=u.dimensions=new s;return this._rows.forEach(x=>{let k=x&&x.model;k&&(m.expand(k.number,k.min,k.number,k.max),b.push(k))}),u.merges=[],l.each(this._merges,x=>{u.merges.push(x.range)}),u}_parseRows(u){this._rows=[],u.rows.forEach(b=>{let m=new r(this,b.number);this._rows[m.number-1]=m,m.model=b})}_parseMergeCells(u){l.each(u.mergeCells,b=>{this.mergeCellsWithoutStyle(b)})}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(b=>new c(this,b)),this.sheetProtection=u.sheetProtection,this.tables=u.tables.reduce((b,m)=>{let x=new i;return x.model=m,b[m.name]=x,b},{}),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,f,g){"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]}),f.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,f,g){"use strict";let l=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");g.bufferToString=function(o){return typeof o=="string"?o:l?l.decode(o):o.toString()}},{}],17:[function(e,f,g){"use strict";let l=typeof TextEncoder>"u"?null:new TextEncoder("utf-8"),{Buffer:o}=e("buffer");g.stringToBuffer=function(s){return typeof s!="string"?s:l?o.from(l.encode(s).buffer):o.from(s)}},{buffer:220}],18:[function(e,f,g){"use strict";let l=e("./under-dash"),o=e("./col-cache");f.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,f,g){"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,b=0;b<s.length;b++)if(u=s.charCodeAt(b),!i&&u>=65&&u<=90)t=!0,n+=s[b],c=26*c+u-64;else if(u>=48&&u<=57)i=!0,a+=s[b],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 d={address:s=n+a,col:c,row:h,$col$row:`$${n}$${a}`};return c<=100&&h<=100&&(this._hash[s]=d,this._hash[d.$col$row]=d),d},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]),d=Math.min(a.row,h.row),u=Math.min(a.col,h.col),b=Math.max(a.row,h.row),m=Math.max(a.col,h.col);return a=this.n2l(u)+d,h=this.n2l(m)+b,{top:d,left:u,bottom:b,right:m,sheetName:t,tl:{address:a,col:u,row:d,$col$row:`$${this.n2l(u)}$${d}`,sheetName:t},br:{address:h,col:m,row:b,$col$row:`$${this.n2l(m)}$${b}`,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}};f.exports=o},{}],20:[function(e,f,g){"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))};g.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,f,g){(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 d=l.alloc(4);d.writeUInt32LE(h,0),a=this.hash(t,a,d)}return a.toString("base64")},randomBytes:r=>o.randomBytes(r)};f.exports=s}).call(this)}).call(this,e("buffer").Buffer)},{buffer:220,crypto:390}],22:[function(e,f,g){"use strict";let{SaxesParser:l}=e("saxes"),{PassThrough:o}=e("readable-stream"),{bufferToString:s}=e("./browser-buffer-decode");f.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,f,g){"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;f.exports={slideFormula:function(r,t,n){let c=l.decode(t),i=l.decode(n);return r.replace(o,(a,h,d,u,b)=>{if(b)return a;let m=s.exec(u);if(m){let x=m[1],k=m[2].toUpperCase(),B=m[3],R=m[4];if(k.length>3||k.length===3&&k>"XFD")return a;let j=l.l2n(k),A=parseInt(R,10);return x||(j+=i.col-c.col),B||(A+=i.row-c.row),(h||"")+(x||"")+l.n2l(j)+(B||"")+A}return a})}}},{"./col-cache":19}],24:[function(e,f,g){(function(l,o){(function(){"use strict";let s=e("readable-stream"),r=e("./utils"),t=e("./string-buf");class n{constructor(u,b){this._data=u,this._encoding=b}get length(){return this.toBuffer().length}copy(u,b,m,x){return this.toBuffer().copy(u,b,m,x)}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,b,m,x){return this._data._buf.copy(u,b,m,x)}toBuffer(){return this._data.toBuffer()}}class i{constructor(u){this._data=u}get length(){return this._data.length}copy(u,b,m,x){this._data.copy(u,b,m,x)}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 b;return u===0?null:u===void 0||u>=this.length?(b=this.toBuffer(),this.iRead=this.iWrite,b):(b=o.alloc(u),this.buffer.copy(b,0,this.iRead,u),this.iRead+=u,b)}write(u,b,m){let x=Math.min(m,this.size-this.iWrite);return u.copy(this.buffer,this.iWrite,b,b+x),this.iWrite+=x,x}}let h=function(d){d=d||{},this.bufSize=d.bufSize||1048576,this.buffers=[],this.batch=d.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(d=>d.toBuffer()))}},_getWritableBuffer(){if(this.buffers.length){let u=this.buffers[this.buffers.length-1];if(!u.full)return u}let d=new a(this.bufSize);return this.buffers.push(d),d},async _pipe(d){await Promise.all(this.pipes.map((function(u){return new Promise(b=>{u.write(d.toBuffer(),()=>{b()})})})))},_writeToBuffers(d){let u=0,b=d.length;for(;u<b;)u+=this._getWritableBuffer().write(d,u,b-u)},async write(d,u,b){let m;if(u instanceof Function&&(b=u,u="utf8"),b=b||r.nop,d instanceof t)m=new c(d);else if(d instanceof o)m=new i(d);else{if(!(typeof d=="string"||d instanceof String||d instanceof ArrayBuffer))throw new Error("Chunk must be one of type String, Buffer or StringBuf.");m=new n(d,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(b)):(await this._pipe(m),b());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(d,u,b){let m=x=>{x?b(x):(this._flush(),this.pipes.forEach(k=>{k.end()}),this.emit("finish"))};d?this.write(d,u,m):m()},read(d){let u;if(d){for(u=[];d&&this.buffers.length&&!this.buffers[0].eod;){let b=this.buffers[0],m=b.read(d);d-=m.length,u.push(m),b.eod&&b.full&&this.buffers.shift()}return o.concat(u)}return u=this.buffers.map(b=>b.toBuffer()).filter(Boolean),this.buffers=[],o.concat(u)},setEncoding(d){this.encoding=d},pause(){this.paused=!0},resume(){this.paused=!1},isPaused(){return!!this.paused},pipe(d){this.pipes.push(d),!this.paused&&this.buffers.length&&this.end()},unpipe(d){this.pipes=this.pipes.filter(u=>u!==d)},unshift(){throw new Error("Not Implemented")},wrap(){throw new Error("Not Implemented")}}),f.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,f,g){(function(l){(function(){"use strict";f.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,f,g){"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((d,u)=>{let b=t[u];return s.isEqual(d,b)});if(r===null||t===null)return r===t;if(h=Object.keys(r),Object.keys(t).length!==h.length)return!1;for(let d of h)if(!t.hasOwnProperty(d))return!1;return s.every(r,(d,u)=>{let b=t[u];return s.isEqual(d,b)});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,d){n=r[d],i=Array.isArray(h),s.isObject(h)||i?(i?(i=!1,c=n&&Array.isArray(n)?n:[]):c=n&&s.isObject(n)?n:{},r[d]=s.deepMerge(c,h)):s.isUndefined(h)||(r[d]=h)}for(let h=0;h<t;h++)s.each(arguments[h],a);return r}};f.exports=s},{}],27:[function(e,f,g){(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(d=>{Object.defineProperty(n,d,Object.getOwnPropertyDescriptor(i,d))});let h={constructor:{value:n,enumerable:!1,writable:!1,configurable:!0}};a&&Object.keys(a).forEach(d=>{h[d]=Object.getOwnPropertyDescriptor(a,d)}),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,d=c.index;for(;d<n.length;d++){let u=n.charCodeAt(d);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!==d&&(i+=n.substring(h,d)),h=d+1,a&&(i+=a)}return h!==d?i+n.substring(h,d):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"};f.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,f,g){"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 Vg=Object.create;var pd=Object.defineProperty;var Kg=Object.getOwnPropertyDescriptor;var Gg=Object.getOwnPropertyNames;var Yg=Object.getPrototypeOf,Xg=Object.prototype.hasOwnProperty;var Ps=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(f,g)=>(typeof require<"u"?require:f)[g]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var Zg=(e,f)=>()=>(f||e((f={exports:{}}).exports,f),f.exports);var Jg=(e,f,g,l)=>{if(f&&typeof f=="object"||typeof f=="function")for(let o of Gg(f))!Xg.call(e,o)&&o!==g&&pd(e,o,{get:()=>f[o],enumerable:!(l=Kg(f,o))||l.enumerable});return e};var Qg=(e,f,g)=>(g=e!=null?Vg(Yg(e)):{},Jg(f||!e||!e.__esModule?pd(g,"default",{value:e,enumerable:!0}):g,e));var Ug=Zg((Wg,fd)=>{(function(e){typeof Wg=="object"&&typeof fd<"u"?fd.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(f,g,l){function o(t,n){if(!g[t]){if(!f[t]){var c=typeof Ps=="function"&&Ps;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=g[t]={exports:{}};f[t][0].call(a.exports,(function(h){return o(f[t][1][h]||h)}),a,a.exports,e,f,g,l)}return g[t].exports}for(var s=typeof Ps=="function"&&Ps,r=0;r<l.length;r++)o(l[r]);return o})({1:[function(e,f,g){"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!"}};f.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 d=l.createReadStream(a),u=await this.read(d,h);return d.close(),u}read(a,h){return h=h||{},new Promise((d,u)=>{let b=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"],x=h.map||function(B){if(B==="")return null;let R=Number(B);if(!Number.isNaN(R)&&R!==1/0)return R;let j=m.reduce((P,N)=>{if(P)return P;let q=t(B,N,!0);return q.isValid()?q:null},null);if(j)return new Date(j.valueOf());let A=i[B];return A!==void 0?A:B},k=o.parse(h.parserOptions).on("data",B=>{b.addRow(B.map(x))}).on("end",()=>{k.emit("worksheet",b)});k.on("worksheet",d).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((d,u)=>{h=h||{};let b=this.workbook.getWorksheet(h.sheetName||h.sheetId),m=o.format(h.formatterOptions);a.on("finish",()=>{d()}),m.on("error",u),m.pipe(a);let{dateFormat:x,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 x?k?t.utc(A).format(x):t(A).format(x):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,j=1;b&&b.eachRow((A,P)=>{if(R)for(;j++<P-1;)m.write([]);let{values:N}=A;N.shift(),m.write(N.map(B)),j=P}),m.end()})}writeFile(a,h){let d={encoding:(h=h||{}).encoding||"utf8"},u=l.createWriteStream(a,d);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,f,g){"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}}f.exports=o},{"../utils/col-cache":19}],3:[function(e,f,g){"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,d){if(!a||!h)throw new Error("A Cell needs a Row");this._row=a,this._column=h,l.validateAddress(d),this._address=d,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,d){let u=a&&a.numFmt||h&&h.numFmt;u&&(d.numFmt=u);let b=a&&a.font||h&&h.font;b&&(d.font=b);let m=a&&a.alignment||h&&h.alignment;m&&(d.alignment=m);let x=a&&a.border||h&&h.border;x&&(d.border=x);let k=a&&a.fill||h&&h.fill;k&&(d.fill=k);let B=a&&a.protection||h&&h.protection;return B&&(d.protection=B),d}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(d=>{h.addEx(this.fullAddress,d)})}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=d=>{let u=i[d];u&&(a[d]=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 d=this.types[i];if(!d)throw new Error("Could not create Value of type "+i);return new d(a,h)}};f.exports=n},{"../utils/col-cache":19,"../utils/shared-formula":23,"../utils/under-dash":26,"./enums":7,"./note":9}],4:[function(e,f,g){"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(d,u){return d.min-u.min}));h<c.length;){let d=c[h++];for(;a<d.min;)i.push(new r(n,a++));for(;a<=d.max;)i.push(new r(n,a++,d))}return i.length?i:null}}f.exports=r},{"../utils/col-cache":19,"../utils/under-dash":26,"./enums":7}],5:[function(e,f,g){"use strict";f.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,f,g){"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+))?/;f.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 d={sheetName:n.sheetName,address:o.n2l(a)+h,row:h,col:a};i.addCellEx(d)}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,d;function u(m,x){let k=n.findCellAt(i,m,c.col);return!(!k||!k.mark)&&(a[x]=m,k.mark=!1,!0)}for(d=c.row-1;u(d,"top");d--);for(d=c.row+1;u(d,"bottom");d++);function b(m,x){let k=[];for(d=a.top;d<=a.bottom;d++){let B=n.findCellAt(i,d,m);if(!B||!B.mark)return!1;k.push(B)}a[x]=m;for(let B=0;B<k.length;B++)k[B].mark=!1;return!0}for(h=c.col-1;b(h,"left");h--);for(h=c.col+1;b(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,f,g){"use strict";f.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,f,g){"use strict";let l=e("../utils/col-cache"),o=e("./anchor");f.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,f,g){"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"}},f.exports=o},{"../utils/under-dash":26}],10:[function(e,f,g){"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)}}f.exports=o},{"../utils/col-cache":19}],11:[function(e,f,g){"use strict";let l=e("../utils/under-dash"),o=e("./enums"),s=e("../utils/col-cache"),r=e("./cell");f.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 d=a.length-n,u=this._cells.length,b,m,x;if(d<0)for(b=t+a.length;b<=u;b++)x=this._cells[b-1],m=this._cells[b-d-1],m?(x=this.getCell(b),x.value=m.value,x.style=m.style,x._comment=m._comment):x&&(x.value=null,x.style={},x._comment=void 0);else if(d>0)for(b=u;b>=c;b--)m=this._cells[b-1],m?(x=this.getCell(b+d),x.value=m.value,x.style=m.style,x._comment=m._comment):this._cells[b+d-1]=void 0;for(b=0;b<a.length;b++)x=this.getCell(t+b),x.value=a[b],x.style={},x._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,f,g){"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)}}f.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=(d,u,b)=>{d[u]===void 0&&(d[u]=b)};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=(d,u)=>{if(!d)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((d,u)=>{t(d.name,`Column ${u} must have a name`),u===0?r(d,"totalsRowLabel","Total"):(r(d,"totalsRowFunction","none"),d.totalsRowFormula=this.getFormula(d))})}store(){let s=(a,h)=>{h&&Object.keys(h).forEach(d=>{a[d]=h[d]})},{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,d)=>{let{style:u,name:b}=h,m=a.getCell(c+d);m.value=b,s(m,u)})}if(t.rows.forEach(a=>{let h=r.getRow(n+i++);a.forEach((d,u)=>{let b=h.getCell(c+u);b.value=d,s(b,t.columns[u].style)})}),t.totalsRow){let a=r.getRow(n+i++);t.columns.forEach((h,d)=>{let u=a.getCell(c+d);if(d===0)u.value=h.totalsRowLabel;else{let b=this.getFormula(h);u.value=b?{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,d)=>{a.getCell(n+d).value=h})}),r.totalsRow){let i=s.getRow(t+c++);r.columns.forEach((a,h)=>{let d=i.getCell(n+h);h===0?d.value=a.totalsRowLabel:this.getFormula(a)&&(d.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,f,g){"use strict";let l=e("./worksheet"),o=e("./defined-names"),s=e("../xlsx/xlsx"),r=e("../csv/csv");f.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((d,u)=>(u&&u.orderNo)>d?u.orderNo:d,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(d=>d.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,f,g){"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:d}=e("../utils/copy-style");f.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(b=>b&&b.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(b=>{if(b){let m=b.dimensions;m&&u.expand(b.number,m.min,b.number,m.max)}}),u}get columns(){return this._columns}set columns(u){this._headerRowCount=u.reduce((x,k)=>{let B=(k.header?1:k.headers&&k.headers.length)||0;return Math.max(x,B)},0);let b=1,m=this._columns=[];u.forEach(x=>{let k=new t(this,b++,!1);m.push(k),k.defn=x})}getColumnKey(u){return this._keys[u]}setColumnKey(u,b){this._keys[u]=b}deleteColumnKey(u){delete this._keys[u]}eachColumnKey(u){l.each(this._keys,u)}getColumn(u){if(typeof u=="string"){let b=this._keys[u];if(b)return b;u=o.l2n(u)}if(this._columns||(this._columns=[]),u>this._columns.length){let b=this._columns.length+1;for(;b<=u;)this._columns.push(new t(this,b++))}return this._columns[u-1]}spliceColumns(u,b){let m=this._rows.length;for(var x=arguments.length,k=new Array(x>2?x-2:0),B=2;B<x;B++)k[B-2]=arguments[B];if(k.length>0)for(let P=0;P<m;P++){let N=[u,b];k.forEach(z=>{N.push(z[P]||null)});let q=this.getRow(P+1);q.splice.apply(q,N)}else this._rows.forEach(P=>{P&&P.splice(u,b)});let R=k.length-b,j=u+b,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>=j;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,b,k.length)}get lastColumn(){return this.getColumn(this.columnCount)}get columnCount(){let u=0;return this.eachRow(b=>{u=Math.max(u,b.cellCount)}),u}get actualColumnCount(){let u=[],b=0;return this.eachRow(m=>{m.eachCell(x=>{let{col:k}=x;u[k]||(u[k]=!0,b++)})}),b}_commitRow(){}get _lastRowNumber(){let u=this._rows,b=u.length;for(;b>0&&u[b-1]===void 0;)b--;return b}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,b){return this._rows.slice(u-1,u-1+b)}get rowCount(){return this._lastRowNumber}get actualRowCount(){let u=0;return this.eachRow(()=>{u++}),u}getRow(u){let b=this._rows[u-1];return b||(b=this._rows[u-1]=new r(this,u)),b}getRows(u,b){if(b<1)return;let m=[];for(let x=u;x<u+b;x++)m.push(this.getRow(x));return m}addRow(u){let b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n",m=this._nextRow,x=this.getRow(m);return x.values=u,this._setStyleOption(m,b[0]==="i"?b:"n"),x}addRows(u){let b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n",m=[];return u.forEach(x=>{m.push(this.addRow(x,b))}),m}insertRow(u,b){let m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"n";return this.spliceRows(u,0,b),this._setStyleOption(u,m),this.getRow(u)}insertRows(u,b){let m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"n";if(this.spliceRows(u,0,...b),m!=="n")for(let x=0;x<b.length;x++)m[0]==="o"&&this.findRow(b.length+u+x)!==void 0?this._copyStyle(b.length+u+x,u+x,m[1]==="+"):m[0]==="i"&&this.findRow(u-1)!==void 0&&this._copyStyle(u-1,u+x,m[1]==="+");return this.getRows(u,b.length)}_setStyleOption(u){let b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n";b[0]==="o"&&this.findRow(u+1)!==void 0?this._copyStyle(u+1,u,b[1]==="+"):b[0]==="i"&&this.findRow(u-1)!==void 0&&this._copyStyle(u-1,u,b[1]==="+")}_copyStyle(u,b){let m=arguments.length>2&&arguments[2]!==void 0&&arguments[2],x=this.getRow(u),k=this.getRow(b);k.style=d(x.style),x.eachCell({includeEmpty:m},(B,R)=>{k.getCell(R).style=d(B.style)}),k.height=x.height}duplicateRow(u,b){let m=arguments.length>2&&arguments[2]!==void 0&&arguments[2],x=this._rows[u-1],k=new Array(b).fill(x.values);this.spliceRows(u+1,m?0:b,...k);for(let B=0;B<b;B++){let R=this._rows[u+B];R.style=x.style,R.height=x.height,x.eachCell({includeEmpty:!0},(j,A)=>{R.getCell(A).style=j.style})}}spliceRows(u,b){let m=u+b;for(var x=arguments.length,k=new Array(x>2?x-2:0),B=2;B<x;B++)k[B-2]=arguments[B];let R=k.length,j=R-b,A=this._rows.length,P,N;if(j<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+j);q.values=N.values,q.style=N.style,q.height=N.height,N.eachCell({includeEmpty:!0},(z,T)=>{q.getCell(T).style=z.style}),this._rows[P-1]=void 0}else this._rows[P+j-1]=void 0;else if(j>0)for(P=A;P>=m;P--)if(N=this._rows[P-1],N){let q=this.getRow(P+j);q.values=N.values,q.style=N.style,q.height=N.height,N.eachCell({includeEmpty:!0},(z,T)=>{if(q.getCell(T).style=z.style,z._value.constructor.name==="MergeValue"){let S=this.getRow(z._row._number+R).getCell(T),D=z._value._master,p=this.getRow(D._row._number+R).getCell(D._column._number);S.merge(p)}})}else this._rows[P+j-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,b,R)}eachRow(u,b){if(b||(b=u,u=void 0),u&&u.includeEmpty){let m=this._rows.length;for(let x=1;x<=m;x++)b(this.getRow(x),x)}else this._rows.forEach(m=>{m&&m.hasValues&&b(m,m.number)})}getSheetValues(){let u=[];return this._rows.forEach(b=>{b&&(u[b.number]=b.values)}),u}findCell(u,b){let m=o.getAddress(u,b),x=this._rows[m.row-1];return x?x.findCell(m.col):void 0}getCell(u,b){let m=o.getAddress(u,b);return this.getRow(m.row).getCellEx(m)}mergeCells(){for(var u=arguments.length,b=new Array(u),m=0;m<u;m++)b[m]=arguments[m];let x=new s(b);this._mergeCellsInternal(x)}mergeCellsWithoutStyle(){for(var u=arguments.length,b=new Array(u),m=0;m<u;m++)b[m]=arguments[m];let x=new s(b);this._mergeCellsInternal(x,!0)}_mergeCellsInternal(u,b){l.each(this._merges,x=>{if(x.intersects(u))throw new Error("Cannot merge already merged cells")});let m=this.getCell(u.top,u.left);for(let x=u.top;x<=u.bottom;x++)for(let k=u.left;k<=u.right;k++)(x>u.top||k>u.left)&&this.getCell(x,k).merge(m,b);this._merges[m.address]=u}_unMergeMaster(u){let b=this._merges[u.address];if(b){for(let m=b.top;m<=b.bottom;m++)for(let x=b.left;x<=b.right;x++)this.getCell(m,x).unmerge();delete this._merges[u.address]}}get hasMerges(){return l.some(this._merges,Boolean)}unMergeCells(){for(var u=arguments.length,b=new Array(u),m=0;m<u;m++)b[m]=arguments[m];let x=new s(b);for(let k=x.top;k<=x.bottom;k++)for(let B=x.left;B<=x.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,b,m){let x=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"shared",k=o.decode(u),{top:B,left:R,bottom:j,right:A}=k,P=A-R+1,N=o.encodeAddress(B,R),q=x==="shared",z;z=typeof m=="function"?m:Array.isArray(m)?Array.isArray(m[0])?(S,D)=>m[S-B][D-R]:(S,D)=>m[(S-B)*P+(D-R)]:()=>{};let T=!0;for(let S=B;S<=j;S++)for(let D=R;D<=A;D++)T?(this.getCell(S,D).value={shareType:x,formula:b,ref:u,result:z(S,D)},T=!1):this.getCell(S,D).value=q?{sharedFormula:N,result:z(S,D)}:z(S,D)}addImage(u,b){let m={type:"image",imageId:u,range:b};this._media.push(new c(this,m))}getImages(){return this._media.filter(u=>u.type==="image")}addBackgroundImage(u){let b={type:"background",imageId:u};this._media.push(new c(this,b))}getBackgroundImageId(){let u=this._media.find(b=>b.type==="background");return u&&u.imageId}protect(u,b){return new Promise(m=>{this.sheetProtection={sheet:!0},b&&"spinCount"in b&&(b.spinCount=Number.isFinite(b.spinCount)?Math.round(Math.max(0,b.spinCount)):1e5),u&&(this.sheetProtection.algorithmName="SHA-512",this.sheetProtection.saltValue=h.randomBytes(16).toString("base64"),this.sheetProtection.spinCount=b&&"spinCount"in b?b.spinCount:1e5,this.sheetProtection.hashValue=h.convertPasswordToHash(u,"SHA512",this.sheetProtection.saltValue,this.sheetProtection.spinCount)),b&&(this.sheetProtection=Object.assign(this.sheetProtection,b),!u&&"spinCount"in b&&delete this.sheetProtection.spinCount),m()})}unprotect(){this.sheetProtection=null}addTable(u){let b=new i(this,u);return this.tables[u.name]=b,b}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(x=>x.model),sheetProtection:this.sheetProtection,tables:Object.values(this.tables).map(x=>x.model),conditionalFormattings:this.conditionalFormattings};u.cols=t.toModel(this.columns);let b=u.rows=[],m=u.dimensions=new s;return this._rows.forEach(x=>{let k=x&&x.model;k&&(m.expand(k.number,k.min,k.number,k.max),b.push(k))}),u.merges=[],l.each(this._merges,x=>{u.merges.push(x.range)}),u}_parseRows(u){this._rows=[],u.rows.forEach(b=>{let m=new r(this,b.number);this._rows[m.number-1]=m,m.model=b})}_parseMergeCells(u){l.each(u.mergeCells,b=>{this.mergeCellsWithoutStyle(b)})}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(b=>new c(this,b)),this.sheetProtection=u.sheetProtection,this.tables=u.tables.reduce((b,m)=>{let x=new i;return x.model=m,b[m.name]=x,b},{}),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,f,g){"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]}),f.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,f,g){"use strict";let l=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");g.bufferToString=function(o){return typeof o=="string"?o:l?l.decode(o):o.toString()}},{}],17:[function(e,f,g){"use strict";let l=typeof TextEncoder>"u"?null:new TextEncoder("utf-8"),{Buffer:o}=e("buffer");g.stringToBuffer=function(s){return typeof s!="string"?s:l?o.from(l.encode(s).buffer):o.from(s)}},{buffer:220}],18:[function(e,f,g){"use strict";let l=e("./under-dash"),o=e("./col-cache");f.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,f,g){"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,b=0;b<s.length;b++)if(u=s.charCodeAt(b),!i&&u>=65&&u<=90)t=!0,n+=s[b],c=26*c+u-64;else if(u>=48&&u<=57)i=!0,a+=s[b],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 d={address:s=n+a,col:c,row:h,$col$row:`$${n}$${a}`};return c<=100&&h<=100&&(this._hash[s]=d,this._hash[d.$col$row]=d),d},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]),d=Math.min(a.row,h.row),u=Math.min(a.col,h.col),b=Math.max(a.row,h.row),m=Math.max(a.col,h.col);return a=this.n2l(u)+d,h=this.n2l(m)+b,{top:d,left:u,bottom:b,right:m,sheetName:t,tl:{address:a,col:u,row:d,$col$row:`$${this.n2l(u)}$${d}`,sheetName:t},br:{address:h,col:m,row:b,$col$row:`$${this.n2l(m)}$${b}`,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}};f.exports=o},{}],20:[function(e,f,g){"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))};g.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,f,g){(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 d=l.alloc(4);d.writeUInt32LE(h,0),a=this.hash(t,a,d)}return a.toString("base64")},randomBytes:r=>o.randomBytes(r)};f.exports=s}).call(this)}).call(this,e("buffer").Buffer)},{buffer:220,crypto:390}],22:[function(e,f,g){"use strict";let{SaxesParser:l}=e("saxes"),{PassThrough:o}=e("readable-stream"),{bufferToString:s}=e("./browser-buffer-decode");f.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,f,g){"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;f.exports={slideFormula:function(r,t,n){let c=l.decode(t),i=l.decode(n);return r.replace(o,(a,h,d,u,b)=>{if(b)return a;let m=s.exec(u);if(m){let x=m[1],k=m[2].toUpperCase(),B=m[3],R=m[4];if(k.length>3||k.length===3&&k>"XFD")return a;let j=l.l2n(k),A=parseInt(R,10);return x||(j+=i.col-c.col),B||(A+=i.row-c.row),(h||"")+(x||"")+l.n2l(j)+(B||"")+A}return a})}}},{"./col-cache":19}],24:[function(e,f,g){(function(l,o){(function(){"use strict";let s=e("readable-stream"),r=e("./utils"),t=e("./string-buf");class n{constructor(u,b){this._data=u,this._encoding=b}get length(){return this.toBuffer().length}copy(u,b,m,x){return this.toBuffer().copy(u,b,m,x)}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,b,m,x){return this._data._buf.copy(u,b,m,x)}toBuffer(){return this._data.toBuffer()}}class i{constructor(u){this._data=u}get length(){return this._data.length}copy(u,b,m,x){this._data.copy(u,b,m,x)}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 b;return u===0?null:u===void 0||u>=this.length?(b=this.toBuffer(),this.iRead=this.iWrite,b):(b=o.alloc(u),this.buffer.copy(b,0,this.iRead,u),this.iRead+=u,b)}write(u,b,m){let x=Math.min(m,this.size-this.iWrite);return u.copy(this.buffer,this.iWrite,b,b+x),this.iWrite+=x,x}}let h=function(d){d=d||{},this.bufSize=d.bufSize||1048576,this.buffers=[],this.batch=d.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(d=>d.toBuffer()))}},_getWritableBuffer(){if(this.buffers.length){let u=this.buffers[this.buffers.length-1];if(!u.full)return u}let d=new a(this.bufSize);return this.buffers.push(d),d},async _pipe(d){await Promise.all(this.pipes.map((function(u){return new Promise(b=>{u.write(d.toBuffer(),()=>{b()})})})))},_writeToBuffers(d){let u=0,b=d.length;for(;u<b;)u+=this._getWritableBuffer().write(d,u,b-u)},async write(d,u,b){let m;if(u instanceof Function&&(b=u,u="utf8"),b=b||r.nop,d instanceof t)m=new c(d);else if(d instanceof o)m=new i(d);else{if(!(typeof d=="string"||d instanceof String||d instanceof ArrayBuffer))throw new Error("Chunk must be one of type String, Buffer or StringBuf.");m=new n(d,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(b)):(await this._pipe(m),b());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(d,u,b){let m=x=>{x?b(x):(this._flush(),this.pipes.forEach(k=>{k.end()}),this.emit("finish"))};d?this.write(d,u,m):m()},read(d){let u;if(d){for(u=[];d&&this.buffers.length&&!this.buffers[0].eod;){let b=this.buffers[0],m=b.read(d);d-=m.length,u.push(m),b.eod&&b.full&&this.buffers.shift()}return o.concat(u)}return u=this.buffers.map(b=>b.toBuffer()).filter(Boolean),this.buffers=[],o.concat(u)},setEncoding(d){this.encoding=d},pause(){this.paused=!0},resume(){this.paused=!1},isPaused(){return!!this.paused},pipe(d){this.pipes.push(d),!this.paused&&this.buffers.length&&this.end()},unpipe(d){this.pipes=this.pipes.filter(u=>u!==d)},unshift(){throw new Error("Not Implemented")},wrap(){throw new Error("Not Implemented")}}),f.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,f,g){(function(l){(function(){"use strict";f.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,f,g){"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((d,u)=>{let b=t[u];return s.isEqual(d,b)});if(r===null||t===null)return r===t;if(h=Object.keys(r),Object.keys(t).length!==h.length)return!1;for(let d of h)if(!t.hasOwnProperty(d))return!1;return s.every(r,(d,u)=>{let b=t[u];return s.isEqual(d,b)});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,d){n=r[d],i=Array.isArray(h),s.isObject(h)||i?(i?(i=!1,c=n&&Array.isArray(n)?n:[]):c=n&&s.isObject(n)?n:{},r[d]=s.deepMerge(c,h)):s.isUndefined(h)||(r[d]=h)}for(let h=0;h<t;h++)s.each(arguments[h],a);return r}};f.exports=s},{}],27:[function(e,f,g){(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(d=>{Object.defineProperty(n,d,Object.getOwnPropertyDescriptor(i,d))});let h={constructor:{value:n,enumerable:!1,writable:!1,configurable:!0}};a&&Object.keys(a).forEach(d=>{h[d]=Object.getOwnPropertyDescriptor(a,d)}),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,d=c.index;for(;d<n.length;d++){let u=n.charCodeAt(d);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!==d&&(i+=n.substring(h,d)),h=d+1,a&&(i+=a)}return h!==d?i+n.substring(h,d):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"};f.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,f,g){"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"},f.exports=t},{"./under-dash":26,"./utils":27}],29:[function(e,f,g){(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)}}f.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,f,g){"use strict";f.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,f,g){"use strict";f.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,f,g){"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)}}f.exports=s},{"../../utils/parse-sax":22,"../../utils/xml-stream":28}],33:[function(e,f,g){"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 d=h%2==0;!c&&d&&s(a)?n.push(a):c&&!d?(c=!1,s(i+a)&&n.push(i+a),i=""):(c=!0,i+=a+",")}),n}f.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,f,g){"use strict";let l=e("../../../utils/utils"),o=e("../base-xform");f.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,f,g){"use strict";let l=e("../base-xform");f.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,f,g){"use strict";let l=e("../base-xform");f.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,f,g){"use strict";let l=e("../base-xform");f.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,f,g){"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"),d=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 d}}prepare(m){m.sheets=m.worksheets;let x=[],k=0;m.sheets.forEach(B=>{if(B.pageSetup&&B.pageSetup.printArea&&B.pageSetup.printArea.split("&&").forEach(R=>{let j=R.split(":"),A={name:"_xlnm.Print_Area",ranges:[`'${B.name}'!$${j[0]}:$${j[1]}`],localSheetId:k};x.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 j={name:"_xlnm.Print_Titles",ranges:R,localSheetId:k};x.push(j)}k++}),x.length&&(m.definedNames=m.definedNames.concat(x)),(m.media||[]).forEach((B,R)=>{B.name=B.type+(R+1)})}render(m,x){m.openXml(s.StdDocAttributes),m.openNode("workbook",u.WORKBOOK_ATTRIBUTES),this.map.fileVersion.render(m),this.map.workbookPr.render(m,x.properties),this.map.bookViews.render(m,x.views),this.map.sheets.render(m,x.sheets),this.map.definedNames.render(m,x.definedNames),this.map.calcPr.render(m,x.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 x=(m.workbookRels||[]).reduce((A,P)=>(A[P.Id]=P,A),{}),k=[],B,R=0;(m.sheets||[]).forEach(A=>{let P=x[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 j=[];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+/,z=P.match(q);if(z&&z.length){let D=z[0];B.pageSetup.printTitlesRow=D.replace(N,"")}let T=/\$[A-Z]+:\$[A-Z]+/,S=P.match(T);if(S&&S.length){let D=S[0];B.pageSetup.printTitlesColumn=D.replace(N,"")}}}else j.push(A)}),m.definedNames=j,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}})},f.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,f,g){"use strict";let l=e("../strings/rich-text-xform"),o=e("../../../utils/utils"),s=e("../base-xform"),r=f.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,f,g){"use strict";let l=e("../../../utils/xml-stream"),o=e("../../../utils/utils"),s=e("../base-xform"),r=e("./comment-xform"),t=f.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,f,g){"use strict";let l=e("../../base-xform");f.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,f,g){"use strict";let l=e("../../base-xform");f.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,f,g){"use strict";let l=e("../base-xform");f.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,f,g){"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"];f.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,f,g){"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"},f.exports=r},{"../../../utils/xml-stream":28,"../base-xform":32,"./vml-shape-xform":46}],46:[function(e,f,g){"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}),f.exports=r},{"../base-xform":32,"./vml-client-data-xform":44,"./vml-textbox-xform":47}],47:[function(e,f,g){"use strict";let l=e("../base-xform");f.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,f,g){"use strict";let l=e("./base-xform");f.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,f,g){"use strict";let l=e("../base-xform");f.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,f,g){"use strict";let l=e("../base-xform");f.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,f,g){"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"},f.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,f,g){"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"},f.exports=s},{"../../../utils/xml-stream":28,"../base-xform":32}],53:[function(e,f,g){"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"},f.exports=n},{"../../../utils/xml-stream":28,"../base-xform":32,"../simple/date-xform":117,"../simple/integer-xform":118,"../simple/string-xform":119}],54:[function(e,f,g){"use strict";let l=e("../base-xform");f.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,f,g){"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"},f.exports=r},{"../../../utils/xml-stream":28,"../base-xform":32,"./relationship-xform":54}],56:[function(e,f,g){"use strict";let l=e("../base-xform");f.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,f,g){"use strict";let l=e("../base-xform"),o=e("./blip-xform");f.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,f,g){"use strict";let l=e("../base-xform");f.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,f,g){"use strict";let l=e("../base-xform");f.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,f,g){"use strict";let l=e("../base-xform"),o=e("./hlink-click-xform"),s=e("./ext-lst-xform");f.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,f,g){"use strict";let l=e("../base-xform"),o=e("../simple/integer-xform");f.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,f,g){"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(d){return(typeof d.range=="string"?l.decode(d.range):d.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"},f.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,f,g){"use strict";let l=e("../base-xform");f.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,f,g){"use strict";let l=e("../base-xform");f.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,f,g){"use strict";let l=e("../base-xform");f.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,f,g){"use strict";let l=e("../base-xform"),o=e("./c-nv-pr-xform"),s=e("./c-nv-pic-pr-xform");f.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,f,g){"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");f.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,f,g){"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");f.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,f,g){"use strict";f.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,f,g){"use strict";let l=e("./base-cell-anchor-xform"),o=e("../static-xform"),s=e("./cell-position-xform"),r=e("./pic-xform");f.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,f,g){"use strict";let l=e("./base-xform");f.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,f,g){"use strict";let l=e("../../../utils/col-cache"),o=e("../base-xform");f.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,f,g){"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")}f.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 d=i.commentsMap&&i.commentsMap[c.address];d&&(c.comment=d)}}},{"../../../doc/enums":7,"../../../doc/range":10,"../../../utils/utils":27,"../base-xform":32,"../strings/rich-text-xform":122}],74:[function(e,f,g){"use strict";let l=e("../../base-xform");f.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,f,g){"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)}}f.exports=c},{"../../base-xform":32,"../../composite-xform":48,"./databar-ext-xform":79,"./icon-set-ext-xform":81,uuid:528}],76:[function(e,f,g){"use strict";let l=e("../../composite-xform"),o=e("./f-ext-xform");f.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,f,g){"use strict";let l=e("../../composite-xform"),o=e("./sqref-ext-xform"),s=e("./cf-rule-ext-xform");f.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,f,g){"use strict";let l=e("../../composite-xform"),o=e("./cf-rule-ext-xform"),s=e("./conditional-formatting-ext-xform");f.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,f,g){"use strict";let l=e("../../base-xform"),o=e("../../composite-xform"),s=e("../../style/color-xform"),r=e("./cfvo-ext-xform");f.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,f,g){"use strict";let l=e("../../base-xform");f.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,f,g){"use strict";let l=e("../../base-xform"),o=e("../../composite-xform"),s=e("./cfvo-ext-xform"),r=e("./cf-icon-ext-xform");f.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,f,g){"use strict";let l=e("../../base-xform");f.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,f,g){"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:b,operator:m}=u;switch(b){case"containsText":case"containsBlanks":case"notContainsBlanks":case"containsErrors":case"notContainsErrors":return{type:"containsText",operator:b};default:return{type:b,operator:m}}};class d 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(b){return b.type!=="iconSet"||!b.custom&&!a[b.iconSet]}render(b,m){switch(m.type){case"expression":this.renderExpression(b,m);break;case"cellIs":this.renderCellIs(b,m);break;case"top10":this.renderTop10(b,m);break;case"aboveAverage":this.renderAboveAverage(b,m);break;case"dataBar":this.renderDataBar(b,m);break;case"colorScale":this.renderColorScale(b,m);break;case"iconSet":this.renderIconSet(b,m);break;case"containsText":this.renderText(b,m);break;case"timePeriod":this.renderTimePeriod(b,m)}}renderExpression(b,m){b.openNode(this.tag,{type:"expression",dxfId:m.dxfId,priority:m.priority}),this.formulaXform.render(b,m.formulae[0]),b.closeNode()}renderCellIs(b,m){b.openNode(this.tag,{type:"cellIs",dxfId:m.dxfId,priority:m.priority,operator:m.operator}),m.formulae.forEach(x=>{this.formulaXform.render(b,x)}),b.closeNode()}renderTop10(b,m){b.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(b,m){b.leafNode(this.tag,{type:"aboveAverage",dxfId:m.dxfId,priority:m.priority,aboveAverage:l.toBoolAttribute(m.aboveAverage,!0)})}renderDataBar(b,m){b.openNode(this.tag,{type:"dataBar",priority:m.priority}),this.databarXform.render(b,m),this.extLstRefXform.render(b,m),b.closeNode()}renderColorScale(b,m){b.openNode(this.tag,{type:"colorScale",priority:m.priority}),this.colorScaleXform.render(b,m),b.closeNode()}renderIconSet(b,m){d.isPrimitive(m)&&(b.openNode(this.tag,{type:"iconSet",priority:m.priority}),this.iconSetXform.render(b,m),b.closeNode())}renderText(b,m){b.openNode(this.tag,{type:m.operator,dxfId:m.dxfId,priority:m.priority,operator:l.toStringAttribute(m.operator,"containsText")});let x=(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);x&&this.formulaXform.render(b,x),b.closeNode()}renderTimePeriod(b,m){b.openNode(this.tag,{type:"timePeriod",dxfId:m.dxfId,priority:m.priority,timePeriod:m.timePeriod});let x=(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);x&&this.formulaXform.render(b,x),b.closeNode()}createNewModel(b){let{attributes:m}=b;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(b,m){switch(b){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)}}}f.exports=d},{"../../../../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,f,g){"use strict";let l=e("../../base-xform");f.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,f,g){"use strict";let l=e("../../composite-xform"),o=e("../../style/color-xform"),s=e("./cfvo-xform");f.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,f,g){"use strict";let l=e("../../composite-xform"),o=e("./cf-rule-xform");f.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,f,g){"use strict";let l=e("../../base-xform"),o=e("./conditional-formatting-xform");f.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,f,g){"use strict";let l=e("../../composite-xform"),o=e("../../style/color-xform"),s=e("./cfvo-xform");f.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,f,g){"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}}f.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,f,g){"use strict";let l=e("../../base-xform");f.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,f,g){"use strict";let l=e("../../base-xform"),o=e("../../composite-xform"),s=e("./cfvo-xform");f.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,f,g){"use strict";let l=e("../../../utils/utils"),o=e("../base-xform");f.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,f,g){"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,d){let u=a[h];u!==void 0?i[h]=u:d!==void 0&&(i[h]=d)}function c(i,a,h,d){let u=a[h];u!==void 0?i[h]=o.parseBoolean(u):d!==void 0&&(i[h]=d)}f.exports=class extends r{get tag(){return"dataValidations"}render(i,a){let h=(function(d){let u=l.map(d,(x,k)=>({address:k,dataValidation:x,marked:!1})).sort((x,k)=>l.strcmp(x.address,k.address)),b=l.keyBy(u,"address"),m=(x,k,B)=>{for(let R=0;R<k;R++){let j=s.encodeAddress(x.row+R,B);if(!d[j]||!l.isEqual(d[x.address],d[j]))return!1}return!0};return u.map(x=>{if(!x.marked){let k=s.decodeEx(x.address);if(k.dimensions)return b[k.dimensions].marked=!0,{...x.dataValidation,sqref:x.address};let B=1,R=s.encodeAddress(k.row+B,k.col);for(;d[R]&&l.isEqual(x.dataValidation,d[R]);)B++,R=s.encodeAddress(k.row+B,k.col);let j=1;for(;m(k,B,k.col+j);)j++;for(let A=0;A<B;A++)for(let P=0;P<j;P++)R=s.encodeAddress(k.row+A,k.col+P),b[R].marked=!0;if(B>1||j>1){let A=k.row+(B-1),P=k.col+(j-1);return{...x.dataValidation,sqref:`${x.address}:${s.encodeAddress(A,P)}`}}return{...x.dataValidation,sqref:x.address}}return null}).filter(Boolean)})(a);h.length&&(i.openNode("dataValidations",{count:h.length}),h.forEach(d=>{i.openNode("dataValidation"),d.type!=="any"&&(i.addAttribute("type",d.type),d.operator&&d.type!=="list"&&d.operator!=="between"&&i.addAttribute("operator",d.operator),d.allowBlank&&i.addAttribute("allowBlank","1")),d.showInputMessage&&i.addAttribute("showInputMessage","1"),d.promptTitle&&i.addAttribute("promptTitle",d.promptTitle),d.prompt&&i.addAttribute("prompt",d.prompt),d.showErrorMessage&&i.addAttribute("showErrorMessage","1"),d.errorStyle&&i.addAttribute("errorStyle",d.errorStyle),d.errorTitle&&i.addAttribute("errorTitle",d.errorTitle),d.error&&i.addAttribute("error",d.error),i.addAttribute("sqref",d.sqref),(d.formulae||[]).forEach((u,b)=>{i.openNode("formula"+(b+1)),d.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,f,g){"use strict";let l=e("../base-xform");f.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,f,g){"use strict";let l=e("../base-xform");f.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,f,g){"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}}f.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,f,g){"use strict";let l=e("../base-xform");f.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,f,g){"use strict";let l=e("../base-xform");f.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,f,g){"use strict";let l=e("../base-xform");f.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,f,g){"use strict";let l=e("../../../utils/under-dash"),o=e("../../../doc/range"),s=e("../../../utils/col-cache"),r=e("../../../doc/enums");f.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 d=i.left;d<=i.right;d++){let u=h.cells[d-1];u?u.type===r.ValueType.Merge&&(u.master=i.tl):h.cells[d]={type:r.ValueType.Null,address:s.encodeAddress(a,d)}}}})}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,f,g){"use strict";let l=e("../base-xform"),o=s=>s!==void 0;f.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,f,g){"use strict";let l=e("../base-xform");f.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,f,g){"use strict";let l=e("../../../utils/under-dash"),o=e("../base-xform");f.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,f,g){"use strict";let l=e("../base-xform");f.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,f,g){"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}}f.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,f,g){"use strict";let l=e("../base-xform");f.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,f,g){"use strict";let l=e("../../../utils/under-dash"),o=e("../base-xform");function s(r){return r?"1":void 0}f.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,f,g){"use strict";let l=e("./page-breaks-xform"),o=e("../list-xform");f.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,f,g){"use strict";let l=e("../base-xform"),o=e("../../../utils/utils"),s=e("./cell-xform");f.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,f,g){"use strict";let l=e("../../../utils/under-dash"),o=e("../base-xform");f.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,f,g){"use strict";let l=e("../base-xform"),o=e("../style/color-xform"),s=e("./page-setup-properties-xform"),r=e("./outline-properties-xform");f.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,f,g){"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}f.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,f,g){"use strict";let l=e("../../../utils/col-cache"),o=e("../base-xform"),s={frozen:"frozen",frozenSplit:"frozen",split:"split"};f.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(d,u,b){b&&r.addAttribute(d,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,f,g){"use strict";let l=e("../base-xform");f.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,f,g){"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"),d=e("./hyperlink-xform"),u=e("./merge-cell-xform"),b=e("./data-validations-xform"),m=e("./sheet-properties-xform"),x=e("./sheet-format-properties-xform"),k=e("./sheet-view-xform"),B=e("./sheet-protection-xform"),R=e("./page-margins-xform"),j=e("./page-setup-xform"),A=e("./print-options-xform"),P=e("./auto-filter-xform"),N=e("./picture-xform"),q=e("./drawing-xform"),z=e("./table-part-xform"),T=e("./row-breaks-xform"),S=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(F=>{C[F.ref]=F,F.rules.forEach($=>{let{x14Id:K}=$;K&&(O[K]=$)})}),_.forEach(F=>{F.rules.forEach($=>{let K=O[$.x14Id];K?((M,H)=>{Object.keys(H).forEach(E=>{let I=M[E],L=H[E];I===void 0&&L!==void 0&&(M[E]=L)})})(K,$):C[F.ref]?C[F.ref].rules.push($):w.push({ref:F.ref,rules:[$]})})}),w};class v extends n{constructor(_){super();let{maxRows:C,maxCols:O,ignoreNodes:F}=_||{};this.ignoreNodes=F||[],this.map={sheetPr:new m,dimension:new h,sheetViews:new c({tag:"sheetViews",count:!1,childXform:new k}),sheetFormatPr:new x,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 T,hyperlinks:new c({tag:"hyperlinks",count:!1,childXform:new d}),pageMargins:new R,dataValidations:new b,pageSetup:new j,headerFooter:new S,printOptions:new A,picture:new N,drawing:new q,sheetProtection:new B,tableParts:new c({tag:"tableParts",count:!0,childXform:new z}),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 F(M){return"rId"+(M.length+1)}if(_.hyperlinks.forEach(M=>{let H=F(O);M.rId=H,O.push({Id:H,Type:r.Hyperlink,Target:M.target,TargetMode:"External"})}),_.comments.length>0){let M={Id:F(O),Type:r.Comments,Target:`../comments${_.id}.xml`};O.push(M);let H={Id:F(O),Type:r.VmlDrawing,Target:`../drawings/vmlDrawing${_.id}.vml`};O.push(H),_.comments.forEach(E=>{E.refAddress=o.decodeAddress(E.ref)}),C.commentRefs.push({commentName:"comments"+_.id,vmlDrawing:"vmlDrawing"+_.id})}let $=[],K;_.media.forEach(M=>{if(M.type==="background"){let H=F(O);K=C.media[M.imageId],O.push({Id:H,Type:r.Image,Target:`../media/${K.name}.${K.extension}`}),_.background={rId:H},_.image=C.media[M.imageId]}else if(M.type==="image"){let{drawing:H}=_;K=C.media[M.imageId],H||(H=_.drawing={rId:F(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 E=this.preImageId===M.imageId?$[M.imageId]:$[H.rels.length];E||(E=F(H.rels),$[H.rels.length]=E,H.rels.push({Id:E,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",Target:`../media/${K.name}.${K.extension}`}));let I={picture:{rId:E},range:M.range};if(M.hyperlinks&&M.hyperlinks.hyperlink){let L=F(H.rels);$[H.rels.length]=L,I.picture.hyperlinks={tooltip:M.hyperlinks.tooltip,rId:L},H.rels.push({Id:L,Type:r.Hyperlink,Target:M.hyperlinks.hyperlink,TargetMode:"External"})}this.preImageId=M.imageId,H.anchors.push(I)}}),_.tables.forEach(M=>{let H=F(O);M.rId=H,O.push({Id:H,Type:r.Table,Target:"../tables/"+M.target}),M.columns.forEach(E=>{let{style:I}=E;I&&(E.dxfId=C.styles.addDxfStyle(I))})}),this.map.extLst.prepare(_,C)}render(_,C){_.openXml(s.StdDocAttributes),_.openNode("worksheet",v.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 F={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,K={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(_,F),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(_,K),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},F=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:F,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(($,K)=>{if($[K.Id]=K,K.Type===r.Comments&&(_.comments=C.comments[K.Target].comments),K.Type===r.VmlDrawing&&_.comments&&_.comments.length){let M=C.vmlDrawings[K.Target].comments;_.comments.forEach((H,E)=>{H.note=Object.assign({},H.note,M[E])})}return $},{});if(C.commentsMap=(_.comments||[]).reduce(($,K)=>(K.ref&&($[K.ref]=K),$),{}),C.hyperlinkMap=(_.hyperlinks||[]).reduce(($,K)=>(K.rId&&($[K.address]=O[K.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 K=$[1];C.drawings[K].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 F=_.background&&O[_.background.rId];if(F){let $=F.Target.split("/media/")[1],K=C.mediaIndex&&C.mediaIndex[$];K!==void 0&&_.media.push({type:"background",imageId:K})}_.tables=(_.tables||[]).map($=>{let K=O[$.rId];return C.tables[K.Target]}),delete _.relationships,delete _.hyperlinks,delete _.comments}}v.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"},f.exports=v},{"../../../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,f,g){"use strict";let l=e("../base-xform");f.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,f,g){"use strict";let l=e("../base-xform");f.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,f,g){"use strict";let l=e("../base-xform");f.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,f,g){"use strict";let l=e("../base-xform");f.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,f,g){"use strict";let l=e("./base-xform"),o=e("../../utils/xml-stream");f.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,f,g){"use strict";let l=e("./text-xform"),o=e("./rich-text-xform"),s=e("../base-xform");f.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,f,g){"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"},f.exports=r},{"../base-xform":32,"../style/font-xform":131,"./text-xform":125}],123:[function(e,f,g){"use strict";let l=e("./text-xform"),o=e("./rich-text-xform"),s=e("./phonetic-text-xform"),r=e("../base-xform");f.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,f,g){"use strict";let l=e("../../../utils/xml-stream"),o=e("../base-xform"),s=e("./shared-string-xform");f.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,f,g){"use strict";let l=e("../base-xform");f.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,f,g){"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}}};f.exports=class extends s{get tag(){return"alignment"}render(n,c){n.addRollback(),n.openNode("alignment");let i=!1;function a(h,d){d&&(n.addAttribute(h,d),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,d,u){h&&(c[d]=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,f,g){"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),{}),f.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,f,g){"use strict";let l=e("../base-xform");f.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,f,g){"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");f.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,f,g){"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(d=>{h.render(i,d)}),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,f.exports=n},{"../base-xform":32,"./color-xform":128}],131:[function(e,f,g){"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,d){let{map:u}=this;h.openNode(this.options.tagName),n.each(this.map,(b,m)=>{u[m].xform.render(h,d[b.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 d=this.map[h];return this.parser.model&&(this.model[d.prop]=this.parser.model),this.parser=void 0,!0}return h!==this.options.tagName}}i.OPTIONS={tagName:"font",fontNameTag:"name"},f.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,f,g){"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},f.exports=t},{"../../../utils/under-dash":26,"../../defaultnumformats":30,"../base-xform":32}],133:[function(e,f,g){"use strict";let l=e("../base-xform"),o={boolean:(s,r)=>s===void 0?r:s};f.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,f,g){"use strict";let l=e("../base-xform"),o=e("./alignment-xform"),s=e("./protection-xform");f.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,f,g){"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"),d=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 d}),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,x){x=x||this.model,m.openXml(o.StdDocAttributes),m.openNode("styleSheet",u.STYLESHEET_ATTRIBUTES),this.index?(x.numFmts&&x.numFmts.length&&(m.openNode("numFmts",{count:x.numFmts.length}),x.numFmts.forEach(k=>{m.writeXml(k)}),m.closeNode()),x.fonts.length||this._addFont({size:11,color:{theme:1},name:"Calibri",family:2,scheme:"minor"}),m.openNode("fonts",{count:x.fonts.length,"x14ac:knownFonts":1}),x.fonts.forEach(k=>{m.writeXml(k)}),m.closeNode(),m.openNode("fills",{count:x.fills.length}),x.fills.forEach(k=>{m.writeXml(k)}),m.closeNode(),m.openNode("borders",{count:x.borders.length}),x.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:x.styles.length}),x.styles.forEach(k=>{m.writeXml(k)}),m.closeNode()):(this.map.numFmts.render(m,x.numFmts),this.map.fonts.render(m,x.fonts),this.map.fills.render(m,x.fills),this.map.borders.render(m,x.borders),this.map.cellStyleXfs.render(m,[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}]),this.map.cellXfs.render(m,x.styles)),u.STATIC_XFORMS.cellStyles.render(m),this.map.dxfs.render(m,x.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 x=(k,B)=>{B.model&&B.model.length&&(this.model[k]=B.model)};if(x("numFmts",this.map.numFmts),x("fonts",this.map.fonts),x("fills",this.map.fills),x("borders",this.map.borders),x("styles",this.map.cellXfs),x("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,x){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(x=x||l.ValueType.Number,m.numFmt)k.numFmtId=this._addNumFmtStr(m.numFmt);else switch(x){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 x=this.model.styles[m];if(!x)return null;let k=this.index.model[m];if(k)return k;if(k=this.index.model[m]={},x.numFmtId){let R=this.index.numFmt[x.numFmtId]||a.getDefaultFmtCode(x.numFmtId);R&&(k.numFmt=R)}function B(R,j,A){if(A||A===0){let P=j[A];P&&(k[R]=P)}}return B("font",this.model.fonts,x.fontId),B("border",this.model.borders,x.borderId),B("fill",this.model.fills,x.fillId),x.alignment&&(k.alignment=x.alignment),x.protection&&(k.protection=x.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 x=this.map.style.toXml(m),k=this.index.style[x];return k===void 0&&(k=this.index.style[x]=this.model.styles.length,this.model.styles.push(x)),k}_addNumFmtStr(m){let x=a.getDefaultFmtId(m);if(x!==void 0||(x=this.index.numFmt[m],x!==void 0))return x;x=this.index.numFmt[m]=164+this.model.numFmts.length;let k=this.map.numFmt.toXml({id:x,formatCode:m});return this.model.numFmts.push(k),x}_addFont(m){let x=this.map.font.toXml(m),k=this.index.font[x];return k===void 0&&(k=this.index.font[x]=this.model.fonts.length,this.model.fonts.push(x)),k}_addBorder(m){let x=this.map.border.toXml(m),k=this.index.border[x];return k===void 0&&(k=this.index.border[x]=this.model.borders.length,this.model.borders.push(x)),k}_addFill(m){let x=this.map.fill.toXml(m),k=this.index.fill[x];return k===void 0&&(k=this.index.fill[x]=this.model.fills.length,this.model.fills.push(x)),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(b){return b.autodrain(),Promise.resolve()}addStyleModel(b,m){return m===l.ValueType.Date?this.dateStyleId:0}get dateStyleId(){if(!this._dateStyleId){let b={numFmtId:a.getDefaultFmtId("mm-dd-yy")};this._dateStyleId=this.model.styles.length,this.model.styles.push(b)}return this._dateStyleId}getStyleModel(){return{}}},f.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,f,g){"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"}},f.exports=o},{"../base-xform":32}],137:[function(e,f,g){"use strict";let l=e("../base-xform"),o=e("./filter-column-xform");f.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,f,g){"use strict";let l=e("../base-xform");f.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,f,g){"use strict";let l=e("../base-xform"),o=e("../list-xform"),s=e("./custom-filter-xform"),r=e("./filter-xform");f.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,f,g){"use strict";let l=e("../base-xform");f.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,f,g){"use strict";let l=e("../base-xform");f.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,f,g){"use strict";let l=e("../base-xform");f.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,f,g){"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:d}=a;return h===this.tag?(this.reset(),this.model={name:d.name,displayName:d.displayName||d.name,tableRef:d.ref,totalsRow:d.totalsRowCount==="1",headerRow:d.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,d)=>{this.model.columns[d].filterButton=h.filterButton})),this.model.style=this.map.tableStyleInfo.model,!1):!0}reconcile(a,h){a.columns.forEach(d=>{d.dxfId!==void 0&&(d.style=h.styles.getDxfStyle(d.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"},f.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,f,g){(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"),d=e("./xform/style/styles-xform"),u=e("./xform/core/core-xform"),b=e("./xform/strings/shared-strings-xform"),m=e("./xform/core/relationships-xform"),x=e("./xform/core/content-types-xform"),k=e("./xform/core/app-xform"),B=e("./xform/book/workbook-xform"),R=e("./xform/sheet/worksheet-xform"),j=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 z{constructor(S){this.workbook=S}async readFile(S,D){if(!await i.fs.exists(S))throw new Error("File not found: "+S);let p=s.createReadStream(S);try{let y=await this.read(p,D);return p.close(),y}catch(y){throw p.close(),y}}parseRels(S){return new m().parseStream(S)}parseWorkbook(S){return new B().parseStream(S)}parseSharedStrings(S){return new b().parseStream(S)}reconcile(S,D){let p=new B,y=new R(D),v=new j,w=new A;p.reconcile(S);let _={media:S.media,mediaIndex:S.mediaIndex};Object.keys(S.drawings).forEach(F=>{let $=S.drawings[F],K=S.drawingRels[F];K&&(_.rels=K.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)}),v.reconcile($,_))});let C={styles:S.styles};Object.values(S.tables).forEach(F=>{w.reconcile(F,C)});let O={styles:S.styles,sharedStrings:S.sharedStrings,media:S.media,mediaIndex:S.mediaIndex,date1904:S.properties&&S.properties.date1904,drawings:S.drawings,comments:S.comments,tables:S.tables,vmlDrawings:S.vmlDrawings};S.worksheets.forEach(F=>{F.relationships=S.worksheetRels[F.sheetNo],y.reconcile(F,O)}),delete S.worksheetHash,delete S.worksheetRels,delete S.globalRels,delete S.sharedStrings,delete S.workbookRels,delete S.sheetDefs,delete S.styles,delete S.mediaIndex,delete S.drawings,delete S.drawingRels,delete S.vmlDrawings}async _processWorksheetEntry(S,D,p,y,v){let w=new R(y),_=await w.parseStream(S);_.sheetNo=p,D.worksheetHash[v]=_,D.worksheets.push(_)}async _processCommentEntry(S,D,p){let y=new P,v=await y.parseStream(S);D.comments[`../${p}.xml`]=v}async _processTableEntry(S,D,p){let y=new A,v=await y.parseStream(S);D.tables[`../tables/${p}.xml`]=v}async _processWorksheetRelsEntry(S,D,p){let y=new m,v=await y.parseStream(S);D.worksheetRels[p]=v}async _processMediaEntry(S,D,p){let y=p.lastIndexOf(".");if(y>=1){let v=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 F={type:"image",name:w,extension:v,buffer:O.toBuffer()};D.media.push(F),_()}),S.on("error",F=>{C(F)}),S.pipe(O)})}}async _processDrawingEntry(S,D,p){let y=new j,v=await y.parseStream(S);D.drawings[p]=v}async _processDrawingRelsEntry(S,D,p){let y=new m,v=await y.parseStream(S);D.drawingRels[p]=v}async _processVmlDrawingEntry(S,D,p){let y=new N,v=await y.parseStream(S);D.vmlDrawings[`../drawings/${p}.vml`]=v}async _processThemeEntry(S,D,p){await new Promise((y,v)=>{let w=new c;S.on("error",v),w.on("error",v),w.on("finish",()=>{D.themes[p]=w.read().toString(),y()}),S.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(S,D){!S[Symbol.asyncIterator]&&S.pipe&&(S=S.pipe(new t));let p=[];for await(let y of S)p.push(y);return this.load(o.concat(p),D)}async load(S,D){let p;p=D&&D.base64?o.from(S.toString(),"base64"):S;let y={worksheets:[],worksheetHash:{},worksheetRels:[],themes:{},media:[],mediaIndex:{},drawings:{},drawingRels:{},comments:{},tables:{},vmlDrawings:{}},v=await r.loadAsync(p);for(let w of Object.values(v.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 F=16384;for(let $=0;$<O.length;$+=F)_.write(O.substring($,$+F))}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 b,await y.sharedStrings.parseStream(_);break;case"xl/styles.xml":y.styles=new d,await y.styles.parseStream(_);break;case"docProps/app.xml":{let O=new k,F=await O.parseStream(_);y.company=F.company,y.manager=F.manager;break}case"docProps/core.xml":{let O=new u,F=await O.parseStream(_);Object.assign(y,F);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(S,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 v=await(function(w,_){return new Promise((C,O)=>{s.readFile(w,_,(F,$)=>{F?O(F):C($)})})})(p.filename);return S.append(v,{name:y})}if(p.buffer)return S.append(p.buffer,{name:y});if(p.base64){let v=p.base64,w=v.substring(v.indexOf(",")+1);return S.append(w,{name:y,base64:!0})}}throw new Error("Unsupported media")}))}addDrawings(S,D){let p=new j,y=new m;D.worksheets.forEach(v=>{let{drawing:w}=v;if(w){p.prepare(w,{});let _=p.toXml(w);S.append(_,{name:`xl/drawings/${w.name}.xml`}),_=y.toXml(w.rels),S.append(_,{name:`xl/drawings/_rels/${w.name}.xml.rels`})}})}addTables(S,D){let p=new A;D.worksheets.forEach(y=>{let{tables:v}=y;v.forEach(w=>{p.prepare(w,{});let _=p.toXml(w);S.append(_,{name:"xl/tables/"+w.target})})})}async addContentTypes(S,D){let p=new x().toXml(D);S.append(p,{name:"[Content_Types].xml"})}async addApp(S,D){let p=new k().toXml(D);S.append(p,{name:"docProps/app.xml"})}async addCore(S,D){let p=new u;S.append(p.toXml(D),{name:"docProps/core.xml"})}async addThemes(S,D){let p=D.themes||{theme1:q};Object.keys(p).forEach(y=>{let v=p[y],w=`xl/theme/${y}.xml`;S.append(v,{name:w})})}async addOfficeRels(S){let D=new m().toXml([{Id:"rId1",Type:z.RelType.OfficeDocument,Target:"xl/workbook.xml"},{Id:"rId2",Type:z.RelType.CoreProperties,Target:"docProps/core.xml"},{Id:"rId3",Type:z.RelType.ExtenderProperties,Target:"docProps/app.xml"}]);S.append(D,{name:"_rels/.rels"})}async addWorkbookRels(S,D){let p=1,y=[{Id:"rId"+p++,Type:z.RelType.Styles,Target:"styles.xml"},{Id:"rId"+p++,Type:z.RelType.Theme,Target:"theme/theme1.xml"}];D.sharedStrings.count&&y.push({Id:"rId"+p++,Type:z.RelType.SharedStrings,Target:"sharedStrings.xml"}),D.worksheets.forEach(w=>{w.rId="rId"+p++,y.push({Id:w.rId,Type:z.RelType.Worksheet,Target:`worksheets/sheet${w.id}.xml`})});let v=new m().toXml(y);S.append(v,{name:"xl/_rels/workbook.xml.rels"})}async addSharedStrings(S,D){D.sharedStrings&&D.sharedStrings.count&&S.append(D.sharedStrings.xml,{name:"xl/sharedStrings.xml"})}async addStyles(S,D){let{xml:p}=D.styles;p&&S.append(p,{name:"xl/styles.xml"})}async addWorkbook(S,D){let p=new B;S.append(p.toXml(D),{name:"xl/workbook.xml"})}async addWorksheets(S,D){let p=new R,y=new m,v=new P,w=new N;D.worksheets.forEach(_=>{let C=new a;p.render(C,_),S.append(C.xml,{name:`xl/worksheets/sheet${_.id}.xml`}),_.rels&&_.rels.length&&(C=new a,y.render(C,_.rels),S.append(C.xml,{name:`xl/worksheets/_rels/sheet${_.id}.xml.rels`})),_.comments.length>0&&(C=new a,v.render(C,_),S.append(C.xml,{name:`xl/comments${_.id}.xml`}),C=new a,w.render(C,_),S.append(C.xml,{name:`xl/drawings/vmlDrawing${_.id}.vml`}))})}_finalize(S){return new Promise((D,p)=>{S.on("finish",()=>{D(this)}),S.on("error",p),S.finalize()})}prepareModel(S,D){S.creator=S.creator||"ExcelJS",S.lastModifiedBy=S.lastModifiedBy||"ExcelJS",S.created=S.created||new Date,S.modified=S.modified||new Date,S.useSharedStrings=D.useSharedStrings===void 0||D.useSharedStrings,S.useStyles=D.useStyles===void 0||D.useStyles,S.sharedStrings=new b,S.styles=S.useStyles?new d(!0):new d.Mock;let p=new B,y=new R;p.prepare(S);let v={sharedStrings:S.sharedStrings,styles:S.styles,date1904:S.properties.date1904,drawingsCount:0,media:S.media};v.drawings=S.drawings=[],v.commentRefs=S.commentRefs=[];let w=0;S.tables=[],S.worksheets.forEach(_=>{_.tables.forEach(C=>{w++,C.target=`table${w}.xml`,C.id=w,S.tables.push(C)}),y.prepare(_,v)})}async write(S,D){D=D||{};let{model:p}=this.workbook,y=new n.ZipWriter(D.zip);return y.pipe(S),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(S,D){let p=s.createWriteStream(S);return new Promise((y,v)=>{p.on("finish",()=>{y()}),p.on("error",w=>{v(w)}),this.write(p,D).then(()=>{p.end()}).catch(w=>{v(w)})})}async writeBuffer(S){let D=new c;return await this.write(D,S),D.read()}}z.RelType=e("./rel-type"),f.exports=z}).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,f,g){"use strict";f.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,f,g){(function(l){(function(){"use strict";Object.defineProperty(g,"__esModule",{value:!0}),g.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,d)=>h?(a=!0,i(h)):(d&&d.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()))}}g.CsvFormatterStream=r}).call(this)}).call(this,e("buffer").Buffer)},{"./formatter":150,buffer:220,stream:505}],147:[function(e,f,g){"use strict";Object.defineProperty(g,"__esModule",{value:!0}),g.FormatterOptions=void 0,g.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,f,g){"use strict";var l=function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(g,"__esModule",{value:!0}),g.FieldFormatter=void 0;let o=l(e("lodash.isboolean")),s=l(e("lodash.isnil")),r=l(e("lodash.escaperegexp"));g.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,30 +26,30 @@ use chrome, FireFox or Internet Explorer 11`)}var r=e("safe-buffer"),t=e("random
26
26
  `)):F=p.stylize("[Circular]","special")),B(O)){if(C&&_.match(/^\d+$/))return F;(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+": "+F}function u(p){return Array.isArray(p)}function b(p){return typeof p=="boolean"}function m(p){return p===null}function x(p){return typeof p=="number"}function k(p){return typeof p=="string"}function B(p){return p===void 0}function R(p){return j(p)&&q(p)==="[object RegExp]"}function j(p){return typeof p=="object"&&p!==null}function A(p){return j(p)&&q(p)==="[object Date]"}function P(p){return j(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 z(p){return p<10?"0"+p.toString(10):p.toString(10)}g.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 v=g.format.apply(g,arguments);console.error("%s %d: %s",p,y,v)}}else t[p]=function(){};return t[p]},g.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"},g.isArray=u,g.isBoolean=b,g.isNull=m,g.isNullOrUndefined=function(p){return p==null},g.isNumber=x,g.isString=k,g.isSymbol=function(p){return typeof p=="symbol"},g.isUndefined=B,g.isRegExp=R,g.isObject=j,g.isDate=A,g.isError=P,g.isFunction=N,g.isPrimitive=function(p){return p===null||typeof p=="boolean"||typeof p=="number"||typeof p=="string"||typeof p=="symbol"||p===void 0},g.isBuffer=e("./support/isBuffer");var T=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function S(){var p=new Date,y=[z(p.getHours()),z(p.getMinutes()),z(p.getSeconds())].join(":");return[p.getDate(),T[p.getMonth()],y].join(" ")}function D(p,y){return Object.prototype.hasOwnProperty.call(p,y)}g.log=function(){console.log("%s - %s",S(),g.format.apply(g,arguments))},g.inherits=e("inherits"),g._extend=function(p,y){if(!y||!j(y))return p;for(var v=Object.keys(y),w=v.length;w--;)p[v[w]]=y[v[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,f,g){"use strict";Object.defineProperty(g,"__esModule",{value:!0}),Object.defineProperty(g,"v1",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(g,"v3",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(g,"v4",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(g,"v5",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(g,"NIL",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(g,"version",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(g,"validate",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(g,"stringify",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(g,"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(d){return d&&d.__esModule?d:{default:d}}},{"./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,f,g){"use strict";function l(a){return 14+(a+64>>>9<<4)+1}function o(a,h){let d=(65535&a)+(65535&h);return(a>>16)+(h>>16)+(d>>16)<<16|65535&d}function s(a,h,d,u,b,m){return o((x=o(o(h,a),o(u,m)))<<(k=b)|x>>>32-k,d);var x,k}function r(a,h,d,u,b,m,x){return s(h&d|~h&u,a,h,b,m,x)}function t(a,h,d,u,b,m,x){return s(h&u|d&~u,a,h,b,m,x)}function n(a,h,d,u,b,m,x){return s(h^d^u,a,h,b,m,x)}function c(a,h,d,u,b,m,x){return s(d^(h|~u),a,h,b,m,x)}Object.defineProperty(g,"__esModule",{value:!0}),g.default=void 0;var i=function(a){if(typeof a=="string"){let h=unescape(encodeURIComponent(a));a=new Uint8Array(h.length);for(let d=0;d<h.length;++d)a[d]=h.charCodeAt(d)}return(function(h){let d=[],u=32*h.length;for(let b=0;b<u;b+=8){let m=h[b>>5]>>>b%32&255,x=parseInt("0123456789abcdef".charAt(m>>>4&15)+"0123456789abcdef".charAt(15&m),16);d.push(x)}return d})((function(h,d){h[d>>5]|=128<<d%32,h[l(d)-1]=d;let u=1732584193,b=-271733879,m=-1732584194,x=271733878;for(let k=0;k<h.length;k+=16){let B=u,R=b,j=m,A=x;u=r(u,b,m,x,h[k],7,-680876936),x=r(x,u,b,m,h[k+1],12,-389564586),m=r(m,x,u,b,h[k+2],17,606105819),b=r(b,m,x,u,h[k+3],22,-1044525330),u=r(u,b,m,x,h[k+4],7,-176418897),x=r(x,u,b,m,h[k+5],12,1200080426),m=r(m,x,u,b,h[k+6],17,-1473231341),b=r(b,m,x,u,h[k+7],22,-45705983),u=r(u,b,m,x,h[k+8],7,1770035416),x=r(x,u,b,m,h[k+9],12,-1958414417),m=r(m,x,u,b,h[k+10],17,-42063),b=r(b,m,x,u,h[k+11],22,-1990404162),u=r(u,b,m,x,h[k+12],7,1804603682),x=r(x,u,b,m,h[k+13],12,-40341101),m=r(m,x,u,b,h[k+14],17,-1502002290),b=r(b,m,x,u,h[k+15],22,1236535329),u=t(u,b,m,x,h[k+1],5,-165796510),x=t(x,u,b,m,h[k+6],9,-1069501632),m=t(m,x,u,b,h[k+11],14,643717713),b=t(b,m,x,u,h[k],20,-373897302),u=t(u,b,m,x,h[k+5],5,-701558691),x=t(x,u,b,m,h[k+10],9,38016083),m=t(m,x,u,b,h[k+15],14,-660478335),b=t(b,m,x,u,h[k+4],20,-405537848),u=t(u,b,m,x,h[k+9],5,568446438),x=t(x,u,b,m,h[k+14],9,-1019803690),m=t(m,x,u,b,h[k+3],14,-187363961),b=t(b,m,x,u,h[k+8],20,1163531501),u=t(u,b,m,x,h[k+13],5,-1444681467),x=t(x,u,b,m,h[k+2],9,-51403784),m=t(m,x,u,b,h[k+7],14,1735328473),b=t(b,m,x,u,h[k+12],20,-1926607734),u=n(u,b,m,x,h[k+5],4,-378558),x=n(x,u,b,m,h[k+8],11,-2022574463),m=n(m,x,u,b,h[k+11],16,1839030562),b=n(b,m,x,u,h[k+14],23,-35309556),u=n(u,b,m,x,h[k+1],4,-1530992060),x=n(x,u,b,m,h[k+4],11,1272893353),m=n(m,x,u,b,h[k+7],16,-155497632),b=n(b,m,x,u,h[k+10],23,-1094730640),u=n(u,b,m,x,h[k+13],4,681279174),x=n(x,u,b,m,h[k],11,-358537222),m=n(m,x,u,b,h[k+3],16,-722521979),b=n(b,m,x,u,h[k+6],23,76029189),u=n(u,b,m,x,h[k+9],4,-640364487),x=n(x,u,b,m,h[k+12],11,-421815835),m=n(m,x,u,b,h[k+15],16,530742520),b=n(b,m,x,u,h[k+2],23,-995338651),u=c(u,b,m,x,h[k],6,-198630844),x=c(x,u,b,m,h[k+7],10,1126891415),m=c(m,x,u,b,h[k+14],15,-1416354905),b=c(b,m,x,u,h[k+5],21,-57434055),u=c(u,b,m,x,h[k+12],6,1700485571),x=c(x,u,b,m,h[k+3],10,-1894986606),m=c(m,x,u,b,h[k+10],15,-1051523),b=c(b,m,x,u,h[k+1],21,-2054922799),u=c(u,b,m,x,h[k+8],6,1873313359),x=c(x,u,b,m,h[k+15],10,-30611744),m=c(m,x,u,b,h[k+6],15,-1560198380),b=c(b,m,x,u,h[k+13],21,1309151649),u=c(u,b,m,x,h[k+4],6,-145523070),x=c(x,u,b,m,h[k+11],10,-1120210379),m=c(m,x,u,b,h[k+2],15,718787259),b=c(b,m,x,u,h[k+9],21,-343485551),u=o(u,B),b=o(b,R),m=o(m,j),x=o(x,A)}return[u,b,m,x]})((function(h){if(h.length===0)return[];let d=8*h.length,u=new Uint32Array(l(d));for(let b=0;b<d;b+=8)u[b>>5]|=(255&h[b/8])<<b%32;return u})(a),8*a.length))};g.default=i},{}],530:[function(e,f,g){"use strict";Object.defineProperty(g,"__esModule",{value:!0}),g.default=void 0,g.default="00000000-0000-0000-0000-000000000000"},{}],531:[function(e,f,g){"use strict";Object.defineProperty(g,"__esModule",{value:!0}),g.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};g.default=s},{"./validate.js":541}],532:[function(e,f,g){"use strict";Object.defineProperty(g,"__esModule",{value:!0}),g.default=void 0,g.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,f,g){"use strict";let l;Object.defineProperty(g,"__esModule",{value:!0}),g.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,f,g){"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(g,"__esModule",{value:!0}),g.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 d=0;d<h.length;++d)r.push(h.charCodeAt(d))}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 d=new Uint32Array(16);for(let u=0;u<16;++u)d[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]=d}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 d=new Uint32Array(80);for(let B=0;B<16;++B)d[B]=a[h][B];for(let B=16;B<80;++B)d[B]=o(d[B-3]^d[B-8]^d[B-14]^d[B-16],1);let u=n[0],b=n[1],m=n[2],x=n[3],k=n[4];for(let B=0;B<80;++B){let R=Math.floor(B/20),j=o(u,5)+l(R,b,m,x)+k+t[R]+d[B]>>>0;k=x,x=m,m=o(b,30)>>>0,b=u,u=j}n[0]=n[0]+u>>>0,n[1]=n[1]+b>>>0,n[2]=n[2]+m>>>0,n[3]=n[3]+x>>>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]]};g.default=s},{}],535:[function(e,f,g){"use strict";Object.defineProperty(g,"__esModule",{value:!0}),g.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};g.default=r},{"./validate.js":541}],536:[function(e,f,g){"use strict";Object.defineProperty(g,"__esModule",{value:!0}),g.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,d){let u=h&&d||0,b=h||new Array(16),m=(a=a||{}).node||r,x=a.clockseq!==void 0?a.clockseq:t;if(m==null||x==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]]),x==null&&(x=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&&(x=x+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=x,k+=122192928e5;let j=(1e4*(268435455&k)+B)%4294967296;b[u++]=j>>>24&255,b[u++]=j>>>16&255,b[u++]=j>>>8&255,b[u++]=255&j;let A=k/4294967296*1e4&268435455;b[u++]=A>>>8&255,b[u++]=255&A,b[u++]=A>>>24&15|16,b[u++]=A>>>16&255,b[u++]=x>>>8|128,b[u++]=255&x;for(let P=0;P<6;++P)b[u+P]=m[P];return h||(0,o.default)(b)};g.default=i},{"./rng.js":533,"./stringify.js":535}],537:[function(e,f,g){"use strict";Object.defineProperty(g,"__esModule",{value:!0}),g.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);g.default=r},{"./md5.js":529,"./v35.js":538}],538:[function(e,f,g){"use strict";Object.defineProperty(g,"__esModule",{value:!0}),g.default=function(n,c,i){function a(h,d,u,b){if(typeof h=="string"&&(h=(function(x){x=unescape(encodeURIComponent(x));let k=[];for(let B=0;B<x.length;++B)k.push(x.charCodeAt(B));return k})(h)),typeof d=="string"&&(d=(0,o.default)(d)),d.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(d),m.set(h,d.length),m=i(m),m[6]=15&m[6]|c,m[8]=63&m[8]|128,u){b=b||0;for(let x=0;x<16;++x)u[b+x]=m[x];return u}return(0,l.default)(m)}try{a.name=n}catch{}return a.DNS=r,a.URL=t,a},g.URL=g.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";g.DNS=r;let t="6ba7b811-9dad-11d1-80b4-00c04fd430c8";g.URL=t},{"./parse.js":531,"./stringify.js":535}],539:[function(e,f,g){"use strict";Object.defineProperty(g,"__esModule",{value:!0}),g.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)};g.default=r},{"./rng.js":533,"./stringify.js":535}],540:[function(e,f,g){"use strict";Object.defineProperty(g,"__esModule",{value:!0}),g.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);g.default=r},{"./sha1.js":534,"./v35.js":538}],541:[function(e,f,g){"use strict";Object.defineProperty(g,"__esModule",{value:!0}),g.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)};g.default=s},{"./regex.js":532}],542:[function(e,f,g){"use strict";Object.defineProperty(g,"__esModule",{value:!0}),g.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)};g.default=s},{"./validate.js":541}],543:[function(e,f,g){"use strict";Object.defineProperty(g,"__esModule",{value:!0}),g.CHAR=`
27
27
  \r -\uD7FF\uE000-\uFFFD\u{10000}-\u{10FFFF}`,g.S=` \r
28
28
  `,g.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}",g.NAME_CHAR="-"+g.NAME_START_CHAR+".0-9\xB7\u0300-\u036F\u203F-\u2040",g.CHAR_RE=new RegExp("^["+g.CHAR+"]$","u"),g.S_RE=new RegExp("^["+g.S+"]+$","u"),g.NAME_START_CHAR_RE=new RegExp("^["+g.NAME_START_CHAR+"]$","u"),g.NAME_CHAR_RE=new RegExp("^["+g.NAME_CHAR+"]$","u"),g.NAME_RE=new RegExp("^["+g.NAME_START_CHAR+"]["+g.NAME_CHAR+"]*$","u"),g.NMTOKEN_RE=new RegExp("^["+g.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}g.S_LIST=[32,10,13,9],g.isChar=function(o){return o>=32&&o<=55295||o===10||o===13||o===9||o>=57344&&o<=65533||o>=65536&&o<=1114111},g.isS=function(o){return o===32||o===10||o===13||o===9},g.isNameStartChar=l,g.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,f,g){"use strict";Object.defineProperty(g,"__esModule",{value:!0}),g.CHAR="-\uD7FF\uE000-\uFFFD\u{10000}-\u{10FFFF}",g.RESTRICTED_CHAR="-\b\v\f-\x7F-\x84\x86-\x9F",g.S=` \r
29
- `,g.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}",g.NAME_CHAR="-"+g.NAME_START_CHAR+".0-9\xB7\u0300-\u036F\u203F-\u2040",g.CHAR_RE=new RegExp("^["+g.CHAR+"]$","u"),g.RESTRICTED_CHAR_RE=new RegExp("^["+g.RESTRICTED_CHAR+"]$","u"),g.S_RE=new RegExp("^["+g.S+"]+$","u"),g.NAME_START_CHAR_RE=new RegExp("^["+g.NAME_START_CHAR+"]$","u"),g.NAME_CHAR_RE=new RegExp("^["+g.NAME_CHAR+"]$","u"),g.NAME_RE=new RegExp("^["+g.NAME_START_CHAR+"]["+g.NAME_CHAR+"]*$","u"),g.NMTOKEN_RE=new RegExp("^["+g.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}g.S_LIST=[32,10,13,9],g.isChar=function(o){return o>=1&&o<=55295||o>=57344&&o<=65533||o>=65536&&o<=1114111},g.isRestrictedChar=function(o){return o>=1&&o<=8||o===11||o===12||o>=14&&o<=31||o>=127&&o<=132||o>=134&&o<=159},g.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},g.isS=function(o){return o===32||o===10||o===13||o===9},g.isNameStartChar=l,g.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,f,g){"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(g,"__esModule",{value:!0}),g.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}",g.NC_NAME_CHAR="-"+g.NC_NAME_START_CHAR+".0-9\xB7\u0300-\u036F\u203F-\u2040",g.NC_NAME_START_CHAR_RE=new RegExp("^["+g.NC_NAME_START_CHAR+"]$","u"),g.NC_NAME_CHAR_RE=new RegExp("^["+g.NC_NAME_CHAR+"]$","u"),g.NC_NAME_RE=new RegExp("^["+g.NC_NAME_START_CHAR+"]["+g.NC_NAME_CHAR+"]*$","u"),g.isNCNameStartChar=l,g.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 md="waiting",Q7="replied";var ko={basis:"count",default_capacity:0,by_account:{}};function tC(e){let f=e&&typeof e=="object"&&!Array.isArray(e)?e:{},g=f.basis==="points"?"points":"count",l=Math.max(0,Math.floor(Number(f.default_capacity)||0)),o={},s=f.by_account&&typeof f.by_account=="object"?f.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:g,default_capacity:l,by_account:o}}import{createContext as Qg,useContext as eb,useMemo as bd}from"react";import{Box as tb}from"@mui/material";var Ac="--app-mobile-font-offset";function Br(e,f=0){return`calc(${e}px + max(0px, var(${Ac}, 0px) - ${f}px))`}import{jsx as gd}from"react/jsx-runtime";var yd=Qg({});function rb({config:e,children:f}){let g=bd(()=>e??{},[e]),l=g.mobileFontOffsetPx;return gd(yd.Provider,{value:g,children:l===void 0?f:gd(tb,{sx:{display:"contents",[Ac]:`${l}px`},children:f})})}function ot(){return eb(yd)}function Ns(){let{buildFileUrl:e}=ot();return bd(()=>e||((f,g)=>{let l=[];return g?.thumb&&l.push(`thumb=${g.thumb}`),g?.download&&l.push("download=1"),`/api/v1/files/${f}${l.length?`?${l.join("&")}`:""}`}),[e])}function Ls(){let{uploadMaxMb:e}=ot();return e??50}import{useGlobalForm as Fy}from"@ehfuse/forma";import xd from"@mui/icons-material/DoNotDisturbAltOutlined";import vd from"@mui/icons-material/BookmarkBorderOutlined";import nb from"@mui/icons-material/LabelOutlined";import ob from"@mui/icons-material/FlagOutlined";import ib from"@mui/icons-material/StarBorderOutlined";import sb from"@mui/icons-material/FolderOutlined";import ab from"@mui/icons-material/EventOutlined";import lb from"@mui/icons-material/BuildOutlined";import cb from"@mui/icons-material/LocalShippingOutlined";import ub from"@mui/icons-material/StorefrontOutlined";import fb from"@mui/icons-material/GroupsOutlined";import db from"@mui/icons-material/LightbulbOutlined";import hb from"@mui/icons-material/FavoriteBorderOutlined";import pb from"@mui/icons-material/AssignmentOutlined";import mb from"@mui/icons-material/HomeOutlined";import gb from"@mui/icons-material/WorkOutline";import bb from"@mui/icons-material/SchoolOutlined";import yb from"@mui/icons-material/LocalHospitalOutlined";import xb from"@mui/icons-material/RestaurantOutlined";import vb from"@mui/icons-material/LocalFloristOutlined";import wb from"@mui/icons-material/DirectionsCarOutlined";import _b from"@mui/icons-material/CampaignOutlined";import kb from"@mui/icons-material/SavingsOutlined";import Sb from"@mui/icons-material/Inventory2Outlined";import Tb from"@mui/icons-material/CleaningServicesOutlined";import wd from"@mui/icons-material/HandymanOutlined";import Cb from"@mui/icons-material/LocalPhoneOutlined";import Bb from"@mui/icons-material/EmailOutlined";import Ib from"@mui/icons-material/ShoppingCartOutlined";import Eb from"@mui/icons-material/BarChartOutlined";import Mb from"@mui/icons-material/PrintOutlined";import Rb from"@mui/icons-material/SecurityOutlined";import Ob from"@mui/icons-material/AlarmOutlined";import Ab from"@mui/icons-material/AttachFileOutlined";import Db from"@mui/icons-material/PhotoCameraOutlined";import Pb from"@mui/icons-material/ImageOutlined";import Nb from"@mui/icons-material/MenuBookOutlined";import Lb from"@mui/icons-material/EditOutlined";import zb from"@mui/icons-material/KeyOutlined";import jb from"@mui/icons-material/LockOutlined";import Fb from"@mui/icons-material/LockOpenOutlined";import qb from"@mui/icons-material/SettingsOutlined";import $b from"@mui/icons-material/CloudOutlined";import Hb from"@mui/icons-material/WifiOutlined";import Wb from"@mui/icons-material/ComputerOutlined";import Ub from"@mui/icons-material/SmartphoneOutlined";import Vb from"@mui/icons-material/TvOutlined";import Kb from"@mui/icons-material/AccessTimeOutlined";import Gb from"@mui/icons-material/TimerOutlined";import Yb from"@mui/icons-material/MapOutlined";import Xb from"@mui/icons-material/PlaceOutlined";import Zb from"@mui/icons-material/NavigationOutlined";import Jb from"@mui/icons-material/FlightOutlined";import Qb from"@mui/icons-material/TrainOutlined";import e1 from"@mui/icons-material/DirectionsBusOutlined";import t1 from"@mui/icons-material/DirectionsBikeOutlined";import r1 from"@mui/icons-material/DirectionsWalkOutlined";import n1 from"@mui/icons-material/DirectionsRunOutlined";import o1 from"@mui/icons-material/FitnessCenterOutlined";import i1 from"@mui/icons-material/SportsSoccerOutlined";import s1 from"@mui/icons-material/EmojiEventsOutlined";import a1 from"@mui/icons-material/CardGiftcardOutlined";import l1 from"@mui/icons-material/CakeOutlined";import _d from"@mui/icons-material/CoffeeOutlined";import c1 from"@mui/icons-material/LocalPizzaOutlined";import u1 from"@mui/icons-material/ShoppingBagOutlined";import kd from"@mui/icons-material/CreditCardOutlined";import f1 from"@mui/icons-material/AccountBalanceOutlined";import d1 from"@mui/icons-material/AccountBalanceWalletOutlined";import h1 from"@mui/icons-material/AttachMoneyOutlined";import p1 from"@mui/icons-material/ReceiptLongOutlined";import m1 from"@mui/icons-material/CalculateOutlined";import g1 from"@mui/icons-material/TrendingUpOutlined";import b1 from"@mui/icons-material/ListAltOutlined";import y1 from"@mui/icons-material/TaskAltOutlined";import x1 from"@mui/icons-material/DoneAllOutlined";import v1 from"@mui/icons-material/WarningAmberOutlined";import w1 from"@mui/icons-material/InfoOutlined";import _1 from"@mui/icons-material/HelpOutlined";import k1 from"@mui/icons-material/SupportAgentOutlined";import S1 from"@mui/icons-material/PersonOutlined";import T1 from"@mui/icons-material/PersonAddOutlined";import C1 from"@mui/icons-material/BadgeOutlined";import B1 from"@mui/icons-material/WbSunnyOutlined";import I1 from"@mui/icons-material/DarkModeOutlined";import E1 from"@mui/icons-material/LocalFireDepartmentOutlined";import M1 from"@mui/icons-material/WaterDropOutlined";import R1 from"@mui/icons-material/BoltOutlined";import O1 from"@mui/icons-material/AutorenewOutlined";import A1 from"@mui/icons-material/ScienceOutlined";import D1 from"@mui/icons-material/MedicalServicesOutlined";import P1 from"@mui/icons-material/NotificationsOutlined";import N1 from"@mui/icons-material/SendOutlined";import L1 from"@mui/icons-material/LinkOutlined";import z1 from"@mui/icons-material/PublicOutlined";import Sd from"@mui/icons-material/ApartmentOutlined";import j1 from"@mui/icons-material/PlumbingOutlined";import F1 from"@mui/icons-material/ElectricalServicesOutlined";import q1 from"@mui/icons-material/ChatOutlined";import $1 from"@mui/icons-material/DescriptionOutlined";import H1 from"@mui/icons-material/FactCheckOutlined";import W1 from"@mui/icons-material/RocketLaunchOutlined";import U1 from"@mui/icons-material/PaletteOutlined";import V1 from"@mui/icons-material/MusicNoteOutlined";import K1 from"@mui/icons-material/VideocamOutlined";import G1 from"@mui/icons-material/ThumbUpOutlined";import Y1 from"@mui/icons-material/PushPinOutlined";import X1 from"@mui/icons-material/SearchOutlined";import Z1 from"@mui/icons-material/VisibilityOutlined";import J1 from"@mui/icons-material/VerifiedOutlined";import Q1 from"@mui/icons-material/TrackChangesOutlined";import ey from"@mui/icons-material/ExtensionOutlined";import ty from"@mui/icons-material/CodeOutlined";import ry from"@mui/icons-material/BugReportOutlined";import ny from"@mui/icons-material/SmartToyOutlined";import oy from"@mui/icons-material/StorageOutlined";import iy from"@mui/icons-material/QrCode2Outlined";import sy from"@mui/icons-material/FileDownloadOutlined";import ay from"@mui/icons-material/FileUploadOutlined";import ly from"@mui/icons-material/MicOutlined";import cy from"@mui/icons-material/HeadphonesOutlined";import uy from"@mui/icons-material/MovieOutlined";import fy from"@mui/icons-material/SportsEsportsOutlined";import dy from"@mui/icons-material/BrushOutlined";import hy from"@mui/icons-material/ArchitectureOutlined";import py from"@mui/icons-material/EngineeringOutlined";import my from"@mui/icons-material/FactoryOutlined";import gy from"@mui/icons-material/AgricultureOutlined";import by from"@mui/icons-material/DirectionsBoatOutlined";import yy from"@mui/icons-material/TwoWheelerOutlined";import xy from"@mui/icons-material/HandshakeOutlined";import vy from"@mui/icons-material/GavelOutlined";import wy from"@mui/icons-material/BalanceOutlined";import _y from"@mui/icons-material/TranslateOutlined";import ky from"@mui/icons-material/PsychologyOutlined";import Sy from"@mui/icons-material/PetsOutlined";import Ty from"@mui/icons-material/CelebrationOutlined";import Cy from"@mui/icons-material/BeachAccessOutlined";import By from"@mui/icons-material/AcUnitOutlined";import Iy from"@mui/icons-material/ForestOutlined";import Ey from"@mui/icons-material/LandscapeOutlined";import My from"@mui/icons-material/HotelOutlined";import Ry from"@mui/icons-material/LocalLaundryServiceOutlined";import Oy from"@mui/icons-material/ChairOutlined";import Ay from"@mui/icons-material/LocalBarOutlined";import Dy from"@mui/icons-material/LunchDiningOutlined";import Py from"@mui/icons-material/IcecreamOutlined";import Ny from"@mui/icons-material/WorkspacePremiumOutlined";import Ly from"@mui/icons-material/DiamondOutlined";import zy from"@mui/icons-material/VaccinesOutlined";var Dc="bookmark",So="label",pr="notifications",yr="event",zs="warning",js="#e53e3e",Td="none",Pc=[{key:Td,Icon:xd},{key:"label",Icon:nb},{key:"bookmark",Icon:vd},{key:"flag",Icon:ob},{key:"star",Icon:ib},{key:"folder",Icon:sb},{key:"event",Icon:ab},{key:"build",Icon:lb},{key:"shipping",Icon:cb},{key:"store",Icon:ub},{key:"groups",Icon:fb},{key:"idea",Icon:db},{key:"heart",Icon:hb},{key:"assignment",Icon:pb},{key:"home",Icon:mb},{key:"work",Icon:gb},{key:"school",Icon:bb},{key:"hospital",Icon:yb},{key:"restaurant",Icon:xb},{key:"flower",Icon:vb},{key:"car",Icon:wb},{key:"campaign",Icon:_b},{key:"savings",Icon:kb},{key:"inventory",Icon:Sb},{key:"cleaning",Icon:Tb},{key:"handyman",Icon:wd},{key:"phone",Icon:Cb},{key:"email",Icon:Bb},{key:"cart",Icon:Ib},{key:"chart",Icon:Eb},{key:"print",Icon:Mb},{key:"security",Icon:Rb},{key:"alarm",Icon:Ob},{key:"attach",Icon:Ab},{key:"camera",Icon:Db},{key:"image",Icon:Pb},{key:"book",Icon:Nb},{key:"edit",Icon:Lb},{key:"key",Icon:zb},{key:"lock",Icon:jb},{key:"unlock",Icon:Fb},{key:"settings",Icon:qb},{key:"cloud",Icon:$b},{key:"wifi",Icon:Hb},{key:"computer",Icon:Wb},{key:"smartphone",Icon:Ub},{key:"tv",Icon:Vb},{key:"clock",Icon:Kb},{key:"timer",Icon:Gb},{key:"map",Icon:Yb},{key:"place",Icon:Xb},{key:"navigation",Icon:Zb},{key:"flight",Icon:Jb},{key:"train",Icon:Qb},{key:"bus",Icon:e1},{key:"bike",Icon:t1},{key:"walk",Icon:r1},{key:"run",Icon:n1},{key:"fitness",Icon:o1},{key:"soccer",Icon:i1},{key:"trophy",Icon:s1},{key:"gift",Icon:a1},{key:"cake",Icon:l1},{key:"coffee",Icon:_d},{key:"pizza",Icon:c1},{key:"bag",Icon:u1},{key:"card",Icon:kd},{key:"bank",Icon:f1},{key:"wallet",Icon:d1},{key:"money",Icon:h1},{key:"receipt",Icon:p1},{key:"calculate",Icon:m1},{key:"trending",Icon:g1},{key:"listalt",Icon:b1},{key:"task",Icon:y1},{key:"doneall",Icon:x1},{key:"warning",Icon:v1},{key:"info",Icon:w1},{key:"help",Icon:_1},{key:"support",Icon:k1},{key:"person",Icon:S1},{key:"personadd",Icon:T1},{key:"badge",Icon:C1},{key:"sun",Icon:B1},{key:"moon",Icon:I1},{key:"fire",Icon:E1},{key:"water",Icon:M1},{key:"bolt",Icon:R1},{key:"renew",Icon:O1},{key:"science",Icon:A1},{key:"medical",Icon:D1},{key:"notifications",Icon:P1},{key:"send",Icon:N1},{key:"link",Icon:L1},{key:"public",Icon:z1},{key:"apartment",Icon:Sd},{key:"plumbing",Icon:j1},{key:"electrical",Icon:F1},{key:"chat",Icon:q1},{key:"description",Icon:$1},{key:"factcheck",Icon:H1},{key:"rocket",Icon:W1},{key:"palette",Icon:U1},{key:"music",Icon:V1},{key:"video",Icon:K1},{key:"thumbup",Icon:G1},{key:"pin",Icon:Y1},{key:"search",Icon:X1},{key:"eye",Icon:Z1},{key:"verified",Icon:J1},{key:"target",Icon:Q1},{key:"extension",Icon:ey},{key:"code",Icon:ty},{key:"bug",Icon:ry},{key:"robot",Icon:ny},{key:"storage",Icon:oy},{key:"qrcode",Icon:iy},{key:"download",Icon:sy},{key:"upload",Icon:ay},{key:"mic",Icon:ly},{key:"headphones",Icon:cy},{key:"movie",Icon:uy},{key:"game",Icon:fy},{key:"brush",Icon:dy},{key:"architecture",Icon:hy},{key:"engineering",Icon:py},{key:"factory",Icon:my},{key:"agriculture",Icon:gy},{key:"boat",Icon:by},{key:"motorcycle",Icon:yy},{key:"handshake",Icon:xy},{key:"gavel",Icon:vy},{key:"balance",Icon:wy},{key:"translate",Icon:_y},{key:"psychology",Icon:ky},{key:"pets",Icon:Sy},{key:"celebration",Icon:Ty},{key:"beach",Icon:Cy},{key:"snow",Icon:By},{key:"forest",Icon:Iy},{key:"mountain",Icon:Ey},{key:"hotel",Icon:My},{key:"laundry",Icon:Ry},{key:"chair",Icon:Oy},{key:"bar",Icon:Ay},{key:"burger",Icon:Dy},{key:"icecream",Icon:Py},{key:"medal",Icon:Ny},{key:"diamond",Icon:Ly},{key:"vaccine",Icon:zy}],jy={cafe:_d,payment:kd,business:Sd,construction:wd};function Et(e){return e===Td?null:Pc.find(f=>f.key===e)?.Icon??jy[String(e??"")]??vd}function ZB(e){return Et(e)??xd}var Nc={title:"",icon:So,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:""},Lc={createAttachmentFiles:[],createSubmitting:!1,attachmentUpload:null};function qy(e){let{formId:f="taskbox-create-form",initialValues:g,onValidate:l,onSubmit:o}=e;return Fy({formId:f,initialValues:{...Nc,...g},onValidate:l,onSubmit:o})}import{useGlobalFormaState as $y}from"@ehfuse/forma";var Cd="taskbox-ui-state";function To(){return $y({stateId:Cd,initialValues:Lc})}import{useMemo as Hy}from"react";import{useTheme as Wy}from"@mui/material";function Vi(e,f){let g=Math.max(0,Math.min(1,f));if(g<=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}, ${g})`}function Bd(e,f){let g=Math.max(0,Math.min(1,f)),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)*g),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 zc(e,f,g){return g==="dark"?{accent:e,accentContrast:f,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:f,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 Uy(e,f){let g=f==="dark";return{bg:g?Bd(e.accent,.45):e.accent,color:g?e.textInverse:e.accentContrast,border:"none",fontSize:11.5,fontWeight:600,minWidth:20,width:34,borderRadius:999,paddingX:.6,paddingY:.4}}function Id(e,f){return{...e,...f??{}}}function Ua(e,f="light"){let g=f==="dark",l=Uy(e,f),o=e.accentOnSurface;return{mode:f,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:f==="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:f==="dark"?e.textStrong:e.textPrimary,labelFontSize:15.5,labelFontWeight:f==="dark"?400:700,minHeight:48,badge:{...l,borderRadius:4,width:34}}},board:{columnBg:f==="dark"?e.surfaceSubtle:e.surface,columnHeaderColor:e.textPrimary,columnHeaderFontSize:13.5,badge:{...l,borderRadius:4,width:34}},summary:{gaugeTrackColor:f==="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:f==="dark"?e.surfaceSubtle:e.surface,color:f==="dark"?e.textSecondary:e.textStrong,hoverBg:e.surfaceHover,borderColor:f==="dark"?e.border:e.borderStrong,selectedBg:f==="dark"?e.surfaceHover:e.textStrong,selectedColor:f==="dark"?e.textStrong:e.surface},calendar:{bg:e.surface,borderColor:g?"#3a434f":e.border,headerBg:e.surfaceSubtle,headerColor:e.textSecondary,cellBg:g?"#1a1e24":e.surface,dateBandBg:e.surface,otherMonthBg:g?"#1a1e24":e.surface,todayBg:e.accentSoft,hoverBg:e.surfaceHover,dateColor:e.textPrimary,holidayColor:e.danger},card:{bg:g?"#232a33":e.surface,borderColor:g?"#333c47":e.border,hoverBg:g?"#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:f==="dark"?e.textStrong:e.accent,separatorColor:e.surface},chip:{borderRadius:.75,fontSize:13,fontWeight:500,plainColor:f==="dark"?e.textSecondary:"#57564f",plainDotColor:e.textMuted,darkBgAlpha:.15,darkTextSource:"dot"}}}function jc(e,f){if(!f)return e;let g=f.mode??e.mode,o={...g===e.mode?e.colors:zc(e.colors.accent,e.colors.accentContrast,g),...f.colors??{}},s=Ua(o,g),{groupHeader:r,...t}=f.table??{},{badge:n,...c}=f.board??{},{badge:i,...a}=r??{};return{mode:g,colors:o,table:{...s.table,...t,groupHeader:{...s.table.groupHeader,...a,badge:Id(s.table.groupHeader.badge,i)}},board:{...s.board,...c,badge:Id(s.board.badge,n)},summary:{...s.summary,...f.summary??{}},chip:{...s.chip,...f.chip??{}},actionButton:{...s.actionButton,...f.actionButton??{}},tabs:{...s.tabs,...f.tabs??{}},avatar:{...s.avatar,...f.avatar??{}},calendar:{...s.calendar,...f.calendar??{}},card:{...s.card,...f.card??{}},timeline:{...s.timeline,...f.timeline??{}}}}function Vy(e={}){let{mode:f="light",accent:g="#2563eb",accentContrast:l="#ffffff",input:o}=e;return jc(Ua(zc(g,l,f),f),o)}function lt(){let e=Wy(),{theme:f}=ot(),g=e.palette.primary.main,l=e.palette.primary.contrastText,o=e.palette.mode==="dark"?"dark":"light";return Hy(()=>jc(Ua(zc(g,l,o),o),f),[g,l,o,f])}import{useCallback as no,useEffect as Gs,useMemo as jn,useRef as hu,useState as oo}from"react";import{Box as ar,Divider as Y2,IconButton as X2,ListItemIcon as Z2,Menu as ph,MenuItem as ml}from"@mui/material";import mh from"@mui/icons-material/Add";import J2 from"@mui/icons-material/ArrowUpward";import Q2 from"@mui/icons-material/ArrowDownward";import ev from"@mui/icons-material/KeyboardArrowDown";import tv from"@mui/icons-material/KeyboardArrowRight";import pu from"@mui/icons-material/Check";import rv from"@mui/icons-material/FilterList";import nv from"@mui/icons-material/InboxOutlined";import{Virtuoso as ov}from"react-virtuoso";import iv from"@ehfuse/overlay-scrollbar";import{Box as Ed}from"@mui/material";import{jsx as Gy,jsxs as Yy}from"react/jsx-runtime";var Ky={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 Xr({priority:e,small:f=!1,plain:g=!1}){let l=Ky[e],o=lt(),s=o.mode==="dark",r=g||e==="low";return Yy(Ed,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:f?.5:.75,px:r?0:f?.9:1.25,py:r?0:f?.25:.5,borderRadius:.75,fontSize:f?11.5:13,fontWeight:500,bgcolor:r?"transparent":s?Vi(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(Ed,{component:"span",sx:{width:f?6:8,height:f?6:8,borderRadius:"50%",bgcolor:l.dot}}),l.label]})}import{Divider as ex,Menu as tx,MenuItem as Dd}from"@mui/material";import rx from"@mui/icons-material/Check";function Jn(){return{}}var Fc=[{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"}],qc=[{key:"desktop",name:"\uB370\uC2A4\uD06C\uD1B1"},{key:"tablet",name:"\uD0DC\uBE14\uB9BF"},{key:"mobile",name:"\uD734\uB300\uD3F0"}],$c=[{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 Md(e){return Fc.find(f=>f.key===e)?.name??""}function Rd(e){return qc.find(f=>f.key===e)?.name??""}function Va(e){return $c.find(f=>f.key===e)?.name??""}function Hc(e,f=new Date){if(!e.is_event)return!1;let g=String(e.due_date??"").trim().slice(0,10);if(!/^\d{4}-\d{2}-\d{2}$/.test(g))return!1;let l=String(e.event_time??"").trim();if(/^\d{2}:\d{2}$/.test(l)){let s=new Date(`${g}T${l}:00`);return!Number.isNaN(s.getTime())&&s.getTime()<=f.getTime()}let o=new Date(`${g}T00:00:00`);return Number.isNaN(o.getTime())?!1:(o.setDate(o.getDate()+1),o.getTime()<=f.getTime())}function Ka(e,f=new Date){return e.is_event?Hc(e,f):!!e.completed}var gn=[{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"}],$s=gn;function Ga(e){return gn.find(f=>f.key===e)??gn[0]}var Fs={key:"completed",name:"\uC644\uB8CC",bg:"#e3eefb",fg:"#1d4f91",dot:"#2f80ed"};function xr(e){if(e.is_notice)return Od(e.status);if(e.is_bug&&e.completed){let f=Va(e.resolution)||"\uC644\uB8CC";return{...Fs,name:f}}return e.completed&&e.status!=="hold"?Fs:e.is_bug?Zy(e.status):Ga(e.status)}var Xy={key:"event_ended",name:"\uC885\uB8CC",bg:"#efefed",fg:"#57564f",dot:"#9a9a97"};function Hs(e){return Hc(e)?Xy:null}var qs=[{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 Od(e){return qs.find(f=>f.key===e)??qs[1]}var Wc="__closed__",Si=[{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"}],TI=[...Si.filter(e=>e.key!=="bug_hold"),{key:Wc,name:"\uC644\uB8CC",bg:"#e3eefb",fg:"#1d4f91",dot:"#2f80ed"},...Si.filter(e=>e.key==="bug_hold")];function Zy(e){return Si.find(f=>f.key===e)??Si[0]}function Ya(e){return e.is_notice?qs:e.is_bug?Si:$s}function CI(e){return e.status===md}var Jy={in_progress:0,not_started:2,hold:3};function BI(e){return e.completed?9:Jy[String(e.status??"")]??2}function Ki(e,f){let g=new Map(f.map(o=>[o.key,o])),l=(e.label_keys??[]).map(o=>g.get(o)).filter(o=>!!o);if(e.is_event){let o=Hs({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:[Od(e.status),...l]:e.is_bug?[xr({...e,is_notice:!1}),...l]:e.completed?[Fs,...l]:[Ga(e.status),...l]}function Ad(e){return{bg:`${e}1f`,fg:e,dot:e}}function Xa(e,f){return e.includes(f)?e.filter(g=>g!==f):[...e,f]}import{Box as Za}from"@mui/material";import{jsx as Ws,jsxs as Qy}from"react/jsx-runtime";function Lt({option:e,small:f=!1}){let g=lt(),l=g.mode==="dark",o=e.key==="not_started";return Qy(Za,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:f?.5:.75,...o?{pr:f?.5:.75}:{px:f?.9:1.25},py:o?0:f?.25:.5,borderRadius:1.25,fontSize:f?11.5:13,fontWeight:500,bgcolor:o?"transparent":l?Vi(e.dot,g.chip.darkBgAlpha):e.bg,color:o?l?g.chip.plainColor:e.fg:l?g.chip.darkTextSource==="fg"?e.fg:e.dot:e.fg,whiteSpace:"nowrap"},children:[Ws(Za,{component:"span",sx:{width:f?6:8,height:f?6:8,borderRadius:"50%",bgcolor:e.dot,flexShrink:0}}),e.name]})}function AI({task:e,statusOptions:f,small:g=!1}){let l=Ki(e,f);return l.length===0?null:Ws(Za,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:.5},children:l.map(o=>Ws(Lt,{option:o,small:g},o.key))})}function Zo({labelKeys:e,labelOptions:f}){let g=new Map(f.map(o=>[o.key,o])),l=e.map(o=>g.get(o)).filter(o=>!!o);return l.length===0?null:Ws(Za,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:.5},children:l.map(o=>Ws(Lt,{option:o,small:!0},o.key))})}import{jsx as Us,jsxs as Pd}from"react/jsx-runtime";function Gi({anchorEl:e,value:f,options:g=gn,onSelect:l,onComplete:o,onClose:s}){let r=Jn();return Pd(tx,{anchorEl:e,open:!!e,onClose:s,transitionDuration:0,...r,children:[g.map(t=>Pd(Dd,{onClick:()=>{l(t.key),s()},sx:{fontSize:14,minWidth:150,gap:1},children:[Us(Lt,{option:t}),f===t.key?Us(rx,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},t.key)),o?[Us(ex,{sx:{my:.5}},"complete-divider"),Us(Dd,{onClick:()=>{o(),s()},sx:{fontSize:14,minWidth:150,gap:1},children:Us(Lt,{option:Fs})},"complete")]:null]})}function Uc(e){let f=String(e??"").trim().replace("T"," "),g=f.match(/^(\d{4})-(\d{2})-(\d{2})(?:[ ](\d{2}):(\d{2})(?::(\d{2}))?)?/);return g?new Date(Number(g[1]),Number(g[2])-1,Number(g[3]),Number(g[4]??0),Number(g[5]??0),Number(g[6]??0)):new Date(f)}function mr(e,f="YYYY-MM-DD"){let g=typeof e=="string"?Uc(e):e;if(!e||e===""||isNaN(g.getTime()))return"";let l=g.getFullYear(),o=(g.getMonth()+1).toString().padStart(2,"0"),s=g.getDate().toString().padStart(2,"0"),r=l.toString().slice(-2);switch(f){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 f.replace(/YYYY/g,l.toString()).replace(/YY/g,r).replace(/MM/g,o).replace(/DD/g,s)}}function Nd(){return mr(new Date)}var Vc=[{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"}],nx="__notice__",ox="__bug__",ix="__support__";function sx(e){let f=new Date(`${e}T00:00:00`);return f.setDate(f.getDate()+(6-f.getDay())),mr(f)}var ax=[{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 lx(e,f,g){let l=e.due_date.slice(0,10);return l?l<f?"overdue":l===f?"today":l<=g?"this_week":"later":"no_due"}function cx(e){return typeof e=="function"?e:f=>f.is_bug?"bug":f.is_support?"support":null}function Ja(e,f,g,l=[],o=[],s="",r,t=!1){let n=e.filter(d=>d.is_notice);if(n.length>0){let d=Ja(e.filter(u=>!u.is_notice),f,g,l,o,s,r,t);return[{key:nx,label:"\uACF5\uC9C0\uC0AC\uD56D",tasks:n},...d]}if(t){let d=cx(t),u=e.filter(m=>d(m)==="bug"),b=e.filter(m=>d(m)==="support");if(u.length>0||b.length>0){let m=Ja(e.filter(x=>d(x)===null),f,g,l,o,s,r,!1);return[...u.length>0?[{key:ox,label:"\uC624\uB958",tasks:u}]:[],...b.length>0?[{key:ix,label:"\uACE0\uAC1D\uC13C\uD130",tasks:b}]:[],...m]}}let c=new Map,i=(d,u)=>{let b=c.get(d);b?b.push(u):c.set(d,[u])},a;if(f==="due"){let d=sx(g);for(let u of e)i(lx(u,g,d),u);a=ax}else if(f==="status"){for(let d of e)i(Ga(d.status).key,d);a=gn.map(d=>({key:d.key,label:d.name}))}else if(f==="tab"){for(let d of e)i(d.tab_key?.trim()||"__none__",d);a=[...l.filter(d=>!d.archived).map(d=>({key:d.key,label:d.label})),{key:"__none__",label:"\uAE30\uBCF8 \uC5C5\uBB34\uD568"},...l.filter(d=>d.archived).map(d=>({key:d.key,label:`${d.label} (\uBCF4\uAD00\uB428)`}))]}else if(r?.enabled){let d=Number(r.myAccountSeq??0),u=s.trim();for(let b of e){if(b.is_event){i("__event__",b);continue}if(!(Number(b.manager_account_seq??0)>0||String(b.manager_name??"").trim()!=="")){i("__none__",b);continue}let x=d>0&&Number(b.manager_account_seq??0)===d||!!u&&String(b.manager_name??"").trim()===u;i(x?"__manager__":"__reference__",b)}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 x of e)i(x.is_event?"__event__":String(x.manager_name??"").trim()||"__none__",x);let d=s.trim(),u=[...c.keys()].filter(x=>x!=="__none__"&&x!=="__event__").sort((x,k)=>{if(d){if(x===d)return-1;if(k===d)return 1}return x.localeCompare(k)}),b=!!d&&u.includes(d),m=u.filter(x=>x!==d);a=[...b?[{key:d,label:"\uB0B4 \uC5C5\uBB34"}]:[],{key:"__none__",label:"\uCC45\uC784\uC790 \uBBF8\uBC30\uC815"},{key:"__event__",label:"\uC77C\uC815"},...m.map(x=>({key:x,label:x}))]}let h=[];for(let d of a){let u=c.get(d.key);!u||u.length===0||h.push({key:d.key,label:d.label,tasks:u})}return h}import ux from"@mui/icons-material/LabelOutlined";import fx from"@mui/icons-material/NotesOutlined";import dx from"@mui/icons-material/AutorenewOutlined";import hx from"@mui/icons-material/CalendarTodayOutlined";import px from"@mui/icons-material/EventOutlined";import Ld from"@mui/icons-material/PersonOutlineOutlined";import zd from"@mui/icons-material/PeopleAltOutlined";import Yc from"@mui/icons-material/CheckCircleOutlineOutlined";import mx from"@mui/icons-material/FlagOutlined";import Xc from"@mui/icons-material/AccessTimeOutlined";import gx from"@mui/icons-material/StickyNote2Outlined";import bx from"@mui/icons-material/ViewKanbanOutlined";import yx from"@mui/icons-material/ConfirmationNumberOutlined";import xx from"@mui/icons-material/QuestionAnswerOutlined";import{jsx as vr}from"react/jsx-runtime";var jd={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 Fd(e){return el(e).map(f=>jd[f.id]).join(" ")}function qd(e){return el(e).reduce((f,g)=>{let l=jd[g.id]??"",o=/^(\d+)px$/.exec(l);if(o)return f+Number(o[1]);let s=/^minmax\((\d+)px/.exec(l);return s?f+Number(s[1]):f},0)}var vx={id:"deleted_time",label:"\uC0AD\uC81C\uC77C\uC2DC",icon:vr(Xc,{sx:{fontSize:15}}),align:"center",sortable:!0},wx={id:"completed_time",label:"\uC644\uB8CC\uC77C\uC2DC",icon:vr(Xc,{sx:{fontSize:15}}),align:"center",sortable:!0},_x={id:"created_time",label:"\uC791\uC131\uC77C\uC2DC",icon:vr(Xc,{sx:{fontSize:15}}),align:"center",sortable:!0},kx={id:"ticket_no",label:"\uD2F0\uCF13",icon:vr(yx,{sx:{fontSize:15}}),align:"center"},Sx={id:"support_type",label:"\uC885\uB958",icon:vr(ux,{sx:{fontSize:15}}),align:"center"},Tx={id:"author_name",label:"\uC791\uC131\uC790",icon:vr(Ld,{sx:{fontSize:15}}),align:"center",valueFilter:"author_name"},Cx={id:"answerer_names",label:"\uB2F5\uBCC0\uC790",icon:vr(xx,{sx:{fontSize:15}}),align:"center",valueFilter:"answerer_names"},Bx={id:"project",label:"\uD504\uB85C\uC81D\uD2B8",icon:vr(bx,{sx:{fontSize:15}}),projectFilter:!0},Ix={id:"targets",label:"\uB300\uC0C1\uC790",icon:vr(zd,{sx:{fontSize:15}})},Gc={id:"priority",label:"\uC911\uC694\uB3C4",icon:vr(mx,{sx:{fontSize:15}}),align:"center",priorityFilter:!0},Ex={id:"ack",label:"\uD655\uC778",icon:vr(Yc,{sx:{fontSize:15}}),align:"center",ackFilter:!0},Mx={id:"confirm",label:"\uD655\uC778",icon:vr(Yc,{sx:{fontSize:15}}),align:"center",ackFilter:!0};function Kc(e){let f=e.findIndex(l=>l.id==="receiver_names"||l.id==="targets"),g=f>=0?f+1:e.findIndex(l=>l.id==="note");return g<0?[...e,Gc]:[...e.slice(0,g),Gc,...e.slice(g)]}function el(e){let{showProject:f=!1,showManager:g=!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=b=>Qa.find(m=>m.id===b);return[u("completed"),Sx,u("title"),u("status"),_x,u("start_date"),u("due_date"),Tx,Cx,{...u("manager_name"),align:"center"},u("receiver_names"),Gc]}let a=u=>{if(!r)return u;let b=u.filter(k=>k.id!=="note"),m=b.findIndex(k=>k.id==="completed"),x=m>=0?m+1:0;return[...b.slice(0,x),kx,...b.slice(x)]};if(s)return a(Kc(Qa.filter(u=>!["manager_name","receiver_names","request"].includes(u.id)).flatMap(u=>u.id==="due_date"?[u,Ix]:u.id==="note"?[Ex,u]:[u])));let h=g?Qa:Qa.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(b=>b.id!=="request");let u=h.findIndex(b=>b.id==="note");h=[...h.slice(0,u),c?vx:wx,...h.slice(u)]}if(i==="action"){let u=h.findIndex(b=>b.id==="note");h=[...h.slice(0,u),Mx,...h.slice(u)]}if(!f)return a(Kc(h));let d=h.findIndex(u=>u.id==="receiver_names");return a(Kc([...h.slice(0,d+1),Bx,...h.slice(d+1)]))}var Qa=[{id:"completed",label:"\uC644\uB8CC",icon:null,align:"center"},{id:"title",label:"\uC81C\uBAA9",icon:vr(fx,{sx:{fontSize:15}}),sortable:!0},{id:"status",label:"\uC0C1\uD0DC",icon:vr(dx,{sx:{fontSize:15}}),align:"center",statusFilter:!0},{id:"start_date",label:"\uC2DC\uC791\uC77C\uC2DC",icon:vr(hx,{sx:{fontSize:15}}),align:"center",sortable:!0},{id:"due_date",label:"\uB9C8\uAC10\uC608\uC815",icon:vr(px,{sx:{fontSize:15}}),align:"center",sortable:!0},{id:"manager_name",label:"\uCC45\uC784\uC790",icon:vr(Ld,{sx:{fontSize:15}}),memberFilter:"manager"},{id:"receiver_names",label:"\uCC38\uC870\uC790",icon:vr(zd,{sx:{fontSize:15}}),memberFilter:"receivers"},{id:"request",label:"\uD655\uC778",icon:vr(Yc,{sx:{fontSize:15}}),align:"center",ackFilter:!0},{id:"note",label:"\uBE44\uACE0",icon:vr(gx,{sx:{fontSize:15}})}];import{Button as $d,ClickAwayListener as Ax,Dialog as Dx,Paper as Px,Popper as Nx,Typography as Lx,Box as zx}from"@mui/material";import{useMediaQuery as Rx,useTheme as Ox}from"@mui/material";function qt(){let{isMobile:e}=ot(),f=Ox(),g=Rx(f.breakpoints.up("lg"));return e!==void 0?e:!g}import{Fragment as Fx,jsx as Jo,jsxs as Wd}from"react/jsx-runtime";function Hd(){if(typeof document>"u")return;let e=0,f=l=>{l.stopPropagation(),l.preventDefault(),g()},g=()=>{window.clearTimeout(e),document.removeEventListener("click",f,!0)};document.addEventListener("click",f,!0),e=window.setTimeout(g,350)}function jx({title:e,content:f,confirmText:g,cancelText:l,titleFontSize:o,actionFontSize:s,actionMinHeight:r,onCancel:t,onConfirm:n}){return Wd(Fx,{children:[Jo(Lx,{component:"div",sx:{fontSize:o,fontWeight:700,color:"#0f172a",lineHeight:1.4},children:e}),f,Wd(zx,{sx:{display:"flex",gap:2,justifyContent:"flex-end"},children:[Jo($d,{size:"medium",variant:"outlined",color:"inherit",onClick:()=>{Hd(),t()},fullWidth:!0,sx:{fontSize:s,minHeight:r,fontWeight:700},children:l}),Jo($d,{size:"medium",variant:"contained",color:"primary",onClick:()=>{Hd(),n()},fullWidth:!0,sx:{fontSize:s,minHeight:r,fontWeight:700},children:g})]})]})}function At({open:e,anchorEl:f,title:g="\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:d,onConfirm:u}){let b=qt(),m=Jo(jx,{title:g,content:l,confirmText:o,cancelText:s,titleFontSize:c,actionFontSize:i,actionMinHeight:a,onCancel:d,onConfirm:u});return b?Jo(Dx,{open:e,onClose:d,onClick:x=>x.stopPropagation(),onMouseDown:x=>x.stopPropagation(),sx:{zIndex:h},slotProps:{paper:{sx:{p:3,display:"flex",flexDirection:"column",gap:3,minWidth:260}}},children:m}):Jo(Nx,{open:e,anchorEl:f,placement:r,sx:{zIndex:h},children:Jo(Ax,{onClickAway:d,children:Jo(Px,{elevation:4,sx:{p:3,display:"flex",flexDirection:"column",gap:3,minWidth:t,minHeight:n,justifyContent:n?"space-between":"flex-start"},onClick:x=>x.stopPropagation(),onMouseDown:x=>x.stopPropagation(),children:m})})})}import{useEffect as qx,useState as $x}from"react";import{Box as Hx,TextField as Wx}from"@mui/material";import{jsx as Zc}from"react/jsx-runtime";function Zr(e,f){if(!e.completed||f<=0||!e.review_pending||(e.author_account_seq??0)!==f)return!1;let g=e.completed_by_account??0;return g>0&&g!==f}function cn({open:e,anchorEl:f,nextCompleted:g,returnMode:l=!1,onCancel:o,onConfirm:s}){let[r,t]=$x("");qx(()=>{e&&t("")},[e]);let n=!g&&l;return Zc(At,{open:e,anchorEl:f,title:n?`\uC644\uB8CC\uB97C \uB418\uB3CC\uB9AC\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?
30
- \uC0AC\uC720\uB294 \uB313\uAE00\uB85C \uB0A8\uACE0 \uC644\uB8CC \uCC98\uB9AC\uC790\uC5D0\uAC8C \uC54C\uB9BC\uC774 \uAC11\uB2C8\uB2E4.`:g?"\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:n?"\uB418\uB3CC\uB9AC\uAE30":g?"\uC644\uB8CC":"\uD574\uC81C",content:n?Zc(Hx,{sx:{mt:1},children:Zc(Wx,{autoFocus:!0,fullWidth:!0,multiline:!0,minRows:4,size:"small",placeholder:"\uB418\uB3CC\uB9AC\uB294 \uC0AC\uC720\uB97C \uC785\uB825\uD558\uC138\uC694 (\uD544\uC218)",value:r,onChange:c=>t(c.target.value),onClick:c=>c.stopPropagation(),onKeyDown:c=>c.stopPropagation()})}):void 0,onCancel:o,onConfirm:()=>{n&&!r.trim()||s(n?r.trim():"")}})}import{memo as b2}from"react";function Ln(e){let f=e.visibility;return f==="involved"||f==="group"||f==="all"?f:e.is_open?"all":"involved"}function tl(e,f,g=0){if(f<=0)return!1;if(e.is_notice){if((e.author_account_seq??0)===f)return!0;let s=(e.target_account_seqs??[]).filter(r=>r>0);return s.length===0||s.includes(f)}if((e.author_account_seq??0)===f||(e.manager_account_seq??0)===f||(e.receiver_account_seqs??[]).includes(f))return!0;let o=Ln(e);if(o==="all")return!0;if(o==="group"){let s=e.visibility_group_seq??0;return s>0&&g===s}return!1}function Ud(e){return e.is_notice||e.is_event||e.completed||e.archived||(e.manager_account_seq??0)!==0?!1:Ln(e)!=="involved"}function rl(e,f){return f<=0||(e.author_account_seq??0)===f?!1:Ud(e)}function nl(e,f){return f<=0||e.is_notice||e.is_event||e.completed||e.archived||(e.manager_account_seq??0)>0||(e.author_account_seq??0)===f||Ud(e)?!1:(e.receiver_account_seqs??[]).includes(f)}function Vd(e){return!!e.is_bug&&(e.manager_account_seq??0)===0&&e.status==="bug_received"}function ol(e){return(e.origin_license_seq??0)>0}function Kd(e,f){if(f<=0)return!1;let g=(e.author_account_seq??0)===f;return e.is_notice?g:g||(e.manager_account_seq??0)===f}function Qn(e,f){return f<=0?!1:ol(e)?!0:e.is_notice?(e.author_account_seq??0)===f:(e.author_account_seq??0)===f||(e.manager_account_seq??0)===f||(e.receiver_account_seqs??[]).includes(f)}function Ux(e,f){return f<=0?!1:ol(e)?!0:e.is_notice?(e.author_account_seq??0)===f:(e.author_account_seq??0)===f||(e.manager_account_seq??0)===f}function Vx(e,f){return f<=0?!1:ol(e)?!0:(e.author_account_seq??0)===f}function Qo(e,f,g){return g==="coreAuthorManager"?!Ux(e,f):!Qn(e,f)}function Ti(e,f,g,l){return g==="coreAuthorManager"?!Vx(e,f):l}var wE=[119,121,141,143];function il(e,f){let g=String(e.origin_author_avatar??"").trim(),l=String(e.author_name||e.origin_author_name||e.created_by||"").trim();if(!g||!l||!ol(e)||f?.get(l)===g)return f;let o=new Map(f??[]);return o.set(l,g),o}import{memo as a2,useEffect as l2,useRef as c2,useState as eu}from"react";import{Box as Tt,Button as th,ButtonBase as u2,Checkbox as f2,Tooltip as Ji}from"@mui/material";import d2 from"@mui/icons-material/PublicOutlined";import h2 from"@mui/icons-material/Group";import p2 from"@mui/icons-material/CheckCircle";import m2 from"@mui/icons-material/CheckCircleOutlineOutlined";import{useEffect as Kx,useState as Gd}from"react";import{Avatar as Yd,Box as Gx}from"@mui/material";import Yx from"@mui/icons-material/PersonOutlineOutlined";import{jsx as sl}from"react/jsx-runtime";var Jc=new Set,Xd=e=>e.startsWith("data:")||e.startsWith("blob:");function Xx(e){let f=e.trim();return f?([...f][0]??"").toUpperCase():""}function Tn({src:e,name:f="",avatarSx:g,iconFontSize:l=40}){let[o,s]=Gd(()=>e?Xd(e)||Jc.has(e):!1),[r,t]=Gd(!1),n={position:"relative",overflow:"hidden",borderRadius:"15px"},c=g?[n,...Array.isArray(g)?g:[g]]:n;if(Kx(()=>{t(!1),s(e?Xd(e)||Jc.has(e):!1)},[e]),!e||r){let i=Xx(f);return sl(Yd,{sx:c,children:i?sl(Gx,{component:"span",sx:{fontSize:"inherit",fontWeight:600,lineHeight:1,userSelect:"none"},children:i}):sl(Yx,{sx:{fontSize:l}})})}return sl(Yd,{src:e,imgProps:{onLoad:()=>{Jc.add(e),s(!0)},onError:()=>t(!0),style:o?void 0:{opacity:0}},sx:c})}var Zx=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),al=(e,f)=>{if(!f||!f.trim())return[{text:e,highlight:!1}];try{let g=Zx(f.trim()),l=new RegExp(`(${g})`,"gi");return e.split(l).map(s=>s.toLowerCase()===f.trim().toLowerCase()?{text:s,highlight:!0}:{text:s,highlight:!1}).filter(s=>s.text)}catch{return[{text:e,highlight:!1}]}};var Jx=["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"];function Cn(e){let f=String(e??"").trim().slice(0,10);if(!/^\d{4}-\d{2}-\d{2}$/.test(f))return"";let g=new Date(`${f}T00:00:00`);return Number.isNaN(g.getTime())?"":`${f.slice(2).replaceAll("-",".")} (${Jx[g.getDay()]})`}function Qc(e){let f=String(e??"").trim().slice(0,10);if(!/^\d{4}-\d{2}-\d{2}$/.test(f))return"";let g=Number(f.slice(5,7)),l=Number(f.slice(8,10));return!g||!l?"":`${g}\uC6D4 ${l}\uC77C`}function bn(e){let f=String(e??"").trim(),[g,l=""]=f.split(" "),o=Cn(g);return o?l?`${o} ${l.slice(0,5)}`:o:""}function Yi(e,f){let g=(e.checklist??[]).filter(o=>!(f&&o.task_seq&&!f(Number(o.task_seq))));return g.length===0?"":`${g.filter(o=>o.checked).length}/${g.length}`}import{Box as Zd,Tooltip as Qx}from"@mui/material";import{jsx as ll}from"react/jsx-runtime";var Xi=[{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 Jr({names:e,size:f=22,ringFirst:g=!1,avatarSrcByName:l}){let o=lt(),s=ot().avatarSrcByName,r=l??s;return ll(Zd,{sx:{display:"flex",alignItems:"center"},children:e.map((t,n)=>ll(Qx,{title:g&&n===0?`\uCC45\uC784\uC790 \xB7 ${t}`:t,arrow:!0,children:ll(Zd,{sx:{ml:n===0?0:"-7px",zIndex:n,borderRadius:"50%",border:`2px solid ${o.avatar.separatorColor}`,display:"inline-flex",...o.avatar.sx},children:ll(Tn,{src:r?.get(t)??"",name:t,avatarSx:{width:f,height:f,fontSize:Math.round(f/2),borderRadius:"50%",...Xi[n%Xi.length]},iconFontSize:Math.round(f*.6)})})},`${t}-${n}`))})}import{Box as Jd,Button as eh}from"@mui/material";import e2 from"@mui/icons-material/CheckCircle";import{Fragment as n2,jsx as Vs,jsxs as Qd}from"react/jsx-runtime";function t2(e){let f=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:f?e.colors.surfaceHover:"linear-gradient(180deg, #ffffff 0%, #f6f7f9 100%)",whiteSpace:"nowrap","&:hover":{background:f?e.colors.surfaceSubtle:"linear-gradient(180deg, #fcfcfd 0%, #f0f2f4 100%)",borderColor:e.colors.borderStrong}}}function r2(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}}var ei={minWidth:0,px:1.25,py:.25,fontSize:13,fontWeight:600,whiteSpace:"nowrap",color:"#fff",backgroundColor:"#8b5cf6",backgroundImage:"linear-gradient(180deg, #a685f9 0%, #8b5cf6 100%)",boxShadow:"none","&:hover":{backgroundColor:"#7c4ee8",backgroundImage:"linear-gradient(180deg, #9873f2 0%, #7c4ee8 100%)",boxShadow:"none"}};function eo({onClick:e,children:f,fullWidth:g=!1,sx:l}){let o=lt();return Vs(eh,{size:"small",variant:"contained",color:"inherit",fullWidth:g,sx:[r2(o),...Array.isArray(l)?l:l?[l]:[]],onClick:s=>{s.stopPropagation(),e(s)},children:f})}function Zi({canConfirm:e,count:f,total:g,myConfirmed:l=!1,onConfirm:o,onShowList:s}){let r=lt(),t=t2(r);return e?Vs(eo,{onClick:()=>o(),children:"\uD655\uC778"}):Qd(eh,{size:"small",variant:"outlined",color:"inherit",sx:t,onClick:n=>{n.stopPropagation(),s(n.currentTarget)},children:[l?Vs(e2,{sx:{fontSize:16,color:"#2f80ed",flexShrink:0}}):null,Vs(Jd,{component:"span",sx:{flex:1,textAlign:"center",minWidth:0},children:g>0&&f>=g?"\uD655\uC778\uC644\uB8CC":Qd(n2,{children:[f,Vs(Jd,{component:"span",sx:{mx:.15},children:"/"}),g]})})]})}import{jsx as o2}from"react/jsx-runtime";function ti({anchorEl:e,onCancel:f,onConfirm:g}){return o2(At,{open:!!e,anchorEl:e,title:"\uAC80\uC218\uB97C \uC644\uB8CC\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",onCancel:f,onConfirm:g})}import{SvgIcon as i2}from"@mui/material";import{jsx as cl,jsxs as s2}from"react/jsx-runtime";function ri({sx:e,...f}){return s2(i2,{viewBox:"0 0 48 48",...f,sx:{fill:"none",...e},children:[cl("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"}),cl("circle",{cx:"23.91",cy:"21.46",r:"2.71",fill:"currentColor",stroke:"none"}),cl("circle",{cx:"33.65",cy:"21.46",r:"2.71",fill:"currentColor",stroke:"none"}),cl("circle",{cx:"14.18",cy:"21.46",r:"2.71",fill:"currentColor",stroke:"none"})]})}import{Fragment as ul,jsx as je,jsxs as Ci}from"react/jsx-runtime";function Ks(e){let f=String(e??"").trim();if(!f)return"-";let g=f.slice(2,10).replaceAll("-","."),l=f.slice(11,16);return/^\d{2}:\d{2}$/.test(l)?`${g} ${l}`:g}function g2(e){let f=String(e.event_time??"").trim();return e.is_event&&/^\d{2}:\d{2}$/.test(f)?Ks(`${String(e.due_date??"").slice(0,10)} ${f}`):Ks(e.due_date)}function ru(e,f){let g=String(e??"").trim()||"-";return al(g,f).map((l,o)=>je("span",{className:l.highlight?"font-semibold text-blue-600":void 0,children:l.text},`${l.text}-${o}`))}function Qi({names:e,searchText:f,avatarSrcByName:g,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 Ci(ul,{children:[je(Tn,{src:g?.get(s)??"",name:s,avatarSx:{width:24,height:24,fontSize:12,borderRadius:"50%",...Xi[0]},iconFontSize:15}),je(Tt,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...l?{fontWeight:500,color:"#2f80ed"}:{}},children:ru(s,f)})]})}return je(Jr,{names:o,size:22,avatarSrcByName:g})}function rh({display:e,summary:f,searchText:g,avatarSrcByName:l}){if(!e||e.kind==="everyone")return je(Tt,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:f||"\uBAA8\uB4E0 \uC9C1\uC6D0"});let{teamNames:o,individualNames:s}=e;if(o.length===0)return je(Qi,{names:s,searchText:g,avatarSrcByName:l});let r=[...o,...s],t=r.join(", ");return r.length>2?je(Ji,{title:t,arrow:!0,children:je(Tt,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:`${r[0]}, ${r[1]} \uC678 ${r.length-2}\uBA85`})}):je(Ji,{title:t,arrow:!0,children:Ci(Tt,{sx:{display:"flex",alignItems:"center",gap:.75,minWidth:0},children:[je(Tt,{component:"span",sx:{flexShrink:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:o.join(", ")+(s.length>0?",":"")}),s.length>0?je(Qi,{names:s,searchText:g,avatarSrcByName:l}):null]})})}function fl(e){return e==="\uC624\uB958\uC81C\uBCF4"?"\uC624\uB958":e}function nh(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 tu({label:e,bg:f,fg:g}){return je(Tt,{component:"span",sx:{flexShrink:0,px:.75,fontSize:12,fontWeight:500,lineHeight:"20px",color:g,bgcolor:f,borderRadius:"4px",whiteSpace:"nowrap",maxWidth:140,overflow:"hidden",textOverflow:"ellipsis"},children:e})}var oh=a2(function({task:f,gridTemplate:g,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:d=!1,supportMode:u=!1,managerCentered:b=!1,trashMode:m=!1,dimCompleted:x=!0,confirmInfo:k,onConfirmTask:B,projectLabel:R="",projectIcon:j="",onProjectClick:A,onRequestToggleCompleted:P,onDateClick:N,onChangeNote:q,onMemberClick:z,onClaimClick:T,onVolunteerClick:S,onStatusClick:D,onOpenDetail:p,onTaskContextMenu:y,hideBottomBorder:v=!1,completeLocked:w=!1,unread:_=!1,notice:C=!1,noticeReadOnly:O=!1,coreLocked:F,readOnly:$=!1,onIconClick:K,lastColumnCentered:M=!1,noteLocked:H=!1,targetSummary:E="",targetDisplay:I,onArchiveTask:L,ackInfo:U,onAckConfirm:G,onAckListClick:V,onPriorityClick:W}){let[X,Z]=eu(!1),[Y,J]=eu(null),[ee,ne]=eu(""),te=c2(null);l2(()=>{if(!X)return;let pe=Bt=>{let Fe=te.current;Fe&&(Bt.target instanceof Node&&Fe.contains(Bt.target)||Fe.blur())};return document.addEventListener("mousedown",pe,!0),document.addEventListener("touchstart",pe,!0),()=>{document.removeEventListener("mousedown",pe,!0),document.removeEventListener("touchstart",pe,!0)}},[X]);let oe=[f.manager_account_seq??0,...f.receiver_account_seqs??[]].some(pe=>pe>0&&pe!==(f.author_account_seq??0)),se=O||$,de=(F??O)||$,ge=r>0&&!f.is_notice&&!f.is_event&&(f.manager_account_seq??0)===r,ke=de||!!f.is_notice,Be=lt(),Te=!!T&&rl(f,r),Re=!!S&&nl(f,r),it=ke&&!Vd(f),be=f.is_notice?je(Zi,{canConfirm:!!U?.canAck,count:U?.count??0,total:U?.total??0,myConfirmed:!!U?.acked,onConfirm:()=>G?.(f),onShowList:pe=>V?.(f,pe)}):null,ie=!f.is_notice&&!f.completed&&!!f.due_date&&f.due_date.slice(0,10)<=t,Ce=ot(),we=Yi(f,Ce.resolveTask),ve=!f.is_notice&&f.completed&&f.review_pending&&Ce.onReviewDone&&(Ce.myAccountSeq??0)>0&&(f.author_account_seq??0)===(Ce.myAccountSeq??0)?Ci(ul,{children:[je(th,{variant:"contained",size:"small",disableElevation:!0,onClick:pe=>{pe.stopPropagation(),J(pe.currentTarget)},sx:ei,children:"\uAC80\uC218\uC644\uB8CC"}),je(ti,{anchorEl:Y,onCancel:()=>J(null),onConfirm:()=>{Ce.onReviewDone?.(f),J(null)}})]}):null,Ke=ie?"#e5484d":Be.colors.textPrimary,De=je(Tt,{className:"cell",onClick:de?void 0:pe=>N(f,"due_date",pe.currentTarget),sx:{justifyContent:"center",color:Ke,fontWeight:500,whiteSpace:"nowrap",...de?{}:{cursor:"pointer","&:hover":{bgcolor:Be.table.cellHoverBg}}},children:f.due_date?g2(f):null});return Ci(Tt,{onContextMenu:pe=>y(f,pe),sx:{display:"grid",gridTemplateColumns:g,minHeight:48,position:"relative",fontSize:15,bgcolor:Be.table.rowBg,color:Be.table.rowColor,borderBottom:v?"none":`1px solid ${Be.table.rowBorderColor}`,"&:hover":{bgcolor:Be.table.rowHoverBg},"& > .cell":{px:1,minWidth:0,display:"flex",alignItems:"center",borderRight:`1px solid ${Be.table.rowBorderColor}`},"& > .cell:first-of-type":{px:1.5},"& > .cell:last-of-type":{borderRight:"none",pr:2,...M?{pl:2}:{}}},children:[je(Tt,{className:"cell",sx:{justifyContent:"center"},children:f.is_event?(()=>{let pe=Et(f.icon||yr);if(!pe)return null;let Bt=je(pe,{sx:{fontSize:19,color:f.icon_color||"#1e3a8a"}});return se||!K?Bt:je(Ji,{title:"\uC544\uC774\uCF58 \uBCC0\uACBD",arrow:!0,enterDelay:400,disableInteractive:!0,children:je(u2,{onClick:Fe=>{Fe.stopPropagation(),K(f,Fe.currentTarget)},sx:{p:.25,borderRadius:1,"&:hover":{bgcolor:Be.table.cellHoverBg}},children:Bt})})})():!O&&!w&&!m?je(Ji,{title:f.completed&&f.completed_by?`${f.completed_by} \xB7 ${bn(f.completed_time)} \uC644\uB8CC`:f.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC",arrow:!0,enterDelay:300,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:je(f2,{checked:f.completed,inputProps:{"aria-label":f.completed?`${f.title} \uC644\uB8CC \uD574\uC81C`:`${f.title} \uC644\uB8CC \uCC98\uB9AC`},icon:je(m2,{sx:{fontSize:20,color:"#9a9a97",opacity:.45}}),checkedIcon:je(p2,{sx:{fontSize:20,color:"#2f80ed"}}),onClick:pe=>pe.stopPropagation(),onChange:(pe,Bt)=>P({anchorEl:pe.currentTarget,task:f,nextCompleted:Bt}),sx:{p:.5}})}):null}),d?je(Tt,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap",fontVariantNumeric:"tabular-nums",color:"#37352f"},children:f.ticket_no||"-"}):null,u?je(Tt,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap"},children:f.support_type?(()=>{let pe=nh(f.support_type);return je(tu,{label:fl(f.support_type),bg:pe.bg,fg:pe.fg})})():"-"}):null,Ci(Tt,{className:"cell",onClick:()=>p(f),sx:{gap:1,pl:2,cursor:"pointer","&:hover":{bgcolor:Be.table.cellHoverBg}},children:[(()=>{if(!f.is_notice)return null;let pe=Et(f.icon||pr);return pe?je(pe,{sx:{fontSize:18,flexShrink:0,color:f.icon_color||"#e5484d"}}):null})(),!u&&f.is_support&&f.support_type?(()=>{let pe=nh(f.support_type);return je(tu,{label:fl(f.support_type),bg:pe.bg,fg:pe.fg})})():null,d&&(f.origin_license_seq??0)>0&&f.origin_license_name?je(tu,{label:f.origin_license_name,bg:"#fdf0e6",fg:"#d9730d"}):null,(()=>{if(f.is_notice||u||f.is_support)return null;let pe=Ln(f);return pe==="involved"?null:je(Ji,{title:pe==="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:pe==="all"?je(d2,{sx:{fontSize:15,flexShrink:0,color:"#2f80ed"}}):je(h2,{sx:{fontSize:15,flexShrink:0,color:"#d9730d"}})})})(),je(Tt,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:15,fontWeight:f.completed&&x?400:Be.table.rowTitleFontWeight,color:f.completed&&x?Be.colors.textMuted:Be.table.rowTitleColor,textDecoration:f.completed&&x?"line-through":"none"},children:ru(f.title,s)}),we?je(Tt,{component:"span",sx:{flexShrink:0,fontSize:12.5,color:Be.colors.textMuted,fontVariantNumeric:"tabular-nums"},children:we}):null,(f.comment_count??f.comments?.length??0)>0?je(ri,{sx:{fontSize:16,flexShrink:0,color:"#9a9a97"}}):null,je(Tt,{sx:{flexShrink:0,display:"flex",alignItems:"center"},children:je(Zo,{labelKeys:f.label_keys??[],labelOptions:l})}),_&&!f.completed?je(Tt,{component:"span",sx:{flexShrink:0,px:.55,fontSize:10.5,fontWeight:700,lineHeight:1.6,color:"#fff",bgcolor:"#e5484d",borderRadius:"4px"},children:"N"}):null,Ka(f)&&!f.archived&&!se&&L?je(th,{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:pe=>{pe.stopPropagation(),L(f)},children:"\uBCF4\uAD00"}):null]}),(()=>{let pe=se||!!f.is_event||!!f.completed;return je(Tt,{className:"cell",onClick:pe?void 0:Bt=>D(f,Bt.currentTarget),sx:{py:.5,justifyContent:"center",...pe?{}:{cursor:"pointer","&:hover":{bgcolor:Be.table.cellHoverBg}}},children:f.is_event?(()=>{let Bt=Hs(f);return Bt?je(Lt,{option:Bt}):null})():je(Lt,{option:xr(f)})})})(),u?je(Tt,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap",fontVariantNumeric:"tabular-nums"},children:Ks(f.created_time)}):null,je(Tt,{className:"cell",onClick:de?void 0:pe=>N(f,"start_date",pe.currentTarget),sx:{justifyContent:"center",whiteSpace:"nowrap",...de?{}:{cursor:"pointer","&:hover":{bgcolor:Be.table.cellHoverBg}}},children:Ks(f.start_date)}),De,u?Ci(ul,{children:[je(Ji,{title:f.origin_license_name||"",arrow:!0,placement:"top",disableInteractive:!0,slotProps:{transition:{timeout:0}},children:je(Tt,{className:"cell",sx:{gap:.75,justifyContent:"center"},children:je(Qi,{names:[f.author_name||f.origin_author_name||f.created_by||""],searchText:s,avatarSrcByName:il(f,o)})})}),je(Tt,{className:"cell",sx:{gap:.75,justifyContent:"center"},children:je(Qi,{names:(f.answerer_names??[]).slice(0,1),searchText:s,avatarSrcByName:o})})]}):null,C?je(Tt,{className:"cell",onClick:de?void 0:()=>z(f,"targets"),sx:{gap:.75,...de?{}:{cursor:"pointer","&:hover":{bgcolor:Be.table.cellHoverBg}}},children:je(rh,{display:I,summary:E,searchText:s,avatarSrcByName:o})}):null,!C&&f.is_notice?je(Tt,{className:"cell",onClick:de?void 0:()=>z(f,"targets"),sx:{gridColumn:c?"span 2":"auto",gap:.75,...de?{}:{cursor:"pointer","&:hover":{bgcolor:Be.table.cellHoverBg}}},children:je(rh,{display:I,summary:E,searchText:s,avatarSrcByName:o})}):null,!C&&!f.is_notice&&!f.is_event&&c?je(Tt,{className:"cell",onClick:it?void 0:()=>z(f,"manager"),sx:{gap:.75,...Te||Re||b?{justifyContent:"center"}:{},...it?{}:{cursor:"pointer","&:hover":{bgcolor:Be.table.cellHoverBg}}},children:Te?je(eo,{onClick:pe=>T?.(f,pe.currentTarget),children:"\uAC00\uC838\uAC00\uAE30"}):Re?je(eo,{onClick:pe=>S?.(f,pe.currentTarget),children:"\uAC00\uC838\uAC00\uAE30"}):je(Qi,{names:f.manager_name?[f.manager_name]:[],searchText:s,avatarSrcByName:o,emphasize:ge})}):null,!C&&!f.is_notice?je(Tt,{className:"cell",onClick:ke?void 0:()=>z(f,"receivers"),sx:{gridColumn:f.is_event&&c?"span 2":"auto",gap:.75,...ke?{}:{cursor:"pointer","&:hover":{bgcolor:Be.table.cellHoverBg}}},children:je(Qi,{names:f.receiver_names,searchText:s,avatarSrcByName:o})}):null,je(Tt,{className:"cell",onClick:se?void 0:pe=>W?.(f,pe.currentTarget),sx:{py:.5,justifyContent:"center",...se?{}:{cursor:"pointer","&:hover":{bgcolor:Be.table.cellHoverBg}}},children:je(Xr,{priority:f.priority,plain:!0})}),n?je(Tt,{className:"cell",onClick:de?void 0:pe=>A?.(f,pe.currentTarget),sx:{gap:.5,justifyContent:"flex-start",...de?{}:{cursor:"pointer","&:hover":{bgcolor:Be.table.cellHoverBg}}},children:R?Ci(ul,{children:[(()=>{let pe=Et(j);return pe?je(pe,{sx:{fontSize:15,flexShrink:0,color:"#1e3a8a"}}):null})(),je(Tt,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:R})]}):null}):null,C?je(Tt,{className:"cell",sx:{justifyContent:"center"},children:be}):null,!C&&i&&a&&!u?je(Tt,{className:"cell",sx:{justifyContent:"center"},children:f.is_notice?be:ve||(oe?je(Zi,{canConfirm:!!k?.canConfirm,count:k?.count??0,total:k?.total??0,myConfirmed:!!k?.myTime,onConfirm:()=>B?.(f),onShowList:pe=>V?.(f,pe)}):null)}):null,!C&&h==="action"?je(Tt,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap",color:Be.table.rowSubColor},children:f.is_notice?be:ve||(k&&k.total>0?je(Zi,{canConfirm:!!k.canConfirm,count:k.count,total:k.total,myConfirmed:!!k.myTime,onConfirm:()=>B?.(f),onShowList:pe=>V?.(f,pe)}):"-")}):null,!C&&!i?je(Tt,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap",color:m?Be.colors.danger:x?Be.table.rowSubColor:Be.table.rowTitleColor},children:m?Ks(f.deleted_time):f.completed_time||"-"}):null,d||u?null:je(Tt,{className:"cell",onClick:()=>{!H&&!X&&(ne(f.note),Z(!0))},sx:{color:"#6f6f6c",cursor:H?"default":"text"},children:X?je(Tt,{component:"input",ref:te,autoFocus:!0,spellCheck:!1,value:ee,onChange:pe=>ne(pe.target.value),onBlur:()=>{Z(!1),ee.trim()!==f.note&&q(f.seq,ee)},onKeyDown:pe=>{pe.key==="Enter"&&pe.target.blur(),pe.key==="Escape"&&(ne(f.note),Z(!1))},sx:{flex:1,minWidth:0,width:"100%",border:"none",outline:"none",bgcolor:"transparent",font:"inherit",lineHeight:"inherit",letterSpacing:"inherit",color:Be.table.rowTitleColor,caretColor:Be.table.rowTitleColor,p:0,m:0}}):je(Tt,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:f.note?ru(f.note,s):""})}),ge?je(Tt,{component:"span",sx:{position:"absolute",left:3,top:6,bottom:6,width:3,bgcolor:"#2f80ed",borderRadius:1.5,pointerEvents:"none"}}):null]})});import{jsx as y2}from"react/jsx-runtime";var ih=b2(function(f){let l=(f.useTaskItem?f.useTaskItem(f.task.seq):void 0)??f.task,{myAccountSeq:o}=f,{editPolicy:s}=ot(),r=f.projectByKey.get(l.tab_key??"");return y2(oh,{hideBottomBorder:f.hideBottomBorder,gridTemplate:f.gridTemplate,task:l,statusOptions:f.statusOptions,avatarSrcByName:f.avatarSrcByName,searchText:f.searchText,myAccountSeq:o,todayStr:f.todayStr,showProject:f.showProject,showManager:f.showManager,showActions:f.showActions,showRequest:f.showRequest,confirmMode:f.confirmMode,confirmInfo:l.is_notice?void 0:f.getConfirmInfo?.(l),onConfirmTask:f.onConfirmTask,projectLabel:r?.label??"",projectIcon:r?.icon??"",onProjectClick:f.onProjectClick,onRequestReply:f.onRequestReply,onRequestToggleCompleted:f.onRequestToggleCompleted,onDateClick:f.onDateClick,onChangeNote:f.onChangeNote,onMemberClick:f.onMemberClick,onClaimClick:f.onClaimClick,onVolunteerClick:f.onVolunteerClick,onStatusClick:f.onStatusClick,onOpenDetail:f.onOpenDetail,onTaskContextMenu:f.onTaskContextMenu,notice:f.notice,bugMode:f.bugMode,supportMode:f.supportMode,managerCentered:f.managerCentered,trashMode:f.trashMode,dimCompleted:f.dimCompleted,noticeReadOnly:!Qn(l,o),coreLocked:Qo(l,o,s),readOnly:f.readOnly,noteLocked:f.readOnly||(l.is_notice?!tl(l,o):!Qn(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?f.getTargetSummary?.(l):void 0,targetDisplay:l.is_notice?f.getTargetDisplay?.(l):void 0,onArchiveTask:f.onArchiveTask,unread:f.isTaskUnread?.(l)??!1,ackInfo:l.is_notice?f.getAckInfo?.(l):void 0,onAckConfirm:f.onAckConfirm,onAckListClick:f.onAckListClick,onPriorityClick:f.onPriorityClick,onIconClick:f.onIconClick,lastColumnCentered:f.lastColumnCentered})});import{useMemo as sh,useState as ou}from"react";import{Box as Bi,Button as ah,ButtonBase as lh,Dialog as w2,Divider as iu,Menu as _2,MenuItem as k2,Popover as S2}from"@mui/material";import ch from"@mui/icons-material/ChevronRight";import T2 from"@mui/icons-material/Check";import C2 from"@mui/icons-material/NotificationsActiveOutlined";import{SimpleCalendar as B2,TimePicker as I2}from"@ehfuse/mui-datetime-picker";import E2 from"@mui/icons-material/TimerOutlined";import{useEffect as x2,useState as v2}from"react";function to(e){let{loadHolidays:f}=ot(),[g,l]=v2(()=>new Map),o=e.join(",");return x2(()=>{if(!f||!o){l(new Map);return}let s=!1;return f(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}},[f,o]),g}var nu=["min30_before","hour1_before","hour2_before","same_day","day_before","two_days_before","three_days_before","week_before"];function ro(e){let f=Array.isArray(e?.reminders)?e?.reminders:[e?.reminder],g=new Set;for(let l of f){let o=String(l??"").trim();nu.includes(o)&&g.add(o)}return nu.filter(l=>g.has(l))}function dl(e,f){if(f==="none")return[];let g=e.includes(f)?e.filter(l=>l!==f):[...e,f];return nu.filter(l=>g.includes(l))}import{Fragment as uh,jsx as jr,jsxs as zn}from"react/jsx-runtime";var M2=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"}],fh=[{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"}],dh=[{value:"none",label:"\uC5C6\uC74C"},...R2,...fh];function su(e){return e?dh:[{value:"none",label:"\uC5C6\uC74C"},...fh]}function O2(e){return e==="same_day"?"\uB2F9\uC77C":dh.find(f=>f.value===e)?.label??"\uC5C6\uC74C"}function au(e){if(e.length===0)return"\uC5C6\uC74C";let f=e.map(g=>O2(g));return f.length<=3?f.join(", "):`${f.slice(0,3).join(", ")} \uC678 ${f.length-3}`}function A2(e){let f=e?new Date(`${e}T00:00:00`):new Date;return Number.isNaN(f.getTime())?new Date:f}function Bn({anchorEl:e,open:f,date:g,reminders:l,hideReminder:o=!1,showTime:s=!1,centered:r=!1,onClose:t,onDateChange:n,onReminderChange:c}){let[i,a]=ou(null),[h,d]=ou(null),u=Jn(),b=String(g??"").trim().slice(0,10),m=String(g??"").trim().slice(11,16),x=/^\d{2}:\d{2}$/.test(m)?m:"",k=(S,D)=>n(D?`${S} ${D}`:S),{defaultDueHour:B}=ot(),R=`${String(Number.isInteger(B)&&B>=0&&B<=23?B:M2).padStart(2,"0")}:00`,j=S=>{if(x)return x;let D=new Date;return S===mr(D)?`${String(D.getHours()).padStart(2,"0")}:${String(D.getMinutes()).padStart(2,"0")}`:R},[A,P]=ou(()=>{let S=Number(b.slice(0,4));return Number.isFinite(S)&&S>1900?S:new Date().getFullYear()}),N=sh(()=>[A-1,A,A+1],[A]),q=to(N),z=sh(()=>{let S=[];for(let D of q.keys()){let p=new Date(`${D}T00:00:00`);Number.isNaN(p.getTime())||S.push(p)}return S},[q]),T=zn(Bi,{sx:{width:300,maxWidth:"100%"},children:[jr(Bi,{sx:{height:320},children:jr(B2,{selectedDate:A2(b),onSelect:S=>{k(mr(S),s?j(mr(S)):x),s||t()},onClose:t,showFooter:!1,autoApply:!0,holidays:z,onYearChange:S=>P(S),onMonthChange:(S,D)=>{typeof D=="number"&&P(D)}})}),s?zn(uh,{children:[jr(iu,{sx:{borderColor:"#e6e6e3"}}),zn(lh,{onClick:S=>d(S.currentTarget),sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",px:2,py:1.25,fontSize:14,"&:hover":{bgcolor:"#f8f8f7"}},children:[zn(Bi,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:.75,color:"#37352f"},children:[jr(E2,{sx:{fontSize:17,color:"#9a9a97"}}),"\uC2DC\uAC01"]}),zn(Bi,{component:"span",sx:{display:"inline-flex",alignItems:"center",color:"#37352f"},children:[x||"\uC5C6\uC74C",jr(ch,{sx:{fontSize:18,ml:.25,color:"#9a9a97"}})]})]}),jr(I2,{anchorEl:h,open:!!h,onClose:()=>d(null),centered:r,value:{hour:x.slice(0,2)||R.slice(0,2),minute:x.slice(3,5)||"00"},format:"HH:mm",minuteStep:5,autoApply:!0,locale:"ko",onChange:(S,D)=>{k(b||mr(new Date),`${S}:${D}`),d(null)}})]}):null,o?null:zn(uh,{children:[jr(iu,{sx:{borderColor:"#e6e6e3"}}),zn(lh,{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:[zn(Bi,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:.75,color:"#37352f"},children:[jr(C2,{sx:{fontSize:17,color:"#9a9a97"}}),"\uC0AC\uC804\uC54C\uB9BC"]}),zn(Bi,{component:"span",sx:{display:"inline-flex",alignItems:"center",color:"#37352f"},children:[au(l),jr(ch,{sx:{fontSize:18,ml:.25,color:"#9a9a97"}})]})]}),jr(_2,{transitionDuration:0,anchorEl:i,open:!!i,onClose:()=>a(null),anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},...u,children:su(!!x).map(S=>{let D=S.value==="none"?l.length===0:l.includes(S.value);return zn(k2,{selected:D,onClick:()=>{c(dl(l,S.value)),S.value==="none"&&a(null)},sx:{fontSize:14,minWidth:140,justifyContent:"space-between",gap:1},children:[S.label,D?jr(T2,{sx:{fontSize:16,color:"#2f80ed"}}):null]},S.value)})})]}),jr(iu,{sx:{borderColor:"#e6e6e3"}}),zn(Bi,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",px:1,py:.5},children:[jr(ah,{size:"small",onClick:()=>{k(mr(new Date),s?j(mr(new Date)):x),t()},sx:{minWidth:0,px:1.25,fontSize:13.5,color:"#2563eb"},children:"\uC624\uB298"}),jr(ah,{size:"small",onClick:t,sx:{minWidth:0,px:1.25,fontSize:13.5,color:"#2563eb"},children:"\uB2EB\uAE30"})]})]});return r?jr(w2,{open:f,onClose:t,slotProps:{paper:{sx:{borderRadius:3,width:300,maxWidth:"calc(100vw - 48px)",overflow:"hidden"}}},children:T}):jr(S2,{transitionDuration:0,open:f,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:T})}import{useEffect as N2,useState as cu}from"react";import{Box as Ii,Button as L2,Switch as z2}from"@mui/material";import{FormDialog as j2}from"@ehfuse/mui-form-dialog";import{ClearTextField as F2}from"@ehfuse/mui-form-controls";import{ErrorAlert as q2}from"@ehfuse/alerts";import{Box as D2,ButtonBase as P2}from"@mui/material";import{jsx as lu}from"react/jsx-runtime";function hl({value:e,onChange:f}){return lu(D2,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(40px, 1fr))",gap:1},children:Pc.map(({key:g,Icon:l})=>{let o=g===e;return lu(P2,{onClick:()=>f(g),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:lu(l,{sx:{fontSize:20}})},g)})})}import{jsx as Co,jsxs as uu}from"react/jsx-runtime";function pl({open:e,title:f="\uC0C8 \uD504\uB85C\uC81D\uD2B8 \uCD94\uAC00",initialLabel:g="",initialIcon:l=Dc,confirmText:o="\uCD94\uAC00",initialUseSprints:s=!1,onClose:r,onSubmit:t}){let[n,c]=cu(""),[i,a]=cu(Dc),[h,d]=cu(!1);N2(()=>{e&&(c(g),a(l),d(s))},[e]);let u=()=>{let m=n.trim();if(!m){q2("\uD504\uB85C\uC81D\uD2B8 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}t(m,i,h),r()};return Co(j2,{open:e,onClose:r,maxWidth:"xs",title:f,locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-add-tab",sections:[{id:"add-tab",showTitle:!1,children:uu(Ii,{children:[Co(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}}),Co(Ii,{sx:{mt:2,fontSize:13,color:"#787774"},children:"\uC544\uC774\uCF58"}),Co(Ii,{sx:{mt:1,maxHeight:264,overflowY:"auto",pr:.5},children:Co(hl,{value:i,onChange:a})}),uu(Ii,{sx:{mt:2,display:"flex",alignItems:"center",justifyContent:"space-between",gap:1},children:[uu(Ii,{children:[Co(Ii,{sx:{fontSize:14,color:"#37352f"},children:"\uBAA9\uD45C(\uC2A4\uD504\uB9B0\uD2B8) \uC0AC\uC6A9"}),Co(Ii,{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)"})]}),Co(z2,{checked:h,onChange:(m,x)=>d(x)})]})]})}],actions:{showCancelButton:!0,right:Co(L2,{variant:"contained",onClick:u,children:o})}})}import{Box as $2}from"@mui/material";import{jsx as H2}from"react/jsx-runtime";function es({size:e=40}){return H2($2,{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 fu,ButtonBase as W2,Divider as U2,Popover as V2}from"@mui/material";import K2 from"@mui/icons-material/Check";import G2 from"@ehfuse/overlay-scrollbar";import{jsx as Ei,jsxs as hh}from"react/jsx-runtime";var du=["#1e3a8a","#2f80ed","#06b6d4","#0fa3a3","#2f9e5b","#84cc16","#e8a33d","#d9730d","#e5484d","#e255a1","#a355c0","#8a5a2b","#57564f","#111827"];function ni({anchorEl:e,value:f,color:g="",onSelect:l,onSelectColor:o,onClose:s}){return Ei(V2,{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:hh(fu,{sx:{width:"min(492px, calc(100vw - 32px))"},children:[Ei(G2,{style:{maxHeight:"min(432px, calc(100dvh - 240px))"},contentStyle:{minWidth:0,padding:10},thumb:{width:6},children:Ei(hl,{value:f||So,onChange:r=>{l(r),s()}})}),o?hh(fu,{sx:{px:1.25,pb:1.25},children:[Ei(U2,{sx:{mb:1,borderColor:"#efefed"}}),Ei(fu,{sx:{display:"grid",gridTemplateColumns:`repeat(${du.length}, 1fr)`,justifyItems:"center"},children:du.map(r=>{let t=(g||du[0])===r;return Ei(W2,{"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?Ei(K2,{sx:{fontSize:15,color:"#ffffff"}}):null},r)})})]}):null]})})}import{Fragment as bh,jsx as yt,jsxs as un}from"react/jsx-runtime";var gh=48,sv=5;function yh({tasks:e,statusOptions:f,avatarSrcByName:g,searchText:l,todayStr:o,sortBy:s,sortDirection:r,onSort:t,onRequestReply:n,onToggleCompleted:c,onChangeTaskDate:i,onChangeTaskReminder:a,groupBy:h,collapsedGroupKeys:d,customTabs:u,onToggleGroup:b,hideCompleted:m=!1,loading:x=!1,dimCompleted:k=!0,readOnly:B=!1,onChangeTaskIcon:R,onChangeTaskIconColor:j,onAddInGroup:A,canAddInGroup:P,renderGroupSummary:N,renderGroupTitleSummary:q,onChangeTaskProject:z,onAddProject:T,onChangeNote:S,onMemberClick:D,onClaimTask:p,onChangeTaskStatus:y,onOpenDetail:v,onTaskContextMenu:w,onMemberFilterClick:_,activeMemberFilters:C=[],onStatusFilterClick:O,statusFilterActive:F=!1,onAckFilterClick:$,ackFilterActive:K=!1,onProjectFilterClick:M,projectFilterActive:H=!1,onPriorityFilterClick:E,priorityFilterActive:I=!1,onValueFilterClick:L,activeValueFilters:U=[],columns:G,getConfirmInfo:V,onConfirmTask:W,myAccountSeq:X=0,currentUserName:Z="",groupManagerByMyRole:Y=!1,pinKindGroups:J=!1,allowManagerVolunteer:ee=!0,noticeAdmin:ne=!1,getTargetSummary:te,getTargetDisplay:oe,onArchiveTask:se,isTaskUnread:de,getAckInfo:ge,onAckConfirm:ke,onAckListClick:Be,onChangeTaskPriority:Te,onEndReached:Re,useTaskItem:it}){let be=lt(),ie=jn(()=>({showManager:!0,showActions:!0,showRequest:!0,...G}),[G]),Ce=ie.showManager??!0,we=ie.showActions??!0,ve=ie.showRequest??!0,Ke=ie.confirmMode??"none",De=ie.notice??!1,pe=ie.bug??!1,Bt=ie.support??!1,Fe=Bt||(ie.centerManager??!1),Ye=ie.trash??!1,_t=h!=="none",tt=jn(()=>_t?Ja(e,h,o,u,f,Z,{enabled:Y,myAccountSeq:X},J):[],[_t,e,h,o,u,f,Z,Y,X,J]),Ae=jn(()=>m?e.filter(ue=>!ue.completed):e,[e,m]),xe=jn(()=>Ae.filter(ue=>ue.completed||ue.archived||ue.is_support?!1:ue.is_notice?!!ge?.(ue).canAck:!!V?.(ue).canConfirm),[Ae,ge,V]),me=jn(()=>X>0?e.filter(ue=>ue.completed&&!ue.archived&&!ue.is_support&&!!ue.review_pending&&(ue.author_account_seq??0)===X):[],[e,X]),Ie=jn(()=>new Set([...xe,...me].map(ue=>ue.seq)),[xe,me]),Xe=jn(()=>tt.map(ue=>({section:ue,visibleTasks:ue.tasks.filter(Le=>!Ie.has(Le.seq)&&(!m||!Le.completed))})).filter(ue=>ue.visibleTasks.length>0),[tt,m,Ie]),qe=jn(()=>new Set(d),[d]),Pe=jn(()=>{let ue=[];if(_t)for(let{section:Le,visibleTasks:dt}of Xe){let Tr=qe.has(Le.key);if(ue.push({kind:"header",section:Le,visibleTasks:dt,collapsed:Tr}),!Tr)for(let Yr of dt)ue.push({kind:"task",task:Yr,last:!1})}else for(let Le of Ae)Ie.has(Le.seq)||ue.push({kind:"task",task:Le,last:!1});for(let Le=ue.length-1;Le>=0;Le-=1){let dt=ue[Le];if(dt.kind==="task"){dt.last=!0;break}}return ue},[_t,Xe,Ae,qe,Ie]),Mt=ie.showProject??(!De&&h!=="tab"),Ue=jn(()=>el({...ie,showProject:Mt}),[ie,Mt]),re=Fd({...ie,showProject:Mt}),le=qd({...ie,showProject:Mt}),{onReturnTask:fe}=ot(),Se=hu(null),pt=hu(null),Me=Ue[Ue.length-1]?.align==="center",ze=jn(()=>{let ue=new Map;for(let Le of u)ue.set(Le.key,{label:Le.archived?`${Le.label} (\uBCF4\uAD00\uB428)`:Le.label,icon:Le.icon});return ue},[u]),St=hu(null),[Oe,Ne]=oo(null);Gs(()=>{if(!Oe)return;let ue=()=>{Se.current&&(Se.current.scrollLeft=Oe.scrollLeft),pt.current&&(pt.current.scrollLeft=Oe.scrollLeft)};return ue(),Oe.addEventListener("scroll",ue,{passive:!0}),()=>Oe.removeEventListener("scroll",ue)},[Oe]);let at=Ae.length>0;Gs(()=>{if(!at){Ne(null);return}let ue=window.requestAnimationFrame(()=>{Ne(St.current?.getScrollContainer()??null)});return()=>window.cancelAnimationFrame(ue)},[at]);let Ge=`${h}|${s}|${r}|${l}|${m?1:0}`;Gs(()=>{Oe&&(Oe.scrollTop=0)},[Ge,Oe]);let[ct,Rt]=oo(!1);Gs(()=>{if(!Oe)return;let ue=()=>Rt(Oe.scrollHeight-Oe.clientHeight>4),Le=window.requestAnimationFrame(ue),dt=new ResizeObserver(ue);return dt.observe(Oe),Oe.firstElementChild&&dt.observe(Oe.firstElementChild),()=>{window.cancelAnimationFrame(Le),dt.disconnect()}},[Oe,Pe.length,d.length]),Gs(()=>{if(!Oe)return;let ue=Oe.clientHeight,Le=new ResizeObserver(()=>{let dt=Oe.clientHeight;dt!==ue&&(ue=dt,Oe.dispatchEvent(new Event("scroll")))});return Le.observe(Oe),()=>Le.disconnect()},[Oe]);let[ht,Ut]=oo(null),[Kt,Yt]=oo(null),[tr,Q]=oo(null),[ae,ye]=oo(null),[he,Ee]=oo(!1),[$e,We]=oo(null),rt=$e?e.find(ue=>ue.seq===$e.taskSeq)??null:null,[Je,Ve]=oo(null),st=Je?e.find(ue=>ue.seq===Je.taskSeq)??null:null,[It,jt]=oo(null),kt=It?e.find(ue=>ue.seq===It.taskSeq)??null:null,Pt=no((ue,Le)=>{jt({anchorEl:Le,taskSeq:ue.seq})},[]),Ot=no((ue,Le)=>{Ve({anchorEl:Le,taskSeq:ue.seq})},[]),Ft=no((ue,Le)=>{We({anchorEl:Le,taskSeq:ue.seq})},[]),Lr=no((ue,Le)=>{if(!Le)return;t(ue,s===ue&&r==="asc"?"desc":"asc")},[t,s,r]),Gr=no((ue,Le,dt)=>{Ut({anchorEl:dt,taskSeq:ue.seq,field:Le,date:ue[Le],isEvent:!!ue.is_event,reminders:ro(ue),completed:ue.completed})},[]),Sn=no((ue,Le)=>{ye({anchorEl:Le,task:ue})},[]),Xn=no(ue=>{ht&&(i(ht.taskSeq,ht.field,ue),Ut(Le=>Le&&{...Le,date:ue}))},[ht,i]),ce=no(ue=>{ht&&(a(ht.taskSeq,ue),Ut(Le=>Le&&{...Le,reminders:ue}))},[ht,a]),Qe=no((ue,Le)=>{Q({anchorEl:Le,taskSeq:ue.seq,title:ue.title,kind:"claim"})},[]),mt=no((ue,Le)=>{Q({anchorEl:Le,taskSeq:ue.seq,title:ue.title,kind:"volunteer"})},[]),zr=(ue,Le)=>yt(ih,{task:ue,hideBottomBorder:Le,gridTemplate:re,useTaskItem:it,statusOptions:f,avatarSrcByName:g,searchText:l,myAccountSeq:X,todayStr:o,showProject:Mt,showManager:Ce,showActions:we,showRequest:ve,confirmMode:Ke,notice:De,bugMode:pe,supportMode:Bt,managerCentered:Fe,trashMode:Ye,dimCompleted:k,readOnly:B,projectByKey:ze,getConfirmInfo:V,onConfirmTask:W,onProjectClick:Sn,onRequestReply:n,onRequestToggleCompleted:Yt,onDateClick:Gr,onChangeNote:S,onMemberClick:D,onClaimClick:p?Qe:void 0,onVolunteerClick:ee?mt:void 0,onStatusClick:Ft,onOpenDetail:v,onTaskContextMenu:w,onPriorityClick:Ot,onIconClick:R?Pt:void 0,lastColumnCentered:Me,getTargetSummary:te,getTargetDisplay:oe,getAckInfo:ge,isTaskUnread:de,onArchiveTask:se,onAckConfirm:ke,onAckListClick:Be},ue.seq);return un(ar,{sx:{display:"flex",flexDirection:"column",flex:1,minHeight:0,border:`1px solid ${be.table.borderColor}`,borderRadius:"0 0 4px 4px",overflow:"hidden",bgcolor:be.table.bg,color:be.table.rowColor,...be.table.sx},children:[yt(ar,{ref:Se,sx:{overflow:"hidden",flexShrink:0},children:yt(ar,{sx:{display:"grid",gridTemplateColumns:re,minWidth:le,borderBottom:`1px solid ${be.table.borderColor}`,flexShrink:0,bgcolor:be.table.headerBg,"& > *":{borderRight:`1px solid ${be.table.rowBorderColor}`},"& > *:first-of-type":{px:1.5},"& > *:last-child":{borderRight:"none",pr:2,...Me?{pl:2}:{}},...be.table.headerSx},children:Ue.map(ue=>{let Le=s===ue.id,dt=!!ue.memberFilter,Tr=dt&&C.includes(ue.memberFilter),Yr=dt||!!ue.statusFilter||!!ue.ackFilter||!!ue.projectFilter||!!ue.priorityFilter||!!ue.valueFilter,Zn=Tr||!!ue.valueFilter&&U.includes(ue.valueFilter)||!!ue.statusFilter&&F||!!ue.ackFilter&&K||!!ue.projectFilter&&H||!!ue.priorityFilter&&I;return un(ar,{onClick:Nn=>{ue.memberFilter?_(ue.memberFilter,Nn.currentTarget):ue.statusFilter?O(Nn.currentTarget):ue.ackFilter?$?.(Nn.currentTarget):ue.projectFilter?M?.(Nn.currentTarget):ue.priorityFilter?E?.(Nn.currentTarget):ue.valueFilter?L?.(ue.valueFilter,Nn.currentTarget):Lr(ue.id,ue.sortable)},sx:{display:"flex",alignItems:"center",justifyContent:ue.align==="center"?"center":"flex-start",gap:.5,px:1,...ue.id==="title"?{pl:2}:{},py:1,minWidth:0,fontSize:be.table.headerFontSize,color:ue.sortable||Yr?be.table.headerActiveColor:be.table.headerColor,whiteSpace:"nowrap",cursor:ue.sortable||Yr?"pointer":"default",userSelect:"none",...Le?{color:be.table.headerFilteredColor}:{},...Zn?{color:be.table.headerFilteredColor,fontWeight:600}:{}},children:[ue.icon,ue.label,Zn?yt(rv,{sx:{fontSize:14}}):null,Le?r==="asc"?yt(J2,{sx:{fontSize:13}}):yt(Q2,{sx:{fontSize:13}}):null]},ue.id)})})}),xe.length>0||me.length>0?yt(ar,{sx:{flexShrink:0,maxHeight:`${be.table.groupHeader.minHeight+1+gh*sv}px`,overflowY:"auto",overflowX:"hidden",borderBottom:"1px solid #000"},ref:pt,children:un(ar,{sx:{minWidth:le},children:[xe.length>0?un(bh,{children:[un(ar,{sx:{position:"sticky",top:0,zIndex:1,display:"flex",alignItems:"center",gap:.5,px:1.5,minHeight:be.table.groupHeader.minHeight,bgcolor:"#fdf3f2",borderBottom:"1px solid #f2d7d4"},children:[yt(ar,{component:"span",sx:{fontSize:be.table.groupHeader.labelFontSize,fontWeight:be.table.groupHeader.labelFontWeight,color:be.table.groupHeader.labelColor},children:"\uBBF8\uD655\uC778"}),yt(ar,{sx:{ml:"auto",display:"flex",alignItems:"center",pr:.5},children:yt(ar,{component:"span",sx:{flexShrink:0,width:be.table.groupHeader.badge.width,py:be.table.groupHeader.badge.paddingY,borderRadius:`${be.table.groupHeader.badge.borderRadius}px`,bgcolor:"#e5484d",color:"#fff",fontSize:be.table.groupHeader.badge.fontSize,fontWeight:be.table.groupHeader.badge.fontWeight,lineHeight:1.6,textAlign:"center",fontVariantNumeric:"tabular-nums"},children:xe.length})})]}),xe.map((ue,Le)=>zr(ue,me.length===0&&Le===xe.length-1))]}):null,me.length>0?un(bh,{children:[un(ar,{sx:{position:"sticky",top:0,zIndex:1,display:"flex",alignItems:"center",gap:.5,px:1.5,minHeight:be.table.groupHeader.minHeight,bgcolor:"#f4f0fe",borderBottom:"1px solid #e2dbf9"},children:[yt(ar,{component:"span",sx:{fontSize:be.table.groupHeader.labelFontSize,fontWeight:be.table.groupHeader.labelFontWeight,color:be.table.groupHeader.labelColor},children:"\uAC80\uC218 \uB300\uAE30"}),yt(ar,{sx:{ml:"auto",display:"flex",alignItems:"center",pr:.5},children:yt(ar,{component:"span",sx:{flexShrink:0,width:be.table.groupHeader.badge.width,py:be.table.groupHeader.badge.paddingY,borderRadius:`${be.table.groupHeader.badge.borderRadius}px`,bgcolor:"#8b5cf6",color:"#fff",fontSize:be.table.groupHeader.badge.fontSize,fontWeight:be.table.groupHeader.badge.fontWeight,lineHeight:1.6,textAlign:"center",fontVariantNumeric:"tabular-nums"},children:me.length})})]}),me.map((ue,Le)=>zr(ue,Le===me.length-1))]}):null]})}):null,Ae.length===0&&x?yt(ar,{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:yt(es,{})}):Ae.length===0?yt(ar,{role:"status","aria-live":"polite",sx:{py:8,textAlign:"center",color:be.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.`:pe?"\uB4F1\uB85D\uB41C \uC624\uB958\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.":Bt?"\uC811\uC218\uB41C \uBB38\uC758\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.":De?"\uB4F1\uB85D\uB41C \uACF5\uC9C0\uC0AC\uD56D\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.":"\uD45C\uC2DC\uD560 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):yt(ar,{sx:{flex:1,minHeight:0},children:yt(iv,{ref:St,style:{height:"100%"},contentStyle:{minWidth:le},thumb:{width:8},showHorizontalScrollbar:!0,scrollTopFab:!0,children:Oe?yt(ov,{customScrollParent:Oe,data:Pe,computeItemKey:(ue,Le)=>Le.kind==="header"?`group:${Le.section.key}`:Le.task.seq,endReached:_t?void 0:Re,defaultItemHeight:gh,increaseViewportBy:{top:600,bottom:600},itemContent:(ue,Le)=>{if(Le.kind==="task")return zr(Le.task,Le.last&&ct);let{section:dt,visibleTasks:Tr,collapsed:Yr}=Le;return un(ar,{onClick:()=>b(dt.key),sx:{display:"flex",alignItems:"center",gap:.5,px:1.5,minHeight:be.table.groupHeader.minHeight,bgcolor:be.table.groupHeader.bg,borderBottom:`1px solid ${be.table.groupHeader.borderColor}`,cursor:"pointer",userSelect:"none","&:hover":{bgcolor:be.table.groupHeader.hoverBg},...be.table.groupHeader.sx},children:[Yr?yt(tv,{sx:{fontSize:20,color:be.colors.textMuted}}):yt(ev,{sx:{fontSize:20,color:be.colors.textMuted}}),yt(ar,{component:"span",sx:{fontSize:be.table.groupHeader.labelFontSize,fontWeight:be.table.groupHeader.labelFontWeight,color:be.table.groupHeader.labelColor},children:dt.label}),q?yt(ar,{sx:{flexShrink:0,display:"flex",alignItems:"center",ml:.5},children:q(dt.key,dt.tasks)}):null,A&&(!P||P(dt.key))?yt(X2,{size:"small","aria-label":"\uC774 \uADF8\uB8F9\uC5D0 \uC5C5\uBB34 \uB4F1\uB85D",onClick:Zn=>{Zn.stopPropagation(),A(dt.key,dt.tasks)},sx:{flexShrink:0,ml:.75,p:.25,color:be.colors.textSecondary,"&:hover":{bgcolor:be.colors.surfaceHover,color:be.colors.accentOnSurface}},children:yt(mh,{sx:{fontSize:21}})}):null,un(ar,{sx:{ml:"auto",minWidth:0,display:"flex",alignItems:"center",gap:1,pr:.5},children:[N?N(dt.key,dt.tasks):null,yt(ar,{component:"span",sx:{flexShrink:0,width:be.table.groupHeader.badge.width,py:be.table.groupHeader.badge.paddingY,borderRadius:`${be.table.groupHeader.badge.borderRadius}px`,bgcolor:be.table.groupHeader.badge.bg,border:be.table.groupHeader.badge.border,color:be.table.groupHeader.badge.color,fontSize:be.table.groupHeader.badge.fontSize,fontWeight:be.table.groupHeader.badge.fontWeight,lineHeight:1.6,textAlign:"center",fontVariantNumeric:"tabular-nums"},children:Tr.length})]})]})}},Ge):null})}),yt(Gi,{anchorEl:$e?.anchorEl??null,value:rt?.status??"",options:rt?Ya(rt):$s,onSelect:ue=>{rt&&y(rt.seq,ue)},onComplete:rt&&!rt.completed&&!rt.is_notice&&!rt.is_event&&!rt.is_bug&&!Ye&&((rt.author_account_seq??0)===X||(rt.manager_account_seq??0)===X)?()=>c(rt,!0):void 0,onClose:()=>We(null)}),yt(ph,{transitionDuration:0,anchorEl:Je?.anchorEl??null,open:!!Je,onClose:()=>Ve(null),children:["high","medium","low"].map(ue=>un(ml,{selected:st?.priority===ue,onClick:()=>{st&&Te?.(st.seq,ue),Ve(null)},sx:{fontSize:14,minWidth:130,gap:1},children:[yt(Xr,{priority:ue,small:!0}),st?.priority===ue?yt(pu,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},ue))}),un(ph,{anchorEl:ae?.anchorEl??null,open:!!ae,onClose:()=>ye(null),transitionDuration:0,children:[un(ml,{selected:!ae?.task.tab_key,onClick:()=>{ae&&z(ae.task.seq,""),ye(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[yt(nv,{sx:{fontSize:17,color:"#9a9a97"}}),"\uC5C6\uC74C",ae?.task.tab_key?null:yt(pu,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}})]}),u.filter(ue=>!ue.archived).map(ue=>{let Le=Et(ue.icon),dt=ae?.task.tab_key===ue.key;return un(ml,{selected:dt,onClick:()=>{ae&&z(ae.task.seq,ue.key),ye(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[Le?yt(Le,{sx:{fontSize:17,color:"#1e3a8a"}}):null,ue.label,dt?yt(pu,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},ue.key)}),T?[yt(Y2,{},"add-project-divider"),un(ml,{onClick:()=>Ee(!0),sx:{fontSize:14,color:"#787774"},children:[yt(Z2,{children:yt(mh,{sx:{fontSize:18,color:"#787774"}})}),"\uD504\uB85C\uC81D\uD2B8 \uCD94\uAC00"]},"add-project")]:null]}),T?yt(pl,{open:he,onClose:()=>Ee(!1),onSubmit:(ue,Le)=>{let dt=ae?.task.seq??0;(async()=>{let Tr=await T(ue,Le);Tr&&dt&&z(dt,Tr)})(),ye(null)}}):null,yt(ni,{anchorEl:It?.anchorEl??null,value:kt?.icon??"",color:kt?.icon_color??"",onSelect:ue=>{It&&R?.(It.taskSeq,ue),jt(null)},onSelectColor:j?ue=>{It&&j(It.taskSeq,ue)}:void 0,onClose:()=>jt(null)}),yt(Bn,{anchorEl:ht?.anchorEl??null,open:!!ht&&ht?.field==="start_date",date:ht?.date??"",reminders:[],hideReminder:!0,showTime:!ht?.isEvent,onClose:()=>Ut(null),onDateChange:Xn,onReminderChange:()=>{}}),yt(Bn,{anchorEl:ht?.anchorEl??null,open:!!ht&&ht?.field==="due_date",date:ht?.date??"",showTime:!ht?.isEvent,reminders:ht?.reminders??[],hideReminder:!!ht?.completed,onClose:()=>Ut(null),onDateChange:Xn,onReminderChange:ce}),yt(At,{open:!!tr,anchorEl:tr?.anchorEl??null,title:tr?.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:()=>Q(null),onConfirm:()=>{tr&&p?.(tr.taskSeq),Q(null)}}),yt(cn,{open:!!Kt,anchorEl:Kt?.anchorEl??null,nextCompleted:Kt?.nextCompleted??!1,returnMode:!!fe&&!!(Kt&&Zr(Kt.task,X)),onCancel:()=>Yt(null),onConfirm:ue=>{Kt&&(ue&&fe?fe(Kt.task,ue):c(Kt.task,Kt.nextCompleted)),Yt(null)}})]})}import{useCallback as ao,useMemo as Bo,useRef as Rv,useState as qn}from"react";import{Box as $t,ButtonBase as Ah,Divider as kh,IconButton as Sh,Menu as Th,MenuItem as oi}from"@mui/material";import xu from"@mui/icons-material/Add";import Ch from"@mui/icons-material/MoreVert";import Bh from"@mui/icons-material/EditOutlined";import Ih from"@mui/icons-material/ArchiveOutlined";import Eh from"@mui/icons-material/UnarchiveOutlined";import Ov from"@mui/icons-material/NotificationsOutlined";import Av from"@mui/icons-material/PeopleAltOutlined";import{SvgIcon as av}from"@mui/material";import{jsx as xh}from"react/jsx-runtime";function Ir({sx:e,...f}){return xh(av,{viewBox:"0 0 24 24",...f,sx:{fill:"none",...e},children:xh("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 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 Dh,arrayMove as Mh,horizontalListSortingStrategy as $v,useSortable as Hv,verticalListSortingStrategy as Wv}from"@dnd-kit/sortable";import{CSS as Uv}from"@dnd-kit/utilities";import vu from"@ehfuse/overlay-scrollbar";import{useState as pv}from"react";import{Box as so,ButtonBase as mv,Checkbox as gv,Tooltip as vh}from"@mui/material";import bv from"@mui/icons-material/AlarmOutlined";import yv from"@mui/icons-material/DragIndicator";import xv from"@mui/icons-material/RadioButtonUnchecked";import vv from"@mui/icons-material/CheckCircle";import wv from"@mui/icons-material/TimerOutlined";import{Box as Fn,Button as lv,Popover as cv}from"@mui/material";import uv from"@mui/icons-material/CheckCircle";import{Fragment as fv,jsx as io,jsxs as Mi}from"react/jsx-runtime";function gl({anchorEl:e,open:f,acks:g,total:l,avatarSrcByName:o,pendingNames:s=[],onRequestConfirm:r,onClose:t}){let n=qt();return io(cv,{open:f&&(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:Mi(Fn,{sx:{minWidth:240,maxWidth:320,py:1},children:[Mi(Fn,{sx:{px:2,pb:.75,fontSize:Br(13.5),fontWeight:600,color:"#37352f",borderBottom:"1px solid #efefed"},children:["\uD655\uC778 ",g.length,"/",l]}),s.length>0&&g.length>0?Mi(Fn,{sx:{px:2,pt:1,pb:.5,fontSize:Br(12.5),fontWeight:600,color:"#9a9a97"},children:["\uD655\uC778 ",g.length]}):null,g.length===0?s.length>0?null:io(Fn,{sx:{px:2,py:1.5,fontSize:Br(13.5),color:"#9a9a97"},children:"\uC544\uC9C1 \uD655\uC778\uD55C \uC0AC\uB78C\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):g.map(c=>Mi(Fn,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:.75,minWidth:0},children:[io(Jr,{names:[c.name],size:22,avatarSrcByName:o}),io(Fn,{component:"span",sx:{fontSize:Br(14),color:"#37352f",whiteSpace:"nowrap"},children:c.name}),io(Fn,{component:"span",sx:{ml:"auto",fontSize:Br(12.5),color:"#9a9a97",whiteSpace:"nowrap"},children:bn(c.time)}),io(uv,{sx:{fontSize:16,color:"#2f80ed",flexShrink:0}})]},c.account_seq)),s.length>0?Mi(fv,{children:[Mi(Fn,{sx:{mt:g.length>0?.75:0,px:2,pt:1,pb:.5,borderTop:g.length>0?"1px solid #efefed":"none",fontSize:Br(12.5),fontWeight:600,color:"#9a9a97"},children:["\uBBF8\uD655\uC778 ",s.length]}),s.map(c=>Mi(Fn,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:.75,minWidth:0},children:[io(Jr,{names:[c],size:22,avatarSrcByName:o}),io(Fn,{component:"span",sx:{fontSize:Br(14),color:"#37352f",whiteSpace:"nowrap"},children:c})]},c))]}):null,r?io(Fn,{sx:{borderTop:"1px solid #efefed",px:1.5,pt:1,pb:.25},children:io(lv,{size:"small",fullWidth:!0,variant:"outlined",onClick:()=>{r(),t()},sx:{fontSize:Br(13)},children:"\uD655\uC778 \uC694\uCCAD"})}):null]})})}function dv(e){let f=Number(e.author_account_seq??0);return[...new Set([Number(e.manager_account_seq??0),...e.receiver_account_seqs??[]].filter(g=>g>0&&g!==f))]}function hv(e){let f=new Map,g=Number(e.manager_account_seq??0);g>0&&f.set(g,String(e.manager_name??"").trim());let l=e.receiver_account_seqs??[],o=e.receiver_names??[];return l.forEach((s,r)=>{s>0&&!f.has(s)&&f.set(s,String(o[r]??"").trim())}),f}function ts(e,f){let g=dv(e),l=e.acks??[],o=f>0?l.find(t=>t.account_seq===f):void 0,s=new Set(l.map(t=>t.account_seq)),r=hv(e);return{myTime:o?.time??"",canConfirm:f>0&&g.includes(f)&&!o,count:l.filter(t=>g.includes(t.account_seq)).length,total:g.length,pendingNames:g.filter(t=>!s.has(t)).map(t=>r.get(t)??"").filter(t=>t.length>0)}}function JR(e){let f=String(e??"").trim();return f?f.slice(5,16).replaceAll("-","."):""}import{Fragment as Tv,jsx as gr,jsxs as rs}from"react/jsx-runtime";function bl(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 _v=3;function kv(e){let f=e.trim();return f?f.slice(2,10).replaceAll("-","."):"-"}function Sv(){let e=new Date,f=String(e.getMonth()+1).padStart(2,"0"),g=String(e.getDate()).padStart(2,"0");return`${e.getFullYear()}-${f}-${g}`}var mu="taskbox-card-drag-handle";function Ys({task:e,statusOptions:f,showDueDate:g=!1,onRequestArchiveToggle:l,onRequestReply:o,onDueDateClick:s,titleFontSize:r=13,dragHandleProps:t}){let n=lt(),c=Yi(e,ot().resolveTask),a=!!e.due_date&&e.due_date.slice(0,10)<=Sv()?n.colors.danger:n.colors.textPrimary,h=ts(e,0),[d,u]=pv(null),b=Ki(e,f),m=new Set(e.label_keys??[]),x=b.filter(B=>!m.has(B.key)),k=b.filter(B=>m.has(B.key));return rs(Tv,{children:[rs(so,{sx:{display:"flex",alignItems:"flex-start",gap:.5},children:[t?gr(so,{className:mu,...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:gr(yv,{sx:{fontSize:18}})}):null,gr(gv,{size:"small",icon:gr(xv,{sx:{fontSize:20}}),checkedIcon:gr(vv,{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}}),gr(vh,{title:e.title,arrow:!0,enterDelay:300,children:rs(so,{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:_v,overflowWrap:"anywhere",textDecoration:e.completed?"line-through":"none"},children:[e.is_event&&e.event_time?`${e.event_time} `:"",e.title,c?gr(so,{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?gr(ri,{sx:{fontSize:15,ml:.5,verticalAlign:"-2px",color:n.colors.textMuted}}):null]})})]}),e.is_bug&&e.ticket_no?gr(so,{sx:{pl:3,mt:-.5,fontSize:12.5,color:n.colors.textSecondary,fontWeight:500,fontVariantNumeric:"tabular-nums"},children:e.ticket_no}):null,rs(so,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:.5},children:[rs(so,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:.5,minWidth:0},children:[x.map(B=>gr(Lt,{option:B,small:!0},B.key)),gr(Xr,{priority:e.priority,small:!0}),k.map(B=>gr(Lt,{option:B,small:!0},B.key))]}),g?gr(vh,{title:"\uB9C8\uAC10\uC608\uC815",arrow:!0,placement:"top",disableInteractive:!0,slotProps:{transition:{timeout:0}},children:gr(mv,{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()?kv(e.due_date):gr(bv,{sx:{fontSize:15,color:n.colors.textMuted}})})}):null]}),g&&(e.due_date.slice(11,16)||e.estimated_time)?rs(so,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:.25,mt:-.5,fontSize:12,color:n.colors.textSecondary},children:[gr(wv,{sx:{fontSize:14}}),e.due_date.slice(11,16)||e.estimated_time]}):null,gr(Jr,{names:[...e.manager_name?[e.manager_name]:[],...e.receiver_names],size:20,ringFirst:!!e.manager_name}),h.total>0?gr(so,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:.5},children:gr(so,{sx:{flexShrink:0,width:64},onPointerDown:B=>B.stopPropagation(),onClick:B=>B.stopPropagation(),children:gr(Zi,{canConfirm:!1,count:h.count,total:h.total,onConfirm:()=>{},onShowList:B=>u(B)})})}):null,gr(gl,{anchorEl:d,open:!!d,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 Cv}from"@mui/material";import{useSortable as Bv}from"@dnd-kit/sortable";import{CSS as Iv}from"@dnd-kit/utilities";import{jsx as wh}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 _h({task:e,statusOptions:f,variant:g="card",showDueDate:l=!1,onRequestArchiveToggle:o,onRequestReply:s,onDueDateClick:r,onCardClick:t,onCardContextMenu:n,titleFontSize:c}){let i=lt(),{attributes:a,listeners:h,setNodeRef:d,transform:u,transition:b,isDragging:m}=Bv({id:String(e.seq)}),x=g==="list";return wh(Cv,{ref:d,onClick:t?()=>t(e):void 0,onContextMenu:n?k=>n(e,k):void 0,sx:{...x?Ev(i.card):bl(i.card),opacity:m?.35:e.completed?.55:1,transform:Iv.Translate.toString(u),transition:b,position:"relative",cursor:"default","&:hover":x?{bgcolor:i.card.hoverBg}:{boxShadow:"0 3px 8px rgba(0,0,0,0.1)"}},children:wh(Ys,{task:e,statusOptions:f,showDueDate:l,onRequestArchiveToggle:o,onRequestReply:s,onDueDateClick:r,titleFontSize:c,dragHandleProps:{...a,...h}})})}function Mv(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?e.slice(5).replace("-","."):""}function In(e){if(e.status==="closed")return`${e.name} (\uC885\uB8CC)`;let f=Mv(e.end_date);return f?`${e.name} (~${f})`:e.name}import{jsx as nt,jsxs as Jt}from"react/jsx-runtime";var Rh=2,Ph="taskbox-column-drag-handle",wu=[mu,Ph],yl="group-",En="colmove-",gu="__default__",bu=Wc,yu="__other__",xl="sprint-",Oh=`${xl}0`,Vv={planning:"#9a9a97",active:"#2f80ed",closed:"#9a9a97"};function Nh(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 Kv({column:e,tasks:f,statusOptions:g,onRequestArchiveToggle:l,onRequestReply:o,onDueDateClick:s,onAddTask:r,canAdd:t,onOpenMenu:n,onCardClick:c,onCardContextMenu:i,grow:a,summary:h,onOpenSprintMenu:d}){let u=lt(),{setNodeRef:b,isOver:m}=jv({id:`${yl}${e.key}`}),{attributes:x,listeners:k,setNodeRef:B,transform:R,transition:j,isDragging:A}=Hv({id:`${En}${e.key}`,disabled:e.isDefault||e.isArchived||!!e.locked});return Jt($t,{ref:P=>{b(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:Uv.Translate.toString(R),...j?{transition:`${j}, background-color 0.15s`}:{},opacity:A?.6:1},children:[Jt($t,{className:Ph,...x,...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?nt($t,{sx:{width:8,height:8,borderRadius:"50%",bgcolor:e.dot,flexShrink:0}}):e.isDefault?null:(()=>{let P=Et(e.icon);return P?nt(P,{sx:{fontSize:17,color:"#1e3a8a"}}):null})(),nt($t,{component:"span",sx:{fontSize:u.board.columnHeaderFontSize,fontWeight:700,color:u.board.columnHeaderColor,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.label}),nt($t,{component:"span",sx:{...Nh(u.board.badge),ml:"auto"},children:f.length}),e.sprint&&d?nt(Sh,{size:"small","aria-label":"\uBAA9\uD45C \uBA54\uB274",onPointerDown:P=>P.stopPropagation(),onClick:P=>d(P.currentTarget,e.sprint),sx:{color:"#9a9a97"},children:nt(Ch,{sx:{fontSize:18}})}):e.locked?null:nt(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:nt(Ch,{sx:{fontSize:18}})})]}),h?nt($t,{sx:{px:1.25,py:1.25,borderBottom:`1px solid ${u.card.borderColor}`,flexShrink:0},children:h}):null,nt($t,{sx:{flex:"1 1 auto",minHeight:0,display:"flex",flexDirection:"column"},children:nt(vu,{style:{height:"auto",flex:"1 1 auto",minHeight:0},contentStyle:{minWidth:0},thumb:{width:6},dragScroll:{excludeClasses:wu},children:Jt($t,{sx:{display:"flex",flexDirection:"column",flexGrow:1},children:[nt(Dh,{items:f.map(P=>String(P.seq)),strategy:Wv,children:f.map(P=>nt(_h,{task:P,statusOptions:g,variant:"list",showDueDate:!0,titleFontSize:15,onRequestArchiveToggle:l,onRequestReply:o,onDueDateClick:s,onCardClick:c,onCardContextMenu:i},P.seq))}),f.length===0&&!t?nt($t,{sx:{py:3,textAlign:"center",fontSize:13,color:"#9a9a97"},children:"\uCE74\uB4DC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):null,f.length===0&&t?nt($t,{sx:{flexGrow:1,minHeight:56,display:"flex",flexDirection:"column","&:hover .taskbox-board-add":{opacity:1,pointerEvents:"auto"}},children:Jt(Ah,{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:[nt(xu,{sx:{fontSize:16}}),"\uC5C5\uBB34 \uB4F1\uB85D"]})}):null]})})})]})}function _u({tasks:e,statusOptions:f,customTabs:g,mode:l="active",onToggleCompleted:o,onRequestReply:s,onChangeDueDate:r,onChangeReminder:t,onMoveTask:n,columnAxis:c="project",statusColumns:i=[],onMoveTaskStatus:a,sprintColumns:h=[],onMoveTaskSprint:d,onAddGroup:u,onAddTask:b,canAdd:m=!0,onRequestRename:x,onArchiveProject:k,onDeleteProject:B,onReorderProjects:R,onOpenDetail:j,onTaskContextMenu:A,hideCompleted:P=!1,renderColumnSummary:N,onEditSprint:q,onChangeSprintStatus:z,onRemoveSprint:T}){let S=lt(),{onReturnTask:D,myAccountSeq:p=0}=ot(),[y,v]=qn(null),w=y?e.find(xe=>xe.seq===y.taskSeq):void 0,[_,C]=qn(null),[O,F]=qn(null),[$,K]=qn(null),[M,H]=qn(null),[E,I]=qn(null),[L,U]=qn(null),[G,V]=qn(null),[W,X]=qn(null),[Z,Y]=qn(null),[J,ee]=qn(null),ne=Rv(!1),te=Bo(()=>new Map(e.map(xe=>[xe.seq,xe])),[e]),oe=Bo(()=>{let xe=e.filter(me=>me.is_notice);return xe.sort((me,Ie)=>me.completed!==Ie.completed?me.completed?1:-1:Ie.seq-me.seq),xe},[e]),se=Bo(()=>g.filter(xe=>!xe.archived),[g]),de=Bo(()=>g.filter(xe=>xe.archived),[g]),ge=xe=>({key:xe.key,label:xe.label,icon:xe.icon,isDefault:!1,isArchived:xe.archived}),ke=Bo(()=>new Set(i.map(xe=>xe.key)),[i]),Be=Bo(()=>new Set(h.map(xe=>xe.seq)),[h]),Te=Bo(()=>{if(c==="sprint")return[{key:Oh,label:"\uBBF8\uBC30\uC815",icon:"",isDefault:!0,isArchived:!1,dot:"#c9c8c5",locked:!0},...h.map(xe=>({key:`${xl}${xe.seq}`,label:In(xe),icon:"",isDefault:!1,isArchived:!1,dot:Vv[xe.status],locked:!0,sprint:xe}))];if(c==="status"){let xe=i.map(me=>({key:me.key,label:me.name,icon:"",isDefault:!1,isArchived:!1,dot:me.dot,locked:!0}));return xe.some(me=>me.key===bu)?xe:[...xe,{key:bu,label:"\uC644\uB8CC",icon:"",isDefault:!1,isArchived:!1,dot:"#2f80ed",locked:!0}]}return l==="archived"?de.map(ge):[{key:gu,label:"\uAE30\uBCF8 \uC5C5\uBB34\uD568",icon:"",isDefault:!0,isArchived:!1},...se.map(ge)]},[c,i,h,l,se,de]),Re=qv(Fv(Nv,{activationConstraint:{distance:5}})),it=ao(xe=>{let me=String(xe.active.id).startsWith(En),Ie=Lv(xe),Xe=Ie.length>0?Ie:zv(xe);if(me)return Xe.filter(Mt=>String(Mt.id).startsWith(En));let qe=Xe.filter(Mt=>!String(Mt.id).startsWith(En)),Pe=qe.filter(Mt=>!String(Mt.id).startsWith(yl));return Pe.length>0?Pe:qe},[]),be=Bo(()=>{let xe=new Map;for(let me of e){if(me.is_notice)continue;let Ie;if(c==="sprint"){let qe=me.sprint_seq??0;Ie=Be.has(qe)?`${xl}${qe}`:Oh}else Ie=c==="status"?me.completed?bu:ke.has(String(me.status??""))?String(me.status??""):yu:me.tab_key?.trim()||gu;let Xe=xe.get(Ie);Xe?Xe.push(me):xe.set(Ie,[me])}for(let me of xe.values())me.sort((Ie,Xe)=>{if(Ie.completed!==Xe.completed)return Ie.completed?1:-1;let qe=(Ie.group_sort_no??0)>0,Pe=(Xe.group_sort_no??0)>0;return qe&&Pe?(Ie.group_sort_no??0)-(Xe.group_sort_no??0):qe!==Pe?qe?-1:1:Ie.due_date!==Xe.due_date?Ie.due_date<Xe.due_date?-1:1:Ie.seq-Xe.seq});return xe},[e,c,ke,Be]),ie=Bo(()=>c!=="status"||(be.get(yu)??[]).length===0?Te:[...Te,{key:yu,label:"\uAE30\uD0C0",icon:"",isDefault:!1,isArchived:!1,dot:"#c9c8c5",locked:!0}],[c,Te,be]),Ce=ao(xe=>W?(W.get(xe)??[]).map(me=>te.get(me)).filter(me=>!!me):be.get(xe)??[],[W,te,be]),we=ao(xe=>{let me=Ce(xe);return P?me.filter(Ie=>!Ie.completed):me},[Ce,P]),ve=ao(xe=>{let me=String(xe.active.id);if(me.startsWith(En)){ee(me.slice(En.length));return}Y(Number(me)),X(new Map(Te.map(Ie=>[Ie.key,(be.get(Ie.key)??[]).map(Xe=>Xe.seq)])))},[Te,be]),Ke=ao((xe,me)=>{if(xe.startsWith(yl))return{key:xe.slice(yl.length),overSeq:null};let Ie=Number(xe);for(let[Xe,qe]of me)if(qe.includes(Ie))return{key:Xe,overSeq:Ie};return null},[]),De=ao(xe=>{let{active:me,over:Ie}=xe;!Ie||String(me.id).startsWith(En)||X(Xe=>{if(!Xe)return Xe;let qe=Number(me.id),Pe=Ke(String(Ie.id),Xe);if(!Pe)return Xe;let Mt=[...Xe.entries()].find(([,fe])=>fe.includes(qe))?.[0];if(!Mt||Mt===Pe.key)return Xe;let Ue=new Map(Xe);Ue.set(Mt,(Ue.get(Mt)??[]).filter(fe=>fe!==qe));let re=[...Ue.get(Pe.key)??[]],le=re.length;if(Pe.overSeq!==null){let fe=re.indexOf(Pe.overSeq);fe!==-1&&(le=fe)}return re.splice(le,0,qe),Ue.set(Pe.key,re),Ue})},[Ke]),pe=ao(xe=>{let me=String(xe.active.id);if(me.startsWith(En)){ee(null);let le=String(xe.over?.id??"");if(!le.startsWith(En))return;let fe=me.slice(En.length),Se=le.slice(En.length);if(fe===Se)return;let pt=g.map(St=>St.key),Me=pt.indexOf(fe),ze=pt.indexOf(Se);if(Me===-1||ze===-1)return;R(Mh(pt,Me,ze));return}let Ie=W;if(X(null),Y(null),ne.current=!0,!Ie||!xe.over)return;let Xe=Number(me),qe=[...Ie.entries()].find(([,le])=>le.includes(Xe));if(!qe)return;let[Pe,Mt]=qe,Ue=[...Mt],re=Ke(String(xe.over.id),Ie);if(re&&re.key===Pe&&re.overSeq!==null&&re.overSeq!==Xe){let le=Ue.indexOf(Xe),fe=Ue.indexOf(re.overSeq);le!==-1&&fe!==-1&&(Ue=Mh(Ue,le,fe))}if(c==="status"){a?.(Xe,Pe);return}if(c==="sprint"){d?.(Xe,Number(Pe.slice(xl.length))||0);return}n(Xe,Pe===gu?"":Pe,Ue)},[g,W,Ke,n,R,c,a,d]),Bt=ao(()=>{X(null),Y(null),ee(null),ne.current=!0},[]),Fe=ao(xe=>{if(ne.current){ne.current=!1;return}j(xe)},[j]),Ye=Z!==null?te.get(Z)??null:null,_t=J!==null?Te.find(xe=>xe.key===J)??null:null,tt=ao((xe,me)=>{V({anchorEl:me,taskSeq:xe.seq,date:xe.due_date,reminders:ro(xe)})},[]),Ae=_?.column??null;return Jt($t,{sx:{flex:1,minHeight:0,height:"100%",display:"flex",flexDirection:"column",border:`1px solid ${S.card.borderColor}`,borderRadius:"0 0 4px 4px",overflow:"hidden",bgcolor:S.colors.surfaceSubtle},children:[Jt(Dv,{sensors:Re,collisionDetection:it,onDragStart:ve,onDragOver:De,onDragEnd:pe,onDragCancel:Bt,children:[nt($t,{sx:{flex:1,minHeight:0,minWidth:0,contain:"inline-size"},children:l==="archived"&&Te.length===0?nt($t,{sx:{py:8,textAlign:"center",color:"#9a9a97",fontSize:14},children:"\uBCF4\uAD00\uB41C \uD504\uB85C\uC81D\uD2B8\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):nt(vu,{style:{height:"100%"},contentStyle:{width:"max-content",minWidth:"100%",height:"100%"},thumb:{width:8},showHorizontalScrollbar:!0,dragScroll:{excludeClasses:wu},children:Jt($t,{sx:{display:"flex",alignItems:"flex-start",gap:Rh,height:"100%",minWidth:"min-content",p:Rh,boxSizing:"border-box"},children:[l==="active"&&oe.length>0?Jt($t,{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:xe=>xe.shadows[1],bgcolor:S.card.bg,overflow:"hidden"},children:[Jt($t,{sx:{display:"flex",alignItems:"center",gap:.75,pl:1.25,pr:.5,py:1.1,borderBottom:`1px solid ${S.card.borderColor}`,flexShrink:0,minHeight:48},children:[nt(Ov,{sx:{fontSize:17,color:"#e8763a"}}),nt($t,{component:"span",sx:{fontSize:14.5,fontWeight:700,color:S.board.columnHeaderColor},children:"\uACF5\uC9C0\uC0AC\uD56D"}),Jt($t,{component:"span",sx:{fontSize:13,color:"#9a9a97",flexShrink:0},children:["(",oe.length,")"]})]}),nt($t,{sx:{flex:"1 1 auto",minHeight:0,display:"flex",flexDirection:"column"},children:nt(vu,{style:{height:"auto",flex:"1 1 auto",minHeight:0},contentStyle:{minWidth:0},dragScroll:{excludeClasses:wu},thumb:{width:6},children:nt($t,{sx:{display:"flex",flexDirection:"column"},children:oe.map(xe=>Jt($t,{onClick:()=>Fe(xe),onContextMenu:me=>A(xe,me),sx:{px:1.25,py:1,display:"flex",flexDirection:"column",gap:.75,borderBottom:`1px solid ${S.card.borderColor}`,bgcolor:S.card.bg,cursor:"pointer","&:hover":{bgcolor:S.card.hoverBg}},children:[nt(Ys,{task:xe,statusOptions:f,showDueDate:!0,titleFontSize:15,onRequestArchiveToggle:v}),(()=>{let me=(xe.target_names??[]).filter(Xe=>Xe.trim());if(me.length===0)return null;let Ie=me.length>2?`${me[0]}, ${me[1]} \uC678 ${me.length-2}`:me.join(", ");return Jt($t,{sx:{display:"flex",alignItems:"center",gap:.5,fontSize:12.5,color:"#787774",overflow:"hidden",whiteSpace:"nowrap"},children:[nt(Av,{sx:{fontSize:14,flexShrink:0}}),nt($t,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis"},children:Ie})]})})()]},xe.seq))})})})]}):null,nt(Dh,{items:se.map(xe=>`${En}${xe.key}`),strategy:$v,children:ie.map(xe=>nt(Kv,{column:xe,tasks:we(xe.key),summary:N?.(xe.key,Ce(xe.key)),onOpenSprintMenu:q||z||T?(me,Ie)=>F({anchorEl:me,sprint:Ie}):void 0,statusOptions:f,onRequestArchiveToggle:v,onRequestReply:s,onDueDateClick:tt,onAddTask:b,canAdd:m&&c==="project",onOpenMenu:C,onCardClick:Fe,onCardContextMenu:A,grow:c!=="project"},xe.key))}),l==="active"&&c==="project"?Jt(Ah,{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:[nt(xu,{sx:{fontSize:18}}),"\uC0C8 \uD504\uB85C\uC81D\uD2B8"]}):null,l==="active"&&ie.length===0&&oe.length===0?nt($t,{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]})})}),nt(Pv,{children:Ye?nt($t,{sx:{...bl,width:250,boxShadow:"0 8px 20px rgba(0,0,0,0.18)",cursor:"grabbing"},children:nt(Ys,{task:Ye,statusOptions:f,showDueDate:!0,titleFontSize:15})}):_t?Jt($t,{sx:{display:"flex",alignItems:"center",gap:.75,width:270,px:1.25,py:1,bgcolor:S.card.bg,border:`1px solid ${S.card.borderColor}`,borderRadius:1.5,boxShadow:"0 8px 20px rgba(0,0,0,0.18)",opacity:.9,cursor:"grabbing"},children:[(()=>{let xe=Et(_t.icon);return xe?nt(xe,{sx:{fontSize:17,color:"#1e3a8a"}}):null})(),nt($t,{component:"span",sx:{fontSize:13.5,fontWeight:700,color:S.board.columnHeaderColor},children:_t.label}),nt($t,{component:"span",sx:Nh(S.board.badge),children:(be.get(_t.key)??[]).length})]}):null})]}),Jt(Th,{transitionDuration:0,anchorEl:_?.anchorEl??null,open:!!_,onClose:()=>C(null),children:[Ae&&!Ae.isArchived&&m?Jt(oi,{onClick:()=>{Ae&&b(Ae.isDefault?"":Ae.key),C(null)},sx:{fontSize:14,gap:1},children:[nt(xu,{sx:{fontSize:18,color:"#787774"}}),"\uC0C8 \uC5C5\uBB34 \uB4F1\uB85D"]}):null,Ae&&!Ae.isDefault&&!Ae.isArchived?Jt(oi,{onClick:()=>{x(Ae.key,Ae.label,Ae.icon),C(null)},sx:{fontSize:14,gap:1},children:[nt(Bh,{sx:{fontSize:18,color:"#787774"}}),"\uC218\uC815"]}):null,Ae&&!Ae.isDefault&&!Ae.isArchived?Jt(oi,{onClick:()=>{if(_){let xe=(be.get(_.column.key)??[]).filter(me=>!me.completed&&!me.archived).length;xe>0?I({anchorEl:_.anchorEl,count:xe}):H(_)}C(null)},sx:{fontSize:14,gap:1},children:[nt(Ih,{sx:{fontSize:18,color:"#787774"}}),"\uBCF4\uAD00"]}):null,Ae&&Ae.isArchived?Jt(oi,{onClick:()=>{k(Ae.key,!1),C(null)},sx:{fontSize:14,gap:1},children:[nt(Eh,{sx:{fontSize:18,color:"#787774"}}),"\uBCF5\uC6D0"]}):null,Ae&&!Ae.isDefault?nt(kh,{}):null,Ae&&!Ae.isDefault?Jt(oi,{onClick:()=>{_&&U(_),C(null)},sx:{fontSize:14,gap:1,color:"#e5484d"},children:[nt(Ir,{sx:{fontSize:18}}),"\uC0AD\uC81C"]}):null]}),Jt(Th,{transitionDuration:0,anchorEl:O?.anchorEl??null,open:!!O,onClose:()=>F(null),children:[q?Jt(oi,{onClick:()=>{O&&q(O.sprint.seq),F(null)},sx:{fontSize:14,gap:1},children:[nt(Bh,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uC218\uC815"]}):null,z?Jt(oi,{onClick:()=>{O&&z(O.sprint.seq,O.sprint.status==="closed"?"active":"closed"),F(null)},sx:{fontSize:14,gap:1},children:[O?.sprint.status==="closed"?nt(Eh,{sx:{fontSize:18,color:"#787774"}}):nt(Ih,{sx:{fontSize:18,color:"#787774"}}),O?.sprint.status==="closed"?"\uB2E4\uC2DC \uC2DC\uC791":"\uBAA9\uD45C \uC885\uB8CC"]}):null,T?nt(kh,{}):null,T?Jt(oi,{onClick:()=>{O&&K(O),F(null)},sx:{fontSize:14,gap:1,color:"#e5484d"},children:[nt(Ir,{sx:{fontSize:18}}),"\uBAA9\uD45C \uC0AD\uC81C"]}):null]}),nt(At,{open:!!$,anchorEl:$?.anchorEl??null,title:`"${$?.sprint.name??""}" \uBAA9\uD45C\uB97C \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`,confirmText:"\uC0AD\uC81C",onCancel:()=>K(null),onConfirm:()=>{$&&T?.($.sprint.seq),K(null)}}),nt(Bn,{anchorEl:G?.anchorEl??null,open:!!G,date:G?.date??"",reminders:G?.reminders??[],onClose:()=>V(null),onDateChange:xe=>{G&&(r(G.taskSeq,xe),V(me=>me&&{...me,date:xe}))},onReminderChange:xe=>{G&&(t(G.taskSeq,xe),V(me=>me&&{...me,reminders:xe}))}}),nt(At,{open:!!E,anchorEl:E?.anchorEl??null,title:`\uBBF8\uC644\uB8CC \uC5C5\uBB34 ${E?.count??0}\uAC74\uC774 \uC788\uC5B4 \uBCF4\uAD00\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
29
+ `,g.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}",g.NAME_CHAR="-"+g.NAME_START_CHAR+".0-9\xB7\u0300-\u036F\u203F-\u2040",g.CHAR_RE=new RegExp("^["+g.CHAR+"]$","u"),g.RESTRICTED_CHAR_RE=new RegExp("^["+g.RESTRICTED_CHAR+"]$","u"),g.S_RE=new RegExp("^["+g.S+"]+$","u"),g.NAME_START_CHAR_RE=new RegExp("^["+g.NAME_START_CHAR+"]$","u"),g.NAME_CHAR_RE=new RegExp("^["+g.NAME_CHAR+"]$","u"),g.NAME_RE=new RegExp("^["+g.NAME_START_CHAR+"]["+g.NAME_CHAR+"]*$","u"),g.NMTOKEN_RE=new RegExp("^["+g.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}g.S_LIST=[32,10,13,9],g.isChar=function(o){return o>=1&&o<=55295||o>=57344&&o<=65533||o>=65536&&o<=1114111},g.isRestrictedChar=function(o){return o>=1&&o<=8||o===11||o===12||o>=14&&o<=31||o>=127&&o<=132||o>=134&&o<=159},g.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},g.isS=function(o){return o===32||o===10||o===13||o===9},g.isNameStartChar=l,g.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,f,g){"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(g,"__esModule",{value:!0}),g.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}",g.NC_NAME_CHAR="-"+g.NC_NAME_START_CHAR+".0-9\xB7\u0300-\u036F\u203F-\u2040",g.NC_NAME_START_CHAR_RE=new RegExp("^["+g.NC_NAME_START_CHAR+"]$","u"),g.NC_NAME_CHAR_RE=new RegExp("^["+g.NC_NAME_CHAR+"]$","u"),g.NC_NAME_RE=new RegExp("^["+g.NC_NAME_START_CHAR+"]["+g.NC_NAME_CHAR+"]*$","u"),g.isNCNameStartChar=l,g.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 md="waiting",oC="replied";var ko={basis:"count",default_capacity:0,by_account:{}};function sC(e){let f=e&&typeof e=="object"&&!Array.isArray(e)?e:{},g=f.basis==="points"?"points":"count",l=Math.max(0,Math.floor(Number(f.default_capacity)||0)),o={},s=f.by_account&&typeof f.by_account=="object"?f.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:g,default_capacity:l,by_account:o}}import{createContext as eb,useContext as tb,useMemo as bd}from"react";import{Box as rb}from"@mui/material";var Ac="--app-mobile-font-offset";function Br(e,f=0){return`calc(${e}px + max(0px, var(${Ac}, 0px) - ${f}px))`}import{jsx as gd}from"react/jsx-runtime";var yd=eb({});function nb({config:e,children:f}){let g=bd(()=>e??{},[e]),l=g.mobileFontOffsetPx;return gd(yd.Provider,{value:g,children:l===void 0?f:gd(rb,{sx:{display:"contents",[Ac]:`${l}px`},children:f})})}function ot(){return tb(yd)}function Ns(){let{buildFileUrl:e}=ot();return bd(()=>e||((f,g)=>{let l=[];return g?.thumb&&l.push(`thumb=${g.thumb}`),g?.download&&l.push("download=1"),`/api/v1/files/${f}${l.length?`?${l.join("&")}`:""}`}),[e])}function Ls(){let{uploadMaxMb:e}=ot();return e??50}import{useGlobalForm as qy}from"@ehfuse/forma";import xd from"@mui/icons-material/DoNotDisturbAltOutlined";import vd from"@mui/icons-material/BookmarkBorderOutlined";import ob from"@mui/icons-material/LabelOutlined";import ib from"@mui/icons-material/FlagOutlined";import sb from"@mui/icons-material/StarBorderOutlined";import ab from"@mui/icons-material/FolderOutlined";import lb from"@mui/icons-material/EventOutlined";import cb from"@mui/icons-material/BuildOutlined";import ub from"@mui/icons-material/LocalShippingOutlined";import fb from"@mui/icons-material/StorefrontOutlined";import db from"@mui/icons-material/GroupsOutlined";import hb from"@mui/icons-material/LightbulbOutlined";import pb from"@mui/icons-material/FavoriteBorderOutlined";import mb from"@mui/icons-material/AssignmentOutlined";import gb from"@mui/icons-material/HomeOutlined";import bb from"@mui/icons-material/WorkOutline";import yb from"@mui/icons-material/SchoolOutlined";import xb from"@mui/icons-material/LocalHospitalOutlined";import vb from"@mui/icons-material/RestaurantOutlined";import wb from"@mui/icons-material/LocalFloristOutlined";import _b from"@mui/icons-material/DirectionsCarOutlined";import kb from"@mui/icons-material/CampaignOutlined";import Sb from"@mui/icons-material/SavingsOutlined";import Tb from"@mui/icons-material/Inventory2Outlined";import Cb from"@mui/icons-material/CleaningServicesOutlined";import wd from"@mui/icons-material/HandymanOutlined";import Bb from"@mui/icons-material/LocalPhoneOutlined";import Ib from"@mui/icons-material/EmailOutlined";import Eb from"@mui/icons-material/ShoppingCartOutlined";import Mb from"@mui/icons-material/BarChartOutlined";import Rb from"@mui/icons-material/PrintOutlined";import Ob from"@mui/icons-material/SecurityOutlined";import Ab from"@mui/icons-material/AlarmOutlined";import Db from"@mui/icons-material/AttachFileOutlined";import Pb from"@mui/icons-material/PhotoCameraOutlined";import Nb from"@mui/icons-material/ImageOutlined";import Lb from"@mui/icons-material/MenuBookOutlined";import zb from"@mui/icons-material/EditOutlined";import jb from"@mui/icons-material/KeyOutlined";import Fb from"@mui/icons-material/LockOutlined";import qb from"@mui/icons-material/LockOpenOutlined";import $b from"@mui/icons-material/SettingsOutlined";import Hb from"@mui/icons-material/CloudOutlined";import Wb from"@mui/icons-material/WifiOutlined";import Ub from"@mui/icons-material/ComputerOutlined";import Vb from"@mui/icons-material/SmartphoneOutlined";import Kb from"@mui/icons-material/TvOutlined";import Gb from"@mui/icons-material/AccessTimeOutlined";import Yb from"@mui/icons-material/TimerOutlined";import Xb from"@mui/icons-material/MapOutlined";import Zb from"@mui/icons-material/PlaceOutlined";import Jb from"@mui/icons-material/NavigationOutlined";import Qb from"@mui/icons-material/FlightOutlined";import e1 from"@mui/icons-material/TrainOutlined";import t1 from"@mui/icons-material/DirectionsBusOutlined";import r1 from"@mui/icons-material/DirectionsBikeOutlined";import n1 from"@mui/icons-material/DirectionsWalkOutlined";import o1 from"@mui/icons-material/DirectionsRunOutlined";import i1 from"@mui/icons-material/FitnessCenterOutlined";import s1 from"@mui/icons-material/SportsSoccerOutlined";import a1 from"@mui/icons-material/EmojiEventsOutlined";import l1 from"@mui/icons-material/CardGiftcardOutlined";import c1 from"@mui/icons-material/CakeOutlined";import _d from"@mui/icons-material/CoffeeOutlined";import u1 from"@mui/icons-material/LocalPizzaOutlined";import f1 from"@mui/icons-material/ShoppingBagOutlined";import kd from"@mui/icons-material/CreditCardOutlined";import d1 from"@mui/icons-material/AccountBalanceOutlined";import h1 from"@mui/icons-material/AccountBalanceWalletOutlined";import p1 from"@mui/icons-material/AttachMoneyOutlined";import m1 from"@mui/icons-material/ReceiptLongOutlined";import g1 from"@mui/icons-material/CalculateOutlined";import b1 from"@mui/icons-material/TrendingUpOutlined";import y1 from"@mui/icons-material/ListAltOutlined";import x1 from"@mui/icons-material/TaskAltOutlined";import v1 from"@mui/icons-material/DoneAllOutlined";import w1 from"@mui/icons-material/WarningAmberOutlined";import _1 from"@mui/icons-material/InfoOutlined";import k1 from"@mui/icons-material/HelpOutlined";import S1 from"@mui/icons-material/SupportAgentOutlined";import T1 from"@mui/icons-material/PersonOutlined";import C1 from"@mui/icons-material/PersonAddOutlined";import B1 from"@mui/icons-material/BadgeOutlined";import I1 from"@mui/icons-material/WbSunnyOutlined";import E1 from"@mui/icons-material/DarkModeOutlined";import M1 from"@mui/icons-material/LocalFireDepartmentOutlined";import R1 from"@mui/icons-material/WaterDropOutlined";import O1 from"@mui/icons-material/BoltOutlined";import A1 from"@mui/icons-material/AutorenewOutlined";import D1 from"@mui/icons-material/ScienceOutlined";import P1 from"@mui/icons-material/MedicalServicesOutlined";import N1 from"@mui/icons-material/NotificationsOutlined";import L1 from"@mui/icons-material/SendOutlined";import z1 from"@mui/icons-material/LinkOutlined";import j1 from"@mui/icons-material/PublicOutlined";import Sd from"@mui/icons-material/ApartmentOutlined";import F1 from"@mui/icons-material/PlumbingOutlined";import q1 from"@mui/icons-material/ElectricalServicesOutlined";import $1 from"@mui/icons-material/ChatOutlined";import H1 from"@mui/icons-material/DescriptionOutlined";import W1 from"@mui/icons-material/FactCheckOutlined";import U1 from"@mui/icons-material/RocketLaunchOutlined";import V1 from"@mui/icons-material/PaletteOutlined";import K1 from"@mui/icons-material/MusicNoteOutlined";import G1 from"@mui/icons-material/VideocamOutlined";import Y1 from"@mui/icons-material/ThumbUpOutlined";import X1 from"@mui/icons-material/PushPinOutlined";import Z1 from"@mui/icons-material/SearchOutlined";import J1 from"@mui/icons-material/VisibilityOutlined";import Q1 from"@mui/icons-material/VerifiedOutlined";import ey from"@mui/icons-material/TrackChangesOutlined";import ty from"@mui/icons-material/ExtensionOutlined";import ry from"@mui/icons-material/CodeOutlined";import ny from"@mui/icons-material/BugReportOutlined";import oy from"@mui/icons-material/SmartToyOutlined";import iy from"@mui/icons-material/StorageOutlined";import sy from"@mui/icons-material/QrCode2Outlined";import ay from"@mui/icons-material/FileDownloadOutlined";import ly from"@mui/icons-material/FileUploadOutlined";import cy from"@mui/icons-material/MicOutlined";import uy from"@mui/icons-material/HeadphonesOutlined";import fy from"@mui/icons-material/MovieOutlined";import dy from"@mui/icons-material/SportsEsportsOutlined";import hy from"@mui/icons-material/BrushOutlined";import py from"@mui/icons-material/ArchitectureOutlined";import my from"@mui/icons-material/EngineeringOutlined";import gy from"@mui/icons-material/FactoryOutlined";import by from"@mui/icons-material/AgricultureOutlined";import yy from"@mui/icons-material/DirectionsBoatOutlined";import xy from"@mui/icons-material/TwoWheelerOutlined";import vy from"@mui/icons-material/HandshakeOutlined";import wy from"@mui/icons-material/GavelOutlined";import _y from"@mui/icons-material/BalanceOutlined";import ky from"@mui/icons-material/TranslateOutlined";import Sy from"@mui/icons-material/PsychologyOutlined";import Ty from"@mui/icons-material/PetsOutlined";import Cy from"@mui/icons-material/CelebrationOutlined";import By from"@mui/icons-material/BeachAccessOutlined";import Iy from"@mui/icons-material/AcUnitOutlined";import Ey from"@mui/icons-material/ForestOutlined";import My from"@mui/icons-material/LandscapeOutlined";import Ry from"@mui/icons-material/HotelOutlined";import Oy from"@mui/icons-material/LocalLaundryServiceOutlined";import Ay from"@mui/icons-material/ChairOutlined";import Dy from"@mui/icons-material/LocalBarOutlined";import Py from"@mui/icons-material/LunchDiningOutlined";import Ny from"@mui/icons-material/IcecreamOutlined";import Ly from"@mui/icons-material/WorkspacePremiumOutlined";import zy from"@mui/icons-material/DiamondOutlined";import jy from"@mui/icons-material/VaccinesOutlined";var Dc="bookmark",So="label",pr="notifications",yr="event",zs="warning",js="#e53e3e",Td="none",Pc=[{key:Td,Icon:xd},{key:"label",Icon:ob},{key:"bookmark",Icon:vd},{key:"flag",Icon:ib},{key:"star",Icon:sb},{key:"folder",Icon:ab},{key:"event",Icon:lb},{key:"build",Icon:cb},{key:"shipping",Icon:ub},{key:"store",Icon:fb},{key:"groups",Icon:db},{key:"idea",Icon:hb},{key:"heart",Icon:pb},{key:"assignment",Icon:mb},{key:"home",Icon:gb},{key:"work",Icon:bb},{key:"school",Icon:yb},{key:"hospital",Icon:xb},{key:"restaurant",Icon:vb},{key:"flower",Icon:wb},{key:"car",Icon:_b},{key:"campaign",Icon:kb},{key:"savings",Icon:Sb},{key:"inventory",Icon:Tb},{key:"cleaning",Icon:Cb},{key:"handyman",Icon:wd},{key:"phone",Icon:Bb},{key:"email",Icon:Ib},{key:"cart",Icon:Eb},{key:"chart",Icon:Mb},{key:"print",Icon:Rb},{key:"security",Icon:Ob},{key:"alarm",Icon:Ab},{key:"attach",Icon:Db},{key:"camera",Icon:Pb},{key:"image",Icon:Nb},{key:"book",Icon:Lb},{key:"edit",Icon:zb},{key:"key",Icon:jb},{key:"lock",Icon:Fb},{key:"unlock",Icon:qb},{key:"settings",Icon:$b},{key:"cloud",Icon:Hb},{key:"wifi",Icon:Wb},{key:"computer",Icon:Ub},{key:"smartphone",Icon:Vb},{key:"tv",Icon:Kb},{key:"clock",Icon:Gb},{key:"timer",Icon:Yb},{key:"map",Icon:Xb},{key:"place",Icon:Zb},{key:"navigation",Icon:Jb},{key:"flight",Icon:Qb},{key:"train",Icon:e1},{key:"bus",Icon:t1},{key:"bike",Icon:r1},{key:"walk",Icon:n1},{key:"run",Icon:o1},{key:"fitness",Icon:i1},{key:"soccer",Icon:s1},{key:"trophy",Icon:a1},{key:"gift",Icon:l1},{key:"cake",Icon:c1},{key:"coffee",Icon:_d},{key:"pizza",Icon:u1},{key:"bag",Icon:f1},{key:"card",Icon:kd},{key:"bank",Icon:d1},{key:"wallet",Icon:h1},{key:"money",Icon:p1},{key:"receipt",Icon:m1},{key:"calculate",Icon:g1},{key:"trending",Icon:b1},{key:"listalt",Icon:y1},{key:"task",Icon:x1},{key:"doneall",Icon:v1},{key:"warning",Icon:w1},{key:"info",Icon:_1},{key:"help",Icon:k1},{key:"support",Icon:S1},{key:"person",Icon:T1},{key:"personadd",Icon:C1},{key:"badge",Icon:B1},{key:"sun",Icon:I1},{key:"moon",Icon:E1},{key:"fire",Icon:M1},{key:"water",Icon:R1},{key:"bolt",Icon:O1},{key:"renew",Icon:A1},{key:"science",Icon:D1},{key:"medical",Icon:P1},{key:"notifications",Icon:N1},{key:"send",Icon:L1},{key:"link",Icon:z1},{key:"public",Icon:j1},{key:"apartment",Icon:Sd},{key:"plumbing",Icon:F1},{key:"electrical",Icon:q1},{key:"chat",Icon:$1},{key:"description",Icon:H1},{key:"factcheck",Icon:W1},{key:"rocket",Icon:U1},{key:"palette",Icon:V1},{key:"music",Icon:K1},{key:"video",Icon:G1},{key:"thumbup",Icon:Y1},{key:"pin",Icon:X1},{key:"search",Icon:Z1},{key:"eye",Icon:J1},{key:"verified",Icon:Q1},{key:"target",Icon:ey},{key:"extension",Icon:ty},{key:"code",Icon:ry},{key:"bug",Icon:ny},{key:"robot",Icon:oy},{key:"storage",Icon:iy},{key:"qrcode",Icon:sy},{key:"download",Icon:ay},{key:"upload",Icon:ly},{key:"mic",Icon:cy},{key:"headphones",Icon:uy},{key:"movie",Icon:fy},{key:"game",Icon:dy},{key:"brush",Icon:hy},{key:"architecture",Icon:py},{key:"engineering",Icon:my},{key:"factory",Icon:gy},{key:"agriculture",Icon:by},{key:"boat",Icon:yy},{key:"motorcycle",Icon:xy},{key:"handshake",Icon:vy},{key:"gavel",Icon:wy},{key:"balance",Icon:_y},{key:"translate",Icon:ky},{key:"psychology",Icon:Sy},{key:"pets",Icon:Ty},{key:"celebration",Icon:Cy},{key:"beach",Icon:By},{key:"snow",Icon:Iy},{key:"forest",Icon:Ey},{key:"mountain",Icon:My},{key:"hotel",Icon:Ry},{key:"laundry",Icon:Oy},{key:"chair",Icon:Ay},{key:"bar",Icon:Dy},{key:"burger",Icon:Py},{key:"icecream",Icon:Ny},{key:"medal",Icon:Ly},{key:"diamond",Icon:zy},{key:"vaccine",Icon:jy}],Fy={cafe:_d,payment:kd,business:Sd,construction:wd};function Et(e){return e===Td?null:Pc.find(f=>f.key===e)?.Icon??Fy[String(e??"")]??vd}function rI(e){return Et(e)??xd}var Nc={title:"",icon:So,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:""},Lc={createAttachmentFiles:[],createSubmitting:!1,attachmentUpload:null};function $y(e){let{formId:f="taskbox-create-form",initialValues:g,onValidate:l,onSubmit:o}=e;return qy({formId:f,initialValues:{...Nc,...g},onValidate:l,onSubmit:o})}import{useGlobalFormaState as Hy}from"@ehfuse/forma";var Cd="taskbox-ui-state";function To(){return Hy({stateId:Cd,initialValues:Lc})}import{useMemo as Wy}from"react";import{useTheme as Uy}from"@mui/material";function Vi(e,f){let g=Math.max(0,Math.min(1,f));if(g<=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}, ${g})`}function Bd(e,f){let g=Math.max(0,Math.min(1,f)),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)*g),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 zc(e,f,g){return g==="dark"?{accent:e,accentContrast:f,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:f,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 Vy(e,f){let g=f==="dark";return{bg:g?Bd(e.accent,.45):e.accent,color:g?e.textInverse:e.accentContrast,border:"none",fontSize:11.5,fontWeight:600,minWidth:20,width:34,borderRadius:999,paddingX:.6,paddingY:.4}}function Id(e,f){return{...e,...f??{}}}function Ua(e,f="light"){let g=f==="dark",l=Vy(e,f),o=e.accentOnSurface;return{mode:f,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:f==="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:f==="dark"?e.textStrong:e.textPrimary,labelFontSize:15.5,labelFontWeight:f==="dark"?400:700,minHeight:48,badge:{...l,borderRadius:4,width:34}}},board:{columnBg:f==="dark"?e.surfaceSubtle:e.surface,columnHeaderColor:e.textPrimary,columnHeaderFontSize:13.5,badge:{...l,borderRadius:4,width:34}},summary:{gaugeTrackColor:f==="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:f==="dark"?e.surfaceSubtle:e.surface,color:f==="dark"?e.textSecondary:e.textStrong,hoverBg:e.surfaceHover,borderColor:f==="dark"?e.border:e.borderStrong,selectedBg:f==="dark"?e.surfaceHover:e.textStrong,selectedColor:f==="dark"?e.textStrong:e.surface},calendar:{bg:e.surface,borderColor:g?"#3a434f":e.border,headerBg:e.surfaceSubtle,headerColor:e.textSecondary,cellBg:g?"#1a1e24":e.surface,dateBandBg:e.surface,otherMonthBg:g?"#1a1e24":e.surface,todayBg:e.accentSoft,hoverBg:e.surfaceHover,dateColor:e.textPrimary,holidayColor:e.danger},card:{bg:g?"#232a33":e.surface,borderColor:g?"#333c47":e.border,hoverBg:g?"#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:f==="dark"?e.textStrong:e.accent,separatorColor:e.surface},chip:{borderRadius:.75,fontSize:13,fontWeight:500,plainColor:f==="dark"?e.textSecondary:"#57564f",plainDotColor:e.textMuted,darkBgAlpha:.15,darkTextSource:"dot"}}}function jc(e,f){if(!f)return e;let g=f.mode??e.mode,o={...g===e.mode?e.colors:zc(e.colors.accent,e.colors.accentContrast,g),...f.colors??{}},s=Ua(o,g),{groupHeader:r,...t}=f.table??{},{badge:n,...c}=f.board??{},{badge:i,...a}=r??{};return{mode:g,colors:o,table:{...s.table,...t,groupHeader:{...s.table.groupHeader,...a,badge:Id(s.table.groupHeader.badge,i)}},board:{...s.board,...c,badge:Id(s.board.badge,n)},summary:{...s.summary,...f.summary??{}},chip:{...s.chip,...f.chip??{}},actionButton:{...s.actionButton,...f.actionButton??{}},tabs:{...s.tabs,...f.tabs??{}},avatar:{...s.avatar,...f.avatar??{}},calendar:{...s.calendar,...f.calendar??{}},card:{...s.card,...f.card??{}},timeline:{...s.timeline,...f.timeline??{}}}}function Ky(e={}){let{mode:f="light",accent:g="#2563eb",accentContrast:l="#ffffff",input:o}=e;return jc(Ua(zc(g,l,f),f),o)}function lt(){let e=Uy(),{theme:f}=ot(),g=e.palette.primary.main,l=e.palette.primary.contrastText,o=e.palette.mode==="dark"?"dark":"light";return Wy(()=>jc(Ua(zc(g,l,o),o),f),[g,l,o,f])}import{useCallback as no,useEffect as Gs,useMemo as jn,useRef as hu,useState as oo}from"react";import{Box as ar,Divider as ev,IconButton as tv,ListItemIcon as rv,Menu as mh,MenuItem as ml}from"@mui/material";import gh from"@mui/icons-material/Add";import nv from"@mui/icons-material/ArrowUpward";import ov from"@mui/icons-material/ArrowDownward";import iv from"@mui/icons-material/KeyboardArrowDown";import sv from"@mui/icons-material/KeyboardArrowRight";import pu from"@mui/icons-material/Check";import av from"@mui/icons-material/FilterList";import lv from"@mui/icons-material/InboxOutlined";import{Virtuoso as cv}from"react-virtuoso";import uv from"@ehfuse/overlay-scrollbar";import{Box as Ed}from"@mui/material";import{jsx as Yy,jsxs as Xy}from"react/jsx-runtime";var Gy={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 Xr({priority:e,small:f=!1,plain:g=!1}){let l=Gy[e],o=lt(),s=o.mode==="dark",r=g||e==="low";return Xy(Ed,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:f?.5:.75,px:r?0:f?.9:1.25,py:r?0:f?.25:.5,borderRadius:.75,fontSize:f?11.5:13,fontWeight:500,bgcolor:r?"transparent":s?Vi(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:[Yy(Ed,{component:"span",sx:{width:f?6:8,height:f?6:8,borderRadius:"50%",bgcolor:l.dot}}),l.label]})}import{Divider as tx,Menu as rx,MenuItem as Dd}from"@mui/material";import nx from"@mui/icons-material/Check";function Jn(){return{}}var Fc=[{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"}],qc=[{key:"desktop",name:"\uB370\uC2A4\uD06C\uD1B1"},{key:"tablet",name:"\uD0DC\uBE14\uB9BF"},{key:"mobile",name:"\uD734\uB300\uD3F0"}],$c=[{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 Md(e){return Fc.find(f=>f.key===e)?.name??""}function Rd(e){return qc.find(f=>f.key===e)?.name??""}function Va(e){return $c.find(f=>f.key===e)?.name??""}function Hc(e,f=new Date){if(!e.is_event)return!1;let g=String(e.due_date??"").trim().slice(0,10);if(!/^\d{4}-\d{2}-\d{2}$/.test(g))return!1;let l=String(e.event_time??"").trim();if(/^\d{2}:\d{2}$/.test(l)){let s=new Date(`${g}T${l}:00`);return!Number.isNaN(s.getTime())&&s.getTime()<=f.getTime()}let o=new Date(`${g}T00:00:00`);return Number.isNaN(o.getTime())?!1:(o.setDate(o.getDate()+1),o.getTime()<=f.getTime())}function Ka(e,f=new Date){return e.is_event?Hc(e,f):!!e.completed}var gn=[{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"}],$s=gn;function Ga(e){return gn.find(f=>f.key===e)??gn[0]}var Fs={key:"completed",name:"\uC644\uB8CC",bg:"#e3eefb",fg:"#1d4f91",dot:"#2f80ed"};function xr(e){if(e.is_notice)return Od(e.status);if(e.is_bug&&e.completed){let f=Va(e.resolution)||"\uC644\uB8CC";return{...Fs,name:f}}return e.completed&&e.status!=="hold"?Fs:e.is_bug?Jy(e.status):Ga(e.status)}var Zy={key:"event_ended",name:"\uC885\uB8CC",bg:"#efefed",fg:"#57564f",dot:"#9a9a97"};function Hs(e){return Hc(e)?Zy:null}var qs=[{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 Od(e){return qs.find(f=>f.key===e)??qs[1]}var Wc="__closed__",Si=[{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"}],MI=[...Si.filter(e=>e.key!=="bug_hold"),{key:Wc,name:"\uC644\uB8CC",bg:"#e3eefb",fg:"#1d4f91",dot:"#2f80ed"},...Si.filter(e=>e.key==="bug_hold")];function Jy(e){return Si.find(f=>f.key===e)??Si[0]}function Ya(e){return e.is_notice?qs:e.is_bug?Si:$s}function RI(e){return e.status===md}var Qy={in_progress:0,not_started:2,hold:3};function OI(e){return e.completed?9:Qy[String(e.status??"")]??2}function Ki(e,f){let g=new Map(f.map(o=>[o.key,o])),l=(e.label_keys??[]).map(o=>g.get(o)).filter(o=>!!o);if(e.is_event){let o=Hs({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:[Od(e.status),...l]:e.is_bug?[xr({...e,is_notice:!1}),...l]:e.completed?[Fs,...l]:[Ga(e.status),...l]}function Ad(e){return{bg:`${e}1f`,fg:e,dot:e}}function Xa(e,f){return e.includes(f)?e.filter(g=>g!==f):[...e,f]}import{Box as Za}from"@mui/material";import{jsx as Ws,jsxs as ex}from"react/jsx-runtime";function Lt({option:e,small:f=!1}){let g=lt(),l=g.mode==="dark",o=e.key==="not_started";return ex(Za,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:f?.5:.75,...o?{pr:f?.5:.75}:{px:f?.9:1.25},py:o?0:f?.25:.5,borderRadius:1.25,fontSize:f?11.5:13,fontWeight:500,bgcolor:o?"transparent":l?Vi(e.dot,g.chip.darkBgAlpha):e.bg,color:o?l?g.chip.plainColor:e.fg:l?g.chip.darkTextSource==="fg"?e.fg:e.dot:e.fg,whiteSpace:"nowrap"},children:[Ws(Za,{component:"span",sx:{width:f?6:8,height:f?6:8,borderRadius:"50%",bgcolor:e.dot,flexShrink:0}}),e.name]})}function zI({task:e,statusOptions:f,small:g=!1}){let l=Ki(e,f);return l.length===0?null:Ws(Za,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:.5},children:l.map(o=>Ws(Lt,{option:o,small:g},o.key))})}function Zo({labelKeys:e,labelOptions:f}){let g=new Map(f.map(o=>[o.key,o])),l=e.map(o=>g.get(o)).filter(o=>!!o);return l.length===0?null:Ws(Za,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:.5},children:l.map(o=>Ws(Lt,{option:o,small:!0},o.key))})}import{jsx as Us,jsxs as Pd}from"react/jsx-runtime";function Gi({anchorEl:e,value:f,options:g=gn,onSelect:l,onComplete:o,onClose:s}){let r=Jn();return Pd(rx,{anchorEl:e,open:!!e,onClose:s,transitionDuration:0,...r,children:[g.map(t=>Pd(Dd,{onClick:()=>{l(t.key),s()},sx:{fontSize:14,minWidth:150,gap:1},children:[Us(Lt,{option:t}),f===t.key?Us(nx,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},t.key)),o?[Us(tx,{sx:{my:.5}},"complete-divider"),Us(Dd,{onClick:()=>{o(),s()},sx:{fontSize:14,minWidth:150,gap:1},children:Us(Lt,{option:Fs})},"complete")]:null]})}function Uc(e){let f=String(e??"").trim().replace("T"," "),g=f.match(/^(\d{4})-(\d{2})-(\d{2})(?:[ ](\d{2}):(\d{2})(?::(\d{2}))?)?/);return g?new Date(Number(g[1]),Number(g[2])-1,Number(g[3]),Number(g[4]??0),Number(g[5]??0),Number(g[6]??0)):new Date(f)}function mr(e,f="YYYY-MM-DD"){let g=typeof e=="string"?Uc(e):e;if(!e||e===""||isNaN(g.getTime()))return"";let l=g.getFullYear(),o=(g.getMonth()+1).toString().padStart(2,"0"),s=g.getDate().toString().padStart(2,"0"),r=l.toString().slice(-2);switch(f){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 f.replace(/YYYY/g,l.toString()).replace(/YY/g,r).replace(/MM/g,o).replace(/DD/g,s)}}function Nd(){return mr(new Date)}var Vc=[{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"}],ox="__notice__",ix="__bug__",sx="__support__";function ax(e){let f=new Date(`${e}T00:00:00`);return f.setDate(f.getDate()+(6-f.getDay())),mr(f)}var lx=[{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 cx(e,f,g){let l=e.due_date.slice(0,10);return l?l<f?"overdue":l===f?"today":l<=g?"this_week":"later":"no_due"}function ux(e){return typeof e=="function"?e:f=>f.is_bug?"bug":f.is_support?"support":null}function Ja(e,f,g,l=[],o=[],s="",r,t=!1){let n=e.filter(d=>d.is_notice);if(n.length>0){let d=Ja(e.filter(u=>!u.is_notice),f,g,l,o,s,r,t);return[{key:ox,label:"\uACF5\uC9C0\uC0AC\uD56D",tasks:n},...d]}if(t){let d=ux(t),u=e.filter(m=>d(m)==="bug"),b=e.filter(m=>d(m)==="support");if(u.length>0||b.length>0){let m=Ja(e.filter(x=>d(x)===null),f,g,l,o,s,r,!1);return[...u.length>0?[{key:ix,label:"\uC624\uB958",tasks:u}]:[],...b.length>0?[{key:sx,label:"\uACE0\uAC1D\uC13C\uD130",tasks:b}]:[],...m]}}let c=new Map,i=(d,u)=>{let b=c.get(d);b?b.push(u):c.set(d,[u])},a;if(f==="due"){let d=ax(g);for(let u of e)i(cx(u,g,d),u);a=lx}else if(f==="status"){for(let d of e)i(Ga(d.status).key,d);a=gn.map(d=>({key:d.key,label:d.name}))}else if(f==="tab"){for(let d of e)i(d.tab_key?.trim()||"__none__",d);a=[...l.filter(d=>!d.archived).map(d=>({key:d.key,label:d.label})),{key:"__none__",label:"\uAE30\uBCF8 \uC5C5\uBB34\uD568"},...l.filter(d=>d.archived).map(d=>({key:d.key,label:`${d.label} (\uBCF4\uAD00\uB428)`}))]}else if(r?.enabled){let d=Number(r.myAccountSeq??0),u=s.trim();for(let b of e){if(b.is_event){i("__event__",b);continue}if(!(Number(b.manager_account_seq??0)>0||String(b.manager_name??"").trim()!=="")){i("__none__",b);continue}let x=d>0&&Number(b.manager_account_seq??0)===d||!!u&&String(b.manager_name??"").trim()===u;i(x?"__manager__":"__reference__",b)}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 x of e)i(x.is_event?"__event__":String(x.manager_name??"").trim()||"__none__",x);let d=s.trim(),u=[...c.keys()].filter(x=>x!=="__none__"&&x!=="__event__").sort((x,k)=>{if(d){if(x===d)return-1;if(k===d)return 1}return x.localeCompare(k)}),b=!!d&&u.includes(d),m=u.filter(x=>x!==d);a=[...b?[{key:d,label:"\uB0B4 \uC5C5\uBB34"}]:[],{key:"__none__",label:"\uCC45\uC784\uC790 \uBBF8\uBC30\uC815"},{key:"__event__",label:"\uC77C\uC815"},...m.map(x=>({key:x,label:x}))]}let h=[];for(let d of a){let u=c.get(d.key);!u||u.length===0||h.push({key:d.key,label:d.label,tasks:u})}return h}import fx from"@mui/icons-material/LabelOutlined";import dx from"@mui/icons-material/NotesOutlined";import hx from"@mui/icons-material/AutorenewOutlined";import px from"@mui/icons-material/CalendarTodayOutlined";import mx from"@mui/icons-material/EventOutlined";import Ld from"@mui/icons-material/PersonOutlineOutlined";import zd from"@mui/icons-material/PeopleAltOutlined";import Yc from"@mui/icons-material/CheckCircleOutlineOutlined";import gx from"@mui/icons-material/FlagOutlined";import Xc from"@mui/icons-material/AccessTimeOutlined";import bx from"@mui/icons-material/StickyNote2Outlined";import yx from"@mui/icons-material/ViewKanbanOutlined";import xx from"@mui/icons-material/ConfirmationNumberOutlined";import vx from"@mui/icons-material/QuestionAnswerOutlined";import{jsx as vr}from"react/jsx-runtime";var jd={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 Fd(e){return el(e).map(f=>jd[f.id]).join(" ")}function qd(e){return el(e).reduce((f,g)=>{let l=jd[g.id]??"",o=/^(\d+)px$/.exec(l);if(o)return f+Number(o[1]);let s=/^minmax\((\d+)px/.exec(l);return s?f+Number(s[1]):f},0)}var wx={id:"deleted_time",label:"\uC0AD\uC81C\uC77C\uC2DC",icon:vr(Xc,{sx:{fontSize:15}}),align:"center",sortable:!0},_x={id:"completed_time",label:"\uC644\uB8CC\uC77C\uC2DC",icon:vr(Xc,{sx:{fontSize:15}}),align:"center",sortable:!0},kx={id:"created_time",label:"\uC791\uC131\uC77C\uC2DC",icon:vr(Xc,{sx:{fontSize:15}}),align:"center",sortable:!0},Sx={id:"ticket_no",label:"\uD2F0\uCF13",icon:vr(xx,{sx:{fontSize:15}}),align:"center"},Tx={id:"support_type",label:"\uC885\uB958",icon:vr(fx,{sx:{fontSize:15}}),align:"center"},Cx={id:"author_name",label:"\uC791\uC131\uC790",icon:vr(Ld,{sx:{fontSize:15}}),align:"center",valueFilter:"author_name"},Bx={id:"answerer_names",label:"\uB2F5\uBCC0\uC790",icon:vr(vx,{sx:{fontSize:15}}),align:"center",valueFilter:"answerer_names"},Ix={id:"project",label:"\uD504\uB85C\uC81D\uD2B8",icon:vr(yx,{sx:{fontSize:15}}),projectFilter:!0},Ex={id:"targets",label:"\uB300\uC0C1\uC790",icon:vr(zd,{sx:{fontSize:15}})},Gc={id:"priority",label:"\uC911\uC694\uB3C4",icon:vr(gx,{sx:{fontSize:15}}),align:"center",priorityFilter:!0},Mx={id:"ack",label:"\uD655\uC778",icon:vr(Yc,{sx:{fontSize:15}}),align:"center",ackFilter:!0},Rx={id:"confirm",label:"\uD655\uC778",icon:vr(Yc,{sx:{fontSize:15}}),align:"center",ackFilter:!0};function Kc(e){let f=e.findIndex(l=>l.id==="receiver_names"||l.id==="targets"),g=f>=0?f+1:e.findIndex(l=>l.id==="note");return g<0?[...e,Gc]:[...e.slice(0,g),Gc,...e.slice(g)]}function el(e){let{showProject:f=!1,showManager:g=!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=b=>Qa.find(m=>m.id===b);return[u("completed"),Tx,u("title"),u("status"),kx,u("start_date"),u("due_date"),Cx,Bx,{...u("manager_name"),align:"center"},u("receiver_names"),Gc]}let a=u=>{if(!r)return u;let b=u.filter(k=>k.id!=="note"),m=b.findIndex(k=>k.id==="completed"),x=m>=0?m+1:0;return[...b.slice(0,x),Sx,...b.slice(x)]};if(s)return a(Kc(Qa.filter(u=>!["manager_name","receiver_names","request"].includes(u.id)).flatMap(u=>u.id==="due_date"?[u,Ex]:u.id==="note"?[Mx,u]:[u])));let h=g?Qa:Qa.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(b=>b.id!=="request");let u=h.findIndex(b=>b.id==="note");h=[...h.slice(0,u),c?wx:_x,...h.slice(u)]}if(i==="action"){let u=h.findIndex(b=>b.id==="note");h=[...h.slice(0,u),Rx,...h.slice(u)]}if(!f)return a(Kc(h));let d=h.findIndex(u=>u.id==="receiver_names");return a(Kc([...h.slice(0,d+1),Ix,...h.slice(d+1)]))}var Qa=[{id:"completed",label:"\uC644\uB8CC",icon:null,align:"center"},{id:"title",label:"\uC81C\uBAA9",icon:vr(dx,{sx:{fontSize:15}}),sortable:!0},{id:"status",label:"\uC0C1\uD0DC",icon:vr(hx,{sx:{fontSize:15}}),align:"center",statusFilter:!0},{id:"start_date",label:"\uC2DC\uC791\uC77C\uC2DC",icon:vr(px,{sx:{fontSize:15}}),align:"center",sortable:!0},{id:"due_date",label:"\uB9C8\uAC10\uC608\uC815",icon:vr(mx,{sx:{fontSize:15}}),align:"center",sortable:!0},{id:"manager_name",label:"\uCC45\uC784\uC790",icon:vr(Ld,{sx:{fontSize:15}}),memberFilter:"manager"},{id:"receiver_names",label:"\uCC38\uC870\uC790",icon:vr(zd,{sx:{fontSize:15}}),memberFilter:"receivers"},{id:"request",label:"\uD655\uC778",icon:vr(Yc,{sx:{fontSize:15}}),align:"center",ackFilter:!0},{id:"note",label:"\uBE44\uACE0",icon:vr(bx,{sx:{fontSize:15}})}];import{Button as $d,ClickAwayListener as Ox,Dialog as Ax,Paper as Dx,Popper as Px,Typography as Nx,Box as Lx}from"@mui/material";import{useMediaQuery as zx,useTheme as jx}from"@mui/material";import{Fragment as qx,jsx as Jo,jsxs as Wd}from"react/jsx-runtime";function Fx(){let e=jx();return!zx(e.breakpoints.up("lg"))}function Hd(){if(typeof document>"u")return;let e=0,f=l=>{l.stopPropagation(),l.preventDefault(),g()},g=()=>{window.clearTimeout(e),document.removeEventListener("click",f,!0)};document.addEventListener("click",f,!0),e=window.setTimeout(g,350)}function $x({title:e,content:f,confirmText:g,cancelText:l,titleFontSize:o,actionFontSize:s,actionMinHeight:r,onCancel:t,onConfirm:n}){return Wd(qx,{children:[Jo(Nx,{component:"div",sx:{fontSize:o,fontWeight:700,color:"#0f172a",lineHeight:1.4},children:e}),f,Wd(Lx,{sx:{display:"flex",gap:2,justifyContent:"flex-end"},children:[Jo($d,{size:"medium",variant:"outlined",color:"inherit",onClick:()=>{Hd(),t()},fullWidth:!0,sx:{fontSize:s,minHeight:r,fontWeight:700},children:l}),Jo($d,{size:"medium",variant:"contained",color:"primary",onClick:()=>{Hd(),n()},fullWidth:!0,sx:{fontSize:s,minHeight:r,fontWeight:700},children:g})]})]})}function Ud({open:e,anchorEl:f,title:g="\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,isMobile:d,onCancel:u,onConfirm:b}){let m=Fx(),x=d??m,k=Jo($x,{title:g,content:l,confirmText:o,cancelText:s,titleFontSize:x?Math.max(c,19):c,actionFontSize:x?Math.max(i,18):i,actionMinHeight:x?Math.max(a,56):a,onCancel:u,onConfirm:b});return x?Jo(Ax,{open:e,onClose:u,onClick:B=>B.stopPropagation(),onMouseDown:B=>B.stopPropagation(),sx:{zIndex:h},slotProps:{paper:{sx:{p:3,display:"flex",flexDirection:"column",gap:3,width:"min(92vw, 420px)",maxWidth:"92vw",m:0}}},children:k}):Jo(Px,{open:e,anchorEl:f,placement:r,sx:{zIndex:h},children:Jo(Ox,{onClickAway:u,children:Jo(Dx,{elevation:4,sx:{p:3,display:"flex",flexDirection:"column",gap:3,minWidth:t,minHeight:n,justifyContent:n?"space-between":"flex-start"},onClick:B=>B.stopPropagation(),onMouseDown:B=>B.stopPropagation(),children:k})})})}import{useMediaQuery as Hx,useTheme as Wx}from"@mui/material";function qt(){let{isMobile:e}=ot(),f=Wx(),g=Hx(f.breakpoints.up("lg"));return e!==void 0?e:!g}import{jsx as Ux}from"react/jsx-runtime";function At(e){let f=qt();return Ux(Ud,{isMobile:f,...e})}import{useEffect as Vx,useState as Kx}from"react";import{Box as Gx,TextField as Yx}from"@mui/material";import{jsx as Zc}from"react/jsx-runtime";function Zr(e,f){if(!e.completed||f<=0||!e.review_pending||(e.author_account_seq??0)!==f)return!1;let g=e.completed_by_account??0;return g>0&&g!==f}function cn({open:e,anchorEl:f,nextCompleted:g,returnMode:l=!1,onCancel:o,onConfirm:s}){let[r,t]=Kx("");Vx(()=>{e&&t("")},[e]);let n=!g&&l;return Zc(At,{open:e,anchorEl:f,title:n?`\uC644\uB8CC\uB97C \uB418\uB3CC\uB9AC\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?
30
+ \uC0AC\uC720\uB294 \uB313\uAE00\uB85C \uB0A8\uACE0 \uC644\uB8CC \uCC98\uB9AC\uC790\uC5D0\uAC8C \uC54C\uB9BC\uC774 \uAC11\uB2C8\uB2E4.`:g?"\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:n?"\uB418\uB3CC\uB9AC\uAE30":g?"\uC644\uB8CC":"\uD574\uC81C",content:n?Zc(Gx,{sx:{mt:1},children:Zc(Yx,{autoFocus:!0,fullWidth:!0,multiline:!0,minRows:4,size:"small",placeholder:"\uB418\uB3CC\uB9AC\uB294 \uC0AC\uC720\uB97C \uC785\uB825\uD558\uC138\uC694 (\uD544\uC218)",value:r,onChange:c=>t(c.target.value),onClick:c=>c.stopPropagation(),onKeyDown:c=>c.stopPropagation()})}):void 0,onCancel:o,onConfirm:()=>{n&&!r.trim()||s(n?r.trim():"")}})}import{memo as _2}from"react";function Ln(e){let f=e.visibility;return f==="involved"||f==="group"||f==="all"?f:e.is_open?"all":"involved"}function tl(e,f,g=0){if(f<=0)return!1;if(e.is_notice){if((e.author_account_seq??0)===f)return!0;let s=(e.target_account_seqs??[]).filter(r=>r>0);return s.length===0||s.includes(f)}if((e.author_account_seq??0)===f||(e.manager_account_seq??0)===f||(e.receiver_account_seqs??[]).includes(f))return!0;let o=Ln(e);if(o==="all")return!0;if(o==="group"){let s=e.visibility_group_seq??0;return s>0&&g===s}return!1}function Vd(e){return e.is_notice||e.is_event||e.completed||e.archived||(e.manager_account_seq??0)!==0?!1:Ln(e)!=="involved"}function rl(e,f){return f<=0||(e.author_account_seq??0)===f?!1:Vd(e)}function nl(e,f){return f<=0||e.is_notice||e.is_event||e.completed||e.archived||(e.manager_account_seq??0)>0||(e.author_account_seq??0)===f||Vd(e)?!1:(e.receiver_account_seqs??[]).includes(f)}function Kd(e){return!!e.is_bug&&(e.manager_account_seq??0)===0&&e.status==="bug_received"}function ol(e){return(e.origin_license_seq??0)>0}function Gd(e,f){if(f<=0)return!1;let g=(e.author_account_seq??0)===f;return e.is_notice?g:g||(e.manager_account_seq??0)===f}function Qn(e,f){return f<=0?!1:ol(e)?!0:e.is_notice?(e.author_account_seq??0)===f:(e.author_account_seq??0)===f||(e.manager_account_seq??0)===f||(e.receiver_account_seqs??[]).includes(f)}function Xx(e,f){return f<=0?!1:ol(e)?!0:e.is_notice?(e.author_account_seq??0)===f:(e.author_account_seq??0)===f||(e.manager_account_seq??0)===f}function Zx(e,f){return f<=0?!1:ol(e)?!0:(e.author_account_seq??0)===f}function Qo(e,f,g){return g==="coreAuthorManager"?!Xx(e,f):!Qn(e,f)}function Ti(e,f,g,l){return g==="coreAuthorManager"?!Zx(e,f):l}var ME=[119,121,141,143];function il(e,f){let g=String(e.origin_author_avatar??"").trim(),l=String(e.author_name||e.origin_author_name||e.created_by||"").trim();if(!g||!l||!ol(e)||f?.get(l)===g)return f;let o=new Map(f??[]);return o.set(l,g),o}import{memo as d2,useEffect as h2,useRef as p2,useState as eu}from"react";import{Box as Tt,Button as rh,ButtonBase as m2,Checkbox as g2,Tooltip as Ji}from"@mui/material";import b2 from"@mui/icons-material/PublicOutlined";import y2 from"@mui/icons-material/Group";import x2 from"@mui/icons-material/CheckCircle";import v2 from"@mui/icons-material/CheckCircleOutlineOutlined";import{useEffect as Jx,useState as Yd}from"react";import{Avatar as Xd,Box as Qx}from"@mui/material";import e2 from"@mui/icons-material/PersonOutlineOutlined";import{jsx as sl}from"react/jsx-runtime";var Jc=new Set,Zd=e=>e.startsWith("data:")||e.startsWith("blob:");function t2(e){let f=e.trim();return f?([...f][0]??"").toUpperCase():""}function Tn({src:e,name:f="",avatarSx:g,iconFontSize:l=40}){let[o,s]=Yd(()=>e?Zd(e)||Jc.has(e):!1),[r,t]=Yd(!1),n={position:"relative",overflow:"hidden",borderRadius:"15px"},c=g?[n,...Array.isArray(g)?g:[g]]:n;if(Jx(()=>{t(!1),s(e?Zd(e)||Jc.has(e):!1)},[e]),!e||r){let i=t2(f);return sl(Xd,{sx:c,children:i?sl(Qx,{component:"span",sx:{fontSize:"inherit",fontWeight:600,lineHeight:1,userSelect:"none"},children:i}):sl(e2,{sx:{fontSize:l}})})}return sl(Xd,{src:e,imgProps:{onLoad:()=>{Jc.add(e),s(!0)},onError:()=>t(!0),style:o?void 0:{opacity:0}},sx:c})}var r2=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),al=(e,f)=>{if(!f||!f.trim())return[{text:e,highlight:!1}];try{let g=r2(f.trim()),l=new RegExp(`(${g})`,"gi");return e.split(l).map(s=>s.toLowerCase()===f.trim().toLowerCase()?{text:s,highlight:!0}:{text:s,highlight:!1}).filter(s=>s.text)}catch{return[{text:e,highlight:!1}]}};var n2=["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"];function Cn(e){let f=String(e??"").trim().slice(0,10);if(!/^\d{4}-\d{2}-\d{2}$/.test(f))return"";let g=new Date(`${f}T00:00:00`);return Number.isNaN(g.getTime())?"":`${f.slice(2).replaceAll("-",".")} (${n2[g.getDay()]})`}function Qc(e){let f=String(e??"").trim().slice(0,10);if(!/^\d{4}-\d{2}-\d{2}$/.test(f))return"";let g=Number(f.slice(5,7)),l=Number(f.slice(8,10));return!g||!l?"":`${g}\uC6D4 ${l}\uC77C`}function bn(e){let f=String(e??"").trim(),[g,l=""]=f.split(" "),o=Cn(g);return o?l?`${o} ${l.slice(0,5)}`:o:""}function Yi(e,f){let g=(e.checklist??[]).filter(o=>!(f&&o.task_seq&&!f(Number(o.task_seq))));return g.length===0?"":`${g.filter(o=>o.checked).length}/${g.length}`}import{Box as Jd,Tooltip as o2}from"@mui/material";import{jsx as ll}from"react/jsx-runtime";var Xi=[{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 Jr({names:e,size:f=22,ringFirst:g=!1,avatarSrcByName:l}){let o=lt(),s=ot().avatarSrcByName,r=l??s;return ll(Jd,{sx:{display:"flex",alignItems:"center"},children:e.map((t,n)=>ll(o2,{title:g&&n===0?`\uCC45\uC784\uC790 \xB7 ${t}`:t,arrow:!0,children:ll(Jd,{sx:{ml:n===0?0:"-7px",zIndex:n,borderRadius:"50%",border:`2px solid ${o.avatar.separatorColor}`,display:"inline-flex",...o.avatar.sx},children:ll(Tn,{src:r?.get(t)??"",name:t,avatarSx:{width:f,height:f,fontSize:Math.round(f/2),borderRadius:"50%",...Xi[n%Xi.length]},iconFontSize:Math.round(f*.6)})})},`${t}-${n}`))})}import{Box as Qd,Button as th}from"@mui/material";import i2 from"@mui/icons-material/CheckCircle";import{Fragment as l2,jsx as Vs,jsxs as eh}from"react/jsx-runtime";function s2(e){let f=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:f?e.colors.surfaceHover:"linear-gradient(180deg, #ffffff 0%, #f6f7f9 100%)",whiteSpace:"nowrap","&:hover":{background:f?e.colors.surfaceSubtle:"linear-gradient(180deg, #fcfcfd 0%, #f0f2f4 100%)",borderColor:e.colors.borderStrong}}}function a2(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}}var ei={minWidth:0,px:1.25,py:.25,fontSize:13,fontWeight:600,whiteSpace:"nowrap",color:"#fff",backgroundColor:"#8b5cf6",backgroundImage:"linear-gradient(180deg, #a685f9 0%, #8b5cf6 100%)",boxShadow:"none","&:hover":{backgroundColor:"#7c4ee8",backgroundImage:"linear-gradient(180deg, #9873f2 0%, #7c4ee8 100%)",boxShadow:"none"}};function eo({onClick:e,children:f,fullWidth:g=!1,sx:l}){let o=lt();return Vs(th,{size:"small",variant:"contained",color:"inherit",fullWidth:g,sx:[a2(o),...Array.isArray(l)?l:l?[l]:[]],onClick:s=>{s.stopPropagation(),e(s)},children:f})}function Zi({canConfirm:e,count:f,total:g,myConfirmed:l=!1,onConfirm:o,onShowList:s}){let r=lt(),t=s2(r);return e?Vs(eo,{onClick:()=>o(),children:"\uD655\uC778"}):eh(th,{size:"small",variant:"outlined",color:"inherit",sx:t,onClick:n=>{n.stopPropagation(),s(n.currentTarget)},children:[l?Vs(i2,{sx:{fontSize:16,color:"#2f80ed",flexShrink:0}}):null,Vs(Qd,{component:"span",sx:{flex:1,textAlign:"center",minWidth:0},children:g>0&&f>=g?"\uD655\uC778\uC644\uB8CC":eh(l2,{children:[f,Vs(Qd,{component:"span",sx:{mx:.15},children:"/"}),g]})})]})}import{jsx as c2}from"react/jsx-runtime";function ti({anchorEl:e,onCancel:f,onConfirm:g}){return c2(At,{open:!!e,anchorEl:e,title:"\uAC80\uC218\uB97C \uC644\uB8CC\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",onCancel:f,onConfirm:g})}import{SvgIcon as u2}from"@mui/material";import{jsx as cl,jsxs as f2}from"react/jsx-runtime";function ri({sx:e,...f}){return f2(u2,{viewBox:"0 0 48 48",...f,sx:{fill:"none",...e},children:[cl("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"}),cl("circle",{cx:"23.91",cy:"21.46",r:"2.71",fill:"currentColor",stroke:"none"}),cl("circle",{cx:"33.65",cy:"21.46",r:"2.71",fill:"currentColor",stroke:"none"}),cl("circle",{cx:"14.18",cy:"21.46",r:"2.71",fill:"currentColor",stroke:"none"})]})}import{Fragment as ul,jsx as je,jsxs as Ci}from"react/jsx-runtime";function Ks(e){let f=String(e??"").trim();if(!f)return"-";let g=f.slice(2,10).replaceAll("-","."),l=f.slice(11,16);return/^\d{2}:\d{2}$/.test(l)?`${g} ${l}`:g}function w2(e){let f=String(e.event_time??"").trim();return e.is_event&&/^\d{2}:\d{2}$/.test(f)?Ks(`${String(e.due_date??"").slice(0,10)} ${f}`):Ks(e.due_date)}function ru(e,f){let g=String(e??"").trim()||"-";return al(g,f).map((l,o)=>je("span",{className:l.highlight?"font-semibold text-blue-600":void 0,children:l.text},`${l.text}-${o}`))}function Qi({names:e,searchText:f,avatarSrcByName:g,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 Ci(ul,{children:[je(Tn,{src:g?.get(s)??"",name:s,avatarSx:{width:24,height:24,fontSize:12,borderRadius:"50%",...Xi[0]},iconFontSize:15}),je(Tt,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...l?{fontWeight:500,color:"#2f80ed"}:{}},children:ru(s,f)})]})}return je(Jr,{names:o,size:22,avatarSrcByName:g})}function nh({display:e,summary:f,searchText:g,avatarSrcByName:l}){if(!e||e.kind==="everyone")return je(Tt,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:f||"\uBAA8\uB4E0 \uC9C1\uC6D0"});let{teamNames:o,individualNames:s}=e;if(o.length===0)return je(Qi,{names:s,searchText:g,avatarSrcByName:l});let r=[...o,...s],t=r.join(", ");return r.length>2?je(Ji,{title:t,arrow:!0,children:je(Tt,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:`${r[0]}, ${r[1]} \uC678 ${r.length-2}\uBA85`})}):je(Ji,{title:t,arrow:!0,children:Ci(Tt,{sx:{display:"flex",alignItems:"center",gap:.75,minWidth:0},children:[je(Tt,{component:"span",sx:{flexShrink:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:o.join(", ")+(s.length>0?",":"")}),s.length>0?je(Qi,{names:s,searchText:g,avatarSrcByName:l}):null]})})}function fl(e){return e==="\uC624\uB958\uC81C\uBCF4"?"\uC624\uB958":e}function oh(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 tu({label:e,bg:f,fg:g}){return je(Tt,{component:"span",sx:{flexShrink:0,px:.75,fontSize:12,fontWeight:500,lineHeight:"20px",color:g,bgcolor:f,borderRadius:"4px",whiteSpace:"nowrap",maxWidth:140,overflow:"hidden",textOverflow:"ellipsis"},children:e})}var ih=d2(function({task:f,gridTemplate:g,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:d=!1,supportMode:u=!1,managerCentered:b=!1,trashMode:m=!1,dimCompleted:x=!0,confirmInfo:k,onConfirmTask:B,projectLabel:R="",projectIcon:j="",onProjectClick:A,onRequestToggleCompleted:P,onDateClick:N,onChangeNote:q,onMemberClick:z,onClaimClick:T,onVolunteerClick:S,onStatusClick:D,onOpenDetail:p,onTaskContextMenu:y,hideBottomBorder:v=!1,completeLocked:w=!1,unread:_=!1,notice:C=!1,noticeReadOnly:O=!1,coreLocked:F,readOnly:$=!1,onIconClick:K,lastColumnCentered:M=!1,noteLocked:H=!1,targetSummary:E="",targetDisplay:I,onArchiveTask:L,ackInfo:U,onAckConfirm:G,onAckListClick:V,onPriorityClick:W}){let[X,Z]=eu(!1),[Y,J]=eu(null),[ee,ne]=eu(""),te=p2(null);h2(()=>{if(!X)return;let pe=Bt=>{let Fe=te.current;Fe&&(Bt.target instanceof Node&&Fe.contains(Bt.target)||Fe.blur())};return document.addEventListener("mousedown",pe,!0),document.addEventListener("touchstart",pe,!0),()=>{document.removeEventListener("mousedown",pe,!0),document.removeEventListener("touchstart",pe,!0)}},[X]);let oe=[f.manager_account_seq??0,...f.receiver_account_seqs??[]].some(pe=>pe>0&&pe!==(f.author_account_seq??0)),se=O||$,de=(F??O)||$,ge=r>0&&!f.is_notice&&!f.is_event&&(f.manager_account_seq??0)===r,ke=de||!!f.is_notice,Be=lt(),Te=!!T&&rl(f,r),Re=!!S&&nl(f,r),it=ke&&!Kd(f),be=f.is_notice?je(Zi,{canConfirm:!!U?.canAck,count:U?.count??0,total:U?.total??0,myConfirmed:!!U?.acked,onConfirm:()=>G?.(f),onShowList:pe=>V?.(f,pe)}):null,ie=!f.is_notice&&!f.completed&&!!f.due_date&&f.due_date.slice(0,10)<=t,Ce=ot(),we=Yi(f,Ce.resolveTask),ve=!f.is_notice&&f.completed&&f.review_pending&&Ce.onReviewDone&&(Ce.myAccountSeq??0)>0&&(f.author_account_seq??0)===(Ce.myAccountSeq??0)?Ci(ul,{children:[je(rh,{variant:"contained",size:"small",disableElevation:!0,onClick:pe=>{pe.stopPropagation(),J(pe.currentTarget)},sx:ei,children:"\uAC80\uC218\uC644\uB8CC"}),je(ti,{anchorEl:Y,onCancel:()=>J(null),onConfirm:()=>{Ce.onReviewDone?.(f),J(null)}})]}):null,Ke=ie?"#e5484d":Be.colors.textPrimary,De=je(Tt,{className:"cell",onClick:de?void 0:pe=>N(f,"due_date",pe.currentTarget),sx:{justifyContent:"center",color:Ke,fontWeight:500,whiteSpace:"nowrap",...de?{}:{cursor:"pointer","&:hover":{bgcolor:Be.table.cellHoverBg}}},children:f.due_date?w2(f):null});return Ci(Tt,{onContextMenu:pe=>y(f,pe),sx:{display:"grid",gridTemplateColumns:g,minHeight:48,position:"relative",fontSize:15,bgcolor:Be.table.rowBg,color:Be.table.rowColor,borderBottom:v?"none":`1px solid ${Be.table.rowBorderColor}`,"&:hover":{bgcolor:Be.table.rowHoverBg},"& > .cell":{px:1,minWidth:0,display:"flex",alignItems:"center",borderRight:`1px solid ${Be.table.rowBorderColor}`},"& > .cell:first-of-type":{px:1.5},"& > .cell:last-of-type":{borderRight:"none",pr:2,...M?{pl:2}:{}}},children:[je(Tt,{className:"cell",sx:{justifyContent:"center"},children:f.is_event?(()=>{let pe=Et(f.icon||yr);if(!pe)return null;let Bt=je(pe,{sx:{fontSize:19,color:f.icon_color||"#1e3a8a"}});return se||!K?Bt:je(Ji,{title:"\uC544\uC774\uCF58 \uBCC0\uACBD",arrow:!0,enterDelay:400,disableInteractive:!0,children:je(m2,{onClick:Fe=>{Fe.stopPropagation(),K(f,Fe.currentTarget)},sx:{p:.25,borderRadius:1,"&:hover":{bgcolor:Be.table.cellHoverBg}},children:Bt})})})():!O&&!w&&!m?je(Ji,{title:f.completed&&f.completed_by?`${f.completed_by} \xB7 ${bn(f.completed_time)} \uC644\uB8CC`:f.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC",arrow:!0,enterDelay:300,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:je(g2,{checked:f.completed,inputProps:{"aria-label":f.completed?`${f.title} \uC644\uB8CC \uD574\uC81C`:`${f.title} \uC644\uB8CC \uCC98\uB9AC`},icon:je(v2,{sx:{fontSize:20,color:"#9a9a97",opacity:.45}}),checkedIcon:je(x2,{sx:{fontSize:20,color:"#2f80ed"}}),onClick:pe=>pe.stopPropagation(),onChange:(pe,Bt)=>P({anchorEl:pe.currentTarget,task:f,nextCompleted:Bt}),sx:{p:.5}})}):null}),d?je(Tt,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap",fontVariantNumeric:"tabular-nums",color:"#37352f"},children:f.ticket_no||"-"}):null,u?je(Tt,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap"},children:f.support_type?(()=>{let pe=oh(f.support_type);return je(tu,{label:fl(f.support_type),bg:pe.bg,fg:pe.fg})})():"-"}):null,Ci(Tt,{className:"cell",onClick:()=>p(f),sx:{gap:1,pl:2,cursor:"pointer","&:hover":{bgcolor:Be.table.cellHoverBg}},children:[(()=>{if(!f.is_notice)return null;let pe=Et(f.icon||pr);return pe?je(pe,{sx:{fontSize:18,flexShrink:0,color:f.icon_color||"#e5484d"}}):null})(),!u&&f.is_support&&f.support_type?(()=>{let pe=oh(f.support_type);return je(tu,{label:fl(f.support_type),bg:pe.bg,fg:pe.fg})})():null,d&&(f.origin_license_seq??0)>0&&f.origin_license_name?je(tu,{label:f.origin_license_name,bg:"#fdf0e6",fg:"#d9730d"}):null,(()=>{if(f.is_notice||u||f.is_support)return null;let pe=Ln(f);return pe==="involved"?null:je(Ji,{title:pe==="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:pe==="all"?je(b2,{sx:{fontSize:15,flexShrink:0,color:"#2f80ed"}}):je(y2,{sx:{fontSize:15,flexShrink:0,color:"#d9730d"}})})})(),je(Tt,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:15,fontWeight:f.completed&&x?400:Be.table.rowTitleFontWeight,color:f.completed&&x?Be.colors.textMuted:Be.table.rowTitleColor,textDecoration:f.completed&&x?"line-through":"none"},children:ru(f.title,s)}),we?je(Tt,{component:"span",sx:{flexShrink:0,fontSize:12.5,color:Be.colors.textMuted,fontVariantNumeric:"tabular-nums"},children:we}):null,(f.comment_count??f.comments?.length??0)>0?je(ri,{sx:{fontSize:16,flexShrink:0,color:"#9a9a97"}}):null,je(Tt,{sx:{flexShrink:0,display:"flex",alignItems:"center"},children:je(Zo,{labelKeys:f.label_keys??[],labelOptions:l})}),_&&!f.completed?je(Tt,{component:"span",sx:{flexShrink:0,px:.55,fontSize:10.5,fontWeight:700,lineHeight:1.6,color:"#fff",bgcolor:"#e5484d",borderRadius:"4px"},children:"N"}):null,Ka(f)&&!f.archived&&!se&&L?je(rh,{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:pe=>{pe.stopPropagation(),L(f)},children:"\uBCF4\uAD00"}):null]}),(()=>{let pe=se||!!f.is_event||!!f.completed;return je(Tt,{className:"cell",onClick:pe?void 0:Bt=>D(f,Bt.currentTarget),sx:{py:.5,justifyContent:"center",...pe?{}:{cursor:"pointer","&:hover":{bgcolor:Be.table.cellHoverBg}}},children:f.is_event?(()=>{let Bt=Hs(f);return Bt?je(Lt,{option:Bt}):null})():je(Lt,{option:xr(f)})})})(),u?je(Tt,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap",fontVariantNumeric:"tabular-nums"},children:Ks(f.created_time)}):null,je(Tt,{className:"cell",onClick:de?void 0:pe=>N(f,"start_date",pe.currentTarget),sx:{justifyContent:"center",whiteSpace:"nowrap",...de?{}:{cursor:"pointer","&:hover":{bgcolor:Be.table.cellHoverBg}}},children:Ks(f.start_date)}),De,u?Ci(ul,{children:[je(Ji,{title:f.origin_license_name||"",arrow:!0,placement:"top",disableInteractive:!0,slotProps:{transition:{timeout:0}},children:je(Tt,{className:"cell",sx:{gap:.75,justifyContent:"center"},children:je(Qi,{names:[f.author_name||f.origin_author_name||f.created_by||""],searchText:s,avatarSrcByName:il(f,o)})})}),je(Tt,{className:"cell",sx:{gap:.75,justifyContent:"center"},children:je(Qi,{names:(f.answerer_names??[]).slice(0,1),searchText:s,avatarSrcByName:o})})]}):null,C?je(Tt,{className:"cell",onClick:de?void 0:()=>z(f,"targets"),sx:{gap:.75,...de?{}:{cursor:"pointer","&:hover":{bgcolor:Be.table.cellHoverBg}}},children:je(nh,{display:I,summary:E,searchText:s,avatarSrcByName:o})}):null,!C&&f.is_notice?je(Tt,{className:"cell",onClick:de?void 0:()=>z(f,"targets"),sx:{gridColumn:c?"span 2":"auto",gap:.75,...de?{}:{cursor:"pointer","&:hover":{bgcolor:Be.table.cellHoverBg}}},children:je(nh,{display:I,summary:E,searchText:s,avatarSrcByName:o})}):null,!C&&!f.is_notice&&!f.is_event&&c?je(Tt,{className:"cell",onClick:it?void 0:()=>z(f,"manager"),sx:{gap:.75,...Te||Re||b?{justifyContent:"center"}:{},...it?{}:{cursor:"pointer","&:hover":{bgcolor:Be.table.cellHoverBg}}},children:Te?je(eo,{onClick:pe=>T?.(f,pe.currentTarget),children:"\uAC00\uC838\uAC00\uAE30"}):Re?je(eo,{onClick:pe=>S?.(f,pe.currentTarget),children:"\uAC00\uC838\uAC00\uAE30"}):je(Qi,{names:f.manager_name?[f.manager_name]:[],searchText:s,avatarSrcByName:o,emphasize:ge})}):null,!C&&!f.is_notice?je(Tt,{className:"cell",onClick:ke?void 0:()=>z(f,"receivers"),sx:{gridColumn:f.is_event&&c?"span 2":"auto",gap:.75,...ke?{}:{cursor:"pointer","&:hover":{bgcolor:Be.table.cellHoverBg}}},children:je(Qi,{names:f.receiver_names,searchText:s,avatarSrcByName:o})}):null,je(Tt,{className:"cell",onClick:se?void 0:pe=>W?.(f,pe.currentTarget),sx:{py:.5,justifyContent:"center",...se?{}:{cursor:"pointer","&:hover":{bgcolor:Be.table.cellHoverBg}}},children:je(Xr,{priority:f.priority,plain:!0})}),n?je(Tt,{className:"cell",onClick:de?void 0:pe=>A?.(f,pe.currentTarget),sx:{gap:.5,justifyContent:"flex-start",...de?{}:{cursor:"pointer","&:hover":{bgcolor:Be.table.cellHoverBg}}},children:R?Ci(ul,{children:[(()=>{let pe=Et(j);return pe?je(pe,{sx:{fontSize:15,flexShrink:0,color:"#1e3a8a"}}):null})(),je(Tt,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:R})]}):null}):null,C?je(Tt,{className:"cell",sx:{justifyContent:"center"},children:be}):null,!C&&i&&a&&!u?je(Tt,{className:"cell",sx:{justifyContent:"center"},children:f.is_notice?be:ve||(oe?je(Zi,{canConfirm:!!k?.canConfirm,count:k?.count??0,total:k?.total??0,myConfirmed:!!k?.myTime,onConfirm:()=>B?.(f),onShowList:pe=>V?.(f,pe)}):null)}):null,!C&&h==="action"?je(Tt,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap",color:Be.table.rowSubColor},children:f.is_notice?be:ve||(k&&k.total>0?je(Zi,{canConfirm:!!k.canConfirm,count:k.count,total:k.total,myConfirmed:!!k.myTime,onConfirm:()=>B?.(f),onShowList:pe=>V?.(f,pe)}):"-")}):null,!C&&!i?je(Tt,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap",color:m?Be.colors.danger:x?Be.table.rowSubColor:Be.table.rowTitleColor},children:m?Ks(f.deleted_time):f.completed_time||"-"}):null,d||u?null:je(Tt,{className:"cell",onClick:()=>{!H&&!X&&(ne(f.note),Z(!0))},sx:{color:"#6f6f6c",cursor:H?"default":"text"},children:X?je(Tt,{component:"input",ref:te,autoFocus:!0,spellCheck:!1,value:ee,onChange:pe=>ne(pe.target.value),onBlur:()=>{Z(!1),ee.trim()!==f.note&&q(f.seq,ee)},onKeyDown:pe=>{pe.key==="Enter"&&pe.target.blur(),pe.key==="Escape"&&(ne(f.note),Z(!1))},sx:{flex:1,minWidth:0,width:"100%",border:"none",outline:"none",bgcolor:"transparent",font:"inherit",lineHeight:"inherit",letterSpacing:"inherit",color:Be.table.rowTitleColor,caretColor:Be.table.rowTitleColor,p:0,m:0}}):je(Tt,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:f.note?ru(f.note,s):""})}),ge?je(Tt,{component:"span",sx:{position:"absolute",left:3,top:6,bottom:6,width:3,bgcolor:"#2f80ed",borderRadius:1.5,pointerEvents:"none"}}):null]})});import{jsx as k2}from"react/jsx-runtime";var sh=_2(function(f){let l=(f.useTaskItem?f.useTaskItem(f.task.seq):void 0)??f.task,{myAccountSeq:o}=f,{editPolicy:s}=ot(),r=f.projectByKey.get(l.tab_key??"");return k2(ih,{hideBottomBorder:f.hideBottomBorder,gridTemplate:f.gridTemplate,task:l,statusOptions:f.statusOptions,avatarSrcByName:f.avatarSrcByName,searchText:f.searchText,myAccountSeq:o,todayStr:f.todayStr,showProject:f.showProject,showManager:f.showManager,showActions:f.showActions,showRequest:f.showRequest,confirmMode:f.confirmMode,confirmInfo:l.is_notice?void 0:f.getConfirmInfo?.(l),onConfirmTask:f.onConfirmTask,projectLabel:r?.label??"",projectIcon:r?.icon??"",onProjectClick:f.onProjectClick,onRequestReply:f.onRequestReply,onRequestToggleCompleted:f.onRequestToggleCompleted,onDateClick:f.onDateClick,onChangeNote:f.onChangeNote,onMemberClick:f.onMemberClick,onClaimClick:f.onClaimClick,onVolunteerClick:f.onVolunteerClick,onStatusClick:f.onStatusClick,onOpenDetail:f.onOpenDetail,onTaskContextMenu:f.onTaskContextMenu,notice:f.notice,bugMode:f.bugMode,supportMode:f.supportMode,managerCentered:f.managerCentered,trashMode:f.trashMode,dimCompleted:f.dimCompleted,noticeReadOnly:!Qn(l,o),coreLocked:Qo(l,o,s),readOnly:f.readOnly,noteLocked:f.readOnly||(l.is_notice?!tl(l,o):!Qn(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?f.getTargetSummary?.(l):void 0,targetDisplay:l.is_notice?f.getTargetDisplay?.(l):void 0,onArchiveTask:f.onArchiveTask,unread:f.isTaskUnread?.(l)??!1,ackInfo:l.is_notice?f.getAckInfo?.(l):void 0,onAckConfirm:f.onAckConfirm,onAckListClick:f.onAckListClick,onPriorityClick:f.onPriorityClick,onIconClick:f.onIconClick,lastColumnCentered:f.lastColumnCentered})});import{useMemo as ah,useState as ou}from"react";import{Box as Bi,Button as lh,ButtonBase as ch,Dialog as C2,Divider as iu,Menu as B2,MenuItem as I2,Popover as E2}from"@mui/material";import uh from"@mui/icons-material/ChevronRight";import M2 from"@mui/icons-material/Check";import R2 from"@mui/icons-material/NotificationsActiveOutlined";import{SimpleCalendar as O2,TimePicker as A2}from"@ehfuse/mui-datetime-picker";import D2 from"@mui/icons-material/TimerOutlined";import{useEffect as S2,useState as T2}from"react";function to(e){let{loadHolidays:f}=ot(),[g,l]=T2(()=>new Map),o=e.join(",");return S2(()=>{if(!f||!o){l(new Map);return}let s=!1;return f(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}},[f,o]),g}var nu=["min30_before","hour1_before","hour2_before","same_day","day_before","two_days_before","three_days_before","week_before"];function ro(e){let f=Array.isArray(e?.reminders)?e?.reminders:[e?.reminder],g=new Set;for(let l of f){let o=String(l??"").trim();nu.includes(o)&&g.add(o)}return nu.filter(l=>g.has(l))}function dl(e,f){if(f==="none")return[];let g=e.includes(f)?e.filter(l=>l!==f):[...e,f];return nu.filter(l=>g.includes(l))}import{Fragment as fh,jsx as jr,jsxs as zn}from"react/jsx-runtime";var P2=9,N2=[{value:"min30_before",label:"30\uBD84 \uC804"},{value:"hour1_before",label:"1\uC2DC\uAC04 \uC804"},{value:"hour2_before",label:"2\uC2DC\uAC04 \uC804"}],dh=[{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"}],hh=[{value:"none",label:"\uC5C6\uC74C"},...N2,...dh];function su(e){return e?hh:[{value:"none",label:"\uC5C6\uC74C"},...dh]}function L2(e){return e==="same_day"?"\uB2F9\uC77C":hh.find(f=>f.value===e)?.label??"\uC5C6\uC74C"}function au(e){if(e.length===0)return"\uC5C6\uC74C";let f=e.map(g=>L2(g));return f.length<=3?f.join(", "):`${f.slice(0,3).join(", ")} \uC678 ${f.length-3}`}function z2(e){let f=e?new Date(`${e}T00:00:00`):new Date;return Number.isNaN(f.getTime())?new Date:f}function Bn({anchorEl:e,open:f,date:g,reminders:l,hideReminder:o=!1,showTime:s=!1,centered:r=!1,onClose:t,onDateChange:n,onReminderChange:c}){let[i,a]=ou(null),[h,d]=ou(null),u=Jn(),b=String(g??"").trim().slice(0,10),m=String(g??"").trim().slice(11,16),x=/^\d{2}:\d{2}$/.test(m)?m:"",k=(S,D)=>n(D?`${S} ${D}`:S),{defaultDueHour:B}=ot(),R=`${String(Number.isInteger(B)&&B>=0&&B<=23?B:P2).padStart(2,"0")}:00`,j=S=>{if(x)return x;let D=new Date;return S===mr(D)?`${String(D.getHours()).padStart(2,"0")}:${String(D.getMinutes()).padStart(2,"0")}`:R},[A,P]=ou(()=>{let S=Number(b.slice(0,4));return Number.isFinite(S)&&S>1900?S:new Date().getFullYear()}),N=ah(()=>[A-1,A,A+1],[A]),q=to(N),z=ah(()=>{let S=[];for(let D of q.keys()){let p=new Date(`${D}T00:00:00`);Number.isNaN(p.getTime())||S.push(p)}return S},[q]),T=zn(Bi,{sx:{width:300,maxWidth:"100%"},children:[jr(Bi,{sx:{height:320},children:jr(O2,{selectedDate:z2(b),onSelect:S=>{k(mr(S),s?j(mr(S)):x),s||t()},onClose:t,showFooter:!1,autoApply:!0,holidays:z,onYearChange:S=>P(S),onMonthChange:(S,D)=>{typeof D=="number"&&P(D)}})}),s?zn(fh,{children:[jr(iu,{sx:{borderColor:"#e6e6e3"}}),zn(ch,{onClick:S=>d(S.currentTarget),sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",px:2,py:1.25,fontSize:14,"&:hover":{bgcolor:"#f8f8f7"}},children:[zn(Bi,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:.75,color:"#37352f"},children:[jr(D2,{sx:{fontSize:17,color:"#9a9a97"}}),"\uC2DC\uAC01"]}),zn(Bi,{component:"span",sx:{display:"inline-flex",alignItems:"center",color:"#37352f"},children:[x||"\uC5C6\uC74C",jr(uh,{sx:{fontSize:18,ml:.25,color:"#9a9a97"}})]})]}),jr(A2,{anchorEl:h,open:!!h,onClose:()=>d(null),centered:r,value:{hour:x.slice(0,2)||R.slice(0,2),minute:x.slice(3,5)||"00"},format:"HH:mm",minuteStep:5,autoApply:!0,locale:"ko",onChange:(S,D)=>{k(b||mr(new Date),`${S}:${D}`),d(null)}})]}):null,o?null:zn(fh,{children:[jr(iu,{sx:{borderColor:"#e6e6e3"}}),zn(ch,{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:[zn(Bi,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:.75,color:"#37352f"},children:[jr(R2,{sx:{fontSize:17,color:"#9a9a97"}}),"\uC0AC\uC804\uC54C\uB9BC"]}),zn(Bi,{component:"span",sx:{display:"inline-flex",alignItems:"center",color:"#37352f"},children:[au(l),jr(uh,{sx:{fontSize:18,ml:.25,color:"#9a9a97"}})]})]}),jr(B2,{transitionDuration:0,anchorEl:i,open:!!i,onClose:()=>a(null),anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},...u,children:su(!!x).map(S=>{let D=S.value==="none"?l.length===0:l.includes(S.value);return zn(I2,{selected:D,onClick:()=>{c(dl(l,S.value)),S.value==="none"&&a(null)},sx:{fontSize:14,minWidth:140,justifyContent:"space-between",gap:1},children:[S.label,D?jr(M2,{sx:{fontSize:16,color:"#2f80ed"}}):null]},S.value)})})]}),jr(iu,{sx:{borderColor:"#e6e6e3"}}),zn(Bi,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",px:1,py:.5},children:[jr(lh,{size:"small",onClick:()=>{k(mr(new Date),s?j(mr(new Date)):x),t()},sx:{minWidth:0,px:1.25,fontSize:13.5,color:"#2563eb"},children:"\uC624\uB298"}),jr(lh,{size:"small",onClick:t,sx:{minWidth:0,px:1.25,fontSize:13.5,color:"#2563eb"},children:"\uB2EB\uAE30"})]})]});return r?jr(C2,{open:f,onClose:t,slotProps:{paper:{sx:{borderRadius:3,width:300,maxWidth:"calc(100vw - 48px)",overflow:"hidden"}}},children:T}):jr(E2,{transitionDuration:0,open:f,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:T})}import{useEffect as q2,useState as cu}from"react";import{Box as Ii,Button as $2,Switch as H2}from"@mui/material";import{FormDialog as W2}from"@ehfuse/mui-form-dialog";import{ClearTextField as U2}from"@ehfuse/mui-form-controls";import{ErrorAlert as V2}from"@ehfuse/alerts";import{Box as j2,ButtonBase as F2}from"@mui/material";import{jsx as lu}from"react/jsx-runtime";function hl({value:e,onChange:f}){return lu(j2,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(40px, 1fr))",gap:1},children:Pc.map(({key:g,Icon:l})=>{let o=g===e;return lu(F2,{onClick:()=>f(g),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:lu(l,{sx:{fontSize:20}})},g)})})}import{jsx as Co,jsxs as uu}from"react/jsx-runtime";function pl({open:e,title:f="\uC0C8 \uD504\uB85C\uC81D\uD2B8 \uCD94\uAC00",initialLabel:g="",initialIcon:l=Dc,confirmText:o="\uCD94\uAC00",initialUseSprints:s=!1,onClose:r,onSubmit:t}){let[n,c]=cu(""),[i,a]=cu(Dc),[h,d]=cu(!1);q2(()=>{e&&(c(g),a(l),d(s))},[e]);let u=()=>{let m=n.trim();if(!m){V2("\uD504\uB85C\uC81D\uD2B8 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}t(m,i,h),r()};return Co(W2,{open:e,onClose:r,maxWidth:"xs",title:f,locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-add-tab",sections:[{id:"add-tab",showTitle:!1,children:uu(Ii,{children:[Co(U2,{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}}),Co(Ii,{sx:{mt:2,fontSize:13,color:"#787774"},children:"\uC544\uC774\uCF58"}),Co(Ii,{sx:{mt:1,maxHeight:264,overflowY:"auto",pr:.5},children:Co(hl,{value:i,onChange:a})}),uu(Ii,{sx:{mt:2,display:"flex",alignItems:"center",justifyContent:"space-between",gap:1},children:[uu(Ii,{children:[Co(Ii,{sx:{fontSize:14,color:"#37352f"},children:"\uBAA9\uD45C(\uC2A4\uD504\uB9B0\uD2B8) \uC0AC\uC6A9"}),Co(Ii,{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)"})]}),Co(H2,{checked:h,onChange:(m,x)=>d(x)})]})]})}],actions:{showCancelButton:!0,right:Co($2,{variant:"contained",onClick:u,children:o})}})}import{Box as K2}from"@mui/material";import{jsx as G2}from"react/jsx-runtime";function es({size:e=40}){return G2(K2,{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 fu,ButtonBase as Y2,Divider as X2,Popover as Z2}from"@mui/material";import J2 from"@mui/icons-material/Check";import Q2 from"@ehfuse/overlay-scrollbar";import{jsx as Ei,jsxs as ph}from"react/jsx-runtime";var du=["#1e3a8a","#2f80ed","#06b6d4","#0fa3a3","#2f9e5b","#84cc16","#e8a33d","#d9730d","#e5484d","#e255a1","#a355c0","#8a5a2b","#57564f","#111827"];function ni({anchorEl:e,value:f,color:g="",onSelect:l,onSelectColor:o,onClose:s}){return Ei(Z2,{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:ph(fu,{sx:{width:"min(492px, calc(100vw - 32px))"},children:[Ei(Q2,{style:{maxHeight:"min(432px, calc(100dvh - 240px))"},contentStyle:{minWidth:0,padding:10},thumb:{width:6},children:Ei(hl,{value:f||So,onChange:r=>{l(r),s()}})}),o?ph(fu,{sx:{px:1.25,pb:1.25},children:[Ei(X2,{sx:{mb:1,borderColor:"#efefed"}}),Ei(fu,{sx:{display:"grid",gridTemplateColumns:`repeat(${du.length}, 1fr)`,justifyItems:"center"},children:du.map(r=>{let t=(g||du[0])===r;return Ei(Y2,{"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?Ei(J2,{sx:{fontSize:15,color:"#ffffff"}}):null},r)})})]}):null]})})}import{Fragment as yh,jsx as yt,jsxs as un}from"react/jsx-runtime";var bh=48,fv=5;function xh({tasks:e,statusOptions:f,avatarSrcByName:g,searchText:l,todayStr:o,sortBy:s,sortDirection:r,onSort:t,onRequestReply:n,onToggleCompleted:c,onChangeTaskDate:i,onChangeTaskReminder:a,groupBy:h,collapsedGroupKeys:d,customTabs:u,onToggleGroup:b,hideCompleted:m=!1,loading:x=!1,dimCompleted:k=!0,readOnly:B=!1,onChangeTaskIcon:R,onChangeTaskIconColor:j,onAddInGroup:A,canAddInGroup:P,renderGroupSummary:N,renderGroupTitleSummary:q,onChangeTaskProject:z,onAddProject:T,onChangeNote:S,onMemberClick:D,onClaimTask:p,onChangeTaskStatus:y,onOpenDetail:v,onTaskContextMenu:w,onMemberFilterClick:_,activeMemberFilters:C=[],onStatusFilterClick:O,statusFilterActive:F=!1,onAckFilterClick:$,ackFilterActive:K=!1,onProjectFilterClick:M,projectFilterActive:H=!1,onPriorityFilterClick:E,priorityFilterActive:I=!1,onValueFilterClick:L,activeValueFilters:U=[],columns:G,getConfirmInfo:V,onConfirmTask:W,myAccountSeq:X=0,currentUserName:Z="",groupManagerByMyRole:Y=!1,pinKindGroups:J=!1,allowManagerVolunteer:ee=!0,noticeAdmin:ne=!1,getTargetSummary:te,getTargetDisplay:oe,onArchiveTask:se,isTaskUnread:de,getAckInfo:ge,onAckConfirm:ke,onAckListClick:Be,onChangeTaskPriority:Te,onEndReached:Re,useTaskItem:it}){let be=lt(),ie=jn(()=>({showManager:!0,showActions:!0,showRequest:!0,...G}),[G]),Ce=ie.showManager??!0,we=ie.showActions??!0,ve=ie.showRequest??!0,Ke=ie.confirmMode??"none",De=ie.notice??!1,pe=ie.bug??!1,Bt=ie.support??!1,Fe=Bt||(ie.centerManager??!1),Ye=ie.trash??!1,_t=h!=="none",tt=jn(()=>_t?Ja(e,h,o,u,f,Z,{enabled:Y,myAccountSeq:X},J):[],[_t,e,h,o,u,f,Z,Y,X,J]),Ae=jn(()=>m?e.filter(ue=>!ue.completed):e,[e,m]),xe=jn(()=>Ae.filter(ue=>ue.completed||ue.archived||ue.is_support?!1:ue.is_notice?!!ge?.(ue).canAck:!!V?.(ue).canConfirm),[Ae,ge,V]),me=jn(()=>X>0?e.filter(ue=>ue.completed&&!ue.archived&&!ue.is_support&&!!ue.review_pending&&(ue.author_account_seq??0)===X):[],[e,X]),Ie=jn(()=>new Set([...xe,...me].map(ue=>ue.seq)),[xe,me]),Xe=jn(()=>tt.map(ue=>({section:ue,visibleTasks:ue.tasks.filter(Le=>!Ie.has(Le.seq)&&(!m||!Le.completed))})).filter(ue=>ue.visibleTasks.length>0),[tt,m,Ie]),qe=jn(()=>new Set(d),[d]),Pe=jn(()=>{let ue=[];if(_t)for(let{section:Le,visibleTasks:dt}of Xe){let Tr=qe.has(Le.key);if(ue.push({kind:"header",section:Le,visibleTasks:dt,collapsed:Tr}),!Tr)for(let Yr of dt)ue.push({kind:"task",task:Yr,last:!1})}else for(let Le of Ae)Ie.has(Le.seq)||ue.push({kind:"task",task:Le,last:!1});for(let Le=ue.length-1;Le>=0;Le-=1){let dt=ue[Le];if(dt.kind==="task"){dt.last=!0;break}}return ue},[_t,Xe,Ae,qe,Ie]),Mt=ie.showProject??(!De&&h!=="tab"),Ue=jn(()=>el({...ie,showProject:Mt}),[ie,Mt]),re=Fd({...ie,showProject:Mt}),le=qd({...ie,showProject:Mt}),{onReturnTask:fe}=ot(),Se=hu(null),pt=hu(null),Me=Ue[Ue.length-1]?.align==="center",ze=jn(()=>{let ue=new Map;for(let Le of u)ue.set(Le.key,{label:Le.archived?`${Le.label} (\uBCF4\uAD00\uB428)`:Le.label,icon:Le.icon});return ue},[u]),St=hu(null),[Oe,Ne]=oo(null);Gs(()=>{if(!Oe)return;let ue=()=>{Se.current&&(Se.current.scrollLeft=Oe.scrollLeft),pt.current&&(pt.current.scrollLeft=Oe.scrollLeft)};return ue(),Oe.addEventListener("scroll",ue,{passive:!0}),()=>Oe.removeEventListener("scroll",ue)},[Oe]);let at=Ae.length>0;Gs(()=>{if(!at){Ne(null);return}let ue=window.requestAnimationFrame(()=>{Ne(St.current?.getScrollContainer()??null)});return()=>window.cancelAnimationFrame(ue)},[at]);let Ge=`${h}|${s}|${r}|${l}|${m?1:0}`;Gs(()=>{Oe&&(Oe.scrollTop=0)},[Ge,Oe]);let[ct,Rt]=oo(!1);Gs(()=>{if(!Oe)return;let ue=()=>Rt(Oe.scrollHeight-Oe.clientHeight>4),Le=window.requestAnimationFrame(ue),dt=new ResizeObserver(ue);return dt.observe(Oe),Oe.firstElementChild&&dt.observe(Oe.firstElementChild),()=>{window.cancelAnimationFrame(Le),dt.disconnect()}},[Oe,Pe.length,d.length]),Gs(()=>{if(!Oe)return;let ue=Oe.clientHeight,Le=new ResizeObserver(()=>{let dt=Oe.clientHeight;dt!==ue&&(ue=dt,Oe.dispatchEvent(new Event("scroll")))});return Le.observe(Oe),()=>Le.disconnect()},[Oe]);let[ht,Ut]=oo(null),[Kt,Yt]=oo(null),[tr,Q]=oo(null),[ae,ye]=oo(null),[he,Ee]=oo(!1),[$e,We]=oo(null),rt=$e?e.find(ue=>ue.seq===$e.taskSeq)??null:null,[Je,Ve]=oo(null),st=Je?e.find(ue=>ue.seq===Je.taskSeq)??null:null,[It,jt]=oo(null),kt=It?e.find(ue=>ue.seq===It.taskSeq)??null:null,Pt=no((ue,Le)=>{jt({anchorEl:Le,taskSeq:ue.seq})},[]),Ot=no((ue,Le)=>{Ve({anchorEl:Le,taskSeq:ue.seq})},[]),Ft=no((ue,Le)=>{We({anchorEl:Le,taskSeq:ue.seq})},[]),Lr=no((ue,Le)=>{if(!Le)return;t(ue,s===ue&&r==="asc"?"desc":"asc")},[t,s,r]),Gr=no((ue,Le,dt)=>{Ut({anchorEl:dt,taskSeq:ue.seq,field:Le,date:ue[Le],isEvent:!!ue.is_event,reminders:ro(ue),completed:ue.completed})},[]),Sn=no((ue,Le)=>{ye({anchorEl:Le,task:ue})},[]),Xn=no(ue=>{ht&&(i(ht.taskSeq,ht.field,ue),Ut(Le=>Le&&{...Le,date:ue}))},[ht,i]),ce=no(ue=>{ht&&(a(ht.taskSeq,ue),Ut(Le=>Le&&{...Le,reminders:ue}))},[ht,a]),Qe=no((ue,Le)=>{Q({anchorEl:Le,taskSeq:ue.seq,title:ue.title,kind:"claim"})},[]),mt=no((ue,Le)=>{Q({anchorEl:Le,taskSeq:ue.seq,title:ue.title,kind:"volunteer"})},[]),zr=(ue,Le)=>yt(sh,{task:ue,hideBottomBorder:Le,gridTemplate:re,useTaskItem:it,statusOptions:f,avatarSrcByName:g,searchText:l,myAccountSeq:X,todayStr:o,showProject:Mt,showManager:Ce,showActions:we,showRequest:ve,confirmMode:Ke,notice:De,bugMode:pe,supportMode:Bt,managerCentered:Fe,trashMode:Ye,dimCompleted:k,readOnly:B,projectByKey:ze,getConfirmInfo:V,onConfirmTask:W,onProjectClick:Sn,onRequestReply:n,onRequestToggleCompleted:Yt,onDateClick:Gr,onChangeNote:S,onMemberClick:D,onClaimClick:p?Qe:void 0,onVolunteerClick:ee?mt:void 0,onStatusClick:Ft,onOpenDetail:v,onTaskContextMenu:w,onPriorityClick:Ot,onIconClick:R?Pt:void 0,lastColumnCentered:Me,getTargetSummary:te,getTargetDisplay:oe,getAckInfo:ge,isTaskUnread:de,onArchiveTask:se,onAckConfirm:ke,onAckListClick:Be},ue.seq);return un(ar,{sx:{display:"flex",flexDirection:"column",flex:1,minHeight:0,border:`1px solid ${be.table.borderColor}`,borderRadius:"0 0 4px 4px",overflow:"hidden",bgcolor:be.table.bg,color:be.table.rowColor,...be.table.sx},children:[yt(ar,{ref:Se,sx:{overflow:"hidden",flexShrink:0},children:yt(ar,{sx:{display:"grid",gridTemplateColumns:re,minWidth:le,borderBottom:`1px solid ${be.table.borderColor}`,flexShrink:0,bgcolor:be.table.headerBg,"& > *":{borderRight:`1px solid ${be.table.rowBorderColor}`},"& > *:first-of-type":{px:1.5},"& > *:last-child":{borderRight:"none",pr:2,...Me?{pl:2}:{}},...be.table.headerSx},children:Ue.map(ue=>{let Le=s===ue.id,dt=!!ue.memberFilter,Tr=dt&&C.includes(ue.memberFilter),Yr=dt||!!ue.statusFilter||!!ue.ackFilter||!!ue.projectFilter||!!ue.priorityFilter||!!ue.valueFilter,Zn=Tr||!!ue.valueFilter&&U.includes(ue.valueFilter)||!!ue.statusFilter&&F||!!ue.ackFilter&&K||!!ue.projectFilter&&H||!!ue.priorityFilter&&I;return un(ar,{onClick:Nn=>{ue.memberFilter?_(ue.memberFilter,Nn.currentTarget):ue.statusFilter?O(Nn.currentTarget):ue.ackFilter?$?.(Nn.currentTarget):ue.projectFilter?M?.(Nn.currentTarget):ue.priorityFilter?E?.(Nn.currentTarget):ue.valueFilter?L?.(ue.valueFilter,Nn.currentTarget):Lr(ue.id,ue.sortable)},sx:{display:"flex",alignItems:"center",justifyContent:ue.align==="center"?"center":"flex-start",gap:.5,px:1,...ue.id==="title"?{pl:2}:{},py:1,minWidth:0,fontSize:be.table.headerFontSize,color:ue.sortable||Yr?be.table.headerActiveColor:be.table.headerColor,whiteSpace:"nowrap",cursor:ue.sortable||Yr?"pointer":"default",userSelect:"none",...Le?{color:be.table.headerFilteredColor}:{},...Zn?{color:be.table.headerFilteredColor,fontWeight:600}:{}},children:[ue.icon,ue.label,Zn?yt(av,{sx:{fontSize:14}}):null,Le?r==="asc"?yt(nv,{sx:{fontSize:13}}):yt(ov,{sx:{fontSize:13}}):null]},ue.id)})})}),xe.length>0||me.length>0?yt(ar,{sx:{flexShrink:0,maxHeight:`${be.table.groupHeader.minHeight+1+bh*fv}px`,overflowY:"auto",overflowX:"hidden",borderBottom:"1px solid #000"},ref:pt,children:un(ar,{sx:{minWidth:le},children:[xe.length>0?un(yh,{children:[un(ar,{sx:{position:"sticky",top:0,zIndex:1,display:"flex",alignItems:"center",gap:.5,px:1.5,minHeight:be.table.groupHeader.minHeight,bgcolor:"#fdf3f2",borderBottom:"1px solid #f2d7d4"},children:[yt(ar,{component:"span",sx:{fontSize:be.table.groupHeader.labelFontSize,fontWeight:be.table.groupHeader.labelFontWeight,color:be.table.groupHeader.labelColor},children:"\uBBF8\uD655\uC778"}),yt(ar,{sx:{ml:"auto",display:"flex",alignItems:"center",pr:.5},children:yt(ar,{component:"span",sx:{flexShrink:0,width:be.table.groupHeader.badge.width,py:be.table.groupHeader.badge.paddingY,borderRadius:`${be.table.groupHeader.badge.borderRadius}px`,bgcolor:"#e5484d",color:"#fff",fontSize:be.table.groupHeader.badge.fontSize,fontWeight:be.table.groupHeader.badge.fontWeight,lineHeight:1.6,textAlign:"center",fontVariantNumeric:"tabular-nums"},children:xe.length})})]}),xe.map((ue,Le)=>zr(ue,me.length===0&&Le===xe.length-1))]}):null,me.length>0?un(yh,{children:[un(ar,{sx:{position:"sticky",top:0,zIndex:1,display:"flex",alignItems:"center",gap:.5,px:1.5,minHeight:be.table.groupHeader.minHeight,bgcolor:"#f4f0fe",borderBottom:"1px solid #e2dbf9"},children:[yt(ar,{component:"span",sx:{fontSize:be.table.groupHeader.labelFontSize,fontWeight:be.table.groupHeader.labelFontWeight,color:be.table.groupHeader.labelColor},children:"\uAC80\uC218 \uB300\uAE30"}),yt(ar,{sx:{ml:"auto",display:"flex",alignItems:"center",pr:.5},children:yt(ar,{component:"span",sx:{flexShrink:0,width:be.table.groupHeader.badge.width,py:be.table.groupHeader.badge.paddingY,borderRadius:`${be.table.groupHeader.badge.borderRadius}px`,bgcolor:"#8b5cf6",color:"#fff",fontSize:be.table.groupHeader.badge.fontSize,fontWeight:be.table.groupHeader.badge.fontWeight,lineHeight:1.6,textAlign:"center",fontVariantNumeric:"tabular-nums"},children:me.length})})]}),me.map((ue,Le)=>zr(ue,Le===me.length-1))]}):null]})}):null,Ae.length===0&&x?yt(ar,{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:yt(es,{})}):Ae.length===0?yt(ar,{role:"status","aria-live":"polite",sx:{py:8,textAlign:"center",color:be.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.`:pe?"\uB4F1\uB85D\uB41C \uC624\uB958\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.":Bt?"\uC811\uC218\uB41C \uBB38\uC758\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.":De?"\uB4F1\uB85D\uB41C \uACF5\uC9C0\uC0AC\uD56D\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.":"\uD45C\uC2DC\uD560 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):yt(ar,{sx:{flex:1,minHeight:0},children:yt(uv,{ref:St,style:{height:"100%"},contentStyle:{minWidth:le},thumb:{width:8},showHorizontalScrollbar:!0,scrollTopFab:!0,children:Oe?yt(cv,{customScrollParent:Oe,data:Pe,computeItemKey:(ue,Le)=>Le.kind==="header"?`group:${Le.section.key}`:Le.task.seq,endReached:_t?void 0:Re,defaultItemHeight:bh,increaseViewportBy:{top:600,bottom:600},itemContent:(ue,Le)=>{if(Le.kind==="task")return zr(Le.task,Le.last&&ct);let{section:dt,visibleTasks:Tr,collapsed:Yr}=Le;return un(ar,{onClick:()=>b(dt.key),sx:{display:"flex",alignItems:"center",gap:.5,px:1.5,minHeight:be.table.groupHeader.minHeight,bgcolor:be.table.groupHeader.bg,borderBottom:`1px solid ${be.table.groupHeader.borderColor}`,cursor:"pointer",userSelect:"none","&:hover":{bgcolor:be.table.groupHeader.hoverBg},...be.table.groupHeader.sx},children:[Yr?yt(sv,{sx:{fontSize:20,color:be.colors.textMuted}}):yt(iv,{sx:{fontSize:20,color:be.colors.textMuted}}),yt(ar,{component:"span",sx:{fontSize:be.table.groupHeader.labelFontSize,fontWeight:be.table.groupHeader.labelFontWeight,color:be.table.groupHeader.labelColor},children:dt.label}),q?yt(ar,{sx:{flexShrink:0,display:"flex",alignItems:"center",ml:.5},children:q(dt.key,dt.tasks)}):null,A&&(!P||P(dt.key))?yt(tv,{size:"small","aria-label":"\uC774 \uADF8\uB8F9\uC5D0 \uC5C5\uBB34 \uB4F1\uB85D",onClick:Zn=>{Zn.stopPropagation(),A(dt.key,dt.tasks)},sx:{flexShrink:0,ml:.75,p:.25,color:be.colors.textSecondary,"&:hover":{bgcolor:be.colors.surfaceHover,color:be.colors.accentOnSurface}},children:yt(gh,{sx:{fontSize:21}})}):null,un(ar,{sx:{ml:"auto",minWidth:0,display:"flex",alignItems:"center",gap:1,pr:.5},children:[N?N(dt.key,dt.tasks):null,yt(ar,{component:"span",sx:{flexShrink:0,width:be.table.groupHeader.badge.width,py:be.table.groupHeader.badge.paddingY,borderRadius:`${be.table.groupHeader.badge.borderRadius}px`,bgcolor:be.table.groupHeader.badge.bg,border:be.table.groupHeader.badge.border,color:be.table.groupHeader.badge.color,fontSize:be.table.groupHeader.badge.fontSize,fontWeight:be.table.groupHeader.badge.fontWeight,lineHeight:1.6,textAlign:"center",fontVariantNumeric:"tabular-nums"},children:Tr.length})]})]})}},Ge):null})}),yt(Gi,{anchorEl:$e?.anchorEl??null,value:rt?.status??"",options:rt?Ya(rt):$s,onSelect:ue=>{rt&&y(rt.seq,ue)},onComplete:rt&&!rt.completed&&!rt.is_notice&&!rt.is_event&&!rt.is_bug&&!Ye&&((rt.author_account_seq??0)===X||(rt.manager_account_seq??0)===X)?()=>c(rt,!0):void 0,onClose:()=>We(null)}),yt(mh,{transitionDuration:0,anchorEl:Je?.anchorEl??null,open:!!Je,onClose:()=>Ve(null),children:["high","medium","low"].map(ue=>un(ml,{selected:st?.priority===ue,onClick:()=>{st&&Te?.(st.seq,ue),Ve(null)},sx:{fontSize:14,minWidth:130,gap:1},children:[yt(Xr,{priority:ue,small:!0}),st?.priority===ue?yt(pu,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},ue))}),un(mh,{anchorEl:ae?.anchorEl??null,open:!!ae,onClose:()=>ye(null),transitionDuration:0,children:[un(ml,{selected:!ae?.task.tab_key,onClick:()=>{ae&&z(ae.task.seq,""),ye(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[yt(lv,{sx:{fontSize:17,color:"#9a9a97"}}),"\uC5C6\uC74C",ae?.task.tab_key?null:yt(pu,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}})]}),u.filter(ue=>!ue.archived).map(ue=>{let Le=Et(ue.icon),dt=ae?.task.tab_key===ue.key;return un(ml,{selected:dt,onClick:()=>{ae&&z(ae.task.seq,ue.key),ye(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[Le?yt(Le,{sx:{fontSize:17,color:"#1e3a8a"}}):null,ue.label,dt?yt(pu,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},ue.key)}),T?[yt(ev,{},"add-project-divider"),un(ml,{onClick:()=>Ee(!0),sx:{fontSize:14,color:"#787774"},children:[yt(rv,{children:yt(gh,{sx:{fontSize:18,color:"#787774"}})}),"\uD504\uB85C\uC81D\uD2B8 \uCD94\uAC00"]},"add-project")]:null]}),T?yt(pl,{open:he,onClose:()=>Ee(!1),onSubmit:(ue,Le)=>{let dt=ae?.task.seq??0;(async()=>{let Tr=await T(ue,Le);Tr&&dt&&z(dt,Tr)})(),ye(null)}}):null,yt(ni,{anchorEl:It?.anchorEl??null,value:kt?.icon??"",color:kt?.icon_color??"",onSelect:ue=>{It&&R?.(It.taskSeq,ue),jt(null)},onSelectColor:j?ue=>{It&&j(It.taskSeq,ue)}:void 0,onClose:()=>jt(null)}),yt(Bn,{anchorEl:ht?.anchorEl??null,open:!!ht&&ht?.field==="start_date",date:ht?.date??"",reminders:[],hideReminder:!0,showTime:!ht?.isEvent,onClose:()=>Ut(null),onDateChange:Xn,onReminderChange:()=>{}}),yt(Bn,{anchorEl:ht?.anchorEl??null,open:!!ht&&ht?.field==="due_date",date:ht?.date??"",showTime:!ht?.isEvent,reminders:ht?.reminders??[],hideReminder:!!ht?.completed,onClose:()=>Ut(null),onDateChange:Xn,onReminderChange:ce}),yt(At,{open:!!tr,anchorEl:tr?.anchorEl??null,title:tr?.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:()=>Q(null),onConfirm:()=>{tr&&p?.(tr.taskSeq),Q(null)}}),yt(cn,{open:!!Kt,anchorEl:Kt?.anchorEl??null,nextCompleted:Kt?.nextCompleted??!1,returnMode:!!fe&&!!(Kt&&Zr(Kt.task,X)),onCancel:()=>Yt(null),onConfirm:ue=>{Kt&&(ue&&fe?fe(Kt.task,ue):c(Kt.task,Kt.nextCompleted)),Yt(null)}})]})}import{useCallback as ao,useMemo as Bo,useRef as Nv,useState as qn}from"react";import{Box as $t,ButtonBase as Dh,Divider as Sh,IconButton as Th,Menu as Ch,MenuItem as oi}from"@mui/material";import xu from"@mui/icons-material/Add";import Bh from"@mui/icons-material/MoreVert";import Ih from"@mui/icons-material/EditOutlined";import Eh from"@mui/icons-material/ArchiveOutlined";import Mh from"@mui/icons-material/UnarchiveOutlined";import Lv from"@mui/icons-material/NotificationsOutlined";import zv from"@mui/icons-material/PeopleAltOutlined";import{SvgIcon as dv}from"@mui/material";import{jsx as vh}from"react/jsx-runtime";function Ir({sx:e,...f}){return vh(dv,{viewBox:"0 0 24 24",...f,sx:{fill:"none",...e},children:vh("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 jv,DragOverlay as Fv,PointerSensor as qv,pointerWithin as $v,rectIntersection as Hv,useDroppable as Wv,useSensor as Uv,useSensors as Vv}from"@dnd-kit/core";import{SortableContext as Ph,arrayMove as Rh,horizontalListSortingStrategy as Kv,useSortable as Gv,verticalListSortingStrategy as Yv}from"@dnd-kit/sortable";import{CSS as Xv}from"@dnd-kit/utilities";import vu from"@ehfuse/overlay-scrollbar";import{useState as xv}from"react";import{Box as so,ButtonBase as vv,Checkbox as wv,Tooltip as wh}from"@mui/material";import _v from"@mui/icons-material/AlarmOutlined";import kv from"@mui/icons-material/DragIndicator";import Sv from"@mui/icons-material/RadioButtonUnchecked";import Tv from"@mui/icons-material/CheckCircle";import Cv from"@mui/icons-material/TimerOutlined";import{Box as Fn,Button as hv,Popover as pv}from"@mui/material";import mv from"@mui/icons-material/CheckCircle";import{Fragment as gv,jsx as io,jsxs as Mi}from"react/jsx-runtime";function gl({anchorEl:e,open:f,acks:g,total:l,avatarSrcByName:o,pendingNames:s=[],onRequestConfirm:r,onClose:t}){let n=qt();return io(pv,{open:f&&(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:Mi(Fn,{sx:{minWidth:240,maxWidth:320,py:1},children:[Mi(Fn,{sx:{px:2,pb:.75,fontSize:Br(13.5),fontWeight:600,color:"#37352f",borderBottom:"1px solid #efefed"},children:["\uD655\uC778 ",g.length,"/",l]}),s.length>0&&g.length>0?Mi(Fn,{sx:{px:2,pt:1,pb:.5,fontSize:Br(12.5),fontWeight:600,color:"#9a9a97"},children:["\uD655\uC778 ",g.length]}):null,g.length===0?s.length>0?null:io(Fn,{sx:{px:2,py:1.5,fontSize:Br(13.5),color:"#9a9a97"},children:"\uC544\uC9C1 \uD655\uC778\uD55C \uC0AC\uB78C\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):g.map(c=>Mi(Fn,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:.75,minWidth:0},children:[io(Jr,{names:[c.name],size:22,avatarSrcByName:o}),io(Fn,{component:"span",sx:{fontSize:Br(14),color:"#37352f",whiteSpace:"nowrap"},children:c.name}),io(Fn,{component:"span",sx:{ml:"auto",fontSize:Br(12.5),color:"#9a9a97",whiteSpace:"nowrap"},children:bn(c.time)}),io(mv,{sx:{fontSize:16,color:"#2f80ed",flexShrink:0}})]},c.account_seq)),s.length>0?Mi(gv,{children:[Mi(Fn,{sx:{mt:g.length>0?.75:0,px:2,pt:1,pb:.5,borderTop:g.length>0?"1px solid #efefed":"none",fontSize:Br(12.5),fontWeight:600,color:"#9a9a97"},children:["\uBBF8\uD655\uC778 ",s.length]}),s.map(c=>Mi(Fn,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:.75,minWidth:0},children:[io(Jr,{names:[c],size:22,avatarSrcByName:o}),io(Fn,{component:"span",sx:{fontSize:Br(14),color:"#37352f",whiteSpace:"nowrap"},children:c})]},c))]}):null,r?io(Fn,{sx:{borderTop:"1px solid #efefed",px:1.5,pt:1,pb:.25},children:io(hv,{size:"small",fullWidth:!0,variant:"outlined",onClick:()=>{r(),t()},sx:{fontSize:Br(13)},children:"\uD655\uC778 \uC694\uCCAD"})}):null]})})}function bv(e){let f=Number(e.author_account_seq??0);return[...new Set([Number(e.manager_account_seq??0),...e.receiver_account_seqs??[]].filter(g=>g>0&&g!==f))]}function yv(e){let f=new Map,g=Number(e.manager_account_seq??0);g>0&&f.set(g,String(e.manager_name??"").trim());let l=e.receiver_account_seqs??[],o=e.receiver_names??[];return l.forEach((s,r)=>{s>0&&!f.has(s)&&f.set(s,String(o[r]??"").trim())}),f}function ts(e,f){let g=bv(e),l=e.acks??[],o=f>0?l.find(t=>t.account_seq===f):void 0,s=new Set(l.map(t=>t.account_seq)),r=yv(e);return{myTime:o?.time??"",canConfirm:f>0&&g.includes(f)&&!o,count:l.filter(t=>g.includes(t.account_seq)).length,total:g.length,pendingNames:g.filter(t=>!s.has(t)).map(t=>r.get(t)??"").filter(t=>t.length>0)}}function aO(e){let f=String(e??"").trim();return f?f.slice(5,16).replaceAll("-","."):""}import{Fragment as Mv,jsx as gr,jsxs as rs}from"react/jsx-runtime";function bl(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 Bv=3;function Iv(e){let f=e.trim();return f?f.slice(2,10).replaceAll("-","."):"-"}function Ev(){let e=new Date,f=String(e.getMonth()+1).padStart(2,"0"),g=String(e.getDate()).padStart(2,"0");return`${e.getFullYear()}-${f}-${g}`}var mu="taskbox-card-drag-handle";function Ys({task:e,statusOptions:f,showDueDate:g=!1,onRequestArchiveToggle:l,onRequestReply:o,onDueDateClick:s,titleFontSize:r=13,dragHandleProps:t}){let n=lt(),c=Yi(e,ot().resolveTask),a=!!e.due_date&&e.due_date.slice(0,10)<=Ev()?n.colors.danger:n.colors.textPrimary,h=ts(e,0),[d,u]=xv(null),b=Ki(e,f),m=new Set(e.label_keys??[]),x=b.filter(B=>!m.has(B.key)),k=b.filter(B=>m.has(B.key));return rs(Mv,{children:[rs(so,{sx:{display:"flex",alignItems:"flex-start",gap:.5},children:[t?gr(so,{className:mu,...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:gr(kv,{sx:{fontSize:18}})}):null,gr(wv,{size:"small",icon:gr(Sv,{sx:{fontSize:20}}),checkedIcon:gr(Tv,{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}}),gr(wh,{title:e.title,arrow:!0,enterDelay:300,children:rs(so,{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:Bv,overflowWrap:"anywhere",textDecoration:e.completed?"line-through":"none"},children:[e.is_event&&e.event_time?`${e.event_time} `:"",e.title,c?gr(so,{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?gr(ri,{sx:{fontSize:15,ml:.5,verticalAlign:"-2px",color:n.colors.textMuted}}):null]})})]}),e.is_bug&&e.ticket_no?gr(so,{sx:{pl:3,mt:-.5,fontSize:12.5,color:n.colors.textSecondary,fontWeight:500,fontVariantNumeric:"tabular-nums"},children:e.ticket_no}):null,rs(so,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:.5},children:[rs(so,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:.5,minWidth:0},children:[x.map(B=>gr(Lt,{option:B,small:!0},B.key)),gr(Xr,{priority:e.priority,small:!0}),k.map(B=>gr(Lt,{option:B,small:!0},B.key))]}),g?gr(wh,{title:"\uB9C8\uAC10\uC608\uC815",arrow:!0,placement:"top",disableInteractive:!0,slotProps:{transition:{timeout:0}},children:gr(vv,{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()?Iv(e.due_date):gr(_v,{sx:{fontSize:15,color:n.colors.textMuted}})})}):null]}),g&&(e.due_date.slice(11,16)||e.estimated_time)?rs(so,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:.25,mt:-.5,fontSize:12,color:n.colors.textSecondary},children:[gr(Cv,{sx:{fontSize:14}}),e.due_date.slice(11,16)||e.estimated_time]}):null,gr(Jr,{names:[...e.manager_name?[e.manager_name]:[],...e.receiver_names],size:20,ringFirst:!!e.manager_name}),h.total>0?gr(so,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:.5},children:gr(so,{sx:{flexShrink:0,width:64},onPointerDown:B=>B.stopPropagation(),onClick:B=>B.stopPropagation(),children:gr(Zi,{canConfirm:!1,count:h.count,total:h.total,onConfirm:()=>{},onShowList:B=>u(B)})})}):null,gr(gl,{anchorEl:d,open:!!d,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 Rv}from"@mui/material";import{useSortable as Ov}from"@dnd-kit/sortable";import{CSS as Av}from"@dnd-kit/utilities";import{jsx as _h}from"react/jsx-runtime";function Dv(e){return{px:1.25,py:1,display:"flex",flexDirection:"column",gap:.75,borderBottom:`1px solid ${e.borderColor}`,bgcolor:e.bg}}function kh({task:e,statusOptions:f,variant:g="card",showDueDate:l=!1,onRequestArchiveToggle:o,onRequestReply:s,onDueDateClick:r,onCardClick:t,onCardContextMenu:n,titleFontSize:c}){let i=lt(),{attributes:a,listeners:h,setNodeRef:d,transform:u,transition:b,isDragging:m}=Ov({id:String(e.seq)}),x=g==="list";return _h(Rv,{ref:d,onClick:t?()=>t(e):void 0,onContextMenu:n?k=>n(e,k):void 0,sx:{...x?Dv(i.card):bl(i.card),opacity:m?.35:e.completed?.55:1,transform:Av.Translate.toString(u),transition:b,position:"relative",cursor:"default","&:hover":x?{bgcolor:i.card.hoverBg}:{boxShadow:"0 3px 8px rgba(0,0,0,0.1)"}},children:_h(Ys,{task:e,statusOptions:f,showDueDate:l,onRequestArchiveToggle:o,onRequestReply:s,onDueDateClick:r,titleFontSize:c,dragHandleProps:{...a,...h}})})}function Pv(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?e.slice(5).replace("-","."):""}function In(e){if(e.status==="closed")return`${e.name} (\uC885\uB8CC)`;let f=Pv(e.end_date);return f?`${e.name} (~${f})`:e.name}import{jsx as nt,jsxs as Jt}from"react/jsx-runtime";var Oh=2,Nh="taskbox-column-drag-handle",wu=[mu,Nh],yl="group-",En="colmove-",gu="__default__",bu=Wc,yu="__other__",xl="sprint-",Ah=`${xl}0`,Zv={planning:"#9a9a97",active:"#2f80ed",closed:"#9a9a97"};function Lh(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 Jv({column:e,tasks:f,statusOptions:g,onRequestArchiveToggle:l,onRequestReply:o,onDueDateClick:s,onAddTask:r,canAdd:t,onOpenMenu:n,onCardClick:c,onCardContextMenu:i,grow:a,summary:h,onOpenSprintMenu:d}){let u=lt(),{setNodeRef:b,isOver:m}=Wv({id:`${yl}${e.key}`}),{attributes:x,listeners:k,setNodeRef:B,transform:R,transition:j,isDragging:A}=Gv({id:`${En}${e.key}`,disabled:e.isDefault||e.isArchived||!!e.locked});return Jt($t,{ref:P=>{b(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:Xv.Translate.toString(R),...j?{transition:`${j}, background-color 0.15s`}:{},opacity:A?.6:1},children:[Jt($t,{className:Nh,...x,...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?nt($t,{sx:{width:8,height:8,borderRadius:"50%",bgcolor:e.dot,flexShrink:0}}):e.isDefault?null:(()=>{let P=Et(e.icon);return P?nt(P,{sx:{fontSize:17,color:"#1e3a8a"}}):null})(),nt($t,{component:"span",sx:{fontSize:u.board.columnHeaderFontSize,fontWeight:700,color:u.board.columnHeaderColor,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.label}),nt($t,{component:"span",sx:{...Lh(u.board.badge),ml:"auto"},children:f.length}),e.sprint&&d?nt(Th,{size:"small","aria-label":"\uBAA9\uD45C \uBA54\uB274",onPointerDown:P=>P.stopPropagation(),onClick:P=>d(P.currentTarget,e.sprint),sx:{color:"#9a9a97"},children:nt(Bh,{sx:{fontSize:18}})}):e.locked?null:nt(Th,{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:nt(Bh,{sx:{fontSize:18}})})]}),h?nt($t,{sx:{px:1.25,py:1.25,borderBottom:`1px solid ${u.card.borderColor}`,flexShrink:0},children:h}):null,nt($t,{sx:{flex:"1 1 auto",minHeight:0,display:"flex",flexDirection:"column"},children:nt(vu,{style:{height:"auto",flex:"1 1 auto",minHeight:0},contentStyle:{minWidth:0},thumb:{width:6},dragScroll:{excludeClasses:wu},children:Jt($t,{sx:{display:"flex",flexDirection:"column",flexGrow:1},children:[nt(Ph,{items:f.map(P=>String(P.seq)),strategy:Yv,children:f.map(P=>nt(kh,{task:P,statusOptions:g,variant:"list",showDueDate:!0,titleFontSize:15,onRequestArchiveToggle:l,onRequestReply:o,onDueDateClick:s,onCardClick:c,onCardContextMenu:i},P.seq))}),f.length===0&&!t?nt($t,{sx:{py:3,textAlign:"center",fontSize:13,color:"#9a9a97"},children:"\uCE74\uB4DC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):null,f.length===0&&t?nt($t,{sx:{flexGrow:1,minHeight:56,display:"flex",flexDirection:"column","&:hover .taskbox-board-add":{opacity:1,pointerEvents:"auto"}},children:Jt(Dh,{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:[nt(xu,{sx:{fontSize:16}}),"\uC5C5\uBB34 \uB4F1\uB85D"]})}):null]})})})]})}function _u({tasks:e,statusOptions:f,customTabs:g,mode:l="active",onToggleCompleted:o,onRequestReply:s,onChangeDueDate:r,onChangeReminder:t,onMoveTask:n,columnAxis:c="project",statusColumns:i=[],onMoveTaskStatus:a,sprintColumns:h=[],onMoveTaskSprint:d,onAddGroup:u,onAddTask:b,canAdd:m=!0,onRequestRename:x,onArchiveProject:k,onDeleteProject:B,onReorderProjects:R,onOpenDetail:j,onTaskContextMenu:A,hideCompleted:P=!1,renderColumnSummary:N,onEditSprint:q,onChangeSprintStatus:z,onRemoveSprint:T}){let S=lt(),{onReturnTask:D,myAccountSeq:p=0}=ot(),[y,v]=qn(null),w=y?e.find(xe=>xe.seq===y.taskSeq):void 0,[_,C]=qn(null),[O,F]=qn(null),[$,K]=qn(null),[M,H]=qn(null),[E,I]=qn(null),[L,U]=qn(null),[G,V]=qn(null),[W,X]=qn(null),[Z,Y]=qn(null),[J,ee]=qn(null),ne=Nv(!1),te=Bo(()=>new Map(e.map(xe=>[xe.seq,xe])),[e]),oe=Bo(()=>{let xe=e.filter(me=>me.is_notice);return xe.sort((me,Ie)=>me.completed!==Ie.completed?me.completed?1:-1:Ie.seq-me.seq),xe},[e]),se=Bo(()=>g.filter(xe=>!xe.archived),[g]),de=Bo(()=>g.filter(xe=>xe.archived),[g]),ge=xe=>({key:xe.key,label:xe.label,icon:xe.icon,isDefault:!1,isArchived:xe.archived}),ke=Bo(()=>new Set(i.map(xe=>xe.key)),[i]),Be=Bo(()=>new Set(h.map(xe=>xe.seq)),[h]),Te=Bo(()=>{if(c==="sprint")return[{key:Ah,label:"\uBBF8\uBC30\uC815",icon:"",isDefault:!0,isArchived:!1,dot:"#c9c8c5",locked:!0},...h.map(xe=>({key:`${xl}${xe.seq}`,label:In(xe),icon:"",isDefault:!1,isArchived:!1,dot:Zv[xe.status],locked:!0,sprint:xe}))];if(c==="status"){let xe=i.map(me=>({key:me.key,label:me.name,icon:"",isDefault:!1,isArchived:!1,dot:me.dot,locked:!0}));return xe.some(me=>me.key===bu)?xe:[...xe,{key:bu,label:"\uC644\uB8CC",icon:"",isDefault:!1,isArchived:!1,dot:"#2f80ed",locked:!0}]}return l==="archived"?de.map(ge):[{key:gu,label:"\uAE30\uBCF8 \uC5C5\uBB34\uD568",icon:"",isDefault:!0,isArchived:!1},...se.map(ge)]},[c,i,h,l,se,de]),Re=Vv(Uv(qv,{activationConstraint:{distance:5}})),it=ao(xe=>{let me=String(xe.active.id).startsWith(En),Ie=$v(xe),Xe=Ie.length>0?Ie:Hv(xe);if(me)return Xe.filter(Mt=>String(Mt.id).startsWith(En));let qe=Xe.filter(Mt=>!String(Mt.id).startsWith(En)),Pe=qe.filter(Mt=>!String(Mt.id).startsWith(yl));return Pe.length>0?Pe:qe},[]),be=Bo(()=>{let xe=new Map;for(let me of e){if(me.is_notice)continue;let Ie;if(c==="sprint"){let qe=me.sprint_seq??0;Ie=Be.has(qe)?`${xl}${qe}`:Ah}else Ie=c==="status"?me.completed?bu:ke.has(String(me.status??""))?String(me.status??""):yu:me.tab_key?.trim()||gu;let Xe=xe.get(Ie);Xe?Xe.push(me):xe.set(Ie,[me])}for(let me of xe.values())me.sort((Ie,Xe)=>{if(Ie.completed!==Xe.completed)return Ie.completed?1:-1;let qe=(Ie.group_sort_no??0)>0,Pe=(Xe.group_sort_no??0)>0;return qe&&Pe?(Ie.group_sort_no??0)-(Xe.group_sort_no??0):qe!==Pe?qe?-1:1:Ie.due_date!==Xe.due_date?Ie.due_date<Xe.due_date?-1:1:Ie.seq-Xe.seq});return xe},[e,c,ke,Be]),ie=Bo(()=>c!=="status"||(be.get(yu)??[]).length===0?Te:[...Te,{key:yu,label:"\uAE30\uD0C0",icon:"",isDefault:!1,isArchived:!1,dot:"#c9c8c5",locked:!0}],[c,Te,be]),Ce=ao(xe=>W?(W.get(xe)??[]).map(me=>te.get(me)).filter(me=>!!me):be.get(xe)??[],[W,te,be]),we=ao(xe=>{let me=Ce(xe);return P?me.filter(Ie=>!Ie.completed):me},[Ce,P]),ve=ao(xe=>{let me=String(xe.active.id);if(me.startsWith(En)){ee(me.slice(En.length));return}Y(Number(me)),X(new Map(Te.map(Ie=>[Ie.key,(be.get(Ie.key)??[]).map(Xe=>Xe.seq)])))},[Te,be]),Ke=ao((xe,me)=>{if(xe.startsWith(yl))return{key:xe.slice(yl.length),overSeq:null};let Ie=Number(xe);for(let[Xe,qe]of me)if(qe.includes(Ie))return{key:Xe,overSeq:Ie};return null},[]),De=ao(xe=>{let{active:me,over:Ie}=xe;!Ie||String(me.id).startsWith(En)||X(Xe=>{if(!Xe)return Xe;let qe=Number(me.id),Pe=Ke(String(Ie.id),Xe);if(!Pe)return Xe;let Mt=[...Xe.entries()].find(([,fe])=>fe.includes(qe))?.[0];if(!Mt||Mt===Pe.key)return Xe;let Ue=new Map(Xe);Ue.set(Mt,(Ue.get(Mt)??[]).filter(fe=>fe!==qe));let re=[...Ue.get(Pe.key)??[]],le=re.length;if(Pe.overSeq!==null){let fe=re.indexOf(Pe.overSeq);fe!==-1&&(le=fe)}return re.splice(le,0,qe),Ue.set(Pe.key,re),Ue})},[Ke]),pe=ao(xe=>{let me=String(xe.active.id);if(me.startsWith(En)){ee(null);let le=String(xe.over?.id??"");if(!le.startsWith(En))return;let fe=me.slice(En.length),Se=le.slice(En.length);if(fe===Se)return;let pt=g.map(St=>St.key),Me=pt.indexOf(fe),ze=pt.indexOf(Se);if(Me===-1||ze===-1)return;R(Rh(pt,Me,ze));return}let Ie=W;if(X(null),Y(null),ne.current=!0,!Ie||!xe.over)return;let Xe=Number(me),qe=[...Ie.entries()].find(([,le])=>le.includes(Xe));if(!qe)return;let[Pe,Mt]=qe,Ue=[...Mt],re=Ke(String(xe.over.id),Ie);if(re&&re.key===Pe&&re.overSeq!==null&&re.overSeq!==Xe){let le=Ue.indexOf(Xe),fe=Ue.indexOf(re.overSeq);le!==-1&&fe!==-1&&(Ue=Rh(Ue,le,fe))}if(c==="status"){a?.(Xe,Pe);return}if(c==="sprint"){d?.(Xe,Number(Pe.slice(xl.length))||0);return}n(Xe,Pe===gu?"":Pe,Ue)},[g,W,Ke,n,R,c,a,d]),Bt=ao(()=>{X(null),Y(null),ee(null),ne.current=!0},[]),Fe=ao(xe=>{if(ne.current){ne.current=!1;return}j(xe)},[j]),Ye=Z!==null?te.get(Z)??null:null,_t=J!==null?Te.find(xe=>xe.key===J)??null:null,tt=ao((xe,me)=>{V({anchorEl:me,taskSeq:xe.seq,date:xe.due_date,reminders:ro(xe)})},[]),Ae=_?.column??null;return Jt($t,{sx:{flex:1,minHeight:0,height:"100%",display:"flex",flexDirection:"column",border:`1px solid ${S.card.borderColor}`,borderRadius:"0 0 4px 4px",overflow:"hidden",bgcolor:S.colors.surfaceSubtle},children:[Jt(jv,{sensors:Re,collisionDetection:it,onDragStart:ve,onDragOver:De,onDragEnd:pe,onDragCancel:Bt,children:[nt($t,{sx:{flex:1,minHeight:0,minWidth:0,contain:"inline-size"},children:l==="archived"&&Te.length===0?nt($t,{sx:{py:8,textAlign:"center",color:"#9a9a97",fontSize:14},children:"\uBCF4\uAD00\uB41C \uD504\uB85C\uC81D\uD2B8\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):nt(vu,{style:{height:"100%"},contentStyle:{width:"max-content",minWidth:"100%",height:"100%"},thumb:{width:8},showHorizontalScrollbar:!0,dragScroll:{excludeClasses:wu},children:Jt($t,{sx:{display:"flex",alignItems:"flex-start",gap:Oh,height:"100%",minWidth:"min-content",p:Oh,boxSizing:"border-box"},children:[l==="active"&&oe.length>0?Jt($t,{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:xe=>xe.shadows[1],bgcolor:S.card.bg,overflow:"hidden"},children:[Jt($t,{sx:{display:"flex",alignItems:"center",gap:.75,pl:1.25,pr:.5,py:1.1,borderBottom:`1px solid ${S.card.borderColor}`,flexShrink:0,minHeight:48},children:[nt(Lv,{sx:{fontSize:17,color:"#e8763a"}}),nt($t,{component:"span",sx:{fontSize:14.5,fontWeight:700,color:S.board.columnHeaderColor},children:"\uACF5\uC9C0\uC0AC\uD56D"}),Jt($t,{component:"span",sx:{fontSize:13,color:"#9a9a97",flexShrink:0},children:["(",oe.length,")"]})]}),nt($t,{sx:{flex:"1 1 auto",minHeight:0,display:"flex",flexDirection:"column"},children:nt(vu,{style:{height:"auto",flex:"1 1 auto",minHeight:0},contentStyle:{minWidth:0},dragScroll:{excludeClasses:wu},thumb:{width:6},children:nt($t,{sx:{display:"flex",flexDirection:"column"},children:oe.map(xe=>Jt($t,{onClick:()=>Fe(xe),onContextMenu:me=>A(xe,me),sx:{px:1.25,py:1,display:"flex",flexDirection:"column",gap:.75,borderBottom:`1px solid ${S.card.borderColor}`,bgcolor:S.card.bg,cursor:"pointer","&:hover":{bgcolor:S.card.hoverBg}},children:[nt(Ys,{task:xe,statusOptions:f,showDueDate:!0,titleFontSize:15,onRequestArchiveToggle:v}),(()=>{let me=(xe.target_names??[]).filter(Xe=>Xe.trim());if(me.length===0)return null;let Ie=me.length>2?`${me[0]}, ${me[1]} \uC678 ${me.length-2}`:me.join(", ");return Jt($t,{sx:{display:"flex",alignItems:"center",gap:.5,fontSize:12.5,color:"#787774",overflow:"hidden",whiteSpace:"nowrap"},children:[nt(zv,{sx:{fontSize:14,flexShrink:0}}),nt($t,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis"},children:Ie})]})})()]},xe.seq))})})})]}):null,nt(Ph,{items:se.map(xe=>`${En}${xe.key}`),strategy:Kv,children:ie.map(xe=>nt(Jv,{column:xe,tasks:we(xe.key),summary:N?.(xe.key,Ce(xe.key)),onOpenSprintMenu:q||z||T?(me,Ie)=>F({anchorEl:me,sprint:Ie}):void 0,statusOptions:f,onRequestArchiveToggle:v,onRequestReply:s,onDueDateClick:tt,onAddTask:b,canAdd:m&&c==="project",onOpenMenu:C,onCardClick:Fe,onCardContextMenu:A,grow:c!=="project"},xe.key))}),l==="active"&&c==="project"?Jt(Dh,{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:[nt(xu,{sx:{fontSize:18}}),"\uC0C8 \uD504\uB85C\uC81D\uD2B8"]}):null,l==="active"&&ie.length===0&&oe.length===0?nt($t,{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]})})}),nt(Fv,{children:Ye?nt($t,{sx:{...bl,width:250,boxShadow:"0 8px 20px rgba(0,0,0,0.18)",cursor:"grabbing"},children:nt(Ys,{task:Ye,statusOptions:f,showDueDate:!0,titleFontSize:15})}):_t?Jt($t,{sx:{display:"flex",alignItems:"center",gap:.75,width:270,px:1.25,py:1,bgcolor:S.card.bg,border:`1px solid ${S.card.borderColor}`,borderRadius:1.5,boxShadow:"0 8px 20px rgba(0,0,0,0.18)",opacity:.9,cursor:"grabbing"},children:[(()=>{let xe=Et(_t.icon);return xe?nt(xe,{sx:{fontSize:17,color:"#1e3a8a"}}):null})(),nt($t,{component:"span",sx:{fontSize:13.5,fontWeight:700,color:S.board.columnHeaderColor},children:_t.label}),nt($t,{component:"span",sx:Lh(S.board.badge),children:(be.get(_t.key)??[]).length})]}):null})]}),Jt(Ch,{transitionDuration:0,anchorEl:_?.anchorEl??null,open:!!_,onClose:()=>C(null),children:[Ae&&!Ae.isArchived&&m?Jt(oi,{onClick:()=>{Ae&&b(Ae.isDefault?"":Ae.key),C(null)},sx:{fontSize:14,gap:1},children:[nt(xu,{sx:{fontSize:18,color:"#787774"}}),"\uC0C8 \uC5C5\uBB34 \uB4F1\uB85D"]}):null,Ae&&!Ae.isDefault&&!Ae.isArchived?Jt(oi,{onClick:()=>{x(Ae.key,Ae.label,Ae.icon),C(null)},sx:{fontSize:14,gap:1},children:[nt(Ih,{sx:{fontSize:18,color:"#787774"}}),"\uC218\uC815"]}):null,Ae&&!Ae.isDefault&&!Ae.isArchived?Jt(oi,{onClick:()=>{if(_){let xe=(be.get(_.column.key)??[]).filter(me=>!me.completed&&!me.archived).length;xe>0?I({anchorEl:_.anchorEl,count:xe}):H(_)}C(null)},sx:{fontSize:14,gap:1},children:[nt(Eh,{sx:{fontSize:18,color:"#787774"}}),"\uBCF4\uAD00"]}):null,Ae&&Ae.isArchived?Jt(oi,{onClick:()=>{k(Ae.key,!1),C(null)},sx:{fontSize:14,gap:1},children:[nt(Mh,{sx:{fontSize:18,color:"#787774"}}),"\uBCF5\uC6D0"]}):null,Ae&&!Ae.isDefault?nt(Sh,{}):null,Ae&&!Ae.isDefault?Jt(oi,{onClick:()=>{_&&U(_),C(null)},sx:{fontSize:14,gap:1,color:"#e5484d"},children:[nt(Ir,{sx:{fontSize:18}}),"\uC0AD\uC81C"]}):null]}),Jt(Ch,{transitionDuration:0,anchorEl:O?.anchorEl??null,open:!!O,onClose:()=>F(null),children:[q?Jt(oi,{onClick:()=>{O&&q(O.sprint.seq),F(null)},sx:{fontSize:14,gap:1},children:[nt(Ih,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uC218\uC815"]}):null,z?Jt(oi,{onClick:()=>{O&&z(O.sprint.seq,O.sprint.status==="closed"?"active":"closed"),F(null)},sx:{fontSize:14,gap:1},children:[O?.sprint.status==="closed"?nt(Mh,{sx:{fontSize:18,color:"#787774"}}):nt(Eh,{sx:{fontSize:18,color:"#787774"}}),O?.sprint.status==="closed"?"\uB2E4\uC2DC \uC2DC\uC791":"\uBAA9\uD45C \uC885\uB8CC"]}):null,T?nt(Sh,{}):null,T?Jt(oi,{onClick:()=>{O&&K(O),F(null)},sx:{fontSize:14,gap:1,color:"#e5484d"},children:[nt(Ir,{sx:{fontSize:18}}),"\uBAA9\uD45C \uC0AD\uC81C"]}):null]}),nt(At,{open:!!$,anchorEl:$?.anchorEl??null,title:`"${$?.sprint.name??""}" \uBAA9\uD45C\uB97C \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`,confirmText:"\uC0AD\uC81C",onCancel:()=>K(null),onConfirm:()=>{$&&T?.($.sprint.seq),K(null)}}),nt(Bn,{anchorEl:G?.anchorEl??null,open:!!G,date:G?.date??"",reminders:G?.reminders??[],onClose:()=>V(null),onDateChange:xe=>{G&&(r(G.taskSeq,xe),V(me=>me&&{...me,date:xe}))},onReminderChange:xe=>{G&&(t(G.taskSeq,xe),V(me=>me&&{...me,reminders:xe}))}}),nt(At,{open:!!E,anchorEl:E?.anchorEl??null,title:`\uBBF8\uC644\uB8CC \uC5C5\uBB34 ${E?.count??0}\uAC74\uC774 \uC788\uC5B4 \uBCF4\uAD00\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
31
31
  \uC644\uB8CC\uD558\uAC70\uB098 \uB2E4\uB978 \uD504\uB85C\uC81D\uD2B8\uB85C \uC62E\uAE34 \uB4A4 \uBCF4\uAD00\uD558\uC138\uC694.`,confirmText:"\uD655\uC778",onCancel:()=>I(null),onConfirm:()=>I(null)}),nt(At,{open:!!M,anchorEl:M?.anchorEl??null,title:`"${M?.column.label??""}" \uD504\uB85C\uC81D\uD2B8\uB97C \uBCF4\uAD00\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?
32
32
  \uBCF4\uAD00\uD568 \uD0ED\uC5D0\uC11C \uBCF5\uC6D0\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.`,confirmText:"\uBCF4\uAD00",onCancel:()=>H(null),onConfirm:()=>{M&&k(M.column.key,!0),H(null)}}),nt(At,{open:!!L,anchorEl:L?.anchorEl??null,title:`"${L?.column.label??""}" \uD504\uB85C\uC81D\uD2B8\uB97C \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?
33
- \uC18C\uC18D \uC5C5\uBB34\uB294 \uAE30\uBCF8 \uC5C5\uBB34\uD568\uC73C\uB85C \uC774\uB3D9\uD569\uB2C8\uB2E4.`,confirmText:"\uC0AD\uC81C",onCancel:()=>U(null),onConfirm:()=>{L&&B(L.column.key),U(null)}}),nt(cn,{open:!!y,anchorEl:y?.anchorEl??null,nextCompleted:y?.nextCompleted??!1,returnMode:!!D&&!!(w&&Zr(w,p)),onCancel:()=>v(null),onConfirm:xe=>{y&&(xe&&D&&w?D(w,xe):o(y.taskSeq,y.nextCompleted)),v(null)}})]})}import{useCallback as Eo,useMemo as Xs,useRef as jh,useState as Zs}from"react";import{Box as Cr,Button as nw,ButtonBase as qh,IconButton as Fh}from"@mui/material";import ow from"@mui/icons-material/Add";import iw from"@mui/icons-material/ChevronLeft";import sw from"@mui/icons-material/ChevronRight";import aw from"@mui/icons-material/KeyboardArrowDown";import{DatePicker as lw}from"@ehfuse/mui-datetime-picker";import{DndContext as cw,DragOverlay as uw,PointerSensor as fw,pointerWithin as dw,rectIntersection as hw,useDroppable as pw,useSensor as mw,useSensors as gw}from"@dnd-kit/core";import{SortableContext as bw,arrayMove as yw,useSortable as xw,verticalListSortingStrategy as vw}from"@dnd-kit/sortable";import{CSS as ww}from"@dnd-kit/utilities";import _w from"@ehfuse/overlay-scrollbar";function Gv(e){let[f,g,l]=e.split("-").map(Number),o=new Date(Date.UTC(f,g-1,l+1)),s=r=>String(r).padStart(2,"0");return`${o.getUTCFullYear()}-${s(o.getUTCMonth()+1)}-${s(o.getUTCDate())}`}function ns(e){let f=new Map;for(let g of e){let l=g.start_date;for(let o=0;o<62&&l<=g.end_date;o+=1){let s=f.get(l);s?s.push(g):f.set(l,[g]),l=Gv(l)}}for(let g of f.values())g.sort((l,o)=>(l.time||"99:99").localeCompare(o.time||"99:99")||l.title.localeCompare(o.title));return f}function os(e){let f=String((e.is_event?e.event_time:e.due_date.slice(11,16)||e.estimated_time)??"").trim();return/^\d{1,2}:\d{2}$/.test(f)?f:""}function is(e,f){if(e.completed!==f.completed)return e.completed?1:-1;let g=os(e),l=os(f);if(!!g!=!!l)return g?-1:1;if(g&&l&&g!==l)return g<l?-1:1;let o=e.sort_no>0,s=f.sort_no>0;return o&&s?e.sort_no-f.sort_no:o!==s?o?-1:1:e.seq-f.seq}import{Box as ku,Tooltip as Yv}from"@mui/material";import{jsx as Su,jsxs as Xv}from"react/jsx-runtime";function ss({event:e,small:f=!1}){let g=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 Su(Yv,{title:`(${l}) ${g}`,arrow:!0,enterDelay:300,children:Xv(ku,{onClick:o,onPointerDown:s=>s.stopPropagation(),sx:{display:"flex",alignItems:"center",gap:.5,px:1,py:f?.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:[Su(ku,{component:"span",sx:{width:6,height:6,borderRadius:"50%",bgcolor:"#0f9d58",flexShrink:0}}),Su(ku,{component:"span",sx:{minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},children:g})]})})}import{useCallback as Qv}from"react";import{Box as ii,Checkbox as ew}from"@mui/material";import{useLayoutEffect as Zv,useState as Lh}from"react";var Cu=new WeakMap,Tu=null;function Jv(){return typeof ResizeObserver>"u"?null:(Tu||(Tu=new ResizeObserver(e=>{for(let f of e){let g=Cu.get(f.target);if(!g)continue;let l=f.borderBoxSize?.[0]?.inlineSize??f.target.getBoundingClientRect().width;g(l)}})),Tu)}function zh(){let[e,f]=Lh(null),[g,l]=Lh(0);return Zv(()=>{if(!e)return;l(e.getBoundingClientRect().width);let o=Jv();if(o)return Cu.set(e,s=>l(r=>Math.abs(r-s)<1?r:s)),o.observe(e),()=>{o.unobserve(e),Cu.delete(e)}},[e]),{ref:f,width:g}}import{jsx as Io,jsxs as Bu}from"react/jsx-runtime";var Iu={high:"#e5484d",medium:"#2f80ed",low:"#d9a514"},as=15,tw=150,rw=3;function si({task:e,statusOptions:f,onOpenDetail:g,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:d=!1,onRequestToggleCompleted:u,showTime:b=!0,wrapTitle:m=!1}){let x=lt(),k=x.mode==="dark",[B]=Ki(e,f),R=String(e.manager_name??"").trim(),j=b?os(e):"",A=Yi(e,ot().resolveTask),P=!e.completed&&!e.is_event&&!e.due_date.slice(0,10),N=e.is_notice||e.is_event?Et(e.icon||(e.is_notice?pr:yr)):null,q=!e.completed&&!e.is_event&&!!e.due_date&&e.due_date.slice(0,10)<Nd(),{ref:z,width:T}=zh(),S=T>0&&T<tw,D=S||m,p=Qv(v=>{z(v),i?.(v)},[z,i]),y=n&&!r&&!S&&!!R;return Bu(ii,{ref:p,...a??{},onClick:v=>{v.stopPropagation(),g(e)},onContextMenu:l?v=>l(e,v):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?Vi(B.dot,x.chip.darkBgAlpha):B.bg:k?x.card.bg:x.colors.surfaceHover,color:B?k?x.chip.darkTextSource==="fg"?B.fg:B.dot:B.fg:x.colors.textPrimary,fontSize:as,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 ${x.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 ${x.colors.danger}`,pl:.75}:r?{borderLeft:"3px solid #2f80ed",pl:.75}:{}},children:[Io(ii,{component:"span",sx:{width:6,height:6,borderRadius:"50%",flexShrink:0,...D?{mt:"7px"}:{},bgcolor:Iu[e.priority]??x.colors.accentOnSurface}}),d&&!S&&u?Io(ew,{size:"small",checked:e.completed,onPointerDown:v=>v.stopPropagation(),onClick:v=>v.stopPropagation(),onChange:(v,w)=>u({anchorEl:v.currentTarget,taskSeq:e.seq,nextCompleted:w}),sx:{p:0,flexShrink:0}}):null,N&&!S?Io(N,{sx:{fontSize:15,flexShrink:0,opacity:.75,...D?{mt:"3px"}:{}}}):null,Bu(ii,{sx:{minWidth:0,overflow:"hidden",display:"flex",flexDirection:"column",color:k?x.colors.textStrong:x.colors.textPrimary,...P&&!k?{color:x.colors.textSecondary}:{}},children:[S&&j?Io(ii,{component:"span",sx:{lineHeight:1.35,fontSize:as-1,color:e.completed?x.colors.textPrimary:x.colors.danger},children:j}):null,Bu(ii,{component:"span",sx:{minWidth:0,overflow:"hidden",...D?{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:rw,whiteSpace:"normal",overflowWrap:"anywhere",lineHeight:1.35}:{textOverflow:"ellipsis",whiteSpace:"nowrap"}},children:[!S&&j?Io(ii,{component:"span",sx:{mr:.5,fontSize:as-1,color:e.completed?x.colors.textPrimary:x.colors.danger},children:j}):null,e.title,!S&&A?Io(ii,{component:"span",sx:{ml:.5,fontSize:as-2,color:x.colors.textMuted,fontVariantNumeric:"tabular-nums"},children:A}):null,!S&&(e.comment_count??e.comments?.length??0)>0?Io(ri,{sx:{fontSize:15,ml:.5,verticalAlign:"-2px",color:x.colors.textMuted}}):null]})]}),h??null,!h&&y?Io(ii,{component:"span",onClick:c?v=>{v.stopPropagation(),c(e)}:void 0,sx:{display:"inline-flex",flexShrink:0,ml:"auto",pl:.5},children:Io(Tn,{src:t?.get(R)??"",name:R,avatarSx:{width:22,height:22,fontSize:11},iconFontSize:14})}):null]})}import{jsx as zt,jsxs as Mo}from"react/jsx-runtime";var $h=36,kw=["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"],wl="day-";function Eu(e){let f=new Date(e);return f.setHours(0,0,0,0),f.setDate(f.getDate()-f.getDay()),f}function vl(e,f){let g=new Date(e);return g.setDate(g.getDate()+f),g}function Sw(e){let f=e[0],g=e[e.length-1];return f.getMonth()===g.getMonth()?`${f.getFullYear()}\uB144 ${f.getMonth()+1}\uC6D4`:f.getFullYear()===g.getFullYear()?`${f.getFullYear()}\uB144 ${f.getMonth()+1}\uC6D4 - ${g.getMonth()+1}\uC6D4`:`${f.getFullYear()}\uB144 ${f.getMonth()+1}\uC6D4 - ${g.getFullYear()}\uB144 ${g.getMonth()+1}\uC6D4`}function Tw(e){return e.getDate()===1?`${e.getMonth()+1}\uC6D4 1\uC77C`:String(e.getDate())}function Cw({task:e,statusOptions:f,isMine:g,avatarSrcByName:l,onCardClick:o,onCardContextMenu:s,onRequestArchiveToggle:r,dragDisabled:t=!1}){let{attributes:n,listeners:c,setNodeRef:i,transform:a,transition:h,isDragging:d}=xw({id:String(e.seq),disabled:t});return zt(si,{task:e,statusOptions:f,isMine:g,avatarSrcByName:l,showManagerAvatar:!0,wrapTitle:!0,onOpenDetail:u=>o?.(u),onContextMenu:s,showCheckbox:!0,onRequestToggleCompleted:r,isDragging:d,setNodeRef:i,dragProps:t?void 0:{...n,...c,style:{transform:ww.Translate.toString(a),transition:h}}})}function Bw({dayKey:e,isToday:f,dayLabel:g,holidayName:l,tasks:o,googleEvents:s,statusOptions:r,onRequestArchiveToggle:t,onRequestReply:n,onAddSchedule:c,canAdd:i,onCardClick:a,onCardContextMenu:h,summary:d,myAccountSeq:u,avatarSrcByName:b,dragDisabled:m=!1}){let x=lt(),{setNodeRef:k}=pw({id:`${wl}${e}`,disabled:m});return Mo(Cr,{ref:k,sx:{minWidth:0,minHeight:0,height:"100%",display:"flex",flexDirection:"column",bgcolor:f?x.calendar.todayBg:x.calendar.cellBg},children:[Mo(Cr,{sx:{display:"flex",justifyContent:"flex-end",alignItems:"center",gap:.5,px:1,height:$h,bgcolor:f?x.calendar.todayBg:x.calendar.dateBandBg,borderBottom:`1px solid ${x.calendar.borderColor}`,flexShrink:0},children:[l?zt(Cr,{component:"span",sx:{mr:"auto",fontSize:11.5,fontWeight:600,color:x.colors.danger,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:l}):null,f?zt(Cr,{component:"span",sx:{mr:.75,px:.6,py:.1,borderRadius:.5,fontSize:11,fontWeight:600,bgcolor:x.colors.danger,color:x.calendar.cellBg,lineHeight:1.6},children:"\uC624\uB298"}):null,zt(Cr,{component:"span",sx:{fontSize:13.5,fontWeight:f?700:400,color:l?x.colors.danger:x.mode==="dark"?x.colors.textStrong:x.colors.textPrimary,flexShrink:0},children:g})]}),d?zt(Cr,{sx:{px:1,py:1,borderBottom:`1px solid ${x.calendar.borderColor}`,flexShrink:0},children:d}):null,zt(Cr,{sx:{flex:1,minHeight:0,bgcolor:f?x.calendar.todayBg:x.colors.surfaceSubtle},children:zt(_w,{style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:Mo(Cr,{sx:{display:"flex",flexDirection:"column",flexGrow:1},children:[s.length>0?zt(Cr,{sx:{display:"flex",flexDirection:"column",gap:.5,px:1,pt:.75,pb:.25},children:s.map(B=>zt(ss,{event:B},B.uid))}):null,zt(bw,{items:o.map(B=>String(B.seq)),strategy:vw,children:zt(Cr,{sx:{display:"flex",flexDirection:"column",gap:.5,px:1,pt:o.length>0?.75:0},children:o.map(B=>zt(Cw,{task:B,statusOptions:r,isMine:u>0&&Number(B.manager_account_seq??0)===u,avatarSrcByName:b,onCardClick:a,onCardContextMenu:h,onRequestArchiveToggle:t,dragDisabled:m},B.seq))})}),zt(Cr,{sx:{flexGrow:1,minHeight:56,display:"flex",flexDirection:"column",pb:1,...i?{"&:hover .taskbox-add-schedule":{opacity:1,pointerEvents:"auto"}}:{}},children:Mo(qh,{className:"taskbox-add-schedule",onClick:()=>c(e),sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:.5,px:1.25,py:1.75,borderBottom:`1px dashed ${x.calendar.borderColor}`,bgcolor:x.calendar.cellBg,color:x.colors.accentOnSurface,fontSize:13,fontWeight:500,opacity:0,pointerEvents:"none",transition:"opacity 0.15s","&:hover":{bgcolor:x.calendar.hoverBg}},children:[zt(ow,{sx:{fontSize:16}}),"\uC5C5\uBB34 \uB4F1\uB85D"]})})]})})})]})}function Hh({tasks:e,googleEvents:f=[],statusOptions:g,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:d,onTaskContextMenu:u,hideCompleted:b=!1,renderColumnSummary:m}){let x=lt(),[k,B]=Zs(()=>Eu(new Date)),[R,j]=Zs(null),{onReturnTask:A}=ot(),P=R?e.find(X=>X.seq===R.taskSeq):void 0,[N,q]=Zs(null),[z,T]=Zs(null),[S,D]=Zs(null),p=jh(!1),y=Xs(()=>Array.from({length:7},(X,Z)=>vl(k,Z)),[k]),v=Xs(()=>new Map(e.map(X=>[X.seq,X])),[e]),w=Xs(()=>[...new Set(y.map(X=>X.getFullYear()))],[y]),_=to(w),C=gw(mw(fw,{activationConstraint:{distance:5}})),O=Eo(X=>{let Z=dw(X),Y=Z.length>0?Z:hw(X),J=Y.filter(ee=>!String(ee.id).startsWith(wl));return J.length>0?J:Y},[]),F=Xs(()=>ns(f),[f]),$=Xs(()=>{let X=new Map;for(let Z of e){let Y=Z.due_date.slice(0,10)||(l?Z.start_date.slice(0,10)||String(Z.created_time??"").slice(0,10):"");if(!Y)continue;let J=X.get(Y);J?J.push(Z):X.set(Y,[Z])}for(let Z of X.values())Z.sort(is);return X},[e,l]),K=Eo(X=>z?(z.get(X)??[]).map(Z=>v.get(Z)).filter(Z=>!!Z):$.get(X)??[],[z,v,$]),M=Eo(X=>{let Z=K(X);return b?Z.filter(Y=>!Y.completed):Z},[K,b]),H=Eo(X=>{D(Number(X.active.id)),T(new Map(y.map(Z=>{let Y=mr(Z);return[Y,($.get(Y)??[]).map(J=>J.seq)]})))},[y,$]),E=Eo((X,Z)=>{if(X.startsWith(wl))return{day:X.slice(wl.length),overSeq:null};let Y=Number(X);for(let[J,ee]of Z)if(ee.includes(Y))return{day:J,overSeq:Y};return null},[]),I=Eo(X=>{let{active:Z,over:Y}=X;Y&&T(J=>{if(!J)return J;let ee=Number(Z.id),ne=E(String(Y.id),J);if(!ne)return J;let te=[...J.entries()].find(([,ge])=>ge.includes(ee))?.[0];if(!te||te===ne.day)return J;let oe=new Map(J);oe.set(te,(oe.get(te)??[]).filter(ge=>ge!==ee));let se=[...oe.get(ne.day)??[]],de=se.length;if(ne.overSeq!==null){let ge=se.indexOf(ne.overSeq);ge!==-1&&(de=ge)}return se.splice(de,0,ee),oe.set(ne.day,se),oe})},[E]),L=Eo(X=>{let{active:Z,over:Y}=X,J=z;if(T(null),D(null),p.current=!0,!J||!Y)return;let ee=Number(Z.id),ne=[...J.entries()].find(([,ge])=>ge.includes(ee));if(!ne)return;let[te,oe]=ne,se=[...oe],de=E(String(Y.id),J);if(de&&de.day===te&&de.overSeq!==null&&de.overSeq!==ee){let ge=se.indexOf(ee),ke=se.indexOf(de.overSeq);ge!==-1&&ke!==-1&&(se=yw(se,ge,ke))}n(ee,te,se)},[z,n,E]),U=Eo(()=>{T(null),D(null),p.current=!0},[]),G=Eo(X=>{if(p.current){p.current=!1;return}d(X)},[d]),V=S!==null?v.get(S)??null:null,W=jh(null);return Mo(Cr,{onTouchStart:X=>{let Z=X.touches[0];W.current=Z?{x:Z.clientX,y:Z.clientY}:null},onTouchEnd:X=>{let Z=W.current;W.current=null;let Y=X.changedTouches[0];if(!Z||!Y||S!==null)return;let J=Y.clientX-Z.x,ee=Y.clientY-Z.y;Math.abs(J)<60||Math.abs(J)<=Math.abs(ee)||B(vl(k,J<0?7:-7))},sx:{display:"flex",flexDirection:"column",flex:1,minHeight:0,border:`1px solid ${x.calendar.borderColor}`,borderRadius:"0 0 4px 4px",overflow:"hidden"},children:[Mo(Cr,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1,bgcolor:x.calendar.bg,borderBottom:`1px solid ${x.calendar.borderColor}`,flexShrink:0},children:[Mo(Cr,{sx:{display:"flex",alignItems:"center",gap:.25},children:[zt(Fh,{size:"small","aria-label":"\uC774\uC804 \uC8FC",onClick:()=>B(vl(k,-7)),children:zt(iw,{sx:{fontSize:24,color:x.colors.textSecondary}})}),zt(nw,{size:"small",color:"inherit",onClick:()=>B(Eu(new Date)),sx:{minWidth:0,px:1,mx:1,fontSize:15.5,fontWeight:x.mode==="dark"?400:500,color:x.mode==="dark"?x.colors.textStrong:x.colors.textPrimary},children:"\uC624\uB298"}),zt(Fh,{size:"small","aria-label":"\uB2E4\uC74C \uC8FC",onClick:()=>B(vl(k,7)),children:zt(sw,{sx:{fontSize:24,color:x.colors.textSecondary}})})]}),Mo(qh,{onClick:X=>q(X.currentTarget),sx:{ml:{xs:"auto",lg:0},display:"inline-flex",alignItems:"center",gap:.25,px:.75,py:.25,borderRadius:1,fontSize:15,fontWeight:x.mode==="dark"?400:700,color:x.mode==="dark"?x.colors.textStrong:x.colors.textPrimary,"&:hover":{bgcolor:x.colors.surfaceHover}},children:[Sw(y),zt(aw,{sx:{fontSize:18,color:x.colors.textMuted}})]})]}),zt(Cr,{sx:{display:"grid",gridTemplateColumns:"repeat(7, minmax(0, 1fr))",bgcolor:x.calendar.headerBg,borderBottom:`1px solid ${x.calendar.borderColor}`,flexShrink:0,"& > *":{borderRight:`1px solid ${x.calendar.borderColor}`},"& > *:last-child":{borderRight:"none"}},children:y.map(X=>{let Z=X.getDay(),Y=_.has(mr(X));return zt(Cr,{sx:{height:$h,display:"flex",alignItems:"center",justifyContent:"center",fontSize:12.5,color:Z===0||Y?x.colors.danger:Z===6?x.colors.accentOnSurface:x.colors.textSecondary},children:kw[Z]},mr(X))})}),zt(Cr,{sx:{flex:1,minHeight:0},children:Mo(cw,{sensors:C,collisionDetection:O,onDragStart:H,onDragOver:I,onDragEnd:L,onDragCancel:U,children:[zt(Cr,{sx:{display:"grid",gridTemplateColumns:"repeat(7, minmax(0, 1fr))",height:"100%",minHeight:0,"& > *":{borderRight:`1px solid ${x.calendar.borderColor}`},"& > *:last-child":{borderRight:"none"}},children:y.map(X=>{let Z=mr(X);return zt(Bw,{dayKey:Z,isToday:Z===r,dayLabel:Tw(X),holidayName:_.get(Z)??"",summary:m?.(Z,K(Z)),tasks:M(Z),googleEvents:F.get(Z)??[],statusOptions:g,onRequestArchiveToggle:j,onRequestReply:c,onAddSchedule:i,canAdd:a,onCardClick:G,onCardContextMenu:u,myAccountSeq:o,avatarSrcByName:s,dragDisabled:h},Z)})}),zt(uw,{children:V?zt(Cr,{sx:{boxShadow:"0 8px 20px rgba(0,0,0,0.18)",borderRadius:.75,cursor:"grabbing"},children:zt(si,{task:V,statusOptions:g,onOpenDetail:()=>{},isMine:o>0&&Number(V.manager_account_seq??0)===o})}):null})]})}),zt(lw,{anchorEl:N,open:!!N,onClose:()=>q(null),selectedDate:k,onDateChange:X=>{B(Eu(X)),q(null)}}),zt(cn,{open:!!R,anchorEl:R?.anchorEl??null,nextCompleted:R?.nextCompleted??!1,returnMode:!!A&&!!(P&&Zr(P,o)),onCancel:()=>j(null),onConfirm:X=>{R&&(X&&A&&P?A(P,X):t(R.taskSeq,R.nextCompleted)),j(null)}})]})}import{useCallback as Js,useMemo as Ri,useRef as Iw,useState as Qs}from"react";import{Box as Qr,Button as Ew,ButtonBase as Uh,IconButton as Wh,Tooltip as Mw}from"@mui/material";import Rw from"@mui/icons-material/Add";import Ow from"@mui/icons-material/ChevronLeft";import Aw from"@mui/icons-material/ChevronRight";import Dw from"@mui/icons-material/KeyboardArrowDown";import{DatePicker as Pw}from"@ehfuse/mui-datetime-picker";import{DndContext as Nw,DragOverlay as Lw,PointerSensor as zw,pointerWithin as jw,rectIntersection as Fw,useDraggable as qw,useDroppable as Vh,useSensor as $w,useSensors as Hw}from"@dnd-kit/core";import Ww from"@ehfuse/overlay-scrollbar";import{jsx as Xt,jsxs as Ro}from"react/jsx-runtime";var Uw=["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"],_l="mday-",kl="mchip-",Kh=36;function Vw(e){let f=new Date(e);return f.setHours(0,0,0,0),f.setDate(f.getDate()-f.getDay()),f}function Sl(e){let f=new Date(e);return f.setHours(0,0,0,0),f.setDate(1),f}function Kw(e,f){let g=new Date(e);return g.setDate(g.getDate()+f),g}function Mu(e,f){let g=Sl(e);return g.setMonth(g.getMonth()+f),g}function Gw({task:e,statusOptions:f,isPreview:g=!1,isMine:l=!1,avatarSrcByName:o,onOpenDetail:s,onContextMenu:r,onRequestToggleCompleted:t,dragDisabled:n=!1}){let{attributes:c,listeners:i,setNodeRef:a,isDragging:h}=qw({id:String(e.seq),disabled:g||n}),{setNodeRef:d}=Vh({id:`${kl}${e.seq}`,disabled:g||n});return Xt(Mw,{title:e.title,arrow:!0,enterDelay:400,children:Xt(si,{task:e,statusOptions:f,onOpenDetail:s,onContextMenu:r,showCheckbox:!!t,onRequestToggleCompleted:t,isPreview:g,isDragging:h,isMine:l,avatarSrcByName:o,showManagerAvatar:!0,wrapTitle:!0,setNodeRef:u=>{a(u),d(u)},dragProps:n?void 0:{...c,...i}})})}function Yw({dayKey:e,dayNumber:f,isToday:g,isOtherMonth:l,weekday:o,holidayName:s,tasks:r,googleEvents:t,statusOptions:n,previewSeq:c,myAccountSeq:i,avatarSrcByName:a,onRequestToggleCompleted:h,onOpenDetail:d,onTaskContextMenu:u,onAddSchedule:b,canAdd:m,dragDisabled:x=!1}){let k=lt(),B=k.mode==="dark",{setNodeRef:R,isOver:j}=Vh({id:`${_l}${e}`,disabled:x}),A=r,P=!!s||o===0;return Ro(Qr,{ref:R,sx:{minWidth:0,minHeight:0,display:"flex",flexDirection:"column",gap:.5,p:.5,bgcolor:j?k.colors.accentSoft:g?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:[Ro(Qr,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:.5,height:Kh,flexShrink:0,mx:-.5,mt:-.5,px:1,bgcolor:g?k.calendar.todayBg:k.calendar.dateBandBg,borderBottom:`1px solid ${k.calendar.borderColor}`},children:[s?Xt(Qr,{component:"span",sx:{mr:.25,minWidth:0,fontSize:11,fontWeight:600,color:k.colors.danger,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:s}):null,g?Xt(Qr,{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,Xt(Qr,{component:"span",sx:{fontSize:13.5,fontWeight:g?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:f})]}),t.map(N=>Xt(ss,{event:N,small:!0},N.uid)),A.map(N=>Xt(Gw,{task:N,statusOptions:n,isPreview:N.seq===c,isMine:i>0&&Number(N.manager_account_seq??0)===i,avatarSrcByName:a,onRequestToggleCompleted:h,onOpenDetail:d,onContextMenu:u,dragDisabled:x},N.seq)),Xt(Qr,{sx:{flexGrow:1,minHeight:0,display:"flex",alignItems:"flex-start"},children:Ro(Uh,{className:"taskbox-month-add",onClick:()=>b(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:[Xt(Rw,{sx:{fontSize:16}}),"\uC5C5\uBB34 \uB4F1\uB85D"]})})]})}function Gh({tasks:e,googleEvents:f=[],statusOptions:g,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:d}){let u=lt(),b=u.mode==="dark",[m,x]=Qs(()=>Sl(new Date)),[k,B]=Qs(null),[R,j]=Qs(null),[A,P]=Qs(null),[N,q]=Qs(null),z=Ri(()=>{let L=Vw(m);return Array.from({length:42},(U,G)=>Kw(L,G))},[m]),T=Ri(()=>new Map(e.map(L=>[L.seq,L])),[e]),S=Ri(()=>ns(f),[f]),D=Ri(()=>[...new Set(z.map(L=>L.getFullYear()))],[z]),p=to(D),y=Ri(()=>{let L=new Map;for(let U of e){let G=U.due_date.slice(0,10)||(l?U.start_date.slice(0,10)||String(U.created_time??"").slice(0,10):"");if(!G)continue;let V=L.get(G);V?V.push(U):L.set(G,[U])}for(let U of L.values())U.sort(is);return L},[e,l]),v=Hw($w(zw,{activationConstraint:{distance:5}})),w=Js(L=>{let U=jw(L),G=U.length>0?U:Fw(L),V=G.filter(W=>String(W.id).startsWith(kl));return V.length>0?V:G.filter(W=>String(W.id).startsWith(_l))},[]),_=Js(L=>{P(Number(L.active.id))},[]),C=Js(L=>{q(L.over?String(L.over.id):null)},[]),O=Ri(()=>{let L=new Map;for(let[U,G]of y)for(let V of G)L.set(V.seq,U);return L},[y]),F=A!==null?T.get(A)?.due_date.slice(0,10)??"":"",$=Ri(()=>{if(A===null||!N)return null;if(N.startsWith(kl)){let L=Number(N.slice(kl.length)),U=O.get(L);if(!U)return null;let G=(y.get(U)??[]).filter(W=>W.seq!==A),V=G.findIndex(W=>W.seq===L);return{day:U,index:V===-1?G.length:V}}if(N.startsWith(_l)){let L=N.slice(_l.length),U=(y.get(L)??[]).filter(G=>G.seq!==A);return{day:L,index:U.length}}return null},[A,O,N,y]),K=Js(L=>{let U=y.get(L)??[];if(A===null||!$)return U;let G=T.get(A);if(!G)return U;let V=U.filter(W=>W.seq!==A);return L===$.day?[...V.slice(0,$.index),G,...V.slice($.index)]:L===F?V:U},[A,F,$,T,y]),M=Js(L=>{let U=A,G=$;if(P(null),q(null),U===null||!G)return;let V=(y.get(G.day)??[]).filter(X=>X.seq!==U),W=[...V.slice(0,G.index).map(X=>X.seq),U,...V.slice(G.index).map(X=>X.seq)];n(U,G.day,W)},[A,$,n,y]),H=A!==null?T.get(A)??null:null,E=`${m.getFullYear()}\uB144 ${m.getMonth()+1}\uC6D4`,I=Iw(null);return Ro(Qr,{onTouchStart:L=>{let U=L.touches[0];I.current=U?{x:U.clientX,y:U.clientY}:null},onTouchEnd:L=>{let U=I.current;I.current=null;let G=L.changedTouches[0];if(!U||!G||A!==null)return;let V=G.clientX-U.x,W=G.clientY-U.y;Math.abs(V)<60||Math.abs(V)<=Math.abs(W)||x(Mu(m,V<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:[Ro(Qr,{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:[Ro(Qr,{sx:{display:"flex",alignItems:"center",gap:.25},children:[Xt(Wh,{size:"small","aria-label":"\uC774\uC804 \uB2EC",onClick:()=>x(Mu(m,-1)),children:Xt(Ow,{sx:{fontSize:24,color:u.colors.textSecondary}})}),Xt(Ew,{size:"small",color:"inherit",onClick:()=>x(Sl(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"}),Xt(Wh,{size:"small","aria-label":"\uB2E4\uC74C \uB2EC",onClick:()=>x(Mu(m,1)),children:Xt(Aw,{sx:{fontSize:24,color:u.colors.textSecondary}})})]}),Ro(Uh,{onClick:L=>B(L.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:[E,Xt(Dw,{sx:{fontSize:18,color:u.colors.textMuted}})]})]}),Xt(Qr,{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:Uw.map((L,U)=>Xt(Qr,{sx:{height:Kh,display:"flex",alignItems:"center",justifyContent:"center",fontSize:12.5,color:U===0?u.colors.danger:U===6?u.colors.accentOnSurface:u.colors.textSecondary},children:L},L))}),Xt(Qr,{sx:{flex:1,minHeight:0},children:Ro(Nw,{sensors:v,collisionDetection:w,onDragStart:_,onDragOver:C,onDragEnd:M,onDragCancel:()=>{P(null),q(null)},children:[Xt(Ww,{style:{height:"100%"},thumb:{width:8},children:Xt(Qr,{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:z.map(L=>{let U=mr(L);return Xt(Yw,{dayKey:U,dayNumber:L.getDate(),isToday:U===t,isOtherMonth:L.getMonth()!==m.getMonth(),weekday:L.getDay(),holidayName:p.get(U)??"",tasks:K(U),googleEvents:S.get(U)??[],statusOptions:g,previewSeq:$?.day===U?A:null,myAccountSeq:o,avatarSrcByName:s,onRequestToggleCompleted:r?j:void 0,onOpenDetail:h,onTaskContextMenu:d,onAddSchedule:c,canAdd:i,dragDisabled:a},U)})})}),Xt(Lw,{children:H?Ro(Qr,{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:as,fontWeight:500,color:u.colors.textPrimary,cursor:"grabbing",whiteSpace:"nowrap"},children:[Xt(Qr,{component:"span",sx:{width:6,height:6,borderRadius:"50%",bgcolor:Iu[H.priority]}}),H.title]}):null})]})}),Xt(At,{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:()=>j(null),onConfirm:()=>{R&&r?.(R.taskSeq,R.nextCompleted),j(null)}}),Xt(Pw,{anchorEl:k,open:!!k,onClose:()=>B(null),selectedDate:m,onDateChange:L=>{x(Sl(L)),B(null)}})]})}import{useEffect as Jw,useMemo as ea,useRef as Ou,useState as Au}from"react";import{Box as Fr,Button as Qw,IconButton as Xh,useMediaQuery as e_}from"@mui/material";import t_ from"@mui/icons-material/ChevronLeft";import r_ from"@mui/icons-material/ChevronRight";import n_ from"@mui/icons-material/KeyboardArrowDown";import{DatePicker as o_}from"@ehfuse/mui-datetime-picker";import{Box as Oo,Button as Xw,Dialog as Zw}from"@mui/material";import{jsx as Ao,jsxs as Ru}from"react/jsx-runtime";function Yh({task:e,avatarSrcByName:f,onClose:g}){let l=lt(),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 Ao(Zw,{open:!!e,onClose:g,maxWidth:"xs",fullWidth:!0,slotProps:{paper:{sx:{borderRadius:2,m:2}}},children:e?Ru(Oo,{sx:{p:2,display:"flex",flexDirection:"column",gap:1.5,bgcolor:l.colors.surface},children:[Ao(Oo,{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 Ru(Oo,{sx:{display:"flex",alignItems:"flex-start",gap:1.5},children:[Ao(Oo,{sx:{width:56,flexShrink:0,fontSize:13.5,color:l.colors.textSecondary,pt:.5},children:s.label}),Ao(Oo,{sx:{display:"flex",flexWrap:"wrap",gap:1,minWidth:0},children:r.length===0?Ao(Oo,{sx:{fontSize:14,color:l.colors.textMuted,pt:.5},children:"\uBE44\uC5B4 \uC788\uC74C"}):r.map(t=>Ru(Oo,{sx:{display:"flex",alignItems:"center",gap:.75},children:[Ao(Tn,{src:f?.get(t)??"",name:t,avatarSx:{width:26,height:26,fontSize:12},iconFontSize:16}),Ao(Oo,{sx:{fontSize:14.5,color:l.colors.textPrimary},children:t})]},`${s.label}-${t}`))})]},s.label)}),Ao(Oo,{sx:{display:"flex",justifyContent:"flex-end",pt:.5},children:Ao(Xw,{size:"small",color:"inherit",onClick:g,children:"\uB2EB\uAE30"})})]}):null})}import{jsx as Er,jsxs as lo}from"react/jsx-runtime";var i_=["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"];function Zh(e){let f=e?.parentElement??null;for(;f;){let g=window.getComputedStyle(f);if(/(auto|scroll)/.test(g.overflowY)&&f.scrollHeight>f.clientHeight)return f;f=f.parentElement}return null}var s_="(min-width:600px)";function Du(e){let f=new Date(e);return f.setHours(0,0,0,0),f.setDate(1),f}function Jh(e){let f=g=>String(g).padStart(2,"0");return`${e.getFullYear()}-${f(e.getMonth()+1)}-${f(e.getDate())}`}function Qh({tasks:e,googleEvents:f=[],statusOptions:g,todayStr:l,onOpenDetail:o,onAddSchedule:s,myAccountSeq:r=0,avatarSrcByName:t,fallbackToStartDate:n=!1}){let c=lt(),i=e_(s_),[a,h]=Au(()=>Du(new Date)),[d,u]=Au(!1),b=ea(()=>{let S=new Date(a.getFullYear(),a.getMonth()+1,0).getDate();return Array.from({length:S},(D,p)=>{let y=new Date(a.getFullYear(),a.getMonth(),p+1);return{ymd:Jh(y),dayNumber:p+1,weekday:y.getDay()}})},[a]),m=ea(()=>{let S=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=S.get(p);y?y.push(D):S.set(p,[D])}for(let D of S.values())D.sort(is);return S},[e,n]),x=ea(()=>n?e.filter(S=>!S.due_date.slice(0,10)&&!S.start_date.slice(0,10)&&!String(S.created_time??"").slice(0,10)).sort((S,D)=>S.completed!==D.completed?S.completed?1:-1:S.seq-D.seq):[],[e,n]),[k,B]=Au(null),R=ea(()=>ns(f),[f]),j=ea(()=>[a.getFullYear()],[a]),A=to(j),P=Ou(null),N=l.slice(0,7)===Jh(a).slice(0,7);Jw(()=>{if(!N)return;let S=()=>{let y=P.current,v=Zh(y);if(!v||!y)return;let w=y.getBoundingClientRect().top-v.getBoundingClientRect().top+v.scrollTop;v.scrollTop=Math.max(0,w-v.clientHeight/2+y.clientHeight/2)},D=setTimeout(S,100),p=setTimeout(S,400);return()=>{clearTimeout(D),clearTimeout(p)}},[N,a]);let q=Ou(null),z=Ou(null),T=S=>{h(p=>new Date(p.getFullYear(),p.getMonth()+S,1));let D=Zh(q.current);D&&D.scrollTo({top:0,behavior:"auto"})};return lo(Fr,{ref:q,onTouchStart:S=>{let D=S.touches[0];z.current=D?{x:D.clientX,y:D.clientY}:null},onTouchEnd:S=>{let D=z.current;z.current=null;let p=S.changedTouches[0];if(!D||!p)return;let y=p.clientX-D.x,v=p.clientY-D.y;Math.abs(y)<60||Math.abs(y)<=Math.abs(v)||T(y<0?1:-1)},sx:{minWidth:0,maxWidth:"100%",overflow:"hidden",bgcolor:c.colors.surface},children:[lo(Fr,{sx:{display:"flex",alignItems:"center",gap:.5,px:1.5,py:1,flexShrink:0},children:[Er(Xh,{size:"small","aria-label":"\uC774\uC804 \uB2EC",onClick:()=>T(-1),children:Er(t_,{sx:{fontSize:24,color:c.colors.textSecondary}})}),Er(Qw,{size:"small",color:"inherit",onClick:()=>h(Du(new Date)),sx:{minWidth:0,px:1,fontSize:15.5,color:c.mode==="dark"?c.colors.textStrong:c.colors.textPrimary},children:"\uC624\uB298"}),Er(Xh,{size:"small","aria-label":"\uB2E4\uC74C \uB2EC",onClick:()=>T(1),children:Er(r_,{sx:{fontSize:24,color:c.colors.textSecondary}})}),lo(Fr,{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",Er(n_,{sx:{fontSize:20,color:c.colors.textMuted}})]})]}),lo(Fr,{sx:{minWidth:0,overflowX:"hidden",borderTop:`1px solid ${c.calendar.borderColor}`},children:[x.length>0?lo(Fr,{sx:{display:"flex",alignItems:"center",gap:1,px:1,py:.75,minWidth:0,maxWidth:"100%",flexShrink:0,borderBottom:`1px solid ${c.calendar.borderColor}`},children:[lo(Fr,{sx:{width:52,flexShrink:0,fontSize:12.5,lineHeight:1.3,color:c.colors.textSecondary,textAlign:"center"},children:["\uB0A0\uC9DC",Er("br",{}),"\uC5C6\uC74C"]}),Er(Fr,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",gap:.5},children:x.map(S=>Er(si,{task:S,statusOptions:g,onOpenDetail:o,isMine:r>0&&Number(S.manager_account_seq??0)===r,avatarSrcByName:t,showManagerAvatar:!0,onOpenMembers:B},S.seq))})]}):null,b.map(({ymd:S,dayNumber:D,weekday:p})=>{let y=A.get(S)??"",v=S===l,w=!!y||p===0,_=m.get(S)??[],C=R.get(S)??[],O=_.length>0||C.length>0;return lo(Fr,{ref:v?P:void 0,onClick:s?()=>s(S):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:[Er(Fr,{sx:{width:52,flexShrink:0,display:"flex",flexDirection:"column",alignItems:"center",gap:.25},children:lo(Fr,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:.25,"@media (min-width:600px)":{flexDirection:"row",gap:.75}},children:[Er(Fr,{component:"span",sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:40,height:32,borderRadius:1,px:1.25,fontSize:22,fontWeight:500,color:v?c.colors.surface:w?c.colors.danger:p===6?c.colors.accentOnSurface:c.colors.textPrimary,bgcolor:v?c.colors.accentOnSurface:"transparent"},children:D}),Er(Fr,{component:"span",sx:{fontSize:13,color:w?c.colors.danger:p===6?c.colors.accentOnSurface:c.colors.textSecondary},children:i_[p]})]})}),lo(Fr,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",gap:.5},children:[C.map(F=>Er(ss,{event:F},F.uid)),_.map(F=>{let $=os(F),K=Er(si,{task:F,statusOptions:g,onOpenDetail:o,isMine:r>0&&Number(F.manager_account_seq??0)===r,avatarSrcByName:t,showManagerAvatar:!0,onOpenMembers:B,showTime:!i,wrapTitle:!0},F.seq);return i?lo(Fr,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[Er(Fr,{component:"span",sx:{width:44,flexShrink:0,textAlign:"right",fontSize:13.5,fontWeight:400,opacity:1,color:$?F.completed?c.colors.textPrimary:c.colors.danger:"transparent"},children:$||"00:00"}),Er(Fr,{sx:{flex:1,minWidth:0},children:K})]},F.seq):K})]})]},S)})]}),Er(Yh,{task:k,avatarSrcByName:t,onClose:()=>B(null)}),Er(o_,{open:d,centered:!0,monthOnly:!0,onClose:()=>u(!1),selectedDate:a,onDateChange:S=>{h(Du(S)),u(!1)}})]})}import{useCallback as ep,useEffect as tp,useMemo as Pu,useRef as Cl,useState as ta}from"react";import{Box as br,Tooltip as op}from"@mui/material";import a_ from"@ehfuse/overlay-scrollbar";import l_ from"@mui/icons-material/CheckCircle";import c_ from"@mui/icons-material/RadioButtonUnchecked";import{DndContext as u_,PointerSensor as f_,closestCenter as d_,useSensor as h_,useSensors as p_}from"@dnd-kit/core";import{SortableContext as m_,arrayMove as g_,useSortable as b_,verticalListSortingStrategy as y_}from"@dnd-kit/sortable";import x_ from"@mui/icons-material/DragIndicator";import{jsx as rr,jsxs as Do}from"react/jsx-runtime";var Nu=36,v_=48,rp=40,w_=24,__=4,k_=14,np=36,S_=12.5,ls=220,T_={high:{bg:"#f6c6c9",border:"#e5484d"},medium:{bg:"#c5d8f6",border:"#2f80ed"},low:{bg:"#f3e3b6",border:"#d9a514"}};function Oi(e){let f=String(e??"").trim();if(!f)return null;let g=new Date(`${f}T00:00:00`);return Number.isNaN(g.getTime())?null:g}function Tl(e,f){let g=new Date(e);return g.setDate(g.getDate()+f),g}function Lu(e,f){return Math.round((f.getTime()-e.getTime())/864e5)}function C_({task:e,dragHandle:f,onPointerDown:g,onClick:l}){let o=lt(),s=Cl(null),[r,t]=ta("");return rr(op,{title:r,arrow:!0,enterDelay:300,children:Do(br,{onPointerDown:g,onClick:n=>l(e,n),onMouseEnter:()=>{let n=s.current;t(n&&n.scrollWidth>n.clientWidth?e.title:"")},sx:{width:ls,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:[f,rr(br,{ref:s,component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.title})]})})}function B_({id:e,showIndicator:f,children:g}){let l=lt(),{attributes:o,listeners:s,setNodeRef:r}=b_({id:e});return Do(br,{ref:r,sx:{position:"relative"},children:[f?rr(br,{sx:{position:"absolute",top:-1,left:0,right:0,height:2,bgcolor:l.colors.accentOnSurface,zIndex:5}}):null,g({...o,...s})]})}function ip({tasks:e,hideCompletedChecklist:f=!1,todayStr:g,onOpenDetail:l,onToggleChecklist:o,onReorderTasks:s,onTaskContextMenu:r}){let t=lt(),[n,c]=ta(null),i=Pu(()=>[...e].sort((v,w)=>{let _=(v.timeline_sort_no??0)>0,C=(w.timeline_sort_no??0)>0;if(_&&C)return(v.timeline_sort_no??0)-(w.timeline_sort_no??0);if(_!==C)return _?-1:1;let O=v.due_date||v.start_date,F=w.due_date||w.start_date;return O!==F?O<F?-1:1:v.seq-w.seq}),[e]),[a,h]=ta(null),[d,u]=ta(null),b=p_(h_(f_,{activationConstraint:{distance:4}})),m=ep(v=>{h(v.over?Number(v.over.id):null)},[]),x=ep(v=>{h(null),u(null);let{active:w,over:_}=v;if(!_||w.id===_.id)return;let C=i.map($=>$.seq),O=C.indexOf(Number(w.id)),F=C.indexOf(Number(_.id));O===-1||F===-1||s(g_(C,O,F))},[i,s]),k=Pu(()=>{let v=Oi(g)??new Date,w=v,_=Tl(v,21);for(let F of i){let $=Oi(F.start_date)??Oi(F.due_date),K=Oi(F.due_date)??$;$&&$<w&&(w=$),K&&K>_&&(_=K)}let C=Tl(w,-3),O=Lu(C,Tl(_,3))+1;return Array.from({length:O},(F,$)=>Tl(C,$))},[i,g]),B=k[0],R=k.findIndex(v=>mr(v)===g),{dayWidths:j,dayOffsets:A,gridWidth:P}=Pu(()=>{let v=k.map((C,O)=>C.getDate()===1||O===0?v_:Nu),w=[],_=0;for(let C of v)w.push(_),_+=C;return{dayWidths:v,dayOffsets:w,gridWidth:_}},[k]),N=ls+P,q=Cl(null),z=v=>{q.current={x:v.clientX,y:v.clientY}},T=(v,w)=>{let _=q.current;q.current=null,!(_&&(Math.abs(w.clientX-_.x)>5||Math.abs(w.clientY-_.y)>5))&&l(v)},S=Cl(null),[D,p]=ta(!1);tp(()=>{let v=S.current?.getScrollContainer();if(!v)return;let w=()=>p(v.scrollHeight>v.clientHeight);w();let _=new ResizeObserver(w);return _.observe(v),()=>_.disconnect()},[i.length]);let y=Cl(!1);return tp(()=>{if(i.length===0||y.current)return;y.current=!0;let v=window.requestAnimationFrame(()=>{let w=S.current?.getScrollContainer();!w||R<0||(w.scrollLeft=Math.max(0,A[R]-Nu*3))});return()=>window.cancelAnimationFrame(v)},[i.length]),Do(br,{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:[rr(br,{sx:{flex:1,minHeight:0,minWidth:0,contain:"inline-size"},children:rr(a_,{ref:S,style:{height:"100%"},contentStyle:{width:"max-content",minWidth:"100%"},thumb:{width:8},showHorizontalScrollbar:!0,dragScroll:{excludeClasses:["taskbox-timeline-handle"]},children:Do(br,{sx:{width:N,position:"relative",bgcolor:t.timeline.bg},children:[Do(br,{sx:{display:"flex",position:"sticky",top:0,zIndex:3,bgcolor:t.timeline.headerBg,borderBottom:`1px solid ${t.timeline.gridColor}`},children:[rr(br,{sx:{width:ls,height:np,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((v,w)=>{let _=v.getDay(),C=w===R,O=v.getDate()===1||w===0;return rr(br,{sx:{width:j[w],height:np,flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",fontSize:S_,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?`${v.getMonth()+1}/${v.getDate()}`:v.getDate()},mr(v))})]}),rr(u_,{sensors:b,collisionDetection:d_,onDragStart:v=>u(Number(v.active.id)),onDragOver:m,onDragEnd:x,onDragCancel:()=>{h(null),u(null)},children:rr(m_,{items:i.map(v=>String(v.seq)),strategy:y_,children:Do(br,{sx:{position:"relative"},children:[k.map((v,w)=>{let _=v.getDay(),C=w===R;return!C&&_!==0&&_!==6?null:rr(br,{sx:{position:"absolute",top:0,bottom:0,left:ls+A[w],width:j[w],bgcolor:C?"rgba(229,72,77,0.07)":t.colors.surfaceSubtle,zIndex:0}},`stripe-${mr(v)}`)}),i.map((v,w)=>{let _=Oi(v.start_date)??Oi(v.due_date),C=Oi(v.due_date)??_,O=_?Math.min(k.length-1,Math.max(0,Lu(B,_))):0,F=C?Math.min(k.length-1,Math.max(O,Lu(B,C))):O,$=T_[v.priority],K=ls+A[O]+2,M=A[F]+j[F]-A[O]-4,H=(v.checklist??[]).map((E,I)=>({entry:E,index:I})).filter(({entry:E})=>!f||!E.checked);return rr(B_,{id:String(v.seq),showIndicator:a===v.seq&&d!==v.seq,children:E=>Do(br,{sx:{borderBottom:w===i.length-1&&D?"none":`1px solid ${t.timeline.gridColor}`,position:"relative",zIndex:1,opacity:d===v.seq?.45:1},children:[Do(br,{onContextMenu:I=>r(v,I),sx:{display:"flex",height:rp,position:"relative","&:hover":{bgcolor:"rgba(47,128,237,0.04)"}},children:[rr(C_,{task:v,dragHandle:rr(br,{component:"span",className:"taskbox-timeline-handle",...E,onClick:I=>I.stopPropagation(),sx:{display:"inline-flex",alignItems:"center",flexShrink:0,color:t.colors.accentOnSurface,cursor:"grab",touchAction:"none","&:hover":{color:t.colors.accentOnSurface}},children:(()=>{let I=(v.is_notice||v.is_event?Et(v.icon||(v.is_notice?pr:yr)):null)??x_;return rr(I,{sx:{fontSize:17}})})()}),onPointerDown:z,onClick:T}),rr(op,{title:`${v.title} (${v.start_date||"?"} ~ ${v.due_date||"?"})`,arrow:!0,enterDelay:300,children:rr(br,{onPointerDown:z,onClick:I=>T(v,I),sx:{position:"absolute",top:(rp-20)/2,left:K,width:Math.max(Nu-4,M),height:20,borderRadius:1,bgcolor:$.bg,border:`1px solid ${$.border}`,opacity:v.completed?.45:1,cursor:"pointer","&:hover":{filter:"brightness(0.95)"}}})})]}),H.map(({entry:I,index:L},U)=>rr(br,{sx:{display:"flex",height:w_,position:"relative",mt:U===0?`${__}px`:0,mb:U===H.length-1?`${k_}px`:0},children:rr(br,{sx:{width:ls,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:I.checked?t.colors.textMuted:t.colors.textPrimary},children:Do(br,{onClick:G=>c({anchorEl:G.currentTarget,taskSeq:v.seq,index:L,checked:!I.checked}),sx:{display:"inline-flex",alignItems:"center",gap:.75,minWidth:0,cursor:"pointer"},children:[I.checked?rr(l_,{sx:{fontSize:17,color:t.colors.accentOnSurface,flexShrink:0}}):rr(c_,{sx:{fontSize:17,color:t.colors.textMuted,flexShrink:0}}),rr(br,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",textDecoration:I.checked?"line-through":"none"},children:I.label})]})})},`${v.seq}-check-${L}`))]})},v.seq)}),i.length===0?rr(br,{sx:{py:8,textAlign:"center",color:t.colors.textMuted,fontSize:14},children:"\uD45C\uC2DC\uD560 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):null]})})})]})})}),rr(At,{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 Ai}from"react/jsx-runtime";function JD(e){switch(e.view){case"card":case"kanban":{let{view:f,...g}=e;return Ai(_u,{...g,columnAxis:f==="kanban"?"status":"project"})}case"sprint":{let{view:f,...g}=e;return Ai(_u,{...g,columnAxis:"sprint"})}case"calendar":{let{view:f,...g}=e;return Ai(Hh,{...g})}case"month":{let{view:f,...g}=e;return Ai(Gh,{...g})}case"agenda":{let{view:f,...g}=e;return Ai(Qh,{...g})}case"timeline":{let{view:f,...g}=e;return Ai(ip,{...g})}default:{let{view:f,...g}=e;return Ai(yh,{...g})}}}var QD=["list","card","kanban","calendar","month","timeline"];import{Box as yn}from"@mui/material";import{Fragment as I_,jsx as Di,jsxs as co}from"react/jsx-runtime";function sp(e,f){if(!/^\d{4}-\d{2}-\d{2}$/.test(e)||!/^\d{4}-\d{2}-\d{2}$/.test(f))return null;let g=new Date(`${e}T00:00:00`),l=new Date(`${f}T00:00:00`);return Math.round((g.getTime()-l.getTime())/864e5)}function ap({tasks:e,todayStr:f,showProgress:g=!0,dday:l=null,workdaysLeft:o=null,showPoints:s=!0,showHours:r=!0,showOverdue:t=!0,showInfo:n=!0,inline:c=!1}){let i=lt(),a=e.filter(P=>!P.archived),h=a.filter(P=>P.completed).length,d=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)<f).length,b=a.reduce((P,N)=>N.completed?P:P+(N.story_points??0),0),m=g?Di(yn,{sx:{flex:c?"0 0 110px":"1 1 auto",minWidth:0,height:i.summary.gaugeHeight,borderRadius:3,bgcolor:i.summary.gaugeTrackColor},children:Di(yn,{sx:{height:"100%",borderRadius:3,width:`${d}%`,bgcolor:d>=100?i.summary.gaugeCompleteColor:i.summary.gaugeBarColor,transition:"width 0.2s"}})}):null,x=g?co(yn,{component:"span",sx:{flexShrink:0,fontSize:c?14:13,color:i.summary.textColor},children:[d,"%"]}):null,k={color:i.summary.numberColor,fontWeight:700,fontSize:c?15:14},B=a.length-h,R=co(I_,{children:[c?null:co("span",{children:["\uB0A8\uC740 ",Di(yn,{component:"span",sx:k,children:B}),"\uAC74"]}),t&&u>0?co(yn,{component:"span",sx:{color:i.summary.overdueColor,fontWeight:600},children:["\uC9C0\uC5F0"," ",Di(yn,{component:"span",sx:{fontWeight:700,fontSize:c?15:14},children:u}),"\uAC74"]}):null,s&&b>0?co("span",{children:[Di(yn,{component:"span",sx:k,children:b}),"SP"]}):null]}),j=typeof o=="number"&&Number.isFinite(o)?co("span",{children:["\uADFC\uBB34\uC77C ",Di(yn,{component:"span",sx:k,children:o}),"\uC77C"]}):null,A=typeof l=="number"&&Number.isFinite(l)?Di(yn,{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?co(yn,{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?j:null,n?A:null,m,x]}):co(yn,{sx:{display:"flex",flexDirection:"column",gap:.5},children:[g?co(yn,{sx:{display:"flex",alignItems:"center",gap:1},children:[m,x]}):null,co(yn,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,fontSize:13.5,color:i.summary.textColor},children:[R,j,A]})]})}import{useMemo as M_}from"react";function E_(e){let f=String(e??"").trim();if(!f)return 0;let g=0,l=!1;for(let o of f.matchAll(/(\d+(?:\.\d+)?)\s*(h|시간|m|분|d|일)/gi)){let s=parseFloat(o[1]),r=o[2].toLowerCase();l=!0,r==="m"||r==="\uBD84"?g+=s/60:r==="d"||r==="\uC77C"?g+=s*8:g+=s}if(!l){let o=parseFloat(f);Number.isFinite(o)&&(g+=o)}return g}function sP(e){let f=Math.round(e*10)/10;return`${f%1===0?f.toFixed(0):f.toFixed(1)}\uC2DC\uAC04`}function lp(e,f,g){if(!/^\d{4}-\d{2}-\d{2}$/.test(e)||!/^\d{4}-\d{2}-\d{2}$/.test(f))return 0;let l=new Date(`${e}T00:00:00`),o=new Date(`${f}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")}`;g.has(n)||(s+=1)}return s}function aP(e){return e.reduce((f,g)=>g.completed?f:f+E_(g.estimated_time),0)}import{jsx as R_}from"react/jsx-runtime";function hP({sprint:e,tasks:f,todayStr:g,...l}){let o=e.status==="closed"?null:sp(e.end_date,g),s=o!==null&&o>=0,r=M_(()=>{if(!s)return[];let c=Number(g.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,g,e.end_date]),t=to(r),n=s?lp(g,e.end_date,new Set(t.keys())):null;return R_(ap,{tasks:f,todayStr:g,dday:o,workdaysLeft:n,...l})}import{useEffect as q_,useRef as $_,useState as H_}from"react";import{Box as ju}from"@mui/material";import{Children as O_}from"react";import{Box as zu,CircularProgress as A_}from"@mui/material";import{jsx as Bl}from"react/jsx-runtime";var cp={xs:2,md:3};function up(){return Bl(zu,{sx:{position:"fixed",top:"calc(50% + 30px)",left:"50%",transform:"translate(-50%, -50%)",zIndex:1},children:Bl(A_,{size:44,thickness:4,sx:{color:"#94a3b8"}})})}function fp({children:e}){return Bl(zu,{sx:{minWidth:0,display:"flex",flexDirection:"column",gap:cp,pb:cp},children:O_.map(e,f=>f==null||f===!1?null:Bl(zu,{sx:{bgcolor:"background.paper",borderRadius:"12px",boxShadow:"0 1px 3px rgba(15,23,42,0.08)",minWidth:0},children:f}))})}import{useState as L_}from"react";import{Box as No,Button as hp,Checkbox as z_,Typography as ai}from"@mui/material";import pp from"@mui/icons-material/CheckCircle";import j_ from"@mui/icons-material/CheckCircleOutlineOutlined";import{Fragment as N_,jsx as dp}from"react/jsx-runtime";var D_="taskbox-search-highlight";function P_(e,f){let g=f?.keyPrefix??"hl";return e.map((l,o)=>dp("span",{className:l.highlight?f?.highlightClassName??D_:f?.className,style:l.highlight?{fontWeight:700,color:"#2563eb"}:void 0,children:l.text},`${g}-${l.text}-${o}`))}function Il({text:e,keyword:f,fallback:g="-",className:l,highlightClassName:o,keyPrefix:s}){let r=String(e??"").trim()||g,t=al(r,f);return dp(N_,{children:P_(t,{className:l,highlightClassName:o,keyPrefix:s})})}import{jsx as Ct,jsxs as Pi}from"react/jsx-runtime";var F_={flexShrink:0,minWidth:64,textAlign:"center",px:.75,py:.35,borderRadius:.75,bgcolor:"#f1f5f9",color:"#64748b",fontSize:Br(12.5),fontWeight:500,lineHeight:1.4},Po={fontSize:Br(14.5),color:"#374151",minWidth:0,lineHeight:1.45};function $n({label:e,children:f}){return Pi(No,{sx:{display:"flex",alignItems:"flex-start",gap:1,minWidth:0},children:[Ct(No,{sx:F_,children:e}),Ct(No,{sx:{...Po,flex:1,pt:.2},children:f})]})}function mp({task:e,statusOptions:f,projectLabel:g,searchText:l,todayStr:o,dimCompleted:s=!0,onRequestToggleCompleted:r,onOpenDetail:t,onTaskContextMenu:n,targetSummary:c="",ackInfo:i,completeLocked:a=!1,unread:h=!1,noticeReadOnly:d=!1,onAckConfirm:u,onAckListClick:b,myManaged:m=!1}){let x=e.is_event?Hs(e):xr(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=Cn(e.start_date),j=Cn(e.due_date),A=R&&B&&!j?`${R} ${B}`:R,P=j&&B?`${j} ${B}`:j,N=ot(),q=!e.is_notice&&e.completed&&!!e.review_pending&&!!N.onReviewDone&&(N.myAccountSeq??0)>0&&(e.author_account_seq??0)===(N.myAccountSeq??0),[z,T]=L_(null),S=!e.is_notice&&!e.is_event&&!String(e.due_date??"").trim(),D=!e.is_notice&&!e.completed&&!!e.due_date&&e.due_date<o,p=(e.receiver_names??[]).filter(Boolean);return Pi(No,{role:"button",tabIndex:0,onClick:()=>t(e),onKeyDown:y=>{(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),t(e))},onContextMenu:y=>n(e,y),sx:{display:"flex",flexDirection:"column",gap:.75,minWidth:0,p:1.25,cursor:"pointer",opacity:S?.6:1,position:"relative"},children:[m?Ct(No,{sx:{position:"absolute",left:3,top:5,bottom:5,width:3,borderRadius:"999px",bgcolor:"#2f80ed"}}):null,Pi(No,{sx:{display:"flex",alignItems:"flex-start",gap:.75,minWidth:0,mb:1},children:[e.is_event?(()=>{let y=Et(e.icon||yr);return y?Ct(y,{sx:{fontSize:21,flexShrink:0,mt:.2,color:e.icon_color||"#1e3a8a"}}):null})():!d&&!a?Ct(z_,{checked:e.completed,icon:Ct(j_,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:Ct(pp,{sx:{fontSize:22,color:"#2f80ed"}}),onClick:y=>y.stopPropagation(),onChange:(y,v)=>r({anchorEl:y.currentTarget,taskSeq:e.seq,nextCompleted:v}),sx:{p:0,mt:.1,flexShrink:0}}):null,(()=>{if(!e.is_notice)return null;let y=Et(e.icon||pr);return y?Ct(y,{sx:{fontSize:19,flexShrink:0,mt:"1px",color:e.icon_color||"#e5484d"}}):null})(),Ct(ai,{sx:{fontSize:Br(16),fontWeight:600,lineHeight:1.35,minWidth:0,flex:1,color:e.completed&&s?"#9a9a97":S?"#5f5e5b":"#111827",textDecoration:e.completed&&s?"line-through":"none"},children:Ct(Il,{text:e.title,keyword:l})}),h&&!e.completed?Ct(No,{component:"span",sx:{flexShrink:0,px:.55,fontSize:Br(10.5),fontWeight:700,lineHeight:1.6,color:"#fff",bgcolor:"#e5484d",borderRadius:"4px"},children:"N"}):null]}),Pi(No,{sx:{display:"flex",flexDirection:"column",gap:.6,minWidth:0},children:[Ct($n,{label:x?"\uC0C1\uD0DC":"\uC911\uC694\uB3C4",children:Pi(No,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1.25},children:[x?Ct(Lt,{option:x,small:!0}):null,Ct(Xr,{priority:e.priority,small:!0})]})}),(e.label_keys??[]).length>0?Ct($n,{label:"\uB77C\uBCA8",children:Ct(Zo,{labelKeys:e.label_keys,labelOptions:f})}):null,g?Ct($n,{label:"\uD504\uB85C\uC81D\uD2B8",children:Ct(ai,{sx:Po,children:g})}):null,A?Ct($n,{label:"\uC2DC\uC791",children:Ct(ai,{sx:Po,children:A})}):null,P?Ct($n,{label:"\uB9C8\uAC10",children:Pi(ai,{sx:{...Po,color:D?"#e5484d":Po.color,fontWeight:D?600:400},children:[P,D?" \xB7 \uC9C0\uC5F0":""]})}):null,q?Pi($n,{label:"\uAC80\uC218",children:[Ct(hp,{size:"small",variant:"contained",disableElevation:!0,onClick:y=>{y.stopPropagation(),T(y.currentTarget)},sx:{...ei,py:0,fontSize:Br(13)},children:"\uAC80\uC218\uC644\uB8CC"}),Ct(ti,{anchorEl:z,onCancel:()=>T(null),onConfirm:()=>{N.onReviewDone?.(e),T(null)}})]}):null,e.is_notice?Ct($n,{label:"\uB300\uC0C1\uC790",children:Ct(ai,{sx:Po,children:c||"\uBAA8\uB4E0 \uC9C1\uC6D0"})}):null,i?Ct($n,{label:"\uD655\uC778",children:Ct(hp,{size:"small",variant:i.canAck?"contained":"outlined",color:"inherit",startIcon:i.acked?Ct(pp,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:y=>{y.stopPropagation(),i.canAck?u?.(e):b?.(e,y.currentTarget)},sx:{py:0,px:1.25,minWidth:0,fontSize:Br(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($n,{label:"\uCC45\uC784\uC790",children:Ct(ai,{sx:Po,children:Ct(Il,{text:e.manager_name,keyword:l})})}):null,!e.is_notice&&p.length>0?Ct($n,{label:"\uCC38\uC870\uC790",children:Ct(ai,{sx:Po,children:p.join(", ")})}):null,e.note?Ct($n,{label:"\uBE44\uACE0",children:Ct(ai,{sx:Po,children:Ct(Il,{text:e.note,keyword:l})})}):null]})]})}import{jsx as cs,jsxs as U_}from"react/jsx-runtime";function W_(e,f){if(e.completed||e.archived||f<=0)return;let g=ts(e,f);if(g.canConfirm)return{count:g.count,total:g.total,acked:!1,canAck:!0,pendingNames:g.pendingNames}}function VP({tasks:e,statusOptions:f,customTabs:g,loading:l,dimCompleted:o=!0,searchText:s,todayStr:r,onToggleCompleted:t,onOpenDetail:n,onTaskContextMenu:c,getTargetSummary:i,getAckInfo:a,getNoticeReadOnly:h,isTaskUnread:d,getCompleteLocked:u,onAckConfirm:b,onAckListClick:m,onEndReached:x,myAccountSeq:k=0}){let B=new Map(g.map(q=>[q.key,q.label])),[R,j]=H_(null),{onReturnTask:A}=ot(),P=R?e.find(q=>q.seq===R.taskSeq):void 0,N=$_(null);return q_(()=>{let q=N.current;if(!x||!q)return;let z=new IntersectionObserver(T=>{T[0]?.isIntersecting&&x()});return z.observe(q),()=>z.disconnect()},[x,e.length]),e.length===0?l?cs(up,{}):cs(ju,{sx:{py:6,textAlign:"center",color:"#94a3b8",fontSize:"0.9rem"},children:"\uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):U_(ju,{sx:{minWidth:0},children:[cs(fp,{children:e.map(q=>cs(mp,{dimCompleted:o,myManaged:k>0&&!q.is_notice&&!q.is_event&&(q.manager_account_seq??0)===k,task:q,statusOptions:f,projectLabel:q.tab_key?B.get(q.tab_key)??"":"",searchText:s,todayStr:r,onRequestToggleCompleted:j,onOpenDetail:n,onTaskContextMenu:c,targetSummary:q.is_notice?i?.(q):void 0,ackInfo:q.is_notice?a?.(q):W_(q,k),noticeReadOnly:q.is_notice?h?.(q):!1,unread:d?.(q)??!1,completeLocked:u?.(q)??!1,onAckConfirm:b,onAckListClick:m},q.seq))}),x?cs(ju,{ref:N,sx:{height:"1px"}}):null,cs(cn,{open:!!R,anchorEl:R?.anchorEl??null,nextCompleted:R?.nextCompleted??!1,returnMode:!!A&&!!(P&&Zr(P,k)),onCancel:()=>j(null),onConfirm:q=>{R&&(q&&A&&P?A(P,q):t(R.taskSeq,R.nextCompleted)),j(null)}})]})}import{useState as ra}from"react";import{Box as lr,Checkbox as V_,Menu as K_,MenuItem as gp,Tooltip as G_}from"@mui/material";import Y_ from"@mui/icons-material/CheckCircle";import X_ from"@mui/icons-material/CheckCircleOutlineOutlined";import Z_ from"@mui/icons-material/NotesOutlined";import J_ from"@mui/icons-material/AutorenewOutlined";import Q_ from"@mui/icons-material/CalendarTodayOutlined";import e3 from"@mui/icons-material/EventOutlined";import t3 from"@mui/icons-material/PersonOutlineOutlined";import r3 from"@mui/icons-material/PeopleAltOutlined";import n3 from"@mui/icons-material/StickyNote2Outlined";import{Fragment as s3,jsx as wt,jsxs as li}from"react/jsx-runtime";var Fu={completed:{label:"\uC644\uB8CC",width:"44px",align:"center",icon:null},title:{label:"\uC81C\uBAA9",width:"1fr",align:"left",icon:wt(Z_,{sx:{fontSize:15}})},manager_name:{label:"\uCC45\uC784\uC790",width:"112px",align:"center",icon:wt(t3,{sx:{fontSize:15}})},receiver_names:{label:"\uCC38\uC870\uC790",width:"120px",align:"center",icon:wt(r3,{sx:{fontSize:15}})},status:{label:"\uC0C1\uD0DC",width:"104px",align:"center",icon:wt(J_,{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:wt(Q_,{sx:{fontSize:15}})},due_date:{label:"\uB9C8\uAC10\uC608\uC815",width:"110px",align:"center",icon:wt(e3,{sx:{fontSize:15}})},note:{label:"\uBE44\uACE0",width:"1fr",align:"left",icon:wt(n3,{sx:{fontSize:15}})}},o3=[{id:"completed"},{id:"title"},{id:"manager_name"},{id:"due_date"},{id:"status"}],i3=new Set(["manager_name","status","due_date"]);function bp(e){let f=String(e??"").trim();return f?f.slice(2,10).replaceAll("-","."):""}function vN(e,f){return f>0?e.filter(g=>!g.is_notice&&!g.completed&&!g.archived&&Ln(g)==="group"&&Number(g.visibility_group_seq??0)===f).sort((g,l)=>{let o=String(g.due_date??"").trim(),s=String(l.due_date??"").trim();return o!==s?o?s?o.localeCompare(s):-1:1:Number(g.seq)-Number(l.seq)}):[]}function wN({tasks:e,columns:f=o3,loading:g=!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:d,onClaimTask:u}){let b=lt(),[m,x]=ra(null),[k,B]=ra(null),[R,j]=ra(null),[A,P]=ra(null),{onReturnTask:N}=ot(),[q,z]=ra(null),T=f.map(p=>p.width??Fu[p.id].width).join(" "),S=(p,y)=>wt(Tn,{src:s?.get(p)??"",name:p,avatarSx:{width:y,height:y,fontSize:Math.round(y/2),flexShrink:0,borderRadius:"50%"},iconFontSize:Math.round(y*.6)}),D=(p,y)=>{let w=Fu[p.id].align==="center";switch(p.id){case"completed":if(y.is_event){let _=Et(y.icon||yr);return wt(lr,{className:"cell",sx:{justifyContent:"center"},children:_?wt(_,{sx:{fontSize:19,color:y.icon_color||"#1e3a8a"}}):null},p.id)}return wt(lr,{className:"cell",sx:{justifyContent:"center",...c?{"&:hover":{bgcolor:b.table.cellHoverBg}}:{}},children:wt(G_,{title:y.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC",arrow:!0,enterDelay:300,disableInteractive:!0,children:wt(V_,{checked:!!y.completed,icon:wt(X_,{sx:{fontSize:20,color:"#9a9a97",opacity:.45}}),checkedIcon:wt(Y_,{sx:{fontSize:20,color:"#2f80ed"}}),onChange:_=>P({anchorEl:_.currentTarget,task:y}),sx:{p:.5}})})},p.id);case"title":{let _=y.is_notice?Et(y.icon||pr):null,C=y.icon_color||"#e5484d";return li(lr,{className:"cell",onClick:()=>n(y),sx:{gap:1,cursor:"pointer","&:hover":{bgcolor:b.table.cellHoverBg}},children:[_?wt(_,{sx:{fontSize:18,flexShrink:0,color:C}}):null,wt(lr,{component:"span",sx:{fontSize:14.5,fontWeight:b.table.rowTitleFontWeight,color:b.table.rowTitleColor,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:y.title||"(\uC81C\uBAA9 \uC5C6\uC74C)"})]},p.id)}case"manager_name":{let _=t?t(y):!1,C=o>0&&Number(y.manager_account_seq??0)===o;return _&&d?li(lr,{className:"cell",onClick:O=>j({anchorEl:O.currentTarget,task:y}),sx:{gap:.75,justifyContent:"center",cursor:"pointer","&:hover":{bgcolor:b.table.cellHoverBg}},children:[y.manager_name?S(y.manager_name,22):null,wt(lr,{component:"span",sx:{fontSize:14,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:y.manager_name||""})]},p.id):wt(lr,{className:"cell",sx:{gap:.75,justifyContent:"center"},children:y.manager_name?li(s3,{children:[S(y.manager_name,22),wt(lr,{component:"span",sx:{fontSize:14,fontWeight:C?600:400,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:y.manager_name})]}):u?wt(eo,{onClick:O=>z({anchorEl:O.currentTarget,taskSeq:Number(y.seq)}),children:"\uAC00\uC838\uAC00\uAE30"}):null},p.id)}case"receiver_names":return wt(lr,{className:"cell",sx:{justifyContent:"center",fontSize:14,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:(y.receiver_names??[]).join(", ")},p.id);case"status":return wt(lr,{className:"cell",onClick:i?_=>x({anchorEl:_.currentTarget,task:y}):void 0,sx:{py:.5,justifyContent:"center",...i?{cursor:"pointer","&:hover":{bgcolor:b.table.cellHoverBg}}:{}},children:wt(Lt,{option:xr(y)})},p.id);case"priority":return wt(lr,{className:"cell",sx:{justifyContent:"center"},children:wt(Xr,{priority:y.priority,plain:!0})},p.id);case"start_date":return wt(lr,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap",fontSize:14},children:bp(y.start_date)},p.id);case"due_date":return wt(lr,{className:"cell",onClick:a?_=>B({anchorEl:_.currentTarget,taskSeq:Number(y.seq),date:String(y.due_date??"").slice(0,10),reminders:ro(y)}):void 0,sx:{justifyContent:"center",whiteSpace:"nowrap",fontSize:14,...a?{cursor:"pointer","&:hover":{bgcolor:b.table.cellHoverBg}}:{}},children:bp(y.due_date)},p.id);case"note":return wt(lr,{className:"cell",sx:{justifyContent:w?"center":"flex-start",fontSize:14,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:y.note||""},p.id);default:return null}};return li(lr,{sx:{border:`1px solid ${b.table.borderColor}`,borderRadius:1,overflow:"hidden",bgcolor:b.table.bg,color:b.table.rowColor},children:[wt(lr,{sx:{display:"grid",gridTemplateColumns:T,borderBottom:`1px solid ${b.table.borderColor}`,bgcolor:b.table.headerBg,"& > *":{display:"flex",alignItems:"center",gap:.5,px:1,py:1,minWidth:0,fontSize:b.table.headerFontSize,whiteSpace:"nowrap",userSelect:"none",borderRight:`1px solid ${b.table.rowBorderColor}`},"& > *:first-of-type":{px:.5},"& > *:last-child":{borderRight:"none",pr:2}},children:f.map(p=>{let y=Fu[p.id];return li(lr,{sx:{justifyContent:y.align==="center"?"center":"flex-start",color:i3.has(p.id)?b.table.headerActiveColor:b.table.headerColor},children:[y.icon,p.label??y.label]},p.id)})}),g?wt(lr,{sx:{py:3,textAlign:"center",color:b.table.emptyColor,fontSize:14},children:"\uBD88\uB7EC\uC624\uB294 \uC911\u2026"}):e.length===0?wt(lr,{sx:{py:3,textAlign:"center",color:b.table.emptyColor,fontSize:14},children:l}):e.map((p,y)=>wt(lr,{sx:{display:"grid",gridTemplateColumns:T,minHeight:44,fontSize:15,bgcolor:b.table.rowBg,borderTop:y===0?"none":`1px solid ${b.table.rowBorderColor}`,"&:hover":{bgcolor:b.table.rowHoverBg},"& > .cell":{px:1,minWidth:0,display:"flex",alignItems:"center",borderRight:`1px solid ${b.table.rowBorderColor}`},"& > .cell:first-of-type":{px:.5},"& > .cell:last-child":{borderRight:"none",pr:2}},children:f.map(v=>D(v,p))},p.seq)),wt(Gi,{anchorEl:m?.anchorEl??null,value:String(m?.task.status??""),options:m?Ya(m.task):void 0,onSelect:p=>{m&&i?.(Number(m.task.seq),p),x(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:()=>x(null)}),li(K_,{anchorEl:R?.anchorEl??null,open:!!R,onClose:()=>j(null),transitionDuration:0,children:[li(gp,{onClick:()=>{R&&d?.(Number(R.task.seq),"",0),j(null)},sx:{fontSize:14,minWidth:170,gap:1,color:b.table.headerColor},children:[wt(lr,{sx:{width:24,flexShrink:0}}),"\uC9C0\uC815 \uC548 \uD568"]}),r.map(p=>li(gp,{selected:Number(R?.task.manager_account_seq??0)===Number(p.account_seq??0),onClick:()=>{R&&d?.(Number(R.task.seq),p.name,Number(p.account_seq??0)),j(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[S(p.name,24),p.name,p.role_name?wt(lr,{component:"span",sx:{color:b.table.headerColor,fontSize:13},children:p.role_name}):null]},p.seq))]}),wt(Bn,{anchorEl:k?.anchorEl??null,open:!!k,date:k?.date??"",reminders:k?.reminders??[],hideReminder:!h,onClose:()=>B(null),onDateChange:p=>{k&&(a?.(k.taskSeq,p),B(y=>y?{...y,date:p}:null))},onReminderChange:p=>{k&&(h?.(k.taskSeq,p),B(y=>y?{...y,reminders:p}:null))}}),wt(cn,{open:!!A,anchorEl:A?.anchorEl??null,nextCompleted:!A?.task.completed,returnMode:!!N&&!!(A&&Zr(A.task,o)),onCancel:()=>P(null),onConfirm:p=>{A&&(p&&N?N(A.task,p):c?.(A.task,!A.task.completed)),P(null)}}),wt(At,{open:!!q,anchorEl:q?.anchorEl??null,title:"\uC774 \uC5C5\uBB34\uB97C \uB9E1\uC744\uAE4C\uC694?",confirmText:"\uAC00\uC838\uAC00\uAE30",onCancel:()=>z(null),onConfirm:()=>{q&&u?.(q.taskSeq),z(null)}})]})}var na=[{value:"daily",label:"\uB9E4\uC77C"},{value:"weekly",label:"\uB9E4\uC8FC"},{value:"monthly",label:"\uB9E4\uC6D4"},{value:"yearly",label:"\uB9E4\uB144"}];function El(e){return na.find(f=>f.value===e)?.label??"\uC5C6\uC74C"}function a3(e){if(!/^\d{4}-\d{2}-\d{2}$/.test(e))return null;let f=new Date(`${e}T00:00:00`);return Number.isNaN(f.getTime())?null:f}function Ml(e,f){let g=a3(e);if(!g)return"";let l=new Date(g);f==="daily"?l.setMonth(l.getMonth()+1):f==="weekly"?l.setMonth(l.getMonth()+3):f==="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 l3(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)}function yp(e,f){let g=String(e??"").slice(0,10);if(!l3(g)||typeof f!="number"||!Number.isFinite(f))return"";let l=new Date(`${g}T12:00:00`);l.setDate(l.getDate()+Math.trunc(f));let o=l.getFullYear(),s=String(l.getMonth()+1).padStart(2,"0"),r=String(l.getDate()).padStart(2,"0");return`${o}-${s}-${r}`}function c3(e,f,g){return{title:String(e.title??"").trim(),content:String(e.content??""),start_date:yp(f,e.start_offset_days),due_date:yp(f,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:g}}function xp(e,f){let g=Number(e.group_seq)||0;return(e.items??[]).map(l=>c3(l,f,g)).filter(l=>l.title.length>0)}function TN(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 Ak,useRef as Dk,useState as rm}from"react";import{Box as zo,Button as lf,ButtonBase as Pk,Divider as nm,Drawer as Nk,IconButton as Lk,Tooltip as zk}from"@mui/material";import jk from"@mui/icons-material/Close";import Fk from"@ehfuse/overlay-scrollbar";import{FormDialog as qk}from"@ehfuse/mui-form-dialog";import{useState as ua}from"react";import{Box as zi,ButtonBase as _k,Divider as fa,Menu as of,MenuItem as sf,Tooltip as kk}from"@mui/material";import Sk from"@mui/icons-material/SubjectOutlined";import Tk from"@mui/icons-material/StickyNote2Outlined";import Ck from"@mui/icons-material/LabelOutlined";import Bk from"@mui/icons-material/DirectionsRunOutlined";import Zp from"@mui/icons-material/LockOutlined";import Jp from"@mui/icons-material/PublicOutlined";import Qp from"@mui/icons-material/Group";import Ik from"@mui/icons-material/Repeat";import Ek from"@mui/icons-material/EventOutlined";import Mk from"@mui/icons-material/SpeedOutlined";import{TextField as Rk}from"@ehfuse/mui-form-controls";import{InfoAlert as em}from"@ehfuse/alerts";import{useState as Ni}from"react";import{Box as Al,Divider as I3,ListItemIcon as E3,Menu as Hu,MenuItem as oa}from"@mui/material";import M3 from"@mui/icons-material/Add";import Ol from"@mui/icons-material/Check";import R3 from"@mui/icons-material/ViewKanbanOutlined";import O3 from"@mui/icons-material/CalendarTodayOutlined";import A3 from"@mui/icons-material/EventOutlined";import D3 from"@mui/icons-material/PersonOutlineOutlined";import Sp from"@mui/icons-material/PeopleAltOutlined";import P3 from"@mui/icons-material/FlagOutlined";import N3 from"@mui/icons-material/TimerOutlined";import L3 from"@mui/icons-material/NotificationsNoneOutlined";import z3 from"@mui/icons-material/InboxOutlined";import j3 from"@mui/icons-material/PlaceOutlined";import F3 from"@mui/icons-material/MapOutlined";import{TimePicker as q3}from"@ehfuse/mui-datetime-picker";import{InfoAlert as $3}from"@ehfuse/alerts";var Hn="@media (max-width: 719.95px)";function uo(e){return{[Hn]:{order:e}}}import{useEffect as u3,useState as f3}from"react";import{Box as d3}from"@mui/material";import{jsx as h3}from"react/jsx-runtime";function Lo({value:e,placeholder:f,readOnly:g,onCommit:l}){let o=lt(),[s,r]=f3(e);return u3(()=>r(e),[e]),h3(d3,{component:"input",spellCheck:!1,value:s,readOnly:g,placeholder:f,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 qu}from"@mui/material";import{jsx as p3,jsxs as vp}from"react/jsx-runtime";function vt({icon:e,label:f,onClick:g,sx:l,children:o}){return vp(qu,{sx:[{display:"flex",alignItems:"center",minHeight:32},...Array.isArray(l)?l:[l]],children:[vp(qu,{sx:{display:"flex",alignItems:"center",gap:1,width:104,flexShrink:0,fontSize:13.5,color:"#787774"},children:[e,f]}),p3(qu,{onClick:g?s=>g(s.currentTarget):void 0,sx:{flex:1,minWidth:0,display:"flex",alignItems:"center",gap:.5,px:1,py:.25,borderRadius:1,fontSize:14,cursor:g?"pointer":"default","&:hover":g?{bgcolor:"#f2f2f0"}:void 0,[Hn]:{py:.25}},children:o})]})}import H3 from"@mui/icons-material/StorefrontOutlined";import W3 from"@mui/icons-material/SupportAgentOutlined";import{Suspense as m3,lazy as g3,useEffect as b3,useState as wp}from"react";import{Box as $u,Dialog as y3,DialogContent as x3,DialogTitle as v3,IconButton as _p,Tooltip as w3}from"@mui/material";import _3 from"@mui/icons-material/Close";import k3 from"@mui/icons-material/Search";import{Fragment as B3,jsx as Wn,jsxs as Rl}from"react/jsx-runtime";function S3(e){return Wn($u,{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 T3=g3(()=>import("react-daum-postcode").then(e=>({default:e.default})).catch(()=>({default:S3})));function C3(e){if(e.addressType!=="R")return e.address;let f="";return e.bname!==""&&/[동|로|가]$/g.test(e.bname)&&(f+=e.bname),e.buildingName!==""&&e.apartment==="Y"&&(f+=f!==""?`, ${e.buildingName}`:e.buildingName),f!==""?`${e.address} (${f})`:e.address}function kp({value:e,placeholder:f="\uC8FC\uC18C \uC785\uB825",readOnly:g,onCommit:l}){let[o,s]=wp(e),[r,t]=wp(!1),n=ot().slots?.addressSearch;b3(()=>s(e),[e]);let c=a=>{s(a),t(!1),a!==e&&l(a)};return Rl(B3,{children:[Rl($u,{sx:{display:"flex",alignItems:"center",gap:.5,flex:1,minWidth:0},children:[Wn($u,{component:"input",spellCheck:!1,value:o,readOnly:g,placeholder:f,onChange:a=>s(a.target.value),onBlur:()=>{r||o.trim()!==e&&l(o.trim())},onKeyDown:a=>{a.key==="Enter"&&(a.preventDefault(),!g&&t(!0))},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:14,color:"#37352f",bgcolor:"transparent",p:0,"&::placeholder":{color:"#9a9a97"}}}),g?null:Wn(w3,{title:"\uC8FC\uC18C \uAC80\uC0C9",arrow:!0,children:Wn(_p,{tabIndex:-1,size:"small","aria-label":"\uC8FC\uC18C \uAC80\uC0C9",onClick:()=>t(!0),sx:{color:"#9a9a97",p:.25,flexShrink:0},children:Wn(k3,{sx:{fontSize:17}})})})]}),n?Wn(n,{open:r,onComplete:c,onClose:()=>t(!1)}):Rl(y3,{open:r,onClose:()=>t(!1),maxWidth:"sm",fullWidth:!0,slotProps:{paper:{sx:{height:550}}},children:[Rl(v3,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",pr:2},children:["\uC8FC\uC18C \uAC80\uC0C9",Wn(_p,{"aria-label":"\uC8FC\uC18C \uAC80\uC0C9 \uB2EB\uAE30",onClick:()=>t(!1),size:"small",children:Wn(_3,{})})]}),Wn(x3,{style:{padding:0},dividers:!0,children:r?Wn(m3,{fallback:null,children:Wn(T3,{onComplete:a=>{c(C3(a))},onClose:()=>t(!1),defaultQuery:o,style:{width:"100%",height:"100%"}})}):null})]})]})}import{Fragment as ia,jsx as et,jsxs as xn}from"react/jsx-runtime";function Tp(e){return String(e??"").includes(" ")?bn(e):Cn(e)}function U3(e){let[f="00",g="00"]=String(e??"").split(":");return{hour:/^\d{2}$/.test(f)?f:"00",minute:/^\d{2}$/.test(g)?g:"00"}}function ci({label:e="\uBE44\uC5B4 \uC788\uC74C"}){return et(Al,{component:"span",sx:{color:"#9a9a97"},children:e})}var cr=e=>({gridColumn:`${e}`,[Hn]:{gridColumn:"auto"}});function Dl({values:e,customTabs:f,avatarSrcByName:g,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,coreLocked:d,targetSummary:u="",narrowCollapsedSx:b,reminderLocked:m=!1,managerAction:x,hideProject:k=!1,leading:B,supportOrigin:R,trailing:j,onChangeProject:A,onChangeStartDate:P,onChangeDueDate:N,onChangeReminder:q,onChangePriority:z,onChangeEventTime:T,onChangeEventPlace:S,onChangeEventAddress:D,onMemberEdit:p,onAddProject:y}){let[v,w]=Ni(null),[_,C]=Ni(!1),O=d??h,[F,$]=Ni(null),[K,M]=Ni(null),[H,E]=Ni(null),[I,L]=Ni(null),[U,G]=Ni(null),V=qt(),W=Jn(),X=c&&!s,Z=(te,oe,se=!1)=>[uo(te),...se&&b?Array.isArray(b)?b:[b]:[],...X&&oe?[cr(oe)]:[]],Y=f.find(te=>te.key===e.tabKey),J=f.filter(te=>!te.archived),ee=te=>{let oe=!!String(e.startDate??"").trim();if(P(te),oe||o||s)return;let se=Uc(te);Number.isNaN(se.getTime())||se.getTime()<=Date.now()||$3("\uC2DC\uC791\uC77C\uC2DC\uAC00 \uB418\uBA74 \uCC45\uC784\uC790\uC5D0\uAC8C \uC54C\uB9BC\uC774 \uBC1C\uC1A1\uB429\uB2C8\uB2E4.")},ne=et(vt,{icon:et(L3,{sx:{fontSize:17}}),label:"\uC0AC\uC804\uC54C\uB9BC",onClick:O||m?void 0:te=>M(te),sx:Z(s?8:5,2,!0),children:e.reminders.length===0?et(ci,{label:"\uC5C6\uC74C"}):au(e.reminders)});return xn(ia,{children:[xn(Al,{sx:{display:"grid",gridTemplateColumns:"repeat(2, minmax(0, 1fr))",gridAutoFlow:"row dense",columnGap:3,rowGap:0,px:2,[Hn]:{gridTemplateColumns:"minmax(0, 1fr)"}},children:[B,R?xn(ia,{children:[xn(vt,{icon:et(H3,{sx:{fontSize:17}}),label:"\uAC00\uB9F9\uC810",sx:Z(0,1),children:[R.licenseName||et(ci,{}),R.contactPhone?et(Al,{component:"span",sx:{ml:1,color:"#6f6f6c",fontSize:"0.92em"},children:R.contactPhone}):null,R.contactEmail?et(Al,{component:"span",sx:{ml:1,color:"#6f6f6c",fontSize:"0.92em"},children:R.contactEmail}):null]}),et(vt,{icon:et(W3,{sx:{fontSize:17}}),label:"\uC720\uD615",sx:Z(0,2),children:R.supportType||et(ci,{})})]}):null,k?null:et(vt,{icon:et(R3,{sx:{fontSize:17}}),label:"\uD504\uB85C\uC81D\uD2B8",onClick:O?void 0:te=>w(te),sx:X&&i==="full"?[Z(1,void 0,!0),{gridColumn:"1 / -1"}]:Z(1,i==="full"?1:i,!0),children:Y?(()=>{let te=Et(Y.icon);return xn(ia,{children:[te?et(te,{sx:{fontSize:16,color:"#1e3a8a"}}):null,Y.label]})})():"\uAE30\uBCF8"}),a,o?et(vt,{icon:et(Sp,{sx:{fontSize:17}}),label:"\uB300\uC0C1\uC790",onClick:O?void 0:()=>p("targets"),sx:Z(7,1),children:u||"\uBAA8\uB4E0 \uC9C1\uC6D0"}):null,!o&&!s?et(vt,{icon:et(D3,{sx:{fontSize:17}}),label:"\uCC45\uC784\uC790",onClick:l||O||!e.managerName&&x?void 0:()=>p("manager"),sx:Z(7,1),children:e.managerName?xn(ia,{children:[et(Jr,{names:[e.managerName],size:20,avatarSrcByName:g}),e.managerName]}):x??et(ci,{})}):null,n,s?null:et(vt,{icon:et(O3,{sx:{fontSize:17}}),label:"\uC2DC\uC791\uC77C\uC2DC",onClick:O?void 0:te=>E(te),sx:Z(2,2),children:e.startDate?Tp(e.startDate):et(ci,{})}),o?null:et(vt,{icon:et(Sp,{sx:{fontSize:17}}),label:s?"\uCC38\uC11D\uC790":"\uCC38\uC870\uC790",onClick:O?void 0:()=>p("receivers"),sx:Z(s?7:8,1),children:e.receiverNames.length>0?xn(ia,{children:[et(Jr,{names:e.receiverNames,size:20,avatarSrcByName:g}),e.receiverNames.length===1?e.receiverNames[0]:null]}):et(ci,{})}),r?null:et(vt,{icon:et(A3,{sx:{fontSize:17}}),label:s?"\uB0A0\uC9DC":"\uB9C8\uAC10\uC608\uC815",onClick:O?void 0:te=>L(te),sx:Z(3,2),children:e.dueDate?s?Cn(e.dueDate):Tp(e.dueDate):et(ci,{})}),s?et(vt,{icon:et(N3,{sx:{fontSize:17}}),label:"\uC2DC\uAC01",onClick:O?void 0:te=>G(te),sx:uo(4),children:e.eventTime?e.eventTime:et(ci,{label:"\uC885\uC77C"})}):null,s?et(vt,{icon:et(j3,{sx:{fontSize:17}}),label:"\uC7A5\uC18C",sx:uo(5),children:et(Lo,{value:e.eventPlace??"",placeholder:"\uC7A5\uC18C \uC785\uB825",readOnly:O,onCommit:te=>S?.(te)})}):null,!t&&s?ne:null,s?et(vt,{icon:et(F3,{sx:{fontSize:17}}),label:"\uC8FC\uC18C",sx:[{gridColumn:"1 / -1"},uo(6)],children:et(kp,{value:e.eventAddress??"",placeholder:"\uC8FC\uC18C \uC785\uB825",readOnly:O,onCommit:te=>D?.(te)})}):null,s?null:et(vt,{icon:et(P3,{sx:{fontSize:17}}),label:"\uC911\uC694\uB3C4",onClick:h?void 0:te=>$(te),sx:Z(6,1,!0),children:et(Xr,{priority:e.priority,small:!0})}),!t&&!s?ne:null,j]}),xn(Hu,{transitionDuration:0,anchorEl:v,open:!!v,onClose:()=>w(null),...W,children:[xn(oa,{selected:!e.tabKey,onClick:()=>{A(""),w(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[et(z3,{sx:{fontSize:17,color:"#9a9a97"}}),"\uC5C6\uC74C",e.tabKey?null:et(Ol,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}})]}),J.map(te=>{let oe=Et(te.icon),se=e.tabKey===te.key;return xn(oa,{selected:se,onClick:()=>{A(te.key),w(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[oe?et(oe,{sx:{fontSize:17,color:"#1e3a8a"}}):null,te.label,se?et(Ol,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},te.key)}),y?[et(I3,{},"add-project-divider"),xn(oa,{onClick:()=>C(!0),sx:{fontSize:14,color:"#787774"},children:[et(E3,{children:et(M3,{sx:{fontSize:18,color:"#787774"}})}),"\uD504\uB85C\uC81D\uD2B8 \uCD94\uAC00"]},"add-project")]:null]}),y?et(pl,{open:_,onClose:()=>C(!1),onSubmit:(te,oe,se)=>{(async()=>{let de=await y(te,oe,se);de&&A(de)})(),w(null)}}):null,et(Hu,{transitionDuration:0,anchorEl:F,open:!!F,onClose:()=>$(null),...W,children:["high","medium","low"].map(te=>xn(oa,{selected:e.priority===te,onClick:()=>{z(te),$(null)},sx:{fontSize:14,minWidth:130,gap:1},children:[et(Xr,{priority:te,small:!0}),e.priority===te?et(Ol,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},te))}),et(Hu,{transitionDuration:0,anchorEl:K,open:!!K,onClose:()=>M(null),...W,children:su(s?!!e.eventTime:String(e.dueDate??"").includes(" ")).map(te=>{let oe=te.value==="none"?e.reminders.length===0:e.reminders.includes(te.value);return xn(oa,{selected:oe,onClick:()=>{q(dl(e.reminders,te.value)),te.value==="none"&&M(null)},sx:{fontSize:14,minWidth:150,gap:1},children:[te.label,oe?et(Ol,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},te.value)})}),s?et(q3,{anchorEl:U,open:!!U,onClose:()=>G(null),value:U3(e.eventTime),format:"HH:mm",minuteStep:10,autoApply:!0,centered:V,locale:"ko",onChange:(te,oe)=>{T?.(`${te}:${oe}`),G(null)}}):null,et(Bn,{anchorEl:H,open:!!H,date:e.startDate,reminders:[],hideReminder:!0,showTime:!0,centered:V,onClose:()=>E(null),onDateChange:ee,onReminderChange:()=>{}}),et(Bn,{anchorEl:I,open:!!I,date:e.dueDate,reminders:e.reminders,hideReminder:m||t,showTime:!s,centered:V,onClose:()=>L(null),onDateChange:N,onReminderChange:q})]})}import{useState as V3}from"react";import{Box as K3,Menu as G3,MenuItem as Y3}from"@mui/material";import X3 from"@mui/icons-material/RepeatOutlined";import Z3 from"@mui/icons-material/DevicesOutlined";import J3 from"@mui/icons-material/ScreenSearchDesktopOutlined";import Q3 from"@mui/icons-material/SellOutlined";import e5 from"@mui/icons-material/TaskAltOutlined";import{Fragment as Cp,jsx as Mr,jsxs as Bp}from"react/jsx-runtime";function Wu({label:e="\uBE44\uC5B4 \uC788\uC74C"}){return Mr(K3,{component:"span",sx:{color:"#9a9a97"},children:e})}function Pl({values:e,readOnly:f=!1,showResolution:g=!1,onChangeRepro:l,onChangeDevice:o,onChangeWhere:s,onChangeVersion:r,onChangeResolution:t}){let[n,c]=V3(null),i=n?.field==="repro"?Fc:n?.field==="device"?qc:$c,a=h=>{n?.field==="repro"?l(h):n?.field==="device"?o(h):n?.field==="resolution"&&t?.(h),c(null)};return Bp(Cp,{children:[Bp(Cp,{children:[Mr(vt,{icon:Mr(X3,{sx:{fontSize:17}}),label:"\uC7AC\uD604\uBE48\uB3C4",onClick:f?void 0:h=>c({field:"repro",el:h}),children:Md(e.repro)||Mr(Wu,{label:"\uC120\uD0DD"})}),Mr(vt,{icon:Mr(Z3,{sx:{fontSize:17}}),label:"\uB514\uBC14\uC774\uC2A4",onClick:f?void 0:h=>c({field:"device",el:h}),children:Rd(e.device)||Mr(Wu,{label:"\uC120\uD0DD"})}),Mr(vt,{icon:Mr(J3,{sx:{fontSize:17}}),label:"\uBC1C\uC0DD\uD654\uBA74",children:Mr(Lo,{value:e.where,placeholder:"\uC608: POS > \uC8FC\uBB38\uD604\uD669",readOnly:f,onCommit:s})}),Mr(vt,{icon:Mr(Q3,{sx:{fontSize:17}}),label:"\uBC1C\uC0DD\uBC84\uC804",children:Mr(Lo,{value:e.version,placeholder:"\uC608: 2026-08-06 \uBC30\uD3EC",readOnly:f,onCommit:r})}),g?Mr(vt,{icon:Mr(e5,{sx:{fontSize:17}}),label:"\uC885\uB8CC\uC0AC\uC720",onClick:f?void 0:h=>c({field:"resolution",el:h}),children:Va(e.resolution)||Mr(Wu,{label:"\uC120\uD0DD"})}):null]}),Mr(G3,{open:!!n,anchorEl:n?.el??null,onClose:()=>c(null),transitionDuration:0,children:i.map(h=>Mr(Y3,{onClick:()=>a(h.key),sx:{fontSize:14},children:h.name},h.key))})]})}import{Box as Ip}from"@mui/material";import{jsxs as Ep}from"react/jsx-runtime";var Uu=16;function Mn({icon:e,title:f,titleExtra:g,children:l}){return Ep(Ip,{sx:{px:2,display:"flex",flexDirection:"column",gap:.25},children:[Ep(Ip,{sx:{display:"flex",alignItems:"center",gap:1,fontSize:Uu,fontWeight:500,color:"#37352f"},children:[e,f,g]}),l]})}import{useState as Vu}from"react";import{Box as Ku,Button as t5,Divider as r5,IconButton as Mp,Menu as n5,MenuItem as Gu,Tooltip as o5}from"@mui/material";import i5 from"@mui/icons-material/MoreVert";import{ConfirmDialog as s5}from"@ehfuse/alerts";import{FormDialog as a5}from"@ehfuse/mui-form-dialog";import{ClearTextField as l5}from"@ehfuse/mui-form-controls";import{Fragment as c5,jsx as vn,jsxs as Nl}from"react/jsx-runtime";function Rp(e){return String(e??"").replace(/<[^>]*>/g,"").replace(/&nbsp;/g," ").trim().length>0}function Ll({content:e,templates:f,onApply:g,onSave:l,onRemove:o}){let[s,r]=Vu(null),[t,n]=Vu(!1),[c,i]=Vu(""),a=async h=>{r(null),!(Rp(e)&&!await s5({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?`}))&&g(h.content)};return Nl(c5,{children:[vn(o5,{title:"\uBCF8\uBB38 \uC591\uC2DD",arrow:!0,disableInteractive:!0,children:vn(Mp,{size:"small","aria-label":"\uBCF8\uBB38 \uC591\uC2DD",onClick:h=>r(h.currentTarget),sx:{ml:"auto",color:"#9a9a97"},children:vn(i5,{sx:{fontSize:18}})})}),Nl(n5,{anchorEl:s,open:!!s,onClose:()=>r(null),transitionDuration:0,children:[l?vn(Gu,{disabled:!Rp(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?vn(r5,{sx:{my:.5}}):null,f.length===0?vn(Gu,{disabled:!0,sx:{fontSize:14,minWidth:220},children:"\uC800\uC7A5\uB41C \uC591\uC2DD\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"}):f.map(h=>Nl(Gu,{onClick:()=>{a(h)},sx:{fontSize:14,minWidth:220,gap:1},children:[vn(Ku,{sx:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:h.name}),o?vn(Mp,{size:"small","aria-label":`${h.name} \uC591\uC2DD \uC0AD\uC81C`,onClick:d=>{d.stopPropagation(),o(h.seq)},sx:{color:"#9a9a97"},children:vn(Ir,{sx:{fontSize:16}})}):null]},h.seq))]}),vn(a5,{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:vn(t5,{variant:"contained",disabled:!c.trim(),onClick:()=>{l?.(c.trim(),e),n(!1)},children:"\uC800\uC7A5"})},sections:[{id:"template-name",title:"",showTitle:!1,children:Nl(Ku,{sx:{display:"flex",flexDirection:"column",gap:1},children:[vn(Ku,{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."}),vn(l5,{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 zl,useRef as ui,useState as Op}from"react";import{Box as sa,Button as Yu,IconButton as Xu,Tooltip as Zu,useMediaQuery as u5,useTheme as f5}from"@mui/material";import Ap from"@mui/icons-material/EditOutlined";import d5 from"@mui/icons-material/DoneOutlined";import Dp from"@mui/icons-material/Translate";import h5 from"@mui/icons-material/ContentCopyOutlined";import{EhfuseEditor as p5,ImageResizePlugin as m5,minimalToolbarOptions as g5}from"@ehfuse/editor";import{jsx as Pr,jsxs as jl}from"react/jsx-runtime";function Ju(e){let f=e.trim();return f?f.startsWith("<")?e:`<p>${f}</p>`:"<p></p>"}function aa(e){let f=e.replace(/<br\s*\/?>/gi,`
33
+ \uC18C\uC18D \uC5C5\uBB34\uB294 \uAE30\uBCF8 \uC5C5\uBB34\uD568\uC73C\uB85C \uC774\uB3D9\uD569\uB2C8\uB2E4.`,confirmText:"\uC0AD\uC81C",onCancel:()=>U(null),onConfirm:()=>{L&&B(L.column.key),U(null)}}),nt(cn,{open:!!y,anchorEl:y?.anchorEl??null,nextCompleted:y?.nextCompleted??!1,returnMode:!!D&&!!(w&&Zr(w,p)),onCancel:()=>v(null),onConfirm:xe=>{y&&(xe&&D&&w?D(w,xe):o(y.taskSeq,y.nextCompleted)),v(null)}})]})}import{useCallback as Eo,useMemo as Xs,useRef as Fh,useState as Zs}from"react";import{Box as Cr,Button as lw,ButtonBase as $h,IconButton as qh}from"@mui/material";import cw from"@mui/icons-material/Add";import uw from"@mui/icons-material/ChevronLeft";import fw from"@mui/icons-material/ChevronRight";import dw from"@mui/icons-material/KeyboardArrowDown";import{DatePicker as hw}from"@ehfuse/mui-datetime-picker";import{DndContext as pw,DragOverlay as mw,PointerSensor as gw,pointerWithin as bw,rectIntersection as yw,useDroppable as xw,useSensor as vw,useSensors as ww}from"@dnd-kit/core";import{SortableContext as _w,arrayMove as kw,useSortable as Sw,verticalListSortingStrategy as Tw}from"@dnd-kit/sortable";import{CSS as Cw}from"@dnd-kit/utilities";import Bw from"@ehfuse/overlay-scrollbar";function Qv(e){let[f,g,l]=e.split("-").map(Number),o=new Date(Date.UTC(f,g-1,l+1)),s=r=>String(r).padStart(2,"0");return`${o.getUTCFullYear()}-${s(o.getUTCMonth()+1)}-${s(o.getUTCDate())}`}function ns(e){let f=new Map;for(let g of e){let l=g.start_date;for(let o=0;o<62&&l<=g.end_date;o+=1){let s=f.get(l);s?s.push(g):f.set(l,[g]),l=Qv(l)}}for(let g of f.values())g.sort((l,o)=>(l.time||"99:99").localeCompare(o.time||"99:99")||l.title.localeCompare(o.title));return f}function os(e){let f=String((e.is_event?e.event_time:e.due_date.slice(11,16)||e.estimated_time)??"").trim();return/^\d{1,2}:\d{2}$/.test(f)?f:""}function is(e,f){if(e.completed!==f.completed)return e.completed?1:-1;let g=os(e),l=os(f);if(!!g!=!!l)return g?-1:1;if(g&&l&&g!==l)return g<l?-1:1;let o=e.sort_no>0,s=f.sort_no>0;return o&&s?e.sort_no-f.sort_no:o!==s?o?-1:1:e.seq-f.seq}import{Box as ku,Tooltip as ew}from"@mui/material";import{jsx as Su,jsxs as tw}from"react/jsx-runtime";function ss({event:e,small:f=!1}){let g=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 Su(ew,{title:`(${l}) ${g}`,arrow:!0,enterDelay:300,children:tw(ku,{onClick:o,onPointerDown:s=>s.stopPropagation(),sx:{display:"flex",alignItems:"center",gap:.5,px:1,py:f?.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:[Su(ku,{component:"span",sx:{width:6,height:6,borderRadius:"50%",bgcolor:"#0f9d58",flexShrink:0}}),Su(ku,{component:"span",sx:{minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},children:g})]})})}import{useCallback as ow}from"react";import{Box as ii,Checkbox as iw}from"@mui/material";import{useLayoutEffect as rw,useState as zh}from"react";var Cu=new WeakMap,Tu=null;function nw(){return typeof ResizeObserver>"u"?null:(Tu||(Tu=new ResizeObserver(e=>{for(let f of e){let g=Cu.get(f.target);if(!g)continue;let l=f.borderBoxSize?.[0]?.inlineSize??f.target.getBoundingClientRect().width;g(l)}})),Tu)}function jh(){let[e,f]=zh(null),[g,l]=zh(0);return rw(()=>{if(!e)return;l(e.getBoundingClientRect().width);let o=nw();if(o)return Cu.set(e,s=>l(r=>Math.abs(r-s)<1?r:s)),o.observe(e),()=>{o.unobserve(e),Cu.delete(e)}},[e]),{ref:f,width:g}}import{jsx as Io,jsxs as Bu}from"react/jsx-runtime";var Iu={high:"#e5484d",medium:"#2f80ed",low:"#d9a514"},as=15,sw=150,aw=3;function si({task:e,statusOptions:f,onOpenDetail:g,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:d=!1,onRequestToggleCompleted:u,showTime:b=!0,wrapTitle:m=!1}){let x=lt(),k=x.mode==="dark",[B]=Ki(e,f),R=String(e.manager_name??"").trim(),j=b?os(e):"",A=Yi(e,ot().resolveTask),P=!e.completed&&!e.is_event&&!e.due_date.slice(0,10),N=e.is_notice||e.is_event?Et(e.icon||(e.is_notice?pr:yr)):null,q=!e.completed&&!e.is_event&&!!e.due_date&&e.due_date.slice(0,10)<Nd(),{ref:z,width:T}=jh(),S=T>0&&T<sw,D=S||m,p=ow(v=>{z(v),i?.(v)},[z,i]),y=n&&!r&&!S&&!!R;return Bu(ii,{ref:p,...a??{},onClick:v=>{v.stopPropagation(),g(e)},onContextMenu:l?v=>l(e,v):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?Vi(B.dot,x.chip.darkBgAlpha):B.bg:k?x.card.bg:x.colors.surfaceHover,color:B?k?x.chip.darkTextSource==="fg"?B.fg:B.dot:B.fg:x.colors.textPrimary,fontSize:as,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 ${x.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 ${x.colors.danger}`,pl:.75}:r?{borderLeft:"3px solid #2f80ed",pl:.75}:{}},children:[Io(ii,{component:"span",sx:{width:6,height:6,borderRadius:"50%",flexShrink:0,...D?{mt:"7px"}:{},bgcolor:Iu[e.priority]??x.colors.accentOnSurface}}),d&&!S&&u?Io(iw,{size:"small",checked:e.completed,onPointerDown:v=>v.stopPropagation(),onClick:v=>v.stopPropagation(),onChange:(v,w)=>u({anchorEl:v.currentTarget,taskSeq:e.seq,nextCompleted:w}),sx:{p:0,flexShrink:0}}):null,N&&!S?Io(N,{sx:{fontSize:15,flexShrink:0,opacity:.75,...D?{mt:"3px"}:{}}}):null,Bu(ii,{sx:{minWidth:0,overflow:"hidden",display:"flex",flexDirection:"column",color:k?x.colors.textStrong:x.colors.textPrimary,...P&&!k?{color:x.colors.textSecondary}:{}},children:[S&&j?Io(ii,{component:"span",sx:{lineHeight:1.35,fontSize:as-1,color:e.completed?x.colors.textPrimary:x.colors.danger},children:j}):null,Bu(ii,{component:"span",sx:{minWidth:0,overflow:"hidden",...D?{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:aw,whiteSpace:"normal",overflowWrap:"anywhere",lineHeight:1.35}:{textOverflow:"ellipsis",whiteSpace:"nowrap"}},children:[!S&&j?Io(ii,{component:"span",sx:{mr:.5,fontSize:as-1,color:e.completed?x.colors.textPrimary:x.colors.danger},children:j}):null,e.title,!S&&A?Io(ii,{component:"span",sx:{ml:.5,fontSize:as-2,color:x.colors.textMuted,fontVariantNumeric:"tabular-nums"},children:A}):null,!S&&(e.comment_count??e.comments?.length??0)>0?Io(ri,{sx:{fontSize:15,ml:.5,verticalAlign:"-2px",color:x.colors.textMuted}}):null]})]}),h??null,!h&&y?Io(ii,{component:"span",onClick:c?v=>{v.stopPropagation(),c(e)}:void 0,sx:{display:"inline-flex",flexShrink:0,ml:"auto",pl:.5},children:Io(Tn,{src:t?.get(R)??"",name:R,avatarSx:{width:22,height:22,fontSize:11},iconFontSize:14})}):null]})}import{jsx as zt,jsxs as Mo}from"react/jsx-runtime";var Hh=36,Iw=["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"],wl="day-";function Eu(e){let f=new Date(e);return f.setHours(0,0,0,0),f.setDate(f.getDate()-f.getDay()),f}function vl(e,f){let g=new Date(e);return g.setDate(g.getDate()+f),g}function Ew(e){let f=e[0],g=e[e.length-1];return f.getMonth()===g.getMonth()?`${f.getFullYear()}\uB144 ${f.getMonth()+1}\uC6D4`:f.getFullYear()===g.getFullYear()?`${f.getFullYear()}\uB144 ${f.getMonth()+1}\uC6D4 - ${g.getMonth()+1}\uC6D4`:`${f.getFullYear()}\uB144 ${f.getMonth()+1}\uC6D4 - ${g.getFullYear()}\uB144 ${g.getMonth()+1}\uC6D4`}function Mw(e){return e.getDate()===1?`${e.getMonth()+1}\uC6D4 1\uC77C`:String(e.getDate())}function Rw({task:e,statusOptions:f,isMine:g,avatarSrcByName:l,onCardClick:o,onCardContextMenu:s,onRequestArchiveToggle:r,dragDisabled:t=!1}){let{attributes:n,listeners:c,setNodeRef:i,transform:a,transition:h,isDragging:d}=Sw({id:String(e.seq),disabled:t});return zt(si,{task:e,statusOptions:f,isMine:g,avatarSrcByName:l,showManagerAvatar:!0,wrapTitle:!0,onOpenDetail:u=>o?.(u),onContextMenu:s,showCheckbox:!0,onRequestToggleCompleted:r,isDragging:d,setNodeRef:i,dragProps:t?void 0:{...n,...c,style:{transform:Cw.Translate.toString(a),transition:h}}})}function Ow({dayKey:e,isToday:f,dayLabel:g,holidayName:l,tasks:o,googleEvents:s,statusOptions:r,onRequestArchiveToggle:t,onRequestReply:n,onAddSchedule:c,canAdd:i,onCardClick:a,onCardContextMenu:h,summary:d,myAccountSeq:u,avatarSrcByName:b,dragDisabled:m=!1}){let x=lt(),{setNodeRef:k}=xw({id:`${wl}${e}`,disabled:m});return Mo(Cr,{ref:k,sx:{minWidth:0,minHeight:0,height:"100%",display:"flex",flexDirection:"column",bgcolor:f?x.calendar.todayBg:x.calendar.cellBg},children:[Mo(Cr,{sx:{display:"flex",justifyContent:"flex-end",alignItems:"center",gap:.5,px:1,height:Hh,bgcolor:f?x.calendar.todayBg:x.calendar.dateBandBg,borderBottom:`1px solid ${x.calendar.borderColor}`,flexShrink:0},children:[l?zt(Cr,{component:"span",sx:{mr:"auto",fontSize:11.5,fontWeight:600,color:x.colors.danger,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:l}):null,f?zt(Cr,{component:"span",sx:{mr:.75,px:.6,py:.1,borderRadius:.5,fontSize:11,fontWeight:600,bgcolor:x.colors.danger,color:x.calendar.cellBg,lineHeight:1.6},children:"\uC624\uB298"}):null,zt(Cr,{component:"span",sx:{fontSize:13.5,fontWeight:f?700:400,color:l?x.colors.danger:x.mode==="dark"?x.colors.textStrong:x.colors.textPrimary,flexShrink:0},children:g})]}),d?zt(Cr,{sx:{px:1,py:1,borderBottom:`1px solid ${x.calendar.borderColor}`,flexShrink:0},children:d}):null,zt(Cr,{sx:{flex:1,minHeight:0,bgcolor:f?x.calendar.todayBg:x.colors.surfaceSubtle},children:zt(Bw,{style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:Mo(Cr,{sx:{display:"flex",flexDirection:"column",flexGrow:1},children:[s.length>0?zt(Cr,{sx:{display:"flex",flexDirection:"column",gap:.5,px:1,pt:.75,pb:.25},children:s.map(B=>zt(ss,{event:B},B.uid))}):null,zt(_w,{items:o.map(B=>String(B.seq)),strategy:Tw,children:zt(Cr,{sx:{display:"flex",flexDirection:"column",gap:.5,px:1,pt:o.length>0?.75:0},children:o.map(B=>zt(Rw,{task:B,statusOptions:r,isMine:u>0&&Number(B.manager_account_seq??0)===u,avatarSrcByName:b,onCardClick:a,onCardContextMenu:h,onRequestArchiveToggle:t,dragDisabled:m},B.seq))})}),zt(Cr,{sx:{flexGrow:1,minHeight:56,display:"flex",flexDirection:"column",pb:1,...i?{"&:hover .taskbox-add-schedule":{opacity:1,pointerEvents:"auto"}}:{}},children:Mo($h,{className:"taskbox-add-schedule",onClick:()=>c(e),sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:.5,px:1.25,py:1.75,borderBottom:`1px dashed ${x.calendar.borderColor}`,bgcolor:x.calendar.cellBg,color:x.colors.accentOnSurface,fontSize:13,fontWeight:500,opacity:0,pointerEvents:"none",transition:"opacity 0.15s","&:hover":{bgcolor:x.calendar.hoverBg}},children:[zt(cw,{sx:{fontSize:16}}),"\uC5C5\uBB34 \uB4F1\uB85D"]})})]})})})]})}function Wh({tasks:e,googleEvents:f=[],statusOptions:g,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:d,onTaskContextMenu:u,hideCompleted:b=!1,renderColumnSummary:m}){let x=lt(),[k,B]=Zs(()=>Eu(new Date)),[R,j]=Zs(null),{onReturnTask:A}=ot(),P=R?e.find(X=>X.seq===R.taskSeq):void 0,[N,q]=Zs(null),[z,T]=Zs(null),[S,D]=Zs(null),p=Fh(!1),y=Xs(()=>Array.from({length:7},(X,Z)=>vl(k,Z)),[k]),v=Xs(()=>new Map(e.map(X=>[X.seq,X])),[e]),w=Xs(()=>[...new Set(y.map(X=>X.getFullYear()))],[y]),_=to(w),C=ww(vw(gw,{activationConstraint:{distance:5}})),O=Eo(X=>{let Z=bw(X),Y=Z.length>0?Z:yw(X),J=Y.filter(ee=>!String(ee.id).startsWith(wl));return J.length>0?J:Y},[]),F=Xs(()=>ns(f),[f]),$=Xs(()=>{let X=new Map;for(let Z of e){let Y=Z.due_date.slice(0,10)||(l?Z.start_date.slice(0,10)||String(Z.created_time??"").slice(0,10):"");if(!Y)continue;let J=X.get(Y);J?J.push(Z):X.set(Y,[Z])}for(let Z of X.values())Z.sort(is);return X},[e,l]),K=Eo(X=>z?(z.get(X)??[]).map(Z=>v.get(Z)).filter(Z=>!!Z):$.get(X)??[],[z,v,$]),M=Eo(X=>{let Z=K(X);return b?Z.filter(Y=>!Y.completed):Z},[K,b]),H=Eo(X=>{D(Number(X.active.id)),T(new Map(y.map(Z=>{let Y=mr(Z);return[Y,($.get(Y)??[]).map(J=>J.seq)]})))},[y,$]),E=Eo((X,Z)=>{if(X.startsWith(wl))return{day:X.slice(wl.length),overSeq:null};let Y=Number(X);for(let[J,ee]of Z)if(ee.includes(Y))return{day:J,overSeq:Y};return null},[]),I=Eo(X=>{let{active:Z,over:Y}=X;Y&&T(J=>{if(!J)return J;let ee=Number(Z.id),ne=E(String(Y.id),J);if(!ne)return J;let te=[...J.entries()].find(([,ge])=>ge.includes(ee))?.[0];if(!te||te===ne.day)return J;let oe=new Map(J);oe.set(te,(oe.get(te)??[]).filter(ge=>ge!==ee));let se=[...oe.get(ne.day)??[]],de=se.length;if(ne.overSeq!==null){let ge=se.indexOf(ne.overSeq);ge!==-1&&(de=ge)}return se.splice(de,0,ee),oe.set(ne.day,se),oe})},[E]),L=Eo(X=>{let{active:Z,over:Y}=X,J=z;if(T(null),D(null),p.current=!0,!J||!Y)return;let ee=Number(Z.id),ne=[...J.entries()].find(([,ge])=>ge.includes(ee));if(!ne)return;let[te,oe]=ne,se=[...oe],de=E(String(Y.id),J);if(de&&de.day===te&&de.overSeq!==null&&de.overSeq!==ee){let ge=se.indexOf(ee),ke=se.indexOf(de.overSeq);ge!==-1&&ke!==-1&&(se=kw(se,ge,ke))}n(ee,te,se)},[z,n,E]),U=Eo(()=>{T(null),D(null),p.current=!0},[]),G=Eo(X=>{if(p.current){p.current=!1;return}d(X)},[d]),V=S!==null?v.get(S)??null:null,W=Fh(null);return Mo(Cr,{onTouchStart:X=>{let Z=X.touches[0];W.current=Z?{x:Z.clientX,y:Z.clientY}:null},onTouchEnd:X=>{let Z=W.current;W.current=null;let Y=X.changedTouches[0];if(!Z||!Y||S!==null)return;let J=Y.clientX-Z.x,ee=Y.clientY-Z.y;Math.abs(J)<60||Math.abs(J)<=Math.abs(ee)||B(vl(k,J<0?7:-7))},sx:{display:"flex",flexDirection:"column",flex:1,minHeight:0,border:`1px solid ${x.calendar.borderColor}`,borderRadius:"0 0 4px 4px",overflow:"hidden"},children:[Mo(Cr,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1,bgcolor:x.calendar.bg,borderBottom:`1px solid ${x.calendar.borderColor}`,flexShrink:0},children:[Mo(Cr,{sx:{display:"flex",alignItems:"center",gap:.25},children:[zt(qh,{size:"small","aria-label":"\uC774\uC804 \uC8FC",onClick:()=>B(vl(k,-7)),children:zt(uw,{sx:{fontSize:24,color:x.colors.textSecondary}})}),zt(lw,{size:"small",color:"inherit",onClick:()=>B(Eu(new Date)),sx:{minWidth:0,px:1,mx:1,fontSize:15.5,fontWeight:x.mode==="dark"?400:500,color:x.mode==="dark"?x.colors.textStrong:x.colors.textPrimary},children:"\uC624\uB298"}),zt(qh,{size:"small","aria-label":"\uB2E4\uC74C \uC8FC",onClick:()=>B(vl(k,7)),children:zt(fw,{sx:{fontSize:24,color:x.colors.textSecondary}})})]}),Mo($h,{onClick:X=>q(X.currentTarget),sx:{ml:{xs:"auto",lg:0},display:"inline-flex",alignItems:"center",gap:.25,px:.75,py:.25,borderRadius:1,fontSize:15,fontWeight:x.mode==="dark"?400:700,color:x.mode==="dark"?x.colors.textStrong:x.colors.textPrimary,"&:hover":{bgcolor:x.colors.surfaceHover}},children:[Ew(y),zt(dw,{sx:{fontSize:18,color:x.colors.textMuted}})]})]}),zt(Cr,{sx:{display:"grid",gridTemplateColumns:"repeat(7, minmax(0, 1fr))",bgcolor:x.calendar.headerBg,borderBottom:`1px solid ${x.calendar.borderColor}`,flexShrink:0,"& > *":{borderRight:`1px solid ${x.calendar.borderColor}`},"& > *:last-child":{borderRight:"none"}},children:y.map(X=>{let Z=X.getDay(),Y=_.has(mr(X));return zt(Cr,{sx:{height:Hh,display:"flex",alignItems:"center",justifyContent:"center",fontSize:12.5,color:Z===0||Y?x.colors.danger:Z===6?x.colors.accentOnSurface:x.colors.textSecondary},children:Iw[Z]},mr(X))})}),zt(Cr,{sx:{flex:1,minHeight:0},children:Mo(pw,{sensors:C,collisionDetection:O,onDragStart:H,onDragOver:I,onDragEnd:L,onDragCancel:U,children:[zt(Cr,{sx:{display:"grid",gridTemplateColumns:"repeat(7, minmax(0, 1fr))",height:"100%",minHeight:0,"& > *":{borderRight:`1px solid ${x.calendar.borderColor}`},"& > *:last-child":{borderRight:"none"}},children:y.map(X=>{let Z=mr(X);return zt(Ow,{dayKey:Z,isToday:Z===r,dayLabel:Mw(X),holidayName:_.get(Z)??"",summary:m?.(Z,K(Z)),tasks:M(Z),googleEvents:F.get(Z)??[],statusOptions:g,onRequestArchiveToggle:j,onRequestReply:c,onAddSchedule:i,canAdd:a,onCardClick:G,onCardContextMenu:u,myAccountSeq:o,avatarSrcByName:s,dragDisabled:h},Z)})}),zt(mw,{children:V?zt(Cr,{sx:{boxShadow:"0 8px 20px rgba(0,0,0,0.18)",borderRadius:.75,cursor:"grabbing"},children:zt(si,{task:V,statusOptions:g,onOpenDetail:()=>{},isMine:o>0&&Number(V.manager_account_seq??0)===o})}):null})]})}),zt(hw,{anchorEl:N,open:!!N,onClose:()=>q(null),selectedDate:k,onDateChange:X=>{B(Eu(X)),q(null)}}),zt(cn,{open:!!R,anchorEl:R?.anchorEl??null,nextCompleted:R?.nextCompleted??!1,returnMode:!!A&&!!(P&&Zr(P,o)),onCancel:()=>j(null),onConfirm:X=>{R&&(X&&A&&P?A(P,X):t(R.taskSeq,R.nextCompleted)),j(null)}})]})}import{useCallback as Js,useMemo as Ri,useRef as Aw,useState as Qs}from"react";import{Box as Qr,Button as Dw,ButtonBase as Vh,IconButton as Uh,Tooltip as Pw}from"@mui/material";import Nw from"@mui/icons-material/Add";import Lw from"@mui/icons-material/ChevronLeft";import zw from"@mui/icons-material/ChevronRight";import jw from"@mui/icons-material/KeyboardArrowDown";import{DatePicker as Fw}from"@ehfuse/mui-datetime-picker";import{DndContext as qw,DragOverlay as $w,PointerSensor as Hw,pointerWithin as Ww,rectIntersection as Uw,useDraggable as Vw,useDroppable as Kh,useSensor as Kw,useSensors as Gw}from"@dnd-kit/core";import Yw from"@ehfuse/overlay-scrollbar";import{jsx as Xt,jsxs as Ro}from"react/jsx-runtime";var Xw=["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"],_l="mday-",kl="mchip-",Gh=36;function Zw(e){let f=new Date(e);return f.setHours(0,0,0,0),f.setDate(f.getDate()-f.getDay()),f}function Sl(e){let f=new Date(e);return f.setHours(0,0,0,0),f.setDate(1),f}function Jw(e,f){let g=new Date(e);return g.setDate(g.getDate()+f),g}function Mu(e,f){let g=Sl(e);return g.setMonth(g.getMonth()+f),g}function Qw({task:e,statusOptions:f,isPreview:g=!1,isMine:l=!1,avatarSrcByName:o,onOpenDetail:s,onContextMenu:r,onRequestToggleCompleted:t,dragDisabled:n=!1}){let{attributes:c,listeners:i,setNodeRef:a,isDragging:h}=Vw({id:String(e.seq),disabled:g||n}),{setNodeRef:d}=Kh({id:`${kl}${e.seq}`,disabled:g||n});return Xt(Pw,{title:e.title,arrow:!0,enterDelay:400,children:Xt(si,{task:e,statusOptions:f,onOpenDetail:s,onContextMenu:r,showCheckbox:!!t,onRequestToggleCompleted:t,isPreview:g,isDragging:h,isMine:l,avatarSrcByName:o,showManagerAvatar:!0,wrapTitle:!0,setNodeRef:u=>{a(u),d(u)},dragProps:n?void 0:{...c,...i}})})}function e_({dayKey:e,dayNumber:f,isToday:g,isOtherMonth:l,weekday:o,holidayName:s,tasks:r,googleEvents:t,statusOptions:n,previewSeq:c,myAccountSeq:i,avatarSrcByName:a,onRequestToggleCompleted:h,onOpenDetail:d,onTaskContextMenu:u,onAddSchedule:b,canAdd:m,dragDisabled:x=!1}){let k=lt(),B=k.mode==="dark",{setNodeRef:R,isOver:j}=Kh({id:`${_l}${e}`,disabled:x}),A=r,P=!!s||o===0;return Ro(Qr,{ref:R,sx:{minWidth:0,minHeight:0,display:"flex",flexDirection:"column",gap:.5,p:.5,bgcolor:j?k.colors.accentSoft:g?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:[Ro(Qr,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:.5,height:Gh,flexShrink:0,mx:-.5,mt:-.5,px:1,bgcolor:g?k.calendar.todayBg:k.calendar.dateBandBg,borderBottom:`1px solid ${k.calendar.borderColor}`},children:[s?Xt(Qr,{component:"span",sx:{mr:.25,minWidth:0,fontSize:11,fontWeight:600,color:k.colors.danger,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:s}):null,g?Xt(Qr,{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,Xt(Qr,{component:"span",sx:{fontSize:13.5,fontWeight:g?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:f})]}),t.map(N=>Xt(ss,{event:N,small:!0},N.uid)),A.map(N=>Xt(Qw,{task:N,statusOptions:n,isPreview:N.seq===c,isMine:i>0&&Number(N.manager_account_seq??0)===i,avatarSrcByName:a,onRequestToggleCompleted:h,onOpenDetail:d,onContextMenu:u,dragDisabled:x},N.seq)),Xt(Qr,{sx:{flexGrow:1,minHeight:0,display:"flex",alignItems:"flex-start"},children:Ro(Vh,{className:"taskbox-month-add",onClick:()=>b(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:[Xt(Nw,{sx:{fontSize:16}}),"\uC5C5\uBB34 \uB4F1\uB85D"]})})]})}function Yh({tasks:e,googleEvents:f=[],statusOptions:g,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:d}){let u=lt(),b=u.mode==="dark",[m,x]=Qs(()=>Sl(new Date)),[k,B]=Qs(null),[R,j]=Qs(null),[A,P]=Qs(null),[N,q]=Qs(null),z=Ri(()=>{let L=Zw(m);return Array.from({length:42},(U,G)=>Jw(L,G))},[m]),T=Ri(()=>new Map(e.map(L=>[L.seq,L])),[e]),S=Ri(()=>ns(f),[f]),D=Ri(()=>[...new Set(z.map(L=>L.getFullYear()))],[z]),p=to(D),y=Ri(()=>{let L=new Map;for(let U of e){let G=U.due_date.slice(0,10)||(l?U.start_date.slice(0,10)||String(U.created_time??"").slice(0,10):"");if(!G)continue;let V=L.get(G);V?V.push(U):L.set(G,[U])}for(let U of L.values())U.sort(is);return L},[e,l]),v=Gw(Kw(Hw,{activationConstraint:{distance:5}})),w=Js(L=>{let U=Ww(L),G=U.length>0?U:Uw(L),V=G.filter(W=>String(W.id).startsWith(kl));return V.length>0?V:G.filter(W=>String(W.id).startsWith(_l))},[]),_=Js(L=>{P(Number(L.active.id))},[]),C=Js(L=>{q(L.over?String(L.over.id):null)},[]),O=Ri(()=>{let L=new Map;for(let[U,G]of y)for(let V of G)L.set(V.seq,U);return L},[y]),F=A!==null?T.get(A)?.due_date.slice(0,10)??"":"",$=Ri(()=>{if(A===null||!N)return null;if(N.startsWith(kl)){let L=Number(N.slice(kl.length)),U=O.get(L);if(!U)return null;let G=(y.get(U)??[]).filter(W=>W.seq!==A),V=G.findIndex(W=>W.seq===L);return{day:U,index:V===-1?G.length:V}}if(N.startsWith(_l)){let L=N.slice(_l.length),U=(y.get(L)??[]).filter(G=>G.seq!==A);return{day:L,index:U.length}}return null},[A,O,N,y]),K=Js(L=>{let U=y.get(L)??[];if(A===null||!$)return U;let G=T.get(A);if(!G)return U;let V=U.filter(W=>W.seq!==A);return L===$.day?[...V.slice(0,$.index),G,...V.slice($.index)]:L===F?V:U},[A,F,$,T,y]),M=Js(L=>{let U=A,G=$;if(P(null),q(null),U===null||!G)return;let V=(y.get(G.day)??[]).filter(X=>X.seq!==U),W=[...V.slice(0,G.index).map(X=>X.seq),U,...V.slice(G.index).map(X=>X.seq)];n(U,G.day,W)},[A,$,n,y]),H=A!==null?T.get(A)??null:null,E=`${m.getFullYear()}\uB144 ${m.getMonth()+1}\uC6D4`,I=Aw(null);return Ro(Qr,{onTouchStart:L=>{let U=L.touches[0];I.current=U?{x:U.clientX,y:U.clientY}:null},onTouchEnd:L=>{let U=I.current;I.current=null;let G=L.changedTouches[0];if(!U||!G||A!==null)return;let V=G.clientX-U.x,W=G.clientY-U.y;Math.abs(V)<60||Math.abs(V)<=Math.abs(W)||x(Mu(m,V<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:[Ro(Qr,{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:[Ro(Qr,{sx:{display:"flex",alignItems:"center",gap:.25},children:[Xt(Uh,{size:"small","aria-label":"\uC774\uC804 \uB2EC",onClick:()=>x(Mu(m,-1)),children:Xt(Lw,{sx:{fontSize:24,color:u.colors.textSecondary}})}),Xt(Dw,{size:"small",color:"inherit",onClick:()=>x(Sl(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"}),Xt(Uh,{size:"small","aria-label":"\uB2E4\uC74C \uB2EC",onClick:()=>x(Mu(m,1)),children:Xt(zw,{sx:{fontSize:24,color:u.colors.textSecondary}})})]}),Ro(Vh,{onClick:L=>B(L.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:[E,Xt(jw,{sx:{fontSize:18,color:u.colors.textMuted}})]})]}),Xt(Qr,{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:Xw.map((L,U)=>Xt(Qr,{sx:{height:Gh,display:"flex",alignItems:"center",justifyContent:"center",fontSize:12.5,color:U===0?u.colors.danger:U===6?u.colors.accentOnSurface:u.colors.textSecondary},children:L},L))}),Xt(Qr,{sx:{flex:1,minHeight:0},children:Ro(qw,{sensors:v,collisionDetection:w,onDragStart:_,onDragOver:C,onDragEnd:M,onDragCancel:()=>{P(null),q(null)},children:[Xt(Yw,{style:{height:"100%"},thumb:{width:8},children:Xt(Qr,{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:z.map(L=>{let U=mr(L);return Xt(e_,{dayKey:U,dayNumber:L.getDate(),isToday:U===t,isOtherMonth:L.getMonth()!==m.getMonth(),weekday:L.getDay(),holidayName:p.get(U)??"",tasks:K(U),googleEvents:S.get(U)??[],statusOptions:g,previewSeq:$?.day===U?A:null,myAccountSeq:o,avatarSrcByName:s,onRequestToggleCompleted:r?j:void 0,onOpenDetail:h,onTaskContextMenu:d,onAddSchedule:c,canAdd:i,dragDisabled:a},U)})})}),Xt($w,{children:H?Ro(Qr,{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:as,fontWeight:500,color:u.colors.textPrimary,cursor:"grabbing",whiteSpace:"nowrap"},children:[Xt(Qr,{component:"span",sx:{width:6,height:6,borderRadius:"50%",bgcolor:Iu[H.priority]}}),H.title]}):null})]})}),Xt(At,{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:()=>j(null),onConfirm:()=>{R&&r?.(R.taskSeq,R.nextCompleted),j(null)}}),Xt(Fw,{anchorEl:k,open:!!k,onClose:()=>B(null),selectedDate:m,onDateChange:L=>{x(Sl(L)),B(null)}})]})}import{useEffect as n_,useMemo as ea,useRef as Ou,useState as Au}from"react";import{Box as Fr,Button as o_,IconButton as Zh,useMediaQuery as i_}from"@mui/material";import s_ from"@mui/icons-material/ChevronLeft";import a_ from"@mui/icons-material/ChevronRight";import l_ from"@mui/icons-material/KeyboardArrowDown";import{DatePicker as c_}from"@ehfuse/mui-datetime-picker";import{Box as Oo,Button as t_,Dialog as r_}from"@mui/material";import{jsx as Ao,jsxs as Ru}from"react/jsx-runtime";function Xh({task:e,avatarSrcByName:f,onClose:g}){let l=lt(),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 Ao(r_,{open:!!e,onClose:g,maxWidth:"xs",fullWidth:!0,slotProps:{paper:{sx:{borderRadius:2,m:2}}},children:e?Ru(Oo,{sx:{p:2,display:"flex",flexDirection:"column",gap:1.5,bgcolor:l.colors.surface},children:[Ao(Oo,{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 Ru(Oo,{sx:{display:"flex",alignItems:"flex-start",gap:1.5},children:[Ao(Oo,{sx:{width:56,flexShrink:0,fontSize:13.5,color:l.colors.textSecondary,pt:.5},children:s.label}),Ao(Oo,{sx:{display:"flex",flexWrap:"wrap",gap:1,minWidth:0},children:r.length===0?Ao(Oo,{sx:{fontSize:14,color:l.colors.textMuted,pt:.5},children:"\uBE44\uC5B4 \uC788\uC74C"}):r.map(t=>Ru(Oo,{sx:{display:"flex",alignItems:"center",gap:.75},children:[Ao(Tn,{src:f?.get(t)??"",name:t,avatarSx:{width:26,height:26,fontSize:12},iconFontSize:16}),Ao(Oo,{sx:{fontSize:14.5,color:l.colors.textPrimary},children:t})]},`${s.label}-${t}`))})]},s.label)}),Ao(Oo,{sx:{display:"flex",justifyContent:"flex-end",pt:.5},children:Ao(t_,{size:"small",color:"inherit",onClick:g,children:"\uB2EB\uAE30"})})]}):null})}import{jsx as Er,jsxs as lo}from"react/jsx-runtime";var u_=["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"];function Jh(e){let f=e?.parentElement??null;for(;f;){let g=window.getComputedStyle(f);if(/(auto|scroll)/.test(g.overflowY)&&f.scrollHeight>f.clientHeight)return f;f=f.parentElement}return null}var f_="(min-width:600px)";function Du(e){let f=new Date(e);return f.setHours(0,0,0,0),f.setDate(1),f}function Qh(e){let f=g=>String(g).padStart(2,"0");return`${e.getFullYear()}-${f(e.getMonth()+1)}-${f(e.getDate())}`}function ep({tasks:e,googleEvents:f=[],statusOptions:g,todayStr:l,onOpenDetail:o,onAddSchedule:s,myAccountSeq:r=0,avatarSrcByName:t,fallbackToStartDate:n=!1}){let c=lt(),i=i_(f_),[a,h]=Au(()=>Du(new Date)),[d,u]=Au(!1),b=ea(()=>{let S=new Date(a.getFullYear(),a.getMonth()+1,0).getDate();return Array.from({length:S},(D,p)=>{let y=new Date(a.getFullYear(),a.getMonth(),p+1);return{ymd:Qh(y),dayNumber:p+1,weekday:y.getDay()}})},[a]),m=ea(()=>{let S=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=S.get(p);y?y.push(D):S.set(p,[D])}for(let D of S.values())D.sort(is);return S},[e,n]),x=ea(()=>n?e.filter(S=>!S.due_date.slice(0,10)&&!S.start_date.slice(0,10)&&!String(S.created_time??"").slice(0,10)).sort((S,D)=>S.completed!==D.completed?S.completed?1:-1:S.seq-D.seq):[],[e,n]),[k,B]=Au(null),R=ea(()=>ns(f),[f]),j=ea(()=>[a.getFullYear()],[a]),A=to(j),P=Ou(null),N=l.slice(0,7)===Qh(a).slice(0,7);n_(()=>{if(!N)return;let S=()=>{let y=P.current,v=Jh(y);if(!v||!y)return;let w=y.getBoundingClientRect().top-v.getBoundingClientRect().top+v.scrollTop;v.scrollTop=Math.max(0,w-v.clientHeight/2+y.clientHeight/2)},D=setTimeout(S,100),p=setTimeout(S,400);return()=>{clearTimeout(D),clearTimeout(p)}},[N,a]);let q=Ou(null),z=Ou(null),T=S=>{h(p=>new Date(p.getFullYear(),p.getMonth()+S,1));let D=Jh(q.current);D&&D.scrollTo({top:0,behavior:"auto"})};return lo(Fr,{ref:q,onTouchStart:S=>{let D=S.touches[0];z.current=D?{x:D.clientX,y:D.clientY}:null},onTouchEnd:S=>{let D=z.current;z.current=null;let p=S.changedTouches[0];if(!D||!p)return;let y=p.clientX-D.x,v=p.clientY-D.y;Math.abs(y)<60||Math.abs(y)<=Math.abs(v)||T(y<0?1:-1)},sx:{minWidth:0,maxWidth:"100%",overflow:"hidden",bgcolor:c.colors.surface},children:[lo(Fr,{sx:{display:"flex",alignItems:"center",gap:.5,px:1.5,py:1,flexShrink:0},children:[Er(Zh,{size:"small","aria-label":"\uC774\uC804 \uB2EC",onClick:()=>T(-1),children:Er(s_,{sx:{fontSize:24,color:c.colors.textSecondary}})}),Er(o_,{size:"small",color:"inherit",onClick:()=>h(Du(new Date)),sx:{minWidth:0,px:1,fontSize:15.5,color:c.mode==="dark"?c.colors.textStrong:c.colors.textPrimary},children:"\uC624\uB298"}),Er(Zh,{size:"small","aria-label":"\uB2E4\uC74C \uB2EC",onClick:()=>T(1),children:Er(a_,{sx:{fontSize:24,color:c.colors.textSecondary}})}),lo(Fr,{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",Er(l_,{sx:{fontSize:20,color:c.colors.textMuted}})]})]}),lo(Fr,{sx:{minWidth:0,overflowX:"hidden",borderTop:`1px solid ${c.calendar.borderColor}`},children:[x.length>0?lo(Fr,{sx:{display:"flex",alignItems:"center",gap:1,px:1,py:.75,minWidth:0,maxWidth:"100%",flexShrink:0,borderBottom:`1px solid ${c.calendar.borderColor}`},children:[lo(Fr,{sx:{width:52,flexShrink:0,fontSize:12.5,lineHeight:1.3,color:c.colors.textSecondary,textAlign:"center"},children:["\uB0A0\uC9DC",Er("br",{}),"\uC5C6\uC74C"]}),Er(Fr,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",gap:.5},children:x.map(S=>Er(si,{task:S,statusOptions:g,onOpenDetail:o,isMine:r>0&&Number(S.manager_account_seq??0)===r,avatarSrcByName:t,showManagerAvatar:!0,onOpenMembers:B},S.seq))})]}):null,b.map(({ymd:S,dayNumber:D,weekday:p})=>{let y=A.get(S)??"",v=S===l,w=!!y||p===0,_=m.get(S)??[],C=R.get(S)??[],O=_.length>0||C.length>0;return lo(Fr,{ref:v?P:void 0,onClick:s?()=>s(S):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:[Er(Fr,{sx:{width:52,flexShrink:0,display:"flex",flexDirection:"column",alignItems:"center",gap:.25},children:lo(Fr,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:.25,"@media (min-width:600px)":{flexDirection:"row",gap:.75}},children:[Er(Fr,{component:"span",sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:40,height:32,borderRadius:1,px:1.25,fontSize:22,fontWeight:500,color:v?c.colors.surface:w?c.colors.danger:p===6?c.colors.accentOnSurface:c.colors.textPrimary,bgcolor:v?c.colors.accentOnSurface:"transparent"},children:D}),Er(Fr,{component:"span",sx:{fontSize:13,color:w?c.colors.danger:p===6?c.colors.accentOnSurface:c.colors.textSecondary},children:u_[p]})]})}),lo(Fr,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",gap:.5},children:[C.map(F=>Er(ss,{event:F},F.uid)),_.map(F=>{let $=os(F),K=Er(si,{task:F,statusOptions:g,onOpenDetail:o,isMine:r>0&&Number(F.manager_account_seq??0)===r,avatarSrcByName:t,showManagerAvatar:!0,onOpenMembers:B,showTime:!i,wrapTitle:!0},F.seq);return i?lo(Fr,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[Er(Fr,{component:"span",sx:{width:44,flexShrink:0,textAlign:"right",fontSize:13.5,fontWeight:400,opacity:1,color:$?F.completed?c.colors.textPrimary:c.colors.danger:"transparent"},children:$||"00:00"}),Er(Fr,{sx:{flex:1,minWidth:0},children:K})]},F.seq):K})]})]},S)})]}),Er(Xh,{task:k,avatarSrcByName:t,onClose:()=>B(null)}),Er(c_,{open:d,centered:!0,monthOnly:!0,onClose:()=>u(!1),selectedDate:a,onDateChange:S=>{h(Du(S)),u(!1)}})]})}import{useCallback as tp,useEffect as rp,useMemo as Pu,useRef as Cl,useState as ta}from"react";import{Box as br,Tooltip as ip}from"@mui/material";import d_ from"@ehfuse/overlay-scrollbar";import h_ from"@mui/icons-material/CheckCircle";import p_ from"@mui/icons-material/RadioButtonUnchecked";import{DndContext as m_,PointerSensor as g_,closestCenter as b_,useSensor as y_,useSensors as x_}from"@dnd-kit/core";import{SortableContext as v_,arrayMove as w_,useSortable as __,verticalListSortingStrategy as k_}from"@dnd-kit/sortable";import S_ from"@mui/icons-material/DragIndicator";import{jsx as rr,jsxs as Do}from"react/jsx-runtime";var Nu=36,T_=48,np=40,C_=24,B_=4,I_=14,op=36,E_=12.5,ls=220,M_={high:{bg:"#f6c6c9",border:"#e5484d"},medium:{bg:"#c5d8f6",border:"#2f80ed"},low:{bg:"#f3e3b6",border:"#d9a514"}};function Oi(e){let f=String(e??"").trim();if(!f)return null;let g=new Date(`${f}T00:00:00`);return Number.isNaN(g.getTime())?null:g}function Tl(e,f){let g=new Date(e);return g.setDate(g.getDate()+f),g}function Lu(e,f){return Math.round((f.getTime()-e.getTime())/864e5)}function R_({task:e,dragHandle:f,onPointerDown:g,onClick:l}){let o=lt(),s=Cl(null),[r,t]=ta("");return rr(ip,{title:r,arrow:!0,enterDelay:300,children:Do(br,{onPointerDown:g,onClick:n=>l(e,n),onMouseEnter:()=>{let n=s.current;t(n&&n.scrollWidth>n.clientWidth?e.title:"")},sx:{width:ls,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:[f,rr(br,{ref:s,component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.title})]})})}function O_({id:e,showIndicator:f,children:g}){let l=lt(),{attributes:o,listeners:s,setNodeRef:r}=__({id:e});return Do(br,{ref:r,sx:{position:"relative"},children:[f?rr(br,{sx:{position:"absolute",top:-1,left:0,right:0,height:2,bgcolor:l.colors.accentOnSurface,zIndex:5}}):null,g({...o,...s})]})}function sp({tasks:e,hideCompletedChecklist:f=!1,todayStr:g,onOpenDetail:l,onToggleChecklist:o,onReorderTasks:s,onTaskContextMenu:r}){let t=lt(),[n,c]=ta(null),i=Pu(()=>[...e].sort((v,w)=>{let _=(v.timeline_sort_no??0)>0,C=(w.timeline_sort_no??0)>0;if(_&&C)return(v.timeline_sort_no??0)-(w.timeline_sort_no??0);if(_!==C)return _?-1:1;let O=v.due_date||v.start_date,F=w.due_date||w.start_date;return O!==F?O<F?-1:1:v.seq-w.seq}),[e]),[a,h]=ta(null),[d,u]=ta(null),b=x_(y_(g_,{activationConstraint:{distance:4}})),m=tp(v=>{h(v.over?Number(v.over.id):null)},[]),x=tp(v=>{h(null),u(null);let{active:w,over:_}=v;if(!_||w.id===_.id)return;let C=i.map($=>$.seq),O=C.indexOf(Number(w.id)),F=C.indexOf(Number(_.id));O===-1||F===-1||s(w_(C,O,F))},[i,s]),k=Pu(()=>{let v=Oi(g)??new Date,w=v,_=Tl(v,21);for(let F of i){let $=Oi(F.start_date)??Oi(F.due_date),K=Oi(F.due_date)??$;$&&$<w&&(w=$),K&&K>_&&(_=K)}let C=Tl(w,-3),O=Lu(C,Tl(_,3))+1;return Array.from({length:O},(F,$)=>Tl(C,$))},[i,g]),B=k[0],R=k.findIndex(v=>mr(v)===g),{dayWidths:j,dayOffsets:A,gridWidth:P}=Pu(()=>{let v=k.map((C,O)=>C.getDate()===1||O===0?T_:Nu),w=[],_=0;for(let C of v)w.push(_),_+=C;return{dayWidths:v,dayOffsets:w,gridWidth:_}},[k]),N=ls+P,q=Cl(null),z=v=>{q.current={x:v.clientX,y:v.clientY}},T=(v,w)=>{let _=q.current;q.current=null,!(_&&(Math.abs(w.clientX-_.x)>5||Math.abs(w.clientY-_.y)>5))&&l(v)},S=Cl(null),[D,p]=ta(!1);rp(()=>{let v=S.current?.getScrollContainer();if(!v)return;let w=()=>p(v.scrollHeight>v.clientHeight);w();let _=new ResizeObserver(w);return _.observe(v),()=>_.disconnect()},[i.length]);let y=Cl(!1);return rp(()=>{if(i.length===0||y.current)return;y.current=!0;let v=window.requestAnimationFrame(()=>{let w=S.current?.getScrollContainer();!w||R<0||(w.scrollLeft=Math.max(0,A[R]-Nu*3))});return()=>window.cancelAnimationFrame(v)},[i.length]),Do(br,{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:[rr(br,{sx:{flex:1,minHeight:0,minWidth:0,contain:"inline-size"},children:rr(d_,{ref:S,style:{height:"100%"},contentStyle:{width:"max-content",minWidth:"100%"},thumb:{width:8},showHorizontalScrollbar:!0,dragScroll:{excludeClasses:["taskbox-timeline-handle"]},children:Do(br,{sx:{width:N,position:"relative",bgcolor:t.timeline.bg},children:[Do(br,{sx:{display:"flex",position:"sticky",top:0,zIndex:3,bgcolor:t.timeline.headerBg,borderBottom:`1px solid ${t.timeline.gridColor}`},children:[rr(br,{sx:{width:ls,height:op,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((v,w)=>{let _=v.getDay(),C=w===R,O=v.getDate()===1||w===0;return rr(br,{sx:{width:j[w],height:op,flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",fontSize:E_,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?`${v.getMonth()+1}/${v.getDate()}`:v.getDate()},mr(v))})]}),rr(m_,{sensors:b,collisionDetection:b_,onDragStart:v=>u(Number(v.active.id)),onDragOver:m,onDragEnd:x,onDragCancel:()=>{h(null),u(null)},children:rr(v_,{items:i.map(v=>String(v.seq)),strategy:k_,children:Do(br,{sx:{position:"relative"},children:[k.map((v,w)=>{let _=v.getDay(),C=w===R;return!C&&_!==0&&_!==6?null:rr(br,{sx:{position:"absolute",top:0,bottom:0,left:ls+A[w],width:j[w],bgcolor:C?"rgba(229,72,77,0.07)":t.colors.surfaceSubtle,zIndex:0}},`stripe-${mr(v)}`)}),i.map((v,w)=>{let _=Oi(v.start_date)??Oi(v.due_date),C=Oi(v.due_date)??_,O=_?Math.min(k.length-1,Math.max(0,Lu(B,_))):0,F=C?Math.min(k.length-1,Math.max(O,Lu(B,C))):O,$=M_[v.priority],K=ls+A[O]+2,M=A[F]+j[F]-A[O]-4,H=(v.checklist??[]).map((E,I)=>({entry:E,index:I})).filter(({entry:E})=>!f||!E.checked);return rr(O_,{id:String(v.seq),showIndicator:a===v.seq&&d!==v.seq,children:E=>Do(br,{sx:{borderBottom:w===i.length-1&&D?"none":`1px solid ${t.timeline.gridColor}`,position:"relative",zIndex:1,opacity:d===v.seq?.45:1},children:[Do(br,{onContextMenu:I=>r(v,I),sx:{display:"flex",height:np,position:"relative","&:hover":{bgcolor:"rgba(47,128,237,0.04)"}},children:[rr(R_,{task:v,dragHandle:rr(br,{component:"span",className:"taskbox-timeline-handle",...E,onClick:I=>I.stopPropagation(),sx:{display:"inline-flex",alignItems:"center",flexShrink:0,color:t.colors.accentOnSurface,cursor:"grab",touchAction:"none","&:hover":{color:t.colors.accentOnSurface}},children:(()=>{let I=(v.is_notice||v.is_event?Et(v.icon||(v.is_notice?pr:yr)):null)??S_;return rr(I,{sx:{fontSize:17}})})()}),onPointerDown:z,onClick:T}),rr(ip,{title:`${v.title} (${v.start_date||"?"} ~ ${v.due_date||"?"})`,arrow:!0,enterDelay:300,children:rr(br,{onPointerDown:z,onClick:I=>T(v,I),sx:{position:"absolute",top:(np-20)/2,left:K,width:Math.max(Nu-4,M),height:20,borderRadius:1,bgcolor:$.bg,border:`1px solid ${$.border}`,opacity:v.completed?.45:1,cursor:"pointer","&:hover":{filter:"brightness(0.95)"}}})})]}),H.map(({entry:I,index:L},U)=>rr(br,{sx:{display:"flex",height:C_,position:"relative",mt:U===0?`${B_}px`:0,mb:U===H.length-1?`${I_}px`:0},children:rr(br,{sx:{width:ls,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:I.checked?t.colors.textMuted:t.colors.textPrimary},children:Do(br,{onClick:G=>c({anchorEl:G.currentTarget,taskSeq:v.seq,index:L,checked:!I.checked}),sx:{display:"inline-flex",alignItems:"center",gap:.75,minWidth:0,cursor:"pointer"},children:[I.checked?rr(h_,{sx:{fontSize:17,color:t.colors.accentOnSurface,flexShrink:0}}):rr(p_,{sx:{fontSize:17,color:t.colors.textMuted,flexShrink:0}}),rr(br,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",textDecoration:I.checked?"line-through":"none"},children:I.label})]})})},`${v.seq}-check-${L}`))]})},v.seq)}),i.length===0?rr(br,{sx:{py:8,textAlign:"center",color:t.colors.textMuted,fontSize:14},children:"\uD45C\uC2DC\uD560 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):null]})})})]})})}),rr(At,{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 Ai}from"react/jsx-runtime";function aP(e){switch(e.view){case"card":case"kanban":{let{view:f,...g}=e;return Ai(_u,{...g,columnAxis:f==="kanban"?"status":"project"})}case"sprint":{let{view:f,...g}=e;return Ai(_u,{...g,columnAxis:"sprint"})}case"calendar":{let{view:f,...g}=e;return Ai(Wh,{...g})}case"month":{let{view:f,...g}=e;return Ai(Yh,{...g})}case"agenda":{let{view:f,...g}=e;return Ai(ep,{...g})}case"timeline":{let{view:f,...g}=e;return Ai(sp,{...g})}default:{let{view:f,...g}=e;return Ai(xh,{...g})}}}var lP=["list","card","kanban","calendar","month","timeline"];import{Box as yn}from"@mui/material";import{Fragment as A_,jsx as Di,jsxs as co}from"react/jsx-runtime";function ap(e,f){if(!/^\d{4}-\d{2}-\d{2}$/.test(e)||!/^\d{4}-\d{2}-\d{2}$/.test(f))return null;let g=new Date(`${e}T00:00:00`),l=new Date(`${f}T00:00:00`);return Math.round((g.getTime()-l.getTime())/864e5)}function lp({tasks:e,todayStr:f,showProgress:g=!0,dday:l=null,workdaysLeft:o=null,showPoints:s=!0,showHours:r=!0,showOverdue:t=!0,showInfo:n=!0,inline:c=!1}){let i=lt(),a=e.filter(P=>!P.archived),h=a.filter(P=>P.completed).length,d=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)<f).length,b=a.reduce((P,N)=>N.completed?P:P+(N.story_points??0),0),m=g?Di(yn,{sx:{flex:c?"0 0 110px":"1 1 auto",minWidth:0,height:i.summary.gaugeHeight,borderRadius:3,bgcolor:i.summary.gaugeTrackColor},children:Di(yn,{sx:{height:"100%",borderRadius:3,width:`${d}%`,bgcolor:d>=100?i.summary.gaugeCompleteColor:i.summary.gaugeBarColor,transition:"width 0.2s"}})}):null,x=g?co(yn,{component:"span",sx:{flexShrink:0,fontSize:c?14:13,color:i.summary.textColor},children:[d,"%"]}):null,k={color:i.summary.numberColor,fontWeight:700,fontSize:c?15:14},B=a.length-h,R=co(A_,{children:[c?null:co("span",{children:["\uB0A8\uC740 ",Di(yn,{component:"span",sx:k,children:B}),"\uAC74"]}),t&&u>0?co(yn,{component:"span",sx:{color:i.summary.overdueColor,fontWeight:600},children:["\uC9C0\uC5F0"," ",Di(yn,{component:"span",sx:{fontWeight:700,fontSize:c?15:14},children:u}),"\uAC74"]}):null,s&&b>0?co("span",{children:[Di(yn,{component:"span",sx:k,children:b}),"SP"]}):null]}),j=typeof o=="number"&&Number.isFinite(o)?co("span",{children:["\uADFC\uBB34\uC77C ",Di(yn,{component:"span",sx:k,children:o}),"\uC77C"]}):null,A=typeof l=="number"&&Number.isFinite(l)?Di(yn,{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?co(yn,{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?j:null,n?A:null,m,x]}):co(yn,{sx:{display:"flex",flexDirection:"column",gap:.5},children:[g?co(yn,{sx:{display:"flex",alignItems:"center",gap:1},children:[m,x]}):null,co(yn,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,fontSize:13.5,color:i.summary.textColor},children:[R,j,A]})]})}import{useMemo as P_}from"react";function D_(e){let f=String(e??"").trim();if(!f)return 0;let g=0,l=!1;for(let o of f.matchAll(/(\d+(?:\.\d+)?)\s*(h|시간|m|분|d|일)/gi)){let s=parseFloat(o[1]),r=o[2].toLowerCase();l=!0,r==="m"||r==="\uBD84"?g+=s/60:r==="d"||r==="\uC77C"?g+=s*8:g+=s}if(!l){let o=parseFloat(f);Number.isFinite(o)&&(g+=o)}return g}function mP(e){let f=Math.round(e*10)/10;return`${f%1===0?f.toFixed(0):f.toFixed(1)}\uC2DC\uAC04`}function cp(e,f,g){if(!/^\d{4}-\d{2}-\d{2}$/.test(e)||!/^\d{4}-\d{2}-\d{2}$/.test(f))return 0;let l=new Date(`${e}T00:00:00`),o=new Date(`${f}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")}`;g.has(n)||(s+=1)}return s}function gP(e){return e.reduce((f,g)=>g.completed?f:f+D_(g.estimated_time),0)}import{jsx as N_}from"react/jsx-runtime";function _P({sprint:e,tasks:f,todayStr:g,...l}){let o=e.status==="closed"?null:ap(e.end_date,g),s=o!==null&&o>=0,r=P_(()=>{if(!s)return[];let c=Number(g.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,g,e.end_date]),t=to(r),n=s?cp(g,e.end_date,new Set(t.keys())):null;return N_(lp,{tasks:f,todayStr:g,dday:o,workdaysLeft:n,...l})}import{useEffect as V_,useRef as K_,useState as G_}from"react";import{Box as ju}from"@mui/material";import{Children as L_}from"react";import{Box as zu,CircularProgress as z_}from"@mui/material";import{jsx as Bl}from"react/jsx-runtime";var up={xs:2,md:3};function fp(){return Bl(zu,{sx:{position:"fixed",top:"calc(50% + 30px)",left:"50%",transform:"translate(-50%, -50%)",zIndex:1},children:Bl(z_,{size:44,thickness:4,sx:{color:"#94a3b8"}})})}function dp({children:e}){return Bl(zu,{sx:{minWidth:0,display:"flex",flexDirection:"column",gap:up,pb:up},children:L_.map(e,f=>f==null||f===!1?null:Bl(zu,{sx:{bgcolor:"background.paper",borderRadius:"12px",boxShadow:"0 1px 3px rgba(15,23,42,0.08)",minWidth:0},children:f}))})}import{useState as $_}from"react";import{Box as No,Button as pp,Checkbox as H_,Typography as ai}from"@mui/material";import mp from"@mui/icons-material/CheckCircle";import W_ from"@mui/icons-material/CheckCircleOutlineOutlined";import{Fragment as q_,jsx as hp}from"react/jsx-runtime";var j_="taskbox-search-highlight";function F_(e,f){let g=f?.keyPrefix??"hl";return e.map((l,o)=>hp("span",{className:l.highlight?f?.highlightClassName??j_:f?.className,style:l.highlight?{fontWeight:700,color:"#2563eb"}:void 0,children:l.text},`${g}-${l.text}-${o}`))}function Il({text:e,keyword:f,fallback:g="-",className:l,highlightClassName:o,keyPrefix:s}){let r=String(e??"").trim()||g,t=al(r,f);return hp(q_,{children:F_(t,{className:l,highlightClassName:o,keyPrefix:s})})}import{jsx as Ct,jsxs as Pi}from"react/jsx-runtime";var U_={flexShrink:0,minWidth:64,textAlign:"center",px:.75,py:.35,borderRadius:.75,bgcolor:"#f1f5f9",color:"#64748b",fontSize:Br(12.5),fontWeight:500,lineHeight:1.4},Po={fontSize:Br(14.5),color:"#374151",minWidth:0,lineHeight:1.45};function $n({label:e,children:f}){return Pi(No,{sx:{display:"flex",alignItems:"flex-start",gap:1,minWidth:0},children:[Ct(No,{sx:U_,children:e}),Ct(No,{sx:{...Po,flex:1,pt:.2},children:f})]})}function gp({task:e,statusOptions:f,projectLabel:g,searchText:l,todayStr:o,dimCompleted:s=!0,onRequestToggleCompleted:r,onOpenDetail:t,onTaskContextMenu:n,targetSummary:c="",ackInfo:i,completeLocked:a=!1,unread:h=!1,noticeReadOnly:d=!1,onAckConfirm:u,onAckListClick:b,myManaged:m=!1}){let x=e.is_event?Hs(e):xr(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=Cn(e.start_date),j=Cn(e.due_date),A=R&&B&&!j?`${R} ${B}`:R,P=j&&B?`${j} ${B}`:j,N=ot(),q=!e.is_notice&&e.completed&&!!e.review_pending&&!!N.onReviewDone&&(N.myAccountSeq??0)>0&&(e.author_account_seq??0)===(N.myAccountSeq??0),[z,T]=$_(null),S=!e.is_notice&&!e.is_event&&!String(e.due_date??"").trim(),D=!e.is_notice&&!e.completed&&!!e.due_date&&e.due_date<o,p=(e.receiver_names??[]).filter(Boolean);return Pi(No,{role:"button",tabIndex:0,onClick:()=>t(e),onKeyDown:y=>{(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),t(e))},onContextMenu:y=>n(e,y),sx:{display:"flex",flexDirection:"column",gap:.75,minWidth:0,p:1.25,cursor:"pointer",opacity:S?.6:1,position:"relative"},children:[m?Ct(No,{sx:{position:"absolute",left:3,top:5,bottom:5,width:3,borderRadius:"999px",bgcolor:"#2f80ed"}}):null,Pi(No,{sx:{display:"flex",alignItems:"flex-start",gap:.75,minWidth:0,mb:1},children:[e.is_event?(()=>{let y=Et(e.icon||yr);return y?Ct(y,{sx:{fontSize:21,flexShrink:0,mt:.2,color:e.icon_color||"#1e3a8a"}}):null})():!d&&!a?Ct(H_,{checked:e.completed,icon:Ct(W_,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:Ct(mp,{sx:{fontSize:22,color:"#2f80ed"}}),onClick:y=>y.stopPropagation(),onChange:(y,v)=>r({anchorEl:y.currentTarget,taskSeq:e.seq,nextCompleted:v}),sx:{p:0,mt:.1,flexShrink:0}}):null,(()=>{if(!e.is_notice)return null;let y=Et(e.icon||pr);return y?Ct(y,{sx:{fontSize:19,flexShrink:0,mt:"1px",color:e.icon_color||"#e5484d"}}):null})(),Ct(ai,{sx:{fontSize:Br(16),fontWeight:600,lineHeight:1.35,minWidth:0,flex:1,color:e.completed&&s?"#9a9a97":S?"#5f5e5b":"#111827",textDecoration:e.completed&&s?"line-through":"none"},children:Ct(Il,{text:e.title,keyword:l})}),h&&!e.completed?Ct(No,{component:"span",sx:{flexShrink:0,px:.55,fontSize:Br(10.5),fontWeight:700,lineHeight:1.6,color:"#fff",bgcolor:"#e5484d",borderRadius:"4px"},children:"N"}):null]}),Pi(No,{sx:{display:"flex",flexDirection:"column",gap:.6,minWidth:0},children:[Ct($n,{label:x?"\uC0C1\uD0DC":"\uC911\uC694\uB3C4",children:Pi(No,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1.25},children:[x?Ct(Lt,{option:x,small:!0}):null,Ct(Xr,{priority:e.priority,small:!0})]})}),(e.label_keys??[]).length>0?Ct($n,{label:"\uB77C\uBCA8",children:Ct(Zo,{labelKeys:e.label_keys,labelOptions:f})}):null,g?Ct($n,{label:"\uD504\uB85C\uC81D\uD2B8",children:Ct(ai,{sx:Po,children:g})}):null,A?Ct($n,{label:"\uC2DC\uC791",children:Ct(ai,{sx:Po,children:A})}):null,P?Ct($n,{label:"\uB9C8\uAC10",children:Pi(ai,{sx:{...Po,color:D?"#e5484d":Po.color,fontWeight:D?600:400},children:[P,D?" \xB7 \uC9C0\uC5F0":""]})}):null,q?Pi($n,{label:"\uAC80\uC218",children:[Ct(pp,{size:"small",variant:"contained",disableElevation:!0,onClick:y=>{y.stopPropagation(),T(y.currentTarget)},sx:{...ei,py:0,fontSize:Br(13)},children:"\uAC80\uC218\uC644\uB8CC"}),Ct(ti,{anchorEl:z,onCancel:()=>T(null),onConfirm:()=>{N.onReviewDone?.(e),T(null)}})]}):null,e.is_notice?Ct($n,{label:"\uB300\uC0C1\uC790",children:Ct(ai,{sx:Po,children:c||"\uBAA8\uB4E0 \uC9C1\uC6D0"})}):null,i?Ct($n,{label:"\uD655\uC778",children:Ct(pp,{size:"small",variant:i.canAck?"contained":"outlined",color:"inherit",startIcon:i.acked?Ct(mp,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:y=>{y.stopPropagation(),i.canAck?u?.(e):b?.(e,y.currentTarget)},sx:{py:0,px:1.25,minWidth:0,fontSize:Br(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($n,{label:"\uCC45\uC784\uC790",children:Ct(ai,{sx:Po,children:Ct(Il,{text:e.manager_name,keyword:l})})}):null,!e.is_notice&&p.length>0?Ct($n,{label:"\uCC38\uC870\uC790",children:Ct(ai,{sx:Po,children:p.join(", ")})}):null,e.note?Ct($n,{label:"\uBE44\uACE0",children:Ct(ai,{sx:Po,children:Ct(Il,{text:e.note,keyword:l})})}):null]})]})}import{jsx as cs,jsxs as X_}from"react/jsx-runtime";function Y_(e,f){if(e.completed||e.archived||f<=0)return;let g=ts(e,f);if(g.canConfirm)return{count:g.count,total:g.total,acked:!1,canAck:!0,pendingNames:g.pendingNames}}function tN({tasks:e,statusOptions:f,customTabs:g,loading:l,dimCompleted:o=!0,searchText:s,todayStr:r,onToggleCompleted:t,onOpenDetail:n,onTaskContextMenu:c,getTargetSummary:i,getAckInfo:a,getNoticeReadOnly:h,isTaskUnread:d,getCompleteLocked:u,onAckConfirm:b,onAckListClick:m,onEndReached:x,myAccountSeq:k=0}){let B=new Map(g.map(q=>[q.key,q.label])),[R,j]=G_(null),{onReturnTask:A}=ot(),P=R?e.find(q=>q.seq===R.taskSeq):void 0,N=K_(null);return V_(()=>{let q=N.current;if(!x||!q)return;let z=new IntersectionObserver(T=>{T[0]?.isIntersecting&&x()});return z.observe(q),()=>z.disconnect()},[x,e.length]),e.length===0?l?cs(fp,{}):cs(ju,{sx:{py:6,textAlign:"center",color:"#94a3b8",fontSize:"0.9rem"},children:"\uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):X_(ju,{sx:{minWidth:0},children:[cs(dp,{children:e.map(q=>cs(gp,{dimCompleted:o,myManaged:k>0&&!q.is_notice&&!q.is_event&&(q.manager_account_seq??0)===k,task:q,statusOptions:f,projectLabel:q.tab_key?B.get(q.tab_key)??"":"",searchText:s,todayStr:r,onRequestToggleCompleted:j,onOpenDetail:n,onTaskContextMenu:c,targetSummary:q.is_notice?i?.(q):void 0,ackInfo:q.is_notice?a?.(q):Y_(q,k),noticeReadOnly:q.is_notice?h?.(q):!1,unread:d?.(q)??!1,completeLocked:u?.(q)??!1,onAckConfirm:b,onAckListClick:m},q.seq))}),x?cs(ju,{ref:N,sx:{height:"1px"}}):null,cs(cn,{open:!!R,anchorEl:R?.anchorEl??null,nextCompleted:R?.nextCompleted??!1,returnMode:!!A&&!!(P&&Zr(P,k)),onCancel:()=>j(null),onConfirm:q=>{R&&(q&&A&&P?A(P,q):t(R.taskSeq,R.nextCompleted)),j(null)}})]})}import{useState as ra}from"react";import{Box as lr,Checkbox as Z_,Menu as J_,MenuItem as bp,Tooltip as Q_}from"@mui/material";import e3 from"@mui/icons-material/CheckCircle";import t3 from"@mui/icons-material/CheckCircleOutlineOutlined";import r3 from"@mui/icons-material/NotesOutlined";import n3 from"@mui/icons-material/AutorenewOutlined";import o3 from"@mui/icons-material/CalendarTodayOutlined";import i3 from"@mui/icons-material/EventOutlined";import s3 from"@mui/icons-material/PersonOutlineOutlined";import a3 from"@mui/icons-material/PeopleAltOutlined";import l3 from"@mui/icons-material/StickyNote2Outlined";import{Fragment as f3,jsx as wt,jsxs as li}from"react/jsx-runtime";var Fu={completed:{label:"\uC644\uB8CC",width:"44px",align:"center",icon:null},title:{label:"\uC81C\uBAA9",width:"1fr",align:"left",icon:wt(r3,{sx:{fontSize:15}})},manager_name:{label:"\uCC45\uC784\uC790",width:"112px",align:"center",icon:wt(s3,{sx:{fontSize:15}})},receiver_names:{label:"\uCC38\uC870\uC790",width:"120px",align:"center",icon:wt(a3,{sx:{fontSize:15}})},status:{label:"\uC0C1\uD0DC",width:"104px",align:"center",icon:wt(n3,{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:wt(o3,{sx:{fontSize:15}})},due_date:{label:"\uB9C8\uAC10\uC608\uC815",width:"110px",align:"center",icon:wt(i3,{sx:{fontSize:15}})},note:{label:"\uBE44\uACE0",width:"1fr",align:"left",icon:wt(l3,{sx:{fontSize:15}})}},c3=[{id:"completed"},{id:"title"},{id:"manager_name"},{id:"due_date"},{id:"status"}],u3=new Set(["manager_name","status","due_date"]);function yp(e){let f=String(e??"").trim();return f?f.slice(2,10).replaceAll("-","."):""}function EN(e,f){return f>0?e.filter(g=>!g.is_notice&&!g.completed&&!g.archived&&Ln(g)==="group"&&Number(g.visibility_group_seq??0)===f).sort((g,l)=>{let o=String(g.due_date??"").trim(),s=String(l.due_date??"").trim();return o!==s?o?s?o.localeCompare(s):-1:1:Number(g.seq)-Number(l.seq)}):[]}function MN({tasks:e,columns:f=c3,loading:g=!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:d,onClaimTask:u}){let b=lt(),[m,x]=ra(null),[k,B]=ra(null),[R,j]=ra(null),[A,P]=ra(null),{onReturnTask:N}=ot(),[q,z]=ra(null),T=f.map(p=>p.width??Fu[p.id].width).join(" "),S=(p,y)=>wt(Tn,{src:s?.get(p)??"",name:p,avatarSx:{width:y,height:y,fontSize:Math.round(y/2),flexShrink:0,borderRadius:"50%"},iconFontSize:Math.round(y*.6)}),D=(p,y)=>{let w=Fu[p.id].align==="center";switch(p.id){case"completed":if(y.is_event){let _=Et(y.icon||yr);return wt(lr,{className:"cell",sx:{justifyContent:"center"},children:_?wt(_,{sx:{fontSize:19,color:y.icon_color||"#1e3a8a"}}):null},p.id)}return wt(lr,{className:"cell",sx:{justifyContent:"center",...c?{"&:hover":{bgcolor:b.table.cellHoverBg}}:{}},children:wt(Q_,{title:y.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC",arrow:!0,enterDelay:300,disableInteractive:!0,children:wt(Z_,{checked:!!y.completed,icon:wt(t3,{sx:{fontSize:20,color:"#9a9a97",opacity:.45}}),checkedIcon:wt(e3,{sx:{fontSize:20,color:"#2f80ed"}}),onChange:_=>P({anchorEl:_.currentTarget,task:y}),sx:{p:.5}})})},p.id);case"title":{let _=y.is_notice?Et(y.icon||pr):null,C=y.icon_color||"#e5484d";return li(lr,{className:"cell",onClick:()=>n(y),sx:{gap:1,cursor:"pointer","&:hover":{bgcolor:b.table.cellHoverBg}},children:[_?wt(_,{sx:{fontSize:18,flexShrink:0,color:C}}):null,wt(lr,{component:"span",sx:{fontSize:14.5,fontWeight:b.table.rowTitleFontWeight,color:b.table.rowTitleColor,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:y.title||"(\uC81C\uBAA9 \uC5C6\uC74C)"})]},p.id)}case"manager_name":{let _=t?t(y):!1,C=o>0&&Number(y.manager_account_seq??0)===o;return _&&d?li(lr,{className:"cell",onClick:O=>j({anchorEl:O.currentTarget,task:y}),sx:{gap:.75,justifyContent:"center",cursor:"pointer","&:hover":{bgcolor:b.table.cellHoverBg}},children:[y.manager_name?S(y.manager_name,22):null,wt(lr,{component:"span",sx:{fontSize:14,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:y.manager_name||""})]},p.id):wt(lr,{className:"cell",sx:{gap:.75,justifyContent:"center"},children:y.manager_name?li(f3,{children:[S(y.manager_name,22),wt(lr,{component:"span",sx:{fontSize:14,fontWeight:C?600:400,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:y.manager_name})]}):u?wt(eo,{onClick:O=>z({anchorEl:O.currentTarget,taskSeq:Number(y.seq)}),children:"\uAC00\uC838\uAC00\uAE30"}):null},p.id)}case"receiver_names":return wt(lr,{className:"cell",sx:{justifyContent:"center",fontSize:14,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:(y.receiver_names??[]).join(", ")},p.id);case"status":return wt(lr,{className:"cell",onClick:i?_=>x({anchorEl:_.currentTarget,task:y}):void 0,sx:{py:.5,justifyContent:"center",...i?{cursor:"pointer","&:hover":{bgcolor:b.table.cellHoverBg}}:{}},children:wt(Lt,{option:xr(y)})},p.id);case"priority":return wt(lr,{className:"cell",sx:{justifyContent:"center"},children:wt(Xr,{priority:y.priority,plain:!0})},p.id);case"start_date":return wt(lr,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap",fontSize:14},children:yp(y.start_date)},p.id);case"due_date":return wt(lr,{className:"cell",onClick:a?_=>B({anchorEl:_.currentTarget,taskSeq:Number(y.seq),date:String(y.due_date??"").slice(0,10),reminders:ro(y)}):void 0,sx:{justifyContent:"center",whiteSpace:"nowrap",fontSize:14,...a?{cursor:"pointer","&:hover":{bgcolor:b.table.cellHoverBg}}:{}},children:yp(y.due_date)},p.id);case"note":return wt(lr,{className:"cell",sx:{justifyContent:w?"center":"flex-start",fontSize:14,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:y.note||""},p.id);default:return null}};return li(lr,{sx:{border:`1px solid ${b.table.borderColor}`,borderRadius:1,overflow:"hidden",bgcolor:b.table.bg,color:b.table.rowColor},children:[wt(lr,{sx:{display:"grid",gridTemplateColumns:T,borderBottom:`1px solid ${b.table.borderColor}`,bgcolor:b.table.headerBg,"& > *":{display:"flex",alignItems:"center",gap:.5,px:1,py:1,minWidth:0,fontSize:b.table.headerFontSize,whiteSpace:"nowrap",userSelect:"none",borderRight:`1px solid ${b.table.rowBorderColor}`},"& > *:first-of-type":{px:.5},"& > *:last-child":{borderRight:"none",pr:2}},children:f.map(p=>{let y=Fu[p.id];return li(lr,{sx:{justifyContent:y.align==="center"?"center":"flex-start",color:u3.has(p.id)?b.table.headerActiveColor:b.table.headerColor},children:[y.icon,p.label??y.label]},p.id)})}),g?wt(lr,{sx:{py:3,textAlign:"center",color:b.table.emptyColor,fontSize:14},children:"\uBD88\uB7EC\uC624\uB294 \uC911\u2026"}):e.length===0?wt(lr,{sx:{py:3,textAlign:"center",color:b.table.emptyColor,fontSize:14},children:l}):e.map((p,y)=>wt(lr,{sx:{display:"grid",gridTemplateColumns:T,minHeight:44,fontSize:15,bgcolor:b.table.rowBg,borderTop:y===0?"none":`1px solid ${b.table.rowBorderColor}`,"&:hover":{bgcolor:b.table.rowHoverBg},"& > .cell":{px:1,minWidth:0,display:"flex",alignItems:"center",borderRight:`1px solid ${b.table.rowBorderColor}`},"& > .cell:first-of-type":{px:.5},"& > .cell:last-child":{borderRight:"none",pr:2}},children:f.map(v=>D(v,p))},p.seq)),wt(Gi,{anchorEl:m?.anchorEl??null,value:String(m?.task.status??""),options:m?Ya(m.task):void 0,onSelect:p=>{m&&i?.(Number(m.task.seq),p),x(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:()=>x(null)}),li(J_,{anchorEl:R?.anchorEl??null,open:!!R,onClose:()=>j(null),transitionDuration:0,children:[li(bp,{onClick:()=>{R&&d?.(Number(R.task.seq),"",0),j(null)},sx:{fontSize:14,minWidth:170,gap:1,color:b.table.headerColor},children:[wt(lr,{sx:{width:24,flexShrink:0}}),"\uC9C0\uC815 \uC548 \uD568"]}),r.map(p=>li(bp,{selected:Number(R?.task.manager_account_seq??0)===Number(p.account_seq??0),onClick:()=>{R&&d?.(Number(R.task.seq),p.name,Number(p.account_seq??0)),j(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[S(p.name,24),p.name,p.role_name?wt(lr,{component:"span",sx:{color:b.table.headerColor,fontSize:13},children:p.role_name}):null]},p.seq))]}),wt(Bn,{anchorEl:k?.anchorEl??null,open:!!k,date:k?.date??"",reminders:k?.reminders??[],hideReminder:!h,onClose:()=>B(null),onDateChange:p=>{k&&(a?.(k.taskSeq,p),B(y=>y?{...y,date:p}:null))},onReminderChange:p=>{k&&(h?.(k.taskSeq,p),B(y=>y?{...y,reminders:p}:null))}}),wt(cn,{open:!!A,anchorEl:A?.anchorEl??null,nextCompleted:!A?.task.completed,returnMode:!!N&&!!(A&&Zr(A.task,o)),onCancel:()=>P(null),onConfirm:p=>{A&&(p&&N?N(A.task,p):c?.(A.task,!A.task.completed)),P(null)}}),wt(At,{open:!!q,anchorEl:q?.anchorEl??null,title:"\uC774 \uC5C5\uBB34\uB97C \uB9E1\uC744\uAE4C\uC694?",confirmText:"\uAC00\uC838\uAC00\uAE30",onCancel:()=>z(null),onConfirm:()=>{q&&u?.(q.taskSeq),z(null)}})]})}var na=[{value:"daily",label:"\uB9E4\uC77C"},{value:"weekly",label:"\uB9E4\uC8FC"},{value:"monthly",label:"\uB9E4\uC6D4"},{value:"yearly",label:"\uB9E4\uB144"}];function El(e){return na.find(f=>f.value===e)?.label??"\uC5C6\uC74C"}function d3(e){if(!/^\d{4}-\d{2}-\d{2}$/.test(e))return null;let f=new Date(`${e}T00:00:00`);return Number.isNaN(f.getTime())?null:f}function Ml(e,f){let g=d3(e);if(!g)return"";let l=new Date(g);f==="daily"?l.setMonth(l.getMonth()+1):f==="weekly"?l.setMonth(l.getMonth()+3):f==="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 h3(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)}function xp(e,f){let g=String(e??"").slice(0,10);if(!h3(g)||typeof f!="number"||!Number.isFinite(f))return"";let l=new Date(`${g}T12:00:00`);l.setDate(l.getDate()+Math.trunc(f));let o=l.getFullYear(),s=String(l.getMonth()+1).padStart(2,"0"),r=String(l.getDate()).padStart(2,"0");return`${o}-${s}-${r}`}function p3(e,f,g){return{title:String(e.title??"").trim(),content:String(e.content??""),start_date:xp(f,e.start_offset_days),due_date:xp(f,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:g}}function vp(e,f){let g=Number(e.group_seq)||0;return(e.items??[]).map(l=>p3(l,f,g)).filter(l=>l.title.length>0)}function DN(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 zk,useRef as jk,useState as nm}from"react";import{Box as zo,Button as lf,ButtonBase as Fk,Divider as om,Drawer as qk,IconButton as $k,Tooltip as Hk}from"@mui/material";import Wk from"@mui/icons-material/Close";import Uk from"@ehfuse/overlay-scrollbar";import{FormDialog as Vk}from"@ehfuse/mui-form-dialog";import{useState as ua}from"react";import{Box as zi,ButtonBase as Bk,Divider as fa,Menu as of,MenuItem as sf,Tooltip as Ik}from"@mui/material";import Ek from"@mui/icons-material/SubjectOutlined";import Mk from"@mui/icons-material/StickyNote2Outlined";import Rk from"@mui/icons-material/LabelOutlined";import Ok from"@mui/icons-material/DirectionsRunOutlined";import Jp from"@mui/icons-material/LockOutlined";import Qp from"@mui/icons-material/PublicOutlined";import em from"@mui/icons-material/Group";import Ak from"@mui/icons-material/Repeat";import Dk from"@mui/icons-material/EventOutlined";import Pk from"@mui/icons-material/SpeedOutlined";import{TextField as Nk}from"@ehfuse/mui-form-controls";import{InfoAlert as tm}from"@ehfuse/alerts";import{useState as Ni}from"react";import{Box as Al,Divider as A3,ListItemIcon as D3,Menu as Hu,MenuItem as oa}from"@mui/material";import P3 from"@mui/icons-material/Add";import Ol from"@mui/icons-material/Check";import N3 from"@mui/icons-material/ViewKanbanOutlined";import L3 from"@mui/icons-material/CalendarTodayOutlined";import z3 from"@mui/icons-material/EventOutlined";import j3 from"@mui/icons-material/PersonOutlineOutlined";import Tp from"@mui/icons-material/PeopleAltOutlined";import F3 from"@mui/icons-material/FlagOutlined";import q3 from"@mui/icons-material/TimerOutlined";import $3 from"@mui/icons-material/NotificationsNoneOutlined";import H3 from"@mui/icons-material/InboxOutlined";import W3 from"@mui/icons-material/PlaceOutlined";import U3 from"@mui/icons-material/MapOutlined";import{TimePicker as V3}from"@ehfuse/mui-datetime-picker";import{InfoAlert as K3}from"@ehfuse/alerts";var Hn="@media (max-width: 719.95px)";function uo(e){return{[Hn]:{order:e}}}import{useEffect as m3,useState as g3}from"react";import{Box as b3}from"@mui/material";import{jsx as y3}from"react/jsx-runtime";function Lo({value:e,placeholder:f,readOnly:g,onCommit:l}){let o=lt(),[s,r]=g3(e);return m3(()=>r(e),[e]),y3(b3,{component:"input",spellCheck:!1,value:s,readOnly:g,placeholder:f,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 qu}from"@mui/material";import{jsx as x3,jsxs as wp}from"react/jsx-runtime";function vt({icon:e,label:f,onClick:g,sx:l,children:o}){return wp(qu,{sx:[{display:"flex",alignItems:"center",minHeight:32},...Array.isArray(l)?l:[l]],children:[wp(qu,{sx:{display:"flex",alignItems:"center",gap:1,width:104,flexShrink:0,fontSize:13.5,color:"#787774"},children:[e,f]}),x3(qu,{onClick:g?s=>g(s.currentTarget):void 0,sx:{flex:1,minWidth:0,display:"flex",alignItems:"center",gap:.5,px:1,py:.25,borderRadius:1,fontSize:14,cursor:g?"pointer":"default","&:hover":g?{bgcolor:"#f2f2f0"}:void 0,[Hn]:{py:.25}},children:o})]})}import G3 from"@mui/icons-material/StorefrontOutlined";import Y3 from"@mui/icons-material/SupportAgentOutlined";import{Suspense as v3,lazy as w3,useEffect as _3,useState as _p}from"react";import{Box as $u,Dialog as k3,DialogContent as S3,DialogTitle as T3,IconButton as kp,Tooltip as C3}from"@mui/material";import B3 from"@mui/icons-material/Close";import I3 from"@mui/icons-material/Search";import{Fragment as O3,jsx as Wn,jsxs as Rl}from"react/jsx-runtime";function E3(e){return Wn($u,{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 M3=w3(()=>import("react-daum-postcode").then(e=>({default:e.default})).catch(()=>({default:E3})));function R3(e){if(e.addressType!=="R")return e.address;let f="";return e.bname!==""&&/[동|로|가]$/g.test(e.bname)&&(f+=e.bname),e.buildingName!==""&&e.apartment==="Y"&&(f+=f!==""?`, ${e.buildingName}`:e.buildingName),f!==""?`${e.address} (${f})`:e.address}function Sp({value:e,placeholder:f="\uC8FC\uC18C \uC785\uB825",readOnly:g,onCommit:l}){let[o,s]=_p(e),[r,t]=_p(!1),n=ot().slots?.addressSearch;_3(()=>s(e),[e]);let c=a=>{s(a),t(!1),a!==e&&l(a)};return Rl(O3,{children:[Rl($u,{sx:{display:"flex",alignItems:"center",gap:.5,flex:1,minWidth:0},children:[Wn($u,{component:"input",spellCheck:!1,value:o,readOnly:g,placeholder:f,onChange:a=>s(a.target.value),onBlur:()=>{r||o.trim()!==e&&l(o.trim())},onKeyDown:a=>{a.key==="Enter"&&(a.preventDefault(),!g&&t(!0))},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:14,color:"#37352f",bgcolor:"transparent",p:0,"&::placeholder":{color:"#9a9a97"}}}),g?null:Wn(C3,{title:"\uC8FC\uC18C \uAC80\uC0C9",arrow:!0,children:Wn(kp,{tabIndex:-1,size:"small","aria-label":"\uC8FC\uC18C \uAC80\uC0C9",onClick:()=>t(!0),sx:{color:"#9a9a97",p:.25,flexShrink:0},children:Wn(I3,{sx:{fontSize:17}})})})]}),n?Wn(n,{open:r,onComplete:c,onClose:()=>t(!1)}):Rl(k3,{open:r,onClose:()=>t(!1),maxWidth:"sm",fullWidth:!0,slotProps:{paper:{sx:{height:550}}},children:[Rl(T3,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",pr:2},children:["\uC8FC\uC18C \uAC80\uC0C9",Wn(kp,{"aria-label":"\uC8FC\uC18C \uAC80\uC0C9 \uB2EB\uAE30",onClick:()=>t(!1),size:"small",children:Wn(B3,{})})]}),Wn(S3,{style:{padding:0},dividers:!0,children:r?Wn(v3,{fallback:null,children:Wn(M3,{onComplete:a=>{c(R3(a))},onClose:()=>t(!1),defaultQuery:o,style:{width:"100%",height:"100%"}})}):null})]})]})}import{Fragment as ia,jsx as et,jsxs as xn}from"react/jsx-runtime";function Cp(e){return String(e??"").includes(" ")?bn(e):Cn(e)}function X3(e){let[f="00",g="00"]=String(e??"").split(":");return{hour:/^\d{2}$/.test(f)?f:"00",minute:/^\d{2}$/.test(g)?g:"00"}}function ci({label:e="\uBE44\uC5B4 \uC788\uC74C"}){return et(Al,{component:"span",sx:{color:"#9a9a97"},children:e})}var cr=e=>({gridColumn:`${e}`,[Hn]:{gridColumn:"auto"}});function Dl({values:e,customTabs:f,avatarSrcByName:g,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,coreLocked:d,targetSummary:u="",narrowCollapsedSx:b,reminderLocked:m=!1,managerAction:x,hideProject:k=!1,leading:B,supportOrigin:R,trailing:j,onChangeProject:A,onChangeStartDate:P,onChangeDueDate:N,onChangeReminder:q,onChangePriority:z,onChangeEventTime:T,onChangeEventPlace:S,onChangeEventAddress:D,onMemberEdit:p,onAddProject:y}){let[v,w]=Ni(null),[_,C]=Ni(!1),O=d??h,[F,$]=Ni(null),[K,M]=Ni(null),[H,E]=Ni(null),[I,L]=Ni(null),[U,G]=Ni(null),V=qt(),W=Jn(),X=c&&!s,Z=(te,oe,se=!1)=>[uo(te),...se&&b?Array.isArray(b)?b:[b]:[],...X&&oe?[cr(oe)]:[]],Y=f.find(te=>te.key===e.tabKey),J=f.filter(te=>!te.archived),ee=te=>{let oe=!!String(e.startDate??"").trim();if(P(te),oe||o||s)return;let se=Uc(te);Number.isNaN(se.getTime())||se.getTime()<=Date.now()||K3("\uC2DC\uC791\uC77C\uC2DC\uAC00 \uB418\uBA74 \uCC45\uC784\uC790\uC5D0\uAC8C \uC54C\uB9BC\uC774 \uBC1C\uC1A1\uB429\uB2C8\uB2E4.")},ne=et(vt,{icon:et($3,{sx:{fontSize:17}}),label:"\uC0AC\uC804\uC54C\uB9BC",onClick:O||m?void 0:te=>M(te),sx:Z(s?8:5,2,!0),children:e.reminders.length===0?et(ci,{label:"\uC5C6\uC74C"}):au(e.reminders)});return xn(ia,{children:[xn(Al,{sx:{display:"grid",gridTemplateColumns:"repeat(2, minmax(0, 1fr))",gridAutoFlow:"row dense",columnGap:3,rowGap:0,px:2,[Hn]:{gridTemplateColumns:"minmax(0, 1fr)"}},children:[B,R?xn(ia,{children:[xn(vt,{icon:et(G3,{sx:{fontSize:17}}),label:"\uAC00\uB9F9\uC810",sx:Z(0,1),children:[R.licenseName||et(ci,{}),R.contactPhone?et(Al,{component:"span",sx:{ml:1,color:"#6f6f6c",fontSize:"0.92em"},children:R.contactPhone}):null,R.contactEmail?et(Al,{component:"span",sx:{ml:1,color:"#6f6f6c",fontSize:"0.92em"},children:R.contactEmail}):null]}),et(vt,{icon:et(Y3,{sx:{fontSize:17}}),label:"\uC720\uD615",sx:Z(0,2),children:R.supportType||et(ci,{})})]}):null,k?null:et(vt,{icon:et(N3,{sx:{fontSize:17}}),label:"\uD504\uB85C\uC81D\uD2B8",onClick:O?void 0:te=>w(te),sx:X&&i==="full"?[Z(1,void 0,!0),{gridColumn:"1 / -1"}]:Z(1,i==="full"?1:i,!0),children:Y?(()=>{let te=Et(Y.icon);return xn(ia,{children:[te?et(te,{sx:{fontSize:16,color:"#1e3a8a"}}):null,Y.label]})})():"\uAE30\uBCF8"}),a,o?et(vt,{icon:et(Tp,{sx:{fontSize:17}}),label:"\uB300\uC0C1\uC790",onClick:O?void 0:()=>p("targets"),sx:Z(7,1),children:u||"\uBAA8\uB4E0 \uC9C1\uC6D0"}):null,!o&&!s?et(vt,{icon:et(j3,{sx:{fontSize:17}}),label:"\uCC45\uC784\uC790",onClick:l||O||!e.managerName&&x?void 0:()=>p("manager"),sx:Z(7,1),children:e.managerName?xn(ia,{children:[et(Jr,{names:[e.managerName],size:20,avatarSrcByName:g}),e.managerName]}):x??et(ci,{})}):null,n,s?null:et(vt,{icon:et(L3,{sx:{fontSize:17}}),label:"\uC2DC\uC791\uC77C\uC2DC",onClick:O?void 0:te=>E(te),sx:Z(2,2),children:e.startDate?Cp(e.startDate):et(ci,{})}),o?null:et(vt,{icon:et(Tp,{sx:{fontSize:17}}),label:s?"\uCC38\uC11D\uC790":"\uCC38\uC870\uC790",onClick:O?void 0:()=>p("receivers"),sx:Z(s?7:8,1),children:e.receiverNames.length>0?xn(ia,{children:[et(Jr,{names:e.receiverNames,size:20,avatarSrcByName:g}),e.receiverNames.length===1?e.receiverNames[0]:null]}):et(ci,{})}),r?null:et(vt,{icon:et(z3,{sx:{fontSize:17}}),label:s?"\uB0A0\uC9DC":"\uB9C8\uAC10\uC608\uC815",onClick:O?void 0:te=>L(te),sx:Z(3,2),children:e.dueDate?s?Cn(e.dueDate):Cp(e.dueDate):et(ci,{})}),s?et(vt,{icon:et(q3,{sx:{fontSize:17}}),label:"\uC2DC\uAC01",onClick:O?void 0:te=>G(te),sx:uo(4),children:e.eventTime?e.eventTime:et(ci,{label:"\uC885\uC77C"})}):null,s?et(vt,{icon:et(W3,{sx:{fontSize:17}}),label:"\uC7A5\uC18C",sx:uo(5),children:et(Lo,{value:e.eventPlace??"",placeholder:"\uC7A5\uC18C \uC785\uB825",readOnly:O,onCommit:te=>S?.(te)})}):null,!t&&s?ne:null,s?et(vt,{icon:et(U3,{sx:{fontSize:17}}),label:"\uC8FC\uC18C",sx:[{gridColumn:"1 / -1"},uo(6)],children:et(Sp,{value:e.eventAddress??"",placeholder:"\uC8FC\uC18C \uC785\uB825",readOnly:O,onCommit:te=>D?.(te)})}):null,s?null:et(vt,{icon:et(F3,{sx:{fontSize:17}}),label:"\uC911\uC694\uB3C4",onClick:h?void 0:te=>$(te),sx:Z(6,1,!0),children:et(Xr,{priority:e.priority,small:!0})}),!t&&!s?ne:null,j]}),xn(Hu,{transitionDuration:0,anchorEl:v,open:!!v,onClose:()=>w(null),...W,children:[xn(oa,{selected:!e.tabKey,onClick:()=>{A(""),w(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[et(H3,{sx:{fontSize:17,color:"#9a9a97"}}),"\uC5C6\uC74C",e.tabKey?null:et(Ol,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}})]}),J.map(te=>{let oe=Et(te.icon),se=e.tabKey===te.key;return xn(oa,{selected:se,onClick:()=>{A(te.key),w(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[oe?et(oe,{sx:{fontSize:17,color:"#1e3a8a"}}):null,te.label,se?et(Ol,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},te.key)}),y?[et(A3,{},"add-project-divider"),xn(oa,{onClick:()=>C(!0),sx:{fontSize:14,color:"#787774"},children:[et(D3,{children:et(P3,{sx:{fontSize:18,color:"#787774"}})}),"\uD504\uB85C\uC81D\uD2B8 \uCD94\uAC00"]},"add-project")]:null]}),y?et(pl,{open:_,onClose:()=>C(!1),onSubmit:(te,oe,se)=>{(async()=>{let de=await y(te,oe,se);de&&A(de)})(),w(null)}}):null,et(Hu,{transitionDuration:0,anchorEl:F,open:!!F,onClose:()=>$(null),...W,children:["high","medium","low"].map(te=>xn(oa,{selected:e.priority===te,onClick:()=>{z(te),$(null)},sx:{fontSize:14,minWidth:130,gap:1},children:[et(Xr,{priority:te,small:!0}),e.priority===te?et(Ol,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},te))}),et(Hu,{transitionDuration:0,anchorEl:K,open:!!K,onClose:()=>M(null),...W,children:su(s?!!e.eventTime:String(e.dueDate??"").includes(" ")).map(te=>{let oe=te.value==="none"?e.reminders.length===0:e.reminders.includes(te.value);return xn(oa,{selected:oe,onClick:()=>{q(dl(e.reminders,te.value)),te.value==="none"&&M(null)},sx:{fontSize:14,minWidth:150,gap:1},children:[te.label,oe?et(Ol,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},te.value)})}),s?et(V3,{anchorEl:U,open:!!U,onClose:()=>G(null),value:X3(e.eventTime),format:"HH:mm",minuteStep:10,autoApply:!0,centered:V,locale:"ko",onChange:(te,oe)=>{T?.(`${te}:${oe}`),G(null)}}):null,et(Bn,{anchorEl:H,open:!!H,date:e.startDate,reminders:[],hideReminder:!0,showTime:!0,centered:V,onClose:()=>E(null),onDateChange:ee,onReminderChange:()=>{}}),et(Bn,{anchorEl:I,open:!!I,date:e.dueDate,reminders:e.reminders,hideReminder:m||t,showTime:!s,centered:V,onClose:()=>L(null),onDateChange:N,onReminderChange:q})]})}import{useState as Z3}from"react";import{Box as J3,Menu as Q3,MenuItem as e5}from"@mui/material";import t5 from"@mui/icons-material/RepeatOutlined";import r5 from"@mui/icons-material/DevicesOutlined";import n5 from"@mui/icons-material/ScreenSearchDesktopOutlined";import o5 from"@mui/icons-material/SellOutlined";import i5 from"@mui/icons-material/TaskAltOutlined";import{Fragment as Bp,jsx as Mr,jsxs as Ip}from"react/jsx-runtime";function Wu({label:e="\uBE44\uC5B4 \uC788\uC74C"}){return Mr(J3,{component:"span",sx:{color:"#9a9a97"},children:e})}function Pl({values:e,readOnly:f=!1,showResolution:g=!1,onChangeRepro:l,onChangeDevice:o,onChangeWhere:s,onChangeVersion:r,onChangeResolution:t}){let[n,c]=Z3(null),i=n?.field==="repro"?Fc:n?.field==="device"?qc:$c,a=h=>{n?.field==="repro"?l(h):n?.field==="device"?o(h):n?.field==="resolution"&&t?.(h),c(null)};return Ip(Bp,{children:[Ip(Bp,{children:[Mr(vt,{icon:Mr(t5,{sx:{fontSize:17}}),label:"\uC7AC\uD604\uBE48\uB3C4",onClick:f?void 0:h=>c({field:"repro",el:h}),children:Md(e.repro)||Mr(Wu,{label:"\uC120\uD0DD"})}),Mr(vt,{icon:Mr(r5,{sx:{fontSize:17}}),label:"\uB514\uBC14\uC774\uC2A4",onClick:f?void 0:h=>c({field:"device",el:h}),children:Rd(e.device)||Mr(Wu,{label:"\uC120\uD0DD"})}),Mr(vt,{icon:Mr(n5,{sx:{fontSize:17}}),label:"\uBC1C\uC0DD\uD654\uBA74",children:Mr(Lo,{value:e.where,placeholder:"\uC608: POS > \uC8FC\uBB38\uD604\uD669",readOnly:f,onCommit:s})}),Mr(vt,{icon:Mr(o5,{sx:{fontSize:17}}),label:"\uBC1C\uC0DD\uBC84\uC804",children:Mr(Lo,{value:e.version,placeholder:"\uC608: 2026-08-06 \uBC30\uD3EC",readOnly:f,onCommit:r})}),g?Mr(vt,{icon:Mr(i5,{sx:{fontSize:17}}),label:"\uC885\uB8CC\uC0AC\uC720",onClick:f?void 0:h=>c({field:"resolution",el:h}),children:Va(e.resolution)||Mr(Wu,{label:"\uC120\uD0DD"})}):null]}),Mr(Q3,{open:!!n,anchorEl:n?.el??null,onClose:()=>c(null),transitionDuration:0,children:i.map(h=>Mr(e5,{onClick:()=>a(h.key),sx:{fontSize:14},children:h.name},h.key))})]})}import{Box as Ep}from"@mui/material";import{jsxs as Mp}from"react/jsx-runtime";var Uu=16;function Mn({icon:e,title:f,titleExtra:g,children:l}){return Mp(Ep,{sx:{px:2,display:"flex",flexDirection:"column",gap:.25},children:[Mp(Ep,{sx:{display:"flex",alignItems:"center",gap:1,fontSize:Uu,fontWeight:500,color:"#37352f"},children:[e,f,g]}),l]})}import{useState as Vu}from"react";import{Box as Ku,Button as s5,Divider as a5,IconButton as Rp,Menu as l5,MenuItem as Gu,Tooltip as c5}from"@mui/material";import u5 from"@mui/icons-material/MoreVert";import{ConfirmDialog as f5}from"@ehfuse/alerts";import{FormDialog as d5}from"@ehfuse/mui-form-dialog";import{ClearTextField as h5}from"@ehfuse/mui-form-controls";import{Fragment as p5,jsx as vn,jsxs as Nl}from"react/jsx-runtime";function Op(e){return String(e??"").replace(/<[^>]*>/g,"").replace(/&nbsp;/g," ").trim().length>0}function Ll({content:e,templates:f,onApply:g,onSave:l,onRemove:o}){let[s,r]=Vu(null),[t,n]=Vu(!1),[c,i]=Vu(""),a=async h=>{r(null),!(Op(e)&&!await f5({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?`}))&&g(h.content)};return Nl(p5,{children:[vn(c5,{title:"\uBCF8\uBB38 \uC591\uC2DD",arrow:!0,disableInteractive:!0,children:vn(Rp,{size:"small","aria-label":"\uBCF8\uBB38 \uC591\uC2DD",onClick:h=>r(h.currentTarget),sx:{ml:"auto",color:"#9a9a97"},children:vn(u5,{sx:{fontSize:18}})})}),Nl(l5,{anchorEl:s,open:!!s,onClose:()=>r(null),transitionDuration:0,children:[l?vn(Gu,{disabled:!Op(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?vn(a5,{sx:{my:.5}}):null,f.length===0?vn(Gu,{disabled:!0,sx:{fontSize:14,minWidth:220},children:"\uC800\uC7A5\uB41C \uC591\uC2DD\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"}):f.map(h=>Nl(Gu,{onClick:()=>{a(h)},sx:{fontSize:14,minWidth:220,gap:1},children:[vn(Ku,{sx:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:h.name}),o?vn(Rp,{size:"small","aria-label":`${h.name} \uC591\uC2DD \uC0AD\uC81C`,onClick:d=>{d.stopPropagation(),o(h.seq)},sx:{color:"#9a9a97"},children:vn(Ir,{sx:{fontSize:16}})}):null]},h.seq))]}),vn(d5,{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:vn(s5,{variant:"contained",disabled:!c.trim(),onClick:()=>{l?.(c.trim(),e),n(!1)},children:"\uC800\uC7A5"})},sections:[{id:"template-name",title:"",showTitle:!1,children:Nl(Ku,{sx:{display:"flex",flexDirection:"column",gap:1},children:[vn(Ku,{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."}),vn(h5,{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 zl,useRef as ui,useState as Ap}from"react";import{Box as sa,Button as Yu,IconButton as Xu,Tooltip as Zu,useMediaQuery as m5,useTheme as g5}from"@mui/material";import Dp from"@mui/icons-material/EditOutlined";import b5 from"@mui/icons-material/DoneOutlined";import Pp from"@mui/icons-material/Translate";import y5 from"@mui/icons-material/ContentCopyOutlined";import{EhfuseEditor as x5,ImageResizePlugin as v5,minimalToolbarOptions as w5}from"@ehfuse/editor";import{jsx as Pr,jsxs as jl}from"react/jsx-runtime";function Ju(e){let f=e.trim();return f?f.startsWith("<")?e:`<p>${f}</p>`:"<p></p>"}function aa(e){let f=e.replace(/<br\s*\/?>/gi,`
34
34
  `).replace(/<\/(p|div|li|h[1-6]|blockquote)>/gi,`
35
35
  `),g=document.createElement("div");return g.innerHTML=f,(g.textContent??"").replace(/\n{3,}/g,`
36
36
 
37
- `).trim()}function Fl({syncKey:e,value:f,onChange:g,readOnly:l=!1,viewFirst:o=!1,onTranslate:s,minHeight:r=180,height:t=0,onChangeHeight:n}){let{uploadContentImage:c,openExternalUrl:i}=ot(),a=y=>{i?i(y):window.open(y,"_blank","noopener,noreferrer")},[h,d]=Op(()=>!o||!aa(f).trim());zl(()=>{o&&d(!aa(f).trim())},[e,o]);let u=ui(null),b=ui(new m5),m=ui(null),x=t>0?t:0,k=ui(x),B=ui(n);B.current=n;let R=ui(null),j=ui(Date.now()+800),A=qt(),P=f5(),N=u5(P.breakpoints.down("sm")),[q,z]=Op(!1),T=()=>{let y=aa(f);y&&navigator.clipboard.writeText(y).then(()=>{z(!0),window.setTimeout(()=>z(!1),1500)})},S=(y,v=!1)=>y instanceof Element?y.closest(v?".taskbox-content-readview a[href]":".ehfuse-editor-content a[href]"):null,D=y=>A||y.ctrlKey||y.metaKey;zl(()=>{if(l)return;let y=Ju(f);R.current===y||R.current===f||(R.current=y,j.current=Date.now()+800,u.current?.setHtml(y))},[e,f,l]);let p=ui(-1);return zl(()=>{if(l||A||t<=0||p.current===t||(p.current=t,Math.abs(t-k.current)<1))return;let y=m.current?.querySelector(".ehfuse-editor-container");y&&(Math.abs(y.getBoundingClientRect().height-t)<1||(y.style.height=`${t}px`,k.current=t))},[l,A,t]),zl(()=>{if(l||A)return;let y=m.current?.querySelector(".ehfuse-editor-container");if(!y||typeof ResizeObserver>"u")return;let v,w=new ResizeObserver(_=>{let C=Math.round(_[0]?.contentRect.height??0);C<=0||(window.clearTimeout(v),v=window.setTimeout(()=>{Math.abs(C-k.current)<1||(k.current=C,B.current?.(C))},300))});return w.observe(y),()=>{window.clearTimeout(v),w.disconnect()}},[l,A]),l||!h?jl(sa,{sx:{position:"relative",mt:1},children:[Pr(sa,{onClickCapture:y=>{let v=S(y.target,!0);v&&(y.preventDefault(),y.stopPropagation(),a(v.href))},className:"taskbox-content-readview",sx:{border:"1px solid #e0e0e0",borderRadius:1,p:"12px",pr:N?"12px":"52px",minHeight:r,fontSize:16,lineHeight:1.6,color:"#37352f",wordBreak:"break-word",userSelect:l?"none":"text","& > p:first-of-type":{mt:0},"& > p:last-of-type":{mb:0},"& a[href]":{color:"#2563eb",textDecoration:"underline",cursor:"pointer"},"& img":{maxWidth:"100%"}},dangerouslySetInnerHTML:{__html:Ju(f)}}),N?jl(sa,{sx:{display:"flex",gap:1,mt:1},children:[Pr(Yu,{variant:"outlined",color:"inherit",startIcon:Pr(h5,{sx:{fontSize:18}}),onClick:T,sx:{flex:1,fontSize:15,color:"#37352f",borderColor:"#d9d9d6"},children:q?"\uBCF5\uC0AC\uB428":"\uBCF5\uC0AC"}),l?null:Pr(Yu,{variant:"outlined",color:"inherit",startIcon:Pr(Ap,{sx:{fontSize:18}}),onClick:()=>d(!0),sx:{flex:1,fontSize:15,color:"#37352f",borderColor:"#d9d9d6"},children:"\uC218\uC815"}),s?Pr(Yu,{variant:"outlined",color:"inherit",startIcon:Pr(Dp,{sx:{fontSize:18}}),onClick:s,sx:{flex:1,fontSize:15,color:"#37352f",borderColor:"#d9d9d6"},children:"\uBC88\uC5ED"}):null]}):jl(sa,{sx:{position:"absolute",top:6,right:6,display:"flex",flexDirection:"column",gap:.25},children:[l?null:Pr(Zu,{title:"\uB0B4\uC6A9 \uC218\uC815",arrow:!0,placement:"left",children:Pr(Xu,{size:"small","aria-label":"\uB0B4\uC6A9 \uC218\uC815",onClick:()=>d(!0),sx:{color:"#9a9a97"},children:Pr(Ap,{sx:{fontSize:17}})})}),s?Pr(Zu,{title:"\uBC88\uC5ED",arrow:!0,placement:"left",children:Pr(Xu,{size:"small","aria-label":"\uBC88\uC5ED",onClick:s,sx:{color:"#9a9a97"},children:Pr(Dp,{sx:{fontSize:17}})})}):null]})]}):jl(sa,{ref:m,onDragOver:y=>y.stopPropagation(),onDrop:y=>y.stopPropagation(),onMouseDownCapture:y=>{D(y)&&S(y.target)&&y.preventDefault()},onClickCapture:y=>{let v=D(y)?S(y.target):null;v&&(y.preventDefault(),y.stopPropagation(),a(v.href))},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"},...A?{"& .ehfuse-editor-content a[href]":{cursor:"pointer"}}:{},position:"relative"},children:[o?Pr(Zu,{title:"\uD3B8\uC9D1 \uB05D(\uC77D\uAE30 \uBAA8\uB4DC)",arrow:!0,children:Pr(Xu,{size:"small","aria-label":"\uD3B8\uC9D1 \uB05D",onMouseDown:y=>y.preventDefault(),onClick:()=>d(!1),sx:{position:"absolute",top:4,right:6,zIndex:2,color:"#2f9e5b"},children:Pr(d5,{sx:{fontSize:19}})})}):null,Pr(p5,{ref:u,defaultValue:Ju(f),autoHeight:A,resizable:!A,showToolbar:!A,focusBorder:!0,styles:{focusBorderColor:"var(--primary)"},toolbarOptions:g5,plugins:[b.current],locale:"ko",minHeight:x||r,placeholder:"\uB0B4\uC6A9\uC744 \uC785\uB825\uD558\uC138\uC694",onImageUpload:c,contentStyle:{padding:"12px"},onChange:y=>{let v=Date.now()<j.current,w=y===R.current;R.current=y,!(v||w)&&g(y)}})]})}import{useState as Li}from"react";import{Box as wr,Button as Np,Dialog as I5,IconButton as us,Switch as E5,TextField as M5,Tooltip as ef}from"@mui/material";import{DndContext as R5,PointerSensor as O5,closestCenter as A5,useSensor as D5,useSensors as P5}from"@dnd-kit/core";import{restrictToParentElement as N5,restrictToVerticalAxis as L5}from"@dnd-kit/modifiers";import{SortableContext as z5,arrayMove as j5,useSortable as F5,verticalListSortingStrategy as q5}from"@dnd-kit/sortable";import{CSS as $5}from"@dnd-kit/utilities";import Lp from"@mui/icons-material/Close";import H5 from"@mui/icons-material/AddCircle";import zp from"@mui/icons-material/AddTask";import W5 from"@mui/icons-material/Checklist";import U5 from"@mui/icons-material/CheckCircle";import V5 from"@mui/icons-material/DragIndicator";import K5 from"@mui/icons-material/Launch";import G5 from"@mui/icons-material/LinkOutlined";import Y5 from"@mui/icons-material/RadioButtonUnchecked";import{useEffect as b5,useMemo as y5,useState as Qu}from"react";import{Box as fo,Button as x5,Tab as v5,Tabs as w5}from"@mui/material";import{FormDialog as _5}from"@ehfuse/mui-form-dialog";import{ClearTextField as k5}from"@ehfuse/mui-form-controls";import{ErrorAlert as S5}from"@ehfuse/alerts";import T5 from"@mui/icons-material/CheckCircle";import C5 from"@mui/icons-material/RadioButtonUnchecked";import{OverlayScrollbar as B5}from"@ehfuse/overlay-scrollbar";import{jsx as qr,jsxs as ql}from"react/jsx-runtime";var Pp=[{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 $l({open:e,task:f,tasks:g,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=qt(),[a,h]=Qu("related"),[d,u]=Qu(""),[b,m]=Qu([]);b5(()=>{e&&(h("related"),u(""),m([]))},[e]);let x=y5(()=>{let A=new Set([f.seq,...l]),P=d.trim().toLowerCase();return g.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)},[g,f.seq,l,d]),k=()=>{if(b.length===0){S5("\uC5F0\uACB0\uD560 \uC5C5\uBB34\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return}for(let A of b)s(A,a);o()},B=A=>{m(P=>P.includes(A)?P.filter(N=>N!==A):c?[...P,A]:[A])},R=Pp.find(A=>A.type===a)?.hint??"",j=ql(fo,{sx:{display:"flex",flexDirection:"column",minHeight:0,height:i?"100%":"auto"},children:[r?null:qr(w5,{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:Pp.map(A=>qr(v5,{value:A.type,label:A.label},A.type))}),r?null:qr(fo,{sx:{mt:1,mb:1.5,fontSize:14,flexShrink:0},children:R}),ql(fo,{sx:{...i?{height:"100%",minHeight:0}:{height:560},display:"flex",flexDirection:"column",...i?{}:{border:"1px solid #cccccc",borderRadius:1},overflow:"hidden",userSelect:"none"},children:[qr(fo,{sx:{px:1.5,py:1,borderBottom:"1px solid #cccccc",flexShrink:0},children:qr(k5,{placeholder:"\uC81C\uBAA9\xB7\uD2F0\uCF13\uBC88\uD638\uB85C \uAC80\uC0C9",value:d,onChange:A=>u(A.target.value),fullWidth:!0,autoFocus:!0,size:"small",sx:{"& .MuiOutlinedInput-notchedOutline":{border:"none"},"& .MuiInputBase-root":{px:0}}})}),qr(fo,{sx:{flex:1,minHeight:0},children:qr(B5,{style:{height:"100%"},contentStyle:{paddingTop:0},children:qr(fo,{sx:{display:"flex",flexDirection:"column"},children:x.length===0?qr(fo,{sx:{py:4,textAlign:"center",fontSize:13.5,color:"#9a9a97"},children:"\uC5F0\uACB0\uD560 \uC218 \uC788\uB294 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):x.map(A=>{let P=A.is_notice||A.is_event?Et(A.icon||(A.is_notice?pr:yr)):null,N=b.includes(A.seq);return ql(fo,{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?qr(T5,{sx:{fontSize:20,flexShrink:0,color:"#2f6fd0"}}):qr(C5,{sx:{fontSize:20,flexShrink:0,color:"#c9c8c5"}}),P?qr(P,{sx:{fontSize:17,flexShrink:0,color:A.icon_color||"#1e3a8a"}}):null,ql(fo,{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]}),qr(fo,{sx:{flexShrink:0,display:"flex",alignItems:"center"},children:qr(Lt,{option:xr(A)})})]},A.seq)})})})})]})]});return qr(_5,{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:j}],scrollPastLastSection:!1,sectionContentPaddingTop:0,contentTopPadding:12,actions:{showCancelButton:!0,right:qr(x5,{variant:"contained",disabled:b.length===0,onClick:k,children:n})}})}import{Fragment as J5,jsx as gt,jsxs as ho}from"react/jsx-runtime";var jp="taskbox.checklist.hideCompleted";function X5({id:e,children:f}){let{attributes:g,listeners:l,setNodeRef:o,transform:s,transition:r,isDragging:t}=F5({id:e});return gt(wr,{ref:o,sx:{transform:$5.Transform.toString(s),transition:r,...t?{opacity:.6,position:"relative",zIndex:1}:{}},children:f({handleProps:{...g,...l},dragging:t})})}function Z5({sortable:e,sensors:f,rowIds:g,onDragEnd:l,children:o}){let s=gt(wr,{sx:{display:"flex",flexDirection:"column",mt:.5,pl:3.25},children:o});return e?gt(R5,{sensors:f,collisionDetection:A5,modifiers:[L5,N5],onDragEnd:l,children:gt(z5,{items:g,strategy:q5,children:s})}):s}function Hl({taskSeq:e,checklist:f,onAdd:g,onToggle:l,confirmOnToggle:o=!1,onRemove:s,onUpdate:r,onReorder:t,removeLocked:n=!1,onConvertToTask:c,onOpenLinkedTask:i,linkCandidates:a,linkBaseTask:h,onLinkExistingTask:d,resolveLinkedTask:u,myAccountSeq:b=0}){let[m,x]=Li(""),[k,B]=Li(!1),[R,j]=Li(null),A=qt(),[P,N]=Li(null),[q,z]=Li(null),[T,S]=Li(null),D=L=>{let U=L.task_seq?u?.(L.task_seq):void 0;return U?U.completed:L.checked},p=L=>{if(!L.task_seq||b<=0)return!1;let U=u?.(L.task_seq);return U?!Kd(U,b):!1},y=L=>!!L.task_seq&&!!u&&!u?.(L.task_seq),v=f.filter(L=>!y(L)),w=v.filter(D).length,[_,C]=Li(()=>{try{return localStorage.getItem(jp)==="1"}catch{return!1}}),O=L=>{C(L);try{localStorage.setItem(jp,L?"1":"0")}catch{}},F=!!t&&!A&&!n,$=P5(D5(O5,{activationConstraint:{distance:5}})),K=(L,U)=>L.task_seq?`linked-${L.task_seq}`:`row-${U}`,M=f.map(K),H=M.filter((L,U)=>{let G=f[U];return y(G)?!1:!(_&&D(G))}),E=L=>{let{active:U,over:G}=L;if(!G||U.id===G.id)return;let V=M.indexOf(String(U.id)),W=M.indexOf(String(G.id));V<0||W<0||t?.(e,j5(f,V,W))},I=()=>{m.trim()&&(g(e,m),x(""))};return ho(Mn,{icon:gt(W5,{sx:{fontSize:19,display:"block"}}),title:ho(J5,{children:["\uD560\uC77C",f.length>0?ho(wr,{component:"span",sx:{fontSize:12.5,color:"#9a9a97"},children:[w," / ",f.length]}):null]}),titleExtra:v.length>0?ho(wr,{sx:{flex:1,minWidth:0,ml:1,display:"flex",alignItems:"center",gap:1},children:[gt(wr,{sx:{flex:1,minWidth:0,height:6,borderRadius:3,bgcolor:"#ececea"},children:gt(wr,{sx:{height:"100%",borderRadius:3,width:`${Math.round(w/v.length*100)}%`,bgcolor:"#2f80ed",transition:"width 0.2s"}})}),w>0?ho(wr,{component:"label",sx:{display:"inline-flex",alignItems:"center",gap:.25,flexShrink:0,cursor:"pointer",fontSize:13.5,fontWeight:400,color:"#57564f",userSelect:"none"},children:[gt(E5,{size:"small",checked:_,onChange:(L,U)=>O(U)}),"\uC644\uB8CC\uC228\uAE40"]}):null]}):null,children:[gt(Z5,{sortable:F,sensors:$,rowIds:H,onDragEnd:E,children:f.map((L,U)=>{let G=L.task_seq?u?.(L.task_seq):void 0,V=D(L);if(_&&V||y(L))return null;let W=!!L.task_seq,X=p(L),Z=Y=>ho(wr,{sx:{display:"flex",alignItems:A?"flex-start":"center",gap:1,px:1.25,...F?{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:[Y?gt(wr,{className:"taskbox-checklist-handle",...Y,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:gt(V5,{sx:{fontSize:16}})}):null,gt(ef,{title:X?"\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:gt(wr,{component:"span",onClick:X?void 0:J=>o?S({anchorEl:J.currentTarget,index:U,checked:!V}):l(e,U,!V),sx:{display:"inline-flex",flexShrink:0,cursor:X?"default":"pointer",...A?{mt:"1px"}:{}},children:V?gt(U5,{sx:{fontSize:18,color:X?"#a9c6ec":"#2f80ed"}}):gt(Y5,{sx:{fontSize:18,color:X?"#d6d5d1":"#9a9a97"}})})}),R?.index===U?gt(wr,{component:"input",autoFocus:!0,spellCheck:!1,value:R.label,enterKeyHint:"done",onChange:J=>j({index:U,label:J.target.value}),onBlur:()=>{R.label.trim()&&R.label.trim()!==L.label&&r?.(e,U,R.label),j(null)},onKeyDown:J=>{J.key==="Enter"&&J.target.blur(),J.key==="Escape"&&j(null)},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:14,color:"#37352f",bgcolor:"transparent",p:0}}):gt(wr,{component:"span",onClick:W?L.task_seq&&i?()=>i(L.task_seq):void 0:n||!r?void 0:A?()=>N({index:U,label:L.label}):()=>j({index:U,label:L.label}),sx:{flex:1,minWidth:0,fontSize:14.5,color:"#37352f",textDecoration:V?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",...A?{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:3,lineHeight:1.4,wordBreak:"break-word"}:{whiteSpace:"nowrap"},...W?i?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}:n||!r?{}:{cursor:"text"}},children:L.label}),W?ho(wr,{component:"span",onClick:L.task_seq&&i?()=>i(L.task_seq):void 0,sx:{display:"inline-flex",alignItems:"center",gap:.4,flexShrink:0,...A?{mt:"1px"}:{},px:.75,py:.2,borderRadius:1,fontSize:12,fontWeight:500,color:"#1d4f91",bgcolor:"#e3eefb",whiteSpace:"nowrap",...i?{cursor:"pointer"}:{}},children:[gt(K5,{sx:{fontSize:12}}),G?.manager_name?.trim()||"\uC5C5\uBB34"]}):null,!n&&!W&&c?gt(ef,{title:"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",arrow:!0,enterDelay:300,disableInteractive:!0,children:gt(us,{className:"taskbox-checklist-convert",size:"small","aria-label":"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",onClick:J=>z({anchorEl:J.currentTarget,index:U,label:L.label}),sx:{display:A?"none":"inline-flex",opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:gt(zp,{sx:{fontSize:16}})})}):null,n?null:gt(us,{className:"taskbox-checklist-remove",size:"small","aria-label":"\uD560\uC77C \uC0AD\uC81C",onClick:()=>s(e,U),sx:{display:A?"none":"inline-flex",opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:gt(Lp,{sx:{fontSize:15}})})]});return F?gt(X5,{id:M[U],children:({handleProps:Y})=>Z(Y)},M[U]):gt(wr,{children:Z(null)},M[U])})}),ho(wr,{sx:{mt:.5,ml:3.25,display:"flex",alignItems:"center",gap:.5},children:[gt(wr,{component:"input",spellCheck:!1,value:m,placeholder:"+ \uD560\uC77C \uCD94\uAC00",enterKeyHint:"done",onChange:L=>x(L.target.value),onKeyDown:L=>{L.key==="Enter"&&I()},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:14,color:"#37352f",bgcolor:"transparent",px:1.25,py:.75,"&::placeholder":{color:"#9a9a97"}}}),a&&h&&d?gt(ef,{title:"\uAE30\uC874 \uC5C5\uBB34 \uBD99\uC774\uAE30",arrow:!0,children:gt(us,{size:"small","aria-label":"\uAE30\uC874 \uC5C5\uBB34 \uBD99\uC774\uAE30",onMouseDown:L=>L.preventDefault(),onClick:()=>B(!0),sx:{flexShrink:0,color:"#9a9a97"},children:gt(G5,{sx:{fontSize:20}})})}):null,gt(us,{size:"small","aria-label":"\uD560\uC77C \uCD94\uAC00",disabled:!m.trim(),onMouseDown:L=>L.preventDefault(),onClick:I,sx:{flexShrink:0,color:m.trim()?"#2f80ed":"#c9c8c5"},children:gt(H5,{sx:{fontSize:20}})})]}),a&&h&&d?gt($l,{open:k,task:h,tasks:a,excludeSeqs:f.map(L=>Number(L.task_seq??0)).filter(L=>L>0),hideRelationType:!0,multiSelect:!0,title:"\uAE30\uC874 \uC5C5\uBB34 \uBD99\uC774\uAE30",confirmLabel:"\uBD99\uC774\uAE30",onClose:()=>B(!1),onSubmit:L=>{let U=a.find(G=>G.seq===L);d(e,L,String(U?.title??"").trim())}}):null,gt(At,{open:!!q,anchorEl:q?.anchorEl??null,title:"\uC774 \uD560\uC77C\uC744 \uBCC4\uB3C4 \uC5C5\uBB34\uB85C \uB9CC\uB4DC\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uB9CC\uB4E4\uAE30",onCancel:()=>z(null),onConfirm:()=>{q&&c?.(e,q.index,q.label),z(null)}}),gt(At,{open:!!T,anchorEl:T?.anchorEl??null,title:T?.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:T?.checked?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>S(null),onConfirm:()=>{T&&l(e,T.index,T.checked),S(null)}}),gt(I5,{open:!!P,onClose:()=>N(null),maxWidth:"xs",fullWidth:!0,slotProps:{paper:{sx:{borderRadius:2,m:2}}},children:ho(wr,{sx:{p:2,display:"flex",flexDirection:"column",gap:1.5},children:[gt(wr,{sx:{fontSize:15.5,fontWeight:600,color:"#37352f"},children:"\uD560\uC77C \uC218\uC815"}),gt(M5,{autoFocus:!0,fullWidth:!0,size:"medium",value:P?.label??"",onChange:L=>N(U=>U&&{...U,label:L.target.value}),onKeyDown:L=>{if(L.key!=="Enter")return;let U=P;U&&U.label.trim()&&r?.(e,U.index,U.label.trim()),N(null)}}),ho(wr,{sx:{display:"flex",alignItems:"center",gap:1},children:[!n&&c&&P&&!f[P.index]?.task_seq?gt(us,{"aria-label":"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",onClick:()=>{c(e,P.index,f[P.index]?.label??""),N(null)},sx:{color:"#57564f"},children:gt(zp,{sx:{fontSize:20}})}):null,!n&&P?gt(us,{"aria-label":"\uD560\uC77C \uC0AD\uC81C",onClick:()=>{s(e,P.index),N(null)},sx:{color:"#e5484d"},children:gt(Lp,{sx:{fontSize:19}})}):null,gt(wr,{sx:{flex:1}}),gt(Np,{color:"inherit",onClick:()=>N(null),children:"\uCDE8\uC18C"}),gt(Np,{variant:"contained",disabled:!P?.label.trim(),onClick:()=>{P&&P.label.trim()&&r?.(e,P.index,P.label.trim()),N(null)},children:"\uD655\uC778"})]})]})})]})}import{useRef as ok,useState as ik}from"react";import{Box as po,IconButton as sk}from"@mui/material";import ak from"@mui/icons-material/Close";import $p from"@mui/icons-material/AttachFileOutlined";var Q5=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"]),Wl=e=>{let f=e?.split(".").pop()?.toLowerCase()??"";return Q5.has(f)};import{LinearProgress as ek}from"@mui/material";import{Fragment as tk,jsx as nk,jsxs as rk}from"react/jsx-runtime";function Fp(e){let f=To(),g=f.useValue("attachmentUpload.taskSeq"),l=f.useValue("attachmentUpload.index"),o=f.useValue("attachmentUpload.total"),s=f.useValue("attachmentUpload.queue"),r=l??0;return!r||e>0&&(g??0)!==e?null:{index:r,total:o??0,queue:s??[]}}function tf(){let f=To().useValue("attachmentUpload.progress");return rk(tk,{children:[f??0,"%"]})}function qp(){let f=To().useValue("attachmentUpload.progress");return nk(ek,{variant:"determinate",value:f??0,sx:{height:4,borderRadius:2,bgcolor:"#dbe9fb",mt:.75}})}import{Fragment as lk,jsx as fn,jsxs as la}from"react/jsx-runtime";function Ul(e){return e>=1048576?`${(e/1048576).toFixed(1)}MB`:`${Math.max(1,Math.round(e/1024))}KB`}var Vl={flex:1,minWidth:0,fontSize:13.5,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"};function Kl({taskSeq:e,attachments:f,onAdd:g,onRemove:l,removeLocked:o=!1,onPreview:s,onDownload:r}){let[t,n]=ik(!1),c=ok(null),i=qt(),a=Ls(),h=Ns(),d=Fp(e),u=e===0,b=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")},x=R=>d?R+1<d.index?"done":R+1===d.index?"uploading":"waiting":"waiting",k=(R,j,A,P={})=>la(po,{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:[la(po,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[fn($p,{sx:{fontSize:16,color:"#9a9a97"}}),j,fn(po,{component:"span",sx:{fontSize:12,color:P.uploading?"#2f80ed":"#9a9a97",flexShrink:0},children:A}),P.removeIndex!==void 0?fn(sk,{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:fn(ak,{sx:{fontSize:15}})}):null]}),P.uploading?fn(qp,{}):null]},R),B=R=>{let j=Wl(R.name);return fn(po,{component:"button",type:"button",onClick:()=>j?b(R):m(R),title:`${R.name} ${j?"\uBBF8\uB9AC\uBCF4\uAE30":"\uB2E4\uC6B4\uB85C\uB4DC"}`,sx:{...Vl,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 la(Mn,{icon:fn($p,{sx:{fontSize:18,display:"block"}}),title:la(lk,{children:["\uD30C\uC77C ",f.length>0?f.length:""]}),children:[la(po,{sx:{display:"flex",flexDirection:"column",gap:.5,mt:1},children:[f.map((R,j)=>{let A=`${R.uuid||R.name}-${j}`;if(u){let P=x(j),N=P==="uploading";return k(A,fn(po,{component:"span",sx:{...Vl,color:P==="done"?"#37352f":"#9a9a97"},children:R.name}),N?fn(tf,{}):Ul(R.size),{uploading:N,removeIndex:!o&&!d?j:void 0})}return R.uuid?k(A,B(R),Ul(R.size),{removeIndex:o?void 0:j}):k(A,fn(po,{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:{...Vl,color:"#9a9a97"},children:R.name}),Ul(R.size),{removeIndex:o?void 0:j})}),!u&&d?d.queue.slice(d.index-1).map((R,j)=>{let A=j===0;return k(`uploading-${d.index+j}-${R.name}`,fn(po,{component:"span",sx:{...Vl,color:"#9a9a97"},children:R.name}),A?fn(tf,{}):Ul(R.size),{uploading:A})}):null]}),fn(po,{onClick:()=>c.current?.click(),onDragOver:R=>{R.preventDefault(),n(!0)},onDragLeave:()=>n(!1),onDrop:R=>{R.preventDefault(),n(!1);let j=Array.from(R.dataTransfer.files);j.length>0&&g(e,j)},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)`}),fn(po,{component:"input",ref:c,type:"file",multiple:!0,onChange:R=>{let j=Array.from(R.target.files??[]);j.length>0&&g(e,j),R.target.value=""},sx:{display:"none"}})]})}import{useState as mk}from"react";import{Checkbox as gk,Divider as bk,ListItemIcon as yk,Menu as xk,MenuItem as Vp}from"@mui/material";import vk from"@mui/icons-material/Add";import{useEffect as ck,useState as Hp}from"react";import{Box as rf,Button as uk}from"@mui/material";import{FormDialog as fk}from"@ehfuse/mui-form-dialog";import{ClearTextField as dk}from"@ehfuse/mui-form-controls";import{ColorPicker as hk}from"@ehfuse/mui-color-picker";import{ErrorAlert as pk}from"@ehfuse/alerts";import{jsx as ca,jsxs as nf}from"react/jsx-runtime";var Wp="#2f80ed";function Up({open:e,onClose:f,onSubmit:g}){let[l,o]=Hp(""),[s,r]=Hp(Wp);ck(()=>{e&&(o(""),r(Wp))},[e]);let t=()=>{let i=l.trim();if(!i){pk("\uB77C\uBCA8 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}g(i,s),f()},n=Ad(s),c=nf(rf,{children:[nf(rf,{sx:{display:"flex",alignItems:"center",gap:1.5,mt:.5},children:[ca(dk,{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}),ca(hk,{value:s,onChange:i=>r(i),shape:"circle",colorSize:28})]}),nf(rf,{sx:{mt:2,display:"flex",alignItems:"center",gap:1,fontSize:13,color:"#787774"},children:["\uBBF8\uB9AC\uBCF4\uAE30",ca(Lt,{option:{key:"__preview__",name:l.trim()||"\uB77C\uBCA8",...n}})]})]});return ca(fk,{open:e,onClose:f,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:ca(uk,{variant:"contained",onClick:t,children:"\uCD94\uAC00"})}})}import{Fragment as wk,jsx as fs,jsxs as Gl}from"react/jsx-runtime";function Yl({anchorEl:e,selectedKeys:f,labelOptions:g,onToggle:l,onAddLabel:o,onClose:s}){let[r,t]=mk(!1),n=Jn();return Gl(wk,{children:[Gl(xk,{anchorEl:e,open:!!e,onClose:s,transitionDuration:0,...n,children:[g.map(c=>{let i=f.includes(c.key);return Gl(Vp,{onClick:()=>l(c.key),sx:{fontSize:14,minWidth:170,gap:1},children:[fs(gk,{size:"small",checked:i,sx:{p:0}}),fs(Lt,{option:c})]},c.key)}),fs(bk,{}),Gl(Vp,{onClick:()=>t(!0),sx:{fontSize:14,color:"#787774"},children:[fs(yk,{children:fs(vk,{sx:{fontSize:18,color:"#787774"}})}),"\uB77C\uBCA8 \uCD94\uAC00"]})]}),fs(Up,{open:r,onClose:()=>t(!1),onSubmit:o})]})}function Kp(e,f){let g=Number(e.author_account_seq??0);return f.filter(l=>{let o=Number(l.account_seq??0);return o>0&&o!==g})}function Gp(e,f){let g=(e.target_account_seqs??[]).filter(a=>a>0);if(g.length===0)return null;let l=new Set(g),o=Kp(e,f),s=new Map;for(let a of o){let h=String(a.department??"").trim();if(!h)continue;let d=s.get(h)??[];d.push(a),s.set(h,d)}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 g.forEach((a,h)=>{t.has(a)||i.push(n.get(a)??c[h]??"\uC774\uB984\uC5C6\uC74C")}),{teamNames:r,individualNames:i}}function Xl(e,f){let g=Gp(e,f);return g?[...g.teamNames,...g.individualNames].join(", "):"\uBAA8\uB4E0 \uC9C1\uC6D0"}function kj(e,f){let g=Gp(e,f);return g?{kind:"members",teamNames:g.teamNames,individualNames:g.individualNames}:{kind:"everyone"}}function Yp(e,f,g){let l=(e.target_account_seqs??[]).filter(d=>d>0),o=Kp(e,f),s=l.length>0?l.length:o.length,r=e.acks??[],t=g>0&&r.some(d=>d.account_seq===g),n=g>0&&Number(e.author_account_seq??0)===g,c=l.length===0||l.includes(g),i=new Set(r.map(d=>d.account_seq)),h=(l.length>0?o.filter(d=>l.includes(Number(d.account_seq??0))):o).filter(d=>!i.has(Number(d.account_seq??0))).map(d=>String(d.name??"").trim()).filter(d=>d.length>0);return{count:r.length,total:s,acked:t,pendingNames:h,canAck:g>0&&!n&&c&&!t&&!e.completed}}function Xp(e,f){let g=Number(f)||50,l=g*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 ${g}MB \uAE4C\uC9C0 \uCCA8\uBD80\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
38
- \uC81C\uC678\uB41C \uD30C\uC77C: ${o.map(t=>t.name).join(", ")}`:null;return{accepted:s,rejected:o,message:r}}import{DatePicker as Ok}from"@ehfuse/mui-datetime-picker";import{Fragment as da,jsx as ut,jsxs as ji}from"react/jsx-runtime";var tm="#0f9d58";function af({form:e,statusOptions:f,customTabs:g,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:d=0,onMemberEdit:u,onAddProject:b,onAddLabelOption:m,contentSyncKey:x="create",contentTemplates:k,onSaveContentTemplate:B,onRemoveContentTemplate:R}){let j=To(),A=Ls(),P=e.useFormValue("manager_name"),N=e.useFormValue("receiver_names"),q=e.useFormValue("start_date"),z=!!e.useFormValue("is_event"),T=!!e.useFormValue("is_bug"),S=e.useFormValue("bug_repro")??"",D=e.useFormValue("bug_device")??"",p=e.useFormValue("bug_where")??"",y=e.useFormValue("bug_version")??"",v=e.useFormValue("event_time")??"",w=e.useFormValue("event_place")??"",_=e.useFormValue("event_address")??"",C=e.useFormValue("due_date"),O=e.useFormValue("reminders")??[],F=e.useFormValue("priority"),$=e.useFormValue("content"),M=e.useFormValue("checklist")??[],H=e.useFormValue("tab_key"),E=e.useFormValue("sprint_seq")??0,I=e.useFormValue("story_points")??0,L=g.find(ie=>ie.key===H&&ie.useSprints),U=L?l.filter(ie=>`custom-${ie.group_seq}`===H):[],[G,V]=ua(null),W=e.useFormValue("label_keys"),[X,Z]=ua(null),Y=e.useFormValue("visibility")||"involved",J=Number(e.useFormValue("visibility_group_seq")??0),[ee,ne]=ua(null),te=e.useFormValue("repeat_rule")||"",oe=e.useFormValue("repeat_until")||"",[se,de]=ua(null),[ge,ke]=ua(null),Be=e.useFormValue("target_names"),Te=e.useFormValue("target_account_seqs"),it=j.useValue("createAttachmentFiles")??[],be=s?Xl({author_account_seq:a,target_names:Be,target_account_seqs:Te},i):"";return ji(da,{children:[n,s?null:ut(zi,{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(ie=>{let Ce=T?"bug":z?"event":"task",we=Ce===ie.value;return ut(_k,{onClick:()=>{if(Ce===ie.value)return;e.setFormValue("is_event",ie.value==="event"),e.setFormValue("is_bug",ie.value==="bug"),e.setFormValue("visibility",ie.value==="bug"?"all":"involved"),e.setFormValue("visibility_group_seq",0),ie.value==="bug"&&(e.setFormValue("repeat_rule",""),e.setFormValue("repeat_until",""));let ve=e.getFormValue("icon"),Ke=e.getFormValue("icon_color"),De=[So,"event",zs].includes(ve),pe=!Ke||Ke===tm||Ke===js;De&&e.setFormValue("icon",ie.value==="event"?"event":ie.value==="bug"?zs:So),pe&&e.setFormValue("icon_color",ie.value==="event"?tm:ie.value==="bug"?js:"")},sx:{px:1.75,py:.75,borderRadius:99,fontSize:13.5,fontWeight:we?600:400,color:we?"#ffffff":"#787774",bgcolor:we?"#2563eb":"#f4f4f2"},children:ie.label},ie.label)})}),ut(fa,{sx:{borderColor:"#e6e6e3"}}),ji(zi,{sx:{py:1.5,display:"flex",flexDirection:"column",gap:.25},children:[ut(Dl,{hideProject:r,hideDueDate:!z&&!!te,values:{tabKey:H,managerName:P,receiverNames:N,startDate:q,dueDate:C,reminders:O,priority:F,eventTime:v,eventPlace:w,eventAddress:_},customTabs:g,avatarSrcByName:o,notice:s,event:z,onChangeEventTime:ie=>e.setFormValue("event_time",ie),onChangeEventPlace:ie=>e.setFormValue("event_place",ie),onChangeEventAddress:ie=>e.setFormValue("event_address",ie),targetSummary:be,onChangeProject:ie=>e.setFormValue("tab_key",ie),onAddProject:b,onChangeStartDate:ie=>e.setFormValue("start_date",ie),onChangeDueDate:ie=>e.setFormValue("due_date",ie),onChangeReminder:ie=>e.setFormValue("reminders",ie),onChangePriority:ie=>e.setFormValue("priority",ie),onMemberEdit:u,pinColumns:!0,beforeStart:ji(da,{children:[!s&&!T?ut(vt,{icon:ut(Ik,{sx:{fontSize:17,...te?{color:"#2f80ed"}:{}}}),label:"\uBC18\uBCF5",onClick:ie=>de(ie),sx:z?void 0:cr(2),children:te?El(te):ut(zi,{component:"span",sx:{color:"#9a9a97"},children:"\uC5C6\uC74C"})}):null,!s&&!T&&te?ut(vt,{icon:ut(Ek,{sx:{fontSize:17}}),label:"\uBC18\uBCF5 \uC885\uB8CC",onClick:ie=>ke(ie),sx:z?void 0:cr(2),children:oe?Cn(oe):ut(zi,{component:"span",sx:{color:"#9a9a97"},children:"\uC790\uB3D9"})}):null]}),trailing:ji(da,{children:[s?null:ut(vt,{icon:Y==="all"?ut(Jp,{sx:{fontSize:17,color:"#2f80ed"}}):Y==="group"?ut(Qp,{sx:{fontSize:17,color:"#d9730d"}}):ut(Zp,{sx:{fontSize:17}}),label:"\uACF5\uAC1C",onClick:ie=>ne(ie),sx:z?void 0:cr(1),children:Y==="all"?"\uC804\uCCB4\uACF5\uAC1C":Y==="group"?`\uBD80\uC11C\uACF5\uAC1C \xB7 ${h.find(ie=>ie.seq===J)?.name??"\uBD80\uC11C"}`:"\uBE44\uACF5\uAC1C"}),L&&!z&&!s?ji(da,{children:[ut(vt,{icon:ut(Bk,{sx:{fontSize:17}}),label:"\uBAA9\uD45C",onClick:ie=>V(ie),sx:cr(1),children:E>0?U.find(ie=>ie.seq===E)?.name??"\uC0AD\uC81C\uB41C \uBAA9\uD45C":ut(zi,{component:"span",sx:{color:"#9a9a97"},children:"\uBBF8\uBC30\uC815"})}),ut(vt,{icon:ut(Mk,{sx:{fontSize:17}}),label:"\uD3EC\uC778\uD2B8",sx:cr(1),children:ut(Lo,{value:I>0?String(I):"",placeholder:"\uBBF8\uCD94\uC815",onCommit:ie=>e.setFormValue("story_points",Number(ie.replace(/[^0-9.]/g,""))||0)})})]}):null,T?ut(Pl,{values:{repro:S,device:D,where:p,version:y},onChangeRepro:ie=>e.setFormValue("bug_repro",ie),onChangeDevice:ie=>e.setFormValue("bug_device",ie),onChangeWhere:ie=>e.setFormValue("bug_where",ie),onChangeVersion:ie=>e.setFormValue("bug_version",ie)}):null]}),leading:z||c?null:ut(zi,{sx:{gridColumn:"1 / -1"},children:ut(vt,{icon:ut(Ck,{sx:{fontSize:17}}),label:"\uB77C\uBCA8",onClick:ie=>Z(ie),children:(W??[]).length>0?ut(Zo,{labelKeys:W??[],labelOptions:f}):ut(zi,{component:"span",sx:{color:"#9a9a97"},children:"\uBE44\uC5B4 \uC788\uC74C"})})})}),ut(fa,{sx:{my:1.5,borderColor:"#e6e6e3"}}),ut(Mn,{icon:ut(Sk,{sx:{fontSize:18,display:"block"}}),title:"\uB0B4\uC6A9",titleExtra:k?ut(Ll,{content:$,templates:k,onApply:ie=>e.setFormValue("content",ie),onSave:B,onRemove:R}):void 0,children:ut(Fl,{syncKey:x,value:$,onChange:ie=>e.setFormValue("content",ie)})}),z?null:ut(fa,{sx:{my:1.5,borderColor:"#e6e6e3"}}),z?null:ut(Hl,{taskSeq:0,checklist:M,onAdd:(ie,Ce)=>e.setFormValue("checklist",[...M,{label:Ce,checked:!1}]),onToggle:(ie,Ce,we)=>e.setFormValue("checklist",M.map((ve,Ke)=>Ke===Ce?{...ve,checked:we}:ve)),onRemove:(ie,Ce)=>e.setFormValue("checklist",M.filter((we,ve)=>ve!==Ce)),onUpdate:(ie,Ce,we)=>e.setFormValue("checklist",M.map((ve,Ke)=>Ke===Ce?{...ve,label:we}:ve))}),ut(fa,{sx:{my:1.5,borderColor:"#e6e6e3"}}),ut(Kl,{taskSeq:0,attachments:it.map(ie=>({name:ie.name,size:ie.size})),onAdd:(ie,Ce)=>{let we=Xp(Ce,A);we.message&&em(we.message),we.accepted.length!==0&&j.setValue("createAttachmentFiles",[...j.getValue("createAttachmentFiles")??[],...we.accepted])},onRemove:(ie,Ce)=>j.setValue("createAttachmentFiles",it.filter((we,ve)=>ve!==Ce))}),T?null:ji(da,{children:[ut(fa,{sx:{my:1.5,borderColor:"#e6e6e3"}}),ut(Mn,{icon:ut(Tk,{sx:{fontSize:18,display:"block"}}),title:"\uBE44\uACE0",children:ut(Rk,{form:e,name:"note",placeholder:"\uBE44\uACE0 \uC785\uB825",fullWidth:!0,size:"medium",sx:{mt:1}})})]})]}),ut(of,{transitionDuration:0,anchorEl:G,open:!!G,onClose:()=>V(null),children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...U.map(ie=>({seq:ie.seq,label:In(ie)}))].map(ie=>ut(sf,{onClick:()=>{e.setFormValue("sprint_seq",ie.seq),V(null)},sx:{fontSize:14,minWidth:170},children:ie.label},ie.seq))}),ut(of,{transitionDuration:0,anchorEl:se,open:!!se,onClose:()=>de(null),children:[{value:"",label:"\uC5C6\uC74C"},...na].map(ie=>ut(sf,{selected:te===ie.value,onClick:()=>{if(de(null),ie.value===""){e.setFormValue("repeat_rule",""),e.setFormValue("repeat_until","");return}let Ce;if(z){if(Ce=String(e.getFormValue("due_date")??"").slice(0,10),!Ce){em("\uBC18\uBCF5\uD558\uB824\uBA74 \uC77C\uC815 \uB0A0\uC9DC\uB97C \uBA3C\uC800 \uC120\uD0DD\uD558\uC138\uC694.");return}}else{if(Ce=String(e.getFormValue("start_date")??"").slice(0,10),!Ce){let we=new Date,ve=Ke=>String(Ke).padStart(2,"0");Ce=`${we.getFullYear()}-${ve(we.getMonth()+1)}-${ve(we.getDate())}`}e.setFormValue("due_date","")}e.setFormValue("repeat_rule",ie.value),e.setFormValue("repeat_until",Ml(Ce,ie.value))},sx:{fontSize:14,minWidth:140},children:ie.label},ie.value||"none"))}),ut(Ok,{anchorEl:ge,open:!!ge,onClose:()=>ke(null),selectedDate:oe?new Date(`${oe}T00:00:00`):new Date,onDateChange:ie=>{let Ce=we=>String(we).padStart(2,"0");e.setFormValue("repeat_until",`${ie.getFullYear()}-${Ce(ie.getMonth()+1)}-${Ce(ie.getDate())}`),ke(null)}}),ut(of,{transitionDuration:0,anchorEl:ee,open:!!ee,onClose:()=>ne(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:ut(Zp,{sx:{fontSize:17,color:"#57564f"}}),selected:Y==="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:ut(Jp,{sx:{fontSize:17,color:"#2f80ed"}}),selected:Y==="all",onPick:()=>{e.setFormValue("visibility","all"),e.setFormValue("visibility_group_seq",0)}},...[...h].sort((ie,Ce)=>ie.seq===d?-1:Ce.seq===d?1:0).map(ie=>({key:`group-${ie.seq}`,label:`\uBD80\uC11C\uACF5\uAC1C \xB7 ${ie.name}`,tip:`${ie.name} \uC18C\uC18D \uC9C1\uC6D0\uC774 \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4`,icon:ut(Qp,{sx:{fontSize:17,color:"#d9730d"}}),selected:Y==="group"&&J===ie.seq,onPick:()=>{e.setFormValue("visibility","group"),e.setFormValue("visibility_group_seq",ie.seq)}}))].map(ie=>ut(kk,{title:ie.tip,arrow:!0,disableInteractive:!0,placement:"right",children:ji(sf,{selected:ie.selected,onClick:()=>{ie.onPick(),ne(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[ie.icon,ie.label]})},ie.key))}),ut(Yl,{anchorEl:X,selectedKeys:W??[],labelOptions:f,onToggle:ie=>e.setFormValue("label_keys",Xa(W??[],ie)),onAddLabel:(ie,Ce)=>m?.(ie,Ce),onClose:()=>Z(null)})]})}import{Fragment as om,jsx as nr,jsxs as ha}from"react/jsx-runtime";function xF({open:e,onClose:f,...g}){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}=g,d=To(),u=Dk(!1),[b,m]=rm(0),x=l.useFormValue("title"),k=l.useFormValue("icon"),B=l.useFormValue("icon_color"),R=!!l.useFormValue("is_event"),j=!!l.useFormValue("is_bug"),A=qt(),N=d.useValue("createSubmitting")??!1,q=a||R?Et(k||(a?pr:yr)):null,z=a?"\uACF5\uC9C0 \uB4F1\uB85D":R?"\uC77C\uC815 \uB4F1\uB85D":j?"\uC624\uB958 \uB4F1\uB85D":"\uC5C5\uBB34 \uB4F1\uB85D",T=a?"\uACF5\uC9C0 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694":R?"\uC77C\uC815 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694":j?"\uC5B4\uB5A4 \uC624\uB958\uC778\uC9C0 \uD55C \uC904\uB85C \uC801\uC5B4\uC8FC\uC138\uC694":"\uC5C5\uBB34 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694";Ak(()=>{let v=u.current;u.current=e,!(!e||v)&&(l.setFormValues({...l.getFormValues(),title:o,icon:a?pr:h?zs:So,icon_color:a?"#e5484d":h?js:"",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}),d.setValue("createAttachmentFiles",[]),m(w=>w+1))},[e]);let[S,D]=rm(null),p=v=>q?R?nr(zk,{title:"\uC544\uC774\uCF58 \uBCC0\uACBD",arrow:!0,enterDelay:400,disableInteractive:!0,children:nr(Pk,{onClick:w=>D(w.currentTarget),sx:{display:"flex",p:.5,borderRadius:1,color:B||"#1e3a8a","&:hover":{bgcolor:"#f2f2f0"}},children:nr(q,{sx:{fontSize:20}})})}):nr(zo,{sx:[{display:"flex",color:B||"#1e3a8a"},v],children:nr(q,{sx:{fontSize:20}})}):null,y=ha(zo,{sx:{display:"flex",alignItems:"center",gap:1,px:2,pt:2,pb:1},children:[p({p:0}),nr(zo,{component:"input",autoFocus:!0,spellCheck:!1,value:x,placeholder:T,onChange:v=>l.setFormValue("title",v.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?nr(om,{children:nr(qk,{open:e,onClose:f,locale:"ko",fontScale:{enabled:!0,default:1.1,min:.6},title:z,titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},fullScreen:!0,mobilePresentation:"slide",actions:{showCancelButton:!0,right:nr(lf,{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:nr(zo,{sx:{width:"100%",minWidth:0,display:"flex",flexDirection:"column",gap:0},children:nr(af,{...g,contentSyncKey:`create-${b}`,leadingRow:y})})}]})}):ha(om,{children:[nr(Nk,{anchor:"right",open:e,onClose:f,"aria-label":"\uC0C8 \uC5C5\uBB34 \uB4F1\uB85D",sx:{zIndex:v=>v.zIndex.modal},slotProps:{paper:{sx:{width:720,maxWidth:"100vw"}}},children:ha(zo,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[ha(zo,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1.5,flexShrink:0},children:[p({px:.5}),nr(zo,{component:"input",autoFocus:!0,spellCheck:!1,value:x,placeholder:T,onChange:v=>l.setFormValue("title",v.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}}}),nr(Lk,{"aria-label":"\uB2EB\uAE30",onClick:f,sx:{color:"#6b7280"},children:nr(jk,{})})]}),nr(nm,{sx:{borderColor:"#e6e6e3"}}),nr(zo,{sx:{flex:1,minHeight:0},children:nr(Fk,{style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:nr(af,{...g,contentSyncKey:`create-${b}`})})}),nr(nm,{sx:{borderColor:"#e6e6e3"}}),ha(zo,{sx:{display:"flex",justifyContent:"flex-end",gap:1,px:2,py:1.5,flexShrink:0},children:[nr(lf,{onClick:f,color:"inherit",disabled:N,children:"\uCDE8\uC18C"}),nr(lf,{onClick:l.submit,variant:"contained",disabled:N,children:N?"\uB4F1\uB85D \uC911\u2026":"\uB4F1\uB85D"})]})]})}),nr(ni,{anchorEl:S,value:k,color:B,onSelect:v=>{l.setFormValue("icon",v),D(null)},onSelectColor:v=>l.setFormValue("icon_color",v),onClose:()=>D(null)})]})}import{useCallback as t6,useEffect as nc,useRef as oc,useState as ic}from"react";import{Box as sc,Button as r6,Divider as zm,Drawer as n6,IconButton as o6,ListItemIcon as kf,ListItemText as Sf,Menu as i6,MenuItem as Tf}from"@mui/material";import s6 from"@mui/icons-material/MoreVert";import a6 from"@mui/icons-material/DeleteOutline";import l6 from"@mui/icons-material/ShareOutlined";import c6 from"@mui/icons-material/HistoryOutlined";import u6 from"@ehfuse/overlay-scrollbar";import{FormDialog as f6}from"@ehfuse/mui-form-dialog";import{SuccessAlert as jm}from"@ehfuse/alerts";import{useRef as uf,useState as ds}from"react";import{Box as xt,Button as am,Chip as Zl,IconButton as Un,Tooltip as fm}from"@mui/material";import lm from"@mui/icons-material/Send";import{TextField as Vk}from"@ehfuse/mui-form-controls";import Jl from"@mui/icons-material/Close";import Kk from"@mui/icons-material/EditOutlined";import Gk from"@mui/icons-material/Favorite";import Yk from"@mui/icons-material/FavoriteBorderOutlined";import Xk from"@mui/icons-material/CheckCircle";import Zk from"@mui/icons-material/CheckCircleOutlineOutlined";import hs from"@mui/icons-material/AttachFileOutlined";import Jk from"@mui/icons-material/AddCircleOutline";import Qk from"@mui/icons-material/ImageOutlined";var cf=e=>{if(e===0)return"0 Bytes";let f=1024,g=["Bytes","KB","MB","GB","TB"],l=Math.floor(Math.log(e)/Math.log(f));return parseFloat((e/Math.pow(f,l)).toFixed(2))+" "+g[l]};import{Box as $k}from"@mui/material";import{Fragment as Uk,jsx as im}from"react/jsx-runtime";var Hk=/https?:\/\/[^\s<>"']+/g;function Wk(e){let f=e,g="";for(;;){let l=f.slice(-1);if(l===")"&&(f.match(/\(/g)??[]).length<(f.match(/\)/g)??[]).length){f=f.slice(0,-1),g=l+g;continue}if(".,;:!?]}".includes(l)&&l!==""){f=f.slice(0,-1),g=l+g;continue}break}return[f,g]}function sm({text:e}){let{openExternalUrl:f}=ot(),g=s=>{f?f(s):window.open(s,"_blank","noopener,noreferrer")},l=[],o=0;for(let s of e.matchAll(Hk)){let r=s.index??0,[t,n]=Wk(s[0]);r>o&&l.push(e.slice(o,r)),l.push(im($k,{component:"a",href:t,onClick:c=>{c.preventDefault(),c.stopPropagation(),g(t)},sx:{color:"#2563eb",textDecoration:"underline",wordBreak:"break-all",cursor:"pointer"},children:t},`${r}-${t}`)),n&&l.push(n),o=r+s[0].length}return o<e.length&&l.push(e.slice(o)),im(Uk,{children:l})}import{Fragment as um,jsx as He,jsxs as ur}from"react/jsx-runtime";var e4=5;function cm({kind:e,reactions:f,myAccountSeq:g,onToggle:l}){let o=f??[],s=g>0&&o.some(c=>c.account_seq===g),r=e==="like"?"\uC88B\uC544\uC694":"\uD655\uC778",t=o.length===0?r:He(xt,{sx:{whiteSpace:"pre-line",fontSize:12},children:o.map(c=>`${c.name} \xB7 ${c.time}`).join(`
39
- `)}),n=e==="like"?"#e5484d":"#2f80ed";return He(fm,{title:t,arrow:!0,enterDelay:300,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:ur(xt,{sx:{display:"inline-flex",alignItems:"center"},children:[He(Un,{size:"small","aria-label":`\uB313\uAE00 ${r}`,onClick:l,sx:{color:s?n:"#c9c8c5",p:.5},children:e==="like"?s?He(Gk,{sx:{fontSize:16}}):He(Yk,{sx:{fontSize:16}}):s?He(Xk,{sx:{fontSize:16}}):He(Zk,{sx:{fontSize:16}})}),o.length>0?He(xt,{component:"span",sx:{fontSize:12,color:s?n:"#9a9a97",ml:-.25},children:o.length}):null]})})}function dm({taskSeq:e,comments:f,currentUserName:g="",myAccountSeq:l=0,avatarSrcByName:o,onUpdate:s,onRemove:r,onToggleReaction:t,onPreview:n,onDownload:c}){let[i,a]=ds(null),h=uf(null),[d,u]=ds(null),[b,m]=ds(!1),x=Math.max(0,f.length-e4),k=x>0&&!b,B=i?Math.min(i.index,x):x,R=f.map((q,z)=>({comment:q,index:z})).slice(k?B:0),j=Ns(),A=(q,z)=>{if(n){n(q,z&&z.length>1?z:void 0);return}window.open(j(q.uuid??""),"_blank","noopener,noreferrer")},P=q=>{if(c){c(q);return}window.open(j(q.uuid??"",{download:!0}),"_blank","noopener,noreferrer")},N=ot().slots?.avatar;return ur(xt,{sx:{px:2,pb:2,display:"flex",flexDirection:"column",gap:.25},children:[ur(xt,{sx:{display:"flex",alignItems:"center",gap:1},children:[He(ri,{sx:{fontSize:18,display:"block",color:"#37352f"}}),ur(xt,{sx:{fontSize:Uu,fontWeight:500,color:"#37352f"},children:["\uB313\uAE00",f.length>0?` (${f.length})`:""]}),x>0&&(!k||B>0)?He(xt,{role:"button",tabIndex:0,onClick:()=>m(q=>!q),onKeyDown:q=>{(q.key==="Enter"||q.key===" ")&&(q.preventDefault(),m(z=>!z))},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]}),f.length===0?He(xt,{sx:{mt:1,fontSize:14.5,color:"#9a9a97"},children:"\uB4F1\uB85D\uB41C \uB313\uAE00\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):null,He(xt,{sx:{display:"flex",flexDirection:"column",gap:1,mt:1},children:R.map(({comment:q,index:z})=>{let T=!!g&&q.author===g;return ur(xt,{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 S=o?.get(q.author)??"";return N?He(xt,{sx:{display:"inline-flex",flexShrink:0},children:He(N,{name:q.author,src:S||void 0,size:44})}):He(xt,{sx:{display:"inline-flex",flexShrink:0},children:He(Tn,{src:S,name:q.author,avatarSx:{width:44,height:44,fontSize:20,borderRadius:"50%",...Xi[0]},iconFontSize:24})})})(),ur(xt,{sx:{flex:1,minWidth:0},children:[ur(xt,{sx:{display:"flex",alignItems:"center",gap:.75,minWidth:0,position:"relative"},children:[He(xt,{component:"span",sx:{fontSize:14.5,fontWeight:700,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:q.author}),q.external?He(xt,{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,He(xt,{component:"span",sx:{fontSize:12.5,color:"#9a9a97",flexShrink:0,whiteSpace:"nowrap"},children:q.time}),T?He(xt,{sx:{ml:"auto"}}):ur(xt,{sx:{display:"flex",alignItems:"center",gap:.25,ml:"auto",flexShrink:0},children:[He(cm,{kind:"like",reactions:q.likes,myAccountSeq:l,onToggle:()=>t?.(e,z,"like")}),He(cm,{kind:"ack",reactions:q.acks,myAccountSeq:l,onToggle:()=>t?.(e,z,"ack")})]}),T?ur(xt,{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:[He(Un,{size:"small","aria-label":"\uB313\uAE00 \uC218\uC815",onClick:()=>a({index:z,text:q.text,attachments:[...q.attachments??[]],files:[]}),sx:{color:"#9a9a97"},children:He(Kk,{sx:{fontSize:15}})}),He(Un,{size:"small","aria-label":"\uB313\uAE00 \uC0AD\uC81C",onClick:S=>u({anchorEl:S.currentTarget,index:z}),sx:{color:"#9a9a97"},children:He(Jl,{sx:{fontSize:15}})})]}):null]}),i?.index===z?ur(xt,{sx:{mt:.5},children:[He(xt,{component:"textarea",autoFocus:!0,spellCheck:!1,value:i.text,onChange:S=>a({...i,text:S.target.value}),sx:{width:"100%",minHeight:56,border:"1px solid #dedddb",borderRadius:1,outline:"none",font:"inherit",fontSize:14,p:1,resize:"vertical"}}),ur(xt,{sx:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:.75,mt:.75},children:[i.attachments.map((S,D)=>{let p=()=>a({...i,attachments:i.attachments.filter((y,v)=>v!==D)});return pa(S.name)&&S.uuid?ur(xt,{sx:{position:"relative"},children:[He(xt,{component:"img",src:j(S.uuid,{thumb:"md"}),alt:S.name,title:S.name,loading:"lazy",sx:{width:72,height:72,objectFit:"cover",borderRadius:1,border:"1px solid #e6e6e3",display:"block"}}),He(Un,{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:He(Jl,{sx:{fontSize:14}})})]},`kept-${S.uuid}-${D}`):He(Zl,{size:"small",icon:He(hs,{sx:{fontSize:14}}),label:S.name,onDelete:p,sx:{fontSize:14,height:26,bgcolor:"#f1f5f9"}},`kept-${S.uuid??S.name}-${D}`)}),i.files.map((S,D)=>{let p=()=>a({...i,files:i.files.filter((y,v)=>v!==D)});return pa(S.name)?ur(xt,{sx:{position:"relative"},children:[He(xt,{component:"img",src:URL.createObjectURL(S),alt:S.name,title:`${S.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"}}),He(Un,{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:He(Jl,{sx:{fontSize:14}})})]},`new-${S.name}-${D}`):He(Zl,{size:"small",icon:He(hs,{sx:{fontSize:14}}),label:`${S.name} (\uC0C8 \uD30C\uC77C)`,onDelete:p,sx:{fontSize:14,height:26,bgcolor:"#eef4ff"}},`new-${S.name}-${D}`)}),He(fm,{title:"\uCCA8\uBD80 \uCD94\uAC00",arrow:!0,children:He(Un,{size:"small","aria-label":"\uCCA8\uBD80 \uCD94\uAC00",onClick:()=>h.current?.click(),sx:{ml:"auto",color:"#2f80ed"},children:He(Jk,{sx:{fontSize:20}})})})]}),ur(xt,{sx:{display:"flex",justifyContent:"flex-end",alignItems:"center",gap:.75,mt:.5},children:[He(am,{size:"small",color:"inherit",onClick:()=>a(null),children:"\uCDE8\uC18C"}),He(am,{size:"small",variant:"contained",disabled:!i.text.trim()&&i.attachments.length===0&&i.files.length===0,onClick:()=>{s(e,z,i.text,{attachments:i.attachments,files:i.files}),a(null)},children:"\uC800\uC7A5"})]}),He(xt,{component:"input",type:"file",multiple:!0,ref:h,sx:{display:"none"},onChange:S=>{let D=Array.from(S.target.files??[]);D.length>0&&a({...i,files:[...i.files,...D].slice(0,10)}),S.target.value=""}})]}):ur(xt,{children:[q.text?He(xt,{sx:{fontSize:15,whiteSpace:"pre-wrap"},children:He(sm,{text:q.text})}):null,(q.attachments??[]).length>0?He(xt,{sx:{display:"flex",flexWrap:"wrap",gap:.75,mt:.75},children:(q.attachments??[]).map((S,D)=>{let p=!!S.uuid,y=pa(S.name),v=(q.attachments??[]).filter(_=>!!_.uuid&&pa(_.name));if(y&&p)return He(xt,{component:"img",src:j(S.uuid??"",{thumb:"md"}),alt:S.name,title:`${S.name} \uD06C\uAC8C \uBCF4\uAE30`,loading:"lazy",onClick:()=>A(S,v),sx:{width:96,height:96,objectFit:"cover",borderRadius:1,border:"1px solid #e6e6e3",cursor:"pointer",bgcolor:"#f8fafc"}},`${S.name}-${D}`);let w=Wl(S.name);return He(Zl,{size:"small",icon:He(hs,{sx:{fontSize:14}}),label:`${S.name} (${cf(S.size)})`,clickable:p,onClick:p?()=>w?A(S):P(S):void 0,title:p?`${S.name} ${w?"\uBBF8\uB9AC\uBCF4\uAE30":"\uB2E4\uC6B4\uB85C\uB4DC"}`:S.name,sx:{fontSize:14,height:26,bgcolor:"#f1f5f9"}},`${S.name}-${D}`)})}):null]})]})]},`${q.time}-${z}`)})}),He(At,{open:!!d,anchorEl:d?.anchorEl??null,title:"\uC774 \uB313\uAE00\uC744 \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uC0AD\uC81C",onCancel:()=>u(null),onConfirm:()=>{d&&(r(e,d.index),a(null)),u(null)}})]})}function pa(e){return/\.(png|jpe?g|gif|webp|bmp|svg|heic|heif)$/i.test(String(e??"").trim())}function hm({onSubmit:e}){let[f,g]=ds(""),[l,o]=ds([]),[s,r]=ds(!1),t=uf(null),n=uf(null),c=qt(),i=d=>{let u=Array.from(d??[]);u.length!==0&&o(b=>[...b,...u].slice(0,10))},a=()=>{let d=f.trim();!d&&l.length===0||(e(d,l.length>0?l:void 0),g(""),o([]))},h=ur(um,{children:[He(Un,{size:"small","aria-label":"\uD30C\uC77C \uCCA8\uBD80",onClick:()=>t.current?.click(),sx:{color:"#9a9a97"},children:He(hs,{sx:{fontSize:20}})}),He(Un,{size:"small","aria-label":"\uC774\uBBF8\uC9C0 \uCCA8\uBD80",onClick:()=>n.current?.click(),sx:{color:"#9a9a97"},children:He(Qk,{sx:{fontSize:20}})})]});return ur(xt,{children:[l.length>0?He(xt,{sx:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:1.5,px:2,pt:2},children:l.map((d,u)=>pa(d.name)?ur(xt,{sx:{position:"relative"},children:[He(xt,{component:"img",src:URL.createObjectURL(d),alt:d.name,title:d.name,onLoad:b=>URL.revokeObjectURL(b.target.src),sx:{width:72,height:72,objectFit:"cover",borderRadius:1,border:"1px solid #e6e6e3",display:"block"}}),He(Un,{size:"small","aria-label":"\uCCA8\uBD80 \uC81C\uAC70",onClick:()=>o(b=>b.filter((m,x)=>x!==u)),sx:{position:"absolute",top:-6,right:-6,p:.25,bgcolor:"#ffffff",border:"1px solid #e6e6e3","&:hover":{bgcolor:"#f1f5f9"}},children:He(Jl,{sx:{fontSize:14}})})]},`${d.name}-${u}`):He(Zl,{size:"small",icon:He(hs,{sx:{fontSize:14}}),label:`${d.name} (${cf(d.size)})`,onDelete:()=>o(b=>b.filter((m,x)=>x!==u)),sx:{fontSize:14,height:26,bgcolor:"#f1f5f9"}},`${d.name}-${u}`))}):null,ur(xt,{sx:{position:"relative",display:"flex"},onDragOver:d=>{Array.from(d.dataTransfer?.types??[]).includes("Files")&&(d.preventDefault(),r(!0))},onDragLeave:d=>{d.currentTarget.contains(d.relatedTarget)||r(!1)},onDrop:d=>{Array.from(d.dataTransfer?.types??[]).includes("Files")&&(d.preventDefault(),r(!1),i(d.dataTransfer?.files??null))},children:[s?ur(xt,{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:[He(hs,{sx:{fontSize:18}}),"\uC5EC\uAE30\uC5D0 \uB193\uC73C\uBA74 \uCCA8\uBD80\uB429\uB2C8\uB2E4"]}):null,He(Vk,{value:f,placeholder:"\uB313\uAE00\uC744 \uC785\uB825\uD558\uC138\uC694",onChange:d=>g(d.target.value),onPaste:d=>{Array.from(d.clipboardData?.files??[]).length!==0&&(d.preventDefault(),i(d.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?ur(xt,{sx:{position:"absolute",right:8,top:"50%",transform:"translateY(-50%)",display:"flex",alignItems:"center",gap:.25},children:[h,He(Un,{"aria-label":"\uB313\uAE00 \uB4F1\uB85D",disabled:!f.trim()&&l.length===0,onClick:a,sx:{color:"#2563eb","&.Mui-disabled":{color:"#c9c8c5"}},children:He(lm,{sx:{fontSize:22}})})]}):ur(um,{children:[He(xt,{sx:{position:"absolute",left:8,bottom:6,display:"flex",alignItems:"center",gap:.25},children:h}),He(Un,{"aria-label":"\uB313\uAE00 \uB4F1\uB85D",disabled:!f.trim()&&l.length===0,onClick:a,sx:{position:"absolute",right:8,top:"50%",transform:"translateY(-50%)",color:"#2563eb","&.Mui-disabled":{color:"#c9c8c5"}},children:He(lm,{sx:{fontSize:22}})})]})]}),He(xt,{component:"input",ref:t,type:"file",multiple:!0,onChange:d=>{i(d.target.files),d.target.value=""},sx:{display:"none"}}),He(xt,{component:"input",ref:n,type:"file",accept:"image/*",multiple:!0,onChange:d=>{i(d.target.files),d.target.value=""},sx:{display:"none"}})]})}import{useState as ms}from"react";import{Box as gs,Button as p4,ButtonBase as m4,IconButton as bs,Tooltip as ys}from"@mui/material";import g4 from"@mui/icons-material/Close";import b4 from"@mui/icons-material/ArrowBack";import y4 from"@mui/icons-material/ContentCopyOutlined";import x4 from"@mui/icons-material/ShareOutlined";import v4 from"@mui/icons-material/HistoryOutlined";import w4 from"@mui/icons-material/Print";import{useEffect as o4}from"react";import{Box as jo,Button as i4,CircularProgress as s4}from"@mui/material";import{FormDialog as a4}from"@ehfuse/mui-form-dialog";import{OverlayScrollbar as l4}from"@ehfuse/overlay-scrollbar";import{useCallback as t4,useEffect as r4,useRef as ff}from"react";import{useModal as n4}from"@ehfuse/forma";function pm({open:e,onClose:f,modalId:g}){let l=ff(f);l.current=f;let o=n4({modalId:g,onClose:()=>l.current()}),s=ff(o);s.current=o;let r=ff(!1);return r4(()=>{e&&!r.current?s.current.open():!e&&r.current&&s.current.isOpen&&s.current.close(),r.current=e},[e]),{requestClose:t4(()=>{if(s.current.isOpen){s.current.close();return}l.current()},[])}}import{jsx as Fo,jsxs as Ql}from"react/jsx-runtime";var c4={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",returned:"\uC644\uB8CC\uB97C \uB418\uB3CC\uB838\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 mm(e){return String(e??"").trim()||"\uC5C6\uC74C"}function u4(e){if(e.kind!=="field")return c4[String(e.kind)]??"\uBCC0\uACBD\uD588\uC2B5\uB2C8\uB2E4";let f=String(e.field_label??e.field??"").trim()||"\uD56D\uBAA9",g=String(e.old_value??"").trim(),l=String(e.new_value??"").trim();return!g&&l?`${f}\uC744(\uB97C) "${l}"(\uC73C)\uB85C \uC785\uB825\uD588\uC2B5\uB2C8\uB2E4`:g&&!l?`${f}\uC744(\uB97C) \uBE44\uC6E0\uC2B5\uB2C8\uB2E4`:`${f}\uC744(\uB97C) "${mm(g)}" \u2192 "${mm(l)}" \uB85C \uBC14\uAFE8\uC2B5\uB2C8\uB2E4`}function ec({open:e,taskSeq:f,items:g,loading:l,onLoad:o,onClose:s}){let r=qt(),{requestClose:t}=pm({open:e,onClose:s});o4(()=>{e&&f>0&&!g&&o?.(f)},[e,f,g,o]);let n=Fo(jo,{sx:{height:r?"100%":420,minHeight:0},children:Fo(l4,{style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:Ql(jo,{sx:{px:2,pt:2,display:"flex",flexDirection:"column",gap:1,"&::after":{content:'""',flexShrink:0,height:16}},children:[l&&!g?Ql(jo,{sx:{display:"flex",alignItems:"center",gap:1,color:"#9a9a97",fontSize:14.5},children:[Fo(s4,{size:14,thickness:5,sx:{color:"#9a9a97"}}),"\uBD88\uB7EC\uC624\uB294 \uC911\u2026"]}):null,g&&g.length===0?Fo(jo,{sx:{fontSize:14.5,color:"#9a9a97"},children:"\uAE30\uB85D\uB41C \uD65C\uB3D9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):null,(g??[]).map(c=>Ql(jo,{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:[Fo(jo,{sx:{flexShrink:0,...r?{}:{width:"10.5em"},whiteSpace:"nowrap",fontSize:13.5,color:"#9a9a97",lineHeight:1.5},children:bn(c.acted_time)}),Ql(jo,{sx:{minWidth:0,fontSize:14.5,color:"#37352f",lineHeight:1.5},children:[Fo(jo,{component:"span",sx:{fontWeight:500},children:String(c.actor_name??"").trim()||"\uC774\uB984\uC5C6\uC74C"}),Fo(jo,{component:"span",sx:{ml:.5},children:u4(c)})]})]},c.seq))]})})});return Fo(a4,{open:e,onClose:t,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${g&&g.length>0?` (${g.length})`:""}`,locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-task-activity",sections:[{id:"task-activity",showTitle:!1,children:n}],scrollPastLastSection:!1,actions:{showCancelButton:!1,right:Fo(i4,{variant:"contained",onClick:t,children:"\uB2EB\uAE30"})}})}import{InfoAlert as f4,SuccessAlert as d4}from"@ehfuse/alerts";var gm=e=>e?e.replace(/<(script|style)[\s\S]*?<\/\1>/gi,"").replace(/<br\s*\/?>/gi,`
37
+ `).trim()}function Fl({syncKey:e,value:f,onChange:g,readOnly:l=!1,viewFirst:o=!1,onTranslate:s,minHeight:r=180,height:t=0,onChangeHeight:n}){let{uploadContentImage:c,openExternalUrl:i}=ot(),a=y=>{i?i(y):window.open(y,"_blank","noopener,noreferrer")},[h,d]=Ap(()=>!o||!aa(f).trim());zl(()=>{o&&d(!aa(f).trim())},[e,o]);let u=ui(null),b=ui(new v5),m=ui(null),x=t>0?t:0,k=ui(x),B=ui(n);B.current=n;let R=ui(null),j=ui(Date.now()+800),A=qt(),P=g5(),N=m5(P.breakpoints.down("sm")),[q,z]=Ap(!1),T=()=>{let y=aa(f);y&&navigator.clipboard.writeText(y).then(()=>{z(!0),window.setTimeout(()=>z(!1),1500)})},S=(y,v=!1)=>y instanceof Element?y.closest(v?".taskbox-content-readview a[href]":".ehfuse-editor-content a[href]"):null,D=y=>A||y.ctrlKey||y.metaKey;zl(()=>{if(l)return;let y=Ju(f);R.current===y||R.current===f||(R.current=y,j.current=Date.now()+800,u.current?.setHtml(y))},[e,f,l]);let p=ui(-1);return zl(()=>{if(l||A||t<=0||p.current===t||(p.current=t,Math.abs(t-k.current)<1))return;let y=m.current?.querySelector(".ehfuse-editor-container");y&&(Math.abs(y.getBoundingClientRect().height-t)<1||(y.style.height=`${t}px`,k.current=t))},[l,A,t]),zl(()=>{if(l||A)return;let y=m.current?.querySelector(".ehfuse-editor-container");if(!y||typeof ResizeObserver>"u")return;let v,w=new ResizeObserver(_=>{let C=Math.round(_[0]?.contentRect.height??0);C<=0||(window.clearTimeout(v),v=window.setTimeout(()=>{Math.abs(C-k.current)<1||(k.current=C,B.current?.(C))},300))});return w.observe(y),()=>{window.clearTimeout(v),w.disconnect()}},[l,A]),l||!h?jl(sa,{sx:{position:"relative",mt:1},children:[Pr(sa,{onClickCapture:y=>{let v=S(y.target,!0);v&&(y.preventDefault(),y.stopPropagation(),a(v.href))},className:"taskbox-content-readview",sx:{border:"1px solid #e0e0e0",borderRadius:1,p:"12px",pr:N?"12px":"52px",minHeight:r,fontSize:16,lineHeight:1.6,color:"#37352f",wordBreak:"break-word",userSelect:l?"none":"text","& > p:first-of-type":{mt:0},"& > p:last-of-type":{mb:0},"& a[href]":{color:"#2563eb",textDecoration:"underline",cursor:"pointer"},"& img":{maxWidth:"100%"}},dangerouslySetInnerHTML:{__html:Ju(f)}}),N?jl(sa,{sx:{display:"flex",gap:1,mt:1},children:[Pr(Yu,{variant:"outlined",color:"inherit",startIcon:Pr(y5,{sx:{fontSize:18}}),onClick:T,sx:{flex:1,fontSize:15,color:"#37352f",borderColor:"#d9d9d6"},children:q?"\uBCF5\uC0AC\uB428":"\uBCF5\uC0AC"}),l?null:Pr(Yu,{variant:"outlined",color:"inherit",startIcon:Pr(Dp,{sx:{fontSize:18}}),onClick:()=>d(!0),sx:{flex:1,fontSize:15,color:"#37352f",borderColor:"#d9d9d6"},children:"\uC218\uC815"}),s?Pr(Yu,{variant:"outlined",color:"inherit",startIcon:Pr(Pp,{sx:{fontSize:18}}),onClick:s,sx:{flex:1,fontSize:15,color:"#37352f",borderColor:"#d9d9d6"},children:"\uBC88\uC5ED"}):null]}):jl(sa,{sx:{position:"absolute",top:6,right:6,display:"flex",flexDirection:"column",gap:.25},children:[l?null:Pr(Zu,{title:"\uB0B4\uC6A9 \uC218\uC815",arrow:!0,placement:"left",children:Pr(Xu,{size:"small","aria-label":"\uB0B4\uC6A9 \uC218\uC815",onClick:()=>d(!0),sx:{color:"#9a9a97"},children:Pr(Dp,{sx:{fontSize:17}})})}),s?Pr(Zu,{title:"\uBC88\uC5ED",arrow:!0,placement:"left",children:Pr(Xu,{size:"small","aria-label":"\uBC88\uC5ED",onClick:s,sx:{color:"#9a9a97"},children:Pr(Pp,{sx:{fontSize:17}})})}):null]})]}):jl(sa,{ref:m,onDragOver:y=>y.stopPropagation(),onDrop:y=>y.stopPropagation(),onMouseDownCapture:y=>{D(y)&&S(y.target)&&y.preventDefault()},onClickCapture:y=>{let v=D(y)?S(y.target):null;v&&(y.preventDefault(),y.stopPropagation(),a(v.href))},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"},...A?{"& .ehfuse-editor-content a[href]":{cursor:"pointer"}}:{},position:"relative"},children:[o?Pr(Zu,{title:"\uD3B8\uC9D1 \uB05D(\uC77D\uAE30 \uBAA8\uB4DC)",arrow:!0,children:Pr(Xu,{size:"small","aria-label":"\uD3B8\uC9D1 \uB05D",onMouseDown:y=>y.preventDefault(),onClick:()=>d(!1),sx:{position:"absolute",top:4,right:6,zIndex:2,color:"#2f9e5b"},children:Pr(b5,{sx:{fontSize:19}})})}):null,Pr(x5,{ref:u,defaultValue:Ju(f),autoHeight:A,resizable:!A,showToolbar:!A,focusBorder:!0,styles:{focusBorderColor:"var(--primary)"},toolbarOptions:w5,plugins:[b.current],locale:"ko",minHeight:x||r,placeholder:"\uB0B4\uC6A9\uC744 \uC785\uB825\uD558\uC138\uC694",onImageUpload:c,contentStyle:{padding:"12px"},onChange:y=>{let v=Date.now()<j.current,w=y===R.current;R.current=y,!(v||w)&&g(y)}})]})}import{useState as Li}from"react";import{Box as wr,Button as Lp,Dialog as A5,IconButton as us,Switch as D5,TextField as P5,Tooltip as ef}from"@mui/material";import{DndContext as N5,PointerSensor as L5,closestCenter as z5,useSensor as j5,useSensors as F5}from"@dnd-kit/core";import{restrictToParentElement as q5,restrictToVerticalAxis as $5}from"@dnd-kit/modifiers";import{SortableContext as H5,arrayMove as W5,useSortable as U5,verticalListSortingStrategy as V5}from"@dnd-kit/sortable";import{CSS as K5}from"@dnd-kit/utilities";import zp from"@mui/icons-material/Close";import G5 from"@mui/icons-material/AddCircle";import jp from"@mui/icons-material/AddTask";import Y5 from"@mui/icons-material/Checklist";import X5 from"@mui/icons-material/CheckCircle";import Z5 from"@mui/icons-material/DragIndicator";import J5 from"@mui/icons-material/Launch";import Q5 from"@mui/icons-material/LinkOutlined";import ek from"@mui/icons-material/RadioButtonUnchecked";import{useEffect as _5,useMemo as k5,useState as Qu}from"react";import{Box as fo,Button as S5,Tab as T5,Tabs as C5}from"@mui/material";import{FormDialog as B5}from"@ehfuse/mui-form-dialog";import{ClearTextField as I5}from"@ehfuse/mui-form-controls";import{ErrorAlert as E5}from"@ehfuse/alerts";import M5 from"@mui/icons-material/CheckCircle";import R5 from"@mui/icons-material/RadioButtonUnchecked";import{OverlayScrollbar as O5}from"@ehfuse/overlay-scrollbar";import{jsx as qr,jsxs as ql}from"react/jsx-runtime";var Np=[{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 $l({open:e,task:f,tasks:g,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=qt(),[a,h]=Qu("related"),[d,u]=Qu(""),[b,m]=Qu([]);_5(()=>{e&&(h("related"),u(""),m([]))},[e]);let x=k5(()=>{let A=new Set([f.seq,...l]),P=d.trim().toLowerCase();return g.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)},[g,f.seq,l,d]),k=()=>{if(b.length===0){E5("\uC5F0\uACB0\uD560 \uC5C5\uBB34\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return}for(let A of b)s(A,a);o()},B=A=>{m(P=>P.includes(A)?P.filter(N=>N!==A):c?[...P,A]:[A])},R=Np.find(A=>A.type===a)?.hint??"",j=ql(fo,{sx:{display:"flex",flexDirection:"column",minHeight:0,height:i?"100%":"auto"},children:[r?null:qr(C5,{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:Np.map(A=>qr(T5,{value:A.type,label:A.label},A.type))}),r?null:qr(fo,{sx:{mt:1,mb:1.5,fontSize:14,flexShrink:0},children:R}),ql(fo,{sx:{...i?{height:"100%",minHeight:0}:{height:560},display:"flex",flexDirection:"column",...i?{}:{border:"1px solid #cccccc",borderRadius:1},overflow:"hidden",userSelect:"none"},children:[qr(fo,{sx:{px:1.5,py:1,borderBottom:"1px solid #cccccc",flexShrink:0},children:qr(I5,{placeholder:"\uC81C\uBAA9\xB7\uD2F0\uCF13\uBC88\uD638\uB85C \uAC80\uC0C9",value:d,onChange:A=>u(A.target.value),fullWidth:!0,autoFocus:!0,size:"small",sx:{"& .MuiOutlinedInput-notchedOutline":{border:"none"},"& .MuiInputBase-root":{px:0}}})}),qr(fo,{sx:{flex:1,minHeight:0},children:qr(O5,{style:{height:"100%"},contentStyle:{paddingTop:0},children:qr(fo,{sx:{display:"flex",flexDirection:"column"},children:x.length===0?qr(fo,{sx:{py:4,textAlign:"center",fontSize:13.5,color:"#9a9a97"},children:"\uC5F0\uACB0\uD560 \uC218 \uC788\uB294 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):x.map(A=>{let P=A.is_notice||A.is_event?Et(A.icon||(A.is_notice?pr:yr)):null,N=b.includes(A.seq);return ql(fo,{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?qr(M5,{sx:{fontSize:20,flexShrink:0,color:"#2f6fd0"}}):qr(R5,{sx:{fontSize:20,flexShrink:0,color:"#c9c8c5"}}),P?qr(P,{sx:{fontSize:17,flexShrink:0,color:A.icon_color||"#1e3a8a"}}):null,ql(fo,{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]}),qr(fo,{sx:{flexShrink:0,display:"flex",alignItems:"center"},children:qr(Lt,{option:xr(A)})})]},A.seq)})})})})]})]});return qr(B5,{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:j}],scrollPastLastSection:!1,sectionContentPaddingTop:0,contentTopPadding:12,actions:{showCancelButton:!0,right:qr(S5,{variant:"contained",disabled:b.length===0,onClick:k,children:n})}})}import{Fragment as nk,jsx as gt,jsxs as ho}from"react/jsx-runtime";var Fp="taskbox.checklist.hideCompleted";function tk({id:e,children:f}){let{attributes:g,listeners:l,setNodeRef:o,transform:s,transition:r,isDragging:t}=U5({id:e});return gt(wr,{ref:o,sx:{transform:K5.Transform.toString(s),transition:r,...t?{opacity:.6,position:"relative",zIndex:1}:{}},children:f({handleProps:{...g,...l},dragging:t})})}function rk({sortable:e,sensors:f,rowIds:g,onDragEnd:l,children:o}){let s=gt(wr,{sx:{display:"flex",flexDirection:"column",mt:.5,pl:3.25},children:o});return e?gt(N5,{sensors:f,collisionDetection:z5,modifiers:[$5,q5],onDragEnd:l,children:gt(H5,{items:g,strategy:V5,children:s})}):s}function Hl({taskSeq:e,checklist:f,onAdd:g,onToggle:l,confirmOnToggle:o=!1,onRemove:s,onUpdate:r,onReorder:t,removeLocked:n=!1,onConvertToTask:c,onOpenLinkedTask:i,linkCandidates:a,linkBaseTask:h,onLinkExistingTask:d,resolveLinkedTask:u,myAccountSeq:b=0}){let[m,x]=Li(""),[k,B]=Li(!1),[R,j]=Li(null),A=qt(),[P,N]=Li(null),[q,z]=Li(null),[T,S]=Li(null),D=L=>{let U=L.task_seq?u?.(L.task_seq):void 0;return U?U.completed:L.checked},p=L=>{if(!L.task_seq||b<=0)return!1;let U=u?.(L.task_seq);return U?!Gd(U,b):!1},y=L=>!!L.task_seq&&!!u&&!u?.(L.task_seq),v=f.filter(L=>!y(L)),w=v.filter(D).length,[_,C]=Li(()=>{try{return localStorage.getItem(Fp)==="1"}catch{return!1}}),O=L=>{C(L);try{localStorage.setItem(Fp,L?"1":"0")}catch{}},F=!!t&&!A&&!n,$=F5(j5(L5,{activationConstraint:{distance:5}})),K=(L,U)=>L.task_seq?`linked-${L.task_seq}`:`row-${U}`,M=f.map(K),H=M.filter((L,U)=>{let G=f[U];return y(G)?!1:!(_&&D(G))}),E=L=>{let{active:U,over:G}=L;if(!G||U.id===G.id)return;let V=M.indexOf(String(U.id)),W=M.indexOf(String(G.id));V<0||W<0||t?.(e,W5(f,V,W))},I=()=>{m.trim()&&(g(e,m),x(""))};return ho(Mn,{icon:gt(Y5,{sx:{fontSize:19,display:"block"}}),title:ho(nk,{children:["\uD560\uC77C",f.length>0?ho(wr,{component:"span",sx:{fontSize:12.5,color:"#9a9a97"},children:[w," / ",f.length]}):null]}),titleExtra:v.length>0?ho(wr,{sx:{flex:1,minWidth:0,ml:1,display:"flex",alignItems:"center",gap:1},children:[gt(wr,{sx:{flex:1,minWidth:0,height:6,borderRadius:3,bgcolor:"#ececea"},children:gt(wr,{sx:{height:"100%",borderRadius:3,width:`${Math.round(w/v.length*100)}%`,bgcolor:"#2f80ed",transition:"width 0.2s"}})}),w>0?ho(wr,{component:"label",sx:{display:"inline-flex",alignItems:"center",gap:.25,flexShrink:0,cursor:"pointer",fontSize:13.5,fontWeight:400,color:"#57564f",userSelect:"none"},children:[gt(D5,{size:"small",checked:_,onChange:(L,U)=>O(U)}),"\uC644\uB8CC\uC228\uAE40"]}):null]}):null,children:[gt(rk,{sortable:F,sensors:$,rowIds:H,onDragEnd:E,children:f.map((L,U)=>{let G=L.task_seq?u?.(L.task_seq):void 0,V=D(L);if(_&&V||y(L))return null;let W=!!L.task_seq,X=p(L),Z=Y=>ho(wr,{sx:{display:"flex",alignItems:A?"flex-start":"center",gap:1,px:1.25,...F?{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:[Y?gt(wr,{className:"taskbox-checklist-handle",...Y,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:gt(Z5,{sx:{fontSize:16}})}):null,gt(ef,{title:X?"\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:gt(wr,{component:"span",onClick:X?void 0:J=>o?S({anchorEl:J.currentTarget,index:U,checked:!V}):l(e,U,!V),sx:{display:"inline-flex",flexShrink:0,cursor:X?"default":"pointer",...A?{mt:"1px"}:{}},children:V?gt(X5,{sx:{fontSize:18,color:X?"#a9c6ec":"#2f80ed"}}):gt(ek,{sx:{fontSize:18,color:X?"#d6d5d1":"#9a9a97"}})})}),R?.index===U?gt(wr,{component:"input",autoFocus:!0,spellCheck:!1,value:R.label,enterKeyHint:"done",onChange:J=>j({index:U,label:J.target.value}),onBlur:()=>{R.label.trim()&&R.label.trim()!==L.label&&r?.(e,U,R.label),j(null)},onKeyDown:J=>{J.key==="Enter"&&J.target.blur(),J.key==="Escape"&&j(null)},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:14,color:"#37352f",bgcolor:"transparent",p:0}}):gt(wr,{component:"span",onClick:W?L.task_seq&&i?()=>i(L.task_seq):void 0:n||!r?void 0:A?()=>N({index:U,label:L.label}):()=>j({index:U,label:L.label}),sx:{flex:1,minWidth:0,fontSize:14.5,color:"#37352f",textDecoration:V?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",...A?{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:3,lineHeight:1.4,wordBreak:"break-word"}:{whiteSpace:"nowrap"},...W?i?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}:n||!r?{}:{cursor:"text"}},children:L.label}),W?ho(wr,{component:"span",onClick:L.task_seq&&i?()=>i(L.task_seq):void 0,sx:{display:"inline-flex",alignItems:"center",gap:.4,flexShrink:0,...A?{mt:"1px"}:{},px:.75,py:.2,borderRadius:1,fontSize:12,fontWeight:500,color:"#1d4f91",bgcolor:"#e3eefb",whiteSpace:"nowrap",...i?{cursor:"pointer"}:{}},children:[gt(J5,{sx:{fontSize:12}}),G?.manager_name?.trim()||"\uC5C5\uBB34"]}):null,!n&&!W&&c?gt(ef,{title:"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",arrow:!0,enterDelay:300,disableInteractive:!0,children:gt(us,{className:"taskbox-checklist-convert",size:"small","aria-label":"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",onClick:J=>z({anchorEl:J.currentTarget,index:U,label:L.label}),sx:{display:A?"none":"inline-flex",opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:gt(jp,{sx:{fontSize:16}})})}):null,n?null:gt(us,{className:"taskbox-checklist-remove",size:"small","aria-label":"\uD560\uC77C \uC0AD\uC81C",onClick:()=>s(e,U),sx:{display:A?"none":"inline-flex",opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:gt(zp,{sx:{fontSize:15}})})]});return F?gt(tk,{id:M[U],children:({handleProps:Y})=>Z(Y)},M[U]):gt(wr,{children:Z(null)},M[U])})}),ho(wr,{sx:{mt:.5,ml:3.25,display:"flex",alignItems:"center",gap:.5},children:[gt(wr,{component:"input",spellCheck:!1,value:m,placeholder:"+ \uD560\uC77C \uCD94\uAC00",enterKeyHint:"done",onChange:L=>x(L.target.value),onKeyDown:L=>{L.key==="Enter"&&I()},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:14,color:"#37352f",bgcolor:"transparent",px:1.25,py:.75,"&::placeholder":{color:"#9a9a97"}}}),a&&h&&d?gt(ef,{title:"\uAE30\uC874 \uC5C5\uBB34 \uBD99\uC774\uAE30",arrow:!0,children:gt(us,{size:"small","aria-label":"\uAE30\uC874 \uC5C5\uBB34 \uBD99\uC774\uAE30",onMouseDown:L=>L.preventDefault(),onClick:()=>B(!0),sx:{flexShrink:0,color:"#9a9a97"},children:gt(Q5,{sx:{fontSize:20}})})}):null,gt(us,{size:"small","aria-label":"\uD560\uC77C \uCD94\uAC00",disabled:!m.trim(),onMouseDown:L=>L.preventDefault(),onClick:I,sx:{flexShrink:0,color:m.trim()?"#2f80ed":"#c9c8c5"},children:gt(G5,{sx:{fontSize:20}})})]}),a&&h&&d?gt($l,{open:k,task:h,tasks:a,excludeSeqs:f.map(L=>Number(L.task_seq??0)).filter(L=>L>0),hideRelationType:!0,multiSelect:!0,title:"\uAE30\uC874 \uC5C5\uBB34 \uBD99\uC774\uAE30",confirmLabel:"\uBD99\uC774\uAE30",onClose:()=>B(!1),onSubmit:L=>{let U=a.find(G=>G.seq===L);d(e,L,String(U?.title??"").trim())}}):null,gt(At,{open:!!q,anchorEl:q?.anchorEl??null,title:"\uC774 \uD560\uC77C\uC744 \uBCC4\uB3C4 \uC5C5\uBB34\uB85C \uB9CC\uB4DC\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uB9CC\uB4E4\uAE30",onCancel:()=>z(null),onConfirm:()=>{q&&c?.(e,q.index,q.label),z(null)}}),gt(At,{open:!!T,anchorEl:T?.anchorEl??null,title:T?.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:T?.checked?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>S(null),onConfirm:()=>{T&&l(e,T.index,T.checked),S(null)}}),gt(A5,{open:!!P,onClose:()=>N(null),maxWidth:"xs",fullWidth:!0,slotProps:{paper:{sx:{borderRadius:2,m:2}}},children:ho(wr,{sx:{p:2,display:"flex",flexDirection:"column",gap:1.5},children:[gt(wr,{sx:{fontSize:15.5,fontWeight:600,color:"#37352f"},children:"\uD560\uC77C \uC218\uC815"}),gt(P5,{autoFocus:!0,fullWidth:!0,size:"medium",value:P?.label??"",onChange:L=>N(U=>U&&{...U,label:L.target.value}),onKeyDown:L=>{if(L.key!=="Enter")return;let U=P;U&&U.label.trim()&&r?.(e,U.index,U.label.trim()),N(null)}}),ho(wr,{sx:{display:"flex",alignItems:"center",gap:1},children:[!n&&c&&P&&!f[P.index]?.task_seq?gt(us,{"aria-label":"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",onClick:()=>{c(e,P.index,f[P.index]?.label??""),N(null)},sx:{color:"#57564f"},children:gt(jp,{sx:{fontSize:20}})}):null,!n&&P?gt(us,{"aria-label":"\uD560\uC77C \uC0AD\uC81C",onClick:()=>{s(e,P.index),N(null)},sx:{color:"#e5484d"},children:gt(zp,{sx:{fontSize:19}})}):null,gt(wr,{sx:{flex:1}}),gt(Lp,{color:"inherit",onClick:()=>N(null),children:"\uCDE8\uC18C"}),gt(Lp,{variant:"contained",disabled:!P?.label.trim(),onClick:()=>{P&&P.label.trim()&&r?.(e,P.index,P.label.trim()),N(null)},children:"\uD655\uC778"})]})]})})]})}import{useRef as ck,useState as uk}from"react";import{Box as po,IconButton as fk}from"@mui/material";import dk from"@mui/icons-material/Close";import Hp from"@mui/icons-material/AttachFileOutlined";var ok=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"]),Wl=e=>{let f=e?.split(".").pop()?.toLowerCase()??"";return ok.has(f)};import{LinearProgress as ik}from"@mui/material";import{Fragment as sk,jsx as lk,jsxs as ak}from"react/jsx-runtime";function qp(e){let f=To(),g=f.useValue("attachmentUpload.taskSeq"),l=f.useValue("attachmentUpload.index"),o=f.useValue("attachmentUpload.total"),s=f.useValue("attachmentUpload.queue"),r=l??0;return!r||e>0&&(g??0)!==e?null:{index:r,total:o??0,queue:s??[]}}function tf(){let f=To().useValue("attachmentUpload.progress");return ak(sk,{children:[f??0,"%"]})}function $p(){let f=To().useValue("attachmentUpload.progress");return lk(ik,{variant:"determinate",value:f??0,sx:{height:4,borderRadius:2,bgcolor:"#dbe9fb",mt:.75}})}import{Fragment as hk,jsx as fn,jsxs as la}from"react/jsx-runtime";function Ul(e){return e>=1048576?`${(e/1048576).toFixed(1)}MB`:`${Math.max(1,Math.round(e/1024))}KB`}var Vl={flex:1,minWidth:0,fontSize:13.5,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"};function Kl({taskSeq:e,attachments:f,onAdd:g,onRemove:l,removeLocked:o=!1,onPreview:s,onDownload:r}){let[t,n]=uk(!1),c=ck(null),i=qt(),a=Ls(),h=Ns(),d=qp(e),u=e===0,b=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")},x=R=>d?R+1<d.index?"done":R+1===d.index?"uploading":"waiting":"waiting",k=(R,j,A,P={})=>la(po,{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:[la(po,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[fn(Hp,{sx:{fontSize:16,color:"#9a9a97"}}),j,fn(po,{component:"span",sx:{fontSize:12,color:P.uploading?"#2f80ed":"#9a9a97",flexShrink:0},children:A}),P.removeIndex!==void 0?fn(fk,{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:fn(dk,{sx:{fontSize:15}})}):null]}),P.uploading?fn($p,{}):null]},R),B=R=>{let j=Wl(R.name);return fn(po,{component:"button",type:"button",onClick:()=>j?b(R):m(R),title:`${R.name} ${j?"\uBBF8\uB9AC\uBCF4\uAE30":"\uB2E4\uC6B4\uB85C\uB4DC"}`,sx:{...Vl,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 la(Mn,{icon:fn(Hp,{sx:{fontSize:18,display:"block"}}),title:la(hk,{children:["\uD30C\uC77C ",f.length>0?f.length:""]}),children:[la(po,{sx:{display:"flex",flexDirection:"column",gap:.5,mt:1},children:[f.map((R,j)=>{let A=`${R.uuid||R.name}-${j}`;if(u){let P=x(j),N=P==="uploading";return k(A,fn(po,{component:"span",sx:{...Vl,color:P==="done"?"#37352f":"#9a9a97"},children:R.name}),N?fn(tf,{}):Ul(R.size),{uploading:N,removeIndex:!o&&!d?j:void 0})}return R.uuid?k(A,B(R),Ul(R.size),{removeIndex:o?void 0:j}):k(A,fn(po,{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:{...Vl,color:"#9a9a97"},children:R.name}),Ul(R.size),{removeIndex:o?void 0:j})}),!u&&d?d.queue.slice(d.index-1).map((R,j)=>{let A=j===0;return k(`uploading-${d.index+j}-${R.name}`,fn(po,{component:"span",sx:{...Vl,color:"#9a9a97"},children:R.name}),A?fn(tf,{}):Ul(R.size),{uploading:A})}):null]}),fn(po,{onClick:()=>c.current?.click(),onDragOver:R=>{R.preventDefault(),n(!0)},onDragLeave:()=>n(!1),onDrop:R=>{R.preventDefault(),n(!1);let j=Array.from(R.dataTransfer.files);j.length>0&&g(e,j)},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)`}),fn(po,{component:"input",ref:c,type:"file",multiple:!0,onChange:R=>{let j=Array.from(R.target.files??[]);j.length>0&&g(e,j),R.target.value=""},sx:{display:"none"}})]})}import{useState as vk}from"react";import{Checkbox as wk,Divider as _k,ListItemIcon as kk,Menu as Sk,MenuItem as Kp}from"@mui/material";import Tk from"@mui/icons-material/Add";import{useEffect as pk,useState as Wp}from"react";import{Box as rf,Button as mk}from"@mui/material";import{FormDialog as gk}from"@ehfuse/mui-form-dialog";import{ClearTextField as bk}from"@ehfuse/mui-form-controls";import{ColorPicker as yk}from"@ehfuse/mui-color-picker";import{ErrorAlert as xk}from"@ehfuse/alerts";import{jsx as ca,jsxs as nf}from"react/jsx-runtime";var Up="#2f80ed";function Vp({open:e,onClose:f,onSubmit:g}){let[l,o]=Wp(""),[s,r]=Wp(Up);pk(()=>{e&&(o(""),r(Up))},[e]);let t=()=>{let i=l.trim();if(!i){xk("\uB77C\uBCA8 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}g(i,s),f()},n=Ad(s),c=nf(rf,{children:[nf(rf,{sx:{display:"flex",alignItems:"center",gap:1.5,mt:.5},children:[ca(bk,{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}),ca(yk,{value:s,onChange:i=>r(i),shape:"circle",colorSize:28})]}),nf(rf,{sx:{mt:2,display:"flex",alignItems:"center",gap:1,fontSize:13,color:"#787774"},children:["\uBBF8\uB9AC\uBCF4\uAE30",ca(Lt,{option:{key:"__preview__",name:l.trim()||"\uB77C\uBCA8",...n}})]})]});return ca(gk,{open:e,onClose:f,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:ca(mk,{variant:"contained",onClick:t,children:"\uCD94\uAC00"})}})}import{Fragment as Ck,jsx as fs,jsxs as Gl}from"react/jsx-runtime";function Yl({anchorEl:e,selectedKeys:f,labelOptions:g,onToggle:l,onAddLabel:o,onClose:s}){let[r,t]=vk(!1),n=Jn();return Gl(Ck,{children:[Gl(Sk,{anchorEl:e,open:!!e,onClose:s,transitionDuration:0,...n,children:[g.map(c=>{let i=f.includes(c.key);return Gl(Kp,{onClick:()=>l(c.key),sx:{fontSize:14,minWidth:170,gap:1},children:[fs(wk,{size:"small",checked:i,sx:{p:0}}),fs(Lt,{option:c})]},c.key)}),fs(_k,{}),Gl(Kp,{onClick:()=>t(!0),sx:{fontSize:14,color:"#787774"},children:[fs(kk,{children:fs(Tk,{sx:{fontSize:18,color:"#787774"}})}),"\uB77C\uBCA8 \uCD94\uAC00"]})]}),fs(Vp,{open:r,onClose:()=>t(!1),onSubmit:o})]})}function Gp(e,f){let g=Number(e.author_account_seq??0);return f.filter(l=>{let o=Number(l.account_seq??0);return o>0&&o!==g})}function Yp(e,f){let g=(e.target_account_seqs??[]).filter(a=>a>0);if(g.length===0)return null;let l=new Set(g),o=Gp(e,f),s=new Map;for(let a of o){let h=String(a.department??"").trim();if(!h)continue;let d=s.get(h)??[];d.push(a),s.set(h,d)}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 g.forEach((a,h)=>{t.has(a)||i.push(n.get(a)??c[h]??"\uC774\uB984\uC5C6\uC74C")}),{teamNames:r,individualNames:i}}function Xl(e,f){let g=Yp(e,f);return g?[...g.teamNames,...g.individualNames].join(", "):"\uBAA8\uB4E0 \uC9C1\uC6D0"}function Oj(e,f){let g=Yp(e,f);return g?{kind:"members",teamNames:g.teamNames,individualNames:g.individualNames}:{kind:"everyone"}}function Xp(e,f,g){let l=(e.target_account_seqs??[]).filter(d=>d>0),o=Gp(e,f),s=l.length>0?l.length:o.length,r=e.acks??[],t=g>0&&r.some(d=>d.account_seq===g),n=g>0&&Number(e.author_account_seq??0)===g,c=l.length===0||l.includes(g),i=new Set(r.map(d=>d.account_seq)),h=(l.length>0?o.filter(d=>l.includes(Number(d.account_seq??0))):o).filter(d=>!i.has(Number(d.account_seq??0))).map(d=>String(d.name??"").trim()).filter(d=>d.length>0);return{count:r.length,total:s,acked:t,pendingNames:h,canAck:g>0&&!n&&c&&!t&&!e.completed}}function Zp(e,f){let g=Number(f)||50,l=g*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 ${g}MB \uAE4C\uC9C0 \uCCA8\uBD80\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
38
+ \uC81C\uC678\uB41C \uD30C\uC77C: ${o.map(t=>t.name).join(", ")}`:null;return{accepted:s,rejected:o,message:r}}import{DatePicker as Lk}from"@ehfuse/mui-datetime-picker";import{Fragment as da,jsx as ut,jsxs as ji}from"react/jsx-runtime";var rm="#0f9d58";function af({form:e,statusOptions:f,customTabs:g,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:d=0,onMemberEdit:u,onAddProject:b,onAddLabelOption:m,contentSyncKey:x="create",contentTemplates:k,onSaveContentTemplate:B,onRemoveContentTemplate:R}){let j=To(),A=Ls(),P=e.useFormValue("manager_name"),N=e.useFormValue("receiver_names"),q=e.useFormValue("start_date"),z=!!e.useFormValue("is_event"),T=!!e.useFormValue("is_bug"),S=e.useFormValue("bug_repro")??"",D=e.useFormValue("bug_device")??"",p=e.useFormValue("bug_where")??"",y=e.useFormValue("bug_version")??"",v=e.useFormValue("event_time")??"",w=e.useFormValue("event_place")??"",_=e.useFormValue("event_address")??"",C=e.useFormValue("due_date"),O=e.useFormValue("reminders")??[],F=e.useFormValue("priority"),$=e.useFormValue("content"),M=e.useFormValue("checklist")??[],H=e.useFormValue("tab_key"),E=e.useFormValue("sprint_seq")??0,I=e.useFormValue("story_points")??0,L=g.find(ie=>ie.key===H&&ie.useSprints),U=L?l.filter(ie=>`custom-${ie.group_seq}`===H):[],[G,V]=ua(null),W=e.useFormValue("label_keys"),[X,Z]=ua(null),Y=e.useFormValue("visibility")||"involved",J=Number(e.useFormValue("visibility_group_seq")??0),[ee,ne]=ua(null),te=e.useFormValue("repeat_rule")||"",oe=e.useFormValue("repeat_until")||"",[se,de]=ua(null),[ge,ke]=ua(null),Be=e.useFormValue("target_names"),Te=e.useFormValue("target_account_seqs"),it=j.useValue("createAttachmentFiles")??[],be=s?Xl({author_account_seq:a,target_names:Be,target_account_seqs:Te},i):"";return ji(da,{children:[n,s?null:ut(zi,{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(ie=>{let Ce=T?"bug":z?"event":"task",we=Ce===ie.value;return ut(Bk,{onClick:()=>{if(Ce===ie.value)return;e.setFormValue("is_event",ie.value==="event"),e.setFormValue("is_bug",ie.value==="bug"),e.setFormValue("visibility",ie.value==="bug"?"all":"involved"),e.setFormValue("visibility_group_seq",0),ie.value==="bug"&&(e.setFormValue("repeat_rule",""),e.setFormValue("repeat_until",""));let ve=e.getFormValue("icon"),Ke=e.getFormValue("icon_color"),De=[So,"event",zs].includes(ve),pe=!Ke||Ke===rm||Ke===js;De&&e.setFormValue("icon",ie.value==="event"?"event":ie.value==="bug"?zs:So),pe&&e.setFormValue("icon_color",ie.value==="event"?rm:ie.value==="bug"?js:"")},sx:{px:1.75,py:.75,borderRadius:99,fontSize:13.5,fontWeight:we?600:400,color:we?"#ffffff":"#787774",bgcolor:we?"#2563eb":"#f4f4f2"},children:ie.label},ie.label)})}),ut(fa,{sx:{borderColor:"#e6e6e3"}}),ji(zi,{sx:{py:1.5,display:"flex",flexDirection:"column",gap:.25},children:[ut(Dl,{hideProject:r,hideDueDate:!z&&!!te,values:{tabKey:H,managerName:P,receiverNames:N,startDate:q,dueDate:C,reminders:O,priority:F,eventTime:v,eventPlace:w,eventAddress:_},customTabs:g,avatarSrcByName:o,notice:s,event:z,onChangeEventTime:ie=>e.setFormValue("event_time",ie),onChangeEventPlace:ie=>e.setFormValue("event_place",ie),onChangeEventAddress:ie=>e.setFormValue("event_address",ie),targetSummary:be,onChangeProject:ie=>e.setFormValue("tab_key",ie),onAddProject:b,onChangeStartDate:ie=>e.setFormValue("start_date",ie),onChangeDueDate:ie=>e.setFormValue("due_date",ie),onChangeReminder:ie=>e.setFormValue("reminders",ie),onChangePriority:ie=>e.setFormValue("priority",ie),onMemberEdit:u,pinColumns:!0,beforeStart:ji(da,{children:[!s&&!T?ut(vt,{icon:ut(Ak,{sx:{fontSize:17,...te?{color:"#2f80ed"}:{}}}),label:"\uBC18\uBCF5",onClick:ie=>de(ie),sx:z?void 0:cr(2),children:te?El(te):ut(zi,{component:"span",sx:{color:"#9a9a97"},children:"\uC5C6\uC74C"})}):null,!s&&!T&&te?ut(vt,{icon:ut(Dk,{sx:{fontSize:17}}),label:"\uBC18\uBCF5 \uC885\uB8CC",onClick:ie=>ke(ie),sx:z?void 0:cr(2),children:oe?Cn(oe):ut(zi,{component:"span",sx:{color:"#9a9a97"},children:"\uC790\uB3D9"})}):null]}),trailing:ji(da,{children:[s?null:ut(vt,{icon:Y==="all"?ut(Qp,{sx:{fontSize:17,color:"#2f80ed"}}):Y==="group"?ut(em,{sx:{fontSize:17,color:"#d9730d"}}):ut(Jp,{sx:{fontSize:17}}),label:"\uACF5\uAC1C",onClick:ie=>ne(ie),sx:z?void 0:cr(1),children:Y==="all"?"\uC804\uCCB4\uACF5\uAC1C":Y==="group"?`\uBD80\uC11C\uACF5\uAC1C \xB7 ${h.find(ie=>ie.seq===J)?.name??"\uBD80\uC11C"}`:"\uBE44\uACF5\uAC1C"}),L&&!z&&!s?ji(da,{children:[ut(vt,{icon:ut(Ok,{sx:{fontSize:17}}),label:"\uBAA9\uD45C",onClick:ie=>V(ie),sx:cr(1),children:E>0?U.find(ie=>ie.seq===E)?.name??"\uC0AD\uC81C\uB41C \uBAA9\uD45C":ut(zi,{component:"span",sx:{color:"#9a9a97"},children:"\uBBF8\uBC30\uC815"})}),ut(vt,{icon:ut(Pk,{sx:{fontSize:17}}),label:"\uD3EC\uC778\uD2B8",sx:cr(1),children:ut(Lo,{value:I>0?String(I):"",placeholder:"\uBBF8\uCD94\uC815",onCommit:ie=>e.setFormValue("story_points",Number(ie.replace(/[^0-9.]/g,""))||0)})})]}):null,T?ut(Pl,{values:{repro:S,device:D,where:p,version:y},onChangeRepro:ie=>e.setFormValue("bug_repro",ie),onChangeDevice:ie=>e.setFormValue("bug_device",ie),onChangeWhere:ie=>e.setFormValue("bug_where",ie),onChangeVersion:ie=>e.setFormValue("bug_version",ie)}):null]}),leading:z||c?null:ut(zi,{sx:{gridColumn:"1 / -1"},children:ut(vt,{icon:ut(Rk,{sx:{fontSize:17}}),label:"\uB77C\uBCA8",onClick:ie=>Z(ie),children:(W??[]).length>0?ut(Zo,{labelKeys:W??[],labelOptions:f}):ut(zi,{component:"span",sx:{color:"#9a9a97"},children:"\uBE44\uC5B4 \uC788\uC74C"})})})}),ut(fa,{sx:{my:1.5,borderColor:"#e6e6e3"}}),ut(Mn,{icon:ut(Ek,{sx:{fontSize:18,display:"block"}}),title:"\uB0B4\uC6A9",titleExtra:k?ut(Ll,{content:$,templates:k,onApply:ie=>e.setFormValue("content",ie),onSave:B,onRemove:R}):void 0,children:ut(Fl,{syncKey:x,value:$,onChange:ie=>e.setFormValue("content",ie)})}),z?null:ut(fa,{sx:{my:1.5,borderColor:"#e6e6e3"}}),z?null:ut(Hl,{taskSeq:0,checklist:M,onAdd:(ie,Ce)=>e.setFormValue("checklist",[...M,{label:Ce,checked:!1}]),onToggle:(ie,Ce,we)=>e.setFormValue("checklist",M.map((ve,Ke)=>Ke===Ce?{...ve,checked:we}:ve)),onRemove:(ie,Ce)=>e.setFormValue("checklist",M.filter((we,ve)=>ve!==Ce)),onUpdate:(ie,Ce,we)=>e.setFormValue("checklist",M.map((ve,Ke)=>Ke===Ce?{...ve,label:we}:ve))}),ut(fa,{sx:{my:1.5,borderColor:"#e6e6e3"}}),ut(Kl,{taskSeq:0,attachments:it.map(ie=>({name:ie.name,size:ie.size})),onAdd:(ie,Ce)=>{let we=Zp(Ce,A);we.message&&tm(we.message),we.accepted.length!==0&&j.setValue("createAttachmentFiles",[...j.getValue("createAttachmentFiles")??[],...we.accepted])},onRemove:(ie,Ce)=>j.setValue("createAttachmentFiles",it.filter((we,ve)=>ve!==Ce))}),T?null:ji(da,{children:[ut(fa,{sx:{my:1.5,borderColor:"#e6e6e3"}}),ut(Mn,{icon:ut(Mk,{sx:{fontSize:18,display:"block"}}),title:"\uBE44\uACE0",children:ut(Nk,{form:e,name:"note",placeholder:"\uBE44\uACE0 \uC785\uB825",fullWidth:!0,size:"medium",sx:{mt:1}})})]})]}),ut(of,{transitionDuration:0,anchorEl:G,open:!!G,onClose:()=>V(null),children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...U.map(ie=>({seq:ie.seq,label:In(ie)}))].map(ie=>ut(sf,{onClick:()=>{e.setFormValue("sprint_seq",ie.seq),V(null)},sx:{fontSize:14,minWidth:170},children:ie.label},ie.seq))}),ut(of,{transitionDuration:0,anchorEl:se,open:!!se,onClose:()=>de(null),children:[{value:"",label:"\uC5C6\uC74C"},...na].map(ie=>ut(sf,{selected:te===ie.value,onClick:()=>{if(de(null),ie.value===""){e.setFormValue("repeat_rule",""),e.setFormValue("repeat_until","");return}let Ce;if(z){if(Ce=String(e.getFormValue("due_date")??"").slice(0,10),!Ce){tm("\uBC18\uBCF5\uD558\uB824\uBA74 \uC77C\uC815 \uB0A0\uC9DC\uB97C \uBA3C\uC800 \uC120\uD0DD\uD558\uC138\uC694.");return}}else{if(Ce=String(e.getFormValue("start_date")??"").slice(0,10),!Ce){let we=new Date,ve=Ke=>String(Ke).padStart(2,"0");Ce=`${we.getFullYear()}-${ve(we.getMonth()+1)}-${ve(we.getDate())}`}e.setFormValue("due_date","")}e.setFormValue("repeat_rule",ie.value),e.setFormValue("repeat_until",Ml(Ce,ie.value))},sx:{fontSize:14,minWidth:140},children:ie.label},ie.value||"none"))}),ut(Lk,{anchorEl:ge,open:!!ge,onClose:()=>ke(null),selectedDate:oe?new Date(`${oe}T00:00:00`):new Date,onDateChange:ie=>{let Ce=we=>String(we).padStart(2,"0");e.setFormValue("repeat_until",`${ie.getFullYear()}-${Ce(ie.getMonth()+1)}-${Ce(ie.getDate())}`),ke(null)}}),ut(of,{transitionDuration:0,anchorEl:ee,open:!!ee,onClose:()=>ne(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:ut(Jp,{sx:{fontSize:17,color:"#57564f"}}),selected:Y==="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:ut(Qp,{sx:{fontSize:17,color:"#2f80ed"}}),selected:Y==="all",onPick:()=>{e.setFormValue("visibility","all"),e.setFormValue("visibility_group_seq",0)}},...[...h].sort((ie,Ce)=>ie.seq===d?-1:Ce.seq===d?1:0).map(ie=>({key:`group-${ie.seq}`,label:`\uBD80\uC11C\uACF5\uAC1C \xB7 ${ie.name}`,tip:`${ie.name} \uC18C\uC18D \uC9C1\uC6D0\uC774 \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4`,icon:ut(em,{sx:{fontSize:17,color:"#d9730d"}}),selected:Y==="group"&&J===ie.seq,onPick:()=>{e.setFormValue("visibility","group"),e.setFormValue("visibility_group_seq",ie.seq)}}))].map(ie=>ut(Ik,{title:ie.tip,arrow:!0,disableInteractive:!0,placement:"right",children:ji(sf,{selected:ie.selected,onClick:()=>{ie.onPick(),ne(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[ie.icon,ie.label]})},ie.key))}),ut(Yl,{anchorEl:X,selectedKeys:W??[],labelOptions:f,onToggle:ie=>e.setFormValue("label_keys",Xa(W??[],ie)),onAddLabel:(ie,Ce)=>m?.(ie,Ce),onClose:()=>Z(null)})]})}import{Fragment as im,jsx as nr,jsxs as ha}from"react/jsx-runtime";function IF({open:e,onClose:f,...g}){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}=g,d=To(),u=jk(!1),[b,m]=nm(0),x=l.useFormValue("title"),k=l.useFormValue("icon"),B=l.useFormValue("icon_color"),R=!!l.useFormValue("is_event"),j=!!l.useFormValue("is_bug"),A=qt(),N=d.useValue("createSubmitting")??!1,q=a||R?Et(k||(a?pr:yr)):null,z=a?"\uACF5\uC9C0 \uB4F1\uB85D":R?"\uC77C\uC815 \uB4F1\uB85D":j?"\uC624\uB958 \uB4F1\uB85D":"\uC5C5\uBB34 \uB4F1\uB85D",T=a?"\uACF5\uC9C0 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694":R?"\uC77C\uC815 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694":j?"\uC5B4\uB5A4 \uC624\uB958\uC778\uC9C0 \uD55C \uC904\uB85C \uC801\uC5B4\uC8FC\uC138\uC694":"\uC5C5\uBB34 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694";zk(()=>{let v=u.current;u.current=e,!(!e||v)&&(l.setFormValues({...l.getFormValues(),title:o,icon:a?pr:h?zs:So,icon_color:a?"#e5484d":h?js:"",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}),d.setValue("createAttachmentFiles",[]),m(w=>w+1))},[e]);let[S,D]=nm(null),p=v=>q?R?nr(Hk,{title:"\uC544\uC774\uCF58 \uBCC0\uACBD",arrow:!0,enterDelay:400,disableInteractive:!0,children:nr(Fk,{onClick:w=>D(w.currentTarget),sx:{display:"flex",p:.5,borderRadius:1,color:B||"#1e3a8a","&:hover":{bgcolor:"#f2f2f0"}},children:nr(q,{sx:{fontSize:20}})})}):nr(zo,{sx:[{display:"flex",color:B||"#1e3a8a"},v],children:nr(q,{sx:{fontSize:20}})}):null,y=ha(zo,{sx:{display:"flex",alignItems:"center",gap:1,px:2,pt:2,pb:1},children:[p({p:0}),nr(zo,{component:"input",autoFocus:!0,spellCheck:!1,value:x,placeholder:T,onChange:v=>l.setFormValue("title",v.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?nr(im,{children:nr(Vk,{open:e,onClose:f,locale:"ko",fontScale:{enabled:!0,default:1.1,min:.6},title:z,titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},fullScreen:!0,mobilePresentation:"slide",actions:{showCancelButton:!0,right:nr(lf,{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:nr(zo,{sx:{width:"100%",minWidth:0,display:"flex",flexDirection:"column",gap:0},children:nr(af,{...g,contentSyncKey:`create-${b}`,leadingRow:y})})}]})}):ha(im,{children:[nr(qk,{anchor:"right",open:e,onClose:f,"aria-label":"\uC0C8 \uC5C5\uBB34 \uB4F1\uB85D",sx:{zIndex:v=>v.zIndex.modal},slotProps:{paper:{sx:{width:720,maxWidth:"100vw"}}},children:ha(zo,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[ha(zo,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1.5,flexShrink:0},children:[p({px:.5}),nr(zo,{component:"input",autoFocus:!0,spellCheck:!1,value:x,placeholder:T,onChange:v=>l.setFormValue("title",v.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}}}),nr($k,{"aria-label":"\uB2EB\uAE30",onClick:f,sx:{color:"#6b7280"},children:nr(Wk,{})})]}),nr(om,{sx:{borderColor:"#e6e6e3"}}),nr(zo,{sx:{flex:1,minHeight:0},children:nr(Uk,{style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:nr(af,{...g,contentSyncKey:`create-${b}`})})}),nr(om,{sx:{borderColor:"#e6e6e3"}}),ha(zo,{sx:{display:"flex",justifyContent:"flex-end",gap:1,px:2,py:1.5,flexShrink:0},children:[nr(lf,{onClick:f,color:"inherit",disabled:N,children:"\uCDE8\uC18C"}),nr(lf,{onClick:l.submit,variant:"contained",disabled:N,children:N?"\uB4F1\uB85D \uC911\u2026":"\uB4F1\uB85D"})]})]})}),nr(ni,{anchorEl:S,value:k,color:B,onSelect:v=>{l.setFormValue("icon",v),D(null)},onSelectColor:v=>l.setFormValue("icon_color",v),onClose:()=>D(null)})]})}import{useCallback as s6,useEffect as nc,useRef as oc,useState as ic}from"react";import{Box as sc,Button as a6,Divider as jm,Drawer as l6,IconButton as c6,ListItemIcon as kf,ListItemText as Sf,Menu as u6,MenuItem as Tf}from"@mui/material";import f6 from"@mui/icons-material/MoreVert";import d6 from"@mui/icons-material/DeleteOutline";import h6 from"@mui/icons-material/ShareOutlined";import p6 from"@mui/icons-material/HistoryOutlined";import m6 from"@ehfuse/overlay-scrollbar";import{FormDialog as g6}from"@ehfuse/mui-form-dialog";import{SuccessAlert as Fm}from"@ehfuse/alerts";import{useRef as uf,useState as ds}from"react";import{Box as xt,Button as lm,Chip as Zl,IconButton as Un,Tooltip as dm}from"@mui/material";import cm from"@mui/icons-material/Send";import{TextField as Zk}from"@ehfuse/mui-form-controls";import Jl from"@mui/icons-material/Close";import Jk from"@mui/icons-material/EditOutlined";import Qk from"@mui/icons-material/Favorite";import e4 from"@mui/icons-material/FavoriteBorderOutlined";import t4 from"@mui/icons-material/CheckCircle";import r4 from"@mui/icons-material/CheckCircleOutlineOutlined";import hs from"@mui/icons-material/AttachFileOutlined";import n4 from"@mui/icons-material/AddCircleOutline";import o4 from"@mui/icons-material/ImageOutlined";var cf=e=>{if(e===0)return"0 Bytes";let f=1024,g=["Bytes","KB","MB","GB","TB"],l=Math.floor(Math.log(e)/Math.log(f));return parseFloat((e/Math.pow(f,l)).toFixed(2))+" "+g[l]};import{Box as Kk}from"@mui/material";import{Fragment as Xk,jsx as sm}from"react/jsx-runtime";var Gk=/https?:\/\/[^\s<>"']+/g;function Yk(e){let f=e,g="";for(;;){let l=f.slice(-1);if(l===")"&&(f.match(/\(/g)??[]).length<(f.match(/\)/g)??[]).length){f=f.slice(0,-1),g=l+g;continue}if(".,;:!?]}".includes(l)&&l!==""){f=f.slice(0,-1),g=l+g;continue}break}return[f,g]}function am({text:e}){let{openExternalUrl:f}=ot(),g=s=>{f?f(s):window.open(s,"_blank","noopener,noreferrer")},l=[],o=0;for(let s of e.matchAll(Gk)){let r=s.index??0,[t,n]=Yk(s[0]);r>o&&l.push(e.slice(o,r)),l.push(sm(Kk,{component:"a",href:t,onClick:c=>{c.preventDefault(),c.stopPropagation(),g(t)},sx:{color:"#2563eb",textDecoration:"underline",wordBreak:"break-all",cursor:"pointer"},children:t},`${r}-${t}`)),n&&l.push(n),o=r+s[0].length}return o<e.length&&l.push(e.slice(o)),sm(Xk,{children:l})}import{Fragment as fm,jsx as He,jsxs as ur}from"react/jsx-runtime";var i4=5;function um({kind:e,reactions:f,myAccountSeq:g,onToggle:l}){let o=f??[],s=g>0&&o.some(c=>c.account_seq===g),r=e==="like"?"\uC88B\uC544\uC694":"\uD655\uC778",t=o.length===0?r:He(xt,{sx:{whiteSpace:"pre-line",fontSize:12},children:o.map(c=>`${c.name} \xB7 ${c.time}`).join(`
39
+ `)}),n=e==="like"?"#e5484d":"#2f80ed";return He(dm,{title:t,arrow:!0,enterDelay:300,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:ur(xt,{sx:{display:"inline-flex",alignItems:"center"},children:[He(Un,{size:"small","aria-label":`\uB313\uAE00 ${r}`,onClick:l,sx:{color:s?n:"#c9c8c5",p:.5},children:e==="like"?s?He(Qk,{sx:{fontSize:16}}):He(e4,{sx:{fontSize:16}}):s?He(t4,{sx:{fontSize:16}}):He(r4,{sx:{fontSize:16}})}),o.length>0?He(xt,{component:"span",sx:{fontSize:12,color:s?n:"#9a9a97",ml:-.25},children:o.length}):null]})})}function hm({taskSeq:e,comments:f,currentUserName:g="",myAccountSeq:l=0,avatarSrcByName:o,onUpdate:s,onRemove:r,onToggleReaction:t,onPreview:n,onDownload:c}){let[i,a]=ds(null),h=uf(null),[d,u]=ds(null),[b,m]=ds(!1),x=Math.max(0,f.length-i4),k=x>0&&!b,B=i?Math.min(i.index,x):x,R=f.map((q,z)=>({comment:q,index:z})).slice(k?B:0),j=Ns(),A=(q,z)=>{if(n){n(q,z&&z.length>1?z:void 0);return}window.open(j(q.uuid??""),"_blank","noopener,noreferrer")},P=q=>{if(c){c(q);return}window.open(j(q.uuid??"",{download:!0}),"_blank","noopener,noreferrer")},N=ot().slots?.avatar;return ur(xt,{sx:{px:2,pb:2,display:"flex",flexDirection:"column",gap:.25},children:[ur(xt,{sx:{display:"flex",alignItems:"center",gap:1},children:[He(ri,{sx:{fontSize:18,display:"block",color:"#37352f"}}),ur(xt,{sx:{fontSize:Uu,fontWeight:500,color:"#37352f"},children:["\uB313\uAE00",f.length>0?` (${f.length})`:""]}),x>0&&(!k||B>0)?He(xt,{role:"button",tabIndex:0,onClick:()=>m(q=>!q),onKeyDown:q=>{(q.key==="Enter"||q.key===" ")&&(q.preventDefault(),m(z=>!z))},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]}),f.length===0?He(xt,{sx:{mt:1,fontSize:14.5,color:"#9a9a97"},children:"\uB4F1\uB85D\uB41C \uB313\uAE00\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):null,He(xt,{sx:{display:"flex",flexDirection:"column",gap:1,mt:1},children:R.map(({comment:q,index:z})=>{let T=!!g&&q.author===g;return ur(xt,{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 S=o?.get(q.author)??"";return N?He(xt,{sx:{display:"inline-flex",flexShrink:0},children:He(N,{name:q.author,src:S||void 0,size:44})}):He(xt,{sx:{display:"inline-flex",flexShrink:0},children:He(Tn,{src:S,name:q.author,avatarSx:{width:44,height:44,fontSize:20,borderRadius:"50%",...Xi[0]},iconFontSize:24})})})(),ur(xt,{sx:{flex:1,minWidth:0},children:[ur(xt,{sx:{display:"flex",alignItems:"center",gap:.75,minWidth:0,position:"relative"},children:[He(xt,{component:"span",sx:{fontSize:14.5,fontWeight:700,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:q.author}),q.external?He(xt,{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,He(xt,{component:"span",sx:{fontSize:12.5,color:"#9a9a97",flexShrink:0,whiteSpace:"nowrap"},children:q.time}),T?He(xt,{sx:{ml:"auto"}}):ur(xt,{sx:{display:"flex",alignItems:"center",gap:.25,ml:"auto",flexShrink:0},children:[He(um,{kind:"like",reactions:q.likes,myAccountSeq:l,onToggle:()=>t?.(e,z,"like")}),He(um,{kind:"ack",reactions:q.acks,myAccountSeq:l,onToggle:()=>t?.(e,z,"ack")})]}),T?ur(xt,{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:[He(Un,{size:"small","aria-label":"\uB313\uAE00 \uC218\uC815",onClick:()=>a({index:z,text:q.text,attachments:[...q.attachments??[]],files:[]}),sx:{color:"#9a9a97"},children:He(Jk,{sx:{fontSize:15}})}),He(Un,{size:"small","aria-label":"\uB313\uAE00 \uC0AD\uC81C",onClick:S=>u({anchorEl:S.currentTarget,index:z}),sx:{color:"#9a9a97"},children:He(Jl,{sx:{fontSize:15}})})]}):null]}),i?.index===z?ur(xt,{sx:{mt:.5},children:[He(xt,{component:"textarea",autoFocus:!0,spellCheck:!1,value:i.text,onChange:S=>a({...i,text:S.target.value}),sx:{width:"100%",minHeight:56,border:"1px solid #dedddb",borderRadius:1,outline:"none",font:"inherit",fontSize:14,p:1,resize:"vertical"}}),ur(xt,{sx:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:.75,mt:.75},children:[i.attachments.map((S,D)=>{let p=()=>a({...i,attachments:i.attachments.filter((y,v)=>v!==D)});return pa(S.name)&&S.uuid?ur(xt,{sx:{position:"relative"},children:[He(xt,{component:"img",src:j(S.uuid,{thumb:"md"}),alt:S.name,title:S.name,loading:"lazy",sx:{width:72,height:72,objectFit:"cover",borderRadius:1,border:"1px solid #e6e6e3",display:"block"}}),He(Un,{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:He(Jl,{sx:{fontSize:14}})})]},`kept-${S.uuid}-${D}`):He(Zl,{size:"small",icon:He(hs,{sx:{fontSize:14}}),label:S.name,onDelete:p,sx:{fontSize:14,height:26,bgcolor:"#f1f5f9"}},`kept-${S.uuid??S.name}-${D}`)}),i.files.map((S,D)=>{let p=()=>a({...i,files:i.files.filter((y,v)=>v!==D)});return pa(S.name)?ur(xt,{sx:{position:"relative"},children:[He(xt,{component:"img",src:URL.createObjectURL(S),alt:S.name,title:`${S.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"}}),He(Un,{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:He(Jl,{sx:{fontSize:14}})})]},`new-${S.name}-${D}`):He(Zl,{size:"small",icon:He(hs,{sx:{fontSize:14}}),label:`${S.name} (\uC0C8 \uD30C\uC77C)`,onDelete:p,sx:{fontSize:14,height:26,bgcolor:"#eef4ff"}},`new-${S.name}-${D}`)}),He(dm,{title:"\uCCA8\uBD80 \uCD94\uAC00",arrow:!0,children:He(Un,{size:"small","aria-label":"\uCCA8\uBD80 \uCD94\uAC00",onClick:()=>h.current?.click(),sx:{ml:"auto",color:"#2f80ed"},children:He(n4,{sx:{fontSize:20}})})})]}),ur(xt,{sx:{display:"flex",justifyContent:"flex-end",alignItems:"center",gap:.75,mt:.5},children:[He(lm,{size:"small",color:"inherit",onClick:()=>a(null),children:"\uCDE8\uC18C"}),He(lm,{size:"small",variant:"contained",disabled:!i.text.trim()&&i.attachments.length===0&&i.files.length===0,onClick:()=>{s(e,z,i.text,{attachments:i.attachments,files:i.files}),a(null)},children:"\uC800\uC7A5"})]}),He(xt,{component:"input",type:"file",multiple:!0,ref:h,sx:{display:"none"},onChange:S=>{let D=Array.from(S.target.files??[]);D.length>0&&a({...i,files:[...i.files,...D].slice(0,10)}),S.target.value=""}})]}):ur(xt,{children:[q.text?He(xt,{sx:{fontSize:15,whiteSpace:"pre-wrap"},children:He(am,{text:q.text})}):null,(q.attachments??[]).length>0?He(xt,{sx:{display:"flex",flexWrap:"wrap",gap:.75,mt:.75},children:(q.attachments??[]).map((S,D)=>{let p=!!S.uuid,y=pa(S.name),v=(q.attachments??[]).filter(_=>!!_.uuid&&pa(_.name));if(y&&p)return He(xt,{component:"img",src:j(S.uuid??"",{thumb:"md"}),alt:S.name,title:`${S.name} \uD06C\uAC8C \uBCF4\uAE30`,loading:"lazy",onClick:()=>A(S,v),sx:{width:96,height:96,objectFit:"cover",borderRadius:1,border:"1px solid #e6e6e3",cursor:"pointer",bgcolor:"#f8fafc"}},`${S.name}-${D}`);let w=Wl(S.name);return He(Zl,{size:"small",icon:He(hs,{sx:{fontSize:14}}),label:`${S.name} (${cf(S.size)})`,clickable:p,onClick:p?()=>w?A(S):P(S):void 0,title:p?`${S.name} ${w?"\uBBF8\uB9AC\uBCF4\uAE30":"\uB2E4\uC6B4\uB85C\uB4DC"}`:S.name,sx:{fontSize:14,height:26,bgcolor:"#f1f5f9"}},`${S.name}-${D}`)})}):null]})]})]},`${q.time}-${z}`)})}),He(At,{open:!!d,anchorEl:d?.anchorEl??null,title:"\uC774 \uB313\uAE00\uC744 \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uC0AD\uC81C",onCancel:()=>u(null),onConfirm:()=>{d&&(r(e,d.index),a(null)),u(null)}})]})}function pa(e){return/\.(png|jpe?g|gif|webp|bmp|svg|heic|heif)$/i.test(String(e??"").trim())}function pm({onSubmit:e}){let[f,g]=ds(""),[l,o]=ds([]),[s,r]=ds(!1),t=uf(null),n=uf(null),c=qt(),i=d=>{let u=Array.from(d??[]);u.length!==0&&o(b=>[...b,...u].slice(0,10))},a=()=>{let d=f.trim();!d&&l.length===0||(e(d,l.length>0?l:void 0),g(""),o([]))},h=ur(fm,{children:[He(Un,{size:"small","aria-label":"\uD30C\uC77C \uCCA8\uBD80",onClick:()=>t.current?.click(),sx:{color:"#9a9a97"},children:He(hs,{sx:{fontSize:20}})}),He(Un,{size:"small","aria-label":"\uC774\uBBF8\uC9C0 \uCCA8\uBD80",onClick:()=>n.current?.click(),sx:{color:"#9a9a97"},children:He(o4,{sx:{fontSize:20}})})]});return ur(xt,{children:[l.length>0?He(xt,{sx:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:1.5,px:2,pt:2},children:l.map((d,u)=>pa(d.name)?ur(xt,{sx:{position:"relative"},children:[He(xt,{component:"img",src:URL.createObjectURL(d),alt:d.name,title:d.name,onLoad:b=>URL.revokeObjectURL(b.target.src),sx:{width:72,height:72,objectFit:"cover",borderRadius:1,border:"1px solid #e6e6e3",display:"block"}}),He(Un,{size:"small","aria-label":"\uCCA8\uBD80 \uC81C\uAC70",onClick:()=>o(b=>b.filter((m,x)=>x!==u)),sx:{position:"absolute",top:-6,right:-6,p:.25,bgcolor:"#ffffff",border:"1px solid #e6e6e3","&:hover":{bgcolor:"#f1f5f9"}},children:He(Jl,{sx:{fontSize:14}})})]},`${d.name}-${u}`):He(Zl,{size:"small",icon:He(hs,{sx:{fontSize:14}}),label:`${d.name} (${cf(d.size)})`,onDelete:()=>o(b=>b.filter((m,x)=>x!==u)),sx:{fontSize:14,height:26,bgcolor:"#f1f5f9"}},`${d.name}-${u}`))}):null,ur(xt,{sx:{position:"relative",display:"flex"},onDragOver:d=>{Array.from(d.dataTransfer?.types??[]).includes("Files")&&(d.preventDefault(),r(!0))},onDragLeave:d=>{d.currentTarget.contains(d.relatedTarget)||r(!1)},onDrop:d=>{Array.from(d.dataTransfer?.types??[]).includes("Files")&&(d.preventDefault(),r(!1),i(d.dataTransfer?.files??null))},children:[s?ur(xt,{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:[He(hs,{sx:{fontSize:18}}),"\uC5EC\uAE30\uC5D0 \uB193\uC73C\uBA74 \uCCA8\uBD80\uB429\uB2C8\uB2E4"]}):null,He(Zk,{value:f,placeholder:"\uB313\uAE00\uC744 \uC785\uB825\uD558\uC138\uC694",onChange:d=>g(d.target.value),onPaste:d=>{Array.from(d.clipboardData?.files??[]).length!==0&&(d.preventDefault(),i(d.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?ur(xt,{sx:{position:"absolute",right:8,top:"50%",transform:"translateY(-50%)",display:"flex",alignItems:"center",gap:.25},children:[h,He(Un,{"aria-label":"\uB313\uAE00 \uB4F1\uB85D",disabled:!f.trim()&&l.length===0,onClick:a,sx:{color:"#2563eb","&.Mui-disabled":{color:"#c9c8c5"}},children:He(cm,{sx:{fontSize:22}})})]}):ur(fm,{children:[He(xt,{sx:{position:"absolute",left:8,bottom:6,display:"flex",alignItems:"center",gap:.25},children:h}),He(Un,{"aria-label":"\uB313\uAE00 \uB4F1\uB85D",disabled:!f.trim()&&l.length===0,onClick:a,sx:{position:"absolute",right:8,top:"50%",transform:"translateY(-50%)",color:"#2563eb","&.Mui-disabled":{color:"#c9c8c5"}},children:He(cm,{sx:{fontSize:22}})})]})]}),He(xt,{component:"input",ref:t,type:"file",multiple:!0,onChange:d=>{i(d.target.files),d.target.value=""},sx:{display:"none"}}),He(xt,{component:"input",ref:n,type:"file",accept:"image/*",multiple:!0,onChange:d=>{i(d.target.files),d.target.value=""},sx:{display:"none"}})]})}import{useState as ms}from"react";import{Box as gs,Button as x4,ButtonBase as v4,IconButton as bs,Tooltip as ys}from"@mui/material";import w4 from"@mui/icons-material/Close";import _4 from"@mui/icons-material/ArrowBack";import k4 from"@mui/icons-material/ContentCopyOutlined";import S4 from"@mui/icons-material/ShareOutlined";import T4 from"@mui/icons-material/HistoryOutlined";import C4 from"@mui/icons-material/Print";import{useEffect as c4}from"react";import{Box as jo,Button as u4,CircularProgress as f4}from"@mui/material";import{FormDialog as d4}from"@ehfuse/mui-form-dialog";import{OverlayScrollbar as h4}from"@ehfuse/overlay-scrollbar";import{useCallback as s4,useEffect as a4,useRef as ff}from"react";import{useModal as l4}from"@ehfuse/forma";function mm({open:e,onClose:f,modalId:g}){let l=ff(f);l.current=f;let o=l4({modalId:g,onClose:()=>l.current()}),s=ff(o);s.current=o;let r=ff(!1);return a4(()=>{e&&!r.current?s.current.open():!e&&r.current&&s.current.isOpen&&s.current.close(),r.current=e},[e]),{requestClose:s4(()=>{if(s.current.isOpen){s.current.close();return}l.current()},[])}}import{jsx as Fo,jsxs as Ql}from"react/jsx-runtime";var p4={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",returned:"\uC644\uB8CC\uB97C \uB418\uB3CC\uB838\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 gm(e){return String(e??"").trim()||"\uC5C6\uC74C"}function m4(e){if(e.kind!=="field")return p4[String(e.kind)]??"\uBCC0\uACBD\uD588\uC2B5\uB2C8\uB2E4";let f=String(e.field_label??e.field??"").trim()||"\uD56D\uBAA9",g=String(e.old_value??"").trim(),l=String(e.new_value??"").trim();return!g&&l?`${f}\uC744(\uB97C) "${l}"(\uC73C)\uB85C \uC785\uB825\uD588\uC2B5\uB2C8\uB2E4`:g&&!l?`${f}\uC744(\uB97C) \uBE44\uC6E0\uC2B5\uB2C8\uB2E4`:`${f}\uC744(\uB97C) "${gm(g)}" \u2192 "${gm(l)}" \uB85C \uBC14\uAFE8\uC2B5\uB2C8\uB2E4`}function ec({open:e,taskSeq:f,items:g,loading:l,onLoad:o,onClose:s}){let r=qt(),{requestClose:t}=mm({open:e,onClose:s});c4(()=>{e&&f>0&&!g&&o?.(f)},[e,f,g,o]);let n=Fo(jo,{sx:{height:r?"100%":420,minHeight:0},children:Fo(h4,{style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:Ql(jo,{sx:{px:2,pt:2,display:"flex",flexDirection:"column",gap:1,"&::after":{content:'""',flexShrink:0,height:16}},children:[l&&!g?Ql(jo,{sx:{display:"flex",alignItems:"center",gap:1,color:"#9a9a97",fontSize:14.5},children:[Fo(f4,{size:14,thickness:5,sx:{color:"#9a9a97"}}),"\uBD88\uB7EC\uC624\uB294 \uC911\u2026"]}):null,g&&g.length===0?Fo(jo,{sx:{fontSize:14.5,color:"#9a9a97"},children:"\uAE30\uB85D\uB41C \uD65C\uB3D9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):null,(g??[]).map(c=>Ql(jo,{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:[Fo(jo,{sx:{flexShrink:0,...r?{}:{width:"10.5em"},whiteSpace:"nowrap",fontSize:13.5,color:"#9a9a97",lineHeight:1.5},children:bn(c.acted_time)}),Ql(jo,{sx:{minWidth:0,fontSize:14.5,color:"#37352f",lineHeight:1.5},children:[Fo(jo,{component:"span",sx:{fontWeight:500},children:String(c.actor_name??"").trim()||"\uC774\uB984\uC5C6\uC74C"}),Fo(jo,{component:"span",sx:{ml:.5},children:m4(c)})]})]},c.seq))]})})});return Fo(d4,{open:e,onClose:t,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${g&&g.length>0?` (${g.length})`:""}`,locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-task-activity",sections:[{id:"task-activity",showTitle:!1,children:n}],scrollPastLastSection:!1,actions:{showCancelButton:!1,right:Fo(u4,{variant:"contained",onClick:t,children:"\uB2EB\uAE30"})}})}import{InfoAlert as g4,SuccessAlert as b4}from"@ehfuse/alerts";var bm=e=>e?e.replace(/<(script|style)[\s\S]*?<\/\1>/gi,"").replace(/<br\s*\/?>/gi,`
40
40
  `).replace(/<\/(p|div|li|h[1-6]|tr)>/gi,`
41
41
  `).replace(/<[^>]+>/g,"").replace(/&nbsp;/gi," ").replace(/&lt;/gi,"<").replace(/&gt;/gi,">").replace(/&quot;/gi,'"').replace(/&#39;/gi,"'").replace(/&amp;/gi,"&").replace(/\n{3,}/g,`
42
42
 
43
- `).trim():"";function h4(e){let f=[`[\uC5C5\uBB34] ${e.title}`],g=Cn(e.start_date),l=Cn(e.due_date);(g||l)&&f.push(`\uAE30\uAC04: ${g&&l?`${g} ~ ${l}`:g||l}`),e.manager_name&&f.push(`\uCC45\uC784\uC790: ${e.manager_name}`);let o=xr(e).name;o&&f.push(`\uC0C1\uD0DC: ${o}`);let s=gm(e.content);s&&f.push("",s);let r=String(e.note??"").trim();return r&&f.push("",`\uBE44\uACE0: ${r}`),f.join(`
44
- `)}function bm(e){navigator.clipboard.writeText(e).then(()=>d4("\uC5C5\uBB34 \uB0B4\uC6A9\uC744 \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>f4("\uBCF5\uC0AC\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uB0B4\uC6A9\uC744 \uC9C1\uC811 \uC120\uD0DD\uD574 \uBCF5\uC0AC\uD574 \uC8FC\uC138\uC694."))}function ps(e,f){let g=h4(e);if(f&&typeof navigator.share=="function"){navigator.share({text:g}).catch(l=>{l?.name!=="AbortError"&&bm(g)});return}bm(g)}import{Fragment as _4,jsx as Dt,jsxs as df}from"react/jsx-runtime";function ym({task:e,myAccountSeq:f=0,onToggleCompleted:g,onChangeTitle:l,onChangeIcon:o,onChangeIconColor:s,onClose:r,appBarMode:t=!1,activityItems:n,activityLoading:c,onLoadActivity:i,onPrint:a,onDelete:h,canDelete:d}){let u=qt(),[b,m]=ms(!1),[x,k]=ms(null),[B,R]=ms(null),[j,A]=ms(null),[P,N]=ms(null),[q,z]=ms(null),T=!!e.is_notice,S=!!e.is_event,D=T?Et(e.icon||pr):S?Et(e.icon||yr):null,p=T&&f>0&&(e.author_account_seq??0)===f,{onReturnTask:y,onReviewDone:v,editPolicy:w}=ot(),_=!!y&&Zr(e,f),C=_&&!!v,O=!Qn(e,f),F=Qo(e,f,w),$=f>0&&(e.author_account_seq??0)===f,K=!!h&&(d??!Ti(e,f,w,!$)),M=!S&&(T?p:(e.author_account_seq??0)===f||(e.manager_account_seq??0)===f);return df(_4,{children:[df(gs,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1.5,flexShrink:0},children:[t&&r?Dt(bs,{"aria-label":"\uB4A4\uB85C",onClick:r,sx:{color:"#37352f",ml:-1},children:Dt(b4,{})}):null,M&&!t?Dt(ys,{title:e.completed&&e.completed_by?`${e.completed_by} \xB7 ${bn(e.completed_time)} \uC644\uB8CC`:"",arrow:!0,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:df(gs,{sx:{display:"flex",flexShrink:0,mr:1},children:[Dt(eo,{onClick:H=>z({anchorEl:H.currentTarget,nextCompleted:!e.completed}),children:e.completed?_?"\uB418\uB3CC\uB9AC\uAE30":"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC\uD558\uAE30"}),C?Dt(p4,{variant:"contained",size:"small",disableElevation:!0,onClick:H=>N(H.currentTarget),sx:{ml:1,...ei},children:"\uAC80\uC218\uC644\uB8CC"}):null]})}):null,t||!D?null:S&&!O?Dt(ys,{title:"\uC544\uC774\uCF58 \uBCC0\uACBD",arrow:!0,enterDelay:400,disableInteractive:!0,children:Dt(m4,{onClick:H=>R(H.currentTarget),sx:{display:"flex",p:.5,borderRadius:1,color:e.icon_color||"#1e3a8a","&:hover":{bgcolor:"#f2f2f0"}},children:Dt(D,{sx:{fontSize:20}})})}):Dt(gs,{sx:{display:"flex",px:.5,color:e.icon_color||(T?"#e5484d":"#1e3a8a")},children:Dt(D,{sx:{fontSize:20}})}),x!==null?Dt(gs,{component:"input",autoFocus:!0,spellCheck:!1,value:x,onChange:H=>k(H.target.value),onBlur:()=>{x.trim()&&x.trim()!==e.title&&l(e.seq,x.trim()),k(null)},onKeyDown:H=>{H.key==="Enter"&&H.target.blur(),H.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?Dt(gs,{sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:T?"\uACF5\uC9C0":S?"\uC77C\uC815":e.is_bug?"\uC624\uB958":"\uC5C5\uBB34"}):Dt(gs,{onClick:F?void 0:()=>k(e.title),sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",cursor:F?"default":"text",textDecoration:e.completed?"line-through":"none"},children:e.title}),i?Dt(ys,{title:"\uD65C\uB3D9",arrow:!0,children:Dt(bs,{"aria-label":"\uD65C\uB3D9",onClick:()=>m(!0),sx:{color:"#6b7280"},children:Dt(v4,{sx:{fontSize:20}})})}):null,Dt(ys,{title:u?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",arrow:!0,children:Dt(bs,{"aria-label":u?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",onClick:()=>ps(e,u),sx:{color:"#6b7280"},children:u?Dt(x4,{sx:{fontSize:20}}):Dt(y4,{sx:{fontSize:20}})})}),a?Dt(ys,{title:"\uC778\uC1C4",arrow:!0,children:Dt(bs,{"aria-label":"\uC778\uC1C4",onClick:()=>a(e),sx:{color:"#6b7280"},children:Dt(w4,{sx:{fontSize:20}})})}):null,K?Dt(ys,{title:"\uC0AD\uC81C",arrow:!0,children:Dt(bs,{"aria-label":"\uC0AD\uC81C",onClick:H=>A(H.currentTarget),sx:{color:"#6b7280","&:hover":{color:"#e5484d"}},children:Dt(Ir,{sx:{fontSize:20}})})}):null,r&&!t?Dt(bs,{"aria-label":"\uB2EB\uAE30",onClick:r,sx:{color:"#6b7280"},children:Dt(g4,{})}):null]}),Dt(ti,{anchorEl:P,onCancel:()=>N(null),onConfirm:()=>{v?.(e),N(null)}}),Dt(cn,{open:!!q,anchorEl:q?.anchorEl??null,nextCompleted:q?.nextCompleted??!1,returnMode:_,onCancel:()=>z(null),onConfirm:H=>{q&&(H&&y?y(e,H):g(e.seq,q.nextCompleted)),z(null)}}),Dt(ni,{anchorEl:B,value:e.icon??"",color:e.icon_color??"",onSelect:H=>{o(e.seq,H),R(null)},onSelectColor:s?H=>s(e.seq,H):void 0,onClose:()=>R(null)}),Dt(At,{open:!!j,anchorEl:j,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)}}),Dt(ec,{open:b,taskSeq:e.seq,items:n,loading:c,onLoad:i,onClose:()=>m(!1)})]})}import{useRef as L4,useState as dn}from"react";import{Box as or,Button as qi,ButtonBase as Em,Checkbox as z4,Divider as $i,Menu as xf,MenuItem as vf}from"@mui/material";import j4 from"@mui/icons-material/ExpandLess";import F4 from"@mui/icons-material/ExpandMore";import q4 from"@mui/icons-material/ConfirmationNumberOutlined";import Mm from"@mui/icons-material/Check";import $4 from"@mui/icons-material/DirectionsRunOutlined";import H4 from"@mui/icons-material/SpeedOutlined";import wf from"@mui/icons-material/CheckCircle";import W4 from"@mui/icons-material/CheckCircleOutlineOutlined";import _f from"@mui/icons-material/CheckCircleOutlined";import Rm from"@mui/icons-material/AccessTimeOutlined";import U4 from"@mui/icons-material/AutorenewOutlined";import V4 from"@mui/icons-material/LabelOutlined";import K4 from"@mui/icons-material/PersonOutlineOutlined";import G4 from"@mui/icons-material/SubjectOutlined";import Y4 from"@mui/icons-material/StickyNote2Outlined";import X4 from"@mui/icons-material/PanToolAltOutlined";import Om from"@mui/icons-material/LockOutlined";import Am from"@mui/icons-material/PublicOutlined";import Dm from"@mui/icons-material/Group";import Z4 from"@mui/icons-material/Repeat";import J4 from"@mui/icons-material/EventOutlined";import{useEffect as xm,useState as fi}from"react";import{Box as en,Button as vm,Chip as k4,IconButton as S4,Tooltip as T4}from"@mui/material";import hf from"@mui/icons-material/Check";import{FormDialog as C4}from"@ehfuse/mui-form-dialog";import B4 from"@mui/icons-material/Translate";import wm from"@mui/icons-material/ContentCopyOutlined";import{jsx as Qt,jsxs as ma}from"react/jsx-runtime";var _m=[{code:"en",label:"\uC601\uC5B4"},{code:"ja",label:"\uC77C\uBCF8\uC5B4"},{code:"zh",label:"\uC911\uAD6D\uC5B4(\uAC04\uCCB4)"},{code:"zh-TW",label:"\uC911\uAD6D\uC5B4(\uBC88\uCCB4)"},{code:"vi",label:"\uBCA0\uD2B8\uB0A8\uC5B4"},{code:"th",label:"\uD0DC\uAD6D\uC5B4"},{code:"ko",label:"\uD55C\uAD6D\uC5B4"}],pf=new Map;function km({open:e,taskSeq:f,title:g,html:l,translatedTargets:o=[],onClose:s}){let{translateContent:r}=ot(),[t,n]=fi(""),[c,i]=fi(null),[a,h]=fi([]),d=S=>o.includes(S)||a.includes(S)||pf.has(`${f}:${S}`),u=(S,D)=>{if(S!==t){if(S===""||d(S)){n(S);return}i({code:S,anchor:D})}};xm(()=>{e&&(n(""),i(null))},[e,f]);let[b,m]=fi(null),[x,k]=fi(!1),[B,R]=fi(""),[j,A]=fi(!1),[P,N]=fi(!1),q=()=>{b?.summary&&navigator.clipboard.writeText(b.summary).then(()=>{N(!0),window.setTimeout(()=>N(!1),1500)})};xm(()=>{if(!e||!r||!(f>0)||!t)return;let S=`${f}:${t}`,D=pf.get(S);if(D){m(D),R("");return}let p=!1;return k(!0),R(""),m(null),r({taskSeq:f,target:t}).then(y=>{p||(pf.set(S,y),h(v=>v.includes(t)?v:[...v,t]),m(y))}).catch(y=>{p||R(y instanceof Error?y.message:"AI \uBC88\uC5ED\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4.")}).finally(()=>{p||k(!1)}),()=>{p=!0}},[e,f,t,r]);let z=()=>{if(!b)return;let S=b.html?aa(b.html):b.text;navigator.clipboard.writeText(`${b.title}
43
+ `).trim():"";function y4(e){let f=[`[\uC5C5\uBB34] ${e.title}`],g=Cn(e.start_date),l=Cn(e.due_date);(g||l)&&f.push(`\uAE30\uAC04: ${g&&l?`${g} ~ ${l}`:g||l}`),e.manager_name&&f.push(`\uCC45\uC784\uC790: ${e.manager_name}`);let o=xr(e).name;o&&f.push(`\uC0C1\uD0DC: ${o}`);let s=bm(e.content);s&&f.push("",s);let r=String(e.note??"").trim();return r&&f.push("",`\uBE44\uACE0: ${r}`),f.join(`
44
+ `)}function ym(e){navigator.clipboard.writeText(e).then(()=>b4("\uC5C5\uBB34 \uB0B4\uC6A9\uC744 \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>g4("\uBCF5\uC0AC\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uB0B4\uC6A9\uC744 \uC9C1\uC811 \uC120\uD0DD\uD574 \uBCF5\uC0AC\uD574 \uC8FC\uC138\uC694."))}function ps(e,f){let g=y4(e);if(f&&typeof navigator.share=="function"){navigator.share({text:g}).catch(l=>{l?.name!=="AbortError"&&ym(g)});return}ym(g)}import{Fragment as B4,jsx as Dt,jsxs as df}from"react/jsx-runtime";function xm({task:e,myAccountSeq:f=0,onToggleCompleted:g,onChangeTitle:l,onChangeIcon:o,onChangeIconColor:s,onClose:r,appBarMode:t=!1,activityItems:n,activityLoading:c,onLoadActivity:i,onPrint:a,onDelete:h,canDelete:d}){let u=qt(),[b,m]=ms(!1),[x,k]=ms(null),[B,R]=ms(null),[j,A]=ms(null),[P,N]=ms(null),[q,z]=ms(null),T=!!e.is_notice,S=!!e.is_event,D=T?Et(e.icon||pr):S?Et(e.icon||yr):null,p=T&&f>0&&(e.author_account_seq??0)===f,{onReturnTask:y,onReviewDone:v,editPolicy:w}=ot(),_=!!y&&Zr(e,f),C=_&&!!v,O=!Qn(e,f),F=Qo(e,f,w),$=f>0&&(e.author_account_seq??0)===f,K=!!h&&(d??!Ti(e,f,w,!$)),M=!S&&(T?p:(e.author_account_seq??0)===f||(e.manager_account_seq??0)===f);return df(B4,{children:[df(gs,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1.5,flexShrink:0},children:[t&&r?Dt(bs,{"aria-label":"\uB4A4\uB85C",onClick:r,sx:{color:"#37352f",ml:-1},children:Dt(_4,{})}):null,M&&!t?Dt(ys,{title:e.completed&&e.completed_by?`${e.completed_by} \xB7 ${bn(e.completed_time)} \uC644\uB8CC`:"",arrow:!0,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:df(gs,{sx:{display:"flex",flexShrink:0,mr:1},children:[Dt(eo,{onClick:H=>z({anchorEl:H.currentTarget,nextCompleted:!e.completed}),children:e.completed?_?"\uB418\uB3CC\uB9AC\uAE30":"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC\uD558\uAE30"}),C?Dt(x4,{variant:"contained",size:"small",disableElevation:!0,onClick:H=>N(H.currentTarget),sx:{ml:1,...ei},children:"\uAC80\uC218\uC644\uB8CC"}):null]})}):null,t||!D?null:S&&!O?Dt(ys,{title:"\uC544\uC774\uCF58 \uBCC0\uACBD",arrow:!0,enterDelay:400,disableInteractive:!0,children:Dt(v4,{onClick:H=>R(H.currentTarget),sx:{display:"flex",p:.5,borderRadius:1,color:e.icon_color||"#1e3a8a","&:hover":{bgcolor:"#f2f2f0"}},children:Dt(D,{sx:{fontSize:20}})})}):Dt(gs,{sx:{display:"flex",px:.5,color:e.icon_color||(T?"#e5484d":"#1e3a8a")},children:Dt(D,{sx:{fontSize:20}})}),x!==null?Dt(gs,{component:"input",autoFocus:!0,spellCheck:!1,value:x,onChange:H=>k(H.target.value),onBlur:()=>{x.trim()&&x.trim()!==e.title&&l(e.seq,x.trim()),k(null)},onKeyDown:H=>{H.key==="Enter"&&H.target.blur(),H.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?Dt(gs,{sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:T?"\uACF5\uC9C0":S?"\uC77C\uC815":e.is_bug?"\uC624\uB958":"\uC5C5\uBB34"}):Dt(gs,{onClick:F?void 0:()=>k(e.title),sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",cursor:F?"default":"text",textDecoration:e.completed?"line-through":"none"},children:e.title}),i?Dt(ys,{title:"\uD65C\uB3D9",arrow:!0,children:Dt(bs,{"aria-label":"\uD65C\uB3D9",onClick:()=>m(!0),sx:{color:"#6b7280"},children:Dt(T4,{sx:{fontSize:20}})})}):null,Dt(ys,{title:u?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",arrow:!0,children:Dt(bs,{"aria-label":u?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",onClick:()=>ps(e,u),sx:{color:"#6b7280"},children:u?Dt(S4,{sx:{fontSize:20}}):Dt(k4,{sx:{fontSize:20}})})}),a?Dt(ys,{title:"\uC778\uC1C4",arrow:!0,children:Dt(bs,{"aria-label":"\uC778\uC1C4",onClick:()=>a(e),sx:{color:"#6b7280"},children:Dt(C4,{sx:{fontSize:20}})})}):null,K?Dt(ys,{title:"\uC0AD\uC81C",arrow:!0,children:Dt(bs,{"aria-label":"\uC0AD\uC81C",onClick:H=>A(H.currentTarget),sx:{color:"#6b7280","&:hover":{color:"#e5484d"}},children:Dt(Ir,{sx:{fontSize:20}})})}):null,r&&!t?Dt(bs,{"aria-label":"\uB2EB\uAE30",onClick:r,sx:{color:"#6b7280"},children:Dt(w4,{})}):null]}),Dt(ti,{anchorEl:P,onCancel:()=>N(null),onConfirm:()=>{v?.(e),N(null)}}),Dt(cn,{open:!!q,anchorEl:q?.anchorEl??null,nextCompleted:q?.nextCompleted??!1,returnMode:_,onCancel:()=>z(null),onConfirm:H=>{q&&(H&&y?y(e,H):g(e.seq,q.nextCompleted)),z(null)}}),Dt(ni,{anchorEl:B,value:e.icon??"",color:e.icon_color??"",onSelect:H=>{o(e.seq,H),R(null)},onSelectColor:s?H=>s(e.seq,H):void 0,onClose:()=>R(null)}),Dt(At,{open:!!j,anchorEl:j,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)}}),Dt(ec,{open:b,taskSeq:e.seq,items:n,loading:c,onLoad:i,onClose:()=>m(!1)})]})}import{useRef as $4,useState as dn}from"react";import{Box as or,Button as qi,ButtonBase as Mm,Checkbox as H4,Divider as $i,Menu as xf,MenuItem as vf}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 Rm from"@mui/icons-material/Check";import K4 from"@mui/icons-material/DirectionsRunOutlined";import G4 from"@mui/icons-material/SpeedOutlined";import wf from"@mui/icons-material/CheckCircle";import Y4 from"@mui/icons-material/CheckCircleOutlineOutlined";import _f from"@mui/icons-material/CheckCircleOutlined";import Om 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 e6 from"@mui/icons-material/StickyNote2Outlined";import t6 from"@mui/icons-material/PanToolAltOutlined";import Am from"@mui/icons-material/LockOutlined";import Dm from"@mui/icons-material/PublicOutlined";import Pm from"@mui/icons-material/Group";import r6 from"@mui/icons-material/Repeat";import n6 from"@mui/icons-material/EventOutlined";import{useEffect as vm,useState as fi}from"react";import{Box as en,Button as wm,Chip as I4,IconButton as E4,Tooltip as M4}from"@mui/material";import hf from"@mui/icons-material/Check";import{FormDialog as R4}from"@ehfuse/mui-form-dialog";import O4 from"@mui/icons-material/Translate";import _m from"@mui/icons-material/ContentCopyOutlined";import{jsx as Qt,jsxs as ma}from"react/jsx-runtime";var km=[{code:"en",label:"\uC601\uC5B4"},{code:"ja",label:"\uC77C\uBCF8\uC5B4"},{code:"zh",label:"\uC911\uAD6D\uC5B4(\uAC04\uCCB4)"},{code:"zh-TW",label:"\uC911\uAD6D\uC5B4(\uBC88\uCCB4)"},{code:"vi",label:"\uBCA0\uD2B8\uB0A8\uC5B4"},{code:"th",label:"\uD0DC\uAD6D\uC5B4"},{code:"ko",label:"\uD55C\uAD6D\uC5B4"}],pf=new Map;function Sm({open:e,taskSeq:f,title:g,html:l,translatedTargets:o=[],onClose:s}){let{translateContent:r}=ot(),[t,n]=fi(""),[c,i]=fi(null),[a,h]=fi([]),d=S=>o.includes(S)||a.includes(S)||pf.has(`${f}:${S}`),u=(S,D)=>{if(S!==t){if(S===""||d(S)){n(S);return}i({code:S,anchor:D})}};vm(()=>{e&&(n(""),i(null))},[e,f]);let[b,m]=fi(null),[x,k]=fi(!1),[B,R]=fi(""),[j,A]=fi(!1),[P,N]=fi(!1),q=()=>{b?.summary&&navigator.clipboard.writeText(b.summary).then(()=>{N(!0),window.setTimeout(()=>N(!1),1500)})};vm(()=>{if(!e||!r||!(f>0)||!t)return;let S=`${f}:${t}`,D=pf.get(S);if(D){m(D),R("");return}let p=!1;return k(!0),R(""),m(null),r({taskSeq:f,target:t}).then(y=>{p||(pf.set(S,y),h(v=>v.includes(t)?v:[...v,t]),m(y))}).catch(y=>{p||R(y instanceof Error?y.message:"AI \uBC88\uC5ED\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4.")}).finally(()=>{p||k(!1)}),()=>{p=!0}},[e,f,t,r]);let z=()=>{if(!b)return;let S=b.html?aa(b.html):b.text;navigator.clipboard.writeText(`${b.title}
45
45
 
46
- ${S}`.trim()).then(()=>{A(!0),window.setTimeout(()=>A(!1),1500)})},T=ma(en,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[Qt(en,{sx:{display:"flex",flexWrap:"wrap",gap:.75},children:[{code:"",label:"\uC6D0\uBB38"},..._m].map(S=>Qt(k4,{label:S.label,clickable:!0,icon:S.code&&d(S.code)?Qt(hf,{sx:{fontSize:16}}):void 0,onClick:D=>u(S.code,D.currentTarget),color:t===S.code?"primary":"default",variant:t===S.code?"filled":"outlined",sx:{fontSize:14,height:30}},S.code||"__source__"))}),Qt(At,{open:!!c,anchorEl:c?.anchor??null,title:`${_m.find(S=>S.code===c?.code)?.label??""}\uB85C AI \uBC88\uC5ED\uC744 \uC2DC\uC791\uD560\uAE4C\uC694?`,confirmText:"\uC2DC\uC791",cancelText:"\uCDE8\uC18C",placement:"bottom-start",onCancel:()=>i(null),onConfirm:()=>{c&&n(c.code),i(null)}}),t?x?Qt(en,{sx:{minHeight:200,display:"flex",alignItems:"center",justifyContent:"center"},children:Qt(es,{})}):B?Qt(en,{sx:{fontSize:15,color:"#c62828",py:2},children:B}):b?ma(en,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[b.summary?ma(en,{sx:{position:"relative",display:"flex",alignItems:"center",gap:2,px:1.5,pr:5,py:1.25,bgcolor:"#eef4ff",border:"1px solid #c7d7fe",borderRadius:1},children:[Qt(T4,{title:"\uC694\uC57D \uBCF5\uC0AC",arrow:!0,children:Qt(S4,{size:"small","aria-label":"\uC694\uC57D \uBCF5\uC0AC",onClick:q,sx:{position:"absolute",top:4,right:4,color:"#64748b"},children:P?Qt(hf,{sx:{fontSize:18,color:"#2f9e5b"}}):Qt(wm,{sx:{fontSize:18}})})}),Qt(B4,{sx:{fontSize:30,color:"#2563eb",flexShrink:0,mx:1.5}}),ma(en,{sx:{flex:1,minWidth:0},children:[Qt(en,{sx:{fontSize:16,fontWeight:600,color:"#1e3a8a"},children:"AI \uBC88\uC5ED (Gemini) \xB7 \uC6D0\uBB38\uACFC \uB2E4\uB97C \uC218 \uC788\uC2B5\uB2C8\uB2E4"}),Qt(en,{sx:{fontSize:15,color:"#111",mt:.25,lineHeight:1.5,whiteSpace:"pre-wrap",wordBreak:"break-word"},children:b.summary})]})]}):null,Qt(en,{sx:{fontSize:18,fontWeight:700,color:"#111",wordBreak:"break-word"},children:b.title}),b.html?Qt(en,{sx:{fontSize:16,lineHeight:1.6,color:"#37352f",wordBreak:"break-word","& > p:first-of-type":{mt:0},"& > p:last-of-type":{mb:0},"& a[href]":{color:"#2563eb",textDecoration:"underline"},"& img":{maxWidth:"100%"}},dangerouslySetInnerHTML:{__html:b.html}}):Qt(en,{sx:{fontSize:16,lineHeight:1.6,color:"#37352f",whiteSpace:"pre-wrap"},children:b.text})]}):null:ma(en,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[Qt(en,{sx:{fontSize:18,fontWeight:700,color:"#111",wordBreak:"break-word"},children:g}),Qt(en,{sx:{fontSize:16,lineHeight:1.6,color:"#37352f",wordBreak:"break-word","& > p:first-of-type":{mt:0},"& > p:last-of-type":{mb:0},"& a[href]":{color:"#2563eb",textDecoration:"underline"},"& img":{maxWidth:"100%"}},dangerouslySetInnerHTML:{__html:l||"<p></p>"}})]})]});return Qt(C4,{open:e,onClose:s,width:760,title:"\uB0B4\uC6A9 \uBC88\uC5ED",locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-content-translate",maxContentHeight:"80vh",sectionContentPaddingTop:0,sections:[{id:"translate",showTitle:!1,children:T}],actions:{showCancelButton:!1,left:t&&b?Qt(vm,{variant:"outlined",color:"inherit",startIcon:j?Qt(hf,{sx:{fontSize:18,color:"#2f9e5b"}}):Qt(wm,{sx:{fontSize:18}}),onClick:z,sx:{minWidth:80,color:"#37352f",borderColor:"#d9d9d6"},children:"\uBCF5\uC0AC"}):void 0,right:Qt(vm,{variant:"contained",onClick:s,sx:{minWidth:80},children:"\uB2EB\uAE30"})}})}import{ConfirmDialog as Pm,InfoAlert as Q4}from"@ehfuse/alerts";import{DatePicker as e6}from"@ehfuse/mui-datetime-picker";import{useState as I4}from"react";import{TextField as E4}from"@ehfuse/mui-form-controls";import{jsx as M4}from"react/jsx-runtime";function Sm({value:e,onCommit:f,onDraftChange:g,readOnly:l=!1}){let[o,s]=I4(null);return M4(E4,{value:o??e,placeholder:l?"":"\uBE44\uACE0 \uC785\uB825",fullWidth:!0,size:"medium",slotProps:{input:{readOnly:l}},onChange:r=>{s(r.target.value),g?.(r.target.value)},onBlur:()=>{o!==null&&o.trim()!==e&&f(o),s(null)},onKeyDown:r=>{r.key==="Enter"&&r.target.blur(),r.key==="Escape"&&s(null)},sx:{mt:1}})}import{useMemo as bf,useState as yf}from"react";import{Box as $r,Button as Bm,IconButton as R4}from"@mui/material";import O4 from"@mui/icons-material/AccountTreeOutlined";import A4 from"@mui/icons-material/LinkOutlined";import D4 from"@mui/icons-material/Close";import P4 from"@mui/icons-material/RedoOutlined";function Fi(e){return e.relations??[]}function r$(e,f,g){return Fi(e).some(l=>l.type===g&&l.task_seq===f.seq)||Fi(f).some(l=>l.type===g&&l.task_seq===e.seq)}function Tm(e){return`${e.created_time??""}|${String(e.seq).padStart(12,"0")}`}function mf(e,f){let g=new Map(f.map(u=>[u.seq,u]));g.set(e.seq,e);let l=new Map,o=(u,b)=>{l.has(u)||l.set(u,new Set),l.has(b)||l.set(b,new Set),l.get(u).add(b),l.get(b).add(u)};for(let u of g.values())for(let b of Fi(u))b.type==="follow_up"&&g.has(b.task_seq)&&o(u.seq,b.task_seq);let s=new Set([e.seq]),r=[e.seq];for(;r.length>0;){let u=r.shift();for(let b of l.get(u)??[])s.has(b)||(s.add(b),r.push(b))}let t=[...s].map(u=>g.get(u)).filter(u=>!!u).sort((u,b)=>Tm(u).localeCompare(Tm(b))),n=new Set;for(let u of Fi(e))u.type==="related"&&n.add(u.task_seq);for(let u of g.values())u.seq!==e.seq&&Fi(u).some(b=>b.type==="related"&&b.task_seq===e.seq)&&n.add(u.seq);let c=[...n].map(u=>g.get(u)).filter(u=>u!==void 0&&u.seq!==e.seq),i=[...g.values()].filter(u=>u.seq!==e.seq&&Fi(u).some(b=>b.type==="duplicate_of"&&b.task_seq===e.seq)),a=Fi(e).find(u=>u.type==="duplicate_of")?.task_seq,h=a?g.get(a)??null:null,d=[...g.values()].filter(u=>u.seq!==e.seq&&(u.checklist??[]).some(b=>Number(b.task_seq??0)===e.seq));return{lineage:t,related:c,duplicates:i,duplicateOf:h,parents:d}}function gf(e,f){let g=mf(e,f);return(g.lineage.length>=2?g.lineage.length-1:0)+g.related.length+g.duplicates.length+(g.duplicateOf?1:0)+g.parents.length}function Cm(e,f){return gf(e,f)>0}import{Fragment as N4,jsx as er,jsxs as Vn}from"react/jsx-runtime";function tc({item:e,caption:f,onOpen:g,onUnlink:l}){let o=e.is_notice||e.is_event?Et(e.icon||(e.is_notice?pr:yr)):null;return Vn($r,{sx:{display:"flex",alignItems:"center",gap:.75,px:1.25,py:.5,borderRadius:1,"&:hover":{bgcolor:"#f7f7f5"},"&:hover .taskbox-relation-unlink":{opacity:1}},children:[f?er($r,{component:"span",sx:{flexShrink:0,px:.6,py:.1,borderRadius:.75,fontSize:11.5,fontWeight:500,color:"#8a6d1d",bgcolor:"#faf1d7"},children:f}):null,o?er(o,{sx:{fontSize:16,flexShrink:0,color:e.icon_color||"#1e3a8a"}}):null,Vn($r,{component:"span",onClick:g,sx:{flex:1,minWidth:0,fontSize:14,color:e.completed?"#9a9a97":"#37352f",textDecoration:e.completed?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...g?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}},children:[e.ticket_no?`${e.ticket_no} `:"",e.title]}),er(Lt,{option:xr(e),small:!0}),l?er(R4,{className:"taskbox-relation-unlink",size:"small","aria-label":"\uC5F0\uACB0 \uD574\uC81C",onClick:l,sx:{opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:er(D4,{sx:{fontSize:15}})}):null]})}function Im({task:e,tasks:f,readOnly:g=!1,onOpenTask:l,onLink:o,onUnlink:s,onCreateFollowUp:r}){let[t,n]=yf(!1),[c,i]=yf(null),[a,h]=yf(null),d=bf(()=>mf(e,f),[e,f]),u=d.lineage.length>=2,b=bf(()=>gf(e,f),[e,f]),m=bf(()=>{let k=new Set;for(let B of d.lineage)k.add(B.seq);for(let B of d.related)k.add(B.seq);for(let B of d.duplicates)k.add(B.seq);for(let B of d.parents)k.add(B.seq);return d.duplicateOf&&k.add(d.duplicateOf.seq),[...k]},[d]),x=(k,B,R)=>{h({anchorEl:k,targetSeq:B,type:R})};return Vn(Mn,{icon:er(O4,{sx:{fontSize:19,display:"block"}}),title:Vn(N4,{children:["\uAD00\uB828 \uC5C5\uBB34",b>0?er($r,{component:"span",sx:{fontSize:12.5,color:"#9a9a97"},children:b}):null]}),titleExtra:g?null:Vn($r,{sx:{ml:"auto",display:"flex",alignItems:"center",gap:.5},children:[r?er(Bm,{size:"small",color:"inherit",startIcon:er(P4,{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?er(Bm,{size:"small",color:"inherit",startIcon:er(A4,{sx:{fontSize:16}}),onClick:()=>n(!0),sx:{minWidth:0,px:1,fontSize:12.5,color:"#787774"},children:"\uC5F0\uACB0"}):null]}),children:[Vn($r,{sx:{display:"flex",flexDirection:"column",mt:.5,pl:3.25},children:[u?er($r,{sx:{mb:d.related.length||d.duplicates.length||d.duplicateOf?1:0},children:d.lineage.map((k,B)=>{let R=k.seq===e.seq,j=B===d.lineage.length-1;return Vn($r,{sx:{display:"flex",gap:1},children:[Vn($r,{sx:{display:"flex",flexDirection:"column",alignItems:"center",width:14,flexShrink:0,pt:1.1},children:[er($r,{sx:{width:R?9:7,height:R?9:7,borderRadius:"50%",bgcolor:R?"#2f80ed":k.completed?"#9a9a97":"#c9c8c5",flexShrink:0}}),j?null:er($r,{sx:{width:"2px",flex:1,bgcolor:"#e6e6e3"}})]}),Vn($r,{sx:{flex:1,minWidth:0,pb:j?0:.5},children:[Vn($r,{sx:{display:"flex",alignItems:"center",gap:.75},children:[Vn($r,{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]}),er(Lt,{option:xr(k),small:!0})]}),er($r,{sx:{fontSize:12,color:"#9a9a97"},children:k.completed&&k.completed_time?`${k.completed_time} \uC644\uB8CC`:k.created_time??""})]})]},k.seq)})}):null,d.parents.map(k=>er(tc,{item:k,caption:"\uC0C1\uC704 \uC5C5\uBB34",onOpen:l?()=>l(k.seq):void 0},`parent-${k.seq}`)),d.duplicateOf?er(tc,{item:d.duplicateOf,caption:"\uC6D0\uBCF8",onOpen:l?()=>l(d.duplicateOf.seq):void 0,onUnlink:!g&&s?k=>x(k.currentTarget,d.duplicateOf.seq,"duplicate_of"):void 0}):null,d.duplicates.map(k=>er(tc,{item:k,caption:"\uC911\uBCF5",onOpen:l?()=>l(k.seq):void 0,onUnlink:!g&&s?B=>x(B.currentTarget,k.seq,"duplicate_of"):void 0},`dup-${k.seq}`)),d.related.map(k=>er(tc,{item:k,onOpen:l?()=>l(k.seq):void 0,onUnlink:!g&&s?B=>x(B.currentTarget,k.seq,"related"):void 0},`rel-${k.seq}`)),b===0?er($r,{sx:{px:1.25,py:.75,fontSize:13.5,color:"#9a9a97"},children:"\uC5F0\uACB0\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):null]}),o?er($l,{open:t,task:e,tasks:f,excludeSeqs:m,onClose:()=>n(!1),onSubmit:(k,B)=>o(e.seq,k,B)}):null,er(At,{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)}}),er(At,{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 _e,jsxs as Gt}from"react/jsx-runtime";function di({label:e="\uBE44\uC5B4 \uC788\uC74C"}){return _e(or,{component:"span",sx:{color:"#9a9a97"},children:e})}function Nm({task:e,customTabs:f,statusOptions:g,avatarSrcByName:l,onChangeStatus:o,onChangeLabels:s,onAddLabelOption:r,onChangeProject:t,onAddProject:n,onChangeDate:c,onChangeReminder:i,onMemberEdit:a,onChangePriority:h,onChangeVisibility:d,onChangeRepeat:u,departments:b=[],onChangeEventTime:m,onChangeEventPlace:x,onChangeEventAddress:k,onChangeNote:B,onChangeNoteDraft:R,onChangeContent:j,contentTemplates:A,onSaveContentTemplate:P,onRemoveContentTemplate:N,contentLoading:q=!1,onChangeContentHeight:z,onAddChecklistItem:T,onToggleChecklistItem:S,onRemoveChecklistItem:D,onUpdateChecklistItem:p,onReorderChecklist:y,onConvertChecklistToTask:v,onOpenChecklistTask:w,onLinkChecklistTask:_,resolveChecklistTask:C,relatedTasksPool:O,onOpenRelatedTask:F,onLinkRelatedTask:$,onUnlinkRelatedTask:K,onCreateFollowUpTask:M,onAddAttachments:H,onRemoveAttachment:E,onPreview:I,onDownload:L,onUpdateComment:U,onRemoveComment:G,onToggleCommentReaction:V,currentUserName:W="",myAccountSeq:X=0,headerless:Z=!1,noticeAdmin:Y=!1,hideProject:J=!1,hideLabel:ee=!1,showTitle:ne=!1,onChangeTitle:te,onToggleCompleted:oe,onChangeIcon:se,onChangeIconColor:de,employees:ge=[],onAckConfirm:ke,onRequestConfirm:Be,onChangeBugField:Te,sprints:Re=[],sprintProject:it=!1,hideSprint:be=!1,onChangeSprint:ie,onChangeStoryPoints:Ce,onChangeResolution:we,onClaimTask:ve,onVerifyBug:Ke}){let[De,pe]=dn(null),Bt=L4(!1),[Fe,Ye]=dn(null),[_t,tt]=dn(null),[Ae,xe]=dn(null),[me,Ie]=dn(!1),Xe={[Hn]:me?{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"}},[qe,Pe]=dn(null),[Mt,Ue]=dn(null),[re,le]=dn(null),[fe,Se]=dn(null),[pt,Me]=dn(null),[ze,St]=dn(null),[Oe,Ne]=dn(null),at=!!e.is_notice,Ge=!!e.is_event,ct=!!e.is_bug,Rt=!!ve&&rl(e,X),{onReturnTask:ht,onReviewDone:Ut,editPolicy:Kt,translateContent:Yt,contentTranslate:tr}=ot(),Q=Z&&!!Ut&&!!ht&&Zr(e,X),[ae,ye]=dn(null),he=!!(Yt&&tr),[Ee,$e]=dn(!1),We=!!ve&&nl(e,X),rt=!!Ke&&ct&&!!e.completed&&X>0&&(e.author_account_seq??0)===X&&!(e.acks??[]).some(ce=>ce.account_seq===X),Je=!Qn(e,X),Ve=Qo(e,X,Kt),st=!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),It=e.is_notice||e.is_event?Et(e.icon||(e.is_notice?pr:yr)):null,jt=at?!tl(e,X):Je,kt=Rt||We?Gt(eo,{onClick:ce=>Ne(ce.currentTarget),children:[_e(X4,{sx:{fontSize:16,mr:.5}}),"\uAC00\uC838\uAC00\uAE30"]}):null,Pt=at?Xl(e,ge):"",Ot=at?Yp(e,ge,X):null,Ft=at?null:ts(e,X),Lr=!!(Ft&&Ft.total>0||at&&Ot),Gr=(e.origin_license_seq??0)>0,Sn=!at&&!Gr,Xn=Gt(Hr,{children:[_e(vt,{icon:_e(K4,{sx:{fontSize:17}}),label:"\uC791\uC131\uC790",sx:[uo(9),Xe??null,...Ge?[]:[cr(1)]],children:e.created_by?Gt(Hr,{children:[_e(Jr,{names:[e.created_by],size:20,avatarSrcByName:l}),e.created_by]}):_e(di,{})}),_e(vt,{icon:_e(Rm,{sx:{fontSize:17}}),label:"\uC791\uC131\uC77C\uC2DC",sx:[uo(11),Xe??null,...Ge?[]:[cr(2)]],children:e.created_time?bn(e.created_time):_e(di,{})})]});return Gt(Hr,{children:[ne?Gt(or,{sx:{px:2,pt:2,pb:.5,display:"flex",alignItems:"flex-start",gap:1},children:[st?_e(z4,{checked:e.completed,icon:_e(W4,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:_e(wf,{sx:{fontSize:22,color:"#2f80ed"}}),onChange:(ce,Qe)=>{_t||tt({anchorEl:ce.currentTarget,nextCompleted:Qe})},sx:{p:0,mt:.25}}):null,It?Ge&&!Je?_e(Em,{onClick:ce=>Ye(ce.currentTarget),sx:{display:"flex",p:.25,mt:.1,borderRadius:1,color:e.icon_color||"#1e3a8a","&:hover":{bgcolor:"#f2f2f0"}},children:_e(It,{sx:{fontSize:20}})}):_e(or,{sx:{display:"flex",p:0,mt:.25,color:e.icon_color||(at?"#e5484d":"#1e3a8a")},children:_e(It,{sx:{fontSize:20}})}):null,_e(or,{sx:{flex:1,minWidth:0},children:De!==null?_e(or,{component:"div",contentEditable:!0,suppressContentEditableWarning:!0,spellCheck:!1,ref:ce=>{if(!ce||ce.dataset.focused)return;ce.dataset.focused="1",ce.focus();let Qe=document.createRange();Qe.selectNodeContents(ce),Qe.collapse(!1);let mt=window.getSelection();mt?.removeAllRanges(),mt?.addRange(Qe)},onBlur:ce=>{let Qe=(ce.currentTarget.textContent??"").replace(/\n/g," ").trim();!Bt.current&&Qe&&Qe!==e.title&&te(e.seq,Qe),Bt.current=!1,pe(null)},onKeyDown:ce=>{ce.key==="Enter"&&(ce.preventDefault(),ce.target.blur()),ce.key==="Escape"&&(Bt.current=!0,ce.target.blur())},onPaste:ce=>{ce.preventDefault();let Qe=ce.clipboardData.getData("text/plain").replace(/\n/g," ");document.execCommand("insertText",!1,Qe)},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:De}):_e(or,{onClick:Ve?void 0:()=>pe(e.title),sx:{fontSize:19,fontWeight:600,color:"#37352f",lineHeight:"26px",cursor:Ve?"default":"text",textDecoration:e.completed?"line-through":"none",userSelect:"text",wordBreak:"break-word"},children:e.title})}),_e(cn,{open:!!_t,anchorEl:_t?.anchorEl??null,nextCompleted:_t?.nextCompleted??!1,returnMode:!!ht&&Zr(e,X),onCancel:()=>tt(null),onConfirm:ce=>{_t&&(ce&&ht?ht(e,ce):oe(e.seq,_t.nextCompleted)),tt(null)}})]}):null,Gt(or,{sx:{py:1.5,display:"flex",flexDirection:"column",gap:0,[Hn]:{pb:0,"& > :last-child":{mb:0}}},children:[_e(Dl,{hideProject:J,pinColumns:!0,projectColumn:!Ge&&!ee?2:"full",values:{tabKey:e.tab_key??"",managerName:e.manager_name,receiverNames:e.receiver_names,startDate:e.start_date,dueDate:e.due_date,reminders:ro(e),priority:e.priority,eventTime:e.event_time??"",eventPlace:e.event_place??"",eventAddress:e.event_address??""},customTabs:f,avatarSrcByName:il(e,l),hideDueDate:!Ge&&!!e.repeat_rule,notice:at,event:Ge,readOnly:Je,coreLocked:Ve,targetSummary:Pt,onChangeProject:ce=>t(e.seq,ce),onAddProject:n,onChangeStartDate:ce=>c(e.seq,"start_date",ce),onChangeDueDate:ce=>c(e.seq,"due_date",ce),onChangeReminder:ce=>i(e.seq,ce),onChangePriority:ce=>h(e.seq,ce),onChangeEventTime:ce=>m?.(e.seq,ce),onChangeEventPlace:ce=>x?.(e.seq,ce),onChangeEventAddress:ce=>k?.(e.seq,ce),onMemberEdit:ce=>a(e,ce,null),narrowCollapsedSx:Xe,reminderLocked:e.completed,managerAction:kt,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:fl(e.support_type??"")}:void 0,leading:Gt(Hr,{children:[rt||kt&&(at||Ge)?Gt(or,{sx:{gridColumn:"1 / -1",display:"flex",justifyContent:"flex-start",gap:2,px:2,py:1.5},children:[at||Ge?kt:null,rt?Gt(Hr,{children:[_e(qi,{variant:"contained",size:"large",onClick:()=>Ke?.(e.seq,!0),sx:{bgcolor:"#2f80ed"},children:"\uAC80\uC99D\uC644\uB8CC"}),_e(qi,{variant:"outlined",size:"large",color:"error",onClick:()=>Ke?.(e.seq,!1),children:"\uC7AC\uC624\uD508"})]}):null]}):null,ct&&e.ticket_no?_e(vt,{icon:_e(q4,{sx:{fontSize:17}}),label:"\uD2F0\uCF13",sx:cr(1),children:_e(or,{component:"span",sx:{fontVariantNumeric:"tabular-nums"},children:e.ticket_no})}):null,Ge?null:_e(or,{sx:ct&&e.ticket_no||Sn||Lr?cr(ct&&e.ticket_no?2:1):{gridColumn:"1 / -1"},children:Gt(vt,{icon:_e(U4,{sx:{fontSize:17}}),label:"\uC0C1\uD0DC",onClick:Je||e.completed?void 0:ce=>Pe(ce),children:[_e(Lt,{option:xr(e)}),Q?Gt(Hr,{children:[_e(qi,{size:"small",variant:"contained",disableElevation:!0,onClick:ce=>{ce.stopPropagation(),ye(ce.currentTarget)},sx:{ml:1,...ei},children:"\uAC80\uC218\uC644\uB8CC"}),_e(ti,{anchorEl:ae,onCancel:()=>ye(null),onConfirm:()=>{Ut?.(e),ye(null)}})]}):null]})}),Sn?(()=>{let ce=Ln(e),Qe=ce==="all"?_e(Am,{sx:{fontSize:17,color:"#2f80ed"}}):ce==="group"?_e(Dm,{sx:{fontSize:17,color:"#d9730d"}}):_e(Om,{sx:{fontSize:17}}),mt=ce==="all"?"\uC804\uCCB4\uACF5\uAC1C":ce==="group"?`\uBD80\uC11C\uACF5\uAC1C \xB7 ${b.find(zr=>zr.seq===(e.visibility_group_seq??0))?.name??"\uBD80\uC11C"}`:"\uBE44\uACF5\uAC1C";return _e(or,{sx:Ge?void 0:cr(ct?1:2),children:_e(vt,{icon:Qe,label:"\uACF5\uAC1C",onClick:Ve||!d?void 0:zr=>Ue(zr),children:mt})})})():null,!at&&!ct&&!Gr?_e(or,{sx:Ge?void 0:cr(1),children:_e(vt,{icon:_e(Z4,{sx:{fontSize:17,...e.repeat_rule?{color:"#2f80ed"}:{}}}),label:"\uBC18\uBCF5",onClick:Ve||!u?void 0:ce=>le(ce),children:e.repeat_rule?El(e.repeat_rule):_e(di,{label:"\uC5C6\uC74C"})})}):null,!at&&!ct&&e.repeat_rule?_e(or,{sx:Ge?void 0:cr(2),children:_e(vt,{icon:_e(J4,{sx:{fontSize:17}}),label:"\uBC18\uBCF5 \uC885\uB8CC",onClick:Ve||!u?void 0:ce=>Se(ce),children:e.repeat_until?`${e.repeat_until}\uAE4C\uC9C0`:_e(di,{})})}):null,Ft&&Ft.total>0?_e(or,{sx:Ge?void 0:cr(2),children:_e(vt,{icon:_e(_f,{sx:{fontSize:17}}),label:"\uD655\uC778",children:Ft.canConfirm?_e(qi,{size:"small",variant:"contained",onClick:()=>ke?.(e.seq),sx:{py:.1,px:1.25,minWidth:0,color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}},children:"\uD655\uC778"}):Gt(qi,{size:"small",variant:"outlined",color:"inherit",startIcon:Ft.myTime?_e(wf,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:ce=>xe({anchorEl:ce.currentTarget,open:!0}),sx:{py:.1,px:1.25,minWidth:0,fontSize:13,color:"text.primary",borderColor:"#d5d8dc",bgcolor:"#fff",whiteSpace:"nowrap"},children:[Ft.count," / ",Ft.total]})})}):null,at&&Ot?_e(or,{sx:cr(2),children:_e(vt,{icon:_e(_f,{sx:{fontSize:17}}),label:"\uD655\uC778",children:_e(or,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,minWidth:0},children:Ot.canAck?_e(qi,{size:"small",variant:"contained",onClick:()=>ke?.(e.seq),sx:{py:.1,px:1.25,minWidth:0,color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}},children:"\uD655\uC778"}):_e(qi,{size:"small",variant:"outlined",color:"inherit",startIcon:Ot.acked?_e(wf,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:ce=>xe({anchorEl:ce.currentTarget,open:!0}),sx:{py:.1,px:1.25,minWidth:0,fontSize:13,color:"text.primary",borderColor:"#d5d8dc",bgcolor:"#fff",whiteSpace:"nowrap"},children:Ot.total>0&&Ot.count>=Ot.total?"\uC644\uB8CC":Gt(Hr,{children:[Ot.count,_e(or,{component:"span",sx:{mx:.4},children:"/"}),Ot.total]})})})})}):null,it&&!be&&!Ge&&!at?Gt(Hr,{children:[_e(vt,{icon:_e($4,{sx:{fontSize:17}}),label:"\uBAA9\uD45C",onClick:Ve?void 0:ce=>Me(ce),sx:cr(1),children:(e.sprint_seq??0)>0?Re.find(ce=>ce.seq===e.sprint_seq)?.name??"\uC0AD\uC81C\uB41C \uC2A4\uD504\uB9B0\uD2B8":_e(di,{label:"\uBBF8\uBC30\uC815"})}),_e(vt,{icon:_e(H4,{sx:{fontSize:17}}),label:"\uD3EC\uC778\uD2B8",sx:cr(2),children:_e(Lo,{value:(e.story_points??0)>0?String(e.story_points):"",placeholder:"\uBBF8\uCD94\uC815",readOnly:Ve,onCommit:ce=>Ce?.(e.seq,Number(ce.replace(/[^0-9.]/g,""))||0)})})]}):null,Ge||ee?null:_e(or,{sx:[J?{gridColumn:"1 / -1"}:cr(1),Xe??null],children:_e(vt,{icon:_e(V4,{sx:{fontSize:17}}),label:"\uB77C\uBCA8",onClick:Je?void 0:ce=>St(ce),children:(e.label_keys??[]).length>0?_e(Zo,{labelKeys:e.label_keys??[],labelOptions:g}):_e(di,{})})})]}),afterProject:Ge?null:Xn,trailing:Gt(Hr,{children:[ct?_e(Pl,{values:{repro:e.bug_repro??"",device:e.bug_device??"",where:e.bug_where??"",version:e.bug_version??"",resolution:e.resolution??""},readOnly:Ve,showResolution:!!e.completed,onChangeRepro:ce=>Te?.(e.seq,"bug_repro",ce),onChangeDevice:ce=>Te?.(e.seq,"bug_device",ce),onChangeWhere:ce=>Te?.(e.seq,"bug_where",ce),onChangeVersion:ce=>Te?.(e.seq,"bug_version",ce),onChangeResolution:ce=>we?.(e.seq,ce)}):null,Ge?Xn:null,e.completed?Gt(Hr,{children:[_e(vt,{icon:_e(_f,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC790",sx:[uo(10),Xe??null,...Ge?[]:[cr(1)]],children:e.completed_by?Gt(Hr,{children:[_e(Jr,{names:[e.completed_by],size:20,avatarSrcByName:l}),e.completed_by]}):_e(di,{})}),_e(vt,{icon:_e(Rm,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC77C\uC2DC",sx:[uo(12),Xe??null,...Ge?[]:[cr(2)]],children:e.completed_time?bn(e.completed_time):_e(di,{})})]}):null]})}),Gt(or,{sx:{display:"none",[Hn]:{display:"block",mt:1.5,mb:0}},children:[_e($i,{sx:{borderColor:"#e6e6e3"}}),_e(Em,{onClick:()=>Ie(ce=>!ce),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:me?Gt(Hr,{children:["\uC811\uAE30 ",_e(j4,{sx:{fontSize:18}})]}):Gt(Hr,{children:["\uC815\uBCF4 \uB354\uBCF4\uAE30 ",_e(F4,{sx:{fontSize:18}})]})})]}),Gt(or,{children:[_e($i,{sx:{my:1.5,borderColor:"#e6e6e3",[Hn]:{mt:0,mb:1.25}}}),_e(Mn,{icon:_e(G4,{sx:{fontSize:18,display:"block"}}),title:"\uB0B4\uC6A9",titleExtra:A&&!Ve?_e(Ll,{content:e.content??"",templates:A,onApply:ce=>j?.(e.seq,ce),onSave:P,onRemove:N}):void 0,children:_e(or,{sx:{userSelect:"text"},children:q?_e(or,{sx:{minHeight:e.content_height||180,display:"flex",alignItems:"center",justifyContent:"center"},children:_e(es,{})}):_e(Fl,{syncKey:e.seq,value:e.content??"",height:e.content_height??0,onChangeHeight:z?ce=>z(e.seq,ce):void 0,readOnly:Ve,viewFirst:!0,onTranslate:he?()=>$e(!0):void 0,onChange:ce=>j(e.seq,ce)})})}),e.is_bug?null:Gt(Hr,{children:[_e($i,{sx:{my:1.5,borderColor:"#e6e6e3"}}),_e(Mn,{icon:_e(Y4,{sx:{fontSize:18,display:"block"}}),title:"\uBE44\uACE0",children:_e(or,{sx:{userSelect:"text"},children:_e(Sm,{value:e.note,readOnly:jt,onCommit:ce=>B(e.seq,ce),onDraftChange:R?ce=>R(e.seq,ce):void 0})})})]}),Ge?null:Gt(Hr,{children:[_e($i,{sx:{my:1.5,borderColor:"#e6e6e3"}}),_e(Hl,{taskSeq:e.seq,checklist:e.checklist??[],removeLocked:jt,onAdd:T,onToggle:S,confirmOnToggle:!0,onRemove:D,onUpdate:p,onReorder:y,onConvertToTask:v,onOpenLinkedTask:w,resolveLinkedTask:C,myAccountSeq:X,linkCandidates:O,linkBaseTask:e,onLinkExistingTask:_})]}),O&&!Ge&&!at&&Cm(e,O)?Gt(Hr,{children:[_e($i,{sx:{my:1.5,borderColor:"#e6e6e3"}}),_e(Im,{task:e,tasks:O,readOnly:Je,onOpenTask:F,onLink:$,onUnlink:K,onCreateFollowUp:M})]}):null,_e($i,{sx:{my:1.5,borderColor:"#e6e6e3"}}),_e(Kl,{taskSeq:e.seq,attachments:e.attachments??[],removeLocked:at?jt:Ve,onAdd:H,onRemove:E,onPreview:I?(ce,Qe)=>I({...ce,taskSeq:e.seq},Qe?.map(mt=>({...mt,taskSeq:e.seq}))):void 0,onDownload:L?ce=>L({...ce,taskSeq:e.seq}):void 0})]}),_e($i,{sx:{my:1.5,borderColor:"#e6e6e3"}}),_e(dm,{taskSeq:e.seq,comments:e.comments??[],currentUserName:W,myAccountSeq:X,avatarSrcByName:l,onUpdate:U,onRemove:G,onToggleReaction:V,onPreview:I?(ce,Qe)=>I({...ce,taskSeq:e.seq},Qe?.map(mt=>({...mt,taskSeq:e.seq}))):void 0,onDownload:L?ce=>L({...ce,taskSeq:e.seq}):void 0})]}),he?_e(km,{open:Ee,taskSeq:e.seq,title:e.title,html:e.content??"",translatedTargets:e.translated_targets??[],onClose:()=>$e(!1)}):null,_e(Gi,{anchorEl:qe,value:e.status,options:at?qs:ct?Si:$s,onSelect:ce=>o(e.seq,ce),onClose:()=>Pe(null)}),_e(xf,{transitionDuration:0,anchorEl:re,open:!!re,onClose:()=>le(null),children:[{value:"",label:"\uC5C6\uC74C"},...na].map(ce=>_e(vf,{selected:(e.repeat_rule??"")===ce.value,onClick:()=>{le(null),(async()=>{let Qe=e.repeat_rule??"";if(ce.value===Qe)return;if(ce.value===""){await Pm({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 mt=String(e.due_date??"").slice(0,10);if(!mt){Q4(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}Qe&&!await Pm({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,ce.value,Ml(mt,ce.value))})()},sx:{fontSize:14,minWidth:140},children:ce.label},ce.value||"none"))}),_e(e6,{anchorEl:fe,open:!!fe,onClose:()=>Se(null),selectedDate:e.repeat_until?new Date(`${e.repeat_until}T00:00:00`):new Date,onDateChange:ce=>{Se(null);let Qe=ue=>String(ue).padStart(2,"0"),mt=`${ce.getFullYear()}-${Qe(ce.getMonth()+1)}-${Qe(ce.getDate())}`,zr=e.repeat_rule??"";zr&&u?.(e.seq,zr,mt)}}),_e(xf,{transitionDuration:0,anchorEl:Mt,open:!!Mt,onClose:()=>Ue(null),children:[{key:"involved",label:"\uBE44\uACF5\uAC1C",icon:_e(Om,{sx:{fontSize:17,color:"#57564f"}}),selected:Ln(e)==="involved",onPick:()=>d?.(e.seq,"involved",0)},{key:"all",label:"\uC804\uCCB4\uACF5\uAC1C",icon:_e(Am,{sx:{fontSize:17,color:"#2f80ed"}}),selected:Ln(e)==="all",onPick:()=>d?.(e.seq,"all",0)},...b.map(ce=>({key:`group-${ce.seq}`,label:`\uBD80\uC11C\uACF5\uAC1C \xB7 ${ce.name}`,icon:_e(Dm,{sx:{fontSize:17,color:"#d9730d"}}),selected:Ln(e)==="group"&&(e.visibility_group_seq??0)===ce.seq,onPick:()=>d?.(e.seq,"group",ce.seq)}))].map(ce=>Gt(vf,{selected:ce.selected,onClick:()=>{ce.onPick(),Ue(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[ce.icon,ce.label,ce.selected?_e(Mm,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},ce.key))}),_e(xf,{transitionDuration:0,anchorEl:pt,open:!!pt,onClose:()=>Me(null),children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...Re.filter(ce=>`custom-${ce.group_seq}`===String(e.tab_key??"")).map(ce=>({seq:ce.seq,label:In(ce)}))].map(ce=>Gt(vf,{onClick:()=>{ie?.(e.seq,ce.seq),Me(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[ce.label,(e.sprint_seq??0)===ce.seq?_e(Mm,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},ce.seq))}),_e(gl,{anchorEl:Ae?.anchorEl??null,open:!!Ae?.open,acks:e.acks??[],total:Ot?.total??Ft?.total??0,pendingNames:Ot?.pendingNames??Ft?.pendingNames??[],avatarSrcByName:l,onRequestConfirm:Be&&(Ot?Ot.count<Ot.total:Ft&&Ft.count<Ft.total)?()=>{Be(e.seq),xe(ce=>ce?{...ce,open:!1}:null)}:void 0,onClose:()=>xe(ce=>ce?{...ce,open:!1}:null)}),_e(Yl,{anchorEl:ze,selectedKeys:e.label_keys??[],labelOptions:g,onToggle:ce=>s(e.seq,Xa(e.label_keys??[],ce)),onAddLabel:r,onClose:()=>St(null)}),_e(ni,{anchorEl:Fe,value:e.icon??"",color:e.icon_color??"",onSelect:ce=>{se(e.seq,ce),Ye(null)},onSelectColor:de?ce=>de(e.seq,ce):void 0,onClose:()=>Ye(null)}),_e(At,{open:!!Oe,anchorEl:Oe,title:Rt?"\uC774 \uC5C5\uBB34\uB97C \uAC00\uC838\uC640 \uCC45\uC784\uC790\uB97C \uB9E1\uC73C\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?":"\uC774 \uC5C5\uBB34\uC758 \uCC45\uC784\uC790\uB97C \uB9E1\uC73C\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uAC00\uC838\uAC00\uAE30",onCancel:()=>Ne(null),onConfirm:()=>{ve?.(e.seq),Ne(null)}})]})}function mo(e){let f=g=>String(g).padStart(2,"0");return`${e.getFullYear()}-${f(e.getMonth()+1)}-${f(e.getDate())}`}function Lm(e=new Date){let f=g=>String(g).padStart(2,"0");return`${mo(e)} ${f(e.getHours())}:${f(e.getMinutes())}`}function rc(e,f=new Date){let g=new Date(f);return g.setMonth(g.getMonth()-e),g}function RH(e=new Date){return{fromDate:mo(rc(1,e)),toDate:mo(e)}}import{Fragment as d6,jsx as Zt,jsxs as xs}from"react/jsx-runtime";function JH(){let e=new Date,f=g=>String(g).padStart(2,"0");return`${e.getFullYear()}-${f(e.getMonth()+1)}-${f(e.getDate())} ${f(e.getHours())}:${f(e.getMinutes())}`}function QH({open:e,task:f,onClose:g,onAddComment:l,onSaveFields:o,presentation:s="auto",myAccountSeq:r=0,onToggleCompleted:t,onChangeTitle:n,onChangeIcon:c,onChangeIconColor:i,activityItems:a,activityLoading:h,onLoadActivity:d,onPrint:u,onDelete:b,canDelete:m,...x}){let k=qt(),B=oc(null);f&&(B.current=f);let R=f??B.current,[j,A]=ic(!1),[P,N]=ic(null),[q,z]=ic(null),{editPolicy:T,onEditSessionEnd:S}=ot(),D=!!b&&(m??(R?!Ti(R,r,T,!(r>0&&(R.author_account_seq??0)===r)):!1)),[p,y]=ic({}),v=Object.keys(p).length>0;nc(()=>{y({})},[f?.seq,e]);let w=oc(null),_=t6(()=>{let G=w.current;w.current=null,G?.edited&&G.seq>0&&S?.(G.seq)},[S]),C=()=>{let G=f?.seq??B.current?.seq??0;G&&(w.current?.seq===G?w.current.edited=!0:w.current={seq:G,edited:!0})};nc(()=>{let G=f?.seq??0;if(e&&G>0){w.current?.seq!==G&&(_(),w.current={seq:G,edited:!1});return}_()},[e,f?.seq,_]);let O=oc(_);O.current=_,nc(()=>()=>O.current(),[]);let F=oc(null);if(nc(()=>{F.current?.scrollTo({top:0})},[f?.seq]),!R)return null;let $=k&&v?{...R,...p}:R,K=$.checklist??[],M=(G,V)=>{C(),k?y(W=>({...W,...G})):V()},H=()=>{let G=p;y({});let V=R.seq,W=!!w.current?.edited;w.current&&(w.current.edited=!1),W&&V>0&&S?.(V);let X=G.title===void 0?void 0:String(G.title).trim();if(o){let Z={...G};X!==void 0&&(X?Z.title=X:delete Z.title),Object.keys(Z).length>0&&o(V,Z),jm({message:"\uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",position:"center"});return}X&&n(V,X),G.icon!==void 0&&c(V,String(G.icon)),G.icon_color!==void 0&&i?.(V,String(G.icon_color)),G.status!==void 0&&x.onChangeStatus(V,G.status),G.label_keys!==void 0&&x.onChangeLabels(V,G.label_keys??[]),G.tab_key!==void 0&&x.onChangeProject(V,String(G.tab_key??"")),G.start_date!==void 0&&x.onChangeDate(V,"start_date",String(G.start_date??"")),G.due_date!==void 0&&x.onChangeDate(V,"due_date",String(G.due_date??"")),G.reminders!==void 0&&x.onChangeReminder(V,G.reminders),G.priority!==void 0&&x.onChangePriority(V,G.priority),G.event_time!==void 0&&x.onChangeEventTime?.(V,String(G.event_time??"")),G.event_place!==void 0&&x.onChangeEventPlace?.(V,String(G.event_place??"")),G.event_address!==void 0&&x.onChangeEventAddress?.(V,String(G.event_address??"")),G.content!==void 0&&x.onChangeContent(V,String(G.content??"")),G.note!==void 0&&x.onChangeNote(V,String(G.note??"")),G.visibility!==void 0&&x.onChangeVisibility?.(V,G.visibility,Number(G.visibility_group_seq??0)),jm({message:"\uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",position:"center"})},E={...x,onChangeStatus:(G,V)=>{let W=V==="in_progress"||V==="bug_in_progress",X=!String($.start_date??"").trim(),Z=W&&X?{status:V,start_date:Lm()}:{status:V};M(Z,()=>x.onChangeStatus(G,V))},onChangeLabels:(G,V)=>M({label_keys:V},()=>x.onChangeLabels(G,V)),onChangeProject:(G,V)=>M({tab_key:V},()=>x.onChangeProject(G,V)),onChangeDate:(G,V,W)=>M({[V]:W},()=>x.onChangeDate(G,V,W)),onChangeReminder:(G,V)=>M({reminders:V},()=>x.onChangeReminder(G,V)),onChangePriority:(G,V)=>M({priority:V},()=>x.onChangePriority(G,V)),onChangeEventTime:(G,V)=>M({event_time:V},()=>x.onChangeEventTime?.(G,V)),onChangeEventPlace:(G,V)=>M({event_place:V},()=>x.onChangeEventPlace?.(G,V)),onChangeEventAddress:(G,V)=>M({event_address:V},()=>x.onChangeEventAddress?.(G,V)),onChangeContent:(G,V)=>M({content:V},()=>x.onChangeContent(G,V)),onChangeNote:(G,V)=>M({note:V},()=>x.onChangeNote(G,V)),onMemberEdit:(G,V)=>x.onMemberEdit(G,V,k?W=>y(X=>({...X,...W})):null),onChangeNoteDraft:k?(G,V)=>M({note:V},()=>{}):void 0,onChangeVisibility:x.onChangeVisibility?(G,V,W)=>M({visibility:V,visibility_group_seq:W},()=>x.onChangeVisibility?.(G,V,W)):void 0,onAddChecklistItem:(G,V)=>M({checklist:[...K,{label:V,checked:!1}]},()=>x.onAddChecklistItem(G,V)),onToggleChecklistItem:(G,V,W)=>M({checklist:K.map((X,Z)=>Z===V?{...X,checked:W}:X)},()=>x.onToggleChecklistItem(G,V,W)),onRemoveChecklistItem:(G,V)=>M({checklist:K.filter((W,X)=>X!==V)},()=>x.onRemoveChecklistItem(G,V)),onUpdateChecklistItem:x.onUpdateChecklistItem?(G,V,W)=>M({checklist:K.map((X,Z)=>Z===V?{...X,label:W}:X)},()=>x.onUpdateChecklistItem?.(G,V,W)):void 0,onReorderChecklist:x.onReorderChecklist?(G,V)=>M({checklist:V},()=>x.onReorderChecklist?.(G,V)):void 0,onAddAttachments:(G,V)=>{C(),x.onAddAttachments(G,V)},onRemoveAttachment:(G,V)=>{C(),x.onRemoveAttachment(G,V)},onLinkChecklistTask:x.onLinkChecklistTask?(G,V,W)=>M({checklist:[...K,{label:W,checked:!1,task_seq:V}]},()=>x.onLinkChecklistTask?.(G,V,W)):void 0},I=k||s==="dialog",L=Zt(Nm,{...E,headerless:I,task:$,myAccountSeq:r,onChangeTitle:(G,V)=>M({title:V},()=>n(G,V)),onToggleCompleted:t,onChangeIcon:(G,V)=>M({icon:V},()=>c(G,V)),onChangeIconColor:(G,V)=>M({icon_color:V},()=>i?.(G,V)),showTitle:k||s==="dialog"}),U=Zt(hm,{onSubmit:(G,V)=>l($.seq,G,V)},$.seq);return I?xs(d6,{children:[Zt(f6,{open:e,onClose:g,locale:"ko",fontScale:{enabled:!0,default:1.1,min:.6},title:$.is_notice?"\uACF5\uC9C0\uC0AC\uD56D":$.is_event?"\uC77C\uC815":$.is_bug?"\uC624\uB958":"\uC5C5\uBB34",titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1},custom:[...k?[{raw:!0,icon:Zt(r6,{variant:"contained",size:"small",disableElevation:!0,disabled:!v,onClick:v?H: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"})}]:[],{raw:!0,icon:Zt(o6,{size:"small","aria-label":"\uB354\uBCF4\uAE30",onClick:G=>N(G.currentTarget),children:Zt(s6,{sx:{color:"#6b7280"}})})}]},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:U},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:Zt(sc,{sx:{userSelect:"none",width:"100%",minWidth:0,display:"flex",flexDirection:"column",gap:0},children:L})}]},R.seq),xs(i6,{open:!!P,anchorEl:P,onClose:()=>N(null),anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},sx:{zIndex:1500},children:[d?xs(Tf,{onClick:()=>{N(null),A(!0)},children:[Zt(kf,{children:Zt(c6,{fontSize:"small"})}),Zt(Sf,{children:"\uD65C\uB3D9"})]}):null,xs(Tf,{onClick:()=>{N(null),ps($,!0)},children:[Zt(kf,{children:Zt(l6,{fontSize:"small"})}),Zt(Sf,{children:"\uACF5\uC720\uD558\uAE30"})]}),D?xs(Tf,{onClick:G=>{let V=P??G.currentTarget;N(null),z(V)},sx:{color:"#e5484d"},children:[Zt(kf,{children:Zt(a6,{fontSize:"small",sx:{color:"#e5484d"}})}),Zt(Sf,{children:"\uC0AD\uC81C"})]}):null]}),Zt(At,{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:()=>z(null),onConfirm:()=>{z(null),b?.($)}}),Zt(ec,{open:j,taskSeq:$.seq,items:a,loading:h,onLoad:d,onClose:()=>A(!1)})]}):Zt(n6,{anchor:"right",open:e,onClose:g,"aria-label":"\uC5C5\uBB34 \uC0C1\uC138",disableAutoFocus:!0,disableEnforceFocus:!0,sx:{zIndex:G=>G.zIndex.modal},slotProps:{paper:{sx:{width:720,maxWidth:"100vw"}}},children:xs(sc,{sx:{display:"flex",flexDirection:"column",height:"100%",userSelect:"none"},children:[Zt(ym,{task:$,myAccountSeq:r,onToggleCompleted:t,onChangeTitle:n,onChangeIcon:c,onChangeIconColor:i,onClose:g,activityItems:a,activityLoading:h,onLoadActivity:d,onPrint:u,onDelete:b,canDelete:m}),Zt(zm,{sx:{borderColor:"#e6e6e3"}}),Zt(sc,{sx:{flex:1,minHeight:0},children:Zt(u6,{ref:F,style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:L})}),Zt(zm,{sx:{borderColor:"#37352f"}}),Zt(sc,{sx:{flexShrink:0},children:U})]})})}import{useEffect as w6,useState as $o}from"react";import{Box as tn,Button as Ef,IconButton as $m}from"@mui/material";import{FormDialog as Hm}from"@ehfuse/mui-form-dialog";import _6 from"@mui/icons-material/Add";import k6 from"@mui/icons-material/DirectionsRunOutlined";import S6 from"@mui/icons-material/EditOutlined";import{ErrorAlert as Wm}from"@ehfuse/alerts";import{ClearTextField as Um,DateTextField as Vm,LabelSelect as Km}from"@ehfuse/mui-form-controls";import{useEffect as h6,useState as Fm}from"react";import{Box as qo,Button as p6,FormControlLabel as Cf,Radio as Bf,RadioGroup as m6}from"@mui/material";import{FormDialog as g6}from"@ehfuse/mui-form-dialog";import{LabelSelect as b6}from"@ehfuse/mui-form-controls";import y6 from"@ehfuse/overlay-scrollbar";import{Fragment as x6,jsx as Wr,jsxs as vs}from"react/jsx-runtime";function qm({open:e,sprint:f,remainingTasks:g,sprints:l,onClose:o,onConfirm:s}){let r=l.filter(h=>h.seq!==f?.seq&&h.group_seq===(f?.group_seq??0)&&h.status!=="closed"),[t,n]=Fm("backlog"),[c,i]=Fm(0);h6(()=>{e&&(n(r.length>0?"move":"backlog"),i(r[0]?.seq??0))},[e]);let a=g.length>0;return Wr(g6,{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:Wr(p6,{variant:"contained",onClick:()=>s({mode:a?t:"keep",moveToSprintSeq:t==="move"?c:0,taskSeqs:g.map(h=>h.seq)}),disabled:a&&t==="move"&&!(c>0),children:"\uB9C8\uAC10"})},sections:[{id:"sprint-close",title:"",showTitle:!1,children:vs(qo,{sx:{display:"flex",flexDirection:"column",gap:2},children:[vs(qo,{sx:{fontSize:18,color:"#37352f"},children:[Wr(qo,{component:"span",sx:{fontWeight:600},children:f?.name??""})," \uBAA9\uD45C\uB97C \uB9C8\uAC10\uD569\uB2C8\uB2E4."]}),a?vs(x6,{children:[vs(qo,{sx:{fontSize:15,color:"#6f6f6c"},children:["\uB05D\uB098\uC9C0 \uC54A\uC740 \uC5C5\uBB34\uAC00"," ",g.length,"\uAC74 \uC788\uC2B5\uB2C8\uB2E4. \uC5B4\uB5BB\uAC8C \uD560\uAE4C\uC694?"]}),Wr(qo,{sx:{border:"1px solid #e6e6e3",borderRadius:1,overflow:"hidden"},children:Wr(y6,{style:{maxHeight:220},thumb:{width:6},children:g.map(h=>vs(qo,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1,borderBottom:"1px solid #f2f2f0","&:last-of-type":{borderBottom:"none"}},children:[Wr(qo,{sx:{flex:1,minWidth:0,fontSize:16,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:h.title}),Wr(Lt,{option:xr(h)})]},h.seq))})}),vs(m6,{value:t,onChange:(h,d)=>n(d),children:[r.length>0?Wr(Cf,{value:"move",control:Wr(Bf,{size:"small"}),label:"\uB2E4\uC74C \uBAA9\uD45C\uB85C \uC774\uC6D4",sx:{"& .MuiFormControlLabel-label":{fontSize:16}}}):null,t==="move"&&r.length>0?Wr(qo,{sx:{pl:4,pb:1},children:Wr(b6,{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,Wr(Cf,{value:"backlog",control:Wr(Bf,{size:"small"}),label:"\uBBF8\uBC30\uC815(\uBC31\uB85C\uADF8)\uC73C\uB85C \uBE7C\uAE30",sx:{"& .MuiFormControlLabel-label":{fontSize:16}}}),Wr(Cf,{value:"keep",control:Wr(Bf,{size:"small"}),label:"\uC774 \uBAA9\uD45C\uC5D0 \uADF8\uB300\uB85C \uB450\uAE30",sx:{"& .MuiFormControlLabel-label":{fontSize:16}}})]})]}):Wr(qo,{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 If="custom-";function v6(e){return e.startsWith(If)}function fW(e){return e>0?`${If}${e}`:""}function hi(e){if(!v6(e))return 0;let f=Number(e.slice(If.length));return Number.isInteger(f)&&f>0?f:0}import{Fragment as Ym,jsx as Vt,jsxs as pi}from"react/jsx-runtime";var T6=[{value:"planning",label:"\uACC4\uD68D\uC911"},{value:"active",label:"\uC9C4\uD589\uC911"},{value:"closed",label:"\uC885\uB8CC"}];function Gm(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?e.slice(5).replace("-","."):"-"}function SW({open:e,customTabs:f,sprints:g,onClose:l,onCreate:o,onUpdate:s,onChangeStatus:r,tasks:t=[],onCloseSprint:n,onRemove:c}){let i=f.filter(O=>O.useSprints&&!O.archived),[a,h]=$o(""),[d,u]=$o(""),[b,m]=$o(""),[x,k]=$o(""),[B,R]=$o(""),[j,A]=$o(!1),[P,N]=$o(!1),[q,z]=$o(null),T=q?t.filter(O=>(O.sprint_seq??0)===q.seq&&!O.completed):[],[S,D]=$o(0);w6(()=>{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)},v=S>0||P,w=async()=>{let O=hi(a);if(!O){Wm("\uBAA9\uD45C\uB97C \uB9CC\uB4E4 \uD504\uB85C\uC81D\uD2B8\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return}if(!d.trim()){Wm("\uBAA9\uD45C \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}A(!0);try{if(S>0){s(S,{name:d.trim(),goal:b.trim(),start_date:x,end_date:B}),p();return}await o({group_seq:O,name:d.trim(),goal:b.trim(),start_date:x,end_date:B})&&p()}finally{A(!1)}},_=new Map(f.map(O=>[hi(O.key),O.label])),C=Vt(tn,{children:i.length===0?Vt(tn,{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.'}):Vt(Ym,{children:Vt(tn,{children:g.length===0?pi(tn,{sx:{py:4,display:"flex",flexDirection:"column",alignItems:"center",gap:2,color:"#9a9a97"},children:[Vt(k6,{sx:{fontSize:48,color:"#d9d9d6"}}),Vt(tn,{sx:{fontSize:13.5},children:"\uB4F1\uB85D\uB41C \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."})]}):g.map(O=>pi(tn,{sx:{display:"flex",flexDirection:"column",gap:1,"&:not(:last-of-type)::after":{content:'""',display:"block",my:1.75,borderBottom:"1px solid #f0efed"}},children:[pi(tn,{sx:{minWidth:0},children:[pi(tn,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[Vt(tn,{component:"span",sx:{fontSize:18,fontWeight:600,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},children:O.name}),Vt(tn,{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"}),pi(tn,{component:"span",sx:{flexShrink:0,fontSize:14,color:"#57564f"},children:[Gm(O.start_date)," ~"," ",Gm(O.end_date)]})]}),O.goal?Vt(tn,{sx:{mt:.5,fontSize:14,color:"#787774",lineHeight:1.5},children:O.goal}):null]}),pi(tn,{sx:{display:"flex",alignItems:"center",gap:.5},children:[Vt(Km,{label:"\uC0C1\uD0DC",showLabel:!1,size:"small",value:O.status,options:T6.map(F=>({value:F.value,label:F.label})),onChange:F=>{let $=String(F.target.value);if($==="closed"&&n){z(O);return}r(O.seq,$)},sx:{width:104,flexShrink:0}}),Vt($m,{"aria-label":"\uBAA9\uD45C \uC218\uC815",onClick:()=>y(O),sx:{color:"#9a9a97","&:hover":{color:"#2563eb"}},children:Vt(S6,{sx:{fontSize:18}})}),Vt($m,{"aria-label":"\uBAA9\uD45C \uC0AD\uC81C",onClick:()=>c(O.seq),sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:Vt(Ir,{style:{width:16,height:16}})})]})]},O.seq))})})});return pi(Ym,{children:[Vt(Hm,{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?Vt(Ef,{startIcon:Vt(_6,{}),onClick:()=>{p(),N(!0)},sx:{color:"#2563eb"},children:"\uC0C8 \uBAA9\uD45C"}):void 0,right:Vt(Ef,{variant:"contained",onClick:l,children:"\uD655\uC778"})}}),Vt(qm,{open:q!==null,sprint:q,remainingTasks:T,sprints:g,onClose:()=>z(null),onConfirm:O=>{q&&n?.(q.seq,O),z(null)}}),Vt(Hm,{open:v,onClose:()=>{N(!1),p()},maxWidth:"sm",title:S>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:Vt(tn,{sx:{pt:1},children:pi(tn,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2.5,mt:1},children:[Vt(Km,{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:S>0}),Vt(Um,{label:"\uBAA9\uD45C \uC774\uB984",size:"medium",placeholder:"\uC608: 8\uC6D4 2\uC8FC\uCC28",value:d,onChange:O=>u(O.target.value)}),Vt(Vm,{size:"medium",label:"\uC2DC\uC791\uC77C",value:x,onChange:O=>k(O.target.value)}),Vt(Vm,{size:"medium",label:"\uC885\uB8CC\uC77C",value:B,onChange:O=>R(O.target.value)}),Vt(Um,{label:"\uC124\uBA85",size:"medium",placeholder:"\uC120\uD0DD \uC785\uB825",value:b,onChange:O=>m(O.target.value),sx:{gridColumn:"1 / -1"}})]})})}],actions:{showCancelButton:!0,right:Vt(Ef,{variant:"contained",onClick:()=>{w()},disabled:j,children:S>0?"\uC218\uC815":"\uBAA9\uD45C \uB9CC\uB4E4\uAE30"})}})]})}import{Box as fr,Button as ac,FormControlLabel as Xm,Switch as Zm}from"@mui/material";import{FormDialog as C6}from"@ehfuse/mui-form-dialog";import B6 from"@mui/icons-material/LinkOutlined";import I6 from"@mui/icons-material/LinkOffOutlined";import E6 from"@mui/icons-material/SyncOutlined";import M6 from"@mui/icons-material/ArrowForward";import{Fragment as O6,jsx as Ht,jsxs as Rr}from"react/jsx-runtime";function Jm({from:e,to:f}){return Rr(fr,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:.5},children:[e,Ht(M6,{sx:{fontSize:16,color:"#787774"}}),f]})}function R6({size:e=28}){return Rr(fr,{component:"svg",viewBox:"0 0 48 48","aria-hidden":!0,sx:{width:e,height:e,flexShrink:0,mx:1},children:[Ht("path",{fill:"#EA4335",d:"M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z"}),Ht("path",{fill:"#4285F4",d:"M46.98 24.55c0-1.57-.15-3.09-.38-4.55H24v9.02h12.94c-.58 2.96-2.26 5.48-4.78 7.18l7.73 6c4.51-4.18 7.09-10.36 7.09-17.65z"}),Ht("path",{fill:"#FBBC05",d:"M10.53 28.59c-.48-1.45-.76-2.99-.76-4.59s.27-3.14.76-4.59l-7.98-6.19C.92 16.46 0 20.12 0 24c0 3.88.92 7.54 2.56 10.78l7.97-6.19z"}),Ht("path",{fill:"#34A853",d:"M24 48c6.48 0 11.93-2.13 15.89-5.81l-7.73-6c-2.15 1.45-4.92 2.3-8.16 2.3-6.26 0-11.57-4.22-13.47-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z"})]})}function DW({open:e,googleApi:f,onClose:g}){let{status:l,busy:o}=f,{calendarName:s}=ot(),r=l.linked&&l.calendar_name||s||"\uC5C5\uBB34\uD568",t=Rr(fr,{sx:{display:"flex",flexDirection:"column",gap:"24px"},children:[Rr(fr,{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:[Ht(fr,{children:Rr(fr,{component:"span",children:[Ht("b",{children:"\uB0B4\uBCF4\uB0B4\uAE30"}),"\uB294 \uB0B4 \uC5C5\uBB34\uB97C \uAD6C\uAE00 \uCE98\uB9B0\uB354\uC758"," ",Rr("b",{children:['"',r,'"']})," \uCE98\uB9B0\uB354\uC5D0 \uBC14\uB85C \uBC18\uC601\uD569\uB2C8\uB2E4."]})}),Ht(fr,{children:Rr(fr,{component:"span",children:[Ht("b",{children:"\uAC00\uC838\uC624\uAE30"}),"\uB294 \uAD6C\uAE00 \uAE30\uBCF8 \uCE98\uB9B0\uB354 \uC77C\uC815\uC744 \uC5C5\uBB34\uD568\uC5D0 \uC77D\uAE30\uC804\uC6A9\uC73C\uB85C \uBCF4\uC5EC\uC90D\uB2C8\uB2E4."]})}),Ht(fr,{children:Rr(fr,{component:"span",children:['"',r,'" \uCE98\uB9B0\uB354 \uC77C\uC815\uC740 \uC5C5\uBB34\uD568\uC5D0\uC11C \uC218\uC815\uD574\uC57C \uD569\uB2C8\uB2E4.']})})]}),l.configured?Rr(fr,{sx:{border:"1px solid #e6e6e3",borderRadius:1,pl:2,pr:3,py:1.75,display:"flex",flexDirection:"column",gap:1.25},children:[Rr(fr,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[Ht(R6,{}),Rr(fr,{sx:{flex:1,minWidth:0},children:[Ht(fr,{sx:{fontSize:18,color:"#111",fontWeight:700},children:"\uAD6C\uAE00 \uACC4\uC815 \uC5F0\uACB0"}),Ht(fr,{sx:{fontSize:15,color:"#111",mt:.5,lineHeight:1.6},children:l.linked?Rr(O6,{children:[Rr(fr,{component:"span",sx:{display:"block",fontWeight:600},children:[l.google_email||"\uAD6C\uAE00 \uACC4\uC815"," ","\uC5D0 \uC5F0\uACB0\uB428"]}),Rr(fr,{component:"span",sx:{display:"block"},children:['\uAD6C\uAE00 \uCE98\uB9B0\uB354\uC5D0 "',r,'" \uCE98\uB9B0\uB354\uAC00 \uB9CC\uB4E4\uC5B4\uC84C\uC2B5\uB2C8\uB2E4.']})]}):`\uAD6C\uAE00 \uACC4\uC815\uC744 \uC5F0\uACB0\uD558\uBA74 \uB0B4 \uC5C5\uBB34\uAC00 \uAD6C\uAE00 \uCE98\uB9B0\uB354\uC758 "${r}" \uCE98\uB9B0\uB354\uC5D0 \uBC14\uB85C \uBC18\uC601\uB429\uB2C8\uB2E4.`}),l.last_error?Rr(fr,{sx:{fontSize:13,color:"#c62828",mt:.5},children:["\uCD5C\uADFC \uC624\uB958: ",l.last_error]}):null]}),l.linked?Ht(ac,{size:"small",variant:"outlined",color:"inherit",disabled:o,startIcon:Ht(I6,{sx:{fontSize:18}}),onClick:f.onDisconnect,sx:{flexShrink:0,whiteSpace:"nowrap",ml:2},children:"\uC5F0\uACB0 \uD574\uC81C"}):Ht(ac,{size:"small",variant:"contained",disableElevation:!0,disabled:o,startIcon:Ht(B6,{sx:{fontSize:18}}),onClick:f.onConnect,sx:{flexShrink:0,whiteSpace:"nowrap",bgcolor:"#2563eb",ml:2},children:"\uC5F0\uACB0\uD558\uAE30"})]}),l.linked?Rr(fr,{sx:{display:"flex",alignItems:"center",gap:2,flexWrap:"wrap",pl:4.5},children:[Ht(Xm,{control:Ht(Zm,{size:"small",checked:l.export_enabled,disabled:o,onChange:(n,c)=>f.onToggleExport(c)}),label:Rr(fr,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:.5},children:["\uB0B4\uBCF4\uB0B4\uAE30 (",Ht(Jm,{from:"\uC5C5\uBB34\uD568",to:"\uAD6C\uAE00"}),")"]}),sx:{m:0,"& .MuiFormControlLabel-label":{fontSize:14,color:"#37352f"}}}),Ht(Xm,{control:Ht(Zm,{size:"small",checked:l.import_enabled,disabled:o,onChange:(n,c)=>f.onToggleImport(c)}),label:Rr(fr,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:.5},children:["\uAC00\uC838\uC624\uAE30 (",Ht(Jm,{from:"\uAD6C\uAE00",to:"\uC5C5\uBB34\uD568"}),")"]}),sx:{m:0,"& .MuiFormControlLabel-label":{fontSize:14,color:"#37352f"}}}),f.onResync?Ht(ac,{size:"small",color:"inherit",disabled:o||!l.export_enabled,startIcon:Ht(E6,{sx:{fontSize:18}}),onClick:f.onResync,sx:{ml:"auto",whiteSpace:"nowrap"},children:"\uC804\uCCB4 \uB2E4\uC2DC \uB0B4\uBCF4\uB0B4\uAE30"}):null]}):null]}):Ht(fr,{sx:{fontSize:14,color:"#8a6d1d",lineHeight:1.7},children:"\uC11C\uBC84\uC5D0 \uAD6C\uAE00 \uC5F0\uB3D9 \uC124\uC815(\uD074\uB77C\uC774\uC5B8\uD2B8 ID/\uBE44\uBC00\uBC88\uD638)\uC774 \uC5C6\uC5B4 \uC5F0\uACB0\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uAD00\uB9AC\uC790\uC5D0\uAC8C \uBB38\uC758\uD558\uC138\uC694."})]});return Ht(C6,{open:e,onClose:g,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:t}],actions:{showCancelButton:!1,right:Ht(ac,{variant:"contained",onClick:g,sx:{minWidth:80},children:"\uB2EB\uAE30"})}})}import{useEffect as A6,useMemo as Mf,useState as Rf}from"react";import{Box as ga,Button as D6,Typography as P6}from"@mui/material";import{FormDialog as N6}from"@ehfuse/mui-form-dialog";import{SearchTextField as L6}from"@ehfuse/mui-form-controls";import{TreeView as z6}from"@ehfuse/tree-view";import{Fragment as W6,jsx as Kn,jsxs as U6}from"react/jsx-runtime";function Qm(e){return`${e.name}#${e.seq}`}function j6(e){return Number(e.slice(e.lastIndexOf("#")+1))||0}function F6(e){let f=[],g=l=>{for(let o of l.employees??[])f.push(o);for(let o of l.groups??[])g(o)};for(let l of e)g(l);return f}function q6(e,f){return f?[e.name,e.department,e.role_name,e.work_position].filter(Boolean).some(g=>String(g).toLowerCase().includes(f)):!0}function $6(e){let f=[[e.name,e.role_name].filter(Boolean).join(" "),e.department].filter(Boolean).join(" / ");return{id:`emp:${e.seq}`,label:Qm(e),renderLabel:Kn(ga,{component:"span",sx:{display:"inline-flex",alignItems:"baseline",gap:.75},children:Kn(ga,{component:"span",sx:{fontWeight:400,color:"text.primary"},children:f})})}}function e0(e,f){let g=(e.groups??[]).map(o=>e0(o,f)).filter(o=>o!==null),l=(e.employees??[]).filter(o=>q6(o,f)).map($6);return g.length===0&&l.length===0?null:{id:`group:${e.key}`,label:e.name,children:[...g,...l]}}function H6({groups:e,allEmployees:f,initialSelectedSeqs:g,multiple:l,isMobile:o,onSelectionChange:s}){let[r,t]=Rf(""),n=Mf(()=>e.map(i=>e0(i,r.trim().toLowerCase())).filter(i=>i!==null),[e,r]),c=Mf(()=>f.filter(i=>g.includes(i.seq)).map(Qm),[]);return U6(W6,{children:[Kn(ga,{sx:{px:1.5,py:1,borderBottom:"1px solid #cccccc",flexShrink:0},children:Kn(L6,{size:"small",fullWidth:!0,placeholder:"\uC774\uB984, \uBD80\uC11C \uAC80\uC0C9",onSearch:t,onClear:()=>t(""),sx:{"& .MuiOutlinedInput-notchedOutline":{border:"none"},"& .MuiInputBase-root":{px:0}}})}),Kn(ga,{sx:o?{display:"flex",flexDirection:"column"}:{flex:1,minHeight:0,overflow:"hidden",display:"flex",flexDirection:"column"},children:Kn(z6,{items:n,checkbox:!0,multiSelect:l,selectionMode:"child",showSearch:!1,defaultExpanded:!0,initialSelections:c,onChange:i=>s(i.map(j6).filter(a=>a>0)),styles:{border:"none",borderRadius:"0"}})})]})}function HW({open:e,title:f="\uC9C1\uC6D0 \uC120\uD0DD",hint:g="",groups:l,multiple:o=!1,selectedSeqs:s,confirmText:r="\uD655\uC778",onConfirm:t,onClose:n}){let c=qt(),[i,a]=Rf([]),[h,d]=Rf(0),u=Mf(()=>F6(l),[l]),b=s??[];A6(()=>{e&&(a(b),d(x=>x+1))},[e]);let m=()=>{let x=u.filter(k=>i.includes(k.seq));t(o?x:x.slice(0,1)),n()};return Kn(N6,{open:e,onClose:n,title:`${f}${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:Kn(ga,{sx:{...c?{}:{height:560},display:"flex",flexDirection:"column",border:"1px solid #cccccc",borderRadius:1,...c?{}:{overflow:"hidden"},userSelect:"none"},children:Kn(H6,{groups:l,allEmployees:u,initialSelectedSeqs:b,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:g?Kn(P6,{variant:"body2",color:"text.secondary",sx:{whiteSpace:"pre-line",lineHeight:1.35},children:g}):void 0,right:Kn(D6,{variant:"contained",onClick:m,children:r})}})}import{useEffect as mS,useMemo as P0,useState as ka}from"react";import{Box as Wo,Button as N0}from"@mui/material";import{FormDialog as gS}from"@ehfuse/mui-form-dialog";import{LabelSelect as qf}from"@ehfuse/mui-form-controls";import bS from"@mui/icons-material/SpeedOutlined";import{useEffect as V6,useState as K6}from"react";import{Box as hn,Button as G6}from"@mui/material";import{FormDialog as Y6}from"@ehfuse/mui-form-dialog";import{LabelSelect as X6,NumberField as t0}from"@ehfuse/mui-form-controls";import Z6 from"@ehfuse/overlay-scrollbar";import{jsx as rn,jsxs as ba}from"react/jsx-runtime";var J6=[{value:"count",label:"\uBBF8\uC644\uB8CC \uAC74\uC218"},{value:"points",label:"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8"}];function r0({open:e,capacity:f,employees:g,onClose:l,onSave:o}){let[s,r]=K6(f??ko);V6(()=>{e&&r(f??ko)},[e,f]);let t=s.basis==="points"?"SP":"\uAC74",n=(c,i)=>{let a=Math.max(0,Math.floor(Number(i)||0));r(h=>{let d={...h.by_account};return a>0?d[c]=a:delete d[c],{...h,by_account:d}})};return rn(Y6,{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:rn(G6,{variant:"contained",onClick:()=>{o(s)},children:"\uC800\uC7A5"})},sectionContentPaddingTop:0,sections:[{id:"capacity",title:"",showTitle:!1,children:ba(hn,{sx:{display:"flex",flexDirection:"column",gap:2},children:[rn(hn,{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."}),ba(hn,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[rn(hn,{sx:{width:104,flexShrink:0,fontSize:16,color:"#37352f"},children:"\uC138\uB294 \uB2E8\uC704"}),rn(X6,{size:"medium",fullWidth:!0,label:"",value:s.basis,options:J6,onChange:c=>r(i=>({...i,basis:c.target.value}))})]}),ba(hn,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[rn(hn,{sx:{width:104,flexShrink:0,fontSize:16,color:"#37352f"},children:"\uAE30\uBCF8 \uC6A9\uB7C9"}),rn(t0,{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))}))})]}),rn(hn,{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`}),rn(hn,{sx:{fontSize:16,fontWeight:700,color:"#37352f"},children:"\uC0AC\uB78C\uBCC4 \uC608\uC678"}),g.length===0?rn(hn,{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."}):rn(hn,{sx:{border:"1px solid #e6e6e3",borderRadius:1,overflow:"hidden"},children:rn(Z6,{style:{maxHeight:260},thumb:{width:6},children:g.filter(c=>Number(c.account_seq)>0).map(c=>ba(hn,{sx:{display:"flex",alignItems:"center",gap:1.5,px:2,py:1,borderBottom:"1px solid #f2f2f0","&:last-of-type":{borderBottom:"none"}},children:[ba(hn,{sx:{flex:1,minWidth:0,fontSize:16,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[c.name,c.department?rn(hn,{component:"span",sx:{ml:1,fontSize:14,color:"#787774"},children:c.department}):null]}),rn(hn,{sx:{width:132,flexShrink:0},children:rn(t0,{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 cc}from"@mui/material";import{Bar as r8,BarChart as n8,CartesianGrid as o8,Cell as i8,ReferenceLine as s8,ResponsiveContainer as a8,Tooltip as l8,XAxis as c8,YAxis as u8}from"recharts";import{Box as Q6}from"@mui/material";import{jsx as e8}from"react/jsx-runtime";function nn({text:e,height:f}){return e8(Q6,{sx:{display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center",fontSize:14.5,color:"#9a9a97",...typeof f=="number"?{height:f,minHeight:120}:{position:"absolute",inset:0,pointerEvents:"none"}},children:e})}import{createElement as t8}from"react";var lc="#2f80ed",n0="#a9c9f5",Hi="#9a9a97",Of="#2e9e6b",go="#3d7eff",Af="#c3c8ce",ya="#f2a30f",xa={contentStyle:{fontSize:13.5,color:"#37352f",border:"1px solid #e6e6e3",borderRadius:6},labelStyle:{fontSize:13.5,color:"#37352f",fontWeight:700},itemStyle:{fontSize:13.5}},ws={...xa,cursor:!1},_s={wrapperStyle:{fontSize:13.5,paddingTop:10},formatter:e=>t8("span",{style:{paddingRight:14,color:"#37352f"}},e)};function _r(e){return{display:"flex",flexDirection:"column",minHeight:0,position:"relative",...typeof e=="string"?{flex:1}:{}}}var Ur={flexShrink:0,mb:1.5,display:"flex",alignItems:"center",gap:2,flexWrap:"wrap"};function bo(e){return{"& *":{outline:"none"},userSelect:"none",...typeof e=="number"?{height:e,flexShrink:0}:{flex:1,minHeight:0}}}import{jsx as Gn,jsxs as va}from"react/jsx-runtime";function f8(e,f){let g=f.filter(l=>l.sprint_seq===e.seq&&!l.archived&&l.completed);return{points:g.reduce((l,o)=>l+(o.story_points??0),0),count:g.length}}function o0({sprints:e,tasks:f,height:g=200}){let o=[...e].sort((i,a)=>`${i.start_date}|${i.seq}`.localeCompare(`${a.start_date}|${a.seq}`)).map(i=>({sprint:i,...f8(i,f)})),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?Gn(nn,{text:"\uD45C\uC2DC\uD560 \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",height:g}):va(cc,{sx:_r(g),children:[va(cc,{sx:{flexShrink:0,mb:1,display:"flex",justifyContent:"space-between",flexWrap:"wrap",gap:1,fontSize:14,color:"#000"},children:[va("span",{children:["\uC644\uB8CC ",s?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uBAA9\uD45C\uBCC4"]}),n!==null?va("span",{children:["\uD3C9\uADE0(\uC885\uB8CC \uBAA9\uD45C)"," ",Gn(cc,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:n}),r]}):null]}),Gn(cc,{sx:bo(g),children:Gn(a8,{width:"100%",height:"100%",children:va(n8,{data:c,margin:{top:8,right:12,left:0,bottom:0},barCategoryGap:"28%",children:[Gn(o8,{strokeDasharray:"3 3",stroke:"#e6e6e3"}),Gn(c8,{dataKey:"\uBAA9\uD45C",tick:{fontSize:13},tickMargin:6,interval:0}),Gn(u8,{tick:{fontSize:13},width:40,allowDecimals:!1}),Gn(l8,{...ws,formatter:i=>`${Number(i??0)}${r}`}),n!==null?Gn(s8,{y:n,stroke:Hi,strokeDasharray:"6 5",label:{value:`\uD3C9\uADE0 ${n}${r}`,position:"right",fontSize:13}}):null,Gn(r8,{dataKey:"\uC644\uB8CC",radius:[4,4,0,0],children:c.map(i=>Gn(i8,{fill:i.closed?lc:n0},i.\uBAA9\uD45C))})]})})})]})}import{useMemo as d8}from"react";import{Box as yo}from"@mui/material";import{CartesianGrid as h8,Line as i0,LineChart as p8,ResponsiveContainer as m8,Tooltip as g8,XAxis as b8,YAxis as y8}from"recharts";import{jsx as pn,jsxs as mi}from"react/jsx-runtime";function s0(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?new Date(`${e}T00:00:00`):null}function x8(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function v8(e){return e.slice(5).replace("-",".")}function a0({sprint:e,tasks:f,todayStr:g,height:l=200,headerLeft:o}){let s=d8(()=>{let a=s0(e.start_date),h=s0(e.end_date);if(!a||!h||h<a||Math.round((h.getTime()-a.getTime())/864e5)+1>366)return null;let u=f.filter(P=>P.sprint_seq===e.seq&&!P.archived);if(u.length===0)return{empty:!0};let b=u.some(P=>(P.story_points??0)>0),m=P=>b?P.story_points??0:1,x=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(x8(P));let R=x,j=x;return{empty:!1,data:B.map((P,N)=>{let q=B.length===1?0:x*(1-N/(B.length-1));return P<=g&&(R-=k.get(P)??0,j=Math.max(0,R)),{\uB0A0\uC9DC:v8(P),\uC774\uC0C1:Math.round(q*10)/10,\uB0A8\uC740\uB7C9:P<=g?Math.max(0,R):null}}),total:x,usePoints:b,last:j}},[e,f,g]);if(!s)return mi(yo,{sx:_r(l),children:[o?pn(yo,{sx:Ur,children:o}):null,pn(nn,{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 mi(yo,{sx:_r(l),children:[o?pn(yo,{sx:Ur,children:o}):null,pn(nn,{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 mi(yo,{sx:_r(l),children:[mi(yo,{sx:Ur,children:[o?pn(yo,{sx:{flexShrink:0},children:o}):null,mi(yo,{sx:{flex:1,minWidth:220,display:"flex",justifyContent:"space-between",flexWrap:"wrap",gap:1,fontSize:14,color:"#000"},children:[mi("span",{children:["\uB0A8\uC740 ",n?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uCD1D ",t]}),mi("span",{children:["\uD604\uC7AC"," ",pn(yo,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:c}),i," \uB0A8\uC74C"]})]})]}),pn(yo,{sx:bo(l),children:pn(m8,{width:"100%",height:"100%",children:mi(p8,{data:r,margin:{top:8,right:12,left:0,bottom:0},children:[pn(h8,{strokeDasharray:"3 3",stroke:"#e6e6e3"}),pn(b8,{dataKey:"\uB0A0\uC9DC",tick:{fontSize:13},tickMargin:6,minTickGap:24}),pn(y8,{tick:{fontSize:13},width:40,allowDecimals:!1}),pn(g8,{...xa,formatter:a=>`${Number(a??0)}${i}`}),pn(i0,{type:"linear",dataKey:"\uC774\uC0C1",stroke:Hi,strokeDasharray:"6 5",strokeWidth:1.5,dot:!1}),pn(i0,{type:"monotone",dataKey:"\uB0A8\uC740\uB7C9",stroke:lc,strokeWidth:2.5,dot:!1,connectNulls:!1})]})})})]})}import{useMemo as p0}from"react";import{Box as xo}from"@mui/material";import{Area as Nf,AreaChart as S8,CartesianGrid as T8,Legend as C8,ResponsiveContainer as B8,Tooltip as I8,XAxis as E8,YAxis as M8}from"recharts";var Pf=864e5,wa=[0,1,2,3,5,8,13,21];function u0(e){return!e.archived&&!e.linked_only&&!e.is_notice&&!e.is_event}function Df(e){let f=String(e??"").trim(),g=/^(\d{4}-\d{2}-\d{2})(?:[ T](\d{2}:\d{2}))?/.exec(f);if(!g)return null;let l=new Date(`${g[1]}T${g[2]??"00:00"}:00`).getTime();return Number.isNaN(l)?null:l}function ks(e){let f=String(e??"").trim();return/^\d{4}-\d{2}-\d{2}/.test(f)?f.slice(0,10):""}function w8(e){let f=ks(e.created_time)||ks(e.start_date)||ks(e.completed_time);if(!f)return null;let g=ks(e.start_date),l=g&&g>f?g:f,o=e.completed?ks(e.completed_time)||f:"";return{created:f,started:l,done:o}}function f0(e,f){let g=/^\d{4}-\d{2}-\d{2}$/.test(f)?new Date(`${f}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(mo(new Date(g.getTime()-s*Pf)));return o}function d0(e,f,g){let l=f0(f,g),o=e.filter(u0).map(w8).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 _8(e,f){if(e.length===0)return 0;let g=Math.min(e.length-1,Math.max(0,Math.ceil(e.length*f)-1));return e[g]}function l0(e){if(e.length===0)return null;let f=[...e].sort((s,r)=>s-r),g=s=>Math.round(s*10)/10,l=Math.floor(f.length/2),o=f.length%2===1?f[l]:(f[l-1]+f[l])/2;return{count:f.length,median:g(o),average:g(f.reduce((s,r)=>s+r,0)/f.length),p85:g(_8(f,.85))}}function c0(e){for(let f=wa.length-1;f>=0;f-=1)if(e>=wa[f])return f;return 0}function k8(){return wa.map((e,f)=>f===wa.length-1?`${e}\uC77C+`:`${e}~${wa[f+1]}\uC77C`)}function h0(e,f,g){let l=f0(f,g),o=l[0],s=l[l.length-1],r=k8(),t=r.map(()=>0),n=r.map(()=>0),c=[],i=[];for(let a of e){if(!u0(a)||!a.completed)continue;let h=ks(a.completed_time);if(!h||h<o||h>s)continue;let d=Df(a.completed_time),u=Df(a.created_time);if(d===null||u===null)continue;let b=Math.max(0,(d-u)/Pf);c.push(b),t[c0(b)]+=1;let m=Df(a.start_date);if(m===null||m>d)continue;let x=Math.max(0,(d-Math.max(m,u))/Pf);i.push(x),n[c0(x)]+=1}return{labels:r,leadCounts:t,cycleCounts:n,lead:l0(c),cycle:l0(i)}}import{jsx as on,jsxs as gi}from"react/jsx-runtime";function R8(e){return e.slice(5).replace("-",".")}function m0({tasks:e,todayStr:f,days:g=30,height:l=220,headerLeft:o}){let s=p0(()=>d0(e,g,f),[e,g,f]),r=p0(()=>s.points.map(n=>({\uB0A0\uC9DC:R8(n.day),\uC644\uB8CC:n.done,\uC9C4\uD589:n.inProgress,\uB300\uAE30:n.waiting})),[s]),t=gi(xo,{sx:Ur,children:[o?on(xo,{sx:{flexShrink:0},children:o}):null,gi(xo,{sx:{flex:1,minWidth:220,display:"flex",flexDirection:"column",gap:.5},children:[gi(xo,{sx:{display:"flex",justifyContent:"space-between",flexWrap:"wrap",gap:1,fontSize:14,color:"#000"},children:[gi("span",{children:["\uCD5C\uADFC ",s.points.length,"\uC77C \u2014 \uC811\uC218 ",s.currentTotal,"\uAC74 / \uC644\uB8CC ",s.currentDone,"\uAC74"]}),gi("span",{children:["\uC9C4\uD589 \uC911"," ",on(xo,{component:"span",sx:{color:go,fontWeight:700},children:s.currentWip}),"\uAC74"]})]}),on(xo,{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?gi(xo,{sx:_r(l),children:[o?on(xo,{sx:Ur,children:o}):null,on(nn,{text:"\uC774 \uAE30\uAC04\uC5D0 \uC811\uC218\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",height:l})]}):gi(xo,{sx:_r(l),children:[t,on(xo,{sx:bo(l),children:on(B8,{width:"100%",height:"100%",children:gi(S8,{data:r,margin:{top:8,right:12,left:0,bottom:4},children:[on(T8,{strokeDasharray:"3 3",stroke:"#e6e6e3"}),on(E8,{dataKey:"\uB0A0\uC9DC",tick:{fontSize:13},tickMargin:6,minTickGap:24}),on(M8,{tick:{fontSize:13},width:40,allowDecimals:!1}),on(I8,{...xa,formatter:n=>`${Number(n??0)}\uAC74`}),on(C8,{..._s}),on(Nf,{type:"monotone",dataKey:"\uC644\uB8CC",stackId:"flow",stroke:Of,fill:Of,fillOpacity:.9}),on(Nf,{type:"monotone",dataKey:"\uC9C4\uD589",stackId:"flow",stroke:go,fill:go,fillOpacity:.85}),on(Nf,{type:"monotone",dataKey:"\uB300\uAE30",stackId:"flow",stroke:Af,fill:Af,fillOpacity:.9})]})})})]})}import{useMemo as g0}from"react";import{Box as mn}from"@mui/material";import{Bar as b0,BarChart as O8,CartesianGrid as A8,Legend as D8,ResponsiveContainer as P8,Tooltip as N8,XAxis as L8,YAxis as z8}from"recharts";import{jsx as Or,jsxs as Rn}from"react/jsx-runtime";function y0({label:e,color:f,summary:g}){let l=Rn(mn,{sx:{display:"flex",alignItems:"center",gap:.75},children:[Or(mn,{sx:{width:10,height:10,borderRadius:.5,bgcolor:f,flexShrink:0}}),Or(mn,{component:"span",sx:{fontWeight:700,color:"#37352f"},children:e})]});return g?Rn(mn,{sx:{display:"contents"},children:[l,Rn("span",{children:[g.count,"\uAC74"]}),Rn("span",{children:["\uC911\uC559\uAC12"," ",Or(mn,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:g.median}),"\uC77C"]}),Rn("span",{children:["\uD3C9\uADE0 ",g.average,"\uC77C"]}),Rn("span",{children:["85% ",g.p85,"\uC77C \uC774\uB0B4"]})]}):Rn(mn,{sx:{display:"contents"},children:[l,Or(mn,{component:"span",sx:{gridColumn:"span 4",color:"#9a9a97"},children:"\uD45C\uBCF8 \uC5C6\uC74C"})]})}function x0({tasks:e,todayStr:f,days:g=30,height:l=200,headerLeft:o}){let s=g0(()=>h0(e,g,f),[e,g,f]),r=g0(()=>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?Rn(mn,{sx:_r(l),children:[Rn(mn,{sx:Ur,children:[o?Or(mn,{sx:{flexShrink:0},children:o}):null,Rn(mn,{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:[Or(y0,{label:"\uB9AC\uB4DC\uD0C0\uC784(\uC791\uC131\u2192\uC644\uB8CC)",color:go,summary:s.lead}),Or(y0,{label:"\uC0AC\uC774\uD074\uD0C0\uC784(\uC2DC\uC791\u2192\uC644\uB8CC)",color:ya,summary:s.cycle})]})]}),Or(mn,{sx:bo(l),children:Or(P8,{width:"100%",height:"100%",children:Rn(O8,{data:r,margin:{top:8,right:12,left:0,bottom:4},barCategoryGap:"24%",children:[Or(A8,{strokeDasharray:"3 3",stroke:"#e6e6e3"}),Or(L8,{dataKey:"\uAD6C\uAC04",tick:{fontSize:13},tickMargin:6,interval:0}),Or(z8,{tick:{fontSize:13},width:40,allowDecimals:!1}),Or(N8,{...ws,formatter:t=>`${Number(t??0)}\uAC74`}),Or(D8,{..._s}),Or(b0,{dataKey:"\uB9AC\uB4DC\uD0C0\uC784",fill:go,radius:[3,3,0,0]}),Or(b0,{dataKey:"\uC0AC\uC774\uD074\uD0C0\uC784",fill:ya,radius:[3,3,0,0]})]})})})]}):Rn(mn,{sx:_r(l),children:[o?Or(mn,{sx:Ur,children:o}):null,Or(nn,{text:"\uC774 \uAE30\uAC04\uC5D0 \uC644\uB8CC\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",height:l})]})}import{useMemo as k0}from"react";import{Box as Wi}from"@mui/material";import{Bar as zf,BarChart as H8,CartesianGrid as W8,Cell as U8,Legend as V8,ReferenceLine as S0,ResponsiveContainer as K8,Tooltip as G8,XAxis as Y8,YAxis as X8}from"recharts";function j8(e,f){if(!/^\d{4}-\d{2}-\d{2}$/.test(e)||!/^\d{4}-\d{2}-\d{2}$/.test(f))return null;let g=new Date(`${e}T00:00:00`).getTime(),l=new Date(`${f}T00:00:00`).getTime();return Number.isNaN(g)||Number.isNaN(l)?null:Math.round((l-g)/864e5)}function F8(e,f,g){let l=String(e.due_date??"").slice(0,10),o=j8(f,l);return o===null?"later":o<0?"overdue":o<=g?"soon":"later"}function uc(e,f){let{todayStr:g,soonDays:l=7,includeUnassigned:o=!0,limit:s,capacity:r}=f,t=r??ko,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",d=n.get(a)??{accountSeq:a,name:h,overdue:0,soon:0,later:0,total:0,points:0,capacity:0,load:0,ratio:0};d[F8(i,g,l)]+=1,d.total+=1,d.points+=Number(i.story_points??0)||0,n.set(a,d)}for(let i of n.values())i.capacity=q8(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 fc(e,f){return e.filter(g=>g.completed||g.archived||g.is_notice||g.is_event||g.linked_only?!1:Number(g.manager_account_seq??0)===f).sort((g,l)=>{let o=String(g.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(g.title??"").localeCompare(String(l.title??""))})}function q8(e,f){if(!(e>0))return 0;let g=Math.max(0,Math.floor(Number(f.by_account?.[e])||0));return g>0?g:Math.max(0,Math.floor(Number(f.default_capacity)||0))}function dc(e){return e.capacity>0&&e.load>e.capacity}function v0(e,f){return f>0&&e.total>=f}function w0(e){let f=e.filter(g=>g.accountSeq>0);return f.length===0?0:f.reduce((g,l)=>g+l.total,0)/f.length}function Lf(e,f){let g=new Date(`${e}T00:00:00`);g.setDate(g.getDate()+f);let l=o=>String(o).padStart(2,"0");return`${g.getFullYear()}-${l(g.getMonth()+1)}-${l(g.getDate())}`}function $8(e){let f=new Date(`${e}T00:00:00`);if(Number.isNaN(f.getTime()))return e;let g=(f.getDay()+6)%7;return Lf(e,-g)}function _0(e,f){let{todayStr:g,includeUnassigned:l=!0,weeks:o=6,limit:s}=f,r=$8(g),t=Array.from({length:Math.max(1,o)},(d,u)=>{let b=Lf(r,u*7),m=Lf(b,6),[,x,k]=b.split("-");return{start:b,end:m,label:`${Number(x)}/${Number(k)}`,isCurrent:u===0}}),n=t[t.length-1].end,c=new Map;for(let d of e){if(d.completed||d.archived||d.is_notice||d.is_event||d.linked_only)continue;let u=Number(d.manager_account_seq??0);if(!u&&!l)continue;let b=u?String(d.manager_name??"").trim()||"\uC774\uB984 \uC5C6\uC74C":"\uBBF8\uBC30\uC815",m=c.get(u)??{accountSeq:u,name:b,overdue:0,byWeek:new Array(t.length).fill(0),noDue:0,total:0,beyond:0},x=String(d.due_date??"").slice(0,10);if(m.total+=1,!/^\d{4}-\d{2}-\d{2}$/.test(x))m.noDue+=1;else if(x<g)m.overdue+=1;else if(x>n)m.beyond+=1;else{let k=t.findIndex(B=>x>=B.start&&x<=B.end);k>=0?m.byWeek[k]+=1:m.beyond+=1}c.set(u,m)}let i=[...c.values()].sort((d,u)=>d.accountSeq===0!=(u.accountSeq===0)?d.accountSeq===0?1:-1:d.overdue!==u.overdue?u.overdue-d.overdue:d.total!==u.total?u.total-d.total:d.name.localeCompare(u.name)),a=typeof s=="number"&&s>0?i.slice(0,s):i,h=a.reduce((d,u)=>Math.max(d,u.overdue,u.noDue,...u.byWeek),0);return{weeks:t,rows:a,maxCell:h}}import{Fragment as T0,jsx as Ar,jsxs as bi}from"react/jsx-runtime";var _a="#e5484d";function C0({tasks:e,todayStr:f,soonDays:g=7,overloadThreshold:l=0,capacity:o=ko,height:s=200,headerLeft:r,selectedAccountSeq:t=0,onSelectPerson:n}){let c=k0(()=>uc(e,{todayStr:f,soonDays:g,capacity:o}),[e,f,g,o]),i=k0(()=>w0(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,d=o.basis==="points"?"SP":"\uAC74",u=c.filter(b=>b.accountSeq>0&&(h?dc(b):v0(b,a))).length;return c.length===0?bi(Wi,{sx:_r(s),children:[r?Ar(Wi,{sx:Ur,children:r}):null,Ar(nn,{text:"\uB2F4\uB2F9\uC790\uAC00 \uC9C0\uC815\uB41C \uBBF8\uC644\uB8CC \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",height:s})]}):bi(Wi,{sx:_r(s),children:[bi(Wi,{sx:Ur,children:[r,bi(Wi,{sx:{fontSize:13.5,color:"#37352f"},children:["1\uC778 \uD3C9\uADE0 ",Ar("b",{children:i.toFixed(1)}),"\uAC74 \xB7"," ",h?bi(T0,{children:["\uC6A9\uB7C9 ",Ar("b",{children:o.default_capacity||"\uAC1C\uC778\uBCC4"}),o.default_capacity?d:""]}):bi(T0,{children:["\uACFC\uBD80\uD558 \uAE30\uC900 ",Ar("b",{children:a}),"\uAC74"]}),u>0?bi(Wi,{component:"span",sx:{ml:1,color:_a,fontWeight:700},children:["\uCD08\uACFC ",u,"\uBA85"]}):null]})]}),Ar(Wi,{sx:bo(s),children:Ar(K8,{width:"100%",height:"100%",children:bi(H8,{data:c,layout:"vertical",onClick:n?b=>{let m=c.find(x=>x.name===String(b?.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:[Ar(W8,{strokeDasharray:"3 3",horizontal:!1,stroke:"#eceae6"}),Ar(Y8,{type:"number",allowDecimals:!1,tick:{fontSize:12}}),Ar(X8,{type:"category",dataKey:"name",width:84,tick:{fontSize:12},interval:0}),Ar(G8,{...ws,formatter:(b,m)=>[`${Number(b)||0}\uAC74`,String(m)],labelFormatter:b=>{let m=c.find(x=>x.name===b);return!m||!(m.capacity>0)?String(b):`${b} \u2014 \uC6A9\uB7C9 ${m.capacity}${d} \uC911 ${m.load} (${Math.round(m.ratio*100)}%)`}}),Ar(V8,{..._s}),i>0?Ar(S0,{x:i,stroke:Hi,strokeDasharray:"4 4",label:{value:"\uD3C9\uADE0",position:"top",fontSize:11,fill:Hi}}):null,o.default_capacity>0?Ar(S0,{x:o.default_capacity,stroke:_a,strokeDasharray:"2 3",label:{value:"\uC6A9\uB7C9",position:"top",fontSize:11,fill:_a}}):null,Ar(zf,{dataKey:"overdue",name:"\uC9C0\uC5F0",stackId:"load",fill:_a}),Ar(zf,{dataKey:"soon",name:`\uC784\uBC15(${g}\uC77C)`,stackId:"load",fill:ya}),Ar(zf,{dataKey:"later",name:"\uC5EC\uC720",stackId:"load",fill:go,radius:[0,3,3,0],children:c.map(b=>Ar(U8,{fill:h&&dc(b)?_a:go,fillOpacity:h&&dc(b)?.45:1,stroke:b.accountSeq===t?"#37352f":void 0,strokeWidth:b.accountSeq===t?1.5:0},b.accountSeq))})]})})})]})}import{useEffect as oS,useState as iS}from"react";import{Box as sS,Button as aS}from"@mui/material";import{FormDialog as lS}from"@ehfuse/mui-form-dialog";import{useState as Z8}from"react";import{Box as kr,Button as J8,Menu as Q8,MenuItem as eS}from"@mui/material";import tS from"@mui/icons-material/PersonOutlineOutlined";import rS from"@ehfuse/overlay-scrollbar";import{jsx as Nr,jsxs as Ho}from"react/jsx-runtime";var B0=56,I0=68,E0=96;function nS(e){let f=String(e.due_date??"").slice(0,10);return f?f.slice(5).replace("-","/"):"-"}function M0(e,f){let g=String(e.due_date??"").slice(0,10);return!!g&&g<f}function R0({tasks:e,row:f,todayStr:g,employees:l,rows:o,height:s=200,hideSummary:r=!1,onChangeManager:t,onOpenTask:n}){let[c,i]=Z8(null),a=fc(e,f.accountSeq),h=d=>o.find(u=>u.accountSeq===d)?.total??0;return Ho(kr,{sx:{display:"flex",flexDirection:"column",minHeight:0,height:s},children:[r?null:Ho(kr,{sx:{display:"flex",alignItems:"center",gap:1,px:.5,pb:.75,fontSize:14,color:"#37352f"},children:[Nr(kr,{component:"span",sx:{fontWeight:700},children:f.name}),Ho(kr,{component:"span",children:["\uBBF8\uC644\uB8CC ",a.length,"\uAC74"]}),f.capacity>0?Ho(kr,{component:"span",sx:{color:f.load>f.capacity?"#e5484d":"#787774"},children:["\xB7 \uC6A9\uB7C9 ",f.capacity," \uC911 ",f.load]}):null]}),Ho(kr,{sx:{flex:1,minHeight:0,display:"flex",flexDirection:"column",border:"1px solid #e6e6e3",borderRadius:1,overflow:"hidden"},children:[Ho(kr,{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:[Nr(kr,{sx:{width:B0,flexShrink:0},children:"\uB9C8\uAC10"}),Nr(kr,{sx:{flex:1,minWidth:0},children:"\uC5C5\uBB34"}),Nr(kr,{sx:{width:I0,flexShrink:0,textAlign:"center"},children:"\uC911\uC694\uB3C4"}),t?Nr(kr,{sx:{width:E0,flexShrink:0,textAlign:"center"},children:"\uCC45\uC784\uC790"}):null]}),Nr(kr,{sx:{flex:1,minHeight:0},children:Nr(rS,{style:{height:"100%"},thumb:{width:6},children:a.length===0?Nr(kr,{sx:{p:2,fontSize:14,color:"#9a9a97"},children:"\uBBF8\uC644\uB8CC \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):a.map(d=>Ho(kr,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1.5,borderBottom:"1px solid #f2f2f0"},children:[Nr(kr,{sx:{width:B0,flexShrink:0,fontSize:13.5,color:M0(d,g)?"#e5484d":"#787774",fontWeight:M0(d,g)?700:400},children:nS(d)}),Nr(kr,{onClick:n?()=>n(d.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:d.title}),Nr(kr,{sx:{width:I0,flexShrink:0,display:"flex",justifyContent:"center"},children:Nr(Xr,{priority:d.priority})}),t?Nr(kr,{sx:{width:E0,flexShrink:0,display:"flex",justifyContent:"center"},children:Nr(J8,{size:"small",variant:"outlined",startIcon:Nr(tS,{sx:{fontSize:17}}),onClick:u=>i({el:u.currentTarget,taskSeq:d.seq}),children:"\uC62E\uAE30\uAE30"})}):null]},d.seq))})})]}),Nr(Q8,{anchorEl:c?.el??null,open:!!c,onClose:()=>i(null),transitionDuration:0,children:l.filter(d=>Number(d.account_seq)>0&&Number(d.account_seq)!==f.accountSeq).map(d=>Ho(eS,{onClick:()=>{c&&t&&t(c.taskSeq,Number(d.account_seq),d.name),i(null)},sx:{fontSize:14,minWidth:200},children:[Nr(kr,{sx:{flex:1},children:d.name}),Ho(kr,{component:"span",sx:{ml:2,fontSize:13,color:"#787774"},children:[h(Number(d.account_seq)),"\uAC74"]})]},d.account_seq))})]})}import{jsx as hc}from"react/jsx-runtime";function O0({open:e,row:f,rows:g,tasks:l,todayStr:o,employees:s,onClose:r,onChangeManager:t,onOpenTask:n}){let[c,i]=iS(f);oS(()=>{f&&i(f)},[f]);let a=f??c,h=a?fc(l,a.accountSeq).length:0;return hc(lS,{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:hc(aS,{variant:"contained",onClick:r,children:"\uB2EB\uAE30"})},sections:[{id:"person-tasks",title:"",showTitle:!1,children:hc(sS,{sx:{minHeight:0},children:a?hc(R0,{tasks:l,row:a,rows:g,todayStr:o,employees:s,height:"min(420px, 52vh)",hideSummary:!0,onChangeManager:t,onOpenTask:n}):null})}]})}import{useMemo as cS}from"react";import{Box as wn,Tooltip as uS}from"@mui/material";import{OverlayScrollbar as fS}from"@ehfuse/overlay-scrollbar";import{jsx as sn,jsxs as mc}from"react/jsx-runtime";var A0="#e5484d",dS="#2f80ed",hS="#9a9a97",jf=30,pS=96,pc=56;function Ff({count:e,max:f,color:g,title:l}){let o=e>0&&f>0?.18+e/f*.72:0;return sn(uS,{title:l,arrow:!0,disableInteractive:!0,placement:"top",children:sn(wn,{sx:{display:"flex",alignItems:"center",justifyContent:"center",borderRight:"1px solid #ececea",borderBottom:"1px solid #ececea",bgcolor:o>0?`${g}${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 D0({tasks:e,todayStr:f,weeks:g=6,height:l=200}){let o=cS(()=>_0(e,{todayStr:f,weeks:g}),[e,f,g]);if(o.rows.length===0)return sn(wn,{sx:_r(l),children:sn(nn,{text:"\uB2F4\uB2F9\uC790\uAC00 \uC9C0\uC815\uB41C \uBBF8\uC644\uB8CC \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",height:l})});let s=`${pS}px ${pc}px repeat(${o.weeks.length}, minmax(${pc}px, 1fr)) ${pc}px ${pc}px`,r={height:jf,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 sn(wn,{sx:_r(l),children:sn(fS,{style:{height:"100%"},thumb:{width:8},children:mc(wn,{sx:{display:"grid",gridTemplateColumns:s,minWidth:"fit-content",height:"100%",gridTemplateRows:`${jf}px repeat(${o.rows.length}, minmax(${jf}px, 1fr))`},children:[sn(wn,{sx:{...r,justifyContent:"flex-start",pl:1},children:"\uB2F4\uB2F9\uC790"}),sn(wn,{sx:{...r,color:A0},children:"\uC9C0\uC5F0"}),o.weeks.map(t=>sn(wn,{sx:{...r,...t.isCurrent?{borderBottom:"2px solid #2f80ed"}:{}},children:t.label},t.start)),sn(wn,{sx:r,children:"\uB9C8\uAC10\uC5C6\uC74C"}),sn(wn,{sx:r,children:"\uD569\uACC4"}),o.rows.map(t=>mc(wn,{sx:{display:"contents"},children:[sn(wn,{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}),sn(Ff,{count:t.overdue,max:o.maxCell,color:A0,title:`${t.name} \xB7 \uC9C0\uC5F0 ${t.overdue}\uAC74`}),t.byWeek.map((n,c)=>sn(Ff,{count:n,max:o.maxCell,color:dS,title:`${t.name} \xB7 ${o.weeks[c].label} \uC8FC \uB9C8\uAC10 ${n}\uAC74`},o.weeks[c].start)),sn(Ff,{count:t.noDue,max:o.maxCell,color:hS,title:`${t.name} \xB7 \uB9C8\uAC10 \uBBF8\uC815 ${t.noDue}\uAC74`}),mc(wn,{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?mc(wn,{component:"span",sx:{ml:.25,fontSize:10.5,color:"#9a9a97"},children:["(+",t.beyond,")"]}):null]})]},t.accountSeq))]})})})}import{Fragment as L0,jsx as ir,jsxs as gc}from"react/jsx-runtime";var z0="min(560px, 62vh)",yS=`calc(${z0} - 4px)`,xS=[{value:"30",label:"\uCD5C\uADFC 30\uC77C"},{value:"60",label:"\uCD5C\uADFC 60\uC77C"},{value:"90",label:"\uCD5C\uADFC 90\uC77C"}];function DV({open:e,sprints:f,tasks:g,todayStr:l,showSprintCharts:o,capacity:s=ko,capacityEmployees:r=[],onSaveCapacity:t,onChangeTaskManager:n,onOpenTask:c,initialSprintSeq:i=0,onClose:a}){let[h,d]=ka(0),[u,b]=ka(30);mS(()=>{if(!e)return;let y=f.find(w=>w.status==="active")??f[0],v=f.find(w=>w.seq===i)??y;d(v?.seq??0)},[e]);let m=P0(()=>f.find(y=>y.seq===h)??null,[f,h]),x={height:yS,boxSizing:"border-box",px:3,py:2.5,display:"flex",flexDirection:"column",minHeight:0,overflow:"hidden"},k=ir(qf,{label:"\uBAA9\uD45C",showLabel:!1,showEmptyOption:!1,value:h?String(h):"",options:f.map(y=>({value:String(y.seq),label:In(y)})),onChange:y=>d(Number(y.target.value)||0),sx:{width:280,flexShrink:0}}),[B,R]=ka("distribution"),j=ir(qf,{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]=ka(!1),[N,q]=ka(0),z=P0(()=>uc(g,{todayStr:l,capacity:s}),[g,l,s]),T=z.find(y=>y.accountSeq===N)??null,S=gc(L0,{children:[j,t?ir(N0,{size:"small",variant:"outlined",startIcon:ir(bS,{sx:{fontSize:18}}),onClick:()=>P(!0),sx:{flexShrink:0},children:"\uC6A9\uB7C9"}):null]}),D=o??f.length>0,p=ir(qf,{label:"\uAE30\uAC04",showLabel:!1,showEmptyOption:!1,value:String(u),options:xS,onChange:y=>b(Number(y.target.value)||30),sx:{width:280,flexShrink:0}});return gc(L0,{children:[ir(gS,{open:e,onClose:a,maxWidth:"md",title:"\uC5C5\uBB34 \uCC28\uD2B8",locale:"ko",contentTopPadding:0,contentPaddingX:0,sectionsPaddingTop:0,sectionContentPaddingTop:0,sectionTitleGap:0,fixedHeight:z0,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:ir(Wo,{sx:x,children:ir(o0,{sprints:f,tasks:g,height:"100%"})})},{id:"burndown",tabTitle:"\uBC88\uB2E4\uC6B4",showTitle:!1,children:ir(Wo,{sx:x,children:m?ir(a0,{sprint:m,tasks:g,todayStr:l,height:"100%",headerLeft:k}):gc(Wo,{sx:_r("100%"),children:[ir(Wo,{sx:Ur,children:k}),ir(nn,{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:ir(Wo,{sx:x,children:ir(m0,{tasks:g,todayStr:l,days:u,height:"100%",headerLeft:p})})}]:[],{id:"workload",tabTitle:"\uC6CC\uD06C\uB85C\uB4DC",showTitle:!1,children:ir(Wo,{sx:x,children:B==="timeline"?gc(Wo,{sx:{display:"flex",flexDirection:"column",height:"100%",minHeight:0},children:[ir(Wo,{sx:Ur,children:S}),ir(D0,{tasks:g,todayStr:l,height:"100%"})]}):ir(C0,{tasks:g,todayStr:l,height:"100%",capacity:s,headerLeft:S,selectedAccountSeq:N,onSelectPerson:n?q:void 0})})},{id:"lead-time",tabTitle:"\uB9AC\uB4DC\uD0C0\uC784",showTitle:!1,children:ir(Wo,{sx:x,children:ir(x0,{tasks:g,todayStr:l,days:u,height:"100%",headerLeft:p})})}],actions:{showCancelButton:!1,right:ir(N0,{variant:"contained",onClick:a,children:"\uB2EB\uAE30"})}}),ir(O0,{open:N>0,row:T,rows:z,tasks:g,todayStr:l,employees:r,onClose:()=>q(0),onChangeManager:n,onOpenTask:c}),t?ir(r0,{open:A,capacity:s,employees:r,onClose:()=>P(!1),onSave:async y=>{await t(y),P(!1)}}):null]})}import{Checkbox as vS,Divider as wS,Menu as _S,MenuItem as $f}from"@mui/material";import{jsx as Sa,jsxs as j0}from"react/jsx-runtime";function jV({anchorEl:e,candidates:f,selectedNames:g,avatarSrcByName:l,onToggle:o,onClear:s,onClose:r}){return j0(_S,{anchorEl:e,open:!!e,onClose:r,transitionDuration:0,children:[f.length===0?Sa($f,{disabled:!0,sx:{fontSize:14},children:"\uBAA9\uB85D\uC5D0 \uC9C0\uC815\uB41C \uC0AC\uB78C\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):f.map(t=>{let n=g.includes(t.name);return j0($f,{onClick:()=>o(t),sx:{fontSize:14,minWidth:170,gap:1},children:[Sa(vS,{size:"small",checked:n,sx:{p:0}}),Sa(Jr,{names:[t.name],size:20,avatarSrcByName:l}),t.name]},`${t.accountSeq}-${t.name}`)}),Sa(wS,{}),Sa($f,{disabled:g.length===0,onClick:s,sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}import{useState as kS}from"react";import{ButtonBase as SS,Menu as TS,MenuItem as CS}from"@mui/material";import BS from"@mui/icons-material/KeyboardArrowDown";import IS from"@mui/icons-material/Check";import{Fragment as ES,jsx as Hf,jsxs as Wf}from"react/jsx-runtime";function KV({value:e,onChange:f,options:g}){let[l,o]=kS(null),s=g??Vc,r=Vc.find(t=>t.value===e)?.label??"";return Wf(ES,{children:[Wf(SS,{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,Hf(BS,{sx:{fontSize:17,color:"#9a9a97"}})]}),Hf(TS,{transitionDuration:0,anchorEl:l,open:!!l,onClose:()=>o(null),children:s.map(t=>Wf(CS,{selected:t.value===e,onClick:()=>{f(t.value),o(null)},sx:{fontSize:14,minWidth:140,justifyContent:"space-between",gap:1},children:[t.label,t.value===e?Hf(IS,{sx:{fontSize:16,color:"#2f80ed"}}):null]},t.value))})]})}import{Box as bc,ButtonBase as MS}from"@mui/material";import{DateTextField as F0}from"@ehfuse/mui-form-controls";import{jsx as Ta,jsxs as q0}from"react/jsx-runtime";var RS=[{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 $0({fromDate:e,toDate:f,onChange:g}){let l=s=>{if(s<=0){g("","");return}g(mo(rc(s)),mo(new Date))},o=s=>s<=0?!e&&!f:!e||!f?!1:e===mo(rc(s))&&f===mo(new Date);return q0(bc,{sx:{display:"flex",alignItems:"center",gap:1.5,flexWrap:"wrap"},children:[Ta(bc,{sx:{display:"flex",alignItems:"center",gap:1.5},children:RS.map(s=>{let r=o(s.months);return Ta(MS,{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)})}),q0(bc,{sx:{display:"flex",alignItems:"center",gap:.5},children:[Ta(F0,{value:e,size:"small",placeholder:"\uC2DC\uC791\uC77C",onChange:s=>g(s.target.value,f),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}}),Ta(bc,{component:"span",sx:{fontSize:13,color:"#9a9a97"},children:"~"}),Ta(F0,{value:f,size:"small",placeholder:"\uC885\uB8CC\uC77C",onChange:s=>g(e,s.target.value),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}})]})]})}import{Popover as OS}from"@mui/material";import{jsx as H0}from"react/jsx-runtime";function nK({anchorEl:e,fromDate:f,toDate:g,onChange:l,onClose:o}){return H0(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:H0($0,{fromDate:f,toDate:g,onChange:l})})}import{Box as AS,ButtonBase as DS,Tab as PS,Tabs as NS}from"@mui/material";import LS from"@mui/icons-material/Checklist";import zS from"@mui/icons-material/Face";import jS from"@mui/icons-material/Publish";import FS from"@mui/icons-material/NotificationsOutlined";import qS from"@mui/icons-material/BugReportOutlined";import $S from"@mui/icons-material/SupportAgentOutlined";import HS from"@mui/icons-material/DescriptionOutlined";import WS from"@mui/icons-material/Inventory2Outlined";import{jsx as On}from"react/jsx-runtime";function W0(e,f){return f>0?`${e} (${f})`:e}var bK=[{id:"my",label:"\uC804\uCCB4",icon:On(LS,{sx:{fontSize:18}})},{id:"mine",label:"\uB0B4 \uC5C5\uBB34",icon:On(zS,{sx:{fontSize:18}})},{id:"sent",label:"\uBCF4\uB0B8 \uC5C5\uBB34",icon:On(jS,{sx:{fontSize:18}})},{id:"support",label:"\uACE0\uAC1D\uC13C\uD130",icon:On($S,{sx:{fontSize:18}})},{id:"bug",label:"\uC624\uB958",icon:On(qS,{sx:{fontSize:18}})},{id:"notice",label:"\uACF5\uC9C0\uC0AC\uD56D",icon:On(FS,{sx:{fontSize:18}})},{id:"archive",label:"\uBCF4\uAD00\uD568",icon:On(WS,{sx:{fontSize:18}}),hideCount:!0},{id:"report",label:"\uBCF4\uACE0\uC11C",icon:On(HS,{sx:{fontSize:18}}),hideCount:!0}];function US(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 yK({items:e,activeTab:f,counts:g,onChange:l,compact:o=!1}){let s=lt(),r=US(s.tabs),t=e;return o?On(AS,{sx:{display:"flex",flexWrap:"wrap",gap:1.25},children:t.map(n=>{let c=f===n.id;return On(DS,{onClick:()=>l(n.id),sx:{px:1.5,py:.75,borderRadius:1,fontSize:Br(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:W0(n.label,n.hideCount?0:g[n.id]??0)},n.id)})}):On(NS,{value:f,onChange:(n,c)=>l(c),sx:{minHeight:46,"& .MuiTabs-indicator":{display:"none"},"& .MuiTabs-flexContainer":{gap:"12px",minHeight:46}},children:t.map(n=>On(PS,{value:n.id,label:W0(n.label,n.hideCount?0:g[n.id]??0),icon:n.icon,iconPosition:"start",sx:r},n.id))})}import{useEffect as VS,useMemo as KS,useState as Uf}from"react";import{Divider as yc,ListItemIcon as an,Menu as Vf,MenuItem as Dr}from"@mui/material";import GS from"@mui/icons-material/OpenInNewOutlined";import YS from"@mui/icons-material/RestoreFromTrashOutlined";import XS from"@mui/icons-material/Check";import ZS from"@mui/icons-material/CheckCircleOutlined";import JS from"@mui/icons-material/RadioButtonUnchecked";import QS from"@mui/icons-material/SendOutlined";import eT from"@mui/icons-material/EventOutlined";import tT from"@mui/icons-material/PersonOutlineOutlined";import rT from"@mui/icons-material/ViewKanbanOutlined";import nT from"@mui/icons-material/ContentCopyOutlined";import oT from"@mui/icons-material/NextPlanOutlined";import iT from"@mui/icons-material/ContentPasteOutlined";import sT from"@mui/icons-material/ShareOutlined";import aT from"@mui/icons-material/DirectionsRunOutlined";import U0 from"@mui/icons-material/ChevronRight";import lT from"@mui/icons-material/ArchiveOutlined";import cT from"@mui/icons-material/UnarchiveOutlined";import{ConfirmDialog as V0}from"@ehfuse/alerts";import{Fragment as K0,jsx as bt,jsxs as Sr}from"react/jsx-runtime";function ZK({target:e,onClose:f,customTabs:g,sprints:l=[],myAccountSeq:o=0,onOpenDetail:s,onToggleCompleted:r,onRequestConfirm:t,onChangeDueDate:n,onChangeReminder:c,onMemberEdit:i,onMoveProject:a,onDuplicate:h,onCreateFollowUp:d,onShare:u,onAssignSprint:b,onArchiveToggle:m,onDelete:x,onRestore:k,onPurge:B}){let R=qt(),j=Jn(),[A,P]=Uf(null),[N,q]=Uf(null),[z,T]=Uf(null);VS(()=>{e||(P(null),q(null),T(null))},[e]);let S=e?.task??null,D=!!S?.is_notice,p=!!S?.is_event,y=S?!Qn(S,o):!1,{editPolicy:v}=ot(),w=S?Qo(S,o,v):!1,_=S?Ti(S,o,v,y):!1,C=S?Ti(S,o,v,!1):!1,O=!!S?.deleted,F=KS(()=>new Set(g.filter(H=>H.useSprints).map(H=>H.key)),[g]),$=async(H="one")=>{let E=S;if(f(),!E)return;await V0({title:"\uC5C5\uBB34 \uC0AD\uC81C",message:H==="series"?`"${E.title}" \uC758 \uC774 \uD68C\uCC28\uC640 \uC774\uD6C4 \uBC18\uBCF5 \uD68C\uCC28\uB97C \uBAA8\uB450 \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`:`"${E.title}" \uC5C5\uBB34\uB97C \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&x(E.seq,H)},K=async()=>{let H=S;if(f(),!H)return;await V0({title:"\uC601\uAD6C \uC0AD\uC81C",message:`"${H.title}" \uC5C5\uBB34\uB97C \uC601\uAD6C\uD788 \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C? \uB418\uB3CC\uB9B4 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.`})&&B?.(H.seq)},M=()=>{S&&m(S.seq,!S.archived),f()};return Sr(K0,{children:[Sr(Vf,{open:!!e,onClose:f,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:[Sr(Dr,{onClick:()=>{S&&s(S),f()},sx:{fontSize:14},children:[bt(an,{children:bt(GS,{sx:{fontSize:19}})}),"\uC0C1\uC138 \uC5F4\uAE30"]}),O?bt(yc,{}):null,O&&k?Sr(Dr,{disabled:C,onClick:()=>{S&&k(S.seq),f()},sx:{fontSize:14},children:[bt(an,{children:bt(YS,{sx:{fontSize:19}})}),"\uBCF5\uC6D0"]}):null,O&&B?Sr(Dr,{disabled:C,onClick:()=>{K()},sx:{fontSize:14,color:"#e5484d"},children:[bt(an,{children:bt(Ir,{sx:{fontSize:19,color:"#e5484d"}})}),"\uC601\uAD6C \uC0AD\uC81C"]}):null,O?null:Sr(K0,{children:[Sr(Dr,{disabled:D?(S?.author_account_seq??0)!==o:(S?.author_account_seq??0)!==o&&(S?.manager_account_seq??0)!==o,onClick:()=>{S&&r(S.seq,!S.completed),f()},sx:{fontSize:14},children:[bt(an,{children:S?.completed?bt(JS,{sx:{fontSize:19}}):bt(ZS,{sx:{fontSize:19}})}),S?.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC"]}),!D&&t?Sr(Dr,{disabled:!(S?.manager_account_seq??0)&&(S?.receiver_account_seqs??[]).length===0,onClick:()=>{S&&t(S),f()},sx:{fontSize:14},children:[bt(an,{children:bt(QS,{sx:{fontSize:19}})}),"\uD655\uC778 \uC694\uCCAD"]}):null,p?null:bt(yc,{}),p?null:Sr(Dr,{disabled:w,onClick:H=>{S&&P({anchorEl:H.currentTarget,task:S})},sx:{fontSize:14},children:[bt(an,{children:bt(eT,{sx:{fontSize:19}})}),"\uB9C8\uAC10\uC608\uC815 \uBCC0\uACBD"]}),!D&&!p&&i?Sr(Dr,{disabled:v==="coreAuthorManager"?w:!1,onClick:()=>{S&&i(S,"manager"),f()},sx:{fontSize:14},children:[bt(an,{children:bt(tT,{sx:{fontSize:19}})}),"\uCC45\uC784\uC790 \uBCC0\uACBD"]}):null,p?null:Sr(Dr,{disabled:w,onClick:H=>{S&&q({anchorEl:H.currentTarget,task:S})},sx:{fontSize:14},children:[bt(an,{children:bt(rT,{sx:{fontSize:19}})}),"\uD504\uB85C\uC81D\uD2B8 \uC774\uB3D9",bt(U0,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}),bt(yc,{}),h?Sr(Dr,{disabled:y,onClick:()=>{S&&h(S.seq),f()},sx:{fontSize:14},children:[bt(an,{children:bt(nT,{sx:{fontSize:19}})}),"\uBCF5\uC81C"]}):null,d&&S&&!S.is_event&&!S.is_notice?Sr(Dr,{onClick:()=>{S&&d(S.seq),f()},sx:{fontSize:14},children:[bt(an,{children:bt(oT,{sx:{fontSize:19}})}),"\uD6C4\uC18D \uC5C5\uBB34 \uB9CC\uB4E4\uAE30"]}):null,Sr(Dr,{onClick:()=>{S&&(u?u(S):ps(S,R)),f()},sx:{fontSize:14},children:[bt(an,{children:R?bt(sT,{sx:{fontSize:19}}):bt(iT,{sx:{fontSize:19}})}),R?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC"]}),S&&!S.is_notice&&!S.is_event&&F.has(String(S.tab_key??""))&&b?Sr(Dr,{onClick:H=>T(H.currentTarget),sx:{fontSize:14},children:[bt(an,{children:bt(aT,{sx:{fontSize:19}})}),"\uBAA9\uD45C\uC5D0 \uB123\uAE30",bt(U0,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}):null,Sr(Dr,{onClick:M,disabled:y||!S?.archived&&!(S&&Ka(S)),sx:{fontSize:14},children:[bt(an,{children:S?.archived?bt(cT,{sx:{fontSize:19}}):bt(lT,{sx:{fontSize:19}})}),S?.archived?"\uBCF4\uAD00 \uD574\uC81C":"\uBCF4\uAD00"]}),bt(yc,{}),Sr(Dr,{disabled:_,onClick:()=>{$("one")},sx:{fontSize:14,color:"#e5484d"},children:[bt(an,{children:bt(Ir,{sx:{fontSize:19,color:"#e5484d"}})}),(S?.repeat_group_key??0)>0?"\uC0AD\uC81C (\uC774 \uD68C\uCC28\uB9CC)":"\uC0AD\uC81C"]}),(S?.repeat_group_key??0)>0?Sr(Dr,{disabled:_,onClick:()=>{$("series")},sx:{fontSize:14,color:"#e5484d"},children:[bt(an,{children:bt(Ir,{sx:{fontSize:19,color:"#e5484d"}})}),"\uC0AD\uC81C (\uC774\uD6C4 \uBC18\uBCF5 \uC804\uCCB4)"]}):null]})]}),bt(Bn,{anchorEl:A?.anchorEl??null,open:!!A,date:A?.task.due_date??"",reminders:ro(A?.task),hideReminder:!!A?.task.completed,centered:R,onClose:()=>{P(null),f()},onDateChange:H=>{A&&n(A.task.seq,H)},onReminderChange:H=>{A&&c?.(A.task.seq,H)}}),Sr(Vf,{transitionDuration:0,anchorEl:N?.anchorEl??null,open:!!N,onClose:()=>{q(null),f()},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},...j,children:[bt(Dr,{selected:!N?.task.tab_key,onClick:()=>{N&&a(N.task.seq,""),q(null),f()},sx:{fontSize:14,minWidth:170},children:"\uC5C6\uC74C"}),g.filter(H=>!H.archived).map(H=>bt(Dr,{selected:N?.task.tab_key===H.key,onClick:()=>{N&&a(N.task.seq,H.key),q(null),f()},sx:{fontSize:14,minWidth:170},children:H.label},H.key))]}),bt(Vf,{transitionDuration:0,anchorEl:z,open:!!z,onClose:()=>T(null),anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...l.filter(H=>`custom-${H.group_seq}`===String(S?.tab_key??"")).map(H=>({seq:H.seq,label:In(H)}))].map(H=>Sr(Dr,{onClick:()=>{S&&b?.(S.seq,H.seq),T(null),f()},sx:{fontSize:14,minWidth:160,gap:1},children:[H.label,(S?.sprint_seq??0)===H.seq?bt(XS,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},H.seq))})]})}import{Checkbox as uT,Divider as fT,Menu as dT,MenuItem as G0}from"@mui/material";import{jsx as xc,jsxs as Y0}from"react/jsx-runtime";function rG({anchorEl:e,labelOptions:f,selectedKeys:g,onToggle:l,onClear:o,onClose:s}){return Y0(dT,{transitionDuration:0,anchorEl:e,open:!!e,onClose:s,children:[f.map(r=>{let t=g.includes(r.key);return Y0(G0,{onClick:()=>l(r.key),sx:{fontSize:14,minWidth:190,gap:1},children:[xc(uT,{size:"small",checked:t,sx:{p:0}}),xc(Lt,{option:r})]},r.key)}),xc(fT,{}),xc(G0,{disabled:g.length===0,onClick:()=>{o(),s()},sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}import{Divider as hT,Menu as pT,MenuItem as X0}from"@mui/material";import mT from"@mui/icons-material/Check";import gT from"@mui/icons-material/SettingsOutlined";import{jsx as Kf,jsxs as Gf}from"react/jsx-runtime";function cG(e){let{anchorEl:f,sprints:g,value:l,onSelect:o,onManage:s,onClose:r}=e;return Gf(pT,{transitionDuration:0,anchorEl:f,open:!!f,onClose:r,children:[[{seq:0,label:"\uC804\uCCB4"},{seq:-1,label:"\uBBF8\uBC30\uC815 \uC5C5\uBB34"},...g.map(t=>({seq:t.seq,label:In(t)}))].map(t=>Gf(X0,{onClick:()=>{o(t.seq),r()},sx:{fontSize:14,minWidth:180,gap:1},children:[t.label,l===t.seq?Kf(mT,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},t.seq)),Kf(hT,{}),Gf(X0,{onClick:()=>{r(),s()},sx:{fontSize:14,gap:1},children:[Kf(gT,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uAD00\uB9AC\u2026"]})]})}var bT={my:"tasks",mine:"tasks",sent:"tasks",notice:"notice",support:"support",bug:"bug",archive:"archive",done:"done",report:"report"};function yT(e){return bT[e]??"tasks"}var J0={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"},Z0=["list","calendar","month","card","kanban","sprint","timeline"],xT=["list","kanban"],vT=["list","card"];function dG(e){let f=yT(e);switch(f){case"notice":return{kind:f,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:f,viewOptions:Z0,showCreate:!0,createLabel:"\uC624\uB958 \uB4F1\uB85D",showGroupBy:!0,showSprintFilter:!0,showDateRange:!1,showHideCompleted:!0,forceFlatList:!1,columns:{bug:!0}};case"support":return{kind:f,viewOptions:xT,showCreate:!1,createLabel:"",showGroupBy:!0,showSprintFilter:!1,showDateRange:!1,showHideCompleted:!0,forceFlatList:!1,columns:{support:!0,showProject:!1}};case"archive":return{kind:f,viewOptions:vT,showCreate:!1,createLabel:"",showGroupBy:!1,showSprintFilter:!1,showDateRange:!0,showHideCompleted:!1,forceFlatList:!0,columns:{showActions:!1}};case"done":return{kind:f,viewOptions:["list"],showCreate:!1,createLabel:"",showGroupBy:!1,showSprintFilter:!1,showDateRange:!0,showHideCompleted:!1,forceFlatList:!0,columns:{showActions:!1}};case"report":return{kind:f,viewOptions:[],showCreate:!1,createLabel:"",showGroupBy:!1,showSprintFilter:!1,showDateRange:!0,showHideCompleted:!1,forceFlatList:!0,columns:{}};default:return{kind:f,viewOptions:Z0,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 wT}from"react";import{useKeyboardState as _T}from"@ehfuse/keyboard-state";var Q0=[{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 bG(e,f={}){let{enabled:g=!0,views:l}=f,{onCreateTask:o,onFocusSearch:s,onToggleHelp:r,onChangeView:t,onRefresh:n,onEscape:c}=e,i=l?l.join(","):"",a=wT(()=>{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 d of eg(i?i.split(","):void 0))h.push({key:d.key,callback:()=>t(d.view),options:{preventDefault:!0}});return h},[o,s,r,t,n,c,i]);_T(g?a:[])}function eg(e){if(!e)return Q0;let f=new Set(e);return Q0.filter(g=>f.has(g.view))}function Ca(e){return[{keys:"N",description:"\uC0C8 \uC5C5\uBB34 \uB4F1\uB85D"},{keys:"/",description:"\uAC80\uC0C9"},{keys:"R",description:"\uBAA9\uB85D \uC0C8\uB85C\uACE0\uCE68"},...eg(e).map(f=>({keys:f.key.split(" ").map(g=>g.toUpperCase()).join(" \u2192 "),description:`${J0[f.view]} \uBCF4\uAE30`})),{keys:"?",description:"\uB2E8\uCD95\uD0A4 \uB3C4\uC6C0\uB9D0"},{keys:"Esc",description:"\uB2EB\uAE30"}]}var yG=Ca();import{Box as Ba,Button as kT}from"@mui/material";import ST from"@mui/icons-material/ArrowRightAlt";import{FormDialog as TT}from"@ehfuse/mui-form-dialog";import{jsx as yi,jsxs as tg}from"react/jsx-runtime";function CT({keys:e}){return yi(Ba,{sx:{display:"flex",alignItems:"center",gap:.5,justifyContent:"flex-end"},children:e.split(" \u2192 ").map((f,g)=>tg(Ba,{sx:{display:"flex",alignItems:"center",gap:.5},children:[g>0?yi(ST,{sx:{fontSize:18,color:"#9a9a97"}}):null,yi(Ba,{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:f})]},`${f}-${g}`))})}function SG({open:e,onClose:f,views:g}){let l=Ca(g);return yi(TT,{open:e,onClose:f,maxWidth:"xs",title:"\uB2E8\uCD95\uD0A4",locale:"ko",titleIcons:{delete:{visible:!1}},tabs:{visible:!1},sectionContentPaddingTop:0,sections:[{id:"shortcuts",showTitle:!1,children:yi(Ba,{sx:{display:"grid",gridTemplateColumns:"auto 1fr",columnGap:2,rowGap:1.25,alignItems:"center",fontSize:14,color:"#37352f"},children:l.map(o=>tg(Ba,{sx:{display:"contents"},children:[yi(CT,{keys:o.keys}),yi("span",{children:o.description})]},o.keys))})}],actions:{showCancelButton:!1,right:yi(kT,{variant:"contained",onClick:f,children:"\uB2EB\uAE30"})}})}import{Fragment as Xf,useEffect as BT,useState as IT}from"react";import{Box as dr,Button as ET}from"@mui/material";import MT from"@mui/icons-material/ArrowRightAlt";import RT from"@mui/icons-material/ChevronRightRounded";import OT from"@mui/icons-material/ArrowForward";import{FormDialog as AT}from"@ehfuse/mui-form-dialog";var rg={id:"concept",tabTitle:"\uAC1C\uB150",intro:"\uC5C5\uBB34\uD568\uC740 '\uB204\uAC00 \uBB34\uC5C7\uC744 \uC5B8\uC81C\uAE4C\uC9C0 \uD558\uB294\uC9C0'\uB97C \uD55C \uACF3\uC5D0 \uBAA8\uC73C\uB294 \uB3C4\uAD6C\uC785\uB2C8\uB2E4. \uBA54\uC2E0\uC800\uC5D0 \uD769\uC5B4\uC9C4 \uC9C0\uC2DC\uC640 \uC5D1\uC140\uC5D0 \uC801\uC5B4 \uB454 \uB9C8\uAC10\uC77C \uB300\uC2E0, \uC5C5\uBB34\uB97C \uBCF4\uB0B8 \uC0AC\uB78C\uACFC \uBC1B\uC740 \uC0AC\uB78C\uC774 \uAC19\uC740 \uD654\uBA74\uC744 \uBD05\uB2C8\uB2E4.",topics:[{title:"\uC138 \uAC78\uC74C\uC774\uBA74 \uB05D",lead:"\uC5C5\uBB34 \uD558\uB098\uC758 \uC0DD\uC560\uB294 \uC774 \uC138 \uAC78\uC74C\uC785\uB2C8\uB2E4. \uB098\uBA38\uC9C0 \uAE30\uB2A5\uC740 \uC804\uBD80 \uC774 \uD750\uB984\uC744 \uB3D5\uB294 \uAC83\uC774\uB77C, \uC774\uAC83\uB9CC \uC54C\uBA74 \uCCAB\uB0A0\uBD80\uD130 \uC501\uB2C8\uB2E4.",steps:[{title:"\uB4F1\uB85D",desc:"\uC81C\uBAA9 \xB7 \uCC45\uC784\uC790 \xB7 \uB9C8\uAC10\uC608\uC815\uB9CC \uC801\uC5B4 \uBCF4\uB0C5\uB2C8\uB2E4."},{title:"\uD655\uC778",desc:"\uBC1B\uC740 \uC0AC\uB78C\uC774 \uD655\uC778\uD558\uACE0 \uCC98\uB9AC\uD55C \uB4A4 \uC644\uB8CC\uD569\uB2C8\uB2E4."},{title:"\uBCF4\uAD00",desc:"\uB05D\uB09C \uC5C5\uBB34\uB294 \uBCF4\uAD00\uD568\uC5D0 \uB0A8\uC544 \uC5B8\uC81C\uB4E0 \uB2E4\uC2DC \uCC3E\uC2B5\uB2C8\uB2E4."}]},{title:"\uC5C5\uBB34\uB97C \uB458\uB7EC\uC2FC \uC138 \uC0AC\uB78C",lead:"\uC5C5\uBB34\uB9C8\uB2E4 \uBCF4\uB0B8 \uC0AC\uB78C \uD558\uB098, \uBC1B\uC740 \uC0AC\uB78C \uD558\uB098, \uD568\uAED8 \uC54C\uC544\uC57C \uD560 \uC0AC\uB78C\uB4E4\uC774 \uC788\uC2B5\uB2C8\uB2E4. \uC138 \uC5ED\uD560\uC774 \uBAA8\uB450 '\uAD00\uC5EC\uC790'\uC774\uACE0, \uACF5\uAC1C \uBC94\uC704\uAC00 **\uBE44\uACF5\uAC1C**\uC5EC\uB3C4 \uC11C\uB85C\uC5D0\uAC8C \uBCF4\uC785\uB2C8\uB2E4. \uB204\uAC00 \uBB34\uC5C7\uC744 \uB204\uB97C \uC218 \uC788\uB294\uC9C0\uB294 **\uC5ED\uD560** \uD0ED\uC5D0 \uBAA8\uC544 \uB450\uC5C8\uC2B5\uB2C8\uB2E4.",items:[{term:"\uC791\uC131\uC790",desc:"\uC5C5\uBB34\uB97C \uBCF4\uB0B8 \uC0AC\uB78C. \uC5C5\uBB34\uC758 \uC8FC\uC778\uC785\uB2C8\uB2E4."},{term:"\uCC45\uC784\uC790",desc:"\uC5C5\uBB34\uB97C \uBC1B\uC544 \uCC98\uB9AC\uD558\uB294 \uC0AC\uB78C(\uD55C \uBA85)."},{term:"\uCC38\uC870\uC790",desc:"\uD568\uAED8 \uC54C\uC544\uC57C \uD560 \uC0AC\uB78C\uB4E4(\uC5EC\uB7EC \uBA85)."}]},{title:"\uBC1B\uC740 \uC5C5\uBB34\uC640 \uBCF4\uB0B8 \uC5C5\uBB34",lead:"\uD0ED\uC740 '\uB0B4\uAC00 \uBC1B\uC740 \uAC83'\uACFC '\uB0B4\uAC00 \uBCF4\uB0B8 \uAC83'\uC744 \uAC00\uB974\uB294 \uCD95\uC785\uB2C8\uB2E4. \uB0A8\uC774 \uC2DC\uD0A8 \uC77C\uACFC \uB0B4\uAC00 \uC2DC\uD0A8 \uC77C\uC774 \uC11E\uC774\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.",items:[{term:"\uB0B4 \uC5C5\uBB34",desc:"\uB0B4\uAC00 \uCC45\uC784\uC790\uC774\uAC70\uB098 \uCC38\uC870\uC790\uC778 \uC5C5\uBB34 \u2014 \uBC1B\uC740 \uC5C5\uBB34\uC785\uB2C8\uB2E4."},{term:"\uBCF4\uB0B8 \uC5C5\uBB34",desc:"\uB0B4\uAC00 \uB4F1\uB85D\uD574 \uB2E4\uB978 \uC0AC\uB78C\uC5D0\uAC8C \uB9E1\uAE34 \uC5C5\uBB34\uC785\uB2C8\uB2E4."},{term:"\uC804\uCCB4",desc:"\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."},{term:"\uACF5\uC9C0\uC0AC\uD56D",desc:"\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."},{term:"\uBCF4\uAD00\uD568",desc:'\uB05D\uB098\uC11C \uBCF4\uAD00\uB41C \uC5C5\uBB34\xB7\uC77C\uC815\uACFC \uD734\uC9C0\uD1B5. "\uC5C5\uBB34 \xB7 \uC77C\uC815 \u25BE" \uBA54\uB274\uB85C \uAD6C\uBD84\uC744 \uBC14\uAFD4 \uBD05\uB2C8\uB2E4.'}]},{title:"\uD655\uC778 \xB7 \uC644\uB8CC \xB7 \uAC80\uC218",subtitle:"\uC138 \uAC00\uC9C0 \uB2E4\uB978 \uB9D0",lead:"\uB2E4\uC2DC \uBB3B\uC9C0 \uC54A\uC544\uB3C4 \uB418\uB294 \uC774\uC720\uAC00 \uC5EC\uAE30 \uC788\uC2B5\uB2C8\uB2E4. \uC77D\uC5C8\uB294\uC9C0, \uB05D\uB0AC\uB294\uC9C0, \uAC80\uC218\uD588\uB294\uC9C0\uAC00 \uAC01\uAC01 \uD45C\uC2DC\uB85C \uB0A8\uC2B5\uB2C8\uB2E4.",items:[{term:"\uD655\uC778",desc:'"\uC77D\uC5C8\uB2E4". \uBC1B\uC740 \uC0AC\uB78C\uC774 **\uD655\uC778** \uBC84\uD2BC\uC744 \uB20C\uB7EC \uB0A8\uAE41\uB2C8\uB2E4. \uC544\uC9C1 \uD655\uC778\uD558\uC9C0 \uC54A\uC740 \uC5C5\uBB34\uB294 \uBAA9\uB85D \uB9E8 \uC704 **\uBBF8\uD655\uC778** \uC601\uC5ED\uC5D0 \uBAA8\uC785\uB2C8\uB2E4.'},{term:"\uC644\uB8CC",desc:'"\uB05D\uB0AC\uB2E4". \uCC45\uC784\uC790\uB098 \uC791\uC131\uC790\uAC00 \uC644\uB8CC \uCCB4\uD06C(\u25CB)\uB97C \uB204\uB985\uB2C8\uB2E4.'},{term:"\uAC80\uC218\uC644\uB8CC",desc:'"\uBD24\uB2E4, \uAD1C\uCC2E\uB2E4". \uCC45\uC784\uC790\uAC00 \uC644\uB8CC\uD55C \uC5C5\uBB34\uB294 \uC791\uC131\uC790\uC5D0\uAC8C **\uAC80\uC218 \uB300\uAE30**\uB85C \uB0A8\uACE0, \uC791\uC131\uC790\uAC00 **\uAC80\uC218\uC644\uB8CC**\uB85C \uB0B4\uB9AC\uAC70\uB098 \uBBF8\uD761\uD558\uBA74 \uC0AC\uC720\uB97C \uC801\uC5B4 **\uB418\uB3CC\uB9BD\uB2C8\uB2E4**.'}]},{title:"\uB450 \uAC1C\uC758 \uB0A0\uC9DC",lead:"\uC5C5\uBB34\uC5D0\uB294 \uC2DC\uC791\uC77C\uC2DC\uC640 \uB9C8\uAC10\uC608\uC815 \uB450 \uB0A0\uC9DC\uAC00 \uC788\uACE0, \uC54C\uB9BC\uACFC \uCE98\uB9B0\uB354\uB294 \uC804\uBD80 \uC774 \uB458\uC744 \uAE30\uC900\uC73C\uB85C \uC6C0\uC9C1\uC785\uB2C8\uB2E4.",items:[{term:"\uC2DC\uC791\uC77C\uC2DC",desc:"\uC77C\uC744 \uC2DC\uC791\uD560 \uC2DC\uC810. \uCC45\uC784\uC790 \uC54C\uB9BC\uC740 \uC774\uB54C\uBD80\uD130 \uAC11\uB2C8\uB2E4. \uBE44\uC6CC \uB450\uBA74 \uBC14\uB85C \uC2DC\uC791\uC73C\uB85C \uBD05\uB2C8\uB2E4."},{term:"\uB9C8\uAC10\uC608\uC815",desc:"\uB05D\uB0B4\uAE30\uB85C \uD55C \uC2DC\uC810. \uC0AC\uC804\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."}]}]};var ng={id:"roles",tabTitle:"\uC5ED\uD560",intro:"\uC5C5\uBB34\uB9C8\uB2E4 \uBCF4\uB0B8 \uC0AC\uB78C(\uC791\uC131\uC790) \uD558\uB098, \uBC1B\uC544 \uCC98\uB9AC\uD558\uB294 \uC0AC\uB78C(\uCC45\uC784\uC790) \uD558\uB098, \uD568\uAED8 \uC54C\uC544\uC57C \uD560 \uC0AC\uB78C\uB4E4(\uCC38\uC870\uC790)\uC774 \uC788\uC2B5\uB2C8\uB2E4. \uC14B \uB2E4 '\uAD00\uC5EC\uC790'\uB77C\uC11C \uACF5\uAC1C \uBC94\uC704\uAC00 **\uBE44\uACF5\uAC1C**\uC5EC\uB3C4 \uC11C\uB85C\uC5D0\uAC8C \uBCF4\uC785\uB2C8\uB2E4. \uB204\uAC00 \uBB34\uC5C7\uC744 \uB204\uB97C \uC218 \uC788\uB294\uC9C0\uAC00 \uC774 \uD0ED\uC758 \uB0B4\uC6A9\uC785\uB2C8\uB2E4.",topics:[{title:"\uC791\uC131\uC790",subtitle:"\uC5C5\uBB34\uC758 \uC8FC\uC778",lead:"\uC5C5\uBB34\uB97C \uB4F1\uB85D\uD55C \uC0AC\uB78C\uC785\uB2C8\uB2E4. \uB0B4\uC6A9\uC744 \uC815\uD558\uACE0 \uACB0\uACFC\uB97C \uAC80\uC218\uD558\uB294 \uC790\uB9AC\uB77C, \uC5C5\uBB34\uB97C \uC5C6\uC568 \uC218 \uC788\uB294 \uC720\uC77C\uD55C \uC5ED\uD560\uC785\uB2C8\uB2E4.",items:[{term:"\uD558\uB294 \uC77C",desc:"\uBB34\uC5C7\uC744 \uC5B8\uC81C\uAE4C\uC9C0 \uD560\uC9C0 \uC801\uC5B4 \uCC45\uC784\uC790\uC5D0\uAC8C \uBCF4\uB0C5\uB2C8\uB2E4. \uB05D\uB09C \uB4A4 \uACB0\uACFC\uB97C \uBCF4\uACE0 **\uAC80\uC218\uC644\uB8CC**\uB85C \uB0B4\uB9AC\uAC70\uB098, \uBBF8\uD761\uD558\uBA74 \uC0AC\uC720\uB97C \uC801\uC5B4 **\uB418\uB3CC\uB9BD\uB2C8\uB2E4**."},{term:"\uC218\uC815",desc:"\uC81C\uBAA9\xB7\uB9C8\uAC10\uC608\uC815\xB7\uCC45\uC784\uC790\xB7\uCC38\uC870\uC790\xB7\uB0B4\uC6A9 \uC804\uBD80 \uACE0\uCE69\uB2C8\uB2E4. \uBC14\uAFBC \uB0B4\uC6A9\uC740 \uC7A0\uC2DC \uBAA8\uC544 \uD55C \uAC74\uC758 \uC218\uC815 \uC54C\uB9BC\uC73C\uB85C \uAC11\uB2C8\uB2E4."},{term:"\uC644\uB8CC",desc:"\uC9C1\uC811 \uC644\uB8CC \uCCB4\uD06C\uB97C \uB204\uB97C \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uBCF8\uC778\uC774 \uC644\uB8CC\uD558\uBA74 \uAC80\uC218 \uB2E8\uACC4\uAC00 \uC5C6\uC5B4 \uADF8\uB300\uB85C \uB05D\uC785\uB2C8\uB2E4."},{term:"\uB418\uB3CC\uB9AC\uAE30",desc:"\uCC45\uC784\uC790\uAC00 \uC644\uB8CC\uD55C \uC5C5\uBB34\uB97C **\uAC80\uC218 \uB300\uAE30\uC778 \uB3D9\uC548\uB9CC** \uC0AC\uC720\uC640 \uD568\uAED8 \uB418\uB3CC\uB9BD\uB2C8\uB2E4. \uC0AC\uC720\uB294 \uB313\uAE00\uB85C \uB0A8\uACE0 \uC644\uB8CC\uD55C \uC0AC\uB78C\uC5D0\uAC8C \uC54C\uB9BC\uC774 \uAC11\uB2C8\uB2E4."},{term:"\uC0AD\uC81C",desc:"\uC791\uC131\uC790 \uBCF8\uC778\uB9CC \uC0AD\uC81C\uD569\uB2C8\uB2E4(\uAD00\uB9AC\uC790 \uAD8C\uD55C\uC740 \uC870\uC9C1 \uC124\uC815\uC5D0 \uB530\uB985\uB2C8\uB2E4). \uC0AD\uC81C\uD55C \uC5C5\uBB34\uB294 \uBCF4\uAD00\uD568\uC758 \uD734\uC9C0\uD1B5\uC5D0 \uB0A8\uC2B5\uB2C8\uB2E4."},{term:"\uD655\uC778",desc:"\uD655\uC778 \uB300\uC0C1\uC5D0\uC11C **\uBE60\uC9D1\uB2C8\uB2E4** \u2014 \uB0B4\uAC00 \uC4F4 \uAE00\uC744 \uB0B4\uAC00 \uC77D\uC5C8\uB2E4\uACE0 \uB0A8\uAE38 \uC77C\uC740 \uC5C6\uAE30 \uB54C\uBB38\uC785\uB2C8\uB2E4."}]},{title:"\uCC45\uC784\uC790",subtitle:"\uBC1B\uC544\uC11C \uCC98\uB9AC\uD558\uB294 \uC0AC\uB78C",lead:"\uC5C5\uBB34\uB97C \uC2E4\uC81C\uB85C \uCC98\uB9AC\uD558\uB294 \uD55C \uC0AC\uB78C\uC785\uB2C8\uB2E4. \uC5C5\uBB34\uB97C \uBC1B\uC73C\uBA74 \uC2DC\uC791\uC77C\uC2DC\uBD80\uD130 \uC54C\uB9BC\uC774 \uC624\uACE0, \uBAA9\uB85D\uC5D0\uC11C\uB294 '\uB0B4 \uC5C5\uBB34'\uB85C \uBAA8\uC785\uB2C8\uB2E4.",items:[{term:"\uD558\uB294 \uC77C",desc:"\uB0B4\uC6A9\uC744 \uD655\uC778\uD558\uACE0 \uCC98\uB9AC\uD55C \uB4A4 \uC644\uB8CC \uCCB4\uD06C(\u25CB)\uB97C \uB204\uB985\uB2C8\uB2E4. \uC644\uB8CC\uD558\uBA74 \uC791\uC131\uC790\uC5D0\uAC8C **\uAC80\uC218 \uB300\uAE30**\uB85C \uB118\uC5B4\uAC11\uB2C8\uB2E4."},{term:"\uD655\uC778",desc:'**\uD655\uC778** \uBC84\uD2BC\uC73C\uB85C "\uC77D\uC5C8\uB2E4"\uB97C \uB0A8\uAE41\uB2C8\uB2E4. \uCC45\uC784\uC790\uAC00 \uD655\uC778\uD558\uBA74 \uC791\uC131\uC790\uC5D0\uAC8C \uC54C\uB9BC\uC774 \uAC11\uB2C8\uB2E4.'},{term:"\uC218\uC815",desc:"\uACE0\uCE60 \uC218 \uC788\uC2B5\uB2C8\uB2E4 \u2014 \uC9C4\uD589\uD558\uB2E4 \uBCF4\uBA74 \uB9C8\uAC10\uC608\uC815\xB7\uB0B4\uC6A9\uC774 \uB2EC\uB77C\uC9C0\uAE30 \uB54C\uBB38\uC785\uB2C8\uB2E4. \uC0C1\uD0DC\xB7\uBE44\uACE0\xB7\uD560\uC77C\uB3C4 \uBAA9\uB85D\uC5D0\uC11C \uBC14\uB85C \uACE0\uCE69\uB2C8\uB2E4."},{term:"\uD560\uC77C\uB85C \uB098\uB204\uAE30",desc:"\uD070 \uC5C5\uBB34\uB294 \uD560\uC77C(\uCCB4\uD06C\uB9AC\uC2A4\uD2B8)\uB85C \uCABC\uAC1C\uACE0, \uD544\uC694\uD558\uBA74 \uD560\uC77C\uC744 \uBCC4\uB3C4 \uC5C5\uBB34\uB85C \uC2B9\uACA9\uD574 \uB2E4\uB978 \uC0AC\uB78C\uC5D0\uAC8C \uB9E1\uAE41\uB2C8\uB2E4."},{term:"\uC0AD\uC81C",desc:"\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uB0A8\uC774 \uB9E1\uAE34 \uC77C\uC744 \uBC1B\uC740 \uCABD\uC774 \uC5C6\uC568 \uC218\uB294 \uC5C6\uAE30 \uB54C\uBB38\uC785\uB2C8\uB2E4 \u2014 \uB418\uB3CC\uB9B4 \uC77C\uC774\uBA74 \uB313\uAE00\uB85C \uC54C\uB9BD\uB2C8\uB2E4."},{term:"\uD55C \uBA85\uBFD0",desc:"\uCC45\uC784\uC790\uB294 \uD55C \uC0AC\uB78C\uC785\uB2C8\uB2E4. \uC5EC\uB7FF\uC774 \uB098\uB220\uC57C \uD558\uB294 \uC77C\uC740 \uD560\uC77C\uB85C \uCABC\uAC1C\uAC70\uB098 \uC5C5\uBB34\uB97C \uB098\uB220 \uB4F1\uB85D\uD569\uB2C8\uB2E4."}]},{title:"\uCC38\uC870\uC790",subtitle:"\uD568\uAED8 \uC54C\uC544\uC57C \uD560 \uC0AC\uB78C\uB4E4",lead:"\uC9C1\uC811 \uCC98\uB9AC\uD558\uC9C0\uB294 \uC54A\uC9C0\uB9CC \uB0B4\uC6A9\uC744 \uC54C\uC544\uC57C \uD558\uB294 \uC0AC\uB78C\uB4E4\uC785\uB2C8\uB2E4. \uC5EC\uB7EC \uBA85\uC744 \uB458 \uC218 \uC788\uACE0, \uC77D\uC5C8\uB2E4\uB294 \uD45C\uC2DC\uB9CC \uB0A8\uAE41\uB2C8\uB2E4.",items:[{term:"\uD558\uB294 \uC77C",desc:"\uB0B4\uC6A9\uC744 \uC77D\uACE0 \uD544\uC694\uD558\uBA74 \uB313\uAE00\uB85C \uC758\uACAC\uC744 \uB2F5\uB2C8\uB2E4. **\uD655\uC778** \uBC84\uD2BC\uC73C\uB85C \uC77D\uC74C\uC744 \uB0A8\uAE41\uB2C8\uB2E4."},{term:"\uD655\uC778",desc:"\uD655\uC778 \uB300\uC0C1\uC785\uB2C8\uB2E4. \uCC38\uC870\uC790\uC758 \uD655\uC778\uC740 \uC54C\uB9BC\uC744 \uB9CC\uB4E4\uC9C0 \uC54A\uACE0 \uD655\uC778 \uD604\uD669(n/m)\uC5D0\uB9CC \uBC18\uC601\uB429\uB2C8\uB2E4 \u2014 \uC0AC\uB78C\uC774 \uB9CE\uC544 \uC54C\uB9BC\uC774 \uC2DC\uB044\uB7EC\uC6CC\uC9C0\uAE30 \uB54C\uBB38\uC785\uB2C8\uB2E4."},{term:"\uC218\uC815",desc:"\uC0C1\uD0DC\xB7\uB77C\uBCA8\xB7\uBE44\uACE0\xB7\uD560\uC77C\xB7\uCCA8\uBD80\xB7\uB313\uAE00 \uAC19\uC740 **\uC9C4\uD589 \uD56D\uBAA9**\uC740 \uCC38\uC870\uC790\uB3C4 \uC501\uB2C8\uB2E4. \uC81C\uBAA9\xB7\uB0B4\uC6A9\xB7\uC77C\uC815\xB7\uCC45\uC784\uC790\xB7\uACF5\uAC1C\uBC94\uC704 \uAC19\uC740 **\uC57D\uC18D**\uC740 \uC870\uC9C1 \uC124\uC815\uC5D0 \uB530\uB77C \uC791\uC131\uC790\xB7\uCC45\uC784\uC790\uB9CC \uACE0\uCE60 \uC218 \uC788\uC2B5\uB2C8\uB2E4(\uAE30\uBCF8\uC740 \uCC38\uC870\uC790\uB3C4 \uAC00\uB2A5). \uC644\uB8CC \uCCB4\uD06C\uB294 \uC5B8\uC81C\uB098 \uC791\uC131\uC790\xB7\uCC45\uC784\uC790\uB9CC."},{term:"\uC644\uB8CC \xB7 \uC0AD\uC81C",desc:"\uB458 \uB2E4 \uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uCC38\uC870\uB294 '\uBCF4\uB294 \uC790\uB9AC'\uC785\uB2C8\uB2E4."},{term:"\uB9C8\uAC10 \uC54C\uB9BC",desc:"\uBC1B\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4 \u2014 \uB9C8\uAC10 \uACC4\uC5F4 \uC54C\uB9BC\uC740 \uCC45\uC784\uC790\xB7\uC791\uC131\uC790\uC5D0\uAC8C\uB9CC \uAC11\uB2C8\uB2E4(\uCC38\uC870\uC790\uAE4C\uC9C0 \uBCF4\uB0B4\uBA74 \uC18C\uC74C\uC774 \uB429\uB2C8\uB2E4)."}]},{title:"\uAD8C\uD55C \uD55C\uB208\uC5D0",lead:"\uAC19\uC740 \uC5C5\uBB34\uB97C \uBCF4\uACE0 \uC788\uC5B4\uB3C4 \uB204\uB97C \uC218 \uC788\uB294 \uBC84\uD2BC\uC774 \uB2E4\uB985\uB2C8\uB2E4. \uBC84\uD2BC\uC774 \uC548 \uBCF4\uC774\uBA74 \uAD8C\uD55C\uC774 \uC5C6\uB294 \uAC83\uC785\uB2C8\uB2E4(\uC7A0\uAE34 \uCC44\uB85C \uBCF4\uC774\uC9C0 \uC54A\uACE0 \uC544\uC608 \uC228\uC2B5\uB2C8\uB2E4).",items:[{term:"\uC218\uC815",desc:"\uC9C4\uD589 \uD56D\uBAA9(\uC0C1\uD0DC\xB7\uB77C\uBCA8\xB7\uBE44\uACE0\xB7\uD560\uC77C \uB4F1)\uC740 \uAD00\uC5EC\uC790 \uC804\uC6D0. **\uC57D\uC18D**(\uC81C\uBAA9\xB7\uB0B4\uC6A9\xB7\uC77C\uC815\xB7\uBC30\uC815\xB7\uACF5\uAC1C\uBC94\uC704)\uC740 \uC870\uC9C1 \uC124\uC815\uC5D0 \uB530\uB77C \uC791\uC131\uC790\xB7\uCC45\uC784\uC790\uB85C \uC81C\uD55C\uB420 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uAD00\uC5EC\uC790\uAC00 \uC544\uB2C8\uBA74 \uC5F4\uB78C\uB9CC \uB429\uB2C8\uB2E4."},{term:"\uC644\uB8CC \xB7 \uC644\uB8CC \uD574\uC81C",desc:"\uC791\uC131\uC790 \xB7 \uCC45\uC784\uC790."},{term:"\uAC80\uC218\uC644\uB8CC \xB7 \uB418\uB3CC\uB9AC\uAE30",desc:"\uC791\uC131\uC790\uB9CC. \uB0A8\uC774 \uC644\uB8CC\uD55C \uC5C5\uBB34\uAC00 \uAC80\uC218 \uB300\uAE30\uC77C \uB54C\uB9CC \uB098\uC635\uB2C8\uB2E4."},{term:"\uC0AD\uC81C",desc:"\uC791\uC131\uC790\uB9CC."},{term:"\uD655\uC778",desc:"\uCC45\uC784\uC790 \xB7 \uCC38\uC870\uC790 \u2014 \uC791\uC131\uC790\uB294 \uC81C\uC678."},{term:"\uB313\uAE00",desc:"\uBCFC \uC218 \uC788\uB294 \uC0AC\uB78C \uB204\uAD6C\uB098."}]},{title:"\uACF5\uC9C0\uC0AC\uD56D\uC740 \uADDC\uCE59\uC774 \uB2E4\uB985\uB2C8\uB2E4",lead:"\uACF5\uC9C0\uB294 '\uB9E1\uAE30\uB294 \uC77C'\uC774 \uC544\uB2C8\uB77C '\uC54C\uB9AC\uB294 \uAE00'\uC774\uB77C \uCC45\uC784\uC790\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4. \uB300\uC0C1\uC790\uAC00 \uACE7 \uC77D\uC5B4\uC57C \uD560 \uC0AC\uB78C\uB4E4\uC785\uB2C8\uB2E4.",items:[{term:"\uC791\uC131\uC790",desc:"\uACF5\uC9C0\uB97C \uC62C\uB9B0 \uC0AC\uB78C. \uC218\uC815\xB7\uAC8C\uC2DC\uC885\uB8CC\xB7\uC0AD\uC81C\uB97C \uD63C\uC790 \uB9E1\uC2B5\uB2C8\uB2E4(\uAD00\uB9AC\uC790\uB3C4 \uB0A8\uC758 \uACF5\uC9C0\uB294 \uACE0\uCE58\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4)."},{term:"\uB300\uC0C1\uC790",desc:"\uC804 \uC9C1\uC6D0 \uB610\uB294 \uC9C0\uC815\uD55C \uC0AC\uB78C\uB4E4. **\uD655\uC778** \uBC84\uD2BC\uC73C\uB85C \uC77D\uC74C\uC744 \uB0A8\uAE30\uACE0, \uC791\uC131\uC790\uB294 \uD655\uC778 \uD604\uD669(n/m)\uC73C\uB85C \uB204\uAC00 \uC548 \uC77D\uC5C8\uB294\uC9C0 \uBD05\uB2C8\uB2E4."},{term:"\uD655\uC778 \uC54C\uB9BC",desc:"\uB300\uC0C1\uC790\uAC00 \uD655\uC778\uD574\uB3C4 \uC791\uC131\uC790\uC5D0\uAC8C \uC54C\uB9BC\uC774 \uAC00\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4 \u2014 \uC804 \uC9C1\uC6D0 \uACF5\uC9C0\uB77C\uBA74 \uC54C\uB9BC\uC774 \uC0AC\uB78C \uC218\uB9CC\uD07C \uC3DF\uC544\uC9C0\uAE30 \uB54C\uBB38\uC785\uB2C8\uB2E4."}]},{title:"\uACE0\uAC1D\uC13C\uD130 \uC5C5\uBB34\uB294 \uC791\uC131\uC790\uAC00 \uC678\uBD80\uC785\uB2C8\uB2E4",feature:"support",lead:"\uAC00\uB9F9\uC810\xB7\uD648\uD398\uC774\uC9C0\uC5D0\uC11C \uB4E4\uC5B4\uC628 \uBB38\uC758\uB294 \uC791\uC131\uC790\uAC00 \uC6B0\uB9AC \uC9C1\uC6D0\uC774 \uC544\uB2C8\uB77C, \uAD00\uC5EC\uC790 \uADDC\uCE59\uC744 \uADF8\uB300\uB85C \uC4F8 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.",items:[{term:"\uC791\uC131\uC790",desc:"\uBB38\uC758\uB97C \uB0A8\uAE34 \uACE0\uAC1D(\uC9C1\uC6D0 \uBA85\uBD80\uC5D0 \uC5C6\uB294 \uC678\uBD80 \uACC4\uC815). \uC6B0\uB9AC \uCABD \uAD00\uC5EC\uC790 \uD310\uC815\uC5D0\uC11C\uB294 \uBE60\uC9D1\uB2C8\uB2E4."},{term:"\uC218\uC815",desc:"\uC5F4\uB78C\uD560 \uC218 \uC788\uB294 \uC9C1\uC6D0 \uB204\uAD6C\uB098 \uACE0\uCE69\uB2C8\uB2E4 \u2014 \uAD00\uC5EC\uC790\uAC00 \uC5C6\uC5B4 \uC544\uBB34\uB3C4 \uC190\uB300\uC9C0 \uBABB\uD558\uBA74 \uB2F5\uBCC0\uC744 \uB2EC \uC218 \uC5C6\uAE30 \uB54C\uBB38\uC785\uB2C8\uB2E4."},{term:"\uCC45\uC784\uC790",desc:"**\uAC00\uC838\uAC00\uAE30**\uB85C \uC815\uD574\uC9D1\uB2C8\uB2E4. \uBA3C\uC800 \uC7A1\uC740 \uC0AC\uB78C\uC774 \uB2F5\uBCC0\uC744 \uB9E1\uC2B5\uB2C8\uB2E4."},{term:"\uB2F5\uBCC0",desc:"\uC9C1\uC6D0\uC774 \uB2E8 \uB313\uAE00\uC774 \uACE7 \uB2F5\uBCC0\uC785\uB2C8\uB2E4. \uACE0\uAC1D\uC5D0\uAC8C\uB294 \uB2F5\uBCC0 \uC54C\uB9BC\uB9CC \uAC00\uACE0, \uC5C5\uBB34\uD568\uC758 \uB2E4\uB978 \uC54C\uB9BC\uC740 \uAC00\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."},{term:"\uD655\uC778 \xB7 \uAC80\uC218",desc:"\uC5C6\uC2B5\uB2C8\uB2E4 \u2014 \uACE0\uAC1D\uC774 \uD655\uC778 \uBC84\uD2BC\uC744 \uB204\uB97C \uD654\uBA74\uC774 \uC5C6\uC5B4 \uD655\uC778\xB7\uAC80\uC218 \uC6CC\uD06C\uD50C\uB85C\uB97C \uD0DC\uC6B0\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}]}]};var og={id:"basics",tabTitle:"\uAE30\uBCF8 \uC0AC\uC6A9",intro:"\uB9E4\uC77C \uC4F0\uB294 \uC870\uC791\uB9CC \uBAA8\uC558\uC2B5\uB2C8\uB2E4. \uAC1C\uB150 \uD0ED\uC758 \uC138 \uAC78\uC74C \uC21C\uC11C \uADF8\uB300\uB85C\uC785\uB2C8\uB2E4.",topics:[{title:"1. \uB4F1\uB85D\uD558\uAE30",lines:["**\uC0C8\uB85C \uB9CC\uB4E4\uAE30** \uBC84\uD2BC(\uB2E8\uCD95\uD0A4 **N**) \u203A \uC81C\uBAA9 \xB7 \uCC45\uC784\uC790 \xB7 \uB9C8\uAC10\uC608\uC815\uC744 \uC801\uACE0 \uC800\uC7A5\uD569\uB2C8\uB2E4. \uB0B4\uC6A9\xB7\uCC38\uC870\uC790\xB7\uC2DC\uC791\uC77C\uC2DC\xB7\uC911\uC694\uB3C4\uB294 \uD544\uC694\uD560 \uB54C\uB9CC \uCC44\uC6C1\uB2C8\uB2E4.","**\uACF5\uAC1C \uBC94\uC704** : \uBE44\uACF5\uAC1C(\uAD00\uC5EC\uC790\uB9CC) / \uBD80\uC11C\uACF5\uAC1C / \uC804\uCCB4\uACF5\uAC1C. \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** \uC5C5\uBB34\uB294 \uB9E4\uC77C\xB7\uB9E4\uC8FC\xB7\uB9E4\uC6D4 \uD68C\uCC28\uB85C \uB9CC\uB4E4\uC5B4\uC9C0\uACE0, **\uC77C\uC815**\uC740 \uC2DC\uAC01\uC774 \uC788\uB294 \uD589\uC0AC\uB77C \uC644\uB8CC \uB300\uC2E0 \uCE98\uB9B0\uB354\uC5D0 \uB193\uC785\uB2C8\uB2E4."]},{title:"2. \uD560\uC77C \uB098\uB204\uAE30",subtitle:"\uD63C\uC790 \uD558\uAE30 \uD070 \uC5C5\uBB34\uB77C\uBA74",lead:"\uC5C5\uBB34 \uD558\uB098\uB97C \uC798\uAC8C \uCABC\uAC1C \uC9C4\uD589\uC744 \uB208\uC5D0 \uBCF4\uC774\uAC8C \uD558\uACE0, \uD544\uC694\uD558\uBA74 \uC870\uAC01\uC744 \uD300\uC6D0\uC5D0\uAC8C \uB098\uB220 \uB9E1\uAE41\uB2C8\uB2E4. \uCABC\uAC24 \uC77C\uC774 \uC544\uB2C8\uBA74 \uAC74\uB108\uB6F0\uC5B4\uB3C4 \uB429\uB2C8\uB2E4.",lines:["\uC0C1\uC138\uC758 **\uD560\uC77C**\uC5D0 \uD56D\uBAA9\uC744 \uC801\uACE0 **Enter** \uB610\uB294 \uC624\uB978\uCABD **[+]** \uB85C \uCD94\uAC00\uD569\uB2C8\uB2E4. \uCD94\uAC00\uC640 \uCCB4\uD06C\uB294 **\uB204\uAD6C\uB098** \uD560 \uC218 \uC788\uACE0(\uD568\uAED8 \uC4F0\uB294 \uCE78), \uD56D\uBAA9 \uC0AD\uC81C\uB9CC \uC218\uC815 \uAD8C\uD55C\uC774 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4.",'\uC9C4\uD589\uC740 \uBAA9\uB85D\xB7\uCE74\uB4DC\uC5D0 **"1/3"** \uCC98\uB7FC \uBCF4\uC5EC\uC11C, \uBB3B\uC9C0 \uC54A\uC544\uB3C4 \uC5B4\uB514\uAE4C\uC9C0 \uB410\uB294\uC9C0 \uB4DC\uB7EC\uB0A9\uB2C8\uB2E4. \uB370\uC2A4\uD06C\uD1B1\uC5D0\uC11C\uB294 \uD578\uB4E4\uB85C \uB04C\uC5B4 \uC21C\uC11C\uB97C \uBC14\uAFC9\uB2C8\uB2E4.',"\uD56D\uBAA9\uC5D0 \uB9C8\uC6B0\uC2A4\uB97C \uC62C\uB824 **\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30**\uB97C \uB204\uB974\uBA74 \uADF8 \uD56D\uBAA9\uC774 **\uBCC4\uB3C4 \uC5C5\uBB34**\uAC00 \uB429\uB2C8\uB2E4 \u2014 \uCC45\uC784\uC790\uC640 \uB9C8\uAC10\uC608\uC815\uC744 \uB530\uB85C \uC815\uD574 \uB098\uB220 \uB9E1\uAE38 \uC218 \uC788\uC2B5\uB2C8\uB2E4.","\uC774\uBBF8 \uC788\uB294 \uC5C5\uBB34\uB97C \uD560\uC77C\uC5D0 **\uBD99\uC77C** \uC218\uB3C4 \uC788\uC2B5\uB2C8\uB2E4(\uC785\uB825\uCE78 \uC67C\uCABD \uB9C1\uD06C \uBC84\uD2BC).","\uC5F0\uACB0\uB41C \uD56D\uBAA9\uC758 \uCCB4\uD06C\uB294 \uACE7 **\uADF8 \uC5C5\uBB34\uC758 \uC644\uB8CC**\uC785\uB2C8\uB2E4. \uADF8\uB798\uC11C \uCCB4\uD06C\uB3C4 \uADF8 \uC5C5\uBB34\uC758 \uC644\uB8CC \uAD8C\uD55C\uC774 \uC788\uB294 \uC0AC\uB78C(\uC791\uC131\uC790\xB7\uCC45\uC784\uC790)\uB9CC \uB204\uB97C \uC218 \uC788\uACE0, \uD300\uC6D0\uC774 \uC790\uAE30 \uC5C5\uBB34\uB97C \uB05D\uB0B4\uBA74 \uC774\uCABD \uD560\uC77C\uB3C4 \uC800\uC808\uB85C \uCCB4\uD06C\uB429\uB2C8\uB2E4.","\uC5F0\uACB0 \uC5C5\uBB34\uB97C \uD734\uC9C0\uD1B5\uC5D0 \uBCF4\uB0B4\uBA74 \uD560\uC77C\uC5D0\uC11C\uB3C4 \uD568\uAED8 \uBE60\uC9D1\uB2C8\uB2E4."]},{title:"3. \uC5F4\uC5B4 \uBCF4\uACE0 \uB300\uD654\uD558\uAE30",lines:["\uD589\uC744 \uB204\uB974\uBA74 \uC624\uB978\uCABD\uC5D0 \uC0C1\uC138\uAC00 \uC5F4\uB9BD\uB2C8\uB2E4(\uBAA8\uBC14\uC77C\uC740 \uC804\uCCB4 \uD654\uBA74). \uC81C\uBAA9\uACFC \uC18D\uC131\uC740 \uADF8 \uC790\uB9AC\uC5D0\uC11C \uB20C\uB7EC \uACE0\uCE69\uB2C8\uB2E4.","\uC5C5\uBB34 \uB300\uD654\uB294 **\uB313\uAE00**\uB85C \uD569\uB2C8\uB2E4. \uD30C\uC77C\uC744 \uBD99\uC774\uACE0, **\uD655\uC778(\u2713)\xB7\uC88B\uC544\uC694** \uBC18\uC751\uC73C\uB85C \uC77D\uC5C8\uC74C\uC744 \uB0A8\uAE41\uB2C8\uB2E4. \uB313\uAE00\uC740 \uC791\uC131\uC790\uC640 \uC9C1\uC804 \uB313\uAE00 \uC791\uC131\uC790\uC5D0\uAC8C \uC54C\uB9BC\uC774 \uAC00\uC11C \uB2F5\uAE00 \uD750\uB984\uC774 \uB04A\uAE30\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.","**\uD65C\uB3D9** \uC544\uC774\uCF58\uC5D0\uC11C \uB4F1\uB85D\xB7\uC218\uC815\xB7\uD655\uC778\xB7\uC644\uB8CC \uC774\uB825\uC744 \uBD05\uB2C8\uB2E4. \uBAA8\uBC14\uC77C \uC0C1\uC138\uB294 **\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:"4. \uD655\uC778\uD558\uAE30",lines:["\uBC1B\uC740 \uC5C5\uBB34\uB294 **\uD655\uC778** \uBC84\uD2BC\uC73C\uB85C \uC77D\uC74C\uC744 \uB0A8\uAE41\uB2C8\uB2E4. \uD655\uC778 \uC804 \uC5C5\uBB34\uB294 \uBAA9\uB85D \uB9E8 \uC704 **\uBBF8\uD655\uC778** \uC601\uC5ED(\uBAA8\uBC14\uC77C\uC740 \uBBF8\uD655\uC778 \uADF8\uB8F9)\uC5D0 \uBAA8\uC5EC \uC788\uC2B5\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."]},{title:"5. \uC9C4\uD589\uD558\uACE0 \uC644\uB8CC\uD558\uAE30",lines:["\uC0C1\uD0DC \uCE69\uC744 \uB204\uB974\uBA74 \uC2DC\uC791\uC804 \u203A \uC9C4\uD589\uC911 \u203A \uBCF4\uB958\uB97C \uACE0\uB985\uB2C8\uB2E4.","\uC644\uB8CC \uCCB4\uD06C(\u25CB)\uB294 **\uC791\uC131\uC790\uC640 \uCC45\uC784\uC790\uB9CC** \uB204\uB97C \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uB9C8\uAC10\uC608\uC815\uC774 \uBE44\uC5B4 \uC788\uC73C\uBA74 \uC644\uB8CC \uC2DC\uAC01\uC73C\uB85C \uCC44\uC6CC\uC9D1\uB2C8\uB2E4."]},{title:"6. \uAC80\uC218\uD558\uAE30",subtitle:"\uAC80\uC218\uC644\uB8CC \xB7 \uB418\uB3CC\uB9AC\uAE30",lines:["\uCC45\uC784\uC790\uAC00 \uC644\uB8CC\uD558\uBA74 \uC791\uC131\uC790\uC758 \uBAA9\uB85D \uB9E8 \uC704\uC5D0 **\uAC80\uC218 \uB300\uAE30**\uB85C \uB0A8\uC2B5\uB2C8\uB2E4(\uC644\uB8CC \uC228\uAE30\uAE30\uC640 \uBB34\uAD00, \uBAA8\uBC14\uC77C\uC740 \uBBF8\uD655\uC778 \uADF8\uB8F9).","\uACB0\uACFC\uAC00 \uAD1C\uCC2E\uC73C\uBA74 **\uAC80\uC218\uC644\uB8CC** \uBC84\uD2BC\uC73C\uB85C \uB0B4\uB9BD\uB2C8\uB2E4. \uBBF8\uD761\uD558\uBA74 \uC644\uB8CC \uCCB4\uD06C\uB97C \uD574\uC81C(\uC0C1\uC138\uC758 **\uB418\uB3CC\uB9AC\uAE30**)\uD558\uBA70 \uC0AC\uC720\uB97C \uC801\uC2B5\uB2C8\uB2E4 \u2014 \uC0AC\uC720\uB294 \uB313\uAE00\uB85C \uB0A8\uACE0, \uC0C1\uD0DC\uB294 \uC9C4\uD589\uC911\uC73C\uB85C \uB3CC\uC544\uAC00\uACE0, \uC644\uB8CC\uD55C \uC0AC\uB78C\uC5D0\uAC8C \uC54C\uB9BC\uC774 \uAC11\uB2C8\uB2E4.","**\uB418\uB3CC\uB9AC\uAE30\uB294 \uAC80\uC218 \uC804\uC5D0\uB9CC** \uB098\uC635\uB2C8\uB2E4 \u2014 \uAC80\uC218\uC644\uB8CC\uB97C \uB204\uB978 \uB4A4\uC5D0\uB294 \uC0AC\uC720 \uC5C6\uC774 \uB0B4\uB9AC\uB294 **\uC644\uB8CC \uD574\uC81C**\uB85C \uBC14\uB01D\uB2C8\uB2E4.","\uBCF8\uC778\uC774 \uC644\uB8CC\uD55C \uC5C5\uBB34\uB294 \uAC80\uC218 \uB300\uC0C1\uC774 \uC544\uB2C8\uB77C \uCC98\uC74C\uBD80\uD130 **\uC644\uB8CC \uD574\uC81C**\uC785\uB2C8\uB2E4."]},{title:"7. \uBCF4\uAD00\uD558\uAE30 \xB7 \uC0AD\uC81C\uD558\uAE30",lines:["\uC644\uB8CC\uD55C \uC5C5\uBB34\uB294 \uC124\uC815 \uAE30\uAC04(\uAE30\uBCF8 7\uC77C) \uB4A4 \uC0C8\uBCBD\uC5D0 \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\uB0B4\uACE0, \uBCF4\uAD00\uD568\uC758 **\uBCF4\uAD00 \uD574\uC81C**\uB85C \uB418\uB3CC\uB9BD\uB2C8\uB2E4.","\uC0AD\uC81C\uB294 \uC791\uC131\uC790\uB9CC \uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4(\uC0C1\uC138\uC758 \uD734\uC9C0\uD1B5 \uC544\uC774\uCF58). \uC9C0\uC6B4 \uC5C5\uBB34\uB294 **\uD734\uC9C0\uD1B5**\uC5D0\uC11C \uB418\uC0B4\uB9B4 \uC218 \uC788\uACE0, \uC124\uC815 \uAE30\uAC04(\uAE30\uBCF8 90\uC77C) \uB4A4 \uC601\uAD6C \uC0AD\uC81C\uB429\uB2C8\uB2E4.",'\uBC18\uBCF5 \uC5C5\uBB34\uB294 \uC644\uB8CC\xB7\uC0AD\uC81C\uD560 \uB54C "\uC774 \uD68C\uCC28\uB9CC / \uC774\uD6C4 \uC804\uCCB4"\uB97C \uACE0\uB985\uB2C8\uB2E4.']}]};var ig={id:"notify",tabTitle:"\uC54C\uB9BC",intro:"\uC54C\uB9BC\uC740 \uBCA8(\uC5C5\uBB34\uD568 \uC548)\uACFC \uC571 \uD478\uC2DC \uB450 \uAC08\uB798\uB85C \uAC11\uB2C8\uB2E4. \uC544\uB798 \uD45C\uC758 '\uBC1B\uB294 \uC0AC\uB78C'\uC5D0 \uC5C6\uC73C\uBA74 \uADF8 \uC77C\uC774 \uC77C\uC5B4\uB098\uB3C4 \uC54C\uB9BC\uC774 \uC624\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4 \u2014 \uC54C\uB9BC\uC744 \uC904\uC774\uB294 \uCABD\uC73C\uB85C \uC815\uD55C \uADDC\uCE59\uC774 \uB9CE\uC544, \uAD00\uC5EC\uC790\uB77C\uACE0 \uC804\uBD80 \uBC1B\uB294 \uAC83\uC740 \uC544\uB2D9\uB2C8\uB2E4.",topics:[{title:"\uC5C5\uBB34\uB97C \uB9E1\uACE0 \uBC1B\uC744 \uB54C",items:[{term:"\uCC45\uC784\uC790\uB85C \uC9C0\uC815",desc:"\uC0C8 **\uCC45\uC784\uC790**\uC5D0\uAC8C. \uCC45\uC784\uC790\uB97C \uBC14\uAFB8\uBA74 \uC0C8 \uCC45\uC784\uC790\uB9CC \uBC1B\uC2B5\uB2C8\uB2E4."},{term:"\uCC38\uC870\uC790\uB85C \uCD94\uAC00",desc:"\uC0C8\uB85C \uCD94\uAC00\uB41C **\uCC38\uC870\uC790**\uC5D0\uAC8C\uB9CC. \uC6D0\uB798 \uC788\uB358 \uCC38\uC870\uC790\uB294 \uBC1B\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."},{term:"\uC2DC\uC791\uC77C\uC2DC \uB3C4\uB2EC",desc:"**\uCC45\uC784\uC790**\uC5D0\uAC8C. \uC2DC\uC791\uC77C\uC2DC\uAC00 \uB418\uBA74 \uC790\uB3D9\uC73C\uB85C \uAC11\uB2C8\uB2E4."},{term:"\uC77C\uC815 \uCD08\uB300",desc:"\uC77C\uC815\uC758 **\uCC38\uC11D\uC790**\uC5D0\uAC8C."}]},{title:"\uD655\uC778 \xB7 \uC644\uB8CC \xB7 \uAC80\uC218",items:[{term:"\uCC45\uC784\uC790\uAC00 \uD655\uC778",desc:"**\uC791\uC131\uC790**\uC5D0\uAC8C. \uBC1B\uC740 \uC0AC\uB78C\uC774 \uC77D\uC5C8\uB2E4\uB294 \uC2E0\uD638\uC785\uB2C8\uB2E4."},{term:"\uCC38\uC870\uC790\uAC00 \uD655\uC778",desc:"\uC544\uBB34\uC5D0\uAC8C\uB3C4 \uAC00\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4 \u2014 \uCC38\uC870\uC790\uAC00 \uC5EC\uB7EC \uBA85\uC774\uB77C \uC0AC\uB78C \uC218\uB9CC\uD07C \uC54C\uB9BC\uC774 \uC3DF\uC544\uC9C0\uAE30 \uB54C\uBB38\uC785\uB2C8\uB2E4. \uD655\uC778 \uD604\uD669(n/m)\uC73C\uB85C\uB9CC \uBD05\uB2C8\uB2E4."},{term:"\uD655\uC778 \uC694\uCCAD(\uB9AC\uB9C8\uC778\uB4DC)",desc:"\uC544\uC9C1 **\uD655\uC778\uD558\uC9C0 \uC54A\uC740 \uB300\uC0C1\uC790**\uC5D0\uAC8C\uB9CC. \uC774\uBBF8 \uD655\uC778\uD55C \uC0AC\uB78C\uC740 \uBC1B\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."},{term:"\uC644\uB8CC \uCC98\uB9AC",desc:"**\uC791\uC131\uC790 + \uCC38\uC870\uC790**\uC5D0\uAC8C. \uC644\uB8CC\uB97C \uB204\uB978 \uC0AC\uB78C \uBCF8\uC778\uC740 \uC81C\uC678\uB429\uB2C8\uB2E4."},{term:"\uAC80\uC218\uC644\uB8CC",desc:"\uC544\uBB34\uC5D0\uAC8C\uB3C4 \uAC00\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4 \u2014 \uC2B9\uC778\uC774 \uC544\uB2C8\uB77C \uC791\uC131\uC790 \uD654\uBA74\uC758 \uD45C\uC2DC\uB97C \uB0B4\uB9AC\uB294 \uAC83\uC77C \uBFD0\uC785\uB2C8\uB2E4."},{term:"\uB418\uB3CC\uB9AC\uAE30",desc:"**\uC644\uB8CC\uB97C \uCC98\uB9AC\uD55C \uC0AC\uB78C**(\uBCF4\uD1B5 \uCC45\uC784\uC790)\uC5D0\uAC8C. \uC0AC\uC720\uAC00 \uD568\uAED8 \uC804\uB2EC\uB418\uACE0 \uB313\uAE00\uB85C\uB3C4 \uB0A8\uC2B5\uB2C8\uB2E4."}]},{title:"\uB9C8\uAC10 \uAD00\uB828",lead:"\uB9C8\uAC10 \uACC4\uC5F4\uC740 \uC804\uBD80 \uCC45\uC784\uC790\uC640 \uC791\uC131\uC790\uC5D0\uAC8C\uB9CC \uAC11\uB2C8\uB2E4. \uCC38\uC870\uC790\uB294 \uB9C8\uAC10 \uC54C\uB9BC\uC744 \uBC1B\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4 \u2014 \uCC38\uC870\uAE4C\uC9C0 \uBCF4\uB0B4\uBA74 \uC54C\uB9BC\uC774 \uC18C\uC74C\uC774 \uB429\uB2C8\uB2E4.",items:[{term:"\uB9C8\uAC10 \uC0AC\uC804\uC54C\uB9BC",desc:"**\uCC45\uC784\uC790 + \uC791\uC131\uC790**\uC5D0\uAC8C. \uC5C5\uBB34\uB9C8\uB2E4 \uACE0\uB978 \uC2DC\uC810(\uC608: 1\uC77C \uC804)\uC5D0 \uAC11\uB2C8\uB2E4."},{term:"\uB9C8\uAC10 \uB2F9\uC77C",desc:"**\uCC45\uC784\uC790 + \uC791\uC131\uC790**\uC5D0\uAC8C."},{term:"\uB9C8\uAC10 \uACBD\uACFC(\uC9C0\uC5F0)",desc:"**\uCC45\uC784\uC790 + \uC791\uC131\uC790**\uC5D0\uAC8C. \uB9C8\uAC10\uC774 \uC9C0\uB0AC\uB294\uB370 \uC644\uB8CC\uB418\uC9C0 \uC54A\uC740 \uC5C5\uBB34\uC785\uB2C8\uB2E4."},{term:"\uCC38\uC870\uC790",desc:"\uC704 \uC14B \uBAA8\uB450 \uBC1B\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}]},{title:"\uB313\uAE00 \xB7 \uBC18\uC751",lead:"\uB313\uAE00 \uC54C\uB9BC\uC740 \uAD00\uC5EC\uC790 \uC804\uC6D0\uC5D0\uAC8C \uBCF4\uB0B4\uB2E4\uAC00 \uC54C\uB9BC \uD3ED\uC8FC\uB85C \uC904\uC600\uC2B5\uB2C8\uB2E4. \uC9C0\uAE08\uC740 '\uB300\uD654\uC5D0 \uC9C1\uC811 \uC5BD\uD78C \uC0AC\uB78C'\uB9CC \uBC1B\uC2B5\uB2C8\uB2E4.",items:[{term:"\uC77C\uBC18 \uB313\uAE00",desc:"\uC5C5\uBB34 **\uC791\uC131\uC790 + \uC9C1\uC804 \uB313\uAE00 \uC791\uC131\uC790**\uC5D0\uAC8C."},{term:"\uC791\uC131\uC790\uAC00 \uC790\uAE30 \uC5C5\uBB34\uC5D0 \uB313\uAE00",desc:"**\uCC45\uC784\uC790 + \uC9C1\uC804 \uB313\uAE00 \uC791\uC131\uC790**\uC5D0\uAC8C."},{term:"\uCC45\uC784\uC790 \uC5C6\uB294 \uC5C5\uBB34\uC758 \uB313\uAE00",desc:"\uC704\uC5D0 \uB354\uD574 **\uCC38\uC870\uC790 \uC804\uC6D0**\uC5D0\uAC8C. \uB204\uAC00 \uB9E1\uC744\uC9C0 \uC815\uD558\uB294 \uB300\uD654\uB77C \uCC38\uC870\uC790\uB4E4\uC774 \uC54C\uC544\uC57C \uD558\uAE30 \uB54C\uBB38\uC785\uB2C8\uB2E4. \uCC45\uC784\uC790\uAC00 \uC815\uD574\uC9C0\uBA74 \uB2E4\uC2DC \uBE60\uC9D1\uB2C8\uB2E4."},{term:"\uB313\uAE00 \uC88B\uC544\uC694 \xB7 \uD655\uC778",desc:"\uADF8 **\uB313\uAE00\uC744 \uC4F4 \uC0AC\uB78C**\uC5D0\uAC8C\uB9CC."},{term:"\uACF5\uC9C0 \uB313\uAE00",desc:"**\uC9C1\uC804 \uB313\uAE00 \uC791\uC131\uC790**\uC5D0\uAC8C\uB9CC \u2014 \uB300\uC0C1\uC790\uAC00 \uC804 \uC9C1\uC6D0\uC774\uB77C \uD655\uC7A5 \uADDC\uCE59\uC744 \uC801\uC6A9\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}]},{title:"\uB0B4\uC6A9\uC774 \uBC14\uB014 \uB54C",lead:"\uC218\uC815 \uC54C\uB9BC\uC740 \uACE7\uBC14\uB85C \uBCF4\uB0B4\uC9C0 \uC54A\uACE0, \uD3B8\uC9D1\uC774 \uB05D\uB098 \uC870\uC6A9\uD574\uC9C4 \uB4A4 \uD55C \uAC74\uC73C\uB85C \uBAA8\uC544 \uBCF4\uB0C5\uB2C8\uB2E4 \u2014 \uACE0\uCE58\uB294 \uB3C4\uC911\uC5D0 \uC54C\uB9BC\uC774 \uC5EC\uB7EC \uBC88 \uAC00\uC9C0 \uC54A\uAC8C \uD558\uB824\uB294 \uAC83\uC785\uB2C8\uB2E4.",items:[{term:"\uC77C\uBC18 \uC5C5\uBB34 \uC218\uC815",desc:"**\uCC45\uC784\uC790 + \uC791\uC131\uC790**\uC5D0\uAC8C. \uB204\uAC00 \uACE0\uCCE4\uB4E0 \uB098\uBA38\uC9C0 \uD55C\uCABD\uC774 \uBC1B\uC2B5\uB2C8\uB2E4(\uACE0\uCE5C \uC0AC\uB78C \uBCF8\uC778\uC740 \uC81C\uC678). \uCC38\uC870\uC790\uB294 \uC81C\uC678\uB429\uB2C8\uB2E4."},{term:"\uACF5\uC9C0 \uC218\uC815",desc:"**\uC791\uC131\uC790 + \uB300\uC0C1\uC790**\uC5D0\uAC8C."},{term:"\uD569\uC0B0 \uBC1C\uC1A1",desc:"\uC5EC\uB7EC \uD544\uB4DC\uB97C \uC5F0\uB2EC\uC544 \uACE0\uCCD0\uB3C4 \uD55C \uAC74\uC73C\uB85C \uBB36\uC5EC \uAC11\uB2C8\uB2E4. \uBB34\uC5C7\uC774 \uC5B4\uB5BB\uAC8C \uBC14\uB00C\uC5C8\uB294\uC9C0 \uC694\uC57D\uC774 \uB2F4\uAE41\uB2C8\uB2E4."},{term:"\uC54C\uB9BC\uC774 \uC548 \uAC00\uB294 \uBCC0\uACBD",desc:"\uC644\uB8CC \xB7 \uBCF4\uAD00 \xB7 \uC815\uB82C \uC21C\uC11C \xB7 \uCC45\uC784\uC790/\uCC38\uC870\uC790 \uBCC0\uACBD \u2014 \uAC01\uAC01 \uC804\uC6A9 \uC54C\uB9BC\uC774 \uB530\uB85C \uC788\uC5B4 \uC218\uC815 \uC54C\uB9BC\uC73C\uB85C\uB294 \uC138\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."},{term:"\uD560\uC77C(\uCCB4\uD06C\uB9AC\uC2A4\uD2B8) \uBCC0\uACBD",desc:"\uC218\uC815 \uC54C\uB9BC\uACFC \uAC19\uC740 **\uCC45\uC784\uC790 + \uC791\uC131\uC790**\uC5D0\uAC8C. \uBB34\uC5C7\uC744 \uCD94\uAC00\xB7\uC0AD\uC81C\xB7\uC218\uC815\uD588\uB294\uC9C0 \uAD6C\uCCB4\uC801\uC73C\uB85C \uB2F4\uAE41\uB2C8\uB2E4. \uCCB4\uD06C\uB9CC \uCF1C\uACE0 \uB044\uAC70\uB098 \uC21C\uC11C\uB9CC \uBC14\uAFB8\uBA74 \uC54C\uB9BC\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}]},{title:"\uACF5\uC9C0\uC0AC\uD56D",items:[{term:"\uACF5\uC9C0 \uB4F1\uB85D",desc:"**\uB300\uC0C1\uC790 \uC804\uC6D0**\uC5D0\uAC8C(\uC804 \uC9C1\uC6D0 \uB610\uB294 \uC9C0\uC815\uD55C \uC0AC\uB78C\uB4E4)."},{term:"\uB300\uC0C1\uC790 \uCD94\uAC00",desc:"\uC0C8\uB85C \uCD94\uAC00\uB41C **\uB300\uC0C1\uC790**\uC5D0\uAC8C\uB9CC."},{term:"\uB300\uC0C1\uC790\uAC00 \uD655\uC778",desc:"\uC544\uBB34\uC5D0\uAC8C\uB3C4 \uAC00\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uC791\uC131\uC790\uB294 \uD655\uC778 \uD604\uD669(n/m)\uC73C\uB85C \uBD05\uB2C8\uB2E4."}]},{title:"\uC54C\uC544 \uB450\uBA74 \uC88B\uC740 \uAC83",items:[{term:"\uB0B4 \uD589\uB3D9\uC740 \uC81C\uC678",desc:"\uB0B4\uAC00 \uB204\uB978 \uC77C\uB85C\uB294 \uB098\uC5D0\uAC8C \uC54C\uB9BC\uC774 \uC624\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4 \u2014 \uB0B4\uAC00 \uC644\uB8CC\uD588\uC73C\uBA74 \uB098\uB294 \uC644\uB8CC \uC54C\uB9BC\uC744 \uBC1B\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."},{term:"\uC2DC\uC791 \uC804\uC5D0\uB294 \uBCA8\uB9CC",desc:"\uC2DC\uC791\uC77C\uC2DC\uAC00 \uC544\uC9C1 \uC548 \uB41C \uC5C5\uBB34\uC758 \uCC45\uC784\uC790 \uB300\uC0C1 \uC54C\uB9BC\uC740 \uBCA8\uC5D0\uB9CC \uC313\uC774\uACE0 \uC571 \uD478\uC2DC\uB294 \uAC00\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uC2DC\uC791\uC77C\uC2DC\uBD80\uD130 \uD478\uC2DC\uAC00 \uC624\uAE30 \uC2DC\uC791\uD569\uB2C8\uB2E4(\uC77C\uC815\xB7\uACF5\uC9C0\uB294 \uC608\uC678 \uC5C6\uC774 \uBC14\uB85C)."},{term:"\uC885\uB958\uBCC4\uB85C \uB044\uAE30",desc:"**\uB0B4 \uC815\uBCF4 \u203A \uC54C\uB9BC \uC124\uC815**\uC5D0\uC11C \uC885\uB958\uBCC4\uB85C \uC218\uC2E0\uC744 \uB055\uB2C8\uB2E4. \uB048 \uC885\uB958\uB294 \uBCA8\xB7\uD478\uC2DC \uBAA8\uB450 \uC624\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4 \u2014 \uB2E4\uB9CC \uD655\uC778 \uC694\uCCAD\uC740 \uB04C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},{term:"\uC54C\uB9BC\uD1A1\uC740 \uC5C6\uC74C",desc:"\uC5C5\uBB34\uD568 \uC54C\uB9BC\uC740 \uBCA8\uACFC \uC571 \uD478\uC2DC\uBFD0\uC785\uB2C8\uB2E4 \u2014 \uBB38\uC790\xB7\uC54C\uB9BC\uD1A1\uC73C\uB85C\uB294 \uAC00\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}]}]};var sg={id:"more",tabTitle:"\uB354 \uC54C\uC544\uBCF4\uAE30",intro:"\uC775\uC219\uD574\uC9C4 \uB4A4\uC5D0 \uC4F0\uBA74 \uC88B\uC740 \uAE30\uB2A5\uB4E4\uC785\uB2C8\uB2E4. \uC5C5\uBB34\uD568 \uC124\uC815\uC5D0\uC11C \uB048 \uAE30\uB2A5\uC740 \uC5EC\uAE30\uC5D0\uB3C4 \uBCF4\uC774\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.",topics:[{title:"\uBCF4\uAE30 \uBC14\uAFB8\uAE30",lead:"\uAC19\uC740 \uC5C5\uBB34\uB97C \uBAA9\uB85D \xB7 \uD504\uB85C\uC81D\uD2B8 \xB7 \uC0C1\uD0DC \xB7 \uC8FC\uAC04 \xB7 \uC6D4\uAC04\uC73C\uB85C \uB2E4\uB974\uAC8C \uBD05\uB2C8\uB2E4. \uD5E4\uB354 \uC624\uB978\uCABD \uBC84\uD2BC\uC73C\uB85C \uBC14\uAFB8\uACE0 \uD0ED\uB9C8\uB2E4 \uB530\uB85C \uAE30\uC5B5\uB429\uB2C8\uB2E4(\uB2E8\uCD95\uD0A4 **G** \uB2E4\uC74C \uAE00\uC790\uD0A4).",lines:["**\uBAA9\uB85D** : \uC5F4 \uC81C\uBAA9\uC744 \uB204\uB974\uBA74 \uC815\uB82C(\uC81C\uBAA9\xB7\uB0A0\uC9DC) \uB610\uB294 \uD544\uD130(\uC0C1\uD0DC\xB7\uD655\uC778\xB7\uCC45\uC784\uC790\xB7\uD504\uB85C\uC81D\uD2B8\xB7\uC911\uC694\uB3C4)\uAC00 \uC5F4\uB9BD\uB2C8\uB2E4. **\uADF8\uB8F9** \uBA54\uB274\uB85C \uBB36\uB294 \uAE30\uC900\uC744 \uBC14\uAFB8\uACE0, \uADF8\uB8F9 \uBA38\uB9AC\uC904 **+** \uB85C \uADF8 \uADF8\uB8F9\uC5D0 \uBC14\uB85C \uB4F1\uB85D\uD569\uB2C8\uB2E4.","**\uD504\uB85C\uC81D\uD2B8 \xB7 \uC0C1\uD0DC \xB7 \uBAA9\uD45C** \uBCF4\uAE30\uB294 \uCE74\uB4DC\uB97C \uCEEC\uB7FC\uC5D0 \uC138\uC6C1\uB2C8\uB2E4 \u2014 \uC81C\uBAA9 \uC55E **\u22EE\u22EE \uD578\uB4E4**\uB85C \uB04C\uC5B4 \uB2E4\uB978 \uCEEC\uB7FC\uC73C\uB85C \uC62E\uAE30\uACE0, \uCEEC\uB7FC **\u22EE** \uBA54\uB274\uC5D0 \uB4F1\uB85D\xB7\uC218\uC815\xB7\uBCF4\uAD00\xB7\uC0AD\uC81C\uAC00 \uC788\uC2B5\uB2C8\uB2E4.","**\uC8FC\uAC04\xB7\uC6D4\uAC04** : \uB9C8\uAC10\uC608\uC815(\uC77C\uC815\uC740 \uC77C\uC2DC) \uAE30\uC900\uC73C\uB85C \uB193\uC774\uACE0, \uCE74\uB4DC\uB97C \uB2E4\uB978 \uB0A0\uB85C \uB04C\uBA74 \uB0A0\uC9DC\uAC00 \uBC14\uB01D\uB2C8\uB2E4. \uBE48 \uCE78\uC5D0 \uC62C\uB9AC\uBA74 \uADF8 \uB0A0\uC9DC\uB85C \uBC14\uB85C \uB4F1\uB85D\uD569\uB2C8\uB2E4. \uBC14\uAE65 \uCE98\uB9B0\uB354\uC640 \uC8FC\uACE0\uBC1B\uB294 \uBC29\uBC95\uC740 **\uC678\uBD80 \uCE98\uB9B0\uB354 \uC5F0\uB3D9** \uD0ED\uC5D0 \uC788\uC2B5\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 \uBD05\uB2C8\uB2E4. \uC5C5\uBB34 \uC544\uB798 \uD560\uC77C \uC904\uC774 \uD3BC\uCCD0\uC9C0\uACE0, \uC67C\uCABD \uC5C5\uBB34\uBA85 \uC904\uC758 \uD578\uB4E4\uB85C \uC21C\uC11C\uB97C \uBC14\uAFC9\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\uC744, \uBAA9\uD45C\uB97C \uC4F0\uBA74 \uBCA8\uB85C\uC2DC\uD2F0\xB7\uBC88\uB2E4\uC6B4\uC744 \uBD05\uB2C8\uB2E4. \uC778\uC6D0 \uC6A9\uB7C9\uC740 \uCC28\uD2B8 \uC548 \uC124\uC815 \uC544\uC774\uCF58\uC5D0\uC11C \uC815\uD569\uB2C8\uB2E4."]},{title:"\uAC80\uC0C9\uACFC \uD544\uD130",lines:["\uAC80\uC0C9\uCE78(\uB2E8\uCD95\uD0A4 **/**)\uC740 \uC81C\uBAA9\xB7\uBE44\uACE0\uB97C \uCC3E\uC2B5\uB2C8\uB2E4. \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 \xB7 \uCC45\uC784\uC790 \xB7 \uD504\uB85C\uC81D\uD2B8 \xB7 \uC911\uC694\uB3C4** \uBC84\uD2BC\uC740 \uCCB4\uD06C \uBA54\uB274\uAC00 \uC5F4\uB9AC\uACE0 \uAC78\uB9B0 \uAC1C\uC218\uAC00 \uBC84\uD2BC\uC5D0 \uD45C\uC2DC\uB429\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 \uAC70\uB974\uACE0, \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."]},{title:"\uD5E4\uB354 \uC2A4\uC704\uCE58",lines:["**\uC644\uB8CC \uC228\uAE30\uAE30** : \uB05D\uB09C \uC5C5\uBB34\uB97C \uBAA8\uB4E0 \uBCF4\uAE30(\uD560\uC77C \uD3EC\uD568)\uC5D0\uC11C \uAC10\uCDA5\uB2C8\uB2E4.","**\uBAA8\uB4E0 \uC9C1\uC6D0** : (\uD5C8\uC6A9 \uACC4\uC815) \uAD00\uC5EC \uC5EC\uBD80\uC640 \uC0C1\uAD00\uC5C6\uC774 \uC804 \uC9C1\uC6D0\uC758 \uC5C5\uBB34\uB97C \uBD05\uB2C8\uB2E4. **\uC678\uBD80 \uCE98\uB9B0\uB354 \uC77C\uC815** : \uAC00\uC838\uC628 \uC77C\uC815\uC744 \uCE98\uB9B0\uB354\uC5D0 \uD568\uAED8 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4(**\uC678\uBD80 \uCE98\uB9B0\uB354 \uC5F0\uB3D9** \uD0ED \uCC38\uACE0).","\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:"\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\xB7\uBAA9\uD45C\uC5D0 \uB123\uAE30\xB7\uBCF4\uAD00\xB7\uC0AD\uC81C\uB97C \uBC14\uB85C \uC2E4\uD589\uD569\uB2C8\uB2E4."]},{title:"\uD504\uB85C\uC81D\uD2B8",feature:"project",lines:["\uC5C5\uBB34\uB97C \uBB36\uB294 \uB2E8\uC704\uC785\uB2C8\uB2E4. **\uD504\uB85C\uC81D\uD2B8** \uBCF4\uAE30 \uB9E8 \uB05D \uC810\uC120 \uCE78\uC774\uB098 \uCEEC\uB7FC \u22EE \u203A \uC218\uC815\uC5D0\uC11C \uC774\uB984\xB7\uC544\uC774\uCF58\uC744 \uC815\uD558\uACE0, \uC5C5\uBB34\uB294 \uC0C1\uC138 \uC18D\uC131\uC774\uB098 \uC6B0\uD074\uB9AD \u203A \uD504\uB85C\uC81D\uD2B8 \uC774\uB3D9\uC73C\uB85C \uC62E\uAE41\uB2C8\uB2E4.","\uBCF4\uAD00\uC740 \uC18C\uC18D \uC5C5\uBB34\uAC00 \uBAA8\uB450 \uC644\uB8CC\uB41C \uB4A4\uC5D0\uB9CC \uB429\uB2C8\uB2E4. \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."]},{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\uAE30\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 \xB7 \uBCF8\uBB38 \uC591\uC2DD",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.","**\uBCF8\uBB38 \uC591\uC2DD**(\uB0B4\uC6A9 \uC81C\uBAA9\uC758 \u22EE)\uC740 \uC790\uC8FC \uC4F0\uB294 \uBCF8\uBB38\uC744 \uC800\uC7A5\uD574 \uB450\uACE0 \uBD88\uB7EC\uC635\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 \u203A \uCC98\uB9AC \u203A \uC885\uB8CC\uB85C \uAD00\uB9AC\uD569\uB2C8\uB2E4.",'\uAC1C\uBC1C\uC0AC \uC804\uC6A9\uC774\uBA70, \uACE0\uAC1D\uC774 \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:["\uACE0\uAC1D\uC774 \uB0A8\uAE34 \uBB38\uC758\xB7\uAC74\uC758\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\uC774 \uACE7 \uB2F5\uBCC0\uC785\uB2C8\uB2E4(\uC791\uC131\uC790\uC5D0\uAC8C\uB294 \uB2F5\uBCC0 \uC54C\uB9BC\uB9CC \uAC11\uB2C8\uB2E4). \uC644\uB8CC 7\uC77C \uB4A4 \uBCF4\uAD00\uD568\uC758 "\uACE0\uAC1D\uC13C\uD130" \uAD6C\uBD84\uC73C\uB85C \uC62E\uACA8\uC9D1\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 ag={id:"calendar",tabTitle:"\uC678\uBD80 \uCE98\uB9B0\uB354 \uC5F0\uB3D9",intro:"\uC5C5\uBB34\uD568\uC744 \uAD6C\uAE00 \uCE98\uB9B0\uB354\uC640 \uC787\uC2B5\uB2C8\uB2E4. \uC8FC\uAC04\xB7\uC6D4\uAC04 \uBCF4\uAE30 \uB610\uB294 \uD5E4\uB354 \u22EE \u203A **\uCE98\uB9B0\uB354 \uC5F0\uB3D9**\uC5D0\uC11C \uAD6C\uAE00 \uACC4\uC815\uC744 \uC5F0\uACB0\uD558\uBA74 \uC5C5\uBB34 \uBCC0\uACBD\uC774 \uAD6C\uAE00 \uCE98\uB9B0\uB354\uC5D0 **\uBC14\uB85C** \uBC18\uC601\uB429\uB2C8\uB2E4.",topics:[{title:"\uB450 \uBC29\uD5A5",lead:"\uC5F0\uB3D9\uC740 \uBC29\uD5A5\uC774 \uB458\uC774\uACE0 \uB530\uB85C \uCF1C\uACE0 \uB055\uB2C8\uB2E4.",items:[{term:"\uB0B4\uBCF4\uB0B4\uAE30 (\uC5C5\uBB34\uD568 \u2192 \uAD6C\uAE00)",desc:"\uB0B4\uAC00 \uAD00\uC5EC\uD55C \uC5C5\uBB34(\uB9C8\uAC10\uC608\uC815 \uB610\uB294 \uC2DC\uC791\uC77C\uC2DC\uAC00 \uC788\uB294 \uAC83)\uB97C \uAD6C\uAE00 \uCE98\uB9B0\uB354\uC5D0 \uC0C8\uB85C \uB9CC\uB4E0 **\uC804\uC6A9 \uCE98\uB9B0\uB354**(\uC774\uB984\uC740 \uC5F0\uB3D9 \uD654\uBA74\uC5D0 \uD45C\uC2DC \u2014 \uC608: \uCF54\uB4DC\uB9C8\uCF13)\uC5D0 \uB123\uC2B5\uB2C8\uB2E4. \uB4F1\uB85D\xB7\uC218\uC815\xB7\uC644\uB8CC\xB7\uC0AD\uC81C\uAC00 \uC989\uC2DC \uBC18\uC601\uB418\uACE0, \uC644\uB8CC\uD55C \uC5C5\uBB34\uB294 \uC81C\uBAA9 \uC55E\uC5D0 \u2713 \uAC00 \uBD99\uC2B5\uB2C8\uB2E4."},{term:"\uAC00\uC838\uC624\uAE30 (\uAD6C\uAE00 \u2192 \uC5C5\uBB34\uD568)",desc:"\uAD6C\uAE00 **\uAE30\uBCF8 \uCE98\uB9B0\uB354**\uC758 \uC77C\uC815\uC744 \uC5C5\uBB34\uD568 \uC8FC\uAC04\xB7\uC6D4\uAC04 \uBCF4\uAE30\uC5D0 \uACB9\uCCD0 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4. \uC77D\uAE30 \uC804\uC6A9\uC774\uB77C \uC5C5\uBB34\uB85C \uBC14\uB00C\uC9C0\uB3C4, \uC6D0\uBCF8\uC774 \uACE0\uCCD0\uC9C0\uC9C0\uB3C4 \uC54A\uC2B5\uB2C8\uB2E4."}]},{title:"\uC5F0\uACB0\uD558\uAE30",lines:["**\uCE98\uB9B0\uB354 \uC5F0\uB3D9** \u203A **\uAD6C\uAE00 \uACC4\uC815 \uC5F0\uACB0** \uBC84\uD2BC \u2192 \uAD6C\uAE00 \uB3D9\uC758 \uD654\uBA74\uC5D0\uC11C \uD5C8\uC6A9 \u2192 \uC5C5\uBB34\uD568\uC73C\uB85C \uB3CC\uC544\uC635\uB2C8\uB2E4(\uC5F0\uACB0 \uC644\uB8CC \uC54C\uB9BC).","\uC5F0\uACB0 \uC9C1\uD6C4 \uAD6C\uAE00 \uCE98\uB9B0\uB354\uC5D0 **\uC804\uC6A9 \uCE98\uB9B0\uB354**\uAC00 \uB9CC\uB4E4\uC5B4\uC9C0\uACE0 \uB0B4 \uC5C5\uBB34\uAC00 \uCC44\uC6CC\uC9D1\uB2C8\uB2E4(\uAC74\uC218\uAC00 \uB9CE\uC73C\uBA74 \uC7A0\uC2DC \uAC78\uB9BD\uB2C8\uB2E4).","\uAC00\uC838\uC624\uAE30\uB97C \uCF1C\uBA74 \uD5E4\uB354\uC758 **\uC678\uBD80 \uCE98\uB9B0\uB354 \uC77C\uC815** \uC2A4\uC704\uCE58\uB85C \uAD6C\uAE00 \uC77C\uC815 \uD45C\uC2DC\uB97C \uD55C \uBC88\uC5D0 \uCF1C\uACE0 \uB055\uB2C8\uB2E4(\uD654\uBA74\uC774 \uC881\uC73C\uBA74 \u22EE \uBA54\uB274 \uC548).",'\uAD6C\uAE00\uC774 "\uD655\uC778\uB418\uC9C0 \uC54A\uC740 \uC571" \uACBD\uACE0\uB97C \uBCF4\uC5EC\uC8FC\uBA74 **\uACE0\uAE09 \u203A \uACC4\uC18D**\uC73C\uB85C \uC9C4\uD589\uD569\uB2C8\uB2E4.']},{title:"\uC54C\uC544 \uB458 \uC810",lines:["\uC804\uC6A9 \uCE98\uB9B0\uB354 \uC548\uC758 \uC77C\uC815\uC740 \uC5C5\uBB34\uD568\uC774 \uAD00\uB9AC\uD569\uB2C8\uB2E4 \u2014 \uAD6C\uAE00\uC5D0\uC11C \uACE0\uCCD0\uB3C4 \uB2E4\uC74C \uBCC0\uACBD \uB54C \uC5C5\uBB34\uD568 \uB0B4\uC6A9\uC73C\uB85C \uB418\uB3CC\uC544\uAC11\uB2C8\uB2E4. \uC5C5\uBB34\uB294 \uC5C5\uBB34\uD568\uC5D0\uC11C \uACE0\uCE58\uC138\uC694.","\uD45C\uC2DC\uAC00 \uC5B4\uAE0B\uB09C \uAC83 \uAC19\uC73C\uBA74 **\uC804\uCCB4 \uB2E4\uC2DC \uB0B4\uBCF4\uB0B4\uAE30**\uB85C \uADF8 \uCE98\uB9B0\uB354\uB97C \uB0B4 \uC5C5\uBB34 \uAE30\uC900\uC73C\uB85C \uB2E4\uC2DC \uCC44\uC6C1\uB2C8\uB2E4.","**\uC5F0\uACB0 \uD574\uC81C**\uD558\uBA74 \uAD8C\uD55C\uC740 \uB04A\uAE30\uC9C0\uB9CC \uAD6C\uAE00 \uCABD \uC804\uC6A9 \uCE98\uB9B0\uB354\uB294 \uB0A8\uC2B5\uB2C8\uB2E4. \uD544\uC694\uD558\uBA74 \uAD6C\uAE00 \uCE98\uB9B0\uB354\uC5D0\uC11C \uC9C0\uC6B0\uC138\uC694.","\uD55C \uC0AC\uB78C\uC774 \uC5EC\uB7EC \uAE30\uAE30\uC5D0\uC11C \uC368\uB3C4 \uC5F0\uACB0\uC740 \uACC4\uC815\uB2F9 \uD55C \uBC88\uC774\uBA74 \uB429\uB2C8\uB2E4. \uC560\uD50C\xB7\uB124\uC774\uBC84 \uCE98\uB9B0\uB354 \uC5F0\uB3D9\uC740 \uC81C\uACF5\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."]}]};var lg={id:"shortcuts",tabTitle:"\uB2E8\uCD95\uD0A4",topics:[]};var Yf=[rg,ng,og,ig,sg,ag,lg];import{Fragment as qT,jsx as Wt,jsxs as Uo}from"react/jsx-runtime";function vc(e){return e.split(/(\*\*[^*]+\*\*|\s*(?:→|->)\s*)/g).filter(g=>g.length>0).map((g,l)=>g.startsWith("**")&&g.endsWith("**")?Wt(dr,{component:"strong",sx:{fontWeight:700},children:g.slice(2,-2)},l):/^\s*(?:→|->)\s*$/.test(g)?Wt(OT,{sx:{fontSize:"1em",verticalAlign:"-0.15em",mx:.5,color:"text.secondary"}},l):Wt(Xf,{children:g},l))}function DT({keys:e}){let f=lt();return Wt(dr,{sx:{display:"flex",alignItems:"center",gap:.5,justifyContent:"flex-end"},children:e.split(" \u2192 ").map((g,l)=>Uo(dr,{sx:{display:"flex",alignItems:"center",gap:.5},children:[l>0?Wt(MT,{sx:{fontSize:20,color:f.colors.textMuted}}):null,Wt(dr,{component:"span",sx:{minWidth:36,height:36,px:1,display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:15,fontWeight:600,color:f.colors.textPrimary,bgcolor:f.colors.surfaceSubtle,border:`1px solid ${f.colors.border}`,borderRadius:1,fontVariantNumeric:"tabular-nums"},children:g})]},`${g}-${l}`))})}function PT({steps:e}){let f=lt();return Wt(dr,{sx:{display:"grid",gridTemplateColumns:{xs:"1fr",sm:"repeat(3, minmax(0, 1fr))"},gap:{xs:1,sm:2},mt:1.5},children:e.map((g,l)=>Uo(dr,{sx:{position:"relative",minWidth:0,px:1.75,py:2.5,borderRadius:2,bgcolor:f.colors.surfaceSubtle,border:`1px solid ${f.colors.border}`,"&::before":{content:'""',position:"absolute",top:-1,left:12,right:12,height:3,borderRadius:"0 0 3px 3px",bgcolor:f.colors.accent,opacity:.85},"&::after":l<e.length-1?{content:'""',display:{xs:"none",sm:"block"},position:"absolute",top:"50%",right:-12,width:8,height:8,mt:"-4px",borderTop:`2px solid ${f.colors.borderStrong}`,borderRight:`2px solid ${f.colors.borderStrong}`,transform:"rotate(45deg)"}:void 0},children:[Uo(dr,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[Wt(dr,{sx:{flexShrink:0,width:26,height:26,borderRadius:"50%",display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:13,fontWeight:500,lineHeight:1,bgcolor:f.colors.accent,color:f.colors.accentContrast,fontVariantNumeric:"tabular-nums"},children:l+1}),Wt(dr,{sx:{minWidth:0,fontSize:20,fontWeight:500,color:f.colors.textStrong,lineHeight:1.3,letterSpacing:"-0.01em"},children:g.title})]}),Wt(dr,{sx:{mt:1.5,fontSize:15,lineHeight:1.5,color:f.colors.textPrimary,wordBreak:"keep-all"},children:g.desc})]},g.title))})}var ug="70vh",NT=24,LT=44,cg=`calc((${ug} - ${NT*2+LT}px) / var(--mfd-font-scale, 1))`,zT=148;function jT({items:e}){let f=lt();return Wt(dr,{sx:{mt:1.5,display:"grid",gridTemplateColumns:{xs:"1fr",sm:`${zT}px minmax(0, 1fr)`},fontSize:15,lineHeight:1.6,color:f.colors.textPrimary,border:`1px solid ${f.colors.border}`,borderRadius:1.5,overflow:"hidden","& > *":{px:1.5,py:1.35,borderTop:`1px solid ${f.colors.border}`},"& > *:nth-of-type(even)":{borderLeft:{sm:`1px solid ${f.colors.border}`}},"& > *:nth-of-type(1)":{borderTop:0},"& > *:nth-of-type(2)":{borderTop:{xs:`1px solid ${f.colors.border}`,sm:0}}},children:e.map(g=>Uo(Xf,{children:[Wt(dr,{sx:{fontWeight:500,color:f.colors.textStrong,wordBreak:"keep-all",bgcolor:f.colors.surfaceSubtle,display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center"},children:g.term}),Wt(dr,{sx:{wordBreak:"keep-all"},children:vc(g.desc)})]},g.term))})}function FT({topic:e}){let f=lt();return Uo(dr,{component:"section",sx:{py:{xs:3,sm:4},borderBottom:`1px solid ${f.colors.border}`,"&:last-of-type":{pb:0,borderBottom:0}},children:[Uo(dr,{component:"h3",sx:{m:0,mb:1.75,fontSize:24,fontWeight:500,letterSpacing:"-0.01em",lineHeight:1.3,color:f.colors.textStrong,wordBreak:"keep-all",display:"flex",alignItems:"center",flexWrap:"wrap"},children:[e.title,e.subtitle?Uo(qT,{children:[Wt(RT,{sx:{fontSize:22,color:f.colors.textMuted,mx:1,flexShrink:0}}),Wt(dr,{component:"span",sx:{fontSize:18,fontWeight:400,color:f.colors.textPrimary},children:e.subtitle})]}):null]}),e.lead?Wt(dr,{sx:{fontSize:15.5,lineHeight:1.65,color:f.colors.textPrimary,wordBreak:"keep-all"},children:vc(e.lead)}):null,e.steps?.length?Wt(PT,{steps:e.steps}):null,e.items?.length?Wt(jT,{items:e.items}):null,e.lines?.length?Wt(dr,{component:"ul",sx:{m:0,mt:e.lead||e.steps||e.items?1.25:0,pl:2.5,display:"flex",flexDirection:"column",gap:.5,fontSize:15,lineHeight:1.6,color:f.colors.textPrimary,wordBreak:"keep-all"},children:e.lines.map((g,l)=>Wt("li",{children:vc(g)},l))}):null]})}function ZG({open:e,onClose:f,views:g,features:l={},initialTab:o}){let s=lt(),[r,t]=IT(0);BT(()=>{if(!e)return;let h=Yf.filter(d=>!d.feature||l[d.feature]!==!1).findIndex(d=>d.id===o);t(Math.max(0,h))},[e,o]);let n=a=>!a||l[a]!==!1,c=Ca(g),i=Yf.filter(a=>n(a.feature)).map(a=>({id:a.id,tabTitle:a.tabTitle,showTitle:!1,children:a.id==="shortcuts"?Wt(dr,{sx:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:cg,maxHeight:cg,px:.5},children:Wt(dr,{sx:{display:"grid",gridTemplateColumns:"auto auto",columnGap:2.5,rowGap:1.75,alignItems:"center",fontSize:17,fontWeight:500,color:s.colors.textPrimary},children:c.map(h=>Uo(Xf,{children:[Wt(DT,{keys:h.keys}),Wt("span",{children:h.description})]},h.keys))})}):Uo(dr,{sx:{display:"flex",flexDirection:"column",px:.5},children:[a.intro?Wt(dr,{sx:{p:2,borderRadius:2,bgcolor:s.colors.accentSoft,color:s.colors.textStrong,fontSize:15.5,lineHeight:1.65,wordBreak:"keep-all"},children:vc(a.intro)}):null,a.topics.filter(h=>n(h.feature)).map(h=>Wt(FT,{topic:h},h.title))]})}));return Wt(AT,{open:e,onClose:f,maxWidth:"md",title:"\uC5C5\uBB34\uD568 \uC124\uBA85\uC11C",locale:"ko",titleIcons:{delete:{visible:!1}},tabs:{visible:!0,switchContent:!0},activeTabValue:r,onTabChange:t,fixedHeight:"70vh",maxContentHeight:ug,sectionContentPaddingTop:0,fontScale:{enabled:!0},fontScaleKey:"taskbox-manual",sections:i,actions:{showCancelButton:!1,right:Wt(ET,{variant:"contained",onClick:f,sx:{minWidth:80},children:"\uB2EB\uAE30"})}})}import{useEffect as fg,useRef as $T,useState as Ss}from"react";import{Box as hr,Button as Yn,IconButton as Zf,Menu as dg,MenuItem as hg,Switch as HT,Tooltip as pg}from"@mui/material";import{FormDialog as mg}from"@ehfuse/mui-form-dialog";import Jf from"@mui/icons-material/Add";import WT from"@mui/icons-material/ArrowRightAlt";import UT from"@mui/icons-material/BoltOutlined";import VT from"@mui/icons-material/Close";import KT from"@mui/icons-material/EditOutlined";import{ErrorAlert as gg}from"@ehfuse/alerts";import{ClearTextField as Ia,LabelSelect as _n}from"@ehfuse/mui-form-controls";import{Fragment as yg,jsx as Ze,jsxs as An}from"react/jsx-runtime";var Qf=[{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."}],Ea=[{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"}],kc=[{value:"high",label:"\uB192\uC74C"},{value:"medium",label:"\uC911\uAC04"},{value:"low",label:"\uB0AE\uC74C"}];function wc(){return{name:"",trigger:"created",enabled:!0,sort_no:0,condition:{},action:{}}}function _c(e){return gn.find(f=>f.key===e)?.name??e}function GT(e,f,g){let{condition:l,action:o}=e,s=[];if(l.group_seq){let n=f.find(c=>hi(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=${kc.find(n=>n.value===l.priority)?.label}`),l.label_key&&s.push(`\uB77C\uBCA8=${g.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=${_c(l.status)}`),l.from_status&&s.push(`${_c(l.from_status)}\uC5D0\uC11C`),l.to_status&&s.push(`${_c(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(`${Ea.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=${_c(o.set_status)}`),o.set_priority&&r.push(`\uC911\uC694\uB3C4=${kc.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 + ${g.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=Qf.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 bg={fontSize:16,fontWeight:700,color:"#37352f"},YT={display:"flex",alignItems:"center",gap:1},XT={width:104,flexShrink:0,fontSize:16,color:"#37352f"};function hY({open:e,rules:f,customTabs:g,statusOptions:l,contentTemplates:o=[],onPickAccount:s,onClose:r,onCreate:t,onUpdate:n,onToggle:c,onRemove:i}){let[a,h]=Ss(!1),[d,u]=Ss(0),[b,m]=Ss(wc()),[x,k]=Ss(!1),B=$T(null),[R,j]=Ss(null),[A,P]=Ss(null);fg(()=>{if(e)return;let W=window.setTimeout(()=>{h(!1),u(0),m(wc())},500);return()=>window.clearTimeout(W)},[e]),fg(()=>{if(!a)return;let W=window.setTimeout(()=>B.current?.focus(),120);return()=>window.clearTimeout(W)},[a]);let N=d>0,q=b.trigger,z=()=>{h(!1),u(0),m(wc())},T=(W,X)=>{m(Z=>{let Y={...Z.condition};return X===""||X===void 0||X===null?delete Y[W]:Y[W]=X,{...Z,condition:Y}})},S=(W,X)=>{m(Z=>{let Y={...Z.action};return X===""||X===void 0||X===null?delete Y[W]:Y[W]=X,{...Z,action:Y}})},D=W=>{m(X=>{let Z={...X.condition};return W!=="status_changed"&&(delete Z.from_status,delete Z.to_status),W!=="overdue"&&delete Z.overdue_days,W!=="field_changed"&&delete Z.changed_field,W!=="commented"&&(delete Z.comment_contains,delete Z.comment_by_others),W==="field_changed"&&Z.changed_field===void 0&&(Z.changed_field=Ea[0]?.value??""),{...X,trigger:W,condition:Z}})},p=g.filter(W=>!W.archived),y=l.map(W=>({value:W.key,label:W.name})),v=gn.map(W=>({value:W.key,label:W.name})),w=p.map(W=>({value:String(hi(W.key)),label:W.label})),{condition:_,action:C}=b,O=_.is_bug!==void 0||_.is_event!==void 0,F=[..._.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,Z=await s(X,W==="manager_account"?"\uCC45\uC784\uC790":"\uCC38\uC870\uC790");Z&&m(Y=>{let J={...Y.condition};return W==="manager_account"?(J.manager_account_seq=Z.accountSeq,J.manager_name=Z.name):(J.receiver_account_seq=Z.accountSeq,J.receiver_name=Z.name),{...Y,condition:J}})},K=W=>{j(null),W==="group_seq"?T("group_seq",Number(w[0]?.value)||0):W==="kind"?T("is_bug",!0):W==="priority"?T("priority","high"):W==="label_key"?T("label_key",y[0]?.value??""):W==="title_contains"?m(X=>({...X,condition:{...X.condition,title_contains:""}})):W==="manager_empty"?T("manager_empty",!0):W==="manager_account"||W==="receiver_account"?$(W):W==="from_status"?T("from_status",gn[0]?.key??""):W==="to_status"?T("to_status",gn[0]?.key??""):W==="changed_field"?T("changed_field",Ea[0]?.value??""):W==="comment_contains"?m(X=>({...X,condition:{...X.condition,comment_contains:""}})):W==="comment_by_others"?T("comment_by_others",!0):W==="overdue_days"&&T("overdue_days",1)},M=W=>{if(W==="kind"){T("is_bug",""),T("is_event","");return}if(W==="manager_account"){T("manager_account_seq",""),T("manager_name","");return}if(W==="receiver_account"){T("receiver_account_seq",""),T("receiver_name","");return}T(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"}]:[]],E=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,Z=await s(X,W==="assign_manager"?"\uCC45\uC784\uC790":W==="add_receiver"?"\uCC38\uC870\uC790":"\uC54C\uB9BC \uBC1B\uC744 \uC0AC\uB78C");Z&&m(Y=>{let J={...Y.action};return W==="assign_manager"?(J.assign_manager_account_seq=Z.accountSeq,J.assign_manager_name=Z.name):W==="add_receiver"?(J.add_receiver_account_seq=Z.accountSeq,J.add_receiver_name=Z.name):(J.notify_account_seq=Z.accountSeq,J.notify_name=Z.name),{...Y,action:J}})},I=W=>{if(P(null),W==="set_status")S("set_status",gn[0]?.key??"");else if(W==="set_priority")S("set_priority","high");else if(W==="add_label_key")S("add_label_key",y[0]?.value??"");else if(W==="apply_content_template"){let X=o[0];m(Z=>({...Z,action:{...Z.action,apply_content_template_seq:X?.seq??0,apply_content_template_name:X?.name??""}}))}else E(W)},L=W=>{W==="assign_manager"?(S("assign_manager_account_seq",""),S("assign_manager_name","")):W==="add_receiver"?(S("add_receiver_account_seq",""),S("add_receiver_name","")):W==="apply_content_template"?(S("apply_content_template_seq",""),S("apply_content_template_name","")):W==="notify"?(S("notify_account_seq",""),S("notify_name",""),S("notify_message","")):S(W,"")},U=async()=>{if(!b.name.trim()){gg({message:"\uADDC\uCE59 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694."});return}if(Object.keys(b.action).length===0){gg({message:"\uB3D9\uC791\uC744 \uD558\uB098 \uC774\uC0C1 \uCD94\uAC00\uD558\uC138\uC694."});return}let W=N?b.sort_no:f.reduce((Z,Y)=>Math.max(Z,Y.sort_no),0)+1;k(!0);let X=N?await n(d,{...b,sort_no:W}):await t({...b,sort_no:W});k(!1),X&&z()},G=(W,X,Z,Y)=>An(hr,{sx:YT,children:[Ze(hr,{sx:XT,children:W}),An(hr,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:Y?"column":"row",alignItems:Y?"stretch":"center",gap:Y?.5:1},children:[X,Y?Ze(hr,{sx:{fontSize:13.5,color:"#37352f"},children:Y}):null]}),Ze(pg,{title:"\uC774 \uC904 \uBE7C\uAE30",arrow:!0,disableInteractive:!0,children:Ze(Zf,{size:"small","aria-label":`${W} \uC904 \uBE7C\uAE30`,onClick:Z,children:Ze(VT,{sx:{fontSize:16}})})})]}),V=()=>An(hr,{sx:{display:"flex",flexDirection:"column",gap:2.5},children:[Ze(Ia,{size:"medium",label:"\uADDC\uCE59 \uC774\uB984",inputRef:B,placeholder:"\uC608: \uC811\uC218 \uC624\uB958 \uC790\uB3D9 \uBC30\uC815",value:b.name,onChange:W=>m(X=>({...X,name:W.target.value}))}),Ze(hr,{sx:{display:"flex",alignItems:"center",gap:2,flexWrap:"wrap"},children:Qf.map(W=>{let X=q===W.value;return Ze(Yn,{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)})}),Ze(hr,{sx:{fontSize:13,color:"#787774",mt:-.5},children:Qf.find(W=>W.value===q)?.hint}),An(hr,{sx:{display:"flex",alignItems:"center",gap:1,mt:.5},children:[Ze(hr,{sx:bg,children:"\uC5B4\uB5A4 \uC5C5\uBB34\uC77C \uB54C"}),F.length>0?Ze(Yn,{size:"small",startIcon:Ze(Jf,{sx:{fontSize:16}}),onClick:W=>j(W.currentTarget),sx:{color:"#2563eb",minWidth:0},children:"\uC870\uAC74 \uCD94\uAC00"}):null]}),_.group_seq!==void 0?G("\uD504\uB85C\uC81D\uD2B8",Ze(_n,{size:"medium",fullWidth:!0,label:"",value:String(_.group_seq),options:w,onChange:W=>T("group_seq",Number(W.target.value)||"")}),()=>M("group_seq")):null,O?G("\uC885\uB958",Ze(_n,{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";T("is_bug",X?!0:""),T("is_event",X?"":!0)}}),()=>M("kind")):null,_.priority!==void 0?G("\uC911\uC694\uB3C4",Ze(_n,{size:"medium",fullWidth:!0,label:"",value:_.priority,options:kc,onChange:W=>T("priority",W.target.value)}),()=>M("priority")):null,_.label_key!==void 0?G("\uB77C\uBCA8",Ze(_n,{size:"medium",fullWidth:!0,label:"",value:_.label_key,options:y,onChange:W=>T("label_key",W.target.value)}),()=>M("label_key")):null,_.title_contains!==void 0?G("\uC81C\uBAA9",Ze(Ia,{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?G("\uCC45\uC784\uC790",Ze(_n,{size:"medium",fullWidth:!0,label:"",value:_.manager_empty?"empty":"assigned",options:[{value:"empty",label:"\uC5C6\uC74C"},{value:"assigned",label:"\uC788\uC74C"}],onChange:W=>T("manager_empty",W.target.value==="empty")}),()=>M("manager_empty")):null,_.manager_account_seq!==void 0?G("\uCC45\uC784\uC790",Ze(Yn,{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?G("\uCC38\uC870\uC790",Ze(Yn,{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?G("\uC774 \uC0C1\uD0DC\uC5D0\uC11C",Ze(_n,{size:"medium",fullWidth:!0,label:"",value:_.from_status,options:v,onChange:W=>T("from_status",W.target.value)}),()=>M("from_status")):null,_.to_status!==void 0?G("\uC774 \uC0C1\uD0DC\uB85C",Ze(_n,{size:"medium",fullWidth:!0,label:"",value:_.to_status,options:v,onChange:W=>T("to_status",W.target.value)}),()=>M("to_status")):null,_.changed_field!==void 0?G("\uBCC0\uACBD \uD544\uB4DC",Ze(_n,{size:"medium",fullWidth:!0,label:"",value:_.changed_field,options:Ea,onChange:W=>T("changed_field",W.target.value)}),()=>M("changed_field")):null,_.comment_contains!==void 0?G("\uB313\uAE00 \uB0B1\uB9D0",Ze(Ia,{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?G("\uB313\uAE00 \uC791\uC131\uC790",Ze(_n,{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=>T("comment_by_others",W.target.value==="others")}),()=>M("comment_by_others")):null,_.overdue_days!==void 0?G("\uACBD\uACFC\uC77C",Ze(Ia,{size:"medium",fullWidth:!0,type:"number",value:String(_.overdue_days),onChange:W=>T("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?Ze(hr,{sx:{fontSize:13.5,color:"#9a9a97"},children:"\uC870\uAC74\uC774 \uC5C6\uC73C\uBA74 \uBAA8\uB4E0 \uC5C5\uBB34\uC5D0 \uC2E4\uD589\uB429\uB2C8\uB2E4."}):null,An(hr,{sx:{display:"flex",alignItems:"center",gap:1,mt:.5},children:[Ze(hr,{sx:bg,children:"\uBB34\uC5C7\uC744 \uD560\uAE4C\uC694"}),H.length>0?Ze(Yn,{size:"small",startIcon:Ze(Jf,{sx:{fontSize:16}}),onClick:W=>P(W.currentTarget),sx:{color:"#2563eb",minWidth:0},children:"\uB3D9\uC791 \uCD94\uAC00"}):null]}),C.set_status!==void 0?G("\uC0C1\uD0DC",Ze(_n,{size:"medium",fullWidth:!0,label:"",value:C.set_status,options:v,onChange:W=>S("set_status",W.target.value)}),()=>L("set_status")):null,C.set_priority!==void 0?G("\uC911\uC694\uB3C4",Ze(_n,{size:"medium",fullWidth:!0,label:"",value:C.set_priority,options:kc,onChange:W=>S("set_priority",W.target.value)}),()=>L("set_priority")):null,C.apply_content_template_seq!==void 0?G("\uBCF8\uBB38 \uC591\uC2DD",Ze(_n,{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(Z=>String(Z.seq)===String(W.target.value));m(Z=>({...Z,action:{...Z.action,apply_content_template_seq:X?.seq??0,apply_content_template_name:X?.name??""}}))}}),()=>L("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?G("\uB77C\uBCA8",Ze(_n,{size:"medium",fullWidth:!0,label:"",value:C.add_label_key,options:y,onChange:W=>S("add_label_key",W.target.value)}),()=>L("add_label_key")):null,C.assign_manager_account_seq!==void 0?G("\uCC45\uC784\uC790",Ze(Yn,{size:"medium",variant:"outlined",color:"inherit",onClick:()=>{E("assign_manager")},children:C.assign_manager_name||`\uACC4\uC815 #${C.assign_manager_account_seq}`}),()=>L("assign_manager")):null,C.add_receiver_account_seq!==void 0?G("\uCC38\uC870\uC790",Ze(Yn,{size:"medium",variant:"outlined",color:"inherit",onClick:()=>{E("add_receiver")},children:C.add_receiver_name||`\uACC4\uC815 #${C.add_receiver_account_seq}`}),()=>L("add_receiver")):null,C.notify_account_seq!==void 0?G("\uC54C\uB9BC",An(yg,{children:[Ze(Yn,{size:"medium",variant:"outlined",color:"inherit",onClick:()=>{E("notify")},sx:{flexShrink:0},children:C.notify_name||`\uACC4\uC815 #${C.notify_account_seq}`}),Ze(Ia,{size:"medium",fullWidth:!0,placeholder:"\uC54C\uB9BC \uBB38\uAD6C(\uBE44\uC6B0\uBA74 \uAE30\uBCF8 \uBB38\uAD6C)",value:C.notify_message??"",onChange:W=>S("notify_message",W.target.value)})]}),()=>L("notify")):null,Object.keys(C).length===0?Ze(hr,{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,Ze(dg,{transitionDuration:0,anchorEl:R,open:!!R,onClose:()=>j(null),children:F.map(W=>Ze(hg,{dense:!0,onClick:()=>K(W.key),sx:{fontSize:14},children:W.label},W.key))}),Ze(dg,{transitionDuration:0,anchorEl:A,open:!!A,onClose:()=>P(null),children:H.map(W=>Ze(hg,{dense:!0,onClick:()=>I(W.key),sx:{fontSize:14},children:W.label},W.key))})]});return An(yg,{children:[Ze(mg,{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:An(hr,{sx:{display:"flex",flexDirection:"column",px:2.5,py:2},children:[f.length===0?An(hr,{sx:{py:4,display:"flex",flexDirection:"column",alignItems:"center",gap:2,color:"#9a9a97"},children:[Ze(UT,{sx:{fontSize:48,color:"#d9d9d6"}}),Ze(hr,{sx:{fontSize:15},children:"\uB4F1\uB85D\uB41C \uADDC\uCE59\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."})]}):null,f.map(W=>An(hr,{sx:{display:"flex",alignItems:"center",gap:2,py:1,"&:not(:last-of-type)":{borderBottom:"1px solid #ececea"},opacity:W.enabled?1:.5},children:[Ze(pg,{title:W.enabled?"\uC0AC\uC6A9 \uC911":"\uAEBC\uC9D0",arrow:!0,disableInteractive:!0,children:Ze(HT,{size:"small",inputProps:{"aria-label":`${W.name} \uADDC\uCE59 \uC0AC\uC6A9`},checked:W.enabled,onChange:(X,Z)=>c(W.seq,Z)})}),An(hr,{sx:{flex:1,minWidth:0},children:[Ze(hr,{sx:{fontSize:16,fontWeight:600,color:"#37352f"},children:W.name}),(()=>{let X=GT(W,g,l);return An(hr,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:.5,fontSize:15,color:"#6f6f6c"},children:[Ze(hr,{component:"span",children:X.left}),Ze(WT,{sx:{fontSize:18,color:"#9a9a97",flexShrink:0}}),Ze(hr,{component:"span",children:X.right})]})})()]}),Ze(Zf,{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:Ea[0]?.value??""}:{}},action:{...W.action}}),h(!0)},children:Ze(KT,{sx:{fontSize:18}})}),Ze(Zf,{size:"small","aria-label":`${W.name} \uADDC\uCE59 \uC0AD\uC81C`,onClick:()=>i(W.seq),children:Ze(Ir,{sx:{fontSize:18}})})]},W.seq))]})}],actions:{showCancelButton:!1,left:Ze(Yn,{startIcon:Ze(Jf,{}),onClick:()=>{u(0),m(wc()),h(!0)},sx:{color:"#2563eb"},children:"\uC0C8 \uADDC\uCE59"}),right:Ze(Yn,{variant:"contained",onClick:r,children:"\uB2EB\uAE30"})}}),Ze(mg,{open:a,onClose:z,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:V()}],actions:{showCancelButton:!0,right:Ze(Yn,{variant:"contained",onClick:()=>{U()},disabled:x,children:N?"\uC218\uC815":"\uADDC\uCE59 \uCD94\uAC00"})}})]})}import{useEffect as xg,useRef as ed,useState as Ts}from"react";import{Box as sr,Button as Cs,IconButton as Ma,Tooltip as Ra}from"@mui/material";import vg from"@mui/icons-material/Add";import ZT from"@mui/icons-material/EditOutlined";import JT from"@mui/icons-material/ContentCopyOutlined";import QT from"@mui/icons-material/DragIndicator";import e7 from"@mui/icons-material/Close";import t7 from"@mui/icons-material/PlaylistAddCheckOutlined";import{DndContext as r7,PointerSensor as n7,closestCenter as o7,useSensor as i7,useSensors as s7}from"@dnd-kit/core";import{restrictToParentElement as a7,restrictToVerticalAxis as l7}from"@dnd-kit/modifiers";import{SortableContext as c7,arrayMove as wg,useSortable as u7,verticalListSortingStrategy as f7}from"@dnd-kit/sortable";import{CSS as d7}from"@dnd-kit/utilities";import{FormDialog as _g}from"@ehfuse/mui-form-dialog";import{ClearTextField as td,LabelSelect as kg,NumberField as Sg}from"@ehfuse/mui-form-controls";import h7 from"@ehfuse/overlay-scrollbar";import{ConfirmDialog as p7,ErrorAlert as Tg}from"@ehfuse/alerts";import{Fragment as x7,jsx as ft,jsxs as Dn}from"react/jsx-runtime";var m7=[{value:"high",label:"\uB192\uC74C"},{value:"medium",label:"\uC911\uAC04"},{value:"low",label:"\uB0AE\uC74C"}],Cg="\uC5C5\uBB34 \uC81C\uBAA9",rd=2,Sc={flex:1,minWidth:0},Bg=56,Ig=20,g7=`${Ig+rd*8}px`;function Tc(){return{name:"",description:"",group_seq:0,items:[]}}function b7(){return{title:"",start_offset_days:0,due_offset_days:0,priority:"medium"}}function y7({id:e,children:f}){let{attributes:g,listeners:l,setNodeRef:o,transform:s,transition:r,isDragging:t}=u7({id:e});return ft(sr,{ref:o,sx:{transform:d7.Transform.toString(s),transition:r,...t?{opacity:.6,position:"relative",zIndex:1}:{}},children:f({handleProps:{...g,...l},dragging:t})})}function DY({open:e,templates:f,customTabs:g,onPickAccount:l,onClose:o,onCreate:s,onUpdate:r,onRemove:t,onRun:n}){let[c,i]=Ts(!1),[a,h]=Ts(0),[d,u]=Ts(Tc()),[b,m]=Ts(!1),[x,k]=Ts([]),B=ed(0),[R,j]=Ts(0),A=ed(null),P=ed(null);xg(()=>{if(e)return;let F=window.setTimeout(()=>{i(!1),h(0),u(Tc()),k([])},500);return()=>window.clearTimeout(F)},[e]);let N=()=>(B.current+=1,`template-item-${B.current}`),q=(F,$)=>{h(F),u($),k($.items.map(()=>N())),i(!0)},z=d.items.map((F,$)=>x[$]??`template-item-fallback-${$}`),T=()=>{let F=P.current?.getScrollContainer()??null;if(F){F.scrollTop=F.scrollHeight;return}let $=A.current?.querySelectorAll("*")??[];for(let K of Array.from($))if(K.scrollHeight>K.clientHeight+1){K.scrollTop=K.scrollHeight;return}},S=()=>{let F=A.current;if(!F)return null;let $=F.querySelectorAll("input[data-template-title]"),K=$.length?$:F.querySelectorAll(`input[placeholder="${Cg}"]`);return K.length?K[K.length-1]:null};xg(()=>{if(R===0)return;let F=0,$=0,K=()=>{T();let H=S();H&&document.activeElement!==H&&H.focus(),F+=1,!(H&&document.activeElement===H)&&F<8&&($=window.setTimeout(K,50))},M=window.requestAnimationFrame(K);return()=>{window.cancelAnimationFrame(M),window.clearTimeout($)}},[R]);let D=g.filter(F=>!F.archived).map(F=>({value:String(hi(F.key)),label:F.label})),p=(F,$)=>{u(K=>({...K,items:K.items.map((M,H)=>H===F?{...M,...$}:M)}))},y=s7(i7(n7,{activationConstraint:{distance:5}})),v=F=>{let $=String(F.active?.id??""),K=String(F.over?.id??"");if(!$||!K||$===K)return;let M=z.indexOf($),H=z.indexOf(K);M<0||H<0||(u(E=>({...E,items:wg(E.items,M,H)})),k(E=>wg(E,M,H)))},w=async F=>{if(!l)return;let $=await l(d.items[F]?.manager_account_seq??0,"\uCC45\uC784\uC790");$&&p(F,{manager_account_seq:$.accountSeq,manager_name:$.name})},_=async()=>{let F=d.name.trim();if(!F){Tg({message:"\uD15C\uD50C\uB9BF \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694."});return}let $=d.items.filter(H=>H.title.trim().length>0);if($.length===0){Tg({message:"\uC5C5\uBB34 \uD56D\uBAA9\uC744 \uD55C \uC904 \uC774\uC0C1 \uB123\uC73C\uC138\uC694."});return}m(!0);let K={...d,name:F,items:$},M=a>0?await r(a,K):await s(K);m(!1),M&&(i(!1),h(0),u(Tc()))},C=ft(sr,{children:f.length===0?Dn(sr,{sx:{py:4,display:"flex",flexDirection:"column",alignItems:"center",gap:2,color:"#9a9a97"},children:[ft(t7,{sx:{fontSize:48,color:"#d9d9d6"}}),ft(sr,{sx:{fontSize:13.5},children:"\uB4F1\uB85D\uB41C \uD15C\uD50C\uB9BF\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."})]}):f.map(F=>Dn(sr,{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:[Dn(sr,{sx:{flex:1,minWidth:0},children:[ft(sr,{sx:{fontSize:18,fontWeight:600,color:"#37352f"},children:F.name}),Dn(sr,{sx:{fontSize:14,color:"#787774",mt:.25},children:["\uC5C5\uBB34 ",F.items.length,"\uAC74",F.description?` \xB7 ${F.description}`:""]})]}),n?ft(Cs,{size:"medium",variant:"outlined",onClick:()=>n(F),sx:{flexShrink:0},children:"\uC2E4\uD589"}):null,ft(Ra,{title:"\uC218\uC815",arrow:!0,disableInteractive:!0,children:ft(Ma,{size:"medium","aria-label":`${F.name} \uD15C\uD50C\uB9BF \uC218\uC815`,onClick:()=>q(F.seq,{name:F.name,description:F.description??"",group_seq:F.group_seq??0,items:F.items.map($=>({...$}))}),children:ft(ZT,{sx:{fontSize:19}})})}),ft(Ra,{title:"\uBCF5\uC81C",arrow:!0,disableInteractive:!0,children:ft(Ma,{size:"medium","aria-label":`${F.name} \uD15C\uD50C\uB9BF \uBCF5\uC81C`,onClick:()=>q(0,{name:`${F.name} \uC0AC\uBCF8`,description:F.description??"",group_seq:F.group_seq??0,items:F.items.map($=>({...$}))}),children:ft(JT,{sx:{fontSize:18}})})}),ft(Ra,{title:"\uC0AD\uC81C",arrow:!0,disableInteractive:!0,children:ft(Ma,{size:"medium","aria-label":`${F.name} \uD15C\uD50C\uB9BF \uC0AD\uC81C`,onClick:()=>{(async()=>await p7({title:"\uD15C\uD50C\uB9BF \uC0AD\uC81C",message:`"${F.name}" \uD15C\uD50C\uB9BF\uC744 \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&t(F.seq))()},children:ft(Ir,{sx:{fontSize:18}})})})]},F.seq))}),O=Dn(sr,{sx:{display:"flex",flexDirection:"column",gap:3},children:[ft(td,{size:"medium",label:"\uD15C\uD50C\uB9BF \uC774\uB984",placeholder:"\uC608: \uC2E0\uADDC \uC785\uC0AC\uC790 \uC628\uBCF4\uB529",fullWidth:!0,value:d.name,onChange:F=>u($=>({...$,name:F.target.value}))}),Dn(sr,{sx:{display:"grid",gridTemplateColumns:D.length>0?"1fr 1fr":"1fr",gap:2},children:[ft(td,{size:"medium",label:"\uC124\uBA85",placeholder:"\uBAA9\uB85D\uC5D0\uC11C \uBB34\uC5C7\uC778\uC9C0 \uC54C\uC544\uBCFC \uD55C \uC904(\uC120\uD0DD)",fullWidth:!0,value:d.description??"",onChange:F=>u($=>({...$,description:F.target.value}))}),D.length>0?ft(kg,{size:"medium",fullWidth:!0,label:"\uB9CC\uB4E4 \uACF3(\uD504\uB85C\uC81D\uD2B8)",value:String(d.group_seq??0),options:[{value:"0",label:"\uAE30\uBCF8 \uC5C5\uBB34\uD568"},...D],onChange:F=>u($=>({...$,group_seq:Number(F.target.value)||0}))}):null]}),Dn(sr,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[ft(sr,{sx:{fontSize:18,fontWeight:600,color:"#37352f"},children:"\uC5C5\uBB34 \uD56D\uBAA9"}),ft(sr,{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."})]}),d.items.length===0?ft(sr,{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.'}):ft(sr,{ref:A,sx:{border:"1px solid #e6e6e3",borderRadius:1,overflow:"hidden"},children:ft(h7,{ref:P,style:{maxHeight:"min(560px, 52vh)"},thumb:{width:6},children:ft(r7,{sensors:y,collisionDetection:o7,modifiers:[l7,a7],onDragEnd:v,children:ft(c7,{items:z,strategy:f7,children:d.items.map((F,$)=>ft(y7,{id:z[$],children:({handleProps:K})=>Dn(sr,{sx:{borderBottom:$===d.items.length-1?"none":"1px solid #f2f2f0",px:rd,py:2,gap:2,display:"flex",flexDirection:"column"},children:[Dn(sr,{sx:{display:"flex",alignItems:"center",gap:rd},children:[ft(sr,{...K,"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:ft(QT,{sx:{fontSize:Ig}})}),ft(td,{size:"medium",fullWidth:!0,placeholder:Cg,slotProps:{htmlInput:{"data-template-title":$}},value:F.title,onChange:M=>p($,{title:M.target.value})})]}),Dn(sr,{sx:{display:"flex",alignItems:"center",gap:2,pl:g7},children:[ft(sr,{sx:Sc,children:ft(Sg,{size:"medium",fullWidth:!0,label:"\uC2DC\uC791 D+",thousandSeparator:!1,align:"right",suffix:"\uC77C",value:F.start_offset_days??null,onValueChange:M=>p($,{start_offset_days:M===null?void 0:Math.trunc(Number(M))})})}),ft(sr,{sx:Sc,children:ft(Sg,{size:"medium",fullWidth:!0,label:"\uB9C8\uAC10 D+",thousandSeparator:!1,align:"right",suffix:"\uC77C",value:F.due_offset_days??null,onValueChange:M=>p($,{due_offset_days:M===null?void 0:Math.trunc(Number(M))})})}),ft(sr,{sx:Sc,children:ft(kg,{size:"medium",fullWidth:!0,label:"\uC911\uC694\uB3C4",value:F.priority??"medium",options:m7,onChange:M=>p($,{priority:M.target.value})})}),l?Dn(sr,{sx:{...Sc,position:"relative"},children:[ft(Cs,{variant:"outlined",fullWidth:!0,onClick:()=>{w($)},sx:{height:Bg,display:"block",textAlign:"left",textTransform:"none",fontSize:16,fontWeight:400,lineHeight:`${Bg-2}px`,py:0,px:1.75,pr:F.manager_account_seq?4.5:1.75,borderColor:"#c4c4c4",color:F.manager_name?"#37352f":"#9a9a97",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap","&:hover":{borderColor:"#37352f",bgcolor:"transparent"}},children:F.manager_name||"\uCC45\uC784\uC790"}),F.manager_account_seq?ft(Ra,{title:"\uCC45\uC784\uC790 \uBE44\uC6B0\uAE30",arrow:!0,disableInteractive:!0,children:ft(Ma,{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:ft(e7,{sx:{fontSize:18}})})}):null]}):null,ft(Ra,{title:"\uD56D\uBAA9 \uC0AD\uC81C",arrow:!0,disableInteractive:!0,children:ft(Ma,{size:"medium","aria-label":`${$+1}\uBC88 \uD56D\uBAA9 \uC0AD\uC81C`,onClick:()=>{u(M=>({...M,items:M.items.filter((H,E)=>E!==$)})),k(M=>M.filter((H,E)=>E!==$))},children:ft(Ir,{sx:{fontSize:18}})})})]})]})},z[$]))})})})})]});return Dn(x7,{children:[ft(_g,{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:ft(Cs,{startIcon:ft(vg,{sx:{fontSize:18}}),onClick:()=>q(0,Tc()),children:"\uC0C8 \uD15C\uD50C\uB9BF"}),right:ft(Cs,{variant:"contained",onClick:o,children:"\uB2EB\uAE30"})},sectionContentPaddingTop:0,sections:[{id:"templates",title:"",showTitle:!1,children:C}]}),ft(_g,{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:ft(Cs,{startIcon:ft(vg,{sx:{fontSize:18}}),onClick:()=>{u(F=>({...F,items:[...F.items,b7()]})),k(F=>[...F,N()]),j(F=>F+1)},children:"\uD56D\uBAA9 \uCD94\uAC00"}),right:ft(Cs,{variant:"contained",disabled:b,onClick:()=>{_()},children:"\uC800\uC7A5"})},sectionContentPaddingTop:0,sections:[{id:"template-form",title:"",showTitle:!1,children:O}]})]})}import{useEffect as Eg,useState as Mg}from"react";import{Box as Vr,Button as v7}from"@mui/material";import{FormDialog as w7}from"@ehfuse/mui-form-dialog";import{DateTextField as _7}from"@ehfuse/mui-form-controls";import k7 from"@ehfuse/overlay-scrollbar";import{jsx as ln,jsxs as Oa}from"react/jsx-runtime";function WY({open:e,template:f,todayStr:g,running:l=!1,onClose:o,onRun:s}){let[r,t]=Mg(g),[n,c]=Mg(f);Eg(()=>{f&&c(f)},[f]),Eg(()=>{e&&t(g)},[e]);let i=f??n,a=i?xp(i,r):[];return ln(w7,{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:ln(v7,{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:Oa(Vr,{sx:{display:"flex",flexDirection:"column",gap:2},children:[Oa(Vr,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[ln(Vr,{sx:{width:72,flexShrink:0,fontSize:16,color:"#37352f"},children:"\uAE30\uC900\uC77C"}),ln(_7,{size:"medium",fullWidth:!0,value:r,onChange:h=>t(h.target.value)})]}),ln(Vr,{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."}),Oa(Vr,{sx:{border:"1px solid #e6e6e3",borderRadius:1,overflow:"hidden"},children:[Oa(Vr,{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:[ln(Vr,{sx:{flex:1,minWidth:0},children:"\uC5C5\uBB34"}),ln(Vr,{sx:{width:88,flexShrink:0,textAlign:"center"},children:"\uC2DC\uC791"}),ln(Vr,{sx:{width:88,flexShrink:0,textAlign:"center"},children:"\uB9C8\uAC10"}),ln(Vr,{sx:{width:96,flexShrink:0,textAlign:"center"},children:"\uCC45\uC784\uC790"})]}),ln(k7,{style:{maxHeight:520},thumb:{width:6},children:a.length===0?ln(Vr,{sx:{p:2,fontSize:14,color:"#9a9a97"},children:"\uB9CC\uB4E4 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):a.map((h,d)=>Oa(Vr,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1.25,borderBottom:d===a.length-1?"none":"1px solid #f2f2f0",fontSize:16,fontWeight:500,color:"#111111"},children:[ln(Vr,{sx:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:h.title}),ln(Vr,{sx:{width:88,flexShrink:0,textAlign:"center",fontSize:13.5,color:h.start_date?"#37352f":"#9a9a97"},children:Qc(h.start_date)||"-"}),ln(Vr,{sx:{width:88,flexShrink:0,textAlign:"center",fontSize:13.5,color:h.due_date?"#37352f":"#9a9a97"},children:Qc(h.due_date)||"-"}),ln(Vr,{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||"-"})]},d))})]})]})}]})}var S7={urgent:"\uAE34\uAE09",high:"\uB192\uC74C",normal:"\uC911\uAC04",low:"\uB0AE\uC74C"};function T7(e){return e.length===0?"":e.length<=2?e.join(", "):`${e[0]} \uC678 ${e.length-1}\uBA85`}function Cc(e){let f=String(e??"").trim().slice(0,10);return/^\d{4}-\d{2}-\d{2}$/.test(f)?`${f.slice(2,4)}.${f.slice(5,7)}.${f.slice(8,10)}`:"-"}function Bs(e){let f=g=>String(g).padStart(2,"0");return`${e.getFullYear()}-${f(e.getMonth()+1)}-${f(e.getDate())} ${f(e.getHours())}:${f(e.getMinutes())}`}function nd(e,f,g){let o=String(e.due_date??"").slice(11,16).trim()||String(e.estimated_time??"").trim(),s=Cc(e.due_date),r=String(e.start_date??"").slice(11,16).trim(),t=Cc(e.start_date),n=(e.receiver_names??[]).filter(Boolean).map(i=>String(i).trim()),c=(e.checklist??[]).length?`${(e.checklist??[]).filter(i=>i.checked).length}/${(e.checklist??[]).length}`:"";return{seq:Number(e.seq??0),title:String(e.title??"").trim(),statusName:xr(e).name,projectLabel:e.tab_key?f.get(String(e.tab_key))??"":"",managerName:String(e.manager_name??"").trim(),receiverNames:T7(n),receiverNamesFull:n.join(", "),startDate:t!=="-"&&r?`${t} ${r}`:t,dueDate:s!=="-"&&o?`${s} ${o}`:s,priorityName:S7[String(e.priority??"")]??"",checklist:c,checklistItems:(e.checklist??[]).map(i=>{let a=i.task_seq&&g?g(Number(i.task_seq)):null,h=Cc(a?.due_date),d=String(a?.due_date??"").slice(11,16).trim();return{label:String(i.label??"").trim(),checked:!!i.checked,managerName:String(a?.manager_name??"").trim(),dueDate:h!=="-"?d?`${h} ${d}`:h:""}}),note:String(e.note??"").trim(),completed:!!e.completed}}function Nt(e){return String(e??"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function C7(e,f){if(e===" ")return f*.3;let g=e.codePointAt(0)??0,l=g>=4352&&g<=4607||g>=12288&&g<=40959||g>=44032&&g<=55203||g>=63744&&g<=64255||g>=65280&&g<=65519;return f*(l?1:.55)}function Bc(e,f){let g=0;for(let l of String(e??""))g+=C7(l,f);return g}function Is(e,f){let g=String(e??"").trim();if(!g)return["-"];let l=[],o="";for(let s of g){if(s===`
47
- `){o&&l.push(o),o="";continue}let r=`${o}${s}`;if(r.length>f&&o){l.push(o),o=s;continue}o=r}return o&&l.push(o),l.length>0?l:["-"]}function vo(e,f,g){let l=String(e??"").replace(/\s+/g," ").trim();if(!l)return"";if(Bc(l,g)<=f)return l;let o=Bc("\u2026",g),s="",r=0;for(let t of l){let n=Bc(t,g);if(r+n+o>f)break;s+=t,r+=n}return`${s}\u2026`}var Da=595.28,Pa=841.89,Na=841.89,La=595.28,Kr=28,Pn=96,kn=44,B7="'Malgun Gothic','\uB9D1\uC740 \uACE0\uB515','Apple SD Gothic Neo','Noto Sans KR',sans-serif",I7="'Batang','\uBC14\uD0D5','AppleMyungjo','Noto Serif KR',serif",Aa="#cbd5e1",E7=[`text { font-family: ${B7}; fill: #000000; }`,`.doc-title { font-family: ${I7}; 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; }
46
+ ${S}`.trim()).then(()=>{A(!0),window.setTimeout(()=>A(!1),1500)})},T=ma(en,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[Qt(en,{sx:{display:"flex",flexWrap:"wrap",gap:.75},children:[{code:"",label:"\uC6D0\uBB38"},...km].map(S=>Qt(I4,{label:S.label,clickable:!0,icon:S.code&&d(S.code)?Qt(hf,{sx:{fontSize:16}}):void 0,onClick:D=>u(S.code,D.currentTarget),color:t===S.code?"primary":"default",variant:t===S.code?"filled":"outlined",sx:{fontSize:14,height:30}},S.code||"__source__"))}),Qt(At,{open:!!c,anchorEl:c?.anchor??null,title:`${km.find(S=>S.code===c?.code)?.label??""}\uB85C AI \uBC88\uC5ED\uC744 \uC2DC\uC791\uD560\uAE4C\uC694?`,confirmText:"\uC2DC\uC791",cancelText:"\uCDE8\uC18C",placement:"bottom-start",onCancel:()=>i(null),onConfirm:()=>{c&&n(c.code),i(null)}}),t?x?Qt(en,{sx:{minHeight:200,display:"flex",alignItems:"center",justifyContent:"center"},children:Qt(es,{})}):B?Qt(en,{sx:{fontSize:15,color:"#c62828",py:2},children:B}):b?ma(en,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[b.summary?ma(en,{sx:{position:"relative",display:"flex",alignItems:"center",gap:2,px:1.5,pr:5,py:1.25,bgcolor:"#eef4ff",border:"1px solid #c7d7fe",borderRadius:1},children:[Qt(M4,{title:"\uC694\uC57D \uBCF5\uC0AC",arrow:!0,children:Qt(E4,{size:"small","aria-label":"\uC694\uC57D \uBCF5\uC0AC",onClick:q,sx:{position:"absolute",top:4,right:4,color:"#64748b"},children:P?Qt(hf,{sx:{fontSize:18,color:"#2f9e5b"}}):Qt(_m,{sx:{fontSize:18}})})}),Qt(O4,{sx:{fontSize:30,color:"#2563eb",flexShrink:0,mx:1.5}}),ma(en,{sx:{flex:1,minWidth:0},children:[Qt(en,{sx:{fontSize:16,fontWeight:600,color:"#1e3a8a"},children:"AI \uBC88\uC5ED (Gemini) \xB7 \uC6D0\uBB38\uACFC \uB2E4\uB97C \uC218 \uC788\uC2B5\uB2C8\uB2E4"}),Qt(en,{sx:{fontSize:15,color:"#111",mt:.25,lineHeight:1.5,whiteSpace:"pre-wrap",wordBreak:"break-word"},children:b.summary})]})]}):null,Qt(en,{sx:{fontSize:18,fontWeight:700,color:"#111",wordBreak:"break-word"},children:b.title}),b.html?Qt(en,{sx:{fontSize:16,lineHeight:1.6,color:"#37352f",wordBreak:"break-word","& > p:first-of-type":{mt:0},"& > p:last-of-type":{mb:0},"& a[href]":{color:"#2563eb",textDecoration:"underline"},"& img":{maxWidth:"100%"}},dangerouslySetInnerHTML:{__html:b.html}}):Qt(en,{sx:{fontSize:16,lineHeight:1.6,color:"#37352f",whiteSpace:"pre-wrap"},children:b.text})]}):null:ma(en,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[Qt(en,{sx:{fontSize:18,fontWeight:700,color:"#111",wordBreak:"break-word"},children:g}),Qt(en,{sx:{fontSize:16,lineHeight:1.6,color:"#37352f",wordBreak:"break-word","& > p:first-of-type":{mt:0},"& > p:last-of-type":{mb:0},"& a[href]":{color:"#2563eb",textDecoration:"underline"},"& img":{maxWidth:"100%"}},dangerouslySetInnerHTML:{__html:l||"<p></p>"}})]})]});return Qt(R4,{open:e,onClose:s,width:760,title:"\uB0B4\uC6A9 \uBC88\uC5ED",locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-content-translate",maxContentHeight:"80vh",sectionContentPaddingTop:0,sections:[{id:"translate",showTitle:!1,children:T}],actions:{showCancelButton:!1,left:t&&b?Qt(wm,{variant:"outlined",color:"inherit",startIcon:j?Qt(hf,{sx:{fontSize:18,color:"#2f9e5b"}}):Qt(_m,{sx:{fontSize:18}}),onClick:z,sx:{minWidth:80,color:"#37352f",borderColor:"#d9d9d6"},children:"\uBCF5\uC0AC"}):void 0,right:Qt(wm,{variant:"contained",onClick:s,sx:{minWidth:80},children:"\uB2EB\uAE30"})}})}import{ConfirmDialog as Nm,InfoAlert as o6}from"@ehfuse/alerts";import{DatePicker as i6}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 Tm({value:e,onCommit:f,onDraftChange:g,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),g?.(r.target.value)},onBlur:()=>{o!==null&&o.trim()!==e&&f(o),s(null)},onKeyDown:r=>{r.key==="Enter"&&r.target.blur(),r.key==="Escape"&&s(null)},sx:{mt:1}})}import{useMemo as bf,useState as yf}from"react";import{Box as $r,Button as Im,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 Fi(e){return e.relations??[]}function f$(e,f,g){return Fi(e).some(l=>l.type===g&&l.task_seq===f.seq)||Fi(f).some(l=>l.type===g&&l.task_seq===e.seq)}function Cm(e){return`${e.created_time??""}|${String(e.seq).padStart(12,"0")}`}function mf(e,f){let g=new Map(f.map(u=>[u.seq,u]));g.set(e.seq,e);let l=new Map,o=(u,b)=>{l.has(u)||l.set(u,new Set),l.has(b)||l.set(b,new Set),l.get(u).add(b),l.get(b).add(u)};for(let u of g.values())for(let b of Fi(u))b.type==="follow_up"&&g.has(b.task_seq)&&o(u.seq,b.task_seq);let s=new Set([e.seq]),r=[e.seq];for(;r.length>0;){let u=r.shift();for(let b of l.get(u)??[])s.has(b)||(s.add(b),r.push(b))}let t=[...s].map(u=>g.get(u)).filter(u=>!!u).sort((u,b)=>Cm(u).localeCompare(Cm(b))),n=new Set;for(let u of Fi(e))u.type==="related"&&n.add(u.task_seq);for(let u of g.values())u.seq!==e.seq&&Fi(u).some(b=>b.type==="related"&&b.task_seq===e.seq)&&n.add(u.seq);let c=[...n].map(u=>g.get(u)).filter(u=>u!==void 0&&u.seq!==e.seq),i=[...g.values()].filter(u=>u.seq!==e.seq&&Fi(u).some(b=>b.type==="duplicate_of"&&b.task_seq===e.seq)),a=Fi(e).find(u=>u.type==="duplicate_of")?.task_seq,h=a?g.get(a)??null:null,d=[...g.values()].filter(u=>u.seq!==e.seq&&(u.checklist??[]).some(b=>Number(b.task_seq??0)===e.seq));return{lineage:t,related:c,duplicates:i,duplicateOf:h,parents:d}}function gf(e,f){let g=mf(e,f);return(g.lineage.length>=2?g.lineage.length-1:0)+g.related.length+g.duplicates.length+(g.duplicateOf?1:0)+g.parents.length}function Bm(e,f){return gf(e,f)>0}import{Fragment as q4,jsx as er,jsxs as Vn}from"react/jsx-runtime";function tc({item:e,caption:f,onOpen:g,onUnlink:l}){let o=e.is_notice||e.is_event?Et(e.icon||(e.is_notice?pr:yr)):null;return Vn($r,{sx:{display:"flex",alignItems:"center",gap:.75,px:1.25,py:.5,borderRadius:1,"&:hover":{bgcolor:"#f7f7f5"},"&:hover .taskbox-relation-unlink":{opacity:1}},children:[f?er($r,{component:"span",sx:{flexShrink:0,px:.6,py:.1,borderRadius:.75,fontSize:11.5,fontWeight:500,color:"#8a6d1d",bgcolor:"#faf1d7"},children:f}):null,o?er(o,{sx:{fontSize:16,flexShrink:0,color:e.icon_color||"#1e3a8a"}}):null,Vn($r,{component:"span",onClick:g,sx:{flex:1,minWidth:0,fontSize:14,color:e.completed?"#9a9a97":"#37352f",textDecoration:e.completed?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...g?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}},children:[e.ticket_no?`${e.ticket_no} `:"",e.title]}),er(Lt,{option:xr(e),small:!0}),l?er(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:er(j4,{sx:{fontSize:15}})}):null]})}function Em({task:e,tasks:f,readOnly:g=!1,onOpenTask:l,onLink:o,onUnlink:s,onCreateFollowUp:r}){let[t,n]=yf(!1),[c,i]=yf(null),[a,h]=yf(null),d=bf(()=>mf(e,f),[e,f]),u=d.lineage.length>=2,b=bf(()=>gf(e,f),[e,f]),m=bf(()=>{let k=new Set;for(let B of d.lineage)k.add(B.seq);for(let B of d.related)k.add(B.seq);for(let B of d.duplicates)k.add(B.seq);for(let B of d.parents)k.add(B.seq);return d.duplicateOf&&k.add(d.duplicateOf.seq),[...k]},[d]),x=(k,B,R)=>{h({anchorEl:k,targetSeq:B,type:R})};return Vn(Mn,{icon:er(L4,{sx:{fontSize:19,display:"block"}}),title:Vn(q4,{children:["\uAD00\uB828 \uC5C5\uBB34",b>0?er($r,{component:"span",sx:{fontSize:12.5,color:"#9a9a97"},children:b}):null]}),titleExtra:g?null:Vn($r,{sx:{ml:"auto",display:"flex",alignItems:"center",gap:.5},children:[r?er(Im,{size:"small",color:"inherit",startIcon:er(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?er(Im,{size:"small",color:"inherit",startIcon:er(z4,{sx:{fontSize:16}}),onClick:()=>n(!0),sx:{minWidth:0,px:1,fontSize:12.5,color:"#787774"},children:"\uC5F0\uACB0"}):null]}),children:[Vn($r,{sx:{display:"flex",flexDirection:"column",mt:.5,pl:3.25},children:[u?er($r,{sx:{mb:d.related.length||d.duplicates.length||d.duplicateOf?1:0},children:d.lineage.map((k,B)=>{let R=k.seq===e.seq,j=B===d.lineage.length-1;return Vn($r,{sx:{display:"flex",gap:1},children:[Vn($r,{sx:{display:"flex",flexDirection:"column",alignItems:"center",width:14,flexShrink:0,pt:1.1},children:[er($r,{sx:{width:R?9:7,height:R?9:7,borderRadius:"50%",bgcolor:R?"#2f80ed":k.completed?"#9a9a97":"#c9c8c5",flexShrink:0}}),j?null:er($r,{sx:{width:"2px",flex:1,bgcolor:"#e6e6e3"}})]}),Vn($r,{sx:{flex:1,minWidth:0,pb:j?0:.5},children:[Vn($r,{sx:{display:"flex",alignItems:"center",gap:.75},children:[Vn($r,{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]}),er(Lt,{option:xr(k),small:!0})]}),er($r,{sx:{fontSize:12,color:"#9a9a97"},children:k.completed&&k.completed_time?`${k.completed_time} \uC644\uB8CC`:k.created_time??""})]})]},k.seq)})}):null,d.parents.map(k=>er(tc,{item:k,caption:"\uC0C1\uC704 \uC5C5\uBB34",onOpen:l?()=>l(k.seq):void 0},`parent-${k.seq}`)),d.duplicateOf?er(tc,{item:d.duplicateOf,caption:"\uC6D0\uBCF8",onOpen:l?()=>l(d.duplicateOf.seq):void 0,onUnlink:!g&&s?k=>x(k.currentTarget,d.duplicateOf.seq,"duplicate_of"):void 0}):null,d.duplicates.map(k=>er(tc,{item:k,caption:"\uC911\uBCF5",onOpen:l?()=>l(k.seq):void 0,onUnlink:!g&&s?B=>x(B.currentTarget,k.seq,"duplicate_of"):void 0},`dup-${k.seq}`)),d.related.map(k=>er(tc,{item:k,onOpen:l?()=>l(k.seq):void 0,onUnlink:!g&&s?B=>x(B.currentTarget,k.seq,"related"):void 0},`rel-${k.seq}`)),b===0?er($r,{sx:{px:1.25,py:.75,fontSize:13.5,color:"#9a9a97"},children:"\uC5F0\uACB0\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):null]}),o?er($l,{open:t,task:e,tasks:f,excludeSeqs:m,onClose:()=>n(!1),onSubmit:(k,B)=>o(e.seq,k,B)}):null,er(At,{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)}}),er(At,{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 _e,jsxs as Gt}from"react/jsx-runtime";function di({label:e="\uBE44\uC5B4 \uC788\uC74C"}){return _e(or,{component:"span",sx:{color:"#9a9a97"},children:e})}function Lm({task:e,customTabs:f,statusOptions:g,avatarSrcByName:l,onChangeStatus:o,onChangeLabels:s,onAddLabelOption:r,onChangeProject:t,onAddProject:n,onChangeDate:c,onChangeReminder:i,onMemberEdit:a,onChangePriority:h,onChangeVisibility:d,onChangeRepeat:u,departments:b=[],onChangeEventTime:m,onChangeEventPlace:x,onChangeEventAddress:k,onChangeNote:B,onChangeNoteDraft:R,onChangeContent:j,contentTemplates:A,onSaveContentTemplate:P,onRemoveContentTemplate:N,contentLoading:q=!1,onChangeContentHeight:z,onAddChecklistItem:T,onToggleChecklistItem:S,onRemoveChecklistItem:D,onUpdateChecklistItem:p,onReorderChecklist:y,onConvertChecklistToTask:v,onOpenChecklistTask:w,onLinkChecklistTask:_,resolveChecklistTask:C,relatedTasksPool:O,onOpenRelatedTask:F,onLinkRelatedTask:$,onUnlinkRelatedTask:K,onCreateFollowUpTask:M,onAddAttachments:H,onRemoveAttachment:E,onPreview:I,onDownload:L,onUpdateComment:U,onRemoveComment:G,onToggleCommentReaction:V,currentUserName:W="",myAccountSeq:X=0,headerless:Z=!1,noticeAdmin:Y=!1,hideProject:J=!1,hideLabel:ee=!1,showTitle:ne=!1,onChangeTitle:te,onToggleCompleted:oe,onChangeIcon:se,onChangeIconColor:de,employees:ge=[],onAckConfirm:ke,onRequestConfirm:Be,onChangeBugField:Te,sprints:Re=[],sprintProject:it=!1,hideSprint:be=!1,onChangeSprint:ie,onChangeStoryPoints:Ce,onChangeResolution:we,onClaimTask:ve,onVerifyBug:Ke}){let[De,pe]=dn(null),Bt=$4(!1),[Fe,Ye]=dn(null),[_t,tt]=dn(null),[Ae,xe]=dn(null),[me,Ie]=dn(!1),Xe={[Hn]:me?{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"}},[qe,Pe]=dn(null),[Mt,Ue]=dn(null),[re,le]=dn(null),[fe,Se]=dn(null),[pt,Me]=dn(null),[ze,St]=dn(null),[Oe,Ne]=dn(null),at=!!e.is_notice,Ge=!!e.is_event,ct=!!e.is_bug,Rt=!!ve&&rl(e,X),{onReturnTask:ht,onReviewDone:Ut,editPolicy:Kt,translateContent:Yt,contentTranslate:tr}=ot(),Q=Z&&!!Ut&&!!ht&&Zr(e,X),[ae,ye]=dn(null),he=!!(Yt&&tr),[Ee,$e]=dn(!1),We=!!ve&&nl(e,X),rt=!!Ke&&ct&&!!e.completed&&X>0&&(e.author_account_seq??0)===X&&!(e.acks??[]).some(ce=>ce.account_seq===X),Je=!Qn(e,X),Ve=Qo(e,X,Kt),st=!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),It=e.is_notice||e.is_event?Et(e.icon||(e.is_notice?pr:yr)):null,jt=at?!tl(e,X):Je,kt=Rt||We?Gt(eo,{onClick:ce=>Ne(ce.currentTarget),children:[_e(t6,{sx:{fontSize:16,mr:.5}}),"\uAC00\uC838\uAC00\uAE30"]}):null,Pt=at?Xl(e,ge):"",Ot=at?Xp(e,ge,X):null,Ft=at?null:ts(e,X),Lr=!!(Ft&&Ft.total>0||at&&Ot),Gr=(e.origin_license_seq??0)>0,Sn=!at&&!Gr,Xn=Gt(Hr,{children:[_e(vt,{icon:_e(J4,{sx:{fontSize:17}}),label:"\uC791\uC131\uC790",sx:[uo(9),Xe??null,...Ge?[]:[cr(1)]],children:e.created_by?Gt(Hr,{children:[_e(Jr,{names:[e.created_by],size:20,avatarSrcByName:l}),e.created_by]}):_e(di,{})}),_e(vt,{icon:_e(Om,{sx:{fontSize:17}}),label:"\uC791\uC131\uC77C\uC2DC",sx:[uo(11),Xe??null,...Ge?[]:[cr(2)]],children:e.created_time?bn(e.created_time):_e(di,{})})]});return Gt(Hr,{children:[ne?Gt(or,{sx:{px:2,pt:2,pb:.5,display:"flex",alignItems:"flex-start",gap:1},children:[st?_e(H4,{checked:e.completed,icon:_e(Y4,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:_e(wf,{sx:{fontSize:22,color:"#2f80ed"}}),onChange:(ce,Qe)=>{_t||tt({anchorEl:ce.currentTarget,nextCompleted:Qe})},sx:{p:0,mt:.25}}):null,It?Ge&&!Je?_e(Mm,{onClick:ce=>Ye(ce.currentTarget),sx:{display:"flex",p:.25,mt:.1,borderRadius:1,color:e.icon_color||"#1e3a8a","&:hover":{bgcolor:"#f2f2f0"}},children:_e(It,{sx:{fontSize:20}})}):_e(or,{sx:{display:"flex",p:0,mt:.25,color:e.icon_color||(at?"#e5484d":"#1e3a8a")},children:_e(It,{sx:{fontSize:20}})}):null,_e(or,{sx:{flex:1,minWidth:0},children:De!==null?_e(or,{component:"div",contentEditable:!0,suppressContentEditableWarning:!0,spellCheck:!1,ref:ce=>{if(!ce||ce.dataset.focused)return;ce.dataset.focused="1",ce.focus();let Qe=document.createRange();Qe.selectNodeContents(ce),Qe.collapse(!1);let mt=window.getSelection();mt?.removeAllRanges(),mt?.addRange(Qe)},onBlur:ce=>{let Qe=(ce.currentTarget.textContent??"").replace(/\n/g," ").trim();!Bt.current&&Qe&&Qe!==e.title&&te(e.seq,Qe),Bt.current=!1,pe(null)},onKeyDown:ce=>{ce.key==="Enter"&&(ce.preventDefault(),ce.target.blur()),ce.key==="Escape"&&(Bt.current=!0,ce.target.blur())},onPaste:ce=>{ce.preventDefault();let Qe=ce.clipboardData.getData("text/plain").replace(/\n/g," ");document.execCommand("insertText",!1,Qe)},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:De}):_e(or,{onClick:Ve?void 0:()=>pe(e.title),sx:{fontSize:19,fontWeight:600,color:"#37352f",lineHeight:"26px",cursor:Ve?"default":"text",textDecoration:e.completed?"line-through":"none",userSelect:"text",wordBreak:"break-word"},children:e.title})}),_e(cn,{open:!!_t,anchorEl:_t?.anchorEl??null,nextCompleted:_t?.nextCompleted??!1,returnMode:!!ht&&Zr(e,X),onCancel:()=>tt(null),onConfirm:ce=>{_t&&(ce&&ht?ht(e,ce):oe(e.seq,_t.nextCompleted)),tt(null)}})]}):null,Gt(or,{sx:{py:1.5,display:"flex",flexDirection:"column",gap:0,[Hn]:{pb:0,"& > :last-child":{mb:0}}},children:[_e(Dl,{hideProject:J,pinColumns:!0,projectColumn:!Ge&&!ee?2:"full",values:{tabKey:e.tab_key??"",managerName:e.manager_name,receiverNames:e.receiver_names,startDate:e.start_date,dueDate:e.due_date,reminders:ro(e),priority:e.priority,eventTime:e.event_time??"",eventPlace:e.event_place??"",eventAddress:e.event_address??""},customTabs:f,avatarSrcByName:il(e,l),hideDueDate:!Ge&&!!e.repeat_rule,notice:at,event:Ge,readOnly:Je,coreLocked:Ve,targetSummary:Pt,onChangeProject:ce=>t(e.seq,ce),onAddProject:n,onChangeStartDate:ce=>c(e.seq,"start_date",ce),onChangeDueDate:ce=>c(e.seq,"due_date",ce),onChangeReminder:ce=>i(e.seq,ce),onChangePriority:ce=>h(e.seq,ce),onChangeEventTime:ce=>m?.(e.seq,ce),onChangeEventPlace:ce=>x?.(e.seq,ce),onChangeEventAddress:ce=>k?.(e.seq,ce),onMemberEdit:ce=>a(e,ce,null),narrowCollapsedSx:Xe,reminderLocked:e.completed,managerAction:kt,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:fl(e.support_type??"")}:void 0,leading:Gt(Hr,{children:[rt||kt&&(at||Ge)?Gt(or,{sx:{gridColumn:"1 / -1",display:"flex",justifyContent:"flex-start",gap:2,px:2,py:1.5},children:[at||Ge?kt:null,rt?Gt(Hr,{children:[_e(qi,{variant:"contained",size:"large",onClick:()=>Ke?.(e.seq,!0),sx:{bgcolor:"#2f80ed"},children:"\uAC80\uC99D\uC644\uB8CC"}),_e(qi,{variant:"outlined",size:"large",color:"error",onClick:()=>Ke?.(e.seq,!1),children:"\uC7AC\uC624\uD508"})]}):null]}):null,ct&&e.ticket_no?_e(vt,{icon:_e(V4,{sx:{fontSize:17}}),label:"\uD2F0\uCF13",sx:cr(1),children:_e(or,{component:"span",sx:{fontVariantNumeric:"tabular-nums"},children:e.ticket_no})}):null,Ge?null:_e(or,{sx:ct&&e.ticket_no||Sn||Lr?cr(ct&&e.ticket_no?2:1):{gridColumn:"1 / -1"},children:Gt(vt,{icon:_e(X4,{sx:{fontSize:17}}),label:"\uC0C1\uD0DC",onClick:Je||e.completed?void 0:ce=>Pe(ce),children:[_e(Lt,{option:xr(e)}),Q?Gt(Hr,{children:[_e(qi,{size:"small",variant:"contained",disableElevation:!0,onClick:ce=>{ce.stopPropagation(),ye(ce.currentTarget)},sx:{ml:1,...ei},children:"\uAC80\uC218\uC644\uB8CC"}),_e(ti,{anchorEl:ae,onCancel:()=>ye(null),onConfirm:()=>{Ut?.(e),ye(null)}})]}):null]})}),Sn?(()=>{let ce=Ln(e),Qe=ce==="all"?_e(Dm,{sx:{fontSize:17,color:"#2f80ed"}}):ce==="group"?_e(Pm,{sx:{fontSize:17,color:"#d9730d"}}):_e(Am,{sx:{fontSize:17}}),mt=ce==="all"?"\uC804\uCCB4\uACF5\uAC1C":ce==="group"?`\uBD80\uC11C\uACF5\uAC1C \xB7 ${b.find(zr=>zr.seq===(e.visibility_group_seq??0))?.name??"\uBD80\uC11C"}`:"\uBE44\uACF5\uAC1C";return _e(or,{sx:Ge?void 0:cr(ct?1:2),children:_e(vt,{icon:Qe,label:"\uACF5\uAC1C",onClick:Ve||!d?void 0:zr=>Ue(zr),children:mt})})})():null,!at&&!ct&&!Gr?_e(or,{sx:Ge?void 0:cr(1),children:_e(vt,{icon:_e(r6,{sx:{fontSize:17,...e.repeat_rule?{color:"#2f80ed"}:{}}}),label:"\uBC18\uBCF5",onClick:Ve||!u?void 0:ce=>le(ce),children:e.repeat_rule?El(e.repeat_rule):_e(di,{label:"\uC5C6\uC74C"})})}):null,!at&&!ct&&e.repeat_rule?_e(or,{sx:Ge?void 0:cr(2),children:_e(vt,{icon:_e(n6,{sx:{fontSize:17}}),label:"\uBC18\uBCF5 \uC885\uB8CC",onClick:Ve||!u?void 0:ce=>Se(ce),children:e.repeat_until?`${e.repeat_until}\uAE4C\uC9C0`:_e(di,{})})}):null,Ft&&Ft.total>0?_e(or,{sx:Ge?void 0:cr(2),children:_e(vt,{icon:_e(_f,{sx:{fontSize:17}}),label:"\uD655\uC778",children:Ft.canConfirm?_e(qi,{size:"small",variant:"contained",onClick:()=>ke?.(e.seq),sx:{py:.1,px:1.25,minWidth:0,color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}},children:"\uD655\uC778"}):Gt(qi,{size:"small",variant:"outlined",color:"inherit",startIcon:Ft.myTime?_e(wf,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:ce=>xe({anchorEl:ce.currentTarget,open:!0}),sx:{py:.1,px:1.25,minWidth:0,fontSize:13,color:"text.primary",borderColor:"#d5d8dc",bgcolor:"#fff",whiteSpace:"nowrap"},children:[Ft.count," / ",Ft.total]})})}):null,at&&Ot?_e(or,{sx:cr(2),children:_e(vt,{icon:_e(_f,{sx:{fontSize:17}}),label:"\uD655\uC778",children:_e(or,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,minWidth:0},children:Ot.canAck?_e(qi,{size:"small",variant:"contained",onClick:()=>ke?.(e.seq),sx:{py:.1,px:1.25,minWidth:0,color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}},children:"\uD655\uC778"}):_e(qi,{size:"small",variant:"outlined",color:"inherit",startIcon:Ot.acked?_e(wf,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:ce=>xe({anchorEl:ce.currentTarget,open:!0}),sx:{py:.1,px:1.25,minWidth:0,fontSize:13,color:"text.primary",borderColor:"#d5d8dc",bgcolor:"#fff",whiteSpace:"nowrap"},children:Ot.total>0&&Ot.count>=Ot.total?"\uC644\uB8CC":Gt(Hr,{children:[Ot.count,_e(or,{component:"span",sx:{mx:.4},children:"/"}),Ot.total]})})})})}):null,it&&!be&&!Ge&&!at?Gt(Hr,{children:[_e(vt,{icon:_e(K4,{sx:{fontSize:17}}),label:"\uBAA9\uD45C",onClick:Ve?void 0:ce=>Me(ce),sx:cr(1),children:(e.sprint_seq??0)>0?Re.find(ce=>ce.seq===e.sprint_seq)?.name??"\uC0AD\uC81C\uB41C \uC2A4\uD504\uB9B0\uD2B8":_e(di,{label:"\uBBF8\uBC30\uC815"})}),_e(vt,{icon:_e(G4,{sx:{fontSize:17}}),label:"\uD3EC\uC778\uD2B8",sx:cr(2),children:_e(Lo,{value:(e.story_points??0)>0?String(e.story_points):"",placeholder:"\uBBF8\uCD94\uC815",readOnly:Ve,onCommit:ce=>Ce?.(e.seq,Number(ce.replace(/[^0-9.]/g,""))||0)})})]}):null,Ge||ee?null:_e(or,{sx:[J?{gridColumn:"1 / -1"}:cr(1),Xe??null],children:_e(vt,{icon:_e(Z4,{sx:{fontSize:17}}),label:"\uB77C\uBCA8",onClick:Je?void 0:ce=>St(ce),children:(e.label_keys??[]).length>0?_e(Zo,{labelKeys:e.label_keys??[],labelOptions:g}):_e(di,{})})})]}),afterProject:Ge?null:Xn,trailing:Gt(Hr,{children:[ct?_e(Pl,{values:{repro:e.bug_repro??"",device:e.bug_device??"",where:e.bug_where??"",version:e.bug_version??"",resolution:e.resolution??""},readOnly:Ve,showResolution:!!e.completed,onChangeRepro:ce=>Te?.(e.seq,"bug_repro",ce),onChangeDevice:ce=>Te?.(e.seq,"bug_device",ce),onChangeWhere:ce=>Te?.(e.seq,"bug_where",ce),onChangeVersion:ce=>Te?.(e.seq,"bug_version",ce),onChangeResolution:ce=>we?.(e.seq,ce)}):null,Ge?Xn:null,e.completed?Gt(Hr,{children:[_e(vt,{icon:_e(_f,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC790",sx:[uo(10),Xe??null,...Ge?[]:[cr(1)]],children:e.completed_by?Gt(Hr,{children:[_e(Jr,{names:[e.completed_by],size:20,avatarSrcByName:l}),e.completed_by]}):_e(di,{})}),_e(vt,{icon:_e(Om,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC77C\uC2DC",sx:[uo(12),Xe??null,...Ge?[]:[cr(2)]],children:e.completed_time?bn(e.completed_time):_e(di,{})})]}):null]})}),Gt(or,{sx:{display:"none",[Hn]:{display:"block",mt:1.5,mb:0}},children:[_e($i,{sx:{borderColor:"#e6e6e3"}}),_e(Mm,{onClick:()=>Ie(ce=>!ce),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:me?Gt(Hr,{children:["\uC811\uAE30 ",_e(W4,{sx:{fontSize:18}})]}):Gt(Hr,{children:["\uC815\uBCF4 \uB354\uBCF4\uAE30 ",_e(U4,{sx:{fontSize:18}})]})})]}),Gt(or,{children:[_e($i,{sx:{my:1.5,borderColor:"#e6e6e3",[Hn]:{mt:0,mb:1.25}}}),_e(Mn,{icon:_e(Q4,{sx:{fontSize:18,display:"block"}}),title:"\uB0B4\uC6A9",titleExtra:A&&!Ve?_e(Ll,{content:e.content??"",templates:A,onApply:ce=>j?.(e.seq,ce),onSave:P,onRemove:N}):void 0,children:_e(or,{sx:{userSelect:"text"},children:q?_e(or,{sx:{minHeight:e.content_height||180,display:"flex",alignItems:"center",justifyContent:"center"},children:_e(es,{})}):_e(Fl,{syncKey:e.seq,value:e.content??"",height:e.content_height??0,onChangeHeight:z?ce=>z(e.seq,ce):void 0,readOnly:Ve,viewFirst:!0,onTranslate:he?()=>$e(!0):void 0,onChange:ce=>j(e.seq,ce)})})}),e.is_bug?null:Gt(Hr,{children:[_e($i,{sx:{my:1.5,borderColor:"#e6e6e3"}}),_e(Mn,{icon:_e(e6,{sx:{fontSize:18,display:"block"}}),title:"\uBE44\uACE0",children:_e(or,{sx:{userSelect:"text"},children:_e(Tm,{value:e.note,readOnly:jt,onCommit:ce=>B(e.seq,ce),onDraftChange:R?ce=>R(e.seq,ce):void 0})})})]}),Ge?null:Gt(Hr,{children:[_e($i,{sx:{my:1.5,borderColor:"#e6e6e3"}}),_e(Hl,{taskSeq:e.seq,checklist:e.checklist??[],removeLocked:jt,onAdd:T,onToggle:S,confirmOnToggle:!0,onRemove:D,onUpdate:p,onReorder:y,onConvertToTask:v,onOpenLinkedTask:w,resolveLinkedTask:C,myAccountSeq:X,linkCandidates:O,linkBaseTask:e,onLinkExistingTask:_})]}),O&&!Ge&&!at&&Bm(e,O)?Gt(Hr,{children:[_e($i,{sx:{my:1.5,borderColor:"#e6e6e3"}}),_e(Em,{task:e,tasks:O,readOnly:Je,onOpenTask:F,onLink:$,onUnlink:K,onCreateFollowUp:M})]}):null,_e($i,{sx:{my:1.5,borderColor:"#e6e6e3"}}),_e(Kl,{taskSeq:e.seq,attachments:e.attachments??[],removeLocked:at?jt:Ve,onAdd:H,onRemove:E,onPreview:I?(ce,Qe)=>I({...ce,taskSeq:e.seq},Qe?.map(mt=>({...mt,taskSeq:e.seq}))):void 0,onDownload:L?ce=>L({...ce,taskSeq:e.seq}):void 0})]}),_e($i,{sx:{my:1.5,borderColor:"#e6e6e3"}}),_e(hm,{taskSeq:e.seq,comments:e.comments??[],currentUserName:W,myAccountSeq:X,avatarSrcByName:l,onUpdate:U,onRemove:G,onToggleReaction:V,onPreview:I?(ce,Qe)=>I({...ce,taskSeq:e.seq},Qe?.map(mt=>({...mt,taskSeq:e.seq}))):void 0,onDownload:L?ce=>L({...ce,taskSeq:e.seq}):void 0})]}),he?_e(Sm,{open:Ee,taskSeq:e.seq,title:e.title,html:e.content??"",translatedTargets:e.translated_targets??[],onClose:()=>$e(!1)}):null,_e(Gi,{anchorEl:qe,value:e.status,options:at?qs:ct?Si:$s,onSelect:ce=>o(e.seq,ce),onClose:()=>Pe(null)}),_e(xf,{transitionDuration:0,anchorEl:re,open:!!re,onClose:()=>le(null),children:[{value:"",label:"\uC5C6\uC74C"},...na].map(ce=>_e(vf,{selected:(e.repeat_rule??"")===ce.value,onClick:()=>{le(null),(async()=>{let Qe=e.repeat_rule??"";if(ce.value===Qe)return;if(ce.value===""){await Nm({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 mt=String(e.due_date??"").slice(0,10);if(!mt){o6(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}Qe&&!await Nm({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,ce.value,Ml(mt,ce.value))})()},sx:{fontSize:14,minWidth:140},children:ce.label},ce.value||"none"))}),_e(i6,{anchorEl:fe,open:!!fe,onClose:()=>Se(null),selectedDate:e.repeat_until?new Date(`${e.repeat_until}T00:00:00`):new Date,onDateChange:ce=>{Se(null);let Qe=ue=>String(ue).padStart(2,"0"),mt=`${ce.getFullYear()}-${Qe(ce.getMonth()+1)}-${Qe(ce.getDate())}`,zr=e.repeat_rule??"";zr&&u?.(e.seq,zr,mt)}}),_e(xf,{transitionDuration:0,anchorEl:Mt,open:!!Mt,onClose:()=>Ue(null),children:[{key:"involved",label:"\uBE44\uACF5\uAC1C",icon:_e(Am,{sx:{fontSize:17,color:"#57564f"}}),selected:Ln(e)==="involved",onPick:()=>d?.(e.seq,"involved",0)},{key:"all",label:"\uC804\uCCB4\uACF5\uAC1C",icon:_e(Dm,{sx:{fontSize:17,color:"#2f80ed"}}),selected:Ln(e)==="all",onPick:()=>d?.(e.seq,"all",0)},...b.map(ce=>({key:`group-${ce.seq}`,label:`\uBD80\uC11C\uACF5\uAC1C \xB7 ${ce.name}`,icon:_e(Pm,{sx:{fontSize:17,color:"#d9730d"}}),selected:Ln(e)==="group"&&(e.visibility_group_seq??0)===ce.seq,onPick:()=>d?.(e.seq,"group",ce.seq)}))].map(ce=>Gt(vf,{selected:ce.selected,onClick:()=>{ce.onPick(),Ue(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[ce.icon,ce.label,ce.selected?_e(Rm,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},ce.key))}),_e(xf,{transitionDuration:0,anchorEl:pt,open:!!pt,onClose:()=>Me(null),children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...Re.filter(ce=>`custom-${ce.group_seq}`===String(e.tab_key??"")).map(ce=>({seq:ce.seq,label:In(ce)}))].map(ce=>Gt(vf,{onClick:()=>{ie?.(e.seq,ce.seq),Me(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[ce.label,(e.sprint_seq??0)===ce.seq?_e(Rm,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},ce.seq))}),_e(gl,{anchorEl:Ae?.anchorEl??null,open:!!Ae?.open,acks:e.acks??[],total:Ot?.total??Ft?.total??0,pendingNames:Ot?.pendingNames??Ft?.pendingNames??[],avatarSrcByName:l,onRequestConfirm:Be&&(Ot?Ot.count<Ot.total:Ft&&Ft.count<Ft.total)?()=>{Be(e.seq),xe(ce=>ce?{...ce,open:!1}:null)}:void 0,onClose:()=>xe(ce=>ce?{...ce,open:!1}:null)}),_e(Yl,{anchorEl:ze,selectedKeys:e.label_keys??[],labelOptions:g,onToggle:ce=>s(e.seq,Xa(e.label_keys??[],ce)),onAddLabel:r,onClose:()=>St(null)}),_e(ni,{anchorEl:Fe,value:e.icon??"",color:e.icon_color??"",onSelect:ce=>{se(e.seq,ce),Ye(null)},onSelectColor:de?ce=>de(e.seq,ce):void 0,onClose:()=>Ye(null)}),_e(At,{open:!!Oe,anchorEl:Oe,title:Rt?"\uC774 \uC5C5\uBB34\uB97C \uAC00\uC838\uC640 \uCC45\uC784\uC790\uB97C \uB9E1\uC73C\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?":"\uC774 \uC5C5\uBB34\uC758 \uCC45\uC784\uC790\uB97C \uB9E1\uC73C\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uAC00\uC838\uAC00\uAE30",onCancel:()=>Ne(null),onConfirm:()=>{ve?.(e.seq),Ne(null)}})]})}function mo(e){let f=g=>String(g).padStart(2,"0");return`${e.getFullYear()}-${f(e.getMonth()+1)}-${f(e.getDate())}`}function zm(e=new Date){let f=g=>String(g).padStart(2,"0");return`${mo(e)} ${f(e.getHours())}:${f(e.getMinutes())}`}function rc(e,f=new Date){let g=new Date(f);return g.setMonth(g.getMonth()-e),g}function FH(e=new Date){return{fromDate:mo(rc(1,e)),toDate:mo(e)}}import{Fragment as b6,jsx as Zt,jsxs as xs}from"react/jsx-runtime";function aW(){let e=new Date,f=g=>String(g).padStart(2,"0");return`${e.getFullYear()}-${f(e.getMonth()+1)}-${f(e.getDate())} ${f(e.getHours())}:${f(e.getMinutes())}`}function lW({open:e,task:f,onClose:g,onAddComment:l,onSaveFields:o,presentation:s="auto",myAccountSeq:r=0,onToggleCompleted:t,onChangeTitle:n,onChangeIcon:c,onChangeIconColor:i,activityItems:a,activityLoading:h,onLoadActivity:d,onPrint:u,onDelete:b,canDelete:m,...x}){let k=qt(),B=oc(null);f&&(B.current=f);let R=f??B.current,[j,A]=ic(!1),[P,N]=ic(null),[q,z]=ic(null),{editPolicy:T,onEditSessionEnd:S}=ot(),D=!!b&&(m??(R?!Ti(R,r,T,!(r>0&&(R.author_account_seq??0)===r)):!1)),[p,y]=ic({}),v=Object.keys(p).length>0;nc(()=>{y({})},[f?.seq,e]);let w=oc(null),_=s6(()=>{let G=w.current;w.current=null,G?.edited&&G.seq>0&&S?.(G.seq)},[S]),C=()=>{let G=f?.seq??B.current?.seq??0;G&&(w.current?.seq===G?w.current.edited=!0:w.current={seq:G,edited:!0})};nc(()=>{let G=f?.seq??0;if(e&&G>0){w.current?.seq!==G&&(_(),w.current={seq:G,edited:!1});return}_()},[e,f?.seq,_]);let O=oc(_);O.current=_,nc(()=>()=>O.current(),[]);let F=oc(null);if(nc(()=>{F.current?.scrollTo({top:0})},[f?.seq]),!R)return null;let $=k&&v?{...R,...p}:R,K=$.checklist??[],M=(G,V)=>{C(),k?y(W=>({...W,...G})):V()},H=()=>{let G=p;y({});let V=R.seq,W=!!w.current?.edited;w.current&&(w.current.edited=!1),W&&V>0&&S?.(V);let X=G.title===void 0?void 0:String(G.title).trim();if(o){let Z={...G};X!==void 0&&(X?Z.title=X:delete Z.title),Object.keys(Z).length>0&&o(V,Z),Fm({message:"\uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",position:"center"});return}X&&n(V,X),G.icon!==void 0&&c(V,String(G.icon)),G.icon_color!==void 0&&i?.(V,String(G.icon_color)),G.status!==void 0&&x.onChangeStatus(V,G.status),G.label_keys!==void 0&&x.onChangeLabels(V,G.label_keys??[]),G.tab_key!==void 0&&x.onChangeProject(V,String(G.tab_key??"")),G.start_date!==void 0&&x.onChangeDate(V,"start_date",String(G.start_date??"")),G.due_date!==void 0&&x.onChangeDate(V,"due_date",String(G.due_date??"")),G.reminders!==void 0&&x.onChangeReminder(V,G.reminders),G.priority!==void 0&&x.onChangePriority(V,G.priority),G.event_time!==void 0&&x.onChangeEventTime?.(V,String(G.event_time??"")),G.event_place!==void 0&&x.onChangeEventPlace?.(V,String(G.event_place??"")),G.event_address!==void 0&&x.onChangeEventAddress?.(V,String(G.event_address??"")),G.content!==void 0&&x.onChangeContent(V,String(G.content??"")),G.note!==void 0&&x.onChangeNote(V,String(G.note??"")),G.visibility!==void 0&&x.onChangeVisibility?.(V,G.visibility,Number(G.visibility_group_seq??0)),Fm({message:"\uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",position:"center"})},E={...x,onChangeStatus:(G,V)=>{let W=V==="in_progress"||V==="bug_in_progress",X=!String($.start_date??"").trim(),Z=W&&X?{status:V,start_date:zm()}:{status:V};M(Z,()=>x.onChangeStatus(G,V))},onChangeLabels:(G,V)=>M({label_keys:V},()=>x.onChangeLabels(G,V)),onChangeProject:(G,V)=>M({tab_key:V},()=>x.onChangeProject(G,V)),onChangeDate:(G,V,W)=>M({[V]:W},()=>x.onChangeDate(G,V,W)),onChangeReminder:(G,V)=>M({reminders:V},()=>x.onChangeReminder(G,V)),onChangePriority:(G,V)=>M({priority:V},()=>x.onChangePriority(G,V)),onChangeEventTime:(G,V)=>M({event_time:V},()=>x.onChangeEventTime?.(G,V)),onChangeEventPlace:(G,V)=>M({event_place:V},()=>x.onChangeEventPlace?.(G,V)),onChangeEventAddress:(G,V)=>M({event_address:V},()=>x.onChangeEventAddress?.(G,V)),onChangeContent:(G,V)=>M({content:V},()=>x.onChangeContent(G,V)),onChangeNote:(G,V)=>M({note:V},()=>x.onChangeNote(G,V)),onMemberEdit:(G,V)=>x.onMemberEdit(G,V,k?W=>y(X=>({...X,...W})):null),onChangeNoteDraft:k?(G,V)=>M({note:V},()=>{}):void 0,onChangeVisibility:x.onChangeVisibility?(G,V,W)=>M({visibility:V,visibility_group_seq:W},()=>x.onChangeVisibility?.(G,V,W)):void 0,onAddChecklistItem:(G,V)=>M({checklist:[...K,{label:V,checked:!1}]},()=>x.onAddChecklistItem(G,V)),onToggleChecklistItem:(G,V,W)=>M({checklist:K.map((X,Z)=>Z===V?{...X,checked:W}:X)},()=>x.onToggleChecklistItem(G,V,W)),onRemoveChecklistItem:(G,V)=>M({checklist:K.filter((W,X)=>X!==V)},()=>x.onRemoveChecklistItem(G,V)),onUpdateChecklistItem:x.onUpdateChecklistItem?(G,V,W)=>M({checklist:K.map((X,Z)=>Z===V?{...X,label:W}:X)},()=>x.onUpdateChecklistItem?.(G,V,W)):void 0,onReorderChecklist:x.onReorderChecklist?(G,V)=>M({checklist:V},()=>x.onReorderChecklist?.(G,V)):void 0,onAddAttachments:(G,V)=>{C(),x.onAddAttachments(G,V)},onRemoveAttachment:(G,V)=>{C(),x.onRemoveAttachment(G,V)},onLinkChecklistTask:x.onLinkChecklistTask?(G,V,W)=>M({checklist:[...K,{label:W,checked:!1,task_seq:V}]},()=>x.onLinkChecklistTask?.(G,V,W)):void 0},I=k||s==="dialog",L=Zt(Lm,{...E,headerless:I,task:$,myAccountSeq:r,onChangeTitle:(G,V)=>M({title:V},()=>n(G,V)),onToggleCompleted:t,onChangeIcon:(G,V)=>M({icon:V},()=>c(G,V)),onChangeIconColor:(G,V)=>M({icon_color:V},()=>i?.(G,V)),showTitle:k||s==="dialog"}),U=Zt(pm,{onSubmit:(G,V)=>l($.seq,G,V)},$.seq);return I?xs(b6,{children:[Zt(g6,{open:e,onClose:g,locale:"ko",fontScale:{enabled:!0,default:1.1,min:.6},title:$.is_notice?"\uACF5\uC9C0\uC0AC\uD56D":$.is_event?"\uC77C\uC815":$.is_bug?"\uC624\uB958":"\uC5C5\uBB34",titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1},custom:[...k?[{raw:!0,icon:Zt(a6,{variant:"contained",size:"small",disableElevation:!0,disabled:!v,onClick:v?H: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"})}]:[],{raw:!0,icon:Zt(c6,{size:"small","aria-label":"\uB354\uBCF4\uAE30",onClick:G=>N(G.currentTarget),children:Zt(f6,{sx:{color:"#6b7280"}})})}]},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:U},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:Zt(sc,{sx:{userSelect:"none",width:"100%",minWidth:0,display:"flex",flexDirection:"column",gap:0},children:L})}]},R.seq),xs(u6,{open:!!P,anchorEl:P,onClose:()=>N(null),anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},sx:{zIndex:1500},children:[d?xs(Tf,{onClick:()=>{N(null),A(!0)},children:[Zt(kf,{children:Zt(p6,{fontSize:"small"})}),Zt(Sf,{children:"\uD65C\uB3D9"})]}):null,xs(Tf,{onClick:()=>{N(null),ps($,!0)},children:[Zt(kf,{children:Zt(h6,{fontSize:"small"})}),Zt(Sf,{children:"\uACF5\uC720\uD558\uAE30"})]}),D?xs(Tf,{onClick:G=>{let V=P??G.currentTarget;N(null),z(V)},sx:{color:"#e5484d"},children:[Zt(kf,{children:Zt(d6,{fontSize:"small",sx:{color:"#e5484d"}})}),Zt(Sf,{children:"\uC0AD\uC81C"})]}):null]}),Zt(At,{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:()=>z(null),onConfirm:()=>{z(null),b?.($)}}),Zt(ec,{open:j,taskSeq:$.seq,items:a,loading:h,onLoad:d,onClose:()=>A(!1)})]}):Zt(l6,{anchor:"right",open:e,onClose:g,"aria-label":"\uC5C5\uBB34 \uC0C1\uC138",disableAutoFocus:!0,disableEnforceFocus:!0,sx:{zIndex:G=>G.zIndex.modal},slotProps:{paper:{sx:{width:720,maxWidth:"100vw"}}},children:xs(sc,{sx:{display:"flex",flexDirection:"column",height:"100%",userSelect:"none"},children:[Zt(xm,{task:$,myAccountSeq:r,onToggleCompleted:t,onChangeTitle:n,onChangeIcon:c,onChangeIconColor:i,onClose:g,activityItems:a,activityLoading:h,onLoadActivity:d,onPrint:u,onDelete:b,canDelete:m}),Zt(jm,{sx:{borderColor:"#e6e6e3"}}),Zt(sc,{sx:{flex:1,minHeight:0},children:Zt(m6,{ref:F,style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:L})}),Zt(jm,{sx:{borderColor:"#37352f"}}),Zt(sc,{sx:{flexShrink:0},children:U})]})})}import{useEffect as C6,useState as $o}from"react";import{Box as tn,Button as Ef,IconButton as Hm}from"@mui/material";import{FormDialog as Wm}from"@ehfuse/mui-form-dialog";import B6 from"@mui/icons-material/Add";import I6 from"@mui/icons-material/DirectionsRunOutlined";import E6 from"@mui/icons-material/EditOutlined";import{ErrorAlert as Um}from"@ehfuse/alerts";import{ClearTextField as Vm,DateTextField as Km,LabelSelect as Gm}from"@ehfuse/mui-form-controls";import{useEffect as y6,useState as qm}from"react";import{Box as qo,Button as x6,FormControlLabel as Cf,Radio as Bf,RadioGroup as v6}from"@mui/material";import{FormDialog as w6}from"@ehfuse/mui-form-dialog";import{LabelSelect as _6}from"@ehfuse/mui-form-controls";import k6 from"@ehfuse/overlay-scrollbar";import{Fragment as S6,jsx as Wr,jsxs as vs}from"react/jsx-runtime";function $m({open:e,sprint:f,remainingTasks:g,sprints:l,onClose:o,onConfirm:s}){let r=l.filter(h=>h.seq!==f?.seq&&h.group_seq===(f?.group_seq??0)&&h.status!=="closed"),[t,n]=qm("backlog"),[c,i]=qm(0);y6(()=>{e&&(n(r.length>0?"move":"backlog"),i(r[0]?.seq??0))},[e]);let a=g.length>0;return Wr(w6,{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:Wr(x6,{variant:"contained",onClick:()=>s({mode:a?t:"keep",moveToSprintSeq:t==="move"?c:0,taskSeqs:g.map(h=>h.seq)}),disabled:a&&t==="move"&&!(c>0),children:"\uB9C8\uAC10"})},sections:[{id:"sprint-close",title:"",showTitle:!1,children:vs(qo,{sx:{display:"flex",flexDirection:"column",gap:2},children:[vs(qo,{sx:{fontSize:18,color:"#37352f"},children:[Wr(qo,{component:"span",sx:{fontWeight:600},children:f?.name??""})," \uBAA9\uD45C\uB97C \uB9C8\uAC10\uD569\uB2C8\uB2E4."]}),a?vs(S6,{children:[vs(qo,{sx:{fontSize:15,color:"#6f6f6c"},children:["\uB05D\uB098\uC9C0 \uC54A\uC740 \uC5C5\uBB34\uAC00"," ",g.length,"\uAC74 \uC788\uC2B5\uB2C8\uB2E4. \uC5B4\uB5BB\uAC8C \uD560\uAE4C\uC694?"]}),Wr(qo,{sx:{border:"1px solid #e6e6e3",borderRadius:1,overflow:"hidden"},children:Wr(k6,{style:{maxHeight:220},thumb:{width:6},children:g.map(h=>vs(qo,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1,borderBottom:"1px solid #f2f2f0","&:last-of-type":{borderBottom:"none"}},children:[Wr(qo,{sx:{flex:1,minWidth:0,fontSize:16,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:h.title}),Wr(Lt,{option:xr(h)})]},h.seq))})}),vs(v6,{value:t,onChange:(h,d)=>n(d),children:[r.length>0?Wr(Cf,{value:"move",control:Wr(Bf,{size:"small"}),label:"\uB2E4\uC74C \uBAA9\uD45C\uB85C \uC774\uC6D4",sx:{"& .MuiFormControlLabel-label":{fontSize:16}}}):null,t==="move"&&r.length>0?Wr(qo,{sx:{pl:4,pb:1},children:Wr(_6,{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,Wr(Cf,{value:"backlog",control:Wr(Bf,{size:"small"}),label:"\uBBF8\uBC30\uC815(\uBC31\uB85C\uADF8)\uC73C\uB85C \uBE7C\uAE30",sx:{"& .MuiFormControlLabel-label":{fontSize:16}}}),Wr(Cf,{value:"keep",control:Wr(Bf,{size:"small"}),label:"\uC774 \uBAA9\uD45C\uC5D0 \uADF8\uB300\uB85C \uB450\uAE30",sx:{"& .MuiFormControlLabel-label":{fontSize:16}}})]})]}):Wr(qo,{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 If="custom-";function T6(e){return e.startsWith(If)}function vW(e){return e>0?`${If}${e}`:""}function hi(e){if(!T6(e))return 0;let f=Number(e.slice(If.length));return Number.isInteger(f)&&f>0?f:0}import{Fragment as Xm,jsx as Vt,jsxs as pi}from"react/jsx-runtime";var M6=[{value:"planning",label:"\uACC4\uD68D\uC911"},{value:"active",label:"\uC9C4\uD589\uC911"},{value:"closed",label:"\uC885\uB8CC"}];function Ym(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?e.slice(5).replace("-","."):"-"}function AW({open:e,customTabs:f,sprints:g,onClose:l,onCreate:o,onUpdate:s,onChangeStatus:r,tasks:t=[],onCloseSprint:n,onRemove:c}){let i=f.filter(O=>O.useSprints&&!O.archived),[a,h]=$o(""),[d,u]=$o(""),[b,m]=$o(""),[x,k]=$o(""),[B,R]=$o(""),[j,A]=$o(!1),[P,N]=$o(!1),[q,z]=$o(null),T=q?t.filter(O=>(O.sprint_seq??0)===q.seq&&!O.completed):[],[S,D]=$o(0);C6(()=>{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)},v=S>0||P,w=async()=>{let O=hi(a);if(!O){Um("\uBAA9\uD45C\uB97C \uB9CC\uB4E4 \uD504\uB85C\uC81D\uD2B8\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return}if(!d.trim()){Um("\uBAA9\uD45C \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}A(!0);try{if(S>0){s(S,{name:d.trim(),goal:b.trim(),start_date:x,end_date:B}),p();return}await o({group_seq:O,name:d.trim(),goal:b.trim(),start_date:x,end_date:B})&&p()}finally{A(!1)}},_=new Map(f.map(O=>[hi(O.key),O.label])),C=Vt(tn,{children:i.length===0?Vt(tn,{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.'}):Vt(Xm,{children:Vt(tn,{children:g.length===0?pi(tn,{sx:{py:4,display:"flex",flexDirection:"column",alignItems:"center",gap:2,color:"#9a9a97"},children:[Vt(I6,{sx:{fontSize:48,color:"#d9d9d6"}}),Vt(tn,{sx:{fontSize:13.5},children:"\uB4F1\uB85D\uB41C \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."})]}):g.map(O=>pi(tn,{sx:{display:"flex",flexDirection:"column",gap:1,"&:not(:last-of-type)::after":{content:'""',display:"block",my:1.75,borderBottom:"1px solid #f0efed"}},children:[pi(tn,{sx:{minWidth:0},children:[pi(tn,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[Vt(tn,{component:"span",sx:{fontSize:18,fontWeight:600,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},children:O.name}),Vt(tn,{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"}),pi(tn,{component:"span",sx:{flexShrink:0,fontSize:14,color:"#57564f"},children:[Ym(O.start_date)," ~"," ",Ym(O.end_date)]})]}),O.goal?Vt(tn,{sx:{mt:.5,fontSize:14,color:"#787774",lineHeight:1.5},children:O.goal}):null]}),pi(tn,{sx:{display:"flex",alignItems:"center",gap:.5},children:[Vt(Gm,{label:"\uC0C1\uD0DC",showLabel:!1,size:"small",value:O.status,options:M6.map(F=>({value:F.value,label:F.label})),onChange:F=>{let $=String(F.target.value);if($==="closed"&&n){z(O);return}r(O.seq,$)},sx:{width:104,flexShrink:0}}),Vt(Hm,{"aria-label":"\uBAA9\uD45C \uC218\uC815",onClick:()=>y(O),sx:{color:"#9a9a97","&:hover":{color:"#2563eb"}},children:Vt(E6,{sx:{fontSize:18}})}),Vt(Hm,{"aria-label":"\uBAA9\uD45C \uC0AD\uC81C",onClick:()=>c(O.seq),sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:Vt(Ir,{style:{width:16,height:16}})})]})]},O.seq))})})});return pi(Xm,{children:[Vt(Wm,{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?Vt(Ef,{startIcon:Vt(B6,{}),onClick:()=>{p(),N(!0)},sx:{color:"#2563eb"},children:"\uC0C8 \uBAA9\uD45C"}):void 0,right:Vt(Ef,{variant:"contained",onClick:l,children:"\uD655\uC778"})}}),Vt($m,{open:q!==null,sprint:q,remainingTasks:T,sprints:g,onClose:()=>z(null),onConfirm:O=>{q&&n?.(q.seq,O),z(null)}}),Vt(Wm,{open:v,onClose:()=>{N(!1),p()},maxWidth:"sm",title:S>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:Vt(tn,{sx:{pt:1},children:pi(tn,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2.5,mt:1},children:[Vt(Gm,{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:S>0}),Vt(Vm,{label:"\uBAA9\uD45C \uC774\uB984",size:"medium",placeholder:"\uC608: 8\uC6D4 2\uC8FC\uCC28",value:d,onChange:O=>u(O.target.value)}),Vt(Km,{size:"medium",label:"\uC2DC\uC791\uC77C",value:x,onChange:O=>k(O.target.value)}),Vt(Km,{size:"medium",label:"\uC885\uB8CC\uC77C",value:B,onChange:O=>R(O.target.value)}),Vt(Vm,{label:"\uC124\uBA85",size:"medium",placeholder:"\uC120\uD0DD \uC785\uB825",value:b,onChange:O=>m(O.target.value),sx:{gridColumn:"1 / -1"}})]})})}],actions:{showCancelButton:!0,right:Vt(Ef,{variant:"contained",onClick:()=>{w()},disabled:j,children:S>0?"\uC218\uC815":"\uBAA9\uD45C \uB9CC\uB4E4\uAE30"})}})]})}import{Box as fr,Button as ac,FormControlLabel as Zm,Switch as Jm}from"@mui/material";import{FormDialog as R6}from"@ehfuse/mui-form-dialog";import O6 from"@mui/icons-material/LinkOutlined";import A6 from"@mui/icons-material/LinkOffOutlined";import D6 from"@mui/icons-material/SyncOutlined";import P6 from"@mui/icons-material/ArrowForward";import{Fragment as L6,jsx as Ht,jsxs as Rr}from"react/jsx-runtime";function Qm({from:e,to:f}){return Rr(fr,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:.5},children:[e,Ht(P6,{sx:{fontSize:16,color:"#787774"}}),f]})}function N6({size:e=28}){return Rr(fr,{component:"svg",viewBox:"0 0 48 48","aria-hidden":!0,sx:{width:e,height:e,flexShrink:0,mx:1},children:[Ht("path",{fill:"#EA4335",d:"M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z"}),Ht("path",{fill:"#4285F4",d:"M46.98 24.55c0-1.57-.15-3.09-.38-4.55H24v9.02h12.94c-.58 2.96-2.26 5.48-4.78 7.18l7.73 6c4.51-4.18 7.09-10.36 7.09-17.65z"}),Ht("path",{fill:"#FBBC05",d:"M10.53 28.59c-.48-1.45-.76-2.99-.76-4.59s.27-3.14.76-4.59l-7.98-6.19C.92 16.46 0 20.12 0 24c0 3.88.92 7.54 2.56 10.78l7.97-6.19z"}),Ht("path",{fill:"#34A853",d:"M24 48c6.48 0 11.93-2.13 15.89-5.81l-7.73-6c-2.15 1.45-4.92 2.3-8.16 2.3-6.26 0-11.57-4.22-13.47-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z"})]})}function HW({open:e,googleApi:f,onClose:g}){let{status:l,busy:o}=f,{calendarName:s}=ot(),r=l.linked&&l.calendar_name||s||"\uC5C5\uBB34\uD568",t=Rr(fr,{sx:{display:"flex",flexDirection:"column",gap:"24px"},children:[Rr(fr,{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:[Ht(fr,{children:Rr(fr,{component:"span",children:[Ht("b",{children:"\uB0B4\uBCF4\uB0B4\uAE30"}),"\uB294 \uB0B4 \uC5C5\uBB34\uB97C \uAD6C\uAE00 \uCE98\uB9B0\uB354\uC758"," ",Rr("b",{children:['"',r,'"']})," \uCE98\uB9B0\uB354\uC5D0 \uBC14\uB85C \uBC18\uC601\uD569\uB2C8\uB2E4."]})}),Ht(fr,{children:Rr(fr,{component:"span",children:[Ht("b",{children:"\uAC00\uC838\uC624\uAE30"}),"\uB294 \uAD6C\uAE00 \uAE30\uBCF8 \uCE98\uB9B0\uB354 \uC77C\uC815\uC744 \uC5C5\uBB34\uD568\uC5D0 \uC77D\uAE30\uC804\uC6A9\uC73C\uB85C \uBCF4\uC5EC\uC90D\uB2C8\uB2E4."]})}),Ht(fr,{children:Rr(fr,{component:"span",children:['"',r,'" \uCE98\uB9B0\uB354 \uC77C\uC815\uC740 \uC5C5\uBB34\uD568\uC5D0\uC11C \uC218\uC815\uD574\uC57C \uD569\uB2C8\uB2E4.']})})]}),l.configured?Rr(fr,{sx:{border:"1px solid #e6e6e3",borderRadius:1,pl:2,pr:3,py:1.75,display:"flex",flexDirection:"column",gap:1.25},children:[Rr(fr,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[Ht(N6,{}),Rr(fr,{sx:{flex:1,minWidth:0},children:[Ht(fr,{sx:{fontSize:18,color:"#111",fontWeight:700},children:"\uAD6C\uAE00 \uACC4\uC815 \uC5F0\uACB0"}),Ht(fr,{sx:{fontSize:15,color:"#111",mt:.5,lineHeight:1.6},children:l.linked?Rr(L6,{children:[Rr(fr,{component:"span",sx:{display:"block",fontWeight:600},children:[l.google_email||"\uAD6C\uAE00 \uACC4\uC815"," ","\uC5D0 \uC5F0\uACB0\uB428"]}),Rr(fr,{component:"span",sx:{display:"block"},children:['\uAD6C\uAE00 \uCE98\uB9B0\uB354\uC5D0 "',r,'" \uCE98\uB9B0\uB354\uAC00 \uB9CC\uB4E4\uC5B4\uC84C\uC2B5\uB2C8\uB2E4.']})]}):`\uAD6C\uAE00 \uACC4\uC815\uC744 \uC5F0\uACB0\uD558\uBA74 \uB0B4 \uC5C5\uBB34\uAC00 \uAD6C\uAE00 \uCE98\uB9B0\uB354\uC758 "${r}" \uCE98\uB9B0\uB354\uC5D0 \uBC14\uB85C \uBC18\uC601\uB429\uB2C8\uB2E4.`}),l.last_error?Rr(fr,{sx:{fontSize:13,color:"#c62828",mt:.5},children:["\uCD5C\uADFC \uC624\uB958: ",l.last_error]}):null]}),l.linked?Ht(ac,{size:"small",variant:"outlined",color:"inherit",disabled:o,startIcon:Ht(A6,{sx:{fontSize:18}}),onClick:f.onDisconnect,sx:{flexShrink:0,whiteSpace:"nowrap",ml:2},children:"\uC5F0\uACB0 \uD574\uC81C"}):Ht(ac,{size:"small",variant:"contained",disableElevation:!0,disabled:o,startIcon:Ht(O6,{sx:{fontSize:18}}),onClick:f.onConnect,sx:{flexShrink:0,whiteSpace:"nowrap",bgcolor:"#2563eb",ml:2},children:"\uC5F0\uACB0\uD558\uAE30"})]}),l.linked?Rr(fr,{sx:{display:"flex",alignItems:"center",gap:2,flexWrap:"wrap",pl:4.5},children:[Ht(Zm,{control:Ht(Jm,{size:"small",checked:l.export_enabled,disabled:o,onChange:(n,c)=>f.onToggleExport(c)}),label:Rr(fr,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:.5},children:["\uB0B4\uBCF4\uB0B4\uAE30 (",Ht(Qm,{from:"\uC5C5\uBB34\uD568",to:"\uAD6C\uAE00"}),")"]}),sx:{m:0,"& .MuiFormControlLabel-label":{fontSize:14,color:"#37352f"}}}),Ht(Zm,{control:Ht(Jm,{size:"small",checked:l.import_enabled,disabled:o,onChange:(n,c)=>f.onToggleImport(c)}),label:Rr(fr,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:.5},children:["\uAC00\uC838\uC624\uAE30 (",Ht(Qm,{from:"\uAD6C\uAE00",to:"\uC5C5\uBB34\uD568"}),")"]}),sx:{m:0,"& .MuiFormControlLabel-label":{fontSize:14,color:"#37352f"}}}),f.onResync?Ht(ac,{size:"small",color:"inherit",disabled:o||!l.export_enabled,startIcon:Ht(D6,{sx:{fontSize:18}}),onClick:f.onResync,sx:{ml:"auto",whiteSpace:"nowrap"},children:"\uC804\uCCB4 \uB2E4\uC2DC \uB0B4\uBCF4\uB0B4\uAE30"}):null]}):null]}):Ht(fr,{sx:{fontSize:14,color:"#8a6d1d",lineHeight:1.7},children:"\uC11C\uBC84\uC5D0 \uAD6C\uAE00 \uC5F0\uB3D9 \uC124\uC815(\uD074\uB77C\uC774\uC5B8\uD2B8 ID/\uBE44\uBC00\uBC88\uD638)\uC774 \uC5C6\uC5B4 \uC5F0\uACB0\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uAD00\uB9AC\uC790\uC5D0\uAC8C \uBB38\uC758\uD558\uC138\uC694."})]});return Ht(R6,{open:e,onClose:g,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:t}],actions:{showCancelButton:!1,right:Ht(ac,{variant:"contained",onClick:g,sx:{minWidth:80},children:"\uB2EB\uAE30"})}})}import{useEffect as z6,useMemo as Mf,useState as Rf}from"react";import{Box as ga,Button as j6,Typography as F6}from"@mui/material";import{FormDialog as q6}from"@ehfuse/mui-form-dialog";import{SearchTextField as $6}from"@ehfuse/mui-form-controls";import{TreeView as H6}from"@ehfuse/tree-view";import{Fragment as Y6,jsx as Kn,jsxs as X6}from"react/jsx-runtime";function e0(e){return`${e.name}#${e.seq}`}function W6(e){return Number(e.slice(e.lastIndexOf("#")+1))||0}function U6(e){let f=[],g=l=>{for(let o of l.employees??[])f.push(o);for(let o of l.groups??[])g(o)};for(let l of e)g(l);return f}function V6(e,f){return f?[e.name,e.department,e.role_name,e.work_position].filter(Boolean).some(g=>String(g).toLowerCase().includes(f)):!0}function K6(e){let f=[[e.name,e.role_name].filter(Boolean).join(" "),e.department].filter(Boolean).join(" / ");return{id:`emp:${e.seq}`,label:e0(e),renderLabel:Kn(ga,{component:"span",sx:{display:"inline-flex",alignItems:"baseline",gap:.75},children:Kn(ga,{component:"span",sx:{fontWeight:400,color:"text.primary"},children:f})})}}function t0(e,f){let g=(e.groups??[]).map(o=>t0(o,f)).filter(o=>o!==null),l=(e.employees??[]).filter(o=>V6(o,f)).map(K6);return g.length===0&&l.length===0?null:{id:`group:${e.key}`,label:e.name,children:[...g,...l]}}function G6({groups:e,allEmployees:f,initialSelectedSeqs:g,multiple:l,isMobile:o,onSelectionChange:s}){let[r,t]=Rf(""),n=Mf(()=>e.map(i=>t0(i,r.trim().toLowerCase())).filter(i=>i!==null),[e,r]),c=Mf(()=>f.filter(i=>g.includes(i.seq)).map(e0),[]);return X6(Y6,{children:[Kn(ga,{sx:{px:1.5,py:1,borderBottom:"1px solid #cccccc",flexShrink:0},children:Kn($6,{size:"small",fullWidth:!0,placeholder:"\uC774\uB984, \uBD80\uC11C \uAC80\uC0C9",onSearch:t,onClear:()=>t(""),sx:{"& .MuiOutlinedInput-notchedOutline":{border:"none"},"& .MuiInputBase-root":{px:0}}})}),Kn(ga,{sx:o?{display:"flex",flexDirection:"column"}:{flex:1,minHeight:0,overflow:"hidden",display:"flex",flexDirection:"column"},children:Kn(H6,{items:n,checkbox:!0,multiSelect:l,selectionMode:"child",showSearch:!1,defaultExpanded:!0,initialSelections:c,onChange:i=>s(i.map(W6).filter(a=>a>0)),styles:{border:"none",borderRadius:"0"}})})]})}function JW({open:e,title:f="\uC9C1\uC6D0 \uC120\uD0DD",hint:g="",groups:l,multiple:o=!1,selectedSeqs:s,confirmText:r="\uD655\uC778",onConfirm:t,onClose:n}){let c=qt(),[i,a]=Rf([]),[h,d]=Rf(0),u=Mf(()=>U6(l),[l]),b=s??[];z6(()=>{e&&(a(b),d(x=>x+1))},[e]);let m=()=>{let x=u.filter(k=>i.includes(k.seq));t(o?x:x.slice(0,1)),n()};return Kn(q6,{open:e,onClose:n,title:`${f}${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:Kn(ga,{sx:{...c?{}:{height:560},display:"flex",flexDirection:"column",border:"1px solid #cccccc",borderRadius:1,...c?{}:{overflow:"hidden"},userSelect:"none"},children:Kn(G6,{groups:l,allEmployees:u,initialSelectedSeqs:b,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:g?Kn(F6,{variant:"body2",color:"text.secondary",sx:{whiteSpace:"pre-line",lineHeight:1.35},children:g}):void 0,right:Kn(j6,{variant:"contained",onClick:m,children:r})}})}import{useEffect as vS,useMemo as N0,useState as ka}from"react";import{Box as Wo,Button as L0}from"@mui/material";import{FormDialog as wS}from"@ehfuse/mui-form-dialog";import{LabelSelect as qf}from"@ehfuse/mui-form-controls";import _S from"@mui/icons-material/SpeedOutlined";import{useEffect as Z6,useState as J6}from"react";import{Box as hn,Button as Q6}from"@mui/material";import{FormDialog as e8}from"@ehfuse/mui-form-dialog";import{LabelSelect as t8,NumberField as r0}from"@ehfuse/mui-form-controls";import r8 from"@ehfuse/overlay-scrollbar";import{jsx as rn,jsxs as ba}from"react/jsx-runtime";var n8=[{value:"count",label:"\uBBF8\uC644\uB8CC \uAC74\uC218"},{value:"points",label:"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8"}];function n0({open:e,capacity:f,employees:g,onClose:l,onSave:o}){let[s,r]=J6(f??ko);Z6(()=>{e&&r(f??ko)},[e,f]);let t=s.basis==="points"?"SP":"\uAC74",n=(c,i)=>{let a=Math.max(0,Math.floor(Number(i)||0));r(h=>{let d={...h.by_account};return a>0?d[c]=a:delete d[c],{...h,by_account:d}})};return rn(e8,{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:rn(Q6,{variant:"contained",onClick:()=>{o(s)},children:"\uC800\uC7A5"})},sectionContentPaddingTop:0,sections:[{id:"capacity",title:"",showTitle:!1,children:ba(hn,{sx:{display:"flex",flexDirection:"column",gap:2},children:[rn(hn,{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."}),ba(hn,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[rn(hn,{sx:{width:104,flexShrink:0,fontSize:16,color:"#37352f"},children:"\uC138\uB294 \uB2E8\uC704"}),rn(t8,{size:"medium",fullWidth:!0,label:"",value:s.basis,options:n8,onChange:c=>r(i=>({...i,basis:c.target.value}))})]}),ba(hn,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[rn(hn,{sx:{width:104,flexShrink:0,fontSize:16,color:"#37352f"},children:"\uAE30\uBCF8 \uC6A9\uB7C9"}),rn(r0,{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))}))})]}),rn(hn,{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`}),rn(hn,{sx:{fontSize:16,fontWeight:700,color:"#37352f"},children:"\uC0AC\uB78C\uBCC4 \uC608\uC678"}),g.length===0?rn(hn,{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."}):rn(hn,{sx:{border:"1px solid #e6e6e3",borderRadius:1,overflow:"hidden"},children:rn(r8,{style:{maxHeight:260},thumb:{width:6},children:g.filter(c=>Number(c.account_seq)>0).map(c=>ba(hn,{sx:{display:"flex",alignItems:"center",gap:1.5,px:2,py:1,borderBottom:"1px solid #f2f2f0","&:last-of-type":{borderBottom:"none"}},children:[ba(hn,{sx:{flex:1,minWidth:0,fontSize:16,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[c.name,c.department?rn(hn,{component:"span",sx:{ml:1,fontSize:14,color:"#787774"},children:c.department}):null]}),rn(hn,{sx:{width:132,flexShrink:0},children:rn(r0,{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 cc}from"@mui/material";import{Bar as a8,BarChart as l8,CartesianGrid as c8,Cell as u8,ReferenceLine as f8,ResponsiveContainer as d8,Tooltip as h8,XAxis as p8,YAxis as m8}from"recharts";import{Box as o8}from"@mui/material";import{jsx as i8}from"react/jsx-runtime";function nn({text:e,height:f}){return i8(o8,{sx:{display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center",fontSize:14.5,color:"#9a9a97",...typeof f=="number"?{height:f,minHeight:120}:{position:"absolute",inset:0,pointerEvents:"none"}},children:e})}import{createElement as s8}from"react";var lc="#2f80ed",o0="#a9c9f5",Hi="#9a9a97",Of="#2e9e6b",go="#3d7eff",Af="#c3c8ce",ya="#f2a30f",xa={contentStyle:{fontSize:13.5,color:"#37352f",border:"1px solid #e6e6e3",borderRadius:6},labelStyle:{fontSize:13.5,color:"#37352f",fontWeight:700},itemStyle:{fontSize:13.5}},ws={...xa,cursor:!1},_s={wrapperStyle:{fontSize:13.5,paddingTop:10},formatter:e=>s8("span",{style:{paddingRight:14,color:"#37352f"}},e)};function _r(e){return{display:"flex",flexDirection:"column",minHeight:0,position:"relative",...typeof e=="string"?{flex:1}:{}}}var Ur={flexShrink:0,mb:1.5,display:"flex",alignItems:"center",gap:2,flexWrap:"wrap"};function bo(e){return{"& *":{outline:"none"},userSelect:"none",...typeof e=="number"?{height:e,flexShrink:0}:{flex:1,minHeight:0}}}import{jsx as Gn,jsxs as va}from"react/jsx-runtime";function g8(e,f){let g=f.filter(l=>l.sprint_seq===e.seq&&!l.archived&&l.completed);return{points:g.reduce((l,o)=>l+(o.story_points??0),0),count:g.length}}function i0({sprints:e,tasks:f,height:g=200}){let o=[...e].sort((i,a)=>`${i.start_date}|${i.seq}`.localeCompare(`${a.start_date}|${a.seq}`)).map(i=>({sprint:i,...g8(i,f)})),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?Gn(nn,{text:"\uD45C\uC2DC\uD560 \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",height:g}):va(cc,{sx:_r(g),children:[va(cc,{sx:{flexShrink:0,mb:1,display:"flex",justifyContent:"space-between",flexWrap:"wrap",gap:1,fontSize:14,color:"#000"},children:[va("span",{children:["\uC644\uB8CC ",s?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uBAA9\uD45C\uBCC4"]}),n!==null?va("span",{children:["\uD3C9\uADE0(\uC885\uB8CC \uBAA9\uD45C)"," ",Gn(cc,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:n}),r]}):null]}),Gn(cc,{sx:bo(g),children:Gn(d8,{width:"100%",height:"100%",children:va(l8,{data:c,margin:{top:8,right:12,left:0,bottom:0},barCategoryGap:"28%",children:[Gn(c8,{strokeDasharray:"3 3",stroke:"#e6e6e3"}),Gn(p8,{dataKey:"\uBAA9\uD45C",tick:{fontSize:13},tickMargin:6,interval:0}),Gn(m8,{tick:{fontSize:13},width:40,allowDecimals:!1}),Gn(h8,{...ws,formatter:i=>`${Number(i??0)}${r}`}),n!==null?Gn(f8,{y:n,stroke:Hi,strokeDasharray:"6 5",label:{value:`\uD3C9\uADE0 ${n}${r}`,position:"right",fontSize:13}}):null,Gn(a8,{dataKey:"\uC644\uB8CC",radius:[4,4,0,0],children:c.map(i=>Gn(u8,{fill:i.closed?lc:o0},i.\uBAA9\uD45C))})]})})})]})}import{useMemo as b8}from"react";import{Box as yo}from"@mui/material";import{CartesianGrid as y8,Line as s0,LineChart as x8,ResponsiveContainer as v8,Tooltip as w8,XAxis as _8,YAxis as k8}from"recharts";import{jsx as pn,jsxs as mi}from"react/jsx-runtime";function a0(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?new Date(`${e}T00:00:00`):null}function S8(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function T8(e){return e.slice(5).replace("-",".")}function l0({sprint:e,tasks:f,todayStr:g,height:l=200,headerLeft:o}){let s=b8(()=>{let a=a0(e.start_date),h=a0(e.end_date);if(!a||!h||h<a||Math.round((h.getTime()-a.getTime())/864e5)+1>366)return null;let u=f.filter(P=>P.sprint_seq===e.seq&&!P.archived);if(u.length===0)return{empty:!0};let b=u.some(P=>(P.story_points??0)>0),m=P=>b?P.story_points??0:1,x=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(S8(P));let R=x,j=x;return{empty:!1,data:B.map((P,N)=>{let q=B.length===1?0:x*(1-N/(B.length-1));return P<=g&&(R-=k.get(P)??0,j=Math.max(0,R)),{\uB0A0\uC9DC:T8(P),\uC774\uC0C1:Math.round(q*10)/10,\uB0A8\uC740\uB7C9:P<=g?Math.max(0,R):null}}),total:x,usePoints:b,last:j}},[e,f,g]);if(!s)return mi(yo,{sx:_r(l),children:[o?pn(yo,{sx:Ur,children:o}):null,pn(nn,{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 mi(yo,{sx:_r(l),children:[o?pn(yo,{sx:Ur,children:o}):null,pn(nn,{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 mi(yo,{sx:_r(l),children:[mi(yo,{sx:Ur,children:[o?pn(yo,{sx:{flexShrink:0},children:o}):null,mi(yo,{sx:{flex:1,minWidth:220,display:"flex",justifyContent:"space-between",flexWrap:"wrap",gap:1,fontSize:14,color:"#000"},children:[mi("span",{children:["\uB0A8\uC740 ",n?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uCD1D ",t]}),mi("span",{children:["\uD604\uC7AC"," ",pn(yo,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:c}),i," \uB0A8\uC74C"]})]})]}),pn(yo,{sx:bo(l),children:pn(v8,{width:"100%",height:"100%",children:mi(x8,{data:r,margin:{top:8,right:12,left:0,bottom:0},children:[pn(y8,{strokeDasharray:"3 3",stroke:"#e6e6e3"}),pn(_8,{dataKey:"\uB0A0\uC9DC",tick:{fontSize:13},tickMargin:6,minTickGap:24}),pn(k8,{tick:{fontSize:13},width:40,allowDecimals:!1}),pn(w8,{...xa,formatter:a=>`${Number(a??0)}${i}`}),pn(s0,{type:"linear",dataKey:"\uC774\uC0C1",stroke:Hi,strokeDasharray:"6 5",strokeWidth:1.5,dot:!1}),pn(s0,{type:"monotone",dataKey:"\uB0A8\uC740\uB7C9",stroke:lc,strokeWidth:2.5,dot:!1,connectNulls:!1})]})})})]})}import{useMemo as m0}from"react";import{Box as xo}from"@mui/material";import{Area as Nf,AreaChart as E8,CartesianGrid as M8,Legend as R8,ResponsiveContainer as O8,Tooltip as A8,XAxis as D8,YAxis as P8}from"recharts";var Pf=864e5,wa=[0,1,2,3,5,8,13,21];function f0(e){return!e.archived&&!e.linked_only&&!e.is_notice&&!e.is_event}function Df(e){let f=String(e??"").trim(),g=/^(\d{4}-\d{2}-\d{2})(?:[ T](\d{2}:\d{2}))?/.exec(f);if(!g)return null;let l=new Date(`${g[1]}T${g[2]??"00:00"}:00`).getTime();return Number.isNaN(l)?null:l}function ks(e){let f=String(e??"").trim();return/^\d{4}-\d{2}-\d{2}/.test(f)?f.slice(0,10):""}function C8(e){let f=ks(e.created_time)||ks(e.start_date)||ks(e.completed_time);if(!f)return null;let g=ks(e.start_date),l=g&&g>f?g:f,o=e.completed?ks(e.completed_time)||f:"";return{created:f,started:l,done:o}}function d0(e,f){let g=/^\d{4}-\d{2}-\d{2}$/.test(f)?new Date(`${f}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(mo(new Date(g.getTime()-s*Pf)));return o}function h0(e,f,g){let l=d0(f,g),o=e.filter(f0).map(C8).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 B8(e,f){if(e.length===0)return 0;let g=Math.min(e.length-1,Math.max(0,Math.ceil(e.length*f)-1));return e[g]}function c0(e){if(e.length===0)return null;let f=[...e].sort((s,r)=>s-r),g=s=>Math.round(s*10)/10,l=Math.floor(f.length/2),o=f.length%2===1?f[l]:(f[l-1]+f[l])/2;return{count:f.length,median:g(o),average:g(f.reduce((s,r)=>s+r,0)/f.length),p85:g(B8(f,.85))}}function u0(e){for(let f=wa.length-1;f>=0;f-=1)if(e>=wa[f])return f;return 0}function I8(){return wa.map((e,f)=>f===wa.length-1?`${e}\uC77C+`:`${e}~${wa[f+1]}\uC77C`)}function p0(e,f,g){let l=d0(f,g),o=l[0],s=l[l.length-1],r=I8(),t=r.map(()=>0),n=r.map(()=>0),c=[],i=[];for(let a of e){if(!f0(a)||!a.completed)continue;let h=ks(a.completed_time);if(!h||h<o||h>s)continue;let d=Df(a.completed_time),u=Df(a.created_time);if(d===null||u===null)continue;let b=Math.max(0,(d-u)/Pf);c.push(b),t[u0(b)]+=1;let m=Df(a.start_date);if(m===null||m>d)continue;let x=Math.max(0,(d-Math.max(m,u))/Pf);i.push(x),n[u0(x)]+=1}return{labels:r,leadCounts:t,cycleCounts:n,lead:c0(c),cycle:c0(i)}}import{jsx as on,jsxs as gi}from"react/jsx-runtime";function N8(e){return e.slice(5).replace("-",".")}function g0({tasks:e,todayStr:f,days:g=30,height:l=220,headerLeft:o}){let s=m0(()=>h0(e,g,f),[e,g,f]),r=m0(()=>s.points.map(n=>({\uB0A0\uC9DC:N8(n.day),\uC644\uB8CC:n.done,\uC9C4\uD589:n.inProgress,\uB300\uAE30:n.waiting})),[s]),t=gi(xo,{sx:Ur,children:[o?on(xo,{sx:{flexShrink:0},children:o}):null,gi(xo,{sx:{flex:1,minWidth:220,display:"flex",flexDirection:"column",gap:.5},children:[gi(xo,{sx:{display:"flex",justifyContent:"space-between",flexWrap:"wrap",gap:1,fontSize:14,color:"#000"},children:[gi("span",{children:["\uCD5C\uADFC ",s.points.length,"\uC77C \u2014 \uC811\uC218 ",s.currentTotal,"\uAC74 / \uC644\uB8CC ",s.currentDone,"\uAC74"]}),gi("span",{children:["\uC9C4\uD589 \uC911"," ",on(xo,{component:"span",sx:{color:go,fontWeight:700},children:s.currentWip}),"\uAC74"]})]}),on(xo,{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?gi(xo,{sx:_r(l),children:[o?on(xo,{sx:Ur,children:o}):null,on(nn,{text:"\uC774 \uAE30\uAC04\uC5D0 \uC811\uC218\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",height:l})]}):gi(xo,{sx:_r(l),children:[t,on(xo,{sx:bo(l),children:on(O8,{width:"100%",height:"100%",children:gi(E8,{data:r,margin:{top:8,right:12,left:0,bottom:4},children:[on(M8,{strokeDasharray:"3 3",stroke:"#e6e6e3"}),on(D8,{dataKey:"\uB0A0\uC9DC",tick:{fontSize:13},tickMargin:6,minTickGap:24}),on(P8,{tick:{fontSize:13},width:40,allowDecimals:!1}),on(A8,{...xa,formatter:n=>`${Number(n??0)}\uAC74`}),on(R8,{..._s}),on(Nf,{type:"monotone",dataKey:"\uC644\uB8CC",stackId:"flow",stroke:Of,fill:Of,fillOpacity:.9}),on(Nf,{type:"monotone",dataKey:"\uC9C4\uD589",stackId:"flow",stroke:go,fill:go,fillOpacity:.85}),on(Nf,{type:"monotone",dataKey:"\uB300\uAE30",stackId:"flow",stroke:Af,fill:Af,fillOpacity:.9})]})})})]})}import{useMemo as b0}from"react";import{Box as mn}from"@mui/material";import{Bar as y0,BarChart as L8,CartesianGrid as z8,Legend as j8,ResponsiveContainer as F8,Tooltip as q8,XAxis as $8,YAxis as H8}from"recharts";import{jsx as Or,jsxs as Rn}from"react/jsx-runtime";function x0({label:e,color:f,summary:g}){let l=Rn(mn,{sx:{display:"flex",alignItems:"center",gap:.75},children:[Or(mn,{sx:{width:10,height:10,borderRadius:.5,bgcolor:f,flexShrink:0}}),Or(mn,{component:"span",sx:{fontWeight:700,color:"#37352f"},children:e})]});return g?Rn(mn,{sx:{display:"contents"},children:[l,Rn("span",{children:[g.count,"\uAC74"]}),Rn("span",{children:["\uC911\uC559\uAC12"," ",Or(mn,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:g.median}),"\uC77C"]}),Rn("span",{children:["\uD3C9\uADE0 ",g.average,"\uC77C"]}),Rn("span",{children:["85% ",g.p85,"\uC77C \uC774\uB0B4"]})]}):Rn(mn,{sx:{display:"contents"},children:[l,Or(mn,{component:"span",sx:{gridColumn:"span 4",color:"#9a9a97"},children:"\uD45C\uBCF8 \uC5C6\uC74C"})]})}function v0({tasks:e,todayStr:f,days:g=30,height:l=200,headerLeft:o}){let s=b0(()=>p0(e,g,f),[e,g,f]),r=b0(()=>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?Rn(mn,{sx:_r(l),children:[Rn(mn,{sx:Ur,children:[o?Or(mn,{sx:{flexShrink:0},children:o}):null,Rn(mn,{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:[Or(x0,{label:"\uB9AC\uB4DC\uD0C0\uC784(\uC791\uC131\u2192\uC644\uB8CC)",color:go,summary:s.lead}),Or(x0,{label:"\uC0AC\uC774\uD074\uD0C0\uC784(\uC2DC\uC791\u2192\uC644\uB8CC)",color:ya,summary:s.cycle})]})]}),Or(mn,{sx:bo(l),children:Or(F8,{width:"100%",height:"100%",children:Rn(L8,{data:r,margin:{top:8,right:12,left:0,bottom:4},barCategoryGap:"24%",children:[Or(z8,{strokeDasharray:"3 3",stroke:"#e6e6e3"}),Or($8,{dataKey:"\uAD6C\uAC04",tick:{fontSize:13},tickMargin:6,interval:0}),Or(H8,{tick:{fontSize:13},width:40,allowDecimals:!1}),Or(q8,{...ws,formatter:t=>`${Number(t??0)}\uAC74`}),Or(j8,{..._s}),Or(y0,{dataKey:"\uB9AC\uB4DC\uD0C0\uC784",fill:go,radius:[3,3,0,0]}),Or(y0,{dataKey:"\uC0AC\uC774\uD074\uD0C0\uC784",fill:ya,radius:[3,3,0,0]})]})})})]}):Rn(mn,{sx:_r(l),children:[o?Or(mn,{sx:Ur,children:o}):null,Or(nn,{text:"\uC774 \uAE30\uAC04\uC5D0 \uC644\uB8CC\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",height:l})]})}import{useMemo as S0}from"react";import{Box as Wi}from"@mui/material";import{Bar as zf,BarChart as G8,CartesianGrid as Y8,Cell as X8,Legend as Z8,ReferenceLine as T0,ResponsiveContainer as J8,Tooltip as Q8,XAxis as eS,YAxis as tS}from"recharts";function W8(e,f){if(!/^\d{4}-\d{2}-\d{2}$/.test(e)||!/^\d{4}-\d{2}-\d{2}$/.test(f))return null;let g=new Date(`${e}T00:00:00`).getTime(),l=new Date(`${f}T00:00:00`).getTime();return Number.isNaN(g)||Number.isNaN(l)?null:Math.round((l-g)/864e5)}function U8(e,f,g){let l=String(e.due_date??"").slice(0,10),o=W8(f,l);return o===null?"later":o<0?"overdue":o<=g?"soon":"later"}function uc(e,f){let{todayStr:g,soonDays:l=7,includeUnassigned:o=!0,limit:s,capacity:r}=f,t=r??ko,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",d=n.get(a)??{accountSeq:a,name:h,overdue:0,soon:0,later:0,total:0,points:0,capacity:0,load:0,ratio:0};d[U8(i,g,l)]+=1,d.total+=1,d.points+=Number(i.story_points??0)||0,n.set(a,d)}for(let i of n.values())i.capacity=V8(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 fc(e,f){return e.filter(g=>g.completed||g.archived||g.is_notice||g.is_event||g.linked_only?!1:Number(g.manager_account_seq??0)===f).sort((g,l)=>{let o=String(g.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(g.title??"").localeCompare(String(l.title??""))})}function V8(e,f){if(!(e>0))return 0;let g=Math.max(0,Math.floor(Number(f.by_account?.[e])||0));return g>0?g:Math.max(0,Math.floor(Number(f.default_capacity)||0))}function dc(e){return e.capacity>0&&e.load>e.capacity}function w0(e,f){return f>0&&e.total>=f}function _0(e){let f=e.filter(g=>g.accountSeq>0);return f.length===0?0:f.reduce((g,l)=>g+l.total,0)/f.length}function Lf(e,f){let g=new Date(`${e}T00:00:00`);g.setDate(g.getDate()+f);let l=o=>String(o).padStart(2,"0");return`${g.getFullYear()}-${l(g.getMonth()+1)}-${l(g.getDate())}`}function K8(e){let f=new Date(`${e}T00:00:00`);if(Number.isNaN(f.getTime()))return e;let g=(f.getDay()+6)%7;return Lf(e,-g)}function k0(e,f){let{todayStr:g,includeUnassigned:l=!0,weeks:o=6,limit:s}=f,r=K8(g),t=Array.from({length:Math.max(1,o)},(d,u)=>{let b=Lf(r,u*7),m=Lf(b,6),[,x,k]=b.split("-");return{start:b,end:m,label:`${Number(x)}/${Number(k)}`,isCurrent:u===0}}),n=t[t.length-1].end,c=new Map;for(let d of e){if(d.completed||d.archived||d.is_notice||d.is_event||d.linked_only)continue;let u=Number(d.manager_account_seq??0);if(!u&&!l)continue;let b=u?String(d.manager_name??"").trim()||"\uC774\uB984 \uC5C6\uC74C":"\uBBF8\uBC30\uC815",m=c.get(u)??{accountSeq:u,name:b,overdue:0,byWeek:new Array(t.length).fill(0),noDue:0,total:0,beyond:0},x=String(d.due_date??"").slice(0,10);if(m.total+=1,!/^\d{4}-\d{2}-\d{2}$/.test(x))m.noDue+=1;else if(x<g)m.overdue+=1;else if(x>n)m.beyond+=1;else{let k=t.findIndex(B=>x>=B.start&&x<=B.end);k>=0?m.byWeek[k]+=1:m.beyond+=1}c.set(u,m)}let i=[...c.values()].sort((d,u)=>d.accountSeq===0!=(u.accountSeq===0)?d.accountSeq===0?1:-1:d.overdue!==u.overdue?u.overdue-d.overdue:d.total!==u.total?u.total-d.total:d.name.localeCompare(u.name)),a=typeof s=="number"&&s>0?i.slice(0,s):i,h=a.reduce((d,u)=>Math.max(d,u.overdue,u.noDue,...u.byWeek),0);return{weeks:t,rows:a,maxCell:h}}import{Fragment as C0,jsx as Ar,jsxs as bi}from"react/jsx-runtime";var _a="#e5484d";function B0({tasks:e,todayStr:f,soonDays:g=7,overloadThreshold:l=0,capacity:o=ko,height:s=200,headerLeft:r,selectedAccountSeq:t=0,onSelectPerson:n}){let c=S0(()=>uc(e,{todayStr:f,soonDays:g,capacity:o}),[e,f,g,o]),i=S0(()=>_0(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,d=o.basis==="points"?"SP":"\uAC74",u=c.filter(b=>b.accountSeq>0&&(h?dc(b):w0(b,a))).length;return c.length===0?bi(Wi,{sx:_r(s),children:[r?Ar(Wi,{sx:Ur,children:r}):null,Ar(nn,{text:"\uB2F4\uB2F9\uC790\uAC00 \uC9C0\uC815\uB41C \uBBF8\uC644\uB8CC \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",height:s})]}):bi(Wi,{sx:_r(s),children:[bi(Wi,{sx:Ur,children:[r,bi(Wi,{sx:{fontSize:13.5,color:"#37352f"},children:["1\uC778 \uD3C9\uADE0 ",Ar("b",{children:i.toFixed(1)}),"\uAC74 \xB7"," ",h?bi(C0,{children:["\uC6A9\uB7C9 ",Ar("b",{children:o.default_capacity||"\uAC1C\uC778\uBCC4"}),o.default_capacity?d:""]}):bi(C0,{children:["\uACFC\uBD80\uD558 \uAE30\uC900 ",Ar("b",{children:a}),"\uAC74"]}),u>0?bi(Wi,{component:"span",sx:{ml:1,color:_a,fontWeight:700},children:["\uCD08\uACFC ",u,"\uBA85"]}):null]})]}),Ar(Wi,{sx:bo(s),children:Ar(J8,{width:"100%",height:"100%",children:bi(G8,{data:c,layout:"vertical",onClick:n?b=>{let m=c.find(x=>x.name===String(b?.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:[Ar(Y8,{strokeDasharray:"3 3",horizontal:!1,stroke:"#eceae6"}),Ar(eS,{type:"number",allowDecimals:!1,tick:{fontSize:12}}),Ar(tS,{type:"category",dataKey:"name",width:84,tick:{fontSize:12},interval:0}),Ar(Q8,{...ws,formatter:(b,m)=>[`${Number(b)||0}\uAC74`,String(m)],labelFormatter:b=>{let m=c.find(x=>x.name===b);return!m||!(m.capacity>0)?String(b):`${b} \u2014 \uC6A9\uB7C9 ${m.capacity}${d} \uC911 ${m.load} (${Math.round(m.ratio*100)}%)`}}),Ar(Z8,{..._s}),i>0?Ar(T0,{x:i,stroke:Hi,strokeDasharray:"4 4",label:{value:"\uD3C9\uADE0",position:"top",fontSize:11,fill:Hi}}):null,o.default_capacity>0?Ar(T0,{x:o.default_capacity,stroke:_a,strokeDasharray:"2 3",label:{value:"\uC6A9\uB7C9",position:"top",fontSize:11,fill:_a}}):null,Ar(zf,{dataKey:"overdue",name:"\uC9C0\uC5F0",stackId:"load",fill:_a}),Ar(zf,{dataKey:"soon",name:`\uC784\uBC15(${g}\uC77C)`,stackId:"load",fill:ya}),Ar(zf,{dataKey:"later",name:"\uC5EC\uC720",stackId:"load",fill:go,radius:[0,3,3,0],children:c.map(b=>Ar(X8,{fill:h&&dc(b)?_a:go,fillOpacity:h&&dc(b)?.45:1,stroke:b.accountSeq===t?"#37352f":void 0,strokeWidth:b.accountSeq===t?1.5:0},b.accountSeq))})]})})})]})}import{useEffect as cS,useState as uS}from"react";import{Box as fS,Button as dS}from"@mui/material";import{FormDialog as hS}from"@ehfuse/mui-form-dialog";import{useState as rS}from"react";import{Box as kr,Button as nS,Menu as oS,MenuItem as iS}from"@mui/material";import sS from"@mui/icons-material/PersonOutlineOutlined";import aS from"@ehfuse/overlay-scrollbar";import{jsx as Nr,jsxs as Ho}from"react/jsx-runtime";var I0=56,E0=68,M0=96;function lS(e){let f=String(e.due_date??"").slice(0,10);return f?f.slice(5).replace("-","/"):"-"}function R0(e,f){let g=String(e.due_date??"").slice(0,10);return!!g&&g<f}function O0({tasks:e,row:f,todayStr:g,employees:l,rows:o,height:s=200,hideSummary:r=!1,onChangeManager:t,onOpenTask:n}){let[c,i]=rS(null),a=fc(e,f.accountSeq),h=d=>o.find(u=>u.accountSeq===d)?.total??0;return Ho(kr,{sx:{display:"flex",flexDirection:"column",minHeight:0,height:s},children:[r?null:Ho(kr,{sx:{display:"flex",alignItems:"center",gap:1,px:.5,pb:.75,fontSize:14,color:"#37352f"},children:[Nr(kr,{component:"span",sx:{fontWeight:700},children:f.name}),Ho(kr,{component:"span",children:["\uBBF8\uC644\uB8CC ",a.length,"\uAC74"]}),f.capacity>0?Ho(kr,{component:"span",sx:{color:f.load>f.capacity?"#e5484d":"#787774"},children:["\xB7 \uC6A9\uB7C9 ",f.capacity," \uC911 ",f.load]}):null]}),Ho(kr,{sx:{flex:1,minHeight:0,display:"flex",flexDirection:"column",border:"1px solid #e6e6e3",borderRadius:1,overflow:"hidden"},children:[Ho(kr,{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:[Nr(kr,{sx:{width:I0,flexShrink:0},children:"\uB9C8\uAC10"}),Nr(kr,{sx:{flex:1,minWidth:0},children:"\uC5C5\uBB34"}),Nr(kr,{sx:{width:E0,flexShrink:0,textAlign:"center"},children:"\uC911\uC694\uB3C4"}),t?Nr(kr,{sx:{width:M0,flexShrink:0,textAlign:"center"},children:"\uCC45\uC784\uC790"}):null]}),Nr(kr,{sx:{flex:1,minHeight:0},children:Nr(aS,{style:{height:"100%"},thumb:{width:6},children:a.length===0?Nr(kr,{sx:{p:2,fontSize:14,color:"#9a9a97"},children:"\uBBF8\uC644\uB8CC \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):a.map(d=>Ho(kr,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1.5,borderBottom:"1px solid #f2f2f0"},children:[Nr(kr,{sx:{width:I0,flexShrink:0,fontSize:13.5,color:R0(d,g)?"#e5484d":"#787774",fontWeight:R0(d,g)?700:400},children:lS(d)}),Nr(kr,{onClick:n?()=>n(d.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:d.title}),Nr(kr,{sx:{width:E0,flexShrink:0,display:"flex",justifyContent:"center"},children:Nr(Xr,{priority:d.priority})}),t?Nr(kr,{sx:{width:M0,flexShrink:0,display:"flex",justifyContent:"center"},children:Nr(nS,{size:"small",variant:"outlined",startIcon:Nr(sS,{sx:{fontSize:17}}),onClick:u=>i({el:u.currentTarget,taskSeq:d.seq}),children:"\uC62E\uAE30\uAE30"})}):null]},d.seq))})})]}),Nr(oS,{anchorEl:c?.el??null,open:!!c,onClose:()=>i(null),transitionDuration:0,children:l.filter(d=>Number(d.account_seq)>0&&Number(d.account_seq)!==f.accountSeq).map(d=>Ho(iS,{onClick:()=>{c&&t&&t(c.taskSeq,Number(d.account_seq),d.name),i(null)},sx:{fontSize:14,minWidth:200},children:[Nr(kr,{sx:{flex:1},children:d.name}),Ho(kr,{component:"span",sx:{ml:2,fontSize:13,color:"#787774"},children:[h(Number(d.account_seq)),"\uAC74"]})]},d.account_seq))})]})}import{jsx as hc}from"react/jsx-runtime";function A0({open:e,row:f,rows:g,tasks:l,todayStr:o,employees:s,onClose:r,onChangeManager:t,onOpenTask:n}){let[c,i]=uS(f);cS(()=>{f&&i(f)},[f]);let a=f??c,h=a?fc(l,a.accountSeq).length:0;return hc(hS,{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:hc(dS,{variant:"contained",onClick:r,children:"\uB2EB\uAE30"})},sections:[{id:"person-tasks",title:"",showTitle:!1,children:hc(fS,{sx:{minHeight:0},children:a?hc(O0,{tasks:l,row:a,rows:g,todayStr:o,employees:s,height:"min(420px, 52vh)",hideSummary:!0,onChangeManager:t,onOpenTask:n}):null})}]})}import{useMemo as pS}from"react";import{Box as wn,Tooltip as mS}from"@mui/material";import{OverlayScrollbar as gS}from"@ehfuse/overlay-scrollbar";import{jsx as sn,jsxs as mc}from"react/jsx-runtime";var D0="#e5484d",bS="#2f80ed",yS="#9a9a97",jf=30,xS=96,pc=56;function Ff({count:e,max:f,color:g,title:l}){let o=e>0&&f>0?.18+e/f*.72:0;return sn(mS,{title:l,arrow:!0,disableInteractive:!0,placement:"top",children:sn(wn,{sx:{display:"flex",alignItems:"center",justifyContent:"center",borderRight:"1px solid #ececea",borderBottom:"1px solid #ececea",bgcolor:o>0?`${g}${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 P0({tasks:e,todayStr:f,weeks:g=6,height:l=200}){let o=pS(()=>k0(e,{todayStr:f,weeks:g}),[e,f,g]);if(o.rows.length===0)return sn(wn,{sx:_r(l),children:sn(nn,{text:"\uB2F4\uB2F9\uC790\uAC00 \uC9C0\uC815\uB41C \uBBF8\uC644\uB8CC \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",height:l})});let s=`${xS}px ${pc}px repeat(${o.weeks.length}, minmax(${pc}px, 1fr)) ${pc}px ${pc}px`,r={height:jf,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 sn(wn,{sx:_r(l),children:sn(gS,{style:{height:"100%"},thumb:{width:8},children:mc(wn,{sx:{display:"grid",gridTemplateColumns:s,minWidth:"fit-content",height:"100%",gridTemplateRows:`${jf}px repeat(${o.rows.length}, minmax(${jf}px, 1fr))`},children:[sn(wn,{sx:{...r,justifyContent:"flex-start",pl:1},children:"\uB2F4\uB2F9\uC790"}),sn(wn,{sx:{...r,color:D0},children:"\uC9C0\uC5F0"}),o.weeks.map(t=>sn(wn,{sx:{...r,...t.isCurrent?{borderBottom:"2px solid #2f80ed"}:{}},children:t.label},t.start)),sn(wn,{sx:r,children:"\uB9C8\uAC10\uC5C6\uC74C"}),sn(wn,{sx:r,children:"\uD569\uACC4"}),o.rows.map(t=>mc(wn,{sx:{display:"contents"},children:[sn(wn,{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}),sn(Ff,{count:t.overdue,max:o.maxCell,color:D0,title:`${t.name} \xB7 \uC9C0\uC5F0 ${t.overdue}\uAC74`}),t.byWeek.map((n,c)=>sn(Ff,{count:n,max:o.maxCell,color:bS,title:`${t.name} \xB7 ${o.weeks[c].label} \uC8FC \uB9C8\uAC10 ${n}\uAC74`},o.weeks[c].start)),sn(Ff,{count:t.noDue,max:o.maxCell,color:yS,title:`${t.name} \xB7 \uB9C8\uAC10 \uBBF8\uC815 ${t.noDue}\uAC74`}),mc(wn,{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?mc(wn,{component:"span",sx:{ml:.25,fontSize:10.5,color:"#9a9a97"},children:["(+",t.beyond,")"]}):null]})]},t.accountSeq))]})})})}import{Fragment as z0,jsx as ir,jsxs as gc}from"react/jsx-runtime";var j0="min(560px, 62vh)",kS=`calc(${j0} - 4px)`,SS=[{value:"30",label:"\uCD5C\uADFC 30\uC77C"},{value:"60",label:"\uCD5C\uADFC 60\uC77C"},{value:"90",label:"\uCD5C\uADFC 90\uC77C"}];function HV({open:e,sprints:f,tasks:g,todayStr:l,showSprintCharts:o,capacity:s=ko,capacityEmployees:r=[],onSaveCapacity:t,onChangeTaskManager:n,onOpenTask:c,initialSprintSeq:i=0,onClose:a}){let[h,d]=ka(0),[u,b]=ka(30);vS(()=>{if(!e)return;let y=f.find(w=>w.status==="active")??f[0],v=f.find(w=>w.seq===i)??y;d(v?.seq??0)},[e]);let m=N0(()=>f.find(y=>y.seq===h)??null,[f,h]),x={height:kS,boxSizing:"border-box",px:3,py:2.5,display:"flex",flexDirection:"column",minHeight:0,overflow:"hidden"},k=ir(qf,{label:"\uBAA9\uD45C",showLabel:!1,showEmptyOption:!1,value:h?String(h):"",options:f.map(y=>({value:String(y.seq),label:In(y)})),onChange:y=>d(Number(y.target.value)||0),sx:{width:280,flexShrink:0}}),[B,R]=ka("distribution"),j=ir(qf,{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]=ka(!1),[N,q]=ka(0),z=N0(()=>uc(g,{todayStr:l,capacity:s}),[g,l,s]),T=z.find(y=>y.accountSeq===N)??null,S=gc(z0,{children:[j,t?ir(L0,{size:"small",variant:"outlined",startIcon:ir(_S,{sx:{fontSize:18}}),onClick:()=>P(!0),sx:{flexShrink:0},children:"\uC6A9\uB7C9"}):null]}),D=o??f.length>0,p=ir(qf,{label:"\uAE30\uAC04",showLabel:!1,showEmptyOption:!1,value:String(u),options:SS,onChange:y=>b(Number(y.target.value)||30),sx:{width:280,flexShrink:0}});return gc(z0,{children:[ir(wS,{open:e,onClose:a,maxWidth:"md",title:"\uC5C5\uBB34 \uCC28\uD2B8",locale:"ko",contentTopPadding:0,contentPaddingX:0,sectionsPaddingTop:0,sectionContentPaddingTop:0,sectionTitleGap:0,fixedHeight:j0,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:ir(Wo,{sx:x,children:ir(i0,{sprints:f,tasks:g,height:"100%"})})},{id:"burndown",tabTitle:"\uBC88\uB2E4\uC6B4",showTitle:!1,children:ir(Wo,{sx:x,children:m?ir(l0,{sprint:m,tasks:g,todayStr:l,height:"100%",headerLeft:k}):gc(Wo,{sx:_r("100%"),children:[ir(Wo,{sx:Ur,children:k}),ir(nn,{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:ir(Wo,{sx:x,children:ir(g0,{tasks:g,todayStr:l,days:u,height:"100%",headerLeft:p})})}]:[],{id:"workload",tabTitle:"\uC6CC\uD06C\uB85C\uB4DC",showTitle:!1,children:ir(Wo,{sx:x,children:B==="timeline"?gc(Wo,{sx:{display:"flex",flexDirection:"column",height:"100%",minHeight:0},children:[ir(Wo,{sx:Ur,children:S}),ir(P0,{tasks:g,todayStr:l,height:"100%"})]}):ir(B0,{tasks:g,todayStr:l,height:"100%",capacity:s,headerLeft:S,selectedAccountSeq:N,onSelectPerson:n?q:void 0})})},{id:"lead-time",tabTitle:"\uB9AC\uB4DC\uD0C0\uC784",showTitle:!1,children:ir(Wo,{sx:x,children:ir(v0,{tasks:g,todayStr:l,days:u,height:"100%",headerLeft:p})})}],actions:{showCancelButton:!1,right:ir(L0,{variant:"contained",onClick:a,children:"\uB2EB\uAE30"})}}),ir(A0,{open:N>0,row:T,rows:z,tasks:g,todayStr:l,employees:r,onClose:()=>q(0),onChangeManager:n,onOpenTask:c}),t?ir(n0,{open:A,capacity:s,employees:r,onClose:()=>P(!1),onSave:async y=>{await t(y),P(!1)}}):null]})}import{Checkbox as TS,Divider as CS,Menu as BS,MenuItem as $f}from"@mui/material";import{jsx as Sa,jsxs as F0}from"react/jsx-runtime";function GV({anchorEl:e,candidates:f,selectedNames:g,avatarSrcByName:l,onToggle:o,onClear:s,onClose:r}){return F0(BS,{anchorEl:e,open:!!e,onClose:r,transitionDuration:0,children:[f.length===0?Sa($f,{disabled:!0,sx:{fontSize:14},children:"\uBAA9\uB85D\uC5D0 \uC9C0\uC815\uB41C \uC0AC\uB78C\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):f.map(t=>{let n=g.includes(t.name);return F0($f,{onClick:()=>o(t),sx:{fontSize:14,minWidth:170,gap:1},children:[Sa(TS,{size:"small",checked:n,sx:{p:0}}),Sa(Jr,{names:[t.name],size:20,avatarSrcByName:l}),t.name]},`${t.accountSeq}-${t.name}`)}),Sa(CS,{}),Sa($f,{disabled:g.length===0,onClick:s,sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}import{useState as IS}from"react";import{ButtonBase as ES,Menu as MS,MenuItem as RS}from"@mui/material";import OS from"@mui/icons-material/KeyboardArrowDown";import AS from"@mui/icons-material/Check";import{Fragment as DS,jsx as Hf,jsxs as Wf}from"react/jsx-runtime";function rK({value:e,onChange:f,options:g}){let[l,o]=IS(null),s=g??Vc,r=Vc.find(t=>t.value===e)?.label??"";return Wf(DS,{children:[Wf(ES,{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,Hf(OS,{sx:{fontSize:17,color:"#9a9a97"}})]}),Hf(MS,{transitionDuration:0,anchorEl:l,open:!!l,onClose:()=>o(null),children:s.map(t=>Wf(RS,{selected:t.value===e,onClick:()=>{f(t.value),o(null)},sx:{fontSize:14,minWidth:140,justifyContent:"space-between",gap:1},children:[t.label,t.value===e?Hf(AS,{sx:{fontSize:16,color:"#2f80ed"}}):null]},t.value))})]})}import{Box as bc,ButtonBase as PS}from"@mui/material";import{DateTextField as q0}from"@ehfuse/mui-form-controls";import{jsx as Ta,jsxs as $0}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 H0({fromDate:e,toDate:f,onChange:g}){let l=s=>{if(s<=0){g("","");return}g(mo(rc(s)),mo(new Date))},o=s=>s<=0?!e&&!f:!e||!f?!1:e===mo(rc(s))&&f===mo(new Date);return $0(bc,{sx:{display:"flex",alignItems:"center",gap:1.5,flexWrap:"wrap"},children:[Ta(bc,{sx:{display:"flex",alignItems:"center",gap:1.5},children:NS.map(s=>{let r=o(s.months);return Ta(PS,{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)})}),$0(bc,{sx:{display:"flex",alignItems:"center",gap:.5},children:[Ta(q0,{value:e,size:"small",placeholder:"\uC2DC\uC791\uC77C",onChange:s=>g(s.target.value,f),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}}),Ta(bc,{component:"span",sx:{fontSize:13,color:"#9a9a97"},children:"~"}),Ta(q0,{value:f,size:"small",placeholder:"\uC885\uB8CC\uC77C",onChange:s=>g(e,s.target.value),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}})]})]})}import{Popover as LS}from"@mui/material";import{jsx as W0}from"react/jsx-runtime";function dK({anchorEl:e,fromDate:f,toDate:g,onChange:l,onClose:o}){return W0(LS,{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:W0(H0,{fromDate:f,toDate:g,onChange:l})})}import{Box as zS,ButtonBase as jS,Tab as FS,Tabs as qS}from"@mui/material";import $S from"@mui/icons-material/Checklist";import HS from"@mui/icons-material/Face";import WS from"@mui/icons-material/Publish";import US from"@mui/icons-material/NotificationsOutlined";import VS from"@mui/icons-material/BugReportOutlined";import KS from"@mui/icons-material/SupportAgentOutlined";import GS from"@mui/icons-material/DescriptionOutlined";import YS from"@mui/icons-material/Inventory2Outlined";import{jsx as On}from"react/jsx-runtime";function U0(e,f){return f>0?`${e} (${f})`:e}var CK=[{id:"my",label:"\uC804\uCCB4",icon:On($S,{sx:{fontSize:18}})},{id:"mine",label:"\uB0B4 \uC5C5\uBB34",icon:On(HS,{sx:{fontSize:18}})},{id:"sent",label:"\uBCF4\uB0B8 \uC5C5\uBB34",icon:On(WS,{sx:{fontSize:18}})},{id:"support",label:"\uACE0\uAC1D\uC13C\uD130",icon:On(KS,{sx:{fontSize:18}})},{id:"bug",label:"\uC624\uB958",icon:On(VS,{sx:{fontSize:18}})},{id:"notice",label:"\uACF5\uC9C0\uC0AC\uD56D",icon:On(US,{sx:{fontSize:18}})},{id:"archive",label:"\uBCF4\uAD00\uD568",icon:On(YS,{sx:{fontSize:18}}),hideCount:!0},{id:"report",label:"\uBCF4\uACE0\uC11C",icon:On(GS,{sx:{fontSize:18}}),hideCount:!0}];function XS(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 BK({items:e,activeTab:f,counts:g,onChange:l,compact:o=!1}){let s=lt(),r=XS(s.tabs),t=e;return o?On(zS,{sx:{display:"flex",flexWrap:"wrap",gap:1.25},children:t.map(n=>{let c=f===n.id;return On(jS,{onClick:()=>l(n.id),sx:{px:1.5,py:.75,borderRadius:1,fontSize:Br(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:U0(n.label,n.hideCount?0:g[n.id]??0)},n.id)})}):On(qS,{value:f,onChange:(n,c)=>l(c),sx:{minHeight:46,"& .MuiTabs-indicator":{display:"none"},"& .MuiTabs-flexContainer":{gap:"12px",minHeight:46}},children:t.map(n=>On(FS,{value:n.id,label:U0(n.label,n.hideCount?0:g[n.id]??0),icon:n.icon,iconPosition:"start",sx:r},n.id))})}import{useEffect as ZS,useMemo as JS,useState as Uf}from"react";import{Divider as yc,ListItemIcon as an,Menu as Vf,MenuItem as Dr}from"@mui/material";import QS from"@mui/icons-material/OpenInNewOutlined";import eT from"@mui/icons-material/RestoreFromTrashOutlined";import tT from"@mui/icons-material/Check";import rT from"@mui/icons-material/CheckCircleOutlined";import nT from"@mui/icons-material/RadioButtonUnchecked";import oT from"@mui/icons-material/SendOutlined";import iT from"@mui/icons-material/EventOutlined";import sT from"@mui/icons-material/PersonOutlineOutlined";import aT from"@mui/icons-material/ViewKanbanOutlined";import lT from"@mui/icons-material/ContentCopyOutlined";import cT from"@mui/icons-material/NextPlanOutlined";import uT from"@mui/icons-material/ContentPasteOutlined";import fT from"@mui/icons-material/ShareOutlined";import dT from"@mui/icons-material/DirectionsRunOutlined";import V0 from"@mui/icons-material/ChevronRight";import hT from"@mui/icons-material/ArchiveOutlined";import pT from"@mui/icons-material/UnarchiveOutlined";import{ConfirmDialog as K0}from"@ehfuse/alerts";import{Fragment as G0,jsx as bt,jsxs as Sr}from"react/jsx-runtime";function sG({target:e,onClose:f,customTabs:g,sprints:l=[],myAccountSeq:o=0,onOpenDetail:s,onToggleCompleted:r,onRequestConfirm:t,onChangeDueDate:n,onChangeReminder:c,onMemberEdit:i,onMoveProject:a,onDuplicate:h,onCreateFollowUp:d,onShare:u,onAssignSprint:b,onArchiveToggle:m,onDelete:x,onRestore:k,onPurge:B}){let R=qt(),j=Jn(),[A,P]=Uf(null),[N,q]=Uf(null),[z,T]=Uf(null);ZS(()=>{e||(P(null),q(null),T(null))},[e]);let S=e?.task??null,D=!!S?.is_notice,p=!!S?.is_event,y=S?!Qn(S,o):!1,{editPolicy:v}=ot(),w=S?Qo(S,o,v):!1,_=S?Ti(S,o,v,y):!1,C=S?Ti(S,o,v,!1):!1,O=!!S?.deleted,F=JS(()=>new Set(g.filter(H=>H.useSprints).map(H=>H.key)),[g]),$=async(H="one")=>{let E=S;if(f(),!E)return;await K0({title:"\uC5C5\uBB34 \uC0AD\uC81C",message:H==="series"?`"${E.title}" \uC758 \uC774 \uD68C\uCC28\uC640 \uC774\uD6C4 \uBC18\uBCF5 \uD68C\uCC28\uB97C \uBAA8\uB450 \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`:`"${E.title}" \uC5C5\uBB34\uB97C \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&x(E.seq,H)},K=async()=>{let H=S;if(f(),!H)return;await K0({title:"\uC601\uAD6C \uC0AD\uC81C",message:`"${H.title}" \uC5C5\uBB34\uB97C \uC601\uAD6C\uD788 \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C? \uB418\uB3CC\uB9B4 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.`})&&B?.(H.seq)},M=()=>{S&&m(S.seq,!S.archived),f()};return Sr(G0,{children:[Sr(Vf,{open:!!e,onClose:f,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:[Sr(Dr,{onClick:()=>{S&&s(S),f()},sx:{fontSize:14},children:[bt(an,{children:bt(QS,{sx:{fontSize:19}})}),"\uC0C1\uC138 \uC5F4\uAE30"]}),O?bt(yc,{}):null,O&&k?Sr(Dr,{disabled:C,onClick:()=>{S&&k(S.seq),f()},sx:{fontSize:14},children:[bt(an,{children:bt(eT,{sx:{fontSize:19}})}),"\uBCF5\uC6D0"]}):null,O&&B?Sr(Dr,{disabled:C,onClick:()=>{K()},sx:{fontSize:14,color:"#e5484d"},children:[bt(an,{children:bt(Ir,{sx:{fontSize:19,color:"#e5484d"}})}),"\uC601\uAD6C \uC0AD\uC81C"]}):null,O?null:Sr(G0,{children:[Sr(Dr,{disabled:D?(S?.author_account_seq??0)!==o:(S?.author_account_seq??0)!==o&&(S?.manager_account_seq??0)!==o,onClick:()=>{S&&r(S.seq,!S.completed),f()},sx:{fontSize:14},children:[bt(an,{children:S?.completed?bt(nT,{sx:{fontSize:19}}):bt(rT,{sx:{fontSize:19}})}),S?.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC"]}),!D&&t?Sr(Dr,{disabled:!(S?.manager_account_seq??0)&&(S?.receiver_account_seqs??[]).length===0,onClick:()=>{S&&t(S),f()},sx:{fontSize:14},children:[bt(an,{children:bt(oT,{sx:{fontSize:19}})}),"\uD655\uC778 \uC694\uCCAD"]}):null,p?null:bt(yc,{}),p?null:Sr(Dr,{disabled:w,onClick:H=>{S&&P({anchorEl:H.currentTarget,task:S})},sx:{fontSize:14},children:[bt(an,{children:bt(iT,{sx:{fontSize:19}})}),"\uB9C8\uAC10\uC608\uC815 \uBCC0\uACBD"]}),!D&&!p&&i?Sr(Dr,{disabled:v==="coreAuthorManager"?w:!1,onClick:()=>{S&&i(S,"manager"),f()},sx:{fontSize:14},children:[bt(an,{children:bt(sT,{sx:{fontSize:19}})}),"\uCC45\uC784\uC790 \uBCC0\uACBD"]}):null,p?null:Sr(Dr,{disabled:w,onClick:H=>{S&&q({anchorEl:H.currentTarget,task:S})},sx:{fontSize:14},children:[bt(an,{children:bt(aT,{sx:{fontSize:19}})}),"\uD504\uB85C\uC81D\uD2B8 \uC774\uB3D9",bt(V0,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}),bt(yc,{}),h?Sr(Dr,{disabled:y,onClick:()=>{S&&h(S.seq),f()},sx:{fontSize:14},children:[bt(an,{children:bt(lT,{sx:{fontSize:19}})}),"\uBCF5\uC81C"]}):null,d&&S&&!S.is_event&&!S.is_notice?Sr(Dr,{onClick:()=>{S&&d(S.seq),f()},sx:{fontSize:14},children:[bt(an,{children:bt(cT,{sx:{fontSize:19}})}),"\uD6C4\uC18D \uC5C5\uBB34 \uB9CC\uB4E4\uAE30"]}):null,Sr(Dr,{onClick:()=>{S&&(u?u(S):ps(S,R)),f()},sx:{fontSize:14},children:[bt(an,{children:R?bt(fT,{sx:{fontSize:19}}):bt(uT,{sx:{fontSize:19}})}),R?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC"]}),S&&!S.is_notice&&!S.is_event&&F.has(String(S.tab_key??""))&&b?Sr(Dr,{onClick:H=>T(H.currentTarget),sx:{fontSize:14},children:[bt(an,{children:bt(dT,{sx:{fontSize:19}})}),"\uBAA9\uD45C\uC5D0 \uB123\uAE30",bt(V0,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}):null,Sr(Dr,{onClick:M,disabled:y||!S?.archived&&!(S&&Ka(S)),sx:{fontSize:14},children:[bt(an,{children:S?.archived?bt(pT,{sx:{fontSize:19}}):bt(hT,{sx:{fontSize:19}})}),S?.archived?"\uBCF4\uAD00 \uD574\uC81C":"\uBCF4\uAD00"]}),bt(yc,{}),Sr(Dr,{disabled:_,onClick:()=>{$("one")},sx:{fontSize:14,color:"#e5484d"},children:[bt(an,{children:bt(Ir,{sx:{fontSize:19,color:"#e5484d"}})}),(S?.repeat_group_key??0)>0?"\uC0AD\uC81C (\uC774 \uD68C\uCC28\uB9CC)":"\uC0AD\uC81C"]}),(S?.repeat_group_key??0)>0?Sr(Dr,{disabled:_,onClick:()=>{$("series")},sx:{fontSize:14,color:"#e5484d"},children:[bt(an,{children:bt(Ir,{sx:{fontSize:19,color:"#e5484d"}})}),"\uC0AD\uC81C (\uC774\uD6C4 \uBC18\uBCF5 \uC804\uCCB4)"]}):null]})]}),bt(Bn,{anchorEl:A?.anchorEl??null,open:!!A,date:A?.task.due_date??"",reminders:ro(A?.task),hideReminder:!!A?.task.completed,centered:R,onClose:()=>{P(null),f()},onDateChange:H=>{A&&n(A.task.seq,H)},onReminderChange:H=>{A&&c?.(A.task.seq,H)}}),Sr(Vf,{transitionDuration:0,anchorEl:N?.anchorEl??null,open:!!N,onClose:()=>{q(null),f()},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},...j,children:[bt(Dr,{selected:!N?.task.tab_key,onClick:()=>{N&&a(N.task.seq,""),q(null),f()},sx:{fontSize:14,minWidth:170},children:"\uC5C6\uC74C"}),g.filter(H=>!H.archived).map(H=>bt(Dr,{selected:N?.task.tab_key===H.key,onClick:()=>{N&&a(N.task.seq,H.key),q(null),f()},sx:{fontSize:14,minWidth:170},children:H.label},H.key))]}),bt(Vf,{transitionDuration:0,anchorEl:z,open:!!z,onClose:()=>T(null),anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...l.filter(H=>`custom-${H.group_seq}`===String(S?.tab_key??"")).map(H=>({seq:H.seq,label:In(H)}))].map(H=>Sr(Dr,{onClick:()=>{S&&b?.(S.seq,H.seq),T(null),f()},sx:{fontSize:14,minWidth:160,gap:1},children:[H.label,(S?.sprint_seq??0)===H.seq?bt(tT,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},H.seq))})]})}import{Checkbox as mT,Divider as gT,Menu as bT,MenuItem as Y0}from"@mui/material";import{jsx as xc,jsxs as X0}from"react/jsx-runtime";function fG({anchorEl:e,labelOptions:f,selectedKeys:g,onToggle:l,onClear:o,onClose:s}){return X0(bT,{transitionDuration:0,anchorEl:e,open:!!e,onClose:s,children:[f.map(r=>{let t=g.includes(r.key);return X0(Y0,{onClick:()=>l(r.key),sx:{fontSize:14,minWidth:190,gap:1},children:[xc(mT,{size:"small",checked:t,sx:{p:0}}),xc(Lt,{option:r})]},r.key)}),xc(gT,{}),xc(Y0,{disabled:g.length===0,onClick:()=>{o(),s()},sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}import{Divider as yT,Menu as xT,MenuItem as Z0}from"@mui/material";import vT from"@mui/icons-material/Check";import wT from"@mui/icons-material/SettingsOutlined";import{jsx as Kf,jsxs as Gf}from"react/jsx-runtime";function yG(e){let{anchorEl:f,sprints:g,value:l,onSelect:o,onManage:s,onClose:r}=e;return Gf(xT,{transitionDuration:0,anchorEl:f,open:!!f,onClose:r,children:[[{seq:0,label:"\uC804\uCCB4"},{seq:-1,label:"\uBBF8\uBC30\uC815 \uC5C5\uBB34"},...g.map(t=>({seq:t.seq,label:In(t)}))].map(t=>Gf(Z0,{onClick:()=>{o(t.seq),r()},sx:{fontSize:14,minWidth:180,gap:1},children:[t.label,l===t.seq?Kf(vT,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},t.seq)),Kf(yT,{}),Gf(Z0,{onClick:()=>{r(),s()},sx:{fontSize:14,gap:1},children:[Kf(wT,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uAD00\uB9AC\u2026"]})]})}var _T={my:"tasks",mine:"tasks",sent:"tasks",notice:"notice",support:"support",bug:"bug",archive:"archive",done:"done",report:"report"};function kT(e){return _T[e]??"tasks"}var Q0={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"},J0=["list","calendar","month","card","kanban","sprint","timeline"],ST=["list","kanban"],TT=["list","card"];function wG(e){let f=kT(e);switch(f){case"notice":return{kind:f,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:f,viewOptions:J0,showCreate:!0,createLabel:"\uC624\uB958 \uB4F1\uB85D",showGroupBy:!0,showSprintFilter:!0,showDateRange:!1,showHideCompleted:!0,forceFlatList:!1,columns:{bug:!0}};case"support":return{kind:f,viewOptions:ST,showCreate:!1,createLabel:"",showGroupBy:!0,showSprintFilter:!1,showDateRange:!1,showHideCompleted:!0,forceFlatList:!1,columns:{support:!0,showProject:!1}};case"archive":return{kind:f,viewOptions:TT,showCreate:!1,createLabel:"",showGroupBy:!1,showSprintFilter:!1,showDateRange:!0,showHideCompleted:!1,forceFlatList:!0,columns:{showActions:!1}};case"done":return{kind:f,viewOptions:["list"],showCreate:!1,createLabel:"",showGroupBy:!1,showSprintFilter:!1,showDateRange:!0,showHideCompleted:!1,forceFlatList:!0,columns:{showActions:!1}};case"report":return{kind:f,viewOptions:[],showCreate:!1,createLabel:"",showGroupBy:!1,showSprintFilter:!1,showDateRange:!0,showHideCompleted:!1,forceFlatList:!0,columns:{}};default:return{kind:f,viewOptions:J0,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 CT}from"react";import{useKeyboardState as BT}from"@ehfuse/keyboard-state";var eg=[{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 CG(e,f={}){let{enabled:g=!0,views:l}=f,{onCreateTask:o,onFocusSearch:s,onToggleHelp:r,onChangeView:t,onRefresh:n,onEscape:c}=e,i=l?l.join(","):"",a=CT(()=>{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 d of tg(i?i.split(","):void 0))h.push({key:d.key,callback:()=>t(d.view),options:{preventDefault:!0}});return h},[o,s,r,t,n,c,i]);BT(g?a:[])}function tg(e){if(!e)return eg;let f=new Set(e);return eg.filter(g=>f.has(g.view))}function Ca(e){return[{keys:"N",description:"\uC0C8 \uC5C5\uBB34 \uB4F1\uB85D"},{keys:"/",description:"\uAC80\uC0C9"},{keys:"R",description:"\uBAA9\uB85D \uC0C8\uB85C\uACE0\uCE68"},...tg(e).map(f=>({keys:f.key.split(" ").map(g=>g.toUpperCase()).join(" \u2192 "),description:`${Q0[f.view]} \uBCF4\uAE30`})),{keys:"?",description:"\uB2E8\uCD95\uD0A4 \uB3C4\uC6C0\uB9D0"},{keys:"Esc",description:"\uB2EB\uAE30"}]}var BG=Ca();import{Box as Ba,Button as IT}from"@mui/material";import ET from"@mui/icons-material/ArrowRightAlt";import{FormDialog as MT}from"@ehfuse/mui-form-dialog";import{jsx as yi,jsxs as rg}from"react/jsx-runtime";function RT({keys:e}){return yi(Ba,{sx:{display:"flex",alignItems:"center",gap:.5,justifyContent:"flex-end"},children:e.split(" \u2192 ").map((f,g)=>rg(Ba,{sx:{display:"flex",alignItems:"center",gap:.5},children:[g>0?yi(ET,{sx:{fontSize:18,color:"#9a9a97"}}):null,yi(Ba,{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:f})]},`${f}-${g}`))})}function AG({open:e,onClose:f,views:g}){let l=Ca(g);return yi(MT,{open:e,onClose:f,maxWidth:"xs",title:"\uB2E8\uCD95\uD0A4",locale:"ko",titleIcons:{delete:{visible:!1}},tabs:{visible:!1},sectionContentPaddingTop:0,sections:[{id:"shortcuts",showTitle:!1,children:yi(Ba,{sx:{display:"grid",gridTemplateColumns:"auto 1fr",columnGap:2,rowGap:1.25,alignItems:"center",fontSize:14,color:"#37352f"},children:l.map(o=>rg(Ba,{sx:{display:"contents"},children:[yi(RT,{keys:o.keys}),yi("span",{children:o.description})]},o.keys))})}],actions:{showCancelButton:!1,right:yi(IT,{variant:"contained",onClick:f,children:"\uB2EB\uAE30"})}})}import{Fragment as Xf,useEffect as OT,useState as AT}from"react";import{Box as dr,Button as DT}from"@mui/material";import PT from"@mui/icons-material/ArrowRightAlt";import NT from"@mui/icons-material/ChevronRightRounded";import LT from"@mui/icons-material/ArrowForward";import{FormDialog as zT}from"@ehfuse/mui-form-dialog";var ng={id:"concept",tabTitle:"\uAC1C\uB150",intro:"\uC5C5\uBB34\uD568\uC740 '\uB204\uAC00 \uBB34\uC5C7\uC744 \uC5B8\uC81C\uAE4C\uC9C0 \uD558\uB294\uC9C0'\uB97C \uD55C \uACF3\uC5D0 \uBAA8\uC73C\uB294 \uB3C4\uAD6C\uC785\uB2C8\uB2E4. \uBA54\uC2E0\uC800\uC5D0 \uD769\uC5B4\uC9C4 \uC9C0\uC2DC\uC640 \uC5D1\uC140\uC5D0 \uC801\uC5B4 \uB454 \uB9C8\uAC10\uC77C \uB300\uC2E0, \uC5C5\uBB34\uB97C \uBCF4\uB0B8 \uC0AC\uB78C\uACFC \uBC1B\uC740 \uC0AC\uB78C\uC774 \uAC19\uC740 \uD654\uBA74\uC744 \uBD05\uB2C8\uB2E4.",topics:[{title:"\uC138 \uAC78\uC74C\uC774\uBA74 \uB05D",lead:"\uC5C5\uBB34 \uD558\uB098\uC758 \uC0DD\uC560\uB294 \uC774 \uC138 \uAC78\uC74C\uC785\uB2C8\uB2E4. \uB098\uBA38\uC9C0 \uAE30\uB2A5\uC740 \uC804\uBD80 \uC774 \uD750\uB984\uC744 \uB3D5\uB294 \uAC83\uC774\uB77C, \uC774\uAC83\uB9CC \uC54C\uBA74 \uCCAB\uB0A0\uBD80\uD130 \uC501\uB2C8\uB2E4.",steps:[{title:"\uB4F1\uB85D",desc:"\uC81C\uBAA9 \xB7 \uCC45\uC784\uC790 \xB7 \uB9C8\uAC10\uC608\uC815\uB9CC \uC801\uC5B4 \uBCF4\uB0C5\uB2C8\uB2E4."},{title:"\uD655\uC778",desc:"\uBC1B\uC740 \uC0AC\uB78C\uC774 \uD655\uC778\uD558\uACE0 \uCC98\uB9AC\uD55C \uB4A4 \uC644\uB8CC\uD569\uB2C8\uB2E4."},{title:"\uBCF4\uAD00",desc:"\uB05D\uB09C \uC5C5\uBB34\uB294 \uBCF4\uAD00\uD568\uC5D0 \uB0A8\uC544 \uC5B8\uC81C\uB4E0 \uB2E4\uC2DC \uCC3E\uC2B5\uB2C8\uB2E4."}]},{title:"\uC5C5\uBB34\uB97C \uB458\uB7EC\uC2FC \uC138 \uC0AC\uB78C",lead:"\uC5C5\uBB34\uB9C8\uB2E4 \uBCF4\uB0B8 \uC0AC\uB78C \uD558\uB098, \uBC1B\uC740 \uC0AC\uB78C \uD558\uB098, \uD568\uAED8 \uC54C\uC544\uC57C \uD560 \uC0AC\uB78C\uB4E4\uC774 \uC788\uC2B5\uB2C8\uB2E4. \uC138 \uC5ED\uD560\uC774 \uBAA8\uB450 '\uAD00\uC5EC\uC790'\uC774\uACE0, \uACF5\uAC1C \uBC94\uC704\uAC00 **\uBE44\uACF5\uAC1C**\uC5EC\uB3C4 \uC11C\uB85C\uC5D0\uAC8C \uBCF4\uC785\uB2C8\uB2E4. \uB204\uAC00 \uBB34\uC5C7\uC744 \uB204\uB97C \uC218 \uC788\uB294\uC9C0\uB294 **\uC5ED\uD560** \uD0ED\uC5D0 \uBAA8\uC544 \uB450\uC5C8\uC2B5\uB2C8\uB2E4.",items:[{term:"\uC791\uC131\uC790",desc:"\uC5C5\uBB34\uB97C \uBCF4\uB0B8 \uC0AC\uB78C. \uC5C5\uBB34\uC758 \uC8FC\uC778\uC785\uB2C8\uB2E4."},{term:"\uCC45\uC784\uC790",desc:"\uC5C5\uBB34\uB97C \uBC1B\uC544 \uCC98\uB9AC\uD558\uB294 \uC0AC\uB78C(\uD55C \uBA85)."},{term:"\uCC38\uC870\uC790",desc:"\uD568\uAED8 \uC54C\uC544\uC57C \uD560 \uC0AC\uB78C\uB4E4(\uC5EC\uB7EC \uBA85)."}]},{title:"\uBC1B\uC740 \uC5C5\uBB34\uC640 \uBCF4\uB0B8 \uC5C5\uBB34",lead:"\uD0ED\uC740 '\uB0B4\uAC00 \uBC1B\uC740 \uAC83'\uACFC '\uB0B4\uAC00 \uBCF4\uB0B8 \uAC83'\uC744 \uAC00\uB974\uB294 \uCD95\uC785\uB2C8\uB2E4. \uB0A8\uC774 \uC2DC\uD0A8 \uC77C\uACFC \uB0B4\uAC00 \uC2DC\uD0A8 \uC77C\uC774 \uC11E\uC774\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.",items:[{term:"\uB0B4 \uC5C5\uBB34",desc:"\uB0B4\uAC00 \uCC45\uC784\uC790\uC774\uAC70\uB098 \uCC38\uC870\uC790\uC778 \uC5C5\uBB34 \u2014 \uBC1B\uC740 \uC5C5\uBB34\uC785\uB2C8\uB2E4."},{term:"\uBCF4\uB0B8 \uC5C5\uBB34",desc:"\uB0B4\uAC00 \uB4F1\uB85D\uD574 \uB2E4\uB978 \uC0AC\uB78C\uC5D0\uAC8C \uB9E1\uAE34 \uC5C5\uBB34\uC785\uB2C8\uB2E4."},{term:"\uC804\uCCB4",desc:"\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."},{term:"\uACF5\uC9C0\uC0AC\uD56D",desc:"\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."},{term:"\uBCF4\uAD00\uD568",desc:'\uB05D\uB098\uC11C \uBCF4\uAD00\uB41C \uC5C5\uBB34\xB7\uC77C\uC815\uACFC \uD734\uC9C0\uD1B5. "\uC5C5\uBB34 \xB7 \uC77C\uC815 \u25BE" \uBA54\uB274\uB85C \uAD6C\uBD84\uC744 \uBC14\uAFD4 \uBD05\uB2C8\uB2E4.'}]},{title:"\uD655\uC778 \xB7 \uC644\uB8CC \xB7 \uAC80\uC218",subtitle:"\uC138 \uAC00\uC9C0 \uB2E4\uB978 \uB9D0",lead:"\uB2E4\uC2DC \uBB3B\uC9C0 \uC54A\uC544\uB3C4 \uB418\uB294 \uC774\uC720\uAC00 \uC5EC\uAE30 \uC788\uC2B5\uB2C8\uB2E4. \uC77D\uC5C8\uB294\uC9C0, \uB05D\uB0AC\uB294\uC9C0, \uAC80\uC218\uD588\uB294\uC9C0\uAC00 \uAC01\uAC01 \uD45C\uC2DC\uB85C \uB0A8\uC2B5\uB2C8\uB2E4.",items:[{term:"\uD655\uC778",desc:'"\uC77D\uC5C8\uB2E4". \uBC1B\uC740 \uC0AC\uB78C\uC774 **\uD655\uC778** \uBC84\uD2BC\uC744 \uB20C\uB7EC \uB0A8\uAE41\uB2C8\uB2E4. \uC544\uC9C1 \uD655\uC778\uD558\uC9C0 \uC54A\uC740 \uC5C5\uBB34\uB294 \uBAA9\uB85D \uB9E8 \uC704 **\uBBF8\uD655\uC778** \uC601\uC5ED\uC5D0 \uBAA8\uC785\uB2C8\uB2E4.'},{term:"\uC644\uB8CC",desc:'"\uB05D\uB0AC\uB2E4". \uCC45\uC784\uC790\uB098 \uC791\uC131\uC790\uAC00 \uC644\uB8CC \uCCB4\uD06C(\u25CB)\uB97C \uB204\uB985\uB2C8\uB2E4.'},{term:"\uAC80\uC218\uC644\uB8CC",desc:'"\uBD24\uB2E4, \uAD1C\uCC2E\uB2E4". \uCC45\uC784\uC790\uAC00 \uC644\uB8CC\uD55C \uC5C5\uBB34\uB294 \uC791\uC131\uC790\uC5D0\uAC8C **\uAC80\uC218 \uB300\uAE30**\uB85C \uB0A8\uACE0, \uC791\uC131\uC790\uAC00 **\uAC80\uC218\uC644\uB8CC**\uB85C \uB0B4\uB9AC\uAC70\uB098 \uBBF8\uD761\uD558\uBA74 \uC0AC\uC720\uB97C \uC801\uC5B4 **\uB418\uB3CC\uB9BD\uB2C8\uB2E4**.'}]},{title:"\uB450 \uAC1C\uC758 \uB0A0\uC9DC",lead:"\uC5C5\uBB34\uC5D0\uB294 \uC2DC\uC791\uC77C\uC2DC\uC640 \uB9C8\uAC10\uC608\uC815 \uB450 \uB0A0\uC9DC\uAC00 \uC788\uACE0, \uC54C\uB9BC\uACFC \uCE98\uB9B0\uB354\uB294 \uC804\uBD80 \uC774 \uB458\uC744 \uAE30\uC900\uC73C\uB85C \uC6C0\uC9C1\uC785\uB2C8\uB2E4.",items:[{term:"\uC2DC\uC791\uC77C\uC2DC",desc:"\uC77C\uC744 \uC2DC\uC791\uD560 \uC2DC\uC810. \uCC45\uC784\uC790 \uC54C\uB9BC\uC740 \uC774\uB54C\uBD80\uD130 \uAC11\uB2C8\uB2E4. \uBE44\uC6CC \uB450\uBA74 \uBC14\uB85C \uC2DC\uC791\uC73C\uB85C \uBD05\uB2C8\uB2E4."},{term:"\uB9C8\uAC10\uC608\uC815",desc:"\uB05D\uB0B4\uAE30\uB85C \uD55C \uC2DC\uC810. \uC0AC\uC804\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."}]}]};var og={id:"roles",tabTitle:"\uC5ED\uD560",intro:"\uC5C5\uBB34\uB9C8\uB2E4 \uBCF4\uB0B8 \uC0AC\uB78C(\uC791\uC131\uC790) \uD558\uB098, \uBC1B\uC544 \uCC98\uB9AC\uD558\uB294 \uC0AC\uB78C(\uCC45\uC784\uC790) \uD558\uB098, \uD568\uAED8 \uC54C\uC544\uC57C \uD560 \uC0AC\uB78C\uB4E4(\uCC38\uC870\uC790)\uC774 \uC788\uC2B5\uB2C8\uB2E4. \uC14B \uB2E4 '\uAD00\uC5EC\uC790'\uB77C\uC11C \uACF5\uAC1C \uBC94\uC704\uAC00 **\uBE44\uACF5\uAC1C**\uC5EC\uB3C4 \uC11C\uB85C\uC5D0\uAC8C \uBCF4\uC785\uB2C8\uB2E4. \uB204\uAC00 \uBB34\uC5C7\uC744 \uB204\uB97C \uC218 \uC788\uB294\uC9C0\uAC00 \uC774 \uD0ED\uC758 \uB0B4\uC6A9\uC785\uB2C8\uB2E4.",topics:[{title:"\uC791\uC131\uC790",subtitle:"\uC5C5\uBB34\uC758 \uC8FC\uC778",lead:"\uC5C5\uBB34\uB97C \uB4F1\uB85D\uD55C \uC0AC\uB78C\uC785\uB2C8\uB2E4. \uB0B4\uC6A9\uC744 \uC815\uD558\uACE0 \uACB0\uACFC\uB97C \uAC80\uC218\uD558\uB294 \uC790\uB9AC\uB77C, \uC5C5\uBB34\uB97C \uC5C6\uC568 \uC218 \uC788\uB294 \uC720\uC77C\uD55C \uC5ED\uD560\uC785\uB2C8\uB2E4.",items:[{term:"\uD558\uB294 \uC77C",desc:"\uBB34\uC5C7\uC744 \uC5B8\uC81C\uAE4C\uC9C0 \uD560\uC9C0 \uC801\uC5B4 \uCC45\uC784\uC790\uC5D0\uAC8C \uBCF4\uB0C5\uB2C8\uB2E4. \uB05D\uB09C \uB4A4 \uACB0\uACFC\uB97C \uBCF4\uACE0 **\uAC80\uC218\uC644\uB8CC**\uB85C \uB0B4\uB9AC\uAC70\uB098, \uBBF8\uD761\uD558\uBA74 \uC0AC\uC720\uB97C \uC801\uC5B4 **\uB418\uB3CC\uB9BD\uB2C8\uB2E4**."},{term:"\uC218\uC815",desc:"\uC81C\uBAA9\xB7\uB9C8\uAC10\uC608\uC815\xB7\uCC45\uC784\uC790\xB7\uCC38\uC870\uC790\xB7\uB0B4\uC6A9 \uC804\uBD80 \uACE0\uCE69\uB2C8\uB2E4. \uBC14\uAFBC \uB0B4\uC6A9\uC740 \uC7A0\uC2DC \uBAA8\uC544 \uD55C \uAC74\uC758 \uC218\uC815 \uC54C\uB9BC\uC73C\uB85C \uAC11\uB2C8\uB2E4."},{term:"\uC644\uB8CC",desc:"\uC9C1\uC811 \uC644\uB8CC \uCCB4\uD06C\uB97C \uB204\uB97C \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uBCF8\uC778\uC774 \uC644\uB8CC\uD558\uBA74 \uAC80\uC218 \uB2E8\uACC4\uAC00 \uC5C6\uC5B4 \uADF8\uB300\uB85C \uB05D\uC785\uB2C8\uB2E4."},{term:"\uB418\uB3CC\uB9AC\uAE30",desc:"\uCC45\uC784\uC790\uAC00 \uC644\uB8CC\uD55C \uC5C5\uBB34\uB97C **\uAC80\uC218 \uB300\uAE30\uC778 \uB3D9\uC548\uB9CC** \uC0AC\uC720\uC640 \uD568\uAED8 \uB418\uB3CC\uB9BD\uB2C8\uB2E4. \uC0AC\uC720\uB294 \uB313\uAE00\uB85C \uB0A8\uACE0 \uC644\uB8CC\uD55C \uC0AC\uB78C\uC5D0\uAC8C \uC54C\uB9BC\uC774 \uAC11\uB2C8\uB2E4."},{term:"\uC0AD\uC81C",desc:"\uC791\uC131\uC790 \uBCF8\uC778\uB9CC \uC0AD\uC81C\uD569\uB2C8\uB2E4(\uAD00\uB9AC\uC790 \uAD8C\uD55C\uC740 \uC870\uC9C1 \uC124\uC815\uC5D0 \uB530\uB985\uB2C8\uB2E4). \uC0AD\uC81C\uD55C \uC5C5\uBB34\uB294 \uBCF4\uAD00\uD568\uC758 \uD734\uC9C0\uD1B5\uC5D0 \uB0A8\uC2B5\uB2C8\uB2E4."},{term:"\uD655\uC778",desc:"\uD655\uC778 \uB300\uC0C1\uC5D0\uC11C **\uBE60\uC9D1\uB2C8\uB2E4** \u2014 \uB0B4\uAC00 \uC4F4 \uAE00\uC744 \uB0B4\uAC00 \uC77D\uC5C8\uB2E4\uACE0 \uB0A8\uAE38 \uC77C\uC740 \uC5C6\uAE30 \uB54C\uBB38\uC785\uB2C8\uB2E4."}]},{title:"\uCC45\uC784\uC790",subtitle:"\uBC1B\uC544\uC11C \uCC98\uB9AC\uD558\uB294 \uC0AC\uB78C",lead:"\uC5C5\uBB34\uB97C \uC2E4\uC81C\uB85C \uCC98\uB9AC\uD558\uB294 \uD55C \uC0AC\uB78C\uC785\uB2C8\uB2E4. \uC5C5\uBB34\uB97C \uBC1B\uC73C\uBA74 \uC2DC\uC791\uC77C\uC2DC\uBD80\uD130 \uC54C\uB9BC\uC774 \uC624\uACE0, \uBAA9\uB85D\uC5D0\uC11C\uB294 '\uB0B4 \uC5C5\uBB34'\uB85C \uBAA8\uC785\uB2C8\uB2E4.",items:[{term:"\uD558\uB294 \uC77C",desc:"\uB0B4\uC6A9\uC744 \uD655\uC778\uD558\uACE0 \uCC98\uB9AC\uD55C \uB4A4 \uC644\uB8CC \uCCB4\uD06C(\u25CB)\uB97C \uB204\uB985\uB2C8\uB2E4. \uC644\uB8CC\uD558\uBA74 \uC791\uC131\uC790\uC5D0\uAC8C **\uAC80\uC218 \uB300\uAE30**\uB85C \uB118\uC5B4\uAC11\uB2C8\uB2E4."},{term:"\uD655\uC778",desc:'**\uD655\uC778** \uBC84\uD2BC\uC73C\uB85C "\uC77D\uC5C8\uB2E4"\uB97C \uB0A8\uAE41\uB2C8\uB2E4. \uCC45\uC784\uC790\uAC00 \uD655\uC778\uD558\uBA74 \uC791\uC131\uC790\uC5D0\uAC8C \uC54C\uB9BC\uC774 \uAC11\uB2C8\uB2E4.'},{term:"\uC218\uC815",desc:"\uACE0\uCE60 \uC218 \uC788\uC2B5\uB2C8\uB2E4 \u2014 \uC9C4\uD589\uD558\uB2E4 \uBCF4\uBA74 \uB9C8\uAC10\uC608\uC815\xB7\uB0B4\uC6A9\uC774 \uB2EC\uB77C\uC9C0\uAE30 \uB54C\uBB38\uC785\uB2C8\uB2E4. \uC0C1\uD0DC\xB7\uBE44\uACE0\xB7\uD560\uC77C\uB3C4 \uBAA9\uB85D\uC5D0\uC11C \uBC14\uB85C \uACE0\uCE69\uB2C8\uB2E4."},{term:"\uD560\uC77C\uB85C \uB098\uB204\uAE30",desc:"\uD070 \uC5C5\uBB34\uB294 \uD560\uC77C(\uCCB4\uD06C\uB9AC\uC2A4\uD2B8)\uB85C \uCABC\uAC1C\uACE0, \uD544\uC694\uD558\uBA74 \uD560\uC77C\uC744 \uBCC4\uB3C4 \uC5C5\uBB34\uB85C \uC2B9\uACA9\uD574 \uB2E4\uB978 \uC0AC\uB78C\uC5D0\uAC8C \uB9E1\uAE41\uB2C8\uB2E4."},{term:"\uC0AD\uC81C",desc:"\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uB0A8\uC774 \uB9E1\uAE34 \uC77C\uC744 \uBC1B\uC740 \uCABD\uC774 \uC5C6\uC568 \uC218\uB294 \uC5C6\uAE30 \uB54C\uBB38\uC785\uB2C8\uB2E4 \u2014 \uB418\uB3CC\uB9B4 \uC77C\uC774\uBA74 \uB313\uAE00\uB85C \uC54C\uB9BD\uB2C8\uB2E4."},{term:"\uD55C \uBA85\uBFD0",desc:"\uCC45\uC784\uC790\uB294 \uD55C \uC0AC\uB78C\uC785\uB2C8\uB2E4. \uC5EC\uB7FF\uC774 \uB098\uB220\uC57C \uD558\uB294 \uC77C\uC740 \uD560\uC77C\uB85C \uCABC\uAC1C\uAC70\uB098 \uC5C5\uBB34\uB97C \uB098\uB220 \uB4F1\uB85D\uD569\uB2C8\uB2E4."}]},{title:"\uCC38\uC870\uC790",subtitle:"\uD568\uAED8 \uC54C\uC544\uC57C \uD560 \uC0AC\uB78C\uB4E4",lead:"\uC9C1\uC811 \uCC98\uB9AC\uD558\uC9C0\uB294 \uC54A\uC9C0\uB9CC \uB0B4\uC6A9\uC744 \uC54C\uC544\uC57C \uD558\uB294 \uC0AC\uB78C\uB4E4\uC785\uB2C8\uB2E4. \uC5EC\uB7EC \uBA85\uC744 \uB458 \uC218 \uC788\uACE0, \uC77D\uC5C8\uB2E4\uB294 \uD45C\uC2DC\uB9CC \uB0A8\uAE41\uB2C8\uB2E4.",items:[{term:"\uD558\uB294 \uC77C",desc:"\uB0B4\uC6A9\uC744 \uC77D\uACE0 \uD544\uC694\uD558\uBA74 \uB313\uAE00\uB85C \uC758\uACAC\uC744 \uB2F5\uB2C8\uB2E4. **\uD655\uC778** \uBC84\uD2BC\uC73C\uB85C \uC77D\uC74C\uC744 \uB0A8\uAE41\uB2C8\uB2E4."},{term:"\uD655\uC778",desc:"\uD655\uC778 \uB300\uC0C1\uC785\uB2C8\uB2E4. \uCC38\uC870\uC790\uC758 \uD655\uC778\uC740 \uC54C\uB9BC\uC744 \uB9CC\uB4E4\uC9C0 \uC54A\uACE0 \uD655\uC778 \uD604\uD669(n/m)\uC5D0\uB9CC \uBC18\uC601\uB429\uB2C8\uB2E4 \u2014 \uC0AC\uB78C\uC774 \uB9CE\uC544 \uC54C\uB9BC\uC774 \uC2DC\uB044\uB7EC\uC6CC\uC9C0\uAE30 \uB54C\uBB38\uC785\uB2C8\uB2E4."},{term:"\uC218\uC815",desc:"\uC0C1\uD0DC\xB7\uB77C\uBCA8\xB7\uBE44\uACE0\xB7\uD560\uC77C\xB7\uCCA8\uBD80\xB7\uB313\uAE00 \uAC19\uC740 **\uC9C4\uD589 \uD56D\uBAA9**\uC740 \uCC38\uC870\uC790\uB3C4 \uC501\uB2C8\uB2E4. \uC81C\uBAA9\xB7\uB0B4\uC6A9\xB7\uC77C\uC815\xB7\uCC45\uC784\uC790\xB7\uACF5\uAC1C\uBC94\uC704 \uAC19\uC740 **\uC57D\uC18D**\uC740 \uC870\uC9C1 \uC124\uC815\uC5D0 \uB530\uB77C \uC791\uC131\uC790\xB7\uCC45\uC784\uC790\uB9CC \uACE0\uCE60 \uC218 \uC788\uC2B5\uB2C8\uB2E4(\uAE30\uBCF8\uC740 \uCC38\uC870\uC790\uB3C4 \uAC00\uB2A5). \uC644\uB8CC \uCCB4\uD06C\uB294 \uC5B8\uC81C\uB098 \uC791\uC131\uC790\xB7\uCC45\uC784\uC790\uB9CC."},{term:"\uC644\uB8CC \xB7 \uC0AD\uC81C",desc:"\uB458 \uB2E4 \uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uCC38\uC870\uB294 '\uBCF4\uB294 \uC790\uB9AC'\uC785\uB2C8\uB2E4."},{term:"\uB9C8\uAC10 \uC54C\uB9BC",desc:"\uBC1B\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4 \u2014 \uB9C8\uAC10 \uACC4\uC5F4 \uC54C\uB9BC\uC740 \uCC45\uC784\uC790\xB7\uC791\uC131\uC790\uC5D0\uAC8C\uB9CC \uAC11\uB2C8\uB2E4(\uCC38\uC870\uC790\uAE4C\uC9C0 \uBCF4\uB0B4\uBA74 \uC18C\uC74C\uC774 \uB429\uB2C8\uB2E4)."}]},{title:"\uAD8C\uD55C \uD55C\uB208\uC5D0",lead:"\uAC19\uC740 \uC5C5\uBB34\uB97C \uBCF4\uACE0 \uC788\uC5B4\uB3C4 \uB204\uB97C \uC218 \uC788\uB294 \uBC84\uD2BC\uC774 \uB2E4\uB985\uB2C8\uB2E4. \uBC84\uD2BC\uC774 \uC548 \uBCF4\uC774\uBA74 \uAD8C\uD55C\uC774 \uC5C6\uB294 \uAC83\uC785\uB2C8\uB2E4(\uC7A0\uAE34 \uCC44\uB85C \uBCF4\uC774\uC9C0 \uC54A\uACE0 \uC544\uC608 \uC228\uC2B5\uB2C8\uB2E4).",items:[{term:"\uC218\uC815",desc:"\uC9C4\uD589 \uD56D\uBAA9(\uC0C1\uD0DC\xB7\uB77C\uBCA8\xB7\uBE44\uACE0\xB7\uD560\uC77C \uB4F1)\uC740 \uAD00\uC5EC\uC790 \uC804\uC6D0. **\uC57D\uC18D**(\uC81C\uBAA9\xB7\uB0B4\uC6A9\xB7\uC77C\uC815\xB7\uBC30\uC815\xB7\uACF5\uAC1C\uBC94\uC704)\uC740 \uC870\uC9C1 \uC124\uC815\uC5D0 \uB530\uB77C \uC791\uC131\uC790\xB7\uCC45\uC784\uC790\uB85C \uC81C\uD55C\uB420 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uAD00\uC5EC\uC790\uAC00 \uC544\uB2C8\uBA74 \uC5F4\uB78C\uB9CC \uB429\uB2C8\uB2E4."},{term:"\uC644\uB8CC \xB7 \uC644\uB8CC \uD574\uC81C",desc:"\uC791\uC131\uC790 \xB7 \uCC45\uC784\uC790."},{term:"\uAC80\uC218\uC644\uB8CC \xB7 \uB418\uB3CC\uB9AC\uAE30",desc:"\uC791\uC131\uC790\uB9CC. \uB0A8\uC774 \uC644\uB8CC\uD55C \uC5C5\uBB34\uAC00 \uAC80\uC218 \uB300\uAE30\uC77C \uB54C\uB9CC \uB098\uC635\uB2C8\uB2E4."},{term:"\uC0AD\uC81C",desc:"\uC791\uC131\uC790\uB9CC."},{term:"\uD655\uC778",desc:"\uCC45\uC784\uC790 \xB7 \uCC38\uC870\uC790 \u2014 \uC791\uC131\uC790\uB294 \uC81C\uC678."},{term:"\uB313\uAE00",desc:"\uBCFC \uC218 \uC788\uB294 \uC0AC\uB78C \uB204\uAD6C\uB098."}]},{title:"\uACF5\uC9C0\uC0AC\uD56D\uC740 \uADDC\uCE59\uC774 \uB2E4\uB985\uB2C8\uB2E4",lead:"\uACF5\uC9C0\uB294 '\uB9E1\uAE30\uB294 \uC77C'\uC774 \uC544\uB2C8\uB77C '\uC54C\uB9AC\uB294 \uAE00'\uC774\uB77C \uCC45\uC784\uC790\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4. \uB300\uC0C1\uC790\uAC00 \uACE7 \uC77D\uC5B4\uC57C \uD560 \uC0AC\uB78C\uB4E4\uC785\uB2C8\uB2E4.",items:[{term:"\uC791\uC131\uC790",desc:"\uACF5\uC9C0\uB97C \uC62C\uB9B0 \uC0AC\uB78C. \uC218\uC815\xB7\uAC8C\uC2DC\uC885\uB8CC\xB7\uC0AD\uC81C\uB97C \uD63C\uC790 \uB9E1\uC2B5\uB2C8\uB2E4(\uAD00\uB9AC\uC790\uB3C4 \uB0A8\uC758 \uACF5\uC9C0\uB294 \uACE0\uCE58\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4)."},{term:"\uB300\uC0C1\uC790",desc:"\uC804 \uC9C1\uC6D0 \uB610\uB294 \uC9C0\uC815\uD55C \uC0AC\uB78C\uB4E4. **\uD655\uC778** \uBC84\uD2BC\uC73C\uB85C \uC77D\uC74C\uC744 \uB0A8\uAE30\uACE0, \uC791\uC131\uC790\uB294 \uD655\uC778 \uD604\uD669(n/m)\uC73C\uB85C \uB204\uAC00 \uC548 \uC77D\uC5C8\uB294\uC9C0 \uBD05\uB2C8\uB2E4."},{term:"\uD655\uC778 \uC54C\uB9BC",desc:"\uB300\uC0C1\uC790\uAC00 \uD655\uC778\uD574\uB3C4 \uC791\uC131\uC790\uC5D0\uAC8C \uC54C\uB9BC\uC774 \uAC00\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4 \u2014 \uC804 \uC9C1\uC6D0 \uACF5\uC9C0\uB77C\uBA74 \uC54C\uB9BC\uC774 \uC0AC\uB78C \uC218\uB9CC\uD07C \uC3DF\uC544\uC9C0\uAE30 \uB54C\uBB38\uC785\uB2C8\uB2E4."}]},{title:"\uACE0\uAC1D\uC13C\uD130 \uC5C5\uBB34\uB294 \uC791\uC131\uC790\uAC00 \uC678\uBD80\uC785\uB2C8\uB2E4",feature:"support",lead:"\uAC00\uB9F9\uC810\xB7\uD648\uD398\uC774\uC9C0\uC5D0\uC11C \uB4E4\uC5B4\uC628 \uBB38\uC758\uB294 \uC791\uC131\uC790\uAC00 \uC6B0\uB9AC \uC9C1\uC6D0\uC774 \uC544\uB2C8\uB77C, \uAD00\uC5EC\uC790 \uADDC\uCE59\uC744 \uADF8\uB300\uB85C \uC4F8 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.",items:[{term:"\uC791\uC131\uC790",desc:"\uBB38\uC758\uB97C \uB0A8\uAE34 \uACE0\uAC1D(\uC9C1\uC6D0 \uBA85\uBD80\uC5D0 \uC5C6\uB294 \uC678\uBD80 \uACC4\uC815). \uC6B0\uB9AC \uCABD \uAD00\uC5EC\uC790 \uD310\uC815\uC5D0\uC11C\uB294 \uBE60\uC9D1\uB2C8\uB2E4."},{term:"\uC218\uC815",desc:"\uC5F4\uB78C\uD560 \uC218 \uC788\uB294 \uC9C1\uC6D0 \uB204\uAD6C\uB098 \uACE0\uCE69\uB2C8\uB2E4 \u2014 \uAD00\uC5EC\uC790\uAC00 \uC5C6\uC5B4 \uC544\uBB34\uB3C4 \uC190\uB300\uC9C0 \uBABB\uD558\uBA74 \uB2F5\uBCC0\uC744 \uB2EC \uC218 \uC5C6\uAE30 \uB54C\uBB38\uC785\uB2C8\uB2E4."},{term:"\uCC45\uC784\uC790",desc:"**\uAC00\uC838\uAC00\uAE30**\uB85C \uC815\uD574\uC9D1\uB2C8\uB2E4. \uBA3C\uC800 \uC7A1\uC740 \uC0AC\uB78C\uC774 \uB2F5\uBCC0\uC744 \uB9E1\uC2B5\uB2C8\uB2E4."},{term:"\uB2F5\uBCC0",desc:"\uC9C1\uC6D0\uC774 \uB2E8 \uB313\uAE00\uC774 \uACE7 \uB2F5\uBCC0\uC785\uB2C8\uB2E4. \uACE0\uAC1D\uC5D0\uAC8C\uB294 \uB2F5\uBCC0 \uC54C\uB9BC\uB9CC \uAC00\uACE0, \uC5C5\uBB34\uD568\uC758 \uB2E4\uB978 \uC54C\uB9BC\uC740 \uAC00\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."},{term:"\uD655\uC778 \xB7 \uAC80\uC218",desc:"\uC5C6\uC2B5\uB2C8\uB2E4 \u2014 \uACE0\uAC1D\uC774 \uD655\uC778 \uBC84\uD2BC\uC744 \uB204\uB97C \uD654\uBA74\uC774 \uC5C6\uC5B4 \uD655\uC778\xB7\uAC80\uC218 \uC6CC\uD06C\uD50C\uB85C\uB97C \uD0DC\uC6B0\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}]}]};var ig={id:"basics",tabTitle:"\uAE30\uBCF8 \uC0AC\uC6A9",intro:"\uB9E4\uC77C \uC4F0\uB294 \uC870\uC791\uB9CC \uBAA8\uC558\uC2B5\uB2C8\uB2E4. \uAC1C\uB150 \uD0ED\uC758 \uC138 \uAC78\uC74C \uC21C\uC11C \uADF8\uB300\uB85C\uC785\uB2C8\uB2E4.",topics:[{title:"1. \uB4F1\uB85D\uD558\uAE30",lines:["**\uC0C8\uB85C \uB9CC\uB4E4\uAE30** \uBC84\uD2BC(\uB2E8\uCD95\uD0A4 **N**) \u203A \uC81C\uBAA9 \xB7 \uCC45\uC784\uC790 \xB7 \uB9C8\uAC10\uC608\uC815\uC744 \uC801\uACE0 \uC800\uC7A5\uD569\uB2C8\uB2E4. \uB0B4\uC6A9\xB7\uCC38\uC870\uC790\xB7\uC2DC\uC791\uC77C\uC2DC\xB7\uC911\uC694\uB3C4\uB294 \uD544\uC694\uD560 \uB54C\uB9CC \uCC44\uC6C1\uB2C8\uB2E4.","**\uACF5\uAC1C \uBC94\uC704** : \uBE44\uACF5\uAC1C(\uAD00\uC5EC\uC790\uB9CC) / \uBD80\uC11C\uACF5\uAC1C / \uC804\uCCB4\uACF5\uAC1C. \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** \uC5C5\uBB34\uB294 \uB9E4\uC77C\xB7\uB9E4\uC8FC\xB7\uB9E4\uC6D4 \uD68C\uCC28\uB85C \uB9CC\uB4E4\uC5B4\uC9C0\uACE0, **\uC77C\uC815**\uC740 \uC2DC\uAC01\uC774 \uC788\uB294 \uD589\uC0AC\uB77C \uC644\uB8CC \uB300\uC2E0 \uCE98\uB9B0\uB354\uC5D0 \uB193\uC785\uB2C8\uB2E4."]},{title:"2. \uD560\uC77C \uB098\uB204\uAE30",subtitle:"\uD63C\uC790 \uD558\uAE30 \uD070 \uC5C5\uBB34\uB77C\uBA74",lead:"\uC5C5\uBB34 \uD558\uB098\uB97C \uC798\uAC8C \uCABC\uAC1C \uC9C4\uD589\uC744 \uB208\uC5D0 \uBCF4\uC774\uAC8C \uD558\uACE0, \uD544\uC694\uD558\uBA74 \uC870\uAC01\uC744 \uD300\uC6D0\uC5D0\uAC8C \uB098\uB220 \uB9E1\uAE41\uB2C8\uB2E4. \uCABC\uAC24 \uC77C\uC774 \uC544\uB2C8\uBA74 \uAC74\uB108\uB6F0\uC5B4\uB3C4 \uB429\uB2C8\uB2E4.",lines:["\uC0C1\uC138\uC758 **\uD560\uC77C**\uC5D0 \uD56D\uBAA9\uC744 \uC801\uACE0 **Enter** \uB610\uB294 \uC624\uB978\uCABD **[+]** \uB85C \uCD94\uAC00\uD569\uB2C8\uB2E4. \uCD94\uAC00\uC640 \uCCB4\uD06C\uB294 **\uB204\uAD6C\uB098** \uD560 \uC218 \uC788\uACE0(\uD568\uAED8 \uC4F0\uB294 \uCE78), \uD56D\uBAA9 \uC0AD\uC81C\uB9CC \uC218\uC815 \uAD8C\uD55C\uC774 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4.",'\uC9C4\uD589\uC740 \uBAA9\uB85D\xB7\uCE74\uB4DC\uC5D0 **"1/3"** \uCC98\uB7FC \uBCF4\uC5EC\uC11C, \uBB3B\uC9C0 \uC54A\uC544\uB3C4 \uC5B4\uB514\uAE4C\uC9C0 \uB410\uB294\uC9C0 \uB4DC\uB7EC\uB0A9\uB2C8\uB2E4. \uB370\uC2A4\uD06C\uD1B1\uC5D0\uC11C\uB294 \uD578\uB4E4\uB85C \uB04C\uC5B4 \uC21C\uC11C\uB97C \uBC14\uAFC9\uB2C8\uB2E4.',"\uD56D\uBAA9\uC5D0 \uB9C8\uC6B0\uC2A4\uB97C \uC62C\uB824 **\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30**\uB97C \uB204\uB974\uBA74 \uADF8 \uD56D\uBAA9\uC774 **\uBCC4\uB3C4 \uC5C5\uBB34**\uAC00 \uB429\uB2C8\uB2E4 \u2014 \uCC45\uC784\uC790\uC640 \uB9C8\uAC10\uC608\uC815\uC744 \uB530\uB85C \uC815\uD574 \uB098\uB220 \uB9E1\uAE38 \uC218 \uC788\uC2B5\uB2C8\uB2E4.","\uC774\uBBF8 \uC788\uB294 \uC5C5\uBB34\uB97C \uD560\uC77C\uC5D0 **\uBD99\uC77C** \uC218\uB3C4 \uC788\uC2B5\uB2C8\uB2E4(\uC785\uB825\uCE78 \uC67C\uCABD \uB9C1\uD06C \uBC84\uD2BC).","\uC5F0\uACB0\uB41C \uD56D\uBAA9\uC758 \uCCB4\uD06C\uB294 \uACE7 **\uADF8 \uC5C5\uBB34\uC758 \uC644\uB8CC**\uC785\uB2C8\uB2E4. \uADF8\uB798\uC11C \uCCB4\uD06C\uB3C4 \uADF8 \uC5C5\uBB34\uC758 \uC644\uB8CC \uAD8C\uD55C\uC774 \uC788\uB294 \uC0AC\uB78C(\uC791\uC131\uC790\xB7\uCC45\uC784\uC790)\uB9CC \uB204\uB97C \uC218 \uC788\uACE0, \uD300\uC6D0\uC774 \uC790\uAE30 \uC5C5\uBB34\uB97C \uB05D\uB0B4\uBA74 \uC774\uCABD \uD560\uC77C\uB3C4 \uC800\uC808\uB85C \uCCB4\uD06C\uB429\uB2C8\uB2E4.","\uC5F0\uACB0 \uC5C5\uBB34\uB97C \uD734\uC9C0\uD1B5\uC5D0 \uBCF4\uB0B4\uBA74 \uD560\uC77C\uC5D0\uC11C\uB3C4 \uD568\uAED8 \uBE60\uC9D1\uB2C8\uB2E4."]},{title:"3. \uC5F4\uC5B4 \uBCF4\uACE0 \uB300\uD654\uD558\uAE30",lines:["\uD589\uC744 \uB204\uB974\uBA74 \uC624\uB978\uCABD\uC5D0 \uC0C1\uC138\uAC00 \uC5F4\uB9BD\uB2C8\uB2E4(\uBAA8\uBC14\uC77C\uC740 \uC804\uCCB4 \uD654\uBA74). \uC81C\uBAA9\uACFC \uC18D\uC131\uC740 \uADF8 \uC790\uB9AC\uC5D0\uC11C \uB20C\uB7EC \uACE0\uCE69\uB2C8\uB2E4.","\uC5C5\uBB34 \uB300\uD654\uB294 **\uB313\uAE00**\uB85C \uD569\uB2C8\uB2E4. \uD30C\uC77C\uC744 \uBD99\uC774\uACE0, **\uD655\uC778(\u2713)\xB7\uC88B\uC544\uC694** \uBC18\uC751\uC73C\uB85C \uC77D\uC5C8\uC74C\uC744 \uB0A8\uAE41\uB2C8\uB2E4. \uB313\uAE00\uC740 \uC791\uC131\uC790\uC640 \uC9C1\uC804 \uB313\uAE00 \uC791\uC131\uC790\uC5D0\uAC8C \uC54C\uB9BC\uC774 \uAC00\uC11C \uB2F5\uAE00 \uD750\uB984\uC774 \uB04A\uAE30\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.","**\uD65C\uB3D9** \uC544\uC774\uCF58\uC5D0\uC11C \uB4F1\uB85D\xB7\uC218\uC815\xB7\uD655\uC778\xB7\uC644\uB8CC \uC774\uB825\uC744 \uBD05\uB2C8\uB2E4. \uBAA8\uBC14\uC77C \uC0C1\uC138\uB294 **\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:"4. \uD655\uC778\uD558\uAE30",lines:["\uBC1B\uC740 \uC5C5\uBB34\uB294 **\uD655\uC778** \uBC84\uD2BC\uC73C\uB85C \uC77D\uC74C\uC744 \uB0A8\uAE41\uB2C8\uB2E4. \uD655\uC778 \uC804 \uC5C5\uBB34\uB294 \uBAA9\uB85D \uB9E8 \uC704 **\uBBF8\uD655\uC778** \uC601\uC5ED(\uBAA8\uBC14\uC77C\uC740 \uBBF8\uD655\uC778 \uADF8\uB8F9)\uC5D0 \uBAA8\uC5EC \uC788\uC2B5\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."]},{title:"5. \uC9C4\uD589\uD558\uACE0 \uC644\uB8CC\uD558\uAE30",lines:["\uC0C1\uD0DC \uCE69\uC744 \uB204\uB974\uBA74 \uC2DC\uC791\uC804 \u203A \uC9C4\uD589\uC911 \u203A \uBCF4\uB958\uB97C \uACE0\uB985\uB2C8\uB2E4.","\uC644\uB8CC \uCCB4\uD06C(\u25CB)\uB294 **\uC791\uC131\uC790\uC640 \uCC45\uC784\uC790\uB9CC** \uB204\uB97C \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uB9C8\uAC10\uC608\uC815\uC774 \uBE44\uC5B4 \uC788\uC73C\uBA74 \uC644\uB8CC \uC2DC\uAC01\uC73C\uB85C \uCC44\uC6CC\uC9D1\uB2C8\uB2E4."]},{title:"6. \uAC80\uC218\uD558\uAE30",subtitle:"\uAC80\uC218\uC644\uB8CC \xB7 \uB418\uB3CC\uB9AC\uAE30",lines:["\uCC45\uC784\uC790\uAC00 \uC644\uB8CC\uD558\uBA74 \uC791\uC131\uC790\uC758 \uBAA9\uB85D \uB9E8 \uC704\uC5D0 **\uAC80\uC218 \uB300\uAE30**\uB85C \uB0A8\uC2B5\uB2C8\uB2E4(\uC644\uB8CC \uC228\uAE30\uAE30\uC640 \uBB34\uAD00, \uBAA8\uBC14\uC77C\uC740 \uBBF8\uD655\uC778 \uADF8\uB8F9).","\uACB0\uACFC\uAC00 \uAD1C\uCC2E\uC73C\uBA74 **\uAC80\uC218\uC644\uB8CC** \uBC84\uD2BC\uC73C\uB85C \uB0B4\uB9BD\uB2C8\uB2E4. \uBBF8\uD761\uD558\uBA74 \uC644\uB8CC \uCCB4\uD06C\uB97C \uD574\uC81C(\uC0C1\uC138\uC758 **\uB418\uB3CC\uB9AC\uAE30**)\uD558\uBA70 \uC0AC\uC720\uB97C \uC801\uC2B5\uB2C8\uB2E4 \u2014 \uC0AC\uC720\uB294 \uB313\uAE00\uB85C \uB0A8\uACE0, \uC0C1\uD0DC\uB294 \uC9C4\uD589\uC911\uC73C\uB85C \uB3CC\uC544\uAC00\uACE0, \uC644\uB8CC\uD55C \uC0AC\uB78C\uC5D0\uAC8C \uC54C\uB9BC\uC774 \uAC11\uB2C8\uB2E4.","**\uB418\uB3CC\uB9AC\uAE30\uB294 \uAC80\uC218 \uC804\uC5D0\uB9CC** \uB098\uC635\uB2C8\uB2E4 \u2014 \uAC80\uC218\uC644\uB8CC\uB97C \uB204\uB978 \uB4A4\uC5D0\uB294 \uC0AC\uC720 \uC5C6\uC774 \uB0B4\uB9AC\uB294 **\uC644\uB8CC \uD574\uC81C**\uB85C \uBC14\uB01D\uB2C8\uB2E4.","\uBCF8\uC778\uC774 \uC644\uB8CC\uD55C \uC5C5\uBB34\uB294 \uAC80\uC218 \uB300\uC0C1\uC774 \uC544\uB2C8\uB77C \uCC98\uC74C\uBD80\uD130 **\uC644\uB8CC \uD574\uC81C**\uC785\uB2C8\uB2E4."]},{title:"7. \uBCF4\uAD00\uD558\uAE30 \xB7 \uC0AD\uC81C\uD558\uAE30",lines:["\uC644\uB8CC\uD55C \uC5C5\uBB34\uB294 \uC124\uC815 \uAE30\uAC04(\uAE30\uBCF8 7\uC77C) \uB4A4 \uC0C8\uBCBD\uC5D0 \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\uB0B4\uACE0, \uBCF4\uAD00\uD568\uC758 **\uBCF4\uAD00 \uD574\uC81C**\uB85C \uB418\uB3CC\uB9BD\uB2C8\uB2E4.","\uC0AD\uC81C\uB294 \uC791\uC131\uC790\uB9CC \uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4(\uC0C1\uC138\uC758 \uD734\uC9C0\uD1B5 \uC544\uC774\uCF58). \uC9C0\uC6B4 \uC5C5\uBB34\uB294 **\uD734\uC9C0\uD1B5**\uC5D0\uC11C \uB418\uC0B4\uB9B4 \uC218 \uC788\uACE0, \uC124\uC815 \uAE30\uAC04(\uAE30\uBCF8 90\uC77C) \uB4A4 \uC601\uAD6C \uC0AD\uC81C\uB429\uB2C8\uB2E4.",'\uBC18\uBCF5 \uC5C5\uBB34\uB294 \uC644\uB8CC\xB7\uC0AD\uC81C\uD560 \uB54C "\uC774 \uD68C\uCC28\uB9CC / \uC774\uD6C4 \uC804\uCCB4"\uB97C \uACE0\uB985\uB2C8\uB2E4.']}]};var sg={id:"notify",tabTitle:"\uC54C\uB9BC",intro:"\uC54C\uB9BC\uC740 \uBCA8(\uC5C5\uBB34\uD568 \uC548)\uACFC \uC571 \uD478\uC2DC \uB450 \uAC08\uB798\uB85C \uAC11\uB2C8\uB2E4. \uC544\uB798 \uD45C\uC758 '\uBC1B\uB294 \uC0AC\uB78C'\uC5D0 \uC5C6\uC73C\uBA74 \uADF8 \uC77C\uC774 \uC77C\uC5B4\uB098\uB3C4 \uC54C\uB9BC\uC774 \uC624\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4 \u2014 \uC54C\uB9BC\uC744 \uC904\uC774\uB294 \uCABD\uC73C\uB85C \uC815\uD55C \uADDC\uCE59\uC774 \uB9CE\uC544, \uAD00\uC5EC\uC790\uB77C\uACE0 \uC804\uBD80 \uBC1B\uB294 \uAC83\uC740 \uC544\uB2D9\uB2C8\uB2E4.",topics:[{title:"\uC5C5\uBB34\uB97C \uB9E1\uACE0 \uBC1B\uC744 \uB54C",items:[{term:"\uCC45\uC784\uC790\uB85C \uC9C0\uC815",desc:"\uC0C8 **\uCC45\uC784\uC790**\uC5D0\uAC8C. \uCC45\uC784\uC790\uB97C \uBC14\uAFB8\uBA74 \uC0C8 \uCC45\uC784\uC790\uB9CC \uBC1B\uC2B5\uB2C8\uB2E4."},{term:"\uCC38\uC870\uC790\uB85C \uCD94\uAC00",desc:"\uC0C8\uB85C \uCD94\uAC00\uB41C **\uCC38\uC870\uC790**\uC5D0\uAC8C\uB9CC. \uC6D0\uB798 \uC788\uB358 \uCC38\uC870\uC790\uB294 \uBC1B\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."},{term:"\uC2DC\uC791\uC77C\uC2DC \uB3C4\uB2EC",desc:"**\uCC45\uC784\uC790**\uC5D0\uAC8C. \uC2DC\uC791\uC77C\uC2DC\uAC00 \uB418\uBA74 \uC790\uB3D9\uC73C\uB85C \uAC11\uB2C8\uB2E4."},{term:"\uC77C\uC815 \uCD08\uB300",desc:"\uC77C\uC815\uC758 **\uCC38\uC11D\uC790**\uC5D0\uAC8C."}]},{title:"\uD655\uC778 \xB7 \uC644\uB8CC \xB7 \uAC80\uC218",items:[{term:"\uCC45\uC784\uC790\uAC00 \uD655\uC778",desc:"**\uC791\uC131\uC790**\uC5D0\uAC8C. \uBC1B\uC740 \uC0AC\uB78C\uC774 \uC77D\uC5C8\uB2E4\uB294 \uC2E0\uD638\uC785\uB2C8\uB2E4."},{term:"\uCC38\uC870\uC790\uAC00 \uD655\uC778",desc:"\uC544\uBB34\uC5D0\uAC8C\uB3C4 \uAC00\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4 \u2014 \uCC38\uC870\uC790\uAC00 \uC5EC\uB7EC \uBA85\uC774\uB77C \uC0AC\uB78C \uC218\uB9CC\uD07C \uC54C\uB9BC\uC774 \uC3DF\uC544\uC9C0\uAE30 \uB54C\uBB38\uC785\uB2C8\uB2E4. \uD655\uC778 \uD604\uD669(n/m)\uC73C\uB85C\uB9CC \uBD05\uB2C8\uB2E4."},{term:"\uD655\uC778 \uC694\uCCAD(\uB9AC\uB9C8\uC778\uB4DC)",desc:"\uC544\uC9C1 **\uD655\uC778\uD558\uC9C0 \uC54A\uC740 \uB300\uC0C1\uC790**\uC5D0\uAC8C\uB9CC. \uC774\uBBF8 \uD655\uC778\uD55C \uC0AC\uB78C\uC740 \uBC1B\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."},{term:"\uC644\uB8CC \uCC98\uB9AC",desc:"**\uC791\uC131\uC790 + \uCC38\uC870\uC790**\uC5D0\uAC8C. \uC644\uB8CC\uB97C \uB204\uB978 \uC0AC\uB78C \uBCF8\uC778\uC740 \uC81C\uC678\uB429\uB2C8\uB2E4."},{term:"\uAC80\uC218\uC644\uB8CC",desc:"\uC544\uBB34\uC5D0\uAC8C\uB3C4 \uAC00\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4 \u2014 \uC2B9\uC778\uC774 \uC544\uB2C8\uB77C \uC791\uC131\uC790 \uD654\uBA74\uC758 \uD45C\uC2DC\uB97C \uB0B4\uB9AC\uB294 \uAC83\uC77C \uBFD0\uC785\uB2C8\uB2E4."},{term:"\uB418\uB3CC\uB9AC\uAE30",desc:"**\uC644\uB8CC\uB97C \uCC98\uB9AC\uD55C \uC0AC\uB78C**(\uBCF4\uD1B5 \uCC45\uC784\uC790)\uC5D0\uAC8C. \uC0AC\uC720\uAC00 \uD568\uAED8 \uC804\uB2EC\uB418\uACE0 \uB313\uAE00\uB85C\uB3C4 \uB0A8\uC2B5\uB2C8\uB2E4."}]},{title:"\uB9C8\uAC10 \uAD00\uB828",lead:"\uB9C8\uAC10 \uACC4\uC5F4\uC740 \uC804\uBD80 \uCC45\uC784\uC790\uC640 \uC791\uC131\uC790\uC5D0\uAC8C\uB9CC \uAC11\uB2C8\uB2E4. \uCC38\uC870\uC790\uB294 \uB9C8\uAC10 \uC54C\uB9BC\uC744 \uBC1B\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4 \u2014 \uCC38\uC870\uAE4C\uC9C0 \uBCF4\uB0B4\uBA74 \uC54C\uB9BC\uC774 \uC18C\uC74C\uC774 \uB429\uB2C8\uB2E4.",items:[{term:"\uB9C8\uAC10 \uC0AC\uC804\uC54C\uB9BC",desc:"**\uCC45\uC784\uC790 + \uC791\uC131\uC790**\uC5D0\uAC8C. \uC5C5\uBB34\uB9C8\uB2E4 \uACE0\uB978 \uC2DC\uC810(\uC608: 1\uC77C \uC804)\uC5D0 \uAC11\uB2C8\uB2E4."},{term:"\uB9C8\uAC10 \uB2F9\uC77C",desc:"**\uCC45\uC784\uC790 + \uC791\uC131\uC790**\uC5D0\uAC8C."},{term:"\uB9C8\uAC10 \uACBD\uACFC(\uC9C0\uC5F0)",desc:"**\uCC45\uC784\uC790 + \uC791\uC131\uC790**\uC5D0\uAC8C. \uB9C8\uAC10\uC774 \uC9C0\uB0AC\uB294\uB370 \uC644\uB8CC\uB418\uC9C0 \uC54A\uC740 \uC5C5\uBB34\uC785\uB2C8\uB2E4."},{term:"\uCC38\uC870\uC790",desc:"\uC704 \uC14B \uBAA8\uB450 \uBC1B\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}]},{title:"\uB313\uAE00 \xB7 \uBC18\uC751",lead:"\uB313\uAE00 \uC54C\uB9BC\uC740 \uAD00\uC5EC\uC790 \uC804\uC6D0\uC5D0\uAC8C \uBCF4\uB0B4\uB2E4\uAC00 \uC54C\uB9BC \uD3ED\uC8FC\uB85C \uC904\uC600\uC2B5\uB2C8\uB2E4. \uC9C0\uAE08\uC740 '\uB300\uD654\uC5D0 \uC9C1\uC811 \uC5BD\uD78C \uC0AC\uB78C'\uB9CC \uBC1B\uC2B5\uB2C8\uB2E4.",items:[{term:"\uC77C\uBC18 \uB313\uAE00",desc:"\uC5C5\uBB34 **\uC791\uC131\uC790 + \uC9C1\uC804 \uB313\uAE00 \uC791\uC131\uC790**\uC5D0\uAC8C."},{term:"\uC791\uC131\uC790\uAC00 \uC790\uAE30 \uC5C5\uBB34\uC5D0 \uB313\uAE00",desc:"**\uCC45\uC784\uC790 + \uC9C1\uC804 \uB313\uAE00 \uC791\uC131\uC790**\uC5D0\uAC8C."},{term:"\uCC45\uC784\uC790 \uC5C6\uB294 \uC5C5\uBB34\uC758 \uB313\uAE00",desc:"\uC704\uC5D0 \uB354\uD574 **\uCC38\uC870\uC790 \uC804\uC6D0**\uC5D0\uAC8C. \uB204\uAC00 \uB9E1\uC744\uC9C0 \uC815\uD558\uB294 \uB300\uD654\uB77C \uCC38\uC870\uC790\uB4E4\uC774 \uC54C\uC544\uC57C \uD558\uAE30 \uB54C\uBB38\uC785\uB2C8\uB2E4. \uCC45\uC784\uC790\uAC00 \uC815\uD574\uC9C0\uBA74 \uB2E4\uC2DC \uBE60\uC9D1\uB2C8\uB2E4."},{term:"\uB313\uAE00 \uC88B\uC544\uC694 \xB7 \uD655\uC778",desc:"\uADF8 **\uB313\uAE00\uC744 \uC4F4 \uC0AC\uB78C**\uC5D0\uAC8C\uB9CC."},{term:"\uACF5\uC9C0 \uB313\uAE00",desc:"**\uC9C1\uC804 \uB313\uAE00 \uC791\uC131\uC790**\uC5D0\uAC8C\uB9CC \u2014 \uB300\uC0C1\uC790\uAC00 \uC804 \uC9C1\uC6D0\uC774\uB77C \uD655\uC7A5 \uADDC\uCE59\uC744 \uC801\uC6A9\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}]},{title:"\uB0B4\uC6A9\uC774 \uBC14\uB014 \uB54C",lead:"\uC218\uC815 \uC54C\uB9BC\uC740 \uACE7\uBC14\uB85C \uBCF4\uB0B4\uC9C0 \uC54A\uACE0, \uD3B8\uC9D1\uC774 \uB05D\uB098 \uC870\uC6A9\uD574\uC9C4 \uB4A4 \uD55C \uAC74\uC73C\uB85C \uBAA8\uC544 \uBCF4\uB0C5\uB2C8\uB2E4 \u2014 \uACE0\uCE58\uB294 \uB3C4\uC911\uC5D0 \uC54C\uB9BC\uC774 \uC5EC\uB7EC \uBC88 \uAC00\uC9C0 \uC54A\uAC8C \uD558\uB824\uB294 \uAC83\uC785\uB2C8\uB2E4.",items:[{term:"\uC77C\uBC18 \uC5C5\uBB34 \uC218\uC815",desc:"**\uCC45\uC784\uC790 + \uC791\uC131\uC790**\uC5D0\uAC8C. \uB204\uAC00 \uACE0\uCCE4\uB4E0 \uB098\uBA38\uC9C0 \uD55C\uCABD\uC774 \uBC1B\uC2B5\uB2C8\uB2E4(\uACE0\uCE5C \uC0AC\uB78C \uBCF8\uC778\uC740 \uC81C\uC678). \uCC38\uC870\uC790\uB294 \uC81C\uC678\uB429\uB2C8\uB2E4."},{term:"\uACF5\uC9C0 \uC218\uC815",desc:"**\uC791\uC131\uC790 + \uB300\uC0C1\uC790**\uC5D0\uAC8C."},{term:"\uD569\uC0B0 \uBC1C\uC1A1",desc:"\uC5EC\uB7EC \uD544\uB4DC\uB97C \uC5F0\uB2EC\uC544 \uACE0\uCCD0\uB3C4 \uD55C \uAC74\uC73C\uB85C \uBB36\uC5EC \uAC11\uB2C8\uB2E4. \uBB34\uC5C7\uC774 \uC5B4\uB5BB\uAC8C \uBC14\uB00C\uC5C8\uB294\uC9C0 \uC694\uC57D\uC774 \uB2F4\uAE41\uB2C8\uB2E4."},{term:"\uC54C\uB9BC\uC774 \uC548 \uAC00\uB294 \uBCC0\uACBD",desc:"\uC644\uB8CC \xB7 \uBCF4\uAD00 \xB7 \uC815\uB82C \uC21C\uC11C \xB7 \uCC45\uC784\uC790/\uCC38\uC870\uC790 \uBCC0\uACBD \u2014 \uAC01\uAC01 \uC804\uC6A9 \uC54C\uB9BC\uC774 \uB530\uB85C \uC788\uC5B4 \uC218\uC815 \uC54C\uB9BC\uC73C\uB85C\uB294 \uC138\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."},{term:"\uD560\uC77C(\uCCB4\uD06C\uB9AC\uC2A4\uD2B8) \uBCC0\uACBD",desc:"\uC218\uC815 \uC54C\uB9BC\uACFC \uAC19\uC740 **\uCC45\uC784\uC790 + \uC791\uC131\uC790**\uC5D0\uAC8C. \uBB34\uC5C7\uC744 \uCD94\uAC00\xB7\uC0AD\uC81C\xB7\uC218\uC815\uD588\uB294\uC9C0 \uAD6C\uCCB4\uC801\uC73C\uB85C \uB2F4\uAE41\uB2C8\uB2E4. \uCCB4\uD06C\uB9CC \uCF1C\uACE0 \uB044\uAC70\uB098 \uC21C\uC11C\uB9CC \uBC14\uAFB8\uBA74 \uC54C\uB9BC\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}]},{title:"\uACF5\uC9C0\uC0AC\uD56D",items:[{term:"\uACF5\uC9C0 \uB4F1\uB85D",desc:"**\uB300\uC0C1\uC790 \uC804\uC6D0**\uC5D0\uAC8C(\uC804 \uC9C1\uC6D0 \uB610\uB294 \uC9C0\uC815\uD55C \uC0AC\uB78C\uB4E4)."},{term:"\uB300\uC0C1\uC790 \uCD94\uAC00",desc:"\uC0C8\uB85C \uCD94\uAC00\uB41C **\uB300\uC0C1\uC790**\uC5D0\uAC8C\uB9CC."},{term:"\uB300\uC0C1\uC790\uAC00 \uD655\uC778",desc:"\uC544\uBB34\uC5D0\uAC8C\uB3C4 \uAC00\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uC791\uC131\uC790\uB294 \uD655\uC778 \uD604\uD669(n/m)\uC73C\uB85C \uBD05\uB2C8\uB2E4."}]},{title:"\uC54C\uC544 \uB450\uBA74 \uC88B\uC740 \uAC83",items:[{term:"\uB0B4 \uD589\uB3D9\uC740 \uC81C\uC678",desc:"\uB0B4\uAC00 \uB204\uB978 \uC77C\uB85C\uB294 \uB098\uC5D0\uAC8C \uC54C\uB9BC\uC774 \uC624\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4 \u2014 \uB0B4\uAC00 \uC644\uB8CC\uD588\uC73C\uBA74 \uB098\uB294 \uC644\uB8CC \uC54C\uB9BC\uC744 \uBC1B\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."},{term:"\uC2DC\uC791 \uC804\uC5D0\uB294 \uBCA8\uB9CC",desc:"\uC2DC\uC791\uC77C\uC2DC\uAC00 \uC544\uC9C1 \uC548 \uB41C \uC5C5\uBB34\uC758 \uCC45\uC784\uC790 \uB300\uC0C1 \uC54C\uB9BC\uC740 \uBCA8\uC5D0\uB9CC \uC313\uC774\uACE0 \uC571 \uD478\uC2DC\uB294 \uAC00\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uC2DC\uC791\uC77C\uC2DC\uBD80\uD130 \uD478\uC2DC\uAC00 \uC624\uAE30 \uC2DC\uC791\uD569\uB2C8\uB2E4(\uC77C\uC815\xB7\uACF5\uC9C0\uB294 \uC608\uC678 \uC5C6\uC774 \uBC14\uB85C)."},{term:"\uC885\uB958\uBCC4\uB85C \uB044\uAE30",desc:"**\uB0B4 \uC815\uBCF4 \u203A \uC54C\uB9BC \uC124\uC815**\uC5D0\uC11C \uC885\uB958\uBCC4\uB85C \uC218\uC2E0\uC744 \uB055\uB2C8\uB2E4. \uB048 \uC885\uB958\uB294 \uBCA8\xB7\uD478\uC2DC \uBAA8\uB450 \uC624\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4 \u2014 \uB2E4\uB9CC \uD655\uC778 \uC694\uCCAD\uC740 \uB04C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},{term:"\uC54C\uB9BC\uD1A1\uC740 \uC5C6\uC74C",desc:"\uC5C5\uBB34\uD568 \uC54C\uB9BC\uC740 \uBCA8\uACFC \uC571 \uD478\uC2DC\uBFD0\uC785\uB2C8\uB2E4 \u2014 \uBB38\uC790\xB7\uC54C\uB9BC\uD1A1\uC73C\uB85C\uB294 \uAC00\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}]}]};var ag={id:"more",tabTitle:"\uB354 \uC54C\uC544\uBCF4\uAE30",intro:"\uC775\uC219\uD574\uC9C4 \uB4A4\uC5D0 \uC4F0\uBA74 \uC88B\uC740 \uAE30\uB2A5\uB4E4\uC785\uB2C8\uB2E4. \uC5C5\uBB34\uD568 \uC124\uC815\uC5D0\uC11C \uB048 \uAE30\uB2A5\uC740 \uC5EC\uAE30\uC5D0\uB3C4 \uBCF4\uC774\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.",topics:[{title:"\uBCF4\uAE30 \uBC14\uAFB8\uAE30",lead:"\uAC19\uC740 \uC5C5\uBB34\uB97C \uBAA9\uB85D \xB7 \uD504\uB85C\uC81D\uD2B8 \xB7 \uC0C1\uD0DC \xB7 \uC8FC\uAC04 \xB7 \uC6D4\uAC04\uC73C\uB85C \uB2E4\uB974\uAC8C \uBD05\uB2C8\uB2E4. \uD5E4\uB354 \uC624\uB978\uCABD \uBC84\uD2BC\uC73C\uB85C \uBC14\uAFB8\uACE0 \uD0ED\uB9C8\uB2E4 \uB530\uB85C \uAE30\uC5B5\uB429\uB2C8\uB2E4(\uB2E8\uCD95\uD0A4 **G** \uB2E4\uC74C \uAE00\uC790\uD0A4).",lines:["**\uBAA9\uB85D** : \uC5F4 \uC81C\uBAA9\uC744 \uB204\uB974\uBA74 \uC815\uB82C(\uC81C\uBAA9\xB7\uB0A0\uC9DC) \uB610\uB294 \uD544\uD130(\uC0C1\uD0DC\xB7\uD655\uC778\xB7\uCC45\uC784\uC790\xB7\uD504\uB85C\uC81D\uD2B8\xB7\uC911\uC694\uB3C4)\uAC00 \uC5F4\uB9BD\uB2C8\uB2E4. **\uADF8\uB8F9** \uBA54\uB274\uB85C \uBB36\uB294 \uAE30\uC900\uC744 \uBC14\uAFB8\uACE0, \uADF8\uB8F9 \uBA38\uB9AC\uC904 **+** \uB85C \uADF8 \uADF8\uB8F9\uC5D0 \uBC14\uB85C \uB4F1\uB85D\uD569\uB2C8\uB2E4.","**\uD504\uB85C\uC81D\uD2B8 \xB7 \uC0C1\uD0DC \xB7 \uBAA9\uD45C** \uBCF4\uAE30\uB294 \uCE74\uB4DC\uB97C \uCEEC\uB7FC\uC5D0 \uC138\uC6C1\uB2C8\uB2E4 \u2014 \uC81C\uBAA9 \uC55E **\u22EE\u22EE \uD578\uB4E4**\uB85C \uB04C\uC5B4 \uB2E4\uB978 \uCEEC\uB7FC\uC73C\uB85C \uC62E\uAE30\uACE0, \uCEEC\uB7FC **\u22EE** \uBA54\uB274\uC5D0 \uB4F1\uB85D\xB7\uC218\uC815\xB7\uBCF4\uAD00\xB7\uC0AD\uC81C\uAC00 \uC788\uC2B5\uB2C8\uB2E4.","**\uC8FC\uAC04\xB7\uC6D4\uAC04** : \uB9C8\uAC10\uC608\uC815(\uC77C\uC815\uC740 \uC77C\uC2DC) \uAE30\uC900\uC73C\uB85C \uB193\uC774\uACE0, \uCE74\uB4DC\uB97C \uB2E4\uB978 \uB0A0\uB85C \uB04C\uBA74 \uB0A0\uC9DC\uAC00 \uBC14\uB01D\uB2C8\uB2E4. \uBE48 \uCE78\uC5D0 \uC62C\uB9AC\uBA74 \uADF8 \uB0A0\uC9DC\uB85C \uBC14\uB85C \uB4F1\uB85D\uD569\uB2C8\uB2E4. \uBC14\uAE65 \uCE98\uB9B0\uB354\uC640 \uC8FC\uACE0\uBC1B\uB294 \uBC29\uBC95\uC740 **\uC678\uBD80 \uCE98\uB9B0\uB354 \uC5F0\uB3D9** \uD0ED\uC5D0 \uC788\uC2B5\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 \uBD05\uB2C8\uB2E4. \uC5C5\uBB34 \uC544\uB798 \uD560\uC77C \uC904\uC774 \uD3BC\uCCD0\uC9C0\uACE0, \uC67C\uCABD \uC5C5\uBB34\uBA85 \uC904\uC758 \uD578\uB4E4\uB85C \uC21C\uC11C\uB97C \uBC14\uAFC9\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\uC744, \uBAA9\uD45C\uB97C \uC4F0\uBA74 \uBCA8\uB85C\uC2DC\uD2F0\xB7\uBC88\uB2E4\uC6B4\uC744 \uBD05\uB2C8\uB2E4. \uC778\uC6D0 \uC6A9\uB7C9\uC740 \uCC28\uD2B8 \uC548 \uC124\uC815 \uC544\uC774\uCF58\uC5D0\uC11C \uC815\uD569\uB2C8\uB2E4."]},{title:"\uAC80\uC0C9\uACFC \uD544\uD130",lines:["\uAC80\uC0C9\uCE78(\uB2E8\uCD95\uD0A4 **/**)\uC740 \uC81C\uBAA9\xB7\uBE44\uACE0\uB97C \uCC3E\uC2B5\uB2C8\uB2E4. \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 \xB7 \uCC45\uC784\uC790 \xB7 \uD504\uB85C\uC81D\uD2B8 \xB7 \uC911\uC694\uB3C4** \uBC84\uD2BC\uC740 \uCCB4\uD06C \uBA54\uB274\uAC00 \uC5F4\uB9AC\uACE0 \uAC78\uB9B0 \uAC1C\uC218\uAC00 \uBC84\uD2BC\uC5D0 \uD45C\uC2DC\uB429\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 \uAC70\uB974\uACE0, \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."]},{title:"\uD5E4\uB354 \uC2A4\uC704\uCE58",lines:["**\uC644\uB8CC \uC228\uAE30\uAE30** : \uB05D\uB09C \uC5C5\uBB34\uB97C \uBAA8\uB4E0 \uBCF4\uAE30(\uD560\uC77C \uD3EC\uD568)\uC5D0\uC11C \uAC10\uCDA5\uB2C8\uB2E4.","**\uBAA8\uB4E0 \uC9C1\uC6D0** : (\uD5C8\uC6A9 \uACC4\uC815) \uAD00\uC5EC \uC5EC\uBD80\uC640 \uC0C1\uAD00\uC5C6\uC774 \uC804 \uC9C1\uC6D0\uC758 \uC5C5\uBB34\uB97C \uBD05\uB2C8\uB2E4. **\uC678\uBD80 \uCE98\uB9B0\uB354 \uC77C\uC815** : \uAC00\uC838\uC628 \uC77C\uC815\uC744 \uCE98\uB9B0\uB354\uC5D0 \uD568\uAED8 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4(**\uC678\uBD80 \uCE98\uB9B0\uB354 \uC5F0\uB3D9** \uD0ED \uCC38\uACE0).","\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:"\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\xB7\uBAA9\uD45C\uC5D0 \uB123\uAE30\xB7\uBCF4\uAD00\xB7\uC0AD\uC81C\uB97C \uBC14\uB85C \uC2E4\uD589\uD569\uB2C8\uB2E4."]},{title:"\uD504\uB85C\uC81D\uD2B8",feature:"project",lines:["\uC5C5\uBB34\uB97C \uBB36\uB294 \uB2E8\uC704\uC785\uB2C8\uB2E4. **\uD504\uB85C\uC81D\uD2B8** \uBCF4\uAE30 \uB9E8 \uB05D \uC810\uC120 \uCE78\uC774\uB098 \uCEEC\uB7FC \u22EE \u203A \uC218\uC815\uC5D0\uC11C \uC774\uB984\xB7\uC544\uC774\uCF58\uC744 \uC815\uD558\uACE0, \uC5C5\uBB34\uB294 \uC0C1\uC138 \uC18D\uC131\uC774\uB098 \uC6B0\uD074\uB9AD \u203A \uD504\uB85C\uC81D\uD2B8 \uC774\uB3D9\uC73C\uB85C \uC62E\uAE41\uB2C8\uB2E4.","\uBCF4\uAD00\uC740 \uC18C\uC18D \uC5C5\uBB34\uAC00 \uBAA8\uB450 \uC644\uB8CC\uB41C \uB4A4\uC5D0\uB9CC \uB429\uB2C8\uB2E4. \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."]},{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\uAE30\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 \xB7 \uBCF8\uBB38 \uC591\uC2DD",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.","**\uBCF8\uBB38 \uC591\uC2DD**(\uB0B4\uC6A9 \uC81C\uBAA9\uC758 \u22EE)\uC740 \uC790\uC8FC \uC4F0\uB294 \uBCF8\uBB38\uC744 \uC800\uC7A5\uD574 \uB450\uACE0 \uBD88\uB7EC\uC635\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 \u203A \uCC98\uB9AC \u203A \uC885\uB8CC\uB85C \uAD00\uB9AC\uD569\uB2C8\uB2E4.",'\uAC1C\uBC1C\uC0AC \uC804\uC6A9\uC774\uBA70, \uACE0\uAC1D\uC774 \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:["\uACE0\uAC1D\uC774 \uB0A8\uAE34 \uBB38\uC758\xB7\uAC74\uC758\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\uC774 \uACE7 \uB2F5\uBCC0\uC785\uB2C8\uB2E4(\uC791\uC131\uC790\uC5D0\uAC8C\uB294 \uB2F5\uBCC0 \uC54C\uB9BC\uB9CC \uAC11\uB2C8\uB2E4). \uC644\uB8CC 7\uC77C \uB4A4 \uBCF4\uAD00\uD568\uC758 "\uACE0\uAC1D\uC13C\uD130" \uAD6C\uBD84\uC73C\uB85C \uC62E\uACA8\uC9D1\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 lg={id:"calendar",tabTitle:"\uC678\uBD80 \uCE98\uB9B0\uB354 \uC5F0\uB3D9",intro:"\uC5C5\uBB34\uD568\uC744 \uAD6C\uAE00 \uCE98\uB9B0\uB354\uC640 \uC787\uC2B5\uB2C8\uB2E4. \uC8FC\uAC04\xB7\uC6D4\uAC04 \uBCF4\uAE30 \uB610\uB294 \uD5E4\uB354 \u22EE \u203A **\uCE98\uB9B0\uB354 \uC5F0\uB3D9**\uC5D0\uC11C \uAD6C\uAE00 \uACC4\uC815\uC744 \uC5F0\uACB0\uD558\uBA74 \uC5C5\uBB34 \uBCC0\uACBD\uC774 \uAD6C\uAE00 \uCE98\uB9B0\uB354\uC5D0 **\uBC14\uB85C** \uBC18\uC601\uB429\uB2C8\uB2E4.",topics:[{title:"\uB450 \uBC29\uD5A5",lead:"\uC5F0\uB3D9\uC740 \uBC29\uD5A5\uC774 \uB458\uC774\uACE0 \uB530\uB85C \uCF1C\uACE0 \uB055\uB2C8\uB2E4.",items:[{term:"\uB0B4\uBCF4\uB0B4\uAE30 (\uC5C5\uBB34\uD568 \u2192 \uAD6C\uAE00)",desc:"\uB0B4\uAC00 \uAD00\uC5EC\uD55C \uC5C5\uBB34(\uB9C8\uAC10\uC608\uC815 \uB610\uB294 \uC2DC\uC791\uC77C\uC2DC\uAC00 \uC788\uB294 \uAC83)\uB97C \uAD6C\uAE00 \uCE98\uB9B0\uB354\uC5D0 \uC0C8\uB85C \uB9CC\uB4E0 **\uC804\uC6A9 \uCE98\uB9B0\uB354**(\uC774\uB984\uC740 \uC5F0\uB3D9 \uD654\uBA74\uC5D0 \uD45C\uC2DC \u2014 \uC608: \uCF54\uB4DC\uB9C8\uCF13)\uC5D0 \uB123\uC2B5\uB2C8\uB2E4. \uB4F1\uB85D\xB7\uC218\uC815\xB7\uC644\uB8CC\xB7\uC0AD\uC81C\uAC00 \uC989\uC2DC \uBC18\uC601\uB418\uACE0, \uC644\uB8CC\uD55C \uC5C5\uBB34\uB294 \uC81C\uBAA9 \uC55E\uC5D0 \u2713 \uAC00 \uBD99\uC2B5\uB2C8\uB2E4."},{term:"\uAC00\uC838\uC624\uAE30 (\uAD6C\uAE00 \u2192 \uC5C5\uBB34\uD568)",desc:"\uAD6C\uAE00 **\uAE30\uBCF8 \uCE98\uB9B0\uB354**\uC758 \uC77C\uC815\uC744 \uC5C5\uBB34\uD568 \uC8FC\uAC04\xB7\uC6D4\uAC04 \uBCF4\uAE30\uC5D0 \uACB9\uCCD0 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4. \uC77D\uAE30 \uC804\uC6A9\uC774\uB77C \uC5C5\uBB34\uB85C \uBC14\uB00C\uC9C0\uB3C4, \uC6D0\uBCF8\uC774 \uACE0\uCCD0\uC9C0\uC9C0\uB3C4 \uC54A\uC2B5\uB2C8\uB2E4."}]},{title:"\uC5F0\uACB0\uD558\uAE30",lines:["**\uCE98\uB9B0\uB354 \uC5F0\uB3D9** \u203A **\uAD6C\uAE00 \uACC4\uC815 \uC5F0\uACB0** \uBC84\uD2BC \u2192 \uAD6C\uAE00 \uB3D9\uC758 \uD654\uBA74\uC5D0\uC11C \uD5C8\uC6A9 \u2192 \uC5C5\uBB34\uD568\uC73C\uB85C \uB3CC\uC544\uC635\uB2C8\uB2E4(\uC5F0\uACB0 \uC644\uB8CC \uC54C\uB9BC).","\uC5F0\uACB0 \uC9C1\uD6C4 \uAD6C\uAE00 \uCE98\uB9B0\uB354\uC5D0 **\uC804\uC6A9 \uCE98\uB9B0\uB354**\uAC00 \uB9CC\uB4E4\uC5B4\uC9C0\uACE0 \uB0B4 \uC5C5\uBB34\uAC00 \uCC44\uC6CC\uC9D1\uB2C8\uB2E4(\uAC74\uC218\uAC00 \uB9CE\uC73C\uBA74 \uC7A0\uC2DC \uAC78\uB9BD\uB2C8\uB2E4).","\uAC00\uC838\uC624\uAE30\uB97C \uCF1C\uBA74 \uD5E4\uB354\uC758 **\uC678\uBD80 \uCE98\uB9B0\uB354 \uC77C\uC815** \uC2A4\uC704\uCE58\uB85C \uAD6C\uAE00 \uC77C\uC815 \uD45C\uC2DC\uB97C \uD55C \uBC88\uC5D0 \uCF1C\uACE0 \uB055\uB2C8\uB2E4(\uD654\uBA74\uC774 \uC881\uC73C\uBA74 \u22EE \uBA54\uB274 \uC548).",'\uAD6C\uAE00\uC774 "\uD655\uC778\uB418\uC9C0 \uC54A\uC740 \uC571" \uACBD\uACE0\uB97C \uBCF4\uC5EC\uC8FC\uBA74 **\uACE0\uAE09 \u203A \uACC4\uC18D**\uC73C\uB85C \uC9C4\uD589\uD569\uB2C8\uB2E4.']},{title:"\uC54C\uC544 \uB458 \uC810",lines:["\uC804\uC6A9 \uCE98\uB9B0\uB354 \uC548\uC758 \uC77C\uC815\uC740 \uC5C5\uBB34\uD568\uC774 \uAD00\uB9AC\uD569\uB2C8\uB2E4 \u2014 \uAD6C\uAE00\uC5D0\uC11C \uACE0\uCCD0\uB3C4 \uB2E4\uC74C \uBCC0\uACBD \uB54C \uC5C5\uBB34\uD568 \uB0B4\uC6A9\uC73C\uB85C \uB418\uB3CC\uC544\uAC11\uB2C8\uB2E4. \uC5C5\uBB34\uB294 \uC5C5\uBB34\uD568\uC5D0\uC11C \uACE0\uCE58\uC138\uC694.","\uD45C\uC2DC\uAC00 \uC5B4\uAE0B\uB09C \uAC83 \uAC19\uC73C\uBA74 **\uC804\uCCB4 \uB2E4\uC2DC \uB0B4\uBCF4\uB0B4\uAE30**\uB85C \uADF8 \uCE98\uB9B0\uB354\uB97C \uB0B4 \uC5C5\uBB34 \uAE30\uC900\uC73C\uB85C \uB2E4\uC2DC \uCC44\uC6C1\uB2C8\uB2E4.","**\uC5F0\uACB0 \uD574\uC81C**\uD558\uBA74 \uAD8C\uD55C\uC740 \uB04A\uAE30\uC9C0\uB9CC \uAD6C\uAE00 \uCABD \uC804\uC6A9 \uCE98\uB9B0\uB354\uB294 \uB0A8\uC2B5\uB2C8\uB2E4. \uD544\uC694\uD558\uBA74 \uAD6C\uAE00 \uCE98\uB9B0\uB354\uC5D0\uC11C \uC9C0\uC6B0\uC138\uC694.","\uD55C \uC0AC\uB78C\uC774 \uC5EC\uB7EC \uAE30\uAE30\uC5D0\uC11C \uC368\uB3C4 \uC5F0\uACB0\uC740 \uACC4\uC815\uB2F9 \uD55C \uBC88\uC774\uBA74 \uB429\uB2C8\uB2E4. \uC560\uD50C\xB7\uB124\uC774\uBC84 \uCE98\uB9B0\uB354 \uC5F0\uB3D9\uC740 \uC81C\uACF5\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."]}]};var cg={id:"shortcuts",tabTitle:"\uB2E8\uCD95\uD0A4",topics:[]};var Yf=[ng,og,ig,sg,ag,lg,cg];import{Fragment as VT,jsx as Wt,jsxs as Uo}from"react/jsx-runtime";function vc(e){return e.split(/(\*\*[^*]+\*\*|\s*(?:→|->)\s*)/g).filter(g=>g.length>0).map((g,l)=>g.startsWith("**")&&g.endsWith("**")?Wt(dr,{component:"strong",sx:{fontWeight:700},children:g.slice(2,-2)},l):/^\s*(?:→|->)\s*$/.test(g)?Wt(LT,{sx:{fontSize:"1em",verticalAlign:"-0.15em",mx:.5,color:"text.secondary"}},l):Wt(Xf,{children:g},l))}function jT({keys:e}){let f=lt();return Wt(dr,{sx:{display:"flex",alignItems:"center",gap:.5,justifyContent:"flex-end"},children:e.split(" \u2192 ").map((g,l)=>Uo(dr,{sx:{display:"flex",alignItems:"center",gap:.5},children:[l>0?Wt(PT,{sx:{fontSize:20,color:f.colors.textMuted}}):null,Wt(dr,{component:"span",sx:{minWidth:36,height:36,px:1,display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:15,fontWeight:600,color:f.colors.textPrimary,bgcolor:f.colors.surfaceSubtle,border:`1px solid ${f.colors.border}`,borderRadius:1,fontVariantNumeric:"tabular-nums"},children:g})]},`${g}-${l}`))})}function FT({steps:e}){let f=lt();return Wt(dr,{sx:{display:"grid",gridTemplateColumns:{xs:"1fr",sm:"repeat(3, minmax(0, 1fr))"},gap:{xs:1,sm:2},mt:1.5},children:e.map((g,l)=>Uo(dr,{sx:{position:"relative",minWidth:0,px:1.75,py:2.5,borderRadius:2,bgcolor:f.colors.surfaceSubtle,border:`1px solid ${f.colors.border}`,"&::before":{content:'""',position:"absolute",top:-1,left:12,right:12,height:3,borderRadius:"0 0 3px 3px",bgcolor:f.colors.accent,opacity:.85},"&::after":l<e.length-1?{content:'""',display:{xs:"none",sm:"block"},position:"absolute",top:"50%",right:-12,width:8,height:8,mt:"-4px",borderTop:`2px solid ${f.colors.borderStrong}`,borderRight:`2px solid ${f.colors.borderStrong}`,transform:"rotate(45deg)"}:void 0},children:[Uo(dr,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[Wt(dr,{sx:{flexShrink:0,width:26,height:26,borderRadius:"50%",display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:13,fontWeight:500,lineHeight:1,bgcolor:f.colors.accent,color:f.colors.accentContrast,fontVariantNumeric:"tabular-nums"},children:l+1}),Wt(dr,{sx:{minWidth:0,fontSize:20,fontWeight:500,color:f.colors.textStrong,lineHeight:1.3,letterSpacing:"-0.01em"},children:g.title})]}),Wt(dr,{sx:{mt:1.5,fontSize:15,lineHeight:1.5,color:f.colors.textPrimary,wordBreak:"keep-all"},children:g.desc})]},g.title))})}var fg="70vh",qT=24,$T=44,ug=`calc((${fg} - ${qT*2+$T}px) / var(--mfd-font-scale, 1))`,HT=148;function WT({items:e}){let f=lt();return Wt(dr,{sx:{mt:1.5,display:"grid",gridTemplateColumns:{xs:"1fr",sm:`${HT}px minmax(0, 1fr)`},fontSize:15,lineHeight:1.6,color:f.colors.textPrimary,border:`1px solid ${f.colors.border}`,borderRadius:1.5,overflow:"hidden","& > *":{px:1.5,py:1.35,borderTop:`1px solid ${f.colors.border}`},"& > *:nth-of-type(even)":{borderLeft:{sm:`1px solid ${f.colors.border}`}},"& > *:nth-of-type(1)":{borderTop:0},"& > *:nth-of-type(2)":{borderTop:{xs:`1px solid ${f.colors.border}`,sm:0}}},children:e.map(g=>Uo(Xf,{children:[Wt(dr,{sx:{fontWeight:500,color:f.colors.textStrong,wordBreak:"keep-all",bgcolor:f.colors.surfaceSubtle,display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center"},children:g.term}),Wt(dr,{sx:{wordBreak:"keep-all"},children:vc(g.desc)})]},g.term))})}function UT({topic:e}){let f=lt();return Uo(dr,{component:"section",sx:{py:{xs:3,sm:4},borderBottom:`1px solid ${f.colors.border}`,"&:last-of-type":{pb:0,borderBottom:0}},children:[Uo(dr,{component:"h3",sx:{m:0,mb:1.75,fontSize:24,fontWeight:500,letterSpacing:"-0.01em",lineHeight:1.3,color:f.colors.textStrong,wordBreak:"keep-all",display:"flex",alignItems:"center",flexWrap:"wrap"},children:[e.title,e.subtitle?Uo(VT,{children:[Wt(NT,{sx:{fontSize:22,color:f.colors.textMuted,mx:1,flexShrink:0}}),Wt(dr,{component:"span",sx:{fontSize:18,fontWeight:400,color:f.colors.textPrimary},children:e.subtitle})]}):null]}),e.lead?Wt(dr,{sx:{fontSize:15.5,lineHeight:1.65,color:f.colors.textPrimary,wordBreak:"keep-all"},children:vc(e.lead)}):null,e.steps?.length?Wt(FT,{steps:e.steps}):null,e.items?.length?Wt(WT,{items:e.items}):null,e.lines?.length?Wt(dr,{component:"ul",sx:{m:0,mt:e.lead||e.steps||e.items?1.25:0,pl:2.5,display:"flex",flexDirection:"column",gap:.5,fontSize:15,lineHeight:1.6,color:f.colors.textPrimary,wordBreak:"keep-all"},children:e.lines.map((g,l)=>Wt("li",{children:vc(g)},l))}):null]})}function sY({open:e,onClose:f,views:g,features:l={},initialTab:o}){let s=lt(),[r,t]=AT(0);OT(()=>{if(!e)return;let h=Yf.filter(d=>!d.feature||l[d.feature]!==!1).findIndex(d=>d.id===o);t(Math.max(0,h))},[e,o]);let n=a=>!a||l[a]!==!1,c=Ca(g),i=Yf.filter(a=>n(a.feature)).map(a=>({id:a.id,tabTitle:a.tabTitle,showTitle:!1,children:a.id==="shortcuts"?Wt(dr,{sx:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:ug,maxHeight:ug,px:.5},children:Wt(dr,{sx:{display:"grid",gridTemplateColumns:"auto auto",columnGap:2.5,rowGap:1.75,alignItems:"center",fontSize:17,fontWeight:500,color:s.colors.textPrimary},children:c.map(h=>Uo(Xf,{children:[Wt(jT,{keys:h.keys}),Wt("span",{children:h.description})]},h.keys))})}):Uo(dr,{sx:{display:"flex",flexDirection:"column",px:.5},children:[a.intro?Wt(dr,{sx:{p:2,borderRadius:2,bgcolor:s.colors.accentSoft,color:s.colors.textStrong,fontSize:15.5,lineHeight:1.65,wordBreak:"keep-all"},children:vc(a.intro)}):null,a.topics.filter(h=>n(h.feature)).map(h=>Wt(UT,{topic:h},h.title))]})}));return Wt(zT,{open:e,onClose:f,maxWidth:"md",title:"\uC5C5\uBB34\uD568 \uC124\uBA85\uC11C",locale:"ko",titleIcons:{delete:{visible:!1}},tabs:{visible:!0,switchContent:!0},activeTabValue:r,onTabChange:t,fixedHeight:"70vh",maxContentHeight:fg,sectionContentPaddingTop:0,fontScale:{enabled:!0},fontScaleKey:"taskbox-manual",sections:i,actions:{showCancelButton:!1,right:Wt(DT,{variant:"contained",onClick:f,sx:{minWidth:80},children:"\uB2EB\uAE30"})}})}import{useEffect as dg,useRef as KT,useState as Ss}from"react";import{Box as hr,Button as Yn,IconButton as Zf,Menu as hg,MenuItem as pg,Switch as GT,Tooltip as mg}from"@mui/material";import{FormDialog as gg}from"@ehfuse/mui-form-dialog";import Jf from"@mui/icons-material/Add";import YT from"@mui/icons-material/ArrowRightAlt";import XT from"@mui/icons-material/BoltOutlined";import ZT from"@mui/icons-material/Close";import JT from"@mui/icons-material/EditOutlined";import{ErrorAlert as bg}from"@ehfuse/alerts";import{ClearTextField as Ia,LabelSelect as _n}from"@ehfuse/mui-form-controls";import{Fragment as xg,jsx as Ze,jsxs as An}from"react/jsx-runtime";var Qf=[{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."}],Ea=[{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"}],kc=[{value:"high",label:"\uB192\uC74C"},{value:"medium",label:"\uC911\uAC04"},{value:"low",label:"\uB0AE\uC74C"}];function wc(){return{name:"",trigger:"created",enabled:!0,sort_no:0,condition:{},action:{}}}function _c(e){return gn.find(f=>f.key===e)?.name??e}function QT(e,f,g){let{condition:l,action:o}=e,s=[];if(l.group_seq){let n=f.find(c=>hi(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=${kc.find(n=>n.value===l.priority)?.label}`),l.label_key&&s.push(`\uB77C\uBCA8=${g.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=${_c(l.status)}`),l.from_status&&s.push(`${_c(l.from_status)}\uC5D0\uC11C`),l.to_status&&s.push(`${_c(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(`${Ea.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=${_c(o.set_status)}`),o.set_priority&&r.push(`\uC911\uC694\uB3C4=${kc.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 + ${g.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=Qf.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 yg={fontSize:16,fontWeight:700,color:"#37352f"},e7={display:"flex",alignItems:"center",gap:1},t7={width:104,flexShrink:0,fontSize:16,color:"#37352f"};function _Y({open:e,rules:f,customTabs:g,statusOptions:l,contentTemplates:o=[],onPickAccount:s,onClose:r,onCreate:t,onUpdate:n,onToggle:c,onRemove:i}){let[a,h]=Ss(!1),[d,u]=Ss(0),[b,m]=Ss(wc()),[x,k]=Ss(!1),B=KT(null),[R,j]=Ss(null),[A,P]=Ss(null);dg(()=>{if(e)return;let W=window.setTimeout(()=>{h(!1),u(0),m(wc())},500);return()=>window.clearTimeout(W)},[e]),dg(()=>{if(!a)return;let W=window.setTimeout(()=>B.current?.focus(),120);return()=>window.clearTimeout(W)},[a]);let N=d>0,q=b.trigger,z=()=>{h(!1),u(0),m(wc())},T=(W,X)=>{m(Z=>{let Y={...Z.condition};return X===""||X===void 0||X===null?delete Y[W]:Y[W]=X,{...Z,condition:Y}})},S=(W,X)=>{m(Z=>{let Y={...Z.action};return X===""||X===void 0||X===null?delete Y[W]:Y[W]=X,{...Z,action:Y}})},D=W=>{m(X=>{let Z={...X.condition};return W!=="status_changed"&&(delete Z.from_status,delete Z.to_status),W!=="overdue"&&delete Z.overdue_days,W!=="field_changed"&&delete Z.changed_field,W!=="commented"&&(delete Z.comment_contains,delete Z.comment_by_others),W==="field_changed"&&Z.changed_field===void 0&&(Z.changed_field=Ea[0]?.value??""),{...X,trigger:W,condition:Z}})},p=g.filter(W=>!W.archived),y=l.map(W=>({value:W.key,label:W.name})),v=gn.map(W=>({value:W.key,label:W.name})),w=p.map(W=>({value:String(hi(W.key)),label:W.label})),{condition:_,action:C}=b,O=_.is_bug!==void 0||_.is_event!==void 0,F=[..._.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,Z=await s(X,W==="manager_account"?"\uCC45\uC784\uC790":"\uCC38\uC870\uC790");Z&&m(Y=>{let J={...Y.condition};return W==="manager_account"?(J.manager_account_seq=Z.accountSeq,J.manager_name=Z.name):(J.receiver_account_seq=Z.accountSeq,J.receiver_name=Z.name),{...Y,condition:J}})},K=W=>{j(null),W==="group_seq"?T("group_seq",Number(w[0]?.value)||0):W==="kind"?T("is_bug",!0):W==="priority"?T("priority","high"):W==="label_key"?T("label_key",y[0]?.value??""):W==="title_contains"?m(X=>({...X,condition:{...X.condition,title_contains:""}})):W==="manager_empty"?T("manager_empty",!0):W==="manager_account"||W==="receiver_account"?$(W):W==="from_status"?T("from_status",gn[0]?.key??""):W==="to_status"?T("to_status",gn[0]?.key??""):W==="changed_field"?T("changed_field",Ea[0]?.value??""):W==="comment_contains"?m(X=>({...X,condition:{...X.condition,comment_contains:""}})):W==="comment_by_others"?T("comment_by_others",!0):W==="overdue_days"&&T("overdue_days",1)},M=W=>{if(W==="kind"){T("is_bug",""),T("is_event","");return}if(W==="manager_account"){T("manager_account_seq",""),T("manager_name","");return}if(W==="receiver_account"){T("receiver_account_seq",""),T("receiver_name","");return}T(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"}]:[]],E=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,Z=await s(X,W==="assign_manager"?"\uCC45\uC784\uC790":W==="add_receiver"?"\uCC38\uC870\uC790":"\uC54C\uB9BC \uBC1B\uC744 \uC0AC\uB78C");Z&&m(Y=>{let J={...Y.action};return W==="assign_manager"?(J.assign_manager_account_seq=Z.accountSeq,J.assign_manager_name=Z.name):W==="add_receiver"?(J.add_receiver_account_seq=Z.accountSeq,J.add_receiver_name=Z.name):(J.notify_account_seq=Z.accountSeq,J.notify_name=Z.name),{...Y,action:J}})},I=W=>{if(P(null),W==="set_status")S("set_status",gn[0]?.key??"");else if(W==="set_priority")S("set_priority","high");else if(W==="add_label_key")S("add_label_key",y[0]?.value??"");else if(W==="apply_content_template"){let X=o[0];m(Z=>({...Z,action:{...Z.action,apply_content_template_seq:X?.seq??0,apply_content_template_name:X?.name??""}}))}else E(W)},L=W=>{W==="assign_manager"?(S("assign_manager_account_seq",""),S("assign_manager_name","")):W==="add_receiver"?(S("add_receiver_account_seq",""),S("add_receiver_name","")):W==="apply_content_template"?(S("apply_content_template_seq",""),S("apply_content_template_name","")):W==="notify"?(S("notify_account_seq",""),S("notify_name",""),S("notify_message","")):S(W,"")},U=async()=>{if(!b.name.trim()){bg({message:"\uADDC\uCE59 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694."});return}if(Object.keys(b.action).length===0){bg({message:"\uB3D9\uC791\uC744 \uD558\uB098 \uC774\uC0C1 \uCD94\uAC00\uD558\uC138\uC694."});return}let W=N?b.sort_no:f.reduce((Z,Y)=>Math.max(Z,Y.sort_no),0)+1;k(!0);let X=N?await n(d,{...b,sort_no:W}):await t({...b,sort_no:W});k(!1),X&&z()},G=(W,X,Z,Y)=>An(hr,{sx:e7,children:[Ze(hr,{sx:t7,children:W}),An(hr,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:Y?"column":"row",alignItems:Y?"stretch":"center",gap:Y?.5:1},children:[X,Y?Ze(hr,{sx:{fontSize:13.5,color:"#37352f"},children:Y}):null]}),Ze(mg,{title:"\uC774 \uC904 \uBE7C\uAE30",arrow:!0,disableInteractive:!0,children:Ze(Zf,{size:"small","aria-label":`${W} \uC904 \uBE7C\uAE30`,onClick:Z,children:Ze(ZT,{sx:{fontSize:16}})})})]}),V=()=>An(hr,{sx:{display:"flex",flexDirection:"column",gap:2.5},children:[Ze(Ia,{size:"medium",label:"\uADDC\uCE59 \uC774\uB984",inputRef:B,placeholder:"\uC608: \uC811\uC218 \uC624\uB958 \uC790\uB3D9 \uBC30\uC815",value:b.name,onChange:W=>m(X=>({...X,name:W.target.value}))}),Ze(hr,{sx:{display:"flex",alignItems:"center",gap:2,flexWrap:"wrap"},children:Qf.map(W=>{let X=q===W.value;return Ze(Yn,{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)})}),Ze(hr,{sx:{fontSize:13,color:"#787774",mt:-.5},children:Qf.find(W=>W.value===q)?.hint}),An(hr,{sx:{display:"flex",alignItems:"center",gap:1,mt:.5},children:[Ze(hr,{sx:yg,children:"\uC5B4\uB5A4 \uC5C5\uBB34\uC77C \uB54C"}),F.length>0?Ze(Yn,{size:"small",startIcon:Ze(Jf,{sx:{fontSize:16}}),onClick:W=>j(W.currentTarget),sx:{color:"#2563eb",minWidth:0},children:"\uC870\uAC74 \uCD94\uAC00"}):null]}),_.group_seq!==void 0?G("\uD504\uB85C\uC81D\uD2B8",Ze(_n,{size:"medium",fullWidth:!0,label:"",value:String(_.group_seq),options:w,onChange:W=>T("group_seq",Number(W.target.value)||"")}),()=>M("group_seq")):null,O?G("\uC885\uB958",Ze(_n,{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";T("is_bug",X?!0:""),T("is_event",X?"":!0)}}),()=>M("kind")):null,_.priority!==void 0?G("\uC911\uC694\uB3C4",Ze(_n,{size:"medium",fullWidth:!0,label:"",value:_.priority,options:kc,onChange:W=>T("priority",W.target.value)}),()=>M("priority")):null,_.label_key!==void 0?G("\uB77C\uBCA8",Ze(_n,{size:"medium",fullWidth:!0,label:"",value:_.label_key,options:y,onChange:W=>T("label_key",W.target.value)}),()=>M("label_key")):null,_.title_contains!==void 0?G("\uC81C\uBAA9",Ze(Ia,{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?G("\uCC45\uC784\uC790",Ze(_n,{size:"medium",fullWidth:!0,label:"",value:_.manager_empty?"empty":"assigned",options:[{value:"empty",label:"\uC5C6\uC74C"},{value:"assigned",label:"\uC788\uC74C"}],onChange:W=>T("manager_empty",W.target.value==="empty")}),()=>M("manager_empty")):null,_.manager_account_seq!==void 0?G("\uCC45\uC784\uC790",Ze(Yn,{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?G("\uCC38\uC870\uC790",Ze(Yn,{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?G("\uC774 \uC0C1\uD0DC\uC5D0\uC11C",Ze(_n,{size:"medium",fullWidth:!0,label:"",value:_.from_status,options:v,onChange:W=>T("from_status",W.target.value)}),()=>M("from_status")):null,_.to_status!==void 0?G("\uC774 \uC0C1\uD0DC\uB85C",Ze(_n,{size:"medium",fullWidth:!0,label:"",value:_.to_status,options:v,onChange:W=>T("to_status",W.target.value)}),()=>M("to_status")):null,_.changed_field!==void 0?G("\uBCC0\uACBD \uD544\uB4DC",Ze(_n,{size:"medium",fullWidth:!0,label:"",value:_.changed_field,options:Ea,onChange:W=>T("changed_field",W.target.value)}),()=>M("changed_field")):null,_.comment_contains!==void 0?G("\uB313\uAE00 \uB0B1\uB9D0",Ze(Ia,{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?G("\uB313\uAE00 \uC791\uC131\uC790",Ze(_n,{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=>T("comment_by_others",W.target.value==="others")}),()=>M("comment_by_others")):null,_.overdue_days!==void 0?G("\uACBD\uACFC\uC77C",Ze(Ia,{size:"medium",fullWidth:!0,type:"number",value:String(_.overdue_days),onChange:W=>T("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?Ze(hr,{sx:{fontSize:13.5,color:"#9a9a97"},children:"\uC870\uAC74\uC774 \uC5C6\uC73C\uBA74 \uBAA8\uB4E0 \uC5C5\uBB34\uC5D0 \uC2E4\uD589\uB429\uB2C8\uB2E4."}):null,An(hr,{sx:{display:"flex",alignItems:"center",gap:1,mt:.5},children:[Ze(hr,{sx:yg,children:"\uBB34\uC5C7\uC744 \uD560\uAE4C\uC694"}),H.length>0?Ze(Yn,{size:"small",startIcon:Ze(Jf,{sx:{fontSize:16}}),onClick:W=>P(W.currentTarget),sx:{color:"#2563eb",minWidth:0},children:"\uB3D9\uC791 \uCD94\uAC00"}):null]}),C.set_status!==void 0?G("\uC0C1\uD0DC",Ze(_n,{size:"medium",fullWidth:!0,label:"",value:C.set_status,options:v,onChange:W=>S("set_status",W.target.value)}),()=>L("set_status")):null,C.set_priority!==void 0?G("\uC911\uC694\uB3C4",Ze(_n,{size:"medium",fullWidth:!0,label:"",value:C.set_priority,options:kc,onChange:W=>S("set_priority",W.target.value)}),()=>L("set_priority")):null,C.apply_content_template_seq!==void 0?G("\uBCF8\uBB38 \uC591\uC2DD",Ze(_n,{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(Z=>String(Z.seq)===String(W.target.value));m(Z=>({...Z,action:{...Z.action,apply_content_template_seq:X?.seq??0,apply_content_template_name:X?.name??""}}))}}),()=>L("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?G("\uB77C\uBCA8",Ze(_n,{size:"medium",fullWidth:!0,label:"",value:C.add_label_key,options:y,onChange:W=>S("add_label_key",W.target.value)}),()=>L("add_label_key")):null,C.assign_manager_account_seq!==void 0?G("\uCC45\uC784\uC790",Ze(Yn,{size:"medium",variant:"outlined",color:"inherit",onClick:()=>{E("assign_manager")},children:C.assign_manager_name||`\uACC4\uC815 #${C.assign_manager_account_seq}`}),()=>L("assign_manager")):null,C.add_receiver_account_seq!==void 0?G("\uCC38\uC870\uC790",Ze(Yn,{size:"medium",variant:"outlined",color:"inherit",onClick:()=>{E("add_receiver")},children:C.add_receiver_name||`\uACC4\uC815 #${C.add_receiver_account_seq}`}),()=>L("add_receiver")):null,C.notify_account_seq!==void 0?G("\uC54C\uB9BC",An(xg,{children:[Ze(Yn,{size:"medium",variant:"outlined",color:"inherit",onClick:()=>{E("notify")},sx:{flexShrink:0},children:C.notify_name||`\uACC4\uC815 #${C.notify_account_seq}`}),Ze(Ia,{size:"medium",fullWidth:!0,placeholder:"\uC54C\uB9BC \uBB38\uAD6C(\uBE44\uC6B0\uBA74 \uAE30\uBCF8 \uBB38\uAD6C)",value:C.notify_message??"",onChange:W=>S("notify_message",W.target.value)})]}),()=>L("notify")):null,Object.keys(C).length===0?Ze(hr,{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,Ze(hg,{transitionDuration:0,anchorEl:R,open:!!R,onClose:()=>j(null),children:F.map(W=>Ze(pg,{dense:!0,onClick:()=>K(W.key),sx:{fontSize:14},children:W.label},W.key))}),Ze(hg,{transitionDuration:0,anchorEl:A,open:!!A,onClose:()=>P(null),children:H.map(W=>Ze(pg,{dense:!0,onClick:()=>I(W.key),sx:{fontSize:14},children:W.label},W.key))})]});return An(xg,{children:[Ze(gg,{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:An(hr,{sx:{display:"flex",flexDirection:"column",px:2.5,py:2},children:[f.length===0?An(hr,{sx:{py:4,display:"flex",flexDirection:"column",alignItems:"center",gap:2,color:"#9a9a97"},children:[Ze(XT,{sx:{fontSize:48,color:"#d9d9d6"}}),Ze(hr,{sx:{fontSize:15},children:"\uB4F1\uB85D\uB41C \uADDC\uCE59\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."})]}):null,f.map(W=>An(hr,{sx:{display:"flex",alignItems:"center",gap:2,py:1,"&:not(:last-of-type)":{borderBottom:"1px solid #ececea"},opacity:W.enabled?1:.5},children:[Ze(mg,{title:W.enabled?"\uC0AC\uC6A9 \uC911":"\uAEBC\uC9D0",arrow:!0,disableInteractive:!0,children:Ze(GT,{size:"small",inputProps:{"aria-label":`${W.name} \uADDC\uCE59 \uC0AC\uC6A9`},checked:W.enabled,onChange:(X,Z)=>c(W.seq,Z)})}),An(hr,{sx:{flex:1,minWidth:0},children:[Ze(hr,{sx:{fontSize:16,fontWeight:600,color:"#37352f"},children:W.name}),(()=>{let X=QT(W,g,l);return An(hr,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:.5,fontSize:15,color:"#6f6f6c"},children:[Ze(hr,{component:"span",children:X.left}),Ze(YT,{sx:{fontSize:18,color:"#9a9a97",flexShrink:0}}),Ze(hr,{component:"span",children:X.right})]})})()]}),Ze(Zf,{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:Ea[0]?.value??""}:{}},action:{...W.action}}),h(!0)},children:Ze(JT,{sx:{fontSize:18}})}),Ze(Zf,{size:"small","aria-label":`${W.name} \uADDC\uCE59 \uC0AD\uC81C`,onClick:()=>i(W.seq),children:Ze(Ir,{sx:{fontSize:18}})})]},W.seq))]})}],actions:{showCancelButton:!1,left:Ze(Yn,{startIcon:Ze(Jf,{}),onClick:()=>{u(0),m(wc()),h(!0)},sx:{color:"#2563eb"},children:"\uC0C8 \uADDC\uCE59"}),right:Ze(Yn,{variant:"contained",onClick:r,children:"\uB2EB\uAE30"})}}),Ze(gg,{open:a,onClose:z,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:V()}],actions:{showCancelButton:!0,right:Ze(Yn,{variant:"contained",onClick:()=>{U()},disabled:x,children:N?"\uC218\uC815":"\uADDC\uCE59 \uCD94\uAC00"})}})]})}import{useEffect as vg,useRef as ed,useState as Ts}from"react";import{Box as sr,Button as Cs,IconButton as Ma,Tooltip as Ra}from"@mui/material";import wg from"@mui/icons-material/Add";import r7 from"@mui/icons-material/EditOutlined";import n7 from"@mui/icons-material/ContentCopyOutlined";import o7 from"@mui/icons-material/DragIndicator";import i7 from"@mui/icons-material/Close";import s7 from"@mui/icons-material/PlaylistAddCheckOutlined";import{DndContext as a7,PointerSensor as l7,closestCenter as c7,useSensor as u7,useSensors as f7}from"@dnd-kit/core";import{restrictToParentElement as d7,restrictToVerticalAxis as h7}from"@dnd-kit/modifiers";import{SortableContext as p7,arrayMove as _g,useSortable as m7,verticalListSortingStrategy as g7}from"@dnd-kit/sortable";import{CSS as b7}from"@dnd-kit/utilities";import{FormDialog as kg}from"@ehfuse/mui-form-dialog";import{ClearTextField as td,LabelSelect as Sg,NumberField as Tg}from"@ehfuse/mui-form-controls";import y7 from"@ehfuse/overlay-scrollbar";import{ConfirmDialog as x7,ErrorAlert as Cg}from"@ehfuse/alerts";import{Fragment as S7,jsx as ft,jsxs as Dn}from"react/jsx-runtime";var v7=[{value:"high",label:"\uB192\uC74C"},{value:"medium",label:"\uC911\uAC04"},{value:"low",label:"\uB0AE\uC74C"}],Bg="\uC5C5\uBB34 \uC81C\uBAA9",rd=2,Sc={flex:1,minWidth:0},Ig=56,Eg=20,w7=`${Eg+rd*8}px`;function Tc(){return{name:"",description:"",group_seq:0,items:[]}}function _7(){return{title:"",start_offset_days:0,due_offset_days:0,priority:"medium"}}function k7({id:e,children:f}){let{attributes:g,listeners:l,setNodeRef:o,transform:s,transition:r,isDragging:t}=m7({id:e});return ft(sr,{ref:o,sx:{transform:b7.Transform.toString(s),transition:r,...t?{opacity:.6,position:"relative",zIndex:1}:{}},children:f({handleProps:{...g,...l},dragging:t})})}function HY({open:e,templates:f,customTabs:g,onPickAccount:l,onClose:o,onCreate:s,onUpdate:r,onRemove:t,onRun:n}){let[c,i]=Ts(!1),[a,h]=Ts(0),[d,u]=Ts(Tc()),[b,m]=Ts(!1),[x,k]=Ts([]),B=ed(0),[R,j]=Ts(0),A=ed(null),P=ed(null);vg(()=>{if(e)return;let F=window.setTimeout(()=>{i(!1),h(0),u(Tc()),k([])},500);return()=>window.clearTimeout(F)},[e]);let N=()=>(B.current+=1,`template-item-${B.current}`),q=(F,$)=>{h(F),u($),k($.items.map(()=>N())),i(!0)},z=d.items.map((F,$)=>x[$]??`template-item-fallback-${$}`),T=()=>{let F=P.current?.getScrollContainer()??null;if(F){F.scrollTop=F.scrollHeight;return}let $=A.current?.querySelectorAll("*")??[];for(let K of Array.from($))if(K.scrollHeight>K.clientHeight+1){K.scrollTop=K.scrollHeight;return}},S=()=>{let F=A.current;if(!F)return null;let $=F.querySelectorAll("input[data-template-title]"),K=$.length?$:F.querySelectorAll(`input[placeholder="${Bg}"]`);return K.length?K[K.length-1]:null};vg(()=>{if(R===0)return;let F=0,$=0,K=()=>{T();let H=S();H&&document.activeElement!==H&&H.focus(),F+=1,!(H&&document.activeElement===H)&&F<8&&($=window.setTimeout(K,50))},M=window.requestAnimationFrame(K);return()=>{window.cancelAnimationFrame(M),window.clearTimeout($)}},[R]);let D=g.filter(F=>!F.archived).map(F=>({value:String(hi(F.key)),label:F.label})),p=(F,$)=>{u(K=>({...K,items:K.items.map((M,H)=>H===F?{...M,...$}:M)}))},y=f7(u7(l7,{activationConstraint:{distance:5}})),v=F=>{let $=String(F.active?.id??""),K=String(F.over?.id??"");if(!$||!K||$===K)return;let M=z.indexOf($),H=z.indexOf(K);M<0||H<0||(u(E=>({...E,items:_g(E.items,M,H)})),k(E=>_g(E,M,H)))},w=async F=>{if(!l)return;let $=await l(d.items[F]?.manager_account_seq??0,"\uCC45\uC784\uC790");$&&p(F,{manager_account_seq:$.accountSeq,manager_name:$.name})},_=async()=>{let F=d.name.trim();if(!F){Cg({message:"\uD15C\uD50C\uB9BF \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694."});return}let $=d.items.filter(H=>H.title.trim().length>0);if($.length===0){Cg({message:"\uC5C5\uBB34 \uD56D\uBAA9\uC744 \uD55C \uC904 \uC774\uC0C1 \uB123\uC73C\uC138\uC694."});return}m(!0);let K={...d,name:F,items:$},M=a>0?await r(a,K):await s(K);m(!1),M&&(i(!1),h(0),u(Tc()))},C=ft(sr,{children:f.length===0?Dn(sr,{sx:{py:4,display:"flex",flexDirection:"column",alignItems:"center",gap:2,color:"#9a9a97"},children:[ft(s7,{sx:{fontSize:48,color:"#d9d9d6"}}),ft(sr,{sx:{fontSize:13.5},children:"\uB4F1\uB85D\uB41C \uD15C\uD50C\uB9BF\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."})]}):f.map(F=>Dn(sr,{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:[Dn(sr,{sx:{flex:1,minWidth:0},children:[ft(sr,{sx:{fontSize:18,fontWeight:600,color:"#37352f"},children:F.name}),Dn(sr,{sx:{fontSize:14,color:"#787774",mt:.25},children:["\uC5C5\uBB34 ",F.items.length,"\uAC74",F.description?` \xB7 ${F.description}`:""]})]}),n?ft(Cs,{size:"medium",variant:"outlined",onClick:()=>n(F),sx:{flexShrink:0},children:"\uC2E4\uD589"}):null,ft(Ra,{title:"\uC218\uC815",arrow:!0,disableInteractive:!0,children:ft(Ma,{size:"medium","aria-label":`${F.name} \uD15C\uD50C\uB9BF \uC218\uC815`,onClick:()=>q(F.seq,{name:F.name,description:F.description??"",group_seq:F.group_seq??0,items:F.items.map($=>({...$}))}),children:ft(r7,{sx:{fontSize:19}})})}),ft(Ra,{title:"\uBCF5\uC81C",arrow:!0,disableInteractive:!0,children:ft(Ma,{size:"medium","aria-label":`${F.name} \uD15C\uD50C\uB9BF \uBCF5\uC81C`,onClick:()=>q(0,{name:`${F.name} \uC0AC\uBCF8`,description:F.description??"",group_seq:F.group_seq??0,items:F.items.map($=>({...$}))}),children:ft(n7,{sx:{fontSize:18}})})}),ft(Ra,{title:"\uC0AD\uC81C",arrow:!0,disableInteractive:!0,children:ft(Ma,{size:"medium","aria-label":`${F.name} \uD15C\uD50C\uB9BF \uC0AD\uC81C`,onClick:()=>{(async()=>await x7({title:"\uD15C\uD50C\uB9BF \uC0AD\uC81C",message:`"${F.name}" \uD15C\uD50C\uB9BF\uC744 \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&t(F.seq))()},children:ft(Ir,{sx:{fontSize:18}})})})]},F.seq))}),O=Dn(sr,{sx:{display:"flex",flexDirection:"column",gap:3},children:[ft(td,{size:"medium",label:"\uD15C\uD50C\uB9BF \uC774\uB984",placeholder:"\uC608: \uC2E0\uADDC \uC785\uC0AC\uC790 \uC628\uBCF4\uB529",fullWidth:!0,value:d.name,onChange:F=>u($=>({...$,name:F.target.value}))}),Dn(sr,{sx:{display:"grid",gridTemplateColumns:D.length>0?"1fr 1fr":"1fr",gap:2},children:[ft(td,{size:"medium",label:"\uC124\uBA85",placeholder:"\uBAA9\uB85D\uC5D0\uC11C \uBB34\uC5C7\uC778\uC9C0 \uC54C\uC544\uBCFC \uD55C \uC904(\uC120\uD0DD)",fullWidth:!0,value:d.description??"",onChange:F=>u($=>({...$,description:F.target.value}))}),D.length>0?ft(Sg,{size:"medium",fullWidth:!0,label:"\uB9CC\uB4E4 \uACF3(\uD504\uB85C\uC81D\uD2B8)",value:String(d.group_seq??0),options:[{value:"0",label:"\uAE30\uBCF8 \uC5C5\uBB34\uD568"},...D],onChange:F=>u($=>({...$,group_seq:Number(F.target.value)||0}))}):null]}),Dn(sr,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[ft(sr,{sx:{fontSize:18,fontWeight:600,color:"#37352f"},children:"\uC5C5\uBB34 \uD56D\uBAA9"}),ft(sr,{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."})]}),d.items.length===0?ft(sr,{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.'}):ft(sr,{ref:A,sx:{border:"1px solid #e6e6e3",borderRadius:1,overflow:"hidden"},children:ft(y7,{ref:P,style:{maxHeight:"min(560px, 52vh)"},thumb:{width:6},children:ft(a7,{sensors:y,collisionDetection:c7,modifiers:[h7,d7],onDragEnd:v,children:ft(p7,{items:z,strategy:g7,children:d.items.map((F,$)=>ft(k7,{id:z[$],children:({handleProps:K})=>Dn(sr,{sx:{borderBottom:$===d.items.length-1?"none":"1px solid #f2f2f0",px:rd,py:2,gap:2,display:"flex",flexDirection:"column"},children:[Dn(sr,{sx:{display:"flex",alignItems:"center",gap:rd},children:[ft(sr,{...K,"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:ft(o7,{sx:{fontSize:Eg}})}),ft(td,{size:"medium",fullWidth:!0,placeholder:Bg,slotProps:{htmlInput:{"data-template-title":$}},value:F.title,onChange:M=>p($,{title:M.target.value})})]}),Dn(sr,{sx:{display:"flex",alignItems:"center",gap:2,pl:w7},children:[ft(sr,{sx:Sc,children:ft(Tg,{size:"medium",fullWidth:!0,label:"\uC2DC\uC791 D+",thousandSeparator:!1,align:"right",suffix:"\uC77C",value:F.start_offset_days??null,onValueChange:M=>p($,{start_offset_days:M===null?void 0:Math.trunc(Number(M))})})}),ft(sr,{sx:Sc,children:ft(Tg,{size:"medium",fullWidth:!0,label:"\uB9C8\uAC10 D+",thousandSeparator:!1,align:"right",suffix:"\uC77C",value:F.due_offset_days??null,onValueChange:M=>p($,{due_offset_days:M===null?void 0:Math.trunc(Number(M))})})}),ft(sr,{sx:Sc,children:ft(Sg,{size:"medium",fullWidth:!0,label:"\uC911\uC694\uB3C4",value:F.priority??"medium",options:v7,onChange:M=>p($,{priority:M.target.value})})}),l?Dn(sr,{sx:{...Sc,position:"relative"},children:[ft(Cs,{variant:"outlined",fullWidth:!0,onClick:()=>{w($)},sx:{height:Ig,display:"block",textAlign:"left",textTransform:"none",fontSize:16,fontWeight:400,lineHeight:`${Ig-2}px`,py:0,px:1.75,pr:F.manager_account_seq?4.5:1.75,borderColor:"#c4c4c4",color:F.manager_name?"#37352f":"#9a9a97",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap","&:hover":{borderColor:"#37352f",bgcolor:"transparent"}},children:F.manager_name||"\uCC45\uC784\uC790"}),F.manager_account_seq?ft(Ra,{title:"\uCC45\uC784\uC790 \uBE44\uC6B0\uAE30",arrow:!0,disableInteractive:!0,children:ft(Ma,{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:ft(i7,{sx:{fontSize:18}})})}):null]}):null,ft(Ra,{title:"\uD56D\uBAA9 \uC0AD\uC81C",arrow:!0,disableInteractive:!0,children:ft(Ma,{size:"medium","aria-label":`${$+1}\uBC88 \uD56D\uBAA9 \uC0AD\uC81C`,onClick:()=>{u(M=>({...M,items:M.items.filter((H,E)=>E!==$)})),k(M=>M.filter((H,E)=>E!==$))},children:ft(Ir,{sx:{fontSize:18}})})})]})]})},z[$]))})})})})]});return Dn(S7,{children:[ft(kg,{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:ft(Cs,{startIcon:ft(wg,{sx:{fontSize:18}}),onClick:()=>q(0,Tc()),children:"\uC0C8 \uD15C\uD50C\uB9BF"}),right:ft(Cs,{variant:"contained",onClick:o,children:"\uB2EB\uAE30"})},sectionContentPaddingTop:0,sections:[{id:"templates",title:"",showTitle:!1,children:C}]}),ft(kg,{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:ft(Cs,{startIcon:ft(wg,{sx:{fontSize:18}}),onClick:()=>{u(F=>({...F,items:[...F.items,_7()]})),k(F=>[...F,N()]),j(F=>F+1)},children:"\uD56D\uBAA9 \uCD94\uAC00"}),right:ft(Cs,{variant:"contained",disabled:b,onClick:()=>{_()},children:"\uC800\uC7A5"})},sectionContentPaddingTop:0,sections:[{id:"template-form",title:"",showTitle:!1,children:O}]})]})}import{useEffect as Mg,useState as Rg}from"react";import{Box as Vr,Button as T7}from"@mui/material";import{FormDialog as C7}from"@ehfuse/mui-form-dialog";import{DateTextField as B7}from"@ehfuse/mui-form-controls";import I7 from"@ehfuse/overlay-scrollbar";import{jsx as ln,jsxs as Oa}from"react/jsx-runtime";function QY({open:e,template:f,todayStr:g,running:l=!1,onClose:o,onRun:s}){let[r,t]=Rg(g),[n,c]=Rg(f);Mg(()=>{f&&c(f)},[f]),Mg(()=>{e&&t(g)},[e]);let i=f??n,a=i?vp(i,r):[];return ln(C7,{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:ln(T7,{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:Oa(Vr,{sx:{display:"flex",flexDirection:"column",gap:2},children:[Oa(Vr,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[ln(Vr,{sx:{width:72,flexShrink:0,fontSize:16,color:"#37352f"},children:"\uAE30\uC900\uC77C"}),ln(B7,{size:"medium",fullWidth:!0,value:r,onChange:h=>t(h.target.value)})]}),ln(Vr,{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."}),Oa(Vr,{sx:{border:"1px solid #e6e6e3",borderRadius:1,overflow:"hidden"},children:[Oa(Vr,{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:[ln(Vr,{sx:{flex:1,minWidth:0},children:"\uC5C5\uBB34"}),ln(Vr,{sx:{width:88,flexShrink:0,textAlign:"center"},children:"\uC2DC\uC791"}),ln(Vr,{sx:{width:88,flexShrink:0,textAlign:"center"},children:"\uB9C8\uAC10"}),ln(Vr,{sx:{width:96,flexShrink:0,textAlign:"center"},children:"\uCC45\uC784\uC790"})]}),ln(I7,{style:{maxHeight:520},thumb:{width:6},children:a.length===0?ln(Vr,{sx:{p:2,fontSize:14,color:"#9a9a97"},children:"\uB9CC\uB4E4 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):a.map((h,d)=>Oa(Vr,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1.25,borderBottom:d===a.length-1?"none":"1px solid #f2f2f0",fontSize:16,fontWeight:500,color:"#111111"},children:[ln(Vr,{sx:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:h.title}),ln(Vr,{sx:{width:88,flexShrink:0,textAlign:"center",fontSize:13.5,color:h.start_date?"#37352f":"#9a9a97"},children:Qc(h.start_date)||"-"}),ln(Vr,{sx:{width:88,flexShrink:0,textAlign:"center",fontSize:13.5,color:h.due_date?"#37352f":"#9a9a97"},children:Qc(h.due_date)||"-"}),ln(Vr,{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||"-"})]},d))})]})]})}]})}var E7={urgent:"\uAE34\uAE09",high:"\uB192\uC74C",normal:"\uC911\uAC04",low:"\uB0AE\uC74C"};function M7(e){return e.length===0?"":e.length<=2?e.join(", "):`${e[0]} \uC678 ${e.length-1}\uBA85`}function Cc(e){let f=String(e??"").trim().slice(0,10);return/^\d{4}-\d{2}-\d{2}$/.test(f)?`${f.slice(2,4)}.${f.slice(5,7)}.${f.slice(8,10)}`:"-"}function Bs(e){let f=g=>String(g).padStart(2,"0");return`${e.getFullYear()}-${f(e.getMonth()+1)}-${f(e.getDate())} ${f(e.getHours())}:${f(e.getMinutes())}`}function nd(e,f,g){let o=String(e.due_date??"").slice(11,16).trim()||String(e.estimated_time??"").trim(),s=Cc(e.due_date),r=String(e.start_date??"").slice(11,16).trim(),t=Cc(e.start_date),n=(e.receiver_names??[]).filter(Boolean).map(i=>String(i).trim()),c=(e.checklist??[]).length?`${(e.checklist??[]).filter(i=>i.checked).length}/${(e.checklist??[]).length}`:"";return{seq:Number(e.seq??0),title:String(e.title??"").trim(),statusName:xr(e).name,projectLabel:e.tab_key?f.get(String(e.tab_key))??"":"",managerName:String(e.manager_name??"").trim(),receiverNames:M7(n),receiverNamesFull:n.join(", "),startDate:t!=="-"&&r?`${t} ${r}`:t,dueDate:s!=="-"&&o?`${s} ${o}`:s,priorityName:E7[String(e.priority??"")]??"",checklist:c,checklistItems:(e.checklist??[]).map(i=>{let a=i.task_seq&&g?g(Number(i.task_seq)):null,h=Cc(a?.due_date),d=String(a?.due_date??"").slice(11,16).trim();return{label:String(i.label??"").trim(),checked:!!i.checked,managerName:String(a?.manager_name??"").trim(),dueDate:h!=="-"?d?`${h} ${d}`:h:""}}),note:String(e.note??"").trim(),completed:!!e.completed}}function Nt(e){return String(e??"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function R7(e,f){if(e===" ")return f*.3;let g=e.codePointAt(0)??0,l=g>=4352&&g<=4607||g>=12288&&g<=40959||g>=44032&&g<=55203||g>=63744&&g<=64255||g>=65280&&g<=65519;return f*(l?1:.55)}function Bc(e,f){let g=0;for(let l of String(e??""))g+=R7(l,f);return g}function Is(e,f){let g=String(e??"").trim();if(!g)return["-"];let l=[],o="";for(let s of g){if(s===`
47
+ `){o&&l.push(o),o="";continue}let r=`${o}${s}`;if(r.length>f&&o){l.push(o),o=s;continue}o=r}return o&&l.push(o),l.length>0?l:["-"]}function vo(e,f,g){let l=String(e??"").replace(/\s+/g," ").trim();if(!l)return"";if(Bc(l,g)<=f)return l;let o=Bc("\u2026",g),s="",r=0;for(let t of l){let n=Bc(t,g);if(r+n+o>f)break;s+=t,r+=n}return`${s}\u2026`}var Da=595.28,Pa=841.89,Na=841.89,La=595.28,Kr=28,Pn=96,kn=44,O7="'Malgun Gothic','\uB9D1\uC740 \uACE0\uB515','Apple SD Gothic Neo','Noto Sans KR',sans-serif",A7="'Batang','\uBC14\uD0D5','AppleMyungjo','Noto Serif KR',serif",Aa="#cbd5e1",D7=[`text { font-family: ${O7}; fill: #000000; }`,`.doc-title { font-family: ${A7}; 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; }
48
48
  .ck{font-size:9px;fill:#475569;}
49
- .ck.done{fill:#94a3b8;}`,".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: ${Aa}; stroke-width: 0.5; }`,`.group { fill: #f8fafc; stroke: ${Aa}; stroke-width: 0.5; }`,`.frame { fill: none; stroke: ${Aa}; stroke-width: 0.5; }`,`.hline { stroke: ${Aa}; stroke-width: 0.5; }`,`.vline { stroke: ${Aa}; 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 Vo(e,f,g){let l=g-Kr;return[`<text x="${Kr}" y="46" class="doc-title">${Nt(e.documentTitle)}</text>`,`<text x="${Kr}" y="66" class="doc-sub">${Nt(e.subtitle)}</text>`,`<text x="${l}" y="42" class="doc-meta" text-anchor="end">${Nt(e.facilityName)}</text>`,`<text x="${l}" y="58" class="doc-meta" text-anchor="end">\uCD9C\uB825 ${Nt(Bs(e.printedAt))}${e.printedBy?` \xB7 ${Nt(e.printedBy)}`:""}</text>`,f?`<text x="${l}" y="74" class="doc-meta" text-anchor="end">${Nt(f)}</text>`:""].join("")}function Ko(e){let{width:f,height:g,body:l,pageIndex:o,pageCount:s}=e;return[`<svg xmlns="http://www.w3.org/2000/svg" width="${f}" height="${g}" viewBox="0 0 ${f} ${g}">`,`<style>${E7}</style>`,`<rect x="0" y="0" width="${f}" height="${g}" fill="#ffffff" />`,l,`<text x="${f/2}" y="${g-22}" class="pageno" text-anchor="middle">${o+1} / ${s}</text>`,"</svg>"].join("")}var id=Na,Rg=La,wo=Kr,za=id-Kr,Es=22,wi=20,Ms=22,Go=18,xi=5,Og=Pn,Ag=kn,od=Rg-46,Yo=[{key:"no",label:"\uBC88\uD638",width:30,align:"middle"},{key:"title",label:"\uC81C\uBAA9",width:300,align:"start"},{key:"status",label:"\uC0C1\uD0DC",width:60,align:"middle"},{key:"start",label:"\uC2DC\uC791",width:78,align:"middle"},{key:"due",label:"\uB9C8\uAC10",width:78,align:"middle"},{key:"manager",label:"\uCC45\uC784\uC790",width:80,align:"middle"},{key:"priority",label:"\uC911\uC694\uB3C4",width:60,align:"middle"},{key:"project",label:"\uD504\uB85C\uC81D\uD2B8",width:100,align:"middle"}],vi=Yo.reduce((e,f,g)=>(e.push(g===0?wo:e[g-1]+Yo[g-1].width),e),[]);function M7(e){let f=[],g=[],l=Og+Es,o=0,s=(r,t)=>{f.push(g),g=[],l=Ag+Es,r&&(g.push({kind:"group",label:r,count:t,continued:!0}),l+=Ms)};for(let r of e){r.label&&(l+Ms+wi>od&&s("",0),g.push({kind:"group",label:r.label,count:r.rows.length,continued:!1}),l+=Ms);for(let t of r.rows){l+wi>od&&s(r.label,r.rows.length),o+=1,g.push({kind:"row",completed:t.completed,values:Yo.map(n=>{switch(n.key){case"no":return String(o);case"title":return t.title;case"status":return t.statusName;case"project":return t.projectLabel||"\uAE30\uBCF8";case"manager":return t.managerName||"-";case"start":return t.startDate;case"due":return t.dueDate;default:return t.priorityName||"-"}})}),l+=wi;for(let n of t.checklistItems)n.label&&(l+Go>od&&s(r.label,r.rows.length),g.push({kind:"check",label:n.label,checked:n.checked,managerName:n.managerName,dueDate:n.dueDate}),l+=Go)}}return f.push(g),f.filter((r,t)=>t===0||r.length>0)}function R7(e,f){let g=[],l=[],o=(r,t,n)=>{vi.slice(1).forEach((c,i)=>{let a=i+1;n(a)||l.push(`<line x1="${c}" y1="${r}" x2="${c}" y2="${r+t}" class="vline" />`)})};g.push(`<rect x="${wo}" y="${f}" width="${za-wo}" height="${Es}" class="head" />`),Yo.forEach((r,t)=>{let n=vi[t],c=r.align==="middle"?n+r.width/2:n+xi;g.push(`<text x="${c}" y="${f+Es-7}" class="th" text-anchor="${r.align}">${Nt(r.label)}</text>`)}),o(f,Es,()=>!1);let s=f+Es;for(let r of e){if(r.kind==="group"){g.push(`<rect x="${wo}" y="${s}" width="${za-wo}" height="${Ms}" class="group" />`,`<text x="${wo+xi}" y="${s+Ms-7}" class="gt">${Nt(`${r.continued?`${r.label} (\uC774\uC5B4\uC11C)`:r.label} (${r.count})`)}</text>`),s+=Ms;continue}if(r.kind==="check"){let t=vi[1]+xi+10,n=vi[4]-vi[1],c=r.checked?"ck done":"ck";g.push(`<text x="${t}" y="${s+Go-5}" class="${c}">${Nt(`${r.checked?"\u2713":"\u25CB"} ${vo(r.label,n-xi*2-22,9)}`)}</text>`),r.dueDate&&g.push(`<text x="${vi[4]+Yo[4].width/2}" y="${s+Go-5}" class="${c}" text-anchor="middle">${Nt(vo(r.dueDate,Yo[4].width-xi*2,9))}</text>`),r.managerName&&g.push(`<text x="${vi[5]+Yo[5].width/2}" y="${s+Go-5}" class="${c}" text-anchor="middle">${Nt(vo(r.managerName,Yo[5].width-xi*2,9))}</text>`),g.push(`<line x1="${wo}" y1="${s+Go}" x2="${za}" y2="${s+Go}" class="hline" />`),o(s,Go,i=>i>=2&&i<=3),s+=Go;continue}Yo.forEach((t,n)=>{let c=vi[n],i=t.align==="middle"?c+t.width/2:c+xi;g.push(`<text x="${i}" y="${s+wi-6}" class="${r.completed?"td done":"td"}" text-anchor="${t.align}">${Nt(vo(r.values[n]??"",t.width-xi*2,9))}</text>`)}),g.push(`<line x1="${wo}" y1="${s+wi}" x2="${za}" y2="${s+wi}" class="hline" />`),o(s,wi,()=>!1),s+=wi}return g.push(...l),g.push(`<rect x="${wo}" y="${f}" width="${za-wo}" height="${s-f}" class="frame" />`),g.join("")}async function O7(e,f){let g=M7(f),l=f.reduce((o,s)=>o+s.rows.length,0);return g.map((o,s)=>{let r=s===0?Og:Ag,t=[s===0?Vo(e,`\uC804\uCCB4 ${l}\uAC74`,id):"",R7(o,r)].join("");return Ko({width:id,height:Rg,body:t,pageIndex:s,pageCount:g.length})})}var ad=Da,Dg=Pa,_o=Kr,Ic=ad-Kr,A7=Dg-46,Pg=22,D7=68,P7=(Ic-_o)/2,N7=14,sd=58;function Rs(e){switch(e.kind){case"title":return 34;case"props":return Math.ceil(e.pairs.length/2)*Pg+10;case"section":return 26;default:return N7}}function L7(e){let f=[{kind:"title",text:e.title,ticket:e.ticketNo}];return f.push({kind:"props",pairs:e.properties}),f.push({kind:"section",text:"\uB0B4\uC6A9"}),(e.content.trim()?e.content.split(`
50
- `).flatMap(l=>l.trim()?Is(l,sd):[""]):["(\uB0B4\uC6A9 \uC5C6\uC74C)"]).forEach(l=>f.push({kind:"line",text:l,muted:!e.content.trim()})),e.checklist.length>0&&(f.push({kind:"section",text:`\uD560\uC77C (${e.checklist.filter(l=>l.checked).length}/${e.checklist.length})`}),e.checklist.forEach(l=>{Is(l.label,sd-3).forEach((o,s)=>f.push({kind:s===0?"check":"line",text:o,checked:l.checked}))})),e.includeComments&&e.comments.length>0&&(f.push({kind:"section",text:`\uB313\uAE00 (${e.comments.length})`}),e.comments.forEach(l=>{f.push({kind:"line",text:`${l.author} \xB7 ${l.time}`,muted:!0}),Is(l.text,sd).forEach(o=>f.push({kind:"line",text:o}))})),f}function z7(e){let f=[],g=[],l=Pn;for(let o of e){let s=Rs(o);l+s>A7&&(f.push(g),g=[],l=kn),g.push(o),l+=s}return f.push(g),f}function j7(e,f){switch(e.kind){case"title":{let g=e.ticket?`<text x="${Ic}" y="${f+16}" class="doc-meta" text-anchor="end">${Nt(e.ticket)}</text>`:"";return{markup:`<text x="${_o}" y="${f+16}" class="section" style="font-size:14px">${Nt(e.text)}</text>${g}<line x1="${_o}" y1="${f+24}" x2="${Ic}" y2="${f+24}" class="hline" />`,nextY:f+Rs(e)}}case"props":{let g=[];return e.pairs.forEach((l,o)=>{let s=o%2,r=Math.floor(o/2),t=_o+s*P7,n=f+r*Pg;g.push(`<text x="${t}" y="${n+14}" class="label">${Nt(l.label)}</text>`,`<text x="${t+D7}" y="${n+14}" class="value">${Nt(Is(l.value||"-",26)[0]??"-")}</text>`)}),{markup:g.join(""),nextY:f+Rs(e)}}case"section":return{markup:`<text x="${_o}" y="${f+16}" class="section">${Nt(e.text)}</text><line x1="${_o}" y1="${f+21}" x2="${Ic}" y2="${f+21}" class="hline" />`,nextY:f+Rs(e)};case"check":return{markup:`<text x="${_o}" y="${f+10}" class="td">${e.checked?"\u2611":"\u2610"}</text><text x="${_o+14}" y="${f+10}" class="${e.checked?"td done":"td"}">${Nt(e.text)}</text>`,nextY:f+Rs(e)};default:return{markup:`<text x="${_o}" y="${f+10}" class="${e.muted?"td done":"td"}">${Nt(e.text)}</text>`,nextY:f+Rs(e)}}}async function F7(e,f){let g=z7(L7(f));return g.map((l,o)=>{let s=o===0?Pn:kn,r=[o===0?Vo(e,"",ad):`<text x="${_o}" y="${kn-12}" class="doc-meta">${Nt(`${f.title} (\uC774\uC5B4\uC11C)`)}</text>`];for(let t of l){let n=j7(t,s);r.push(n.markup),s=n.nextY}return Ko({width:ad,height:Dg,body:r.join(""),pageIndex:o,pageCount:g.length})})}var cd=Na,zg=La,Ec=Kr,ja=cd-Kr,Ng=zg-46,Lg=210,_i=20,ld=24;function ki(e){if(!/^\d{4}-\d{2}-\d{2}$/.test(e))return null;let f=new Date(`${e}T00:00:00`);return Number.isNaN(f.getTime())?null:f}function jg(e,f){return Math.round((f.getTime()-e.getTime())/864e5)}function q7(e,f){let g=[];e.forEach(r=>{let t=ki(r.startDate),n=ki(r.dueDate);t&&g.push(t),n&&g.push(n)});let l=ki(f)??new Date;if(g.length===0)return{start:l,days:30};let o=new Date(Math.min(...g.map(r=>r.getTime()))),s=new Date(Math.max(...g.map(r=>r.getTime())));return o.setDate(o.getDate()-1),s.setDate(s.getDate()+1),{start:o,days:Math.max(7,jg(o,s)+1)}}async function $7(e,f,g){let l=q7(f,g),o=Ec+Lg,r=(ja-o)/l.days,t=ki(g),n=d=>o+jg(l.start,d)*r,c=Math.max(1,Math.floor((Ng-Pn-ld)/_i)),i=Math.max(1,Math.floor((Ng-kn-ld)/_i)),a=[],h=0;for(;h<f.length||a.length===0;){let d=a.length===0?c:i;if(a.push(f.slice(h,h+d)),h+=d,h>=f.length)break}return a.map((d,u)=>{let b=u===0?Pn:kn,m=[u===0?Vo(e,`\uC804\uCCB4 ${f.length}\uAC74`,cd):""],x=b+ld;m.push(`<line x1="${Ec}" y1="${x}" x2="${ja}" y2="${x}" 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="${x}" x2="${R}" y2="${x+d.length*_i}" class="hline" />`,`<text x="${R+2}" y="${x-6}" class="label">${B.getMonth()+1}.${B.getDate()}</text>`)}if(t&&t>=l.start){let k=n(t);k>=o&&k<=ja&&m.push(`<line x1="${k}" y1="${x}" x2="${k}" y2="${x+d.length*_i}" stroke="#f87171" stroke-width="0.8" />`)}return d.forEach((k,B)=>{let R=x+B*_i,j=vo(k.title,Lg-64,9);m.push(`<text x="${Ec}" y="${R+14}" class="${k.completed?"td done":"td"}">${Nt(j)}</text>`,`<text x="${o-6}" y="${R+14}" class="label" text-anchor="end">${Nt(k.managerName)}</text>`,`<line x1="${Ec}" y1="${R+_i}" x2="${ja}" y2="${R+_i}" class="hline" />`);let A=ki(k.startDate)??ki(k.dueDate),P=ki(k.dueDate)??ki(k.startDate);if(!A||!P)return;let N=n(A),q=Math.max(N+r*.8,n(P)+r*.8),z=k.completed?"bar done":k.overdue?"bar overdue":"bar";m.push(`<rect x="${N}" y="${R+5}" width="${Math.max(3,Math.min(q,ja)-N)}" height="${_i-10}" rx="2" class="${z}" />`)}),Ko({width:cd,height:zg,body:m.join(""),pageIndex:u,pageCount:a.length})})}function H7(e,f,g,l){return{title:e.title,managerName:e.managerName,startDate:String(f??"").slice(0,10),dueDate:String(g??"").slice(0,10),completed:e.completed,overdue:!e.completed&&!!g&&String(g).slice(0,10)<l}}var ud=Da,qg=Pa,Os=Kr,Mc=ud-Kr,Fg=qg-46,As=30,Ds=18,$g=12;function W7(e){let f=[],g=[],l=Pn,o=(s,r)=>{f.push(g),g=[],l=kn,s&&(g.push({kind:"column",label:s,summary:r,continued:!0,gapBefore:!1}),l+=As)};for(let s of e){let r=g.length>0,t=r?$g:0;if(l+t+As+Ds>Fg?(o("",""),g.push({kind:"column",label:s.label,summary:s.summary,continued:!1,gapBefore:!1}),l+=As):(g.push({kind:"column",label:s.label,summary:s.summary,continued:!1,gapBefore:r}),l+=t+As),s.items.length===0){g.push({kind:"empty"}),l+=Ds;continue}for(let n of s.items)l+Ds>Fg&&o(s.label,s.summary),g.push({kind:"item",title:n.title,meta:n.meta,completed:n.completed}),l+=Ds}return f.push(g),f}async function U7(e,f,g){let l=W7(f);return l.map((o,s)=>{let r=s===0?Pn:kn,t=[s===0?Vo(e,g,ud):""];for(let n of o){if(n.kind==="column"){n.gapBefore&&(r+=$g),t.push(`<rect x="${Os}" y="${r}" width="${Mc-Os}" height="${As-6}" class="group" />`,`<text x="${Os+6}" y="${r+16}" class="gt">${Nt(n.continued?`${n.label} (\uC774\uC5B4\uC11C)`:n.label)}</text>`,`<text x="${Mc-6}" y="${r+16}" class="label" text-anchor="end">${Nt(n.summary)}</text>`),r+=As;continue}if(n.kind==="empty"){t.push(`<text x="${Os+12}" y="${r+12}" class="td done">(\uC5C5\uBB34 \uC5C6\uC74C)</text>`),r+=Ds;continue}t.push(`<text x="${Os+12}" y="${r+12}" class="${n.completed?"td done":"td"}">${Nt(vo(n.title,Mc-Os-12-120,9))}</text>`,`<text x="${Mc-6}" y="${r+12}" class="label" text-anchor="end">${Nt(n.meta)}</text>`),r+=Ds}return Ko({width:ud,height:qg,body:t.join(""),pageIndex:s,pageCount:l.length})})}var V7=[{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}],K7="FFEEF2F7",Rc="FFCBD5E1";function G7(e){return e.replace(/[\\/:*?"<>|]/g,"_").trim()||"\uC5C5\uBB34\uBAA9\uB85D"}async function Y7(e,f){let g=await Promise.resolve().then(()=>Jg(Wg(),1)),l=new g.Workbook,o=l.addWorksheet("\uC5C5\uBB34\uBAA9\uB85D",{pageSetup:{paperSize:9,orientation:"landscape",fitToPage:!0,fitToWidth:1,fitToHeight:0}});o.columns=V7.map(i=>({header:i.header,width:i.width})),o.spliceRows(1,0,[`${e.documentTitle}`],[`${e.subtitle} \xB7 ${e.facilityName} \xB7 \uCD9C\uB825 ${Bs(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:K7}},i.alignment={vertical:"middle",horizontal:"center"}}),f.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:Rc}},left:{style:"thin",color:{argb:Rc}},bottom:{style:"thin",color:{argb:Rc}},right:{style:"thin",color:{argb:Rc}}}});o.views=[{state:"frozen",ySplit:3}];let t=await l.xlsx.writeBuffer(),n=new Blob([t],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),c=Bs(e.printedAt).replace(/[: ]/g,"").slice(0,13);return{blob:n,fileName:`${G7(e.documentTitle)}_${c}.xlsx`}}function X7(e){return String(e??"").replace(/<br\s*\/?>(?=.)/gi,`
49
+ .ck.done{fill:#94a3b8;}`,".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: ${Aa}; stroke-width: 0.5; }`,`.group { fill: #f8fafc; stroke: ${Aa}; stroke-width: 0.5; }`,`.frame { fill: none; stroke: ${Aa}; stroke-width: 0.5; }`,`.hline { stroke: ${Aa}; stroke-width: 0.5; }`,`.vline { stroke: ${Aa}; 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 Vo(e,f,g){let l=g-Kr;return[`<text x="${Kr}" y="46" class="doc-title">${Nt(e.documentTitle)}</text>`,`<text x="${Kr}" y="66" class="doc-sub">${Nt(e.subtitle)}</text>`,`<text x="${l}" y="42" class="doc-meta" text-anchor="end">${Nt(e.facilityName)}</text>`,`<text x="${l}" y="58" class="doc-meta" text-anchor="end">\uCD9C\uB825 ${Nt(Bs(e.printedAt))}${e.printedBy?` \xB7 ${Nt(e.printedBy)}`:""}</text>`,f?`<text x="${l}" y="74" class="doc-meta" text-anchor="end">${Nt(f)}</text>`:""].join("")}function Ko(e){let{width:f,height:g,body:l,pageIndex:o,pageCount:s}=e;return[`<svg xmlns="http://www.w3.org/2000/svg" width="${f}" height="${g}" viewBox="0 0 ${f} ${g}">`,`<style>${D7}</style>`,`<rect x="0" y="0" width="${f}" height="${g}" fill="#ffffff" />`,l,`<text x="${f/2}" y="${g-22}" class="pageno" text-anchor="middle">${o+1} / ${s}</text>`,"</svg>"].join("")}var id=Na,Og=La,wo=Kr,za=id-Kr,Es=22,wi=20,Ms=22,Go=18,xi=5,Ag=Pn,Dg=kn,od=Og-46,Yo=[{key:"no",label:"\uBC88\uD638",width:30,align:"middle"},{key:"title",label:"\uC81C\uBAA9",width:300,align:"start"},{key:"status",label:"\uC0C1\uD0DC",width:60,align:"middle"},{key:"start",label:"\uC2DC\uC791",width:78,align:"middle"},{key:"due",label:"\uB9C8\uAC10",width:78,align:"middle"},{key:"manager",label:"\uCC45\uC784\uC790",width:80,align:"middle"},{key:"priority",label:"\uC911\uC694\uB3C4",width:60,align:"middle"},{key:"project",label:"\uD504\uB85C\uC81D\uD2B8",width:100,align:"middle"}],vi=Yo.reduce((e,f,g)=>(e.push(g===0?wo:e[g-1]+Yo[g-1].width),e),[]);function P7(e){let f=[],g=[],l=Ag+Es,o=0,s=(r,t)=>{f.push(g),g=[],l=Dg+Es,r&&(g.push({kind:"group",label:r,count:t,continued:!0}),l+=Ms)};for(let r of e){r.label&&(l+Ms+wi>od&&s("",0),g.push({kind:"group",label:r.label,count:r.rows.length,continued:!1}),l+=Ms);for(let t of r.rows){l+wi>od&&s(r.label,r.rows.length),o+=1,g.push({kind:"row",completed:t.completed,values:Yo.map(n=>{switch(n.key){case"no":return String(o);case"title":return t.title;case"status":return t.statusName;case"project":return t.projectLabel||"\uAE30\uBCF8";case"manager":return t.managerName||"-";case"start":return t.startDate;case"due":return t.dueDate;default:return t.priorityName||"-"}})}),l+=wi;for(let n of t.checklistItems)n.label&&(l+Go>od&&s(r.label,r.rows.length),g.push({kind:"check",label:n.label,checked:n.checked,managerName:n.managerName,dueDate:n.dueDate}),l+=Go)}}return f.push(g),f.filter((r,t)=>t===0||r.length>0)}function N7(e,f){let g=[],l=[],o=(r,t,n)=>{vi.slice(1).forEach((c,i)=>{let a=i+1;n(a)||l.push(`<line x1="${c}" y1="${r}" x2="${c}" y2="${r+t}" class="vline" />`)})};g.push(`<rect x="${wo}" y="${f}" width="${za-wo}" height="${Es}" class="head" />`),Yo.forEach((r,t)=>{let n=vi[t],c=r.align==="middle"?n+r.width/2:n+xi;g.push(`<text x="${c}" y="${f+Es-7}" class="th" text-anchor="${r.align}">${Nt(r.label)}</text>`)}),o(f,Es,()=>!1);let s=f+Es;for(let r of e){if(r.kind==="group"){g.push(`<rect x="${wo}" y="${s}" width="${za-wo}" height="${Ms}" class="group" />`,`<text x="${wo+xi}" y="${s+Ms-7}" class="gt">${Nt(`${r.continued?`${r.label} (\uC774\uC5B4\uC11C)`:r.label} (${r.count})`)}</text>`),s+=Ms;continue}if(r.kind==="check"){let t=vi[1]+xi+10,n=vi[4]-vi[1],c=r.checked?"ck done":"ck";g.push(`<text x="${t}" y="${s+Go-5}" class="${c}">${Nt(`${r.checked?"\u2713":"\u25CB"} ${vo(r.label,n-xi*2-22,9)}`)}</text>`),r.dueDate&&g.push(`<text x="${vi[4]+Yo[4].width/2}" y="${s+Go-5}" class="${c}" text-anchor="middle">${Nt(vo(r.dueDate,Yo[4].width-xi*2,9))}</text>`),r.managerName&&g.push(`<text x="${vi[5]+Yo[5].width/2}" y="${s+Go-5}" class="${c}" text-anchor="middle">${Nt(vo(r.managerName,Yo[5].width-xi*2,9))}</text>`),g.push(`<line x1="${wo}" y1="${s+Go}" x2="${za}" y2="${s+Go}" class="hline" />`),o(s,Go,i=>i>=2&&i<=3),s+=Go;continue}Yo.forEach((t,n)=>{let c=vi[n],i=t.align==="middle"?c+t.width/2:c+xi;g.push(`<text x="${i}" y="${s+wi-6}" class="${r.completed?"td done":"td"}" text-anchor="${t.align}">${Nt(vo(r.values[n]??"",t.width-xi*2,9))}</text>`)}),g.push(`<line x1="${wo}" y1="${s+wi}" x2="${za}" y2="${s+wi}" class="hline" />`),o(s,wi,()=>!1),s+=wi}return g.push(...l),g.push(`<rect x="${wo}" y="${f}" width="${za-wo}" height="${s-f}" class="frame" />`),g.join("")}async function L7(e,f){let g=P7(f),l=f.reduce((o,s)=>o+s.rows.length,0);return g.map((o,s)=>{let r=s===0?Ag:Dg,t=[s===0?Vo(e,`\uC804\uCCB4 ${l}\uAC74`,id):"",N7(o,r)].join("");return Ko({width:id,height:Og,body:t,pageIndex:s,pageCount:g.length})})}var ad=Da,Pg=Pa,_o=Kr,Ic=ad-Kr,z7=Pg-46,Ng=22,j7=68,F7=(Ic-_o)/2,q7=14,sd=58;function Rs(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 q7}}function $7(e){let f=[{kind:"title",text:e.title,ticket:e.ticketNo}];return f.push({kind:"props",pairs:e.properties}),f.push({kind:"section",text:"\uB0B4\uC6A9"}),(e.content.trim()?e.content.split(`
50
+ `).flatMap(l=>l.trim()?Is(l,sd):[""]):["(\uB0B4\uC6A9 \uC5C6\uC74C)"]).forEach(l=>f.push({kind:"line",text:l,muted:!e.content.trim()})),e.checklist.length>0&&(f.push({kind:"section",text:`\uD560\uC77C (${e.checklist.filter(l=>l.checked).length}/${e.checklist.length})`}),e.checklist.forEach(l=>{Is(l.label,sd-3).forEach((o,s)=>f.push({kind:s===0?"check":"line",text:o,checked:l.checked}))})),e.includeComments&&e.comments.length>0&&(f.push({kind:"section",text:`\uB313\uAE00 (${e.comments.length})`}),e.comments.forEach(l=>{f.push({kind:"line",text:`${l.author} \xB7 ${l.time}`,muted:!0}),Is(l.text,sd).forEach(o=>f.push({kind:"line",text:o}))})),f}function H7(e){let f=[],g=[],l=Pn;for(let o of e){let s=Rs(o);l+s>z7&&(f.push(g),g=[],l=kn),g.push(o),l+=s}return f.push(g),f}function W7(e,f){switch(e.kind){case"title":{let g=e.ticket?`<text x="${Ic}" y="${f+16}" class="doc-meta" text-anchor="end">${Nt(e.ticket)}</text>`:"";return{markup:`<text x="${_o}" y="${f+16}" class="section" style="font-size:14px">${Nt(e.text)}</text>${g}<line x1="${_o}" y1="${f+24}" x2="${Ic}" y2="${f+24}" class="hline" />`,nextY:f+Rs(e)}}case"props":{let g=[];return e.pairs.forEach((l,o)=>{let s=o%2,r=Math.floor(o/2),t=_o+s*F7,n=f+r*Ng;g.push(`<text x="${t}" y="${n+14}" class="label">${Nt(l.label)}</text>`,`<text x="${t+j7}" y="${n+14}" class="value">${Nt(Is(l.value||"-",26)[0]??"-")}</text>`)}),{markup:g.join(""),nextY:f+Rs(e)}}case"section":return{markup:`<text x="${_o}" y="${f+16}" class="section">${Nt(e.text)}</text><line x1="${_o}" y1="${f+21}" x2="${Ic}" y2="${f+21}" class="hline" />`,nextY:f+Rs(e)};case"check":return{markup:`<text x="${_o}" y="${f+10}" class="td">${e.checked?"\u2611":"\u2610"}</text><text x="${_o+14}" y="${f+10}" class="${e.checked?"td done":"td"}">${Nt(e.text)}</text>`,nextY:f+Rs(e)};default:return{markup:`<text x="${_o}" y="${f+10}" class="${e.muted?"td done":"td"}">${Nt(e.text)}</text>`,nextY:f+Rs(e)}}}async function U7(e,f){let g=H7($7(f));return g.map((l,o)=>{let s=o===0?Pn:kn,r=[o===0?Vo(e,"",ad):`<text x="${_o}" y="${kn-12}" class="doc-meta">${Nt(`${f.title} (\uC774\uC5B4\uC11C)`)}</text>`];for(let t of l){let n=W7(t,s);r.push(n.markup),s=n.nextY}return Ko({width:ad,height:Pg,body:r.join(""),pageIndex:o,pageCount:g.length})})}var cd=Na,jg=La,Ec=Kr,ja=cd-Kr,Lg=jg-46,zg=210,_i=20,ld=24;function ki(e){if(!/^\d{4}-\d{2}-\d{2}$/.test(e))return null;let f=new Date(`${e}T00:00:00`);return Number.isNaN(f.getTime())?null:f}function Fg(e,f){return Math.round((f.getTime()-e.getTime())/864e5)}function V7(e,f){let g=[];e.forEach(r=>{let t=ki(r.startDate),n=ki(r.dueDate);t&&g.push(t),n&&g.push(n)});let l=ki(f)??new Date;if(g.length===0)return{start:l,days:30};let o=new Date(Math.min(...g.map(r=>r.getTime()))),s=new Date(Math.max(...g.map(r=>r.getTime())));return o.setDate(o.getDate()-1),s.setDate(s.getDate()+1),{start:o,days:Math.max(7,Fg(o,s)+1)}}async function K7(e,f,g){let l=V7(f,g),o=Ec+zg,r=(ja-o)/l.days,t=ki(g),n=d=>o+Fg(l.start,d)*r,c=Math.max(1,Math.floor((Lg-Pn-ld)/_i)),i=Math.max(1,Math.floor((Lg-kn-ld)/_i)),a=[],h=0;for(;h<f.length||a.length===0;){let d=a.length===0?c:i;if(a.push(f.slice(h,h+d)),h+=d,h>=f.length)break}return a.map((d,u)=>{let b=u===0?Pn:kn,m=[u===0?Vo(e,`\uC804\uCCB4 ${f.length}\uAC74`,cd):""],x=b+ld;m.push(`<line x1="${Ec}" y1="${x}" x2="${ja}" y2="${x}" 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="${x}" x2="${R}" y2="${x+d.length*_i}" class="hline" />`,`<text x="${R+2}" y="${x-6}" class="label">${B.getMonth()+1}.${B.getDate()}</text>`)}if(t&&t>=l.start){let k=n(t);k>=o&&k<=ja&&m.push(`<line x1="${k}" y1="${x}" x2="${k}" y2="${x+d.length*_i}" stroke="#f87171" stroke-width="0.8" />`)}return d.forEach((k,B)=>{let R=x+B*_i,j=vo(k.title,zg-64,9);m.push(`<text x="${Ec}" y="${R+14}" class="${k.completed?"td done":"td"}">${Nt(j)}</text>`,`<text x="${o-6}" y="${R+14}" class="label" text-anchor="end">${Nt(k.managerName)}</text>`,`<line x1="${Ec}" y1="${R+_i}" x2="${ja}" y2="${R+_i}" class="hline" />`);let A=ki(k.startDate)??ki(k.dueDate),P=ki(k.dueDate)??ki(k.startDate);if(!A||!P)return;let N=n(A),q=Math.max(N+r*.8,n(P)+r*.8),z=k.completed?"bar done":k.overdue?"bar overdue":"bar";m.push(`<rect x="${N}" y="${R+5}" width="${Math.max(3,Math.min(q,ja)-N)}" height="${_i-10}" rx="2" class="${z}" />`)}),Ko({width:cd,height:jg,body:m.join(""),pageIndex:u,pageCount:a.length})})}function G7(e,f,g,l){return{title:e.title,managerName:e.managerName,startDate:String(f??"").slice(0,10),dueDate:String(g??"").slice(0,10),completed:e.completed,overdue:!e.completed&&!!g&&String(g).slice(0,10)<l}}var ud=Da,$g=Pa,Os=Kr,Mc=ud-Kr,qg=$g-46,As=30,Ds=18,Hg=12;function Y7(e){let f=[],g=[],l=Pn,o=(s,r)=>{f.push(g),g=[],l=kn,s&&(g.push({kind:"column",label:s,summary:r,continued:!0,gapBefore:!1}),l+=As)};for(let s of e){let r=g.length>0,t=r?Hg:0;if(l+t+As+Ds>qg?(o("",""),g.push({kind:"column",label:s.label,summary:s.summary,continued:!1,gapBefore:!1}),l+=As):(g.push({kind:"column",label:s.label,summary:s.summary,continued:!1,gapBefore:r}),l+=t+As),s.items.length===0){g.push({kind:"empty"}),l+=Ds;continue}for(let n of s.items)l+Ds>qg&&o(s.label,s.summary),g.push({kind:"item",title:n.title,meta:n.meta,completed:n.completed}),l+=Ds}return f.push(g),f}async function X7(e,f,g){let l=Y7(f);return l.map((o,s)=>{let r=s===0?Pn:kn,t=[s===0?Vo(e,g,ud):""];for(let n of o){if(n.kind==="column"){n.gapBefore&&(r+=Hg),t.push(`<rect x="${Os}" y="${r}" width="${Mc-Os}" height="${As-6}" class="group" />`,`<text x="${Os+6}" y="${r+16}" class="gt">${Nt(n.continued?`${n.label} (\uC774\uC5B4\uC11C)`:n.label)}</text>`,`<text x="${Mc-6}" y="${r+16}" class="label" text-anchor="end">${Nt(n.summary)}</text>`),r+=As;continue}if(n.kind==="empty"){t.push(`<text x="${Os+12}" y="${r+12}" class="td done">(\uC5C5\uBB34 \uC5C6\uC74C)</text>`),r+=Ds;continue}t.push(`<text x="${Os+12}" y="${r+12}" class="${n.completed?"td done":"td"}">${Nt(vo(n.title,Mc-Os-12-120,9))}</text>`,`<text x="${Mc-6}" y="${r+12}" class="label" text-anchor="end">${Nt(n.meta)}</text>`),r+=Ds}return Ko({width:ud,height:$g,body:t.join(""),pageIndex:s,pageCount:l.length})})}var Z7=[{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}],J7="FFEEF2F7",Rc="FFCBD5E1";function Q7(e){return e.replace(/[\\/:*?"<>|]/g,"_").trim()||"\uC5C5\uBB34\uBAA9\uB85D"}async function eC(e,f){let g=await Promise.resolve().then(()=>Qg(Ug(),1)),l=new g.Workbook,o=l.addWorksheet("\uC5C5\uBB34\uBAA9\uB85D",{pageSetup:{paperSize:9,orientation:"landscape",fitToPage:!0,fitToWidth:1,fitToHeight:0}});o.columns=Z7.map(i=>({header:i.header,width:i.width})),o.spliceRows(1,0,[`${e.documentTitle}`],[`${e.subtitle} \xB7 ${e.facilityName} \xB7 \uCD9C\uB825 ${Bs(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:J7}},i.alignment={vertical:"middle",horizontal:"center"}}),f.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:Rc}},left:{style:"thin",color:{argb:Rc}},bottom:{style:"thin",color:{argb:Rc}},right:{style:"thin",color:{argb:Rc}}}});o.views=[{state:"frozen",ySplit:3}];let t=await l.xlsx.writeBuffer(),n=new Blob([t],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),c=Bs(e.printedAt).replace(/[: ]/g,"").slice(0,13);return{blob:n,fileName:`${Q7(e.documentTitle)}_${c}.xlsx`}}function tC(e){return String(e??"").replace(/<br\s*\/?>(?=.)/gi,`
51
51
  `).replace(/<\/(p|div|li|h[1-6])>/gi,`
52
- `).replace(/<[^>]+>/g,"").replace(/&nbsp;/g," ").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&")}function Z7(e,f){let g=nd(e,f);return{title:g.title,ticketNo:String(e.ticket_no??"").trim(),properties:[{label:"\uC0C1\uD0DC",value:g.statusName},{label:"\uD504\uB85C\uC81D\uD2B8",value:g.projectLabel||"\uAE30\uBCF8"},{label:"\uCC45\uC784\uC790",value:g.managerName},{label:"\uCC38\uC870\uC790",value:g.receiverNamesFull},{label:"\uC2DC\uC791\uC77C\uC2DC",value:g.startDate},{label:"\uB9C8\uAC10\uC608\uC815",value:g.dueDate},{label:"\uC911\uC694\uB3C4",value:g.priorityName},{label:"\uC791\uC131\uC790",value:String(e.created_by??"")}],content:X7(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{wE as ALL_TASK_VIEWER_ACCOUNT_SEQS,Up as AddLabelDialog,pl as AddTabDialog,qp as AttachmentUploadGauge,tf as AttachmentUploadPercent,qc as BUG_DEVICE_OPTIONS,ox as BUG_GROUP_KEY,js as BUG_ICON_COLOR,TI as BUG_KANBAN_COLUMNS,Fc as BUG_REPRO_OPTIONS,$c as BUG_RESOLUTION_OPTIONS,Si as BUG_STATUS_OPTIONS,zs as BUG_TASK_ICON,Pl as BugPropertiesGrid,jd as COLUMN_WIDTHS,Fs as COMPLETED_STATUS_OPTION,kn as CONT_BODY_TOP,If as CUSTOM_TAB_KEY_PREFIX,DW as CalendarLinkDialog,nn as ChartEmptyMessage,ri as CommentBubbleIcon,Zi as ConfirmCountButton,m0 as CumulativeFlowChart,fh as DATE_REMINDER_OPTIONS,o3 as DEFAULT_COMPACT_COLUMNS,Dc as DEFAULT_PROJECT_ICON,bK as DEFAULT_TASKBOX_TAB_ITEMS,So as DEFAULT_TASK_ICON,ko as DEFAULT_WORKLOAD_CAPACITY,Uu as DRAWER_SECTION_TITLE_FONT_SIZE,nK as DateRangeFilterPopover,Mn as DrawerSection,Bn as DueDatePickerPopover,Xy as ENDED_EVENT_STATUS_OPTION,tm as EVENT_ICON_COLOR,yr as EVENT_TASK_ICON,HW as EmployeeSelectDialog,Pn as FIRST_BODY_TOP,Vc as GROUP_BY_OPTIONS,ss as GoogleEventChip,KV as GroupByMenuButton,hl as IconPickerGrid,kp as InlineAddressInput,Lo as InlineTextValue,Wc as KANBAN_CLOSED_COLUMN_KEY,La as LANDSCAPE_HEIGHT,Na as LANDSCAPE_WIDTH,rG as LabelFilterMenu,Yl as LabelSelectMenu,x0 as LeadTimeDistributionChart,sm as LinkifiedText,$s as MANUAL_TASK_STATUS_OPTIONS,Kr as MARGIN_X,jV as MemberFilterMenu,nx as NOTICE_GROUP_KEY,qs as NOTICE_STATUS_OPTIONS,pr as NOTICE_TASK_ICON,Td as NO_TASK_ICON,Pa as PORTRAIT_HEIGHT,Da as PORTRAIT_WIDTH,Pc as PROJECT_ICON_OPTIONS,vt as PropertyRow,Xi as RECEIVER_AVATAR_COLORS,dh as REMINDER_OPTIONS,ei as REVIEW_DONE_BUTTON_SX,Jr as ReceiverAvatarStack,Im as RelatedTasksSection,Q7 as STATUS_KEY_REPLIED,md as STATUS_KEY_WAITING,ix as SUPPORT_GROUP_KEY,SG as ShortcutHelpDialog,_h as SortableTaskCard,a0 as SprintBurndownChart,DV as SprintChartsDialog,qm as SprintCloseDialog,cG as SprintFilterMenu,SW as SprintManageDialog,o0 as SprintVelocityChart,Gi as StatusSelectMenu,Qa as TASKBOX_COLUMNS,Hn as TASKBOX_DRAWER_NARROW_MQ,yG as TASKBOX_SHORTCUT_HELP,Cd as TASKBOX_UI_STATE_ID,J0 as TASKBOX_VIEW_LABELS,QD as TASKBOX_VIEW_MODES,mu as TASK_CARD_DRAG_HANDLE_CLASS,na as TASK_REPEAT_RULE_OPTIONS,gn as TASK_STATUS_OPTIONS,R2 as TIME_REMINDER_OPTIONS,gl as TaskAckListPopover,eo as TaskActionButton,ec as TaskActivityDialog,Kl as TaskAttachmentsSection,ap as TaskBoxColumnSummary,wN as TaskBoxCompactTable,_u as TaskBoxGroupBoard,VP as TaskBoxMobileList,Qh as TaskBoxMonthAgenda,Gh as TaskBoxMonthCalendar,hP as TaskBoxSprintColumnSummary,yh as TaskBoxTable,yK as TaskBoxTabs,ip as TaskBoxTimeline,JD as TaskBoxView,Hh as TaskBoxWeekCalendar,Ys as TaskCardContent,Hl as TaskChecklistSection,hm as TaskCommentInput,dm as TaskCommentsSection,Fl as TaskContentEditor,Ll as TaskContentTemplateMenu,km as TaskContentTranslateDialog,ZK as TaskContextMenu,Dl as TaskCorePropertiesGrid,af as TaskCreateBody,xF as TaskCreateDrawer,$0 as TaskDateRangeFilter,Nm as TaskDetailBody,QH as TaskDetailDrawer,ym as TaskDetailHeader,ni as TaskIconPickerPopover,Zo as TaskLabelChips,$l as TaskLinkDialog,Sm as TaskNoteField,Xr as TaskPriorityChip,hY as TaskRuleManageDialog,Lt as TaskStatusChip,AI as TaskStatusChips,DY as TaskTemplateManageDialog,WY as TaskTemplateRunDialog,ZG as TaskboxManualDialog,rb as TaskboxProvider,r0 as WorkloadCapacityDialog,C0 as WorkloadChart,R0 as WorkloadPersonTasks,O0 as WorkloadPersonTasksDialog,D0 as WorkloadTimelineGrid,yp as addDaysToDate,w0 as averageWorkload,bl as buildCardBaseSx,d0 as buildCumulativeFlow,h0 as buildLeadCycleDistribution,c3 as buildPlannedTask,Ad as buildStatusOptionColors,U7 as buildTaskColumnsPrintSvgPages,Z7 as buildTaskDetailPrintData,F7 as buildTaskDetailPrintSvgPages,Ja as buildTaskGroupSections,O7 as buildTaskListPrintSvgPages,Y7 as buildTaskListXlsx,mf as buildTaskRelationsModel,h4 as buildTaskShareText,$7 as buildTaskTimelinePrintSvgPages,Ca as buildTaskboxShortcutHelp,Ua as buildTaskboxTheme,xp as buildTemplateTasks,uc as buildWorkloadRows,_0 as buildWorkloadTimeline,Vd as canAssignBugManager,rl as canClaimTaskItem,Kd as canCompleteTaskItem,Vx as canDeleteTaskItem,Ux as canEditTaskCoreItem,Qn as canEditTaskItem,tl as canViewTaskItem,nl as canVolunteerTaskItem,vo as clampPrintText,Qo as coreEditLocked,gf as countTaskRelations,lp as countWorkdays,Vy as createTaskboxTheme,sp as daysLeftUntil,Ml as defaultRepeatUntil,Nc as defaultTaskBoxFormValues,Lc as defaultTaskboxUiStateValues,Ti as deleteLocked,Nt as escapePrintXml,Bc as estimatePrintTextWidth,Xp as filterFilesWithinLimit,JR as formatConfirmTime,sP as formatHours,Cn as formatKoreanDate,bn as formatKoreanDateTime,Qc as formatMonthDay,TN as formatOffsetLabel,Cc as formatPrintDate,Bs as formatPrintStamp,In as formatSprintOptionLabel,Rd as getBugDeviceName,Md as getBugReproName,Va as getBugResolutionName,Zy as getBugStatusOption,RH as getDefaultDateRange,Hs as getEventDisplayStatusOption,BI as getNoDueStatusRank,Yp as getNoticeAckInfo,Od as getNoticeStatusOption,kj as getNoticeTargetDisplay,ZB as getProjectIconAnchorComponent,Et as getProjectIconComponent,O2 as getReminderLabel,su as getReminderOptions,au as getRemindersLabel,El as getRepeatRuleLabel,Ya as getStatusOptionsForTask,dG as getTabHeaderConfig,el as getTaskBoxColumnDefs,qd as getTaskBoxGridMinWidth,Fd as getTaskBoxGridTemplate,yT as getTaskBoxTabKind,ts as getTaskConfirmInfo,xr as getTaskDisplayStatusOption,Ga as getTaskStatusOption,ns as groupGoogleEventsByDate,hi as groupSeqFromTabKey,r$ as hasRelation,Cm as hasTaskRelations,aa as htmlToPlainText,v6 as isCustomTabKey,u0 as isFlowTask,Ud as isOpenPoolTaskItem,dc as isOverCapacity,v0 as isOverloaded,Hc as isPastEvent,ol as isSupportOriginTaskItem,Ka as isTaskDone,CI as isWaitingTask,rc as monthsAgoDate,uo as narrowOrderSx,JH as nowDateTimeString,Lm as nowMinuteString,E_ as parseEstimatedHours,Df as parseTaskTimeMs,fc as pickPersonWorkloadTasks,Fi as relationsOf,Vo as renderPrintHeader,ro as resolveReminders,q8 as resolveRowCapacity,Ki as resolveTaskStatusOptions,jc as resolveTaskboxTheme,tC as resolveWorkloadCapacity,vN as selectDepartmentSharedTasks,ps as shareTaskText,aP as sumRemainingHours,Xl as summarizeNoticeTargets,fW as tabKeyFromGroupSeq,Ln as taskVisibilityOf,nd as toTaskPrintRow,H7 as toTimelinePrintRow,mo as toYmd,Xa as toggleLabelKey,dl as toggleReminder,Ns as useBuildFileUrl,Fp as useTaskAttachmentUploadMeta,ot as useTaskboxConfig,qy as useTaskboxForm,bG as useTaskboxShortcuts,lt as useTaskboxTheme,To as useTaskboxUiState,Ls as useUploadMaxMb,cr as wideColumnSx,il as withOriginAuthorAvatar,Ko as wrapPrintPage,Is as wrapPrintText};
52
+ `).replace(/<[^>]+>/g,"").replace(/&nbsp;/g," ").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&")}function rC(e,f){let g=nd(e,f);return{title:g.title,ticketNo:String(e.ticket_no??"").trim(),properties:[{label:"\uC0C1\uD0DC",value:g.statusName},{label:"\uD504\uB85C\uC81D\uD2B8",value:g.projectLabel||"\uAE30\uBCF8"},{label:"\uCC45\uC784\uC790",value:g.managerName},{label:"\uCC38\uC870\uC790",value:g.receiverNamesFull},{label:"\uC2DC\uC791\uC77C\uC2DC",value:g.startDate},{label:"\uB9C8\uAC10\uC608\uC815",value:g.dueDate},{label:"\uC911\uC694\uB3C4",value:g.priorityName},{label:"\uC791\uC131\uC790",value:String(e.created_by??"")}],content:tC(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{ME as ALL_TASK_VIEWER_ACCOUNT_SEQS,Vp as AddLabelDialog,pl as AddTabDialog,$p as AttachmentUploadGauge,tf as AttachmentUploadPercent,qc as BUG_DEVICE_OPTIONS,ix as BUG_GROUP_KEY,js as BUG_ICON_COLOR,MI as BUG_KANBAN_COLUMNS,Fc as BUG_REPRO_OPTIONS,$c as BUG_RESOLUTION_OPTIONS,Si as BUG_STATUS_OPTIONS,zs as BUG_TASK_ICON,Pl as BugPropertiesGrid,jd as COLUMN_WIDTHS,Fs as COMPLETED_STATUS_OPTION,kn as CONT_BODY_TOP,If as CUSTOM_TAB_KEY_PREFIX,HW as CalendarLinkDialog,nn as ChartEmptyMessage,ri as CommentBubbleIcon,Zi as ConfirmCountButton,g0 as CumulativeFlowChart,dh as DATE_REMINDER_OPTIONS,c3 as DEFAULT_COMPACT_COLUMNS,Dc as DEFAULT_PROJECT_ICON,CK as DEFAULT_TASKBOX_TAB_ITEMS,So as DEFAULT_TASK_ICON,ko as DEFAULT_WORKLOAD_CAPACITY,Uu as DRAWER_SECTION_TITLE_FONT_SIZE,dK as DateRangeFilterPopover,Mn as DrawerSection,Bn as DueDatePickerPopover,Zy as ENDED_EVENT_STATUS_OPTION,rm as EVENT_ICON_COLOR,yr as EVENT_TASK_ICON,JW as EmployeeSelectDialog,Pn as FIRST_BODY_TOP,Vc as GROUP_BY_OPTIONS,ss as GoogleEventChip,rK as GroupByMenuButton,hl as IconPickerGrid,Sp as InlineAddressInput,Lo as InlineTextValue,Wc as KANBAN_CLOSED_COLUMN_KEY,La as LANDSCAPE_HEIGHT,Na as LANDSCAPE_WIDTH,fG as LabelFilterMenu,Yl as LabelSelectMenu,v0 as LeadTimeDistributionChart,am as LinkifiedText,$s as MANUAL_TASK_STATUS_OPTIONS,Kr as MARGIN_X,GV as MemberFilterMenu,ox as NOTICE_GROUP_KEY,qs as NOTICE_STATUS_OPTIONS,pr as NOTICE_TASK_ICON,Td as NO_TASK_ICON,Pa as PORTRAIT_HEIGHT,Da as PORTRAIT_WIDTH,Pc as PROJECT_ICON_OPTIONS,vt as PropertyRow,Xi as RECEIVER_AVATAR_COLORS,hh as REMINDER_OPTIONS,ei as REVIEW_DONE_BUTTON_SX,Jr as ReceiverAvatarStack,Em as RelatedTasksSection,oC as STATUS_KEY_REPLIED,md as STATUS_KEY_WAITING,sx as SUPPORT_GROUP_KEY,AG as ShortcutHelpDialog,kh as SortableTaskCard,l0 as SprintBurndownChart,HV as SprintChartsDialog,$m as SprintCloseDialog,yG as SprintFilterMenu,AW as SprintManageDialog,i0 as SprintVelocityChart,Gi as StatusSelectMenu,Qa as TASKBOX_COLUMNS,Hn as TASKBOX_DRAWER_NARROW_MQ,BG as TASKBOX_SHORTCUT_HELP,Cd as TASKBOX_UI_STATE_ID,Q0 as TASKBOX_VIEW_LABELS,lP as TASKBOX_VIEW_MODES,mu as TASK_CARD_DRAG_HANDLE_CLASS,na as TASK_REPEAT_RULE_OPTIONS,gn as TASK_STATUS_OPTIONS,N2 as TIME_REMINDER_OPTIONS,gl as TaskAckListPopover,eo as TaskActionButton,ec as TaskActivityDialog,Kl as TaskAttachmentsSection,lp as TaskBoxColumnSummary,MN as TaskBoxCompactTable,_u as TaskBoxGroupBoard,tN as TaskBoxMobileList,ep as TaskBoxMonthAgenda,Yh as TaskBoxMonthCalendar,_P as TaskBoxSprintColumnSummary,xh as TaskBoxTable,BK as TaskBoxTabs,sp as TaskBoxTimeline,aP as TaskBoxView,Wh as TaskBoxWeekCalendar,Ys as TaskCardContent,Hl as TaskChecklistSection,pm as TaskCommentInput,hm as TaskCommentsSection,Fl as TaskContentEditor,Ll as TaskContentTemplateMenu,Sm as TaskContentTranslateDialog,sG as TaskContextMenu,Dl as TaskCorePropertiesGrid,af as TaskCreateBody,IF as TaskCreateDrawer,H0 as TaskDateRangeFilter,Lm as TaskDetailBody,lW as TaskDetailDrawer,xm as TaskDetailHeader,ni as TaskIconPickerPopover,Zo as TaskLabelChips,$l as TaskLinkDialog,Tm as TaskNoteField,Xr as TaskPriorityChip,_Y as TaskRuleManageDialog,Lt as TaskStatusChip,zI as TaskStatusChips,HY as TaskTemplateManageDialog,QY as TaskTemplateRunDialog,sY as TaskboxManualDialog,nb as TaskboxProvider,n0 as WorkloadCapacityDialog,B0 as WorkloadChart,O0 as WorkloadPersonTasks,A0 as WorkloadPersonTasksDialog,P0 as WorkloadTimelineGrid,xp as addDaysToDate,_0 as averageWorkload,bl as buildCardBaseSx,h0 as buildCumulativeFlow,p0 as buildLeadCycleDistribution,p3 as buildPlannedTask,Ad as buildStatusOptionColors,X7 as buildTaskColumnsPrintSvgPages,rC as buildTaskDetailPrintData,U7 as buildTaskDetailPrintSvgPages,Ja as buildTaskGroupSections,L7 as buildTaskListPrintSvgPages,eC as buildTaskListXlsx,mf as buildTaskRelationsModel,y4 as buildTaskShareText,K7 as buildTaskTimelinePrintSvgPages,Ca as buildTaskboxShortcutHelp,Ua as buildTaskboxTheme,vp as buildTemplateTasks,uc as buildWorkloadRows,k0 as buildWorkloadTimeline,Kd as canAssignBugManager,rl as canClaimTaskItem,Gd as canCompleteTaskItem,Zx as canDeleteTaskItem,Xx as canEditTaskCoreItem,Qn as canEditTaskItem,tl as canViewTaskItem,nl as canVolunteerTaskItem,vo as clampPrintText,Qo as coreEditLocked,gf as countTaskRelations,cp as countWorkdays,Ky as createTaskboxTheme,ap as daysLeftUntil,Ml as defaultRepeatUntil,Nc as defaultTaskBoxFormValues,Lc as defaultTaskboxUiStateValues,Ti as deleteLocked,Nt as escapePrintXml,Bc as estimatePrintTextWidth,Zp as filterFilesWithinLimit,aO as formatConfirmTime,mP as formatHours,Cn as formatKoreanDate,bn as formatKoreanDateTime,Qc as formatMonthDay,DN as formatOffsetLabel,Cc as formatPrintDate,Bs as formatPrintStamp,In as formatSprintOptionLabel,Rd as getBugDeviceName,Md as getBugReproName,Va as getBugResolutionName,Jy as getBugStatusOption,FH as getDefaultDateRange,Hs as getEventDisplayStatusOption,OI as getNoDueStatusRank,Xp as getNoticeAckInfo,Od as getNoticeStatusOption,Oj as getNoticeTargetDisplay,rI as getProjectIconAnchorComponent,Et as getProjectIconComponent,L2 as getReminderLabel,su as getReminderOptions,au as getRemindersLabel,El as getRepeatRuleLabel,Ya as getStatusOptionsForTask,wG as getTabHeaderConfig,el as getTaskBoxColumnDefs,qd as getTaskBoxGridMinWidth,Fd as getTaskBoxGridTemplate,kT as getTaskBoxTabKind,ts as getTaskConfirmInfo,xr as getTaskDisplayStatusOption,Ga as getTaskStatusOption,ns as groupGoogleEventsByDate,hi as groupSeqFromTabKey,f$ as hasRelation,Bm as hasTaskRelations,aa as htmlToPlainText,T6 as isCustomTabKey,f0 as isFlowTask,Vd as isOpenPoolTaskItem,dc as isOverCapacity,w0 as isOverloaded,Hc as isPastEvent,ol as isSupportOriginTaskItem,Ka as isTaskDone,RI as isWaitingTask,rc as monthsAgoDate,uo as narrowOrderSx,aW as nowDateTimeString,zm as nowMinuteString,D_ as parseEstimatedHours,Df as parseTaskTimeMs,fc as pickPersonWorkloadTasks,Fi as relationsOf,Vo as renderPrintHeader,ro as resolveReminders,V8 as resolveRowCapacity,Ki as resolveTaskStatusOptions,jc as resolveTaskboxTheme,sC as resolveWorkloadCapacity,EN as selectDepartmentSharedTasks,ps as shareTaskText,gP as sumRemainingHours,Xl as summarizeNoticeTargets,vW as tabKeyFromGroupSeq,Ln as taskVisibilityOf,nd as toTaskPrintRow,G7 as toTimelinePrintRow,mo as toYmd,Xa as toggleLabelKey,dl as toggleReminder,Ns as useBuildFileUrl,qp as useTaskAttachmentUploadMeta,ot as useTaskboxConfig,$y as useTaskboxForm,CG as useTaskboxShortcuts,lt as useTaskboxTheme,To as useTaskboxUiState,Ls as useUploadMaxMb,cr as wideColumnSx,il as withOriginAuthorAvatar,Ko as wrapPrintPage,Is as wrapPrintText};
53
53
  /*! Bundled license information:
54
54
 
55
55
  exceljs/dist/exceljs.min.js: