@jaeungkim/gantt-chart 0.2.4 → 0.3.1
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/README.md +80 -75
- package/dist/gantt-chart.css +1 -0
- package/dist/index.cjs.js +2 -32
- package/dist/index.d.ts +51 -0
- package/dist/index.es.js +2041 -2966
- package/package.json +12 -23
- package/dist/index.css +0 -126
package/dist/index.cjs.js
CHANGED
|
@@ -1,34 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ee=require("react"),xt=require("react-dom");function bt(s){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const t in s)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(s,t);Object.defineProperty(c,t,r.get?r:{enumerable:!0,get:()=>s[t]})}}return c.default=s,Object.freeze(c)}const Se=bt(ee);function ie(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var Me={exports:{}},be={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react-jsx-runtime.production.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var Ge;function Dt(){if(Ge)return be;Ge=1;var s=Symbol.for("react.transitional.element"),c=Symbol.for("react.fragment");function t(r,n,e){var a=null;if(e!==void 0&&(a=""+e),n.key!==void 0&&(a=""+n.key),"key"in n){e={};for(var i in n)i!=="key"&&(e[i]=n[i])}else e=n;return n=e.ref,{$$typeof:s,type:r,key:a,ref:n!==void 0?n:null,props:e}}return be.Fragment=c,be.jsx=t,be.jsxs=t,be}var De={};/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react-jsx-runtime.development.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var Xe;function wt(){return Xe||(Xe=1,process.env.NODE_ENV!=="production"&&function(){function s(o){if(o==null)return null;if(typeof o=="function")return o.$$typeof===k?null:o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case j:return"Fragment";case N:return"Portal";case D:return"Profiler";case E:return"StrictMode";case Y:return"Suspense";case V:return"SuspenseList"}if(typeof o=="object")switch(typeof o.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),o.$$typeof){case m:return(o.displayName||"Context")+".Provider";case l:return(o._context.displayName||"Context")+".Consumer";case C:var _=o.render;return o=o.displayName,o||(o=_.displayName||_.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case F:return _=o.displayName||null,_!==null?_:s(o.type)||"Memo";case O:_=o._payload,o=o._init;try{return s(o(_))}catch{}}return null}function c(o){return""+o}function t(o){try{c(o);var _=!1}catch{_=!0}if(_){_=console;var z=_.error,B=typeof Symbol=="function"&&Symbol.toStringTag&&o[Symbol.toStringTag]||o.constructor.name||"Object";return z.call(_,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",B),c(o)}}function r(){}function n(){if(J===0){re=console.log,ce=console.info,ae=console.warn,me=console.error,ue=console.group,te=console.groupCollapsed,oe=console.groupEnd;var o={configurable:!0,enumerable:!0,value:r,writable:!0};Object.defineProperties(console,{info:o,log:o,warn:o,error:o,group:o,groupCollapsed:o,groupEnd:o})}J++}function e(){if(J--,J===0){var o={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:U({},o,{value:re}),info:U({},o,{value:ce}),warn:U({},o,{value:ae}),error:U({},o,{value:me}),group:U({},o,{value:ue}),groupCollapsed:U({},o,{value:te}),groupEnd:U({},o,{value:oe})})}0>J&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function a(o){if(le===void 0)try{throw Error()}catch(z){var _=z.stack.trim().match(/\n( *(at )?)/);le=_&&_[1]||"",ge=-1<z.stack.indexOf(`
|
|
18
|
-
at`)?" (<anonymous>)":-1<z.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
19
|
-
`+le+o+ge}function i(o,_){if(!o||qe)return"";var z=Ne.get(o);if(z!==void 0)return z;qe=!0,z=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var B=null;B=A.H,A.H=null,n();try{var ne={DetermineComponentFrameRoot:function(){try{if(_){var pe=function(){throw Error()};if(Object.defineProperty(pe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(pe,[])}catch(fe){var we=fe}Reflect.construct(o,[],pe)}else{try{pe.call()}catch(fe){we=fe}o.call(pe.prototype)}}else{try{throw Error()}catch(fe){we=fe}(pe=o())&&typeof pe.catch=="function"&&pe.catch(function(){})}}catch(fe){if(fe&&we&&typeof fe.stack=="string")return[fe.stack,we.stack]}return[null,null]}};ne.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var X=Object.getOwnPropertyDescriptor(ne.DetermineComponentFrameRoot,"name");X&&X.configurable&&Object.defineProperty(ne.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var H=ne.DetermineComponentFrameRoot(),de=H[0],$e=H[1];if(de&&$e){var se=de.split(`
|
|
20
|
-
`),ve=$e.split(`
|
|
21
|
-
`);for(H=X=0;X<se.length&&!se[X].includes("DetermineComponentFrameRoot");)X++;for(;H<ve.length&&!ve[H].includes("DetermineComponentFrameRoot");)H++;if(X===se.length||H===ve.length)for(X=se.length-1,H=ve.length-1;1<=X&&0<=H&&se[X]!==ve[H];)H--;for(;1<=X&&0<=H;X--,H--)if(se[X]!==ve[H]){if(X!==1||H!==1)do if(X--,H--,0>H||se[X]!==ve[H]){var xe=`
|
|
22
|
-
`+se[X].replace(" at new "," at ");return o.displayName&&xe.includes("<anonymous>")&&(xe=xe.replace("<anonymous>",o.displayName)),typeof o=="function"&&Ne.set(o,xe),xe}while(1<=X&&0<=H);break}}}finally{qe=!1,A.H=B,e(),Error.prepareStackTrace=z}return se=(se=o?o.displayName||o.name:"")?a(se):"",typeof o=="function"&&Ne.set(o,se),se}function d(o){if(o==null)return"";if(typeof o=="function"){var _=o.prototype;return i(o,!(!_||!_.isReactComponent))}if(typeof o=="string")return a(o);switch(o){case Y:return a("Suspense");case V:return a("SuspenseList")}if(typeof o=="object")switch(o.$$typeof){case C:return o=i(o.render,!1),o;case F:return d(o.type);case O:_=o._payload,o=o._init;try{return d(o(_))}catch{}}return""}function h(){var o=A.A;return o===null?null:o.getOwner()}function v(o){if(q.call(o,"key")){var _=Object.getOwnPropertyDescriptor(o,"key").get;if(_&&_.isReactWarning)return!1}return o.key!==void 0}function p(o,_){function z(){Ue||(Ue=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",_))}z.isReactWarning=!0,Object.defineProperty(o,"key",{get:z,configurable:!0})}function f(){var o=s(this.type);return Ye[o]||(Ye[o]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),o=this.props.ref,o!==void 0?o:null}function g(o,_,z,B,ne,X){return z=X.ref,o={$$typeof:L,type:o,key:_,props:X,_owner:ne},(z!==void 0?z:null)!==null?Object.defineProperty(o,"ref",{enumerable:!1,get:f}):Object.defineProperty(o,"ref",{enumerable:!1,value:null}),o._store={},Object.defineProperty(o._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(o,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.freeze&&(Object.freeze(o.props),Object.freeze(o)),o}function $(o,_,z,B,ne,X){if(typeof o=="string"||typeof o=="function"||o===j||o===D||o===E||o===Y||o===V||o===I||typeof o=="object"&&o!==null&&(o.$$typeof===O||o.$$typeof===F||o.$$typeof===m||o.$$typeof===l||o.$$typeof===C||o.$$typeof===G||o.getModuleId!==void 0)){var H=_.children;if(H!==void 0)if(B)if(Z(H)){for(B=0;B<H.length;B++)u(H[B],o);Object.freeze&&Object.freeze(H)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else u(H,o)}else H="",(o===void 0||typeof o=="object"&&o!==null&&Object.keys(o).length===0)&&(H+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),o===null?B="null":Z(o)?B="array":o!==void 0&&o.$$typeof===L?(B="<"+(s(o.type)||"Unknown")+" />",H=" Did you accidentally export a JSX literal instead of a component?"):B=typeof o,console.error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",B,H);if(q.call(_,"key")){H=s(o);var de=Object.keys(_).filter(function(se){return se!=="key"});B=0<de.length?"{key: someKey, "+de.join(": ..., ")+": ...}":"{key: someKey}",Be[H+B]||(de=0<de.length?"{"+de.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
23
|
-
let props = %s;
|
|
24
|
-
<%s {...props} />
|
|
25
|
-
React keys must be passed directly to JSX without using spread:
|
|
26
|
-
let props = %s;
|
|
27
|
-
<%s key={someKey} {...props} />`,B,H,de,H),Be[H+B]=!0)}if(H=null,z!==void 0&&(t(z),H=""+z),v(_)&&(t(_.key),H=""+_.key),"key"in _){z={};for(var $e in _)$e!=="key"&&(z[$e]=_[$e])}else z=_;return H&&p(z,typeof o=="function"?o.displayName||o.name||"Unknown":o),g(o,H,X,ne,h(),z)}function u(o,_){if(typeof o=="object"&&o&&o.$$typeof!==St){if(Z(o))for(var z=0;z<o.length;z++){var B=o[z];w(B)&&T(B,_)}else if(w(o))o._store&&(o._store.validated=1);else if(o===null||typeof o!="object"?z=null:(z=P&&o[P]||o["@@iterator"],z=typeof z=="function"?z:null),typeof z=="function"&&z!==o.entries&&(z=z.call(o),z!==o))for(;!(o=z.next()).done;)w(o.value)&&T(o.value,_)}}function w(o){return typeof o=="object"&&o!==null&&o.$$typeof===L}function T(o,_){if(o._store&&!o._store.validated&&o.key==null&&(o._store.validated=1,_=R(_),!Ve[_])){Ve[_]=!0;var z="";o&&o._owner!=null&&o._owner!==h()&&(z=null,typeof o._owner.tag=="number"?z=s(o._owner.type):typeof o._owner.name=="string"&&(z=o._owner.name),z=" It was passed a child from "+z+".");var B=A.getCurrentStack;A.getCurrentStack=function(){var ne=d(o.type);return B&&(ne+=B()||""),ne},console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',_,z),A.getCurrentStack=B}}function R(o){var _="",z=h();return z&&(z=s(z.type))&&(_=`
|
|
28
|
-
|
|
29
|
-
Check the render method of \``+z+"`."),_||(o=s(o))&&(_=`
|
|
30
|
-
|
|
31
|
-
Check the top-level render call using <`+o+">."),_}var M=ee,L=Symbol.for("react.transitional.element"),N=Symbol.for("react.portal"),j=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),D=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),m=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),Y=Symbol.for("react.suspense"),V=Symbol.for("react.suspense_list"),F=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),I=Symbol.for("react.offscreen"),P=Symbol.iterator,k=Symbol.for("react.client.reference"),A=M.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,q=Object.prototype.hasOwnProperty,U=Object.assign,G=Symbol.for("react.client.reference"),Z=Array.isArray,J=0,re,ce,ae,me,ue,te,oe;r.__reactDisabledLog=!0;var le,ge,qe=!1,Ne=new(typeof WeakMap=="function"?WeakMap:Map),St=Symbol.for("react.client.reference"),Ue,Ye={},Be={},Ve={};De.Fragment=j,De.jsx=function(o,_,z,B,ne){return $(o,_,z,!1,B,ne)},De.jsxs=function(o,_,z,B,ne){return $(o,_,z,!0,B,ne)}}()),De}var Ze;function Mt(){return Ze||(Ze=1,process.env.NODE_ENV==="production"?Me.exports=Dt():Me.exports=wt()),Me.exports}var W=Mt();function ye(s,c,t){let r=t.initialDeps??[],n;function e(){var a,i,d,h;let v;t.key&&((a=t.debug)!=null&&a.call(t))&&(v=Date.now());const p=s();if(!(p.length!==r.length||p.some(($,u)=>r[u]!==$)))return n;r=p;let g;if(t.key&&((i=t.debug)!=null&&i.call(t))&&(g=Date.now()),n=c(...p),t.key&&((d=t.debug)!=null&&d.call(t))){const $=Math.round((Date.now()-v)*100)/100,u=Math.round((Date.now()-g)*100)/100,w=u/16,T=(R,M)=>{for(R=String(R);R.length<M;)R=" "+R;return R};console.info(`%c⏱ ${T(u,5)} /${T($,5)} ms`,`
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("react/jsx-runtime"),j=require("react"),Xt=require("react-dom");function Zt(s){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const n in s)if(n!=="default"){const e=Object.getOwnPropertyDescriptor(s,n);Object.defineProperty(a,n,e.get?e:{enumerable:!0,get:()=>s[n]})}}return a.default=s,Object.freeze(a)}const $t=Zt(j),vt=38,Jt=5,K={day:{labelUnit:"day",tickUnit:"hour",unitPerTick:1,dragStepUnit:"hour",dragStepAmount:1,basePxPerDragStep:32,formatTickLabel:s=>s.format("hh"),formatHeaderLabel:s=>s.format("MMM D")},week:{labelUnit:"month",tickUnit:"day",unitPerTick:1,dragStepUnit:"hour",dragStepAmount:6,basePxPerDragStep:54,formatTickLabel:s=>s.format("D"),formatHeaderLabel:s=>s.format("MMM")},month:{labelUnit:"month",tickUnit:"day",unitPerTick:1,dragStepUnit:"day",dragStepAmount:1,basePxPerDragStep:32,formatTickLabel:s=>s.format("D"),formatHeaderLabel:s=>s.format("MMM YYYY")},year:{labelUnit:"month",tickUnit:"month",unitPerTick:1,dragStepUnit:"day",dragStepAmount:7,basePxPerDragStep:28,formatTickLabel:s=>s.format("D"),formatHeaderLabel:s=>s.format("MMM YYYY")}},yt=s=>{let a;const n=new Set,e=(c,d)=>{const f=typeof c=="function"?c(a):c;if(!Object.is(f,a)){const h=a;a=d??(typeof f!="object"||f===null)?f:Object.assign({},a,f),n.forEach(y=>y(a,h))}},r=()=>a,i={setState:e,getState:r,getInitialState:()=>u,subscribe:c=>(n.add(c),()=>n.delete(c))},u=a=s(e,r,i);return i},Kt=(s=>s?yt(s):yt),Qt=s=>s;function te(s,a=Qt){const n=j.useSyncExternalStore(s.subscribe,j.useCallback(()=>a(s.getState()),[s,a]),j.useCallback(()=>a(s.getInitialState()),[s,a]));return j.useDebugValue(n),n}const ee=s=>{const a=Kt(s),n=e=>te(a,e);return Object.assign(n,a),n},ne=(s=>ee);function Vt(s,a){let n;try{n=s()}catch{return}return{getItem:r=>{var t;const o=u=>u===null?null:JSON.parse(u,void 0),i=(t=n.getItem(r))!=null?t:null;return i instanceof Promise?i.then(o):o(i)},setItem:(r,t)=>n.setItem(r,JSON.stringify(t,void 0)),removeItem:r=>n.removeItem(r)}}const St=s=>a=>{try{const n=s(a);return n instanceof Promise?n:{then(e){return St(e)(n)},catch(e){return this}}}catch(n){return{then(e){return this},catch(e){return St(e)(n)}}}},re=(s,a)=>(n,e,r)=>{let t={storage:Vt(()=>localStorage),partialize:l=>l,version:0,merge:(l,v)=>({...v,...l}),...a},o=!1;const i=new Set,u=new Set;let c=t.storage;if(!c)return s((...l)=>{console.warn(`[zustand persist middleware] Unable to update item '${t.name}', the given storage is currently unavailable.`),n(...l)},e,r);const d=()=>{const l=t.partialize({...e()});return c.setItem(t.name,{state:l,version:t.version})},f=r.setState;r.setState=(l,v)=>(f(l,v),d());const h=s((...l)=>(n(...l),d()),e,r);r.getInitialState=()=>h;let y;const S=()=>{var l,v;if(!c)return;o=!1,i.forEach(D=>{var x;return D((x=e())!=null?x:h)});const p=((v=t.onRehydrateStorage)==null?void 0:v.call(t,(l=e())!=null?l:h))||void 0;return St(c.getItem.bind(c))(t.name).then(D=>{if(D)if(typeof D.version=="number"&&D.version!==t.version){if(t.migrate){const x=t.migrate(D.state,D.version);return x instanceof Promise?x.then(z=>[!0,z]):[!0,x]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,D.state];return[!1,void 0]}).then(D=>{var x;const[z,R]=D;if(y=t.merge(R,(x=e())!=null?x:h),n(y,!0),z)return d()}).then(()=>{p==null||p(y,void 0),y=e(),o=!0,u.forEach(D=>D(y))}).catch(D=>{p==null||p(void 0,D)})};return r.persist={setOptions:l=>{t={...t,...l},l.storage&&(c=l.storage)},clearStorage:()=>{c==null||c.removeItem(t.name)},getOptions:()=>t,rehydrate:()=>S(),hasHydrated:()=>o,onHydrate:l=>(i.add(l),()=>{i.delete(l)}),onFinishHydration:l=>(u.add(l),()=>{u.delete(l)})},t.skipHydration||S(),y||h},se=re,q=ne()(se((s,a)=>({rawTasks:[],transformedTasks:[],bottomRowCells:[],selectedScale:"month",currentTask:null,dragOffsets:{},setCurrentTask:n=>s({currentTask:n}),setSelectedScale:n=>s({selectedScale:n}),setRawTasks:n=>s({rawTasks:n}),setBottomRowCells:n=>s({bottomRowCells:n}),setTransformedTasks:n=>s({transformedTasks:n}),setDragOffset:(n,e)=>s(r=>({dragOffsets:{...r.dragOffsets,[n]:e}})),clearDragOffset:n=>s(e=>{const{[n]:r,...t}=e.dragOffsets;return{dragOffsets:t}}),getCurrentDragOffset:n=>a().dragOffsets[n]||null,getTotalWidth:()=>a().bottomRowCells.reduce((e,r)=>e+r.widthPx,0)}),{name:"gantt-storage",storage:Vt(()=>sessionStorage),partialize:s=>({selectedScale:s.selectedScale})}));function B(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var st={exports:{}},ie=st.exports,xt;function oe(){return xt||(xt=1,(function(s,a){(function(n,e){s.exports=e()})(ie,(function(){var n=1e3,e=6e4,r=36e5,t="millisecond",o="second",i="minute",u="hour",c="day",d="week",f="month",h="quarter",y="year",S="date",l="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,p=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,D={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(E){var O=["th","st","nd","rd"],b=E%100;return"["+E+(O[(b-20)%10]||O[b]||O[0])+"]"}},x=function(E,O,b){var I=String(E);return!I||I.length>=O?E:""+Array(O+1-I.length).join(b)+E},z={s:x,z:function(E){var O=-E.utcOffset(),b=Math.abs(O),I=Math.floor(b/60),M=b%60;return(O<=0?"+":"-")+x(I,2,"0")+":"+x(M,2,"0")},m:function E(O,b){if(O.date()<b.date())return-E(b,O);var I=12*(b.year()-O.year())+(b.month()-O.month()),M=O.clone().add(I,f),C=b-M<0,L=O.clone().add(I+(C?-1:1),f);return+(-(I+(b-M)/(C?M-L:L-M))||0)},a:function(E){return E<0?Math.ceil(E)||0:Math.floor(E)},p:function(E){return{M:f,y,w:d,d:c,D:S,h:u,m:i,s:o,ms:t,Q:h}[E]||String(E||"").toLowerCase().replace(/s$/,"")},u:function(E){return E===void 0}},R="en",k={};k[R]=D;var w="$isDayjsObject",$=function(E){return E instanceof W||!(!E||!E[w])},g=function E(O,b,I){var M;if(!O)return R;if(typeof O=="string"){var C=O.toLowerCase();k[C]&&(M=C),b&&(k[C]=b,M=C);var L=O.split("-");if(!M&&L.length>1)return E(L[0])}else{var _=O.name;k[_]=O,M=_}return!I&&M&&(R=M),M||!I&&R},m=function(E,O){if($(E))return E.clone();var b=typeof O=="object"?O:{};return b.date=E,b.args=arguments,new W(b)},T=z;T.l=g,T.i=$,T.w=function(E,O){return m(E,{locale:O.$L,utc:O.$u,x:O.$x,$offset:O.$offset})};var W=(function(){function E(b){this.$L=g(b.locale,null,!0),this.parse(b),this.$x=this.$x||b.x||{},this[w]=!0}var O=E.prototype;return O.parse=function(b){this.$d=(function(I){var M=I.date,C=I.utc;if(M===null)return new Date(NaN);if(T.u(M))return new Date;if(M instanceof Date)return new Date(M);if(typeof M=="string"&&!/Z$/i.test(M)){var L=M.match(v);if(L){var _=L[2]-1||0,A=(L[7]||"0").substring(0,3);return C?new Date(Date.UTC(L[1],_,L[3]||1,L[4]||0,L[5]||0,L[6]||0,A)):new Date(L[1],_,L[3]||1,L[4]||0,L[5]||0,L[6]||0,A)}}return new Date(M)})(b),this.init()},O.init=function(){var b=this.$d;this.$y=b.getFullYear(),this.$M=b.getMonth(),this.$D=b.getDate(),this.$W=b.getDay(),this.$H=b.getHours(),this.$m=b.getMinutes(),this.$s=b.getSeconds(),this.$ms=b.getMilliseconds()},O.$utils=function(){return T},O.isValid=function(){return this.$d.toString()!==l},O.isSame=function(b,I){var M=m(b);return this.startOf(I)<=M&&M<=this.endOf(I)},O.isAfter=function(b,I){return m(b)<this.startOf(I)},O.isBefore=function(b,I){return this.endOf(I)<m(b)},O.$g=function(b,I,M){return T.u(b)?this[I]:this.set(M,b)},O.unix=function(){return Math.floor(this.valueOf()/1e3)},O.valueOf=function(){return this.$d.getTime()},O.startOf=function(b,I){var M=this,C=!!T.u(I)||I,L=T.p(b),_=function(Z,U){var G=T.w(M.$u?Date.UTC(M.$y,U,Z):new Date(M.$y,U,Z),M);return C?G:G.endOf(c)},A=function(Z,U){return T.w(M.toDate()[Z].apply(M.toDate("s"),(C?[0,0,0,0]:[23,59,59,999]).slice(U)),M)},F=this.$W,Y=this.$M,V=this.$D,Q="set"+(this.$u?"UTC":"");switch(L){case y:return C?_(1,0):_(31,11);case f:return C?_(1,Y):_(0,Y+1);case d:var X=this.$locale().weekStart||0,et=(F<X?F+7:F)-X;return _(C?V-et:V+(6-et),Y);case c:case S:return A(Q+"Hours",0);case u:return A(Q+"Minutes",1);case i:return A(Q+"Seconds",2);case o:return A(Q+"Milliseconds",3);default:return this.clone()}},O.endOf=function(b){return this.startOf(b,!1)},O.$set=function(b,I){var M,C=T.p(b),L="set"+(this.$u?"UTC":""),_=(M={},M[c]=L+"Date",M[S]=L+"Date",M[f]=L+"Month",M[y]=L+"FullYear",M[u]=L+"Hours",M[i]=L+"Minutes",M[o]=L+"Seconds",M[t]=L+"Milliseconds",M)[C],A=C===c?this.$D+(I-this.$W):I;if(C===f||C===y){var F=this.clone().set(S,1);F.$d[_](A),F.init(),this.$d=F.set(S,Math.min(this.$D,F.daysInMonth())).$d}else _&&this.$d[_](A);return this.init(),this},O.set=function(b,I){return this.clone().$set(b,I)},O.get=function(b){return this[T.p(b)]()},O.add=function(b,I){var M,C=this;b=Number(b);var L=T.p(I),_=function(Y){var V=m(C);return T.w(V.date(V.date()+Math.round(Y*b)),C)};if(L===f)return this.set(f,this.$M+b);if(L===y)return this.set(y,this.$y+b);if(L===c)return _(1);if(L===d)return _(7);var A=(M={},M[i]=e,M[u]=r,M[o]=n,M)[L]||1,F=this.$d.getTime()+b*A;return T.w(F,this)},O.subtract=function(b,I){return this.add(-1*b,I)},O.format=function(b){var I=this,M=this.$locale();if(!this.isValid())return M.invalidDate||l;var C=b||"YYYY-MM-DDTHH:mm:ssZ",L=T.z(this),_=this.$H,A=this.$m,F=this.$M,Y=M.weekdays,V=M.months,Q=M.meridiem,X=function(U,G,nt,rt){return U&&(U[G]||U(I,C))||nt[G].slice(0,rt)},et=function(U){return T.s(_%12||12,U,"0")},Z=Q||function(U,G,nt){var rt=U<12?"AM":"PM";return nt?rt.toLowerCase():rt};return C.replace(p,(function(U,G){return G||(function(nt){switch(nt){case"YY":return String(I.$y).slice(-2);case"YYYY":return T.s(I.$y,4,"0");case"M":return F+1;case"MM":return T.s(F+1,2,"0");case"MMM":return X(M.monthsShort,F,V,3);case"MMMM":return X(V,F);case"D":return I.$D;case"DD":return T.s(I.$D,2,"0");case"d":return String(I.$W);case"dd":return X(M.weekdaysMin,I.$W,Y,2);case"ddd":return X(M.weekdaysShort,I.$W,Y,3);case"dddd":return Y[I.$W];case"H":return String(_);case"HH":return T.s(_,2,"0");case"h":return et(1);case"hh":return et(2);case"a":return Z(_,A,!0);case"A":return Z(_,A,!1);case"m":return String(A);case"mm":return T.s(A,2,"0");case"s":return String(I.$s);case"ss":return T.s(I.$s,2,"0");case"SSS":return T.s(I.$ms,3,"0");case"Z":return L}return null})(U)||L.replace(":","")}))},O.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},O.diff=function(b,I,M){var C,L=this,_=T.p(I),A=m(b),F=(A.utcOffset()-this.utcOffset())*e,Y=this-A,V=function(){return T.m(L,A)};switch(_){case y:C=V()/12;break;case f:C=V();break;case h:C=V()/3;break;case d:C=(Y-F)/6048e5;break;case c:C=(Y-F)/864e5;break;case u:C=Y/r;break;case i:C=Y/e;break;case o:C=Y/n;break;default:C=Y}return M?C:T.a(C)},O.daysInMonth=function(){return this.endOf(f).$D},O.$locale=function(){return k[this.$L]},O.locale=function(b,I){if(!b)return this.$L;var M=this.clone(),C=g(b,I,!0);return C&&(M.$L=C),M},O.clone=function(){return T.w(this.$d,this)},O.toDate=function(){return new Date(this.valueOf())},O.toJSON=function(){return this.isValid()?this.toISOString():null},O.toISOString=function(){return this.$d.toISOString()},O.toString=function(){return this.$d.toUTCString()},E})(),H=W.prototype;return m.prototype=H,[["$ms",t],["$s",o],["$m",i],["$H",u],["$W",c],["$M",f],["$y",y],["$D",S]].forEach((function(E){H[E[1]]=function(O){return this.$g(O,E[0],E[1])}})),m.extend=function(E,O){return E.$i||(E(O,W,m),E.$i=!0),m},m.locale=g,m.isDayjs=$,m.unix=function(E){return m(1e3*E)},m.en=k[R],m.Ls=k,m.p={},m}))})(st)),st.exports}var ae=oe();const N=B(ae);var it={exports:{}},ue=it.exports,bt;function ce(){return bt||(bt=1,(function(s,a){(function(n,e){s.exports=e()})(ue,(function(){var n,e,r=1e3,t=6e4,o=36e5,i=864e5,u=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,c=31536e6,d=2628e6,f=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,h={years:c,months:d,days:i,hours:o,minutes:t,seconds:r,milliseconds:1,weeks:6048e5},y=function(k){return k instanceof z},S=function(k,w,$){return new z(k,$,w.$l)},l=function(k){return e.p(k)+"s"},v=function(k){return k<0},p=function(k){return v(k)?Math.ceil(k):Math.floor(k)},D=function(k){return Math.abs(k)},x=function(k,w){return k?v(k)?{negative:!0,format:""+D(k)+w}:{negative:!1,format:""+k+w}:{negative:!1,format:""}},z=(function(){function k($,g,m){var T=this;if(this.$d={},this.$l=m,$===void 0&&(this.$ms=0,this.parseFromMilliseconds()),g)return S($*h[l(g)],this);if(typeof $=="number")return this.$ms=$,this.parseFromMilliseconds(),this;if(typeof $=="object")return Object.keys($).forEach((function(E){T.$d[l(E)]=$[E]})),this.calMilliseconds(),this;if(typeof $=="string"){var W=$.match(f);if(W){var H=W.slice(2).map((function(E){return E!=null?Number(E):0}));return this.$d.years=H[0],this.$d.months=H[1],this.$d.weeks=H[2],this.$d.days=H[3],this.$d.hours=H[4],this.$d.minutes=H[5],this.$d.seconds=H[6],this.calMilliseconds(),this}}return this}var w=k.prototype;return w.calMilliseconds=function(){var $=this;this.$ms=Object.keys(this.$d).reduce((function(g,m){return g+($.$d[m]||0)*h[m]}),0)},w.parseFromMilliseconds=function(){var $=this.$ms;this.$d.years=p($/c),$%=c,this.$d.months=p($/d),$%=d,this.$d.days=p($/i),$%=i,this.$d.hours=p($/o),$%=o,this.$d.minutes=p($/t),$%=t,this.$d.seconds=p($/r),$%=r,this.$d.milliseconds=$},w.toISOString=function(){var $=x(this.$d.years,"Y"),g=x(this.$d.months,"M"),m=+this.$d.days||0;this.$d.weeks&&(m+=7*this.$d.weeks);var T=x(m,"D"),W=x(this.$d.hours,"H"),H=x(this.$d.minutes,"M"),E=this.$d.seconds||0;this.$d.milliseconds&&(E+=this.$d.milliseconds/1e3,E=Math.round(1e3*E)/1e3);var O=x(E,"S"),b=$.negative||g.negative||T.negative||W.negative||H.negative||O.negative,I=W.format||H.format||O.format?"T":"",M=(b?"-":"")+"P"+$.format+g.format+T.format+I+W.format+H.format+O.format;return M==="P"||M==="-P"?"P0D":M},w.toJSON=function(){return this.toISOString()},w.format=function($){var g=$||"YYYY-MM-DDTHH:mm:ss",m={Y:this.$d.years,YY:e.s(this.$d.years,2,"0"),YYYY:e.s(this.$d.years,4,"0"),M:this.$d.months,MM:e.s(this.$d.months,2,"0"),D:this.$d.days,DD:e.s(this.$d.days,2,"0"),H:this.$d.hours,HH:e.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:e.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:e.s(this.$d.seconds,2,"0"),SSS:e.s(this.$d.milliseconds,3,"0")};return g.replace(u,(function(T,W){return W||String(m[T])}))},w.as=function($){return this.$ms/h[l($)]},w.get=function($){var g=this.$ms,m=l($);return m==="milliseconds"?g%=1e3:g=m==="weeks"?p(g/h[m]):this.$d[m],g||0},w.add=function($,g,m){var T;return T=g?$*h[l(g)]:y($)?$.$ms:S($,this).$ms,S(this.$ms+T*(m?-1:1),this)},w.subtract=function($,g){return this.add($,g,!0)},w.locale=function($){var g=this.clone();return g.$l=$,g},w.clone=function(){return S(this.$ms,this)},w.humanize=function($){return n().add(this.$ms,"ms").locale(this.$l).fromNow(!$)},w.valueOf=function(){return this.asMilliseconds()},w.milliseconds=function(){return this.get("milliseconds")},w.asMilliseconds=function(){return this.as("milliseconds")},w.seconds=function(){return this.get("seconds")},w.asSeconds=function(){return this.as("seconds")},w.minutes=function(){return this.get("minutes")},w.asMinutes=function(){return this.as("minutes")},w.hours=function(){return this.get("hours")},w.asHours=function(){return this.as("hours")},w.days=function(){return this.get("days")},w.asDays=function(){return this.as("days")},w.weeks=function(){return this.get("weeks")},w.asWeeks=function(){return this.as("weeks")},w.months=function(){return this.get("months")},w.asMonths=function(){return this.as("months")},w.years=function(){return this.get("years")},w.asYears=function(){return this.as("years")},k})(),R=function(k,w,$){return k.add(w.years()*$,"y").add(w.months()*$,"M").add(w.days()*$,"d").add(w.hours()*$,"h").add(w.minutes()*$,"m").add(w.seconds()*$,"s").add(w.milliseconds()*$,"ms")};return function(k,w,$){n=$,e=$().$utils(),$.duration=function(T,W){var H=$.locale();return S(T,{$l:H},W)},$.isDuration=y;var g=w.prototype.add,m=w.prototype.subtract;w.prototype.add=function(T,W){return y(T)?R(this,T,1):g.bind(this)(T,W)},w.prototype.subtract=function(T,W){return y(T)?R(this,T,-1):m.bind(this)(T,W)}}}))})(it)),it.exports}var le=ce();const fe=B(le);var ot={exports:{}},de=ot.exports,wt;function he(){return wt||(wt=1,(function(s,a){(function(n,e){s.exports=e()})(de,(function(){return function(n,e,r){e.prototype.isBetween=function(t,o,i,u){var c=r(t),d=r(o),f=(u=u||"()")[0]==="(",h=u[1]===")";return(f?this.isAfter(c,i):!this.isBefore(c,i))&&(h?this.isBefore(d,i):!this.isAfter(d,i))||(f?this.isBefore(c,i):!this.isAfter(c,i))&&(h?this.isAfter(d,i):!this.isBefore(d,i))}}}))})(ot)),ot.exports}var me=he();const ge=B(me);var at={exports:{}},pe=at.exports,Mt;function $e(){return Mt||(Mt=1,(function(s,a){(function(n,e){s.exports=e()})(pe,(function(){var n="day";return function(e,r,t){var o=function(c){return c.add(4-c.isoWeekday(),n)},i=r.prototype;i.isoWeekYear=function(){return o(this).year()},i.isoWeek=function(c){if(!this.$utils().u(c))return this.add(7*(c-this.isoWeek()),n);var d,f,h,y,S=o(this),l=(d=this.isoWeekYear(),f=this.$u,h=(f?t.utc:t)().year(d).startOf("year"),y=4-h.isoWeekday(),h.isoWeekday()>4&&(y+=7),h.add(y,n));return S.diff(l,"week")+1},i.isoWeekday=function(c){return this.$utils().u(c)?this.day()||7:this.day(this.day()%7?c:c-7)};var u=i.startOf;i.startOf=function(c,d){var f=this.$utils(),h=!!f.u(d)||d;return f.p(c)==="isoweek"?h?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):u.bind(this)(c,d)}}}))})(at)),at.exports}var ve=$e();const Se=B(ve);var ut={exports:{}},ye=ut.exports,Dt;function xe(){return Dt||(Dt=1,(function(s,a){(function(n,e){s.exports=e()})(ye,(function(){return function(n,e){e.prototype.isSameOrAfter=function(r,t){return this.isSame(r,t)||this.isAfter(r,t)}}}))})(ut)),ut.exports}var be=xe();const we=B(be);var ct={exports:{}},Me=ct.exports,Ot;function De(){return Ot||(Ot=1,(function(s,a){(function(n,e){s.exports=e()})(Me,(function(){return function(n,e){e.prototype.isSameOrBefore=function(r,t){return this.isSame(r,t)||this.isBefore(r,t)}}}))})(ct)),ct.exports}var Oe=De();const ke=B(Oe);var lt={exports:{}},Te=lt.exports,kt;function Ee(){return kt||(kt=1,(function(s,a){(function(n,e){s.exports=e()})(Te,(function(){return function(n,e,r){e.prototype.isToday=function(){var t="YYYY-MM-DD",o=r();return this.format(t)===o.format(t)}}}))})(lt)),lt.exports}var Ie=Ee();const ze=B(Ie);var ft={exports:{}},Ce=ft.exports,Tt;function Le(){return Tt||(Tt=1,(function(s,a){(function(n,e){s.exports=e()})(Ce,(function(){return function(n,e,r){var t=e.prototype,o=function(f){return f&&(f.indexOf?f:f.s)},i=function(f,h,y,S,l){var v=f.name?f:f.$locale(),p=o(v[h]),D=o(v[y]),x=p||D.map((function(R){return R.slice(0,S)}));if(!l)return x;var z=v.weekStart;return x.map((function(R,k){return x[(k+(z||0))%7]}))},u=function(){return r.Ls[r.locale()]},c=function(f,h){return f.formats[h]||(function(y){return y.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(S,l,v){return l||v.slice(1)}))})(f.formats[h.toUpperCase()])},d=function(){var f=this;return{months:function(h){return h?h.format("MMMM"):i(f,"months")},monthsShort:function(h){return h?h.format("MMM"):i(f,"monthsShort","months",3)},firstDayOfWeek:function(){return f.$locale().weekStart||0},weekdays:function(h){return h?h.format("dddd"):i(f,"weekdays")},weekdaysMin:function(h){return h?h.format("dd"):i(f,"weekdaysMin","weekdays",2)},weekdaysShort:function(h){return h?h.format("ddd"):i(f,"weekdaysShort","weekdays",3)},longDateFormat:function(h){return c(f.$locale(),h)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};t.localeData=function(){return d.bind(this)()},r.localeData=function(){var f=u();return{firstDayOfWeek:function(){return f.weekStart||0},weekdays:function(){return r.weekdays()},weekdaysShort:function(){return r.weekdaysShort()},weekdaysMin:function(){return r.weekdaysMin()},months:function(){return r.months()},monthsShort:function(){return r.monthsShort()},longDateFormat:function(h){return c(f,h)},meridiem:f.meridiem,ordinal:f.ordinal}},r.months=function(){return i(u(),"months")},r.monthsShort=function(){return i(u(),"monthsShort","months",3)},r.weekdays=function(f){return i(u(),"weekdays",null,null,f)},r.weekdaysShort=function(f){return i(u(),"weekdaysShort","weekdays",3,f)},r.weekdaysMin=function(f){return i(u(),"weekdaysMin","weekdays",2,f)}}}))})(ft)),ft.exports}var Re=Le();const Pe=B(Re);var dt={exports:{}},_e=dt.exports,Et;function je(){return Et||(Et=1,(function(s,a){(function(n,e){s.exports=e()})(_e,(function(){return function(n,e,r){var t=function(o,i){if(!i||!i.length||i.length===1&&!i[0]||i.length===1&&Array.isArray(i[0])&&!i[0].length)return null;var u;i.length===1&&i[0].length>0&&(i=i[0]),u=(i=i.filter((function(d){return d})))[0];for(var c=1;c<i.length;c+=1)i[c].isValid()&&!i[c][o](u)||(u=i[c]);return u};r.max=function(){var o=[].slice.call(arguments,0);return t("isAfter",o)},r.min=function(){var o=[].slice.call(arguments,0);return t("isBefore",o)}}}))})(dt)),dt.exports}var We=je();const Ne=B(We);var ht={exports:{}},Ae=ht.exports,It;function Fe(){return It||(It=1,(function(s,a){(function(n,e){s.exports=e()})(Ae,(function(){var n={year:0,month:1,day:2,hour:3,minute:4,second:5},e={};return function(r,t,o){var i,u=function(h,y,S){S===void 0&&(S={});var l=new Date(h),v=(function(p,D){D===void 0&&(D={});var x=D.timeZoneName||"short",z=p+"|"+x,R=e[z];return R||(R=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:p,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:x}),e[z]=R),R})(y,S);return v.formatToParts(l)},c=function(h,y){for(var S=u(h,y),l=[],v=0;v<S.length;v+=1){var p=S[v],D=p.type,x=p.value,z=n[D];z>=0&&(l[z]=parseInt(x,10))}var R=l[3],k=R===24?0:R,w=l[0]+"-"+l[1]+"-"+l[2]+" "+k+":"+l[4]+":"+l[5]+":000",$=+h;return(o.utc(w).valueOf()-($-=$%1e3))/6e4},d=t.prototype;d.tz=function(h,y){h===void 0&&(h=i);var S,l=this.utcOffset(),v=this.toDate(),p=v.toLocaleString("en-US",{timeZone:h}),D=Math.round((v-new Date(p))/1e3/60),x=15*-Math.round(v.getTimezoneOffset()/15)-D;if(!Number(x))S=this.utcOffset(0,y);else if(S=o(p,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(x,!0),y){var z=S.utcOffset();S=S.add(l-z,"minute")}return S.$x.$timezone=h,S},d.offsetName=function(h){var y=this.$x.$timezone||o.tz.guess(),S=u(this.valueOf(),y,{timeZoneName:h}).find((function(l){return l.type.toLowerCase()==="timezonename"}));return S&&S.value};var f=d.startOf;d.startOf=function(h,y){if(!this.$x||!this.$x.$timezone)return f.call(this,h,y);var S=o(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return f.call(S,h,y).tz(this.$x.$timezone,!0)},o.tz=function(h,y,S){var l=S&&y,v=S||y||i,p=c(+o(),v);if(typeof h!="string")return o(h).tz(v);var D=(function(k,w,$){var g=k-60*w*1e3,m=c(g,$);if(w===m)return[g,w];var T=c(g-=60*(m-w)*1e3,$);return m===T?[g,m]:[k-60*Math.min(m,T)*1e3,Math.max(m,T)]})(o.utc(h,l).valueOf(),p,v),x=D[0],z=D[1],R=o(x).utcOffset(z);return R.$x.$timezone=v,R},o.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},o.tz.setDefault=function(h){i=h}}}))})(ht)),ht.exports}var He=Fe();const Ye=B(He);var mt={exports:{}},Ue=mt.exports,zt;function qe(){return zt||(zt=1,(function(s,a){(function(n,e){s.exports=e()})(Ue,(function(){return function(n,e,r){r.updateLocale=function(t,o){var i=r.Ls[t];if(i)return(o?Object.keys(o):[]).forEach((function(u){i[u]=o[u]})),i}}}))})(mt)),mt.exports}var Be=qe();const Ve=B(Be);var gt={exports:{}},Ge=gt.exports,Ct;function Xe(){return Ct||(Ct=1,(function(s,a){(function(n,e){s.exports=e()})(Ge,(function(){var n="minute",e=/[+-]\d\d(?::?\d\d)?/g,r=/([+-]|\d\d)/g;return function(t,o,i){var u=o.prototype;i.utc=function(l){var v={date:l,utc:!0,args:arguments};return new o(v)},u.utc=function(l){var v=i(this.toDate(),{locale:this.$L,utc:!0});return l?v.add(this.utcOffset(),n):v},u.local=function(){return i(this.toDate(),{locale:this.$L,utc:!1})};var c=u.parse;u.parse=function(l){l.utc&&(this.$u=!0),this.$utils().u(l.$offset)||(this.$offset=l.$offset),c.call(this,l)};var d=u.init;u.init=function(){if(this.$u){var l=this.$d;this.$y=l.getUTCFullYear(),this.$M=l.getUTCMonth(),this.$D=l.getUTCDate(),this.$W=l.getUTCDay(),this.$H=l.getUTCHours(),this.$m=l.getUTCMinutes(),this.$s=l.getUTCSeconds(),this.$ms=l.getUTCMilliseconds()}else d.call(this)};var f=u.utcOffset;u.utcOffset=function(l,v){var p=this.$utils().u;if(p(l))return this.$u?0:p(this.$offset)?f.call(this):this.$offset;if(typeof l=="string"&&(l=(function(R){R===void 0&&(R="");var k=R.match(e);if(!k)return null;var w=(""+k[0]).match(r)||["-",0,0],$=w[0],g=60*+w[1]+ +w[2];return g===0?0:$==="+"?g:-g})(l),l===null))return this;var D=Math.abs(l)<=16?60*l:l;if(D===0)return this.utc(v);var x=this.clone();if(v)return x.$offset=D,x.$u=!1,x;var z=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(x=this.local().add(D+z,n)).$offset=D,x.$x.$localOffset=z,x};var h=u.format;u.format=function(l){var v=l||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return h.call(this,v)},u.valueOf=function(){var l=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*l},u.isUTC=function(){return!!this.$u},u.toISOString=function(){return this.toDate().toISOString()},u.toString=function(){return this.toDate().toUTCString()};var y=u.toDate;u.toDate=function(l){return l==="s"&&this.$offset?i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():y.call(this)};var S=u.diff;u.diff=function(l,v,p){if(l&&this.$u===l.$u)return S.call(this,l,v,p);var D=this.local(),x=i(l).local();return S.call(D,x,v,p)}}}))})(gt)),gt.exports}var Ze=Xe();const Je=B(Ze);var pt={exports:{}},Ke=pt.exports,Lt;function Qe(){return Lt||(Lt=1,(function(s,a){(function(n,e){s.exports=e()})(Ke,(function(){return function(n,e){e.prototype.weekday=function(r){var t=this.$locale().weekStart||0,o=this.$W,i=(o<t?o+7:o)-t;return this.$utils().u(r)?i:this.subtract(i,"day").add(r,"day")}}}))})(pt)),pt.exports}var tn=Qe();const en=B(tn);N.extend(Ne);N.extend(fe);N.extend(en);N.extend(ze);N.extend(Je);N.extend(Ye);N.extend(we);N.extend(ke);N.extend(ge);N.extend(Pe);N.extend(Ve);N.extend(Se);const Rt={minute:1,hour:60,day:1440,week:1440*7,month:1440*30},Pt=10;function nn(s,a){const n=j.useRef(null),e=j.useRef(null),r=j.useRef(a);r.current=a;const t=q(h=>h.selectedScale),o=K[t],{basePxPerDragStep:i,dragStepAmount:u,dragStepUnit:c}=o,d=h=>{const y=h.currentTarget.getBoundingClientRect(),S=h.clientX-y.left;return S<=Pt?"left":S>=y.width-Pt?"right":"bar"};return{onPointerDown:h=>{const y=d(h);e.current=y,n.current={mode:y,initialClientX:h.clientX,initialStartDate:N(s.startDate),initialEndDate:N(s.endDate),initialBarWidth:s.barWidth,dragSteps:0,basePxPerDragStep:i,dragStepAmount:u,dragStepUnit:c,taskId:s.id},q.getState().setCurrentTask(s),h.currentTarget.setPointerCapture(h.pointerId);const S=v=>{const p=n.current;if(!p)return;const D=v.clientX-p.initialClientX,x=Math.round(D/p.basePxPerDragStep);if(x===p.dragSteps)return;p.dragSteps=x;const z=x*p.basePxPerDragStep,R=p.dragStepAmount*Rt[p.dragStepUnit],k=x*R;let w,$,g=0,m=0;switch(p.mode){case"bar":w=p.initialStartDate.add(k,"minute"),$=p.initialEndDate.add(k,"minute"),g=z,m=0;break;case"left":if(w=p.initialStartDate.add(k,"minute"),$=p.initialEndDate,g=z,m=-z,p.initialBarWidth+m<p.basePxPerDragStep)return;break;case"right":if(w=p.initialStartDate,$=p.initialEndDate.add(k,"minute"),g=0,m=z,p.initialBarWidth+m<p.basePxPerDragStep)return;break;default:return}const T={offsetX:g,offsetWidth:m,offsetStartDate:w,offsetEndDate:$};q.getState().setDragOffset(p.taskId,T)},l=()=>{var R;document.removeEventListener("pointermove",S),document.removeEventListener("pointerup",l),document.removeEventListener("pointercancel",l);const v=n.current;if(!v)return;if(v.dragSteps===0){n.current=null,e.current=null,q.getState().setCurrentTask(null),q.getState().clearDragOffset(v.taskId);return}const p=q.getState().rawTasks,D=v.dragStepAmount*Rt[v.dragStepUnit],x=v.dragSteps*D,z=p.map(k=>{if(k.id!==v.taskId)return k;switch(v.mode){case"bar":return{...k,startDate:N(k.startDate).add(x,"minute").toISOString(),endDate:N(k.endDate).add(x,"minute").toISOString()};case"left":return{...k,startDate:N(k.startDate).add(x,"minute").toISOString()};case"right":return{...k,endDate:N(k.endDate).add(x,"minute").toISOString()};default:return k}});q.getState().setRawTasks(z),(R=r.current)==null||R.call(r,z),n.current=null,e.current=null,q.getState().setCurrentTask(null),q.getState().clearDragOffset(v.taskId)};document.addEventListener("pointermove",S),document.addEventListener("pointerup",l),document.addEventListener("pointercancel",l)},dragMode:e.current}}const _t=8,rn={day:"MMM D, h A",week:"MMM D",month:"MMM D",year:"MMM YYYY"};function sn({currentTask:s,onTasksChange:a}){const n=j.useRef(null),{onPointerDown:e,dragMode:r}=nn(s,a),[t,o]=j.useState("grab"),i=q(p=>p.dragOffsets[s.id]),u=q(p=>{var D;return((D=p.currentTask)==null?void 0:D.id)===s.id}),c=q(p=>p.selectedScale),d=(i==null?void 0:i.offsetX)??0,f=(i==null?void 0:i.offsetWidth)??0,h=s.barLeft+d,y=s.barWidth+f,S=j.useCallback(p=>{const D=n.current;if(!D)return;const x=D.getBoundingClientRect(),z=p.clientX-x.left;z<=_t||z>=x.width-_t?o("ew-resize"):o("grab")},[]),l=rn[c],v=p=>{if(!i)return"";const D=i.offsetStartDate.format(l),x=i.offsetEndDate.format(l);switch(p){case"left":return`Start: ${D}`;case"right":return`End: ${x}`;case"bar":default:return`${D} → ${x}`}};return P.jsxs("div",{ref:n,id:`task-${s.id}`,className:`gantt-task-bar${u?" dragging":""}`,onPointerDown:e,onMouseMove:S,onMouseLeave:()=>o("grab"),style:{transform:`translateX(${h}px)`,width:y,height:vt/2,cursor:u?"grabbing":t},role:"button",tabIndex:0,"aria-label":`태스크: ${s.name}`,children:[P.jsx("span",{className:"gantt-task-name",children:s.name}),u&&i&&P.jsx("div",{className:"gantt-bar-tooltip",role:"status","aria-live":"polite",children:v(r)})]})}function on(s){const a=[];for(const n of s){const e=a[a.length-1];e&&e.label===n.label?e.widthPx+=n.widthPx:a.push({...n})}return a}function an(s){let a=0;return s.map(n=>{const e={...n,left:a};return a+=n.widthPx,e})}function un(s){const a=on(s);return an(a)}function jt(s){return s.split(".").map(Number)}function cn(s){return[...s].sort((a,n)=>{const e=jt(a.sequence),r=jt(n.sequence),t=Math.max(e.length,r.length);for(let o=0;o<t;o++){const i=e[o]||0,u=r[o]||0;if(i!==u)return i-u}return 0})}function ln(s){return s.split(".").length-1}function fn(s,a,n){return cn(s).map((r,t)=>{const o=ln(r.sequence),i=t+1,{barMarginLeftAmount:u,barWidthSize:c}=dn(N(r.startDate),N(r.endDate),a,n);return{...r,barLeft:u,barWidth:c,depth:o,order:i,originalOrder:i}})}function dn(s,a,n,e){if(!n.length)return{barMarginLeftAmount:0,barWidthSize:0};const r=K[e],{tickUnit:t,unitPerTick:o}=r;let i=0,u=0,c=!1;const d=s.valueOf(),f=a.valueOf();for(const h of n){const y=h.startDate,S=y.add(o,t),l=h.widthPx,v=y.valueOf(),p=S.valueOf();if(p<=d){i+=l;continue}if(v>=f)break;const D=d>v?s:y,x=f<p?a:S,z=p-v,k=(x.valueOf()-D.valueOf())/z;if(!c&&D.valueOf()>v){const w=(D.valueOf()-v)/z;i+=w*l}u+=k*l,c=!0}return{barMarginLeftAmount:i,barWidthSize:Math.max(u,1)}}function hn(s){let a=1/0,n=-1/0;for(const e of s){const r=N(e.startDate).valueOf(),t=N(e.endDate).valueOf();Number.isNaN(r)||(a=Math.min(a,r)),Number.isNaN(t)||(n=Math.max(n,t))}return{minDate:N(a),maxDate:N(n)}}function mn(s,a,n){const e=K[n],{tickUnit:r,unitPerTick:t}=e,o=Jt*t;return{paddedMinDate:s.subtract(o,r),paddedMaxDate:a.add(o,r)}}function gn(s,a,n){const e=K[n],{tickUnit:r,unitPerTick:t,basePxPerDragStep:o,dragStepUnit:i,dragStepAmount:u}=e,c=[];let d=s.startOf(r);const f=a.valueOf(),h=o/u;for(;d.valueOf()<f;){const y=d.add(t,r),l=y.diff(d,i)*h;c.push({startDate:d,widthPx:l}),d=y}return c}function pn(s,a){const n=K[a],{labelUnit:e,formatHeaderLabel:r}=n;if(s.length===0)return[];const t=[];let o=null;for(const i of s){const u=i.startDate.startOf(e),c=u.valueOf(),d=(r==null?void 0:r(u))??u.format();o&&o.startDate.valueOf()===c?o.widthPx+=i.widthPx:(o&&t.push(o),o={label:d,widthPx:i.widthPx,startDate:u})}return o&&t.push(o),t}function $n(s,a){if(!s.length)return{bottomCells:[],transformedTasks:[]};const{minDate:n,maxDate:e}=hn(s),{paddedMinDate:r,paddedMaxDate:t}=mn(n,e,a),o=gn(r,t,a),i=fn(s,o,a);return{bottomCells:o,transformedTasks:i}}function vn({bottomRowCells:s,selectedScale:a,width:n,scrollRef:e}){const r=K[a],[t,o]=j.useState(0),i=j.useMemo(()=>{const c=pn(s,a);return un(c)},[s,a]),u=j.useCallback(()=>{const c=e.current;if(!c)return;const d=c.scrollLeft;for(let f=i.length-1;f>=0;f--)if(d>=i[f].left){o(f);break}},[i,e]);return j.useEffect(()=>{const c=e.current;if(c)return c.addEventListener("scroll",u,{passive:!0}),u(),()=>c.removeEventListener("scroll",u)},[u,e]),P.jsx("header",{className:"gantt-header",style:{width:`${n}px`},children:P.jsxs("div",{className:"gantt-header-content",children:[P.jsx("div",{className:"gantt-top-header",children:P.jsx("div",{className:"gantt-top-groups",children:i.map((c,d)=>{const f=d===t;return P.jsx("div",{className:`gantt-top-group${f?" sticky":""}`,style:{width:`${c.widthPx}px`,...f&&{left:0}},children:P.jsx("p",{className:"gantt-top-group-label",children:c.label})},`${c.label}-${d}`)})})}),P.jsx("div",{className:"gantt-bottom-row",children:s.map((c,d)=>{var h;const f=((h=r.formatTickLabel)==null?void 0:h.call(r,c.startDate))||"";return P.jsx("div",{className:"gantt-bottom-cell",style:{width:`${c.widthPx}px`},children:f},`bottom-${d}`)})})]})})}function Sn(s,a,n,e,r){if(n<0||r<0)return`M ${a} ${n} h ${(e-a)/2}`;const t=7,o=11,i=25,u=20,c=`M ${a} ${n}`,d=e-a,f=r-n,h=Math.abs(d),y=Math.abs(f),S=r<=n,l=r>=n,v=e>=a,p=e<=a,D=h>u,x=Math.abs(d/2),z=Math.abs(f/2);function R(){function g(){return(v||p)&&l&&!D?"downSmallHorizontal":(v||p)&&S&&!D?"upSmallHorizontal":l&&p?"downLeft":l&&v?"downRight":S&&p?"upLeft":S&&v?"upRight":""}let m=c;switch(g()){case"downRight":{m+=` h ${x-t}`,m+=` a ${t} ${t} 0 0 1 ${t} ${t}`,m+=` v ${f-t*2}`,m+=` a ${t} ${t} 0 0 0 ${t} ${t}`,m+=` h ${x-t}`;break}case"upRight":{m+=` h ${x-t}`,m+=` a ${t} ${t} 0 0 0 ${t} -${t}`,m+=` v -${y-t*2}`,m+=` a ${t} ${t} 0 0 1 ${t} -${t}`,m+=` h ${x-t}`;break}case"downLeft":case"downSmallHorizontal":{const W=n+f/2;m+=` h ${o}`,m+=` a ${t} ${t} 0 0 1 ${t} ${t}`,m+=` v ${W-n-t*2}`,m+=` a ${t} ${t} 0 0 1 -${t} ${t}`,m+=` h ${d-2*o}`,m+=` a ${t} ${t} 0 0 0 -${t} ${t}`,m+=` v ${W-n-t*2}`,m+=` a ${t} ${t} 0 0 0 ${t} ${t}`,m+=` h ${o}`;break}case"upLeft":case"upSmallHorizontal":{const W=n+f/2;m+=` h ${o}`,m+=` a ${t} ${t} 0 0 0 ${t} -${t}`,m+=` v -${n-W-t*2}`,m+=` a ${t} ${t} 0 0 0 -${t} -${t}`,m+=` h ${d-2*o}`,m+=` a ${t} ${t} 0 0 1 -${t} -${t}`,m+=` v -${n-W-t*2}`,m+=` a ${t} ${t} 0 0 1 ${t} -${t}`,m+=` h ${o}`;break}default:return m}return m}function k(){let g=c;return l&&p?(g+=` h ${i-o}`,g+=` a ${t} ${t} 0 0 1 ${t} ${t}`,g+=` v ${f-t*2}`,g+=` a ${t} ${t} 0 0 1 -${t} ${t}`,g+=` h ${d-t*2}`):l&&v?(g+=` h ${d+i-o}`,g+=` a ${t} ${t} 0 0 1 ${t} ${t}`,g+=` v ${f-t*2}`,g+=` a ${t} ${t} 0 0 1 -${t} ${t}`,g+=` h -${i-o}`):S&&p?(g+=` h ${i-o}`,g+=` a ${t} ${t} 0 0 0 ${t} -${t}`,g+=` v ${f+t*2}`,g+=` a ${t} ${t} 0 0 0 -${t} -${t}`,g+=` h ${d-i+o}`):S&&v&&(g+=` h ${d+i-o}`,g+=` a ${t} ${t} 0 0 0 ${t} -${t}`,g+=` v ${f+t*2}`,g+=` a ${t} ${t} 0 0 0 -${t} -${t}`,g+=` h -${i-o}`),g}function w(){function g(){return(v||p)&&l&&!D?"downSmallHorizontal":(v||p)&&S&&!D?"upSmallHorizontal":l&&p?"downLeft":l&&v?"downRight":S&&p?"upLeft":S&&v?"upRight":""}let m=c;switch(g()){case"downRight":case"downSmallHorizontal":{m+=` h ${-o}`,m+=` a ${t} ${t} 0 0 0 -${t} ${t}`,m+=` v ${z-t*2}`,m+=` a ${t} ${t} 0 0 0 ${t} ${t}`,m+=` h ${o*2+d}`,m+=` a ${t} ${t} 0 0 1 ${t} ${t}`,m+=` v ${z-t*2}`,m+=` a ${t} ${t} 0 0 1 -${t} ${t}`,m+=` h ${-o}`;break}case"upRight":case"upSmallHorizontal":{m+=` h ${-o}`,m+=` a ${t} ${t} 0 0 1 -${t} -${t}`,m+=` v ${-(z-t*2)}`,m+=` a ${t} ${t} 0 0 1 ${t} -${t}`,m+=` h ${o*2+d}`,m+=` a ${t} ${t} 0 0 0 ${t} -${t}`,m+=` v ${-(z-t*2)}`,m+=` a ${t} ${t} 0 0 0 -${t} -${t}`,m+=` h ${-o}`;break}case"downLeft":{m+=` h ${-x+t}`,m+=` a ${t} ${t} 0 0 0 -${t} ${t}`,m+=` v ${y-t*2}`,m+=` a ${t} ${t} 0 0 1 -${t} ${t}`,m+=` h ${-x+t}`;break}case"upLeft":{m+=` h ${-(x-t)}`,m+=` a ${t} ${t} 0 0 1 -${t} -${t}`,m+=` v ${-(y-t*2)}`,m+=` a ${t} ${t} 0 0 0 -${t} -${t}`,m+=` h ${-x+t}`;break}default:return m}return m}function $(){let g=c;return l&&p?(g+=` h ${d-i}`,g+=` a ${t} ${t} 0 0 0 -${t} ${t}`,g+=` v ${f-t*2}`,g+=` a ${t} ${t} 0 0 0 ${t} ${t}`,g+=` h ${i}`):l&&v?(g+=` h ${-i}`,g+=` a ${t} ${t} 0 0 0 -${t} ${t}`,g+=` v ${f-t*2}`,g+=` a ${t} ${t} 0 0 0 ${t} ${t}`,g+=` h ${d+i}`):S&&p?(g+=` h ${d-i}`,g+=` a ${t} ${t} 0 0 1 -${t} -${t}`,g+=` v ${f+t*2}`,g+=` a ${t} ${t} 0 0 1 ${t} -${t}`,g+=` h ${i}`):S&&v&&(g+=` h ${-i}`,g+=` a ${t} ${t} 0 0 1 -${t} -${t}`,g+=` v ${f+t*2}`,g+=` a ${t} ${t} 0 0 1 ${t} -${t}`,g+=` h ${d+i}`),g}switch(s){case"FS":return R();case"FF":return k();case"SF":return w();case"SS":return $();default:return`${c} L ${e} ${r}`}}function yn(s,a,n,e){const r=vt,t=s.order-1,o=a.order-1,i=r/2,u=o*r+i,c=t*r+i,d=a.barLeft,f=a.barLeft+a.barWidth,h=s.barLeft+n.offsetX,y=h+s.barWidth+n.offsetWidth,S={FS:[f,h],SS:[d,h],FF:[f,y],SF:[d,y]},[l,v]=S[e];return{fromX:l,fromY:u,toX:v,toY:c}}function xn(s,a){const n=[];for(const e of s){const r=a[e.id]??{offsetX:0,offsetWidth:0};for(const t of e.dependencies??[]){const o=s.find(f=>f.id===t.targetId);if(!o)continue;const{fromX:i,fromY:u,toX:c,toY:d}=yn(e,o,r,t.type);n.push({...t,fromX:i,fromY:u,toX:c,toY:d})}}return n}function bn({transformedTasks:s}){const a=q(e=>e.dragOffsets),n=xn(s,a);return P.jsxs("svg",{className:"gantt-dependency-arrows",style:{height:`${s.length*vt}px`},children:[P.jsx("defs",{children:P.jsx("marker",{id:"arrowhead",markerWidth:"5",markerHeight:"5",refX:"4.5",refY:"2.5",orient:"auto",children:P.jsx("polygon",{className:"gantt-dependency-arrow-head",points:"0 0, 5 2.5, 0 5"})})}),n.map((e,r)=>P.jsx("path",{className:"gantt-dependency-arrow",d:Sn(e.type,e.fromX,e.fromY,e.toX,e.toY),markerEnd:"url(#arrowhead)",fill:"none"},`arrow-${r}`))]})}const J=Object.keys(K);function wn({selectedScale:s,onScaleChange:a}){const n=(e,r)=>{const t=J.indexOf(r);if(e.key==="ArrowRight"||e.key==="ArrowDown"){e.preventDefault();const o=(t+1)%J.length;a(J[o])}else if(e.key==="ArrowLeft"||e.key==="ArrowUp"){e.preventDefault();const o=(t-1+J.length)%J.length;a(J[o])}};return P.jsx("div",{className:"gantt-scale-selector",role:"group","aria-label":"타임라인 스케일 선택",children:P.jsx("div",{className:"gantt-scale-control",children:J.map(e=>{const r=e===s;return P.jsx("button",{type:"button",className:"gantt-scale-button","data-active":r,onClick:()=>a(e),onKeyDown:t=>n(t,e),"aria-pressed":r,tabIndex:r?0:-1,children:e},e)})})})}const Wt=s=>Symbol.iterator in s,Nt=s=>"entries"in s,At=(s,a)=>{const n=s instanceof Map?s:new Map(s.entries()),e=a instanceof Map?a:new Map(a.entries());if(n.size!==e.size)return!1;for(const[r,t]of n)if(!e.has(r)||!Object.is(t,e.get(r)))return!1;return!0},Mn=(s,a)=>{const n=s[Symbol.iterator](),e=a[Symbol.iterator]();let r=n.next(),t=e.next();for(;!r.done&&!t.done;){if(!Object.is(r.value,t.value))return!1;r=n.next(),t=e.next()}return!!r.done&&!!t.done};function Dn(s,a){return Object.is(s,a)?!0:typeof s!="object"||s===null||typeof a!="object"||a===null||Object.getPrototypeOf(s)!==Object.getPrototypeOf(a)?!1:Wt(s)&&Wt(a)?Nt(s)&&Nt(a)?At(s,a):Mn(s,a):At({entries:()=>Object.entries(s)},{entries:()=>Object.entries(a)})}function On(s){const a=j.useRef(void 0);return n=>{const e=s(n);return Dn(a.current,e)?a.current:a.current=e}}function kn(){return q(On(s=>({rawTasks:s.rawTasks,transformedTasks:s.transformedTasks,bottomRowCells:s.bottomRowCells,selectedScale:s.selectedScale,currentTask:s.currentTask,dragOffsets:s.dragOffsets,setRawTasks:s.setRawTasks,setTransformedTasks:s.setTransformedTasks,setBottomRowCells:s.setBottomRowCells,setSelectedScale:s.setSelectedScale,setCurrentTask:s.setCurrentTask,setDragOffset:s.setDragOffset,clearDragOffset:s.clearDragOffset,getTotalWidth:s.getTotalWidth,getCurrentDragOffset:s.getCurrentDragOffset})))}function tt(s,a,n){let e=n.initialDeps??[],r;function t(){var o,i,u,c;let d;n.key&&((o=n.debug)!=null&&o.call(n))&&(d=Date.now());const f=s();if(!(f.length!==e.length||f.some((S,l)=>e[l]!==S)))return r;e=f;let y;if(n.key&&((i=n.debug)!=null&&i.call(n))&&(y=Date.now()),r=a(...f),n.key&&((u=n.debug)!=null&&u.call(n))){const S=Math.round((Date.now()-d)*100)/100,l=Math.round((Date.now()-y)*100)/100,v=l/16,p=(D,x)=>{for(D=String(D);D.length<x;)D=" "+D;return D};console.info(`%c⏱ ${p(l,5)} /${p(S,5)} ms`,`
|
|
32
2
|
font-size: .6rem;
|
|
33
3
|
font-weight: bold;
|
|
34
|
-
color: hsl(${Math.max(0,Math.min(120-120*w,120))}deg 100% 31%);`,t==null?void 0:t.key)}return(h=t==null?void 0:t.onChange)==null||h.call(t,n),n}return e.updateDeps=a=>{r=a},e}function We(s,c){if(s===void 0)throw new Error("Unexpected undefined");return s}const Et=(s,c)=>Math.abs(s-c)<1,It=(s,c,t)=>{let r;return function(...n){s.clearTimeout(r),r=s.setTimeout(()=>c.apply(this,n),t)}},Ot=s=>s,kt=s=>{const c=Math.max(s.startIndex-s.overscan,0),t=Math.min(s.endIndex+s.overscan,s.count-1),r=[];for(let n=c;n<=t;n++)r.push(n);return r},Tt=(s,c)=>{const t=s.scrollElement;if(!t)return;const r=s.targetWindow;if(!r)return;const n=a=>{const{width:i,height:d}=a;c({width:Math.round(i),height:Math.round(d)})};if(n(t.getBoundingClientRect()),!r.ResizeObserver)return()=>{};const e=new r.ResizeObserver(a=>{const i=()=>{const d=a[0];if(d!=null&&d.borderBoxSize){const h=d.borderBoxSize[0];if(h){n({width:h.inlineSize,height:h.blockSize});return}}n(t.getBoundingClientRect())};s.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(i):i()});return e.observe(t,{box:"border-box"}),()=>{e.unobserve(t)}},Je={passive:!0},Ke=typeof window>"u"?!0:"onscrollend"in window,Rt=(s,c)=>{const t=s.scrollElement;if(!t)return;const r=s.targetWindow;if(!r)return;let n=0;const e=s.options.useScrollendEvent&&Ke?()=>{}:It(r,()=>{c(n,!1)},s.options.isScrollingResetDelay),a=v=>()=>{const{horizontal:p,isRtl:f}=s.options;n=p?t.scrollLeft*(f&&-1||1):t.scrollTop,e(),c(n,v)},i=a(!0),d=a(!1);d(),t.addEventListener("scroll",i,Je);const h=s.options.useScrollendEvent&&Ke;return h&&t.addEventListener("scrollend",d,Je),()=>{t.removeEventListener("scroll",i),h&&t.removeEventListener("scrollend",d)}},Ct=(s,c,t)=>{if(c!=null&&c.borderBoxSize){const r=c.borderBoxSize[0];if(r)return Math.round(r[t.options.horizontal?"inlineSize":"blockSize"])}return Math.round(s.getBoundingClientRect()[t.options.horizontal?"width":"height"])},Ft=(s,{adjustments:c=0,behavior:t},r)=>{var n,e;const a=s+c;(e=(n=r.scrollElement)==null?void 0:n.scrollTo)==null||e.call(n,{[r.options.horizontal?"left":"top"]:a,behavior:t})};class _t{constructor(c){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let t=null;const r=()=>t||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:t=new this.targetWindow.ResizeObserver(n=>{n.forEach(e=>{const a=()=>{this._measureElement(e.target,e)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()})}));return{disconnect:()=>{var n;(n=r())==null||n.disconnect(),t=null},observe:n=>{var e;return(e=r())==null?void 0:e.observe(n,{box:"border-box"})},unobserve:n=>{var e;return(e=r())==null?void 0:e.unobserve(n)}}})(),this.range=null,this.setOptions=t=>{Object.entries(t).forEach(([r,n])=>{typeof n>"u"&&delete t[r]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Ot,rangeExtractor:kt,onChange:()=>{},measureElement:Ct,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...t}},this.notify=t=>{var r,n;(n=(r=this.options).onChange)==null||n.call(r,this,t)},this.maybeNotify=ye(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),t=>{this.notify(t)},{key:process.env.NODE_ENV!=="production"&&"maybeNotify",debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(t=>t()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var t;const r=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r){if(this.cleanup(),!r){this.maybeNotify();return}this.scrollElement=r,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((t=this.scrollElement)==null?void 0:t.window)??null,this.elementsCache.forEach(n=>{this.observer.observe(n)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,n=>{this.scrollRect=n,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(n,e)=>{this.scrollAdjustments=0,this.scrollDirection=e?this.getScrollOffset()<n?"forward":"backward":null,this.scrollOffset=n,this.isScrolling=e,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(t,r)=>{const n=new Map,e=new Map;for(let a=r-1;a>=0;a--){const i=t[a];if(n.has(i.lane))continue;const d=e.get(i.lane);if(d==null||i.end>d.end?e.set(i.lane,i):i.end<d.end&&n.set(i.lane,!0),n.size===this.options.lanes)break}return e.size===this.options.lanes?Array.from(e.values()).sort((a,i)=>a.end===i.end?a.index-i.index:a.end-i.end)[0]:void 0},this.getMeasurementOptions=ye(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(t,r,n,e,a)=>(this.pendingMeasuredCacheIndexes=[],{count:t,paddingStart:r,scrollMargin:n,getItemKey:e,enabled:a}),{key:!1}),this.getMeasurements=ye(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:t,paddingStart:r,scrollMargin:n,getItemKey:e,enabled:a},i)=>{if(!a)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(v=>{this.itemSizeCache.set(v.key,v.size)}));const d=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const h=this.measurementsCache.slice(0,d);for(let v=d;v<t;v++){const p=e(v),f=this.options.lanes===1?h[v-1]:this.getFurthestMeasurement(h,v),g=f?f.end+this.options.gap:r+n,$=i.get(p),u=typeof $=="number"?$:this.options.estimateSize(v),w=g+u,T=f?f.lane:v%this.options.lanes;h[v]={index:v,start:g,size:u,end:w,key:p,lane:T}}return this.measurementsCache=h,h},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=ye(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(t,r,n,e)=>this.range=t.length>0&&r>0?zt({measurements:t,outerSize:r,scrollOffset:n,lanes:e}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getVirtualIndexes=ye(()=>{let t=null,r=null;const n=this.calculateRange();return n&&(t=n.startIndex,r=n.endIndex),this.maybeNotify.updateDeps([this.isScrolling,t,r]),[this.options.rangeExtractor,this.options.overscan,this.options.count,t,r]},(t,r,n,e,a)=>e===null||a===null?[]:t({startIndex:e,endIndex:a,overscan:r,count:n}),{key:process.env.NODE_ENV!=="production"&&"getVirtualIndexes",debug:()=>this.options.debug}),this.indexFromElement=t=>{const r=this.options.indexAttribute,n=t.getAttribute(r);return n?parseInt(n,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this._measureElement=(t,r)=>{const n=this.indexFromElement(t),e=this.measurementsCache[n];if(!e)return;const a=e.key,i=this.elementsCache.get(a);i!==t&&(i&&this.observer.unobserve(i),this.observer.observe(t),this.elementsCache.set(a,t)),t.isConnected&&this.resizeItem(n,this.options.measureElement(t,r,this))},this.resizeItem=(t,r)=>{const n=this.measurementsCache[t];if(!n)return;const e=this.itemSizeCache.get(n.key)??n.size,a=r-e;a!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(n,a,this):n.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",a),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=a,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(n.index),this.itemSizeCache=new Map(this.itemSizeCache.set(n.key,r)),this.notify(!1))},this.measureElement=t=>{if(!t){this.elementsCache.forEach((r,n)=>{r.isConnected||(this.observer.unobserve(r),this.elementsCache.delete(n))});return}this._measureElement(t,void 0)},this.getVirtualItems=ye(()=>[this.getVirtualIndexes(),this.getMeasurements()],(t,r)=>{const n=[];for(let e=0,a=t.length;e<a;e++){const i=t[e],d=r[i];n.push(d)}return n},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=t=>{const r=this.getMeasurements();if(r.length!==0)return We(r[vt(0,r.length-1,n=>We(r[n]).start,t)])},this.getOffsetForAlignment=(t,r,n=0)=>{const e=this.getSize(),a=this.getScrollOffset();r==="auto"&&(r=t>=a+e?"end":"start"),r==="center"?t+=(n-e)/2:r==="end"&&(t-=e);const i=this.options.horizontal?"scrollWidth":"scrollHeight",h=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[i]:this.scrollElement[i]:0)-e;return Math.max(Math.min(h,t),0)},this.getOffsetForIndex=(t,r="auto")=>{t=Math.max(0,Math.min(t,this.options.count-1));const n=this.measurementsCache[t];if(!n)return;const e=this.getSize(),a=this.getScrollOffset();if(r==="auto")if(n.end>=a+e-this.options.scrollPaddingEnd)r="end";else if(n.start<=a+this.options.scrollPaddingStart)r="start";else return[a,r];const i=r==="end"?n.end+this.options.scrollPaddingEnd:n.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(i,r,n.size),r]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(t,{align:r="start",behavior:n}={})=>{this.cancelScrollToIndex(),n==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(t,r),{adjustments:void 0,behavior:n})},this.scrollToIndex=(t,{align:r="auto",behavior:n}={})=>{t=Math.max(0,Math.min(t,this.options.count-1)),this.cancelScrollToIndex(),n==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const e=this.getOffsetForIndex(t,r);if(!e)return;const[a,i]=e;this._scrollToOffset(a,{adjustments:void 0,behavior:n}),n!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(t))){const[h]=We(this.getOffsetForIndex(t,i));Et(h,this.getScrollOffset())||this.scrollToIndex(t,{align:i,behavior:n})}else this.scrollToIndex(t,{align:i,behavior:n})}))},this.scrollBy=(t,{behavior:r}={})=>{this.cancelScrollToIndex(),r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+t,{adjustments:void 0,behavior:r})},this.getTotalSize=()=>{var t;const r=this.getMeasurements();let n;if(r.length===0)n=this.options.paddingStart;else if(this.options.lanes===1)n=((t=r[r.length-1])==null?void 0:t.end)??0;else{const e=Array(this.options.lanes).fill(null);let a=r.length-1;for(;a>=0&&e.some(i=>i===null);){const i=r[a];e[i.lane]===null&&(e[i.lane]=i.end),a--}n=Math.max(...e.filter(i=>i!==null))}return Math.max(n-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(t,{adjustments:r,behavior:n})=>{this.options.scrollToFn(t,{behavior:n,adjustments:r},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(c)}}const vt=(s,c,t,r)=>{for(;s<=c;){const n=(s+c)/2|0,e=t(n);if(e<r)s=n+1;else if(e>r)c=n-1;else return n}return s>0?s-1:0};function zt({measurements:s,outerSize:c,scrollOffset:t,lanes:r}){const n=s.length-1,e=d=>s[d].start;if(s.length<=r)return{startIndex:0,endIndex:n};let a=vt(0,n,e,t),i=a;if(r===1)for(;i<n&&s[i].end<t+c;)i++;else if(r>1){const d=Array(r).fill(0);for(;i<n&&d.some(v=>v<t+c);){const v=s[i];d[v.lane]=v.end,i++}const h=Array(r).fill(t+c);for(;a>=0&&h.some(v=>v>=t);){const v=s[a];h[v.lane]=v.start,a--}a=Math.max(0,a-a%r),i=Math.min(n,i+(r-1-i%r))}return{startIndex:a,endIndex:i}}const Qe=typeof document<"u"?Se.useLayoutEffect:Se.useEffect;function jt(s){const c=Se.useReducer(()=>({}),{})[1],t={...s,onChange:(n,e)=>{var a;e?xt.flushSync(c):c(),(a=s.onChange)==null||a.call(s,n,e)}},[r]=Se.useState(()=>new _t(t));return r.setOptions(t),Qe(()=>r._didMount(),[]),Qe(()=>r._willUpdate()),r}function et(s){return jt({observeElementRect:Tt,observeElementOffset:Rt,scrollToFn:Ft,...s})}const Le=38,tt=3,he={day:{labelUnit:"day",tickUnit:"hour",unitPerTick:1,dragStepUnit:"hour",dragStepAmount:1,basePxPerDragStep:32,formatTickLabel:s=>s.format("hh"),formatHeaderLabel:s=>s.format("MMM D")},week:{labelUnit:"month",tickUnit:"day",unitPerTick:1,dragStepUnit:"hour",dragStepAmount:6,basePxPerDragStep:54,formatTickLabel:s=>s.format("D"),formatHeaderLabel:s=>s.format("MMM")},month:{labelUnit:"month",tickUnit:"day",unitPerTick:1,dragStepUnit:"day",dragStepAmount:1,basePxPerDragStep:32,formatTickLabel:s=>s.format("D"),formatHeaderLabel:s=>s.format("MMM YYYY")},year:{labelUnit:"month",tickUnit:"month",unitPerTick:1,dragStepUnit:"day",dragStepAmount:7,basePxPerDragStep:28,formatTickLabel:s=>s.format("D"),formatHeaderLabel:s=>s.format("MMM YYYY")}},nt=s=>{let c;const t=new Set,r=(h,v)=>{const p=typeof h=="function"?h(c):h;if(!Object.is(p,c)){const f=c;c=v??(typeof p!="object"||p===null)?p:Object.assign({},c,p),t.forEach(g=>g(c,f))}},n=()=>c,i={setState:r,getState:n,getInitialState:()=>d,subscribe:h=>(t.add(h),()=>t.delete(h))},d=c=s(r,n,i);return i},Pt=s=>s?nt(s):nt,At=s=>s;function Lt(s,c=At){const t=ee.useSyncExternalStore(s.subscribe,()=>c(s.getState()),()=>c(s.getInitialState()));return ee.useDebugValue(t),t}const qt=s=>{const c=Pt(s),t=r=>Lt(c,r);return Object.assign(t,c),t},Nt=s=>qt;function $t(s,c){let t;try{t=s()}catch{return}return{getItem:n=>{var e;const a=d=>d===null?null:JSON.parse(d,void 0),i=(e=t.getItem(n))!=null?e:null;return i instanceof Promise?i.then(a):a(i)},setItem:(n,e)=>t.setItem(n,JSON.stringify(e,void 0)),removeItem:n=>t.removeItem(n)}}const He=s=>c=>{try{const t=s(c);return t instanceof Promise?t:{then(r){return He(r)(t)},catch(r){return this}}}catch(t){return{then(r){return this},catch(r){return He(r)(t)}}}},Wt=(s,c)=>(t,r,n)=>{let e={storage:$t(()=>localStorage),partialize:u=>u,version:0,merge:(u,w)=>({...w,...u}),...c},a=!1;const i=new Set,d=new Set;let h=e.storage;if(!h)return s((...u)=>{console.warn(`[zustand persist middleware] Unable to update item '${e.name}', the given storage is currently unavailable.`),t(...u)},r,n);const v=()=>{const u=e.partialize({...r()});return h.setItem(e.name,{state:u,version:e.version})},p=n.setState;n.setState=(u,w)=>{p(u,w),v()};const f=s((...u)=>{t(...u),v()},r,n);n.getInitialState=()=>f;let g;const $=()=>{var u,w;if(!h)return;a=!1,i.forEach(R=>{var M;return R((M=r())!=null?M:f)});const T=((w=e.onRehydrateStorage)==null?void 0:w.call(e,(u=r())!=null?u:f))||void 0;return He(h.getItem.bind(h))(e.name).then(R=>{if(R)if(typeof R.version=="number"&&R.version!==e.version){if(e.migrate){const M=e.migrate(R.state,R.version);return M instanceof Promise?M.then(L=>[!0,L]):[!0,M]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,R.state];return[!1,void 0]}).then(R=>{var M;const[L,N]=R;if(g=e.merge(N,(M=r())!=null?M:f),t(g,!0),L)return v()}).then(()=>{T==null||T(g,void 0),g=r(),a=!0,d.forEach(R=>R(g))}).catch(R=>{T==null||T(void 0,R)})};return n.persist={setOptions:u=>{e={...e,...u},u.storage&&(h=u.storage)},clearStorage:()=>{h==null||h.removeItem(e.name)},getOptions:()=>e,rehydrate:()=>$(),hasHydrated:()=>a,onHydrate:u=>(i.add(u),()=>{i.delete(u)}),onFinishHydration:u=>(d.add(u),()=>{d.delete(u)})},e.skipHydration||$(),g||f},Ht=Wt,Q=Nt()(Ht(s=>({rawTasks:[],transformedTasks:[],bottomRowCells:[],topHeaderGroups:[],selectedScale:"month",currentTask:null,dragOffsets:{},setCurrentTask:c=>s({currentTask:c}),setSelectedScale:c=>s({selectedScale:c}),setRawTasks:c=>s({rawTasks:c}),setBottomRowCells:c=>s({bottomRowCells:c}),setTopHeaderGroups:c=>s({topHeaderGroups:c}),setTransformedTasks:c=>s({transformedTasks:c}),setDragOffset:(c,t)=>s(r=>({dragOffsets:{...r.dragOffsets,[c]:t}})),clearDragOffset:c=>s(t=>{const{[c]:r,...n}=t.dragOffsets;return{dragOffsets:n}})}),{name:"gantt-storage",storage:$t(()=>sessionStorage),partialize:s=>({selectedScale:s.selectedScale})}));var Ee={exports:{}},Ut=Ee.exports,rt;function Yt(){return rt||(rt=1,function(s,c){(function(t,r){s.exports=r()})(Ut,function(){var t=1e3,r=6e4,n=36e5,e="millisecond",a="second",i="minute",d="hour",h="day",v="week",p="month",f="quarter",g="year",$="date",u="Invalid Date",w=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,T=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,R={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(F){var O=["th","st","nd","rd"],I=F%100;return"["+F+(O[(I-20)%10]||O[I]||O[0])+"]"}},M=function(F,O,I){var P=String(F);return!P||P.length>=O?F:""+Array(O+1-P.length).join(I)+F},L={s:M,z:function(F){var O=-F.utcOffset(),I=Math.abs(O),P=Math.floor(I/60),k=I%60;return(O<=0?"+":"-")+M(P,2,"0")+":"+M(k,2,"0")},m:function F(O,I){if(O.date()<I.date())return-F(I,O);var P=12*(I.year()-O.year())+(I.month()-O.month()),k=O.clone().add(P,p),A=I-k<0,q=O.clone().add(P+(A?-1:1),p);return+(-(P+(I-k)/(A?k-q:q-k))||0)},a:function(F){return F<0?Math.ceil(F)||0:Math.floor(F)},p:function(F){return{M:p,y:g,w:v,d:h,D:$,h:d,m:i,s:a,ms:e,Q:f}[F]||String(F||"").toLowerCase().replace(/s$/,"")},u:function(F){return F===void 0}},N="en",j={};j[N]=R;var E="$isDayjsObject",D=function(F){return F instanceof Y||!(!F||!F[E])},l=function F(O,I,P){var k;if(!O)return N;if(typeof O=="string"){var A=O.toLowerCase();j[A]&&(k=A),I&&(j[A]=I,k=A);var q=O.split("-");if(!k&&q.length>1)return F(q[0])}else{var U=O.name;j[U]=O,k=U}return!P&&k&&(N=k),k||!P&&N},m=function(F,O){if(D(F))return F.clone();var I=typeof O=="object"?O:{};return I.date=F,I.args=arguments,new Y(I)},C=L;C.l=l,C.i=D,C.w=function(F,O){return m(F,{locale:O.$L,utc:O.$u,x:O.$x,$offset:O.$offset})};var Y=function(){function F(I){this.$L=l(I.locale,null,!0),this.parse(I),this.$x=this.$x||I.x||{},this[E]=!0}var O=F.prototype;return O.parse=function(I){this.$d=function(P){var k=P.date,A=P.utc;if(k===null)return new Date(NaN);if(C.u(k))return new Date;if(k instanceof Date)return new Date(k);if(typeof k=="string"&&!/Z$/i.test(k)){var q=k.match(w);if(q){var U=q[2]-1||0,G=(q[7]||"0").substring(0,3);return A?new Date(Date.UTC(q[1],U,q[3]||1,q[4]||0,q[5]||0,q[6]||0,G)):new Date(q[1],U,q[3]||1,q[4]||0,q[5]||0,q[6]||0,G)}}return new Date(k)}(I),this.init()},O.init=function(){var I=this.$d;this.$y=I.getFullYear(),this.$M=I.getMonth(),this.$D=I.getDate(),this.$W=I.getDay(),this.$H=I.getHours(),this.$m=I.getMinutes(),this.$s=I.getSeconds(),this.$ms=I.getMilliseconds()},O.$utils=function(){return C},O.isValid=function(){return this.$d.toString()!==u},O.isSame=function(I,P){var k=m(I);return this.startOf(P)<=k&&k<=this.endOf(P)},O.isAfter=function(I,P){return m(I)<this.startOf(P)},O.isBefore=function(I,P){return this.endOf(P)<m(I)},O.$g=function(I,P,k){return C.u(I)?this[P]:this.set(k,I)},O.unix=function(){return Math.floor(this.valueOf()/1e3)},O.valueOf=function(){return this.$d.getTime()},O.startOf=function(I,P){var k=this,A=!!C.u(P)||P,q=C.p(I),U=function(ue,te){var oe=C.w(k.$u?Date.UTC(k.$y,te,ue):new Date(k.$y,te,ue),k);return A?oe:oe.endOf(h)},G=function(ue,te){return C.w(k.toDate()[ue].apply(k.toDate("s"),(A?[0,0,0,0]:[23,59,59,999]).slice(te)),k)},Z=this.$W,J=this.$M,re=this.$D,ce="set"+(this.$u?"UTC":"");switch(q){case g:return A?U(1,0):U(31,11);case p:return A?U(1,J):U(0,J+1);case v:var ae=this.$locale().weekStart||0,me=(Z<ae?Z+7:Z)-ae;return U(A?re-me:re+(6-me),J);case h:case $:return G(ce+"Hours",0);case d:return G(ce+"Minutes",1);case i:return G(ce+"Seconds",2);case a:return G(ce+"Milliseconds",3);default:return this.clone()}},O.endOf=function(I){return this.startOf(I,!1)},O.$set=function(I,P){var k,A=C.p(I),q="set"+(this.$u?"UTC":""),U=(k={},k[h]=q+"Date",k[$]=q+"Date",k[p]=q+"Month",k[g]=q+"FullYear",k[d]=q+"Hours",k[i]=q+"Minutes",k[a]=q+"Seconds",k[e]=q+"Milliseconds",k)[A],G=A===h?this.$D+(P-this.$W):P;if(A===p||A===g){var Z=this.clone().set($,1);Z.$d[U](G),Z.init(),this.$d=Z.set($,Math.min(this.$D,Z.daysInMonth())).$d}else U&&this.$d[U](G);return this.init(),this},O.set=function(I,P){return this.clone().$set(I,P)},O.get=function(I){return this[C.p(I)]()},O.add=function(I,P){var k,A=this;I=Number(I);var q=C.p(P),U=function(J){var re=m(A);return C.w(re.date(re.date()+Math.round(J*I)),A)};if(q===p)return this.set(p,this.$M+I);if(q===g)return this.set(g,this.$y+I);if(q===h)return U(1);if(q===v)return U(7);var G=(k={},k[i]=r,k[d]=n,k[a]=t,k)[q]||1,Z=this.$d.getTime()+I*G;return C.w(Z,this)},O.subtract=function(I,P){return this.add(-1*I,P)},O.format=function(I){var P=this,k=this.$locale();if(!this.isValid())return k.invalidDate||u;var A=I||"YYYY-MM-DDTHH:mm:ssZ",q=C.z(this),U=this.$H,G=this.$m,Z=this.$M,J=k.weekdays,re=k.months,ce=k.meridiem,ae=function(te,oe,le,ge){return te&&(te[oe]||te(P,A))||le[oe].slice(0,ge)},me=function(te){return C.s(U%12||12,te,"0")},ue=ce||function(te,oe,le){var ge=te<12?"AM":"PM";return le?ge.toLowerCase():ge};return A.replace(T,function(te,oe){return oe||function(le){switch(le){case"YY":return String(P.$y).slice(-2);case"YYYY":return C.s(P.$y,4,"0");case"M":return Z+1;case"MM":return C.s(Z+1,2,"0");case"MMM":return ae(k.monthsShort,Z,re,3);case"MMMM":return ae(re,Z);case"D":return P.$D;case"DD":return C.s(P.$D,2,"0");case"d":return String(P.$W);case"dd":return ae(k.weekdaysMin,P.$W,J,2);case"ddd":return ae(k.weekdaysShort,P.$W,J,3);case"dddd":return J[P.$W];case"H":return String(U);case"HH":return C.s(U,2,"0");case"h":return me(1);case"hh":return me(2);case"a":return ue(U,G,!0);case"A":return ue(U,G,!1);case"m":return String(G);case"mm":return C.s(G,2,"0");case"s":return String(P.$s);case"ss":return C.s(P.$s,2,"0");case"SSS":return C.s(P.$ms,3,"0");case"Z":return q}return null}(te)||q.replace(":","")})},O.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},O.diff=function(I,P,k){var A,q=this,U=C.p(P),G=m(I),Z=(G.utcOffset()-this.utcOffset())*r,J=this-G,re=function(){return C.m(q,G)};switch(U){case g:A=re()/12;break;case p:A=re();break;case f:A=re()/3;break;case v:A=(J-Z)/6048e5;break;case h:A=(J-Z)/864e5;break;case d:A=J/n;break;case i:A=J/r;break;case a:A=J/t;break;default:A=J}return k?A:C.a(A)},O.daysInMonth=function(){return this.endOf(p).$D},O.$locale=function(){return j[this.$L]},O.locale=function(I,P){if(!I)return this.$L;var k=this.clone(),A=l(I,P,!0);return A&&(k.$L=A),k},O.clone=function(){return C.w(this.$d,this)},O.toDate=function(){return new Date(this.valueOf())},O.toJSON=function(){return this.isValid()?this.toISOString():null},O.toISOString=function(){return this.$d.toISOString()},O.toString=function(){return this.$d.toUTCString()},F}(),V=Y.prototype;return m.prototype=V,[["$ms",e],["$s",a],["$m",i],["$H",d],["$W",h],["$M",p],["$y",g],["$D",$]].forEach(function(F){V[F[1]]=function(O){return this.$g(O,F[0],F[1])}}),m.extend=function(F,O){return F.$i||(F(O,Y,m),F.$i=!0),m},m.locale=l,m.isDayjs=D,m.unix=function(F){return m(1e3*F)},m.en=j[N],m.Ls=j,m.p={},m})}(Ee)),Ee.exports}var Bt=Yt();const K=ie(Bt);var Ie={exports:{}},Vt=Ie.exports,st;function Gt(){return st||(st=1,function(s,c){(function(t,r){s.exports=r()})(Vt,function(){var t,r,n=1e3,e=6e4,a=36e5,i=864e5,d=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,h=31536e6,v=2628e6,p=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,f={years:h,months:v,days:i,hours:a,minutes:e,seconds:n,milliseconds:1,weeks:6048e5},g=function(j){return j instanceof L},$=function(j,E,D){return new L(j,D,E.$l)},u=function(j){return r.p(j)+"s"},w=function(j){return j<0},T=function(j){return w(j)?Math.ceil(j):Math.floor(j)},R=function(j){return Math.abs(j)},M=function(j,E){return j?w(j)?{negative:!0,format:""+R(j)+E}:{negative:!1,format:""+j+E}:{negative:!1,format:""}},L=function(){function j(D,l,m){var C=this;if(this.$d={},this.$l=m,D===void 0&&(this.$ms=0,this.parseFromMilliseconds()),l)return $(D*f[u(l)],this);if(typeof D=="number")return this.$ms=D,this.parseFromMilliseconds(),this;if(typeof D=="object")return Object.keys(D).forEach(function(F){C.$d[u(F)]=D[F]}),this.calMilliseconds(),this;if(typeof D=="string"){var Y=D.match(p);if(Y){var V=Y.slice(2).map(function(F){return F!=null?Number(F):0});return this.$d.years=V[0],this.$d.months=V[1],this.$d.weeks=V[2],this.$d.days=V[3],this.$d.hours=V[4],this.$d.minutes=V[5],this.$d.seconds=V[6],this.calMilliseconds(),this}}return this}var E=j.prototype;return E.calMilliseconds=function(){var D=this;this.$ms=Object.keys(this.$d).reduce(function(l,m){return l+(D.$d[m]||0)*f[m]},0)},E.parseFromMilliseconds=function(){var D=this.$ms;this.$d.years=T(D/h),D%=h,this.$d.months=T(D/v),D%=v,this.$d.days=T(D/i),D%=i,this.$d.hours=T(D/a),D%=a,this.$d.minutes=T(D/e),D%=e,this.$d.seconds=T(D/n),D%=n,this.$d.milliseconds=D},E.toISOString=function(){var D=M(this.$d.years,"Y"),l=M(this.$d.months,"M"),m=+this.$d.days||0;this.$d.weeks&&(m+=7*this.$d.weeks);var C=M(m,"D"),Y=M(this.$d.hours,"H"),V=M(this.$d.minutes,"M"),F=this.$d.seconds||0;this.$d.milliseconds&&(F+=this.$d.milliseconds/1e3,F=Math.round(1e3*F)/1e3);var O=M(F,"S"),I=D.negative||l.negative||C.negative||Y.negative||V.negative||O.negative,P=Y.format||V.format||O.format?"T":"",k=(I?"-":"")+"P"+D.format+l.format+C.format+P+Y.format+V.format+O.format;return k==="P"||k==="-P"?"P0D":k},E.toJSON=function(){return this.toISOString()},E.format=function(D){var l=D||"YYYY-MM-DDTHH:mm:ss",m={Y:this.$d.years,YY:r.s(this.$d.years,2,"0"),YYYY:r.s(this.$d.years,4,"0"),M:this.$d.months,MM:r.s(this.$d.months,2,"0"),D:this.$d.days,DD:r.s(this.$d.days,2,"0"),H:this.$d.hours,HH:r.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:r.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:r.s(this.$d.seconds,2,"0"),SSS:r.s(this.$d.milliseconds,3,"0")};return l.replace(d,function(C,Y){return Y||String(m[C])})},E.as=function(D){return this.$ms/f[u(D)]},E.get=function(D){var l=this.$ms,m=u(D);return m==="milliseconds"?l%=1e3:l=m==="weeks"?T(l/f[m]):this.$d[m],l||0},E.add=function(D,l,m){var C;return C=l?D*f[u(l)]:g(D)?D.$ms:$(D,this).$ms,$(this.$ms+C*(m?-1:1),this)},E.subtract=function(D,l){return this.add(D,l,!0)},E.locale=function(D){var l=this.clone();return l.$l=D,l},E.clone=function(){return $(this.$ms,this)},E.humanize=function(D){return t().add(this.$ms,"ms").locale(this.$l).fromNow(!D)},E.valueOf=function(){return this.asMilliseconds()},E.milliseconds=function(){return this.get("milliseconds")},E.asMilliseconds=function(){return this.as("milliseconds")},E.seconds=function(){return this.get("seconds")},E.asSeconds=function(){return this.as("seconds")},E.minutes=function(){return this.get("minutes")},E.asMinutes=function(){return this.as("minutes")},E.hours=function(){return this.get("hours")},E.asHours=function(){return this.as("hours")},E.days=function(){return this.get("days")},E.asDays=function(){return this.as("days")},E.weeks=function(){return this.get("weeks")},E.asWeeks=function(){return this.as("weeks")},E.months=function(){return this.get("months")},E.asMonths=function(){return this.as("months")},E.years=function(){return this.get("years")},E.asYears=function(){return this.as("years")},j}(),N=function(j,E,D){return j.add(E.years()*D,"y").add(E.months()*D,"M").add(E.days()*D,"d").add(E.hours()*D,"h").add(E.minutes()*D,"m").add(E.seconds()*D,"s").add(E.milliseconds()*D,"ms")};return function(j,E,D){t=D,r=D().$utils(),D.duration=function(C,Y){var V=D.locale();return $(C,{$l:V},Y)},D.isDuration=g;var l=E.prototype.add,m=E.prototype.subtract;E.prototype.add=function(C,Y){return g(C)?N(this,C,1):l.bind(this)(C,Y)},E.prototype.subtract=function(C,Y){return g(C)?N(this,C,-1):m.bind(this)(C,Y)}}})}(Ie)),Ie.exports}var Xt=Gt();const Zt=ie(Xt);var Oe={exports:{}},Jt=Oe.exports,it;function Kt(){return it||(it=1,function(s,c){(function(t,r){s.exports=r()})(Jt,function(){return function(t,r,n){r.prototype.isBetween=function(e,a,i,d){var h=n(e),v=n(a),p=(d=d||"()")[0]==="(",f=d[1]===")";return(p?this.isAfter(h,i):!this.isBefore(h,i))&&(f?this.isBefore(v,i):!this.isAfter(v,i))||(p?this.isBefore(h,i):!this.isAfter(h,i))&&(f?this.isAfter(v,i):!this.isBefore(v,i))}}})}(Oe)),Oe.exports}var Qt=Kt();const en=ie(Qt);var ke={exports:{}},tn=ke.exports,ot;function nn(){return ot||(ot=1,function(s,c){(function(t,r){s.exports=r()})(tn,function(){var t="day";return function(r,n,e){var a=function(h){return h.add(4-h.isoWeekday(),t)},i=n.prototype;i.isoWeekYear=function(){return a(this).year()},i.isoWeek=function(h){if(!this.$utils().u(h))return this.add(7*(h-this.isoWeek()),t);var v,p,f,g,$=a(this),u=(v=this.isoWeekYear(),p=this.$u,f=(p?e.utc:e)().year(v).startOf("year"),g=4-f.isoWeekday(),f.isoWeekday()>4&&(g+=7),f.add(g,t));return $.diff(u,"week")+1},i.isoWeekday=function(h){return this.$utils().u(h)?this.day()||7:this.day(this.day()%7?h:h-7)};var d=i.startOf;i.startOf=function(h,v){var p=this.$utils(),f=!!p.u(v)||v;return p.p(h)==="isoweek"?f?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):d.bind(this)(h,v)}}})}(ke)),ke.exports}var rn=nn();const sn=ie(rn);var Te={exports:{}},on=Te.exports,at;function an(){return at||(at=1,function(s,c){(function(t,r){s.exports=r()})(on,function(){return function(t,r){r.prototype.isSameOrAfter=function(n,e){return this.isSame(n,e)||this.isAfter(n,e)}}})}(Te)),Te.exports}var un=an();const cn=ie(un);var Re={exports:{}},ln=Re.exports,ut;function dn(){return ut||(ut=1,function(s,c){(function(t,r){s.exports=r()})(ln,function(){return function(t,r){r.prototype.isSameOrBefore=function(n,e){return this.isSame(n,e)||this.isBefore(n,e)}}})}(Re)),Re.exports}var fn=dn();const hn=ie(fn);var Ce={exports:{}},mn=Ce.exports,ct;function pn(){return ct||(ct=1,function(s,c){(function(t,r){s.exports=r()})(mn,function(){return function(t,r,n){r.prototype.isToday=function(){var e="YYYY-MM-DD",a=n();return this.format(e)===a.format(e)}}})}(Ce)),Ce.exports}var gn=pn();const vn=ie(gn);var Fe={exports:{}},$n=Fe.exports,lt;function yn(){return lt||(lt=1,function(s,c){(function(t,r){s.exports=r()})($n,function(){return function(t,r,n){var e=r.prototype,a=function(p){return p&&(p.indexOf?p:p.s)},i=function(p,f,g,$,u){var w=p.name?p:p.$locale(),T=a(w[f]),R=a(w[g]),M=T||R.map(function(N){return N.slice(0,$)});if(!u)return M;var L=w.weekStart;return M.map(function(N,j){return M[(j+(L||0))%7]})},d=function(){return n.Ls[n.locale()]},h=function(p,f){return p.formats[f]||function(g){return g.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function($,u,w){return u||w.slice(1)})}(p.formats[f.toUpperCase()])},v=function(){var p=this;return{months:function(f){return f?f.format("MMMM"):i(p,"months")},monthsShort:function(f){return f?f.format("MMM"):i(p,"monthsShort","months",3)},firstDayOfWeek:function(){return p.$locale().weekStart||0},weekdays:function(f){return f?f.format("dddd"):i(p,"weekdays")},weekdaysMin:function(f){return f?f.format("dd"):i(p,"weekdaysMin","weekdays",2)},weekdaysShort:function(f){return f?f.format("ddd"):i(p,"weekdaysShort","weekdays",3)},longDateFormat:function(f){return h(p.$locale(),f)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};e.localeData=function(){return v.bind(this)()},n.localeData=function(){var p=d();return{firstDayOfWeek:function(){return p.weekStart||0},weekdays:function(){return n.weekdays()},weekdaysShort:function(){return n.weekdaysShort()},weekdaysMin:function(){return n.weekdaysMin()},months:function(){return n.months()},monthsShort:function(){return n.monthsShort()},longDateFormat:function(f){return h(p,f)},meridiem:p.meridiem,ordinal:p.ordinal}},n.months=function(){return i(d(),"months")},n.monthsShort=function(){return i(d(),"monthsShort","months",3)},n.weekdays=function(p){return i(d(),"weekdays",null,null,p)},n.weekdaysShort=function(p){return i(d(),"weekdaysShort","weekdays",3,p)},n.weekdaysMin=function(p){return i(d(),"weekdaysMin","weekdays",2,p)}}})}(Fe)),Fe.exports}var Sn=yn();const xn=ie(Sn);var _e={exports:{}},bn=_e.exports,dt;function Dn(){return dt||(dt=1,function(s,c){(function(t,r){s.exports=r()})(bn,function(){return function(t,r,n){var e=function(a,i){if(!i||!i.length||i.length===1&&!i[0]||i.length===1&&Array.isArray(i[0])&&!i[0].length)return null;var d;i.length===1&&i[0].length>0&&(i=i[0]),d=(i=i.filter(function(v){return v}))[0];for(var h=1;h<i.length;h+=1)i[h].isValid()&&!i[h][a](d)||(d=i[h]);return d};n.max=function(){var a=[].slice.call(arguments,0);return e("isAfter",a)},n.min=function(){var a=[].slice.call(arguments,0);return e("isBefore",a)}}})}(_e)),_e.exports}var wn=Dn();const Mn=ie(wn);var ze={exports:{}},En=ze.exports,ft;function In(){return ft||(ft=1,function(s,c){(function(t,r){s.exports=r()})(En,function(){var t={year:0,month:1,day:2,hour:3,minute:4,second:5},r={};return function(n,e,a){var i,d=function(f,g,$){$===void 0&&($={});var u=new Date(f),w=function(T,R){R===void 0&&(R={});var M=R.timeZoneName||"short",L=T+"|"+M,N=r[L];return N||(N=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:T,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:M}),r[L]=N),N}(g,$);return w.formatToParts(u)},h=function(f,g){for(var $=d(f,g),u=[],w=0;w<$.length;w+=1){var T=$[w],R=T.type,M=T.value,L=t[R];L>=0&&(u[L]=parseInt(M,10))}var N=u[3],j=N===24?0:N,E=u[0]+"-"+u[1]+"-"+u[2]+" "+j+":"+u[4]+":"+u[5]+":000",D=+f;return(a.utc(E).valueOf()-(D-=D%1e3))/6e4},v=e.prototype;v.tz=function(f,g){f===void 0&&(f=i);var $,u=this.utcOffset(),w=this.toDate(),T=w.toLocaleString("en-US",{timeZone:f}),R=Math.round((w-new Date(T))/1e3/60),M=15*-Math.round(w.getTimezoneOffset()/15)-R;if(!Number(M))$=this.utcOffset(0,g);else if($=a(T,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(M,!0),g){var L=$.utcOffset();$=$.add(u-L,"minute")}return $.$x.$timezone=f,$},v.offsetName=function(f){var g=this.$x.$timezone||a.tz.guess(),$=d(this.valueOf(),g,{timeZoneName:f}).find(function(u){return u.type.toLowerCase()==="timezonename"});return $&&$.value};var p=v.startOf;v.startOf=function(f,g){if(!this.$x||!this.$x.$timezone)return p.call(this,f,g);var $=a(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return p.call($,f,g).tz(this.$x.$timezone,!0)},a.tz=function(f,g,$){var u=$&&g,w=$||g||i,T=h(+a(),w);if(typeof f!="string")return a(f).tz(w);var R=function(j,E,D){var l=j-60*E*1e3,m=h(l,D);if(E===m)return[l,E];var C=h(l-=60*(m-E)*1e3,D);return m===C?[l,m]:[j-60*Math.min(m,C)*1e3,Math.max(m,C)]}(a.utc(f,u).valueOf(),T,w),M=R[0],L=R[1],N=a(M).utcOffset(L);return N.$x.$timezone=w,N},a.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},a.tz.setDefault=function(f){i=f}}})}(ze)),ze.exports}var On=In();const kn=ie(On);var je={exports:{}},Tn=je.exports,ht;function Rn(){return ht||(ht=1,function(s,c){(function(t,r){s.exports=r()})(Tn,function(){return function(t,r,n){n.updateLocale=function(e,a){var i=n.Ls[e];if(i)return(a?Object.keys(a):[]).forEach(function(d){i[d]=a[d]}),i}}})}(je)),je.exports}var Cn=Rn();const Fn=ie(Cn);var Pe={exports:{}},_n=Pe.exports,mt;function zn(){return mt||(mt=1,function(s,c){(function(t,r){s.exports=r()})(_n,function(){var t="minute",r=/[+-]\d\d(?::?\d\d)?/g,n=/([+-]|\d\d)/g;return function(e,a,i){var d=a.prototype;i.utc=function(u){var w={date:u,utc:!0,args:arguments};return new a(w)},d.utc=function(u){var w=i(this.toDate(),{locale:this.$L,utc:!0});return u?w.add(this.utcOffset(),t):w},d.local=function(){return i(this.toDate(),{locale:this.$L,utc:!1})};var h=d.parse;d.parse=function(u){u.utc&&(this.$u=!0),this.$utils().u(u.$offset)||(this.$offset=u.$offset),h.call(this,u)};var v=d.init;d.init=function(){if(this.$u){var u=this.$d;this.$y=u.getUTCFullYear(),this.$M=u.getUTCMonth(),this.$D=u.getUTCDate(),this.$W=u.getUTCDay(),this.$H=u.getUTCHours(),this.$m=u.getUTCMinutes(),this.$s=u.getUTCSeconds(),this.$ms=u.getUTCMilliseconds()}else v.call(this)};var p=d.utcOffset;d.utcOffset=function(u,w){var T=this.$utils().u;if(T(u))return this.$u?0:T(this.$offset)?p.call(this):this.$offset;if(typeof u=="string"&&(u=function(N){N===void 0&&(N="");var j=N.match(r);if(!j)return null;var E=(""+j[0]).match(n)||["-",0,0],D=E[0],l=60*+E[1]+ +E[2];return l===0?0:D==="+"?l:-l}(u),u===null))return this;var R=Math.abs(u)<=16?60*u:u,M=this;if(w)return M.$offset=R,M.$u=u===0,M;if(u!==0){var L=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(M=this.local().add(R+L,t)).$offset=R,M.$x.$localOffset=L}else M=this.utc();return M};var f=d.format;d.format=function(u){var w=u||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return f.call(this,w)},d.valueOf=function(){var u=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*u},d.isUTC=function(){return!!this.$u},d.toISOString=function(){return this.toDate().toISOString()},d.toString=function(){return this.toDate().toUTCString()};var g=d.toDate;d.toDate=function(u){return u==="s"&&this.$offset?i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():g.call(this)};var $=d.diff;d.diff=function(u,w,T){if(u&&this.$u===u.$u)return $.call(this,u,w,T);var R=this.local(),M=i(u).local();return $.call(R,M,w,T)}}})}(Pe)),Pe.exports}var jn=zn();const Pn=ie(jn);var Ae={exports:{}},An=Ae.exports,pt;function Ln(){return pt||(pt=1,function(s,c){(function(t,r){s.exports=r()})(An,function(){return function(t,r){r.prototype.weekday=function(n){var e=this.$locale().weekStart||0,a=this.$W,i=(a<e?a+7:a)-e;return this.$utils().u(n)?i:this.subtract(i,"day").add(n,"day")}}})}(Ae)),Ae.exports}var qn=Ln();const Nn=ie(qn);K.extend(Mn);K.extend(Zt);K.extend(Nn);K.extend(vn);K.extend(Pn);K.extend(kn);K.extend(cn);K.extend(hn);K.extend(en);K.extend(xn);K.extend(Fn);K.extend(sn);function Wn(s,c){const t=Q(g=>g.setCurrentTask),r=Q(g=>g.rawTasks),n=Q(g=>g.selectedScale),e=Q(g=>g.setDragOffset),a=Q(g=>g.clearDragOffset),i=Q(g=>g.setRawTasks),d=ee.useRef(null),h=ee.useRef(null),v=g=>{const $=g.target,u=$.closest('[data-mode="left"]')?"left":$.closest('[data-mode="right"]')?"right":"bar";d.current={mode:u,initialClientX:g.clientX,initialLeft:s.barLeft,initialWidth:s.barWidth,initialStartDate:s.startDate,initialEndDate:s.endDate,dragSteps:0},t(s),g.currentTarget.setPointerCapture(g.pointerId),h.current=g.pointerId,document.addEventListener("pointermove",p),document.addEventListener("pointerup",f),document.addEventListener("pointercancel",f)},p=g=>{const $=d.current;if(!$)return;const{basePxPerDragStep:u}=he[n],w=he[n],T=w.dragStepAmount*{minute:1,hour:60,day:60*24,week:60*24*7,month:60*24*30}[w.dragStepUnit]/w.basePxPerDragStep,R=u;let M=g.clientX-$.initialClientX;$.mode==="left"?(M=Math.min(M,$.initialWidth-R),M<0&&(M=Math.floor(M/u)*u)):$.mode==="right"&&(M=Math.max(M,-$.initialWidth+R),M>0&&(M=Math.ceil(M/u)*u));const L=Math.round(M/u);if(L===$.dragSteps)return;$.dragSteps=L;const N=$.dragSteps*u,j=N*T;let E=K($.initialStartDate),D=K($.initialEndDate);$.mode==="bar"?(E=E.add(j,"minute"),D=D.add(j,"minute")):$.mode==="left"?E=E.add(j,"minute"):$.mode==="right"&&(D=D.add(j,"minute"));const l=$.mode==="bar"?{offsetX:N,offsetWidth:0,offsetStartDate:E,offsetEndDate:D}:$.mode==="left"?{offsetX:N,offsetWidth:-N,offsetStartDate:E,offsetEndDate:D}:{offsetX:0,offsetWidth:N,offsetStartDate:E,offsetEndDate:D};e(s.id,l)},f=()=>{var M;document.removeEventListener("pointermove",p),document.removeEventListener("pointerup",f),document.removeEventListener("pointercancel",f);const g=d.current;if(!g)return;const{dragStepAmount:$,dragStepUnit:u}=he[n],w=L=>K(L).add(g.dragSteps*$,u).toISOString(),T=r.map(L=>{if(L.id!==s.id)return L;switch(g.mode){case"bar":return{...L,startDate:w(g.initialStartDate),endDate:w(g.initialEndDate)};case"left":return{...L,startDate:w(g.initialStartDate)};default:return{...L,endDate:w(g.initialEndDate)}}});t(null),a(s.id),i(T),c==null||c(T);const R=h.current;R!==null&&((M=document.getElementById(`task-${s.id}`))==null||M.releasePointerCapture(R)),h.current=null,d.current=null};return{onPointerDown:v}}const Hn=s=>Se.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...s},Se.createElement("path",{d:"M10.2 4L10.2 20L7.8 20L7.8 4L10.2 4ZM15 4L15 20L12.6 20L12.6 4L15 4ZM5.4 15.0999L5.4 7.8999L1.8 11.4999L5.4 15.0999ZM17.4 7.8999L17.4 15.0999L21 11.4999L17.4 7.8999Z"}));function gt({side:s,hoveredHandle:c,setHoveredHandle:t}){return W.jsx("button",{"data-mode":s,onMouseEnter:()=>t(s),onMouseLeave:()=>t("none"),style:{position:"absolute",top:0,[s]:-18.4,width:32,height:"100%",display:"flex",alignItems:"center",justifyContent:"center",cursor:"w-resize",background:"transparent",border:"none",padding:0},children:W.jsx(Hn,{style:{width:24,height:24,fill:"#919294",opacity:c===s?1:0}})})}function Un({currentTask:s,onTasksChange:c}){const t=ee.useRef(null),{onPointerDown:r}=Wn(s,c),n=Q(h=>h.dragOffsets[s.id]),e=(n==null?void 0:n.offsetX)??0,a=(n==null?void 0:n.offsetWidth)??0,[i,d]=ee.useState("none");return W.jsxs("div",{ref:t,id:`task-${s.id}`,onPointerDown:r,style:{position:"relative",display:"flex",alignItems:"center",background:"#D6D6D8",transform:`translateX(${s.barLeft+e}px)`,width:s.barWidth+a,height:Le/2,userSelect:"none"},children:[W.jsx(gt,{side:"left",hoveredHandle:i,setHoveredHandle:d}),W.jsx(gt,{side:"right",hoveredHandle:i,setHoveredHandle:d})]})}function Yn(s){return[...s].sort((c,t)=>{const r=c.sequence.split(".").map(Number),n=t.sequence.split(".").map(Number);for(let e=0;e<Math.max(r.length,n.length);e++){const a=r[e]||0,i=n[e]||0;if(a!==i)return a-i}return 0})}function Bn(s){return s.split(".").length-1}function Vn(s,c,t){const r=Yn(s);let n=0;return r.map(e=>{n++;const a=Bn(e.sequence),{barMarginLeftAmount:i,barWidthSize:d}=Gn(K(e.startDate),K(e.endDate),c,t);return{...e,barLeft:i,barWidth:d,depth:a,order:n,originalOrder:n}})}function Gn(s,c,t,r){if(!t.length)return{barMarginLeftAmount:0,barWidthSize:0};const{tickUnit:n,unitPerTick:e}=he[r];let a=0,i=0,d=!1;for(const h of t){const v=h.startDate,p=v.add(e,n),f=h.widthPx;if(p.isSameOrBefore(s)){a+=f;continue}if(v.isSameOrAfter(c))break;const g=s.isAfter(v)?s:v,$=c.isBefore(p)?c:p,u=p.diff(v),T=$.diff(g)/u;if(!d&&g.isAfter(v)){const R=g.diff(v)/u;a+=R*f}i+=T*f,d=!0}return{barMarginLeftAmount:a,barWidthSize:Math.max(i,1)}}function Xn(s){let c=1/0,t=-1/0;for(const{startDate:r,endDate:n}of Object.values(s)){const e=K(r).valueOf(),a=K(n).valueOf();Number.isNaN(e)||(c=Math.min(c,e)),Number.isNaN(a)||(t=Math.max(t,a))}return{minDate:K(c),maxDate:K(t)}}function Zn(s,c,t){const{tickUnit:r,unitPerTick:n}=he[t];return{paddedMinDate:s.subtract(tt*n,r),paddedMaxDate:c.add(tt*n,r)}}function Jn(s,c,t){const{tickUnit:r,unitPerTick:n,basePxPerDragStep:e,dragStepUnit:a,dragStepAmount:i}=he[t],d=[];let h=s.startOf(r);for(;h.isBefore(c);){const v=K(h).add(n,r).diff(h,a)/i;d.push({startDate:h,widthPx:v*e}),h=h.add(n,r)}return d}function yt(s,c){const{labelUnit:t,formatHeaderLabel:r}=he[c],n=[];let e=null,a="",i=0,d=null;return s.forEach((h,v)=>{const p=h.startDate.startOf(t),f=p.valueOf(),g=(r==null?void 0:r(p))??p.format();f===e?i+=h.widthPx:(e!==null&&n.push({label:a,widthPx:i,startDate:d}),e=f,a=g,i=h.widthPx,d=p),v===s.length-1&&n.push({label:a,widthPx:i,startDate:d})}),n}function Kn(s,c,t,r,n){const{minDate:e,maxDate:a}=Xn(Object.fromEntries(s.map(f=>[f.id,{startDate:f.startDate,endDate:f.endDate}]))),{paddedMinDate:i,paddedMaxDate:d}=Zn(e,a,c),h=Jn(i,d,c),v=yt(h,c),p=Vn(s,h,c);t(h),r(v),n(p)}const Qn=({bottomRowCells:s,selectedScale:c,width:t,scrollRef:r})=>{const n=he[c],[e,a]=ee.useState(0),i=Q(f=>f.currentTask),d=Q(f=>{if(!i)return"";const g=i.id;return f.dragOffsets[g]??""}),h=ee.useMemo(()=>yt(s,c),[s,c]),v=ee.useMemo(()=>{const f=[];for(const g of h){const $=f[f.length-1];$&&$.label===g.label?$.widthPx+=g.widthPx:f.push({...g})}return f},[h]),p=ee.useMemo(()=>{let f=0;return v.map(g=>{const $={...g,left:f};return f+=g.widthPx,$})},[v]);return ee.useEffect(()=>{const f=r.current;if(!f)return;const g=()=>{const $=f.scrollLeft;for(let u=p.length-1;u>=0;u--)if($>=p[u].left){a(u);break}};return f.addEventListener("scroll",g),g(),()=>f.removeEventListener("scroll",g)},[p]),W.jsx("div",{style:{width:`${t}px`,position:"sticky",top:0,zIndex:30,backgroundColor:"#F0F1F2"},children:W.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[W.jsx("div",{style:{position:"relative",display:"flex",height:"32px"},children:W.jsx("div",{style:{display:"flex"},children:p.map((f,g)=>{const $=g===e;return W.jsx("div",{style:{padding:"8px 0px",fontSize:"14px",fontWeight:"bold",textAlign:"left",width:`${f.widthPx}px`,zIndex:40,backgroundColor:"#F0F1F2",...$&&{position:"sticky",left:0}},children:W.jsx("p",{style:{margin:0,padding:"0 0px",whiteSpace:"nowrap"},children:f.label})},g)})})}),W.jsxs("div",{style:{borderTop:"1px solid #D6D6D8",display:"flex"},children:[W.jsx("div",{children:d&&i&&W.jsxs("div",{style:{position:"absolute",left:`${d.offsetX+((i==null?void 0:i.barLeft)??0)}px`,zIndex:60,backgroundColor:"#D6D6D8",width:`${d.offsetWidth+((i==null?void 0:i.barWidth)??0)}px`,height:"22px",display:"flex",alignItems:"center",borderRadius:"100px",opacity:.7,fontSize:"12px",overflow:"hidden",justifyContent:"space-between"},children:[c==="week"&&W.jsxs(W.Fragment,{children:[W.jsx("p",{children:d.offsetStartDate.format("h A")}),W.jsx("p",{children:d.offsetEndDate.format("h A")})]}),c==="year"&&W.jsxs(W.Fragment,{children:[W.jsx("p",{children:d.offsetStartDate.format("D")}),W.jsx("p",{children:d.offsetEndDate.format("D")})]})]})}),s.map((f,g)=>{var w;const $=((w=n.formatTickLabel)==null?void 0:w.call(n,f.startDate))||"",u=`bottom-row-${f.startDate}-${g}`;return W.jsx("div",{style:{position:"relative",lineHeight:"normal",padding:"4px 0",fontSize:"12px",width:`${f.widthPx}px`},children:$},u)})]})]})})};function er(s,c,t,r,n){if(t<0||n<0)return`M ${c} ${t} h ${(r-c)/2}`;const e=7,a=11,i=25,d=20,h=`M ${c} ${t}`,v=r-c,p=n-t,f=Math.abs(v),g=Math.abs(p),$=n<=t,u=n>=t,w=r>=c,T=r<=c,R=f>d,M=Math.abs(v/2),L=Math.abs(p/2);function N(){function l(){return(w||T)&&u&&!R?"downSmallHorizontal":(w||T)&&$&&!R?"upSmallHorizontal":u&&T?"downLeft":u&&w?"downRight":$&&T?"upLeft":$&&w?"upRight":""}let m=h;switch(l()){case"downRight":{m+=` h ${M-e}`,m+=` a ${e} ${e} 0 0 1 ${e} ${e}`,m+=` v ${p-e*2}`,m+=` a ${e} ${e} 0 0 0 ${e} ${e}`,m+=` h ${M-e}`;break}case"upRight":{m+=` h ${M-e}`,m+=` a ${e} ${e} 0 0 0 ${e} -${e}`,m+=` v -${g-e*2}`,m+=` a ${e} ${e} 0 0 1 ${e} -${e}`,m+=` h ${M-e}`;break}case"downLeft":case"downSmallHorizontal":{const Y=t+p/2;m+=` h ${a}`,m+=` a ${e} ${e} 0 0 1 ${e} ${e}`,m+=` v ${Y-t-e*2}`,m+=` a ${e} ${e} 0 0 1 -${e} ${e}`,m+=` h ${v-2*a}`,m+=` a ${e} ${e} 0 0 0 -${e} ${e}`,m+=` v ${Y-t-e*2}`,m+=` a ${e} ${e} 0 0 0 ${e} ${e}`,m+=` h ${a}`;break}case"upLeft":case"upSmallHorizontal":{const Y=t+p/2;m+=` h ${a}`,m+=` a ${e} ${e} 0 0 0 ${e} -${e}`,m+=` v -${t-Y-e*2}`,m+=` a ${e} ${e} 0 0 0 -${e} -${e}`,m+=` h ${v-2*a}`,m+=` a ${e} ${e} 0 0 1 -${e} -${e}`,m+=` v -${t-Y-e*2}`,m+=` a ${e} ${e} 0 0 1 ${e} -${e}`,m+=` h ${a}`;break}default:return m}return m}function j(){let l=h;return u&&T?(l+=` h ${i-a}`,l+=` a ${e} ${e} 0 0 1 ${e} ${e}`,l+=` v ${p-e*2}`,l+=` a ${e} ${e} 0 0 1 -${e} ${e}`,l+=` h ${v-e*2}`):u&&w?(l+=` h ${v+i-a}`,l+=` a ${e} ${e} 0 0 1 ${e} ${e}`,l+=` v ${p-e*2}`,l+=` a ${e} ${e} 0 0 1 -${e} ${e}`,l+=` h -${i-a}`):$&&T?(l+=` h ${i-a}`,l+=` a ${e} ${e} 0 0 0 ${e} -${e}`,l+=` v ${p+e*2}`,l+=` a ${e} ${e} 0 0 0 -${e} -${e}`,l+=` h ${v-i+a}`):$&&w&&(l+=` h ${v+i-a}`,l+=` a ${e} ${e} 0 0 0 ${e} -${e}`,l+=` v ${p+e*2}`,l+=` a ${e} ${e} 0 0 0 -${e} -${e}`,l+=` h -${i-a}`),l}function E(){function l(){return(w||T)&&u&&!R?"downSmallHorizontal":(w||T)&&$&&!R?"upSmallHorizontal":u&&T?"downLeft":u&&w?"downRight":$&&T?"upLeft":$&&w?"upRight":""}let m=h;switch(l()){case"downRight":case"downSmallHorizontal":{m+=" h -11",m+=` a ${e} ${e} 0 0 0 -${e} ${e}`,m+=` v ${L-e*2}`,m+=` a ${e} ${e} 0 0 0 ${e} ${e}`,m+=` h ${a*2+v}`,m+=` a ${e} ${e} 0 0 1 ${e} ${e}`,m+=` v ${L-e*2}`,m+=` a ${e} ${e} 0 0 1 -${e} ${e}`,m+=" h -11";break}case"upRight":case"upSmallHorizontal":{m+=" h -11",m+=` a ${e} ${e} 0 0 1 -${e} -${e}`,m+=` v ${-(L-e*2)}`,m+=` a ${e} ${e} 0 0 1 ${e} -${e}`,m+=` h ${a*2+v}`,m+=` a ${e} ${e} 0 0 0 ${e} -${e}`,m+=` v ${-(L-e*2)}`,m+=` a ${e} ${e} 0 0 0 -${e} -${e}`,m+=" h -11";break}case"downLeft":{m+=` h ${-M+e}`,m+=` a ${e} ${e} 0 0 0 -${e} ${e}`,m+=` v ${g-e*2}`,m+=` a ${e} ${e} 0 0 1 -${e} ${e}`,m+=` h ${-M+e}`;break}case"upLeft":{m+=` h ${-(M-e)}`,m+=` a ${e} ${e} 0 0 1 -${e} -${e}`,m+=` v ${-(g-e*2)}`,m+=` a ${e} ${e} 0 0 0 -${e} -${e}`,m+=` h ${-M+e}`;break}default:return m}return m}function D(){let l=h;return u&&T?(l+=` h ${v-i}`,l+=` a ${e} ${e} 0 0 0 -${e} ${e}`,l+=` v ${p-e*2}`,l+=` a ${e} ${e} 0 0 0 ${e} ${e}`,l+=` h ${i}`):u&&w?(l+=" h -25",l+=` a ${e} ${e} 0 0 0 -${e} ${e}`,l+=` v ${p-e*2}`,l+=` a ${e} ${e} 0 0 0 ${e} ${e}`,l+=` h ${v+i}`):$&&T?(l+=` h ${v-i}`,l+=` a ${e} ${e} 0 0 1 -${e} -${e}`,l+=` v ${p+e*2}`,l+=` a ${e} ${e} 0 0 1 ${e} -${e}`,l+=` h ${i}`):$&&w&&(l+=" h -25",l+=` a ${e} ${e} 0 0 1 -${e} -${e}`,l+=` v ${p+e*2}`,l+=` a ${e} ${e} 0 0 1 ${e} -${e}`,l+=` h ${v+i}`),l}switch(s){case"FS":return N();case"FF":return j();case"SF":return E();case"SS":return D();default:return`${h} L ${r} ${n}`}}function tr({transformedTasks:s,visibleRowIndexes:c}){const t=Q(e=>e.dragOffsets),r=new Set(c),n=[];for(const e of s){const a=e.order-1;if(!r.has(a))continue;const i=t[e.id],d=(i==null?void 0:i.offsetX)??0,h=(i==null?void 0:i.offsetWidth)??0;for(const v of e.dependencies??[]){const p=s.find(j=>j.id===v.targetId);if(!p)continue;const f=p.order-1,g=Le,$=f*g+g/2-4,u=a*g+g/2+4,w=p.barLeft,T=p.barLeft+p.barWidth,R=e.barLeft+d,M=R+e.barWidth+h,[L,N]={FS:[T,R],SS:[w,R],FF:[T,M],SF:[w,M]}[v.type];n.push({...v,fromX:L,fromY:$,toX:N,toY:u})}}return W.jsxs("svg",{style:{position:"absolute",top:0,left:0,width:"100%",height:`${s.length*Le}px`,pointerEvents:"none",zIndex:5},children:[W.jsx("defs",{children:W.jsx("marker",{id:"arrowhead",markerWidth:"6",markerHeight:"6",refX:"5.25",refY:"3",orient:"auto",children:W.jsx("polygon",{points:"0 0, 6 3, 0 6"})})}),n.map((e,a)=>W.jsx("path",{d:er(e.type,e.fromX,e.fromY,e.toX,e.toY),markerEnd:"url(#arrowhead)",fill:"none",style:{stroke:"#000",strokeWidth:.75}},a))]})}function S(s,c){const t=new Date(s);return t.setUTCDate(t.getUTCDate()+c),t}function y(s,c,t=0,r=0){const n=new Date(s);return n.setUTCHours(c,t,r,0),n}function x(s){return s.toISOString().split(".")[0]+"Z"}const nr=new Date,b=y(new Date(nr),0,0,0),rr=[{id:"1",name:"Project Kickoff",startDate:x(y(S(b,0),9)),endDate:x(y(S(b,0),11)),parentId:null,sequence:"1",dependencies:[]},{id:"2",name:"Requirement Gathering",startDate:x(y(S(b,1),9)),endDate:x(y(S(b,4),17)),parentId:null,sequence:"2",dependencies:[{targetId:"1",type:"FS"}]},{id:"3",name:"Design Kickoff Meeting",startDate:x(y(S(b,3),9)),endDate:x(y(S(b,3),17)),parentId:null,sequence:"2.1",dependencies:[{targetId:"2",type:"SS"}]},{id:"4",name:"Technical Design Review",startDate:x(y(S(b,5),9)),endDate:x(y(S(b,7),17)),parentId:null,sequence:"3",dependencies:[{targetId:"3",type:"FS"}]},{id:"5",name:"Frontend Architecture Planning",startDate:x(y(S(b,8),9)),endDate:x(y(S(b,10),17)),parentId:null,sequence:"4",dependencies:[{targetId:"4",type:"FS"}]},{id:"6",name:"Backend Architecture Planning",startDate:x(y(S(b,9),9)),endDate:x(y(S(b,11),17)),parentId:null,sequence:"5",dependencies:[{targetId:"4",type:"FS"}]},{id:"7",name:"Frontend UI Design",startDate:x(y(S(b,12),9)),endDate:x(y(S(b,17),17)),parentId:"5",sequence:"4.1",dependencies:[{targetId:"5",type:"FS"}]},{id:"8",name:"Backend Database Schema Design",startDate:x(y(S(b,14),9)),endDate:x(y(S(b,17),17)),parentId:"6",sequence:"5.1",dependencies:[{targetId:"6",type:"FS"}]},{id:"9",name:"User Authentication Development",startDate:x(y(S(b,18),9)),endDate:x(y(S(b,22),17)),parentId:"7",sequence:"6",dependencies:[{targetId:"7",type:"FS"}]},{id:"10",name:"Payment Integration Development",startDate:x(y(S(b,18),9)),endDate:x(y(S(b,22),17)),parentId:"8",sequence:"7",dependencies:[{targetId:"8",type:"FS"}]},{id:"11",name:"API Endpoints Development",startDate:x(y(S(b,23),9)),endDate:x(y(S(b,27),17)),parentId:"9",sequence:"6.1",dependencies:[{targetId:"9",type:"SS"}]},{id:"12",name:"Frontend Component Development",startDate:x(y(S(b,23),9)),endDate:x(y(S(b,28),17)),parentId:"7",sequence:"4.2",dependencies:[{targetId:"7",type:"SS"}]},{id:"13",name:"Integration of Frontend and Backend",startDate:x(y(S(b,28),9)),endDate:x(y(S(b,31),17)),parentId:null,sequence:"8",dependencies:[{targetId:"11",type:"FS"},{targetId:"12",type:"FS"}]},{id:"14",name:"Performance Optimization",startDate:x(y(S(b,32),9)),endDate:x(y(S(b,35),17)),parentId:null,sequence:"9",dependencies:[{targetId:"13",type:"FS"}]},{id:"15",name:"User Acceptance Testing (UAT)",startDate:x(y(S(b,36),9)),endDate:x(y(S(b,39),17)),parentId:null,sequence:"10",dependencies:[{targetId:"14",type:"FS"}]},{id:"16",name:"Bug Fixing and Refinement",startDate:x(y(S(b,40),9)),endDate:x(y(S(b,43),17)),parentId:null,sequence:"11",dependencies:[{targetId:"15",type:"FS"}]},{id:"17",name:"Pre-Release Demo",startDate:x(y(S(b,44),9)),endDate:x(y(S(b,46),17)),parentId:null,sequence:"12",dependencies:[{targetId:"16",type:"FS"}]},{id:"18",name:"Final Release and Deployment",startDate:x(y(S(b,47),9)),endDate:x(y(S(b,50),17)),parentId:null,sequence:"13",dependencies:[{targetId:"17",type:"FS"}]},{id:"19",name:"Post-Release Monitoring",startDate:x(y(S(b,51),9)),endDate:x(y(S(b,53),17)),parentId:null,sequence:"14",dependencies:[{targetId:"18",type:"FS"}]},{id:"20",name:"Community Engagement and Feedback Collection",startDate:x(y(S(b,54),9)),endDate:x(y(S(b,57),17)),parentId:null,sequence:"15",dependencies:[{targetId:"19",type:"FS"}]},{id:"21",name:"Feature Iteration and Updates",startDate:x(y(S(b,58),9)),endDate:x(y(S(b,60),17)),parentId:null,sequence:"16",dependencies:[{targetId:"20",type:"SS"}]},{id:"22",name:"Maintenance and Bug Fixing",startDate:x(y(S(b,61),9)),endDate:x(y(S(b,63),17)),parentId:null,sequence:"17",dependencies:[{targetId:"21",type:"FS"}]},{id:"23",name:"Database Optimization",startDate:x(y(S(b,64),9)),endDate:x(y(S(b,67),17)),parentId:null,sequence:"18",dependencies:[{targetId:"22",type:"FS"}]},{id:"24",name:"Scaling Infrastructure",startDate:x(y(S(b,68),9)),endDate:x(y(S(b,71),17)),parentId:null,sequence:"19",dependencies:[{targetId:"23",type:"FS"}]},{id:"25",name:"Security Patch Deployment",startDate:x(y(S(b,72),9)),endDate:x(y(S(b,74),17)),parentId:null,sequence:"20",dependencies:[{targetId:"24",type:"FS"}]},{id:"26",name:"Code Refactoring",startDate:x(y(S(b,75),9)),endDate:x(y(S(b,77),17)),parentId:null,sequence:"21",dependencies:[{targetId:"25",type:"FS"}]},{id:"27",name:"Mobile Optimization",startDate:x(y(S(b,78),9)),endDate:x(y(S(b,80),17)),parentId:null,sequence:"22",dependencies:[{targetId:"26",type:"FS"}]},{id:"28",name:"Testing Environment Setup",startDate:x(y(S(b,81),9)),endDate:x(y(S(b,83),17)),parentId:null,sequence:"23",dependencies:[{targetId:"27",type:"FS"}]},{id:"29",name:"Load Testing",startDate:x(y(S(b,84),9)),endDate:x(y(S(b,86),17)),parentId:null,sequence:"24",dependencies:[{targetId:"28",type:"FS"}]},{id:"30",name:"API Rate Limiting Implementation",startDate:x(y(S(b,87),9)),endDate:x(y(S(b,89),17)),parentId:null,sequence:"25",dependencies:[{targetId:"29",type:"FS"}]},{id:"31",name:"Security Audit",startDate:x(y(S(b,90),9)),endDate:x(y(S(b,92),17)),parentId:null,sequence:"26",dependencies:[{targetId:"30",type:"FS"}]},{id:"32",name:"Documentation Update",startDate:x(y(S(b,93),9)),endDate:x(y(S(b,96),17)),parentId:null,sequence:"27",dependencies:[{targetId:"31",type:"FS"}]},{id:"33",name:"Feature Freeze",startDate:x(y(S(b,97),9)),endDate:x(y(S(b,99),17)),parentId:null,sequence:"28",dependencies:[{targetId:"32",type:"FS"}]},{id:"34",name:"Release Candidate Preparation",startDate:x(y(S(b,100),9)),endDate:x(y(S(b,102),17)),parentId:null,sequence:"29",dependencies:[{targetId:"33",type:"FS"}]},{id:"35",name:"User Documentation",startDate:x(y(S(b,103),9)),endDate:x(y(S(b,105),17)),parentId:null,sequence:"30",dependencies:[{targetId:"32",type:"SS"}]},{id:"36",name:"Final Testing",startDate:x(y(S(b,106),9)),endDate:x(y(S(b,109),17)),parentId:null,sequence:"31",dependencies:[{targetId:"34",type:"FS"}]},{id:"37",name:"Code Deployment",startDate:x(y(S(b,110),9)),endDate:x(y(S(b,112),17)),parentId:null,sequence:"32",dependencies:[{targetId:"36",type:"FS"}]},{id:"38",name:"Monitoring Setup",startDate:x(y(S(b,113),9)),endDate:x(y(S(b,115),17)),parentId:null,sequence:"33",dependencies:[{targetId:"37",type:"FS"}]},{id:"39",name:"Post-Deployment Testing",startDate:x(y(S(b,116),9)),endDate:x(y(S(b,118),17)),parentId:null,sequence:"34",dependencies:[{targetId:"38",type:"FS"}]},{id:"40",name:"Bug Tracking and Resolution",startDate:x(y(S(b,119),9)),endDate:x(y(S(b,121),17)),parentId:null,sequence:"35",dependencies:[{targetId:"39",type:"FS"}]},{id:"41",name:"Feature Enhancement Planning",startDate:x(y(S(b,122),9)),endDate:x(y(S(b,124),17)),parentId:null,sequence:"36",dependencies:[{targetId:"40",type:"FS"}]},{id:"42",name:"New Feature Design",startDate:x(y(S(b,125),9)),endDate:x(y(S(b,128),17)),parentId:"41",sequence:"36.1",dependencies:[{targetId:"41",type:"FS"}]},{id:"43",name:"New Feature Development",startDate:x(y(S(b,129),9)),endDate:x(y(S(b,133),17)),parentId:"42",sequence:"36.2",dependencies:[{targetId:"42",type:"FS"}]},{id:"44",name:"Testing of New Feature",startDate:x(y(S(b,134),9)),endDate:x(y(S(b,136),17)),parentId:"43",sequence:"36.3",dependencies:[{targetId:"43",type:"FS"}]},{id:"45",name:"User Acceptance Testing (UAT) for New Feature",startDate:x(y(S(b,137),9)),endDate:x(y(S(b,140),17)),parentId:"44",sequence:"36.4",dependencies:[{targetId:"44",type:"FS"}]},{id:"46",name:"Feature Release",startDate:x(y(S(b,141),9)),endDate:x(y(S(b,143),17)),parentId:null,sequence:"37",dependencies:[{targetId:"45",type:"FS"}]},{id:"47",name:"Performance Testing for New Feature",startDate:x(y(S(b,144),9)),endDate:x(y(S(b,146),17)),parentId:null,sequence:"38",dependencies:[{targetId:"46",type:"FS"}]},{id:"48",name:"Final Code Review for New Feature",startDate:x(y(S(b,147),9)),endDate:x(y(S(b,149),17)),parentId:null,sequence:"39",dependencies:[{targetId:"47",type:"FS"}]},{id:"49",name:"Production Deployment",startDate:x(y(S(b,150),9)),endDate:x(y(S(b,152),17)),parentId:null,sequence:"40",dependencies:[{targetId:"48",type:"FS"}]},{id:"50",name:"Post-Deployment Support",startDate:x(y(S(b,153),9)),endDate:x(y(S(b,156),17)),parentId:null,sequence:"41",dependencies:[{targetId:"49",type:"FS"}]}];function sr({tasks:s,onTasksChange:c,ganttHeight:t,columnWidth:r}){var D;const n=Q(l=>l.rawTasks),e=Q(l=>l.setRawTasks),a=Q(l=>l.transformedTasks),i=Q(l=>l.setTransformedTasks),d=Q(l=>l.selectedScale),h=Q(l=>l.setSelectedScale),v=Q(l=>l.bottomRowCells),p=Q(l=>l.setBottomRowCells),f=Q(l=>l.topHeaderGroups),g=Q(l=>l.setTopHeaderGroups);ee.useEffect(()=>{s.length===0?e(rr):e(s)},[s]),ee.useEffect(()=>{n.length&&Kn(n,d,p,g,i)},[n,d]);const $=ee.useRef(null),u=et({count:a.length,getScrollElement:()=>$.current,estimateSize:()=>Le,overscan:5}),w=et({horizontal:!0,count:v.length,getScrollElement:()=>$.current,estimateSize:l=>{var m;return((m=v[l])==null?void 0:m.widthPx)??32},overscan:5}),T=w.getVirtualItems(),R=((D=T[0])==null?void 0:D.start)??0,M=T[T.length-1],L=M?M.start+M.size:0;function N(l,m,C,Y){return l+m>=C&&l<=Y}const j=ee.useMemo(()=>v.reduce((l,m)=>l+m.widthPx,0),[v]),E=u.getVirtualItems().map(l=>l.index);return ee.useEffect(()=>{if(!v.length)return;const l=requestAnimationFrame(()=>{w.measure()});return()=>cancelAnimationFrame(l)},[v,w]),W.jsx("section",{style:{position:"relative",overflow:"auto",height:typeof t=="number"?`${t}px`:t,width:typeof r=="number"?`${r}px`:r,backgroundColor:"#FFF",fontFamily:"Noto Sans, sans-serif"},children:W.jsx("div",{style:{width:"100%",height:"100%",overflow:"hidden",backgroundColor:"#FFF"},children:W.jsxs("section",{style:{position:"relative",display:"flex",height:"100%",width:"100%",flexDirection:"column"},children:[W.jsx("div",{style:{position:"absolute",top:"3px",right:"16px",zIndex:50,display:"flex",justifyContent:"flex-end",alignItems:"center"},children:W.jsx("select",{style:{padding:"4px 8px",fontSize:"14px",borderRadius:"6px",border:"1px solid #E6E7E9"},value:d,onChange:l=>{const m=l.target.value;h(m)},children:Object.keys(he).map(l=>W.jsx("option",{value:l,children:l},l))})}),W.jsxs("div",{ref:$,className:"List",style:{height:"100%",width:"100%",overflow:"auto"},children:[W.jsx(Qn,{topHeaderGroups:f,bottomRowCells:v,selectedScale:d,width:j,scrollRef:$}),W.jsxs("div",{style:{height:`${u.getTotalSize()}px`,width:`${j}px`,position:"relative"},children:[W.jsx(tr,{transformedTasks:a,visibleRowIndexes:E}),u.getVirtualItems().map(l=>{const m=a[l.index],C=m.barLeft??0,Y=m.barWidth??0,V=N(C,Y,R,L);return W.jsx("div",{style:{position:"absolute",top:0,left:0,height:`${l.size-1}px`,transform:`translateY(${l.start}px)`,display:"flex",width:"100%",alignItems:"center",borderBottom:"1px solid #E6E7E9"},children:V&&W.jsx(W.Fragment,{children:W.jsx(Un,{currentTask:m,onTasksChange:c})})},l.index)})]})]})]})})})}exports.ReactGanttChart=sr;
|
|
4
|
+
color: hsl(${Math.max(0,Math.min(120-120*v,120))}deg 100% 31%);`,n==null?void 0:n.key)}return(c=n==null?void 0:n.onChange)==null||c.call(n,r),r}return t.updateDeps=o=>{e=o},t}function Ft(s,a){if(s===void 0)throw new Error("Unexpected undefined");return s}const Tn=(s,a)=>Math.abs(s-a)<1.01,En=(s,a,n)=>{let e;return function(...r){s.clearTimeout(e),e=s.setTimeout(()=>a.apply(this,r),n)}},Ht=s=>{const{offsetWidth:a,offsetHeight:n}=s;return{width:a,height:n}},In=s=>s,zn=s=>{const a=Math.max(s.startIndex-s.overscan,0),n=Math.min(s.endIndex+s.overscan,s.count-1),e=[];for(let r=a;r<=n;r++)e.push(r);return e},Cn=(s,a)=>{const n=s.scrollElement;if(!n)return;const e=s.targetWindow;if(!e)return;const r=o=>{const{width:i,height:u}=o;a({width:Math.round(i),height:Math.round(u)})};if(r(Ht(n)),!e.ResizeObserver)return()=>{};const t=new e.ResizeObserver(o=>{const i=()=>{const u=o[0];if(u!=null&&u.borderBoxSize){const c=u.borderBoxSize[0];if(c){r({width:c.inlineSize,height:c.blockSize});return}}r(Ht(n))};s.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(i):i()});return t.observe(n,{box:"border-box"}),()=>{t.unobserve(n)}},Yt={passive:!0},Ut=typeof window>"u"?!0:"onscrollend"in window,Ln=(s,a)=>{const n=s.scrollElement;if(!n)return;const e=s.targetWindow;if(!e)return;let r=0;const t=s.options.useScrollendEvent&&Ut?()=>{}:En(e,()=>{a(r,!1)},s.options.isScrollingResetDelay),o=d=>()=>{const{horizontal:f,isRtl:h}=s.options;r=f?n.scrollLeft*(h&&-1||1):n.scrollTop,t(),a(r,d)},i=o(!0),u=o(!1);u(),n.addEventListener("scroll",i,Yt);const c=s.options.useScrollendEvent&&Ut;return c&&n.addEventListener("scrollend",u,Yt),()=>{n.removeEventListener("scroll",i),c&&n.removeEventListener("scrollend",u)}},Rn=(s,a,n)=>{if(a!=null&&a.borderBoxSize){const e=a.borderBoxSize[0];if(e)return Math.round(e[n.options.horizontal?"inlineSize":"blockSize"])}return s[n.options.horizontal?"offsetWidth":"offsetHeight"]},Pn=(s,{adjustments:a=0,behavior:n},e)=>{var r,t;const o=s+a;(t=(r=e.scrollElement)==null?void 0:r.scrollTo)==null||t.call(r,{[e.options.horizontal?"left":"top"]:o,behavior:n})};class _n{constructor(a){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let n=null;const e=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(r=>{r.forEach(t=>{const o=()=>{this._measureElement(t.target,t)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(o):o()})}));return{disconnect:()=>{var r;(r=e())==null||r.disconnect(),n=null},observe:r=>{var t;return(t=e())==null?void 0:t.observe(r,{box:"border-box"})},unobserve:r=>{var t;return(t=e())==null?void 0:t.unobserve(r)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([e,r])=>{typeof r>"u"&&delete n[e]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:In,rangeExtractor:zn,onChange:()=>{},measureElement:Rn,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...n}},this.notify=n=>{var e,r;(r=(e=this.options).onChange)==null||r.call(e,this,n)},this.maybeNotify=tt(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:process.env.NODE_ENV!=="production"&&"maybeNotify",debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const e=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==e){if(this.cleanup(),!e){this.maybeNotify();return}this.scrollElement=e,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this.elementsCache.forEach(r=>{this.observer.observe(r)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,r=>{this.scrollRect=r,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(r,t)=>{this.scrollAdjustments=0,this.scrollDirection=t?this.getScrollOffset()<r?"forward":"backward":null,this.scrollOffset=r,this.isScrolling=t,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(n,e)=>{const r=new Map,t=new Map;for(let o=e-1;o>=0;o--){const i=n[o];if(r.has(i.lane))continue;const u=t.get(i.lane);if(u==null||i.end>u.end?t.set(i.lane,i):i.end<u.end&&r.set(i.lane,!0),r.size===this.options.lanes)break}return t.size===this.options.lanes?Array.from(t.values()).sort((o,i)=>o.end===i.end?o.index-i.index:o.end-i.end)[0]:void 0},this.getMeasurementOptions=tt(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(n,e,r,t,o)=>(this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:e,scrollMargin:r,getItemKey:t,enabled:o}),{key:!1}),this.getMeasurements=tt(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:e,scrollMargin:r,getItemKey:t,enabled:o},i)=>{if(!o)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(d=>{this.itemSizeCache.set(d.key,d.size)}));const u=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const c=this.measurementsCache.slice(0,u);for(let d=u;d<n;d++){const f=t(d),h=this.options.lanes===1?c[d-1]:this.getFurthestMeasurement(c,d),y=h?h.end+this.options.gap:e+r,S=i.get(f),l=typeof S=="number"?S:this.options.estimateSize(d),v=y+l,p=h?h.lane:d%this.options.lanes;c[d]={index:d,start:y,size:l,end:v,key:f,lane:p}}return this.measurementsCache=c,c},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=tt(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,e,r,t)=>this.range=n.length>0&&e>0?jn({measurements:n,outerSize:e,scrollOffset:r,lanes:t}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getVirtualIndexes=tt(()=>{let n=null,e=null;const r=this.calculateRange();return r&&(n=r.startIndex,e=r.endIndex),this.maybeNotify.updateDeps([this.isScrolling,n,e]),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,e]},(n,e,r,t,o)=>t===null||o===null?[]:n({startIndex:t,endIndex:o,overscan:e,count:r}),{key:process.env.NODE_ENV!=="production"&&"getVirtualIndexes",debug:()=>this.options.debug}),this.indexFromElement=n=>{const e=this.options.indexAttribute,r=n.getAttribute(e);return r?parseInt(r,10):(console.warn(`Missing attribute name '${e}={index}' on measured element.`),-1)},this._measureElement=(n,e)=>{const r=this.indexFromElement(n),t=this.measurementsCache[r];if(!t)return;const o=t.key,i=this.elementsCache.get(o);i!==n&&(i&&this.observer.unobserve(i),this.observer.observe(n),this.elementsCache.set(o,n)),n.isConnected&&this.resizeItem(r,this.options.measureElement(n,e,this))},this.resizeItem=(n,e)=>{const r=this.measurementsCache[n];if(!r)return;const t=this.itemSizeCache.get(r.key)??r.size,o=e-t;o!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(r,o,this):r.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",o),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=o,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(r.index),this.itemSizeCache=new Map(this.itemSizeCache.set(r.key,e)),this.notify(!1))},this.measureElement=n=>{if(!n){this.elementsCache.forEach((e,r)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(r))});return}this._measureElement(n,void 0)},this.getVirtualItems=tt(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,e)=>{const r=[];for(let t=0,o=n.length;t<o;t++){const i=n[t],u=e[i];r.push(u)}return r},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const e=this.getMeasurements();if(e.length!==0)return Ft(e[Gt(0,e.length-1,r=>Ft(e[r]).start,n)])},this.getOffsetForAlignment=(n,e,r=0)=>{const t=this.getSize(),o=this.getScrollOffset();e==="auto"&&(e=n>=o+t?"end":"start"),e==="center"?n+=(r-t)/2:e==="end"&&(n-=t);const i=this.getTotalSize()+this.options.scrollMargin-t;return Math.max(Math.min(i,n),0)},this.getOffsetForIndex=(n,e="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const r=this.measurementsCache[n];if(!r)return;const t=this.getSize(),o=this.getScrollOffset();if(e==="auto")if(r.end>=o+t-this.options.scrollPaddingEnd)e="end";else if(r.start<=o+this.options.scrollPaddingStart)e="start";else return[o,e];const i=e==="end"?r.end+this.options.scrollPaddingEnd:r.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(i,e,r.size),e]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(n,{align:e="start",behavior:r}={})=>{r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(n,e),{adjustments:void 0,behavior:r})},this.scrollToIndex=(n,{align:e="auto",behavior:r}={})=>{r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),n=Math.max(0,Math.min(n,this.options.count-1));let t=0;const o=10,i=c=>{if(!this.targetWindow)return;const d=this.getOffsetForIndex(n,c);if(!d){console.warn("Failed to get offset for index:",n);return}const[f,h]=d;this._scrollToOffset(f,{adjustments:void 0,behavior:r}),this.targetWindow.requestAnimationFrame(()=>{const y=this.getScrollOffset(),S=this.getOffsetForIndex(n,h);if(!S){console.warn("Failed to get offset for index:",n);return}Tn(S[0],y)||u(h)})},u=c=>{this.targetWindow&&(t++,t<o?(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("Schedule retry",t,o),this.targetWindow.requestAnimationFrame(()=>i(c))):console.warn(`Failed to scroll to index ${n} after ${o} attempts.`))};i(e)},this.scrollBy=(n,{behavior:e}={})=>{e==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+n,{adjustments:void 0,behavior:e})},this.getTotalSize=()=>{var n;const e=this.getMeasurements();let r;if(e.length===0)r=this.options.paddingStart;else if(this.options.lanes===1)r=((n=e[e.length-1])==null?void 0:n.end)??0;else{const t=Array(this.options.lanes).fill(null);let o=e.length-1;for(;o>=0&&t.some(i=>i===null);){const i=e[o];t[i.lane]===null&&(t[i.lane]=i.end),o--}r=Math.max(...t.filter(i=>i!==null))}return Math.max(r-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(n,{adjustments:e,behavior:r})=>{this.options.scrollToFn(n,{behavior:r,adjustments:e},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(a)}}const Gt=(s,a,n,e)=>{for(;s<=a;){const r=(s+a)/2|0,t=n(r);if(t<e)s=r+1;else if(t>e)a=r-1;else return r}return s>0?s-1:0};function jn({measurements:s,outerSize:a,scrollOffset:n,lanes:e}){const r=s.length-1,t=u=>s[u].start;if(s.length<=e)return{startIndex:0,endIndex:r};let o=Gt(0,r,t,n),i=o;if(e===1)for(;i<r&&s[i].end<n+a;)i++;else if(e>1){const u=Array(e).fill(0);for(;i<r&&u.some(d=>d<n+a);){const d=s[i];u[d.lane]=d.end,i++}const c=Array(e).fill(n+a);for(;o>=0&&c.some(d=>d>=n);){const d=s[o];c[d.lane]=d.start,o--}o=Math.max(0,o-o%e),i=Math.min(r,i+(e-1-i%e))}return{startIndex:o,endIndex:i}}const qt=typeof document<"u"?$t.useLayoutEffect:$t.useEffect;function Wn(s){const a=$t.useReducer(()=>({}),{})[1],n={...s,onChange:(r,t)=>{var o;t?Xt.flushSync(a):a(),(o=s.onChange)==null||o.call(s,r,t)}},[e]=$t.useState(()=>new _n(n));return e.setOptions(n),qt(()=>e._didMount(),[]),qt(()=>e._willUpdate()),e}function Bt(s){return Wn({observeElementRect:Cn,observeElementOffset:Ln,scrollToFn:Pn,...s})}function Nn({transformedTasks:s,bottomRowCells:a,scrollRef:n}){var d;const e=Bt({count:s.length,getScrollElement:()=>n.current,estimateSize:()=>vt,overscan:5}),r=Bt({horizontal:!0,count:a.length,getScrollElement:()=>n.current,estimateSize:f=>{var h;return((h=a[f])==null?void 0:h.widthPx)??32},overscan:5}),t=r.getVirtualItems(),o=((d=t[0])==null?void 0:d.start)??0,i=t[t.length-1],u=i?i.start+i.size:0,c=j.useMemo(()=>(f,h)=>f+h>=o&&f<=u,[o,u]);return j.useEffect(()=>{if(!a.length)return;const f=requestAnimationFrame(()=>{r.measure()});return()=>cancelAnimationFrame(f)},[a,r]),{rowVirtualizer:e,columnVirtualizer:r,isBarVisible:c}}function An(s,a="gantt-container"){const[n,e]=j.useState(()=>typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light");j.useEffect(()=>{if(typeof window>"u")return;const i=window.matchMedia("(prefers-color-scheme: dark)"),u=c=>{e(c.matches?"dark":"light")};return i.addEventListener("change",u),()=>i.removeEventListener("change",u)},[]);const r=j.useMemo(()=>!s||s==="system"?n:s,[s,n]),t=j.useMemo(()=>{const i=[a];return s&&i.push(r),i.join(" ")},[a,s,r]);return{resolvedTheme:r,containerClassName:t,dataTheme:s?r:void 0}}const Fn=600,Hn="100%",Yn="month";function Un({tasks:s=[],onTasksChange:a,height:n=Fn,width:e=Hn,theme:r,defaultScale:t=Yn,className:o}){const{rawTasks:i,transformedTasks:u,bottomRowCells:c,selectedScale:d,setRawTasks:f,setTransformedTasks:h,setBottomRowCells:y,setSelectedScale:S,getTotalWidth:l}=kn(),v=j.useRef(null),{rowVirtualizer:p,isBarVisible:D}=Nn({transformedTasks:u,bottomRowCells:c,scrollRef:v}),{containerClassName:x,dataTheme:z}=An(r,o?`gantt-container ${o}`:"gantt-container");j.useEffect(()=>{t&&t!==d&&S(t)},[]),j.useEffect(()=>{s.length>0&&f(s)},[s,f]),j.useEffect(()=>{if(!i.length)return;const{bottomCells:$,transformedTasks:g}=$n(i,d);y($),h(g)},[i,d,y,h]);const R=$=>{S($)},k=l(),w={height:typeof n=="number"?`${n}px`:n,width:typeof e=="number"?`${e}px`:e};return P.jsxs("section",{className:x,"data-theme":z,style:w,children:[P.jsx("div",{className:"gantt-toolbar",children:P.jsx(wn,{selectedScale:d,onScaleChange:R})}),P.jsx("div",{className:"gantt-main",children:P.jsxs("div",{ref:v,className:"gantt-scroll-container",children:[P.jsx("div",{className:"gantt-header-wrapper",style:{width:`${k}px`},children:P.jsx(vn,{bottomRowCells:c,selectedScale:d,width:k,scrollRef:v})}),P.jsxs("div",{className:"gantt-content",style:{height:`${p.getTotalSize()}px`,width:`${k}px`},children:[P.jsx("div",{className:"gantt-rows",children:p.getVirtualItems().map($=>{const g=u[$.index];return P.jsx("div",{className:"gantt-task-row",style:{height:`${$.size-1}px`,transform:`translateY(${$.start}px)`}},`row-${g.id}`)})}),P.jsx(bn,{transformedTasks:u}),p.getVirtualItems().map($=>{const g=u[$.index],m=g.barLeft??0,T=g.barWidth??0;return D(m,T)?P.jsx("div",{style:{position:"absolute",top:0,left:0,height:`${$.size-1}px`,transform:`translateY(${$.start}px)`,display:"flex",alignItems:"center"},children:P.jsx(sn,{currentTask:g,onTasksChange:a})},g.id):null})]})]})})]})}exports.ReactGanttChart=Un;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { GanttScaleKey as GanttScaleKey_2 } from 'types/gantt';
|
|
2
|
+
import { GanttTheme as GanttTheme_2 } from 'types/gantt';
|
|
3
|
+
import { JSX } from 'react/jsx-runtime';
|
|
4
|
+
import { Task as Task_2 } from 'types/task';
|
|
5
|
+
|
|
6
|
+
export declare type DependencyType = 'FS' | 'SS' | 'FF' | 'SF';
|
|
7
|
+
|
|
8
|
+
export declare interface GanttProps {
|
|
9
|
+
/** 태스크 데이터 배열 */
|
|
10
|
+
tasks?: Task_2[];
|
|
11
|
+
/** 태스크 변경 시 호출되는 콜백 */
|
|
12
|
+
onTasksChange?: (updatedTasks: Task_2[]) => void;
|
|
13
|
+
/** 차트 높이 (px 또는 CSS 값) */
|
|
14
|
+
height?: number | string;
|
|
15
|
+
/** 차트 너비 (px 또는 CSS 값) */
|
|
16
|
+
width?: number | string;
|
|
17
|
+
/** 테마 설정 - 'light', 'dark', 또는 'system' */
|
|
18
|
+
theme?: GanttTheme_2;
|
|
19
|
+
/** 기본 스케일 설정 */
|
|
20
|
+
defaultScale?: GanttScaleKey_2;
|
|
21
|
+
/** 추가 CSS 클래스명 */
|
|
22
|
+
className?: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export declare type GanttScaleKey = 'day' | 'week' | 'month' | 'year';
|
|
26
|
+
|
|
27
|
+
/** 테마 타입 - 'light', 'dark', 또는 'system' (시스템 설정 따름) */
|
|
28
|
+
export declare type GanttTheme = 'light' | 'dark' | 'system';
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Gantt 차트 메인 컴포넌트
|
|
32
|
+
* 가상화를 사용하여 대량의 태스크를 효율적으로 렌더링
|
|
33
|
+
*/
|
|
34
|
+
export declare function ReactGanttChart({ tasks, onTasksChange, height, width, theme, defaultScale, className, }: GanttProps): JSX.Element;
|
|
35
|
+
|
|
36
|
+
export declare interface Task {
|
|
37
|
+
id: string;
|
|
38
|
+
name: string;
|
|
39
|
+
startDate: string;
|
|
40
|
+
endDate: string;
|
|
41
|
+
parentId: string | null;
|
|
42
|
+
sequence: string;
|
|
43
|
+
dependencies?: TaskDependency[];
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export declare interface TaskDependency {
|
|
47
|
+
targetId: string;
|
|
48
|
+
type: DependencyType;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export { }
|