@nocobase/plugin-gantt 1.4.0-beta.1 → 1.4.0-beta.2

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.
@@ -7,4 +7,250 @@
7
7
  * For more information, please refer to: https://www.nocobase.com/agreement.
8
8
  */
9
9
 
10
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@nocobase/client"),require("@formily/react"),require("react"),require("@emotion/css"),require("react-i18next"),require("antd"),require("antd-style"),require("@ant-design/icons"),require("@formily/antd-v5"),require("@formily/shared"),require("@nocobase/utils/client"),require("lodash")):"function"==typeof define&&define.amd?define("@nocobase/plugin-gantt",["@nocobase/client","@formily/react","react","@emotion/css","react-i18next","antd","antd-style","@ant-design/icons","@formily/antd-v5","@formily/shared","@nocobase/utils/client","lodash"],t):"object"==typeof exports?exports["@nocobase/plugin-gantt"]=t(require("@nocobase/client"),require("@formily/react"),require("react"),require("@emotion/css"),require("react-i18next"),require("antd"),require("antd-style"),require("@ant-design/icons"),require("@formily/antd-v5"),require("@formily/shared"),require("@nocobase/utils/client"),require("lodash")):e["@nocobase/plugin-gantt"]=t(e["@nocobase/client"],e["@formily/react"],e.react,e["@emotion/css"],e["react-i18next"],e.antd,e["antd-style"],e["@ant-design/icons"],e["@formily/antd-v5"],e["@formily/shared"],e["@nocobase/utils/client"],e.lodash)}(self,function(e,t,r,n,o,a,i,l,c,s,u,d){return function(){"use strict";var f,p,h,m={482:function(e){e.exports=l},964:function(e){e.exports=n},632:function(e){e.exports=c},505:function(e){e.exports=t},875:function(e){e.exports=s},772:function(t){t.exports=e},584:function(e){e.exports=u},721:function(e){e.exports=a},202:function(e){e.exports=i},467:function(e){e.exports=d},156:function(e){e.exports=r},238:function(e){e.exports=o}},v={};function g(e){var t=v[e];if(void 0!==t)return t.exports;var r=v[e]={exports:{}};return m[e](r,r.exports,g),r.exports}g.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return g.d(t,{a:t}),t},g.d=function(e,t){for(var r in t)g.o(t,r)&&!g.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},g.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},g.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var b={};g.r(b),g.d(b,{Gantt:function(){return rv},PluginGanttClient:function(){return rO},default:function(){return rP}});var y=g("772"),x=g("156"),S=g.n(x),w=g("505");function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function C(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r,n,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var a=[],i=!0,l=!1;try{for(o=o.call(e);!(i=(r=o.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){l=!0,n=e}finally{try{!i&&null!=o.return&&o.return()}finally{if(l)throw n}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return k(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return k(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var O=(0,x.createContext)({});O.displayName="GanttBlockContext";var P=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a=arguments.length>5?arguments[5]:void 0,i=arguments.length>6?arguments[6]:void 0,l=arguments.length>7?arguments[7]:void 0;return e.forEach(function(e){var c,s,u=a(e),d=parseFloat((100*e[t.progress]).toFixed(2)),f=(0,y.getLabelFormatValue)(l,e[t.title]);e.children&&e.children.length?(r.push({start:new Date(null!==(c=e[t.start])&&void 0!==c?c:void 0),end:new Date(null!==(s=e[t.end])&&void 0!==s?s:void 0),name:f,id:e[i]+"",type:"project",progress:d>100?100:d||0,hideChildren:o,project:n,color:e.color,isDisabled:u}),P(e.children,t,r,e.id+"",o,a,i,l)):r.push({start:e[t.start]?new Date(e[t.start]):void 0,end:new Date(e[t.end]||e[t.start]),name:f,id:e[i]+"",type:t.end?"task":"milestone",progress:d>100?100:d||0,project:n,color:e.color,isDisabled:u})}),r},E=function(e){var t=e.fieldNames,r=e.timeRange,n=e.resource,o=(0,w.useField)(),a=(0,y.useBlockRequestContext)().service;return S().createElement(O.Provider,{value:{field:o,service:a,resource:n,fieldNames:t,timeRange:r}},e.children)},T=function(e){var t,r,n,o=(0,y.useCollectionManager_deprecated)(e.dataSource).getCollection(e.collection,e.dataSource),a={filter:null===(t=e.params)||void 0===t?void 0:t.filter,paginate:!1,sort:[(null==o?void 0:o.primaryKey)||"id"]};return(null==o?void 0:o.tree)&&(a.tree=!0),S().createElement("div",{"aria-label":"block-item-gantt",role:"button"},S().createElement(y.TableBlockProvider,(r=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n,o,a;n=e,o=t,a=r[t],o in n?Object.defineProperty(n,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[o]=a})}return e}({},e),n=(n={params:a},n),Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r.push.apply(r,n)}return r})(Object(n)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))}),r),S().createElement(E,e)))},D=function(){return(0,x.useContext)(O)},j=function(){var e,t,r=D(),n=r.fieldNames,o=C((0,x.useState)([]),2),a=o[0],i=o[1],l=(0,y.useCollection_deprecated)(),c=l.getPrimaryKey,s=l.name,u=l.template,d=l.writableView,f=(0,y.useACLRoleContext)().parseAction,p=(0,y.useTableBlockContext)(),h=C((0,x.useState)(!1),2),m=h[0],v=h[1],g=c(),b=null===(e=(0,y.useCollection)().fields.find(function(e){return e.name===(null==n?void 0:n.title)}))||void 0===e?void 0:e.uiSchema,S=function(e){var t=null==e?void 0:e[g],r=f("".concat(s,":update"),{schema:{},recordPkValue:t});return"view"===u&&!d||!r};return(0,x.useEffect)(function(){var e;if(v(!0),!(null==r?void 0:null===(e=r.service)||void 0===e?void 0:e.loading)){var t,n=P(null===(t=r.service.data)||void 0===t?void 0:t.data,r.fieldNames,[],void 0,!1,S,g,b);i(n),v(!1),r.field.data=n,a.length>0&&p.setExpandFlag(!0)}},[null==r?void 0:null===(t=r.service)||void 0===t?void 0:t.loading]),{fieldNames:r.fieldNames,timeRange:r.timeRange,onExpanderClick:function(e){var t=r.field.data.map(function(t){return t.id===e.id?e:t});i(t),r.field.data=t},expandAndCollapseAll:function(e){var t,n=P(null===(t=r.service.data)||void 0===t?void 0:t.data,r.fieldNames,[],void 0,e,S,g,b);i(n),r.field.data=n},tasks:a,loading:m}},M=g("238"),A=function(){return(0,M.useTranslation)("gantt")},N=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"string",r=(0,y.useCompile)(),n=(0,y.useCollection_deprecated)().fields;return null==n?void 0:null===(e=n.filter(function(e){return"string"==typeof t?e.type===t:t.includes(e.type)}))||void 0===e?void 0:e.map(function(e){var t;return{value:e.name,label:r(null==e?void 0:null===(t=e.uiSchema)||void 0===t?void 0:t.title)}})};function F(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var I=new y.SchemaSettings({name:"GanttBlockSettings",items:[{name:"title",Component:y.SchemaSettingsBlockTitleItem},{name:"titleField",Component:y.SchemaSettingsSelectItem,useComponentProps:function(){var e,t=A().t,r=(0,w.useFieldSchema)(),n=(null==r?void 0:null===(e=r["x-decorator-props"])||void 0===e?void 0:e.fieldNames)||{},o=D().service,a=(0,w.useField)(),i=(0,y.useDesignable)().dn;return{title:t("Title field"),value:n.title,options:N("string"),onChange:function(e){var t,n=a.decoratorProps.fieldNames||{};n.title=e,a.decoratorProps.params=n,r["x-decorator-props"].params=n,r["x-decorator-props"].fieldNames=n,o.refresh(),i.emit("patch",{schema:(F(t={},"x-uid",r["x-uid"]),F(t,"x-decorator-props",a.decoratorProps),t)}),i.refresh()}}}},{name:"timeScale",Component:y.SchemaSettingsSelectItem,useComponentProps:function(){var e,t=A().t,r=(0,w.useFieldSchema)(),n=(null==r?void 0:null===(e=r["x-decorator-props"])||void 0===e?void 0:e.fieldNames)||{},o=(0,w.useField)(),a=D().service,i=(0,y.useDesignable)().dn,l=(0,y.useCompile)();return{title:t("Time scale"),value:n.range||"day",options:[{label:l('{{t("Hour")}}'),value:"hour",color:"orange"},{label:l('{{t("Quarter of day")}}'),value:"quarterDay",color:"default"},{label:l('{{t("Half of day")}}'),value:"halfDay",color:"blue"},{label:l('{{t("Day")}}'),value:"day",color:"yellow"},{label:l('{{t("Week")}}'),value:"week",color:"pule"},{label:l('{{t("Month")}}'),value:"month",color:"green"},{label:l('{{t("QuarterYear")}}'),value:"quarterYear",color:"red"},{label:l('{{t("Year")}}'),value:"year",color:"green"}],onChange:function(e){var t,n=o.decoratorProps.fieldNames||{};n.range=e,o.decoratorProps.params=n,r["x-decorator-props"].params=n,r["x-decorator-props"].fieldNames=n,a.refresh(),i.emit("patch",{schema:(F(t={},"x-uid",r["x-uid"]),F(t,"x-decorator-props",o.decoratorProps),t)}),i.refresh()}}}},{name:"startDateField",Component:y.SchemaSettingsSelectItem,useComponentProps:function(){var e,t=A().t,r=(0,w.useFieldSchema)(),n=(null==r?void 0:null===(e=r["x-decorator-props"])||void 0===e?void 0:e.fieldNames)||{},o=(0,w.useField)(),a=(0,y.useDesignable)().dn,i=D().service;return{title:t("Start date field"),value:n.start,options:N("date"),onChange:function(e){var t,n=o.decoratorProps.fieldNames||{};n.start=e,o.decoratorProps.fieldNames=n,r["x-decorator-props"].fieldNames=n,i.refresh(),a.emit("patch",{schema:(F(t={},"x-uid",r["x-uid"]),F(t,"x-decorator-props",o.decoratorProps),t)}),a.refresh()}}}},{name:"endDateField",Component:y.SchemaSettingsSelectItem,useComponentProps:function(){var e,t=A().t,r=(0,w.useFieldSchema)(),n=(0,w.useField)(),o=D().service,a=(0,y.useDesignable)().dn,i=(null==r?void 0:null===(e=r["x-decorator-props"])||void 0===e?void 0:e.fieldNames)||{};return{title:t("End date field"),value:i.end,options:N("date"),onChange:function(e){var t,i=n.decoratorProps.fieldNames||{};i.end=e,n.decoratorProps.fieldNames=i,r["x-decorator-props"].fieldNames=i,o.refresh(),a.emit("patch",{schema:(F(t={},"x-uid",r["x-uid"]),F(t,"x-decorator-props",n.decoratorProps),t)}),a.refresh()}}}},{name:"processField",Component:y.SchemaSettingsSelectItem,useComponentProps:function(){var e,t=A().t,r=(0,w.useFieldSchema)(),n=(null==r?void 0:null===(e=r["x-decorator-props"])||void 0===e?void 0:e.fieldNames)||{},o=D().service,a=(0,y.useDesignable)().dn,i=(0,w.useField)();return{title:t("Progress field"),value:n.progress,options:N("float"),onChange:function(e){var t,n=i.decoratorProps.fieldNames||{};n.progress=e,i.decoratorProps.fieldNames=n,r["x-decorator-props"].fieldNames=n,o.refresh(),a.emit("patch",{schema:(F(t={},"x-uid",r["x-uid"]),F(t,"x-decorator-props",i.decoratorProps),t)}),a.refresh()}}}},{name:"dataScope",Component:y.SchemaSettingsDataScope,useComponentProps:function(){var e,t,r=(0,y.useCollection_deprecated)().name,n=(0,w.useFieldSchema)(),o=(0,y.useFormBlockContext)().form,a=(0,w.useField)(),i=(0,y.useDesignable)().dn;return{collectionName:r,defaultFilter:(null==n?void 0:null===(t=n["x-decorator-props"])||void 0===t?void 0:null===(e=t.params)||void 0===e?void 0:e.filter)||{},form:o,onSubmit:function(e){var t,r=e.filter;r=(0,y.removeNullCondition)(r);var o=a.decoratorProps.params||{};o.filter=r,a.decoratorProps.params=o,n["x-decorator-props"].params=o,i.emit("patch",{schema:(F(t={},"x-uid",n["x-uid"]),F(t,"x-decorator-props",n["x-decorator-props"]),t)})}}}},{name:"divider",type:"divider"},{name:"template",Component:y.SchemaSettingsTemplate,useComponentProps:function(){var e=(0,y.useCollection_deprecated)().name,t=(0,y.useBlockTemplateContext)().componentNamePrefix;return{componentName:"".concat(t,"Gantt"),collectionName:e}}},{name:"divider2",type:"divider"},{name:"remove",type:"remove",componentProps:{removeParentsIfNoChildren:!0,breakRemoveOn:{"x-component":"Grid"}}}]}),B=new y.SchemaSettings({name:"blockSettings:gantt",items:[{name:"title",Component:y.SchemaSettingsBlockTitleItem},{name:"titleField",Component:y.SchemaSettingsSelectItem,useComponentProps:function(){var e,t=A().t,r=(0,w.useFieldSchema)(),n=(null==r?void 0:null===(e=r["x-decorator-props"])||void 0===e?void 0:e.fieldNames)||{},o=D().service,a=(0,w.useField)(),i=(0,y.useDesignable)().dn;return{title:t("Title field"),value:n.title,options:N("string"),onChange:function(e){var t,n=a.decoratorProps.fieldNames||{};n.title=e,a.decoratorProps.params=n,r["x-decorator-props"].params=n,r["x-decorator-props"].fieldNames=n,o.refresh(),i.emit("patch",{schema:(F(t={},"x-uid",r["x-uid"]),F(t,"x-decorator-props",a.decoratorProps),t)}),i.refresh()}}}},{name:"timeScale",Component:y.SchemaSettingsSelectItem,useComponentProps:function(){var e,t=A().t,r=(0,w.useFieldSchema)(),n=(null==r?void 0:null===(e=r["x-decorator-props"])||void 0===e?void 0:e.fieldNames)||{},o=(0,w.useField)(),a=D().service,i=(0,y.useDesignable)().dn,l=(0,y.useCompile)();return{title:t("Time scale"),value:n.range||"day",options:[{label:l('{{t("Hour")}}'),value:"hour",color:"orange"},{label:l('{{t("Quarter of day")}}'),value:"quarterDay",color:"default"},{label:l('{{t("Half of day")}}'),value:"halfDay",color:"blue"},{label:l('{{t("Day")}}'),value:"day",color:"yellow"},{label:l('{{t("Week")}}'),value:"week",color:"pule"},{label:l('{{t("Month")}}'),value:"month",color:"green"},{label:l('{{t("QuarterYear")}}'),value:"quarterYear",color:"red"},{label:l('{{t("Year")}}'),value:"year",color:"green"}],onChange:function(e){var t,n=o.decoratorProps.fieldNames||{};n.range=e,o.decoratorProps.params=n,r["x-decorator-props"].params=n,r["x-decorator-props"].fieldNames=n,a.refresh(),i.emit("patch",{schema:(F(t={},"x-uid",r["x-uid"]),F(t,"x-decorator-props",o.decoratorProps),t)}),i.refresh()}}}},{name:"startDateField",Component:y.SchemaSettingsSelectItem,useComponentProps:function(){var e,t=A().t,r=(0,w.useFieldSchema)(),n=(null==r?void 0:null===(e=r["x-decorator-props"])||void 0===e?void 0:e.fieldNames)||{},o=(0,w.useField)(),a=(0,y.useDesignable)().dn,i=D().service;return{title:t("Start date field"),value:n.start,options:N(["date","datetime","dateOnly","datetimeNoTz"]),onChange:function(e){var t,n=o.decoratorProps.fieldNames||{};n.start=e,o.decoratorProps.fieldNames=n,r["x-decorator-props"].fieldNames=n,i.refresh(),a.emit("patch",{schema:(F(t={},"x-uid",r["x-uid"]),F(t,"x-decorator-props",o.decoratorProps),t)}),a.refresh()}}}},y.setDataLoadingModeSettingsItem,{name:"endDateField",Component:y.SchemaSettingsSelectItem,useComponentProps:function(){var e,t=A().t,r=(0,w.useFieldSchema)(),n=(0,w.useField)(),o=D().service,a=(0,y.useDesignable)().dn,i=(null==r?void 0:null===(e=r["x-decorator-props"])||void 0===e?void 0:e.fieldNames)||{};return{title:t("End date field"),value:i.end,options:N(["date","datetime","dateOnly","datetimeNoTz"]),onChange:function(e){var t,i=n.decoratorProps.fieldNames||{};i.end=e,n.decoratorProps.fieldNames=i,r["x-decorator-props"].fieldNames=i,o.refresh(),a.emit("patch",{schema:(F(t={},"x-uid",r["x-uid"]),F(t,"x-decorator-props",n.decoratorProps),t)}),a.refresh()}}}},{name:"processField",Component:y.SchemaSettingsSelectItem,useComponentProps:function(){var e,t=A().t,r=(0,w.useFieldSchema)(),n=(null==r?void 0:null===(e=r["x-decorator-props"])||void 0===e?void 0:e.fieldNames)||{},o=D().service,a=(0,y.useDesignable)().dn,i=(0,w.useField)();return{title:t("Progress field"),value:n.progress,options:N("float"),onChange:function(e){var t,n=i.decoratorProps.fieldNames||{};n.progress=e,i.decoratorProps.fieldNames=n,r["x-decorator-props"].fieldNames=n,o.refresh(),a.emit("patch",{schema:(F(t={},"x-uid",r["x-uid"]),F(t,"x-decorator-props",i.decoratorProps),t)}),a.refresh()}}}},{name:"dataScope",Component:y.SchemaSettingsDataScope,useComponentProps:function(){var e,t,r=(0,y.useCollection)().name,n=(0,w.useFieldSchema)(),o=(0,y.useFormBlockContext)().form,a=(0,w.useField)(),i=(0,y.useDesignable)().dn;return{collectionName:r,defaultFilter:(null==n?void 0:null===(t=n["x-decorator-props"])||void 0===t?void 0:null===(e=t.params)||void 0===e?void 0:e.filter)||{},form:o,onSubmit:function(e){var t,r=e.filter;r=(0,y.removeNullCondition)(r);var o=a.decoratorProps.params||{};o.filter=r,a.decoratorProps.params=o,n["x-decorator-props"].params=o,i.emit("patch",{schema:(F(t={},"x-uid",n["x-uid"]),F(t,"x-decorator-props",n["x-decorator-props"]),t)})}}}},{name:"divider",type:"divider"},{name:"template",Component:y.SchemaSettingsTemplate,useComponentProps:function(){var e=(0,y.useCollection)().name,t=(0,y.useBlockTemplateContext)().componentNamePrefix;return{componentName:"".concat(t,"Gantt"),collectionName:e}}},{name:"divider2",type:"divider"},{name:"remove",type:"remove",componentProps:{removeParentsIfNoChildren:!0,breakRemoveOn:{"x-component":"Grid"}}}]});function H(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n,o,a;n=e,o=t,a=r[t],o in n?Object.defineProperty(n,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[o]=a})}return e}var R={title:"{{t('Configure actions')}}",icon:"SettingOutlined",style:{marginLeft:8},items:[{type:"item",name:"filter",title:"{{t('Filter')}}",Component:"FilterActionInitializer",schema:{"x-align":"left"}},{type:"item",title:"{{t('Add new')}}",name:"addNew",Component:"CreateActionInitializer",schema:{"x-align":"right","x-decorator":"ACLActionProvider","x-acl-action-props":{skipScopeCheck:!0}},useVisible:function(){return(0,y.useActionAvailable)("create")}},{type:"item",title:"{{t('Delete')}}",name:"delete",Component:"BulkDestroyActionInitializer",schema:{"x-align":"right","x-decorator":"ACLActionProvider"},useVisible:function(){return(0,y.useActionAvailable)("destroyMany")}},{type:"item",title:"{{t('Refresh')}}",name:"refresh",Component:"RefreshActionInitializer",schema:{"x-align":"right"}},{name:"toggle",title:"{{t('Expand/Collapse')}}",Component:"ExpandableActionInitializer",schema:{"x-align":"right"},useVisible:function(){var e,t=(0,w.useFieldSchema)(),r=(0,y.useCollection)(),n=((null==t?void 0:null===(e=t.parent)||void 0===e?void 0:e["x-decorator-props"])||{}).treeTable;return r.tree&&n}},{name:"customRequest",title:'{{t("Custom request")}}',Component:"CustomRequestInitializer",schema:{"x-action":"customize:table:request:global"}}]},z=new y.CompatibleSchemaInitializer(H({name:"GanttActionInitializers"},R)),W=new y.CompatibleSchemaInitializer(H({name:"gantt:configureActions"},R),z),L=g("482"),q=g("632"),G=g("875"),Y=function(e){var t,r,n,o=e.collectionName,a=e.fieldNames,i=e.dataSource,l=e.association;var c={type:"void","x-acl-action":"".concat(l||o,":list"),"x-decorator":"GanttBlockProvider","x-decorator-props":{collection:o,dataSource:i,action:"list",fieldNames:a,params:{paginate:!1}},"x-toolbar":"BlockSchemaToolbar","x-settings":"blockSettings:gantt","x-component":"CardItem",properties:(t={},r=(0,G.uid)(),n={type:"void","x-component":"Gantt","x-use-component-props":"useGanttBlockProps",properties:{toolBar:{type:"void","x-component":"ActionBar","x-component-props":{style:{marginBottom:24}},"x-initializer":"gantt:configureActions",properties:{}},table:{type:"array","x-decorator":"div","x-decorator-props":{style:{float:"left",maxWidth:"35%"}},"x-initializer":"table:configureColumns","x-component":"TableV2","x-use-component-props":"useTableBlockProps","x-component-props":{rowKey:"id",rowSelection:{type:"checkbox"},pagination:!1},properties:{actions:{type:"void",title:'{{ t("Actions") }}',"x-action-column":"actions","x-decorator":"TableV2.Column.ActionBar","x-component":"TableV2.Column","x-toolbar":"TableColumnSchemaToolbar","x-initializer":"table:configureItemActions","x-settings":"fieldSettings:TableColumn","x-toolbar-props":{initializer:"table:configureItemActions"},properties:{actions:{type:"void","x-decorator":"DndContext","x-component":"Space","x-component-props":{split:"|"}}}}}},detail:{type:"void","x-component":"Gantt.Event",properties:{drawer:{type:"void","x-component":"Action.Drawer","x-component-props":{className:"nb-action-popup"},title:'{{ t("View record") }}',properties:{tabs:{type:"void","x-component":"Tabs","x-component-props":{},"x-initializer":"popup:addTab",properties:{tab1:{type:"void",title:'{{t("Details")}}',"x-component":"Tabs.TabPane","x-designer":"Tabs.Designer","x-component-props":{},properties:{grid:{type:"void","x-component":"Grid","x-initializer":"popup:common:addBlock"}}}}}}}}}}},r in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t)};return l&&(c["x-decorator-props"].association=l),c};function X(e,t,r,n,o,a,i){try{var l=e[a](i),c=l.value}catch(e){r(e);return}l.done?t(c):Promise.resolve(c).then(n,o)}function U(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var a=e.apply(t,r);function i(e){X(a,n,o,i,l,"next",e)}function l(e){X(a,n,o,i,l,"throw",e)}i(void 0)})}}function _(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n,o,a;n=e,o=t,a=r[t],o in n?Object.defineProperty(n,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[o]=a})}return e}function V(e,t){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(a){return function(l){return function(a){if(r)throw TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}var Q=function(e){var t,r,n,o=e.filterCollections,a=e.onlyCurrentDataSource,i=e.hideSearch,l=e.createBlockSchema,c=e.showAssociationFields,s=(0,y.useSchemaInitializerItem)(),u=$().createGanttBlock;return S().createElement(y.DataBlockInitializer,(r=_({},s),n=(n={componentType:"Gantt",icon:S().createElement(L.FormOutlined,null),onCreateBlockSchema:(t=U(function(e){return V(this,function(t){return l?[2,l(e)]:(u(e),[2])})}),function(e){return t.apply(this,arguments)}),onlyCurrentDataSource:a,hideSearch:i,filter:o,showAssociationFields:c},n),Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r.push.apply(r,n)}return r})(Object(n)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))}),r))},$=function(){var e,t=(0,y.useSchemaInitializer)().insert,r=(0,M.useTranslation)().t,n=(0,y.useCollectionManager_deprecated)().getCollectionFields,o=(0,x.useContext)(w.SchemaOptionsContext),a=(0,y.useGlobalTheme)().theme;return{createGanttBlock:(e=U(function(e){var i,l,c,s,u,d,f,p,h;return V(this,function(m){switch(m.label){case 0:return d=null==(u=n((i=e.item).name,i.dataSource))?void 0:null===(l=u.filter(function(e){return"string"===e.type}))||void 0===l?void 0:l.map(function(e){var t;return{label:null==e?void 0:null===(t=e.uiSchema)||void 0===t?void 0:t.title,value:e.name}}),f=null==u?void 0:null===(c=u.filter(function(e){return["date","datetime","dateOnly","datetimeNoTz"].includes(e.type)}))||void 0===c?void 0:c.map(function(e){var t;return{label:null==e?void 0:null===(t=e.uiSchema)||void 0===t?void 0:t.title,value:e.name}}),p=null==u?void 0:null===(s=u.filter(function(e){return"float"===e.type}))||void 0===s?void 0:s.map(function(e){var t;return{label:null==e?void 0:null===(t=e.uiSchema)||void 0===t?void 0:t.title,value:e.name}}),[4,(0,y.FormDialog)(r("Create gantt block"),function(){return S().createElement(y.SchemaComponentOptions,{scope:o.scope,components:_({},o.components)},S().createElement(q.FormLayout,{layout:"vertical"},S().createElement(y.SchemaComponent,{schema:{properties:{title:{title:r("Title field"),enum:d,required:!0,"x-component":"Select","x-decorator":"FormItem"},start:{title:r("Start date field"),enum:f,required:!0,default:"createdAt","x-component":"Select","x-decorator":"FormItem"},end:{title:r("End date field"),enum:f,required:!0,"x-component":"Select","x-decorator":"FormItem"},progress:{title:r("Progress field"),enum:p,"x-component":"Select","x-decorator":"FormItem"},range:{title:r("Time scale"),enum:[{label:'{{t("Hour")}}',value:"hour",color:"orange"},{label:'{{t("Quarter of day")}}',value:"quarterDay",color:"default"},{label:'{{t("Half of day")}}',value:"halfDay",color:"blue"},{label:'{{t("Day")}}',value:"day",color:"yellow"},{label:'{{t("Week")}}',value:"week",color:"pule"},{label:'{{t("Month")}}',value:"month",color:"green"},{label:'{{t("Year")}}',value:"year",color:"green"},{label:'{{t("QuarterYear")}}',value:"quarterYear",color:"red"}],default:"day","x-component":"Select","x-decorator":"FormItem"}}}})))},a).open({initialValues:{}})];case 1:return h=m.sent(),t(Y({collectionName:i.name,dataSource:i.dataSource,fieldNames:_({},h)})),[2]}})}),function(t){return e.apply(this,arguments)})}},K=(0,w.observer)(function(e){var t=(0,y.useCollectionRecordData)(),r=(0,y.useCollection)();return S().createElement(y.PopupContextProvider,null,S().createElement(y.VariablePopupRecordProvider,{recordData:t,collection:r},e.children))},{displayName:"Event"}),J=g("964"),Z=g("721"),ee=g("467");function et(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function er(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n,o,a;n=e,o=t,a=r[t],o in n?Object.defineProperty(n,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[o]=a})}return e}function en(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r.push.apply(r,n)}return r})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function eo(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r,n,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var a=[],i=!0,l=!1;try{for(o=o.call(e);!(i=(r=o.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){l=!0,n=e}finally{try{!i&&null!=o.return&&o.return()}finally{if(l)throw n}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return et(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return et(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var ea=function(e,t,r,n,o,a,i,l,c,s,u,d,f,p,h,m,v,g){var b=e.map(function(e,b){return ei(e,b,t,r,n,o,a,i,l,c,s,u,d,f,p,h,m,v,g)});return b=b.map(function(e){for(var t=function(t){var n=b.findIndex(function(e){return e.id===r[t]});-1!==n&&b[n].barChildren.push(e)},r=e.dependencies||[],n=0;n<r.length;n++)t(n);return e})},ei=function(e,t,r,n,o,a,i,l,c,s,u,d,f,p,h,m,v,g,b){var y;switch(e.type){case"milestone":y=ec(e,t,r,n,o,a,i,l,g,b);break;case"project":y=el(e,t,r,n,o,.5*a,i,l,c,p,h,m,v);break;default:y=el(e,t,r,n,o,a,i,l,c,s,u,d,f)}return y},el=function(e,t,r,n,o,a,i,l,c,s,u,d,f){c?(h=eu(e.start,r,n),p=eu(e.end,r,n)):(p=es(e.start,r,n),h=es(e.end,r,n));var p,h,m=e.type;"task"===m&&h-p<2*l&&(m="smalltask",h=p>0?p+2*l:p);var v=eo(ef(p,h,e.progress,c),2),g=v[0],b=v[1],y="project"===e.type?ed(t,o,a)+8:ed(t,o,a),x="project"===e.type?e.hideChildren:void 0,S=er({backgroundColor:d,backgroundSelectedColor:f,progressColor:s,progressSelectedColor:u},e.styles);return en(er({},e),{typeInternal:m,x1:p,x2:h,y:y,index:t,progressX:b,progressWidth:g,barCornerRadius:i,handleWidth:l,hideChildren:x,height:a,barChildren:[],styles:S})},ec=function(e,t,r,n,o,a,i,l,c,s){var u=es(e.start,r,n),d=ed(t,o,a),f=u-.5*a,p=u+.5*a,h=a/1.414,m=er({backgroundColor:c,backgroundSelectedColor:s,progressColor:"",progressSelectedColor:""},e.styles);return en(er({},e),{end:e.start,x1:f,x2:p,y:d,index:t,progressX:0,progressWidth:0,barCornerRadius:i,handleWidth:l,typeInternal:e.type,progress:0,height:h,hideChildren:void 0,barChildren:[],styles:m})},es=function(e,t,r){var n,o,a,i=t.findIndex(function(t){return(null==t?void 0:t.getTime())>=(null==e?void 0:e.getTime())})-1,l=((null==e?void 0:e.getTime())-(null===(n=t[i])||void 0===n?void 0:n.getTime()))/((null===(o=t[i+1])||void 0===o?void 0:o.getTime())-(null===(a=t[i])||void 0===a?void 0:a.getTime())),c=i*r+l*r;return isNaN(c)?0:c},eu=function(e,t,r){var n=es(e,t,r);return isNaN(n+=r)?0:n},ed=function(e,t,r){var n=e*t+(t-r)/2;return isNaN(n)?0:n},ef=function(e,t,r,n){var o,a=(t-e)*r*.01;return o=n?t-a:e,[a,o]},ep=function(e,t){if(e>=t.x2)return 100;if(e<=t.x1)return 0;var r=t.x2-t.x1;return Math.round((e-t.x1)*100/r)},eh=function(e,t){if(e>=t.x2)return 0;if(e<=t.x1)return 100;var r=t.x2-t.x1;return Math.round((t.x2-e)*100/r)},em=function(e,t,r){return[e-5,t+r,e+5,t+r,e,t+r-8.66].join(",")},ev=function(e,t,r){e>=r.x2-2*r.handleWidth&&(e=r.x2-2*r.handleWidth);var n=Math.round((e-r.x1)/t);return r.x1+n*t},eg=function(e,t,r){e<=r.x1+2*r.handleWidth&&(e=r.x1+2*r.handleWidth);var n=Math.round((e-r.x2)/t);return r.x2+n*t},eb=function(e,t,r){var n=Math.round((e-r.x1)/t),o=r.x1+n*t,a=o+r.x2-r.x1;return[o,a]},ey=function(e,t,r,n,o){var a,i,l=new Date((e-t)/n*o+(null==r?void 0:null===(a=r.getTime)||void 0===a?void 0:a.call(r)));return l=new Date((null==l?void 0:null===(i=l.getTime)||void 0===i?void 0:i.call(l))+((null==l?void 0:l.getTimezoneOffset())-(null==r?void 0:r.getTimezoneOffset()))*6e4)},ex=function(e,t,r,n,o,a,i){var l;if("milestone"===r.type)l=ew(e,t,r,n,o,a);else l=eS(e,t,r,n,o,a,i);return l},eS=function(e,t,r,n,o,a,i){var l=er({},r),c=!1;switch(t){case"progress":if(i?l.progress=eh(e,r):l.progress=ep(e,r),c=l.progress!==r.progress){var s=eo(ef(l.x1,l.x2,l.progress,i),2),u=s[0],d=s[1];l.progressWidth=u,l.progressX=d}break;case"start":var f=ev(e,n,r);if(l.x1=f,c=l.x1!==r.x1){i?l.end=ey(f,r.x1,r.end,n,o):l.start=ey(f,r.x1,r.start,n,o);var p=eo(ef(l.x1,l.x2,l.progress,i),2),h=p[0],m=p[1];l.progressWidth=h,l.progressX=m}break;case"end":var v=eg(e,n,r);if(l.x2=v,c=l.x2!==r.x2){i?l.start=ey(v,r.x2,r.start,n,o):l.end=ey(v,r.x2,r.end,n,o);var g=eo(ef(l.x1,l.x2,l.progress,i),2),b=g[0],y=g[1];l.progressWidth=b,l.progressX=y}break;case"move":var x=eo(eb(e-a,n,r),2),S=x[0],w=x[1];if(c=S!==r.x1){l.start=ey(S,r.x1,r.start,n,o),l.end=ey(w,r.x2,r.end,n,o),l.x1=S,l.x2=w;var k=eo(ef(l.x1,l.x2,l.progress,i),2),C=k[0],O=k[1];l.progressWidth=C,l.progressX=O}}return{isChanged:c,changedTask:l}},ew=function(e,t,r,n,o,a){var i=er({},r),l=!1;if("move"===t){var c=eo(eb(e-a,n,r),2),s=c[0],u=c[1];(l=s!==r.x1)&&(i.start=ey(s,r.x1,r.start,n,o),i.end=i.start,i.x1=s,i.x2=u)}return{isChanged:l,changedTask:i}};var ek=((f={}).Hour="hour",f.QuarterDay="quarterDay",f.HalfDay="halfDay",f.Day="day",f.Week="week",f.Month="month",f.QuarterYear="quarterYear",f.Year="year",f);Intl.DateTimeFormat,Intl.DateTimeFormatOptions;var eC={},eO=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=JSON.stringify([e,t]),n=eC[r];return!n&&(n=new Intl.DateTimeFormat(e,t),eC[r]=n),n},eP=function(e,t,r){return new Date(e.getFullYear()+("year"===r?t:0),e.getMonth()+("month"===r?t:0),e.getDate()+("day"===r?t:0),e.getHours()+("hour"===r?t:0),e.getMinutes()+("minute"===r?t:0),e.getSeconds()+("second"===r?t:0),e.getMilliseconds()+("millisecond"===r?t:0))},eE=function(e,t){var r=["millisecond","second","minute","hour","day","month","year"],n=function(e){var n=r.indexOf(t);return r.indexOf(e)<=n};return new Date(null==e?void 0:e.getFullYear(),n("year")?0:e.getMonth(),n("month")?1:e.getDate(),n("day")?0:e.getHours(),n("hour")?0:e.getMinutes(),n("minute")?0:e.getSeconds(),n("second")?0:e.getMilliseconds())},eT=function(e,t,r){var n=(null===(c=e[0])||void 0===c?void 0:c.start)||new Date,o=(null===(s=e[0])||void 0===s?void 0:s.start)||new Date,a=!0,i=!1,l=void 0;try{for(var c,s,u,d=e[Symbol.iterator]();!(a=(u=d.next()).done);a=!0){var f=u.value;f.start<n&&(n=f.start),f.end>o&&(o=f.end)}}catch(e){i=!0,l=e}finally{try{!a&&null!=d.return&&d.return()}finally{if(i)throw l}}switch(t){case ek.Year:n=eE(n=eP(n,-1,"year"),"year"),o=eE(o=eP(o,1,"year"),"year");break;case ek.QuarterYear:n=eE(n=eP(n,-3,"month"),"month"),o=eE(o=eP(o,3,"year"),"year");break;case ek.Month:n=eE(n=eP(n,-1*r,"month"),"month"),o=eE(o=eP(o,1,"year"),"year");break;case ek.Week:n=eP(eA(n=eE(n,"day")),-7*r,"day"),o=eP(o=eE(o,"day"),1.5,"month");break;case ek.Day:n=eP(n=eE(n,"day"),-1*r,"day"),o=eP(o=eE(o,"day"),19,"day");break;case ek.QuarterDay:n=eP(n=eE(n,"day"),-1*r,"day"),o=eP(o=eE(o,"day"),66,"hour");break;case ek.HalfDay:n=eP(n=eE(n,"day"),-1*r,"day"),o=eP(o=eE(o,"day"),108,"hour");break;case ek.Hour:n=eP(n=eE(n,"hour"),-1*r,"hour"),o=eP(o=eE(o,"day"),1,"day")}return[n,o]},eD=function(e,t,r){for(var n=new Date(e),o=[n];n<t;){switch(r){case ek.Year:n=eP(n,1,"year");break;case ek.QuarterYear:n=eP(n,3,"month");break;case ek.Month:n=eP(n,1,"month");break;case ek.Week:n=eP(n,7,"day");break;case ek.Day:n=eP(n,1,"day");break;case ek.HalfDay:n=eP(n,12,"hour");break;case ek.QuarterDay:n=eP(n,6,"hour");break;case ek.Hour:n=eP(n,1,"hour")}o.push(n)}return o},ej=function(e,t){var r=eO(t,{month:"long"}).format(e);return r=r.replace(r[0],r[0].toLocaleUpperCase())},eM=function(e,t,r){var n=eO(t,{weekday:r}).format(e);return n=n.replace(n[0],n[0].toLocaleUpperCase())},eA=function(e){var t=e.getDay(),r=e.getDate()-t+(0===t?-6:1);return new Date(e.setDate(r))},eN=function(e){var t=new Date(e.valueOf()),r=(t.getDay()+6)%7;t.setDate(t.getDate()-r+3);var n=t.valueOf();t.setMonth(0,1),4!==t.getDay()&&t.setMonth(0,1+(4-t.getDay()+7)%7);var o=(1+Math.ceil((n-t.valueOf())/6048e5)).toString();return 1===o.length?"0".concat(o):o};function eF(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var eI=function(e,t){var r=e.displayOrder||Number.MAX_VALUE,n=t.displayOrder||Number.MAX_VALUE;return r>n?1:r<n?-1:0},eB=function(e){var t;return isNaN(null==e?void 0:null===(t=e.getTime)||void 0===t?void 0:t.call(e))?0:e.getFullYear()+"/"+"".concat(e.getMonth()+1)+"/"+e.getDate()},eH=g("202");function eR(e,t){return!t&&(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function ez(){var e=eR(["\n overflow: auto;\n position: absolute;\n bottom: -8px;\n max-width: 100%;\n scrollbarWidth: thin;\n height: 1.2rem;\n &::-webkit-scrollbar: { width: 8, height: 8 };\n &::-webkit-scrollbar-corner: { background: transparent };\n &::-webkit-scrollbar-track: { background: var(--colorBgScrollTrack) };\n &::-webkit-scrollbar-thumb: {\n background: var(--colorBgScrollBar);\n borderRadius: 4;\n };\n &::-webkit-scrollbar-thumb:hover: {\n background: var(--colorBgScrollBarHover);\n };\n &::-webkit-scrollbar-thumb:active: {\n background: var(--colorBgScrollBarActive)\n }\n "]);return ez=function(){return e},e}function eW(){var e=eR(["\n padding: 12px;\n background-color: ",";\n background-clip: padding-box;\n border-radius: ",";\n box-shadow: ",";\n b: {\n display: block;\n margin-bottom: ",";\n }\n .tooltipdefaultcontainerparagraph: {\n font-size: ",";\n margin-bottom: "," + ",";\n color: ",";\n }\n "]);return eW=function(){return e},e}function eL(){var e=eR(["\n position: absolute;\n display: flex;\n flexshrink: 0;\n pointerevents: none;\n webkittouchcallout: none;\n webkituserselect: none;\n mozuserselect: none;\n msuserselect: none;\n userselect: none;\n "]);return eL=function(){return e},e}function eq(){var e=eR(["\n visibility: hidden;\n position: absolute;\n display: flex;\n pointerevents: none;\n "]);return eq=function(){return e},e}function eG(){var e=eR(["\n .horizontalScroll: {\n height: 1\n }\n \n .verticalScroll: {\n overflow: hidden auto;\n width: 1rem;\n flexShrink: 0;\n scrollbarWidth: thin;\n &::-webkit-scrollbar: { width: 8, height: 8 };\n &::-webkit-scrollbar-corner: { background: transparent};\n &::-webkit-scrollbar-track: { background: var(--colorBgScrollTrack) };\n &::-webkit-scrollbar-thumb: {\n background: var(--colorBgScrollBar);\n borderRadius: 4;\n }\n &::-webkit-scrollbar-thumb:hover': {\n background: var(--colorBgScrollBarHover)\n }\n &::-webkit-scrollbar-thumb:active': {\n background: var(--colorBgScrollBarActive)\n },\n }\n }\n "]);return eG=function(){return e},e}var eY=(0,eH.createStyles)(function(e){var t=e.token,r=e.css;return{scrollWrapper:r(ez()),tooltipDefaultContainer:r(eW(),t.colorBgElevated,t.borderRadius,t.boxShadow,t.marginXS,t.fontSizeSM,t.marginXXS,t.marginXS-t.marginXXS,t.colorText),tooltipDetailsContainer:r(eL()),tooltipDetailsContainerHidden:r(eq()),nbGridOther:r(eG())}}),eX=function(e){var t=e.scroll,r=e.svgWidth,n=e.taskListWidth,o=e.rtl,a=e.onScroll,i=eY().styles,l=(0,x.useRef)(null);return(0,x.useEffect)(function(){l.current&&(l.current.scrollLeft=t)},[t]),S().createElement("div",{dir:"ltr",style:{margin:o?"0px ".concat(n,"px 0px 0px"):"0px 0px 0px ".concat(n,"px")},className:(0,J.cx)(i.nbGridOther,i.scrollWrapper,"gantt-horizontal-scoll"),onScroll:a,ref:l},S().createElement("div",{style:{width:r,height:1},className:"horizontalScroll"}))};function eU(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function e_(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r,n,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var a=[],i=!0,l=!1;try{for(o=o.call(e);!(i=(r=o.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){l=!0,n=e}finally{try{!i&&null!=o.return&&o.return()}finally{if(l)throw n}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return eU(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return eU(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var eV=function(e){var t=e.task,r=e.rowHeight,n=e.rtl,o=e.svgContainerHeight,a=e.svgContainerWidth,i=e.scrollX,l=e.scrollY,c=e.arrowIndent,s=e.fontSize,u=e.fontFamily,d=e.headerHeight,f=e.taskListWidth,p=e.TooltipContent,h=eY().styles,m=(0,x.useRef)(null),v=e_((0,x.useState)(0),2),g=v[0],b=v[1],y=e_((0,x.useState)(0),2),w=y[0],k=y[1];return(0,x.useEffect)(function(){if(m.current){var e,s=1.1*m.current.offsetHeight,u=1.1*m.current.offsetWidth,p=t.index*r-l+d;n?((e=t.x1-1.5*c-u-i)<0&&(e=t.x2+1.5*c-i),u+e>a&&(e=a-u,p+=r)):(u+(e=t.x2+1.5*c+f-i)>f+a&&(e=t.x1+f-1.5*c-i-u),e<f&&(e=a+f-u,p+=r)),s+p-l>o-l&&(p=o-s),b(p),k(e)}},[m,t,c,i,l,d,f,r,o,a,n]),S().createElement("div",{ref:m,className:(0,J.cx)(w?h.tooltipDetailsContainer:h.tooltipDetailsContainerHidden,h.nbGridOther),style:{left:w,top:g}},S().createElement(p,{task:t,fontSize:s,fontFamily:u}))},eQ=function(e){var t,r,n,o,a,i,l,c,s=e.task,u=e.fontSize,d=e.fontFamily,f=eY().styles;return S().createElement("div",{className:(0,J.cx)(f.nbGridOther,f.tooltipDefaultContainer),"aria-label":"nb-gantt-tooltip",style:{fontSize:u,fontFamily:d}},S().createElement("b",{style:{fontSize:u}},s.name,": ",eB(s.start)," ~ ",eB(s.end)),(null===(r=s.end)||void 0===r?void 0:null===(t=r.getTime)||void 0===t?void 0:t.call(r))-(null===(o=s.start)||void 0===o?void 0:null===(n=o.getTime)||void 0===n?void 0:n.call(o))!=0&&S().createElement("p",{className:"tooltipDefaultContainerParagraph"},"Duration: ".concat(Math.round(((null===(i=s.end)||void 0===i?void 0:null===(a=i.getTime)||void 0===a?void 0:a.call(i))-(null===(c=s.start)||void 0===c?void 0:null===(l=c.getTime)||void 0===l?void 0:l.call(c)))/864e5*10)/10||""," day(s)")),S().createElement("p",{className:"tooltipDefaultContainerParagraph"},!!s.progress&&"Progress: ".concat(s.progress,"%")))},e$=function(e){var t=e.scroll,r=e.ganttHeight,n=e.ganttFullHeight,o=e.headerHeight,a=e.rtl,i=e.onScroll,l=eY().styles,c=(0,x.useRef)(null);return(0,x.useEffect)(function(){c.current&&(c.current.scrollTop=t)},[t]),S().createElement("div",{style:{maxHeight:r,marginTop:o,marginLeft:a?"":"-1rem"},className:(0,J.cx)(l.nbGridOther,"verticalScroll"),onScroll:i,ref:c},S().createElement("div",{style:{height:n,width:1}}))},eK=function(e){var t=(0,w.useFieldSchema)().properties.detail;return t?S().createElement(w.RecursionField,{schema:t,name:t.name}):null};function eJ(e,t){return!t&&(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function eZ(){var e=eJ(["\n overflow: hidden;\n font-size: 0;\n margin: 0;\n padding: 0;\n width: 100%;\n border-left: 2px solid ",";\n .ganttheader: {\n border-bottom: 1px solid ",";\n font-weight: 700;\n }\n .ganttbody: {\n border-bottom: 1px solid ",";\n }\n "]);return eZ=function(){return e},e}function e0(){var e=eJ(["\n margin: 0;\n padding: 0;\n overflow: hidden;\n "]);return e0=function(){return e},e}function e1(){var e=eJ(["\n display: flex;\n padding: 0;\n margin: 0;\n liststyle: none;\n outline: none;\n position: relative;\n .gantt-horizontal-scoll: {\n display: none;\n }\n &:hover: {\n .gantt-horizontal-scoll: {\n display: block;\n }\n }\n "]);return e1=function(){return e},e}var e2=(0,y.createStyles)(function(e){var t=e.token,r=e.css;return{ganttverticalcontainer:r(eZ(),t.colorBorderSecondary,t.colorBorderSecondary,t.colorBorderSecondary),horizontalcontainer:r(e0()),wrapper:r(e1())}});function e5(e,t){(function(e){return"string"==typeof e&&-1!==e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var r=function(e){return"string"==typeof e&&-1!==e.indexOf("%")}(e);return(e=360===t?e:Math.min(t,Math.max(0,parseFloat(e))),r&&(e=parseInt(String(e*t),10)/100),1e-6>Math.abs(e-t))?1:e=360===t?(e<0?e%t+t:e%t)/parseFloat(String(t)):e%t/parseFloat(String(t))}function e6(e){return Math.min(1,Math.max(0,e))}function e8(e){return(isNaN(e=parseFloat(e))||e<0||e>1)&&(e=1),e}function e3(e){return e<=1?"".concat(100*Number(e),"%"):e}function e4(e){return 1===e.length?"0"+e:String(e)}function e9(e,t,r){e=e5(e,255),t=e5(t,255);var n=Math.max(e,t,r=e5(r,255)),o=Math.min(e,t,r),a=0,i=0,l=(n+o)/2;if(n===o)i=0,a=0;else{var c=n-o;switch(i=l>.5?c/(2-n-o):c/(n+o),n){case e:a=(t-r)/c+(t<r?6:0);break;case t:a=(r-e)/c+2;break;case r:a=(e-t)/c+4}a/=6}return{h:a,s:i,l:l}}function e7(e,t,r){return(r<0&&(r+=1),r>1&&(r-=1),r<1/6)?e+6*r*(t-e):r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function te(e,t,r){e=e5(e,255),t=e5(t,255);var n=Math.max(e,t,r=e5(r,255)),o=Math.min(e,t,r),a=0,i=n-o;if(n===o)a=0;else{switch(n){case e:a=(t-r)/i+(t<r?6:0);break;case t:a=(r-e)/i+2;break;case r:a=(e-t)/i+4}a/=6}return{h:a,s:0===n?0:i/n,v:n}}function tt(e,t,r,n){var o=[e4(Math.round(e).toString(16)),e4(Math.round(t).toString(16)),e4(Math.round(r).toString(16))];return n&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function tr(e){return tn(e)/255}function tn(e){return parseInt(e,16)}var to={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},ta="(?:".concat("[-\\+]?\\d*\\.\\d+%?",")|(?:").concat("[-\\+]?\\d+%?",")"),ti="[\\s|\\(]+(".concat(ta,")[,|\\s]+(").concat(ta,")[,|\\s]+(").concat(ta,")\\s*\\)?"),tl="[\\s|\\(]+(".concat(ta,")[,|\\s]+(").concat(ta,")[,|\\s]+(").concat(ta,")[,|\\s]+(").concat(ta,")\\s*\\)?"),tc={CSS_UNIT:new RegExp(ta),rgb:RegExp("rgb"+ti),rgba:RegExp("rgba"+tl),hsl:RegExp("hsl"+ti),hsla:RegExp("hsla"+tl),hsv:RegExp("hsv"+ti),hsva:RegExp("hsva"+tl),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function ts(e){return!!tc.CSS_UNIT.exec(String(e))}var tu=function(){function e(t,r){if(void 0===t&&(t=""),void 0===r&&(r={}),t instanceof e)return t;if("number"==typeof t){var n;t={r:(n=t)>>16,g:(65280&n)>>8,b:255&n}}this.originalInput=t;var o,a=function(e){var t,r,n,o,a,i,l,c,s,u,d,f,p={r:0,g:0,b:0},h=1,m=null,v=null,g=null,b=!1,y=!1;if("string"==typeof e&&(e=function(e){if(0===(e=e.trim().toLowerCase()).length)return!1;var t=!1;if(to[e])e=to[e],t=!0;else if("transparent"===e)return{r:0,g:0,b:0,a:0,format:"name"};var r=tc.rgb.exec(e);if(r)return{r:r[1],g:r[2],b:r[3]};if(r=tc.rgba.exec(e))return{r:r[1],g:r[2],b:r[3],a:r[4]};if(r=tc.hsl.exec(e))return{h:r[1],s:r[2],l:r[3]};if(r=tc.hsla.exec(e))return{h:r[1],s:r[2],l:r[3],a:r[4]};if(r=tc.hsv.exec(e))return{h:r[1],s:r[2],v:r[3]};if(r=tc.hsva.exec(e))return{h:r[1],s:r[2],v:r[3],a:r[4]};if(r=tc.hex8.exec(e))return{r:tn(r[1]),g:tn(r[2]),b:tn(r[3]),a:tn(r[4])/255,format:t?"name":"hex8"};if(r=tc.hex6.exec(e))return{r:tn(r[1]),g:tn(r[2]),b:tn(r[3]),format:t?"name":"hex"};if(r=tc.hex4.exec(e))return{r:tn(r[1]+r[1]),g:tn(r[2]+r[2]),b:tn(r[3]+r[3]),a:tn(r[4]+r[4])/255,format:t?"name":"hex8"};return!!(r=tc.hex3.exec(e))&&{r:tn(r[1]+r[1]),g:tn(r[2]+r[2]),b:tn(r[3]+r[3]),format:t?"name":"hex"}}(e)),"object"==typeof e){;if(ts(e.r)&&ts(e.g)&&ts(e.b)){;t=e.r,r=e.g,n=e.b,p={r:255*e5(t,255),g:255*e5(r,255),b:255*e5(n,255)},b=!0,y="%"===String(e.r).substr(-1)?"prgb":"rgb"}else if(ts(e.h)&&ts(e.s)&&ts(e.v)){;m=e3(e.s),v=e3(e.v),o=e.h,a=m,i=v,o=6*e5(o,360),a=e5(a,100),i=e5(i,100),l=Math.floor(o),c=o-l,s=i*(1-a),u=i*(1-c*a),d=i*(1-(1-c)*a),p={r:255*[i,u,s,s,d,i][f=l%6],g:255*[d,i,i,u,s,s][f],b:255*[s,s,d,i,i,u][f]},b=!0,y="hsv"}else ts(e.h)&&ts(e.s)&&ts(e.l)&&(m=e3(e.s),g=e3(e.l),p=function(e,t,r){if(e=e5(e,360),t=e5(t,100),r=e5(r,100),0===t)o=r,a=r,n=r;else{var n,o,a,i=r<.5?r*(1+t):r+t-r*t,l=2*r-i;n=e7(l,i,e+1/3),o=e7(l,i,e),a=e7(l,i,e-1/3)}return{r:255*n,g:255*o,b:255*a}}(e.h,m,g),b=!0,y="hsl");Object.prototype.hasOwnProperty.call(e,"a")&&(h=e.a)}return h=e8(h),{ok:b,format:e.format||y,r:Math.min(255,Math.max(p.r,0)),g:Math.min(255,Math.max(p.g,0)),b:Math.min(255,Math.max(p.b,0)),a:h}}(t);this.originalInput=t,this.r=a.r,this.g=a.g,this.b=a.b,this.a=a.a,this.roundA=Math.round(100*this.a)/100,this.format=null!==(o=r.format)&&void 0!==o?o:a.format,this.gradientType=r.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=a.ok}return e.prototype.isDark=function(){return 128>this.getBrightness()},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},e.prototype.getLuminance=function(){var e,t,r,n=this.toRgb(),o=n.r/255,a=n.g/255,i=n.b/255;return .2126*(e=o<=.03928?o/12.92:Math.pow((o+.055)/1.055,2.4))+.7152*(t=a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4))+.0722*(r=i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4))},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(e){return this.a=e8(e),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){return 0===this.toHsl().s},e.prototype.toHsv=function(){var e=te(this.r,this.g,this.b);return{h:360*e.h,s:e.s,v:e.v,a:this.a}},e.prototype.toHsvString=function(){var e=te(this.r,this.g,this.b),t=Math.round(360*e.h),r=Math.round(100*e.s),n=Math.round(100*e.v);return 1===this.a?"hsv(".concat(t,", ").concat(r,"%, ").concat(n,"%)"):"hsva(".concat(t,", ").concat(r,"%, ").concat(n,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var e=e9(this.r,this.g,this.b);return{h:360*e.h,s:e.s,l:e.l,a:this.a}},e.prototype.toHslString=function(){var e=e9(this.r,this.g,this.b),t=Math.round(360*e.h),r=Math.round(100*e.s),n=Math.round(100*e.l);return 1===this.a?"hsl(".concat(t,", ").concat(r,"%, ").concat(n,"%)"):"hsla(".concat(t,", ").concat(r,"%, ").concat(n,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(e){return void 0===e&&(e=!1),tt(this.r,this.g,this.b,e)},e.prototype.toHexString=function(e){return void 0===e&&(e=!1),"#"+this.toHex(e)},e.prototype.toHex8=function(e){var t,r,n,o,a,i;return void 0===e&&(e=!1),t=this.r,r=this.g,n=this.b,o=this.a,a=e,i=[e4(Math.round(t).toString(16)),e4(Math.round(r).toString(16)),e4(Math.round(n).toString(16)),e4(function(e){return Math.round(255*parseFloat(e)).toString(16)}(o))],a&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))&&i[3].startsWith(i[3].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0):i.join("")},e.prototype.toHex8String=function(e){return void 0===e&&(e=!1),"#"+this.toHex8(e)},e.prototype.toHexShortString=function(e){return void 0===e&&(e=!1),1===this.a?this.toHexString(e):this.toHex8String(e)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var e=Math.round(this.r),t=Math.round(this.g),r=Math.round(this.b);return 1===this.a?"rgb(".concat(e,", ").concat(t,", ").concat(r,")"):"rgba(".concat(e,", ").concat(t,", ").concat(r,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var e=function(e){return"".concat(Math.round(100*e5(e,255)),"%")};return{r:e(this.r),g:e(this.g),b:e(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var e=function(e){return Math.round(100*e5(e,255))};return 1===this.a?"rgb(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%)"):"rgba(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(0===this.a)return"transparent";if(this.a<1)return!1;for(var e="#"+tt(this.r,this.g,this.b,!1),t=0,r=Object.entries(to);t<r.length;t++){var n=r[t],o=n[0];if(e===n[1])return o}return!1},e.prototype.toString=function(e){var t=!!e;e=null!=e?e:this.format;var r=!1,n=this.a<1&&this.a>=0;if(!t&&n&&(e.startsWith("hex")||"name"===e))return"name"===e&&0===this.a?this.toName():this.toRgbString();return"rgb"===e&&(r=this.toRgbString()),"prgb"===e&&(r=this.toPercentageRgbString()),("hex"===e||"hex6"===e)&&(r=this.toHexString()),"hex3"===e&&(r=this.toHexString(!0)),"hex4"===e&&(r=this.toHex8String(!0)),"hex8"===e&&(r=this.toHex8String()),"name"===e&&(r=this.toName()),"hsl"===e&&(r=this.toHslString()),"hsv"===e&&(r=this.toHsvString()),r||this.toHexString()},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){void 0===t&&(t=10);var r=this.toHsl();return r.l+=t/100,r.l=e6(r.l),new e(r)},e.prototype.brighten=function(t){void 0===t&&(t=10);var r=this.toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(-(t/100*255)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(-(t/100*255)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(-(t/100*255)))),new e(r)},e.prototype.darken=function(t){void 0===t&&(t=10);var r=this.toHsl();return r.l-=t/100,r.l=e6(r.l),new e(r)},e.prototype.tint=function(e){return void 0===e&&(e=10),this.mix("white",e)},e.prototype.shade=function(e){return void 0===e&&(e=10),this.mix("black",e)},e.prototype.desaturate=function(t){void 0===t&&(t=10);var r=this.toHsl();return r.s-=t/100,r.s=e6(r.s),new e(r)},e.prototype.saturate=function(t){void 0===t&&(t=10);var r=this.toHsl();return r.s+=t/100,r.s=e6(r.s),new e(r)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var r=this.toHsl(),n=(r.h+t)%360;return r.h=n<0?360+n:n,new e(r)},e.prototype.mix=function(t,r){void 0===r&&(r=50);var n=this.toRgb(),o=new e(t).toRgb(),a=r/100;return new e({r:(o.r-n.r)*a+n.r,g:(o.g-n.g)*a+n.g,b:(o.b-n.b)*a+n.b,a:(o.a-n.a)*a+n.a})},e.prototype.analogous=function(t,r){void 0===t&&(t=6),void 0===r&&(r=30);var n=this.toHsl(),o=360/r,a=[this];for(n.h=(n.h-(o*t>>1)+720)%360;--t;)n.h=(n.h+o)%360,a.push(new e(n));return a},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){void 0===t&&(t=6);for(var r=this.toHsv(),n=r.h,o=r.s,a=r.v,i=[],l=1/t;t--;)i.push(new e({h:n,s:o,v:a})),a=(a+l)%1;return i},e.prototype.splitcomplement=function(){var t=this.toHsl(),r=t.h;return[this,new e({h:(r+72)%360,s:t.s,l:t.l}),new e({h:(r+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var r=this.toRgb(),n=new e(t).toRgb(),o=r.a+n.a*(1-r.a);return new e({r:(r.r*r.a+n.r*n.a*(1-r.a))/o,g:(r.g*r.a+n.g*n.a*(1-r.a))/o,b:(r.b*r.a+n.b*n.a*(1-r.a))/o,a:o})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var r=this.toHsl(),n=r.h,o=[this],a=360/t,i=1;i<t;i++)o.push(new e({h:(n+i*a)%360,s:r.s,l:r.l}));return o},e.prototype.equals=function(t){return this.toRgbString()===new e(t).toRgbString()},e}();function td(e,t){return!t&&(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function tf(){var e=td(["\n color: ",";\n fill: ",";\n stroke-width: 1.4;\n background: ",";\n border-bottom: 1px solid ",";\n "]);return tf=function(){return e},e}function tp(){var e=td(["\n .calendarbottomtext: {\n textanchor: middle;\n fill: ",";\n webkittouchcallout: none;\n webkituserselect: none;\n mozuserselect: none;\n msuserselect: none;\n userselect: none;\n pointerevents: none;\n font-weight: 500;\n }\n .calendartoptick: {\n stroke: ",";\n stroke-width: 0;\n }\n .calendartoptext: {\n textanchor: middle;\n webkittouchcallout: none;\n webkituserselect: none;\n mozuserselect: none;\n msuserselect: none;\n userselect: none;\n pointerevents: none;\n font-weight: 500;\n fill: ",";\n }\n "]);return tp=function(){return e},e}var th=(0,eH.createStyles)(function(e){var t=e.token,r=e.css,n=new tu(t.colorFillAlter).onBackground(t.colorBgContainer).toHexShortString();return{calendarheader:r(tf(),t.colorText,n,n,t.colorBorderSecondary),nbGanttCalendar:r(tp(),t.colorText,t.colorBorderSecondary,t.colorText)}}),tm=function(e){var t=e.value,r=e.x1Line,n=e.y1Line,o=e.y2Line,a=e.xText,i=e.yText;return S().createElement("g",{className:"calendarTop"},S().createElement("line",{x1:r,y1:n,x2:r,y2:o,className:(0,J.cx)("calendarTopTick"),key:t+"line"}),S().createElement("text",{key:t+"text",y:i,x:a,className:(0,J.cx)("calendarTopText")},t))};function tv(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function tg(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r,n,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var a=[],i=!0,l=!1;try{for(o=o.call(e);!(i=(r=o.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){l=!0,n=e}finally{try{!i&&null!=o.return&&o.return()}finally{if(l)throw n}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return tv(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return tv(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var tb=function(e){var t,r,n,o,a,i,l,c=e.dateSetup,s=e.locale,u=e.viewMode,d=e.rtl,f=e.headerHeight,p=e.columnWidth,h=e.fontFamily,m=e.fontSize,v=th().styles,g=[],b=[];switch(c.viewMode){case ek.Year:g=(t=tg(function(){for(var e=[],t=[],r=.5*f,n=0;n<c.dates.length;n++){var o=c.dates[n],a=o.getFullYear();if(t.push(S().createElement("text",{key:o.getTime(),y:.8*f,x:p*n+.5*p,className:(0,J.cx)("calendarBottomText")},a)),0===n||o.getFullYear()!==c.dates[n-1].getFullYear()){var i=o.getFullYear().toString(),l=void 0;l=d?(6+n+o.getFullYear()+1)*p:(6+n-o.getFullYear())*p,e.push(S().createElement(tm,{key:i,value:i,x1Line:p*n,y1Line:0,y2Line:f,xText:l,yText:.9*r}))}}return[e,t]}(),2))[0],b=t[1];break;case ek.QuarterYear:g=(r=tg(function(){for(var e=[],t=[],r=.5*f,n=0;n<c.dates.length;n++){var o=c.dates[n],a="Q"+Math.floor((o.getMonth()+3)/3);if(t.push(S().createElement("text",{key:o.getTime(),y:.8*f,x:p*n+.5*p,className:(0,J.cx)("calendarBottomText")},a)),0===n||o.getFullYear()!==c.dates[n-1].getFullYear()){var i=o.getFullYear().toString(),l=void 0;l=d?(6+n+o.getMonth()+1)*p:(6+n-o.getMonth())*p,e.push(S().createElement(tm,{key:i,value:i,x1Line:p*n,y1Line:0,y2Line:r,xText:Math.abs(l),yText:.9*r}))}}return[e,t]}(),2))[0],b=r[1];break;case ek.Month:g=(n=tg(function(){for(var e=[],t=[],r=.5*f,n=0;n<c.dates.length;n++){var o=c.dates[n],a=ej(o,s);if(t.push(S().createElement("text",{key:a+o.getFullYear(),y:.8*f,x:p*n+.5*p,className:(0,J.cx)("calendarBottomText")},a)),0===n||o.getFullYear()!==c.dates[n-1].getFullYear()){var i=o.getFullYear().toString(),l=void 0;l=d?(6+n+o.getMonth()+1)*p:(6+n-o.getMonth())*p,e.push(S().createElement(tm,{key:i,value:i,x1Line:p*n,y1Line:0,y2Line:r,xText:l,yText:.9*r}))}}return[e,t]}(),2))[0],b=n[1];break;case ek.Week:g=(o=tg(function(){for(var e=[],t=[],r=1,n=.5*f,o=c.dates,a=o.length-1;a>=0;a--){var i=o[a],l="";(0===a||i.getMonth()!==o[a-1].getMonth())&&(l="".concat(ej(i,s),", ").concat(i.getFullYear()));var u="W".concat(eN(i));t.push(S().createElement("text",{key:i.getTime(),y:.8*f,x:p*(a+ +d),className:(0,J.cx)("calendarBottomText")},u)),l&&(a!==o.length-1&&e.push(S().createElement(tm,{key:l,value:l,x1Line:p*a+r*p,y1Line:0,y2Line:n,xText:p*a+p*r*.5,yText:.9*n})),r=0),r++}return[e,t]}(),2))[0],b=o[1];break;case ek.Day:g=(a=tg(function(){for(var e=[],t=[],r=.5*f,n=c.dates,o=0;o<n.length;o++){var a=n[o],i="".concat(a.getDate().toString());if(t.push(S().createElement("text",{key:a.getTime(),y:.8*f,x:p*o+.5*p,className:(0,J.cx)("calendarBottomText")},i)),o+1!==n.length&&a.getMonth()!==n[o+1].getMonth()){var l,u=ej(a,s);e.push(S().createElement(tm,{key:u+a.getFullYear(),value:u,x1Line:p*(o+1),y1Line:0,y2Line:r,xText:p*(o+1)-(l=a.getMonth(),new Date(a.getFullYear(),l+1,0).getDate()*p*.5),yText:.9*r}))}}return[e,t]}(),2))[0],b=a[1];break;case ek.QuarterDay:case ek.HalfDay:g=(i=tg(function(){for(var e=[],t=[],r=u===ek.HalfDay?2:4,n=.5*f,o=c.dates,a=0;a<o.length;a++){var i=o[a],l=eO(s,{hour:"numeric"}).format(i).replace("时","");if(t.push(S().createElement("text",{key:i.getTime(),y:.8*f,x:p*(a+ +d),className:(0,J.cx)("calendarBottomText"),fontFamily:h},l)),0===a||i.getDate()!==o[a-1].getDate()){var m="".concat(eM(i,s,"short"),", ").concat(i.getDate()," ").concat(ej(i,s));e.push(S().createElement(tm,{key:m+i.getFullYear(),value:m,x1Line:p*a+r*p,y1Line:0,y2Line:n,xText:p*a+r*p*.5,yText:.9*n}))}}return[e,t]}(),2))[0],b=i[1];break;case ek.Hour:g=(l=tg(function(){for(var e=[],t=[],r=.5*f,n=c.dates,o=0;o<n.length;o++){var a,i=n[o],l=null===(a=eO(s,{hour:"numeric"}).format(i))||void 0===a?void 0:a.replace("时","");if(t.push(S().createElement("text",{key:i.getTime(),y:.8*f,x:p*(o+ +d),className:(0,J.cx)("calendarBottomText"),fontFamily:h},l)),0!==o&&i.getDate()!==n[o-1].getDate()){var u=n[o-1],m="".concat(eM(u,s,"long"),", ").concat(u.getDate()," ").concat(ej(u,s)),v=(i.getHours()-24)/2;e.push(S().createElement(tm,{key:m+u.getFullYear(),value:m,x1Line:p*o,y1Line:0,y2Line:r,xText:p*(o+v),yText:.9*r}))}}return[e,t]}(),2))[0],b=l[1]}return S().createElement("g",{className:v.nbGanttCalendar,fontSize:m,fontFamily:h},S().createElement("rect",{x:0,y:0,width:p*c.dates.length,height:f,className:v.calendarheader}),b," ",g)},ty=g("584");function tx(e,t){return!t&&(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function tS(){var e=tx(["\n fill: ",";\n "]);return tS=function(){return e},e}function tw(){var e=tx(["\n fill: #e6f7ff;\n border-color: ",";\n "]);return tw=function(){return e},e}function tk(){var e=tx(["\n .gridrowline: {\n stroke: ",";\n stroke-width: 0;\n border-bottom: 1px solid ",";\n }\n .gridtick: {\n stroke: ",";\n }\n "]);return tk=function(){return e},e}var tC=(0,eH.createStyles)(function(e){var t=e.token,r=e.css;return{gridRow:r(tS(),t.colorBgContainer),gridHeightRow:r(tw(),t.colorBorder),nbGridbody:r(tk(),t.colorBorderSecondary,t.colorBorderSecondary,t.colorBorderSecondary)}}),tO=[{id:(0,ty.uid)()},{id:(0,ty.uid)()},{id:(0,ty.uid)()}],tP=function(e){var t=e.tasks,r=e.dates,n=e.rowHeight,o=e.svgWidth,a=e.columnWidth,i=e.todayColor,l=e.rtl,c=e.selectedRowKeys,s=tC().styles,u=t.length?t:tO,d=0,f=[],p=[S().createElement("line",{key:"RowLineFirst",x:"0",y1:0,x2:o,y2:0,className:(0,J.cx)("gridRowLine")})],h=!0,m=!1,v=void 0;try{for(var g,b=u[Symbol.iterator]();!(h=(g=b.next()).done);h=!0){var y=g.value;f.push(S().createElement("rect",{key:"Row"+y.id,x:"0",y:d,width:o,height:n,className:(null==c?void 0:c.includes(+y.id))?s.gridHeightRow:s.gridRow})),p.push(S().createElement("line",{key:"RowLine"+y.id,x:"0",y1:d+n,x2:o,y2:d+n,className:(0,J.cx)("gridRowLine")})),d+=n}}catch(e){m=!0,v=e}finally{try{!h&&null!=b.return&&b.return()}finally{if(m)throw v}}for(var x=new Date,w=0,k=[],C=S().createElement("rect",null),O=0;O<r.length;O++){var P=r[O];k.push(S().createElement("line",{key:P.getTime(),x1:w,y1:0,x2:w,y2:d,className:(0,J.cx)("gridTick")})),(O+1!==r.length&&P.getTime()<x.getTime()&&r[O+1].getTime()>=x.getTime()||0!==O&&O+1===r.length&&P.getTime()<x.getTime()&&eP(P,P.getTime()-r[O-1].getTime(),"millisecond").getTime()>=x.getTime())&&(C=S().createElement("rect",{x:w,y:0,width:a,height:d,fill:i})),l&&O+1!==r.length&&P.getTime()>=x.getTime()&&r[O+1].getTime()<x.getTime()&&(C=S().createElement("rect",{x:w+a,y:0,width:a,height:d,fill:i})),w+=a}return S().createElement("g",{className:(0,J.cx)("gridBody",s.nbGridbody)},S().createElement("g",{className:"rows"},f),S().createElement("g",{className:"rowLines"},p),S().createElement("g",{className:"ticks"},k),S().createElement("g",{className:"today"},C))},tE=function(e){return S().createElement("g",{className:"grid"},S().createElement(tP,e))};function tT(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function tD(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r,n,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var a=[],i=!0,l=!1;try{for(o=o.call(e);!(i=(r=o.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){l=!0,n=e}finally{try{!i&&null!=o.return&&o.return()}finally{if(l)throw n}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return tT(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return tT(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var tj=function(e){var t,r,n,o,a=e.taskFrom,i=e.taskTo,l=e.rowHeight,c=e.taskHeight,s=e.arrowIndent;return e.rtl?(t=(n=tD(tA(a,i,l,c,s),2))[0],r=n[1]):(t=(o=tD(tM(a,i,l,c,s),2))[0],r=o[1]),S().createElement("g",{className:"arrow"},S().createElement("path",{strokeWidth:"1.5",d:t,fill:"none"}),S().createElement("polygon",{points:r}))},tM=function(e,t,r,n,o){var a=e.index>t.index?-1:1,i=t.y+n/2,l=e.x2+2*o,c=l<t.x1?"":"H ".concat(t.x1-o),s=l>t.x1?o:t.x1-e.x2-o;return["M ".concat(e.x2," ").concat(e.y+n/2," \n h ").concat(o," \n v ").concat(a*r/2," \n ").concat(c,"\n V ").concat(i," \n h ").concat(s),"".concat(t.x1,",").concat(i," \n ").concat(t.x1-5,",").concat(i-5," \n ").concat(t.x1-5,",").concat(i+5)]},tA=function(e,t,r,n,o){var a=e.index>t.index?-1:1,i=t.y+n/2,l=e.x1-2*o,c=l>t.x2?"":"H ".concat(t.x2+o),s=l<t.x2?-o:t.x2-e.x1+o;return["M ".concat(e.x1," ").concat(e.y+n/2," \n h ").concat(-o," \n v ").concat(a*r/2," \n ").concat(c,"\n V ").concat(i," \n h ").concat(s),"".concat(t.x2,",").concat(i," \n ").concat(t.x2+5,",").concat(i+5," \n ").concat(t.x2+5,",").concat(i-5)]},tN=function(e){var t=e.x,r=e.y,n=e.width,o=e.height,a=e.barCornerRadius,i=e.onMouseDown;return S().createElement("rect",{x:t,y:r,width:n,height:o,className:"barHandle",role:"button",ry:a,rx:a,onMouseDown:i})};function tF(e,t){return!t&&(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function tI(){var e=tF(["\n cursor: pointer;\n outline: none;\n .barHandle {\n fill: #ddd;\n cursor: ew-resize;\n opacity: 0;\n // visibility: hidden;\n }\n &:hover .barHandle {\n visibility: visible;\n opacity: 1;\n }\n"]);return tI=function(){return e},e}function tB(){var e=tF(["\n user-select: none;\n stroke-width: 0;\n opacity: 0.6;\n"]);return tB=function(){return e},e}var tH=(0,J.css)(tI()),tR=(0,J.css)(tB()),tz=function(e){var t=e.x,r=e.y,n=e.color,o=e.width,a=e.height,i=e.isSelected,l=e.progressX,c=e.progressWidth,s=e.barCornerRadius,u=e.styles,d=e.onMouseDown;return S().createElement("g",{onMouseDown:d},S().createElement("rect",{x:t,width:o,y:r,height:a,ry:s,rx:s,fill:n?n:i?u.backgroundSelectedColor:u.backgroundColor,className:(0,J.cx)(tR)}),S().createElement("rect",{x:l,width:c,y:r,height:a,ry:s,rx:s,fill:n?n:i?u.progressSelectedColor:u.progressColor}))},tW=function(e){var t=e.progressPoint,r=e.onMouseDown;return S().createElement("polygon",{className:"barHandle",points:t,onMouseDown:r})},tL=function(e){var t=e.task,r=e.isProgressChangeable,n=e.isDateChangeable,o=e.rtl,a=e.onEventStart,i=e.isSelected,l=em(+!o*t.progressWidth+t.progressX,t.y,t.height),c=t.height-2;return S().createElement("g",{className:(0,J.cx)(tH),"aria-label":"task-bar",tabIndex:0},S().createElement(tz,{x:t.x1,y:t.y,color:t.color,width:t.x2-t.x1,height:t.height,progressX:t.progressX,progressWidth:t.progressWidth,barCornerRadius:t.barCornerRadius,styles:t.styles,isSelected:i,onMouseDown:function(e){n&&a("move",t,e)}}),S().createElement("g",{className:"handleGroup"},n&&S().createElement("g",null,S().createElement(tN,{x:t.x1+1,y:t.y+1,width:t.handleWidth,height:c,barCornerRadius:t.barCornerRadius,onMouseDown:function(e){a("start",t,e)}}),S().createElement(tN,{x:t.x2-t.handleWidth-1,y:t.y+1,width:t.handleWidth,height:c,barCornerRadius:t.barCornerRadius,onMouseDown:function(e){a("end",t,e)}})),r&&S().createElement(tW,{progressPoint:l,onMouseDown:function(e){a("progress",t,e)}})))},tq=function(e){var t=e.task,r=e.isProgressChangeable,n=e.isDateChangeable,o=e.onEventStart,a=e.isSelected,i=em(t.progressWidth+t.x1+10,t.y,t.height);return S().createElement("g",{className:(0,J.cx)(tH),tabIndex:0},S().createElement(tz,{x:t.x1,y:t.y,width:t.x2-t.x1,height:t.height,progressX:t.progressX,progressWidth:t.progressWidth,barCornerRadius:t.barCornerRadius,styles:t.styles,isSelected:a,onMouseDown:function(e){n&&o("move",t,e)}}),S().createElement("g",{className:"handleGroup"},r&&S().createElement(tW,{progressPoint:i,onMouseDown:function(e){o("progress",t,e)}})))};function tG(e,t){return!t&&(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function tY(){var e=tG(["\n cursor: pointer;\n outline: none;\n"]);return tY=function(){return e},e}function tX(){var e=tG(["\n user-select: none;\n"]);return tX=function(){return e},e}var tU=(0,J.css)(tY()),t_=(0,J.css)(tX()),tV=function(e){var t=e.task,r=e.isDateChangeable,n=e.onEventStart,o=e.isSelected,a="rotate(45 ".concat(t.x1+.356*t.height," \n ").concat(t.y+.85*t.height,")");return S().createElement("g",{tabIndex:0,className:(0,J.cx)(tU)},S().createElement("rect",{fill:o?t.styles.backgroundSelectedColor:t.styles.backgroundColor,x:t.x1,width:t.height,y:t.y,height:t.height,rx:t.barCornerRadius,ry:t.barCornerRadius,transform:a,className:(0,J.cx)(t_),onMouseDown:function(e){r&&n("move",t,e)}}))};function tQ(e,t){return!t&&(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function t$(){var e=tQ(["\n cursor: pointer;\n outline: none;\n"]);return t$=function(){return e},e}function tK(){var e=tQ(["\n user-select: none;\n opacity: 0.6;\n"]);return tK=function(){return e},e}function tJ(){var e=tQ(["\n user-select: none;\n"]);return tJ=function(){return e},e}var tZ=(0,J.css)(t$()),t0=(0,J.css)(tK());(0,J.css)(tJ());var t1=function(e){var t=e.task,r=e.isSelected,n=r?t.styles.backgroundSelectedColor:t.styles.backgroundColor,o=r?t.styles.progressSelectedColor:t.styles.progressColor,a=t.x2-t.x1;return S().createElement("g",{tabIndex:0,className:(0,J.cx)(tZ)},S().createElement("rect",{fill:t.color||n,x:t.x1,width:a,y:t.y,height:t.height,rx:t.barCornerRadius,ry:t.barCornerRadius,className:(0,J.cx)(t0)}),S().createElement("rect",{x:t.progressX,width:t.progressWidth,y:t.y,height:t.height,ry:t.barCornerRadius,rx:t.barCornerRadius,fill:t.color||o}))};function t2(){var e,t,r=(e=["\n .barLabel: {\n fill: ",",\n textAnchor: middle,\n font-weight: 400,\n dominantBaseline: central,\n WebkitTouchCallout: none,\n WebkitUserSelect: none,\n MozUserSelect: none,\n msUserSelect: none,\n userSelect: none,\n pointerEvents: none,\n },\n .projectLabel: {\n fill: #130d0d,\n fontWeight: 500,\n fontSize: 0.9em,\n dominantBaseline: central,\n WebkitTouchCallout: none,\n WebkitUserSelect: none,\n MozUserSelect: none,\n msUserSelect: none,\n userSelect: none,\n pointerEvents: none,\n },\n .barLabelOutside: {\n fill: ",",\n textAnchor: start,\n WebkitTouchCallout: none,\n WebkitUserSelect: none,\n MozUserSelect: none,\n msUserSelect: none,\n userSelect: none,\n pointerEvents: none,\n },\n }\n }"],!t&&(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}})));return t2=function(){return r},r}var t5=(0,eH.createStyles)(function(e){var t=e.token;return{nbganttTaskitem:(0,e.css)(t2(),t.colorTextLightSolid,t.colorTextLabel)}});function t6(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function t8(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r,n,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var a=[],i=!0,l=!1;try{for(o=o.call(e);!(i=(r=o.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){l=!0,n=e}finally{try{!i&&null!=o.return&&o.return()}finally{if(l)throw n}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return t6(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return t6(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var t3=function(e){var t,r,n=t5().styles,o=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n,o,a;n=e,o=t,a=r[t],o in n?Object.defineProperty(n,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[o]=a})}return e}({},e),a=o.task,i=o.arrowIndent,l=o.isDelete,c=o.taskHeight,s=o.isSelected,u=o.rtl,d=o.onEventStart,f=(0,x.useRef)(null),p=t8((0,x.useState)(S().createElement("div",null)),2),h=p[0],m=p[1],v=t8((0,x.useState)(!0),2),g=v[0],b=v[1],y="project"===a.typeInternal;(0,x.useEffect)(function(){switch(a.typeInternal){case"milestone":m(S().createElement(tV,e));break;case"project":m(S().createElement(t1,e));break;case"smalltask":m(S().createElement(tq,e));break;default:m(S().createElement(tL,e))}},[a,s]),(0,x.useEffect)(function(){f.current&&b(f.current.getBBox().width<a.x2-a.x1)},[f,a]);return S().createElement("g",{className:(0,J.cx)(n.nbganttTaskitem),onKeyDown:function(e){if("Delete"===e.key)l&&d("delete",a,e);e.stopPropagation()},onMouseEnter:function(e){d("mouseenter",a,e)},onMouseLeave:function(e){d("mouseleave",a,e)},onDoubleClick:function(e){d("dblclick",a,e)},onClick:function(e){d("click",a,e)},onFocus:function(){d("select",a)}},h,S().createElement("text",{x:y?a.x1:(t=a.x2-a.x1,r=a.barChildren.length>0,g?a.x1+.5*t:u&&f.current?a.x1-f.current.getBBox().width-i*+r-.2*i:a.x1+t+i*+r+.2*i),y:y?a.y-8:a.y+.65*c,className:y?(0,J.cx)("projectLabel"):g?(0,J.cx)("barLabel"):(0,J.cx)("barLabelOutside"),ref:f},y&&eB(a.start)&&eB(a.end)?"".concat(a.name,": ").concat(eB(a.start)," ~ ").concat(eB(a.end)):a.name))};function t4(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function t9(e,t,r,n,o,a,i){try{var l=e[a](i),c=l.value}catch(e){r(e);return}l.done?t(c):Promise.resolve(c).then(n,o)}function t7(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var a=e.apply(t,r);function i(e){t9(a,n,o,i,l,"next",e)}function l(e){t9(a,n,o,i,l,"throw",e)}i(void 0)})}}function re(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r,n,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var a=[],i=!0,l=!1;try{for(o=o.call(e);!(i=(r=o.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){l=!0,n=e}finally{try{!i&&null!=o.return&&o.return()}finally{if(l)throw n}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return t4(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return t4(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function rt(e,t){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(a){return function(l){return function(a){if(r)throw TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}var rr=null,rn=null,ro=function(e){var t,r,n=e.tasks,o=e.dates,a=e.ganttEvent,i=e.selectedTask,l=e.rowHeight,c=e.columnWidth,s=e.timeStep,u=e.svg,d=e.taskHeight,f=e.arrowColor,p=e.arrowIndent,h=e.fontFamily,m=e.fontSize,v=e.rtl,g=e.setGanttEvent,b=e.setFailedTask,y=e.setSelectedTask,w=e.onDateChange,k=e.onProgressChange,C=e.onDoubleClick,O=e.onClick,P=e.onDelete,E=null==u?void 0:null===(r=u.current)||void 0===r?void 0:r.createSVGPoint(),T=re((0,x.useState)(0),2),D=T[0],j=T[1],M=re((0,x.useState)(0),2),A=M[0],N=M[1],F=re((0,x.useState)(!1),2),I=F[0],B=F[1];(0,x.useEffect)(function(){var e,t,r,n;j(s*c/((null===(e=o[1])||void 0===e?void 0:e.getTime())-(null===(t=o[0])||void 0===t?void 0:t.getTime())-(null===(r=o[1])||void 0===r?void 0:r.getTimezoneOffset())*6e4+(null===(n=o[0])||void 0===n?void 0:n.getTimezoneOffset())*6e4))},[c,o,s]),(0,x.useEffect)(function(){var e,t,r=(e=t7(function(e){var t,r,n,o;return rt(this,function(i){return a.changedTask&&E&&(null==u?void 0:u.current)?(e.preventDefault(),E.x=e.clientX,n=(r=ex(E.matrixTransform(null==u?void 0:null===(t=u.current.getScreenCTM())||void 0===t?void 0:t.inverse()).x,a.action,a.changedTask,D,s,A,v)).isChanged,o=r.changedTask,n&&g({action:a.action,changedTask:o}),[2]):[2]})}),function(t){return e.apply(this,arguments)});var n=(t=t7(function(e){var t,o,i,l,c,d,f,p,h,m,y;return rt(this,function(h){switch(h.label){case 0:if(o=a.action,i=a.originalSelectedTask,!(l=a.changedTask)||!E||!(null==u?void 0:u.current)||!i)return[2];if(e.preventDefault(),E.x=e.clientX,c=ex(E.matrixTransform(null==u?void 0:null===(t=u.current.getScreenCTM())||void 0===t?void 0:t.inverse()).x,o,l,D,s,A,v).changedTask,d=i.start!==c.start||i.end!==c.end||i.progress!==c.progress,u.current.removeEventListener("mousemove",r),u.current.removeEventListener("mouseup",n),g({action:""}),B(!1),f=!0,!(("move"===o||"end"===o||"start"===o)&&w&&d))return[3,5];h.label=1;case 1:return h.trys.push([1,3,,4]),[4,w(c,c.barChildren)];case 2:return void 0!==(p=h.sent())&&(f=p),[3,4];case 3:return h.sent(),f=!1,[3,4];case 4:return[3,9];case 5:if(!(k&&d))return[3,9];h.label=6;case 6:return h.trys.push([6,8,,9]),[4,k(c,c.barChildren)];case 7:return void 0!==(m=h.sent())&&(f=m),[3,9];case 8:return h.sent(),f=!1,[3,9];case 9:return!f&&b(i),[2]}})}),function(e){return t.apply(this,arguments)});!I&&("move"===a.action||"end"===a.action||"start"===a.action||"progress"===a.action)&&(null==u?void 0:u.current)&&(u.current.addEventListener("mousemove",r),u.current.addEventListener("mouseup",n),B(!0))},[a,D,A,k,s,w,u,I,E,v,b,g]);var H=(t=t7(function(e,t,r){var n,o;return rt(this,function(i){switch(i.label){case 0:if(r)return[3,1];return"select"===e&&y(t.id),[3,7];case 1:if(!(void 0!==r.key))return[3,6];if("delete"!==e||!P)return[3,5];i.label=2;case 2:return i.trys.push([2,4,,5]),[4,P(t)];case 3:return void 0!==(n=i.sent())&&n&&g({action:e,changedTask:t}),[3,5];case 4:return console.error("Error on Delete. "+i.sent()),[3,5];case 5:return[3,7];case 6:if("mouseenter"===e)!a.action&&g({action:e,changedTask:t,originalSelectedTask:t});else if("mouseleave"===e)"mouseenter"===a.action&&setTimeout(function(){g({action:""})},300);else if("dblclick"===e)C&&C(t);else if("click"===e)"rect"===r.target.tagName&&O&&O(t);else if("move"===e){if(!(null==u?void 0:u.current)||!E)return[2];E.x=r.clientX,N(E.matrixTransform(null===(o=u.current.getScreenCTM())||void 0===o?void 0:o.inverse()).x-t.x1),g({action:e,changedTask:t,originalSelectedTask:t})}else g({action:e,changedTask:t,originalSelectedTask:t});i.label=7;case 7:return[2]}})}),function(e,r,n){return t.apply(this,arguments)}),R=function(e,t,r){["click"].includes(e)?(!["start","end","progress"].includes(rr)&&(!rn||rn===t.start)&&H(e,t,r),rr=null,rn=null):(["move","select"].includes(e)?rn=t.start:(rn=t.start,rr=e),H(e,t,r))};return S().createElement("g",{className:"content"},S().createElement("g",{className:"arrows",fill:f,stroke:f},n.map(function(e){return e.barChildren.map(function(t){return S().createElement(tj,{key:"Arrow from ".concat(e.id," to ").concat(n[t.index].id),taskFrom:e,taskTo:n[t.index],rowHeight:l,taskHeight:d,arrowIndent:p,rtl:v})})})),S().createElement("g",{className:"bar",fontFamily:h,fontSize:m},n.map(function(e){return S().createElement(t3,{task:e,arrowIndent:p,taskHeight:d,isProgressChangeable:!!k&&!e.isDisabled,isDateChangeable:!!w&&!e.isDisabled,isDelete:!e.isDisabled,onEventStart:R,key:e.id,isSelected:!!i&&e.id===i.id,rtl:v})})))},ra=(0,x.forwardRef)(function(e,t){var r,n,o=e.gridProps,a=e.calendarProps,i=e.barProps,l=e.ganttHeight,c=e.scrollY,s=e.scrollX,u=(0,x.useRef)(null),d=(0,x.useRef)(null);var f=(r=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n,o,a;n=e,o=t,a=r[t],o in n?Object.defineProperty(n,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[o]=a})}return e}({},i),n=(n={svg:u},n),Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r.push.apply(r,n)}return r})(Object(n)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))}),r),p=e2().styles;return(0,x.useEffect)(function(){d.current&&(d.current.scrollTop=c)},[c]),(0,x.useEffect)(function(){t.current&&(t.current.scrollLeft=s)},[s]),S().createElement("div",{className:p.ganttverticalcontainer,ref:t,dir:"ltr"},S().createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:o.svgWidth,height:a.headerHeight,fontFamily:i.fontFamily,className:"ganttHeader"},S().createElement(tb,a)),S().createElement(Z.Spin,{spinning:null==i?void 0:i.loading},S().createElement("div",{ref:d,className:p.horizontalcontainer,style:l?{maxHeight:l,width:o.svgWidth}:{width:o.svgWidth}},S().createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:o.svgWidth,height:i.rowHeight*i.tasks.length||166,fontFamily:i.fontFamily,ref:u,className:"ganttBody"},S().createElement(tE,o),S().createElement(ro,f)))))});function ri(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}ra.displayName="TaskGantt";function rl(e,t,r,n,o,a,i){try{var l=e[a](i),c=l.value}catch(e){r(e);return}l.done?t(c):Promise.resolve(c).then(n,o)}function rc(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var a=e.apply(t,r);function i(e){rl(a,n,o,i,l,"next",e)}function l(e){rl(a,n,o,i,l,"throw",e)}i(void 0)})}}function rs(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ru(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r,n,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var a=[],i=!0,l=!1;try{for(o=o.call(e);!(i=(r=o.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){l=!0,n=e}finally{try{!i&&null!=o.return&&o.return()}finally{if(l)throw n}}return a}}(e,t)||rd(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function rd(e,t){if(e){if("string"==typeof e)return ri(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ri(e,t)}}function rf(e,t){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(a){return function(l){return function(a){if(r)throw TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}function rp(){var e,t,r=(e=["\n .ant-table-container::after {\n box-shadow: none !important;\n }\n .ant-table-row {\n height: ","px;\n }\n .ant-table-thead {\n height: ","px;\n }\n "],!t&&(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}})));return rp=function(){return r},r}var rh=(0,ee.debounce)((p=rc(function(e,t,r,n,o){var a;return rf(this,function(i){switch(i.label){case 0:return[4,t.update({filterByTk:e.id,values:(rs(a={},r.start,e.start),rs(a,r.end,e.end),a)})];case 1:return i.sent(),Z.message.success(o("Saved successfully")),[4,null==n?void 0:n.refresh()];case 2:return i.sent(),[2]}})}),function(e,t,r,n,o){return p.apply(this,arguments)}),300);var rm=(0,ee.debounce)((h=rc(function(e,t,r,n,o){return rf(this,function(a){switch(a.label){case 0:return[4,t.update({filterByTk:e.id,values:rs({},r.progress,e.progress/100)})];case 1:return a.sent(),Z.message.success(o("Saved successfully")),[4,null==n?void 0:n.refresh()];case 2:return a.sent(),[2]}})}),function(e,t,r,n,o){return h.apply(this,arguments)}),300),rv=(0,y.withDynamicSchemaProps)(function(e){var t,r,n,o,a,i,l,c=e2().styles,s=(0,y.useToken)().token,u=null===(a=JSON.parse((0,y.useAPIClient)().auth.getOption("theme")))||void 0===a?void 0:a.uid,d=(0,y.useProps)(e),f=d.listCellWidth,p=void 0===f?"155px":f,h=d.ganttHeight,m=void 0===h?0:h,v=d.preStepsCount,g=void 0===v?1:v,b=d.barFill,k=void 0===b?60:b,C=d.barCornerRadius,O=void 0===C?s.borderRadiusXS:C,P=d.barProgressColor,E=void 0===P?s.colorPrimary:P,T=d.barProgressSelectedColor,j=void 0===T?s.colorPrimary:T,A=d.barBackgroundColor,N=void 0===A?s.colorPrimary:A,F=d.barBackgroundSelectedColor,I=void 0===F?s.colorPrimary:F,B=d.projectProgressColor,H=void 0===B?s.colorPrimary:B,R=d.projectProgressSelectedColor,z=void 0===R?s.colorPrimary:R,W=d.projectBackgroundColor,L=void 0===W?s.colorPrimary:W,q=d.projectBackgroundSelectedColor,G=void 0===q?s.colorPrimary:q,Y=d.milestoneBackgroundColor,X=void 0===Y?"#f1c453":Y,U=d.milestoneBackgroundSelectedColor,_=void 0===U?"#f29e4c":U,V=d.rtl,Q=void 0!==V&&V,$=d.handleWidth,K=void 0===$?8:$,ee=d.timeStep,et=d.arrowColor,er=d.fontFamily,en=void 0===er?"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'":er,eo=d.fontSize,ei=void 0===eo?s.fontSize:eo,el=d.arrowIndent,ec=void 0===el?20:el,es=d.todayColor,eu=d.viewDate,ed=d.TooltipContent,ef=void 0===ed?eQ:ed,ep=d.onDoubleClick,eh=d.onDelete,em=d.onSelect,ev=d.onExpanderClick,eg=d.tasks,eb=d.expandAndCollapseAll,ey=d.fieldNames,ex=d.loading,eS=(0,y.useDesignable)().designable,ew=(null==u?void 0:u.includes("compact"))?45:eS?65:55,ek=(null==u?void 0:u.includes("compact"))?45:65,eC=D(),eO=(0,y.useCurrentAppInfo)(),eP=(0,M.useTranslation)().t,eE=null===(i=eO.data)||void 0===i?void 0:i.lang,ej=(0,y.useTableBlockContext)(),eM=(0,y.useBlockRequestContext)(),eA=eM.resource,eN=eM.service,eB=(0,w.useFieldSchema)(),eH=ey.range||"day",eR=(0,x.useRef)(null),ez=(0,x.useRef)(null),eW=(0,x.useRef)(null),eL=(0,x.useRef)(null),eq=ru((0,x.useState)(function(){var e=ru(eT(eg,eH,g),2);return{viewMode:eH,dates:eD(e[0],e[1],eH)}}),2),eG=eq[0],eY=eq[1],eU=ru((0,x.useState)(!1),2),e_=eU[0],eJ=eU[1],eZ=(0,y.usePopupUtils)({setVisible:eJ}).openPopup,e0=ru((0,x.useState)({}),2),e1=e0[0],e5=e0[1],e6=(0,y.useCollectionParentRecordData)(),e8=ru((0,x.useState)(void 0),2),e3=e8[0],e4=e8[1],e9=ru((0,x.useState)(0),2),e7=e9[0],te=e9[1],tt=ru((0,x.useState)(0),2),tr=tt[0],tn=tt[1],to=ru((0,x.useState)(m),2),ta=to[0],ti=to[1],tl=ru((0,x.useState)([]),2),tc=tl[0],ts=tl[1],tu=ru((0,x.useState)({action:""}),2),td=tu[0],tf=tu[1],tp=(0,x.useMemo)(function(){return ek*k/100},[ek,k]),th=ru((0,x.useState)(),2),tm=th[0],tv=th[1],tg=ru((0,x.useState)(null),2),tb=tg[0],ty=tg[1],tx=ru((0,x.useState)(0),2),tS=tx[0],tw=tx[1],tk=ru((0,x.useState)(-1),2),tC=tk[0],tO=tk[1],tP=ru((0,x.useState)(!1),2),tE=tP[0],tT=tP[1];var tD=(t=eG.dates.length,(r=null===(l=eW.current)||void 0===l?void 0:l.clientWidth)/t>50?Math.floor(r/t)+20:50),tj=eG.dates.length*tD,tM=tc.length*ek,tA=ej.expandFlag,tN=ru((0,x.useState)([]),2),tF=tN[0],tI=tN[1];(0,x.useEffect)(function(){ej.field.onExpandClick=tB,ej.field.onRowSelect=tH},[]),(0,x.useEffect)(function(){null==eb||eb(!tA)},[tA]),(0,x.useEffect)(function(){var e,t=ru(eT(e=(e=ev?function(e){var t=e.filter(function(e){return e.hideChildren&&"project"===e.type});if(t.length>0)for(var r=0;t.length>r;r++)!function(r){var n=t[r],o=function e(t,r){var n=[];n="project"!==r.type?t.filter(function(e){return e.dependencies&&-1!==e.dependencies.indexOf(r.id)}):t.filter(function(e){return e.project&&e.project===r.id});var o=[];return n.forEach(function(r){var n;o.push.apply(o,function(e){if(Array.isArray(e))return eF(e)}(n=e(t,r))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,t){if(e){if("string"==typeof e)return eF(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return eF(e,t)}}(n)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}),n=n.concat(n,o)}(e,n);e=e.filter(function(e){return -1===o.indexOf(e)})}(r);return e}(eg):eg).sort(eI),eH,g),2),r=eD(t[0],t[1],eH);Q&&(r=r.reverse(),-1===tC&&tO(r.length*tD)),eY({dates:r,viewMode:eH}),ts(ea(e,r,tD,ek,tp,O,K,Q,E,j,N,I,H,z,L,G,X,_))},[eg,eH,g,ek,O,tD,tp,K,E,j,N,I,H,z,L,G,X,_,Q,tC]),(0,x.useEffect)(function(){if(eH===eG.viewMode&&(eu&&!e3||eu&&(null==e3?void 0:e3.valueOf())!==eu.valueOf())){var e=eG.dates,t=e.findIndex(function(t,r){return eu.valueOf()>=t.valueOf()&&r+1!==e.length&&eu.valueOf()<e[r+1].valueOf()});if(-1!==t)e4(eu),tO(tD*t)}},[eu,tD,eG.dates,eG.viewMode,eH,e3,e4]),(0,x.useEffect)(function(){var e=td.changedTask,t=td.action;if(e){if("delete"===t)tf({action:""}),ts(tc.filter(function(t){return t.id!==e.id}));else if("move"===t||"end"===t||"start"===t||"progress"===t){var r=tc.find(function(t){return t.id===e.id});r&&r.start&&r.end&&(r.start.getTime()!==e.start.getTime()||r.end.getTime()!==e.end.getTime()||r.progress!==e.progress)&&ts(tc.map(function(t){return t.id===e.id?e:t}))}}},[td,tc]),(0,x.useEffect)(function(){tb&&(ts(tc.map(function(e){return e.id!==tb.id?e:tb})),ty(null))},[tb,tc]),(0,x.useEffect)(function(){!p&&te(0),ez.current&&te(ez.current.offsetWidth)},[ez,p]),(0,x.useEffect)(function(){eR.current&&tn(eR.current.offsetWidth-e7)},[eR,e7]),(0,x.useEffect)(function(){m?ti(m+ew):ti(eg.length*ek+ew)},[m,eg,ew,ek]),(0,x.useEffect)(function(){var e,t=function(e){if(e.shiftKey||e.deltaX){var t=tC+(e.deltaX?e.deltaX:e.deltaY);t<0?t=0:t>tj&&(t=tj),tO(t),e.preventDefault()}else if(m){var r=tS+e.deltaY;r<0?r=0:r>tM-m&&(r=tM-m),r!==tS&&(tw(r),e.preventDefault())}tT(!0)};return null===(e=eR.current)||void 0===e||e.addEventListener("wheel",t,{passive:!1}),function(){var e;null===(e=eR.current)||void 0===e||e.removeEventListener("wheel",t)}},[eR,tS,tC,m,tj,Q,tM]);var tB=function(e,t){var r,n,o,a=null==eC?void 0:null===(o=eC.field)||void 0===o?void 0:o.data.find(function(e){return e.id===t.id+""});if(ev&&t.children.length){;ev((r=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){rs(e,t,r[t])})}return e}({},a),n=(n={hideChildren:!e},n),Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r.push.apply(r,n)}return r})(Object(n)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))}),r))}},tH=function(e){tI(e)};var tR=(n=rc(function(e){return rf(this,function(t){return rm(e,eA,ey,eN,eP),[2]})}),function(e){return n.apply(this,arguments)});var tz=(o=rc(function(e){return rf(this,function(t){return rh(e,eA,ey,eN,eP),[2]})}),function(e){return o.apply(this,arguments)}),tW={columnWidth:tD,svgWidth:tj,tasks:eg,rowHeight:ek,dates:eG.dates,todayColor:void 0===es?"rgba(252, 248, 227, 0.5)":es,rtl:Q,selectedRowKeys:tF},tL={tasks:tc,dates:eG.dates,ganttEvent:td,selectedTask:tm,rowHeight:ek,taskHeight:tp,columnWidth:tD,arrowColor:void 0===et?"grey":et,timeStep:void 0===ee?3e5:ee,fontFamily:en,fontSize:ei,arrowIndent:ec,svgWidth:tj,rtl:Q,setGanttEvent:tf,setFailedTask:ty,setSelectedTask:function(e){var t=tc.find(function(t){return t.id===e}),r=tc.find(function(e){return!!tm&&e.id===tm.id});em&&(r&&em(r,!1),t&&em(t,!0)),tv(t)},onDateChange:tz,onProgressChange:ey.progress&&tR,onDoubleClick:ep,onClick:function(e){var t,r=function(e){return e.reduce(function(e,t){var n;if(!t.children)return e.concat(t);return e.concat([t].concat(function(e){if(Array.isArray(e))return ri(e)}(n=r(t.children))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||rd(n)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()))},[])},n=r(null==eN?void 0:null===(t=eN.data)||void 0===t?void 0:t.data),o=null==n?void 0:n.find(function(t){return t.id===+e.id});if(!!o)e5(o),eZ({recordData:o,customActionSchema:eB.properties.detail})},onDelete:eh,loading:ex};return S().createElement("div",{className:(0,J.cx)((0,J.css)(rp(),ek,ew)),ref:eL},S().createElement(y.PopupContextProvider,{visible:e_,setVisible:eJ},S().createElement(y.RecordProvider,{record:e1,parent:e6},S().createElement(eK,null)),S().createElement(w.RecursionField,{name:"anctionBar",schema:eB.properties.toolBar}),S().createElement(w.RecursionField,{name:"table",schema:eB.properties.table}),S().createElement("div",{className:c.wrapper,onKeyDown:function(e){e.preventDefault();var t=tS,r=tC,n=!0;switch(e.key){case"Down":case"ArrowDown":t+=ek,n=!1;break;case"Up":case"ArrowUp":t-=ek,n=!1;break;case"Left":case"ArrowLeft":r-=tD;break;case"Right":case"ArrowRight":r+=tD}n?(r<0?r=0:r>tj&&(r=tj),tO(r)):(t<0?t=0:t>tM-m&&(t=tM-m),tw(t)),tT(!0)},tabIndex:0,ref:eR},S().createElement(ra,{gridProps:tW,calendarProps:{dateSetup:eG,locale:eE,viewMode:eH,headerHeight:ew,columnWidth:tD,fontFamily:en,fontSize:ei,rtl:Q},barProps:tL,ganttHeight:m,scrollY:tS,scrollX:tC,ref:eW}),td.changedTask&&S().createElement(eV,{arrowIndent:ec,rowHeight:ek,svgContainerHeight:ta,svgContainerWidth:tr,fontFamily:en,fontSize:ei,scrollX:tC,scrollY:tS,task:td.changedTask,headerHeight:ew,taskListWidth:e7,TooltipContent:ef,rtl:Q,svgWidth:tj}),S().createElement(e$,{ganttFullHeight:tM,ganttHeight:m,headerHeight:ew,scroll:tS,onScroll:function(e){tS===e.currentTarget.scrollTop||tE?tT(!1):(tw(e.currentTarget.scrollTop),tT(!0))},rtl:Q}),S().createElement(Z.Spin,{spinning:ex,style:{visibility:"hidden"}},S().createElement(eX,{svgWidth:tj,taskListWidth:e7,scroll:tC,rtl:Q,onScroll:function(e){tC===e.currentTarget.scrollLeft||tE?tT(!1):(tO(e.currentTarget.scrollLeft),tT(!0))}})))))});function rg(e,t,r,n,o,a,i){try{var l=e[a](i),c=l.value}catch(e){r(e);return}l.done?t(c):Promise.resolve(c).then(n,o)}function rb(e,t,r){return(rb=rk()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&rS(o,r.prototype),o}).apply(null,arguments)}function ry(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function rx(e){return(rx=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function rS(e,t){return(rS=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function rw(e){var t="function"==typeof Map?new Map:void 0;return(rw=function(e){var r;if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return rb(e,arguments,rx(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),rS(n,e)})(e)}function rk(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(rk=function(){return!!e})()}rv.ActionBar=y.ActionBar,rv.ViewMode=ek,rv.Designer=function(){var e=(0,y.useCollection_deprecated)(),t=e.name,r=e.title,n=(0,y.useSchemaTemplate)();return S().createElement(y.GeneralSchemaDesigner,{schemaSettings:"blockSettings:gantt",template:n,title:r||t})},rv.Event=K;var rC=S().memo(function(e){return S().createElement(y.SchemaComponentOptions,{components:{Gantt:rv,GanttBlockInitializer:Q,GanttBlockProvider:T},scope:{useGanttBlockProps:j}},e.children)});rC.displayName="GanttProvider";var rO=function(e){var t,r,n;function o(){var e,t,r;return!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,o),e=this,t=o,r=arguments,t=rx(t),function(e,t){return t&&("object"===function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}(t)||"function"==typeof t)?t:function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,rk()?Reflect.construct(t,r||[],rx(e).constructor):t.apply(e,r))}return!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&rS(e,t)}(o,e),t=o,r=[{key:"load",value:function(){var e,t=this;return(e=function(){var e;return function(e,t){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(a){return function(l){return function(a){if(r)throw TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}(this,function(r){return t.app.use(rC),t.app.schemaSettingsManager.add(I),t.app.schemaSettingsManager.add(B),t.app.schemaInitializerManager.add(z),t.app.schemaInitializerManager.add(W),null==(e=t.app.schemaInitializerManager.get("page:addBlock"))||e.add("dataBlocks.gantt",{title:"{{t('Gantt')}}",Component:"GanttBlockInitializer"}),t.app.schemaInitializerManager.addItem("popup:common:addBlock","dataBlocks.gantt",{title:"{{t('Gantt')}}",Component:"GanttBlockInitializer",useComponentProps:function(){var e,t,r,n,o,a,i=(e=(0,y.useSchemaInitializer)().insert,t=(0,M.useTranslation)().t,r=(0,x.useContext)(w.SchemaOptionsContext),n=(0,y.useGlobalTheme)().theme,o=(0,y.useCollectionManager_deprecated)().getCollectionFields,{createAssociationGanttBlock:(a=U(function(a){var i,l,c,s,u,d,f,p,h,m;return V(this,function(v){switch(v.label){case 0:return u=(i=a.item).associationField,f=null==(d=o(i.name,i.dataSource))?void 0:null===(l=d.filter(function(e){return"string"===e.type}))||void 0===l?void 0:l.map(function(e){var t;return{label:null==e?void 0:null===(t=e.uiSchema)||void 0===t?void 0:t.title,value:e.name}}),p=null==d?void 0:null===(c=d.filter(function(e){return"date"===e.type}))||void 0===c?void 0:c.map(function(e){var t;return{label:null==e?void 0:null===(t=e.uiSchema)||void 0===t?void 0:t.title,value:e.name}}),h=null==d?void 0:null===(s=d.filter(function(e){return"float"===e.type}))||void 0===s?void 0:s.map(function(e){var t;return{label:null==e?void 0:null===(t=e.uiSchema)||void 0===t?void 0:t.title,value:e.name}}),[4,(0,y.FormDialog)(t("Create gantt block"),function(){return S().createElement(y.SchemaComponentOptions,{scope:r.scope,components:_({},r.components)},S().createElement(q.FormLayout,{layout:"vertical"},S().createElement(y.SchemaComponent,{schema:{properties:{title:{title:t("Title field"),enum:f,required:!0,"x-component":"Select","x-decorator":"FormItem"},start:{title:t("Start date field"),enum:p,required:!0,default:"createdAt","x-component":"Select","x-decorator":"FormItem"},end:{title:t("End date field"),enum:p,required:!0,"x-component":"Select","x-decorator":"FormItem"},progress:{title:t("Progress field"),enum:h,"x-component":"Select","x-decorator":"FormItem"},range:{title:t("Time scale"),enum:[{label:'{{t("Hour")}}',value:"hour",color:"orange"},{label:'{{t("Quarter of day")}}',value:"quarterDay",color:"default"},{label:'{{t("Half of day")}}',value:"halfDay",color:"blue"},{label:'{{t("Day")}}',value:"day",color:"yellow"},{label:'{{t("Week")}}',value:"week",color:"pule"},{label:'{{t("Month")}}',value:"month",color:"green"},{label:'{{t("Year")}}',value:"year",color:"green"},{label:'{{t("QuarterYear")}}',value:"quarterYear",color:"red"}],default:"day","x-component":"Select","x-decorator":"FormItem"}}}})))},n).open({initialValues:{}})];case 1:return m=v.sent(),e(Y({association:"".concat(u.collectionName,".").concat(u.name),dataSource:i.dataSource,fieldNames:_({},m)})),[2]}})}),function(e){return a.apply(this,arguments)})}).createAssociationGanttBlock,l=$().createGanttBlock;return{onlyCurrentDataSource:!0,filterCollections:function(e){var t=e.associationField;return!!t&&["hasMany","belongsToMany"].includes(t.type)},createBlockSchema:function(e){var t=e.item;if(e.fromOthersInPopup)return l({item:t});i({item:t})},showAssociationFields:!0,hideSearch:!0}}}),t.app.addScopes({useGanttBlockProps:j}),[2]})},function(){var t=this,r=arguments;return new Promise(function(n,o){var a=e.apply(t,r);function i(e){rg(a,n,o,i,l,"next",e)}function l(e){rg(a,n,o,i,l,"throw",e)}i(void 0)})})()}}],ry(t.prototype,r),o}(rw(y.Plugin)),rP=rO;return b}()});
10
+ (function(I,c){typeof exports=="object"&&typeof module!="undefined"?c(exports,require("react/jsx-runtime"),require("@nocobase/client"),require("react"),require("@formily/react"),require("react-i18next"),require("@ant-design/icons"),require("@formily/antd-v5"),require("@formily/shared"),require("@emotion/css"),require("antd"),require("lodash"),require("antd-style"),require("@nocobase/utils/client")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","@nocobase/client","react","@formily/react","react-i18next","@ant-design/icons","@formily/antd-v5","@formily/shared","@emotion/css","antd","lodash","antd-style","@nocobase/utils/client"],c):(I=typeof globalThis!="undefined"?globalThis:I||self,c(I["@nocobase/plugin-gantt"]={},I.jsxRuntime,I["@nocobase/client"],I.react,I["@formily/react"],I["react-i18next"],I["@ant-design/icons"],I["@formily/antd-v5"],I["@formily/shared"],I["@emotion/css"],I.antd,I.lodash,I["antd-style"],I["@nocobase/utils"]))})(this,function(I,c,d,b,A,Ce,Ke,we,ie,M,Ve,ht,Ee,Je){"use strict";var jo=Object.defineProperty,qo=Object.defineProperties;var Uo=Object.getOwnPropertyDescriptors;var or=Object.getOwnPropertySymbols;var Wo=Object.prototype.hasOwnProperty,Qo=Object.prototype.propertyIsEnumerable;var nr=(I,c,d)=>c in I?jo(I,c,{enumerable:!0,configurable:!0,writable:!0,value:d}):I[c]=d,H=(I,c)=>{for(var d in c||(c={}))Wo.call(c,d)&&nr(I,d,c[d]);if(or)for(var d of or(c))Qo.call(c,d)&&nr(I,d,c[d]);return I},Se=(I,c)=>qo(I,Uo(c));var R=(I,c,d)=>new Promise((b,A)=>{var Ce=ie=>{try{we(d.next(ie))}catch(M){A(M)}},Ke=ie=>{try{we(d.throw(ie))}catch(M){A(M)}},we=ie=>ie.done?b(ie.value):Promise.resolve(ie.value).then(Ce,Ke);we((d=d.apply(I,c)).next())});const ar=()=>{const{name:e,title:t}=d.useCollection_deprecated(),r=d.useSchemaTemplate();return c.jsx(d.GeneralSchemaDesigner,{schemaSettings:"blockSettings:gantt",template:r,title:t||e})},Ze=b.createContext({});Ze.displayName="GanttBlockContext";const Re=(e=[],t,r=[],o=void 0,n=!1,a,s,i)=>(e.forEach(l=>{var D,w;const u=a(l),g=parseFloat((l[t.progress]*100).toFixed(2)),y=d.getLabelFormatValue(i,l[t.title]);l.children&&l.children.length?(r.push({start:new Date((D=l[t.start])!=null?D:void 0),end:new Date((w=l[t.end])!=null?w:void 0),name:y,id:l[s]+"",type:"project",progress:g>100?100:g||0,hideChildren:n,project:o,color:l.color,isDisabled:u}),Re(l.children,t,r,l.id+"",n,a,s,i)):r.push({start:l[t.start]?new Date(l[t.start]):void 0,end:new Date(l[t.end]||l[t.start]),name:y,id:l[s]+"",type:t.end?"task":"milestone",progress:g>100?100:g||0,project:o,color:l.color,isDisabled:u})}),r),sr=e=>{const{fieldNames:t,timeRange:r,resource:o}=e,n=A.useField(),{service:a}=d.useBlockRequestContext();return c.jsx(Ze.Provider,{value:{field:n,service:a,resource:o,fieldNames:t,timeRange:r},children:e.children})},ir=e=>{var n;const r=d.useCollectionManager_deprecated(e.dataSource).getCollection(e.collection,e.dataSource),o={filter:(n=e.params)==null?void 0:n.filter,paginate:!1,sort:[(r==null?void 0:r.primaryKey)||"id"]};return r!=null&&r.tree&&(o.tree=!0),c.jsx("div",{"aria-label":"block-item-gantt",role:"button",children:c.jsx(d.TableBlockProvider,Se(H({},e),{params:o,children:c.jsx(sr,H({},e))}))})},J=()=>b.useContext(Ze),gt=()=>{var v,N;const e=J(),{fieldNames:t}=e,[r,o]=b.useState([]),{getPrimaryKey:n,name:a,template:s,writableView:i}=d.useCollection_deprecated(),{parseAction:l}=d.useACLRoleContext(),u=d.useTableBlockContext(),[g,y]=b.useState(!1),D=n(),{fields:w}=d.useCollection(),C=(v=w.find(x=>x.name===(t==null?void 0:t.title)))==null?void 0:v.uiSchema,k=x=>{const h=`${a}:update`,p={},S=x==null?void 0:x[D],P=l(h,{schema:p,recordPkValue:S});return s==="view"&&!i||!P},m=x=>{const p=e.field.data.map(S=>S.id===x.id?x:S);o(p),e.field.data=p},f=x=>{var p;const h=Re((p=e.service.data)==null?void 0:p.data,e.fieldNames,[],void 0,x,k,D,C);o(h),e.field.data=h};return b.useEffect(()=>{var x,h;if(y(!0),!((x=e==null?void 0:e.service)!=null&&x.loading)){const p=Re((h=e.service.data)==null?void 0:h.data,e.fieldNames,[],void 0,!1,k,D,C);o(p),y(!1),e.field.data=p,r.length>0&&u.setExpandFlag(!0)}},[(N=e==null?void 0:e.service)==null?void 0:N.loading]),{fieldNames:e.fieldNames,timeRange:e.timeRange,onExpanderClick:m,expandAndCollapseAll:f,tasks:r,loading:g}},re=()=>Ce.useTranslation("gantt"),fe=(e="string")=>{var n;const t=d.useCompile(),{fields:r}=d.useCollection_deprecated();return(n=r==null?void 0:r.filter(a=>typeof e=="string"?a.type===e:e.includes(a.type)))==null?void 0:n.map(a=>{var s;return{value:a.name,label:t((s=a==null?void 0:a.uiSchema)==null?void 0:s.title)}})},lr=new d.SchemaSettings({name:"GanttBlockSettings",items:[{name:"title",Component:d.SchemaSettingsBlockTitleItem},{name:"titleField",Component:d.SchemaSettingsSelectItem,useComponentProps(){var s;const{t:e}=re(),t=A.useFieldSchema(),r=((s=t==null?void 0:t["x-decorator-props"])==null?void 0:s.fieldNames)||{},{service:o}=J(),n=A.useField(),{dn:a}=d.useDesignable();return{title:e("Title field"),value:r.title,options:fe("string"),onChange:i=>{const l=n.decoratorProps.fieldNames||{};l.title=i,n.decoratorProps.params=l,t["x-decorator-props"].params=l,t["x-decorator-props"].fieldNames=l,o.refresh(),a.emit("patch",{schema:{"x-uid":t["x-uid"],"x-decorator-props":n.decoratorProps}}),a.refresh()}}}},{name:"timeScale",Component:d.SchemaSettingsSelectItem,useComponentProps(){var i;const{t:e}=re(),t=A.useFieldSchema(),r=((i=t==null?void 0:t["x-decorator-props"])==null?void 0:i.fieldNames)||{},o=A.useField(),{service:n}=J(),{dn:a}=d.useDesignable(),s=d.useCompile();return{title:e("Time scale"),value:r.range||"day",options:[{label:s('{{t("Hour")}}'),value:"hour",color:"orange"},{label:s('{{t("Quarter of day")}}'),value:"quarterDay",color:"default"},{label:s('{{t("Half of day")}}'),value:"halfDay",color:"blue"},{label:s('{{t("Day")}}'),value:"day",color:"yellow"},{label:s('{{t("Week")}}'),value:"week",color:"pule"},{label:s('{{t("Month")}}'),value:"month",color:"green"},{label:s('{{t("QuarterYear")}}'),value:"quarterYear",color:"red"},{label:s('{{t("Year")}}'),value:"year",color:"green"}],onChange:l=>{const u=o.decoratorProps.fieldNames||{};u.range=l,o.decoratorProps.params=u,t["x-decorator-props"].params=u,t["x-decorator-props"].fieldNames=u,n.refresh(),a.emit("patch",{schema:{"x-uid":t["x-uid"],"x-decorator-props":o.decoratorProps}}),a.refresh()}}}},{name:"startDateField",Component:d.SchemaSettingsSelectItem,useComponentProps(){var s;const{t:e}=re(),t=A.useFieldSchema(),r=((s=t==null?void 0:t["x-decorator-props"])==null?void 0:s.fieldNames)||{},o=A.useField(),{dn:n}=d.useDesignable(),{service:a}=J();return{title:e("Start date field"),value:r.start,options:fe("date"),onChange:i=>{const l=o.decoratorProps.fieldNames||{};l.start=i,o.decoratorProps.fieldNames=l,t["x-decorator-props"].fieldNames=l,a.refresh(),n.emit("patch",{schema:{"x-uid":t["x-uid"],"x-decorator-props":o.decoratorProps}}),n.refresh()}}}},{name:"endDateField",Component:d.SchemaSettingsSelectItem,useComponentProps(){var s;const{t:e}=re(),t=A.useFieldSchema(),r=A.useField(),{service:o}=J(),{dn:n}=d.useDesignable(),a=((s=t==null?void 0:t["x-decorator-props"])==null?void 0:s.fieldNames)||{};return{title:e("End date field"),value:a.end,options:fe("date"),onChange:i=>{const l=r.decoratorProps.fieldNames||{};l.end=i,r.decoratorProps.fieldNames=l,t["x-decorator-props"].fieldNames=l,o.refresh(),n.emit("patch",{schema:{"x-uid":t["x-uid"],"x-decorator-props":r.decoratorProps}}),n.refresh()}}}},{name:"processField",Component:d.SchemaSettingsSelectItem,useComponentProps(){var s;const{t:e}=re(),t=A.useFieldSchema(),r=((s=t==null?void 0:t["x-decorator-props"])==null?void 0:s.fieldNames)||{},{service:o}=J(),{dn:n}=d.useDesignable(),a=A.useField();return{title:e("Progress field"),value:r.progress,options:fe("float"),onChange:i=>{const l=a.decoratorProps.fieldNames||{};l.progress=i,a.decoratorProps.fieldNames=l,t["x-decorator-props"].fieldNames=l,o.refresh(),n.emit("patch",{schema:{"x-uid":t["x-uid"],"x-decorator-props":a.decoratorProps}}),n.refresh()}}}},{name:"dataScope",Component:d.SchemaSettingsDataScope,useComponentProps(){var a,s;const{name:e}=d.useCollection_deprecated(),t=A.useFieldSchema(),{form:r}=d.useFormBlockContext(),o=A.useField(),{dn:n}=d.useDesignable();return{collectionName:e,defaultFilter:((s=(a=t==null?void 0:t["x-decorator-props"])==null?void 0:a.params)==null?void 0:s.filter)||{},form:r,onSubmit:({filter:i})=>{i=d.removeNullCondition(i);const l=o.decoratorProps.params||{};l.filter=i,o.decoratorProps.params=l,t["x-decorator-props"].params=l,n.emit("patch",{schema:{"x-uid":t["x-uid"],"x-decorator-props":t["x-decorator-props"]}})}}}},{name:"divider",type:"divider"},{name:"template",Component:d.SchemaSettingsTemplate,useComponentProps(){const{name:e}=d.useCollection_deprecated(),{componentNamePrefix:t}=d.useBlockTemplateContext();return{componentName:`${t}Gantt`,collectionName:e}}},{name:"divider2",type:"divider"},{name:"remove",type:"remove",componentProps:{removeParentsIfNoChildren:!0,breakRemoveOn:{"x-component":"Grid"}}}]}),cr=new d.SchemaSettings({name:"blockSettings:gantt",items:[{name:"title",Component:d.SchemaSettingsBlockTitleItem},{name:"titleField",Component:d.SchemaSettingsSelectItem,useComponentProps(){var s;const{t:e}=re(),t=A.useFieldSchema(),r=((s=t==null?void 0:t["x-decorator-props"])==null?void 0:s.fieldNames)||{},{service:o}=J(),n=A.useField(),{dn:a}=d.useDesignable();return{title:e("Title field"),value:r.title,options:fe("string"),onChange:i=>{const l=n.decoratorProps.fieldNames||{};l.title=i,n.decoratorProps.params=l,t["x-decorator-props"].params=l,t["x-decorator-props"].fieldNames=l,o.refresh(),a.emit("patch",{schema:{"x-uid":t["x-uid"],"x-decorator-props":n.decoratorProps}}),a.refresh()}}}},{name:"timeScale",Component:d.SchemaSettingsSelectItem,useComponentProps(){var i;const{t:e}=re(),t=A.useFieldSchema(),r=((i=t==null?void 0:t["x-decorator-props"])==null?void 0:i.fieldNames)||{},o=A.useField(),{service:n}=J(),{dn:a}=d.useDesignable(),s=d.useCompile();return{title:e("Time scale"),value:r.range||"day",options:[{label:s('{{t("Hour")}}'),value:"hour",color:"orange"},{label:s('{{t("Quarter of day")}}'),value:"quarterDay",color:"default"},{label:s('{{t("Half of day")}}'),value:"halfDay",color:"blue"},{label:s('{{t("Day")}}'),value:"day",color:"yellow"},{label:s('{{t("Week")}}'),value:"week",color:"pule"},{label:s('{{t("Month")}}'),value:"month",color:"green"},{label:s('{{t("QuarterYear")}}'),value:"quarterYear",color:"red"},{label:s('{{t("Year")}}'),value:"year",color:"green"}],onChange:l=>{const u=o.decoratorProps.fieldNames||{};u.range=l,o.decoratorProps.params=u,t["x-decorator-props"].params=u,t["x-decorator-props"].fieldNames=u,n.refresh(),a.emit("patch",{schema:{"x-uid":t["x-uid"],"x-decorator-props":o.decoratorProps}}),a.refresh()}}}},{name:"startDateField",Component:d.SchemaSettingsSelectItem,useComponentProps(){var s;const{t:e}=re(),t=A.useFieldSchema(),r=((s=t==null?void 0:t["x-decorator-props"])==null?void 0:s.fieldNames)||{},o=A.useField(),{dn:n}=d.useDesignable(),{service:a}=J();return{title:e("Start date field"),value:r.start,options:fe(["date","datetime","dateOnly","datetimeNoTz"]),onChange:i=>{const l=o.decoratorProps.fieldNames||{};l.start=i,o.decoratorProps.fieldNames=l,t["x-decorator-props"].fieldNames=l,a.refresh(),n.emit("patch",{schema:{"x-uid":t["x-uid"],"x-decorator-props":o.decoratorProps}}),n.refresh()}}}},d.setDataLoadingModeSettingsItem,{name:"endDateField",Component:d.SchemaSettingsSelectItem,useComponentProps(){var s;const{t:e}=re(),t=A.useFieldSchema(),r=A.useField(),{service:o}=J(),{dn:n}=d.useDesignable(),a=((s=t==null?void 0:t["x-decorator-props"])==null?void 0:s.fieldNames)||{};return{title:e("End date field"),value:a.end,options:fe(["date","datetime","dateOnly","datetimeNoTz"]),onChange:i=>{const l=r.decoratorProps.fieldNames||{};l.end=i,r.decoratorProps.fieldNames=l,t["x-decorator-props"].fieldNames=l,o.refresh(),n.emit("patch",{schema:{"x-uid":t["x-uid"],"x-decorator-props":r.decoratorProps}}),n.refresh()}}}},{name:"processField",Component:d.SchemaSettingsSelectItem,useComponentProps(){var s;const{t:e}=re(),t=A.useFieldSchema(),r=((s=t==null?void 0:t["x-decorator-props"])==null?void 0:s.fieldNames)||{},{service:o}=J(),{dn:n}=d.useDesignable(),a=A.useField();return{title:e("Progress field"),value:r.progress,options:fe("float"),onChange:i=>{const l=a.decoratorProps.fieldNames||{};l.progress=i,a.decoratorProps.fieldNames=l,t["x-decorator-props"].fieldNames=l,o.refresh(),n.emit("patch",{schema:{"x-uid":t["x-uid"],"x-decorator-props":a.decoratorProps}}),n.refresh()}}}},{name:"dataScope",Component:d.SchemaSettingsDataScope,useComponentProps(){var a,s;const{name:e}=d.useCollection(),t=A.useFieldSchema(),{form:r}=d.useFormBlockContext(),o=A.useField(),{dn:n}=d.useDesignable();return{collectionName:e,defaultFilter:((s=(a=t==null?void 0:t["x-decorator-props"])==null?void 0:a.params)==null?void 0:s.filter)||{},form:r,onSubmit:({filter:i})=>{i=d.removeNullCondition(i);const l=o.decoratorProps.params||{};l.filter=i,o.decoratorProps.params=l,t["x-decorator-props"].params=l,n.emit("patch",{schema:{"x-uid":t["x-uid"],"x-decorator-props":t["x-decorator-props"]}})}}}},{name:"divider",type:"divider"},{name:"template",Component:d.SchemaSettingsTemplate,useComponentProps(){const{name:e}=d.useCollection(),{componentNamePrefix:t}=d.useBlockTemplateContext();return{componentName:`${t}Gantt`,collectionName:e}}},{name:"divider2",type:"divider"},{name:"remove",type:"remove",componentProps:{removeParentsIfNoChildren:!0,breakRemoveOn:{"x-component":"Grid"}}}]}),mt={title:"{{t('Configure actions')}}",icon:"SettingOutlined",style:{marginLeft:8},items:[{type:"item",name:"filter",title:"{{t('Filter')}}",Component:"FilterActionInitializer",schema:{"x-align":"left"}},{type:"item",title:"{{t('Add new')}}",name:"addNew",Component:"CreateActionInitializer",schema:{"x-align":"right","x-decorator":"ACLActionProvider","x-acl-action-props":{skipScopeCheck:!0}},useVisible:()=>d.useActionAvailable("create")},{type:"item",title:"{{t('Delete')}}",name:"delete",Component:"BulkDestroyActionInitializer",schema:{"x-align":"right","x-decorator":"ACLActionProvider"},useVisible:()=>d.useActionAvailable("destroyMany")},{type:"item",title:"{{t('Refresh')}}",name:"refresh",Component:"RefreshActionInitializer",schema:{"x-align":"right"}},{name:"toggle",title:"{{t('Expand/Collapse')}}",Component:"ExpandableActionInitializer",schema:{"x-align":"right"},useVisible(){var o;const e=A.useFieldSchema(),t=d.useCollection(),{treeTable:r}=((o=e==null?void 0:e.parent)==null?void 0:o["x-decorator-props"])||{};return t.tree&&r}},{name:"customRequest",title:'{{t("Custom request")}}',Component:"CustomRequestInitializer",schema:{"x-action":"customize:table:request:global"}}]},bt=new d.CompatibleSchemaInitializer(H({name:"GanttActionInitializers"},mt)),dr=new d.CompatibleSchemaInitializer(H({name:"gantt:configureActions"},mt),bt),xt=e=>{const{collectionName:t,fieldNames:r,dataSource:o,association:n}=e,a={type:"void","x-acl-action":`${n||t}:list`,"x-decorator":"GanttBlockProvider","x-decorator-props":{collection:t,dataSource:o,action:"list",fieldNames:r,params:{paginate:!1}},"x-toolbar":"BlockSchemaToolbar","x-settings":"blockSettings:gantt","x-component":"CardItem",properties:{[ie.uid()]:{type:"void","x-component":"Gantt","x-use-component-props":"useGanttBlockProps",properties:{toolBar:{type:"void","x-component":"ActionBar","x-component-props":{style:{marginBottom:24}},"x-initializer":"gantt:configureActions",properties:{}},table:{type:"array","x-decorator":"div","x-decorator-props":{style:{float:"left",maxWidth:"35%"}},"x-initializer":"table:configureColumns","x-component":"TableV2","x-use-component-props":"useTableBlockProps","x-component-props":{rowKey:"id",rowSelection:{type:"checkbox"},pagination:!1},properties:{actions:{type:"void",title:'{{ t("Actions") }}',"x-action-column":"actions","x-decorator":"TableV2.Column.ActionBar","x-component":"TableV2.Column","x-toolbar":"TableColumnSchemaToolbar","x-initializer":"table:configureItemActions","x-settings":"fieldSettings:TableColumn","x-toolbar-props":{initializer:"table:configureItemActions"},properties:{actions:{type:"void","x-decorator":"DndContext","x-component":"Space","x-component-props":{split:"|"}}}}}},detail:{type:"void","x-component":"Gantt.Event",properties:{drawer:{type:"void","x-component":"Action.Drawer","x-component-props":{className:"nb-action-popup"},title:'{{ t("View record") }}',properties:{tabs:{type:"void","x-component":"Tabs","x-component-props":{},"x-initializer":"popup:addTab",properties:{tab1:{type:"void",title:'{{t("Details")}}',"x-component":"Tabs.TabPane","x-designer":"Tabs.Designer","x-component-props":{},properties:{grid:{type:"void","x-component":"Grid","x-initializer":"popup:common:addBlock"}}}}}}}}}}}}};return n&&(a["x-decorator-props"].association=n),a},ur=({filterCollections:e,onlyCurrentDataSource:t,hideSearch:r,createBlockSchema:o,showAssociationFields:n})=>{const a=d.useSchemaInitializerItem(),{createGanttBlock:s}=yt();return c.jsx(d.DataBlockInitializer,Se(H({},a),{componentType:"Gantt",icon:c.jsx(Ke.FormOutlined,{}),onCreateBlockSchema:i=>R(this,null,function*(){if(o)return o(i);s(i)}),onlyCurrentDataSource:t,hideSearch:r,filter:e,showAssociationFields:n}))},yt=()=>{const{insert:e}=d.useSchemaInitializer(),{t}=Ce.useTranslation(),{getCollectionFields:r}=d.useCollectionManager_deprecated(),o=b.useContext(A.SchemaOptionsContext),{theme:n}=d.useGlobalTheme();return{createGanttBlock:i=>R(this,[i],function*({item:s}){var w,C,k;const l=r(s.name,s.dataSource),u=(w=l==null?void 0:l.filter(m=>m.type==="string"))==null?void 0:w.map(m=>{var f;return{label:(f=m==null?void 0:m.uiSchema)==null?void 0:f.title,value:m.name}}),g=(C=l==null?void 0:l.filter(m=>["date","datetime","dateOnly","datetimeNoTz"].includes(m.type)))==null?void 0:C.map(m=>{var f;return{label:(f=m==null?void 0:m.uiSchema)==null?void 0:f.title,value:m.name}}),y=(k=l==null?void 0:l.filter(m=>m.type==="float"))==null?void 0:k.map(m=>{var f;return{label:(f=m==null?void 0:m.uiSchema)==null?void 0:f.title,value:m.name}}),D=yield d.FormDialog(t("Create gantt block"),()=>c.jsx(d.SchemaComponentOptions,{scope:o.scope,components:H({},o.components),children:c.jsx(we.FormLayout,{layout:"vertical",children:c.jsx(d.SchemaComponent,{schema:{properties:{title:{title:t("Title field"),enum:u,required:!0,"x-component":"Select","x-decorator":"FormItem"},start:{title:t("Start date field"),enum:g,required:!0,default:"createdAt","x-component":"Select","x-decorator":"FormItem"},end:{title:t("End date field"),enum:g,required:!0,"x-component":"Select","x-decorator":"FormItem"},progress:{title:t("Progress field"),enum:y,"x-component":"Select","x-decorator":"FormItem"},range:{title:t("Time scale"),enum:[{label:'{{t("Hour")}}',value:"hour",color:"orange"},{label:'{{t("Quarter of day")}}',value:"quarterDay",color:"default"},{label:'{{t("Half of day")}}',value:"halfDay",color:"blue"},{label:'{{t("Day")}}',value:"day",color:"yellow"},{label:'{{t("Week")}}',value:"week",color:"pule"},{label:'{{t("Month")}}',value:"month",color:"green"},{label:'{{t("Year")}}',value:"year",color:"green"},{label:'{{t("QuarterYear")}}',value:"quarterYear",color:"red"}],default:"day","x-component":"Select","x-decorator":"FormItem"}}}})})}),n).open({initialValues:{}});e(xt({collectionName:s.name,dataSource:s.dataSource,fieldNames:H({},D)}))})}};function pr(){const{insert:e}=d.useSchemaInitializer(),{t}=Ce.useTranslation(),r=b.useContext(A.SchemaOptionsContext),{theme:o}=d.useGlobalTheme(),{getCollectionFields:n}=d.useCollectionManager_deprecated();return{createAssociationGanttBlock:i=>R(this,[i],function*({item:s}){var C,k,m;const l=s.associationField,u=n(s.name,s.dataSource),g=(C=u==null?void 0:u.filter(f=>f.type==="string"))==null?void 0:C.map(f=>{var v;return{label:(v=f==null?void 0:f.uiSchema)==null?void 0:v.title,value:f.name}}),y=(k=u==null?void 0:u.filter(f=>f.type==="date"))==null?void 0:k.map(f=>{var v;return{label:(v=f==null?void 0:f.uiSchema)==null?void 0:v.title,value:f.name}}),D=(m=u==null?void 0:u.filter(f=>f.type==="float"))==null?void 0:m.map(f=>{var v;return{label:(v=f==null?void 0:f.uiSchema)==null?void 0:v.title,value:f.name}}),w=yield d.FormDialog(t("Create gantt block"),()=>c.jsx(d.SchemaComponentOptions,{scope:r.scope,components:H({},r.components),children:c.jsx(we.FormLayout,{layout:"vertical",children:c.jsx(d.SchemaComponent,{schema:{properties:{title:{title:t("Title field"),enum:g,required:!0,"x-component":"Select","x-decorator":"FormItem"},start:{title:t("Start date field"),enum:y,required:!0,default:"createdAt","x-component":"Select","x-decorator":"FormItem"},end:{title:t("End date field"),enum:y,required:!0,"x-component":"Select","x-decorator":"FormItem"},progress:{title:t("Progress field"),enum:D,"x-component":"Select","x-decorator":"FormItem"},range:{title:t("Time scale"),enum:[{label:'{{t("Hour")}}',value:"hour",color:"orange"},{label:'{{t("Quarter of day")}}',value:"quarterDay",color:"default"},{label:'{{t("Half of day")}}',value:"halfDay",color:"blue"},{label:'{{t("Day")}}',value:"day",color:"yellow"},{label:'{{t("Week")}}',value:"week",color:"pule"},{label:'{{t("Month")}}',value:"month",color:"green"},{label:'{{t("Year")}}',value:"year",color:"green"},{label:'{{t("QuarterYear")}}',value:"quarterYear",color:"red"}],default:"day","x-component":"Select","x-decorator":"FormItem"}}}})})}),o).open({initialValues:{}});e(xt({association:`${l.collectionName}.${l.name}`,dataSource:s.dataSource,fieldNames:H({},w)}))})}}const fr=A.observer(e=>{const t=d.useCollectionRecordData(),r=d.useCollection();return c.jsx(d.PopupContextProvider,{children:c.jsx(d.VariablePopupRecordProvider,{recordData:t,collection:r,children:e.children})})},{displayName:"Event"}),hr=(e,t,r,o,n,a,s,i,l,u,g,y,D,w,C,k,m,f)=>{let v=e.map((N,x)=>gr(N,x,t,r,o,n,a,s,i,l,u,g,y,D,w,C,k,m,f));return v=v.map(N=>{const x=N.dependencies||[];for(let h=0;h<x.length;h++){const p=v.findIndex(S=>S.id===x[h]);p!==-1&&v[p].barChildren.push(N)}return N}),v},gr=(e,t,r,o,n,a,s,i,l,u,g,y,D,w,C,k,m,f,v)=>{let N;switch(e.type){case"milestone":N=mr(e,t,r,o,n,a,s,i,f,v);break;case"project":N=vt(e,t,r,o,n,a*.5,s,i,l,w,C,k,m);break;default:N=vt(e,t,r,o,n,a,s,i,l,u,g,y,D);break}return N},vt=(e,t,r,o,n,a,s,i,l,u,g,y,D)=>{let w,C;l?(C=St(e.start,r,o),w=St(e.end,r,o)):(w=He(e.start,r,o),C=He(e.end,r,o));let k=e.type;k==="task"&&C-w<i*2&&(k="smalltask",C=w>0?w+i*2:w);const[m,f]=Pe(w,C,e.progress,l),v=e.type==="project"?et(t,n,a)+8:et(t,n,a),N=e.type==="project"?e.hideChildren:void 0,x=H({backgroundColor:y,backgroundSelectedColor:D,progressColor:u,progressSelectedColor:g},e.styles);return Se(H({},e),{typeInternal:k,x1:w,x2:C,y:v,index:t,progressX:f,progressWidth:m,barCornerRadius:s,handleWidth:i,hideChildren:N,height:a,barChildren:[],styles:x})},mr=(e,t,r,o,n,a,s,i,l,u)=>{const g=He(e.start,r,o),y=et(t,n,a),D=g-a*.5,w=g+a*.5,C=a/1.414,k=H({backgroundColor:l,backgroundSelectedColor:u,progressColor:"",progressSelectedColor:""},e.styles);return Se(H({},e),{end:e.start,x1:D,x2:w,y,index:t,progressX:0,progressWidth:0,barCornerRadius:s,handleWidth:i,typeInternal:e.type,progress:0,height:C,hideChildren:void 0,barChildren:[],styles:k})},He=(e,t,r)=>{var i,l,u;const o=t.findIndex(g=>(g==null?void 0:g.getTime())>=(e==null?void 0:e.getTime()))-1,a=((e==null?void 0:e.getTime())-((i=t[o])==null?void 0:i.getTime()))/(((l=t[o+1])==null?void 0:l.getTime())-((u=t[o])==null?void 0:u.getTime())),s=o*r+a*r;return isNaN(s)?0:s},St=(e,t,r)=>{let o=He(e,t,r);return o+=r,isNaN(o)?0:o},et=(e,t,r)=>{const o=e*t+(t-r)/2;return isNaN(o)?0:o},Pe=(e,t,r,o)=>{const n=(t-e)*r*.01;let a;return o?a=t-n:a=e,[n,a]},br=(e,t)=>{if(e>=t.x2)return 100;if(e<=t.x1)return 0;{const r=t.x2-t.x1;return Math.round((e-t.x1)*100/r)}},xr=(e,t)=>{if(e>=t.x2)return 0;if(e<=t.x1)return 100;{const r=t.x2-t.x1;return Math.round((t.x2-e)*100/r)}},Ct=(e,t,r)=>[e-5,t+r,e+5,t+r,e,t+r-8.66].join(","),yr=(e,t,r)=>{e>=r.x2-r.handleWidth*2&&(e=r.x2-r.handleWidth*2);const n=Math.round((e-r.x1)/t)*t;return r.x1+n},vr=(e,t,r)=>{e<=r.x1+r.handleWidth*2&&(e=r.x1+r.handleWidth*2);const n=Math.round((e-r.x2)/t)*t;return r.x2+n},wt=(e,t,r)=>{const n=Math.round((e-r.x1)/t)*t,a=r.x1+n,s=a+r.x2-r.x1;return[a,s]},me=(e,t,r,o,n)=>{var s,i;let a=new Date((e-t)/o*n+((s=r==null?void 0:r.getTime)==null?void 0:s.call(r)));return a=new Date(((i=a==null?void 0:a.getTime)==null?void 0:i.call(a))+((a==null?void 0:a.getTimezoneOffset())-(r==null?void 0:r.getTimezoneOffset()))*6e4),a},Tt=(e,t,r,o,n,a,s)=>{let i;switch(r.type){case"milestone":i=Cr(e,t,r,o,n,a);break;default:i=Sr(e,t,r,o,n,a,s);break}return i},Sr=(e,t,r,o,n,a,s)=>{const i=H({},r);let l=!1;switch(t){case"progress":if(s?i.progress=xr(e,r):i.progress=br(e,r),l=i.progress!==r.progress,l){const[u,g]=Pe(i.x1,i.x2,i.progress,s);i.progressWidth=u,i.progressX=g}break;case"start":{const u=yr(e,o,r);if(i.x1=u,l=i.x1!==r.x1,l){s?i.end=me(u,r.x1,r.end,o,n):i.start=me(u,r.x1,r.start,o,n);const[g,y]=Pe(i.x1,i.x2,i.progress,s);i.progressWidth=g,i.progressX=y}break}case"end":{const u=vr(e,o,r);if(i.x2=u,l=i.x2!==r.x2,l){s?i.start=me(u,r.x2,r.start,o,n):i.end=me(u,r.x2,r.end,o,n);const[g,y]=Pe(i.x1,i.x2,i.progress,s);i.progressWidth=g,i.progressX=y}break}case"move":{const[u,g]=wt(e-a,o,r);if(l=u!==r.x1,l){i.start=me(u,r.x1,r.start,o,n),i.end=me(g,r.x2,r.end,o,n),i.x1=u,i.x2=g;const[y,D]=Pe(i.x1,i.x2,i.progress,s);i.progressWidth=y,i.progressX=D}break}}return{isChanged:l,changedTask:i}},Cr=(e,t,r,o,n,a)=>{const s=H({},r);let i=!1;switch(t){case"move":{const[l,u]=wt(e-a,o,r);i=l!==r.x1,i&&(s.start=me(l,r.x1,r.start,o,n),s.end=s.start,s.x1=l,s.x2=u);break}}return{isChanged:i,changedTask:s}};var E=(e=>(e.Hour="hour",e.QuarterDay="quarterDay",e.HalfDay="halfDay",e.Day="day",e.Week="week",e.Month="month",e.QuarterYear="quarterYear",e.Year="year",e))(E||{});const Nt={},Oe=(e,t={})=>{const r=JSON.stringify([e,t]);let o=Nt[r];return o||(o=new Intl.DateTimeFormat(e,t),Nt[r]=o),o},O=(e,t,r)=>new Date(e.getFullYear()+(r==="year"?t:0),e.getMonth()+(r==="month"?t:0),e.getDate()+(r==="day"?t:0),e.getHours()+(r==="hour"?t:0),e.getMinutes()+(r==="minute"?t:0),e.getSeconds()+(r==="second"?t:0),e.getMilliseconds()+(r==="millisecond"?t:0)),j=(e,t)=>{const r=["millisecond","second","minute","hour","day","month","year"],o=a=>{const s=r.indexOf(t);return r.indexOf(a)<=s};return new Date(e==null?void 0:e.getFullYear(),o("year")?0:e.getMonth(),o("month")?1:e.getDate(),o("day")?0:e.getHours(),o("hour")?0:e.getMinutes(),o("minute")?0:e.getSeconds(),o("second")?0:e.getMilliseconds())},Mt=(e,t,r)=>{var a,s;let o=((a=e[0])==null?void 0:a.start)||new Date,n=((s=e[0])==null?void 0:s.start)||new Date;for(const i of e)i.start<o&&(o=i.start),i.end>n&&(n=i.end);switch(t){case E.Year:o=O(o,-1,"year"),o=j(o,"year"),n=O(n,1,"year"),n=j(n,"year");break;case E.QuarterYear:o=O(o,-3,"month"),o=j(o,"month"),n=O(n,3,"year"),n=j(n,"year");break;case E.Month:o=O(o,-1*r,"month"),o=j(o,"month"),n=O(n,1,"year"),n=j(n,"year");break;case E.Week:o=j(o,"day"),o=O(wr(o),-7*r,"day"),n=j(n,"day"),n=O(n,1.5,"month");break;case E.Day:o=j(o,"day"),o=O(o,-1*r,"day"),n=j(n,"day"),n=O(n,19,"day");break;case E.QuarterDay:o=j(o,"day"),o=O(o,-1*r,"day"),n=j(n,"day"),n=O(n,66,"hour");break;case E.HalfDay:o=j(o,"day"),o=O(o,-1*r,"day"),n=j(n,"day"),n=O(n,108,"hour");break;case E.Hour:o=j(o,"hour"),o=O(o,-1*r,"hour"),n=j(n,"day"),n=O(n,1,"day");break}return[o,n]},Dt=(e,t,r)=>{let o=new Date(e);const n=[o];for(;o<t;){switch(r){case E.Year:o=O(o,1,"year");break;case E.QuarterYear:o=O(o,3,"month");break;case E.Month:o=O(o,1,"month");break;case E.Week:o=O(o,7,"day");break;case E.Day:o=O(o,1,"day");break;case E.HalfDay:o=O(o,12,"hour");break;case E.QuarterDay:o=O(o,6,"hour");break;case E.Hour:o=O(o,1,"hour");break}n.push(o)}return n},Fe=(e,t)=>{let r=Oe(t,{month:"long"}).format(e);return r=r.replace(r[0],r[0].toLocaleUpperCase()),r},Bt=(e,t,r)=>{let o=Oe(t,{weekday:r}).format(e);return o=o.replace(o[0],o[0].toLocaleUpperCase()),o},wr=e=>{const t=e.getDay(),r=e.getDate()-t+(t===0?-6:1);return new Date(e.setDate(r))},Tr=e=>{const t=new Date(e.valueOf()),r=(t.getDay()+6)%7;t.setDate(t.getDate()-r+3);const o=t.valueOf();t.setMonth(0,1),t.getDay()!==4&&t.setMonth(0,1+(4-t.getDay()+7)%7);const n=(1+Math.ceil((o-t.valueOf())/6048e5)).toString();return n.length===1?`0${n}`:n},Nr=(e,t)=>new Date(t,e+1,0).getDate();function Mr(e){return e.key!==void 0}function Dr(e){const t=e.filter(r=>r.hideChildren&&r.type==="project");if(t.length>0)for(let r=0;t.length>r;r++){const o=t[r],n=Pt(e,o);e=e.filter(a=>n.indexOf(a)===-1)}return e}function Pt(e,t){let r=[];t.type!=="project"?r=e.filter(n=>n.dependencies&&n.dependencies.indexOf(t.id)!==-1):r=e.filter(n=>n.project&&n.project===t.id);const o=[];return r.forEach(n=>{o.push(...Pt(e,n))}),r=r.concat(r,o),r}const Br=(e,t)=>{const r=e.displayOrder||Number.MAX_VALUE,o=t.displayOrder||Number.MAX_VALUE;return r>o?1:r<o?-1:0},Te=e=>{var t;return isNaN((t=e==null?void 0:e.getTime)==null?void 0:t.call(e))?0:e.getFullYear()+`/${e.getMonth()+1}/`+e.getDate()},ze=Ee.createStyles(({token:e,css:t})=>({scrollWrapper:t`
11
+ overflow: auto;
12
+ position: absolute;
13
+ bottom: -8px;
14
+ max-width: 100%;
15
+ scrollbarWidth: thin;
16
+ height: 1.2rem;
17
+ &::-webkit-scrollbar: { width: 8, height: 8 };
18
+ &::-webkit-scrollbar-corner: { background: transparent };
19
+ &::-webkit-scrollbar-track: { background: var(--colorBgScrollTrack) };
20
+ &::-webkit-scrollbar-thumb: {
21
+ background: var(--colorBgScrollBar);
22
+ borderRadius: 4;
23
+ };
24
+ &::-webkit-scrollbar-thumb:hover: {
25
+ background: var(--colorBgScrollBarHover);
26
+ };
27
+ &::-webkit-scrollbar-thumb:active: {
28
+ background: var(--colorBgScrollBarActive)
29
+ }
30
+ `,tooltipDefaultContainer:t`
31
+ padding: 12px;
32
+ background-color: ${e.colorBgElevated};
33
+ background-clip: padding-box;
34
+ border-radius: ${e.borderRadius};
35
+ box-shadow: ${e.boxShadow};
36
+ b: {
37
+ display: block;
38
+ margin-bottom: ${e.marginXS};
39
+ }
40
+ .tooltipdefaultcontainerparagraph: {
41
+ font-size: ${e.fontSizeSM};
42
+ margin-bottom: ${e.marginXXS} + ${e.marginXS-e.marginXXS};
43
+ color: ${e.colorText};
44
+ }
45
+ `,tooltipDetailsContainer:t`
46
+ position: absolute;
47
+ display: flex;
48
+ flexshrink: 0;
49
+ pointerevents: none;
50
+ webkittouchcallout: none;
51
+ webkituserselect: none;
52
+ mozuserselect: none;
53
+ msuserselect: none;
54
+ userselect: none;
55
+ `,tooltipDetailsContainerHidden:t`
56
+ visibility: hidden;
57
+ position: absolute;
58
+ display: flex;
59
+ pointerevents: none;
60
+ `,nbGridOther:t`
61
+ .horizontalScroll: {
62
+ height: 1
63
+ }
64
+
65
+ .verticalScroll: {
66
+ overflow: hidden auto;
67
+ width: 1rem;
68
+ flexShrink: 0;
69
+ scrollbarWidth: thin;
70
+ &::-webkit-scrollbar: { width: 8, height: 8 };
71
+ &::-webkit-scrollbar-corner: { background: transparent};
72
+ &::-webkit-scrollbar-track: { background: var(--colorBgScrollTrack) };
73
+ &::-webkit-scrollbar-thumb: {
74
+ background: var(--colorBgScrollBar);
75
+ borderRadius: 4;
76
+ }
77
+ &::-webkit-scrollbar-thumb:hover': {
78
+ background: var(--colorBgScrollBarHover)
79
+ }
80
+ &::-webkit-scrollbar-thumb:active': {
81
+ background: var(--colorBgScrollBarActive)
82
+ },
83
+ }
84
+ }
85
+ `})),Pr=({scroll:e,svgWidth:t,taskListWidth:r,rtl:o,onScroll:n})=>{const{styles:a}=ze(),s=b.useRef(null);return b.useEffect(()=>{s.current&&(s.current.scrollLeft=e)},[e]),c.jsx("div",{dir:"ltr",style:{margin:o?`0px ${r}px 0px 0px`:`0px 0px 0px ${r}px`},className:M.cx(a.nbGridOther,a.scrollWrapper,"gantt-horizontal-scoll"),onScroll:n,ref:s,children:c.jsx("div",{style:{width:t,height:1},className:"horizontalScroll"})})},Fr=({task:e,rowHeight:t,rtl:r,svgContainerHeight:o,svgContainerWidth:n,scrollX:a,scrollY:s,arrowIndent:i,fontSize:l,fontFamily:u,headerHeight:g,taskListWidth:y,TooltipContent:D})=>{const{styles:w}=ze(),C=b.useRef(null),[k,m]=b.useState(0),[f,v]=b.useState(0);return b.useEffect(()=>{if(C.current){const N=C.current.offsetHeight*1.1,x=C.current.offsetWidth*1.1;let h=e.index*t-s+g,p;if(r)p=e.x1-i*1.5-x-a,p<0&&(p=e.x2+i*1.5-a),x+p>n&&(p=n-x,h+=t);else{p=e.x2+i*1.5+y-a;const P=x+p,G=y+n;P>G&&(p=e.x1+y-i*1.5-a-x),p<y&&(p=n+y-x,h+=t)}N+h-s>o-s&&(h=o-N),m(h),v(p)}},[C,e,i,a,s,g,y,t,o,n,r]),c.jsx("div",{ref:C,className:M.cx(f?w.tooltipDetailsContainer:w.tooltipDetailsContainerHidden,w.nbGridOther),style:{left:f,top:k},children:c.jsx(D,{task:e,fontSize:l,fontFamily:u})})},Ar=({task:e,fontSize:t,fontFamily:r})=>{var a,s,i,l,u,g,y,D;const{styles:o}=ze(),n={fontSize:t,fontFamily:r};return c.jsxs("div",{className:M.cx(o.nbGridOther,o.tooltipDefaultContainer),"aria-label":"nb-gantt-tooltip",style:n,children:[c.jsxs("b",{style:{fontSize:t},children:[e.name,": ",Te(e.start)," ~ ",Te(e.end)]}),((s=(a=e.end)==null?void 0:a.getTime)==null?void 0:s.call(a))-((l=(i=e.start)==null?void 0:i.getTime)==null?void 0:l.call(i))!==0&&c.jsx("p",{className:"tooltipDefaultContainerParagraph",children:`Duration: ${Math.round((((g=(u=e.end)==null?void 0:u.getTime)==null?void 0:g.call(u))-((D=(y=e.start)==null?void 0:y.getTime)==null?void 0:D.call(y)))/(1e3*60*60*24)*10)/10||""} day(s)`}),c.jsx("p",{className:"tooltipDefaultContainerParagraph",children:!!e.progress&&`Progress: ${e.progress}%`})]})},$r=({scroll:e,ganttHeight:t,ganttFullHeight:r,headerHeight:o,rtl:n,onScroll:a})=>{const{styles:s}=ze(),i=b.useRef(null);return b.useEffect(()=>{i.current&&(i.current.scrollTop=e)},[e]),c.jsx("div",{style:{maxHeight:t,marginTop:o,marginLeft:n?"":"-1rem"},className:M.cx(s.nbGridOther,"verticalScroll"),onScroll:a,ref:i,children:c.jsx("div",{style:{height:r,width:1}})})},Ir=e=>{const r=A.useFieldSchema().properties.detail;return r?c.jsx(A.RecursionField,{schema:r,name:r.name}):null},Ft=d.createStyles(({token:e,css:t})=>({ganttverticalcontainer:t`
86
+ overflow: hidden;
87
+ font-size: 0;
88
+ margin: 0;
89
+ padding: 0;
90
+ width: 100%;
91
+ border-left: 2px solid ${e.colorBorderSecondary};
92
+ .ganttheader: {
93
+ border-bottom: 1px solid ${e.colorBorderSecondary};
94
+ font-weight: 700;
95
+ }
96
+ .ganttbody: {
97
+ border-bottom: 1px solid ${e.colorBorderSecondary};
98
+ }
99
+ `,horizontalcontainer:t`
100
+ margin: 0;
101
+ padding: 0;
102
+ overflow: hidden;
103
+ `,wrapper:t`
104
+ display: flex;
105
+ padding: 0;
106
+ margin: 0;
107
+ liststyle: none;
108
+ outline: none;
109
+ position: relative;
110
+ .gantt-horizontal-scoll: {
111
+ display: none;
112
+ }
113
+ &:hover: {
114
+ .gantt-horizontal-scoll: {
115
+ display: block;
116
+ }
117
+ }
118
+ `}));function Y(e,t){kr(e)&&(e="100%");var r=Gr(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),r&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function Xe(e){return Math.min(1,Math.max(0,e))}function kr(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function Gr(e){return typeof e=="string"&&e.indexOf("%")!==-1}function At(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Ye(e){return e<=1?"".concat(Number(e)*100,"%"):e}function be(e){return e.length===1?"0"+e:String(e)}function Lr(e,t,r){return{r:Y(e,255)*255,g:Y(t,255)*255,b:Y(r,255)*255}}function $t(e,t,r){e=Y(e,255),t=Y(t,255),r=Y(r,255);var o=Math.max(e,t,r),n=Math.min(e,t,r),a=0,s=0,i=(o+n)/2;if(o===n)s=0,a=0;else{var l=o-n;switch(s=i>.5?l/(2-o-n):l/(o+n),o){case e:a=(t-r)/l+(t<r?6:0);break;case t:a=(r-e)/l+2;break;case r:a=(e-t)/l+4;break}a/=6}return{h:a,s,l:i}}function tt(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*(6*r):r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function Vr(e,t,r){var o,n,a;if(e=Y(e,360),t=Y(t,100),r=Y(r,100),t===0)n=r,a=r,o=r;else{var s=r<.5?r*(1+t):r+t-r*t,i=2*r-s;o=tt(i,s,e+1/3),n=tt(i,s,e),a=tt(i,s,e-1/3)}return{r:o*255,g:n*255,b:a*255}}function It(e,t,r){e=Y(e,255),t=Y(t,255),r=Y(r,255);var o=Math.max(e,t,r),n=Math.min(e,t,r),a=0,s=o,i=o-n,l=o===0?0:i/o;if(o===n)a=0;else{switch(o){case e:a=(t-r)/i+(t<r?6:0);break;case t:a=(r-e)/i+2;break;case r:a=(e-t)/i+4;break}a/=6}return{h:a,s:l,v:s}}function Er(e,t,r){e=Y(e,360)*6,t=Y(t,100),r=Y(r,100);var o=Math.floor(e),n=e-o,a=r*(1-t),s=r*(1-n*t),i=r*(1-(1-n)*t),l=o%6,u=[r,s,a,a,i,r][l],g=[i,r,r,s,a,a][l],y=[a,a,i,r,r,s][l];return{r:u*255,g:g*255,b:y*255}}function kt(e,t,r,o){var n=[be(Math.round(e).toString(16)),be(Math.round(t).toString(16)),be(Math.round(r).toString(16))];return o&&n[0].startsWith(n[0].charAt(1))&&n[1].startsWith(n[1].charAt(1))&&n[2].startsWith(n[2].charAt(1))?n[0].charAt(0)+n[1].charAt(0)+n[2].charAt(0):n.join("")}function Hr(e,t,r,o,n){var a=[be(Math.round(e).toString(16)),be(Math.round(t).toString(16)),be(Math.round(r).toString(16)),be(Or(o))];return n&&a[0].startsWith(a[0].charAt(1))&&a[1].startsWith(a[1].charAt(1))&&a[2].startsWith(a[2].charAt(1))&&a[3].startsWith(a[3].charAt(1))?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}function Or(e){return Math.round(parseFloat(e)*255).toString(16)}function Gt(e){return _(e)/255}function _(e){return parseInt(e,16)}function zr(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var rt={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function Xr(e){var t={r:0,g:0,b:0},r=1,o=null,n=null,a=null,s=!1,i=!1;return typeof e=="string"&&(e=qr(e)),typeof e=="object"&&(le(e.r)&&le(e.g)&&le(e.b)?(t=Lr(e.r,e.g,e.b),s=!0,i=String(e.r).substr(-1)==="%"?"prgb":"rgb"):le(e.h)&&le(e.s)&&le(e.v)?(o=Ye(e.s),n=Ye(e.v),t=Er(e.h,o,n),s=!0,i="hsv"):le(e.h)&&le(e.s)&&le(e.l)&&(o=Ye(e.s),a=Ye(e.l),t=Vr(e.h,o,a),s=!0,i="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(r=e.a)),r=At(r),{ok:s,format:e.format||i,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:r}}var Yr="[-\\+]?\\d+%?",jr="[-\\+]?\\d*\\.\\d+%?",he="(?:".concat(jr,")|(?:").concat(Yr,")"),ot="[\\s|\\(]+(".concat(he,")[,|\\s]+(").concat(he,")[,|\\s]+(").concat(he,")\\s*\\)?"),nt="[\\s|\\(]+(".concat(he,")[,|\\s]+(").concat(he,")[,|\\s]+(").concat(he,")[,|\\s]+(").concat(he,")\\s*\\)?"),ee={CSS_UNIT:new RegExp(he),rgb:new RegExp("rgb"+ot),rgba:new RegExp("rgba"+nt),hsl:new RegExp("hsl"+ot),hsla:new RegExp("hsla"+nt),hsv:new RegExp("hsv"+ot),hsva:new RegExp("hsva"+nt),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function qr(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(rt[e])e=rt[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r=ee.rgb.exec(e);return r?{r:r[1],g:r[2],b:r[3]}:(r=ee.rgba.exec(e),r?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=ee.hsl.exec(e),r?{h:r[1],s:r[2],l:r[3]}:(r=ee.hsla.exec(e),r?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=ee.hsv.exec(e),r?{h:r[1],s:r[2],v:r[3]}:(r=ee.hsva.exec(e),r?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=ee.hex8.exec(e),r?{r:_(r[1]),g:_(r[2]),b:_(r[3]),a:Gt(r[4]),format:t?"name":"hex8"}:(r=ee.hex6.exec(e),r?{r:_(r[1]),g:_(r[2]),b:_(r[3]),format:t?"name":"hex"}:(r=ee.hex4.exec(e),r?{r:_(r[1]+r[1]),g:_(r[2]+r[2]),b:_(r[3]+r[3]),a:Gt(r[4]+r[4]),format:t?"name":"hex8"}:(r=ee.hex3.exec(e),r?{r:_(r[1]+r[1]),g:_(r[2]+r[2]),b:_(r[3]+r[3]),format:t?"name":"hex"}:!1)))))))))}function le(e){return!!ee.CSS_UNIT.exec(String(e))}var Ur=function(){function e(t,r){t===void 0&&(t=""),r===void 0&&(r={});var o;if(t instanceof e)return t;typeof t=="number"&&(t=zr(t)),this.originalInput=t;var n=Xr(t);this.originalInput=t,this.r=n.r,this.g=n.g,this.b=n.b,this.a=n.a,this.roundA=Math.round(100*this.a)/100,this.format=(o=r.format)!==null&&o!==void 0?o:n.format,this.gradientType=r.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=n.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),r,o,n,a=t.r/255,s=t.g/255,i=t.b/255;return a<=.03928?r=a/12.92:r=Math.pow((a+.055)/1.055,2.4),s<=.03928?o=s/12.92:o=Math.pow((s+.055)/1.055,2.4),i<=.03928?n=i/12.92:n=Math.pow((i+.055)/1.055,2.4),.2126*r+.7152*o+.0722*n},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=At(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){var t=this.toHsl().s;return t===0},e.prototype.toHsv=function(){var t=It(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=It(this.r,this.g,this.b),r=Math.round(t.h*360),o=Math.round(t.s*100),n=Math.round(t.v*100);return this.a===1?"hsv(".concat(r,", ").concat(o,"%, ").concat(n,"%)"):"hsva(".concat(r,", ").concat(o,"%, ").concat(n,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=$t(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=$t(this.r,this.g,this.b),r=Math.round(t.h*360),o=Math.round(t.s*100),n=Math.round(t.l*100);return this.a===1?"hsl(".concat(r,", ").concat(o,"%, ").concat(n,"%)"):"hsla(".concat(r,", ").concat(o,"%, ").concat(n,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),kt(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),Hr(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toHexShortString=function(t){return t===void 0&&(t=!1),this.a===1?this.toHexString(t):this.toHex8String(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),r=Math.round(this.g),o=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(r,", ").concat(o,")"):"rgba(".concat(t,", ").concat(r,", ").concat(o,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(r){return"".concat(Math.round(Y(r,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(r){return Math.round(Y(r,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+kt(this.r,this.g,this.b,!1),r=0,o=Object.entries(rt);r<o.length;r++){var n=o[r],a=n[0],s=n[1];if(t===s)return a}return!1},e.prototype.toString=function(t){var r=!!t;t=t!=null?t:this.format;var o=!1,n=this.a<1&&this.a>=0,a=!r&&n&&(t.startsWith("hex")||t==="name");return a?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(o=this.toRgbString()),t==="prgb"&&(o=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(o=this.toHexString()),t==="hex3"&&(o=this.toHexString(!0)),t==="hex4"&&(o=this.toHex8String(!0)),t==="hex8"&&(o=this.toHex8String()),t==="name"&&(o=this.toName()),t==="hsl"&&(o=this.toHslString()),t==="hsv"&&(o=this.toHsvString()),o||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.l+=t/100,r.l=Xe(r.l),new e(r)},e.prototype.brighten=function(t){t===void 0&&(t=10);var r=this.toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(t/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(t/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(t/100)))),new e(r)},e.prototype.darken=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.l-=t/100,r.l=Xe(r.l),new e(r)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.s-=t/100,r.s=Xe(r.s),new e(r)},e.prototype.saturate=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.s+=t/100,r.s=Xe(r.s),new e(r)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var r=this.toHsl(),o=(r.h+t)%360;return r.h=o<0?360+o:o,new e(r)},e.prototype.mix=function(t,r){r===void 0&&(r=50);var o=this.toRgb(),n=new e(t).toRgb(),a=r/100,s={r:(n.r-o.r)*a+o.r,g:(n.g-o.g)*a+o.g,b:(n.b-o.b)*a+o.b,a:(n.a-o.a)*a+o.a};return new e(s)},e.prototype.analogous=function(t,r){t===void 0&&(t=6),r===void 0&&(r=30);var o=this.toHsl(),n=360/r,a=[this];for(o.h=(o.h-(n*t>>1)+720)%360;--t;)o.h=(o.h+n)%360,a.push(new e(o));return a},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var r=this.toHsv(),o=r.h,n=r.s,a=r.v,s=[],i=1/t;t--;)s.push(new e({h:o,s:n,v:a})),a=(a+i)%1;return s},e.prototype.splitcomplement=function(){var t=this.toHsl(),r=t.h;return[this,new e({h:(r+72)%360,s:t.s,l:t.l}),new e({h:(r+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var r=this.toRgb(),o=new e(t).toRgb(),n=r.a+o.a*(1-r.a);return new e({r:(r.r*r.a+o.r*o.a*(1-r.a))/n,g:(r.g*r.a+o.g*o.a*(1-r.a))/n,b:(r.b*r.a+o.b*o.a*(1-r.a))/n,a:n})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var r=this.toHsl(),o=r.h,n=[this],a=360/t,s=1;s<t;s++)n.push(new e({h:(o+s*a)%360,s:r.s,l:r.l}));return n},e.prototype.equals=function(t){return this.toRgbString()===new e(t).toRgbString()},e}();const Wr=Ee.createStyles(({token:e,css:t})=>{const r=new Ur(e.colorFillAlter).onBackground(e.colorBgContainer).toHexShortString();return{calendarheader:t`
119
+ color: ${e.colorText};
120
+ fill: ${r};
121
+ stroke-width: 1.4;
122
+ background: ${r};
123
+ border-bottom: 1px solid ${e.colorBorderSecondary};
124
+ `,nbGanttCalendar:t`
125
+ .calendarbottomtext: {
126
+ textanchor: middle;
127
+ fill: ${e.colorText};
128
+ webkittouchcallout: none;
129
+ webkituserselect: none;
130
+ mozuserselect: none;
131
+ msuserselect: none;
132
+ userselect: none;
133
+ pointerevents: none;
134
+ font-weight: 500;
135
+ }
136
+ .calendartoptick: {
137
+ stroke: ${e.colorBorderSecondary};
138
+ stroke-width: 0;
139
+ }
140
+ .calendartoptext: {
141
+ textanchor: middle;
142
+ webkittouchcallout: none;
143
+ webkituserselect: none;
144
+ mozuserselect: none;
145
+ msuserselect: none;
146
+ userselect: none;
147
+ pointerevents: none;
148
+ font-weight: 500;
149
+ fill: ${e.colorText};
150
+ }
151
+ `}}),xe=({value:e,x1Line:t,y1Line:r,y2Line:o,xText:n,yText:a})=>c.jsxs("g",{className:"calendarTop",children:[c.jsx("line",{x1:t,y1:r,x2:t,y2:o,className:M.cx("calendarTopTick")},e+"line"),c.jsx("text",{y:a,x:n,className:M.cx("calendarTopText"),children:e},e+"text")]}),Qr=({dateSetup:e,locale:t,viewMode:r,rtl:o,headerHeight:n,columnWidth:a,fontFamily:s,fontSize:i})=>{const{styles:l}=Wr(),u=()=>{const v=[],N=[],x=n*.5;for(let h=0;h<e.dates.length;h++){const p=e.dates[h],S=p.getFullYear();if(N.push(c.jsx("text",{y:n*.8,x:a*h+a*.5,className:M.cx("calendarBottomText"),children:S},p.getTime())),h===0||p.getFullYear()!==e.dates[h-1].getFullYear()){const P=p.getFullYear().toString();let G;o?G=(6+h+p.getFullYear()+1)*a:G=(6+h-p.getFullYear())*a,v.push(c.jsx(xe,{value:P,x1Line:a*h,y1Line:0,y2Line:n,xText:G,yText:x*.9},P))}}return[v,N]},g=()=>{const v=[],N=[],x=n*.5;for(let h=0;h<e.dates.length;h++){const p=e.dates[h],S="Q"+Math.floor((p.getMonth()+3)/3);if(N.push(c.jsx("text",{y:n*.8,x:a*h+a*.5,className:M.cx("calendarBottomText"),children:S},p.getTime())),h===0||p.getFullYear()!==e.dates[h-1].getFullYear()){const P=p.getFullYear().toString();let G;o?G=(6+h+p.getMonth()+1)*a:G=(6+h-p.getMonth())*a,v.push(c.jsx(xe,{value:P,x1Line:a*h,y1Line:0,y2Line:x,xText:Math.abs(G),yText:x*.9},P))}}return[v,N]},y=()=>{const v=[],N=[],x=n*.5;for(let h=0;h<e.dates.length;h++){const p=e.dates[h],S=Fe(p,t);if(N.push(c.jsx("text",{y:n*.8,x:a*h+a*.5,className:M.cx("calendarBottomText"),children:S},S+p.getFullYear())),h===0||p.getFullYear()!==e.dates[h-1].getFullYear()){const P=p.getFullYear().toString();let G;o?G=(6+h+p.getMonth()+1)*a:G=(6+h-p.getMonth())*a,v.push(c.jsx(xe,{value:P,x1Line:a*h,y1Line:0,y2Line:x,xText:G,yText:x*.9},P))}}return[v,N]},D=()=>{const v=[],N=[];let x=1;const h=n*.5,p=e.dates;for(let S=p.length-1;S>=0;S--){const P=p[S];let G="";(S===0||P.getMonth()!==p[S-1].getMonth())&&(G=`${Fe(P,t)}, ${P.getFullYear()}`);const Q=`W${Tr(P)}`;N.push(c.jsx("text",{y:n*.8,x:a*(S+ +o),className:M.cx("calendarBottomText"),children:Q},P.getTime())),G&&(S!==p.length-1&&v.push(c.jsx(xe,{value:G,x1Line:a*S+x*a,y1Line:0,y2Line:h,xText:a*S+a*x*.5,yText:h*.9},G)),x=0),x++}return[v,N]},w=()=>{const v=[],N=[],x=n*.5,h=e.dates;for(let p=0;p<h.length;p++){const S=h[p],P=`${S.getDate().toString()}`;if(N.push(c.jsx("text",{y:n*.8,x:a*p+a*.5,className:M.cx("calendarBottomText"),children:P},S.getTime())),p+1!==h.length&&S.getMonth()!==h[p+1].getMonth()){const G=Fe(S,t);v.push(c.jsx(xe,{value:G,x1Line:a*(p+1),y1Line:0,y2Line:x,xText:a*(p+1)-Nr(S.getMonth(),S.getFullYear())*a*.5,yText:x*.9},G+S.getFullYear()))}}return[v,N]},C=()=>{const v=[],N=[],x=r===E.HalfDay?2:4,h=n*.5,p=e.dates;for(let S=0;S<p.length;S++){const P=p[S],G=Oe(t,{hour:"numeric"}).format(P).replace("时","");if(N.push(c.jsx("text",{y:n*.8,x:a*(S+ +o),className:M.cx("calendarBottomText"),fontFamily:s,children:G},P.getTime())),S===0||P.getDate()!==p[S-1].getDate()){const Q=`${Bt(P,t,"short")}, ${P.getDate()} ${Fe(P,t)}`;v.push(c.jsx(xe,{value:Q,x1Line:a*S+x*a,y1Line:0,y2Line:h,xText:a*S+x*a*.5,yText:h*.9},Q+P.getFullYear()))}}return[v,N]},k=()=>{var p;const v=[],N=[],x=n*.5,h=e.dates;for(let S=0;S<h.length;S++){const P=h[S],G=(p=Oe(t,{hour:"numeric"}).format(P))==null?void 0:p.replace("时","");if(N.push(c.jsx("text",{y:n*.8,x:a*(S+ +o),className:M.cx("calendarBottomText"),fontFamily:s,children:G},P.getTime())),S!==0&&P.getDate()!==h[S-1].getDate()){const Q=h[S-1],ye=`${Bt(Q,t,"long")}, ${Q.getDate()} ${Fe(Q,t)}`,Z=(P.getHours()-24)/2;v.push(c.jsx(xe,{value:ye,x1Line:a*S,y1Line:0,y2Line:x,xText:a*(S+Z),yText:x*.9},ye+Q.getFullYear()))}}return[v,N]};let m=[],f=[];switch(e.viewMode){case E.Year:[m,f]=u();break;case E.QuarterYear:[m,f]=g();break;case E.Month:[m,f]=y();break;case E.Week:[m,f]=D();break;case E.Day:[m,f]=w();break;case E.QuarterDay:case E.HalfDay:[m,f]=C();break;case E.Hour:[m,f]=k()}return c.jsxs("g",{className:l.nbGanttCalendar,fontSize:i,fontFamily:s,children:[c.jsx("rect",{x:0,y:0,width:a*e.dates.length,height:n,className:l.calendarheader}),f," ",m]})},_r=Ee.createStyles(({token:e,css:t})=>({gridRow:t`
152
+ fill: ${e.colorBgContainer};
153
+ `,gridHeightRow:t`
154
+ fill: #e6f7ff;
155
+ border-color: ${e.colorBorder};
156
+ `,nbGridbody:t`
157
+ .gridrowline: {
158
+ stroke: ${e.colorBorderSecondary};
159
+ stroke-width: 0;
160
+ border-bottom: 1px solid ${e.colorBorderSecondary};
161
+ }
162
+ .gridtick: {
163
+ stroke: ${e.colorBorderSecondary};
164
+ }
165
+ `})),Kr=[{id:Je.uid()},{id:Je.uid()},{id:Je.uid()}],Jr=({tasks:e,dates:t,rowHeight:r,svgWidth:o,columnWidth:n,todayColor:a,rtl:s,selectedRowKeys:i})=>{const{styles:l}=_r(),u=e.length?e:Kr;let g=0;const y=[],D=[c.jsx("line",{x:"0",y1:0,x2:o,y2:0,className:M.cx("gridRowLine")},"RowLineFirst")];for(const f of u)y.push(c.jsx("rect",{x:"0",y:g,width:o,height:r,className:i!=null&&i.includes(+f.id)?l.gridHeightRow:l.gridRow},"Row"+f.id)),D.push(c.jsx("line",{x:"0",y1:g+r,x2:o,y2:g+r,className:M.cx("gridRowLine")},"RowLine"+f.id)),g+=r;const w=new Date;let C=0;const k=[];let m=c.jsx("rect",{});for(let f=0;f<t.length;f++){const v=t[f];k.push(c.jsx("line",{x1:C,y1:0,x2:C,y2:g,className:M.cx("gridTick")},v.getTime())),(f+1!==t.length&&v.getTime()<w.getTime()&&t[f+1].getTime()>=w.getTime()||f!==0&&f+1===t.length&&v.getTime()<w.getTime()&&O(v,v.getTime()-t[f-1].getTime(),"millisecond").getTime()>=w.getTime())&&(m=c.jsx("rect",{x:C,y:0,width:n,height:g,fill:a})),s&&f+1!==t.length&&v.getTime()>=w.getTime()&&t[f+1].getTime()<w.getTime()&&(m=c.jsx("rect",{x:C+n,y:0,width:n,height:g,fill:a})),C+=n}return c.jsxs("g",{className:M.cx("gridBody",l.nbGridbody),children:[c.jsx("g",{className:"rows",children:y}),c.jsx("g",{className:"rowLines",children:D}),c.jsx("g",{className:"ticks",children:k}),c.jsx("g",{className:"today",children:m})]})},Zr=e=>c.jsx("g",{className:"grid",children:c.jsx(Jr,H({},e))}),Rr=({taskFrom:e,taskTo:t,rowHeight:r,taskHeight:o,arrowIndent:n,rtl:a})=>{let s,i;return a?[s,i]=to(e,t,r,o,n):[s,i]=eo(e,t,r,o,n),c.jsxs("g",{className:"arrow",children:[c.jsx("path",{strokeWidth:"1.5",d:s,fill:"none"}),c.jsx("polygon",{points:i})]})},eo=(e,t,r,o,n)=>{const a=e.index>t.index?-1:1,s=t.y+o/2,i=e.x2+n*2,l=i<t.x1?"":`H ${t.x1-n}`,u=i>t.x1?n:t.x1-e.x2-n,g=`M ${e.x2} ${e.y+o/2}
166
+ h ${n}
167
+ v ${a*r/2}
168
+ ${l}
169
+ V ${s}
170
+ h ${u}`,y=`${t.x1},${s}
171
+ ${t.x1-5},${s-5}
172
+ ${t.x1-5},${s+5}`;return[g,y]},to=(e,t,r,o,n)=>{const a=e.index>t.index?-1:1,s=t.y+o/2,i=e.x1-n*2,l=i>t.x2?"":`H ${t.x2+n}`,u=i<t.x2?-n:t.x2-e.x1+n,g=`M ${e.x1} ${e.y+o/2}
173
+ h ${-n}
174
+ v ${a*r/2}
175
+ ${l}
176
+ V ${s}
177
+ h ${u}`,y=`${t.x2},${s}
178
+ ${t.x2+5},${s+5}
179
+ ${t.x2+5},${s-5}`;return[g,y]},Lt=({x:e,y:t,width:r,height:o,barCornerRadius:n,onMouseDown:a})=>c.jsx("rect",{x:e,y:t,width:r,height:o,className:"barHandle",role:"button",ry:n,rx:n,onMouseDown:a}),Vt=M.css`
180
+ cursor: pointer;
181
+ outline: none;
182
+ .barHandle {
183
+ fill: #ddd;
184
+ cursor: ew-resize;
185
+ opacity: 0;
186
+ // visibility: hidden;
187
+ }
188
+ &:hover .barHandle {
189
+ visibility: visible;
190
+ opacity: 1;
191
+ }
192
+ `,ro=M.css`
193
+ user-select: none;
194
+ stroke-width: 0;
195
+ opacity: 0.6;
196
+ `,Et=({x:e,y:t,color:r,width:o,height:n,isSelected:a,progressX:s,progressWidth:i,barCornerRadius:l,styles:u,onMouseDown:g})=>{const y=()=>r||(a?u.progressSelectedColor:u.progressColor),D=()=>r||(a?u.backgroundSelectedColor:u.backgroundColor);return c.jsxs("g",{onMouseDown:g,children:[c.jsx("rect",{x:e,width:o,y:t,height:n,ry:l,rx:l,fill:D(),className:M.cx(ro)}),c.jsx("rect",{x:s,width:i,y:t,height:n,ry:l,rx:l,fill:y()})]})},Ht=({progressPoint:e,onMouseDown:t})=>c.jsx("polygon",{className:"barHandle",points:e,onMouseDown:t}),oo=({task:e,isProgressChangeable:t,isDateChangeable:r,rtl:o,onEventStart:n,isSelected:a})=>{const s=Ct(+!o*e.progressWidth+e.progressX,e.y,e.height),i=e.height-2;return c.jsxs("g",{className:M.cx(Vt),"aria-label":"task-bar",tabIndex:0,children:[c.jsx(Et,{x:e.x1,y:e.y,color:e.color,width:e.x2-e.x1,height:e.height,progressX:e.progressX,progressWidth:e.progressWidth,barCornerRadius:e.barCornerRadius,styles:e.styles,isSelected:a,onMouseDown:l=>{r&&n("move",e,l)}}),c.jsxs("g",{className:"handleGroup",children:[r&&c.jsxs("g",{children:[c.jsx(Lt,{x:e.x1+1,y:e.y+1,width:e.handleWidth,height:i,barCornerRadius:e.barCornerRadius,onMouseDown:l=>{n("start",e,l)}}),c.jsx(Lt,{x:e.x2-e.handleWidth-1,y:e.y+1,width:e.handleWidth,height:i,barCornerRadius:e.barCornerRadius,onMouseDown:l=>{n("end",e,l)}})]}),t&&c.jsx(Ht,{progressPoint:s,onMouseDown:l=>{n("progress",e,l)}})]})]})},no=({task:e,isProgressChangeable:t,isDateChangeable:r,onEventStart:o,isSelected:n})=>{const a=Ct(e.progressWidth+e.x1+10,e.y,e.height);return c.jsxs("g",{className:M.cx(Vt),tabIndex:0,children:[c.jsx(Et,{x:e.x1,y:e.y,width:e.x2-e.x1,height:e.height,progressX:e.progressX,progressWidth:e.progressWidth,barCornerRadius:e.barCornerRadius,styles:e.styles,isSelected:n,onMouseDown:s=>{r&&o("move",e,s)}}),c.jsx("g",{className:"handleGroup",children:t&&c.jsx(Ht,{progressPoint:a,onMouseDown:s=>{o("progress",e,s)}})})]})},ao=M.css`
197
+ cursor: pointer;
198
+ outline: none;
199
+ `,so=M.css`
200
+ user-select: none;
201
+ `,io=({task:e,isDateChangeable:t,onEventStart:r,isSelected:o})=>{const n=`rotate(45 ${e.x1+e.height*.356}
202
+ ${e.y+e.height*.85})`,a=()=>o?e.styles.backgroundSelectedColor:e.styles.backgroundColor;return c.jsx("g",{tabIndex:0,className:M.cx(ao),children:c.jsx("rect",{fill:a(),x:e.x1,width:e.height,y:e.y,height:e.height,rx:e.barCornerRadius,ry:e.barCornerRadius,transform:n,className:M.cx(so),onMouseDown:s=>{t&&r("move",e,s)}})})},lo=M.css`
203
+ cursor: pointer;
204
+ outline: none;
205
+ `,co=M.css`
206
+ user-select: none;
207
+ opacity: 0.6;
208
+ `;M.css`
209
+ user-select: none;
210
+ `;const uo=({task:e,isSelected:t})=>{const r=t?e.styles.backgroundSelectedColor:e.styles.backgroundColor,o=t?e.styles.progressSelectedColor:e.styles.progressColor,n=e.x2-e.x1;return c.jsxs("g",{tabIndex:0,className:M.cx(lo),children:[c.jsx("rect",{fill:e.color||r,x:e.x1,width:n,y:e.y,height:e.height,rx:e.barCornerRadius,ry:e.barCornerRadius,className:M.cx(co)}),c.jsx("rect",{x:e.progressX,width:e.progressWidth,y:e.y,height:e.height,ry:e.barCornerRadius,rx:e.barCornerRadius,fill:e.color||o})]})},po=Ee.createStyles(({token:e,css:t})=>({nbganttTaskitem:t`
211
+ .barLabel: {
212
+ fill: ${e.colorTextLightSolid},
213
+ textAnchor: middle,
214
+ font-weight: 400,
215
+ dominantBaseline: central,
216
+ WebkitTouchCallout: none,
217
+ WebkitUserSelect: none,
218
+ MozUserSelect: none,
219
+ msUserSelect: none,
220
+ userSelect: none,
221
+ pointerEvents: none,
222
+ },
223
+ .projectLabel: {
224
+ fill: #130d0d,
225
+ fontWeight: 500,
226
+ fontSize: 0.9em,
227
+ dominantBaseline: central,
228
+ WebkitTouchCallout: none,
229
+ WebkitUserSelect: none,
230
+ MozUserSelect: none,
231
+ msUserSelect: none,
232
+ userSelect: none,
233
+ pointerEvents: none,
234
+ },
235
+ .barLabelOutside: {
236
+ fill: ${e.colorTextLabel},
237
+ textAnchor: start,
238
+ WebkitTouchCallout: none,
239
+ WebkitUserSelect: none,
240
+ MozUserSelect: none,
241
+ msUserSelect: none,
242
+ userSelect: none,
243
+ pointerEvents: none,
244
+ },
245
+ }
246
+ }`})),fo=e=>{const{styles:t}=po(),{task:r,arrowIndent:o,isDelete:n,taskHeight:a,isSelected:s,rtl:i,onEventStart:l}=H({},e),u=b.useRef(null),[g,y]=b.useState(c.jsx("div",{})),[D,w]=b.useState(!0),C=r.typeInternal==="project";b.useEffect(()=>{switch(r.typeInternal){case"milestone":y(c.jsx(io,H({},e)));break;case"project":y(c.jsx(uo,H({},e)));break;case"smalltask":y(c.jsx(no,H({},e)));break;default:y(c.jsx(oo,H({},e)));break}},[r,s]),b.useEffect(()=>{u.current&&w(u.current.getBBox().width<r.x2-r.x1)},[u,r]);const k=()=>{const m=r.x2-r.x1,f=r.barChildren.length>0;return D?r.x1+m*.5:i&&u.current?r.x1-u.current.getBBox().width-o*+f-o*.2:r.x1+m+o*+f+o*.2};return c.jsxs("g",{className:M.cx(t.nbganttTaskitem),onKeyDown:m=>{switch(m.key){case"Delete":{n&&l("delete",r,m);break}}m.stopPropagation()},onMouseEnter:m=>{l("mouseenter",r,m)},onMouseLeave:m=>{l("mouseleave",r,m)},onDoubleClick:m=>{l("dblclick",r,m)},onClick:m=>{l("click",r,m)},onFocus:()=>{l("select",r)},children:[g,c.jsx("text",{x:C?r.x1:k(),y:C?r.y-8:r.y+a*.65,className:C?M.cx("projectLabel"):D?M.cx("barLabel"):M.cx("barLabelOutside"),ref:u,children:C&&Te(r.start)&&Te(r.end)?`${r.name}: ${Te(r.start)} ~ ${Te(r.end)}`:r.name})]})};let at=null,Ae=null;const ho=({tasks:e,dates:t,ganttEvent:r,selectedTask:o,rowHeight:n,columnWidth:a,timeStep:s,svg:i,taskHeight:l,arrowColor:u,arrowIndent:g,fontFamily:y,fontSize:D,rtl:w,setGanttEvent:C,setFailedTask:k,setSelectedTask:m,onDateChange:f,onProgressChange:v,onDoubleClick:N,onClick:x,onDelete:h})=>{var je;const p=(je=i==null?void 0:i.current)==null?void 0:je.createSVGPoint(),[S,P]=b.useState(0),[G,Q]=b.useState(0),[ye,Z]=b.useState(!1);b.useEffect(()=>{var z,q,X,oe;const F=((z=t[1])==null?void 0:z.getTime())-((q=t[0])==null?void 0:q.getTime())-((X=t[1])==null?void 0:X.getTimezoneOffset())*60*1e3+((oe=t[0])==null?void 0:oe.getTimezoneOffset())*60*1e3,V=s*a/F;P(V)},[a,t,s]),b.useEffect(()=>{const F=z=>R(this,null,function*(){var Me;if(!r.changedTask||!p||!(i!=null&&i.current))return;z.preventDefault(),p.x=z.clientX;const q=p.matrixTransform((Me=i==null?void 0:i.current.getScreenCTM())==null?void 0:Me.inverse()),{isChanged:X,changedTask:oe}=Tt(q.x,r.action,r.changedTask,S,s,G,w);X&&C({action:r.action,changedTask:oe})}),V=z=>R(this,null,function*(){var qe;const{action:q,originalSelectedTask:X,changedTask:oe}=r;if(!oe||!p||!(i!=null&&i.current)||!X)return;z.preventDefault(),p.x=z.clientX;const Me=p.matrixTransform((qe=i==null?void 0:i.current.getScreenCTM())==null?void 0:qe.inverse()),{changedTask:W}=Tt(Me.x,q,oe,S,s,G,w),U=X.start!==W.start||X.end!==W.end||X.progress!==W.progress;i.current.removeEventListener("mousemove",F),i.current.removeEventListener("mouseup",V),C({action:""}),Z(!1);let ce=!0;if((q==="move"||q==="end"||q==="start")&&f&&U)try{const ne=yield f(W,W.barChildren);ne!==void 0&&(ce=ne)}catch(ne){ce=!1}else if(v&&U)try{const ne=yield v(W,W.barChildren);ne!==void 0&&(ce=ne)}catch(ne){ce=!1}ce||k(X)});!ye&&(r.action==="move"||r.action==="end"||r.action==="start"||r.action==="progress")&&(i!=null&&i.current)&&(i.current.addEventListener("mousemove",F),i.current.addEventListener("mouseup",V),Z(!0))},[r,S,G,v,s,f,i,ye,p,w,k,C]);const $e=(F,V,z)=>R(this,null,function*(){var q;if(!z)F==="select"&&m(V.id);else if(Mr(z)){if(F==="delete"&&h)try{const X=yield h(V);X!==void 0&&X&&C({action:F,changedTask:V})}catch(X){console.error("Error on Delete. "+X)}}else if(F==="mouseenter")r.action||C({action:F,changedTask:V,originalSelectedTask:V});else if(F==="mouseleave")r.action==="mouseenter"&&setTimeout(()=>{C({action:""})},300);else if(F==="dblclick")N&&N(V);else if(F==="click")z.target.tagName==="rect"&&x&&x(V);else if(F==="move"){if(!(i!=null&&i.current)||!p)return;p.x=z.clientX;const X=p.matrixTransform((q=i.current.getScreenCTM())==null?void 0:q.inverse());Q(X.x-V.x1),C({action:F,changedTask:V,originalSelectedTask:V})}else C({action:F,changedTask:V,originalSelectedTask:V})}),st=(F,V,z)=>{["click"].includes(F)?(!["start","end","progress"].includes(at)&&(!Ae||Ae===V.start)&&$e(F,V,z),at=null,Ae=null):["move","select"].includes(F)?(Ae=V.start,$e(F,V,z)):(Ae=V.start,at=F,$e(F,V,z))};return c.jsxs("g",{className:"content",children:[c.jsx("g",{className:"arrows",fill:u,stroke:u,children:e.map(F=>F.barChildren.map(V=>c.jsx(Rr,{taskFrom:F,taskTo:e[V.index],rowHeight:n,taskHeight:l,arrowIndent:g,rtl:w},`Arrow from ${F.id} to ${e[V.index].id}`)))}),c.jsx("g",{className:"bar",fontFamily:y,fontSize:D,children:e.map(F=>c.jsx(fo,{task:F,arrowIndent:g,taskHeight:l,isProgressChangeable:!!v&&!F.isDisabled,isDateChangeable:!!f&&!F.isDisabled,isDelete:!F.isDisabled,onEventStart:st,isSelected:!!o&&F.id===o.id,rtl:w},F.id))})]})},Ot=b.forwardRef(({gridProps:e,calendarProps:t,barProps:r,ganttHeight:o,scrollY:n,scrollX:a},s)=>{const i=b.useRef(null),l=b.useRef(null),u=Se(H({},r),{svg:i}),{styles:g}=Ft();return b.useEffect(()=>{l.current&&(l.current.scrollTop=n)},[n]),b.useEffect(()=>{s.current&&(s.current.scrollLeft=a)},[a]),c.jsxs("div",{className:g.ganttverticalcontainer,ref:s,dir:"ltr",children:[c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e.svgWidth,height:t.headerHeight,fontFamily:r.fontFamily,className:"ganttHeader",children:c.jsx(Qr,H({},t))}),c.jsx(Ve.Spin,{spinning:r==null?void 0:r.loading,children:c.jsx("div",{ref:l,className:g.horizontalcontainer,style:o?{maxHeight:o,width:e.svgWidth}:{width:e.svgWidth},children:c.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e.svgWidth,height:r.rowHeight*r.tasks.length||166,fontFamily:r.fontFamily,ref:i,className:"ganttBody",children:[c.jsx(Zr,H({},e)),c.jsx(ho,H({},u))]})})})]})});Ot.displayName="TaskGantt";const go=(e,t)=>t/e>50?Math.floor(t/e)+20:50,mo=ht.debounce((e,t,r,o,n)=>R(this,null,function*(){yield t.update({filterByTk:e.id,values:{[r.start]:e.start,[r.end]:e.end}}),Ve.message.success(n("Saved successfully")),yield o==null?void 0:o.refresh()}),300),bo=ht.debounce((e,t,r,o,n)=>R(this,null,function*(){yield t.update({filterByTk:e.id,values:{[r.progress]:e.progress/100}}),Ve.message.success(n("Saved successfully")),yield o==null?void 0:o.refresh()}),300),Ne=d.withDynamicSchemaProps(e=>{var Rt,er,tr;const{styles:t}=Ft(),{token:r}=d.useToken(),o=d.useAPIClient(),n=(Rt=JSON.parse(o.auth.getOption("theme")))==null?void 0:Rt.uid,{listCellWidth:a="155px",ganttHeight:s=0,preStepsCount:i=1,barFill:l=60,barCornerRadius:u=r.borderRadiusXS,barProgressColor:g=r.colorPrimary,barProgressSelectedColor:y=r.colorPrimary,barBackgroundColor:D=r.colorPrimary,barBackgroundSelectedColor:w=r.colorPrimary,projectProgressColor:C=r.colorPrimary,projectProgressSelectedColor:k=r.colorPrimary,projectBackgroundColor:m=r.colorPrimary,projectBackgroundSelectedColor:f=r.colorPrimary,milestoneBackgroundColor:v="#f1c453",milestoneBackgroundSelectedColor:N="#f29e4c",rtl:x=!1,handleWidth:h=8,timeStep:p=3e5,arrowColor:S="grey",fontFamily:P="-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'",fontSize:G=r.fontSize,arrowIndent:Q=20,todayColor:ye="rgba(252, 248, 227, 0.5)",viewDate:Z,TooltipContent:$e=Ar,onDoubleClick:st,onDelete:je,onSelect:F,onExpanderClick:V,tasks:z,expandAndCollapseAll:q,fieldNames:X,loading:oe}=d.useProps(e),{designable:Me}=d.useDesignable(),W=n!=null&&n.includes("compact")?45:Me?65:55,U=n!=null&&n.includes("compact")?45:65,ce=J(),qe=d.useCurrentAppInfo(),{t:ne}=Ce.useTranslation(),xo=(er=qe.data)==null?void 0:er.lang,it=d.useTableBlockContext(),{resource:Yt,service:Ie}=d.useBlockRequestContext(),lt=A.useFieldSchema(),ae=X.range||"day",ve=b.useRef(null),ct=b.useRef(null),jt=b.useRef(null),yo=b.useRef(null),[de,vo]=b.useState(()=>{const[T,L]=Mt(z,ae,i);return{viewMode:ae,dates:Dt(T,L,ae)}}),[So,qt]=b.useState(!1),{openPopup:Co}=d.usePopupUtils({setVisible:qt}),[wo,To]=b.useState({}),No=d.useCollectionParentRecordData(),[ke,Ut]=b.useState(void 0),[Ue,Wt]=b.useState(0),[Mo,Do]=b.useState(0),[Bo,Qt]=b.useState(s),[se,We]=b.useState([]),[Ge,_t]=b.useState({action:""}),dt=b.useMemo(()=>U*l/100,[U,l]),[ut,Po]=b.useState(),[Qe,Kt]=b.useState(null),[ge,pt]=b.useState(0),[ue,Le]=b.useState(-1),[Jt,De]=b.useState(!1),te=go(de.dates.length,(tr=jt.current)==null?void 0:tr.clientWidth),pe=de.dates.length*te,Be=se.length*U,{expandFlag:Zt}=it,[Fo,Ao]=b.useState([]);b.useEffect(()=>{it.field.onExpandClick=Lo,it.field.onRowSelect=Vo},[]),b.useEffect(()=>{q==null||q(!Zt)},[Zt]),b.useEffect(()=>{let T;V?T=Dr(z):T=z,T=T.sort(Br);const[L,B]=Mt(T,ae,i);let $=Dt(L,B,ae);x&&($=$.reverse(),ue===-1&&Le($.length*te)),vo({dates:$,viewMode:ae}),We(hr(T,$,te,U,dt,u,h,x,g,y,D,w,C,k,m,f,v,N))},[z,ae,i,U,u,te,dt,h,g,y,D,w,C,k,m,f,v,N,x,ue]),b.useEffect(()=>{if(ae===de.viewMode&&(Z&&!ke||Z&&(ke==null?void 0:ke.valueOf())!==Z.valueOf())){const T=de.dates,L=T.findIndex((B,$)=>Z.valueOf()>=B.valueOf()&&$+1!==T.length&&Z.valueOf()<T[$+1].valueOf());if(L===-1)return;Ut(Z),Le(te*L)}},[Z,te,de.dates,de.viewMode,ae,ke,Ut]),b.useEffect(()=>{const{changedTask:T,action:L}=Ge;if(T){if(L==="delete")_t({action:""}),We(se.filter(B=>B.id!==T.id));else if(L==="move"||L==="end"||L==="start"||L==="progress"){const B=se.find($=>$.id===T.id);if(B&&B.start&&B.end&&(B.start.getTime()!==T.start.getTime()||B.end.getTime()!==T.end.getTime()||B.progress!==T.progress)){const $=se.map(K=>K.id===T.id?T:K);We($)}}}},[Ge,se]),b.useEffect(()=>{Qe&&(We(se.map(T=>T.id!==Qe.id?T:Qe)),Kt(null))},[Qe,se]),b.useEffect(()=>{a||Wt(0),ct.current&&Wt(ct.current.offsetWidth)},[ct,a]),b.useEffect(()=>{ve.current&&Do(ve.current.offsetWidth-Ue)},[ve,Ue]),b.useEffect(()=>{Qt(s?s+W:z.length*U+W)},[s,z,W,U]),b.useEffect(()=>{var L;const T=B=>{if(B.shiftKey||B.deltaX){const $=B.deltaX?B.deltaX:B.deltaY;let K=ue+$;K<0?K=0:K>pe&&(K=pe),Le(K),B.preventDefault()}else if(s){let $=ge+B.deltaY;$<0?$=0:$>Be-s&&($=Be-s),$!==ge&&(pt($),B.preventDefault())}De(!0)};return(L=ve.current)==null||L.addEventListener("wheel",T,{passive:!1}),()=>{var B;(B=ve.current)==null||B.removeEventListener("wheel",T)}},[ve,ge,ue,s,pe,x,Be]);const $o=T=>{ge!==T.currentTarget.scrollTop&&!Jt?(pt(T.currentTarget.scrollTop),De(!0)):De(!1)},Io=T=>{ue!==T.currentTarget.scrollLeft&&!Jt?(Le(T.currentTarget.scrollLeft),De(!0)):De(!1)},ko=T=>{T.preventDefault();let L=ge,B=ue,$=!0;switch(T.key){case"Down":case"ArrowDown":L+=U,$=!1;break;case"Up":case"ArrowUp":L-=U,$=!1;break;case"Left":case"ArrowLeft":B-=te;break;case"Right":case"ArrowRight":B+=te;break}$?(B<0?B=0:B>pe&&(B=pe),Le(B)):(L<0?L=0:L>Be-s&&(L=Be-s),pt(L)),De(!0)},Go=T=>{const L=se.find($=>$.id===T),B=se.find($=>!!ut&&$.id===ut.id);F&&(B&&F(B,!1),L&&F(L,!0)),Po(L)},Lo=(T,L)=>{var $;const B=($=ce==null?void 0:ce.field)==null?void 0:$.data.find(K=>K.id===L.id+"");V&&L.children.length&&V(Se(H({},B),{hideChildren:!T}))},Vo=T=>{Ao(T)},Eo=T=>R(this,null,function*(){bo(T,Yt,X,Ie,ne)}),Ho=T=>R(this,null,function*(){mo(T,Yt,X,Ie,ne)}),Oo=T=>{var K;const L=ft=>ft.reduce((rr,_e)=>_e.children?rr.concat([_e,...L(_e.children)]):rr.concat(_e),[]),B=L((K=Ie==null?void 0:Ie.data)==null?void 0:K.data),$=B==null?void 0:B.find(ft=>ft.id===+T.id);$&&(To($),Co({recordData:$,customActionSchema:lt.properties.detail}))},zo={columnWidth:te,svgWidth:pe,tasks:z,rowHeight:U,dates:de.dates,todayColor:ye,rtl:x,selectedRowKeys:Fo},Xo={dateSetup:de,locale:xo,viewMode:ae,headerHeight:W,columnWidth:te,fontFamily:P,fontSize:G,rtl:x},Yo={tasks:se,dates:de.dates,ganttEvent:Ge,selectedTask:ut,rowHeight:U,taskHeight:dt,columnWidth:te,arrowColor:S,timeStep:p,fontFamily:P,fontSize:G,arrowIndent:Q,svgWidth:pe,rtl:x,setGanttEvent:_t,setFailedTask:Kt,setSelectedTask:Go,onDateChange:Ho,onProgressChange:X.progress&&Eo,onDoubleClick:st,onClick:Oo,onDelete:je,loading:oe};return c.jsx("div",{className:M.cx(M.css`
247
+ .ant-table-container::after {
248
+ box-shadow: none !important;
249
+ }
250
+ .ant-table-row {
251
+ height: ${U}px;
252
+ }
253
+ .ant-table-thead {
254
+ height: ${W}px;
255
+ }
256
+ `),ref:yo,children:c.jsxs(d.PopupContextProvider,{visible:So,setVisible:qt,children:[c.jsx(d.RecordProvider,{record:wo,parent:No,children:c.jsx(Ir,{})}),c.jsx(A.RecursionField,{name:"anctionBar",schema:lt.properties.toolBar}),c.jsx(A.RecursionField,{name:"table",schema:lt.properties.table}),c.jsxs("div",{className:t.wrapper,onKeyDown:ko,tabIndex:0,ref:ve,children:[c.jsx(Ot,{gridProps:zo,calendarProps:Xo,barProps:Yo,ganttHeight:s,scrollY:ge,scrollX:ue,ref:jt}),Ge.changedTask&&c.jsx(Fr,{arrowIndent:Q,rowHeight:U,svgContainerHeight:Bo,svgContainerWidth:Mo,fontFamily:P,fontSize:G,scrollX:ue,scrollY:ge,task:Ge.changedTask,headerHeight:W,taskListWidth:Ue,TooltipContent:$e,rtl:x,svgWidth:pe}),c.jsx($r,{ganttFullHeight:Be,ganttHeight:s,headerHeight:W,scroll:ge,onScroll:$o,rtl:x}),c.jsx(Ve.Spin,{spinning:oe,style:{visibility:"hidden"},children:c.jsx(Pr,{svgWidth:pe,taskListWidth:Ue,scroll:ue,rtl:x,onScroll:Io})})]})]})})});Ne.ActionBar=d.ActionBar,Ne.ViewMode=E,Ne.Designer=ar,Ne.Event=fr;const zt=b.memo(e=>c.jsx(d.SchemaComponentOptions,{components:{Gantt:Ne,GanttBlockInitializer:ur,GanttBlockProvider:ir},scope:{useGanttBlockProps:gt},children:e.children}));zt.displayName="GanttProvider";class Xt extends d.Plugin{load(){return R(this,null,function*(){this.app.use(zt),this.app.schemaSettingsManager.add(lr),this.app.schemaSettingsManager.add(cr),this.app.schemaInitializerManager.add(bt),this.app.schemaInitializerManager.add(dr);const t=this.app.schemaInitializerManager.get("page:addBlock");t==null||t.add("dataBlocks.gantt",{title:"{{t('Gantt')}}",Component:"GanttBlockInitializer"}),this.app.schemaInitializerManager.addItem("popup:common:addBlock","dataBlocks.gantt",{title:"{{t('Gantt')}}",Component:"GanttBlockInitializer",useComponentProps(){const{createAssociationGanttBlock:r}=pr(),{createGanttBlock:o}=yt();return{onlyCurrentDataSource:!0,filterCollections({associationField:n}){return n?["hasMany","belongsToMany"].includes(n.type):!1},createBlockSchema:({item:n,fromOthersInPopup:a})=>{if(a)return o({item:n});r({item:n})},showAssociationFields:!0,hideSearch:!0}}}),this.app.addScopes({useGanttBlockProps:gt})})}}I.Gantt=Ne,I.PluginGanttClient=Xt,I.default=Xt,Object.defineProperties(I,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
@@ -8,7 +8,7 @@
8
8
  */
9
9
 
10
10
  module.exports = {
11
- "@nocobase/client": "1.4.0-beta.1",
11
+ "@nocobase/client": "1.4.0-beta.2",
12
12
  "react": "18.2.0",
13
13
  "@formily/react": "2.3.0",
14
14
  "@ant-design/icons": "5.2.6",
@@ -16,10 +16,10 @@ module.exports = {
16
16
  "react-i18next": "11.18.6",
17
17
  "lodash": "4.17.21",
18
18
  "@formily/shared": "2.3.2",
19
- "@nocobase/server": "1.4.0-beta.1",
20
- "@nocobase/test": "1.4.0-beta.1",
19
+ "@nocobase/server": "1.4.0-beta.2",
20
+ "@nocobase/test": "1.4.0-beta.2",
21
21
  "@emotion/css": "11.13.0",
22
22
  "antd-style": "3.7.1",
23
- "@nocobase/utils": "1.4.0-beta.1",
23
+ "@nocobase/utils": "1.4.0-beta.2",
24
24
  "antd": "5.12.8"
25
25
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nocobase/plugin-gantt",
3
- "version": "1.4.0-beta.1",
3
+ "version": "1.4.0-beta.2",
4
4
  "displayName": "Block: Gantt",
5
5
  "displayName.zh-CN": "区块:甘特图",
6
6
  "description": "Provides Gantt block.",
@@ -17,7 +17,7 @@
17
17
  "@nocobase/server": "1.x",
18
18
  "@nocobase/test": "1.x"
19
19
  },
20
- "gitHead": "1ece4e558ba445088dbb658bd458eb0004295326",
20
+ "gitHead": "d5b141a3cd197a3165d69306b99135ea0c7e4aa2",
21
21
  "keywords": [
22
22
  "Blocks"
23
23
  ]