@ehfuse/taskbox 0.5.406 → 0.5.407

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.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var bv=Object.create;var Nl=Object.defineProperty;var yv=Object.getOwnPropertyDescriptor;var xv=Object.getOwnPropertyNames;var vv=Object.getPrototypeOf,wv=Object.prototype.hasOwnProperty;var _v=(e,f)=>()=>(f||e((f={exports:{}}).exports,f),f.exports),kv=(e,f)=>{for(var g in f)Nl(e,g,{get:f[g],enumerable:!0})},uh=(e,f,g,l)=>{if(f&&typeof f=="object"||typeof f=="function")for(let o of xv(f))!wv.call(e,o)&&o!==g&&Nl(e,o,{get:()=>f[o],enumerable:!(l=yv(f,o))||l.enumerable});return e};var Y=(e,f,g)=>(g=e!=null?bv(vv(e)):{},uh(f||!e||!e.__esModule?Nl(g,"default",{value:e,enumerable:!0}):g,e)),Sv=e=>uh(Nl({},"__esModule",{value:!0}),e);var pv=_v((hv,ah)=>{(function(e){typeof hv=="object"&&typeof ah<"u"?ah.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 require=="function"&&require;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 require=="function"&&require,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(I){if(I==="")return null;let M=Number(I);if(!Number.isNaN(M)&&M!==1/0)return M;let z=m.reduce((P,N)=>{if(P)return P;let $=t(I,N,!0);return $.isValid()?$:null},null);if(z)return new Date(z.valueOf());let O=i[I];return O!==void 0?O:I},k=o.parse(h.parserOptions).on("data",I=>{b.addRow(I.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,I=h.map||(O=>{if(O){if(O.text||O.hyperlink)return O.hyperlink||O.text||"";if(O.formula||O.result)return O.result||"";if(O instanceof Date)return x?k?t.utc(O).format(x):t(O).format(x):k?t.utc(O).format():t(O).format();if(O.error)return O.error;if(typeof O=="object")return JSON.stringify(O)}return O}),M=h.includeEmptyRows===void 0||h.includeEmptyRows,z=1;b&&b.eachRow((O,P)=>{if(M)for(;z++<P-1;)m.write([]);let{values:N}=O;N.shift(),m.write(N.map(I)),z=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 I=a&&a.protection||h&&h.protection;return I&&(d.protection=I),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 I=n.findCellAt(i,d,m);if(!I||!I.mark)return!1;k.push(I)}a[x]=m;for(let I=0;I<k.length;I++)k[I].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 I=(k.header?1:k.headers&&k.headers.length)||0;return Math.max(x,I)},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),I=2;I<x;I++)k[I-2]=arguments[I];if(k.length>0)for(let P=0;P<m;P++){let N=[u,b];k.forEach(L=>{N.push(L[P]||null)});let $=this.getRow(P+1);$.splice.apply($,N)}else this._rows.forEach(P=>{P&&P.splice(u,b)});let M=k.length-b,z=u+b,O=this._columns.length;if(M<0)for(let P=u+k.length;P<=O;P++)this.getColumn(P).defn=this.getColumn(P-M).defn;else if(M>0)for(let P=O;P>=z;P--)this.getColumn(P+M).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},(I,M)=>{k.getCell(M).style=d(I.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 I=0;I<b;I++){let M=this._rows[u+I];M.style=x.style,M.height=x.height,x.eachCell({includeEmpty:!0},(z,O)=>{M.getCell(O).style=z.style})}}spliceRows(u,b){let m=u+b;for(var x=arguments.length,k=new Array(x>2?x-2:0),I=2;I<x;I++)k[I-2]=arguments[I];let M=k.length,z=M-b,O=this._rows.length,P,N;if(z<0)for(u===O&&(this._rows[O-1]=void 0),P=m;P<=O;P++)if(N=this._rows[P-1],N){let $=this.getRow(P+z);$.values=N.values,$.style=N.style,$.height=N.height,N.eachCell({includeEmpty:!0},(L,C)=>{$.getCell(C).style=L.style}),this._rows[P-1]=void 0}else this._rows[P+z-1]=void 0;else if(z>0)for(P=O;P>=m;P--)if(N=this._rows[P-1],N){let $=this.getRow(P+z);$.values=N.values,$.style=N.style,$.height=N.height,N.eachCell({includeEmpty:!0},(L,C)=>{if($.getCell(C).style=L.style,L._value.constructor.name==="MergeValue"){let S=this.getRow(L._row._number+M).getCell(C),D=L._value._master,p=this.getRow(D._row._number+M).getCell(D._column._number);S.merge(p)}})}else this._rows[P+z-1]=void 0;for(P=0;P<M;P++){let $=this.getRow(u+P);$.style={},$.values=k[P]}this.workbook.definedNames.spliceRows(this.name,u,b,M)}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 I=x.left;I<=x.right;I++){let M=this.findCell(k,I);M&&(M.type===n.ValueType.Merge?this._unMergeMaster(M.master):this._merges[M.address]&&this._unMergeMaster(M))}}fillFormula(u,b,m){let x=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"shared",k=o.decode(u),{top:I,left:M,bottom:z,right:O}=k,P=O-M+1,N=o.encodeAddress(I,M),$=x==="shared",L;L=typeof m=="function"?m:Array.isArray(m)?Array.isArray(m[0])?(S,D)=>m[S-I][D-M]:(S,D)=>m[(S-I)*P+(D-M)]:()=>{};let C=!0;for(let S=I;S<=z;S++)for(let D=M;D<=O;D++)C?(this.getCell(S,D).value={shareType:x,formula:b,ref:u,result:L(S,D)},C=!1):this.getCell(S,D).value=$?{sharedFormula:N,result:L(S,D)}:L(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(),I=m[3],M=m[4];if(k.length>3||k.length===3&&k>"XFD")return a;let z=l.l2n(k),O=parseInt(M,10);return x||(z+=i.col-c.col),I||(O+=i.row-c.row),(h||"")+(x||"")+l.n2l(z)+(I||"")+O}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
+ "use strict";var yv=Object.create;var Nl=Object.defineProperty;var xv=Object.getOwnPropertyDescriptor;var vv=Object.getOwnPropertyNames;var wv=Object.getPrototypeOf,_v=Object.prototype.hasOwnProperty;var kv=(e,f)=>()=>(f||e((f={exports:{}}).exports,f),f.exports),Sv=(e,f)=>{for(var g in f)Nl(e,g,{get:f[g],enumerable:!0})},uh=(e,f,g,l)=>{if(f&&typeof f=="object"||typeof f=="function")for(let o of vv(f))!_v.call(e,o)&&o!==g&&Nl(e,o,{get:()=>f[o],enumerable:!(l=xv(f,o))||l.enumerable});return e};var Y=(e,f,g)=>(g=e!=null?yv(wv(e)):{},uh(f||!e||!e.__esModule?Nl(g,"default",{value:e,enumerable:!0}):g,e)),Tv=e=>uh(Nl({},"__esModule",{value:!0}),e);var mv=kv((pv,ah)=>{(function(e){typeof pv=="object"&&typeof ah<"u"?ah.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 require=="function"&&require;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 require=="function"&&require,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(I){if(I==="")return null;let M=Number(I);if(!Number.isNaN(M)&&M!==1/0)return M;let z=m.reduce((P,N)=>{if(P)return P;let $=t(I,N,!0);return $.isValid()?$:null},null);if(z)return new Date(z.valueOf());let O=i[I];return O!==void 0?O:I},k=o.parse(h.parserOptions).on("data",I=>{b.addRow(I.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,I=h.map||(O=>{if(O){if(O.text||O.hyperlink)return O.hyperlink||O.text||"";if(O.formula||O.result)return O.result||"";if(O instanceof Date)return x?k?t.utc(O).format(x):t(O).format(x):k?t.utc(O).format():t(O).format();if(O.error)return O.error;if(typeof O=="object")return JSON.stringify(O)}return O}),M=h.includeEmptyRows===void 0||h.includeEmptyRows,z=1;b&&b.eachRow((O,P)=>{if(M)for(;z++<P-1;)m.write([]);let{values:N}=O;N.shift(),m.write(N.map(I)),z=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 I=a&&a.protection||h&&h.protection;return I&&(d.protection=I),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 I=n.findCellAt(i,d,m);if(!I||!I.mark)return!1;k.push(I)}a[x]=m;for(let I=0;I<k.length;I++)k[I].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 I=(k.header?1:k.headers&&k.headers.length)||0;return Math.max(x,I)},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),I=2;I<x;I++)k[I-2]=arguments[I];if(k.length>0)for(let P=0;P<m;P++){let N=[u,b];k.forEach(L=>{N.push(L[P]||null)});let $=this.getRow(P+1);$.splice.apply($,N)}else this._rows.forEach(P=>{P&&P.splice(u,b)});let M=k.length-b,z=u+b,O=this._columns.length;if(M<0)for(let P=u+k.length;P<=O;P++)this.getColumn(P).defn=this.getColumn(P-M).defn;else if(M>0)for(let P=O;P>=z;P--)this.getColumn(P+M).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},(I,M)=>{k.getCell(M).style=d(I.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 I=0;I<b;I++){let M=this._rows[u+I];M.style=x.style,M.height=x.height,x.eachCell({includeEmpty:!0},(z,O)=>{M.getCell(O).style=z.style})}}spliceRows(u,b){let m=u+b;for(var x=arguments.length,k=new Array(x>2?x-2:0),I=2;I<x;I++)k[I-2]=arguments[I];let M=k.length,z=M-b,O=this._rows.length,P,N;if(z<0)for(u===O&&(this._rows[O-1]=void 0),P=m;P<=O;P++)if(N=this._rows[P-1],N){let $=this.getRow(P+z);$.values=N.values,$.style=N.style,$.height=N.height,N.eachCell({includeEmpty:!0},(L,C)=>{$.getCell(C).style=L.style}),this._rows[P-1]=void 0}else this._rows[P+z-1]=void 0;else if(z>0)for(P=O;P>=m;P--)if(N=this._rows[P-1],N){let $=this.getRow(P+z);$.values=N.values,$.style=N.style,$.height=N.height,N.eachCell({includeEmpty:!0},(L,C)=>{if($.getCell(C).style=L.style,L._value.constructor.name==="MergeValue"){let S=this.getRow(L._row._number+M).getCell(C),D=L._value._master,p=this.getRow(D._row._number+M).getCell(D._column._number);S.merge(p)}})}else this._rows[P+z-1]=void 0;for(P=0;P<M;P++){let $=this.getRow(u+P);$.style={},$.values=k[P]}this.workbook.definedNames.spliceRows(this.name,u,b,M)}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 I=x.left;I<=x.right;I++){let M=this.findCell(k,I);M&&(M.type===n.ValueType.Merge?this._unMergeMaster(M.master):this._merges[M.address]&&this._unMergeMaster(M))}}fillFormula(u,b,m){let x=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"shared",k=o.decode(u),{top:I,left:M,bottom:z,right:O}=k,P=O-M+1,N=o.encodeAddress(I,M),$=x==="shared",L;L=typeof m=="function"?m:Array.isArray(m)?Array.isArray(m[0])?(S,D)=>m[S-I][D-M]:(S,D)=>m[(S-I)*P+(D-M)]:()=>{};let C=!0;for(let S=I;S<=z;S++)for(let D=M;D<=O;D++)C?(this.getCell(S,D).value={shareType:x,formula:b,ref:u,result:L(S,D)},C=!1):this.getCell(S,D).value=$?{sharedFormula:N,result:L(S,D)}:L(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(),I=m[3],M=m[4];if(k.length>3||k.length===3&&k>"XFD")return a;let z=l.l2n(k),O=parseInt(M,10);return x||(z+=i.col-c.col),I||(O+=i.row-c.row),(h||"")+(x||"")+l.n2l(z)+(I||"")+O}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(I=>{if(I.pageSetup&&I.pageSetup.printArea&&I.pageSetup.printArea.split("&&").forEach(M=>{let z=M.split(":"),O={name:"_xlnm.Print_Area",ranges:[`'${I.name}'!$${z[0]}:$${z[1]}`],localSheetId:k};x.push(O)}),I.pageSetup&&(I.pageSetup.printTitlesRow||I.pageSetup.printTitlesColumn)){let M=[];if(I.pageSetup.printTitlesColumn){let O=I.pageSetup.printTitlesColumn.split(":");M.push(`'${I.name}'!$${O[0]}:$${O[1]}`)}if(I.pageSetup.printTitlesRow){let O=I.pageSetup.printTitlesRow.split(":");M.push(`'${I.name}'!$${O[0]}:$${O[1]}`)}let z={name:"_xlnm.Print_Titles",ranges:M,localSheetId:k};x.push(z)}k++}),x.length&&(m.definedNames=m.definedNames.concat(x)),(m.media||[]).forEach((I,M)=>{I.name=I.type+(M+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((O,P)=>(O[P.Id]=P,O),{}),k=[],I,M=0;(m.sheets||[]).forEach(O=>{let P=x[O.rId];P&&(I=m.worksheetHash["xl/"+P.Target.replace(/^(\s|\/xl\/)+/,"")],I&&(I.name=O.name,I.id=O.id,I.state=O.state,k[M++]=I))});let z=[];l.each(m.definedNames,O=>{if(O.name==="_xlnm.Print_Area"){if(I=k[O.localSheetId],I){I.pageSetup||(I.pageSetup={});let P=o.decodeEx(O.ranges[0]);I.pageSetup.printArea=I.pageSetup.printArea?`${I.pageSetup.printArea}&&${P.dimensions}`:P.dimensions}}else if(O.name==="_xlnm.Print_Titles"){if(I=k[O.localSheetId],I){I.pageSetup||(I.pageSetup={});let P=O.ranges.join(","),N=/\$/g,$=/\$\d+:\$\d+/,L=P.match($);if(L&&L.length){let D=L[0];I.pageSetup.printTitlesRow=D.replace(N,"")}let C=/\$[A-Z]+:\$[A-Z]+/,S=P.match(C);if(S&&S.length){let D=S[0];I.pageSetup.printTitlesColumn=D.replace(N,"")}}}else z.push(O)}),m.definedNames=z,m.media.forEach((O,P)=>{O.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 I=new s(k.ref),{tl:M}=I;switch(k.operator){case"containsText":return`NOT(ISERROR(SEARCH("${k.text}",${M})))`;case"containsBlanks":return`LEN(TRIM(${M}))=0`;case"notContainsBlanks":return`LEN(TRIM(${M}))>0`;case"containsErrors":return`ISERROR(${M})`;case"notContainsErrors":return`NOT(ISERROR(${M}))`;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 I=new s(k.ref),{tl:M}=I;switch(k.timePeriod){case"thisWeek":return`AND(TODAY()-ROUNDDOWN(${M},0)<=WEEKDAY(TODAY())-1,ROUNDDOWN(${M},0)-TODAY()<=7-WEEKDAY(TODAY()))`;case"lastWeek":return`AND(TODAY()-ROUNDDOWN(${M},0)>=(WEEKDAY(TODAY())),TODAY()-ROUNDDOWN(${M},0)<(WEEKDAY(TODAY())+7))`;case"nextWeek":return`AND(ROUNDDOWN(${M},0)-TODAY()>(7-WEEKDAY(TODAY())),ROUNDDOWN(${M},0)-TODAY()<(15-WEEKDAY(TODAY())))`;case"yesterday":return`FLOOR(${M},1)=TODAY()-1`;case"today":return`FLOOR(${M},1)=TODAY()`;case"tomorrow":return`FLOOR(${M},1)=TODAY()+1`;case"last7Days":return`AND(TODAY()-FLOOR(${M},1)<=6,FLOOR(${M},1)<=TODAY())`;case"lastMonth":return`AND(MONTH(${M})=MONTH(EDATE(TODAY(),0-1)),YEAR(${M})=YEAR(EDATE(TODAY(),0-1)))`;case"thisMonth":return`AND(MONTH(${M})=MONTH(TODAY()),YEAR(${M})=YEAR(TODAY()))`;case"nextMonth":return`AND(MONTH(${M})=MONTH(EDATE(TODAY(),0+1)),YEAR(${M})=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,I)=>{for(let M=0;M<k;M++){let z=s.encodeAddress(x.row+M,I);if(!d[z]||!l.isEqual(d[x.address],d[z]))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 I=1,M=s.encodeAddress(k.row+I,k.col);for(;d[M]&&l.isEqual(x.dataValidation,d[M]);)I++,M=s.encodeAddress(k.row+I,k.col);let z=1;for(;m(k,I,k.col+z);)z++;for(let O=0;O<I;O++)for(let P=0;P<z;P++)M=s.encodeAddress(k.row+O,k.col+P),b[M].marked=!0;if(I>1||z>1){let O=k.row+(I-1),P=k.col+(z-1);return{...x.dataValidation,sqref:`${x.address}:${s.encodeAddress(O,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"),I=e("./sheet-protection-xform"),M=e("./page-margins-xform"),z=e("./page-setup-xform"),O=e("./print-options-xform"),P=e("./auto-filter-xform"),N=e("./picture-xform"),$=e("./drawing-xform"),L=e("./table-part-xform"),C=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 T={},R={};return w.forEach(F=>{T[F.ref]=F,F.rules.forEach(H=>{let{x14Id:V}=H;V&&(R[V]=H)})}),_.forEach(F=>{F.rules.forEach(H=>{let V=R[H.x14Id];V?((A,q)=>{Object.keys(q).forEach(B=>{let E=A[B],j=q[B];E===void 0&&j!==void 0&&(A[B]=j)})})(V,H):T[F.ref]?T[F.ref].rules.push(H):w.push({ref:F.ref,rules:[H]})})}),w};class v extends n{constructor(_){super();let{maxRows:T,maxCols:R,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:R}),maxItems:T}),autoFilter:new P,mergeCells:new c({tag:"mergeCells",count:!0,childXform:new u}),rowBreaks:new C,hyperlinks:new c({tag:"hyperlinks",count:!1,childXform:new d}),pageMargins:new M,dataValidations:new b,pageSetup:new z,headerFooter:new S,printOptions:new O,picture:new N,drawing:new $,sheetProtection:new I,tableParts:new c({tag:"tableParts",count:!0,childXform:new L}),conditionalFormatting:new D,extLst:new p}}prepare(_,T){T.merges=new t,_.hyperlinks=T.hyperlinks=[],_.comments=T.comments=[],T.formulae={},T.siFormulae=0,this.map.cols.prepare(_.cols,T),this.map.sheetData.prepare(_.rows,T),this.map.conditionalFormatting.prepare(_.conditionalFormattings,T),_.mergeCells=T.merges.mergeCells;let R=_.rels=[];function F(A){return"rId"+(A.length+1)}if(_.hyperlinks.forEach(A=>{let q=F(R);A.rId=q,R.push({Id:q,Type:r.Hyperlink,Target:A.target,TargetMode:"External"})}),_.comments.length>0){let A={Id:F(R),Type:r.Comments,Target:`../comments${_.id}.xml`};R.push(A);let q={Id:F(R),Type:r.VmlDrawing,Target:`../drawings/vmlDrawing${_.id}.vml`};R.push(q),_.comments.forEach(B=>{B.refAddress=o.decodeAddress(B.ref)}),T.commentRefs.push({commentName:"comments"+_.id,vmlDrawing:"vmlDrawing"+_.id})}let H=[],V;_.media.forEach(A=>{if(A.type==="background"){let q=F(R);V=T.media[A.imageId],R.push({Id:q,Type:r.Image,Target:`../media/${V.name}.${V.extension}`}),_.background={rId:q},_.image=T.media[A.imageId]}else if(A.type==="image"){let{drawing:q}=_;V=T.media[A.imageId],q||(q=_.drawing={rId:F(R),name:"drawing"+ ++T.drawingsCount,anchors:[],rels:[]},T.drawings.push(q),R.push({Id:q.rId,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",Target:`../drawings/${q.name}.xml`}));let B=this.preImageId===A.imageId?H[A.imageId]:H[q.rels.length];B||(B=F(q.rels),H[q.rels.length]=B,q.rels.push({Id:B,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",Target:`../media/${V.name}.${V.extension}`}));let E={picture:{rId:B},range:A.range};if(A.hyperlinks&&A.hyperlinks.hyperlink){let j=F(q.rels);H[q.rels.length]=j,E.picture.hyperlinks={tooltip:A.hyperlinks.tooltip,rId:j},q.rels.push({Id:j,Type:r.Hyperlink,Target:A.hyperlinks.hyperlink,TargetMode:"External"})}this.preImageId=A.imageId,q.anchors.push(E)}}),_.tables.forEach(A=>{let q=F(R);A.rId=q,R.push({Id:q,Type:r.Table,Target:"../tables/"+A.target}),A.columns.forEach(B=>{let{style:E}=B;E&&(B.dxfId=T.styles.addDxfStyle(E))})}),this.map.extLst.prepare(_,T)}render(_,T){_.openXml(s.StdDocAttributes),_.openNode("worksheet",v.WORKSHEET_ATTRIBUTES);let R=T.properties?{defaultRowHeight:T.properties.defaultRowHeight,dyDescent:T.properties.dyDescent,outlineLevelCol:T.properties.outlineLevelCol,outlineLevelRow:T.properties.outlineLevelRow}:void 0;T.properties&&T.properties.defaultColWidth&&(R.defaultColWidth=T.properties.defaultColWidth);let F={outlineProperties:T.properties&&T.properties.outlineProperties,tabColor:T.properties&&T.properties.tabColor,pageSetup:T.pageSetup&&T.pageSetup.fitToPage?{fitToPage:T.pageSetup.fitToPage}:void 0},H=T.pageSetup&&T.pageSetup.margins,V={showRowColHeaders:T.pageSetup&&T.pageSetup.showRowColHeaders,showGridLines:T.pageSetup&&T.pageSetup.showGridLines,horizontalCentered:T.pageSetup&&T.pageSetup.horizontalCentered,verticalCentered:T.pageSetup&&T.pageSetup.verticalCentered},A=T.sheetProtection;this.map.sheetPr.render(_,F),this.map.dimension.render(_,T.dimensions),this.map.sheetViews.render(_,T.views),this.map.sheetFormatPr.render(_,R),this.map.cols.render(_,T.cols),this.map.sheetData.render(_,T.rows),this.map.sheetProtection.render(_,A),this.map.autoFilter.render(_,T.autoFilter),this.map.mergeCells.render(_,T.mergeCells),this.map.conditionalFormatting.render(_,T.conditionalFormattings),this.map.dataValidations.render(_,T.dataValidations),this.map.hyperlinks.render(_,T.hyperlinks),this.map.printOptions.render(_,V),this.map.pageMargins.render(_,H),this.map.pageSetup.render(_,T.pageSetup),this.map.headerFooter.render(_,T.headerFooter),this.map.rowBreaks.render(_,T.rowBreaks),this.map.drawing.render(_,T.drawing),this.map.picture.render(_,T.background),this.map.tableParts.render(_,T.tables),this.map.extLst.render(_,T),T.rels&&T.rels.forEach(q=>{q.Type===r.VmlDrawing&&_.leafNode("legacyDrawing",{"r:id":q.Id})}),_.closeNode()}parseOpen(_){return this.parser?(this.parser.parseOpen(_),!0):_.name==="worksheet"?(l.each(this.map,T=>{T.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 T=this.map.sheetFormatPr.model||{};this.map.sheetPr.model&&this.map.sheetPr.model.tabColor&&(T.tabColor=this.map.sheetPr.model.tabColor),this.map.sheetPr.model&&this.map.sheetPr.model.outlineProperties&&(T.outlineProperties=this.map.sheetPr.model.outlineProperties);let R={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(R,this.map.pageSetup.model,this.map.printOptions.model),H=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:T,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:H},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(_,T){let R=(_.relationships||[]).reduce((H,V)=>{if(H[V.Id]=V,V.Type===r.Comments&&(_.comments=T.comments[V.Target].comments),V.Type===r.VmlDrawing&&_.comments&&_.comments.length){let A=T.vmlDrawings[V.Target].comments;_.comments.forEach((q,B)=>{q.note=Object.assign({},q.note,A[B])})}return H},{});if(T.commentsMap=(_.comments||[]).reduce((H,V)=>(V.ref&&(H[V.ref]=V),H),{}),T.hyperlinkMap=(_.hyperlinks||[]).reduce((H,V)=>(V.rId&&(H[V.address]=R[V.rId].Target),H),{}),T.formulae={},_.rows=_.rows&&_.rows.filter(Boolean)||[],_.rows.forEach(H=>{H.cells=H.cells&&H.cells.filter(Boolean)||[]}),this.map.cols.reconcile(_.cols,T),this.map.sheetData.reconcile(_.rows,T),this.map.conditionalFormatting.reconcile(_.conditionalFormattings,T),_.media=[],_.drawing){let H=R[_.drawing.rId].Target.match(/\/drawings\/([a-zA-Z0-9]+)[.][a-zA-Z]{3,4}$/);if(H){let V=H[1];T.drawings[V].anchors.forEach(A=>{if(A.medium){let q={type:"image",imageId:A.medium.index,range:A.range,hyperlinks:A.picture.hyperlinks};_.media.push(q)}})}}let F=_.background&&R[_.background.rId];if(F){let H=F.Target.split("/media/")[1],V=T.mediaIndex&&T.mediaIndex[H];V!==void 0&&_.media.push({type:"background",imageId:V})}_.tables=(_.tables||[]).map(H=>{let V=R[H.rId];return T.tables[V.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,I)=>{I.model&&I.model.length&&(this.model[k]=I.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(I=>{k[I.id]=I.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 I=this._addStyle(k);return this.weakMap&&this.weakMap.set(m,I),I}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 M=this.index.numFmt[x.numFmtId]||a.getDefaultFmtCode(x.numFmtId);M&&(k.numFmt=M)}function I(M,z,O){if(O||O===0){let P=z[O];P&&(k[M]=P)}}return I("font",this.model.fonts,x.fontId),I("border",this.model.borders,x.borderId),I("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"),I=e("./xform/book/workbook-xform"),M=e("./xform/sheet/worksheet-xform"),z=e("./xform/drawing/drawing-xform"),O=e("./xform/table/table-xform"),P=e("./xform/comment/comments-xform"),N=e("./xform/comment/vml-notes-xform"),$=e("./xml/theme1");class L{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 I().parseStream(S)}parseSharedStrings(S){return new b().parseStream(S)}reconcile(S,D){let p=new I,y=new M(D),v=new z,w=new O;p.reconcile(S);let _={media:S.media,mediaIndex:S.mediaIndex};Object.keys(S.drawings).forEach(F=>{let H=S.drawings[F],V=S.drawingRels[F];V&&(_.rels=V.reduce((A,q)=>(A[q.Id]=q,A),{}),(H.anchors||[]).forEach(A=>{let q=A.picture&&A.picture.hyperlinks;q&&_.rels[q.rId]&&(q.hyperlink=_.rels[q.rId].Target,delete q.rId)}),v.reconcile(H,_))});let T={styles:S.styles};Object.values(S.tables).forEach(F=>{w.reconcile(F,T)});let R={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,R)}),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 M(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 O,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((_,T)=>{let R=new c;R.on("finish",()=>{D.mediaIndex[p]=D.media.length,D.mediaIndex[w]=D.media.length;let F={type:"image",name:w,extension:v,buffer:R.toBuffer()};D.media.push(F),_()}),S.on("error",F=>{T(F)}),S.pipe(R)})}}async _processDrawingEntry(S,D,p){let y=new z,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 _,T=w.name;if(T[0]==="/"&&(T=T.substr(1)),T.match(/xl\/media\//)||T.match(/xl\/theme\/([a-zA-Z0-9]+)[.]xml/))_=new t,_.write(await w.async("nodebuffer"));else{let R;_=new t({writableObjectMode:!0,readableObjectMode:!0}),R=l.browser?h(await w.async("nodebuffer")):await w.async("string");let F=16384;for(let H=0;H<R.length;H+=F)_.write(R.substring(H,H+F))}switch(_.end(),T){case"_rels/.rels":y.globalRels=await this.parseRels(_);break;case"xl/workbook.xml":{let R=await this.parseWorkbook(_);y.sheets=R.sheets,y.definedNames=R.definedNames,y.views=R.views,y.properties=R.properties,y.calcProperties=R.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 R=new k,F=await R.parseStream(_);y.company=F.company,y.manager=F.manager;break}case"docProps/core.xml":{let R=new u,F=await R.parseStream(_);Object.assign(y,F);break}default:{let R=T.match(/xl\/worksheets\/sheet(\d+)[.]xml/);if(R){await this._processWorksheetEntry(_,y,R[1],D,T);break}if(R=T.match(/xl\/worksheets\/_rels\/sheet(\d+)[.]xml.rels/),R){await this._processWorksheetRelsEntry(_,y,R[1]);break}if(R=T.match(/xl\/theme\/([a-zA-Z0-9]+)[.]xml/),R){await this._processThemeEntry(_,y,R[1]);break}if(R=T.match(/xl\/media\/([a-zA-Z0-9]+[.][a-zA-Z0-9]{3,4})$/),R){await this._processMediaEntry(_,y,R[1]);break}if(R=T.match(/xl\/drawings\/([a-zA-Z0-9]+)[.]xml/),R){await this._processDrawingEntry(_,y,R[1]);break}if(R=T.match(/xl\/(comments\d+)[.]xml/),R){await this._processCommentEntry(_,y,R[1]);break}if(R=T.match(/xl\/tables\/(table\d+)[.]xml/),R){await this._processTableEntry(_,y,R[1]);break}if(R=T.match(/xl\/drawings\/_rels\/([a-zA-Z0-9]+)[.]xml[.]rels/),R){await this._processDrawingRelsEntry(_,y,R[1]);break}if(R=T.match(/xl\/drawings\/(vmlDrawing\d+)[.]vml/),R){await this._processVmlDrawingEntry(_,y,R[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((T,R)=>{s.readFile(w,_,(F,H)=>{F?R(F):T(H)})})})(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 z,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 O;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:$};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:L.RelType.OfficeDocument,Target:"xl/workbook.xml"},{Id:"rId2",Type:L.RelType.CoreProperties,Target:"docProps/core.xml"},{Id:"rId3",Type:L.RelType.ExtenderProperties,Target:"docProps/app.xml"}]);S.append(D,{name:"_rels/.rels"})}async addWorkbookRels(S,D){let p=1,y=[{Id:"rId"+p++,Type:L.RelType.Styles,Target:"styles.xml"},{Id:"rId"+p++,Type:L.RelType.Theme,Target:"theme/theme1.xml"}];D.sharedStrings.count&&y.push({Id:"rId"+p++,Type:L.RelType.SharedStrings,Target:"sharedStrings.xml"}),D.worksheets.forEach(w=>{w.rId="rId"+p++,y.push({Id:w.rId,Type:L.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 I;S.append(p.toXml(D),{name:"xl/workbook.xml"})}async addWorksheets(S,D){let p=new M,y=new m,v=new P,w=new N;D.worksheets.forEach(_=>{let T=new a;p.render(T,_),S.append(T.xml,{name:`xl/worksheets/sheet${_.id}.xml`}),_.rels&&_.rels.length&&(T=new a,y.render(T,_.rels),S.append(T.xml,{name:`xl/worksheets/_rels/sheet${_.id}.xml.rels`})),_.comments.length>0&&(T=new a,v.render(T,_),S.append(T.xml,{name:`xl/comments${_.id}.xml`}),T=new a,w.render(T,_),S.append(T.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 I,y=new M;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(T=>{w++,T.target=`table${w}.xml`,T.id=w,S.tables.push(T)}),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()}}L.RelType=e("./rel-type"),f.exports=L}).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,28 +26,28 @@ use chrome, FireFox or Internet Explorer 11`)}var r=e("safe-buffer"),t=e("random
26
26
  `)):F=p.stylize("[Circular]","special")),I(R)){if(T&&_.match(/^\d+$/))return F;(R=JSON.stringify(""+_)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(R=R.substr(1,R.length-2),R=p.stylize(R,"name")):(R=R.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),R=p.stylize(R,"string"))}return R+": "+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 I(p){return p===void 0}function M(p){return z(p)&&$(p)==="[object RegExp]"}function z(p){return typeof p=="object"&&p!==null}function O(p){return z(p)&&$(p)==="[object Date]"}function P(p){return z(p)&&($(p)==="[object Error]"||p instanceof Error)}function N(p){return typeof p=="function"}function $(p){return Object.prototype.toString.call(p)}function L(p){return p<10?"0"+p.toString(10):p.toString(10)}g.debuglog=function(p){if(I(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=I,g.isRegExp=M,g.isObject=z,g.isDate=O,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 C=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function S(){var p=new Date,y=[L(p.getHours()),L(p.getMinutes()),L(p.getSeconds())].join(":");return[p.getDate(),C[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||!z(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 I=u,M=b,z=m,O=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,I),b=o(b,M),m=o(m,z),x=o(x,O)}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 I=0;I<16;++I)d[I]=a[h][I];for(let I=16;I<80;++I)d[I]=o(d[I-3]^d[I-8]^d[I-14]^d[I-16],1);let u=n[0],b=n[1],m=n[2],x=n[3],k=n[4];for(let I=0;I<80;++I){let M=Math.floor(I/20),z=o(u,5)+l(M,b,m,x)+k+t[M]+d[I]>>>0;k=x,x=m,m=o(b,30)>>>0,b=u,u=z}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(),I=a.nsecs!==void 0?a.nsecs:c+1,M=k-n+(I-c)/1e4;if(M<0&&a.clockseq===void 0&&(x=x+1&16383),(M<0||k>n)&&a.nsecs===void 0&&(I=0),I>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");n=k,c=I,t=x,k+=122192928e5;let z=(1e4*(268435455&k)+I)%4294967296;b[u++]=z>>>24&255,b[u++]=z>>>16&255,b[u++]=z>>>8&255,b[u++]=255&z;let O=k/4294967296*1e4&268435455;b[u++]=O>>>8&255,b[u++]=255&O,b[u++]=O>>>24&15|16,b[u++]=O>>>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 I=0;I<x.length;++I)k.push(x.charCodeAt(I));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 e5={};kv(e5,{ALL_TASK_VIEWER_ACCOUNT_SEQS:()=>Jv,AddLabelDialog:()=>qf,AddTabDialog:()=>ja,AttachmentUploadGauge:()=>jf,AttachmentUploadPercent:()=>Rc,BUG_DEVICE_OPTIONS:()=>Wl,BUG_GROUP_KEY:()=>c0,BUG_ICON_COLOR:()=>Is,BUG_KANBAN_COLUMNS:()=>Rv,BUG_REPRO_OPTIONS:()=>Hl,BUG_RESOLUTION_OPTIONS:()=>Ul,BUG_STATUS_OPTIONS:()=>Ci,BUG_TASK_ICON:()=>Bs,BugPropertiesGrid:()=>Xa,COLUMN_WIDTHS:()=>Pu,COMPLETED_STATUS_OPTION:()=>Ms,CONT_BODY_TOP:()=>no,CUSTOM_TAB_KEY_PREFIX:()=>Wc,CalendarLinkDialog:()=>T_,ChartEmptyMessage:()=>Dn,CommentBubbleIcon:()=>di,ConfirmCountButton:()=>is,CumulativeFlowChart:()=>Bd,DATE_REMINDER_OPTIONS:()=>Vu,DEFAULT_COMPACT_COLUMNS:()=>vb,DEFAULT_PROJECT_ICON:()=>Ll,DEFAULT_TASKBOX_TAB_ITEMS:()=>t3,DEFAULT_TASK_ICON:()=>Fo,DEFAULT_WORKLOAD_CAPACITY:()=>jo,DRAWER_SECTION_TITLE_FONT_SIZE:()=>Bc,DateRangeFilterPopover:()=>e3,DrawerSection:()=>ao,DueDatePickerPopover:()=>io,ENDED_EVENT_STATUS_OPTION:()=>o0,EVENT_ICON_COLOR:()=>Gf,EVENT_TASK_ICON:()=>Yr,EmployeeSelectDialog:()=>R_,FIRST_BODY_TOP:()=>fo,GROUP_BY_OPTIONS:()=>Gl,GoogleEventChip:()=>us,GroupByMenuButton:()=>J_,IconPickerGrid:()=>za,InlineAddressInput:()=>If,InlineTextValue:()=>Ko,KANBAN_CLOSED_COLUMN_KEY:()=>Kl,LANDSCAPE_HEIGHT:()=>fa,LANDSCAPE_WIDTH:()=>ua,LabelFilterMenu:()=>i3,LabelSelectMenu:()=>ol,LeadTimeDistributionChart:()=>Ed,LinkifiedText:()=>Xf,MANUAL_TASK_STATUS_OPTIONS:()=>Os,MARGIN_X:()=>Sn,MemberFilterMenu:()=>Z_,NOTICE_GROUP_KEY:()=>l0,NOTICE_STATUS_OPTIONS:()=>Rs,NOTICE_TASK_ICON:()=>$r,NO_TASK_ICON:()=>_u,PORTRAIT_HEIGHT:()=>ca,PORTRAIT_WIDTH:()=>la,PROJECT_ICON_OPTIONS:()=>zl,PropertyRow:()=>It,RECEIVER_AVATAR_COLORS:()=>ns,REMINDER_OPTIONS:()=>Ku,REVIEW_DONE_BUTTON_SX:()=>os,ReceiverAvatarStack:()=>Cn,RelatedTasksSection:()=>sd,STATUS_KEY_REPLIED:()=>Tv,STATUS_KEY_WAITING:()=>hu,SUPPORT_GROUP_KEY:()=>u0,ShortcutHelpDialog:()=>p3,SortableTaskCard:()=>Qu,SprintBurndownChart:()=>wd,SprintChartsDialog:()=>X_,SprintCloseDialog:()=>pd,SprintFilterMenu:()=>s3,SprintManageDialog:()=>k_,SprintVelocityChart:()=>vd,StatusSelectMenu:()=>rs,TASKBOX_COLUMNS:()=>Sa,TASKBOX_DRAWER_NARROW_MQ:()=>yo,TASKBOX_SHORTCUT_HELP:()=>d3,TASKBOX_UI_STATE_ID:()=>ku,TASKBOX_VIEW_LABELS:()=>Vd,TASKBOX_VIEW_MODES:()=>Hw,TASK_CARD_DRAG_HANDLE_CLASS:()=>fc,TASK_REPEAT_RULE_OPTIONS:()=>Xs,TASK_STATUS_OPTIONS:()=>Wn,TIME_REMINDER_OPTIONS:()=>$0,TaskAckListPopover:()=>Fa,TaskActionButton:()=>Co,TaskActivityDialog:()=>ll,TaskAttachmentsSection:()=>rl,TaskBoxColumnSummary:()=>_f,TaskBoxCompactTable:()=>e_,TaskBoxGroupBoard:()=>gc,TaskBoxMobileList:()=>Zw,TaskBoxMonthAgenda:()=>bf,TaskBoxMonthCalendar:()=>mf,TaskBoxSprintColumnSummary:()=>Vw,TaskBoxTable:()=>Xu,TaskBoxTabs:()=>n3,TaskBoxTimeline:()=>vf,TaskBoxView:()=>$w,TaskBoxWeekCalendar:()=>hf,TaskCardContent:()=>Fs,TaskChecklistSection:()=>tl,TaskCommentInput:()=>Qf,TaskCommentsSection:()=>Jf,TaskContentEditor:()=>Qa,TaskContentTemplateMenu:()=>Za,TaskContentTranslateDialog:()=>nd,TaskContextMenu:()=>o3,TaskCorePropertiesGrid:()=>Ya,TaskCreateBody:()=>Pc,TaskCreateDrawer:()=>d_,TaskDateRangeFilter:()=>$d,TaskDetailBody:()=>dd,TaskDetailDrawer:()=>v_,TaskDetailHeader:()=>ed,TaskIconPickerPopover:()=>hi,TaskLabelChips:()=>ci,TaskLinkDialog:()=>el,TaskNoteField:()=>od,TaskPriorityChip:()=>Tn,TaskRuleManageDialog:()=>C3,TaskStatusChip:()=>ir,TaskStatusChips:()=>Pv,TaskTemplateManageDialog:()=>R3,TaskTemplateRunDialog:()=>O3,TaskboxManualDialog:()=>_3,TaskboxProvider:()=>hh,WorkloadCapacityDialog:()=>bd,WorkloadChart:()=>Pd,WorkloadPersonTasks:()=>Nd,WorkloadPersonTasksDialog:()=>Ld,WorkloadTimelineGrid:()=>Fd,addDaysToDate:()=>Cf,averageWorkload:()=>Od,buildCardBaseSx:()=>qa,buildCumulativeFlow:()=>Sd,buildLeadCycleDistribution:()=>Td,buildPlannedTask:()=>wb,buildStatusOptionColors:()=>Eu,buildTaskColumnsPrintSvgPages:()=>dv,buildTaskDetailPrintData:()=>gv,buildTaskDetailPrintSvgPages:()=>rv,buildTaskGroupSections:()=>ka,buildTaskListPrintSvgPages:()=>Q2,buildTaskListXlsx:()=>mv,buildTaskRelationsModel:()=>jc,buildTaskShareText:()=>ny,buildTaskTimelinePrintSvgPages:()=>av,buildTaskboxShortcutHelp:()=>sa,buildTaskboxTheme:()=>ga,buildTemplateTasks:()=>Bf,buildWorkloadRows:()=>bl,buildWorkloadTimeline:()=>Ad,canAssignBugManager:()=>ju,canClaimTaskItem:()=>Ba,canCompleteTaskItem:()=>Fu,canDeleteTaskItem:()=>k0,canEditTaskCoreItem:()=>_0,canEditTaskItem:()=>So,canViewTaskItem:()=>Ca,canVolunteerTaskItem:()=>Ia,clampPrintText:()=>Gi,coreEditLocked:()=>fi,countTaskRelations:()=>Fc,countWorkdays:()=>kf,createTaskboxTheme:()=>n0,daysLeftUntil:()=>wf,defaultRepeatUntil:()=>Va,defaultTaskBoxFormValues:()=>jl,defaultTaskboxUiStateValues:()=>Fl,deleteLocked:()=>Ii,escapePrintXml:()=>ur,estimatePrintTextWidth:()=>Sl,filterFilesWithinLimit:()=>Hf,formatConfirmTime:()=>uw,formatHours:()=>Ww,formatKoreanDate:()=>oo,formatKoreanDateTime:()=>Gn,formatMonthDay:()=>rc,formatOffsetLabel:()=>n_,formatPrintDate:()=>su,formatPrintStamp:()=>vs,formatSprintOptionLabel:()=>so,getBugDeviceName:()=>Bu,getBugReproName:()=>Cu,getBugResolutionName:()=>ba,getBugStatusOption:()=>i0,getDefaultDateRange:()=>N_,getEventDisplayStatusOption:()=>As,getNoDueStatusRank:()=>Dv,getNoticeAckInfo:()=>$f,getNoticeStatusOption:()=>Iu,getNoticeTargetDisplay:()=>f_,getProjectIconAnchorComponent:()=>Iv,getProjectIconComponent:()=>$t,getReminderLabel:()=>H0,getReminderOptions:()=>sc,getRemindersLabel:()=>ac,getRepeatRuleLabel:()=>Ua,getStatusOptionsForTask:()=>va,getTabHeaderConfig:()=>u3,getTaskBoxColumnDefs:()=>Ta,getTaskBoxGridMinWidth:()=>Lu,getTaskBoxGridTemplate:()=>Nu,getTaskBoxTabKind:()=>f2,getTaskConfirmInfo:()=>ls,getTaskDisplayStatusOption:()=>Xr,getTaskStatusOption:()=>xa,groupGoogleEventsByDate:()=>cs,groupSeqFromTabKey:()=>bi,hasRelation:()=>y_,hasTaskRelations:()=>id,htmlToPlainText:()=>Ja,isCustomTabKey:()=>Wy,isFlowTask:()=>kd,isOpenPoolTaskItem:()=>zu,isOverCapacity:()=>xl,isOverloaded:()=>Rd,isPastEvent:()=>Vl,isSupportOriginTaskItem:()=>Ea,isTaskDone:()=>ya,isWaitingTask:()=>Ov,monthsAgoDate:()=>ml,narrowOrderSx:()=>Ro,nowDateTimeString:()=>x_,parseEstimatedHours:()=>eb,parseTaskTimeMs:()=>Kc,pickPersonWorkloadTasks:()=>yl,relationsOf:()=>zi,renderPrintHeader:()=>ii,resolveReminders:()=>Bo,resolveRowCapacity:()=>yx,resolveTaskStatusOptions:()=>es,resolveTaskboxTheme:()=>ql,resolveWorkloadCapacity:()=>Cv,selectDepartmentSharedTasks:()=>Qw,shareTaskText:()=>ms,sumRemainingHours:()=>Uw,summarizeNoticeTargets:()=>il,tabKeyFromGroupSeq:()=>w_,taskVisibilityOf:()=>ho,toTaskPrintRow:()=>au,toTimelinePrintRow:()=>lv,toYmd:()=>ei,toggleLabelKey:()=>wa,toggleReminder:()=>La,useBuildFileUrl:()=>Ts,useTaskAttachmentUploadMeta:()=>zf,useTaskboxConfig:()=>ct,useTaskboxForm:()=>Zm,useTaskboxShortcuts:()=>f3,useTaskboxTheme:()=>ht,useTaskboxUiState:()=>qo,useUploadMaxMb:()=>Cs,wideColumnSx:()=>zr,withOriginAuthorAvatar:()=>Ma,wrapPrintPage:()=>si,wrapPrintText:()=>ws});module.exports=Sv(e5);var hu="waiting",Tv="replied";var jo={basis:"count",default_capacity:0,by_account:{}};function Cv(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}}var Qi=require("react"),fh=require("@mui/material");var pu="--app-mobile-font-offset";function mn(e,f=0){return`calc(${e}px + max(0px, var(${pu}, 0px) - ${f}px))`}var mu=require("react/jsx-runtime"),dh=(0,Qi.createContext)({});function hh({config:e,children:f}){let g=(0,Qi.useMemo)(()=>e??{},[e]),l=g.mobileFontOffsetPx;return(0,mu.jsx)(dh.Provider,{value:g,children:l===void 0?f:(0,mu.jsx)(fh.Box,{sx:{display:"contents",[pu]:`${l}px`},children:f})})}function ct(){return(0,Qi.useContext)(dh)}function Ts(){let{buildFileUrl:e}=ct();return(0,Qi.useMemo)(()=>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 Cs(){let{uploadMaxMb:e}=ct();return e??50}var Xm=require("@ehfuse/forma");var gu=Y(require("@mui/icons-material/DoNotDisturbAltOutlined"),1),bu=Y(require("@mui/icons-material/BookmarkBorderOutlined"),1),ph=Y(require("@mui/icons-material/LabelOutlined"),1),mh=Y(require("@mui/icons-material/FlagOutlined"),1),gh=Y(require("@mui/icons-material/StarBorderOutlined"),1),bh=Y(require("@mui/icons-material/FolderOutlined"),1),yh=Y(require("@mui/icons-material/EventOutlined"),1),xh=Y(require("@mui/icons-material/BuildOutlined"),1),vh=Y(require("@mui/icons-material/LocalShippingOutlined"),1),wh=Y(require("@mui/icons-material/StorefrontOutlined"),1),_h=Y(require("@mui/icons-material/GroupsOutlined"),1),kh=Y(require("@mui/icons-material/LightbulbOutlined"),1),Sh=Y(require("@mui/icons-material/FavoriteBorderOutlined"),1),Th=Y(require("@mui/icons-material/AssignmentOutlined"),1),Ch=Y(require("@mui/icons-material/HomeOutlined"),1),Bh=Y(require("@mui/icons-material/WorkOutline"),1),Ih=Y(require("@mui/icons-material/SchoolOutlined"),1),Eh=Y(require("@mui/icons-material/LocalHospitalOutlined"),1),Mh=Y(require("@mui/icons-material/RestaurantOutlined"),1),Rh=Y(require("@mui/icons-material/LocalFloristOutlined"),1),Oh=Y(require("@mui/icons-material/DirectionsCarOutlined"),1),Ah=Y(require("@mui/icons-material/CampaignOutlined"),1),Dh=Y(require("@mui/icons-material/SavingsOutlined"),1),Ph=Y(require("@mui/icons-material/Inventory2Outlined"),1),Nh=Y(require("@mui/icons-material/CleaningServicesOutlined"),1),yu=Y(require("@mui/icons-material/HandymanOutlined"),1),Lh=Y(require("@mui/icons-material/LocalPhoneOutlined"),1),zh=Y(require("@mui/icons-material/EmailOutlined"),1),jh=Y(require("@mui/icons-material/ShoppingCartOutlined"),1),Fh=Y(require("@mui/icons-material/BarChartOutlined"),1),qh=Y(require("@mui/icons-material/PrintOutlined"),1),$h=Y(require("@mui/icons-material/SecurityOutlined"),1),Hh=Y(require("@mui/icons-material/AlarmOutlined"),1),Wh=Y(require("@mui/icons-material/AttachFileOutlined"),1),Uh=Y(require("@mui/icons-material/PhotoCameraOutlined"),1),Vh=Y(require("@mui/icons-material/ImageOutlined"),1),Kh=Y(require("@mui/icons-material/MenuBookOutlined"),1),Gh=Y(require("@mui/icons-material/EditOutlined"),1),Yh=Y(require("@mui/icons-material/KeyOutlined"),1),Xh=Y(require("@mui/icons-material/LockOutlined"),1),Zh=Y(require("@mui/icons-material/LockOpenOutlined"),1),Jh=Y(require("@mui/icons-material/SettingsOutlined"),1),Qh=Y(require("@mui/icons-material/CloudOutlined"),1),ep=Y(require("@mui/icons-material/WifiOutlined"),1),tp=Y(require("@mui/icons-material/ComputerOutlined"),1),rp=Y(require("@mui/icons-material/SmartphoneOutlined"),1),np=Y(require("@mui/icons-material/TvOutlined"),1),op=Y(require("@mui/icons-material/AccessTimeOutlined"),1),ip=Y(require("@mui/icons-material/TimerOutlined"),1),sp=Y(require("@mui/icons-material/MapOutlined"),1),ap=Y(require("@mui/icons-material/PlaceOutlined"),1),lp=Y(require("@mui/icons-material/NavigationOutlined"),1),cp=Y(require("@mui/icons-material/FlightOutlined"),1),up=Y(require("@mui/icons-material/TrainOutlined"),1),fp=Y(require("@mui/icons-material/DirectionsBusOutlined"),1),dp=Y(require("@mui/icons-material/DirectionsBikeOutlined"),1),hp=Y(require("@mui/icons-material/DirectionsWalkOutlined"),1),pp=Y(require("@mui/icons-material/DirectionsRunOutlined"),1),mp=Y(require("@mui/icons-material/FitnessCenterOutlined"),1),gp=Y(require("@mui/icons-material/SportsSoccerOutlined"),1),bp=Y(require("@mui/icons-material/EmojiEventsOutlined"),1),yp=Y(require("@mui/icons-material/CardGiftcardOutlined"),1),xp=Y(require("@mui/icons-material/CakeOutlined"),1),xu=Y(require("@mui/icons-material/CoffeeOutlined"),1),vp=Y(require("@mui/icons-material/LocalPizzaOutlined"),1),wp=Y(require("@mui/icons-material/ShoppingBagOutlined"),1),vu=Y(require("@mui/icons-material/CreditCardOutlined"),1),_p=Y(require("@mui/icons-material/AccountBalanceOutlined"),1),kp=Y(require("@mui/icons-material/AccountBalanceWalletOutlined"),1),Sp=Y(require("@mui/icons-material/AttachMoneyOutlined"),1),Tp=Y(require("@mui/icons-material/ReceiptLongOutlined"),1),Cp=Y(require("@mui/icons-material/CalculateOutlined"),1),Bp=Y(require("@mui/icons-material/TrendingUpOutlined"),1),Ip=Y(require("@mui/icons-material/ListAltOutlined"),1),Ep=Y(require("@mui/icons-material/TaskAltOutlined"),1),Mp=Y(require("@mui/icons-material/DoneAllOutlined"),1),Rp=Y(require("@mui/icons-material/WarningAmberOutlined"),1),Op=Y(require("@mui/icons-material/InfoOutlined"),1),Ap=Y(require("@mui/icons-material/HelpOutlined"),1),Dp=Y(require("@mui/icons-material/SupportAgentOutlined"),1),Pp=Y(require("@mui/icons-material/PersonOutlined"),1),Np=Y(require("@mui/icons-material/PersonAddOutlined"),1),Lp=Y(require("@mui/icons-material/BadgeOutlined"),1),zp=Y(require("@mui/icons-material/WbSunnyOutlined"),1),jp=Y(require("@mui/icons-material/DarkModeOutlined"),1),Fp=Y(require("@mui/icons-material/LocalFireDepartmentOutlined"),1),qp=Y(require("@mui/icons-material/WaterDropOutlined"),1),$p=Y(require("@mui/icons-material/BoltOutlined"),1),Hp=Y(require("@mui/icons-material/AutorenewOutlined"),1),Wp=Y(require("@mui/icons-material/ScienceOutlined"),1),Up=Y(require("@mui/icons-material/MedicalServicesOutlined"),1),Vp=Y(require("@mui/icons-material/NotificationsOutlined"),1),Kp=Y(require("@mui/icons-material/SendOutlined"),1),Gp=Y(require("@mui/icons-material/LinkOutlined"),1),Yp=Y(require("@mui/icons-material/PublicOutlined"),1),wu=Y(require("@mui/icons-material/ApartmentOutlined"),1),Xp=Y(require("@mui/icons-material/PlumbingOutlined"),1),Zp=Y(require("@mui/icons-material/ElectricalServicesOutlined"),1),Jp=Y(require("@mui/icons-material/ChatOutlined"),1),Qp=Y(require("@mui/icons-material/DescriptionOutlined"),1),em=Y(require("@mui/icons-material/FactCheckOutlined"),1),tm=Y(require("@mui/icons-material/RocketLaunchOutlined"),1),rm=Y(require("@mui/icons-material/PaletteOutlined"),1),nm=Y(require("@mui/icons-material/MusicNoteOutlined"),1),om=Y(require("@mui/icons-material/VideocamOutlined"),1),im=Y(require("@mui/icons-material/ThumbUpOutlined"),1),sm=Y(require("@mui/icons-material/PushPinOutlined"),1),am=Y(require("@mui/icons-material/SearchOutlined"),1),lm=Y(require("@mui/icons-material/VisibilityOutlined"),1),cm=Y(require("@mui/icons-material/VerifiedOutlined"),1),um=Y(require("@mui/icons-material/TrackChangesOutlined"),1),fm=Y(require("@mui/icons-material/ExtensionOutlined"),1),dm=Y(require("@mui/icons-material/CodeOutlined"),1),hm=Y(require("@mui/icons-material/BugReportOutlined"),1),pm=Y(require("@mui/icons-material/SmartToyOutlined"),1),mm=Y(require("@mui/icons-material/StorageOutlined"),1),gm=Y(require("@mui/icons-material/QrCode2Outlined"),1),bm=Y(require("@mui/icons-material/FileDownloadOutlined"),1),ym=Y(require("@mui/icons-material/FileUploadOutlined"),1),xm=Y(require("@mui/icons-material/MicOutlined"),1),vm=Y(require("@mui/icons-material/HeadphonesOutlined"),1),wm=Y(require("@mui/icons-material/MovieOutlined"),1),_m=Y(require("@mui/icons-material/SportsEsportsOutlined"),1),km=Y(require("@mui/icons-material/BrushOutlined"),1),Sm=Y(require("@mui/icons-material/ArchitectureOutlined"),1),Tm=Y(require("@mui/icons-material/EngineeringOutlined"),1),Cm=Y(require("@mui/icons-material/FactoryOutlined"),1),Bm=Y(require("@mui/icons-material/AgricultureOutlined"),1),Im=Y(require("@mui/icons-material/DirectionsBoatOutlined"),1),Em=Y(require("@mui/icons-material/TwoWheelerOutlined"),1),Mm=Y(require("@mui/icons-material/HandshakeOutlined"),1),Rm=Y(require("@mui/icons-material/GavelOutlined"),1),Om=Y(require("@mui/icons-material/BalanceOutlined"),1),Am=Y(require("@mui/icons-material/TranslateOutlined"),1),Dm=Y(require("@mui/icons-material/PsychologyOutlined"),1),Pm=Y(require("@mui/icons-material/PetsOutlined"),1),Nm=Y(require("@mui/icons-material/CelebrationOutlined"),1),Lm=Y(require("@mui/icons-material/BeachAccessOutlined"),1),zm=Y(require("@mui/icons-material/AcUnitOutlined"),1),jm=Y(require("@mui/icons-material/ForestOutlined"),1),Fm=Y(require("@mui/icons-material/LandscapeOutlined"),1),qm=Y(require("@mui/icons-material/HotelOutlined"),1),$m=Y(require("@mui/icons-material/LocalLaundryServiceOutlined"),1),Hm=Y(require("@mui/icons-material/ChairOutlined"),1),Wm=Y(require("@mui/icons-material/LocalBarOutlined"),1),Um=Y(require("@mui/icons-material/LunchDiningOutlined"),1),Vm=Y(require("@mui/icons-material/IcecreamOutlined"),1),Km=Y(require("@mui/icons-material/WorkspacePremiumOutlined"),1),Gm=Y(require("@mui/icons-material/DiamondOutlined"),1),Ym=Y(require("@mui/icons-material/VaccinesOutlined"),1),Ll="bookmark",Fo="label",$r="notifications",Yr="event",Bs="warning",Is="#e53e3e",_u="none",zl=[{key:_u,Icon:gu.default},{key:"label",Icon:ph.default},{key:"bookmark",Icon:bu.default},{key:"flag",Icon:mh.default},{key:"star",Icon:gh.default},{key:"folder",Icon:bh.default},{key:"event",Icon:yh.default},{key:"build",Icon:xh.default},{key:"shipping",Icon:vh.default},{key:"store",Icon:wh.default},{key:"groups",Icon:_h.default},{key:"idea",Icon:kh.default},{key:"heart",Icon:Sh.default},{key:"assignment",Icon:Th.default},{key:"home",Icon:Ch.default},{key:"work",Icon:Bh.default},{key:"school",Icon:Ih.default},{key:"hospital",Icon:Eh.default},{key:"restaurant",Icon:Mh.default},{key:"flower",Icon:Rh.default},{key:"car",Icon:Oh.default},{key:"campaign",Icon:Ah.default},{key:"savings",Icon:Dh.default},{key:"inventory",Icon:Ph.default},{key:"cleaning",Icon:Nh.default},{key:"handyman",Icon:yu.default},{key:"phone",Icon:Lh.default},{key:"email",Icon:zh.default},{key:"cart",Icon:jh.default},{key:"chart",Icon:Fh.default},{key:"print",Icon:qh.default},{key:"security",Icon:$h.default},{key:"alarm",Icon:Hh.default},{key:"attach",Icon:Wh.default},{key:"camera",Icon:Uh.default},{key:"image",Icon:Vh.default},{key:"book",Icon:Kh.default},{key:"edit",Icon:Gh.default},{key:"key",Icon:Yh.default},{key:"lock",Icon:Xh.default},{key:"unlock",Icon:Zh.default},{key:"settings",Icon:Jh.default},{key:"cloud",Icon:Qh.default},{key:"wifi",Icon:ep.default},{key:"computer",Icon:tp.default},{key:"smartphone",Icon:rp.default},{key:"tv",Icon:np.default},{key:"clock",Icon:op.default},{key:"timer",Icon:ip.default},{key:"map",Icon:sp.default},{key:"place",Icon:ap.default},{key:"navigation",Icon:lp.default},{key:"flight",Icon:cp.default},{key:"train",Icon:up.default},{key:"bus",Icon:fp.default},{key:"bike",Icon:dp.default},{key:"walk",Icon:hp.default},{key:"run",Icon:pp.default},{key:"fitness",Icon:mp.default},{key:"soccer",Icon:gp.default},{key:"trophy",Icon:bp.default},{key:"gift",Icon:yp.default},{key:"cake",Icon:xp.default},{key:"coffee",Icon:xu.default},{key:"pizza",Icon:vp.default},{key:"bag",Icon:wp.default},{key:"card",Icon:vu.default},{key:"bank",Icon:_p.default},{key:"wallet",Icon:kp.default},{key:"money",Icon:Sp.default},{key:"receipt",Icon:Tp.default},{key:"calculate",Icon:Cp.default},{key:"trending",Icon:Bp.default},{key:"listalt",Icon:Ip.default},{key:"task",Icon:Ep.default},{key:"doneall",Icon:Mp.default},{key:"warning",Icon:Rp.default},{key:"info",Icon:Op.default},{key:"help",Icon:Ap.default},{key:"support",Icon:Dp.default},{key:"person",Icon:Pp.default},{key:"personadd",Icon:Np.default},{key:"badge",Icon:Lp.default},{key:"sun",Icon:zp.default},{key:"moon",Icon:jp.default},{key:"fire",Icon:Fp.default},{key:"water",Icon:qp.default},{key:"bolt",Icon:$p.default},{key:"renew",Icon:Hp.default},{key:"science",Icon:Wp.default},{key:"medical",Icon:Up.default},{key:"notifications",Icon:Vp.default},{key:"send",Icon:Kp.default},{key:"link",Icon:Gp.default},{key:"public",Icon:Yp.default},{key:"apartment",Icon:wu.default},{key:"plumbing",Icon:Xp.default},{key:"electrical",Icon:Zp.default},{key:"chat",Icon:Jp.default},{key:"description",Icon:Qp.default},{key:"factcheck",Icon:em.default},{key:"rocket",Icon:tm.default},{key:"palette",Icon:rm.default},{key:"music",Icon:nm.default},{key:"video",Icon:om.default},{key:"thumbup",Icon:im.default},{key:"pin",Icon:sm.default},{key:"search",Icon:am.default},{key:"eye",Icon:lm.default},{key:"verified",Icon:cm.default},{key:"target",Icon:um.default},{key:"extension",Icon:fm.default},{key:"code",Icon:dm.default},{key:"bug",Icon:hm.default},{key:"robot",Icon:pm.default},{key:"storage",Icon:mm.default},{key:"qrcode",Icon:gm.default},{key:"download",Icon:bm.default},{key:"upload",Icon:ym.default},{key:"mic",Icon:xm.default},{key:"headphones",Icon:vm.default},{key:"movie",Icon:wm.default},{key:"game",Icon:_m.default},{key:"brush",Icon:km.default},{key:"architecture",Icon:Sm.default},{key:"engineering",Icon:Tm.default},{key:"factory",Icon:Cm.default},{key:"agriculture",Icon:Bm.default},{key:"boat",Icon:Im.default},{key:"motorcycle",Icon:Em.default},{key:"handshake",Icon:Mm.default},{key:"gavel",Icon:Rm.default},{key:"balance",Icon:Om.default},{key:"translate",Icon:Am.default},{key:"psychology",Icon:Dm.default},{key:"pets",Icon:Pm.default},{key:"celebration",Icon:Nm.default},{key:"beach",Icon:Lm.default},{key:"snow",Icon:zm.default},{key:"forest",Icon:jm.default},{key:"mountain",Icon:Fm.default},{key:"hotel",Icon:qm.default},{key:"laundry",Icon:$m.default},{key:"chair",Icon:Hm.default},{key:"bar",Icon:Wm.default},{key:"burger",Icon:Um.default},{key:"icecream",Icon:Vm.default},{key:"medal",Icon:Km.default},{key:"diamond",Icon:Gm.default},{key:"vaccine",Icon:Ym.default}],Bv={cafe:xu.default,payment:vu.default,business:wu.default,construction:yu.default};function $t(e){return e===_u?null:zl.find(f=>f.key===e)?.Icon??Bv[String(e??"")]??bu.default}function Iv(e){return $t(e)??gu.default}var jl={title:"",icon:Fo,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:""},Fl={createAttachmentFiles:[],createSubmitting:!1,attachmentUpload:null};function Zm(e){let{formId:f="taskbox-create-form",initialValues:g,onValidate:l,onSubmit:o}=e;return(0,Xm.useGlobalForm)({formId:f,initialValues:{...jl,...g},onValidate:l,onSubmit:o})}var Jm=require("@ehfuse/forma");var ku="taskbox-ui-state";function qo(){return(0,Jm.useGlobalFormaState)({stateId:ku,initialValues:Fl})}var t0=require("react"),r0=require("@mui/material");function Es(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 Qm(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 Su(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 Ev(e,f){let g=f==="dark";return{bg:g?Qm(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 e0(e,f){return{...e,...f??{}}}function ga(e,f="light"){let g=f==="dark",l=Ev(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 ql(e,f){if(!f)return e;let g=f.mode??e.mode,o={...g===e.mode?e.colors:Su(e.colors.accent,e.colors.accentContrast,g),...f.colors??{}},s=ga(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:e0(s.table.groupHeader.badge,i)}},board:{...s.board,...c,badge:e0(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 n0(e={}){let{mode:f="light",accent:g="#2563eb",accentContrast:l="#ffffff",input:o}=e;return ql(ga(Su(g,l,f),f),o)}function ht(){let e=(0,r0.useTheme)(),{theme:f}=ct(),g=e.palette.primary.main,l=e.palette.primary.contrastText,o=e.palette.mode==="dark"?"dark":"light";return(0,t0.useMemo)(()=>ql(ga(Su(g,l,o),o),f),[g,l,o,f])}var Tt=require("react"),jt=require("@mui/material"),Yu=Y(require("@mui/icons-material/Add"),1),J0=Y(require("@mui/icons-material/ArrowUpward"),1),Q0=Y(require("@mui/icons-material/ArrowDownward"),1),eg=Y(require("@mui/icons-material/KeyboardArrowDown"),1),tg=Y(require("@mui/icons-material/KeyboardArrowRight"),1),uc=Y(require("@mui/icons-material/Check"),1),rg=Y(require("@mui/icons-material/FilterList"),1),ng=Y(require("@mui/icons-material/InboxOutlined"),1),og=require("react-virtuoso"),ig=Y(require("@ehfuse/overlay-scrollbar"),1);var Tu=require("@mui/material");var $l=require("react/jsx-runtime"),Mv={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 Tn({priority:e,small:f=!1,plain:g=!1}){let l=Mv[e],o=ht(),s=o.mode==="dark",r=g||e==="low";return(0,$l.jsxs)(Tu.Box,{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?Es(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:[(0,$l.jsx)(Tu.Box,{component:"span",sx:{width:f?6:8,height:f?6:8,borderRadius:"50%",bgcolor:l.dot}}),l.label]})}var ts=require("@mui/material"),s0=Y(require("@mui/icons-material/Check"),1);function $o(){return{}}var Hl=[{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"}],Wl=[{key:"desktop",name:"\uB370\uC2A4\uD06C\uD1B1"},{key:"tablet",name:"\uD0DC\uBE14\uB9BF"},{key:"mobile",name:"\uD734\uB300\uD3F0"}],Ul=[{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 Cu(e){return Hl.find(f=>f.key===e)?.name??""}function Bu(e){return Wl.find(f=>f.key===e)?.name??""}function ba(e){return Ul.find(f=>f.key===e)?.name??""}function Vl(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 ya(e,f=new Date){return e.is_event?Vl(e,f):!!e.completed}var Wn=[{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"}],Os=Wn;function xa(e){return Wn.find(f=>f.key===e)??Wn[0]}var Ms={key:"completed",name:"\uC644\uB8CC",bg:"#e3eefb",fg:"#1d4f91",dot:"#2f80ed"};function Xr(e){if(e.is_notice)return Iu(e.status);if(e.is_bug&&e.completed){let f=ba(e.resolution)||"\uC644\uB8CC";return{...Ms,name:f}}return e.completed&&e.status!=="hold"?Ms:e.is_bug?i0(e.status):xa(e.status)}var o0={key:"event_ended",name:"\uC885\uB8CC",bg:"#efefed",fg:"#57564f",dot:"#9a9a97"};function As(e){return Vl(e)?o0:null}var Rs=[{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 Iu(e){return Rs.find(f=>f.key===e)??Rs[1]}var Kl="__closed__",Ci=[{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"}],Rv=[...Ci.filter(e=>e.key!=="bug_hold"),{key:Kl,name:"\uC644\uB8CC",bg:"#e3eefb",fg:"#1d4f91",dot:"#2f80ed"},...Ci.filter(e=>e.key==="bug_hold")];function i0(e){return Ci.find(f=>f.key===e)??Ci[0]}function va(e){return e.is_notice?Rs:e.is_bug?Ci:Os}function Ov(e){return e.status===hu}var Av={in_progress:0,not_started:2,hold:3};function Dv(e){return e.completed?9:Av[String(e.status??"")]??2}function es(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=As({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:[Iu(e.status),...l]:e.is_bug?[Xr({...e,is_notice:!1}),...l]:e.completed?[Ms,...l]:[xa(e.status),...l]}function Eu(e){return{bg:`${e}1f`,fg:e,dot:e}}function wa(e,f){return e.includes(f)?e.filter(g=>g!==f):[...e,f]}var _a=require("@mui/material");var Bi=require("react/jsx-runtime");function ir({option:e,small:f=!1}){let g=ht(),l=g.mode==="dark",o=e.key==="not_started";return(0,Bi.jsxs)(_a.Box,{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?Es(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:[(0,Bi.jsx)(_a.Box,{component:"span",sx:{width:f?6:8,height:f?6:8,borderRadius:"50%",bgcolor:e.dot,flexShrink:0}}),e.name]})}function Pv({task:e,statusOptions:f,small:g=!1}){let l=es(e,f);return l.length===0?null:(0,Bi.jsx)(_a.Box,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:.5},children:l.map(o=>(0,Bi.jsx)(ir,{option:o,small:g},o.key))})}function ci({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:(0,Bi.jsx)(_a.Box,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:.5},children:l.map(o=>(0,Bi.jsx)(ir,{option:o,small:!0},o.key))})}var ui=require("react/jsx-runtime");function rs({anchorEl:e,value:f,options:g=Wn,onSelect:l,onComplete:o,onClose:s}){let r=$o();return(0,ui.jsxs)(ts.Menu,{anchorEl:e,open:!!e,onClose:s,transitionDuration:0,...r,children:[g.map(t=>(0,ui.jsxs)(ts.MenuItem,{onClick:()=>{l(t.key),s()},sx:{fontSize:14,minWidth:150,gap:1},children:[(0,ui.jsx)(ir,{option:t}),f===t.key?(0,ui.jsx)(s0.default,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},t.key)),o?[(0,ui.jsx)(ts.Divider,{sx:{my:.5}},"complete-divider"),(0,ui.jsx)(ts.MenuItem,{onClick:()=>{o(),s()},sx:{fontSize:14,minWidth:150,gap:1},children:(0,ui.jsx)(ir,{option:Ms})},"complete")]:null]})}function Mu(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 Zr(e,f="YYYY-MM-DD"){let g=typeof e=="string"?Mu(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 a0(){return Zr(new Date)}var Gl=[{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"}],l0="__notice__",c0="__bug__",u0="__support__";function Nv(e){let f=new Date(`${e}T00:00:00`);return f.setDate(f.getDate()+(6-f.getDay())),Zr(f)}var Lv=[{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 zv(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 jv(e){return typeof e=="function"?e:f=>f.is_bug?"bug":f.is_support?"support":null}function ka(e,f,g,l=[],o=[],s="",r,t=!1){let n=e.filter(d=>d.is_notice);if(n.length>0){let d=ka(e.filter(u=>!u.is_notice),f,g,l,o,s,r,t);return[{key:l0,label:"\uACF5\uC9C0\uC0AC\uD56D",tasks:n},...d]}if(t){let d=jv(t),u=e.filter(m=>d(m)==="bug"),b=e.filter(m=>d(m)==="support");if(u.length>0||b.length>0){let m=ka(e.filter(x=>d(x)===null),f,g,l,o,s,r,!1);return[...u.length>0?[{key:c0,label:"\uC624\uB958",tasks:u}]:[],...b.length>0?[{key:u0,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=Nv(g);for(let u of e)i(zv(u,g,d),u);a=Lv}else if(f==="status"){for(let d of e)i(xa(d.status).key,d);a=Wn.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}var f0=Y(require("@mui/icons-material/LabelOutlined"),1),d0=Y(require("@mui/icons-material/NotesOutlined"),1),h0=Y(require("@mui/icons-material/AutorenewOutlined"),1),p0=Y(require("@mui/icons-material/CalendarTodayOutlined"),1),m0=Y(require("@mui/icons-material/EventOutlined"),1),Au=Y(require("@mui/icons-material/PersonOutlineOutlined"),1),Du=Y(require("@mui/icons-material/PeopleAltOutlined"),1),Yl=Y(require("@mui/icons-material/CheckCircleOutlineOutlined"),1),g0=Y(require("@mui/icons-material/FlagOutlined"),1),Xl=Y(require("@mui/icons-material/AccessTimeOutlined"),1),b0=Y(require("@mui/icons-material/StickyNote2Outlined"),1),y0=Y(require("@mui/icons-material/ViewKanbanOutlined"),1),x0=Y(require("@mui/icons-material/ConfirmationNumberOutlined"),1),v0=Y(require("@mui/icons-material/QuestionAnswerOutlined"),1),Jr=require("react/jsx-runtime"),Pu={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 Nu(e){return Ta(e).map(f=>Pu[f.id]).join(" ")}function Lu(e){return Ta(e).reduce((f,g)=>{let l=Pu[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 Fv={id:"deleted_time",label:"\uC0AD\uC81C\uC77C\uC2DC",icon:(0,Jr.jsx)(Xl.default,{sx:{fontSize:15}}),align:"center",sortable:!0},qv={id:"completed_time",label:"\uC644\uB8CC\uC77C\uC2DC",icon:(0,Jr.jsx)(Xl.default,{sx:{fontSize:15}}),align:"center",sortable:!0},$v={id:"created_time",label:"\uC791\uC131\uC77C\uC2DC",icon:(0,Jr.jsx)(Xl.default,{sx:{fontSize:15}}),align:"center",sortable:!0},Hv={id:"ticket_no",label:"\uD2F0\uCF13",icon:(0,Jr.jsx)(x0.default,{sx:{fontSize:15}}),align:"center"},Wv={id:"support_type",label:"\uC885\uB958",icon:(0,Jr.jsx)(f0.default,{sx:{fontSize:15}}),align:"center"},Uv={id:"author_name",label:"\uC791\uC131\uC790",icon:(0,Jr.jsx)(Au.default,{sx:{fontSize:15}}),align:"center",valueFilter:"author_name"},Vv={id:"answerer_names",label:"\uB2F5\uBCC0\uC790",icon:(0,Jr.jsx)(v0.default,{sx:{fontSize:15}}),align:"center",valueFilter:"answerer_names"},Kv={id:"project",label:"\uD504\uB85C\uC81D\uD2B8",icon:(0,Jr.jsx)(y0.default,{sx:{fontSize:15}}),projectFilter:!0},Gv={id:"targets",label:"\uB300\uC0C1\uC790",icon:(0,Jr.jsx)(Du.default,{sx:{fontSize:15}})},Ou={id:"priority",label:"\uC911\uC694\uB3C4",icon:(0,Jr.jsx)(g0.default,{sx:{fontSize:15}}),align:"center",priorityFilter:!0},Yv={id:"ack",label:"\uD655\uC778",icon:(0,Jr.jsx)(Yl.default,{sx:{fontSize:15}}),align:"center",ackFilter:!0},Xv={id:"confirm",label:"\uD655\uC778",icon:(0,Jr.jsx)(Yl.default,{sx:{fontSize:15}}),align:"center",ackFilter:!0};function Ru(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,Ou]:[...e.slice(0,g),Ou,...e.slice(g)]}function Ta(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=>Sa.find(m=>m.id===b);return[u("completed"),Wv,u("title"),u("status"),$v,u("start_date"),u("due_date"),Uv,Vv,{...u("manager_name"),align:"center"},u("receiver_names"),Ou]}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),Hv,...b.slice(x)]};if(s)return a(Ru(Sa.filter(u=>!["manager_name","receiver_names","request"].includes(u.id)).flatMap(u=>u.id==="due_date"?[u,Gv]:u.id==="note"?[Yv,u]:[u])));let h=g?Sa:Sa.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?Fv:qv,...h.slice(u)]}if(i==="action"){let u=h.findIndex(b=>b.id==="note");h=[...h.slice(0,u),Xv,...h.slice(u)]}if(!f)return a(Ru(h));let d=h.findIndex(u=>u.id==="receiver_names");return a(Ru([...h.slice(0,d+1),Kv,...h.slice(d+1)]))}var Sa=[{id:"completed",label:"\uC644\uB8CC",icon:null,align:"center"},{id:"title",label:"\uC81C\uBAA9",icon:(0,Jr.jsx)(d0.default,{sx:{fontSize:15}}),sortable:!0},{id:"status",label:"\uC0C1\uD0DC",icon:(0,Jr.jsx)(h0.default,{sx:{fontSize:15}}),align:"center",statusFilter:!0},{id:"start_date",label:"\uC2DC\uC791\uC77C\uC2DC",icon:(0,Jr.jsx)(p0.default,{sx:{fontSize:15}}),align:"center",sortable:!0},{id:"due_date",label:"\uB9C8\uAC10\uC608\uC815",icon:(0,Jr.jsx)(m0.default,{sx:{fontSize:15}}),align:"center",sortable:!0},{id:"manager_name",label:"\uCC45\uC784\uC790",icon:(0,Jr.jsx)(Au.default,{sx:{fontSize:15}}),memberFilter:"manager"},{id:"receiver_names",label:"\uCC38\uC870\uC790",icon:(0,Jr.jsx)(Du.default,{sx:{fontSize:15}}),memberFilter:"receivers"},{id:"request",label:"\uD655\uC778",icon:(0,Jr.jsx)(Yl.default,{sx:{fontSize:15}}),align:"center",ackFilter:!0},{id:"note",label:"\uBE44\uACE0",icon:(0,Jr.jsx)(b0.default,{sx:{fontSize:15}})}];var zn=require("@mui/material");var Zl=require("@mui/material");function dr(){let{isMobile:e}=ct(),f=(0,Zl.useTheme)(),g=(0,Zl.useMediaQuery)(f.breakpoints.up("lg"));return e!==void 0?e:!g}var Un=require("react/jsx-runtime");function w0(){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 Zv({title:e,content:f,confirmText:g,cancelText:l,titleFontSize:o,actionFontSize:s,actionMinHeight:r,onCancel:t,onConfirm:n}){return(0,Un.jsxs)(Un.Fragment,{children:[(0,Un.jsx)(zn.Typography,{component:"div",sx:{fontSize:o,fontWeight:700,color:"#0f172a",lineHeight:1.4},children:e}),f,(0,Un.jsxs)(zn.Box,{sx:{display:"flex",gap:2,justifyContent:"flex-end"},children:[(0,Un.jsx)(zn.Button,{size:"medium",variant:"outlined",color:"inherit",onClick:()=>{w0(),t()},fullWidth:!0,sx:{fontSize:s,minHeight:r,fontWeight:700},children:l}),(0,Un.jsx)(zn.Button,{size:"medium",variant:"contained",color:"primary",onClick:()=>{w0(),n()},fullWidth:!0,sx:{fontSize:s,minHeight:r,fontWeight:700},children:g})]})]})}function Qt({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=dr(),m=(0,Un.jsx)(Zv,{title:g,content:l,confirmText:o,cancelText:s,titleFontSize:c,actionFontSize:i,actionMinHeight:a,onCancel:d,onConfirm:u});return b?(0,Un.jsx)(zn.Dialog,{open:e,onClose:d,sx:{zIndex:h},slotProps:{paper:{sx:{p:3,display:"flex",flexDirection:"column",gap:3,minWidth:260}}},children:m}):(0,Un.jsx)(zn.Popper,{open:e,anchorEl:f,placement:r,sx:{zIndex:h},children:(0,Un.jsx)(zn.ClickAwayListener,{onClickAway:d,children:(0,Un.jsx)(zn.Paper,{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})})})}var Ql=require("react"),ec=require("@mui/material");var Jl=require("react/jsx-runtime");function Vn(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 Kn({open:e,anchorEl:f,nextCompleted:g,returnMode:l=!1,onCancel:o,onConfirm:s}){let[r,t]=(0,Ql.useState)("");(0,Ql.useEffect)(()=>{e&&t("")},[e]);let n=!g&&l;return(0,Jl.jsx)(Qt,{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?(0,Jl.jsx)(ec.Box,{sx:{mt:1},children:(0,Jl.jsx)(ec.TextField,{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():"")}})}var N0=require("react");function ho(e){let f=e.visibility;return f==="involved"||f==="group"||f==="all"?f:e.is_open?"all":"involved"}function Ca(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=ho(e);if(o==="all")return!0;if(o==="group"){let s=e.visibility_group_seq??0;return s>0&&g===s}return!1}function zu(e){return e.is_notice||e.is_event||e.completed||e.archived||(e.manager_account_seq??0)!==0?!1:ho(e)!=="involved"}function Ba(e,f){return f<=0||(e.author_account_seq??0)===f?!1:zu(e)}function Ia(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||zu(e)?!1:(e.receiver_account_seqs??[]).includes(f)}function ju(e){return!!e.is_bug&&(e.manager_account_seq??0)===0&&e.status==="bug_received"}function Ea(e){return(e.origin_license_seq??0)>0}function Fu(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 So(e,f){return f<=0?!1:Ea(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 _0(e,f){return f<=0?!1:Ea(e)?!0:e.is_notice?(e.author_account_seq??0)===f:(e.author_account_seq??0)===f||(e.manager_account_seq??0)===f}function k0(e,f){return f<=0?!1:Ea(e)?!0:(e.author_account_seq??0)===f}function fi(e,f,g){return g==="coreAuthorManager"?!_0(e,f):!So(e,f)}function Ii(e,f,g,l){return g==="coreAuthorManager"?!k0(e,f):l}var Jv=[119,121,141,143];function Ma(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||!Ea(e)||f?.get(l)===g)return f;let o=new Map(f??[]);return o.set(l,g),o}var Ho=require("react"),gt=require("@mui/material"),R0=Y(require("@mui/icons-material/PublicOutlined"),1),O0=Y(require("@mui/icons-material/Group"),1),A0=Y(require("@mui/icons-material/CheckCircle"),1),D0=Y(require("@mui/icons-material/CheckCircleOutlineOutlined"),1);var Oa=require("react"),Aa=require("@mui/material"),T0=Y(require("@mui/icons-material/PersonOutlineOutlined"),1),Ra=require("react/jsx-runtime"),qu=new Set,S0=e=>e.startsWith("data:")||e.startsWith("blob:");function Qv(e){let f=e.trim();return f?([...f][0]??"").toUpperCase():""}function po({src:e,name:f="",avatarSx:g,iconFontSize:l=40}){let[o,s]=(0,Oa.useState)(()=>e?S0(e)||qu.has(e):!1),[r,t]=(0,Oa.useState)(!1),n={position:"relative",overflow:"hidden",borderRadius:"15px"},c=g?[n,...Array.isArray(g)?g:[g]]:n;if((0,Oa.useEffect)(()=>{t(!1),s(e?S0(e)||qu.has(e):!1)},[e]),!e||r){let i=Qv(f);return(0,Ra.jsx)(Aa.Avatar,{sx:c,children:i?(0,Ra.jsx)(Aa.Box,{component:"span",sx:{fontSize:"inherit",fontWeight:600,lineHeight:1,userSelect:"none"},children:i}):(0,Ra.jsx)(T0.default,{sx:{fontSize:l}})})}return(0,Ra.jsx)(Aa.Avatar,{src:e,imgProps:{onLoad:()=>{qu.add(e),s(!0)},onError:()=>t(!0),style:o?void 0:{opacity:0}},sx:c})}var ew=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),tc=(e,f)=>{if(!f||!f.trim())return[{text:e,highlight:!1}];try{let g=ew(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 tw=["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"];function oo(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("-",".")} (${tw[g.getDay()]})`}function rc(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 Gn(e){let f=String(e??"").trim(),[g,l=""]=f.split(" "),o=oo(g);return o?l?`${o} ${l.slice(0,5)}`:o:""}function Ds(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}`}var Pa=require("@mui/material");var Da=require("react/jsx-runtime"),ns=[{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 Cn({names:e,size:f=22,ringFirst:g=!1,avatarSrcByName:l}){let o=ht(),s=ct().avatarSrcByName,r=l??s;return(0,Da.jsx)(Pa.Box,{sx:{display:"flex",alignItems:"center"},children:e.map((t,n)=>(0,Da.jsx)(Pa.Tooltip,{title:g&&n===0?`\uCC45\uC784\uC790 \xB7 ${t}`:t,arrow:!0,children:(0,Da.jsx)(Pa.Box,{sx:{ml:n===0?0:"-7px",zIndex:n,borderRadius:"50%",border:`2px solid ${o.avatar.separatorColor}`,display:"inline-flex",...o.avatar.sx},children:(0,Da.jsx)(po,{src:r?.get(t)??"",name:t,avatarSx:{width:f,height:f,fontSize:Math.round(f/2),borderRadius:"50%",...ns[n%ns.length]},iconFontSize:Math.round(f*.6)})})},`${t}-${n}`))})}var Ps=require("@mui/material"),C0=Y(require("@mui/icons-material/CheckCircle"),1);var To=require("react/jsx-runtime");function rw(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 nw(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 os={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 Co({onClick:e,children:f,fullWidth:g=!1,sx:l}){let o=ht();return(0,To.jsx)(Ps.Button,{size:"small",variant:"contained",color:"inherit",fullWidth:g,sx:[nw(o),...Array.isArray(l)?l:l?[l]:[]],onClick:s=>{s.stopPropagation(),e(s)},children:f})}function is({canConfirm:e,count:f,total:g,myConfirmed:l=!1,onConfirm:o,onShowList:s}){let r=ht(),t=rw(r);return e?(0,To.jsx)(Co,{onClick:()=>o(),children:"\uD655\uC778"}):(0,To.jsxs)(Ps.Button,{size:"small",variant:"outlined",color:"inherit",sx:t,onClick:n=>{n.stopPropagation(),s(n.currentTarget)},children:[l?(0,To.jsx)(C0.default,{sx:{fontSize:16,color:"#2f80ed",flexShrink:0}}):null,(0,To.jsx)(Ps.Box,{component:"span",sx:{flex:1,textAlign:"center",minWidth:0},children:g>0&&f>=g?"\uD655\uC778\uC644\uB8CC":(0,To.jsxs)(To.Fragment,{children:[f,(0,To.jsx)(Ps.Box,{component:"span",sx:{mx:.15},children:"/"}),g]})})]})}var B0=require("react/jsx-runtime");function Ns({anchorEl:e,onCancel:f,onConfirm:g}){return(0,B0.jsx)(Qt,{open:!!e,anchorEl:e,title:"\uAC80\uC218\uB97C \uC644\uB8CC\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",onCancel:f,onConfirm:g})}var I0=require("@mui/material"),ss=require("react/jsx-runtime");function di({sx:e,...f}){return(0,ss.jsxs)(I0.SvgIcon,{viewBox:"0 0 48 48",...f,sx:{fill:"none",...e},children:[(0,ss.jsx)("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"}),(0,ss.jsx)("circle",{cx:"23.91",cy:"21.46",r:"2.71",fill:"currentColor",stroke:"none"}),(0,ss.jsx)("circle",{cx:"33.65",cy:"21.46",r:"2.71",fill:"currentColor",stroke:"none"}),(0,ss.jsx)("circle",{cx:"14.18",cy:"21.46",r:"2.71",fill:"currentColor",stroke:"none"})]})}var Ae=require("react/jsx-runtime");function Na(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 ow(e){let f=String(e.event_time??"").trim();return e.is_event&&/^\d{2}:\d{2}$/.test(f)?Na(`${String(e.due_date??"").slice(0,10)} ${f}`):Na(e.due_date)}function Hu(e,f){let g=String(e??"").trim()||"-";return tc(g,f).map((l,o)=>(0,Ae.jsx)("span",{className:l.highlight?"font-semibold text-blue-600":void 0,children:l.text},`${l.text}-${o}`))}function Ls({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(0,Ae.jsxs)(Ae.Fragment,{children:[(0,Ae.jsx)(po,{src:g?.get(s)??"",name:s,avatarSx:{width:24,height:24,fontSize:12,borderRadius:"50%",...ns[0]},iconFontSize:15}),(0,Ae.jsx)(gt.Box,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...l?{fontWeight:500,color:"#2f80ed"}:{}},children:Hu(s,f)})]})}return(0,Ae.jsx)(Cn,{names:o,size:22,avatarSrcByName:g})}function E0({display:e,summary:f,searchText:g,avatarSrcByName:l}){if(!e||e.kind==="everyone")return(0,Ae.jsx)(gt.Box,{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(0,Ae.jsx)(Ls,{names:s,searchText:g,avatarSrcByName:l});let r=[...o,...s],t=r.join(", ");return r.length>2?(0,Ae.jsx)(gt.Tooltip,{title:t,arrow:!0,children:(0,Ae.jsx)(gt.Box,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:`${r[0]}, ${r[1]} \uC678 ${r.length-2}\uBA85`})}):(0,Ae.jsx)(gt.Tooltip,{title:t,arrow:!0,children:(0,Ae.jsxs)(gt.Box,{sx:{display:"flex",alignItems:"center",gap:.75,minWidth:0},children:[(0,Ae.jsx)(gt.Box,{component:"span",sx:{flexShrink:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:o.join(", ")+(s.length>0?",":"")}),s.length>0?(0,Ae.jsx)(Ls,{names:s,searchText:g,avatarSrcByName:l}):null]})})}function nc(e){return e==="\uC624\uB958\uC81C\uBCF4"?"\uC624\uB958":e}function M0(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 $u({label:e,bg:f,fg:g}){return(0,Ae.jsx)(gt.Box,{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 P0=(0,Ho.memo)(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:I,projectLabel:M="",projectIcon:z="",onProjectClick:O,onRequestToggleCompleted:P,onDateClick:N,onChangeNote:$,onMemberClick:L,onClaimClick:C,onVolunteerClick:S,onStatusClick:D,onOpenDetail:p,onTaskContextMenu:y,hideBottomBorder:v=!1,completeLocked:w=!1,unread:_=!1,notice:T=!1,noticeReadOnly:R=!1,coreLocked:F,readOnly:H=!1,onIconClick:V,lastColumnCentered:A=!1,noteLocked:q=!1,targetSummary:B="",targetDisplay:E,onArchiveTask:j,ackInfo:U,onAckConfirm:X,onAckListClick:G,onPriorityClick:W}){let[Z,J]=(0,Ho.useState)(!1),[K,ee]=(0,Ho.useState)(null),[te,oe]=(0,Ho.useState)(""),ne=(0,Ho.useRef)(null);(0,Ho.useEffect)(()=>{if(!Z)return;let me=Jt=>{let Ue=ne.current;Ue&&(Jt.target instanceof Node&&Ue.contains(Jt.target)||Ue.blur())};return document.addEventListener("mousedown",me,!0),document.addEventListener("touchstart",me,!0),()=>{document.removeEventListener("mousedown",me,!0),document.removeEventListener("touchstart",me,!0)}},[Z]);let ie=[f.manager_account_seq??0,...f.receiver_account_seqs??[]].some(me=>me>0&&me!==(f.author_account_seq??0)),ae=R||H,pe=(F??R)||H,ye=r>0&&!f.is_notice&&!f.is_event&&(f.manager_account_seq??0)===r,Se=pe||!!f.is_notice,Be=ht(),Ce=!!C&&Ba(f,r),Pe=!!S&&Ia(f,r),ft=Se&&!ju(f),xe=f.is_notice?(0,Ae.jsx)(is,{canConfirm:!!U?.canAck,count:U?.count??0,total:U?.total??0,myConfirmed:!!U?.acked,onConfirm:()=>X?.(f),onShowList:me=>G?.(f,me)}):null,se=!f.is_notice&&!f.completed&&!!f.due_date&&f.due_date.slice(0,10)<=t,Ie=ct(),ke=Ds(f,Ie.resolveTask),_e=!f.is_notice&&f.completed&&f.review_pending&&Ie.onReviewDone&&(Ie.myAccountSeq??0)>0&&(f.author_account_seq??0)===(Ie.myAccountSeq??0)?(0,Ae.jsxs)(Ae.Fragment,{children:[(0,Ae.jsx)(gt.Button,{variant:"contained",size:"small",disableElevation:!0,onClick:me=>{me.stopPropagation(),ee(me.currentTarget)},sx:os,children:"\uAC80\uC218\uC644\uB8CC"}),(0,Ae.jsx)(Ns,{anchorEl:K,onCancel:()=>ee(null),onConfirm:()=>{Ie.onReviewDone?.(f),ee(null)}})]}):null,rt=se?"#e5484d":Be.colors.textPrimary,Fe=(0,Ae.jsx)(gt.Box,{className:"cell",onClick:pe?void 0:me=>N(f,"due_date",me.currentTarget),sx:{justifyContent:"center",color:rt,fontWeight:500,whiteSpace:"nowrap",...pe?{}:{cursor:"pointer","&:hover":{bgcolor:Be.table.cellHoverBg}}},children:f.due_date?ow(f):null});return(0,Ae.jsxs)(gt.Box,{onContextMenu:me=>y(f,me),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,...A?{pl:2}:{}}},children:[(0,Ae.jsx)(gt.Box,{className:"cell",sx:{justifyContent:"center"},children:f.is_event?(()=>{let me=$t(f.icon||Yr);if(!me)return null;let Jt=(0,Ae.jsx)(me,{sx:{fontSize:19,color:f.icon_color||"#1e3a8a"}});return ae||!V?Jt:(0,Ae.jsx)(gt.Tooltip,{title:"\uC544\uC774\uCF58 \uBCC0\uACBD",arrow:!0,enterDelay:400,disableInteractive:!0,children:(0,Ae.jsx)(gt.ButtonBase,{onClick:Ue=>{Ue.stopPropagation(),V(f,Ue.currentTarget)},sx:{p:.25,borderRadius:1,"&:hover":{bgcolor:Be.table.cellHoverBg}},children:Jt})})})():!R&&!w&&!m?(0,Ae.jsx)(gt.Tooltip,{title:f.completed&&f.completed_by?`${f.completed_by} \xB7 ${Gn(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:(0,Ae.jsx)(gt.Checkbox,{checked:f.completed,inputProps:{"aria-label":f.completed?`${f.title} \uC644\uB8CC \uD574\uC81C`:`${f.title} \uC644\uB8CC \uCC98\uB9AC`},icon:(0,Ae.jsx)(D0.default,{sx:{fontSize:20,color:"#9a9a97",opacity:.45}}),checkedIcon:(0,Ae.jsx)(A0.default,{sx:{fontSize:20,color:"#2f80ed"}}),onClick:me=>me.stopPropagation(),onChange:(me,Jt)=>P({anchorEl:me.currentTarget,task:f,nextCompleted:Jt}),sx:{p:.5}})}):null}),d?(0,Ae.jsx)(gt.Box,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap",fontVariantNumeric:"tabular-nums",color:"#37352f"},children:f.ticket_no||"-"}):null,u?(0,Ae.jsx)(gt.Box,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap"},children:f.support_type?(()=>{let me=M0(f.support_type);return(0,Ae.jsx)($u,{label:nc(f.support_type),bg:me.bg,fg:me.fg})})():"-"}):null,(0,Ae.jsxs)(gt.Box,{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 me=$t(f.icon||$r);return me?(0,Ae.jsx)(me,{sx:{fontSize:18,flexShrink:0,color:f.icon_color||"#e5484d"}}):null})(),!u&&f.is_support&&f.support_type?(()=>{let me=M0(f.support_type);return(0,Ae.jsx)($u,{label:nc(f.support_type),bg:me.bg,fg:me.fg})})():null,d&&(f.origin_license_seq??0)>0&&f.origin_license_name?(0,Ae.jsx)($u,{label:f.origin_license_name,bg:"#fdf0e6",fg:"#d9730d"}):null,(()=>{if(f.is_notice||u||f.is_support)return null;let me=ho(f);return me==="involved"?null:(0,Ae.jsx)(gt.Tooltip,{title:me==="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:me==="all"?(0,Ae.jsx)(R0.default,{sx:{fontSize:15,flexShrink:0,color:"#2f80ed"}}):(0,Ae.jsx)(O0.default,{sx:{fontSize:15,flexShrink:0,color:"#d9730d"}})})})(),(0,Ae.jsx)(gt.Box,{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:Hu(f.title,s)}),ke?(0,Ae.jsx)(gt.Box,{component:"span",sx:{flexShrink:0,fontSize:12.5,color:Be.colors.textMuted,fontVariantNumeric:"tabular-nums"},children:ke}):null,(f.comment_count??f.comments?.length??0)>0?(0,Ae.jsx)(di,{sx:{fontSize:16,flexShrink:0,color:"#9a9a97"}}):null,(0,Ae.jsx)(gt.Box,{sx:{flexShrink:0,display:"flex",alignItems:"center"},children:(0,Ae.jsx)(ci,{labelKeys:f.label_keys??[],labelOptions:l})}),_&&!f.completed?(0,Ae.jsx)(gt.Box,{component:"span",sx:{flexShrink:0,px:.55,fontSize:10.5,fontWeight:700,lineHeight:1.6,color:"#fff",bgcolor:"#e5484d",borderRadius:"4px"},children:"N"}):null,ya(f)&&!f.archived&&!ae&&j?(0,Ae.jsx)(gt.Button,{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:me=>{me.stopPropagation(),j(f)},children:"\uBCF4\uAD00"}):null]}),(()=>{let me=ae||!!f.is_event||!!f.completed;return(0,Ae.jsx)(gt.Box,{className:"cell",onClick:me?void 0:Jt=>D(f,Jt.currentTarget),sx:{py:.5,justifyContent:"center",...me?{}:{cursor:"pointer","&:hover":{bgcolor:Be.table.cellHoverBg}}},children:f.is_event?(()=>{let Jt=As(f);return Jt?(0,Ae.jsx)(ir,{option:Jt}):null})():(0,Ae.jsx)(ir,{option:Xr(f)})})})(),u?(0,Ae.jsx)(gt.Box,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap",fontVariantNumeric:"tabular-nums"},children:Na(f.created_time)}):null,(0,Ae.jsx)(gt.Box,{className:"cell",onClick:pe?void 0:me=>N(f,"start_date",me.currentTarget),sx:{justifyContent:"center",whiteSpace:"nowrap",...pe?{}:{cursor:"pointer","&:hover":{bgcolor:Be.table.cellHoverBg}}},children:Na(f.start_date)}),Fe,u?(0,Ae.jsxs)(Ae.Fragment,{children:[(0,Ae.jsx)(gt.Tooltip,{title:f.origin_license_name||"",arrow:!0,placement:"top",disableInteractive:!0,slotProps:{transition:{timeout:0}},children:(0,Ae.jsx)(gt.Box,{className:"cell",sx:{gap:.75,justifyContent:"center"},children:(0,Ae.jsx)(Ls,{names:[f.author_name||f.origin_author_name||f.created_by||""],searchText:s,avatarSrcByName:Ma(f,o)})})}),(0,Ae.jsx)(gt.Box,{className:"cell",sx:{gap:.75,justifyContent:"center"},children:(0,Ae.jsx)(Ls,{names:(f.answerer_names??[]).slice(0,1),searchText:s,avatarSrcByName:o})})]}):null,T?(0,Ae.jsx)(gt.Box,{className:"cell",onClick:pe?void 0:()=>L(f,"targets"),sx:{gap:.75,...pe?{}:{cursor:"pointer","&:hover":{bgcolor:Be.table.cellHoverBg}}},children:(0,Ae.jsx)(E0,{display:E,summary:B,searchText:s,avatarSrcByName:o})}):null,!T&&f.is_notice?(0,Ae.jsx)(gt.Box,{className:"cell",onClick:pe?void 0:()=>L(f,"targets"),sx:{gridColumn:c?"span 2":"auto",gap:.75,...pe?{}:{cursor:"pointer","&:hover":{bgcolor:Be.table.cellHoverBg}}},children:(0,Ae.jsx)(E0,{display:E,summary:B,searchText:s,avatarSrcByName:o})}):null,!T&&!f.is_notice&&!f.is_event&&c?(0,Ae.jsx)(gt.Box,{className:"cell",onClick:ft?void 0:()=>L(f,"manager"),sx:{gap:.75,...Ce||Pe||b?{justifyContent:"center"}:{},...ft?{}:{cursor:"pointer","&:hover":{bgcolor:Be.table.cellHoverBg}}},children:Ce?(0,Ae.jsx)(Co,{onClick:me=>C?.(f,me.currentTarget),children:"\uAC00\uC838\uAC00\uAE30"}):Pe?(0,Ae.jsx)(Co,{onClick:me=>S?.(f,me.currentTarget),children:"\uAC00\uC838\uAC00\uAE30"}):(0,Ae.jsx)(Ls,{names:f.manager_name?[f.manager_name]:[],searchText:s,avatarSrcByName:o,emphasize:ye})}):null,!T&&!f.is_notice?(0,Ae.jsx)(gt.Box,{className:"cell",onClick:Se?void 0:()=>L(f,"receivers"),sx:{gridColumn:f.is_event&&c?"span 2":"auto",gap:.75,...Se?{}:{cursor:"pointer","&:hover":{bgcolor:Be.table.cellHoverBg}}},children:(0,Ae.jsx)(Ls,{names:f.receiver_names,searchText:s,avatarSrcByName:o})}):null,(0,Ae.jsx)(gt.Box,{className:"cell",onClick:ae?void 0:me=>W?.(f,me.currentTarget),sx:{py:.5,justifyContent:"center",...ae?{}:{cursor:"pointer","&:hover":{bgcolor:Be.table.cellHoverBg}}},children:(0,Ae.jsx)(Tn,{priority:f.priority,plain:!0})}),n?(0,Ae.jsx)(gt.Box,{className:"cell",onClick:pe?void 0:me=>O?.(f,me.currentTarget),sx:{gap:.5,justifyContent:"flex-start",...pe?{}:{cursor:"pointer","&:hover":{bgcolor:Be.table.cellHoverBg}}},children:M?(0,Ae.jsxs)(Ae.Fragment,{children:[(()=>{let me=$t(z);return me?(0,Ae.jsx)(me,{sx:{fontSize:15,flexShrink:0,color:"#1e3a8a"}}):null})(),(0,Ae.jsx)(gt.Box,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:M})]}):null}):null,T?(0,Ae.jsx)(gt.Box,{className:"cell",sx:{justifyContent:"center"},children:xe}):null,!T&&i&&a&&!u?(0,Ae.jsx)(gt.Box,{className:"cell",sx:{justifyContent:"center"},children:f.is_notice?xe:_e||(ie?(0,Ae.jsx)(is,{canConfirm:!!k?.canConfirm,count:k?.count??0,total:k?.total??0,myConfirmed:!!k?.myTime,onConfirm:()=>I?.(f),onShowList:me=>G?.(f,me)}):null)}):null,!T&&h==="action"?(0,Ae.jsx)(gt.Box,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap",color:Be.table.rowSubColor},children:f.is_notice?xe:_e||(k&&k.total>0?(0,Ae.jsx)(is,{canConfirm:!!k.canConfirm,count:k.count,total:k.total,myConfirmed:!!k.myTime,onConfirm:()=>I?.(f),onShowList:me=>G?.(f,me)}):"-")}):null,!T&&!i?(0,Ae.jsx)(gt.Box,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap",color:m?Be.colors.danger:x?Be.table.rowSubColor:Be.table.rowTitleColor},children:m?Na(f.deleted_time):f.completed_time||"-"}):null,d||u?null:(0,Ae.jsx)(gt.Box,{className:"cell",onClick:()=>{!q&&!Z&&(oe(f.note),J(!0))},sx:{color:"#6f6f6c",cursor:q?"default":"text"},children:Z?(0,Ae.jsx)(gt.Box,{component:"input",ref:ne,autoFocus:!0,spellCheck:!1,value:te,onChange:me=>oe(me.target.value),onBlur:()=>{J(!1),te.trim()!==f.note&&$(f.seq,te)},onKeyDown:me=>{me.key==="Enter"&&me.target.blur(),me.key==="Escape"&&(oe(f.note),J(!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}}):(0,Ae.jsx)(gt.Box,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:f.note?Hu(f.note,s):""})}),ye?(0,Ae.jsx)(gt.Box,{component:"span",sx:{position:"absolute",left:3,top:6,bottom:6,width:3,bgcolor:"#2f80ed",borderRadius:1.5,pointerEvents:"none"}}):null]})});var z0=require("react/jsx-runtime"),L0=(0,N0.memo)(function(f){let l=(f.useTaskItem?f.useTaskItem(f.task.seq):void 0)??f.task,{myAccountSeq:o}=f,{editPolicy:s}=ct(),r=f.projectByKey.get(l.tab_key??"");return(0,z0.jsx)(P0,{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:!So(l,o),coreLocked:fi(l,o,s),readOnly:f.readOnly,noteLocked:f.readOnly||(l.is_notice?!Ca(l,o):!So(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})});var as=require("react"),vr=require("@mui/material"),Uu=Y(require("@mui/icons-material/ChevronRight"),1),j0=Y(require("@mui/icons-material/Check"),1),F0=Y(require("@mui/icons-material/NotificationsActiveOutlined"),1),ic=require("@ehfuse/mui-datetime-picker"),q0=Y(require("@mui/icons-material/TimerOutlined"),1);var oc=require("react");function Wo(e){let{loadHolidays:f}=ct(),[g,l]=(0,oc.useState)(()=>new Map),o=e.join(",");return(0,oc.useEffect)(()=>{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 Wu=["min30_before","hour1_before","hour2_before","same_day","day_before","two_days_before","three_days_before","week_before"];function Bo(e){let f=Array.isArray(e?.reminders)?e?.reminders:[e?.reminder],g=new Set;for(let l of f){let o=String(l??"").trim();Wu.includes(o)&&g.add(o)}return Wu.filter(l=>g.has(l))}function La(e,f){if(f==="none")return[];let g=e.includes(f)?e.filter(l=>l!==f):[...e,f];return Wu.filter(l=>g.includes(l))}var er=require("react/jsx-runtime"),iw=9,$0=[{value:"min30_before",label:"30\uBD84 \uC804"},{value:"hour1_before",label:"1\uC2DC\uAC04 \uC804"},{value:"hour2_before",label:"2\uC2DC\uAC04 \uC804"}],Vu=[{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"}],Ku=[{value:"none",label:"\uC5C6\uC74C"},...$0,...Vu];function sc(e){return e?Ku:[{value:"none",label:"\uC5C6\uC74C"},...Vu]}function H0(e){return e==="same_day"?"\uB2F9\uC77C":Ku.find(f=>f.value===e)?.label??"\uC5C6\uC74C"}function ac(e){if(e.length===0)return"\uC5C6\uC74C";let f=e.map(g=>H0(g));return f.length<=3?f.join(", "):`${f.slice(0,3).join(", ")} \uC678 ${f.length-3}`}function sw(e){let f=e?new Date(`${e}T00:00:00`):new Date;return Number.isNaN(f.getTime())?new Date:f}function io({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]=(0,as.useState)(null),[h,d]=(0,as.useState)(null),u=$o(),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:I}=ct(),M=`${String(Number.isInteger(I)&&I>=0&&I<=23?I:iw).padStart(2,"0")}:00`,z=S=>{if(x)return x;let D=new Date;return S===Zr(D)?`${String(D.getHours()).padStart(2,"0")}:${String(D.getMinutes()).padStart(2,"0")}`:M},[O,P]=(0,as.useState)(()=>{let S=Number(b.slice(0,4));return Number.isFinite(S)&&S>1900?S:new Date().getFullYear()}),N=(0,as.useMemo)(()=>[O-1,O,O+1],[O]),$=Wo(N),L=(0,as.useMemo)(()=>{let S=[];for(let D of $.keys()){let p=new Date(`${D}T00:00:00`);Number.isNaN(p.getTime())||S.push(p)}return S},[$]),C=(0,er.jsxs)(vr.Box,{sx:{width:300,maxWidth:"100%"},children:[(0,er.jsx)(vr.Box,{sx:{height:320},children:(0,er.jsx)(ic.SimpleCalendar,{selectedDate:sw(b),onSelect:S=>{k(Zr(S),s?z(Zr(S)):x),s||t()},onClose:t,showFooter:!1,autoApply:!0,holidays:L,onYearChange:S=>P(S),onMonthChange:(S,D)=>{typeof D=="number"&&P(D)}})}),s?(0,er.jsxs)(er.Fragment,{children:[(0,er.jsx)(vr.Divider,{sx:{borderColor:"#e6e6e3"}}),(0,er.jsxs)(vr.ButtonBase,{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:[(0,er.jsxs)(vr.Box,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:.75,color:"#37352f"},children:[(0,er.jsx)(q0.default,{sx:{fontSize:17,color:"#9a9a97"}}),"\uC2DC\uAC01"]}),(0,er.jsxs)(vr.Box,{component:"span",sx:{display:"inline-flex",alignItems:"center",color:"#37352f"},children:[x||"\uC5C6\uC74C",(0,er.jsx)(Uu.default,{sx:{fontSize:18,ml:.25,color:"#9a9a97"}})]})]}),(0,er.jsx)(ic.TimePicker,{anchorEl:h,open:!!h,onClose:()=>d(null),centered:r,value:{hour:x.slice(0,2)||M.slice(0,2),minute:x.slice(3,5)||"00"},format:"HH:mm",minuteStep:5,autoApply:!0,locale:"ko",onChange:(S,D)=>{k(b||Zr(new Date),`${S}:${D}`),d(null)}})]}):null,o?null:(0,er.jsxs)(er.Fragment,{children:[(0,er.jsx)(vr.Divider,{sx:{borderColor:"#e6e6e3"}}),(0,er.jsxs)(vr.ButtonBase,{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:[(0,er.jsxs)(vr.Box,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:.75,color:"#37352f"},children:[(0,er.jsx)(F0.default,{sx:{fontSize:17,color:"#9a9a97"}}),"\uC0AC\uC804\uC54C\uB9BC"]}),(0,er.jsxs)(vr.Box,{component:"span",sx:{display:"inline-flex",alignItems:"center",color:"#37352f"},children:[ac(l),(0,er.jsx)(Uu.default,{sx:{fontSize:18,ml:.25,color:"#9a9a97"}})]})]}),(0,er.jsx)(vr.Menu,{transitionDuration:0,anchorEl:i,open:!!i,onClose:()=>a(null),anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},...u,children:sc(!!x).map(S=>{let D=S.value==="none"?l.length===0:l.includes(S.value);return(0,er.jsxs)(vr.MenuItem,{selected:D,onClick:()=>{c(La(l,S.value)),S.value==="none"&&a(null)},sx:{fontSize:14,minWidth:140,justifyContent:"space-between",gap:1},children:[S.label,D?(0,er.jsx)(j0.default,{sx:{fontSize:16,color:"#2f80ed"}}):null]},S.value)})})]}),(0,er.jsx)(vr.Divider,{sx:{borderColor:"#e6e6e3"}}),(0,er.jsxs)(vr.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",px:1,py:.5},children:[(0,er.jsx)(vr.Button,{size:"small",onClick:()=>{k(Zr(new Date),s?z(Zr(new Date)):x),t()},sx:{minWidth:0,px:1.25,fontSize:13.5,color:"#2563eb"},children:"\uC624\uB298"}),(0,er.jsx)(vr.Button,{size:"small",onClick:t,sx:{minWidth:0,px:1.25,fontSize:13.5,color:"#2563eb"},children:"\uB2EB\uAE30"})]})]});return r?(0,er.jsx)(vr.Dialog,{open:f,onClose:t,slotProps:{paper:{sx:{borderRadius:3,width:300,maxWidth:"calc(100vw - 48px)",overflow:"hidden"}}},children:C}):(0,er.jsx)(vr.Popover,{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:C})}var zs=require("react"),mo=require("@mui/material"),W0=require("@ehfuse/mui-form-dialog"),U0=require("@ehfuse/mui-form-controls"),V0=require("@ehfuse/alerts");var cc=require("@mui/material");var lc=require("react/jsx-runtime");function za({value:e,onChange:f}){return(0,lc.jsx)(cc.Box,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(40px, 1fr))",gap:1},children:zl.map(({key:g,Icon:l})=>{let o=g===e;return(0,lc.jsx)(cc.ButtonBase,{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:(0,lc.jsx)(l,{sx:{fontSize:20}})},g)})})}var Yn=require("react/jsx-runtime");function ja({open:e,title:f="\uC0C8 \uD504\uB85C\uC81D\uD2B8 \uCD94\uAC00",initialLabel:g="",initialIcon:l=Ll,confirmText:o="\uCD94\uAC00",initialUseSprints:s=!1,onClose:r,onSubmit:t}){let[n,c]=(0,zs.useState)(""),[i,a]=(0,zs.useState)(Ll),[h,d]=(0,zs.useState)(!1);(0,zs.useEffect)(()=>{e&&(c(g),a(l),d(s))},[e]);let u=()=>{let m=n.trim();if(!m){(0,V0.ErrorAlert)("\uD504\uB85C\uC81D\uD2B8 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}t(m,i,h),r()};return(0,Yn.jsx)(W0.FormDialog,{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:(0,Yn.jsxs)(mo.Box,{children:[(0,Yn.jsx)(U0.ClearTextField,{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}}),(0,Yn.jsx)(mo.Box,{sx:{mt:2,fontSize:13,color:"#787774"},children:"\uC544\uC774\uCF58"}),(0,Yn.jsx)(mo.Box,{sx:{mt:1,maxHeight:264,overflowY:"auto",pr:.5},children:(0,Yn.jsx)(za,{value:i,onChange:a})}),(0,Yn.jsxs)(mo.Box,{sx:{mt:2,display:"flex",alignItems:"center",justifyContent:"space-between",gap:1},children:[(0,Yn.jsxs)(mo.Box,{children:[(0,Yn.jsx)(mo.Box,{sx:{fontSize:14,color:"#37352f"},children:"\uBAA9\uD45C(\uC2A4\uD504\uB9B0\uD2B8) \uC0AC\uC6A9"}),(0,Yn.jsx)(mo.Box,{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)"})]}),(0,Yn.jsx)(mo.Switch,{checked:h,onChange:(m,x)=>d(x)})]})]})}],actions:{showCancelButton:!0,right:(0,Yn.jsx)(mo.Button,{variant:"contained",onClick:u,children:o})}})}var K0=require("@mui/material"),G0=require("react/jsx-runtime");function js({size:e=40}){return(0,G0.jsx)(K0.Box,{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)"}}}})}var Uo=require("@mui/material"),Y0=Y(require("@mui/icons-material/Check"),1),X0=Y(require("@ehfuse/overlay-scrollbar"),1);var Io=require("react/jsx-runtime"),Gu=["#1e3a8a","#2f80ed","#06b6d4","#0fa3a3","#2f9e5b","#84cc16","#e8a33d","#d9730d","#e5484d","#e255a1","#a355c0","#8a5a2b","#57564f","#111827"];function hi({anchorEl:e,value:f,color:g="",onSelect:l,onSelectColor:o,onClose:s}){return(0,Io.jsx)(Uo.Popover,{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:(0,Io.jsxs)(Uo.Box,{sx:{width:"min(492px, calc(100vw - 32px))"},children:[(0,Io.jsx)(X0.default,{style:{maxHeight:"min(432px, calc(100dvh - 240px))"},contentStyle:{minWidth:0,padding:10},thumb:{width:6},children:(0,Io.jsx)(za,{value:f||Fo,onChange:r=>{l(r),s()}})}),o?(0,Io.jsxs)(Uo.Box,{sx:{px:1.25,pb:1.25},children:[(0,Io.jsx)(Uo.Divider,{sx:{mb:1,borderColor:"#efefed"}}),(0,Io.jsx)(Uo.Box,{sx:{display:"grid",gridTemplateColumns:`repeat(${Gu.length}, 1fr)`,justifyItems:"center"},children:Gu.map(r=>{let t=(g||Gu[0])===r;return(0,Io.jsx)(Uo.ButtonBase,{"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?(0,Io.jsx)(Y0.default,{sx:{fontSize:15,color:"#ffffff"}}):null},r)})})]}):null]})})}var ot=require("react/jsx-runtime"),Z0=48,aw=5;function Xu({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:I=!1,onChangeTaskIcon:M,onChangeTaskIconColor:z,onAddInGroup:O,canAddInGroup:P,renderGroupSummary:N,renderGroupTitleSummary:$,onChangeTaskProject:L,onAddProject:C,onChangeNote:S,onMemberClick:D,onClaimTask:p,onChangeTaskStatus:y,onOpenDetail:v,onTaskContextMenu:w,onMemberFilterClick:_,activeMemberFilters:T=[],onStatusFilterClick:R,statusFilterActive:F=!1,onAckFilterClick:H,ackFilterActive:V=!1,onProjectFilterClick:A,projectFilterActive:q=!1,onPriorityFilterClick:B,priorityFilterActive:E=!1,onValueFilterClick:j,activeValueFilters:U=[],columns:X,getConfirmInfo:G,onConfirmTask:W,myAccountSeq:Z=0,currentUserName:J="",groupManagerByMyRole:K=!1,pinKindGroups:ee=!1,allowManagerVolunteer:te=!0,noticeAdmin:oe=!1,getTargetSummary:ne,getTargetDisplay:ie,onArchiveTask:ae,isTaskUnread:pe,getAckInfo:ye,onAckConfirm:Se,onAckListClick:Be,onChangeTaskPriority:Ce,onEndReached:Pe,useTaskItem:ft}){let xe=ht(),se=(0,Tt.useMemo)(()=>({showManager:!0,showActions:!0,showRequest:!0,...X}),[X]),Ie=se.showManager??!0,ke=se.showActions??!0,_e=se.showRequest??!0,rt=se.confirmMode??"none",Fe=se.notice??!1,me=se.bug??!1,Jt=se.support??!1,Ue=Jt||(se.centerManager??!1),nt=se.trash??!1,qt=h!=="none",lt=(0,Tt.useMemo)(()=>qt?ka(e,h,o,u,f,J,{enabled:K,myAccountSeq:Z},ee):[],[qt,e,h,o,u,f,J,K,Z,ee]),Le=(0,Tt.useMemo)(()=>m?e.filter(he=>!he.completed):e,[e,m]),we=(0,Tt.useMemo)(()=>Le.filter(he=>he.completed||he.archived||he.is_support?!1:he.is_notice?!!ye?.(he).canAck:!!G?.(he).canConfirm),[Le,ye,G]),ve=(0,Tt.useMemo)(()=>Z>0?e.filter(he=>he.completed&&!he.archived&&!he.is_support&&!!he.review_pending&&(he.author_account_seq??0)===Z):[],[e,Z]),Ee=(0,Tt.useMemo)(()=>new Set([...we,...ve].map(he=>he.seq)),[we,ve]),st=(0,Tt.useMemo)(()=>lt.map(he=>({section:he,visibleTasks:he.tasks.filter(We=>!Ee.has(We.seq)&&(!m||!We.completed))})).filter(he=>he.visibleTasks.length>0),[lt,m,Ee]),Ve=(0,Tt.useMemo)(()=>new Set(d),[d]),$e=(0,Tt.useMemo)(()=>{let he=[];if(qt)for(let{section:We,visibleTasks:wt}of st){let cn=Ve.has(We.key);if(he.push({kind:"header",section:We,visibleTasks:wt,collapsed:cn}),!cn)for(let Ln of wt)he.push({kind:"task",task:Ln,last:!1})}else for(let We of Le)Ee.has(We.seq)||he.push({kind:"task",task:We,last:!1});for(let We=he.length-1;We>=0;We-=1){let wt=he[We];if(wt.kind==="task"){wt.last=!0;break}}return he},[qt,st,Le,Ve,Ee]),Ut=se.showProject??(!Fe&&h!=="tab"),et=(0,Tt.useMemo)(()=>Ta({...se,showProject:Ut}),[se,Ut]),re=Nu({...se,showProject:Ut}),ue=Lu({...se,showProject:Ut}),{onReturnTask:de}=ct(),Te=(0,Tt.useRef)(null),_t=(0,Tt.useRef)(null),De=et[et.length-1]?.align==="center",He=(0,Tt.useMemo)(()=>{let he=new Map;for(let We of u)he.set(We.key,{label:We.archived?`${We.label} (\uBCF4\uAD00\uB428)`:We.label,icon:We.icon});return he},[u]),Lt=(0,Tt.useRef)(null),[Ne,Oe]=(0,Tt.useState)(null);(0,Tt.useEffect)(()=>{if(!Ne)return;let he=()=>{Te.current&&(Te.current.scrollLeft=Ne.scrollLeft),_t.current&&(_t.current.scrollLeft=Ne.scrollLeft)};return he(),Ne.addEventListener("scroll",he,{passive:!0}),()=>Ne.removeEventListener("scroll",he)},[Ne]);let at=Le.length>0;(0,Tt.useEffect)(()=>{if(!at){Oe(null);return}let he=window.requestAnimationFrame(()=>{Oe(Lt.current?.getScrollContainer()??null)});return()=>window.cancelAnimationFrame(he)},[at]);let mt=`${h}|${s}|${r}|${l}|${m?1:0}`;(0,Tt.useEffect)(()=>{Ne&&(Ne.scrollTop=0)},[mt,Ne]);let[Bt,Vt]=(0,Tt.useState)(!1);(0,Tt.useEffect)(()=>{if(!Ne)return;let he=()=>Vt(Ne.scrollHeight-Ne.clientHeight>4),We=window.requestAnimationFrame(he),wt=new ResizeObserver(he);return wt.observe(Ne),Ne.firstElementChild&&wt.observe(Ne.firstElementChild),()=>{window.cancelAnimationFrame(We),wt.disconnect()}},[Ne,$e.length,d.length]),(0,Tt.useEffect)(()=>{if(!Ne)return;let he=Ne.clientHeight,We=new ResizeObserver(()=>{let wt=Ne.clientHeight;wt!==he&&(he=wt,Ne.dispatchEvent(new Event("scroll")))});return We.observe(Ne),()=>We.disconnect()},[Ne]);let[St,gr]=(0,Tt.useState)(null),[yr,xr]=(0,Tt.useState)(null),[Nr,Q]=(0,Tt.useState)(null),[le,ge]=(0,Tt.useState)(null),[be,Me]=(0,Tt.useState)(!1),[Ke,Ge]=(0,Tt.useState)(null),ut=Ke?e.find(he=>he.seq===Ke.taskSeq)??null:null,[Je,Xe]=(0,Tt.useState)(null),dt=Je?e.find(he=>he.seq===Je.taskSeq)??null:null,[Xt,fr]=(0,Tt.useState)(null),zt=Xt?e.find(he=>he.seq===Xt.taskSeq)??null:null,ce=(0,Tt.useCallback)((he,We)=>{fr({anchorEl:We,taskSeq:he.seq})},[]),Nt=(0,Tt.useCallback)((he,We)=>{Xe({anchorEl:We,taskSeq:he.seq})},[]),Or=(0,Tt.useCallback)((he,We)=>{Ge({anchorEl:We,taskSeq:he.seq})},[]),Lr=(0,Tt.useCallback)((he,We)=>{if(!We)return;t(he,s===he&&r==="asc"?"desc":"asc")},[t,s,r]),Hn=(0,Tt.useCallback)((he,We,wt)=>{gr({anchorEl:wt,taskSeq:he.seq,field:We,date:he[We],isEvent:!!he.is_event,reminders:Bo(he),completed:he.completed})},[]),li=(0,Tt.useCallback)((he,We)=>{ge({anchorEl:We,task:he})},[]),Zi=(0,Tt.useCallback)(he=>{St&&(i(St.taskSeq,St.field,he),gr(We=>We&&{...We,date:he}))},[St,i]),Si=(0,Tt.useCallback)(he=>{St&&(a(St.taskSeq,he),gr(We=>We&&{...We,reminders:he}))},[St,a]),Kt=(0,Tt.useCallback)((he,We)=>{Q({anchorEl:We,taskSeq:he.seq,title:he.title,kind:"claim"})},[]),or=(0,Tt.useCallback)((he,We)=>{Q({anchorEl:We,taskSeq:he.seq,title:he.title,kind:"volunteer"})},[]),Ji=(he,We)=>(0,ot.jsx)(L0,{task:he,hideBottomBorder:We,gridTemplate:re,useTaskItem:ft,statusOptions:f,avatarSrcByName:g,searchText:l,myAccountSeq:Z,todayStr:o,showProject:Ut,showManager:Ie,showActions:ke,showRequest:_e,confirmMode:rt,notice:Fe,bugMode:me,supportMode:Jt,managerCentered:Ue,trashMode:nt,dimCompleted:k,readOnly:I,projectByKey:He,getConfirmInfo:G,onConfirmTask:W,onProjectClick:li,onRequestReply:n,onRequestToggleCompleted:xr,onDateClick:Hn,onChangeNote:S,onMemberClick:D,onClaimClick:p?Kt:void 0,onVolunteerClick:te?or:void 0,onStatusClick:Or,onOpenDetail:v,onTaskContextMenu:w,onPriorityClick:Nt,onIconClick:M?ce:void 0,lastColumnCentered:De,getTargetSummary:ne,getTargetDisplay:ie,getAckInfo:ye,isTaskUnread:pe,onArchiveTask:ae,onAckConfirm:Se,onAckListClick:Be},he.seq);return(0,ot.jsxs)(jt.Box,{sx:{display:"flex",flexDirection:"column",flex:1,minHeight:0,border:`1px solid ${xe.table.borderColor}`,borderRadius:"0 0 4px 4px",overflow:"hidden",bgcolor:xe.table.bg,color:xe.table.rowColor,...xe.table.sx},children:[(0,ot.jsx)(jt.Box,{ref:Te,sx:{overflow:"hidden",flexShrink:0},children:(0,ot.jsx)(jt.Box,{sx:{display:"grid",gridTemplateColumns:re,minWidth:ue,borderBottom:`1px solid ${xe.table.borderColor}`,flexShrink:0,bgcolor:xe.table.headerBg,"& > *":{borderRight:`1px solid ${xe.table.rowBorderColor}`},"& > *:first-of-type":{px:1.5},"& > *:last-child":{borderRight:"none",pr:2,...De?{pl:2}:{}},...xe.table.headerSx},children:et.map(he=>{let We=s===he.id,wt=!!he.memberFilter,cn=wt&&T.includes(he.memberFilter),Ln=wt||!!he.statusFilter||!!he.ackFilter||!!he.projectFilter||!!he.priorityFilter||!!he.valueFilter,zo=cn||!!he.valueFilter&&U.includes(he.valueFilter)||!!he.statusFilter&&F||!!he.ackFilter&&V||!!he.projectFilter&&q||!!he.priorityFilter&&E;return(0,ot.jsxs)(jt.Box,{onClick:ko=>{he.memberFilter?_(he.memberFilter,ko.currentTarget):he.statusFilter?R(ko.currentTarget):he.ackFilter?H?.(ko.currentTarget):he.projectFilter?A?.(ko.currentTarget):he.priorityFilter?B?.(ko.currentTarget):he.valueFilter?j?.(he.valueFilter,ko.currentTarget):Lr(he.id,he.sortable)},sx:{display:"flex",alignItems:"center",justifyContent:he.align==="center"?"center":"flex-start",gap:.5,px:1,...he.id==="title"?{pl:2}:{},py:1,minWidth:0,fontSize:xe.table.headerFontSize,color:he.sortable||Ln?xe.table.headerActiveColor:xe.table.headerColor,whiteSpace:"nowrap",cursor:he.sortable||Ln?"pointer":"default",userSelect:"none",...We?{color:xe.table.headerFilteredColor}:{},...zo?{color:xe.table.headerFilteredColor,fontWeight:600}:{}},children:[he.icon,he.label,zo?(0,ot.jsx)(rg.default,{sx:{fontSize:14}}):null,We?r==="asc"?(0,ot.jsx)(J0.default,{sx:{fontSize:13}}):(0,ot.jsx)(Q0.default,{sx:{fontSize:13}}):null]},he.id)})})}),we.length>0||ve.length>0?(0,ot.jsx)(jt.Box,{sx:{flexShrink:0,maxHeight:`${xe.table.groupHeader.minHeight+1+Z0*aw}px`,overflowY:"auto",overflowX:"hidden",borderBottom:"1px solid #000"},ref:_t,children:(0,ot.jsxs)(jt.Box,{sx:{minWidth:ue},children:[we.length>0?(0,ot.jsxs)(ot.Fragment,{children:[(0,ot.jsxs)(jt.Box,{sx:{position:"sticky",top:0,zIndex:1,display:"flex",alignItems:"center",gap:.5,px:1.5,minHeight:xe.table.groupHeader.minHeight,bgcolor:"#fdf3f2",borderBottom:"1px solid #f2d7d4"},children:[(0,ot.jsx)(jt.Box,{component:"span",sx:{fontSize:xe.table.groupHeader.labelFontSize,fontWeight:xe.table.groupHeader.labelFontWeight,color:xe.table.groupHeader.labelColor},children:"\uBBF8\uD655\uC778"}),(0,ot.jsx)(jt.Box,{sx:{ml:"auto",display:"flex",alignItems:"center",pr:.5},children:(0,ot.jsx)(jt.Box,{component:"span",sx:{flexShrink:0,width:xe.table.groupHeader.badge.width,py:xe.table.groupHeader.badge.paddingY,borderRadius:`${xe.table.groupHeader.badge.borderRadius}px`,bgcolor:"#e5484d",color:"#fff",fontSize:xe.table.groupHeader.badge.fontSize,fontWeight:xe.table.groupHeader.badge.fontWeight,lineHeight:1.6,textAlign:"center",fontVariantNumeric:"tabular-nums"},children:we.length})})]}),we.map((he,We)=>Ji(he,ve.length===0&&We===we.length-1))]}):null,ve.length>0?(0,ot.jsxs)(ot.Fragment,{children:[(0,ot.jsxs)(jt.Box,{sx:{position:"sticky",top:0,zIndex:1,display:"flex",alignItems:"center",gap:.5,px:1.5,minHeight:xe.table.groupHeader.minHeight,bgcolor:"#f4f0fe",borderBottom:"1px solid #e2dbf9"},children:[(0,ot.jsx)(jt.Box,{component:"span",sx:{fontSize:xe.table.groupHeader.labelFontSize,fontWeight:xe.table.groupHeader.labelFontWeight,color:xe.table.groupHeader.labelColor},children:"\uAC80\uC218 \uB300\uAE30"}),(0,ot.jsx)(jt.Box,{sx:{ml:"auto",display:"flex",alignItems:"center",pr:.5},children:(0,ot.jsx)(jt.Box,{component:"span",sx:{flexShrink:0,width:xe.table.groupHeader.badge.width,py:xe.table.groupHeader.badge.paddingY,borderRadius:`${xe.table.groupHeader.badge.borderRadius}px`,bgcolor:"#8b5cf6",color:"#fff",fontSize:xe.table.groupHeader.badge.fontSize,fontWeight:xe.table.groupHeader.badge.fontWeight,lineHeight:1.6,textAlign:"center",fontVariantNumeric:"tabular-nums"},children:ve.length})})]}),ve.map((he,We)=>Ji(he,We===ve.length-1))]}):null]})}):null,Le.length===0&&x?(0,ot.jsx)(jt.Box,{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:(0,ot.jsx)(js,{})}):Le.length===0?(0,ot.jsx)(jt.Box,{role:"status","aria-live":"polite",sx:{py:8,textAlign:"center",color:xe.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.`:me?"\uB4F1\uB85D\uB41C \uC624\uB958\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.":Jt?"\uC811\uC218\uB41C \uBB38\uC758\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.":Fe?"\uB4F1\uB85D\uB41C \uACF5\uC9C0\uC0AC\uD56D\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.":"\uD45C\uC2DC\uD560 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):(0,ot.jsx)(jt.Box,{sx:{flex:1,minHeight:0},children:(0,ot.jsx)(ig.default,{ref:Lt,style:{height:"100%"},contentStyle:{minWidth:ue},thumb:{width:8},showHorizontalScrollbar:!0,scrollTopFab:!0,children:Ne?(0,ot.jsx)(og.Virtuoso,{customScrollParent:Ne,data:$e,computeItemKey:(he,We)=>We.kind==="header"?`group:${We.section.key}`:We.task.seq,endReached:qt?void 0:Pe,defaultItemHeight:Z0,increaseViewportBy:{top:600,bottom:600},itemContent:(he,We)=>{if(We.kind==="task")return Ji(We.task,We.last&&Bt);let{section:wt,visibleTasks:cn,collapsed:Ln}=We;return(0,ot.jsxs)(jt.Box,{onClick:()=>b(wt.key),sx:{display:"flex",alignItems:"center",gap:.5,px:1.5,minHeight:xe.table.groupHeader.minHeight,bgcolor:xe.table.groupHeader.bg,borderBottom:`1px solid ${xe.table.groupHeader.borderColor}`,cursor:"pointer",userSelect:"none","&:hover":{bgcolor:xe.table.groupHeader.hoverBg},...xe.table.groupHeader.sx},children:[Ln?(0,ot.jsx)(tg.default,{sx:{fontSize:20,color:xe.colors.textMuted}}):(0,ot.jsx)(eg.default,{sx:{fontSize:20,color:xe.colors.textMuted}}),(0,ot.jsx)(jt.Box,{component:"span",sx:{fontSize:xe.table.groupHeader.labelFontSize,fontWeight:xe.table.groupHeader.labelFontWeight,color:xe.table.groupHeader.labelColor},children:wt.label}),$?(0,ot.jsx)(jt.Box,{sx:{flexShrink:0,display:"flex",alignItems:"center",ml:.5},children:$(wt.key,wt.tasks)}):null,O&&(!P||P(wt.key))?(0,ot.jsx)(jt.IconButton,{size:"small","aria-label":"\uC774 \uADF8\uB8F9\uC5D0 \uC5C5\uBB34 \uB4F1\uB85D",onClick:zo=>{zo.stopPropagation(),O(wt.key,wt.tasks)},sx:{flexShrink:0,ml:.75,p:.25,color:xe.colors.textSecondary,"&:hover":{bgcolor:xe.colors.surfaceHover,color:xe.colors.accentOnSurface}},children:(0,ot.jsx)(Yu.default,{sx:{fontSize:21}})}):null,(0,ot.jsxs)(jt.Box,{sx:{ml:"auto",minWidth:0,display:"flex",alignItems:"center",gap:1,pr:.5},children:[N?N(wt.key,wt.tasks):null,(0,ot.jsx)(jt.Box,{component:"span",sx:{flexShrink:0,width:xe.table.groupHeader.badge.width,py:xe.table.groupHeader.badge.paddingY,borderRadius:`${xe.table.groupHeader.badge.borderRadius}px`,bgcolor:xe.table.groupHeader.badge.bg,border:xe.table.groupHeader.badge.border,color:xe.table.groupHeader.badge.color,fontSize:xe.table.groupHeader.badge.fontSize,fontWeight:xe.table.groupHeader.badge.fontWeight,lineHeight:1.6,textAlign:"center",fontVariantNumeric:"tabular-nums"},children:cn.length})]})]})}},mt):null})}),(0,ot.jsx)(rs,{anchorEl:Ke?.anchorEl??null,value:ut?.status??"",options:ut?va(ut):Os,onSelect:he=>{ut&&y(ut.seq,he)},onComplete:ut&&!ut.completed&&!ut.is_notice&&!ut.is_event&&!ut.is_bug&&!nt&&((ut.author_account_seq??0)===Z||(ut.manager_account_seq??0)===Z)?()=>c(ut,!0):void 0,onClose:()=>Ge(null)}),(0,ot.jsx)(jt.Menu,{transitionDuration:0,anchorEl:Je?.anchorEl??null,open:!!Je,onClose:()=>Xe(null),children:["high","medium","low"].map(he=>(0,ot.jsxs)(jt.MenuItem,{selected:dt?.priority===he,onClick:()=>{dt&&Ce?.(dt.seq,he),Xe(null)},sx:{fontSize:14,minWidth:130,gap:1},children:[(0,ot.jsx)(Tn,{priority:he,small:!0}),dt?.priority===he?(0,ot.jsx)(uc.default,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},he))}),(0,ot.jsxs)(jt.Menu,{anchorEl:le?.anchorEl??null,open:!!le,onClose:()=>ge(null),transitionDuration:0,children:[(0,ot.jsxs)(jt.MenuItem,{selected:!le?.task.tab_key,onClick:()=>{le&&L(le.task.seq,""),ge(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[(0,ot.jsx)(ng.default,{sx:{fontSize:17,color:"#9a9a97"}}),"\uC5C6\uC74C",le?.task.tab_key?null:(0,ot.jsx)(uc.default,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}})]}),u.filter(he=>!he.archived).map(he=>{let We=$t(he.icon),wt=le?.task.tab_key===he.key;return(0,ot.jsxs)(jt.MenuItem,{selected:wt,onClick:()=>{le&&L(le.task.seq,he.key),ge(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[We?(0,ot.jsx)(We,{sx:{fontSize:17,color:"#1e3a8a"}}):null,he.label,wt?(0,ot.jsx)(uc.default,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},he.key)}),C?[(0,ot.jsx)(jt.Divider,{},"add-project-divider"),(0,ot.jsxs)(jt.MenuItem,{onClick:()=>Me(!0),sx:{fontSize:14,color:"#787774"},children:[(0,ot.jsx)(jt.ListItemIcon,{children:(0,ot.jsx)(Yu.default,{sx:{fontSize:18,color:"#787774"}})}),"\uD504\uB85C\uC81D\uD2B8 \uCD94\uAC00"]},"add-project")]:null]}),C?(0,ot.jsx)(ja,{open:be,onClose:()=>Me(!1),onSubmit:(he,We)=>{let wt=le?.task.seq??0;(async()=>{let cn=await C(he,We);cn&&wt&&L(wt,cn)})(),ge(null)}}):null,(0,ot.jsx)(hi,{anchorEl:Xt?.anchorEl??null,value:zt?.icon??"",color:zt?.icon_color??"",onSelect:he=>{Xt&&M?.(Xt.taskSeq,he),fr(null)},onSelectColor:z?he=>{Xt&&z(Xt.taskSeq,he)}:void 0,onClose:()=>fr(null)}),(0,ot.jsx)(io,{anchorEl:St?.anchorEl??null,open:!!St&&St?.field==="start_date",date:St?.date??"",reminders:[],hideReminder:!0,showTime:!St?.isEvent,onClose:()=>gr(null),onDateChange:Zi,onReminderChange:()=>{}}),(0,ot.jsx)(io,{anchorEl:St?.anchorEl??null,open:!!St&&St?.field==="due_date",date:St?.date??"",showTime:!St?.isEvent,reminders:St?.reminders??[],hideReminder:!!St?.completed,onClose:()=>gr(null),onDateChange:Zi,onReminderChange:Si}),(0,ot.jsx)(Qt,{open:!!Nr,anchorEl:Nr?.anchorEl??null,title:Nr?.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:()=>{Nr&&p?.(Nr.taskSeq),Q(null)}}),(0,ot.jsx)(Kn,{open:!!yr,anchorEl:yr?.anchorEl??null,nextCompleted:yr?.nextCompleted??!1,returnMode:!!de&&!!(yr&&Vn(yr.task,Z)),onCancel:()=>xr(null),onConfirm:he=>{yr&&(he&&de?de(yr.task,he):c(yr.task,yr.nextCompleted)),xr(null)}})]})}var Ht=require("react"),yt=require("@mui/material"),pc=Y(require("@mui/icons-material/Add"),1),nf=Y(require("@mui/icons-material/MoreVert"),1),of=Y(require("@mui/icons-material/EditOutlined"),1),sf=Y(require("@mui/icons-material/ArchiveOutlined"),1),af=Y(require("@mui/icons-material/UnarchiveOutlined"),1),xg=Y(require("@mui/icons-material/NotificationsOutlined"),1),vg=Y(require("@mui/icons-material/PeopleAltOutlined"),1);var sg=require("@mui/material"),Zu=require("react/jsx-runtime");function gn({sx:e,...f}){return(0,Zu.jsx)(sg.SvgIcon,{viewBox:"0 0 24 24",...f,sx:{fill:"none",...e},children:(0,Zu.jsx)("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"})})}var In=require("@dnd-kit/core"),bo=require("@dnd-kit/sortable"),wg=require("@dnd-kit/utilities"),mc=Y(require("@ehfuse/overlay-scrollbar"),1);var lg=require("react"),bn=require("@mui/material"),cg=Y(require("@mui/icons-material/AlarmOutlined"),1),ug=Y(require("@mui/icons-material/DragIndicator"),1),fg=Y(require("@mui/icons-material/RadioButtonUnchecked"),1),dg=Y(require("@mui/icons-material/CheckCircle"),1),hg=Y(require("@mui/icons-material/TimerOutlined"),1);var Bn=require("@mui/material"),ag=Y(require("@mui/icons-material/CheckCircle"),1);var Qr=require("react/jsx-runtime");function Fa({anchorEl:e,open:f,acks:g,total:l,avatarSrcByName:o,pendingNames:s=[],onRequestConfirm:r,onClose:t}){let n=dr();return(0,Qr.jsx)(Bn.Popover,{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:(0,Qr.jsxs)(Bn.Box,{sx:{minWidth:240,maxWidth:320,py:1},children:[(0,Qr.jsxs)(Bn.Box,{sx:{px:2,pb:.75,fontSize:mn(13.5),fontWeight:600,color:"#37352f",borderBottom:"1px solid #efefed"},children:["\uD655\uC778 ",g.length,"/",l]}),s.length>0&&g.length>0?(0,Qr.jsxs)(Bn.Box,{sx:{px:2,pt:1,pb:.5,fontSize:mn(12.5),fontWeight:600,color:"#9a9a97"},children:["\uD655\uC778 ",g.length]}):null,g.length===0?s.length>0?null:(0,Qr.jsx)(Bn.Box,{sx:{px:2,py:1.5,fontSize:mn(13.5),color:"#9a9a97"},children:"\uC544\uC9C1 \uD655\uC778\uD55C \uC0AC\uB78C\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):g.map(c=>(0,Qr.jsxs)(Bn.Box,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:.75,minWidth:0},children:[(0,Qr.jsx)(Cn,{names:[c.name],size:22,avatarSrcByName:o}),(0,Qr.jsx)(Bn.Box,{component:"span",sx:{fontSize:mn(14),color:"#37352f",whiteSpace:"nowrap"},children:c.name}),(0,Qr.jsx)(Bn.Box,{component:"span",sx:{ml:"auto",fontSize:mn(12.5),color:"#9a9a97",whiteSpace:"nowrap"},children:Gn(c.time)}),(0,Qr.jsx)(ag.default,{sx:{fontSize:16,color:"#2f80ed",flexShrink:0}})]},c.account_seq)),s.length>0?(0,Qr.jsxs)(Qr.Fragment,{children:[(0,Qr.jsxs)(Bn.Box,{sx:{mt:g.length>0?.75:0,px:2,pt:1,pb:.5,borderTop:g.length>0?"1px solid #efefed":"none",fontSize:mn(12.5),fontWeight:600,color:"#9a9a97"},children:["\uBBF8\uD655\uC778 ",s.length]}),s.map(c=>(0,Qr.jsxs)(Bn.Box,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:.75,minWidth:0},children:[(0,Qr.jsx)(Cn,{names:[c],size:22,avatarSrcByName:o}),(0,Qr.jsx)(Bn.Box,{component:"span",sx:{fontSize:mn(14),color:"#37352f",whiteSpace:"nowrap"},children:c})]},c))]}):null,r?(0,Qr.jsx)(Bn.Box,{sx:{borderTop:"1px solid #efefed",px:1.5,pt:1,pb:.25},children:(0,Qr.jsx)(Bn.Button,{size:"small",fullWidth:!0,variant:"outlined",onClick:()=>{r(),t()},sx:{fontSize:mn(13)},children:"\uD655\uC778 \uC694\uCCAD"})}):null]})})}function lw(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 cw(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 ls(e,f){let g=lw(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=cw(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 uw(e){let f=String(e??"").trim();return f?f.slice(5,16).replaceAll("-","."):""}var sr=require("react/jsx-runtime");function qa(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 fw=3;function dw(e){let f=e.trim();return f?f.slice(2,10).replaceAll("-","."):"-"}function hw(){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 fc="taskbox-card-drag-handle";function Fs({task:e,statusOptions:f,showDueDate:g=!1,onRequestArchiveToggle:l,onRequestReply:o,onDueDateClick:s,titleFontSize:r=13,dragHandleProps:t}){let n=ht(),c=Ds(e,ct().resolveTask),a=!!e.due_date&&e.due_date.slice(0,10)<=hw()?n.colors.danger:n.colors.textPrimary,h=ls(e,0),[d,u]=(0,lg.useState)(null),b=es(e,f),m=new Set(e.label_keys??[]),x=b.filter(I=>!m.has(I.key)),k=b.filter(I=>m.has(I.key));return(0,sr.jsxs)(sr.Fragment,{children:[(0,sr.jsxs)(bn.Box,{sx:{display:"flex",alignItems:"flex-start",gap:.5},children:[t?(0,sr.jsx)(bn.Box,{className:fc,...t,onClick:I=>I.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:(0,sr.jsx)(ug.default,{sx:{fontSize:18}})}):null,(0,sr.jsx)(bn.Checkbox,{size:"small",icon:(0,sr.jsx)(fg.default,{sx:{fontSize:20}}),checkedIcon:(0,sr.jsx)(dg.default,{sx:{fontSize:20}}),checked:e.completed,inputProps:{"aria-label":e.completed?`${e.title} \uC644\uB8CC \uD574\uC81C`:`${e.title} \uC644\uB8CC \uCC98\uB9AC`},onPointerDown:I=>I.stopPropagation(),onClick:I=>I.stopPropagation(),onChange:(I,M)=>l?.({anchorEl:I.currentTarget,taskSeq:e.seq,nextCompleted:M}),sx:{p:0}}),(0,sr.jsx)(bn.Tooltip,{title:e.title,arrow:!0,enterDelay:300,children:(0,sr.jsxs)(bn.Box,{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:fw,overflowWrap:"anywhere",textDecoration:e.completed?"line-through":"none"},children:[e.is_event&&e.event_time?`${e.event_time} `:"",e.title,c?(0,sr.jsx)(bn.Box,{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?(0,sr.jsx)(di,{sx:{fontSize:15,ml:.5,verticalAlign:"-2px",color:n.colors.textMuted}}):null]})})]}),e.is_bug&&e.ticket_no?(0,sr.jsx)(bn.Box,{sx:{pl:3,mt:-.5,fontSize:12.5,color:n.colors.textSecondary,fontWeight:500,fontVariantNumeric:"tabular-nums"},children:e.ticket_no}):null,(0,sr.jsxs)(bn.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:.5},children:[(0,sr.jsxs)(bn.Box,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:.5,minWidth:0},children:[x.map(I=>(0,sr.jsx)(ir,{option:I,small:!0},I.key)),(0,sr.jsx)(Tn,{priority:e.priority,small:!0}),k.map(I=>(0,sr.jsx)(ir,{option:I,small:!0},I.key))]}),g?(0,sr.jsx)(bn.Tooltip,{title:"\uB9C8\uAC10\uC608\uC815",arrow:!0,placement:"top",disableInteractive:!0,slotProps:{transition:{timeout:0}},children:(0,sr.jsx)(bn.ButtonBase,{disabled:!s,onPointerDown:I=>I.stopPropagation(),onClick:I=>{I.stopPropagation(),s?.(e,I.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()?dw(e.due_date):(0,sr.jsx)(cg.default,{sx:{fontSize:15,color:n.colors.textMuted}})})}):null]}),g&&(e.due_date.slice(11,16)||e.estimated_time)?(0,sr.jsxs)(bn.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:.25,mt:-.5,fontSize:12,color:n.colors.textSecondary},children:[(0,sr.jsx)(hg.default,{sx:{fontSize:14}}),e.due_date.slice(11,16)||e.estimated_time]}):null,(0,sr.jsx)(Cn,{names:[...e.manager_name?[e.manager_name]:[],...e.receiver_names],size:20,ringFirst:!!e.manager_name}),h.total>0?(0,sr.jsx)(bn.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:.5},children:(0,sr.jsx)(bn.Box,{sx:{flexShrink:0,width:64},onPointerDown:I=>I.stopPropagation(),onClick:I=>I.stopPropagation(),children:(0,sr.jsx)(is,{canConfirm:!1,count:h.count,total:h.total,onConfirm:()=>{},onShowList:I=>u(I)})})}):null,(0,sr.jsx)(Fa,{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)})]})}var pg=require("@mui/material"),mg=require("@dnd-kit/sortable"),gg=require("@dnd-kit/utilities");var Ju=require("react/jsx-runtime");function pw(e){return{px:1.25,py:1,display:"flex",flexDirection:"column",gap:.75,borderBottom:`1px solid ${e.borderColor}`,bgcolor:e.bg}}function Qu({task:e,statusOptions:f,variant:g="card",showDueDate:l=!1,onRequestArchiveToggle:o,onRequestReply:s,onDueDateClick:r,onCardClick:t,onCardContextMenu:n,titleFontSize:c}){let i=ht(),{attributes:a,listeners:h,setNodeRef:d,transform:u,transition:b,isDragging:m}=(0,mg.useSortable)({id:String(e.seq)}),x=g==="list";return(0,Ju.jsx)(pg.Box,{ref:d,onClick:t?()=>t(e):void 0,onContextMenu:n?k=>n(e,k):void 0,sx:{...x?pw(i.card):qa(i.card),opacity:m?.35:e.completed?.55:1,transform:gg.CSS.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:(0,Ju.jsx)(Fs,{task:e,statusOptions:f,showDueDate:l,onRequestArchiveToggle:o,onRequestReply:s,onDueDateClick:r,titleFontSize:c,dragHandleProps:{...a,...h}})})}function mw(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?e.slice(5).replace("-","."):""}function so(e){if(e.status==="closed")return`${e.name} (\uC885\uB8CC)`;let f=mw(e.end_date);return f?`${e.name} (~${f})`:e.name}var ze=require("react/jsx-runtime"),bg=2,_g="taskbox-column-drag-handle",lf=[fc,_g],dc="group-",go="colmove-",ef="__default__",tf=Kl,rf="__other__",hc="sprint-",yg=`${hc}0`,gw={planning:"#9a9a97",active:"#2f80ed",closed:"#9a9a97"};function kg(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 bw({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=ht(),{setNodeRef:b,isOver:m}=(0,In.useDroppable)({id:`${dc}${e.key}`}),{attributes:x,listeners:k,setNodeRef:I,transform:M,transition:z,isDragging:O}=(0,bo.useSortable)({id:`${go}${e.key}`,disabled:e.isDefault||e.isArchived||!!e.locked});return(0,ze.jsxs)(yt.Box,{ref:P=>{b(P),I(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:wg.CSS.Translate.toString(M),...z?{transition:`${z}, background-color 0.15s`}:{},opacity:O?.6:1},children:[(0,ze.jsxs)(yt.Box,{className:_g,...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?(0,ze.jsx)(yt.Box,{sx:{width:8,height:8,borderRadius:"50%",bgcolor:e.dot,flexShrink:0}}):e.isDefault?null:(()=>{let P=$t(e.icon);return P?(0,ze.jsx)(P,{sx:{fontSize:17,color:"#1e3a8a"}}):null})(),(0,ze.jsx)(yt.Box,{component:"span",sx:{fontSize:u.board.columnHeaderFontSize,fontWeight:700,color:u.board.columnHeaderColor,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.label}),(0,ze.jsx)(yt.Box,{component:"span",sx:{...kg(u.board.badge),ml:"auto"},children:f.length}),e.sprint&&d?(0,ze.jsx)(yt.IconButton,{size:"small","aria-label":"\uBAA9\uD45C \uBA54\uB274",onPointerDown:P=>P.stopPropagation(),onClick:P=>d(P.currentTarget,e.sprint),sx:{color:"#9a9a97"},children:(0,ze.jsx)(nf.default,{sx:{fontSize:18}})}):e.locked?null:(0,ze.jsx)(yt.IconButton,{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:(0,ze.jsx)(nf.default,{sx:{fontSize:18}})})]}),h?(0,ze.jsx)(yt.Box,{sx:{px:1.25,py:1.25,borderBottom:`1px solid ${u.card.borderColor}`,flexShrink:0},children:h}):null,(0,ze.jsx)(yt.Box,{sx:{flex:"1 1 auto",minHeight:0,display:"flex",flexDirection:"column"},children:(0,ze.jsx)(mc.default,{style:{height:"auto",flex:"1 1 auto",minHeight:0},contentStyle:{minWidth:0},thumb:{width:6},dragScroll:{excludeClasses:lf},children:(0,ze.jsxs)(yt.Box,{sx:{display:"flex",flexDirection:"column",flexGrow:1},children:[(0,ze.jsx)(bo.SortableContext,{items:f.map(P=>String(P.seq)),strategy:bo.verticalListSortingStrategy,children:f.map(P=>(0,ze.jsx)(Qu,{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?(0,ze.jsx)(yt.Box,{sx:{py:3,textAlign:"center",fontSize:13,color:"#9a9a97"},children:"\uCE74\uB4DC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):null,f.length===0&&t?(0,ze.jsx)(yt.Box,{sx:{flexGrow:1,minHeight:56,display:"flex",flexDirection:"column","&:hover .taskbox-board-add":{opacity:1,pointerEvents:"auto"}},children:(0,ze.jsxs)(yt.ButtonBase,{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:[(0,ze.jsx)(pc.default,{sx:{fontSize:16}}),"\uC5C5\uBB34 \uB4F1\uB85D"]})}):null]})})})]})}function gc({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:I,onReorderProjects:M,onOpenDetail:z,onTaskContextMenu:O,hideCompleted:P=!1,renderColumnSummary:N,onEditSprint:$,onChangeSprintStatus:L,onRemoveSprint:C}){let S=ht(),{onReturnTask:D,myAccountSeq:p=0}=ct(),[y,v]=(0,Ht.useState)(null),w=y?e.find(we=>we.seq===y.taskSeq):void 0,[_,T]=(0,Ht.useState)(null),[R,F]=(0,Ht.useState)(null),[H,V]=(0,Ht.useState)(null),[A,q]=(0,Ht.useState)(null),[B,E]=(0,Ht.useState)(null),[j,U]=(0,Ht.useState)(null),[X,G]=(0,Ht.useState)(null),[W,Z]=(0,Ht.useState)(null),[J,K]=(0,Ht.useState)(null),[ee,te]=(0,Ht.useState)(null),oe=(0,Ht.useRef)(!1),ne=(0,Ht.useMemo)(()=>new Map(e.map(we=>[we.seq,we])),[e]),ie=(0,Ht.useMemo)(()=>{let we=e.filter(ve=>ve.is_notice);return we.sort((ve,Ee)=>ve.completed!==Ee.completed?ve.completed?1:-1:Ee.seq-ve.seq),we},[e]),ae=(0,Ht.useMemo)(()=>g.filter(we=>!we.archived),[g]),pe=(0,Ht.useMemo)(()=>g.filter(we=>we.archived),[g]),ye=we=>({key:we.key,label:we.label,icon:we.icon,isDefault:!1,isArchived:we.archived}),Se=(0,Ht.useMemo)(()=>new Set(i.map(we=>we.key)),[i]),Be=(0,Ht.useMemo)(()=>new Set(h.map(we=>we.seq)),[h]),Ce=(0,Ht.useMemo)(()=>{if(c==="sprint")return[{key:yg,label:"\uBBF8\uBC30\uC815",icon:"",isDefault:!0,isArchived:!1,dot:"#c9c8c5",locked:!0},...h.map(we=>({key:`${hc}${we.seq}`,label:so(we),icon:"",isDefault:!1,isArchived:!1,dot:gw[we.status],locked:!0,sprint:we}))];if(c==="status"){let we=i.map(ve=>({key:ve.key,label:ve.name,icon:"",isDefault:!1,isArchived:!1,dot:ve.dot,locked:!0}));return we.some(ve=>ve.key===tf)?we:[...we,{key:tf,label:"\uC644\uB8CC",icon:"",isDefault:!1,isArchived:!1,dot:"#2f80ed",locked:!0}]}return l==="archived"?pe.map(ye):[{key:ef,label:"\uAE30\uBCF8 \uC5C5\uBB34\uD568",icon:"",isDefault:!0,isArchived:!1},...ae.map(ye)]},[c,i,h,l,ae,pe]),Pe=(0,In.useSensors)((0,In.useSensor)(In.PointerSensor,{activationConstraint:{distance:5}})),ft=(0,Ht.useCallback)(we=>{let ve=String(we.active.id).startsWith(go),Ee=(0,In.pointerWithin)(we),st=Ee.length>0?Ee:(0,In.rectIntersection)(we);if(ve)return st.filter(Ut=>String(Ut.id).startsWith(go));let Ve=st.filter(Ut=>!String(Ut.id).startsWith(go)),$e=Ve.filter(Ut=>!String(Ut.id).startsWith(dc));return $e.length>0?$e:Ve},[]),xe=(0,Ht.useMemo)(()=>{let we=new Map;for(let ve of e){if(ve.is_notice)continue;let Ee;if(c==="sprint"){let Ve=ve.sprint_seq??0;Ee=Be.has(Ve)?`${hc}${Ve}`:yg}else Ee=c==="status"?ve.completed?tf:Se.has(String(ve.status??""))?String(ve.status??""):rf:ve.tab_key?.trim()||ef;let st=we.get(Ee);st?st.push(ve):we.set(Ee,[ve])}for(let ve of we.values())ve.sort((Ee,st)=>{if(Ee.completed!==st.completed)return Ee.completed?1:-1;let Ve=(Ee.group_sort_no??0)>0,$e=(st.group_sort_no??0)>0;return Ve&&$e?(Ee.group_sort_no??0)-(st.group_sort_no??0):Ve!==$e?Ve?-1:1:Ee.due_date!==st.due_date?Ee.due_date<st.due_date?-1:1:Ee.seq-st.seq});return we},[e,c,Se,Be]),se=(0,Ht.useMemo)(()=>c!=="status"||(xe.get(rf)??[]).length===0?Ce:[...Ce,{key:rf,label:"\uAE30\uD0C0",icon:"",isDefault:!1,isArchived:!1,dot:"#c9c8c5",locked:!0}],[c,Ce,xe]),Ie=(0,Ht.useCallback)(we=>W?(W.get(we)??[]).map(ve=>ne.get(ve)).filter(ve=>!!ve):xe.get(we)??[],[W,ne,xe]),ke=(0,Ht.useCallback)(we=>{let ve=Ie(we);return P?ve.filter(Ee=>!Ee.completed):ve},[Ie,P]),_e=(0,Ht.useCallback)(we=>{let ve=String(we.active.id);if(ve.startsWith(go)){te(ve.slice(go.length));return}K(Number(ve)),Z(new Map(Ce.map(Ee=>[Ee.key,(xe.get(Ee.key)??[]).map(st=>st.seq)])))},[Ce,xe]),rt=(0,Ht.useCallback)((we,ve)=>{if(we.startsWith(dc))return{key:we.slice(dc.length),overSeq:null};let Ee=Number(we);for(let[st,Ve]of ve)if(Ve.includes(Ee))return{key:st,overSeq:Ee};return null},[]),Fe=(0,Ht.useCallback)(we=>{let{active:ve,over:Ee}=we;!Ee||String(ve.id).startsWith(go)||Z(st=>{if(!st)return st;let Ve=Number(ve.id),$e=rt(String(Ee.id),st);if(!$e)return st;let Ut=[...st.entries()].find(([,de])=>de.includes(Ve))?.[0];if(!Ut||Ut===$e.key)return st;let et=new Map(st);et.set(Ut,(et.get(Ut)??[]).filter(de=>de!==Ve));let re=[...et.get($e.key)??[]],ue=re.length;if($e.overSeq!==null){let de=re.indexOf($e.overSeq);de!==-1&&(ue=de)}return re.splice(ue,0,Ve),et.set($e.key,re),et})},[rt]),me=(0,Ht.useCallback)(we=>{let ve=String(we.active.id);if(ve.startsWith(go)){te(null);let ue=String(we.over?.id??"");if(!ue.startsWith(go))return;let de=ve.slice(go.length),Te=ue.slice(go.length);if(de===Te)return;let _t=g.map(Lt=>Lt.key),De=_t.indexOf(de),He=_t.indexOf(Te);if(De===-1||He===-1)return;M((0,bo.arrayMove)(_t,De,He));return}let Ee=W;if(Z(null),K(null),oe.current=!0,!Ee||!we.over)return;let st=Number(ve),Ve=[...Ee.entries()].find(([,ue])=>ue.includes(st));if(!Ve)return;let[$e,Ut]=Ve,et=[...Ut],re=rt(String(we.over.id),Ee);if(re&&re.key===$e&&re.overSeq!==null&&re.overSeq!==st){let ue=et.indexOf(st),de=et.indexOf(re.overSeq);ue!==-1&&de!==-1&&(et=(0,bo.arrayMove)(et,ue,de))}if(c==="status"){a?.(st,$e);return}if(c==="sprint"){d?.(st,Number($e.slice(hc.length))||0);return}n(st,$e===ef?"":$e,et)},[g,W,rt,n,M,c,a,d]),Jt=(0,Ht.useCallback)(()=>{Z(null),K(null),te(null),oe.current=!0},[]),Ue=(0,Ht.useCallback)(we=>{if(oe.current){oe.current=!1;return}z(we)},[z]),nt=J!==null?ne.get(J)??null:null,qt=ee!==null?Ce.find(we=>we.key===ee)??null:null,lt=(0,Ht.useCallback)((we,ve)=>{G({anchorEl:ve,taskSeq:we.seq,date:we.due_date,reminders:Bo(we)})},[]),Le=_?.column??null;return(0,ze.jsxs)(yt.Box,{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:[(0,ze.jsxs)(In.DndContext,{sensors:Pe,collisionDetection:ft,onDragStart:_e,onDragOver:Fe,onDragEnd:me,onDragCancel:Jt,children:[(0,ze.jsx)(yt.Box,{sx:{flex:1,minHeight:0,minWidth:0,contain:"inline-size"},children:l==="archived"&&Ce.length===0?(0,ze.jsx)(yt.Box,{sx:{py:8,textAlign:"center",color:"#9a9a97",fontSize:14},children:"\uBCF4\uAD00\uB41C \uD504\uB85C\uC81D\uD2B8\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):(0,ze.jsx)(mc.default,{style:{height:"100%"},contentStyle:{width:"max-content",minWidth:"100%",height:"100%"},thumb:{width:8},showHorizontalScrollbar:!0,dragScroll:{excludeClasses:lf},children:(0,ze.jsxs)(yt.Box,{sx:{display:"flex",alignItems:"flex-start",gap:bg,height:"100%",minWidth:"min-content",p:bg,boxSizing:"border-box"},children:[l==="active"&&ie.length>0?(0,ze.jsxs)(yt.Box,{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:we=>we.shadows[1],bgcolor:S.card.bg,overflow:"hidden"},children:[(0,ze.jsxs)(yt.Box,{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:[(0,ze.jsx)(xg.default,{sx:{fontSize:17,color:"#e8763a"}}),(0,ze.jsx)(yt.Box,{component:"span",sx:{fontSize:14.5,fontWeight:700,color:S.board.columnHeaderColor},children:"\uACF5\uC9C0\uC0AC\uD56D"}),(0,ze.jsxs)(yt.Box,{component:"span",sx:{fontSize:13,color:"#9a9a97",flexShrink:0},children:["(",ie.length,")"]})]}),(0,ze.jsx)(yt.Box,{sx:{flex:"1 1 auto",minHeight:0,display:"flex",flexDirection:"column"},children:(0,ze.jsx)(mc.default,{style:{height:"auto",flex:"1 1 auto",minHeight:0},contentStyle:{minWidth:0},dragScroll:{excludeClasses:lf},thumb:{width:6},children:(0,ze.jsx)(yt.Box,{sx:{display:"flex",flexDirection:"column"},children:ie.map(we=>(0,ze.jsxs)(yt.Box,{onClick:()=>Ue(we),onContextMenu:ve=>O(we,ve),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:[(0,ze.jsx)(Fs,{task:we,statusOptions:f,showDueDate:!0,titleFontSize:15,onRequestArchiveToggle:v}),(()=>{let ve=(we.target_names??[]).filter(st=>st.trim());if(ve.length===0)return null;let Ee=ve.length>2?`${ve[0]}, ${ve[1]} \uC678 ${ve.length-2}`:ve.join(", ");return(0,ze.jsxs)(yt.Box,{sx:{display:"flex",alignItems:"center",gap:.5,fontSize:12.5,color:"#787774",overflow:"hidden",whiteSpace:"nowrap"},children:[(0,ze.jsx)(vg.default,{sx:{fontSize:14,flexShrink:0}}),(0,ze.jsx)(yt.Box,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis"},children:Ee})]})})()]},we.seq))})})})]}):null,(0,ze.jsx)(bo.SortableContext,{items:ae.map(we=>`${go}${we.key}`),strategy:bo.horizontalListSortingStrategy,children:se.map(we=>(0,ze.jsx)(bw,{column:we,tasks:ke(we.key),summary:N?.(we.key,Ie(we.key)),onOpenSprintMenu:$||L||C?(ve,Ee)=>F({anchorEl:ve,sprint:Ee}):void 0,statusOptions:f,onRequestArchiveToggle:v,onRequestReply:s,onDueDateClick:lt,onAddTask:b,canAdd:m&&c==="project",onOpenMenu:T,onCardClick:Ue,onCardContextMenu:O,grow:c!=="project"},we.key))}),l==="active"&&c==="project"?(0,ze.jsxs)(yt.ButtonBase,{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:[(0,ze.jsx)(pc.default,{sx:{fontSize:18}}),"\uC0C8 \uD504\uB85C\uC81D\uD2B8"]}):null,l==="active"&&se.length===0&&ie.length===0?(0,ze.jsx)(yt.Box,{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]})})}),(0,ze.jsx)(In.DragOverlay,{children:nt?(0,ze.jsx)(yt.Box,{sx:{...qa,width:250,boxShadow:"0 8px 20px rgba(0,0,0,0.18)",cursor:"grabbing"},children:(0,ze.jsx)(Fs,{task:nt,statusOptions:f,showDueDate:!0,titleFontSize:15})}):qt?(0,ze.jsxs)(yt.Box,{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 we=$t(qt.icon);return we?(0,ze.jsx)(we,{sx:{fontSize:17,color:"#1e3a8a"}}):null})(),(0,ze.jsx)(yt.Box,{component:"span",sx:{fontSize:13.5,fontWeight:700,color:S.board.columnHeaderColor},children:qt.label}),(0,ze.jsx)(yt.Box,{component:"span",sx:kg(S.board.badge),children:(xe.get(qt.key)??[]).length})]}):null})]}),(0,ze.jsxs)(yt.Menu,{transitionDuration:0,anchorEl:_?.anchorEl??null,open:!!_,onClose:()=>T(null),children:[Le&&!Le.isArchived&&m?(0,ze.jsxs)(yt.MenuItem,{onClick:()=>{Le&&b(Le.isDefault?"":Le.key),T(null)},sx:{fontSize:14,gap:1},children:[(0,ze.jsx)(pc.default,{sx:{fontSize:18,color:"#787774"}}),"\uC0C8 \uC5C5\uBB34 \uB4F1\uB85D"]}):null,Le&&!Le.isDefault&&!Le.isArchived?(0,ze.jsxs)(yt.MenuItem,{onClick:()=>{x(Le.key,Le.label,Le.icon),T(null)},sx:{fontSize:14,gap:1},children:[(0,ze.jsx)(of.default,{sx:{fontSize:18,color:"#787774"}}),"\uC218\uC815"]}):null,Le&&!Le.isDefault&&!Le.isArchived?(0,ze.jsxs)(yt.MenuItem,{onClick:()=>{if(_){let we=(xe.get(_.column.key)??[]).filter(ve=>!ve.completed&&!ve.archived).length;we>0?E({anchorEl:_.anchorEl,count:we}):q(_)}T(null)},sx:{fontSize:14,gap:1},children:[(0,ze.jsx)(sf.default,{sx:{fontSize:18,color:"#787774"}}),"\uBCF4\uAD00"]}):null,Le&&Le.isArchived?(0,ze.jsxs)(yt.MenuItem,{onClick:()=>{k(Le.key,!1),T(null)},sx:{fontSize:14,gap:1},children:[(0,ze.jsx)(af.default,{sx:{fontSize:18,color:"#787774"}}),"\uBCF5\uC6D0"]}):null,Le&&!Le.isDefault?(0,ze.jsx)(yt.Divider,{}):null,Le&&!Le.isDefault?(0,ze.jsxs)(yt.MenuItem,{onClick:()=>{_&&U(_),T(null)},sx:{fontSize:14,gap:1,color:"#e5484d"},children:[(0,ze.jsx)(gn,{sx:{fontSize:18}}),"\uC0AD\uC81C"]}):null]}),(0,ze.jsxs)(yt.Menu,{transitionDuration:0,anchorEl:R?.anchorEl??null,open:!!R,onClose:()=>F(null),children:[$?(0,ze.jsxs)(yt.MenuItem,{onClick:()=>{R&&$(R.sprint.seq),F(null)},sx:{fontSize:14,gap:1},children:[(0,ze.jsx)(of.default,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uC218\uC815"]}):null,L?(0,ze.jsxs)(yt.MenuItem,{onClick:()=>{R&&L(R.sprint.seq,R.sprint.status==="closed"?"active":"closed"),F(null)},sx:{fontSize:14,gap:1},children:[R?.sprint.status==="closed"?(0,ze.jsx)(af.default,{sx:{fontSize:18,color:"#787774"}}):(0,ze.jsx)(sf.default,{sx:{fontSize:18,color:"#787774"}}),R?.sprint.status==="closed"?"\uB2E4\uC2DC \uC2DC\uC791":"\uBAA9\uD45C \uC885\uB8CC"]}):null,C?(0,ze.jsx)(yt.Divider,{}):null,C?(0,ze.jsxs)(yt.MenuItem,{onClick:()=>{R&&V(R),F(null)},sx:{fontSize:14,gap:1,color:"#e5484d"},children:[(0,ze.jsx)(gn,{sx:{fontSize:18}}),"\uBAA9\uD45C \uC0AD\uC81C"]}):null]}),(0,ze.jsx)(Qt,{open:!!H,anchorEl:H?.anchorEl??null,title:`"${H?.sprint.name??""}" \uBAA9\uD45C\uB97C \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`,confirmText:"\uC0AD\uC81C",onCancel:()=>V(null),onConfirm:()=>{H&&C?.(H.sprint.seq),V(null)}}),(0,ze.jsx)(io,{anchorEl:X?.anchorEl??null,open:!!X,date:X?.date??"",reminders:X?.reminders??[],onClose:()=>G(null),onDateChange:we=>{X&&(r(X.taskSeq,we),G(ve=>ve&&{...ve,date:we}))},onReminderChange:we=>{X&&(t(X.taskSeq,we),G(ve=>ve&&{...ve,reminders:we}))}}),(0,ze.jsx)(Qt,{open:!!B,anchorEl:B?.anchorEl??null,title:`\uBBF8\uC644\uB8CC \uC5C5\uBB34 ${B?.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 t5={};Sv(t5,{ALL_TASK_VIEWER_ACCOUNT_SEQS:()=>Qv,AddLabelDialog:()=>qf,AddTabDialog:()=>ja,AttachmentUploadGauge:()=>jf,AttachmentUploadPercent:()=>Rc,BUG_DEVICE_OPTIONS:()=>Wl,BUG_GROUP_KEY:()=>c0,BUG_ICON_COLOR:()=>Is,BUG_KANBAN_COLUMNS:()=>Ov,BUG_REPRO_OPTIONS:()=>Hl,BUG_RESOLUTION_OPTIONS:()=>Ul,BUG_STATUS_OPTIONS:()=>Ci,BUG_TASK_ICON:()=>Bs,BugPropertiesGrid:()=>Xa,COLUMN_WIDTHS:()=>Pu,COMPLETED_STATUS_OPTION:()=>Ms,CONT_BODY_TOP:()=>no,CUSTOM_TAB_KEY_PREFIX:()=>Wc,CalendarLinkDialog:()=>C_,ChartEmptyMessage:()=>Dn,CommentBubbleIcon:()=>di,ConfirmCountButton:()=>is,CumulativeFlowChart:()=>Bd,DATE_REMINDER_OPTIONS:()=>Vu,DEFAULT_COMPACT_COLUMNS:()=>vb,DEFAULT_PROJECT_ICON:()=>Ll,DEFAULT_TASKBOX_TAB_ITEMS:()=>r3,DEFAULT_TASK_ICON:()=>Fo,DEFAULT_WORKLOAD_CAPACITY:()=>jo,DRAWER_SECTION_TITLE_FONT_SIZE:()=>Bc,DateRangeFilterPopover:()=>t3,DrawerSection:()=>ao,DueDatePickerPopover:()=>io,ENDED_EVENT_STATUS_OPTION:()=>o0,EVENT_ICON_COLOR:()=>Gf,EVENT_TASK_ICON:()=>Yr,EmployeeSelectDialog:()=>O_,FIRST_BODY_TOP:()=>fo,GROUP_BY_OPTIONS:()=>Gl,GoogleEventChip:()=>us,GroupByMenuButton:()=>Q_,IconPickerGrid:()=>za,InlineAddressInput:()=>If,InlineTextValue:()=>Ko,KANBAN_CLOSED_COLUMN_KEY:()=>Kl,LANDSCAPE_HEIGHT:()=>fa,LANDSCAPE_WIDTH:()=>ua,LabelFilterMenu:()=>s3,LabelSelectMenu:()=>ol,LeadTimeDistributionChart:()=>Ed,LinkifiedText:()=>Xf,MANUAL_TASK_STATUS_OPTIONS:()=>Os,MARGIN_X:()=>Sn,MemberFilterMenu:()=>J_,NOTICE_GROUP_KEY:()=>l0,NOTICE_STATUS_OPTIONS:()=>Rs,NOTICE_TASK_ICON:()=>$r,NO_TASK_ICON:()=>_u,PORTRAIT_HEIGHT:()=>ca,PORTRAIT_WIDTH:()=>la,PROJECT_ICON_OPTIONS:()=>zl,PropertyRow:()=>It,RECEIVER_AVATAR_COLORS:()=>ns,REMINDER_OPTIONS:()=>Ku,REVIEW_DONE_BUTTON_SX:()=>os,ReceiverAvatarStack:()=>Cn,RelatedTasksSection:()=>sd,STATUS_KEY_REPLIED:()=>Cv,STATUS_KEY_WAITING:()=>hu,SUPPORT_GROUP_KEY:()=>u0,ShortcutHelpDialog:()=>m3,SortableTaskCard:()=>Qu,SprintBurndownChart:()=>wd,SprintChartsDialog:()=>Z_,SprintCloseDialog:()=>pd,SprintFilterMenu:()=>a3,SprintManageDialog:()=>S_,SprintVelocityChart:()=>vd,StatusSelectMenu:()=>rs,TASKBOX_COLUMNS:()=>Sa,TASKBOX_DRAWER_NARROW_MQ:()=>yo,TASKBOX_SHORTCUT_HELP:()=>h3,TASKBOX_UI_STATE_ID:()=>ku,TASKBOX_VIEW_LABELS:()=>Vd,TASKBOX_VIEW_MODES:()=>Ww,TASK_CARD_DRAG_HANDLE_CLASS:()=>fc,TASK_REPEAT_RULE_OPTIONS:()=>Xs,TASK_STATUS_OPTIONS:()=>Wn,TIME_REMINDER_OPTIONS:()=>$0,TaskAckListPopover:()=>Fa,TaskActionButton:()=>Co,TaskActivityDialog:()=>ll,TaskAttachmentsSection:()=>rl,TaskBoxColumnSummary:()=>_f,TaskBoxCompactTable:()=>t_,TaskBoxGroupBoard:()=>gc,TaskBoxMobileList:()=>Jw,TaskBoxMonthAgenda:()=>bf,TaskBoxMonthCalendar:()=>mf,TaskBoxSprintColumnSummary:()=>Kw,TaskBoxTable:()=>Xu,TaskBoxTabs:()=>o3,TaskBoxTimeline:()=>vf,TaskBoxView:()=>Hw,TaskBoxWeekCalendar:()=>hf,TaskCardContent:()=>Fs,TaskChecklistSection:()=>tl,TaskCommentInput:()=>Qf,TaskCommentsSection:()=>Jf,TaskContentEditor:()=>Qa,TaskContentTemplateMenu:()=>Za,TaskContentTranslateDialog:()=>nd,TaskContextMenu:()=>i3,TaskCorePropertiesGrid:()=>Ya,TaskCreateBody:()=>Pc,TaskCreateDrawer:()=>h_,TaskDateRangeFilter:()=>$d,TaskDetailBody:()=>dd,TaskDetailDrawer:()=>w_,TaskDetailHeader:()=>ed,TaskIconPickerPopover:()=>hi,TaskLabelChips:()=>ci,TaskLinkDialog:()=>el,TaskNoteField:()=>od,TaskPriorityChip:()=>Tn,TaskRuleManageDialog:()=>B3,TaskStatusChip:()=>ir,TaskStatusChips:()=>Nv,TaskTemplateManageDialog:()=>O3,TaskTemplateRunDialog:()=>A3,TaskboxManualDialog:()=>k3,TaskboxProvider:()=>hh,WorkloadCapacityDialog:()=>bd,WorkloadChart:()=>Pd,WorkloadPersonTasks:()=>Nd,WorkloadPersonTasksDialog:()=>Ld,WorkloadTimelineGrid:()=>Fd,addDaysToDate:()=>Cf,averageWorkload:()=>Od,buildCardBaseSx:()=>qa,buildCumulativeFlow:()=>Sd,buildLeadCycleDistribution:()=>Td,buildPlannedTask:()=>wb,buildStatusOptionColors:()=>Eu,buildTaskColumnsPrintSvgPages:()=>hv,buildTaskDetailPrintData:()=>bv,buildTaskDetailPrintSvgPages:()=>nv,buildTaskGroupSections:()=>ka,buildTaskListPrintSvgPages:()=>ev,buildTaskListXlsx:()=>gv,buildTaskRelationsModel:()=>jc,buildTaskShareText:()=>ny,buildTaskTimelinePrintSvgPages:()=>lv,buildTaskboxShortcutHelp:()=>sa,buildTaskboxTheme:()=>ga,buildTemplateTasks:()=>Bf,buildWorkloadRows:()=>bl,buildWorkloadTimeline:()=>Ad,canAssignBugManager:()=>ju,canClaimTaskItem:()=>Ba,canCompleteTaskItem:()=>Fu,canDeleteTaskItem:()=>k0,canEditTaskCoreItem:()=>_0,canEditTaskItem:()=>So,canViewTaskItem:()=>Ca,canVolunteerTaskItem:()=>Ia,clampPrintText:()=>Gi,coreEditLocked:()=>fi,countTaskRelations:()=>Fc,countWorkdays:()=>kf,createTaskboxTheme:()=>n0,daysLeftUntil:()=>wf,defaultRepeatUntil:()=>Va,defaultTaskBoxFormValues:()=>jl,defaultTaskboxUiStateValues:()=>Fl,deleteLocked:()=>Ii,escapePrintXml:()=>ur,estimatePrintTextWidth:()=>Sl,filterFilesWithinLimit:()=>Hf,formatConfirmTime:()=>fw,formatHours:()=>Uw,formatKoreanDate:()=>oo,formatKoreanDateTime:()=>Gn,formatMonthDay:()=>rc,formatOffsetLabel:()=>o_,formatPrintDate:()=>su,formatPrintStamp:()=>vs,formatSprintOptionLabel:()=>so,getBugDeviceName:()=>Bu,getBugReproName:()=>Cu,getBugResolutionName:()=>ba,getBugStatusOption:()=>i0,getDefaultDateRange:()=>L_,getEventDisplayStatusOption:()=>As,getNoDueStatusRank:()=>Pv,getNoticeAckInfo:()=>$f,getNoticeStatusOption:()=>Iu,getNoticeTargetDisplay:()=>d_,getProjectIconAnchorComponent:()=>Ev,getProjectIconComponent:()=>$t,getReminderLabel:()=>H0,getReminderOptions:()=>sc,getRemindersLabel:()=>ac,getRepeatRuleLabel:()=>Ua,getStatusOptionsForTask:()=>va,getTabHeaderConfig:()=>f3,getTaskBoxColumnDefs:()=>Ta,getTaskBoxGridMinWidth:()=>Lu,getTaskBoxGridTemplate:()=>Nu,getTaskBoxTabKind:()=>d2,getTaskConfirmInfo:()=>ls,getTaskDisplayStatusOption:()=>Xr,getTaskStatusOption:()=>xa,groupGoogleEventsByDate:()=>cs,groupSeqFromTabKey:()=>bi,hasRelation:()=>x_,hasTaskRelations:()=>id,htmlToPlainText:()=>Ja,isCustomTabKey:()=>Uy,isFlowTask:()=>kd,isOpenPoolTaskItem:()=>zu,isOverCapacity:()=>xl,isOverloaded:()=>Rd,isPastEvent:()=>Vl,isSupportOriginTaskItem:()=>Ea,isTaskDone:()=>ya,isWaitingTask:()=>Av,monthsAgoDate:()=>ml,narrowOrderSx:()=>Ro,nowDateTimeString:()=>v_,parseEstimatedHours:()=>eb,parseTaskTimeMs:()=>Kc,pickPersonWorkloadTasks:()=>yl,relationsOf:()=>zi,renderPrintHeader:()=>ii,resolveReminders:()=>Bo,resolveRowCapacity:()=>xx,resolveTaskStatusOptions:()=>es,resolveTaskboxTheme:()=>ql,resolveWorkloadCapacity:()=>Bv,selectDepartmentSharedTasks:()=>e_,shareTaskText:()=>ms,sumRemainingHours:()=>Vw,summarizeNoticeTargets:()=>il,tabKeyFromGroupSeq:()=>__,taskVisibilityOf:()=>ho,toTaskPrintRow:()=>au,toTimelinePrintRow:()=>cv,toYmd:()=>ei,toggleLabelKey:()=>wa,toggleReminder:()=>La,useBuildFileUrl:()=>Ts,useTaskAttachmentUploadMeta:()=>zf,useTaskboxConfig:()=>ct,useTaskboxForm:()=>Zm,useTaskboxShortcuts:()=>d3,useTaskboxTheme:()=>ht,useTaskboxUiState:()=>qo,useUploadMaxMb:()=>Cs,wideColumnSx:()=>zr,withOriginAuthorAvatar:()=>Ma,wrapPrintPage:()=>si,wrapPrintText:()=>ws});module.exports=Tv(t5);var hu="waiting",Cv="replied";var jo={basis:"count",default_capacity:0,by_account:{}};function Bv(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}}var Qi=require("react"),fh=require("@mui/material");var pu="--app-mobile-font-offset";function mn(e,f=0){return`calc(${e}px + max(0px, var(${pu}, 0px) - ${f}px))`}var mu=require("react/jsx-runtime"),dh=(0,Qi.createContext)({});function hh({config:e,children:f}){let g=(0,Qi.useMemo)(()=>e??{},[e]),l=g.mobileFontOffsetPx;return(0,mu.jsx)(dh.Provider,{value:g,children:l===void 0?f:(0,mu.jsx)(fh.Box,{sx:{display:"contents",[pu]:`${l}px`},children:f})})}function ct(){return(0,Qi.useContext)(dh)}function Ts(){let{buildFileUrl:e}=ct();return(0,Qi.useMemo)(()=>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 Cs(){let{uploadMaxMb:e}=ct();return e??50}var Xm=require("@ehfuse/forma");var gu=Y(require("@mui/icons-material/DoNotDisturbAltOutlined"),1),bu=Y(require("@mui/icons-material/BookmarkBorderOutlined"),1),ph=Y(require("@mui/icons-material/LabelOutlined"),1),mh=Y(require("@mui/icons-material/FlagOutlined"),1),gh=Y(require("@mui/icons-material/StarBorderOutlined"),1),bh=Y(require("@mui/icons-material/FolderOutlined"),1),yh=Y(require("@mui/icons-material/EventOutlined"),1),xh=Y(require("@mui/icons-material/BuildOutlined"),1),vh=Y(require("@mui/icons-material/LocalShippingOutlined"),1),wh=Y(require("@mui/icons-material/StorefrontOutlined"),1),_h=Y(require("@mui/icons-material/GroupsOutlined"),1),kh=Y(require("@mui/icons-material/LightbulbOutlined"),1),Sh=Y(require("@mui/icons-material/FavoriteBorderOutlined"),1),Th=Y(require("@mui/icons-material/AssignmentOutlined"),1),Ch=Y(require("@mui/icons-material/HomeOutlined"),1),Bh=Y(require("@mui/icons-material/WorkOutline"),1),Ih=Y(require("@mui/icons-material/SchoolOutlined"),1),Eh=Y(require("@mui/icons-material/LocalHospitalOutlined"),1),Mh=Y(require("@mui/icons-material/RestaurantOutlined"),1),Rh=Y(require("@mui/icons-material/LocalFloristOutlined"),1),Oh=Y(require("@mui/icons-material/DirectionsCarOutlined"),1),Ah=Y(require("@mui/icons-material/CampaignOutlined"),1),Dh=Y(require("@mui/icons-material/SavingsOutlined"),1),Ph=Y(require("@mui/icons-material/Inventory2Outlined"),1),Nh=Y(require("@mui/icons-material/CleaningServicesOutlined"),1),yu=Y(require("@mui/icons-material/HandymanOutlined"),1),Lh=Y(require("@mui/icons-material/LocalPhoneOutlined"),1),zh=Y(require("@mui/icons-material/EmailOutlined"),1),jh=Y(require("@mui/icons-material/ShoppingCartOutlined"),1),Fh=Y(require("@mui/icons-material/BarChartOutlined"),1),qh=Y(require("@mui/icons-material/PrintOutlined"),1),$h=Y(require("@mui/icons-material/SecurityOutlined"),1),Hh=Y(require("@mui/icons-material/AlarmOutlined"),1),Wh=Y(require("@mui/icons-material/AttachFileOutlined"),1),Uh=Y(require("@mui/icons-material/PhotoCameraOutlined"),1),Vh=Y(require("@mui/icons-material/ImageOutlined"),1),Kh=Y(require("@mui/icons-material/MenuBookOutlined"),1),Gh=Y(require("@mui/icons-material/EditOutlined"),1),Yh=Y(require("@mui/icons-material/KeyOutlined"),1),Xh=Y(require("@mui/icons-material/LockOutlined"),1),Zh=Y(require("@mui/icons-material/LockOpenOutlined"),1),Jh=Y(require("@mui/icons-material/SettingsOutlined"),1),Qh=Y(require("@mui/icons-material/CloudOutlined"),1),ep=Y(require("@mui/icons-material/WifiOutlined"),1),tp=Y(require("@mui/icons-material/ComputerOutlined"),1),rp=Y(require("@mui/icons-material/SmartphoneOutlined"),1),np=Y(require("@mui/icons-material/TvOutlined"),1),op=Y(require("@mui/icons-material/AccessTimeOutlined"),1),ip=Y(require("@mui/icons-material/TimerOutlined"),1),sp=Y(require("@mui/icons-material/MapOutlined"),1),ap=Y(require("@mui/icons-material/PlaceOutlined"),1),lp=Y(require("@mui/icons-material/NavigationOutlined"),1),cp=Y(require("@mui/icons-material/FlightOutlined"),1),up=Y(require("@mui/icons-material/TrainOutlined"),1),fp=Y(require("@mui/icons-material/DirectionsBusOutlined"),1),dp=Y(require("@mui/icons-material/DirectionsBikeOutlined"),1),hp=Y(require("@mui/icons-material/DirectionsWalkOutlined"),1),pp=Y(require("@mui/icons-material/DirectionsRunOutlined"),1),mp=Y(require("@mui/icons-material/FitnessCenterOutlined"),1),gp=Y(require("@mui/icons-material/SportsSoccerOutlined"),1),bp=Y(require("@mui/icons-material/EmojiEventsOutlined"),1),yp=Y(require("@mui/icons-material/CardGiftcardOutlined"),1),xp=Y(require("@mui/icons-material/CakeOutlined"),1),xu=Y(require("@mui/icons-material/CoffeeOutlined"),1),vp=Y(require("@mui/icons-material/LocalPizzaOutlined"),1),wp=Y(require("@mui/icons-material/ShoppingBagOutlined"),1),vu=Y(require("@mui/icons-material/CreditCardOutlined"),1),_p=Y(require("@mui/icons-material/AccountBalanceOutlined"),1),kp=Y(require("@mui/icons-material/AccountBalanceWalletOutlined"),1),Sp=Y(require("@mui/icons-material/AttachMoneyOutlined"),1),Tp=Y(require("@mui/icons-material/ReceiptLongOutlined"),1),Cp=Y(require("@mui/icons-material/CalculateOutlined"),1),Bp=Y(require("@mui/icons-material/TrendingUpOutlined"),1),Ip=Y(require("@mui/icons-material/ListAltOutlined"),1),Ep=Y(require("@mui/icons-material/TaskAltOutlined"),1),Mp=Y(require("@mui/icons-material/DoneAllOutlined"),1),Rp=Y(require("@mui/icons-material/WarningAmberOutlined"),1),Op=Y(require("@mui/icons-material/InfoOutlined"),1),Ap=Y(require("@mui/icons-material/HelpOutlined"),1),Dp=Y(require("@mui/icons-material/SupportAgentOutlined"),1),Pp=Y(require("@mui/icons-material/PersonOutlined"),1),Np=Y(require("@mui/icons-material/PersonAddOutlined"),1),Lp=Y(require("@mui/icons-material/BadgeOutlined"),1),zp=Y(require("@mui/icons-material/WbSunnyOutlined"),1),jp=Y(require("@mui/icons-material/DarkModeOutlined"),1),Fp=Y(require("@mui/icons-material/LocalFireDepartmentOutlined"),1),qp=Y(require("@mui/icons-material/WaterDropOutlined"),1),$p=Y(require("@mui/icons-material/BoltOutlined"),1),Hp=Y(require("@mui/icons-material/AutorenewOutlined"),1),Wp=Y(require("@mui/icons-material/ScienceOutlined"),1),Up=Y(require("@mui/icons-material/MedicalServicesOutlined"),1),Vp=Y(require("@mui/icons-material/NotificationsOutlined"),1),Kp=Y(require("@mui/icons-material/SendOutlined"),1),Gp=Y(require("@mui/icons-material/LinkOutlined"),1),Yp=Y(require("@mui/icons-material/PublicOutlined"),1),wu=Y(require("@mui/icons-material/ApartmentOutlined"),1),Xp=Y(require("@mui/icons-material/PlumbingOutlined"),1),Zp=Y(require("@mui/icons-material/ElectricalServicesOutlined"),1),Jp=Y(require("@mui/icons-material/ChatOutlined"),1),Qp=Y(require("@mui/icons-material/DescriptionOutlined"),1),em=Y(require("@mui/icons-material/FactCheckOutlined"),1),tm=Y(require("@mui/icons-material/RocketLaunchOutlined"),1),rm=Y(require("@mui/icons-material/PaletteOutlined"),1),nm=Y(require("@mui/icons-material/MusicNoteOutlined"),1),om=Y(require("@mui/icons-material/VideocamOutlined"),1),im=Y(require("@mui/icons-material/ThumbUpOutlined"),1),sm=Y(require("@mui/icons-material/PushPinOutlined"),1),am=Y(require("@mui/icons-material/SearchOutlined"),1),lm=Y(require("@mui/icons-material/VisibilityOutlined"),1),cm=Y(require("@mui/icons-material/VerifiedOutlined"),1),um=Y(require("@mui/icons-material/TrackChangesOutlined"),1),fm=Y(require("@mui/icons-material/ExtensionOutlined"),1),dm=Y(require("@mui/icons-material/CodeOutlined"),1),hm=Y(require("@mui/icons-material/BugReportOutlined"),1),pm=Y(require("@mui/icons-material/SmartToyOutlined"),1),mm=Y(require("@mui/icons-material/StorageOutlined"),1),gm=Y(require("@mui/icons-material/QrCode2Outlined"),1),bm=Y(require("@mui/icons-material/FileDownloadOutlined"),1),ym=Y(require("@mui/icons-material/FileUploadOutlined"),1),xm=Y(require("@mui/icons-material/MicOutlined"),1),vm=Y(require("@mui/icons-material/HeadphonesOutlined"),1),wm=Y(require("@mui/icons-material/MovieOutlined"),1),_m=Y(require("@mui/icons-material/SportsEsportsOutlined"),1),km=Y(require("@mui/icons-material/BrushOutlined"),1),Sm=Y(require("@mui/icons-material/ArchitectureOutlined"),1),Tm=Y(require("@mui/icons-material/EngineeringOutlined"),1),Cm=Y(require("@mui/icons-material/FactoryOutlined"),1),Bm=Y(require("@mui/icons-material/AgricultureOutlined"),1),Im=Y(require("@mui/icons-material/DirectionsBoatOutlined"),1),Em=Y(require("@mui/icons-material/TwoWheelerOutlined"),1),Mm=Y(require("@mui/icons-material/HandshakeOutlined"),1),Rm=Y(require("@mui/icons-material/GavelOutlined"),1),Om=Y(require("@mui/icons-material/BalanceOutlined"),1),Am=Y(require("@mui/icons-material/TranslateOutlined"),1),Dm=Y(require("@mui/icons-material/PsychologyOutlined"),1),Pm=Y(require("@mui/icons-material/PetsOutlined"),1),Nm=Y(require("@mui/icons-material/CelebrationOutlined"),1),Lm=Y(require("@mui/icons-material/BeachAccessOutlined"),1),zm=Y(require("@mui/icons-material/AcUnitOutlined"),1),jm=Y(require("@mui/icons-material/ForestOutlined"),1),Fm=Y(require("@mui/icons-material/LandscapeOutlined"),1),qm=Y(require("@mui/icons-material/HotelOutlined"),1),$m=Y(require("@mui/icons-material/LocalLaundryServiceOutlined"),1),Hm=Y(require("@mui/icons-material/ChairOutlined"),1),Wm=Y(require("@mui/icons-material/LocalBarOutlined"),1),Um=Y(require("@mui/icons-material/LunchDiningOutlined"),1),Vm=Y(require("@mui/icons-material/IcecreamOutlined"),1),Km=Y(require("@mui/icons-material/WorkspacePremiumOutlined"),1),Gm=Y(require("@mui/icons-material/DiamondOutlined"),1),Ym=Y(require("@mui/icons-material/VaccinesOutlined"),1),Ll="bookmark",Fo="label",$r="notifications",Yr="event",Bs="warning",Is="#e53e3e",_u="none",zl=[{key:_u,Icon:gu.default},{key:"label",Icon:ph.default},{key:"bookmark",Icon:bu.default},{key:"flag",Icon:mh.default},{key:"star",Icon:gh.default},{key:"folder",Icon:bh.default},{key:"event",Icon:yh.default},{key:"build",Icon:xh.default},{key:"shipping",Icon:vh.default},{key:"store",Icon:wh.default},{key:"groups",Icon:_h.default},{key:"idea",Icon:kh.default},{key:"heart",Icon:Sh.default},{key:"assignment",Icon:Th.default},{key:"home",Icon:Ch.default},{key:"work",Icon:Bh.default},{key:"school",Icon:Ih.default},{key:"hospital",Icon:Eh.default},{key:"restaurant",Icon:Mh.default},{key:"flower",Icon:Rh.default},{key:"car",Icon:Oh.default},{key:"campaign",Icon:Ah.default},{key:"savings",Icon:Dh.default},{key:"inventory",Icon:Ph.default},{key:"cleaning",Icon:Nh.default},{key:"handyman",Icon:yu.default},{key:"phone",Icon:Lh.default},{key:"email",Icon:zh.default},{key:"cart",Icon:jh.default},{key:"chart",Icon:Fh.default},{key:"print",Icon:qh.default},{key:"security",Icon:$h.default},{key:"alarm",Icon:Hh.default},{key:"attach",Icon:Wh.default},{key:"camera",Icon:Uh.default},{key:"image",Icon:Vh.default},{key:"book",Icon:Kh.default},{key:"edit",Icon:Gh.default},{key:"key",Icon:Yh.default},{key:"lock",Icon:Xh.default},{key:"unlock",Icon:Zh.default},{key:"settings",Icon:Jh.default},{key:"cloud",Icon:Qh.default},{key:"wifi",Icon:ep.default},{key:"computer",Icon:tp.default},{key:"smartphone",Icon:rp.default},{key:"tv",Icon:np.default},{key:"clock",Icon:op.default},{key:"timer",Icon:ip.default},{key:"map",Icon:sp.default},{key:"place",Icon:ap.default},{key:"navigation",Icon:lp.default},{key:"flight",Icon:cp.default},{key:"train",Icon:up.default},{key:"bus",Icon:fp.default},{key:"bike",Icon:dp.default},{key:"walk",Icon:hp.default},{key:"run",Icon:pp.default},{key:"fitness",Icon:mp.default},{key:"soccer",Icon:gp.default},{key:"trophy",Icon:bp.default},{key:"gift",Icon:yp.default},{key:"cake",Icon:xp.default},{key:"coffee",Icon:xu.default},{key:"pizza",Icon:vp.default},{key:"bag",Icon:wp.default},{key:"card",Icon:vu.default},{key:"bank",Icon:_p.default},{key:"wallet",Icon:kp.default},{key:"money",Icon:Sp.default},{key:"receipt",Icon:Tp.default},{key:"calculate",Icon:Cp.default},{key:"trending",Icon:Bp.default},{key:"listalt",Icon:Ip.default},{key:"task",Icon:Ep.default},{key:"doneall",Icon:Mp.default},{key:"warning",Icon:Rp.default},{key:"info",Icon:Op.default},{key:"help",Icon:Ap.default},{key:"support",Icon:Dp.default},{key:"person",Icon:Pp.default},{key:"personadd",Icon:Np.default},{key:"badge",Icon:Lp.default},{key:"sun",Icon:zp.default},{key:"moon",Icon:jp.default},{key:"fire",Icon:Fp.default},{key:"water",Icon:qp.default},{key:"bolt",Icon:$p.default},{key:"renew",Icon:Hp.default},{key:"science",Icon:Wp.default},{key:"medical",Icon:Up.default},{key:"notifications",Icon:Vp.default},{key:"send",Icon:Kp.default},{key:"link",Icon:Gp.default},{key:"public",Icon:Yp.default},{key:"apartment",Icon:wu.default},{key:"plumbing",Icon:Xp.default},{key:"electrical",Icon:Zp.default},{key:"chat",Icon:Jp.default},{key:"description",Icon:Qp.default},{key:"factcheck",Icon:em.default},{key:"rocket",Icon:tm.default},{key:"palette",Icon:rm.default},{key:"music",Icon:nm.default},{key:"video",Icon:om.default},{key:"thumbup",Icon:im.default},{key:"pin",Icon:sm.default},{key:"search",Icon:am.default},{key:"eye",Icon:lm.default},{key:"verified",Icon:cm.default},{key:"target",Icon:um.default},{key:"extension",Icon:fm.default},{key:"code",Icon:dm.default},{key:"bug",Icon:hm.default},{key:"robot",Icon:pm.default},{key:"storage",Icon:mm.default},{key:"qrcode",Icon:gm.default},{key:"download",Icon:bm.default},{key:"upload",Icon:ym.default},{key:"mic",Icon:xm.default},{key:"headphones",Icon:vm.default},{key:"movie",Icon:wm.default},{key:"game",Icon:_m.default},{key:"brush",Icon:km.default},{key:"architecture",Icon:Sm.default},{key:"engineering",Icon:Tm.default},{key:"factory",Icon:Cm.default},{key:"agriculture",Icon:Bm.default},{key:"boat",Icon:Im.default},{key:"motorcycle",Icon:Em.default},{key:"handshake",Icon:Mm.default},{key:"gavel",Icon:Rm.default},{key:"balance",Icon:Om.default},{key:"translate",Icon:Am.default},{key:"psychology",Icon:Dm.default},{key:"pets",Icon:Pm.default},{key:"celebration",Icon:Nm.default},{key:"beach",Icon:Lm.default},{key:"snow",Icon:zm.default},{key:"forest",Icon:jm.default},{key:"mountain",Icon:Fm.default},{key:"hotel",Icon:qm.default},{key:"laundry",Icon:$m.default},{key:"chair",Icon:Hm.default},{key:"bar",Icon:Wm.default},{key:"burger",Icon:Um.default},{key:"icecream",Icon:Vm.default},{key:"medal",Icon:Km.default},{key:"diamond",Icon:Gm.default},{key:"vaccine",Icon:Ym.default}],Iv={cafe:xu.default,payment:vu.default,business:wu.default,construction:yu.default};function $t(e){return e===_u?null:zl.find(f=>f.key===e)?.Icon??Iv[String(e??"")]??bu.default}function Ev(e){return $t(e)??gu.default}var jl={title:"",icon:Fo,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:""},Fl={createAttachmentFiles:[],createSubmitting:!1,attachmentUpload:null};function Zm(e){let{formId:f="taskbox-create-form",initialValues:g,onValidate:l,onSubmit:o}=e;return(0,Xm.useGlobalForm)({formId:f,initialValues:{...jl,...g},onValidate:l,onSubmit:o})}var Jm=require("@ehfuse/forma");var ku="taskbox-ui-state";function qo(){return(0,Jm.useGlobalFormaState)({stateId:ku,initialValues:Fl})}var t0=require("react"),r0=require("@mui/material");function Es(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 Qm(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 Su(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 Mv(e,f){let g=f==="dark";return{bg:g?Qm(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 e0(e,f){return{...e,...f??{}}}function ga(e,f="light"){let g=f==="dark",l=Mv(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 ql(e,f){if(!f)return e;let g=f.mode??e.mode,o={...g===e.mode?e.colors:Su(e.colors.accent,e.colors.accentContrast,g),...f.colors??{}},s=ga(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:e0(s.table.groupHeader.badge,i)}},board:{...s.board,...c,badge:e0(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 n0(e={}){let{mode:f="light",accent:g="#2563eb",accentContrast:l="#ffffff",input:o}=e;return ql(ga(Su(g,l,f),f),o)}function ht(){let e=(0,r0.useTheme)(),{theme:f}=ct(),g=e.palette.primary.main,l=e.palette.primary.contrastText,o=e.palette.mode==="dark"?"dark":"light";return(0,t0.useMemo)(()=>ql(ga(Su(g,l,o),o),f),[g,l,o,f])}var Tt=require("react"),jt=require("@mui/material"),Yu=Y(require("@mui/icons-material/Add"),1),J0=Y(require("@mui/icons-material/ArrowUpward"),1),Q0=Y(require("@mui/icons-material/ArrowDownward"),1),eg=Y(require("@mui/icons-material/KeyboardArrowDown"),1),tg=Y(require("@mui/icons-material/KeyboardArrowRight"),1),uc=Y(require("@mui/icons-material/Check"),1),rg=Y(require("@mui/icons-material/FilterList"),1),ng=Y(require("@mui/icons-material/InboxOutlined"),1),og=require("react-virtuoso"),ig=Y(require("@ehfuse/overlay-scrollbar"),1);var Tu=require("@mui/material");var $l=require("react/jsx-runtime"),Rv={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 Tn({priority:e,small:f=!1,plain:g=!1}){let l=Rv[e],o=ht(),s=o.mode==="dark",r=g||e==="low";return(0,$l.jsxs)(Tu.Box,{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?Es(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:[(0,$l.jsx)(Tu.Box,{component:"span",sx:{width:f?6:8,height:f?6:8,borderRadius:"50%",bgcolor:l.dot}}),l.label]})}var ts=require("@mui/material"),s0=Y(require("@mui/icons-material/Check"),1);function $o(){return{}}var Hl=[{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"}],Wl=[{key:"desktop",name:"\uB370\uC2A4\uD06C\uD1B1"},{key:"tablet",name:"\uD0DC\uBE14\uB9BF"},{key:"mobile",name:"\uD734\uB300\uD3F0"}],Ul=[{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 Cu(e){return Hl.find(f=>f.key===e)?.name??""}function Bu(e){return Wl.find(f=>f.key===e)?.name??""}function ba(e){return Ul.find(f=>f.key===e)?.name??""}function Vl(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 ya(e,f=new Date){return e.is_event?Vl(e,f):!!e.completed}var Wn=[{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"}],Os=Wn;function xa(e){return Wn.find(f=>f.key===e)??Wn[0]}var Ms={key:"completed",name:"\uC644\uB8CC",bg:"#e3eefb",fg:"#1d4f91",dot:"#2f80ed"};function Xr(e){if(e.is_notice)return Iu(e.status);if(e.is_bug&&e.completed){let f=ba(e.resolution)||"\uC644\uB8CC";return{...Ms,name:f}}return e.completed&&e.status!=="hold"?Ms:e.is_bug?i0(e.status):xa(e.status)}var o0={key:"event_ended",name:"\uC885\uB8CC",bg:"#efefed",fg:"#57564f",dot:"#9a9a97"};function As(e){return Vl(e)?o0:null}var Rs=[{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 Iu(e){return Rs.find(f=>f.key===e)??Rs[1]}var Kl="__closed__",Ci=[{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"}],Ov=[...Ci.filter(e=>e.key!=="bug_hold"),{key:Kl,name:"\uC644\uB8CC",bg:"#e3eefb",fg:"#1d4f91",dot:"#2f80ed"},...Ci.filter(e=>e.key==="bug_hold")];function i0(e){return Ci.find(f=>f.key===e)??Ci[0]}function va(e){return e.is_notice?Rs:e.is_bug?Ci:Os}function Av(e){return e.status===hu}var Dv={in_progress:0,not_started:2,hold:3};function Pv(e){return e.completed?9:Dv[String(e.status??"")]??2}function es(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=As({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:[Iu(e.status),...l]:e.is_bug?[Xr({...e,is_notice:!1}),...l]:e.completed?[Ms,...l]:[xa(e.status),...l]}function Eu(e){return{bg:`${e}1f`,fg:e,dot:e}}function wa(e,f){return e.includes(f)?e.filter(g=>g!==f):[...e,f]}var _a=require("@mui/material");var Bi=require("react/jsx-runtime");function ir({option:e,small:f=!1}){let g=ht(),l=g.mode==="dark",o=e.key==="not_started";return(0,Bi.jsxs)(_a.Box,{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?Es(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:[(0,Bi.jsx)(_a.Box,{component:"span",sx:{width:f?6:8,height:f?6:8,borderRadius:"50%",bgcolor:e.dot,flexShrink:0}}),e.name]})}function Nv({task:e,statusOptions:f,small:g=!1}){let l=es(e,f);return l.length===0?null:(0,Bi.jsx)(_a.Box,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:.5},children:l.map(o=>(0,Bi.jsx)(ir,{option:o,small:g},o.key))})}function ci({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:(0,Bi.jsx)(_a.Box,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:.5},children:l.map(o=>(0,Bi.jsx)(ir,{option:o,small:!0},o.key))})}var ui=require("react/jsx-runtime");function rs({anchorEl:e,value:f,options:g=Wn,onSelect:l,onComplete:o,onClose:s}){let r=$o();return(0,ui.jsxs)(ts.Menu,{anchorEl:e,open:!!e,onClose:s,transitionDuration:0,...r,children:[g.map(t=>(0,ui.jsxs)(ts.MenuItem,{onClick:()=>{l(t.key),s()},sx:{fontSize:14,minWidth:150,gap:1},children:[(0,ui.jsx)(ir,{option:t}),f===t.key?(0,ui.jsx)(s0.default,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},t.key)),o?[(0,ui.jsx)(ts.Divider,{sx:{my:.5}},"complete-divider"),(0,ui.jsx)(ts.MenuItem,{onClick:()=>{o(),s()},sx:{fontSize:14,minWidth:150,gap:1},children:(0,ui.jsx)(ir,{option:Ms})},"complete")]:null]})}function Mu(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 Zr(e,f="YYYY-MM-DD"){let g=typeof e=="string"?Mu(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 a0(){return Zr(new Date)}var Gl=[{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"}],l0="__notice__",c0="__bug__",u0="__support__";function Lv(e){let f=new Date(`${e}T00:00:00`);return f.setDate(f.getDate()+(6-f.getDay())),Zr(f)}var zv=[{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 jv(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 Fv(e){return typeof e=="function"?e:f=>f.is_bug?"bug":f.is_support?"support":null}function ka(e,f,g,l=[],o=[],s="",r,t=!1){let n=e.filter(d=>d.is_notice);if(n.length>0){let d=ka(e.filter(u=>!u.is_notice),f,g,l,o,s,r,t);return[{key:l0,label:"\uACF5\uC9C0\uC0AC\uD56D",tasks:n},...d]}if(t){let d=Fv(t),u=e.filter(m=>d(m)==="bug"),b=e.filter(m=>d(m)==="support");if(u.length>0||b.length>0){let m=ka(e.filter(x=>d(x)===null),f,g,l,o,s,r,!1);return[...u.length>0?[{key:c0,label:"\uC624\uB958",tasks:u}]:[],...b.length>0?[{key:u0,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=Lv(g);for(let u of e)i(jv(u,g,d),u);a=zv}else if(f==="status"){for(let d of e)i(xa(d.status).key,d);a=Wn.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}var f0=Y(require("@mui/icons-material/LabelOutlined"),1),d0=Y(require("@mui/icons-material/NotesOutlined"),1),h0=Y(require("@mui/icons-material/AutorenewOutlined"),1),p0=Y(require("@mui/icons-material/CalendarTodayOutlined"),1),m0=Y(require("@mui/icons-material/EventOutlined"),1),Au=Y(require("@mui/icons-material/PersonOutlineOutlined"),1),Du=Y(require("@mui/icons-material/PeopleAltOutlined"),1),Yl=Y(require("@mui/icons-material/CheckCircleOutlineOutlined"),1),g0=Y(require("@mui/icons-material/FlagOutlined"),1),Xl=Y(require("@mui/icons-material/AccessTimeOutlined"),1),b0=Y(require("@mui/icons-material/StickyNote2Outlined"),1),y0=Y(require("@mui/icons-material/ViewKanbanOutlined"),1),x0=Y(require("@mui/icons-material/ConfirmationNumberOutlined"),1),v0=Y(require("@mui/icons-material/QuestionAnswerOutlined"),1),Jr=require("react/jsx-runtime"),Pu={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 Nu(e){return Ta(e).map(f=>Pu[f.id]).join(" ")}function Lu(e){return Ta(e).reduce((f,g)=>{let l=Pu[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 qv={id:"deleted_time",label:"\uC0AD\uC81C\uC77C\uC2DC",icon:(0,Jr.jsx)(Xl.default,{sx:{fontSize:15}}),align:"center",sortable:!0},$v={id:"completed_time",label:"\uC644\uB8CC\uC77C\uC2DC",icon:(0,Jr.jsx)(Xl.default,{sx:{fontSize:15}}),align:"center",sortable:!0},Hv={id:"created_time",label:"\uC791\uC131\uC77C\uC2DC",icon:(0,Jr.jsx)(Xl.default,{sx:{fontSize:15}}),align:"center",sortable:!0},Wv={id:"ticket_no",label:"\uD2F0\uCF13",icon:(0,Jr.jsx)(x0.default,{sx:{fontSize:15}}),align:"center"},Uv={id:"support_type",label:"\uC885\uB958",icon:(0,Jr.jsx)(f0.default,{sx:{fontSize:15}}),align:"center"},Vv={id:"author_name",label:"\uC791\uC131\uC790",icon:(0,Jr.jsx)(Au.default,{sx:{fontSize:15}}),align:"center",valueFilter:"author_name"},Kv={id:"answerer_names",label:"\uB2F5\uBCC0\uC790",icon:(0,Jr.jsx)(v0.default,{sx:{fontSize:15}}),align:"center",valueFilter:"answerer_names"},Gv={id:"project",label:"\uD504\uB85C\uC81D\uD2B8",icon:(0,Jr.jsx)(y0.default,{sx:{fontSize:15}}),projectFilter:!0},Yv={id:"targets",label:"\uB300\uC0C1\uC790",icon:(0,Jr.jsx)(Du.default,{sx:{fontSize:15}})},Ou={id:"priority",label:"\uC911\uC694\uB3C4",icon:(0,Jr.jsx)(g0.default,{sx:{fontSize:15}}),align:"center",priorityFilter:!0},Xv={id:"ack",label:"\uD655\uC778",icon:(0,Jr.jsx)(Yl.default,{sx:{fontSize:15}}),align:"center",ackFilter:!0},Zv={id:"confirm",label:"\uD655\uC778",icon:(0,Jr.jsx)(Yl.default,{sx:{fontSize:15}}),align:"center",ackFilter:!0};function Ru(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,Ou]:[...e.slice(0,g),Ou,...e.slice(g)]}function Ta(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=>Sa.find(m=>m.id===b);return[u("completed"),Uv,u("title"),u("status"),Hv,u("start_date"),u("due_date"),Vv,Kv,{...u("manager_name"),align:"center"},u("receiver_names"),Ou]}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),Wv,...b.slice(x)]};if(s)return a(Ru(Sa.filter(u=>!["manager_name","receiver_names","request"].includes(u.id)).flatMap(u=>u.id==="due_date"?[u,Yv]:u.id==="note"?[Xv,u]:[u])));let h=g?Sa:Sa.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?qv:$v,...h.slice(u)]}if(i==="action"){let u=h.findIndex(b=>b.id==="note");h=[...h.slice(0,u),Zv,...h.slice(u)]}if(!f)return a(Ru(h));let d=h.findIndex(u=>u.id==="receiver_names");return a(Ru([...h.slice(0,d+1),Gv,...h.slice(d+1)]))}var Sa=[{id:"completed",label:"\uC644\uB8CC",icon:null,align:"center"},{id:"title",label:"\uC81C\uBAA9",icon:(0,Jr.jsx)(d0.default,{sx:{fontSize:15}}),sortable:!0},{id:"status",label:"\uC0C1\uD0DC",icon:(0,Jr.jsx)(h0.default,{sx:{fontSize:15}}),align:"center",statusFilter:!0},{id:"start_date",label:"\uC2DC\uC791\uC77C\uC2DC",icon:(0,Jr.jsx)(p0.default,{sx:{fontSize:15}}),align:"center",sortable:!0},{id:"due_date",label:"\uB9C8\uAC10\uC608\uC815",icon:(0,Jr.jsx)(m0.default,{sx:{fontSize:15}}),align:"center",sortable:!0},{id:"manager_name",label:"\uCC45\uC784\uC790",icon:(0,Jr.jsx)(Au.default,{sx:{fontSize:15}}),memberFilter:"manager"},{id:"receiver_names",label:"\uCC38\uC870\uC790",icon:(0,Jr.jsx)(Du.default,{sx:{fontSize:15}}),memberFilter:"receivers"},{id:"request",label:"\uD655\uC778",icon:(0,Jr.jsx)(Yl.default,{sx:{fontSize:15}}),align:"center",ackFilter:!0},{id:"note",label:"\uBE44\uACE0",icon:(0,Jr.jsx)(b0.default,{sx:{fontSize:15}})}];var zn=require("@mui/material");var Zl=require("@mui/material");function dr(){let{isMobile:e}=ct(),f=(0,Zl.useTheme)(),g=(0,Zl.useMediaQuery)(f.breakpoints.up("lg"));return e!==void 0?e:!g}var Un=require("react/jsx-runtime");function w0(){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 Jv({title:e,content:f,confirmText:g,cancelText:l,titleFontSize:o,actionFontSize:s,actionMinHeight:r,onCancel:t,onConfirm:n}){return(0,Un.jsxs)(Un.Fragment,{children:[(0,Un.jsx)(zn.Typography,{component:"div",sx:{fontSize:o,fontWeight:700,color:"#0f172a",lineHeight:1.4},children:e}),f,(0,Un.jsxs)(zn.Box,{sx:{display:"flex",gap:2,justifyContent:"flex-end"},children:[(0,Un.jsx)(zn.Button,{size:"medium",variant:"outlined",color:"inherit",onClick:()=>{w0(),t()},fullWidth:!0,sx:{fontSize:s,minHeight:r,fontWeight:700},children:l}),(0,Un.jsx)(zn.Button,{size:"medium",variant:"contained",color:"primary",onClick:()=>{w0(),n()},fullWidth:!0,sx:{fontSize:s,minHeight:r,fontWeight:700},children:g})]})]})}function Qt({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=dr(),m=(0,Un.jsx)(Jv,{title:g,content:l,confirmText:o,cancelText:s,titleFontSize:c,actionFontSize:i,actionMinHeight:a,onCancel:d,onConfirm:u});return b?(0,Un.jsx)(zn.Dialog,{open:e,onClose:d,sx:{zIndex:h},slotProps:{paper:{sx:{p:3,display:"flex",flexDirection:"column",gap:3,minWidth:260}}},children:m}):(0,Un.jsx)(zn.Popper,{open:e,anchorEl:f,placement:r,sx:{zIndex:h},children:(0,Un.jsx)(zn.ClickAwayListener,{onClickAway:d,children:(0,Un.jsx)(zn.Paper,{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})})})}var Ql=require("react"),ec=require("@mui/material");var Jl=require("react/jsx-runtime");function Vn(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 Kn({open:e,anchorEl:f,nextCompleted:g,returnMode:l=!1,onCancel:o,onConfirm:s}){let[r,t]=(0,Ql.useState)("");(0,Ql.useEffect)(()=>{e&&t("")},[e]);let n=!g&&l;return(0,Jl.jsx)(Qt,{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?(0,Jl.jsx)(ec.Box,{sx:{mt:1},children:(0,Jl.jsx)(ec.TextField,{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():"")}})}var N0=require("react");function ho(e){let f=e.visibility;return f==="involved"||f==="group"||f==="all"?f:e.is_open?"all":"involved"}function Ca(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=ho(e);if(o==="all")return!0;if(o==="group"){let s=e.visibility_group_seq??0;return s>0&&g===s}return!1}function zu(e){return e.is_notice||e.is_event||e.completed||e.archived||(e.manager_account_seq??0)!==0?!1:ho(e)!=="involved"}function Ba(e,f){return f<=0||(e.author_account_seq??0)===f?!1:zu(e)}function Ia(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||zu(e)?!1:(e.receiver_account_seqs??[]).includes(f)}function ju(e){return!!e.is_bug&&(e.manager_account_seq??0)===0&&e.status==="bug_received"}function Ea(e){return(e.origin_license_seq??0)>0}function Fu(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 So(e,f){return f<=0?!1:Ea(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 _0(e,f){return f<=0?!1:Ea(e)?!0:e.is_notice?(e.author_account_seq??0)===f:(e.author_account_seq??0)===f||(e.manager_account_seq??0)===f}function k0(e,f){return f<=0?!1:Ea(e)?!0:(e.author_account_seq??0)===f}function fi(e,f,g){return g==="coreAuthorManager"?!_0(e,f):!So(e,f)}function Ii(e,f,g,l){return g==="coreAuthorManager"?!k0(e,f):l}var Qv=[119,121,141,143];function Ma(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||!Ea(e)||f?.get(l)===g)return f;let o=new Map(f??[]);return o.set(l,g),o}var Ho=require("react"),gt=require("@mui/material"),R0=Y(require("@mui/icons-material/PublicOutlined"),1),O0=Y(require("@mui/icons-material/Group"),1),A0=Y(require("@mui/icons-material/CheckCircle"),1),D0=Y(require("@mui/icons-material/CheckCircleOutlineOutlined"),1);var Oa=require("react"),Aa=require("@mui/material"),T0=Y(require("@mui/icons-material/PersonOutlineOutlined"),1),Ra=require("react/jsx-runtime"),qu=new Set,S0=e=>e.startsWith("data:")||e.startsWith("blob:");function ew(e){let f=e.trim();return f?([...f][0]??"").toUpperCase():""}function po({src:e,name:f="",avatarSx:g,iconFontSize:l=40}){let[o,s]=(0,Oa.useState)(()=>e?S0(e)||qu.has(e):!1),[r,t]=(0,Oa.useState)(!1),n={position:"relative",overflow:"hidden",borderRadius:"15px"},c=g?[n,...Array.isArray(g)?g:[g]]:n;if((0,Oa.useEffect)(()=>{t(!1),s(e?S0(e)||qu.has(e):!1)},[e]),!e||r){let i=ew(f);return(0,Ra.jsx)(Aa.Avatar,{sx:c,children:i?(0,Ra.jsx)(Aa.Box,{component:"span",sx:{fontSize:"inherit",fontWeight:600,lineHeight:1,userSelect:"none"},children:i}):(0,Ra.jsx)(T0.default,{sx:{fontSize:l}})})}return(0,Ra.jsx)(Aa.Avatar,{src:e,imgProps:{onLoad:()=>{qu.add(e),s(!0)},onError:()=>t(!0),style:o?void 0:{opacity:0}},sx:c})}var tw=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),tc=(e,f)=>{if(!f||!f.trim())return[{text:e,highlight:!1}];try{let g=tw(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 rw=["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"];function oo(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("-",".")} (${rw[g.getDay()]})`}function rc(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 Gn(e){let f=String(e??"").trim(),[g,l=""]=f.split(" "),o=oo(g);return o?l?`${o} ${l.slice(0,5)}`:o:""}function Ds(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}`}var Pa=require("@mui/material");var Da=require("react/jsx-runtime"),ns=[{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 Cn({names:e,size:f=22,ringFirst:g=!1,avatarSrcByName:l}){let o=ht(),s=ct().avatarSrcByName,r=l??s;return(0,Da.jsx)(Pa.Box,{sx:{display:"flex",alignItems:"center"},children:e.map((t,n)=>(0,Da.jsx)(Pa.Tooltip,{title:g&&n===0?`\uCC45\uC784\uC790 \xB7 ${t}`:t,arrow:!0,children:(0,Da.jsx)(Pa.Box,{sx:{ml:n===0?0:"-7px",zIndex:n,borderRadius:"50%",border:`2px solid ${o.avatar.separatorColor}`,display:"inline-flex",...o.avatar.sx},children:(0,Da.jsx)(po,{src:r?.get(t)??"",name:t,avatarSx:{width:f,height:f,fontSize:Math.round(f/2),borderRadius:"50%",...ns[n%ns.length]},iconFontSize:Math.round(f*.6)})})},`${t}-${n}`))})}var Ps=require("@mui/material"),C0=Y(require("@mui/icons-material/CheckCircle"),1);var To=require("react/jsx-runtime");function nw(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 ow(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 os={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 Co({onClick:e,children:f,fullWidth:g=!1,sx:l}){let o=ht();return(0,To.jsx)(Ps.Button,{size:"small",variant:"contained",color:"inherit",fullWidth:g,sx:[ow(o),...Array.isArray(l)?l:l?[l]:[]],onClick:s=>{s.stopPropagation(),e(s)},children:f})}function is({canConfirm:e,count:f,total:g,myConfirmed:l=!1,onConfirm:o,onShowList:s}){let r=ht(),t=nw(r);return e?(0,To.jsx)(Co,{onClick:()=>o(),children:"\uD655\uC778"}):(0,To.jsxs)(Ps.Button,{size:"small",variant:"outlined",color:"inherit",sx:t,onClick:n=>{n.stopPropagation(),s(n.currentTarget)},children:[l?(0,To.jsx)(C0.default,{sx:{fontSize:16,color:"#2f80ed",flexShrink:0}}):null,(0,To.jsx)(Ps.Box,{component:"span",sx:{flex:1,textAlign:"center",minWidth:0},children:g>0&&f>=g?"\uD655\uC778\uC644\uB8CC":(0,To.jsxs)(To.Fragment,{children:[f,(0,To.jsx)(Ps.Box,{component:"span",sx:{mx:.15},children:"/"}),g]})})]})}var B0=require("react/jsx-runtime");function Ns({anchorEl:e,onCancel:f,onConfirm:g}){return(0,B0.jsx)(Qt,{open:!!e,anchorEl:e,title:"\uAC80\uC218\uB97C \uC644\uB8CC\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",onCancel:f,onConfirm:g})}var I0=require("@mui/material"),ss=require("react/jsx-runtime");function di({sx:e,...f}){return(0,ss.jsxs)(I0.SvgIcon,{viewBox:"0 0 48 48",...f,sx:{fill:"none",...e},children:[(0,ss.jsx)("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"}),(0,ss.jsx)("circle",{cx:"23.91",cy:"21.46",r:"2.71",fill:"currentColor",stroke:"none"}),(0,ss.jsx)("circle",{cx:"33.65",cy:"21.46",r:"2.71",fill:"currentColor",stroke:"none"}),(0,ss.jsx)("circle",{cx:"14.18",cy:"21.46",r:"2.71",fill:"currentColor",stroke:"none"})]})}var Ae=require("react/jsx-runtime");function Na(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 iw(e){let f=String(e.event_time??"").trim();return e.is_event&&/^\d{2}:\d{2}$/.test(f)?Na(`${String(e.due_date??"").slice(0,10)} ${f}`):Na(e.due_date)}function Hu(e,f){let g=String(e??"").trim()||"-";return tc(g,f).map((l,o)=>(0,Ae.jsx)("span",{className:l.highlight?"font-semibold text-blue-600":void 0,children:l.text},`${l.text}-${o}`))}function Ls({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(0,Ae.jsxs)(Ae.Fragment,{children:[(0,Ae.jsx)(po,{src:g?.get(s)??"",name:s,avatarSx:{width:24,height:24,fontSize:12,borderRadius:"50%",...ns[0]},iconFontSize:15}),(0,Ae.jsx)(gt.Box,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...l?{fontWeight:500,color:"#2f80ed"}:{}},children:Hu(s,f)})]})}return(0,Ae.jsx)(Cn,{names:o,size:22,avatarSrcByName:g})}function E0({display:e,summary:f,searchText:g,avatarSrcByName:l}){if(!e||e.kind==="everyone")return(0,Ae.jsx)(gt.Box,{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(0,Ae.jsx)(Ls,{names:s,searchText:g,avatarSrcByName:l});let r=[...o,...s],t=r.join(", ");return r.length>2?(0,Ae.jsx)(gt.Tooltip,{title:t,arrow:!0,children:(0,Ae.jsx)(gt.Box,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:`${r[0]}, ${r[1]} \uC678 ${r.length-2}\uBA85`})}):(0,Ae.jsx)(gt.Tooltip,{title:t,arrow:!0,children:(0,Ae.jsxs)(gt.Box,{sx:{display:"flex",alignItems:"center",gap:.75,minWidth:0},children:[(0,Ae.jsx)(gt.Box,{component:"span",sx:{flexShrink:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:o.join(", ")+(s.length>0?",":"")}),s.length>0?(0,Ae.jsx)(Ls,{names:s,searchText:g,avatarSrcByName:l}):null]})})}function nc(e){return e==="\uC624\uB958\uC81C\uBCF4"?"\uC624\uB958":e}function M0(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 $u({label:e,bg:f,fg:g}){return(0,Ae.jsx)(gt.Box,{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 P0=(0,Ho.memo)(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:I,projectLabel:M="",projectIcon:z="",onProjectClick:O,onRequestToggleCompleted:P,onDateClick:N,onChangeNote:$,onMemberClick:L,onClaimClick:C,onVolunteerClick:S,onStatusClick:D,onOpenDetail:p,onTaskContextMenu:y,hideBottomBorder:v=!1,completeLocked:w=!1,unread:_=!1,notice:T=!1,noticeReadOnly:R=!1,coreLocked:F,readOnly:H=!1,onIconClick:V,lastColumnCentered:A=!1,noteLocked:q=!1,targetSummary:B="",targetDisplay:E,onArchiveTask:j,ackInfo:U,onAckConfirm:X,onAckListClick:G,onPriorityClick:W}){let[Z,J]=(0,Ho.useState)(!1),[K,ee]=(0,Ho.useState)(null),[te,oe]=(0,Ho.useState)(""),ne=(0,Ho.useRef)(null);(0,Ho.useEffect)(()=>{if(!Z)return;let me=Jt=>{let Ue=ne.current;Ue&&(Jt.target instanceof Node&&Ue.contains(Jt.target)||Ue.blur())};return document.addEventListener("mousedown",me,!0),document.addEventListener("touchstart",me,!0),()=>{document.removeEventListener("mousedown",me,!0),document.removeEventListener("touchstart",me,!0)}},[Z]);let ie=[f.manager_account_seq??0,...f.receiver_account_seqs??[]].some(me=>me>0&&me!==(f.author_account_seq??0)),ae=R||H,pe=(F??R)||H,ye=r>0&&!f.is_notice&&!f.is_event&&(f.manager_account_seq??0)===r,Se=pe||!!f.is_notice,Be=ht(),Ce=!!C&&Ba(f,r),Pe=!!S&&Ia(f,r),ft=Se&&!ju(f),xe=f.is_notice?(0,Ae.jsx)(is,{canConfirm:!!U?.canAck,count:U?.count??0,total:U?.total??0,myConfirmed:!!U?.acked,onConfirm:()=>X?.(f),onShowList:me=>G?.(f,me)}):null,se=!f.is_notice&&!f.completed&&!!f.due_date&&f.due_date.slice(0,10)<=t,Ie=ct(),ke=Ds(f,Ie.resolveTask),_e=!f.is_notice&&f.completed&&f.review_pending&&Ie.onReviewDone&&(Ie.myAccountSeq??0)>0&&(f.author_account_seq??0)===(Ie.myAccountSeq??0)?(0,Ae.jsxs)(Ae.Fragment,{children:[(0,Ae.jsx)(gt.Button,{variant:"contained",size:"small",disableElevation:!0,onClick:me=>{me.stopPropagation(),ee(me.currentTarget)},sx:os,children:"\uAC80\uC218\uC644\uB8CC"}),(0,Ae.jsx)(Ns,{anchorEl:K,onCancel:()=>ee(null),onConfirm:()=>{Ie.onReviewDone?.(f),ee(null)}})]}):null,rt=se?"#e5484d":Be.colors.textPrimary,Fe=(0,Ae.jsx)(gt.Box,{className:"cell",onClick:pe?void 0:me=>N(f,"due_date",me.currentTarget),sx:{justifyContent:"center",color:rt,fontWeight:500,whiteSpace:"nowrap",...pe?{}:{cursor:"pointer","&:hover":{bgcolor:Be.table.cellHoverBg}}},children:f.due_date?iw(f):null});return(0,Ae.jsxs)(gt.Box,{onContextMenu:me=>y(f,me),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,...A?{pl:2}:{}}},children:[(0,Ae.jsx)(gt.Box,{className:"cell",sx:{justifyContent:"center"},children:f.is_event?(()=>{let me=$t(f.icon||Yr);if(!me)return null;let Jt=(0,Ae.jsx)(me,{sx:{fontSize:19,color:f.icon_color||"#1e3a8a"}});return ae||!V?Jt:(0,Ae.jsx)(gt.Tooltip,{title:"\uC544\uC774\uCF58 \uBCC0\uACBD",arrow:!0,enterDelay:400,disableInteractive:!0,children:(0,Ae.jsx)(gt.ButtonBase,{onClick:Ue=>{Ue.stopPropagation(),V(f,Ue.currentTarget)},sx:{p:.25,borderRadius:1,"&:hover":{bgcolor:Be.table.cellHoverBg}},children:Jt})})})():!R&&!w&&!m?(0,Ae.jsx)(gt.Tooltip,{title:f.completed&&f.completed_by?`${f.completed_by} \xB7 ${Gn(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:(0,Ae.jsx)(gt.Checkbox,{checked:f.completed,inputProps:{"aria-label":f.completed?`${f.title} \uC644\uB8CC \uD574\uC81C`:`${f.title} \uC644\uB8CC \uCC98\uB9AC`},icon:(0,Ae.jsx)(D0.default,{sx:{fontSize:20,color:"#9a9a97",opacity:.45}}),checkedIcon:(0,Ae.jsx)(A0.default,{sx:{fontSize:20,color:"#2f80ed"}}),onClick:me=>me.stopPropagation(),onChange:(me,Jt)=>P({anchorEl:me.currentTarget,task:f,nextCompleted:Jt}),sx:{p:.5}})}):null}),d?(0,Ae.jsx)(gt.Box,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap",fontVariantNumeric:"tabular-nums",color:"#37352f"},children:f.ticket_no||"-"}):null,u?(0,Ae.jsx)(gt.Box,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap"},children:f.support_type?(()=>{let me=M0(f.support_type);return(0,Ae.jsx)($u,{label:nc(f.support_type),bg:me.bg,fg:me.fg})})():"-"}):null,(0,Ae.jsxs)(gt.Box,{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 me=$t(f.icon||$r);return me?(0,Ae.jsx)(me,{sx:{fontSize:18,flexShrink:0,color:f.icon_color||"#e5484d"}}):null})(),!u&&f.is_support&&f.support_type?(()=>{let me=M0(f.support_type);return(0,Ae.jsx)($u,{label:nc(f.support_type),bg:me.bg,fg:me.fg})})():null,d&&(f.origin_license_seq??0)>0&&f.origin_license_name?(0,Ae.jsx)($u,{label:f.origin_license_name,bg:"#fdf0e6",fg:"#d9730d"}):null,(()=>{if(f.is_notice||u||f.is_support)return null;let me=ho(f);return me==="involved"?null:(0,Ae.jsx)(gt.Tooltip,{title:me==="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:me==="all"?(0,Ae.jsx)(R0.default,{sx:{fontSize:15,flexShrink:0,color:"#2f80ed"}}):(0,Ae.jsx)(O0.default,{sx:{fontSize:15,flexShrink:0,color:"#d9730d"}})})})(),(0,Ae.jsx)(gt.Box,{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:Hu(f.title,s)}),ke?(0,Ae.jsx)(gt.Box,{component:"span",sx:{flexShrink:0,fontSize:12.5,color:Be.colors.textMuted,fontVariantNumeric:"tabular-nums"},children:ke}):null,(f.comment_count??f.comments?.length??0)>0?(0,Ae.jsx)(di,{sx:{fontSize:16,flexShrink:0,color:"#9a9a97"}}):null,(0,Ae.jsx)(gt.Box,{sx:{flexShrink:0,display:"flex",alignItems:"center"},children:(0,Ae.jsx)(ci,{labelKeys:f.label_keys??[],labelOptions:l})}),_&&!f.completed?(0,Ae.jsx)(gt.Box,{component:"span",sx:{flexShrink:0,px:.55,fontSize:10.5,fontWeight:700,lineHeight:1.6,color:"#fff",bgcolor:"#e5484d",borderRadius:"4px"},children:"N"}):null,ya(f)&&!f.archived&&!ae&&j?(0,Ae.jsx)(gt.Button,{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:me=>{me.stopPropagation(),j(f)},children:"\uBCF4\uAD00"}):null]}),(()=>{let me=ae||!!f.is_event||!!f.completed;return(0,Ae.jsx)(gt.Box,{className:"cell",onClick:me?void 0:Jt=>D(f,Jt.currentTarget),sx:{py:.5,justifyContent:"center",...me?{}:{cursor:"pointer","&:hover":{bgcolor:Be.table.cellHoverBg}}},children:f.is_event?(()=>{let Jt=As(f);return Jt?(0,Ae.jsx)(ir,{option:Jt}):null})():(0,Ae.jsx)(ir,{option:Xr(f)})})})(),u?(0,Ae.jsx)(gt.Box,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap",fontVariantNumeric:"tabular-nums"},children:Na(f.created_time)}):null,(0,Ae.jsx)(gt.Box,{className:"cell",onClick:pe?void 0:me=>N(f,"start_date",me.currentTarget),sx:{justifyContent:"center",whiteSpace:"nowrap",...pe?{}:{cursor:"pointer","&:hover":{bgcolor:Be.table.cellHoverBg}}},children:Na(f.start_date)}),Fe,u?(0,Ae.jsxs)(Ae.Fragment,{children:[(0,Ae.jsx)(gt.Tooltip,{title:f.origin_license_name||"",arrow:!0,placement:"top",disableInteractive:!0,slotProps:{transition:{timeout:0}},children:(0,Ae.jsx)(gt.Box,{className:"cell",sx:{gap:.75,justifyContent:"center"},children:(0,Ae.jsx)(Ls,{names:[f.author_name||f.origin_author_name||f.created_by||""],searchText:s,avatarSrcByName:Ma(f,o)})})}),(0,Ae.jsx)(gt.Box,{className:"cell",sx:{gap:.75,justifyContent:"center"},children:(0,Ae.jsx)(Ls,{names:(f.answerer_names??[]).slice(0,1),searchText:s,avatarSrcByName:o})})]}):null,T?(0,Ae.jsx)(gt.Box,{className:"cell",onClick:pe?void 0:()=>L(f,"targets"),sx:{gap:.75,...pe?{}:{cursor:"pointer","&:hover":{bgcolor:Be.table.cellHoverBg}}},children:(0,Ae.jsx)(E0,{display:E,summary:B,searchText:s,avatarSrcByName:o})}):null,!T&&f.is_notice?(0,Ae.jsx)(gt.Box,{className:"cell",onClick:pe?void 0:()=>L(f,"targets"),sx:{gridColumn:c?"span 2":"auto",gap:.75,...pe?{}:{cursor:"pointer","&:hover":{bgcolor:Be.table.cellHoverBg}}},children:(0,Ae.jsx)(E0,{display:E,summary:B,searchText:s,avatarSrcByName:o})}):null,!T&&!f.is_notice&&!f.is_event&&c?(0,Ae.jsx)(gt.Box,{className:"cell",onClick:ft?void 0:()=>L(f,"manager"),sx:{gap:.75,...Ce||Pe||b?{justifyContent:"center"}:{},...ft?{}:{cursor:"pointer","&:hover":{bgcolor:Be.table.cellHoverBg}}},children:Ce?(0,Ae.jsx)(Co,{onClick:me=>C?.(f,me.currentTarget),children:"\uAC00\uC838\uAC00\uAE30"}):Pe?(0,Ae.jsx)(Co,{onClick:me=>S?.(f,me.currentTarget),children:"\uAC00\uC838\uAC00\uAE30"}):(0,Ae.jsx)(Ls,{names:f.manager_name?[f.manager_name]:[],searchText:s,avatarSrcByName:o,emphasize:ye})}):null,!T&&!f.is_notice?(0,Ae.jsx)(gt.Box,{className:"cell",onClick:Se?void 0:()=>L(f,"receivers"),sx:{gridColumn:f.is_event&&c?"span 2":"auto",gap:.75,...Se?{}:{cursor:"pointer","&:hover":{bgcolor:Be.table.cellHoverBg}}},children:(0,Ae.jsx)(Ls,{names:f.receiver_names,searchText:s,avatarSrcByName:o})}):null,(0,Ae.jsx)(gt.Box,{className:"cell",onClick:ae?void 0:me=>W?.(f,me.currentTarget),sx:{py:.5,justifyContent:"center",...ae?{}:{cursor:"pointer","&:hover":{bgcolor:Be.table.cellHoverBg}}},children:(0,Ae.jsx)(Tn,{priority:f.priority,plain:!0})}),n?(0,Ae.jsx)(gt.Box,{className:"cell",onClick:pe?void 0:me=>O?.(f,me.currentTarget),sx:{gap:.5,justifyContent:"flex-start",...pe?{}:{cursor:"pointer","&:hover":{bgcolor:Be.table.cellHoverBg}}},children:M?(0,Ae.jsxs)(Ae.Fragment,{children:[(()=>{let me=$t(z);return me?(0,Ae.jsx)(me,{sx:{fontSize:15,flexShrink:0,color:"#1e3a8a"}}):null})(),(0,Ae.jsx)(gt.Box,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:M})]}):null}):null,T?(0,Ae.jsx)(gt.Box,{className:"cell",sx:{justifyContent:"center"},children:xe}):null,!T&&i&&a&&!u?(0,Ae.jsx)(gt.Box,{className:"cell",sx:{justifyContent:"center"},children:f.is_notice?xe:_e||(ie?(0,Ae.jsx)(is,{canConfirm:!!k?.canConfirm,count:k?.count??0,total:k?.total??0,myConfirmed:!!k?.myTime,onConfirm:()=>I?.(f),onShowList:me=>G?.(f,me)}):null)}):null,!T&&h==="action"?(0,Ae.jsx)(gt.Box,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap",color:Be.table.rowSubColor},children:f.is_notice?xe:_e||(k&&k.total>0?(0,Ae.jsx)(is,{canConfirm:!!k.canConfirm,count:k.count,total:k.total,myConfirmed:!!k.myTime,onConfirm:()=>I?.(f),onShowList:me=>G?.(f,me)}):"-")}):null,!T&&!i?(0,Ae.jsx)(gt.Box,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap",color:m?Be.colors.danger:x?Be.table.rowSubColor:Be.table.rowTitleColor},children:m?Na(f.deleted_time):f.completed_time||"-"}):null,d||u?null:(0,Ae.jsx)(gt.Box,{className:"cell",onClick:()=>{!q&&!Z&&(oe(f.note),J(!0))},sx:{color:"#6f6f6c",cursor:q?"default":"text"},children:Z?(0,Ae.jsx)(gt.Box,{component:"input",ref:ne,autoFocus:!0,spellCheck:!1,value:te,onChange:me=>oe(me.target.value),onBlur:()=>{J(!1),te.trim()!==f.note&&$(f.seq,te)},onKeyDown:me=>{me.key==="Enter"&&me.target.blur(),me.key==="Escape"&&(oe(f.note),J(!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}}):(0,Ae.jsx)(gt.Box,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:f.note?Hu(f.note,s):""})}),ye?(0,Ae.jsx)(gt.Box,{component:"span",sx:{position:"absolute",left:3,top:6,bottom:6,width:3,bgcolor:"#2f80ed",borderRadius:1.5,pointerEvents:"none"}}):null]})});var z0=require("react/jsx-runtime"),L0=(0,N0.memo)(function(f){let l=(f.useTaskItem?f.useTaskItem(f.task.seq):void 0)??f.task,{myAccountSeq:o}=f,{editPolicy:s}=ct(),r=f.projectByKey.get(l.tab_key??"");return(0,z0.jsx)(P0,{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:!So(l,o),coreLocked:fi(l,o,s),readOnly:f.readOnly,noteLocked:f.readOnly||(l.is_notice?!Ca(l,o):!So(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})});var as=require("react"),vr=require("@mui/material"),Uu=Y(require("@mui/icons-material/ChevronRight"),1),j0=Y(require("@mui/icons-material/Check"),1),F0=Y(require("@mui/icons-material/NotificationsActiveOutlined"),1),ic=require("@ehfuse/mui-datetime-picker"),q0=Y(require("@mui/icons-material/TimerOutlined"),1);var oc=require("react");function Wo(e){let{loadHolidays:f}=ct(),[g,l]=(0,oc.useState)(()=>new Map),o=e.join(",");return(0,oc.useEffect)(()=>{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 Wu=["min30_before","hour1_before","hour2_before","same_day","day_before","two_days_before","three_days_before","week_before"];function Bo(e){let f=Array.isArray(e?.reminders)?e?.reminders:[e?.reminder],g=new Set;for(let l of f){let o=String(l??"").trim();Wu.includes(o)&&g.add(o)}return Wu.filter(l=>g.has(l))}function La(e,f){if(f==="none")return[];let g=e.includes(f)?e.filter(l=>l!==f):[...e,f];return Wu.filter(l=>g.includes(l))}var er=require("react/jsx-runtime"),sw=9,$0=[{value:"min30_before",label:"30\uBD84 \uC804"},{value:"hour1_before",label:"1\uC2DC\uAC04 \uC804"},{value:"hour2_before",label:"2\uC2DC\uAC04 \uC804"}],Vu=[{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"}],Ku=[{value:"none",label:"\uC5C6\uC74C"},...$0,...Vu];function sc(e){return e?Ku:[{value:"none",label:"\uC5C6\uC74C"},...Vu]}function H0(e){return e==="same_day"?"\uB2F9\uC77C":Ku.find(f=>f.value===e)?.label??"\uC5C6\uC74C"}function ac(e){if(e.length===0)return"\uC5C6\uC74C";let f=e.map(g=>H0(g));return f.length<=3?f.join(", "):`${f.slice(0,3).join(", ")} \uC678 ${f.length-3}`}function aw(e){let f=e?new Date(`${e}T00:00:00`):new Date;return Number.isNaN(f.getTime())?new Date:f}function io({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]=(0,as.useState)(null),[h,d]=(0,as.useState)(null),u=$o(),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:I}=ct(),M=`${String(Number.isInteger(I)&&I>=0&&I<=23?I:sw).padStart(2,"0")}:00`,z=S=>{if(x)return x;let D=new Date;return S===Zr(D)?`${String(D.getHours()).padStart(2,"0")}:${String(D.getMinutes()).padStart(2,"0")}`:M},[O,P]=(0,as.useState)(()=>{let S=Number(b.slice(0,4));return Number.isFinite(S)&&S>1900?S:new Date().getFullYear()}),N=(0,as.useMemo)(()=>[O-1,O,O+1],[O]),$=Wo(N),L=(0,as.useMemo)(()=>{let S=[];for(let D of $.keys()){let p=new Date(`${D}T00:00:00`);Number.isNaN(p.getTime())||S.push(p)}return S},[$]),C=(0,er.jsxs)(vr.Box,{sx:{width:300,maxWidth:"100%"},children:[(0,er.jsx)(vr.Box,{sx:{height:320},children:(0,er.jsx)(ic.SimpleCalendar,{selectedDate:aw(b),onSelect:S=>{k(Zr(S),s?z(Zr(S)):x),s||t()},onClose:t,showFooter:!1,autoApply:!0,holidays:L,onYearChange:S=>P(S),onMonthChange:(S,D)=>{typeof D=="number"&&P(D)}})}),s?(0,er.jsxs)(er.Fragment,{children:[(0,er.jsx)(vr.Divider,{sx:{borderColor:"#e6e6e3"}}),(0,er.jsxs)(vr.ButtonBase,{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:[(0,er.jsxs)(vr.Box,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:.75,color:"#37352f"},children:[(0,er.jsx)(q0.default,{sx:{fontSize:17,color:"#9a9a97"}}),"\uC2DC\uAC01"]}),(0,er.jsxs)(vr.Box,{component:"span",sx:{display:"inline-flex",alignItems:"center",color:"#37352f"},children:[x||"\uC5C6\uC74C",(0,er.jsx)(Uu.default,{sx:{fontSize:18,ml:.25,color:"#9a9a97"}})]})]}),(0,er.jsx)(ic.TimePicker,{anchorEl:h,open:!!h,onClose:()=>d(null),centered:r,value:{hour:x.slice(0,2)||M.slice(0,2),minute:x.slice(3,5)||"00"},format:"HH:mm",minuteStep:5,autoApply:!0,locale:"ko",onChange:(S,D)=>{k(b||Zr(new Date),`${S}:${D}`),d(null)}})]}):null,o?null:(0,er.jsxs)(er.Fragment,{children:[(0,er.jsx)(vr.Divider,{sx:{borderColor:"#e6e6e3"}}),(0,er.jsxs)(vr.ButtonBase,{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:[(0,er.jsxs)(vr.Box,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:.75,color:"#37352f"},children:[(0,er.jsx)(F0.default,{sx:{fontSize:17,color:"#9a9a97"}}),"\uC0AC\uC804\uC54C\uB9BC"]}),(0,er.jsxs)(vr.Box,{component:"span",sx:{display:"inline-flex",alignItems:"center",color:"#37352f"},children:[ac(l),(0,er.jsx)(Uu.default,{sx:{fontSize:18,ml:.25,color:"#9a9a97"}})]})]}),(0,er.jsx)(vr.Menu,{transitionDuration:0,anchorEl:i,open:!!i,onClose:()=>a(null),anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},...u,children:sc(!!x).map(S=>{let D=S.value==="none"?l.length===0:l.includes(S.value);return(0,er.jsxs)(vr.MenuItem,{selected:D,onClick:()=>{c(La(l,S.value)),S.value==="none"&&a(null)},sx:{fontSize:14,minWidth:140,justifyContent:"space-between",gap:1},children:[S.label,D?(0,er.jsx)(j0.default,{sx:{fontSize:16,color:"#2f80ed"}}):null]},S.value)})})]}),(0,er.jsx)(vr.Divider,{sx:{borderColor:"#e6e6e3"}}),(0,er.jsxs)(vr.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",px:1,py:.5},children:[(0,er.jsx)(vr.Button,{size:"small",onClick:()=>{k(Zr(new Date),s?z(Zr(new Date)):x),t()},sx:{minWidth:0,px:1.25,fontSize:13.5,color:"#2563eb"},children:"\uC624\uB298"}),(0,er.jsx)(vr.Button,{size:"small",onClick:t,sx:{minWidth:0,px:1.25,fontSize:13.5,color:"#2563eb"},children:"\uB2EB\uAE30"})]})]});return r?(0,er.jsx)(vr.Dialog,{open:f,onClose:t,slotProps:{paper:{sx:{borderRadius:3,width:300,maxWidth:"calc(100vw - 48px)",overflow:"hidden"}}},children:C}):(0,er.jsx)(vr.Popover,{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:C})}var zs=require("react"),mo=require("@mui/material"),W0=require("@ehfuse/mui-form-dialog"),U0=require("@ehfuse/mui-form-controls"),V0=require("@ehfuse/alerts");var cc=require("@mui/material");var lc=require("react/jsx-runtime");function za({value:e,onChange:f}){return(0,lc.jsx)(cc.Box,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(40px, 1fr))",gap:1},children:zl.map(({key:g,Icon:l})=>{let o=g===e;return(0,lc.jsx)(cc.ButtonBase,{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:(0,lc.jsx)(l,{sx:{fontSize:20}})},g)})})}var Yn=require("react/jsx-runtime");function ja({open:e,title:f="\uC0C8 \uD504\uB85C\uC81D\uD2B8 \uCD94\uAC00",initialLabel:g="",initialIcon:l=Ll,confirmText:o="\uCD94\uAC00",initialUseSprints:s=!1,onClose:r,onSubmit:t}){let[n,c]=(0,zs.useState)(""),[i,a]=(0,zs.useState)(Ll),[h,d]=(0,zs.useState)(!1);(0,zs.useEffect)(()=>{e&&(c(g),a(l),d(s))},[e]);let u=()=>{let m=n.trim();if(!m){(0,V0.ErrorAlert)("\uD504\uB85C\uC81D\uD2B8 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}t(m,i,h),r()};return(0,Yn.jsx)(W0.FormDialog,{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:(0,Yn.jsxs)(mo.Box,{children:[(0,Yn.jsx)(U0.ClearTextField,{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}}),(0,Yn.jsx)(mo.Box,{sx:{mt:2,fontSize:13,color:"#787774"},children:"\uC544\uC774\uCF58"}),(0,Yn.jsx)(mo.Box,{sx:{mt:1,maxHeight:264,overflowY:"auto",pr:.5},children:(0,Yn.jsx)(za,{value:i,onChange:a})}),(0,Yn.jsxs)(mo.Box,{sx:{mt:2,display:"flex",alignItems:"center",justifyContent:"space-between",gap:1},children:[(0,Yn.jsxs)(mo.Box,{children:[(0,Yn.jsx)(mo.Box,{sx:{fontSize:14,color:"#37352f"},children:"\uBAA9\uD45C(\uC2A4\uD504\uB9B0\uD2B8) \uC0AC\uC6A9"}),(0,Yn.jsx)(mo.Box,{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)"})]}),(0,Yn.jsx)(mo.Switch,{checked:h,onChange:(m,x)=>d(x)})]})]})}],actions:{showCancelButton:!0,right:(0,Yn.jsx)(mo.Button,{variant:"contained",onClick:u,children:o})}})}var K0=require("@mui/material"),G0=require("react/jsx-runtime");function js({size:e=40}){return(0,G0.jsx)(K0.Box,{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)"}}}})}var Uo=require("@mui/material"),Y0=Y(require("@mui/icons-material/Check"),1),X0=Y(require("@ehfuse/overlay-scrollbar"),1);var Io=require("react/jsx-runtime"),Gu=["#1e3a8a","#2f80ed","#06b6d4","#0fa3a3","#2f9e5b","#84cc16","#e8a33d","#d9730d","#e5484d","#e255a1","#a355c0","#8a5a2b","#57564f","#111827"];function hi({anchorEl:e,value:f,color:g="",onSelect:l,onSelectColor:o,onClose:s}){return(0,Io.jsx)(Uo.Popover,{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:(0,Io.jsxs)(Uo.Box,{sx:{width:"min(492px, calc(100vw - 32px))"},children:[(0,Io.jsx)(X0.default,{style:{maxHeight:"min(432px, calc(100dvh - 240px))"},contentStyle:{minWidth:0,padding:10},thumb:{width:6},children:(0,Io.jsx)(za,{value:f||Fo,onChange:r=>{l(r),s()}})}),o?(0,Io.jsxs)(Uo.Box,{sx:{px:1.25,pb:1.25},children:[(0,Io.jsx)(Uo.Divider,{sx:{mb:1,borderColor:"#efefed"}}),(0,Io.jsx)(Uo.Box,{sx:{display:"grid",gridTemplateColumns:`repeat(${Gu.length}, 1fr)`,justifyItems:"center"},children:Gu.map(r=>{let t=(g||Gu[0])===r;return(0,Io.jsx)(Uo.ButtonBase,{"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?(0,Io.jsx)(Y0.default,{sx:{fontSize:15,color:"#ffffff"}}):null},r)})})]}):null]})})}var ot=require("react/jsx-runtime"),Z0=48,lw=5;function Xu({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:I=!1,onChangeTaskIcon:M,onChangeTaskIconColor:z,onAddInGroup:O,canAddInGroup:P,renderGroupSummary:N,renderGroupTitleSummary:$,onChangeTaskProject:L,onAddProject:C,onChangeNote:S,onMemberClick:D,onClaimTask:p,onChangeTaskStatus:y,onOpenDetail:v,onTaskContextMenu:w,onMemberFilterClick:_,activeMemberFilters:T=[],onStatusFilterClick:R,statusFilterActive:F=!1,onAckFilterClick:H,ackFilterActive:V=!1,onProjectFilterClick:A,projectFilterActive:q=!1,onPriorityFilterClick:B,priorityFilterActive:E=!1,onValueFilterClick:j,activeValueFilters:U=[],columns:X,getConfirmInfo:G,onConfirmTask:W,myAccountSeq:Z=0,currentUserName:J="",groupManagerByMyRole:K=!1,pinKindGroups:ee=!1,allowManagerVolunteer:te=!0,noticeAdmin:oe=!1,getTargetSummary:ne,getTargetDisplay:ie,onArchiveTask:ae,isTaskUnread:pe,getAckInfo:ye,onAckConfirm:Se,onAckListClick:Be,onChangeTaskPriority:Ce,onEndReached:Pe,useTaskItem:ft}){let xe=ht(),se=(0,Tt.useMemo)(()=>({showManager:!0,showActions:!0,showRequest:!0,...X}),[X]),Ie=se.showManager??!0,ke=se.showActions??!0,_e=se.showRequest??!0,rt=se.confirmMode??"none",Fe=se.notice??!1,me=se.bug??!1,Jt=se.support??!1,Ue=Jt||(se.centerManager??!1),nt=se.trash??!1,qt=h!=="none",lt=(0,Tt.useMemo)(()=>qt?ka(e,h,o,u,f,J,{enabled:K,myAccountSeq:Z},ee):[],[qt,e,h,o,u,f,J,K,Z,ee]),Le=(0,Tt.useMemo)(()=>m?e.filter(he=>!he.completed):e,[e,m]),we=(0,Tt.useMemo)(()=>Le.filter(he=>he.completed||he.archived||he.is_support?!1:he.is_notice?!!ye?.(he).canAck:!!G?.(he).canConfirm),[Le,ye,G]),ve=(0,Tt.useMemo)(()=>Z>0?e.filter(he=>he.completed&&!he.archived&&!he.is_support&&!!he.review_pending&&(he.author_account_seq??0)===Z):[],[e,Z]),Ee=(0,Tt.useMemo)(()=>new Set([...we,...ve].map(he=>he.seq)),[we,ve]),st=(0,Tt.useMemo)(()=>lt.map(he=>({section:he,visibleTasks:he.tasks.filter(We=>!Ee.has(We.seq)&&(!m||!We.completed))})).filter(he=>he.visibleTasks.length>0),[lt,m,Ee]),Ve=(0,Tt.useMemo)(()=>new Set(d),[d]),$e=(0,Tt.useMemo)(()=>{let he=[];if(qt)for(let{section:We,visibleTasks:wt}of st){let cn=Ve.has(We.key);if(he.push({kind:"header",section:We,visibleTasks:wt,collapsed:cn}),!cn)for(let Ln of wt)he.push({kind:"task",task:Ln,last:!1})}else for(let We of Le)Ee.has(We.seq)||he.push({kind:"task",task:We,last:!1});for(let We=he.length-1;We>=0;We-=1){let wt=he[We];if(wt.kind==="task"){wt.last=!0;break}}return he},[qt,st,Le,Ve,Ee]),Ut=se.showProject??(!Fe&&h!=="tab"),et=(0,Tt.useMemo)(()=>Ta({...se,showProject:Ut}),[se,Ut]),re=Nu({...se,showProject:Ut}),ue=Lu({...se,showProject:Ut}),{onReturnTask:de}=ct(),Te=(0,Tt.useRef)(null),_t=(0,Tt.useRef)(null),De=et[et.length-1]?.align==="center",He=(0,Tt.useMemo)(()=>{let he=new Map;for(let We of u)he.set(We.key,{label:We.archived?`${We.label} (\uBCF4\uAD00\uB428)`:We.label,icon:We.icon});return he},[u]),Lt=(0,Tt.useRef)(null),[Ne,Oe]=(0,Tt.useState)(null);(0,Tt.useEffect)(()=>{if(!Ne)return;let he=()=>{Te.current&&(Te.current.scrollLeft=Ne.scrollLeft),_t.current&&(_t.current.scrollLeft=Ne.scrollLeft)};return he(),Ne.addEventListener("scroll",he,{passive:!0}),()=>Ne.removeEventListener("scroll",he)},[Ne]);let at=Le.length>0;(0,Tt.useEffect)(()=>{if(!at){Oe(null);return}let he=window.requestAnimationFrame(()=>{Oe(Lt.current?.getScrollContainer()??null)});return()=>window.cancelAnimationFrame(he)},[at]);let mt=`${h}|${s}|${r}|${l}|${m?1:0}`;(0,Tt.useEffect)(()=>{Ne&&(Ne.scrollTop=0)},[mt,Ne]);let[Bt,Vt]=(0,Tt.useState)(!1);(0,Tt.useEffect)(()=>{if(!Ne)return;let he=()=>Vt(Ne.scrollHeight-Ne.clientHeight>4),We=window.requestAnimationFrame(he),wt=new ResizeObserver(he);return wt.observe(Ne),Ne.firstElementChild&&wt.observe(Ne.firstElementChild),()=>{window.cancelAnimationFrame(We),wt.disconnect()}},[Ne,$e.length,d.length]),(0,Tt.useEffect)(()=>{if(!Ne)return;let he=Ne.clientHeight,We=new ResizeObserver(()=>{let wt=Ne.clientHeight;wt!==he&&(he=wt,Ne.dispatchEvent(new Event("scroll")))});return We.observe(Ne),()=>We.disconnect()},[Ne]);let[St,gr]=(0,Tt.useState)(null),[yr,xr]=(0,Tt.useState)(null),[Nr,Q]=(0,Tt.useState)(null),[le,ge]=(0,Tt.useState)(null),[be,Me]=(0,Tt.useState)(!1),[Ke,Ge]=(0,Tt.useState)(null),ut=Ke?e.find(he=>he.seq===Ke.taskSeq)??null:null,[Je,Xe]=(0,Tt.useState)(null),dt=Je?e.find(he=>he.seq===Je.taskSeq)??null:null,[Xt,fr]=(0,Tt.useState)(null),zt=Xt?e.find(he=>he.seq===Xt.taskSeq)??null:null,ce=(0,Tt.useCallback)((he,We)=>{fr({anchorEl:We,taskSeq:he.seq})},[]),Nt=(0,Tt.useCallback)((he,We)=>{Xe({anchorEl:We,taskSeq:he.seq})},[]),Or=(0,Tt.useCallback)((he,We)=>{Ge({anchorEl:We,taskSeq:he.seq})},[]),Lr=(0,Tt.useCallback)((he,We)=>{if(!We)return;t(he,s===he&&r==="asc"?"desc":"asc")},[t,s,r]),Hn=(0,Tt.useCallback)((he,We,wt)=>{gr({anchorEl:wt,taskSeq:he.seq,field:We,date:he[We],isEvent:!!he.is_event,reminders:Bo(he),completed:he.completed})},[]),li=(0,Tt.useCallback)((he,We)=>{ge({anchorEl:We,task:he})},[]),Zi=(0,Tt.useCallback)(he=>{St&&(i(St.taskSeq,St.field,he),gr(We=>We&&{...We,date:he}))},[St,i]),Si=(0,Tt.useCallback)(he=>{St&&(a(St.taskSeq,he),gr(We=>We&&{...We,reminders:he}))},[St,a]),Kt=(0,Tt.useCallback)((he,We)=>{Q({anchorEl:We,taskSeq:he.seq,title:he.title,kind:"claim"})},[]),or=(0,Tt.useCallback)((he,We)=>{Q({anchorEl:We,taskSeq:he.seq,title:he.title,kind:"volunteer"})},[]),Ji=(he,We)=>(0,ot.jsx)(L0,{task:he,hideBottomBorder:We,gridTemplate:re,useTaskItem:ft,statusOptions:f,avatarSrcByName:g,searchText:l,myAccountSeq:Z,todayStr:o,showProject:Ut,showManager:Ie,showActions:ke,showRequest:_e,confirmMode:rt,notice:Fe,bugMode:me,supportMode:Jt,managerCentered:Ue,trashMode:nt,dimCompleted:k,readOnly:I,projectByKey:He,getConfirmInfo:G,onConfirmTask:W,onProjectClick:li,onRequestReply:n,onRequestToggleCompleted:xr,onDateClick:Hn,onChangeNote:S,onMemberClick:D,onClaimClick:p?Kt:void 0,onVolunteerClick:te?or:void 0,onStatusClick:Or,onOpenDetail:v,onTaskContextMenu:w,onPriorityClick:Nt,onIconClick:M?ce:void 0,lastColumnCentered:De,getTargetSummary:ne,getTargetDisplay:ie,getAckInfo:ye,isTaskUnread:pe,onArchiveTask:ae,onAckConfirm:Se,onAckListClick:Be},he.seq);return(0,ot.jsxs)(jt.Box,{sx:{display:"flex",flexDirection:"column",flex:1,minHeight:0,border:`1px solid ${xe.table.borderColor}`,borderRadius:"0 0 4px 4px",overflow:"hidden",bgcolor:xe.table.bg,color:xe.table.rowColor,...xe.table.sx},children:[(0,ot.jsx)(jt.Box,{ref:Te,sx:{overflow:"hidden",flexShrink:0},children:(0,ot.jsx)(jt.Box,{sx:{display:"grid",gridTemplateColumns:re,minWidth:ue,borderBottom:`1px solid ${xe.table.borderColor}`,flexShrink:0,bgcolor:xe.table.headerBg,"& > *":{borderRight:`1px solid ${xe.table.rowBorderColor}`},"& > *:first-of-type":{px:1.5},"& > *:last-child":{borderRight:"none",pr:2,...De?{pl:2}:{}},...xe.table.headerSx},children:et.map(he=>{let We=s===he.id,wt=!!he.memberFilter,cn=wt&&T.includes(he.memberFilter),Ln=wt||!!he.statusFilter||!!he.ackFilter||!!he.projectFilter||!!he.priorityFilter||!!he.valueFilter,zo=cn||!!he.valueFilter&&U.includes(he.valueFilter)||!!he.statusFilter&&F||!!he.ackFilter&&V||!!he.projectFilter&&q||!!he.priorityFilter&&E;return(0,ot.jsxs)(jt.Box,{onClick:ko=>{he.memberFilter?_(he.memberFilter,ko.currentTarget):he.statusFilter?R(ko.currentTarget):he.ackFilter?H?.(ko.currentTarget):he.projectFilter?A?.(ko.currentTarget):he.priorityFilter?B?.(ko.currentTarget):he.valueFilter?j?.(he.valueFilter,ko.currentTarget):Lr(he.id,he.sortable)},sx:{display:"flex",alignItems:"center",justifyContent:he.align==="center"?"center":"flex-start",gap:.5,px:1,...he.id==="title"?{pl:2}:{},py:1,minWidth:0,fontSize:xe.table.headerFontSize,color:he.sortable||Ln?xe.table.headerActiveColor:xe.table.headerColor,whiteSpace:"nowrap",cursor:he.sortable||Ln?"pointer":"default",userSelect:"none",...We?{color:xe.table.headerFilteredColor}:{},...zo?{color:xe.table.headerFilteredColor,fontWeight:600}:{}},children:[he.icon,he.label,zo?(0,ot.jsx)(rg.default,{sx:{fontSize:14}}):null,We?r==="asc"?(0,ot.jsx)(J0.default,{sx:{fontSize:13}}):(0,ot.jsx)(Q0.default,{sx:{fontSize:13}}):null]},he.id)})})}),we.length>0||ve.length>0?(0,ot.jsx)(jt.Box,{sx:{flexShrink:0,maxHeight:`${xe.table.groupHeader.minHeight+1+Z0*lw}px`,overflowY:"auto",overflowX:"hidden",borderBottom:"1px solid #000"},ref:_t,children:(0,ot.jsxs)(jt.Box,{sx:{minWidth:ue},children:[we.length>0?(0,ot.jsxs)(ot.Fragment,{children:[(0,ot.jsxs)(jt.Box,{sx:{position:"sticky",top:0,zIndex:1,display:"flex",alignItems:"center",gap:.5,px:1.5,minHeight:xe.table.groupHeader.minHeight,bgcolor:"#fdf3f2",borderBottom:"1px solid #f2d7d4"},children:[(0,ot.jsx)(jt.Box,{component:"span",sx:{fontSize:xe.table.groupHeader.labelFontSize,fontWeight:xe.table.groupHeader.labelFontWeight,color:xe.table.groupHeader.labelColor},children:"\uBBF8\uD655\uC778"}),(0,ot.jsx)(jt.Box,{sx:{ml:"auto",display:"flex",alignItems:"center",pr:.5},children:(0,ot.jsx)(jt.Box,{component:"span",sx:{flexShrink:0,width:xe.table.groupHeader.badge.width,py:xe.table.groupHeader.badge.paddingY,borderRadius:`${xe.table.groupHeader.badge.borderRadius}px`,bgcolor:"#e5484d",color:"#fff",fontSize:xe.table.groupHeader.badge.fontSize,fontWeight:xe.table.groupHeader.badge.fontWeight,lineHeight:1.6,textAlign:"center",fontVariantNumeric:"tabular-nums"},children:we.length})})]}),we.map((he,We)=>Ji(he,ve.length===0&&We===we.length-1))]}):null,ve.length>0?(0,ot.jsxs)(ot.Fragment,{children:[(0,ot.jsxs)(jt.Box,{sx:{position:"sticky",top:0,zIndex:1,display:"flex",alignItems:"center",gap:.5,px:1.5,minHeight:xe.table.groupHeader.minHeight,bgcolor:"#f4f0fe",borderBottom:"1px solid #e2dbf9"},children:[(0,ot.jsx)(jt.Box,{component:"span",sx:{fontSize:xe.table.groupHeader.labelFontSize,fontWeight:xe.table.groupHeader.labelFontWeight,color:xe.table.groupHeader.labelColor},children:"\uAC80\uC218 \uB300\uAE30"}),(0,ot.jsx)(jt.Box,{sx:{ml:"auto",display:"flex",alignItems:"center",pr:.5},children:(0,ot.jsx)(jt.Box,{component:"span",sx:{flexShrink:0,width:xe.table.groupHeader.badge.width,py:xe.table.groupHeader.badge.paddingY,borderRadius:`${xe.table.groupHeader.badge.borderRadius}px`,bgcolor:"#8b5cf6",color:"#fff",fontSize:xe.table.groupHeader.badge.fontSize,fontWeight:xe.table.groupHeader.badge.fontWeight,lineHeight:1.6,textAlign:"center",fontVariantNumeric:"tabular-nums"},children:ve.length})})]}),ve.map((he,We)=>Ji(he,We===ve.length-1))]}):null]})}):null,Le.length===0&&x?(0,ot.jsx)(jt.Box,{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:(0,ot.jsx)(js,{})}):Le.length===0?(0,ot.jsx)(jt.Box,{role:"status","aria-live":"polite",sx:{py:8,textAlign:"center",color:xe.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.`:me?"\uB4F1\uB85D\uB41C \uC624\uB958\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.":Jt?"\uC811\uC218\uB41C \uBB38\uC758\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.":Fe?"\uB4F1\uB85D\uB41C \uACF5\uC9C0\uC0AC\uD56D\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.":"\uD45C\uC2DC\uD560 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):(0,ot.jsx)(jt.Box,{sx:{flex:1,minHeight:0},children:(0,ot.jsx)(ig.default,{ref:Lt,style:{height:"100%"},contentStyle:{minWidth:ue},thumb:{width:8},showHorizontalScrollbar:!0,scrollTopFab:!0,children:Ne?(0,ot.jsx)(og.Virtuoso,{customScrollParent:Ne,data:$e,computeItemKey:(he,We)=>We.kind==="header"?`group:${We.section.key}`:We.task.seq,endReached:qt?void 0:Pe,defaultItemHeight:Z0,increaseViewportBy:{top:600,bottom:600},itemContent:(he,We)=>{if(We.kind==="task")return Ji(We.task,We.last&&Bt);let{section:wt,visibleTasks:cn,collapsed:Ln}=We;return(0,ot.jsxs)(jt.Box,{onClick:()=>b(wt.key),sx:{display:"flex",alignItems:"center",gap:.5,px:1.5,minHeight:xe.table.groupHeader.minHeight,bgcolor:xe.table.groupHeader.bg,borderBottom:`1px solid ${xe.table.groupHeader.borderColor}`,cursor:"pointer",userSelect:"none","&:hover":{bgcolor:xe.table.groupHeader.hoverBg},...xe.table.groupHeader.sx},children:[Ln?(0,ot.jsx)(tg.default,{sx:{fontSize:20,color:xe.colors.textMuted}}):(0,ot.jsx)(eg.default,{sx:{fontSize:20,color:xe.colors.textMuted}}),(0,ot.jsx)(jt.Box,{component:"span",sx:{fontSize:xe.table.groupHeader.labelFontSize,fontWeight:xe.table.groupHeader.labelFontWeight,color:xe.table.groupHeader.labelColor},children:wt.label}),$?(0,ot.jsx)(jt.Box,{sx:{flexShrink:0,display:"flex",alignItems:"center",ml:.5},children:$(wt.key,wt.tasks)}):null,O&&(!P||P(wt.key))?(0,ot.jsx)(jt.IconButton,{size:"small","aria-label":"\uC774 \uADF8\uB8F9\uC5D0 \uC5C5\uBB34 \uB4F1\uB85D",onClick:zo=>{zo.stopPropagation(),O(wt.key,wt.tasks)},sx:{flexShrink:0,ml:.75,p:.25,color:xe.colors.textSecondary,"&:hover":{bgcolor:xe.colors.surfaceHover,color:xe.colors.accentOnSurface}},children:(0,ot.jsx)(Yu.default,{sx:{fontSize:21}})}):null,(0,ot.jsxs)(jt.Box,{sx:{ml:"auto",minWidth:0,display:"flex",alignItems:"center",gap:1,pr:.5},children:[N?N(wt.key,wt.tasks):null,(0,ot.jsx)(jt.Box,{component:"span",sx:{flexShrink:0,width:xe.table.groupHeader.badge.width,py:xe.table.groupHeader.badge.paddingY,borderRadius:`${xe.table.groupHeader.badge.borderRadius}px`,bgcolor:xe.table.groupHeader.badge.bg,border:xe.table.groupHeader.badge.border,color:xe.table.groupHeader.badge.color,fontSize:xe.table.groupHeader.badge.fontSize,fontWeight:xe.table.groupHeader.badge.fontWeight,lineHeight:1.6,textAlign:"center",fontVariantNumeric:"tabular-nums"},children:cn.length})]})]})}},mt):null})}),(0,ot.jsx)(rs,{anchorEl:Ke?.anchorEl??null,value:ut?.status??"",options:ut?va(ut):Os,onSelect:he=>{ut&&y(ut.seq,he)},onComplete:ut&&!ut.completed&&!ut.is_notice&&!ut.is_event&&!ut.is_bug&&!nt&&((ut.author_account_seq??0)===Z||(ut.manager_account_seq??0)===Z)?()=>c(ut,!0):void 0,onClose:()=>Ge(null)}),(0,ot.jsx)(jt.Menu,{transitionDuration:0,anchorEl:Je?.anchorEl??null,open:!!Je,onClose:()=>Xe(null),children:["high","medium","low"].map(he=>(0,ot.jsxs)(jt.MenuItem,{selected:dt?.priority===he,onClick:()=>{dt&&Ce?.(dt.seq,he),Xe(null)},sx:{fontSize:14,minWidth:130,gap:1},children:[(0,ot.jsx)(Tn,{priority:he,small:!0}),dt?.priority===he?(0,ot.jsx)(uc.default,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},he))}),(0,ot.jsxs)(jt.Menu,{anchorEl:le?.anchorEl??null,open:!!le,onClose:()=>ge(null),transitionDuration:0,children:[(0,ot.jsxs)(jt.MenuItem,{selected:!le?.task.tab_key,onClick:()=>{le&&L(le.task.seq,""),ge(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[(0,ot.jsx)(ng.default,{sx:{fontSize:17,color:"#9a9a97"}}),"\uC5C6\uC74C",le?.task.tab_key?null:(0,ot.jsx)(uc.default,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}})]}),u.filter(he=>!he.archived).map(he=>{let We=$t(he.icon),wt=le?.task.tab_key===he.key;return(0,ot.jsxs)(jt.MenuItem,{selected:wt,onClick:()=>{le&&L(le.task.seq,he.key),ge(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[We?(0,ot.jsx)(We,{sx:{fontSize:17,color:"#1e3a8a"}}):null,he.label,wt?(0,ot.jsx)(uc.default,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},he.key)}),C?[(0,ot.jsx)(jt.Divider,{},"add-project-divider"),(0,ot.jsxs)(jt.MenuItem,{onClick:()=>Me(!0),sx:{fontSize:14,color:"#787774"},children:[(0,ot.jsx)(jt.ListItemIcon,{children:(0,ot.jsx)(Yu.default,{sx:{fontSize:18,color:"#787774"}})}),"\uD504\uB85C\uC81D\uD2B8 \uCD94\uAC00"]},"add-project")]:null]}),C?(0,ot.jsx)(ja,{open:be,onClose:()=>Me(!1),onSubmit:(he,We)=>{let wt=le?.task.seq??0;(async()=>{let cn=await C(he,We);cn&&wt&&L(wt,cn)})(),ge(null)}}):null,(0,ot.jsx)(hi,{anchorEl:Xt?.anchorEl??null,value:zt?.icon??"",color:zt?.icon_color??"",onSelect:he=>{Xt&&M?.(Xt.taskSeq,he),fr(null)},onSelectColor:z?he=>{Xt&&z(Xt.taskSeq,he)}:void 0,onClose:()=>fr(null)}),(0,ot.jsx)(io,{anchorEl:St?.anchorEl??null,open:!!St&&St?.field==="start_date",date:St?.date??"",reminders:[],hideReminder:!0,showTime:!St?.isEvent,onClose:()=>gr(null),onDateChange:Zi,onReminderChange:()=>{}}),(0,ot.jsx)(io,{anchorEl:St?.anchorEl??null,open:!!St&&St?.field==="due_date",date:St?.date??"",showTime:!St?.isEvent,reminders:St?.reminders??[],hideReminder:!!St?.completed,onClose:()=>gr(null),onDateChange:Zi,onReminderChange:Si}),(0,ot.jsx)(Qt,{open:!!Nr,anchorEl:Nr?.anchorEl??null,title:Nr?.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:()=>{Nr&&p?.(Nr.taskSeq),Q(null)}}),(0,ot.jsx)(Kn,{open:!!yr,anchorEl:yr?.anchorEl??null,nextCompleted:yr?.nextCompleted??!1,returnMode:!!de&&!!(yr&&Vn(yr.task,Z)),onCancel:()=>xr(null),onConfirm:he=>{yr&&(he&&de?de(yr.task,he):c(yr.task,yr.nextCompleted)),xr(null)}})]})}var Ht=require("react"),yt=require("@mui/material"),pc=Y(require("@mui/icons-material/Add"),1),nf=Y(require("@mui/icons-material/MoreVert"),1),of=Y(require("@mui/icons-material/EditOutlined"),1),sf=Y(require("@mui/icons-material/ArchiveOutlined"),1),af=Y(require("@mui/icons-material/UnarchiveOutlined"),1),xg=Y(require("@mui/icons-material/NotificationsOutlined"),1),vg=Y(require("@mui/icons-material/PeopleAltOutlined"),1);var sg=require("@mui/material"),Zu=require("react/jsx-runtime");function gn({sx:e,...f}){return(0,Zu.jsx)(sg.SvgIcon,{viewBox:"0 0 24 24",...f,sx:{fill:"none",...e},children:(0,Zu.jsx)("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"})})}var In=require("@dnd-kit/core"),bo=require("@dnd-kit/sortable"),wg=require("@dnd-kit/utilities"),mc=Y(require("@ehfuse/overlay-scrollbar"),1);var lg=require("react"),bn=require("@mui/material"),cg=Y(require("@mui/icons-material/AlarmOutlined"),1),ug=Y(require("@mui/icons-material/DragIndicator"),1),fg=Y(require("@mui/icons-material/RadioButtonUnchecked"),1),dg=Y(require("@mui/icons-material/CheckCircle"),1),hg=Y(require("@mui/icons-material/TimerOutlined"),1);var Bn=require("@mui/material"),ag=Y(require("@mui/icons-material/CheckCircle"),1);var Qr=require("react/jsx-runtime");function Fa({anchorEl:e,open:f,acks:g,total:l,avatarSrcByName:o,pendingNames:s=[],onRequestConfirm:r,onClose:t}){let n=dr();return(0,Qr.jsx)(Bn.Popover,{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:(0,Qr.jsxs)(Bn.Box,{sx:{minWidth:240,maxWidth:320,py:1},children:[(0,Qr.jsxs)(Bn.Box,{sx:{px:2,pb:.75,fontSize:mn(13.5),fontWeight:600,color:"#37352f",borderBottom:"1px solid #efefed"},children:["\uD655\uC778 ",g.length,"/",l]}),s.length>0&&g.length>0?(0,Qr.jsxs)(Bn.Box,{sx:{px:2,pt:1,pb:.5,fontSize:mn(12.5),fontWeight:600,color:"#9a9a97"},children:["\uD655\uC778 ",g.length]}):null,g.length===0?s.length>0?null:(0,Qr.jsx)(Bn.Box,{sx:{px:2,py:1.5,fontSize:mn(13.5),color:"#9a9a97"},children:"\uC544\uC9C1 \uD655\uC778\uD55C \uC0AC\uB78C\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):g.map(c=>(0,Qr.jsxs)(Bn.Box,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:.75,minWidth:0},children:[(0,Qr.jsx)(Cn,{names:[c.name],size:22,avatarSrcByName:o}),(0,Qr.jsx)(Bn.Box,{component:"span",sx:{fontSize:mn(14),color:"#37352f",whiteSpace:"nowrap"},children:c.name}),(0,Qr.jsx)(Bn.Box,{component:"span",sx:{ml:"auto",fontSize:mn(12.5),color:"#9a9a97",whiteSpace:"nowrap"},children:Gn(c.time)}),(0,Qr.jsx)(ag.default,{sx:{fontSize:16,color:"#2f80ed",flexShrink:0}})]},c.account_seq)),s.length>0?(0,Qr.jsxs)(Qr.Fragment,{children:[(0,Qr.jsxs)(Bn.Box,{sx:{mt:g.length>0?.75:0,px:2,pt:1,pb:.5,borderTop:g.length>0?"1px solid #efefed":"none",fontSize:mn(12.5),fontWeight:600,color:"#9a9a97"},children:["\uBBF8\uD655\uC778 ",s.length]}),s.map(c=>(0,Qr.jsxs)(Bn.Box,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:.75,minWidth:0},children:[(0,Qr.jsx)(Cn,{names:[c],size:22,avatarSrcByName:o}),(0,Qr.jsx)(Bn.Box,{component:"span",sx:{fontSize:mn(14),color:"#37352f",whiteSpace:"nowrap"},children:c})]},c))]}):null,r?(0,Qr.jsx)(Bn.Box,{sx:{borderTop:"1px solid #efefed",px:1.5,pt:1,pb:.25},children:(0,Qr.jsx)(Bn.Button,{size:"small",fullWidth:!0,variant:"outlined",onClick:()=>{r(),t()},sx:{fontSize:mn(13)},children:"\uD655\uC778 \uC694\uCCAD"})}):null]})})}function cw(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 uw(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 ls(e,f){let g=cw(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=uw(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 fw(e){let f=String(e??"").trim();return f?f.slice(5,16).replaceAll("-","."):""}var sr=require("react/jsx-runtime");function qa(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 dw=3;function hw(e){let f=e.trim();return f?f.slice(2,10).replaceAll("-","."):"-"}function pw(){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 fc="taskbox-card-drag-handle";function Fs({task:e,statusOptions:f,showDueDate:g=!1,onRequestArchiveToggle:l,onRequestReply:o,onDueDateClick:s,titleFontSize:r=13,dragHandleProps:t}){let n=ht(),c=Ds(e,ct().resolveTask),a=!!e.due_date&&e.due_date.slice(0,10)<=pw()?n.colors.danger:n.colors.textPrimary,h=ls(e,0),[d,u]=(0,lg.useState)(null),b=es(e,f),m=new Set(e.label_keys??[]),x=b.filter(I=>!m.has(I.key)),k=b.filter(I=>m.has(I.key));return(0,sr.jsxs)(sr.Fragment,{children:[(0,sr.jsxs)(bn.Box,{sx:{display:"flex",alignItems:"flex-start",gap:.5},children:[t?(0,sr.jsx)(bn.Box,{className:fc,...t,onClick:I=>I.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:(0,sr.jsx)(ug.default,{sx:{fontSize:18}})}):null,(0,sr.jsx)(bn.Checkbox,{size:"small",icon:(0,sr.jsx)(fg.default,{sx:{fontSize:20}}),checkedIcon:(0,sr.jsx)(dg.default,{sx:{fontSize:20}}),checked:e.completed,inputProps:{"aria-label":e.completed?`${e.title} \uC644\uB8CC \uD574\uC81C`:`${e.title} \uC644\uB8CC \uCC98\uB9AC`},onPointerDown:I=>I.stopPropagation(),onClick:I=>I.stopPropagation(),onChange:(I,M)=>l?.({anchorEl:I.currentTarget,taskSeq:e.seq,nextCompleted:M}),sx:{p:0}}),(0,sr.jsx)(bn.Tooltip,{title:e.title,arrow:!0,enterDelay:300,children:(0,sr.jsxs)(bn.Box,{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:dw,overflowWrap:"anywhere",textDecoration:e.completed?"line-through":"none"},children:[e.is_event&&e.event_time?`${e.event_time} `:"",e.title,c?(0,sr.jsx)(bn.Box,{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?(0,sr.jsx)(di,{sx:{fontSize:15,ml:.5,verticalAlign:"-2px",color:n.colors.textMuted}}):null]})})]}),e.is_bug&&e.ticket_no?(0,sr.jsx)(bn.Box,{sx:{pl:3,mt:-.5,fontSize:12.5,color:n.colors.textSecondary,fontWeight:500,fontVariantNumeric:"tabular-nums"},children:e.ticket_no}):null,(0,sr.jsxs)(bn.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:.5},children:[(0,sr.jsxs)(bn.Box,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:.5,minWidth:0},children:[x.map(I=>(0,sr.jsx)(ir,{option:I,small:!0},I.key)),(0,sr.jsx)(Tn,{priority:e.priority,small:!0}),k.map(I=>(0,sr.jsx)(ir,{option:I,small:!0},I.key))]}),g?(0,sr.jsx)(bn.Tooltip,{title:"\uB9C8\uAC10\uC608\uC815",arrow:!0,placement:"top",disableInteractive:!0,slotProps:{transition:{timeout:0}},children:(0,sr.jsx)(bn.ButtonBase,{disabled:!s,onPointerDown:I=>I.stopPropagation(),onClick:I=>{I.stopPropagation(),s?.(e,I.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()?hw(e.due_date):(0,sr.jsx)(cg.default,{sx:{fontSize:15,color:n.colors.textMuted}})})}):null]}),g&&(e.due_date.slice(11,16)||e.estimated_time)?(0,sr.jsxs)(bn.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:.25,mt:-.5,fontSize:12,color:n.colors.textSecondary},children:[(0,sr.jsx)(hg.default,{sx:{fontSize:14}}),e.due_date.slice(11,16)||e.estimated_time]}):null,(0,sr.jsx)(Cn,{names:[...e.manager_name?[e.manager_name]:[],...e.receiver_names],size:20,ringFirst:!!e.manager_name}),h.total>0?(0,sr.jsx)(bn.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:.5},children:(0,sr.jsx)(bn.Box,{sx:{flexShrink:0,width:64},onPointerDown:I=>I.stopPropagation(),onClick:I=>I.stopPropagation(),children:(0,sr.jsx)(is,{canConfirm:!1,count:h.count,total:h.total,onConfirm:()=>{},onShowList:I=>u(I)})})}):null,(0,sr.jsx)(Fa,{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)})]})}var pg=require("@mui/material"),mg=require("@dnd-kit/sortable"),gg=require("@dnd-kit/utilities");var Ju=require("react/jsx-runtime");function mw(e){return{px:1.25,py:1,display:"flex",flexDirection:"column",gap:.75,borderBottom:`1px solid ${e.borderColor}`,bgcolor:e.bg}}function Qu({task:e,statusOptions:f,variant:g="card",showDueDate:l=!1,onRequestArchiveToggle:o,onRequestReply:s,onDueDateClick:r,onCardClick:t,onCardContextMenu:n,titleFontSize:c}){let i=ht(),{attributes:a,listeners:h,setNodeRef:d,transform:u,transition:b,isDragging:m}=(0,mg.useSortable)({id:String(e.seq)}),x=g==="list";return(0,Ju.jsx)(pg.Box,{ref:d,onClick:t?()=>t(e):void 0,onContextMenu:n?k=>n(e,k):void 0,sx:{...x?mw(i.card):qa(i.card),opacity:m?.35:e.completed?.55:1,transform:gg.CSS.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:(0,Ju.jsx)(Fs,{task:e,statusOptions:f,showDueDate:l,onRequestArchiveToggle:o,onRequestReply:s,onDueDateClick:r,titleFontSize:c,dragHandleProps:{...a,...h}})})}function gw(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?e.slice(5).replace("-","."):""}function so(e){if(e.status==="closed")return`${e.name} (\uC885\uB8CC)`;let f=gw(e.end_date);return f?`${e.name} (~${f})`:e.name}var ze=require("react/jsx-runtime"),bg=2,_g="taskbox-column-drag-handle",lf=[fc,_g],dc="group-",go="colmove-",ef="__default__",tf=Kl,rf="__other__",hc="sprint-",yg=`${hc}0`,bw={planning:"#9a9a97",active:"#2f80ed",closed:"#9a9a97"};function kg(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 yw({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=ht(),{setNodeRef:b,isOver:m}=(0,In.useDroppable)({id:`${dc}${e.key}`}),{attributes:x,listeners:k,setNodeRef:I,transform:M,transition:z,isDragging:O}=(0,bo.useSortable)({id:`${go}${e.key}`,disabled:e.isDefault||e.isArchived||!!e.locked});return(0,ze.jsxs)(yt.Box,{ref:P=>{b(P),I(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:wg.CSS.Translate.toString(M),...z?{transition:`${z}, background-color 0.15s`}:{},opacity:O?.6:1},children:[(0,ze.jsxs)(yt.Box,{className:_g,...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?(0,ze.jsx)(yt.Box,{sx:{width:8,height:8,borderRadius:"50%",bgcolor:e.dot,flexShrink:0}}):e.isDefault?null:(()=>{let P=$t(e.icon);return P?(0,ze.jsx)(P,{sx:{fontSize:17,color:"#1e3a8a"}}):null})(),(0,ze.jsx)(yt.Box,{component:"span",sx:{fontSize:u.board.columnHeaderFontSize,fontWeight:700,color:u.board.columnHeaderColor,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.label}),(0,ze.jsx)(yt.Box,{component:"span",sx:{...kg(u.board.badge),ml:"auto"},children:f.length}),e.sprint&&d?(0,ze.jsx)(yt.IconButton,{size:"small","aria-label":"\uBAA9\uD45C \uBA54\uB274",onPointerDown:P=>P.stopPropagation(),onClick:P=>d(P.currentTarget,e.sprint),sx:{color:"#9a9a97"},children:(0,ze.jsx)(nf.default,{sx:{fontSize:18}})}):e.locked?null:(0,ze.jsx)(yt.IconButton,{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:(0,ze.jsx)(nf.default,{sx:{fontSize:18}})})]}),h?(0,ze.jsx)(yt.Box,{sx:{px:1.25,py:1.25,borderBottom:`1px solid ${u.card.borderColor}`,flexShrink:0},children:h}):null,(0,ze.jsx)(yt.Box,{sx:{flex:"1 1 auto",minHeight:0,display:"flex",flexDirection:"column"},children:(0,ze.jsx)(mc.default,{style:{height:"auto",flex:"1 1 auto",minHeight:0},contentStyle:{minWidth:0},thumb:{width:6},dragScroll:{excludeClasses:lf},children:(0,ze.jsxs)(yt.Box,{sx:{display:"flex",flexDirection:"column",flexGrow:1},children:[(0,ze.jsx)(bo.SortableContext,{items:f.map(P=>String(P.seq)),strategy:bo.verticalListSortingStrategy,children:f.map(P=>(0,ze.jsx)(Qu,{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?(0,ze.jsx)(yt.Box,{sx:{py:3,textAlign:"center",fontSize:13,color:"#9a9a97"},children:"\uCE74\uB4DC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):null,f.length===0&&t?(0,ze.jsx)(yt.Box,{sx:{flexGrow:1,minHeight:56,display:"flex",flexDirection:"column","&:hover .taskbox-board-add":{opacity:1,pointerEvents:"auto"}},children:(0,ze.jsxs)(yt.ButtonBase,{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:[(0,ze.jsx)(pc.default,{sx:{fontSize:16}}),"\uC5C5\uBB34 \uB4F1\uB85D"]})}):null]})})})]})}function gc({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:I,onReorderProjects:M,onOpenDetail:z,onTaskContextMenu:O,hideCompleted:P=!1,renderColumnSummary:N,onEditSprint:$,onChangeSprintStatus:L,onRemoveSprint:C}){let S=ht(),{onReturnTask:D,myAccountSeq:p=0}=ct(),[y,v]=(0,Ht.useState)(null),w=y?e.find(we=>we.seq===y.taskSeq):void 0,[_,T]=(0,Ht.useState)(null),[R,F]=(0,Ht.useState)(null),[H,V]=(0,Ht.useState)(null),[A,q]=(0,Ht.useState)(null),[B,E]=(0,Ht.useState)(null),[j,U]=(0,Ht.useState)(null),[X,G]=(0,Ht.useState)(null),[W,Z]=(0,Ht.useState)(null),[J,K]=(0,Ht.useState)(null),[ee,te]=(0,Ht.useState)(null),oe=(0,Ht.useRef)(!1),ne=(0,Ht.useMemo)(()=>new Map(e.map(we=>[we.seq,we])),[e]),ie=(0,Ht.useMemo)(()=>{let we=e.filter(ve=>ve.is_notice);return we.sort((ve,Ee)=>ve.completed!==Ee.completed?ve.completed?1:-1:Ee.seq-ve.seq),we},[e]),ae=(0,Ht.useMemo)(()=>g.filter(we=>!we.archived),[g]),pe=(0,Ht.useMemo)(()=>g.filter(we=>we.archived),[g]),ye=we=>({key:we.key,label:we.label,icon:we.icon,isDefault:!1,isArchived:we.archived}),Se=(0,Ht.useMemo)(()=>new Set(i.map(we=>we.key)),[i]),Be=(0,Ht.useMemo)(()=>new Set(h.map(we=>we.seq)),[h]),Ce=(0,Ht.useMemo)(()=>{if(c==="sprint")return[{key:yg,label:"\uBBF8\uBC30\uC815",icon:"",isDefault:!0,isArchived:!1,dot:"#c9c8c5",locked:!0},...h.map(we=>({key:`${hc}${we.seq}`,label:so(we),icon:"",isDefault:!1,isArchived:!1,dot:bw[we.status],locked:!0,sprint:we}))];if(c==="status"){let we=i.map(ve=>({key:ve.key,label:ve.name,icon:"",isDefault:!1,isArchived:!1,dot:ve.dot,locked:!0}));return we.some(ve=>ve.key===tf)?we:[...we,{key:tf,label:"\uC644\uB8CC",icon:"",isDefault:!1,isArchived:!1,dot:"#2f80ed",locked:!0}]}return l==="archived"?pe.map(ye):[{key:ef,label:"\uAE30\uBCF8 \uC5C5\uBB34\uD568",icon:"",isDefault:!0,isArchived:!1},...ae.map(ye)]},[c,i,h,l,ae,pe]),Pe=(0,In.useSensors)((0,In.useSensor)(In.PointerSensor,{activationConstraint:{distance:5}})),ft=(0,Ht.useCallback)(we=>{let ve=String(we.active.id).startsWith(go),Ee=(0,In.pointerWithin)(we),st=Ee.length>0?Ee:(0,In.rectIntersection)(we);if(ve)return st.filter(Ut=>String(Ut.id).startsWith(go));let Ve=st.filter(Ut=>!String(Ut.id).startsWith(go)),$e=Ve.filter(Ut=>!String(Ut.id).startsWith(dc));return $e.length>0?$e:Ve},[]),xe=(0,Ht.useMemo)(()=>{let we=new Map;for(let ve of e){if(ve.is_notice)continue;let Ee;if(c==="sprint"){let Ve=ve.sprint_seq??0;Ee=Be.has(Ve)?`${hc}${Ve}`:yg}else Ee=c==="status"?ve.completed?tf:Se.has(String(ve.status??""))?String(ve.status??""):rf:ve.tab_key?.trim()||ef;let st=we.get(Ee);st?st.push(ve):we.set(Ee,[ve])}for(let ve of we.values())ve.sort((Ee,st)=>{if(Ee.completed!==st.completed)return Ee.completed?1:-1;let Ve=(Ee.group_sort_no??0)>0,$e=(st.group_sort_no??0)>0;return Ve&&$e?(Ee.group_sort_no??0)-(st.group_sort_no??0):Ve!==$e?Ve?-1:1:Ee.due_date!==st.due_date?Ee.due_date<st.due_date?-1:1:Ee.seq-st.seq});return we},[e,c,Se,Be]),se=(0,Ht.useMemo)(()=>c!=="status"||(xe.get(rf)??[]).length===0?Ce:[...Ce,{key:rf,label:"\uAE30\uD0C0",icon:"",isDefault:!1,isArchived:!1,dot:"#c9c8c5",locked:!0}],[c,Ce,xe]),Ie=(0,Ht.useCallback)(we=>W?(W.get(we)??[]).map(ve=>ne.get(ve)).filter(ve=>!!ve):xe.get(we)??[],[W,ne,xe]),ke=(0,Ht.useCallback)(we=>{let ve=Ie(we);return P?ve.filter(Ee=>!Ee.completed):ve},[Ie,P]),_e=(0,Ht.useCallback)(we=>{let ve=String(we.active.id);if(ve.startsWith(go)){te(ve.slice(go.length));return}K(Number(ve)),Z(new Map(Ce.map(Ee=>[Ee.key,(xe.get(Ee.key)??[]).map(st=>st.seq)])))},[Ce,xe]),rt=(0,Ht.useCallback)((we,ve)=>{if(we.startsWith(dc))return{key:we.slice(dc.length),overSeq:null};let Ee=Number(we);for(let[st,Ve]of ve)if(Ve.includes(Ee))return{key:st,overSeq:Ee};return null},[]),Fe=(0,Ht.useCallback)(we=>{let{active:ve,over:Ee}=we;!Ee||String(ve.id).startsWith(go)||Z(st=>{if(!st)return st;let Ve=Number(ve.id),$e=rt(String(Ee.id),st);if(!$e)return st;let Ut=[...st.entries()].find(([,de])=>de.includes(Ve))?.[0];if(!Ut||Ut===$e.key)return st;let et=new Map(st);et.set(Ut,(et.get(Ut)??[]).filter(de=>de!==Ve));let re=[...et.get($e.key)??[]],ue=re.length;if($e.overSeq!==null){let de=re.indexOf($e.overSeq);de!==-1&&(ue=de)}return re.splice(ue,0,Ve),et.set($e.key,re),et})},[rt]),me=(0,Ht.useCallback)(we=>{let ve=String(we.active.id);if(ve.startsWith(go)){te(null);let ue=String(we.over?.id??"");if(!ue.startsWith(go))return;let de=ve.slice(go.length),Te=ue.slice(go.length);if(de===Te)return;let _t=g.map(Lt=>Lt.key),De=_t.indexOf(de),He=_t.indexOf(Te);if(De===-1||He===-1)return;M((0,bo.arrayMove)(_t,De,He));return}let Ee=W;if(Z(null),K(null),oe.current=!0,!Ee||!we.over)return;let st=Number(ve),Ve=[...Ee.entries()].find(([,ue])=>ue.includes(st));if(!Ve)return;let[$e,Ut]=Ve,et=[...Ut],re=rt(String(we.over.id),Ee);if(re&&re.key===$e&&re.overSeq!==null&&re.overSeq!==st){let ue=et.indexOf(st),de=et.indexOf(re.overSeq);ue!==-1&&de!==-1&&(et=(0,bo.arrayMove)(et,ue,de))}if(c==="status"){a?.(st,$e);return}if(c==="sprint"){d?.(st,Number($e.slice(hc.length))||0);return}n(st,$e===ef?"":$e,et)},[g,W,rt,n,M,c,a,d]),Jt=(0,Ht.useCallback)(()=>{Z(null),K(null),te(null),oe.current=!0},[]),Ue=(0,Ht.useCallback)(we=>{if(oe.current){oe.current=!1;return}z(we)},[z]),nt=J!==null?ne.get(J)??null:null,qt=ee!==null?Ce.find(we=>we.key===ee)??null:null,lt=(0,Ht.useCallback)((we,ve)=>{G({anchorEl:ve,taskSeq:we.seq,date:we.due_date,reminders:Bo(we)})},[]),Le=_?.column??null;return(0,ze.jsxs)(yt.Box,{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:[(0,ze.jsxs)(In.DndContext,{sensors:Pe,collisionDetection:ft,onDragStart:_e,onDragOver:Fe,onDragEnd:me,onDragCancel:Jt,children:[(0,ze.jsx)(yt.Box,{sx:{flex:1,minHeight:0,minWidth:0,contain:"inline-size"},children:l==="archived"&&Ce.length===0?(0,ze.jsx)(yt.Box,{sx:{py:8,textAlign:"center",color:"#9a9a97",fontSize:14},children:"\uBCF4\uAD00\uB41C \uD504\uB85C\uC81D\uD2B8\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):(0,ze.jsx)(mc.default,{style:{height:"100%"},contentStyle:{width:"max-content",minWidth:"100%",height:"100%"},thumb:{width:8},showHorizontalScrollbar:!0,dragScroll:{excludeClasses:lf},children:(0,ze.jsxs)(yt.Box,{sx:{display:"flex",alignItems:"flex-start",gap:bg,height:"100%",minWidth:"min-content",p:bg,boxSizing:"border-box"},children:[l==="active"&&ie.length>0?(0,ze.jsxs)(yt.Box,{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:we=>we.shadows[1],bgcolor:S.card.bg,overflow:"hidden"},children:[(0,ze.jsxs)(yt.Box,{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:[(0,ze.jsx)(xg.default,{sx:{fontSize:17,color:"#e8763a"}}),(0,ze.jsx)(yt.Box,{component:"span",sx:{fontSize:14.5,fontWeight:700,color:S.board.columnHeaderColor},children:"\uACF5\uC9C0\uC0AC\uD56D"}),(0,ze.jsxs)(yt.Box,{component:"span",sx:{fontSize:13,color:"#9a9a97",flexShrink:0},children:["(",ie.length,")"]})]}),(0,ze.jsx)(yt.Box,{sx:{flex:"1 1 auto",minHeight:0,display:"flex",flexDirection:"column"},children:(0,ze.jsx)(mc.default,{style:{height:"auto",flex:"1 1 auto",minHeight:0},contentStyle:{minWidth:0},dragScroll:{excludeClasses:lf},thumb:{width:6},children:(0,ze.jsx)(yt.Box,{sx:{display:"flex",flexDirection:"column"},children:ie.map(we=>(0,ze.jsxs)(yt.Box,{onClick:()=>Ue(we),onContextMenu:ve=>O(we,ve),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:[(0,ze.jsx)(Fs,{task:we,statusOptions:f,showDueDate:!0,titleFontSize:15,onRequestArchiveToggle:v}),(()=>{let ve=(we.target_names??[]).filter(st=>st.trim());if(ve.length===0)return null;let Ee=ve.length>2?`${ve[0]}, ${ve[1]} \uC678 ${ve.length-2}`:ve.join(", ");return(0,ze.jsxs)(yt.Box,{sx:{display:"flex",alignItems:"center",gap:.5,fontSize:12.5,color:"#787774",overflow:"hidden",whiteSpace:"nowrap"},children:[(0,ze.jsx)(vg.default,{sx:{fontSize:14,flexShrink:0}}),(0,ze.jsx)(yt.Box,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis"},children:Ee})]})})()]},we.seq))})})})]}):null,(0,ze.jsx)(bo.SortableContext,{items:ae.map(we=>`${go}${we.key}`),strategy:bo.horizontalListSortingStrategy,children:se.map(we=>(0,ze.jsx)(yw,{column:we,tasks:ke(we.key),summary:N?.(we.key,Ie(we.key)),onOpenSprintMenu:$||L||C?(ve,Ee)=>F({anchorEl:ve,sprint:Ee}):void 0,statusOptions:f,onRequestArchiveToggle:v,onRequestReply:s,onDueDateClick:lt,onAddTask:b,canAdd:m&&c==="project",onOpenMenu:T,onCardClick:Ue,onCardContextMenu:O,grow:c!=="project"},we.key))}),l==="active"&&c==="project"?(0,ze.jsxs)(yt.ButtonBase,{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:[(0,ze.jsx)(pc.default,{sx:{fontSize:18}}),"\uC0C8 \uD504\uB85C\uC81D\uD2B8"]}):null,l==="active"&&se.length===0&&ie.length===0?(0,ze.jsx)(yt.Box,{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]})})}),(0,ze.jsx)(In.DragOverlay,{children:nt?(0,ze.jsx)(yt.Box,{sx:{...qa,width:250,boxShadow:"0 8px 20px rgba(0,0,0,0.18)",cursor:"grabbing"},children:(0,ze.jsx)(Fs,{task:nt,statusOptions:f,showDueDate:!0,titleFontSize:15})}):qt?(0,ze.jsxs)(yt.Box,{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 we=$t(qt.icon);return we?(0,ze.jsx)(we,{sx:{fontSize:17,color:"#1e3a8a"}}):null})(),(0,ze.jsx)(yt.Box,{component:"span",sx:{fontSize:13.5,fontWeight:700,color:S.board.columnHeaderColor},children:qt.label}),(0,ze.jsx)(yt.Box,{component:"span",sx:kg(S.board.badge),children:(xe.get(qt.key)??[]).length})]}):null})]}),(0,ze.jsxs)(yt.Menu,{transitionDuration:0,anchorEl:_?.anchorEl??null,open:!!_,onClose:()=>T(null),children:[Le&&!Le.isArchived&&m?(0,ze.jsxs)(yt.MenuItem,{onClick:()=>{Le&&b(Le.isDefault?"":Le.key),T(null)},sx:{fontSize:14,gap:1},children:[(0,ze.jsx)(pc.default,{sx:{fontSize:18,color:"#787774"}}),"\uC0C8 \uC5C5\uBB34 \uB4F1\uB85D"]}):null,Le&&!Le.isDefault&&!Le.isArchived?(0,ze.jsxs)(yt.MenuItem,{onClick:()=>{x(Le.key,Le.label,Le.icon),T(null)},sx:{fontSize:14,gap:1},children:[(0,ze.jsx)(of.default,{sx:{fontSize:18,color:"#787774"}}),"\uC218\uC815"]}):null,Le&&!Le.isDefault&&!Le.isArchived?(0,ze.jsxs)(yt.MenuItem,{onClick:()=>{if(_){let we=(xe.get(_.column.key)??[]).filter(ve=>!ve.completed&&!ve.archived).length;we>0?E({anchorEl:_.anchorEl,count:we}):q(_)}T(null)},sx:{fontSize:14,gap:1},children:[(0,ze.jsx)(sf.default,{sx:{fontSize:18,color:"#787774"}}),"\uBCF4\uAD00"]}):null,Le&&Le.isArchived?(0,ze.jsxs)(yt.MenuItem,{onClick:()=>{k(Le.key,!1),T(null)},sx:{fontSize:14,gap:1},children:[(0,ze.jsx)(af.default,{sx:{fontSize:18,color:"#787774"}}),"\uBCF5\uC6D0"]}):null,Le&&!Le.isDefault?(0,ze.jsx)(yt.Divider,{}):null,Le&&!Le.isDefault?(0,ze.jsxs)(yt.MenuItem,{onClick:()=>{_&&U(_),T(null)},sx:{fontSize:14,gap:1,color:"#e5484d"},children:[(0,ze.jsx)(gn,{sx:{fontSize:18}}),"\uC0AD\uC81C"]}):null]}),(0,ze.jsxs)(yt.Menu,{transitionDuration:0,anchorEl:R?.anchorEl??null,open:!!R,onClose:()=>F(null),children:[$?(0,ze.jsxs)(yt.MenuItem,{onClick:()=>{R&&$(R.sprint.seq),F(null)},sx:{fontSize:14,gap:1},children:[(0,ze.jsx)(of.default,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uC218\uC815"]}):null,L?(0,ze.jsxs)(yt.MenuItem,{onClick:()=>{R&&L(R.sprint.seq,R.sprint.status==="closed"?"active":"closed"),F(null)},sx:{fontSize:14,gap:1},children:[R?.sprint.status==="closed"?(0,ze.jsx)(af.default,{sx:{fontSize:18,color:"#787774"}}):(0,ze.jsx)(sf.default,{sx:{fontSize:18,color:"#787774"}}),R?.sprint.status==="closed"?"\uB2E4\uC2DC \uC2DC\uC791":"\uBAA9\uD45C \uC885\uB8CC"]}):null,C?(0,ze.jsx)(yt.Divider,{}):null,C?(0,ze.jsxs)(yt.MenuItem,{onClick:()=>{R&&V(R),F(null)},sx:{fontSize:14,gap:1,color:"#e5484d"},children:[(0,ze.jsx)(gn,{sx:{fontSize:18}}),"\uBAA9\uD45C \uC0AD\uC81C"]}):null]}),(0,ze.jsx)(Qt,{open:!!H,anchorEl:H?.anchorEl??null,title:`"${H?.sprint.name??""}" \uBAA9\uD45C\uB97C \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`,confirmText:"\uC0AD\uC81C",onCancel:()=>V(null),onConfirm:()=>{H&&C?.(H.sprint.seq),V(null)}}),(0,ze.jsx)(io,{anchorEl:X?.anchorEl??null,open:!!X,date:X?.date??"",reminders:X?.reminders??[],onClose:()=>G(null),onDateChange:we=>{X&&(r(X.taskSeq,we),G(ve=>ve&&{...ve,date:we}))},onReminderChange:we=>{X&&(t(X.taskSeq,we),G(ve=>ve&&{...ve,reminders:we}))}}),(0,ze.jsx)(Qt,{open:!!B,anchorEl:B?.anchorEl??null,title:`\uBBF8\uC644\uB8CC \uC5C5\uBB34 ${B?.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:()=>E(null),onConfirm:()=>E(null)}),(0,ze.jsx)(Qt,{open:!!A,anchorEl:A?.anchorEl??null,title:`"${A?.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:()=>q(null),onConfirm:()=>{A&&k(A.column.key,!0),q(null)}}),(0,ze.jsx)(Qt,{open:!!j,anchorEl:j?.anchorEl??null,title:`"${j?.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:()=>{j&&I(j.column.key),U(null)}}),(0,ze.jsx)(Kn,{open:!!y,anchorEl:y?.anchorEl??null,nextCompleted:y?.nextCompleted??!1,returnMode:!!D&&!!(w&&Vn(w,p)),onCancel:()=>v(null),onConfirm:we=>{y&&(we&&D&&w?D(w,we):o(y.taskSeq,y.nextCompleted)),v(null)}})]})}var Sr=require("react"),hr=require("@mui/material"),Cg=Y(require("@mui/icons-material/Add"),1),Bg=Y(require("@mui/icons-material/ChevronLeft"),1),Ig=Y(require("@mui/icons-material/ChevronRight"),1),Eg=Y(require("@mui/icons-material/KeyboardArrowDown"),1),Mg=require("@ehfuse/mui-datetime-picker"),En=require("@dnd-kit/core"),Mi=require("@dnd-kit/sortable"),Rg=require("@dnd-kit/utilities"),Og=Y(require("@ehfuse/overlay-scrollbar"),1);function yw(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 cs(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=yw(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 qs(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 $s(e,f){if(e.completed!==f.completed)return e.completed?1:-1;let g=qs(e),l=qs(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}var Hs=require("@mui/material"),Ws=require("react/jsx-runtime");function us({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(0,Ws.jsx)(Hs.Tooltip,{title:`(${l}) ${g}`,arrow:!0,enterDelay:300,children:(0,Ws.jsxs)(Hs.Box,{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:[(0,Ws.jsx)(Hs.Box,{component:"span",sx:{width:6,height:6,borderRadius:"50%",bgcolor:"#0f9d58",flexShrink:0}}),(0,Ws.jsx)(Hs.Box,{component:"span",sx:{minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},children:g})]})})}var Tg=require("react"),Eo=require("@mui/material");var $a=require("react"),uf=new WeakMap,cf=null;function xw(){return typeof ResizeObserver>"u"?null:(cf||(cf=new ResizeObserver(e=>{for(let f of e){let g=uf.get(f.target);if(!g)continue;let l=f.borderBoxSize?.[0]?.inlineSize??f.target.getBoundingClientRect().width;g(l)}})),cf)}function Sg(){let[e,f]=(0,$a.useState)(null),[g,l]=(0,$a.useState)(0);return(0,$a.useLayoutEffect)(()=>{if(!e)return;l(e.getBoundingClientRect().width);let o=xw();if(o)return uf.set(e,s=>l(r=>Math.abs(r-s)<1?r:s)),o.observe(e),()=>{o.unobserve(e),uf.delete(e)}},[e]),{ref:f,width:g}}var Xn=require("react/jsx-runtime"),ff={high:"#e5484d",medium:"#2f80ed",low:"#d9a514"},Us=15,vw=150,ww=3;function Ei({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=ht(),k=x.mode==="dark",[I]=es(e,f),M=String(e.manager_name??"").trim(),z=b?qs(e):"",O=Ds(e,ct().resolveTask),P=!e.completed&&!e.is_event&&!e.due_date.slice(0,10),N=e.is_notice||e.is_event?$t(e.icon||(e.is_notice?$r:Yr)):null,$=!e.completed&&!e.is_event&&!!e.due_date&&e.due_date.slice(0,10)<a0(),{ref:L,width:C}=Sg(),S=C>0&&C<vw,D=S||m,p=(0,Tg.useCallback)(v=>{L(v),i?.(v)},[L,i]),y=n&&!r&&!S&&!!M;return(0,Xn.jsxs)(Eo.Box,{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:I?k?Es(I.dot,x.chip.darkBgAlpha):I.bg:k?x.card.bg:x.colors.surfaceHover,color:I?k?x.chip.darkTextSource==="fg"?I.fg:I.dot:I.fg:x.colors.textPrimary,fontSize:Us,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)"},...$?{borderLeft:`3px solid ${x.colors.danger}`,pl:.75}:r?{borderLeft:"3px solid #2f80ed",pl:.75}:{}},children:[(0,Xn.jsx)(Eo.Box,{component:"span",sx:{width:6,height:6,borderRadius:"50%",flexShrink:0,...D?{mt:"7px"}:{},bgcolor:ff[e.priority]??x.colors.accentOnSurface}}),d&&!S&&u?(0,Xn.jsx)(Eo.Checkbox,{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?(0,Xn.jsx)(N,{sx:{fontSize:15,flexShrink:0,opacity:.75,...D?{mt:"3px"}:{}}}):null,(0,Xn.jsxs)(Eo.Box,{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&&z?(0,Xn.jsx)(Eo.Box,{component:"span",sx:{lineHeight:1.35,fontSize:Us-1,color:e.completed?x.colors.textPrimary:x.colors.danger},children:z}):null,(0,Xn.jsxs)(Eo.Box,{component:"span",sx:{minWidth:0,overflow:"hidden",...D?{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:ww,whiteSpace:"normal",overflowWrap:"anywhere",lineHeight:1.35}:{textOverflow:"ellipsis",whiteSpace:"nowrap"}},children:[!S&&z?(0,Xn.jsx)(Eo.Box,{component:"span",sx:{mr:.5,fontSize:Us-1,color:e.completed?x.colors.textPrimary:x.colors.danger},children:z}):null,e.title,!S&&O?(0,Xn.jsx)(Eo.Box,{component:"span",sx:{ml:.5,fontSize:Us-2,color:x.colors.textMuted,fontVariantNumeric:"tabular-nums"},children:O}):null,!S&&(e.comment_count??e.comments?.length??0)>0?(0,Xn.jsx)(di,{sx:{fontSize:15,ml:.5,verticalAlign:"-2px",color:x.colors.textMuted}}):null]})]}),h??null,!h&&y?(0,Xn.jsx)(Eo.Box,{component:"span",onClick:c?v=>{v.stopPropagation(),c(e)}:void 0,sx:{display:"inline-flex",flexShrink:0,ml:"auto",pl:.5},children:(0,Xn.jsx)(po,{src:t?.get(M)??"",name:M,avatarSx:{width:22,height:22,fontSize:11},iconFontSize:14})}):null]})}var Mt=require("react/jsx-runtime"),Ag=36,_w=["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"],yc="day-";function df(e){let f=new Date(e);return f.setHours(0,0,0,0),f.setDate(f.getDate()-f.getDay()),f}function bc(e,f){let g=new Date(e);return g.setDate(g.getDate()+f),g}function kw(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 Sw(e){return e.getDate()===1?`${e.getMonth()+1}\uC6D4 1\uC77C`:String(e.getDate())}function Tw({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}=(0,Mi.useSortable)({id:String(e.seq),disabled:t});return(0,Mt.jsx)(Ei,{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:Rg.CSS.Translate.toString(a),transition:h}}})}function Cw({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=ht(),{setNodeRef:k}=(0,En.useDroppable)({id:`${yc}${e}`,disabled:m});return(0,Mt.jsxs)(hr.Box,{ref:k,sx:{minWidth:0,minHeight:0,height:"100%",display:"flex",flexDirection:"column",bgcolor:f?x.calendar.todayBg:x.calendar.cellBg},children:[(0,Mt.jsxs)(hr.Box,{sx:{display:"flex",justifyContent:"flex-end",alignItems:"center",gap:.5,px:1,height:Ag,bgcolor:f?x.calendar.todayBg:x.calendar.dateBandBg,borderBottom:`1px solid ${x.calendar.borderColor}`,flexShrink:0},children:[l?(0,Mt.jsx)(hr.Box,{component:"span",sx:{mr:"auto",fontSize:11.5,fontWeight:600,color:x.colors.danger,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:l}):null,f?(0,Mt.jsx)(hr.Box,{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,(0,Mt.jsx)(hr.Box,{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?(0,Mt.jsx)(hr.Box,{sx:{px:1,py:1,borderBottom:`1px solid ${x.calendar.borderColor}`,flexShrink:0},children:d}):null,(0,Mt.jsx)(hr.Box,{sx:{flex:1,minHeight:0,bgcolor:f?x.calendar.todayBg:x.colors.surfaceSubtle},children:(0,Mt.jsx)(Og.default,{style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:(0,Mt.jsxs)(hr.Box,{sx:{display:"flex",flexDirection:"column",flexGrow:1},children:[s.length>0?(0,Mt.jsx)(hr.Box,{sx:{display:"flex",flexDirection:"column",gap:.5,px:1,pt:.75,pb:.25},children:s.map(I=>(0,Mt.jsx)(us,{event:I},I.uid))}):null,(0,Mt.jsx)(Mi.SortableContext,{items:o.map(I=>String(I.seq)),strategy:Mi.verticalListSortingStrategy,children:(0,Mt.jsx)(hr.Box,{sx:{display:"flex",flexDirection:"column",gap:.5,px:1,pt:o.length>0?.75:0},children:o.map(I=>(0,Mt.jsx)(Tw,{task:I,statusOptions:r,isMine:u>0&&Number(I.manager_account_seq??0)===u,avatarSrcByName:b,onCardClick:a,onCardContextMenu:h,onRequestArchiveToggle:t,dragDisabled:m},I.seq))})}),(0,Mt.jsx)(hr.Box,{sx:{flexGrow:1,minHeight:56,display:"flex",flexDirection:"column",pb:1,...i?{"&:hover .taskbox-add-schedule":{opacity:1,pointerEvents:"auto"}}:{}},children:(0,Mt.jsxs)(hr.ButtonBase,{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:[(0,Mt.jsx)(Cg.default,{sx:{fontSize:16}}),"\uC5C5\uBB34 \uB4F1\uB85D"]})})]})})})]})}function hf({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=ht(),[k,I]=(0,Sr.useState)(()=>df(new Date)),[M,z]=(0,Sr.useState)(null),{onReturnTask:O}=ct(),P=M?e.find(Z=>Z.seq===M.taskSeq):void 0,[N,$]=(0,Sr.useState)(null),[L,C]=(0,Sr.useState)(null),[S,D]=(0,Sr.useState)(null),p=(0,Sr.useRef)(!1),y=(0,Sr.useMemo)(()=>Array.from({length:7},(Z,J)=>bc(k,J)),[k]),v=(0,Sr.useMemo)(()=>new Map(e.map(Z=>[Z.seq,Z])),[e]),w=(0,Sr.useMemo)(()=>[...new Set(y.map(Z=>Z.getFullYear()))],[y]),_=Wo(w),T=(0,En.useSensors)((0,En.useSensor)(En.PointerSensor,{activationConstraint:{distance:5}})),R=(0,Sr.useCallback)(Z=>{let J=(0,En.pointerWithin)(Z),K=J.length>0?J:(0,En.rectIntersection)(Z),ee=K.filter(te=>!String(te.id).startsWith(yc));return ee.length>0?ee:K},[]),F=(0,Sr.useMemo)(()=>cs(f),[f]),H=(0,Sr.useMemo)(()=>{let Z=new Map;for(let J of e){let K=J.due_date.slice(0,10)||(l?J.start_date.slice(0,10)||String(J.created_time??"").slice(0,10):"");if(!K)continue;let ee=Z.get(K);ee?ee.push(J):Z.set(K,[J])}for(let J of Z.values())J.sort($s);return Z},[e,l]),V=(0,Sr.useCallback)(Z=>L?(L.get(Z)??[]).map(J=>v.get(J)).filter(J=>!!J):H.get(Z)??[],[L,v,H]),A=(0,Sr.useCallback)(Z=>{let J=V(Z);return b?J.filter(K=>!K.completed):J},[V,b]),q=(0,Sr.useCallback)(Z=>{D(Number(Z.active.id)),C(new Map(y.map(J=>{let K=Zr(J);return[K,(H.get(K)??[]).map(ee=>ee.seq)]})))},[y,H]),B=(0,Sr.useCallback)((Z,J)=>{if(Z.startsWith(yc))return{day:Z.slice(yc.length),overSeq:null};let K=Number(Z);for(let[ee,te]of J)if(te.includes(K))return{day:ee,overSeq:K};return null},[]),E=(0,Sr.useCallback)(Z=>{let{active:J,over:K}=Z;K&&C(ee=>{if(!ee)return ee;let te=Number(J.id),oe=B(String(K.id),ee);if(!oe)return ee;let ne=[...ee.entries()].find(([,ye])=>ye.includes(te))?.[0];if(!ne||ne===oe.day)return ee;let ie=new Map(ee);ie.set(ne,(ie.get(ne)??[]).filter(ye=>ye!==te));let ae=[...ie.get(oe.day)??[]],pe=ae.length;if(oe.overSeq!==null){let ye=ae.indexOf(oe.overSeq);ye!==-1&&(pe=ye)}return ae.splice(pe,0,te),ie.set(oe.day,ae),ie})},[B]),j=(0,Sr.useCallback)(Z=>{let{active:J,over:K}=Z,ee=L;if(C(null),D(null),p.current=!0,!ee||!K)return;let te=Number(J.id),oe=[...ee.entries()].find(([,ye])=>ye.includes(te));if(!oe)return;let[ne,ie]=oe,ae=[...ie],pe=B(String(K.id),ee);if(pe&&pe.day===ne&&pe.overSeq!==null&&pe.overSeq!==te){let ye=ae.indexOf(te),Se=ae.indexOf(pe.overSeq);ye!==-1&&Se!==-1&&(ae=(0,Mi.arrayMove)(ae,ye,Se))}n(te,ne,ae)},[L,n,B]),U=(0,Sr.useCallback)(()=>{C(null),D(null),p.current=!0},[]),X=(0,Sr.useCallback)(Z=>{if(p.current){p.current=!1;return}d(Z)},[d]),G=S!==null?v.get(S)??null:null,W=(0,Sr.useRef)(null);return(0,Mt.jsxs)(hr.Box,{onTouchStart:Z=>{let J=Z.touches[0];W.current=J?{x:J.clientX,y:J.clientY}:null},onTouchEnd:Z=>{let J=W.current;W.current=null;let K=Z.changedTouches[0];if(!J||!K||S!==null)return;let ee=K.clientX-J.x,te=K.clientY-J.y;Math.abs(ee)<60||Math.abs(ee)<=Math.abs(te)||I(bc(k,ee<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:[(0,Mt.jsxs)(hr.Box,{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:[(0,Mt.jsxs)(hr.Box,{sx:{display:"flex",alignItems:"center",gap:.25},children:[(0,Mt.jsx)(hr.IconButton,{size:"small","aria-label":"\uC774\uC804 \uC8FC",onClick:()=>I(bc(k,-7)),children:(0,Mt.jsx)(Bg.default,{sx:{fontSize:24,color:x.colors.textSecondary}})}),(0,Mt.jsx)(hr.Button,{size:"small",color:"inherit",onClick:()=>I(df(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"}),(0,Mt.jsx)(hr.IconButton,{size:"small","aria-label":"\uB2E4\uC74C \uC8FC",onClick:()=>I(bc(k,7)),children:(0,Mt.jsx)(Ig.default,{sx:{fontSize:24,color:x.colors.textSecondary}})})]}),(0,Mt.jsxs)(hr.ButtonBase,{onClick:Z=>$(Z.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:[kw(y),(0,Mt.jsx)(Eg.default,{sx:{fontSize:18,color:x.colors.textMuted}})]})]}),(0,Mt.jsx)(hr.Box,{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(Z=>{let J=Z.getDay(),K=_.has(Zr(Z));return(0,Mt.jsx)(hr.Box,{sx:{height:Ag,display:"flex",alignItems:"center",justifyContent:"center",fontSize:12.5,color:J===0||K?x.colors.danger:J===6?x.colors.accentOnSurface:x.colors.textSecondary},children:_w[J]},Zr(Z))})}),(0,Mt.jsx)(hr.Box,{sx:{flex:1,minHeight:0},children:(0,Mt.jsxs)(En.DndContext,{sensors:T,collisionDetection:R,onDragStart:q,onDragOver:E,onDragEnd:j,onDragCancel:U,children:[(0,Mt.jsx)(hr.Box,{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(Z=>{let J=Zr(Z);return(0,Mt.jsx)(Cw,{dayKey:J,isToday:J===r,dayLabel:Sw(Z),holidayName:_.get(J)??"",summary:m?.(J,V(J)),tasks:A(J),googleEvents:F.get(J)??[],statusOptions:g,onRequestArchiveToggle:z,onRequestReply:c,onAddSchedule:i,canAdd:a,onCardClick:X,onCardContextMenu:u,myAccountSeq:o,avatarSrcByName:s,dragDisabled:h},J)})}),(0,Mt.jsx)(En.DragOverlay,{children:G?(0,Mt.jsx)(hr.Box,{sx:{boxShadow:"0 8px 20px rgba(0,0,0,0.18)",borderRadius:.75,cursor:"grabbing"},children:(0,Mt.jsx)(Ei,{task:G,statusOptions:g,onOpenDetail:()=>{},isMine:o>0&&Number(G.manager_account_seq??0)===o})}):null})]})}),(0,Mt.jsx)(Mg.DatePicker,{anchorEl:N,open:!!N,onClose:()=>$(null),selectedDate:k,onDateChange:Z=>{I(df(Z)),$(null)}}),(0,Mt.jsx)(Kn,{open:!!M,anchorEl:M?.anchorEl??null,nextCompleted:M?.nextCompleted??!1,returnMode:!!O&&!!(P&&Vn(P,o)),onCancel:()=>z(null),onConfirm:Z=>{M&&(Z&&O&&P?O(P,Z):t(M.taskSeq,M.nextCompleted)),z(null)}})]})}var Hr=require("react"),wr=require("@mui/material"),Dg=Y(require("@mui/icons-material/Add"),1),Pg=Y(require("@mui/icons-material/ChevronLeft"),1),Ng=Y(require("@mui/icons-material/ChevronRight"),1),Lg=Y(require("@mui/icons-material/KeyboardArrowDown"),1),zg=require("@ehfuse/mui-datetime-picker"),un=require("@dnd-kit/core"),jg=Y(require("@ehfuse/overlay-scrollbar"),1);var Ft=require("react/jsx-runtime"),Bw=["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"],xc="mday-",vc="mchip-",Fg=36;function Iw(e){let f=new Date(e);return f.setHours(0,0,0,0),f.setDate(f.getDate()-f.getDay()),f}function wc(e){let f=new Date(e);return f.setHours(0,0,0,0),f.setDate(1),f}function Ew(e,f){let g=new Date(e);return g.setDate(g.getDate()+f),g}function pf(e,f){let g=wc(e);return g.setMonth(g.getMonth()+f),g}function Mw({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}=(0,un.useDraggable)({id:String(e.seq),disabled:g||n}),{setNodeRef:d}=(0,un.useDroppable)({id:`${vc}${e.seq}`,disabled:g||n});return(0,Ft.jsx)(wr.Tooltip,{title:e.title,arrow:!0,enterDelay:400,children:(0,Ft.jsx)(Ei,{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 Rw({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=ht(),I=k.mode==="dark",{setNodeRef:M,isOver:z}=(0,un.useDroppable)({id:`${xc}${e}`,disabled:x}),O=r,P=!!s||o===0;return(0,Ft.jsxs)(wr.Box,{ref:M,sx:{minWidth:0,minHeight:0,display:"flex",flexDirection:"column",gap:.5,p:.5,bgcolor:z?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:[(0,Ft.jsxs)(wr.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:.5,height:Fg,flexShrink:0,mx:-.5,mt:-.5,px:1,bgcolor:g?k.calendar.todayBg:k.calendar.dateBandBg,borderBottom:`1px solid ${k.calendar.borderColor}`},children:[s?(0,Ft.jsx)(wr.Box,{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?(0,Ft.jsx)(wr.Box,{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,(0,Ft.jsx)(wr.Box,{component:"span",sx:{fontSize:13.5,fontWeight:g?700:400,color:l?k.colors.textMuted:P?k.colors.danger:o===6?k.colors.accentOnSurface:I?k.colors.textStrong:k.colors.textPrimary,flexShrink:0},children:f})]}),t.map(N=>(0,Ft.jsx)(us,{event:N,small:!0},N.uid)),O.map(N=>(0,Ft.jsx)(Mw,{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)),(0,Ft.jsx)(wr.Box,{sx:{flexGrow:1,minHeight:0,display:"flex",alignItems:"flex-start"},children:(0,Ft.jsxs)(wr.ButtonBase,{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:[(0,Ft.jsx)(Dg.default,{sx:{fontSize:16}}),"\uC5C5\uBB34 \uB4F1\uB85D"]})})]})}function mf({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=ht(),b=u.mode==="dark",[m,x]=(0,Hr.useState)(()=>wc(new Date)),[k,I]=(0,Hr.useState)(null),[M,z]=(0,Hr.useState)(null),[O,P]=(0,Hr.useState)(null),[N,$]=(0,Hr.useState)(null),L=(0,Hr.useMemo)(()=>{let j=Iw(m);return Array.from({length:42},(U,X)=>Ew(j,X))},[m]),C=(0,Hr.useMemo)(()=>new Map(e.map(j=>[j.seq,j])),[e]),S=(0,Hr.useMemo)(()=>cs(f),[f]),D=(0,Hr.useMemo)(()=>[...new Set(L.map(j=>j.getFullYear()))],[L]),p=Wo(D),y=(0,Hr.useMemo)(()=>{let j=new Map;for(let U of e){let X=U.due_date.slice(0,10)||(l?U.start_date.slice(0,10)||String(U.created_time??"").slice(0,10):"");if(!X)continue;let G=j.get(X);G?G.push(U):j.set(X,[U])}for(let U of j.values())U.sort($s);return j},[e,l]),v=(0,un.useSensors)((0,un.useSensor)(un.PointerSensor,{activationConstraint:{distance:5}})),w=(0,Hr.useCallback)(j=>{let U=(0,un.pointerWithin)(j),X=U.length>0?U:(0,un.rectIntersection)(j),G=X.filter(W=>String(W.id).startsWith(vc));return G.length>0?G:X.filter(W=>String(W.id).startsWith(xc))},[]),_=(0,Hr.useCallback)(j=>{P(Number(j.active.id))},[]),T=(0,Hr.useCallback)(j=>{$(j.over?String(j.over.id):null)},[]),R=(0,Hr.useMemo)(()=>{let j=new Map;for(let[U,X]of y)for(let G of X)j.set(G.seq,U);return j},[y]),F=O!==null?C.get(O)?.due_date.slice(0,10)??"":"",H=(0,Hr.useMemo)(()=>{if(O===null||!N)return null;if(N.startsWith(vc)){let j=Number(N.slice(vc.length)),U=R.get(j);if(!U)return null;let X=(y.get(U)??[]).filter(W=>W.seq!==O),G=X.findIndex(W=>W.seq===j);return{day:U,index:G===-1?X.length:G}}if(N.startsWith(xc)){let j=N.slice(xc.length),U=(y.get(j)??[]).filter(X=>X.seq!==O);return{day:j,index:U.length}}return null},[O,R,N,y]),V=(0,Hr.useCallback)(j=>{let U=y.get(j)??[];if(O===null||!H)return U;let X=C.get(O);if(!X)return U;let G=U.filter(W=>W.seq!==O);return j===H.day?[...G.slice(0,H.index),X,...G.slice(H.index)]:j===F?G:U},[O,F,H,C,y]),A=(0,Hr.useCallback)(j=>{let U=O,X=H;if(P(null),$(null),U===null||!X)return;let G=(y.get(X.day)??[]).filter(Z=>Z.seq!==U),W=[...G.slice(0,X.index).map(Z=>Z.seq),U,...G.slice(X.index).map(Z=>Z.seq)];n(U,X.day,W)},[O,H,n,y]),q=O!==null?C.get(O)??null:null,B=`${m.getFullYear()}\uB144 ${m.getMonth()+1}\uC6D4`,E=(0,Hr.useRef)(null);return(0,Ft.jsxs)(wr.Box,{onTouchStart:j=>{let U=j.touches[0];E.current=U?{x:U.clientX,y:U.clientY}:null},onTouchEnd:j=>{let U=E.current;E.current=null;let X=j.changedTouches[0];if(!U||!X||O!==null)return;let G=X.clientX-U.x,W=X.clientY-U.y;Math.abs(G)<60||Math.abs(G)<=Math.abs(W)||x(pf(m,G<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:[(0,Ft.jsxs)(wr.Box,{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:[(0,Ft.jsxs)(wr.Box,{sx:{display:"flex",alignItems:"center",gap:.25},children:[(0,Ft.jsx)(wr.IconButton,{size:"small","aria-label":"\uC774\uC804 \uB2EC",onClick:()=>x(pf(m,-1)),children:(0,Ft.jsx)(Pg.default,{sx:{fontSize:24,color:u.colors.textSecondary}})}),(0,Ft.jsx)(wr.Button,{size:"small",color:"inherit",onClick:()=>x(wc(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"}),(0,Ft.jsx)(wr.IconButton,{size:"small","aria-label":"\uB2E4\uC74C \uB2EC",onClick:()=>x(pf(m,1)),children:(0,Ft.jsx)(Ng.default,{sx:{fontSize:24,color:u.colors.textSecondary}})})]}),(0,Ft.jsxs)(wr.ButtonBase,{onClick:j=>I(j.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:[B,(0,Ft.jsx)(Lg.default,{sx:{fontSize:18,color:u.colors.textMuted}})]})]}),(0,Ft.jsx)(wr.Box,{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:Bw.map((j,U)=>(0,Ft.jsx)(wr.Box,{sx:{height:Fg,display:"flex",alignItems:"center",justifyContent:"center",fontSize:12.5,color:U===0?u.colors.danger:U===6?u.colors.accentOnSurface:u.colors.textSecondary},children:j},j))}),(0,Ft.jsx)(wr.Box,{sx:{flex:1,minHeight:0},children:(0,Ft.jsxs)(un.DndContext,{sensors:v,collisionDetection:w,onDragStart:_,onDragOver:T,onDragEnd:A,onDragCancel:()=>{P(null),$(null)},children:[(0,Ft.jsx)(jg.default,{style:{height:"100%"},thumb:{width:8},children:(0,Ft.jsx)(wr.Box,{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:L.map(j=>{let U=Zr(j);return(0,Ft.jsx)(Rw,{dayKey:U,dayNumber:j.getDate(),isToday:U===t,isOtherMonth:j.getMonth()!==m.getMonth(),weekday:j.getDay(),holidayName:p.get(U)??"",tasks:V(U),googleEvents:S.get(U)??[],statusOptions:g,previewSeq:H?.day===U?O:null,myAccountSeq:o,avatarSrcByName:s,onRequestToggleCompleted:r?z:void 0,onOpenDetail:h,onTaskContextMenu:d,onAddSchedule:c,canAdd:i,dragDisabled:a},U)})})}),(0,Ft.jsx)(un.DragOverlay,{children:q?(0,Ft.jsxs)(wr.Box,{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:Us,fontWeight:500,color:u.colors.textPrimary,cursor:"grabbing",whiteSpace:"nowrap"},children:[(0,Ft.jsx)(wr.Box,{component:"span",sx:{width:6,height:6,borderRadius:"50%",bgcolor:ff[q.priority]}}),q.title]}):null})]})}),(0,Ft.jsx)(Qt,{open:!!M,anchorEl:M?.anchorEl??null,title:M?.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:M?.nextCompleted?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>z(null),onConfirm:()=>{M&&r?.(M.taskSeq,M.nextCompleted),z(null)}}),(0,Ft.jsx)(zg.DatePicker,{anchorEl:k,open:!!k,onClose:()=>I(null),selectedDate:m,onDateChange:j=>{x(wc(j)),I(null)}})]})}var Mn=require("react"),Ar=require("@mui/material"),Wg=Y(require("@mui/icons-material/ChevronLeft"),1),Ug=Y(require("@mui/icons-material/ChevronRight"),1),Vg=Y(require("@mui/icons-material/KeyboardArrowDown"),1),Kg=require("@ehfuse/mui-datetime-picker");var Zn=require("@mui/material");var Jn=require("react/jsx-runtime");function qg({task:e,avatarSrcByName:f,onClose:g}){let l=ht(),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(0,Jn.jsx)(Zn.Dialog,{open:!!e,onClose:g,maxWidth:"xs",fullWidth:!0,slotProps:{paper:{sx:{borderRadius:2,m:2}}},children:e?(0,Jn.jsxs)(Zn.Box,{sx:{p:2,display:"flex",flexDirection:"column",gap:1.5,bgcolor:l.colors.surface},children:[(0,Jn.jsx)(Zn.Box,{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(0,Jn.jsxs)(Zn.Box,{sx:{display:"flex",alignItems:"flex-start",gap:1.5},children:[(0,Jn.jsx)(Zn.Box,{sx:{width:56,flexShrink:0,fontSize:13.5,color:l.colors.textSecondary,pt:.5},children:s.label}),(0,Jn.jsx)(Zn.Box,{sx:{display:"flex",flexWrap:"wrap",gap:1,minWidth:0},children:r.length===0?(0,Jn.jsx)(Zn.Box,{sx:{fontSize:14,color:l.colors.textMuted,pt:.5},children:"\uBE44\uC5B4 \uC788\uC74C"}):r.map(t=>(0,Jn.jsxs)(Zn.Box,{sx:{display:"flex",alignItems:"center",gap:.75},children:[(0,Jn.jsx)(po,{src:f?.get(t)??"",name:t,avatarSx:{width:26,height:26,fontSize:12},iconFontSize:16}),(0,Jn.jsx)(Zn.Box,{sx:{fontSize:14.5,color:l.colors.textPrimary},children:t})]},`${s.label}-${t}`))})]},s.label)}),(0,Jn.jsx)(Zn.Box,{sx:{display:"flex",justifyContent:"flex-end",pt:.5},children:(0,Jn.jsx)(Zn.Button,{size:"small",color:"inherit",onClick:g,children:"\uB2EB\uAE30"})})]}):null})}var cr=require("react/jsx-runtime"),Ow=["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"];function $g(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 Aw="(min-width:600px)";function gf(e){let f=new Date(e);return f.setHours(0,0,0,0),f.setDate(1),f}function Hg(e){let f=g=>String(g).padStart(2,"0");return`${e.getFullYear()}-${f(e.getMonth()+1)}-${f(e.getDate())}`}function bf({tasks:e,googleEvents:f=[],statusOptions:g,todayStr:l,onOpenDetail:o,onAddSchedule:s,myAccountSeq:r=0,avatarSrcByName:t,fallbackToStartDate:n=!1}){let c=ht(),i=(0,Ar.useMediaQuery)(Aw),[a,h]=(0,Mn.useState)(()=>gf(new Date)),[d,u]=(0,Mn.useState)(!1),b=(0,Mn.useMemo)(()=>{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:Hg(y),dayNumber:p+1,weekday:y.getDay()}})},[a]),m=(0,Mn.useMemo)(()=>{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($s);return S},[e,n]),x=(0,Mn.useMemo)(()=>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,I]=(0,Mn.useState)(null),M=(0,Mn.useMemo)(()=>cs(f),[f]),z=(0,Mn.useMemo)(()=>[a.getFullYear()],[a]),O=Wo(z),P=(0,Mn.useRef)(null),N=l.slice(0,7)===Hg(a).slice(0,7);(0,Mn.useEffect)(()=>{if(!N)return;let S=()=>{let y=P.current,v=$g(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 $=(0,Mn.useRef)(null),L=(0,Mn.useRef)(null),C=S=>{h(p=>new Date(p.getFullYear(),p.getMonth()+S,1));let D=$g($.current);D&&D.scrollTo({top:0,behavior:"auto"})};return(0,cr.jsxs)(Ar.Box,{ref:$,onTouchStart:S=>{let D=S.touches[0];L.current=D?{x:D.clientX,y:D.clientY}:null},onTouchEnd:S=>{let D=L.current;L.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)||C(y<0?1:-1)},sx:{minWidth:0,maxWidth:"100%",overflow:"hidden",bgcolor:c.colors.surface},children:[(0,cr.jsxs)(Ar.Box,{sx:{display:"flex",alignItems:"center",gap:.5,px:1.5,py:1,flexShrink:0},children:[(0,cr.jsx)(Ar.IconButton,{size:"small","aria-label":"\uC774\uC804 \uB2EC",onClick:()=>C(-1),children:(0,cr.jsx)(Wg.default,{sx:{fontSize:24,color:c.colors.textSecondary}})}),(0,cr.jsx)(Ar.Button,{size:"small",color:"inherit",onClick:()=>h(gf(new Date)),sx:{minWidth:0,px:1,fontSize:15.5,color:c.mode==="dark"?c.colors.textStrong:c.colors.textPrimary},children:"\uC624\uB298"}),(0,cr.jsx)(Ar.IconButton,{size:"small","aria-label":"\uB2E4\uC74C \uB2EC",onClick:()=>C(1),children:(0,cr.jsx)(Ug.default,{sx:{fontSize:24,color:c.colors.textSecondary}})}),(0,cr.jsxs)(Ar.Box,{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",(0,cr.jsx)(Vg.default,{sx:{fontSize:20,color:c.colors.textMuted}})]})]}),(0,cr.jsxs)(Ar.Box,{sx:{minWidth:0,overflowX:"hidden",borderTop:`1px solid ${c.calendar.borderColor}`},children:[x.length>0?(0,cr.jsxs)(Ar.Box,{sx:{display:"flex",alignItems:"center",gap:1,px:1,py:.75,minWidth:0,maxWidth:"100%",flexShrink:0,borderBottom:`1px solid ${c.calendar.borderColor}`},children:[(0,cr.jsxs)(Ar.Box,{sx:{width:52,flexShrink:0,fontSize:12.5,lineHeight:1.3,color:c.colors.textSecondary,textAlign:"center"},children:["\uB0A0\uC9DC",(0,cr.jsx)("br",{}),"\uC5C6\uC74C"]}),(0,cr.jsx)(Ar.Box,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",gap:.5},children:x.map(S=>(0,cr.jsx)(Ei,{task:S,statusOptions:g,onOpenDetail:o,isMine:r>0&&Number(S.manager_account_seq??0)===r,avatarSrcByName:t,showManagerAvatar:!0,onOpenMembers:I},S.seq))})]}):null,b.map(({ymd:S,dayNumber:D,weekday:p})=>{let y=O.get(S)??"",v=S===l,w=!!y||p===0,_=m.get(S)??[],T=M.get(S)??[],R=_.length>0||T.length>0;return(0,cr.jsxs)(Ar.Box,{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:R?.75:.5,minHeight:44,flexShrink:0,borderBottom:`1px solid ${c.calendar.borderColor}`,...s?{cursor:"pointer"}:{}},children:[(0,cr.jsx)(Ar.Box,{sx:{width:52,flexShrink:0,display:"flex",flexDirection:"column",alignItems:"center",gap:.25},children:(0,cr.jsxs)(Ar.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:.25,"@media (min-width:600px)":{flexDirection:"row",gap:.75}},children:[(0,cr.jsx)(Ar.Box,{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}),(0,cr.jsx)(Ar.Box,{component:"span",sx:{fontSize:13,color:w?c.colors.danger:p===6?c.colors.accentOnSurface:c.colors.textSecondary},children:Ow[p]})]})}),(0,cr.jsxs)(Ar.Box,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",gap:.5},children:[T.map(F=>(0,cr.jsx)(us,{event:F},F.uid)),_.map(F=>{let H=qs(F),V=(0,cr.jsx)(Ei,{task:F,statusOptions:g,onOpenDetail:o,isMine:r>0&&Number(F.manager_account_seq??0)===r,avatarSrcByName:t,showManagerAvatar:!0,onOpenMembers:I,showTime:!i,wrapTitle:!0},F.seq);return i?(0,cr.jsxs)(Ar.Box,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[(0,cr.jsx)(Ar.Box,{component:"span",sx:{width:44,flexShrink:0,textAlign:"right",fontSize:13.5,fontWeight:400,opacity:1,color:H?F.completed?c.colors.textPrimary:c.colors.danger:"transparent"},children:H||"00:00"}),(0,cr.jsx)(Ar.Box,{sx:{flex:1,minWidth:0},children:V})]},F.seq):V})]})]},S)})]}),(0,cr.jsx)(qg,{task:k,avatarSrcByName:t,onClose:()=>I(null)}),(0,cr.jsx)(Kg.DatePicker,{open:d,centered:!0,monthOnly:!0,onClose:()=>u(!1),selectedDate:a,onDateChange:S=>{h(gf(S)),u(!1)}})]})}var en=require("react"),Tr=require("@mui/material"),Xg=Y(require("@ehfuse/overlay-scrollbar"),1),Zg=Y(require("@mui/icons-material/CheckCircle"),1),Jg=Y(require("@mui/icons-material/RadioButtonUnchecked"),1),Vo=require("@dnd-kit/core"),Ri=require("@dnd-kit/sortable");var Qg=Y(require("@mui/icons-material/DragIndicator"),1);var Gt=require("react/jsx-runtime"),yf=36,Dw=48,Gg=40,Pw=24,Nw=4,Lw=14,Yg=36,zw=12.5,Vs=220,jw={high:{bg:"#f6c6c9",border:"#e5484d"},medium:{bg:"#c5d8f6",border:"#2f80ed"},low:{bg:"#f3e3b6",border:"#d9a514"}};function fs(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 _c(e,f){let g=new Date(e);return g.setDate(g.getDate()+f),g}function xf(e,f){return Math.round((f.getTime()-e.getTime())/864e5)}function Fw({task:e,dragHandle:f,onPointerDown:g,onClick:l}){let o=ht(),s=(0,en.useRef)(null),[r,t]=(0,en.useState)("");return(0,Gt.jsx)(Tr.Tooltip,{title:r,arrow:!0,enterDelay:300,children:(0,Gt.jsxs)(Tr.Box,{onPointerDown:g,onClick:n=>l(e,n),onMouseEnter:()=>{let n=s.current;t(n&&n.scrollWidth>n.clientWidth?e.title:"")},sx:{width:Vs,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,(0,Gt.jsx)(Tr.Box,{ref:s,component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.title})]})})}function qw({id:e,showIndicator:f,children:g}){let l=ht(),{attributes:o,listeners:s,setNodeRef:r}=(0,Ri.useSortable)({id:e});return(0,Gt.jsxs)(Tr.Box,{ref:r,sx:{position:"relative"},children:[f?(0,Gt.jsx)(Tr.Box,{sx:{position:"absolute",top:-1,left:0,right:0,height:2,bgcolor:l.colors.accentOnSurface,zIndex:5}}):null,g({...o,...s})]})}function vf({tasks:e,hideCompletedChecklist:f=!1,todayStr:g,onOpenDetail:l,onToggleChecklist:o,onReorderTasks:s,onTaskContextMenu:r}){let t=ht(),[n,c]=(0,en.useState)(null),i=(0,en.useMemo)(()=>[...e].sort((v,w)=>{let _=(v.timeline_sort_no??0)>0,T=(w.timeline_sort_no??0)>0;if(_&&T)return(v.timeline_sort_no??0)-(w.timeline_sort_no??0);if(_!==T)return _?-1:1;let R=v.due_date||v.start_date,F=w.due_date||w.start_date;return R!==F?R<F?-1:1:v.seq-w.seq}),[e]),[a,h]=(0,en.useState)(null),[d,u]=(0,en.useState)(null),b=(0,Vo.useSensors)((0,Vo.useSensor)(Vo.PointerSensor,{activationConstraint:{distance:4}})),m=(0,en.useCallback)(v=>{h(v.over?Number(v.over.id):null)},[]),x=(0,en.useCallback)(v=>{h(null),u(null);let{active:w,over:_}=v;if(!_||w.id===_.id)return;let T=i.map(H=>H.seq),R=T.indexOf(Number(w.id)),F=T.indexOf(Number(_.id));R===-1||F===-1||s((0,Ri.arrayMove)(T,R,F))},[i,s]),k=(0,en.useMemo)(()=>{let v=fs(g)??new Date,w=v,_=_c(v,21);for(let F of i){let H=fs(F.start_date)??fs(F.due_date),V=fs(F.due_date)??H;H&&H<w&&(w=H),V&&V>_&&(_=V)}let T=_c(w,-3),R=xf(T,_c(_,3))+1;return Array.from({length:R},(F,H)=>_c(T,H))},[i,g]),I=k[0],M=k.findIndex(v=>Zr(v)===g),{dayWidths:z,dayOffsets:O,gridWidth:P}=(0,en.useMemo)(()=>{let v=k.map((T,R)=>T.getDate()===1||R===0?Dw:yf),w=[],_=0;for(let T of v)w.push(_),_+=T;return{dayWidths:v,dayOffsets:w,gridWidth:_}},[k]),N=Vs+P,$=(0,en.useRef)(null),L=v=>{$.current={x:v.clientX,y:v.clientY}},C=(v,w)=>{let _=$.current;$.current=null,!(_&&(Math.abs(w.clientX-_.x)>5||Math.abs(w.clientY-_.y)>5))&&l(v)},S=(0,en.useRef)(null),[D,p]=(0,en.useState)(!1);(0,en.useEffect)(()=>{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=(0,en.useRef)(!1);return(0,en.useEffect)(()=>{if(i.length===0||y.current)return;y.current=!0;let v=window.requestAnimationFrame(()=>{let w=S.current?.getScrollContainer();!w||M<0||(w.scrollLeft=Math.max(0,O[M]-yf*3))});return()=>window.cancelAnimationFrame(v)},[i.length]),(0,Gt.jsxs)(Tr.Box,{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:[(0,Gt.jsx)(Tr.Box,{sx:{flex:1,minHeight:0,minWidth:0,contain:"inline-size"},children:(0,Gt.jsx)(Xg.default,{ref:S,style:{height:"100%"},contentStyle:{width:"max-content",minWidth:"100%"},thumb:{width:8},showHorizontalScrollbar:!0,dragScroll:{excludeClasses:["taskbox-timeline-handle"]},children:(0,Gt.jsxs)(Tr.Box,{sx:{width:N,position:"relative",bgcolor:t.timeline.bg},children:[(0,Gt.jsxs)(Tr.Box,{sx:{display:"flex",position:"sticky",top:0,zIndex:3,bgcolor:t.timeline.headerBg,borderBottom:`1px solid ${t.timeline.gridColor}`},children:[(0,Gt.jsx)(Tr.Box,{sx:{width:Vs,height:Yg,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(),T=w===M,R=v.getDate()===1||w===0;return(0,Gt.jsx)(Tr.Box,{sx:{width:z[w],height:Yg,flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",fontSize:zw,fontWeight:T&&t.mode!=="dark"?700:400,color:T?t.timeline.bg:_===0?t.colors.danger:_===6?t.colors.accentOnSurface:t.colors.textSecondary,bgcolor:T?t.colors.danger:"transparent",borderRight:`1px solid ${t.timeline.gridColor}`,whiteSpace:"nowrap"},children:R?`${v.getMonth()+1}/${v.getDate()}`:v.getDate()},Zr(v))})]}),(0,Gt.jsx)(Vo.DndContext,{sensors:b,collisionDetection:Vo.closestCenter,onDragStart:v=>u(Number(v.active.id)),onDragOver:m,onDragEnd:x,onDragCancel:()=>{h(null),u(null)},children:(0,Gt.jsx)(Ri.SortableContext,{items:i.map(v=>String(v.seq)),strategy:Ri.verticalListSortingStrategy,children:(0,Gt.jsxs)(Tr.Box,{sx:{position:"relative"},children:[k.map((v,w)=>{let _=v.getDay(),T=w===M;return!T&&_!==0&&_!==6?null:(0,Gt.jsx)(Tr.Box,{sx:{position:"absolute",top:0,bottom:0,left:Vs+O[w],width:z[w],bgcolor:T?"rgba(229,72,77,0.07)":t.colors.surfaceSubtle,zIndex:0}},`stripe-${Zr(v)}`)}),i.map((v,w)=>{let _=fs(v.start_date)??fs(v.due_date),T=fs(v.due_date)??_,R=_?Math.min(k.length-1,Math.max(0,xf(I,_))):0,F=T?Math.min(k.length-1,Math.max(R,xf(I,T))):R,H=jw[v.priority],V=Vs+O[R]+2,A=O[F]+z[F]-O[R]-4,q=(v.checklist??[]).map((B,E)=>({entry:B,index:E})).filter(({entry:B})=>!f||!B.checked);return(0,Gt.jsx)(qw,{id:String(v.seq),showIndicator:a===v.seq&&d!==v.seq,children:B=>(0,Gt.jsxs)(Tr.Box,{sx:{borderBottom:w===i.length-1&&D?"none":`1px solid ${t.timeline.gridColor}`,position:"relative",zIndex:1,opacity:d===v.seq?.45:1},children:[(0,Gt.jsxs)(Tr.Box,{onContextMenu:E=>r(v,E),sx:{display:"flex",height:Gg,position:"relative","&:hover":{bgcolor:"rgba(47,128,237,0.04)"}},children:[(0,Gt.jsx)(Fw,{task:v,dragHandle:(0,Gt.jsx)(Tr.Box,{component:"span",className:"taskbox-timeline-handle",...B,onClick:E=>E.stopPropagation(),sx:{display:"inline-flex",alignItems:"center",flexShrink:0,color:t.colors.accentOnSurface,cursor:"grab",touchAction:"none","&:hover":{color:t.colors.accentOnSurface}},children:(()=>{let E=(v.is_notice||v.is_event?$t(v.icon||(v.is_notice?$r:Yr)):null)??Qg.default;return(0,Gt.jsx)(E,{sx:{fontSize:17}})})()}),onPointerDown:L,onClick:C}),(0,Gt.jsx)(Tr.Tooltip,{title:`${v.title} (${v.start_date||"?"} ~ ${v.due_date||"?"})`,arrow:!0,enterDelay:300,children:(0,Gt.jsx)(Tr.Box,{onPointerDown:L,onClick:E=>C(v,E),sx:{position:"absolute",top:(Gg-20)/2,left:V,width:Math.max(yf-4,A),height:20,borderRadius:1,bgcolor:H.bg,border:`1px solid ${H.border}`,opacity:v.completed?.45:1,cursor:"pointer","&:hover":{filter:"brightness(0.95)"}}})})]}),q.map(({entry:E,index:j},U)=>(0,Gt.jsx)(Tr.Box,{sx:{display:"flex",height:Pw,position:"relative",mt:U===0?`${Nw}px`:0,mb:U===q.length-1?`${Lw}px`:0},children:(0,Gt.jsx)(Tr.Box,{sx:{width:Vs,flexShrink:0,position:"sticky",left:0,zIndex:2,bgcolor:t.timeline.bg,borderRight:`1px solid ${t.timeline.gridColor}`,display:"flex",alignItems:"center",pl:4.25,pr:1.5,fontSize:13,color:E.checked?t.colors.textMuted:t.colors.textPrimary},children:(0,Gt.jsxs)(Tr.Box,{onClick:X=>c({anchorEl:X.currentTarget,taskSeq:v.seq,index:j,checked:!E.checked}),sx:{display:"inline-flex",alignItems:"center",gap:.75,minWidth:0,cursor:"pointer"},children:[E.checked?(0,Gt.jsx)(Zg.default,{sx:{fontSize:17,color:t.colors.accentOnSurface,flexShrink:0}}):(0,Gt.jsx)(Jg.default,{sx:{fontSize:17,color:t.colors.textMuted,flexShrink:0}}),(0,Gt.jsx)(Tr.Box,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",textDecoration:E.checked?"line-through":"none"},children:E.label})]})})},`${v.seq}-check-${j}`))]})},v.seq)}),i.length===0?(0,Gt.jsx)(Tr.Box,{sx:{py:8,textAlign:"center",color:t.colors.textMuted,fontSize:14},children:"\uD45C\uC2DC\uD560 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):null]})})})]})})}),(0,Gt.jsx)(Qt,{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)}})]})}var Oi=require("react/jsx-runtime");function $w(e){switch(e.view){case"card":case"kanban":{let{view:f,...g}=e;return(0,Oi.jsx)(gc,{...g,columnAxis:f==="kanban"?"status":"project"})}case"sprint":{let{view:f,...g}=e;return(0,Oi.jsx)(gc,{...g,columnAxis:"sprint"})}case"calendar":{let{view:f,...g}=e;return(0,Oi.jsx)(hf,{...g})}case"month":{let{view:f,...g}=e;return(0,Oi.jsx)(mf,{...g})}case"agenda":{let{view:f,...g}=e;return(0,Oi.jsx)(bf,{...g})}case"timeline":{let{view:f,...g}=e;return(0,Oi.jsx)(vf,{...g})}default:{let{view:f,...g}=e;return(0,Oi.jsx)(Xu,{...g})}}}var Hw=["list","card","kanban","calendar","month","timeline"];var Qn=require("@mui/material");var tn=require("react/jsx-runtime");function wf(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 _f({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=ht(),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?(0,tn.jsx)(Qn.Box,{sx:{flex:c?"0 0 110px":"1 1 auto",minWidth:0,height:i.summary.gaugeHeight,borderRadius:3,bgcolor:i.summary.gaugeTrackColor},children:(0,tn.jsx)(Qn.Box,{sx:{height:"100%",borderRadius:3,width:`${d}%`,bgcolor:d>=100?i.summary.gaugeCompleteColor:i.summary.gaugeBarColor,transition:"width 0.2s"}})}):null,x=g?(0,tn.jsxs)(Qn.Box,{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},I=a.length-h,M=(0,tn.jsxs)(tn.Fragment,{children:[c?null:(0,tn.jsxs)("span",{children:["\uB0A8\uC740 ",(0,tn.jsx)(Qn.Box,{component:"span",sx:k,children:I}),"\uAC74"]}),t&&u>0?(0,tn.jsxs)(Qn.Box,{component:"span",sx:{color:i.summary.overdueColor,fontWeight:600},children:["\uC9C0\uC5F0"," ",(0,tn.jsx)(Qn.Box,{component:"span",sx:{fontWeight:700,fontSize:c?15:14},children:u}),"\uAC74"]}):null,s&&b>0?(0,tn.jsxs)("span",{children:[(0,tn.jsx)(Qn.Box,{component:"span",sx:k,children:b}),"SP"]}):null]}),z=typeof o=="number"&&Number.isFinite(o)?(0,tn.jsxs)("span",{children:["\uADFC\uBB34\uC77C ",(0,tn.jsx)(Qn.Box,{component:"span",sx:k,children:o}),"\uC77C"]}):null,O=typeof l=="number"&&Number.isFinite(l)?(0,tn.jsx)(Qn.Box,{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?(0,tn.jsxs)(Qn.Box,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0,fontSize:14.5,color:i.summary.textColor,whiteSpace:"nowrap",...i.summary.sx},children:[n?M:null,n?z:null,n?O:null,m,x]}):(0,tn.jsxs)(Qn.Box,{sx:{display:"flex",flexDirection:"column",gap:.5},children:[g?(0,tn.jsxs)(Qn.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[m,x]}):null,(0,tn.jsxs)(Qn.Box,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,fontSize:13.5,color:i.summary.textColor},children:[M,z,O]})]})}var tb=require("react");function eb(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 Ww(e){let f=Math.round(e*10)/10;return`${f%1===0?f.toFixed(0):f.toFixed(1)}\uC2DC\uAC04`}function kf(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 Uw(e){return e.reduce((f,g)=>g.completed?f:f+eb(g.estimated_time),0)}var rb=require("react/jsx-runtime");function Vw({sprint:e,tasks:f,todayStr:g,...l}){let o=e.status==="closed"?null:wf(e.end_date,g),s=o!==null&&o>=0,r=(0,tb.useMemo)(()=>{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=Wo(r),n=s?kf(g,e.end_date,new Set(t.keys())):null;return(0,rb.jsx)(_f,{tasks:f,todayStr:g,dday:o,workdaysLeft:n,...l})}var Gs=require("react"),Sc=require("@mui/material");var ob=require("react"),Ks=require("@mui/material"),Ha=require("react/jsx-runtime"),nb={xs:2,md:3};function ib(){return(0,Ha.jsx)(Ks.Box,{sx:{position:"fixed",top:"calc(50% + 30px)",left:"50%",transform:"translate(-50%, -50%)",zIndex:1},children:(0,Ha.jsx)(Ks.CircularProgress,{size:44,thickness:4,sx:{color:"#94a3b8"}})})}function sb({children:e}){return(0,Ha.jsx)(Ks.Box,{sx:{minWidth:0,display:"flex",flexDirection:"column",gap:nb,pb:nb},children:ob.Children.map(e,f=>f==null||f===!1?null:(0,Ha.jsx)(Ks.Box,{sx:{bgcolor:"background.paper",borderRadius:"12px",boxShadow:"0 1px 3px rgba(15,23,42,0.08)",minWidth:0},children:f}))})}var ab=require("react"),Dr=require("@mui/material"),Sf=Y(require("@mui/icons-material/CheckCircle"),1),lb=Y(require("@mui/icons-material/CheckCircleOutlineOutlined"),1);var Wa=require("react/jsx-runtime"),Kw="taskbox-search-highlight";function Gw(e,f){let g=f?.keyPrefix??"hl";return e.map((l,o)=>(0,Wa.jsx)("span",{className:l.highlight?f?.highlightClassName??Kw:f?.className,style:l.highlight?{fontWeight:700,color:"#2563eb"}:void 0,children:l.text},`${g}-${l.text}-${o}`))}function kc({text:e,keyword:f,fallback:g="-",className:l,highlightClassName:o,keyPrefix:s}){let r=String(e??"").trim()||g,t=tc(r,f);return(0,Wa.jsx)(Wa.Fragment,{children:Gw(t,{className:l,highlightClassName:o,keyPrefix:s})})}var kt=require("react/jsx-runtime"),Yw={flexShrink:0,minWidth:64,textAlign:"center",px:.75,py:.35,borderRadius:.75,bgcolor:"#f1f5f9",color:"#64748b",fontSize:mn(12.5),fontWeight:500,lineHeight:1.4},pi={fontSize:mn(14.5),color:"#374151",minWidth:0,lineHeight:1.45};function Mo({label:e,children:f}){return(0,kt.jsxs)(Dr.Box,{sx:{display:"flex",alignItems:"flex-start",gap:1,minWidth:0},children:[(0,kt.jsx)(Dr.Box,{sx:Yw,children:e}),(0,kt.jsx)(Dr.Box,{sx:{...pi,flex:1,pt:.2},children:f})]})}function cb({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?As(e):Xr(e),k=String(e.due_date??"").slice(11,16),I=e.is_event?String(e.event_time??"").trim():/^\d{2}:\d{2}$/.test(k)?k:String(e.estimated_time??"").trim(),M=oo(e.start_date),z=oo(e.due_date),O=M&&I&&!z?`${M} ${I}`:M,P=z&&I?`${z} ${I}`:z,N=ct(),$=!e.is_notice&&e.completed&&!!e.review_pending&&!!N.onReviewDone&&(N.myAccountSeq??0)>0&&(e.author_account_seq??0)===(N.myAccountSeq??0),[L,C]=(0,ab.useState)(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(0,kt.jsxs)(Dr.Box,{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?(0,kt.jsx)(Dr.Box,{sx:{position:"absolute",left:3,top:5,bottom:5,width:3,borderRadius:"999px",bgcolor:"#2f80ed"}}):null,(0,kt.jsxs)(Dr.Box,{sx:{display:"flex",alignItems:"flex-start",gap:.75,minWidth:0,mb:1},children:[e.is_event?(()=>{let y=$t(e.icon||Yr);return y?(0,kt.jsx)(y,{sx:{fontSize:21,flexShrink:0,mt:.2,color:e.icon_color||"#1e3a8a"}}):null})():!d&&!a?(0,kt.jsx)(Dr.Checkbox,{checked:e.completed,icon:(0,kt.jsx)(lb.default,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:(0,kt.jsx)(Sf.default,{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=$t(e.icon||$r);return y?(0,kt.jsx)(y,{sx:{fontSize:19,flexShrink:0,mt:"1px",color:e.icon_color||"#e5484d"}}):null})(),(0,kt.jsx)(Dr.Typography,{sx:{fontSize:mn(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:(0,kt.jsx)(kc,{text:e.title,keyword:l})}),h&&!e.completed?(0,kt.jsx)(Dr.Box,{component:"span",sx:{flexShrink:0,px:.55,fontSize:mn(10.5),fontWeight:700,lineHeight:1.6,color:"#fff",bgcolor:"#e5484d",borderRadius:"4px"},children:"N"}):null]}),(0,kt.jsxs)(Dr.Box,{sx:{display:"flex",flexDirection:"column",gap:.6,minWidth:0},children:[(0,kt.jsx)(Mo,{label:x?"\uC0C1\uD0DC":"\uC911\uC694\uB3C4",children:(0,kt.jsxs)(Dr.Box,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1.25},children:[x?(0,kt.jsx)(ir,{option:x,small:!0}):null,(0,kt.jsx)(Tn,{priority:e.priority,small:!0})]})}),(e.label_keys??[]).length>0?(0,kt.jsx)(Mo,{label:"\uB77C\uBCA8",children:(0,kt.jsx)(ci,{labelKeys:e.label_keys,labelOptions:f})}):null,g?(0,kt.jsx)(Mo,{label:"\uD504\uB85C\uC81D\uD2B8",children:(0,kt.jsx)(Dr.Typography,{sx:pi,children:g})}):null,O?(0,kt.jsx)(Mo,{label:"\uC2DC\uC791",children:(0,kt.jsx)(Dr.Typography,{sx:pi,children:O})}):null,P?(0,kt.jsx)(Mo,{label:"\uB9C8\uAC10",children:(0,kt.jsxs)(Dr.Typography,{sx:{...pi,color:D?"#e5484d":pi.color,fontWeight:D?600:400},children:[P,D?" \xB7 \uC9C0\uC5F0":""]})}):null,$?(0,kt.jsxs)(Mo,{label:"\uAC80\uC218",children:[(0,kt.jsx)(Dr.Button,{size:"small",variant:"contained",disableElevation:!0,onClick:y=>{y.stopPropagation(),C(y.currentTarget)},sx:{...os,py:0,fontSize:mn(13)},children:"\uAC80\uC218\uC644\uB8CC"}),(0,kt.jsx)(Ns,{anchorEl:L,onCancel:()=>C(null),onConfirm:()=>{N.onReviewDone?.(e),C(null)}})]}):null,e.is_notice?(0,kt.jsx)(Mo,{label:"\uB300\uC0C1\uC790",children:(0,kt.jsx)(Dr.Typography,{sx:pi,children:c||"\uBAA8\uB4E0 \uC9C1\uC6D0"})}):null,i?(0,kt.jsx)(Mo,{label:"\uD655\uC778",children:(0,kt.jsx)(Dr.Button,{size:"small",variant:i.canAck?"contained":"outlined",color:"inherit",startIcon:i.acked?(0,kt.jsx)(Sf.default,{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:mn(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?(0,kt.jsx)(Mo,{label:"\uCC45\uC784\uC790",children:(0,kt.jsx)(Dr.Typography,{sx:pi,children:(0,kt.jsx)(kc,{text:e.manager_name,keyword:l})})}):null,!e.is_notice&&p.length>0?(0,kt.jsx)(Mo,{label:"\uCC38\uC870\uC790",children:(0,kt.jsx)(Dr.Typography,{sx:pi,children:p.join(", ")})}):null,e.note?(0,kt.jsx)(Mo,{label:"\uBE44\uACE0",children:(0,kt.jsx)(Dr.Typography,{sx:pi,children:(0,kt.jsx)(kc,{text:e.note,keyword:l})})}):null]})]})}var mi=require("react/jsx-runtime");function Xw(e,f){if(e.completed||e.archived||f<=0)return;let g=ls(e,f);if(g.canConfirm)return{count:g.count,total:g.total,acked:!1,canAck:!0,pendingNames:g.pendingNames}}function Zw({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 I=new Map(g.map($=>[$.key,$.label])),[M,z]=(0,Gs.useState)(null),{onReturnTask:O}=ct(),P=M?e.find($=>$.seq===M.taskSeq):void 0,N=(0,Gs.useRef)(null);return(0,Gs.useEffect)(()=>{let $=N.current;if(!x||!$)return;let L=new IntersectionObserver(C=>{C[0]?.isIntersecting&&x()});return L.observe($),()=>L.disconnect()},[x,e.length]),e.length===0?l?(0,mi.jsx)(ib,{}):(0,mi.jsx)(Sc.Box,{sx:{py:6,textAlign:"center",color:"#94a3b8",fontSize:"0.9rem"},children:"\uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):(0,mi.jsxs)(Sc.Box,{sx:{minWidth:0},children:[(0,mi.jsx)(sb,{children:e.map($=>(0,mi.jsx)(cb,{dimCompleted:o,myManaged:k>0&&!$.is_notice&&!$.is_event&&($.manager_account_seq??0)===k,task:$,statusOptions:f,projectLabel:$.tab_key?I.get($.tab_key)??"":"",searchText:s,todayStr:r,onRequestToggleCompleted:z,onOpenDetail:n,onTaskContextMenu:c,targetSummary:$.is_notice?i?.($):void 0,ackInfo:$.is_notice?a?.($):Xw($,k),noticeReadOnly:$.is_notice?h?.($):!1,unread:d?.($)??!1,completeLocked:u?.($)??!1,onAckConfirm:b,onAckListClick:m},$.seq))}),x?(0,mi.jsx)(Sc.Box,{ref:N,sx:{height:"1px"}}):null,(0,mi.jsx)(Kn,{open:!!M,anchorEl:M?.anchorEl??null,nextCompleted:M?.nextCompleted??!1,returnMode:!!O&&!!(P&&Vn(P,k)),onCancel:()=>z(null),onConfirm:$=>{M&&($&&O&&P?O(P,$):t(M.taskSeq,M.nextCompleted)),z(null)}})]})}var Ys=require("react"),tr=require("@mui/material"),fb=Y(require("@mui/icons-material/CheckCircle"),1),db=Y(require("@mui/icons-material/CheckCircleOutlineOutlined"),1),hb=Y(require("@mui/icons-material/NotesOutlined"),1),pb=Y(require("@mui/icons-material/AutorenewOutlined"),1),mb=Y(require("@mui/icons-material/CalendarTodayOutlined"),1),gb=Y(require("@mui/icons-material/EventOutlined"),1),bb=Y(require("@mui/icons-material/PersonOutlineOutlined"),1),yb=Y(require("@mui/icons-material/PeopleAltOutlined"),1),xb=Y(require("@mui/icons-material/StickyNote2Outlined"),1);var bt=require("react/jsx-runtime"),Tf={completed:{label:"\uC644\uB8CC",width:"44px",align:"center",icon:null},title:{label:"\uC81C\uBAA9",width:"1fr",align:"left",icon:(0,bt.jsx)(hb.default,{sx:{fontSize:15}})},manager_name:{label:"\uCC45\uC784\uC790",width:"112px",align:"center",icon:(0,bt.jsx)(bb.default,{sx:{fontSize:15}})},receiver_names:{label:"\uCC38\uC870\uC790",width:"120px",align:"center",icon:(0,bt.jsx)(yb.default,{sx:{fontSize:15}})},status:{label:"\uC0C1\uD0DC",width:"104px",align:"center",icon:(0,bt.jsx)(pb.default,{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:(0,bt.jsx)(mb.default,{sx:{fontSize:15}})},due_date:{label:"\uB9C8\uAC10\uC608\uC815",width:"110px",align:"center",icon:(0,bt.jsx)(gb.default,{sx:{fontSize:15}})},note:{label:"\uBE44\uACE0",width:"1fr",align:"left",icon:(0,bt.jsx)(xb.default,{sx:{fontSize:15}})}},vb=[{id:"completed"},{id:"title"},{id:"manager_name"},{id:"due_date"},{id:"status"}],Jw=new Set(["manager_name","status","due_date"]);function ub(e){let f=String(e??"").trim();return f?f.slice(2,10).replaceAll("-","."):""}function Qw(e,f){return f>0?e.filter(g=>!g.is_notice&&!g.completed&&!g.archived&&ho(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 e_({tasks:e,columns:f=vb,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=ht(),[m,x]=(0,Ys.useState)(null),[k,I]=(0,Ys.useState)(null),[M,z]=(0,Ys.useState)(null),[O,P]=(0,Ys.useState)(null),{onReturnTask:N}=ct(),[$,L]=(0,Ys.useState)(null),C=f.map(p=>p.width??Tf[p.id].width).join(" "),S=(p,y)=>(0,bt.jsx)(po,{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=Tf[p.id].align==="center";switch(p.id){case"completed":if(y.is_event){let _=$t(y.icon||Yr);return(0,bt.jsx)(tr.Box,{className:"cell",sx:{justifyContent:"center"},children:_?(0,bt.jsx)(_,{sx:{fontSize:19,color:y.icon_color||"#1e3a8a"}}):null},p.id)}return(0,bt.jsx)(tr.Box,{className:"cell",sx:{justifyContent:"center",...c?{"&:hover":{bgcolor:b.table.cellHoverBg}}:{}},children:(0,bt.jsx)(tr.Tooltip,{title:y.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC",arrow:!0,enterDelay:300,disableInteractive:!0,children:(0,bt.jsx)(tr.Checkbox,{checked:!!y.completed,icon:(0,bt.jsx)(db.default,{sx:{fontSize:20,color:"#9a9a97",opacity:.45}}),checkedIcon:(0,bt.jsx)(fb.default,{sx:{fontSize:20,color:"#2f80ed"}}),onChange:_=>P({anchorEl:_.currentTarget,task:y}),sx:{p:.5}})})},p.id);case"title":{let _=y.is_notice?$t(y.icon||$r):null,T=y.icon_color||"#e5484d";return(0,bt.jsxs)(tr.Box,{className:"cell",onClick:()=>n(y),sx:{gap:1,cursor:"pointer","&:hover":{bgcolor:b.table.cellHoverBg}},children:[_?(0,bt.jsx)(_,{sx:{fontSize:18,flexShrink:0,color:T}}):null,(0,bt.jsx)(tr.Box,{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,T=o>0&&Number(y.manager_account_seq??0)===o;return _&&d?(0,bt.jsxs)(tr.Box,{className:"cell",onClick:R=>z({anchorEl:R.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,(0,bt.jsx)(tr.Box,{component:"span",sx:{fontSize:14,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:y.manager_name||""})]},p.id):(0,bt.jsx)(tr.Box,{className:"cell",sx:{gap:.75,justifyContent:"center"},children:y.manager_name?(0,bt.jsxs)(bt.Fragment,{children:[S(y.manager_name,22),(0,bt.jsx)(tr.Box,{component:"span",sx:{fontSize:14,fontWeight:T?600:400,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:y.manager_name})]}):u?(0,bt.jsx)(Co,{onClick:R=>L({anchorEl:R.currentTarget,taskSeq:Number(y.seq)}),children:"\uAC00\uC838\uAC00\uAE30"}):null},p.id)}case"receiver_names":return(0,bt.jsx)(tr.Box,{className:"cell",sx:{justifyContent:"center",fontSize:14,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:(y.receiver_names??[]).join(", ")},p.id);case"status":return(0,bt.jsx)(tr.Box,{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:(0,bt.jsx)(ir,{option:Xr(y)})},p.id);case"priority":return(0,bt.jsx)(tr.Box,{className:"cell",sx:{justifyContent:"center"},children:(0,bt.jsx)(Tn,{priority:y.priority,plain:!0})},p.id);case"start_date":return(0,bt.jsx)(tr.Box,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap",fontSize:14},children:ub(y.start_date)},p.id);case"due_date":return(0,bt.jsx)(tr.Box,{className:"cell",onClick:a?_=>I({anchorEl:_.currentTarget,taskSeq:Number(y.seq),date:String(y.due_date??"").slice(0,10),reminders:Bo(y)}):void 0,sx:{justifyContent:"center",whiteSpace:"nowrap",fontSize:14,...a?{cursor:"pointer","&:hover":{bgcolor:b.table.cellHoverBg}}:{}},children:ub(y.due_date)},p.id);case"note":return(0,bt.jsx)(tr.Box,{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(0,bt.jsxs)(tr.Box,{sx:{border:`1px solid ${b.table.borderColor}`,borderRadius:1,overflow:"hidden",bgcolor:b.table.bg,color:b.table.rowColor},children:[(0,bt.jsx)(tr.Box,{sx:{display:"grid",gridTemplateColumns:C,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=Tf[p.id];return(0,bt.jsxs)(tr.Box,{sx:{justifyContent:y.align==="center"?"center":"flex-start",color:Jw.has(p.id)?b.table.headerActiveColor:b.table.headerColor},children:[y.icon,p.label??y.label]},p.id)})}),g?(0,bt.jsx)(tr.Box,{sx:{py:3,textAlign:"center",color:b.table.emptyColor,fontSize:14},children:"\uBD88\uB7EC\uC624\uB294 \uC911\u2026"}):e.length===0?(0,bt.jsx)(tr.Box,{sx:{py:3,textAlign:"center",color:b.table.emptyColor,fontSize:14},children:l}):e.map((p,y)=>(0,bt.jsx)(tr.Box,{sx:{display:"grid",gridTemplateColumns:C,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)),(0,bt.jsx)(rs,{anchorEl:m?.anchorEl??null,value:String(m?.task.status??""),options:m?va(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)}),(0,bt.jsxs)(tr.Menu,{anchorEl:M?.anchorEl??null,open:!!M,onClose:()=>z(null),transitionDuration:0,children:[(0,bt.jsxs)(tr.MenuItem,{onClick:()=>{M&&d?.(Number(M.task.seq),"",0),z(null)},sx:{fontSize:14,minWidth:170,gap:1,color:b.table.headerColor},children:[(0,bt.jsx)(tr.Box,{sx:{width:24,flexShrink:0}}),"\uC9C0\uC815 \uC548 \uD568"]}),r.map(p=>(0,bt.jsxs)(tr.MenuItem,{selected:Number(M?.task.manager_account_seq??0)===Number(p.account_seq??0),onClick:()=>{M&&d?.(Number(M.task.seq),p.name,Number(p.account_seq??0)),z(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[S(p.name,24),p.name,p.role_name?(0,bt.jsx)(tr.Box,{component:"span",sx:{color:b.table.headerColor,fontSize:13},children:p.role_name}):null]},p.seq))]}),(0,bt.jsx)(io,{anchorEl:k?.anchorEl??null,open:!!k,date:k?.date??"",reminders:k?.reminders??[],hideReminder:!h,onClose:()=>I(null),onDateChange:p=>{k&&(a?.(k.taskSeq,p),I(y=>y?{...y,date:p}:null))},onReminderChange:p=>{k&&(h?.(k.taskSeq,p),I(y=>y?{...y,reminders:p}:null))}}),(0,bt.jsx)(Kn,{open:!!O,anchorEl:O?.anchorEl??null,nextCompleted:!O?.task.completed,returnMode:!!N&&!!(O&&Vn(O.task,o)),onCancel:()=>P(null),onConfirm:p=>{O&&(p&&N?N(O.task,p):c?.(O.task,!O.task.completed)),P(null)}}),(0,bt.jsx)(Qt,{open:!!$,anchorEl:$?.anchorEl??null,title:"\uC774 \uC5C5\uBB34\uB97C \uB9E1\uC744\uAE4C\uC694?",confirmText:"\uAC00\uC838\uAC00\uAE30",onCancel:()=>L(null),onConfirm:()=>{$&&u?.($.taskSeq),L(null)}})]})}var Xs=[{value:"daily",label:"\uB9E4\uC77C"},{value:"weekly",label:"\uB9E4\uC8FC"},{value:"monthly",label:"\uB9E4\uC6D4"},{value:"yearly",label:"\uB9E4\uB144"}];function Ua(e){return Xs.find(f=>f.value===e)?.label??"\uC5C6\uC74C"}function t_(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 Va(e,f){let g=t_(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 r_(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)}function Cf(e,f){let g=String(e??"").slice(0,10);if(!r_(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 wb(e,f,g){return{title:String(e.title??"").trim(),content:String(e.content??""),start_date:Cf(f,e.start_offset_days),due_date:Cf(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 Bf(e,f){let g=Number(e.group_seq)||0;return(e.items??[]).map(l=>wb(l,f,g)).filter(l=>l.title.length>0)}function n_(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`}var hs=require("react"),Br=require("@mui/material"),N1=Y(require("@mui/icons-material/Close"),1),L1=Y(require("@ehfuse/overlay-scrollbar"),1),z1=require("@ehfuse/mui-form-dialog");var ta=require("react"),_r=require("@mui/material"),B1=Y(require("@mui/icons-material/SubjectOutlined"),1),I1=Y(require("@mui/icons-material/StickyNote2Outlined"),1),E1=Y(require("@mui/icons-material/LabelOutlined"),1),M1=Y(require("@mui/icons-material/DirectionsRunOutlined"),1),Wf=Y(require("@mui/icons-material/LockOutlined"),1),Uf=Y(require("@mui/icons-material/PublicOutlined"),1),Vf=Y(require("@mui/icons-material/Group"),1),R1=Y(require("@mui/icons-material/Repeat"),1),O1=Y(require("@mui/icons-material/EventOutlined"),1),A1=Y(require("@mui/icons-material/SpeedOutlined"),1),D1=require("@ehfuse/mui-form-controls"),Kf=require("@ehfuse/alerts");var Di=require("react"),dn=require("@mui/material"),Bb=Y(require("@mui/icons-material/Add"),1),Ga=Y(require("@mui/icons-material/Check"),1),Ib=Y(require("@mui/icons-material/ViewKanbanOutlined"),1),Eb=Y(require("@mui/icons-material/CalendarTodayOutlined"),1),Mb=Y(require("@mui/icons-material/EventOutlined"),1),Rb=Y(require("@mui/icons-material/PersonOutlineOutlined"),1),Ef=Y(require("@mui/icons-material/PeopleAltOutlined"),1),Ob=Y(require("@mui/icons-material/FlagOutlined"),1),Ab=Y(require("@mui/icons-material/TimerOutlined"),1),Db=Y(require("@mui/icons-material/NotificationsNoneOutlined"),1),Pb=Y(require("@mui/icons-material/InboxOutlined"),1),Nb=Y(require("@mui/icons-material/PlaceOutlined"),1),Lb=Y(require("@mui/icons-material/MapOutlined"),1),zb=require("@ehfuse/mui-datetime-picker");var jb=require("@ehfuse/alerts");var yo="@media (max-width: 719.95px)";function Ro(e){return{[yo]:{order:e}}}var Tc=require("react"),_b=require("@mui/material");var kb=require("react/jsx-runtime");function Ko({value:e,placeholder:f,readOnly:g,onCommit:l}){let o=ht(),[s,r]=(0,Tc.useState)(e);return(0,Tc.useEffect)(()=>r(e),[e]),(0,kb.jsx)(_b.Box,{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"}}})}var Cc=require("@mui/material");var Ka=require("react/jsx-runtime");function It({icon:e,label:f,onClick:g,sx:l,children:o}){return(0,Ka.jsxs)(Cc.Box,{sx:[{display:"flex",alignItems:"center",minHeight:32},...Array.isArray(l)?l:[l]],children:[(0,Ka.jsxs)(Cc.Box,{sx:{display:"flex",alignItems:"center",gap:1,width:104,flexShrink:0,fontSize:13.5,color:"#787774"},children:[e,f]}),(0,Ka.jsx)(Cc.Box,{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,[yo]:{py:.25}},children:o})]})}var Fb=Y(require("@mui/icons-material/StorefrontOutlined"),1),qb=Y(require("@mui/icons-material/SupportAgentOutlined"),1);var gi=require("react"),jn=require("@mui/material"),Sb=Y(require("@mui/icons-material/Close"),1),Tb=Y(require("@mui/icons-material/Search"),1);var fn=require("react/jsx-runtime");function o_(e){return(0,fn.jsx)(jn.Box,{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 i_=(0,gi.lazy)(()=>import("react-daum-postcode").then(e=>({default:e.default})).catch(()=>({default:o_})));function s_(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 If({value:e,placeholder:f="\uC8FC\uC18C \uC785\uB825",readOnly:g,onCommit:l}){let[o,s]=(0,gi.useState)(e),[r,t]=(0,gi.useState)(!1),n=ct().slots?.addressSearch;(0,gi.useEffect)(()=>s(e),[e]);let c=a=>{s(a),t(!1),a!==e&&l(a)};return(0,fn.jsxs)(fn.Fragment,{children:[(0,fn.jsxs)(jn.Box,{sx:{display:"flex",alignItems:"center",gap:.5,flex:1,minWidth:0},children:[(0,fn.jsx)(jn.Box,{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:(0,fn.jsx)(jn.Tooltip,{title:"\uC8FC\uC18C \uAC80\uC0C9",arrow:!0,children:(0,fn.jsx)(jn.IconButton,{tabIndex:-1,size:"small","aria-label":"\uC8FC\uC18C \uAC80\uC0C9",onClick:()=>t(!0),sx:{color:"#9a9a97",p:.25,flexShrink:0},children:(0,fn.jsx)(Tb.default,{sx:{fontSize:17}})})})]}),n?(0,fn.jsx)(n,{open:r,onComplete:c,onClose:()=>t(!1)}):(0,fn.jsxs)(jn.Dialog,{open:r,onClose:()=>t(!1),maxWidth:"sm",fullWidth:!0,slotProps:{paper:{sx:{height:550}}},children:[(0,fn.jsxs)(jn.DialogTitle,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",pr:2},children:["\uC8FC\uC18C \uAC80\uC0C9",(0,fn.jsx)(jn.IconButton,{"aria-label":"\uC8FC\uC18C \uAC80\uC0C9 \uB2EB\uAE30",onClick:()=>t(!1),size:"small",children:(0,fn.jsx)(Sb.default,{})})]}),(0,fn.jsx)(jn.DialogContent,{style:{padding:0},dividers:!0,children:r?(0,fn.jsx)(gi.Suspense,{fallback:null,children:(0,fn.jsx)(i_,{onComplete:a=>{c(s_(a))},onClose:()=>t(!1),defaultQuery:o,style:{width:"100%",height:"100%"}})}):null})]})]})}var je=require("react/jsx-runtime");function Cb(e){return String(e??"").includes(" ")?Gn(e):oo(e)}function a_(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 Ai({label:e="\uBE44\uC5B4 \uC788\uC74C"}){return(0,je.jsx)(dn.Box,{component:"span",sx:{color:"#9a9a97"},children:e})}var zr=e=>({gridColumn:`${e}`,[yo]:{gridColumn:"auto"}});function Ya({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:I,supportOrigin:M,trailing:z,onChangeProject:O,onChangeStartDate:P,onChangeDueDate:N,onChangeReminder:$,onChangePriority:L,onChangeEventTime:C,onChangeEventPlace:S,onChangeEventAddress:D,onMemberEdit:p,onAddProject:y}){let[v,w]=(0,Di.useState)(null),[_,T]=(0,Di.useState)(!1),R=d??h,[F,H]=(0,Di.useState)(null),[V,A]=(0,Di.useState)(null),[q,B]=(0,Di.useState)(null),[E,j]=(0,Di.useState)(null),[U,X]=(0,Di.useState)(null),G=dr(),W=$o(),Z=c&&!s,J=(ne,ie,ae=!1)=>[Ro(ne),...ae&&b?Array.isArray(b)?b:[b]:[],...Z&&ie?[zr(ie)]:[]],K=f.find(ne=>ne.key===e.tabKey),ee=f.filter(ne=>!ne.archived),te=ne=>{let ie=!!String(e.startDate??"").trim();if(P(ne),ie||o||s)return;let ae=Mu(ne);Number.isNaN(ae.getTime())||ae.getTime()<=Date.now()||(0,jb.InfoAlert)("\uC2DC\uC791\uC77C\uC2DC\uAC00 \uB418\uBA74 \uCC45\uC784\uC790\uC5D0\uAC8C \uC54C\uB9BC\uC774 \uBC1C\uC1A1\uB429\uB2C8\uB2E4.")},oe=(0,je.jsx)(It,{icon:(0,je.jsx)(Db.default,{sx:{fontSize:17}}),label:"\uC0AC\uC804\uC54C\uB9BC",onClick:R||m?void 0:ne=>A(ne),sx:J(s?8:5,2,!0),children:e.reminders.length===0?(0,je.jsx)(Ai,{label:"\uC5C6\uC74C"}):ac(e.reminders)});return(0,je.jsxs)(je.Fragment,{children:[(0,je.jsxs)(dn.Box,{sx:{display:"grid",gridTemplateColumns:"repeat(2, minmax(0, 1fr))",gridAutoFlow:"row dense",columnGap:3,rowGap:0,px:2,[yo]:{gridTemplateColumns:"minmax(0, 1fr)"}},children:[I,M?(0,je.jsxs)(je.Fragment,{children:[(0,je.jsxs)(It,{icon:(0,je.jsx)(Fb.default,{sx:{fontSize:17}}),label:"\uAC00\uB9F9\uC810",sx:J(0,1),children:[M.licenseName||(0,je.jsx)(Ai,{}),M.contactPhone?(0,je.jsx)(dn.Box,{component:"span",sx:{ml:1,color:"#6f6f6c",fontSize:"0.92em"},children:M.contactPhone}):null,M.contactEmail?(0,je.jsx)(dn.Box,{component:"span",sx:{ml:1,color:"#6f6f6c",fontSize:"0.92em"},children:M.contactEmail}):null]}),(0,je.jsx)(It,{icon:(0,je.jsx)(qb.default,{sx:{fontSize:17}}),label:"\uC720\uD615",sx:J(0,2),children:M.supportType||(0,je.jsx)(Ai,{})})]}):null,k?null:(0,je.jsx)(It,{icon:(0,je.jsx)(Ib.default,{sx:{fontSize:17}}),label:"\uD504\uB85C\uC81D\uD2B8",onClick:R?void 0:ne=>w(ne),sx:Z&&i==="full"?[J(1,void 0,!0),{gridColumn:"1 / -1"}]:J(1,i==="full"?1:i,!0),children:K?(()=>{let ne=$t(K.icon);return(0,je.jsxs)(je.Fragment,{children:[ne?(0,je.jsx)(ne,{sx:{fontSize:16,color:"#1e3a8a"}}):null,K.label]})})():"\uAE30\uBCF8"}),a,o?(0,je.jsx)(It,{icon:(0,je.jsx)(Ef.default,{sx:{fontSize:17}}),label:"\uB300\uC0C1\uC790",onClick:R?void 0:()=>p("targets"),sx:J(7,1),children:u||"\uBAA8\uB4E0 \uC9C1\uC6D0"}):null,!o&&!s?(0,je.jsx)(It,{icon:(0,je.jsx)(Rb.default,{sx:{fontSize:17}}),label:"\uCC45\uC784\uC790",onClick:l||R||!e.managerName&&x?void 0:()=>p("manager"),sx:J(7,1),children:e.managerName?(0,je.jsxs)(je.Fragment,{children:[(0,je.jsx)(Cn,{names:[e.managerName],size:20,avatarSrcByName:g}),e.managerName]}):x??(0,je.jsx)(Ai,{})}):null,n,s?null:(0,je.jsx)(It,{icon:(0,je.jsx)(Eb.default,{sx:{fontSize:17}}),label:"\uC2DC\uC791\uC77C\uC2DC",onClick:R?void 0:ne=>B(ne),sx:J(2,2),children:e.startDate?Cb(e.startDate):(0,je.jsx)(Ai,{})}),o?null:(0,je.jsx)(It,{icon:(0,je.jsx)(Ef.default,{sx:{fontSize:17}}),label:s?"\uCC38\uC11D\uC790":"\uCC38\uC870\uC790",onClick:R?void 0:()=>p("receivers"),sx:J(s?7:8,1),children:e.receiverNames.length>0?(0,je.jsxs)(je.Fragment,{children:[(0,je.jsx)(Cn,{names:e.receiverNames,size:20,avatarSrcByName:g}),e.receiverNames.length===1?e.receiverNames[0]:null]}):(0,je.jsx)(Ai,{})}),r?null:(0,je.jsx)(It,{icon:(0,je.jsx)(Mb.default,{sx:{fontSize:17}}),label:s?"\uB0A0\uC9DC":"\uB9C8\uAC10\uC608\uC815",onClick:R?void 0:ne=>j(ne),sx:J(3,2),children:e.dueDate?s?oo(e.dueDate):Cb(e.dueDate):(0,je.jsx)(Ai,{})}),s?(0,je.jsx)(It,{icon:(0,je.jsx)(Ab.default,{sx:{fontSize:17}}),label:"\uC2DC\uAC01",onClick:R?void 0:ne=>X(ne),sx:Ro(4),children:e.eventTime?e.eventTime:(0,je.jsx)(Ai,{label:"\uC885\uC77C"})}):null,s?(0,je.jsx)(It,{icon:(0,je.jsx)(Nb.default,{sx:{fontSize:17}}),label:"\uC7A5\uC18C",sx:Ro(5),children:(0,je.jsx)(Ko,{value:e.eventPlace??"",placeholder:"\uC7A5\uC18C \uC785\uB825",readOnly:R,onCommit:ne=>S?.(ne)})}):null,!t&&s?oe:null,s?(0,je.jsx)(It,{icon:(0,je.jsx)(Lb.default,{sx:{fontSize:17}}),label:"\uC8FC\uC18C",sx:[{gridColumn:"1 / -1"},Ro(6)],children:(0,je.jsx)(If,{value:e.eventAddress??"",placeholder:"\uC8FC\uC18C \uC785\uB825",readOnly:R,onCommit:ne=>D?.(ne)})}):null,s?null:(0,je.jsx)(It,{icon:(0,je.jsx)(Ob.default,{sx:{fontSize:17}}),label:"\uC911\uC694\uB3C4",onClick:h?void 0:ne=>H(ne),sx:J(6,1,!0),children:(0,je.jsx)(Tn,{priority:e.priority,small:!0})}),!t&&!s?oe:null,z]}),(0,je.jsxs)(dn.Menu,{transitionDuration:0,anchorEl:v,open:!!v,onClose:()=>w(null),...W,children:[(0,je.jsxs)(dn.MenuItem,{selected:!e.tabKey,onClick:()=>{O(""),w(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[(0,je.jsx)(Pb.default,{sx:{fontSize:17,color:"#9a9a97"}}),"\uC5C6\uC74C",e.tabKey?null:(0,je.jsx)(Ga.default,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}})]}),ee.map(ne=>{let ie=$t(ne.icon),ae=e.tabKey===ne.key;return(0,je.jsxs)(dn.MenuItem,{selected:ae,onClick:()=>{O(ne.key),w(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[ie?(0,je.jsx)(ie,{sx:{fontSize:17,color:"#1e3a8a"}}):null,ne.label,ae?(0,je.jsx)(Ga.default,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},ne.key)}),y?[(0,je.jsx)(dn.Divider,{},"add-project-divider"),(0,je.jsxs)(dn.MenuItem,{onClick:()=>T(!0),sx:{fontSize:14,color:"#787774"},children:[(0,je.jsx)(dn.ListItemIcon,{children:(0,je.jsx)(Bb.default,{sx:{fontSize:18,color:"#787774"}})}),"\uD504\uB85C\uC81D\uD2B8 \uCD94\uAC00"]},"add-project")]:null]}),y?(0,je.jsx)(ja,{open:_,onClose:()=>T(!1),onSubmit:(ne,ie,ae)=>{(async()=>{let pe=await y(ne,ie,ae);pe&&O(pe)})(),w(null)}}):null,(0,je.jsx)(dn.Menu,{transitionDuration:0,anchorEl:F,open:!!F,onClose:()=>H(null),...W,children:["high","medium","low"].map(ne=>(0,je.jsxs)(dn.MenuItem,{selected:e.priority===ne,onClick:()=>{L(ne),H(null)},sx:{fontSize:14,minWidth:130,gap:1},children:[(0,je.jsx)(Tn,{priority:ne,small:!0}),e.priority===ne?(0,je.jsx)(Ga.default,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},ne))}),(0,je.jsx)(dn.Menu,{transitionDuration:0,anchorEl:V,open:!!V,onClose:()=>A(null),...W,children:sc(s?!!e.eventTime:String(e.dueDate??"").includes(" ")).map(ne=>{let ie=ne.value==="none"?e.reminders.length===0:e.reminders.includes(ne.value);return(0,je.jsxs)(dn.MenuItem,{selected:ie,onClick:()=>{$(La(e.reminders,ne.value)),ne.value==="none"&&A(null)},sx:{fontSize:14,minWidth:150,gap:1},children:[ne.label,ie?(0,je.jsx)(Ga.default,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},ne.value)})}),s?(0,je.jsx)(zb.TimePicker,{anchorEl:U,open:!!U,onClose:()=>X(null),value:a_(e.eventTime),format:"HH:mm",minuteStep:10,autoApply:!0,centered:G,locale:"ko",onChange:(ne,ie)=>{C?.(`${ne}:${ie}`),X(null)}}):null,(0,je.jsx)(io,{anchorEl:q,open:!!q,date:e.startDate,reminders:[],hideReminder:!0,showTime:!0,centered:G,onClose:()=>B(null),onDateChange:te,onReminderChange:()=>{}}),(0,je.jsx)(io,{anchorEl:E,open:!!E,date:e.dueDate,reminders:e.reminders,hideReminder:m||t,showTime:!s,centered:G,onClose:()=>j(null),onDateChange:N,onReminderChange:$})]})}var $b=require("react"),Zs=require("@mui/material"),Hb=Y(require("@mui/icons-material/RepeatOutlined"),1),Wb=Y(require("@mui/icons-material/DevicesOutlined"),1),Ub=Y(require("@mui/icons-material/ScreenSearchDesktopOutlined"),1),Vb=Y(require("@mui/icons-material/SellOutlined"),1),Kb=Y(require("@mui/icons-material/TaskAltOutlined"),1);var Cr=require("react/jsx-runtime");function Mf({label:e="\uBE44\uC5B4 \uC788\uC74C"}){return(0,Cr.jsx)(Zs.Box,{component:"span",sx:{color:"#9a9a97"},children:e})}function Xa({values:e,readOnly:f=!1,showResolution:g=!1,onChangeRepro:l,onChangeDevice:o,onChangeWhere:s,onChangeVersion:r,onChangeResolution:t}){let[n,c]=(0,$b.useState)(null),i=n?.field==="repro"?Hl:n?.field==="device"?Wl:Ul,a=h=>{n?.field==="repro"?l(h):n?.field==="device"?o(h):n?.field==="resolution"&&t?.(h),c(null)};return(0,Cr.jsxs)(Cr.Fragment,{children:[(0,Cr.jsxs)(Cr.Fragment,{children:[(0,Cr.jsx)(It,{icon:(0,Cr.jsx)(Hb.default,{sx:{fontSize:17}}),label:"\uC7AC\uD604\uBE48\uB3C4",onClick:f?void 0:h=>c({field:"repro",el:h}),children:Cu(e.repro)||(0,Cr.jsx)(Mf,{label:"\uC120\uD0DD"})}),(0,Cr.jsx)(It,{icon:(0,Cr.jsx)(Wb.default,{sx:{fontSize:17}}),label:"\uB514\uBC14\uC774\uC2A4",onClick:f?void 0:h=>c({field:"device",el:h}),children:Bu(e.device)||(0,Cr.jsx)(Mf,{label:"\uC120\uD0DD"})}),(0,Cr.jsx)(It,{icon:(0,Cr.jsx)(Ub.default,{sx:{fontSize:17}}),label:"\uBC1C\uC0DD\uD654\uBA74",children:(0,Cr.jsx)(Ko,{value:e.where,placeholder:"\uC608: POS > \uC8FC\uBB38\uD604\uD669",readOnly:f,onCommit:s})}),(0,Cr.jsx)(It,{icon:(0,Cr.jsx)(Vb.default,{sx:{fontSize:17}}),label:"\uBC1C\uC0DD\uBC84\uC804",children:(0,Cr.jsx)(Ko,{value:e.version,placeholder:"\uC608: 2026-08-06 \uBC30\uD3EC",readOnly:f,onCommit:r})}),g?(0,Cr.jsx)(It,{icon:(0,Cr.jsx)(Kb.default,{sx:{fontSize:17}}),label:"\uC885\uB8CC\uC0AC\uC720",onClick:f?void 0:h=>c({field:"resolution",el:h}),children:ba(e.resolution)||(0,Cr.jsx)(Mf,{label:"\uC120\uD0DD"})}):null]}),(0,Cr.jsx)(Zs.Menu,{open:!!n,anchorEl:n?.el??null,onClose:()=>c(null),transitionDuration:0,children:i.map(h=>(0,Cr.jsx)(Zs.MenuItem,{onClick:()=>a(h.key),sx:{fontSize:14},children:h.name},h.key))})]})}var Rf=require("@mui/material"),Of=require("react/jsx-runtime"),Bc=16;function ao({icon:e,title:f,titleExtra:g,children:l}){return(0,Of.jsxs)(Rf.Box,{sx:{px:2,display:"flex",flexDirection:"column",gap:.25},children:[(0,Of.jsxs)(Rf.Box,{sx:{display:"flex",alignItems:"center",gap:1,fontSize:Bc,fontWeight:500,color:"#37352f"},children:[e,f,g]}),l]})}var Ic=require("react"),hn=require("@mui/material"),Yb=Y(require("@mui/icons-material/MoreVert"),1),Xb=require("@ehfuse/alerts"),Zb=require("@ehfuse/mui-form-dialog"),Jb=require("@ehfuse/mui-form-controls");var rn=require("react/jsx-runtime");function Gb(e){return String(e??"").replace(/<[^>]*>/g,"").replace(/&nbsp;/g," ").trim().length>0}function Za({content:e,templates:f,onApply:g,onSave:l,onRemove:o}){let[s,r]=(0,Ic.useState)(null),[t,n]=(0,Ic.useState)(!1),[c,i]=(0,Ic.useState)(""),a=async h=>{r(null),!(Gb(e)&&!await(0,Xb.ConfirmDialog)({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(0,rn.jsxs)(rn.Fragment,{children:[(0,rn.jsx)(hn.Tooltip,{title:"\uBCF8\uBB38 \uC591\uC2DD",arrow:!0,disableInteractive:!0,children:(0,rn.jsx)(hn.IconButton,{size:"small","aria-label":"\uBCF8\uBB38 \uC591\uC2DD",onClick:h=>r(h.currentTarget),sx:{ml:"auto",color:"#9a9a97"},children:(0,rn.jsx)(Yb.default,{sx:{fontSize:18}})})}),(0,rn.jsxs)(hn.Menu,{anchorEl:s,open:!!s,onClose:()=>r(null),transitionDuration:0,children:[l?(0,rn.jsx)(hn.MenuItem,{disabled:!Gb(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?(0,rn.jsx)(hn.Divider,{sx:{my:.5}}):null,f.length===0?(0,rn.jsx)(hn.MenuItem,{disabled:!0,sx:{fontSize:14,minWidth:220},children:"\uC800\uC7A5\uB41C \uC591\uC2DD\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"}):f.map(h=>(0,rn.jsxs)(hn.MenuItem,{onClick:()=>{a(h)},sx:{fontSize:14,minWidth:220,gap:1},children:[(0,rn.jsx)(hn.Box,{sx:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:h.name}),o?(0,rn.jsx)(hn.IconButton,{size:"small","aria-label":`${h.name} \uC591\uC2DD \uC0AD\uC81C`,onClick:d=>{d.stopPropagation(),o(h.seq)},sx:{color:"#9a9a97"},children:(0,rn.jsx)(gn,{sx:{fontSize:16}})}):null]},h.seq))]}),(0,rn.jsx)(Zb.FormDialog,{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:(0,rn.jsx)(hn.Button,{variant:"contained",disabled:!c.trim(),onClick:()=>{l?.(c.trim(),e),n(!1)},children:"\uC800\uC7A5"})},sections:[{id:"template-name",title:"",showTitle:!1,children:(0,rn.jsxs)(hn.Box,{sx:{display:"flex",flexDirection:"column",gap:1},children:[(0,rn.jsx)(hn.Box,{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."}),(0,rn.jsx)(Jb.ClearTextField,{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)})]})}]})]})}var Rn=require("react"),on=require("@mui/material"),Df=Y(require("@mui/icons-material/EditOutlined"),1),Qb=Y(require("@mui/icons-material/DoneOutlined"),1),Pf=Y(require("@mui/icons-material/Translate"),1),Js=require("@ehfuse/editor");var nn=require("react/jsx-runtime");function Af(e){let f=e.trim();return f?f.startsWith("<")?e:`<p>${f}</p>`:"<p></p>"}function Ja(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:()=>{j&&I(j.column.key),U(null)}}),(0,ze.jsx)(Kn,{open:!!y,anchorEl:y?.anchorEl??null,nextCompleted:y?.nextCompleted??!1,returnMode:!!D&&!!(w&&Vn(w,p)),onCancel:()=>v(null),onConfirm:we=>{y&&(we&&D&&w?D(w,we):o(y.taskSeq,y.nextCompleted)),v(null)}})]})}var Sr=require("react"),hr=require("@mui/material"),Cg=Y(require("@mui/icons-material/Add"),1),Bg=Y(require("@mui/icons-material/ChevronLeft"),1),Ig=Y(require("@mui/icons-material/ChevronRight"),1),Eg=Y(require("@mui/icons-material/KeyboardArrowDown"),1),Mg=require("@ehfuse/mui-datetime-picker"),En=require("@dnd-kit/core"),Mi=require("@dnd-kit/sortable"),Rg=require("@dnd-kit/utilities"),Og=Y(require("@ehfuse/overlay-scrollbar"),1);function xw(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 cs(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=xw(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 qs(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 $s(e,f){if(e.completed!==f.completed)return e.completed?1:-1;let g=qs(e),l=qs(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}var Hs=require("@mui/material"),Ws=require("react/jsx-runtime");function us({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(0,Ws.jsx)(Hs.Tooltip,{title:`(${l}) ${g}`,arrow:!0,enterDelay:300,children:(0,Ws.jsxs)(Hs.Box,{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:[(0,Ws.jsx)(Hs.Box,{component:"span",sx:{width:6,height:6,borderRadius:"50%",bgcolor:"#0f9d58",flexShrink:0}}),(0,Ws.jsx)(Hs.Box,{component:"span",sx:{minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},children:g})]})})}var Tg=require("react"),Eo=require("@mui/material");var $a=require("react"),uf=new WeakMap,cf=null;function vw(){return typeof ResizeObserver>"u"?null:(cf||(cf=new ResizeObserver(e=>{for(let f of e){let g=uf.get(f.target);if(!g)continue;let l=f.borderBoxSize?.[0]?.inlineSize??f.target.getBoundingClientRect().width;g(l)}})),cf)}function Sg(){let[e,f]=(0,$a.useState)(null),[g,l]=(0,$a.useState)(0);return(0,$a.useLayoutEffect)(()=>{if(!e)return;l(e.getBoundingClientRect().width);let o=vw();if(o)return uf.set(e,s=>l(r=>Math.abs(r-s)<1?r:s)),o.observe(e),()=>{o.unobserve(e),uf.delete(e)}},[e]),{ref:f,width:g}}var Xn=require("react/jsx-runtime"),ff={high:"#e5484d",medium:"#2f80ed",low:"#d9a514"},Us=15,ww=150,_w=3;function Ei({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=ht(),k=x.mode==="dark",[I]=es(e,f),M=String(e.manager_name??"").trim(),z=b?qs(e):"",O=Ds(e,ct().resolveTask),P=!e.completed&&!e.is_event&&!e.due_date.slice(0,10),N=e.is_notice||e.is_event?$t(e.icon||(e.is_notice?$r:Yr)):null,$=!e.completed&&!e.is_event&&!!e.due_date&&e.due_date.slice(0,10)<a0(),{ref:L,width:C}=Sg(),S=C>0&&C<ww,D=S||m,p=(0,Tg.useCallback)(v=>{L(v),i?.(v)},[L,i]),y=n&&!r&&!S&&!!M;return(0,Xn.jsxs)(Eo.Box,{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:I?k?Es(I.dot,x.chip.darkBgAlpha):I.bg:k?x.card.bg:x.colors.surfaceHover,color:I?k?x.chip.darkTextSource==="fg"?I.fg:I.dot:I.fg:x.colors.textPrimary,fontSize:Us,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)"},...$?{borderLeft:`3px solid ${x.colors.danger}`,pl:.75}:r?{borderLeft:"3px solid #2f80ed",pl:.75}:{}},children:[(0,Xn.jsx)(Eo.Box,{component:"span",sx:{width:6,height:6,borderRadius:"50%",flexShrink:0,...D?{mt:"7px"}:{},bgcolor:ff[e.priority]??x.colors.accentOnSurface}}),d&&!S&&u?(0,Xn.jsx)(Eo.Checkbox,{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?(0,Xn.jsx)(N,{sx:{fontSize:15,flexShrink:0,opacity:.75,...D?{mt:"3px"}:{}}}):null,(0,Xn.jsxs)(Eo.Box,{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&&z?(0,Xn.jsx)(Eo.Box,{component:"span",sx:{lineHeight:1.35,fontSize:Us-1,color:e.completed?x.colors.textPrimary:x.colors.danger},children:z}):null,(0,Xn.jsxs)(Eo.Box,{component:"span",sx:{minWidth:0,overflow:"hidden",...D?{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:_w,whiteSpace:"normal",overflowWrap:"anywhere",lineHeight:1.35}:{textOverflow:"ellipsis",whiteSpace:"nowrap"}},children:[!S&&z?(0,Xn.jsx)(Eo.Box,{component:"span",sx:{mr:.5,fontSize:Us-1,color:e.completed?x.colors.textPrimary:x.colors.danger},children:z}):null,e.title,!S&&O?(0,Xn.jsx)(Eo.Box,{component:"span",sx:{ml:.5,fontSize:Us-2,color:x.colors.textMuted,fontVariantNumeric:"tabular-nums"},children:O}):null,!S&&(e.comment_count??e.comments?.length??0)>0?(0,Xn.jsx)(di,{sx:{fontSize:15,ml:.5,verticalAlign:"-2px",color:x.colors.textMuted}}):null]})]}),h??null,!h&&y?(0,Xn.jsx)(Eo.Box,{component:"span",onClick:c?v=>{v.stopPropagation(),c(e)}:void 0,sx:{display:"inline-flex",flexShrink:0,ml:"auto",pl:.5},children:(0,Xn.jsx)(po,{src:t?.get(M)??"",name:M,avatarSx:{width:22,height:22,fontSize:11},iconFontSize:14})}):null]})}var Mt=require("react/jsx-runtime"),Ag=36,kw=["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"],yc="day-";function df(e){let f=new Date(e);return f.setHours(0,0,0,0),f.setDate(f.getDate()-f.getDay()),f}function bc(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}=(0,Mi.useSortable)({id:String(e.seq),disabled:t});return(0,Mt.jsx)(Ei,{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:Rg.CSS.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=ht(),{setNodeRef:k}=(0,En.useDroppable)({id:`${yc}${e}`,disabled:m});return(0,Mt.jsxs)(hr.Box,{ref:k,sx:{minWidth:0,minHeight:0,height:"100%",display:"flex",flexDirection:"column",bgcolor:f?x.calendar.todayBg:x.calendar.cellBg},children:[(0,Mt.jsxs)(hr.Box,{sx:{display:"flex",justifyContent:"flex-end",alignItems:"center",gap:.5,px:1,height:Ag,bgcolor:f?x.calendar.todayBg:x.calendar.dateBandBg,borderBottom:`1px solid ${x.calendar.borderColor}`,flexShrink:0},children:[l?(0,Mt.jsx)(hr.Box,{component:"span",sx:{mr:"auto",fontSize:11.5,fontWeight:600,color:x.colors.danger,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:l}):null,f?(0,Mt.jsx)(hr.Box,{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,(0,Mt.jsx)(hr.Box,{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?(0,Mt.jsx)(hr.Box,{sx:{px:1,py:1,borderBottom:`1px solid ${x.calendar.borderColor}`,flexShrink:0},children:d}):null,(0,Mt.jsx)(hr.Box,{sx:{flex:1,minHeight:0,bgcolor:f?x.calendar.todayBg:x.colors.surfaceSubtle},children:(0,Mt.jsx)(Og.default,{style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:(0,Mt.jsxs)(hr.Box,{sx:{display:"flex",flexDirection:"column",flexGrow:1},children:[s.length>0?(0,Mt.jsx)(hr.Box,{sx:{display:"flex",flexDirection:"column",gap:.5,px:1,pt:.75,pb:.25},children:s.map(I=>(0,Mt.jsx)(us,{event:I},I.uid))}):null,(0,Mt.jsx)(Mi.SortableContext,{items:o.map(I=>String(I.seq)),strategy:Mi.verticalListSortingStrategy,children:(0,Mt.jsx)(hr.Box,{sx:{display:"flex",flexDirection:"column",gap:.5,px:1,pt:o.length>0?.75:0},children:o.map(I=>(0,Mt.jsx)(Cw,{task:I,statusOptions:r,isMine:u>0&&Number(I.manager_account_seq??0)===u,avatarSrcByName:b,onCardClick:a,onCardContextMenu:h,onRequestArchiveToggle:t,dragDisabled:m},I.seq))})}),(0,Mt.jsx)(hr.Box,{sx:{flexGrow:1,minHeight:56,display:"flex",flexDirection:"column",pb:1,...i?{"&:hover .taskbox-add-schedule":{opacity:1,pointerEvents:"auto"}}:{}},children:(0,Mt.jsxs)(hr.ButtonBase,{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:[(0,Mt.jsx)(Cg.default,{sx:{fontSize:16}}),"\uC5C5\uBB34 \uB4F1\uB85D"]})})]})})})]})}function hf({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=ht(),[k,I]=(0,Sr.useState)(()=>df(new Date)),[M,z]=(0,Sr.useState)(null),{onReturnTask:O}=ct(),P=M?e.find(Z=>Z.seq===M.taskSeq):void 0,[N,$]=(0,Sr.useState)(null),[L,C]=(0,Sr.useState)(null),[S,D]=(0,Sr.useState)(null),p=(0,Sr.useRef)(!1),y=(0,Sr.useMemo)(()=>Array.from({length:7},(Z,J)=>bc(k,J)),[k]),v=(0,Sr.useMemo)(()=>new Map(e.map(Z=>[Z.seq,Z])),[e]),w=(0,Sr.useMemo)(()=>[...new Set(y.map(Z=>Z.getFullYear()))],[y]),_=Wo(w),T=(0,En.useSensors)((0,En.useSensor)(En.PointerSensor,{activationConstraint:{distance:5}})),R=(0,Sr.useCallback)(Z=>{let J=(0,En.pointerWithin)(Z),K=J.length>0?J:(0,En.rectIntersection)(Z),ee=K.filter(te=>!String(te.id).startsWith(yc));return ee.length>0?ee:K},[]),F=(0,Sr.useMemo)(()=>cs(f),[f]),H=(0,Sr.useMemo)(()=>{let Z=new Map;for(let J of e){let K=J.due_date.slice(0,10)||(l?J.start_date.slice(0,10)||String(J.created_time??"").slice(0,10):"");if(!K)continue;let ee=Z.get(K);ee?ee.push(J):Z.set(K,[J])}for(let J of Z.values())J.sort($s);return Z},[e,l]),V=(0,Sr.useCallback)(Z=>L?(L.get(Z)??[]).map(J=>v.get(J)).filter(J=>!!J):H.get(Z)??[],[L,v,H]),A=(0,Sr.useCallback)(Z=>{let J=V(Z);return b?J.filter(K=>!K.completed):J},[V,b]),q=(0,Sr.useCallback)(Z=>{D(Number(Z.active.id)),C(new Map(y.map(J=>{let K=Zr(J);return[K,(H.get(K)??[]).map(ee=>ee.seq)]})))},[y,H]),B=(0,Sr.useCallback)((Z,J)=>{if(Z.startsWith(yc))return{day:Z.slice(yc.length),overSeq:null};let K=Number(Z);for(let[ee,te]of J)if(te.includes(K))return{day:ee,overSeq:K};return null},[]),E=(0,Sr.useCallback)(Z=>{let{active:J,over:K}=Z;K&&C(ee=>{if(!ee)return ee;let te=Number(J.id),oe=B(String(K.id),ee);if(!oe)return ee;let ne=[...ee.entries()].find(([,ye])=>ye.includes(te))?.[0];if(!ne||ne===oe.day)return ee;let ie=new Map(ee);ie.set(ne,(ie.get(ne)??[]).filter(ye=>ye!==te));let ae=[...ie.get(oe.day)??[]],pe=ae.length;if(oe.overSeq!==null){let ye=ae.indexOf(oe.overSeq);ye!==-1&&(pe=ye)}return ae.splice(pe,0,te),ie.set(oe.day,ae),ie})},[B]),j=(0,Sr.useCallback)(Z=>{let{active:J,over:K}=Z,ee=L;if(C(null),D(null),p.current=!0,!ee||!K)return;let te=Number(J.id),oe=[...ee.entries()].find(([,ye])=>ye.includes(te));if(!oe)return;let[ne,ie]=oe,ae=[...ie],pe=B(String(K.id),ee);if(pe&&pe.day===ne&&pe.overSeq!==null&&pe.overSeq!==te){let ye=ae.indexOf(te),Se=ae.indexOf(pe.overSeq);ye!==-1&&Se!==-1&&(ae=(0,Mi.arrayMove)(ae,ye,Se))}n(te,ne,ae)},[L,n,B]),U=(0,Sr.useCallback)(()=>{C(null),D(null),p.current=!0},[]),X=(0,Sr.useCallback)(Z=>{if(p.current){p.current=!1;return}d(Z)},[d]),G=S!==null?v.get(S)??null:null,W=(0,Sr.useRef)(null);return(0,Mt.jsxs)(hr.Box,{onTouchStart:Z=>{let J=Z.touches[0];W.current=J?{x:J.clientX,y:J.clientY}:null},onTouchEnd:Z=>{let J=W.current;W.current=null;let K=Z.changedTouches[0];if(!J||!K||S!==null)return;let ee=K.clientX-J.x,te=K.clientY-J.y;Math.abs(ee)<60||Math.abs(ee)<=Math.abs(te)||I(bc(k,ee<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:[(0,Mt.jsxs)(hr.Box,{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:[(0,Mt.jsxs)(hr.Box,{sx:{display:"flex",alignItems:"center",gap:.25},children:[(0,Mt.jsx)(hr.IconButton,{size:"small","aria-label":"\uC774\uC804 \uC8FC",onClick:()=>I(bc(k,-7)),children:(0,Mt.jsx)(Bg.default,{sx:{fontSize:24,color:x.colors.textSecondary}})}),(0,Mt.jsx)(hr.Button,{size:"small",color:"inherit",onClick:()=>I(df(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"}),(0,Mt.jsx)(hr.IconButton,{size:"small","aria-label":"\uB2E4\uC74C \uC8FC",onClick:()=>I(bc(k,7)),children:(0,Mt.jsx)(Ig.default,{sx:{fontSize:24,color:x.colors.textSecondary}})})]}),(0,Mt.jsxs)(hr.ButtonBase,{onClick:Z=>$(Z.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),(0,Mt.jsx)(Eg.default,{sx:{fontSize:18,color:x.colors.textMuted}})]})]}),(0,Mt.jsx)(hr.Box,{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(Z=>{let J=Z.getDay(),K=_.has(Zr(Z));return(0,Mt.jsx)(hr.Box,{sx:{height:Ag,display:"flex",alignItems:"center",justifyContent:"center",fontSize:12.5,color:J===0||K?x.colors.danger:J===6?x.colors.accentOnSurface:x.colors.textSecondary},children:kw[J]},Zr(Z))})}),(0,Mt.jsx)(hr.Box,{sx:{flex:1,minHeight:0},children:(0,Mt.jsxs)(En.DndContext,{sensors:T,collisionDetection:R,onDragStart:q,onDragOver:E,onDragEnd:j,onDragCancel:U,children:[(0,Mt.jsx)(hr.Box,{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(Z=>{let J=Zr(Z);return(0,Mt.jsx)(Bw,{dayKey:J,isToday:J===r,dayLabel:Tw(Z),holidayName:_.get(J)??"",summary:m?.(J,V(J)),tasks:A(J),googleEvents:F.get(J)??[],statusOptions:g,onRequestArchiveToggle:z,onRequestReply:c,onAddSchedule:i,canAdd:a,onCardClick:X,onCardContextMenu:u,myAccountSeq:o,avatarSrcByName:s,dragDisabled:h},J)})}),(0,Mt.jsx)(En.DragOverlay,{children:G?(0,Mt.jsx)(hr.Box,{sx:{boxShadow:"0 8px 20px rgba(0,0,0,0.18)",borderRadius:.75,cursor:"grabbing"},children:(0,Mt.jsx)(Ei,{task:G,statusOptions:g,onOpenDetail:()=>{},isMine:o>0&&Number(G.manager_account_seq??0)===o})}):null})]})}),(0,Mt.jsx)(Mg.DatePicker,{anchorEl:N,open:!!N,onClose:()=>$(null),selectedDate:k,onDateChange:Z=>{I(df(Z)),$(null)}}),(0,Mt.jsx)(Kn,{open:!!M,anchorEl:M?.anchorEl??null,nextCompleted:M?.nextCompleted??!1,returnMode:!!O&&!!(P&&Vn(P,o)),onCancel:()=>z(null),onConfirm:Z=>{M&&(Z&&O&&P?O(P,Z):t(M.taskSeq,M.nextCompleted)),z(null)}})]})}var Hr=require("react"),wr=require("@mui/material"),Dg=Y(require("@mui/icons-material/Add"),1),Pg=Y(require("@mui/icons-material/ChevronLeft"),1),Ng=Y(require("@mui/icons-material/ChevronRight"),1),Lg=Y(require("@mui/icons-material/KeyboardArrowDown"),1),zg=require("@ehfuse/mui-datetime-picker"),un=require("@dnd-kit/core"),jg=Y(require("@ehfuse/overlay-scrollbar"),1);var Ft=require("react/jsx-runtime"),Iw=["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"],xc="mday-",vc="mchip-",Fg=36;function Ew(e){let f=new Date(e);return f.setHours(0,0,0,0),f.setDate(f.getDate()-f.getDay()),f}function wc(e){let f=new Date(e);return f.setHours(0,0,0,0),f.setDate(1),f}function Mw(e,f){let g=new Date(e);return g.setDate(g.getDate()+f),g}function pf(e,f){let g=wc(e);return g.setMonth(g.getMonth()+f),g}function Rw({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}=(0,un.useDraggable)({id:String(e.seq),disabled:g||n}),{setNodeRef:d}=(0,un.useDroppable)({id:`${vc}${e.seq}`,disabled:g||n});return(0,Ft.jsx)(wr.Tooltip,{title:e.title,arrow:!0,enterDelay:400,children:(0,Ft.jsx)(Ei,{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 Ow({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=ht(),I=k.mode==="dark",{setNodeRef:M,isOver:z}=(0,un.useDroppable)({id:`${xc}${e}`,disabled:x}),O=r,P=!!s||o===0;return(0,Ft.jsxs)(wr.Box,{ref:M,sx:{minWidth:0,minHeight:0,display:"flex",flexDirection:"column",gap:.5,p:.5,bgcolor:z?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:[(0,Ft.jsxs)(wr.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:.5,height:Fg,flexShrink:0,mx:-.5,mt:-.5,px:1,bgcolor:g?k.calendar.todayBg:k.calendar.dateBandBg,borderBottom:`1px solid ${k.calendar.borderColor}`},children:[s?(0,Ft.jsx)(wr.Box,{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?(0,Ft.jsx)(wr.Box,{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,(0,Ft.jsx)(wr.Box,{component:"span",sx:{fontSize:13.5,fontWeight:g?700:400,color:l?k.colors.textMuted:P?k.colors.danger:o===6?k.colors.accentOnSurface:I?k.colors.textStrong:k.colors.textPrimary,flexShrink:0},children:f})]}),t.map(N=>(0,Ft.jsx)(us,{event:N,small:!0},N.uid)),O.map(N=>(0,Ft.jsx)(Rw,{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)),(0,Ft.jsx)(wr.Box,{sx:{flexGrow:1,minHeight:0,display:"flex",alignItems:"flex-start"},children:(0,Ft.jsxs)(wr.ButtonBase,{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:[(0,Ft.jsx)(Dg.default,{sx:{fontSize:16}}),"\uC5C5\uBB34 \uB4F1\uB85D"]})})]})}function mf({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=ht(),b=u.mode==="dark",[m,x]=(0,Hr.useState)(()=>wc(new Date)),[k,I]=(0,Hr.useState)(null),[M,z]=(0,Hr.useState)(null),[O,P]=(0,Hr.useState)(null),[N,$]=(0,Hr.useState)(null),L=(0,Hr.useMemo)(()=>{let j=Ew(m);return Array.from({length:42},(U,X)=>Mw(j,X))},[m]),C=(0,Hr.useMemo)(()=>new Map(e.map(j=>[j.seq,j])),[e]),S=(0,Hr.useMemo)(()=>cs(f),[f]),D=(0,Hr.useMemo)(()=>[...new Set(L.map(j=>j.getFullYear()))],[L]),p=Wo(D),y=(0,Hr.useMemo)(()=>{let j=new Map;for(let U of e){let X=U.due_date.slice(0,10)||(l?U.start_date.slice(0,10)||String(U.created_time??"").slice(0,10):"");if(!X)continue;let G=j.get(X);G?G.push(U):j.set(X,[U])}for(let U of j.values())U.sort($s);return j},[e,l]),v=(0,un.useSensors)((0,un.useSensor)(un.PointerSensor,{activationConstraint:{distance:5}})),w=(0,Hr.useCallback)(j=>{let U=(0,un.pointerWithin)(j),X=U.length>0?U:(0,un.rectIntersection)(j),G=X.filter(W=>String(W.id).startsWith(vc));return G.length>0?G:X.filter(W=>String(W.id).startsWith(xc))},[]),_=(0,Hr.useCallback)(j=>{P(Number(j.active.id))},[]),T=(0,Hr.useCallback)(j=>{$(j.over?String(j.over.id):null)},[]),R=(0,Hr.useMemo)(()=>{let j=new Map;for(let[U,X]of y)for(let G of X)j.set(G.seq,U);return j},[y]),F=O!==null?C.get(O)?.due_date.slice(0,10)??"":"",H=(0,Hr.useMemo)(()=>{if(O===null||!N)return null;if(N.startsWith(vc)){let j=Number(N.slice(vc.length)),U=R.get(j);if(!U)return null;let X=(y.get(U)??[]).filter(W=>W.seq!==O),G=X.findIndex(W=>W.seq===j);return{day:U,index:G===-1?X.length:G}}if(N.startsWith(xc)){let j=N.slice(xc.length),U=(y.get(j)??[]).filter(X=>X.seq!==O);return{day:j,index:U.length}}return null},[O,R,N,y]),V=(0,Hr.useCallback)(j=>{let U=y.get(j)??[];if(O===null||!H)return U;let X=C.get(O);if(!X)return U;let G=U.filter(W=>W.seq!==O);return j===H.day?[...G.slice(0,H.index),X,...G.slice(H.index)]:j===F?G:U},[O,F,H,C,y]),A=(0,Hr.useCallback)(j=>{let U=O,X=H;if(P(null),$(null),U===null||!X)return;let G=(y.get(X.day)??[]).filter(Z=>Z.seq!==U),W=[...G.slice(0,X.index).map(Z=>Z.seq),U,...G.slice(X.index).map(Z=>Z.seq)];n(U,X.day,W)},[O,H,n,y]),q=O!==null?C.get(O)??null:null,B=`${m.getFullYear()}\uB144 ${m.getMonth()+1}\uC6D4`,E=(0,Hr.useRef)(null);return(0,Ft.jsxs)(wr.Box,{onTouchStart:j=>{let U=j.touches[0];E.current=U?{x:U.clientX,y:U.clientY}:null},onTouchEnd:j=>{let U=E.current;E.current=null;let X=j.changedTouches[0];if(!U||!X||O!==null)return;let G=X.clientX-U.x,W=X.clientY-U.y;Math.abs(G)<60||Math.abs(G)<=Math.abs(W)||x(pf(m,G<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:[(0,Ft.jsxs)(wr.Box,{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:[(0,Ft.jsxs)(wr.Box,{sx:{display:"flex",alignItems:"center",gap:.25},children:[(0,Ft.jsx)(wr.IconButton,{size:"small","aria-label":"\uC774\uC804 \uB2EC",onClick:()=>x(pf(m,-1)),children:(0,Ft.jsx)(Pg.default,{sx:{fontSize:24,color:u.colors.textSecondary}})}),(0,Ft.jsx)(wr.Button,{size:"small",color:"inherit",onClick:()=>x(wc(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"}),(0,Ft.jsx)(wr.IconButton,{size:"small","aria-label":"\uB2E4\uC74C \uB2EC",onClick:()=>x(pf(m,1)),children:(0,Ft.jsx)(Ng.default,{sx:{fontSize:24,color:u.colors.textSecondary}})})]}),(0,Ft.jsxs)(wr.ButtonBase,{onClick:j=>I(j.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:[B,(0,Ft.jsx)(Lg.default,{sx:{fontSize:18,color:u.colors.textMuted}})]})]}),(0,Ft.jsx)(wr.Box,{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:Iw.map((j,U)=>(0,Ft.jsx)(wr.Box,{sx:{height:Fg,display:"flex",alignItems:"center",justifyContent:"center",fontSize:12.5,color:U===0?u.colors.danger:U===6?u.colors.accentOnSurface:u.colors.textSecondary},children:j},j))}),(0,Ft.jsx)(wr.Box,{sx:{flex:1,minHeight:0},children:(0,Ft.jsxs)(un.DndContext,{sensors:v,collisionDetection:w,onDragStart:_,onDragOver:T,onDragEnd:A,onDragCancel:()=>{P(null),$(null)},children:[(0,Ft.jsx)(jg.default,{style:{height:"100%"},thumb:{width:8},children:(0,Ft.jsx)(wr.Box,{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:L.map(j=>{let U=Zr(j);return(0,Ft.jsx)(Ow,{dayKey:U,dayNumber:j.getDate(),isToday:U===t,isOtherMonth:j.getMonth()!==m.getMonth(),weekday:j.getDay(),holidayName:p.get(U)??"",tasks:V(U),googleEvents:S.get(U)??[],statusOptions:g,previewSeq:H?.day===U?O:null,myAccountSeq:o,avatarSrcByName:s,onRequestToggleCompleted:r?z:void 0,onOpenDetail:h,onTaskContextMenu:d,onAddSchedule:c,canAdd:i,dragDisabled:a},U)})})}),(0,Ft.jsx)(un.DragOverlay,{children:q?(0,Ft.jsxs)(wr.Box,{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:Us,fontWeight:500,color:u.colors.textPrimary,cursor:"grabbing",whiteSpace:"nowrap"},children:[(0,Ft.jsx)(wr.Box,{component:"span",sx:{width:6,height:6,borderRadius:"50%",bgcolor:ff[q.priority]}}),q.title]}):null})]})}),(0,Ft.jsx)(Qt,{open:!!M,anchorEl:M?.anchorEl??null,title:M?.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:M?.nextCompleted?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>z(null),onConfirm:()=>{M&&r?.(M.taskSeq,M.nextCompleted),z(null)}}),(0,Ft.jsx)(zg.DatePicker,{anchorEl:k,open:!!k,onClose:()=>I(null),selectedDate:m,onDateChange:j=>{x(wc(j)),I(null)}})]})}var Mn=require("react"),Ar=require("@mui/material"),Wg=Y(require("@mui/icons-material/ChevronLeft"),1),Ug=Y(require("@mui/icons-material/ChevronRight"),1),Vg=Y(require("@mui/icons-material/KeyboardArrowDown"),1),Kg=require("@ehfuse/mui-datetime-picker");var Zn=require("@mui/material");var Jn=require("react/jsx-runtime");function qg({task:e,avatarSrcByName:f,onClose:g}){let l=ht(),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(0,Jn.jsx)(Zn.Dialog,{open:!!e,onClose:g,maxWidth:"xs",fullWidth:!0,slotProps:{paper:{sx:{borderRadius:2,m:2}}},children:e?(0,Jn.jsxs)(Zn.Box,{sx:{p:2,display:"flex",flexDirection:"column",gap:1.5,bgcolor:l.colors.surface},children:[(0,Jn.jsx)(Zn.Box,{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(0,Jn.jsxs)(Zn.Box,{sx:{display:"flex",alignItems:"flex-start",gap:1.5},children:[(0,Jn.jsx)(Zn.Box,{sx:{width:56,flexShrink:0,fontSize:13.5,color:l.colors.textSecondary,pt:.5},children:s.label}),(0,Jn.jsx)(Zn.Box,{sx:{display:"flex",flexWrap:"wrap",gap:1,minWidth:0},children:r.length===0?(0,Jn.jsx)(Zn.Box,{sx:{fontSize:14,color:l.colors.textMuted,pt:.5},children:"\uBE44\uC5B4 \uC788\uC74C"}):r.map(t=>(0,Jn.jsxs)(Zn.Box,{sx:{display:"flex",alignItems:"center",gap:.75},children:[(0,Jn.jsx)(po,{src:f?.get(t)??"",name:t,avatarSx:{width:26,height:26,fontSize:12},iconFontSize:16}),(0,Jn.jsx)(Zn.Box,{sx:{fontSize:14.5,color:l.colors.textPrimary},children:t})]},`${s.label}-${t}`))})]},s.label)}),(0,Jn.jsx)(Zn.Box,{sx:{display:"flex",justifyContent:"flex-end",pt:.5},children:(0,Jn.jsx)(Zn.Button,{size:"small",color:"inherit",onClick:g,children:"\uB2EB\uAE30"})})]}):null})}var cr=require("react/jsx-runtime"),Aw=["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"];function $g(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 Dw="(min-width:600px)";function gf(e){let f=new Date(e);return f.setHours(0,0,0,0),f.setDate(1),f}function Hg(e){let f=g=>String(g).padStart(2,"0");return`${e.getFullYear()}-${f(e.getMonth()+1)}-${f(e.getDate())}`}function bf({tasks:e,googleEvents:f=[],statusOptions:g,todayStr:l,onOpenDetail:o,onAddSchedule:s,myAccountSeq:r=0,avatarSrcByName:t,fallbackToStartDate:n=!1}){let c=ht(),i=(0,Ar.useMediaQuery)(Dw),[a,h]=(0,Mn.useState)(()=>gf(new Date)),[d,u]=(0,Mn.useState)(!1),b=(0,Mn.useMemo)(()=>{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:Hg(y),dayNumber:p+1,weekday:y.getDay()}})},[a]),m=(0,Mn.useMemo)(()=>{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($s);return S},[e,n]),x=(0,Mn.useMemo)(()=>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,I]=(0,Mn.useState)(null),M=(0,Mn.useMemo)(()=>cs(f),[f]),z=(0,Mn.useMemo)(()=>[a.getFullYear()],[a]),O=Wo(z),P=(0,Mn.useRef)(null),N=l.slice(0,7)===Hg(a).slice(0,7);(0,Mn.useEffect)(()=>{if(!N)return;let S=()=>{let y=P.current,v=$g(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 $=(0,Mn.useRef)(null),L=(0,Mn.useRef)(null),C=S=>{h(p=>new Date(p.getFullYear(),p.getMonth()+S,1));let D=$g($.current);D&&D.scrollTo({top:0,behavior:"auto"})};return(0,cr.jsxs)(Ar.Box,{ref:$,onTouchStart:S=>{let D=S.touches[0];L.current=D?{x:D.clientX,y:D.clientY}:null},onTouchEnd:S=>{let D=L.current;L.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)||C(y<0?1:-1)},sx:{minWidth:0,maxWidth:"100%",overflow:"hidden",bgcolor:c.colors.surface},children:[(0,cr.jsxs)(Ar.Box,{sx:{display:"flex",alignItems:"center",gap:.5,px:1.5,py:1,flexShrink:0},children:[(0,cr.jsx)(Ar.IconButton,{size:"small","aria-label":"\uC774\uC804 \uB2EC",onClick:()=>C(-1),children:(0,cr.jsx)(Wg.default,{sx:{fontSize:24,color:c.colors.textSecondary}})}),(0,cr.jsx)(Ar.Button,{size:"small",color:"inherit",onClick:()=>h(gf(new Date)),sx:{minWidth:0,px:1,fontSize:15.5,color:c.mode==="dark"?c.colors.textStrong:c.colors.textPrimary},children:"\uC624\uB298"}),(0,cr.jsx)(Ar.IconButton,{size:"small","aria-label":"\uB2E4\uC74C \uB2EC",onClick:()=>C(1),children:(0,cr.jsx)(Ug.default,{sx:{fontSize:24,color:c.colors.textSecondary}})}),(0,cr.jsxs)(Ar.Box,{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",(0,cr.jsx)(Vg.default,{sx:{fontSize:20,color:c.colors.textMuted}})]})]}),(0,cr.jsxs)(Ar.Box,{sx:{minWidth:0,overflowX:"hidden",borderTop:`1px solid ${c.calendar.borderColor}`},children:[x.length>0?(0,cr.jsxs)(Ar.Box,{sx:{display:"flex",alignItems:"center",gap:1,px:1,py:.75,minWidth:0,maxWidth:"100%",flexShrink:0,borderBottom:`1px solid ${c.calendar.borderColor}`},children:[(0,cr.jsxs)(Ar.Box,{sx:{width:52,flexShrink:0,fontSize:12.5,lineHeight:1.3,color:c.colors.textSecondary,textAlign:"center"},children:["\uB0A0\uC9DC",(0,cr.jsx)("br",{}),"\uC5C6\uC74C"]}),(0,cr.jsx)(Ar.Box,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",gap:.5},children:x.map(S=>(0,cr.jsx)(Ei,{task:S,statusOptions:g,onOpenDetail:o,isMine:r>0&&Number(S.manager_account_seq??0)===r,avatarSrcByName:t,showManagerAvatar:!0,onOpenMembers:I},S.seq))})]}):null,b.map(({ymd:S,dayNumber:D,weekday:p})=>{let y=O.get(S)??"",v=S===l,w=!!y||p===0,_=m.get(S)??[],T=M.get(S)??[],R=_.length>0||T.length>0;return(0,cr.jsxs)(Ar.Box,{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:R?.75:.5,minHeight:44,flexShrink:0,borderBottom:`1px solid ${c.calendar.borderColor}`,...s?{cursor:"pointer"}:{}},children:[(0,cr.jsx)(Ar.Box,{sx:{width:52,flexShrink:0,display:"flex",flexDirection:"column",alignItems:"center",gap:.25},children:(0,cr.jsxs)(Ar.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:.25,"@media (min-width:600px)":{flexDirection:"row",gap:.75}},children:[(0,cr.jsx)(Ar.Box,{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}),(0,cr.jsx)(Ar.Box,{component:"span",sx:{fontSize:13,color:w?c.colors.danger:p===6?c.colors.accentOnSurface:c.colors.textSecondary},children:Aw[p]})]})}),(0,cr.jsxs)(Ar.Box,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",gap:.5},children:[T.map(F=>(0,cr.jsx)(us,{event:F},F.uid)),_.map(F=>{let H=qs(F),V=(0,cr.jsx)(Ei,{task:F,statusOptions:g,onOpenDetail:o,isMine:r>0&&Number(F.manager_account_seq??0)===r,avatarSrcByName:t,showManagerAvatar:!0,onOpenMembers:I,showTime:!i,wrapTitle:!0},F.seq);return i?(0,cr.jsxs)(Ar.Box,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[(0,cr.jsx)(Ar.Box,{component:"span",sx:{width:44,flexShrink:0,textAlign:"right",fontSize:13.5,fontWeight:400,opacity:1,color:H?F.completed?c.colors.textPrimary:c.colors.danger:"transparent"},children:H||"00:00"}),(0,cr.jsx)(Ar.Box,{sx:{flex:1,minWidth:0},children:V})]},F.seq):V})]})]},S)})]}),(0,cr.jsx)(qg,{task:k,avatarSrcByName:t,onClose:()=>I(null)}),(0,cr.jsx)(Kg.DatePicker,{open:d,centered:!0,monthOnly:!0,onClose:()=>u(!1),selectedDate:a,onDateChange:S=>{h(gf(S)),u(!1)}})]})}var en=require("react"),Tr=require("@mui/material"),Xg=Y(require("@ehfuse/overlay-scrollbar"),1),Zg=Y(require("@mui/icons-material/CheckCircle"),1),Jg=Y(require("@mui/icons-material/RadioButtonUnchecked"),1),Vo=require("@dnd-kit/core"),Ri=require("@dnd-kit/sortable");var Qg=Y(require("@mui/icons-material/DragIndicator"),1);var Gt=require("react/jsx-runtime"),yf=36,Pw=48,Gg=40,Nw=24,Lw=4,zw=14,Yg=36,jw=12.5,Vs=220,Fw={high:{bg:"#f6c6c9",border:"#e5484d"},medium:{bg:"#c5d8f6",border:"#2f80ed"},low:{bg:"#f3e3b6",border:"#d9a514"}};function fs(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 _c(e,f){let g=new Date(e);return g.setDate(g.getDate()+f),g}function xf(e,f){return Math.round((f.getTime()-e.getTime())/864e5)}function qw({task:e,dragHandle:f,onPointerDown:g,onClick:l}){let o=ht(),s=(0,en.useRef)(null),[r,t]=(0,en.useState)("");return(0,Gt.jsx)(Tr.Tooltip,{title:r,arrow:!0,enterDelay:300,children:(0,Gt.jsxs)(Tr.Box,{onPointerDown:g,onClick:n=>l(e,n),onMouseEnter:()=>{let n=s.current;t(n&&n.scrollWidth>n.clientWidth?e.title:"")},sx:{width:Vs,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,(0,Gt.jsx)(Tr.Box,{ref:s,component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.title})]})})}function $w({id:e,showIndicator:f,children:g}){let l=ht(),{attributes:o,listeners:s,setNodeRef:r}=(0,Ri.useSortable)({id:e});return(0,Gt.jsxs)(Tr.Box,{ref:r,sx:{position:"relative"},children:[f?(0,Gt.jsx)(Tr.Box,{sx:{position:"absolute",top:-1,left:0,right:0,height:2,bgcolor:l.colors.accentOnSurface,zIndex:5}}):null,g({...o,...s})]})}function vf({tasks:e,hideCompletedChecklist:f=!1,todayStr:g,onOpenDetail:l,onToggleChecklist:o,onReorderTasks:s,onTaskContextMenu:r}){let t=ht(),[n,c]=(0,en.useState)(null),i=(0,en.useMemo)(()=>[...e].sort((v,w)=>{let _=(v.timeline_sort_no??0)>0,T=(w.timeline_sort_no??0)>0;if(_&&T)return(v.timeline_sort_no??0)-(w.timeline_sort_no??0);if(_!==T)return _?-1:1;let R=v.due_date||v.start_date,F=w.due_date||w.start_date;return R!==F?R<F?-1:1:v.seq-w.seq}),[e]),[a,h]=(0,en.useState)(null),[d,u]=(0,en.useState)(null),b=(0,Vo.useSensors)((0,Vo.useSensor)(Vo.PointerSensor,{activationConstraint:{distance:4}})),m=(0,en.useCallback)(v=>{h(v.over?Number(v.over.id):null)},[]),x=(0,en.useCallback)(v=>{h(null),u(null);let{active:w,over:_}=v;if(!_||w.id===_.id)return;let T=i.map(H=>H.seq),R=T.indexOf(Number(w.id)),F=T.indexOf(Number(_.id));R===-1||F===-1||s((0,Ri.arrayMove)(T,R,F))},[i,s]),k=(0,en.useMemo)(()=>{let v=fs(g)??new Date,w=v,_=_c(v,21);for(let F of i){let H=fs(F.start_date)??fs(F.due_date),V=fs(F.due_date)??H;H&&H<w&&(w=H),V&&V>_&&(_=V)}let T=_c(w,-3),R=xf(T,_c(_,3))+1;return Array.from({length:R},(F,H)=>_c(T,H))},[i,g]),I=k[0],M=k.findIndex(v=>Zr(v)===g),{dayWidths:z,dayOffsets:O,gridWidth:P}=(0,en.useMemo)(()=>{let v=k.map((T,R)=>T.getDate()===1||R===0?Pw:yf),w=[],_=0;for(let T of v)w.push(_),_+=T;return{dayWidths:v,dayOffsets:w,gridWidth:_}},[k]),N=Vs+P,$=(0,en.useRef)(null),L=v=>{$.current={x:v.clientX,y:v.clientY}},C=(v,w)=>{let _=$.current;$.current=null,!(_&&(Math.abs(w.clientX-_.x)>5||Math.abs(w.clientY-_.y)>5))&&l(v)},S=(0,en.useRef)(null),[D,p]=(0,en.useState)(!1);(0,en.useEffect)(()=>{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=(0,en.useRef)(!1);return(0,en.useEffect)(()=>{if(i.length===0||y.current)return;y.current=!0;let v=window.requestAnimationFrame(()=>{let w=S.current?.getScrollContainer();!w||M<0||(w.scrollLeft=Math.max(0,O[M]-yf*3))});return()=>window.cancelAnimationFrame(v)},[i.length]),(0,Gt.jsxs)(Tr.Box,{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:[(0,Gt.jsx)(Tr.Box,{sx:{flex:1,minHeight:0,minWidth:0,contain:"inline-size"},children:(0,Gt.jsx)(Xg.default,{ref:S,style:{height:"100%"},contentStyle:{width:"max-content",minWidth:"100%"},thumb:{width:8},showHorizontalScrollbar:!0,dragScroll:{excludeClasses:["taskbox-timeline-handle"]},children:(0,Gt.jsxs)(Tr.Box,{sx:{width:N,position:"relative",bgcolor:t.timeline.bg},children:[(0,Gt.jsxs)(Tr.Box,{sx:{display:"flex",position:"sticky",top:0,zIndex:3,bgcolor:t.timeline.headerBg,borderBottom:`1px solid ${t.timeline.gridColor}`},children:[(0,Gt.jsx)(Tr.Box,{sx:{width:Vs,height:Yg,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(),T=w===M,R=v.getDate()===1||w===0;return(0,Gt.jsx)(Tr.Box,{sx:{width:z[w],height:Yg,flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",fontSize:jw,fontWeight:T&&t.mode!=="dark"?700:400,color:T?t.timeline.bg:_===0?t.colors.danger:_===6?t.colors.accentOnSurface:t.colors.textSecondary,bgcolor:T?t.colors.danger:"transparent",borderRight:`1px solid ${t.timeline.gridColor}`,whiteSpace:"nowrap"},children:R?`${v.getMonth()+1}/${v.getDate()}`:v.getDate()},Zr(v))})]}),(0,Gt.jsx)(Vo.DndContext,{sensors:b,collisionDetection:Vo.closestCenter,onDragStart:v=>u(Number(v.active.id)),onDragOver:m,onDragEnd:x,onDragCancel:()=>{h(null),u(null)},children:(0,Gt.jsx)(Ri.SortableContext,{items:i.map(v=>String(v.seq)),strategy:Ri.verticalListSortingStrategy,children:(0,Gt.jsxs)(Tr.Box,{sx:{position:"relative"},children:[k.map((v,w)=>{let _=v.getDay(),T=w===M;return!T&&_!==0&&_!==6?null:(0,Gt.jsx)(Tr.Box,{sx:{position:"absolute",top:0,bottom:0,left:Vs+O[w],width:z[w],bgcolor:T?"rgba(229,72,77,0.07)":t.colors.surfaceSubtle,zIndex:0}},`stripe-${Zr(v)}`)}),i.map((v,w)=>{let _=fs(v.start_date)??fs(v.due_date),T=fs(v.due_date)??_,R=_?Math.min(k.length-1,Math.max(0,xf(I,_))):0,F=T?Math.min(k.length-1,Math.max(R,xf(I,T))):R,H=Fw[v.priority],V=Vs+O[R]+2,A=O[F]+z[F]-O[R]-4,q=(v.checklist??[]).map((B,E)=>({entry:B,index:E})).filter(({entry:B})=>!f||!B.checked);return(0,Gt.jsx)($w,{id:String(v.seq),showIndicator:a===v.seq&&d!==v.seq,children:B=>(0,Gt.jsxs)(Tr.Box,{sx:{borderBottom:w===i.length-1&&D?"none":`1px solid ${t.timeline.gridColor}`,position:"relative",zIndex:1,opacity:d===v.seq?.45:1},children:[(0,Gt.jsxs)(Tr.Box,{onContextMenu:E=>r(v,E),sx:{display:"flex",height:Gg,position:"relative","&:hover":{bgcolor:"rgba(47,128,237,0.04)"}},children:[(0,Gt.jsx)(qw,{task:v,dragHandle:(0,Gt.jsx)(Tr.Box,{component:"span",className:"taskbox-timeline-handle",...B,onClick:E=>E.stopPropagation(),sx:{display:"inline-flex",alignItems:"center",flexShrink:0,color:t.colors.accentOnSurface,cursor:"grab",touchAction:"none","&:hover":{color:t.colors.accentOnSurface}},children:(()=>{let E=(v.is_notice||v.is_event?$t(v.icon||(v.is_notice?$r:Yr)):null)??Qg.default;return(0,Gt.jsx)(E,{sx:{fontSize:17}})})()}),onPointerDown:L,onClick:C}),(0,Gt.jsx)(Tr.Tooltip,{title:`${v.title} (${v.start_date||"?"} ~ ${v.due_date||"?"})`,arrow:!0,enterDelay:300,children:(0,Gt.jsx)(Tr.Box,{onPointerDown:L,onClick:E=>C(v,E),sx:{position:"absolute",top:(Gg-20)/2,left:V,width:Math.max(yf-4,A),height:20,borderRadius:1,bgcolor:H.bg,border:`1px solid ${H.border}`,opacity:v.completed?.45:1,cursor:"pointer","&:hover":{filter:"brightness(0.95)"}}})})]}),q.map(({entry:E,index:j},U)=>(0,Gt.jsx)(Tr.Box,{sx:{display:"flex",height:Nw,position:"relative",mt:U===0?`${Lw}px`:0,mb:U===q.length-1?`${zw}px`:0},children:(0,Gt.jsx)(Tr.Box,{sx:{width:Vs,flexShrink:0,position:"sticky",left:0,zIndex:2,bgcolor:t.timeline.bg,borderRight:`1px solid ${t.timeline.gridColor}`,display:"flex",alignItems:"center",pl:4.25,pr:1.5,fontSize:13,color:E.checked?t.colors.textMuted:t.colors.textPrimary},children:(0,Gt.jsxs)(Tr.Box,{onClick:X=>c({anchorEl:X.currentTarget,taskSeq:v.seq,index:j,checked:!E.checked}),sx:{display:"inline-flex",alignItems:"center",gap:.75,minWidth:0,cursor:"pointer"},children:[E.checked?(0,Gt.jsx)(Zg.default,{sx:{fontSize:17,color:t.colors.accentOnSurface,flexShrink:0}}):(0,Gt.jsx)(Jg.default,{sx:{fontSize:17,color:t.colors.textMuted,flexShrink:0}}),(0,Gt.jsx)(Tr.Box,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",textDecoration:E.checked?"line-through":"none"},children:E.label})]})})},`${v.seq}-check-${j}`))]})},v.seq)}),i.length===0?(0,Gt.jsx)(Tr.Box,{sx:{py:8,textAlign:"center",color:t.colors.textMuted,fontSize:14},children:"\uD45C\uC2DC\uD560 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):null]})})})]})})}),(0,Gt.jsx)(Qt,{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)}})]})}var Oi=require("react/jsx-runtime");function Hw(e){switch(e.view){case"card":case"kanban":{let{view:f,...g}=e;return(0,Oi.jsx)(gc,{...g,columnAxis:f==="kanban"?"status":"project"})}case"sprint":{let{view:f,...g}=e;return(0,Oi.jsx)(gc,{...g,columnAxis:"sprint"})}case"calendar":{let{view:f,...g}=e;return(0,Oi.jsx)(hf,{...g})}case"month":{let{view:f,...g}=e;return(0,Oi.jsx)(mf,{...g})}case"agenda":{let{view:f,...g}=e;return(0,Oi.jsx)(bf,{...g})}case"timeline":{let{view:f,...g}=e;return(0,Oi.jsx)(vf,{...g})}default:{let{view:f,...g}=e;return(0,Oi.jsx)(Xu,{...g})}}}var Ww=["list","card","kanban","calendar","month","timeline"];var Qn=require("@mui/material");var tn=require("react/jsx-runtime");function wf(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 _f({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=ht(),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?(0,tn.jsx)(Qn.Box,{sx:{flex:c?"0 0 110px":"1 1 auto",minWidth:0,height:i.summary.gaugeHeight,borderRadius:3,bgcolor:i.summary.gaugeTrackColor},children:(0,tn.jsx)(Qn.Box,{sx:{height:"100%",borderRadius:3,width:`${d}%`,bgcolor:d>=100?i.summary.gaugeCompleteColor:i.summary.gaugeBarColor,transition:"width 0.2s"}})}):null,x=g?(0,tn.jsxs)(Qn.Box,{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},I=a.length-h,M=(0,tn.jsxs)(tn.Fragment,{children:[c?null:(0,tn.jsxs)("span",{children:["\uB0A8\uC740 ",(0,tn.jsx)(Qn.Box,{component:"span",sx:k,children:I}),"\uAC74"]}),t&&u>0?(0,tn.jsxs)(Qn.Box,{component:"span",sx:{color:i.summary.overdueColor,fontWeight:600},children:["\uC9C0\uC5F0"," ",(0,tn.jsx)(Qn.Box,{component:"span",sx:{fontWeight:700,fontSize:c?15:14},children:u}),"\uAC74"]}):null,s&&b>0?(0,tn.jsxs)("span",{children:[(0,tn.jsx)(Qn.Box,{component:"span",sx:k,children:b}),"SP"]}):null]}),z=typeof o=="number"&&Number.isFinite(o)?(0,tn.jsxs)("span",{children:["\uADFC\uBB34\uC77C ",(0,tn.jsx)(Qn.Box,{component:"span",sx:k,children:o}),"\uC77C"]}):null,O=typeof l=="number"&&Number.isFinite(l)?(0,tn.jsx)(Qn.Box,{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?(0,tn.jsxs)(Qn.Box,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0,fontSize:14.5,color:i.summary.textColor,whiteSpace:"nowrap",...i.summary.sx},children:[n?M:null,n?z:null,n?O:null,m,x]}):(0,tn.jsxs)(Qn.Box,{sx:{display:"flex",flexDirection:"column",gap:.5},children:[g?(0,tn.jsxs)(Qn.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[m,x]}):null,(0,tn.jsxs)(Qn.Box,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,fontSize:13.5,color:i.summary.textColor},children:[M,z,O]})]})}var tb=require("react");function eb(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 Uw(e){let f=Math.round(e*10)/10;return`${f%1===0?f.toFixed(0):f.toFixed(1)}\uC2DC\uAC04`}function kf(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 Vw(e){return e.reduce((f,g)=>g.completed?f:f+eb(g.estimated_time),0)}var rb=require("react/jsx-runtime");function Kw({sprint:e,tasks:f,todayStr:g,...l}){let o=e.status==="closed"?null:wf(e.end_date,g),s=o!==null&&o>=0,r=(0,tb.useMemo)(()=>{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=Wo(r),n=s?kf(g,e.end_date,new Set(t.keys())):null;return(0,rb.jsx)(_f,{tasks:f,todayStr:g,dday:o,workdaysLeft:n,...l})}var Gs=require("react"),Sc=require("@mui/material");var ob=require("react"),Ks=require("@mui/material"),Ha=require("react/jsx-runtime"),nb={xs:2,md:3};function ib(){return(0,Ha.jsx)(Ks.Box,{sx:{position:"fixed",top:"calc(50% + 30px)",left:"50%",transform:"translate(-50%, -50%)",zIndex:1},children:(0,Ha.jsx)(Ks.CircularProgress,{size:44,thickness:4,sx:{color:"#94a3b8"}})})}function sb({children:e}){return(0,Ha.jsx)(Ks.Box,{sx:{minWidth:0,display:"flex",flexDirection:"column",gap:nb,pb:nb},children:ob.Children.map(e,f=>f==null||f===!1?null:(0,Ha.jsx)(Ks.Box,{sx:{bgcolor:"background.paper",borderRadius:"12px",boxShadow:"0 1px 3px rgba(15,23,42,0.08)",minWidth:0},children:f}))})}var ab=require("react"),Dr=require("@mui/material"),Sf=Y(require("@mui/icons-material/CheckCircle"),1),lb=Y(require("@mui/icons-material/CheckCircleOutlineOutlined"),1);var Wa=require("react/jsx-runtime"),Gw="taskbox-search-highlight";function Yw(e,f){let g=f?.keyPrefix??"hl";return e.map((l,o)=>(0,Wa.jsx)("span",{className:l.highlight?f?.highlightClassName??Gw:f?.className,style:l.highlight?{fontWeight:700,color:"#2563eb"}:void 0,children:l.text},`${g}-${l.text}-${o}`))}function kc({text:e,keyword:f,fallback:g="-",className:l,highlightClassName:o,keyPrefix:s}){let r=String(e??"").trim()||g,t=tc(r,f);return(0,Wa.jsx)(Wa.Fragment,{children:Yw(t,{className:l,highlightClassName:o,keyPrefix:s})})}var kt=require("react/jsx-runtime"),Xw={flexShrink:0,minWidth:64,textAlign:"center",px:.75,py:.35,borderRadius:.75,bgcolor:"#f1f5f9",color:"#64748b",fontSize:mn(12.5),fontWeight:500,lineHeight:1.4},pi={fontSize:mn(14.5),color:"#374151",minWidth:0,lineHeight:1.45};function Mo({label:e,children:f}){return(0,kt.jsxs)(Dr.Box,{sx:{display:"flex",alignItems:"flex-start",gap:1,minWidth:0},children:[(0,kt.jsx)(Dr.Box,{sx:Xw,children:e}),(0,kt.jsx)(Dr.Box,{sx:{...pi,flex:1,pt:.2},children:f})]})}function cb({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?As(e):Xr(e),k=String(e.due_date??"").slice(11,16),I=e.is_event?String(e.event_time??"").trim():/^\d{2}:\d{2}$/.test(k)?k:String(e.estimated_time??"").trim(),M=oo(e.start_date),z=oo(e.due_date),O=M&&I&&!z?`${M} ${I}`:M,P=z&&I?`${z} ${I}`:z,N=ct(),$=!e.is_notice&&e.completed&&!!e.review_pending&&!!N.onReviewDone&&(N.myAccountSeq??0)>0&&(e.author_account_seq??0)===(N.myAccountSeq??0),[L,C]=(0,ab.useState)(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(0,kt.jsxs)(Dr.Box,{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?(0,kt.jsx)(Dr.Box,{sx:{position:"absolute",left:3,top:5,bottom:5,width:3,borderRadius:"999px",bgcolor:"#2f80ed"}}):null,(0,kt.jsxs)(Dr.Box,{sx:{display:"flex",alignItems:"flex-start",gap:.75,minWidth:0,mb:1},children:[e.is_event?(()=>{let y=$t(e.icon||Yr);return y?(0,kt.jsx)(y,{sx:{fontSize:21,flexShrink:0,mt:.2,color:e.icon_color||"#1e3a8a"}}):null})():!d&&!a?(0,kt.jsx)(Dr.Checkbox,{checked:e.completed,icon:(0,kt.jsx)(lb.default,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:(0,kt.jsx)(Sf.default,{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=$t(e.icon||$r);return y?(0,kt.jsx)(y,{sx:{fontSize:19,flexShrink:0,mt:"1px",color:e.icon_color||"#e5484d"}}):null})(),(0,kt.jsx)(Dr.Typography,{sx:{fontSize:mn(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:(0,kt.jsx)(kc,{text:e.title,keyword:l})}),h&&!e.completed?(0,kt.jsx)(Dr.Box,{component:"span",sx:{flexShrink:0,px:.55,fontSize:mn(10.5),fontWeight:700,lineHeight:1.6,color:"#fff",bgcolor:"#e5484d",borderRadius:"4px"},children:"N"}):null]}),(0,kt.jsxs)(Dr.Box,{sx:{display:"flex",flexDirection:"column",gap:.6,minWidth:0},children:[(0,kt.jsx)(Mo,{label:x?"\uC0C1\uD0DC":"\uC911\uC694\uB3C4",children:(0,kt.jsxs)(Dr.Box,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1.25},children:[x?(0,kt.jsx)(ir,{option:x,small:!0}):null,(0,kt.jsx)(Tn,{priority:e.priority,small:!0})]})}),(e.label_keys??[]).length>0?(0,kt.jsx)(Mo,{label:"\uB77C\uBCA8",children:(0,kt.jsx)(ci,{labelKeys:e.label_keys,labelOptions:f})}):null,g?(0,kt.jsx)(Mo,{label:"\uD504\uB85C\uC81D\uD2B8",children:(0,kt.jsx)(Dr.Typography,{sx:pi,children:g})}):null,O?(0,kt.jsx)(Mo,{label:"\uC2DC\uC791",children:(0,kt.jsx)(Dr.Typography,{sx:pi,children:O})}):null,P?(0,kt.jsx)(Mo,{label:"\uB9C8\uAC10",children:(0,kt.jsxs)(Dr.Typography,{sx:{...pi,color:D?"#e5484d":pi.color,fontWeight:D?600:400},children:[P,D?" \xB7 \uC9C0\uC5F0":""]})}):null,$?(0,kt.jsxs)(Mo,{label:"\uAC80\uC218",children:[(0,kt.jsx)(Dr.Button,{size:"small",variant:"contained",disableElevation:!0,onClick:y=>{y.stopPropagation(),C(y.currentTarget)},sx:{...os,py:0,fontSize:mn(13)},children:"\uAC80\uC218\uC644\uB8CC"}),(0,kt.jsx)(Ns,{anchorEl:L,onCancel:()=>C(null),onConfirm:()=>{N.onReviewDone?.(e),C(null)}})]}):null,e.is_notice?(0,kt.jsx)(Mo,{label:"\uB300\uC0C1\uC790",children:(0,kt.jsx)(Dr.Typography,{sx:pi,children:c||"\uBAA8\uB4E0 \uC9C1\uC6D0"})}):null,i?(0,kt.jsx)(Mo,{label:"\uD655\uC778",children:(0,kt.jsx)(Dr.Button,{size:"small",variant:i.canAck?"contained":"outlined",color:"inherit",startIcon:i.acked?(0,kt.jsx)(Sf.default,{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:mn(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?(0,kt.jsx)(Mo,{label:"\uCC45\uC784\uC790",children:(0,kt.jsx)(Dr.Typography,{sx:pi,children:(0,kt.jsx)(kc,{text:e.manager_name,keyword:l})})}):null,!e.is_notice&&p.length>0?(0,kt.jsx)(Mo,{label:"\uCC38\uC870\uC790",children:(0,kt.jsx)(Dr.Typography,{sx:pi,children:p.join(", ")})}):null,e.note?(0,kt.jsx)(Mo,{label:"\uBE44\uACE0",children:(0,kt.jsx)(Dr.Typography,{sx:pi,children:(0,kt.jsx)(kc,{text:e.note,keyword:l})})}):null]})]})}var mi=require("react/jsx-runtime");function Zw(e,f){if(e.completed||e.archived||f<=0)return;let g=ls(e,f);if(g.canConfirm)return{count:g.count,total:g.total,acked:!1,canAck:!0,pendingNames:g.pendingNames}}function Jw({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 I=new Map(g.map($=>[$.key,$.label])),[M,z]=(0,Gs.useState)(null),{onReturnTask:O}=ct(),P=M?e.find($=>$.seq===M.taskSeq):void 0,N=(0,Gs.useRef)(null);return(0,Gs.useEffect)(()=>{let $=N.current;if(!x||!$)return;let L=new IntersectionObserver(C=>{C[0]?.isIntersecting&&x()});return L.observe($),()=>L.disconnect()},[x,e.length]),e.length===0?l?(0,mi.jsx)(ib,{}):(0,mi.jsx)(Sc.Box,{sx:{py:6,textAlign:"center",color:"#94a3b8",fontSize:"0.9rem"},children:"\uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):(0,mi.jsxs)(Sc.Box,{sx:{minWidth:0},children:[(0,mi.jsx)(sb,{children:e.map($=>(0,mi.jsx)(cb,{dimCompleted:o,myManaged:k>0&&!$.is_notice&&!$.is_event&&($.manager_account_seq??0)===k,task:$,statusOptions:f,projectLabel:$.tab_key?I.get($.tab_key)??"":"",searchText:s,todayStr:r,onRequestToggleCompleted:z,onOpenDetail:n,onTaskContextMenu:c,targetSummary:$.is_notice?i?.($):void 0,ackInfo:$.is_notice?a?.($):Zw($,k),noticeReadOnly:$.is_notice?h?.($):!1,unread:d?.($)??!1,completeLocked:u?.($)??!1,onAckConfirm:b,onAckListClick:m},$.seq))}),x?(0,mi.jsx)(Sc.Box,{ref:N,sx:{height:"1px"}}):null,(0,mi.jsx)(Kn,{open:!!M,anchorEl:M?.anchorEl??null,nextCompleted:M?.nextCompleted??!1,returnMode:!!O&&!!(P&&Vn(P,k)),onCancel:()=>z(null),onConfirm:$=>{M&&($&&O&&P?O(P,$):t(M.taskSeq,M.nextCompleted)),z(null)}})]})}var Ys=require("react"),tr=require("@mui/material"),fb=Y(require("@mui/icons-material/CheckCircle"),1),db=Y(require("@mui/icons-material/CheckCircleOutlineOutlined"),1),hb=Y(require("@mui/icons-material/NotesOutlined"),1),pb=Y(require("@mui/icons-material/AutorenewOutlined"),1),mb=Y(require("@mui/icons-material/CalendarTodayOutlined"),1),gb=Y(require("@mui/icons-material/EventOutlined"),1),bb=Y(require("@mui/icons-material/PersonOutlineOutlined"),1),yb=Y(require("@mui/icons-material/PeopleAltOutlined"),1),xb=Y(require("@mui/icons-material/StickyNote2Outlined"),1);var bt=require("react/jsx-runtime"),Tf={completed:{label:"\uC644\uB8CC",width:"44px",align:"center",icon:null},title:{label:"\uC81C\uBAA9",width:"1fr",align:"left",icon:(0,bt.jsx)(hb.default,{sx:{fontSize:15}})},manager_name:{label:"\uCC45\uC784\uC790",width:"112px",align:"center",icon:(0,bt.jsx)(bb.default,{sx:{fontSize:15}})},receiver_names:{label:"\uCC38\uC870\uC790",width:"120px",align:"center",icon:(0,bt.jsx)(yb.default,{sx:{fontSize:15}})},status:{label:"\uC0C1\uD0DC",width:"104px",align:"center",icon:(0,bt.jsx)(pb.default,{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:(0,bt.jsx)(mb.default,{sx:{fontSize:15}})},due_date:{label:"\uB9C8\uAC10\uC608\uC815",width:"110px",align:"center",icon:(0,bt.jsx)(gb.default,{sx:{fontSize:15}})},note:{label:"\uBE44\uACE0",width:"1fr",align:"left",icon:(0,bt.jsx)(xb.default,{sx:{fontSize:15}})}},vb=[{id:"completed"},{id:"title"},{id:"manager_name"},{id:"due_date"},{id:"status"}],Qw=new Set(["manager_name","status","due_date"]);function ub(e){let f=String(e??"").trim();return f?f.slice(2,10).replaceAll("-","."):""}function e_(e,f){return f>0?e.filter(g=>!g.is_notice&&!g.completed&&!g.archived&&ho(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 t_({tasks:e,columns:f=vb,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=ht(),[m,x]=(0,Ys.useState)(null),[k,I]=(0,Ys.useState)(null),[M,z]=(0,Ys.useState)(null),[O,P]=(0,Ys.useState)(null),{onReturnTask:N}=ct(),[$,L]=(0,Ys.useState)(null),C=f.map(p=>p.width??Tf[p.id].width).join(" "),S=(p,y)=>(0,bt.jsx)(po,{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=Tf[p.id].align==="center";switch(p.id){case"completed":if(y.is_event){let _=$t(y.icon||Yr);return(0,bt.jsx)(tr.Box,{className:"cell",sx:{justifyContent:"center"},children:_?(0,bt.jsx)(_,{sx:{fontSize:19,color:y.icon_color||"#1e3a8a"}}):null},p.id)}return(0,bt.jsx)(tr.Box,{className:"cell",sx:{justifyContent:"center",...c?{"&:hover":{bgcolor:b.table.cellHoverBg}}:{}},children:(0,bt.jsx)(tr.Tooltip,{title:y.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC",arrow:!0,enterDelay:300,disableInteractive:!0,children:(0,bt.jsx)(tr.Checkbox,{checked:!!y.completed,icon:(0,bt.jsx)(db.default,{sx:{fontSize:20,color:"#9a9a97",opacity:.45}}),checkedIcon:(0,bt.jsx)(fb.default,{sx:{fontSize:20,color:"#2f80ed"}}),onChange:_=>P({anchorEl:_.currentTarget,task:y}),sx:{p:.5}})})},p.id);case"title":{let _=y.is_notice?$t(y.icon||$r):null,T=y.icon_color||"#e5484d";return(0,bt.jsxs)(tr.Box,{className:"cell",onClick:()=>n(y),sx:{gap:1,cursor:"pointer","&:hover":{bgcolor:b.table.cellHoverBg}},children:[_?(0,bt.jsx)(_,{sx:{fontSize:18,flexShrink:0,color:T}}):null,(0,bt.jsx)(tr.Box,{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,T=o>0&&Number(y.manager_account_seq??0)===o;return _&&d?(0,bt.jsxs)(tr.Box,{className:"cell",onClick:R=>z({anchorEl:R.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,(0,bt.jsx)(tr.Box,{component:"span",sx:{fontSize:14,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:y.manager_name||""})]},p.id):(0,bt.jsx)(tr.Box,{className:"cell",sx:{gap:.75,justifyContent:"center"},children:y.manager_name?(0,bt.jsxs)(bt.Fragment,{children:[S(y.manager_name,22),(0,bt.jsx)(tr.Box,{component:"span",sx:{fontSize:14,fontWeight:T?600:400,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:y.manager_name})]}):u?(0,bt.jsx)(Co,{onClick:R=>L({anchorEl:R.currentTarget,taskSeq:Number(y.seq)}),children:"\uAC00\uC838\uAC00\uAE30"}):null},p.id)}case"receiver_names":return(0,bt.jsx)(tr.Box,{className:"cell",sx:{justifyContent:"center",fontSize:14,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:(y.receiver_names??[]).join(", ")},p.id);case"status":return(0,bt.jsx)(tr.Box,{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:(0,bt.jsx)(ir,{option:Xr(y)})},p.id);case"priority":return(0,bt.jsx)(tr.Box,{className:"cell",sx:{justifyContent:"center"},children:(0,bt.jsx)(Tn,{priority:y.priority,plain:!0})},p.id);case"start_date":return(0,bt.jsx)(tr.Box,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap",fontSize:14},children:ub(y.start_date)},p.id);case"due_date":return(0,bt.jsx)(tr.Box,{className:"cell",onClick:a?_=>I({anchorEl:_.currentTarget,taskSeq:Number(y.seq),date:String(y.due_date??"").slice(0,10),reminders:Bo(y)}):void 0,sx:{justifyContent:"center",whiteSpace:"nowrap",fontSize:14,...a?{cursor:"pointer","&:hover":{bgcolor:b.table.cellHoverBg}}:{}},children:ub(y.due_date)},p.id);case"note":return(0,bt.jsx)(tr.Box,{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(0,bt.jsxs)(tr.Box,{sx:{border:`1px solid ${b.table.borderColor}`,borderRadius:1,overflow:"hidden",bgcolor:b.table.bg,color:b.table.rowColor},children:[(0,bt.jsx)(tr.Box,{sx:{display:"grid",gridTemplateColumns:C,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=Tf[p.id];return(0,bt.jsxs)(tr.Box,{sx:{justifyContent:y.align==="center"?"center":"flex-start",color:Qw.has(p.id)?b.table.headerActiveColor:b.table.headerColor},children:[y.icon,p.label??y.label]},p.id)})}),g?(0,bt.jsx)(tr.Box,{sx:{py:3,textAlign:"center",color:b.table.emptyColor,fontSize:14},children:"\uBD88\uB7EC\uC624\uB294 \uC911\u2026"}):e.length===0?(0,bt.jsx)(tr.Box,{sx:{py:3,textAlign:"center",color:b.table.emptyColor,fontSize:14},children:l}):e.map((p,y)=>(0,bt.jsx)(tr.Box,{sx:{display:"grid",gridTemplateColumns:C,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)),(0,bt.jsx)(rs,{anchorEl:m?.anchorEl??null,value:String(m?.task.status??""),options:m?va(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)}),(0,bt.jsxs)(tr.Menu,{anchorEl:M?.anchorEl??null,open:!!M,onClose:()=>z(null),transitionDuration:0,children:[(0,bt.jsxs)(tr.MenuItem,{onClick:()=>{M&&d?.(Number(M.task.seq),"",0),z(null)},sx:{fontSize:14,minWidth:170,gap:1,color:b.table.headerColor},children:[(0,bt.jsx)(tr.Box,{sx:{width:24,flexShrink:0}}),"\uC9C0\uC815 \uC548 \uD568"]}),r.map(p=>(0,bt.jsxs)(tr.MenuItem,{selected:Number(M?.task.manager_account_seq??0)===Number(p.account_seq??0),onClick:()=>{M&&d?.(Number(M.task.seq),p.name,Number(p.account_seq??0)),z(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[S(p.name,24),p.name,p.role_name?(0,bt.jsx)(tr.Box,{component:"span",sx:{color:b.table.headerColor,fontSize:13},children:p.role_name}):null]},p.seq))]}),(0,bt.jsx)(io,{anchorEl:k?.anchorEl??null,open:!!k,date:k?.date??"",reminders:k?.reminders??[],hideReminder:!h,onClose:()=>I(null),onDateChange:p=>{k&&(a?.(k.taskSeq,p),I(y=>y?{...y,date:p}:null))},onReminderChange:p=>{k&&(h?.(k.taskSeq,p),I(y=>y?{...y,reminders:p}:null))}}),(0,bt.jsx)(Kn,{open:!!O,anchorEl:O?.anchorEl??null,nextCompleted:!O?.task.completed,returnMode:!!N&&!!(O&&Vn(O.task,o)),onCancel:()=>P(null),onConfirm:p=>{O&&(p&&N?N(O.task,p):c?.(O.task,!O.task.completed)),P(null)}}),(0,bt.jsx)(Qt,{open:!!$,anchorEl:$?.anchorEl??null,title:"\uC774 \uC5C5\uBB34\uB97C \uB9E1\uC744\uAE4C\uC694?",confirmText:"\uAC00\uC838\uAC00\uAE30",onCancel:()=>L(null),onConfirm:()=>{$&&u?.($.taskSeq),L(null)}})]})}var Xs=[{value:"daily",label:"\uB9E4\uC77C"},{value:"weekly",label:"\uB9E4\uC8FC"},{value:"monthly",label:"\uB9E4\uC6D4"},{value:"yearly",label:"\uB9E4\uB144"}];function Ua(e){return Xs.find(f=>f.value===e)?.label??"\uC5C6\uC74C"}function r_(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 Va(e,f){let g=r_(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 n_(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)}function Cf(e,f){let g=String(e??"").slice(0,10);if(!n_(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 wb(e,f,g){return{title:String(e.title??"").trim(),content:String(e.content??""),start_date:Cf(f,e.start_offset_days),due_date:Cf(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 Bf(e,f){let g=Number(e.group_seq)||0;return(e.items??[]).map(l=>wb(l,f,g)).filter(l=>l.title.length>0)}function o_(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`}var hs=require("react"),Br=require("@mui/material"),N1=Y(require("@mui/icons-material/Close"),1),L1=Y(require("@ehfuse/overlay-scrollbar"),1),z1=require("@ehfuse/mui-form-dialog");var ta=require("react"),_r=require("@mui/material"),B1=Y(require("@mui/icons-material/SubjectOutlined"),1),I1=Y(require("@mui/icons-material/StickyNote2Outlined"),1),E1=Y(require("@mui/icons-material/LabelOutlined"),1),M1=Y(require("@mui/icons-material/DirectionsRunOutlined"),1),Wf=Y(require("@mui/icons-material/LockOutlined"),1),Uf=Y(require("@mui/icons-material/PublicOutlined"),1),Vf=Y(require("@mui/icons-material/Group"),1),R1=Y(require("@mui/icons-material/Repeat"),1),O1=Y(require("@mui/icons-material/EventOutlined"),1),A1=Y(require("@mui/icons-material/SpeedOutlined"),1),D1=require("@ehfuse/mui-form-controls"),Kf=require("@ehfuse/alerts");var Di=require("react"),dn=require("@mui/material"),Bb=Y(require("@mui/icons-material/Add"),1),Ga=Y(require("@mui/icons-material/Check"),1),Ib=Y(require("@mui/icons-material/ViewKanbanOutlined"),1),Eb=Y(require("@mui/icons-material/CalendarTodayOutlined"),1),Mb=Y(require("@mui/icons-material/EventOutlined"),1),Rb=Y(require("@mui/icons-material/PersonOutlineOutlined"),1),Ef=Y(require("@mui/icons-material/PeopleAltOutlined"),1),Ob=Y(require("@mui/icons-material/FlagOutlined"),1),Ab=Y(require("@mui/icons-material/TimerOutlined"),1),Db=Y(require("@mui/icons-material/NotificationsNoneOutlined"),1),Pb=Y(require("@mui/icons-material/InboxOutlined"),1),Nb=Y(require("@mui/icons-material/PlaceOutlined"),1),Lb=Y(require("@mui/icons-material/MapOutlined"),1),zb=require("@ehfuse/mui-datetime-picker");var jb=require("@ehfuse/alerts");var yo="@media (max-width: 719.95px)";function Ro(e){return{[yo]:{order:e}}}var Tc=require("react"),_b=require("@mui/material");var kb=require("react/jsx-runtime");function Ko({value:e,placeholder:f,readOnly:g,onCommit:l}){let o=ht(),[s,r]=(0,Tc.useState)(e);return(0,Tc.useEffect)(()=>r(e),[e]),(0,kb.jsx)(_b.Box,{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"}}})}var Cc=require("@mui/material");var Ka=require("react/jsx-runtime");function It({icon:e,label:f,onClick:g,sx:l,children:o}){return(0,Ka.jsxs)(Cc.Box,{sx:[{display:"flex",alignItems:"center",minHeight:32},...Array.isArray(l)?l:[l]],children:[(0,Ka.jsxs)(Cc.Box,{sx:{display:"flex",alignItems:"center",gap:1,width:104,flexShrink:0,fontSize:13.5,color:"#787774"},children:[e,f]}),(0,Ka.jsx)(Cc.Box,{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,[yo]:{py:.25}},children:o})]})}var Fb=Y(require("@mui/icons-material/StorefrontOutlined"),1),qb=Y(require("@mui/icons-material/SupportAgentOutlined"),1);var gi=require("react"),jn=require("@mui/material"),Sb=Y(require("@mui/icons-material/Close"),1),Tb=Y(require("@mui/icons-material/Search"),1);var fn=require("react/jsx-runtime");function i_(e){return(0,fn.jsx)(jn.Box,{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 s_=(0,gi.lazy)(()=>import("react-daum-postcode").then(e=>({default:e.default})).catch(()=>({default:i_})));function a_(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 If({value:e,placeholder:f="\uC8FC\uC18C \uC785\uB825",readOnly:g,onCommit:l}){let[o,s]=(0,gi.useState)(e),[r,t]=(0,gi.useState)(!1),n=ct().slots?.addressSearch;(0,gi.useEffect)(()=>s(e),[e]);let c=a=>{s(a),t(!1),a!==e&&l(a)};return(0,fn.jsxs)(fn.Fragment,{children:[(0,fn.jsxs)(jn.Box,{sx:{display:"flex",alignItems:"center",gap:.5,flex:1,minWidth:0},children:[(0,fn.jsx)(jn.Box,{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:(0,fn.jsx)(jn.Tooltip,{title:"\uC8FC\uC18C \uAC80\uC0C9",arrow:!0,children:(0,fn.jsx)(jn.IconButton,{tabIndex:-1,size:"small","aria-label":"\uC8FC\uC18C \uAC80\uC0C9",onClick:()=>t(!0),sx:{color:"#9a9a97",p:.25,flexShrink:0},children:(0,fn.jsx)(Tb.default,{sx:{fontSize:17}})})})]}),n?(0,fn.jsx)(n,{open:r,onComplete:c,onClose:()=>t(!1)}):(0,fn.jsxs)(jn.Dialog,{open:r,onClose:()=>t(!1),maxWidth:"sm",fullWidth:!0,slotProps:{paper:{sx:{height:550}}},children:[(0,fn.jsxs)(jn.DialogTitle,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",pr:2},children:["\uC8FC\uC18C \uAC80\uC0C9",(0,fn.jsx)(jn.IconButton,{"aria-label":"\uC8FC\uC18C \uAC80\uC0C9 \uB2EB\uAE30",onClick:()=>t(!1),size:"small",children:(0,fn.jsx)(Sb.default,{})})]}),(0,fn.jsx)(jn.DialogContent,{style:{padding:0},dividers:!0,children:r?(0,fn.jsx)(gi.Suspense,{fallback:null,children:(0,fn.jsx)(s_,{onComplete:a=>{c(a_(a))},onClose:()=>t(!1),defaultQuery:o,style:{width:"100%",height:"100%"}})}):null})]})]})}var je=require("react/jsx-runtime");function Cb(e){return String(e??"").includes(" ")?Gn(e):oo(e)}function l_(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 Ai({label:e="\uBE44\uC5B4 \uC788\uC74C"}){return(0,je.jsx)(dn.Box,{component:"span",sx:{color:"#9a9a97"},children:e})}var zr=e=>({gridColumn:`${e}`,[yo]:{gridColumn:"auto"}});function Ya({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:I,supportOrigin:M,trailing:z,onChangeProject:O,onChangeStartDate:P,onChangeDueDate:N,onChangeReminder:$,onChangePriority:L,onChangeEventTime:C,onChangeEventPlace:S,onChangeEventAddress:D,onMemberEdit:p,onAddProject:y}){let[v,w]=(0,Di.useState)(null),[_,T]=(0,Di.useState)(!1),R=d??h,[F,H]=(0,Di.useState)(null),[V,A]=(0,Di.useState)(null),[q,B]=(0,Di.useState)(null),[E,j]=(0,Di.useState)(null),[U,X]=(0,Di.useState)(null),G=dr(),W=$o(),Z=c&&!s,J=(ne,ie,ae=!1)=>[Ro(ne),...ae&&b?Array.isArray(b)?b:[b]:[],...Z&&ie?[zr(ie)]:[]],K=f.find(ne=>ne.key===e.tabKey),ee=f.filter(ne=>!ne.archived),te=ne=>{let ie=!!String(e.startDate??"").trim();if(P(ne),ie||o||s)return;let ae=Mu(ne);Number.isNaN(ae.getTime())||ae.getTime()<=Date.now()||(0,jb.InfoAlert)("\uC2DC\uC791\uC77C\uC2DC\uAC00 \uB418\uBA74 \uCC45\uC784\uC790\uC5D0\uAC8C \uC54C\uB9BC\uC774 \uBC1C\uC1A1\uB429\uB2C8\uB2E4.")},oe=(0,je.jsx)(It,{icon:(0,je.jsx)(Db.default,{sx:{fontSize:17}}),label:"\uC0AC\uC804\uC54C\uB9BC",onClick:R||m?void 0:ne=>A(ne),sx:J(s?8:5,2,!0),children:e.reminders.length===0?(0,je.jsx)(Ai,{label:"\uC5C6\uC74C"}):ac(e.reminders)});return(0,je.jsxs)(je.Fragment,{children:[(0,je.jsxs)(dn.Box,{sx:{display:"grid",gridTemplateColumns:"repeat(2, minmax(0, 1fr))",gridAutoFlow:"row dense",columnGap:3,rowGap:0,px:2,[yo]:{gridTemplateColumns:"minmax(0, 1fr)"}},children:[I,M?(0,je.jsxs)(je.Fragment,{children:[(0,je.jsxs)(It,{icon:(0,je.jsx)(Fb.default,{sx:{fontSize:17}}),label:"\uAC00\uB9F9\uC810",sx:J(0,1),children:[M.licenseName||(0,je.jsx)(Ai,{}),M.contactPhone?(0,je.jsx)(dn.Box,{component:"span",sx:{ml:1,color:"#6f6f6c",fontSize:"0.92em"},children:M.contactPhone}):null,M.contactEmail?(0,je.jsx)(dn.Box,{component:"span",sx:{ml:1,color:"#6f6f6c",fontSize:"0.92em"},children:M.contactEmail}):null]}),(0,je.jsx)(It,{icon:(0,je.jsx)(qb.default,{sx:{fontSize:17}}),label:"\uC720\uD615",sx:J(0,2),children:M.supportType||(0,je.jsx)(Ai,{})})]}):null,k?null:(0,je.jsx)(It,{icon:(0,je.jsx)(Ib.default,{sx:{fontSize:17}}),label:"\uD504\uB85C\uC81D\uD2B8",onClick:R?void 0:ne=>w(ne),sx:Z&&i==="full"?[J(1,void 0,!0),{gridColumn:"1 / -1"}]:J(1,i==="full"?1:i,!0),children:K?(()=>{let ne=$t(K.icon);return(0,je.jsxs)(je.Fragment,{children:[ne?(0,je.jsx)(ne,{sx:{fontSize:16,color:"#1e3a8a"}}):null,K.label]})})():"\uAE30\uBCF8"}),a,o?(0,je.jsx)(It,{icon:(0,je.jsx)(Ef.default,{sx:{fontSize:17}}),label:"\uB300\uC0C1\uC790",onClick:R?void 0:()=>p("targets"),sx:J(7,1),children:u||"\uBAA8\uB4E0 \uC9C1\uC6D0"}):null,!o&&!s?(0,je.jsx)(It,{icon:(0,je.jsx)(Rb.default,{sx:{fontSize:17}}),label:"\uCC45\uC784\uC790",onClick:l||R||!e.managerName&&x?void 0:()=>p("manager"),sx:J(7,1),children:e.managerName?(0,je.jsxs)(je.Fragment,{children:[(0,je.jsx)(Cn,{names:[e.managerName],size:20,avatarSrcByName:g}),e.managerName]}):x??(0,je.jsx)(Ai,{})}):null,n,s?null:(0,je.jsx)(It,{icon:(0,je.jsx)(Eb.default,{sx:{fontSize:17}}),label:"\uC2DC\uC791\uC77C\uC2DC",onClick:R?void 0:ne=>B(ne),sx:J(2,2),children:e.startDate?Cb(e.startDate):(0,je.jsx)(Ai,{})}),o?null:(0,je.jsx)(It,{icon:(0,je.jsx)(Ef.default,{sx:{fontSize:17}}),label:s?"\uCC38\uC11D\uC790":"\uCC38\uC870\uC790",onClick:R?void 0:()=>p("receivers"),sx:J(s?7:8,1),children:e.receiverNames.length>0?(0,je.jsxs)(je.Fragment,{children:[(0,je.jsx)(Cn,{names:e.receiverNames,size:20,avatarSrcByName:g}),e.receiverNames.length===1?e.receiverNames[0]:null]}):(0,je.jsx)(Ai,{})}),r?null:(0,je.jsx)(It,{icon:(0,je.jsx)(Mb.default,{sx:{fontSize:17}}),label:s?"\uB0A0\uC9DC":"\uB9C8\uAC10\uC608\uC815",onClick:R?void 0:ne=>j(ne),sx:J(3,2),children:e.dueDate?s?oo(e.dueDate):Cb(e.dueDate):(0,je.jsx)(Ai,{})}),s?(0,je.jsx)(It,{icon:(0,je.jsx)(Ab.default,{sx:{fontSize:17}}),label:"\uC2DC\uAC01",onClick:R?void 0:ne=>X(ne),sx:Ro(4),children:e.eventTime?e.eventTime:(0,je.jsx)(Ai,{label:"\uC885\uC77C"})}):null,s?(0,je.jsx)(It,{icon:(0,je.jsx)(Nb.default,{sx:{fontSize:17}}),label:"\uC7A5\uC18C",sx:Ro(5),children:(0,je.jsx)(Ko,{value:e.eventPlace??"",placeholder:"\uC7A5\uC18C \uC785\uB825",readOnly:R,onCommit:ne=>S?.(ne)})}):null,!t&&s?oe:null,s?(0,je.jsx)(It,{icon:(0,je.jsx)(Lb.default,{sx:{fontSize:17}}),label:"\uC8FC\uC18C",sx:[{gridColumn:"1 / -1"},Ro(6)],children:(0,je.jsx)(If,{value:e.eventAddress??"",placeholder:"\uC8FC\uC18C \uC785\uB825",readOnly:R,onCommit:ne=>D?.(ne)})}):null,s?null:(0,je.jsx)(It,{icon:(0,je.jsx)(Ob.default,{sx:{fontSize:17}}),label:"\uC911\uC694\uB3C4",onClick:h?void 0:ne=>H(ne),sx:J(6,1,!0),children:(0,je.jsx)(Tn,{priority:e.priority,small:!0})}),!t&&!s?oe:null,z]}),(0,je.jsxs)(dn.Menu,{transitionDuration:0,anchorEl:v,open:!!v,onClose:()=>w(null),...W,children:[(0,je.jsxs)(dn.MenuItem,{selected:!e.tabKey,onClick:()=>{O(""),w(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[(0,je.jsx)(Pb.default,{sx:{fontSize:17,color:"#9a9a97"}}),"\uC5C6\uC74C",e.tabKey?null:(0,je.jsx)(Ga.default,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}})]}),ee.map(ne=>{let ie=$t(ne.icon),ae=e.tabKey===ne.key;return(0,je.jsxs)(dn.MenuItem,{selected:ae,onClick:()=>{O(ne.key),w(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[ie?(0,je.jsx)(ie,{sx:{fontSize:17,color:"#1e3a8a"}}):null,ne.label,ae?(0,je.jsx)(Ga.default,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},ne.key)}),y?[(0,je.jsx)(dn.Divider,{},"add-project-divider"),(0,je.jsxs)(dn.MenuItem,{onClick:()=>T(!0),sx:{fontSize:14,color:"#787774"},children:[(0,je.jsx)(dn.ListItemIcon,{children:(0,je.jsx)(Bb.default,{sx:{fontSize:18,color:"#787774"}})}),"\uD504\uB85C\uC81D\uD2B8 \uCD94\uAC00"]},"add-project")]:null]}),y?(0,je.jsx)(ja,{open:_,onClose:()=>T(!1),onSubmit:(ne,ie,ae)=>{(async()=>{let pe=await y(ne,ie,ae);pe&&O(pe)})(),w(null)}}):null,(0,je.jsx)(dn.Menu,{transitionDuration:0,anchorEl:F,open:!!F,onClose:()=>H(null),...W,children:["high","medium","low"].map(ne=>(0,je.jsxs)(dn.MenuItem,{selected:e.priority===ne,onClick:()=>{L(ne),H(null)},sx:{fontSize:14,minWidth:130,gap:1},children:[(0,je.jsx)(Tn,{priority:ne,small:!0}),e.priority===ne?(0,je.jsx)(Ga.default,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},ne))}),(0,je.jsx)(dn.Menu,{transitionDuration:0,anchorEl:V,open:!!V,onClose:()=>A(null),...W,children:sc(s?!!e.eventTime:String(e.dueDate??"").includes(" ")).map(ne=>{let ie=ne.value==="none"?e.reminders.length===0:e.reminders.includes(ne.value);return(0,je.jsxs)(dn.MenuItem,{selected:ie,onClick:()=>{$(La(e.reminders,ne.value)),ne.value==="none"&&A(null)},sx:{fontSize:14,minWidth:150,gap:1},children:[ne.label,ie?(0,je.jsx)(Ga.default,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},ne.value)})}),s?(0,je.jsx)(zb.TimePicker,{anchorEl:U,open:!!U,onClose:()=>X(null),value:l_(e.eventTime),format:"HH:mm",minuteStep:10,autoApply:!0,centered:G,locale:"ko",onChange:(ne,ie)=>{C?.(`${ne}:${ie}`),X(null)}}):null,(0,je.jsx)(io,{anchorEl:q,open:!!q,date:e.startDate,reminders:[],hideReminder:!0,showTime:!0,centered:G,onClose:()=>B(null),onDateChange:te,onReminderChange:()=>{}}),(0,je.jsx)(io,{anchorEl:E,open:!!E,date:e.dueDate,reminders:e.reminders,hideReminder:m||t,showTime:!s,centered:G,onClose:()=>j(null),onDateChange:N,onReminderChange:$})]})}var $b=require("react"),Zs=require("@mui/material"),Hb=Y(require("@mui/icons-material/RepeatOutlined"),1),Wb=Y(require("@mui/icons-material/DevicesOutlined"),1),Ub=Y(require("@mui/icons-material/ScreenSearchDesktopOutlined"),1),Vb=Y(require("@mui/icons-material/SellOutlined"),1),Kb=Y(require("@mui/icons-material/TaskAltOutlined"),1);var Cr=require("react/jsx-runtime");function Mf({label:e="\uBE44\uC5B4 \uC788\uC74C"}){return(0,Cr.jsx)(Zs.Box,{component:"span",sx:{color:"#9a9a97"},children:e})}function Xa({values:e,readOnly:f=!1,showResolution:g=!1,onChangeRepro:l,onChangeDevice:o,onChangeWhere:s,onChangeVersion:r,onChangeResolution:t}){let[n,c]=(0,$b.useState)(null),i=n?.field==="repro"?Hl:n?.field==="device"?Wl:Ul,a=h=>{n?.field==="repro"?l(h):n?.field==="device"?o(h):n?.field==="resolution"&&t?.(h),c(null)};return(0,Cr.jsxs)(Cr.Fragment,{children:[(0,Cr.jsxs)(Cr.Fragment,{children:[(0,Cr.jsx)(It,{icon:(0,Cr.jsx)(Hb.default,{sx:{fontSize:17}}),label:"\uC7AC\uD604\uBE48\uB3C4",onClick:f?void 0:h=>c({field:"repro",el:h}),children:Cu(e.repro)||(0,Cr.jsx)(Mf,{label:"\uC120\uD0DD"})}),(0,Cr.jsx)(It,{icon:(0,Cr.jsx)(Wb.default,{sx:{fontSize:17}}),label:"\uB514\uBC14\uC774\uC2A4",onClick:f?void 0:h=>c({field:"device",el:h}),children:Bu(e.device)||(0,Cr.jsx)(Mf,{label:"\uC120\uD0DD"})}),(0,Cr.jsx)(It,{icon:(0,Cr.jsx)(Ub.default,{sx:{fontSize:17}}),label:"\uBC1C\uC0DD\uD654\uBA74",children:(0,Cr.jsx)(Ko,{value:e.where,placeholder:"\uC608: POS > \uC8FC\uBB38\uD604\uD669",readOnly:f,onCommit:s})}),(0,Cr.jsx)(It,{icon:(0,Cr.jsx)(Vb.default,{sx:{fontSize:17}}),label:"\uBC1C\uC0DD\uBC84\uC804",children:(0,Cr.jsx)(Ko,{value:e.version,placeholder:"\uC608: 2026-08-06 \uBC30\uD3EC",readOnly:f,onCommit:r})}),g?(0,Cr.jsx)(It,{icon:(0,Cr.jsx)(Kb.default,{sx:{fontSize:17}}),label:"\uC885\uB8CC\uC0AC\uC720",onClick:f?void 0:h=>c({field:"resolution",el:h}),children:ba(e.resolution)||(0,Cr.jsx)(Mf,{label:"\uC120\uD0DD"})}):null]}),(0,Cr.jsx)(Zs.Menu,{open:!!n,anchorEl:n?.el??null,onClose:()=>c(null),transitionDuration:0,children:i.map(h=>(0,Cr.jsx)(Zs.MenuItem,{onClick:()=>a(h.key),sx:{fontSize:14},children:h.name},h.key))})]})}var Rf=require("@mui/material"),Of=require("react/jsx-runtime"),Bc=16;function ao({icon:e,title:f,titleExtra:g,children:l}){return(0,Of.jsxs)(Rf.Box,{sx:{px:2,display:"flex",flexDirection:"column",gap:.25},children:[(0,Of.jsxs)(Rf.Box,{sx:{display:"flex",alignItems:"center",gap:1,fontSize:Bc,fontWeight:500,color:"#37352f"},children:[e,f,g]}),l]})}var Ic=require("react"),hn=require("@mui/material"),Yb=Y(require("@mui/icons-material/MoreVert"),1),Xb=require("@ehfuse/alerts"),Zb=require("@ehfuse/mui-form-dialog"),Jb=require("@ehfuse/mui-form-controls");var rn=require("react/jsx-runtime");function Gb(e){return String(e??"").replace(/<[^>]*>/g,"").replace(/&nbsp;/g," ").trim().length>0}function Za({content:e,templates:f,onApply:g,onSave:l,onRemove:o}){let[s,r]=(0,Ic.useState)(null),[t,n]=(0,Ic.useState)(!1),[c,i]=(0,Ic.useState)(""),a=async h=>{r(null),!(Gb(e)&&!await(0,Xb.ConfirmDialog)({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(0,rn.jsxs)(rn.Fragment,{children:[(0,rn.jsx)(hn.Tooltip,{title:"\uBCF8\uBB38 \uC591\uC2DD",arrow:!0,disableInteractive:!0,children:(0,rn.jsx)(hn.IconButton,{size:"small","aria-label":"\uBCF8\uBB38 \uC591\uC2DD",onClick:h=>r(h.currentTarget),sx:{ml:"auto",color:"#9a9a97"},children:(0,rn.jsx)(Yb.default,{sx:{fontSize:18}})})}),(0,rn.jsxs)(hn.Menu,{anchorEl:s,open:!!s,onClose:()=>r(null),transitionDuration:0,children:[l?(0,rn.jsx)(hn.MenuItem,{disabled:!Gb(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?(0,rn.jsx)(hn.Divider,{sx:{my:.5}}):null,f.length===0?(0,rn.jsx)(hn.MenuItem,{disabled:!0,sx:{fontSize:14,minWidth:220},children:"\uC800\uC7A5\uB41C \uC591\uC2DD\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"}):f.map(h=>(0,rn.jsxs)(hn.MenuItem,{onClick:()=>{a(h)},sx:{fontSize:14,minWidth:220,gap:1},children:[(0,rn.jsx)(hn.Box,{sx:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:h.name}),o?(0,rn.jsx)(hn.IconButton,{size:"small","aria-label":`${h.name} \uC591\uC2DD \uC0AD\uC81C`,onClick:d=>{d.stopPropagation(),o(h.seq)},sx:{color:"#9a9a97"},children:(0,rn.jsx)(gn,{sx:{fontSize:16}})}):null]},h.seq))]}),(0,rn.jsx)(Zb.FormDialog,{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:(0,rn.jsx)(hn.Button,{variant:"contained",disabled:!c.trim(),onClick:()=>{l?.(c.trim(),e),n(!1)},children:"\uC800\uC7A5"})},sections:[{id:"template-name",title:"",showTitle:!1,children:(0,rn.jsxs)(hn.Box,{sx:{display:"flex",flexDirection:"column",gap:1},children:[(0,rn.jsx)(hn.Box,{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."}),(0,rn.jsx)(Jb.ClearTextField,{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)})]})}]})]})}var Rn=require("react"),on=require("@mui/material"),Df=Y(require("@mui/icons-material/EditOutlined"),1),Qb=Y(require("@mui/icons-material/DoneOutlined"),1),Pf=Y(require("@mui/icons-material/Translate"),1),Js=require("@ehfuse/editor");var nn=require("react/jsx-runtime");function Af(e){let f=e.trim();return f?f.startsWith("<")?e:`<p>${f}</p>`:"<p></p>"}function Ja(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 Qa({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}=ct(),a=S=>{i?i(S):window.open(S,"_blank","noopener,noreferrer")},[h,d]=(0,Rn.useState)(()=>!o||!Ja(f).trim());(0,Rn.useEffect)(()=>{o&&d(!Ja(f).trim())},[e,o]);let u=(0,Rn.useRef)(null),b=(0,Rn.useRef)(new Js.ImageResizePlugin),m=(0,Rn.useRef)(null),x=t>0?t:0,k=(0,Rn.useRef)(x),I=(0,Rn.useRef)(n);I.current=n;let M=(0,Rn.useRef)(null),z=(0,Rn.useRef)(Date.now()+800),O=dr(),P=(0,on.useTheme)(),N=(0,on.useMediaQuery)(P.breakpoints.down("sm")),$=(S,D=!1)=>S instanceof Element?S.closest(D?".taskbox-content-readview a[href]":".ehfuse-editor-content a[href]"):null,L=S=>O||S.ctrlKey||S.metaKey;(0,Rn.useEffect)(()=>{if(l)return;let S=Af(f);M.current===S||M.current===f||(M.current=S,z.current=Date.now()+800,u.current?.setHtml(S))},[e,f,l]);let C=(0,Rn.useRef)(-1);return(0,Rn.useEffect)(()=>{if(l||O||t<=0||C.current===t||(C.current=t,Math.abs(t-k.current)<1))return;let S=m.current?.querySelector(".ehfuse-editor-container");S&&(Math.abs(S.getBoundingClientRect().height-t)<1||(S.style.height=`${t}px`,k.current=t))},[l,O,t]),(0,Rn.useEffect)(()=>{if(l||O)return;let S=m.current?.querySelector(".ehfuse-editor-container");if(!S||typeof ResizeObserver>"u")return;let D,p=new ResizeObserver(y=>{let v=Math.round(y[0]?.contentRect.height??0);v<=0||(window.clearTimeout(D),D=window.setTimeout(()=>{Math.abs(v-k.current)<1||(k.current=v,I.current?.(v))},300))});return p.observe(S),()=>{window.clearTimeout(D),p.disconnect()}},[l,O]),l||!h?(0,nn.jsxs)(on.Box,{sx:{position:"relative",mt:1},children:[(0,nn.jsx)(on.Box,{onClickCapture:S=>{let D=$(S.target,!0);D&&(S.preventDefault(),S.stopPropagation(),a(D.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:Af(f)}}),N?(0,nn.jsxs)(on.Box,{sx:{display:"flex",gap:1,mt:1},children:[l?null:(0,nn.jsx)(on.Button,{variant:"outlined",color:"inherit",startIcon:(0,nn.jsx)(Df.default,{sx:{fontSize:18}}),onClick:()=>d(!0),sx:{flex:1,fontSize:15,color:"#37352f",borderColor:"#d9d9d6"},children:"\uC218\uC815"}),s?(0,nn.jsx)(on.Button,{variant:"outlined",color:"inherit",startIcon:(0,nn.jsx)(Pf.default,{sx:{fontSize:18}}),onClick:s,sx:{flex:1,fontSize:15,color:"#37352f",borderColor:"#d9d9d6"},children:"\uBC88\uC5ED"}):null]}):(0,nn.jsxs)(on.Box,{sx:{position:"absolute",top:6,right:6,display:"flex",flexDirection:"column",gap:.25},children:[l?null:(0,nn.jsx)(on.Tooltip,{title:"\uB0B4\uC6A9 \uC218\uC815",arrow:!0,placement:"left",children:(0,nn.jsx)(on.IconButton,{size:"small","aria-label":"\uB0B4\uC6A9 \uC218\uC815",onClick:()=>d(!0),sx:{color:"#9a9a97"},children:(0,nn.jsx)(Df.default,{sx:{fontSize:17}})})}),s?(0,nn.jsx)(on.Tooltip,{title:"\uBC88\uC5ED",arrow:!0,placement:"left",children:(0,nn.jsx)(on.IconButton,{size:"small","aria-label":"\uBC88\uC5ED",onClick:s,sx:{color:"#9a9a97"},children:(0,nn.jsx)(Pf.default,{sx:{fontSize:17}})})}):null]})]}):(0,nn.jsxs)(on.Box,{ref:m,onDragOver:S=>S.stopPropagation(),onDrop:S=>S.stopPropagation(),onMouseDownCapture:S=>{L(S)&&$(S.target)&&S.preventDefault()},onClickCapture:S=>{let D=L(S)?$(S.target):null;D&&(S.preventDefault(),S.stopPropagation(),a(D.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"},...O?{"& .ehfuse-editor-content a[href]":{cursor:"pointer"}}:{},position:"relative"},children:[o?(0,nn.jsx)(on.Tooltip,{title:"\uD3B8\uC9D1 \uB05D(\uC77D\uAE30 \uBAA8\uB4DC)",arrow:!0,children:(0,nn.jsx)(on.IconButton,{size:"small","aria-label":"\uD3B8\uC9D1 \uB05D",onMouseDown:S=>S.preventDefault(),onClick:()=>d(!1),sx:{position:"absolute",top:4,right:6,zIndex:2,color:"#2f9e5b"},children:(0,nn.jsx)(Qb.default,{sx:{fontSize:19}})})}):null,(0,nn.jsx)(Js.EhfuseEditor,{ref:u,defaultValue:Af(f),autoHeight:O,resizable:!O,showToolbar:!O,focusBorder:!0,styles:{focusBorderColor:"var(--primary)"},toolbarOptions:Js.minimalToolbarOptions,plugins:[b.current],locale:"ko",minHeight:x||r,placeholder:"\uB0B4\uC6A9\uC744 \uC785\uB825\uD558\uC138\uC694",onImageUpload:c,contentStyle:{padding:"12px"},onChange:S=>{let D=Date.now()<z.current,p=S===M.current;M.current=S,!(D||p)&&g(S)}})]})}var ds=require("react"),Rt=require("@mui/material"),Go=require("@dnd-kit/core"),Ec=require("@dnd-kit/modifiers"),Ni=require("@dnd-kit/sortable"),l1=require("@dnd-kit/utilities"),Nf=Y(require("@mui/icons-material/Close"),1),c1=Y(require("@mui/icons-material/AddCircle"),1),Lf=Y(require("@mui/icons-material/AddTask"),1),u1=Y(require("@mui/icons-material/Checklist"),1),f1=Y(require("@mui/icons-material/CheckCircle"),1),d1=Y(require("@mui/icons-material/DragIndicator"),1),h1=Y(require("@mui/icons-material/Launch"),1),p1=Y(require("@mui/icons-material/LinkOutlined"),1),m1=Y(require("@mui/icons-material/RadioButtonUnchecked"),1);var Pi=require("react"),wn=require("@mui/material"),t1=require("@ehfuse/mui-form-dialog"),r1=require("@ehfuse/mui-form-controls"),n1=require("@ehfuse/alerts"),o1=Y(require("@mui/icons-material/CheckCircle"),1),i1=Y(require("@mui/icons-material/RadioButtonUnchecked"),1),s1=require("@ehfuse/overlay-scrollbar");var Wr=require("react/jsx-runtime"),e1=[{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 el({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=dr(),[a,h]=(0,Pi.useState)("related"),[d,u]=(0,Pi.useState)(""),[b,m]=(0,Pi.useState)([]);(0,Pi.useEffect)(()=>{e&&(h("related"),u(""),m([]))},[e]);let x=(0,Pi.useMemo)(()=>{let O=new Set([f.seq,...l]),P=d.trim().toLowerCase();return g.filter(N=>O.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,$)=>!!N.completed!=!!$.completed?N.completed?1:-1:$.seq-N.seq)},[g,f.seq,l,d]),k=()=>{if(b.length===0){(0,n1.ErrorAlert)("\uC5F0\uACB0\uD560 \uC5C5\uBB34\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return}for(let O of b)s(O,a);o()},I=O=>{m(P=>P.includes(O)?P.filter(N=>N!==O):c?[...P,O]:[O])},M=e1.find(O=>O.type===a)?.hint??"",z=(0,Wr.jsxs)(wn.Box,{sx:{display:"flex",flexDirection:"column",minHeight:0,height:i?"100%":"auto"},children:[r?null:(0,Wr.jsx)(wn.Tabs,{value:a,onChange:(O,P)=>h(P),sx:{minHeight:38,flexShrink:0,borderBottom:"1px solid #ededeb","& .MuiTab-root":{minHeight:38,py:.5,fontSize:16,color:"#333333"}},children:e1.map(O=>(0,Wr.jsx)(wn.Tab,{value:O.type,label:O.label},O.type))}),r?null:(0,Wr.jsx)(wn.Box,{sx:{mt:1,mb:1.5,fontSize:14,flexShrink:0},children:M}),(0,Wr.jsxs)(wn.Box,{sx:{...i?{height:"100%",minHeight:0}:{height:560},display:"flex",flexDirection:"column",...i?{}:{border:"1px solid #cccccc",borderRadius:1},overflow:"hidden",userSelect:"none"},children:[(0,Wr.jsx)(wn.Box,{sx:{px:1.5,py:1,borderBottom:"1px solid #cccccc",flexShrink:0},children:(0,Wr.jsx)(r1.ClearTextField,{placeholder:"\uC81C\uBAA9\xB7\uD2F0\uCF13\uBC88\uD638\uB85C \uAC80\uC0C9",value:d,onChange:O=>u(O.target.value),fullWidth:!0,autoFocus:!0,size:"small",sx:{"& .MuiOutlinedInput-notchedOutline":{border:"none"},"& .MuiInputBase-root":{px:0}}})}),(0,Wr.jsx)(wn.Box,{sx:{flex:1,minHeight:0},children:(0,Wr.jsx)(s1.OverlayScrollbar,{style:{height:"100%"},contentStyle:{paddingTop:0},children:(0,Wr.jsx)(wn.Box,{sx:{display:"flex",flexDirection:"column"},children:x.length===0?(0,Wr.jsx)(wn.Box,{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(O=>{let P=O.is_notice||O.is_event?$t(O.icon||(O.is_notice?$r:Yr)):null,N=b.includes(O.seq);return(0,Wr.jsxs)(wn.Box,{onClick:()=>I(O.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?(0,Wr.jsx)(o1.default,{sx:{fontSize:20,flexShrink:0,color:"#2f6fd0"}}):(0,Wr.jsx)(i1.default,{sx:{fontSize:20,flexShrink:0,color:"#c9c8c5"}}),P?(0,Wr.jsx)(P,{sx:{fontSize:17,flexShrink:0,color:O.icon_color||"#1e3a8a"}}):null,(0,Wr.jsxs)(wn.Box,{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:[O.ticket_no?`${O.ticket_no} `:"",O.title]}),(0,Wr.jsx)(wn.Box,{sx:{flexShrink:0,display:"flex",alignItems:"center"},children:(0,Wr.jsx)(ir,{option:Xr(O)})})]},O.seq)})})})})]})]});return(0,Wr.jsx)(t1.FormDialog,{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:z}],scrollPastLastSection:!1,sectionContentPaddingTop:0,contentTopPadding:12,actions:{showCancelButton:!0,right:(0,Wr.jsx)(wn.Button,{variant:"contained",disabled:b.length===0,onClick:k,children:n})}})}var it=require("react/jsx-runtime"),a1="taskbox.checklist.hideCompleted";function l_({id:e,children:f}){let{attributes:g,listeners:l,setNodeRef:o,transform:s,transition:r,isDragging:t}=(0,Ni.useSortable)({id:e});return(0,it.jsx)(Rt.Box,{ref:o,sx:{transform:l1.CSS.Transform.toString(s),transition:r,...t?{opacity:.6,position:"relative",zIndex:1}:{}},children:f({handleProps:{...g,...l},dragging:t})})}function c_({sortable:e,sensors:f,rowIds:g,onDragEnd:l,children:o}){let s=(0,it.jsx)(Rt.Box,{sx:{display:"flex",flexDirection:"column",mt:.5,pl:3.25},children:o});return e?(0,it.jsx)(Go.DndContext,{sensors:f,collisionDetection:Go.closestCenter,modifiers:[Ec.restrictToVerticalAxis,Ec.restrictToParentElement],onDragEnd:l,children:(0,it.jsx)(Ni.SortableContext,{items:g,strategy:Ni.verticalListSortingStrategy,children:s})}):s}function tl({taskSeq:e,checklist:f,onAdd:g,onToggle:l,onRemove:o,onUpdate:s,onReorder:r,removeLocked:t=!1,onConvertToTask:n,onOpenLinkedTask:c,linkCandidates:i,linkBaseTask:a,onLinkExistingTask:h,resolveLinkedTask:d,myAccountSeq:u=0}){let[b,m]=(0,ds.useState)(""),[x,k]=(0,ds.useState)(!1),[I,M]=(0,ds.useState)(null),z=dr(),[O,P]=(0,ds.useState)(null),[N,$]=(0,ds.useState)(null),L=q=>{let B=q.task_seq?d?.(q.task_seq):void 0;return B?B.completed:q.checked},C=q=>{if(!q.task_seq||u<=0)return!1;let B=d?.(q.task_seq);return B?!Fu(B,u):!1},S=q=>!!q.task_seq&&!!d&&!d?.(q.task_seq),D=f.filter(q=>!S(q)),p=D.filter(L).length,[y,v]=(0,ds.useState)(()=>{try{return localStorage.getItem(a1)==="1"}catch{return!1}}),w=q=>{v(q);try{localStorage.setItem(a1,q?"1":"0")}catch{}},_=!!r&&!z&&!t,T=(0,Go.useSensors)((0,Go.useSensor)(Go.PointerSensor,{activationConstraint:{distance:5}})),R=(q,B)=>q.task_seq?`linked-${q.task_seq}`:`row-${B}`,F=f.map(R),H=F.filter((q,B)=>{let E=f[B];return S(E)?!1:!(y&&L(E))}),V=q=>{let{active:B,over:E}=q;if(!E||B.id===E.id)return;let j=F.indexOf(String(B.id)),U=F.indexOf(String(E.id));j<0||U<0||r?.(e,(0,Ni.arrayMove)(f,j,U))},A=()=>{b.trim()&&(g(e,b),m(""))};return(0,it.jsxs)(ao,{icon:(0,it.jsx)(u1.default,{sx:{fontSize:19,display:"block"}}),title:(0,it.jsxs)(it.Fragment,{children:["\uD560\uC77C",f.length>0?(0,it.jsxs)(Rt.Box,{component:"span",sx:{fontSize:12.5,color:"#9a9a97"},children:[p," / ",f.length]}):null]}),titleExtra:D.length>0?(0,it.jsxs)(Rt.Box,{sx:{flex:1,minWidth:0,ml:1,display:"flex",alignItems:"center",gap:1},children:[(0,it.jsx)(Rt.Box,{sx:{flex:1,minWidth:0,height:6,borderRadius:3,bgcolor:"#ececea"},children:(0,it.jsx)(Rt.Box,{sx:{height:"100%",borderRadius:3,width:`${Math.round(p/D.length*100)}%`,bgcolor:"#2f80ed",transition:"width 0.2s"}})}),p>0?(0,it.jsxs)(Rt.Box,{component:"label",sx:{display:"inline-flex",alignItems:"center",gap:.25,flexShrink:0,cursor:"pointer",fontSize:13.5,fontWeight:400,color:"#57564f",userSelect:"none"},children:[(0,it.jsx)(Rt.Switch,{size:"small",checked:y,onChange:(q,B)=>w(B)}),"\uC644\uB8CC\uC228\uAE40"]}):null]}):null,children:[(0,it.jsx)(c_,{sortable:_,sensors:T,rowIds:H,onDragEnd:V,children:f.map((q,B)=>{let E=q.task_seq?d?.(q.task_seq):void 0,j=L(q);if(y&&j||S(q))return null;let U=!!q.task_seq,X=C(q),G=W=>(0,it.jsxs)(Rt.Box,{sx:{display:"flex",alignItems:z?"flex-start":"center",gap:1,px:1.25,..._?{ml:-3,pl:.5}:{},py:.5,borderRadius:1,"&:hover":{bgcolor:"#f7f7f5"},"&:hover .taskbox-checklist-remove":{opacity:1},"&:hover .taskbox-checklist-convert":{opacity:1},"&:hover .taskbox-checklist-handle":{opacity:1}},children:[W?(0,it.jsx)(Rt.Box,{className:"taskbox-checklist-handle",...W,sx:{display:"inline-flex",flexShrink:0,alignItems:"center",color:"#c9c8c5",opacity:0,transition:"opacity 0.15s",cursor:"grab","&:active":{cursor:"grabbing"},touchAction:"none",userSelect:"none"},children:(0,it.jsx)(d1.default,{sx:{fontSize:16}})}):null,(0,it.jsx)(Rt.Tooltip,{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:(0,it.jsx)(Rt.Box,{component:"span",onClick:X?void 0:()=>l(e,B,!j),sx:{display:"inline-flex",flexShrink:0,cursor:X?"default":"pointer",...z?{mt:"1px"}:{}},children:j?(0,it.jsx)(f1.default,{sx:{fontSize:18,color:X?"#a9c6ec":"#2f80ed"}}):(0,it.jsx)(m1.default,{sx:{fontSize:18,color:X?"#d6d5d1":"#9a9a97"}})})}),I?.index===B?(0,it.jsx)(Rt.Box,{component:"input",autoFocus:!0,spellCheck:!1,value:I.label,enterKeyHint:"done",onChange:Z=>M({index:B,label:Z.target.value}),onBlur:()=>{I.label.trim()&&I.label.trim()!==q.label&&s?.(e,B,I.label),M(null)},onKeyDown:Z=>{Z.key==="Enter"&&Z.target.blur(),Z.key==="Escape"&&M(null)},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:14,color:"#37352f",bgcolor:"transparent",p:0}}):(0,it.jsx)(Rt.Box,{component:"span",onClick:U?q.task_seq&&c?()=>c(q.task_seq):void 0:t||!s?void 0:z?()=>P({index:B,label:q.label}):()=>M({index:B,label:q.label}),sx:{flex:1,minWidth:0,fontSize:14.5,color:"#37352f",textDecoration:j?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",...z?{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:3,lineHeight:1.4,wordBreak:"break-word"}:{whiteSpace:"nowrap"},...U?c?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}:t||!s?{}:{cursor:"text"}},children:q.label}),U?(0,it.jsxs)(Rt.Box,{component:"span",onClick:q.task_seq&&c?()=>c(q.task_seq):void 0,sx:{display:"inline-flex",alignItems:"center",gap:.4,flexShrink:0,...z?{mt:"1px"}:{},px:.75,py:.2,borderRadius:1,fontSize:12,fontWeight:500,color:"#1d4f91",bgcolor:"#e3eefb",whiteSpace:"nowrap",...c?{cursor:"pointer"}:{}},children:[(0,it.jsx)(h1.default,{sx:{fontSize:12}}),E?.manager_name?.trim()||"\uC5C5\uBB34"]}):null,!t&&!U&&n?(0,it.jsx)(Rt.Tooltip,{title:"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",arrow:!0,enterDelay:300,disableInteractive:!0,children:(0,it.jsx)(Rt.IconButton,{className:"taskbox-checklist-convert",size:"small","aria-label":"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",onClick:Z=>$({anchorEl:Z.currentTarget,index:B,label:q.label}),sx:{display:z?"none":"inline-flex",opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:(0,it.jsx)(Lf.default,{sx:{fontSize:16}})})}):null,t?null:(0,it.jsx)(Rt.IconButton,{className:"taskbox-checklist-remove",size:"small","aria-label":"\uD560\uC77C \uC0AD\uC81C",onClick:()=>o(e,B),sx:{display:z?"none":"inline-flex",opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:(0,it.jsx)(Nf.default,{sx:{fontSize:15}})})]});return _?(0,it.jsx)(l_,{id:F[B],children:({handleProps:W})=>G(W)},F[B]):(0,it.jsx)(Rt.Box,{children:G(null)},F[B])})}),(0,it.jsxs)(Rt.Box,{sx:{mt:.5,ml:3.25,display:"flex",alignItems:"center",gap:.5},children:[(0,it.jsx)(Rt.Box,{component:"input",spellCheck:!1,value:b,placeholder:"+ \uD560\uC77C \uCD94\uAC00",enterKeyHint:"done",onChange:q=>m(q.target.value),onKeyDown:q=>{q.key==="Enter"&&A()},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:14,color:"#37352f",bgcolor:"transparent",px:1.25,py:.75,"&::placeholder":{color:"#9a9a97"}}}),i&&a&&h?(0,it.jsx)(Rt.Tooltip,{title:"\uAE30\uC874 \uC5C5\uBB34 \uBD99\uC774\uAE30",arrow:!0,children:(0,it.jsx)(Rt.IconButton,{size:"small","aria-label":"\uAE30\uC874 \uC5C5\uBB34 \uBD99\uC774\uAE30",onMouseDown:q=>q.preventDefault(),onClick:()=>k(!0),sx:{flexShrink:0,color:"#9a9a97"},children:(0,it.jsx)(p1.default,{sx:{fontSize:20}})})}):null,(0,it.jsx)(Rt.IconButton,{size:"small","aria-label":"\uD560\uC77C \uCD94\uAC00",disabled:!b.trim(),onMouseDown:q=>q.preventDefault(),onClick:A,sx:{flexShrink:0,color:b.trim()?"#2f80ed":"#c9c8c5"},children:(0,it.jsx)(c1.default,{sx:{fontSize:20}})})]}),i&&a&&h?(0,it.jsx)(el,{open:x,task:a,tasks:i,excludeSeqs:f.map(q=>Number(q.task_seq??0)).filter(q=>q>0),hideRelationType:!0,multiSelect:!0,title:"\uAE30\uC874 \uC5C5\uBB34 \uBD99\uC774\uAE30",confirmLabel:"\uBD99\uC774\uAE30",onClose:()=>k(!1),onSubmit:q=>{let B=i.find(E=>E.seq===q);h(e,q,String(B?.title??"").trim())}}):null,(0,it.jsx)(Qt,{open:!!N,anchorEl:N?.anchorEl??null,title:"\uC774 \uD560\uC77C\uC744 \uBCC4\uB3C4 \uC5C5\uBB34\uB85C \uB9CC\uB4DC\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uB9CC\uB4E4\uAE30",onCancel:()=>$(null),onConfirm:()=>{N&&n?.(e,N.index,N.label),$(null)}}),(0,it.jsx)(Rt.Dialog,{open:!!O,onClose:()=>P(null),maxWidth:"xs",fullWidth:!0,slotProps:{paper:{sx:{borderRadius:2,m:2}}},children:(0,it.jsxs)(Rt.Box,{sx:{p:2,display:"flex",flexDirection:"column",gap:1.5},children:[(0,it.jsx)(Rt.Box,{sx:{fontSize:15.5,fontWeight:600,color:"#37352f"},children:"\uD560\uC77C \uC218\uC815"}),(0,it.jsx)(Rt.TextField,{autoFocus:!0,fullWidth:!0,size:"medium",value:O?.label??"",onChange:q=>P(B=>B&&{...B,label:q.target.value}),onKeyDown:q=>{if(q.key!=="Enter")return;let B=O;B&&B.label.trim()&&s?.(e,B.index,B.label.trim()),P(null)}}),(0,it.jsxs)(Rt.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[!t&&n&&O&&!f[O.index]?.task_seq?(0,it.jsx)(Rt.IconButton,{"aria-label":"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",onClick:()=>{n(e,O.index,f[O.index]?.label??""),P(null)},sx:{color:"#57564f"},children:(0,it.jsx)(Lf.default,{sx:{fontSize:20}})}):null,!t&&O?(0,it.jsx)(Rt.IconButton,{"aria-label":"\uD560\uC77C \uC0AD\uC81C",onClick:()=>{o(e,O.index),P(null)},sx:{color:"#e5484d"},children:(0,it.jsx)(Nf.default,{sx:{fontSize:19}})}):null,(0,it.jsx)(Rt.Box,{sx:{flex:1}}),(0,it.jsx)(Rt.Button,{color:"inherit",onClick:()=>P(null),children:"\uCDE8\uC18C"}),(0,it.jsx)(Rt.Button,{variant:"contained",disabled:!O?.label.trim(),onClick:()=>{O&&O.label.trim()&&s?.(e,O.index,O.label.trim()),P(null)},children:"\uD655\uC778"})]})]})})]})}var Dc=require("react"),lo=require("@mui/material"),b1=Y(require("@mui/icons-material/Close"),1),Ff=Y(require("@mui/icons-material/AttachFileOutlined"),1);var u_=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"]),Mc=e=>{let f=e?.split(".").pop()?.toLowerCase()??"";return u_.has(f)};var g1=require("@mui/material");var Qs=require("react/jsx-runtime");function zf(e){let f=qo(),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 Rc(){let f=qo().useValue("attachmentUpload.progress");return(0,Qs.jsxs)(Qs.Fragment,{children:[f??0,"%"]})}function jf(){let f=qo().useValue("attachmentUpload.progress");return(0,Qs.jsx)(g1.LinearProgress,{variant:"determinate",value:f??0,sx:{height:4,borderRadius:2,bgcolor:"#dbe9fb",mt:.75}})}var jr=require("react/jsx-runtime");function Oc(e){return e>=1048576?`${(e/1048576).toFixed(1)}MB`:`${Math.max(1,Math.round(e/1024))}KB`}var Ac={flex:1,minWidth:0,fontSize:13.5,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"};function rl({taskSeq:e,attachments:f,onAdd:g,onRemove:l,removeLocked:o=!1,onPreview:s,onDownload:r}){let[t,n]=(0,Dc.useState)(!1),c=(0,Dc.useRef)(null),i=dr(),a=Cs(),h=Ts(),d=zf(e),u=e===0,b=M=>{if(s){s(M);return}window.open(h(M.uuid??""),"_blank","noopener,noreferrer")},m=M=>{if(r){r(M);return}window.open(h(M.uuid??"",{download:!0}),"_blank","noopener,noreferrer")},x=M=>d?M+1<d.index?"done":M+1===d.index?"uploading":"waiting":"waiting",k=(M,z,O,P={})=>(0,jr.jsxs)(lo.Box,{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:[(0,jr.jsxs)(lo.Box,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[(0,jr.jsx)(Ff.default,{sx:{fontSize:16,color:"#9a9a97"}}),z,(0,jr.jsx)(lo.Box,{component:"span",sx:{fontSize:12,color:P.uploading?"#2f80ed":"#9a9a97",flexShrink:0},children:O}),P.removeIndex!==void 0?(0,jr.jsx)(lo.IconButton,{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:(0,jr.jsx)(b1.default,{sx:{fontSize:15}})}):null]}),P.uploading?(0,jr.jsx)(jf,{}):null]},M),I=M=>{let z=Mc(M.name);return(0,jr.jsx)(lo.Box,{component:"button",type:"button",onClick:()=>z?b(M):m(M),title:`${M.name} ${z?"\uBBF8\uB9AC\uBCF4\uAE30":"\uB2E4\uC6B4\uB85C\uB4DC"}`,sx:{...Ac,color:"#37352f",textAlign:"left",p:0,border:"none",background:"none",font:"inherit",fontSize:13.5,cursor:"pointer","&:hover":{textDecoration:"underline",color:"#2f80ed"}},children:M.name})};return(0,jr.jsxs)(ao,{icon:(0,jr.jsx)(Ff.default,{sx:{fontSize:18,display:"block"}}),title:(0,jr.jsxs)(jr.Fragment,{children:["\uD30C\uC77C ",f.length>0?f.length:""]}),children:[(0,jr.jsxs)(lo.Box,{sx:{display:"flex",flexDirection:"column",gap:.5,mt:1},children:[f.map((M,z)=>{let O=`${M.uuid||M.name}-${z}`;if(u){let P=x(z),N=P==="uploading";return k(O,(0,jr.jsx)(lo.Box,{component:"span",sx:{...Ac,color:P==="done"?"#37352f":"#9a9a97"},children:M.name}),N?(0,jr.jsx)(Rc,{}):Oc(M.size),{uploading:N,removeIndex:!o&&!d?z:void 0})}return M.uuid?k(O,I(M),Oc(M.size),{removeIndex:o?void 0:z}):k(O,(0,jr.jsx)(lo.Box,{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:{...Ac,color:"#9a9a97"},children:M.name}),Oc(M.size),{removeIndex:o?void 0:z})}),!u&&d?d.queue.slice(d.index-1).map((M,z)=>{let O=z===0;return k(`uploading-${d.index+z}-${M.name}`,(0,jr.jsx)(lo.Box,{component:"span",sx:{...Ac,color:"#9a9a97"},children:M.name}),O?(0,jr.jsx)(Rc,{}):Oc(M.size),{uploading:O})}):null]}),(0,jr.jsx)(lo.Box,{onClick:()=>c.current?.click(),onDragOver:M=>{M.preventDefault(),n(!0)},onDragLeave:()=>n(!1),onDrop:M=>{M.preventDefault(),n(!1);let z=Array.from(M.dataTransfer.files);z.length>0&&g(e,z)},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)`}),(0,jr.jsx)(lo.Box,{component:"input",ref:c,type:"file",multiple:!0,onChange:M=>{let z=Array.from(M.target.files??[]);z.length>0&&g(e,z),M.target.value=""},sx:{display:"none"}})]})}var k1=require("react"),Oo=require("@mui/material"),S1=Y(require("@mui/icons-material/Add"),1);var nl=require("react"),ea=require("@mui/material"),x1=require("@ehfuse/mui-form-dialog"),v1=require("@ehfuse/mui-form-controls"),w1=require("@ehfuse/mui-color-picker"),_1=require("@ehfuse/alerts");var Yo=require("react/jsx-runtime"),y1="#2f80ed";function qf({open:e,onClose:f,onSubmit:g}){let[l,o]=(0,nl.useState)(""),[s,r]=(0,nl.useState)(y1);(0,nl.useEffect)(()=>{e&&(o(""),r(y1))},[e]);let t=()=>{let i=l.trim();if(!i){(0,_1.ErrorAlert)("\uB77C\uBCA8 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}g(i,s),f()},n=Eu(s),c=(0,Yo.jsxs)(ea.Box,{children:[(0,Yo.jsxs)(ea.Box,{sx:{display:"flex",alignItems:"center",gap:1.5,mt:.5},children:[(0,Yo.jsx)(v1.ClearTextField,{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}),(0,Yo.jsx)(w1.ColorPicker,{value:s,onChange:i=>r(i),shape:"circle",colorSize:28})]}),(0,Yo.jsxs)(ea.Box,{sx:{mt:2,display:"flex",alignItems:"center",gap:1,fontSize:13,color:"#787774"},children:["\uBBF8\uB9AC\uBCF4\uAE30",(0,Yo.jsx)(ir,{option:{key:"__preview__",name:l.trim()||"\uB77C\uBCA8",...n}})]})]});return(0,Yo.jsx)(x1.FormDialog,{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:(0,Yo.jsx)(ea.Button,{variant:"contained",onClick:t,children:"\uCD94\uAC00"})}})}var eo=require("react/jsx-runtime");function ol({anchorEl:e,selectedKeys:f,labelOptions:g,onToggle:l,onAddLabel:o,onClose:s}){let[r,t]=(0,k1.useState)(!1),n=$o();return(0,eo.jsxs)(eo.Fragment,{children:[(0,eo.jsxs)(Oo.Menu,{anchorEl:e,open:!!e,onClose:s,transitionDuration:0,...n,children:[g.map(c=>{let i=f.includes(c.key);return(0,eo.jsxs)(Oo.MenuItem,{onClick:()=>l(c.key),sx:{fontSize:14,minWidth:170,gap:1},children:[(0,eo.jsx)(Oo.Checkbox,{size:"small",checked:i,sx:{p:0}}),(0,eo.jsx)(ir,{option:c})]},c.key)}),(0,eo.jsx)(Oo.Divider,{}),(0,eo.jsxs)(Oo.MenuItem,{onClick:()=>t(!0),sx:{fontSize:14,color:"#787774"},children:[(0,eo.jsx)(Oo.ListItemIcon,{children:(0,eo.jsx)(S1.default,{sx:{fontSize:18,color:"#787774"}})}),"\uB77C\uBCA8 \uCD94\uAC00"]})]}),(0,eo.jsx)(qf,{open:r,onClose:()=>t(!1),onSubmit:o})]})}function T1(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 C1(e,f){let g=(e.target_account_seqs??[]).filter(a=>a>0);if(g.length===0)return null;let l=new Set(g),o=T1(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 il(e,f){let g=C1(e,f);return g?[...g.teamNames,...g.individualNames].join(", "):"\uBAA8\uB4E0 \uC9C1\uC6D0"}function f_(e,f){let g=C1(e,f);return g?{kind:"members",teamNames:g.teamNames,individualNames:g.individualNames}:{kind:"everyone"}}function $f(e,f,g){let l=(e.target_account_seqs??[]).filter(d=>d>0),o=T1(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 Hf(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}}var P1=require("@ehfuse/mui-datetime-picker"),tt=require("react/jsx-runtime"),Gf="#0f9d58";function Pc({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:I,onRemoveContentTemplate:M}){let z=qo(),O=Cs(),P=e.useFormValue("manager_name"),N=e.useFormValue("receiver_names"),$=e.useFormValue("start_date"),L=!!e.useFormValue("is_event"),C=!!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")??"",T=e.useFormValue("due_date"),R=e.useFormValue("reminders")??[],F=e.useFormValue("priority"),H=e.useFormValue("content"),A=e.useFormValue("checklist")??[],q=e.useFormValue("tab_key"),B=e.useFormValue("sprint_seq")??0,E=e.useFormValue("story_points")??0,j=g.find(se=>se.key===q&&se.useSprints),U=j?l.filter(se=>`custom-${se.group_seq}`===q):[],[X,G]=(0,ta.useState)(null),W=e.useFormValue("label_keys"),[Z,J]=(0,ta.useState)(null),K=e.useFormValue("visibility")||"involved",ee=Number(e.useFormValue("visibility_group_seq")??0),[te,oe]=(0,ta.useState)(null),ne=e.useFormValue("repeat_rule")||"",ie=e.useFormValue("repeat_until")||"",[ae,pe]=(0,ta.useState)(null),[ye,Se]=(0,ta.useState)(null),Be=e.useFormValue("target_names"),Ce=e.useFormValue("target_account_seqs"),ft=z.useValue("createAttachmentFiles")??[],xe=s?il({author_account_seq:a,target_names:Be,target_account_seqs:Ce},i):"";return(0,tt.jsxs)(tt.Fragment,{children:[n,s?null:(0,tt.jsx)(_r.Box,{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(se=>{let Ie=C?"bug":L?"event":"task",ke=Ie===se.value;return(0,tt.jsx)(_r.ButtonBase,{onClick:()=>{if(Ie===se.value)return;e.setFormValue("is_event",se.value==="event"),e.setFormValue("is_bug",se.value==="bug"),e.setFormValue("visibility",se.value==="bug"?"all":"involved"),e.setFormValue("visibility_group_seq",0),se.value==="bug"&&(e.setFormValue("repeat_rule",""),e.setFormValue("repeat_until",""));let _e=e.getFormValue("icon"),rt=e.getFormValue("icon_color"),Fe=[Fo,"event",Bs].includes(_e),me=!rt||rt===Gf||rt===Is;Fe&&e.setFormValue("icon",se.value==="event"?"event":se.value==="bug"?Bs:Fo),me&&e.setFormValue("icon_color",se.value==="event"?Gf:se.value==="bug"?Is:"")},sx:{px:1.75,py:.75,borderRadius:99,fontSize:13.5,fontWeight:ke?600:400,color:ke?"#ffffff":"#787774",bgcolor:ke?"#2563eb":"#f4f4f2"},children:se.label},se.label)})}),(0,tt.jsx)(_r.Divider,{sx:{borderColor:"#e6e6e3"}}),(0,tt.jsxs)(_r.Box,{sx:{py:1.5,display:"flex",flexDirection:"column",gap:.25},children:[(0,tt.jsx)(Ya,{hideProject:r,hideDueDate:!L&&!!ne,values:{tabKey:q,managerName:P,receiverNames:N,startDate:$,dueDate:T,reminders:R,priority:F,eventTime:v,eventPlace:w,eventAddress:_},customTabs:g,avatarSrcByName:o,notice:s,event:L,onChangeEventTime:se=>e.setFormValue("event_time",se),onChangeEventPlace:se=>e.setFormValue("event_place",se),onChangeEventAddress:se=>e.setFormValue("event_address",se),targetSummary:xe,onChangeProject:se=>e.setFormValue("tab_key",se),onAddProject:b,onChangeStartDate:se=>e.setFormValue("start_date",se),onChangeDueDate:se=>e.setFormValue("due_date",se),onChangeReminder:se=>e.setFormValue("reminders",se),onChangePriority:se=>e.setFormValue("priority",se),onMemberEdit:u,pinColumns:!0,beforeStart:(0,tt.jsxs)(tt.Fragment,{children:[!s&&!C?(0,tt.jsx)(It,{icon:(0,tt.jsx)(R1.default,{sx:{fontSize:17,...ne?{color:"#2f80ed"}:{}}}),label:"\uBC18\uBCF5",onClick:se=>pe(se),sx:L?void 0:zr(2),children:ne?Ua(ne):(0,tt.jsx)(_r.Box,{component:"span",sx:{color:"#9a9a97"},children:"\uC5C6\uC74C"})}):null,!s&&!C&&ne?(0,tt.jsx)(It,{icon:(0,tt.jsx)(O1.default,{sx:{fontSize:17}}),label:"\uBC18\uBCF5 \uC885\uB8CC",onClick:se=>Se(se),sx:L?void 0:zr(2),children:ie?oo(ie):(0,tt.jsx)(_r.Box,{component:"span",sx:{color:"#9a9a97"},children:"\uC790\uB3D9"})}):null]}),trailing:(0,tt.jsxs)(tt.Fragment,{children:[s?null:(0,tt.jsx)(It,{icon:K==="all"?(0,tt.jsx)(Uf.default,{sx:{fontSize:17,color:"#2f80ed"}}):K==="group"?(0,tt.jsx)(Vf.default,{sx:{fontSize:17,color:"#d9730d"}}):(0,tt.jsx)(Wf.default,{sx:{fontSize:17}}),label:"\uACF5\uAC1C",onClick:se=>oe(se),sx:L?void 0:zr(1),children:K==="all"?"\uC804\uCCB4\uACF5\uAC1C":K==="group"?`\uBD80\uC11C\uACF5\uAC1C \xB7 ${h.find(se=>se.seq===ee)?.name??"\uBD80\uC11C"}`:"\uBE44\uACF5\uAC1C"}),j&&!L&&!s?(0,tt.jsxs)(tt.Fragment,{children:[(0,tt.jsx)(It,{icon:(0,tt.jsx)(M1.default,{sx:{fontSize:17}}),label:"\uBAA9\uD45C",onClick:se=>G(se),sx:zr(1),children:B>0?U.find(se=>se.seq===B)?.name??"\uC0AD\uC81C\uB41C \uBAA9\uD45C":(0,tt.jsx)(_r.Box,{component:"span",sx:{color:"#9a9a97"},children:"\uBBF8\uBC30\uC815"})}),(0,tt.jsx)(It,{icon:(0,tt.jsx)(A1.default,{sx:{fontSize:17}}),label:"\uD3EC\uC778\uD2B8",sx:zr(1),children:(0,tt.jsx)(Ko,{value:E>0?String(E):"",placeholder:"\uBBF8\uCD94\uC815",onCommit:se=>e.setFormValue("story_points",Number(se.replace(/[^0-9.]/g,""))||0)})})]}):null,C?(0,tt.jsx)(Xa,{values:{repro:S,device:D,where:p,version:y},onChangeRepro:se=>e.setFormValue("bug_repro",se),onChangeDevice:se=>e.setFormValue("bug_device",se),onChangeWhere:se=>e.setFormValue("bug_where",se),onChangeVersion:se=>e.setFormValue("bug_version",se)}):null]}),leading:L||c?null:(0,tt.jsx)(_r.Box,{sx:{gridColumn:"1 / -1"},children:(0,tt.jsx)(It,{icon:(0,tt.jsx)(E1.default,{sx:{fontSize:17}}),label:"\uB77C\uBCA8",onClick:se=>J(se),children:(W??[]).length>0?(0,tt.jsx)(ci,{labelKeys:W??[],labelOptions:f}):(0,tt.jsx)(_r.Box,{component:"span",sx:{color:"#9a9a97"},children:"\uBE44\uC5B4 \uC788\uC74C"})})})}),(0,tt.jsx)(_r.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,tt.jsx)(ao,{icon:(0,tt.jsx)(B1.default,{sx:{fontSize:18,display:"block"}}),title:"\uB0B4\uC6A9",titleExtra:k?(0,tt.jsx)(Za,{content:H,templates:k,onApply:se=>e.setFormValue("content",se),onSave:I,onRemove:M}):void 0,children:(0,tt.jsx)(Qa,{syncKey:x,value:H,onChange:se=>e.setFormValue("content",se)})}),L?null:(0,tt.jsx)(_r.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),L?null:(0,tt.jsx)(tl,{taskSeq:0,checklist:A,onAdd:(se,Ie)=>e.setFormValue("checklist",[...A,{label:Ie,checked:!1}]),onToggle:(se,Ie,ke)=>e.setFormValue("checklist",A.map((_e,rt)=>rt===Ie?{..._e,checked:ke}:_e)),onRemove:(se,Ie)=>e.setFormValue("checklist",A.filter((ke,_e)=>_e!==Ie)),onUpdate:(se,Ie,ke)=>e.setFormValue("checklist",A.map((_e,rt)=>rt===Ie?{..._e,label:ke}:_e))}),(0,tt.jsx)(_r.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,tt.jsx)(rl,{taskSeq:0,attachments:ft.map(se=>({name:se.name,size:se.size})),onAdd:(se,Ie)=>{let ke=Hf(Ie,O);ke.message&&(0,Kf.InfoAlert)(ke.message),ke.accepted.length!==0&&z.setValue("createAttachmentFiles",[...z.getValue("createAttachmentFiles")??[],...ke.accepted])},onRemove:(se,Ie)=>z.setValue("createAttachmentFiles",ft.filter((ke,_e)=>_e!==Ie))}),C?null:(0,tt.jsxs)(tt.Fragment,{children:[(0,tt.jsx)(_r.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,tt.jsx)(ao,{icon:(0,tt.jsx)(I1.default,{sx:{fontSize:18,display:"block"}}),title:"\uBE44\uACE0",children:(0,tt.jsx)(D1.TextField,{form:e,name:"note",placeholder:"\uBE44\uACE0 \uC785\uB825",fullWidth:!0,size:"medium",sx:{mt:1}})})]})]}),(0,tt.jsx)(_r.Menu,{transitionDuration:0,anchorEl:X,open:!!X,onClose:()=>G(null),children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...U.map(se=>({seq:se.seq,label:so(se)}))].map(se=>(0,tt.jsx)(_r.MenuItem,{onClick:()=>{e.setFormValue("sprint_seq",se.seq),G(null)},sx:{fontSize:14,minWidth:170},children:se.label},se.seq))}),(0,tt.jsx)(_r.Menu,{transitionDuration:0,anchorEl:ae,open:!!ae,onClose:()=>pe(null),children:[{value:"",label:"\uC5C6\uC74C"},...Xs].map(se=>(0,tt.jsx)(_r.MenuItem,{selected:ne===se.value,onClick:()=>{if(pe(null),se.value===""){e.setFormValue("repeat_rule",""),e.setFormValue("repeat_until","");return}let Ie;if(L){if(Ie=String(e.getFormValue("due_date")??"").slice(0,10),!Ie){(0,Kf.InfoAlert)("\uBC18\uBCF5\uD558\uB824\uBA74 \uC77C\uC815 \uB0A0\uC9DC\uB97C \uBA3C\uC800 \uC120\uD0DD\uD558\uC138\uC694.");return}}else{if(Ie=String(e.getFormValue("start_date")??"").slice(0,10),!Ie){let ke=new Date,_e=rt=>String(rt).padStart(2,"0");Ie=`${ke.getFullYear()}-${_e(ke.getMonth()+1)}-${_e(ke.getDate())}`}e.setFormValue("due_date","")}e.setFormValue("repeat_rule",se.value),e.setFormValue("repeat_until",Va(Ie,se.value))},sx:{fontSize:14,minWidth:140},children:se.label},se.value||"none"))}),(0,tt.jsx)(P1.DatePicker,{anchorEl:ye,open:!!ye,onClose:()=>Se(null),selectedDate:ie?new Date(`${ie}T00:00:00`):new Date,onDateChange:se=>{let Ie=ke=>String(ke).padStart(2,"0");e.setFormValue("repeat_until",`${se.getFullYear()}-${Ie(se.getMonth()+1)}-${Ie(se.getDate())}`),Se(null)}}),(0,tt.jsx)(_r.Menu,{transitionDuration:0,anchorEl:te,open:!!te,onClose:()=>oe(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:(0,tt.jsx)(Wf.default,{sx:{fontSize:17,color:"#57564f"}}),selected:K==="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:(0,tt.jsx)(Uf.default,{sx:{fontSize:17,color:"#2f80ed"}}),selected:K==="all",onPick:()=>{e.setFormValue("visibility","all"),e.setFormValue("visibility_group_seq",0)}},...[...h].sort((se,Ie)=>se.seq===d?-1:Ie.seq===d?1:0).map(se=>({key:`group-${se.seq}`,label:`\uBD80\uC11C\uACF5\uAC1C \xB7 ${se.name}`,tip:`${se.name} \uC18C\uC18D \uC9C1\uC6D0\uC774 \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4`,icon:(0,tt.jsx)(Vf.default,{sx:{fontSize:17,color:"#d9730d"}}),selected:K==="group"&&ee===se.seq,onPick:()=>{e.setFormValue("visibility","group"),e.setFormValue("visibility_group_seq",se.seq)}}))].map(se=>(0,tt.jsx)(_r.Tooltip,{title:se.tip,arrow:!0,disableInteractive:!0,placement:"right",children:(0,tt.jsxs)(_r.MenuItem,{selected:se.selected,onClick:()=>{se.onPick(),oe(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[se.icon,se.label]})},se.key))}),(0,tt.jsx)(ol,{anchorEl:Z,selectedKeys:W??[],labelOptions:f,onToggle:se=>e.setFormValue("label_keys",wa(W??[],se)),onAddLabel:(se,Ie)=>m?.(se,Ie),onClose:()=>J(null)})]})}var Zt=require("react/jsx-runtime");function d_({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=qo(),u=(0,hs.useRef)(!1),[b,m]=(0,hs.useState)(0),x=l.useFormValue("title"),k=l.useFormValue("icon"),I=l.useFormValue("icon_color"),M=!!l.useFormValue("is_event"),z=!!l.useFormValue("is_bug"),O=dr(),N=d.useValue("createSubmitting")??!1,$=a||M?$t(k||(a?$r:Yr)):null,L=a?"\uACF5\uC9C0 \uB4F1\uB85D":M?"\uC77C\uC815 \uB4F1\uB85D":z?"\uC624\uB958 \uB4F1\uB85D":"\uC5C5\uBB34 \uB4F1\uB85D",C=a?"\uACF5\uC9C0 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694":M?"\uC77C\uC815 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694":z?"\uC5B4\uB5A4 \uC624\uB958\uC778\uC9C0 \uD55C \uC904\uB85C \uC801\uC5B4\uC8FC\uC138\uC694":"\uC5C5\uBB34 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694";(0,hs.useEffect)(()=>{let v=u.current;u.current=e,!(!e||v)&&(l.setFormValues({...l.getFormValues(),title:o,icon:a?$r:h?Bs:Fo,icon_color:a?"#e5484d":h?Is:"",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]=(0,hs.useState)(null),p=v=>$?M?(0,Zt.jsx)(Br.Tooltip,{title:"\uC544\uC774\uCF58 \uBCC0\uACBD",arrow:!0,enterDelay:400,disableInteractive:!0,children:(0,Zt.jsx)(Br.ButtonBase,{onClick:w=>D(w.currentTarget),sx:{display:"flex",p:.5,borderRadius:1,color:I||"#1e3a8a","&:hover":{bgcolor:"#f2f2f0"}},children:(0,Zt.jsx)($,{sx:{fontSize:20}})})}):(0,Zt.jsx)(Br.Box,{sx:[{display:"flex",color:I||"#1e3a8a"},v],children:(0,Zt.jsx)($,{sx:{fontSize:20}})}):null,y=(0,Zt.jsxs)(Br.Box,{sx:{display:"flex",alignItems:"center",gap:1,px:2,pt:2,pb:1},children:[p({p:0}),(0,Zt.jsx)(Br.Box,{component:"input",autoFocus:!0,spellCheck:!1,value:x,placeholder:C,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 O?(0,Zt.jsx)(Zt.Fragment,{children:(0,Zt.jsx)(z1.FormDialog,{open:e,onClose:f,locale:"ko",fontScale:{enabled:!0,default:1.1,min:.6},title:L,titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},fullScreen:!0,mobilePresentation:"slide",actions:{showCancelButton:!0,right:(0,Zt.jsx)(Br.Button,{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:(0,Zt.jsx)(Br.Box,{sx:{width:"100%",minWidth:0,display:"flex",flexDirection:"column",gap:0},children:(0,Zt.jsx)(Pc,{...g,contentSyncKey:`create-${b}`,leadingRow:y})})}]})}):(0,Zt.jsxs)(Zt.Fragment,{children:[(0,Zt.jsx)(Br.Drawer,{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:(0,Zt.jsxs)(Br.Box,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[(0,Zt.jsxs)(Br.Box,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1.5,flexShrink:0},children:[p({px:.5}),(0,Zt.jsx)(Br.Box,{component:"input",autoFocus:!0,spellCheck:!1,value:x,placeholder:C,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}}}),(0,Zt.jsx)(Br.IconButton,{"aria-label":"\uB2EB\uAE30",onClick:f,sx:{color:"#6b7280"},children:(0,Zt.jsx)(N1.default,{})})]}),(0,Zt.jsx)(Br.Divider,{sx:{borderColor:"#e6e6e3"}}),(0,Zt.jsx)(Br.Box,{sx:{flex:1,minHeight:0},children:(0,Zt.jsx)(L1.default,{style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:(0,Zt.jsx)(Pc,{...g,contentSyncKey:`create-${b}`})})}),(0,Zt.jsx)(Br.Divider,{sx:{borderColor:"#e6e6e3"}}),(0,Zt.jsxs)(Br.Box,{sx:{display:"flex",justifyContent:"flex-end",gap:1,px:2,py:1.5,flexShrink:0},children:[(0,Zt.jsx)(Br.Button,{onClick:f,color:"inherit",disabled:N,children:"\uCDE8\uC18C"}),(0,Zt.jsx)(Br.Button,{onClick:l.submit,variant:"contained",disabled:N,children:N?"\uB4F1\uB85D \uC911\u2026":"\uB4F1\uB85D"})]})]})}),(0,Zt.jsx)(hi,{anchorEl:S,value:k,color:I,onSelect:v=>{l.setFormValue("icon",v),D(null)},onSelectColor:v=>l.setFormValue("icon_color",v),onClose:()=>D(null)})]})}var Do=require("react"),pr=require("@mui/material"),Py=Y(require("@mui/icons-material/MoreVert"),1),Ny=Y(require("@mui/icons-material/DeleteOutline"),1),Ly=Y(require("@mui/icons-material/ShareOutlined"),1),zy=Y(require("@mui/icons-material/HistoryOutlined"),1),jy=Y(require("@ehfuse/overlay-scrollbar"),1),Fy=require("@ehfuse/mui-form-dialog"),hd=require("@ehfuse/alerts");var Ao=require("react"),Ze=require("@mui/material"),Zf=Y(require("@mui/icons-material/Send"),1),q1=require("@ehfuse/mui-form-controls"),al=Y(require("@mui/icons-material/Close"),1),$1=Y(require("@mui/icons-material/EditOutlined"),1),H1=Y(require("@mui/icons-material/Favorite"),1),W1=Y(require("@mui/icons-material/FavoriteBorderOutlined"),1),U1=Y(require("@mui/icons-material/CheckCircle"),1),V1=Y(require("@mui/icons-material/CheckCircleOutlineOutlined"),1),ps=Y(require("@mui/icons-material/AttachFileOutlined"),1),K1=Y(require("@mui/icons-material/AddCircleOutline"),1),G1=Y(require("@mui/icons-material/ImageOutlined"),1);var Yf=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]};var j1=require("@mui/material");var sl=require("react/jsx-runtime"),h_=/https?:\/\/[^\s<>"']+/g;function p_(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 Xf({text:e}){let{openExternalUrl:f}=ct(),g=s=>{f?f(s):window.open(s,"_blank","noopener,noreferrer")},l=[],o=0;for(let s of e.matchAll(h_)){let r=s.index??0,[t,n]=p_(s[0]);r>o&&l.push(e.slice(o,r)),l.push((0,sl.jsx)(j1.Box,{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)),(0,sl.jsx)(sl.Fragment,{children:l})}var Re=require("react/jsx-runtime"),m_=5;function F1({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:(0,Re.jsx)(Ze.Box,{sx:{whiteSpace:"pre-line",fontSize:12},children:o.map(c=>`${c.name} \xB7 ${c.time}`).join(`
39
- `)}),n=e==="like"?"#e5484d":"#2f80ed";return(0,Re.jsx)(Ze.Tooltip,{title:t,arrow:!0,enterDelay:300,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:(0,Re.jsxs)(Ze.Box,{sx:{display:"inline-flex",alignItems:"center"},children:[(0,Re.jsx)(Ze.IconButton,{size:"small","aria-label":`\uB313\uAE00 ${r}`,onClick:l,sx:{color:s?n:"#c9c8c5",p:.5},children:e==="like"?s?(0,Re.jsx)(H1.default,{sx:{fontSize:16}}):(0,Re.jsx)(W1.default,{sx:{fontSize:16}}):s?(0,Re.jsx)(U1.default,{sx:{fontSize:16}}):(0,Re.jsx)(V1.default,{sx:{fontSize:16}})}),o.length>0?(0,Re.jsx)(Ze.Box,{component:"span",sx:{fontSize:12,color:s?n:"#9a9a97",ml:-.25},children:o.length}):null]})})}function Jf({taskSeq:e,comments:f,currentUserName:g="",myAccountSeq:l=0,avatarSrcByName:o,onUpdate:s,onRemove:r,onToggleReaction:t,onPreview:n,onDownload:c}){let[i,a]=(0,Ao.useState)(null),h=(0,Ao.useRef)(null),[d,u]=(0,Ao.useState)(null),[b,m]=(0,Ao.useState)(!1),x=Math.max(0,f.length-m_),k=x>0&&!b,I=i?Math.min(i.index,x):x,M=f.map(($,L)=>({comment:$,index:L})).slice(k?I:0),z=Ts(),O=$=>{if(n){n($);return}window.open(z($.uuid??""),"_blank","noopener,noreferrer")},P=$=>{if(c){c($);return}window.open(z($.uuid??"",{download:!0}),"_blank","noopener,noreferrer")},N=ct().slots?.avatar;return(0,Re.jsxs)(Ze.Box,{sx:{px:2,pb:2,display:"flex",flexDirection:"column",gap:.25},children:[(0,Re.jsxs)(Ze.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,Re.jsx)(di,{sx:{fontSize:18,display:"block",color:"#37352f"}}),(0,Re.jsxs)(Ze.Box,{sx:{fontSize:Bc,fontWeight:500,color:"#37352f"},children:["\uB313\uAE00",f.length>0?` (${f.length})`:""]}),x>0&&(!k||I>0)?(0,Re.jsx)(Ze.Box,{role:"button",tabIndex:0,onClick:()=>m($=>!$),onKeyDown:$=>{($.key==="Enter"||$.key===" ")&&($.preventDefault(),m(L=>!L))},sx:{ml:"auto",flexShrink:0,cursor:"pointer",fontSize:14.5,color:"#5b87d6","&:hover":{textDecoration:"underline"}},children:k?`\uC774\uC804 \uB313\uAE00 ${I}\uAC1C \uB354 \uBCF4\uAE30`:"\uC774\uC804 \uB313\uAE00 \uC811\uAE30"}):null]}),f.length===0?(0,Re.jsx)(Ze.Box,{sx:{mt:1,fontSize:14.5,color:"#9a9a97"},children:"\uB4F1\uB85D\uB41C \uB313\uAE00\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):null,(0,Re.jsx)(Ze.Box,{sx:{display:"flex",flexDirection:"column",gap:1,mt:1},children:M.map(({comment:$,index:L})=>{let C=!!g&&$.author===g;return(0,Re.jsxs)(Ze.Box,{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($.author)??"";return N?(0,Re.jsx)(Ze.Box,{sx:{display:"inline-flex",flexShrink:0},children:(0,Re.jsx)(N,{name:$.author,src:S||void 0,size:44})}):(0,Re.jsx)(Ze.Box,{sx:{display:"inline-flex",flexShrink:0},children:(0,Re.jsx)(po,{src:S,name:$.author,avatarSx:{width:44,height:44,fontSize:20,borderRadius:"50%",...ns[0]},iconFontSize:24})})})(),(0,Re.jsxs)(Ze.Box,{sx:{flex:1,minWidth:0},children:[(0,Re.jsxs)(Ze.Box,{sx:{display:"flex",alignItems:"center",gap:.75,minWidth:0,position:"relative"},children:[(0,Re.jsx)(Ze.Box,{component:"span",sx:{fontSize:14.5,fontWeight:700,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:$.author}),$.external?(0,Re.jsx)(Ze.Box,{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,(0,Re.jsx)(Ze.Box,{component:"span",sx:{fontSize:12.5,color:"#9a9a97",flexShrink:0,whiteSpace:"nowrap"},children:$.time}),C?(0,Re.jsx)(Ze.Box,{sx:{ml:"auto"}}):(0,Re.jsxs)(Ze.Box,{sx:{display:"flex",alignItems:"center",gap:.25,ml:"auto",flexShrink:0},children:[(0,Re.jsx)(F1,{kind:"like",reactions:$.likes,myAccountSeq:l,onToggle:()=>t?.(e,L,"like")}),(0,Re.jsx)(F1,{kind:"ack",reactions:$.acks,myAccountSeq:l,onToggle:()=>t?.(e,L,"ack")})]}),C?(0,Re.jsxs)(Ze.Box,{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:[(0,Re.jsx)(Ze.IconButton,{size:"small","aria-label":"\uB313\uAE00 \uC218\uC815",onClick:()=>a({index:L,text:$.text,attachments:[...$.attachments??[]],files:[]}),sx:{color:"#9a9a97"},children:(0,Re.jsx)($1.default,{sx:{fontSize:15}})}),(0,Re.jsx)(Ze.IconButton,{size:"small","aria-label":"\uB313\uAE00 \uC0AD\uC81C",onClick:S=>u({anchorEl:S.currentTarget,index:L}),sx:{color:"#9a9a97"},children:(0,Re.jsx)(al.default,{sx:{fontSize:15}})})]}):null]}),i?.index===L?(0,Re.jsxs)(Ze.Box,{sx:{mt:.5},children:[(0,Re.jsx)(Ze.Box,{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"}}),(0,Re.jsxs)(Ze.Box,{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 Nc(S.name)&&S.uuid?(0,Re.jsxs)(Ze.Box,{sx:{position:"relative"},children:[(0,Re.jsx)(Ze.Box,{component:"img",src:z(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"}}),(0,Re.jsx)(Ze.IconButton,{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:(0,Re.jsx)(al.default,{sx:{fontSize:14}})})]},`kept-${S.uuid}-${D}`):(0,Re.jsx)(Ze.Chip,{size:"small",icon:(0,Re.jsx)(ps.default,{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 Nc(S.name)?(0,Re.jsxs)(Ze.Box,{sx:{position:"relative"},children:[(0,Re.jsx)(Ze.Box,{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"}}),(0,Re.jsx)(Ze.IconButton,{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:(0,Re.jsx)(al.default,{sx:{fontSize:14}})})]},`new-${S.name}-${D}`):(0,Re.jsx)(Ze.Chip,{size:"small",icon:(0,Re.jsx)(ps.default,{sx:{fontSize:14}}),label:`${S.name} (\uC0C8 \uD30C\uC77C)`,onDelete:p,sx:{fontSize:14,height:26,bgcolor:"#eef4ff"}},`new-${S.name}-${D}`)}),(0,Re.jsx)(Ze.Tooltip,{title:"\uCCA8\uBD80 \uCD94\uAC00",arrow:!0,children:(0,Re.jsx)(Ze.IconButton,{size:"small","aria-label":"\uCCA8\uBD80 \uCD94\uAC00",onClick:()=>h.current?.click(),sx:{ml:"auto",color:"#2f80ed"},children:(0,Re.jsx)(K1.default,{sx:{fontSize:20}})})})]}),(0,Re.jsxs)(Ze.Box,{sx:{display:"flex",justifyContent:"flex-end",alignItems:"center",gap:.75,mt:.5},children:[(0,Re.jsx)(Ze.Button,{size:"small",color:"inherit",onClick:()=>a(null),children:"\uCDE8\uC18C"}),(0,Re.jsx)(Ze.Button,{size:"small",variant:"contained",disabled:!i.text.trim()&&i.attachments.length===0&&i.files.length===0,onClick:()=>{s(e,L,i.text,{attachments:i.attachments,files:i.files}),a(null)},children:"\uC800\uC7A5"})]}),(0,Re.jsx)(Ze.Box,{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=""}})]}):(0,Re.jsxs)(Ze.Box,{children:[$.text?(0,Re.jsx)(Ze.Box,{sx:{fontSize:15,whiteSpace:"pre-wrap"},children:(0,Re.jsx)(Xf,{text:$.text})}):null,($.attachments??[]).length>0?(0,Re.jsx)(Ze.Box,{sx:{display:"flex",flexWrap:"wrap",gap:.75,mt:.75},children:($.attachments??[]).map((S,D)=>{let p=!!S.uuid;if(Nc(S.name)&&p)return(0,Re.jsx)(Ze.Box,{component:"img",src:z(S.uuid??"",{thumb:"md"}),alt:S.name,title:`${S.name} \uD06C\uAC8C \uBCF4\uAE30`,loading:"lazy",onClick:()=>O(S),sx:{width:96,height:96,objectFit:"cover",borderRadius:1,border:"1px solid #e6e6e3",cursor:"pointer",bgcolor:"#f8fafc"}},`${S.name}-${D}`);let v=Mc(S.name);return(0,Re.jsx)(Ze.Chip,{size:"small",icon:(0,Re.jsx)(ps.default,{sx:{fontSize:14}}),label:`${S.name} (${Yf(S.size)})`,clickable:p,onClick:p?()=>v?O(S):P(S):void 0,title:p?`${S.name} ${v?"\uBBF8\uB9AC\uBCF4\uAE30":"\uB2E4\uC6B4\uB85C\uB4DC"}`:S.name,sx:{fontSize:14,height:26,bgcolor:"#f1f5f9"}},`${S.name}-${D}`)})}):null]})]})]},`${$.time}-${L}`)})}),(0,Re.jsx)(Qt,{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 Nc(e){return/\.(png|jpe?g|gif|webp|bmp|svg|heic|heif)$/i.test(String(e??"").trim())}function Qf({onSubmit:e}){let[f,g]=(0,Ao.useState)(""),[l,o]=(0,Ao.useState)([]),[s,r]=(0,Ao.useState)(!1),t=(0,Ao.useRef)(null),n=(0,Ao.useRef)(null),c=dr(),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=(0,Re.jsxs)(Re.Fragment,{children:[(0,Re.jsx)(Ze.IconButton,{size:"small","aria-label":"\uD30C\uC77C \uCCA8\uBD80",onClick:()=>t.current?.click(),sx:{color:"#9a9a97"},children:(0,Re.jsx)(ps.default,{sx:{fontSize:20}})}),(0,Re.jsx)(Ze.IconButton,{size:"small","aria-label":"\uC774\uBBF8\uC9C0 \uCCA8\uBD80",onClick:()=>n.current?.click(),sx:{color:"#9a9a97"},children:(0,Re.jsx)(G1.default,{sx:{fontSize:20}})})]});return(0,Re.jsxs)(Ze.Box,{children:[l.length>0?(0,Re.jsx)(Ze.Box,{sx:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:1.5,px:2,pt:2},children:l.map((d,u)=>Nc(d.name)?(0,Re.jsxs)(Ze.Box,{sx:{position:"relative"},children:[(0,Re.jsx)(Ze.Box,{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"}}),(0,Re.jsx)(Ze.IconButton,{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:(0,Re.jsx)(al.default,{sx:{fontSize:14}})})]},`${d.name}-${u}`):(0,Re.jsx)(Ze.Chip,{size:"small",icon:(0,Re.jsx)(ps.default,{sx:{fontSize:14}}),label:`${d.name} (${Yf(d.size)})`,onDelete:()=>o(b=>b.filter((m,x)=>x!==u)),sx:{fontSize:14,height:26,bgcolor:"#f1f5f9"}},`${d.name}-${u}`))}):null,(0,Re.jsxs)(Ze.Box,{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?(0,Re.jsxs)(Ze.Box,{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:[(0,Re.jsx)(ps.default,{sx:{fontSize:18}}),"\uC5EC\uAE30\uC5D0 \uB193\uC73C\uBA74 \uCCA8\uBD80\uB429\uB2C8\uB2E4"]}):null,(0,Re.jsx)(q1.TextField,{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?(0,Re.jsxs)(Ze.Box,{sx:{position:"absolute",right:8,top:"50%",transform:"translateY(-50%)",display:"flex",alignItems:"center",gap:.25},children:[h,(0,Re.jsx)(Ze.IconButton,{"aria-label":"\uB313\uAE00 \uB4F1\uB85D",disabled:!f.trim()&&l.length===0,onClick:a,sx:{color:"#2563eb","&.Mui-disabled":{color:"#c9c8c5"}},children:(0,Re.jsx)(Zf.default,{sx:{fontSize:22}})})]}):(0,Re.jsxs)(Re.Fragment,{children:[(0,Re.jsx)(Ze.Box,{sx:{position:"absolute",left:8,bottom:6,display:"flex",alignItems:"center",gap:.25},children:h}),(0,Re.jsx)(Ze.IconButton,{"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:(0,Re.jsx)(Zf.default,{sx:{fontSize:22}})})]})]}),(0,Re.jsx)(Ze.Box,{component:"input",ref:t,type:"file",multiple:!0,onChange:d=>{i(d.target.files),d.target.value=""},sx:{display:"none"}}),(0,Re.jsx)(Ze.Box,{component:"input",ref:n,type:"file",accept:"image/*",multiple:!0,onChange:d=>{i(d.target.files),d.target.value=""},sx:{display:"none"}})]})}var gs=require("react"),Ir=require("@mui/material"),oy=Y(require("@mui/icons-material/Close"),1),iy=Y(require("@mui/icons-material/ArrowBack"),1),sy=Y(require("@mui/icons-material/ShareOutlined"),1),ay=Y(require("@mui/icons-material/HistoryOutlined"),1),ly=Y(require("@mui/icons-material/Print"),1);var J1=require("react"),to=require("@mui/material"),Q1=require("@ehfuse/mui-form-dialog"),ey=require("@ehfuse/overlay-scrollbar");var Li=require("react"),Y1=require("@ehfuse/forma");function X1({open:e,onClose:f,modalId:g}){let l=(0,Li.useRef)(f);l.current=f;let o=(0,Y1.useModal)({modalId:g,onClose:()=>l.current()}),s=(0,Li.useRef)(o);s.current=o;let r=(0,Li.useRef)(!1);return(0,Li.useEffect)(()=>{e&&!r.current?s.current.open():!e&&r.current&&s.current.isOpen&&s.current.close(),r.current=e},[e]),{requestClose:(0,Li.useCallback)(()=>{if(s.current.isOpen){s.current.close();return}l.current()},[])}}var Fn=require("react/jsx-runtime"),g_={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 Z1(e){return String(e??"").trim()||"\uC5C6\uC74C"}function b_(e){if(e.kind!=="field")return g_[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) "${Z1(g)}" \u2192 "${Z1(l)}" \uB85C \uBC14\uAFE8\uC2B5\uB2C8\uB2E4`}function ll({open:e,taskSeq:f,items:g,loading:l,onLoad:o,onClose:s}){let r=dr(),{requestClose:t}=X1({open:e,onClose:s});(0,J1.useEffect)(()=>{e&&f>0&&!g&&o?.(f)},[e,f,g,o]);let n=(0,Fn.jsx)(to.Box,{sx:{height:r?"100%":420,minHeight:0},children:(0,Fn.jsx)(ey.OverlayScrollbar,{style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:(0,Fn.jsxs)(to.Box,{sx:{px:2,pt:2,display:"flex",flexDirection:"column",gap:1,"&::after":{content:'""',flexShrink:0,height:16}},children:[l&&!g?(0,Fn.jsxs)(to.Box,{sx:{display:"flex",alignItems:"center",gap:1,color:"#9a9a97",fontSize:14.5},children:[(0,Fn.jsx)(to.CircularProgress,{size:14,thickness:5,sx:{color:"#9a9a97"}}),"\uBD88\uB7EC\uC624\uB294 \uC911\u2026"]}):null,g&&g.length===0?(0,Fn.jsx)(to.Box,{sx:{fontSize:14.5,color:"#9a9a97"},children:"\uAE30\uB85D\uB41C \uD65C\uB3D9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):null,(g??[]).map(c=>(0,Fn.jsxs)(to.Box,{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:[(0,Fn.jsx)(to.Box,{sx:{flexShrink:0,...r?{}:{width:"10.5em"},whiteSpace:"nowrap",fontSize:13.5,color:"#9a9a97",lineHeight:1.5},children:Gn(c.acted_time)}),(0,Fn.jsxs)(to.Box,{sx:{minWidth:0,fontSize:14.5,color:"#37352f",lineHeight:1.5},children:[(0,Fn.jsx)(to.Box,{component:"span",sx:{fontWeight:500},children:String(c.actor_name??"").trim()||"\uC774\uB984\uC5C6\uC74C"}),(0,Fn.jsx)(to.Box,{component:"span",sx:{ml:.5},children:b_(c)})]})]},c.seq))]})})});return(0,Fn.jsx)(Q1.FormDialog,{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:(0,Fn.jsx)(to.Button,{variant:"contained",onClick:t,children:"\uB2EB\uAE30"})}})}var Lc=require("@ehfuse/alerts");var ty=e=>e?e.replace(/<(script|style)[\s\S]*?<\/\1>/gi,"").replace(/<br\s*\/?>/gi,`
37
+ `).trim()}function Qa({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}=ct(),a=S=>{i?i(S):window.open(S,"_blank","noopener,noreferrer")},[h,d]=(0,Rn.useState)(()=>!o||!Ja(f).trim());(0,Rn.useEffect)(()=>{o&&d(!Ja(f).trim())},[e,o]);let u=(0,Rn.useRef)(null),b=(0,Rn.useRef)(new Js.ImageResizePlugin),m=(0,Rn.useRef)(null),x=t>0?t:0,k=(0,Rn.useRef)(x),I=(0,Rn.useRef)(n);I.current=n;let M=(0,Rn.useRef)(null),z=(0,Rn.useRef)(Date.now()+800),O=dr(),P=(0,on.useTheme)(),N=(0,on.useMediaQuery)(P.breakpoints.down("sm")),$=(S,D=!1)=>S instanceof Element?S.closest(D?".taskbox-content-readview a[href]":".ehfuse-editor-content a[href]"):null,L=S=>O||S.ctrlKey||S.metaKey;(0,Rn.useEffect)(()=>{if(l)return;let S=Af(f);M.current===S||M.current===f||(M.current=S,z.current=Date.now()+800,u.current?.setHtml(S))},[e,f,l]);let C=(0,Rn.useRef)(-1);return(0,Rn.useEffect)(()=>{if(l||O||t<=0||C.current===t||(C.current=t,Math.abs(t-k.current)<1))return;let S=m.current?.querySelector(".ehfuse-editor-container");S&&(Math.abs(S.getBoundingClientRect().height-t)<1||(S.style.height=`${t}px`,k.current=t))},[l,O,t]),(0,Rn.useEffect)(()=>{if(l||O)return;let S=m.current?.querySelector(".ehfuse-editor-container");if(!S||typeof ResizeObserver>"u")return;let D,p=new ResizeObserver(y=>{let v=Math.round(y[0]?.contentRect.height??0);v<=0||(window.clearTimeout(D),D=window.setTimeout(()=>{Math.abs(v-k.current)<1||(k.current=v,I.current?.(v))},300))});return p.observe(S),()=>{window.clearTimeout(D),p.disconnect()}},[l,O]),l||!h?(0,nn.jsxs)(on.Box,{sx:{position:"relative",mt:1},children:[(0,nn.jsx)(on.Box,{onClickCapture:S=>{let D=$(S.target,!0);D&&(S.preventDefault(),S.stopPropagation(),a(D.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:Af(f)}}),N?(0,nn.jsxs)(on.Box,{sx:{display:"flex",gap:1,mt:1},children:[l?null:(0,nn.jsx)(on.Button,{variant:"outlined",color:"inherit",startIcon:(0,nn.jsx)(Df.default,{sx:{fontSize:18}}),onClick:()=>d(!0),sx:{flex:1,fontSize:15,color:"#37352f",borderColor:"#d9d9d6"},children:"\uC218\uC815"}),s?(0,nn.jsx)(on.Button,{variant:"outlined",color:"inherit",startIcon:(0,nn.jsx)(Pf.default,{sx:{fontSize:18}}),onClick:s,sx:{flex:1,fontSize:15,color:"#37352f",borderColor:"#d9d9d6"},children:"\uBC88\uC5ED"}):null]}):(0,nn.jsxs)(on.Box,{sx:{position:"absolute",top:6,right:6,display:"flex",flexDirection:"column",gap:.25},children:[l?null:(0,nn.jsx)(on.Tooltip,{title:"\uB0B4\uC6A9 \uC218\uC815",arrow:!0,placement:"left",children:(0,nn.jsx)(on.IconButton,{size:"small","aria-label":"\uB0B4\uC6A9 \uC218\uC815",onClick:()=>d(!0),sx:{color:"#9a9a97"},children:(0,nn.jsx)(Df.default,{sx:{fontSize:17}})})}),s?(0,nn.jsx)(on.Tooltip,{title:"\uBC88\uC5ED",arrow:!0,placement:"left",children:(0,nn.jsx)(on.IconButton,{size:"small","aria-label":"\uBC88\uC5ED",onClick:s,sx:{color:"#9a9a97"},children:(0,nn.jsx)(Pf.default,{sx:{fontSize:17}})})}):null]})]}):(0,nn.jsxs)(on.Box,{ref:m,onDragOver:S=>S.stopPropagation(),onDrop:S=>S.stopPropagation(),onMouseDownCapture:S=>{L(S)&&$(S.target)&&S.preventDefault()},onClickCapture:S=>{let D=L(S)?$(S.target):null;D&&(S.preventDefault(),S.stopPropagation(),a(D.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"},...O?{"& .ehfuse-editor-content a[href]":{cursor:"pointer"}}:{},position:"relative"},children:[o?(0,nn.jsx)(on.Tooltip,{title:"\uD3B8\uC9D1 \uB05D(\uC77D\uAE30 \uBAA8\uB4DC)",arrow:!0,children:(0,nn.jsx)(on.IconButton,{size:"small","aria-label":"\uD3B8\uC9D1 \uB05D",onMouseDown:S=>S.preventDefault(),onClick:()=>d(!1),sx:{position:"absolute",top:4,right:6,zIndex:2,color:"#2f9e5b"},children:(0,nn.jsx)(Qb.default,{sx:{fontSize:19}})})}):null,(0,nn.jsx)(Js.EhfuseEditor,{ref:u,defaultValue:Af(f),autoHeight:O,resizable:!O,showToolbar:!O,focusBorder:!0,styles:{focusBorderColor:"var(--primary)"},toolbarOptions:Js.minimalToolbarOptions,plugins:[b.current],locale:"ko",minHeight:x||r,placeholder:"\uB0B4\uC6A9\uC744 \uC785\uB825\uD558\uC138\uC694",onImageUpload:c,contentStyle:{padding:"12px"},onChange:S=>{let D=Date.now()<z.current,p=S===M.current;M.current=S,!(D||p)&&g(S)}})]})}var ds=require("react"),Rt=require("@mui/material"),Go=require("@dnd-kit/core"),Ec=require("@dnd-kit/modifiers"),Ni=require("@dnd-kit/sortable"),l1=require("@dnd-kit/utilities"),Nf=Y(require("@mui/icons-material/Close"),1),c1=Y(require("@mui/icons-material/AddCircle"),1),Lf=Y(require("@mui/icons-material/AddTask"),1),u1=Y(require("@mui/icons-material/Checklist"),1),f1=Y(require("@mui/icons-material/CheckCircle"),1),d1=Y(require("@mui/icons-material/DragIndicator"),1),h1=Y(require("@mui/icons-material/Launch"),1),p1=Y(require("@mui/icons-material/LinkOutlined"),1),m1=Y(require("@mui/icons-material/RadioButtonUnchecked"),1);var Pi=require("react"),wn=require("@mui/material"),t1=require("@ehfuse/mui-form-dialog"),r1=require("@ehfuse/mui-form-controls"),n1=require("@ehfuse/alerts"),o1=Y(require("@mui/icons-material/CheckCircle"),1),i1=Y(require("@mui/icons-material/RadioButtonUnchecked"),1),s1=require("@ehfuse/overlay-scrollbar");var Wr=require("react/jsx-runtime"),e1=[{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 el({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=dr(),[a,h]=(0,Pi.useState)("related"),[d,u]=(0,Pi.useState)(""),[b,m]=(0,Pi.useState)([]);(0,Pi.useEffect)(()=>{e&&(h("related"),u(""),m([]))},[e]);let x=(0,Pi.useMemo)(()=>{let O=new Set([f.seq,...l]),P=d.trim().toLowerCase();return g.filter(N=>O.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,$)=>!!N.completed!=!!$.completed?N.completed?1:-1:$.seq-N.seq)},[g,f.seq,l,d]),k=()=>{if(b.length===0){(0,n1.ErrorAlert)("\uC5F0\uACB0\uD560 \uC5C5\uBB34\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return}for(let O of b)s(O,a);o()},I=O=>{m(P=>P.includes(O)?P.filter(N=>N!==O):c?[...P,O]:[O])},M=e1.find(O=>O.type===a)?.hint??"",z=(0,Wr.jsxs)(wn.Box,{sx:{display:"flex",flexDirection:"column",minHeight:0,height:i?"100%":"auto"},children:[r?null:(0,Wr.jsx)(wn.Tabs,{value:a,onChange:(O,P)=>h(P),sx:{minHeight:38,flexShrink:0,borderBottom:"1px solid #ededeb","& .MuiTab-root":{minHeight:38,py:.5,fontSize:16,color:"#333333"}},children:e1.map(O=>(0,Wr.jsx)(wn.Tab,{value:O.type,label:O.label},O.type))}),r?null:(0,Wr.jsx)(wn.Box,{sx:{mt:1,mb:1.5,fontSize:14,flexShrink:0},children:M}),(0,Wr.jsxs)(wn.Box,{sx:{...i?{height:"100%",minHeight:0}:{height:560},display:"flex",flexDirection:"column",...i?{}:{border:"1px solid #cccccc",borderRadius:1},overflow:"hidden",userSelect:"none"},children:[(0,Wr.jsx)(wn.Box,{sx:{px:1.5,py:1,borderBottom:"1px solid #cccccc",flexShrink:0},children:(0,Wr.jsx)(r1.ClearTextField,{placeholder:"\uC81C\uBAA9\xB7\uD2F0\uCF13\uBC88\uD638\uB85C \uAC80\uC0C9",value:d,onChange:O=>u(O.target.value),fullWidth:!0,autoFocus:!0,size:"small",sx:{"& .MuiOutlinedInput-notchedOutline":{border:"none"},"& .MuiInputBase-root":{px:0}}})}),(0,Wr.jsx)(wn.Box,{sx:{flex:1,minHeight:0},children:(0,Wr.jsx)(s1.OverlayScrollbar,{style:{height:"100%"},contentStyle:{paddingTop:0},children:(0,Wr.jsx)(wn.Box,{sx:{display:"flex",flexDirection:"column"},children:x.length===0?(0,Wr.jsx)(wn.Box,{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(O=>{let P=O.is_notice||O.is_event?$t(O.icon||(O.is_notice?$r:Yr)):null,N=b.includes(O.seq);return(0,Wr.jsxs)(wn.Box,{onClick:()=>I(O.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?(0,Wr.jsx)(o1.default,{sx:{fontSize:20,flexShrink:0,color:"#2f6fd0"}}):(0,Wr.jsx)(i1.default,{sx:{fontSize:20,flexShrink:0,color:"#c9c8c5"}}),P?(0,Wr.jsx)(P,{sx:{fontSize:17,flexShrink:0,color:O.icon_color||"#1e3a8a"}}):null,(0,Wr.jsxs)(wn.Box,{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:[O.ticket_no?`${O.ticket_no} `:"",O.title]}),(0,Wr.jsx)(wn.Box,{sx:{flexShrink:0,display:"flex",alignItems:"center"},children:(0,Wr.jsx)(ir,{option:Xr(O)})})]},O.seq)})})})})]})]});return(0,Wr.jsx)(t1.FormDialog,{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:z}],scrollPastLastSection:!1,sectionContentPaddingTop:0,contentTopPadding:12,actions:{showCancelButton:!0,right:(0,Wr.jsx)(wn.Button,{variant:"contained",disabled:b.length===0,onClick:k,children:n})}})}var it=require("react/jsx-runtime"),a1="taskbox.checklist.hideCompleted";function c_({id:e,children:f}){let{attributes:g,listeners:l,setNodeRef:o,transform:s,transition:r,isDragging:t}=(0,Ni.useSortable)({id:e});return(0,it.jsx)(Rt.Box,{ref:o,sx:{transform:l1.CSS.Transform.toString(s),transition:r,...t?{opacity:.6,position:"relative",zIndex:1}:{}},children:f({handleProps:{...g,...l},dragging:t})})}function u_({sortable:e,sensors:f,rowIds:g,onDragEnd:l,children:o}){let s=(0,it.jsx)(Rt.Box,{sx:{display:"flex",flexDirection:"column",mt:.5,pl:3.25},children:o});return e?(0,it.jsx)(Go.DndContext,{sensors:f,collisionDetection:Go.closestCenter,modifiers:[Ec.restrictToVerticalAxis,Ec.restrictToParentElement],onDragEnd:l,children:(0,it.jsx)(Ni.SortableContext,{items:g,strategy:Ni.verticalListSortingStrategy,children:s})}):s}function tl({taskSeq:e,checklist:f,onAdd:g,onToggle:l,onRemove:o,onUpdate:s,onReorder:r,removeLocked:t=!1,onConvertToTask:n,onOpenLinkedTask:c,linkCandidates:i,linkBaseTask:a,onLinkExistingTask:h,resolveLinkedTask:d,myAccountSeq:u=0}){let[b,m]=(0,ds.useState)(""),[x,k]=(0,ds.useState)(!1),[I,M]=(0,ds.useState)(null),z=dr(),[O,P]=(0,ds.useState)(null),[N,$]=(0,ds.useState)(null),L=q=>{let B=q.task_seq?d?.(q.task_seq):void 0;return B?B.completed:q.checked},C=q=>{if(!q.task_seq||u<=0)return!1;let B=d?.(q.task_seq);return B?!Fu(B,u):!1},S=q=>!!q.task_seq&&!!d&&!d?.(q.task_seq),D=f.filter(q=>!S(q)),p=D.filter(L).length,[y,v]=(0,ds.useState)(()=>{try{return localStorage.getItem(a1)==="1"}catch{return!1}}),w=q=>{v(q);try{localStorage.setItem(a1,q?"1":"0")}catch{}},_=!!r&&!z&&!t,T=(0,Go.useSensors)((0,Go.useSensor)(Go.PointerSensor,{activationConstraint:{distance:5}})),R=(q,B)=>q.task_seq?`linked-${q.task_seq}`:`row-${B}`,F=f.map(R),H=F.filter((q,B)=>{let E=f[B];return S(E)?!1:!(y&&L(E))}),V=q=>{let{active:B,over:E}=q;if(!E||B.id===E.id)return;let j=F.indexOf(String(B.id)),U=F.indexOf(String(E.id));j<0||U<0||r?.(e,(0,Ni.arrayMove)(f,j,U))},A=()=>{b.trim()&&(g(e,b),m(""))};return(0,it.jsxs)(ao,{icon:(0,it.jsx)(u1.default,{sx:{fontSize:19,display:"block"}}),title:(0,it.jsxs)(it.Fragment,{children:["\uD560\uC77C",f.length>0?(0,it.jsxs)(Rt.Box,{component:"span",sx:{fontSize:12.5,color:"#9a9a97"},children:[p," / ",f.length]}):null]}),titleExtra:D.length>0?(0,it.jsxs)(Rt.Box,{sx:{flex:1,minWidth:0,ml:1,display:"flex",alignItems:"center",gap:1},children:[(0,it.jsx)(Rt.Box,{sx:{flex:1,minWidth:0,height:6,borderRadius:3,bgcolor:"#ececea"},children:(0,it.jsx)(Rt.Box,{sx:{height:"100%",borderRadius:3,width:`${Math.round(p/D.length*100)}%`,bgcolor:"#2f80ed",transition:"width 0.2s"}})}),p>0?(0,it.jsxs)(Rt.Box,{component:"label",sx:{display:"inline-flex",alignItems:"center",gap:.25,flexShrink:0,cursor:"pointer",fontSize:13.5,fontWeight:400,color:"#57564f",userSelect:"none"},children:[(0,it.jsx)(Rt.Switch,{size:"small",checked:y,onChange:(q,B)=>w(B)}),"\uC644\uB8CC\uC228\uAE40"]}):null]}):null,children:[(0,it.jsx)(u_,{sortable:_,sensors:T,rowIds:H,onDragEnd:V,children:f.map((q,B)=>{let E=q.task_seq?d?.(q.task_seq):void 0,j=L(q);if(y&&j||S(q))return null;let U=!!q.task_seq,X=C(q),G=W=>(0,it.jsxs)(Rt.Box,{sx:{display:"flex",alignItems:z?"flex-start":"center",gap:1,px:1.25,..._?{ml:-3,pl:.5}:{},py:.5,borderRadius:1,"&:hover":{bgcolor:"#f7f7f5"},"&:hover .taskbox-checklist-remove":{opacity:1},"&:hover .taskbox-checklist-convert":{opacity:1},"&:hover .taskbox-checklist-handle":{opacity:1}},children:[W?(0,it.jsx)(Rt.Box,{className:"taskbox-checklist-handle",...W,sx:{display:"inline-flex",flexShrink:0,alignItems:"center",color:"#c9c8c5",opacity:0,transition:"opacity 0.15s",cursor:"grab","&:active":{cursor:"grabbing"},touchAction:"none",userSelect:"none"},children:(0,it.jsx)(d1.default,{sx:{fontSize:16}})}):null,(0,it.jsx)(Rt.Tooltip,{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:(0,it.jsx)(Rt.Box,{component:"span",onClick:X?void 0:()=>l(e,B,!j),sx:{display:"inline-flex",flexShrink:0,cursor:X?"default":"pointer",...z?{mt:"1px"}:{}},children:j?(0,it.jsx)(f1.default,{sx:{fontSize:18,color:X?"#a9c6ec":"#2f80ed"}}):(0,it.jsx)(m1.default,{sx:{fontSize:18,color:X?"#d6d5d1":"#9a9a97"}})})}),I?.index===B?(0,it.jsx)(Rt.Box,{component:"input",autoFocus:!0,spellCheck:!1,value:I.label,enterKeyHint:"done",onChange:Z=>M({index:B,label:Z.target.value}),onBlur:()=>{I.label.trim()&&I.label.trim()!==q.label&&s?.(e,B,I.label),M(null)},onKeyDown:Z=>{Z.key==="Enter"&&Z.target.blur(),Z.key==="Escape"&&M(null)},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:14,color:"#37352f",bgcolor:"transparent",p:0}}):(0,it.jsx)(Rt.Box,{component:"span",onClick:U?q.task_seq&&c?()=>c(q.task_seq):void 0:t||!s?void 0:z?()=>P({index:B,label:q.label}):()=>M({index:B,label:q.label}),sx:{flex:1,minWidth:0,fontSize:14.5,color:"#37352f",textDecoration:j?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",...z?{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:3,lineHeight:1.4,wordBreak:"break-word"}:{whiteSpace:"nowrap"},...U?c?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}:t||!s?{}:{cursor:"text"}},children:q.label}),U?(0,it.jsxs)(Rt.Box,{component:"span",onClick:q.task_seq&&c?()=>c(q.task_seq):void 0,sx:{display:"inline-flex",alignItems:"center",gap:.4,flexShrink:0,...z?{mt:"1px"}:{},px:.75,py:.2,borderRadius:1,fontSize:12,fontWeight:500,color:"#1d4f91",bgcolor:"#e3eefb",whiteSpace:"nowrap",...c?{cursor:"pointer"}:{}},children:[(0,it.jsx)(h1.default,{sx:{fontSize:12}}),E?.manager_name?.trim()||"\uC5C5\uBB34"]}):null,!t&&!U&&n?(0,it.jsx)(Rt.Tooltip,{title:"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",arrow:!0,enterDelay:300,disableInteractive:!0,children:(0,it.jsx)(Rt.IconButton,{className:"taskbox-checklist-convert",size:"small","aria-label":"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",onClick:Z=>$({anchorEl:Z.currentTarget,index:B,label:q.label}),sx:{display:z?"none":"inline-flex",opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:(0,it.jsx)(Lf.default,{sx:{fontSize:16}})})}):null,t?null:(0,it.jsx)(Rt.IconButton,{className:"taskbox-checklist-remove",size:"small","aria-label":"\uD560\uC77C \uC0AD\uC81C",onClick:()=>o(e,B),sx:{display:z?"none":"inline-flex",opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:(0,it.jsx)(Nf.default,{sx:{fontSize:15}})})]});return _?(0,it.jsx)(c_,{id:F[B],children:({handleProps:W})=>G(W)},F[B]):(0,it.jsx)(Rt.Box,{children:G(null)},F[B])})}),(0,it.jsxs)(Rt.Box,{sx:{mt:.5,ml:3.25,display:"flex",alignItems:"center",gap:.5},children:[(0,it.jsx)(Rt.Box,{component:"input",spellCheck:!1,value:b,placeholder:"+ \uD560\uC77C \uCD94\uAC00",enterKeyHint:"done",onChange:q=>m(q.target.value),onKeyDown:q=>{q.key==="Enter"&&A()},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:14,color:"#37352f",bgcolor:"transparent",px:1.25,py:.75,"&::placeholder":{color:"#9a9a97"}}}),i&&a&&h?(0,it.jsx)(Rt.Tooltip,{title:"\uAE30\uC874 \uC5C5\uBB34 \uBD99\uC774\uAE30",arrow:!0,children:(0,it.jsx)(Rt.IconButton,{size:"small","aria-label":"\uAE30\uC874 \uC5C5\uBB34 \uBD99\uC774\uAE30",onMouseDown:q=>q.preventDefault(),onClick:()=>k(!0),sx:{flexShrink:0,color:"#9a9a97"},children:(0,it.jsx)(p1.default,{sx:{fontSize:20}})})}):null,(0,it.jsx)(Rt.IconButton,{size:"small","aria-label":"\uD560\uC77C \uCD94\uAC00",disabled:!b.trim(),onMouseDown:q=>q.preventDefault(),onClick:A,sx:{flexShrink:0,color:b.trim()?"#2f80ed":"#c9c8c5"},children:(0,it.jsx)(c1.default,{sx:{fontSize:20}})})]}),i&&a&&h?(0,it.jsx)(el,{open:x,task:a,tasks:i,excludeSeqs:f.map(q=>Number(q.task_seq??0)).filter(q=>q>0),hideRelationType:!0,multiSelect:!0,title:"\uAE30\uC874 \uC5C5\uBB34 \uBD99\uC774\uAE30",confirmLabel:"\uBD99\uC774\uAE30",onClose:()=>k(!1),onSubmit:q=>{let B=i.find(E=>E.seq===q);h(e,q,String(B?.title??"").trim())}}):null,(0,it.jsx)(Qt,{open:!!N,anchorEl:N?.anchorEl??null,title:"\uC774 \uD560\uC77C\uC744 \uBCC4\uB3C4 \uC5C5\uBB34\uB85C \uB9CC\uB4DC\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uB9CC\uB4E4\uAE30",onCancel:()=>$(null),onConfirm:()=>{N&&n?.(e,N.index,N.label),$(null)}}),(0,it.jsx)(Rt.Dialog,{open:!!O,onClose:()=>P(null),maxWidth:"xs",fullWidth:!0,slotProps:{paper:{sx:{borderRadius:2,m:2}}},children:(0,it.jsxs)(Rt.Box,{sx:{p:2,display:"flex",flexDirection:"column",gap:1.5},children:[(0,it.jsx)(Rt.Box,{sx:{fontSize:15.5,fontWeight:600,color:"#37352f"},children:"\uD560\uC77C \uC218\uC815"}),(0,it.jsx)(Rt.TextField,{autoFocus:!0,fullWidth:!0,size:"medium",value:O?.label??"",onChange:q=>P(B=>B&&{...B,label:q.target.value}),onKeyDown:q=>{if(q.key!=="Enter")return;let B=O;B&&B.label.trim()&&s?.(e,B.index,B.label.trim()),P(null)}}),(0,it.jsxs)(Rt.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[!t&&n&&O&&!f[O.index]?.task_seq?(0,it.jsx)(Rt.IconButton,{"aria-label":"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",onClick:()=>{n(e,O.index,f[O.index]?.label??""),P(null)},sx:{color:"#57564f"},children:(0,it.jsx)(Lf.default,{sx:{fontSize:20}})}):null,!t&&O?(0,it.jsx)(Rt.IconButton,{"aria-label":"\uD560\uC77C \uC0AD\uC81C",onClick:()=>{o(e,O.index),P(null)},sx:{color:"#e5484d"},children:(0,it.jsx)(Nf.default,{sx:{fontSize:19}})}):null,(0,it.jsx)(Rt.Box,{sx:{flex:1}}),(0,it.jsx)(Rt.Button,{color:"inherit",onClick:()=>P(null),children:"\uCDE8\uC18C"}),(0,it.jsx)(Rt.Button,{variant:"contained",disabled:!O?.label.trim(),onClick:()=>{O&&O.label.trim()&&s?.(e,O.index,O.label.trim()),P(null)},children:"\uD655\uC778"})]})]})})]})}var Dc=require("react"),lo=require("@mui/material"),b1=Y(require("@mui/icons-material/Close"),1),Ff=Y(require("@mui/icons-material/AttachFileOutlined"),1);var f_=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"]),Mc=e=>{let f=e?.split(".").pop()?.toLowerCase()??"";return f_.has(f)};var g1=require("@mui/material");var Qs=require("react/jsx-runtime");function zf(e){let f=qo(),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 Rc(){let f=qo().useValue("attachmentUpload.progress");return(0,Qs.jsxs)(Qs.Fragment,{children:[f??0,"%"]})}function jf(){let f=qo().useValue("attachmentUpload.progress");return(0,Qs.jsx)(g1.LinearProgress,{variant:"determinate",value:f??0,sx:{height:4,borderRadius:2,bgcolor:"#dbe9fb",mt:.75}})}var jr=require("react/jsx-runtime");function Oc(e){return e>=1048576?`${(e/1048576).toFixed(1)}MB`:`${Math.max(1,Math.round(e/1024))}KB`}var Ac={flex:1,minWidth:0,fontSize:13.5,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"};function rl({taskSeq:e,attachments:f,onAdd:g,onRemove:l,removeLocked:o=!1,onPreview:s,onDownload:r}){let[t,n]=(0,Dc.useState)(!1),c=(0,Dc.useRef)(null),i=dr(),a=Cs(),h=Ts(),d=zf(e),u=e===0,b=M=>{if(s){s(M);return}window.open(h(M.uuid??""),"_blank","noopener,noreferrer")},m=M=>{if(r){r(M);return}window.open(h(M.uuid??"",{download:!0}),"_blank","noopener,noreferrer")},x=M=>d?M+1<d.index?"done":M+1===d.index?"uploading":"waiting":"waiting",k=(M,z,O,P={})=>(0,jr.jsxs)(lo.Box,{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:[(0,jr.jsxs)(lo.Box,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[(0,jr.jsx)(Ff.default,{sx:{fontSize:16,color:"#9a9a97"}}),z,(0,jr.jsx)(lo.Box,{component:"span",sx:{fontSize:12,color:P.uploading?"#2f80ed":"#9a9a97",flexShrink:0},children:O}),P.removeIndex!==void 0?(0,jr.jsx)(lo.IconButton,{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:(0,jr.jsx)(b1.default,{sx:{fontSize:15}})}):null]}),P.uploading?(0,jr.jsx)(jf,{}):null]},M),I=M=>{let z=Mc(M.name);return(0,jr.jsx)(lo.Box,{component:"button",type:"button",onClick:()=>z?b(M):m(M),title:`${M.name} ${z?"\uBBF8\uB9AC\uBCF4\uAE30":"\uB2E4\uC6B4\uB85C\uB4DC"}`,sx:{...Ac,color:"#37352f",textAlign:"left",p:0,border:"none",background:"none",font:"inherit",fontSize:13.5,cursor:"pointer","&:hover":{textDecoration:"underline",color:"#2f80ed"}},children:M.name})};return(0,jr.jsxs)(ao,{icon:(0,jr.jsx)(Ff.default,{sx:{fontSize:18,display:"block"}}),title:(0,jr.jsxs)(jr.Fragment,{children:["\uD30C\uC77C ",f.length>0?f.length:""]}),children:[(0,jr.jsxs)(lo.Box,{sx:{display:"flex",flexDirection:"column",gap:.5,mt:1},children:[f.map((M,z)=>{let O=`${M.uuid||M.name}-${z}`;if(u){let P=x(z),N=P==="uploading";return k(O,(0,jr.jsx)(lo.Box,{component:"span",sx:{...Ac,color:P==="done"?"#37352f":"#9a9a97"},children:M.name}),N?(0,jr.jsx)(Rc,{}):Oc(M.size),{uploading:N,removeIndex:!o&&!d?z:void 0})}return M.uuid?k(O,I(M),Oc(M.size),{removeIndex:o?void 0:z}):k(O,(0,jr.jsx)(lo.Box,{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:{...Ac,color:"#9a9a97"},children:M.name}),Oc(M.size),{removeIndex:o?void 0:z})}),!u&&d?d.queue.slice(d.index-1).map((M,z)=>{let O=z===0;return k(`uploading-${d.index+z}-${M.name}`,(0,jr.jsx)(lo.Box,{component:"span",sx:{...Ac,color:"#9a9a97"},children:M.name}),O?(0,jr.jsx)(Rc,{}):Oc(M.size),{uploading:O})}):null]}),(0,jr.jsx)(lo.Box,{onClick:()=>c.current?.click(),onDragOver:M=>{M.preventDefault(),n(!0)},onDragLeave:()=>n(!1),onDrop:M=>{M.preventDefault(),n(!1);let z=Array.from(M.dataTransfer.files);z.length>0&&g(e,z)},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)`}),(0,jr.jsx)(lo.Box,{component:"input",ref:c,type:"file",multiple:!0,onChange:M=>{let z=Array.from(M.target.files??[]);z.length>0&&g(e,z),M.target.value=""},sx:{display:"none"}})]})}var k1=require("react"),Oo=require("@mui/material"),S1=Y(require("@mui/icons-material/Add"),1);var nl=require("react"),ea=require("@mui/material"),x1=require("@ehfuse/mui-form-dialog"),v1=require("@ehfuse/mui-form-controls"),w1=require("@ehfuse/mui-color-picker"),_1=require("@ehfuse/alerts");var Yo=require("react/jsx-runtime"),y1="#2f80ed";function qf({open:e,onClose:f,onSubmit:g}){let[l,o]=(0,nl.useState)(""),[s,r]=(0,nl.useState)(y1);(0,nl.useEffect)(()=>{e&&(o(""),r(y1))},[e]);let t=()=>{let i=l.trim();if(!i){(0,_1.ErrorAlert)("\uB77C\uBCA8 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}g(i,s),f()},n=Eu(s),c=(0,Yo.jsxs)(ea.Box,{children:[(0,Yo.jsxs)(ea.Box,{sx:{display:"flex",alignItems:"center",gap:1.5,mt:.5},children:[(0,Yo.jsx)(v1.ClearTextField,{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}),(0,Yo.jsx)(w1.ColorPicker,{value:s,onChange:i=>r(i),shape:"circle",colorSize:28})]}),(0,Yo.jsxs)(ea.Box,{sx:{mt:2,display:"flex",alignItems:"center",gap:1,fontSize:13,color:"#787774"},children:["\uBBF8\uB9AC\uBCF4\uAE30",(0,Yo.jsx)(ir,{option:{key:"__preview__",name:l.trim()||"\uB77C\uBCA8",...n}})]})]});return(0,Yo.jsx)(x1.FormDialog,{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:(0,Yo.jsx)(ea.Button,{variant:"contained",onClick:t,children:"\uCD94\uAC00"})}})}var eo=require("react/jsx-runtime");function ol({anchorEl:e,selectedKeys:f,labelOptions:g,onToggle:l,onAddLabel:o,onClose:s}){let[r,t]=(0,k1.useState)(!1),n=$o();return(0,eo.jsxs)(eo.Fragment,{children:[(0,eo.jsxs)(Oo.Menu,{anchorEl:e,open:!!e,onClose:s,transitionDuration:0,...n,children:[g.map(c=>{let i=f.includes(c.key);return(0,eo.jsxs)(Oo.MenuItem,{onClick:()=>l(c.key),sx:{fontSize:14,minWidth:170,gap:1},children:[(0,eo.jsx)(Oo.Checkbox,{size:"small",checked:i,sx:{p:0}}),(0,eo.jsx)(ir,{option:c})]},c.key)}),(0,eo.jsx)(Oo.Divider,{}),(0,eo.jsxs)(Oo.MenuItem,{onClick:()=>t(!0),sx:{fontSize:14,color:"#787774"},children:[(0,eo.jsx)(Oo.ListItemIcon,{children:(0,eo.jsx)(S1.default,{sx:{fontSize:18,color:"#787774"}})}),"\uB77C\uBCA8 \uCD94\uAC00"]})]}),(0,eo.jsx)(qf,{open:r,onClose:()=>t(!1),onSubmit:o})]})}function T1(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 C1(e,f){let g=(e.target_account_seqs??[]).filter(a=>a>0);if(g.length===0)return null;let l=new Set(g),o=T1(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 il(e,f){let g=C1(e,f);return g?[...g.teamNames,...g.individualNames].join(", "):"\uBAA8\uB4E0 \uC9C1\uC6D0"}function d_(e,f){let g=C1(e,f);return g?{kind:"members",teamNames:g.teamNames,individualNames:g.individualNames}:{kind:"everyone"}}function $f(e,f,g){let l=(e.target_account_seqs??[]).filter(d=>d>0),o=T1(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 Hf(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}}var P1=require("@ehfuse/mui-datetime-picker"),tt=require("react/jsx-runtime"),Gf="#0f9d58";function Pc({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:I,onRemoveContentTemplate:M}){let z=qo(),O=Cs(),P=e.useFormValue("manager_name"),N=e.useFormValue("receiver_names"),$=e.useFormValue("start_date"),L=!!e.useFormValue("is_event"),C=!!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")??"",T=e.useFormValue("due_date"),R=e.useFormValue("reminders")??[],F=e.useFormValue("priority"),H=e.useFormValue("content"),A=e.useFormValue("checklist")??[],q=e.useFormValue("tab_key"),B=e.useFormValue("sprint_seq")??0,E=e.useFormValue("story_points")??0,j=g.find(se=>se.key===q&&se.useSprints),U=j?l.filter(se=>`custom-${se.group_seq}`===q):[],[X,G]=(0,ta.useState)(null),W=e.useFormValue("label_keys"),[Z,J]=(0,ta.useState)(null),K=e.useFormValue("visibility")||"involved",ee=Number(e.useFormValue("visibility_group_seq")??0),[te,oe]=(0,ta.useState)(null),ne=e.useFormValue("repeat_rule")||"",ie=e.useFormValue("repeat_until")||"",[ae,pe]=(0,ta.useState)(null),[ye,Se]=(0,ta.useState)(null),Be=e.useFormValue("target_names"),Ce=e.useFormValue("target_account_seqs"),ft=z.useValue("createAttachmentFiles")??[],xe=s?il({author_account_seq:a,target_names:Be,target_account_seqs:Ce},i):"";return(0,tt.jsxs)(tt.Fragment,{children:[n,s?null:(0,tt.jsx)(_r.Box,{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(se=>{let Ie=C?"bug":L?"event":"task",ke=Ie===se.value;return(0,tt.jsx)(_r.ButtonBase,{onClick:()=>{if(Ie===se.value)return;e.setFormValue("is_event",se.value==="event"),e.setFormValue("is_bug",se.value==="bug"),e.setFormValue("visibility",se.value==="bug"?"all":"involved"),e.setFormValue("visibility_group_seq",0),se.value==="bug"&&(e.setFormValue("repeat_rule",""),e.setFormValue("repeat_until",""));let _e=e.getFormValue("icon"),rt=e.getFormValue("icon_color"),Fe=[Fo,"event",Bs].includes(_e),me=!rt||rt===Gf||rt===Is;Fe&&e.setFormValue("icon",se.value==="event"?"event":se.value==="bug"?Bs:Fo),me&&e.setFormValue("icon_color",se.value==="event"?Gf:se.value==="bug"?Is:"")},sx:{px:1.75,py:.75,borderRadius:99,fontSize:13.5,fontWeight:ke?600:400,color:ke?"#ffffff":"#787774",bgcolor:ke?"#2563eb":"#f4f4f2"},children:se.label},se.label)})}),(0,tt.jsx)(_r.Divider,{sx:{borderColor:"#e6e6e3"}}),(0,tt.jsxs)(_r.Box,{sx:{py:1.5,display:"flex",flexDirection:"column",gap:.25},children:[(0,tt.jsx)(Ya,{hideProject:r,hideDueDate:!L&&!!ne,values:{tabKey:q,managerName:P,receiverNames:N,startDate:$,dueDate:T,reminders:R,priority:F,eventTime:v,eventPlace:w,eventAddress:_},customTabs:g,avatarSrcByName:o,notice:s,event:L,onChangeEventTime:se=>e.setFormValue("event_time",se),onChangeEventPlace:se=>e.setFormValue("event_place",se),onChangeEventAddress:se=>e.setFormValue("event_address",se),targetSummary:xe,onChangeProject:se=>e.setFormValue("tab_key",se),onAddProject:b,onChangeStartDate:se=>e.setFormValue("start_date",se),onChangeDueDate:se=>e.setFormValue("due_date",se),onChangeReminder:se=>e.setFormValue("reminders",se),onChangePriority:se=>e.setFormValue("priority",se),onMemberEdit:u,pinColumns:!0,beforeStart:(0,tt.jsxs)(tt.Fragment,{children:[!s&&!C?(0,tt.jsx)(It,{icon:(0,tt.jsx)(R1.default,{sx:{fontSize:17,...ne?{color:"#2f80ed"}:{}}}),label:"\uBC18\uBCF5",onClick:se=>pe(se),sx:L?void 0:zr(2),children:ne?Ua(ne):(0,tt.jsx)(_r.Box,{component:"span",sx:{color:"#9a9a97"},children:"\uC5C6\uC74C"})}):null,!s&&!C&&ne?(0,tt.jsx)(It,{icon:(0,tt.jsx)(O1.default,{sx:{fontSize:17}}),label:"\uBC18\uBCF5 \uC885\uB8CC",onClick:se=>Se(se),sx:L?void 0:zr(2),children:ie?oo(ie):(0,tt.jsx)(_r.Box,{component:"span",sx:{color:"#9a9a97"},children:"\uC790\uB3D9"})}):null]}),trailing:(0,tt.jsxs)(tt.Fragment,{children:[s?null:(0,tt.jsx)(It,{icon:K==="all"?(0,tt.jsx)(Uf.default,{sx:{fontSize:17,color:"#2f80ed"}}):K==="group"?(0,tt.jsx)(Vf.default,{sx:{fontSize:17,color:"#d9730d"}}):(0,tt.jsx)(Wf.default,{sx:{fontSize:17}}),label:"\uACF5\uAC1C",onClick:se=>oe(se),sx:L?void 0:zr(1),children:K==="all"?"\uC804\uCCB4\uACF5\uAC1C":K==="group"?`\uBD80\uC11C\uACF5\uAC1C \xB7 ${h.find(se=>se.seq===ee)?.name??"\uBD80\uC11C"}`:"\uBE44\uACF5\uAC1C"}),j&&!L&&!s?(0,tt.jsxs)(tt.Fragment,{children:[(0,tt.jsx)(It,{icon:(0,tt.jsx)(M1.default,{sx:{fontSize:17}}),label:"\uBAA9\uD45C",onClick:se=>G(se),sx:zr(1),children:B>0?U.find(se=>se.seq===B)?.name??"\uC0AD\uC81C\uB41C \uBAA9\uD45C":(0,tt.jsx)(_r.Box,{component:"span",sx:{color:"#9a9a97"},children:"\uBBF8\uBC30\uC815"})}),(0,tt.jsx)(It,{icon:(0,tt.jsx)(A1.default,{sx:{fontSize:17}}),label:"\uD3EC\uC778\uD2B8",sx:zr(1),children:(0,tt.jsx)(Ko,{value:E>0?String(E):"",placeholder:"\uBBF8\uCD94\uC815",onCommit:se=>e.setFormValue("story_points",Number(se.replace(/[^0-9.]/g,""))||0)})})]}):null,C?(0,tt.jsx)(Xa,{values:{repro:S,device:D,where:p,version:y},onChangeRepro:se=>e.setFormValue("bug_repro",se),onChangeDevice:se=>e.setFormValue("bug_device",se),onChangeWhere:se=>e.setFormValue("bug_where",se),onChangeVersion:se=>e.setFormValue("bug_version",se)}):null]}),leading:L||c?null:(0,tt.jsx)(_r.Box,{sx:{gridColumn:"1 / -1"},children:(0,tt.jsx)(It,{icon:(0,tt.jsx)(E1.default,{sx:{fontSize:17}}),label:"\uB77C\uBCA8",onClick:se=>J(se),children:(W??[]).length>0?(0,tt.jsx)(ci,{labelKeys:W??[],labelOptions:f}):(0,tt.jsx)(_r.Box,{component:"span",sx:{color:"#9a9a97"},children:"\uBE44\uC5B4 \uC788\uC74C"})})})}),(0,tt.jsx)(_r.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,tt.jsx)(ao,{icon:(0,tt.jsx)(B1.default,{sx:{fontSize:18,display:"block"}}),title:"\uB0B4\uC6A9",titleExtra:k?(0,tt.jsx)(Za,{content:H,templates:k,onApply:se=>e.setFormValue("content",se),onSave:I,onRemove:M}):void 0,children:(0,tt.jsx)(Qa,{syncKey:x,value:H,onChange:se=>e.setFormValue("content",se)})}),L?null:(0,tt.jsx)(_r.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),L?null:(0,tt.jsx)(tl,{taskSeq:0,checklist:A,onAdd:(se,Ie)=>e.setFormValue("checklist",[...A,{label:Ie,checked:!1}]),onToggle:(se,Ie,ke)=>e.setFormValue("checklist",A.map((_e,rt)=>rt===Ie?{..._e,checked:ke}:_e)),onRemove:(se,Ie)=>e.setFormValue("checklist",A.filter((ke,_e)=>_e!==Ie)),onUpdate:(se,Ie,ke)=>e.setFormValue("checklist",A.map((_e,rt)=>rt===Ie?{..._e,label:ke}:_e))}),(0,tt.jsx)(_r.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,tt.jsx)(rl,{taskSeq:0,attachments:ft.map(se=>({name:se.name,size:se.size})),onAdd:(se,Ie)=>{let ke=Hf(Ie,O);ke.message&&(0,Kf.InfoAlert)(ke.message),ke.accepted.length!==0&&z.setValue("createAttachmentFiles",[...z.getValue("createAttachmentFiles")??[],...ke.accepted])},onRemove:(se,Ie)=>z.setValue("createAttachmentFiles",ft.filter((ke,_e)=>_e!==Ie))}),C?null:(0,tt.jsxs)(tt.Fragment,{children:[(0,tt.jsx)(_r.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,tt.jsx)(ao,{icon:(0,tt.jsx)(I1.default,{sx:{fontSize:18,display:"block"}}),title:"\uBE44\uACE0",children:(0,tt.jsx)(D1.TextField,{form:e,name:"note",placeholder:"\uBE44\uACE0 \uC785\uB825",fullWidth:!0,size:"medium",sx:{mt:1}})})]})]}),(0,tt.jsx)(_r.Menu,{transitionDuration:0,anchorEl:X,open:!!X,onClose:()=>G(null),children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...U.map(se=>({seq:se.seq,label:so(se)}))].map(se=>(0,tt.jsx)(_r.MenuItem,{onClick:()=>{e.setFormValue("sprint_seq",se.seq),G(null)},sx:{fontSize:14,minWidth:170},children:se.label},se.seq))}),(0,tt.jsx)(_r.Menu,{transitionDuration:0,anchorEl:ae,open:!!ae,onClose:()=>pe(null),children:[{value:"",label:"\uC5C6\uC74C"},...Xs].map(se=>(0,tt.jsx)(_r.MenuItem,{selected:ne===se.value,onClick:()=>{if(pe(null),se.value===""){e.setFormValue("repeat_rule",""),e.setFormValue("repeat_until","");return}let Ie;if(L){if(Ie=String(e.getFormValue("due_date")??"").slice(0,10),!Ie){(0,Kf.InfoAlert)("\uBC18\uBCF5\uD558\uB824\uBA74 \uC77C\uC815 \uB0A0\uC9DC\uB97C \uBA3C\uC800 \uC120\uD0DD\uD558\uC138\uC694.");return}}else{if(Ie=String(e.getFormValue("start_date")??"").slice(0,10),!Ie){let ke=new Date,_e=rt=>String(rt).padStart(2,"0");Ie=`${ke.getFullYear()}-${_e(ke.getMonth()+1)}-${_e(ke.getDate())}`}e.setFormValue("due_date","")}e.setFormValue("repeat_rule",se.value),e.setFormValue("repeat_until",Va(Ie,se.value))},sx:{fontSize:14,minWidth:140},children:se.label},se.value||"none"))}),(0,tt.jsx)(P1.DatePicker,{anchorEl:ye,open:!!ye,onClose:()=>Se(null),selectedDate:ie?new Date(`${ie}T00:00:00`):new Date,onDateChange:se=>{let Ie=ke=>String(ke).padStart(2,"0");e.setFormValue("repeat_until",`${se.getFullYear()}-${Ie(se.getMonth()+1)}-${Ie(se.getDate())}`),Se(null)}}),(0,tt.jsx)(_r.Menu,{transitionDuration:0,anchorEl:te,open:!!te,onClose:()=>oe(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:(0,tt.jsx)(Wf.default,{sx:{fontSize:17,color:"#57564f"}}),selected:K==="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:(0,tt.jsx)(Uf.default,{sx:{fontSize:17,color:"#2f80ed"}}),selected:K==="all",onPick:()=>{e.setFormValue("visibility","all"),e.setFormValue("visibility_group_seq",0)}},...[...h].sort((se,Ie)=>se.seq===d?-1:Ie.seq===d?1:0).map(se=>({key:`group-${se.seq}`,label:`\uBD80\uC11C\uACF5\uAC1C \xB7 ${se.name}`,tip:`${se.name} \uC18C\uC18D \uC9C1\uC6D0\uC774 \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4`,icon:(0,tt.jsx)(Vf.default,{sx:{fontSize:17,color:"#d9730d"}}),selected:K==="group"&&ee===se.seq,onPick:()=>{e.setFormValue("visibility","group"),e.setFormValue("visibility_group_seq",se.seq)}}))].map(se=>(0,tt.jsx)(_r.Tooltip,{title:se.tip,arrow:!0,disableInteractive:!0,placement:"right",children:(0,tt.jsxs)(_r.MenuItem,{selected:se.selected,onClick:()=>{se.onPick(),oe(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[se.icon,se.label]})},se.key))}),(0,tt.jsx)(ol,{anchorEl:Z,selectedKeys:W??[],labelOptions:f,onToggle:se=>e.setFormValue("label_keys",wa(W??[],se)),onAddLabel:(se,Ie)=>m?.(se,Ie),onClose:()=>J(null)})]})}var Zt=require("react/jsx-runtime");function h_({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=qo(),u=(0,hs.useRef)(!1),[b,m]=(0,hs.useState)(0),x=l.useFormValue("title"),k=l.useFormValue("icon"),I=l.useFormValue("icon_color"),M=!!l.useFormValue("is_event"),z=!!l.useFormValue("is_bug"),O=dr(),N=d.useValue("createSubmitting")??!1,$=a||M?$t(k||(a?$r:Yr)):null,L=a?"\uACF5\uC9C0 \uB4F1\uB85D":M?"\uC77C\uC815 \uB4F1\uB85D":z?"\uC624\uB958 \uB4F1\uB85D":"\uC5C5\uBB34 \uB4F1\uB85D",C=a?"\uACF5\uC9C0 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694":M?"\uC77C\uC815 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694":z?"\uC5B4\uB5A4 \uC624\uB958\uC778\uC9C0 \uD55C \uC904\uB85C \uC801\uC5B4\uC8FC\uC138\uC694":"\uC5C5\uBB34 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694";(0,hs.useEffect)(()=>{let v=u.current;u.current=e,!(!e||v)&&(l.setFormValues({...l.getFormValues(),title:o,icon:a?$r:h?Bs:Fo,icon_color:a?"#e5484d":h?Is:"",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]=(0,hs.useState)(null),p=v=>$?M?(0,Zt.jsx)(Br.Tooltip,{title:"\uC544\uC774\uCF58 \uBCC0\uACBD",arrow:!0,enterDelay:400,disableInteractive:!0,children:(0,Zt.jsx)(Br.ButtonBase,{onClick:w=>D(w.currentTarget),sx:{display:"flex",p:.5,borderRadius:1,color:I||"#1e3a8a","&:hover":{bgcolor:"#f2f2f0"}},children:(0,Zt.jsx)($,{sx:{fontSize:20}})})}):(0,Zt.jsx)(Br.Box,{sx:[{display:"flex",color:I||"#1e3a8a"},v],children:(0,Zt.jsx)($,{sx:{fontSize:20}})}):null,y=(0,Zt.jsxs)(Br.Box,{sx:{display:"flex",alignItems:"center",gap:1,px:2,pt:2,pb:1},children:[p({p:0}),(0,Zt.jsx)(Br.Box,{component:"input",autoFocus:!0,spellCheck:!1,value:x,placeholder:C,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 O?(0,Zt.jsx)(Zt.Fragment,{children:(0,Zt.jsx)(z1.FormDialog,{open:e,onClose:f,locale:"ko",fontScale:{enabled:!0,default:1.1,min:.6},title:L,titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},fullScreen:!0,mobilePresentation:"slide",actions:{showCancelButton:!0,right:(0,Zt.jsx)(Br.Button,{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:(0,Zt.jsx)(Br.Box,{sx:{width:"100%",minWidth:0,display:"flex",flexDirection:"column",gap:0},children:(0,Zt.jsx)(Pc,{...g,contentSyncKey:`create-${b}`,leadingRow:y})})}]})}):(0,Zt.jsxs)(Zt.Fragment,{children:[(0,Zt.jsx)(Br.Drawer,{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:(0,Zt.jsxs)(Br.Box,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[(0,Zt.jsxs)(Br.Box,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1.5,flexShrink:0},children:[p({px:.5}),(0,Zt.jsx)(Br.Box,{component:"input",autoFocus:!0,spellCheck:!1,value:x,placeholder:C,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}}}),(0,Zt.jsx)(Br.IconButton,{"aria-label":"\uB2EB\uAE30",onClick:f,sx:{color:"#6b7280"},children:(0,Zt.jsx)(N1.default,{})})]}),(0,Zt.jsx)(Br.Divider,{sx:{borderColor:"#e6e6e3"}}),(0,Zt.jsx)(Br.Box,{sx:{flex:1,minHeight:0},children:(0,Zt.jsx)(L1.default,{style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:(0,Zt.jsx)(Pc,{...g,contentSyncKey:`create-${b}`})})}),(0,Zt.jsx)(Br.Divider,{sx:{borderColor:"#e6e6e3"}}),(0,Zt.jsxs)(Br.Box,{sx:{display:"flex",justifyContent:"flex-end",gap:1,px:2,py:1.5,flexShrink:0},children:[(0,Zt.jsx)(Br.Button,{onClick:f,color:"inherit",disabled:N,children:"\uCDE8\uC18C"}),(0,Zt.jsx)(Br.Button,{onClick:l.submit,variant:"contained",disabled:N,children:N?"\uB4F1\uB85D \uC911\u2026":"\uB4F1\uB85D"})]})]})}),(0,Zt.jsx)(hi,{anchorEl:S,value:k,color:I,onSelect:v=>{l.setFormValue("icon",v),D(null)},onSelectColor:v=>l.setFormValue("icon_color",v),onClose:()=>D(null)})]})}var Do=require("react"),pr=require("@mui/material"),Ny=Y(require("@mui/icons-material/MoreVert"),1),Ly=Y(require("@mui/icons-material/DeleteOutline"),1),zy=Y(require("@mui/icons-material/ShareOutlined"),1),jy=Y(require("@mui/icons-material/HistoryOutlined"),1),Fy=Y(require("@ehfuse/overlay-scrollbar"),1),qy=require("@ehfuse/mui-form-dialog"),hd=require("@ehfuse/alerts");var Ao=require("react"),Ze=require("@mui/material"),Zf=Y(require("@mui/icons-material/Send"),1),q1=require("@ehfuse/mui-form-controls"),al=Y(require("@mui/icons-material/Close"),1),$1=Y(require("@mui/icons-material/EditOutlined"),1),H1=Y(require("@mui/icons-material/Favorite"),1),W1=Y(require("@mui/icons-material/FavoriteBorderOutlined"),1),U1=Y(require("@mui/icons-material/CheckCircle"),1),V1=Y(require("@mui/icons-material/CheckCircleOutlineOutlined"),1),ps=Y(require("@mui/icons-material/AttachFileOutlined"),1),K1=Y(require("@mui/icons-material/AddCircleOutline"),1),G1=Y(require("@mui/icons-material/ImageOutlined"),1);var Yf=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]};var j1=require("@mui/material");var sl=require("react/jsx-runtime"),p_=/https?:\/\/[^\s<>"']+/g;function m_(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 Xf({text:e}){let{openExternalUrl:f}=ct(),g=s=>{f?f(s):window.open(s,"_blank","noopener,noreferrer")},l=[],o=0;for(let s of e.matchAll(p_)){let r=s.index??0,[t,n]=m_(s[0]);r>o&&l.push(e.slice(o,r)),l.push((0,sl.jsx)(j1.Box,{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)),(0,sl.jsx)(sl.Fragment,{children:l})}var Re=require("react/jsx-runtime"),g_=5;function F1({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:(0,Re.jsx)(Ze.Box,{sx:{whiteSpace:"pre-line",fontSize:12},children:o.map(c=>`${c.name} \xB7 ${c.time}`).join(`
39
+ `)}),n=e==="like"?"#e5484d":"#2f80ed";return(0,Re.jsx)(Ze.Tooltip,{title:t,arrow:!0,enterDelay:300,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:(0,Re.jsxs)(Ze.Box,{sx:{display:"inline-flex",alignItems:"center"},children:[(0,Re.jsx)(Ze.IconButton,{size:"small","aria-label":`\uB313\uAE00 ${r}`,onClick:l,sx:{color:s?n:"#c9c8c5",p:.5},children:e==="like"?s?(0,Re.jsx)(H1.default,{sx:{fontSize:16}}):(0,Re.jsx)(W1.default,{sx:{fontSize:16}}):s?(0,Re.jsx)(U1.default,{sx:{fontSize:16}}):(0,Re.jsx)(V1.default,{sx:{fontSize:16}})}),o.length>0?(0,Re.jsx)(Ze.Box,{component:"span",sx:{fontSize:12,color:s?n:"#9a9a97",ml:-.25},children:o.length}):null]})})}function Jf({taskSeq:e,comments:f,currentUserName:g="",myAccountSeq:l=0,avatarSrcByName:o,onUpdate:s,onRemove:r,onToggleReaction:t,onPreview:n,onDownload:c}){let[i,a]=(0,Ao.useState)(null),h=(0,Ao.useRef)(null),[d,u]=(0,Ao.useState)(null),[b,m]=(0,Ao.useState)(!1),x=Math.max(0,f.length-g_),k=x>0&&!b,I=i?Math.min(i.index,x):x,M=f.map(($,L)=>({comment:$,index:L})).slice(k?I:0),z=Ts(),O=$=>{if(n){n($);return}window.open(z($.uuid??""),"_blank","noopener,noreferrer")},P=$=>{if(c){c($);return}window.open(z($.uuid??"",{download:!0}),"_blank","noopener,noreferrer")},N=ct().slots?.avatar;return(0,Re.jsxs)(Ze.Box,{sx:{px:2,pb:2,display:"flex",flexDirection:"column",gap:.25},children:[(0,Re.jsxs)(Ze.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,Re.jsx)(di,{sx:{fontSize:18,display:"block",color:"#37352f"}}),(0,Re.jsxs)(Ze.Box,{sx:{fontSize:Bc,fontWeight:500,color:"#37352f"},children:["\uB313\uAE00",f.length>0?` (${f.length})`:""]}),x>0&&(!k||I>0)?(0,Re.jsx)(Ze.Box,{role:"button",tabIndex:0,onClick:()=>m($=>!$),onKeyDown:$=>{($.key==="Enter"||$.key===" ")&&($.preventDefault(),m(L=>!L))},sx:{ml:"auto",flexShrink:0,cursor:"pointer",fontSize:14.5,color:"#5b87d6","&:hover":{textDecoration:"underline"}},children:k?`\uC774\uC804 \uB313\uAE00 ${I}\uAC1C \uB354 \uBCF4\uAE30`:"\uC774\uC804 \uB313\uAE00 \uC811\uAE30"}):null]}),f.length===0?(0,Re.jsx)(Ze.Box,{sx:{mt:1,fontSize:14.5,color:"#9a9a97"},children:"\uB4F1\uB85D\uB41C \uB313\uAE00\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):null,(0,Re.jsx)(Ze.Box,{sx:{display:"flex",flexDirection:"column",gap:1,mt:1},children:M.map(({comment:$,index:L})=>{let C=!!g&&$.author===g;return(0,Re.jsxs)(Ze.Box,{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($.author)??"";return N?(0,Re.jsx)(Ze.Box,{sx:{display:"inline-flex",flexShrink:0},children:(0,Re.jsx)(N,{name:$.author,src:S||void 0,size:44})}):(0,Re.jsx)(Ze.Box,{sx:{display:"inline-flex",flexShrink:0},children:(0,Re.jsx)(po,{src:S,name:$.author,avatarSx:{width:44,height:44,fontSize:20,borderRadius:"50%",...ns[0]},iconFontSize:24})})})(),(0,Re.jsxs)(Ze.Box,{sx:{flex:1,minWidth:0},children:[(0,Re.jsxs)(Ze.Box,{sx:{display:"flex",alignItems:"center",gap:.75,minWidth:0,position:"relative"},children:[(0,Re.jsx)(Ze.Box,{component:"span",sx:{fontSize:14.5,fontWeight:700,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:$.author}),$.external?(0,Re.jsx)(Ze.Box,{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,(0,Re.jsx)(Ze.Box,{component:"span",sx:{fontSize:12.5,color:"#9a9a97",flexShrink:0,whiteSpace:"nowrap"},children:$.time}),C?(0,Re.jsx)(Ze.Box,{sx:{ml:"auto"}}):(0,Re.jsxs)(Ze.Box,{sx:{display:"flex",alignItems:"center",gap:.25,ml:"auto",flexShrink:0},children:[(0,Re.jsx)(F1,{kind:"like",reactions:$.likes,myAccountSeq:l,onToggle:()=>t?.(e,L,"like")}),(0,Re.jsx)(F1,{kind:"ack",reactions:$.acks,myAccountSeq:l,onToggle:()=>t?.(e,L,"ack")})]}),C?(0,Re.jsxs)(Ze.Box,{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:[(0,Re.jsx)(Ze.IconButton,{size:"small","aria-label":"\uB313\uAE00 \uC218\uC815",onClick:()=>a({index:L,text:$.text,attachments:[...$.attachments??[]],files:[]}),sx:{color:"#9a9a97"},children:(0,Re.jsx)($1.default,{sx:{fontSize:15}})}),(0,Re.jsx)(Ze.IconButton,{size:"small","aria-label":"\uB313\uAE00 \uC0AD\uC81C",onClick:S=>u({anchorEl:S.currentTarget,index:L}),sx:{color:"#9a9a97"},children:(0,Re.jsx)(al.default,{sx:{fontSize:15}})})]}):null]}),i?.index===L?(0,Re.jsxs)(Ze.Box,{sx:{mt:.5},children:[(0,Re.jsx)(Ze.Box,{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"}}),(0,Re.jsxs)(Ze.Box,{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 Nc(S.name)&&S.uuid?(0,Re.jsxs)(Ze.Box,{sx:{position:"relative"},children:[(0,Re.jsx)(Ze.Box,{component:"img",src:z(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"}}),(0,Re.jsx)(Ze.IconButton,{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:(0,Re.jsx)(al.default,{sx:{fontSize:14}})})]},`kept-${S.uuid}-${D}`):(0,Re.jsx)(Ze.Chip,{size:"small",icon:(0,Re.jsx)(ps.default,{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 Nc(S.name)?(0,Re.jsxs)(Ze.Box,{sx:{position:"relative"},children:[(0,Re.jsx)(Ze.Box,{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"}}),(0,Re.jsx)(Ze.IconButton,{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:(0,Re.jsx)(al.default,{sx:{fontSize:14}})})]},`new-${S.name}-${D}`):(0,Re.jsx)(Ze.Chip,{size:"small",icon:(0,Re.jsx)(ps.default,{sx:{fontSize:14}}),label:`${S.name} (\uC0C8 \uD30C\uC77C)`,onDelete:p,sx:{fontSize:14,height:26,bgcolor:"#eef4ff"}},`new-${S.name}-${D}`)}),(0,Re.jsx)(Ze.Tooltip,{title:"\uCCA8\uBD80 \uCD94\uAC00",arrow:!0,children:(0,Re.jsx)(Ze.IconButton,{size:"small","aria-label":"\uCCA8\uBD80 \uCD94\uAC00",onClick:()=>h.current?.click(),sx:{ml:"auto",color:"#2f80ed"},children:(0,Re.jsx)(K1.default,{sx:{fontSize:20}})})})]}),(0,Re.jsxs)(Ze.Box,{sx:{display:"flex",justifyContent:"flex-end",alignItems:"center",gap:.75,mt:.5},children:[(0,Re.jsx)(Ze.Button,{size:"small",color:"inherit",onClick:()=>a(null),children:"\uCDE8\uC18C"}),(0,Re.jsx)(Ze.Button,{size:"small",variant:"contained",disabled:!i.text.trim()&&i.attachments.length===0&&i.files.length===0,onClick:()=>{s(e,L,i.text,{attachments:i.attachments,files:i.files}),a(null)},children:"\uC800\uC7A5"})]}),(0,Re.jsx)(Ze.Box,{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=""}})]}):(0,Re.jsxs)(Ze.Box,{children:[$.text?(0,Re.jsx)(Ze.Box,{sx:{fontSize:15,whiteSpace:"pre-wrap"},children:(0,Re.jsx)(Xf,{text:$.text})}):null,($.attachments??[]).length>0?(0,Re.jsx)(Ze.Box,{sx:{display:"flex",flexWrap:"wrap",gap:.75,mt:.75},children:($.attachments??[]).map((S,D)=>{let p=!!S.uuid;if(Nc(S.name)&&p)return(0,Re.jsx)(Ze.Box,{component:"img",src:z(S.uuid??"",{thumb:"md"}),alt:S.name,title:`${S.name} \uD06C\uAC8C \uBCF4\uAE30`,loading:"lazy",onClick:()=>O(S),sx:{width:96,height:96,objectFit:"cover",borderRadius:1,border:"1px solid #e6e6e3",cursor:"pointer",bgcolor:"#f8fafc"}},`${S.name}-${D}`);let v=Mc(S.name);return(0,Re.jsx)(Ze.Chip,{size:"small",icon:(0,Re.jsx)(ps.default,{sx:{fontSize:14}}),label:`${S.name} (${Yf(S.size)})`,clickable:p,onClick:p?()=>v?O(S):P(S):void 0,title:p?`${S.name} ${v?"\uBBF8\uB9AC\uBCF4\uAE30":"\uB2E4\uC6B4\uB85C\uB4DC"}`:S.name,sx:{fontSize:14,height:26,bgcolor:"#f1f5f9"}},`${S.name}-${D}`)})}):null]})]})]},`${$.time}-${L}`)})}),(0,Re.jsx)(Qt,{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 Nc(e){return/\.(png|jpe?g|gif|webp|bmp|svg|heic|heif)$/i.test(String(e??"").trim())}function Qf({onSubmit:e}){let[f,g]=(0,Ao.useState)(""),[l,o]=(0,Ao.useState)([]),[s,r]=(0,Ao.useState)(!1),t=(0,Ao.useRef)(null),n=(0,Ao.useRef)(null),c=dr(),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=(0,Re.jsxs)(Re.Fragment,{children:[(0,Re.jsx)(Ze.IconButton,{size:"small","aria-label":"\uD30C\uC77C \uCCA8\uBD80",onClick:()=>t.current?.click(),sx:{color:"#9a9a97"},children:(0,Re.jsx)(ps.default,{sx:{fontSize:20}})}),(0,Re.jsx)(Ze.IconButton,{size:"small","aria-label":"\uC774\uBBF8\uC9C0 \uCCA8\uBD80",onClick:()=>n.current?.click(),sx:{color:"#9a9a97"},children:(0,Re.jsx)(G1.default,{sx:{fontSize:20}})})]});return(0,Re.jsxs)(Ze.Box,{children:[l.length>0?(0,Re.jsx)(Ze.Box,{sx:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:1.5,px:2,pt:2},children:l.map((d,u)=>Nc(d.name)?(0,Re.jsxs)(Ze.Box,{sx:{position:"relative"},children:[(0,Re.jsx)(Ze.Box,{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"}}),(0,Re.jsx)(Ze.IconButton,{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:(0,Re.jsx)(al.default,{sx:{fontSize:14}})})]},`${d.name}-${u}`):(0,Re.jsx)(Ze.Chip,{size:"small",icon:(0,Re.jsx)(ps.default,{sx:{fontSize:14}}),label:`${d.name} (${Yf(d.size)})`,onDelete:()=>o(b=>b.filter((m,x)=>x!==u)),sx:{fontSize:14,height:26,bgcolor:"#f1f5f9"}},`${d.name}-${u}`))}):null,(0,Re.jsxs)(Ze.Box,{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?(0,Re.jsxs)(Ze.Box,{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:[(0,Re.jsx)(ps.default,{sx:{fontSize:18}}),"\uC5EC\uAE30\uC5D0 \uB193\uC73C\uBA74 \uCCA8\uBD80\uB429\uB2C8\uB2E4"]}):null,(0,Re.jsx)(q1.TextField,{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?(0,Re.jsxs)(Ze.Box,{sx:{position:"absolute",right:8,top:"50%",transform:"translateY(-50%)",display:"flex",alignItems:"center",gap:.25},children:[h,(0,Re.jsx)(Ze.IconButton,{"aria-label":"\uB313\uAE00 \uB4F1\uB85D",disabled:!f.trim()&&l.length===0,onClick:a,sx:{color:"#2563eb","&.Mui-disabled":{color:"#c9c8c5"}},children:(0,Re.jsx)(Zf.default,{sx:{fontSize:22}})})]}):(0,Re.jsxs)(Re.Fragment,{children:[(0,Re.jsx)(Ze.Box,{sx:{position:"absolute",left:8,bottom:6,display:"flex",alignItems:"center",gap:.25},children:h}),(0,Re.jsx)(Ze.IconButton,{"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:(0,Re.jsx)(Zf.default,{sx:{fontSize:22}})})]})]}),(0,Re.jsx)(Ze.Box,{component:"input",ref:t,type:"file",multiple:!0,onChange:d=>{i(d.target.files),d.target.value=""},sx:{display:"none"}}),(0,Re.jsx)(Ze.Box,{component:"input",ref:n,type:"file",accept:"image/*",multiple:!0,onChange:d=>{i(d.target.files),d.target.value=""},sx:{display:"none"}})]})}var gs=require("react"),Ir=require("@mui/material"),oy=Y(require("@mui/icons-material/Close"),1),iy=Y(require("@mui/icons-material/ArrowBack"),1),sy=Y(require("@mui/icons-material/ContentCopyOutlined"),1),ay=Y(require("@mui/icons-material/ShareOutlined"),1),ly=Y(require("@mui/icons-material/HistoryOutlined"),1),cy=Y(require("@mui/icons-material/Print"),1);var J1=require("react"),to=require("@mui/material"),Q1=require("@ehfuse/mui-form-dialog"),ey=require("@ehfuse/overlay-scrollbar");var Li=require("react"),Y1=require("@ehfuse/forma");function X1({open:e,onClose:f,modalId:g}){let l=(0,Li.useRef)(f);l.current=f;let o=(0,Y1.useModal)({modalId:g,onClose:()=>l.current()}),s=(0,Li.useRef)(o);s.current=o;let r=(0,Li.useRef)(!1);return(0,Li.useEffect)(()=>{e&&!r.current?s.current.open():!e&&r.current&&s.current.isOpen&&s.current.close(),r.current=e},[e]),{requestClose:(0,Li.useCallback)(()=>{if(s.current.isOpen){s.current.close();return}l.current()},[])}}var Fn=require("react/jsx-runtime"),b_={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 Z1(e){return String(e??"").trim()||"\uC5C6\uC74C"}function y_(e){if(e.kind!=="field")return b_[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) "${Z1(g)}" \u2192 "${Z1(l)}" \uB85C \uBC14\uAFE8\uC2B5\uB2C8\uB2E4`}function ll({open:e,taskSeq:f,items:g,loading:l,onLoad:o,onClose:s}){let r=dr(),{requestClose:t}=X1({open:e,onClose:s});(0,J1.useEffect)(()=>{e&&f>0&&!g&&o?.(f)},[e,f,g,o]);let n=(0,Fn.jsx)(to.Box,{sx:{height:r?"100%":420,minHeight:0},children:(0,Fn.jsx)(ey.OverlayScrollbar,{style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:(0,Fn.jsxs)(to.Box,{sx:{px:2,pt:2,display:"flex",flexDirection:"column",gap:1,"&::after":{content:'""',flexShrink:0,height:16}},children:[l&&!g?(0,Fn.jsxs)(to.Box,{sx:{display:"flex",alignItems:"center",gap:1,color:"#9a9a97",fontSize:14.5},children:[(0,Fn.jsx)(to.CircularProgress,{size:14,thickness:5,sx:{color:"#9a9a97"}}),"\uBD88\uB7EC\uC624\uB294 \uC911\u2026"]}):null,g&&g.length===0?(0,Fn.jsx)(to.Box,{sx:{fontSize:14.5,color:"#9a9a97"},children:"\uAE30\uB85D\uB41C \uD65C\uB3D9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):null,(g??[]).map(c=>(0,Fn.jsxs)(to.Box,{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:[(0,Fn.jsx)(to.Box,{sx:{flexShrink:0,...r?{}:{width:"10.5em"},whiteSpace:"nowrap",fontSize:13.5,color:"#9a9a97",lineHeight:1.5},children:Gn(c.acted_time)}),(0,Fn.jsxs)(to.Box,{sx:{minWidth:0,fontSize:14.5,color:"#37352f",lineHeight:1.5},children:[(0,Fn.jsx)(to.Box,{component:"span",sx:{fontWeight:500},children:String(c.actor_name??"").trim()||"\uC774\uB984\uC5C6\uC74C"}),(0,Fn.jsx)(to.Box,{component:"span",sx:{ml:.5},children:y_(c)})]})]},c.seq))]})})});return(0,Fn.jsx)(Q1.FormDialog,{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:(0,Fn.jsx)(to.Button,{variant:"contained",onClick:t,children:"\uB2EB\uAE30"})}})}var Lc=require("@ehfuse/alerts");var ty=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
43
  `).trim():"";function ny(e){let f=[`[\uC5C5\uBB34] ${e.title}`],g=oo(e.start_date),l=oo(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=ty(e.content);s&&f.push("",s);let r=String(e.note??"").trim();return r&&f.push("",`\uBE44\uACE0: ${r}`),f.join(`
44
- `)}function ry(e){navigator.clipboard.writeText(e).then(()=>(0,Lc.SuccessAlert)("\uC5C5\uBB34 \uB0B4\uC6A9\uC744 \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>(0,Lc.InfoAlert)("\uBCF5\uC0AC\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uB0B4\uC6A9\uC744 \uC9C1\uC811 \uC120\uD0DD\uD574 \uBCF5\uC0AC\uD574 \uC8FC\uC138\uC694."))}function ms(e,f){let g=ny(e);if(f&&typeof navigator.share=="function"){navigator.share({text:g}).catch(l=>{l?.name!=="AbortError"&&ry(g)});return}ry(g)}var Dt=require("react/jsx-runtime");function ed({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=dr(),[b,m]=(0,gs.useState)(!1),[x,k]=(0,gs.useState)(null),[I,M]=(0,gs.useState)(null),[z,O]=(0,gs.useState)(null),[P,N]=(0,gs.useState)(null),[$,L]=(0,gs.useState)(null),C=!!e.is_notice,S=!!e.is_event,D=C?$t(e.icon||$r):S?$t(e.icon||Yr):null,p=C&&f>0&&(e.author_account_seq??0)===f,{onReturnTask:y,onReviewDone:v,editPolicy:w}=ct(),_=!!y&&Vn(e,f),T=_&&!!v,R=!So(e,f),F=fi(e,f,w),H=f>0&&(e.author_account_seq??0)===f,V=!!h&&(d??!Ii(e,f,w,!H)),A=!S&&(C?p:(e.author_account_seq??0)===f||(e.manager_account_seq??0)===f);return(0,Dt.jsxs)(Dt.Fragment,{children:[(0,Dt.jsxs)(Ir.Box,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1.5,flexShrink:0},children:[t&&r?(0,Dt.jsx)(Ir.IconButton,{"aria-label":"\uB4A4\uB85C",onClick:r,sx:{color:"#37352f",ml:-1},children:(0,Dt.jsx)(iy.default,{})}):null,A&&!t?(0,Dt.jsx)(Ir.Tooltip,{title:e.completed&&e.completed_by?`${e.completed_by} \xB7 ${Gn(e.completed_time)} \uC644\uB8CC`:"",arrow:!0,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:(0,Dt.jsxs)(Ir.Box,{sx:{display:"flex",flexShrink:0,mr:1},children:[(0,Dt.jsx)(Co,{onClick:q=>L({anchorEl:q.currentTarget,nextCompleted:!e.completed}),children:e.completed?_?"\uB418\uB3CC\uB9AC\uAE30":"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC\uD558\uAE30"}),T?(0,Dt.jsx)(Ir.Button,{variant:"contained",size:"small",disableElevation:!0,onClick:q=>N(q.currentTarget),sx:{ml:1,...os},children:"\uAC80\uC218\uC644\uB8CC"}):null]})}):null,t||!D?null:S&&!R?(0,Dt.jsx)(Ir.Tooltip,{title:"\uC544\uC774\uCF58 \uBCC0\uACBD",arrow:!0,enterDelay:400,disableInteractive:!0,children:(0,Dt.jsx)(Ir.ButtonBase,{onClick:q=>M(q.currentTarget),sx:{display:"flex",p:.5,borderRadius:1,color:e.icon_color||"#1e3a8a","&:hover":{bgcolor:"#f2f2f0"}},children:(0,Dt.jsx)(D,{sx:{fontSize:20}})})}):(0,Dt.jsx)(Ir.Box,{sx:{display:"flex",px:.5,color:e.icon_color||(C?"#e5484d":"#1e3a8a")},children:(0,Dt.jsx)(D,{sx:{fontSize:20}})}),x!==null?(0,Dt.jsx)(Ir.Box,{component:"input",autoFocus:!0,spellCheck:!1,value:x,onChange:q=>k(q.target.value),onBlur:()=>{x.trim()&&x.trim()!==e.title&&l(e.seq,x.trim()),k(null)},onKeyDown:q=>{q.key==="Enter"&&q.target.blur(),q.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?(0,Dt.jsx)(Ir.Box,{sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:C?"\uACF5\uC9C0":S?"\uC77C\uC815":e.is_bug?"\uC624\uB958":"\uC5C5\uBB34"}):(0,Dt.jsx)(Ir.Box,{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?(0,Dt.jsx)(Ir.Tooltip,{title:"\uD65C\uB3D9",arrow:!0,children:(0,Dt.jsx)(Ir.IconButton,{"aria-label":"\uD65C\uB3D9",onClick:()=>m(!0),sx:{color:"#6b7280"},children:(0,Dt.jsx)(ay.default,{sx:{fontSize:20}})})}):null,u?(0,Dt.jsx)(Ir.Tooltip,{title:"\uACF5\uC720\uD558\uAE30",arrow:!0,children:(0,Dt.jsx)(Ir.IconButton,{"aria-label":"\uACF5\uC720\uD558\uAE30",onClick:()=>ms(e,!0),sx:{color:"#6b7280"},children:(0,Dt.jsx)(sy.default,{sx:{fontSize:20}})})}):null,a?(0,Dt.jsx)(Ir.Tooltip,{title:"\uC778\uC1C4",arrow:!0,children:(0,Dt.jsx)(Ir.IconButton,{"aria-label":"\uC778\uC1C4",onClick:()=>a(e),sx:{color:"#6b7280"},children:(0,Dt.jsx)(ly.default,{sx:{fontSize:20}})})}):null,V?(0,Dt.jsx)(Ir.Tooltip,{title:"\uC0AD\uC81C",arrow:!0,children:(0,Dt.jsx)(Ir.IconButton,{"aria-label":"\uC0AD\uC81C",onClick:q=>O(q.currentTarget),sx:{color:"#6b7280","&:hover":{color:"#e5484d"}},children:(0,Dt.jsx)(gn,{sx:{fontSize:20}})})}):null,r&&!t?(0,Dt.jsx)(Ir.IconButton,{"aria-label":"\uB2EB\uAE30",onClick:r,sx:{color:"#6b7280"},children:(0,Dt.jsx)(oy.default,{})}):null]}),(0,Dt.jsx)(Ns,{anchorEl:P,onCancel:()=>N(null),onConfirm:()=>{v?.(e),N(null)}}),(0,Dt.jsx)(Kn,{open:!!$,anchorEl:$?.anchorEl??null,nextCompleted:$?.nextCompleted??!1,returnMode:_,onCancel:()=>L(null),onConfirm:q=>{$&&(q&&y?y(e,q):g(e.seq,$.nextCompleted)),L(null)}}),(0,Dt.jsx)(hi,{anchorEl:I,value:e.icon??"",color:e.icon_color??"",onSelect:q=>{o(e.seq,q),M(null)},onSelectColor:s?q=>s(e.seq,q):void 0,onClose:()=>M(null)}),(0,Dt.jsx)(Qt,{open:!!z,anchorEl:z,title:"\uC774 \uC5C5\uBB34\uB97C \uD734\uC9C0\uD1B5\uC73C\uB85C \uBCF4\uB0B4\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uC0AD\uC81C",onCancel:()=>O(null),onConfirm:()=>{O(null),h?.(e)}}),(0,Dt.jsx)(ll,{open:b,taskSeq:e.seq,items:n,loading:c,onLoad:i,onClose:()=>m(!1)})]})}var On=require("react");var pt=require("@mui/material"),vy=Y(require("@mui/icons-material/ExpandLess"),1),wy=Y(require("@mui/icons-material/ExpandMore"),1),_y=Y(require("@mui/icons-material/ConfirmationNumberOutlined"),1),ad=Y(require("@mui/icons-material/Check"),1),ky=Y(require("@mui/icons-material/DirectionsRunOutlined"),1),Sy=Y(require("@mui/icons-material/SpeedOutlined"),1),$c=Y(require("@mui/icons-material/CheckCircle"),1),Ty=Y(require("@mui/icons-material/CheckCircleOutlineOutlined"),1),Hc=Y(require("@mui/icons-material/CheckCircleOutlined"),1),ld=Y(require("@mui/icons-material/AccessTimeOutlined"),1),Cy=Y(require("@mui/icons-material/AutorenewOutlined"),1),By=Y(require("@mui/icons-material/LabelOutlined"),1),Iy=Y(require("@mui/icons-material/PersonOutlineOutlined"),1),Ey=Y(require("@mui/icons-material/SubjectOutlined"),1),My=Y(require("@mui/icons-material/StickyNote2Outlined"),1),Ry=Y(require("@mui/icons-material/PanToolAltOutlined"),1),cd=Y(require("@mui/icons-material/LockOutlined"),1),ud=Y(require("@mui/icons-material/PublicOutlined"),1),fd=Y(require("@mui/icons-material/Group"),1),Oy=Y(require("@mui/icons-material/Repeat"),1),Ay=Y(require("@mui/icons-material/EventOutlined"),1);var xo=require("react"),Er=require("@mui/material"),zc=Y(require("@mui/icons-material/Check"),1);var uy=require("@ehfuse/mui-form-dialog"),fy=Y(require("@mui/icons-material/Translate"),1),rd=Y(require("@mui/icons-material/ContentCopyOutlined"),1);var ar=require("react/jsx-runtime"),cy=[{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"}],td=new Map;function nd({open:e,taskSeq:f,title:g,html:l,translatedTargets:o=[],onClose:s}){let{translateContent:r}=ct(),[t,n]=(0,xo.useState)(""),[c,i]=(0,xo.useState)(null),[a,h]=(0,xo.useState)([]),d=S=>o.includes(S)||a.includes(S)||td.has(`${f}:${S}`),u=(S,D)=>{if(S!==t){if(S===""||d(S)){n(S);return}i({code:S,anchor:D})}};(0,xo.useEffect)(()=>{e&&(n(""),i(null))},[e,f]);let[b,m]=(0,xo.useState)(null),[x,k]=(0,xo.useState)(!1),[I,M]=(0,xo.useState)(""),[z,O]=(0,xo.useState)(!1),[P,N]=(0,xo.useState)(!1),$=()=>{b?.summary&&navigator.clipboard.writeText(b.summary).then(()=>{N(!0),window.setTimeout(()=>N(!1),1500)})};(0,xo.useEffect)(()=>{if(!e||!r||!(f>0)||!t)return;let S=`${f}:${t}`,D=td.get(S);if(D){m(D),M("");return}let p=!1;return k(!0),M(""),m(null),r({taskSeq:f,target:t}).then(y=>{p||(td.set(S,y),h(v=>v.includes(t)?v:[...v,t]),m(y))}).catch(y=>{p||M(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 L=()=>{if(!b)return;let S=b.html?Ja(b.html):b.text;navigator.clipboard.writeText(`${b.title}
44
+ `)}function ry(e){navigator.clipboard.writeText(e).then(()=>(0,Lc.SuccessAlert)("\uC5C5\uBB34 \uB0B4\uC6A9\uC744 \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>(0,Lc.InfoAlert)("\uBCF5\uC0AC\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uB0B4\uC6A9\uC744 \uC9C1\uC811 \uC120\uD0DD\uD574 \uBCF5\uC0AC\uD574 \uC8FC\uC138\uC694."))}function ms(e,f){let g=ny(e);if(f&&typeof navigator.share=="function"){navigator.share({text:g}).catch(l=>{l?.name!=="AbortError"&&ry(g)});return}ry(g)}var At=require("react/jsx-runtime");function ed({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=dr(),[b,m]=(0,gs.useState)(!1),[x,k]=(0,gs.useState)(null),[I,M]=(0,gs.useState)(null),[z,O]=(0,gs.useState)(null),[P,N]=(0,gs.useState)(null),[$,L]=(0,gs.useState)(null),C=!!e.is_notice,S=!!e.is_event,D=C?$t(e.icon||$r):S?$t(e.icon||Yr):null,p=C&&f>0&&(e.author_account_seq??0)===f,{onReturnTask:y,onReviewDone:v,editPolicy:w}=ct(),_=!!y&&Vn(e,f),T=_&&!!v,R=!So(e,f),F=fi(e,f,w),H=f>0&&(e.author_account_seq??0)===f,V=!!h&&(d??!Ii(e,f,w,!H)),A=!S&&(C?p:(e.author_account_seq??0)===f||(e.manager_account_seq??0)===f);return(0,At.jsxs)(At.Fragment,{children:[(0,At.jsxs)(Ir.Box,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1.5,flexShrink:0},children:[t&&r?(0,At.jsx)(Ir.IconButton,{"aria-label":"\uB4A4\uB85C",onClick:r,sx:{color:"#37352f",ml:-1},children:(0,At.jsx)(iy.default,{})}):null,A&&!t?(0,At.jsx)(Ir.Tooltip,{title:e.completed&&e.completed_by?`${e.completed_by} \xB7 ${Gn(e.completed_time)} \uC644\uB8CC`:"",arrow:!0,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:(0,At.jsxs)(Ir.Box,{sx:{display:"flex",flexShrink:0,mr:1},children:[(0,At.jsx)(Co,{onClick:q=>L({anchorEl:q.currentTarget,nextCompleted:!e.completed}),children:e.completed?_?"\uB418\uB3CC\uB9AC\uAE30":"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC\uD558\uAE30"}),T?(0,At.jsx)(Ir.Button,{variant:"contained",size:"small",disableElevation:!0,onClick:q=>N(q.currentTarget),sx:{ml:1,...os},children:"\uAC80\uC218\uC644\uB8CC"}):null]})}):null,t||!D?null:S&&!R?(0,At.jsx)(Ir.Tooltip,{title:"\uC544\uC774\uCF58 \uBCC0\uACBD",arrow:!0,enterDelay:400,disableInteractive:!0,children:(0,At.jsx)(Ir.ButtonBase,{onClick:q=>M(q.currentTarget),sx:{display:"flex",p:.5,borderRadius:1,color:e.icon_color||"#1e3a8a","&:hover":{bgcolor:"#f2f2f0"}},children:(0,At.jsx)(D,{sx:{fontSize:20}})})}):(0,At.jsx)(Ir.Box,{sx:{display:"flex",px:.5,color:e.icon_color||(C?"#e5484d":"#1e3a8a")},children:(0,At.jsx)(D,{sx:{fontSize:20}})}),x!==null?(0,At.jsx)(Ir.Box,{component:"input",autoFocus:!0,spellCheck:!1,value:x,onChange:q=>k(q.target.value),onBlur:()=>{x.trim()&&x.trim()!==e.title&&l(e.seq,x.trim()),k(null)},onKeyDown:q=>{q.key==="Enter"&&q.target.blur(),q.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?(0,At.jsx)(Ir.Box,{sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:C?"\uACF5\uC9C0":S?"\uC77C\uC815":e.is_bug?"\uC624\uB958":"\uC5C5\uBB34"}):(0,At.jsx)(Ir.Box,{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?(0,At.jsx)(Ir.Tooltip,{title:"\uD65C\uB3D9",arrow:!0,children:(0,At.jsx)(Ir.IconButton,{"aria-label":"\uD65C\uB3D9",onClick:()=>m(!0),sx:{color:"#6b7280"},children:(0,At.jsx)(ly.default,{sx:{fontSize:20}})})}):null,(0,At.jsx)(Ir.Tooltip,{title:u?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",arrow:!0,children:(0,At.jsx)(Ir.IconButton,{"aria-label":u?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",onClick:()=>ms(e,u),sx:{color:"#6b7280"},children:u?(0,At.jsx)(ay.default,{sx:{fontSize:20}}):(0,At.jsx)(sy.default,{sx:{fontSize:20}})})}),a?(0,At.jsx)(Ir.Tooltip,{title:"\uC778\uC1C4",arrow:!0,children:(0,At.jsx)(Ir.IconButton,{"aria-label":"\uC778\uC1C4",onClick:()=>a(e),sx:{color:"#6b7280"},children:(0,At.jsx)(cy.default,{sx:{fontSize:20}})})}):null,V?(0,At.jsx)(Ir.Tooltip,{title:"\uC0AD\uC81C",arrow:!0,children:(0,At.jsx)(Ir.IconButton,{"aria-label":"\uC0AD\uC81C",onClick:q=>O(q.currentTarget),sx:{color:"#6b7280","&:hover":{color:"#e5484d"}},children:(0,At.jsx)(gn,{sx:{fontSize:20}})})}):null,r&&!t?(0,At.jsx)(Ir.IconButton,{"aria-label":"\uB2EB\uAE30",onClick:r,sx:{color:"#6b7280"},children:(0,At.jsx)(oy.default,{})}):null]}),(0,At.jsx)(Ns,{anchorEl:P,onCancel:()=>N(null),onConfirm:()=>{v?.(e),N(null)}}),(0,At.jsx)(Kn,{open:!!$,anchorEl:$?.anchorEl??null,nextCompleted:$?.nextCompleted??!1,returnMode:_,onCancel:()=>L(null),onConfirm:q=>{$&&(q&&y?y(e,q):g(e.seq,$.nextCompleted)),L(null)}}),(0,At.jsx)(hi,{anchorEl:I,value:e.icon??"",color:e.icon_color??"",onSelect:q=>{o(e.seq,q),M(null)},onSelectColor:s?q=>s(e.seq,q):void 0,onClose:()=>M(null)}),(0,At.jsx)(Qt,{open:!!z,anchorEl:z,title:"\uC774 \uC5C5\uBB34\uB97C \uD734\uC9C0\uD1B5\uC73C\uB85C \uBCF4\uB0B4\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uC0AD\uC81C",onCancel:()=>O(null),onConfirm:()=>{O(null),h?.(e)}}),(0,At.jsx)(ll,{open:b,taskSeq:e.seq,items:n,loading:c,onLoad:i,onClose:()=>m(!1)})]})}var On=require("react");var pt=require("@mui/material"),wy=Y(require("@mui/icons-material/ExpandLess"),1),_y=Y(require("@mui/icons-material/ExpandMore"),1),ky=Y(require("@mui/icons-material/ConfirmationNumberOutlined"),1),ad=Y(require("@mui/icons-material/Check"),1),Sy=Y(require("@mui/icons-material/DirectionsRunOutlined"),1),Ty=Y(require("@mui/icons-material/SpeedOutlined"),1),$c=Y(require("@mui/icons-material/CheckCircle"),1),Cy=Y(require("@mui/icons-material/CheckCircleOutlineOutlined"),1),Hc=Y(require("@mui/icons-material/CheckCircleOutlined"),1),ld=Y(require("@mui/icons-material/AccessTimeOutlined"),1),By=Y(require("@mui/icons-material/AutorenewOutlined"),1),Iy=Y(require("@mui/icons-material/LabelOutlined"),1),Ey=Y(require("@mui/icons-material/PersonOutlineOutlined"),1),My=Y(require("@mui/icons-material/SubjectOutlined"),1),Ry=Y(require("@mui/icons-material/StickyNote2Outlined"),1),Oy=Y(require("@mui/icons-material/PanToolAltOutlined"),1),cd=Y(require("@mui/icons-material/LockOutlined"),1),ud=Y(require("@mui/icons-material/PublicOutlined"),1),fd=Y(require("@mui/icons-material/Group"),1),Ay=Y(require("@mui/icons-material/Repeat"),1),Dy=Y(require("@mui/icons-material/EventOutlined"),1);var xo=require("react"),Er=require("@mui/material"),zc=Y(require("@mui/icons-material/Check"),1);var fy=require("@ehfuse/mui-form-dialog"),dy=Y(require("@mui/icons-material/Translate"),1),rd=Y(require("@mui/icons-material/ContentCopyOutlined"),1);var ar=require("react/jsx-runtime"),uy=[{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"}],td=new Map;function nd({open:e,taskSeq:f,title:g,html:l,translatedTargets:o=[],onClose:s}){let{translateContent:r}=ct(),[t,n]=(0,xo.useState)(""),[c,i]=(0,xo.useState)(null),[a,h]=(0,xo.useState)([]),d=S=>o.includes(S)||a.includes(S)||td.has(`${f}:${S}`),u=(S,D)=>{if(S!==t){if(S===""||d(S)){n(S);return}i({code:S,anchor:D})}};(0,xo.useEffect)(()=>{e&&(n(""),i(null))},[e,f]);let[b,m]=(0,xo.useState)(null),[x,k]=(0,xo.useState)(!1),[I,M]=(0,xo.useState)(""),[z,O]=(0,xo.useState)(!1),[P,N]=(0,xo.useState)(!1),$=()=>{b?.summary&&navigator.clipboard.writeText(b.summary).then(()=>{N(!0),window.setTimeout(()=>N(!1),1500)})};(0,xo.useEffect)(()=>{if(!e||!r||!(f>0)||!t)return;let S=`${f}:${t}`,D=td.get(S);if(D){m(D),M("");return}let p=!1;return k(!0),M(""),m(null),r({taskSeq:f,target:t}).then(y=>{p||(td.set(S,y),h(v=>v.includes(t)?v:[...v,t]),m(y))}).catch(y=>{p||M(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 L=()=>{if(!b)return;let S=b.html?Ja(b.html):b.text;navigator.clipboard.writeText(`${b.title}
45
45
 
46
- ${S}`.trim()).then(()=>{O(!0),window.setTimeout(()=>O(!1),1500)})},C=(0,ar.jsxs)(Er.Box,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[(0,ar.jsx)(Er.Box,{sx:{display:"flex",flexWrap:"wrap",gap:.75},children:[{code:"",label:"\uC6D0\uBB38"},...cy].map(S=>(0,ar.jsx)(Er.Chip,{label:S.label,clickable:!0,icon:S.code&&d(S.code)?(0,ar.jsx)(zc.default,{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__"))}),(0,ar.jsx)(Qt,{open:!!c,anchorEl:c?.anchor??null,title:`${cy.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?(0,ar.jsx)(Er.Box,{sx:{minHeight:200,display:"flex",alignItems:"center",justifyContent:"center"},children:(0,ar.jsx)(js,{})}):I?(0,ar.jsx)(Er.Box,{sx:{fontSize:15,color:"#c62828",py:2},children:I}):b?(0,ar.jsxs)(Er.Box,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[b.summary?(0,ar.jsxs)(Er.Box,{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:[(0,ar.jsx)(Er.Tooltip,{title:"\uC694\uC57D \uBCF5\uC0AC",arrow:!0,children:(0,ar.jsx)(Er.IconButton,{size:"small","aria-label":"\uC694\uC57D \uBCF5\uC0AC",onClick:$,sx:{position:"absolute",top:4,right:4,color:"#64748b"},children:P?(0,ar.jsx)(zc.default,{sx:{fontSize:18,color:"#2f9e5b"}}):(0,ar.jsx)(rd.default,{sx:{fontSize:18}})})}),(0,ar.jsx)(fy.default,{sx:{fontSize:30,color:"#2563eb",flexShrink:0,mx:1.5}}),(0,ar.jsxs)(Er.Box,{sx:{flex:1,minWidth:0},children:[(0,ar.jsx)(Er.Box,{sx:{fontSize:16,fontWeight:600,color:"#1e3a8a"},children:"AI \uBC88\uC5ED (Gemini) \xB7 \uC6D0\uBB38\uACFC \uB2E4\uB97C \uC218 \uC788\uC2B5\uB2C8\uB2E4"}),(0,ar.jsx)(Er.Box,{sx:{fontSize:15,color:"#111",mt:.25,lineHeight:1.5,whiteSpace:"pre-wrap",wordBreak:"break-word"},children:b.summary})]})]}):null,(0,ar.jsx)(Er.Box,{sx:{fontSize:18,fontWeight:700,color:"#111",wordBreak:"break-word"},children:b.title}),b.html?(0,ar.jsx)(Er.Box,{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}}):(0,ar.jsx)(Er.Box,{sx:{fontSize:16,lineHeight:1.6,color:"#37352f",whiteSpace:"pre-wrap"},children:b.text})]}):null:(0,ar.jsxs)(Er.Box,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[(0,ar.jsx)(Er.Box,{sx:{fontSize:18,fontWeight:700,color:"#111",wordBreak:"break-word"},children:g}),(0,ar.jsx)(Er.Box,{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(0,ar.jsx)(uy.FormDialog,{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:C}],actions:{showCancelButton:!1,left:t&&b?(0,ar.jsx)(Er.Button,{variant:"outlined",color:"inherit",startIcon:z?(0,ar.jsx)(zc.default,{sx:{fontSize:18,color:"#2f9e5b"}}):(0,ar.jsx)(rd.default,{sx:{fontSize:18}}),onClick:L,sx:{minWidth:80,color:"#37352f",borderColor:"#d9d9d6"},children:"\uBCF5\uC0AC"}):void 0,right:(0,ar.jsx)(Er.Button,{variant:"contained",onClick:s,sx:{minWidth:80},children:"\uB2EB\uAE30"})}})}var cl=require("@ehfuse/alerts"),Dy=require("@ehfuse/mui-datetime-picker");var dy=require("react"),hy=require("@ehfuse/mui-form-controls"),py=require("react/jsx-runtime");function od({value:e,onCommit:f,onDraftChange:g,readOnly:l=!1}){let[o,s]=(0,dy.useState)(null);return(0,py.jsx)(hy.TextField,{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}})}var ji=require("react"),Ur=require("@mui/material"),gy=Y(require("@mui/icons-material/AccountTreeOutlined"),1),by=Y(require("@mui/icons-material/LinkOutlined"),1),yy=Y(require("@mui/icons-material/Close"),1),xy=Y(require("@mui/icons-material/RedoOutlined"),1);function zi(e){return e.relations??[]}function y_(e,f,g){return zi(e).some(l=>l.type===g&&l.task_seq===f.seq)||zi(f).some(l=>l.type===g&&l.task_seq===e.seq)}function my(e){return`${e.created_time??""}|${String(e.seq).padStart(12,"0")}`}function jc(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 zi(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)=>my(u).localeCompare(my(b))),n=new Set;for(let u of zi(e))u.type==="related"&&n.add(u.task_seq);for(let u of g.values())u.seq!==e.seq&&zi(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&&zi(u).some(b=>b.type==="duplicate_of"&&b.task_seq===e.seq)),a=zi(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 Fc(e,f){let g=jc(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 id(e,f){return Fc(e,f)>0}var Pt=require("react/jsx-runtime");function qc({item:e,caption:f,onOpen:g,onUnlink:l}){let o=e.is_notice||e.is_event?$t(e.icon||(e.is_notice?$r:Yr)):null;return(0,Pt.jsxs)(Ur.Box,{sx:{display:"flex",alignItems:"center",gap:.75,px:1.25,py:.5,borderRadius:1,"&:hover":{bgcolor:"#f7f7f5"},"&:hover .taskbox-relation-unlink":{opacity:1}},children:[f?(0,Pt.jsx)(Ur.Box,{component:"span",sx:{flexShrink:0,px:.6,py:.1,borderRadius:.75,fontSize:11.5,fontWeight:500,color:"#8a6d1d",bgcolor:"#faf1d7"},children:f}):null,o?(0,Pt.jsx)(o,{sx:{fontSize:16,flexShrink:0,color:e.icon_color||"#1e3a8a"}}):null,(0,Pt.jsxs)(Ur.Box,{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]}),(0,Pt.jsx)(ir,{option:Xr(e),small:!0}),l?(0,Pt.jsx)(Ur.IconButton,{className:"taskbox-relation-unlink",size:"small","aria-label":"\uC5F0\uACB0 \uD574\uC81C",onClick:l,sx:{opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:(0,Pt.jsx)(yy.default,{sx:{fontSize:15}})}):null]})}function sd({task:e,tasks:f,readOnly:g=!1,onOpenTask:l,onLink:o,onUnlink:s,onCreateFollowUp:r}){let[t,n]=(0,ji.useState)(!1),[c,i]=(0,ji.useState)(null),[a,h]=(0,ji.useState)(null),d=(0,ji.useMemo)(()=>jc(e,f),[e,f]),u=d.lineage.length>=2,b=(0,ji.useMemo)(()=>Fc(e,f),[e,f]),m=(0,ji.useMemo)(()=>{let k=new Set;for(let I of d.lineage)k.add(I.seq);for(let I of d.related)k.add(I.seq);for(let I of d.duplicates)k.add(I.seq);for(let I of d.parents)k.add(I.seq);return d.duplicateOf&&k.add(d.duplicateOf.seq),[...k]},[d]),x=(k,I,M)=>{h({anchorEl:k,targetSeq:I,type:M})};return(0,Pt.jsxs)(ao,{icon:(0,Pt.jsx)(gy.default,{sx:{fontSize:19,display:"block"}}),title:(0,Pt.jsxs)(Pt.Fragment,{children:["\uAD00\uB828 \uC5C5\uBB34",b>0?(0,Pt.jsx)(Ur.Box,{component:"span",sx:{fontSize:12.5,color:"#9a9a97"},children:b}):null]}),titleExtra:g?null:(0,Pt.jsxs)(Ur.Box,{sx:{ml:"auto",display:"flex",alignItems:"center",gap:.5},children:[r?(0,Pt.jsx)(Ur.Button,{size:"small",color:"inherit",startIcon:(0,Pt.jsx)(xy.default,{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?(0,Pt.jsx)(Ur.Button,{size:"small",color:"inherit",startIcon:(0,Pt.jsx)(by.default,{sx:{fontSize:16}}),onClick:()=>n(!0),sx:{minWidth:0,px:1,fontSize:12.5,color:"#787774"},children:"\uC5F0\uACB0"}):null]}),children:[(0,Pt.jsxs)(Ur.Box,{sx:{display:"flex",flexDirection:"column",mt:.5,pl:3.25},children:[u?(0,Pt.jsx)(Ur.Box,{sx:{mb:d.related.length||d.duplicates.length||d.duplicateOf?1:0},children:d.lineage.map((k,I)=>{let M=k.seq===e.seq,z=I===d.lineage.length-1;return(0,Pt.jsxs)(Ur.Box,{sx:{display:"flex",gap:1},children:[(0,Pt.jsxs)(Ur.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",width:14,flexShrink:0,pt:1.1},children:[(0,Pt.jsx)(Ur.Box,{sx:{width:M?9:7,height:M?9:7,borderRadius:"50%",bgcolor:M?"#2f80ed":k.completed?"#9a9a97":"#c9c8c5",flexShrink:0}}),z?null:(0,Pt.jsx)(Ur.Box,{sx:{width:"2px",flex:1,bgcolor:"#e6e6e3"}})]}),(0,Pt.jsxs)(Ur.Box,{sx:{flex:1,minWidth:0,pb:z?0:.5},children:[(0,Pt.jsxs)(Ur.Box,{sx:{display:"flex",alignItems:"center",gap:.75},children:[(0,Pt.jsxs)(Ur.Box,{component:"span",onClick:!M&&l?()=>l(k.seq):void 0,sx:{minWidth:0,fontSize:14,fontWeight:M?600:400,color:M?"#2f80ed":k.completed?"#9a9a97":"#37352f",textDecoration:k.completed?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...!M&&l?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}},children:[k.ticket_no?`${k.ticket_no} `:"",k.title]}),(0,Pt.jsx)(ir,{option:Xr(k),small:!0})]}),(0,Pt.jsx)(Ur.Box,{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=>(0,Pt.jsx)(qc,{item:k,caption:"\uC0C1\uC704 \uC5C5\uBB34",onOpen:l?()=>l(k.seq):void 0},`parent-${k.seq}`)),d.duplicateOf?(0,Pt.jsx)(qc,{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=>(0,Pt.jsx)(qc,{item:k,caption:"\uC911\uBCF5",onOpen:l?()=>l(k.seq):void 0,onUnlink:!g&&s?I=>x(I.currentTarget,k.seq,"duplicate_of"):void 0},`dup-${k.seq}`)),d.related.map(k=>(0,Pt.jsx)(qc,{item:k,onOpen:l?()=>l(k.seq):void 0,onUnlink:!g&&s?I=>x(I.currentTarget,k.seq,"related"):void 0},`rel-${k.seq}`)),b===0?(0,Pt.jsx)(Ur.Box,{sx:{px:1.25,py:.75,fontSize:13.5,color:"#9a9a97"},children:"\uC5F0\uACB0\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):null]}),o?(0,Pt.jsx)(el,{open:t,task:e,tasks:f,excludeSeqs:m,onClose:()=>n(!1),onSubmit:(k,I)=>o(e.seq,k,I)}):null,(0,Pt.jsx)(Qt,{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)}}),(0,Pt.jsx)(Qt,{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)}})]})}var fe=require("react/jsx-runtime");function Fi({label:e="\uBE44\uC5B4 \uC788\uC74C"}){return(0,fe.jsx)(pt.Box,{component:"span",sx:{color:"#9a9a97"},children:e})}function dd({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:I,onChangeNoteDraft:M,onChangeContent:z,contentTemplates:O,onSaveContentTemplate:P,onRemoveContentTemplate:N,contentLoading:$=!1,onChangeContentHeight:L,onAddChecklistItem:C,onToggleChecklistItem:S,onRemoveChecklistItem:D,onUpdateChecklistItem:p,onReorderChecklist:y,onConvertChecklistToTask:v,onOpenChecklistTask:w,onLinkChecklistTask:_,resolveChecklistTask:T,relatedTasksPool:R,onOpenRelatedTask:F,onLinkRelatedTask:H,onUnlinkRelatedTask:V,onCreateFollowUpTask:A,onAddAttachments:q,onRemoveAttachment:B,onPreview:E,onDownload:j,onUpdateComment:U,onRemoveComment:X,onToggleCommentReaction:G,currentUserName:W="",myAccountSeq:Z=0,noticeAdmin:J=!1,hideProject:K=!1,hideLabel:ee=!1,showTitle:te=!1,onChangeTitle:oe,onToggleCompleted:ne,onChangeIcon:ie,onChangeIconColor:ae,employees:pe=[],onAckConfirm:ye,onRequestConfirm:Se,onChangeBugField:Be,sprints:Ce=[],sprintProject:Pe=!1,hideSprint:ft=!1,onChangeSprint:xe,onChangeStoryPoints:se,onChangeResolution:Ie,onClaimTask:ke,onVerifyBug:_e}){let[rt,Fe]=(0,On.useState)(null),me=(0,On.useRef)(!1),[Jt,Ue]=(0,On.useState)(null),[nt,qt]=(0,On.useState)(null),[lt,Le]=(0,On.useState)(null),[we,ve]=(0,On.useState)(!1),Ee={[yo]:we?{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"}},[st,Ve]=(0,On.useState)(null),[$e,Ut]=(0,On.useState)(null),[et,re]=(0,On.useState)(null),[ue,de]=(0,On.useState)(null),[Te,_t]=(0,On.useState)(null),[De,He]=(0,On.useState)(null),[Lt,Ne]=(0,On.useState)(null),Oe=!!e.is_notice,at=!!e.is_event,mt=!!e.is_bug,Bt=!!ke&&Ba(e,Z),{onReturnTask:Vt,editPolicy:St,translateContent:gr}=ct(),[yr,xr]=(0,On.useState)(!1),Nr=!!ke&&Ia(e,Z),Q=!!_e&&mt&&!!e.completed&&Z>0&&(e.author_account_seq??0)===Z&&!(e.acks??[]).some(ce=>ce.account_seq===Z),le=!So(e,Z),ge=fi(e,Z,St),be=!e.is_event&&(e.is_notice?Z>0&&(e.author_account_seq??0)===Z:(e.author_account_seq??0)===Z||(e.manager_account_seq??0)===Z),Me=e.is_notice||e.is_event?$t(e.icon||(e.is_notice?$r:Yr)):null,Ke=Oe?!Ca(e,Z):le,Ge=Bt||Nr?(0,fe.jsxs)(Co,{onClick:ce=>Ne(ce.currentTarget),children:[(0,fe.jsx)(Ry.default,{sx:{fontSize:16,mr:.5}}),"\uAC00\uC838\uAC00\uAE30"]}):null,ut=Oe?il(e,pe):"",Je=Oe?$f(e,pe,Z):null,Xe=Oe?null:ls(e,Z),dt=!!(Xe&&Xe.total>0||Oe&&Je),Xt=(e.origin_license_seq??0)>0,fr=!Oe&&!Xt,zt=(0,fe.jsxs)(fe.Fragment,{children:[(0,fe.jsx)(It,{icon:(0,fe.jsx)(Iy.default,{sx:{fontSize:17}}),label:"\uC791\uC131\uC790",sx:[Ro(9),Ee??null,...at?[]:[zr(1)]],children:e.created_by?(0,fe.jsxs)(fe.Fragment,{children:[(0,fe.jsx)(Cn,{names:[e.created_by],size:20,avatarSrcByName:l}),e.created_by]}):(0,fe.jsx)(Fi,{})}),(0,fe.jsx)(It,{icon:(0,fe.jsx)(ld.default,{sx:{fontSize:17}}),label:"\uC791\uC131\uC77C\uC2DC",sx:[Ro(11),Ee??null,...at?[]:[zr(2)]],children:e.created_time?Gn(e.created_time):(0,fe.jsx)(Fi,{})})]});return(0,fe.jsxs)(fe.Fragment,{children:[te?(0,fe.jsxs)(pt.Box,{sx:{px:2,pt:2,pb:.5,display:"flex",alignItems:"flex-start",gap:1},children:[be?(0,fe.jsx)(pt.Checkbox,{checked:e.completed,icon:(0,fe.jsx)(Ty.default,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:(0,fe.jsx)($c.default,{sx:{fontSize:22,color:"#2f80ed"}}),onChange:(ce,Nt)=>{nt||qt({anchorEl:ce.currentTarget,nextCompleted:Nt})},sx:{p:0,mt:.25}}):null,Me?at&&!le?(0,fe.jsx)(pt.ButtonBase,{onClick:ce=>Ue(ce.currentTarget),sx:{display:"flex",p:.25,mt:.1,borderRadius:1,color:e.icon_color||"#1e3a8a","&:hover":{bgcolor:"#f2f2f0"}},children:(0,fe.jsx)(Me,{sx:{fontSize:20}})}):(0,fe.jsx)(pt.Box,{sx:{display:"flex",p:0,mt:.25,color:e.icon_color||(Oe?"#e5484d":"#1e3a8a")},children:(0,fe.jsx)(Me,{sx:{fontSize:20}})}):null,(0,fe.jsx)(pt.Box,{sx:{flex:1,minWidth:0},children:rt!==null?(0,fe.jsx)(pt.Box,{component:"div",contentEditable:!0,suppressContentEditableWarning:!0,spellCheck:!1,ref:ce=>{if(!ce||ce.dataset.focused)return;ce.dataset.focused="1",ce.focus();let Nt=document.createRange();Nt.selectNodeContents(ce),Nt.collapse(!1);let Or=window.getSelection();Or?.removeAllRanges(),Or?.addRange(Nt)},onBlur:ce=>{let Nt=(ce.currentTarget.textContent??"").replace(/\n/g," ").trim();!me.current&&Nt&&Nt!==e.title&&oe(e.seq,Nt),me.current=!1,Fe(null)},onKeyDown:ce=>{ce.key==="Enter"&&(ce.preventDefault(),ce.target.blur()),ce.key==="Escape"&&(me.current=!0,ce.target.blur())},onPaste:ce=>{ce.preventDefault();let Nt=ce.clipboardData.getData("text/plain").replace(/\n/g," ");document.execCommand("insertText",!1,Nt)},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:rt}):(0,fe.jsx)(pt.Box,{onClick:()=>Fe(e.title),sx:{fontSize:19,fontWeight:600,color:"#37352f",lineHeight:"26px",cursor:"text",textDecoration:e.completed?"line-through":"none",userSelect:"text",wordBreak:"break-word"},children:e.title})}),(0,fe.jsx)(Kn,{open:!!nt,anchorEl:nt?.anchorEl??null,nextCompleted:nt?.nextCompleted??!1,returnMode:!!Vt&&Vn(e,Z),onCancel:()=>qt(null),onConfirm:ce=>{nt&&(ce&&Vt?Vt(e,ce):ne(e.seq,nt.nextCompleted)),qt(null)}})]}):null,(0,fe.jsxs)(pt.Box,{sx:{py:1.5,display:"flex",flexDirection:"column",gap:0,[yo]:{pb:0,"& > :last-child":{mb:0}}},children:[(0,fe.jsx)(Ya,{hideProject:K,pinColumns:!0,projectColumn:!at&&!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:Bo(e),priority:e.priority,eventTime:e.event_time??"",eventPlace:e.event_place??"",eventAddress:e.event_address??""},customTabs:f,avatarSrcByName:Ma(e,l),hideDueDate:!at&&!!e.repeat_rule,notice:Oe,event:at,readOnly:le,coreLocked:ge,targetSummary:ut,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:Ee,reminderLocked:e.completed,managerAction:Ge,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:nc(e.support_type??"")}:void 0,leading:(0,fe.jsxs)(fe.Fragment,{children:[Q||Ge&&(Oe||at)?(0,fe.jsxs)(pt.Box,{sx:{gridColumn:"1 / -1",display:"flex",justifyContent:"flex-start",gap:2,px:2,py:1.5},children:[Oe||at?Ge:null,Q?(0,fe.jsxs)(fe.Fragment,{children:[(0,fe.jsx)(pt.Button,{variant:"contained",size:"large",onClick:()=>_e?.(e.seq,!0),sx:{bgcolor:"#2f80ed"},children:"\uAC80\uC99D\uC644\uB8CC"}),(0,fe.jsx)(pt.Button,{variant:"outlined",size:"large",color:"error",onClick:()=>_e?.(e.seq,!1),children:"\uC7AC\uC624\uD508"})]}):null]}):null,mt&&e.ticket_no?(0,fe.jsx)(It,{icon:(0,fe.jsx)(_y.default,{sx:{fontSize:17}}),label:"\uD2F0\uCF13",sx:zr(1),children:(0,fe.jsx)(pt.Box,{component:"span",sx:{fontVariantNumeric:"tabular-nums"},children:e.ticket_no})}):null,at?null:(0,fe.jsx)(pt.Box,{sx:mt&&e.ticket_no||fr||dt?zr(mt&&e.ticket_no?2:1):{gridColumn:"1 / -1"},children:(0,fe.jsx)(It,{icon:(0,fe.jsx)(Cy.default,{sx:{fontSize:17}}),label:"\uC0C1\uD0DC",onClick:le||e.completed?void 0:ce=>Ve(ce),children:(0,fe.jsx)(ir,{option:Xr(e)})})}),fr?(()=>{let ce=ho(e),Nt=ce==="all"?(0,fe.jsx)(ud.default,{sx:{fontSize:17,color:"#2f80ed"}}):ce==="group"?(0,fe.jsx)(fd.default,{sx:{fontSize:17,color:"#d9730d"}}):(0,fe.jsx)(cd.default,{sx:{fontSize:17}}),Or=ce==="all"?"\uC804\uCCB4\uACF5\uAC1C":ce==="group"?`\uBD80\uC11C\uACF5\uAC1C \xB7 ${b.find(Lr=>Lr.seq===(e.visibility_group_seq??0))?.name??"\uBD80\uC11C"}`:"\uBE44\uACF5\uAC1C";return(0,fe.jsx)(pt.Box,{sx:at?void 0:zr(mt?1:2),children:(0,fe.jsx)(It,{icon:Nt,label:"\uACF5\uAC1C",onClick:ge||!d?void 0:Lr=>Ut(Lr),children:Or})})})():null,!Oe&&!mt&&!Xt?(0,fe.jsx)(pt.Box,{sx:at?void 0:zr(1),children:(0,fe.jsx)(It,{icon:(0,fe.jsx)(Oy.default,{sx:{fontSize:17,...e.repeat_rule?{color:"#2f80ed"}:{}}}),label:"\uBC18\uBCF5",onClick:ge||!u?void 0:ce=>re(ce),children:e.repeat_rule?Ua(e.repeat_rule):(0,fe.jsx)(Fi,{label:"\uC5C6\uC74C"})})}):null,!Oe&&!mt&&e.repeat_rule?(0,fe.jsx)(pt.Box,{sx:at?void 0:zr(2),children:(0,fe.jsx)(It,{icon:(0,fe.jsx)(Ay.default,{sx:{fontSize:17}}),label:"\uBC18\uBCF5 \uC885\uB8CC",onClick:ge||!u?void 0:ce=>de(ce),children:e.repeat_until?`${e.repeat_until}\uAE4C\uC9C0`:(0,fe.jsx)(Fi,{})})}):null,Xe&&Xe.total>0?(0,fe.jsx)(pt.Box,{sx:at?void 0:zr(2),children:(0,fe.jsx)(It,{icon:(0,fe.jsx)(Hc.default,{sx:{fontSize:17}}),label:"\uD655\uC778",children:Xe.canConfirm?(0,fe.jsx)(pt.Button,{size:"small",variant:"contained",onClick:()=>ye?.(e.seq),sx:{py:.1,px:1.25,minWidth:0,color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}},children:"\uD655\uC778"}):(0,fe.jsxs)(pt.Button,{size:"small",variant:"outlined",color:"inherit",startIcon:Xe.myTime?(0,fe.jsx)($c.default,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:ce=>Le({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:[Xe.count," / ",Xe.total]})})}):null,Oe&&Je?(0,fe.jsx)(pt.Box,{sx:zr(2),children:(0,fe.jsx)(It,{icon:(0,fe.jsx)(Hc.default,{sx:{fontSize:17}}),label:"\uD655\uC778",children:(0,fe.jsx)(pt.Box,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,minWidth:0},children:Je.canAck?(0,fe.jsx)(pt.Button,{size:"small",variant:"contained",onClick:()=>ye?.(e.seq),sx:{py:.1,px:1.25,minWidth:0,color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}},children:"\uD655\uC778"}):(0,fe.jsx)(pt.Button,{size:"small",variant:"outlined",color:"inherit",startIcon:Je.acked?(0,fe.jsx)($c.default,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:ce=>Le({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:Je.total>0&&Je.count>=Je.total?"\uC644\uB8CC":(0,fe.jsxs)(fe.Fragment,{children:[Je.count,(0,fe.jsx)(pt.Box,{component:"span",sx:{mx:.4},children:"/"}),Je.total]})})})})}):null,Pe&&!ft&&!at&&!Oe?(0,fe.jsxs)(fe.Fragment,{children:[(0,fe.jsx)(It,{icon:(0,fe.jsx)(ky.default,{sx:{fontSize:17}}),label:"\uBAA9\uD45C",onClick:ge?void 0:ce=>_t(ce),sx:zr(1),children:(e.sprint_seq??0)>0?Ce.find(ce=>ce.seq===e.sprint_seq)?.name??"\uC0AD\uC81C\uB41C \uC2A4\uD504\uB9B0\uD2B8":(0,fe.jsx)(Fi,{label:"\uBBF8\uBC30\uC815"})}),(0,fe.jsx)(It,{icon:(0,fe.jsx)(Sy.default,{sx:{fontSize:17}}),label:"\uD3EC\uC778\uD2B8",sx:zr(2),children:(0,fe.jsx)(Ko,{value:(e.story_points??0)>0?String(e.story_points):"",placeholder:"\uBBF8\uCD94\uC815",readOnly:ge,onCommit:ce=>se?.(e.seq,Number(ce.replace(/[^0-9.]/g,""))||0)})})]}):null,at||ee?null:(0,fe.jsx)(pt.Box,{sx:[K?{gridColumn:"1 / -1"}:zr(1),Ee??null],children:(0,fe.jsx)(It,{icon:(0,fe.jsx)(By.default,{sx:{fontSize:17}}),label:"\uB77C\uBCA8",onClick:le?void 0:ce=>He(ce),children:(e.label_keys??[]).length>0?(0,fe.jsx)(ci,{labelKeys:e.label_keys??[],labelOptions:g}):(0,fe.jsx)(Fi,{})})})]}),afterProject:at?null:zt,trailing:(0,fe.jsxs)(fe.Fragment,{children:[mt?(0,fe.jsx)(Xa,{values:{repro:e.bug_repro??"",device:e.bug_device??"",where:e.bug_where??"",version:e.bug_version??"",resolution:e.resolution??""},readOnly:ge,showResolution:!!e.completed,onChangeRepro:ce=>Be?.(e.seq,"bug_repro",ce),onChangeDevice:ce=>Be?.(e.seq,"bug_device",ce),onChangeWhere:ce=>Be?.(e.seq,"bug_where",ce),onChangeVersion:ce=>Be?.(e.seq,"bug_version",ce),onChangeResolution:ce=>Ie?.(e.seq,ce)}):null,at?zt:null,e.completed?(0,fe.jsxs)(fe.Fragment,{children:[(0,fe.jsx)(It,{icon:(0,fe.jsx)(Hc.default,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC790",sx:[Ro(10),Ee??null,...at?[]:[zr(1)]],children:e.completed_by?(0,fe.jsxs)(fe.Fragment,{children:[(0,fe.jsx)(Cn,{names:[e.completed_by],size:20,avatarSrcByName:l}),e.completed_by]}):(0,fe.jsx)(Fi,{})}),(0,fe.jsx)(It,{icon:(0,fe.jsx)(ld.default,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC77C\uC2DC",sx:[Ro(12),Ee??null,...at?[]:[zr(2)]],children:e.completed_time?Gn(e.completed_time):(0,fe.jsx)(Fi,{})})]}):null]})}),(0,fe.jsxs)(pt.Box,{sx:{display:"none",[yo]:{display:"block",mt:1.5,mb:0}},children:[(0,fe.jsx)(pt.Divider,{sx:{borderColor:"#e6e6e3"}}),(0,fe.jsx)(pt.ButtonBase,{onClick:()=>ve(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:we?(0,fe.jsxs)(fe.Fragment,{children:["\uC811\uAE30 ",(0,fe.jsx)(vy.default,{sx:{fontSize:18}})]}):(0,fe.jsxs)(fe.Fragment,{children:["\uC815\uBCF4 \uB354\uBCF4\uAE30 ",(0,fe.jsx)(wy.default,{sx:{fontSize:18}})]})})]}),(0,fe.jsxs)(pt.Box,{children:[(0,fe.jsx)(pt.Divider,{sx:{my:1.5,borderColor:"#e6e6e3",[yo]:{mt:0,mb:1.25}}}),(0,fe.jsx)(ao,{icon:(0,fe.jsx)(Ey.default,{sx:{fontSize:18,display:"block"}}),title:"\uB0B4\uC6A9",titleExtra:O&&!ge?(0,fe.jsx)(Za,{content:e.content??"",templates:O,onApply:ce=>z?.(e.seq,ce),onSave:P,onRemove:N}):void 0,children:(0,fe.jsx)(pt.Box,{sx:{userSelect:"text"},children:$?(0,fe.jsx)(pt.Box,{sx:{minHeight:e.content_height||180,display:"flex",alignItems:"center",justifyContent:"center"},children:(0,fe.jsx)(js,{})}):(0,fe.jsx)(Qa,{syncKey:e.seq,value:e.content??"",height:e.content_height??0,onChangeHeight:L?ce=>L(e.seq,ce):void 0,readOnly:ge,viewFirst:!0,onTranslate:gr?()=>xr(!0):void 0,onChange:ce=>z(e.seq,ce)})})}),e.is_bug?null:(0,fe.jsxs)(fe.Fragment,{children:[(0,fe.jsx)(pt.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,fe.jsx)(ao,{icon:(0,fe.jsx)(My.default,{sx:{fontSize:18,display:"block"}}),title:"\uBE44\uACE0",children:(0,fe.jsx)(pt.Box,{sx:{userSelect:"text"},children:(0,fe.jsx)(od,{value:e.note,readOnly:Ke,onCommit:ce=>I(e.seq,ce),onDraftChange:M?ce=>M(e.seq,ce):void 0})})})]}),at?null:(0,fe.jsxs)(fe.Fragment,{children:[(0,fe.jsx)(pt.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,fe.jsx)(tl,{taskSeq:e.seq,checklist:e.checklist??[],removeLocked:Ke,onAdd:C,onToggle:S,onRemove:D,onUpdate:p,onReorder:y,onConvertToTask:v,onOpenLinkedTask:w,resolveLinkedTask:T,myAccountSeq:Z,linkCandidates:R,linkBaseTask:e,onLinkExistingTask:_})]}),R&&!at&&!Oe&&id(e,R)?(0,fe.jsxs)(fe.Fragment,{children:[(0,fe.jsx)(pt.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,fe.jsx)(sd,{task:e,tasks:R,readOnly:le,onOpenTask:F,onLink:H,onUnlink:V,onCreateFollowUp:A})]}):null,(0,fe.jsx)(pt.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,fe.jsx)(rl,{taskSeq:e.seq,attachments:e.attachments??[],removeLocked:Oe?Ke:ge,onAdd:q,onRemove:B,onPreview:E?ce=>E({...ce,taskSeq:e.seq}):void 0,onDownload:j?ce=>j({...ce,taskSeq:e.seq}):void 0})]}),(0,fe.jsx)(pt.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,fe.jsx)(Jf,{taskSeq:e.seq,comments:e.comments??[],currentUserName:W,myAccountSeq:Z,avatarSrcByName:l,onUpdate:U,onRemove:X,onToggleReaction:G,onPreview:E?ce=>E({...ce,taskSeq:e.seq}):void 0,onDownload:j?ce=>j({...ce,taskSeq:e.seq}):void 0})]}),gr?(0,fe.jsx)(nd,{open:yr,taskSeq:e.seq,title:e.title,html:e.content??"",translatedTargets:e.translated_targets??[],onClose:()=>xr(!1)}):null,(0,fe.jsx)(rs,{anchorEl:st,value:e.status,options:Oe?Rs:mt?Ci:Os,onSelect:ce=>o(e.seq,ce),onClose:()=>Ve(null)}),(0,fe.jsx)(pt.Menu,{transitionDuration:0,anchorEl:et,open:!!et,onClose:()=>re(null),children:[{value:"",label:"\uC5C6\uC74C"},...Xs].map(ce=>(0,fe.jsx)(pt.MenuItem,{selected:(e.repeat_rule??"")===ce.value,onClick:()=>{re(null),(async()=>{let Nt=e.repeat_rule??"";if(ce.value===Nt)return;if(ce.value===""){await(0,cl.ConfirmDialog)({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 Or=String(e.due_date??"").slice(0,10);if(!Or){(0,cl.InfoAlert)(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}Nt&&!await(0,cl.ConfirmDialog)({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,Va(Or,ce.value))})()},sx:{fontSize:14,minWidth:140},children:ce.label},ce.value||"none"))}),(0,fe.jsx)(Dy.DatePicker,{anchorEl:ue,open:!!ue,onClose:()=>de(null),selectedDate:e.repeat_until?new Date(`${e.repeat_until}T00:00:00`):new Date,onDateChange:ce=>{de(null);let Nt=Hn=>String(Hn).padStart(2,"0"),Or=`${ce.getFullYear()}-${Nt(ce.getMonth()+1)}-${Nt(ce.getDate())}`,Lr=e.repeat_rule??"";Lr&&u?.(e.seq,Lr,Or)}}),(0,fe.jsx)(pt.Menu,{transitionDuration:0,anchorEl:$e,open:!!$e,onClose:()=>Ut(null),children:[{key:"involved",label:"\uBE44\uACF5\uAC1C",icon:(0,fe.jsx)(cd.default,{sx:{fontSize:17,color:"#57564f"}}),selected:ho(e)==="involved",onPick:()=>d?.(e.seq,"involved",0)},{key:"all",label:"\uC804\uCCB4\uACF5\uAC1C",icon:(0,fe.jsx)(ud.default,{sx:{fontSize:17,color:"#2f80ed"}}),selected:ho(e)==="all",onPick:()=>d?.(e.seq,"all",0)},...b.map(ce=>({key:`group-${ce.seq}`,label:`\uBD80\uC11C\uACF5\uAC1C \xB7 ${ce.name}`,icon:(0,fe.jsx)(fd.default,{sx:{fontSize:17,color:"#d9730d"}}),selected:ho(e)==="group"&&(e.visibility_group_seq??0)===ce.seq,onPick:()=>d?.(e.seq,"group",ce.seq)}))].map(ce=>(0,fe.jsxs)(pt.MenuItem,{selected:ce.selected,onClick:()=>{ce.onPick(),Ut(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[ce.icon,ce.label,ce.selected?(0,fe.jsx)(ad.default,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},ce.key))}),(0,fe.jsx)(pt.Menu,{transitionDuration:0,anchorEl:Te,open:!!Te,onClose:()=>_t(null),children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...Ce.filter(ce=>`custom-${ce.group_seq}`===String(e.tab_key??"")).map(ce=>({seq:ce.seq,label:so(ce)}))].map(ce=>(0,fe.jsxs)(pt.MenuItem,{onClick:()=>{xe?.(e.seq,ce.seq),_t(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[ce.label,(e.sprint_seq??0)===ce.seq?(0,fe.jsx)(ad.default,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},ce.seq))}),(0,fe.jsx)(Fa,{anchorEl:lt?.anchorEl??null,open:!!lt?.open,acks:e.acks??[],total:Je?.total??Xe?.total??0,pendingNames:Je?.pendingNames??Xe?.pendingNames??[],avatarSrcByName:l,onRequestConfirm:Se&&(Je?Je.count<Je.total:Xe&&Xe.count<Xe.total)?()=>{Se(e.seq),Le(ce=>ce?{...ce,open:!1}:null)}:void 0,onClose:()=>Le(ce=>ce?{...ce,open:!1}:null)}),(0,fe.jsx)(ol,{anchorEl:De,selectedKeys:e.label_keys??[],labelOptions:g,onToggle:ce=>s(e.seq,wa(e.label_keys??[],ce)),onAddLabel:r,onClose:()=>He(null)}),(0,fe.jsx)(hi,{anchorEl:Jt,value:e.icon??"",color:e.icon_color??"",onSelect:ce=>{ie(e.seq,ce),Ue(null)},onSelectColor:ae?ce=>ae(e.seq,ce):void 0,onClose:()=>Ue(null)}),(0,fe.jsx)(Qt,{open:!!Lt,anchorEl:Lt,title:Bt?"\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:()=>{ke?.(e.seq),Ne(null)}})]})}var Wt=require("react/jsx-runtime");function x_(){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 v_({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=dr(),I=(0,Do.useRef)(null);f&&(I.current=f);let M=f??I.current,[z,O]=(0,Do.useState)(!1),[P,N]=(0,Do.useState)(null),[$,L]=(0,Do.useState)(null),{editPolicy:C}=ct(),S=!!b&&(m??(M?!Ii(M,r,C,!(r>0&&(M.author_account_seq??0)===r)):!1)),[D,p]=(0,Do.useState)({}),y=Object.keys(D).length>0;(0,Do.useEffect)(()=>{p({})},[f?.seq,e]);let v=(0,Do.useRef)(null);if((0,Do.useEffect)(()=>{v.current?.scrollTo({top:0})},[f?.seq]),!M)return null;let w=k&&y?{...M,...D}:M,_=w.checklist??[],T=(q,B)=>{k?p(E=>({...E,...q})):B()},R=()=>{let q=D;p({});let B=M.seq,E=q.title===void 0?void 0:String(q.title).trim();if(o){let j={...q};E!==void 0&&(E?j.title=E:delete j.title),Object.keys(j).length>0&&o(B,j),(0,hd.SuccessAlert)({message:"\uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",position:"center"});return}E&&n(B,E),q.icon!==void 0&&c(B,String(q.icon)),q.icon_color!==void 0&&i?.(B,String(q.icon_color)),q.status!==void 0&&x.onChangeStatus(B,q.status),q.label_keys!==void 0&&x.onChangeLabels(B,q.label_keys??[]),q.tab_key!==void 0&&x.onChangeProject(B,String(q.tab_key??"")),q.start_date!==void 0&&x.onChangeDate(B,"start_date",String(q.start_date??"")),q.due_date!==void 0&&x.onChangeDate(B,"due_date",String(q.due_date??"")),q.reminders!==void 0&&x.onChangeReminder(B,q.reminders),q.priority!==void 0&&x.onChangePriority(B,q.priority),q.event_time!==void 0&&x.onChangeEventTime?.(B,String(q.event_time??"")),q.event_place!==void 0&&x.onChangeEventPlace?.(B,String(q.event_place??"")),q.event_address!==void 0&&x.onChangeEventAddress?.(B,String(q.event_address??"")),q.content!==void 0&&x.onChangeContent(B,String(q.content??"")),q.note!==void 0&&x.onChangeNote(B,String(q.note??"")),q.visibility!==void 0&&x.onChangeVisibility?.(B,q.visibility,Number(q.visibility_group_seq??0)),(0,hd.SuccessAlert)({message:"\uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",position:"center"})},F={...x,onChangeStatus:(q,B)=>T({status:B},()=>x.onChangeStatus(q,B)),onChangeLabels:(q,B)=>T({label_keys:B},()=>x.onChangeLabels(q,B)),onChangeProject:(q,B)=>T({tab_key:B},()=>x.onChangeProject(q,B)),onChangeDate:(q,B,E)=>T({[B]:E},()=>x.onChangeDate(q,B,E)),onChangeReminder:(q,B)=>T({reminders:B},()=>x.onChangeReminder(q,B)),onChangePriority:(q,B)=>T({priority:B},()=>x.onChangePriority(q,B)),onChangeEventTime:(q,B)=>T({event_time:B},()=>x.onChangeEventTime?.(q,B)),onChangeEventPlace:(q,B)=>T({event_place:B},()=>x.onChangeEventPlace?.(q,B)),onChangeEventAddress:(q,B)=>T({event_address:B},()=>x.onChangeEventAddress?.(q,B)),onChangeContent:(q,B)=>T({content:B},()=>x.onChangeContent(q,B)),onChangeNote:(q,B)=>T({note:B},()=>x.onChangeNote(q,B)),onMemberEdit:(q,B)=>x.onMemberEdit(q,B,k?E=>p(j=>({...j,...E})):null),onChangeNoteDraft:k?(q,B)=>T({note:B},()=>{}):void 0,onChangeVisibility:x.onChangeVisibility?(q,B,E)=>T({visibility:B,visibility_group_seq:E},()=>x.onChangeVisibility?.(q,B,E)):void 0,onAddChecklistItem:(q,B)=>T({checklist:[..._,{label:B,checked:!1}]},()=>x.onAddChecklistItem(q,B)),onToggleChecklistItem:(q,B,E)=>T({checklist:_.map((j,U)=>U===B?{...j,checked:E}:j)},()=>x.onToggleChecklistItem(q,B,E)),onRemoveChecklistItem:(q,B)=>T({checklist:_.filter((E,j)=>j!==B)},()=>x.onRemoveChecklistItem(q,B)),onUpdateChecklistItem:x.onUpdateChecklistItem?(q,B,E)=>T({checklist:_.map((j,U)=>U===B?{...j,label:E}:j)},()=>x.onUpdateChecklistItem?.(q,B,E)):void 0,onReorderChecklist:x.onReorderChecklist?(q,B)=>T({checklist:B},()=>x.onReorderChecklist?.(q,B)):void 0,onLinkChecklistTask:x.onLinkChecklistTask?(q,B,E)=>T({checklist:[..._,{label:E,checked:!1,task_seq:B}]},()=>x.onLinkChecklistTask?.(q,B,E)):void 0},H=(0,Wt.jsx)(dd,{...F,task:w,myAccountSeq:r,onChangeTitle:(q,B)=>T({title:B},()=>n(q,B)),onToggleCompleted:t,onChangeIcon:(q,B)=>T({icon:B},()=>c(q,B)),onChangeIconColor:(q,B)=>T({icon_color:B},()=>i?.(q,B)),showTitle:k||s==="dialog"}),V=(0,Wt.jsx)(Qf,{onSubmit:(q,B)=>l(w.seq,q,B)},w.seq);return k||s==="dialog"?(0,Wt.jsxs)(Wt.Fragment,{children:[(0,Wt.jsx)(Fy.FormDialog,{open:e,onClose:g,locale:"ko",fontScale:{enabled:!0,default:1.1,min:.6},title:w.is_notice?"\uACF5\uC9C0\uC0AC\uD56D":w.is_event?"\uC77C\uC815":w.is_bug?"\uC624\uB958":"\uC5C5\uBB34",titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1},custom:[...k?[{raw:!0,icon:(0,Wt.jsx)(pr.Button,{variant:"contained",size:"small",disableElevation:!0,disabled:!y,onClick:y?R: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:(0,Wt.jsx)(pr.IconButton,{size:"small","aria-label":"\uB354\uBCF4\uAE30",onClick:q=>N(q.currentTarget),children:(0,Wt.jsx)(Py.default,{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:V},sx:{DialogContent:{borderBottom:"none"}},dialogActionSx:{padding:"0 !important","@media (max-width:1023.95px)":{padding:"0 !important"},borderTop:"1px solid #37352f","& .left-actions":{flex:1,width:"100%",minWidth:0,"& > *":{flex:1,minWidth:0}},"& .right-actions":{display:"none"}},sections:[{id:"task-detail",title:"",showTitle:!1,children:(0,Wt.jsx)(pr.Box,{sx:{userSelect:"none",width:"100%",minWidth:0,display:"flex",flexDirection:"column",gap:0},children:H})}]},M.seq),(0,Wt.jsxs)(pr.Menu,{open:!!P,anchorEl:P,onClose:()=>N(null),anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},sx:{zIndex:1500},children:[d?(0,Wt.jsxs)(pr.MenuItem,{onClick:()=>{N(null),O(!0)},children:[(0,Wt.jsx)(pr.ListItemIcon,{children:(0,Wt.jsx)(zy.default,{fontSize:"small"})}),(0,Wt.jsx)(pr.ListItemText,{children:"\uD65C\uB3D9"})]}):null,(0,Wt.jsxs)(pr.MenuItem,{onClick:()=>{N(null),ms(w,!0)},children:[(0,Wt.jsx)(pr.ListItemIcon,{children:(0,Wt.jsx)(Ly.default,{fontSize:"small"})}),(0,Wt.jsx)(pr.ListItemText,{children:"\uACF5\uC720\uD558\uAE30"})]}),S?(0,Wt.jsxs)(pr.MenuItem,{onClick:q=>{let B=P??q.currentTarget;N(null),L(B)},sx:{color:"#e5484d"},children:[(0,Wt.jsx)(pr.ListItemIcon,{children:(0,Wt.jsx)(Ny.default,{fontSize:"small",sx:{color:"#e5484d"}})}),(0,Wt.jsx)(pr.ListItemText,{children:"\uC0AD\uC81C"})]}):null]}),(0,Wt.jsx)(Qt,{open:!!$,anchorEl:$,title:"\uC774 \uC5C5\uBB34\uB97C \uD734\uC9C0\uD1B5\uC73C\uB85C \uBCF4\uB0B4\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uC0AD\uC81C",onCancel:()=>L(null),onConfirm:()=>{L(null),b?.(w)}}),(0,Wt.jsx)(ll,{open:z,taskSeq:w.seq,items:a,loading:h,onLoad:d,onClose:()=>O(!1)})]}):(0,Wt.jsx)(pr.Drawer,{anchor:"right",open:e,onClose:g,"aria-label":"\uC5C5\uBB34 \uC0C1\uC138",disableAutoFocus:!0,disableEnforceFocus:!0,sx:{zIndex:q=>q.zIndex.modal},slotProps:{paper:{sx:{width:720,maxWidth:"100vw"}}},children:(0,Wt.jsxs)(pr.Box,{sx:{display:"flex",flexDirection:"column",height:"100%",userSelect:"none"},children:[(0,Wt.jsx)(ed,{task:w,myAccountSeq:r,onToggleCompleted:t,onChangeTitle:n,onChangeIcon:c,onChangeIconColor:i,onClose:g,activityItems:a,activityLoading:h,onLoadActivity:d,onPrint:u,onDelete:b,canDelete:m}),(0,Wt.jsx)(pr.Divider,{sx:{borderColor:"#e6e6e3"}}),(0,Wt.jsx)(pr.Box,{sx:{flex:1,minHeight:0},children:(0,Wt.jsx)(jy.default,{ref:v,style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:H})}),(0,Wt.jsx)(pr.Divider,{sx:{borderColor:"#37352f"}}),(0,Wt.jsx)(pr.Box,{sx:{flexShrink:0},children:V})]})})}var vo=require("react"),Fr=require("@mui/material"),md=require("@ehfuse/mui-form-dialog"),Vy=Y(require("@mui/icons-material/Add"),1),Ky=Y(require("@mui/icons-material/DirectionsRunOutlined"),1),Gy=Y(require("@mui/icons-material/EditOutlined"),1),gd=require("@ehfuse/alerts"),yi=require("@ehfuse/mui-form-controls");var ul=require("react"),Vr=require("@mui/material"),qy=require("@ehfuse/mui-form-dialog"),$y=require("@ehfuse/mui-form-controls"),Hy=Y(require("@ehfuse/overlay-scrollbar"),1);var kr=require("react/jsx-runtime");function pd({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]=(0,ul.useState)("backlog"),[c,i]=(0,ul.useState)(0);(0,ul.useEffect)(()=>{e&&(n(r.length>0?"move":"backlog"),i(r[0]?.seq??0))},[e]);let a=g.length>0;return(0,kr.jsx)(qy.FormDialog,{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:(0,kr.jsx)(Vr.Button,{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:(0,kr.jsxs)(Vr.Box,{sx:{display:"flex",flexDirection:"column",gap:2},children:[(0,kr.jsxs)(Vr.Box,{sx:{fontSize:18,color:"#37352f"},children:[(0,kr.jsx)(Vr.Box,{component:"span",sx:{fontWeight:600},children:f?.name??""})," \uBAA9\uD45C\uB97C \uB9C8\uAC10\uD569\uB2C8\uB2E4."]}),a?(0,kr.jsxs)(kr.Fragment,{children:[(0,kr.jsxs)(Vr.Box,{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?"]}),(0,kr.jsx)(Vr.Box,{sx:{border:"1px solid #e6e6e3",borderRadius:1,overflow:"hidden"},children:(0,kr.jsx)(Hy.default,{style:{maxHeight:220},thumb:{width:6},children:g.map(h=>(0,kr.jsxs)(Vr.Box,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1,borderBottom:"1px solid #f2f2f0","&:last-of-type":{borderBottom:"none"}},children:[(0,kr.jsx)(Vr.Box,{sx:{flex:1,minWidth:0,fontSize:16,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:h.title}),(0,kr.jsx)(ir,{option:Xr(h)})]},h.seq))})}),(0,kr.jsxs)(Vr.RadioGroup,{value:t,onChange:(h,d)=>n(d),children:[r.length>0?(0,kr.jsx)(Vr.FormControlLabel,{value:"move",control:(0,kr.jsx)(Vr.Radio,{size:"small"}),label:"\uB2E4\uC74C \uBAA9\uD45C\uB85C \uC774\uC6D4",sx:{"& .MuiFormControlLabel-label":{fontSize:16}}}):null,t==="move"&&r.length>0?(0,kr.jsx)(Vr.Box,{sx:{pl:4,pb:1},children:(0,kr.jsx)($y.LabelSelect,{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,(0,kr.jsx)(Vr.FormControlLabel,{value:"backlog",control:(0,kr.jsx)(Vr.Radio,{size:"small"}),label:"\uBBF8\uBC30\uC815(\uBC31\uB85C\uADF8)\uC73C\uB85C \uBE7C\uAE30",sx:{"& .MuiFormControlLabel-label":{fontSize:16}}}),(0,kr.jsx)(Vr.FormControlLabel,{value:"keep",control:(0,kr.jsx)(Vr.Radio,{size:"small"}),label:"\uC774 \uBAA9\uD45C\uC5D0 \uADF8\uB300\uB85C \uB450\uAE30",sx:{"& .MuiFormControlLabel-label":{fontSize:16}}})]})]}):(0,kr.jsx)(Vr.Box,{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 Wc="custom-";function Wy(e){return e.startsWith(Wc)}function w_(e){return e>0?`${Wc}${e}`:""}function bi(e){if(!Wy(e))return 0;let f=Number(e.slice(Wc.length));return Number.isInteger(f)&&f>0?f:0}var At=require("react/jsx-runtime"),__=[{value:"planning",label:"\uACC4\uD68D\uC911"},{value:"active",label:"\uC9C4\uD589\uC911"},{value:"closed",label:"\uC885\uB8CC"}];function Uy(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?e.slice(5).replace("-","."):"-"}function k_({open:e,customTabs:f,sprints:g,onClose:l,onCreate:o,onUpdate:s,onChangeStatus:r,tasks:t=[],onCloseSprint:n,onRemove:c}){let i=f.filter(R=>R.useSprints&&!R.archived),[a,h]=(0,vo.useState)(""),[d,u]=(0,vo.useState)(""),[b,m]=(0,vo.useState)(""),[x,k]=(0,vo.useState)(""),[I,M]=(0,vo.useState)(""),[z,O]=(0,vo.useState)(!1),[P,N]=(0,vo.useState)(!1),[$,L]=(0,vo.useState)(null),C=$?t.filter(R=>(R.sprint_seq??0)===$.seq&&!R.completed):[],[S,D]=(0,vo.useState)(0);(0,vo.useEffect)(()=>{e&&(h(i.length===1?i[0].key:""),u(""),m(""),k(""),M(""),D(0))},[e]);let p=()=>{u(""),m(""),k(""),M(""),D(0),N(!1)},y=R=>{D(R.seq),h(`custom-${R.group_seq}`),u(R.name),m(R.goal),k(R.start_date),M(R.end_date)},v=S>0||P,w=async()=>{let R=bi(a);if(!R){(0,gd.ErrorAlert)("\uBAA9\uD45C\uB97C \uB9CC\uB4E4 \uD504\uB85C\uC81D\uD2B8\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return}if(!d.trim()){(0,gd.ErrorAlert)("\uBAA9\uD45C \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}O(!0);try{if(S>0){s(S,{name:d.trim(),goal:b.trim(),start_date:x,end_date:I}),p();return}await o({group_seq:R,name:d.trim(),goal:b.trim(),start_date:x,end_date:I})&&p()}finally{O(!1)}},_=new Map(f.map(R=>[bi(R.key),R.label])),T=(0,At.jsx)(Fr.Box,{children:i.length===0?(0,At.jsx)(Fr.Box,{sx:{py:2,fontSize:14,color:"#787774"},children:'\uBAA9\uD45C\uB97C \uC0AC\uC6A9\uD558\uB294 \uD504\uB85C\uC81D\uD2B8\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4. \uD504\uB85C\uC81D\uD2B8 \uC218\uC815\uC5D0\uC11C "\uBAA9\uD45C(\uC2A4\uD504\uB9B0\uD2B8) \uC0AC\uC6A9"\uC744 \uBA3C\uC800 \uCF1C\uC138\uC694.'}):(0,At.jsx)(At.Fragment,{children:(0,At.jsx)(Fr.Box,{children:g.length===0?(0,At.jsxs)(Fr.Box,{sx:{py:4,display:"flex",flexDirection:"column",alignItems:"center",gap:2,color:"#9a9a97"},children:[(0,At.jsx)(Ky.default,{sx:{fontSize:48,color:"#d9d9d6"}}),(0,At.jsx)(Fr.Box,{sx:{fontSize:13.5},children:"\uB4F1\uB85D\uB41C \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."})]}):g.map(R=>(0,At.jsxs)(Fr.Box,{sx:{display:"flex",flexDirection:"column",gap:1,"&:not(:last-of-type)::after":{content:'""',display:"block",my:1.75,borderBottom:"1px solid #f0efed"}},children:[(0,At.jsxs)(Fr.Box,{sx:{minWidth:0},children:[(0,At.jsxs)(Fr.Box,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[(0,At.jsx)(Fr.Box,{component:"span",sx:{fontSize:18,fontWeight:600,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},children:R.name}),(0,At.jsx)(Fr.Box,{component:"span",sx:{flexShrink:0,px:1,py:.25,borderRadius:.75,bgcolor:"#f1f5f9",color:"#64748b",fontSize:13,fontWeight:500},children:_.get(R.group_seq)??"\uC0AD\uC81C\uB41C \uD504\uB85C\uC81D\uD2B8"}),(0,At.jsxs)(Fr.Box,{component:"span",sx:{flexShrink:0,fontSize:14,color:"#57564f"},children:[Uy(R.start_date)," ~"," ",Uy(R.end_date)]})]}),R.goal?(0,At.jsx)(Fr.Box,{sx:{mt:.5,fontSize:14,color:"#787774",lineHeight:1.5},children:R.goal}):null]}),(0,At.jsxs)(Fr.Box,{sx:{display:"flex",alignItems:"center",gap:.5},children:[(0,At.jsx)(yi.LabelSelect,{label:"\uC0C1\uD0DC",showLabel:!1,size:"small",value:R.status,options:__.map(F=>({value:F.value,label:F.label})),onChange:F=>{let H=String(F.target.value);if(H==="closed"&&n){L(R);return}r(R.seq,H)},sx:{width:104,flexShrink:0}}),(0,At.jsx)(Fr.IconButton,{"aria-label":"\uBAA9\uD45C \uC218\uC815",onClick:()=>y(R),sx:{color:"#9a9a97","&:hover":{color:"#2563eb"}},children:(0,At.jsx)(Gy.default,{sx:{fontSize:18}})}),(0,At.jsx)(Fr.IconButton,{"aria-label":"\uBAA9\uD45C \uC0AD\uC81C",onClick:()=>c(R.seq),sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:(0,At.jsx)(gn,{style:{width:16,height:16}})})]})]},R.seq))})})});return(0,At.jsxs)(At.Fragment,{children:[(0,At.jsx)(md.FormDialog,{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:T}],sectionContentPaddingTop:0,actions:{showCancelButton:!0,left:i.length>0?(0,At.jsx)(Fr.Button,{startIcon:(0,At.jsx)(Vy.default,{}),onClick:()=>{p(),N(!0)},sx:{color:"#2563eb"},children:"\uC0C8 \uBAA9\uD45C"}):void 0,right:(0,At.jsx)(Fr.Button,{variant:"contained",onClick:l,children:"\uD655\uC778"})}}),(0,At.jsx)(pd,{open:$!==null,sprint:$,remainingTasks:C,sprints:g,onClose:()=>L(null),onConfirm:R=>{$&&n?.($.seq,R),L(null)}}),(0,At.jsx)(md.FormDialog,{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:(0,At.jsx)(Fr.Box,{sx:{pt:1},children:(0,At.jsxs)(Fr.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2.5,mt:1},children:[(0,At.jsx)(yi.LabelSelect,{label:"\uD504\uB85C\uC81D\uD2B8",size:"medium",value:a,options:i.map(R=>({value:R.key,label:R.label})),onChange:R=>h(String(R.target.value)),disabled:S>0}),(0,At.jsx)(yi.ClearTextField,{label:"\uBAA9\uD45C \uC774\uB984",size:"medium",placeholder:"\uC608: 8\uC6D4 2\uC8FC\uCC28",value:d,onChange:R=>u(R.target.value)}),(0,At.jsx)(yi.DateTextField,{size:"medium",label:"\uC2DC\uC791\uC77C",value:x,onChange:R=>k(R.target.value)}),(0,At.jsx)(yi.DateTextField,{size:"medium",label:"\uC885\uB8CC\uC77C",value:I,onChange:R=>M(R.target.value)}),(0,At.jsx)(yi.ClearTextField,{label:"\uC124\uBA85",size:"medium",placeholder:"\uC120\uD0DD \uC785\uB825",value:b,onChange:R=>m(R.target.value),sx:{gridColumn:"1 / -1"}})]})})}],actions:{showCancelButton:!0,right:(0,At.jsx)(Fr.Button,{variant:"contained",onClick:()=>{w()},disabled:z,children:S>0?"\uC218\uC815":"\uBAA9\uD45C \uB9CC\uB4E4\uAE30"})}})]})}var Yt=require("@mui/material"),Xy=require("@ehfuse/mui-form-dialog"),Zy=Y(require("@mui/icons-material/LinkOutlined"),1),Jy=Y(require("@mui/icons-material/LinkOffOutlined"),1),Qy=Y(require("@mui/icons-material/SyncOutlined"),1),ex=Y(require("@mui/icons-material/ArrowForward"),1);var xt=require("react/jsx-runtime");function Yy({from:e,to:f}){return(0,xt.jsxs)(Yt.Box,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:.5},children:[e,(0,xt.jsx)(ex.default,{sx:{fontSize:16,color:"#787774"}}),f]})}function S_({size:e=28}){return(0,xt.jsxs)(Yt.Box,{component:"svg",viewBox:"0 0 48 48","aria-hidden":!0,sx:{width:e,height:e,flexShrink:0,mx:1},children:[(0,xt.jsx)("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"}),(0,xt.jsx)("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"}),(0,xt.jsx)("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"}),(0,xt.jsx)("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 T_({open:e,googleApi:f,onClose:g}){let{status:l,busy:o}=f,{calendarName:s}=ct(),r=l.linked&&l.calendar_name||s||"\uC5C5\uBB34\uD568",t=(0,xt.jsxs)(Yt.Box,{sx:{display:"flex",flexDirection:"column",gap:"24px"},children:[(0,xt.jsxs)(Yt.Box,{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:[(0,xt.jsx)(Yt.Box,{children:(0,xt.jsxs)(Yt.Box,{component:"span",children:[(0,xt.jsx)("b",{children:"\uB0B4\uBCF4\uB0B4\uAE30"}),"\uB294 \uB0B4 \uC5C5\uBB34\uB97C \uAD6C\uAE00 \uCE98\uB9B0\uB354\uC758"," ",(0,xt.jsxs)("b",{children:['"',r,'"']})," \uCE98\uB9B0\uB354\uC5D0 \uBC14\uB85C \uBC18\uC601\uD569\uB2C8\uB2E4."]})}),(0,xt.jsx)(Yt.Box,{children:(0,xt.jsxs)(Yt.Box,{component:"span",children:[(0,xt.jsx)("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."]})}),(0,xt.jsx)(Yt.Box,{children:(0,xt.jsxs)(Yt.Box,{component:"span",children:['"',r,'" \uCE98\uB9B0\uB354 \uC77C\uC815\uC740 \uC5C5\uBB34\uD568\uC5D0\uC11C \uC218\uC815\uD574\uC57C \uD569\uB2C8\uB2E4.']})})]}),l.configured?(0,xt.jsxs)(Yt.Box,{sx:{border:"1px solid #e6e6e3",borderRadius:1,pl:2,pr:3,py:1.75,display:"flex",flexDirection:"column",gap:1.25},children:[(0,xt.jsxs)(Yt.Box,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[(0,xt.jsx)(S_,{}),(0,xt.jsxs)(Yt.Box,{sx:{flex:1,minWidth:0},children:[(0,xt.jsx)(Yt.Box,{sx:{fontSize:18,color:"#111",fontWeight:700},children:"\uAD6C\uAE00 \uACC4\uC815 \uC5F0\uACB0"}),(0,xt.jsx)(Yt.Box,{sx:{fontSize:15,color:"#111",mt:.5,lineHeight:1.6},children:l.linked?(0,xt.jsxs)(xt.Fragment,{children:[(0,xt.jsxs)(Yt.Box,{component:"span",sx:{display:"block",fontWeight:600},children:[l.google_email||"\uAD6C\uAE00 \uACC4\uC815"," ","\uC5D0 \uC5F0\uACB0\uB428"]}),(0,xt.jsxs)(Yt.Box,{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?(0,xt.jsxs)(Yt.Box,{sx:{fontSize:13,color:"#c62828",mt:.5},children:["\uCD5C\uADFC \uC624\uB958: ",l.last_error]}):null]}),l.linked?(0,xt.jsx)(Yt.Button,{size:"small",variant:"outlined",color:"inherit",disabled:o,startIcon:(0,xt.jsx)(Jy.default,{sx:{fontSize:18}}),onClick:f.onDisconnect,sx:{flexShrink:0,whiteSpace:"nowrap",ml:2},children:"\uC5F0\uACB0 \uD574\uC81C"}):(0,xt.jsx)(Yt.Button,{size:"small",variant:"contained",disableElevation:!0,disabled:o,startIcon:(0,xt.jsx)(Zy.default,{sx:{fontSize:18}}),onClick:f.onConnect,sx:{flexShrink:0,whiteSpace:"nowrap",bgcolor:"#2563eb",ml:2},children:"\uC5F0\uACB0\uD558\uAE30"})]}),l.linked?(0,xt.jsxs)(Yt.Box,{sx:{display:"flex",alignItems:"center",gap:2,flexWrap:"wrap",pl:4.5},children:[(0,xt.jsx)(Yt.FormControlLabel,{control:(0,xt.jsx)(Yt.Switch,{size:"small",checked:l.export_enabled,disabled:o,onChange:(n,c)=>f.onToggleExport(c)}),label:(0,xt.jsxs)(Yt.Box,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:.5},children:["\uB0B4\uBCF4\uB0B4\uAE30 (",(0,xt.jsx)(Yy,{from:"\uC5C5\uBB34\uD568",to:"\uAD6C\uAE00"}),")"]}),sx:{m:0,"& .MuiFormControlLabel-label":{fontSize:14,color:"#37352f"}}}),(0,xt.jsx)(Yt.FormControlLabel,{control:(0,xt.jsx)(Yt.Switch,{size:"small",checked:l.import_enabled,disabled:o,onChange:(n,c)=>f.onToggleImport(c)}),label:(0,xt.jsxs)(Yt.Box,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:.5},children:["\uAC00\uC838\uC624\uAE30 (",(0,xt.jsx)(Yy,{from:"\uAD6C\uAE00",to:"\uC5C5\uBB34\uD568"}),")"]}),sx:{m:0,"& .MuiFormControlLabel-label":{fontSize:14,color:"#37352f"}}}),f.onResync?(0,xt.jsx)(Yt.Button,{size:"small",color:"inherit",disabled:o||!l.export_enabled,startIcon:(0,xt.jsx)(Qy.default,{sx:{fontSize:18}}),onClick:f.onResync,sx:{ml:"auto",whiteSpace:"nowrap"},children:"\uC804\uCCB4 \uB2E4\uC2DC \uB0B4\uBCF4\uB0B4\uAE30"}):null]}):null]}):(0,xt.jsx)(Yt.Box,{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(0,xt.jsx)(Xy.FormDialog,{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:(0,xt.jsx)(Yt.Button,{variant:"contained",onClick:g,sx:{minWidth:80},children:"\uB2EB\uAE30"})}})}var Xo=require("react"),Zo=require("@mui/material"),tx=require("@ehfuse/mui-form-dialog"),rx=require("@ehfuse/mui-form-controls"),nx=require("@ehfuse/tree-view");var An=require("react/jsx-runtime");function ox(e){return`${e.name}#${e.seq}`}function C_(e){return Number(e.slice(e.lastIndexOf("#")+1))||0}function B_(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 I_(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 E_(e){let f=[[e.name,e.role_name].filter(Boolean).join(" "),e.department].filter(Boolean).join(" / ");return{id:`emp:${e.seq}`,label:ox(e),renderLabel:(0,An.jsx)(Zo.Box,{component:"span",sx:{display:"inline-flex",alignItems:"baseline",gap:.75},children:(0,An.jsx)(Zo.Box,{component:"span",sx:{fontWeight:400,color:"text.primary"},children:f})})}}function ix(e,f){let g=(e.groups??[]).map(o=>ix(o,f)).filter(o=>o!==null),l=(e.employees??[]).filter(o=>I_(o,f)).map(E_);return g.length===0&&l.length===0?null:{id:`group:${e.key}`,label:e.name,children:[...g,...l]}}function M_({groups:e,allEmployees:f,initialSelectedSeqs:g,multiple:l,isMobile:o,onSelectionChange:s}){let[r,t]=(0,Xo.useState)(""),n=(0,Xo.useMemo)(()=>e.map(i=>ix(i,r.trim().toLowerCase())).filter(i=>i!==null),[e,r]),c=(0,Xo.useMemo)(()=>f.filter(i=>g.includes(i.seq)).map(ox),[]);return(0,An.jsxs)(An.Fragment,{children:[(0,An.jsx)(Zo.Box,{sx:{px:1.5,py:1,borderBottom:"1px solid #cccccc",flexShrink:0},children:(0,An.jsx)(rx.SearchTextField,{size:"small",fullWidth:!0,placeholder:"\uC774\uB984, \uBD80\uC11C \uAC80\uC0C9",onSearch:t,onClear:()=>t(""),sx:{"& .MuiOutlinedInput-notchedOutline":{border:"none"},"& .MuiInputBase-root":{px:0}}})}),(0,An.jsx)(Zo.Box,{sx:o?{display:"flex",flexDirection:"column"}:{flex:1,minHeight:0,overflow:"hidden",display:"flex",flexDirection:"column"},children:(0,An.jsx)(nx.TreeView,{items:n,checkbox:!0,multiSelect:l,selectionMode:"child",showSearch:!1,defaultExpanded:!0,initialSelections:c,onChange:i=>s(i.map(C_).filter(a=>a>0)),styles:{border:"none",borderRadius:"0"}})})]})}function R_({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=dr(),[i,a]=(0,Xo.useState)([]),[h,d]=(0,Xo.useState)(0),u=(0,Xo.useMemo)(()=>B_(l),[l]),b=s??[];(0,Xo.useEffect)(()=>{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(0,An.jsx)(tx.FormDialog,{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:(0,An.jsx)(Zo.Box,{sx:{...c?{}:{height:560},display:"flex",flexDirection:"column",border:"1px solid #cccccc",borderRadius:1,...c?{}:{overflow:"hidden"},userSelect:"none"},children:(0,An.jsx)(M_,{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?(0,An.jsx)(Zo.Typography,{variant:"body2",color:"text.secondary",sx:{whiteSpace:"pre-line",lineHeight:1.35},children:g}):void 0,right:(0,An.jsx)(Zo.Button,{variant:"contained",onClick:m,children:r})}})}var Lo=require("react"),co=require("@mui/material"),Mx=require("@ehfuse/mui-form-dialog"),Zc=require("@ehfuse/mui-form-controls"),Rx=Y(require("@mui/icons-material/SpeedOutlined"),1);var Uc=require("react"),_n=require("@mui/material"),sx=require("@ehfuse/mui-form-dialog"),fl=require("@ehfuse/mui-form-controls"),ax=Y(require("@ehfuse/overlay-scrollbar"),1);var Kr=require("react/jsx-runtime"),O_=[{value:"count",label:"\uBBF8\uC644\uB8CC \uAC74\uC218"},{value:"points",label:"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8"}];function bd({open:e,capacity:f,employees:g,onClose:l,onSave:o}){let[s,r]=(0,Uc.useState)(f??jo);(0,Uc.useEffect)(()=>{e&&r(f??jo)},[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(0,Kr.jsx)(sx.FormDialog,{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:(0,Kr.jsx)(_n.Button,{variant:"contained",onClick:()=>{o(s)},children:"\uC800\uC7A5"})},sectionContentPaddingTop:0,sections:[{id:"capacity",title:"",showTitle:!1,children:(0,Kr.jsxs)(_n.Box,{sx:{display:"flex",flexDirection:"column",gap:2},children:[(0,Kr.jsx)(_n.Box,{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."}),(0,Kr.jsxs)(_n.Box,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[(0,Kr.jsx)(_n.Box,{sx:{width:104,flexShrink:0,fontSize:16,color:"#37352f"},children:"\uC138\uB294 \uB2E8\uC704"}),(0,Kr.jsx)(fl.LabelSelect,{size:"medium",fullWidth:!0,label:"",value:s.basis,options:O_,onChange:c=>r(i=>({...i,basis:c.target.value}))})]}),(0,Kr.jsxs)(_n.Box,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[(0,Kr.jsx)(_n.Box,{sx:{width:104,flexShrink:0,fontSize:16,color:"#37352f"},children:"\uAE30\uBCF8 \uC6A9\uB7C9"}),(0,Kr.jsx)(fl.NumberField,{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))}))})]}),(0,Kr.jsx)(_n.Box,{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`}),(0,Kr.jsx)(_n.Box,{sx:{fontSize:16,fontWeight:700,color:"#37352f"},children:"\uC0AC\uB78C\uBCC4 \uC608\uC678"}),g.length===0?(0,Kr.jsx)(_n.Box,{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."}):(0,Kr.jsx)(_n.Box,{sx:{border:"1px solid #e6e6e3",borderRadius:1,overflow:"hidden"},children:(0,Kr.jsx)(ax.default,{style:{maxHeight:260},thumb:{width:6},children:g.filter(c=>Number(c.account_seq)>0).map(c=>(0,Kr.jsxs)(_n.Box,{sx:{display:"flex",alignItems:"center",gap:1.5,px:2,py:1,borderBottom:"1px solid #f2f2f0","&:last-of-type":{borderBottom:"none"}},children:[(0,Kr.jsxs)(_n.Box,{sx:{flex:1,minWidth:0,fontSize:16,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[c.name,c.department?(0,Kr.jsx)(_n.Box,{component:"span",sx:{ml:1,fontSize:14,color:"#787774"},children:c.department}):null]}),(0,Kr.jsx)(_n.Box,{sx:{width:132,flexShrink:0},children:(0,Kr.jsx)(fl.NumberField,{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))})})]})}]})}var pl=require("@mui/material"),xn=require("recharts");var lx=require("@mui/material"),cx=require("react/jsx-runtime");function Dn({text:e,height:f}){return(0,cx.jsx)(lx.Box,{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})}var ux=require("react"),Vc="#2f80ed",fx="#a9c9f5",bs="#9a9a97",yd="#2e9e6b",Jo="#3d7eff",xd="#c3c8ce",dl="#f2a30f",hl={contentStyle:{fontSize:13.5,color:"#37352f",border:"1px solid #e6e6e3",borderRadius:6},labelStyle:{fontSize:13.5,color:"#37352f",fontWeight:700},itemStyle:{fontSize:13.5}},ra={...hl,cursor:!1},na={wrapperStyle:{fontSize:13.5,paddingTop:10},formatter:e=>(0,ux.createElement)("span",{style:{paddingRight:14,color:"#37352f"}},e)};function an(e){return{display:"flex",flexDirection:"column",minHeight:0,position:"relative",...typeof e=="string"?{flex:1}:{}}}var Pn={flexShrink:0,mb:1.5,display:"flex",alignItems:"center",gap:2,flexWrap:"wrap"};function Qo(e){return{"& *":{outline:"none"},userSelect:"none",...typeof e=="number"?{height:e,flexShrink:0}:{flex:1,minHeight:0}}}var yn=require("react/jsx-runtime");function A_(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 vd({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,...A_(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?(0,yn.jsx)(Dn,{text:"\uD45C\uC2DC\uD560 \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",height:g}):(0,yn.jsxs)(pl.Box,{sx:an(g),children:[(0,yn.jsxs)(pl.Box,{sx:{flexShrink:0,mb:1,display:"flex",justifyContent:"space-between",flexWrap:"wrap",gap:1,fontSize:14,color:"#000"},children:[(0,yn.jsxs)("span",{children:["\uC644\uB8CC ",s?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uBAA9\uD45C\uBCC4"]}),n!==null?(0,yn.jsxs)("span",{children:["\uD3C9\uADE0(\uC885\uB8CC \uBAA9\uD45C)"," ",(0,yn.jsx)(pl.Box,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:n}),r]}):null]}),(0,yn.jsx)(pl.Box,{sx:Qo(g),children:(0,yn.jsx)(xn.ResponsiveContainer,{width:"100%",height:"100%",children:(0,yn.jsxs)(xn.BarChart,{data:c,margin:{top:8,right:12,left:0,bottom:0},barCategoryGap:"28%",children:[(0,yn.jsx)(xn.CartesianGrid,{strokeDasharray:"3 3",stroke:"#e6e6e3"}),(0,yn.jsx)(xn.XAxis,{dataKey:"\uBAA9\uD45C",tick:{fontSize:13},tickMargin:6,interval:0}),(0,yn.jsx)(xn.YAxis,{tick:{fontSize:13},width:40,allowDecimals:!1}),(0,yn.jsx)(xn.Tooltip,{...ra,formatter:i=>`${Number(i??0)}${r}`}),n!==null?(0,yn.jsx)(xn.ReferenceLine,{y:n,stroke:bs,strokeDasharray:"6 5",label:{value:`\uD3C9\uADE0 ${n}${r}`,position:"right",fontSize:13}}):null,(0,yn.jsx)(xn.Bar,{dataKey:"\uC644\uB8CC",radius:[4,4,0,0],children:c.map(i=>(0,yn.jsx)(xn.Cell,{fill:i.closed?Vc:fx},i.\uBAA9\uD45C))})]})})})]})}var hx=require("react"),Po=require("@mui/material"),qn=require("recharts");var Pr=require("react/jsx-runtime");function dx(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?new Date(`${e}T00:00:00`):null}function D_(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function P_(e){return e.slice(5).replace("-",".")}function wd({sprint:e,tasks:f,todayStr:g,height:l=200,headerLeft:o}){let s=(0,hx.useMemo)(()=>{let a=dx(e.start_date),h=dx(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),$=/^\d{4}-\d{2}-\d{2}$/.test(N)?N:e.start_date;k.set($,(k.get($)??0)+m(P))}let I=[];for(let P=new Date(a);P<=h;P.setDate(P.getDate()+1))I.push(D_(P));let M=x,z=x;return{empty:!1,data:I.map((P,N)=>{let $=I.length===1?0:x*(1-N/(I.length-1));return P<=g&&(M-=k.get(P)??0,z=Math.max(0,M)),{\uB0A0\uC9DC:P_(P),\uC774\uC0C1:Math.round($*10)/10,\uB0A8\uC740\uB7C9:P<=g?Math.max(0,M):null}}),total:x,usePoints:b,last:z}},[e,f,g]);if(!s)return(0,Pr.jsxs)(Po.Box,{sx:an(l),children:[o?(0,Pr.jsx)(Po.Box,{sx:Pn,children:o}):null,(0,Pr.jsx)(Dn,{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(0,Pr.jsxs)(Po.Box,{sx:an(l),children:[o?(0,Pr.jsx)(Po.Box,{sx:Pn,children:o}):null,(0,Pr.jsx)(Dn,{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(0,Pr.jsxs)(Po.Box,{sx:an(l),children:[(0,Pr.jsxs)(Po.Box,{sx:Pn,children:[o?(0,Pr.jsx)(Po.Box,{sx:{flexShrink:0},children:o}):null,(0,Pr.jsxs)(Po.Box,{sx:{flex:1,minWidth:220,display:"flex",justifyContent:"space-between",flexWrap:"wrap",gap:1,fontSize:14,color:"#000"},children:[(0,Pr.jsxs)("span",{children:["\uB0A8\uC740 ",n?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uCD1D ",t]}),(0,Pr.jsxs)("span",{children:["\uD604\uC7AC"," ",(0,Pr.jsx)(Po.Box,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:c}),i," \uB0A8\uC74C"]})]})]}),(0,Pr.jsx)(Po.Box,{sx:Qo(l),children:(0,Pr.jsx)(qn.ResponsiveContainer,{width:"100%",height:"100%",children:(0,Pr.jsxs)(qn.LineChart,{data:r,margin:{top:8,right:12,left:0,bottom:0},children:[(0,Pr.jsx)(qn.CartesianGrid,{strokeDasharray:"3 3",stroke:"#e6e6e3"}),(0,Pr.jsx)(qn.XAxis,{dataKey:"\uB0A0\uC9DC",tick:{fontSize:13},tickMargin:6,minTickGap:24}),(0,Pr.jsx)(qn.YAxis,{tick:{fontSize:13},width:40,allowDecimals:!1}),(0,Pr.jsx)(qn.Tooltip,{...hl,formatter:a=>`${Number(a??0)}${i}`}),(0,Pr.jsx)(qn.Line,{type:"linear",dataKey:"\uC774\uC0C1",stroke:bs,strokeDasharray:"6 5",strokeWidth:1.5,dot:!1}),(0,Pr.jsx)(qn.Line,{type:"monotone",dataKey:"\uB0A8\uC740\uB7C9",stroke:Vc,strokeWidth:2.5,dot:!1,connectNulls:!1})]})})})]})}var Cd=require("react"),No=require("@mui/material"),vn=require("recharts");function ei(e){let f=g=>String(g).padStart(2,"0");return`${e.getFullYear()}-${f(e.getMonth()+1)}-${f(e.getDate())}`}function ml(e,f=new Date){let g=new Date(f);return g.setMonth(g.getMonth()-e),g}function N_(e=new Date){return{fromDate:ei(ml(1,e)),toDate:ei(e)}}var _d=864e5,gl=[0,1,2,3,5,8,13,21];function kd(e){return!e.archived&&!e.linked_only&&!e.is_notice&&!e.is_event}function Kc(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 oa(e){let f=String(e??"").trim();return/^\d{4}-\d{2}-\d{2}/.test(f)?f.slice(0,10):""}function L_(e){let f=oa(e.created_time)||oa(e.start_date)||oa(e.completed_time);if(!f)return null;let g=oa(e.start_date),l=g&&g>f?g:f,o=e.completed?oa(e.completed_time)||f:"";return{created:f,started:l,done:o}}function gx(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(ei(new Date(g.getTime()-s*_d)));return o}function Sd(e,f,g){let l=gx(f,g),o=e.filter(kd).map(L_).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 z_(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 px(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(z_(f,.85))}}function mx(e){for(let f=gl.length-1;f>=0;f-=1)if(e>=gl[f])return f;return 0}function j_(){return gl.map((e,f)=>f===gl.length-1?`${e}\uC77C+`:`${e}~${gl[f+1]}\uC77C`)}function Td(e,f,g){let l=gx(f,g),o=l[0],s=l[l.length-1],r=j_(),t=r.map(()=>0),n=r.map(()=>0),c=[],i=[];for(let a of e){if(!kd(a)||!a.completed)continue;let h=oa(a.completed_time);if(!h||h<o||h>s)continue;let d=Kc(a.completed_time),u=Kc(a.created_time);if(d===null||u===null)continue;let b=Math.max(0,(d-u)/_d);c.push(b),t[mx(b)]+=1;let m=Kc(a.start_date);if(m===null||m>d)continue;let x=Math.max(0,(d-Math.max(m,u))/_d);i.push(x),n[mx(x)]+=1}return{labels:r,leadCounts:t,cycleCounts:n,lead:px(c),cycle:px(i)}}var Mr=require("react/jsx-runtime");function F_(e){return e.slice(5).replace("-",".")}function Bd({tasks:e,todayStr:f,days:g=30,height:l=220,headerLeft:o}){let s=(0,Cd.useMemo)(()=>Sd(e,g,f),[e,g,f]),r=(0,Cd.useMemo)(()=>s.points.map(n=>({\uB0A0\uC9DC:F_(n.day),\uC644\uB8CC:n.done,\uC9C4\uD589:n.inProgress,\uB300\uAE30:n.waiting})),[s]),t=(0,Mr.jsxs)(No.Box,{sx:Pn,children:[o?(0,Mr.jsx)(No.Box,{sx:{flexShrink:0},children:o}):null,(0,Mr.jsxs)(No.Box,{sx:{flex:1,minWidth:220,display:"flex",flexDirection:"column",gap:.5},children:[(0,Mr.jsxs)(No.Box,{sx:{display:"flex",justifyContent:"space-between",flexWrap:"wrap",gap:1,fontSize:14,color:"#000"},children:[(0,Mr.jsxs)("span",{children:["\uCD5C\uADFC ",s.points.length,"\uC77C \u2014 \uC811\uC218 ",s.currentTotal,"\uAC74 / \uC644\uB8CC ",s.currentDone,"\uAC74"]}),(0,Mr.jsxs)("span",{children:["\uC9C4\uD589 \uC911"," ",(0,Mr.jsx)(No.Box,{component:"span",sx:{color:Jo,fontWeight:700},children:s.currentWip}),"\uAC74"]})]}),(0,Mr.jsx)(No.Box,{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?(0,Mr.jsxs)(No.Box,{sx:an(l),children:[o?(0,Mr.jsx)(No.Box,{sx:Pn,children:o}):null,(0,Mr.jsx)(Dn,{text:"\uC774 \uAE30\uAC04\uC5D0 \uC811\uC218\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",height:l})]}):(0,Mr.jsxs)(No.Box,{sx:an(l),children:[t,(0,Mr.jsx)(No.Box,{sx:Qo(l),children:(0,Mr.jsx)(vn.ResponsiveContainer,{width:"100%",height:"100%",children:(0,Mr.jsxs)(vn.AreaChart,{data:r,margin:{top:8,right:12,left:0,bottom:4},children:[(0,Mr.jsx)(vn.CartesianGrid,{strokeDasharray:"3 3",stroke:"#e6e6e3"}),(0,Mr.jsx)(vn.XAxis,{dataKey:"\uB0A0\uC9DC",tick:{fontSize:13},tickMargin:6,minTickGap:24}),(0,Mr.jsx)(vn.YAxis,{tick:{fontSize:13},width:40,allowDecimals:!1}),(0,Mr.jsx)(vn.Tooltip,{...hl,formatter:n=>`${Number(n??0)}\uAC74`}),(0,Mr.jsx)(vn.Legend,{...na}),(0,Mr.jsx)(vn.Area,{type:"monotone",dataKey:"\uC644\uB8CC",stackId:"flow",stroke:yd,fill:yd,fillOpacity:.9}),(0,Mr.jsx)(vn.Area,{type:"monotone",dataKey:"\uC9C4\uD589",stackId:"flow",stroke:Jo,fill:Jo,fillOpacity:.85}),(0,Mr.jsx)(vn.Area,{type:"monotone",dataKey:"\uB300\uAE30",stackId:"flow",stroke:xd,fill:xd,fillOpacity:.9})]})})})]})}var Id=require("react"),$n=require("@mui/material"),kn=require("recharts");var rr=require("react/jsx-runtime");function bx({label:e,color:f,summary:g}){let l=(0,rr.jsxs)($n.Box,{sx:{display:"flex",alignItems:"center",gap:.75},children:[(0,rr.jsx)($n.Box,{sx:{width:10,height:10,borderRadius:.5,bgcolor:f,flexShrink:0}}),(0,rr.jsx)($n.Box,{component:"span",sx:{fontWeight:700,color:"#37352f"},children:e})]});return g?(0,rr.jsxs)($n.Box,{sx:{display:"contents"},children:[l,(0,rr.jsxs)("span",{children:[g.count,"\uAC74"]}),(0,rr.jsxs)("span",{children:["\uC911\uC559\uAC12"," ",(0,rr.jsx)($n.Box,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:g.median}),"\uC77C"]}),(0,rr.jsxs)("span",{children:["\uD3C9\uADE0 ",g.average,"\uC77C"]}),(0,rr.jsxs)("span",{children:["85% ",g.p85,"\uC77C \uC774\uB0B4"]})]}):(0,rr.jsxs)($n.Box,{sx:{display:"contents"},children:[l,(0,rr.jsx)($n.Box,{component:"span",sx:{gridColumn:"span 4",color:"#9a9a97"},children:"\uD45C\uBCF8 \uC5C6\uC74C"})]})}function Ed({tasks:e,todayStr:f,days:g=30,height:l=200,headerLeft:o}){let s=(0,Id.useMemo)(()=>Td(e,g,f),[e,g,f]),r=(0,Id.useMemo)(()=>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?(0,rr.jsxs)($n.Box,{sx:an(l),children:[(0,rr.jsxs)($n.Box,{sx:Pn,children:[o?(0,rr.jsx)($n.Box,{sx:{flexShrink:0},children:o}):null,(0,rr.jsxs)($n.Box,{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:[(0,rr.jsx)(bx,{label:"\uB9AC\uB4DC\uD0C0\uC784(\uC791\uC131\u2192\uC644\uB8CC)",color:Jo,summary:s.lead}),(0,rr.jsx)(bx,{label:"\uC0AC\uC774\uD074\uD0C0\uC784(\uC2DC\uC791\u2192\uC644\uB8CC)",color:dl,summary:s.cycle})]})]}),(0,rr.jsx)($n.Box,{sx:Qo(l),children:(0,rr.jsx)(kn.ResponsiveContainer,{width:"100%",height:"100%",children:(0,rr.jsxs)(kn.BarChart,{data:r,margin:{top:8,right:12,left:0,bottom:4},barCategoryGap:"24%",children:[(0,rr.jsx)(kn.CartesianGrid,{strokeDasharray:"3 3",stroke:"#e6e6e3"}),(0,rr.jsx)(kn.XAxis,{dataKey:"\uAD6C\uAC04",tick:{fontSize:13},tickMargin:6,interval:0}),(0,rr.jsx)(kn.YAxis,{tick:{fontSize:13},width:40,allowDecimals:!1}),(0,rr.jsx)(kn.Tooltip,{...ra,formatter:t=>`${Number(t??0)}\uAC74`}),(0,rr.jsx)(kn.Legend,{...na}),(0,rr.jsx)(kn.Bar,{dataKey:"\uB9AC\uB4DC\uD0C0\uC784",fill:Jo,radius:[3,3,0,0]}),(0,rr.jsx)(kn.Bar,{dataKey:"\uC0AC\uC774\uD074\uD0C0\uC784",fill:dl,radius:[3,3,0,0]})]})})})]}):(0,rr.jsxs)($n.Box,{sx:an(l),children:[o?(0,rr.jsx)($n.Box,{sx:Pn,children:o}):null,(0,rr.jsx)(Dn,{text:"\uC774 \uAE30\uAC04\uC5D0 \uC644\uB8CC\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",height:l})]})}var Dd=require("react"),qi=require("@mui/material"),qr=require("recharts");function q_(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 $_(e,f,g){let l=String(e.due_date??"").slice(0,10),o=q_(f,l);return o===null?"later":o<0?"overdue":o<=g?"soon":"later"}function bl(e,f){let{todayStr:g,soonDays:l=7,includeUnassigned:o=!0,limit:s,capacity:r}=f,t=r??jo,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[$_(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=yx(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 yl(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 yx(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 xl(e){return e.capacity>0&&e.load>e.capacity}function Rd(e,f){return f>0&&e.total>=f}function Od(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 Md(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 H_(e){let f=new Date(`${e}T00:00:00`);if(Number.isNaN(f.getTime()))return e;let g=(f.getDay()+6)%7;return Md(e,-g)}function Ad(e,f){let{todayStr:g,includeUnassigned:l=!0,weeks:o=6,limit:s}=f,r=H_(g),t=Array.from({length:Math.max(1,o)},(d,u)=>{let b=Md(r,u*7),m=Md(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(I=>x>=I.start&&x<=I.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}}var lr=require("react/jsx-runtime"),vl="#e5484d";function Pd({tasks:e,todayStr:f,soonDays:g=7,overloadThreshold:l=0,capacity:o=jo,height:s=200,headerLeft:r,selectedAccountSeq:t=0,onSelectPerson:n}){let c=(0,Dd.useMemo)(()=>bl(e,{todayStr:f,soonDays:g,capacity:o}),[e,f,g,o]),i=(0,Dd.useMemo)(()=>Od(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?xl(b):Rd(b,a))).length;return c.length===0?(0,lr.jsxs)(qi.Box,{sx:an(s),children:[r?(0,lr.jsx)(qi.Box,{sx:Pn,children:r}):null,(0,lr.jsx)(Dn,{text:"\uB2F4\uB2F9\uC790\uAC00 \uC9C0\uC815\uB41C \uBBF8\uC644\uB8CC \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",height:s})]}):(0,lr.jsxs)(qi.Box,{sx:an(s),children:[(0,lr.jsxs)(qi.Box,{sx:Pn,children:[r,(0,lr.jsxs)(qi.Box,{sx:{fontSize:13.5,color:"#37352f"},children:["1\uC778 \uD3C9\uADE0 ",(0,lr.jsx)("b",{children:i.toFixed(1)}),"\uAC74 \xB7"," ",h?(0,lr.jsxs)(lr.Fragment,{children:["\uC6A9\uB7C9 ",(0,lr.jsx)("b",{children:o.default_capacity||"\uAC1C\uC778\uBCC4"}),o.default_capacity?d:""]}):(0,lr.jsxs)(lr.Fragment,{children:["\uACFC\uBD80\uD558 \uAE30\uC900 ",(0,lr.jsx)("b",{children:a}),"\uAC74"]}),u>0?(0,lr.jsxs)(qi.Box,{component:"span",sx:{ml:1,color:vl,fontWeight:700},children:["\uCD08\uACFC ",u,"\uBA85"]}):null]})]}),(0,lr.jsx)(qi.Box,{sx:Qo(s),children:(0,lr.jsx)(qr.ResponsiveContainer,{width:"100%",height:"100%",children:(0,lr.jsxs)(qr.BarChart,{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:[(0,lr.jsx)(qr.CartesianGrid,{strokeDasharray:"3 3",horizontal:!1,stroke:"#eceae6"}),(0,lr.jsx)(qr.XAxis,{type:"number",allowDecimals:!1,tick:{fontSize:12}}),(0,lr.jsx)(qr.YAxis,{type:"category",dataKey:"name",width:84,tick:{fontSize:12},interval:0}),(0,lr.jsx)(qr.Tooltip,{...ra,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)}%)`}}),(0,lr.jsx)(qr.Legend,{...na}),i>0?(0,lr.jsx)(qr.ReferenceLine,{x:i,stroke:bs,strokeDasharray:"4 4",label:{value:"\uD3C9\uADE0",position:"top",fontSize:11,fill:bs}}):null,o.default_capacity>0?(0,lr.jsx)(qr.ReferenceLine,{x:o.default_capacity,stroke:vl,strokeDasharray:"2 3",label:{value:"\uC6A9\uB7C9",position:"top",fontSize:11,fill:vl}}):null,(0,lr.jsx)(qr.Bar,{dataKey:"overdue",name:"\uC9C0\uC5F0",stackId:"load",fill:vl}),(0,lr.jsx)(qr.Bar,{dataKey:"soon",name:`\uC784\uBC15(${g}\uC77C)`,stackId:"load",fill:dl}),(0,lr.jsx)(qr.Bar,{dataKey:"later",name:"\uC5EC\uC720",stackId:"load",fill:Jo,radius:[0,3,3,0],children:c.map(b=>(0,lr.jsx)(qr.Cell,{fill:h&&xl(b)?vl:Jo,fillOpacity:h&&xl(b)?.45:1,stroke:b.accountSeq===t?"#37352f":void 0,strokeWidth:b.accountSeq===t?1.5:0},b.accountSeq))})]})})})]})}var Gc=require("react"),Yc=require("@mui/material"),Cx=require("@ehfuse/mui-form-dialog");var kx=require("react"),br=require("@mui/material"),Sx=Y(require("@mui/icons-material/PersonOutlineOutlined"),1),Tx=Y(require("@ehfuse/overlay-scrollbar"),1);var mr=require("react/jsx-runtime"),xx=56,vx=68,wx=96;function W_(e){let f=String(e.due_date??"").slice(0,10);return f?f.slice(5).replace("-","/"):"-"}function _x(e,f){let g=String(e.due_date??"").slice(0,10);return!!g&&g<f}function Nd({tasks:e,row:f,todayStr:g,employees:l,rows:o,height:s=200,hideSummary:r=!1,onChangeManager:t,onOpenTask:n}){let[c,i]=(0,kx.useState)(null),a=yl(e,f.accountSeq),h=d=>o.find(u=>u.accountSeq===d)?.total??0;return(0,mr.jsxs)(br.Box,{sx:{display:"flex",flexDirection:"column",minHeight:0,height:s},children:[r?null:(0,mr.jsxs)(br.Box,{sx:{display:"flex",alignItems:"center",gap:1,px:.5,pb:.75,fontSize:14,color:"#37352f"},children:[(0,mr.jsx)(br.Box,{component:"span",sx:{fontWeight:700},children:f.name}),(0,mr.jsxs)(br.Box,{component:"span",children:["\uBBF8\uC644\uB8CC ",a.length,"\uAC74"]}),f.capacity>0?(0,mr.jsxs)(br.Box,{component:"span",sx:{color:f.load>f.capacity?"#e5484d":"#787774"},children:["\xB7 \uC6A9\uB7C9 ",f.capacity," \uC911 ",f.load]}):null]}),(0,mr.jsxs)(br.Box,{sx:{flex:1,minHeight:0,display:"flex",flexDirection:"column",border:"1px solid #e6e6e3",borderRadius:1,overflow:"hidden"},children:[(0,mr.jsxs)(br.Box,{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:[(0,mr.jsx)(br.Box,{sx:{width:xx,flexShrink:0},children:"\uB9C8\uAC10"}),(0,mr.jsx)(br.Box,{sx:{flex:1,minWidth:0},children:"\uC5C5\uBB34"}),(0,mr.jsx)(br.Box,{sx:{width:vx,flexShrink:0,textAlign:"center"},children:"\uC911\uC694\uB3C4"}),t?(0,mr.jsx)(br.Box,{sx:{width:wx,flexShrink:0,textAlign:"center"},children:"\uCC45\uC784\uC790"}):null]}),(0,mr.jsx)(br.Box,{sx:{flex:1,minHeight:0},children:(0,mr.jsx)(Tx.default,{style:{height:"100%"},thumb:{width:6},children:a.length===0?(0,mr.jsx)(br.Box,{sx:{p:2,fontSize:14,color:"#9a9a97"},children:"\uBBF8\uC644\uB8CC \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):a.map(d=>(0,mr.jsxs)(br.Box,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1.5,borderBottom:"1px solid #f2f2f0"},children:[(0,mr.jsx)(br.Box,{sx:{width:xx,flexShrink:0,fontSize:13.5,color:_x(d,g)?"#e5484d":"#787774",fontWeight:_x(d,g)?700:400},children:W_(d)}),(0,mr.jsx)(br.Box,{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}),(0,mr.jsx)(br.Box,{sx:{width:vx,flexShrink:0,display:"flex",justifyContent:"center"},children:(0,mr.jsx)(Tn,{priority:d.priority})}),t?(0,mr.jsx)(br.Box,{sx:{width:wx,flexShrink:0,display:"flex",justifyContent:"center"},children:(0,mr.jsx)(br.Button,{size:"small",variant:"outlined",startIcon:(0,mr.jsx)(Sx.default,{sx:{fontSize:17}}),onClick:u=>i({el:u.currentTarget,taskSeq:d.seq}),children:"\uC62E\uAE30\uAE30"})}):null]},d.seq))})})]}),(0,mr.jsx)(br.Menu,{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=>(0,mr.jsxs)(br.MenuItem,{onClick:()=>{c&&t&&t(c.taskSeq,Number(d.account_seq),d.name),i(null)},sx:{fontSize:14,minWidth:200},children:[(0,mr.jsx)(br.Box,{sx:{flex:1},children:d.name}),(0,mr.jsxs)(br.Box,{component:"span",sx:{ml:2,fontSize:13,color:"#787774"},children:[h(Number(d.account_seq)),"\uAC74"]})]},d.account_seq))})]})}var wl=require("react/jsx-runtime");function Ld({open:e,row:f,rows:g,tasks:l,todayStr:o,employees:s,onClose:r,onChangeManager:t,onOpenTask:n}){let[c,i]=(0,Gc.useState)(f);(0,Gc.useEffect)(()=>{f&&i(f)},[f]);let a=f??c,h=a?yl(l,a.accountSeq).length:0;return(0,wl.jsx)(Cx.FormDialog,{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:(0,wl.jsx)(Yc.Button,{variant:"contained",onClick:r,children:"\uB2EB\uAE30"})},sections:[{id:"person-tasks",title:"",showTitle:!1,children:(0,wl.jsx)(Yc.Box,{sx:{minHeight:0},children:a?(0,wl.jsx)(Nd,{tasks:l,row:a,rows:g,todayStr:o,employees:s,height:"min(420px, 52vh)",hideSummary:!0,onChangeManager:t,onOpenTask:n}):null})}]})}var Ix=require("react"),Nn=require("@mui/material"),Ex=require("@ehfuse/overlay-scrollbar");var sn=require("react/jsx-runtime"),Bx="#e5484d",U_="#2f80ed",V_="#9a9a97",zd=30,K_=96,Xc=56;function jd({count:e,max:f,color:g,title:l}){let o=e>0&&f>0?.18+e/f*.72:0;return(0,sn.jsx)(Nn.Tooltip,{title:l,arrow:!0,disableInteractive:!0,placement:"top",children:(0,sn.jsx)(Nn.Box,{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 Fd({tasks:e,todayStr:f,weeks:g=6,height:l=200}){let o=(0,Ix.useMemo)(()=>Ad(e,{todayStr:f,weeks:g}),[e,f,g]);if(o.rows.length===0)return(0,sn.jsx)(Nn.Box,{sx:an(l),children:(0,sn.jsx)(Dn,{text:"\uB2F4\uB2F9\uC790\uAC00 \uC9C0\uC815\uB41C \uBBF8\uC644\uB8CC \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",height:l})});let s=`${K_}px ${Xc}px repeat(${o.weeks.length}, minmax(${Xc}px, 1fr)) ${Xc}px ${Xc}px`,r={height:zd,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(0,sn.jsx)(Nn.Box,{sx:an(l),children:(0,sn.jsx)(Ex.OverlayScrollbar,{style:{height:"100%"},thumb:{width:8},children:(0,sn.jsxs)(Nn.Box,{sx:{display:"grid",gridTemplateColumns:s,minWidth:"fit-content",height:"100%",gridTemplateRows:`${zd}px repeat(${o.rows.length}, minmax(${zd}px, 1fr))`},children:[(0,sn.jsx)(Nn.Box,{sx:{...r,justifyContent:"flex-start",pl:1},children:"\uB2F4\uB2F9\uC790"}),(0,sn.jsx)(Nn.Box,{sx:{...r,color:Bx},children:"\uC9C0\uC5F0"}),o.weeks.map(t=>(0,sn.jsx)(Nn.Box,{sx:{...r,...t.isCurrent?{borderBottom:"2px solid #2f80ed"}:{}},children:t.label},t.start)),(0,sn.jsx)(Nn.Box,{sx:r,children:"\uB9C8\uAC10\uC5C6\uC74C"}),(0,sn.jsx)(Nn.Box,{sx:r,children:"\uD569\uACC4"}),o.rows.map(t=>(0,sn.jsxs)(Nn.Box,{sx:{display:"contents"},children:[(0,sn.jsx)(Nn.Box,{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}),(0,sn.jsx)(jd,{count:t.overdue,max:o.maxCell,color:Bx,title:`${t.name} \xB7 \uC9C0\uC5F0 ${t.overdue}\uAC74`}),t.byWeek.map((n,c)=>(0,sn.jsx)(jd,{count:n,max:o.maxCell,color:U_,title:`${t.name} \xB7 ${o.weeks[c].label} \uC8FC \uB9C8\uAC10 ${n}\uAC74`},o.weeks[c].start)),(0,sn.jsx)(jd,{count:t.noDue,max:o.maxCell,color:V_,title:`${t.name} \xB7 \uB9C8\uAC10 \uBBF8\uC815 ${t.noDue}\uAC74`}),(0,sn.jsxs)(Nn.Box,{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?(0,sn.jsxs)(Nn.Box,{component:"span",sx:{ml:.25,fontSize:10.5,color:"#9a9a97"},children:["(+",t.beyond,")"]}):null]})]},t.accountSeq))]})})})}var nr=require("react/jsx-runtime"),Ox="min(560px, 62vh)",G_=`calc(${Ox} - 4px)`,Y_=[{value:"30",label:"\uCD5C\uADFC 30\uC77C"},{value:"60",label:"\uCD5C\uADFC 60\uC77C"},{value:"90",label:"\uCD5C\uADFC 90\uC77C"}];function X_({open:e,sprints:f,tasks:g,todayStr:l,showSprintCharts:o,capacity:s=jo,capacityEmployees:r=[],onSaveCapacity:t,onChangeTaskManager:n,onOpenTask:c,initialSprintSeq:i=0,onClose:a}){let[h,d]=(0,Lo.useState)(0),[u,b]=(0,Lo.useState)(30);(0,Lo.useEffect)(()=>{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=(0,Lo.useMemo)(()=>f.find(y=>y.seq===h)??null,[f,h]),x={height:G_,boxSizing:"border-box",px:3,py:2.5,display:"flex",flexDirection:"column",minHeight:0,overflow:"hidden"},k=(0,nr.jsx)(Zc.LabelSelect,{label:"\uBAA9\uD45C",showLabel:!1,showEmptyOption:!1,value:h?String(h):"",options:f.map(y=>({value:String(y.seq),label:so(y)})),onChange:y=>d(Number(y.target.value)||0),sx:{width:280,flexShrink:0}}),[I,M]=(0,Lo.useState)("distribution"),z=(0,nr.jsx)(Zc.LabelSelect,{label:"\uBCF4\uAE30",showLabel:!1,showEmptyOption:!1,value:I,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=>M(y.target.value==="timeline"?"timeline":"distribution"),sx:{width:280,flexShrink:0}}),[O,P]=(0,Lo.useState)(!1),[N,$]=(0,Lo.useState)(0),L=(0,Lo.useMemo)(()=>bl(g,{todayStr:l,capacity:s}),[g,l,s]),C=L.find(y=>y.accountSeq===N)??null,S=(0,nr.jsxs)(nr.Fragment,{children:[z,t?(0,nr.jsx)(co.Button,{size:"small",variant:"outlined",startIcon:(0,nr.jsx)(Rx.default,{sx:{fontSize:18}}),onClick:()=>P(!0),sx:{flexShrink:0},children:"\uC6A9\uB7C9"}):null]}),D=o??f.length>0,p=(0,nr.jsx)(Zc.LabelSelect,{label:"\uAE30\uAC04",showLabel:!1,showEmptyOption:!1,value:String(u),options:Y_,onChange:y=>b(Number(y.target.value)||30),sx:{width:280,flexShrink:0}});return(0,nr.jsxs)(nr.Fragment,{children:[(0,nr.jsx)(Mx.FormDialog,{open:e,onClose:a,maxWidth:"md",title:"\uC5C5\uBB34 \uCC28\uD2B8",locale:"ko",contentTopPadding:0,contentPaddingX:0,sectionsPaddingTop:0,sectionContentPaddingTop:0,sectionTitleGap:0,fixedHeight:Ox,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:(0,nr.jsx)(co.Box,{sx:x,children:(0,nr.jsx)(vd,{sprints:f,tasks:g,height:"100%"})})},{id:"burndown",tabTitle:"\uBC88\uB2E4\uC6B4",showTitle:!1,children:(0,nr.jsx)(co.Box,{sx:x,children:m?(0,nr.jsx)(wd,{sprint:m,tasks:g,todayStr:l,height:"100%",headerLeft:k}):(0,nr.jsxs)(co.Box,{sx:an("100%"),children:[(0,nr.jsx)(co.Box,{sx:Pn,children:k}),(0,nr.jsx)(Dn,{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:(0,nr.jsx)(co.Box,{sx:x,children:(0,nr.jsx)(Bd,{tasks:g,todayStr:l,days:u,height:"100%",headerLeft:p})})}]:[],{id:"workload",tabTitle:"\uC6CC\uD06C\uB85C\uB4DC",showTitle:!1,children:(0,nr.jsx)(co.Box,{sx:x,children:I==="timeline"?(0,nr.jsxs)(co.Box,{sx:{display:"flex",flexDirection:"column",height:"100%",minHeight:0},children:[(0,nr.jsx)(co.Box,{sx:Pn,children:S}),(0,nr.jsx)(Fd,{tasks:g,todayStr:l,height:"100%"})]}):(0,nr.jsx)(Pd,{tasks:g,todayStr:l,height:"100%",capacity:s,headerLeft:S,selectedAccountSeq:N,onSelectPerson:n?$:void 0})})},{id:"lead-time",tabTitle:"\uB9AC\uB4DC\uD0C0\uC784",showTitle:!1,children:(0,nr.jsx)(co.Box,{sx:x,children:(0,nr.jsx)(Ed,{tasks:g,todayStr:l,days:u,height:"100%",headerLeft:p})})}],actions:{showCancelButton:!1,right:(0,nr.jsx)(co.Button,{variant:"contained",onClick:a,children:"\uB2EB\uAE30"})}}),(0,nr.jsx)(Ld,{open:N>0,row:C,rows:L,tasks:g,todayStr:l,employees:r,onClose:()=>$(0),onChangeManager:n,onOpenTask:c}),t?(0,nr.jsx)(bd,{open:O,capacity:s,employees:r,onClose:()=>P(!1),onSave:async y=>{await t(y),P(!1)}}):null]})}var ti=require("@mui/material");var xi=require("react/jsx-runtime");function Z_({anchorEl:e,candidates:f,selectedNames:g,avatarSrcByName:l,onToggle:o,onClear:s,onClose:r}){return(0,xi.jsxs)(ti.Menu,{anchorEl:e,open:!!e,onClose:r,transitionDuration:0,children:[f.length===0?(0,xi.jsx)(ti.MenuItem,{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(0,xi.jsxs)(ti.MenuItem,{onClick:()=>o(t),sx:{fontSize:14,minWidth:170,gap:1},children:[(0,xi.jsx)(ti.Checkbox,{size:"small",checked:n,sx:{p:0}}),(0,xi.jsx)(Cn,{names:[t.name],size:20,avatarSrcByName:l}),t.name]},`${t.accountSeq}-${t.name}`)}),(0,xi.jsx)(ti.Divider,{}),(0,xi.jsx)(ti.MenuItem,{disabled:g.length===0,onClick:s,sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}var Ax=require("react"),ia=require("@mui/material"),Dx=Y(require("@mui/icons-material/KeyboardArrowDown"),1),Px=Y(require("@mui/icons-material/Check"),1);var ri=require("react/jsx-runtime");function J_({value:e,onChange:f,options:g}){let[l,o]=(0,Ax.useState)(null),s=g??Gl,r=Gl.find(t=>t.value===e)?.label??"";return(0,ri.jsxs)(ri.Fragment,{children:[(0,ri.jsxs)(ia.ButtonBase,{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,(0,ri.jsx)(Dx.default,{sx:{fontSize:17,color:"#9a9a97"}})]}),(0,ri.jsx)(ia.Menu,{transitionDuration:0,anchorEl:l,open:!!l,onClose:()=>o(null),children:s.map(t=>(0,ri.jsxs)(ia.MenuItem,{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?(0,ri.jsx)(Px.default,{sx:{fontSize:16,color:"#2f80ed"}}):null]},t.value))})]})}var ys=require("@mui/material"),qd=require("@ehfuse/mui-form-controls");var vi=require("react/jsx-runtime"),Q_=[{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 $d({fromDate:e,toDate:f,onChange:g}){let l=s=>{if(s<=0){g("","");return}g(ei(ml(s)),ei(new Date))},o=s=>s<=0?!e&&!f:!e||!f?!1:e===ei(ml(s))&&f===ei(new Date);return(0,vi.jsxs)(ys.Box,{sx:{display:"flex",alignItems:"center",gap:1.5,flexWrap:"wrap"},children:[(0,vi.jsx)(ys.Box,{sx:{display:"flex",alignItems:"center",gap:1.5},children:Q_.map(s=>{let r=o(s.months);return(0,vi.jsx)(ys.ButtonBase,{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,vi.jsxs)(ys.Box,{sx:{display:"flex",alignItems:"center",gap:.5},children:[(0,vi.jsx)(qd.DateTextField,{value:e,size:"small",placeholder:"\uC2DC\uC791\uC77C",onChange:s=>g(s.target.value,f),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}}),(0,vi.jsx)(ys.Box,{component:"span",sx:{fontSize:13,color:"#9a9a97"},children:"~"}),(0,vi.jsx)(qd.DateTextField,{value:f,size:"small",placeholder:"\uC885\uB8CC\uC77C",onChange:s=>g(e,s.target.value),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}})]})]})}var Nx=require("@mui/material");var Hd=require("react/jsx-runtime");function e3({anchorEl:e,fromDate:f,toDate:g,onChange:l,onClose:o}){return(0,Hd.jsx)(Nx.Popover,{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:(0,Hd.jsx)($d,{fromDate:f,toDate:g,onChange:l})})}var $i=require("@mui/material"),zx=Y(require("@mui/icons-material/Checklist"),1),jx=Y(require("@mui/icons-material/Face"),1),Fx=Y(require("@mui/icons-material/Publish"),1),qx=Y(require("@mui/icons-material/NotificationsOutlined"),1),$x=Y(require("@mui/icons-material/BugReportOutlined"),1),Hx=Y(require("@mui/icons-material/SupportAgentOutlined"),1),Wx=Y(require("@mui/icons-material/DescriptionOutlined"),1),Ux=Y(require("@mui/icons-material/Inventory2Outlined"),1);var uo=require("react/jsx-runtime");function Lx(e,f){return f>0?`${e} (${f})`:e}var t3=[{id:"my",label:"\uC804\uCCB4",icon:(0,uo.jsx)(zx.default,{sx:{fontSize:18}})},{id:"mine",label:"\uB0B4 \uC5C5\uBB34",icon:(0,uo.jsx)(jx.default,{sx:{fontSize:18}})},{id:"sent",label:"\uBCF4\uB0B8 \uC5C5\uBB34",icon:(0,uo.jsx)(Fx.default,{sx:{fontSize:18}})},{id:"support",label:"\uACE0\uAC1D\uC13C\uD130",icon:(0,uo.jsx)(Hx.default,{sx:{fontSize:18}})},{id:"bug",label:"\uC624\uB958",icon:(0,uo.jsx)($x.default,{sx:{fontSize:18}})},{id:"notice",label:"\uACF5\uC9C0\uC0AC\uD56D",icon:(0,uo.jsx)(qx.default,{sx:{fontSize:18}})},{id:"archive",label:"\uBCF4\uAD00\uD568",icon:(0,uo.jsx)(Ux.default,{sx:{fontSize:18}}),hideCount:!0},{id:"report",label:"\uBCF4\uACE0\uC11C",icon:(0,uo.jsx)(Wx.default,{sx:{fontSize:18}}),hideCount:!0}];function r3(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 n3({items:e,activeTab:f,counts:g,onChange:l,compact:o=!1}){let s=ht(),r=r3(s.tabs),t=e;return o?(0,uo.jsx)($i.Box,{sx:{display:"flex",flexWrap:"wrap",gap:1.25},children:t.map(n=>{let c=f===n.id;return(0,uo.jsx)($i.ButtonBase,{onClick:()=>l(n.id),sx:{px:1.5,py:.75,borderRadius:1,fontSize:mn(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:Lx(n.label,n.hideCount?0:g[n.id]??0)},n.id)})}):(0,uo.jsx)($i.Tabs,{value:f,onChange:(n,c)=>l(c),sx:{minHeight:46,"& .MuiTabs-indicator":{display:"none"},"& .MuiTabs-flexContainer":{gap:"12px",minHeight:46}},children:t.map(n=>(0,uo.jsx)($i.Tab,{value:n.id,label:Lx(n.label,n.hideCount?0:g[n.id]??0),icon:n.icon,iconPosition:"start",sx:r},n.id))})}var Hi=require("react"),Ct=require("@mui/material"),Vx=Y(require("@mui/icons-material/OpenInNewOutlined"),1),Kx=Y(require("@mui/icons-material/RestoreFromTrashOutlined"),1),Gx=Y(require("@mui/icons-material/Check"),1),Yx=Y(require("@mui/icons-material/CheckCircleOutlined"),1),Xx=Y(require("@mui/icons-material/RadioButtonUnchecked"),1),Zx=Y(require("@mui/icons-material/SendOutlined"),1),Jx=Y(require("@mui/icons-material/EventOutlined"),1),Qx=Y(require("@mui/icons-material/PersonOutlineOutlined"),1),e2=Y(require("@mui/icons-material/ViewKanbanOutlined"),1),t2=Y(require("@mui/icons-material/ContentCopyOutlined"),1),r2=Y(require("@mui/icons-material/NextPlanOutlined"),1),n2=Y(require("@mui/icons-material/ContentPasteOutlined"),1),o2=Y(require("@mui/icons-material/ShareOutlined"),1),i2=Y(require("@mui/icons-material/DirectionsRunOutlined"),1),Wd=Y(require("@mui/icons-material/ChevronRight"),1),s2=Y(require("@mui/icons-material/ArchiveOutlined"),1),a2=Y(require("@mui/icons-material/UnarchiveOutlined"),1),Ud=require("@ehfuse/alerts");var Ye=require("react/jsx-runtime");function o3({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:I}){let M=dr(),z=$o(),[O,P]=(0,Hi.useState)(null),[N,$]=(0,Hi.useState)(null),[L,C]=(0,Hi.useState)(null);(0,Hi.useEffect)(()=>{e||(P(null),$(null),C(null))},[e]);let S=e?.task??null,D=!!S?.is_notice,p=!!S?.is_event,y=S?!So(S,o):!1,{editPolicy:v}=ct(),w=S?fi(S,o,v):!1,_=S?Ii(S,o,v,y):!1,T=S?Ii(S,o,v,!1):!1,R=!!S?.deleted,F=(0,Hi.useMemo)(()=>new Set(g.filter(q=>q.useSprints).map(q=>q.key)),[g]),H=async(q="one")=>{let B=S;if(f(),!B)return;await(0,Ud.ConfirmDialog)({title:"\uC5C5\uBB34 \uC0AD\uC81C",message:q==="series"?`"${B.title}" \uC758 \uC774 \uD68C\uCC28\uC640 \uC774\uD6C4 \uBC18\uBCF5 \uD68C\uCC28\uB97C \uBAA8\uB450 \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`:`"${B.title}" \uC5C5\uBB34\uB97C \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&x(B.seq,q)},V=async()=>{let q=S;if(f(),!q)return;await(0,Ud.ConfirmDialog)({title:"\uC601\uAD6C \uC0AD\uC81C",message:`"${q.title}" \uC5C5\uBB34\uB97C \uC601\uAD6C\uD788 \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C? \uB418\uB3CC\uB9B4 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.`})&&I?.(q.seq)},A=()=>{S&&m(S.seq,!S.archived),f()};return(0,Ye.jsxs)(Ye.Fragment,{children:[(0,Ye.jsxs)(Ct.Menu,{open:!!e,onClose:f,transitionDuration:0,anchorReference:M?"none":"anchorPosition",anchorPosition:!M&&e?{top:e.position.top,left:e.position.left}:void 0,slotProps:{paper:{sx:{minWidth:190,...M?{position:"fixed",top:"50%",left:"50%",translate:"-50% -50%",maxHeight:"70vh"}:{}}},list:M?{sx:{"& .MuiMenuItem-root":{py:1,minHeight:0}}}:void 0},children:[(0,Ye.jsxs)(Ct.MenuItem,{onClick:()=>{S&&s(S),f()},sx:{fontSize:14},children:[(0,Ye.jsx)(Ct.ListItemIcon,{children:(0,Ye.jsx)(Vx.default,{sx:{fontSize:19}})}),"\uC0C1\uC138 \uC5F4\uAE30"]}),R?(0,Ye.jsx)(Ct.Divider,{}):null,R&&k?(0,Ye.jsxs)(Ct.MenuItem,{disabled:T,onClick:()=>{S&&k(S.seq),f()},sx:{fontSize:14},children:[(0,Ye.jsx)(Ct.ListItemIcon,{children:(0,Ye.jsx)(Kx.default,{sx:{fontSize:19}})}),"\uBCF5\uC6D0"]}):null,R&&I?(0,Ye.jsxs)(Ct.MenuItem,{disabled:T,onClick:()=>{V()},sx:{fontSize:14,color:"#e5484d"},children:[(0,Ye.jsx)(Ct.ListItemIcon,{children:(0,Ye.jsx)(gn,{sx:{fontSize:19,color:"#e5484d"}})}),"\uC601\uAD6C \uC0AD\uC81C"]}):null,R?null:(0,Ye.jsxs)(Ye.Fragment,{children:[(0,Ye.jsxs)(Ct.MenuItem,{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:[(0,Ye.jsx)(Ct.ListItemIcon,{children:S?.completed?(0,Ye.jsx)(Xx.default,{sx:{fontSize:19}}):(0,Ye.jsx)(Yx.default,{sx:{fontSize:19}})}),S?.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC"]}),!D&&t?(0,Ye.jsxs)(Ct.MenuItem,{disabled:!(S?.manager_account_seq??0)&&(S?.receiver_account_seqs??[]).length===0,onClick:()=>{S&&t(S),f()},sx:{fontSize:14},children:[(0,Ye.jsx)(Ct.ListItemIcon,{children:(0,Ye.jsx)(Zx.default,{sx:{fontSize:19}})}),"\uD655\uC778 \uC694\uCCAD"]}):null,p?null:(0,Ye.jsx)(Ct.Divider,{}),p?null:(0,Ye.jsxs)(Ct.MenuItem,{disabled:w,onClick:q=>{S&&P({anchorEl:q.currentTarget,task:S})},sx:{fontSize:14},children:[(0,Ye.jsx)(Ct.ListItemIcon,{children:(0,Ye.jsx)(Jx.default,{sx:{fontSize:19}})}),"\uB9C8\uAC10\uC608\uC815 \uBCC0\uACBD"]}),!D&&!p&&i?(0,Ye.jsxs)(Ct.MenuItem,{disabled:v==="coreAuthorManager"?w:!1,onClick:()=>{S&&i(S,"manager"),f()},sx:{fontSize:14},children:[(0,Ye.jsx)(Ct.ListItemIcon,{children:(0,Ye.jsx)(Qx.default,{sx:{fontSize:19}})}),"\uCC45\uC784\uC790 \uBCC0\uACBD"]}):null,p?null:(0,Ye.jsxs)(Ct.MenuItem,{disabled:w,onClick:q=>{S&&$({anchorEl:q.currentTarget,task:S})},sx:{fontSize:14},children:[(0,Ye.jsx)(Ct.ListItemIcon,{children:(0,Ye.jsx)(e2.default,{sx:{fontSize:19}})}),"\uD504\uB85C\uC81D\uD2B8 \uC774\uB3D9",(0,Ye.jsx)(Wd.default,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}),(0,Ye.jsx)(Ct.Divider,{}),h?(0,Ye.jsxs)(Ct.MenuItem,{disabled:y,onClick:()=>{S&&h(S.seq),f()},sx:{fontSize:14},children:[(0,Ye.jsx)(Ct.ListItemIcon,{children:(0,Ye.jsx)(t2.default,{sx:{fontSize:19}})}),"\uBCF5\uC81C"]}):null,d&&S&&!S.is_event&&!S.is_notice?(0,Ye.jsxs)(Ct.MenuItem,{onClick:()=>{S&&d(S.seq),f()},sx:{fontSize:14},children:[(0,Ye.jsx)(Ct.ListItemIcon,{children:(0,Ye.jsx)(r2.default,{sx:{fontSize:19}})}),"\uD6C4\uC18D \uC5C5\uBB34 \uB9CC\uB4E4\uAE30"]}):null,(0,Ye.jsxs)(Ct.MenuItem,{onClick:()=>{S&&(u?u(S):ms(S,M)),f()},sx:{fontSize:14},children:[(0,Ye.jsx)(Ct.ListItemIcon,{children:M?(0,Ye.jsx)(o2.default,{sx:{fontSize:19}}):(0,Ye.jsx)(n2.default,{sx:{fontSize:19}})}),M?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC"]}),S&&!S.is_notice&&!S.is_event&&F.has(String(S.tab_key??""))&&b?(0,Ye.jsxs)(Ct.MenuItem,{onClick:q=>C(q.currentTarget),sx:{fontSize:14},children:[(0,Ye.jsx)(Ct.ListItemIcon,{children:(0,Ye.jsx)(i2.default,{sx:{fontSize:19}})}),"\uBAA9\uD45C\uC5D0 \uB123\uAE30",(0,Ye.jsx)(Wd.default,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}):null,(0,Ye.jsxs)(Ct.MenuItem,{onClick:A,disabled:y||!S?.archived&&!(S&&ya(S)),sx:{fontSize:14},children:[(0,Ye.jsx)(Ct.ListItemIcon,{children:S?.archived?(0,Ye.jsx)(a2.default,{sx:{fontSize:19}}):(0,Ye.jsx)(s2.default,{sx:{fontSize:19}})}),S?.archived?"\uBCF4\uAD00 \uD574\uC81C":"\uBCF4\uAD00"]}),(0,Ye.jsx)(Ct.Divider,{}),(0,Ye.jsxs)(Ct.MenuItem,{disabled:_,onClick:()=>{H("one")},sx:{fontSize:14,color:"#e5484d"},children:[(0,Ye.jsx)(Ct.ListItemIcon,{children:(0,Ye.jsx)(gn,{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?(0,Ye.jsxs)(Ct.MenuItem,{disabled:_,onClick:()=>{H("series")},sx:{fontSize:14,color:"#e5484d"},children:[(0,Ye.jsx)(Ct.ListItemIcon,{children:(0,Ye.jsx)(gn,{sx:{fontSize:19,color:"#e5484d"}})}),"\uC0AD\uC81C (\uC774\uD6C4 \uBC18\uBCF5 \uC804\uCCB4)"]}):null]})]}),(0,Ye.jsx)(io,{anchorEl:O?.anchorEl??null,open:!!O,date:O?.task.due_date??"",reminders:Bo(O?.task),hideReminder:!!O?.task.completed,centered:M,onClose:()=>{P(null),f()},onDateChange:q=>{O&&n(O.task.seq,q)},onReminderChange:q=>{O&&c?.(O.task.seq,q)}}),(0,Ye.jsxs)(Ct.Menu,{transitionDuration:0,anchorEl:N?.anchorEl??null,open:!!N,onClose:()=>{$(null),f()},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},...z,children:[(0,Ye.jsx)(Ct.MenuItem,{selected:!N?.task.tab_key,onClick:()=>{N&&a(N.task.seq,""),$(null),f()},sx:{fontSize:14,minWidth:170},children:"\uC5C6\uC74C"}),g.filter(q=>!q.archived).map(q=>(0,Ye.jsx)(Ct.MenuItem,{selected:N?.task.tab_key===q.key,onClick:()=>{N&&a(N.task.seq,q.key),$(null),f()},sx:{fontSize:14,minWidth:170},children:q.label},q.key))]}),(0,Ye.jsx)(Ct.Menu,{transitionDuration:0,anchorEl:L,open:!!L,onClose:()=>C(null),anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...l.filter(q=>`custom-${q.group_seq}`===String(S?.tab_key??"")).map(q=>({seq:q.seq,label:so(q)}))].map(q=>(0,Ye.jsxs)(Ct.MenuItem,{onClick:()=>{S&&b?.(S.seq,q.seq),C(null),f()},sx:{fontSize:14,minWidth:160,gap:1},children:[q.label,(S?.sprint_seq??0)===q.seq?(0,Ye.jsx)(Gx.default,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},q.seq))})]})}var wi=require("@mui/material");var Wi=require("react/jsx-runtime");function i3({anchorEl:e,labelOptions:f,selectedKeys:g,onToggle:l,onClear:o,onClose:s}){return(0,Wi.jsxs)(wi.Menu,{transitionDuration:0,anchorEl:e,open:!!e,onClose:s,children:[f.map(r=>{let t=g.includes(r.key);return(0,Wi.jsxs)(wi.MenuItem,{onClick:()=>l(r.key),sx:{fontSize:14,minWidth:190,gap:1},children:[(0,Wi.jsx)(wi.Checkbox,{size:"small",checked:t,sx:{p:0}}),(0,Wi.jsx)(ir,{option:r})]},r.key)}),(0,Wi.jsx)(wi.Divider,{}),(0,Wi.jsx)(wi.MenuItem,{disabled:g.length===0,onClick:()=>{o(),s()},sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}var xs=require("@mui/material"),l2=Y(require("@mui/icons-material/Check"),1),c2=Y(require("@mui/icons-material/SettingsOutlined"),1);var Ui=require("react/jsx-runtime");function s3(e){let{anchorEl:f,sprints:g,value:l,onSelect:o,onManage:s,onClose:r}=e;return(0,Ui.jsxs)(xs.Menu,{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:so(t)}))].map(t=>(0,Ui.jsxs)(xs.MenuItem,{onClick:()=>{o(t.seq),r()},sx:{fontSize:14,minWidth:180,gap:1},children:[t.label,l===t.seq?(0,Ui.jsx)(l2.default,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},t.seq)),(0,Ui.jsx)(xs.Divider,{}),(0,Ui.jsxs)(xs.MenuItem,{onClick:()=>{r(),s()},sx:{fontSize:14,gap:1},children:[(0,Ui.jsx)(c2.default,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uAD00\uB9AC\u2026"]})]})}var a3={my:"tasks",mine:"tasks",sent:"tasks",notice:"notice",support:"support",bug:"bug",archive:"archive",done:"done",report:"report"};function f2(e){return a3[e]??"tasks"}var Vd={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"},u2=["list","calendar","month","card","kanban","sprint","timeline"],l3=["list","kanban"],c3=["list","card"];function u3(e){let f=f2(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:u2,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:l3,showCreate:!1,createLabel:"",showGroupBy:!0,showSprintFilter:!1,showDateRange:!1,showHideCompleted:!0,forceFlatList:!1,columns:{support:!0,showProject:!1}};case"archive":return{kind:f,viewOptions:c3,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:u2,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"}:{}}}}var h2=require("react"),p2=require("@ehfuse/keyboard-state");var d2=[{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 f3(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=(0,h2.useMemo)(()=>{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 m2(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]);(0,p2.useKeyboardState)(g?a:[])}function m2(e){if(!e)return d2;let f=new Set(e);return d2.filter(g=>f.has(g.view))}function sa(e){return[{keys:"N",description:"\uC0C8 \uC5C5\uBB34 \uB4F1\uB85D"},{keys:"/",description:"\uAC80\uC0C9"},{keys:"R",description:"\uBAA9\uB85D \uC0C8\uB85C\uACE0\uCE68"},...m2(e).map(f=>({keys:f.key.split(" ").map(g=>g.toUpperCase()).join(" \u2192 "),description:`${Vd[f.view]} \uBCF4\uAE30`})),{keys:"?",description:"\uB2E8\uCD95\uD0A4 \uB3C4\uC6C0\uB9D0"},{keys:"Esc",description:"\uB2EB\uAE30"}]}var d3=sa();var Vi=require("@mui/material"),g2=Y(require("@mui/icons-material/ArrowRightAlt"),1),b2=require("@ehfuse/mui-form-dialog");var wo=require("react/jsx-runtime");function h3({keys:e}){return(0,wo.jsx)(Vi.Box,{sx:{display:"flex",alignItems:"center",gap:.5,justifyContent:"flex-end"},children:e.split(" \u2192 ").map((f,g)=>(0,wo.jsxs)(Vi.Box,{sx:{display:"flex",alignItems:"center",gap:.5},children:[g>0?(0,wo.jsx)(g2.default,{sx:{fontSize:18,color:"#9a9a97"}}):null,(0,wo.jsx)(Vi.Box,{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 p3({open:e,onClose:f,views:g}){let l=sa(g);return(0,wo.jsx)(b2.FormDialog,{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:(0,wo.jsx)(Vi.Box,{sx:{display:"grid",gridTemplateColumns:"auto 1fr",columnGap:2,rowGap:1.25,alignItems:"center",fontSize:14,color:"#37352f"},children:l.map(o=>(0,wo.jsxs)(Vi.Box,{sx:{display:"contents"},children:[(0,wo.jsx)(h3,{keys:o.keys}),(0,wo.jsx)("span",{children:o.description})]},o.keys))})}],actions:{showCancelButton:!1,right:(0,wo.jsx)(Vi.Button,{variant:"contained",onClick:f,children:"\uB2EB\uAE30"})}})}var Ki=require("react"),Rr=require("@mui/material"),C2=Y(require("@mui/icons-material/ArrowRightAlt"),1),B2=Y(require("@mui/icons-material/ChevronRightRounded"),1),I2=Y(require("@mui/icons-material/ArrowForward"),1),E2=require("@ehfuse/mui-form-dialog");var y2={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 x2={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 v2={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 w2={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 _2={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 k2={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 S2={id:"shortcuts",tabTitle:"\uB2E8\uCD95\uD0A4",topics:[]};var Kd=[y2,x2,v2,w2,_2,k2,S2];var Ot=require("react/jsx-runtime");function Jc(e){return e.split(/(\*\*[^*]+\*\*|\s*(?:→|->)\s*)/g).filter(g=>g.length>0).map((g,l)=>g.startsWith("**")&&g.endsWith("**")?(0,Ot.jsx)(Rr.Box,{component:"strong",sx:{fontWeight:700},children:g.slice(2,-2)},l):/^\s*(?:→|->)\s*$/.test(g)?(0,Ot.jsx)(I2.default,{sx:{fontSize:"1em",verticalAlign:"-0.15em",mx:.5,color:"text.secondary"}},l):(0,Ot.jsx)(Ki.Fragment,{children:g},l))}function m3({keys:e}){let f=ht();return(0,Ot.jsx)(Rr.Box,{sx:{display:"flex",alignItems:"center",gap:.5,justifyContent:"flex-end"},children:e.split(" \u2192 ").map((g,l)=>(0,Ot.jsxs)(Rr.Box,{sx:{display:"flex",alignItems:"center",gap:.5},children:[l>0?(0,Ot.jsx)(C2.default,{sx:{fontSize:20,color:f.colors.textMuted}}):null,(0,Ot.jsx)(Rr.Box,{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 g3({steps:e}){let f=ht();return(0,Ot.jsx)(Rr.Box,{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)=>(0,Ot.jsxs)(Rr.Box,{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:[(0,Ot.jsxs)(Rr.Box,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[(0,Ot.jsx)(Rr.Box,{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}),(0,Ot.jsx)(Rr.Box,{sx:{minWidth:0,fontSize:20,fontWeight:500,color:f.colors.textStrong,lineHeight:1.3,letterSpacing:"-0.01em"},children:g.title})]}),(0,Ot.jsx)(Rr.Box,{sx:{mt:1.5,fontSize:15,lineHeight:1.5,color:f.colors.textPrimary,wordBreak:"keep-all"},children:g.desc})]},g.title))})}var M2="70vh",b3=24,y3=44,T2=`calc((${M2} - ${b3*2+y3}px) / var(--mfd-font-scale, 1))`,x3=148;function v3({items:e}){let f=ht();return(0,Ot.jsx)(Rr.Box,{sx:{mt:1.5,display:"grid",gridTemplateColumns:{xs:"1fr",sm:`${x3}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=>(0,Ot.jsxs)(Ki.Fragment,{children:[(0,Ot.jsx)(Rr.Box,{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}),(0,Ot.jsx)(Rr.Box,{sx:{wordBreak:"keep-all"},children:Jc(g.desc)})]},g.term))})}function w3({topic:e}){let f=ht();return(0,Ot.jsxs)(Rr.Box,{component:"section",sx:{py:{xs:3,sm:4},borderBottom:`1px solid ${f.colors.border}`,"&:last-of-type":{pb:0,borderBottom:0}},children:[(0,Ot.jsxs)(Rr.Box,{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?(0,Ot.jsxs)(Ot.Fragment,{children:[(0,Ot.jsx)(B2.default,{sx:{fontSize:22,color:f.colors.textMuted,mx:1,flexShrink:0}}),(0,Ot.jsx)(Rr.Box,{component:"span",sx:{fontSize:18,fontWeight:400,color:f.colors.textPrimary},children:e.subtitle})]}):null]}),e.lead?(0,Ot.jsx)(Rr.Box,{sx:{fontSize:15.5,lineHeight:1.65,color:f.colors.textPrimary,wordBreak:"keep-all"},children:Jc(e.lead)}):null,e.steps?.length?(0,Ot.jsx)(g3,{steps:e.steps}):null,e.items?.length?(0,Ot.jsx)(v3,{items:e.items}):null,e.lines?.length?(0,Ot.jsx)(Rr.Box,{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)=>(0,Ot.jsx)("li",{children:Jc(g)},l))}):null]})}function _3({open:e,onClose:f,views:g,features:l={},initialTab:o}){let s=ht(),[r,t]=(0,Ki.useState)(0);(0,Ki.useEffect)(()=>{if(!e)return;let h=Kd.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=sa(g),i=Kd.filter(a=>n(a.feature)).map(a=>({id:a.id,tabTitle:a.tabTitle,showTitle:!1,children:a.id==="shortcuts"?(0,Ot.jsx)(Rr.Box,{sx:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:T2,maxHeight:T2,px:.5},children:(0,Ot.jsx)(Rr.Box,{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=>(0,Ot.jsxs)(Ki.Fragment,{children:[(0,Ot.jsx)(m3,{keys:h.keys}),(0,Ot.jsx)("span",{children:h.description})]},h.keys))})}):(0,Ot.jsxs)(Rr.Box,{sx:{display:"flex",flexDirection:"column",px:.5},children:[a.intro?(0,Ot.jsx)(Rr.Box,{sx:{p:2,borderRadius:2,bgcolor:s.colors.accentSoft,color:s.colors.textStrong,fontSize:15.5,lineHeight:1.65,wordBreak:"keep-all"},children:Jc(a.intro)}):null,a.topics.filter(h=>n(h.feature)).map(h=>(0,Ot.jsx)(w3,{topic:h},h.title))]})}));return(0,Ot.jsx)(E2.FormDialog,{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:M2,sectionContentPaddingTop:0,fontScale:{enabled:!0},fontScaleKey:"taskbox-manual",sections:i,actions:{showCancelButton:!1,right:(0,Ot.jsx)(Rr.Button,{variant:"contained",onClick:f,sx:{minWidth:80},children:"\uB2EB\uAE30"})}})}var _o=require("react"),vt=require("@mui/material"),Gd=require("@ehfuse/mui-form-dialog"),tu=Y(require("@mui/icons-material/Add"),1),O2=Y(require("@mui/icons-material/ArrowRightAlt"),1),A2=Y(require("@mui/icons-material/BoltOutlined"),1),D2=Y(require("@mui/icons-material/Close"),1),P2=Y(require("@mui/icons-material/EditOutlined"),1),Yd=require("@ehfuse/alerts"),ln=require("@ehfuse/mui-form-controls");var qe=require("react/jsx-runtime"),Xd=[{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."}],_l=[{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"}],ru=[{value:"high",label:"\uB192\uC74C"},{value:"medium",label:"\uC911\uAC04"},{value:"low",label:"\uB0AE\uC74C"}];function Qc(){return{name:"",trigger:"created",enabled:!0,sort_no:0,condition:{},action:{}}}function eu(e){return Wn.find(f=>f.key===e)?.name??e}function k3(e,f,g){let{condition:l,action:o}=e,s=[];if(l.group_seq){let n=f.find(c=>bi(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=${ru.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=${eu(l.status)}`),l.from_status&&s.push(`${eu(l.from_status)}\uC5D0\uC11C`),l.to_status&&s.push(`${eu(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(`${_l.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=${eu(o.set_status)}`),o.set_priority&&r.push(`\uC911\uC694\uB3C4=${ru.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=Xd.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 R2={fontSize:16,fontWeight:700,color:"#37352f"},S3={display:"flex",alignItems:"center",gap:1},T3={width:104,flexShrink:0,fontSize:16,color:"#37352f"};function C3({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]=(0,_o.useState)(!1),[d,u]=(0,_o.useState)(0),[b,m]=(0,_o.useState)(Qc()),[x,k]=(0,_o.useState)(!1),I=(0,_o.useRef)(null),[M,z]=(0,_o.useState)(null),[O,P]=(0,_o.useState)(null);(0,_o.useEffect)(()=>{if(e)return;let W=window.setTimeout(()=>{h(!1),u(0),m(Qc())},500);return()=>window.clearTimeout(W)},[e]),(0,_o.useEffect)(()=>{if(!a)return;let W=window.setTimeout(()=>I.current?.focus(),120);return()=>window.clearTimeout(W)},[a]);let N=d>0,$=b.trigger,L=()=>{h(!1),u(0),m(Qc())},C=(W,Z)=>{m(J=>{let K={...J.condition};return Z===""||Z===void 0||Z===null?delete K[W]:K[W]=Z,{...J,condition:K}})},S=(W,Z)=>{m(J=>{let K={...J.action};return Z===""||Z===void 0||Z===null?delete K[W]:K[W]=Z,{...J,action:K}})},D=W=>{m(Z=>{let J={...Z.condition};return W!=="status_changed"&&(delete J.from_status,delete J.to_status),W!=="overdue"&&delete J.overdue_days,W!=="field_changed"&&delete J.changed_field,W!=="commented"&&(delete J.comment_contains,delete J.comment_by_others),W==="field_changed"&&J.changed_field===void 0&&(J.changed_field=_l[0]?.value??""),{...Z,trigger:W,condition:J}})},p=g.filter(W=>!W.archived),y=l.map(W=>({value:W.key,label:W.name})),v=Wn.map(W=>({value:W.key,label:W.name})),w=p.map(W=>({value:String(bi(W.key)),label:W.label})),{condition:_,action:T}=b,R=_.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"}]:[],...R?[]:[{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"}]:[],...$==="status_changed"&&_.from_status===void 0?[{key:"from_status",label:"\uC774 \uC0C1\uD0DC\uC5D0\uC11C \uBC14\uB010 \uACBD\uC6B0"}]:[],...$==="status_changed"&&_.to_status===void 0?[{key:"to_status",label:"\uC774 \uC0C1\uD0DC\uB85C \uBC14\uB010 \uACBD\uC6B0"}]:[],...$==="field_changed"&&_.changed_field===void 0?[{key:"changed_field",label:"~ \uD544\uB4DC\uAC00 \uBCC0\uACBD\uB41C \uACBD\uC6B0"}]:[],...$==="commented"&&_.comment_contains===void 0?[{key:"comment_contains",label:"\uB313\uAE00\uC5D0 ~ \uB2E8\uC5B4\uAC00 \uD3EC\uD568\uB41C \uACBD\uC6B0"}]:[],...$==="commented"&&_.comment_by_others===void 0?[{key:"comment_by_others",label:"\uCC45\uC784\uC790\uAC00 \uC544\uB2CC \uC0AC\uB78C\uC774 \uC4F4 \uACBD\uC6B0"}]:[],...$==="overdue"&&_.overdue_days===void 0?[{key:"overdue_days",label:"\uB9C8\uAC10 \uD6C4 \uBA70\uCE60 \uC9C0\uB09C \uACBD\uC6B0"}]:[]],H=async W=>{if(!s)return;let Z=W==="manager_account"?_.manager_account_seq??0:_.receiver_account_seq??0,J=await s(Z,W==="manager_account"?"\uCC45\uC784\uC790":"\uCC38\uC870\uC790");J&&m(K=>{let ee={...K.condition};return W==="manager_account"?(ee.manager_account_seq=J.accountSeq,ee.manager_name=J.name):(ee.receiver_account_seq=J.accountSeq,ee.receiver_name=J.name),{...K,condition:ee}})},V=W=>{z(null),W==="group_seq"?C("group_seq",Number(w[0]?.value)||0):W==="kind"?C("is_bug",!0):W==="priority"?C("priority","high"):W==="label_key"?C("label_key",y[0]?.value??""):W==="title_contains"?m(Z=>({...Z,condition:{...Z.condition,title_contains:""}})):W==="manager_empty"?C("manager_empty",!0):W==="manager_account"||W==="receiver_account"?H(W):W==="from_status"?C("from_status",Wn[0]?.key??""):W==="to_status"?C("to_status",Wn[0]?.key??""):W==="changed_field"?C("changed_field",_l[0]?.value??""):W==="comment_contains"?m(Z=>({...Z,condition:{...Z.condition,comment_contains:""}})):W==="comment_by_others"?C("comment_by_others",!0):W==="overdue_days"&&C("overdue_days",1)},A=W=>{if(W==="kind"){C("is_bug",""),C("is_event","");return}if(W==="manager_account"){C("manager_account_seq",""),C("manager_name","");return}if(W==="receiver_account"){C("receiver_account_seq",""),C("receiver_name","");return}C(W==="group_seq"?"group_seq":W,"")},q=[...T.set_status===void 0?[{key:"set_status",label:"\uC0C1\uD0DC \uBC14\uAFB8\uAE30"}]:[],...T.set_priority===void 0?[{key:"set_priority",label:"\uC911\uC694\uB3C4 \uBC14\uAFB8\uAE30"}]:[],...T.add_label_key===void 0&&y.length>0?[{key:"add_label_key",label:"\uB77C\uBCA8 \uBD99\uC774\uAE30"}]:[],...s&&T.assign_manager_account_seq===void 0?[{key:"assign_manager",label:"\uCC45\uC784\uC790 \uC9C0\uC815\uD558\uAE30"}]:[],...s&&T.add_receiver_account_seq===void 0?[{key:"add_receiver",label:"\uCC38\uC870\uC790 \uCD94\uAC00\uD558\uAE30"}]:[],...o.length>0&&T.apply_content_template_seq===void 0?[{key:"apply_content_template",label:"\uBCF8\uBB38 \uC591\uC2DD \uCC44\uC6B0\uAE30"}]:[],...s&&T.notify_account_seq===void 0?[{key:"notify",label:"\uC54C\uB9BC \uBCF4\uB0B4\uAE30"}]:[]],B=async W=>{if(!s)return;let Z=W==="assign_manager"?T.assign_manager_account_seq??0:W==="add_receiver"?T.add_receiver_account_seq??0:T.notify_account_seq??0,J=await s(Z,W==="assign_manager"?"\uCC45\uC784\uC790":W==="add_receiver"?"\uCC38\uC870\uC790":"\uC54C\uB9BC \uBC1B\uC744 \uC0AC\uB78C");J&&m(K=>{let ee={...K.action};return W==="assign_manager"?(ee.assign_manager_account_seq=J.accountSeq,ee.assign_manager_name=J.name):W==="add_receiver"?(ee.add_receiver_account_seq=J.accountSeq,ee.add_receiver_name=J.name):(ee.notify_account_seq=J.accountSeq,ee.notify_name=J.name),{...K,action:ee}})},E=W=>{if(P(null),W==="set_status")S("set_status",Wn[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 Z=o[0];m(J=>({...J,action:{...J.action,apply_content_template_seq:Z?.seq??0,apply_content_template_name:Z?.name??""}}))}else B(W)},j=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()){(0,Yd.ErrorAlert)({message:"\uADDC\uCE59 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694."});return}if(Object.keys(b.action).length===0){(0,Yd.ErrorAlert)({message:"\uB3D9\uC791\uC744 \uD558\uB098 \uC774\uC0C1 \uCD94\uAC00\uD558\uC138\uC694."});return}let W=N?b.sort_no:f.reduce((J,K)=>Math.max(J,K.sort_no),0)+1;k(!0);let Z=N?await n(d,{...b,sort_no:W}):await t({...b,sort_no:W});k(!1),Z&&L()},X=(W,Z,J,K)=>(0,qe.jsxs)(vt.Box,{sx:S3,children:[(0,qe.jsx)(vt.Box,{sx:T3,children:W}),(0,qe.jsxs)(vt.Box,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:K?"column":"row",alignItems:K?"stretch":"center",gap:K?.5:1},children:[Z,K?(0,qe.jsx)(vt.Box,{sx:{fontSize:13.5,color:"#37352f"},children:K}):null]}),(0,qe.jsx)(vt.Tooltip,{title:"\uC774 \uC904 \uBE7C\uAE30",arrow:!0,disableInteractive:!0,children:(0,qe.jsx)(vt.IconButton,{size:"small","aria-label":`${W} \uC904 \uBE7C\uAE30`,onClick:J,children:(0,qe.jsx)(D2.default,{sx:{fontSize:16}})})})]}),G=()=>(0,qe.jsxs)(vt.Box,{sx:{display:"flex",flexDirection:"column",gap:2.5},children:[(0,qe.jsx)(ln.ClearTextField,{size:"medium",label:"\uADDC\uCE59 \uC774\uB984",inputRef:I,placeholder:"\uC608: \uC811\uC218 \uC624\uB958 \uC790\uB3D9 \uBC30\uC815",value:b.name,onChange:W=>m(Z=>({...Z,name:W.target.value}))}),(0,qe.jsx)(vt.Box,{sx:{display:"flex",alignItems:"center",gap:2,flexWrap:"wrap"},children:Xd.map(W=>{let Z=$===W.value;return(0,qe.jsx)(vt.Button,{disableElevation:!0,variant:Z?"contained":"outlined",color:Z?"primary":"inherit",onClick:()=>D(W.value),sx:{borderRadius:99,px:1.75,...Z?{}:{color:"#57564f",borderColor:"#d9d9d6"}},children:W.label},W.value)})}),(0,qe.jsx)(vt.Box,{sx:{fontSize:13,color:"#787774",mt:-.5},children:Xd.find(W=>W.value===$)?.hint}),(0,qe.jsxs)(vt.Box,{sx:{display:"flex",alignItems:"center",gap:1,mt:.5},children:[(0,qe.jsx)(vt.Box,{sx:R2,children:"\uC5B4\uB5A4 \uC5C5\uBB34\uC77C \uB54C"}),F.length>0?(0,qe.jsx)(vt.Button,{size:"small",startIcon:(0,qe.jsx)(tu.default,{sx:{fontSize:16}}),onClick:W=>z(W.currentTarget),sx:{color:"#2563eb",minWidth:0},children:"\uC870\uAC74 \uCD94\uAC00"}):null]}),_.group_seq!==void 0?X("\uD504\uB85C\uC81D\uD2B8",(0,qe.jsx)(ln.LabelSelect,{size:"medium",fullWidth:!0,label:"",value:String(_.group_seq),options:w,onChange:W=>C("group_seq",Number(W.target.value)||"")}),()=>A("group_seq")):null,R?X("\uC885\uB958",(0,qe.jsx)(ln.LabelSelect,{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 Z=W.target.value==="bug";C("is_bug",Z?!0:""),C("is_event",Z?"":!0)}}),()=>A("kind")):null,_.priority!==void 0?X("\uC911\uC694\uB3C4",(0,qe.jsx)(ln.LabelSelect,{size:"medium",fullWidth:!0,label:"",value:_.priority,options:ru,onChange:W=>C("priority",W.target.value)}),()=>A("priority")):null,_.label_key!==void 0?X("\uB77C\uBCA8",(0,qe.jsx)(ln.LabelSelect,{size:"medium",fullWidth:!0,label:"",value:_.label_key,options:y,onChange:W=>C("label_key",W.target.value)}),()=>A("label_key")):null,_.title_contains!==void 0?X("\uC81C\uBAA9",(0,qe.jsx)(ln.ClearTextField,{size:"medium",fullWidth:!0,placeholder:"\uD3EC\uD568\uD560 \uB0B1\uB9D0 (\uC608: \uAE34\uAE09)",value:_.title_contains,onChange:W=>m(Z=>({...Z,condition:{...Z.condition,title_contains:W.target.value}}))}),()=>A("title_contains")):null,_.manager_empty!==void 0?X("\uCC45\uC784\uC790",(0,qe.jsx)(ln.LabelSelect,{size:"medium",fullWidth:!0,label:"",value:_.manager_empty?"empty":"assigned",options:[{value:"empty",label:"\uC5C6\uC74C"},{value:"assigned",label:"\uC788\uC74C"}],onChange:W=>C("manager_empty",W.target.value==="empty")}),()=>A("manager_empty")):null,_.manager_account_seq!==void 0?X("\uCC45\uC784\uC790",(0,qe.jsx)(vt.Button,{size:"medium",variant:"outlined",color:"inherit",onClick:()=>{H("manager_account")},children:_.manager_name||`\uACC4\uC815 #${_.manager_account_seq}`}),()=>A("manager_account")):null,_.receiver_account_seq!==void 0?X("\uCC38\uC870\uC790",(0,qe.jsx)(vt.Button,{size:"medium",variant:"outlined",color:"inherit",onClick:()=>{H("receiver_account")},children:_.receiver_name||`\uACC4\uC815 #${_.receiver_account_seq}`}),()=>A("receiver_account")):null,_.from_status!==void 0?X("\uC774 \uC0C1\uD0DC\uC5D0\uC11C",(0,qe.jsx)(ln.LabelSelect,{size:"medium",fullWidth:!0,label:"",value:_.from_status,options:v,onChange:W=>C("from_status",W.target.value)}),()=>A("from_status")):null,_.to_status!==void 0?X("\uC774 \uC0C1\uD0DC\uB85C",(0,qe.jsx)(ln.LabelSelect,{size:"medium",fullWidth:!0,label:"",value:_.to_status,options:v,onChange:W=>C("to_status",W.target.value)}),()=>A("to_status")):null,_.changed_field!==void 0?X("\uBCC0\uACBD \uD544\uB4DC",(0,qe.jsx)(ln.LabelSelect,{size:"medium",fullWidth:!0,label:"",value:_.changed_field,options:_l,onChange:W=>C("changed_field",W.target.value)}),()=>A("changed_field")):null,_.comment_contains!==void 0?X("\uB313\uAE00 \uB0B1\uB9D0",(0,qe.jsx)(ln.ClearTextField,{size:"medium",fullWidth:!0,placeholder:"\uD3EC\uD568\uD560 \uB0B1\uB9D0 (\uC608: \uD68C\uC2E0)",value:_.comment_contains,onChange:W=>m(Z=>({...Z,condition:{...Z.condition,comment_contains:W.target.value}}))}),()=>A("comment_contains")):null,_.comment_by_others!==void 0?X("\uB313\uAE00 \uC791\uC131\uC790",(0,qe.jsx)(ln.LabelSelect,{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=>C("comment_by_others",W.target.value==="others")}),()=>A("comment_by_others")):null,_.overdue_days!==void 0?X("\uACBD\uACFC\uC77C",(0,qe.jsx)(ln.ClearTextField,{size:"medium",fullWidth:!0,type:"number",value:String(_.overdue_days),onChange:W=>C("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"}),()=>A("overdue_days")):null,Object.keys(_).length===0?(0,qe.jsx)(vt.Box,{sx:{fontSize:13.5,color:"#9a9a97"},children:"\uC870\uAC74\uC774 \uC5C6\uC73C\uBA74 \uBAA8\uB4E0 \uC5C5\uBB34\uC5D0 \uC2E4\uD589\uB429\uB2C8\uB2E4."}):null,(0,qe.jsxs)(vt.Box,{sx:{display:"flex",alignItems:"center",gap:1,mt:.5},children:[(0,qe.jsx)(vt.Box,{sx:R2,children:"\uBB34\uC5C7\uC744 \uD560\uAE4C\uC694"}),q.length>0?(0,qe.jsx)(vt.Button,{size:"small",startIcon:(0,qe.jsx)(tu.default,{sx:{fontSize:16}}),onClick:W=>P(W.currentTarget),sx:{color:"#2563eb",minWidth:0},children:"\uB3D9\uC791 \uCD94\uAC00"}):null]}),T.set_status!==void 0?X("\uC0C1\uD0DC",(0,qe.jsx)(ln.LabelSelect,{size:"medium",fullWidth:!0,label:"",value:T.set_status,options:v,onChange:W=>S("set_status",W.target.value)}),()=>j("set_status")):null,T.set_priority!==void 0?X("\uC911\uC694\uB3C4",(0,qe.jsx)(ln.LabelSelect,{size:"medium",fullWidth:!0,label:"",value:T.set_priority,options:ru,onChange:W=>S("set_priority",W.target.value)}),()=>j("set_priority")):null,T.apply_content_template_seq!==void 0?X("\uBCF8\uBB38 \uC591\uC2DD",(0,qe.jsx)(ln.LabelSelect,{size:"medium",fullWidth:!0,label:"",value:String(T.apply_content_template_seq),options:o.map(W=>({value:String(W.seq),label:W.name})),onChange:W=>{let Z=o.find(J=>String(J.seq)===String(W.target.value));m(J=>({...J,action:{...J.action,apply_content_template_seq:Z?.seq??0,apply_content_template_name:Z?.name??""}}))}}),()=>j("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,T.add_label_key!==void 0?X("\uB77C\uBCA8",(0,qe.jsx)(ln.LabelSelect,{size:"medium",fullWidth:!0,label:"",value:T.add_label_key,options:y,onChange:W=>S("add_label_key",W.target.value)}),()=>j("add_label_key")):null,T.assign_manager_account_seq!==void 0?X("\uCC45\uC784\uC790",(0,qe.jsx)(vt.Button,{size:"medium",variant:"outlined",color:"inherit",onClick:()=>{B("assign_manager")},children:T.assign_manager_name||`\uACC4\uC815 #${T.assign_manager_account_seq}`}),()=>j("assign_manager")):null,T.add_receiver_account_seq!==void 0?X("\uCC38\uC870\uC790",(0,qe.jsx)(vt.Button,{size:"medium",variant:"outlined",color:"inherit",onClick:()=>{B("add_receiver")},children:T.add_receiver_name||`\uACC4\uC815 #${T.add_receiver_account_seq}`}),()=>j("add_receiver")):null,T.notify_account_seq!==void 0?X("\uC54C\uB9BC",(0,qe.jsxs)(qe.Fragment,{children:[(0,qe.jsx)(vt.Button,{size:"medium",variant:"outlined",color:"inherit",onClick:()=>{B("notify")},sx:{flexShrink:0},children:T.notify_name||`\uACC4\uC815 #${T.notify_account_seq}`}),(0,qe.jsx)(ln.ClearTextField,{size:"medium",fullWidth:!0,placeholder:"\uC54C\uB9BC \uBB38\uAD6C(\uBE44\uC6B0\uBA74 \uAE30\uBCF8 \uBB38\uAD6C)",value:T.notify_message??"",onChange:W=>S("notify_message",W.target.value)})]}),()=>j("notify")):null,Object.keys(T).length===0?(0,qe.jsx)(vt.Box,{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,(0,qe.jsx)(vt.Menu,{transitionDuration:0,anchorEl:M,open:!!M,onClose:()=>z(null),children:F.map(W=>(0,qe.jsx)(vt.MenuItem,{dense:!0,onClick:()=>V(W.key),sx:{fontSize:14},children:W.label},W.key))}),(0,qe.jsx)(vt.Menu,{transitionDuration:0,anchorEl:O,open:!!O,onClose:()=>P(null),children:q.map(W=>(0,qe.jsx)(vt.MenuItem,{dense:!0,onClick:()=>E(W.key),sx:{fontSize:14},children:W.label},W.key))})]});return(0,qe.jsxs)(qe.Fragment,{children:[(0,qe.jsx)(Gd.FormDialog,{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:(0,qe.jsxs)(vt.Box,{sx:{display:"flex",flexDirection:"column",px:2.5,py:2},children:[f.length===0?(0,qe.jsxs)(vt.Box,{sx:{py:4,display:"flex",flexDirection:"column",alignItems:"center",gap:2,color:"#9a9a97"},children:[(0,qe.jsx)(A2.default,{sx:{fontSize:48,color:"#d9d9d6"}}),(0,qe.jsx)(vt.Box,{sx:{fontSize:15},children:"\uB4F1\uB85D\uB41C \uADDC\uCE59\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."})]}):null,f.map(W=>(0,qe.jsxs)(vt.Box,{sx:{display:"flex",alignItems:"center",gap:2,py:1,"&:not(:last-of-type)":{borderBottom:"1px solid #ececea"},opacity:W.enabled?1:.5},children:[(0,qe.jsx)(vt.Tooltip,{title:W.enabled?"\uC0AC\uC6A9 \uC911":"\uAEBC\uC9D0",arrow:!0,disableInteractive:!0,children:(0,qe.jsx)(vt.Switch,{size:"small",inputProps:{"aria-label":`${W.name} \uADDC\uCE59 \uC0AC\uC6A9`},checked:W.enabled,onChange:(Z,J)=>c(W.seq,J)})}),(0,qe.jsxs)(vt.Box,{sx:{flex:1,minWidth:0},children:[(0,qe.jsx)(vt.Box,{sx:{fontSize:16,fontWeight:600,color:"#37352f"},children:W.name}),(()=>{let Z=k3(W,g,l);return(0,qe.jsxs)(vt.Box,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:.5,fontSize:15,color:"#6f6f6c"},children:[(0,qe.jsx)(vt.Box,{component:"span",children:Z.left}),(0,qe.jsx)(O2.default,{sx:{fontSize:18,color:"#9a9a97",flexShrink:0}}),(0,qe.jsx)(vt.Box,{component:"span",children:Z.right})]})})()]}),(0,qe.jsx)(vt.IconButton,{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:_l[0]?.value??""}:{}},action:{...W.action}}),h(!0)},children:(0,qe.jsx)(P2.default,{sx:{fontSize:18}})}),(0,qe.jsx)(vt.IconButton,{size:"small","aria-label":`${W.name} \uADDC\uCE59 \uC0AD\uC81C`,onClick:()=>i(W.seq),children:(0,qe.jsx)(gn,{sx:{fontSize:18}})})]},W.seq))]})}],actions:{showCancelButton:!1,left:(0,qe.jsx)(vt.Button,{startIcon:(0,qe.jsx)(tu.default,{}),onClick:()=>{u(0),m(Qc()),h(!0)},sx:{color:"#2563eb"},children:"\uC0C8 \uADDC\uCE59"}),right:(0,qe.jsx)(vt.Button,{variant:"contained",onClick:r,children:"\uB2EB\uAE30"})}}),(0,qe.jsx)(Gd.FormDialog,{open:a,onClose:L,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:G()}],actions:{showCancelButton:!0,right:(0,qe.jsx)(vt.Button,{variant:"contained",onClick:()=>{U()},disabled:x,children:N?"\uC218\uC815":"\uADDC\uCE59 \uCD94\uAC00"})}})]})}var ro=require("react"),Et=require("@mui/material"),Zd=Y(require("@mui/icons-material/Add"),1),z2=Y(require("@mui/icons-material/EditOutlined"),1),j2=Y(require("@mui/icons-material/ContentCopyOutlined"),1),F2=Y(require("@mui/icons-material/DragIndicator"),1),q2=Y(require("@mui/icons-material/Close"),1),$2=Y(require("@mui/icons-material/PlaylistAddCheckOutlined"),1),oi=require("@dnd-kit/core"),iu=require("@dnd-kit/modifiers"),_i=require("@dnd-kit/sortable"),H2=require("@dnd-kit/utilities"),Jd=require("@ehfuse/mui-form-dialog"),ni=require("@ehfuse/mui-form-controls"),W2=Y(require("@ehfuse/overlay-scrollbar"),1),kl=require("@ehfuse/alerts");var Qe=require("react/jsx-runtime"),B3=[{value:"high",label:"\uB192\uC74C"},{value:"medium",label:"\uC911\uAC04"},{value:"low",label:"\uB0AE\uC74C"}],N2="\uC5C5\uBB34 \uC81C\uBAA9",Qd=2,nu={flex:1,minWidth:0},L2=56,U2=20,I3=`${U2+Qd*8}px`;function ou(){return{name:"",description:"",group_seq:0,items:[]}}function E3(){return{title:"",start_offset_days:0,due_offset_days:0,priority:"medium"}}function M3({id:e,children:f}){let{attributes:g,listeners:l,setNodeRef:o,transform:s,transition:r,isDragging:t}=(0,_i.useSortable)({id:e});return(0,Qe.jsx)(Et.Box,{ref:o,sx:{transform:H2.CSS.Transform.toString(s),transition:r,...t?{opacity:.6,position:"relative",zIndex:1}:{}},children:f({handleProps:{...g,...l},dragging:t})})}function R3({open:e,templates:f,customTabs:g,onPickAccount:l,onClose:o,onCreate:s,onUpdate:r,onRemove:t,onRun:n}){let[c,i]=(0,ro.useState)(!1),[a,h]=(0,ro.useState)(0),[d,u]=(0,ro.useState)(ou()),[b,m]=(0,ro.useState)(!1),[x,k]=(0,ro.useState)([]),I=(0,ro.useRef)(0),[M,z]=(0,ro.useState)(0),O=(0,ro.useRef)(null),P=(0,ro.useRef)(null);(0,ro.useEffect)(()=>{if(e)return;let F=window.setTimeout(()=>{i(!1),h(0),u(ou()),k([])},500);return()=>window.clearTimeout(F)},[e]);let N=()=>(I.current+=1,`template-item-${I.current}`),$=(F,H)=>{h(F),u(H),k(H.items.map(()=>N())),i(!0)},L=d.items.map((F,H)=>x[H]??`template-item-fallback-${H}`),C=()=>{let F=P.current?.getScrollContainer()??null;if(F){F.scrollTop=F.scrollHeight;return}let H=O.current?.querySelectorAll("*")??[];for(let V of Array.from(H))if(V.scrollHeight>V.clientHeight+1){V.scrollTop=V.scrollHeight;return}},S=()=>{let F=O.current;if(!F)return null;let H=F.querySelectorAll("input[data-template-title]"),V=H.length?H:F.querySelectorAll(`input[placeholder="${N2}"]`);return V.length?V[V.length-1]:null};(0,ro.useEffect)(()=>{if(M===0)return;let F=0,H=0,V=()=>{C();let q=S();q&&document.activeElement!==q&&q.focus(),F+=1,!(q&&document.activeElement===q)&&F<8&&(H=window.setTimeout(V,50))},A=window.requestAnimationFrame(V);return()=>{window.cancelAnimationFrame(A),window.clearTimeout(H)}},[M]);let D=g.filter(F=>!F.archived).map(F=>({value:String(bi(F.key)),label:F.label})),p=(F,H)=>{u(V=>({...V,items:V.items.map((A,q)=>q===F?{...A,...H}:A)}))},y=(0,oi.useSensors)((0,oi.useSensor)(oi.PointerSensor,{activationConstraint:{distance:5}})),v=F=>{let H=String(F.active?.id??""),V=String(F.over?.id??"");if(!H||!V||H===V)return;let A=L.indexOf(H),q=L.indexOf(V);A<0||q<0||(u(B=>({...B,items:(0,_i.arrayMove)(B.items,A,q)})),k(B=>(0,_i.arrayMove)(B,A,q)))},w=async F=>{if(!l)return;let H=await l(d.items[F]?.manager_account_seq??0,"\uCC45\uC784\uC790");H&&p(F,{manager_account_seq:H.accountSeq,manager_name:H.name})},_=async()=>{let F=d.name.trim();if(!F){(0,kl.ErrorAlert)({message:"\uD15C\uD50C\uB9BF \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694."});return}let H=d.items.filter(q=>q.title.trim().length>0);if(H.length===0){(0,kl.ErrorAlert)({message:"\uC5C5\uBB34 \uD56D\uBAA9\uC744 \uD55C \uC904 \uC774\uC0C1 \uB123\uC73C\uC138\uC694."});return}m(!0);let V={...d,name:F,items:H},A=a>0?await r(a,V):await s(V);m(!1),A&&(i(!1),h(0),u(ou()))},T=(0,Qe.jsx)(Et.Box,{children:f.length===0?(0,Qe.jsxs)(Et.Box,{sx:{py:4,display:"flex",flexDirection:"column",alignItems:"center",gap:2,color:"#9a9a97"},children:[(0,Qe.jsx)($2.default,{sx:{fontSize:48,color:"#d9d9d6"}}),(0,Qe.jsx)(Et.Box,{sx:{fontSize:13.5},children:"\uB4F1\uB85D\uB41C \uD15C\uD50C\uB9BF\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."})]}):f.map(F=>(0,Qe.jsxs)(Et.Box,{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:[(0,Qe.jsxs)(Et.Box,{sx:{flex:1,minWidth:0},children:[(0,Qe.jsx)(Et.Box,{sx:{fontSize:18,fontWeight:600,color:"#37352f"},children:F.name}),(0,Qe.jsxs)(Et.Box,{sx:{fontSize:14,color:"#787774",mt:.25},children:["\uC5C5\uBB34 ",F.items.length,"\uAC74",F.description?` \xB7 ${F.description}`:""]})]}),n?(0,Qe.jsx)(Et.Button,{size:"medium",variant:"outlined",onClick:()=>n(F),sx:{flexShrink:0},children:"\uC2E4\uD589"}):null,(0,Qe.jsx)(Et.Tooltip,{title:"\uC218\uC815",arrow:!0,disableInteractive:!0,children:(0,Qe.jsx)(Et.IconButton,{size:"medium","aria-label":`${F.name} \uD15C\uD50C\uB9BF \uC218\uC815`,onClick:()=>$(F.seq,{name:F.name,description:F.description??"",group_seq:F.group_seq??0,items:F.items.map(H=>({...H}))}),children:(0,Qe.jsx)(z2.default,{sx:{fontSize:19}})})}),(0,Qe.jsx)(Et.Tooltip,{title:"\uBCF5\uC81C",arrow:!0,disableInteractive:!0,children:(0,Qe.jsx)(Et.IconButton,{size:"medium","aria-label":`${F.name} \uD15C\uD50C\uB9BF \uBCF5\uC81C`,onClick:()=>$(0,{name:`${F.name} \uC0AC\uBCF8`,description:F.description??"",group_seq:F.group_seq??0,items:F.items.map(H=>({...H}))}),children:(0,Qe.jsx)(j2.default,{sx:{fontSize:18}})})}),(0,Qe.jsx)(Et.Tooltip,{title:"\uC0AD\uC81C",arrow:!0,disableInteractive:!0,children:(0,Qe.jsx)(Et.IconButton,{size:"medium","aria-label":`${F.name} \uD15C\uD50C\uB9BF \uC0AD\uC81C`,onClick:()=>{(async()=>await(0,kl.ConfirmDialog)({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:(0,Qe.jsx)(gn,{sx:{fontSize:18}})})})]},F.seq))}),R=(0,Qe.jsxs)(Et.Box,{sx:{display:"flex",flexDirection:"column",gap:3},children:[(0,Qe.jsx)(ni.ClearTextField,{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(H=>({...H,name:F.target.value}))}),(0,Qe.jsxs)(Et.Box,{sx:{display:"grid",gridTemplateColumns:D.length>0?"1fr 1fr":"1fr",gap:2},children:[(0,Qe.jsx)(ni.ClearTextField,{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(H=>({...H,description:F.target.value}))}),D.length>0?(0,Qe.jsx)(ni.LabelSelect,{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(H=>({...H,group_seq:Number(F.target.value)||0}))}):null]}),(0,Qe.jsxs)(Et.Box,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[(0,Qe.jsx)(Et.Box,{sx:{fontSize:18,fontWeight:600,color:"#37352f"},children:"\uC5C5\uBB34 \uD56D\uBAA9"}),(0,Qe.jsx)(Et.Box,{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?(0,Qe.jsx)(Et.Box,{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.'}):(0,Qe.jsx)(Et.Box,{ref:O,sx:{border:"1px solid #e6e6e3",borderRadius:1,overflow:"hidden"},children:(0,Qe.jsx)(W2.default,{ref:P,style:{maxHeight:"min(560px, 52vh)"},thumb:{width:6},children:(0,Qe.jsx)(oi.DndContext,{sensors:y,collisionDetection:oi.closestCenter,modifiers:[iu.restrictToVerticalAxis,iu.restrictToParentElement],onDragEnd:v,children:(0,Qe.jsx)(_i.SortableContext,{items:L,strategy:_i.verticalListSortingStrategy,children:d.items.map((F,H)=>(0,Qe.jsx)(M3,{id:L[H],children:({handleProps:V})=>(0,Qe.jsxs)(Et.Box,{sx:{borderBottom:H===d.items.length-1?"none":"1px solid #f2f2f0",px:Qd,py:2,gap:2,display:"flex",flexDirection:"column"},children:[(0,Qe.jsxs)(Et.Box,{sx:{display:"flex",alignItems:"center",gap:Qd},children:[(0,Qe.jsx)(Et.Box,{...V,"aria-label":`${H+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:(0,Qe.jsx)(F2.default,{sx:{fontSize:U2}})}),(0,Qe.jsx)(ni.ClearTextField,{size:"medium",fullWidth:!0,placeholder:N2,slotProps:{htmlInput:{"data-template-title":H}},value:F.title,onChange:A=>p(H,{title:A.target.value})})]}),(0,Qe.jsxs)(Et.Box,{sx:{display:"flex",alignItems:"center",gap:2,pl:I3},children:[(0,Qe.jsx)(Et.Box,{sx:nu,children:(0,Qe.jsx)(ni.NumberField,{size:"medium",fullWidth:!0,label:"\uC2DC\uC791 D+",thousandSeparator:!1,align:"right",suffix:"\uC77C",value:F.start_offset_days??null,onValueChange:A=>p(H,{start_offset_days:A===null?void 0:Math.trunc(Number(A))})})}),(0,Qe.jsx)(Et.Box,{sx:nu,children:(0,Qe.jsx)(ni.NumberField,{size:"medium",fullWidth:!0,label:"\uB9C8\uAC10 D+",thousandSeparator:!1,align:"right",suffix:"\uC77C",value:F.due_offset_days??null,onValueChange:A=>p(H,{due_offset_days:A===null?void 0:Math.trunc(Number(A))})})}),(0,Qe.jsx)(Et.Box,{sx:nu,children:(0,Qe.jsx)(ni.LabelSelect,{size:"medium",fullWidth:!0,label:"\uC911\uC694\uB3C4",value:F.priority??"medium",options:B3,onChange:A=>p(H,{priority:A.target.value})})}),l?(0,Qe.jsxs)(Et.Box,{sx:{...nu,position:"relative"},children:[(0,Qe.jsx)(Et.Button,{variant:"outlined",fullWidth:!0,onClick:()=>{w(H)},sx:{height:L2,display:"block",textAlign:"left",textTransform:"none",fontSize:16,fontWeight:400,lineHeight:`${L2-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?(0,Qe.jsx)(Et.Tooltip,{title:"\uCC45\uC784\uC790 \uBE44\uC6B0\uAE30",arrow:!0,disableInteractive:!0,children:(0,Qe.jsx)(Et.IconButton,{size:"small","aria-label":`${H+1}\uBC88 \uD56D\uBAA9 \uCC45\uC784\uC790 \uBE44\uC6B0\uAE30`,onClick:A=>{A.stopPropagation(),p(H,{manager_account_seq:0,manager_name:""})},sx:{position:"absolute",right:6,top:"50%",transform:"translateY(-50%)"},children:(0,Qe.jsx)(q2.default,{sx:{fontSize:18}})})}):null]}):null,(0,Qe.jsx)(Et.Tooltip,{title:"\uD56D\uBAA9 \uC0AD\uC81C",arrow:!0,disableInteractive:!0,children:(0,Qe.jsx)(Et.IconButton,{size:"medium","aria-label":`${H+1}\uBC88 \uD56D\uBAA9 \uC0AD\uC81C`,onClick:()=>{u(A=>({...A,items:A.items.filter((q,B)=>B!==H)})),k(A=>A.filter((q,B)=>B!==H))},children:(0,Qe.jsx)(gn,{sx:{fontSize:18}})})})]})]})},L[H]))})})})})]});return(0,Qe.jsxs)(Qe.Fragment,{children:[(0,Qe.jsx)(Jd.FormDialog,{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:(0,Qe.jsx)(Et.Button,{startIcon:(0,Qe.jsx)(Zd.default,{sx:{fontSize:18}}),onClick:()=>$(0,ou()),children:"\uC0C8 \uD15C\uD50C\uB9BF"}),right:(0,Qe.jsx)(Et.Button,{variant:"contained",onClick:o,children:"\uB2EB\uAE30"})},sectionContentPaddingTop:0,sections:[{id:"templates",title:"",showTitle:!1,children:T}]}),(0,Qe.jsx)(Jd.FormDialog,{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:(0,Qe.jsx)(Et.Button,{startIcon:(0,Qe.jsx)(Zd.default,{sx:{fontSize:18}}),onClick:()=>{u(F=>({...F,items:[...F.items,E3()]})),k(F=>[...F,N()]),z(F=>F+1)},children:"\uD56D\uBAA9 \uCD94\uAC00"}),right:(0,Qe.jsx)(Et.Button,{variant:"contained",disabled:b,onClick:()=>{_()},children:"\uC800\uC7A5"})},sectionContentPaddingTop:0,sections:[{id:"template-form",title:"",showTitle:!1,children:R}]})]})}var aa=require("react"),pn=require("@mui/material"),V2=require("@ehfuse/mui-form-dialog"),K2=require("@ehfuse/mui-form-controls"),G2=Y(require("@ehfuse/overlay-scrollbar"),1);var Gr=require("react/jsx-runtime");function O3({open:e,template:f,todayStr:g,running:l=!1,onClose:o,onRun:s}){let[r,t]=(0,aa.useState)(g),[n,c]=(0,aa.useState)(f);(0,aa.useEffect)(()=>{f&&c(f)},[f]),(0,aa.useEffect)(()=>{e&&t(g)},[e]);let i=f??n,a=i?Bf(i,r):[];return(0,Gr.jsx)(V2.FormDialog,{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:(0,Gr.jsx)(pn.Button,{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:(0,Gr.jsxs)(pn.Box,{sx:{display:"flex",flexDirection:"column",gap:2},children:[(0,Gr.jsxs)(pn.Box,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[(0,Gr.jsx)(pn.Box,{sx:{width:72,flexShrink:0,fontSize:16,color:"#37352f"},children:"\uAE30\uC900\uC77C"}),(0,Gr.jsx)(K2.DateTextField,{size:"medium",fullWidth:!0,value:r,onChange:h=>t(h.target.value)})]}),(0,Gr.jsx)(pn.Box,{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."}),(0,Gr.jsxs)(pn.Box,{sx:{border:"1px solid #e6e6e3",borderRadius:1,overflow:"hidden"},children:[(0,Gr.jsxs)(pn.Box,{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:[(0,Gr.jsx)(pn.Box,{sx:{flex:1,minWidth:0},children:"\uC5C5\uBB34"}),(0,Gr.jsx)(pn.Box,{sx:{width:88,flexShrink:0,textAlign:"center"},children:"\uC2DC\uC791"}),(0,Gr.jsx)(pn.Box,{sx:{width:88,flexShrink:0,textAlign:"center"},children:"\uB9C8\uAC10"}),(0,Gr.jsx)(pn.Box,{sx:{width:96,flexShrink:0,textAlign:"center"},children:"\uCC45\uC784\uC790"})]}),(0,Gr.jsx)(G2.default,{style:{maxHeight:520},thumb:{width:6},children:a.length===0?(0,Gr.jsx)(pn.Box,{sx:{p:2,fontSize:14,color:"#9a9a97"},children:"\uB9CC\uB4E4 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):a.map((h,d)=>(0,Gr.jsxs)(pn.Box,{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:[(0,Gr.jsx)(pn.Box,{sx:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:h.title}),(0,Gr.jsx)(pn.Box,{sx:{width:88,flexShrink:0,textAlign:"center",fontSize:13.5,color:h.start_date?"#37352f":"#9a9a97"},children:rc(h.start_date)||"-"}),(0,Gr.jsx)(pn.Box,{sx:{width:88,flexShrink:0,textAlign:"center",fontSize:13.5,color:h.due_date?"#37352f":"#9a9a97"},children:rc(h.due_date)||"-"}),(0,Gr.jsx)(pn.Box,{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 A3={urgent:"\uAE34\uAE09",high:"\uB192\uC74C",normal:"\uC911\uAC04",low:"\uB0AE\uC74C"};function D3(e){return e.length===0?"":e.length<=2?e.join(", "):`${e[0]} \uC678 ${e.length-1}\uBA85`}function su(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 vs(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 au(e,f){let l=String(e.due_date??"").slice(11,16).trim()||String(e.estimated_time??"").trim(),o=su(e.due_date),s=String(e.start_date??"").slice(11,16).trim(),r=su(e.start_date),t=(e.receiver_names??[]).filter(Boolean).map(c=>String(c).trim()),n=(e.checklist??[]).length?`${(e.checklist??[]).filter(c=>c.checked).length}/${(e.checklist??[]).length}`:"";return{seq:Number(e.seq??0),title:String(e.title??"").trim(),statusName:Xr(e).name,projectLabel:e.tab_key?f.get(String(e.tab_key))??"":"",managerName:String(e.manager_name??"").trim(),receiverNames:D3(t),receiverNamesFull:t.join(", "),startDate:r!=="-"&&s?`${r} ${s}`:r,dueDate:o!=="-"&&l?`${o} ${l}`:o,priorityName:A3[String(e.priority??"")]??"",checklist:n,note:String(e.note??"").trim(),completed:!!e.completed}}function ur(e){return String(e??"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function P3(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 Sl(e,f){let g=0;for(let l of String(e??""))g+=P3(l,f);return g}function ws(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 Gi(e,f,g){let l=String(e??"").replace(/\s+/g," ").trim();if(!l)return"";if(Sl(l,g)<=f)return l;let o=Sl("\u2026",g),s="",r=0;for(let t of l){let n=Sl(t,g);if(r+n+o>f)break;s+=t,r+=n}return`${s}\u2026`}var la=595.28,ca=841.89,ua=841.89,fa=595.28,Sn=28,fo=96,no=44,N3="'Malgun Gothic','\uB9D1\uC740 \uACE0\uB515','Apple SD Gothic Neo','Noto Sans KR',sans-serif",L3="'Batang','\uBC14\uD0D5','AppleMyungjo','Noto Serif KR',serif",Tl="#cbd5e1",z3=[`text { font-family: ${N3}; fill: #000000; }`,`.doc-title { font-family: ${L3}; font-size: 20px; font-weight: 700; }`,".doc-sub { font-size: 10.5px; fill: #333333; }",".doc-meta { font-size: 9.5px; fill: #333333; }",".th { font-size: 9.5px; font-weight: 700; fill: #000000; }",".td { font-size: 9px; }",".td.done { fill: #555555; }",".gt { font-size: 10px; font-weight: 700; fill: #000000; }",".label { font-size: 9px; fill: #333333; }",".value { font-size: 10px; }",".section { font-size: 11.5px; font-weight: 700; fill: #000000; }",".pageno { font-size: 9px; fill: #333333; }",`.head { fill: #eef2f7; stroke: ${Tl}; stroke-width: 0.5; }`,`.group { fill: #f8fafc; stroke: ${Tl}; stroke-width: 0.5; }`,`.frame { fill: none; stroke: ${Tl}; stroke-width: 0.5; }`,`.hline { stroke: ${Tl}; stroke-width: 0.5; }`,`.vline { stroke: ${Tl}; 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 ii(e,f,g){let l=g-Sn;return[`<text x="${Sn}" y="46" class="doc-title">${ur(e.documentTitle)}</text>`,`<text x="${Sn}" y="66" class="doc-sub">${ur(e.subtitle)}</text>`,`<text x="${l}" y="42" class="doc-meta" text-anchor="end">${ur(e.facilityName)}</text>`,`<text x="${l}" y="58" class="doc-meta" text-anchor="end">\uCD9C\uB825 ${ur(vs(e.printedAt))}${e.printedBy?` \xB7 ${ur(e.printedBy)}`:""}</text>`,f?`<text x="${l}" y="74" class="doc-meta" text-anchor="end">${ur(f)}</text>`:""].join("")}function si(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>${z3}</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 th=ua,X2=fa,ki=Sn,Cl=th-Sn,Il=22,_s=20,ks=22,Bl=5,Z2=fo,J2=no,Y2=X2-46,El=[{key:"no",label:"\uBC88\uD638",width:30,align:"middle"},{key:"title",label:"\uC81C\uBAA9",width:220,align:"start"},{key:"status",label:"\uC0C1\uD0DC",width:56,align:"middle"},{key:"start",label:"\uC2DC\uC791",width:86,align:"middle"},{key:"due",label:"\uB9C8\uAC10",width:86,align:"middle"},{key:"manager",label:"\uCC45\uC784\uC790",width:62,align:"middle"},{key:"receivers",label:"\uCC38\uC870\uC790",width:122,align:"start"},{key:"priority",label:"\uC911\uC694\uB3C4",width:52,align:"middle"},{key:"project",label:"\uD504\uB85C\uC81D\uD2B8",width:72,align:"middle"}],eh=El.reduce((e,f,g)=>(e.push(g===0?ki:e[g-1]+El[g-1].width),e),[]);function j3(e){let f=[],g=[],l=Z2+Il,o=0,s=(r,t)=>{f.push(g),g=[],l=J2+Il,r&&(g.push({kind:"group",label:r,count:t,continued:!0}),l+=ks)};for(let r of e){r.label&&(l+ks+_s>Y2&&s("",0),g.push({kind:"group",label:r.label,count:r.rows.length,continued:!1}),l+=ks);for(let t of r.rows)l+_s>Y2&&s(r.label,r.rows.length),o+=1,g.push({kind:"row",completed:t.completed,values:El.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"receivers":return t.receiverNames||"-";case"start":return t.startDate;case"due":return t.dueDate;default:return t.priorityName||"-"}})}),l+=_s}return f.push(g),f.filter((r,t)=>t===0||r.length>0)}function F3(e,f){let g=[];g.push(`<rect x="${ki}" y="${f}" width="${Cl-ki}" height="${Il}" class="head" />`),El.forEach((o,s)=>{let r=eh[s],t=o.align==="middle"?r+o.width/2:r+Bl;g.push(`<text x="${t}" y="${f+Il-7}" class="th" text-anchor="${o.align}">${ur(o.label)}</text>`)});let l=f+Il;for(let o of e){if(o.kind==="group"){g.push(`<rect x="${ki}" y="${l}" width="${Cl-ki}" height="${ks}" class="group" />`,`<text x="${ki+Bl}" y="${l+ks-7}" class="gt">${ur(o.continued?`${o.label} (\uC774\uC5B4\uC11C)`:o.label)}</text>`,`<text x="${Cl-Bl}" y="${l+ks-7}" class="gt" text-anchor="end">${o.count}\uAC74</text>`),l+=ks;continue}El.forEach((s,r)=>{let t=eh[r],n=s.align==="middle"?t+s.width/2:t+Bl;g.push(`<text x="${n}" y="${l+_s-6}" class="${o.completed?"td done":"td"}" text-anchor="${s.align}">${ur(Gi(o.values[r]??"",s.width-Bl*2,9))}</text>`)}),g.push(`<line x1="${ki}" y1="${l+_s}" x2="${Cl}" y2="${l+_s}" class="hline" />`),l+=_s}return eh.slice(1).forEach(o=>{g.push(`<line x1="${o}" y1="${f}" x2="${o}" y2="${l}" class="vline" />`)}),g.push(`<rect x="${ki}" y="${f}" width="${Cl-ki}" height="${l-f}" class="frame" />`),g.join("")}async function Q2(e,f){let g=j3(f),l=f.reduce((o,s)=>o+s.rows.length,0);return g.map((o,s)=>{let r=s===0?Z2:J2,t=[s===0?ii(e,`\uC804\uCCB4 ${l}\uAC74`,th):"",F3(o,r)].join("");return si({width:th,height:X2,body:t,pageIndex:s,pageCount:g.length})})}var nh=la,ev=ca,ai=Sn,lu=nh-Sn,q3=ev-46,tv=22,$3=68,H3=(lu-ai)/2,W3=14,rh=58;function da(e){switch(e.kind){case"title":return 34;case"props":return Math.ceil(e.pairs.length/2)*tv+10;case"section":return 26;default:return W3}}function U3(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(`
48
- `).flatMap(l=>l.trim()?ws(l,rh):[""]):["(\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=>{ws(l.label,rh-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}),ws(l.text,rh).forEach(o=>f.push({kind:"line",text:o}))})),f}function V3(e){let f=[],g=[],l=fo;for(let o of e){let s=da(o);l+s>q3&&(f.push(g),g=[],l=no),g.push(o),l+=s}return f.push(g),f}function K3(e,f){switch(e.kind){case"title":{let g=e.ticket?`<text x="${lu}" y="${f+16}" class="doc-meta" text-anchor="end">${ur(e.ticket)}</text>`:"";return{markup:`<text x="${ai}" y="${f+16}" class="section" style="font-size:14px">${ur(e.text)}</text>${g}<line x1="${ai}" y1="${f+24}" x2="${lu}" y2="${f+24}" class="hline" />`,nextY:f+da(e)}}case"props":{let g=[];return e.pairs.forEach((l,o)=>{let s=o%2,r=Math.floor(o/2),t=ai+s*H3,n=f+r*tv;g.push(`<text x="${t}" y="${n+14}" class="label">${ur(l.label)}</text>`,`<text x="${t+$3}" y="${n+14}" class="value">${ur(ws(l.value||"-",26)[0]??"-")}</text>`)}),{markup:g.join(""),nextY:f+da(e)}}case"section":return{markup:`<text x="${ai}" y="${f+16}" class="section">${ur(e.text)}</text><line x1="${ai}" y1="${f+21}" x2="${lu}" y2="${f+21}" class="hline" />`,nextY:f+da(e)};case"check":return{markup:`<text x="${ai}" y="${f+10}" class="td">${e.checked?"\u2611":"\u2610"}</text><text x="${ai+14}" y="${f+10}" class="${e.checked?"td done":"td"}">${ur(e.text)}</text>`,nextY:f+da(e)};default:return{markup:`<text x="${ai}" y="${f+10}" class="${e.muted?"td done":"td"}">${ur(e.text)}</text>`,nextY:f+da(e)}}}async function rv(e,f){let g=V3(U3(f));return g.map((l,o)=>{let s=o===0?fo:no,r=[o===0?ii(e,"",nh):`<text x="${ai}" y="${no-12}" class="doc-meta">${ur(`${f.title} (\uC774\uC5B4\uC11C)`)}</text>`];for(let t of l){let n=K3(t,s);r.push(n.markup),s=n.nextY}return si({width:nh,height:ev,body:r.join(""),pageIndex:o,pageCount:g.length})})}var ih=ua,iv=fa,cu=Sn,Ml=ih-Sn,nv=iv-46,ov=210,Yi=20,oh=24;function Xi(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 sv(e,f){return Math.round((f.getTime()-e.getTime())/864e5)}function G3(e,f){let g=[];e.forEach(r=>{let t=Xi(r.startDate),n=Xi(r.dueDate);t&&g.push(t),n&&g.push(n)});let l=Xi(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,sv(o,s)+1)}}async function av(e,f,g){let l=G3(f,g),o=cu+ov,r=(Ml-o)/l.days,t=Xi(g),n=d=>o+sv(l.start,d)*r,c=Math.max(1,Math.floor((nv-fo-oh)/Yi)),i=Math.max(1,Math.floor((nv-no-oh)/Yi)),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?fo:no,m=[u===0?ii(e,`\uC804\uCCB4 ${f.length}\uAC74`,ih):""],x=b+oh;m.push(`<line x1="${cu}" y1="${x}" x2="${Ml}" y2="${x}" class="vline" />`);for(let k=0;k<l.days;k+=1){let I=new Date(l.start);if(I.setDate(I.getDate()+k),I.getDay()!==0&&k!==0)continue;let M=o+k*r;m.push(`<line x1="${M}" y1="${x}" x2="${M}" y2="${x+d.length*Yi}" class="hline" />`,`<text x="${M+2}" y="${x-6}" class="label">${I.getMonth()+1}.${I.getDate()}</text>`)}if(t&&t>=l.start){let k=n(t);k>=o&&k<=Ml&&m.push(`<line x1="${k}" y1="${x}" x2="${k}" y2="${x+d.length*Yi}" stroke="#f87171" stroke-width="0.8" />`)}return d.forEach((k,I)=>{let M=x+I*Yi,z=Gi(k.title,ov-64,9);m.push(`<text x="${cu}" y="${M+14}" class="${k.completed?"td done":"td"}">${ur(z)}</text>`,`<text x="${o-6}" y="${M+14}" class="label" text-anchor="end">${ur(k.managerName)}</text>`,`<line x1="${cu}" y1="${M+Yi}" x2="${Ml}" y2="${M+Yi}" class="hline" />`);let O=Xi(k.startDate)??Xi(k.dueDate),P=Xi(k.dueDate)??Xi(k.startDate);if(!O||!P)return;let N=n(O),$=Math.max(N+r*.8,n(P)+r*.8),L=k.completed?"bar done":k.overdue?"bar overdue":"bar";m.push(`<rect x="${N}" y="${M+5}" width="${Math.max(3,Math.min($,Ml)-N)}" height="${Yi-10}" rx="2" class="${L}" />`)}),si({width:ih,height:iv,body:m.join(""),pageIndex:u,pageCount:a.length})})}function lv(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 sh=la,uv=ca,ha=Sn,uu=sh-Sn,cv=uv-46,pa=30,ma=18,fv=12;function Y3(e){let f=[],g=[],l=fo,o=(s,r)=>{f.push(g),g=[],l=no,s&&(g.push({kind:"column",label:s,summary:r,continued:!0,gapBefore:!1}),l+=pa)};for(let s of e){let r=g.length>0,t=r?fv:0;if(l+t+pa+ma>cv?(o("",""),g.push({kind:"column",label:s.label,summary:s.summary,continued:!1,gapBefore:!1}),l+=pa):(g.push({kind:"column",label:s.label,summary:s.summary,continued:!1,gapBefore:r}),l+=t+pa),s.items.length===0){g.push({kind:"empty"}),l+=ma;continue}for(let n of s.items)l+ma>cv&&o(s.label,s.summary),g.push({kind:"item",title:n.title,meta:n.meta,completed:n.completed}),l+=ma}return f.push(g),f}async function dv(e,f,g){let l=Y3(f);return l.map((o,s)=>{let r=s===0?fo:no,t=[s===0?ii(e,g,sh):""];for(let n of o){if(n.kind==="column"){n.gapBefore&&(r+=fv),t.push(`<rect x="${ha}" y="${r}" width="${uu-ha}" height="${pa-6}" class="group" />`,`<text x="${ha+6}" y="${r+16}" class="gt">${ur(n.continued?`${n.label} (\uC774\uC5B4\uC11C)`:n.label)}</text>`,`<text x="${uu-6}" y="${r+16}" class="label" text-anchor="end">${ur(n.summary)}</text>`),r+=pa;continue}if(n.kind==="empty"){t.push(`<text x="${ha+12}" y="${r+12}" class="td done">(\uC5C5\uBB34 \uC5C6\uC74C)</text>`),r+=ma;continue}t.push(`<text x="${ha+12}" y="${r+12}" class="${n.completed?"td done":"td"}">${ur(Gi(n.title,uu-ha-12-120,9))}</text>`,`<text x="${uu-6}" y="${r+12}" class="label" text-anchor="end">${ur(n.meta)}</text>`),r+=ma}return si({width:sh,height:uv,body:t.join(""),pageIndex:s,pageCount:l.length})})}var X3=[{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}],Z3="FFEEF2F7",fu="FFCBD5E1";function J3(e){return e.replace(/[\\/:*?"<>|]/g,"_").trim()||"\uC5C5\uBB34\uBAA9\uB85D"}async function mv(e,f){let g=await Promise.resolve().then(()=>Y(pv(),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=X3.map(i=>({header:i.header,width:i.width})),o.spliceRows(1,0,[`${e.documentTitle}`],[`${e.subtitle} \xB7 ${e.facilityName} \xB7 \uCD9C\uB825 ${vs(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:Z3}},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:fu}},left:{style:"thin",color:{argb:fu}},bottom:{style:"thin",color:{argb:fu}},right:{style:"thin",color:{argb:fu}}}});o.views=[{state:"frozen",ySplit:3}];let t=await l.xlsx.writeBuffer(),n=new Blob([t],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),c=vs(e.printedAt).replace(/[: ]/g,"").slice(0,13);return{blob:n,fileName:`${J3(e.documentTitle)}_${c}.xlsx`}}function Q3(e){return String(e??"").replace(/<br\s*\/?>(?=.)/gi,`
46
+ ${S}`.trim()).then(()=>{O(!0),window.setTimeout(()=>O(!1),1500)})},C=(0,ar.jsxs)(Er.Box,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[(0,ar.jsx)(Er.Box,{sx:{display:"flex",flexWrap:"wrap",gap:.75},children:[{code:"",label:"\uC6D0\uBB38"},...uy].map(S=>(0,ar.jsx)(Er.Chip,{label:S.label,clickable:!0,icon:S.code&&d(S.code)?(0,ar.jsx)(zc.default,{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__"))}),(0,ar.jsx)(Qt,{open:!!c,anchorEl:c?.anchor??null,title:`${uy.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?(0,ar.jsx)(Er.Box,{sx:{minHeight:200,display:"flex",alignItems:"center",justifyContent:"center"},children:(0,ar.jsx)(js,{})}):I?(0,ar.jsx)(Er.Box,{sx:{fontSize:15,color:"#c62828",py:2},children:I}):b?(0,ar.jsxs)(Er.Box,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[b.summary?(0,ar.jsxs)(Er.Box,{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:[(0,ar.jsx)(Er.Tooltip,{title:"\uC694\uC57D \uBCF5\uC0AC",arrow:!0,children:(0,ar.jsx)(Er.IconButton,{size:"small","aria-label":"\uC694\uC57D \uBCF5\uC0AC",onClick:$,sx:{position:"absolute",top:4,right:4,color:"#64748b"},children:P?(0,ar.jsx)(zc.default,{sx:{fontSize:18,color:"#2f9e5b"}}):(0,ar.jsx)(rd.default,{sx:{fontSize:18}})})}),(0,ar.jsx)(dy.default,{sx:{fontSize:30,color:"#2563eb",flexShrink:0,mx:1.5}}),(0,ar.jsxs)(Er.Box,{sx:{flex:1,minWidth:0},children:[(0,ar.jsx)(Er.Box,{sx:{fontSize:16,fontWeight:600,color:"#1e3a8a"},children:"AI \uBC88\uC5ED (Gemini) \xB7 \uC6D0\uBB38\uACFC \uB2E4\uB97C \uC218 \uC788\uC2B5\uB2C8\uB2E4"}),(0,ar.jsx)(Er.Box,{sx:{fontSize:15,color:"#111",mt:.25,lineHeight:1.5,whiteSpace:"pre-wrap",wordBreak:"break-word"},children:b.summary})]})]}):null,(0,ar.jsx)(Er.Box,{sx:{fontSize:18,fontWeight:700,color:"#111",wordBreak:"break-word"},children:b.title}),b.html?(0,ar.jsx)(Er.Box,{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}}):(0,ar.jsx)(Er.Box,{sx:{fontSize:16,lineHeight:1.6,color:"#37352f",whiteSpace:"pre-wrap"},children:b.text})]}):null:(0,ar.jsxs)(Er.Box,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[(0,ar.jsx)(Er.Box,{sx:{fontSize:18,fontWeight:700,color:"#111",wordBreak:"break-word"},children:g}),(0,ar.jsx)(Er.Box,{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(0,ar.jsx)(fy.FormDialog,{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:C}],actions:{showCancelButton:!1,left:t&&b?(0,ar.jsx)(Er.Button,{variant:"outlined",color:"inherit",startIcon:z?(0,ar.jsx)(zc.default,{sx:{fontSize:18,color:"#2f9e5b"}}):(0,ar.jsx)(rd.default,{sx:{fontSize:18}}),onClick:L,sx:{minWidth:80,color:"#37352f",borderColor:"#d9d9d6"},children:"\uBCF5\uC0AC"}):void 0,right:(0,ar.jsx)(Er.Button,{variant:"contained",onClick:s,sx:{minWidth:80},children:"\uB2EB\uAE30"})}})}var cl=require("@ehfuse/alerts"),Py=require("@ehfuse/mui-datetime-picker");var hy=require("react"),py=require("@ehfuse/mui-form-controls"),my=require("react/jsx-runtime");function od({value:e,onCommit:f,onDraftChange:g,readOnly:l=!1}){let[o,s]=(0,hy.useState)(null);return(0,my.jsx)(py.TextField,{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}})}var ji=require("react"),Ur=require("@mui/material"),by=Y(require("@mui/icons-material/AccountTreeOutlined"),1),yy=Y(require("@mui/icons-material/LinkOutlined"),1),xy=Y(require("@mui/icons-material/Close"),1),vy=Y(require("@mui/icons-material/RedoOutlined"),1);function zi(e){return e.relations??[]}function x_(e,f,g){return zi(e).some(l=>l.type===g&&l.task_seq===f.seq)||zi(f).some(l=>l.type===g&&l.task_seq===e.seq)}function gy(e){return`${e.created_time??""}|${String(e.seq).padStart(12,"0")}`}function jc(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 zi(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)=>gy(u).localeCompare(gy(b))),n=new Set;for(let u of zi(e))u.type==="related"&&n.add(u.task_seq);for(let u of g.values())u.seq!==e.seq&&zi(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&&zi(u).some(b=>b.type==="duplicate_of"&&b.task_seq===e.seq)),a=zi(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 Fc(e,f){let g=jc(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 id(e,f){return Fc(e,f)>0}var Pt=require("react/jsx-runtime");function qc({item:e,caption:f,onOpen:g,onUnlink:l}){let o=e.is_notice||e.is_event?$t(e.icon||(e.is_notice?$r:Yr)):null;return(0,Pt.jsxs)(Ur.Box,{sx:{display:"flex",alignItems:"center",gap:.75,px:1.25,py:.5,borderRadius:1,"&:hover":{bgcolor:"#f7f7f5"},"&:hover .taskbox-relation-unlink":{opacity:1}},children:[f?(0,Pt.jsx)(Ur.Box,{component:"span",sx:{flexShrink:0,px:.6,py:.1,borderRadius:.75,fontSize:11.5,fontWeight:500,color:"#8a6d1d",bgcolor:"#faf1d7"},children:f}):null,o?(0,Pt.jsx)(o,{sx:{fontSize:16,flexShrink:0,color:e.icon_color||"#1e3a8a"}}):null,(0,Pt.jsxs)(Ur.Box,{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]}),(0,Pt.jsx)(ir,{option:Xr(e),small:!0}),l?(0,Pt.jsx)(Ur.IconButton,{className:"taskbox-relation-unlink",size:"small","aria-label":"\uC5F0\uACB0 \uD574\uC81C",onClick:l,sx:{opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:(0,Pt.jsx)(xy.default,{sx:{fontSize:15}})}):null]})}function sd({task:e,tasks:f,readOnly:g=!1,onOpenTask:l,onLink:o,onUnlink:s,onCreateFollowUp:r}){let[t,n]=(0,ji.useState)(!1),[c,i]=(0,ji.useState)(null),[a,h]=(0,ji.useState)(null),d=(0,ji.useMemo)(()=>jc(e,f),[e,f]),u=d.lineage.length>=2,b=(0,ji.useMemo)(()=>Fc(e,f),[e,f]),m=(0,ji.useMemo)(()=>{let k=new Set;for(let I of d.lineage)k.add(I.seq);for(let I of d.related)k.add(I.seq);for(let I of d.duplicates)k.add(I.seq);for(let I of d.parents)k.add(I.seq);return d.duplicateOf&&k.add(d.duplicateOf.seq),[...k]},[d]),x=(k,I,M)=>{h({anchorEl:k,targetSeq:I,type:M})};return(0,Pt.jsxs)(ao,{icon:(0,Pt.jsx)(by.default,{sx:{fontSize:19,display:"block"}}),title:(0,Pt.jsxs)(Pt.Fragment,{children:["\uAD00\uB828 \uC5C5\uBB34",b>0?(0,Pt.jsx)(Ur.Box,{component:"span",sx:{fontSize:12.5,color:"#9a9a97"},children:b}):null]}),titleExtra:g?null:(0,Pt.jsxs)(Ur.Box,{sx:{ml:"auto",display:"flex",alignItems:"center",gap:.5},children:[r?(0,Pt.jsx)(Ur.Button,{size:"small",color:"inherit",startIcon:(0,Pt.jsx)(vy.default,{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?(0,Pt.jsx)(Ur.Button,{size:"small",color:"inherit",startIcon:(0,Pt.jsx)(yy.default,{sx:{fontSize:16}}),onClick:()=>n(!0),sx:{minWidth:0,px:1,fontSize:12.5,color:"#787774"},children:"\uC5F0\uACB0"}):null]}),children:[(0,Pt.jsxs)(Ur.Box,{sx:{display:"flex",flexDirection:"column",mt:.5,pl:3.25},children:[u?(0,Pt.jsx)(Ur.Box,{sx:{mb:d.related.length||d.duplicates.length||d.duplicateOf?1:0},children:d.lineage.map((k,I)=>{let M=k.seq===e.seq,z=I===d.lineage.length-1;return(0,Pt.jsxs)(Ur.Box,{sx:{display:"flex",gap:1},children:[(0,Pt.jsxs)(Ur.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",width:14,flexShrink:0,pt:1.1},children:[(0,Pt.jsx)(Ur.Box,{sx:{width:M?9:7,height:M?9:7,borderRadius:"50%",bgcolor:M?"#2f80ed":k.completed?"#9a9a97":"#c9c8c5",flexShrink:0}}),z?null:(0,Pt.jsx)(Ur.Box,{sx:{width:"2px",flex:1,bgcolor:"#e6e6e3"}})]}),(0,Pt.jsxs)(Ur.Box,{sx:{flex:1,minWidth:0,pb:z?0:.5},children:[(0,Pt.jsxs)(Ur.Box,{sx:{display:"flex",alignItems:"center",gap:.75},children:[(0,Pt.jsxs)(Ur.Box,{component:"span",onClick:!M&&l?()=>l(k.seq):void 0,sx:{minWidth:0,fontSize:14,fontWeight:M?600:400,color:M?"#2f80ed":k.completed?"#9a9a97":"#37352f",textDecoration:k.completed?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...!M&&l?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}},children:[k.ticket_no?`${k.ticket_no} `:"",k.title]}),(0,Pt.jsx)(ir,{option:Xr(k),small:!0})]}),(0,Pt.jsx)(Ur.Box,{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=>(0,Pt.jsx)(qc,{item:k,caption:"\uC0C1\uC704 \uC5C5\uBB34",onOpen:l?()=>l(k.seq):void 0},`parent-${k.seq}`)),d.duplicateOf?(0,Pt.jsx)(qc,{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=>(0,Pt.jsx)(qc,{item:k,caption:"\uC911\uBCF5",onOpen:l?()=>l(k.seq):void 0,onUnlink:!g&&s?I=>x(I.currentTarget,k.seq,"duplicate_of"):void 0},`dup-${k.seq}`)),d.related.map(k=>(0,Pt.jsx)(qc,{item:k,onOpen:l?()=>l(k.seq):void 0,onUnlink:!g&&s?I=>x(I.currentTarget,k.seq,"related"):void 0},`rel-${k.seq}`)),b===0?(0,Pt.jsx)(Ur.Box,{sx:{px:1.25,py:.75,fontSize:13.5,color:"#9a9a97"},children:"\uC5F0\uACB0\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):null]}),o?(0,Pt.jsx)(el,{open:t,task:e,tasks:f,excludeSeqs:m,onClose:()=>n(!1),onSubmit:(k,I)=>o(e.seq,k,I)}):null,(0,Pt.jsx)(Qt,{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)}}),(0,Pt.jsx)(Qt,{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)}})]})}var fe=require("react/jsx-runtime");function Fi({label:e="\uBE44\uC5B4 \uC788\uC74C"}){return(0,fe.jsx)(pt.Box,{component:"span",sx:{color:"#9a9a97"},children:e})}function dd({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:I,onChangeNoteDraft:M,onChangeContent:z,contentTemplates:O,onSaveContentTemplate:P,onRemoveContentTemplate:N,contentLoading:$=!1,onChangeContentHeight:L,onAddChecklistItem:C,onToggleChecklistItem:S,onRemoveChecklistItem:D,onUpdateChecklistItem:p,onReorderChecklist:y,onConvertChecklistToTask:v,onOpenChecklistTask:w,onLinkChecklistTask:_,resolveChecklistTask:T,relatedTasksPool:R,onOpenRelatedTask:F,onLinkRelatedTask:H,onUnlinkRelatedTask:V,onCreateFollowUpTask:A,onAddAttachments:q,onRemoveAttachment:B,onPreview:E,onDownload:j,onUpdateComment:U,onRemoveComment:X,onToggleCommentReaction:G,currentUserName:W="",myAccountSeq:Z=0,noticeAdmin:J=!1,hideProject:K=!1,hideLabel:ee=!1,showTitle:te=!1,onChangeTitle:oe,onToggleCompleted:ne,onChangeIcon:ie,onChangeIconColor:ae,employees:pe=[],onAckConfirm:ye,onRequestConfirm:Se,onChangeBugField:Be,sprints:Ce=[],sprintProject:Pe=!1,hideSprint:ft=!1,onChangeSprint:xe,onChangeStoryPoints:se,onChangeResolution:Ie,onClaimTask:ke,onVerifyBug:_e}){let[rt,Fe]=(0,On.useState)(null),me=(0,On.useRef)(!1),[Jt,Ue]=(0,On.useState)(null),[nt,qt]=(0,On.useState)(null),[lt,Le]=(0,On.useState)(null),[we,ve]=(0,On.useState)(!1),Ee={[yo]:we?{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"}},[st,Ve]=(0,On.useState)(null),[$e,Ut]=(0,On.useState)(null),[et,re]=(0,On.useState)(null),[ue,de]=(0,On.useState)(null),[Te,_t]=(0,On.useState)(null),[De,He]=(0,On.useState)(null),[Lt,Ne]=(0,On.useState)(null),Oe=!!e.is_notice,at=!!e.is_event,mt=!!e.is_bug,Bt=!!ke&&Ba(e,Z),{onReturnTask:Vt,editPolicy:St,translateContent:gr}=ct(),[yr,xr]=(0,On.useState)(!1),Nr=!!ke&&Ia(e,Z),Q=!!_e&&mt&&!!e.completed&&Z>0&&(e.author_account_seq??0)===Z&&!(e.acks??[]).some(ce=>ce.account_seq===Z),le=!So(e,Z),ge=fi(e,Z,St),be=!e.is_event&&(e.is_notice?Z>0&&(e.author_account_seq??0)===Z:(e.author_account_seq??0)===Z||(e.manager_account_seq??0)===Z),Me=e.is_notice||e.is_event?$t(e.icon||(e.is_notice?$r:Yr)):null,Ke=Oe?!Ca(e,Z):le,Ge=Bt||Nr?(0,fe.jsxs)(Co,{onClick:ce=>Ne(ce.currentTarget),children:[(0,fe.jsx)(Oy.default,{sx:{fontSize:16,mr:.5}}),"\uAC00\uC838\uAC00\uAE30"]}):null,ut=Oe?il(e,pe):"",Je=Oe?$f(e,pe,Z):null,Xe=Oe?null:ls(e,Z),dt=!!(Xe&&Xe.total>0||Oe&&Je),Xt=(e.origin_license_seq??0)>0,fr=!Oe&&!Xt,zt=(0,fe.jsxs)(fe.Fragment,{children:[(0,fe.jsx)(It,{icon:(0,fe.jsx)(Ey.default,{sx:{fontSize:17}}),label:"\uC791\uC131\uC790",sx:[Ro(9),Ee??null,...at?[]:[zr(1)]],children:e.created_by?(0,fe.jsxs)(fe.Fragment,{children:[(0,fe.jsx)(Cn,{names:[e.created_by],size:20,avatarSrcByName:l}),e.created_by]}):(0,fe.jsx)(Fi,{})}),(0,fe.jsx)(It,{icon:(0,fe.jsx)(ld.default,{sx:{fontSize:17}}),label:"\uC791\uC131\uC77C\uC2DC",sx:[Ro(11),Ee??null,...at?[]:[zr(2)]],children:e.created_time?Gn(e.created_time):(0,fe.jsx)(Fi,{})})]});return(0,fe.jsxs)(fe.Fragment,{children:[te?(0,fe.jsxs)(pt.Box,{sx:{px:2,pt:2,pb:.5,display:"flex",alignItems:"flex-start",gap:1},children:[be?(0,fe.jsx)(pt.Checkbox,{checked:e.completed,icon:(0,fe.jsx)(Cy.default,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:(0,fe.jsx)($c.default,{sx:{fontSize:22,color:"#2f80ed"}}),onChange:(ce,Nt)=>{nt||qt({anchorEl:ce.currentTarget,nextCompleted:Nt})},sx:{p:0,mt:.25}}):null,Me?at&&!le?(0,fe.jsx)(pt.ButtonBase,{onClick:ce=>Ue(ce.currentTarget),sx:{display:"flex",p:.25,mt:.1,borderRadius:1,color:e.icon_color||"#1e3a8a","&:hover":{bgcolor:"#f2f2f0"}},children:(0,fe.jsx)(Me,{sx:{fontSize:20}})}):(0,fe.jsx)(pt.Box,{sx:{display:"flex",p:0,mt:.25,color:e.icon_color||(Oe?"#e5484d":"#1e3a8a")},children:(0,fe.jsx)(Me,{sx:{fontSize:20}})}):null,(0,fe.jsx)(pt.Box,{sx:{flex:1,minWidth:0},children:rt!==null?(0,fe.jsx)(pt.Box,{component:"div",contentEditable:!0,suppressContentEditableWarning:!0,spellCheck:!1,ref:ce=>{if(!ce||ce.dataset.focused)return;ce.dataset.focused="1",ce.focus();let Nt=document.createRange();Nt.selectNodeContents(ce),Nt.collapse(!1);let Or=window.getSelection();Or?.removeAllRanges(),Or?.addRange(Nt)},onBlur:ce=>{let Nt=(ce.currentTarget.textContent??"").replace(/\n/g," ").trim();!me.current&&Nt&&Nt!==e.title&&oe(e.seq,Nt),me.current=!1,Fe(null)},onKeyDown:ce=>{ce.key==="Enter"&&(ce.preventDefault(),ce.target.blur()),ce.key==="Escape"&&(me.current=!0,ce.target.blur())},onPaste:ce=>{ce.preventDefault();let Nt=ce.clipboardData.getData("text/plain").replace(/\n/g," ");document.execCommand("insertText",!1,Nt)},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:rt}):(0,fe.jsx)(pt.Box,{onClick:()=>Fe(e.title),sx:{fontSize:19,fontWeight:600,color:"#37352f",lineHeight:"26px",cursor:"text",textDecoration:e.completed?"line-through":"none",userSelect:"text",wordBreak:"break-word"},children:e.title})}),(0,fe.jsx)(Kn,{open:!!nt,anchorEl:nt?.anchorEl??null,nextCompleted:nt?.nextCompleted??!1,returnMode:!!Vt&&Vn(e,Z),onCancel:()=>qt(null),onConfirm:ce=>{nt&&(ce&&Vt?Vt(e,ce):ne(e.seq,nt.nextCompleted)),qt(null)}})]}):null,(0,fe.jsxs)(pt.Box,{sx:{py:1.5,display:"flex",flexDirection:"column",gap:0,[yo]:{pb:0,"& > :last-child":{mb:0}}},children:[(0,fe.jsx)(Ya,{hideProject:K,pinColumns:!0,projectColumn:!at&&!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:Bo(e),priority:e.priority,eventTime:e.event_time??"",eventPlace:e.event_place??"",eventAddress:e.event_address??""},customTabs:f,avatarSrcByName:Ma(e,l),hideDueDate:!at&&!!e.repeat_rule,notice:Oe,event:at,readOnly:le,coreLocked:ge,targetSummary:ut,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:Ee,reminderLocked:e.completed,managerAction:Ge,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:nc(e.support_type??"")}:void 0,leading:(0,fe.jsxs)(fe.Fragment,{children:[Q||Ge&&(Oe||at)?(0,fe.jsxs)(pt.Box,{sx:{gridColumn:"1 / -1",display:"flex",justifyContent:"flex-start",gap:2,px:2,py:1.5},children:[Oe||at?Ge:null,Q?(0,fe.jsxs)(fe.Fragment,{children:[(0,fe.jsx)(pt.Button,{variant:"contained",size:"large",onClick:()=>_e?.(e.seq,!0),sx:{bgcolor:"#2f80ed"},children:"\uAC80\uC99D\uC644\uB8CC"}),(0,fe.jsx)(pt.Button,{variant:"outlined",size:"large",color:"error",onClick:()=>_e?.(e.seq,!1),children:"\uC7AC\uC624\uD508"})]}):null]}):null,mt&&e.ticket_no?(0,fe.jsx)(It,{icon:(0,fe.jsx)(ky.default,{sx:{fontSize:17}}),label:"\uD2F0\uCF13",sx:zr(1),children:(0,fe.jsx)(pt.Box,{component:"span",sx:{fontVariantNumeric:"tabular-nums"},children:e.ticket_no})}):null,at?null:(0,fe.jsx)(pt.Box,{sx:mt&&e.ticket_no||fr||dt?zr(mt&&e.ticket_no?2:1):{gridColumn:"1 / -1"},children:(0,fe.jsx)(It,{icon:(0,fe.jsx)(By.default,{sx:{fontSize:17}}),label:"\uC0C1\uD0DC",onClick:le||e.completed?void 0:ce=>Ve(ce),children:(0,fe.jsx)(ir,{option:Xr(e)})})}),fr?(()=>{let ce=ho(e),Nt=ce==="all"?(0,fe.jsx)(ud.default,{sx:{fontSize:17,color:"#2f80ed"}}):ce==="group"?(0,fe.jsx)(fd.default,{sx:{fontSize:17,color:"#d9730d"}}):(0,fe.jsx)(cd.default,{sx:{fontSize:17}}),Or=ce==="all"?"\uC804\uCCB4\uACF5\uAC1C":ce==="group"?`\uBD80\uC11C\uACF5\uAC1C \xB7 ${b.find(Lr=>Lr.seq===(e.visibility_group_seq??0))?.name??"\uBD80\uC11C"}`:"\uBE44\uACF5\uAC1C";return(0,fe.jsx)(pt.Box,{sx:at?void 0:zr(mt?1:2),children:(0,fe.jsx)(It,{icon:Nt,label:"\uACF5\uAC1C",onClick:ge||!d?void 0:Lr=>Ut(Lr),children:Or})})})():null,!Oe&&!mt&&!Xt?(0,fe.jsx)(pt.Box,{sx:at?void 0:zr(1),children:(0,fe.jsx)(It,{icon:(0,fe.jsx)(Ay.default,{sx:{fontSize:17,...e.repeat_rule?{color:"#2f80ed"}:{}}}),label:"\uBC18\uBCF5",onClick:ge||!u?void 0:ce=>re(ce),children:e.repeat_rule?Ua(e.repeat_rule):(0,fe.jsx)(Fi,{label:"\uC5C6\uC74C"})})}):null,!Oe&&!mt&&e.repeat_rule?(0,fe.jsx)(pt.Box,{sx:at?void 0:zr(2),children:(0,fe.jsx)(It,{icon:(0,fe.jsx)(Dy.default,{sx:{fontSize:17}}),label:"\uBC18\uBCF5 \uC885\uB8CC",onClick:ge||!u?void 0:ce=>de(ce),children:e.repeat_until?`${e.repeat_until}\uAE4C\uC9C0`:(0,fe.jsx)(Fi,{})})}):null,Xe&&Xe.total>0?(0,fe.jsx)(pt.Box,{sx:at?void 0:zr(2),children:(0,fe.jsx)(It,{icon:(0,fe.jsx)(Hc.default,{sx:{fontSize:17}}),label:"\uD655\uC778",children:Xe.canConfirm?(0,fe.jsx)(pt.Button,{size:"small",variant:"contained",onClick:()=>ye?.(e.seq),sx:{py:.1,px:1.25,minWidth:0,color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}},children:"\uD655\uC778"}):(0,fe.jsxs)(pt.Button,{size:"small",variant:"outlined",color:"inherit",startIcon:Xe.myTime?(0,fe.jsx)($c.default,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:ce=>Le({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:[Xe.count," / ",Xe.total]})})}):null,Oe&&Je?(0,fe.jsx)(pt.Box,{sx:zr(2),children:(0,fe.jsx)(It,{icon:(0,fe.jsx)(Hc.default,{sx:{fontSize:17}}),label:"\uD655\uC778",children:(0,fe.jsx)(pt.Box,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,minWidth:0},children:Je.canAck?(0,fe.jsx)(pt.Button,{size:"small",variant:"contained",onClick:()=>ye?.(e.seq),sx:{py:.1,px:1.25,minWidth:0,color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}},children:"\uD655\uC778"}):(0,fe.jsx)(pt.Button,{size:"small",variant:"outlined",color:"inherit",startIcon:Je.acked?(0,fe.jsx)($c.default,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:ce=>Le({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:Je.total>0&&Je.count>=Je.total?"\uC644\uB8CC":(0,fe.jsxs)(fe.Fragment,{children:[Je.count,(0,fe.jsx)(pt.Box,{component:"span",sx:{mx:.4},children:"/"}),Je.total]})})})})}):null,Pe&&!ft&&!at&&!Oe?(0,fe.jsxs)(fe.Fragment,{children:[(0,fe.jsx)(It,{icon:(0,fe.jsx)(Sy.default,{sx:{fontSize:17}}),label:"\uBAA9\uD45C",onClick:ge?void 0:ce=>_t(ce),sx:zr(1),children:(e.sprint_seq??0)>0?Ce.find(ce=>ce.seq===e.sprint_seq)?.name??"\uC0AD\uC81C\uB41C \uC2A4\uD504\uB9B0\uD2B8":(0,fe.jsx)(Fi,{label:"\uBBF8\uBC30\uC815"})}),(0,fe.jsx)(It,{icon:(0,fe.jsx)(Ty.default,{sx:{fontSize:17}}),label:"\uD3EC\uC778\uD2B8",sx:zr(2),children:(0,fe.jsx)(Ko,{value:(e.story_points??0)>0?String(e.story_points):"",placeholder:"\uBBF8\uCD94\uC815",readOnly:ge,onCommit:ce=>se?.(e.seq,Number(ce.replace(/[^0-9.]/g,""))||0)})})]}):null,at||ee?null:(0,fe.jsx)(pt.Box,{sx:[K?{gridColumn:"1 / -1"}:zr(1),Ee??null],children:(0,fe.jsx)(It,{icon:(0,fe.jsx)(Iy.default,{sx:{fontSize:17}}),label:"\uB77C\uBCA8",onClick:le?void 0:ce=>He(ce),children:(e.label_keys??[]).length>0?(0,fe.jsx)(ci,{labelKeys:e.label_keys??[],labelOptions:g}):(0,fe.jsx)(Fi,{})})})]}),afterProject:at?null:zt,trailing:(0,fe.jsxs)(fe.Fragment,{children:[mt?(0,fe.jsx)(Xa,{values:{repro:e.bug_repro??"",device:e.bug_device??"",where:e.bug_where??"",version:e.bug_version??"",resolution:e.resolution??""},readOnly:ge,showResolution:!!e.completed,onChangeRepro:ce=>Be?.(e.seq,"bug_repro",ce),onChangeDevice:ce=>Be?.(e.seq,"bug_device",ce),onChangeWhere:ce=>Be?.(e.seq,"bug_where",ce),onChangeVersion:ce=>Be?.(e.seq,"bug_version",ce),onChangeResolution:ce=>Ie?.(e.seq,ce)}):null,at?zt:null,e.completed?(0,fe.jsxs)(fe.Fragment,{children:[(0,fe.jsx)(It,{icon:(0,fe.jsx)(Hc.default,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC790",sx:[Ro(10),Ee??null,...at?[]:[zr(1)]],children:e.completed_by?(0,fe.jsxs)(fe.Fragment,{children:[(0,fe.jsx)(Cn,{names:[e.completed_by],size:20,avatarSrcByName:l}),e.completed_by]}):(0,fe.jsx)(Fi,{})}),(0,fe.jsx)(It,{icon:(0,fe.jsx)(ld.default,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC77C\uC2DC",sx:[Ro(12),Ee??null,...at?[]:[zr(2)]],children:e.completed_time?Gn(e.completed_time):(0,fe.jsx)(Fi,{})})]}):null]})}),(0,fe.jsxs)(pt.Box,{sx:{display:"none",[yo]:{display:"block",mt:1.5,mb:0}},children:[(0,fe.jsx)(pt.Divider,{sx:{borderColor:"#e6e6e3"}}),(0,fe.jsx)(pt.ButtonBase,{onClick:()=>ve(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:we?(0,fe.jsxs)(fe.Fragment,{children:["\uC811\uAE30 ",(0,fe.jsx)(wy.default,{sx:{fontSize:18}})]}):(0,fe.jsxs)(fe.Fragment,{children:["\uC815\uBCF4 \uB354\uBCF4\uAE30 ",(0,fe.jsx)(_y.default,{sx:{fontSize:18}})]})})]}),(0,fe.jsxs)(pt.Box,{children:[(0,fe.jsx)(pt.Divider,{sx:{my:1.5,borderColor:"#e6e6e3",[yo]:{mt:0,mb:1.25}}}),(0,fe.jsx)(ao,{icon:(0,fe.jsx)(My.default,{sx:{fontSize:18,display:"block"}}),title:"\uB0B4\uC6A9",titleExtra:O&&!ge?(0,fe.jsx)(Za,{content:e.content??"",templates:O,onApply:ce=>z?.(e.seq,ce),onSave:P,onRemove:N}):void 0,children:(0,fe.jsx)(pt.Box,{sx:{userSelect:"text"},children:$?(0,fe.jsx)(pt.Box,{sx:{minHeight:e.content_height||180,display:"flex",alignItems:"center",justifyContent:"center"},children:(0,fe.jsx)(js,{})}):(0,fe.jsx)(Qa,{syncKey:e.seq,value:e.content??"",height:e.content_height??0,onChangeHeight:L?ce=>L(e.seq,ce):void 0,readOnly:ge,viewFirst:!0,onTranslate:gr?()=>xr(!0):void 0,onChange:ce=>z(e.seq,ce)})})}),e.is_bug?null:(0,fe.jsxs)(fe.Fragment,{children:[(0,fe.jsx)(pt.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,fe.jsx)(ao,{icon:(0,fe.jsx)(Ry.default,{sx:{fontSize:18,display:"block"}}),title:"\uBE44\uACE0",children:(0,fe.jsx)(pt.Box,{sx:{userSelect:"text"},children:(0,fe.jsx)(od,{value:e.note,readOnly:Ke,onCommit:ce=>I(e.seq,ce),onDraftChange:M?ce=>M(e.seq,ce):void 0})})})]}),at?null:(0,fe.jsxs)(fe.Fragment,{children:[(0,fe.jsx)(pt.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,fe.jsx)(tl,{taskSeq:e.seq,checklist:e.checklist??[],removeLocked:Ke,onAdd:C,onToggle:S,onRemove:D,onUpdate:p,onReorder:y,onConvertToTask:v,onOpenLinkedTask:w,resolveLinkedTask:T,myAccountSeq:Z,linkCandidates:R,linkBaseTask:e,onLinkExistingTask:_})]}),R&&!at&&!Oe&&id(e,R)?(0,fe.jsxs)(fe.Fragment,{children:[(0,fe.jsx)(pt.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,fe.jsx)(sd,{task:e,tasks:R,readOnly:le,onOpenTask:F,onLink:H,onUnlink:V,onCreateFollowUp:A})]}):null,(0,fe.jsx)(pt.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,fe.jsx)(rl,{taskSeq:e.seq,attachments:e.attachments??[],removeLocked:Oe?Ke:ge,onAdd:q,onRemove:B,onPreview:E?ce=>E({...ce,taskSeq:e.seq}):void 0,onDownload:j?ce=>j({...ce,taskSeq:e.seq}):void 0})]}),(0,fe.jsx)(pt.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,fe.jsx)(Jf,{taskSeq:e.seq,comments:e.comments??[],currentUserName:W,myAccountSeq:Z,avatarSrcByName:l,onUpdate:U,onRemove:X,onToggleReaction:G,onPreview:E?ce=>E({...ce,taskSeq:e.seq}):void 0,onDownload:j?ce=>j({...ce,taskSeq:e.seq}):void 0})]}),gr?(0,fe.jsx)(nd,{open:yr,taskSeq:e.seq,title:e.title,html:e.content??"",translatedTargets:e.translated_targets??[],onClose:()=>xr(!1)}):null,(0,fe.jsx)(rs,{anchorEl:st,value:e.status,options:Oe?Rs:mt?Ci:Os,onSelect:ce=>o(e.seq,ce),onClose:()=>Ve(null)}),(0,fe.jsx)(pt.Menu,{transitionDuration:0,anchorEl:et,open:!!et,onClose:()=>re(null),children:[{value:"",label:"\uC5C6\uC74C"},...Xs].map(ce=>(0,fe.jsx)(pt.MenuItem,{selected:(e.repeat_rule??"")===ce.value,onClick:()=>{re(null),(async()=>{let Nt=e.repeat_rule??"";if(ce.value===Nt)return;if(ce.value===""){await(0,cl.ConfirmDialog)({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 Or=String(e.due_date??"").slice(0,10);if(!Or){(0,cl.InfoAlert)(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}Nt&&!await(0,cl.ConfirmDialog)({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,Va(Or,ce.value))})()},sx:{fontSize:14,minWidth:140},children:ce.label},ce.value||"none"))}),(0,fe.jsx)(Py.DatePicker,{anchorEl:ue,open:!!ue,onClose:()=>de(null),selectedDate:e.repeat_until?new Date(`${e.repeat_until}T00:00:00`):new Date,onDateChange:ce=>{de(null);let Nt=Hn=>String(Hn).padStart(2,"0"),Or=`${ce.getFullYear()}-${Nt(ce.getMonth()+1)}-${Nt(ce.getDate())}`,Lr=e.repeat_rule??"";Lr&&u?.(e.seq,Lr,Or)}}),(0,fe.jsx)(pt.Menu,{transitionDuration:0,anchorEl:$e,open:!!$e,onClose:()=>Ut(null),children:[{key:"involved",label:"\uBE44\uACF5\uAC1C",icon:(0,fe.jsx)(cd.default,{sx:{fontSize:17,color:"#57564f"}}),selected:ho(e)==="involved",onPick:()=>d?.(e.seq,"involved",0)},{key:"all",label:"\uC804\uCCB4\uACF5\uAC1C",icon:(0,fe.jsx)(ud.default,{sx:{fontSize:17,color:"#2f80ed"}}),selected:ho(e)==="all",onPick:()=>d?.(e.seq,"all",0)},...b.map(ce=>({key:`group-${ce.seq}`,label:`\uBD80\uC11C\uACF5\uAC1C \xB7 ${ce.name}`,icon:(0,fe.jsx)(fd.default,{sx:{fontSize:17,color:"#d9730d"}}),selected:ho(e)==="group"&&(e.visibility_group_seq??0)===ce.seq,onPick:()=>d?.(e.seq,"group",ce.seq)}))].map(ce=>(0,fe.jsxs)(pt.MenuItem,{selected:ce.selected,onClick:()=>{ce.onPick(),Ut(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[ce.icon,ce.label,ce.selected?(0,fe.jsx)(ad.default,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},ce.key))}),(0,fe.jsx)(pt.Menu,{transitionDuration:0,anchorEl:Te,open:!!Te,onClose:()=>_t(null),children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...Ce.filter(ce=>`custom-${ce.group_seq}`===String(e.tab_key??"")).map(ce=>({seq:ce.seq,label:so(ce)}))].map(ce=>(0,fe.jsxs)(pt.MenuItem,{onClick:()=>{xe?.(e.seq,ce.seq),_t(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[ce.label,(e.sprint_seq??0)===ce.seq?(0,fe.jsx)(ad.default,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},ce.seq))}),(0,fe.jsx)(Fa,{anchorEl:lt?.anchorEl??null,open:!!lt?.open,acks:e.acks??[],total:Je?.total??Xe?.total??0,pendingNames:Je?.pendingNames??Xe?.pendingNames??[],avatarSrcByName:l,onRequestConfirm:Se&&(Je?Je.count<Je.total:Xe&&Xe.count<Xe.total)?()=>{Se(e.seq),Le(ce=>ce?{...ce,open:!1}:null)}:void 0,onClose:()=>Le(ce=>ce?{...ce,open:!1}:null)}),(0,fe.jsx)(ol,{anchorEl:De,selectedKeys:e.label_keys??[],labelOptions:g,onToggle:ce=>s(e.seq,wa(e.label_keys??[],ce)),onAddLabel:r,onClose:()=>He(null)}),(0,fe.jsx)(hi,{anchorEl:Jt,value:e.icon??"",color:e.icon_color??"",onSelect:ce=>{ie(e.seq,ce),Ue(null)},onSelectColor:ae?ce=>ae(e.seq,ce):void 0,onClose:()=>Ue(null)}),(0,fe.jsx)(Qt,{open:!!Lt,anchorEl:Lt,title:Bt?"\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:()=>{ke?.(e.seq),Ne(null)}})]})}var Wt=require("react/jsx-runtime");function v_(){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 w_({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=dr(),I=(0,Do.useRef)(null);f&&(I.current=f);let M=f??I.current,[z,O]=(0,Do.useState)(!1),[P,N]=(0,Do.useState)(null),[$,L]=(0,Do.useState)(null),{editPolicy:C}=ct(),S=!!b&&(m??(M?!Ii(M,r,C,!(r>0&&(M.author_account_seq??0)===r)):!1)),[D,p]=(0,Do.useState)({}),y=Object.keys(D).length>0;(0,Do.useEffect)(()=>{p({})},[f?.seq,e]);let v=(0,Do.useRef)(null);if((0,Do.useEffect)(()=>{v.current?.scrollTo({top:0})},[f?.seq]),!M)return null;let w=k&&y?{...M,...D}:M,_=w.checklist??[],T=(q,B)=>{k?p(E=>({...E,...q})):B()},R=()=>{let q=D;p({});let B=M.seq,E=q.title===void 0?void 0:String(q.title).trim();if(o){let j={...q};E!==void 0&&(E?j.title=E:delete j.title),Object.keys(j).length>0&&o(B,j),(0,hd.SuccessAlert)({message:"\uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",position:"center"});return}E&&n(B,E),q.icon!==void 0&&c(B,String(q.icon)),q.icon_color!==void 0&&i?.(B,String(q.icon_color)),q.status!==void 0&&x.onChangeStatus(B,q.status),q.label_keys!==void 0&&x.onChangeLabels(B,q.label_keys??[]),q.tab_key!==void 0&&x.onChangeProject(B,String(q.tab_key??"")),q.start_date!==void 0&&x.onChangeDate(B,"start_date",String(q.start_date??"")),q.due_date!==void 0&&x.onChangeDate(B,"due_date",String(q.due_date??"")),q.reminders!==void 0&&x.onChangeReminder(B,q.reminders),q.priority!==void 0&&x.onChangePriority(B,q.priority),q.event_time!==void 0&&x.onChangeEventTime?.(B,String(q.event_time??"")),q.event_place!==void 0&&x.onChangeEventPlace?.(B,String(q.event_place??"")),q.event_address!==void 0&&x.onChangeEventAddress?.(B,String(q.event_address??"")),q.content!==void 0&&x.onChangeContent(B,String(q.content??"")),q.note!==void 0&&x.onChangeNote(B,String(q.note??"")),q.visibility!==void 0&&x.onChangeVisibility?.(B,q.visibility,Number(q.visibility_group_seq??0)),(0,hd.SuccessAlert)({message:"\uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",position:"center"})},F={...x,onChangeStatus:(q,B)=>T({status:B},()=>x.onChangeStatus(q,B)),onChangeLabels:(q,B)=>T({label_keys:B},()=>x.onChangeLabels(q,B)),onChangeProject:(q,B)=>T({tab_key:B},()=>x.onChangeProject(q,B)),onChangeDate:(q,B,E)=>T({[B]:E},()=>x.onChangeDate(q,B,E)),onChangeReminder:(q,B)=>T({reminders:B},()=>x.onChangeReminder(q,B)),onChangePriority:(q,B)=>T({priority:B},()=>x.onChangePriority(q,B)),onChangeEventTime:(q,B)=>T({event_time:B},()=>x.onChangeEventTime?.(q,B)),onChangeEventPlace:(q,B)=>T({event_place:B},()=>x.onChangeEventPlace?.(q,B)),onChangeEventAddress:(q,B)=>T({event_address:B},()=>x.onChangeEventAddress?.(q,B)),onChangeContent:(q,B)=>T({content:B},()=>x.onChangeContent(q,B)),onChangeNote:(q,B)=>T({note:B},()=>x.onChangeNote(q,B)),onMemberEdit:(q,B)=>x.onMemberEdit(q,B,k?E=>p(j=>({...j,...E})):null),onChangeNoteDraft:k?(q,B)=>T({note:B},()=>{}):void 0,onChangeVisibility:x.onChangeVisibility?(q,B,E)=>T({visibility:B,visibility_group_seq:E},()=>x.onChangeVisibility?.(q,B,E)):void 0,onAddChecklistItem:(q,B)=>T({checklist:[..._,{label:B,checked:!1}]},()=>x.onAddChecklistItem(q,B)),onToggleChecklistItem:(q,B,E)=>T({checklist:_.map((j,U)=>U===B?{...j,checked:E}:j)},()=>x.onToggleChecklistItem(q,B,E)),onRemoveChecklistItem:(q,B)=>T({checklist:_.filter((E,j)=>j!==B)},()=>x.onRemoveChecklistItem(q,B)),onUpdateChecklistItem:x.onUpdateChecklistItem?(q,B,E)=>T({checklist:_.map((j,U)=>U===B?{...j,label:E}:j)},()=>x.onUpdateChecklistItem?.(q,B,E)):void 0,onReorderChecklist:x.onReorderChecklist?(q,B)=>T({checklist:B},()=>x.onReorderChecklist?.(q,B)):void 0,onLinkChecklistTask:x.onLinkChecklistTask?(q,B,E)=>T({checklist:[..._,{label:E,checked:!1,task_seq:B}]},()=>x.onLinkChecklistTask?.(q,B,E)):void 0},H=(0,Wt.jsx)(dd,{...F,task:w,myAccountSeq:r,onChangeTitle:(q,B)=>T({title:B},()=>n(q,B)),onToggleCompleted:t,onChangeIcon:(q,B)=>T({icon:B},()=>c(q,B)),onChangeIconColor:(q,B)=>T({icon_color:B},()=>i?.(q,B)),showTitle:k||s==="dialog"}),V=(0,Wt.jsx)(Qf,{onSubmit:(q,B)=>l(w.seq,q,B)},w.seq);return k||s==="dialog"?(0,Wt.jsxs)(Wt.Fragment,{children:[(0,Wt.jsx)(qy.FormDialog,{open:e,onClose:g,locale:"ko",fontScale:{enabled:!0,default:1.1,min:.6},title:w.is_notice?"\uACF5\uC9C0\uC0AC\uD56D":w.is_event?"\uC77C\uC815":w.is_bug?"\uC624\uB958":"\uC5C5\uBB34",titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1},custom:[...k?[{raw:!0,icon:(0,Wt.jsx)(pr.Button,{variant:"contained",size:"small",disableElevation:!0,disabled:!y,onClick:y?R: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:(0,Wt.jsx)(pr.IconButton,{size:"small","aria-label":"\uB354\uBCF4\uAE30",onClick:q=>N(q.currentTarget),children:(0,Wt.jsx)(Ny.default,{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:V},sx:{DialogContent:{borderBottom:"none"}},dialogActionSx:{padding:"0 !important","@media (max-width:1023.95px)":{padding:"0 !important"},borderTop:"1px solid #37352f","& .left-actions":{flex:1,width:"100%",minWidth:0,"& > *":{flex:1,minWidth:0}},"& .right-actions":{display:"none"}},sections:[{id:"task-detail",title:"",showTitle:!1,children:(0,Wt.jsx)(pr.Box,{sx:{userSelect:"none",width:"100%",minWidth:0,display:"flex",flexDirection:"column",gap:0},children:H})}]},M.seq),(0,Wt.jsxs)(pr.Menu,{open:!!P,anchorEl:P,onClose:()=>N(null),anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},sx:{zIndex:1500},children:[d?(0,Wt.jsxs)(pr.MenuItem,{onClick:()=>{N(null),O(!0)},children:[(0,Wt.jsx)(pr.ListItemIcon,{children:(0,Wt.jsx)(jy.default,{fontSize:"small"})}),(0,Wt.jsx)(pr.ListItemText,{children:"\uD65C\uB3D9"})]}):null,(0,Wt.jsxs)(pr.MenuItem,{onClick:()=>{N(null),ms(w,!0)},children:[(0,Wt.jsx)(pr.ListItemIcon,{children:(0,Wt.jsx)(zy.default,{fontSize:"small"})}),(0,Wt.jsx)(pr.ListItemText,{children:"\uACF5\uC720\uD558\uAE30"})]}),S?(0,Wt.jsxs)(pr.MenuItem,{onClick:q=>{let B=P??q.currentTarget;N(null),L(B)},sx:{color:"#e5484d"},children:[(0,Wt.jsx)(pr.ListItemIcon,{children:(0,Wt.jsx)(Ly.default,{fontSize:"small",sx:{color:"#e5484d"}})}),(0,Wt.jsx)(pr.ListItemText,{children:"\uC0AD\uC81C"})]}):null]}),(0,Wt.jsx)(Qt,{open:!!$,anchorEl:$,title:"\uC774 \uC5C5\uBB34\uB97C \uD734\uC9C0\uD1B5\uC73C\uB85C \uBCF4\uB0B4\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uC0AD\uC81C",onCancel:()=>L(null),onConfirm:()=>{L(null),b?.(w)}}),(0,Wt.jsx)(ll,{open:z,taskSeq:w.seq,items:a,loading:h,onLoad:d,onClose:()=>O(!1)})]}):(0,Wt.jsx)(pr.Drawer,{anchor:"right",open:e,onClose:g,"aria-label":"\uC5C5\uBB34 \uC0C1\uC138",disableAutoFocus:!0,disableEnforceFocus:!0,sx:{zIndex:q=>q.zIndex.modal},slotProps:{paper:{sx:{width:720,maxWidth:"100vw"}}},children:(0,Wt.jsxs)(pr.Box,{sx:{display:"flex",flexDirection:"column",height:"100%",userSelect:"none"},children:[(0,Wt.jsx)(ed,{task:w,myAccountSeq:r,onToggleCompleted:t,onChangeTitle:n,onChangeIcon:c,onChangeIconColor:i,onClose:g,activityItems:a,activityLoading:h,onLoadActivity:d,onPrint:u,onDelete:b,canDelete:m}),(0,Wt.jsx)(pr.Divider,{sx:{borderColor:"#e6e6e3"}}),(0,Wt.jsx)(pr.Box,{sx:{flex:1,minHeight:0},children:(0,Wt.jsx)(Fy.default,{ref:v,style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:H})}),(0,Wt.jsx)(pr.Divider,{sx:{borderColor:"#37352f"}}),(0,Wt.jsx)(pr.Box,{sx:{flexShrink:0},children:V})]})})}var vo=require("react"),Fr=require("@mui/material"),md=require("@ehfuse/mui-form-dialog"),Ky=Y(require("@mui/icons-material/Add"),1),Gy=Y(require("@mui/icons-material/DirectionsRunOutlined"),1),Yy=Y(require("@mui/icons-material/EditOutlined"),1),gd=require("@ehfuse/alerts"),yi=require("@ehfuse/mui-form-controls");var ul=require("react"),Vr=require("@mui/material"),$y=require("@ehfuse/mui-form-dialog"),Hy=require("@ehfuse/mui-form-controls"),Wy=Y(require("@ehfuse/overlay-scrollbar"),1);var kr=require("react/jsx-runtime");function pd({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]=(0,ul.useState)("backlog"),[c,i]=(0,ul.useState)(0);(0,ul.useEffect)(()=>{e&&(n(r.length>0?"move":"backlog"),i(r[0]?.seq??0))},[e]);let a=g.length>0;return(0,kr.jsx)($y.FormDialog,{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:(0,kr.jsx)(Vr.Button,{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:(0,kr.jsxs)(Vr.Box,{sx:{display:"flex",flexDirection:"column",gap:2},children:[(0,kr.jsxs)(Vr.Box,{sx:{fontSize:18,color:"#37352f"},children:[(0,kr.jsx)(Vr.Box,{component:"span",sx:{fontWeight:600},children:f?.name??""})," \uBAA9\uD45C\uB97C \uB9C8\uAC10\uD569\uB2C8\uB2E4."]}),a?(0,kr.jsxs)(kr.Fragment,{children:[(0,kr.jsxs)(Vr.Box,{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?"]}),(0,kr.jsx)(Vr.Box,{sx:{border:"1px solid #e6e6e3",borderRadius:1,overflow:"hidden"},children:(0,kr.jsx)(Wy.default,{style:{maxHeight:220},thumb:{width:6},children:g.map(h=>(0,kr.jsxs)(Vr.Box,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1,borderBottom:"1px solid #f2f2f0","&:last-of-type":{borderBottom:"none"}},children:[(0,kr.jsx)(Vr.Box,{sx:{flex:1,minWidth:0,fontSize:16,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:h.title}),(0,kr.jsx)(ir,{option:Xr(h)})]},h.seq))})}),(0,kr.jsxs)(Vr.RadioGroup,{value:t,onChange:(h,d)=>n(d),children:[r.length>0?(0,kr.jsx)(Vr.FormControlLabel,{value:"move",control:(0,kr.jsx)(Vr.Radio,{size:"small"}),label:"\uB2E4\uC74C \uBAA9\uD45C\uB85C \uC774\uC6D4",sx:{"& .MuiFormControlLabel-label":{fontSize:16}}}):null,t==="move"&&r.length>0?(0,kr.jsx)(Vr.Box,{sx:{pl:4,pb:1},children:(0,kr.jsx)(Hy.LabelSelect,{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,(0,kr.jsx)(Vr.FormControlLabel,{value:"backlog",control:(0,kr.jsx)(Vr.Radio,{size:"small"}),label:"\uBBF8\uBC30\uC815(\uBC31\uB85C\uADF8)\uC73C\uB85C \uBE7C\uAE30",sx:{"& .MuiFormControlLabel-label":{fontSize:16}}}),(0,kr.jsx)(Vr.FormControlLabel,{value:"keep",control:(0,kr.jsx)(Vr.Radio,{size:"small"}),label:"\uC774 \uBAA9\uD45C\uC5D0 \uADF8\uB300\uB85C \uB450\uAE30",sx:{"& .MuiFormControlLabel-label":{fontSize:16}}})]})]}):(0,kr.jsx)(Vr.Box,{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 Wc="custom-";function Uy(e){return e.startsWith(Wc)}function __(e){return e>0?`${Wc}${e}`:""}function bi(e){if(!Uy(e))return 0;let f=Number(e.slice(Wc.length));return Number.isInteger(f)&&f>0?f:0}var Dt=require("react/jsx-runtime"),k_=[{value:"planning",label:"\uACC4\uD68D\uC911"},{value:"active",label:"\uC9C4\uD589\uC911"},{value:"closed",label:"\uC885\uB8CC"}];function Vy(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?e.slice(5).replace("-","."):"-"}function S_({open:e,customTabs:f,sprints:g,onClose:l,onCreate:o,onUpdate:s,onChangeStatus:r,tasks:t=[],onCloseSprint:n,onRemove:c}){let i=f.filter(R=>R.useSprints&&!R.archived),[a,h]=(0,vo.useState)(""),[d,u]=(0,vo.useState)(""),[b,m]=(0,vo.useState)(""),[x,k]=(0,vo.useState)(""),[I,M]=(0,vo.useState)(""),[z,O]=(0,vo.useState)(!1),[P,N]=(0,vo.useState)(!1),[$,L]=(0,vo.useState)(null),C=$?t.filter(R=>(R.sprint_seq??0)===$.seq&&!R.completed):[],[S,D]=(0,vo.useState)(0);(0,vo.useEffect)(()=>{e&&(h(i.length===1?i[0].key:""),u(""),m(""),k(""),M(""),D(0))},[e]);let p=()=>{u(""),m(""),k(""),M(""),D(0),N(!1)},y=R=>{D(R.seq),h(`custom-${R.group_seq}`),u(R.name),m(R.goal),k(R.start_date),M(R.end_date)},v=S>0||P,w=async()=>{let R=bi(a);if(!R){(0,gd.ErrorAlert)("\uBAA9\uD45C\uB97C \uB9CC\uB4E4 \uD504\uB85C\uC81D\uD2B8\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return}if(!d.trim()){(0,gd.ErrorAlert)("\uBAA9\uD45C \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}O(!0);try{if(S>0){s(S,{name:d.trim(),goal:b.trim(),start_date:x,end_date:I}),p();return}await o({group_seq:R,name:d.trim(),goal:b.trim(),start_date:x,end_date:I})&&p()}finally{O(!1)}},_=new Map(f.map(R=>[bi(R.key),R.label])),T=(0,Dt.jsx)(Fr.Box,{children:i.length===0?(0,Dt.jsx)(Fr.Box,{sx:{py:2,fontSize:14,color:"#787774"},children:'\uBAA9\uD45C\uB97C \uC0AC\uC6A9\uD558\uB294 \uD504\uB85C\uC81D\uD2B8\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4. \uD504\uB85C\uC81D\uD2B8 \uC218\uC815\uC5D0\uC11C "\uBAA9\uD45C(\uC2A4\uD504\uB9B0\uD2B8) \uC0AC\uC6A9"\uC744 \uBA3C\uC800 \uCF1C\uC138\uC694.'}):(0,Dt.jsx)(Dt.Fragment,{children:(0,Dt.jsx)(Fr.Box,{children:g.length===0?(0,Dt.jsxs)(Fr.Box,{sx:{py:4,display:"flex",flexDirection:"column",alignItems:"center",gap:2,color:"#9a9a97"},children:[(0,Dt.jsx)(Gy.default,{sx:{fontSize:48,color:"#d9d9d6"}}),(0,Dt.jsx)(Fr.Box,{sx:{fontSize:13.5},children:"\uB4F1\uB85D\uB41C \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."})]}):g.map(R=>(0,Dt.jsxs)(Fr.Box,{sx:{display:"flex",flexDirection:"column",gap:1,"&:not(:last-of-type)::after":{content:'""',display:"block",my:1.75,borderBottom:"1px solid #f0efed"}},children:[(0,Dt.jsxs)(Fr.Box,{sx:{minWidth:0},children:[(0,Dt.jsxs)(Fr.Box,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[(0,Dt.jsx)(Fr.Box,{component:"span",sx:{fontSize:18,fontWeight:600,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},children:R.name}),(0,Dt.jsx)(Fr.Box,{component:"span",sx:{flexShrink:0,px:1,py:.25,borderRadius:.75,bgcolor:"#f1f5f9",color:"#64748b",fontSize:13,fontWeight:500},children:_.get(R.group_seq)??"\uC0AD\uC81C\uB41C \uD504\uB85C\uC81D\uD2B8"}),(0,Dt.jsxs)(Fr.Box,{component:"span",sx:{flexShrink:0,fontSize:14,color:"#57564f"},children:[Vy(R.start_date)," ~"," ",Vy(R.end_date)]})]}),R.goal?(0,Dt.jsx)(Fr.Box,{sx:{mt:.5,fontSize:14,color:"#787774",lineHeight:1.5},children:R.goal}):null]}),(0,Dt.jsxs)(Fr.Box,{sx:{display:"flex",alignItems:"center",gap:.5},children:[(0,Dt.jsx)(yi.LabelSelect,{label:"\uC0C1\uD0DC",showLabel:!1,size:"small",value:R.status,options:k_.map(F=>({value:F.value,label:F.label})),onChange:F=>{let H=String(F.target.value);if(H==="closed"&&n){L(R);return}r(R.seq,H)},sx:{width:104,flexShrink:0}}),(0,Dt.jsx)(Fr.IconButton,{"aria-label":"\uBAA9\uD45C \uC218\uC815",onClick:()=>y(R),sx:{color:"#9a9a97","&:hover":{color:"#2563eb"}},children:(0,Dt.jsx)(Yy.default,{sx:{fontSize:18}})}),(0,Dt.jsx)(Fr.IconButton,{"aria-label":"\uBAA9\uD45C \uC0AD\uC81C",onClick:()=>c(R.seq),sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:(0,Dt.jsx)(gn,{style:{width:16,height:16}})})]})]},R.seq))})})});return(0,Dt.jsxs)(Dt.Fragment,{children:[(0,Dt.jsx)(md.FormDialog,{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:T}],sectionContentPaddingTop:0,actions:{showCancelButton:!0,left:i.length>0?(0,Dt.jsx)(Fr.Button,{startIcon:(0,Dt.jsx)(Ky.default,{}),onClick:()=>{p(),N(!0)},sx:{color:"#2563eb"},children:"\uC0C8 \uBAA9\uD45C"}):void 0,right:(0,Dt.jsx)(Fr.Button,{variant:"contained",onClick:l,children:"\uD655\uC778"})}}),(0,Dt.jsx)(pd,{open:$!==null,sprint:$,remainingTasks:C,sprints:g,onClose:()=>L(null),onConfirm:R=>{$&&n?.($.seq,R),L(null)}}),(0,Dt.jsx)(md.FormDialog,{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:(0,Dt.jsx)(Fr.Box,{sx:{pt:1},children:(0,Dt.jsxs)(Fr.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2.5,mt:1},children:[(0,Dt.jsx)(yi.LabelSelect,{label:"\uD504\uB85C\uC81D\uD2B8",size:"medium",value:a,options:i.map(R=>({value:R.key,label:R.label})),onChange:R=>h(String(R.target.value)),disabled:S>0}),(0,Dt.jsx)(yi.ClearTextField,{label:"\uBAA9\uD45C \uC774\uB984",size:"medium",placeholder:"\uC608: 8\uC6D4 2\uC8FC\uCC28",value:d,onChange:R=>u(R.target.value)}),(0,Dt.jsx)(yi.DateTextField,{size:"medium",label:"\uC2DC\uC791\uC77C",value:x,onChange:R=>k(R.target.value)}),(0,Dt.jsx)(yi.DateTextField,{size:"medium",label:"\uC885\uB8CC\uC77C",value:I,onChange:R=>M(R.target.value)}),(0,Dt.jsx)(yi.ClearTextField,{label:"\uC124\uBA85",size:"medium",placeholder:"\uC120\uD0DD \uC785\uB825",value:b,onChange:R=>m(R.target.value),sx:{gridColumn:"1 / -1"}})]})})}],actions:{showCancelButton:!0,right:(0,Dt.jsx)(Fr.Button,{variant:"contained",onClick:()=>{w()},disabled:z,children:S>0?"\uC218\uC815":"\uBAA9\uD45C \uB9CC\uB4E4\uAE30"})}})]})}var Yt=require("@mui/material"),Zy=require("@ehfuse/mui-form-dialog"),Jy=Y(require("@mui/icons-material/LinkOutlined"),1),Qy=Y(require("@mui/icons-material/LinkOffOutlined"),1),ex=Y(require("@mui/icons-material/SyncOutlined"),1),tx=Y(require("@mui/icons-material/ArrowForward"),1);var xt=require("react/jsx-runtime");function Xy({from:e,to:f}){return(0,xt.jsxs)(Yt.Box,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:.5},children:[e,(0,xt.jsx)(tx.default,{sx:{fontSize:16,color:"#787774"}}),f]})}function T_({size:e=28}){return(0,xt.jsxs)(Yt.Box,{component:"svg",viewBox:"0 0 48 48","aria-hidden":!0,sx:{width:e,height:e,flexShrink:0,mx:1},children:[(0,xt.jsx)("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"}),(0,xt.jsx)("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"}),(0,xt.jsx)("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"}),(0,xt.jsx)("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 C_({open:e,googleApi:f,onClose:g}){let{status:l,busy:o}=f,{calendarName:s}=ct(),r=l.linked&&l.calendar_name||s||"\uC5C5\uBB34\uD568",t=(0,xt.jsxs)(Yt.Box,{sx:{display:"flex",flexDirection:"column",gap:"24px"},children:[(0,xt.jsxs)(Yt.Box,{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:[(0,xt.jsx)(Yt.Box,{children:(0,xt.jsxs)(Yt.Box,{component:"span",children:[(0,xt.jsx)("b",{children:"\uB0B4\uBCF4\uB0B4\uAE30"}),"\uB294 \uB0B4 \uC5C5\uBB34\uB97C \uAD6C\uAE00 \uCE98\uB9B0\uB354\uC758"," ",(0,xt.jsxs)("b",{children:['"',r,'"']})," \uCE98\uB9B0\uB354\uC5D0 \uBC14\uB85C \uBC18\uC601\uD569\uB2C8\uB2E4."]})}),(0,xt.jsx)(Yt.Box,{children:(0,xt.jsxs)(Yt.Box,{component:"span",children:[(0,xt.jsx)("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."]})}),(0,xt.jsx)(Yt.Box,{children:(0,xt.jsxs)(Yt.Box,{component:"span",children:['"',r,'" \uCE98\uB9B0\uB354 \uC77C\uC815\uC740 \uC5C5\uBB34\uD568\uC5D0\uC11C \uC218\uC815\uD574\uC57C \uD569\uB2C8\uB2E4.']})})]}),l.configured?(0,xt.jsxs)(Yt.Box,{sx:{border:"1px solid #e6e6e3",borderRadius:1,pl:2,pr:3,py:1.75,display:"flex",flexDirection:"column",gap:1.25},children:[(0,xt.jsxs)(Yt.Box,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[(0,xt.jsx)(T_,{}),(0,xt.jsxs)(Yt.Box,{sx:{flex:1,minWidth:0},children:[(0,xt.jsx)(Yt.Box,{sx:{fontSize:18,color:"#111",fontWeight:700},children:"\uAD6C\uAE00 \uACC4\uC815 \uC5F0\uACB0"}),(0,xt.jsx)(Yt.Box,{sx:{fontSize:15,color:"#111",mt:.5,lineHeight:1.6},children:l.linked?(0,xt.jsxs)(xt.Fragment,{children:[(0,xt.jsxs)(Yt.Box,{component:"span",sx:{display:"block",fontWeight:600},children:[l.google_email||"\uAD6C\uAE00 \uACC4\uC815"," ","\uC5D0 \uC5F0\uACB0\uB428"]}),(0,xt.jsxs)(Yt.Box,{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?(0,xt.jsxs)(Yt.Box,{sx:{fontSize:13,color:"#c62828",mt:.5},children:["\uCD5C\uADFC \uC624\uB958: ",l.last_error]}):null]}),l.linked?(0,xt.jsx)(Yt.Button,{size:"small",variant:"outlined",color:"inherit",disabled:o,startIcon:(0,xt.jsx)(Qy.default,{sx:{fontSize:18}}),onClick:f.onDisconnect,sx:{flexShrink:0,whiteSpace:"nowrap",ml:2},children:"\uC5F0\uACB0 \uD574\uC81C"}):(0,xt.jsx)(Yt.Button,{size:"small",variant:"contained",disableElevation:!0,disabled:o,startIcon:(0,xt.jsx)(Jy.default,{sx:{fontSize:18}}),onClick:f.onConnect,sx:{flexShrink:0,whiteSpace:"nowrap",bgcolor:"#2563eb",ml:2},children:"\uC5F0\uACB0\uD558\uAE30"})]}),l.linked?(0,xt.jsxs)(Yt.Box,{sx:{display:"flex",alignItems:"center",gap:2,flexWrap:"wrap",pl:4.5},children:[(0,xt.jsx)(Yt.FormControlLabel,{control:(0,xt.jsx)(Yt.Switch,{size:"small",checked:l.export_enabled,disabled:o,onChange:(n,c)=>f.onToggleExport(c)}),label:(0,xt.jsxs)(Yt.Box,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:.5},children:["\uB0B4\uBCF4\uB0B4\uAE30 (",(0,xt.jsx)(Xy,{from:"\uC5C5\uBB34\uD568",to:"\uAD6C\uAE00"}),")"]}),sx:{m:0,"& .MuiFormControlLabel-label":{fontSize:14,color:"#37352f"}}}),(0,xt.jsx)(Yt.FormControlLabel,{control:(0,xt.jsx)(Yt.Switch,{size:"small",checked:l.import_enabled,disabled:o,onChange:(n,c)=>f.onToggleImport(c)}),label:(0,xt.jsxs)(Yt.Box,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:.5},children:["\uAC00\uC838\uC624\uAE30 (",(0,xt.jsx)(Xy,{from:"\uAD6C\uAE00",to:"\uC5C5\uBB34\uD568"}),")"]}),sx:{m:0,"& .MuiFormControlLabel-label":{fontSize:14,color:"#37352f"}}}),f.onResync?(0,xt.jsx)(Yt.Button,{size:"small",color:"inherit",disabled:o||!l.export_enabled,startIcon:(0,xt.jsx)(ex.default,{sx:{fontSize:18}}),onClick:f.onResync,sx:{ml:"auto",whiteSpace:"nowrap"},children:"\uC804\uCCB4 \uB2E4\uC2DC \uB0B4\uBCF4\uB0B4\uAE30"}):null]}):null]}):(0,xt.jsx)(Yt.Box,{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(0,xt.jsx)(Zy.FormDialog,{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:(0,xt.jsx)(Yt.Button,{variant:"contained",onClick:g,sx:{minWidth:80},children:"\uB2EB\uAE30"})}})}var Xo=require("react"),Zo=require("@mui/material"),rx=require("@ehfuse/mui-form-dialog"),nx=require("@ehfuse/mui-form-controls"),ox=require("@ehfuse/tree-view");var An=require("react/jsx-runtime");function ix(e){return`${e.name}#${e.seq}`}function B_(e){return Number(e.slice(e.lastIndexOf("#")+1))||0}function I_(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 E_(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 M_(e){let f=[[e.name,e.role_name].filter(Boolean).join(" "),e.department].filter(Boolean).join(" / ");return{id:`emp:${e.seq}`,label:ix(e),renderLabel:(0,An.jsx)(Zo.Box,{component:"span",sx:{display:"inline-flex",alignItems:"baseline",gap:.75},children:(0,An.jsx)(Zo.Box,{component:"span",sx:{fontWeight:400,color:"text.primary"},children:f})})}}function sx(e,f){let g=(e.groups??[]).map(o=>sx(o,f)).filter(o=>o!==null),l=(e.employees??[]).filter(o=>E_(o,f)).map(M_);return g.length===0&&l.length===0?null:{id:`group:${e.key}`,label:e.name,children:[...g,...l]}}function R_({groups:e,allEmployees:f,initialSelectedSeqs:g,multiple:l,isMobile:o,onSelectionChange:s}){let[r,t]=(0,Xo.useState)(""),n=(0,Xo.useMemo)(()=>e.map(i=>sx(i,r.trim().toLowerCase())).filter(i=>i!==null),[e,r]),c=(0,Xo.useMemo)(()=>f.filter(i=>g.includes(i.seq)).map(ix),[]);return(0,An.jsxs)(An.Fragment,{children:[(0,An.jsx)(Zo.Box,{sx:{px:1.5,py:1,borderBottom:"1px solid #cccccc",flexShrink:0},children:(0,An.jsx)(nx.SearchTextField,{size:"small",fullWidth:!0,placeholder:"\uC774\uB984, \uBD80\uC11C \uAC80\uC0C9",onSearch:t,onClear:()=>t(""),sx:{"& .MuiOutlinedInput-notchedOutline":{border:"none"},"& .MuiInputBase-root":{px:0}}})}),(0,An.jsx)(Zo.Box,{sx:o?{display:"flex",flexDirection:"column"}:{flex:1,minHeight:0,overflow:"hidden",display:"flex",flexDirection:"column"},children:(0,An.jsx)(ox.TreeView,{items:n,checkbox:!0,multiSelect:l,selectionMode:"child",showSearch:!1,defaultExpanded:!0,initialSelections:c,onChange:i=>s(i.map(B_).filter(a=>a>0)),styles:{border:"none",borderRadius:"0"}})})]})}function O_({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=dr(),[i,a]=(0,Xo.useState)([]),[h,d]=(0,Xo.useState)(0),u=(0,Xo.useMemo)(()=>I_(l),[l]),b=s??[];(0,Xo.useEffect)(()=>{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(0,An.jsx)(rx.FormDialog,{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:(0,An.jsx)(Zo.Box,{sx:{...c?{}:{height:560},display:"flex",flexDirection:"column",border:"1px solid #cccccc",borderRadius:1,...c?{}:{overflow:"hidden"},userSelect:"none"},children:(0,An.jsx)(R_,{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?(0,An.jsx)(Zo.Typography,{variant:"body2",color:"text.secondary",sx:{whiteSpace:"pre-line",lineHeight:1.35},children:g}):void 0,right:(0,An.jsx)(Zo.Button,{variant:"contained",onClick:m,children:r})}})}var Lo=require("react"),co=require("@mui/material"),Rx=require("@ehfuse/mui-form-dialog"),Zc=require("@ehfuse/mui-form-controls"),Ox=Y(require("@mui/icons-material/SpeedOutlined"),1);var Uc=require("react"),_n=require("@mui/material"),ax=require("@ehfuse/mui-form-dialog"),fl=require("@ehfuse/mui-form-controls"),lx=Y(require("@ehfuse/overlay-scrollbar"),1);var Kr=require("react/jsx-runtime"),A_=[{value:"count",label:"\uBBF8\uC644\uB8CC \uAC74\uC218"},{value:"points",label:"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8"}];function bd({open:e,capacity:f,employees:g,onClose:l,onSave:o}){let[s,r]=(0,Uc.useState)(f??jo);(0,Uc.useEffect)(()=>{e&&r(f??jo)},[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(0,Kr.jsx)(ax.FormDialog,{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:(0,Kr.jsx)(_n.Button,{variant:"contained",onClick:()=>{o(s)},children:"\uC800\uC7A5"})},sectionContentPaddingTop:0,sections:[{id:"capacity",title:"",showTitle:!1,children:(0,Kr.jsxs)(_n.Box,{sx:{display:"flex",flexDirection:"column",gap:2},children:[(0,Kr.jsx)(_n.Box,{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."}),(0,Kr.jsxs)(_n.Box,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[(0,Kr.jsx)(_n.Box,{sx:{width:104,flexShrink:0,fontSize:16,color:"#37352f"},children:"\uC138\uB294 \uB2E8\uC704"}),(0,Kr.jsx)(fl.LabelSelect,{size:"medium",fullWidth:!0,label:"",value:s.basis,options:A_,onChange:c=>r(i=>({...i,basis:c.target.value}))})]}),(0,Kr.jsxs)(_n.Box,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[(0,Kr.jsx)(_n.Box,{sx:{width:104,flexShrink:0,fontSize:16,color:"#37352f"},children:"\uAE30\uBCF8 \uC6A9\uB7C9"}),(0,Kr.jsx)(fl.NumberField,{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))}))})]}),(0,Kr.jsx)(_n.Box,{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`}),(0,Kr.jsx)(_n.Box,{sx:{fontSize:16,fontWeight:700,color:"#37352f"},children:"\uC0AC\uB78C\uBCC4 \uC608\uC678"}),g.length===0?(0,Kr.jsx)(_n.Box,{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."}):(0,Kr.jsx)(_n.Box,{sx:{border:"1px solid #e6e6e3",borderRadius:1,overflow:"hidden"},children:(0,Kr.jsx)(lx.default,{style:{maxHeight:260},thumb:{width:6},children:g.filter(c=>Number(c.account_seq)>0).map(c=>(0,Kr.jsxs)(_n.Box,{sx:{display:"flex",alignItems:"center",gap:1.5,px:2,py:1,borderBottom:"1px solid #f2f2f0","&:last-of-type":{borderBottom:"none"}},children:[(0,Kr.jsxs)(_n.Box,{sx:{flex:1,minWidth:0,fontSize:16,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[c.name,c.department?(0,Kr.jsx)(_n.Box,{component:"span",sx:{ml:1,fontSize:14,color:"#787774"},children:c.department}):null]}),(0,Kr.jsx)(_n.Box,{sx:{width:132,flexShrink:0},children:(0,Kr.jsx)(fl.NumberField,{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))})})]})}]})}var pl=require("@mui/material"),xn=require("recharts");var cx=require("@mui/material"),ux=require("react/jsx-runtime");function Dn({text:e,height:f}){return(0,ux.jsx)(cx.Box,{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})}var fx=require("react"),Vc="#2f80ed",dx="#a9c9f5",bs="#9a9a97",yd="#2e9e6b",Jo="#3d7eff",xd="#c3c8ce",dl="#f2a30f",hl={contentStyle:{fontSize:13.5,color:"#37352f",border:"1px solid #e6e6e3",borderRadius:6},labelStyle:{fontSize:13.5,color:"#37352f",fontWeight:700},itemStyle:{fontSize:13.5}},ra={...hl,cursor:!1},na={wrapperStyle:{fontSize:13.5,paddingTop:10},formatter:e=>(0,fx.createElement)("span",{style:{paddingRight:14,color:"#37352f"}},e)};function an(e){return{display:"flex",flexDirection:"column",minHeight:0,position:"relative",...typeof e=="string"?{flex:1}:{}}}var Pn={flexShrink:0,mb:1.5,display:"flex",alignItems:"center",gap:2,flexWrap:"wrap"};function Qo(e){return{"& *":{outline:"none"},userSelect:"none",...typeof e=="number"?{height:e,flexShrink:0}:{flex:1,minHeight:0}}}var yn=require("react/jsx-runtime");function D_(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 vd({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,...D_(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?(0,yn.jsx)(Dn,{text:"\uD45C\uC2DC\uD560 \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",height:g}):(0,yn.jsxs)(pl.Box,{sx:an(g),children:[(0,yn.jsxs)(pl.Box,{sx:{flexShrink:0,mb:1,display:"flex",justifyContent:"space-between",flexWrap:"wrap",gap:1,fontSize:14,color:"#000"},children:[(0,yn.jsxs)("span",{children:["\uC644\uB8CC ",s?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uBAA9\uD45C\uBCC4"]}),n!==null?(0,yn.jsxs)("span",{children:["\uD3C9\uADE0(\uC885\uB8CC \uBAA9\uD45C)"," ",(0,yn.jsx)(pl.Box,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:n}),r]}):null]}),(0,yn.jsx)(pl.Box,{sx:Qo(g),children:(0,yn.jsx)(xn.ResponsiveContainer,{width:"100%",height:"100%",children:(0,yn.jsxs)(xn.BarChart,{data:c,margin:{top:8,right:12,left:0,bottom:0},barCategoryGap:"28%",children:[(0,yn.jsx)(xn.CartesianGrid,{strokeDasharray:"3 3",stroke:"#e6e6e3"}),(0,yn.jsx)(xn.XAxis,{dataKey:"\uBAA9\uD45C",tick:{fontSize:13},tickMargin:6,interval:0}),(0,yn.jsx)(xn.YAxis,{tick:{fontSize:13},width:40,allowDecimals:!1}),(0,yn.jsx)(xn.Tooltip,{...ra,formatter:i=>`${Number(i??0)}${r}`}),n!==null?(0,yn.jsx)(xn.ReferenceLine,{y:n,stroke:bs,strokeDasharray:"6 5",label:{value:`\uD3C9\uADE0 ${n}${r}`,position:"right",fontSize:13}}):null,(0,yn.jsx)(xn.Bar,{dataKey:"\uC644\uB8CC",radius:[4,4,0,0],children:c.map(i=>(0,yn.jsx)(xn.Cell,{fill:i.closed?Vc:dx},i.\uBAA9\uD45C))})]})})})]})}var px=require("react"),Po=require("@mui/material"),qn=require("recharts");var Pr=require("react/jsx-runtime");function hx(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?new Date(`${e}T00:00:00`):null}function P_(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function N_(e){return e.slice(5).replace("-",".")}function wd({sprint:e,tasks:f,todayStr:g,height:l=200,headerLeft:o}){let s=(0,px.useMemo)(()=>{let a=hx(e.start_date),h=hx(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),$=/^\d{4}-\d{2}-\d{2}$/.test(N)?N:e.start_date;k.set($,(k.get($)??0)+m(P))}let I=[];for(let P=new Date(a);P<=h;P.setDate(P.getDate()+1))I.push(P_(P));let M=x,z=x;return{empty:!1,data:I.map((P,N)=>{let $=I.length===1?0:x*(1-N/(I.length-1));return P<=g&&(M-=k.get(P)??0,z=Math.max(0,M)),{\uB0A0\uC9DC:N_(P),\uC774\uC0C1:Math.round($*10)/10,\uB0A8\uC740\uB7C9:P<=g?Math.max(0,M):null}}),total:x,usePoints:b,last:z}},[e,f,g]);if(!s)return(0,Pr.jsxs)(Po.Box,{sx:an(l),children:[o?(0,Pr.jsx)(Po.Box,{sx:Pn,children:o}):null,(0,Pr.jsx)(Dn,{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(0,Pr.jsxs)(Po.Box,{sx:an(l),children:[o?(0,Pr.jsx)(Po.Box,{sx:Pn,children:o}):null,(0,Pr.jsx)(Dn,{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(0,Pr.jsxs)(Po.Box,{sx:an(l),children:[(0,Pr.jsxs)(Po.Box,{sx:Pn,children:[o?(0,Pr.jsx)(Po.Box,{sx:{flexShrink:0},children:o}):null,(0,Pr.jsxs)(Po.Box,{sx:{flex:1,minWidth:220,display:"flex",justifyContent:"space-between",flexWrap:"wrap",gap:1,fontSize:14,color:"#000"},children:[(0,Pr.jsxs)("span",{children:["\uB0A8\uC740 ",n?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uCD1D ",t]}),(0,Pr.jsxs)("span",{children:["\uD604\uC7AC"," ",(0,Pr.jsx)(Po.Box,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:c}),i," \uB0A8\uC74C"]})]})]}),(0,Pr.jsx)(Po.Box,{sx:Qo(l),children:(0,Pr.jsx)(qn.ResponsiveContainer,{width:"100%",height:"100%",children:(0,Pr.jsxs)(qn.LineChart,{data:r,margin:{top:8,right:12,left:0,bottom:0},children:[(0,Pr.jsx)(qn.CartesianGrid,{strokeDasharray:"3 3",stroke:"#e6e6e3"}),(0,Pr.jsx)(qn.XAxis,{dataKey:"\uB0A0\uC9DC",tick:{fontSize:13},tickMargin:6,minTickGap:24}),(0,Pr.jsx)(qn.YAxis,{tick:{fontSize:13},width:40,allowDecimals:!1}),(0,Pr.jsx)(qn.Tooltip,{...hl,formatter:a=>`${Number(a??0)}${i}`}),(0,Pr.jsx)(qn.Line,{type:"linear",dataKey:"\uC774\uC0C1",stroke:bs,strokeDasharray:"6 5",strokeWidth:1.5,dot:!1}),(0,Pr.jsx)(qn.Line,{type:"monotone",dataKey:"\uB0A8\uC740\uB7C9",stroke:Vc,strokeWidth:2.5,dot:!1,connectNulls:!1})]})})})]})}var Cd=require("react"),No=require("@mui/material"),vn=require("recharts");function ei(e){let f=g=>String(g).padStart(2,"0");return`${e.getFullYear()}-${f(e.getMonth()+1)}-${f(e.getDate())}`}function ml(e,f=new Date){let g=new Date(f);return g.setMonth(g.getMonth()-e),g}function L_(e=new Date){return{fromDate:ei(ml(1,e)),toDate:ei(e)}}var _d=864e5,gl=[0,1,2,3,5,8,13,21];function kd(e){return!e.archived&&!e.linked_only&&!e.is_notice&&!e.is_event}function Kc(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 oa(e){let f=String(e??"").trim();return/^\d{4}-\d{2}-\d{2}/.test(f)?f.slice(0,10):""}function z_(e){let f=oa(e.created_time)||oa(e.start_date)||oa(e.completed_time);if(!f)return null;let g=oa(e.start_date),l=g&&g>f?g:f,o=e.completed?oa(e.completed_time)||f:"";return{created:f,started:l,done:o}}function bx(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(ei(new Date(g.getTime()-s*_d)));return o}function Sd(e,f,g){let l=bx(f,g),o=e.filter(kd).map(z_).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 j_(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 mx(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(j_(f,.85))}}function gx(e){for(let f=gl.length-1;f>=0;f-=1)if(e>=gl[f])return f;return 0}function F_(){return gl.map((e,f)=>f===gl.length-1?`${e}\uC77C+`:`${e}~${gl[f+1]}\uC77C`)}function Td(e,f,g){let l=bx(f,g),o=l[0],s=l[l.length-1],r=F_(),t=r.map(()=>0),n=r.map(()=>0),c=[],i=[];for(let a of e){if(!kd(a)||!a.completed)continue;let h=oa(a.completed_time);if(!h||h<o||h>s)continue;let d=Kc(a.completed_time),u=Kc(a.created_time);if(d===null||u===null)continue;let b=Math.max(0,(d-u)/_d);c.push(b),t[gx(b)]+=1;let m=Kc(a.start_date);if(m===null||m>d)continue;let x=Math.max(0,(d-Math.max(m,u))/_d);i.push(x),n[gx(x)]+=1}return{labels:r,leadCounts:t,cycleCounts:n,lead:mx(c),cycle:mx(i)}}var Mr=require("react/jsx-runtime");function q_(e){return e.slice(5).replace("-",".")}function Bd({tasks:e,todayStr:f,days:g=30,height:l=220,headerLeft:o}){let s=(0,Cd.useMemo)(()=>Sd(e,g,f),[e,g,f]),r=(0,Cd.useMemo)(()=>s.points.map(n=>({\uB0A0\uC9DC:q_(n.day),\uC644\uB8CC:n.done,\uC9C4\uD589:n.inProgress,\uB300\uAE30:n.waiting})),[s]),t=(0,Mr.jsxs)(No.Box,{sx:Pn,children:[o?(0,Mr.jsx)(No.Box,{sx:{flexShrink:0},children:o}):null,(0,Mr.jsxs)(No.Box,{sx:{flex:1,minWidth:220,display:"flex",flexDirection:"column",gap:.5},children:[(0,Mr.jsxs)(No.Box,{sx:{display:"flex",justifyContent:"space-between",flexWrap:"wrap",gap:1,fontSize:14,color:"#000"},children:[(0,Mr.jsxs)("span",{children:["\uCD5C\uADFC ",s.points.length,"\uC77C \u2014 \uC811\uC218 ",s.currentTotal,"\uAC74 / \uC644\uB8CC ",s.currentDone,"\uAC74"]}),(0,Mr.jsxs)("span",{children:["\uC9C4\uD589 \uC911"," ",(0,Mr.jsx)(No.Box,{component:"span",sx:{color:Jo,fontWeight:700},children:s.currentWip}),"\uAC74"]})]}),(0,Mr.jsx)(No.Box,{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?(0,Mr.jsxs)(No.Box,{sx:an(l),children:[o?(0,Mr.jsx)(No.Box,{sx:Pn,children:o}):null,(0,Mr.jsx)(Dn,{text:"\uC774 \uAE30\uAC04\uC5D0 \uC811\uC218\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",height:l})]}):(0,Mr.jsxs)(No.Box,{sx:an(l),children:[t,(0,Mr.jsx)(No.Box,{sx:Qo(l),children:(0,Mr.jsx)(vn.ResponsiveContainer,{width:"100%",height:"100%",children:(0,Mr.jsxs)(vn.AreaChart,{data:r,margin:{top:8,right:12,left:0,bottom:4},children:[(0,Mr.jsx)(vn.CartesianGrid,{strokeDasharray:"3 3",stroke:"#e6e6e3"}),(0,Mr.jsx)(vn.XAxis,{dataKey:"\uB0A0\uC9DC",tick:{fontSize:13},tickMargin:6,minTickGap:24}),(0,Mr.jsx)(vn.YAxis,{tick:{fontSize:13},width:40,allowDecimals:!1}),(0,Mr.jsx)(vn.Tooltip,{...hl,formatter:n=>`${Number(n??0)}\uAC74`}),(0,Mr.jsx)(vn.Legend,{...na}),(0,Mr.jsx)(vn.Area,{type:"monotone",dataKey:"\uC644\uB8CC",stackId:"flow",stroke:yd,fill:yd,fillOpacity:.9}),(0,Mr.jsx)(vn.Area,{type:"monotone",dataKey:"\uC9C4\uD589",stackId:"flow",stroke:Jo,fill:Jo,fillOpacity:.85}),(0,Mr.jsx)(vn.Area,{type:"monotone",dataKey:"\uB300\uAE30",stackId:"flow",stroke:xd,fill:xd,fillOpacity:.9})]})})})]})}var Id=require("react"),$n=require("@mui/material"),kn=require("recharts");var rr=require("react/jsx-runtime");function yx({label:e,color:f,summary:g}){let l=(0,rr.jsxs)($n.Box,{sx:{display:"flex",alignItems:"center",gap:.75},children:[(0,rr.jsx)($n.Box,{sx:{width:10,height:10,borderRadius:.5,bgcolor:f,flexShrink:0}}),(0,rr.jsx)($n.Box,{component:"span",sx:{fontWeight:700,color:"#37352f"},children:e})]});return g?(0,rr.jsxs)($n.Box,{sx:{display:"contents"},children:[l,(0,rr.jsxs)("span",{children:[g.count,"\uAC74"]}),(0,rr.jsxs)("span",{children:["\uC911\uC559\uAC12"," ",(0,rr.jsx)($n.Box,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:g.median}),"\uC77C"]}),(0,rr.jsxs)("span",{children:["\uD3C9\uADE0 ",g.average,"\uC77C"]}),(0,rr.jsxs)("span",{children:["85% ",g.p85,"\uC77C \uC774\uB0B4"]})]}):(0,rr.jsxs)($n.Box,{sx:{display:"contents"},children:[l,(0,rr.jsx)($n.Box,{component:"span",sx:{gridColumn:"span 4",color:"#9a9a97"},children:"\uD45C\uBCF8 \uC5C6\uC74C"})]})}function Ed({tasks:e,todayStr:f,days:g=30,height:l=200,headerLeft:o}){let s=(0,Id.useMemo)(()=>Td(e,g,f),[e,g,f]),r=(0,Id.useMemo)(()=>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?(0,rr.jsxs)($n.Box,{sx:an(l),children:[(0,rr.jsxs)($n.Box,{sx:Pn,children:[o?(0,rr.jsx)($n.Box,{sx:{flexShrink:0},children:o}):null,(0,rr.jsxs)($n.Box,{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:[(0,rr.jsx)(yx,{label:"\uB9AC\uB4DC\uD0C0\uC784(\uC791\uC131\u2192\uC644\uB8CC)",color:Jo,summary:s.lead}),(0,rr.jsx)(yx,{label:"\uC0AC\uC774\uD074\uD0C0\uC784(\uC2DC\uC791\u2192\uC644\uB8CC)",color:dl,summary:s.cycle})]})]}),(0,rr.jsx)($n.Box,{sx:Qo(l),children:(0,rr.jsx)(kn.ResponsiveContainer,{width:"100%",height:"100%",children:(0,rr.jsxs)(kn.BarChart,{data:r,margin:{top:8,right:12,left:0,bottom:4},barCategoryGap:"24%",children:[(0,rr.jsx)(kn.CartesianGrid,{strokeDasharray:"3 3",stroke:"#e6e6e3"}),(0,rr.jsx)(kn.XAxis,{dataKey:"\uAD6C\uAC04",tick:{fontSize:13},tickMargin:6,interval:0}),(0,rr.jsx)(kn.YAxis,{tick:{fontSize:13},width:40,allowDecimals:!1}),(0,rr.jsx)(kn.Tooltip,{...ra,formatter:t=>`${Number(t??0)}\uAC74`}),(0,rr.jsx)(kn.Legend,{...na}),(0,rr.jsx)(kn.Bar,{dataKey:"\uB9AC\uB4DC\uD0C0\uC784",fill:Jo,radius:[3,3,0,0]}),(0,rr.jsx)(kn.Bar,{dataKey:"\uC0AC\uC774\uD074\uD0C0\uC784",fill:dl,radius:[3,3,0,0]})]})})})]}):(0,rr.jsxs)($n.Box,{sx:an(l),children:[o?(0,rr.jsx)($n.Box,{sx:Pn,children:o}):null,(0,rr.jsx)(Dn,{text:"\uC774 \uAE30\uAC04\uC5D0 \uC644\uB8CC\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",height:l})]})}var Dd=require("react"),qi=require("@mui/material"),qr=require("recharts");function $_(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 H_(e,f,g){let l=String(e.due_date??"").slice(0,10),o=$_(f,l);return o===null?"later":o<0?"overdue":o<=g?"soon":"later"}function bl(e,f){let{todayStr:g,soonDays:l=7,includeUnassigned:o=!0,limit:s,capacity:r}=f,t=r??jo,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[H_(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=xx(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 yl(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 xx(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 xl(e){return e.capacity>0&&e.load>e.capacity}function Rd(e,f){return f>0&&e.total>=f}function Od(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 Md(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 W_(e){let f=new Date(`${e}T00:00:00`);if(Number.isNaN(f.getTime()))return e;let g=(f.getDay()+6)%7;return Md(e,-g)}function Ad(e,f){let{todayStr:g,includeUnassigned:l=!0,weeks:o=6,limit:s}=f,r=W_(g),t=Array.from({length:Math.max(1,o)},(d,u)=>{let b=Md(r,u*7),m=Md(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(I=>x>=I.start&&x<=I.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}}var lr=require("react/jsx-runtime"),vl="#e5484d";function Pd({tasks:e,todayStr:f,soonDays:g=7,overloadThreshold:l=0,capacity:o=jo,height:s=200,headerLeft:r,selectedAccountSeq:t=0,onSelectPerson:n}){let c=(0,Dd.useMemo)(()=>bl(e,{todayStr:f,soonDays:g,capacity:o}),[e,f,g,o]),i=(0,Dd.useMemo)(()=>Od(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?xl(b):Rd(b,a))).length;return c.length===0?(0,lr.jsxs)(qi.Box,{sx:an(s),children:[r?(0,lr.jsx)(qi.Box,{sx:Pn,children:r}):null,(0,lr.jsx)(Dn,{text:"\uB2F4\uB2F9\uC790\uAC00 \uC9C0\uC815\uB41C \uBBF8\uC644\uB8CC \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",height:s})]}):(0,lr.jsxs)(qi.Box,{sx:an(s),children:[(0,lr.jsxs)(qi.Box,{sx:Pn,children:[r,(0,lr.jsxs)(qi.Box,{sx:{fontSize:13.5,color:"#37352f"},children:["1\uC778 \uD3C9\uADE0 ",(0,lr.jsx)("b",{children:i.toFixed(1)}),"\uAC74 \xB7"," ",h?(0,lr.jsxs)(lr.Fragment,{children:["\uC6A9\uB7C9 ",(0,lr.jsx)("b",{children:o.default_capacity||"\uAC1C\uC778\uBCC4"}),o.default_capacity?d:""]}):(0,lr.jsxs)(lr.Fragment,{children:["\uACFC\uBD80\uD558 \uAE30\uC900 ",(0,lr.jsx)("b",{children:a}),"\uAC74"]}),u>0?(0,lr.jsxs)(qi.Box,{component:"span",sx:{ml:1,color:vl,fontWeight:700},children:["\uCD08\uACFC ",u,"\uBA85"]}):null]})]}),(0,lr.jsx)(qi.Box,{sx:Qo(s),children:(0,lr.jsx)(qr.ResponsiveContainer,{width:"100%",height:"100%",children:(0,lr.jsxs)(qr.BarChart,{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:[(0,lr.jsx)(qr.CartesianGrid,{strokeDasharray:"3 3",horizontal:!1,stroke:"#eceae6"}),(0,lr.jsx)(qr.XAxis,{type:"number",allowDecimals:!1,tick:{fontSize:12}}),(0,lr.jsx)(qr.YAxis,{type:"category",dataKey:"name",width:84,tick:{fontSize:12},interval:0}),(0,lr.jsx)(qr.Tooltip,{...ra,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)}%)`}}),(0,lr.jsx)(qr.Legend,{...na}),i>0?(0,lr.jsx)(qr.ReferenceLine,{x:i,stroke:bs,strokeDasharray:"4 4",label:{value:"\uD3C9\uADE0",position:"top",fontSize:11,fill:bs}}):null,o.default_capacity>0?(0,lr.jsx)(qr.ReferenceLine,{x:o.default_capacity,stroke:vl,strokeDasharray:"2 3",label:{value:"\uC6A9\uB7C9",position:"top",fontSize:11,fill:vl}}):null,(0,lr.jsx)(qr.Bar,{dataKey:"overdue",name:"\uC9C0\uC5F0",stackId:"load",fill:vl}),(0,lr.jsx)(qr.Bar,{dataKey:"soon",name:`\uC784\uBC15(${g}\uC77C)`,stackId:"load",fill:dl}),(0,lr.jsx)(qr.Bar,{dataKey:"later",name:"\uC5EC\uC720",stackId:"load",fill:Jo,radius:[0,3,3,0],children:c.map(b=>(0,lr.jsx)(qr.Cell,{fill:h&&xl(b)?vl:Jo,fillOpacity:h&&xl(b)?.45:1,stroke:b.accountSeq===t?"#37352f":void 0,strokeWidth:b.accountSeq===t?1.5:0},b.accountSeq))})]})})})]})}var Gc=require("react"),Yc=require("@mui/material"),Bx=require("@ehfuse/mui-form-dialog");var Sx=require("react"),br=require("@mui/material"),Tx=Y(require("@mui/icons-material/PersonOutlineOutlined"),1),Cx=Y(require("@ehfuse/overlay-scrollbar"),1);var mr=require("react/jsx-runtime"),vx=56,wx=68,_x=96;function U_(e){let f=String(e.due_date??"").slice(0,10);return f?f.slice(5).replace("-","/"):"-"}function kx(e,f){let g=String(e.due_date??"").slice(0,10);return!!g&&g<f}function Nd({tasks:e,row:f,todayStr:g,employees:l,rows:o,height:s=200,hideSummary:r=!1,onChangeManager:t,onOpenTask:n}){let[c,i]=(0,Sx.useState)(null),a=yl(e,f.accountSeq),h=d=>o.find(u=>u.accountSeq===d)?.total??0;return(0,mr.jsxs)(br.Box,{sx:{display:"flex",flexDirection:"column",minHeight:0,height:s},children:[r?null:(0,mr.jsxs)(br.Box,{sx:{display:"flex",alignItems:"center",gap:1,px:.5,pb:.75,fontSize:14,color:"#37352f"},children:[(0,mr.jsx)(br.Box,{component:"span",sx:{fontWeight:700},children:f.name}),(0,mr.jsxs)(br.Box,{component:"span",children:["\uBBF8\uC644\uB8CC ",a.length,"\uAC74"]}),f.capacity>0?(0,mr.jsxs)(br.Box,{component:"span",sx:{color:f.load>f.capacity?"#e5484d":"#787774"},children:["\xB7 \uC6A9\uB7C9 ",f.capacity," \uC911 ",f.load]}):null]}),(0,mr.jsxs)(br.Box,{sx:{flex:1,minHeight:0,display:"flex",flexDirection:"column",border:"1px solid #e6e6e3",borderRadius:1,overflow:"hidden"},children:[(0,mr.jsxs)(br.Box,{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:[(0,mr.jsx)(br.Box,{sx:{width:vx,flexShrink:0},children:"\uB9C8\uAC10"}),(0,mr.jsx)(br.Box,{sx:{flex:1,minWidth:0},children:"\uC5C5\uBB34"}),(0,mr.jsx)(br.Box,{sx:{width:wx,flexShrink:0,textAlign:"center"},children:"\uC911\uC694\uB3C4"}),t?(0,mr.jsx)(br.Box,{sx:{width:_x,flexShrink:0,textAlign:"center"},children:"\uCC45\uC784\uC790"}):null]}),(0,mr.jsx)(br.Box,{sx:{flex:1,minHeight:0},children:(0,mr.jsx)(Cx.default,{style:{height:"100%"},thumb:{width:6},children:a.length===0?(0,mr.jsx)(br.Box,{sx:{p:2,fontSize:14,color:"#9a9a97"},children:"\uBBF8\uC644\uB8CC \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):a.map(d=>(0,mr.jsxs)(br.Box,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1.5,borderBottom:"1px solid #f2f2f0"},children:[(0,mr.jsx)(br.Box,{sx:{width:vx,flexShrink:0,fontSize:13.5,color:kx(d,g)?"#e5484d":"#787774",fontWeight:kx(d,g)?700:400},children:U_(d)}),(0,mr.jsx)(br.Box,{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}),(0,mr.jsx)(br.Box,{sx:{width:wx,flexShrink:0,display:"flex",justifyContent:"center"},children:(0,mr.jsx)(Tn,{priority:d.priority})}),t?(0,mr.jsx)(br.Box,{sx:{width:_x,flexShrink:0,display:"flex",justifyContent:"center"},children:(0,mr.jsx)(br.Button,{size:"small",variant:"outlined",startIcon:(0,mr.jsx)(Tx.default,{sx:{fontSize:17}}),onClick:u=>i({el:u.currentTarget,taskSeq:d.seq}),children:"\uC62E\uAE30\uAE30"})}):null]},d.seq))})})]}),(0,mr.jsx)(br.Menu,{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=>(0,mr.jsxs)(br.MenuItem,{onClick:()=>{c&&t&&t(c.taskSeq,Number(d.account_seq),d.name),i(null)},sx:{fontSize:14,minWidth:200},children:[(0,mr.jsx)(br.Box,{sx:{flex:1},children:d.name}),(0,mr.jsxs)(br.Box,{component:"span",sx:{ml:2,fontSize:13,color:"#787774"},children:[h(Number(d.account_seq)),"\uAC74"]})]},d.account_seq))})]})}var wl=require("react/jsx-runtime");function Ld({open:e,row:f,rows:g,tasks:l,todayStr:o,employees:s,onClose:r,onChangeManager:t,onOpenTask:n}){let[c,i]=(0,Gc.useState)(f);(0,Gc.useEffect)(()=>{f&&i(f)},[f]);let a=f??c,h=a?yl(l,a.accountSeq).length:0;return(0,wl.jsx)(Bx.FormDialog,{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:(0,wl.jsx)(Yc.Button,{variant:"contained",onClick:r,children:"\uB2EB\uAE30"})},sections:[{id:"person-tasks",title:"",showTitle:!1,children:(0,wl.jsx)(Yc.Box,{sx:{minHeight:0},children:a?(0,wl.jsx)(Nd,{tasks:l,row:a,rows:g,todayStr:o,employees:s,height:"min(420px, 52vh)",hideSummary:!0,onChangeManager:t,onOpenTask:n}):null})}]})}var Ex=require("react"),Nn=require("@mui/material"),Mx=require("@ehfuse/overlay-scrollbar");var sn=require("react/jsx-runtime"),Ix="#e5484d",V_="#2f80ed",K_="#9a9a97",zd=30,G_=96,Xc=56;function jd({count:e,max:f,color:g,title:l}){let o=e>0&&f>0?.18+e/f*.72:0;return(0,sn.jsx)(Nn.Tooltip,{title:l,arrow:!0,disableInteractive:!0,placement:"top",children:(0,sn.jsx)(Nn.Box,{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 Fd({tasks:e,todayStr:f,weeks:g=6,height:l=200}){let o=(0,Ex.useMemo)(()=>Ad(e,{todayStr:f,weeks:g}),[e,f,g]);if(o.rows.length===0)return(0,sn.jsx)(Nn.Box,{sx:an(l),children:(0,sn.jsx)(Dn,{text:"\uB2F4\uB2F9\uC790\uAC00 \uC9C0\uC815\uB41C \uBBF8\uC644\uB8CC \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",height:l})});let s=`${G_}px ${Xc}px repeat(${o.weeks.length}, minmax(${Xc}px, 1fr)) ${Xc}px ${Xc}px`,r={height:zd,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(0,sn.jsx)(Nn.Box,{sx:an(l),children:(0,sn.jsx)(Mx.OverlayScrollbar,{style:{height:"100%"},thumb:{width:8},children:(0,sn.jsxs)(Nn.Box,{sx:{display:"grid",gridTemplateColumns:s,minWidth:"fit-content",height:"100%",gridTemplateRows:`${zd}px repeat(${o.rows.length}, minmax(${zd}px, 1fr))`},children:[(0,sn.jsx)(Nn.Box,{sx:{...r,justifyContent:"flex-start",pl:1},children:"\uB2F4\uB2F9\uC790"}),(0,sn.jsx)(Nn.Box,{sx:{...r,color:Ix},children:"\uC9C0\uC5F0"}),o.weeks.map(t=>(0,sn.jsx)(Nn.Box,{sx:{...r,...t.isCurrent?{borderBottom:"2px solid #2f80ed"}:{}},children:t.label},t.start)),(0,sn.jsx)(Nn.Box,{sx:r,children:"\uB9C8\uAC10\uC5C6\uC74C"}),(0,sn.jsx)(Nn.Box,{sx:r,children:"\uD569\uACC4"}),o.rows.map(t=>(0,sn.jsxs)(Nn.Box,{sx:{display:"contents"},children:[(0,sn.jsx)(Nn.Box,{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}),(0,sn.jsx)(jd,{count:t.overdue,max:o.maxCell,color:Ix,title:`${t.name} \xB7 \uC9C0\uC5F0 ${t.overdue}\uAC74`}),t.byWeek.map((n,c)=>(0,sn.jsx)(jd,{count:n,max:o.maxCell,color:V_,title:`${t.name} \xB7 ${o.weeks[c].label} \uC8FC \uB9C8\uAC10 ${n}\uAC74`},o.weeks[c].start)),(0,sn.jsx)(jd,{count:t.noDue,max:o.maxCell,color:K_,title:`${t.name} \xB7 \uB9C8\uAC10 \uBBF8\uC815 ${t.noDue}\uAC74`}),(0,sn.jsxs)(Nn.Box,{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?(0,sn.jsxs)(Nn.Box,{component:"span",sx:{ml:.25,fontSize:10.5,color:"#9a9a97"},children:["(+",t.beyond,")"]}):null]})]},t.accountSeq))]})})})}var nr=require("react/jsx-runtime"),Ax="min(560px, 62vh)",Y_=`calc(${Ax} - 4px)`,X_=[{value:"30",label:"\uCD5C\uADFC 30\uC77C"},{value:"60",label:"\uCD5C\uADFC 60\uC77C"},{value:"90",label:"\uCD5C\uADFC 90\uC77C"}];function Z_({open:e,sprints:f,tasks:g,todayStr:l,showSprintCharts:o,capacity:s=jo,capacityEmployees:r=[],onSaveCapacity:t,onChangeTaskManager:n,onOpenTask:c,initialSprintSeq:i=0,onClose:a}){let[h,d]=(0,Lo.useState)(0),[u,b]=(0,Lo.useState)(30);(0,Lo.useEffect)(()=>{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=(0,Lo.useMemo)(()=>f.find(y=>y.seq===h)??null,[f,h]),x={height:Y_,boxSizing:"border-box",px:3,py:2.5,display:"flex",flexDirection:"column",minHeight:0,overflow:"hidden"},k=(0,nr.jsx)(Zc.LabelSelect,{label:"\uBAA9\uD45C",showLabel:!1,showEmptyOption:!1,value:h?String(h):"",options:f.map(y=>({value:String(y.seq),label:so(y)})),onChange:y=>d(Number(y.target.value)||0),sx:{width:280,flexShrink:0}}),[I,M]=(0,Lo.useState)("distribution"),z=(0,nr.jsx)(Zc.LabelSelect,{label:"\uBCF4\uAE30",showLabel:!1,showEmptyOption:!1,value:I,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=>M(y.target.value==="timeline"?"timeline":"distribution"),sx:{width:280,flexShrink:0}}),[O,P]=(0,Lo.useState)(!1),[N,$]=(0,Lo.useState)(0),L=(0,Lo.useMemo)(()=>bl(g,{todayStr:l,capacity:s}),[g,l,s]),C=L.find(y=>y.accountSeq===N)??null,S=(0,nr.jsxs)(nr.Fragment,{children:[z,t?(0,nr.jsx)(co.Button,{size:"small",variant:"outlined",startIcon:(0,nr.jsx)(Ox.default,{sx:{fontSize:18}}),onClick:()=>P(!0),sx:{flexShrink:0},children:"\uC6A9\uB7C9"}):null]}),D=o??f.length>0,p=(0,nr.jsx)(Zc.LabelSelect,{label:"\uAE30\uAC04",showLabel:!1,showEmptyOption:!1,value:String(u),options:X_,onChange:y=>b(Number(y.target.value)||30),sx:{width:280,flexShrink:0}});return(0,nr.jsxs)(nr.Fragment,{children:[(0,nr.jsx)(Rx.FormDialog,{open:e,onClose:a,maxWidth:"md",title:"\uC5C5\uBB34 \uCC28\uD2B8",locale:"ko",contentTopPadding:0,contentPaddingX:0,sectionsPaddingTop:0,sectionContentPaddingTop:0,sectionTitleGap:0,fixedHeight:Ax,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:(0,nr.jsx)(co.Box,{sx:x,children:(0,nr.jsx)(vd,{sprints:f,tasks:g,height:"100%"})})},{id:"burndown",tabTitle:"\uBC88\uB2E4\uC6B4",showTitle:!1,children:(0,nr.jsx)(co.Box,{sx:x,children:m?(0,nr.jsx)(wd,{sprint:m,tasks:g,todayStr:l,height:"100%",headerLeft:k}):(0,nr.jsxs)(co.Box,{sx:an("100%"),children:[(0,nr.jsx)(co.Box,{sx:Pn,children:k}),(0,nr.jsx)(Dn,{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:(0,nr.jsx)(co.Box,{sx:x,children:(0,nr.jsx)(Bd,{tasks:g,todayStr:l,days:u,height:"100%",headerLeft:p})})}]:[],{id:"workload",tabTitle:"\uC6CC\uD06C\uB85C\uB4DC",showTitle:!1,children:(0,nr.jsx)(co.Box,{sx:x,children:I==="timeline"?(0,nr.jsxs)(co.Box,{sx:{display:"flex",flexDirection:"column",height:"100%",minHeight:0},children:[(0,nr.jsx)(co.Box,{sx:Pn,children:S}),(0,nr.jsx)(Fd,{tasks:g,todayStr:l,height:"100%"})]}):(0,nr.jsx)(Pd,{tasks:g,todayStr:l,height:"100%",capacity:s,headerLeft:S,selectedAccountSeq:N,onSelectPerson:n?$:void 0})})},{id:"lead-time",tabTitle:"\uB9AC\uB4DC\uD0C0\uC784",showTitle:!1,children:(0,nr.jsx)(co.Box,{sx:x,children:(0,nr.jsx)(Ed,{tasks:g,todayStr:l,days:u,height:"100%",headerLeft:p})})}],actions:{showCancelButton:!1,right:(0,nr.jsx)(co.Button,{variant:"contained",onClick:a,children:"\uB2EB\uAE30"})}}),(0,nr.jsx)(Ld,{open:N>0,row:C,rows:L,tasks:g,todayStr:l,employees:r,onClose:()=>$(0),onChangeManager:n,onOpenTask:c}),t?(0,nr.jsx)(bd,{open:O,capacity:s,employees:r,onClose:()=>P(!1),onSave:async y=>{await t(y),P(!1)}}):null]})}var ti=require("@mui/material");var xi=require("react/jsx-runtime");function J_({anchorEl:e,candidates:f,selectedNames:g,avatarSrcByName:l,onToggle:o,onClear:s,onClose:r}){return(0,xi.jsxs)(ti.Menu,{anchorEl:e,open:!!e,onClose:r,transitionDuration:0,children:[f.length===0?(0,xi.jsx)(ti.MenuItem,{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(0,xi.jsxs)(ti.MenuItem,{onClick:()=>o(t),sx:{fontSize:14,minWidth:170,gap:1},children:[(0,xi.jsx)(ti.Checkbox,{size:"small",checked:n,sx:{p:0}}),(0,xi.jsx)(Cn,{names:[t.name],size:20,avatarSrcByName:l}),t.name]},`${t.accountSeq}-${t.name}`)}),(0,xi.jsx)(ti.Divider,{}),(0,xi.jsx)(ti.MenuItem,{disabled:g.length===0,onClick:s,sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}var Dx=require("react"),ia=require("@mui/material"),Px=Y(require("@mui/icons-material/KeyboardArrowDown"),1),Nx=Y(require("@mui/icons-material/Check"),1);var ri=require("react/jsx-runtime");function Q_({value:e,onChange:f,options:g}){let[l,o]=(0,Dx.useState)(null),s=g??Gl,r=Gl.find(t=>t.value===e)?.label??"";return(0,ri.jsxs)(ri.Fragment,{children:[(0,ri.jsxs)(ia.ButtonBase,{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,(0,ri.jsx)(Px.default,{sx:{fontSize:17,color:"#9a9a97"}})]}),(0,ri.jsx)(ia.Menu,{transitionDuration:0,anchorEl:l,open:!!l,onClose:()=>o(null),children:s.map(t=>(0,ri.jsxs)(ia.MenuItem,{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?(0,ri.jsx)(Nx.default,{sx:{fontSize:16,color:"#2f80ed"}}):null]},t.value))})]})}var ys=require("@mui/material"),qd=require("@ehfuse/mui-form-controls");var vi=require("react/jsx-runtime"),e3=[{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 $d({fromDate:e,toDate:f,onChange:g}){let l=s=>{if(s<=0){g("","");return}g(ei(ml(s)),ei(new Date))},o=s=>s<=0?!e&&!f:!e||!f?!1:e===ei(ml(s))&&f===ei(new Date);return(0,vi.jsxs)(ys.Box,{sx:{display:"flex",alignItems:"center",gap:1.5,flexWrap:"wrap"},children:[(0,vi.jsx)(ys.Box,{sx:{display:"flex",alignItems:"center",gap:1.5},children:e3.map(s=>{let r=o(s.months);return(0,vi.jsx)(ys.ButtonBase,{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,vi.jsxs)(ys.Box,{sx:{display:"flex",alignItems:"center",gap:.5},children:[(0,vi.jsx)(qd.DateTextField,{value:e,size:"small",placeholder:"\uC2DC\uC791\uC77C",onChange:s=>g(s.target.value,f),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}}),(0,vi.jsx)(ys.Box,{component:"span",sx:{fontSize:13,color:"#9a9a97"},children:"~"}),(0,vi.jsx)(qd.DateTextField,{value:f,size:"small",placeholder:"\uC885\uB8CC\uC77C",onChange:s=>g(e,s.target.value),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}})]})]})}var Lx=require("@mui/material");var Hd=require("react/jsx-runtime");function t3({anchorEl:e,fromDate:f,toDate:g,onChange:l,onClose:o}){return(0,Hd.jsx)(Lx.Popover,{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:(0,Hd.jsx)($d,{fromDate:f,toDate:g,onChange:l})})}var $i=require("@mui/material"),jx=Y(require("@mui/icons-material/Checklist"),1),Fx=Y(require("@mui/icons-material/Face"),1),qx=Y(require("@mui/icons-material/Publish"),1),$x=Y(require("@mui/icons-material/NotificationsOutlined"),1),Hx=Y(require("@mui/icons-material/BugReportOutlined"),1),Wx=Y(require("@mui/icons-material/SupportAgentOutlined"),1),Ux=Y(require("@mui/icons-material/DescriptionOutlined"),1),Vx=Y(require("@mui/icons-material/Inventory2Outlined"),1);var uo=require("react/jsx-runtime");function zx(e,f){return f>0?`${e} (${f})`:e}var r3=[{id:"my",label:"\uC804\uCCB4",icon:(0,uo.jsx)(jx.default,{sx:{fontSize:18}})},{id:"mine",label:"\uB0B4 \uC5C5\uBB34",icon:(0,uo.jsx)(Fx.default,{sx:{fontSize:18}})},{id:"sent",label:"\uBCF4\uB0B8 \uC5C5\uBB34",icon:(0,uo.jsx)(qx.default,{sx:{fontSize:18}})},{id:"support",label:"\uACE0\uAC1D\uC13C\uD130",icon:(0,uo.jsx)(Wx.default,{sx:{fontSize:18}})},{id:"bug",label:"\uC624\uB958",icon:(0,uo.jsx)(Hx.default,{sx:{fontSize:18}})},{id:"notice",label:"\uACF5\uC9C0\uC0AC\uD56D",icon:(0,uo.jsx)($x.default,{sx:{fontSize:18}})},{id:"archive",label:"\uBCF4\uAD00\uD568",icon:(0,uo.jsx)(Vx.default,{sx:{fontSize:18}}),hideCount:!0},{id:"report",label:"\uBCF4\uACE0\uC11C",icon:(0,uo.jsx)(Ux.default,{sx:{fontSize:18}}),hideCount:!0}];function n3(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 o3({items:e,activeTab:f,counts:g,onChange:l,compact:o=!1}){let s=ht(),r=n3(s.tabs),t=e;return o?(0,uo.jsx)($i.Box,{sx:{display:"flex",flexWrap:"wrap",gap:1.25},children:t.map(n=>{let c=f===n.id;return(0,uo.jsx)($i.ButtonBase,{onClick:()=>l(n.id),sx:{px:1.5,py:.75,borderRadius:1,fontSize:mn(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:zx(n.label,n.hideCount?0:g[n.id]??0)},n.id)})}):(0,uo.jsx)($i.Tabs,{value:f,onChange:(n,c)=>l(c),sx:{minHeight:46,"& .MuiTabs-indicator":{display:"none"},"& .MuiTabs-flexContainer":{gap:"12px",minHeight:46}},children:t.map(n=>(0,uo.jsx)($i.Tab,{value:n.id,label:zx(n.label,n.hideCount?0:g[n.id]??0),icon:n.icon,iconPosition:"start",sx:r},n.id))})}var Hi=require("react"),Ct=require("@mui/material"),Kx=Y(require("@mui/icons-material/OpenInNewOutlined"),1),Gx=Y(require("@mui/icons-material/RestoreFromTrashOutlined"),1),Yx=Y(require("@mui/icons-material/Check"),1),Xx=Y(require("@mui/icons-material/CheckCircleOutlined"),1),Zx=Y(require("@mui/icons-material/RadioButtonUnchecked"),1),Jx=Y(require("@mui/icons-material/SendOutlined"),1),Qx=Y(require("@mui/icons-material/EventOutlined"),1),e2=Y(require("@mui/icons-material/PersonOutlineOutlined"),1),t2=Y(require("@mui/icons-material/ViewKanbanOutlined"),1),r2=Y(require("@mui/icons-material/ContentCopyOutlined"),1),n2=Y(require("@mui/icons-material/NextPlanOutlined"),1),o2=Y(require("@mui/icons-material/ContentPasteOutlined"),1),i2=Y(require("@mui/icons-material/ShareOutlined"),1),s2=Y(require("@mui/icons-material/DirectionsRunOutlined"),1),Wd=Y(require("@mui/icons-material/ChevronRight"),1),a2=Y(require("@mui/icons-material/ArchiveOutlined"),1),l2=Y(require("@mui/icons-material/UnarchiveOutlined"),1),Ud=require("@ehfuse/alerts");var Ye=require("react/jsx-runtime");function i3({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:I}){let M=dr(),z=$o(),[O,P]=(0,Hi.useState)(null),[N,$]=(0,Hi.useState)(null),[L,C]=(0,Hi.useState)(null);(0,Hi.useEffect)(()=>{e||(P(null),$(null),C(null))},[e]);let S=e?.task??null,D=!!S?.is_notice,p=!!S?.is_event,y=S?!So(S,o):!1,{editPolicy:v}=ct(),w=S?fi(S,o,v):!1,_=S?Ii(S,o,v,y):!1,T=S?Ii(S,o,v,!1):!1,R=!!S?.deleted,F=(0,Hi.useMemo)(()=>new Set(g.filter(q=>q.useSprints).map(q=>q.key)),[g]),H=async(q="one")=>{let B=S;if(f(),!B)return;await(0,Ud.ConfirmDialog)({title:"\uC5C5\uBB34 \uC0AD\uC81C",message:q==="series"?`"${B.title}" \uC758 \uC774 \uD68C\uCC28\uC640 \uC774\uD6C4 \uBC18\uBCF5 \uD68C\uCC28\uB97C \uBAA8\uB450 \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`:`"${B.title}" \uC5C5\uBB34\uB97C \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&x(B.seq,q)},V=async()=>{let q=S;if(f(),!q)return;await(0,Ud.ConfirmDialog)({title:"\uC601\uAD6C \uC0AD\uC81C",message:`"${q.title}" \uC5C5\uBB34\uB97C \uC601\uAD6C\uD788 \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C? \uB418\uB3CC\uB9B4 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.`})&&I?.(q.seq)},A=()=>{S&&m(S.seq,!S.archived),f()};return(0,Ye.jsxs)(Ye.Fragment,{children:[(0,Ye.jsxs)(Ct.Menu,{open:!!e,onClose:f,transitionDuration:0,anchorReference:M?"none":"anchorPosition",anchorPosition:!M&&e?{top:e.position.top,left:e.position.left}:void 0,slotProps:{paper:{sx:{minWidth:190,...M?{position:"fixed",top:"50%",left:"50%",translate:"-50% -50%",maxHeight:"70vh"}:{}}},list:M?{sx:{"& .MuiMenuItem-root":{py:1,minHeight:0}}}:void 0},children:[(0,Ye.jsxs)(Ct.MenuItem,{onClick:()=>{S&&s(S),f()},sx:{fontSize:14},children:[(0,Ye.jsx)(Ct.ListItemIcon,{children:(0,Ye.jsx)(Kx.default,{sx:{fontSize:19}})}),"\uC0C1\uC138 \uC5F4\uAE30"]}),R?(0,Ye.jsx)(Ct.Divider,{}):null,R&&k?(0,Ye.jsxs)(Ct.MenuItem,{disabled:T,onClick:()=>{S&&k(S.seq),f()},sx:{fontSize:14},children:[(0,Ye.jsx)(Ct.ListItemIcon,{children:(0,Ye.jsx)(Gx.default,{sx:{fontSize:19}})}),"\uBCF5\uC6D0"]}):null,R&&I?(0,Ye.jsxs)(Ct.MenuItem,{disabled:T,onClick:()=>{V()},sx:{fontSize:14,color:"#e5484d"},children:[(0,Ye.jsx)(Ct.ListItemIcon,{children:(0,Ye.jsx)(gn,{sx:{fontSize:19,color:"#e5484d"}})}),"\uC601\uAD6C \uC0AD\uC81C"]}):null,R?null:(0,Ye.jsxs)(Ye.Fragment,{children:[(0,Ye.jsxs)(Ct.MenuItem,{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:[(0,Ye.jsx)(Ct.ListItemIcon,{children:S?.completed?(0,Ye.jsx)(Zx.default,{sx:{fontSize:19}}):(0,Ye.jsx)(Xx.default,{sx:{fontSize:19}})}),S?.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC"]}),!D&&t?(0,Ye.jsxs)(Ct.MenuItem,{disabled:!(S?.manager_account_seq??0)&&(S?.receiver_account_seqs??[]).length===0,onClick:()=>{S&&t(S),f()},sx:{fontSize:14},children:[(0,Ye.jsx)(Ct.ListItemIcon,{children:(0,Ye.jsx)(Jx.default,{sx:{fontSize:19}})}),"\uD655\uC778 \uC694\uCCAD"]}):null,p?null:(0,Ye.jsx)(Ct.Divider,{}),p?null:(0,Ye.jsxs)(Ct.MenuItem,{disabled:w,onClick:q=>{S&&P({anchorEl:q.currentTarget,task:S})},sx:{fontSize:14},children:[(0,Ye.jsx)(Ct.ListItemIcon,{children:(0,Ye.jsx)(Qx.default,{sx:{fontSize:19}})}),"\uB9C8\uAC10\uC608\uC815 \uBCC0\uACBD"]}),!D&&!p&&i?(0,Ye.jsxs)(Ct.MenuItem,{disabled:v==="coreAuthorManager"?w:!1,onClick:()=>{S&&i(S,"manager"),f()},sx:{fontSize:14},children:[(0,Ye.jsx)(Ct.ListItemIcon,{children:(0,Ye.jsx)(e2.default,{sx:{fontSize:19}})}),"\uCC45\uC784\uC790 \uBCC0\uACBD"]}):null,p?null:(0,Ye.jsxs)(Ct.MenuItem,{disabled:w,onClick:q=>{S&&$({anchorEl:q.currentTarget,task:S})},sx:{fontSize:14},children:[(0,Ye.jsx)(Ct.ListItemIcon,{children:(0,Ye.jsx)(t2.default,{sx:{fontSize:19}})}),"\uD504\uB85C\uC81D\uD2B8 \uC774\uB3D9",(0,Ye.jsx)(Wd.default,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}),(0,Ye.jsx)(Ct.Divider,{}),h?(0,Ye.jsxs)(Ct.MenuItem,{disabled:y,onClick:()=>{S&&h(S.seq),f()},sx:{fontSize:14},children:[(0,Ye.jsx)(Ct.ListItemIcon,{children:(0,Ye.jsx)(r2.default,{sx:{fontSize:19}})}),"\uBCF5\uC81C"]}):null,d&&S&&!S.is_event&&!S.is_notice?(0,Ye.jsxs)(Ct.MenuItem,{onClick:()=>{S&&d(S.seq),f()},sx:{fontSize:14},children:[(0,Ye.jsx)(Ct.ListItemIcon,{children:(0,Ye.jsx)(n2.default,{sx:{fontSize:19}})}),"\uD6C4\uC18D \uC5C5\uBB34 \uB9CC\uB4E4\uAE30"]}):null,(0,Ye.jsxs)(Ct.MenuItem,{onClick:()=>{S&&(u?u(S):ms(S,M)),f()},sx:{fontSize:14},children:[(0,Ye.jsx)(Ct.ListItemIcon,{children:M?(0,Ye.jsx)(i2.default,{sx:{fontSize:19}}):(0,Ye.jsx)(o2.default,{sx:{fontSize:19}})}),M?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC"]}),S&&!S.is_notice&&!S.is_event&&F.has(String(S.tab_key??""))&&b?(0,Ye.jsxs)(Ct.MenuItem,{onClick:q=>C(q.currentTarget),sx:{fontSize:14},children:[(0,Ye.jsx)(Ct.ListItemIcon,{children:(0,Ye.jsx)(s2.default,{sx:{fontSize:19}})}),"\uBAA9\uD45C\uC5D0 \uB123\uAE30",(0,Ye.jsx)(Wd.default,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}):null,(0,Ye.jsxs)(Ct.MenuItem,{onClick:A,disabled:y||!S?.archived&&!(S&&ya(S)),sx:{fontSize:14},children:[(0,Ye.jsx)(Ct.ListItemIcon,{children:S?.archived?(0,Ye.jsx)(l2.default,{sx:{fontSize:19}}):(0,Ye.jsx)(a2.default,{sx:{fontSize:19}})}),S?.archived?"\uBCF4\uAD00 \uD574\uC81C":"\uBCF4\uAD00"]}),(0,Ye.jsx)(Ct.Divider,{}),(0,Ye.jsxs)(Ct.MenuItem,{disabled:_,onClick:()=>{H("one")},sx:{fontSize:14,color:"#e5484d"},children:[(0,Ye.jsx)(Ct.ListItemIcon,{children:(0,Ye.jsx)(gn,{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?(0,Ye.jsxs)(Ct.MenuItem,{disabled:_,onClick:()=>{H("series")},sx:{fontSize:14,color:"#e5484d"},children:[(0,Ye.jsx)(Ct.ListItemIcon,{children:(0,Ye.jsx)(gn,{sx:{fontSize:19,color:"#e5484d"}})}),"\uC0AD\uC81C (\uC774\uD6C4 \uBC18\uBCF5 \uC804\uCCB4)"]}):null]})]}),(0,Ye.jsx)(io,{anchorEl:O?.anchorEl??null,open:!!O,date:O?.task.due_date??"",reminders:Bo(O?.task),hideReminder:!!O?.task.completed,centered:M,onClose:()=>{P(null),f()},onDateChange:q=>{O&&n(O.task.seq,q)},onReminderChange:q=>{O&&c?.(O.task.seq,q)}}),(0,Ye.jsxs)(Ct.Menu,{transitionDuration:0,anchorEl:N?.anchorEl??null,open:!!N,onClose:()=>{$(null),f()},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},...z,children:[(0,Ye.jsx)(Ct.MenuItem,{selected:!N?.task.tab_key,onClick:()=>{N&&a(N.task.seq,""),$(null),f()},sx:{fontSize:14,minWidth:170},children:"\uC5C6\uC74C"}),g.filter(q=>!q.archived).map(q=>(0,Ye.jsx)(Ct.MenuItem,{selected:N?.task.tab_key===q.key,onClick:()=>{N&&a(N.task.seq,q.key),$(null),f()},sx:{fontSize:14,minWidth:170},children:q.label},q.key))]}),(0,Ye.jsx)(Ct.Menu,{transitionDuration:0,anchorEl:L,open:!!L,onClose:()=>C(null),anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...l.filter(q=>`custom-${q.group_seq}`===String(S?.tab_key??"")).map(q=>({seq:q.seq,label:so(q)}))].map(q=>(0,Ye.jsxs)(Ct.MenuItem,{onClick:()=>{S&&b?.(S.seq,q.seq),C(null),f()},sx:{fontSize:14,minWidth:160,gap:1},children:[q.label,(S?.sprint_seq??0)===q.seq?(0,Ye.jsx)(Yx.default,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},q.seq))})]})}var wi=require("@mui/material");var Wi=require("react/jsx-runtime");function s3({anchorEl:e,labelOptions:f,selectedKeys:g,onToggle:l,onClear:o,onClose:s}){return(0,Wi.jsxs)(wi.Menu,{transitionDuration:0,anchorEl:e,open:!!e,onClose:s,children:[f.map(r=>{let t=g.includes(r.key);return(0,Wi.jsxs)(wi.MenuItem,{onClick:()=>l(r.key),sx:{fontSize:14,minWidth:190,gap:1},children:[(0,Wi.jsx)(wi.Checkbox,{size:"small",checked:t,sx:{p:0}}),(0,Wi.jsx)(ir,{option:r})]},r.key)}),(0,Wi.jsx)(wi.Divider,{}),(0,Wi.jsx)(wi.MenuItem,{disabled:g.length===0,onClick:()=>{o(),s()},sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}var xs=require("@mui/material"),c2=Y(require("@mui/icons-material/Check"),1),u2=Y(require("@mui/icons-material/SettingsOutlined"),1);var Ui=require("react/jsx-runtime");function a3(e){let{anchorEl:f,sprints:g,value:l,onSelect:o,onManage:s,onClose:r}=e;return(0,Ui.jsxs)(xs.Menu,{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:so(t)}))].map(t=>(0,Ui.jsxs)(xs.MenuItem,{onClick:()=>{o(t.seq),r()},sx:{fontSize:14,minWidth:180,gap:1},children:[t.label,l===t.seq?(0,Ui.jsx)(c2.default,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},t.seq)),(0,Ui.jsx)(xs.Divider,{}),(0,Ui.jsxs)(xs.MenuItem,{onClick:()=>{r(),s()},sx:{fontSize:14,gap:1},children:[(0,Ui.jsx)(u2.default,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uAD00\uB9AC\u2026"]})]})}var l3={my:"tasks",mine:"tasks",sent:"tasks",notice:"notice",support:"support",bug:"bug",archive:"archive",done:"done",report:"report"};function d2(e){return l3[e]??"tasks"}var Vd={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"},f2=["list","calendar","month","card","kanban","sprint","timeline"],c3=["list","kanban"],u3=["list","card"];function f3(e){let f=d2(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:f2,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:c3,showCreate:!1,createLabel:"",showGroupBy:!0,showSprintFilter:!1,showDateRange:!1,showHideCompleted:!0,forceFlatList:!1,columns:{support:!0,showProject:!1}};case"archive":return{kind:f,viewOptions:u3,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:f2,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"}:{}}}}var p2=require("react"),m2=require("@ehfuse/keyboard-state");var h2=[{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 d3(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=(0,p2.useMemo)(()=>{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 g2(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]);(0,m2.useKeyboardState)(g?a:[])}function g2(e){if(!e)return h2;let f=new Set(e);return h2.filter(g=>f.has(g.view))}function sa(e){return[{keys:"N",description:"\uC0C8 \uC5C5\uBB34 \uB4F1\uB85D"},{keys:"/",description:"\uAC80\uC0C9"},{keys:"R",description:"\uBAA9\uB85D \uC0C8\uB85C\uACE0\uCE68"},...g2(e).map(f=>({keys:f.key.split(" ").map(g=>g.toUpperCase()).join(" \u2192 "),description:`${Vd[f.view]} \uBCF4\uAE30`})),{keys:"?",description:"\uB2E8\uCD95\uD0A4 \uB3C4\uC6C0\uB9D0"},{keys:"Esc",description:"\uB2EB\uAE30"}]}var h3=sa();var Vi=require("@mui/material"),b2=Y(require("@mui/icons-material/ArrowRightAlt"),1),y2=require("@ehfuse/mui-form-dialog");var wo=require("react/jsx-runtime");function p3({keys:e}){return(0,wo.jsx)(Vi.Box,{sx:{display:"flex",alignItems:"center",gap:.5,justifyContent:"flex-end"},children:e.split(" \u2192 ").map((f,g)=>(0,wo.jsxs)(Vi.Box,{sx:{display:"flex",alignItems:"center",gap:.5},children:[g>0?(0,wo.jsx)(b2.default,{sx:{fontSize:18,color:"#9a9a97"}}):null,(0,wo.jsx)(Vi.Box,{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 m3({open:e,onClose:f,views:g}){let l=sa(g);return(0,wo.jsx)(y2.FormDialog,{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:(0,wo.jsx)(Vi.Box,{sx:{display:"grid",gridTemplateColumns:"auto 1fr",columnGap:2,rowGap:1.25,alignItems:"center",fontSize:14,color:"#37352f"},children:l.map(o=>(0,wo.jsxs)(Vi.Box,{sx:{display:"contents"},children:[(0,wo.jsx)(p3,{keys:o.keys}),(0,wo.jsx)("span",{children:o.description})]},o.keys))})}],actions:{showCancelButton:!1,right:(0,wo.jsx)(Vi.Button,{variant:"contained",onClick:f,children:"\uB2EB\uAE30"})}})}var Ki=require("react"),Rr=require("@mui/material"),B2=Y(require("@mui/icons-material/ArrowRightAlt"),1),I2=Y(require("@mui/icons-material/ChevronRightRounded"),1),E2=Y(require("@mui/icons-material/ArrowForward"),1),M2=require("@ehfuse/mui-form-dialog");var x2={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 v2={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 w2={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 _2={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 k2={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 S2={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 T2={id:"shortcuts",tabTitle:"\uB2E8\uCD95\uD0A4",topics:[]};var Kd=[x2,v2,w2,_2,k2,S2,T2];var Ot=require("react/jsx-runtime");function Jc(e){return e.split(/(\*\*[^*]+\*\*|\s*(?:→|->)\s*)/g).filter(g=>g.length>0).map((g,l)=>g.startsWith("**")&&g.endsWith("**")?(0,Ot.jsx)(Rr.Box,{component:"strong",sx:{fontWeight:700},children:g.slice(2,-2)},l):/^\s*(?:→|->)\s*$/.test(g)?(0,Ot.jsx)(E2.default,{sx:{fontSize:"1em",verticalAlign:"-0.15em",mx:.5,color:"text.secondary"}},l):(0,Ot.jsx)(Ki.Fragment,{children:g},l))}function g3({keys:e}){let f=ht();return(0,Ot.jsx)(Rr.Box,{sx:{display:"flex",alignItems:"center",gap:.5,justifyContent:"flex-end"},children:e.split(" \u2192 ").map((g,l)=>(0,Ot.jsxs)(Rr.Box,{sx:{display:"flex",alignItems:"center",gap:.5},children:[l>0?(0,Ot.jsx)(B2.default,{sx:{fontSize:20,color:f.colors.textMuted}}):null,(0,Ot.jsx)(Rr.Box,{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 b3({steps:e}){let f=ht();return(0,Ot.jsx)(Rr.Box,{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)=>(0,Ot.jsxs)(Rr.Box,{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:[(0,Ot.jsxs)(Rr.Box,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[(0,Ot.jsx)(Rr.Box,{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}),(0,Ot.jsx)(Rr.Box,{sx:{minWidth:0,fontSize:20,fontWeight:500,color:f.colors.textStrong,lineHeight:1.3,letterSpacing:"-0.01em"},children:g.title})]}),(0,Ot.jsx)(Rr.Box,{sx:{mt:1.5,fontSize:15,lineHeight:1.5,color:f.colors.textPrimary,wordBreak:"keep-all"},children:g.desc})]},g.title))})}var R2="70vh",y3=24,x3=44,C2=`calc((${R2} - ${y3*2+x3}px) / var(--mfd-font-scale, 1))`,v3=148;function w3({items:e}){let f=ht();return(0,Ot.jsx)(Rr.Box,{sx:{mt:1.5,display:"grid",gridTemplateColumns:{xs:"1fr",sm:`${v3}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=>(0,Ot.jsxs)(Ki.Fragment,{children:[(0,Ot.jsx)(Rr.Box,{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}),(0,Ot.jsx)(Rr.Box,{sx:{wordBreak:"keep-all"},children:Jc(g.desc)})]},g.term))})}function _3({topic:e}){let f=ht();return(0,Ot.jsxs)(Rr.Box,{component:"section",sx:{py:{xs:3,sm:4},borderBottom:`1px solid ${f.colors.border}`,"&:last-of-type":{pb:0,borderBottom:0}},children:[(0,Ot.jsxs)(Rr.Box,{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?(0,Ot.jsxs)(Ot.Fragment,{children:[(0,Ot.jsx)(I2.default,{sx:{fontSize:22,color:f.colors.textMuted,mx:1,flexShrink:0}}),(0,Ot.jsx)(Rr.Box,{component:"span",sx:{fontSize:18,fontWeight:400,color:f.colors.textPrimary},children:e.subtitle})]}):null]}),e.lead?(0,Ot.jsx)(Rr.Box,{sx:{fontSize:15.5,lineHeight:1.65,color:f.colors.textPrimary,wordBreak:"keep-all"},children:Jc(e.lead)}):null,e.steps?.length?(0,Ot.jsx)(b3,{steps:e.steps}):null,e.items?.length?(0,Ot.jsx)(w3,{items:e.items}):null,e.lines?.length?(0,Ot.jsx)(Rr.Box,{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)=>(0,Ot.jsx)("li",{children:Jc(g)},l))}):null]})}function k3({open:e,onClose:f,views:g,features:l={},initialTab:o}){let s=ht(),[r,t]=(0,Ki.useState)(0);(0,Ki.useEffect)(()=>{if(!e)return;let h=Kd.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=sa(g),i=Kd.filter(a=>n(a.feature)).map(a=>({id:a.id,tabTitle:a.tabTitle,showTitle:!1,children:a.id==="shortcuts"?(0,Ot.jsx)(Rr.Box,{sx:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:C2,maxHeight:C2,px:.5},children:(0,Ot.jsx)(Rr.Box,{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=>(0,Ot.jsxs)(Ki.Fragment,{children:[(0,Ot.jsx)(g3,{keys:h.keys}),(0,Ot.jsx)("span",{children:h.description})]},h.keys))})}):(0,Ot.jsxs)(Rr.Box,{sx:{display:"flex",flexDirection:"column",px:.5},children:[a.intro?(0,Ot.jsx)(Rr.Box,{sx:{p:2,borderRadius:2,bgcolor:s.colors.accentSoft,color:s.colors.textStrong,fontSize:15.5,lineHeight:1.65,wordBreak:"keep-all"},children:Jc(a.intro)}):null,a.topics.filter(h=>n(h.feature)).map(h=>(0,Ot.jsx)(_3,{topic:h},h.title))]})}));return(0,Ot.jsx)(M2.FormDialog,{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:R2,sectionContentPaddingTop:0,fontScale:{enabled:!0},fontScaleKey:"taskbox-manual",sections:i,actions:{showCancelButton:!1,right:(0,Ot.jsx)(Rr.Button,{variant:"contained",onClick:f,sx:{minWidth:80},children:"\uB2EB\uAE30"})}})}var _o=require("react"),vt=require("@mui/material"),Gd=require("@ehfuse/mui-form-dialog"),tu=Y(require("@mui/icons-material/Add"),1),A2=Y(require("@mui/icons-material/ArrowRightAlt"),1),D2=Y(require("@mui/icons-material/BoltOutlined"),1),P2=Y(require("@mui/icons-material/Close"),1),N2=Y(require("@mui/icons-material/EditOutlined"),1),Yd=require("@ehfuse/alerts"),ln=require("@ehfuse/mui-form-controls");var qe=require("react/jsx-runtime"),Xd=[{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."}],_l=[{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"}],ru=[{value:"high",label:"\uB192\uC74C"},{value:"medium",label:"\uC911\uAC04"},{value:"low",label:"\uB0AE\uC74C"}];function Qc(){return{name:"",trigger:"created",enabled:!0,sort_no:0,condition:{},action:{}}}function eu(e){return Wn.find(f=>f.key===e)?.name??e}function S3(e,f,g){let{condition:l,action:o}=e,s=[];if(l.group_seq){let n=f.find(c=>bi(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=${ru.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=${eu(l.status)}`),l.from_status&&s.push(`${eu(l.from_status)}\uC5D0\uC11C`),l.to_status&&s.push(`${eu(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(`${_l.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=${eu(o.set_status)}`),o.set_priority&&r.push(`\uC911\uC694\uB3C4=${ru.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=Xd.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 O2={fontSize:16,fontWeight:700,color:"#37352f"},T3={display:"flex",alignItems:"center",gap:1},C3={width:104,flexShrink:0,fontSize:16,color:"#37352f"};function B3({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]=(0,_o.useState)(!1),[d,u]=(0,_o.useState)(0),[b,m]=(0,_o.useState)(Qc()),[x,k]=(0,_o.useState)(!1),I=(0,_o.useRef)(null),[M,z]=(0,_o.useState)(null),[O,P]=(0,_o.useState)(null);(0,_o.useEffect)(()=>{if(e)return;let W=window.setTimeout(()=>{h(!1),u(0),m(Qc())},500);return()=>window.clearTimeout(W)},[e]),(0,_o.useEffect)(()=>{if(!a)return;let W=window.setTimeout(()=>I.current?.focus(),120);return()=>window.clearTimeout(W)},[a]);let N=d>0,$=b.trigger,L=()=>{h(!1),u(0),m(Qc())},C=(W,Z)=>{m(J=>{let K={...J.condition};return Z===""||Z===void 0||Z===null?delete K[W]:K[W]=Z,{...J,condition:K}})},S=(W,Z)=>{m(J=>{let K={...J.action};return Z===""||Z===void 0||Z===null?delete K[W]:K[W]=Z,{...J,action:K}})},D=W=>{m(Z=>{let J={...Z.condition};return W!=="status_changed"&&(delete J.from_status,delete J.to_status),W!=="overdue"&&delete J.overdue_days,W!=="field_changed"&&delete J.changed_field,W!=="commented"&&(delete J.comment_contains,delete J.comment_by_others),W==="field_changed"&&J.changed_field===void 0&&(J.changed_field=_l[0]?.value??""),{...Z,trigger:W,condition:J}})},p=g.filter(W=>!W.archived),y=l.map(W=>({value:W.key,label:W.name})),v=Wn.map(W=>({value:W.key,label:W.name})),w=p.map(W=>({value:String(bi(W.key)),label:W.label})),{condition:_,action:T}=b,R=_.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"}]:[],...R?[]:[{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"}]:[],...$==="status_changed"&&_.from_status===void 0?[{key:"from_status",label:"\uC774 \uC0C1\uD0DC\uC5D0\uC11C \uBC14\uB010 \uACBD\uC6B0"}]:[],...$==="status_changed"&&_.to_status===void 0?[{key:"to_status",label:"\uC774 \uC0C1\uD0DC\uB85C \uBC14\uB010 \uACBD\uC6B0"}]:[],...$==="field_changed"&&_.changed_field===void 0?[{key:"changed_field",label:"~ \uD544\uB4DC\uAC00 \uBCC0\uACBD\uB41C \uACBD\uC6B0"}]:[],...$==="commented"&&_.comment_contains===void 0?[{key:"comment_contains",label:"\uB313\uAE00\uC5D0 ~ \uB2E8\uC5B4\uAC00 \uD3EC\uD568\uB41C \uACBD\uC6B0"}]:[],...$==="commented"&&_.comment_by_others===void 0?[{key:"comment_by_others",label:"\uCC45\uC784\uC790\uAC00 \uC544\uB2CC \uC0AC\uB78C\uC774 \uC4F4 \uACBD\uC6B0"}]:[],...$==="overdue"&&_.overdue_days===void 0?[{key:"overdue_days",label:"\uB9C8\uAC10 \uD6C4 \uBA70\uCE60 \uC9C0\uB09C \uACBD\uC6B0"}]:[]],H=async W=>{if(!s)return;let Z=W==="manager_account"?_.manager_account_seq??0:_.receiver_account_seq??0,J=await s(Z,W==="manager_account"?"\uCC45\uC784\uC790":"\uCC38\uC870\uC790");J&&m(K=>{let ee={...K.condition};return W==="manager_account"?(ee.manager_account_seq=J.accountSeq,ee.manager_name=J.name):(ee.receiver_account_seq=J.accountSeq,ee.receiver_name=J.name),{...K,condition:ee}})},V=W=>{z(null),W==="group_seq"?C("group_seq",Number(w[0]?.value)||0):W==="kind"?C("is_bug",!0):W==="priority"?C("priority","high"):W==="label_key"?C("label_key",y[0]?.value??""):W==="title_contains"?m(Z=>({...Z,condition:{...Z.condition,title_contains:""}})):W==="manager_empty"?C("manager_empty",!0):W==="manager_account"||W==="receiver_account"?H(W):W==="from_status"?C("from_status",Wn[0]?.key??""):W==="to_status"?C("to_status",Wn[0]?.key??""):W==="changed_field"?C("changed_field",_l[0]?.value??""):W==="comment_contains"?m(Z=>({...Z,condition:{...Z.condition,comment_contains:""}})):W==="comment_by_others"?C("comment_by_others",!0):W==="overdue_days"&&C("overdue_days",1)},A=W=>{if(W==="kind"){C("is_bug",""),C("is_event","");return}if(W==="manager_account"){C("manager_account_seq",""),C("manager_name","");return}if(W==="receiver_account"){C("receiver_account_seq",""),C("receiver_name","");return}C(W==="group_seq"?"group_seq":W,"")},q=[...T.set_status===void 0?[{key:"set_status",label:"\uC0C1\uD0DC \uBC14\uAFB8\uAE30"}]:[],...T.set_priority===void 0?[{key:"set_priority",label:"\uC911\uC694\uB3C4 \uBC14\uAFB8\uAE30"}]:[],...T.add_label_key===void 0&&y.length>0?[{key:"add_label_key",label:"\uB77C\uBCA8 \uBD99\uC774\uAE30"}]:[],...s&&T.assign_manager_account_seq===void 0?[{key:"assign_manager",label:"\uCC45\uC784\uC790 \uC9C0\uC815\uD558\uAE30"}]:[],...s&&T.add_receiver_account_seq===void 0?[{key:"add_receiver",label:"\uCC38\uC870\uC790 \uCD94\uAC00\uD558\uAE30"}]:[],...o.length>0&&T.apply_content_template_seq===void 0?[{key:"apply_content_template",label:"\uBCF8\uBB38 \uC591\uC2DD \uCC44\uC6B0\uAE30"}]:[],...s&&T.notify_account_seq===void 0?[{key:"notify",label:"\uC54C\uB9BC \uBCF4\uB0B4\uAE30"}]:[]],B=async W=>{if(!s)return;let Z=W==="assign_manager"?T.assign_manager_account_seq??0:W==="add_receiver"?T.add_receiver_account_seq??0:T.notify_account_seq??0,J=await s(Z,W==="assign_manager"?"\uCC45\uC784\uC790":W==="add_receiver"?"\uCC38\uC870\uC790":"\uC54C\uB9BC \uBC1B\uC744 \uC0AC\uB78C");J&&m(K=>{let ee={...K.action};return W==="assign_manager"?(ee.assign_manager_account_seq=J.accountSeq,ee.assign_manager_name=J.name):W==="add_receiver"?(ee.add_receiver_account_seq=J.accountSeq,ee.add_receiver_name=J.name):(ee.notify_account_seq=J.accountSeq,ee.notify_name=J.name),{...K,action:ee}})},E=W=>{if(P(null),W==="set_status")S("set_status",Wn[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 Z=o[0];m(J=>({...J,action:{...J.action,apply_content_template_seq:Z?.seq??0,apply_content_template_name:Z?.name??""}}))}else B(W)},j=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()){(0,Yd.ErrorAlert)({message:"\uADDC\uCE59 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694."});return}if(Object.keys(b.action).length===0){(0,Yd.ErrorAlert)({message:"\uB3D9\uC791\uC744 \uD558\uB098 \uC774\uC0C1 \uCD94\uAC00\uD558\uC138\uC694."});return}let W=N?b.sort_no:f.reduce((J,K)=>Math.max(J,K.sort_no),0)+1;k(!0);let Z=N?await n(d,{...b,sort_no:W}):await t({...b,sort_no:W});k(!1),Z&&L()},X=(W,Z,J,K)=>(0,qe.jsxs)(vt.Box,{sx:T3,children:[(0,qe.jsx)(vt.Box,{sx:C3,children:W}),(0,qe.jsxs)(vt.Box,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:K?"column":"row",alignItems:K?"stretch":"center",gap:K?.5:1},children:[Z,K?(0,qe.jsx)(vt.Box,{sx:{fontSize:13.5,color:"#37352f"},children:K}):null]}),(0,qe.jsx)(vt.Tooltip,{title:"\uC774 \uC904 \uBE7C\uAE30",arrow:!0,disableInteractive:!0,children:(0,qe.jsx)(vt.IconButton,{size:"small","aria-label":`${W} \uC904 \uBE7C\uAE30`,onClick:J,children:(0,qe.jsx)(P2.default,{sx:{fontSize:16}})})})]}),G=()=>(0,qe.jsxs)(vt.Box,{sx:{display:"flex",flexDirection:"column",gap:2.5},children:[(0,qe.jsx)(ln.ClearTextField,{size:"medium",label:"\uADDC\uCE59 \uC774\uB984",inputRef:I,placeholder:"\uC608: \uC811\uC218 \uC624\uB958 \uC790\uB3D9 \uBC30\uC815",value:b.name,onChange:W=>m(Z=>({...Z,name:W.target.value}))}),(0,qe.jsx)(vt.Box,{sx:{display:"flex",alignItems:"center",gap:2,flexWrap:"wrap"},children:Xd.map(W=>{let Z=$===W.value;return(0,qe.jsx)(vt.Button,{disableElevation:!0,variant:Z?"contained":"outlined",color:Z?"primary":"inherit",onClick:()=>D(W.value),sx:{borderRadius:99,px:1.75,...Z?{}:{color:"#57564f",borderColor:"#d9d9d6"}},children:W.label},W.value)})}),(0,qe.jsx)(vt.Box,{sx:{fontSize:13,color:"#787774",mt:-.5},children:Xd.find(W=>W.value===$)?.hint}),(0,qe.jsxs)(vt.Box,{sx:{display:"flex",alignItems:"center",gap:1,mt:.5},children:[(0,qe.jsx)(vt.Box,{sx:O2,children:"\uC5B4\uB5A4 \uC5C5\uBB34\uC77C \uB54C"}),F.length>0?(0,qe.jsx)(vt.Button,{size:"small",startIcon:(0,qe.jsx)(tu.default,{sx:{fontSize:16}}),onClick:W=>z(W.currentTarget),sx:{color:"#2563eb",minWidth:0},children:"\uC870\uAC74 \uCD94\uAC00"}):null]}),_.group_seq!==void 0?X("\uD504\uB85C\uC81D\uD2B8",(0,qe.jsx)(ln.LabelSelect,{size:"medium",fullWidth:!0,label:"",value:String(_.group_seq),options:w,onChange:W=>C("group_seq",Number(W.target.value)||"")}),()=>A("group_seq")):null,R?X("\uC885\uB958",(0,qe.jsx)(ln.LabelSelect,{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 Z=W.target.value==="bug";C("is_bug",Z?!0:""),C("is_event",Z?"":!0)}}),()=>A("kind")):null,_.priority!==void 0?X("\uC911\uC694\uB3C4",(0,qe.jsx)(ln.LabelSelect,{size:"medium",fullWidth:!0,label:"",value:_.priority,options:ru,onChange:W=>C("priority",W.target.value)}),()=>A("priority")):null,_.label_key!==void 0?X("\uB77C\uBCA8",(0,qe.jsx)(ln.LabelSelect,{size:"medium",fullWidth:!0,label:"",value:_.label_key,options:y,onChange:W=>C("label_key",W.target.value)}),()=>A("label_key")):null,_.title_contains!==void 0?X("\uC81C\uBAA9",(0,qe.jsx)(ln.ClearTextField,{size:"medium",fullWidth:!0,placeholder:"\uD3EC\uD568\uD560 \uB0B1\uB9D0 (\uC608: \uAE34\uAE09)",value:_.title_contains,onChange:W=>m(Z=>({...Z,condition:{...Z.condition,title_contains:W.target.value}}))}),()=>A("title_contains")):null,_.manager_empty!==void 0?X("\uCC45\uC784\uC790",(0,qe.jsx)(ln.LabelSelect,{size:"medium",fullWidth:!0,label:"",value:_.manager_empty?"empty":"assigned",options:[{value:"empty",label:"\uC5C6\uC74C"},{value:"assigned",label:"\uC788\uC74C"}],onChange:W=>C("manager_empty",W.target.value==="empty")}),()=>A("manager_empty")):null,_.manager_account_seq!==void 0?X("\uCC45\uC784\uC790",(0,qe.jsx)(vt.Button,{size:"medium",variant:"outlined",color:"inherit",onClick:()=>{H("manager_account")},children:_.manager_name||`\uACC4\uC815 #${_.manager_account_seq}`}),()=>A("manager_account")):null,_.receiver_account_seq!==void 0?X("\uCC38\uC870\uC790",(0,qe.jsx)(vt.Button,{size:"medium",variant:"outlined",color:"inherit",onClick:()=>{H("receiver_account")},children:_.receiver_name||`\uACC4\uC815 #${_.receiver_account_seq}`}),()=>A("receiver_account")):null,_.from_status!==void 0?X("\uC774 \uC0C1\uD0DC\uC5D0\uC11C",(0,qe.jsx)(ln.LabelSelect,{size:"medium",fullWidth:!0,label:"",value:_.from_status,options:v,onChange:W=>C("from_status",W.target.value)}),()=>A("from_status")):null,_.to_status!==void 0?X("\uC774 \uC0C1\uD0DC\uB85C",(0,qe.jsx)(ln.LabelSelect,{size:"medium",fullWidth:!0,label:"",value:_.to_status,options:v,onChange:W=>C("to_status",W.target.value)}),()=>A("to_status")):null,_.changed_field!==void 0?X("\uBCC0\uACBD \uD544\uB4DC",(0,qe.jsx)(ln.LabelSelect,{size:"medium",fullWidth:!0,label:"",value:_.changed_field,options:_l,onChange:W=>C("changed_field",W.target.value)}),()=>A("changed_field")):null,_.comment_contains!==void 0?X("\uB313\uAE00 \uB0B1\uB9D0",(0,qe.jsx)(ln.ClearTextField,{size:"medium",fullWidth:!0,placeholder:"\uD3EC\uD568\uD560 \uB0B1\uB9D0 (\uC608: \uD68C\uC2E0)",value:_.comment_contains,onChange:W=>m(Z=>({...Z,condition:{...Z.condition,comment_contains:W.target.value}}))}),()=>A("comment_contains")):null,_.comment_by_others!==void 0?X("\uB313\uAE00 \uC791\uC131\uC790",(0,qe.jsx)(ln.LabelSelect,{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=>C("comment_by_others",W.target.value==="others")}),()=>A("comment_by_others")):null,_.overdue_days!==void 0?X("\uACBD\uACFC\uC77C",(0,qe.jsx)(ln.ClearTextField,{size:"medium",fullWidth:!0,type:"number",value:String(_.overdue_days),onChange:W=>C("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"}),()=>A("overdue_days")):null,Object.keys(_).length===0?(0,qe.jsx)(vt.Box,{sx:{fontSize:13.5,color:"#9a9a97"},children:"\uC870\uAC74\uC774 \uC5C6\uC73C\uBA74 \uBAA8\uB4E0 \uC5C5\uBB34\uC5D0 \uC2E4\uD589\uB429\uB2C8\uB2E4."}):null,(0,qe.jsxs)(vt.Box,{sx:{display:"flex",alignItems:"center",gap:1,mt:.5},children:[(0,qe.jsx)(vt.Box,{sx:O2,children:"\uBB34\uC5C7\uC744 \uD560\uAE4C\uC694"}),q.length>0?(0,qe.jsx)(vt.Button,{size:"small",startIcon:(0,qe.jsx)(tu.default,{sx:{fontSize:16}}),onClick:W=>P(W.currentTarget),sx:{color:"#2563eb",minWidth:0},children:"\uB3D9\uC791 \uCD94\uAC00"}):null]}),T.set_status!==void 0?X("\uC0C1\uD0DC",(0,qe.jsx)(ln.LabelSelect,{size:"medium",fullWidth:!0,label:"",value:T.set_status,options:v,onChange:W=>S("set_status",W.target.value)}),()=>j("set_status")):null,T.set_priority!==void 0?X("\uC911\uC694\uB3C4",(0,qe.jsx)(ln.LabelSelect,{size:"medium",fullWidth:!0,label:"",value:T.set_priority,options:ru,onChange:W=>S("set_priority",W.target.value)}),()=>j("set_priority")):null,T.apply_content_template_seq!==void 0?X("\uBCF8\uBB38 \uC591\uC2DD",(0,qe.jsx)(ln.LabelSelect,{size:"medium",fullWidth:!0,label:"",value:String(T.apply_content_template_seq),options:o.map(W=>({value:String(W.seq),label:W.name})),onChange:W=>{let Z=o.find(J=>String(J.seq)===String(W.target.value));m(J=>({...J,action:{...J.action,apply_content_template_seq:Z?.seq??0,apply_content_template_name:Z?.name??""}}))}}),()=>j("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,T.add_label_key!==void 0?X("\uB77C\uBCA8",(0,qe.jsx)(ln.LabelSelect,{size:"medium",fullWidth:!0,label:"",value:T.add_label_key,options:y,onChange:W=>S("add_label_key",W.target.value)}),()=>j("add_label_key")):null,T.assign_manager_account_seq!==void 0?X("\uCC45\uC784\uC790",(0,qe.jsx)(vt.Button,{size:"medium",variant:"outlined",color:"inherit",onClick:()=>{B("assign_manager")},children:T.assign_manager_name||`\uACC4\uC815 #${T.assign_manager_account_seq}`}),()=>j("assign_manager")):null,T.add_receiver_account_seq!==void 0?X("\uCC38\uC870\uC790",(0,qe.jsx)(vt.Button,{size:"medium",variant:"outlined",color:"inherit",onClick:()=>{B("add_receiver")},children:T.add_receiver_name||`\uACC4\uC815 #${T.add_receiver_account_seq}`}),()=>j("add_receiver")):null,T.notify_account_seq!==void 0?X("\uC54C\uB9BC",(0,qe.jsxs)(qe.Fragment,{children:[(0,qe.jsx)(vt.Button,{size:"medium",variant:"outlined",color:"inherit",onClick:()=>{B("notify")},sx:{flexShrink:0},children:T.notify_name||`\uACC4\uC815 #${T.notify_account_seq}`}),(0,qe.jsx)(ln.ClearTextField,{size:"medium",fullWidth:!0,placeholder:"\uC54C\uB9BC \uBB38\uAD6C(\uBE44\uC6B0\uBA74 \uAE30\uBCF8 \uBB38\uAD6C)",value:T.notify_message??"",onChange:W=>S("notify_message",W.target.value)})]}),()=>j("notify")):null,Object.keys(T).length===0?(0,qe.jsx)(vt.Box,{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,(0,qe.jsx)(vt.Menu,{transitionDuration:0,anchorEl:M,open:!!M,onClose:()=>z(null),children:F.map(W=>(0,qe.jsx)(vt.MenuItem,{dense:!0,onClick:()=>V(W.key),sx:{fontSize:14},children:W.label},W.key))}),(0,qe.jsx)(vt.Menu,{transitionDuration:0,anchorEl:O,open:!!O,onClose:()=>P(null),children:q.map(W=>(0,qe.jsx)(vt.MenuItem,{dense:!0,onClick:()=>E(W.key),sx:{fontSize:14},children:W.label},W.key))})]});return(0,qe.jsxs)(qe.Fragment,{children:[(0,qe.jsx)(Gd.FormDialog,{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:(0,qe.jsxs)(vt.Box,{sx:{display:"flex",flexDirection:"column",px:2.5,py:2},children:[f.length===0?(0,qe.jsxs)(vt.Box,{sx:{py:4,display:"flex",flexDirection:"column",alignItems:"center",gap:2,color:"#9a9a97"},children:[(0,qe.jsx)(D2.default,{sx:{fontSize:48,color:"#d9d9d6"}}),(0,qe.jsx)(vt.Box,{sx:{fontSize:15},children:"\uB4F1\uB85D\uB41C \uADDC\uCE59\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."})]}):null,f.map(W=>(0,qe.jsxs)(vt.Box,{sx:{display:"flex",alignItems:"center",gap:2,py:1,"&:not(:last-of-type)":{borderBottom:"1px solid #ececea"},opacity:W.enabled?1:.5},children:[(0,qe.jsx)(vt.Tooltip,{title:W.enabled?"\uC0AC\uC6A9 \uC911":"\uAEBC\uC9D0",arrow:!0,disableInteractive:!0,children:(0,qe.jsx)(vt.Switch,{size:"small",inputProps:{"aria-label":`${W.name} \uADDC\uCE59 \uC0AC\uC6A9`},checked:W.enabled,onChange:(Z,J)=>c(W.seq,J)})}),(0,qe.jsxs)(vt.Box,{sx:{flex:1,minWidth:0},children:[(0,qe.jsx)(vt.Box,{sx:{fontSize:16,fontWeight:600,color:"#37352f"},children:W.name}),(()=>{let Z=S3(W,g,l);return(0,qe.jsxs)(vt.Box,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:.5,fontSize:15,color:"#6f6f6c"},children:[(0,qe.jsx)(vt.Box,{component:"span",children:Z.left}),(0,qe.jsx)(A2.default,{sx:{fontSize:18,color:"#9a9a97",flexShrink:0}}),(0,qe.jsx)(vt.Box,{component:"span",children:Z.right})]})})()]}),(0,qe.jsx)(vt.IconButton,{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:_l[0]?.value??""}:{}},action:{...W.action}}),h(!0)},children:(0,qe.jsx)(N2.default,{sx:{fontSize:18}})}),(0,qe.jsx)(vt.IconButton,{size:"small","aria-label":`${W.name} \uADDC\uCE59 \uC0AD\uC81C`,onClick:()=>i(W.seq),children:(0,qe.jsx)(gn,{sx:{fontSize:18}})})]},W.seq))]})}],actions:{showCancelButton:!1,left:(0,qe.jsx)(vt.Button,{startIcon:(0,qe.jsx)(tu.default,{}),onClick:()=>{u(0),m(Qc()),h(!0)},sx:{color:"#2563eb"},children:"\uC0C8 \uADDC\uCE59"}),right:(0,qe.jsx)(vt.Button,{variant:"contained",onClick:r,children:"\uB2EB\uAE30"})}}),(0,qe.jsx)(Gd.FormDialog,{open:a,onClose:L,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:G()}],actions:{showCancelButton:!0,right:(0,qe.jsx)(vt.Button,{variant:"contained",onClick:()=>{U()},disabled:x,children:N?"\uC218\uC815":"\uADDC\uCE59 \uCD94\uAC00"})}})]})}var ro=require("react"),Et=require("@mui/material"),Zd=Y(require("@mui/icons-material/Add"),1),j2=Y(require("@mui/icons-material/EditOutlined"),1),F2=Y(require("@mui/icons-material/ContentCopyOutlined"),1),q2=Y(require("@mui/icons-material/DragIndicator"),1),$2=Y(require("@mui/icons-material/Close"),1),H2=Y(require("@mui/icons-material/PlaylistAddCheckOutlined"),1),oi=require("@dnd-kit/core"),iu=require("@dnd-kit/modifiers"),_i=require("@dnd-kit/sortable"),W2=require("@dnd-kit/utilities"),Jd=require("@ehfuse/mui-form-dialog"),ni=require("@ehfuse/mui-form-controls"),U2=Y(require("@ehfuse/overlay-scrollbar"),1),kl=require("@ehfuse/alerts");var Qe=require("react/jsx-runtime"),I3=[{value:"high",label:"\uB192\uC74C"},{value:"medium",label:"\uC911\uAC04"},{value:"low",label:"\uB0AE\uC74C"}],L2="\uC5C5\uBB34 \uC81C\uBAA9",Qd=2,nu={flex:1,minWidth:0},z2=56,V2=20,E3=`${V2+Qd*8}px`;function ou(){return{name:"",description:"",group_seq:0,items:[]}}function M3(){return{title:"",start_offset_days:0,due_offset_days:0,priority:"medium"}}function R3({id:e,children:f}){let{attributes:g,listeners:l,setNodeRef:o,transform:s,transition:r,isDragging:t}=(0,_i.useSortable)({id:e});return(0,Qe.jsx)(Et.Box,{ref:o,sx:{transform:W2.CSS.Transform.toString(s),transition:r,...t?{opacity:.6,position:"relative",zIndex:1}:{}},children:f({handleProps:{...g,...l},dragging:t})})}function O3({open:e,templates:f,customTabs:g,onPickAccount:l,onClose:o,onCreate:s,onUpdate:r,onRemove:t,onRun:n}){let[c,i]=(0,ro.useState)(!1),[a,h]=(0,ro.useState)(0),[d,u]=(0,ro.useState)(ou()),[b,m]=(0,ro.useState)(!1),[x,k]=(0,ro.useState)([]),I=(0,ro.useRef)(0),[M,z]=(0,ro.useState)(0),O=(0,ro.useRef)(null),P=(0,ro.useRef)(null);(0,ro.useEffect)(()=>{if(e)return;let F=window.setTimeout(()=>{i(!1),h(0),u(ou()),k([])},500);return()=>window.clearTimeout(F)},[e]);let N=()=>(I.current+=1,`template-item-${I.current}`),$=(F,H)=>{h(F),u(H),k(H.items.map(()=>N())),i(!0)},L=d.items.map((F,H)=>x[H]??`template-item-fallback-${H}`),C=()=>{let F=P.current?.getScrollContainer()??null;if(F){F.scrollTop=F.scrollHeight;return}let H=O.current?.querySelectorAll("*")??[];for(let V of Array.from(H))if(V.scrollHeight>V.clientHeight+1){V.scrollTop=V.scrollHeight;return}},S=()=>{let F=O.current;if(!F)return null;let H=F.querySelectorAll("input[data-template-title]"),V=H.length?H:F.querySelectorAll(`input[placeholder="${L2}"]`);return V.length?V[V.length-1]:null};(0,ro.useEffect)(()=>{if(M===0)return;let F=0,H=0,V=()=>{C();let q=S();q&&document.activeElement!==q&&q.focus(),F+=1,!(q&&document.activeElement===q)&&F<8&&(H=window.setTimeout(V,50))},A=window.requestAnimationFrame(V);return()=>{window.cancelAnimationFrame(A),window.clearTimeout(H)}},[M]);let D=g.filter(F=>!F.archived).map(F=>({value:String(bi(F.key)),label:F.label})),p=(F,H)=>{u(V=>({...V,items:V.items.map((A,q)=>q===F?{...A,...H}:A)}))},y=(0,oi.useSensors)((0,oi.useSensor)(oi.PointerSensor,{activationConstraint:{distance:5}})),v=F=>{let H=String(F.active?.id??""),V=String(F.over?.id??"");if(!H||!V||H===V)return;let A=L.indexOf(H),q=L.indexOf(V);A<0||q<0||(u(B=>({...B,items:(0,_i.arrayMove)(B.items,A,q)})),k(B=>(0,_i.arrayMove)(B,A,q)))},w=async F=>{if(!l)return;let H=await l(d.items[F]?.manager_account_seq??0,"\uCC45\uC784\uC790");H&&p(F,{manager_account_seq:H.accountSeq,manager_name:H.name})},_=async()=>{let F=d.name.trim();if(!F){(0,kl.ErrorAlert)({message:"\uD15C\uD50C\uB9BF \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694."});return}let H=d.items.filter(q=>q.title.trim().length>0);if(H.length===0){(0,kl.ErrorAlert)({message:"\uC5C5\uBB34 \uD56D\uBAA9\uC744 \uD55C \uC904 \uC774\uC0C1 \uB123\uC73C\uC138\uC694."});return}m(!0);let V={...d,name:F,items:H},A=a>0?await r(a,V):await s(V);m(!1),A&&(i(!1),h(0),u(ou()))},T=(0,Qe.jsx)(Et.Box,{children:f.length===0?(0,Qe.jsxs)(Et.Box,{sx:{py:4,display:"flex",flexDirection:"column",alignItems:"center",gap:2,color:"#9a9a97"},children:[(0,Qe.jsx)(H2.default,{sx:{fontSize:48,color:"#d9d9d6"}}),(0,Qe.jsx)(Et.Box,{sx:{fontSize:13.5},children:"\uB4F1\uB85D\uB41C \uD15C\uD50C\uB9BF\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."})]}):f.map(F=>(0,Qe.jsxs)(Et.Box,{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:[(0,Qe.jsxs)(Et.Box,{sx:{flex:1,minWidth:0},children:[(0,Qe.jsx)(Et.Box,{sx:{fontSize:18,fontWeight:600,color:"#37352f"},children:F.name}),(0,Qe.jsxs)(Et.Box,{sx:{fontSize:14,color:"#787774",mt:.25},children:["\uC5C5\uBB34 ",F.items.length,"\uAC74",F.description?` \xB7 ${F.description}`:""]})]}),n?(0,Qe.jsx)(Et.Button,{size:"medium",variant:"outlined",onClick:()=>n(F),sx:{flexShrink:0},children:"\uC2E4\uD589"}):null,(0,Qe.jsx)(Et.Tooltip,{title:"\uC218\uC815",arrow:!0,disableInteractive:!0,children:(0,Qe.jsx)(Et.IconButton,{size:"medium","aria-label":`${F.name} \uD15C\uD50C\uB9BF \uC218\uC815`,onClick:()=>$(F.seq,{name:F.name,description:F.description??"",group_seq:F.group_seq??0,items:F.items.map(H=>({...H}))}),children:(0,Qe.jsx)(j2.default,{sx:{fontSize:19}})})}),(0,Qe.jsx)(Et.Tooltip,{title:"\uBCF5\uC81C",arrow:!0,disableInteractive:!0,children:(0,Qe.jsx)(Et.IconButton,{size:"medium","aria-label":`${F.name} \uD15C\uD50C\uB9BF \uBCF5\uC81C`,onClick:()=>$(0,{name:`${F.name} \uC0AC\uBCF8`,description:F.description??"",group_seq:F.group_seq??0,items:F.items.map(H=>({...H}))}),children:(0,Qe.jsx)(F2.default,{sx:{fontSize:18}})})}),(0,Qe.jsx)(Et.Tooltip,{title:"\uC0AD\uC81C",arrow:!0,disableInteractive:!0,children:(0,Qe.jsx)(Et.IconButton,{size:"medium","aria-label":`${F.name} \uD15C\uD50C\uB9BF \uC0AD\uC81C`,onClick:()=>{(async()=>await(0,kl.ConfirmDialog)({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:(0,Qe.jsx)(gn,{sx:{fontSize:18}})})})]},F.seq))}),R=(0,Qe.jsxs)(Et.Box,{sx:{display:"flex",flexDirection:"column",gap:3},children:[(0,Qe.jsx)(ni.ClearTextField,{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(H=>({...H,name:F.target.value}))}),(0,Qe.jsxs)(Et.Box,{sx:{display:"grid",gridTemplateColumns:D.length>0?"1fr 1fr":"1fr",gap:2},children:[(0,Qe.jsx)(ni.ClearTextField,{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(H=>({...H,description:F.target.value}))}),D.length>0?(0,Qe.jsx)(ni.LabelSelect,{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(H=>({...H,group_seq:Number(F.target.value)||0}))}):null]}),(0,Qe.jsxs)(Et.Box,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[(0,Qe.jsx)(Et.Box,{sx:{fontSize:18,fontWeight:600,color:"#37352f"},children:"\uC5C5\uBB34 \uD56D\uBAA9"}),(0,Qe.jsx)(Et.Box,{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?(0,Qe.jsx)(Et.Box,{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.'}):(0,Qe.jsx)(Et.Box,{ref:O,sx:{border:"1px solid #e6e6e3",borderRadius:1,overflow:"hidden"},children:(0,Qe.jsx)(U2.default,{ref:P,style:{maxHeight:"min(560px, 52vh)"},thumb:{width:6},children:(0,Qe.jsx)(oi.DndContext,{sensors:y,collisionDetection:oi.closestCenter,modifiers:[iu.restrictToVerticalAxis,iu.restrictToParentElement],onDragEnd:v,children:(0,Qe.jsx)(_i.SortableContext,{items:L,strategy:_i.verticalListSortingStrategy,children:d.items.map((F,H)=>(0,Qe.jsx)(R3,{id:L[H],children:({handleProps:V})=>(0,Qe.jsxs)(Et.Box,{sx:{borderBottom:H===d.items.length-1?"none":"1px solid #f2f2f0",px:Qd,py:2,gap:2,display:"flex",flexDirection:"column"},children:[(0,Qe.jsxs)(Et.Box,{sx:{display:"flex",alignItems:"center",gap:Qd},children:[(0,Qe.jsx)(Et.Box,{...V,"aria-label":`${H+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:(0,Qe.jsx)(q2.default,{sx:{fontSize:V2}})}),(0,Qe.jsx)(ni.ClearTextField,{size:"medium",fullWidth:!0,placeholder:L2,slotProps:{htmlInput:{"data-template-title":H}},value:F.title,onChange:A=>p(H,{title:A.target.value})})]}),(0,Qe.jsxs)(Et.Box,{sx:{display:"flex",alignItems:"center",gap:2,pl:E3},children:[(0,Qe.jsx)(Et.Box,{sx:nu,children:(0,Qe.jsx)(ni.NumberField,{size:"medium",fullWidth:!0,label:"\uC2DC\uC791 D+",thousandSeparator:!1,align:"right",suffix:"\uC77C",value:F.start_offset_days??null,onValueChange:A=>p(H,{start_offset_days:A===null?void 0:Math.trunc(Number(A))})})}),(0,Qe.jsx)(Et.Box,{sx:nu,children:(0,Qe.jsx)(ni.NumberField,{size:"medium",fullWidth:!0,label:"\uB9C8\uAC10 D+",thousandSeparator:!1,align:"right",suffix:"\uC77C",value:F.due_offset_days??null,onValueChange:A=>p(H,{due_offset_days:A===null?void 0:Math.trunc(Number(A))})})}),(0,Qe.jsx)(Et.Box,{sx:nu,children:(0,Qe.jsx)(ni.LabelSelect,{size:"medium",fullWidth:!0,label:"\uC911\uC694\uB3C4",value:F.priority??"medium",options:I3,onChange:A=>p(H,{priority:A.target.value})})}),l?(0,Qe.jsxs)(Et.Box,{sx:{...nu,position:"relative"},children:[(0,Qe.jsx)(Et.Button,{variant:"outlined",fullWidth:!0,onClick:()=>{w(H)},sx:{height:z2,display:"block",textAlign:"left",textTransform:"none",fontSize:16,fontWeight:400,lineHeight:`${z2-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?(0,Qe.jsx)(Et.Tooltip,{title:"\uCC45\uC784\uC790 \uBE44\uC6B0\uAE30",arrow:!0,disableInteractive:!0,children:(0,Qe.jsx)(Et.IconButton,{size:"small","aria-label":`${H+1}\uBC88 \uD56D\uBAA9 \uCC45\uC784\uC790 \uBE44\uC6B0\uAE30`,onClick:A=>{A.stopPropagation(),p(H,{manager_account_seq:0,manager_name:""})},sx:{position:"absolute",right:6,top:"50%",transform:"translateY(-50%)"},children:(0,Qe.jsx)($2.default,{sx:{fontSize:18}})})}):null]}):null,(0,Qe.jsx)(Et.Tooltip,{title:"\uD56D\uBAA9 \uC0AD\uC81C",arrow:!0,disableInteractive:!0,children:(0,Qe.jsx)(Et.IconButton,{size:"medium","aria-label":`${H+1}\uBC88 \uD56D\uBAA9 \uC0AD\uC81C`,onClick:()=>{u(A=>({...A,items:A.items.filter((q,B)=>B!==H)})),k(A=>A.filter((q,B)=>B!==H))},children:(0,Qe.jsx)(gn,{sx:{fontSize:18}})})})]})]})},L[H]))})})})})]});return(0,Qe.jsxs)(Qe.Fragment,{children:[(0,Qe.jsx)(Jd.FormDialog,{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:(0,Qe.jsx)(Et.Button,{startIcon:(0,Qe.jsx)(Zd.default,{sx:{fontSize:18}}),onClick:()=>$(0,ou()),children:"\uC0C8 \uD15C\uD50C\uB9BF"}),right:(0,Qe.jsx)(Et.Button,{variant:"contained",onClick:o,children:"\uB2EB\uAE30"})},sectionContentPaddingTop:0,sections:[{id:"templates",title:"",showTitle:!1,children:T}]}),(0,Qe.jsx)(Jd.FormDialog,{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:(0,Qe.jsx)(Et.Button,{startIcon:(0,Qe.jsx)(Zd.default,{sx:{fontSize:18}}),onClick:()=>{u(F=>({...F,items:[...F.items,M3()]})),k(F=>[...F,N()]),z(F=>F+1)},children:"\uD56D\uBAA9 \uCD94\uAC00"}),right:(0,Qe.jsx)(Et.Button,{variant:"contained",disabled:b,onClick:()=>{_()},children:"\uC800\uC7A5"})},sectionContentPaddingTop:0,sections:[{id:"template-form",title:"",showTitle:!1,children:R}]})]})}var aa=require("react"),pn=require("@mui/material"),K2=require("@ehfuse/mui-form-dialog"),G2=require("@ehfuse/mui-form-controls"),Y2=Y(require("@ehfuse/overlay-scrollbar"),1);var Gr=require("react/jsx-runtime");function A3({open:e,template:f,todayStr:g,running:l=!1,onClose:o,onRun:s}){let[r,t]=(0,aa.useState)(g),[n,c]=(0,aa.useState)(f);(0,aa.useEffect)(()=>{f&&c(f)},[f]),(0,aa.useEffect)(()=>{e&&t(g)},[e]);let i=f??n,a=i?Bf(i,r):[];return(0,Gr.jsx)(K2.FormDialog,{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:(0,Gr.jsx)(pn.Button,{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:(0,Gr.jsxs)(pn.Box,{sx:{display:"flex",flexDirection:"column",gap:2},children:[(0,Gr.jsxs)(pn.Box,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[(0,Gr.jsx)(pn.Box,{sx:{width:72,flexShrink:0,fontSize:16,color:"#37352f"},children:"\uAE30\uC900\uC77C"}),(0,Gr.jsx)(G2.DateTextField,{size:"medium",fullWidth:!0,value:r,onChange:h=>t(h.target.value)})]}),(0,Gr.jsx)(pn.Box,{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."}),(0,Gr.jsxs)(pn.Box,{sx:{border:"1px solid #e6e6e3",borderRadius:1,overflow:"hidden"},children:[(0,Gr.jsxs)(pn.Box,{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:[(0,Gr.jsx)(pn.Box,{sx:{flex:1,minWidth:0},children:"\uC5C5\uBB34"}),(0,Gr.jsx)(pn.Box,{sx:{width:88,flexShrink:0,textAlign:"center"},children:"\uC2DC\uC791"}),(0,Gr.jsx)(pn.Box,{sx:{width:88,flexShrink:0,textAlign:"center"},children:"\uB9C8\uAC10"}),(0,Gr.jsx)(pn.Box,{sx:{width:96,flexShrink:0,textAlign:"center"},children:"\uCC45\uC784\uC790"})]}),(0,Gr.jsx)(Y2.default,{style:{maxHeight:520},thumb:{width:6},children:a.length===0?(0,Gr.jsx)(pn.Box,{sx:{p:2,fontSize:14,color:"#9a9a97"},children:"\uB9CC\uB4E4 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):a.map((h,d)=>(0,Gr.jsxs)(pn.Box,{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:[(0,Gr.jsx)(pn.Box,{sx:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:h.title}),(0,Gr.jsx)(pn.Box,{sx:{width:88,flexShrink:0,textAlign:"center",fontSize:13.5,color:h.start_date?"#37352f":"#9a9a97"},children:rc(h.start_date)||"-"}),(0,Gr.jsx)(pn.Box,{sx:{width:88,flexShrink:0,textAlign:"center",fontSize:13.5,color:h.due_date?"#37352f":"#9a9a97"},children:rc(h.due_date)||"-"}),(0,Gr.jsx)(pn.Box,{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 D3={urgent:"\uAE34\uAE09",high:"\uB192\uC74C",normal:"\uC911\uAC04",low:"\uB0AE\uC74C"};function P3(e){return e.length===0?"":e.length<=2?e.join(", "):`${e[0]} \uC678 ${e.length-1}\uBA85`}function su(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 vs(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 au(e,f){let l=String(e.due_date??"").slice(11,16).trim()||String(e.estimated_time??"").trim(),o=su(e.due_date),s=String(e.start_date??"").slice(11,16).trim(),r=su(e.start_date),t=(e.receiver_names??[]).filter(Boolean).map(c=>String(c).trim()),n=(e.checklist??[]).length?`${(e.checklist??[]).filter(c=>c.checked).length}/${(e.checklist??[]).length}`:"";return{seq:Number(e.seq??0),title:String(e.title??"").trim(),statusName:Xr(e).name,projectLabel:e.tab_key?f.get(String(e.tab_key))??"":"",managerName:String(e.manager_name??"").trim(),receiverNames:P3(t),receiverNamesFull:t.join(", "),startDate:r!=="-"&&s?`${r} ${s}`:r,dueDate:o!=="-"&&l?`${o} ${l}`:o,priorityName:D3[String(e.priority??"")]??"",checklist:n,note:String(e.note??"").trim(),completed:!!e.completed}}function ur(e){return String(e??"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function N3(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 Sl(e,f){let g=0;for(let l of String(e??""))g+=N3(l,f);return g}function ws(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 Gi(e,f,g){let l=String(e??"").replace(/\s+/g," ").trim();if(!l)return"";if(Sl(l,g)<=f)return l;let o=Sl("\u2026",g),s="",r=0;for(let t of l){let n=Sl(t,g);if(r+n+o>f)break;s+=t,r+=n}return`${s}\u2026`}var la=595.28,ca=841.89,ua=841.89,fa=595.28,Sn=28,fo=96,no=44,L3="'Malgun Gothic','\uB9D1\uC740 \uACE0\uB515','Apple SD Gothic Neo','Noto Sans KR',sans-serif",z3="'Batang','\uBC14\uD0D5','AppleMyungjo','Noto Serif KR',serif",Tl="#cbd5e1",j3=[`text { font-family: ${L3}; fill: #000000; }`,`.doc-title { font-family: ${z3}; font-size: 20px; font-weight: 700; }`,".doc-sub { font-size: 10.5px; fill: #333333; }",".doc-meta { font-size: 9.5px; fill: #333333; }",".th { font-size: 9.5px; font-weight: 700; fill: #000000; }",".td { font-size: 9px; }",".td.done { fill: #555555; }",".gt { font-size: 10px; font-weight: 700; fill: #000000; }",".label { font-size: 9px; fill: #333333; }",".value { font-size: 10px; }",".section { font-size: 11.5px; font-weight: 700; fill: #000000; }",".pageno { font-size: 9px; fill: #333333; }",`.head { fill: #eef2f7; stroke: ${Tl}; stroke-width: 0.5; }`,`.group { fill: #f8fafc; stroke: ${Tl}; stroke-width: 0.5; }`,`.frame { fill: none; stroke: ${Tl}; stroke-width: 0.5; }`,`.hline { stroke: ${Tl}; stroke-width: 0.5; }`,`.vline { stroke: ${Tl}; 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 ii(e,f,g){let l=g-Sn;return[`<text x="${Sn}" y="46" class="doc-title">${ur(e.documentTitle)}</text>`,`<text x="${Sn}" y="66" class="doc-sub">${ur(e.subtitle)}</text>`,`<text x="${l}" y="42" class="doc-meta" text-anchor="end">${ur(e.facilityName)}</text>`,`<text x="${l}" y="58" class="doc-meta" text-anchor="end">\uCD9C\uB825 ${ur(vs(e.printedAt))}${e.printedBy?` \xB7 ${ur(e.printedBy)}`:""}</text>`,f?`<text x="${l}" y="74" class="doc-meta" text-anchor="end">${ur(f)}</text>`:""].join("")}function si(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>${j3}</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 th=ua,Z2=fa,ki=Sn,Cl=th-Sn,Il=22,_s=20,ks=22,Bl=5,J2=fo,Q2=no,X2=Z2-46,El=[{key:"no",label:"\uBC88\uD638",width:30,align:"middle"},{key:"title",label:"\uC81C\uBAA9",width:220,align:"start"},{key:"status",label:"\uC0C1\uD0DC",width:56,align:"middle"},{key:"start",label:"\uC2DC\uC791",width:86,align:"middle"},{key:"due",label:"\uB9C8\uAC10",width:86,align:"middle"},{key:"manager",label:"\uCC45\uC784\uC790",width:62,align:"middle"},{key:"receivers",label:"\uCC38\uC870\uC790",width:122,align:"start"},{key:"priority",label:"\uC911\uC694\uB3C4",width:52,align:"middle"},{key:"project",label:"\uD504\uB85C\uC81D\uD2B8",width:72,align:"middle"}],eh=El.reduce((e,f,g)=>(e.push(g===0?ki:e[g-1]+El[g-1].width),e),[]);function F3(e){let f=[],g=[],l=J2+Il,o=0,s=(r,t)=>{f.push(g),g=[],l=Q2+Il,r&&(g.push({kind:"group",label:r,count:t,continued:!0}),l+=ks)};for(let r of e){r.label&&(l+ks+_s>X2&&s("",0),g.push({kind:"group",label:r.label,count:r.rows.length,continued:!1}),l+=ks);for(let t of r.rows)l+_s>X2&&s(r.label,r.rows.length),o+=1,g.push({kind:"row",completed:t.completed,values:El.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"receivers":return t.receiverNames||"-";case"start":return t.startDate;case"due":return t.dueDate;default:return t.priorityName||"-"}})}),l+=_s}return f.push(g),f.filter((r,t)=>t===0||r.length>0)}function q3(e,f){let g=[];g.push(`<rect x="${ki}" y="${f}" width="${Cl-ki}" height="${Il}" class="head" />`),El.forEach((o,s)=>{let r=eh[s],t=o.align==="middle"?r+o.width/2:r+Bl;g.push(`<text x="${t}" y="${f+Il-7}" class="th" text-anchor="${o.align}">${ur(o.label)}</text>`)});let l=f+Il;for(let o of e){if(o.kind==="group"){g.push(`<rect x="${ki}" y="${l}" width="${Cl-ki}" height="${ks}" class="group" />`,`<text x="${ki+Bl}" y="${l+ks-7}" class="gt">${ur(o.continued?`${o.label} (\uC774\uC5B4\uC11C)`:o.label)}</text>`,`<text x="${Cl-Bl}" y="${l+ks-7}" class="gt" text-anchor="end">${o.count}\uAC74</text>`),l+=ks;continue}El.forEach((s,r)=>{let t=eh[r],n=s.align==="middle"?t+s.width/2:t+Bl;g.push(`<text x="${n}" y="${l+_s-6}" class="${o.completed?"td done":"td"}" text-anchor="${s.align}">${ur(Gi(o.values[r]??"",s.width-Bl*2,9))}</text>`)}),g.push(`<line x1="${ki}" y1="${l+_s}" x2="${Cl}" y2="${l+_s}" class="hline" />`),l+=_s}return eh.slice(1).forEach(o=>{g.push(`<line x1="${o}" y1="${f}" x2="${o}" y2="${l}" class="vline" />`)}),g.push(`<rect x="${ki}" y="${f}" width="${Cl-ki}" height="${l-f}" class="frame" />`),g.join("")}async function ev(e,f){let g=F3(f),l=f.reduce((o,s)=>o+s.rows.length,0);return g.map((o,s)=>{let r=s===0?J2:Q2,t=[s===0?ii(e,`\uC804\uCCB4 ${l}\uAC74`,th):"",q3(o,r)].join("");return si({width:th,height:Z2,body:t,pageIndex:s,pageCount:g.length})})}var nh=la,tv=ca,ai=Sn,lu=nh-Sn,$3=tv-46,rv=22,H3=68,W3=(lu-ai)/2,U3=14,rh=58;function da(e){switch(e.kind){case"title":return 34;case"props":return Math.ceil(e.pairs.length/2)*rv+10;case"section":return 26;default:return U3}}function V3(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(`
48
+ `).flatMap(l=>l.trim()?ws(l,rh):[""]):["(\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=>{ws(l.label,rh-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}),ws(l.text,rh).forEach(o=>f.push({kind:"line",text:o}))})),f}function K3(e){let f=[],g=[],l=fo;for(let o of e){let s=da(o);l+s>$3&&(f.push(g),g=[],l=no),g.push(o),l+=s}return f.push(g),f}function G3(e,f){switch(e.kind){case"title":{let g=e.ticket?`<text x="${lu}" y="${f+16}" class="doc-meta" text-anchor="end">${ur(e.ticket)}</text>`:"";return{markup:`<text x="${ai}" y="${f+16}" class="section" style="font-size:14px">${ur(e.text)}</text>${g}<line x1="${ai}" y1="${f+24}" x2="${lu}" y2="${f+24}" class="hline" />`,nextY:f+da(e)}}case"props":{let g=[];return e.pairs.forEach((l,o)=>{let s=o%2,r=Math.floor(o/2),t=ai+s*W3,n=f+r*rv;g.push(`<text x="${t}" y="${n+14}" class="label">${ur(l.label)}</text>`,`<text x="${t+H3}" y="${n+14}" class="value">${ur(ws(l.value||"-",26)[0]??"-")}</text>`)}),{markup:g.join(""),nextY:f+da(e)}}case"section":return{markup:`<text x="${ai}" y="${f+16}" class="section">${ur(e.text)}</text><line x1="${ai}" y1="${f+21}" x2="${lu}" y2="${f+21}" class="hline" />`,nextY:f+da(e)};case"check":return{markup:`<text x="${ai}" y="${f+10}" class="td">${e.checked?"\u2611":"\u2610"}</text><text x="${ai+14}" y="${f+10}" class="${e.checked?"td done":"td"}">${ur(e.text)}</text>`,nextY:f+da(e)};default:return{markup:`<text x="${ai}" y="${f+10}" class="${e.muted?"td done":"td"}">${ur(e.text)}</text>`,nextY:f+da(e)}}}async function nv(e,f){let g=K3(V3(f));return g.map((l,o)=>{let s=o===0?fo:no,r=[o===0?ii(e,"",nh):`<text x="${ai}" y="${no-12}" class="doc-meta">${ur(`${f.title} (\uC774\uC5B4\uC11C)`)}</text>`];for(let t of l){let n=G3(t,s);r.push(n.markup),s=n.nextY}return si({width:nh,height:tv,body:r.join(""),pageIndex:o,pageCount:g.length})})}var ih=ua,sv=fa,cu=Sn,Ml=ih-Sn,ov=sv-46,iv=210,Yi=20,oh=24;function Xi(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 av(e,f){return Math.round((f.getTime()-e.getTime())/864e5)}function Y3(e,f){let g=[];e.forEach(r=>{let t=Xi(r.startDate),n=Xi(r.dueDate);t&&g.push(t),n&&g.push(n)});let l=Xi(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,av(o,s)+1)}}async function lv(e,f,g){let l=Y3(f,g),o=cu+iv,r=(Ml-o)/l.days,t=Xi(g),n=d=>o+av(l.start,d)*r,c=Math.max(1,Math.floor((ov-fo-oh)/Yi)),i=Math.max(1,Math.floor((ov-no-oh)/Yi)),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?fo:no,m=[u===0?ii(e,`\uC804\uCCB4 ${f.length}\uAC74`,ih):""],x=b+oh;m.push(`<line x1="${cu}" y1="${x}" x2="${Ml}" y2="${x}" class="vline" />`);for(let k=0;k<l.days;k+=1){let I=new Date(l.start);if(I.setDate(I.getDate()+k),I.getDay()!==0&&k!==0)continue;let M=o+k*r;m.push(`<line x1="${M}" y1="${x}" x2="${M}" y2="${x+d.length*Yi}" class="hline" />`,`<text x="${M+2}" y="${x-6}" class="label">${I.getMonth()+1}.${I.getDate()}</text>`)}if(t&&t>=l.start){let k=n(t);k>=o&&k<=Ml&&m.push(`<line x1="${k}" y1="${x}" x2="${k}" y2="${x+d.length*Yi}" stroke="#f87171" stroke-width="0.8" />`)}return d.forEach((k,I)=>{let M=x+I*Yi,z=Gi(k.title,iv-64,9);m.push(`<text x="${cu}" y="${M+14}" class="${k.completed?"td done":"td"}">${ur(z)}</text>`,`<text x="${o-6}" y="${M+14}" class="label" text-anchor="end">${ur(k.managerName)}</text>`,`<line x1="${cu}" y1="${M+Yi}" x2="${Ml}" y2="${M+Yi}" class="hline" />`);let O=Xi(k.startDate)??Xi(k.dueDate),P=Xi(k.dueDate)??Xi(k.startDate);if(!O||!P)return;let N=n(O),$=Math.max(N+r*.8,n(P)+r*.8),L=k.completed?"bar done":k.overdue?"bar overdue":"bar";m.push(`<rect x="${N}" y="${M+5}" width="${Math.max(3,Math.min($,Ml)-N)}" height="${Yi-10}" rx="2" class="${L}" />`)}),si({width:ih,height:sv,body:m.join(""),pageIndex:u,pageCount:a.length})})}function cv(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 sh=la,fv=ca,ha=Sn,uu=sh-Sn,uv=fv-46,pa=30,ma=18,dv=12;function X3(e){let f=[],g=[],l=fo,o=(s,r)=>{f.push(g),g=[],l=no,s&&(g.push({kind:"column",label:s,summary:r,continued:!0,gapBefore:!1}),l+=pa)};for(let s of e){let r=g.length>0,t=r?dv:0;if(l+t+pa+ma>uv?(o("",""),g.push({kind:"column",label:s.label,summary:s.summary,continued:!1,gapBefore:!1}),l+=pa):(g.push({kind:"column",label:s.label,summary:s.summary,continued:!1,gapBefore:r}),l+=t+pa),s.items.length===0){g.push({kind:"empty"}),l+=ma;continue}for(let n of s.items)l+ma>uv&&o(s.label,s.summary),g.push({kind:"item",title:n.title,meta:n.meta,completed:n.completed}),l+=ma}return f.push(g),f}async function hv(e,f,g){let l=X3(f);return l.map((o,s)=>{let r=s===0?fo:no,t=[s===0?ii(e,g,sh):""];for(let n of o){if(n.kind==="column"){n.gapBefore&&(r+=dv),t.push(`<rect x="${ha}" y="${r}" width="${uu-ha}" height="${pa-6}" class="group" />`,`<text x="${ha+6}" y="${r+16}" class="gt">${ur(n.continued?`${n.label} (\uC774\uC5B4\uC11C)`:n.label)}</text>`,`<text x="${uu-6}" y="${r+16}" class="label" text-anchor="end">${ur(n.summary)}</text>`),r+=pa;continue}if(n.kind==="empty"){t.push(`<text x="${ha+12}" y="${r+12}" class="td done">(\uC5C5\uBB34 \uC5C6\uC74C)</text>`),r+=ma;continue}t.push(`<text x="${ha+12}" y="${r+12}" class="${n.completed?"td done":"td"}">${ur(Gi(n.title,uu-ha-12-120,9))}</text>`,`<text x="${uu-6}" y="${r+12}" class="label" text-anchor="end">${ur(n.meta)}</text>`),r+=ma}return si({width:sh,height:fv,body:t.join(""),pageIndex:s,pageCount:l.length})})}var Z3=[{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}],J3="FFEEF2F7",fu="FFCBD5E1";function Q3(e){return e.replace(/[\\/:*?"<>|]/g,"_").trim()||"\uC5C5\uBB34\uBAA9\uB85D"}async function gv(e,f){let g=await Promise.resolve().then(()=>Y(mv(),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=Z3.map(i=>({header:i.header,width:i.width})),o.spliceRows(1,0,[`${e.documentTitle}`],[`${e.subtitle} \xB7 ${e.facilityName} \xB7 \uCD9C\uB825 ${vs(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:J3}},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:fu}},left:{style:"thin",color:{argb:fu}},bottom:{style:"thin",color:{argb:fu}},right:{style:"thin",color:{argb:fu}}}});o.views=[{state:"frozen",ySplit:3}];let t=await l.xlsx.writeBuffer(),n=new Blob([t],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),c=vs(e.printedAt).replace(/[: ]/g,"").slice(0,13);return{blob:n,fileName:`${Q3(e.documentTitle)}_${c}.xlsx`}}function e5(e){return String(e??"").replace(/<br\s*\/?>(?=.)/gi,`
49
49
  `).replace(/<\/(p|div|li|h[1-6])>/gi,`
50
- `).replace(/<[^>]+>/g,"").replace(/&nbsp;/g," ").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&")}function gv(e,f){let g=au(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:Q3(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}}
50
+ `).replace(/<[^>]+>/g,"").replace(/&nbsp;/g," ").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&")}function bv(e,f){let g=au(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:e5(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}}
51
51
  /*! Bundled license information:
52
52
 
53
53
  exceljs/dist/exceljs.min.js: